From 5a1a36ec290fd4e4cd856c7f4b49b1eebe8f82a7 Mon Sep 17 00:00:00 2001 From: Ben Alkov Date: Tue, 22 Nov 2022 17:28:08 -0500 Subject: [PATCH 001/220] feat(install); unify setup.py, requirements.in, pip This allows populating setup.py's 'install_requires' directly from 'requirements.in' - setup.py: - read 'requirements.in' instead of 'requirements.txt' - add correct upstream pytorch repo to "dependency_links" - requirements.in: - append "name @" to git packages - fix torch repo URL -> 'download.pytorch.org/whl/torch_stable.html' Signed-off-by: Ben Alkov --- installer/install.bat | 8 +++++--- installer/install.sh | 8 +++++--- installer/requirements.in | 10 +++++----- setup.py | 33 +++++++++++++++++---------------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/installer/install.bat b/installer/install.bat index f8216cb323..1cfbc79e2b 100644 --- a/installer/install.bat +++ b/installer/install.bat @@ -122,7 +122,7 @@ set err_msg=----- pip update failed ----- .venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location --upgrade pip wheel if %errorlevel% neq 0 goto err_exit -echo ***** Updated pip ***** +echo ***** Updated pip and wheel ***** set err_msg=----- requirements file copy failed ----- copy installer\py3.10-windows-x86_64-cuda-reqs.txt requirements.txt @@ -132,14 +132,16 @@ set err_msg=----- main pip install failed ----- .venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -r requirements.txt if %errorlevel% neq 0 goto err_exit +echo ***** Installed Python dependencies ***** + set err_msg=----- InvokeAI setup failed ----- .venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -e . if %errorlevel% neq 0 goto err_exit -echo ***** Installed Python dependencies ***** +echo ***** Installed InvokeAI ***** -echo ***** Installing invoke.bat ****** copy installer\invoke.bat .\invoke.bat +echo ***** Installed invoke launcher script ****** @rem more cleanup rd /s /q installer installer_files diff --git a/installer/install.sh b/installer/install.sh index 9e9ff84c03..807584309d 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -192,7 +192,7 @@ _err_msg="\n----- pip update failed -----\n" .venv/bin/python3 -m pip install "$no_cache_dir" --no-warn-script-location --upgrade pip wheel _err_exit $? _err_msg -echo -e "\n***** Updated pip *****\n" +echo -e "\n***** Updated pip and wheel *****\n" _err_msg="\n----- requirements file copy failed -----\n" cp installer/py3.10-${OS_NAME}-"${OS_ARCH}"-${CD}-reqs.txt requirements.txt @@ -202,14 +202,16 @@ _err_msg="\n----- main pip install failed -----\n" .venv/bin/python3 -m pip install "$no_cache_dir" --no-warn-script-location -r requirements.txt _err_exit $? _err_msg +echo -e "\n***** Installed Python dependencies *****\n" + _err_msg="\n----- InvokeAI setup failed -----\n" .venv/bin/python3 -m pip install "$no_cache_dir" --no-warn-script-location -e . _err_exit $? _err_msg -echo -e "\n***** Installed Python dependencies *****\n" +echo -e "\n***** Installed InvokeAI *****\n" -echo -e "\n***** Installing invoke.sh ******\n" cp installer/invoke.sh . +echo -e "\n***** Installed invoke launcher script ******\n" # more cleanup rm -rf installer/ installer_files/ diff --git a/installer/requirements.in b/installer/requirements.in index 3eb796e0f0..894ce85b6c 100644 --- a/installer/requirements.in +++ b/installer/requirements.in @@ -1,5 +1,5 @@ --prefer-binary ---extra-index-url https://download.pytorch.org/whl/cu116 +--extra-index-url https://download.pytorch.org/whl/torch_stable.html --trusted-host https://download.pytorch.org accelerate~=0.14 albumentations @@ -23,7 +23,7 @@ torchvision==0.13.0 ; platform_system == 'Darwin' torchvision==0.13.0+cu116 ; platform_system == 'Linux' or platform_system == 'Windows' transformers picklescan -https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip -https://github.com/invoke-ai/clipseg/archive/1f754751c85d7d4255fa681f4491ff5711c1c288.zip -https://github.com/TencentARC/GFPGAN/archive/2eac2033893ca7f427f4035d80fe95b92649ac56.zip -https://github.com/invoke-ai/k-diffusion/archive/7f16b2c33411f26b3eae78d10648d625cb0c1095.zip +clip @ https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip +clipseg @ https://github.com/invoke-ai/clipseg/archive/1f754751c85d7d4255fa681f4491ff5711c1c288.zip +gfpgan @ https://github.com/TencentARC/GFPGAN/archive/2eac2033893ca7f427f4035d80fe95b92649ac56.zip +k-diffusion @ https://github.com/invoke-ai/k-diffusion/archive/7f16b2c33411f26b3eae78d10648d625cb0c1095.zip diff --git a/setup.py b/setup.py index d40100e318..bf33b31345 100644 --- a/setup.py +++ b/setup.py @@ -3,24 +3,25 @@ import re from setuptools import setup, find_packages + def frontend_files(directory): - paths = [] - for (path, directories, filenames) in os.walk(directory): - for filename in filenames: - paths.append(os.path.join(path, filename)) - return paths + paths = [] + for (path, _, filenames) in os.walk(directory): + for filename in filenames: + paths.append(os.path.join(path, filename)) + return paths def _get_requirements(path): try: with open(path) as f: packages = f.read().splitlines() - except (IOError, OSError) as ex: - raise RuntimeError("Can't open file with requirements: %s", repr(ex)) - + except OSError as ex: + raise RuntimeError('Cannot open file with requirements: %s', repr(ex)) + # Drop option lines - packages = [package for package in packages if not re.match(r"^--", package)] - packages = [package for package in packages if not re.match(r"^http", package)] + packages = [package for package in packages if not re.match(r'^--', package)] + print(f'Packages found for "install_requires":\n{packages}') return packages @@ -31,9 +32,9 @@ VERSION = '2.1.4' DESCRIPTION = ('An implementation of Stable Diffusion which provides various new features' ' and options to aid the image generation process') LONG_DESCRIPTION = ('This version of Stable Diffusion features a slick WebGUI, an' - ' interactive command-line script that combines text2img and img2img' - ' functionality in a "dream bot" style interface, and multiple features' - ' and other enhancements.') + ' interactive command-line script that combines text2img and img2img' + ' functionality in a "dream bot" style interface, and multiple features' + ' and other enhancements.') HOMEPAGE = 'https://github.com/invoke-ai/InvokeAI' setup( @@ -47,6 +48,9 @@ setup( license='MIT', packages=find_packages(exclude=['tests.*']), install_requires=_get_requirements('installer/requirements.in'), + dependency_links=['https://download.pytorch.org/whl/torch_stable.html'], + scripts=['scripts/invoke.py', 'scripts/configure_invokeai.py', 'scripts/sd-metadata.py'], + data_files=[('frontend', frontend_files)], python_requires='>=3.8, <4', classifiers=[ 'Development Status :: 4 - Beta', @@ -70,7 +74,4 @@ setup( 'Topic :: Scientific/Engineering :: Artificial Intelligence', 'Topic :: Scientific/Engineering :: Image Processing', ], - scripts = ['scripts/invoke.py','scripts/configure_invokeai.py','scripts/sd-metadata.py'], - data_files=[('frontend',frontend_files)], ) - From 964e584bd35c1d424125e04a18d067f2d896849b Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Fri, 25 Nov 2022 03:03:24 +0000 Subject: [PATCH 002/220] remove redundant `scripts` arg from `setup.py` --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 9916ace17d..bb46a21b9a 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,6 @@ setup( packages=find_packages(exclude=['tests.*']), install_requires=_get_requirements('installer/requirements.in'), dependency_links=['https://download.pytorch.org/whl/torch_stable.html'], - scripts=['scripts/invoke.py', 'scripts/configure_invokeai.py', 'scripts/sd-metadata.py'], data_files=[('frontend', frontend_files)], python_requires='>=3.8, <4', classifiers=[ From b945ae4e01ae6df1a68c3286338558a50ace69c8 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Fri, 25 Nov 2022 03:50:52 +0000 Subject: [PATCH 003/220] two more fixups 1. removed redundant `data_files` argument from setup.py 2. upped requirement to Python >= 3.9. This is due to a feature used in `argparse` that is only available in 3.9 or higher. --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bb46a21b9a..4161775038 100644 --- a/setup.py +++ b/setup.py @@ -49,8 +49,7 @@ setup( packages=find_packages(exclude=['tests.*']), install_requires=_get_requirements('installer/requirements.in'), dependency_links=['https://download.pytorch.org/whl/torch_stable.html'], - data_files=[('frontend', frontend_files)], - python_requires='>=3.8, <4', + python_requires='>=3.9, <4', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: GPU', From e98068a54685c6559c4c18e5c0fb88adaf09418d Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Fri, 25 Nov 2022 04:49:41 +0000 Subject: [PATCH 004/220] unpinned clip, clipseg, gfpgan and k-diffusion - conflicts with their counterparts in the environment files was causing the CI conda-based tests to fail. - installer seems to work still --- installer/requirements.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/installer/requirements.in b/installer/requirements.in index d521b1c677..ab6b2a1ff5 100644 --- a/installer/requirements.in +++ b/installer/requirements.in @@ -25,7 +25,8 @@ torch torchvision transformers picklescan -clip @ https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip -clipseg @ https://github.com/invoke-ai/clipseg/archive/1f754751c85d7d4255fa681f4491ff5711c1c288.zip -gfpgan @ https://github.com/TencentARC/GFPGAN/archive/2eac2033893ca7f427f4035d80fe95b92649ac56.zip -k-diffusion @ https://github.com/invoke-ai/k-diffusion/archive/7f16b2c33411f26b3eae78d10648d625cb0c1095.zip +clip +clipseg +gfpgan +k-diffusion + From 248068fe5d57b5639ea7a87ee6cbf023104d957d Mon Sep 17 00:00:00 2001 From: devops117 <55235206+devops117@users.noreply.github.com> Date: Wed, 23 Nov 2022 10:40:27 +0530 Subject: [PATCH 005/220] make the docstring more readable and improve the list_models logic Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com> --- ldm/invoke/model_cache.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/ldm/invoke/model_cache.py b/ldm/invoke/model_cache.py index 645a6fd4da..3bb1b7e928 100644 --- a/ldm/invoke/model_cache.py +++ b/ldm/invoke/model_cache.py @@ -125,15 +125,18 @@ class ModelCache(object): def list_models(self) -> dict: ''' Return a dict of models in the format: - { model_name1: {'status': ('active'|'cached'|'not loaded'), - 'description': description, - }, - model_name2: { etc } + { + model_name1: { + 'status': ('active'|'cached'|'not loaded'), + 'description': description, + }, + model_name2: { etc }, + } ''' - result = dict() - for name in self.config: + models = {} + for name, config in self.config.items(): try: - description = self.config[name].description + description = config.description except ConfigAttributeError: description = '' @@ -144,11 +147,13 @@ class ModelCache(object): else: status = 'not loaded' - result[name]={ - 'status' : status, - 'description' : description - } - return result + models = models.update( + name = { + 'status': status, + 'description': description, + }) + + return models def print_models(self) -> None: ''' From 6c7191712fe16a1f57052e366676f16824c2a7fb Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 06:54:06 +1100 Subject: [PATCH 006/220] Rebases against development --- backend/invoke_ai_web_server.py | 365 ++++- .../get_outpainting_generation_mode.py | 117 ++ .../init-img_full_transparency.png | Bin 0 -> 2731 bytes .../modules/test_images/init-img_opaque.png | Bin 0 -> 299473 bytes .../init-img_partial_transparency.png | Bin 0 -> 167798 bytes .../test_images/init-mask_has_mask.png | Bin 0 -> 9684 bytes .../modules/test_images/init-mask_no_mask.png | Bin 0 -> 3513 bytes frontend/README.md | 4 +- frontend/eslintconfig.json | 23 + frontend/package.json | 9 +- frontend/src/app/App.scss | 4 + frontend/src/app/App.tsx | 42 +- frontend/src/app/constants.ts | 2 +- frontend/src/app/invokeai.d.ts | 25 +- .../src/app/selectors/readinessSelector.ts | 31 +- frontend/src/app/socketio/actions.ts | 6 +- frontend/src/app/socketio/emitters.ts | 45 +- frontend/src/app/socketio/listeners.ts | 35 +- frontend/src/app/socketio/middleware.ts | 11 +- frontend/src/app/store.ts | 133 +- frontend/src/common/components/GuideIcon.tsx | 2 +- .../src/common/components/GuidePopover.scss | 8 +- .../src/common/components/GuidePopover.tsx | 8 +- frontend/src/common/components/IAIButton.scss | 7 +- .../src/common/components/IAICheckbox.scss | 2 +- .../src/common/components/IAIIconButton.scss | 55 +- .../src/common/components/IAIIconButton.tsx | 16 +- .../src/common/components/IAINumberInput.scss | 12 +- .../src/common/components/IAINumberInput.tsx | 3 + .../src/common/components/IAIPopover.scss | 8 +- frontend/src/common/components/IAIPopover.tsx | 2 +- frontend/src/common/components/IAISelect.scss | 1 + frontend/src/common/components/IAISelect.tsx | 23 +- frontend/src/common/components/IAISlider.scss | 80 +- frontend/src/common/components/IAISlider.tsx | 248 ++- .../common/components/ImageUploadOverlay.tsx | 1 + .../src/common/components/ImageUploader.scss | 11 +- .../src/common/components/ImageUploader.tsx | 30 +- .../common/components/ImageUploaderButton.tsx | 2 +- .../components/ImageUploaderIconButton.tsx | 2 +- .../WorkInProgress/ImageToImageWIP.tsx | 2 +- .../src/common/util/openBase64ImageInTab.ts | 21 + .../src/common/util/parameterTranslation.ts | 106 +- frontend/src/common/util/promptToString.ts | 2 +- frontend/src/common/util/seedWeightPairs.ts | 2 +- frontend/src/features/canvas/IAICanvas.tsx | 275 ++++ .../IAICanvasBoundingBoxPreview.tsx} | 298 ++-- .../canvas/IAICanvasBrushButtonPopover.tsx | 95 ++ .../features/canvas/IAICanvasBrushPreview.tsx | 121 ++ .../src/features/canvas/IAICanvasControls.tsx | 100 ++ .../IAICanvasBrushControl.tsx} | 56 +- .../IAICanvasClearImageControl.tsx} | 9 +- .../IAICanvasEraserControl.tsx | 61 + .../IAICanvasImageEraserControl.tsx | 60 + .../IAICanvasLockBoundingBoxControl.tsx | 47 + .../IAICanvasMaskControl.tsx | 38 + .../IAICanvasBrushColorPicker.tsx | 75 + .../IAICanvasMaskClear.tsx | 77 + .../IAICanvasMaskColorPicker.tsx} | 50 +- .../IAICanvasMaskInvertControl.tsx} | 41 +- .../IAICanvasMaskVisibilityControl.tsx | 60 + .../IAICanvasControls/IAICanvasRedoButton.tsx | 57 + .../IAICanvasShowHideBoundingBoxControl.tsx | 46 + .../IAICanvasSplitLayoutControl.tsx} | 17 +- .../IAICanvasControls/IAICanvasUndoButton.tsx | 58 + .../canvas/IAICanvasEraserButtonPopover.tsx | 71 + .../features/canvas/IAICanvasEraserLines.tsx | 49 + .../src/features/canvas/IAICanvasGrid.tsx | 88 ++ .../src/features/canvas/IAICanvasImage.tsx | 15 + .../canvas/IAICanvasIntermediateImage.tsx | 59 + .../canvas/IAICanvasMaskButtonPopover.tsx | 69 + .../canvas/IAICanvasMaskCompositer.tsx | 49 + .../features/canvas/IAICanvasMaskLines.tsx | 64 + .../canvas/IAICanvasOutpaintingControls.tsx | 112 ++ .../canvas/IAICanvasOutpaintingObjects.tsx | 65 + .../src/features/canvas/IAICanvasResizer.tsx | 78 + .../canvas/IAICanvasSettingsButtonPopover.tsx | 101 ++ .../features/canvas/IAICanvasStatusText.tsx | 74 + frontend/src/features/canvas/canvasSlice.ts | 764 +++++++++ .../canvas/hooks/useCanvasDragMove.ts | 49 + .../features/canvas/hooks/useCanvasHotkeys.ts | 111 ++ .../canvas/hooks/useCanvasMouseDown.ts | 56 + .../canvas/hooks/useCanvasMouseEnter.ts | 48 + .../canvas/hooks/useCanvasMouseMove.ts | 64 + .../canvas/hooks/useCanvasMouseOut.ts | 15 + .../features/canvas/hooks/useCanvasMouseUp.ts | 64 + .../features/canvas/hooks/useCanvasZoom.ts | 83 + .../canvas/hooks/useUnscaleCanvasValue.ts | 23 + .../util/colorToString.ts | 0 .../Inpainting => canvas}/util/constants.ts | 4 + .../src/features/canvas/util/generateMask.ts | 64 + .../util/getScaledCursorPosition.ts | 0 .../features/gallery/CurrentImageButtons.scss | 7 + .../features/gallery/CurrentImageButtons.tsx | 89 +- .../features/gallery/CurrentImageDisplay.scss | 1 + .../features/gallery/CurrentImageDisplay.tsx | 6 +- .../features/gallery/CurrentImagePreview.tsx | 9 +- .../src/features/gallery/DeleteImageModal.tsx | 10 +- .../src/features/gallery/HoverableImage.tsx | 32 +- .../src/features/gallery/ImageGallery.scss | 35 +- .../src/features/gallery/ImageGallery.tsx | 141 +- .../ImageMetadataViewer.tsx | 10 +- frontend/src/features/gallery/gallerySlice.ts | 13 +- .../features/gallery/gallerySliceSelectors.ts | 12 +- frontend/src/features/lightbox/Lightbox.scss | 74 + frontend/src/features/lightbox/Lightbox.tsx | 116 ++ .../src/features/lightbox/ReactPanZoom.tsx | 155 ++ .../AccordionItems/AdvancedSettings.scss | 17 +- .../AccordionItems/InvokeAccordionItem.tsx | 4 +- .../FaceRestore/FaceRestoreHeader.tsx | 6 +- .../FaceRestore/FaceRestoreOptions.tsx | 14 +- .../AdvancedOptions/ImageToImage/ImageFit.tsx | 6 +- .../ImageToImage/ImageToImageStrength.tsx | 33 +- .../BoundingBoxDarkenOutside.tsx | 29 +- .../BoundingBoxDimensionSlider.tsx | 86 +- .../BoundingBoxSettings/BoundingBoxLock.tsx | 22 +- .../BoundingBoxSettings.scss | 14 +- .../BoundingBoxSettings.tsx | 4 +- .../BoundingBoxVisibility.tsx | 22 +- .../Inpainting/ClearBrushHistory.tsx | 24 +- .../Inpainting/InpaintReplace.tsx | 49 +- .../AdvancedOptions/Output/HiresOptions.tsx | 6 +- .../Output/SeamlessOptions.tsx | 6 +- .../options/AdvancedOptions/Seed/Perlin.tsx | 6 +- .../AdvancedOptions/Seed/RandomizeSeed.tsx | 6 +- .../options/AdvancedOptions/Seed/Seed.tsx | 8 +- .../AdvancedOptions/Seed/ShuffleSeed.tsx | 12 +- .../AdvancedOptions/Seed/Threshold.tsx | 6 +- .../AdvancedOptions/Upscale/UpscaleHeader.tsx | 6 +- .../Upscale/UpscaleOptions.tsx | 14 +- .../Variations/GenerateVariations.tsx | 6 +- .../Variations/SeedWeights.tsx | 8 +- .../Variations/VariationAmount.tsx | 6 +- .../MainAdvancedOptionsCheckbox.tsx | 6 +- .../options/MainOptions/MainCFGScale.tsx | 9 +- .../options/MainOptions/MainHeight.tsx | 12 +- .../options/MainOptions/MainIterations.tsx | 12 +- .../options/MainOptions/MainOptions.scss | 21 +- .../options/MainOptions/MainOptions.tsx | 1 - .../options/MainOptions/MainSampler.tsx | 10 +- .../options/MainOptions/MainSteps.tsx | 9 +- .../options/MainOptions/MainWidth.tsx | 12 +- .../src/features/options/OptionsAccordion.tsx | 4 +- .../options/ProcessButtons/CancelButton.tsx | 8 +- .../options/ProcessButtons/InvokeButton.tsx | 36 +- .../options/ProcessButtons/Loopback.tsx | 6 +- .../ProcessButtons/ProcessButtons.scss | 19 +- .../options/PromptInput/PromptInput.tsx | 10 +- .../src/features/options/optionsSelectors.ts | 4 +- frontend/src/features/options/optionsSlice.ts | 22 +- frontend/src/features/system/Console.scss | 20 +- frontend/src/features/system/Console.tsx | 4 +- .../system/HotkeysModal/HotkeysModal.scss | 9 +- .../system/HotkeysModal/HotkeysModal.tsx | 47 +- frontend/src/features/system/Modal.scss | 10 + frontend/src/features/system/ProgressBar.scss | 2 +- frontend/src/features/system/ProgressBar.tsx | 6 +- .../system/SettingsModal/ModelList.scss | 11 +- .../system/SettingsModal/ModelList.tsx | 8 +- .../system/SettingsModal/SettingsModal.scss | 1 - .../system/SettingsModal/SettingsModal.tsx | 45 +- frontend/src/features/system/SiteHeader.scss | 11 + frontend/src/features/system/SiteHeader.tsx | 32 +- .../src/features/system/StatusIndicator.tsx | 2 +- frontend/src/features/system/ThemeChanger.tsx | 29 + frontend/src/features/system/systemSlice.ts | 8 +- .../src/features/tabs/FloatingButton.scss | 28 +- .../features/tabs/FloatingGalleryButton.tsx | 17 +- .../tabs/FloatingOptionsPanelButtons.tsx | 20 +- .../tabs/ImageToImage/ImageToImage.scss | 9 +- .../tabs/ImageToImage/ImageToImageDisplay.tsx | 6 +- .../tabs/ImageToImage/ImageToImagePanel.tsx | 40 +- .../tabs/ImageToImage/InitImagePreview.tsx | 6 +- .../tabs/ImageToImage/InitialImageOverlay.tsx | 2 +- .../src/features/tabs/ImageToImage/index.tsx | 2 +- .../tabs/Inpainting/InpaintingCanvas.tsx | 309 ---- .../InpaintingCanvasPlaceholder.tsx | 36 - .../InpaintingCanvasStatusIcons.scss | 29 - .../InpaintingCanvasStatusIcons.tsx | 126 -- .../tabs/Inpainting/InpaintingControls.tsx | 40 - .../InpaintingEraserControl.tsx | 67 - .../InpaintingLockBoundingBoxControl.tsx | 29 - .../InpaintingMaskControl.tsx | 38 - .../InpaintingMaskClear.tsx | 70 - .../InpaintingMaskVisibilityControl.tsx | 61 - .../InpaintingRedoControl.tsx | 66 - .../InpaintingShowHideBoundingBoxControl.tsx | 29 - .../InpaintingUndoControl.tsx | 66 - .../tabs/Inpainting/InpaintingDisplay.tsx | 47 +- .../tabs/Inpainting/InpaintingPanel.tsx | 41 +- ...npainting.scss => InpaintingWorkarea.scss} | 4 +- .../tabs/Inpainting/InpaintingWorkarea.tsx | 22 + .../tabs/Inpainting/KeyboardEventManager.tsx | 143 -- .../tabs/Inpainting/components/Cacher.tsx | 97 -- .../InpaintingCanvasBrushPreview.tsx | 75 - .../InpaintingCanvasBrushPreviewOutline.tsx | 80 - .../components/InpaintingCanvasLines.tsx | 37 - .../Inpainting/hooks/_useInpaintingHotkeys.ts | 146 -- .../src/features/tabs/Inpainting/index.tsx | 14 - .../tabs/Inpainting/inpaintingSlice.ts | 383 ----- .../Inpainting/inpaintingSliceSelectors.ts | 129 -- .../tabs/Inpainting/util/generateMask.ts | 109 -- .../src/features/tabs/InvokeOptionsPanel.scss | 2 +- .../src/features/tabs/InvokeOptionsPanel.tsx | 20 +- frontend/src/features/tabs/InvokeTabs.scss | 2 +- frontend/src/features/tabs/InvokeTabs.tsx | 79 +- .../src/features/tabs/InvokeWorkarea.scss | 14 +- frontend/src/features/tabs/InvokeWorkarea.tsx | 36 +- .../tabs/Outpainting/OutpaintingDisplay.tsx | 74 + .../tabs/Outpainting/OutpaintingPanel.tsx | 65 + .../tabs/Outpainting/OutpaintingWorkarea.scss | 98 ++ .../tabs/Outpainting/OutpaintingWorkarea.tsx | 22 + .../tabs/TextToImage/TextToImageDisplay.tsx | 2 +- .../tabs/TextToImage/TextToImagePanel.tsx | 36 +- .../src/features/tabs/TextToImage/index.tsx | 2 +- frontend/src/global.d.ts | 39 + frontend/src/main.tsx | 19 +- frontend/src/styles/Mixins/Buttons.scss | 22 +- .../src/styles/{ => Themes}/_Colors_Dark.scss | 73 +- frontend/src/styles/Themes/_Colors_Green.scss | 132 ++ .../styles/{ => Themes}/_Colors_Light.scss | 53 +- frontend/src/styles/_Misc.scss | 29 +- frontend/src/styles/index.scss | 19 +- frontend/tsconfig.json | 1 + frontend/tsconfig.node.json | 3 +- frontend/vite.config.ts | 8 +- frontend/yarn.lock | 1381 +++++++++-------- ldm/generate.py | 8 +- ldm/invoke/args.py | 5 + ldm/invoke/generator/base.py | 52 +- ldm/invoke/generator/inpaint.py | 82 +- ldm/invoke/generator/omnibus.py | 22 +- ldm/util.py | 18 + 233 files changed, 7487 insertions(+), 4316 deletions(-) create mode 100644 backend/modules/get_outpainting_generation_mode.py create mode 100644 backend/modules/test_images/init-img_full_transparency.png create mode 100644 backend/modules/test_images/init-img_opaque.png create mode 100644 backend/modules/test_images/init-img_partial_transparency.png create mode 100644 backend/modules/test_images/init-mask_has_mask.png create mode 100644 backend/modules/test_images/init-mask_no_mask.png create mode 100644 frontend/eslintconfig.json create mode 100644 frontend/src/common/util/openBase64ImageInTab.ts create mode 100644 frontend/src/features/canvas/IAICanvas.tsx rename frontend/src/features/{tabs/Inpainting/components/InpaintingBoundingBoxPreview.tsx => canvas/IAICanvasBoundingBoxPreview.tsx} (62%) create mode 100644 frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx create mode 100644 frontend/src/features/canvas/IAICanvasBrushPreview.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls.tsx rename frontend/src/features/{tabs/Inpainting/InpaintingControls/InpaintingBrushControl.tsx => canvas/IAICanvasControls/IAICanvasBrushControl.tsx} (60%) rename frontend/src/features/{tabs/Inpainting/InpaintingControls/InpaintingClearImageControl.tsx => canvas/IAICanvasControls/IAICanvasClearImageControl.tsx} (55%) create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx rename frontend/src/features/{tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskColorPicker.tsx => canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx} (51%) rename frontend/src/features/{tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskInvertControl.tsx => canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx} (50%) create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx rename frontend/src/features/{tabs/Inpainting/InpaintingControls/InpaintingSplitLayoutControl.tsx => canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx} (64%) create mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx create mode 100644 frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx create mode 100644 frontend/src/features/canvas/IAICanvasEraserLines.tsx create mode 100644 frontend/src/features/canvas/IAICanvasGrid.tsx create mode 100644 frontend/src/features/canvas/IAICanvasImage.tsx create mode 100644 frontend/src/features/canvas/IAICanvasIntermediateImage.tsx create mode 100644 frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx create mode 100644 frontend/src/features/canvas/IAICanvasMaskCompositer.tsx create mode 100644 frontend/src/features/canvas/IAICanvasMaskLines.tsx create mode 100644 frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx create mode 100644 frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx create mode 100644 frontend/src/features/canvas/IAICanvasResizer.tsx create mode 100644 frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx create mode 100644 frontend/src/features/canvas/IAICanvasStatusText.tsx create mode 100644 frontend/src/features/canvas/canvasSlice.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasDragMove.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasHotkeys.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasMouseDown.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasMouseMove.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasMouseOut.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasMouseUp.ts create mode 100644 frontend/src/features/canvas/hooks/useCanvasZoom.ts create mode 100644 frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts rename frontend/src/features/{tabs/Inpainting => canvas}/util/colorToString.ts (100%) rename frontend/src/features/{tabs/Inpainting => canvas}/util/constants.ts (68%) create mode 100644 frontend/src/features/canvas/util/generateMask.ts rename frontend/src/features/{tabs/Inpainting => canvas}/util/getScaledCursorPosition.ts (100%) create mode 100644 frontend/src/features/lightbox/Lightbox.scss create mode 100644 frontend/src/features/lightbox/Lightbox.tsx create mode 100644 frontend/src/features/lightbox/ReactPanZoom.tsx create mode 100644 frontend/src/features/system/Modal.scss create mode 100644 frontend/src/features/system/ThemeChanger.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingCanvas.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingCanvasPlaceholder.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingEraserControl.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingLockBoundingBoxControl.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControl.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskClear.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskVisibilityControl.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingRedoControl.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingShowHideBoundingBoxControl.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingUndoControl.tsx rename frontend/src/features/tabs/Inpainting/{Inpainting.scss => InpaintingWorkarea.scss} (94%) create mode 100644 frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/KeyboardEventManager.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/components/Cacher.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreview.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreviewOutline.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/components/InpaintingCanvasLines.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/hooks/_useInpaintingHotkeys.ts delete mode 100644 frontend/src/features/tabs/Inpainting/index.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/inpaintingSlice.ts delete mode 100644 frontend/src/features/tabs/Inpainting/inpaintingSliceSelectors.ts delete mode 100644 frontend/src/features/tabs/Inpainting/util/generateMask.ts create mode 100644 frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx create mode 100644 frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx create mode 100644 frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss create mode 100644 frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx create mode 100644 frontend/src/global.d.ts rename frontend/src/styles/{ => Themes}/_Colors_Dark.scss (77%) create mode 100644 frontend/src/styles/Themes/_Colors_Green.scss rename frontend/src/styles/{ => Themes}/_Colors_Light.scss (89%) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index c123f4435c..93f19bb8fa 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -7,10 +7,13 @@ import traceback import math import io import base64 +import os -from flask import Flask, redirect, send_from_directory +from werkzeug.utils import secure_filename +from flask import Flask, redirect, send_from_directory, flash, request, url_for, jsonify from flask_socketio import SocketIO from PIL import Image +from PIL.Image import Image as ImageType from uuid import uuid4 from threading import Event @@ -19,6 +22,9 @@ from ldm.invoke.pngwriter import PngWriter, retrieve_metadata from ldm.invoke.prompt_parser import split_weighted_subprompts from backend.modules.parameters import parameters_to_command +from backend.modules.get_outpainting_generation_mode import ( + get_outpainting_generation_mode, +) # Loading Arguments opt = Args() @@ -91,6 +97,43 @@ class InvokeAIWebServer: else: return send_from_directory(self.app.static_folder, "index.html") + @self.app.route("/upload", methods=["POST"]) + def upload_base64_file(): + try: + data = request.get_json() + dataURL = data["dataURL"] + name = data["name"] + + print(f'>> Image upload requested "{name}"') + + if dataURL is not None: + bytes = dataURL_to_bytes(dataURL) + + file_path = self.save_file_unique_uuid_name( + bytes=bytes, name=name, path=self.result_path + ) + + mtime = os.path.getmtime(file_path) + (width, height) = Image.open(file_path).size + + response = { + "url": self.get_url_from_image_path(file_path), + "mtime": mtime, + "width": width, + "height": height, + "category": "result", + "destination": "outpainting_merge", + } + return response + else: + return "No dataURL provided" + except Exception as e: + self.socketio.emit("error", {"message": (str(e))}) + print("\n") + + traceback.print_exc() + print("\n") + self.load_socketio_listeners(self.socketio) if args.gui: @@ -308,19 +351,24 @@ class InvokeAIWebServer: generation_parameters, esrgan_parameters, facetool_parameters ): try: - # truncate long init_mask base64 if needed + # truncate long init_mask/init_img base64 if needed + printable_parameters = { + **generation_parameters, + } + + if "init_img" in generation_parameters: + printable_parameters["init_img"] = ( + printable_parameters["init_img"][:64] + "..." + ) + if "init_mask" in generation_parameters: - printable_parameters = { - **generation_parameters, - "init_mask": generation_parameters["init_mask"][:20] + "...", - } - print( - f">> Image generation requested: {printable_parameters}\nESRGAN parameters: {esrgan_parameters}\nFacetool parameters: {facetool_parameters}" - ) - else: - print( - f">> Image generation requested: {generation_parameters}\nESRGAN parameters: {esrgan_parameters}\nFacetool parameters: {facetool_parameters}" + printable_parameters["init_mask"] = ( + printable_parameters["init_mask"][:64] + "..." ) + + print( + f">> Image generation requested: {printable_parameters}\nESRGAN parameters: {esrgan_parameters}\nFacetool parameters: {facetool_parameters}" + ) self.generate_images( generation_parameters, esrgan_parameters, @@ -456,7 +504,7 @@ class InvokeAIWebServer: from send2trash import send2trash path = self.get_image_path_from_url(url) - print(path) + send2trash(path) socketio.emit( "imageDeleted", @@ -479,7 +527,7 @@ class InvokeAIWebServer: ) mtime = os.path.getmtime(file_path) (width, height) = Image.open(file_path).size - print(file_path) + socketio.emit( "imageUploaded", { @@ -499,17 +547,18 @@ class InvokeAIWebServer: print("\n") # TODO: I think this needs a safety mechanism. - @socketio.on("uploadMaskImage") - def handle_upload_mask_image(bytes, name): + @socketio.on("uploadOutpaintingMergeImage") + def handle_upload_outpainting_merge_image(dataURL, name): try: - print(f'>> Mask image upload requested "{name}"') + print(f'>> Outpainting merge image upload requested "{name}"') - file_path = self.save_file_unique_uuid_name( - bytes=bytes, name=name, path=self.mask_image_path - ) + image = dataURL_to_image(dataURL) + file_name = self.make_unique_init_image_filename(name) + file_path = os.path.join(self.result_path, file_name) + image.save(file_path) socketio.emit( - "maskImageUploaded", + "outpaintingMergeImageUploaded", { "url": self.get_url_from_image_path(file_path), }, @@ -546,59 +595,146 @@ class InvokeAIWebServer: else [] ) + actual_generation_mode = generation_parameters["generation_mode"] + original_bounding_box = None """ TODO: If a result image is used as an init image, and then deleted, we will want to be able to use it as an init image in the future. Need to handle this case. """ - # We need to give absolute paths to the generator, stash the URLs for later - init_img_url = None - mask_img_url = None + """ + Prepare for generation based on generation_mode + """ + if generation_parameters["generation_mode"] == "outpainting": + """ + generation_parameters["init_img"] is a base64 image + generation_parameters["init_mask"] is a base64 image - if "init_img" in generation_parameters: + So we need to convert each into a PIL Image. + """ + + truncated_outpaint_image_b64 = generation_parameters["init_img"][:64] + truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] + + outpaint_image = dataURL_to_image( + generation_parameters["init_img"] + ).convert("RGBA") + + # Convert mask dataURL to an image and convert to greyscale + outpaint_mask = dataURL_to_image( + generation_parameters["init_mask"] + ).convert("L") + + actual_generation_mode = get_outpainting_generation_mode( + outpaint_image, outpaint_mask + ) + + """ + The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass + to the generator should be: + { + "x": 0, + "y": 0, + "width": original_bounding_box["width"], + "height": original_bounding_box["height"] + } + + Save the original bounding box, we need to give it back to the UI when finished, + because the UI needs to know where to put the inpainted image on the canvas. + """ + original_bounding_box = generation_parameters["bounding_box"].copy() + + generation_parameters["bounding_box"]["x"] = 0 + generation_parameters["bounding_box"]["y"] = 0 + + """ + Apply the mask to the init image, creating a "mask" image with + transparency where inpainting should occur. This is the kind of + mask that prompt2image() needs. + """ + alpha_mask = outpaint_image.copy() + alpha_mask.putalpha(outpaint_mask) + + generation_parameters["init_img"] = outpaint_image + generation_parameters["init_mask"] = alpha_mask + + # Remove the unneeded parameters for whichever mode we are doing + if actual_generation_mode == "inpainting": + generation_parameters.pop("seam_size", None) + generation_parameters.pop("seam_blur", None) + generation_parameters.pop("seam_strength", None) + generation_parameters.pop("seam_steps", None) + generation_parameters.pop("tile_size", None) + generation_parameters.pop("force_outpaint", None) + elif actual_generation_mode == "img2img": + generation_parameters["height"] = original_bounding_box["height"] + generation_parameters["width"] = original_bounding_box["width"] + generation_parameters.pop("init_mask", None) + generation_parameters.pop("seam_size", None) + generation_parameters.pop("seam_blur", None) + generation_parameters.pop("seam_strength", None) + generation_parameters.pop("seam_steps", None) + generation_parameters.pop("tile_size", None) + generation_parameters.pop("force_outpaint", None) + elif actual_generation_mode == "txt2img": + generation_parameters["height"] = original_bounding_box["height"] + generation_parameters["width"] = original_bounding_box["width"] + generation_parameters.pop("strength", None) + generation_parameters.pop("fit", None) + generation_parameters.pop("init_img", None) + generation_parameters.pop("init_mask", None) + generation_parameters.pop("seam_size", None) + generation_parameters.pop("seam_blur", None) + generation_parameters.pop("seam_strength", None) + generation_parameters.pop("seam_steps", None) + generation_parameters.pop("tile_size", None) + generation_parameters.pop("force_outpaint", None) + + elif generation_parameters["generation_mode"] == "inpainting": + """ + generation_parameters["init_img"] is a url + generation_parameters["init_mask"] is a base64 image + + So we need to convert each into a PIL Image. + """ init_img_url = generation_parameters["init_img"] + truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] + + init_img_url = generation_parameters["init_img"] + init_img_path = self.get_image_path_from_url(init_img_url) - generation_parameters["init_img"] = init_img_path - # if 'init_mask' in generation_parameters: - # mask_img_url = generation_parameters['init_mask'] - # generation_parameters[ - # 'init_mask' - # ] = self.get_image_path_from_url( - # generation_parameters['init_mask'] - # ) - - if "init_mask" in generation_parameters: - # grab an Image of the init image original_image = Image.open(init_img_path) + rgba_image = original_image.convert("RGBA") + # copy a region from it which we will inpaint cropped_init_image = copy_image_from_bounding_box( - original_image, **generation_parameters["bounding_box"] + rgba_image, **generation_parameters["bounding_box"] ) + generation_parameters["init_img"] = cropped_init_image - if generation_parameters["is_mask_empty"]: - generation_parameters["init_mask"] = None - else: - # grab an Image of the mask - mask_image = Image.open( - io.BytesIO( - base64.decodebytes( - bytes(generation_parameters["init_mask"], "utf-8") - ) - ) - ) - generation_parameters["init_mask"] = mask_image + # Convert mask dataURL to an image and convert to greyscale + mask_image = dataURL_to_image( + generation_parameters["init_mask"] + ).convert("L") - totalSteps = self.calculate_real_steps( - steps=generation_parameters["steps"], - strength=generation_parameters["strength"] - if "strength" in generation_parameters - else None, - has_init_image="init_img" in generation_parameters, - ) + """ + Apply the mask to the init image, creating a "mask" image with + transparency where inpainting should occur. This is the kind of + mask that prompt2image() needs. + """ + alpha_mask = cropped_init_image.copy() + alpha_mask.putalpha(mask_image) + + generation_parameters["init_mask"] = alpha_mask + + elif generation_parameters["generation_mode"] == "img2img": + init_img_url = generation_parameters["init_img"] + init_img_path = self.get_image_path_from_url(init_img_url) + generation_parameters["init_img"] = init_img_path progress = Progress(generation_parameters=generation_parameters) @@ -613,13 +749,22 @@ class InvokeAIWebServer: nonlocal generation_parameters nonlocal progress + generation_messages = { + "txt2img": "Text to Image", + "img2img": "Image to Image", + "inpainting": "Inpainting", + "outpainting": "Outpainting", + } + progress.set_current_step(step + 1) - progress.set_current_status("Generating") + progress.set_current_status( + f"Generating ({generation_messages[actual_generation_mode]})" + ) progress.set_current_status_has_steps(True) if ( generation_parameters["progress_images"] - and step % generation_parameters['save_intermediates'] == 0 + and step % generation_parameters["save_intermediates"] == 0 and step < generation_parameters["steps"] - 1 ): image = self.generate.sample_to_image(sample) @@ -648,6 +793,8 @@ class InvokeAIWebServer: "metadata": metadata, "width": width, "height": height, + "generationMode": generation_parameters["generation_mode"], + "boundingBox": original_bounding_box, }, ) @@ -670,6 +817,8 @@ class InvokeAIWebServer: "metadata": {}, "width": width, "height": height, + "generationMode": generation_parameters["generation_mode"], + "boundingBox": original_bounding_box, }, ) @@ -688,8 +837,11 @@ class InvokeAIWebServer: step_index = 1 nonlocal prior_variations + """ + Tidy up after generation based on generation_mode + """ # paste the inpainting image back onto the original - if "init_mask" in generation_parameters: + if generation_parameters["generation_mode"] == "inpainting": image = paste_image_into_bounding_box( Image.open(init_img_path), image, @@ -786,11 +938,14 @@ class InvokeAIWebServer: # restore the stashed URLS and discard the paths, we are about to send the result to client if "init_img" in all_parameters: - all_parameters["init_img"] = init_img_url + all_parameters["init_img"] = "" if "init_mask" in all_parameters: all_parameters["init_mask"] = "" # TODO: store the mask in metadata + if generation_parameters["generation_mode"] == "outpainting": + all_parameters["bounding_box"] = original_bounding_box + metadata = self.parameters_to_generated_image_metadata(all_parameters) command = parameters_to_command(all_parameters) @@ -826,6 +981,8 @@ class InvokeAIWebServer: "metadata": metadata, "width": width, "height": height, + "boundingBox": original_bounding_box, + "generationMode": generation_parameters["generation_mode"], }, ) eventlet.sleep(0) @@ -933,25 +1090,25 @@ class InvokeAIWebServer: rfc_dict["variations"] = variations - if "init_img" in parameters: - rfc_dict["type"] = "img2img" - rfc_dict["strength"] = parameters["strength"] - rfc_dict["fit"] = parameters["fit"] # TODO: Noncompliant - rfc_dict["orig_hash"] = calculate_init_img_hash( - self.get_image_path_from_url(parameters["init_img"]) - ) - rfc_dict["init_image_path"] = parameters[ - "init_img" - ] # TODO: Noncompliant - # if 'init_mask' in parameters: - # rfc_dict['mask_hash'] = calculate_init_img_hash( - # self.get_image_path_from_url(parameters['init_mask']) - # ) # TODO: Noncompliant - # rfc_dict['mask_image_path'] = parameters[ - # 'init_mask' - # ] # TODO: Noncompliant - else: - rfc_dict["type"] = "txt2img" + # if "init_img" in parameters: + # rfc_dict["type"] = "img2img" + # rfc_dict["strength"] = parameters["strength"] + # rfc_dict["fit"] = parameters["fit"] # TODO: Noncompliant + # rfc_dict["orig_hash"] = calculate_init_img_hash( + # self.get_image_path_from_url(parameters["init_img"]) + # ) + # rfc_dict["init_image_path"] = parameters[ + # "init_img" + # ] # TODO: Noncompliant + # # if 'init_mask' in parameters: + # # rfc_dict['mask_hash'] = calculate_init_img_hash( + # # self.get_image_path_from_url(parameters['init_mask']) + # # ) # TODO: Noncompliant + # # rfc_dict['mask_image_path'] = parameters[ + # # 'init_mask' + # # ] # TODO: Noncompliant + # else: + # rfc_dict["type"] = "txt2img" metadata["image"] = rfc_dict @@ -1244,23 +1401,67 @@ class CanceledException(Exception): """ -Crops an image to a bounding box. +Returns a copy an image, cropped to a bounding box. """ -def copy_image_from_bounding_box(image, x, y, width, height): +def copy_image_from_bounding_box( + image: ImageType, x: int, y: int, width: int, height: int +) -> ImageType: with image as im: bounds = (x, y, x + width, y + height) im_cropped = im.crop(bounds) return im_cropped +""" +Converts a base64 image dataURL into an image. +The dataURL is split on the first commma. +""" + + +def dataURL_to_image(dataURL: str) -> ImageType: + image = Image.open( + io.BytesIO( + base64.decodebytes( + bytes( + dataURL.split(",", 1)[1], + "utf-8", + ) + ) + ) + ) + return image + + +""" +Converts a base64 image dataURL into bytes. +The dataURL is split on the first commma. +""" + + +def dataURL_to_bytes(dataURL: str) -> bytes: + return base64.decodebytes( + bytes( + dataURL.split(",", 1)[1], + "utf-8", + ) + ) + + """ Pastes an image onto another with a bounding box. """ -def paste_image_into_bounding_box(recipient_image, donor_image, x, y, width, height): +def paste_image_into_bounding_box( + recipient_image: ImageType, + donor_image: ImageType, + x: int, + y: int, + width: int, + height: int, +) -> ImageType: with recipient_image as im: bounds = (x, y, x + width, y + height) im.paste(donor_image, bounds) diff --git a/backend/modules/get_outpainting_generation_mode.py b/backend/modules/get_outpainting_generation_mode.py new file mode 100644 index 0000000000..d21e231671 --- /dev/null +++ b/backend/modules/get_outpainting_generation_mode.py @@ -0,0 +1,117 @@ +from PIL import Image, ImageChops +from PIL.Image import Image as ImageType +from typing import Union, Literal + +# https://stackoverflow.com/questions/43864101/python-pil-check-if-image-is-transparent +def check_for_any_transparency(img: Union[ImageType, str]) -> bool: + if type(img) is str: + img = Image.open(str) + + if img.info.get("transparency", None) is not None: + return True + if img.mode == "P": + transparent = img.info.get("transparency", -1) + for _, index in img.getcolors(): + if index == transparent: + return True + elif img.mode == "RGBA": + extrema = img.getextrema() + if extrema[3][0] < 255: + return True + return False + + +def get_outpainting_generation_mode( + init_img: Union[ImageType, str], init_mask: Union[ImageType, str] +) -> Literal["txt2img", "outpainting", "inpainting", "img2img",]: + if type(init_img) is str: + init_img = Image.open(init_img) + + if type(init_mask) is str: + init_mask = Image.open(init_mask) + + init_img = init_img.convert("RGBA") + + # Get alpha from init_img + init_img_alpha = init_img.split()[-1] + init_img_alpha_mask = init_img_alpha.convert("L") + init_img_has_transparency = check_for_any_transparency(init_img) + + if init_img_has_transparency: + init_img_is_fully_transparent = ( + True if init_img_alpha_mask.getbbox() is None else False + ) + + """ + Mask images are white in areas where no change should be made, black where changes + should be made. + """ + + # Fit the mask to init_img's size and convert it to greyscale + init_mask = init_mask.resize(init_img.size).convert("L") + + """ + PIL.Image.getbbox() returns the bounding box of non-zero areas of the image, so we first + invert the mask image so that masked areas are white and other areas black == zero. + getbbox() now tells us if the are any masked areas. + """ + init_mask_bbox = ImageChops.invert(init_mask).getbbox() + init_mask_exists = False if init_mask_bbox is None else True + + if init_img_has_transparency: + if init_img_is_fully_transparent: + return "txt2img" + else: + return "outpainting" + else: + if init_mask_exists: + return "inpainting" + else: + return "img2img" + + +def main(): + # Testing + init_img_opaque = "test_images/init-img_opaque.png" + init_img_partial_transparency = "test_images/init-img_partial_transparency.png" + init_img_full_transparency = "test_images/init-img_full_transparency.png" + init_mask_no_mask = "test_images/init-mask_no_mask.png" + init_mask_has_mask = "test_images/init-mask_has_mask.png" + + print( + "OPAQUE IMAGE, NO MASK, expect img2img, got ", + get_outpainting_generation_mode(init_img_opaque, init_mask_no_mask), + ) + + print( + "IMAGE WITH TRANSPARENCY, NO MASK, expect outpainting, got ", + get_outpainting_generation_mode( + init_img_partial_transparency, init_mask_no_mask + ), + ) + + print( + "FULLY TRANSPARENT IMAGE NO MASK, expect txt2img, got ", + get_outpainting_generation_mode(init_img_full_transparency, init_mask_no_mask), + ) + + print( + "OPAQUE IMAGE, WITH MASK, expect inpainting, got ", + get_outpainting_generation_mode(init_img_opaque, init_mask_has_mask), + ) + + print( + "IMAGE WITH TRANSPARENCY, WITH MASK, expect outpainting, got ", + get_outpainting_generation_mode( + init_img_partial_transparency, init_mask_has_mask + ), + ) + + print( + "FULLY TRANSPARENT IMAGE WITH MASK, expect txt2img, got ", + get_outpainting_generation_mode(init_img_full_transparency, init_mask_has_mask), + ) + + +if __name__ == "__main__": + main() diff --git a/backend/modules/test_images/init-img_full_transparency.png b/backend/modules/test_images/init-img_full_transparency.png new file mode 100644 index 0000000000000000000000000000000000000000..6cdeada60955bcd356482c98718e03b05a28741a GIT binary patch literal 2731 zcmeHIZBHCk6dpicN(&mR6}OR02AedIo!QwHaEF~Du$0}DrM$C{P#Jb-cZc1b8E1wv zOZq{fS}BQw#+2d~5UFi_K`>B>s0d$>TJ=k7T0+3Y29?@aktVg;=$%>0i-7(BnPf8e z-sd^zp7We@?=%OH5iN3cf`iUEOtVsw zs)V8oQNYNw&u(V?G%EsiNhAf={{yYq49(_zoKOtfiY5_UHBz)AtbWQ(morYuv*K+9 z$fH^JIz)-iSErP>lx09Zp%7Ff`wB)PX?kqcMim=E%e5fX_-vdLglAC0TY;?E*#!dU zVtfD-i*mDIYfg45ZcI(p>e0{+pl}4RWn2L>B>|RR2l^AowYszt+&~zNgdyz-94B-- z)w9Y5=fO!y)PM1nu7*v(!e%2Zj3{wJKwS#8dNKWMXcn6K7`4Y?SgkZcITVpdgcmqx zor89&n*(>D{5d^wq?znIb*k-( zcIJirn2bZgJpB1rsHlY31NM&%mag~CzB>ENg)Uc)@bJmfSWoh6kLSdHbT)7<@kILr zB${L!`}wcg&*q!o924qB9+~gl@%{VJn)BVmOhVVO7Yj{|9l66_lr5CUS6{1I{Ob7J zRP+Q9tSTG45+CHAo@mls?%8v0|8$4t^XuE5%DYCF{Nw5mw-d*`3#H}#BhjA< zGXuBdSd06oOI1x?@XOf7TPj2d+P+hH!=R2}0{F$;Z#8F@$iW+9co?9Jci%ebkLJ3; jaO>GpU`v7jnF8OXh2Mn2uDXAHNlDzAlW*?Js&4!n5bH>- literal 0 HcmV?d00001 diff --git a/backend/modules/test_images/init-img_opaque.png b/backend/modules/test_images/init-img_opaque.png new file mode 100644 index 0000000000000000000000000000000000000000..a45aec75ed4b2b500385b0c40e5c2bbc720352e2 GIT binary patch literal 299473 zcmagFWmsKJvIe?wcL)|FcyM=jm*DR1?(PI91b2eFySo$IosDjSJ6yhR=FFUP=bU?g z>}RiD?_1T?Rn^tKp4BT-QC03b<8ihctCz&|d*0kD7ldE<#x0sxQ=mMR)9 z8gjDS#`d=Kh9>q#rt}`R4j(uGz$@V4U}$V@>OyQ}YHn%AM{?2LO+svG!bhUcCdVk} zAYy7^De2{8s_Z4NV(evY%w<9%zz@&s!Tq7Y*3`w2*u&Pw&Y9bTkK}K?+#lC}-DV&m z{+r@r%}1gkr${Vf?_^5MM$bmiNWu?K%0c`Tp+nTv+1Sa_!Nt zOr7mros3Pz+)V9UNdNZ4Uw+|MwDd5w(Gaz?HMMj8@Gc(-8x!;Y3)TF;P!W3@dne_O zv@+!*VftI>FW+%X*&3Rgs#}`4So~YtzX4fOJM;fQ{<6--^{?=%+F5>#=N~5gEu`^p zjE{tanc=^6r1`%>|B40o-}cGbn|zqZ^0#^ahNMJ96rJqNENwn8=Wi0i#8P4+>`Ywj z>~zfZ|LEZ(aNHlVmS&!!hAtm0X2y^FWMZOY-O$NY$owP7d?Z3u05YIuCaRv3jLQ0PX` znzlEGq>An9V%hYV&{~*&wQl;=QWfw^ z$wOADG4oHMg8^G{dI#NlQDMGJUvZzE96gnf^+_#rcWNf>b;_s~=RSn>_ZpVR@5bF4 zQkJ-eo?KP3+|@7Z!#xDG zPFQKG@D{X5WMat8C7z{(DXFM@^rUjVXYX5GCy{x*POk0PC)tR5l`wcsxhc|HBx;K+ihpRBd+?l#+4a>-x_JYH~cnkUDrQ+-9l0BzztP;7mc+DgQTW20Dyq;*AEPko{0kh5Cfz{ zg;YE;bvm_w(n=wdLdO$2S|3Wb&r>&O+Zx8syRxjq9t9Ul+^M*#ZjD8Ux8ou~_J&`- zKX$(}Xg|IDx#+&VcYa&)=YKzayBEm0&Utz%e}4hKJomnzz9{TKzp=eBqj=1P2PhE( z5(B^hO`QUdZ{$JZ0Affos`-uycCc^IHed}gjJDu;ZykQMCJ=Q<&(AweNa$_`4Ex>P zoz*d9U_sN?l6}HBAbmitB?PMt6ji?&lu!>bT+qC8#_L5c&69DDE*jqY1+$PyCe%s0 zlRp*`1Tr$c7J@io=zy3&6gARAtfSh)R0sPVNR#-u zdkegsy1(_(?b!6!d*2(Q*{t??y?(l$z8!nHhN*V%3c5(q#}4jDOc)WRV2SUAH6dmQ z17ijYD#Qf{vHbpX?>3WSrTN*rR)(rY5Gz(^n41cUI9au(K;N<_2oYD%p2uRi0>_;W z2MnGJjRG+VL=(vEhXh zo_`MYu)zl%^e;6{)W$a{;(LAce9i#}23MuLF*)iObd?rv8{b z>R-&TN@ad-ECh!Nzb8hJ7xqmAn~oGIX^vK8G?1{@FzE7{qP9s#q%kG_ZKsHn`h+AW z2*yf00`}1J1&5Y5zUC7o2QxrYbPo%rW%=Ik(#m14$7&f?9K1*lMv4m+4BFufgs@IZ z70qUZ0Oh;V=74~vM76uh_LKI7Ni?jd; zNUCQ0WfpLZ?AuIIix&U7>Qq%Q+@iIFBka0qG;xnvv=`U191;05h8Ld|A3uD2q6)hL zLq$Q5ULx$2Uc$cLoJX?9r#+@K%{+!9T2}t0MZ%C;e=~+X2tqQ{>++^@SMgwo;9y_( zd{gzWqudXI)riBrlh_sCx}xj!-*p1ULR33^^6eIAPX2T}NUMqKjYP@n1Y%5yLMtN& zxqy+8O0vKzw%lg}DUgEO7um;tsKV5hIlxoP#E((PuGlSYSsXD1L4h=v^kOt1@_QW^ zu+c6}shfI2AQ)-;wo)o}W5{P-3G8$NM=cn$jhjyCCz{#yChbXwDA}kW0QpjqA}gp- zj89R)adA66TteeF8mSQMXmX02VPgJSV|p1#f@GC_#3uUuN(Z^P6Gl2+kcqO@<{9Km zZJOi4SrFr&E)t`fRDZaF+PwEva^m>?%lTbF*Z0n#_9z7p5HiW*GsI%IEtMT4w=@2PEs6uUoWFF}W8B)kxFpoOtL zyS85qEMn_~mb^%Dvg3qKCy6El=+}{s!0KX0zW`CBb8;X~p9)SnrK=HuKSMbbn@07v zSj?6vMYh{|Tjvke1{D1e?3}Dn(5|ql(85rsar4pkE#2jK?``0>s(m?8xB11VrLvH$ zB=~4z58T@^-ridEpLOaCsZe8qYFfubBYGE<~FOFg|dd}dA0RG{eF?a zyV6s$KkHxaS$a3@bF%`M_Pz5EDFE904{Dqfbr3CanYcg8ccEaLHmlv|9N>TMwf%DL z)Mu}9Dp6Gbx!qjg^7ZN)JWTY!0$89RF(O5EYW>ik8cZC-I=TF>cu20q>Jr6A+D&m9 zL8iEjzarylFW&A+M)n~5dM$Glxx88pM3b(O2ht0#9TV)r5jc>VTMVw3qp5tjZbL#b zHXQqUhhJlNgiIQqeb@WLs39!#T$gYGc-@y3m|Tz}&_;{pBBRkmW>GRH*vg9#9>QUI zlt#Nnu@Xnu>#qK@h7@{Ii3vv*rS^qZyWcV#HcT_vb+}DOfr3|G=eb;Iclcd%xc#Sr z!@$hv`PPeR;Dzs$Z`ntF_(pdF*AJ-I543MdQFI3$khYZKLW=Hthm=Rfl+m# zr3MvG$I#D^3Wiih1USPEYWy*P07DU~C5RC3FoU1wVnLEy#>~Y;kOZVi5QD2!WNu48LWI!RSGx(QV>mpX zvWbPb)&c+tR9}_YkZ*n~e({HZhd^xYfxAqH@Pu23bobp)k6(>Gdc9Hdwl@y;Ner-I z3xY@cBGdnQd<>&=6(6c_BBC0?0d>Iz5ixz`Cz(VO1Ka=v30#mOxOjSz2tX6baepAt zg0U^VSB?|g1~%>?1i*?;HV>rSCo>>yB~8%2C(<3MBlgwvR22kX)9YWT z|M=1l^6K7uY1OmOG|GCoj#G`rSTcoXn03M;>5zz^Z$j6J-YNV9x z)tK5F>CPj}J6K{>oAl=755VcBV^ts_wAP6NJMbem3ch)h`%>qNJmkFsAGY3r`Uw?T z%fQ+wP=D$Cpoy;NTk-0z5n?4qn@9o)F-Y3=7qY5x-U9vjpX5lrH71H-WaI268}1se z>W>g>0z_HLz^dn}Xa4)*DY_izrPd2>VAsX-k#d`T@T%be#|5G!p2XUwp(0vX7=n< zy@9#Q_j2({5jHO>O{o;5%1ETW@zq_TbFhb}b>EXO1nl1we(+ZdJQf2MUhQ8;89jo* zx&w_l6dQlW=@(A`Ozc?k3?R}}urrh;SP5*HVe(Oh)&iTJcGN7bej1PkXgbO=j=&9b z*k#j2zcR4LN!EXH_|X@ha31M66GFT{u(^(dS}&*oZ`gqrj7FTgUXyD~h+24NNJv2R z!d$1r);eh)AsA8!Th$S5Rt*+q^*-jfVZiu@j}qgy`NvEz#`2dR68$~3Urh%}h0!D0 zWAQv8r7p$+h1cIY^%$gGAE^-`+HA@o!6wjwKgWkK&#zq4{}1!d39TRG04Yv-KA_e~&>zxd_r)|D)nhQ$B@@m;IdknFBLt~~>qJIC}l*pLNW-cP-QMR4q3 z?Li@i{(=hj`Nzn&PH5Qy?j!t>ir0Y7Pd1Y=BlX#n;&`yfsmZq1f@E~^^wLW%U*|pbur0l+c z``33*E)sp1v_~%{@HE&b_)iJZk}$nJd~K;55sRsCY9)+Fr;<=uWZLwhblPg7ptjMp zw_hQX;qe*9hW>t{FZ`qXhvsfX>Yc~mASS+@H(AG+8^(KVTXtjk)NvIQHXJ+zz8tsgmFe$mzDC^PB0%>r@oqS>^;qBDub*$GuMfs~ zlXmkG3pg0?E^Xy7;k}ysnQj2Clce5VxDy&ZCMe#)EI&k~53KWfU*IW-^%ov}aW49C z05z|8e3Uw#v3XsADa%RS5OA=#^@qgXJ7njze5V-~?1+`SxnMXP#as_Nkjq3FR2vRj zlB4f>N(ewA21Y{|3!fWu6Y-27#6ik3qQZYkN3zjq<2SrpCV0Dd^ZOD^Mk{VWu(70o z=0FKa5jV-E?LsBNe*6MWZoDF+b$(a+Lj9>Hr1TmI3|5xqkalLjwgB=9c|7P#Ej{bi zSliir-qyr#r7ped@7!Op^dpr!=ocaDw-&N_kj*PLne-~Y_Xd6%i;joC-LeO z8Pw9r{G3YPvXcXID6|NA@{{<>3?(XrpJfJZvBOeJttiCh{5f&cwnQsH{=_M+oac4& z6p*w0@yopJdnWg;uS(BwmZAaAFRscXo+swiK}HTEl5~WLPmm?9v7L&f3yJA1HKkU( z5Bya{>MXfcMOvMPjZxtSa&2^Hvwtd%dK%~+Gw35I%8v#FM2(DM@;ZEzvi3rIwHy*D zKqQ&sxJ(}vWTefxIg1s)eFY0WZI667bVhlzhPFdL%;J}}hYm`hb*Y2Dp-VyzOZAd= z^B-Uz(|g>z5)erD20=8g-mx*5G~q}e9g&Et1Nlw>XPfWz8xlEQ&F&8=rxptwI%cMW z=MDEA+^lmSZ~prt6fKKakKWgiK6^)>lXQ zMY>N-8$WrDR@Cc~l%aHH$$7{c1^ z!rC1x>Z4cWnudU^R9iE{$V#P`TzkhPb$?eT-FkJ`RaK{KRulj*i;_MPeql(XN==~WOj8pM=dmeK_ma`3X&s;rve@;bgkv!&>*Z3?fx}KA9c15V&ILIjSo=@|OB3(%}@1V5o z`Vjy|04Qs_P>BCoW+(Mq*VShIUbh(Zysny4cCB1hww6W3IaG`CQhWXf$wCy029AZHjO;diA#A_hGY;O%BW0epq=zbb( z|LQRYN}X8ojKF4NHooA8fv~QFX6~00JI~=~x`K`NKHM#yAE4du4 zSzWm%uj`xgMhqY8OA{NbGP0jFejt(O2r~1X15KV8v73U8t#;y%$REOY<1; z0dxOA-wqp1oiG(QO|+}alt>$h9J!*E-$GWY$=p4GhvLKFR;{+FMtRSL3--j}`d&uA z>HEIrFT*Z(tWX7YZSf$1D*?2GnmEoQOU%vJ=bKiaEwX7Zl#7=_sQ(}Mu-}2F* z!AR`pXzr8GWAi{E3H6? zy5?qAPIbtaNv`shS-V~8#Mx_5f5I=`ag}k9&C*vssQL_$NZ2lu>j}QK7G!_0&=F3= z50S52ZVT5;vUsel*U(S+!7fIa3Q8m^`QxYyM@jm^0D|q@kD5S~DVtA5i!?YKEceib z-;VX@+zpSVmjnbqdf|TeByNl9jTeto-6(@tIC7pH2SxmdLM)dqoQNK=M(@`(B66w4 zLM)Xm*b8PutlH8`;bS^3GUcc>gNSbeJ55+M&-1e!*xcu12jd}gvn|pmr_=7Gzg?!k zcUHNDgy`;0$aJF29S1$Tu$9`ACE04Zj#0yN2O*}ERS2ujy}aQgu@^U#2ETq=`BCHm%j=Ch5; z=N+~)iNH(_8cB3@AjypdJ6WO&ReW^{0`-{df~uYsVAc#(z1N14HbP>X&WQwSoQFTOGE$?ajRy&A^m{TamF5u#rJWo?#BK!PVqIYB6*99K-bAKvlEuZiN`fFceIC_PA zdf~5gN+X1(9baRAiidKSylZs_7cMlVa!T)@WoB4Pz+-OGJbP+WJnjMdbz4wPdC=%c z^au@2wXnEeiak(w7qe>!EBeN_ehqpf(|xRDhZ`7Xh((*MW6Hxo5}iweW1u5DK%+QV zcoj7=(jbi%C@90Ko|_Sfh6*W1>2SKTwGSfmA+*1^$hnuTRIEAcKp?rSaO<}4tEqlu zfT>9ZGkCInS;hj(=aW0VC)FJEIpVxzz%*j>9sj0&2TynLxz?ta+}%sfG?~BIcHx** ziM-NbeoN_o_UHNeYjdb$#wEE-8@|PYoMA{IcW7Bq`It+x3jK4YbF4|uZ(aVn*jR^< zL{pX17UtQ(24@f+2&zMEexZrakdMM2|LhZl3k=Aj#;4DvOf%if9}UNRU9@X%r~ZuQ zAR4sf>B!G8O#eF!0J`}CJD;Q#Iwu=FGSN9hp|LY+b%c$A18I$Dfftq+<4ZU!Jv`0n z=Dq!B!iz&50QFKme??j(0{VCb#DLpd;r#kw%<4uR#t+hgd zD~Un-t~T*&AK3SXh=7jl5}IGBrh^y3O|b3q-t_E6HL+I|K?IvNQ`uC^v^&^G?`9|p zclPxn^@QR$gRcGrpU<5*UcC+Qx8hDDo&3%|lWk$_brz*&w)+|O6-c<^QIdGoh(0&$ zl#JU-%G-0JYIiLx3O^fJY=cYnjTFf%bK)z%a+&6eI2vWh^SqEWArxWrbXhNE%t(C# zt9JWr+FFGGCz(fI$wT!xhA7@8^+S&m6alMiKQr|$NKgkCjB&Ow0xcR|8cQ(CX&UBu z-vpPAEcZov29fvG^>K=-tExF9{)Z(L=@;oQq*btFBu5S^)7^k+Vlb`a%#aO{VlcPS z4KpN)7{)*|bEUQxgS$qAv<4O9xYGeh447qQSSE%!=t?GAcU%4y$=Mwk#4O4Y2yXCP zq!FR{*5Rutlke_9u?oF2wXv#1B`(sg4$_HJmgfbvnQjZ1!D?9hpXhg!3BF2hZP)og zYVv29F)D(8RkdH@lDJbERckFwJdqqqF!763*-I{yjtn|zH>6Sjue8Ku@Fol3G3gxKE?%m#oiGc38NMR{U8I2TVT2 z=ptt4hz6vp^Q%KluYK)CVxn*NVc@8LfwYLvS+S9aPmNHMi~>ULJ==uNErU`q#8l#N z0zDlfY&Js6%(i9AIQqi;)oDIBh3ae07VB{;>pVkmOL^*&trVz`*%S)A68`QYQV#7( z$p^rDFpBZcy5blM#~6}K9OmUP7YQ~Mkaw4`{v3E7OW2h*yN^Ocj1IkK7T%@@w zc*eS11wWsO+y)Ljw^g0GE-9c!!;9;{wOZ`;x3nPFt4G%p!ypT`H8(&<{dx4h&-3W4 zX0E#br6ANH;~4sF!X~aSV&dmkzREJouu&kzfNmkP=Fm7c42V{!Yu^Rv z0`GTx-=ZSqeI#Gk4q`G)hVB3i{^uYuKK9Q(WLS!a&JF&9^*7SzKjp?dC$rQhV0*Be zmU^-fti(TICq)R41-5KncGd54KfW0+fjPimSkY=y^F5wMRPC0kxt{m5Sdmq z8+-#+Zd)CK(`CB}%y+#W>k@N?JC}E<4Nm|Yk>V_{Y^PSK9(;w)CDzejq0h=GU2uQf zF!N|{1B};rU@fAt3czC^?-nA=-P!WYrm}2!&4#}%P)gPjbhhh?Hy8(SMr;%gFwK^l zV~(-t+Wh#mY(}wdWd!;e9Z;$h+q%l1O@IKOrbu%stUr1Vo)7U7Jra!wm5`8g^~#l? z4oNC+GPDyul8q7GUaBlEk4=vhGX3LAK2IiDInKlsPN@HhND=7Ss~Fu!or*T5G+rtSkeTV3(Pd*bD?2Ny7 zUm;_y6`*vx^E1cwu2mo{&N9}G8`Rnzrki<67`Rk_Z6a9g;r^}3M?R~djJ|xKwC(h0 z3O3oRBW!56r5$;Eq4(w-Z}_N52mEIyu0$0fc=3f#t}=OhQGCv@ZdqZX_3EHUdhcD^ zkcd&PV~6pu_e5etzx|S?sUnM^d<;YAuN$EU*LPD;e zZEym-d3FNaIq|ayUZ^GiXVBW2n)2GJlxzf9R>3Eph*O$j2m|*a_f>YBKm$Fv$G(Gt z@)z!#oFAuR*y4&1xlS!K#SuI65G_`SSR>i~tVU2~%i3#wDf$wpc1W!S&T@y_XwNMg zuO=bcHmlG8ALN-U126V*U6pYzOXsTBXGklA$KjQm!}FF@I6JRj#Xq#!yLzXtM&M4P z{jMESl2eu{)H!_e8C`ZT&$FwIiFt-t4J2C3*KG7wlp9T&&n$%hESR<>lCHYA(GIC` zRcgx5ESnhBlerXU>jf3yptB%5=vbn8h>22_NkY@GkdSJik@?~jyaO1K6<7ot=E-az zb(`DLicwiucgCi4z6Pmw>5XzfdU1LC;by$`3u2N49p7VBBM^~}j`L{^G2+e=T-x5< zHWJcu07_%Y@iPxn6Y|~%?;r73nzdZa@b0K+-M(ftc4u8FD0INAG>j`Rb((7oYxo)) z$10&9JzG4Wi&q#T;Vk)qYS1J%XY7m=s5x0uQ_QfhDNf}0iH zr4O!dg<^hoqMAS8jk3*R6jn6shhuMD*)Epm+cof@O~wyH!b|ftFqF60i{x8-D9CAP zf&+XTRe?F%WeJ`Qv{TBnMHwd5$R0bIgv*#nE8sWZb0jR{sy&m|SV=r?RcjiWcXK8! z=5nlHUb(_zn0>wRHU!diK<~=KDwgzNCEhDXragcONJ#FmPq$<^#f5FaYk0o#5!%IP zsdztDBEZ;ka1Lj}>@E0-5?|enkdLss2xQ%a110q(8e#{mJ~e}gy&}XjhbA|uTc1>v~3ek zHQ~{V6en#8UUlF*u9IyoM~T5l5^dfn<+TY57&!q!nS=pb{t-0|vI?+XL7>54wW5uWQ%xT`Uk|u0VCD2Ay*Zj6(RFKcm5(mleQ#3+h-T?O8ye&-;S(EF*I>%0UVv``;4%j|89mVpq zjbBiBcDsfA3%+bqvV~cp9Gae^_RlK!=RNx})WS}COA!^Qa6&7CzM||BsRJ)$n)xf+ zv9{t7*do>!!I{UIHDA*s%{7?Lvj#1&8L&tvmqDQa@Mf*t$=1PYUbU9rbAcA2*mI_? zIu!;+OO}w3tSuq-k4?B8nor_o(Td98%(Kku%02gl3+IvPav zbDkDvzZCf^xKluHrBYwhZUx!1tZfS(UWdpz&*F;Ft3kuk*W*AIr!^= zvfp9k+$S`oUVKSFYf0+m6}oc#Fs9)1h9`*p!7{Z`-IRnZIiN>xAw*Z3fYkw0v!3On zHmZo38JrI}f5I`%!FSb>ZEty4m)7X#Ft@PH2M2r3>j$d*I9QH^s}VLjLhG1Dbn zoJNm2gqExu<>X(k$W-o3T(hn)B_m)hQ|5j7+qSdvsHwq;``YwG7Zj6WgL2y6tQq^| zJ+C2yzlZ(V7)5ELOw|jl!TF;dzn9()TgbG_%JK!;XD3L&sl*~6L07Jj(tK_46RZy^ zr+5bgz9W2)e>-NCc;i!43uPj20zpFSn{0f9XEJLgW8V zUjrAbIAO^-W_z!~#w&^S6p0N$Qf zHJul(ufqvtwzOA&zku@RW(aX3R@UtItyd^Y`5(XV1LGp!-js(aRNvLH=bHy9Fhhl> zp7G}R;lm|n#sX_5%-jMsR2F&v`d=VJ?|uTFuiQ62g2|VhVX>oli!cy-hTNo5F+T~h%YKwRq9Yzv9du2#DR=Z&yc4h#((6+c2vUBeX)%qe%wi_==+GeSO zf%T>8I5SvasS9aC6x4PaDc1defF~1#kH$SS2O-ro9x_xnKJjWpSS?OJ)lprvg^0n` zZ6bwk$50~oQ%zApYzyOp*(RS@#-k(T0PYSmhtK6!&A7M$QyuT}h&}XqgrS8hWCDyDclT~B2(w8 zaum5Lj%9f7I$5Z9v6R?-`%q?HdPcEA>`5{^g*67DOdGc08 zUiYOmPub{n3sY8BqL_dypj*!HllhcE!Q78ao2ls`;cgf{&N@>W>7tBP(!;Bi3*YWz z?c8O)^O!gSoy6E3e?}k^;4^;-Bm?2CO#Jwwt+>Fg?QN|Z+*!w!q~qY}827E0scNUe zC`YD&mVMH;ZA7pJ&24{b0`?xpV#FDmv^c{#=(sqWqspJq`A#QrMIde7S53{g&AIbOI@GDoc{2dvF;Ac?vb>EM$kVC z@doDrlFm77qd;-qMl#BvxV|~bg6emg1Nd}^S7;v}f{8RS4+eywQ{v*lG|z9ufa;>{ zD=|(FReM!zVO5TbLi_EjSePu8DW#GT8OLW{A&MScw3Bc@mt;fHF8Yn;U@zTAKhs~} zU7IFfC{XqhOz@i|C&Y+T)My%Ta@#^i^E zo4KnQD>G(3rNVwsYa;lU4^#MOY>uIQd-Z9 z&zZ5qbx7&BNQT~&v7D^?B~5R>zq{p%P;ygf#>z);-Bz3zU?Y7Tt?Z9)q@?JXYU|@= z0G~zoQy$-%isEVTZENQkWaZvF5{@yyrm8qcT-LxO{1Ki+5Jkc{5!K%% zbXPClZBj3gG#&ner!)8cPvO`M#6k4>@QiB%Z^7IMJ^b0dT|lsu2@`J|+GBMBr`)Ik z-dKb=Gfj`y`dx^eZ~tIqqJ^-jceW@xQJf&~eYA^7vR9_WTR7 zu43e&Q@v=GA=^HxUV=4*Z<}pRMa)!qPt|@**R5DEJ&nle=w(#74IjAlJtfC!7Ns&p zGX*Q+Q&gf|@EKE4Qs8Bc_H+3(02(X7u~pi0aJ&qHG}iR!^Gn+BpWG+ipGJ^JN_T43 zsYA#Y{3vYeu(Hk&lbY*H3IddQt#==L6i6tgcG2=XyKkUbE<%}wx`#WdPV%I6OHV_s z5HI@ErR0wtZVK} z_c(=8eWZe!AoPo+$jRAIPHhz2Z6&#;iqTjJt?)cj^tRA@ETcOMZL^K23BvaU@8UJ< zx{alkO@rA8v{%Rs#A7p2(H~>cCD^9}u7jrwZl&cAJ);Byw8l3%6ZC%3uvx+z{6sn0 z0s>F>z_;h>i)mIXRo5|*JLR|>Yub}DA6M4FLtkn-rE_A>TR!xO-|=B;0d{arAV1mh z{P%|ty@jKY8k^u>mymH(a~7+zl9?3yxG`JPw@mE)Va2h=qmv>lLp9nAqjp`lvOTtC zQ(u=M{Id4=4f!m8z``$I9RI#l#7Ne^KEfs_@!4;!>>o0$g7HG=QyPg$L~g_snEoFnlXNh=I|_ ze>uT%jd26E_<2w7%F;S`+Z5`1uJF5c$d6Q}(5xv>N zuJGv@n|QKLN_gq}@zBQTr-AsM@IS9!i;nJi6B`q;>=^Kj=JIePpW2>%Y{OrNF!o%J zU5T~JHp2^ZjzFq{L{gM9(*gv~gPi=bHEc>_H#-x_aI1^o2e*%%Ev*7a3-86gRc#gu zE2F|1aN!hBHcWh9M0{k5Nw*P~TbNrqvZ@5mFbk$g(Ed1ei05 zFIA@TVH#I;>GSa82{vTg%I-w{D)7|W zO&cnQuCjF)md4hX$#NDKoGR+}HBCCcAl=lOQ6$VAx|NlA72>~zaOpyZ7{|yru;}M?NxUr80m1O# zgyl_psoN2>!jZAqTc9}GWDzo3kR>M}uIE`+RY+&V#3^vddr%O;CO)) zrCqP=I1aj@Be~Ko?oh-d|6Zx35QHyCMyx&1DCBjWv1tD7Iv0oU#(&AP!veVGWur1o zvZucDfV4p7?KfT`MNsADW&upU(Sy1tmdiR}&_2TsNJ{k?avREhKQyPXOKtHf-!_BG z8CASKHxM}R^dY%Fo=3PpH!fbMrhwrKz8exkhFDwE=HS_+?bEHDE4C|i1tsp}Vf*d# zf@?3$a#g&k3dGvRnX+vCTs;g#?c5{@$(7!qOiRj47@j^==`xa82mybZRYxlNX1+E? znpI9svQ|K1W&{-tqEemQDM< zzk2iMT;EH4oGC0w1SKN2aL3l>MC&_fp)x-m^Xk4Ynm8}I{8mSLwIS&I5(bzm-6U~M z5JK6ct*!6O*0hnRG&0x&pcHTQs%~_zu+Q|#1b=*((4XRsh<)_HGat6nn*K?EI}WHu zTk2$hr?V16am~2@rH&8L^CVWyWkVRv14Fla7s-mmj9yiIxVJ`q(-H;)Wp!wdX5DL* z8y#Hx2Jz@ab;C0;F%2b zkfhrvD2CoZmohz=#d&t})1fys+b3$ksygwG`Zht=%%U4S5sv!32A-J!gI5EKXqYrW z_ZCxvlRNx?<{^l#gF(8+V}u5>MnzrzCqq%4mBpI5wH<%ukIFS5eq=%<2{?(`4IrI$E zEm;@pU699#&1?ZUi=z!R|&rZ7QQ~4DJ)F0FDC_@b5VUi+b@We z6<2_@{NA6t_@mqjdX*m&5;ss4p@p?D#xuum?n_t1ML}OHWlB=>TjB)$r<0N>c9MFNu)f1&`tGp? zl=#5Hc2oKYyK#%tslw7@8!zed3wW0_^(ySOi$mE z!eAUir@qqB$7ecG_*&bv)cz4Z&TT%UBeDYKcQ!Zuu|F`9?U+r zlwDi4fCsuI9=j0wyptG4K4B3l*6!)%h*?lP?7!FkLU8D{Y@i4jk+Nv2KcY)V#V8@H zEVKJ|>Lk^=u(}y#Tj}MNXD`s-BUGCcD3+rjb~pFOC6=CGUVGSqtk3aun&*nRIw3FR zJ0BD_yKUBU)pW5R|NZoI>qXA{#a7Py%j-Junu~iT4QC}0{&OcWwMWY zLoPFPO=imuKW|O#?%wMsE#Z9oL^Cx3iFn3ch>N<7xFLmrT=-%}s+%KP z-M)M#23QGosOKCJucZL1=d7piY~Lc^MdLY;^182AFbb?gpfdjU z+?lOsV>Mf*V2d4udlXROFH&(Eo7@+~!^Rdv#8OiJ99UXqa6NG_Q~hd?1d`exI$}x% zKKyxxWwM!H9tKQW$yxNrHZC*e7kNyl!nh4TU;D+GHl=TT8M30B9yMZ6e<8uS=D<#S z9`mP>%Z!*|QJHc+9^hrQB#Y2M>D3*IL=pFfXxcB6^5WHcU+21uAfbiS&=%b>pWo8> z4G$A`MBj2-XhHEEeZA}MmIl;;uWL%uzLsWMD5KjBU2iqN_Nfsmm#FzFYm}Rk#UZEb zfnl&VXo3a@cj;G>2hAq)O_7}5{kW|16ub!s3XDi6)g&7J$<*ca?DX{O1rWHE(=G6k zEwdkw$0yEDnX{1JO&~Yv%1soD{h6OwdSM3O8JDkBsZ@l}l_r3WtfxTz-3s@Dj)(I)J4Ee-EKZ|}t? z8=v;2owSt#&@@jjAKw{n-DJvigfc(gjs-dRv`pK3Zb*2lm;#^D8JRz3gqW3O2uY-ZtpP zbv${h^O+Y#-R>ReNYf~onzik^QpYPPO-+lq`lOIl_Q%uB=0b4Er5l?cDiMnr4Q{R5 z^?h$FChGAtsxJ;~D7x4-4o$5AGh>waEu}Y(z{g0iz5wAYSmrN}v@#&{1A{x|2lQ9~ zS-MI5Y_SXe1z;w_-M-3uRx^8{#==GphL-V*oU+CtPz;C3S8o7@Jx=Iy4*D9d>ss*h zj{5D4e3I4|9&R;6KrElsB_{WC9JO*==cm1^KG3N=H%VITcsiCyHmE#87Z ztWtg$rpz#4@C(gKZMAlNm^TNB>BOeL1H#I4V~dh^pDu3}2AHr&7$(344*V^`M1T)Z z&Py)NIJ6*ZOTotJ6oMvHsSS-Z7Jx_>8Cl~014}@(zqm*oxgb5x)QDrH_*7XGaC71$ zyETKniqG`(NjSNzumMoOEU(+9qhRU;DGui`-s3>4asDV5CYoL_^?`33qjwoMaKv@Q z2{#E~Q_h%pF#bWe*(p4foT(Jk51a2AQV0@TbVEBNY6}bcT6z^Uu4!V&RQ?H&(_m$E_)_)-^F# zqIk#dfg+!t5oX^^6{qy%N9!Y_2 zIfUJye@q}WP?R$cQ+T-N_#CDaa0}FVL19WIlOuhJGji)Ev3ozi+Vh zlTu4hbQm#ET9Y3-75$Mi-7|ATAPG~CgP*Q<$oIN+q5yTDBv>T#ByU~=T>pyPw*3#h zY89*>lF6BVy;s#j(L<{n#Ntu6^y_r(I_H$Y*ZMwPICP7FK+;RhCF;m84vOMLOI1rr zdPwlQo8_Lk{k#wGe!bSJ`lj}4zu(WVe_odE*#K6tzMjADwH8YKeONo?gmZL`)cyYM z_xJa||DM0^_n+_I|Ni^;`}uzN|Necy|MZ{lb585%%YEppRkb$XuhMBy;C7LN1uNEd zkOe_DyI3u)gRX8?&lHFb6ct(=wTm7Hv-v{Z?z%B1S5P~J@&fAm@QFSoSt(w@$%qMX z3P7oHP1yLD3Y~9;G&i9e@sCw?I`xaiYITv>h7GLY@NZ>`ME9{YOa)xHyo&|5-+*4V z)|p%b0Y&GaTIrer0u4#tMVlcgjlSZs?Ow*@4_W)3H@|~RQJX&FWICjjUdO5ICD%cU zx;YSLy@J3zJ<1aQTR$TTvAWLCxyB~wA4>+nn|>81XDsNEDVKsX3Cpkp3+w4uVMDvP z(O;#nSAG4nHdYzM>xM`pVei`J$}@Z|S_}MC34J7Zwaymy5_GK2GrLY`6%NPVM9DLjE~g<3gtTY^;#B$S1yr^eP#+fUjX>tXNez?`gA1(_Rma7r=?(|QT%zLv!3WJE$FdD)A_dY8u;p{E001BWNklVIr%1HTwiGv-fsZUe%0&X z^^zmgKTv&tJ^%M-)h>dI4_SqNHn!1>(88nheV#v0pZ=eGquvBiEek0WqS?s-+a$17 zokqRtIO!p}S?ojiF^{Nd2KcQ@%43ERKY9jS&CO`53X4`4M|zd4;HbF;=R?DHQNTgC zL8l{1xbO`r#TCj84JD!qF&z?aIt;BU+JZoj?l9|h?Eg!nGweZry>UZ@5_Q8vENHx?vH^X=JZ_LQCzpqQo zi%v-Wlp1d`7dSGVh1O*?5K20yJeN=+&Ogy}CF-g9CX2lOI5C!!f=?tyD8R|%1}^{s z@3@~bsX+b|2tQ4*c0l&Z!1$5mq&IyWUv8F5ANmJB9#Wp90BD*Vd@M_j|M3yIs7W|J za7$rFf4F@xAu`3mGc~Z!r#QFJz^Eke16z8y*1>x7a12UZv`gbhIY8R18CEP|^VDz` z=!V(wQ^K3s@mElLqlOzGySu%+RFXR&k7dE$nK->AP{LJHN$OoJXl<^e_rX7)@U%;> z_2-wk_o}LTeTh|7s3+d`eefK-pZ@!O{{H>`^XKosf8Kwezi<5e_x$gl=g(VzzViZ% z6HnnZN{s`oJ5LBfw}V#KHh>{=l7MQAdnC!Gkt8}gwup>UX8-Ny-1spk#Y~@MHkArM zxextLkt_c8@`U;%qK=|t7KsJ-5DgvT@4VzpKGa<>A!KM60}RO{4ZRhgnY1|N!<)2_ z>45N0?dV^{)?)VaAAydH+}Q##){9IML8F34D+=G+OyQ9DIE4$*FLmK*r!tc{nZn0) zUFScAkI?_a!~(7@$ANJ`GA60OWxe_70CJeWo^I&Wd0Q+LyuuwXYEv)rYvZ-``dYQQ zYrh2Y2-A3%`xFRT{J|Ef?s{#H7jo$KxgvP`(<-T`s$FR4s5bbVhgyD8ce=*y!I#?MO*t?4pSV9VU8a*KaaxlL!QWR3s$*H=hU9}0W#`t{>Y_awKZFA)|sba zp33zn&Vm7dMSse;KhCj)x+$vvI(4>Hj>%PzT`~CiYKi_|! z@3(&c?ceYIeyo|S0(M>E?BtjdhjC>VREI z?94*;)XRKQ;(pvHvam+>DGA_D;v%4fDMXry8i149a73pBwbC|L@Z$w;&@heejR>7F z45aE1avb8cU7{|G_~`G_El@UYg2GBNjf%>cF<46|Y?FR)(<(tvjsu!3^Kx17)f0z) z>~1pEqnTQtb|Bo*tsKTC09MoVR|u-s;#5%mq8sxU#&XF9CQ=8IjuL`x7J>c(W-n|u zJDGeoNQm2a_{iiL&`W%=HlJ5v7k<6)wfXw0*Vh8ILGvGF7ul8!?b0eSI^=8FeIKam zEH5c#pG~|A#38!0R^hcyx48QCs`Iv}5mwcfy7^>$0)h_GPG`6EKF16-$>d{x1ucP+ zTy{TpdIyM_KzGiv*zC9f{JC1rqXAl7Rno{aHdj3@2Id8L*@m# zx?HuhX(jP#9{@M;1l4yCm0($~Aq;YnbqMZXaSw#PE&6UeO^YD=2fY2N zmANP{B|oL-bk`gkNx&azzx$t6Y^ooKg}=*Fhu}Z0z1MN`65lMUrSIqb{rmp=fBpCG z``^Fszu*7w_n+_Y{{86pTW=pt@irHlsMKD?>cXo~(k@G}q_%wra4M5qIqsXXIFc#o zGgC31lRZOoS7LH#5G<;<1k|zBA5hLg-FcNT4Yn3mn=CC3F8UO>V8<7-0L#BV(4(fp zY^9*eW(6f19yTL>*?+C$0v@2W0hX4^CPzTfcHl&2V-(ob8y>|eudO%<3UTe|;}=A4 z_jOOYcetdi;hdEv{VM)Fr&v7+J<%sDXi+NSM6e@0s4Fo_D5|kKVLm+@1ya?yz7ig~ ztK_0h|FK!rtbhrw^$uMDtMGV3?vxZgzvyhluyX@HB!-7W+>b)ibxX*4H`UOXcOF;^|Xuge@&-lcyHWS5>n&w24g~ zpwO;ax7g}5a!z76OkAenIWxoD)cj;@_%CeU@^r>Vm1i;w8%(J-_&OhcYyAK> z*=k=qi}Vf?3$)I$lvLD8E>t5tOU^LbWJZbV7hEOF_uWj&KiGyj?9FAN!|Art{aH-9 z@2T5DCkRaX50cD)=fv;suA~;J=i@^l83DBm#a0+RDJ#O86i+r&B`3-7cguW{WfWwI zH1s>_`(}O@AZ3jTR2#|!AWYy2k00&t=Mmo0{}@jJi;H{J|NGiq^^UYPy7hjZKmYdk z_ut>Y&(r7KdhqA_yic2d;zf%rfJJQfqM24M!p=WiYdBN$HrvM!iEXi$$>f+WkrcYj zoukwHp_oL>QkrI!Gkl0%8&jkDVM5cs7}fDr3j-h4^=z1Q|58c* zbI~$tEDk?8U1L_^1W7Exly{GxUYL_T&acW8P#{J`v^WWB2~d>^@I=~V8_7s8SH@xk zuS%7{EybPRa=$X^6fF-8oV}5SjI&^>vL;>>6k63}67ggdA6Cd|x^NlwPO=EEq;CtI zH5O>pi1hsM$Kog-D-ZZkT-01vl0nUZ zn;78t%2<6|DF`p$NzN;;a?bTsx-%oYVh^s=WXM8!lM~6?@EkkO(^&yqMB)p|iH%85 zgq-wq{wP?aOqHvhyW=GzL4*yiVMl=z%veL6a&;{~-68V~UJ4aS=|OyG$Dc^(;3mv9y#ti~gqK8O4Q zP!AyRk688E#sAmG6R5Q0W}nl~_xtz1-+%x7egAzw=kL3}8}Ij#>xb}x#DbQvfZAM( zn^Et;UDzN;6S*4tu`^0sR zNWRe$ruC!l5XWYhMSsJB>uMq7FY6WLd1vW)XL*vRK`yWbYnHqLSg(Z*ZQzS|mA(qU zeie6db8YTd?L0R@eSCDI)s1RZnyG5hYW4t5OW<=#7HQ!r3v!^UYqL~KI^FBkTKy6Q zKBcGBa$~OrF5H5RdQ2va2=aN<&}pc3 zs!pOx<^ruc)kLdZiB=*~BN0Ue-%_1wu;0)BP;M}87U~ZQsQUi?4nxx_;CVli@P7aP z{pb1nJa7H&et#biBG}zfSip-|=;hT)#kE+ONI1WSnp$6fs6(Ld~}pW4(O2l_VxS5a41RBM*unTS7+X2UE>h z554ITT5zUSu@J{Zmu7@D)}7+m1l+1fTBU<=SRbG8I7_7*%}_{4FZ6}A@qAf^;4Cd9 z`5b#6*#dDIo=BS~wt$86Ds1vqcrAUs@T>UiRajWRxHi|T)><2D>pTvq(L8G596X1+ z!U5S?6uO&xL0VsZpbecrz4q>N1T9r>@iYr8a-j~ajJd167S7Rz7fXG>!wt)QWzHZ( zn>wp1XlbhdvJzDhV!Jlw<+d>oU~21=b>$sD6Q(sEMPzlk%xlXUD=1)B+8RqetckAm z`>Ikz%5}Sw8p?V500KYTEu2gbL}t_rnzqn#gwvI#bd?CX>F*xkn#e>L}<(_p$raEY{}LUM6Lx z3j%Qg1ggjr{}YtiJ@cGuH~o16_MltOX*ItW1RU=npim{@^l=~UAs&+<({53zaLoP3 zE1h#(_wGmUU-j$z`~3d%P4|ZW`qk%*aSDLWdH?->zn|}K|99&=)(s^H^)9}ECGAyT zyIza6h=nSe$5?xTqiGRWW^1kwgk<#~qzGjr@FF-RoY-03Y)YPU;+E7E&8vL40zA|8 zF*q8LF#LgLtIE>dK7%Z-^|8aM89EvGd9lJ&%PztRd0OOBg#A3Pz#k1A_bo^m5x2xA z|9z1N_CQsI;Jb-@c+J%32IR&6`nh^&c{r|{{II*-r-npNY^;WkH80?TZOkQTl3b*h zA=@b&XkGBWi+#c~Cx`op6&mP=4|mIRUQ8b8T7@S$Low@^?B7S9OQ6<@Mxu!|Kxn-7 z+B#pwUHaPmD(r(}1DcKLrA%QGnEG(8FTeE;2Fn<7^E9f?FOZs|03QM*8V zJ?DL#ytG)Yy;q<2+T6`ud@rrWhK`5H9xbAAvb;>~62Di=M*cwvrOazONI!n2z}tA- zCR>8~A&1eqMm-F5oa?+)+t<7iWEn%njZttpqtwsJ8QdcPWVb1P6n&92ABZF=Ab4H* zgeqP-w(_6ux05d}G!waVHF34cPTl(!cYIO6j}EB8WdvQ!_g{>_oP)&t)G+uQ;6vW5 z$=8@D7w?bV6JsU^g9izM8KsoFPgtNkmy@=u8?I8mVXnsanFa9|j=?9#TN_ptbTqXe z%qe!Rc%*LiqXy2=8wKJGiIhc}L7nswSt71eRZrwPYR^4uPUe;2T|eIdCvR$d_Ua}oFtm|-NhGr1G~6)RcS4*g;iX|bvq6$E`^k_ z!VCM3okR5S9lnJ`m$>P1!Yt?_Ms>)YA099t1(Oz65EAY3 z3>1(C_rwq7FviZ5<$U+_#g!|d#nt1g#qN_u_yj`;PC*yZ-J3`qbfVj;qHuH0;G7_Spe}B*Bzeh-G$P<*o#Pt= z;nzr@EpZmM&ZC|rxW-pDohniT3cwKvYWMuj0gYW}WXxJiwOA2|fxG5c$jpzw9xyif z$F*_XkMtGt^Yj8}M>BS!;O8D_U+6l-XKQwT9t7O;mnfPqZ~OGCAT;)u~O>98v6OxSjgGibt$xa_X;|oV3A9x)kkmjTYP(7tt$MVLoY|Yohzj4D7=#hl$}ep-bV4}i!G@D83z~6+jEE-No%$QDGm?wf z(Krd|B}su=8L{>|%-0R<#Z ztcvqgj6!O0rLDw292+kmlaKSYyK_Dy%uoaiB&RRj9tT9Fte}s-6q0WTV{x7kX=%QQ zJEjpOULhmL{w|G1u7@ora)=~5#m!rxHfr-Vt8oqv@dg@fM)_ARD9tMqFhi30O%R`U znF}cH3BK@JfY=Y8>hCwy;33v(k4~TIE0@kWI(+&(r$xQoIYurENtBCZSYK7%p1sLM zu3`XGjleJOy|&Z26SCR5jt61iK8zKh&%+go*?kjm>6gfi*~BxsC%N#$+6L($#7NqB zoIasewf&J~f==!J>MLDzA1Lor4F;I_!W_yKgcA0qlw$7@emFd(efDPZL4*nHoMd4> zxmht>gsYjc%1hxO3@{drN${;cg6AFfXcDKs@3)%zWaMp z$HcCGDzRNxQ*KJvAboHL6Wvgth3ZU}IAL88Hj=sJ4Qy%`Ht}nbuiBecsMo5!Ogq-= zwVm}~Exb1S;0>KF;q<$9>AeFhUG=AT5J9Wz^->>f=~1nfl}UJ@!mgzvqcHT(Kl|_R za{vkN(*=>`doJ+c2ba<9-0c}++`J>_nOJ_H$Ks3-8!e?5ta{Do_*dPoQ0{d{1XGgXSvt#jp{P-f7II%|RHUtLD$w@P97cUs0Pu%t zoA5-yjV-3i{|RX}A=#%za=>##b8spxLi%ObC} zyv>eTYZte*(%+#0O^&K2H{=zeJyLBZhNh&~b531|Lk*`X=@6T+Fg!?gtLffvPe8e! z=b?;FC+<6J5ngHJue>Ffc!UJkx=W>8JaiBfbo4%5Z$a3HP7Etq=aJHd+2^=FbrsLX za<_OD(5tYEMQ)dTC9i$jWsomYJn70=%e!z`)G?+x&}WX!&jYo#7x(t$T)wH6R%8lh z9U)*zyJ7y6>fqq-{RN*1r~?CaG4|L4R1ppH2a`Dch-Hwrvk*isa zHw}Ut2~$=fRn(%rKQ{4I`dal`3w5e$y=rZ)ueD!$y*8`%gcT1fFlCo>YL&hpz22_- z;I)Q}VzpH3?1O&MV#|2WX_RUk;4Jl1;Fnf+7uVlD^{p*#pqnnBD`7Mkg+N#0o-p1k zs!Q>XpEVQ%{|(Pe#1ugj2{?g(@yPZoes4Xwv>ZPHS%!X+IZo1dyD1Al9KAPXL$Tt%@A0AA-X|8K6*0F*jZL4 zRPsv7T_;oflLjXt>a|d$jxXxqT&&B?VJ*okrR${UpbNEtBe`r9r+$YZr;;(Q*7;%3 zow>~T-_Z)GD)mvYtfPRtNzx793c&5#nEUgeQ92u^ADLB<^A#R40u72QZjPRBNA~`9 z>%FLRHY$yd6K4JV%qXp@y+Cvo2(H?s7P(o3s;V~EGOVgBF3%%XlCvVtRLI&4HF|_k z5~ZTLgQ_}ccJ7*YrnR!e+0OBEaAM-q2OP?0FdhfAi%Jp_ij`&gW8+*iZd$k7ACoi9 z!Bf&Wcr~aWlf#(6)4ht_7Kw)-Ee<^kk}e{}v47s^nZi=yl5+|2bHu9(DIg;;AQh3w z4cOvc^32WR&KD7go?0iUYM52%=~|u~l_Fv%ezc1(*5`CtCzK=+XA*_bp33D-J#I3m zydV>I!M-SWDc;v(|0k|IoarOuqF%%Q#De zoI~%6{%*Fg-Vq5{)bbNPSPKo-<`>kU-bktPNL(*9w6ywYNxMt$^Q)HXQSl!X4%GO| z*?7}vs_(?;c(=4>N7;>>Hlc;li5rVpqy6Xo4BlskiOJL3lJ*L}|7Lnwgow}*?xbjn z)<$tnu>9^^=QP$IM~qP*Pm%`UR^d~^h*S1^O~38^|0jx+i92NsHel`}sz9OlDDq4^ ztm>k7^~Lwb76-X{M4K63;iBBypD|`RW`^S;aodYJ8!-_QB7z>^#SV40Qg` zNVC*EZr?v8VKvT=w_}%ZPhWB|XD&W0KFuoW01mnW`Jm8;vu~s4InPPd92SxEkc8iJ zlk&@{n!Z?1%&AxfSLtcTJyWq-Dz;E)wHv^lXreWX$h3-V)P|SlC7jb++fZcr;~ZY% zra`3oMMh7W`9FJ99baWHHw za&1?;o#5+>SgTmack;{@HmY%I|BwBI=e5D++5)*HLT`ZJseZrNU0MS0 zefC!!9ih&_mxtQl>cxhH>eB~#iqv&4(5S*WlE&vHGcZQ;80@XD&J#&&|LIA@iQqn~ zn!$xSgJ$9@Ibxx}QshcJ;N+Xn`?yRp z@=(W+mP`ZBxE;!l&_y8P)1kY}ixpYe_IK>Ua?LQj8ivI1br|VpkB+d z07Qon`gzy%yh37X&tguam?DpE=_a$u@ zBYvq#c@+;Ob>sUHyiiFX`uicj{P3jd^%MBoj#~ZqPc2KX_pT;+Khw9S z7x|F=t?hm%e^S~}a%bi@T6b+akp3u#Zu2T*ywD{gh!06<6mIl$!C*WR=TXMP1Fm2L zB@~-(J(@hh3{1!Z0Hj)$`e1#SKCx3RkDH!4mFXaR<05os^wu7fm>J{&VUT*&9>6_k zePR|eN(qW9<*rOd2qSzuXz`+%An^n|dAsLWB2)3A&4$-OduTFi9)D0qeh_Lg602eg z4>vcv9@v;{+??1|QyNpnjqAFh@NZBRmgq$Nq~&%G001BWNkl==!vX2_IoZ|$P6RS{=$$BhqCjt(|l6x;>Yi~| zSkGt-FfMhHHaI&%P!WMCERh{iig;vBT=c07r;#I6Elc7|bqfS^oDMkHe**Z#10Y>_ zmcY8I4|Xg{ScNxB4++E>NU}Jf1{@;EdxE`Gg_=%Z zy8H|5!m^OYBB{NLo7=)}=z4vvwQ5zpc2{xjJ$dRn5;jh~xvB&!C}tL`QLitooeNo{ zRu|=sxCu)C>F1jS`c%R(fDN4g{EtwF-|IB0g*ToOHub2x-$JAM)9FKqr7qAbeGhcv znu(c#bbV-<%mGgic^_&lFPihRoHvZM_+hvJVZSp+zy~g}5(IdpZHsIyjoG+g23o+k zdfRIW>#Q?~bykly#di0yOip!k(UXLJa^)j>mQWrH0Wu^iQtA9J-~H$G>g6HXA$$j^ zZ7}RdRNk5y>GY(6PZjybeQ223>V=!c=;KFhX#@2oU$a*ZnbkxsNL4+Qn}bD)_Bqz( z)_ep`W$_ienqCDMg-UNG;!>fHWABTSR;g7jNyqCDiDJKcKhRNvu2ft}UZrwJJ8>25 z6BVjeSXhVpN>neDs`M(l$A7Pd!h*P}Tf1rzwT-+CSlf)2LwUDpIE=G$r zUI?NY96(;PClp&!UV zrj?!oO#qm+kui(8&;?I_+%0)@g(GOi1ki%%KO2e8Sp~U;J_$neDB3%HYkN>?DN$HR zRji_iAGF7#8@6&m;F?Ts;!DVZruS1APYuVHsk1`kLr2*-x7aIBuUueLA)ebgpFr=; zNm~?>+)M7ZcK2=_WvPp|ykMBCR#7N6qJmCYZwhO7iZ5 z!J_s|7g_vyNwq|xir9L6)$7-*Ud3Om*A~gwYrVeQj26V% zSQuABlG$Dyk1symg=!UR*|k0TK5MJ{eEq6(xP;v})ZX>=NKZF$s#AM(=nSP3J9mN0 zbo0Vs{v=}}I2(|Y!rHN7j>aeJMWW1j{|w$F7an6;2F`#5gE6gR0j42mQ2rc2nZi^@ zZh(|qNTC_h@Af(ukFoTJ$SlHa>dzgG=_G7B(c!Qn z$kHD-ji-jQKeKDv$(#FWE%EJC#x1BWld?GXSf>>(-9?M{Q zGFY{zkm2s@1qJ}p0nUkgF*f5CgUOrf!r*Wfc9y`1`^$1geTLENqp1goB#ubWxK*~e z_%O_bbli>0sRlsCn$GWsWGgUjUY0PyOf?6-kV86D!lsz+qR>CFF6X-*p11WQx76;d z9(Kbwj(ft1J?*@n(r&=CM>5Ev=?CgN9}qnr4qy_Zp|DDFFQxri$o-_MB03|!IZd&j z7+eLjC%=$~_(;PvtIXD?kl^ItGWhp^+O%i37kL&6_r;VZf{tV1_7^FxlVF!6n_M4q z-Xk-LH*$Q6;$>VS5Gr;FcHvc8WEE?bmpay~Y8ThSURb;KOXWc@lXprFil*`9ZCB`ApW4RJ`uxmcQj`oy(~5NcP1 zCa}+Vrt2nY#K^@JIh6?f{G9weCU3@stGW4`<>k?Mz6&LtVUPG2aK(ao`zk)XHLz6e z6P6$}qU-klp)JVtXx2gFXead`8hbC2JT0-@(LIC}rNtt!D(y(cYD+9v%}CUEX6FEe zsMlJ)oZ>wc`2^mmso-R@OJ&6MF~Fg4y_h~L0rFf^zmYKdb`4k;?X;$mA1z&#+bJHg zI{OJVL=R%Tx6(9Ecbo%LT=_rqb2HRruxCa0Wb&oz^9A5S7dp5Ua3_v31UXRYno zfFje7{GrvTVNoq5>6|<2s==MG3RhAXvD9wlYQJ0N{QEO2AD#Q)=h=vaWze0~8Hvt) z1+LLjCgg%B6|~R=EGJCWMNgM3E}&3*)hfD|XTP);_QGB}1uHnEDy^l>`g&T}ySw`fFX?nkd^d}WM_YKO z*uuxyhgk(~`00xz5SG12F9#L6(!O0vvEF-QT3qJII za8UG~Paoe=DrRJDyeQlNx5$!?$0rJMDHR^tm&*DCuXezAm-pXk9dn6jl%>12mVkry zB$lQ2O=YY_tB_Vej%x-Mrvfbr)m^MbgHbK(gv(k2KDWs^4V1fdgLg-?!0l6UQNpQx z9~2VS2vN^LsBQs5cSC5IUDc80iXa_mQE=6X$Tq-oD{Os8H=CuqnLT#%V;`Fh8*DR9GbD6NrS@eR0 z(-h0qO=`7HghElQ(@mj{E=+5nS?KV7)FGDHoNV_fYb0Z4M$P^&AZitPbj;ajrA?lV z@+x0c^;tPJSpH9{MDulcY3-`2`T}0mUbPpBTpRmU`)g}bk;}ZXYy*&_r*Y)5lrG|H z^VjBHXAvtuS+!N&=W&+Q$3^$1*Xu53{^+HRe)V%2zr>^CD(VLM1gD?z-KWD9R8Z0k zh}Mvdk?-nGv3l}}#jARnxc$xwfQlX)sBPh}|W{2)p+l+_YW z0(s^TTtGhUiC@Ef;GkL@CAa|?K8#Lw#W?#ZJPluvbjWv}V*KQgrcm0M)G~)w9u(0B z7J=;CJukE$q;*lDl9G%JJqF{{hs>zYNX`rifcE_I@ zIj)M+@xxoXrGH-E1n`iAPMAxz`Lg_!*&ZJ@Av}qLaI5IGM0nItsb_9U{P~{Rgf!@c zqz6&@6|kz0R|mx3IuK_{4^F^gWkkOXx)Kc{>(Bwn5wYxz62QJ^OEr_*9>O6eCNa8^F!g&DV!FsJDt$!MPzIsVKI=>Ee`qv9q zCpoP}9;j)}>>&bgTZzGa-`7OJdsOr>6}J_|UnW@k7}Y%o{`HKKOzuV*W?MxoIOT&a zAhiWsT5!DfgtELE*W{jG`|v~4x;L4=FS_9!jrk#Woo5BM%1Mmdus^8jll~_8v!SGa zAnfg(1_r8PRr=v_-QRRe)01+#r9~VTe7@`R*~IO_M`!Pz7u3vWS1o`-z|XN(1m_kR z5c-kNo7Z>STXj?aaSF+DI-4A_&pZV%<64jl)oGnyCQbDSR#S4K7eHw6z?eqQK{eXo zEFzIXyn}Z*NhgG{$CZ0>w+^~{6*Th)oX!DZ8oh0|tqjnUCo+)!6iTV_5;)PeMoa4E zN#HDaWQ3)y`f=R z20H$9peYokYGAWG()vNaW z>mCkX<4yYE%{c}E)AM6uQw>;o&M?h=5RD2e#44_;#r-0xx#STryf$Ck+J1Zb;ummK ztX*15D?xDY@#6GVra0#ec5OLF@DP~H*fi7|u0aeF)sL7_RE?jYOOiKR4Reg~1 z6x;)X5Kw1yy(}wNeTk8v~i+d@YIx0v325o+|Vl;B5(3k+7u9U@O*nyh1cU83)N*#XiHN zG~fc21W`Dpg+*tZKInIdesi_sRizADJ;v>N$~0{o&4YK89oN_mxGGKz)8dd6tl+tE z#oG@TskCBwt~*hrttnEU1?4+APfSl_N21Q0;b*k>maVI1szHiA;8jOW%RhoxH3gRo zYkXpFF(UbsGbA1tRHv(;?&%4&d0SPdWE(b~zGb(fYrMad5<-r(@|lpBB+?X*D<{Ng z_)Wk{MrD+8gNkj{BmrRM>`7c*KQLttTAnR6uPTCUzyt&P37cm4Xpez|#P zqZa9-wJqgdug$NQUazy>e&K!EMG$_k^Y35ojrHy#EjbEunbH!8Rn>=1Ize(Rty*Y^ z>c&4`yU~4Gc%XyxYCfx9Vn1$A!($TK81wF(_bWjxUZZXcCW?L@IOiB$UI zjLw5sX;YmC2$5xQqGZMx)D(_L7YI3%Q%Dj3QB9f$QSO|?#L+D)Hq4#Yyr7Cp$%ID3Uh!USBZwH(&u8yHs-$*`NQ z0OTUjJxSP<1fg$DN z_+OAVUc1$ZA}qy6RbpWm_o}sy9!mW*$^QNB^?Sd((5UM5)$5{70?Xz)Sr_#TuGTNM zw)Cy<*MGi_{;t!nUC)>L^m71KpVQz$3pg$WGP~G(S}zxUHS|Pg;i7x2Q&MYBNmU}tg^gRsz!kglk&`kc^$N-Hh}QlQGG}1RB;Tv ztQxF2IF)5%VMQPhA7cD24@lNj?yfw9r>xmRrOe*lq^qda=cu^cQ#keLKBhiJ&*FpA zZ;I_tvvBDOg!PGmPOTc}=k{}<)0NrFnq-SV%Eqzz(q$$KBn_O0sTJla^3duw=l5 z)rv^*$kiI&!(41?1r4GWYjJ(O*4L|EyVqJZB}8azxerR+hZ3q(g;m;%i&b922dJOF z+Kc#l)%TUAQ#9Mg>}?A^;)l|AN5NM2kHlZ``51b zqt^#{;aqGxM;Mt<9U%W-dDDfHvFJ(roQU}_z=>V9KaO+sFdTr^rv??du;igPL&PeQ zbO%R~XQq4+jX)o;AeD=7&8IASVcb+%h0(A=@zalay**73aqRwsX*8kLXu!XhPIrW> z^@q%{m}qEVF*(z;S9>T6yj`1^tTWx(33>D*k(m(Wn=i(i*8Kqt6s1Ada2gk{{UiJzrpuQ32Wg6ycX9! zXfD=^=UX}gdA<++MZf;8uP^=c=J~?&sFL-&6pV)Spsb`qAxb)2hrhHQNZrkm7U(M5W$CMb%Z9H2wxNNS{>d0)c#kq_VN)2P{B zg^8LG1O{bApYpP3LAV1U-ovU{{q7xC1@uv5U!505TgYEm)Ip7+8}gRzP@FR;Fu(n# z4|E_kT6J0n=V`scQ3FnXU|mlRn_m^obAW0A@@SgpFz;b>>%nv6(X!hZ;Ez6ZrPq%F zdV(=!DS6G9#EJOJ+2fQGl=g#wGfg|tg>opY#%1vkHZB9>95T{28I{IR4J1d` zI(=S}8~W``RZcqZttX>r0@BRa@&n*B&qr=X7sk}}!Qq2TGlpj1>TA`-eVrL8MGycL zsY+nl5~%9S{D7WY`g}Msp%l8Ci6?Z+nY`%w#uE2pSs@x#tk>eI*RNk%h1yjcW)X03 zv?nl0UD4*Cx%++A##)gv?54sNs3^L*>|RbPI-E%Z^>8G-{`?{%~#g+CI#41%9ir;iE#pmZPYV}Fy6Dfu))24oMy2ZbV@^1E>j>1KH$$D~LcRBT8kehqfF@x{-)8t!xfXDaKIOaL3`e`CrTCL)d#R(Q!csA<<2t;H8IEe z4*~JywNAniD9wZl#0`yZU!fyWNpNUpNp#z&{VfXl1&iB%`gjH=Og#u!{@w<6b*h2X z_?;|T0d#5kj2|2uXBFTgf1Iq-f@J(mc9_GS278TLU<4Rox}PbNf2vjzsyZI_W5P)b zyiQFME#t@0ea6q^93)pMPKGwQeo`U_bf0;%wV+I)goNT%shzqQQfu*`QA}q>h#)m1 z5CK-!P4B(xRa{F%t?emc_e%ne#*RlM;Z%SLXjsLsm-aWR>b3OfJm|lN1d9FdUwkdR zzWQtJwIc#k*As89RzC!VQ_XI#J*@rDm!9_)-oUSZNqtWBvw%h~w-Fse3urvx8T078 zWwQC1fM>#Bpux{vYG`-6GGsB1aMMX4}0In35PpAXH^n7$6xqsNkW#C^m zs=cUKywTSJg*L0hA$|+lnC^g;{6_v-MIm*P148IZPZ2(6?FZsDAWPD1@R2Nt*ID00 zf*3xi0pYlLK)v0;UMdK!#p)7U8#TpNHc{b*%!6|NOjM2opm?rpW|($JC(l(QYX zhvkWPC!WHrYy;Wnr1M;;wK_VScU+5v+%qb$vrsajx`%kN&kI^MdEmHK6RZuwE7A@+oOd}J+*AuscPM)}`RpErN~sa;yTEx5Iw z=Jsp|D!7=g~{}0?+YMnfKO9#cxX%bTy8ut6&9`;XPNj zfn1y?Ol$lGed34+j_P6o^N)402CF=k8rrAb>X~sK0q7d5Nrb^^tm1THe&kD9!a}w0 zm$M{N1z|aZh!37e-rfLyIxRZ=I9_e|^Eqvy%H$*^#0HkC z6ag@z4ARY=aCgO60Hb;jI{-1{vnMTZ*GFmsCArymfL^}ZAXP<1FCwzGV%U|yQdUT% z9aw5;T$ql5ZK-HY3Q1OF>j<*HMl%I@CyRop~Hsi+;#(tD5aI*pmeF34Di$k*lG7z(m-l zDyNjMrRBCgtAf)(@6ja{spQ&kzm32QD`5&Y)B9kBv`Yf()()wXh%J&@!2lO{0W0#? z#bmCuGc6FTy9xzi-@5k#({v+9Fp$>oQyEyvD-mRX=?Q35l{WRf`TgeCi<$BG;v<#W z&J1KzX>mOA$S7s_6|AoZR0Q9%Xcxc}q2GZV%tw@#XYscNakG%^Fx01X#v=Rm zP$5(+5>4V|dpp#!64WF8(Q7tgUIj(@kN^N607*naRHz9UVsFzWC6!PcyKqYks&UkixiquCsS!Xyi3{K8MmO;H|IyiaI)wT_R>l*3cO`>?Sqm^lA|(DO`vWb`@e zLyG#w_0KaWNsxX9=;`9-yJeFO|Gwx;O5n3R@>IS32l<-xx9CIGX~5XYm!~Pz`9PzO zc8)S8w>!^|aYjtQ@H+D5Z<`ZQhZyaV9`!7azl}IbBWUUlw&mh^b_*nJN(Q+ph!d{> zB%LxNIJ>c@^Mh}xx+YWJfLFo_V8Otbyu0+VrFWTK?|Rs>Y2!t0IuUM5#+ z>gEkMtf&=AVg*;k6}1BQZZP=X>y`Tb+5xVN=L=t{>ta^Ft7%7q$q4CoETt;0tE7B9 zuA%I^31|a zz|x!qpl{M(Ry5Bzz1K43q7#fg)62*iI!tKHMKffO=)Ac zpmz9l&}p&XoEzZ)yPhHR=;YyA0M@cU|()ksamE5-B)l$#8zb}nQ3{o6>=fVn2_g#BqOShonO}kP^PB?_jyta(Mk6X>ly2b}@h;{*$ZutP<*a4c@ z9i%XYkxTk&;>#^sBhoCS#j@=L1$l!2c#K_R64F6FI>E&5zTL7M9ZnN;HD7^#m146B zs+yH>LCB6O!;HB>#M)I%#-|hZ$*oN^O|>z=EWon#&QaC%sY$s2_Vg6}etvd){nj~^P@{Pa?Z7TY zk^vs`qV7D3@{p%}U*NVFClzr*!vr^>B6gs2fVz+0#j=eF1);Rdet|%p`3=FfbRsjE z%!`qTg;=p359VsK%-YzSQazt|z3cg2O7HJA$}KOb(}R2w*W%ZzuhcuS-b{-!qDs%# zy;uyy_1gJ|$@RF3TNL>a0sEYSrFSfR?ErP% z*ip5$8R@+Y9jKjQwBa=Zy^lPk1$pgX!Mi3~y$xcSN$&N~xPzU6o9R_V!1FVv2-Otr zr@<+KUOa&1&~Nsz7igdznyR2e*#Z!sjks0>2m)3#>&UUBW0QLVsYpo)ZY*-ATNyOn zzx?$W`Xs?h28k%MDdkul&6YTK`r(=DS3tGYmvDl82jJ~{0@fTkXmRRvUxw~0c6)oF zl)+&)n3X+Aft_iX4(r@KwKTOAr%jk$+iJV)7lGogrbr5fEtEojxZ(!McWOsHf>Md@ zi1IPUM-C4%$}{Ji3dcBAAYe(L*aJfXxvDl3ESq}vsS60q z0&^&rE<*^FpSn&yqj*ywQgH+u-N+^}OOv4p)zQB^ClCqcXlobdRyYz!t z%$}uyE3QE75xo1C3q2HQUX78TG4r1zIDimkkV|~-2pQ;6BC~V>R`-xgTCj#pq^NCh z#!S8o$(*vIjdBG^8&IJ(B;vkNLa8kENkm4hu+e8mM&f!bKCZZyJy&e#u-)uB zeBaCMm9FO86v{w_R|IQi{B`LreP_M4-d=GmQ#<#cS6+YO*M;wO|9J;4<|r#Qqt*rk zRgBOsTq`yzijONL6!KlVcD^IBt}7mQuym_}m1L5uuvO6{d&~N0hQc8y4l=b&2;OWz zYnpo8XXKJ7AWf_dZFCs_Q$O&?&N_Y%rgAEt#qc?L8>5Zd#qk!j9^dbKCRP}10;GXp zd5w{#U(0R=)BU||mT9&f5S(t67+j}(nV8gFg$`dXLR|u%hHzQx>ZH=o!2jHAzL&Jo z3RB~GG~mgBLg)e+Q=p)~oismkD!0LrGy^>k+0K`PVXf{chO{x%G7b`lSL>DiJmx2d zNTsCWBZId};Dy)L%1Ab%giReuLA6``f*-+A_vVyrY6}`4v95#!)z~->%g~fdnY;$N z7A@Xw^|PaR+Zp`ER0}x3`cxEaSDGasU+-pEs!vXl7qE=k%konM;YUG^P1CS;z+wAF zqW}QCO}?YmG$ZE4Qe-fkr6NZlp|k#^KTJ=!q$_4pFejj5rpY~4&RlKZ>>S84rrOeHtpZ~~4bwGAdp*k(k# zQ4F?&F0Y6y*H`4l^;miNDxf57A3pK9>-Ey}rT4v`?=_q_K`>Lh6v+sEU3k9v>k;qw zzFz#b@V@yjY;g;B?J6?pJHnoK3Zh%g>U)}P?KjNePuYyS!RS)Ee+EttOGzKbOkJ@$PITi-XV^Ue6};$< zHqD%S4)PoZ&LKCyl2Z%2UP++a${o@$FUY8>H-PuPgprYSmgx|qo||)|_5rd;O;DJ- z_7@Ux1XtkaULT^ErhTmRYK_FH!sP;Kj};_vGvJ=RE%^?;5v zalrhX7|*pvYfB7Tke(W8^l%=OMsV6N6BAwbZ0-$9>vU{+D67EWw52@>+q_CSp3X8w z&k);wOij*p6KM5k6UbzALl9H0&7ty>Yw*ztxLNNLp8L4=pV`$g8@xzFs8?^A1?M?q z{e?F>HFg3ry)(q=44U+xe|l%<5;e&(IjM4#E(sPrDtADai(WX*_@|9(|6F`PiiRKk z_b0t!?gN31GWBG&-6%?8TMUP3uF>qVM(29&ihy?d^FX{HHWV}VIX+#@1yLEb+^T!y zd++b>`hL~-tDbvNZo>8a9y3`Rkvms@ec|=S*Hw>&Uz_jDyMTHH;GWo>8rlpGYbyy?4xFdfRFHek-Kbw8RG zwF7IhSEC(S7ikS+?5Yf^JV4?l#uDf~jxHjM{pQ_(+gDQ&v{SzCTl!za7WGcUPNj{@ z$Khf!XOF7l{0XG)VJcHFm6RFf}yuBajW9L;c69M~?wIe0QIr|h-B zK!vniO59-<)VoK7lXRwPJeNWq&6}sU-Ir5uZz4UAN06bgqeDPZp9!#j0qkjp5h4Qi zD1%uBB)Rwe3r2T+H{P`e-+@9TmkpjnE3lF)8QutE=5fDc>%Qy${fgiFe!ld4>(5=U zz5HMdmC03kqf#pBRzi!&%&)6ncYa;<+I&|8<5m?4_5SmUt72h&1%ADE{D}yzg@+A6 z2L!ksQadtAg~&{9RbC7C%4@5%YSmrWwF<1d_p(~0fZTWUb73QIjM%2rn~TGaw2NJv z^@;8N86eM;0kqEA`xMojjC#z<^r1COShK$;S%KR-1$vyj62zY#&x9>wKg15;I(0sonnvd;B z)NI~)Ihb!{j>fs_fZ@q#4ZS-DXeuywJ4uso7kdjcJ)Z|;M4Aa?mj!b)9K3^5X>}<` zft6#_+QRma*x`I^XXg8nPzRD;mguD0{gAGDeX3pQwvsFmm~}G{t&Md||L?NS z2VX$%lN&7Pyvy-xlf+1{a=6%nE~8wHTLXmTS>nXr1jqgY@DuB^;6HwUlf^Q=Er zuUf9WXkP$`2xW3_MRF~zg~#H3;rZe_;<4(rbI1MMdRM)16YFEH?T#7Qcc4U?ymOB@`7VbM%#l7Q-xOgGz&Dw^U{~(L7CQaAn{j}w zV^|MF_B00R{b;R+uy&}X>Nn*KkkPJws)^7nOKZ>!t8Q`k zicp1eAd=3l;14hp<|JBOcdiZ3Y3W1khSwp(+LbrD)zHyF;RbiZF~_eaj(-qH21bWk z>v&CcEEj~vr)b0<8 ziKr7-`=i^N3tBE_xhB{Gh1wC>?qm%|B=B1N#s(0@kP?W%8!#K~MqEJ!s{=r9CJE0; z2{He6-gav|>Qt78BkMzP);$}*CNjKju@tc=tQOtZ3NA*WR;={0CrW`}BvV3WmIGSM zhN0F02+YxXon^mZ%T&UEw2`?qJMC~Dm}>Zl>ixSbqHZz64FNK{Aq);*F?B}7m{?#> z{lC`oIXA)AAE|s{*BcwHl`7XTOC(vPn%z2+v5d;1Em7vQcDdoMJ0>*c0FZwfsR!3kw3I_ z{{tP~3m=O>vFdIxr3$upLg!~o-{>aIc}S3DjU_p4UBnB1zhWee95))*rAIP{!GuNCRC zEqyB>Um-$@& zt;O!qvFSkc`^~;+!zKBi1;f%|u}T^J;974a7Geb#8JUYrA%Ypn2(}hw$P|-CXUEwj^U)Av zp0cG4!&1#ho)h9Cg6(ND@9`WiwN2I(qQ+CMpd`rkh)+iIAd?$d^G&;e09t8}^zm6t z|9zo`K(z|j7HS_$I1htQ%{!f>z6@O@(D+Hcp*5y(D39|v{R>@(xZL~kumM)fqiR}U8exJ|mO=N)k6<7# zu0$?AzE)lli@7ounE>)-eNr`~_+e$~=0BIXqlBqF&K zm6gG3#jme=zv6z}uQz|KsI857?s)2cL*QF`{|BHR3_f1PP_CO?|NPx^Fd5PP|27ZV z-p?Ds%+RIWc|G#pEb1;kE^kMAS7q_qkhG;W37~{6Rg38z1FBJ@AMF|T1%~^iY$!%p z5q7H434cBw2Ua+nKu+bJ{}@W9g?(LDqSjgDJHOabzz3fvyz6HJ7Ca^FkA|suJT+nl z`dgBuxsYhK=5V$B9r0oF59)SZ!KrsYR3>5#*E*?)`h4U_Oh)Lia=r$8k2mH^VK5*E z)Oce`Ul#%v*RqR%Po@#Q|JNcx_MQ`IY?;(Qyt0`%)%mJ^XX;cNo#?wtGLajQ6P2Xl zBLxicWQC$t{LCCBC4d4hu!Ir{c)M!x2EwF;j$Ib%2T>=G4Ah?a#EdZT3&fI_=!S)k zNmtxl0HmZ`p04BqS40LcIG@v-r1){`HUaWvbQd|+e+$VG#W}lj6JYhp90$x!0kk<228Df7VQ2uN`EpGQP^OMdPPu40I<%H zZhHm*6dCi`e#F_y>%OM!i!?`roWR{wO#hB98@!C3HO+=l%zAlKMe}ELbQoH*BmC(z zbRTB^`DbZ1r>YMsq(B8z(ODoeyXdZJp{u}h&sRQIV9&mwgu4zfQfM(EwU(|&t}CxA zVqrZN*U+Y0*t_mq&$|EI@Be)7Kia?R`LFx=`+mJ~zxTbhh|pG0<;L8!pb^Pj*c+Mg z^`(3BuQye!%^Q4$%mNkn)(rvJ`2H2V2(2qtR%S3i9qlI6!ooh0vapaqF6Nz&3sT&7 z?fv*lVSgbvxZkg}cq7TEyQ=gyVpJWPdw#r~Zd@Z3agr?nM8wAFwKPEb5Oqzpb$vQT zr`4P_1ung%;QU*X{d)WnMw~E|Ur%tj-*57%{o7i1%VzNp&qDxSu`P~$)X#mxU0)8^ zZ+FlJ#I4evKpU`au)1RSP{1N1?%hJZ>2}R!vU~fF4_UqQ?+`{2o{?_56tWrlfj^4D zW;plG+YtTV_y_hEp9ECHBY2^Eq0FBY6)Po`w*Qgl5<|)(VrgE#|G6>knR#P)pX3?7(3uT%*TaICi{ z0h8PUltd6AJXYGtFR3eZkx?7M%0+_I$`C6eHzwi)wdG#U;W0R|9iSI!IU)BOBzxqd z-+6Bcb7w=^?j&gpcY_HOY;DCLv~|;Xp{f{0y>DpblO z#j3U$Q6#)1z@t3UOg?vc=kL8$iveP52S#nF^R6A!SrdLvEbqH|&JmHY>j)=MFua0H zZKg+ZduPQMuSn&gxCT8P^ym45ZX@{{kqlvFlu5IJe~4yi`(jraVHA1yR~L5=_qgTa zc?>KjYF)Sc0{pWrE3(w#8`%iuUtDbM&TQ{*6mfNJ~ zYdE$DWCp4wJzB}HN7fB(-FMuIKam&X5?-pR`;WG*6R+nEZQv`@lTKY)BqE|&wxN1K zFj8EIinT7F?t4A1x;HnZYvaBYe|_bjmoDg4@5}4CTm0*?tV`0VXH{Km8yV|krYNmJ z2X~k5M&BO}XF^67Zvk0AZImRnGHf^nsFazWQAVKlj%a>AWHNr#32ZG}9C$KZpOG)r z9_0fb>?R-^-ww4PB0Ld2Xm5a6f!Tn0TD!?1d#C0-kcl0xiB6+i!}Of+iGI#gX8`Lw zDNS7OK=5fA!!fb5!T=}<8LJ>W5O6*#O7-j`^tysNewe_iW$+qI}t`9;$+ zNwjoU>iIto1vnC`A)pumdrAi-rNefrI$;CCR$YrJ#!7A7USQ|?o!rvQOhIaIlA+^b z&?pHdBUQG_4NK#JT!xNZ%?i{NGzAn;L?p1lgffC2G*7?rA{X5RKFBA-6bk0UyD&XR zyM1N)#`Lp~&XyvB4B36^oKO;C?OGWgh=eY1+u9{CPBvg>-qj$04a)$j9pymmCQvau zCx!wi*vpIDs|cXNR+nVLs3VBpANk{u5lD}NN~?!0r-mj0WrR+!Ka$#E1g1^c?LVWC z%5oi)dn!x;HrO$A7#_?8vWp+rwa#A713r0{Q#;3zj6fB*BBpj#r|)i+sfxlam2H%K zqGl_m{lrYkTBdznu^xQIjvf(uTI)@B8)dcYWWlf9d)A{_|%)Z@!?N z5>OEfE*VBB)%?ouq|ty)-@uEKrc>xy0Vy!i+|81H}ze@YwgZ|o%2&fJl&=k>2g zXk}K0eT1AKy=D|<-xxwMg9>djVqMo=ipRBuP+f}mzT;QczEOdNS1E}vDT-No<%Io1 zNwg6gqZ31iD+50-mxYih10Oa0Fg2vQ=VOQf6quImpfq~`dUo+hY#ZJSy$Po@0dUIF zzVDwnK4EnJnZ-dSQM+#(VaYh#;;#?#SrF!)N;`Z7hqAY=Z09ga!$ml7MqBxtsKHdI zpj|AwGIM3$RX+eIsz;)MDTxK0ksqF#=uo8+x*Z$m`vztu14+zGp|u~KM*4CH2*%da zDuoTiA~yout-=NyaH8j9qr`GEuArzY?<(zHzHRBo0GwS$P{?YUpbZAXy1?0`>}MfF z^>0_ihE&}ImT)=N47h}l@R4xE5!n(m_YxyJjCGSb8LJCBzYi>7i2*K-?>(L8`UnNN ziKI$dhSpTKD2;lWrGh{)$BU%L)HxBzdI#62-2v{FT}6bq>mByPr2xUungXNtu9(sf zpTjH(se=q=4gkZjQdD(QAgXi1p45Y+1Z>xl5u$`*1=`-iw}8DC5bUzml_7tK8PJ{# zeX3Iq+;-Ia7%}zis5^J+aM&emL%=?mZ8u{C8qHIojuJ!!PV6uCu>+u7>jeH%jhvfk znBN5e8eVZ*232IwC`Ew5OoICQTJgZO_;^IF%;CU}TlcH(@B8_m{rvZS{d>Rv z)OVHX8-L3UEDKUvIDLw&-ZUJDRBm1id)KvaUwjmQUGaCtUA*62IKOpQ@y`~7g!bslAOs^7DOF_VTGv;hZYUSA-gT=UU)?r=pxZl>3M~o6=jKg; zJEiWa)Z{9l2HVm%`GwleR#yKeWMPx3U$T)JMHzN*3KC>sUW#x$MH~6ZZQz zPYuy5NkeSJ4+jF{_s%i+K&^T_x05G_iZ9=gRj?paqa(o#VwaBBRb+E)(3$;tas!*}= z`g*9I0X!ZkzG8FT1>wGRMMDRKpxjbPcO(6luc2Fhq!Oq1JG@3mH5ct&IIH!-aMoo( za+&RQVFgjaFr^wjggfV(1Ni5>N56Ovc@88wHQ}dLoxjGQ&9dUcSEfI0{P@_P<#Thl zTV{D=A6@(RWP`Vf9>%GoXG4XqtbHHL=QCUasmT#l2uycQU}D%iss0Wu(PyESdl(!CGM(a9Voe~b7V3Sz4)OIfM~OL zo8`bhk=iil4rE1=ATHQrQn3R-oPjEymkdB{Oldv`;7qxxS51t*=K07x+W?Qi*`(EV5=U~2Bxs3Eo?I(e(T6$C-;BIz125Y=Wd z5PHy>KvBV{9_X>Hsm>pCQbis&5p)GsKdND|pVE)Dj^|1`Wk7aNanFNZ*?_3wY)c_H zxl^D-Dc!8fwo-}c$%J8$Tw1FAe0(EH4129(^s-1x({_2d_FCj3FGTQ4u8cWLkcyS> zeN)`8di}Yd-)Fc6KmY(B07*naRQK~g_5FLlzx7@Errs-ym764QLd4<r^nZE7(8 z{s*LmaBZaQ#itdbDlVF9qK!1Xxi(-QJ#-K&XRYRmCje zQsV&1vq82~8CR#S>Fp4RG z&rN9f#x%>v@TU#Rd_${&Shl$W#Awt15Mxswdg~q_ZpjhS=!6ue4T?!Q&}`Ub(uV%D zLsqVy=jroLVPjxR1EJF}>Efp~<|l-Zr&2TM)Ku|l15OkYs0eNW@K#ue8Bw)aNK~=u zBL<@w*2>J{8VF#BI7>2vd55W+@-+b9 zeb@VYfB(^+XZRMTfUAeG! zXyJXMc4@f-%vbFNg18U1*V*n1bb$U4Cpzcu1AM5V(fw`>lx80Wr97c7n`U8Ov?Z2;nyazD>4%q&P>NzX(6Q_C6Y*+-Ps(p%*h(w8&h1(`! zvaT@_p@8cwy1#X{-wN*At0i>78%^UrJ>A+&!4wM;3>zEn@n*>bNNmbLT?>AGvD-x= z8Kv`7UCgv)6MRw>*<}X-%T$8p6~$(5{N5aZRzF)X6p?)%hHwGFt@OHsKCtsIPY*U| zMG(&tXyPsPp&Y||_5<}yf=>9GnB0G*(--yxxEYYn@;a{!J@IBtaL#~|A81R5aJh=n9p za*?hBJns9s<=$?wQFq<1x?lDDyBW{|34Tf)*7^V}o9mcV3{ z7y%@3MH?|9O0{p^@A!2;?#KP+e(wCmweft`E^Oj{3IEyPtHsM)7qqV{GKvbWZc_SE z`5vDD8qAD)Gp?0e*ZZv%@+{azA@$xHNODyONTEWh5@zdk*V@rCkk2Uv#-X!xv*9;B zvD>)!$7dN)Y#*4pESz6IWBDh~%(3o2Yuuh4!#k=r;|*!{nv|5dN}eLc#QOO)jE9?Y zU3EjK9_l4q{mLHFId}d?4&;w7D;#qkcVnP_#l1VQ@2}ZRd>-Pb@Bv&n4>bT%P|oMx zM^fBu(p*tk9o&tLk^Y0kmLd>!LMmsOCMG*DGj>&vx_J*SPdcZaxC7W!ZgMuOHlyW! z9WW_Q!;FlJ?Ptya7&ZVC{e`21?OTK)`ntz!avn2y4kpQ72gp|Pv@s{yOF971{TQ1{ z9(>r51<0B!GCcM?Z$RD0a!;}wYw*Uiih1VEC9A-+@V@Jv&wJ}iqJK`q3ReO~Eybn* zKZoPIc|bF3-+{Z)z={4oXLEc8y>NV$0kB1+p2la;ZW7biY7Eiz2tgKlJ2#tILBz+= zYs_I<1J{DI7;kiRkvHVA&phE3Y;!0ifzkbR$Y`T2RO*uvC(rf0A&SfZOFcr)K|U>Z zGq+W>RjL_-2hg$=1rVVOf{GPMtcwrR1&Nh$^0v2}?yY)izxDdw@7I3*srQSoKl^v^ z4!#oiKv6}c6k92!uzHuhUw=g1-Jp%_UO|ZPoQzFYN~rfU>K97)edkm8&-Hle#XAdn z?_I3GpC^!1zT>gh|NchZDXl90^_RZB^6_P-AW1@{2i9{*f(k2hr%H^9=Io^T-@z*|{${u#9491$H@csGJDxaN@`<(>bTL<7XBkRU47QcBYMq z{=mwvVmnuncCSpN_ow>d`ODVcZXlV5EJcttok!C9+?8QZh9oNjk1H$#TahtYv360a zxAsf*)So}E=Z)8Qy?*0W`%mDNyjiaRkXhb`+uE*Gk)?H_ouulcqaTo`XVj!p61qUe z{so9t`F>wp_x-x>Sj@+pRr{8zaNqTM-fQ9C|Mx$Mzqo>5uRHz_ctjQ>)&;o5s?bJuK9CKIchxe(6D9;5wov#?i}-V7 zgDY6!rjGeN)L=k57!p4bqW{Vei9hI-Q*N7$9U%q0#@y6G{~Uu$Ovw+*LxT=DXh}eq z!dnbvWbJNbS#F?1>zwy^7}yW}1$>xPl%7e>%w9SW3_y5ip!>JRI^t6^QKRn?{tdRZ4mtLn}YdIr#35Zgcc*Py=>7~=#GeP0kLo5 zmNJ|0JWc=tQHqQIlCtgx4Q*FN*zhTWQy zk(x9B;Bd|^m1~#OzWxPlx3##{-DE{f9U1MWmdT7vY7xw^+A|niRa^U(O80X=ziYqh ze&hM){&VX$^<>?PcT3t3+m){iwPvQS99S$Q(6jZ zz4+s0>oZ(3HdH7nXXYQ9UBQcCfX1g6%wb+bP z-_D8rS)G`In3Ec3CF_vF95%Jh`Dw{br?ivw#Nx7$K(1C|F13J#QP{Clr{p59y1Qy- z!;gja_M?w!7tDji5Rc7H6vbq0)ZUXfMiREY^q0GRopb~DMvwmPp&EOGM}JiJY){Vc z1a{L+rHCFEP2!EBZQ7z@Yh?f|FPjmvJEWG1u>s==#H0bEx@>aQ)(zw^?Gi4d8a4Zv zIHrRfvrUwHAn^M1=_QlaHk~{%0Sd-&0I7}o!IiPgU+ddja7YxiW)O@t|9xi2?2t|m z2X|qoAld*?cI1aTp*60tF6NW^db&8;y!xD24{p(W3xZCKbhm~*Q#m7Q)f0R(ZKa94 z7@sV^T=e(q_F6l7p1aUOpmGnPTW%0p**|vROH5N%+l5CVr_}iTfADtuRz@(H$xN*k3`8m-(!4*(!rog#ZM~oS-nw7)`o8ZMzQ6bHS3OJL zf!B&s>lwJae;C3lJxafdzaoD9&GkVBjxvX_>hA@i5FxV-dXpEb@KvSC{SSe4ZL{{EREK10zdHiQ*y)z zo(ZoAG6~}-+tfY;dNq(iSc}pIk=JA{vB%0fG+Uo~fX3krf57l=${j)x6X^RSmx|%C z6bHEY3xi=^h+YZ;gw0mRbrCfB_J@N@i3Ddqq>oLDIHrUdh=-B2_QM~708L0Z?svE% zny8SFj8Y}&c|AZLm=kmQaA@Xf!QC!#nnL-D%hu(yClD< zR_>THJ%q<6_fMa{YcCj9Rci^(X*>mkQ{hKQ*)J))+1JWur`rNi?HUA~@pTft-Iv|n zu?XMDr%(7v?nAqwb7E7AT|P_5h}wlS7~;rxi~y&H)(*IIZR}6(7u(ALyBni9hu!;~ z&nj3#Rqu-R*mdKv@&1ax-ub@uzW>^KzP$8Qd)IwK zsJ+48%Ea?R0e`RLuNTC{9$t^f1FC-XHLEo~O)!wi2(5VEcUy}lS5liBwTehe?mben zqoDl8XDh=go6p>=sfG}?E6t3Y%X)%2#;ca%rWfpb#8Q5=u6Qy0)RITb^6 zXs40c5rz21RVf&s#-zG@3`W%rhR@?bdd{EIpTI}SXz8H-ezQXgjZ!2))=d4JJ}A+` zv-z8eOPudG7il89C~m0QBU*H{>g?;r zOj}d}k}{4%hk1<=%fKoe^y@-FWoH4m5On8~EnWSPZRZ$Pr&Fg{vm49u$@4WBFKWp#%@s9jc_L|zn zQ;P2$EB*@c-%l;^7Ks(`5?Efrh-QtuLNfs;0TFTEx3}UY2%=O9<%)P$gaXX;_zxBk zYYao%3}{OVW^7cjux*2Os}{l= zdbb_T$h-?=P#4?wY@^h34;6*Xh~ul=JzKS|6sxI$USKUhbW58k(d$9>%s`)5ytk6% zGWT>qETk2&N1(FN8qrRejh!8-WQBi~|FjkpWg75B$FImfCcUGEbK3jmk<)pa(-<92 zy;IY_>hlq+OzWHROAji}wE__8*%cDmzH}YhMGFMd;|qtqI~Ux48_@`;?GYrDa?F@T zvK@x%V}guUh4Kea;16LVph?w$6rqw*5y9H-G&)+kUh}X~dm91^rLr!IyxX%?14|)P zCc{ee_eTMyp+r?uq#joO{ z@Ksu+$CZEm%E#aQ=b!xgXDy4*CN$|MTKs(f27@Zm`3z>ZOJJ@tA~CjOzVV*=vNz#hK`qQzd?Kw=bYppQ0Fk@Cv<9xYd59*CpKLQ``!%$ z-uU^$|27|C+Oy$6G)3MbcthstAra@&m5RosbKVc!`hcLuP@F&4U(7LA^GVbS2dhV< zvmt@ahM+@m2QSVjD$gTw6hOE$tf`;o`Nipi_~Gg2XF}%+b>F0|tR`HemDeqjZNr(C zR|M08lQA5YL@2?XCay6yA5+>*ss?-dw86%7z8ZhG!+QW;WlQXhVBCU5no$;|FIv8% zi_&W=rQixAEw1SuTPs-Ff%0d~YD;7f-6s6Xr9HrFJ3E9*s`er^!j(OdyRa$u0?=h- z<9wJVAaz#3IA{Cy)jbsn!gIfldM*)clQ9&^;AMPjCO^kkwK~e%7OUf|Z=7SH=En*_ z?M6Y>1oVr=YSoLH~(oP~bqTPltKnd5#&RbQoJd7G|bdra>Y_&$^3G>YIAot-yCGNFfWWbd|oUenmX4ydM1ZcmDN% z)?feMwf??VbNvST-0^S9~RyZ17n#hQn#$^{)uG0TDt%+qP$72v-K7yE?R1uVm^s z-6kJkBY-&plkyID>AMx(r(`33AF?=SZNL<|ZG_2?RB!zPsP_HzJnWc~f<$zt8TEjM z@%m(!K79=+qA`oZnx~eUO2Mfo=Dr?==0h&I19qY^S#kj$?HAEBX?3`7J;erF7~YTt z`h52f>ulDy!UaYj6iaF9Q>8e>NS_ZrS2ak;5ZC{`2GA*him~7;MNrlzhLab#wRlX< ztUt$ut;UrdKI7C=6H!jGCmfO{7^I(2EHqjbL%kt>0=#QvcbfyG{Vi>2!!}V*JNA;q<8ZVOmT+ zyP7>vp+KmI8z4r3$w~4)OD${dkHQWdQ^n$wYXlDJnht1ly}d_vE>)FyR7^FO*v7N- zCoN-)i1d$mL$lyw@D>Ipi-t85%pF4ql@As|!()+2`v))gA zKlSIipKm>-XTmnRKoybTW9t&LbV(2KpDWjeuV4A=*ZTU!zy7(_KiA`*zZS~`M?bY$ z^9L|yj8KxtphL7bo`RuBJ656~?LxWI_GA>l0SIvW;! z?}*m351cs2bAlZ|rvOy;k5QX>{rIcS5Vi|yD2!7)#19f8`v0Vv+w4O&4YyAy-?L%P zqk&G2A*hr#+d8BcNJh6e8nuiaE+!N7MIBe6!E6?x`nNQ&6B)7ZjYGy9>ZU&&oV`8- z6k`OPKRVjrMtHfPbIFuVQ-Sn=Ga%Wo)V9ExjO{5K2o>Z`vY2UAD69soy}eN7o^UPD zbM$J2%W8uL$bh<|pHWg3xrYqId2pPRU_UkXaFj9Rrq=F`q$f(m-UqOZ3%A^HThX|Y zGv*gSu)L)`onfWZaOvixCWUq*Tac;}pO9p)5ZD@fDp?9Dp97Qt5aFrr$T+f^SU(x13TFo%o)tcZ)M_Ic}WDj;CDSQ`LJ z+gPWW@#^B*loW$hjc^MfwC%dqY3&2tJ#t0&7(V7dK7@j0j+m_g#_wC|GgfWF8Vg*(r18YSlVlfsYJPpv&vAy@c zt2XzI*Ry^<_4=+q&;5Mk6?j{pJM{D={M!7r8LBVhuZRbA{gdk}AHU-3@5k4#eEjoR zfBjmIuO$gpj9|o8&0u*@O;CV5aF>jBK$5GR_irMR@gT1MViSnvSJk zwAmp4=J9LG2G?_xCa{RdzcZS$%ENpD*};*D=(U|_l5xU%)PM7{b5=hE0h@H%Eu28t z8^(3j(ExyVc}wm^woJjba5QuIk-I@c1h#RaN#Da1u`iKVfZG1ylQlr1Xt~r@gdz}; z=+Pd)o(&YibkJA9%ZNcmAXN~z{~;bgh_^R~1$Mb=lYpXZ-ic3W0wAQPK1X-vZ`;_B z5VrqCyXmRe%=30z)9rSQaYsRE?WP{(+d@X@*0mbP1(`RR$E({>+U~VDd_mY< zA!;iaJA>-2AT~wBsRk#r+heY=`L00*D8h556smpA0TL}k_gdSfZgu-*RX18iY+*H_ zMuleQLr2mWn~U~UacgZ7WbBr7gKjN6&ichjt@vsy3^KBD&TA z5w1))#fYh|6Vn?l`DHqhVK)99ilP78svQv@Z@6ee%s;_o+NWxd|DUQiT8<>ikpxv? z<{o5LbbO4b+Zog%bjBo?=9u($e*RIS=cNUou?q+~Op->2` zJ0*R*X@WyKvknogbH@3=<82;~alXyteT;KH{y5G*-pBbCGbWeRqkqL=C0L-4 zJDG_ZBHgw3EJYlWdXh8_%*A=uJoxr_T&a~MJ+D=z$H4OL6<$l@>0Od$9se8>DvVmRJL1la=zCL01HfG7;x&h2l!@0*dVZ(DPtnOrBdWwLQz$}Xt zt%biSgI1%47p9^`L4)X<46$viw&h~T+?~Hk)b|%M=j-3ow4ZJD5u+ws}OOQI;2}w&Sw9&*Gihr3rsgWm47qgCXyZbB zS2_kLd!J>&_9cDuRNABL25N5MH*>dVe$?^-xOk~ui~nSK6rP$UZ9uP1`+f}cjOaZK z(S_)49F8%pq>AeJ%e~1;0-dop1B`;*FK&x7j_?+#Vif|Zq_m}3W>tOV=mzib#BWT? z|0m|8y-*R%lCrL=u1o7x`Gs}q`C6|R*QynKjgcrqXX0Hr5(oHz-p-guoQKX|bBy`N zpL3jXyv^h7F&`(#zLophY9nuKB)*ptu z^ATFOF1?;skjO;GztqE%e zbF(ERfYJK|ZZg)tXUp3=Vm7Fz7%8ypao#^d@b(t>H{P9$o7CCA1lUf>2GcvU;AZ6k z6gb)P(nfB#H17WByO*#@Emr`YM7Z++zmL%U54oqj0mw^+w*tlWZwvp;jS{l|uy-2y zQ8fI%zqxCp2uc%O-bE0qDj3-(#L|IQq2%5_0k8;dJ74b^uv#p&$r4u_j#{;ACv;5j zCvAM`JiuOHl`1gO`u{W%1cCGnPPGLqGua#zyosg&p`Pu6a65MrC03yt5e;z`k~K)y zj;vj`X|K`b_IC8KoPr0Y1!4B~b6;!gCpPyr<~B`l;6;+Y;~OJ;CZ!3$Zhj5p>3w0h zne?uvHpF66i@g)9kAvf9k0ajSW}iI(yY*<#q9J)4m7_-^cO8FUySt7PIXE|@Gl#63 z#~{t?*k#(+#`6{EPVfHcEfd_z<{O8(1Jy|3TZ}T|j ze8fEG`F@VKgJZ^VnoF4Emipb;roU`cN<=6^NKa%CPKm=$rebQ$ah{b~$15I3Ua#Z* zczc%ewHB@`OZb9n@Kv^nP`s*!5aOgho{0i6OFSn>cmoi+3EOYj_DLHC_qLGg>C5lX z8^KvxEHD&MnrUY5!{FvHZ2iT%)w>T1Hru}Axtmek_GD~EibEiEd&GyfYGoG+eU5`r z1b5@AYqjR(9g_Rpd}jftw9!R_Q;u<5#(e-8L_mRBu36z-Sk}BrimDv0hs0rn3U{t|KfiZZ zq&Ui*a@l!aJ2w-mpjQ8py%LONykn;B7A8tkX>v1M{c_zi6I2l#->aefjBeGyzulw$ z!4|tko3L#p;Wu<6OjAAm@qOH!hKYN0pi@%Y$I`2EwjaAlyMJ**Ghyfx+)ba32Yi#%O*&=tb@zRb|8%yTwg#42)7t#=x90 zCr1x_VNQCdtRx7TSXt|t*R!sdzMj|fsjsV^m#wi#V3rQ>TzIc~KlpgWdB!|qp7C~$ z$FJi!V$O*p9`A3*dEyu*`~|2qy|+_+ZTpFo$}+V^&Q+U;09M5aB}FAYu{Sjios0Q4 zUeBzYsd--G9P^Fys>vD`U(y6s+QRUL zn&@-mOl4B0OMXiRX))}QJ^AY}hnvyx4UFEVyJ_-ZD2qm~ zN9qOu$)Alf4KZVw&nh591+}O|tw6F+;XGGOZ&os3onV~PIvFqT?z(zLW=#aDNUk)s zhXPN=LJ0^(dcn6eL5W|GHxDFAoY!5jcou*#U+2&nP%_)hXt!JZs24Ozl%g~l&${i* zG#F{BK$`9EbCDd`wn;@y-jxrev{k?;(5o6ESd75nxKamdfXdV$6eHz+Xhahm&ZG=T zCp)fDxa@T%DIK)@K+85uwrjgMr>B{vZvS{k=9L=X7#NTOES^+JDKoS?3VYOMFQaId z)d*tyVUlb&wB6HXY6cY+skQm2!*@nlhgF*zK`}DG;b2S7zbg+zKn7Ugh)`9uNzlFju?y)vn|wo6x^WLs%HHh@0kY?pLP5qL1DuS3 zF+KKW%E4Z$1AwT?S{K&E*R!5W&nKQ2)>D!e-4s^(e${wg0gmtEYqKP$dYCh#F#IOpJ_i;>huM zpDXKioqs;AtO8yaO8iWW(iH?^QD2fi);Z3Pzb+Or`0=mL#~Y zb$sY{WFP87$j(>5u8F^OKi-w~nqdkq~|Q z{Y2cM_tgcXYE$O|Y|7V~5M^JL6as~T9+ z6l&FcA1N=z%}l2tPC_7YL0Samwo};4(s2@eKyyxT?P0BpNvaX?G4`J-~b>Z?8KMNs-H5>$fkDl|aYW1*15N;~D0e4b$gK6s>#Lrxe7)-PE3c*3RZmm`Q32=_ z9@P7ZUkBeGaX!X*^6mW`k2&WUXUxYjA8$O407+I1f>l7Jo@;%*>hqddi(`n;LX2s1 zVl`Vp(NRF{nBC&&$WaX&hl}J{W9c|~ULzlRdoAfbljY6aSd~xYH{phxkSib`0wSC1QAql6H9R1Hb36I)vK#Urj_}2Sf%75x4OK_6c@1 z!5jMH=kMZ<&b;Hd#Xa1>s3Y*EPJvzdwB9*@>@@d7-LDYB*F-M7 zYIh9w_OXsqE)U!x^L5@Da6zeRS2ylVv*Uz&8IIbd-?Aroeh8C5MJjub;P;d2u?xs; z?h%n`-*Y48_B^PFlva8CR#lNz%{Ua$17IX0=t!-8{4Ky0dr3r}Ap>Ih1xSExk+!f0 z_N`M0fvD2*rztD}#E_zQi$)MkWmMG2fshUWT1iSZI0+K_ZbZ{C=wmN*VV7IT(8+J3 zsi;csED|Ey2$uIjqjgozO6?a|JFR2f7I0l3bo{k6rc(QA`PkqaT{`aXnK8C@dIx=} zjmeF7IlcVbeQ!Go+w8xmzwTNZ@JNofB?i0fa03tav~vl#RZDFJ6x_QU1fLLH~mv8IT_!6<}LT6A~fvtJR_#Yh&f_$PgqWXJ)$O}w4+*Q{TUAjVvOe){A1<) z*@QI|QJJ6_$D(bq_pC2a#<-q9v1e9uFNN(qZbz!Sa*W$JLEY~q>_rh&cADWn zOQsOXHs2&T7}d_WKS955-?s!}7fAiL_`_D#7^61AV)IztSZ}Fn^F-X}wu>s?HwTUa zP}{$kXlPRzE$en%=e|MJFNCn%BYIe@|9rn;`@Suce~GdJoS@b&^DS zPEu+iWT0<;>{0ohf0&9KwLsUYBXtEJpubXhT)e{DC=r=!%>BFwj@V>Mi@F+x_|>s? z7A(4}-)HKEN=DL#VZ(B(yV_u5D_^?!i6o5Dg!GvjZZBzS{Q_4)fbaa{!cBBpViA76s5wdzed-;RRfq@NGr zWi??xZv5aA+7(z`sDEoJrJkT~Us@aON$g4cmiCy1-Wp>XQjI%YS(S{2g$ z+n@WARkJ^aR!ISsrGQk6WU{>hgdWRwFUzo|@1I@fJ4$zig5dE&*~A^7SlgZr04603 z#Abfn1JL6fR%N=YXO75^t5j8pV;chjAQeMW1tBFzDTg(wgm2FOKXz>Wje|J}Af$|#tsF>k zMD;ZVwn~+*uc8a|Kv)bIHau#E4e$sD1E$ASQz)AqmJP%Dri17`Y5g_#qmu+I>aHn* z%1S><*R3x0NgQ*K8Y4In6JsLCX$v8L^g?Cos`bj}YrQT#Ki9SNdMYnvRRj-##4+&4 zTm13P^KHJJaSp!yI^sO$+he|+Jm#3kmY!VMtP+KaU@P@h&-g^ZnYyusB$p6sp2ySRqwn5t!YzJi{0RFZ*UjsFfjAK zJiu(rxu#H>Q{eYWjay;%14+g10&&wX6mVY21v-x4n6v zy8Ea1J<|PQ9O&;30J~4o8qfCr-Ev8=;boOs{b9j z9klwts2z|yeZks9`FXZ9#C;O3@KKOWx#~J5& zj<;jJo%8K2&PmRQX}&_9D!fva>uX&fuj}ux{Hm{y_4h~q^|2-^OC>GDo}D17%`yk+ zJ)L&%fSmML`v7sXZsZses6++E!Q(OBOIeXQ^Lmt4+E^j4YmFzP_*YbpQNjl**Bx*& z6Muk^jvRPHjKQ6L<2J_Gcg20WJ0f;j(7sXKQ3JFyNO{7(?xM8|SIIRmf}l%0VGG#1 z8f~)Xj)C0eq5rrcd2CX9$H4xDH=<@E6&LEw5j)dtB(v$|yRQBIg>ICx!vpUW;1Io? z<1BjsZU)IouM39bwqWiJN1zG=t+1+UtmwP9e~SI6?$5G;8T*g8dj@^UJwJ&12h8GE zC*}?*yJKuZC7a&x5R|;9Fr`FHZ)Nf9#Wz>b!W%&Mtg|n5?QlWvatD4t?&-LYBfA1} z2J>iBCzfsqM~GB-Ko^s{dn#lKBQnc_MUJgD*z>aD5)NR9t0i=hhYdXmjEz^g178<} zyR`D*LCflUn(Ur9`6je$95?ttjKRHK?6#Y4T8eu-5s->lXeqs5&(3i2c6HQ4Xx=QG z$h-Ho%S|&?4H&;M$~QZ-Z$O_ncYVABm?lagY5n+0B59EHQ z1+VQ?&v5wFS3hJzvM-Q(@@m8tyHs@e2_VpIL+tX{S@;JTjQt^{5y~y1@;i0fYMkL#4h}V=yzjlpv}qB5Lc3Hu`JWXa}3#hyjpMxtEpQ zJg@Fp@Ldnx-+GKFbEi^Ol~Sg2ges-5syJAs708rWuXZw!W2r|byV{pM@(^D70xvmN z&s#+Vy*}A-BBU1017h@*9)Tm~mC0>PtxeHcKU&*Afg_|^g)vd8V}^Qy&U6i`uqLu3 zcX}gyY04I#pt!dnF$N;5Y+!C4&1Q234n%oKBivC{4bGkP_dr?4__8&w&^vhc`1dZw z_QZx``pq0V_t+x651@}ljH(>5=RCrn$O`%PA@Yw$gc~4(=*}lh)?0JejiPF+63rM^ zb5yI>`iL2CgePN&R^Q+JlA+4B_5=`|Eeh9SAGC(&))U!jBCoZ1)O*OQoi7-+U$V4! z!WJu4RcWl*z78Jx?H!?@fxn#NOQFg#4bd5wyY0t{v5lQ4M{pbrVtDCo>mjNNC~DOz zrI6stdVQ@dAS;9g%*h!#ALE~YobLx8kK=L9<1y#2xAW~S&Lc)}9uWs3WO)U84S}kz zzn`zq*YorB`H`Pb{eK_V|IYj!IqP*viG+fcg}87es&GEq4l#OQuX~wW`NRf@_f*En zEXL$W2&LjdWyRZLWB5ciIGXouWl!xnG1U_cmclTocInz@x}hQg zbQhm!>r?C-p7#|IXzhZl6QRjo+%q!nmUywaB}xXTp<*o z8YAwZKWE9Y`_1SN*j}Jg`ANkzqoXls^V0&;jfPD>BD91G3RuZhOPtd)Y65yWqtarU z;867bs%9TSFo;nc!QpiXq<;+55JpwR0Q>!Md-^t1xK&9`#Sz8_I}taSl}mwbdTdZ@ zJYTJgzxB_7Dv#p%>5x4))J0xIiQcYGNpy$IOr z%8#J6mvYm91L#h&x+vVI-qm1!_wCeJq=_$6Y<}^r<8rH%!C?aDo@U3!8@EW(6C2p5 zZSxbYHS>%D5D^36u5U1=w*x79SDZCXR3;YkD__@@i(g;Y*OgVMvYHf+w>b~Jzs-}s1T+T5#A7KJv+y|k-W@{&2>TtldP;``nl1}iiYpDy!>vp)aAs5?YZAB? zpv?TGU4y@LJ;Q^98GH^TbS)%`SZ|t2fSH9^m=$w+?51FkC+~nKizH)RmruQ&%RIp^ z;OfREfh|;N`M-uti>MQTLM4vqijR#B`$}pb!3F{SKe5+iG%vLAw$x9oaXLIC)->n_ z`OX2`c3%MO_H0qz(FtW!NbL~Wh7I2!Zr`Avm=3@uHPIL=I3!_Pe|pk#>{312uF!m# zPbu6p3`Uo~UE;KLo0*2D^}E==>1J)nAHf~_?T-Vv$bd;{SGhtq&94MjsZdL`1owB{ zr7^DG%$MLQCmr=E58SleNs*-Wl!0V%B73?*8JyrM9c1rYkfHe=-`)ziwy!A+i-@?> z7MmVhz-VPWQnpo~hmTU8nPEv)Oh6P0*@nd3UNehaO_6l~Y}za^O0l(8HQEZat=_(= ze|(#r$Ok;+JVOAeZ)A%0;odwEcEA-!^b2xt$o5OskzF^`Ko3LcyS>yr2>_0p;!oK2 z+}=nn`R^fNml;OuJ@5c>0O>)7eT=BUxEsQD`ip^H1%qhKW+x7z7zdQtJL#NBxUXkd zrOjme8dS$|3{RlC+OrO|`!+=L$@oEn(r^Vdj}(5RumeU*3CZxN*JMNkK}OJyFr}(m znYik8;mTU8){ARd+M<~#kWoVt4Qcoxi>RtFQOR% z(-%$WF$oPIv)hCv6~deXfvT=M_m%L=?7fSw1I#5wpA0ZlZ6Vk|fj1y`TWm9dW?b(! zk~vrN3j3@U_8ObM&taji?4@F>4>bFyLV-`}J|88=8b9|&L&0~+QJ3P&(YfDI+uHI z@i#gLH_B@V;64M!H!^d8xf87G?q2yy6u6{xle(w@NtLQV30d$s0<50e4$;`kYe1BS zx)B$_XumfCf!*E~6y{~K6j_Sk0;bEhjeN`Nc3Cc)nNF#V$o($+B)3QgKeJ$CpWyU} zo|=O9g_B=-EBD#C-yD>GdGf9X??s7b*Iib2M&JE#pQ!!eOs!&9*gQd}xZP{+6BJUp zU?tkze&5}W_;v}{*U?`VeJVRO>`^ohpX&6W4Exi{OkTDvj(w-pm`q(`K(10_5WzXa zh%UwmVuaT)%goPOnM>DI>(b>VT5C7LBn<^|%s9_DCf^^&<1Nl}yuBUg+c6$T90$i7 zJU9;cfOw6>s=8J^U-|L6{=Qxx*XQ5Y-(UIHNB&jyzqvl6l9<4(^2c*MbM)p|_=%}D?NAOJ~3 zK~#|yas7V271qKFB3MI`R8MLwc`?cc!lQb8wGbkYuojA8)+9#`(7R%{5o|HdsSuNJ*?ry~OQym1dpJChDyh#0Z5<<;R) zDMk>})9E{bQ2|bszOkh*zL|{nNxxeL*m(jfMvT(xxPQMiHACc*RnS$kV$!nS1udb5 zDgm~Qh98Btn913rB~{TA-w%(|xf?$05C8}q?FC|9>XN3}z^xo$m-TyVS5?qkEx6wT zB(NBRLLs(H&TyVA+UGbZo{EB2Y`7U?S?>|VF)txArAYf(*>G3Q(y3||6`m%*VGDWo zj-wy*uF}dFZG?whL3>OvyBP9(?>8(l4sDc74Vz5!n>_8HOLW&1P$@}Z_z!oPQav0B zeD{8Rpt}o1!Gjb%*D^W*bl4}6MwK99Lf3}J-E9ID_c93&s9~0g-$-rXLX6U4%d8M( z_ez7F1>+7+;WV6L|LkpM#s0c(MD|#6TeFoDV=zjKKCa(|nl=Wqo+CiT2*wtX4@5AC z(KFg+giE=UwG!8*>snc=3%SgXauA#x5oh3hjK^c1kMVen_xI!Re&Cq%e2e3VaqQya z@FA|(m7gzM>-q6nU+eSp>*FK;{>s0;@~^D_j{0j>7`PLY*QJ$sB`;xB4f33LEW|}1 z1L8%#Bi;ouBA+$pv7;@hNW)S`Bou;`U>pz%7w5qFJ`~D~b3Oj~2mby<0r46E)G4;x_XwdWwH2Uzsj^7)zb`0+*(Hy-$@7#d( z#|?7F*%+@IzV_chphnBihFroR5(+T1-5*GD)GpNl~<5Ew@* zC8|t%#)x)0Di=-rq45^!T7D|_1QdP0MprMMkSv3S18*HIQ(6$Q< zFk%FQH6y&w5LHZM*1AwjT8Wn-Z#|a*a=B0#gX835jxljQ@ctg>`!OFAk2%k`ahyC) zZQnH2YgI)mzg~K+*YA(~xSpS{uh0C~-_O4@{;TR=WBqH&>%#_dBxb!{crIL}RY)kH zm677R@&nP1Bou?^fn!o3EGq#^_wnkFh7Pd!lj^(%Wd+{rIga-!8|)YChhRv5kuqVtJ3M z*%(u*rt{PXQJXBKsn0G=Td>jgFx#}MtB@W0wZV`P6>pE9E&lo07H*7I08HokM|S8o zxrj}@xO8Cq%j4hw!VUMj9LLyr$KMb(UfRi_D-22PrV4D)2hh>|yCT_!-2@O3cKW>A zci8O2ro1+LwLcU=aIn^Xcs+>)`(qb+s>%}olx8Qoy8;7% z0pa`o!xc_D2sjm4LmH-4+QCBIfxyirwpzs1xoHC4I7WqpCsS}UgG{@N zVGClnYL>HI-x(OArF%YHR{m6#9V2Q<3t6hQvaLqT%L>kDtGM%w<1yae=lM9!w{skG z&N=5n21IY&k-(L#x}Gn5t^B;!bA5ijK0aQ*zx1z#|9ZWCQy;VumZ?+@)x?!}Ej&}D z=CMi8%()q3c8aH*kEn!gXx#C{Y*9_54 zA5Dd5i(fi$?jS|nO@-)ke0%)v56xZtatnYO!#B_CtJVCKzVEiDg4wa#kpCuszppf~ zs{%g}lc|z=$q=wHygv_ZiQH4&;?Oe9E~D9KGzzpTDeL3Rt{H7A)6y8dUETR z=u*Q^E%rz3w-yYU&Qis;w?dyt0BheGLKq{mTS`9Kx@*|l|DnQGD*%c1hTOP=avNY9 zMY^7VR7hniSLIdf%C&S|%ZM|;lT{coG$v#4e2mBYd_2Z+jN>uKG3R;CBZA>VzolCx zWaaCn*Ogzd>+ALL@%8t|_1821^`-y5^gHT!L2x$O+REneSdzuzF-qoHs4*AH^pig)1*@1nJyov}jpd{eR zHDdn64gHPa8fxo%+=umxL`e(|4z>4b+K^6LtM1wBu3ej*6etaPa|@eA?5?!~DZ5l= zD>(=-B9&6wD{R$LgR=?(O44hPGY&T|z=;?U;R0ThoISLrKANeu@_Hr~@>Q$+H<%_A zJuxt29^>td_g~}jKF_z~e0$8d^Ee;#ID!wwY%$JCR@Iejeerqa*Lr?kpTD0UANjA3 z_19PZ_0qpa{moiX1_ojPr}Uqf{v&G=Dy6DeWv>%}Sua-hlyzqOSqbs&9hrPo<>Gl- z>?GTM_^Pv4p>O`q_H84)OJ$x>i;u^YRw=K)-v0S6pz8T}WY&~kS$wXvdch<07crp7 z`g(z?dW?tW;V#Xvc9M2EDHLFp1FCY@8~rgF&4HC-)qo;mMwo@{o$?S%!&#oC!lVcI zyFoZKgzvg~cR}v~BeTh_tW|YeT>@TcXT+)of{j*umjVqH)lKO==h$ffZmDI~F{a2w z4;bwsF^LEaU|62QT>)SZi#0agWKIx!NsGR#T|uh&;f9M_Nz|XF_s?uwm7c11JgB|< zbn`sBk%zX-gfc=|OO;T$IXZ22d;{F3^4-3*n7wMNO|}NpP?~LI#5|)^AZ1-%REvrkvyZMCg3-3B< z(@l{|yYt3Q^ZO^%jtiy)Z?=zQwCQG_5?7P@me2c3yOQd`+q*kplWK_(>{<|(?^t2cWRLWdt|a9s^QCBh&Pndes82y$(H9KD`P~K z{4_FiFH7K@Gu7r@^2lCzdARzVqAf!pR93Ab&_0~yq*a7CNGJkx#(a#&V~n>kA9Ktx z9>@7OImRAW0;QHYmUO-9^UA-U*T;HZ>*MqFdExi#`kne0@tX!x%}$Kc+tQ!FKOQk- zMh0(Pg&pmX(j~l~%EEQ%TDV@3t8%dl$5E9$4sr5;_Oz2>N!C;2Ft5VkjfuB_+q(oM`ocGD(c!D2>1zQN3@K zHYibVPf?$wZ8td-al0ZbSjFj0p*>M6myjOmvfZPvG+Z$c?5__H4hVPSz#R&Xy9#cS zCx*|UmzN1bxiYxV;|~^Pt7@EDHeDNNM|YMgWDa`Vv;MIe&W^e_?~m4thxf^Bw#blw zvqyJ@0{{`jlG-hE?rikEGx@$k9r(RRkTwkS_$ zLcCn~Z)CaG5O}V#AJHVyRS)KF(u~3|NJglPJ^>)5v>~JrbiaX^ zm4v2(z#K&89PZB}2zU8{LNTLa7X*#I>-&|cYR`0=i-=N%xlSj8UQXLr;Zbu6 zCgf(6r)&Pz;>>pJv{70{`0uX~#)fyda_Twc1RJ&kcSF~wU zG6{S95Jc>LkA4tJqvMy&8&guDJeOdNBMeypPbqiluz6nX8jZa5xBUoPDOH79RjagA z%Uu9Cu(Y#2frxp;`55yt<`MIp^O)m2=5cTiU;KnZt(dO0kZXNDUtibyeLcU{U!Tvv zpY{8N-_QDs`UoudUW6z

-ztrTEVSfBrcqjuCG&uf$co!c9HRg3qh2#LBobR@O>h zm#)`%|5H_{)R=)2b6TGd^^8elU_(cS1}M?HaWHTks0Wm+oNrZChh}CKw6uQV@E#>( zz2q57UX+Adsz6o7K>_oX2n;Xd02z!@fRnmNnxfeAIEB41z}&ql2f)6N4hr1EiqR~U z|4RpP2|_C-It<;MY%@GPU~U9N&>0bXF2PLN35>OIsZQ|0My2=e%}tzuR+LNrZ3L#y<7F;^nfXnG006 zI&M0Idoe6*;Zd!nLK}LJ!iomwHhtD@cQJQ&+p9}mr%|Y3+ZI?sNM|HrM#th=9MK=t z{nlVRAoy?ZP4NX)PvoY!HgZnym@g!>*y1q~4*|r=3h_!s@KR29OM@dK0;Iw?w;*Dm zLhcs0CaS(<*`_p_{AA)4skIY0u%=_}muM7!s?{{`HX3MK&$;tW^djIz;?@I6}Gr;5?U zdG)~Acku`1hg7nM5`10O%{zCuMXiq}#{P66t^H@lEZQ#?U>#tY+_cK2)eF%RKBr${prg(^dUicIEj|2aB zpMU(CQ*-b<<|8XBu<|p}_AEeUt*l(*%0nQTD{-w@$mhZLw|JbYLLNHW-OjQhI~LRy z6102xUF~=$y%L!!9)haQR7&TncaE%!KqR=dAR&^`OLm^XF@Q|)L1^N1q35e$WJ(O* zbsI&KvLU;tlLdlHUVsaW*R9KGch|~@(LugJpnx#o?aD+Wlv#(7`%v``i&- z?X0o`PBclp6QLDZqj8rRgCfKFlitq*1|w{X4@hN)2~yJPLaDE8kZVt&_SzLR9aVrF zqhb}w%VT=!C@+-`qd>_SuZRIeA%X#S5*6g^sZhlzH*EY&#@?{DEBdC*T&)SnY6V&W z1+9|2D3#1REJs|W5j=@eAQXi$Sg0eYR91T3s~i5#mxTyb>_^e2fiNicXW-T};fEi! z`&gA$W2dL6dViv|EhSAMmGhWVWhJ9ng(&weXOm7&dV$@n`1X%t0jaDXrh#lX4{40i zhRx*r%HNYWUZVu8o{nnzZ9)f9M9IEo#wvAGBV!jlcIC+}1(KASN2`vx)xQ zLf;v!*TgudxEqKu$Ct-ZEiR=pk7Byn` zlVWuI-Q!Sj$>dxB$Ql73$3c$WUE8uZ3mNVX&_1~Se5PO|o6d&Rc69eY{=R5cJ0{Gx zSF|nw0kGQfsm=N}LDUr*ve=Qmsson^O}8VsyWef}Lk zI7iGgI603o=NNOwdGHu9h9innwGx?nUiDo0%-7eoUhDP3=V$(YuD@RTpRfEKdJbgh z9(#JE{*?Zi`j6m0|Cqo29KZf?9Ph^*=c6QD3ps$|Bqt-W2wE8Wk|eCEFOKICk1O6@ zd_DPmk3Zj5E<7F~;GwEyOx3`M_Rn)4r9%Z(iZP^Ogkp@xgQ$egUr^PmbrjwtxBQ}_ z7OmkiSC&NCzwMP(d^@9p5N53iwV>Y2e#8jmV5oMH&4O%qDjXq_HW(xIOT^6PYJhcdN~SNmKV_`Hub}H>LWs_Ah94>s}5MUBzId zS`KO{ zn`j^icKuaIGOb`EH=gXaP8ODwL=O_Gc`jA0-JEPyyw}fwQO!izh14u^q;&~2VIQb# z^(-h?4yW-Z-NG{~0j1K5A*)JlAB1J{8d2?fh!Ge@kymoChVvG(GzTP&K((pHQeYjo7L0ZkxcN<+mp#3MBxY?{^dvzGdl0&$5shi)K4BVur&^5Op4FalO50>VP zvpS#{7;No?3xYr@1K-7!YjPv0CXIlqG@LOYy`}bkRE&mSqGB>;#E5amoO8}GjyWGE z#_)<*ibyG|u7%9}y7JQ3*X#Pao?rRb-`Cf(KCb#J@ez92lhs-VaSDHy{vo{2@sB^p z`}_FgpU2yukMr%EcpOkF7wQs#W8er?;(}hKRclEkaw(8sIo}n}6<5aV!t13!R{Z&A zl~~F1&=3SvX#@wW9~L)v=LVLiSf`>mXVjUc@i@+Upk4yk|4-K2G)a==SYq!1YUb_{ znbjXNv&#d87YhFxul&8-3pukZGF;AdPj^*DgqxWHj|V_KYlYb&)!kW{5gzVp3gCS~ zdJ87!Lq3@RBXFUqv{?}IRPFY{W+e*n&RG;`Cb+{BMvQvjWJb)Nz_o(fiM8FnK7Njc zMiyIdW>AszmdLt%fWTTIRt|N`im$Tv0sP#ARp+%?A@vP6t1s?D(3(8FI-LdQ6ppfH z)Yo|XJEUn5?R~bb!65VuTm%^$%{)^e6l&f{>$_pS?0OkVGX+Z`(O$XNhuGKj>mSXL zI6OJmPhkzncEu_8=9aG zVz9_&(E%_W5K;cyTz!U1Sa6GK2I%dMATTBU6uEJsKs^FBx>aAO=2s+Y!XV~CYnGOm zOV_}LhL-sd3-u&qM6uk2uKHlRgDEhr@g-HqCI}ey+DvMRTMe%rK%I-{KnoHEX2QL?qJ{Jp9v7u?s8?)IasUZ)k{rXh+1SUn4|DS| zY~SJL!xFWqh#8@C<~8G*^PJ~%o<|&C*T-l6IQ4Pm=gbewXF;&&$?7J(Pky7`HvV$= zZ*P8k8@IQ8f9$^RBliuNjKB?f9rNqhzBwta!Xpb%o6{N|Ue@hoP`h zRCp*C=BU+f^>gyNQ?Q^?HJ;fY&-xpJAU9XGS<`E9=K2Lxv+OO1Rv*rFpo%l@KZthu zi>7+^xYRRdT2>BW35?cBul6vzA4j!m(WIqFSF;5|h0Cl;fPQbgUu-c+dp>)b&c1G8 zoyJ$eTuPH>W+nI}WvDe^c@ zz8%e+gS3=pztb?%(fFek&y$sQn|*DtClO-lPWoO)eTn)E0uY%Yuc=EwQBB62Y2a32 zkW|c$b@1#qp~k}^dnHa}kO5p$ITf;nppsFQI!C24ln!PTz@2^E67}y_ou+=L4yX^q z`dLUCfk9n;9x0`0-ps9Fby0WxQ}rR1nIZ}lh5Zc6>v~x%BpGx zx^Hs58ks)8<&J6%N3|)eHE}QCNY>F7=)cw!Mmtv}<5n?2sjS{>RgH4mS6focDS}j# zIRwixW>l#6I8 zWi;d)b82QBm!`fx&g-1#5nsoQBYzz6?B;n*?Zkxu3faVgGc!H>K0@GE*m3!_?N{!nBGQG- zw3Ke*HsF?U!zM-c((KhL^e=z|p724NGT&}DXl}war&71u$eizFNDng4RA^=vgnpJ- zEu~OSy~$9K)s%=j9ZotqNEs5EqR^DqS{;u`q%smtjx5HXqh!47HBVLe7xM&wGiKom zKso0+WpTkWEh1*ifzWM0DeX!F`odrOi`FgL`@CpWBu4#7pl9b6@)*0R-L?_Ydyik2 z?*gD+H+zcrYH+W7n_c*AFCi?uPlBuqbg-(7zaDKc!R-JWnq-GVzcbc zu?aY{B4H!a%5hQonL@3B#iq0lcd6UX)*2XJsiFOI*3-V5$KNyn03ZNKL_t)3%w}3M z6o#p?$Djr>PpE$EOalxIim$}YDj-wU2Gj(cs1y@Glr+_eE2B8#l5b|GRMsSkOt=?@ z=12-Ad+B((|1ir4qLK{>^gapDQ`Zuq!fH3s&$&m)<}1-KqQhLJ)2;?OWUM(SKudwj z`kj7xWsgI}_pid+0f?wNq1Pc^|D)!d)zGfQ?lNySRa^S(+1B)0;#S{lWHSru>fZuO(Zqy-idYNV8zk(mWZma2Nl1|!U zZ`_RzGxIUVHn^FO@nUBrC?cm28ONN*HJ|hNaUG$rXMD}PKF?n#KSKv_4xg045EzOF z@VK-azP@#go(*x&BAw>$Tp+dedQ?SY8)C+yUXynv7#8qk$_FREbiKG={~kSJvl~y-fGODhrh1&j0 z6|TFJfvAo%k@v=-SBs{Oj;R))kP#_s@idF4V4eKewO-p*tJ$G?7fM~IqxZZbwep3q z`tg=dLFB02;?|NotME5cYqefIq_1r!{XPrq_z5j^OwvlV?DQ)^+-aS`r>e%A7{e$enqG%90CJ20aUJ zlNmxR1P=Z2EmW(Hb2SKS9x8yLwKScuRY0RH(#M3Y*5EKz?RCLV^|sT4m@2j+mzR~n z7%FQ_3az|iiY!htfUyS3ivCfymo{l56K*I=(h{$Ar8je6)>M-j1}mefF*?8lZK*|d zzYFnJ3H%wOC$Fk;Xd|Qg+iSVK%Co-A_&uv(%_wWes7A*CnC&$MEe50B`odc(VmoW& ze7^47YR{d_D3Eh~bZdr@dNqY4Bw5(oM9Nf){IdUD&82OWhroy|FTe(5PpCbNzy$P; zRW4Y-PytcJmN!*7R{Kwb4X4xG-QC;>W5{8-5rEE!nYyOVc^+|o&Fh@kIX_Q*oce9X z=Y*)KY zJ_myte2lT@Y8e5{V`lB==A1KyAw@!^%g)wm2;f;<+=Qdc_zP65QeQg4Qrd44s1TwD zKNuOM^z4%-6PQUyCJ<=2G8b^u7(x+2 zYYJXH`a*OX`-fV!v=n&kdjUX)ldiv@TrF3jtLUU3FQ};N@!IRq3@1?mqu?v(e2M-l zhli_57?Q(kAz$$wwR@&ccnheO|Eb30L>94@%1lk6D6t5nG9wv=nb9aLl||y9wyX|9Y1)L$8cTnen8Hd4)Xb#1Lz%NU8r~(Y9(5 zyldvGW37f!=wRAdV2dpiGx}6ibSnVPvU)X=R0Vudyp8K=RtgxIuV_0+&Us9fRY<~7LEdATco~?0+PB541uX?=d z`q6{4ypbKUiG?+E{&XAk%*Fct>=#+`B=mR*Gb*mWMAkQI(7#`gRt-UerLSHMzpFas zD5;Mp14wJPg$n)2wVp!Cq@q@)b!7)onuP40{;>a{^HZ0CHgjZo)U=ZP?q5 zZ;$PEx5xXw?LKbXc)RnqbK7j(IJO}(j-fHQZOp07?Y3nEWBN3|Y@Wmhot55e7qZBV zpaJNZqFl*gWtd9W9RO^Ka|jDfS4SMS7U_{fKE$}k(u=57KXTe zdkA!!24sNG2q`ILo=K&OoK4`WGdTt1AgtCf$ViwmAd>E8N&|)xV4aAqc%ks`~PC6rU4THLzExDJm1 zDJ#39h395Xp;y2ZknRq>>ZO(1xjda_Ry!j+>sCt2Z6NaJkS3{KOm7H;0wFOgQlcuQ zk=;^M50b5ce2Ky9rbz`d!J6Q_yyjXBb7Rg}LvjyXC4QaiTa5fCQAus$yAGlA9VM8nNsidBJWVqbyn~Q4rj`h20H*RXf05Fo%U;^-r@x-b!Uu zhj)GbLYev}D4BTandR%iXbG&Vx%S^}XGmexvp|)qs{w{}^j}3~S-7ghf@7Kgs%fex zvR&s2K#Az2PN`(*$|MmPv(*dz$eGqM(oVckrHSKr0T@Or1%%OhV>vA8wn| zYz!A#rCpqafVeWw>pG^Ut~1XgKF@d_d0zQz#NQ)NU>a*7vLjs>i3jwa`OR#<@!R{@ z9`^XQ-|l|9-^afB<8IrH+m3Cpb?c<|oscr@k#Pkt^X)drr`>4RnDJ#!Oe8YNYxxMD z5x0mPevk18vy6y?6PAg*#(dcAF>m6w`@X|S_pmx%*=$xRQs@{JrXQ9=8Dr$*ZNHF; zu_uChBO*fgk;nWj4w9G<#fki+uJmzXkGyXzm>3Fg?LzKmh|4&FV5Xx!_PVqf6bxIE z!~xxCmVokdFZAEw-iNVT=5|x1(rB5NV5UfcG=nx;X0kRop`EBAR_ITbT5h$<0ETK9 z?@<8&lG8y_!NNf58m0NDlUQLR6_vr-S)D6)uV$C}+8Go`?;*DHV{>e`Ip^xB>uD*B zsG|``7bd)3>Q8vbS`ow^i&wz5y8DT~$wYG%Nr;?^Qw#@A22+u<#Qy>=MNswRUB+|e z)`RfOQUN*EXIb+Xt;?%WZ>PXn8&T`o6P;cXnRZK9_v3_!acnsP78!$*Tq8`EGSjN* zy8^XsEfW|SW#NOfg#%^D^2`M3$v|g{MV4j^5X`KGjcgqf)(o+-N<^6qQ5w>Mx50$b zVZB1jm|z-4a!9){QiEBBGo}V|bC6LklR?lfEYX^or8EfTl}me2+&WaTInj-;j3^^Y zQ~-!Am0GR(sIz9J6L4oW4h4kgYt?)Yl4iBMg4r9^>oT-zsezJ~{hR=RpLcg3u+`AK zPBogELTjqU7x>0jXC*OJe%S`=Evvx zJawG<^~{f%&&VfrvP2fuTf&9g%y;1XHtstfZ`l^k_KAWFFZuid2bhV041QtY{&&j}grU zELfV|y6uJD&N&-05?8M(uHm(`v6QL$xMG9Ne>PhHU&iS0Jba-W?EX(PIUWiC)CgfM+w7O4=fES@&;YAca;KJ3(r2 z=_bw4hgn7K8c-8t2&4MK1i%4QSu2f$qy82<8Wi$s{8iDtK^l>Uu^_@1mep@xuFq(F zfB=>jw?>P`e_C8-B%B1S5cbyntNo1&^sM={&^VPE==bR5?>;)LbNMO;FD9VBH=A^O zP15?^boHteS!(P;e3`YdrCRCsIHnf3n4luAT0D@MkU{|Lkbovb1IbxD{WjGv;ojGk*47=$?bRQ(4d)I zYq2Rb%8}LZA)*gqpQ)P2T@cb+T4buNl1fA${c1+4r%MEB9Zp!W1jz)P1L#%LR6WIg zmAwRcXfzW)sRnF?Vp>`SEP$r+VAd^DuhkY9q~f4*;ae!FN#pjaa?oTXVafgXo!5E^ zwqSvJU){PCEk*YKK-Tr4FL&GPoY(Irz!rH(CH`qsV1h#S(49btDb8{O7oH>->4rP- za0jrtIy)6D^DiuGLA_|SxAYY>Q1ygn4Fpw(l@cLkt$VY&Pq!&e3(1sJrZVY%rKGhL zrc^-POz@JF$dd7wnAvO3i%nrbSI3Y5#Uk)ks+o|BzV7jM!Y(=a3)^;-V5u`8%5PBF z2z9U>9M(tLBq|{{37%9+VU>7QMls20zjH10@C}yLyiM`1zPmov6pf9XXc=>BB501G zuk5~6DJ>Caxhn*7(5R%1k`;BfA4%8?7x{@SVIlTQFo@SUSVF5MQPZmpd42MQq>)6e zl<86NMRZxBUMi5vM0TMlgH}n?W+oz|(!aBO-9jvn7*WFT(lu&{gI}#&iTdreyP4)> zt_;eq7v%{=Q76q(F_DoHb1G-fh$cIq^>F@<+c`g=^prI z`1au2ZQO5ud$aBC`+fL6{J#6Xb9Br!-C@1YVq_bFoIV6_-;`;4@G&*RlY8iEKKHjx zVHwv9nP_R#De>Ge0U~e8k^KC~cj@i&kNNrj-19ka-;V9u8<2Uw`Qr|&2tWDoY{!)( zN`r0`Xrmp3bxTsaHULTTE3i?T6S%-Q=M9qc|s2DMu=^* zR7(eHGip!(5;=gB4`>upVMA7M5MS0?H9+1O>j_!941y=xNoe#?6zc;{0pe~e^XDZH zSyyIpx*#fv22QHNO87vY*kKUy}6+x1uX59>!n@qle9+^w--@QG0pM+%tMQtzdxj;~dgnR2K z3R=l5Jt+E!ah#5-EoXSf=miKpoug}Pfc=Dw{05b<|&%CF;xgLYJH^1Hdb|3eLZMU)Aw{gGu?Z&ZjY(6&HP)8Rc zL&IsIFzbb>+IL9GX}WO+X7Xm^eUpiETEaiEiy>GloB@P;KxgFUxEZc<9>=_EMPd2WPsIzL1L*rQR2orl9dhPLP!QP z)n4^1g_7qBuSSp3eHE{Oov7INk}&*kzO1K%3-}~iwwk)2%hy)054f_=DC%?_)b#uy zrZMOS7z~*@uVJ`j`-I+uZ^2-yM0&C6#Lw0pF!sLUY>xB=R(1c?HhL@!Z&`t?<}iWf zMXE@FG0@TPUNeJ8GJ0&RZPMb}xl=gQ7;X*%R$*;Mb4y^jcid57pJ>BS zab<%1WnC^8QYf#;ObN#^kE!E|lu`8In1_7CEHCQ(MDUx*GlC#=7 zj$zv_o!fmFq>R?}9U^o_1(fR)uA*WV40%8VM`9w^UN(lc*UN}awJ0WwX{%0^UJ3>X zoXgQshc@ftrUj%7qFG33_G0anb5K#qbwW6vL5HM(*VY0hn3K#VTz{t>jT)X6?w$X*A~$OPxGP$}AVbYF7AX*Knae z(`bx`KPdqb=AM$(s$OIT+LoM{OzF%xfG5V&w!|hgFSi-ebRCKvdZaRK2R5tQ8P#VP z;obN6wjKbAFt5{H61^8>TBp87)mKZkSPcE#PRdqPRLQAjh~?*smLvD3!I?3soWg}X z1!OM>7lPy@Uo*IBsMgq*75;CO72+b?w z%InG_@(6t%c^>%{`1Q&!=`c(p>NOZm9MVmC5O2i$ZG7K(+xWPR`@(h~ZZ|BS=jH^lkuXm?H<+Hfrbb}YRznA%pw&9x zr{$5F$@6nwSDy2Fk6Y+DV~+2)=e)M}cf0MG#7LRJJIGS67TAn34YxGcM#ChKx#vhm zls!*+3sKqBbS-o>1QJ3Br(tBK)ey#v0F;@HNF%Hw?veo9pvTCcyJX>~}0M+Vr=S~RYkbiBR}l?gK^ zU@6!VFv#HB*4!N`@=%e8_6{+nnMNpwuS^M7Wf>7>wIw41YXK&5IChqRHR@~yIIqmK znT&E&u>FKDuwLkODlLaBvucJcfLRc|xu+(%0eU4JzepVwK7?8Rt#14aLoc8&ra7o^ zX6cPh$jnRE6`vpZam4dB;@h5&o4?)7ENEsf$Qi+N=GU2X2EL{54JEdGzQ{g_1c23<cYD9_akIyL+;0AO-^RZAzWcVr2Hk0+bj-Ab zfJme?BhO>#ibTb2pr->fj9q(HV?$t=Wo9H?c*9Pg?ioKWh%;~+E`OarCN&MybY*@8 zA_3TWp0_jZ=lDKhJ2dn5{aen9_Xo$8vaG0rGRmqNVw1bZR^mHLxundU224(5mO=)E zGBUxF6{^lzS3qT`qVLt+qwLTk3&Z6Q(uc{)qm(aeR z7bzv$)-rMek+LB&vV9=-;@NVRgr<#}ug>lm751jGXelf9r&i7iY2~gZoN{VFFh*h+3P{_WSL*AS3H`zFAnrRLnQe6J8zsxs zvGMcLafugWwnd^nL;u5T7G470s8+jvI~!3iu8~-J$F?E8@CfL4Qkyy&1?x6-Q|%Ko zbEaIqHMfFIqZMuKtwOmi8g^r{##&0+hP`ck-*VsF%U(xbfiw8y3ka6vfngSvgr7YQ zWDE0V@gK^7z*Gc%_6v<+M%Y9zg>3|8)d8z<&QyQCk5~~~L>L2^R6=1uPE5@o*VkX- zxBoc4()8_y+s?6b^Ki3fP$`QydSB$ z=JGk0UfZc#=uX~}|KVw{72Tzxmj=v2DKZK89?#_fBFE$iS3l#GF-a2A`L2 zz8Vye1|I_L(aCFdMg|_X`SJHpcN5c%Wb)&RkS5b8HM4px^Qm=WJ<4 zy;qqT=)IL0+1h=rPQO-g0nzd?#!r)a$##%}$ri&53bk*me&hn;^!mU6cX#V9VP>EN zIBo%p>@1ljj$|4VJZtR>1aUCF-|hRIo5$ufw@_yKH8DIt5C8SEYCh~m71XGuBy38F zF;q%}FwwAnY|w2s3C>!7G*s=NL~?2x9dguViW>4Hr9-A^m?=Q#Dm3%Q*T-Mu>n}0= z?e@z!|NMwQ-R;}XF<_j4c_CS~gT`EMVw|3z(tBzLeWCYNpv--*)}k;dvlYcBQP!VY zdugnY{l*`cj8)x=C8^9xPz^++E`rJ`0GS9eBj*)4Q-`94wkbvCgyu4Wp`t?@#_X%3 zI|~NQz0%xZphH_~PrOMtZ}NH{W-=-M9U=jWK-Nd>b%#^G;?JDivARmDkMk%;y!y zIr8g3IETZn^XlMoio~wE4?0?9@Ma7@=rB8zBL~Kh^ym#+0;AQ>6qv#!e%p26JTHHK z%|Be@{$2UEeEW8bjK?pJYv#Div>^w!A#WlSD7g%Asuew<*QQT&u&Dtnu|Vb7~L(03ZNKL_t)&>%x8M7%DZl#7!Ml`g_H+ zf=tFK&16_zeYO84l)b7MSwUR2KQ_(4%v10F?SA6<@8{Q#n7>^4E%QAK_u#W)JSeQ$U+7o~*>rEP8N2%_yZF_FIAVRSvrfP$e!ZMJrJJP5mSbb*X8fV|!|Bds#NoKwjNb zwF{y(s{K#_t-bGoDFv_ZbyIEA5K@l13K_i@gQ$e(+WMjpvF-ltj`zE6J4R<&XqZ7X z)1QXzPRM_IQp!xhOa&vqHtkkvjjSLZPnuaM*sB<4D>QrU8;qu$G|QB?#jhvozK3g8 zQxX$844?&crJjeK+Kyko@lQAVwm)~vF*s~)O@20#!~#qcCQpO!A<0@@^jLZ5(zd=lAC=IWT7%$&r8g1SHl5(bIDg%r2m1b&Emr(kj zDsB|AeewyRQjNQ%ce=r8Zm?lB1d#AyH7u$l7qcgoI?6K>wVEntq!Qn}dlEB0aMZ|gLan7%KeV)TVkIaF6VB6@d@=tTnv>^!_u5ITS@%#j+UWv!B3#5;@ ze#HBgXDET$;+Z~_m6-|QSBoPv4%`BNc;Axe{o)AN!*Qiuo4xJG8@H{BP1&4OdI$n; z2)Au(>^X7Uw-hX=YdjgMZu^v_KI_sfu7^rsB-7x+w$55{u+`ncY_2J~5TgQ*Dtn*= z3$^LV*bbo4yR(B}D_&q}<-l)a9&*tD3^uZAAtBtkVi+RbwndfFIqKRi7OsXq5Z+m& zww9N*l%f`=5W&2d&r8n(*9{t(DP0-n*vzz~@GE7q^J(M;1&Fg*Q<%EeXJS8BvUaRL8_?w>J)ZkQXQu1`EA4Z zp~x`9&2;l~H`w4d-0Mw>Oc^m@G#_&AK7{KGy8@lbh|+Cz9&o*fCG*zO43;`cK&<3O zm9?kpSq}no5TXfT)k4uab|sg3D@iYDth=SGq7DF<%qfg6M=4~}Ldwh;Na>0YIGo>a z`qKk%H;%0^~fU(j`D}EHla9xHk+Y^sz;}Wi&`c9coXVF7uC;@k=Y*}4=M$VZtLCpPj zhdVadJUcqCq+|~XEBO;;z3TR@+ zrR1C$k=M*Cb6%OD^U@jmy!0dE44mYXD8zpOtRytRyL4B+gWt&ej&JwzxcmLa+vfYt zw{7pm@!JM-U?7b&q*9ZaxI#1HxZ?AeU+3|8ULSKD|IdGHe|qQRhC8sE#weQ~%@S^7 zM=!ac8|fS998cRkjCAty+^+oX`s2kcDT#3TYauWMK1)j{A>t3y|KsDlVtl`uWA2eT z)91cH3?KqyU>mj40@n4TsQ;qJ#+IzT96_X~I71I1uS_xK+=Z+~d!l42#fOkYWVOQv zudAR`9et~LX(tm|d;W?5QUksn`vjyE3zRo?lUT?&jlUBPm2PJeqvF3IF_Du;QY`obSEz8km93c5GrSnOa=18lic5%;|`fxU%Iz-kFH z3{f*MnL-R?IGhaQMt}*&&GXL>zvV&ZFduHlEPbha8b-xcU)NbN!s7<)8;ASu_nBAV zjLuGA$u-smQay8Z{e{C_i&3jJ)dg4}(|YO5>o$C;KC1)ER0ChtoaYjugH$V8ytONB zKdJV#B=l`MnZe9i>jwwtFL(b>@49aoJKW*kgJCrdr9Qpg^mfJ>jGY3f7-e-R4ydID zFjUU9Qt*Hf4uCe}G#gB`#{nj}KreACq9#l!VHLqzIhvEWpfA6DZGX_XpJkr06%~TD z>AJ!eQ8xCv3_~;YdE}1^=Zt^+KEB^K8(Heiwq`VnxComU`}Y6)r4?<`oOhRjO8a92 z{k7j%6PTHSoE^ijNJT0m^U7-c^U4h1NL}QWIU^!hA5h&pn<96BhO&-3S&^M?G()?5 zxin@_(>;JPXM`#wUp9|<&57j9yh7I%S6~K?nOETJn9sx~brKW30d!iQxw>a|X(R52 zcjNAQ+{SI=WA}Zx+il-&V{Ds^&Airvn!B%@(_o~eJZBu&d>-*NkB{s4it{u5|M;i> z89JrpFcKBBYqV&mk;%>6@gg9M=7wQ3jzJ+eH^3s(zOq=nsTxr!qrllA7fR-7>A{>y z+B{AuF-V6Z5JftOEcIz03}kSvI~Ue}*0vGQvN|gg;EoRyG?g-^8)>cnGM_AI4J6h8Nuf{{`w<6E@o<& z(aqc_TvMfWH$(d$Y|T;)-ZD_-oL$AT8h@5eul~zXR!tkLr`A{{z6*;M${}lIci~_t zDTt862M9NZmC3TV({Gz26`?5{shjc7-~6B6^mdQ^wvFNDo$KwRQeyn7@DyRVI|=vU zRvcIMFJx2qh4Hi9ah(EduWSsd-L!6As3sZSwK-@hOiFGQ)OVg=f6MD{r~V_~ul=sE zB`nPfjc!V)Bvs{8FgG97KQdG2jK3fDFF)d6K8=d+J2xA;Zf3s-n*cLkY*NkQ3k7-^ z7}pR$fW4ih%K$-Y7O-6?C~|_AF{DenlvieC&WJf9F3l_BR2~_ZG^Hc*kdDZyJad)> zE>MtR(|TrRrhW6x?Xe9rY{T5$hmGOx6&ym4PS4DUOz}Fe>uPyX2ERVedE}WmkNJ7& z^O(oP*P$Or{J8YviUa;ZJdKxe8e`oJi>k*i-pDuLyZiUe-rwxD`M3Li+x_vlk747s z*|wSa7#qx-*0rM&2s3odc^ubqoS)an-@lG$etcb@U(^5h$Nz$WWnfP8GP60XA}UP| zgS)w`t|Q~-*`9CIzH4)<7|CRE%CgAPzT!&W4_K06_9Q_@A|fSESs4T|Z%9s1W#|3AO*e@*^-@GEf!34F8s zzGIB_+M!Ev*!=bS_{;O(|N8uYlNi1^hSN;5Pi7$_h`#?RW3535A!%tyCx~<4GEL@1 zUS`vw#>715NIB?m*W0e$2_YutOb4CxVLm{&>cTZ~ocP;Q|8n?0fATMfEA-9NX%d{3 zW9q(y8YR%Eajebv1=lV5)Vw!>)9AgO16G^VtFv>l$~Z|P0GVEDl?u@FCU6p@aczxW zVK3$-3sEfqsnuQ=@=6WQKRxmvzRkzO_k9~fFQUHpS~P`TN8M-~j(un!w%ts!GkMLQ zhPq4?LDh#%)q0SS8%;s=rp&~oM1?7c%c{pxZ7aXN^7z~J_kTP8`p@$(|2;o7;`>8y z_wXI&^if?AW9sWG{@btdfB%ZVesG?-o3_#Nu_=oK|Ne}BdGbG|ko?E{c#O?XOZ}4E zdyX_T#9nXQ`c;LYG84=s%n}VD1D>pshgoU@YEl<;DNeQqiCgb*s-PYdlKVbpHC4;#ZalGL_uJ~+tDx>GDhT4KfcXy$cAh}Wsv5uS5~ zK4+X)9Fxy0j?l*$UsKQ2p*+A3>T=G4O8e%l{?GQ*JM}KzE&k!Yz3=w6kDHJ0x9xWG z{XTqf+_!Dp&7Av2Ti11g=o5Kdah%u3*Y$PHuj~A6etpf)Q@?)BA7_rg{pI;~&9^JZ zGjJvT82(H0{a(|LxyzVJ8+)4N7`%oH>0@j=-6Vz0I~c|=_((oeAttM-z8bZtXmuF% z8220cDzVgT1Y-8i?IdFGIO7q(H$Ni;^OhS8TH<;IlzP~_N3;5Fh(0Gf%LXD}@} zQ)V-f^|YrINL(;Y_1)E2TSov?%Cn3psA6^x(x^*89O(I@&Tp?S%nJHN*{Q9K&Fz+{ z%cFK~l&K^O+d#rlg@S;Uaa18u=8Y*<41N{T^2ZdgP#FV+3;|6sxjCrkm47?uZ!$v1 zP-X{heqH(7w7*Xr(j+Nto84W*7N}iqRz|T6x#{DYe>=~A`|;z?STiFkxjFO^vjA*GR7zNz*WHW?xtQdgwW|8~%LLFSp!s zxeW?Mq)42J-_HE+(>U`;-d+F6rWwb^J9q}lR=jZBq~v1dbytd<1oooHIu9rd7*S&| zR)9Ou|1`ubopcJ3_2)afAQSKgoKlnOlCrKd0NGo;B`J;CGHuI!*kg~|ZXF0w7*U4N z@(L9sVTPQEmj4c?JMK5UNyGV^JWf+YCY2fxLRRUvNC8`-c3KEXFZriIU^)%8nSiJT zWd|}Q^D~bB`uzB7etja$@*j8m{*K3;K0wOdirvYXKR)7Lf5Sh2@Lx|U^FQzW-;VfS z|LOl@>dlrUNs=Q$W)V>{kBB@f`v4k)odM1M!~XwI?9;x?-58(?-IYf~xS6U5?}L~p z=A|g9vM4LV-Aq-4Pan^X0+kFSxEl;OSLS-8G2?+GUX%Z0@PDA2yfB}hNFFG^5=vn8 zjHp_UDkU4|=?tA*LZ(W2Dl>&t9?A)wS*KLeDV(ZRn$TJK6ZOyL#_it~z)pm*pY*3d^Eclmq{GsA9+miC^$Xj5T&8@ylO zITIw5z?&m!Q<+lUSE;hN3j6fPEYpCj(lKC2q+QVErO+S^E;I8EMusdkfs*tzcw~>( zP9Sk~*d*Y(blVg`zGU~3 z+I3Q(g=>;1mtShi4xqWpBY;Y|6IPv_0v9rBr=hYMglTENu3a^$B2o^9h&nH#lNaq( zNEYG4?Ir9(>NV+5IDZNKvgs+nve_?!D_C(&K zKvNVfv+971t~H^R>NG6Fax8EXSG`J_tdGut@CNK?nF{@(iU>mEfkx(|16!eT&0C$ z<@dL&qQpcF;%Oj;A`I>gemd*J6F+~z`^33$v6rY2s16YKvbLt6w5nv*fl{k?*EaN; z0a{USj5CpM$NCk=cPk(D2jl0#zyE;W-*_8o?jGo#h)f+v{`zhG_aFGnDZA07 zYC;ROsw#V?r;c1_<&tJ$3P;r>4%Jds)&gd8X}k<(*1iXtQGMbMx8dBJ!x(PX{m4Cj z6+8WkPvVpD zWAJISeb}}|?|=Iq+cqrRM{oqq2)iV1xXjK~SCQoTdaNVwZ|m)CeZS}1svo7-(A^Y& z#X8?`7P9cU7~6E8@;8gq2zdYv>*sT0} ziOiKk8GX3!(EC!9O)r1YNRMPSdh2{xcEP!o!i$)w3}$kfRx^3Lpn6DgQ2;V}R{6u- zWbFFyu0O+NO6dw9hy^QnjdB5LE6rLmZ=LVEbh-trz#v^(W#x#418GKQB~);tHyGBH zVgX@bcg>V)70ppjg;RoiKzbVdg8GjIVS)Y>^-tURhkd+k8pF*meR~*k>ELo&P?MMJ z@s9H?{`T^8-1M*1^Q=GJ`6Zp+WMa2YvQ>j!BG|u}z_L2c*208eEq;u$7E%y~dRy`T zeLerjy=J=8-d7%}%*5taFe{mD0U*|_r=7n$>u=(>#7zF>eg4BsyiC~UiwazrT1Y<7 zVr&Z4ISg&aU{xAj(UJh88Mo2Rj~#(WfXvF&wdOFhw319s$^@U>!l0V8A?L~!qzG#> zBV>>sw3c53Ed>gL9FEv72ET=Vm{~`@-SL<2@xQ12cB}+5F`Qpqf4tSl+xmF(ZFiXH zbkAQt*gfq?9dG4Ml~UDtx|Z5XVK8K<%mw7Ia#!0n4B<@TyuG~JM`W&?^J&%}so&Sy ztv0KhX&=5lxep6wM_U$U!*l6v){kXB77KDf!a22;unNNfr`0X&%a-qn=j0aV*87;r zlNDX+;6CdTP(~P})P?4?f2zz-HK86dW@=ulI?c=lfi<;`4p>N4X0Dn?LeMNuVb=K$ zE+D}(mxQHSox{=-zg4v8#3)vPyPKPa!%bmk4vRK-36Pu+PG=QPnXqI$5F5M{C=+=r@kt`4;;oa#N8$qaMHdq$gF%yZ4kl{ zfw;*G?l8jS?4qB%)QSS72rJQUcYB*=M?>VW>1X;`$eIbkjw`|bni@r)sWqr26`#_M z_e5b^sgCD9BW}YrY@Ig3JVdSj!Wttp%AJw}wvDNk#Tbmz&D=9cH@qmEUhx*Hgf zJgZ4L0s%PP%{so{+gL&2&veYNDL@(NuRnK(7WE7U}usT*`{|EbD4Qz-{9cO3HKc*ROBi4kfKDH?L2@m%!#e%o*)ZR0?K{ zft&QZO?P3OxECcJXH|;jgw;iipyPV#$|-^+R<_`uRlPfv!G;r6_9zaE2s2)-#-gN^ z610lv(#rO7YM2S~7W$~N6miwVN_wzJ1)|}2`zhO!AhnwClKJVvJaXZ<^Pj)hfBl;O zy!4tZ!kjkqSK!xW|1{k-!(qcs9JJl@??3P<>@Q#O?M?HbT6#+gmo4SuzsQYz-fG)U zFiTi-`IDYL)p%xc@jMy1ZL8?HGRQI99V9%8M#eA-W}ACSKJ+r|qv3DB1dJT0&$rmD z==~U!8TO&y@9?6_o_AxhvZWJNN^hRB3jJhvO7nGfCL4fbNv-ZGpuoj$^Hd=xD3w+V zDti&gwW=0!L0LL0r~CvDDS`WO7FFbGiFaGws2&MgS>eJ6bGvS=?ld=AWf`mI?ot-!%#}Kz1P{LyK7HHi5x&r9R}n)DaVu=lELw92G>pLw72eI9RX9rfG$`F7OTl|N8#j)PhdgqT*0 zLQcLbASz-U3W>nG)}ekiF-z#KbqYEQ@N6 z^pT_f?nG+Nvb?|+aCL}IErsNJc$Ok9Tm;+-f`J7DP2Qq!-#j33J=-{E8RW9g7P%I@ zg|k1T#yAKQ+|YZiLGI*r~jS_hG-B`0HImzO`qgq+B!U!^5wn02s8YR?$pZ1!Qqn<>QG4OC}c~`sGg*&1xkK zt>Z4}l%}+xNi^MB6joZ8+M#ekgt($Y*@@kFf86-{efjPjBr%M0 zVFyjVBjK@cuCtLAR0pH6uJoBk)jKMjLM>}lT%}g{To#t9nvztrYBKxZC{#0;XQ@BWQwfx~vZ`>- zT*5guvx*G_X_i*$G#o%)*`zH+>o!sL4X0KcK)2Gy7X0XC;1=ABPlJ2JZNwNHyT=x8 zW)T+Q763~yXTe%Jsg+te&sFz4U*|m6an}1iUk`md>KpJaa5^Wdb7CT`k}E6Dn)d_a zyFAPWec$WHyKO^rv#9c`$c8>T;q1~$-KcpQTDB1ceM}lY8e_}1_eIBkub9HZJ8_uJ zuK2#bb}r(GW_PlL1xZ^~&RN@24XsflZo?~VrR^br&W3U?sih26=H^>~kmd$&S)VUC z;90{lnE{k)UV-x>5oBC0BtCMTaDn2&l9>u_nOfbHTWz053T*>O%Zu$(i+L_9T>FOm zSTU%qt&dj!E{;M7Y}2fMvXfGaL0Du6MmSyFWFi{nRf1h9?}kJzw0pteh9}pbMy=Av zQO}`UaF~XBgq5q5@l)ayverfQUmP%F7R*}GgXe*lvsN0+Qg!G8T&ufwnK8_tk2<|h z`fIEcTv&^1L2?X3Ejr)(!$8A zue4CzlptWX!u(=?l1`A(WJjm$dyxRjLV9DKl4TRf@u@T9pNzT2r+O zt8iyc;Sdhh)i+m_hR&s`E6PwU{B<&*0qw@1A`oUy_#=T7EiE@wRtjgT0ro1Ksxvdo z=2E7X>3vnTuZft%0;LZBKyPJ@AMhdYC3J%}VMh(xi{oYBX~Y&b!uHK?TX=A65s%s5 z-Er+r&P$6Tlr&eJS;w6BbsqCP>weE~$NKHmSJ!vuJ0GGL(326DW>W>txenCWZ2J)Y z`i>#qHf@2;QP!hv_SH#)!?&jex_eSv#C(0*!q?lojKbM%XCT52Z>tJh;;r)Cc{p0@ z+OO83&W_|BM@DqiIUt*J!OSkHg$)cwrr6w*77nM%lt?a zRZKEc*Cs$38E&MaJsnrcv+7c6whW_;jEL14M{Ndb_y?ETM2`}AK44wx(wLg6KxFI8 zF8&rYCjkV3DuOg4SlJqXSrt$)H%T+$Ml)THtD%nqGa^+fuOb{W!!495Hy>WR(>wNo zEliYky`nq7!osDA2k0o#Iy}zY>dEbc>%*`+IkRN;ZPmB4UWRU)l+&UGu=Ek;mfNxe zd6$lSTX~l2-y*CQ7Q6fG!>;aQ+_ z-|@M_KATtvX4XA*W^Tjf<@Rvi{=Agi)D4`%nx(P{?ukzVGqF1%XJ;#sXs1uNKJ-`K zi<>U3q7&?$jbOR=p$~U^#3ikT001BWNklsn5@dLZYhc2?;3|tnFPgVyz`)_CIR@$jVffl&h+m z1+FQbl?!&L?$83ys#B{Ym&9&+)g{`XOe8Lm&j#+s%^8NEdDCoJoe&gPXHEQpO7z?1tPc-h9F_F;SYzWdf2 zZO|in3ir{b>&KHht$ zn4I@@z8<&d&>QP^x91(_WJHVGuS3os(SX}ti)K%G!0OhC1H%nw`2ODRaQEz(xIMKU z<)WwEy?q_Z){wUZeQ~BZQ__<>rQ04^b7bweu+66#CoF<)?p+cn2N{jYnwgd<=+*fG z%K&gGz%bTSD${JGXhEV+_$JXonYBW~e!9_xa=M{q1}R=DHG--l9yP@6 zL_@=vfG8v~nsL4wJ|M8nT(C@7xf!p!){3MOnP$$i4louIxT46ED5S7TDX0Z4`{)V3 z0=1iY7`@EZs8nko8|G>Sb~QFp58W<>k{bsRkSirW3iqnB5Z~90*eq`^F5!YVtV$Uj zVqhh=eenG?v-o3WmQ3|DxVzEhmeHLq*5f=pMy;jnh)~yc1Q<$MOEMtM1+#+8Tq?89 z6|!a?1X*v^R4%+%`H%CL&mQ3hxO?^8W*rM%vy_D?X4P@>W}vKwCF%v-lATtHu!qyRMV{3cA%>f+(!~B0|Lc4H8Fd%G9>+q(Ha@={ z|Jm$iu;Dm&%8E)ecSrL~1zCiu*vR*za;8bkZ|=L291}{8zzM?ATtc*4ZN8)=ZDS4;70AkBk+8SG29Ghw%-Qb zeGGu0!vMBT7*=@XODvta&h_?w&Z+nJ`hMnj@Hf>r$K9?lKkFO<6@++B$%NK&Kom`= zGw1!>Z;o?eF0FpK+R@eEl>>$V6U0EuqWENLki;008RNd-lbC~~t@m@$9cTFxXa{S_ z9+$o*kZyr;YAwurN?djBhz`(>tSrSIR`PJv)vkSwu+hO_>Cq-dtyv_D>0Zmq4U1KU zEG%!?oWKT)`Yid(VSssk&wKBb8DFkc$IIc zQ^VM?2I8e@zh=9}v9HCZKdblBTPewNa!9|s>(j{F&1izRNlNa_Tr`dyJ~EbVJ7(g2 z@%>a7o;L>0J;rt8bT1w+sjNtZmsoA7$U0BGWrkzlblad!G<3;t_c^ld*PS<%U^a+M zH=C*Vvd@j;8I9fGSY)|(b`8YJ)FLhGD7;pgNcb>y%TupyMnqU;?VHJ9so^9w%r9ET+yU*ME3n z8G;$PRnyQj^Guw;nVO|cEMZEADuIU|yAkR} z16v9pmI6d!hymSrm2W&bpUpgU^Vl8R;2w6{BEm+PImQ_7ZV?vU)A=Y=zfzNgEX~wh zb*y!)d0)qU-Vc61)?4c9T(5?cTG#d}kSGNhKzuB=P$J}md zKlHcL^QQ;Q!0N*{EdK2 z5SS^ee#^QOuh#>q)ETJ4)z{M!qN4I@M8CiXBZ8Flv#U7BF7vondFgQ~qX@qQERq;z zO42Mq)WXG7_x6^8l$ZZMy4;|jVuMlFbO)KW0OJZ=x!gC`s&h?wbwQ)BOJ}4rxqvE6 z;794}sWYKm9Kc1T0d!j0Wn9CivW;8j^UxY15DuEcrWpvinOkS8_X*Qx2B>sD*7tY( zddKT@8UC>2PapIl*BFLaW!|vw#p8>lbs8ATV9OkSmZ--{r0N6}Wm&?*< zC^M=qN|SC|akxGjJ`C+Uwn1-!L`xfGYLudxtfsCms!RB}s2c0iShaSCg)*?bV0mBl zFL(Rz@A$TGgZ-z40QTocD|F%Qo;-Z3E<(6pok&$6x{^?p9rt-1*Gi$Y6qJ<(6{;#% zp>h`3m&43FiBq+p2`=HR%imj_4~M#v6{;?SPMbar!!(Eua$tZ?dr-l~0y|3{1~Cf@ zm|3gpOip16XI=kHaS|=)yr5wKkoQ0>nh-tp6Alj3kZ#~GgmE9dxkq3l#_&D3jTpl^ z2PO6qZdctH?W$&KrGKa9tVAl0Q*#~fa~^fS&$n6k1K(zThrR_~8(wHJqJT!d3R@vQ zLDlYfEGohDvkMgOAeH9GuDAc1mb=)iCkl`j5$22B1lr+mvfb_NR80pX ztX|8P0yM+DTG`tRlN}xXlj5vd6j(P)WfsOTf?BGP5vDPG_+u263}m3+*C^Gxf-TC@ zWy{j%nyR7&MtVLPyNxt6^#}&~qu#d1EJ-Si@Hw%n9_Fo{){&0-_x`M(0xv$`KRu+P zBA8GZvqZ?Lr3$kwd54X%xnBg#uAZ+eUPxh%QG|O_kPTMg5v(d1 zt6Fb{$H-5bU3iNg<5AXH0=S1gjr_dZO?aQJXT_7_W(b2jjcq(sccDa3CDu<;ugpPX ztgE(t3wxyIfJ*kR-PXk=uu!JNUw_n}-~4|be3LKW%ROHg{_oH639?kN@X)Hz1kx{U zI?q}6?Bpb^s$;5_x;edq25f1(O1o&2NZk|FhU^CMT3cA@vY?rFV2C?ytc*)o6KqqH zA;R2gVfYzUedQ|mt@M-b`VJJ!moYGku&u?_7DVYh5|%Oyg)auOk~vcH}Am+9||UK+w50$-|_ELv9lcsp+g zm(qP{N#?LCF4?R(v`nbFuuy7}RX|nEtU@=6<}A*Z{akTBc&ARGs*=2?3Yt|3bu>nw z`Gww&$SQYpVhB4BPOow@oS{c1bsIFnl%bf_G%`-N6EJ(@IBN(wfsqic-heGwZO_qT(M%)PHGiNi@Cg%0Cx-{iqWXcX+e zSe_|!6RMP3s}d(%_SAA<(VzM+PoWfvt-p(Uk~$~U@T?0cY4E5 z+7LxKs>EST0+o`{&P)hp+RE;B8IFXGj8>oD9VXF{vI~{MBsZgVI=tZ~J*qLPkH-FP z2d`8HA)#oEy{`S#uG~enN~!M}tnB|;6UEDViUryas+6JA?R$Z-pQ-Dr6flp@lrf-N z`toVV@2dXevS+t5Vbq^?{o}KJ+z}xUl&LY|7?D~^s1(`fOJ6()V@r5i3)A{2P_}I_ zHXzl3J%(CG{y6ZLJH8g~J=T@^Yd#ZRbKgcnbLH#(4sY7NUY^IkdoJDQx~FGZfDq?G zE@6maW{`7imU+767Lb@l8nb?4!CmU)Ms?zzduK(-H{)hQMX*rl+)o-*F|Hy&T>33W z1c}nc>{d#-?q~iu^7|dX-SOMG0=Bt+xy5Z~1mTJ;8GZfJEr4V-6=U=L9RN2c6Npa4 zA+O!APoAo3xsIlQWbo;xe}L_-uS-?9IX{p1wCD2;9*E%Z5^*=Cgnu}`(rMFmag1Z zrBJOm6EbsU!8lb_H46*s!rrs6Xm`{hk(kQ6AXS2`^MNGNAG6$}!b@h@#7$+7J|??z z@S6@zr?r%bS!d}k&B6(;)P#=0l3m%;t?;4=vQ7ce{{fQG+_Z@SZNP5Wz(G3nd>g|! zj2^IIw}|HmD7P&bv|$m^v$WAJ6SnbDOb4!olxF6!=9=w%J7>Kg`8xA^;uZPT>dkN( z5_ZKLHB2aa)lGO7;^UvTbtYs=8Nm%0@E!5&e%ocns_y^1M7wy*ke!&*S@Rx-DrJ#~ zfNtufVo=UWxGd_Bx>nm^6cT27FHRsS+QD)lDFE{tr7>x&(yGB)uec50MxmTldO|p= zb2H>UZ`#!gB>)~?m!vXjTwHC5sxo(0F{>fL%cW@s+DKLOi7oL_izuU)RxwF8vSc#> zo`lje%k!G|t1bCJiP_B(*E@QNCY%Q&`-X`WL0q$~JolLPgKSll1$NX|C zg=ec@Zv1jv``!nj$JOiTa#~tH`-O5`wTS2!P-qabos{U%Ouz0r8C_hx#{h;BBgNhv zlKSn$ZwG(BQOX4GY5#Wae>rUd&!In_`1=nSgR|_%X+{h)nu1tsmBuApG^EOne#O3} z17V%e@8%k&VRWXEU|G0m9C2}89S!>sj|p-*8RE}rsI^@WeCB~VqcYE$i}zF&?kO`H z)bDTlhbMgA@pQ9o7uOCgB{{_RxToo zs{=oYiFH(UnOEz4I`-qTG=he*M`+uy3ZoSU5KwgVZsQ{4;sehFGjoEoP^q&t!71H| zRhW;u;Dkz#c+x6sRXXXAOCbh8X#;MQ8=hrBjbSgt2N{I9MbI}h+S6uR*oZ+C-OU^K z>4e%V+OU5z7PLy4wY1Kuqt>ePT=(~NEd99W`>Y?C-+&*%lkv`cB~OnR5DGD*5P1`Edtdf(?i!YK&1{ z%H9tpne_!AWo1v!y$r^@FL%)0Ghk>yC^vsva-whcMq35RfU| zsR-O%zkbtSm;bs-%Kte0|Ec*!7;(knKfn@;EnaT*56celx1*k*e|+H|KMe~@ zST5B{H#1pfCRdl{wTb%D#doDj<*cTtGOst4lbDqStfqOZ&JJ~8m2g%~p<3O00Uhd% zy7wdlI>5(K4!9V0MXxkLql=rp)4Mjt+aqdpD2FvuM> z02-df9T?7y*uwX)5j0@9MOcS;hQ%K2tT{!{?YaQ^=~NgOUKH^<6LjY zI?jBb_5HryfN#{h@x)Ke_X?Z{$iS_1lb$wv+7bM?u@u=ZcA5o@+`{(_H|HMaF5nUU zew{5p&mPuw{IgdqIh1rOjsDGEAi)YJjZ<#|WeZp;0){MktfQDb3^FWZLSQ$iXu6@U zQXgUM2|lKd%{9`;@T&AtYc1PcfVHu_aZ)~PELjMk<8B)5$Sc!bWM5w;5o=T#I|WixA)ZE;=6fS2<1?RY=%>}x}NWn^j&O7o1fcpFH|9|GUDg=nH9d*k`YoA;Q=mQsTa9Cd-g%-zNU`n16T*cPt?n zpnCEcL*r3cg!+E|Naese#O5nx#5q&fBdLFO8W;$jF5(Tk2wYy-J*TBO;?bV2rk-aj9r;^u65Sm zzSqC}82|Oh`Uc(Mrg$~}`dTkH_k-5Cql~^cBI5a}{!oj;+tB9?zkKxV1zqKv1&=TS zQeF(cLzlJ=l$QxuP-P}m;!=XP3PsJTg<8U0mB3lG#0B-0ARyI$kdjypyZ2;~WtX$0 zoD5va(t(Ss@cGG|n zdJa6f4@U%t*=~sFLII31EIMn*!z{*6^GJ^XSH(uD%}B+*o>%2c9Jyvz)_JcV$9$c- zAM;-PR`pK4x(-8L+CcRo6~I;q>Sg9H!I#0?Zc)#Jmp7tKp`kDgx3Ov4@%&WJJBMo+ zM~E%o1AYoft~<1&J9?Yk3PziP3eI&UTJZu7IE)S9xsLQH$89J3jI@$7pR6BO_G9TK-BLXIp3cLsc>7!!FGj>UkPWjkMM>Fu5W?e7147!6;R z{!`ZPpSox&tMs1sZ}0rKv^P`rE zp9Vf}_-j!mD4Vxt+1CT5?kuvXn1E8mvxNrGHyp>x?VURyof z%t|te*7u@`ZcbMAj!@|1nh!lo_8inZS+zS|JZD;27{6?srjN01hF@;>{1n?j444yP z2ows&D>ukMYnvHODx~OAc}L-n@kz-IcpU2&`Owho&4 zgD_^f`(s1FV@q-6gSpSDsqa7Zuix#zz46=fNg2w8wfueJ{mf0EtZh4el&h9IKYxgQ z%qsfu@x19_jW;UF+$zaw<)Y1O;=Uw;6In!wCo5at-(l>?S+$6>v|tNX?d^gD%}!-4 z)z!ek>I@`x1cuCQ5CMV~meC3mbthnFI5*tdDmsW#=>+nc_c;q^VVM?N&4B{btIb@x zl+2yV4$pRz*-#C`jkZD0TjMF*-D2ZLbIOJdV{Fz9%AL34oAIij^p@GkO%lsksWXk1 zO3jstb(YRtbG;vRKk5|j=Xy_kpX=4}W_1|XMNagFMVD<_w}qX0B5%7r-E12c{LkAvYOqztuK)+YpX$v_AgoS-s34W>%Mk=;5G6(#+&#bv<2HJ~p9P<%I4vZaZl- zpYP{Qltx&A_I{+NP&(<7t^T@TBC62gASzX=&Pw@~SPqr8m){T%Wug8FdZF>}(kqGi5aAC4`aDXf3iSlZwYIgN9*i5Fs^F ze>?1dyz|dx2D||qG+Yku11g$OGo`3Jx!fQ@$rJ)q8RdFqv(fz zUsdkgz3#FX>eEIujo_Ev?%6?n^bv3}3|-uKm8+?goeg@V-b(`R!iy}cBJ4gD;g;zO z7o1xa5o)BM^@Eo{pn*nRh0fQOaIG}0p_8t5g3aib96;J0xb4_RjV&zXVHQRf%`b@G zdK0x4UrO+XXoMqLv!jpO1bG=eNM@)FdiEQ^7(c%4^TzRqKPY;*uXwq z6DlnwFGW6nI_l5tPuZH!d2~FUDma?RorM7%PDI}{`__{uK@==`a!O?;K($7Hu zKJnW>(hPG|NBT(m|CxG|C0VZIO7I+2y=LYSZvb*&GK(yhwDh|F|2KNqo9cnWDzcc& z1QJ6;xSL(o(+j=+k|J0DkcWpC?q>I@o{?8U!bQ%iDLzyeIDyI~p%MNjqom+ZsWij@ zhH)4U=!G88Zakc~Jq$IR5!^;Jc(%l2ZoP&@0~BuPxuaVfI$Wx`>=kvCHKj{cy3TWc z=y5;q7v8UWpLx%EmwqMQjSnjOw1NP5A%IP_7Y^Vv^l9^B<8h1Qh`<(*Tx_p%nsW@s zs4=+jI5v3D9V1q01xZ>h)h1+OHFBAxqZ-?l#i$7Y1{6TU5iN!$MoWiAbnfrQ9za8>@7copEjQEvdmmQj98h_wfE8-F>}I>(gyjya-qu zcu8w-nA&dIG_)kF6StvxQYmjWF{|6#6sB3_ydZZDBHR7FoT}}PL$Nc%uzno1ceror z*7GbBdA5R$)>pGjEz1gWa7nBZYU#PwZw3}GP}COfIRIdD&i4yHr#%1_wiACf`@6~% zOKGq$h3TncY3fX$2KTL^6+GYKOwnn_dWsv@zwf1{JKE}rgReLI)cbq=`KSEhgFjz* zPdD<9d;b1K-)SC_!7Uc>g6?*#dWq0gb%O+`%$)|%%uz`X%IEgLcLP_>Vfb>3mz$5! z-@`A};ULP!=KD}I&O}*<+t7Vc@)!7k9#a4wrB_goGMb$*R(K(&c_p{zk%nPg{2@AABdaor?p$aoCaOBR18!gzS9H3r zgg~=UR!);JXI`0V|M_lyn4$@wSeyJgs|tXJ`>C^Zt&U?g58PpI5If&z0@IMI`9(z* zuwwZ7RuyC`QKIEH>om5;Xq)7uQ*PL>v=yE4$ySv-gXj9D>G zVCbxz{@+=LcM+t?3n3aYoI5nAo7s*!w%CZx5QGQ!5yP~(Gw6$qaSMidL)A_bm%LlG zN>5OwH{z_d001BWNkl~^2&MD`IwK3*QLj$Urv1#KEyZE!*DL6bN7-6 zphKIqs}Au7ecJhX_QmE)7)x=nkn9DcZb6(G{z58=`qtb+?O$V$i)#an3HSb|l%S9_;@_L_t`78eA7yi#X{|djV2KnpB!Z9Ef`kDbR$ zjNP|=MBk!x5>5|9z#U=SH-yWK?s9`!E4~GFj#)ybvW5`WOXhfvY?+hd+G^KKAfiLH zEmSn6yXvEX$d`tA!e>=Mb!D1|Z5u{e*G{G6 z&htFo<9S*Eg1NVP+I!F^B{*4{1iDA$+p9?H@^>U5RgAc<>23~@Hc=Zy^Eq=LE<&?f z>q;Z5u5L|872653Hve=fB2&)cY2#+Bja0eTT52Cdn zofp2Ig>O4n*QyX%b-BEwI@p|VS+KgM_tLw{6J~&I~JOA~U z>!08G=aYoLPejz;zqn;FYzmdoquxH|$DPXDLRq|WwX=4@-;()3XN#DLlqPU>0CY9q z-LE1`jrOpf%0nZHAk;7zp6KhwKW*e0X30}ZeHH9h7vMH6&zo4{o zLmM^1ve%1%(>7qMI;@v+ZN}Xhu+40D?SsQS+{|qRwh<&eXcn#S>9tx*rMUPQERYe* zDv2p&p6AT0>&m=1ud6P+Kk{+r+ogBu-Sl3#9GBagp%<_RidNbSH{m7qDmylQ+I`=7 z+{S+R{<7^aM?BMy*|?P47=z*1L*{+@lO3VLr~E336?~C+V#iEFM~5{i~6+V%j@tVdC?p8 zf{-oaXh0B zQDC?=rPrz09UCNsZvg;eX7zX0s=ry+@nZ9m2N&Geni^+GW@et-X18fq;a<2l67ezX zngVgvDt@^?@^JH@ds?`aVBIOU`ehm~R3AfYuY?kb;#{yeTcNUIn*bJ#axq*6I?SUD zWZ%}4E*r6@5uLDt0|h}@^}rARe*a%@^}pWyhlhWhIRR3GwL1s({m|dP==)b5uNz1> zZ45kfLn$azIrG#HKh(efp#S$R-!6u4Up)Wez~6ns7i%{RzP#`sp_ftjSynh4UtaC= zK{H)f{&J5WPWz8jKU@OniSK@%-+hAbPTMHetn0+T{emCg^OgL~4Uf~#T0e@BDkUW% zp_H}czd)f%mQ`pJ2&*n(E(B(oE7twK-WvoJgsEd@*czi&%8@8r6OyE471dJC37uGf zpRx%hmVrB=qV;diH7u!L-;jm05nJ#O1~I(<;zqW)cZ3bI;pRazx0dz$bEPv|?(;rs zp5kG3;#iltUbEFc^UO@lOV>HCv+h^j6Zga$^-ldlJ%)+xed7}+m#f`H2x1n)aZ_s{`2>3wsdB#R5Sv< zD7Y~IiCYgxvFvjYNPpy2$K1loIPnm6n3*G+MSCs)NUb$CNs-A;dHE1#_)Z! z$g08!k?92sy7yhzJch&-)l_Zb0GbD1(VnVBO9CkL)?mh!sA-tjWlyJV&lducwzY4b zgojc|q38|~UY-3-0W{R&8J<^KX~i-SD#R0TPReanbfn5Vgc$NQ`xsCGM&WD~6L}V{ zQVK>K`}pnW`iH7{*9CoX{eI`C!ELY=zjTiS+s(dCNoK~enGd>KSB5vYS($ZNp2}2J z9k=P5nahULXb8E(1X%0-Ar`WX_pC&xf3At4!$nd>Z>C}$aG(K+j^!YsTzrWU{yY}@ zZLz*P;W3&WRTWAml=}jHS_1O~QaU%n!Yy^|cBQ^lvmOlkJJU+T*=dPc$dU?`!c-z@ zE=!=);f0v}T}AjpCK|EL!mMjfhtT+qR`Q3D7WC0w)e8Y!xdDbY$gLR=T7N^*P*V`D zkNLx&AOG^B{mb3{=hlhAg|8lc&dh~LsSQtrQrg|S~}?q=n#$BskVjz%V(zm z#AQZM|4>h8zq@`Y8M2U_Q!fo$GO>ULm{kyF?*tBqz|O;BO2g^Ymlyl5bKcyN{1oxK zBR?J7_fD5;^ba0B7MV*hts_F$kiiChLqzv@zNm9yA!9=58UcIyMPjD$+LUpr2W8D`{c0BDpKoXGvvNAQvRjOijmFT(fo2 zB`IxQInSA@NO_n!T8T>(hS9xeK4aTdn!E1`xmH&{*X(bIMTvzv^ZKYCe$qexnt!c0 zW#1muVfgIz_cwhx>eH*gem(Y^;V|DuCvAPp4(Ri?&iv))`KMp&-|u!Wo`9fmE9r4o zrqSpJgC0AN9==ursA%5(+mcQ&*WdyacGC{U z?k4P^TODGD1;4b-wrjcSc_t5%Y=t()vTtG|J7?c${dKpzLgcKqJ*1SvDQnEB2 zR!L9i!f-y#K`eC(#~?SDL*WQ$7Y1<~+`~4b6Yku?m$%CqzFdSpyyqkLj&tu_;t8R2 z2urg^Sy@6VOV?xO)OAfH&YAbC9;Y5xJ*M7EZ>qcTG~GMn=9~XeA`#$T+6$w!37^eA z4enO2pT~aqcKFzRJBDpx+veLI4O1EbW|#f8%!7+`SJia0tXdkH6>U#;|846erH;Y+ z=9eiDKCJ!H>TS$vWj^}g@4Wstp%*laMc9~pPh>kblk{P{U-fa;TdvgFtIM<6W(*{G zhtlNY1n6+*SdyW{cnx1FZhnuTULttyQy z^##YO3Zv0A(}E~B6KA5IP*hgkh-phwdSQhw_U};N0>l@V&;@ekqJvoq44M&VuGe2o6^Uuue*a~X4|OWe&Xj_0d&+bZNtFy2pRfzWAkL|5%o1d!K9jJ z&AUF{>@RQjmk0myn49CjmVb7=ea!DUwyg1KK$6nTt6;|TvRmxecQGH3%gla|B8a!c3bR?=%m+7ut3+Y;1 zRL=m#r8ISCg^dl8z9NcOkQ-~7rE-MrD=dOlS_!yfa#k^uPz%3gZs8?Bwv51!$2n(S zlPVm}d8QjlJ|>+SeV##vr{`SHf-Niw>GKhIVoGZXt-5ladVk=Tibru)0WhbdHfLCU zzS(y#I6hnK^4)O^j9{!a^V?TT5QSeq>dzl~lht$9`M9nR5idcL4YS=vID%x=qT*Yo zIW|w=_n-Lh=QYSFI`nFK@iO*O*OagI+t)ra0J&6$ zY8h5Y0SqZv8?h7c+Qi}hY793w2C?nY)59L^CnwG6jl_4hwt-7&*|>qSy6ke!tjfF! zP5nM*rgG{!^L)%p{FwTf^&#A=K8z2u2del@J2uJlHH90$WF?;gu6Af>AaA*#8Tzw1^Z+a+s=&3rP^Im9;4az)BdR z2$R8-m?aU9M9&rpc#Itwnr%0O(Sznu?9Qxq6tCmyTRtAOnCeQMSN-&%e|^)xe&8pX zF8#+ye=NI`n1d%ck4bLR_4M_xJqi zuDA56I)X35UbcMM5pivY%#|pH8-Or`0ZpMgZE5h;+*78Ct<~0#(8Qu>aYkfJ`-M-uK+e0tAZZ95(b9Wqr z!x5%ciV09^k$29jnpws`=UU4Qi11_Rw&A#q*j*%SDbop}gZ%&%ku`4k-Iwzp@Ai;> zymSNp%Yom2@%`0(3skin^N9Gg!Gv22hf0Z#KcSxYTrM~5>I8FNUsK=s3+-di`U-NG znfi~`$XU_gl7TLgNB~030--{`HIQ|W=`5s3v2o+x;QRC!T6fn=4LV7(3j=mq5N0dQ zEo|&&BkW+gS-6EWh8xv8o`)H=%y(Q@{1Yl*Zv7r9@YX`Wf$r$cnd}hVH5Y#QM!@09k+wq=ErWw5&IF_5wV928@I#8=3^j6 z=sJl}Wz>b7vt(ldU3!d^>dtS-5%?C!W{|L{5p033x+(#X^nb5vIKMaDnb9 z=PZVs2h380Iou41CkfffKO9%Tqus|Izj-o8Q2YGax=1? z(wAnNTBG5lchViW1H<@L_1(so0S?HU3nYx9d4pd>Nd`w&5T8H!Kb?8=`t{VS>F>Vy zci(%w1bhf!lyCO=hJU!~Zcga!RHD{6^`EvJlFhgQaGs zj%8e4k&eo4=$Z_4Z+4#_WzcLmgC)*yd5uptlc2%Wy_Q{74TNE%yhT35W^_a2JR9NE z9_~&z4i`)j9!76zKMT)|t4HCblp`yv`yl}4HG96utZVAJGG{$5%}bZ?G3&b52k`+- z;t}>xC7+)cq~^lV`z1!z4j!c!!{=cyyB#;*HrsZ)y^ayF9mDp`w_)36W1|noi29hC zuu-T^p;u)xQ<;_%H5HpYq>UwZmXaEPSyWqpm47>k@%$3e^KpNd38P@mp_Pdqi$_jE zy9+uW-eOx1-U(bcqY)nTD;?;v#E+{U=mkuqD za3$O!@|0#OsR5>NEn}DLd7)N+yz06FWGxAVrF@a}NP!b(bl_fkoA%Q^Z-!Bb;ld>7 z=3McW>kV6NqMeM?Y(~c$bkn`ouQ@OMeDWjlsJ?Z|$cOM&`j|DR=5>uN0ML4^0GnLf zeQ=Li`^-A4W?9fTqs!*VscW7;|APPVmj5H|y)mBDPTnuhOYaZ5#Y23X^(G_cZ+HCT zXZ`MLz6|fU417z;rulH7u16Kid=-GKl&5DxU9CNU4wuR{hcJxS#Fb@2bv__)&C+Fw zoM~s}BYBptoSjLr1&67c0S3>R_fx7GCX4RRtuytP2j6CWDFDpW*!!A&!hN*osA}#1 zY3~tx^Q>>-QS{xuevSW)`Z6>{19#W%*LSb><&*ir?bD&nIUME;m#_LR3PN?mrXNQg z`ts@e;~i6ao466LUf%_N_nM!-#P~e0c{fk3J-6*XXo0Ggfm`@jd~fynRjIn&ZgKM# zn-&a^Gq#(l=I=hu$K?ARzn<4K7(xp^ctW1muNweq_Dj^Y@sa?yrxv~Q=~1M@y1Myq zRutG$QlNR`7G0_N)arw&w7hXo+@celVQOls6APMI-O0fliRHfIpq@czfqqJFbx zdcB1{?dxq80)|d;Y@t{miG86}=~AT{_Nl2kQ{sK<{>Utxsq3sq={~c-yZG)nsS*;M z>$HaJhHnkpghO=zyXw=h*Uerw9=nahx6St>wr%*a`{urFwr}QPG2jC+q8^i3bpgX{ z8@LP+A>?`bd1Bu=PTP+5(P>BphQkJ|!=T#)Z%-g--SEu^a49#0_SU-jWCws0WX4*z zSVtP0^SBCljN$il-Y*h7Q*GABVs%Yy$B{n?*4cfYiFutbN2n|z zk0K~}W{m+=8d2dj;pXNvuQ}BWBTz~!x;Z95{`jchyu?xP zDmcC05;|G!j&3lzr0!E}Ck0`W#%A?Qr!cc_yvU`&DOg7kDN$3FDpe8#&+EU(t-fh| zGY$Yg&&v>{a(A(+5<+Fs_?XIM*;4+o^vHTQdtCJpeih$jcf+INy9a;znE(4d|65#} zJNKueU>OowneQKGjKD`(L_y}pO5b*REW8MW!JRBWQ4v)tH><>iRM~0Y7dWLWXO_Lm z Rc=J(WK-G=R9k1NAHv#!ddLm0v~JO-i4vR@{qDx&QdtZb*(w+RVwhjlm&2r#wc zY5}vDScjI~;?)k{&+k9`dB0E?o5qO!#p2a{-(=yND;g?VWshur4!%-hNq-&R{eJtW zydUJR_v`C!U$)w}?f7i_m%w4;c4#4_B|H-;I*YW(a20K@+wr+(qNiPWx1F|1A1s;$ z$Co4C-}3!_HC${W0_&mW(rBuWa&!h4g;xBQyZ16Vtbdh^91%`cp(__U=uee!rT`hL zN~`tfTG&hbtkH=C%U#y23uR200~HeGG#nJ2gf`kvY{rcY=P(-v4|79z&N@8?y;aaA zck8%iVnyYbWMrk*d1z9$s~0t^&Z?O+kyqu^+gVdMXFf_*_HpHh)iiq;?xx9ayQ9|A zqfW7$I_PKM+H+EJ_jOomWJyYqUA@qCF?pw(v-{nsZTRjG;_YH77k# zkTVJJm3$C%EEfmOoc_3Dymz!8oX|lM1_<$CM24XXlwfdyOyFs#%R<3B-Ase%Z(*C0J(dq zbV9vUK8i+OtgAFlC55kYccTvQj*^>|K{?mB-ie10I17M`)kBb%cRO;o*rn1;A*?`6F+$colngRAuNUV_+Ak2)jvKrTzeR3N zI}Z7>=$Kh6gbgf-PDv=)4oYr8u`=nDUj)vMD>MM;0$BnnoQb`0o5X|lfBf;g|Ladb zpR@k8c)X3Tzv%D2OgOLweYjLt3I%w|9(RRX%|2>szmYZ#g!OgY0dZ@QrPGsh0sc12 zA6c1rS6xEMA6NdW%0v|mmm7BjuABuLlsT&~!??o#BgFt-0 zXSK*xwrHCotf(wGkXf1aC{v2OG*LoC51H8Gb@#kq^Xji#G-GtQ#GsqD(MkPyrc0wg z`ekS`0NBU)tl!dJULN!A1jcswp?KN-W%pwg#PDj&Xr&&Y#rrMIgqdLjWSg}D4oiu( z_Le3(mk=AgSCNdiL68t=-U$5iaF`J#YV#+gj0#(WPOI&_33(s7P=XGpmP;@^qoY#2A=AVz@d+!V9ccbc4BmF*-8 zX0?P$-8$L&$eC-5yBh7$%&M!DxF*h-A7@_TJ#|gprTfgw>I_cvB(4_sNKe%uD8%|p z0UfDLd~v)u57Vbx9J}qC-EN!j7Q4rOa10x6W0;47N*V8?&kDx zJEd)Mo7yg$JN8l6^el|QZBvDEwryAd%t25t8M@}Ti5`8!G`04imJu1r00^2AYb6T+ z@U|4W0cViz>CW>p-DsBX@(b=}t}Am`+2mO;bm|+XWVDXz){`eFAWIvpGI?Tmg)7Xg zY*ub1Gdpv}@O~Oey2-mry@|Tc^?5F?3mkgdP^%?9|A_|gSq6f`#A@AWXAT=#Eit8m zWg=2;oSh#^rnHy2R4Y@a1q{oX{CxP?BBH)&8wFyaF|;<$@Zygj`t7DYj8*Op>Xtuy zqW}OP07*naR6NtHo=4Z?1HXLe?NntwKN%dmY1r5n67cd8e@vVZ?=$455QeX&KkWL$ ztG&Lujn0ngj*$jG9Z!t1!B@ys*`J%q5J1K_^6N|fe&TVjL#)MhW1#IkorX@8{?C8= zBhN=xLMob@VZR|>2fUH$ievX1R(EtKHHC2)JmmJxu(=+@PCrxj{792+ zLuO+i_Gzn+%K#hBJvdyk0*LyQG4twKV_B0IaPwrx^q=gY{W6fQnvfa*FaeM2swo5g zDJ)h?k-(LE3V>yVxubPHhHhc#U?E>daRAM%(%Ks+(4bnPjOPK<=3iy2JB==ux6%(i z;tVnPZFJ-6*)#^=YvEvof!N)`7?hhiMKZ$MyKT-`y%FmXZ5|TKV=NP^3PfrpNov;B z7r?BVx@JADI;XDEy>w>XQ>Qr1I?b)H4zXq{Y+n)DmUk)FG z`yRg0kKtppvDt{&0>0T8v_PwQMwFOI^9zk^xTB%TzoWNOh*-Y(}&x}!4n1$%@;#n<38mwl?jO>ULev2G3N4eWoI;&_%;LJ80 zE@M}T=+-=Pg;YPe7NDb;j3pACRSc@{k|O?epTD{B^FgZy;o2{}M296j?)vH1`u~2Z zzg~2+KyHTL9R6G2CV|?*Xgm&n54h?3-TwU0FBjeIi|0Rl!q-o=-NFL&XV=!Z1^aKr zf>xiAxh15efy0qFUia_j9i%zmE);Q}676PuH8$T-;qO=dSY=Q)OfE{qtOfY?Md+@A z4T88|xTjz`l@lo0Z38WxP_z+iVMm5#%+9LHIxpU5Jxce-{IygKaP?c*I+(^n3^NJv z)J&O^uPir=;1=do4-doe0yDSDnyE^IHw(mCY4T;Hsx&p<9zXr{`t#5H<$)_nnpNE* zfB!wdmiEtO+g8>s#Ux|J?>0;y-ZEi48LCB7J=0zLfGQQ;=;1r;cIlQ?)7)v+9jbkL zcJoG?TO=_}Q09EvL>j+s^3T*!q@uDQ)6+jxRav^96XNhP34*uqi-1rI$*5j$0Hin^ z-uXC&0IWMJ+c;$b!qX5ewY@v*cS_g*>MhqHpQ!iV)ppWtgp@m$ZU?)Q@-1(GCtMgbn!ud;-Sc5q8_Shi&0w*tW&k#yEx@BVw}=zHMZ1 zrBL}&mC;}p=g)wl>d`)h$BWao2Yk!<$ni3+0ll5$)6SOz*VMdlK5XB$4Q|6M%A666 zidAKIY1cQVi=1ks1+{u2-DFioXMbZQf&*M~uwwUyhNH3NQ0;PXZcwB z28n|A!Mef^3RrsF<((k_D_vkt{FVBjZ~Q*!FLFbgL__p?!aOz4{P}@@d-(r+u-pOr zyTPBc-h_X$+T7C3w+we~a_ZB~es`ZUMb2&4?IreCi!X!2&3u`CNfKuMw}KS5znLgi z2(uHB5+Mr5XaAmgcs`PIb~MvWad%qSRXFqUcX#{0Kk!pIlwZw$v)#Y@V%w*kZe4GJ zLRH3X&w1^B0r+K3!rsLT0(IN9q^jtGq&uzol+QnK*sg$akn#gks*~tN_sp*<9<-UUWAT`1c z2}Vm4jVr*8*da3~JID^-s6{$GoXdo2X3A>zJ!mJ$N<)@4qdc0SA|Om&q>Y8;m195! zW+t6ZQ&qTc9*$M!M}vcI7>01h2mmeoZDNJPteRhMy&zL%)rbGGcp$5qLYY~!Ca6pE z)II0b#lnU6$2?Py)CcY1b&}O<{&RAwHDxZ=+5`u7X$X$`n%tu{x0k_f=eGI2@z^|$ z@GX2;9FDPB1V?nIhsB@`5j2Cj+(5+J$DH{r=PTHI+0JXoO>uL3pJO-QT$%N_;OmAgG2NjCZh^CHqNSlN|z06{(2Bxt*Md++q3OdTw)2|3-19ke*eIrH?QGt%5( z!t8VrGtMM9LSjFN)`(7z58tMsp3pDla~=_3twewR_+9BxXq3FyLlfm>bq@)>Wek?k z1tq#zM0;B2WRa#-d$Eqw#iOY~2FxZCK|!-r7ytB@|M3zpiP18Gc={M5H!s=8RUa4L z3yDeEpDx{wkiu^ce7f0BA5(>|TmJoTj^F+k{xY-=_O#Kb zAK_s>0M@(&R?0reyw~fPhr5sI=IhbZT1xG2L9uAqt-J0PS+L-SrE+ti=)Fgn) zI(3b=!4agx#m(aw+V8VczdjVQBWyFpa0#6zM4;xZE6-o?KmKz4_rLPbX&WzC#a522d5qPk1wP#dM5?wr+W*)EXhJ4mi10<)#dcwPj}9z3P{ zSI+xYC-1)qd3xY@oqVm?IWaI6v!t{-v#w(4%-M6&saV&%XH&@i#Hu7t}LvT8&YU7A|ZzrdBh(Xpjm zR8}p7WObTl@}~>`^6T~89>;)*s?|IoK?O52bPc*SuKbo&#ZRU)k<~AN+a7LJGT%)# zX{7C>(b?!T`V;7F8TKu-rK;@P`O4M~6##Vm0TWb&_Cd|FntW-H zjjGHDcQaMFI^h;>t6nB+rCK2~_0FWk5&2m0+Ln+L?znco+xXnM6)z@wpae&+p<8eY z&-eM^c~eOmR26lSG7o+GI=;T*bz-jEsdWyAA`-D4r!d=d{eKEfKVTl`N#K?H$?aTc2m*dMfMdZ_tpYHh-Xdj;Cr`Rqq z?sMMqcAImCA}^cw*5;8+II}7xa6YJu=r0L_t?($Ws(H{#M1t1rWD$9~N1;>!1m2)5 zR}!p#F{i^AN<)*?woKCi&(PL47L7<)Z;8!=J_9w2g#!bFqGM{^s|LPy{*K9>D>h0T`schm+9 zP?~9@tlpplQ4fk4sb=OJ&CQ7s=|-5^YJ;iFh>|=wO>L#jiElV{VbcPD`KFF!(c`rZ zi(CtFjs8ZsL~0WC6S^^g358(_#VVv&%y87Ybc!!)0IXr|99WqXe}B!tT=~AKxx!$v zyf$EZ<8$Xb!^XVHiz67qksLEpARDVj+`Uz0msV*}@kr$uf;mgvLbAj^>(@U4WrwO?Ps4JT<)U zcy?`_txh{rG9(?s-valPQ*$n598henXrMRfh+{fiy)b3Hb;?a28lD(l?8w3c%84`;xAwDzhC)n z>ccDl?}z?b^YcD<=}FJj9P_xx?KOUTjjwmP@WWGH_n0F^xG||F_&S3N+_w4xdgB`( z(+HlF+xY{ZWkG9S(V`1d6)|bx>gj+|Rcr$w;l!xD*p?~N3pT63Lcw9A5^iSBRM>a> z^O7KvD$6lX4G!xe1{0-LVEx@QXGCFnn30(pi4j@N#gCbHV2->^-N=y|z}+~@@I#yR zwXC6-#UwgJ$-zyyWbRTYuBPU(H@{x|viYU^8GMCPuQz4K5^+2=|U%tOp{7l?aiEW zqq#8_nu(k)lLHn8TLXWc-vETjI7wHTQ41bKp1e^34Q`7;cEKGZ(m;34@-MRTkBV5* z1SgRxH!JU!7Dv1^E{h{JNqUX^+w1&?-JUv)2&FkdT0`6H>B=8o;^R;lZ<48KWy)x7 z&Scro)<9&S*XXR0>2ft>Wuam?-QbzX%&bqBS}FO}%3kKA)JTSMP7`vbV$#&mU@&hq zRSN-}UiLnux2A5~dXkHYaa$29DWiqWzVY+3JM10+^EY7zQ+!N493PS7=?bNzHi;z6d>M|1zJNzuSErvmf-Adp?DA%iCzzS>(f*lh@5J7tQ3pK>`|G zlH`smPygLQTKgzhHX1;qS9sL4zGZ|mmZb*FIA=DnH5#B<5pQTDLvFM~4z*@I;_Xf%au`N{E>oph zt-{~6R0D5>$CxKB3nrG;Q%f}*g<{u>>IP;x#!&<11gaY#Q5ey}{p<0pOI1rzTiaDF zI*hbm9{8_=9}aYv>iDPN<~!d%$3H#rnp2N7I!(`xA9}pAZ05^wQX*<*L9@$uYrg)j zl0j$UOiV>8BXooUNX$%RWDGZ7Ijku2p5;U1p0D?LJV>+4W@2paXt3rqs2KQ~3Y}9LcbL}B;7~cXMYOwjN)-5Wfou!Pi(z`Nmzt-u!?7` z9@XF!M&zUoD5LtSaY6pn{iDs#SHE_v@@#9!L<%GECHY7+qnlcTwdK#^S<(W^H@9v4 z^bS&74|^Ge^x|2)WIPn}+l}K3zx_PFzP8&TKv&PFEuY`p z^XGiBZqNJM(GS3UJ@D?nuvi1kQ)09FSqLOjshHu!5&4k+d>psr5Gj5=D%H)D$efVk z$orAM-u2ge{u4RKuz6*{T& z^uU6WQh7@H&*)IE5353X9ZM8={_*F{vrtRJvaWLFw1cYFo;TEb(eANYpOH2y!8#EU zGgE;`JjM~g%nb3E`5K7S0lqLn3t~cPjD(=Hatp|p!B;M{vv7D9F2t_fh-<^e**9K# z+c(=c`euFee%ZWvWstUQ_ufHc>-3&$kEtB%mD^^LxhpFWLv0O;6_*K2a@MG99E1zQ z)XmyN4?Jd!)P6^Mjs0Tx+qhnPyZU%UyZUzB7y~hw$(V}Cn26r`mbD6a60M@gYDjvM z62Gk^bgKBb8he8a%_K2PvyGsoN78tp3sM?8X5xrFWgxxzOcFlT4M%FGx}ZWJgtY;m z)@3C?s?y|uG3$WgOqo@fy*%YcBin>CNg2H}4N6m|F-VhTR=3j{Sxz$NO^R1j4A$yX zs^Kg^sNTo3{@@&ar0>alq8#NJGGdA;rmZ^rtV`v0NT&!W4R$~B?>GGEsXx!b)r$*( zbne&w$B)Cvr?2^Q2*k(D{^6oOzO&12*x_xxlx47}o9_)MEtaA}Fp3n*P#jao94|SK zn8(C|fO6mD8`|zPm!LV1M;x#G^$T7Grt-s;KatkeyOs8$5*KR)0YNu2lUbe2igTCJ zIpl_{dB5UH_#|Uhs{3jymssx-51Ov@fdMWJ)|Ia=KIZ>sr81eni#p2g%Z|r`EW6NSi`47Q;eL~ zy={&All6CdzW^Iy4QD+y2aa#~Z~yUf`x>|4U+#Dru*Caj&!&HTo&OiPe;D?>@npzr z9$9!9h1v!xRjm#=CAoA%6r9f1rEwesVuo5NWeA|s+DT;0328>&j=YZ`xjD-_Uhh+h z=4$iiT~tc7)?T?oNqQHk`=SX z#f7|4;cG82wwlgt6}DC(MTs)kD^-+DT>xcw$V5)ej1XdK%$&qA^9YR08F|1C>Y$E- z0V>~53JME+qYIu39PG(XG^r6gbp@`@OSi3YYgVexwprVK+gjV2@7>(JH|x#3(bf!7 z-<6>)aYQBFMZhd0PD`2EIuC);`{ojx6Q^z`odfBPZX9Nh#GblNU8a2S{uC~R;*AwEQvC*vHD3$j;53)va^Ls?1eOK6AXv7$lD#&p1( zjhc`fGv+j>=vJU3RjZ?sr#!ECJ+HvRqC-!dMo<=tU45siw_lc3`67_=BHZezUC3EN zMRY?e$NYqcx!9Ik6I$c9dwv~!zqhK=v;}^E&HB~!TEjE z{<2u81mx{hheIV@2E0;0d$%!%C-X=%?hO*Dcz>~Xjn~e-!A$fTY#NYuFu^* zZ`@XT{Rx^$#)|k>+X=RI(Nl1YaKD(LZOtz$hK8-l39DLE#O?9=>*M}1|MH5z9r`*g zNG86``QB|a{NbK?9C_?^u{G(RkCb`KmBn9hf8uR(EE#)^8|KML!+^Ejn%r4H|xi#y~{nU5%X1!b6 znlb+FpVzU z#rxD{YP;nVEn;47(Jwadu{~l7F_9rgT0~3DEe!OFR?3+ra9W7J3j@|$EK-tt6NId` z`m_ApJs}XKzo&VstY~D##M>b0a2+9J!lu$Z7W(0UXLE1#nkNUf*%Wg;k1hl>t-= z&Y4}iqAmtl1rZ`cN%CMe(IU;-l$^3y=#5r7%~~3y1n7%>voqeU5Mihu zkW44jkcqVQ-xtx=98@w=N$5);gp-7(Sh>Loa0LJUb-e4oyDE*~+@oR5_b30{_&!pg zHPGohtC(dyuaf(z)T%#OX*8>LQ)Q|C70Ua4yv$#J$^ZE3e|?#+G5}5b-0=@6u}AJy zVF=5~itYXx>mF)AGGbX2fpIx7_8KJ!!N|z$8c8x|+i+4Xw_)8Gru! z{Qv&->&WeI2Y(qEngUGR$PA4c$51>T_SkLT-cJ7-s3QZVZb?9)O3({waLuLx2+>84>VCd z9j7Y}P~}=@gi?qR1gCONj?`o3k(iNFnB)N-R00oX8YP6)YmX9nx=0k`2q#>*0bSV1 zU3o$7TM7EJyKP(R&G*gO(6-ilvu>@q^~Tod?)A@XW%AO=+MW0Vgeo2hMurj+Wy)wy z^~4q$grIQalFze<+H%s8^z{uPgu@9Sr7^ib#*w^E>qo}Sh#AN9>(;9hcgU|7Btxl~ z+%~pWd)HfJP<`Pi0lppr^HvtV+83o{b??$N2V9xK);c*Jhg*f_JITip`^DQdXY`2& za7U_eCGg0cQVScwqvqH|vG8xOVhtM$Bp|rL7=-1qf(ytnu$zp@(uNl1zKRr)rec!U zszDhlXL#{Yi9E{zMIa;1ye6GugBPD#dt!ZH0u2%CgKFhW!x9eg8Nyc_B+zb93ZUz1_K8iCjbB-07*naR6(Gb zN~ymDiG?E79a0~Wpql?b6Qvf?u8 zTCLxXj6?!+=9r7t$kdqa-IaPMW=!({XlX@}E^Mq0Mrwf}tibvtqG2R=XvpSJPHiI; z%4mwYCvwibZu@iU82)sj66&^6phztFU>S(k>HmEpc*D$9`#zc!EGH%^co?El5sip3 zI<{zoE_1)XK1zz`Bh8$~)+|#VvZ+UM7ax>M)e*67$NKHgt1g*Ln}t@c{RjaOITu}p z5V_(SL0B_kt~=|D+$r&upw%i?XBPkm`*L)ZZn9(wZ?I4#tfEA7;VmF(2@(OdRnw$} z1o1n0(A?g#3l=^~h4f^2uvEdI_yX@@UX(g~+Sy8zLZ^~R*5dcv< z%Bh}OA2?iq7lb^=>;U3%(@FV|O>|R-U0S@q*wcm9(9Dq)cJVgh*3gBetdM1fC6H4g zjal^NS;cF1@#hcyPsbw;emU^L^Pk?w)5j~eDkD$P%yR4ee6=57eXqwdm{sBRcC)@A z`Q<;bbFixiyrLosoMBzfIzOjVghN*RaB{ULo$9wG!7PZrDBJvAuY_dX0DubCUsF~V zr)xC}+1quaOr3~->5!2r%%Xo4GZd+S#?%N5L#MhQ0B*wY{4YeebPXH}9R^ymfD_+1BCa?!I*z(JB(Y(Vga6%pBLFk>&jn zOO-b#MkpfZ)QmZ1+n+p8@4oj14ewr-ti-B+FL`VF*}`7P>X)0YuC1XfeRuQLFFJZ`!#+#_Y+KvkTYJBAcY0+8mYAVLdv6a4 zA!LYjk!xf_qB_S@?mp)8WIrB{Zm>CGsqJAz@(7Bk%XTN4!49 zBao}Sus>f~_x9fYn0alFnDEvyU@VAoT^MTxSOiZAE~@0UUTmFL&7v4I zD@IopPXuWB7}wSyS(dR&oFh^k(1^^`tgdn*43P{l&I>mvE#_gpg+(z_aKKZ$!=WA6 z3~sub?S^ght=VpDjjegxuN?eJIO9u^wrhgQIp7Hd%$bv5xamF1&YVa$trR6m_Qv6yM0{cnZC-1^Yjnu(6B#J~;F;PevR{-ZJ;LJklNvLWUkt`${vxehE zCSZX-E}dtzt7NtTVyrn9D7Y>~$jb8ws-(+=lb(=)g)$ZRj>V!m;4JZyT5TN2Rm5rM z3jh_=*~l?8vlhdoStQ0WZ+HCX3tvZEI)1p?`wQ4auLNubzvthT@&{`JC;$f1(&(AB z^l5wBHhXu~$Kk&m`BJ)efZ${5EAetDGilwo#%7YXZObt)G^dNQr-rMuH``VnM5KczD`Y?7SViLvD3C zn7zSc^#>akYK(5SS$^28nLb?nc{5)ln#pA3VqxkBsnpkqc54zT^Lt=FkU5_^uZZ^>J~Vv1>fBXDuF`nk`;w4 z(bk|H$B38X{`c40w-^&+=y7E4_~V~^d)L%>`LsWO+VdD}om;o<5}M~R%sJ*-*c}-e zGnG0)Xe||kk_%cp4Kh`JS<^`(k%~0>+Z10{1*i;!qJH{%4p&_>ZBYU^VSSbLDm+)s zB%T&+gsX9o@M#^Ud~VeY0lPy1ARR=36tbw$f&9%^l4^H*YSA zRyD-Rw|c*#LzLsF(&ZR|W9D(_G3F8TF>}N`W_$k7(}SMP@%3BSJ#P)S&LM?YBM1^u z<+DLr{8j0{!DN_}rkyh@=UTWYlbHv?ErGy>-8k8X>_M}{85Uqh8Z5w8Z*?sJR$pF; zW>{4bP7om&&?~+>&xe{(hHwsmvTVF)rtS~(%$D}Z7SW7tnh{&mF+h`r7}+GBXvQWU zrR9}XI72dv>x>%u#B&`W)&jczH4`%>BJC~4Bh7eDALNqczYQ|yz9YFwPy;W6m`$$T&k$4fEgZvQDyFDR!*7#wB(6` zn;87=#EK~Om1xvb!mJo%oDY4v>X`R9%Auil;8);~TM<~S*YVWf_{eS6#=3F*?9BknV!6pjdBapGjnHWFl(JV!oM zXKz}P3?VtCLK-B76q!=JkQNFHpGgl^H87Kq@ z0WYP6LTP~tbvvS7^YVKILXqMi4Z%p!{hBfY@n}99&tR zrp>t-uMOR;HEi8`^XBFo`sU57b*HiQ4QAe}b}vpG z$$@I4w=xs1eWEU^th;<8kC`()5)gCZe&{cE{&`wtzE50R{*d+*h=|5kf@z}@gqMn| z9)PIzT!{L`=Tef0X5RhjxxGK~L(CtuzX&9*)CcE>i~ZqKfBMXJZFcEsEON=&zLP+m z+ze(_um+{h7)~sbo|SwgiG`TcOi&_)oH_5o<*GXoIyG>KvzEdHfRO8~2VfDCs(g5? z$BE~-x&U2jWv|v?f-`fCbLQ5(?mr0LxXT){b-J@xyto^T<+Ww;mRirbZu!^$JpT0; z{=YB$Iy^xk-w{XfUE|)y<*8*%*XGV-!;>zle(}!QigE*(W#PsTCF>uW8a z-q4<0&3$k3SvoUBXrzwucpYE9#b00fwp2v_DP?0AR2Po6B5=SK^QgL?3npupHiufUvpvt{mqh>84nGzZ03XpQu z&}t@v3u?;qEX3NvQR-F#P3ehFirS2us!-al8#~dQ*Y2&E8@7ImIX7$GtkFx_?`*BX z3;MCLPB=SG!f?%@E8(jmVj?0chbU*{jJS_+pW`;>eT*ZIk;llFk?rZnXW#CRcEoEY zaCtrU?yoo9=J5o7I3I449G26NL}mFeA#pOLpc`>S3t^TaBQL&?<6b$;2r&G7(kUWh=5Uqe?2FOuLWV zob;T5pYQSKgI@z3Hl*8#89ov_O-tan;Kc$}tvv6UO3Ta=^9id&!Cl&fN8n2R;mLk@&kvuuzwfp;ZcQ!%R)*12wq&iIDjI6(KWkX(XWB@xWDYd3l2i{>J$T^I33qsC?S{HO7_+Ycp?oj z^ag^>jgDppRtmzY`PI2Toe1^)RsZz`|Mr#t6<9`F;E-MizuZF4!VILOfV&y#oA;jY z0tuyR*Nm6|>5j;JJdOt*-{!Bk@%164etO?OzSI7G(^GHPjVZa=`UoON&cGa*SzcHT z>Nat|#ix)rPgX{=nXk`zj`-y@|L50y9Qe`ov8+%cAUoI8!gY%xD;(Zvr*(^k<`zNA z#8gHUgQHB$R0vZGvCEL4Au&sr2dl8P#G3w3Y@bO#g-p33c^6rbkqcjd9I0F(jS5*+ z%C7BVm7ZrRi^QrQBUOh!)X=&OU;}H$=DGzJi?J;Jxc_gcha1xUWX2=qnK-8K|1i8jPAWfMe z_$mut?*6*OmUyPVnz|YUNEJZ*JFaTIETlk#$*4s$_?u90Wx(}>&Huq9ClAs<#bEnCqxF^1;LV7X;cT*0P%(2E9QY^#Jv_KYv^m>fLzTJk? zTJ!DN_IFdXMQe6z@BL$MeZPIYjWKxy_T8SIw7+Znht0071|c_?Ln{g|c`nU*n+0+q z^~$K!b<(9!QmLF%Q-p=W%<=#RW9Z9EPHA`b&Dr2*d<;tXw0Kv`8uEmUwL&J=k`r&= zkd|HI{5r)dab#7R$d%oRGt0hqP*nAWFNK($f+Mf;p$ue3x$i@nny+ymdMM`t$``x| zh!o91)(pCGz5scmJ4+WF3Bke^dj1&4YyR!$`0dvJ_M?6NVYVNY zmz`Ge*^#Ypn{OU_W6s0^;;9*eYi5iG3i>+O69ZsC5 z!p9d4$EZL!WrA*&l1U09qR6w7Evzw202ES|=-E~lOP(AOB+tr~(+O2n`7!F~C$JOl zxdWGGZoYMHHR*S6j?3m!wyk-yPWP=@Yu*}NpaZntWzOm$EAYTf=M5X{DFH$`#&Rdm zz?g9y^FHU1kNb=x9*_C@$lK84h)3cE+&o)*zMA{+SMT1t9eeo8!IxoXW^LSb6!VuF z!J`6_r22*rtAk1)JY}gWhsHYFsA(MHk?Pcp7?Z;>X4^Lk8G-VSM$#>FR#?f2tems( zn)yYP&WAKYE`^&(TK#hd2)0oXv~EO@%^aPDQK3JFE(IOcxc>&{@N(Hv-0GuwLG zyf)7A0W39lj8sZf<7IyN_4x8?_w*xDIo@CUr;qL3Q|r&s_9ipCY_{iz=jVAlkc^>z zX>8dp-7e0J@CG+J6H&PwCAqFk*F%wh!DKBv}F~5z=6Ea851)0jc9Ys*GK;E zFEbP$_x3b%-?=v^j%xJ=*V&tqWnwCsTx8O`mYM44eG{C%-2^(xXD$jv4G@)}(<0LY z=3WPz``Qy~8mK!yGpR&IiS8|xDTU@#%%FOsM=dJC-gwE!hwHZQq?6XxH&Q|@TCE=H zO=H&YViB4d2Y>!G{{8RqKX1n`1CwUxU%thcOvIyu+m_9Ven~(^yEMPrr+4iS_jrIm zPekBi`SFV93x&{_IdX)|to6pN7vJ~WF-OEk?Iqi<+fL~Qr)7oo7f4*^f>?uHq5P5} za%zp(F%`lLl(K$G5>vb%kt%3(#i*eW07K3cxY9jxen*V!UPms4!l|vxOv0=tA>fEC zt3M(ES-wH`Ck6aF$(f3R#%i3cEK;fF3amU7SV|7=gs~cib2oNccT`YY>)zbVRPmkO z*!t$)yx84J;&hoe^K$mC|EZm6%@pT2QWA*FKnq16Cf&4LQ*U~(?;HT$mjCr_R7R*OuYol4R^4kn zH$c$XHe)CPndFuhiCD~) z8kJy})ssq~vfB~}iDtP**sRW%JRhU;*WmX{4lBx^732>Z5Hvsz=90b^8%8cI1T(p` z1qPs)TU*)h?a&DqVodT#4~^8{|o zv;fs|o`yMcOhj-71azsBw33GC$oX>I?{lcpqhFe3o0Go`e4Xu=!B0Ei4ZYvy)6U(@ z)?dSl8B7VOtSbgoWy7xbz4`!_OJfl^fC8~#1*{>11lX!=ZLuUGyo$0;*^#8`0D}TK z5;IZHiI`In`MlW=gSVNlkcdt`oBs6Ff4by;rEjqA%i!q{Xl|tCdZe0nU`F0D$Gm@i z{Q715{T06rJm88XCNUqdZ@2vR;_qI`Iz&-V_;_Nn_WLW(HugE&(u#Bzc|-tf(84m8T@?QPNRyd4d%^pT#s>0`ZF;S zV`wNx;F!vD0t=xMl)~0Prn852O;ti<3C1e20gh#XY|BXl2$WN43)ZZk(WrDUdjSc! z&Kb6F+Cr{S9@t!{Dp>x&HCJUegNt6kCDkZLb~kft#*1-x?!B>rjlFT(8ll$Roz~sW z+?(9pSq)2O?(SOEXtqR>=h{&wo|Kr1NQ}T7F{Y+s%z2Es&m1~#`55sy^7fLq$XD?z z;^uiX9;`rt>(z{;(_PK_G2JZoW8CI;X~#Xbd+ZN9hK`5!12YoR1O|CIIC?^Izyl0-*rWQkklD$KT;U_)giC+N8wkMwb~BD0eK^*U5x~ zNhH&Z$)K_vjcHRO8kz;H5*7eX(m_{*TB1eO%4c&#YNlquOZf=Qq@+ltSxq8Sn92^r zD#wE=Lh^j(RM=5Xe<)m=QO{KUQs+vrYH;c!sArGs4{YmtK#`9oS{;u(p~~_m*n&D) zTnTIPBnUrCvlmb)J*J*Exa0kXf8KBjZiYWy@uAJ@)>~tJZM9qwG&(XhEBV31!1zCPw__{V`+YIutV!Ype9 zkCZf7sg}$5ldFO`!8&D1p2)H)N(I;;z=&k((rs%1)EirwT#C;KWMxHKRDRupKO!Hu z5l3d_rWxo=!8d%k;=ducJHG@1xS0O&ihq8`Pw%vm~uL@Qj_PIS+T8zWN@WlJj- zG$Lzi7V>+}f^lY!897gRdYvr$zFnWTAF%!X=gS2@ewmL)81wn++f!5K_?EwX)6cKG z&G`J>{$)?Q(rM4m%f&zMHD)M~);zR^QW`v@Q<_%jh2}CW=Biw-_aCz|^oK^`NF6gH zFiTjTD^EL935*rcw#MyP9Ya`DFj&i5%Q8rEYPoO#x zyj1xuD}QC-x?F#nRrD9xs75r1q&IBl&E25O-a6sV-kpu!(9FEky}7%0npba^qt?b! zdeT-oju*aQC!JNVNkY;LWnfGl6Ek8&j2MqGA2IIpIO1{S9F5|Z#txJSx_4eX#d z^p0(B{n`8G1!mLD%@wtoL6YNlyUckKR%zAwl%#zhlYwOlTj$E#*oy-1NE8-Ss+E+v zm|mxCDb3u!rx`Mh3|~BzmFsPc$m9&o%;^;x#v`JpjD$@wnVFcfnTgd0 z#4NCWxk6ANa#W{OB@1%lly76kNejRIpG!nhA)f+}|nBnOK+lNB7YwuH(TBS6wC z1CxtkKFi7gYD!`@=TFc5e*}Jhz+9g%_Tg&ReZe!eZ7p%|EKCrdn8MaY_W69+;2qWQd_Tl#E9D7!#wFP=>LBb^hts+ z5QNbTIUEjIy;WspMqGEZqYvgci?0C^O?Gv6R>ZyTW@nueR4&j8Pc8zS1ZJ>L$Xy00 z3)Q)eX_lvMUbzMlx#QEPaou$tGV-zMe8Se^U#MK-#k3O-R>ImT~C@d9*zrgW;!a+N(MqJzN?@0pLnu-_16Jw; zYW6~TnXDv5EGc&yG9^EvGip3D0vUWgfxP~i$G_1~k)uX9(16X&$=1z{X13MF>qb+r zJE6hMU}(LU48Coh-bv$;7QTW{NSXyL5q4LxL1nn}&L?HW@<<2GW%xXy9Qm+P1l zPtRiyz9hadpO{}9gBn0kNhZ}0g)}2mot)5`B<;~$i_|>1S(x2Bqbo}S* zR=LD9SX^ZOS=o+%`@l=A5k?*}|lwDW#2=69OZnRatY` zOioDRjNIT7X5=WF;7m1-RG6hQ&1WhlIU;ikK`D^nT=j1Wan{&WUaiB(a!4l@b#Pn) zUzb0u8Km|LRZNV8dZM{F6B^~^9$VW)J?YWhBNwVI5T?ro|H=IAb5m)|zkdYcQpGSU)mtSsw{Y8KI!av`5mA^Op{Y^h!uit!smP;8l?6SYyn0qqq zew)pB=Q?%Y$4uZ$7$)w9E_-^#MSy$gHVPkBCR8HQ>Yji_W~2m!Ffw;RVVT(14NlU37n8WUidxqmS`R4v$Zqd zrYVHnd-wBQmxrIbZ)UyAeT8t?!nmy(%hrVLD2(L1al4&2oGdFvr5n4rL3hme7kj)X z&c@SO@%KcXnwlI=e>QJLdH+O=7(?Yo%#0UFV_*dFdcWx zT+Jo|V}icM-PFO zs@E`Aaix|N<5hoMd~ZFhs?X@~^_!a{OG~AZsTHPHzpXWbz}Y~AnQ01{-Fk$`td0aA zB($z7+G^RtH8a!H;B$tAX*LBUI<2SDOwNf+u z*JW@3ct9vK2vCe$%rEzKaTBB`<$>}m`|TD729^Zd+bi$-EH^n<>dHj;GeJa ze|Yit_x9o9zYKgzP65yiz3jZYpG@>AwteOZWnyHa946&0N>yQ7gc6*Y0bV7ArZl8k zbh-qp6K+&HVs4J=r3iev&W|tp{G!d&n=Y3YW5(dmpXa}P*1rss@O|ss9*-wHz`8+1 zb8GIc84zsr?)`kG0o|&Vyme0^W(S&dQvRnm z{_Pu{-}L@?kKW3H2hyA=!nz{-?u>*Y5s{pz;mUbAckJ0r-TCXMal4N5{pIw9PtSAC zuzKHEK0Ql;NP{aQ{~MnQQ6}CJi701Ez=%k324*6GD5q{}M9uz)I{nI@LCe3x=&Sl- z)|+%Bx~~VmM)rJNwFzk@oE)B&N;-2R#b%^rUh6B;R&ZNY8nenvQy;;s11AlX!Dy{=&fLt+H@8NfPCR#RO}$y)=&shRwJa19 zuek}Ow__et1N2o^gcYk)*Z%5|B^x>G;D#;HVp1?F=)LEhrSJ1bBy-XlD9uV+NHhm+ zDwSb0%Ty#~>7@5P@j?356RN{%%ZGqnC1S(OzA=2Dc}(v_}zHR~2!9;IXY0o>`Z zZd@H0fQc?|O^bG-vTmee_SAawKJVK6u<>PBNJ%2G8SaUPjm;p7k`2MEK&Ye9yF|TQ z+fD>qUp6-`f`{HIV@zctMh<+r=9k%@=X^?pbgS{_H(XBnhb{XFerdmd-+oGd{;Ze8 z$34G$)4#t6sXvNO6W2_LbMj^6rCCb_a}UJeb?PPS^-fsf`&1&N3C_|cN+YxiNP3~;# zC1@2w(_3R()0nN(-`!d@kqV$YUKQ`=s=fpXWI~oIexg*raorKh5%ao_ml1o!H9o)G zBJAlU$IvzKh56icHBRKsIZIqo$0SO%%Eki%q8V(ISzN6FM22mhbLzIMna$8XH6r(E z8!>(E;bo;xxQIx&mCez*)4T$$tvB>;Ta%mj6I)XmBVp$47<&(q{8yRE-xC9eyyB}U zh)0%UCems-SknMkA-h>d&}j4op)>%FG-_s1rb5tU@QiRHol1F7jTxEBjIdCqY6hDT zkzxd#*_e?CZf-@!>{Y6hMHF);(h!+va8i>tQd5k2tbKJv#8(QWp5678^El)eA5~^2 z$h{(fP}8R<0~Z(|x%(@3UhY6!At^@ciL~Z|`|`ago-08e6Tw2V}(+i@G-HcDe)gY9uBW4_;*q%3$br z&6ml~LtnyHZJJ?0c>C7>$C-b5(Wm4!$<8+yr>0~-Kj$yQ_eACj z!b&GhbLcktW#nF0K6LM$)YxXb;_J@a|@%harvDI=wAnjG0z`bJ_ka*H&D# zNg0l-QzkK$V=^-Lh}(#lecobR^LC5t4Y%ujnYx7v@!yR*G07;toA3iuae~T*3hVaH z!srMY;my0v=PRQOq%gul*dkwcZQdetX3vc4RE0shIc+Mdj#)5oogFY^Z|obqD6HC) z%Hr%5VpJt_L6#zcJ8e7>Tdm4yz8 z<~A!m#FxDVhnk9RYn?8s$$GKCwB+=2yL*W5=Imx~uJN2k(__P%Ek4|{pK-Zd67tp- zmj>!+Ghh8OYYibZd0cxyVNLb=XZhFn>)dbcI&m$BDIsABZkRLnn`M$_=X?C#{Xbvl z|NXNvNwM86=SwqI zAYcWJrycxY-EtAS&iQHZX{Hr4pISi#OO_M1PB%&%Q@5#$oS77Q@7`K^!VS&QDZt$7 z!Y>mt2y>VNnpX#nn|U)j%-4J8hVBlx?g#WqR)lAr z{%&U8muu3^*GkT{hPh`Z7tyWEWEB%t`}_>eiJ7_2xQ+RIo7cI&#Mp7Y<;%+)JDww7 z8m`WpYt5JBQG~`w%J9elRr+o@(cTIzuqD4wHD`&K& zQgF0FZQRLbbhFl~2m?-f-Lo#UbkL#0^&Xty#$3(K%L#;68o*ehmq=mOH@(_Clw9q4 zc1RJ5E?K^An3wOK#^myM)aEM^OEwqQJ5sWVQ13k=tf0(JG@~@J!5UR-SgmsP^1kL00RY_%=u)6qt&%g^LX0a2b!*WYB@9>* zMl2S#5ZbF@AfQ7jr^z+J)cbi5Nr4G;kU?Q!NrEOM_%-7Wr8juuz#i zEfYhWCE`kkAckjAG)o!cW@gyBn$yjivxEyVGty>YWY&XyBDS;Dbx!GGywFCff%gUh z*NM+NE;G(#Lo;GpIm**TYaPvjfWk<*foW~+XcS>?#+X{c;Kj{5%{t#dazxz8piH*b zWu!U1LCP^rk&?lt)qUSe@&dXEiDY;6ZZ$=mX1lZP&2EC-b$h&LYum+s|J}QP`tr*j zm8oQ`gV^{Iv$RTHxBG-E8?j1JrDdp_n&L`lOInGjN<)EV1axPJ&ZH=2D<>}qrVLG0 zT(#0wU&SGwG)7HLE>UVn7^i`5@J1qg#VHz^StA;q4ZWKDAoInctp&maqFWZr5CEMx8{cf~hDtCwZ~XBNFC+d2?w~VM_Vb?h zjLr4K+bxqBXqly%UK2njmd#s+Bn+8hfe^jF;@ir4ZR#L&u~0&9qN;sug`KkAWCHWH zYtB++vo$nBKXdB^LMP$wM$?&c_kFb93xkoF^={@Sz4`Y3^zWZOjkyeor9=zWmM4}X z8-z@1R5ggMt+tT)k~O9X*5{9fhKOLRXc@?h<`T?mT+mnjh!#9ooarLSR?n~ekU@9K z4HcqZb~-0Evx==VV{0_?jet}l&QdcRf(y7i$hCyoitk+qo|k;TR6BL380#Ofa-eK! z^p-BJjNDx4*xIv;#5|(TmQB5EG3A4(%81oO95d!n>@h~{BVy(>4r3T#S#=z>{nxN< zfU62AaS~2}1~UloijY}AG9U}jCd#3vlsu4bT>>-#mz1kJedYBp7)G@&t*G+@{KIlo z+FF*E4iQSHe$7`t)6Hdx5Jvz3RKUPp|(KwL(0X9 z7B9j$DI_u%%2$s#X^MnHDL66FT9c~eMYUaI=92U}6WKv?#%_b}&J0Y{7 zq}npTRmFE!4mm@wYR>9-U8OH#fLt4{v8;?vg6U=!B|GyK3Q|D{sz;o494(p#1w>Tl zDBUVE;y}?NOY75kB>a^XHX~=moaIKZ;hkG!uVj1H@nX&3^wxQDl!cwkMNlK4j>V40 z+j~Gn2TiwLd$P6I(jQKzXT1x3_o9zMq^Ht=H;#We>AOdsAB<;XbKcTV?R2kiXPU8{ zXx-p$ipxwS_LtF{jgfv_{D3z1+e|Z<8G;fbv`az6+DYn(5DA5f?|U$8rgOt(vy1a& zIynT)5R=^j$-oow*zDf(@x*2|a z26Z|^W=PbN6I?>eq#$1!Y^WshbsNyiGKpl{uufee)@j0uQM!$M-uIVV&Y+ub-Y+MA z_tq{a_TK%xwzt;QyPZOFXsI(itJqR_`@@^>{{72;eEH=XP)ex+NawGP?5RpCHiCpKt~+8`=^!w9HGcPssg!?nKzp82NBv!mbsH|BO9hQ-iL^7hjO?st`rH#-u zKxip9SuztIJvd~b*~^qgs@W7;!i*zhU4bB_bcosIp`e%gPbDN^r4fVX#Tca}=!T*{ zLW7)k1YNRzAN6PHaz}RSG{hK{#s&~>erh=i4gzyx=k4kFcC)eXTes7t^~b(MNJO`e zszs|p^xmK;PcNVnMnx;EX!sD3N zaPIjmeS$ox&=28rV#@)Mm8(*_vp|KYAeBPQ5+i1c=22CArQ#n`8E!peK!SG~lb)rP zu3@=?9hBPlyxp$9JiYv!pPuH=&tsEcdc1r5^7eOg`|*uGJlg3L-b_U1N*FbxQc)8h z0oR;;+dlkw_wd)xpFU}h8?aQLiEN+~*BU^l8ogUOFbbwevO?WqqC(M=s0a-SLWOGw z%}Q1ep;|X;%0#)bsuXXP374X>egaQfNvcVM+^j($HnV1Ehs2^e+znuFG}T0;)*1+R zNNUY$l9J%=mCZx4upye6k_V(C8l7$~d%X!fOO$Oa?f0uYr%K;+q*fH?m-Uyk0;U%A zyOy0f5mT9SPRvvQGiNA6mbA!SRMHb^GNBcf7wC~S^McwEEpx#!!+`}b#_+%`{z)m!IA_sY9ht=}~Y3Sd&w zj4Ef5bd1vpOm1$iS_hV<>j?V>HuBC-*5Bpc9lxImGe=%7e*b>!?>F9UY!uDR$vK5) zWb51-ty~9b-TSF+x4ctEtRNG2Ya&f|YCGlzc4@*m(`t5Is0s);w7FeOPHm2}+kNAu zadSJnHAo?tkIdM!xo@Ve@y$u6?u~hOayOaPD2lDy{r%~$&vQZvdNPP>YAUXSmpXt5 zt-gAz<-BZ%o|vALD5HDEiY`@3b21UPd7IhX;IKZpb?dF@vwFhoj?>aHqB3bra8q+5L1zUqm>ZC0%hyrEK8)SBkV@nu$=&no;LbxH1Y?c=gcDo{ zPXRmP!hx2Z9)#JdF|z`vC^C`Os=I0B4ib!rA_fUW%oUwIHmUOUC z?52eqwv-E&Xi`s{QYWIH(Uz5NLC1wO7lcw+dn&>Nl(&6`W@wHaQPC5a8KbU&dT_NM z&{}Dn-W((8l3VNDw!oxkV+P!BW4G44b&+hY(S0t=Kl@~B8pea`t z59P*G+Jc~wo(fvogAEiCXoB2kgws-RvrI^72a#Gzo6kw@lylifnfBSg-^RMHVJ$SR)9a6teyU{GL?Fl1KC}-N2d(;4<=r_f?=IHX%vi}u1gu-x6tUSo zd44nNJfN9x9e17gXBMjonwe~KI!=N&dM&*(2iS~Fr;~*gGn*k{q%{bJDcz?Dnk$Hj z7TD`Kl4{rNM1$^(Cui?@FaSXR7ARS>*x)=d0hY`TF8kE zoLay7L}n)+TIJLg<7I_rOF&ewM4~pOR6?1P$G4ng=5@~J*k9&&9tuRv?PT|FPX4&@ z-6NU=nRTpHz(CxdUtWH_{_<=5`LlkSz7sk1d8!HhuP}f5?&N+sTi>uqG6S%xJ0zIp zK62m3)64aF8uj76-=F-q>oJ6ADRxv&aA+hP?6N3S5NL#ny-v>qsjb(2afAh=9PD2u znsCvs3;RE8l2#u_{h;;Af-snyKsLHT=4e>f6faA%u`Qp9=rp4jGGC*-nUT$_4XzS< z(TFvJhgbcs8Q@-#XO@RjXV3`5PDW`MHP8V7xeSJ7ed086m3#sEoDvRYO$YTyR2 zg7g;SszV=uEk)r5I2b^a5EYsfAR2hi?9{gLym{NuSf1B~v#fLb735|{=-i?8Y7gLkz(C!2B9}61C6k0&7$pgYPNaAv>7sbZ;GBFy2Ttchnw}5 z6DoS8`775`ST#{lVd+G<6618_8)UM=ycTN>C@Dp$sum<&tswcj0RYHYl@A7A_u%?u z)~{!250tef)>q?>%pjIHb@liPROL(+sV&N6L^3iAo-PACOF(7CaVOyGr!ta}8Stfa zIuI0O^;RGBc~K!%da9L56^kk%b3IF13efdAx#g*Ecbot6S^wA1^N-JY6CPVK^Iglc zIVLjs>!gF!%iI;8Kv@t9CYf8bwUwvaWkEqCqpxw+&0%{+T2#fqcDTd zQ}cL*&lVS_b+^qxc|+UC2J;d@S=&(D{qq<>U7R0!yg8vcx|_tzDzPm6XkoWY(`>nX zO^i%IGvjH${_^G1uleyaK0WIe(SUExeE-{g`^~r`+M72r6GH4H6#*b;UZ3OBj^`O8 zY)}Lzum}J4H12=lyQkX)(oxP`h+pwV8G*=gyT#MX^T*G>{1&${@9)olc-Q{)d5#3N zEW0IUF-csFr&IDM7#xuxFo>SD5NP?JD3a|}_f=Sm>S$f}L2VUf1;ARAu?Sbz9$DI+ zs%?gsQqR=fnQ~tgmD?fg@io<3I|TW4=mQ14S~Uy7#3*KXH38KQzRq*92!-Mo>o~3S zF(MH~(&3O})=gH&ii~C1snb6*YrTe~nMZo6l)*J)i!}i|%#9Z2*o2n!R8I>iOeQ!$ z3o>bJ#(rXNZcV3+ee<@s_%%wd5nGZ2Gm@E#sj;)NF~`u1+-F>8j@++%2KRkNKtmKG zq&2uqGrw`R-sqqWZ^mZr+S=!GsW<=tAOJ~3K~%ZH;oFAIc;47E#)K~+6`GIz*0!D` z$QWjRY(_W;$Xua5kf z{`4jO`1Aa?C;Une%rH;n(>33m&CRib6XfP3thIV4QGvfDSX3G;bLzIouh;8euYdhX ze|ynW`gP0>eK_I!H~sy4yIg-gz1{e@acgkgt}p$3u~uy=Mt1<2VQjTow%(*t_aduh zG*R#JQMX)fw?u8#S)2!+r)&Oj12X{OC>POVWFXw=DgBARD++nT$@ z$*eW6p(Dj9d&zN26@T?+Gi%;mX7uK?l}uO<7$IZacRh6e47-=UG5vQZKA!A+Dm)o3 zAe5F)OV(qvYU?Y^FYrg#L>F1xuzx?X|`dfSwcfoS_YA6gtgKb7l~z!v_?p_qL!@61M9%?LLc1AxI!bX*GV4`-Kkm# zY;lCPq}Xed;Xk(x1YH{GU2&Xv_eng^NYq$Qz#Hg9g-w-d&m-oR7%*5Vd0Y^UbiRzO-wvBsPw zrZsa>tMeWQG{|y@fL!GuC0$y-lT20ID-aPY9wJpIHxC4T^?T4Vq7K|b`WHa7Zp3xv zI5-jOb1&ll_?7j=OF^Ku7BTC#sWsKO3Rx-;6ao{?5V9%=i_GR$j{s1%OWV^43qh z-1g63=I5L3aKh56;mMrw&E26UH(wiwdsO=ss!d~obd?EUh}g%=Z!bUnGXM11{=DP2 zOo=DhuT!5B-{1BhMte8Iknh5EPRbK_woLf>-0}MJ#kgewqL8NBuva;tP03QdoQ*_3wbsyyes(`K>(**r63WUgRr}JMicm~sAfrxyjKIwKyyu>A zjl3zQZu`8w07gA)}7@R zcDL5*q=wPfWw6o&iv@A6*yx2i9ORLz?6V-XEHS@Wd`gkZuN*<@RdB^)s9)p%*FUKp z12TWjW5NO9)nu1Kr2|wVm{8T`7%UaQ8&kk85VR zm}F(C0xAq#0x@6dnnZ$e)aGT;-gT)6bKzI=(#gHL1r!>;e4yVDsL%R^(gR_Z!O>Yimo4R;4dT%{80tEeqx-Ps__+|wk1 z<@6_PW@Z|_puEPIwC>Cl+d68KQdKLKr;Gjm5%*1Jx4RAZCqHe*21p8of`Xby($Ek4m~tt{RF`Jg%c=1fdu+ zN9K%*0?k>XKCSW6*ftNPl}E6m<%mk5=nXtub2n#mY+JXEc5*grr3`>FSFUCPM3Kvx zP%v|ab4SeUKCdH(#%+#0Zr8Zoa=+!C+#~1UP7cF@O;lehH1jm08_({%aXV|<%o=9IX;@2I3!ZV{dT}d)9Kmu-7 zg{8^YL3aJFGFALqP=WQ31f)cu5)(Njk(HcI*n~0>i{4Blzqzyj{2jaJHDfZR{9pCpnH}CG5`Eb|2A#l?NQW1}NyT9bO7kvA!o$uUER@9c6EiN2~-LASyGS_pJ zP$(n!(9^(m5#bzU7jD2WH|>-6Ex&m`H3Mq0g*mL>{dz~MsoS)udqxBaRD<+!Xho|_U(t$!)-9KZ_S%k3X&q`D0PoXGRiGZC;FxLlhjL3ugr-tW6$w2 zU#@xygcM+`=IWgEC@|e=-e6uPq>@@t&_(^j{fEsT9>?v=_~vO~-%qXi)*gPiyZr8* zKR%Le$%fZgQMFA4ir15Dr_H`Q<%|619Z!3{TyOvVWB;em`T3R$nXB(cbq7>P?XfRw zT`NeCbTEh&&|f?*Wq?7AG=mo_TiFWrpt-F+R$@IhBvSUST^Pzl0c%rLm5UV}4bk9@N03yd@xwN=Zr$8FxmiDNY}T|i zomuL)RFv&D6$T-dML}fd9E0ybQoH1+T2^)A@5FK$7{A$h)ruPrBs=kjyO3Q zi8u^}I=-bUZ8_+dtb`hZb^F$3%j4vI-3CZf7MgWiA1gv#yrOwG&4}aPujjWS&DQLb z5j74R&4^5cmDi!{E_wW&I3Ax=X6n$m3Q=HAmRq%?(85fJyhWDQ^p+WlJQSdn997>1 zhz}S1;}7@0dz-i0xVvlLi>JQNnIyN(&KB?Q&s$ULRNC9k{9<>hKK$30TXVfR@!?VL zzq|0v3Zki1cfH73!(O>B^Y}cgtbC4La)C}JSZz7Aeoff3@@3b&O~tx@i((*Yv^1}q z6+~u0ASsl7Q(TdqU|j0={%1wXoT-Jyvl4Lia$TdAp0d&AT^QV z_`~P%f9|;uo%Keon)NL5h*kh~0@d_urDQ}YaFLV_U0InD-K@FQB3H=`e3jk%8nhRB zPSRl3BXfc9$C6rptoj9TubH8Mo4Sl_Jr-Dp>54C{F>md0Mt?o%>+U(Ao0a(Vs-av< zN7iRRML}>S%s@$l2pBzLl6JC!-T zIUCt%joyuowz+qTha z>E4uSTo}zO8L-5#2LQ^toa_i&CP77n6}(gYJ4CaREiL)+>&td*iV?_U)#GJi=86>y z*-!>Bl`{dcL^l*i2{uqIOL}u^|H}{k$Ge@`yb&F5?sz$MOOdoj!A}?OC-+9Tw(sMg zKj#1b)A--M;eYvX_HCMPelecAZC-JqT0b5U2k^u zBwXT{U#{cl&+(UM{`)hZ(;~xR-=6HpUBAyH;?2Xu`P=uOKmN7bN$%|C&F@dVJm-ti zp*!*nUT8l)@P|8o|Lx}I#@=8int7WuY363w`W&*mN6C?KI-Lo?>-SRK-7|9K-=l^P0Tko>3q09UoQHuKivI)zdd~(*>IFK{@n`+tS&rOxV{wi0dpOj zD7kN?)+~o@32o$NjRvZcc1Y4`k{L_v&=w+DBtbQ)kmXs{0pJ*#IrDXuU)O>yy=kFE z>u1iDAWg8U#w!Y-xJE2?41C3T)4(p9`q%~{ZXli51%xZ4$`Dne?hTO{~)6?$e zPB+=v0~)33Qx~N3g1=f#_9C%jDbGvdrLeC9J+tl+RKr=1Q@AB)}ZdkRbnn0 z8OZbcv6Ti~r)B-$lPtFZ6nxL})n8FZD$pV_6PRMcM->E#h@7w?%*0gAG7muIY$AZV z!{_=L2-!o+-@mc{{1$C%GBlZ4+RiKYh*_ZuzV&`-B+VNj`SwY-%j@>xHxJi6U>jSr zevWDb%A}@XnpJzVmCT@ESQG|ta#;86p}&0?{~)`4&IA&iS}aZg7l*41$byV4MAfWH z=&}W)WNBb=FNT*prcPn$CCy!R2Zu1{cs|C{y*XRejREMa3zAiD4Mi^9Ky`K%Vz~Y) z4nLGsnGh&5e?1>c+atPU)JC+0EHZ-v*KoShQ>~S4l7N5_B{;W6A!o#hU%tk_{F483 z_|JnuW?CoiH{AkAIkUe$!hUj^Do@3@J@yZ8$DHH4;kP5q?A4ZUF8ubbKfd0sAFg=Z z;V#Gw&v*UvfB%o){qD_&@7^ZexG|zVTyq}2Bkn;3j~O}hez*JJ!^}DD;T65rVM$=g&#u((Iczw!PWx!rz#E`+(2C7!^g4p7jiBihmiguV?^fQT_#+ zp;{D~o%Dk(d46}85e^rN%U!t_MiTx4zZ5?$S-EY}5-LE(^uh|*i**fs6^LOkmJPB( z`hZ`@g-E>Q7rxZ~r--~n+OU%%$PAFnE#|D1UdmA{QY#}MsZ>3Qm{XAyV&ps`XGokQ zGE#|{nzN99#1SSS(2$lynMt?RiK294#)dR_4Ix@HcSCdA-1=sFV{6=cQw`_T$ICdS zC20#$UyV$CXRb#%%U)ATSS7IIg^XQCm@T_aRcll=v1ta)IjOru;h4BeeaKzrYMbxf z`bd^tbfcM2#y5mFr;pNfol_y^jT6C|$!-q9${l6IIWKNSDGKYBRB;sbg%T>Xy4thF z7}QNy4BBb5a?%AewL1Ge0ln(!)-wdoNjfZ-;RObwoGVHjaZV%GvfwgCN0jqNEV4JG zNY0EY9-#v1lq)`dUztku}2ymM4-> zifJzMmL=_9u&Y*P!!a>pj)YQKt|p~kI4i>h6y+#DzJy5;FT=uS*-X1AXfu|x7-{7i zH9{HS$gNYt=2mDe3JQP~A8JI*{P78YdbYm^&q*;2idrui7ujNAP3 z!>6w|-ELuq*Ke+`zPmjBcJTEZmJM93Rwd_%PoIDM%jf^`*ZAw#4C%KIe0-LZDw}1O|TTaBK-6xkdbUnBA7K`OwQ5IZR>N%OkQh(w!;VEoq#S7IAE`#(c2@3wL zT~7jM)RZk3Jdkv6Wg&Am0Kd9_y`0P^W`8yZXN}0eKk^{nNp&MNM$VZ4qIjnPCToVCrf#%M?v}bZ=Z`KVC4b)my6wE1(4OR#GgJCINQ>pjks!Z0s6*Eefr!{PH~4 zX(3c&KFlPOmPnccID$Q~MK;3c$jwKiH_1I|-q0IKb~A4Z&DNaFKyGfJtbyiIdT*^Y zn$5z^nXR{aht;IJc|s|9febW(2}ML}t%N<0oSrf%gpyzK*RN9LXiZtYOxWt=Wb50a zPMGz-UuNvew61PPi+V&NsmPZ@CshL=lrU2jhBszTW`!k<#DETPW~B{N;0#PjWI!wO z4Gcgu0Xy@*e0%+NTPfYm6G(TEwj>DdXhx%Ny$T#Ni;T^z1n5l-Sa(XsFez^L{Ca%( zcsxDpeq`&`dcOb8AKqo$hrhm>7pV%g%^tkLUz`5{!9VBa89yEPtHj{N`P-d;c;nx{ z&IDicL|@G4k^*pV9&%D&q|VkwJ3Sn$E0=Ya>Ndv;O+Qx2?a8>+`+570mtTkDtDM z^%|GndV_n^EGlr>>^aA_ZPnMfw>-|mRCC_%U;g~dPe1Da|I72IXjA#&GXC+0&;NKI zm*0=={d;+z=8tpC7=b|C3P8%(1_B2mks++$%oeNs3a@))#L@r%; zolJ${)T$^yS{hAwu>#~-|0Z5$jU<%$yh;S2U#r7K2(Kf4nJnN`?rT|bgdk+q`+*oU zQyCdkIZp-G$YUs_am);)a33)fbD|eRTZM7RQ#7PuGs^0`ftf|hmZcO|biLDB4c1f^ z*-o|wMe!2L_!o+aQ-(DXwH__!jpZsIcDy#XSQjL83vJ-miFRr3=&>`nXm-G zARx;Hs0Gs$hI`V9p7{D4mu9qNQv~RWpEnt)LZxFvnms?#_I`=d0(9!IWo?xA4Jss7|Ub7pf<~h)kvIDu9p*EWR#|> zSRF0*X_acF@H*IvMO{B|`Mj2;hol)H86qN-i6ba!hzEFN*4;40NshpT0+wQ&NdSx3 zAOwAP%|BeRN`Xu+9Y!5PjidGo z2VOOO^N`0azCYsnrn5I*f#!ymN^EX^P3Kkdf3(|&Px{Np{O&78#6#zIZ|vLm+J4j9 zhX;S$;ce00pdfS4I&=&fSa+5}GZ}_ib1I0Zm?H^{o)#`a)*+|Co8@GQ=W>mJ2^IT3 zF@n#E8Fob7?u*1r$Ph&384F^E0`M$%G%nl722DV8ip<^Y;$=1^(vA@y5Bqp1pW<=j zhgWV*^uz&An42{doDO(GSZ10uSTw<8j_mHq+#0SIXX|b*QRX6B$tJtY)b>lpBrL)C z)p5PRSE6(Q5wiTJ|N4RE-W|2>6%~3eB9AeDdH(c^{^h6mA2gmsFy*TK#NtTYI zR{AMES`t;QC_S8*4TVs`*MM(GjdoUzph1x}ivPk0*2h^U{$$=KaY{dubIgd0sWmbW z&AaBv$e7T5sI)f6kw|4?2m=_#Dbd)g!|3*SpfMGi2VAyqX(qfoe?)CR4H4ZfS%Yn{kFU_Pu4KOzmQEPn+4x5IL#9VTkf;TG+-?fmK&9 zmr#jB8jz-01((6ZAyT*rdytYrn9*ovXw7Kz38Q(91`l`JhLLbL5H{J|2^>fC?!_>< zlfzCyE~X-;AiBa&EPqwSEY*EsS#T3-1@B|h1cS$UntRRyflC+U)56LXRfNm zd=UzZrY@-xBi7XdWdR!_5gC%Ea70dWX5NyK7^w-RIKdH`mB~(okXYeXwT@HSsqbH1 zH&3#%*C1t`{^Gj6ym=`ci+4TAwNnROaStE`OW26p*YTHM@?U-&|8}=0fMy>L{W$aU zjDWry@yc*-ON6=C6lh+86THL&AAla`P)ByFrorl z5D8C~t1M~mS=b3zRb3KcWZrMb&mV6;KIJXYX>R_1|I_dO`M>|qr>Eoi>2rVgaCv+T zcW}*Ji1Y2P4_7~);->5+Z%`V`cHIa(orm%c8(QQyAd@$xd}g zUlEEjUn(RwYX&SRH@Q;kc(&c^X3-*F*I}MDMOe^HR!O(ceQDLFJa++Vr?V^{Oe-}V zsW>kn0yu|GWQAdzO5eyenp8hW1(%hUpHPYOLKzvcq?M7%kYd?+jydN<250%~q(J;Z;HiyUJF$*lR`4-t<$Ah|BC&42b$!uD zmpPmJ)*_OT-U6Fbn8UXVyww1WK67rXy@6Ib=z@Xp6!J z304G}84xQ*MYTU-XYQOZV5iUED7HS0`Vq)0^}qA6&Q#n8aGw6&-Sq9T1v_}=ZHAwBGyxy(o{~34t)xQ`06>Y8~6L{TW^F~6%M3>?){zGk~@Br_SXie1ap|N8mKActuLGop-D2sUmH7rndu?!)007sp?o;+65k zgY{iZGcE9_x@l|3aNx z2Cm}3RKqgsJS&KSOP5nT!AS&F^>&JvQQgM*TO}!~Rko4@s{?Rb9=G6&BVxMOxOy`f$s1O?g^lfbZD zDZ`*_&-*hx3)}fN&da-OjObd^JoQY=Kg5fzh}cM% zNVo^V2SWqZjc$ELYg3ZZ%;|108q?gQqcyL4TOQ5*Z1Aci7f7$z9Af6&c>2k%DwGvi zB+_6JQ+l~H!DP_#UZQDV)cz?^EXZ)BhKpIVFctopm=Qo({#8Dz1dE|544I@U&RLif z0+{4n5>HELiBA`PS8c1QTqT)Gq*bzwV5qpdG_#8BErQ7M7#B z#+PS3M?08@BgHbR{&MIqf!B@iFL8M{>{YMfeJz~Tq-K3nKl-aH%`y)+XH8Rfg3GvA zQjOb{@rrcLX;2xf(N95ESE0w(-hw{?-VEkx8$`wES^{4O18LFHj zYXz+|w&Z2+?;l?y`{n7?etY_yPQ8EEx3|0Zo-UYwcz1c%K7T&wUNaMGpP1yoq5}ld z$<5Ks8ln>pbz>uXGdH=()-i6%YNJzUMG#Z0r0|59rQ&QCk<3-FVNDDa4wQCQonH&xgTC{2(=2R32S9RcG=bXh8AstI1u6DnCK0q2@h zA%PP6RT0SZ;;LUMg5E_hXi-4343J8k<9UdHxwDN~s8%9l4tI^L>jFX)~gRR|G~TfRIRAeLzB(`J$l; z2{c0-vHD2KfC))~^m0%|kwb|{L}=!b$#D+mRlSkIgkmL@oXZWs*_y0wn2Xnc=zM70 zFU?JL7m}6NwiHuKa$#$3p@=n{9dAjR%w1W@xKUls=HAUbWeE_C^kmA?@N^$k+1NpV zwL;{f(|p6*g)0POQwB`Nl{HjfvD9THw~h#7D`c!L;f0Z98f+ZL{p;=NIsW}~{PD?$ zGQz%jjN|Ff$w(Ww@%&}RfH_*Lbynl}mZ>=-LK5SYSIx`>qr6?AjBv79grOM#?QTb= z&Fq^c;Iu-{%Dc#WFFCIn^PU~vtD6p`>C3 zKmasvt(EcWtBbzBAP;?><4P^q4G;5$CY8OjYe6oCg3+<5^2ZwouBt>z+=bwdXQSuiMNRuI> zMrbiL&i%NmWC?R5qN@MG`5BQ4jG<#@NK=^7ahswI;mAyI8V50{fgERvTy2cB@Tu}m zO(`v3HhfjKCuhsjBgzqmc7mIAl#z=yX@zA_QJQ8bPJt_4lvCNvZPP5oLQZ3=VKZEY z?zh;x-^T3Ik9+Q+G1QOji6hlz;}le;IQ+Eauj#uyM{`fIMkm#uK+W*f1Fui5OvibR zkuI6puAE6r*+eHT6UydmbNZYh++ary9fCx2UuUGVrvJ>AgFrQbP{l`-dZd2Qw1A+L zYT^kIAzBIer)G)5GV96N%8)4`z{|SK)AzmXfvGhQkP_B-XL4zNmJNl@ai=AJI9cAa zajmmcMSq>GtV55E*E=_dJ7^W)ygDxBDT*$Xrq2Br?OT0;YJgW2MKt5y-oAVI&3!y! z#tnvcrvx?0jfixjZI%dcjqa&(=c=DkcEU)MVR(^0icEt+!GyUf10}gm2$~vo9T(Ap zfI`ZW$4P_7Xg}ZMdFqfpdw#z2n;V)C5x3|3eAAdT#G7kte!5l=`ZY9SQIjiOqYRg@ z)*ApMEfdSuQ(*{6Svhee<;$mxMAm?kBzDUg?z%LLAc3!ue}1-z{Qkf<7rvSC8riQ5 zf?k}j^;f;^xD-oJ+Q;6|sNS*@p!o{iVFHPH8~2a5pMJW1eBu!z(Ks%BK0esn*KRc1 zYBHhLWuWMcvlgyvz`S8^mv0~5M*e3XufO2qb7tn7&fmP*-@di};flSxwPM2zWbZ=Q zgXG?>TmL2sV$jw>6HHS^T|FONOl6U@Ygtcv0N<>Ms-fdY&LmH~^KRF1Z28?t}Ghbk;EzMGr=9y;8 zpsh^62$l!@GVWT}QB@V8M47n-GBL+YVWh^;h%!mxF*3xY0=&_V@*^Q8kyS9S!+J@V zmOo;V4n!h7%}!ZzR6LBkgoONFq!P0E6LEkE|gmZqch$1D>c4W|^jIGiq zUA;GU<9)Dm9Em%2@wUx5aU9V%@6R(6lN_OYD3jB&i2)`xsVF%`*2Tse%dLxHku@PwyGxf@4RmG5paRfLbbfb;@D7By1EQstPDl9^z# zRCz&Zjr~>^or^mGQW@uy3$BTxkPK@*hY^ibJTs^9(PDnfYRS zS3;hW$!C#K1=9$yWmKa@GrZk+?a^8hANKO+vlvmB*;YKgG|PKcxaRODEr1zTLo1zwBzx=BUY1D}zLxuqx`(tb0bbijtb7UN=z@ zwsm&tEUl6m)h0uU2*sH9=NZXzW`3Ib_^jhzax*+V>&LHg3p^M%i^qK(dC17s5cbM7!$0_LmyA&ITQ?Zxs~k(L%uPxsH`Z$Hm}{#*X}2}cUT#qrSi z?U(t7Lr&RltveLR3Vf}B+0%s+gn{hZ`u6V8jF-#vyQg^i^bE1NF0c6T{oD58jrO)I zC?F}#80Ofz)6f{laPO*`L1G{@Q@WTvHbI#oxV@a*wSB7*WgTJV*JoBKlD=G+c$WXR z>Yy_syhypD3ZbagU+};>hD-cf%ukW+Mkd3m(ssMD(8Ayu& zSk~|_j5JE=K%#~X%RyUK;G~hp=Cs=Wy{6d834@~CU9?uCM`r~YRzno)#xQs%Cdg9w z7%%W9zk4r5kXiQ}iTh}KJMPn*Bhs7vz`kwAZ5)|>=H5A@Fk3GuBgBJR;bvqOpIPY+ zhMHo1Y4cwGQ*}#GA?qvyC%9+@;IJCYL<3C3%(4_mqRa;>9YU_XI;3XItV}D@>JN+s zmz6@P?u=9=8ERcV%Pyigp88;`x?t%!saQ?#(iuchC_!eWZL&gIDzO`@O~(soZpsWO z7HpOV&R;1lEbdA#b_I(i%Z2x1bAEI2x7Xg=Xx+~kYU(+oTHa1xhzl((GwhtNU(g>; zw1`p2q0z<&r)@4oW#b|v6r7XC(APtEQHVF2UpBaw zp_7r#*(~dxYGAIGV+~~xV9KfxDFnF|V+vk_AFSuRzJ@K@d}WAJd$Y%;cTG8QOHJYs zK2JSOjS0(qzqfIyccISobAzr;ZK9c(!K%wB&}pr-9QWJj+Ydk7|M=JZ=O_CZ9GWDz zLk~9ZcWoJuTfe*;Im5b8^ic-QaY_}7jTO+gJu_U1#&*o@HA(i%&P(&Rk9N7(zRL-e z1zd&H7|A59ZRWi;qtcWKE=~QmE&xVp$!bV)?RYL>A|=#hCrER^3CGeb^6Z%xGC)KX zilPw_H49j?mCWj(C7RXATOhtI{LtuHc=uY(tD>&P;?mb95=6;u6+r-`aJMWQY?R~G z@=gF?TAq=GV8^TuAe2mDMwY)r43s_VBu8YLm3AYD01v~GaU-$vBA%7^!6GjQ?y)BSqc?@xE1Y>k%(#>lbrJ_fPfj|1Wef4VCp69`b?p*+Yb zWm~#L0L+34VPL*^$DTLdBJYa~tT{j;>Xa?+l>|9hssmct=K~;orHiJKhae_qdZ|T~ z+w#4~)aG zjxy%O2{=^GS7BQE6_>2r703|Ep{U+t$;ehmn1C!JCJm^@!;sloXWvt z=y~EkF*3H!;_fqL=8@5eMl|ClU43Dv3s*z>0;>p=UQR9=;9M?Gv8Me}YtnUHTSkIO z&>MR2)yD59IcLCb@*j`52PgR~d_9oCahr29iRJ^|(9S>643vyzcE8qd8PUKHGoEjs ze;R-K%lwaL`)S6VmPD_lmf+XOFCMqAIG*_U_SNF{qU_m0o>QsPs*aRs?ynzsX$JP0 zDOq!F-L__}bKlIjn6suOXjXE^Y6zAVQ_Cj3>hK(cnVZRrcTUo*;7#NjQ79DgDjaeLk2xU%KDOx=RV7j-$OJ+5Mx$2ez1jdY+%8JJ3>I`%^~0LnUYrZp{P(gO<>NKGI z+OULaK`bKy<2t2HECFX*+r75wavNYxtD_3R+Q0(Qi78WsTm!K-&Z>_V)FdUan_oKn z#mr^yQexo8za9VllmF$0DZl#s?c@Bz!SC|e-gor`%rKU=-ZnmsA^^F+!_L6!f@`C9_1EPU-{ zKW0Qa`M9_5LL2#%?9`=i$AQeaM;?=NS#D&8h;2#GO6SAnt(im`NP8Z$nTvbAe24J->k*e~rOzoD^0_o0+;r-5y{TOkR+}NhwC$5%TV?<=)_B7gVz1xhj zrl4Fx&>fZVZ19Eb*7Hk9^ERJ8k1sbok9FU-#s6q!WHl$#Wf5tL)s&`|Q)(5v1uVFa z+kM*|W^5P2mf4@c8W3p>ZZvvpF=uHNG6I=7?ix{`CR<|x(KPp#dEYi#>&mHQP0^%N zf;F?H_<+G!nMPu*`=#Xs&*Q)Fy&TIFsv?ha3W3Z-&T6|8nWT;y^Aws`lQ9AJH5R#q z8I4vgeYY}6rBwyC+Cy_1=cLXSuMU_YP=-i?293FX-kKrH<)R!5%s!&_Tpm+H7RUsr zmuyc3^58^otJ2d;4^r)i7TtHgd%5JGCme9037xqSTgRnY-`JX2hi`^PYsO~P?Rsy; zXt*099G$+m;Jm{IEy&7s{71pMtRXhggjJ=BVW2of-q%OidlA)LV3rhfCVFBW>w-W zscyg=MES#C|2 z-TU6WMfI7Ve!2bWulVDW{}4H-N4Bp4$9&k}8~oC2yCCbP;;InA8f7SPj#MDB=nYqT z9Zt>5Fqz%GHyP<(k*vRp@5uB1CPY(9&Xq8pTw}Npl#z>x@bzv5tka)Llm<{tfo^oW z?EYTaO#AdhIA(snW6zXK6~9h%786soK$I=B6P-vyZ>*Iz8xi%YD~4z>*G4*3a^fmG zxI~qe2}1%UZIsz!A8GEo?9Hgn=iHF8H&btK_%gK_zS$(^n4C~gjGL^pZ^Gv4vc~GU z&vS4gd|daD2pO|mjZ>}ar~VBnt_^Rxu9uE(XeS#5q|$=G1Pf0tkRkfR4yybE7F%Qn zsC;)+QivQ>P0I|;+>vK+l@V(pPm2IQ%-uyUXcao{{OIUW#DqnQfOjQXk zay`5%&{HobF-vZr$q7iDsabxA!l6VWv>1U}K#^Pn_eI{Uwr*|j(#ycA1%Zhkh1$td zZdIaTP(&DIVk>D#-RnZUxOq|auSc!L3S^aNjI4cv2?`j(B$Ei(kfN;o3JT+?wK)mv z0y$p#?lq9FnwJ)(O>k%fo8-_=K2W_|bM)PtdvDmT);4RKH8=0(z4_kUjBYTOJFS6M zX&5U70Y=H_%aZ2T*0)-z7tvLQu`yB#M3e%{T0^Af(e{@2J3^N7nSLC7W=7=QO~lpJ1c=` zK?t@Q2qhe=y~`+366+u@e-9J9h83_J#ucb|x>B&kl4CB(LA9_U##(LyR_B6qT4ka{ zm$Eetrou=wSFgJKJ=|OX(m@A8O#I5$OKY)%NT#T(wcg!(1CplWDSrIh z{L3>xPdtND?8c{vuOn~I`6|0INv)`qawVYG+MF}2OuNK6W>#@zhUV#J&Dk1D^x54A znUjS%`f8f$)0ND=;Dh8cJgR~xk&(=#Lp9r+vyA`NZ5U$pUWvuenX~)$fJ^2*?9 zy4+5bk3!?6mU10M&@7BF7C|}}S;i%FS5}NALgDoJ@5#gXVs zPO{`E04&o0x^WpL6xdrIytt6!hC(m{I3*y20Poaf@gM8NUnqacxXQTS%mewEwKZx+@Wr|7_ZK@v2`~0*3d8R3;joX+^m~loQ<}1HAi!LTfqn*yu2Tc zfH9*`mSuTlRXLq3Y<22s%tTADVMa#KlJuOD-O)GOcZ_?E!zXRO#C>KYGv=kw`?Tcc zai1fOW6mK6_uK3NMMhvIM#eU^g&lTUq0w_hl6PntkBqX^3Mo^S;#~e&1qhu-|I3jt zBUd;D5WhMcVEtObTm%#b7`$wF90(;B0ZSVRQnSkMlvznLvE(h~9iw^HU`sqhC|~#~ z3|od$7BzZBWWo>8H>6*KD7V_u{{1%_WGRUjA1 z&{mvk84a5GnZ>t8omXi$Q;Eo_F>($|i+N}c7CuawnY*VAHDp@_I}>$}WFkk@)ht-w zTf1jI#nTZ_$&HMFp{1gk?cEZ3)&1IJ%*+yOR-!C`Y;K2A2Fj^8OZxz_VgV>M<8n|~ zH!U(V(*>4OqdTQ24yy_YRW21!r92#@=hW6MBU1_a2#mz-j-QS=Vt#nDUx(f&E;-w7 zB0J&Dkg0M(T4$&T;M(7PyE7+qzI)QsOiAv1yXkk2?cp`wetWrm^MJnKgA<8NGa@pC zT4Gg_BUih_(%URiQ>BvCwU$7E9-t8OmiOcS^V7fnuj5~ToWC5{$v^yZ`!6xR+dCfj zOpIf;UIc92xE@ndg1%bTh5TiOyk;igl}HP$^LFt*v^nR9Wr90W1DL{04R98jM61!r zSn4gHzEGYNB6)JqSo2JPh?;erf|(ykW;T~(ku?f#0Wq^dGJ2u{d`|69U60C=DXt@@ znhj0bGJz4(IBeNp^F$|33Jj+xtJV#zh-E@p)rpgqGOz(#W_MnJW_sw9#pTkwqwltF z+`7ZH?`(VbYh!md_Xca8ty^zs=B=S9I`furtT@hk_oZP0m!#tFK3!>&YU&Q;)~RGn zLSOQrdR&w zD}1gN&s==S;wS1uS4L{b1U9-T!x5l;4t*NsxRpT*f@JGJlhs`pX|A-T5`v^L^A_{d z?e=9n-^X#I18uusFScK(G27b*^-X4MX3aoW-0ErF0!5w`6_ryVMQTQoWk}{N=IxF- ztE6yuIkTDVo3_Z|6{=)bbO4JG%rO-SYK}1v-Hx0g6F28$&)qrPuEFMV==G-Fjoxav z=5lpis3%}rX-7+Do}%EXXadM7kSUoYwz|!|IG)UhGvc?8{u*kW2sASR!mprYZ{{*)Ppbs73<9z0B)@w2#|;jS)png%T)a9|*wzJ)Lt(L6^t>Auv z7LC|}joOUPymaf`dt-0g-sv0Z>KprRtvBCjy?J*wv+me7wbQApHF;yjDG2Q>SYFyg zD?KaCmxD^tBLbkp4Gk+al_-PgG;in`b5LC~iD<3oF>LFI&YcL3KE0(p^Yt5YAPeu) zsvWB4B+y7V8R<;86&aBLVC`fPP{E0?^N2m6r=keRnnbJd-$p%jTuqsP*#NGVuQ&ew z_piQrC*?tIs1b)McQZ9+KHZL=Zl8ae|MBzq^G&yDpe~MYF8=*1zIh#Q$ZhM%?nJ3% zm(;`y`CXhrfjpIAh)C2OFe9ICS7dIp+;e<@na74=Jsg^dTw#_2b6Q~xd;66d+A+jWQ%doB5)ZQGO5!wgr zmLulpfsZ1I&qsVdq#?q6MLQAB<*vP$ev-6iDQ&MG+rITTcSKc;Nq4`xyjgR(8J%z> zNXbGIYxu-!n7>>=2sNwsbpq0BA!?Z|MmS5-_=#t#8F#3a8@Nwa+ywHan&J(6oF&L5jkZMQgR@NFrnLmQ&9FAxvXlcZ_wXu z<|XP1YH6z~90sS(lc$toajpu?n!Y^z0pv(|oT4nP8~45ET!K@UOd0dI_1<_4U> zm^nrqhlPBz88c>F_C62GBWy#Y+Tb=ZGNNbBJZ847DX<5R$Z$<@CR2D)%;ld62_df) z03f7E3}E8?YJ%2uo2&?9)?to1*?*-G5~tdyP|p&>%Cc~KIT*z%=UMu|dhRF$hHsLe<{3vKWNZ8sww_%^|RRS$fLcrV=He;7Ugn5K>8MkA8e!6|i zpMJT2x!EsA3fv7F^>B^1k9c*B%e(3O#^y;ws-zcr#CSf6Wh2m=y}9JI*|u48?wbn~ z)JCy=GHGI4$O;X~iX!*@m2s5KfEMHX*W1yaay? zeFuGa8jt6mBRm^Y8Z&S*N^va&MH)PLTCKGyYp*KP>2Q>d4xF-TR#Sn@+-h=yxx)#g zH|LVs8k^6!=Xt(W7XZluPmgoY*!QswC5A|MDnUyyioThp)}A-O!D*jsM7A=c7DH}` zDU{J1HR{*1yk?XW@<=5|YD-+C0UOdj{m&IZ)Hf)gpnp=Lm(oGULFcVn73+~QO6ie}}Qg(7FZ+q_)tI#AATMxLZb zb+HMCT!_^`qLZg)*5u93y@9GQ-KEnPYbJBr>TU7f7cS0j-kaRa9lg;ST1V@06Q+j= znz!OD%x|Z@Z}X#(k!o32yZiZ4)W}e`Eat=YrqYzx#E{Auq#+uWS!>^6G+UOgh}f(} z=f35(_ij3OL|)!58j3A_aP)@U&*|GGgT6(q;d^M?Mv5T&HAbTaH`k`fn96BOg|JH< zOw$%wQ|B;b(yI(hVgl0?$`esEf|ciaN}@n`g3i!i1#eMus!pDT9;Etrn4;MZ{#UfV4V}G_e+3o|Cjv?W&F3 zuNyN=KKiNqr~U`z`=|WzWqZ9S91q>z-}7|Ra=-A@=7wA{x02g370>(SYy9=Ap0@lY z`DSpy4IzJi4I@ANoR9A=xa-*}!?)G=#3;O&D0+BlI1$;cNSs zSN)QJn;{$U;T3;;-T(AyG0Wv)^V34}{kmz}x3_)2Fb7(rE81fH9(nm_2`Kd4z7x@ zd?*FVydzOHgR>#209i63_8gZzzP{xMn3mQ2Zp~B6^Wx_QcRQVFZtR)q?h_6xjhhpL za1TVcWn8bO_|)>*@j2Lxf8hA-`=u6&W9+b|Q3H?(W|1r!F51@ATji}r*CoE;9_kb-*Do<$(umCi!z^Q}O z(yeupoVX5iIs0N{<7ssm*sQIcz4_vmpULKG&fetBdr#8btfF&KCh!iS7038j`v{^K zK$D2&x1_JBbEyBEzvAI9001#YF(wjGnS+@Fk(L2EyoK!m*wKC&(QyLY&5 z3Z*S}_wLm0TBU)bx?hbDGlToc%XPe6-?lUoaAPqJ8KF(tfv+1sKjp_SZy&zD=dpIf zd|yzvol=>hQ4G64Bqfc=Eyq=_Pj6pe@%c5LE__aImP6UeSE?u9_jD$`@7qp|*Vp*^ zmTw#OEgSK$;N6`qjn?3Or2%ZBEEJJ+(;f&!WaMlu6%`jh_0pk~`5rj{1tWPCw~)j< z-s_{kmkUiChf#-MW!joL!hBdnOO_PSaqyIju0{a#GLR$KyphoU{X6@gA{OJ*HAq_> zzqzxAlbMxCah0!XTLKkbPMh>xl(I-gR}z#6y4A!0GICT9P+qS4%l`HA{_=I-uc=IL zJT3O{n5Q%Kc-Ge1-6?VPWf3bXN-ooEab~w8!^X61hInyf{y3T22w*ZTu2-D+%AeMtzB6 z@7pHUpf;tQAYsyq>_h_=iTyr@6XYYu36Mvo~KBXJ_wjjUudZIW5*3-O$Kp zY>mCcobK$Mt-Bcy>Zes~YUuz9yF3beLEZ&y>2U4vy75pr${eZczBt-jkW4m*ASK~q zlv|=0NCQo2Y>o&0MmH zWU8lM_SkmiUQqAB(c$!f4B% zRo>B-9@p{nSN!=IpLZzoyAFrFyF)uIT4cS$KzOD!(k+F;2vR~02^u+1e)&Pk zm4zx?0~?T&^)ssgKm!-Rlbd2OnrWo6reLr%#;u_GT3xbOqEtHl_K3tIZ5&34zV^F! z@h9hf-#@>#ZDect;bix#dv~&&0-d4)bT6tDBj{gOYvK>tMjho)0h3zoxOYaeE+_kzl-+1Hr$SkoR^_I$PKL(BrWjImwwp|$%qJr%15qFIhOSYnvF z21!EYJ(oYnkalHEMc737=k}oPm;=F|zk@l;9_RQVvS`Alpk^^Y&<}#s#iCNr=7BoS z?KD{{Bx|B$cEI;#7**eoZaal}aen(Us&b!Y^MN)aappB}A{(^;=f=g+4Q;Vbbf>$! zn>qVJGxo*3S?k8dNP6?W_R4x>WqKRf8e6A3+~`f#rmex$=$OpS4Q4HQsE1$x%E&h} z=LR5;qF+BMXQtKdRxHSiC;^RA0!$3c3Pc1*q>}@3DBN0lARHOUgu61VckMeO70s5& zu_G1No%@KrIhc_-WFuN=Nh}QjBeh3nT10k3fNMt#2tFc1*!E0tAS1CPQViq}cA?95 z=C!JGetSlf0;$`^ZMF-G>}LMMiIJ+QhR}k+Sfl|-rS{b^d)6CKd|m*g+Vp);d7c<# zP+iR3u$nDSFV3!^xw&gGXL%wVnO#T4pU(qTIBT1w$^bzEZP{<8rw)x6^&+(&T`*x(IBw`@8mGA0KxL?4CiWe@L$wPb zG+p*JOGIxz!BiYIF$ZX+z^}zu?gPnu z+qY|6FCnQny3=~}Rd(MD6;Djv%nQ~YU* z#j~G1o$REYKtlpv>kO~Xx9YO>j&<$dSzE5^UlFk8JoWH4wumh;=*ht~5hX+z- zPAEbXGRyi4V(y7Fflz7MAl8!^x1&jTVoYFl#x~@%0G;gqS-!s=36!R`n4zZQOdn1C zaTkb1H^xET;B0H`1_vEeH|kpv+pWq}4v&=pkFR3M230TEp=MZ|i{#YV zY;~GzY1X?{5$Mj=+?=hkHKW73SvOl6-OSv&(T&aLfZ3Y$1}`#~!wd#GL8rOQ=|*^# z*}pfx6%Yw*z(}@MNw%f9!hBvfCxycW3FTW+2|8fiidBB#s{X~;YLygY)SzlvQKT*f z!k}i#Y_2gFE%)79Lx#1+$Q)8;j8Nv-280at(7x>_`q)E>6vh}s%rpoQ8N))@7L8g7 z46U&1h_UC%Ji&{!0IO`PGi^*{^@OytOax)csBYHFgWFA&-^n>ABxJyT)QZe(X5Y;E zXTe7`Eq1&=1RQAM3YY_uJG-+R7Na$~vm0wI*NnZfq+w>9dFz;?2Vs6Juw&u{^9YeN zV&C?cmu)$%iSTAnXO=x$hifd%fg!jBN+7^nBkV zg$MG>$P3KGcaHa_^U2yG2$}lwJbrq~uN#NxW|2vATN)b8n=M_0LX0f&L5z&hHTb&a zbyy*}&B#c)$5iuznmRS7XJ&~Z6P6SE)4|9-(g5w&Q)~0l;{$DrN z>Or9y7*qB^6M`_BY{6ag>z1+8-81*{>ryI4xmki{72>5W@^anY^!ggVyyWwna%k~* zTzy^f@q;&Px}%!Wn3sJ#Z%@zLU!Uz&ekpM!{4KOo1BlpL=(`giAJi__eqNM;3~vhv zij($nE2yco*3S2V>n^T_+_PTI-E3VSE}t(M*9o(Ltm0#&d#Y0Qj5I|Q0k;lLUBZCn zG*3kABPB&8%+8L!KGz$KW8Trc9k&tzh@=;%i=2WH0Pxa|0-TA-s_|`3&&E;?mFnhK zk)1~e4A76kUZkUlVs;z!N#;SSF&Pr{0|Kbw3N)xw-AJ;F-QlV%oele){ctb3~tuly}_HDY)zy{nwz(h)xeBqqSJl$@~zXnU^fvL1Qc=f>4K^LRxn7Pb6Ghl$#?LtZHU4`t!xVSP9MsJomZOzPFVDC8w z#tsXNgl!6VbIEOOIU+)qTF*W9(K}Ph%#0;wx@JZIi$|!9ypA;YvFjSSG~X9TYRj>t z!Fb&@i~(-t$ZZ5I4<%eq*A)2N0D(wY4gM2y+?5HgU;u;1Rmt0|dT3H6h4et)pav{c zVyf0`adgiGSlo^3&c)Ci&CnYgE4N@SWKjLduLo4j#Z3K9T4_$IBWhoMxt#8nyLYB? z+(&uqmN*bfmkK$#EON{4ndET@ml8f=vdAakrWPY;T z5(fPCP7inX{=H83JyMsqZI@qTItNkcX1zI`{j{W;S`pR~1ubS|>avaJD_(cLTr&kj ztY)hd8CA=Q0piY9YL2qvynV9MuSv5|t9bJ$(VN@hy+bBAGW{q_5i&0V5^a_&A;|Ld zxN%~5+|^Rb_I*Suz_IVW+a9W+b*|ZJg-w|lmw0>TUw+>H{8c|*@qEb)y=#2m;^UdG zm*?MoTAc86E8;c{_r0HZfF`2Ky;4ZxEpXX&xgY}uF@l+8!KLOD7)aw(7-pCvfe_>c zPb?Z+rbViEzkYpt{rsX`bT&@uazv6P!^`=jqzKCt#6tTCi-;mF$Ki;ZS&X_&%E?F+ zJH1Hkt#sR%nb>n5iz-$#JPMjdeg+C@n*6^5-=F7m>Th+FveXU0<+uJF)J@0$qZn%S z%2(@86S7{Ha+hg5vZjePqu|hl6VW*b(q=gIc5-WF;YnLt@iwiw)iG>~i)pR(wbRIE zWmd^%ZCUA-oaT0HCF+@tq)?P!qdTnCzR}!OHu6$Cmb%rf^0v5|H>wN?)$m-_N)zLl z=_r-cJe>o~rcs6}xVbj^lteeEPEl%_@)_NfiO4dYN(*F~8=7eY-O5}(xQ-EPt_ab^PB^la zUvd4u*P_faWrS3V*#lQFRLD%x5L{#?76>T#bxN$18M$BM<*L_fY=KCfPks(OpqpSd z)Hq9^r7iZ??caa6{__|86!uTAxrrux+4Xhsbx#jIuCbmrZ)w&NX`QD9@0MJz_9|%3 z^{f@wGCkq}KpB~%p%Zy{FlxdYG)0yNi?l08DQO~eBz}I{o7ifEr|E3a+UMsK+M45=oKpq?HGV5tJRo z%|iAH#3?oO!LgvcI3HC3Yjr2g;D>p4Hvv8ek>k6~8U}P&x%j+7WQ0dqjHFwk{N`p> zahMIwZPN7JyRjMDVl;STTbeaTB_#A#dpl!;!&+za`9}3>OdPaI^JVMEGU*WbrpD#fxl(w>!X^}$G zg)pneHIqeZ%s?b0rgH4scS@#%Rvf8}5{f9(R%CdNRHCoBZGlAZJ=4d?NVG_ZTVjm# zV4;c;>c#{zsuwXDQ-}ys-CM=`&XJBj`|LucGeb(+P;D0(U?P+ZXqU{D(lE=ETN!%H zg)46+eYLTNn!7tXxpvNVj>#L#z_s-Q_^&h3ih97BX{TzV%dOq%|{ZSfZcPPkGwM>E*54Vs2V&xj$p= zbAJ|@Bj>ygqc_$dlF}I3hwu6J(_i6z9%iT7|$G^R-9IQxaZwFYN6dN zeqJj8$SkgJ+x=n>El-UX;Y^&|3e`-a{DN3^^+cv(*X1&b?XZBgYn(Eq{2`=Qq3#j=*6h!KA_?snxUGZ&$Al-q z#hI%B773VAtALIPiP#i%&R`R93bR^st6|g4x>s$_wzyZ2OXJd7Gq!HB^rf|>aRT~g z&E~I3y7Lfo$laQQ6rBYYyTb@`anb|Cva$6l)0IEb=4eLpuw=row%C|x7v`*0AFNHk zg(AWpi1V+v?l7}52cPrwVF_8hYUbReNMbfAtT6`wnfr7rPm=`%WWd;#o{>gI4GmdT z;fi1g%Mrt{7v;INlg2*AHdZeCwxtm1V}vK7yHeW-!T}61OI%v=MItlzoQ}SLms6D@ zP?o<%yeA}&>0pMdSn|=44W=P^8To6rBsLMkbfX)kaB~BQ=v1$lL-h-VtWHPd&KXeQWPeYK==*5c>di+WX^m|Lrxd1J8jo^w?}|vTkgx?&r)z zO7hHo-$%+X`?!R?j@Sc@G%2VZ>BjCxpqY(iH+5!1o@izWXcb3fRe_T4bf7~g<3g># zN-WG)jsigOeHcndRBuzn6i~95YbJQo8#QxK4TK_NAD6fM+e`j`U-8SvEg|J|>Jsv1 zOEYlT*_;L=Dr9iS*G*5sr{_IvvR=wXmINZ|ji@dU?(H6r5O`_O{fqs1!&9Wic(?Fl z*GG%r+~xNlZGG@|GED2NL}|ySSxz8Dw2UD|rqOI4@%Eapz{>z&Em*>~-mS(V; zdNa{Fb!+lTPER4$U{o2OEG!`_m1?&s0j_qZ<||S`(u9sFl^lj$*^AU?7WM5yW>kie z?!GGoA=KQ6Y-R+Vq#_}hLvpgsdBDUdn?*C0+0Eqp8IbC=xNy`KsQNizmg0yI$Z}6L zCgG8QShj=&Ne2<5fE^MBxUn@e2S9IZ-I`mPTBA4j#p#^(x@K^*=4LeW*~^!~XK!Hn zuA5l{O5*2muLK;@VXk^rNf@0)=7NBx%)$+D+kGFU{~H!MDGBwbI2l884w$If5!)@5 zV(!RQz0CpNMhXdTWeRUbSul+h&A~`jqL5eZ$V`}9L8-K?kKD!dh`p#eL?8P`M(;~q z#be*w!ggw7+nwHk5xK7GzK=07)7rv_1n2<(QR2j0$X1cv0?C|7E2<}0aR3C-+`CyLx>@t-f$t6G?2XepdcqLQnk#Qy7o#QX zGOoYIjKyrxY&@qpDMkqP`m%rd<@KYVh_C=bU)y=LcTGJwhz5Mu?e}Nhot%Vu_udog ztqCE6tpwcQMHFjdY(rz@+xGghU0!g#Mkd&OS@`hS`~B$WwIHh8_I%qfPp?nU`F!=a zEs}l(0XZ|#{_QgETRz?=&DgD!$vG&d!~0!7zr`Q2yW?r&V)}T8yL-3AQNhi}+ZQ90 z0dR~QfiW~9<0!dEc{3*9a5Lq^;#TLb;&XFAQnt!Z*3@Iuw34f#H9FPG?~?|wbZ4fN zQ3_c_MVfgNutg>np$0AyK=#!ZHgAmtlL&j=;)hrM<*J`YM5tN2L>TSvWxvC|u;&8z z+9rDJmx$34En)PgOu~f)I5QtRA5L~&ymd#jbXapxMEl_9zU=3x`1mydPe8E0Uw3-r zz2~{>ZpGundjB2l&XVC6DX02Oy;C49Gbm(?oVpok6)Id?+hWR{@7-;k|qFWjG%df6_o?kTA^;KWC)d(Hw`A! zY2Gs6W$9kAUTIl>RtX}9=YgbaIy^gA(QmaHud9zEbJpHW z(jys(rA^-w2tyv49(1SPLutD8iL#?*0OeqF5^Qy0Gv^&&Nku>fV^>y5A)qtkuGT0L z-K)0Ej;%UCp)&hK9I;ii&Hwro507ZXlqxO#;lcmY{qEYHWQ*ZHobbm-(lbUfBj9db zipo!+HI{WCL?iapwvFev?MXj=-hO!IFIVjeH=SL-dCcEDUO)Y2@Z8kM%-jdXwONI| zO^!ZA@RIrhei_INNibJyBGF;C2sCMZbP~U__%P5c@87l4d-s#e3ZYF*djHG`gvu65 zGgod>Z@y`DLK5LrcZP5>$w8E5}N5m>Y40r0-@q`PJ7_m_uE6OY@)*B%+Z?nNL`TtdMJlAC_iOlW~v}3m{HBGc7awfuM;L2 z-Q7&qZ>8Vq1~(CA&gu zeS(iBW@bGURQXjAfSV`6VIfasMhv9fnz^jE+#{7%(WhgScqb~BshbWq)1kA8Hwz@)&HDN zXUYU;yKhJ8Z1LW7&`HXsoMNbYR!NpnMuj`n=1qXTy~fki_T6_aDMKc4|DpePkst5I z*SBr)_OROh8SaKu?&@9E3$rEb8<;zhEHFCWF5_kY{EPnmbN=h4{kUr<8*xYf;gWy& zI-LIQefqsC1{}-EcPrj6`f|md>9iywX+Q%q%Z8J-u5edPrY6+;EqRZAH?*gi%e%F` zJ7ekQEhACyLSX@k9Fo);&EzbQr-tT=#8REm8l#)ki86e2O*XBLJG-{IZgir1Q7zQ0 zG6qyLs!;oO?1Y&Xvwg@sMMd&0`MN7Ix0vv3YX+bF24EQ$xsN$SBEiUz;8ds244!~W zmji2Vk86IsCI%D5Dvir2fp@wN(4B!%j16i6aMKHY9IE=Az2xfWSwS>&wO1#mE%kSn55KFOD-o$+>~Kf&0JuBB*Tv4j#dw_CbNtaa{3}Dtr9P^`U(GyXSspa%YP(0+yc7 zlsl1S?^k9ag;o_pZRHACxg8|jH7&(Sl!@$cca2)mQj$ib$tXEJM%hW`@X8o7*+L4+ zh>SE&J*oh}Q(y_9g*?c@S(|EeB|_T9e(p=AcBMh9EK&`=r$$<3Dptl)fKa+kda2b) zs+$6C)(Z471JelaGrY#?#~d*~tNQR#g*;9sgH-$K^4f`1!ZPceVboI-W9a$I^}OcY zLzlva=czw@ul3aKzFw(TaTgif-gb{vj+22WKN_@2k%gp8&(xlmXZ`fc{==*NWzQF~ zVjExKpQ&xPhkt+hk6Q1n3(=aN?%Lz^@`qtT|0Vr-XcIR_OPvj?+uGe4**$3!Kg9q* zy2VLttS8HD_|kAbsdu;^VV%g45Hrd`Ocb4H#A0+)gI2In4QQ-5HWoLunZaxAS)=|G z_VsF zR=7w>*4(t_FvP~}Y*xKk>rB-3I8p;Lr8II}FGN=|Gr454o7>l?umAjSFMs+^fBHZF z@h|!I_CJ4m`0Ec(7uv{@5aVE*GIm+{E|>g;EU7j$&BjYZYtyv9T*N1Huy~&`nrM+q zs=;U(f`iiH7UuI4oW@ILkUKJEV8Fp}P6L&>@T@hjkv{vzN$2mbku@WviSkMd9g)2? zgSodEY9m%`j=PmOXI??9%V4S$>N+x7WVBZ7r@AWU#lQ{_URo`$E*=H$o0+#RqM4U< z>%5oTB&0VOC;P*U>?$;pn4(szAh~&)iAUKuXe7!sx1uUFWQZ)y11h;>wm;?3fzp2^ z4_9oXRB^YMX9yD|sk{AH^;CBwGaKNy`ybODwvePbD-g<2Bp<-bjef53Z&QUN+LX}3 zlQHYN3g7bjIAByJ-4scqOW7MEGs2MJMhR~0t#}SOCSlCvUUbglJ!OJugkr*3Hh(~v zl!5BfJ<-AlD6xjuF^f=Ux+IwrWUHTdsXfQ>j}?j~uocSeV45*m$wivv|H<8*;uMfk zp+wV|VM0$+cU{aC2@ypRm8dDTS5i-3(RlTYUVdQ&TVL*T3~evhx1EyfsziRc=N)6y zSKrU=VWI7aCYzQwkOI&(uCM#^j?Y(y@fha4G%qh1KR)sMyKy?3trkjlzkgi*uIpjh zetc^$o34O~cdqv*{q8*L;kVMfvrH&*4CTleoMB;v zVsXCfN#!=u%+98>qcs@K*wbaHgkw)q%{)98BBOSxWScBV63&E`gq}wnLz1=)4RRMo zmQEloxY;p`HozV5G>AGoetXKNJ%1dwfld5ieD6A2F1?wB zXqjHc)VeKqZnmDb7=vRU5bjPZJlA{cXKUw`=Z^EDMq0{^EMFmj2FV(gP8QXn&CxJM|NHmxa#>+(_t_w5*CEB4Icx`d zP!*tj|7*z3GH5%LeclXvnjr*lcIRE0-=nwOLyGb_W06S^pyJmX^Y)fi_J$3i({7||+K0%R{fAp~Ic zmV)RVnnW8btzUX&FBgf^382+dm;m5rVKVp9bXCuyHs^^WYKe(K)-}qRz#%~;x^8v# z)zT7%oXQLq#woI~L@}JJfp2a4jlZR^Qe+g`aQLnsD9;V=7s@zP0(97{QCUUXfXoaO z(qH7!=@p+)8aQ%HOL88UMSU039hSJMw{Jysk_8G4sR^b5LrS`VJ!4RF{$Oi}p-6XN zYR$7Q$V|(*_y+)mTsF-$TSE9oS1w$$jK>8N!iW?cHtW23sDSyZO_+RVsZpD^5aKac~zIOsh7krS?G+LsMc(C-L?FZH74j#!Ha~` zV&9=pyzxGcLJayE}TkV>mpfbSNstuqWv(SM^DN`EA z4P%SA4h=cYq1DL6!URNRV>Dx&Ul-skcNVBlAMMwcK_rty(}Bxh(eEb-xbYUGtjg)W?qRPWX85Yez2% zR=pvx97(Zt1JpXS8mP9QuZyqr)%;wnax<^cOR{kSd3LliWhjn9PUpi>W=5ur$sA+6 z?&FPLzHHYk%*-v9eqA3{e|Pu0@9%%}+jRl1PtQNT4l1vq*KFUNwwRDRNy|e{#e+jQ zmr(+4o-3-7P~%fg{nfPJPP74N{eWM1EDVTVXADL|uY*)&ZDR8UpNc8>qM7j9I+8T^ zTEjjlh;d5xRh{zbEL z{+no$9ZA4uUb+K2DEv0lx^bj#9G}SX3zcQlv2@0a%Q9Ml0d;)lX2uDqu?otBW~QdC zo>l#$831OJyPt9U{Rx&HkE($4`m2>e9Z~BORVv4R&dcMNGpJN%nJCwHEeQ%Dm1Pj3 z*$3ZF?EEzA#wu(uruV;O=2_6V3)UF}OnNz0ILtGms!K-5qzLQIGVrMlun~fx8kJ&w z9TM}pAY$6|LI~`KKvzVG6;siU$)=QGt{dT)#ct5tnV>3vZT6362a1Oz{dN;qlx}@& zb)ITJ5y|OwKN)qA8LHk3nH8H*b1IP9_WbFWv2FJFz;$IOIdr|ozkSVrc<~=$67GiH zcD`QqKPY~CIt<*4?nr@xBS*HorJwb1%1@E6JNCg8?_oN5;5 z1-?UsbF#Xcm#|j?M}l)^S4qq!oWx_>QJsp>rnv=5BubjVL`G^$?y$GeD2q|3z~Z|5 zcVJI$fv9N7$UU*|8m+p2I&5+OaK8-f53Vh>xGfg%&whVmKQ(i6BglwAWDF@~_2UCH z^XAs%C+FgJaxNXsClKBYKC$k4<>3Z_>4)C|AQXcF5u~so2eid_-adc!fBq@HY#bS@ z+xx!%=3RV9uHP@KW$fenHumTJD*nsM_)Vw6kjD}+a=zR|9y)+y53gITC0PHj8R|JH zD&JHyHv=qGxp*sZo9&ph6=mP%dy!H*+GnVuC#$H|5kq}k07R7|b5(j0psd+EXlxbI zRE=vbUak7f!%$j6^A13ARKh5ad#S3@^cAW_5$AhGpGB;Ch>7j+AnLHn_gqbw7q+Bg zq0L*M)}<5S$$DdF4}O^T&+4yP9RVl|M1}}y8aU5=QsyAZ>Enht?h_s@e%0!7+y1sj zxFtQ!)?3p%eBKSWxHOPJ9FdtsW*Aucsny&|0mY0^0bIz)%u!F-4rhH9_*9ev&L&`< zfyrW>gr-D=Zj`^5(tPfl11jfJH|~QpYb`a(v3=eo>4$TajBv%w2%O3x74N9s=%K*U zh^*~v8pzBsG(8Wcf^KRwsaL1+SW{^w50K^-X%hSiD==}ny(?M$8dG^39H7>oC{4GJ z#u$-Bhp4e5D;&Ni4yd%tP)L`nF5CWkY2SZnr#4#V%OzfRye4)^(o>j+PSmG2e0&|J z?}U0aCE3*D2x<4r`fhxDOHz*){IriPY!4#i{h~kI>BG6Li|39#sx{lK=5Gt0TkG)C z!tPia&nJ1ezGjhqi%pit_5nwW;x!+EP6Y`|ZF$|}vgtA|FC%wU;~{EwI`XvG$Vnw@ zHv6fl7X_4LW|3oFaNr>XI+ET5iNPXRp>h}MDjmr!wL_QC6-;rYKy`v*7eMUNsE06h zF*cH~8@nl_HJ!!DZT5J!yN*3XV={`<(yuRev404xFfa&;PvV zdAY2Q_v)U5Z=Yju{Xf3ELHWm~*wYO4N#clCDes?eEnj_l$BNMmNQ&~Xid?OQ@pKiN zGZO27k+gQKU@StJZVQ&7|9eQEe*ANb}mpH7^O&fzJSDKK1gL&3=6& zw<)aV05gjWn=L(O4?c1J8LB~POithIu5UKJG^fw#fx0OsL5cIPDEj|^>}cvW+mTxK z{(6`JGjPDmvr{RP?J|Wte!8jlGR)>i*`Oh^EI-SZ>e~g70H$RmZw_ZiZ*xHZ!CF36 z`&@=4V5LZ78Y3PT&RkX0`grbwD$|Rq%OGnd#=58-coCk2SzCk7}j2%K87ZVnmg?RC<|mr3GgxpJB;>OlLTh5P%*v}L9!x(0Jh$0 z2~ywcfd$RUi6m0BjIcRJ);pUAPeVk;lV1&O)8V zlxmw!qhvpRxhC=3N8S^T8Au?2FiQow2dSW0#&9)(LZiXhgTY138y^P}caMEs^3$u{ z-bRL&=68*EC-lZdUf=k(V+#ymNDn9b^v>6n5Y-o3$y4Xr!A`Sk6%-MfHiuHkRH~LL z{e|IHYgs5Ho^ zKocyDwqNq)Ie&Z|Kfl=XzBx%pBi=Q9So2-v`F<^HdqI6&f#5*|2VfNdS%{jktPl!I z^kO*9hHs)I$Q*CuVMZOKTUBADNdxdZQ^Gp0cPw~J1eEA;wU*4an zzzuYmL#G`WTk%J#afOcIwdA5k%Va^B)&E9$WWlU%+M}VJEwVdM+{+61g^}KTmKM@z zsdPW!VFMudUcFNuzf)h%Ol7wur4{8zlZyes%gyY-)~oR@d`V#QSzZhF;T*K)7(bC` z&SmFu`VX|AwLIKqY^u@@f*P%IhmWy>wP`rMHgARg_$zKrVcw=88Z(1T&e-E>3N>L` zGLa-(-MhmvWw;P%#6^pRULcY;h zQCCW>$WYA#SXMtZ@K@$vS!^PyuE<|a2+}k}tKv{F*bQ3D#*tm+ftE5iQ{NM<)_T?q-dOP3S-O0Yc%lEs!1b5MaMm;p$ zuf2?xO<`)Y1RI-neW z{M~y!KKAq7;KK>EjyRTT8Uz17S8tjoNp>6wil{zw_lVqT13*->$(|lwqVIo#IRK{F zWOE4AnpGJY;qLZSrGKbCi^ODoACOg<;ft9)T|`AhXQCLo)$*C;FyA&->2&1#R7B>S z`*ptD@bRiSbpju^BzPL2$!h>4%#c7OQ#F>!5N9fdnVKolqApuXjoKAhYL-c~DQBJP zTE-cP%;iBRs5Z_LnYCG}jQ~ivWYVyqjHg}q^ixM-`OKOqRJChNt4YPl&3wPc&mZT% zebm1{>zB|qxB&*7jBi|jy5OILcefau0qH(6!#sg@0AG*|f67&C(S%5n1*11qI@qi2ja165mdPc1|qtLp$7$y$-9U_*0Phx>+II(YD4kFrZt7KA9Pkzlo)P0#c zI_m(2T0Mgvfc7En$89;*6cku`-9}WD8Bt8k6~9&3?wUVfwf&Wk7IwZ;QYVAX0#$mT z;O`Y@CDg{aFMhHL$fY{ZER6Z}HS5LD@6Ti0UEh+nyuL^(yW^|y3R`(AYZB8bTIC&9 zg9Te1@%lg=ROY>^MO9pof7*kLDlYPe%|k&uln}w z_V{jmce{Q6S-*vSq#mgMcFBKvo8Nr!?M!pR1XJ_aS*F=(=hN7RJ%(=kyzQskT}@?Y z+^234PjSEN<1_wxvmXOjk+9FM-(K|l3;+E2{!fGcKFh8aqGn`3_o+Sd9#O-CT93Xt zA7rPkXdm5)YH~(gZ~LB~uk-1y+tisP>|#QhWn0e-5>ttUyyYwP@G8Rg#Gbi_rdTV6 zvRbg7_@#sGK!=iu*L^@CNj)7{nYB7ZU-}xSlyLB5Dys75iO-=eXc6x&80N~Hk|~Da zd@@iRW+YR$m;BqO{L5$jZMSDJi6OZ-5-*{Y-VS{CyuUe}=6&~v%^6+Z3RdvD7x$&l zB9U|}ZAqODk}4Ntns4XbcA6V=GuwKSDj1pkV0JkV+aBJ&_3t0{KTZ(R+$*>MP^j`i zt*=0b1`#HJJwmDSv4e@)nhCW+4Ba`CE#HGs?()^NIS;(0Sgfo#+f(hrRbC5m(z>Xt zmd}pRW^OD3dNoN>^`Gn;TDh=Gv3gUw7a*&iBdM<;`+trXuiAb6$@(LrD`d&(Sa^L! z=PV$*I*Af)c~5MqhM>C@sCg&UnWLjC)zPR%4)*$7F3_CGqBWD<29H{kQNdYj50Z)i z(~;9waIXzmb{HbqVgO~fSri+5Sl|cnYO*Jw*hEUJ3tTF|jB?CDW{HTEX$v;3*X z;=)O|Qp?H$nd}khvB01gc4FnpFYEfULap1Xt0Mh&y~;I|OzrGfbS7pgc*9J?6n z(pPz!G*&M}GP7NQQ8%HcvMaf^|4Qd}2xUlz^`H7T$_0oCI1HD*=+}CDA*_WaVvk9f z{o*D?B~+SiUbp~k<5wTHe}0)SQ@<+zbm2cg=J#Lu+pla~#9?JJ1z%4Gae2JJ9B%Fw zhH)A?Z;%+N5Z%(I1(mn!wBPP{rcVWx66amI#t^>!Z9jc`^S5tmQ%VV5zfoa_qgBo+m6q-oMJE^M&F|0-uiuMxKGH{#J55&GclzZ z+5>mlp4exEV6{blxyCzH+RRg8tH~aj>v>_0r`uXnpi=?8?R6ax0V$J0G;dp<;7{InKwu+=kj z)@+kZ*2Fbal8pga^&6>j<*x@O?Q-(-IWPOWcc-s^zkS^GS!OaJ-kW{@i1+U{fVnHK z_a*yUEm_xF_5KFUhO@cqFdhM>iW1a(ounTQVPwPQmBK2suCZsMHLEHV;9k}dX>JEX z(h;s~SX2`Fa{Di%;x6acO2~p!yb**2;53T8K6M3wzPvczWySa}LjS_0b^J-eNKrYk zSgJTyP8>;xwiYCGBbJLb^omHZ!TnsN=*noyPGhTw3#%SbefyjFfHgz~AR9m|9Kx(5 zb6myimo+K{1;GA%<=mF#|GPRHw2%=Cz^O(cOY7OKO~vT){%G(*D`X>sDDn-O9Mm{i zuaQVBEEBdeqB7O=7syCu)&4pVr*06~AG;b)^(2Bqc~o+A((e|yN9@UKaDung z9Uj%4M!{XAM8g0^jfg=ny$evxO6wBS06BGbo}nU@$~!&|X)`4>$y?xQrkjv7GdFul zeBS4YG2FNNJP)%IOOJiO<+a>TNJM}oPnECAlyEbTIWtD>(sdumK&6);Z5%1H28uxT zVB2W0;ACkQVG+sm;G6Bu``iDupY_AOKj|qksDB*uzy0Cz_L~R#`1s?;xTz(}70-4TxJt<0mEgx#nrS?(nT!k8PNrF-o{vFZcX z=x+5HSWlIoj|*jFZd%Xk<_QkPD1nop14$94enMl>6J&Tr#i3_9T@y- z@^is7T$E5Yez%Gn9=ihc+WXbZtXv|Of-q@~AFCEEISf(J001BWNkl-)|L4%dh|hNn;E(Ud zH-CD|$J5;N>DL!#&uAM#sv1R7)PAS+tY$}wIuAx>h7r_iI6xS#@Xn&2Sks?$GzY6b)2i``pH*d30}~za0DJ+FM?uQ!s38CgWX=e) zCg!4y?^X-)TDw=^0ZO}r6>hjbw4}^s?Nz-|qYD$YvXBk(9JmKbw5in*{{axB+T^ol z`*4g3-`SuOm{a6{;}Bjf|`MKJn!t#&q5(c z87P*Rq=>~bT0_n(VI>bi8X-l`*-;yT8l=T>p8NUBM3x5a2;uX{_Up2L(V>L2Fr{|U zY`ID&91>L>w7ot`TeU9Q8u8a95qfw)9Ke?(A*q@@R>?|fZ9+Qyl$O(mRfmf<6YWC2 zJ26%l50Hr0gjM-qH6V4rs#y^ZObf3oYU)U(Aqfrl6V0S?x;&WWj@Zo|C&xCpjXtHz z{07!)$m8^S^L#-VxFID?$oM$UU!VWM#`%-J{+OR`6KNaue$$7G{_wRweCz&ZE4mFd zslau=f8KxjJ^%NUe%Qw~lxZi|cT-b2wt0GYw}(OB>b{KgcDJj$Zv(?)M)Nm@4c1E3 z1COs(ctwoNoFM^`+>^J|E$te(Lo+$Sf;0^XR$VXmF~i$O`~H>z{k-!z`4mX0Jn0^Z_l`GP zS;eno9MP+CYwebarDH-`5z~upqG~3pj4}`f@|Ed=UpC?$?e^{Yt&>+C z6SThra=Qs$QL=@59STbJQNEpgGWL%DNzKe;#a+n8C2bAfBh!(Z`B@XFN|0S> zH*|AI3;LS~Rz^XY;9~4);XH*0Wwgw({##}?u^fzyg+>+{-Z^7cgRrHZJ#KZQW>|9& zbsy7lUp-{+aBE-_YsaAQeUL7;L+U^-DDT&bi9vLme#t8)+#1T#veHr)V3i3?i0L$Y0%Y2$aT$tvo5hnM0-eZZ9p>Isq%* z2ch)fyGNeh-M)Uhvfvvutn@C_@Ts zyn_X#!iJa5V8CLZoAn5gMVqSfRmNBT5r~Fk(4&WHrH~w~EhtcR zS_k8h+35Ds#dJ-141W8T=fY~B7K^d(!;1KWoG~j0h(rW4`^Af5fZDabd<3h~POMSx zQMy-8T}mmo0a_=Ovc+Hj8tco>$;FoRS*H>>ijqSwL`dEkj%=~SYK_N5aTQlv7I zm0j2wvFB)2POcufK5j`RGvV8YkyZIrF>bYREoDT^o%D==6`#cWTh;A`k(L=PF=02t zX2@YYpH4pVdWUb1Z%2N zy61g&oJ1z%W`5enxILci&BlRr;9@l7a39WY+GR$WWl&vimUD|dfV&jXBxmLh>?I6= z0o{0y>i&cB+G&zCs@%)~Eq1Ehw2_Y+&dg!vZdNjUY9d5lWDf%m<%XHM4EEv~vF#-V zm?6@AgUig$Z-!CB_sig$8y`RGC3FiKb@qDX4e)u-oaw;a1Fn;KJ-#hW(hkYX+*S_K zfzTA3>~Jm6=py|z6iCN*^0+57P->+|g?7P)M}!;K)bdzWK&bqt)iW_!h~ zZP_|x43m}DBjvTSr9}IyO##8$VOy0=7f&luum+KGe>K{wQZ4jvIM&V4wOW?^;ET{uNnk*FRHJBiHg4sp4dVq`?#-(Z8BSRy!Rif&GuhX_RGaS1Yo2JwL?6D2N?jhSJB z6i1f=pcZU$ofZJz!PYV*FW#)^RUms=-DXbgp_~H7#sU-IfRD;3i1N<#Qs!8DOtI@I zmVvHpV`fCK%G~;oUIb}O67aKmZfla}XgqG*A)6e9zRxyGj*Ki? zxHyrPMlU>qjDVYO00~1PX_QN(DMsc!a|+lHd)#!p2Bj!FnN_eZ@VPdGAQSaa^>{oI zL`dbLU6jRY!jMR-0@EU*3~(Z*nE{4FKvqPO)EcY3mg?#OTXJ!rVpUF>xJ#a**Y4SL z5o^TOFlK5_xg%RaTGUF>7_<6-)*{n)Za{+N8q4)t|`xv0swfk=sQ7GClpP&JZP>> z;B7JUku3YKg-Sb=$G5KNw6xFlNFURL3f|TJ@23al@ln-u~Y0})bXgSbYEE) z#pu{hP?*8C+KM3C2Fl;6;|&7f$^9|U5B$R;e!b^Q`lp_L;{<%z_%PrnUT0W%D zndiG1@j3MpApM+qOXO2LZ0GY!p3VyHym-1eL5sQzOi7cRbP9tmCSikgDWFr8ifHG2 zqqA~cKsGjIK&c4`*U!5GRy#A)j9ZcRnIW#WtVVp5{=0lI*&=A4JM3ql=YWK<^yLs=qJ|=etCBlR>%PUY+aWXrmsRAE6O6%`N9T`2BXR_z&4U)?XBTF-B zugteDa80|paHwv1R@Nz4sZbMfP*cL%Vy`x3D;z1S_9w+MNE8-yvxcQSqTTE0e9;^$ zI%fY1gibIk3D}(fj{uuTDccO|kEwo3ABv$3f)L)>U8F zt?2r|Lb3%ai?j3kgaNhUZ%Lrpk69%TH1xD`_>$}{0Ijc16or4WWDoeLSo~#h)ES^g zXw8KXRr}sb**hhc7gi4>l!o$fgjjc~)le~tk8Y2rEs;+^|Hz0n`P;={W$NAJFOv(8sKF*ZYpBGhuMgv?UdAyS!95c`?M-}8=Z%$F)DA#FRooI%0dy;n(;+IWPrpZhL90p39b6amrSi@=XMwx9wWl8 z)Bg^*FHMV&(ibef$^Omz@S8&DwAqP}$OSQTzmyHX@QVP;`9@@8BDQp8+J z;C6xOc?KXxH98Jo>(3g+#cLGGa)T672{RYuhEz#HtwwHD+1CSEQLPY;b=tr9@W;B# zb@sC+izFP)TTOyCq&t8$0x^ryJ~fl6KoK6r`6|c0RK*gn{75V`qwML$&KVY{k~>R< zgm!(f8Y-wZ8-j^NC!312nnb8|R#Fz8-><7`WhfzZuN{{uF=Vt%tswyxsJ04ktxhE) zMa^R7u9ME!zgZN4L^DcX(=2gZpTZ)v1S0K;uOf{RLPpxUHWVz1iw0m-;$USOyTV{)~XQo7(8HfgC6;%OM84jQ%{z47pbD}iE#{<~S@Kjy?U)hlfRrV;6f}%B%%TEO)D#!%xlWZ= zUoI=PG{}KeD(d)%reQ=Ikj3dV9O?D4y|sxj7#)yd1agxu%Iz!(!;;Pu@JB?-_t@W` z^wq^rr!h`WPq0=NBi$f!!0mqB=f{29S2YXi^UR^~%N38$d_3)s=X2igG0dl?fqwR3 zR4U{fg{YOt5IIa}Ic=7HSVQt;uZ!v(2Qr{`XCrR<_2+Bc!^}cp`M5Ne&YGFPysqM` zQ)5-}Vy)crBEd^yq13gD(Tae=K3mpvIFqd@U02wlC`a&IYmt!fUg%h)LFmgbx!7`7xo)x`HJyoSy{7T)xJ>12NS;K3W|1Mt&D&n86$KSU2muz=#Pv&Zjo#fQP*2FK%*e-h$_F5dRvm#YQ??N6W~ZjsjdbPrfF>PCm6*nk2aI_p0p{VA5LWdW9Oa^)y&PV(!fuXlf6t>r2!!`pT%V zwd?qG-c=7yV`Tys>7mvqtcP~FW0ZXiEvphxv$s|^*|tk7tFrSO8J+H=K!O4@l`Xo4 zdKqNRA-cJ#CaGYcE^13|tkvv6NE4Bv>oqe7qbF}q`_CWufB%$!o#QifHtzR$nY=jO z{~r1FW=5VirpqQZP*6aGcFkRy(u{n%=WWiHeE#h@qKxLao#OG0jrY^OK8J5M+D6q_ z*sBDMZA)xzHJm;uVAu(mq+L$>@Xk&b!9jN$t|DxdhHHcbHwPqI2q$5Xg!a(q$&b(Z z{tV~cj6Sw>x+^0&Wyr?5>X6qnkqHBBiwXPXL22p#uYO6`*TE%f)xH_=6UCai!M=Mrw_F)OEJ*U+NVL z{HcRerE5)fP_8T8^;HJxK4$@JkY!}&A|2Eul-J-I7O##l615GXVzV{1pp7!ff-M2a z=BfiyuxhBgFI7!_wZtyXf+kptz^Xi{*16s`mnm_D_@i&_riN@psKA(F5EEHjn^S7F zWF;8Z2&0sDDMVy{$s;GNCX>bU`x2&ar5MFb;OY1H{ItJ)4?*)D*SnsA6H3^g`Uv~^ zo}X`;H)+2U1KOxGBs7sjiJYl>VnVmL|MGJG6faNl>6ss&@ih6oN0N`0e|~4*z1KH0 zAKdt!Y*G}M6GE-pQW@ae28TV4+$Z+oV4D2>*&i=FT|#WT)XbW~%c+wMZPUStR%*Lw z#$v;JO0-0^v@RLx4D?yaB;Z2;&AC0h+(JA-fZ*R4WI5vRR3s(4D$DT zUJReEIt}?JY=i0KFjzWknN=u~o`7mgfRumnXVvUg zw~=eMjjnyG{5j~D0+>b`+DoM)e&_s}5ve=qD!meU$U0WSNPvZKtVel)`kmkqQ4sDz zUyI-G9aS5{IuQT*5dEkvpaT%Iz~*IJeY|_ynl`A;8lxS4K7H*w`=TR1mMEf<>Ok(j z+oV5~pn$UXDX3i=I?gV^09G2P1huN&+CtL)DfJinhwIa1s`mw|!Wbff>h}r+=?v54 zEE%+%DjHESyt;HjExxICu$qv{D193X=V@|m3dt5xp&cO!#;nW4o(r3IxaBfOVi$rL zQ9V$#0{BxdIWpKRf)7j4(xs)GZQk^a#X4YJ8CBOO0s>VQr#4(g^2yunQPuq zc5{i;5{P~IYtadSa)YSld2+4FCLzP`FY&`qFOQFp*7Ug8RXV2(m_ZL_gVRh3x0E3& zd=zOZgL&U|2WHM+Zug&VKYh%pKLdPi8fxfEC)X*>nwqa;ilW$6krx!zibQTyy{fI-9QlHWY&PcL}db0nT=Krtop6!e=Ou6~dF6LdZ$A>TGS z&%a!se!j&Nne8vXfQJLY@P#Z2LPsV{(nl5idTx=g9puBy=& zyvEQ}#v(@Z;Cf4Nx6CX)Mdu9lu$hew6g8+aL8;u1dbzQTLo>>mjTWyr0_P(K~+Q3S}qwjj>fM|c7 zu1r%sH!FYt-tV}E|Io2ED^~rF=-F@Gpe${H^59pj?nYXx=%updj10;u&=(IoGk|P$ zL8sx)^FU_GWCSuI(fD3p|12t6UyCTKpXe6&z-RFKATpzHJ*!Pd>>jx_lY~|X#f)eX z8GuznR6TC=BH>mce(>?@MpV?U0aR4qx_W>fQdCV)T};oCkjqFznV=(!&maLgQP)=H zvnJt?dQ#I4u=O3)HnCjU+)9%nFcSOZ4?kc3`0e)oQRm0Yhqw2yf7fq48^Sx+AI|vt zk*9O*^MW*un>0((iZF!op7-Bgu0PM;o=$)H?e>??`uRTZaHWR1r3A&Eyy=a_+ebTp zYkoeLwt!Lay9>kI6S5pehlM=Vl6On9cAHP-oXS+|*sWMS+Du`ku~cN0i&z^F;H>p- z8D%mfH!|VIA={i=rLOCk$23%-D(=d5ckM@%BO)H zB;)HyKM(U6obDLgfTm=mrNWn4%#Hg8S z2~cU7Y3;hy^;?&)Dx2c9cjAIlSV|SK{Q9^W6s0OpuJXK~u7+XiV|TFX+FXEl zbx{a-X7yTY`C}31GfRnfs1$R77izUzUH4eq0-&fNd*vR@K>eoKM-_h%Q3B%5UMoDZ z?xDUowS~slLFR%~%F$EhINktG_P0r(=WCs+xJFmt@m@7ZK%z>CPNi5wzy44C zl}(=AenE-KM>T&g8>iw=1*&On)2yN-quhXUm8OMe0)f^PhIG&P=@b9s$9egF8(Vz+ z!T#x&`^Rv}2k;N4{Qg1Te&FN#F)oRbC=$52NQJNi>ALOv$NcrD_@BRB|KrNvCg+jO zG7Xe?r@bUTeZF0v?9GkP3GOtyH$$gRbZK0)ac~Rk$xh{0Br{U`L`2>LO1Pm(a$qLh z6utWzg-s%nA`%&7yP+8|%x)3v2rZ^ua9|Kw#Ifwhtq56t+hw;a$u4ZUY-V@9?yX`YBX&jX2+6N_oo1eW5BRZp(np86R$u4i~o4bCw&!^me z4TY5Ct)8*8>yD?1Cndm*V|&=Q%h_a#fKM2D$ftr9gEp{~AA}`FkKTmbGw!LNMeZ;6 z-+#J({M)sbxMx!G20=P5dc5kh7C2O4Ak}xUk1D&?S?8E*;hL3gg%BBZ-y`Yl!gFa| z-A3-wFefEM54DyCsql}{?%2aqg3E;jwIaH;}U(79#NGs~M3>rii2 z-q%>PYY;tOkpy@dC77)SB@6B(tE&gdTDNsrrBza~veyZOk&)BOf~8>sP|6u7!Dyxk z_c9t*PJu=PqHXm=9on^ZckqhK0|QN4iX#VfXIBu4R!%^VUyfhOM5rEcbb4L@&cccM z|B7c-j!R|Ml|UA7Ra$|9_EVsu>4Xb7>Wt6;S3s!0_}J2Fbkf%AFLYy3x2o=v(6p>* zibsjkD$^}2sDnNGy7U}N0+8*OvMiJmuX2GtnyT0WNn)5QXoy4ni1DM zuXja4;&2YP6KI0f_}36JLXo{6gnI&P?~HPk64YBx3w9vOs7y7GEO+7qQA;4C2|{UR zw_NNP!No|%#2j+vhUJmBpo+TtbLKttdE%b+BqUttlEv0+umCt`9cEhrvd5Q3oCao& zM}KqAZ=UmqYXTm?Bqy5N_>`JNT=~ZE&6aQ9q;6B57?O(2R-dm0P$;_SLSqW|PDwNN zTVgV9alggwDgW&+ALli^W7umLV7bZX7vsK;$4#qeIo<2aV_S!$p2M`#ll3&1wODUX zlz^b-=u(!VU5xtq>T6YX*IGSx0IjMewdJe7n3GW3&lNDW&c`|!z2UvL&va2%go%ab z9_fO@?E8N_=N+A!60#VRhxWL;d#-&peXs$++KpQvu_wt|t5B_9L5_`StB5JGvi%1Q zj0o%9#U0^taWThJg}D^!Q5o5e*O8QEG1mBBG7s_2>I&M2ugm$i`D>ri zDo3zdHXTr1^}d~G7pwrueJfgLWB!GB)V5Qpg^O2Q8&DNEDZ z2Y^T|@6cKx%VHq(4K0|N)yUM;h#4r;A!REEx|LW@x~d(kbE3`)xtg==LMa8LaR+|h zcl$K{^QZfV$L;dC{rOLqvps))hNSmz@!>0;-ijxbIc3>1uA>tf#Jt;0^NQbYyhQ_% z2W^XlnJyXs<;?&44gUB|K7NyS9zAP!qivlpY}JW{wvu#Px`?8bWL)q0yx*SgvG3cU zoqar>6r`0mb*VYB;(O`iWS$H-RF=gJjn${5!3yMYx?x%&woBVlVFgrzyCBkq%&OdI z(487fo@$}Z=;i7`mjqd6WO4>?dp_-ao+9{W104@i*%uVAv8;P@A(en4!Yf|a)i@13 z;C#KkKk2+;MwM(?-yt={J?-h1Pgl%aVoLXEmt~tNKyZu{1TP*PAPiIM0i=j|&%A~1 ziqG@@l0W?Kmrpw$Pk);e907j8sz(mkl zi_5YuK>5&P?e*0w98ukS&3$Y7M{*ZxDOeJ_y+lHGI>K&{RLyEg9>C6?oV=YwPH z#n#`Z6v2v>bxLD(Pg$8z2i(@dIQt@Wrmd>=xOmxk^SWZUdTuXLVh}g* z$Ek0O|MAoQ$FH~V|6p&wJ73Ou|8#Ze;oaHa$R2}d$7VD$vvSa=r@bEGyzl$Wedo|t z^eq@OHHb&U*NA^Sqh=vRzB5!j( z-LJpxzyG!?^l--c@xEyvC$}A*Z?5WnV?9p$*6t4Z$~ee-V5-O<9C5k8%&ITEWvvBy z6dFmjhN&&{8u(q^YAuW*y@2GN(HcnXGtJsDFQu`$<}7<5c(*B4wAIe!3b3PWdrJ-1 z(%%MQj?@SgbH8RAwN5D$JuRAD(N}A!BTO%L1S|TepKO(7zaZp%1*$v9SKFn9;Ve+2 zr)a5WGZ)`BqW2?o%&fuhvh(hP#6SZ>5$qwJ7W_{ch{(xTS{86{X*;2Ic4(_Nbz3Av z!YkZlM?9v*tTAtWddqCGfKcMt{wmGqCrp;*mr`daTa6+K6SZBe!j4tFMNlvxpivh1 zlE92~8dUVtK6p%eO^BMSjZ8&B;F8ElMer%+owkKOzu-TAzJK$D4g{BDc?{?@+p>oKZOG{?!tsG({b!NU|0 zv(i^nyi>~K)Dyuun;wPKV!rk{eog{#*oJXj(4+AtZ_TP6lHXs3ah$RZ5Gg!&{9 z6cP7{m%Dzy+izj_#M|V<6>m>`GjpWbR{I|X$qIx)mPE0w6eQbRiKJ|^^SJ%Pd;B=_ zdiN*T$?UnEPjK=v6ptsqf8c4`Gy|C(0;1|VkwXe#R}=+jQ$iWtHqOjD_D{Fpe!Twj zvz~v~=TFJl4|d7Sv_c?_Z6(rl^SVkX9&V*knHO27>+7C2vs;BkTCc0jZlS9HFr^eN zeYav_)jNnP3MQp5&gqe^VeD29HJmGJMdh;Wu8AX!Y5*9`s6R9S2lxXl))Hr=yD6Ju zT3YGVZmJrv3YkrrnNd$y(fu7#Kx_G?Eu|)a>Ph=jdV3jUAlsp_V|v}eY&7$jut!0u~cAaD+uL;9BYnI-b2!wDJBnu3;k80P)~M>*V`CsbM;__g|U;VG@22WYL21-gN6J|p|B|$D4ZgXm_pO0=`iWtz)Ny<7e z6!?jS^`I>1)nn`8tgO8bRU8RkPc>bph%k5xLsp=q>3FQWI*C%!tLv(YvenDillmfj zfGg*O{rgYx{U7}NLFPkm2TqWMov6X|@UEkjfR_udaSFDL@Vq?i|L}ef-5-okk!iN& z{_Upk-srop{BqIxE4TMU7q`FSOPw}76 z?$n=U?{~zEQ%WeRM=Ysg(u9N=MNS1(=n!%uGpD#mN}SS6%s{M#z?~e{XoakG97vb} z6A5vkN*O9N2n0uHqe94ZG0JSHT=G6f<+z%ctuvAMro`y7M{4E`vo`=aaSCj$GQ>K8b1$KT+_;Ogak*T5w9Y zRb|ngY)(Z_%Er=ORBK#&v*qa2Sa!v$yDw<52`g&JK><-sd@rcFR!AO-BGg!JG5S|< zOQoBYNbQvl!oT}p6fny|2>b6bj+q+wa)d0@s06L`!RisH3~4CT!pYic#U32@aL#6S zvtBdZzOL*-SjWbcE)!|U$m)C6njHv9ctmOxi8)yGl4kN0o|TXWvwVxKQ#8=zm&Vi= ziK#kst$}z0>QJffVi_-0`0jGPYv+3L%I7FrRY*GW>!MKt%>LKKg4CBL237Z?eHj`g zD^{I~%&&v?x;724px|!gqE!M?t6;c7Z&Be`P61qiy!u-Ui}QQTnTy2)siC$wE>NM~ zWbvj7XQ|G#o>-I-39OcJyjB|QuYg6KsgU0hP=yY0Jr7=hj(H#$a8?fOsrt&A5NKlM z-{nP+M6UwCHtLC%i@6Yj{KaMw^?;p(#0y#ErCI-AGvL$Ych~B2*z}f7LolRfa z+<3p;Avo-|4LhIm@!ht)pgsD4#B8mNWyu$ynVQKNh~z#slef@4F=?@6 zEj?2?hVNC}646up3Ls=+5;K)%F;k8*W`Y-jN@1;ohB7k6h>Wmn=BJ&viQDe`4%-rP zK@{f9*r}?M5IID1gBMH81i1P8^IOOF_bUd!dcnt=J*3Ud4f)mPf86k=iypQdZggO? z2F?5F%J!5cK@&}IseS__wdekPdwSyk`sM!nQ@o#2DjPws<_Q9lsq$9Oktg&i( z56O<9S=D^Aw8U76q`&5I_Em2qs@y_XjkqA9SD2#v%I+sRWhj;)gd)yP2C7#_0UqLY8`K>S`+P?T5%}sXfsw(Pen$%c$2ib2hHks%sJu3bh3={ug~f$vKOWFi)~oWDUb8Eqxu{JHo`TBT0kthWOW?Z*R`Sd3}5+GXbaI zW4I?QYj09!kWPAGqxYD8agFg{59iB-Tsg&!#OdvWw#oCBexjWak(ru;DM&xt*ys-r z-5s@ZLOoi~NVugCvb*lj`TQw^^K*=A+Mb%geMZf#u(09RPO*x)RnMx1R$|S6@|D8MyN6XjJ~V?2#)Q#aGQpE(w7K7IFZ%hH_}lOMmc|K{dC90P zi>+6pYR4Ex*_&JACq+L*Y6%6F+dROs=xO3uTg`^ipk2#HBtet0SSPVyJFl2|cx|0|x=cqq%x02^(7?#7;n$is7Fty>5Lgs4X3}!B?_lJl zJIb!A{=S#ZM-|!`Fjvp;G!$9$_bfKMY;CMTG8hu7IB2;D&y#yvfLr85HDoaKnd3>@~ z1qqG`rKSR;1yG@!jMChu%spl{!bTFktf7gbSyY2Wz@w+!kTb2JKB;%`HD*?7w{nYN zqE$r<1Fcy)W+@6*+wf2CCf#+uy*x3C4e=uhHFj8wwy-Cg9$R-ICQK%&|-n)LzeDM3SNYV;mF`3AU zhR+F(0l2ZU>>MxY@4YKKZV&851U> zTQO;R+JidF?nsmr-PC8VM!B}0nsD}g-l0fQOWn|qX75S4763#8izI!5L0l%~=)rrH zjJeUL1OaD6`&WB1BYLxLpdF%upcV%HWzsvD>IEC4QG-@t_qw+B05|oC?x07a-|hfV zU3;N68*urRpL3{BlD3OTO+jwEoLWoK9>+*{Mbp|ESXWN9(-M%|F4b=pPCBLkgza*T z@Vc`y839jvnBifwKv%4vyMr>!GRd$O^03aQc2k_nU51j&Mx(S$*S4Z3H76T4ZWNtz)r zf*qIGIFlG&HLcBGgx4I?xnq+#5i?(IL{xPg)52$aL7T@>Py2kj&HXrLC%iN0OJ=r6xySv5 z*Y?Fq6$32G?SnK_*r%S#kL3@C9-W`6cJWr0I}rH`YLdl4;=kaR81!G8hIhMXn|Gl;)~U54S9>6oa!?z2*!dI00XtxP)1qj z3KR>AhkefWI;*wBXrN}9|JhOnFC3mHXtUgI4g{8-JF=Cmjo1s!2yjGK}(g{t2uAg>6OMN%4rO6GWGzr*m#|q4;74++= z)-y%50>(I5y7iJ&e_mU>>u$U^$tcr~B8BJ=kthd@)wbO*Uy%$vw~V1N!Z7=B&AzqG z3l_ZJWKuSPdAJyPDwZ3qL$DQv3uZgLWIikE`vNFh(Dc%#Pg|7Rs+WME)rV}i;LIzd zs6UmOh@E(Ext!$O{SQC-&mOinFLj^P!3i-ljOx+od?VJJ&avQy ztgStyqyi^EWAr;{58xrF3uE^H3?}Ltk!A?8;kP};JKa? zRt2(uXtMi}`tPk%5A4F)c(4TI#HlyJy2%#nM{u$_d@H!b<7<9{yT@kTR?Si>5L!D$ z|A>yZajmri<¸-uXqlATeqo))Z4gE4uYpIR_vow)`LMtHG%CwBpsL1^Rpo6aHc z5z3($QCJCm?wyJYD1bd0;=l=Xh1bdjLRFF=q721zq49I=3DmWRi?Xj%@#uBjE(s+~ z)Djm#bQNH$4X`spT7IiX!lTBq#Co|C>V-pz$%BoK+EY_I5eMX-!+xH{3L#y^=KU8QLOdQ_rrx|9oOV; z_ZBw*h9{TnD991MAH1Tj;O0yg9JAT$g;T)xNKPm-NW3J%xDS;m^Uc*;*veVTnFxW1 z%h=-Bg%7(wP@f!fzDT^i^SmK0a2e?w2}%*zh;7rHofH@m6HZsS7J_(K2F8e0s}zU? z5E=%-C<9vwYf52MkGsK6nC@FdCKCoZY)2##ogi}N zae#F90!7fRVPRv#ozk=Z0f3@?G7E!V*8%(42s0odn&6ZSr#rU-o%9QURN`Dlm&gTc zTnTi@XqDnr{f#hyN-H{^$4i+ID-~hglwJc_GZWqUXgcBW!oXlV0&>z=5vYJGGTQey zf_>4hc=-~zxlwZlu;U~F1u~+nSiW19#CWsm?Hym-B`Gr(3DgfTmr8tXA!Z#`v4kl< z?Q=h(j6*)e^0{{d{o3|0GMWmbO^kD#-Oz|KgSe0v`~cyLt7;5K~i>{6s^ZTva%K95(4-vxFBcKw_DD*4kVU!Rb7F)kw-u^L^3B1FU( z9d8L~11z};!r{smlN*dch#4{hLr!yp^GsoiQrHILalh29!n+Hz0nAuZy%XPUWP@A? zEkII^h$-coZ9`zR@ihVwUCPOm^bB*g#Kan#GPnZv+h@`sY74O!*=qKmj%%`xTx?&C z^{H9S7iEO{+PGesj+L83}7~= zx=>tUJ-bmIW&!r&xcVg2Db<{_uspIz9Rc7TbtTQOwyC9%3=8_Yq64P-m^Y(#Eg z$YlRdXroFjfmi=zCYfv6e-^V07>gJKOq@Px?a1m(Y{J8{uR?jpQfxJrjwu!?S!Q)g zh;;|{!X#rpOW%yo6Z>ry0LK^vT+M*33Bc2w@GP`8q`}iXVjJ#AM~aaaQ3v;VJk}47 z^}`+$Ip9IR-0<>RmxoPc9p&=sQ9SXnMx-Oc!5nf&sjCGADWIS9_1;jPHoo${F^ECW+ym0^N7fPU_hoKXlM&0eF+SDTVd7> zJ5j>X%blLhg@3v!NA056@LmmV52s z+QAy}1X}Ig9)U75rw|Q2$SrosJPqfo6eCOzt&IrFBE5)B*dfUxt3yfpSasEkb@KJ8O*NYl z)OrJDB-o+A5{qbJMnIJdIAk!SrLRv!2hw&m8*MsRSkrssylfnn(R29N+{0cHo@F1~Atp4pIXV`|Cl*MK3*5o00T zD;*u+Miy`+Al3A4mwi}6F0sTALzKaTQG`6z^&dtE!fL0F?o+V|POY7Owc9lsP^>26 zcl)U@3y_MOll0g&jPOug;Z4lZ&M4KyEMQ*7_A>L6G|X>?{_{)z{Ac&$;i7^+6;TMp zWpIleboA?tV#RhD*Lin`ui=M7DqS)z8#}w%)rW4Ji@JNCT~dXWr_D1a9M#l+b4g19 z6KpLckj4fMc-SKt;f|`zggFO;WWrk_s1Zu^@6h&ci@7(;2pD=8cnDvBi!qEC9K)Sy z9E)1)$3e3S1(5f5`R6bF{S#{E0R=gQ&%2L(`WTQ6Wo}rPE*Y!gP7}2o2X# zIy9A|hEj^mjEHK6vOlHKDrdntcmLhrKK|jidmJ1g2wnYy1<|0|@Yr(zmpF&;SenT` zV<@u-ngvF5Dg+wmHxeC$y>^0;IcOB(I_=Wf3-5DO|gN+)*6~x ze?l6;#(mdM+{{9_jjlcTo(s#OJXao%y#N=Ui;wia=Z6-14{6rtO8eVd<;9xM|DX zKqRlimO9o-t~KKW7QuP$a6q^;A(2N}=F#mgVl^{tF69qfamjW6lwopKV3m22&z|8R z8>UZyMmn+)8%3H)ZsZzaWH2@($f5Jqb!0EOz42vseExZ$v)f}4USEmDe#JS|FC|2P zEhIQMQjToMT?}LnKvpHoUO_~#$aKFF6djfsDx(kumNCsD%bbLnRa4~(xG@v9u1Q>( zB;5Dv7hn^3>z4_M1}9!7*+TzTS`RrSnC^b=mxL8@llR_1#yG z`im=G&bkJF^@4x#O+NhO#ni#4(6py>Y@?Nob&Q<=i{+Fb7W1nw&B?8 z3#x1&W2IQhRH&rGI#knhVj9S?*CTKxoDtEsMIrjgfD;bj65NO&H#!4pWgrP>46mcV zn%oWAy_rpAB$L@<^As) zJtH4a`M3Y$!>|A5(fg9Q@C&TY6L4JlaastcPZn#DsUa{?7CB^A-{D--PaCr%!b~#@ z5wWyNnW@qk7qbIh!e+NDG`HW_hzCwtgq9(8wGnjRWS`tvlDTu9?FPkl*115dW@Lw0 zD8iacj#8-ghSH^@mygEQ*r_5_VW=(2P5*KQa4o#Kmr%fg>PGX{e!{tCUd0KY^=TYu zJnNc~mo$FCK_%FVWotknx?H_4hx0g<(KQI|4CpvP$LeIZXWy*>C?kr>;Aq|Cx*B2C z!b~JWLUsG(qI~;5ELa^yw1NxaCY%hhRZUgBDz$B>Z>(oG8G5X4Y+VcM(VQ#Wr!22H zwtm;!9n^1Q6BBJ(V7Zxsn20hh9*S1-_4n_2N+!g^%DJK%qN49XAmj+9%wVogCa@O1 zKL|1!zE8wvCJ+;W$c6`rO|FO@YDOS}39u!7=hDN-_S%33v*kb$207N62y&qa5t-{w zX(VnC=!U5!bri(xH>P`lD^OAt4$)`&Qb@tPxM~-QoX^*Va0pYVWv%8pA(iZ4H_&0< z@ptd)7jL!~yYiZ=XA#!4pN{><`SAn4d#?{iJRNlUn)v!I-dtNbIN^~AZ_aI-kzrhJ z{_1v1-2NQ#F#PJPOMbm+0}Au0T&R6!9G90{Ubl!#7ae!xUuM*(d~vxro<8r4m{U;# zdE6YKj{D+K%(c*KRvmJ=4%gwDvKuf=^y5U{1xf-Nq+<|}M#hi^mEeFkU>jbzwRH)M zP=>h_Ee!>9b#nkbY%2sDz%;@9q$+TNMZGejd`*J5v_{kg`0=JfV6Xc-UN+v{jbG(_ zdxt-Ks9QzQF9(7Zneelc15G#wsFH4beVX&eKmJhfKIvdEc+9*6?#Qnmu5S*HCrRGO zF)oM{1{oba|M-c2`~Us$-~P)x9~;^>-I|;wV3P=UF*5qJ(vr7vl{X$RlcV*f8B;4j zZKd5QBI6J;Nv4?OAcvV^{}{+|5r)Ya0V7*WY%G+vF=3cV^rO-y0!u2Ak+!Q@2d}xl zPHayM*PIbcER=26v!R0RAuJFz&>fgo#*il1DFPkyQe762=5(96urUs(HG2$9HM~GA zTZy}rJ(uyf>5@jAPg&K;_r*fui02xv1puFtDbOe3tR-RXT_YAQ-;0V@k>qSdDLBMA zO{+taMpE`7fsNjjy+Ae_a))D~-}Yu#i!LqAr4eAw35PTRy4Yzs0Bg1Wo^nnutrToV zsM^TvQ*^(G;jLrcTZiyju{>_~g*t>sVA=pD33xYJi6AQycS(|&u%qDp(4&15wq38T z{_4fHZR5>|yZfVd*}Nn#_aip|WoH;wVtYVJwbya;ryu>@`}*#Q|N1n(J9Nlq4EiC) zSD*Z6clxsj{8^e;@SYq=2a5uqKE~hw&4>T~S08=bf-9e)4xq&D8) zvlbTK%B96`;mTnfnTTnO^$B;9a%7~KKqNP&~rlJThg9w&34z2uYUQx_# z&9Qw^EpbXi7L7SbKy>vMSDO;Mcqdx@Hydw}+fg{FNhxB=Vk+PX#heP6<=J8{Lqa*m zT9t~5h1K>z-bMzyyTld|%3RV>e^~i9nLY&0IrJmm#6wY_$katjvS`B;Z6s~eVAJOo%=o8g2liW1A`5Z_0; z)`HQ;Uiu8QIfb-+1y+01y>O4|7K4yYq?^?*6o8Ht(%L}#Y?osSCBl?LZY84pOmC=1 z7Xm{JbHuXvupu2sf&+1J_j_X_iMRr(#prH~B>RXDGGQ*ya5oM1q#t9UomdJtta}|N zy3=en*M-rNf^}ysm^0S>aQ+^Ait!wMeJ{W2=@vEt&JLz)SxZSk!PBL6kFTSD3UiUY z&*V#o`1y;>VtwS`>A(F$UGIoVTFIe5uvV14)J5Bl!W-|u`6eiCo?mHs^Oc=%Tr zCUAG1+rtLh;ouMu4|mv#F9FjBHOu?_{Qh|N$$xyzeb-CkZX<({*_te%s@6))IdvSj zTYcK`;pRhx;^oi?M?eFJSvbM`qcpicRoz?_w*!Ybwd7TaxHOK4C|Gvdf$mE0f|6e4 zx|0T6V*it?Av2I903}X5)@b;w+}A=?+d@5qp8y#HBk3fs6ApFKStEAidKibd$tDw?OL##1yvsv z0Xv#OTk3Ant1GM(oelm7Gq6qvQ~pB#c79hG&q3^JKD@8t{`YzG^pF;@Jnby5q`PdV z+cQ9gq0%|^KWnaF2_-9FdWszqvHAk~)dLnN7Mk$1+?pFMnWq+J*K=h<-%D9dteiHc zz2cd{C_(5<+cd#fNzE~qIKcNw7?`gYT`%5_o|;=u^;ld#P#CL z_D5&~ke#8b+tjWP?~mVph=2N_-tYC2di9|DSJ%6@FL>RU8yZV2V@i+5yy@vlpLe`} z!iSpyUz0~+mgFcot0ymMmM4y>dGL04inl{$)*_@h0$VBVVz;(}9iDpjShX^`uUo*Y zHxi9zG`?ud%vjt~zr}sWuN*E7(s63n#0fr5U!W)8K5$8HVrTLvl_Pc2=fV%=?{<8i zHt_RN4|n$%OR@%&gN$YpLhDn+mf{|d$EQcWdy038_oYYE#o1^c73OF2@zCDLMJ6$9 zO7XjY-v9c){_*h#kB+igFv4PWPprv}L3Yl;lGHS5xcr2zZ3Grn+>dZ$*|A1fL#9mta=;8`KV^)t4m3F-pIsh{81>5MT4PMtXtx)$^NhH_qw1sB zQm_EaigCB}PBk1L3mUeVfXc4s>6s3dj+^5EY0ov6w+*<8WrWg!DW@Qm)g{p7VlLR; z?Un3L5g46<;l(5@=PK8NwI2S~G!b8#U}z|u76Z$6(O(F0Wj>y=y~d7dGh_L#IFe4nSbq?i<~LsoRs*i_X?Uh6qnajht3d*s*;iQQWxQ+5xn zZmxHIdH{PaikJmdV?PBe1WU)EZPs#T1?aL2NSvhDY1$C%bPPw125>l>L(%7c0^zuT z7xEGeb|hA8j0A?!vP3a2rzS9RjNT_#x{s0LVt1jDBlx9vZ<+5S7i2U z-8)SqTvoxDR-Nr?v-YYv;j&7au;7yClJ&Mw4r(}@ zVa$F&gB?T;xQhw(^dbJ=U*FPC|L1>t`{G_BGv8caJ?ZC<`)A~yd{=lS;i&ctnxf8)X2+Gu96P!6UX7{*bg7o@`aEb;E3qm@;KE%Ap}-e zTSsP`$xXd~E&k<@$Ew#@(QJqqX3fs+51UZXF~Zs5OG|v=e!AO+QsOLV*0_$=0bIh@ z?cD z{foG~cu^6dBF6WB`1IfYpLg%Suc0-}!)xCxw3?%3gK?T!8=qK@`C37G5?adqX1Z2) zyRll&ATilL`G_zXazsnZ%0^_8sH!cmZPQUdJAF!^Lt+X}MsFw?Y;$}?rlcjQapU0~ ztWI{sEFGbB1t9|loJpf3wTo8nZq185BLHsfn?xeYnh~CU0wOk8cScK$k3M^ZLXfp! zkp!oMH6y}S0%S}JL5-&9uw*eL(Ojv028}dyQ1)2jz-5aPTd5Hzt==7$asYO%JK#iD z`oNYlqKt&quo|oa0t4L|)xxKCh`ZI~VVh-i1SyEJG*>G(;6kY^H0A)HRMn+aiYB1F z0v~9a5e*JD_(Xt+DIsL8j<9AsrV4IwAGMNqqSY-1=>{=qq!rUPc;ylczN? zXB`K1&^29_$_^JO_+U(^&W{M9gN|Bq#(w(A!T zOV{u9>c{!}${#8WZ}#iqzkK0eels4vy~N9*Y~gsST7C{6H6L$}Kh(c{hrfT1Tk)q? z{<{bKr=R7UpN;LCmvOxkfM)Gw2|Mamb;HvqeSY%$$C|V6%gmwcB?!>2N-!SxDtk`u z)3?L&IA)blidmLc#LDP9HXaOc^?IxC#ZZ&eaWP(|Ul?yU{`}%^U*Z1k71y9+KKc9K?f?D1{P^Mb zby2L){lXBGFd2#&B9TVfS`iK?w8i$M1R`vI$<71N^|BEJv&Gqso*3;yJ-Veeab zc?m{nQpy~+I&y3%lC+NGsG1QQ3S-D)p|^*wC6q8~=$@lzF1+ z!IX+%B)49;yBL$hE9fQ!l|%BRx(DRqD0v_iD$OG?QRPhd2vt9%VJSA+bY;_|!2{p{ zMC*9^%!j<}g)0FS>PL^{PPcM4{CvfZQ2YN{ZN>920lgGRbVT&r-_1>?yIT*KrCfPM z!+p^&u%Vd}!W{(yAC0`ALmb^0joMt))h<1uyJSr_*=T7+(O`KS(DWU;PGL2csDpCX zH5kjq)OC~U;WUIc6t{|TO&_xXi{8mwr99Va5?!#YX!Ux;00Xg+1Civ#3`Lk%MmjcN zfP)CcMvRDLENYj`Sg>XGr_Cl2tDKfg#HniKQ*^inPSJ9cmn+a>nZlk~8=e4BoK#L| z-R3Qf0-uLQb7E&$nnDLTR{1dIp}nt~@==<`oId1|cB7`JTt&?Cl*%fz0#m&xU=kf5 z>Gk>W`gkp33W-QF?1UjaeX76t=UW;7`@i?wH{0dK<;}l)_3)GW`rXsV54Xn}Rdq?e zyyM%STwi>XcVFM}lI`<%A;{^%EZ>g($J>wZ>c_|9&iTJR;3qHR+n?s^Z?4z3_s*~i z;+*m{4%O#5KOOsL-yVItsit~^y(aEPw8&77qqtW|Je23@pZhUq!R>u(Zz4dP3UiWX zByfe(;js zf?$k+S6Ba;oYGy6ce`Y~|9rf@yWU^swq@Kq$JSUN;~Z}7rl8|;+1~i=vHyqT2|tpb z_0CLUv%gCG^6GCN>f5*DtDoL)uQwS_@9X!!ssHuYKYsVy84aQOLtOG36#7L-MQRSMsm;hAolk$+OGsOZrHMM3m+uB;o{y_xh!j#oY(cl^YeMSmB zYe^T;1O-|M<)J_Up)( z*YO$;-@f?z@evT^4CQ_BI>y}<*NZ@`gEwSJ)@>f2Z~KScil5%cuf86yU*+AKvAx{# zep_8fvyOsxV=vw6c+~B)_D4VNx)sn|JaspC2}9*A>NI)n!qeef`IwxoVJ_fIv<%2y ztBQs0WJ?=iX3r%Nw!($y)Dc3_Gg*gnjR?urhu&0YIbuBAKa9&?JY0VI z$Kx-4I6geiGBWUL#5Z4$*I$pkPmZma-~YD$=^q|{_b z)4$!h?C1fX2dX>sruzBt`mepNj?U#-nQQ7UvQ%Ay!kYggOcu?JcMQ{&RB#Ybj5f+o zIjAL|M1dI`1QU(?5bb0I*AIElTLhP3S!&YWYZriHwLiJpVA?AzxxZP%feyCeSg;Zs z(~PpJ+(tZEPvi#f;1Rji+?nMnQi)+55z`n{Wl$1V42{seSP_ENPKvG*(>lS`s9VDg zkR7tJSDIKSN#Rdy({5o(ze&w{bR%9jmG+SoC1;|80LJ=j^N9wW9j8#mZX>NJ8`KJH zs9EIDJm?_9Q<4iXTHvFOu5%Yh231&voHF5Aqr<+!OP8`Po>o+?u*;a{G^TJM0jsiu zg;sVTf@TyTmIy>vpa6z)L<`GCBGMR{7c(QTVKOeng|UIHHHp9$F?wnP2o9OCq8%Mg z#uDpdkR$Tc`$gaaSj<>bTBFSw4fRB{BU*Mwn4JvVgi(_d_S%OGsN|8OmW|G!RALye zSt?D?4dz#m_MQlrp33|5JS;$8p0UM z6%T}0j#hJ4Qhlob`H%JSBmUzr$G`iPU%VdqBCjuB^U`DUL_~} zV!2`LrhdCCuU&IwoWhYc%e25wcGP5K=i4AGF_S=uMOAPDNlSCWNfAeIz(<-J<5*`q z(_@UwV8lFv$K;k7^aa3%F~b{&FeC1!_l!jU@eoVI*-x3(53d4sn9L=c>$jRADH)|{ zdzHsWp0{BJQEM>C9W1L90f95q1}Rm?oo?o= z8J3C43Y!@scVZOg%FVM1XRTj-54O)-#O*Y}D-wGE~KWN-E)E)kZqo3h|K z5J`lG%aVd;g31!e0%#A8dqApMf%CzvIU6yR7Ry`e;b&UZ3eaHdp!%uO8DC?d+MI=E z!$2;Gu665uC?4W8YH8SA^~Hq(b<-9g+Cc;y6A>eUWJF~~Bw~PD#0G8=7jmN!ybE5* zj2w;1lEVr{0$>ZiBeZ1r_|snj#4>J^%r?+9W!mdka8>B6EV8~rtqwDM*;s1XQlwQ*^l?%~{R1 z*gf9M)>*RJzp$G{&t(b$M^oXo=qeoi{qLSWd>a4w{qd`xZomBY?)6V}_u%c4k-;2p zlgqPAS%y?oDw`QE@9$o`;7PJX?V7f@-{!o{I;bj@DBNz)#6IzKbLlvyET@C9G7~3I z>WVoW($kbGj#;yCn=9uKC(D*VaOo@1LLQtIU!C)c=(l5bTp;^5dq8PLLqn|n&Y8=v zvCaf_UnUS*(a3#fv{fu^ni<(F{w!}>?h^q_)i$DG`yMhvyrghvBRco>)1&M-N|*b{ zaooZY5y8mny9qgBjCBlb#Pz~!=RAO>4?jNbKm34y`Ss(w-_NH{j^?IY3Z1=;u06e= z;EGcHvKKaAf=;60i8y@ug1!m>SM;T-fpCd*!I5M~3ltfkIz>H5r=rM;5a&Q{wIQJL zG`1WGl`9;9+0QA6Qab~BUv)oR%P!OR(z)|#&DKl2sy|iKfYtGPw2fe@)MY|g$w3Kp zbi!r}Xy5Q6^kNL3j@)rcxPSp(TpPzebpt13b_NZ)<47HuUm(Y9L`G2b=(rNbvE+`m zq~d+JJE{eyVc?LSnZ)Qk8@BBLYCx60wh^qr>V04DlFJ8`pvyr8JAQ#_4%ASsdACJ=U$&fD&0+^U%WFKsf3gsbrYTvNTPBDwR2n zY9*+t*4hv$<*fh!AOJ~3K~y$HpiuP%83l$j5RNp58OXsL?hP@vj0>9SjZ2c`CE~)y z-da_L?&gVe2hP)M(Ma5nK}XGYuF}bo!@|4_ONvjrj=d+Eo{c|UI z(NGUaFyM|U>(ieL3&%5q_Tj_)@zeb6AM_8u+5i08{N>NLpL{*854^tU=cA8K+163o z%eV4GFg>zg(>jjYrNhVW+mq*RiThJYt-HWcs`61TE#k+kIo|4a2Ze-*kg-?H!s0`o zV}DvBW_6ll5J88#)^$N~{nkkA@G2P!&T6qEx<0d)x;2ksrEBsu-7Kf8pAqPGR5oaf z^#Y<9ydIue@@>i)E~a91#zCOipZhi!bRGfrsS-6YZXTZ|FP*flY@xixh+>s%WZjL} z9x^h7$iQ*T$0vUN;2+){fB60U{L$La*}aEdx29yd?izm3`AJ=44x!!$!m)a@;a0CN z=HNX3Z7-;k2bNW0()?1O$S_R@n2cmL{53%_iYklZh}@9OOSEy=i2*2{SI*}Fa#6dT@Zxsho~%I_3I-5z zwuI^qG#GUF^h%rWL}_+|{JEK4KyG0M>(khBYzlrVH1>9!tWBg}1HeP%l0!zD93Qf&&^|zaD z$yT-gxpC&cuT6AULU$)LozzoMf`kLio++P6jP>fU&j+}1OGLz0e|We3{&(}| z-;7`U;_l7cr^}X?d#PY~%Gyg$Q@b^lkxk6I#^a}Ye5`%(ht2ebViQI#$3>b%H>g_O%v{boD|9Cob3OikxT* zCEI<@g@c4qbapTD^SZD+MN8&k2Ec5A)mqz^zc&#Rif}M8$UVT0 z7Qrl5>=l)0;{bxyoj}CQ9{WfN#3Yxn9yajYiJpyb7>nO|=D^OZg|!`kAkv^tb)wJ5 zcwGU_cyw-<0VXoQjTXBLG}GS5O|jd%Fc331jX6}d5=F-mvv2^NX5K*%Q21FH%BAH$ z@6M%PVhWvFT1FUKzjMa<@m&!gg2UYbX8=G$(R*S?`^IuIt zpZDKs`&u-b4V*IpnjZn=uqQY=K~nv?fp`}A7>7`3dk{OEKyytXnyZ{Z>e#;azl7V^ z#bBl}3`T4bS9UXDY~VF=3r1jF2}X>#bNgAa7_>F#wAJgJ-+OZjFBjgrhfjmzy2BdR z^*-vX-xD-vA>uD*~R28tv1aqIkyObRP$u>`*CIyC7xBlcp=e83S(9 zD2SB;))R=0c@xVw)vyKLTp;FQpu>1P4>5w}5)f%0Dw&Wm=Q`SawpHl)?d#b$`6ov= zSAGHLo>v4=T>LPXAHCOx=39wudkR^n*lCSPtsZ;+#%c_4F@z&Bkp%!1-IY z%ZOlw8E(H@(a6Z*@KnVJ5=?rIya30Dlp`=kcJg%>k-;RLMnyyy1u;4uHe@d-v4Pt~ z;4DP9Cx}xL4Imf8-ACZM6W5^^(HYKteFn`KS17C?(;`LW>{MX1BW#oFV0R|~E=m(^ zB9z!cR9$M_%)I-PfdDk+;0RXh(z^AsODD>a3@15<3+>Kp>SxKn8 zUP)LV2#>uECs_`b8#Ul`2JFI4Fm6CI05$FC&7n`~&e%;W$Z3m zkw`J}vXg9gEssxTe6m09#)h;2wC8L`xDtWO5PA0j1*9O!8f_44Cj}KJ+fN~C(o=)x zL1KY>>k0HR##G^J4$A21^|lE}(HOicC#U%d2povPO9mLfNT>ILbliH^_AyGe3OlIu z!8;h5v{7Qu%EposumrPn&$M%ohWJIdy*4UYDQvZW;;>ZagHlswPwRO^b+c82?*|`` z#ZT#zt&lTCeZ(`TAN_d^j9|p7ZX9f7p^!nd(9>Ee)M44qX&ehF^MyT6OQ9gk-eX5IGX!v#5$k^9-Fg> zzu}%MWE=>XRIFpcB@IUFz6?R%nWs4P!?k`6(&D^N+dG+M*pXeXC@wfq&;*;~8CO;? z=E98k_>Jj7gP9Z?W5}5(*?GGJ9|R zz*G7FB|U@`I0(;zX{ibzV)6Y2wpXvb4DW&m3@w&yv7K$|W4}eh&UkHk>_rN*rO2^? zi0j%OHF)B0xiaKA^Br{0kKx7{j4|K-j?eMWBL18nAI$NYnf8wU4t(5=J_{oCeSt&I z$>>s0{6Ym zhzNS@spsFKB94@|vC8ma(b$Ef9l^!kDnQO2!X>8Dg{jj`E*QN5%&!VC`baEfyA{zA zpV!OaLP6V#!I_&+;WsO3r^7$(&yAJiN=))FgCkI@d`fA(ONw&B+Me#X{hdV*5iUW4 zpvW?6hGx%u3h@kT`_P`0O`w%$K3w-Cgpm z--82GZo&wNiXQZKd+h9j#1=#|i--^SwHN=%Sm6*up9~z3yFNl>WT|BpS*!W@_>ReH;dWmJCWyY$o<>e)GkDG0hwpJ-OC~-*;`bp0e0UOis;?Eof;5p0+I{i z5N-s)IM;y<_fLy-yrl)wqae?z9wwF7_Lb}2z1~s#KvRZAqdt2l_MUH2-e8TF=bcMl zr&vmx{&sULRiT#k<*YhG z-S$8|bwB$4HLzd}ckJoLE5LK>q|I~Y%|LUHeZp1ZV6ry1wF4L$?*1*m6eJjGD4(;B%T zyU)+}(IZvynLa{E)zF#GQuOtFQh447+m~-6V}! zJN_`Y1A}L^bo;Z<1znm?uUVYhK7$f=Lq5c( z^r!f-R;W*;vrsfeLSK)!KcbGh&f|!EK8j-5zvnBW1J$ zXIi(I%^ezd&p!rwj`2-jI`f?@EA%nv%=bHId@LNCuYb(!ne)Hh$KAl0HrzAt^qj>6 z(^$weZB1DnRwoSfY97{0vDWD^NDgFvkevyy7bYX~;;OcEXAZZ8xlE4>Y%<;Tz!AbS zr5~{iJ#2fri2wG3GSNL-JIj>j!uU&A#NeS!Wf+q{Ca zn~PSXB4&GOQqryZudsJ6aD8i8Czci22F#flS1v2IHT7gwLW(k;4Tcppf@a3?m`QCV1iSxD@u*lNb95ARyAJrfE5Ah(oyLVOZZCt@w{(KWX$v3NSh*+7PNqXkO z5{S3+)`VajR^bdV__D_Sb-U``gS9@)tMfVYHRjCE_?Xtrcg`2dl0JRf=lFZv12=Ha z7wqqxvA=!5sHA2x)wQ#mGnj67daxJ|Gq!x+3rDXx0ga{o!Mz3c18`FBdsmrkGlH@ zK(yyW-*kmd=61*U^Hq-9?$|oo# z@A@_!+mK|#dM#iU))K`G<4v(F&6$Ucr(6N^^DoJEKh%TDB9KQ5n4d&a`Qy zRA}*es?a~p_8eg@J9g7B27ElcyPv`yx0KXQdv8@v!I72l|Ll{(AT+`~g3CW5Kk^dgY7j(i51Ne}N0$L#eIn@9iZAqdl{! zWcKTl+x*|u0&j^u8v;BXgKEQwO`BugGw7Z%j_twu`W!THzUMm#6Y6+%fBPI9`+KnN zKUu=r>#WzaOQWaZ)^ISKo#Ia>cpX>*?q50=SjVDOJ7XarEef=ue6L_iMXrB$9?wou z{Z%P$90w*HsByW)B!a{R6v1|C=?lOBA`X;$`ce~4u?})!^p#(|1j|B+i5jkaYTgJ% zd!YvB4K?>oG9vD97eSNocR9a7e6YoQx@{wiJvLx%FLf(PVBLk7UTGne``1`o5JWO? zBj#12+8vlCvZ0|d^JM0RLR+K#FPF3*`S7gaGEUQ6V+DsBIyxZsxwE>m*29Qk04Nmk67iRi+CC`=;8Q4&x3eJHms2< zqqXsvx;N*ND1UVUztG-NP?z9-6;!xAb3#u!?;RFD04;dxc}~x_@lBR}@D1n#G@F{ONGkwKhdd;nC_XWmY;-yHWS=|F>B03X z$$^OO6B^U)J4$3D(_YKv9wclr`=i4RWOv2aI3c65r#Bm_>{;g>S#;dlvUlYv@S%zo zk#9Zv6Pma5NDuLeBY+58+s-}V78Hfg#_I*W)8E~{Ioc}U;%>`Ekh@eNf#78r69e8t zX|h?%dzrrT?5x4f(&qo#W(J}WG?MKllQ4^EJ*Jb z&v&mqQn02?pX;VXhsYh^>;~;!2@1S7ZW9`@bu_NI!q&~aeS0v`ox=SEgx(+KRmCC9 z2JQt)y}kw3{;>U}n?ch=uOXDTcJ*JMP509(e+KU#|5v4UPa2njwrQMVRxRvJi=HBw z;~lzGsq@`e0vkcL>1-VYq#fr(fSPRrqFA;T2^!iP zU@lCdA6Bs%6b~VlX1eekmRQ1sL1G)$x}>^hnV~?gS1g=m1hE@cudjZA^muW>{lJ-f@ew!k+B{U|muo_tMm$_FQs+ zEJsZ0tQ9B5-*|HCA9qsO*uuBnarXB)XtR3TaXenDZkGX`M^X2eUgFAW&Wv!|wa%}{r{Li&0wOx_a`p4%4Y|C6PgFjCLybVY0muIYqX>af%;rXNm__d(9 zb`BRN@s9ic>VLegz_#Y8^b4p3$x}j_fZN4IFsxwf+3%5Kz|Zlyg5`|s6i|Z#$+prl zSxvqxi}tSAXl?Qa$Yog;lG!xC6oa-NvUI6!dX=2Nac46jt5rQEjh52RM5y|8iW3bHbT!T~~@>DxRvj!50 z>M4&E25|GKX|qW)o*sI1G6qcosKEhTZ~?syj?tw4ovC@i#sLpiRkk;lpk)4~kufh&)5tFbfu#WMNAj6L4aX3Sj z?I9KKf6v33$A>(99z75>e5$IM$w#wPMUyVE9+a{R7Ni7}U3x!_mBAkFJ9ky}%;gP# zQOoZ6e4co$Y>H#H-5@GqS`AidR`UEAe;@ssX)MX6!Xtite!d@8tJ42W?@q8$rk%`F z2JPdW(sR^5xYh(Wk>`lcAS-VkYcl1dT~{eU<^xop!$EhSk$b0nv#?^}nn}cFkH4Nw zNwyJ!)!PYj2H)%(3D@rWIlZ%$J^bk+tyEW3;cVza~o%al~me^C;j(gS>? z0!#d}T{k|Az8VlJ2F*_Oxk0XO#4Jjiy#>v?RfpZl*i0?MR|&8sOaQOU=A?-6IX@Ga zZ2Hi1ymGwh_V>#(^Tn$3zWE0~-|rV~ce78UIZnM#eaF{+2#vhob=##muVDKZAC43v;JezWCS7jx= z)zcMJTRgPR-~oW9;)xM~0Jh6T!ximw#+H}WPxYUf3=`1MC;;@lM8!y^{q5X zH`7EBMAP_$-GFN_7rygez1u#lqXrLQ@&nC~WTR&U@Mu1x*nyVR?3t;!xV!(%M_~6* zDh%-hKIKP~;miV`p)@Fd*abXRYa|pwW2|A!qFDgD5A-hM!do$@^gV~$h@n)SK~{#1 z{m;0CWa)~>4yl8NXjcM#IMXM?Txzp1@E0z)o!yDg%lY8#wUO{_=Lj-7UR>1DO z3OKA=_~+5A<{lSbRknCB zb9#QovZ?#$9>HCCm*Xa23Eq8L$ge8$(v1CI)bW>E@EtR+Wxtv0vc&-I@rFhBtK|fY z`A*pS_^s`)Lfp-P7njPm^c%9%66QGYzVLL+3xWl>y<&4;gNyv0W!Qy?dGp;?H*kTV zy@-J*Y<7g1`tlQr6er%jY5#0+SE%luGf9Z-z_=g2Cm zIQB6qsolk=Fg+Tu_}Q4?434F1P4X7`+(fk}XBIZx7InGOmr&WZ6Yo3)G1HFk_`RS) zP!L8MQ0PN}CE=KIcP)Vyf^2LWUG&OnwQp%I#+}C|?^Aq_(w6KO6M6c(BA{-#{qMLB zdK5c>HhVIxyMv?~C7eHub1S+rzlep)7DhjwUUN`-;D(?+ev;l1Z{#9LKjsI5DL#qy zk61;KpVA-ULlsErA&YC66pSaxw}kD{y#q#h`f2AQYPmeV(@?+i<#f1&x9q(~H11#< zm+!627-p}{8M@K559ah44&3AKV5YxDANO$1oZ~h1^c>9j66^74d@sv8nI|xfIh>4+ zdP8!e=hadN*1PP}^4+(h7YPpm`Sn0q_nT~}$pJ0rk-b-wuo?gH`_qDAUhd$YVq6T~ zZvsZTD*+bNUOIG8Hz@HMFGjc7-rMt|@`I`o|I#|%ghB*XFIAAtcEHjD)ce!*-zIdaRr~kebk(k+a zc!=tAft0iw0lBnHa>gC+tGx4Oy8by^3FzYWd3QyO{T&x2j)(0LVqb(yXlTNMN4YNr z1>)}m*cU+(zGTK`H`H%J4 zSzqc8|6iL>m7X|9Z8>FAh;=!yiZd4{6IW!~uC$JX4S?D#w)x(7jvqz?>VjqH7EUwgVs}p+{uJYG6EN*#k zPC1I5MEx05AgM6Mx^w2MI?E;vBZ6BPU=uZd&;;EX%*#f_Z7VEb5-({Q!N__&dDdyBsFzS#q=cv38Lo=O%JCix4+WE zDj*{IFlnF9$76U#I#5|nJba3eP*%y$zw{F$p00;QKVYT$7!Vm1N?t~Qlq>|vdzx@F z`*l?WdLTSrBAmpNwa^aLFwru7$p^Nm7Qw0E=scuY-Qk2e)iBwlDxE3mk2_|orw1yN zecQH3w8nlwisupsIgJ#a)9#MpK4x%cPMj*uGd{y(FRDHq;4HbMbMhD1W8-{o|quc#6CqCKT z`)Cn!On7EyS4gh}cYuk7cK$gK^gkW(D(9Rc#nqYb3BF0b(MN-dL&xq8z)$KK)o#90{}d3%eyDWO<{XVA5n z0=H(#9!4#|z{Kk{bzq)A)junc;5%t5Yn|jVJo8&nS~zrH(f#@^9Sgpjj$f+CkB<{3}A=#w^%MJ>PV&; zSuDm9r`MBVBAx5K@=UTLeC8f(EX?%V5^RLPo$~GZ*s*&s<@yU~TG{75};Pkr=&XDmVwpUh{GD*R_`s(KRIGD2|gi!ws= z`)yKL<`>?@lXw!ltjAG#@u-ab=L zDEP2FSlB8d7#CxS;aVc~Pm)AW8)LRT?XRykKLI^<4krXkTp!%yZtM`<7n5JVPcajC zfqDX!%}r45+<-;xxl`U;^h2@sxE*{hv^K0G+7bc6Vm`U^btmgg%az80E6mHivjENh z?`pah|I&TFE08Yd{v~ScteqDwO2|~|qBxSXlBB~8tYc9a<$S<9K%#d} zGVkredH8N3!L*|8;a6%+5WGAfH_F_bPJ)ZB0><4{(h%@|- z+w|y|KjHXs;fZj(HjHMZij|w$(9HGQ%_K{|Y6xh`O5}Mg5@kK0bmKlz(uXXNM2R0R zJjnY1D^Zy{<{mPVhz{%~-OA37JykE9xXtX=(h9ttC-$XzXRt9z94rc zcAmsOV!^}p$WDPP$I){EqeQd7^d+$o?~?`geBPnZ#L0Wxa0|bT&D_id zGoteyL0Gyb=>Jyw%pzC-GMkxo#5*qEEiW`%2_h;pP-;;#MyJtiqDKqBULdAZnO;&M4~OZb?_69nZM zOaXVGE&betRxK*&Asch*`D3%panaq6;3GDhjj^Z+ zqt!c0GGWbjV9?72t_pk`W6$$F(*syvyNCadrw!|X-xdGt+?I)s0~BKfqIkUxIA+w2 zHWbZ#TPA0s)}IQwCHWx%KIQ{R`eTZE3XdYUirMFo+Gms-ux?|ye|+U1NfLRIJB|@u zaO#1rKe&JQzGA;chG#vK@q$N~!M{C=>Hrz;H3F*z+i{Oi6OHrjZy@``it(It2D8q+ zp?5oN(u${Iv>IG&3E6!qZv})~kNOyf7K2k zgsO;hSn~SB8*(ZcLN_>s6nvKs-G-VkJ0iK`Z2#B23kK?&5^XtpnUEWk%HGSk{>p{8 z_z(UnD(=rrFv)gh-AAhZEPe|azmLs;BULygcg)3%anJOi+~0)lA7d{^6pHY%AD3@;JE7Mv8g_ox>?X7tcjI?f>XgfLn7 zd-s(q>E`xQSZt|*GKP2e&izj?qRo<2(9s1um$Cexm38@E44BZawuM2VJ?0R-bc=+j z`kyZ+`Yb>TJu0!z*gmB%^oP)lDvS?OcsVh7OgNV5 zygMmwYq}U^Ox9ovIPZl4C1u!;Eafdjz%i>JZxzGx2wB{i6wGp8jTx~8`Ia#>wtXE7 ze0n&;V;u9GX$q=td{@7Z-s>NzdRqZ!C~P>vA)&@(f$t3D=;k>j;_AaJZkC@vLjw<> z;)nVJiV*c7io3H|;DdNf*;FlUw)54?^=$zLz);B-CkeFq;+>?7bA!gp_C}`@9c(WF zo4bC-Zk%z?91uO z!Yk?Vp4s37Z#1Ms0|0=l5v<|`e{fMLh|jLzuwuOh)Qav%M2x>4YSTk<9>SK@TtPaR zVJ0H(p}Tu>ZGtjnNpNPk(wqG31p{xMFaQcfmVzWPtYkR8x0?mx<95SfV$G%vWTI98 z#;&Kv@eT+=lZHJpJQYcn86nk%?M(t)Y=%TRJH+mbBp0d%3O=3GMpv5H?FdctHDU%N zrqD`Orn_7`Da>ab3ue+;0_r*UV;TU)WOQ|lz>b5J-L@~g|3LXp*7!GH<}i#$xQvBy zZHZmtOoj(HpnIExJJ=**cJlQC7614Dg>%&5m_ zd@}hkZ2Q*!$STH(f3u@pWKRx>huodO426+)J~uqoWC0?pT=AdFqXa~*ryD`C$j=tO z;v`jU@wRaWJLj-vvR?82c8@LA1v@sD$6(Uaddp^h7vsMYd%#|lf8f5gyvGNaGX`ed zjh?grTBA=NGw$2xL>TH&y8e3B>}!6vsLeHRSW1iw-==T*jr#XWyn_k9fu4&9-GSb} zdf_|ni>v9pC1>ojW02(gW42L94&`8nAa|8b;6rH5T|gs&2997{3(Buf!~l`xaYcD` z;f2u4wVIm^Ojo?OB&n2P_Du#b^jzxr$szRu>FmwdH@ja(U?C~r;uMzzc%SRl_%FVs zd#va;%*D-gKWTpR{IYphHiW?D{(WJ7|7`Ev&Fw-0rakFlfyJZa#M>q{T9;}Jo_Kfx zpvR~rCkiX%&hxQK-o35+?DIC>-Y{%Ahmzd(vq@8@!-Fq?ms_)=GNWC6Fey`qHrLb2QV`Hj3Vrob091i*DX`n?I-*@C?%$)5a|4=Y4dQ~kjx!4Q96xg6QRh#q{|_uLl)jqXvF>llm>7enp=9yhoY)y~Wp3?g)_Ryq;!bnHoFq zI`(wvnV$?e+tWU#=k7snOuJ2YceMXA>!G?VuA}pbFKVDz?2_?-;@d%az3qQlip20V zD}?bklC$Uyc9SfZ3E3paOYJUL13bxTsoh@=NHa)AWkI^S;TwmMoe2xk1~tq@i<*W? zEuZ69`(d@|%ZpaSb4N3Vmy6!4LmGIVrC_ZcP)S^WBW4zekG)2uSVlRBN2#{SCH8_R zc+P0GlAIa(F2P%Lm3;H%1(;&E}Mt(0z$+RSUfsL4dWeSjs?ZS-R9dKI->;|4_ zZ&LRxM;m;aDMhY?!XdpA-+7xny`ec4qOa4L$<(*MP|=+uz<$zMyEp$$KPnxo4RG6V z_(ec3*1tJkxb?$@bm!Jha|H$OIm?J?5@GK6p6lTR5p{!{Xw37aro8SIqU7l!iO%*} zlIMJ-iayyxxpA>6KF_G92M0#h(HPJs_}jjN1`Y_a=;x;~;Av0n8sP&DWw0$n zC-f+Ow|C_N#v0eN-Y$3gbcOjwT}#eqRi3I*$(40oz*Ct9P^{m`c>d<7j$w#W_5)d4 zcixz2Vuw$FU`=mMM2K=2z|4{E&@N-}GUoKEnI=1RXHwB0qsKO;Jv|+Vyq+F;?CEUs z8r$vemG)#Q&J5g`Xxg$v;m+)(l}j4nFKz`;)@%_Y+%i3E2`)O1OYtGXmG?IAwu-n= z{%*VsTC1Ss8T*MYK4r$@KHSiss54eB*6OtPQ7cU4Ex6!xd)R(v8?|_FZc|cz_-k#OmHpWx#8b!)k;eCb1&~p?*hUlecqa0rFVzV``#hiJ=!WulHIz|Li=iN z1+fw5HzD8V<~{}EcldSb_!OLT6Y&0H?Kl8l4wfPUXaK>3+Y9dxxvT8+t#flAOUB44ZuypjRp4u z>(OMik%1r6O5g&u98bPW%vos9?~LO7OsO+>c1Q*c4punR+|EWU%iyEli@-Kv;~nCRot=z^iSCd#Jc}d&-c|Hb$7pYeV4=#8tuz5v zL_QjpQH4Slw&;VV>P|kkSs9VZ0pKR@upD_W+$tyk!ob=Q-{hnrYXS!@<=bZWoU=zK z$|Q7VawltyHxqpOfbBU=1nMzt_jgWnvh{l=}qV$8-70$0t+doNd$bN~6C{spnt&ENUrGSeUyu9gO7EFF_KerL)qy=ZF( z!~$mIrVjj$Fs0y3h;@=lE?%ZTZf$LVI)kEVWfZWuuW`qih}wTSFINgd@}lPJm58n2 za7(~}z1w=ExwF}C^fwl)Pl%}@=xYzvz-8Z}wSDJd?|Tv68Y4Fmmqgk$+~Z%WN*W6VLI%j_2JtJERPQk=abzg-JUy<0}ay+|Au%o@lX}q%Hb4axd?$-&rNb`O)=%WcsW)HyQw%qRhzS6uK7=T zwH+OK*`C1yB`?ge*@pW8E|RoV@LRj`UGum_RNh}25#FW`_^qdC&SWLloh)z2PRX$N2G7Fwl=I&4aCZm?YdF>bsr1o}0WueU{tEY)9oIVJ;mkMA zb?F<%bN45A_N0v)Mtt0En4h>EZH1Tq7i60w0N(m3g>%YtTqWpV5g*Sgj<*Kg z(2uQlmT1erIUrDT>p2icA@b*o+Y)e!zDph;40c*k*IulkXzS=0DAyNT*((0t)47OK z%|c1lBJWC4f|=nU{49ho>~Q5y*chwxvQ@kKA{~=qE@3SUNACsgsH7rg12g`E+K@YAv^}=gqLwvB_UZFw)?!HyWVnImzA;fFE z?+Y0{wx%3hW(l7dGbk30#dV^>s7u&AgU3XlK7; zAai6=K0Uag*!}>a8;j0(iGU))@fIQBVOII6;L2#^g&w01N7`57kXJ@6UPvdY@wclE|r)X>wfK;OC0CVSGYKUnaJUdC;K@A^5jL|jZxk< z@1k7fm7CCdI42_ZU*=;iNx2JVK-|Zp`BhpcAf)-qZ*BZ?2m$mRee(_b7SLMpyXG%& z0y`YQrJb&y9`nAUY0J+ZG76GC!H{NLg8vFdUQ|wt2wmjEv0nJ-hBDlW_oiVWXvk|p zx2Nr|*_m9S#1%E)Alhkh|9kjk=yDG z?(L{BKC;QDS;j7PSs@SHLjzx< z!JoJ}>@w@D?#gGmEv^eFT86|Fcp@L@As@0x)l`0Q$8A`P9p0`}BdHb%oJ-?K9;0F< znZkFx(_e{b1VOUbS=+p1uP0Lpos}#NV9@vxfN8_W-OLc3v-O}S;Qqvopgk~7_h_LX zFCmQ4jVPF`roBOJ6QTxi+@=ENWfT}-{lN9!z@~>os!*A z*Oh4wmUPyLSthWR-o}9ybTTKw7v)%FcgxCr#f|!}04Xan-qbkASi^0bl1v&@QHFm- zO})2kBMiA_GocwpcFgY+aD6uzQ}H}A7tJW|VBoy*VFMFTGTsj%MuK|L;4$J z@25^MpNW2E6WlF|x0xgER7l^d9d;0yAchJZ|z{7;xzegg1a`%`I`U5aUw2FXsiPE%H_- zZ;pJq{M~<(N+sw(BKXZWUKlTjdpWvHf{65PbeRDjljbg;*|q^S{JPW5KG+nIiDC%F zah&}WJ7&tPU8e@x-6QEUTXe-qQJK=&$7fT8-|<@fmAqbrEWTwir9c(iy&f@~KtWbz z)x_zqC%%JGi{de!Z=?6VXxa@l`OT(ZvyEfM(2ZO4lHT2~!{=GY)Q9!h4Ae8Ks*fy6 z@bh^-vpqBv*GCX|ZdVvelH2GQtc<|b(5wRH>y{+92v2RnN4pJ9qk;P=VX*B^IUkFC z_8I03^zj%6obkkkIcFi!KQjT{F}A=t$Ha7x!0hAUIM9D4)AGGmJV6JDNM5^#K6f=h zN{ZT4Z8YjvUp}ko9=!b6t&uiKVCDEjuz3CbvXtCL1?M;6r(@uiw$qiCbmO3&s~8lh zPPy-L<_30nk)+yKGc}<&bTwQ11-aiTk}s1nDs}ax)iw-*&n>nEcowbLQd0@BzRJqg zZ8cmTqI3znT`O+0IA|^0pAS;l$)t20Lk^u9B+pJ4y-J!AyE_%}1hX!ZD}@X=U_ena zWH*Us<5|3nG69u6nl*Pwk*V~4cP-?ezOG@}trqA^Coi0z2clF_mkcLiW8RJooz4E~HRdffJHo8#oLW0huLF(wc%J zy#l|qp*QB+s9Yv9<{}Xz0&DKPne)x1xulF+PBxyT+N?O&1VZX?$q1pF!m3JIix63CmL?XAXsMo$IN3ZDH@n#F8Q;@$~$V8pHI& zQjOI<5W2tQcn;M-(HMNSn3rf+^Yqeq?ifPQf%|_f43<0V6i4CeZvC323PC$rw)8wi ziFG%2MdYJy3s0iTTTpo2)NjX%Tc>gjShhr1^(x~?f^jwu<@l#s&wGN$?uZdmY}xKP z`5ue%&&g0rkL^f$a(PP4x9m zHEI|qXTK_owMp~M+xgO7z5nI7uuD$3Kaom2xU^pq&8=wW&L-?b1T!Z5o_G+)_{|4% z{gts10Cxz2kxBBJ|Bx_es24%O?M94@n}rI#1@A&k-e;bsV}E-jTZ`Z)vTrFM#lHG} zee5O4k5N$PR67^Zz?dYR`K8=i8Z#br*)Fyc?r?#mIZC{W<_-K%2imnE1t4dH>J=03ZNKL_t(% zw+~#Gk!ZJEEZarQTnRCVa1(heysbul$PR&+Z`DuJc(AQ2jNVk>mljST;oBj~_gL>g zPI+%%Q(<4~_#O_7J<88d8y16#Y-{caENo!}Wv9;o+$mJnH6}sS0dmQWr3!?mlwEnY z*Xj+H_yEo2P6GYT^4Yha+J=bSpoLk`jn~=Um8Mw8&OTJ}^kE#z`;d_%oY0L!!2SFi zsuXcMhmAvijWdzg8H4Q+EZJ?0D%Nskjvi!}OVA$F9o)@OMRGue0o8UkfobjQ!TIjM z2+ezO;&gd5Gh?u&A@^>dgc!105E~GQ?o!fGH{cR?C zo5Do-*T*WwD|hUZi?7tynE5XALR^8n^^5*5q45`zdD-Bke!CXQWn}6b;}_WRYjw29 ztZ}Je=(d!26`HsAkC9l2&>OZdtg@40OBB2s5565tIChG?*CbeN&Tj^&^xec5lpzwp z?2y_I}V+Xw~zmQxLHg&e;tE&{w`PR2K?WKQ1_*IGxG90Pwwh( zVRJJDxp(wM1aB7L0*3k1cIpAYe_m$QmP+Pr-*YAmS77E$?M-ZKHI(UsJg!^43j{Un zk=Dn_kJgy+Aq8nHxFiR`2AUwYs!niFX3{f};0;Y_g~LZKI*|J_b_s10N>VCm+zu$QG&10Pzt+7v35qV8=SX_#z(Rwyek16uQi|-O2qqwQ-wlCc0 z94u%zSm5tRy_okpD6O=^?JpNBowrSZ+XUKkEvKDguiI#N#s_rU?IuI@W?ju-*jPpX zq|%rf%)!~OnUa{jRAroAaK8XoLJ(m2NhW@i1MrrCsWi6S<1KmvpuE>8q^mjq^pQs8ZL0_AZR z1SCf5CaH;&E;8Taun_(+8Rh)$(pfdizc4ldM zhD6nEI|I~l)HLvTy5Q^)qO+FUeg~`bwOxA)ts9n=fO!j-1|TsRB?7n{S3^pdvx?n) z@klsR1m&Z*#RUw}J-#XGcNQeCj2kTSF>bMpU%FuLX@-RI#AGZz=H@slIXx|$sy_q- z<0+DVvNZvgK5|fub+gWpi*rdsz|mx)lf;7hu$evIS?&uQa~o#PT0 zWfSHM0Spmit@dQ}6)`8hnjeq1HlMJ*2_#+O(jH_O)5?5~9msfwWDOt?;_@X;{M9G5 zHGhf-!?!n>jD%Y;CfAzQ-{7I)J2)RBR%QQ_FgcZqrq!?mFK(IzG$rzGMUOfYe9pw0 z%=9eGW_$nagI66yp_Pv7zHSSI#KE<3*6gUGAF6wEauZPnHE>r~{OG3?Td9B9u^!xl zqau=4zbUc*r%h!`T6Z|NM`Z*pr!zK`j1AYa5zw-XS>pt`0E6-L$TmA>E90 z;4dTT)(GN{24Q;ZJb9hqcuo`qI0N>1k-mC&BR8=@R+F<)ydtrQ%7C%6%39lGf#RRk z%0D-*9eP?_wkM7|M=DV}QF*%w>PvNP{2PR`RC~1}R9Iyi+IWidow*+!$wME6s42gi zu>fr59}-`eTfF=(WHpV_AZ6+Y;N6`QPpS2@&XE*f3i+f!d;bLge3#FShC*E{)I~k@M96<1$)7xyeTgJZ_Wx;g(6OS# zptXZ71I*tm(V4Q3ial}`jkh|GCi~X|n%pc5)UWkb}4}<6fJQ&WzkG+xwe!yO`lRDRF@+_LRV9 zfMl3RZ6Imq4gmhq{4~Q?i`C;6NC12i6iD}M00tM9luy;PN)<;duWJWL2%`Hs*ILpu=ZnjCJjy~5E$_^D z(#!QL*hUM)RR^4CMVt|cz2wduIn@taPM0uzzI#hGT}qM~M%feR^F-%EeX;ID;4zD| zpMPC>l1&Vrw~uVBKssK1B2&O|DLfO~d4w}_2A;_EG3Vih8q>Fe-zj8%E7+FtPuPdS zWpWw2kb6rAmlf|jMeqqOoA*WU>1M74wEG2JA#h46c(j*Re?bO}OAp$Ct=DYL$NJIo(C7|)vo8otYHUyz>QZA_O2+2}$Rz*`Uu~=mk1&BWr zxZeAy5v9PEDL>>zs4p|L4sP;tp^`vKFXVAQv6DXa?USPuKe)9tq?C`=Zc4xZfS=JL zOiT;8MEk>H0aJGHP~kUvp3TfAKvQu-!5>=?%eU3+3NyLnKEcF*B*jSjJ@24w(DeQH zM>En-u*6E4D->G(r?08l6915>AiavaZHYe%$FEHv zX-*u8pb2ZNqi3LRe6z0pGL#HN(Vt)t{iV@>H7^UBu?&(U5Lf^1m-tv}tXRFyQe6B0 zVKG`i42#aL^<~VIU(&{mNosRS7N;~Ob=s)!Bp^?sb5+S5XcHrI!@zEP6?ajsnCCK5QefIT z_y@=Ru)k5dzp8mpWr`*owt^QjUpK*9&EkQH$%T4RQx<{0s(jYdco9V&Pqp3)5!+i;^+FOjY0qMCQiaGBceyl}3{75_1IYXBzth$i(AyS-GFSW$# zFFt7Xf(qag@W<3ObU(YWUWO)Ds)PgnbHTw-XEET%RbTR~=HN_7{}1e<=dB^GG~-_9 z)CS$xb;-}nSN00m%-%#5dwyxi?|w70C9>a}!JFn6$8LpJiSPc7Fnve$Y zlG!Cn8WOa|dUcHP6vIj5J6pcI>Rv+D4^9;l6^~D)6uvm@xgXDJ&_CatKw3qd?2mfp zNIaY~xT|j#`V5`pCX$-Ty0D>xy+FNfjsxKpKifh^kJUq6;k)=hnLBA;0mqEYa`bI? z0(lqXheT^D-oLPX%Rwe<0o)FU{}CO+oXM7OWq`?wN;SW&vd(A5)&F-a&Wl*mRl3VS zr=gNF56UV{;c%q85@uGyGGmxrGPHs~9FqU0Xdx%Ul2h2>nE>Ngm9>J% z6fl@sTkZ(+2QPJFF(E?t>XlH9D8Nq6N?v07R}U}+K#-A}`n?su%p{V^0pM zF{NZq<{R|4T&mdK#lP6eu<(EWCt8PA2=G~!Vq^ssD1yP93fx<7P$V}R#Mv#j zn6j2eP(2V9bX8Eq)Ti1J?aH>7*V{Ys6ip}qg;ND=f`t%LBq(ObI~z(BSVYHzI@FA` z%slZV2WSml4ntY}KE=naflPw$g~%_I_9O9}lNI*M4A>52Hjjub%rVZSzi75H&xVBl zl|hWF7f}mZU|{1Jj;^68ei^h&N`AWTUC1G8C<)0rQ2f>eY*oZLX=pP;=8lBPRY7=gSoGXkvnm z`xp$fb}1Y;{ww#Y>CHnKBv?DAU!EB;Qpz0Ydqt2N6HYW&4m3$#&9-Iv&O5|z8GyeT ziGQ)gjPJ@|uK=A{Epe`yIg_~}ht|SKOM{11+*@>k4_MHcy3!8j<|X*O`!kx}uhj?c z6{xFsuBA+{QLLfmesp~YQX>QjjP%irz2JfK(IKbCKBhN^IOHd6nIjl|^W#H2{;qu$5(OC7$60B$tT5u;pE z(ngcwHkLoZej$yM`@5vpgusvdWL^DG$(V+H!t_Kh;Ww4VAjLGo^Kl7ur;`SQ>{yK; zRaHGo2*k7S%^@p1*`Imv485e=eJ4cRFb&t);k$GytcB+?oCdYL`q9yRJw*xnOd8{I z%?e5IX<-0h{W0@rZS`!Q*(xG=DvCR`+e%`o!D2f=z5%^11)unVFiYS_c< zJLPQ1yJmAzc)da4NZqaK1Fw5G?Wq3tXL$?w9G#o=BlZAY%tu^RsT|(~r%9fznjTp1 z*AZ+Rm=NPnu&tYLXqOm^wS3F+=yIJ|4ikmUgZzGjyZTu2;fP z%~lfGlx;q-8qs+EU*uV4%v;MynnmFJ`1cZb$*7omN@xr1NvlCYOW@1dv1Mt`=hs+A z5ZsiJWSHT@G=?jN?=HV~`|2f-0U2y>y)UTt)S*onK$7d+RPVs#MUiMMD7jm+QLh`> zOMD8P=Ta(2+zeCH(&%NTNHcpVa+YP zm@*TYJJOi~BKl0C0ZfiTff0#APEYO|0TeS?Jx>c1tmTgJkhg)^VbPt{f6}``&t4v& z5$&_T@)$yAI&dw}OJW6Vnu;$Qqs!$t*GD)D|Hd+pyoDQYLcvM}2^t*~{v1r^y@$noLwzFz`9L1^ITi?75t?}J$z6j50?18HHtrp)tYD#=}eOFLNrU;JxIC7htemD<4(cyY&-VccvRzidPxsjd;J21)WTvbDk<=Mzbh zPj;Q<=Www6N1x87p3nS8avklAJ`>scqzf4YkG-NN+=(EJ=P=7RXGsg-BwKVO74T!& zd-o;^K*Njg-iSJrBxo;oxG~j%5LFX|9rnmzv_JqZWPCfq=@|h8rdrpYGN!17oHkSF^5=Ag ztGM}$&DD$DM)W+3ZG`pT+iR8)3?`e`Av^DGAkCAZA^_ISjmLscUM@c~oV(jI5*+MT z@qH99e)PeQaC^vNK25|B<3K*b{aCkYf#Bv8@Cgge8M#I?Ii`l}h$n-*Yh-m6w_)K| zX?d~6gKDS6ipBs(Pn%~rLSU7^pmB0AVG_X)_zhj^n4rW<$j*g18a+7xltov0dNz*= z6#x43xqz%Wz!zH4!a7e8JzVIcp1^IIdUTmHy>W984z)-BE)D^02I&P9*cHxeX!rbc z6i7ya3v04nzVl_H5`S4Zce7VrWZWs-tCHjRB!YE0QS=0*h|$-du5-70yR{L^7Gec!Wv2J5uK;UC8jw)*le#W<$- z@HO8J=!u@rs9{rhBToOhKbYnjDjI!(v2*ov7m?e!M(asU*I zcyL;HZ7ko zgQEX2n|F1O?xtZ=Hp-)qCfp+mAK@(T$o*_tCJFU^GHQhI8Xa21-H!%ngd=KrfzwU^ zj*jcV1OzvZcM(1OyZ@McWfy?ewRK=mgDZ}>_~i5nM)on~f-A?WKGj7M02V`@uYgbbj6I=k8A)P#FML+~e7 zp|G@_F*?zHJ`F}}@ht;m1s=D{9^Le*T}HKp3`|cU%Ut=sVmwg34ZlA@$0LHnlXf?{ zO?WE&s*DLfI3=PUot_g410Qf z>;=Fi2I@b0EXlfYb_jmPme!){D^}Ui_8cUjbJuRDJ}NaS?zllAKOM^*8|$!6-!W_R z=mIaF6+Y{N7$-EplV3hHktc@G7>&TPd33cK#wSV>BfyU&Yj>%C|C6D;za+ay2s=-4 zqB@prBFn)72j}K63!mT{I9gXzOtMc4#>KsI7nliIT;aHZLNlzJIqnQ_dk4|Rl3=7;0Z#}*>}m8|M<*0iN~@&&plP3dYJM$wW7%tK&krQttJWfyz?I(nr1z zzBoI6-t5#Q;d#~HPe0^g1Zdlw!Q9rrDUNix$x>CW#|KHG%1ibhw)bnM^5|#1+A{~R z27_dQqS_gmMPSl-NDH*XMdXi~RwBK=fIPLen5B)2!?}8znj~aM1_;XgFW=GcU3%*S zc9idVxm9rPWX62Kif4Y)3%tJA#NM%RMT1d)-Yki{y*EibNbPD4cX+%S29x(ubB$*4 zID!-xa^uzVf*H6!7nLpc;GE`(pU_uG%9t`4hjfFx)N{ii zJ}HL;;v*jEaE|bS+;u-zm=4atKgW6typcP87A3l!fK>^zZ)1SswYxIiY73dF7p^2r zTvVTZfJXW&8wq&pEhx$_f;MDCiJR&#*ZvxmM!MrP&?Tb?C`TN)Pa}shU=GVa8hQ-? zMPisuBId)2`(Usle(|Y8Pv84QF3wRX>hkBwTvQU|!0uP~$4z?MEh zvRa?OiT-@!k9*Gf{96!v(T?G?=cIta7t&`1;r`RD`XeuT*u0ZENKg+N?w`$?bN?Nm zfrnLAfdZ~2SOR4$o(K$ne@aL<_xY1`^_{Uh@l~On-CbFx@N1y^Mp9hJ@GE;O5W`d( zW}GDu((D8{n~nb z09R+Ymm;*Q-@60g4$kHRePE&Ay*@UkXv`pqB6v}Es?D-PTZ3#1^Jrtgu72sB?~R!H zR!^jSw%@JI2~QKce*x>uy7qPC8h*fpx}{c%tf}iM_uthXligOw%H3a*Dz2`WSc}9# zuY@|f*L}eKgzh2nnpwdPoZe)bn~p}?aG$F?5q>%09+iR2i_pC1Stz4vdIo%i|A29I zKIhScd%hdTKgT`0D-0LkxUO4moT(3d)d;@^<0^dw=C^_E1?S21`*A*`B) zSe{hd?kiHnaAOY#Pr(U*yd7}oKfg(&{lSI_a&e4k9l}(YoaL6wXeNW5!RV|^lX%@v z2z(bS_mE@WTi}JQ+*2?bFImiLc7P3i!W`iIUvbRs*WG9!Tpky*%-oY&?D4ZGYl8qdX=8krk!X2G85xjOnW`;@fer;Dn*&jO@jtX^O{n98(sNJ80Z5O|kkDe6s~Gdt8NIO86k4>C6teZuPLN$f>h7Hci5x*oOUQ_AdX` zq+$RW8LmfA%v^HL{wc`odUyj|B=`l%5e^0s1u$_K8>2}A;Kv@(;|jJm<-uTsA(9g$e+se`u<57cX`m4#jgCVW zuwRnm0WPg}@DOv7gYVv%iO)tV6$6~FzLO*!keB~PiOZ4Ay)wE9gS{@Pt)=?&fj(nN z56|8?b544FKeX0^=7E!2QJCq#5@s?+DV&In|H8)r03ZNKL_t)wcdtB95%F=$PsrPC zi!`wAMu)tW7MASG2){VaQ@SjV*e2@!D|cI3OQ(fcSd8FG>Am=Zlz7IAXvAGdM)L3^=baRmh=WQ6eh!qb&3>Csc&83N zny-`C3Foi)R|_%235=cnzE}{GKO|@)9`nbUP9Hjd|y5ai$s#!OmC^-X-fsjH2NQ}PomGPfp zlK~A+gyZZ7YFbv&A{V;yH#b>y0% zKEr=#Is}I^2QxauQ}uaVY#VZ|yv@Y+iER^{b1M(yE6>}K6$^1+003O+Ugoq=cA}~f zmCg74i8r?qa)}swjCz}QGqzB^*T2a7A#E#3BOJUrMvpSsNeg8+YR|GzjY%-UdZm>z zNNoR;L#pf{3B?oOM`PmsVJv_iL7dE~K_8_m(;R?UHOvAZ-zvAfCIXPq#F3%LjcM0? z%K{nldgu%$okR?Hz@*b9RfKLu@GryUrUU?MaU2DTFIXvH4O5K8g&jk90m@1;#%9ZR z*zrZdNu|<%q@uU53q7=Jx^>U~u$G%R4W%6rU)`5h^LUPpoi7t`6o-K&r}ADZ)@JaJ zPm4{#qCPEVEX;n|qY*iSp5qvw9Auwi1*wgNLiFAMLd z2f?UO1^$>a_|)@A3>q$&zWa3@zpWeXIB8-snm&h&C_c&5UkKSLqd9_H8-N54m2pY4 zWnw65V+a}XK8x4pPGGQidE2B0D*=}KmL6#Go5ERu>2~9;4<5-z4&s34@B^H~kN4;C zz+!=Jxkit@;dl2Ks57*wa}Q685my#{PJ-&z<;gBR%-K@X9Vk5 zV&;~%TTkeeM7xgho<_=`fvE05zI->e$v@bqXf{!0x`9i#8!m?AW{P(W#e_eVL22@> ze4m-<)Cs_DK!7l;aa=Un6Q2gMF0@SdB63zR{}nuv8+t4ADQ8rw zr9aF76(mwnT_kEsEI{IncKht&c2lhN`}=LnQI!k{<^}$>fWn4$@7nXiSXMjZ_nKlZ zCamNXF^q)A`CZnuZVd)ofw^Sth8yi+TFA! z2dqkP5+uavqQyu?)FGD^#F}{&y!ze`2}|6P4SV;JF;YxbuYif7Mj64F+Gq4_uys;B zDD`q}DZs_`5+Fk57YG1?H(L+%}mY$nX;W8bz{}p*vqJ= zB8T`IMVTBC>|hE4wmwx(3N`}ET5Bk`NV%%TnOW~UIdS0Sj%osFbGpx2@1wh>{Du-| z|47CjA;ou8G7O0~|BL@?8tUK>!esc~$nWtM3N*(-aKVye8~tu{k+F)( z{v`mMGk2Sv2Q&qLA>2vJWvxfaW;v>?!1#CNvBXkg+?L*ek;yMF2$tKrYrEtuU}xa@ zgl^uOdeLY_UgDfh7aKq1KZl>;aL=U7Pagie@H_yoInSVWK~&Q_GvUzj{7Ax zJ(EHfjY0lvC@6?{NAbr+RO=s-u+I=$&1M*V#<+D90(1f&&2hORtQ8Js@J&b2 zwxXEGz`#rq&>dnuGc;4AJ0Zj=Wn8PmBYM!1cGDYtTY*YK=E{HDLbIPvj0vqSrJu`sLae8RB@L{%cWewBFk@ROTBZUcA(CCegG=bF_!<+YVU9c$6&PnX*)RkHL8E)Be^TQA9%LM>o~C=1^~V*fQ+MV?ss z)6yAAcfB?Il{rrJH|Y}ZHTiyo`3yhchv1w85i>UltjDd8!%jn#nH(%4B)h zMG8NO=72xPFebCe0UvwcRyES))dGp8*s`d$8dTrsWHsq8jDWfhULz^K!DDDX4~ z{RF_~RX*MmV`1sI^?1I2tGez8W0`P#-t?!fa=* zPl&_JCW>>@JZ<+zX|>ZaTOKqNq`wQ;Jlq*cyqbHKnf(_i&uH|UsmXg+dz`+0JEHgd z1$Sv@hQcYleDat9;^mYQbyEI)Co{{>ASI{CD&1$U?bIzP17H{xo~jG<6_?&WL?GA{ z9(buV$9zE{rAdQnH1&3vV6;{ee1$Q(DrPXj((YNq3TM;AK(T@t0OL7*J#2hEqu(C9 zxv_;mfis0fWVj)Bew)*1B9rSD2<*^>&p;gl!#=jVdTQ<%(nG860OSrcRg*=}10)%Y+TutINW&oV8JTLKQAw#RYWDkUQmJgw)N=P21k~cmB*lnK^ zC~j3nt^KqFO7Vsg$N?{2SLEQNG*qkr?)vdYT^^vwiyhYZrhoZA-D|QXo>fad#(?p1 z7&sMd#M|7x(6R0j`*`q_FGpH?&`bK-%G*SUY5LrHo9pi#A)SSiwCKyg0#I#?{1)2F zn))%nf?C#^AoAX1nFE9?jHgJC05WPYV-k%^pug5o8OU)+OLcuq7WAUkJ9xcA)Czi+ zYM$BeapIj5U1m;MLR_UFncpQ}eyg{qON#4xK2uSaG{56$Z)z@$L1U^=P;VW z_2@iW^WzF8LS*4tq@{4WK zwb>tRlN>^@26~sqw|@en(RmMiLooLz6LXnRlO^m`IZ=V_Ogtwr8QW=X5&#}nRgr^~ zpg!QgFJbY0FZ-RQUtiFH1nkZfCC3dXABHb}6Qj>?Ya6x4WsEyojiRr5O_J`v3G>;In!mV)RT1lZ)FAvlqiR-@8sI#M#h;~2AK z`3G+DtykCnuh;s4y==S|X5xD=2^HRo!z+rnFr*7_SG1oY>nqf}RseKK9A)#Xcg&YH zRsrQP*`fZcV8+~4txVlR@mULMzq)&XugxBEq{(XF$p4{C;l+CRHFnirX=Sf7sf!t2 z{G>JGj*ICc0ti%_qG&>bC!dsNdls{w7d^0vltUjSATp)H5tTmJx61({Xj=Rxgz=Z| z@gaT2U`JIhz6e`XX^Ca=!XGA@wp~+y+wSW_ijwQX6pl$`fq>_2I350QM8(6)I>r|f z0G{JAjA7=UoKxo-^o;N|r4;_r5v}Excf#fFn}aGWG^FOV+59lHd_h&7LJec#oY;8u zGolWLz>SD=*}LXP5R!@F93*WXADqcfe4HNcT`tYZ#^nc?0qh&i)&wK_9`Qc@)ee({}i zlK4J&tdy=Z@-h8ULyl5P!w}^UDAADqeH;zoS~Z@TYI_(67(8w8As*WBAaD8l8ocVR*}`90GbW| z11-+*_BaeJBiD5xEqDthT>IO_e&Y@A;N*g*d_jUk|3zq)jaeWzDJTH5lXz<>$w!_% zafh+HCW#G@{IQqKRt8E2=a`VH@%Db0Lz@UaNCIo^!JmDkm#_x*5R~r?J0&jc&;u+X zi`VU&FMEVbSv$xopkupYnTh5Nz@AKj63F<)%?rJLH?FQvn(PbXdZ{6aFiW60`Yqt0 z1z~O-PJ{y1N*?8D6D0Q+=1=6Dk>@xc$i?gdQa{|-T2gCpi}bBjAjBN)a)Vqyjc4y! zuAZubA$u_$T=?#+dY+ZWa?hTwfAj9mA(VwniP#Tzadr-L9r|J0P|?k-J)sgyWC%(w zuGXb0%;3B581d$c*maRH{K_JEn0$&S*Tl}8EtL>!u91j!vyRky(kCV8VS1S63O6HP z{8Q^S9ox_^cfdIpo5>CdN|wbEplGYasa#(Yjt9P0A?dZcP7$VI<{-!m%Q_pVv9$bK`tMg43NAzI|CvRoj6WJ z4DdOmo7NjdDLYvK zp-=Le!oS+I32wx-x(6E{9;5pk1*gWGb@cmD|6&#YP66E_=^)F-eu4gdgehtIylViS zh$GGCV(?O`RA&;KdKlypn;!X<+)Ql3@W4TqX|3vSMt1y51N`O4S$eki&`uJSl**>9 zF4YL-SbbHw!c3D&@~F2e4a$57P0LoG=PgV-Y#O9`z$6W2DHR%{KoxkMcy2k{pn=N#>-ts-W#>J(;9La1T7xt}o&G!AXQv$nOt zR^)z1L5@_V3)aMZa%z=*d;jKpu?D~+Y&)k8N+Ofd=XK2>r&QB9|AVh$efF|xDpN`T zJ9F36BmL}B4DjE5I4(Lsa43!AMYAjNRRt5(dVD88{2`?T*bEM6jVp?EzLIQnPCkGO zA73csMUrp)Nv%=7Ux6lSKf|D(0=@rAXe`k9eWi&ZwxYVcKZvz!{YelBhI2tgCu`t{ z^*O>}Wg(`9EraG0P5Ka-U-=r3rES_BQA0e^`ZBU>M6_-Bb*=Du(1|}x=)YTOcncGy z%Yx^BX@|^Ky`UfZLDFygBH{_e=y#yqKIFmSZ=}T_l8k z(|wc@!w`{y=9+ATes_hnD<=W%SA)gZABS4=RZG}xXgqmww6Yrg62h#p7s?Lh7LfO6 z5C+z}ckG+>J5)33<{zf{%VEj67>%3D2g||s8&CDf4mqo(j~~%3_48+V_-amm82tJeGp8P1s;@E6ht9O!F_v+OztkpuhJyU4yioezp+2j%hkZ8x;*3%)UU+*57E0P}B z>Y%<>#LhUnF)c%obO&c9b<7xOslS>sY^$yzP-muPdiNBI;w(;1-`9B#xCP|+$w#}) zc-y$2K9s)wJc1DqV-S}7!6wQa&cz1m4FMhd(r|3A!W=IL^KQSwKjYy7Bf##)fEx_Bx~v$* zw@2=Tn2VDfkW2e{T^~g`4IDsywtX%)HgYumF;yImXVrohkzXTwoTMu~eZxgNKm>RE z$s2)Po#_edU{XAn=>2;+|F!gNni1jTCwnvBr-p;pRlP0g=bO*1e}qfU@PFBMWt^S+ zK&c*sWRx=@mO!K|5*?Av=5YSs|NH;(j#}*E#-Ee_V!y&yG>rpWc*0VjbeHdBh{6(g zaHVU_4{^Kjc3HznTO9co^%`qSxN|sk3?)GiqoH=r4oPtkx3;ZIl>zLK$6!KY+-ifi zM*(D+KI~RHxMzPV&dqZ@riaE6BZsD^5>D;aqWOD<&IMJ&#iY^WfCK&G_;;+-HGbh? z8m~^UHYj|+e~@Y1pTR%CKZxZJJtqLv;2b-1kgnuWLvb|zoX~JS5C<5YC2z7yrO}5P zj^%r!e(5JsP^rgLy_wqlGcOgfwgZJU= zPpimtUDZO%2TJwyKR3VrX;PIe=U_h^@MDvfldMaYj?i{hZTw?#Pg} zSl);L)@EWPIg4|I5B8Hf5P|W`Q)$EVB?aJMsQFNmX5i&S2UMyPUpU-14b^llXUtS& zJ-*a8x=X@jO~;SA4snjiJzQxH=Oj@wfbkPe%I2XC-EZR(O)x`v^k`a&ktwv8Za4<| zSCAh*W||_oq7F_bR!7}$aAD04vhg{p3Fup4EG?a182st=DZU8~V_5~Gm~l>Tz*B*M zk(k-GU7ukL)+{tQ##p|R<7J**z_l+32ly;CftUx_!Ka<9^VGg@6NkWzUE6_^r=Y0_0F=zqi~xdfOnP!$M4;Jj#C| z0)NZhm^tCvxjEeu0S>qncHs$Dh~6K3RWiJA>ur+{HyhTS0KV%W z{g99^a-WP{d1?imfC1WJ;b#K35GR%c*zf-kI_i3lu?&HmVSo$_iLLxDz++i{t%CF&IzbIYLB%+dGyAl*k%0gNo! zS?mR^kdye#9dh_P%UK4N6hE!D}a4G-(1E+ z9xZ1e~+me&PK{*P3H?9{Ml)&1%j|s%J%F-LmvJwSX#MzaO(bw&8REK==xTm7S%bnqM#c z-MG!UHCf}*?vM5{A((sg8v|4#+X20Jxl6DY&NGpwMGoKsKnmx+wdQ|X3oZBQ)iZie z=Y={X&W@WWOmF%Ew@(5kEhYsbycZFEYSh2?x2rXuia#AINKFO0Y=c&R*~bw`&r8o9 zvuz92aSoI4un&L*Wr?s`r;n9i|8o$M!4rL~nte$Pw72l_GcJpl?bq+qiI|f*!u#wY z5lO6eDw9vvBu52q7rV=j;bQ$ZnauU}8DNOlQdvI7J0Jzbe_~%BZ^Kh{#C;g=;(f(Z z;uX1WSJPw0aw7PIP^M4dAf+D5-i)3j2MVzxdpS)MTcOJ_af1MbnStPTDpL~!t4Ny! z0BDngf5g*w@t$0uW^n zSKco5dxW6m?=pl}`@w(jUxpLWcCACOGz&j{$6HH=TX`XQ3kp!RN^J-amUW&{4Zt7d zm20ttJD0WQz1(4^e$XI=FXprI|wJswUD_e}0@KtgGsl-O0^47s1r zzxywuclxezfEF;SATiHfR6_9nRVk@^BO$uV6K0tkFCs}N|4vYCtzY%b1;rYh0S zsnX-!K6}PhAm{nf3n%FY$bsEgc1hY($3+*%7jxPPwYKh<7m4+mzK+55Gj}8*eb~j& z5=sNyPi-zlCF99_)Qp+OZs24ot(SBFu7F3*%=qv5m3%a>Ci1mcSGfnF(q(B~>)zYtgY4 zdrmB9a8hv&L@wZT9p8tE@9seD*)~5hBT|F9nIjuEu|*(}amj z1mp5r?&zp*%N0R%?dlb_cT=Vq2q9{5ar zifU6UVE!GQ<#30>&V@S#wcCA>wV~^rHGqMjW+~e7T0Unjg>xm=SWT@XErLaQUhBib z^-xA^2KE}-lh95~XCW=Z?{7?|{i&09#o}KA^yvWIb!gOu7;cMQo9?J zygldC!pusG6038LsI`fFa`{%;Nf6hXO419#&t4#}nsfzLvoy+i7_jGTj(>h-<#ESCMERkMcBDszj=e9fgJRv z&2h|8VqBtn$IfJef~|{|(qU3D{Y>uGSQ+G|t0{94vh}fbiI^Fa4D#{g2HoMkH}+2s#b8`O3yM6a7RxT!+7T!rqK2J9D(-_N?VGasU);_=pWZHsiBm4!<5TBv}ivF?TCR zB|mh7kKy8T@m<}zKI|+8yG$Q%N4pzQd!W&+BucOY1bX=9aQ$WGKWN!wz+e%;XZUN= z^W6kT7}&rzgips2fcq-PAufFdlUG1fB3CYK8}s9gVvs8I2xu%|*r^;^IW3(?g^7F+ zEi7A-&aB{pO$W-%1XPiqxUv@7|5E9B=N1L+nR$`;Mf`VgzOQG4ik*K5Oz^Vrax8_( zHk75#{Whi7{&^#ba&G)py%A7!ifP)+x);h#EB`;AbHA31nqC*8(@{=^pupOtT(G z!1j)Uf^l!0LUU+N>lywofYmuCNrQ?9<5HIfRc|1-^s(%IZjV=#L}Hw0ffx+6H@<+b zdk`48<21PC9gEKAT$rwki1<`1DFJgmgO5lF-`1y_%QkaoU-(CudOvBei|7+P+|cCw zj45At83rnX{E-gmRTQY_hYUYFY0iP{$#b0lKFRoEa8ja_0C-B^F3x~&=IuK{@}@+K z^yWrn284Vmq22)3FbpAVb3%;z3s#69ROOwh`XaIadPt;Py3SNCZN+ED%~!G#U_br0 zHGpb%ZVL>&w3S^DJqto%PZi0szuo9Haq&^2rWNIh}$v7BHwcRYPZ;gZ!}b-<*pFB~fL- zcoMbNR_A6*{V@*Y8ACOB?|Jqsg}8PPf_pb-M;^V#>uM=oML-uXKNI5h)hq60L1)i! zNqtm7=f6XW?idDKNRaeQH?Y-NLDH{LBOANPgqMHVoGgz3-I-#Qr>6pkvPn9pVx_n0 zx(8oA<)wCAX%>Hky#?S2%KaKPff=ZJyXQJthOGA$?*aMY{vZeq^9gqtz2Xin(&7#F z4~X}+P#@ag^-5Yj=mY10{>S1-syyfwfnT8M<)k2?iZdHckTGfAGmU~Ty7sPG4$p32 z{R%93Thlo{FLTT#nm`RT4;?{vO@wy=U@y3epdgODu3m5?fDV^*(lR~aoRsjhxb!r+ zDBJx~yVzFcx9*plW0*fjkw2f9!RGq?JCe2WDb6iy@x3JL)k>oIKI(HoV1Dj<`2@!u zGg(>m286(8qpqD_zwZ-4gu)Gq&m)PqiH-6d+g&7U3{)M!9=?024kGIShq^<;!Y{A& zAI?P17$4t#CO~MPY?;s*9s(HjH|N2V`JD~$@Jl2y($gF;i&d1V_1pmmP%LJN#ldXb zE;Rd+lIADfiQ#WjgTls_!rY*qpHqH2Tfm*x2j?0Ye)%f{rCFY4&vdX~`HZTj~&r2r= zhpG0Nans?PIB+0$lVdc+mq}5e3o)vYGzWOiTml#TE869C_y}wlF(tOh=07S(V$WXo z70|Y!m&N+$O1^IKFj5D)uOMZvO$*-EoZ*5j&=csk`sIY^GrD-=8M1=iyMrKy-%#?r zhX7`r1}r8a--^eH)@!rxx@3!QFo`TlYQs{&w@MXnW|%Y@>X3v30OHvoy-Ir@^D3!P zEkK&9p-a?xu1ibxs_33XfZJ*f4EtET81e{&l-rYsdLt+hmk(aB%dR0@5$?(z7m|bmWPqbpL}&^Q!OAyA@Uy-}E%wUyXEy_278WPMi(~NL(hrOcgp1<>R z%~Yd-1vud|g4oB-E13&6oXy-Z5`TOgid?Ddlfr2DIJf<+Tssu`gBQoy#tb`VQZqSy zS-}x=ub@^nTgfIt%((L9yPtE=)s_d*WD<|FN5wR>#)Zw*y+q`!?VgYH?K>!N7 zI3a@jz4(vQj!7|1*#ib?{_mW@T@lE{^)b=}-4;=t=)HPa$^rnNJZWO*hh!YD8e&4W zPp+sWMm5?!GuJud61;gBXV#A8SBLWzGUsG1wN6MIw!9=+DxU-#qEa3Z;4UGiU)tAo z-|uF;SXh2X0N;5KdNuvn8v!$&F(3|S z?2ie}*jShG=3uB3=GPoGor*?VNY0N>^|=XPgp2uTn^<}4`?K)nt;TgtjrVnaO)#1J zg1?pEZBx{65fl{tmxPaSy~zM^R;E(9UI&@wg?NfFqgPgemU!95=`v<6*ZY%iTOvM@ z*1Ws1%OCXDrV%7byIFgw$XjLj>TNkx8fJmIX6DO~yL%oIG8mv^3^|1-{_RNt5RVRt zm{aK#S9%x=kQ{qN0*52)F`Gie|HsqiH6!b+c_laf${;7L6M8@2_~3s|&%%7Tt2grq z!lcD1801g%f6Le2oXyq@FVH|z$V^}?r$2xF6u>hLM)^%|WCxv~DC@rp#Uz)4F`tnw zcQ%Lg18t}P9Lgf{43X(zcl4>Kp{;uvzfTBgHJ^mP&0MqpVl!TqC}|;JNurv<8MHT7xWLPd%$4ed@wWXk{m z5yUb~({M8a)|x!X`Y{{cq_|c%YwYj;WqDdt`crz_!EXz1dtUIvxwy$6fN4vuK<&=6 z`p7Nt=Vk)Ff!&$`qu(z+*sEy;z4Vl^zVPIK-8BF&IysU#5Q@VV5A{nk^KGsAY}fY23k&2cnma`zVppFy8*MCKKKjLDR1evBm9;l>m^z=YNhgG%`sUFW_irwe?>7 zF10w@fzPSgHLklqge6Vp07086Df2dp__}Y>!=*Sy>xXk2<&eBQz*N0$k1Kfea|oW$ z4S5~cHKK~hhnUjP@79?W3rT=lK6nBL1_Mdg0c<#jl2u3(uIPpfF@|Hf3r0Ik(TznU zsR6kbV%fJOJl3O`X}P_nJdGV2b&vq214r-$`wck4W*)BQwH3($CAXAZyB~FPCZy;7 zdHtf*oDre3KlObgja$+6=6LwTh?NOk?)#Olo-BFhRiEYDHZeE6Nud@I4_8w%fA}k~ zThwr~G{aH?j&QL9bZ8Z#i~^}veM(+tk^foJ*&KAOJs!Xv2t4%(#@k4LvWbEK?^Bf- zQ%F+qbp<>m`UstTrWh9`RqoowpT;pLiLiRlsX~1xm`jXZKgy^5*0bPaL4gP>5J$W~ z2ru>wOBfNU&*JMq;wxaH(%#@MMM2CnR*N%MfpxNS!Kwu9ErKnOE_4}-S zyU++kD6$A|-&?+(-taN6D}sNJaA5l{2k-Ujt*nQ;-fO?rm|wTJ4)0?$F!|$n>$ls{ z4?Zp{w$PXoUi_VN4h2v9&vf|pA|W~`KRo^ek*`kMiz%%AahE2Ylppr8<6pw*Ag3xkhbv+GiU_BKUdycEm$~0iqSs%mO8Zh7e!vL2S^2??h-?8 zTPV1)uDt76W?1P!+z27%SYHuN&hq6VvqFDdg!g+mieTkNe%x@N){@AA7-=kZ$aKpqaFM2_B^+${80j~e`I`p)YNJ{oJp|Hk1v0g`&^r7)|?W?DnWjE3CBRipND`w zY^jgm#Va1*?#}CwbY-v>Kwbr=XaeN(MA?HBOm+@Z=Kc`!O5kAUWvjA&LqsJv02lKi z+-(ogOk{_?AD;{0Os#Pn5)(L{_oC76;MfuQ-aVg&=3+78jquJ!a)@;_Ur3sB6vf;& zsqt~?f8zf?L*%@ro_6lHOnrMOAZ=)d3?s&@&sBk-gt5g!3@;Pu`KW_AXaD_6L$(b=d5wS+rXhrR-wd~Qb0@x-qm>P&&=o*doWBatOiSHpg-BTZ8^r3 zjz*rbve|`C$lRjvg-kkuI4NARp!5HYBoQQkQ!8e!(_}atsrW7zC%lB;| zqKka{=G#W{(P}yTD{l(>TbotHZBN_P0GC*~z(~oZ?rQi#L!+4+t%yUs`Slo$<`qt_ zM&T0)F7ZHbNDb~NZPV611JIt|)|&XT5hH1-qfqyzATQVRATeJgAc=2}39Gy~KsOUB zBySBU7-bGH;^G-N2OY??I2pEFAc{ZNU>!6$0{2tK4*vPo4=H5IO7>a~hmIYG*IfY9 zx3*?tc2337aSYaRycGHG7GMr`HgdgylKAS%K+}W8#nDS0hkaIt0GBW34ed*&5s;hA zN3QzXfQ7rC*H)!MqLi(9&f+b@Fzd6Eq~+8!3<13AP1Tu`wI9rSG3IDCaDzB}|N8?- z9PI81|Dyu{`&jZ`|EFlA^lsR}!{whr+5F8O!fBL|yp^#kfw#kU(p3`0P#WDTMMa0n z9NKR)eQ`K~-bro~thj*ONj?3+_|7|@Hsnjskg zIFEbI+q<*|9wteGy_dkVTnT?5g!BAg>@nj3EG($PYpPp2^A66I+L+9}K*L168Iszd z({}K$*272gt){}4%Vn8-_m6XXZQ7jJSpfo`%-ETXXM1+u)JA_gcDf_bMJ+ydso>*# zUUtQ@5_YfBM2Mvd1LF>p#-t(T zQj?2mIppN^UGX{-AAboMWBHSFXzPL}Wf`GLx z3O|HI^rIcmP2<~&j@CPxk2-3}ga$iT#0yztMTQvCJ(BX4nt z?}Q>H{C=s)ix|N#!kC-IrE$86!RtSq+MdC%8J28f<*6rm?{xek94(a{R`O_-tsmz_rmrR_!3ti(%0-Z-I_=i)7_=M zaq<0``Q@nHnBrPn3J+NEwIHr|9$&JX>7ll&)u3=U(9 zQ6}{P;q|VIIwzMTfZr8@&V|L4K)ju|MuwrR)jz3tJJJ9df zg*lf^b@93BFVA!up4Dc0o`o3>qEj6*ij^3U!b@;(>pe3M%28#Ex&2uRD02ns(kJbR zg?cz*a_it?ig!U=)7EU0i zS2;F!B%_fNyY{z$aeI8Hr-7(OkB5AB%Y5=J=VCpToISQ)Dwi$) zJMW}8T_+AB*mK8pKWfu-bXVQRW~Uk3?>$TtCA7D8y~A3!DNrj!^l53m02Zoi$oHMe z*i;|(m22y>%j5XNb&B%|5FI&9Bj&^^jfDZ|#A6@XM)+pv2RxJ@`gS^#g~0S{TwmZ{ zwJ%JTOy1>u#Irq);|HHhOa7WFCCj@oaD^zU>K#0h1FEk^&^l3?2-Yr_^Uek}K@eOa z?8ci-cTf|@xoBC9*}UOaQ&eYK!_e3*qlI*zfsX7(a4_CRSPH%HuI^zt^o(kohH zQCnPd>y}o@C^A^xD{pbcZS{GhW3j__2uTY&cY=G1~&% zYc7fJUnHEFC|y6>9X^5udblJa!WdrAP1M$x zHi+^5{`(7^kw0^4I^E;MXQ7M-`rJ3HMra3la%wy|)#@Y?>GSF9v^z--fK4>D*NYiq zov6cf^A^+_^k4P2mw28rcpMA7*<=nBUg|y^hzGOSw{?$i6$|=w7a`D2{Qj;uYy;P< zJd->QTF*b8fpjo?n=@DxIK(9H6hPNAv#WObY@F5|@xP=AlEc;A7BL9GtTo@`tKzUt zJ-xmPwk}`M_{_eqy#m9hbI;7*Qc*VUyGd2s-~8DHAj;aHEpP@}9KfYq*F}W}aZ_Fh zz<-OA8VT1r-ms>LDi6$g*}&7(42Z$`z~>k8=RexN0^uQi9}Tha{fT19ph?{<6o}(J zxA7GDZpJ`kQU;qHaW2%;ImFfaV^WVv?~j4r>|6OL*QwBWejkdVcXr>BSzePb9c`Y1 zH!NpU*^s1t(ifhFpUEl&1B#e!u;ZJ$MB3%_j};eNAfpC*dF+vUz(K87G8r{=hCH!X zvo4oY;w{*C8nE_*52+NCB1sY zD{=#e7UPVYOoRdI(&n@9J!r`+0^omnwfk-8Stp&%|9(pin(c-!PBaoxVqcYo^V;c7@f#0v z?E0C{LpVF6uxKy#|E-ydgF%F)ygKn{f(yT3hxfC5ey+x*8D?}iW9gHblM&t@W*ks6 z3menv;L=g}MPK?^lpADQgB3soj=jkb^YSgHDe5j7V&xqH)~uj3&SiO}Y1&(^1m=r- zND?d(n<15)ly}&%-rj#dp-52DI$RM%zQF}Rl{tuHQ1j}R7%5h3>Fk)&q)`OlRqGs? zA`}KEE8sEoS#NE#JiK-L3?-7o4<9PqPmYi|4H#k;NI(LH#LvVe7IwAiAmIUI{db>f zBR0f3-sV~55-yChWk(qan`5g#b4aGsb?Sja1lb$gEPH#~qOuCNR>N)CLXxXpwx#Yp z5J+YxM>|1ggM)rYY)GRO@ghK8`p94MC9|cTb5(`a*O6ug%vGvwQ1d};JjZy}WH2fs z>Z_z7s1qh=;LKYeg9}wtYqa=qZmuLan|=Vvw82&_Br|vSkdpq?x60{Df+>y=zkDnO z_eHL}ftgX3sPv+QX;w_N{yAVhuLndM@-Z+w%#?54zjgj#-l=61oqe(_$POuf9?7i* zGsg$yZW7>o0ie?CiC%|0UbrTWwK%xv690R&zuw5W#JRvVC>o)1Zg&ZXIER9*U!X}= zTxxh#!&LZDve7g}#upW>v~K>V>=ghpw^dc$Dj*AGT4J4Zs_QlaxSCF|c^EMH>V9ZE z$4w?Ws_fA|vv1@y1l|*kw%+WWG<@9ImNzUz>=@717#{BL`HsuBOapijLe8;p>N%xl zsIeSl0Mx5JrFVE|{)H%@Wvz+e+56^?9wm`uXV)2Fj_)bU(~#LlzD{d((0W4!36mk& zwLk(j(mii6E(oHph1!5^UzTeF=ZuHISRFcRi{vVNeTURatBmGIuhWGae-+uCT%ghyes8^N z-(MOar5GOT;FYjRwcp!nyA%g-!s|7NFv162=15UZrZh4LEg4_ zHsf+gK4C4O!;tUE-Tfpu-R2QO$4~r5U+O~Tc@8Qk{m>xD*;byCJkP(5`S7jGZ{js! zc?RseCw&)eLLj>Pf=Dj(fCUqYNnsb!JudWa2qdPfi(UG4@FgXPMpvJYVmcW{JJ>V9 zduRl+Pka06_uS`J%%#=+ zzpdNEnX~(v5>r#*001BWNkl}73xmU%t+@GbBKK?C-n??!*HVv!$N#A1N ze-@@8i9T$SL+z+lx3%U7FdXbL18V?`YHga*m-4$+@B#&xkE=AfKN;qPY4u#tGyG`@TfGbE2&s;scza3Rh@qhELow%cre21;1xIy&@i#@(*7Q8i%0a{0f%oBzHZxfO>&$;yFAL0G);JhwW5gg>$ z$NgzJ;8j(SPs=;pWp z)~q^S-5SK7n7KQ@dmW_hLojt=U%>)h+n)dVFLC>Ib%|h2YYiV(Pv3YpT17WK33{;6 z6aY1)4>FyAM~KskN7DcOs55=rQL!UWrrmCEKf z?r**B5@PkNEbW?y?sTgDWQ$^+3Gye@ooHSqs{_wILI?gwFgAg&82l*j*G z1pwVk(q^1agF%LIJdYbPOQl%@+gSt+B;gP?8lXq4F^-(&orODFIMssyo$PgDLEou! zNQF`$7na(S27^5`p^;!NsLlmHG@jGAo$>lQpurS!KQ@%!P2x;L#Lx@iWC$KuHjIsm z+0AV%79;mRzfyiTHd9A(gzJX9bM8> z5(xAx%y4?SnVv}zXa`krbFsfn-NmV2yRUlsiE_Z0a_g!f$8a<5Zjm!^X{it?rB78e zl%Tba8jy`XKBF*fSCtZ6qrwN2e7Un@JL zc9w^)%}s5x8<^9K=-dnw8dxGlMI;;OczG%S2+`?iCjEo}F5L$5Ta+$1yHNKJyLmPJ zJ^?9F3|d5O1^XiafD>q7TvfsR&j%zD{*EeWiTQY?6#0+!QS8EIvy-U2>NcMwD(aILKr+;CQ9y4H?_bib#XjA4s4#03X$=Q{kZ zl!_b_OD5Lx(|J6PvFSAs@m^`Cg5rYHrv1};IigzWF}NvQT2IuQ@r__`MQ9x8#`$m- zS2U7c$ZfbNAx`#|)Hu%dyEG8AX}aNgzApup4rFflb#Lsgl=af^Lk)3ExR?{NP*ay^ z%W5iD)&y_r;7Vj|5l_G-V*h-X(=4Gq8>F4juw0C9EB6O`IrJG^f?>sJN(G*iJ?2ys z)f1jKvE+YCvzTkXK7&!;XY9hlfQc|EFZWog4#Tff1L5t=5wHDH#L)@IMrld}-i{v( z>>Rqxa0DL47t+mqUZmW~Fu6%!6lT{Y_%D*Dr1bc^GmY@1j^KkC)3dCiBxsblCphtk4rK)MB&y%_+zb6j77_khwlQGdDNGnxnP zBDy2cUbt(sJ4z?Z0>iml_{>Ud-=?)uC@<&M)<}#M>LjBFsN!GV?8t9ILFOVXuI1s zNybj3LQBo#-#Gt+S{>M@1Xih5(G+YNOu7nW|2!vLyUmslS8vf-poW$;U;#hz)tr4d zX~^LF4;amQ3^TMFT>v3z@ySb`mN%sd^0BItam&PYg1JYbfKmmn;jv5D+piNJ^8;(e2W&dQ6hLqTR!`xR4`;rY$Z`+*aue1|mDr z=4UXV8WKFOkKf^u9zG|ct~5boM?|I-gs<*p-oQE3yO8F2^!K(fL~4t%YOkD6&O}MS zKS{p%EEnP-R1WAumA{w@UAnM$-b?^+z`wCYq&ovb zOub7vJcKhd&`-hj*c;pnW4~eojd=b&`*oIyL0nqQXU3?Ibn<;>@NGnsY4?u!M|OEE z`F(?DIBljAtaFz3Ov%a^>Te{)D3Ga7Q_=9vaKyoQ^^+i|dCdlSWPCVkG{otJzOm&s zLQbE?jv7yCc)U0Q+I`O{tDT$8HM?L$k_9Slv59J3rsJYvtNy?0(J!@*gmmA1k99We z7oF4AdfHm5AKxB-%H_n%A>XZ#96pROq$i|KUpa|4yUvd#*86JCi}(CyhKNU*HCmFU zw~ciIKSm;J?aBdRnfdDeiD8xBc}gYD&a@p*qAIaeYAy!V6A1`hmGY#POFpvUW?I$!P}$U~$JEOt_{iW-%~AcjOUd==Ep zSMTU#)oaemv&ZW*_6sLiam_EGz>GHHprh>On)9Cw0n0=P6a ziE~Qbx}7J_Gv*04bxz&ePx`58 zz~`KHF^K4KLz-I}YixWf@KrTl`U!wv5&-CNMi>r{f$m*uu(AEV=5PAc`oSh-2O22F2 z>as#9To>qoKRI~(KYwiPvK>sshwsGp0aEh<<=b*@@5dq-5x{7w5C#$-_-wkIFJ}-$ zv_MQ=&WS5Z787>W$XI3^?;nJ2N8HqbzmRnyN#oYq{uW8pD}Cz`Ao>L`AD}wd zdQN|hZE62^R$+YqLnz;!xrG_|prJ(fDS>z{ahP4fEwT6g8aNSxvLDvP_$(4^d4c-G z-P>HVy);kri2?OJ)L*bv4w_WorH|aG6-^*_Ru$?}lg%nxr!bRYlzy7;r~*SRceC>Oi79M#ps0}BS38|uPf1~wrfSa&-*k{=h9(FD`%$vs#7X2TtOZ8HMH2HbUW zdBGWu+AuZSo!BFa;GD&K6olqI@7X$2b%fplHR z=e5bO#`A)8uo}@5BpOHvwxPjk{(I%F@$Jm<@tuh|@hHd%13@G>DZu_rQ+|QxkiF1} z4a1P{yPaiIGpybSgL%(%H);;`&;oY}p0g+=Bv zKoGBXEb&PqBz`PDW@`VKu&o^w3Sr0$$g)H9`gL+s0RNk7lEU?EBe+B8okKV6f#p(f zLY3X{rT1)`;#Y!}jtH+w_220KKjT>Tn4k&2-cEK7Yj)%CIDgm8K=%c~rgQ~H0zAy9 zy4hXz6SIe&MTJbU!{B zW5AMLmnNy10(j(B=E&dkC{D?Jl|3;b6Fk@g1xU~?_B8Xva+Q}sWg`Y$3tOk&{E%ya z?E^vtO9b9mU8yo5l}hT|_rTadqtj9`DqhJe^(jMc2N-w!8fs#(N|RTJ58oX*YiNQ?1;v=3b_d zx3N1TYIb5B1rP_XyG-#1A0DrT@eaCl@k3wS0i~wyAt<~@XKBj$Jvledp}fRd=YE$N zrxcj|3~zjZV;n5%ok572B_2U-xJIhY_R|vzL7c}&*`S%hW@pMJMzgErY*C1;R?UZE%@1St@2x12+g4vYTn+Rl zLFnVBy1?V&3%(97+)t)vXf$f25oRoun5otDla^!pVr0Y0Hbuag!xPDU3-ylNK+=Zd z^-YQ;=6SUXVTOO>PQLCCd4fdVs8u+hXX<993L$_ zGjCFG{u0Ivtw_F7G_(-hC_2Vvd`_gr8Fi?WTh%NYfaA|Aw}K}IY4;3YI~Xn8)ZWFY z1kzUzjWkX*EjN;mMf4)SXjb3)F`fjVvkMFom#nvEZ8V(Az`=2AKDxyuk3cAG{6ake zozS2KV01E!50(%MXwFL*vTg-fRe`P^&eW#!eYWGbD9kO8$21*RXJ5RY{^9$s*E z|E_SK?LrTaf1Bh&ZQ&+?$KbV)F)UUZZ#BrO>Gub_A>olDNZtVY$5)$y7vBNl;cb>z zITE_BuF?%QCKvvH@oj*sD>`{!zgO5PrX*VU;d$fVT>gOiK;`QR6v$8j{Tl!ZmcSSf zJ2bJ#zM+j#zsJEjKA^%hx&vPil7`%O$8C&rk7|0#kpW)=#v2!|(~`pq)J2IW0iJ1@QEw9NALKu!?{S{2m5k7xL9 z5#~gXhb$PlhrlqCT!h0jF~&h#9844^v8`wd#<%my_K5?oXk;m!Ij`2jR-(g@ET$_F;gwfQ$RCf#z}XVno>FmH}mfSS?*>vC3bQ_pj@ z97v{zrxhr3rxn%dZq%~&5572%j5WH@s6R1)i4+Ej3WHsVp=Z4zJj-4VXVMoiQ@&R{o{#}vY3THf@4>-J4uq~tyn zDt$OSF^lcIn672Mz&@Z%PMG)v7mZ}ibKU&rH7K|*_nkRNJ@dwloW5Wa^a-=NP^`Ql z%)45Bhr|P)17qQ*|EYB_S3&N_Ge>@le0>A~h(}=%2`Igb`zgyFyLgJG?hj+&^8Bsf zZ_hU(Y5z$0ji{SZj11*np5Cb*e8kxOz;=E&>Zr}ySUE(7ed-c$VYn{(?{STLHl1o^ z>W#U3lL5ZJkI_UMN&bBTWVPOqNe|S<<{i?sVk`$cGfv$*@CM=D;HsO7v3G(-P-@w= z9VG4JnbUiht6#D|bK#=3-|aF5q$7n|HtSoQ{~&l%PQ;v!3t)kM2D8pOIo`Bb@B0sB zMk+Uq%eC_G(A@_AoJO((Aa)J&NU0gn6X5ADIAwXk zPIS>}(Y+oD&jxL2vd=a(LS4AiUQRL1r)jv65I^&|2f@-}*@6ug!R%s{~^i0@9LTVu~!@M8vxI^ z4Ywlqs)E~xv*g@LU<>VrbyPEebyT~8lSy4cA(_xKp%5i)$1r=VdZm)_+n-)yu_MMJ zCs|O?%GNE2*&U2Cjd;E6{Ba2P4kZ6K3ZclGOFFk~8Zi8jy{BWQvA`%R?l}89$&(KMhy$wvWhgvk<%NLskQE;amTUWGOCqndR9d4|Y z%udNA0y3`LCdt=%<4D?FS8*~580-*S8#l*Mo5Eu|pXl8I9`f(~V7r4D-5P?QKjAGy zQYKsrDdCYkY0B*^UA&6a3~=%)c+4;=bcW{|gIKs>2Y{4RMUo$W!c{O%cGjHV@NQyA z5my+Cm@3ZRC(VqzV9h<@>Wd^82&8o(rOAFbUbmzt5V-RGJf5o!WXYhr?c1aY`hgO* zfNoaSZ%La;0>l!}nl?0)ZLA~BbJR!W&xtwhKNEbabVER~M>s3>Wbc6DsO*{=pAO3P zfnQTxF#7PkOf2Q8=WmeX&kcK{^pg8XgIIXz&TLNM{{53*$Km0=Z$3Opw+1d=GXR1U zzX%HzYz#w~S-s+lgA{|PAcwW%xvNN(*{LmxGf(v_m>DAgc3*$7hJB>a1ofWpeUIk4 z{e$}@hYelRClpLDZoyt$Jpmo!KaaHHoWY++&f%_;BD$CPBs$g-d}dA}Hd5)E1iM=r z4#)7o#7j=j9JWA3JD*2Qnl$EM zRndL)n!dU2DU|ZA-0?D3i6xW+%(M+eqfT2#uOGSb_4%6tt7>TxmPJXYD26>>~ z7)DPs3DS@!3-GIV5Vaf}CAcmghqRV*AOyN<8>F;I!+n9WS%s4%oI`s(U|tm|q&PF} zX;aaXaKQb=hJf^(Q*OHPDR3-Im{whW7kOXluz_`lRNPq1%au}j^UkM>p3pupzYP-Z z0fSMZugJa7NPU)SZXI>u!g&^II%Z~~m8{i#Hj!l6(A-2Bb9?Jj>ur^E0dMYY;^|5t z|MxJN=80MH?R37xC&$P6Eg#4Dx?r zRFdYD$}ytvSDnrT#Ce2GuM4(3%YuDmS)7m>myaEt-EdzpVw?*@adRg;0nei-~et~ zO1LwzVJmb`p3POedE9ZrL({VC>uPGXQ2JRR5G{NGA`-i^qY#84Fpf3eqAuJ>Vn3_q zrOR!P#J@NJNy|!V)*v$`%l~o!&4C0haICPZv8(g8*ZD&B>Db)nZs8h2{m(sQa*w^% z3@O5V^3=8}OY7tKOyK-=gW+&YZ`^_@5;CtwhPXwP1c-vIO<76{q`Q zFV%Oy303PrMbP;C0e3R3FGk1JY(|xd)tCpPn@yp0I!Svz)030AQSy0(q%#(FG(5U- z=%p9F$W%9lg0ODB7$iI?{$5l8_l2_#JQjC|ldf*`of{A%y)!>WQe+4R8j^r^$P>E} zTWel6R7w&9)sPglUn5aW3YK1<#!e0B>gZ!iG2h&Kz=7S?BgoVs%>{2?krtH3AZTO7G&$TsUS2Bui zCf99zM050S=hSHn*MiX90(OI-9dQC6XSbmR*~~$zG%WT|i!jEGcivoXUx(kC1^lm)qU)1{l6fNlHT11L|=*l z001BWNklW)%!t$H~KcP098P$zuBFCT+1XQ5X|tQLRQ6e z-hB)gya2V^!jpTM>36qV`J7*o{r20|&Bj-|z~9cl$1rujy#NpO-y0E*&yUA6la?co zA@injp!hkuZj66JF6X0L;GgBQbW@ZEXy*SLqEDxUt}-t9eFBm@gA`ufE4nl@WrL1*jvF`4#G@n6DiI4j z>NC5YE$e6!jUIO-WO$wfM{NaS$b~moTAV1H^uUd^MXfR;eFRtnCseSb)V$&^5(LCn z*Y|FQoWUnZE>m&{$#z`dZ7XIc*`B6kbTPc66gbyqx;E@RSh^S6;=PKXZ;pjYRdY~G6JhrgoXKCwE_+)#6d{QKz3HD~yK(7u6? zw~uB~@Fc^5zC42~L%qypB-ZIDVl0yt&w*z_9}9?leW$HBK~Vo_ulXp$=JcINQaF!* zcVX5hx8N9j4h5a($fI1m&Kt23oRS;97ChMU{%{`V+&32#*V=sN=Z540OiGoYbY~k0 zQMN#yXe50W2|#nj#a8}mPEg`LG~IqFC(>&o^my12wga&r|HBB=83PF2_j#ITM zQz52j|?B4+Nr<2iJ_$ym*5@%hKCEpe#J+9K}>&jhaUL8t`bD9(kXg(kBn# z^YF)nS=;Ooa)}dp2Zkxykzw$=!3&U5|C(Ri-;<=E4{`3B(qM|=puPh-SWIElIeJKo zj!3wNVCkK}uV8*LCHAlNbJq;nh)M_U1rj8-+4TfxT?BtG!`wE>34pxvBv2ecGr$ep0)Xn-`=O!?GVs zK2@S}Hf=5cSPCxbEgO40eW3(Q#F8_KA&LQUcK` zFG!wk$Rb_IMiY`dj!)S}5Aidh{{pU|TMtD?R}*K>6b7j0C{f$JPcfiEymxw1@=`Y_ zrI;tqrS$Pq0*%5B*GJYLR=T;(#79lOh@i6AP2V8t#h$my4F>1}FLduwX1Fi5T~9K0r%e!&9}9_Nr0mTLGt0aEfmfCu-hIaxz1@_7Tt?<5 z1>@F_InILNS^|-baCK4KDCQawoP7MgA;wID&K?~TuROEBnTeLyKkMLYF?5bl32KJy zlmSx`v|Plu**)9I3ZKKi#g6;kyif)~gOL7NKmem(AEk5!sqm1y)mdj4LtGIh7irH! zy|1n=D4l4FO8}B@1_IBnhp#YLcQbv$5`_gCb6XRQ$Bu1x!OlqV@0^OgELiIAw3$JH zSEKd#pmL=zQ^sn8OS^Jjw}Ouxh!0p;=0m_~|1^GZbw_eq8?v#_|LtFhGEPI<$Db$pr5bF5<01<)DqUG3~XgkNmf5r z!0c-^;b`{EdH0=vXNHUaq6Zs_y$it1ym1euKFh%UB*-=9d7Og*b~T(`obyu6(E6t_3O97pOD? zH*C(0cng|l@rE1=@T9X8EQ~|lC$j{4H9QvQR;9z0G#H-iNa{Y2%L8YR>RfT3g+EK) zlVc%6uW;+&RGB0Lq$JQqw{X#={Q>`0XOIcpTr4Y1DVWs0Z-+pYbKX7T4wte6f7(?w z2jx_$3@C-CcPH4i?U+>H8X|=iU`kiqXFm*fO_Ci_TDV)vfqlNIfuLJXnS|J3FdFVD4#c;FeMR7e8bn;! z9$2Yi&5}RsGW#45yEqHyzi>miVP48m5|iQD*Z%+{&m+DJ^E+htB4gE=^!{R{Fc=%U zz5ox5dd|pI{9@HTI!fC=0&vNt)oGe}sK4ELCC%cU;h*PEF$}HGyIv4hl)W?1o4B^w zglm>TcfdEeJruC-%)#Tcr{j=d2vUb~he7CoFOGY8Q9INdxA;KsS-!UlV_N|*93aE4 z2nYx1WnEoMAe%4Dn-(DU0HkMe6n4&kyL?Wj8=ZeYG;-slGnWv=1^xBl zHh{a!f4nPzhO}co@&k*yy$pN`KjVp~p_Ba!+WAq3GW0mG{ErFE#v`gb~X5$4LJ7_ z4{lGF;Zf?ziOeV90(#-RA*Bbc{yjO-X~dc!ll@1V#nk2du325BV8>e>)^CpC)3u*H zjo&WW8FaK3@XrR-OU9brB2D!!SDx8=&6t>=QtwrZ-BqlL{PlXAB6`5XC#Y!LZD|}Y z;m4Cl;B`g;wb2UxSl^2g>l_?#$*7B}9yL1R+n zE_PkNuZFWp4r%ym2|S$-9>CqqPq(t?#C`gB_s;--0nT*i}Ql1$ECT5y0O0@bxb!R>u+qOR0!|pQYCJeI;Jv+`>C~;14pVyZ^(QIdfpTtCwFbI417^oZ%FS!PH9QYA$%L`9VXY<+vQIr`B~xPPrJEwS(G z+qd>`08dM-$#>tnAOC`|6GmfOD>EHAVY4+e``RbMV*Iifj?Q?Q#x=X|Wo|LB)6`i@ z)p#M%ZGKd-?=}dMI!~0aN4B-TWeDzv&7#PAQ1i?`ptH$lxG7Hx=0njV+54PXFY1j+ z?&EjyMT;BbIP(o>DK^1Z`y1rAdsRAUJaW=4BN5m`fzwG|@i!lTTI_$HgQ5$gbJ8m< z*LQ4uXL}cUG3kvEeYv7>><2(fYc0>MxdVC-gbuK?=6!fMy!vE${u14!EVP5l;IMm; z`w@P?`>k)e*+c%rsNJ~z()}p3zAQ*Cw;)*K~UXayUlWCCPngDNE?%YUk?*w{@?*xT= znd?$5=reblu27+l)9nOp>~Z@5N}&KY%sIk&BIzg~ZK5wo29jdRJ>?}^+(a#K7XCf) z`F8%p)-GH!|Hd8n)^8L&Rw~4@-MgC0ZR&4@BTu%!i6UETON1Te*EnX=_nJ-J97Fzb zZlFSxsv1E0pWY-tYd`(|>^O|y(P|W{IgJwA`62Jkh=P(;2GODJ%1kr>l=iXaVBAE3 z<-v$0k8YHLb9`rX&R{X=kF!@`h>o814V!+hk?#{FLp4vJDkpLGSlB{>kS2rh2EdCq zcetm65H&MH;WY>rXI^01s_u3!=^4J^ZfHxoI-R#nC=fz``!Kpc){4`SAn(QQ7lx}Q z>JUzk^NyDO&S`@tCMJS=i=!ETM}sAc%efsoEBhI`ji9(sfs~tyW{U})iPAs1%z5v* z9==@qP`!6^+{hV{`@W_GWi)?yt+Cy|zafX5)0z~A4#ZAq3=?aI&>2E={tw>2(JM|d zk4SR04|TBnnE{d*m#ujyt`3ifh23&FU*uWml;l=dXi64G#eiJsIKbdwG;?;>@nF~? zjL!UZprKYXa3Xji;&JH-O>2?s3 zpy^GJHq9*@E1cJ4uen;DVv!{eAjz{N|Nfij{|pHokItGIf$xk6 zc69avGyh)goO!*Ne0D^bHjbZ4;X$VBY%?tokaz3$7u#r4mJymrFg)X0u(yNLIXN>tT}e- zB{pE`)&i37UI^b6xcY)@jm3We*LjWuyt-JIZn1t7i7O0W;hE72Iu?@)bP*;=y)H*! zCxsyq1Fi>WA@n`qMa9 z24S)?4bHr7P9dK&VA`E#$p^IhbJBc(Goi@nEivh@Z@=LUC4f0cyA-uk4Vhf!gy2S; zb0lDP&cSO!97#s@&agdS{RBx~@ozJ$!+qa5$2QCP(uq-a#jX%4oq}G1XXJWj5C3LD-Zoz{MWqltD#z<6 z@C#|PV=hwpoek+M>1X}#AGu=b$27$9XGD&THKaLbH|n?deUE#<zl{Z6{Lgge5cUX{g{%OYbdZ#<<*$%}wn`ju^I1lXA9rZMn+Q&z2) z#DD+gx#NEavQYaX4hJG#mWQ?HU&w4*Y)1C}5YV#pyhl4M%i&#qV?Gv!Puav+3xyYg zsU8mIIa$Dy8&03&-`Dyc!2dBmp{+z(rzZ2^LmlB&MvrA;T1jgISs{%J;_}anbR&M< z*H4Go1iy;--PY9pOsdH5=$EQV3cPpwUQA^Z5zCp7+W@#%*PyKT*r8p6RhUAK+MRCgxLOaZgUd50Qsa|Zl`=suvB!T6ZHyt=D43k zryJ(gXf zSbS?((xIr^jk^xL;lLeNZ}&!xYrtYklC^c(?_q0YF9~VG_AhAF8l)0K#h@1MGJ^8^ z`F)Zfnm9aenA|Ubs`0gl(QWh;2U1IQVXd`$* zQmnUOx--xMWzo00nB_62gPY;R40LjDInYMS?1Bd#okB!=_v#UB38LL_IPUYt`IDlr zMfYf(q_K@KAs=CsmwS%6yP4JQo|$*8am{UgUB+=p4Oja6@u4OyO|gtZXgQyU8zRJ9 zn&+{v*NymuO)fA=&OiwMOnk?Eof=Jj*8eljTeSsxkC5gZax@b_C`B7^)kozt)}WW3 z|A>sCM$EE{BWw<9iM$<7i3P9ZCH;Nrob9$3A=+(G{iq-Yt+yi+M&*YEaZC`JQstD*fam zW)OId(S5=G2DcaVnVNbe{3@j+P1J}A=`)-&*>eW&OE~94Xuhdw|B{-4N+#fMKH_>l zTtY|unilbJU(F0&S7}@$O-~U?xN2_cMPf(_OB@aco61nP<*5>;@S9D4_;i};y$Xpe z|956yW#&z~@&(f+8_?1ux+=9kHH?P>ab#1TLDC2<O7t$f;CKDH3F zb31?9ezTe8OlIUcZ0_VjzR*M=+f8bWN99(yMvR;KJu~a3W7g!53mgZR={N<|e+y4! z$i#1`sXeWSNH-fcCjur9oI22ZqQ@7xHvqsvN$}oGPYYG zlF>x1gf{Lc-Bm42L}M*uLr6}?{olX;{{8z$&c179s)@h-t`bN36aIEhY)k8s<(pvx zEOW8-ZB~5osiNZqZiWa& zF^q+I^V@EE%9k)nU7lmfKWqox3N@WDUDQ)QHDpKOWa-t&C~mA-AQ2kfUTc&i0swh?|A#qspAz>b;m!6iT3AT78LhQrmo?6C??8DDE3s+q|ooWMMC)U@MG+aU4t zxD-I+nf5bIej6g}x({F+Uqz0PQmkMhQ0|q*UP0MBsX>mf9QOX9(Wt+eI4}gJbMG!1 ztj`)0BD@CcD zqVYkEHf_M~ZT)cuLAGxEmIRG*2>>J=LJ4?gIqoro%1=MFmTHuEe@i0+vX6s6rTj$?IVo|pDT^s~ zC^eRIip&Y`O{?Zcv8+Z7RB|Bzv z?Q(sgNzOUn%FEfG{Z>IRLN*GHQZ=k+Qusv|(y3{3ONX z%`n`)!G@wK1o7fh`({D~kl7vj!p?=N-$GF>0PH~<#u`Ejj(($l=m}@Ca5W{-Lq$tK z{$`i*GI6QmpXTBcv61js{1u? zA=ucwv?>_gmg%4>)V?#yG%&-L)Gu8yFChV_jWOd1A}L4bty{>j~8JdOstC zI01LNZ3JIa?F)9=R>o)XiM{he|8FMt$9xOQprp&gH?JuhNffku@%dzwbz-z`t|~*u$Zp ze7B(}(x->`X}w+ypBm(w4ZZ@C`@d7_8TXyY18+5;J=LuHg@3j*INe33g033(Fxx~acog$SZ)+N#chqHw3{iuQ|=`fRS7X_67vL+T?kD4x+TKvG+M%d>{Alu zIsNwy>sc8H4-RL`QIH7lN=T!$U;#66*R}N{!^DoS1L&dUp%EH9utf}v19h~$l;jz+ zywS721x^?cz{?c)cqMn@p2D|Ak*^-+mMl7Yz*O&K;6Go8pt{nCeBk^VlEv`m*!?Uv zW8Df~=3r$blHYH-;cs(Afz>;r_N%((4JAHs(l-;*->IU%z7E9@0(%CQjtET(=YU5f zw75v1=dMp2=wvtl|B>}Y+m<6Kt`hk4|9|eRE(f{~65(BavuAQ;WgCt@mjD1D07*na zRPM8Fha*4;0fXFuY9HJShe2`MOjW?BDox(I-N=_7{gwoEktn?|w`!er+&3|{_y~C- zNK}{860qdFgl17_Wt3frK(E<2$x>{b|1P~(-Z+%>bX!#JWH>}tWp1Ly%s?qP(DTNCJm&_~uA9i8zG*Uh2@1PCI|?ar6?q_t`) z{q!n|TXZmeOL0FpkgS8UEL&>g&FCcdR3iSJe@97p7{lj?A!rv^m!9i$c|-bp`zqtK zWt*EJi3O^iHnd^X?$t%4CX<)`Hf704OuO-N;@~WadoU%=rB+u1CB~^lGa+UVXfp92+f$eR8iyDaHp}$jd8eJ-{ivrxLdll z*->=0bgEj!Inx$$*aH{R7L4!*0Cx8l>9DccY{!+ldmUhthgPMy<~4Q}-$PdwdCn=J zyWe+g8H?ps!6Xuu$ETl5{tr$0BUM9JHRsKE_Fj(VLFH~XWi zs?16)pvJ^w5j8rbk2E5m*^UM9iTgQ%pMIA)sq8xM3k%hT;n_73YHV_*#N)2lO^j*? z^60SBGdS5e`HAEbF)V)0PVO&xYtWHwtHzZaxsMwsmZI1 zyGa;tWmB0X)2cjnd|nF8RIB{|DeIl>vxy5^J~O!SvGMvxZ+rJc!dbBFk8FVDH=~Um zUEsNDnAmM)t=7_OYgFTICy?~%qAR=k882Y*d@a2H0aYKWIK&gIjtz6~9VDU6%b?}g zHeiZf#gd%dT_w4?3Rto#OvqJ(B{EMnckYIFjbrBr&e0^Qw=vMJUYJ|k4nKZ;L{w4& zH_^cS0%Xx#(K*qZnn?(<%SY1DYi76Rn0hC0%?l9f`UUl@|Ob26bW6A<5zq^a5QJoCx1s&nEn8NFGv} zdhGsg*ItcK<5+&uIuuhLX(|H4sVU)#<#rMGeWeOQ#!=Kr-JlB70GLT2mdXTaR~Fpw zf*XL=CK?@X*9qWoWSKC^%FwfN4#82O8{OG}S5%aXC5i;<0PPZ)jFNZwSW5d#5bWm3 zlT>q#LCCYF0X8uoIpr7YQ#S`}v{+qyWZDNx#v3qrhTDPAR7^xaySoU#iBto)uXx2Y zV7Px)3ZHMNjd4>Rn#*x>Ob%oLC|%)>l8(pH9KFuN6)j`6AFt_X&y@LS8pYawCxeUF zXnm(bWB;f;5-|tn#H(uGN4}8yC&!L%QHSsZIN5AvMT!5jz<@hc~r(wiIZfz zePbNnV;gtE<*4FFvL-7ZT}Ygilo9!jErfBi0H0EL#*jOZYy`5JTz}p?Rzla%Ue}&t z7meZ=YpcR(Q5Qw; zqIJN2U1n4EH*BuN$>d;Q~<9^PC!Lw96~s)O0<2J=(Q(|H$770rbw74+4ZAZnzL zOl}qHo6Fr*so=M4dMTXN_R9zq=2DC6k~Qg54FGeD7iSKUusi9YG4bI$u9TgK1)Yyc zBMZlC-ZxLjJDp+m>tO*8AUxD`)k#7lcct48%_eN*mh3_Mz8j;u&RaQ~3UE1OGPyd{Se7Y8Q=47h^apVTVrn z9;L0NeMZN)$0%^lxn9U=(y~Ny(m>0v=_ko)i|B^PBY_VA_rPAanhr7UN@*3>25gAA z(e>}!UP40s^i^>T?x9ozUO`>4h6e@rqpJ1dbq}7%Oe`}KrD$EF+pmko<8qupOazsAQ|`BRj1J_wq@N-=r83CZ)U#WhiSmQnQ%qi z7dF5#*2ev{p5XHc0e<^%L?o@;dA+%`02EzRY#?RLHjPCMEn-p<|F2&p%@~JYa%jH^Izu+XQIN;bGfxQnhUtp1!v$C4e30#q ztxTbMpU#l_-#M9Vh?ti+BCHp559W0nRBS#F#w1qe6b96(bd9hbaA;@=4K-*IC*}4j*Fp);tW0 zu1fSJD38E03>xr2L_amoK3PxfNE`DESa?$PTu%#cB9H0wf#h$2B4~I@xumu zRyRCr)97~KbdG^5X{{2_&*M2(Qw%6=|qQ*wanZ1!7Lb1q}3)G~Du-BK^aF{T0 zoq=P&B*!Ls+tfajsyPm!oRsqV!z0zOIu1&iJ!f+lc()O~a^Z4gz8_Dw@nqeY_1NLP zrA*O_es9uV)2lQbj}tr26N>u{Jl;lKMAE{cs7` zn3C)3*o11FZ>yS!HyqnF1=Y-P3)ny)k8(U4y#?r2A=7w$tp=?2p^L(j7eN{z(;TYX zkW~~l!63Gv*Xm8CECO@`zO=PHw*8oKs-tAPza3+CPdd8rL69WR45_C)mC4$y&9cXl zZ(lo*92>K$(i!XDhe-%}7^8Jt#b66{EC^nBA{Ho3eX^ybm+g#w#uqaM6983hPmnF@ zjpEhbmm$y@6PQoL<|51*@EWR3-7Vtb)-jupVO7Ja48NRCgPH)H_LWoz$<^bbZauO!4CZ8XFht}^*1P*!3)D2(jV>{ z`~@5r@kNttDMRv8)Ezk;o*Amdy3ENg;VcL9KRGcdU99WF>kAvbxqN(_RTZ;By}eZQr3W60KQj-1eBt{gY(RZsk!FWeM)>{T{h2aX#ANq7$bl$l|MFHR6Kp{|ZY!*W-9ftaln z42+nVe?OEmW>*F=>s%kVZhBaoMaX+vi4%4Q5mYrH&E$4T&Ve^ydRFAbR?dkJpcYc( z0jrxuJ!L%=o4ZE^vbx1`gI(KY-&VzDA%?Hwv|PlRV+Y=*dut*|@{BymIjCwtV8AX2 z;|u`^b!uOd{BeHV_Fw*CRoPN6o${R|dS5W}lJD(iHW$8I_q`dv%I1keVOhrTw6%Q6 zwQe?bJDKd~DCf~#<~$0)cg178{=iq~B1|o}5W1zv5kFEdAz*A}vM_617r^Z}FRZ;w z71Ua0Eqj&o<(hK}n#xUZF~{ZQZt1K54jvUX^S8@b`-K5q$$4&)*TB(@yrtziqI z53)%lL0-3P(%N{}VeIDoKwc$WekdN*$K0!2sd9=LBC%-p}32x93UU%^QxItxE zIpc8AfACfoRFx!)M<))vpJsa;I-;LRNeHIuKkxhBEc|iSMYrD1NOEeLU4zk>m;fG2 z_S@ZY7LnzUkR&^W8aNowQ*`sxabF57?((a7gx8_0jN`o{V^(lk+Ff2VtL)8Mg>mck8O}t z&)u`JJqF=ybV#> z!XQxHRnB@pyjASDH*}f(`wzEuNf9$^LqN9M_W64!bx|C`1p@Q6<1)CTYt7;h27GGa zplx|XZrzP)uy)RgY5f~Tsj75LY0(vR0;)JGq4%xJX0Gbq`94z0f8ZE2SEvf zgT*G= zL0-9EnWHIg>nCD0$EhK(Tb~54m4;AjS7K?_Sh>4V?%#|5&vh z05WRv?$B7Y8_H~LN@%jNOLPyi@C@v#d54>O-gbY`sGgQs>^TP*G(VC!c{;g*S5iIGq^F2S@kZI5=B!!^^&Pj{v9IYuDHe=Cw`Rmu86m zR*Acj{m2sAFGDDg7&klPeOWUn4uj(MwFi?xR+@rrMN2_)<4l+0I9N^Z#qMWxQ0vA# z4RMy-7o_dG>1EsE0H0~C$jd@B2dK3go|4YeH}U1Aan?5=!NOnFLHI2*E}YlHwo zCp4IEJLbGHb16e>ld;ca%)5dP{+HqNV zI|{((WOGWlEelse!{5cUO%N7~#{!LO1@SR36xw!pOBmLQT@$~dlOxepC|$4T<8)6b z$f~L9Hj1x>)QMB1?^T+=cP4{wN&!z)tpT=7r{G{LgG{rvoQahG#+4M?LJ~Jb|ATzbFbN zA~jA7c$8oX{MHj}_Rc%s?A}Jc*}~f$!B@D=2WwNxzV{@h9LlG}G`L|QEVFUq=*a^C zY7YzA>=BnnCxJB-Ty7|D9e~<}%>Z@|8WJ?(e#l=WNHg^faR}?5^&`hOn*b|6_%(wQ zAjrd|DmFqXC)H=UkfM7Pc%Un2ib09X@e-{#a#M!VhiD=6*T9O`NQCS$W1h8!y&5gE zp_@c;H6VAQ2ViOF?vnLE*psS_XRtwn76@eogdlG|yGkO{UZsS+LE-WVhRw?i&mXn@?j0 zb1lLz5`$Cv%KdM^ZM>F=ok>TjIw>vzVBavx21tid&wDhO_JGK9N*ti;oVgf+2@)+; zY96?ai*`w@5LfLj0p${vPn2TWk57!x_U_L;mscFIXIA2dDO)3>JzhC$Nk`K^Z)*b$ znnqL^K9TSbNR5jPw;epM;9|u|_Xsa_bD5bSZonN<;^O!NAfQ!F6GT^asT$>UV?3qJ zfeQjgLq3_?ZbGFKn7ikf@r)q1WH1Ew*i?eT6hbQ3QyR>Sf(|N;5yaq zy5A$5J%t6AUpQ*&|D1Coz_LPWE5n5voeF!r2aY6N#~eY(a;SjS9Of`S&*DQ0WL^O} z6`|R9wUOneH2k}h*B?Ax3uija*|e_gi+%rcfa1x|W|d0RX5cRTC-+za2?lrtJ^n56 z(jG;Ie)MbNmHL3X9x(Aj?$sZkjrHZp-hs-GZo-0|v58=dRI*t~J$9tn-%w@)z3kj?Ptn*4l`dyk!=sGy5f9aZ61!3=Mpum zn*_IG3sQ4pW&K;cW)48+1MjQ9p4-u-#v(Kx9XomGq|bcvZMKr@F031>(!6nRBb4ef z9fVGU<&6)#3ai7p@F-Ak--)j>GhmnC9F~D-m<0Zm>QW1eNq*yZ0k^ZR?cmAGbyf|Jrk?&6@E4?^yXw*d zHBaAGfDxGZYnO!f<_F=3Eq zB#x;aM0t-VX#LDR7L`=+%BA>?%5D8uZ{i(Uv1k|N;$W}y3!)i{iLOf^e-c3_sex}S zuJKG}@CF8^*2dYX^~2I-)VKA*D*t<%-Tx?dxHoj&-gY5|th&KKuFDmO+v2J=Lz{=p z&&LHJ&2zKG6)ihiRV6jI49$PjDG%MEf0wt|&bjA{8#L#N3DPw)3lq366A;|#aDyQ4 zyvf^pg1iht1=cN>0Kuwg_^w7UaiptgzE+I>WI}0|3jnZ0^HF#SP8#ZD zQ?<=8zjabvvklssn*xU2b!PnyIR|_~<}M+YHqO}CjY3yK#i~ZNvS}qM&1x$Mm(@uI zZdwUHVva9cam2@U)L%}J~|U!u#GOCY{*dS zQ*?XeNMDm(jqu_oa<==Ry`p_ko(tR)yVOAN{ATJ+W^54PWSJ};Owmr__hxryK2=rq z0~T1Y2DXZ6UFjWIWVz?Cc1zwrlel~@H*y=-jGL)2r`Ny~QP!aNR-NMB6|9+IyWo-mex01DVh6a1sy%9FFB_j8UOU>6{;rD*K({2yI z!bwyvHy(1jfl-|DnT?I|lO4^P>QBwlDRwSokXpqq;jo_ZmO!dnSUt3?G{M4Lio@s+ zF(=yd3rQo@BeP}Bq>L~_wD#tgD`y6S)x~hi$^lm58Hm6EnSryKAkKKyMhbw{;o#HR zUrC_=s;zf3(9WB)m(8f!fjjTJd)?YCsabbZ#W#!GX}RGWve&hx7fVed7nN)_d8<7) zigyG;QFrX6Tq!>u3h3>2J+hV_U7NQ1WpOnGj6+qQffZqDJ#s?QI|T%zBYm1M7NL?$em9 zWeTnntT8UuX|ePIp}c`$;m-0rVdP?WxBAXERjqwb2*1Bb4Qad#&}`T2e`a%gKL-HbdI)|CMaTX~mTDW`k=x@T+bX>&>{uEs)Uy(xs;3rwReB1oddXXR zuvr0rOhnzOtiUmwL$_gvvD>J<-4W|=bL{1HAaDG|>dn63V#xxc2-sv1Bo1d@6C314 z;<3wO*Kkk`xsl7&cz9HViN`_-KFZjr3sh1O19-GU(i+XgjEgjGn2yYz++BZVblT12 zj;9{+sl1@zQ1~s#3*ITmS$d07*naR0=4v18Bmln+G@u zq>5WHr{vy$F)z6o<(n#ZL1J}GHX;=+b_+nIFN9lZcvp*wp!e3lnUFNI#H|~0#3vh3 zx(AbHsM3jD!yYTI^qj?fq`=_;3iTjUJ!TmUCy>huMG`u0D2V}^of@bWySuqWPQ~J{ z;~TUwC+Tjs7p3?GHQ!@IRc6f+84?1{jU=fLj-KqRADb3{A9~K$!YDkxZ|SqOwkIPD zPDQeU(#)p`_R87fC^@99Cs@n%u?qlFK&`)3n6c<=(YSDbB@S5Blau5A&uMkKzQ)}% zHrYzz@y}Fn>rW(gp9iRF==CA07?jn-Xuo)GBE=Qu!NLW2nk!m_92Z%feKxeXqn! zwKa1c`qEO3z~uE~cjJ)leOk7(<)6Y<8gY_J^?4{kT{Xqe)P1KfzHDJ*)zPssS^}o| z%pA8{sH!6ma0Z7u<09T|d`-}q3ZRi+7?h{_Hu2sqhd$FB7ZxFyB(H! zpi;~*#Rg|siR#8sd{4Hr6UM!c8I(~hxqUw|ns%~yw6@g?2)YjK#vu%F$p?tbO#&utcmC3BQ1! zoiHft`L<=ZZ@>B7zme892@%}t&JQ|Lz5`HVYdpG#)-rKyvWxl#zDQH(av56 zB2ly3tJrCq_!IZA(vBbUX_1N|FDGLY?v{0+A?dGibB(_+Pn-hK8nK~wB+qyZinF0V+1Spk#I>93o0ur1 z3)N5)?X0h%wh*ux<@O-$*u=u~WHxtzR=bgq>aXwun5o&7O>pW^*xaoipU^01A;3yr z?_e-8$4!VZSP4UD4!dxU+t|A-MPwDuj956E8i1hcxl{Avma0l^zRXp*<#35^k~(R` zxM_r~p>+N>xa}bz(_m;$2c|~&6CL_crFKx2prDwP#)yvyqyuw1eB~+XVO2XnFkQ?1 z2z;(Ix$t0#Oi*?_33M5k3FzxRX2Wa*@Yi@D3Z3cW4x!+dY*1?9X1?I)Oh5^#=C;`b zN*YfGsJX*uNNC&U+NAXzxtt1idDNH9u;&=gl%+W{F14`G-^qSIU9)B<1~Lo~u-piI zWDvld9FspiQ7B8=Op$xdZ>c-{B`gp813~>0?j~pzo1OJ4-(Kf8KCrBv;x;xFZ~)$< zi0?(;!3lyN$I(<;o_~G?p*+w^j$=mRrP6|ZXjvMzhO}Vx&|ZVEx902IYsxKcy5a~s>m%2hMy<~bbyq# zMT4I|2@%L`Y>53?bNU+`S3j8dY)j2b&jUEkC|n~>f~v`mO&{=^9EdM6iv=pe ztb640!a{DCEd)L0GQ;6+Ud~u)BvCTkls*gz>wLXPi#Gun%w^Z;DuZ8Ka3Q{}ov_QUcr6_x=o7AcGPQbV_3#aJgykXfjY zF@tyL+(HZiocm$A+)RMa%Qd9#QHglrYzF7dY}x>iiK*7OmVCg_T*?2C7~3*OKeq@w z)*+kxZZfaq_3m(YORn+Mk{l=?&6f~BEu7@CCDCjO8vgd-1LGp;{%wAxBP$KY5vKGx9+#x zr_32mYQ>7es6W>=&5b_x&g^OsU>&pRjzmr9=fD7*d0nf?kp0@^{&G>P3BiUMvBkHi ziPC@Hn=}vZty{4JWL3AnE3Mx=e3rh;B6rwR4)RL=zxa^cQf1@?d|?6W_1mRZGq@4l zq_UC(Jv2)2GjhRKR^vKVqy6XuDe2uZJPC*(_Lo{+C2kiW6Z+5;5ABD0;F|P0NpRPW)f9Vd+4k~mC|H% zQhV*BaSY_93q{;Yh*-HHRw9Mu29jnd#pgBzx-f63TsEVH1+7&)-O zq;bo}7Mr7XVIm-Fmw%TcL{Z6m_u{HG z=gU#Ej_L740;~@#UT5Wjs~dL}U8OJL@XpWhVvhCaW`;&n{TMUG-c;Fw+Cku=C)S89qZ%uG4W5o7u`8Uv4)*q=i(I z5?*@}x(mXHm{M_0%0pg*RoDBPAedowsdVO~ptmH2S1XyWUqtbI* zYZVPX9r4ogerBN8R%w^OerCpfZzg@uN*rNoD&f1-e;hYzu)K!@O?RJjQVfySR+(;% zgGt6m?)zmeaZm_!*#rrQ-f_}Ry7|t~V-^VE07Olxq;gW5RfR*BPP{X^Bmd3Y?#?0GDpQK26_uTB3>g43`G1R)`ig?%QL;RwoGO<_4MfvsJ!i zTU-GIgD9pITbMANsrWg%FA|V9%uPca^OW~ADBFgTb_u4a~S^i6I%d1>1q>oya= zFU^i=wl$0h)t3Km7?CMGvmVPeB9m~MXgM=H0LFD!(IafE8#+!4CmgH!VhNI+jWT<` zF*nL-E-h{DRq~sjl?R0Jz1gKWYU7<^)ryk6mHkhhFn-5KFpkuTWt82|odsfqSlN&X zr+uZO+xOf3W>%kll=M~Y0NWkt+zcdgKHW*8zyq)zos)UE;r%IaFzJJB9^WfGW)N=Q zQ{w^GI1&2y%+QNDJn!!es_L9$pzXSu%yadN7iE)~W<-!Hies!r@a~-b^4x$wu`bjV zm_KeK{{ZaT-ESy|oWad?&0@kl|rfv=&TyORR`eTxFT9-s#XJbT>c*L%2_4=X5uPbpY%(LGZ zdmZ8r@lk8)EK`xaP@Y`0)$0*lSY|IJ5pK|H%lUJ zy+(4XvsDQ+KcPvE!73ulmG%T^t>jvVJGUqE+pSIEW};nEKX>bEhI`s^OjiT>%K_3d zgvsvE_>wClV`9BML+%>~JFRPQrLg&}G1Z`SC^1aHgCtCNIb4FMZAt@L6&l=NYOjFw zhhRK)9`LFe31Bu;aAAaEFs?COrhSig44GZdSwhRCe3Y;y1ILpBlwgUqc8f1I zDPsxq52fjFEaT9Zja1B7Y$D1zj180>2dqc&7bn$fryc<$Y#2A_+UqV9zgWY6ugyJZ zKbar&PRilMO;n<{JJXX^q#KB)=`8q!+Db@q(XS0>t`KMJ_2~O0NP3I)ac;|LUg@B& zjwsu5Lyi2=a-~(Y=Q0VdylI!j{Dr7n39-<6?dmTqe%` zWi*9P^!ejsj8#Vs*TGsJe=1bJ29+;X4s)wG9scro(Uygxnm1Z)J!C{&mv|@<1iw* zfIaiK&c%DJy916Apcbxj7TZGys@Yw{y%mIUcd!>&jCk5mez}UF`Vi=5NWi_(${-4A z`<2%=1+)R=z2RV`K;$?G)1DA8qC45DJ_(e<>Y9tS1 zD4frWHUe?wYllhl1cHe>x@$`)+5IQy1*-UzU@i#Vf8!w%ksC>@J0~sAJ!;p5u4DiU z8AfSxq0tOb%^D@()kbDZ2L51*95if5W%NRZl>%waTVW>EVLrtb#gOw$DG}EhW_GV2 z)YCXlx<(4rRp%W0+KA9_N8Oq(KtMk zwvxnipk`UxBJSzX`rGSYwn|6^&t^Idq+u zq++9I#)PBcx@-;U7b4)4Z3t0Mfj#F~@!+ln-gxx5%v92bd7c?tL{T$h1M z{D5d`wX7GeD$Ja)bws%_9a>J09)~TV0L=)MyIde;jYYn?=1^WfCJ4Fz6+7(OnmCCa zmjD1-cY+Vt!S^j`zz4zpZm5^*%_ya87f)}pMEv1m5UWe_%vlOOKpryq&LMrSSz;0& z&~lnK+5Woi0jli|_%ojOGw~+OK7YZrzHypM@rU-5Lb65ICLkQwfU zg6}+lQLfsL+7QG66DjwW5d}T%i;4#{ZKV!j_%yV7hrIwwq?)9Cj z>U6Y^(rO>K+#VBM9fae>TZh7Gl$EK)?vyE43yImg|CCo2Z48zM-ej*M&tABC-7%Nm zR8zxZ!H}T1xzt%KV$A!!Wh}4d-RfvftV(;%s?k|=a`guOx=TI!U{;k52Ib~qaovDW z#m1SV%*b5nv^U`8MA6)Ckw}IT2@lQnefnW5n#{(!Ye+Hq1v(|jFUn-{IhlW@>N)4M zv7_SSm{yvQIApbvvLNAjbvX%`CumL8uKrE-8`JODrCQE?0_RB?k7~#?7zcU_o<= zeK~BW3gn_t07K85nPNL?5hdw8#X6P^EhW3DDGxWv?jq8`!q{tH3XjGii0zU9>44@T z{ShF3m+k5%`vCL76roNrXqc6@k|-GnTXgrOyu~*9QXS?M(lT?2^5jf|dgZ}G*a{0F zL5UC1MAkv!xTnja6z?vB1MLpLc01BabsUh*Orvx}fX_e=qxEX-3w;v2+db5pTHof~ zL*J3d#)m)xn}zX4qFQ6aFHFLIRRRLYoho)N-Co^W8W&o_WUFH?qq}^VYl*m!+}0o0 zm!hJbSY@Q)W|*7pC~eBx`=xk~1nGW=LHJM#DesM~N!-R%b*)!6fp_n~8O85sY+gi< z|4>N$yXsE(*_JrqaGUun`b?5Fl(UU&+7;Y)gY~EFgICw80hp6U-r!D`HWIe)tPMcd z#yPJ<{Nfa|MY}kVFhpyMg`AK2-6!5rdu#Tkv+Y+BDYIItnM2zKh+3hCcma`>SCA=| z+6G^~z*bmUfL=Eq%$})*4t_98;)seWKd@)#LONX+L5lT5{$U#{0OmGgF82W)s8c~`)}tEGpe^q785>r6F#@-<6^h`@iSUXK0qA)9)$w;^^+Tx> z0Ghv15qvuUHs2d_7%Nm4(|T0{#f{3o)EjX*oqNrF~tp zA7Sxa`dVjA9bUR;RRZd|eVA_Y)T^Atg-w4Tp;quBxOOKyb|y(NV~D&ieuv4`U76+z z!fFgwwT?ufngg~3SZi{RR`yD9yGpdf$K9)Ys&yFQ=XWA`H-3;CNDlV}y;CXrTA_vY z$mS7)dRK@QbvZXJbT@c^yWM-YE2k@WZ<9*vPLnylg(k*L7LJopSGPx0(lLtbNnl5_ zN4DER2I-+Lmgj?(h?-w^*KRg8kuwyvzX`d@zWdd zTUGCPW(5UDI-hBbEpnu*3my4xr|T|{m|8V%a;b()0Mi2_eJAW$k_k)P?6VaW((cZj zAcr1{#WI>ux>lacZ*R-!?~N%4O)2}-&G~PTu^$ya70|j=!B|1tViVsBz(~(ZS!@I< z)*wbjR1MnrLb-@V(DyNcAoE|pXw$NR@QHnkaS5yLQAD|pftOK!F1I5%;#?QLo8Z}8 zT{oFT{7ypQ)}#f;1pszGs939SG#mZjd&llU&db2mM)x>Y^VLQGvH0ugNuYhy)-rg$ z?_*(MoCgctiRdFr-4y{-X$Rj(eTY8Wy)qFiIh7pjP3ps^Ndxu%X%Jy!yDvraTW9GC~(0SdOn&fD zB;H|Shb_n@jeE)i*GerDEd4Y>F&OUoSsL|#Z4oJ|tNsB4Rwf&yP*)KDC4EG({#*{D zL1ajMs{&ILX8dujf^L%!#S3bGk*scMX%!e#`#rQUm}Oy#n1jrIT8=C2JOPe8Cq<{o za}M0;)@4lqxHDG~$$jmd6YKho9w;{!O_pL}VXIbc%tDARaW)EZm@f~kCZ48F_8<#2 zkeE6EH?39Z;^Y}fPFX8|Tu(sNNl&3Ox2c6R|JeH2yCfjNk{LO~tU`&eG^-3t1QIrO z!#LvB5@~WvBWpd9Y_Z|f_7#`MOLb}w*6?x@6(K5~n17oJA(-iwu1G7V@qGtu=0(@d zBB@jxA^H1EhAgQ0D8+TIi-@uQEC0%*UB7$Y=d{$dXePr7wFjS`!u!r z{Dd+zzhP~ErH^>^8q&Ssp5`z`ldA#;6q&QFahxD@+pSLiRZ8 zoUdJrJ&ISe*5?lTNDC~Ni-I6)eALBaZNm!4nuaBP?Rd>qNA6SKjxp7!Y~_L;GqxzY zpEeep#k=B<)hkSgnn;kEX`o`-vx4mgjsAmMCcqHFN7zb-s+-Tl+NkA8H=2wySSx&Y z>{T#_fgt@rZm}*L7gU#smOXdbq?B~Rs~A9>5q2eWXLVlNN`ltAvAhmm8wA=j3b`VMZrQ!z)p3YyOBz;lADWR3I7el$7!$V9jko$ha@VE}<3n@E z-LH&lb+=<8F(=uvNEm=t+pznbW}Xm1lBaWY-YW#wq_IM*_g;e%x}Q&Tnv~kQAzG&C zk`BA}XFXJ|{Q0GoPb|2GP^{ADMdX~Gs+ZiiY8$9$-Hb~WR=`xd-JKcPYu?u!we{x5 zZenIPU#BatbuJcV+E+;;EDSDn+9XCg$6n2xY8%nML8Tm(oI+^mV#J9E_ zHT`$#F9=+;56r-tt89+qA9PNYvHco<-(Em+#@jsL924s-Q!z zAxZpDfAt^nm@qG^15EX}!YdF^RgXhm6wnX4(e9yfbNK18<5Y{KM#v#wXZd|H0F{?S zW>T97F&1;-R)8M06l}>{~HAmHrai_vWzS?Y$Gi!^5cVeKY z4R8M<+FVrvNRgQpcs250#b)|_*0ze1l!DB)asG+Ut;9!5I6zN8s-MBw-xRV-g6vTi z&3U`5efPve1#U(KBA)yCL@X29h5_jjYT`--IH3zHj$ES2)KOaT>>cbQZJCt-I{*n= zfRLutyI2cH7k%S$c>5ebd5^Vt#OCHYPc1G6RG7w8$iTWf%*JN9%K-}PTg!R<>Ee5z z!?Fq9NMQ7@n_;CsFzs{lPd{*c9cSK9P65QLzgsI~pI+_<=nwnQIB?o)E@^hZdoS~e zX8>=?BHcU~GJIo3yRdkHM_i_RC*bxYvPY@=FzXf9_pEjF3(M6bWLr-`LbR@ITnw?& zTR}^H7GRMmIW1Vk;ZL$UVzoHA`e{7kJg4DIgwvWZ6`OaFRXk}$_wAn`eQW4=Aa-e1 z41x5!OkRTe(tJo(7JktQSp&WA1`W}Ymm16`6E|~6cb(dRU(&EungLhQ?mZu@Vsz~0 z5H+l@Df*_m9jH~}W(y1VzWNiQdAOJ~3K~z{x(js^_vd&mb-HA2sN96XO ziOZK>HZSQ-nWo6DTt^YZuj!Vhy6$)LV~ezyU7L_u`-7!5K5UyuurY@=+#i0}2YHuXmRNYBrIgQl#^K?#|+VQ+}`t=y2L2a3E^(&HSvD_>b{}e_vFhI zT@!EGR#NqYpzuTyKHK?_fsz3vTj`dxANa|!*fdO15RuY{vDF%8riC!~dKbf_@YRcC z=xvX5DF6RB!qqz*d)T9%jBST$gyrSxX#r)T*IPl&8;fUHI#gQKg;v*4?q;@b^!1k}Sy z6%fK;V6G_NS*z``zMLek4b|Ejf?ZM926(9JWX(BP}#ZDQdJm#0yz$M8H_1zUVy>+aUP zM7Y@}#0rzGGrVk7;9(rD{Q);z*vR~Is8#_L3C_fVTrv|NRRzq8y7<~s)0FTiStExM z9`c86+y}RM+<_A+=#~DGYm7-YPlNm*oHmd8gXy8VEYM{j%(xPmC0Mgjt)3-Y5gK|; z+H8{QusOm5s>v^(y2ZdIPn?yq9>s_TmxceFC#cH&T`Y9!?8u^kgUy!a0i8QEDOn)Y zK7oezg=%*gVE?%XjaK$k)c_@4ip8hb<@Gk@OHs6|0tr)9x`uBxruLDPn?76E+&vWL z#i*)TayoXTX9se+^^rGSe5@-)iIi2xDBo;;jc8g~C@c4YscM{9T=3;nI^&V?0IEx8 zrch{|0sq72@cr*182g9`M1TtgaakRdTF$7$rpU0azol363Wq6%QX)b-S4%b^?r89*b^<@KqP^gw_naEkMun z_nuQu0CZ1PxwfOq!vM&?nD}m1>G?bEpIX4594@t+Ma-nLjcecQ0{`AEf>h%~Ll$v_ zvyGweKuNDVwmQ^1Dsfopug6D`fNAh5oJfaqaF(>}>?&j2N`y+!@JMF^TBz6h&amj_ z4!6Qq8~K;(i_EZcA@(vBLk`TWP?%)Jk07GQ-iWjO($;4fSzWl@T@o_B&FToGP21|k z4sMw;2%tGfKA0Ntb!(C%HfQiO&!oiuk2T|Po0AYggymLYo_N_*<6fBc6TmZ9zOUb~ z4V%ONb?W{-1>O>wp%9WYMk}VvN1=V5gatnl$VZz5aqpGByU>aqjg**sy5Ar>7#Hh1 zf?p3eKv<7h_BH#7>DK^m+$efKw?5X97&w@B_zXT+|=ViWx(YpQ*!24Hs;<&Cjz zOZI7l+{=25dRT?dy{vyR$pc^oD3(iR_a@4`^t3mVYi$ee#^dbF22uFomTi`D9xIHH z6X+6o=WYxzWCL63VGC+;+DLXbZSQz6>Zj)&Evx`oPi+GOn15L?1af=%lWSO(q~KIj zG5QE1P94L281-gHZrF-N``2E@>+te2Dvw%Ph&MK4lhN1AENbu$?P20Bxd_x@vaaM{ zVYT>`v(d>c7^XH!=v;T2m`e5oD({i=U@ zKE4R+Zv5h}Z4Ac|vJJ7(3gMW3Ls*b!Q|Y(Gx!ZlQvoA5Xge|WJH=x6Mt=J}#)TrF{ zQtOg(V_f|-=rOl9KWVNmN6m;czteg0)?WCdZq_FOTXtYpagV(K_2cN0wYvV0U)FLI zSy7iVWuIvxs2FiS>l$}ndwsVbuSEt z0vJ~>5VjzAC23fH`cN}yrcM(mLvc_16uWRThDHnJvJtAy7E}K?$I0rMdp!Qz}F1)MOI9d_=UPV#pmEc$ZO^6?MqIq&(~oD$W61vd(Ht zY$lfEqb**GZV~S0Uj&cH`i3>K%55YPaMW-K(@h7E?a5?H9>d3qPZB1U!$nP$I5qcg zs~rG?MNIMc>(zvmQTKF=Xeh zLUMfkeacj#ado(zxC9LU)tDAg1Bb!{($(ULo7!@$BPKhirBAfm=!3jJIPKbo;QOx` zGypsiW|c~UrmnB3&hWGpT~ITrMPCET>o1sr(F~$VI?~Z@Mf75ixf*GWH;|pYq^=my zLp``UAdsG7&P=2C($*^L*ZwGSj8(-D3Yzy*+Kbd15LHEtBpygka0D6Yq z?RSk3Nh12xKsNNOA%_Pe9TO?ha9QnI#Q8tq#Pn`-5n19kRqSM)9#^o0VfWq4_PI3s zSymjF9bEQx8(+Z#g&olOFlwH#SYp*{SaH1PXewQsC&_N_XC&4TI}D&o2TQ#kfq1K{ z-t!M!Yw0<~@(}n(FTgmm zZY$B`E)4?YsLy{V3^Jn8loh;imzw7ejWslKTZ@JS;KK#<-2+bm zPO*>c0JzVitTH#cM&=X?*sB6f`Vq2Bk}w> zY5Ph|&o8ui=FLLFNX*^IwQq8~yA9r4nBe$`*pLDl1&+vW#-%z52(p6^S- zjjirNGQ73aI?izVk0%`x{#&Lv)nP$>Rn9$JWUmt|Ci1)BcuFBHWt=%bt6_5gG2QYC zfYPTE21Bl;%jXcXCd~y7CrQb_MjT=0L=S40*_)yr4bDlSX^JbX$x~njDviKl;z1A_ zpxn#N6tncP5&Z%pp5|#nPifpg@kmC4=@$`ehg#dpmPK{JUK7G^6@Yq|6MyNV$b;` zT=Vvk5n&E#umxuTb8PNtKxg{F@^?K>qM?5JigOa~fsQ4IW3a94J^QyXnk7@m=y3^l ziKOBNSe5`)&jy7NY2G?J50QCszx8G2^6X1HH;Fs#>09Cu6c9EPI2{ftwL zEawp4@7G0E9J#}Q$E^lGSP6J5pm+RS?N(RMoFnjCRY|;sZArUk zwDLYZ)l`9nzKl_-^3ZkY0$oyfhEJr)KSau9B!uflX>e0Kju5sWfRBm6`UD?z^Ahh5 zQ9b^=vO@oJOuq(RNQ|q@P#P5CuoAPFNFO%?&75n!7(7>nYnmudzqAiC@W=0Y-sfhC zv+6UEN9s@Bs+;;`EQ{#(`Zg0Y5(Qej>tEx|)2(G9s~U?QCU39bAvlgtsMc)JOOSz6 z;5>F?|Nd)*vbLp}lpL&KPoppL2rg@$SZi~zGsxgABppo@l`383V|~Prj-a`oewJ!E zK?~`qju~lsYM3DM&4k#jGYmpLI{#+y4&h`BfJn|q&zEg;mNt%PDLl+b1`P-M5#hFy zXk*iUlW(2yG(gAUB{)wxRj(GBBQ4VlO>t!PRvOkeNk5a8z$`_E@U$9QH(*YU$Bd8L zI}R{WuKGaDh#!axOw}B7W;Lv2IoerHmJ`mWB(K3kd_NAsM@bgBXnPISVC(ZcL5+}; zIZJ>qY^&v8H3gc=IRBnF|9f&E$k|!zFp3b(Qz!hN3W`|G4#FqIB^VeT@v&OTiU#*C zSA{BKM$#^iSIUSF!(&HUnrcK^HGWuiGJ0Wfz`GVm^*V3rgK+NB zpcPEkG;$Et7%@e|DfD|ZH_hUwe#Svm1r$5I)@Q`G>wu=@+8K!^bw(!i@K&%OG6U{< zh;d_zgNXnAJ)r#fsP|S1+mmPAgUck+-Y8k^KZH*Pizk&Ma7l3Jo!Z6}gh%?u@%326 zLF)%TBU+_5)_~MrD_OPf%$<-8po8bw4F{8u3!v-AfC8$pFnHZh!evls z?GY`a+ev~PaJ-$)vbvPh7eNyt&idI(7$b2`Ex>4g6 z%vZo1&ZB)&qkscb$Lh<7pYUh#W~6!WlY-LlkSA>-h*WCol}Gb&qNC%h7yw5f2lA~5 z+gf_BwmNM-R|A044?}pmFhHT?P$pau7Smb$+5u#JKLKC%4m#&N>?`aCD@$BK-t~zD zu=^zv)65a4F0)wI!nZsLV=!)xK+qeAlm{P(>wRKJyEuoBa1Neg++!WY4zwA5V?Xr+ zSALjSk35lT4DJ?(K%SXzHc5;xl6?=}KjBJcSwTpcES7O9qain$hp-8=`{Q*f$@MM?NZZpzYUgbb_|@D5sqIM$tRb@87(t2hNE3+Ru8od1v&fd ziz(J4Dl2Sv42aef?x^9%+nY<;08#G@6+DrKj;6+e-|`S0gnkjpIiEmIk|#)oRSmHL z>h(TAx?_$;GufYnJUg2nIwbu4b*KFpD7%7nPqvgxFzGDkqtZSm(?cqQ-1#}GsTfDi zIYZ(+dxiW9>?6VT+yV9qx6bqL|3Gq%@a!WWz(*R$o9NRUUVmA;(t9rr2Dqio6p}cu z?G&vT1DxZs#N|Q*7G=ghbTOXS0X{`|5uV?ovhZ9-JBpN(;1|iFSI^9O_5q=NjN$tJ zg0}mDo^(?)W6LSQ+JqDvCUY#_sB^_vW>9ZEKgYoXg+vJZsgsMlWQ{M#{m1P}?-Cg3 zjv*=cV1D6-0f149n&i6YIj_opb<2qLpFNgu9#BM$_B#-gJ}2!k{>e*U-MkzrC%mwG zhI_xAsSN;};a2wQPSBd*_pq0Y7Pwl}*3+yAL8|AErug_gaaRVb<`FfWqrW-g7<)lC!AO@!cq8XWRmRA3W|~XR_`GxS2+OmV$QO z25gXMeriQ?#BP+Wmr8iGnYh`-=_c<$Y<+VIB4k=xTIAg1jQvIE^$d3t$Hix=SlBtSqc~kkD>Dx4%4Op;uo)@Z2V!WSxzyvNi z8F8F|=C!Gd4T~x5M4L*_N1hHfkGPzhRNfLI$g@dZ`E#OTV~z+u!|4RZ#XIOJ;B+mI zaixDu(Q;*^=yvt8PXmf4LumM7^8BvK-dWWga-SusY9Tz#ZqDZ}{P}S9dF1`Q5DV?& z@6O=5UZf0s>H8`^b{80|hn;Mr+ravdjJ;}cu~0k4Z#IXiV6;(>=e^~A`(FnGCPCc>i!e z5hb5-it8N`?t{!94m@NA$u?4A7d$5AzQ239^}?_v!8A!`^6=gl?&0m9^-)~8g$=@L zqiK8F%i1`rzo%3L=8tbC-|pvXS7&$Xm!jYE>gU#g-zsc8xuZoZmjPt4Eq{jIGY_O_ zkqRe)(P};?Q{b;R->4Q7d^}E4qbM=$AUrSYNKyLR@KwVhV9+#{xt`DNcP^6W;CTQD zhlKR-j$!eWT%W|G1O9xe?bCk4d6=J67lwEqQrZWk4uuTp6Tvx)hh7*6gGBg?FxTq( z-{!c+pLcpr0NsftGMVnk`HfS6vE@$<+g$&653t_@@bR2B$&#Cn;WC+-EBTO5Q(Q9^ zsrG4(tUXTb8H{k#h5n|8<<5ku>aM3Jwe6%^b}70iJWRjrS1(u$c;GcocS%q^vjm1r25Z3Ki=79o`fNO6Uf+0+X67sx%h?jLUG(D16Wn{AIOhi=a~B6 z1)<`7sz3))hiPr)s-~cf!kqFX=~4iBqKM1`%Quq1aY?D(-+vzlX}V6b|0HNazY)Tp zuUmdT9}mrV8qzYSgUpzW82N3{BM8qwF+SwX(<>~(&R_A#Cr^1UXY1KvD_}6oO@?mA zoli1H42s*>kZQasni(wLwGsp-^J#r!+0#5{U*z)>T8t9~J2--!L8Md>loL7VAou;9 z8%PHNMzzI7*9N3|WS%$Ug*YFCSay;^2juHwa$QtP(C4G)5p?j$A;fS79nC9X+>Uhj zHt`q_Ca=<$HTpEkF*rO~AA!#m8r8mr)#j`r2!`IzbtX%=6QnVKrC;XjQ!vlN^4AWR z#{ft<3%Ao78dJ&8jCG~HPesn%fFEC$YI;;x1p767mtxqWSU~w z#v)EjNIhB9wQ;42L7oP33a6gebm4N$7;^TYA8Sn>ta2W5+N+DqoyQFLvETQ% z+M0V^Y%utF-}by73X^q%*kY7BTWhS2zd6^JEl3+X{WvXZr-FR2bJA2WIyH-IxFP zjqE1eE9X>wx4<`tR_naXtiCOH2Ol3To}T?d}YX#_&3l744Xaz2h;60I}b*tApOUAQbEq3Hlcp2EG zMlk|e=XtBa+mWJ6;@G=o_7u6cTO$~C7ZwHvT;`bf66pD7$LtIt>?04A@!jhsi!qDQsR3VTE@1?xxq-eM87%(p!a*L^#M+(2a&~^&%I`w{lxV8;>mVsCA65+^2~McT*d{6lppks3R5ed^pM)Rs9B> z{?=A7nV7FzC%3hmoF<^ae2+SaQhQoD1Bv00Ry&jVc=CLe-HikRd2$liPeFqc7haDG z;to_t#4K_h&)4Qv3QV2Z5AB$gd0=g89uSmTlSjl)SS5-Ys~9RwmiJgyABrIA`0o3f z27huyAkN^i^ilgr{2VtW%YDr5gvmYjPQ1f%vCqyqd~z&YQS=~zefzdzMb0}8@T6QR z{=->dx!-f}d`&3LdWZ!9J=`b#=y-1Z$@&4!8H{Ey!!wptL6~#ay*bGhvcN}O>yV<8 zXN5BQi}@T_&oHxp%!=n>#V*gq9HP$BEoP|@===jp9vkNj$Wk^bgV^$jEseukdZ27I zMDmmH;7K=|YobWgA#ANCqb}W$V&e5tP0FkEBcL@k-ozU-dc4yu;{`ntVQ6vD0tccs zujk1G)aVX&Lsv?*a(f)Sumko;5i%j5Y60+YSLZ`X`*7uOv)4phyjp~q@SrOm@=2bS zO@(MyFZ-*&vu4vT)v*ERRv(x>ee&qeNK0>_2)a|6$K%^wiKLK6+qj=B#R3FfBb*r zms`DT@UNPs4_d8FGh^U9{RERu;zkbqnQijklB`b`8b|K4f4?Ly9zaDq7H;C)6j1z4 zS&%fZ2AmgTVkb|JsSwATL{tFW0xU8J1prTo9V^{asseE^n*pM~2MlF$6a2HWyFO>2 zLu__Sg{$!VpaDLNV-w~8ZjrNusaug<^W}B>J~2~P_b#78lW4z@^L(>UWU-cSXguCG zwvdOOM#9mYnF9_z$eh4L*#=MS^#7T>A6ANEwUS|+d&l?!KsJfIM~va<*%ls6a}X{j z{ev{9d70QSKebo^oL0{+guWIR=FkB41N5=CB$T>;Ln}L)Y)pM27sp*#$CQH5MY-w1{r#}Ky+Wos0zQoPVW^2dCT&BCU`Bt z{@rgpWdSP@)#l`&&R1|(elG$s7UwC++jUmtC;ED~Wo+lUFyuoJys=EeijyYss!agN z0=vNN&{S+V+_wvN$ie>Pp3Ld}v5Bd9{e+|$+8q^Q`zi7^;9s+Ooqj$>uiZD}=8vrt zUF+-XTYu_wFi?3NL>ilO>&g$_59#^2e>f3%;fzwIoIr^{Zz-X(>SRxoyqP zstHc~7gOF~%>YM0xW5ia87fw=&>6d)a)vQwrGxAKVsAJXm_J*Fv|hGRJ^Ni{4{%?l z(fwZTHL02V})tWTN_4)(D!iUWSHPYogThQutX9M@X3ijQF#-? z@mwO8AC9Q1l>q#ygz?`Q?gK@=e!vG7Kh0S|_uNU&VK2UOnBix@LmrXQm=QHiWANil z?oC~NAW!`-Sp~MAP^Gyw9;2y@Y#AmZo?D1;3!!&#&aDpJ)9%w5Kxo`OSHY1lQY&ak zJ12oh?TqzxMraR#nE}U6eNadQYXVNHi2~UbFyoh@%{+dGj!}^qM33rU&k5!TkGj49 zl(2(i6#6v>X))U#Kge8^a@>j`Dc0k%^9-_QiW`~&;6(~p+P$qrRG6g0cLbR?MZ3WJ3u z`xyv0fZLp!+pQ=aFT(-9(z+!O(nH;Pfd6Nfe>C6OhpBjH1 zXr^li^S&gVRII#_;~_F#Z?SlmdLH+Yxxn}=@W?G4d`xc@Ozd+GR4RL#gk5$25q1I)P&Cbi|W7{?mjquxa| z_K=w2O~XTs6x&!Wi_+p&B!1%^ob`jV@n}1K>3}-Y zkq62nmnnXUP=paM;c5R zrxaj;9{V3W?l557x9!F>5DP+4p4@NrmD$O4x7Qzr2yz^I6T$laUT469?U{2%s=S?e zR%tv%h^Cdm17WTf`*`jbUe3jU_ThvZ4hZg$nXsc0$a8070jzvZgm%C5swuvAcnt*^B)S?U{- zSiv1|44|=g()Q#8AJ+}yVf9Ol^r;kDGMGU{#kqdQ$G*;kK^FM~WB>H$_7BVa^b>ND zUkiJEG~*S4QkwK!njXUQ0(~&B0hJH2NX_Yd7{?D-TDM@9zaM zR-dFf2ZqJey!;E%6^?WBeP=yBmIJ_B+I5UqhNb<4ti8rVQh2O$SVCV>nI4K)nuhzc@lT*7 zuy}+gFtST)i(v9JD*XZVR7FOZ+hz1c!@SM-Rln0MLow@)B&Oqkwx%hEhil-h^3@K@ z2_IZ(m|pqEQ30-@x{9fkRr<+p_V#-|ztwT&OflqoGRMB4p+7+>c=nJCF9r01|#-{^KjJ)qDGB4#Hh0BxG@F`UpVisF^)V77?dOcyAN>}vyZ5yDS*gW*wr*M5uJyxJn%()KMx`zL;*&v(9*v`T+AMMf^BZTI3#bvjl8}LFSIp z1v@YIu-2YE3Zr6cHXF9HtcPt3g-*u>3*nr{VxB(bL@M81(T1<9rMmJvjz3rhg^z<=oc|3b(4NF5ch z>!GcZJilDJSSMyM&ia?&2W?<*k;H&lRP~ILmIHZwP&(xz@SU?XIYRs1qO-|Qog)eR z%$eu;|MK<7)JUjNVKTQ;d6S&JO~;r(n1HF{9bU%wX8<1Zv$pxMiWjQxs{>*|+-)hD z7yH5@zlbY97^*Z*4%+b_T6`AE|MB+=V#-LokGWdNyk)+)|X5$pUBv zDEE?q$f#@~{#oMacnh@wJ>c9d|Jgk)bFfdASXl$NuF$Fm$&UUY-3;9btWo_jQr{@x zXwA?|PV&TF%oy*yKfb)=g+Izac-=`H$P4X>6vG046K_m(oRhkNm{y86ocLl6Iqvh{ z8NMA}aX4z|4MT)_|HcO&%()YKg;t+mNHzUHX0mT47C3_(rFFncp1*3sj!2v9XfsGw z@x3vM1p*{@KxRqBmQh7-!)8{gJ~emxiMJfOurZ;$3Xx4#;P>*-R*dWYb8dLR z0qYX&3JL5X!u?kqv_SJ(qa}1EB1nRB?>zwvL>1hLQ<4L!gavj!;1SNQ z@%14OC-^b1gWR>N9iCZu5dR@QhyReDj<&vtW31bO_7J@kjH%xN$|@ujwO=aL|V5`(pt- zZFmq#S6`;nrThv=CChw|#%s^LNMDAQey|G7Q!<;$gnC$_o^Ts>owkKfUTKND-AEx8 z`dCbKk{r{pCk79uU^aK8igS9-8RtD1=I2R&_4%9(^JcHXaoRt8UK(I3BK)DGH7BJ9 z!yf-w9HIN}rajxYTEoIt*6mk`j=oDnSSO5iNaM7n@pGB_wMUaQj1`P^%@N{U%mX*< zRV`Dkm~g?gkJO+;%|NCR45eQXFPS_hnz`5K1HZ7>55?8&0B|*3sZX&_ts!QTD3Q`v zMwP%-GIOU!CE8e2-k-$xN_hC{WEtv%4LQDcyYroTTSkX+Z@4Be7(JrB{mkpj=0OUnN|{@f-4cn==EGXNWZ z^Cc%ta{xpVUcVv}YK}KqJL8PR<^*zLP}L8F$nu+$D6ZEr3h$FYM-frF#@&TASr&N1s|VhhNin*>zcms$`tHyG=#E%W|s$^C=7sS_koGf zb09AvTdn4t20!2&=&K)~V~{^H&-3t#nxx^;-c9WAbkbXt$}R|l?j!@DFP5ox*#9Ix zCOz9gQeH&9A>NxXHuo^oUfOT)YzeQ6lu9C@gi1U&f~d2=2OvDw9B8=<#1NKmpmn-W zXqHRBk!a=MCPazpys_w-?7lL0ZexymCq9XHbC`fIF3^jMd-wY5B)t5%%gcERslqm` zNC#cQZzDzY7;nH(|1tN+?n62m?1MMT584Rm&>@2tH2*+QPheN0(%%mHy6h=1xUX4P z!mqUPUqv{bnXo(zCXcTo=*2OZAc{iGit8qnO`S)&9Q9$oB&qZv5&PLZX{Oq|7pf#n*aumPW0^;?^k#2N)`oT-zo&$` z%p4G3M8T*A=O6FW$fsDek}@x~c%F!QlJfI@vTF@*Eh-7Ac`Y6$f5Hwx?hyE-PB6zf zB`F>M!U92FzQDYGU3LL<&$4YIxODwQ3qO^WWok`p z>VMoXAII-FQ2j$x27TX+2u-tqA3Wm%Wa|MpdR*{cj#LwOd?l8-?r=#zXZaIF=4*;- z=*F!K45u@;`eP)ph)BugxKfP^;R>X=mYlTXhpS4os!kbQ#UD1E9k!5}!`dXtc;{@qOrNV5HwXn_m2R(Efo_KFoY z-eEOmd+Jv6`L7HC#JHsq1v~h88jVf9w0Vm+XD1t3U8PPO47u|OYdf1|25Pmm>n{?X z_j_@Mv1F*Q@YeojcVGO`egi{19x^rUyl!OMWI}$VMevHX^C*rhvhkT7f$!n_xker&UQf!Xoo+Cyv!}t0totF~sJ7c8d)$FdG08)EU1WFaNHDlhzK$ub z!Lt~C!DZgs?#HEYBcRlUoX(8dn@P;cEVjSgHxlZ-29wv<^jdpJT#VHV9b(c&-@}!T z%SX-$_%?0%ho=MbqmtxpBFY(YaXDNV4|P9IgKx3)4L#WR3GdW!Hk1I(+v$j zOwx$m%t=pcymDTih`W105`7W0`p`+TxE=_3Hc8y34H)(3jQ>``!n;tV5Y&vz$C2&s)|i-sp4Bn^hRyxkMf9TEkDG+ zJM-D+Q7qR-e*ocl;o}Hje~^Z=HGGly&|6i9Gt~3-6W-lG2clDy5<=-E1a0R5b4sA) zna3+p4!Or#6nJ{BV{-l1wenb@Zp1s7Lz)9S*6Qy99tw01S?aeOeAErsq+ah7;U=RGmks3vQz##h=PvY*R_{o85DsnOFalH`S0)pm( zgrC=oMteAmU5p`Q3~m_1f*7BuI=Q2ce41mjLR8EWTJpFa6q&fFEL(jVt2Ud(AmH)F z)JU*acs7BgTf@fd2kJ-bfszH{(Ty09w_M^<%*}HFx?KRbMcZF& zoV2N#vzC{VUm9V8npj@mNF>Mp?l;yOuASUkD{~Wu{8U{C2eL%#xv>E^Ez->+XtGDF zN^xHqE>o`xa9d=PFD`F;>&t7!dnTk@B=W;c6#@C9+(ZU?PisBunqT*z`a4UQ1) zC#o7R5+}vQ@XyEMBu}FNNqVIIZK%~66x!-f>i{&JCfwNIb}0(Oed^|cBJX@{`Ia;M z@EpzoiJ8y&KdT&=nG<2n-C1dE1y5;l5PwL$>nMtGI0O&pk1Jct59iR;@~IR$SL5`- ze5vgZoKH8WHV>#huRI3{L;)`x)Awd=u;}f=_8`o4q>lq1X2tnW#>YVWUWTXEgxT_= zOerm&GFispr@AJ&$m~m|YcxzMutDO^oJcbmnPFG_D;W%`qc4e^<|O_-RuX{xJsPW!!=H8aoIThXI` z@`OUXf4(p6a0#f6w+c>hYY}hB4`80Mhx4S%omZMOB9@L=6P)&@R&{H?*$orb*NOtZ zqzCv)>+*+FU2D$*!ZKZ`Fydr-@eGB%H4+06>2~?l$M(+d?T1Id4acta0U0c`m=weu+lnIQpcwGt0vWo^KXEy@uo*L1B@5L9^6W zHT@zDXn=!Es#7S?6^v`1jbq^D31U6$aF*3ahI3pFxZ7kAT6Y6U_ypAJ%1h7$<;2)V zUNf2J6t89AJe-g8|ohl8-YCUCR@NqZ;dOC~AVNW3sK54-L%5cbzYKUm}=3);>SFhCaG|3O@ zI_+g3`9)FbR>6qx9$@0?bWOayNWhogNya(A^#M8E@71A}!N=$c$#~J9Kgsv!50O82!acL_U|+=Ml>LEbb;`u$ z)aL&4(?7w}n9RGmZ|ukm z!2Bq7hexxMz$pLofXF_jtK_vppAF_UB0X>hFSU=sba3F;sY_4me1-^M}ozN{33M zvyEc_7Tdkm0t9{fIBaY@p59wvND~l=a4v{s_UY@>f}NAV{^IT$(C@!3TMatrz=K_F z##3snY?bxEndd{D5J8=^omuwdfOKE6&Ck!|Ts4?pFyxov!f<9%@$g!; zXuDkr7%aCY(bf@idU$)hH)3mhJqjBHh$K%GM47^lgpYdX3{jV1;8EBtr}5cJ%) z@0^;KH1ISCT%AeW#5(7f=ADTTthgZ(JZ)(`08ImMcX>oCR)g85xBmglxjqds3muO3 zE)B6~T$m4vN6xDYPj$e})Rp{K62mj&v~@m5pmqN)SkHU_tJKe~fRp0w86?vj;D0&b z*RlGGb^Ca1CZkFch>Irs=p@l&C@fLrVxryhpm>j842LilurHUd&#!j*9qOKL)i=|- zXpYz4E2JbTy`BHI?Et<@89zchlS6ZZoTFvti?@g%$ux{5x{o(0TG6!P8VX$J9koNbg}|(q}$X;!0`WrtntzX1N3AR z(lg~@VE=udX=~^8hZp_CcD*N*c!bsNWbLQAa0YZ>(8C(3B)9;;`Q zwG0>;C}4YegxNolV#Tl~e(!O#TC-7l5=8o-Uq_!=(E-^YcRtu1YFCqS=twZ&(Om3L z(oERl$1Ndpgm7?5Y%tM$C_QsN0v;&z>JWF?MR$I!|JPFJY1>F$e>;$HYpo!T^WxQf zBt7tP0&$%1xvD%Hc&g(PXI-Q-+$RV5Cli?C1}o_{ok`?lULh4}m;xFeHz$Y0@6%jU z5lzlPRa7_2g$}T@gMoPkAK`U^e+Ga&X09d+40vwEn_C6Ppo+$_Z<{|G3+8$%z*Gb1wDP zi@8^q541t$P@OR&5`0*CC!LTZ%Yn+PX3#k~JRf0hD?rovd7wD_0-Rwz$qh!J9~v6V#Nn3f;m07Vy;iZr%h?8 z-=T^Qq0K}gd_Ndfq-*jwRZ+if0lQWN*emTxuFHRQpOApWA@xw_&Fbu5f&^HKzwbAf@4{+^ZVpYPe7*30yO{K6DN;$1snfUy3$} zI?wC*{>8euYzUh>`JrDaHY$-WTMHn)`qN5~|Jni>D(uWz8~(X&((N6-fGgG*0OI;b zm^f+E8t`Fu-^Ja(xRZ>OT}(tV)$DV({UO5Gy$*ok>*Je}%{)7u1xt%^1|>W=%D!7Q z_wI8`noryHtxY)R%|2gUrW!qB$)XcWJJj8N*OH+hcN)=9swO5GMffpjofW&o#S+Tv zD5k|VP16~Gzz1=IMc_C8;Je|hYk}+C;^9q4c9eT73pBFHGtHekqhXF<3$7=IHdk25 zwiFDJ>E1dgxvdv?`JC|1{)+Lx4)I*UrOE2*ny$#2b9F5JwEO@pndQ_cVA4%GEJ2*0 zbRPwGI>Z$K03ZNKL_t*gfPGRg)41u_p7)>d71!hFmf(<7iHD`wd24DrHbpU4&gali2ddv6Hv!)>(H$5&y3q=F*wi>zp>Rh zk2iy-trp~pyWBV+aq%yB%6oKLydTYBCJf9WA|+YHoWi+x*Ca%8z3n}a|nfJ6;i{0>nb2456w)*Op6|V0u?Babfe%T zLAa}UI5T|KV(HWXe!PEKOS&tG<}`BcD{0(v8NF1Lb2Ac}GW!9UU?CT7RvHle9K}u3 zdQf-^z}wrxtE(+zUOOK?#F-&yt8Ce1Kz< zTETcXFrfi4=ZKgWZ;<48eiO&Bhu}#sWVts$u1Wk@AQH`doeHI9Fz)fmSnycjoWJBF z0GT98k!r*9+NEURr6Q~gS!rpI?XPu(R$Mmqp(GliCk1^#a36V|xsU9=6A+CdSHfZU zdeg`I;ezY+8ZHAM2bi!h{BU)KAL%DZrJVM4Bbr6`%zVO;p6~9(=L>v@^+3-v&+|W$ z*~#sGg>$t3wqun`>U{Y9>A^gIOelB>?4!}M0!F<%sZo;2i_yCW1$d88B+u=M> zU#v_s0PrXa!~dTtSOk=gXP@Ib^SoXOGcssBo*L~%ontKJW9CZZCZS9PVDPF@q2ysc z1}7zvxGF|=Ipz_QQeB^BNwk)3!AqSI0Pz_~F-V_C8{b3&6@=y}LYC^5R+xPrBZ zER7ae+)LN42HS#v+pP^AX7pre8-P3<>7@e_6&RC2GNHS{ePs5c%M|}BS;aUIW;;{BuqapMM74A!=v9BdUcXE)9?SM?SPq-xr zvvr^l&d2zeY)Qey)HIXlPqI2*R!-3TamZ7i)6REgu&8TmdAWWx<54o$xrs=$+ZmC; zPA+rXa5iG`KCd5~UCe&YsvSta{zF{Z&J5=OZ8XQ9dSZ@}ku9&oJ_6)^d@9|2e+{9^QMrX`Mq_%^#`#9TIR0%--V;uMja> zNR|t4C_uJ&q^Mj7-vjBQa2ycx&V>}`EoV*coozfHBwiBnHy#+48O{`TSNub*o*fVV z$HRMP7|tKf;`tg+wQD?vp8qlJ4v1&wh?+SD*1Qk!&E1m8T)ml*sNmO~VRkwE=a>QE zFIe$cvq$A+zG5|gCCbKvK~9%FbIx69=e%?u26ZiQURC~jrZbUDV+5cH73KqN)l8I@ zZUrF48IBBxy6&B@F=wkzFi<@1xfRLuJGUXYFft?z}zu3HPO zUd<}w7fdgZ;#Q4X0UeAWW!@Y;!=C+Aag(;+@B=)zY;r3iG%~KR^OIYN7KT@VbdBy1 z+SQ2);K$kF`i>fkTXt;H&E9WvQ@2g(H9`B_({Ts{1~bQJ1Uc}!gPE(v|4X&$7w$oW zOQacxJd<|Tt1ilS_gA9Y+xOe3@H%B9Q=+VW9PtS+l)l!$bGoozU^R@Sg}+o^BziBIhkvZul~)7~rqvU!>;~)LhZ8V)yO0%H&$TP$!8XYG#?2?>lAV-! zuKILj5aSyG55NIbr|L{Ei5~wz3~h3qz%s9uj!TqbZAfP zM-dIM4_SC1-Qn-oxEdb?!IM^PWp_+YVcm4#-@_14VX@yBZcbnAXj!?_m`N^uDHHF) zfth%Y*L2me&Cyax-*h9E66oG1cm1@(VE)aD^fL}#zP*eScY?Jdxt=rIFGxkJ7kMp8 z{nmmZB_7m@SBoyM+#vB>v9G`93XLL$QYj1}_<`QahRG3_W*`3AiC_Vk@si{~q55=s zVp2`(V*n9&a;IXe&yD$MSIj*2k(UDR6L+;X!3}7!(9Io+$Im^fr5*$aO`QG3Os+vr z$eGwy;r&0VpgBRZ1hZBGKSA4*%YS1Jl8mgz zvmOB8Ocsh>gX*t2M?%FmzSZNeT}}#g#{RcGr?%rQKh4?a=N_pvptUx2Lypw6%@Yws zd)4KGs8_pJH-{QdUs#8GzrN>xEyQk5c?|RNn(R*;b- zazG9Ac!9XTD@SRHi|``Tl%cYIt6-<$_TFSp8bpnIk3*eP__#z4ZfFpY^N;YwF8Nt} zy)(?uHgh)5Oak^S+eGEsjFYRQML=}o zL7{JsjF%H^5jdmUlcdKKWl9fI26lD5-+h+&#oiNj)%ElZM6YGuREEq9pgUfS`Am)G zX{$1WS4#D6CdN@*c%fJrnkiyhS95wZpUKJ!AKrYZ!DJAZNv9k(-c*Yh!q-&uU5Olh z89zX~Q7w0xX8UpWlMb>R9KX_az3n*cW-{sZV3064@!7QBt@4n&xhdaREiIjbu0c$OeM-<+a5o)0P0O?lb( zS=Di-%=LayMmxs~3|=}mg&9|5{p_+hScSz(x{ta@KZ}vTiofh~3aP*>e1C^@<|8uq ziO7^_A0ng6-he=yntH;$Yt=8<=Kx=G;=nTyaQ88j`FBib+?B~nF_{_0TUHvRX0`l$q#@n%YQ$4` zG#^$2zl5vJLi>OHMVZk8xu2Gw#jj0vJyGz)j}btFgREcg=joQsP<-8k!(dsHgSX)z z$)}}Ie7B=H`JT^2sd>ME4eFYo0VuxMgo9GrmYU@k}CT6!0cuSIRB;d`D zz?91bb*7Fbq`VKvKecov`Z!L}wSjW7s`aPtO-)!D(dkSc|Dcl@E=VV6k*IABL+`U& zWY)AjOGD4me3~o!8w(W^DQ*1W@?s75Q3GhihGUfy0|5w6;=yzoO+5i=Z~JE1fDbs~ zCVd`NQu!L2E}-`Zor|e^Ec1K+=lnnC#fBXzoYyq2Tawh}#`iXNcjoB%=AmIl11HnE z5i$}B<)3Rhn|bdOde$Z(hn!!B z3(yGrdK*_4+bMWkCq;7CpY{M-pYFw1e25X^az;7xK#-wLeuwsTLAF{ zbcmV7MyFibeRon5A{AR&4_KW$=ZAw`Nb;~4`Yt%t!tH%lwX5V$pVU9F9zbWn=P$kQ z68;>K(0-jzOh26T+=|dj&MfZuh8a9m1qS*w*SvXvgVl`+IeXJTis{s_yPhVuF&=&a z+^%4|i&FML*qUN(cY)0>`N3rG?&U(zLlJC$Ro9<8pZX`&| zL79Q~mvTXQP{&CdhT1NcYJq?N{6dUsX0)a=9UzbHiQM31X3iJG&KK-mcCv;+;O7YI z>R;p1Y`lp9`K!)YKJ9H`dm4{{Ig@UG;5+Clr`QrV8JPa5CQ#SCD0?hOI2@Pafqs!k~ znflhBi8R&S3dQAM@S?6%-<;|!zPA2w3^UiuW4b4=VcRJ}nTA}|?v~R#k3cM3Jgah; zO)Y)qYI8~BaEtt|I@sGdIH^5_lhRstH|}CIveipP%o^3o5# z+(h`?q?3{fACfxEs1;9SbGZ}Dg)%@G_zJW582JcaCm9epUw)J4GfP2D9CKkIBZUv< zBbSn_8%8h`vLB{NK4BgwTfhxIyra>WdS01;r)LHkfLVNfx_&OWfPF6AGM0+gD?R|u zDst;MeGn3lvsiZm&n3xzjxzfhd7Lf^#wz9}Cr%_^<>dZOTK2pE_x9`29B7e!?LPj4 zYK!fAq{j)Bv}fS?$+;|JZlZPgwl9>4L@H#Ca84$iG8{aaH#IY!orzp>K(!}yqu$U& zo+MyhRwXhLiZ7zEU1W%b1r6Ih5|=8EX-k>rTzBPo% z3BEg~Ip*pgl6U+k2@b)XIWFY7HUOrhndg`J0jN1shh@%zwIMLw0Kh#4LDFwgmc*0f z!YU3%joNSFc=U?DdurJ_C(`~rsJ3>d&|&n{CIQ4jIG=V98h@jzb?wyK(;x|y3CX42 zeuezk{Cg^XDCJ^#L4J1hh*QFS<9(o({v1Uv2$qN;@1ok=AbHS3-x|bGDqRux+!UZI zzy_XcDQP#x*nQLi;p&CPeMBO%Z%*OM_;dpw?pSk+OaJ=&!tiXsiNjF({S3QW0JVbF zazztg*~{VfDs)Um!;vpFYJ`!+7)Kb+zu8T}kGH;vXEZnmbEl#XdD7f#kn!e?k=KIc zIciBsKf}h|bsp9qgcG$Ni~@%rr}^{d0d`2hxwv@+imoW`C67cQIEd%UlD0@#1vD(dM0&WxVtdQAJDn11XzeYs5n z{#&a_eF$0xMt*ol9suRrC?Gb;&TWll2G0{eUq^5~^!<}wf}G6;xMmPV z^P6`AL9L%%P+Ui+yDSgEWpW6d%htrjO5#{PMBu=y3l1`_F76zHG+qc(O#O4L{&Ock zfBsG&smDc=qoIy-jJ&zR@+o{cd9|$e`Jq!ez}uZHUe^Oo0I{bb4B8mX*Bja&>NWuo z9R#GRPU|=0*}wcc@Hheqo$~L*GvDXGYG=zlTK6+tC^8hW{;V}GpO|y|-AYbTB9E8n zof1lh`Yiw?43NV|9Zf;M<-D8s9rQVp5N7c>*_of1ea>-9WKlBAdCW;;WU^9r;Mxt9 ziDm}r>}&QRQAkC`9|V=OaF-a7|7lnb6YQmT^&d7s1BlJoEatS-J2by>`P%eBvsk#= z49!5#3Ui2WPC)!hRUdg)GI(j(!*v}&c(CwXHfm?Nhm`aPJ3;-=sx+|_BNny#e60FE z-~ng5(JLejI~D?k?G=4;IOk*U?R*@s>`jQ*0r|P<&&Au!(0PAzK5=a}UPp1kV^Lb1 z^m?N5<@n!`nZL)xy7=gwyz1+MBz)ZNd)!Ty0fTnF9T4j{64!AEA&Y>n#$j)G@DI%p zINF2H zGXKJJWSG2nc);&Ezn`0r`>Q_4+9N9S{FFg(KNs=q@bQz4B#iK~tf7|OZ3AZ1M`PLy zocWHC(L;?}B2668b0$7 zccBO7Oz6+4dcgB}oGs^IQyhFI0yux7@^pxqaf_q*0Xx<4_!rI)BYrYsXqbe5;+_=S zA6C-P>YEQt%;)gr_5&ph&|tdX)c}>@G3znW@Hn-cbn`aTuX{dHkyf<{Du(yPNH(eb zl?Ni0^y;V~yX0cGe#Qd?Pe7sR*C5KhvNafB=Kw7@6mNwi3eMMZdi4uQkDsPYK6a?==6*1VweDsYt$<`x0?BJjf z4W_kHtny9-E{P?D6NO$sfza~FloSE#?ngAEjrWpV_Au?AoON>NsaVIgNB}-#T5r&? z6m6@XIQZ`J1e&QeQRq6{?LTmpm|Ji_|5v z&U6uQc+q1GUnBYehZmAEU0}BcVEXl*FQE$ra^Bu`&oB70*Cvj|rb))_UI&?=MIm$SI$gVi&go@`wl{e4)f56bW)0@xT;x>db*MTf%57@$OL1? zhA(>@-xC?lTeb~wN|X>lH)!>_w784^2e;$fH#96Z4-joW^24@YtGPZJqNkNCuBy$K zJs6?FakLR(t5dS7upWuP%U2?KZ=O^z0GeXt=YOxtrLq^x^xgvNU$m?1fs-b_nFL6W zF@^SLDGZPh!o<3s8XtZygsJPyFdJCnh8xOW)vyQKzK$3fpvCBa5EQ|^)JkR>kLWdF zF4389AD)jZhhdhy-*Eo8vEEL1hfoW)KMw~L0`a=~`vTZs`T6t;%=;JLiUO9vT?jK- zeAFOuM0U;Zu>|A>w|r$>^AJ#F!hRiqt9e;1Sq0-&eI(4Ni3omf;I-EJU%zGr<^g18 zKfIY^o`XZ#b$CN8YOV$v;8F~64E&6i*)jA1qV=Td+fhA@3qeD2} zXP?%{y0&`sj;pAJI~T^K=lsJr`MXh}j>u?118Zii)@xn}q|67?SY5vN|F`vRiIFQi zYyeAhc96epEBjwZG8UN+04#YD-+N{}c6UpvVv!*DQvCV6DImR~JEK}8-)A;T*J>uy zMl+tr&oP7INmjnmt(3!r)6r9W1&%gmRz7~3xDhctjP2KIb2d6r`_xC6TG0`xT=>%cGp+-abmq2(m^n|`+?h5*%~R(C z#OxxYW-zCYL6AO}6)tZM58XF+6B!4^hKkpWPi<-3#mpIC|0raoDX2DRT&#wx#bQE+ zv5Jlyj=Xr(NxofA=1;v!DAZ?pla9E!``&B`H1BAwo1%DKEc8ph1bZ(qTfUpu%uXjTgTPKJ6T;*?>C1c^eP4 zDaV0?Ll$rQQ|24lL0>FFnWe_Q1ASx=X3JewWR~r!}lk8&XAwI*1(pG=d>CoE5~ox zRnT3`k9toS2|V?_uZ(<8lQ>mxD-~;|G**s>1L)s3ea7ayTa4PeJI|J-j@e0?KM?5K9t*mHHE4gX993SqM?km(=dNt~OUuC1<;KAq1 z%+Y*kbg`kf_``Jz#;{erCe(bpoaCZ*4Z@3VOGSIcGf>EFP93Umg1P?iF2}Ga_!#yp zV*Ox8vL%>N`}wQl`;_Iy33FLQP%wN+A#aCM^2NG~?$5 z-8{|PB4^N?htUREE639J{>P2PCpn0oGXYjJK#|F5VcS%qnwXb$G;p!14$N%+p=Le8 z?v1?@vRF>}$Bf(c$TLpX83IW1uEy9qR7462TF~Vk^f+5teg2W1Xbb-y`)_D z4K+7Na>sb$uGu`xd8ERj1}?|#JMn_7LwSE9b-{AyB=K&Nl!S=p)2S3wRqxwHzLL+@ zbP7j>_Uc!J!>@?W$YZ2ML@N*_wrWL^@X-bs6~(sw2$u;X z3r^4UmH+eXB7N_hdthj?kKsMSGHfprkvvn6!c7BWD#`SKxw&}4a34%3mtHbPktIic zYZ;4`TYkUeMn|I!9VG^N8{Oe1j7N0_^$(po?Lg4;IcewYDG9mna^!2td|d03zUfNf zXn*6Zy?5AFl|y&xoqNx!l7gru1Sy52QDI5)3o^M!`mXN)NpklshIs$@^+>yTN=wPX8bOu&?aRzFoqVe@5#^_APqC zC~W~EFy|WkdmF3!W|Nq2-Gt3x#PKut6s(ypWdve0CISb;V!75=X=tqDEHW!Ul8N9=dJ<_D3Yq9+Nh~G* zDP2c3d5Tn6fu}tK$fX_yN?4qFR(|gJT=hXxjqbRb%dx2WY5-b5rN43bz9kmWGz=b{ z<9k&w$@@f4@uA9dkPVj)F$?pJ@|-s}48YMYq*wEr1O;&@Zb4C^KhvUlhkbwt_2Ts@ z&`BWx{@2r(KFVEW^{cF;zIKio89#!4HUXAK<4R{t_|CO5tp;Z$=Vx3XT$>}KNx414 zY5B_FfAjvu{7|VKJe=bE9d+U6|3*V%A8mA4r-h@73V=5MOqFMNsR}G=a(o5~tl8va z$R}c*?5tDqf)Xm;Ve-9)&kWRUVobGYU8{p0R^}bs)cLfN9@Ck#929)b;AUC2T|r@? zv&_kbyopa~QD+LMsh(*POza$*=sUjhKwbMy+_$MF5N-{0L@ZpvD^Z|q6y~o^JkHFE zBz*h4U+5k9y5@-8_R$m`x4$hyWjN(ABy#r--q)W{H8UbO#WkrJoagV56NBmm1}tBN zdE1xL7&Eh<(IWALw|Z{1f!6KyP*&8jPs12P;g2C3EgT^o(Y$P#^b`|67#(OE0chQx zO)30;y_lH|f`8G3#5q03_nBR?`#VP?4z-<2Ck)w|QI2q-jxw6Z97(d8;Ly`##-Syf zMazV!8(=})=RRwII&weH*2^fLe=0~_`4~7=Ri7`d z@DVw=$4#L*ZqY!j+Sh52o*H1azxKtBmlLA-K@4%?%{+vGnAmaohPFQk15Dz9zi7uw zGO;I&`nd+=nQzX|)=lYO_9VpPx1y9He}n_w)PzzYiIH0Sgf0i?i9#Za*v+;DQ`rUToHv)VeNw~BTf6X`3<=;u4qp4sWEiP3xHAhIgh#h=Q z4f0hQXgTPq*E1ncezcoZmN?mf;7^t$$eDRb(522?5HmC991WSOo#rTkQ&$!e^*JIq zJj&!#RU}Z4(){DI5cP|zaUO*-UT08BtUo|GOV83-w4zDbjt@hh9=EH9sK2a3C&M}>sMnvmrM*PnC_?6rV&pmBfsSzcoy@>Z3mF8z}E?3 zhD7NtHWNPFu2s1uYcK(#_XM0`^r;VWgr|P%5!#nnWctfC1R>YLdAj|Pd@STP88)KS zU<5$p&E2jbW?4b?X98=~egF+lxt*^Xr!UvcPmHtRp#86}S-QUgcYrnrm


sC|y zfrISEwlDyQe%>5tL>w$WlfCo8SMZeGZ94|G>W-YPn#imPevHcfG@@37^7%FfK7eEA z5Tm(}x6LqZWYW-BPr6?fAp_v5{UyLk$w}V^^*E(+JYQp+V zoWD1@7|p@R=}e+luh1TZ7A^MQUJN?(3R+M}mLSL$Hqr5|Xkzm%?h~ZP$(`6;4WDn- z&tG%SqqajiS`PU^ePiV$r-c5VgS3XJ$*(MEtzP9bLYtGcim3Zv(50l;kl@2zeVv|i zx+$wX9n~p=sqHFLFJ(oJ*ob8K-25MlI6v0Nb~;QrDO4)`KvYe!4N`rmSC8qEAOZL3 z(rY}%$XwI0bW3Bf#ObGPg@JzzBy_^<<9oVO?NArsxZG4X$^$nTsMr-b^`Ei8S@vjP z?ydu@w1T;)ZLIy7&Ef~|*@>Miv=q6eDvCRBud?z zpKy8;9WCCbR3>8Q5Zcr8GK{eunjd%^*xnDb+KF7GMDXkC}W z<(k4GYyGWi@Alt+t}h}dJShvZ^%YUgD=nPhePN_8CnE0n`UwIv=@GiAOHn5g`w2Rk zx$Eq&_6Kq=VkbaQ44n^yT=20=qB-e1m`OQJ}i@L1<0Yf<6TLc z;Sa;<=lr_<%maS5daxQxr?5l%0pB=aZrd_dQ4!!{vl2XDhPF1L3ISR2F-^|XEZl+x z@2RkU6@KQelyZsa=ULC!gt9z^H-}l81O*ec$i9GLH z9K{Ub;C0b&Urh1Y7UZ8V_XyOwPHdPE*3EMZYe-MP+nyp!wzBY}O0vox#Rm(JDq+7K zz|0h%;bv5SlSPMBpAtzk;L~J1(=Wy;uK@67une7p({<=T^B-jz#6kI$M6}<(vC_!V z(sHZnvNISj&3Mn-KUJsSE<7S0RgLccmMi0Px=M9~LadN#-xo7Q#rPR()?V)~tetzj^ za1W=FovG3WL!KG@NEN%KorH7yp)Oh<FWVd3Fnm--4+a zDX9()=Go6rTuw?Y-4k`yndF-Y7PuFJnntOYveBdrAm*s`D*!i6Xa#bZBkgXk1LZmF zK*tTf#3(N^;!!B?)QD1yd6SJffinFcu&zIDTm=u=uIbm{as4=+iMn$wQLXPx6& z{mN92A;sKIzm^9=e3AwnIn-i7jrQ_;cI}8Ar+1xhTf5<(!Q1nuX?l_Fpw}4kX&=jZ z=P&VRvPkL)D(iR>)ra#H&KTB9t1uaF5o{FZI3PF}5e|Bl!$KA_ZAO!cG!mSizn{Rv z4SXT)uZNh|!3FMKM+=j$9AsEQ!Iviqi1pamMb^=9Ugye{^>l9ZW4+Do_96S=(dWD0 zK33DDgHJkfPV{Qds%~29T#ZX)i5O^0CdFujO!i1NU2VNeVObd}^X+juPvNJnD`wPx zXH8CY3_o*$a1lLFtoLS)njNS~Hd@=J%wXtr*NH|3J)~ReaboJ$AlcM@R$tTYjclR= z6+;zNcRlCIhNAZd_|A^eg!%{jA{#$O@k$Gil-wv|-sgI6%N$a`Dm|W~?7PT0a+9d?Z0aHvrJ(%E8w|jAtJ)U9&X4)zB*nBl)~l z_de>6rI;wz>s6*FfCowK{4^6xeh|*}@+$bl?zuo#_V7p`7S!r){p{R0pqa571GvjT zlCQO_HgDFco((jO@v^41a9rEcvvS8IOr(U(>z+g+3(8qgq6|L=_BtY`L)UE-Eu^Ld zq7Lz?Q4+p6JHKss&S5`sfi}Nl!X3 ztx4BfsTR0&7qD48jh8$#?+|rr-hgjthJpI{CA>^FnorG7^HjfY&N^^7ufykp*s}Gy z1?BmSrhMl3VQkQB;N75MIa@g|wgovB@{^=FW_k*q0o+swhha_`a6phfzbb*{K6~Bh zT#MB*aNW|V<^|YdFS#C8iHUf{=hZ7`lyhBRa=#W)FksSjN)(GMS)5fMRKAtXFmY!o zG;U;d$uE1ye!8ksSVSS|i5f|7*c#CJKa{^wAE@DD9Hn2zEP&E=tcDCbsP_(lI!Hv! zNX)*7(U;}YDu97hhK2t?egp&rK4|qFmSB`Mj9%c=NVbW6L2`;*REr)%D&V5aW`aYE z-XvX=UzjYNuMnrhvtNSvBQ=OKG0{=lJLjVM^Jjg%i#JJZAleE=AY_`e1K6TgoWdke z(^kYM1U?zQ%CvOTuNx>xt&I*F^_YWZ%N742+1<~hiW5vJquAl4@|9Kyi#+2q17w~| zq!A?E?sHtZre@Ny4u%jpGWy_5Cv=~mxke$l1RF5)C2nMX#m37Oj&v>zf(^{sTP&+e zn1jXrWTR@?l@r^w6dcJhXW}=1N~^RNFV;&o)HBBfz?Ef=-vp0YNN;nhg)GRl$c2J4 zSm2M%!@<47JV>&`7Jm&k&5S&pnYWXfL!G%f!%j zp0yJn1-b^Or+Z#G5w;?mO*{83cs*=a`Ql=?K~GXUx%<+D%c6 zj7WXjo-YNW2Q{(B+0f8&aSC61<$@DyHHvj|Kz=q!iVQ=} z6Nc|P&6iX-=VZGm&@i7P#su7Xj`Q(ts;K-CW&!PtWH~3sz~5KZsdNnt;^QyAM{^M; z;E{CW=^Rfl2z?fpF#K8y7>nmtMk>^LFQ0$`UUK9U7V+#RtqJi()@cAaa})z~0m>sq zGMp2ARZfK`I4-4h(`GmA(FNuu7kQ2Rt83^Bn5il;~X$jqT? zwc5=a%=7%<5b1qOj>o+Lu^c+d?c}6DZ-)~wqo(MihKn=r6xD4|&ENHCRcLN9Op$IF zm8G)>-+UZ>EEby6i<$=n{!CSpC=!h`sMwmWF%h6@dk#4TcA*p|nJK6@^>%ri&@w}E z-j@Cu#e7s7MV}5eI-H)WGq2memT(l6h10%U);M2TM)`T?uc&m-TTkw&A3xZRgZa@c z7xl=KfJ@ajIPa(0YX;{Wyb5OEvsfGq&zS)`F#x%U^-RBl`BDWu1iE;-Uj-r$(}j@z z9v8b%@S^d6DcrTPviNdlrXKn@%%m1Zrc{n4BLX28)ooklJ`X zi}XKU1El9{6DUt-OXd_0$V-K4YxD7ACaa_|)uXu)wBo%{fYc$%<&xw;8Z=20 zddWEBk*JeIquR+Kzt+fS$%dh~Snq>FJ`Rw7>!!TC{QL(7$F+>KeH`KYC9@e7_<1A_ z3e4Sq{47i!S&y&-hwT#F@lSq=K{9-=6eP(|GEv-iH=pCp1nOz<xrWoRBnZnXI2}IIhJoo^+1qi}`2EF9tI`ir*|iyy{- zH6s*P;bVIfQ~b8NnKk_R z!DzZ7)gy=mS?$q=k*i;cF#Kq-1P-XU_7GHe!(KH?b-}vl=p#oFA7g#d!bMKKGr0Bb zRF0{s40O$;y%qD7J?eB5nK20>pR>@-awS4qkbww`CXDBspf+@RgdOt*cl(K_lu+411XdTDbyNq z$2ckf8IjXv29ZFq9z_TSY!AJX2IK)z)zC9`i`d~{x`JZImJ_d}H}$I}9mnMb2A`u5 z<$gX}e>hG_)&~vnDmn|iWLulJvC;%C<}|K?2r!qn#r}li;L1PIr!=5ciqKGUgrcw{ z#M9{Epp&D~;M+^CKfvRe2GSCJHrGhI>VOYGrQ(RB|6yUim|kAR?5`==mTPI~xC#I~sH280_y3V#vR<%R zlHuRK9BLI#RdNM=Cwyc!mG>ciAt;GrWBKnSYK1qu~NN|!&XSDJMf7_On{wqsDUhBCcOnw@9WVX8Puf^Yn#xG5Ww zkLqk$O8aJNWX>0m(Lz3JiuD{0)cpHF9bZw&?u8=%2)mSBsmnQm z%@HUbfOWn!43RtJi!1cE0BVH5`B;fF#TPS9rN`$kDs)8y6P<0;nY5ZKvI6&6}w<&a;lnyaK zy@0oS-t^l1(|D&|`|CaDV0w7m&jhYzn|kyip+dwAi%97jlE=L1?Cx^KFWwd{)-WhB zVOCY?;xvA3+_>@9@Rlonp89*JwNM5XSX}P|!cTIG{%-gCv-=WojktW4)0wfG{u`!7 z$nw_pD}<@@>LysFNs%O5q{UIy{(zr5`ha!$~XYD+w`IqcqU3psXhS*fiIPSo@b`Mb(Ci zESg$kWvgdw!D#sR6-W1J_(cok!6eN9rfyNjt%J>Jk=8(|lT5T&3`y1U5wv|QSx|7> z_!KrP!>)iVrlZ(ni+1iOP^in)&AoGr!^*Y-e77X~b0ku9Q5X)rpos%wT z5GO8M`uWg_f{-!f5FQdFKXzQLH_F}AyVa9t^*w>#TfeMRHmlpw61bll;EF*rvLhuE|`TaD9Jk306ueID-@wIR)P@CK0My~9yeK)-s|~8brP^I>TJ#l zzQhh*jU)vb#G=g z;IE$=J}34YJ|hR##DxaE(cZweldXkNGeENaZOipM*xo@78?fqhzhKGDo_>K!5`phj zy%gzQM9dAXQmOzGAVZVIXSa2%(Hb=bre~_R{lZLBiFLLdKvgS&q%~!F_Z66sReGKa1<@cFpBA+I?sAxFUGVF-$D5V*v6mWb;?`Lu1Bql7OSxz> z^r+=^%^84YULKzYx2oKK>3(Kst~@t47e-)>N=uhf9N%sTPo3$i%(K5oF=Cyg;iDL9 z1R%Uw0tPA%oz9_{dEu;fto7m8{EQQ#IP%Z4xB73QF{hC>N2Vlg9273HX-V3Xj6Ddl zJ2~cy2kqEzNM-=CYX+FUaU1_-9Y3GD`syYn=-7(E+S~(x!*B%FjpQR%j#OOIzdUh! zb--XQL-Cj)YE%){7^(?@1i7UG9EIyq5zPzF2ox#euzz!QoS`a{`MC8ErW%K=nL340 zg-;eDF(d;9mDMPW5kcBx7D)5i6A3h&p5(4mc_n!xMls}Ggv{7f001BWNkl)}aWl{tn6ACmgY=t5{c9;oKbHx%%Zb#IivM&Jo1k5<(8?Or>x)0gK zeu1KgpCUr*N5DC%9IW!Fqn@LFF0cs%ha)f|M^aYMC$Afh6qmY{TG@2@&gUL2Cf;rp zJh9pOU*fH;KY}cP8w>lS&C1iPrjaM9)`=aqi z>gZz6hLBnS||&2zWu9e*xnMm^k3T+Q^`w9qwB=z}>(QTL$W z4CvCDJJN0x#K`Y$V!1#;#&6Pu9n1u=Bu9vZR#(BvV3{iwlJmfT02h0a zaq97F@hP6u*vMpFA5Xa5X{8Q8HTo;U zj-J?nWWm$S1S@j86Cr-5lZI$usCBu87}=I_EN0$*8EjET%?RZ8dvd&XZ9iB4ou=Zu z7IgC)?kD)MlX-8iL?;IB)E~QRli=lf1>#Pf2T8~FGlH&$JscAVkv3|N>lfgX3ZB5H z>u1^Z9DX`0^b3FDBkIVC8&ir&X`!C8nJxs=J$>8gq6c zbfrv@`~jcC4;grEwZC7n*`&j`eOhF7poDZsiiz%)ZJ0p_-4lU&UXa6jhq(F+Lo_Bc z#0g+(x_U}6SwKFJ+R!F|8L6<9Qcb5VCWH z;WLfSb8-maX`I2qob9EW&y=*7UeMKFV5$`7+!i5T#Vk~J6Hk~hH1FcWa_efcE>6|! zAl6!W@)XHCk1%>5W~toR(s*WB6!{kgHEQdzt|uFKi5HyV89dm8+?&GW#aE$vU>U&K zYB1NSBMs&h07g;VIlqrwk5^IQm4QPse~ zK@6X6@|40u1fcS=RmgiNB095AWfwV8wR%>n;mP$lGwow6mqyOG3G%DCY!4lE%OvO^ zIMPPRT>9d%U!~;I)87xyVKcRspGbmi55=;&D(`}J@oBV5sdDF~sTr1Z zZNqLgVMdd-K2m3it;KJJ-&)CU1EwdV4{U+%Bl!sBsL|u05w~hq^)T8y%j*Z`Rb<}{ zAa2S~;$4@Ai)YS|e#*hZxWiQ4JH)CvAHLuNP8MWEi%Z-ASQcV;&dA`jb2kA}q~bbr zfaIXpzl7qtS)a*9X)DKS|0{a`@0Y9j)i&Z2wYPKT@`zQG5p9s1GxKI0$T~{n$~tNv z&H&|!H|`bRN{v<*SYZ>p-=avUQ8((A;uV?|*!=CJ;<`^3uLcO^pCa0hdLgFWE z0A&94HX2#EpoMKOB2=_4fu6t?lmHW+`AFXNYcCH|s`Rr*g*emMd&SeWkmZS5IpW#` z7X|91i9SJ&fB>ZT%L_8C92k%Zw#_-p3Q=ym14$#6(dzR1*3K@jb0$g zcQ9?PJ0)W}6a%mduSdwG$H9R3QNQ7KU%3}=&bHnrZw6I^7jHMj>vjC)kvLm9L|M!L zEWGcOtWsOGCO$jS+KF&DDKWAJpTy!-Tsqc|{?+KjuP=KD$3Sc$7S$@_jNH?d+E5Y#u37Z6>XRhNO(<+ z4WsyC(a&`~L4iLz#nvyY9|QR$Yl>%WTtS6wC6-d=iyym9a!U|k5O>)hwrEj)M(!mu zN$Pc@Alk)srM!6qC<077?=z_bpa#E2&DgNbFI_pHqW&MJ**6*I!grpr!%(@o zBu-EAeP3yit6V=i=E7}EGN7w52j&%~>vKtdZij%Yqi8#z<53ax51NRQvKrLAj+M;} zYSirH^%>Jyp8|h!zXMV{b8-0g1ndwT9JSrIh(R>S!u~Kk?OGBq1$hav3LF8D zI(&Puv1GKd4`PqGc4TF%5C-W^v({$bNl+?KR9$)`5|XotOHTI{P{@UEbj=DYoh>jq zxciuPs|IT&vgW#U4Vz3fh*}gcNKOh=pCt(Bc6S-@K|<4h+!0H5n3VSdd3)R8$8^%_ z$4;+N-`d_I9B_(a8AD%ru}6ixtdwe^@I24^{*P}ctIBoZ$!3o)3;f%?i<`ZVcmtm>bDN1F%xJL$no z#_8eAOrM#-QL*1%T$ItdMe2Z==w)JI+3r1*-~sMG;7`T}Nr1(Tnm}|nnR-x0N)&_ee1otz;Q^~c`eYoFeqJQ_i2hJZwVxbybSyJPq2|~GB zt#l|%NnZ#Yljup48^-_i%{@S)U!n)oW`Ve_^7LGv1_&k{@dG^yLl>G?)wVmoMZBXn z>)0_fsDA{5oth6o!x5^c)eJ>kpJOn(dWR(OzrkT4W<{!|!X%7a3JU$z?sjOF%(3`o zAq#Y}jm+X2h!96w@1&eDp3-HGG} z;#1Gh&(F;8%t>;O654cZ_}1a{Oeu!}{k{Wmh7=+?d$G@jd+;J#q&YtDjb(;TWLMtD;jKF@oR&!~?LU?<5^sskOzaaxjtjaLXh z=Yvyh!)1xZxe_?6WFI9XViy)$-!C6xm(XkE!y{=_7Hs&aJ$r)<8wj)Mi46RuTc(3J zE~9)+vCiJ4QQwD{+nX`38A=pU#}NX*vJFtvKqsZIHGY10u#`M_>#-J|2v}S(|1=2W46~!2!Uwa-3aiJ?09Y!*1Fx zSKsphwQ3;4DhGQfZaQ#?`s)e|HAl( zfX{FEpYuW64 z1<#6n+~Ia+x5u4#Nd?5koFCOT zA6Dh}a8=hVM$VoFas_wU;FpB3V3l-0pYm0kCZy}^y;_CA4^Ly|8mg-wrzQu_e#1Wa z_|!0BbOJr7xQheJ+mwQLgbNua0GPry@FEY2`qNM9`3O?K(&M@V51-RM)i};x`?T5z z93qjq51CFl`&J$>8(WM9kOL11nu0h{b9pD`BH+-+uN;Z;fggP3>#Zz6Gda!o1~I7xoI#T)f5b>wVJw2w>fn1!2oRHap*3=QegszF)!;> z9HLzojTuZ$vxnU;=dJcEN$6$1on+n2s4ltd;5=AKdLGu}%mN;s2al6)B}bzeBgDc( zZPD~@X$L73oh7%N9L$lnvUCFkjzn~kbo2wb1dcYd*bIGYIafqm(1;G`nw!)vl|3}; zS#du4%d(_*^&&3-7h_gXQz!>Rw514;+867n0EynJvF;7yVob_We;LAr;1)edAbp~^yb3w|Oq7nw9SX@KN@=x$1c#M4{7K4&z9uO>Odt*B zM{RxeT;?`W^HSS-t)nf3J(~}b1M`&R-caF_3zmkqe16;N>nOG282O|bpoir$$eFH) z)Lml)8A@!$RZ)UK%<%25*r*sRB@Q~J4nzOqSjuw{b!lz0&(7DKTvjN#L>AoYV;o&=oxED~W3E8D%W0;Mt2AtE zn9CV5xR?BXOJD=xR>HiY|Z)$rTc)g|plf5me?iS>3vZ(~BIq zEaq#V;LfIpA+~lx%Sl3WSSa1OXpC0X!t|~+w|%xa1I@M(WZDD5&D!W7svh9X{0bE7 z7RSfZ(!001grrWC`F7CcVc0XB;u-g_nD-^CF`j}dT~E!2kN2sA97Su?a#wY`B}v6@ z-oY=P6Ib1tgqHW&JtXU#>16wF7V!)muuXeH*+OafL36shPEC({C&(=wPlHen^(ZyB zV|#dyOl&76g7dvy|MnwY7j*$M^Z4V~L8EzKTJo&uKlU`>>tjfx!E%2A=^yVwa=Nn{ z2hr~U#D;T@^F|iC#SHwudtJyGyLx-Bmsj5Uh8Ux05gQMt1IjO8str!)4x50lkGF36 zuJBzid|t^mhnB-BMW5BPzj76*-K0^6ckCSfv~C9k2z&PYK^Kl_w#NWiPQQlZZR z12nIno-0)@=UoSDIHlP8G{`ZL?w(PIb2fwGY4vEdycaxPqcu8=b>^x@oP5V#Eh@h0d(s`ukFPn?4oFEk2UM87Gxg94^Y^CYLdrKss2ilT4O31&K&p9L3syC~DbrW9NJKDN4OshM+; zZ~IxbU^Z(2I8aNAt~x*Sx2mwEUNh<@=C&M)YPebYJA*<^H`)=78ur`6!Bgs|mNApQ zH-3uk_lcJ4A(M8|`;0(B0>b;~86}B-iL|(T_4YdW+ROQpU2$G{XckQOU)d+_VNorD8&>h1NBwozNwLeG!(1{{|1`bzP2 z?e42!>A>}wvvy_f2??OHID|YI&=vG{uFmztddQW4?rv4MWKVHv0{JgC zry^LupHX<(}<)gYjiZyzNt*vn;vC@B?$*-q1zj%JSoJXgCBydo`Geu?g zGmcsl!!z|~aE51CPD`veS(8%t0dXYCRV;woQ$N!=CB?V+60ZraadI1q^>oQ~U%~;- zx|nb=s$IhL8FQIcP0YbdOewd;Fl%sLw`v=zxs#%qvEvd@qK41QP=YoL{^HnZm{kLY zDt%xpMT$jYPNmL6%Ig8y*E^yTvNTy`junNR81uBUo8i-%HFZ$F0}HYBu98{~$tLCy zY_JFKw8tCj1;SLtdWZ}Q9`}Y~0msQa#VNK@Kc3=4K83h?fjzEQIWcKT_Q4dFD-iFXPGM6&0oVACMrAI<-h&*EMoD%ciGD{(DQkxm4A4#4 zG|Vkm;6C0gGoxm|&gfd44$MqQd=@mVY!++;cLNKMm#~gsaee3SQ|uc}3hal#hIiaq zK1>l7NY64sa?|V_%mVH$(InO>lW33hU@*G}#TLF5&*5-HMt80Pz$3YL&z1iXc>7x* zR)7)#s0VJHB9x=39^cIJ{sv?324%hOcS+vUJ*L5tme-6B5<}9p3<{IfGZ-ki8fptO zEcR=LaXZU@?*Zzt*edkt`_riBcK>zSJyPQ_uzMpy5- z10TlUIY+)JbDL7N{q+EHaycHzEEy@zi*$TpSn~OOb&~CxGHH_n8!Wk8xP7Qz2y!)! z(IJNF2eVCtl}NoeR`EH-{#6yae->EN!(ZYl>pb-gP#G@9uro-HlALPD|F|+=g_%>O z9+!8v!NF*PZgB>s%&~6t)bq5G(gJa<2dt{H#h+aK9yiF#sr+|mpNW??-mnZ8jPE1S zU_wk$jB6+GMfA#X-?t=-uuw~5=ly_^?qojK0kDWHf3&2tO6Wd1el|75$V>SHn2nk) zDe2InPsvrZGV^-b(z0ZLnmGz*Mut2wgQ%aRISDArHt;|Q5a>Q1fe|Rn!tA1sWd_J9Wa zh~T)y87Cb-(NL$20>EnJoxXsk2rys+m=cfA^vA?@G92grU^?vsf(Gp8#5yWfLq%+& z_Tiam0G0l$7mad75|i_SjSd%z@fOa5ZYb+>Mx+dT;0)>Xl*Z|9(~<*h7+4o|k22Ba zI%b8;9Q0#35Me{5?&0YK@r9}Y@JLDJY?vhG&IDF=7H_iXRv?mTU+m9ymaa!fS^3H% zdDB*jQ<_t=af#I(fyU{2i0R_7YL@&|yLcQfF*D9BcZ3JwA?!mQ4Rx%xrv+Kc$;psT zyl7(jE{ zt@fiACYn4=?2+oV@)gY&td-BOyVYGvR|4>&j8^8U6hEAkoIQttNELh$Qg=E&XlCN* zYM~*)+QgGKeYIMaGv}5YKu29R`eF`|niq<4GZ55)Un`zQb;O{zB>z_;|N8s@aKz8a z47mk3G28Hx5~lSAzOZKKM&*XgG)WtWcw(PeXeq^`S_H;U+eMK5t-)0A=!F zKlV4qZ{9>XoiGEk4eMv7-}hZc#Ucri%3%-vSDFayV*r>M{{3Z&gTWt*L5_z8B(4;H)fJ zAC4CUz?!{_`aa^~SA3S`YVe+!G}OJTt*!Y4xpfZ~gdi@tuK?~ut6yxGpE<@a*miGm z?|DUq%J((mVV2atN=rNg;vG$ey(h{V+j!iY!CK|TlA#1q8g)_x&fCO1*sgb4CBT!} zu?3;IH><0F1`s!g2g19k#@s47Cm;-76 zPLT&JO{t^%F6g5Y=x${c&BQ8!&)~7McW*jJj~3g>uQwTdb-AC?l^9hi+cc!fS9XcG z4{OjYV2E_hvOuH+QfGJW*}m{D_$G-4#wX(JmC{B5$h`4Wh9acNIIKFhwXPKaj>A<9 z1HtUPXHjUhvJ!`q;Qy87d%*P@a8((%tTTty3sod;qP^}%x#b!BP^?q%KMTC!4Rsdc zDU}O6&y#sraN?z^bn0Y1tW@=-I62oXfYVVe6gEmEcv%khHf3T1&_k5r{#9 zd6saT+0)%Ws@(Th=_$R)ECkBH6+#hMDT;IL6-qFQeOjNnC zsc7@yl|haBtK1H@2JU60nLrLmpwh~)B3G`>jFHf3uY7_+7XGN#os0r?1-H{Q9TD%j zibu1TRsRKY()BXrVGWLSg8u!cf+t5%x(j5HkI#~xMybCtpoT#TyF+&}a1$pj-Po2@ zRpAg-DAZ%`_X^~5c#b0QB+G649O#vzug`=P7N#&NEgyuajEGD_J=sPp8`Yo{uY^m< zr}Aw1lY1s%s3tjEMKm$d7;*|HJs_NEYaBCbW?eiVFu-)UU&D_N`|q2;q<3I+Si-JJ zh#Sl2S90T;a4jA{u;PB|u?8-HS*t}K9ngx&FlYc(&qt32!P>Ww7!7vKbQVL}>iQ|- z{}8vr<8#UF9UR7Ok1|nXRrn6ZJ#pgo?8Lh>d(N?l@X1sky_lY~eytLlJ{ZyS=> zfJx*Y`LLW$aQdVt$LO+S@HcQrkk3x9BkMDtl$;@*`E|@}>u6*cm;{`qrVf~S>gJ-{UrTf*QWS>)+ zF$+v-$_mvosvA)Fx7~q8+uJuT^V6?w)WI~nZM3AFt4gg+9Ilcubf*`f_i*djSzeEu zD7sn*fa(BNH6f>UWzqk(y9k3g#Z>7oSbhjzZIl{x1r9|jN|c0+B2YTOUknm^*ohF) zjJ%zO7%6S7V$8cyKJ$r+NA|7qlfMB1#}6WY%0s>!tlL(WQ9c2@d*IU10Y<}1>nAc1 zgQ4_{J^w~zQE@>T*8oRlTXR`=$^NZE4nHGyKxS|AzAcNwJ5n4ux~Q6Wxwo=bQAw@f z_WgKH=oJaM)yqv39)OKGvH`_@$0vg~q+k+KR-{(f%Dxla021S4PK0=jgh8T+8D7z; zKnxpK3+>F*>n6VdkA@6NBX&0n)0~@-VgQCB9V)NYR=6{aF>H4P(H{=M|%uw2q%$?`O#oDN=j zoBU!$!m;>!@2(6TZ|W(79-)D@;rM)~1Fn085N^tR;BE(qo}RUqRn%3 zf|WY+udy_Eo`AbMqDo-9O`Cd?6>$&4Tx!-G0z9~2F-DnL9cm&o7<;%S?*Q|luo`(RWC?(6;YL9&xa?pV5j6lI0H66I{y7*FKS8kgsmy@t3YNX<)++Y7dMrK;&1 z|6rG@`gwnl9W6@*z|oMu>5+4;WBhi9Og8~MeEd(P0WAp9_jZ6i^EfTFCWjL%R#(N^ zQBFCCDi3h!W#regvaLeYO$hLi~L$EtZHyfE{|iMnF>jVnYp zM+jPB)o}}4-!oa=KY7#~foV<+-W05nQ^ifhB=TPOf`r(O9kg3BFWn=TJZIh)Jd(Yr z=O$6w`)UbPoipuiA19Id9DxZH8{qSUJEccwby_5dAsgOR3nbt7-DFT~7RDeg;09Gv z+a4!Z2a|zzgBcX?zVA6lRWCt6X9j##y+n>I@#*e!N(3tiRUOJKNnN;`HTqPIYR%%I z$ObnCJx@w}t%jsJ#dc~nHVC4duOk<-cw0O!0`~flpgZ||NJFoKFjhi?drK3gaamej zxEB8sK>2vo`u>(~rsJS&nBGuUiriM02j#Giz!%n7@uRx+U3|Fz-&aNF`!qNPX&@%} zEl0u=nvz(x>Tvk)NAvTiuMyvpzYVfo57>&-r1BL5@)3k^WsvU4)|PQ>wNjO3pPrXm z5SL8~fpWu#T8zfWN$-#VA6qBzHwhYzS%rJczzmwDLZC6O&bkA8x{PRLu+z|#dEJE( zq5{Sk{FCEh!>LxXgF3UR)^^6KXJEu=9RT?nR;8vm3cyK!&2F5E*!f%(7U;}?Q#e%l zOBHKO>y|(A`leoetju3SD0~wk`37rX4{6bTl(PT+l7!2e-aZJx_5}*`F+!IR+bR3? zIji-!(S@od+el1Q>H3HSYUXEwP#{avgzWzfGnJ*{4FjlzOa}<3-gK<);SROvZ zuACNz%a-k<+tPJ_H7IhXHhJjRUzaL^U|8u06^K4#HkT1-(zYRTiM0nhpsw~p);n5= zTo;g&|+i|Vff29p#s&@D$>z)N4 zr&>!ZZF@aP$Ibkk95eq)KvpPH1^oN5_%cXV02fgCb=-J9dw`_8u^E8A%2rCuxNzV7&s`p~tYAp3rBFuUi;0UB4F-WL zrMTPcHeS@;O`=o+XrHz52}tH&cK%{GzfHHpX(u$s6d=y^Jqld0Cc){?C*>6%W0Pal z+s8tZX7n>JU27H$fC-5LWpjSm5{Q)FN7~QIlF?&RwUp|zK&m2(!aWkX*5hgm4f(v} zegch$a#%F@Bg&L#ZoyitX-##A9}t{UzUv+`r|?fG$-qzohJ-!`wr{~4IKb26IXCQ*moGL5VnwDV(q#?;?)FyxC_@OfhZ3;8F|Lly@FVqGKeU(|T1HxKZM{f-s#2L@}Eg++Bh^w5`B zB&=qMZfE&?7Z%|!mrvSXdz(J{;82H{V+S?@vanC&hm9ow>^3m)C9h6Q3%Zi!ovN(-+Jt=wY?#A&pNm-`f4VRI^wgklh4aCQ^R@LAxNY2}FNRse3^<|)3d zEjMpVtgm{Fkv`)yRK!*};nSG9N{Hwf=7bURMh9nNp~#RP9YG6${enrL0J&lz>f~;P zi4*(RxsYux_sB3dVOh;As0By9xpO>{j9|B<^T{i335*E})D>FkJ$=~nij%+)eti}2 zmLg~BdCxPQ=5cg9=AWLk02Hy!L0&Rc`jL~KQ+74%MKy9REpf&PyEIytn=rD+3y1PE z?30VwbOK(B7_!fr=c0}J$Udn+TH$+RnVIo8FqII!WP`;XWEup-oU^8$I7SjRK# z6?T`V7k3Ag8rQaCk2+?ZCcps*s!sJ?RK(nX)S_e=(a*gh6Fb;;+xd^Ok2duAj7-d^ z%$}+msc`u(JuE#5dSnw#OtG$Yxm{qtKIt2Mnd>s%L9rg7Ky`19hrm)!N2rXTri)VU zv+QG!3BXU6=6lhr{r9OCyvum1Nbf52&nm^HVy(_O=W2d`a?OMyq1%GrlN*cp&(-CT zWUsI04BV09J;(>|73p-oPqM4jXq|}>-qsrEW*sH7hkk*X;r6UCxwIG2m$e$HNfOUAuE|(?>m+RV z75zk=+N?8yiX%UKN!?IXK;Gc z^C?`Un0sB=^bsutkASK~Kvy#KM8&9Kk*aoLPz{^z)bfIAM6>LAX#+#{l?vWK_m#JD z3@@aZ29V@d;~r8iH27(l8Z$2ASI(e?1)8e$Q|SO%V3h+iF_+~ki{XB(SR=o2(@CUa z2g=#MyuZWMggX#0L@}`&%yG$NgWAnaN20 zCULeBAk&mrA`!E5G$G++;$&hW6ND!LIvShuseG3BC-X;1fXv+4*`AM?+0D(3$&H=K z&e4pSm6w;7nT3s+jg9exg3-y{*4Y5WXzN7&mxzDJ_-x{2ZfF0m z2K&yqR<{2a`t|=p#q6x@992KU z%0z&S^>3!XY{w^UV_;_T#lqOx{NK|44ak|;n*9gzmv+`Jf4NuP*5ac*|4`v?Ce43i z0%Y85%>S*Tum3CbFJJKet)IM|@rQcsf2;RzNLoxx$ z8#o*M|Iz;y)g-_V4taS#DGMiOJ4g4wAN?cLRZSfJQTj*G+T!mRCn5RU(|iU-e;G-D z%-+$?*u}`i`0vU;#Qg(xvNLsdGjKE!G5c_`0GWuXsl|sm-AR=Gie3^{CRP?E&i~2b zW^VE!?f-5Y^FK9X{;Svhmuf)f|4<(IH^G1FrXPI&c=pl#Kk^9kzY@tu;a{o9#P%cq zIDRCWwQUGy001n&;=?Wf;SK*A(~Bacm8xr;e}YR z*BU;ke~lg9tBYMfPLCMl$Iq-*R^%t*%L}iFh6x1w^?Q&Ii+v3=rZqqLYSmECRN+^k z43bl>Prt~w*XJxsZDU+5%+HnWDeAG6XQJ`4I;v*tOi5?BP9E0c*@3W%sA7MNFzVEl zw!k%T=dFNm%*cpaVq6PSfEChBmt*yhF@VPT;jY=jE|pbQ9KWtNl4UCH zi1||;-kc$ULL9lV*u8`(Ipvc86S;i%$@_Z8QCLp5qf0CHQ6}PcISgJyc9R88R!Fci zFd$X3X-MPh3$p%>&dqrE-fx&ezH}Xpx+UavJK@1Vy!l+p5{cDRsjg!<4$16Wyi}|a zf#>D@2cjOUEA=l`tuXD5Yt;`(wo+z?b2@=mA43M5z0_AH0005~uL}&2nvMeikN~7V zi>QIpz1pojPWhrKn*f&2dtbIsl;^BH5p{6ym(cv5z!(6DiVfrww|7aO<4CG5C}`i$ z-`{*!|7-}YUkLf?zdr^(zdwImFB{LDz8BY7FzfHEFVE)#osAov@)yMDUacD|{z7C; zq)kvu;5?9f0LbmZ=LApf_-*K>J{z*jVhAMwa!7<2iM@00nP1c$aK%3CS&uOE7&%3f zKGWNA*e%j0e6aIA24V2ixGb_*+d3t0h559uQHC8DBr?w+nSER?1jPywA!?lUI%&`4 z9e*iy-g}KVu*V2@`5= zv?F77qjgJS=*eC*W9TJsWyv}m2F2(;Jb6`BAS~_&PVRsF5_<{iX=X8(O$s%2bX0W+ zYU=65PQpAj`%OYUYRAfw%92`v9S1N#sgeHb3iqwy7{JU3F;@V@@9{40VB$Jyv7fDV zj&JUDL3`m>AuZuA;dc;sAznP}oBHwh86j^VyFoB?SY5*LwL}glWyT!X!p2p7VZ$|K zak;}hkls1b03#HGOia%AM7zBnzeW8O+gQi1Y=e3J#Ee5mrNxAL(5sbKKj}rxhqa4q z6|n=UgZst(YCTxM?Y-3wD73yLB(yXcwZ9K@e~;pGX197D_3U%uE%e|+^a8|RkJ(&{ z&a!#n>a_{Bi9YSRD?|;Eueid-m13rDKuZJD^dY_njZ1I4O)9hCv(oGip$lEvP$8q& zG$S@xPuLr(=r~Co#b$CzJNRC^phTyNujVAF>YS4(b!Ht_4+0TZDQ{Fp8e7xvrLF+a z5-s~UySLtlMA$SOk_kBDoj{P5h+#kb5u-F+z^FP&MOVwlBGltP!ZGWKrdNvb^Ua^jZ%YUCPZ*U zOAfZxyQw=Eqx@$9**WHu5Us=;tPei=_eias)mg;Ad%}_T{qF14rgP$tDB5?oU*~>X zBp2EkspOMXM;uLeTGCXff+2{aR=bocUGTaiL1!k0o; zmkH&Vi>Uszg;Uf+BN=aRF9egSV~H4sLFPNB?MS@35z}wCuk85T;11%`_2!g-M24p3 z$qHA4<5pdcHig<0$7Vnxsn2C}amOLroKNUBAEy@gW?4BFur6t#zUc@spRLglS-;1} zb8HCsf`PPV8qMg}LxS%|pNMrWqs9gym~|iz9-byv3FEo`aH2^2rCzCNRM5|R#2z-N z6MzYlfHG!$P)ULP+}_6f1t|=Rky1_9bcVF-sb*)!Ns{gv#@0;&oZ-oit4+v?LLB@( z``#cD-o1o6^r_0F0I@D1A*Ynk0z$F)Eg&_!Ww*3JEskqgq{f2h+57H_+`%>DveuYme?Jkc1Ha=Y~^i* zS1Ex^^|fa^`4(UWRq+cv7ix8PlN_)(T@dvhmR_1yNfTV1(0VX3iOX&OCFR(-thqm)B-5d!k1D)eCp z7D+-dDB=MTP8KT_j;A{kuqx^cjvT^6GiPQHp02V(9lD-OFW$x$PQOsh_h zS?7_gPIkyaO?K+^9+(n?L}N7rkEHRzvhIjvTQT}H?WsI)(UJSJ|i zH^W7P8?cD!ch-4?K@aqMw%xL3UA=3_UWt+MIf1gppxJ5W5-Xcr*nS*Akl}^~eac>- zbtPgjIUZ(uNhnv~uGqdg9@rk*x!41}b;4?IU0{sW&Suh<9Hvx)a{2^J_*qf^Y;86z z#O0R*NckUIl)e^_&D&d{y{Q^Q^&43TE!+!>P|s#Ye}Zp$I_}`b=8*Ql12-gSPW2*5 z)(m3r>&5DpNf84Qig`s!Y!vPI*SgJh8;=Hy^m<;NDwxz@zD2N~DC8Fb4w_=zD=l48 zqizKto~=DK1$_;6rsm7*ithDL*9_gRL{`2B73i0DVYG?W!(<%DQz2~PGy zb5R8`gMUASoqG5bqE$gmT@qpjzWLTv=l)3%cziveClt*ptuHS*O05@Lk61g7SlfC1 z9=$UP0Z6TlS%*>12RZqyJ6i^R%eHqKIt$fA2wj}}!Mbt4f#{#2Rh9gNi5QGinMP z5w@51g?{jhS+R2ffh3SR+ETUe1(K2m~=&SVhH#=r8~xp z6eV`roen8yNZ(B+aA4?L6P4^3bhCp|9`b2?S;bL<)!8|;Maqv9as1PXCq_D;7G$pt znV-juGl_6WGqYC;=`{7t7s5aCJcb19_Yg_c<0}SPd=~g}qLX!F8+*^i=67Cg!ae9~ zm=(szX~>awayOouc`$o9aNb=S;a6@E+Rt8Wd%RMyHp;~hLVt1eg!MXl9!N; zV+#S68{_o@xXA%GM{Iqv2B3Zh9f}!bo*$X5MP}=wj<64rD)Z|+??l19q~<##i#thp za_({4KONTR2%Nta6O=0E0T1UVRZuYvDV^>|snkY68o~FIjh{vOlq4|QjoRfx?s_*) zx5_;5_p2iP7>2&PIZzME_cG1$CmG->(-QT}Z~<1q)&m>9zQ@_Lcm}^PhQHheKO#^1 zevCj!>nL7!z{mSqJK)L%uocno)q3?FnOxt_tLWbMoCRQeU1P8&Nt8+~ColD&GtPq|hfU!9Ai;%G?? zN_^cN5p(<|CMqAifmOj&xX^xr4JT)5OgV(sVZtv=*lWOjhCT!Ms(p%`m$tsCW`q7s z;%e2Z{W3(OVz3m_qKPK<#>Zs0y{dcxXTrKswwMhsvCG zI9?-1e-HGB%lJG}iYLV=tB&SP-q^90PU1V2l+-L2nHa|<$9 zX$VhBTr|P-^H~$38K8-rDg8WGmU*y5xPs#lK3tKX8N~U4ln#-DI%+TJ#YFYK09SXj z36}pU?ha>)5+JMzxn-j)L`Wbqt&1?2>8&B2pw z?tRrBAx~c@_!S6prF(9_TvcwpUA;ViUVdQhttFgvT{Ufz?@_wM7D^m3G(2k*EOEyN z85x~LAC{)lmRJZC-OIr>EjaJ4=9{Zu{L+)gL5Q=^UtPs3QvHWP>j)kiGGO-F1#__UYS{2ADaljU) z9_U1{xU^oC7+=Lk+LjU7sERAW>arhC=Tldn-2?Pwma2=+G=hsCr}$7xNv^ z!C|O=nQ!F|cW4AhhLA%qLyZF*e=0kRYG+EpwPr3G)L$IX!asKE%|v+8uEyIKHuqyX z(2Aqeq*nnfUaUd-u|>+punQuv?F=f(X`>TZ%(j2lRcP{|zj4x?JeK6SeR#TQ&|T;%#S{`m%2-7W)nk5muJxLS6m}mre9ssN zM5rM{iR|M+(47rU*A)Py_8<7s!&KH5~@Ui}qDABBNj_r5)EsKw zfiSYi7gB6b3hZ~&0p!*YVERA=4>^Pn7kyEIlrR6CI1c;(K8e~+Rj5_|l?sa;7T=p} z_XZlKACdP>)HD|2fP_&f%(aA!FzOFKaN*hQaA`M)BwnC~ocMz?@12PO0Em6kTy@ve zf<=L}T90+|^u4+i{&lBD7?Wnv!AvC=x!Y0j3)jS~xPnt2(o@D8a6#XT?>Adu0i$*|)H1j9{ggg$2Rn9T;q8_X6a1d_p0I z_ksdi#j*p#QTu;fR+`O71jvaf5K0AXf~UhY$>sH-q4K6)v|=)d1{fR zebv~45t!DL-fFK8iKI2I3uxJqa@rkY-eiNmgoc;yYQ?&7>Lv~pgno4_E7!#Ggz)-l zip-S^iPp-}BRXu{8VaOJc@T@G7v0x~lhbx19Va0u%O5O8KrqVx;4)^rltYsCHTRv^(OY0le4=A#nUP>elQNs4qbqzp5ubb!4D ziMak4l0`qAtYpZn<@gcK4`V%#w;^MdX@tkyN+|Ke!|)e)ArIFHRIeRCA27pl&`7E( z+GWuc-xYVkRoisQ%3znzYX!lz-&B|k{u}m9tYpV|zb%oCwO&JVq2 zL%O7)R;KetN@2CofYzE&6k8&g zlGTxwMd5xXTJ_zUdD}E>wqusN2bRZP>nb~%rBS_KT>x#Evjlv6v>Y*x)wiCPXuz-zb^VK%n%hf>7^H6Xg|KhC>e+T>ETF#5z_LC3Hcy#YJqy?XSiYC|U_17tRhM(Jf z%C;Mo3Q#f(PyJ}O$iJPt!NwtU0GVwm=Zm^UNLcZ_ZDg6gs)cW*5Y4Q}roa6L03%B| z3LfpYI8e$s#F}4C#p~D*lkw1Fm1h&R@FchQZ9-oZ-K$bjBpGpmzLt)jk!alt0A2Xj zrz%K8<*wW;ghkf}Wav(!ULU`DZYFGPZu_6x0s2-r5Tj5Xsw`|kUNOG?d}uHk=_yBC zL>jvCL}&$;uC?P4F77P6?fCIpNM zSS^5G%Tmn}H)rJE3(TaI42HF!0}o8j?yW}HoELK_*JRDEvDd*~MQZ7-T`bT%?$O0w zKo9a)u4h!H7`o^LIMS+NGu*=zlZ|Y;d=KC{*`E-UTxysBt13gh52wM&gGZRM5=jRC zrl0ycJP)UwfXWF69^$zO=rgt`#QvDBRe$xy_q&l5&&pjG>F{Y!d z_6WY?5fa@|ki71KDH&MsePX=X7*JNEaH|;&$JBnaG(V$6eQ~%`*~i8dPOJh2eO98wQBnh`C$&(vs$3TP3z^aue=a*! z$REh7=%w&QAU!(ID`KSNIXE-lZSVRBVv1uVo|dj`^%$x7@9HKhTg%4V+znY&WdtBk zG%Mr*D~l|ZNdj4o;42{?4?o?x(3|F%V*Bael6YcDv=I@Xze&-58p}hEg{tAO1QSHK zW6*xrJVV;hgf6prz^Ot_Yqmb$qWo=a94_X`9VmNrsf~euBGXQ>as%hS|Q8W>GB3^TJ`uHg57-?SrW~6Q?u+HhFomQj=NjPF-aETMHYYXLx88sc(8MF zCBy8sIa9jRK`v0Lf!snw3PME{G(r&^A(;HnHQA_=!H)ynF(AS%LH9{eCUmIf_D~vA zGQ|%DtQT~m8LNIrcBFLA?^kp~$3u^~o|;$eqTfQecg^r$VSG84MnUiRB-9^Wi`=Gc zg7qQRfo|z#oJ`Qc`G@!EY?aeCVTb^-ry;kr#!@Z#I-^gmrzt-f7;MN8>b3Q1_oT%J z6lk1~X!NTzrCsJUcuYe8LCy_h9yos<6#p@}VFaA4qL9N9IsDxT&D}~pSb>W`l4NR` zumJ`g>kq?NBbS+B-f{GdfrOkF^nHYHp=21CxT^Ak`nsiGgXH;iLHrLE3yBXGiTR)q zzTA+*&=e{Yhn6S+x$w=+~30?&plP5vgl~ubn$(#yK5QSv}F`C9^(^iUixX zC-b^-EPKUP&G`haLE2FEd(Z>SVX(p{*;KKz*~y097>hy(#7@8%qw|zio38Dj@Jpyv zY?GgEwcQYCu~Nt{bM3#0=UBr86{lP=A4^(->lv4)`Fbl#xT9lLN+#$#)&-87Pinj_ z5}S7sL@9KWX%e3o){U*gdcdux!R;MCU?<0_&5dgkPgSNoGDUjIKAL?~n_*bmmP@QM zGsD8+l`8Z^<@he|@%RbKaw>lYW|^y8Q|pdF!`a5eyaF$jqg>3zC_=v^sPVkH{I(_( zVC?eVf?dG?9m(f+(d0twEN+`=0AfLWrT?rDl%PK`sm&I=>J<_cxfP2k(bb}HBG(Az z!&uy3Bfdam@7<|ub)sNy|4n3lH&iEH<+7E^duU0JYR1zsjhB6%Wq>`U$vqv8N-{0P zy5^m#>wdix$$vYBmVBAnmQPbA5W1Q>WUiNCsFwxV@7G=B&6s8dwi7zE-yi%p5XP$V zqnR?%RpTyQG#&J3tSgg)&O{L1c{F`ZQ}mML(T#^gh}qlvsAedQ7>)Nz(l=u>oOK`) zqy$9I=z4R`q>=7nfQJdK#UqqB$@z%Ld}^a8^@taE%*}Q^xAYJfpAP%_uD1{!ABKdm zk)5Qiz{+%^&qd*B4)0@K9hmT{hmkqpQ8DM|wvQ$c!UsCkSoSE*XLU)Ce(f+As zopNFHdfh&B4T_3{=^S=3<&~ zMIc`PooMX*`&9nm%Xf_L!mbC&gS$AB9^#yqTE-ka72}+xr*TjiZf_QV%amRVcQ*A$ zSsHZJqWLJ}NcVN+VSZ<+{gJ13>Q9MyxcB$%T7(LjpLhqp@s(vx5HC<_hS1Y~IRyhx zG7xmoFEt9=X6+q0dM<#Uy(m+wg=LwA&=U70gfh1^qOQMRb1-($Y+G$2BT+>st1hEy z2tqLefS+JO*Xx4+p}*?*3X|RPN%tN6CHxhh!j)wX*QQByBZckace9d*!-edC6~>Ko zs9!$^TckLhUlPA9~ndW_0;Q>{7verh$4-FYfm zh@0&eG47sEZgd`JHI2;<3Eefn)*MeeOpFIvG++}S6v+J&qu;)+eJerzeo|{6d)hL4 zjdJe$+7^U>Eb2oau+$ z-F4It$d+k6gXDsnSSjp86iA}iZgb|!Xt39Tbl&KVDmJYRh~pZSwUXZ7`a=`-3j<0M z%b4`!4VWH>`#Hi*e8`;C%VuWp-yRovBn%!_LyHd%$ou0R=RT2`z=rZLxzk6h$ifZH zq~-S22=_i|RoOH(7}@pj)0fS`0BMTFK&atY0ET!kM~tu?Rwu-jlpDzVu>oHy7PwD8 zE}FR*_JVtb7-{AnJmQ0%uLCzp4_$x#V4Xcvui6W&ijpffvBZ4BTl63R=vZW7_0V=e z`PBZ#2(*Cg<+(WWajj=Ov~?F%{dUB5Zp3f?nj^7Eq+TZKe*`P?((v|zc4RTca)YzI z$ObI*yE4UnC7UL{=O0K4@4HI14zWt7-%MJWpv$(@B-1q1q?;=Lw5+6D_5)hjw!f?% zAzMvE_4eQ*y*<3yaBOqFe@@a|Hy=4VqLXv2npoc(<2W2C+}TDGk5nltSGZ9#mEPTP z(?vuObq{OQCaMy1AQLolO6N?4Y_AJ9WpovhWdul)kZ2%*_^-VHUCa&EYrJLB7#DMQ zvunUFBvK}Ft}f@hG8~rirkm0kHAEXM)fC}-tJAV?e#p0r!5n34iV*tWZ0qqye1%Z% z#xH!&I_~rR^`V*W*_{tMkbu9jS5rp92QtBbD$Ysa5kv4xV|$!yKm+pd889G;8u?6O z8dPX~=pYOsZv!E{=gBby_f^C_Xt}2Z1Tfqrb&HkwgV8GNmPL&}5*u>~4 zCi3-hP{yaqhYT@R&3oQwP^4o|l+YVf#_HT%7?P&PSo>?^Gw!`Qw3tj7B-d5)?)^}F z?7NTe$`W6>Xwo z8K_dho+J%?E~HKpOEzW{#`$6k&)tiM3K;D*_UgxT(D_1hN8Qk*4#L?hbQntbnyHH; zVv1f0S4^W9onxM9K z#w)J4`YGkKE^?Lr)Dih|;wB_2tAz{Q;ECyH6ZpqrB+~?5f88w~jKTbzKk2ZbSy}dy zfY5!ZN~KRebD$YlgBdE5A}UeTmNk6@G(d7ZfwZYVEV!Opy8F%2Mhyqi{!CpoL zJ>G>zSClMTSj|IzczVcP=+alQ&abYKObF_f@kK*!#ZmtmnOjEpEh{^}d2~ z`4gu-TXReE@fE7}${r`R@KO|v&Mu@ix4aCh39mVz^j+@u<= zP{>U0xzA-~O~A)2R|No4_aZjtIbcuhyy54aE_fIviM8!cbBBc%XBfACU_ZT^)pFwnhrt>VpA@e0CMH@g~wv_c=*jo zU0g`dJ!W4u4OL`7um4iC3=Aw|oCFq&4oT)f??a}|n2qPMt`m+s^Ld7ZMM$2^^x$QK z?(ur_S;n_B$K2B5_^T6Kfif=gMog;}?p4fsh8gqNYDH^ygcBk>K*?&>lJ+1`A-Jop z_u4o4G;tU2-HmDv7%)jY)10YdXO8h&983|6W@?$2AI}Eu$nH!rd6*w?jD`&n$Sk^E zyl%*KJkq z^G4+anDi5$^0Bs-OvtURmJ3{Ao76qHRKBpv>^ZtmgJ}4qJhW&UjZ2Eg2M;_+++Pk# z)5j;XD4e(V*vqd}zrMoZ0mGEU=t`Kwinfx$%RDhDa2>MwE z-xqM_{EdTdJ5vIlKBkGfUwp?|Ejotl9Kpt8gj7iB(6XH-zn*$fB?4a$Y}!l@5-*cx zzO+?J2<_$mR-9%iD>TqRmh=k<`l8OwNDAaJQ&*g`i zMs+_{n2MZB$LcGISF{r%_9&u47hR$C4KS5cw4DEDiIlIrkN zw!ug`-v*Y99$1<7$pQU6s%DqZK)3kXOAur_0bYMw63$-r(51V0h6qtGMf0E^%Z}W|u)`{dyIC2gt(PBAWSgX|_kkA+A}*|d#G6`~S3 zmm3A&-(`+#5b;)rLlSP}=6U%DCOt}O?NnNEu;!G9STEES0`uy`{v3U`ol}Sc^kJ$e zjObZX1bC{0KoObbYFON|lr7Qo)Yp8p#0(*dX2ed&-i09z66rM5lSMMw{R2hGH;o!Re4B&(VPNDfBb00*Y)|IEY1BAMp1 zQFhe(nm_yrBgumz4}6t8Tc58x(BsWcNYn(eZ%i3gnRG0SU@a>eC`cXK&kTebp-gX$ zmkZXWDeCQFbT?J98$Q6?MDR?k0()?)ht??2KRlx9HoLy*5^@Scrs_1n+D zk=P{2tlXx$c(cHKg2{ZLg&RZoti&AF634ObIJVFRK7s{PJ@w^y*UWY%gdqcH;NkM( z1Y|!8Ya>HIAHf$RZ7@+~m+yXg7gTSIquvM{ssMXohW%L5hsch{0Bv43Ll$5+CPO?r z*o}WFv95UHj1-}9->L;>%r8;qimNytqDQA6tl5jymF~8>i3EJA2m-j2qnPzujM||c zsHE>^y_xuT*AT6~`u7l>M!uc~K7!oKB6lk_I8&OMsuJl_PXTEnWq#y8o;UC}5lJyC zj30!Mg3T76p7z6LZ^&L^ehoD?vc`@qG{M00$*p_&rM@?7FQBt)6H2xRDF%_y+R;GR z>RJYhDjljxWvJ0f`=aNg@_rA44wS;yGrUl!ClZK=YT7;EM|xuMLu0;b9FGP7YMDO?ZhES=8O?>U@7Zt_cW}Ds%~R3<*kt^&%ne_;}WX)hjLtZ zR*EKZ2xU~6ey-3<$%Vk_n8zHfPdlzb{aL~_`HRs!^u(mv+av!S7^p0XZM>&VgQetT zur&Y+H+q=-`|Wl$em1`#RdY0E6VZlaH)9tXGw{I8dHt9j)$7x*&uQU6rEPX2sg=Z3j z5o+OIxYzZ(83Os!DJk#25{~537jw1xA z0MkUs9K5)z`corIjBhiCp)40rtvqM?nIw7Zaw;RE->?01jIumEd6(a>ts*kJ{?mFh zZ(61JgQZp%Kim45O|V#3Rgtdp!b3Ec9q|P*YoSV5p%3c-ZUy;dUj8Q8%xQE|xEu;*Px-yW40?MeC#;PaH zS3-xrU&i7WmeJqqu2)liEGj`-^AIg+CEEb{{3HQH;{3GiVio8+fyfM>@rYg#wvY8_ z51NL3YQJ9L{!C1=XX{9R{PljguYd3o3<;AGVuU(Rs-PeGQ&*2;mc(Q0wB%7NG>tU6 zkiU1v2BY>S%ElBFG(v|&k~nQ4^~o!hNzzg@KNq=PS6!xnc#Qvjph?g|?S2l(+7g$E zgzM0-Th>hy?6+%MjF=29)o&Qr<-v#{3xYNNK0}yf! zu>q4zVg;}nJdAFZA=tNVa_*d*}R~FQ}HjAgB?9Swu zG_o%eJ9C$7sFzD}LzHa}jgc++SH89%8v}iPjozPOo}W=pnm1z%)|=mbJn}N=`Xb1K zMV%*E==byL?4vq`H4EdKKjBm5tkpN}O7Nc^p69$+U@Sos?RUKBlwr4K-JuE6u_V30 zI$G4`i=?1d!E%|xCtBH-=s8Ukf?YKJU};NMnjc|kWOVbNe&o5Zra2}())CqXjAQML z;y-ru+=!%Mu_HEg+FJg!Ohnx&BbHtlQOwNR+4{{3=0dLUC`R3i@sz9XRxSL@x%f9F zr}2(zDiLBq;E_x)ShCS+J0{Jwszt8z^kEY0!`;CqZztPtdK}lbGfPN}Y*$?q;uS!w zBaIpvo$tJbNr1L!BD_WJ00~Q2p;K2bm>m5AgWeZwvBzC4_3D+jJD8;dd)Vtu%nEE4 zRTO(RZx(sl-E_cV0Onesm-o4VUrh^2u&E`OGVv$TIsMt1E9{)d(X7m|oV9Y5lJBvc z=8D0=`(<&t6L74}69hym>f;8RpfyRaT{=*0B~Jo9g>fs7i+bzn&i- zA!A#Z7^~v6lnA~t?u&&eUqoaxev)h&wV04Dblqb|T(P1(%tfU!rG1D+#*c1HCS~ck zbKWFNj}dowy+GOT!uT`UPUqGJxjWGiW*X|DcehZMTGepcj~bDzSgCCrkA{KOdQs5A zYrBCE_g$7y!AsWpxu(Z`AD>rcK%26D$fZKzM|x6VUXqt_;I=KOfmu#)fl6)5I>r0- z%h&TWcqZyz42>`}HNy{I3GU_^3o(ym!MoNSYLv~mG0ta}q~a+Cq~Y}3Ucem}Sv2u* zRokbCgvm$U0)yX4BD1+aq%ykW7CD{`vTLt;#!e_OZE))kzVWN4ty|@C=JAr}%JI(T zxu2hom?bt!pt{W}s|jQWlAj31aw2qg1*d;v2@HeZ4-vpX6wQ zjAW5HtX3GOQktSgolrF5P%cpjEXY&8p=V4z-;<=(Dat9lr0h!Osn8TdKWke5*=(wd z2A)*qDewNoJuxAru6T@AMp;GKl+=az0E(qS^gGDqjc9(*(I}QdiO<(weylm6p$w$O z^-*jH_1~+H!e}Ce+)?1dj6ANcC7@1OLr_RdiAlJS6sKnF%dw>oAknpeg%6jS7=j(I zz}|3>R*t%*L?m1z99hPUnd)%7A>ayfrST_Nn9e#19Acq+; z`pudg_!A*E7)|mn!n40I=Xc${=AnAMJ)7C^v*L5LB&A#bZ0p>E8&Z?o({`C`_- z-8tRy5;e)n*yJATo|gP4b=kP>yE@RFf|f~X-a+~E0uU$qi3Mc7gFxa=6VD9A<;dNG z(1EBm|A3zyQUkW)5Y@@qi2ZY#USjr>=j9;Z(~`-g4;i@q`y(>M#(uYxkg|dAxANyo zBbPrRZNt?s@ok5~8n0Q%Vi%=U+1JkfWgR;)#vH>8$o!-C?(;BxKF^ss?@io|Kp4YX zT1i`QX9_+a7BM72lFXC#XVne{8 z@NhZ72VC7gjkhNxZ?tGI_Or(H`Y&w7bsGri2{R^C;TeZS54HtDcN=HZX*#EC8IQq> zNg+C+0{4)$`@(Bu^D)(-0z(W_sRmz+*oa|27o-%CJ-yBv6v5%p^3>h6JEaEtK6OkN ztT7b7m-ch)xANCfh@Z0~@&KuVhQ zIC%;8tECw@FR}Am4*H}Y652$KLNFN>FxM@a3%?qCe7%GBnjb)3;mu}JRe`8WsgUTO zLKm?@l6EWj{Bb^NojX%#{o(N*f8Dpk!B?p1JnFe&DWEawGRIg!J(_du6O>!7RX--Z zqlXNI#WJ+(CNAXZv`WKF1WY5M#FqztY&Otoza9+OZkT5|P8xG4jP{0faDGn)o97GD zT|9@af{A3W?a0h3rE8}5mKxf3TTq1pUy!myXKsv~dj{%IZDp8xrcEh9oYFt$_ z_(d;%3@GgWvZUmu)=JVhG=_`0XB3AI@YKbJNO*B%^eR&4ZZw@1ZGqT~UAS^w5j>&o zL94=%ne&nmO*s_ivUYEZ!}HsPg;U}u;-nCKEVDT1ee}`=j!D^H$gfpg?l=wz|AY6g zj4A=sw2)4XumOWbxUa`CK2u&NRYF*8{)}>o>Y=Jif&-Y9&Tyz4P|K!H^**kx8Ti7g z?p~h5KPi1IJ+x2XsKLHEsgV;rTFK8>iI+eS`6tH!(f;h9=Y+T@ftQPJDH)Yr)LBbj z?iR!M*y==hY#F1$oUbfZ430SG0Y^kLw_jm-K#vTbxx~ch6o>lONh4h$FNZ-L-atX2 z7ObBUmv1r4?GId3r+JY`Ql=U{dOqa!yl*w7Qs$)H@#f2H9Pb;q=FJPHFnI)O!rOeM zCCg)^OU zL}VVLs31UA=@lakFOL=Y)&&TXenbL;)_MCNmSWocPyr1z)66c$%H8Z<`?O%Uu;sWZZX7 zWU>AD=iYZT9IW{U_7! z`nyMYvRlG+lavqI0mtM`+3>~l5I`uaczR?~u$D+>7^9!_Ze5%JaRLi^*o6YkkNs5) zPTC07w6VNI&gO;_*f3l3f$25i&U1~JTXMfJFbJuvyr|IGZzk<0S6X&&7LLGzb&EA? z>DTvVmLNpyG;?i`eiA?-8^2Fjoj=%mMeR!n7(pqssF09 z_w}FM;d&pv#mjk7z~u?wF8Ks$0!FV=ZR*sMGSIc zBuL-y;iJ}CT9011Qm&Nyi9KV)~KW6 zY`R{B&tRS>iC5RxL1!?&KDI9(8-ZU3?cbLlu3z24lB8_<%Z@;5_7+5zWSd~_ zXSOpgT$~nNJ5+J2@xLA4UxtOHRVDeL;yusI=m68ig|NuDH{I8SNR>6tS!{fWNFy}6 zC5`!+a%s$uRzz|#(&`+lPnzEZCj(pHDf?o6J>iC>I5P5@g3)32Q&!pZWtJ>>^cy!i z;pHmM6zkS8@)CCPzLAy|AiT{m?f0R-A8tHe3LE_zqXK3SRr@D9%Jt(+m-^25PIe?< zP3Z8Cj!Csxoe%rpy@V;URZ3&yv$Y95D_$7p7y;337;%_*1ns@lF6#du0Bt~$zXbni zdjDU73rnG{Q9(J?>>p^`_$BO7Fh5Vt+B!Ft#YJQ{LDbLtGX7VVJtwoxS_r zGxc7t`u?F8dqx`07Gwzf8xRVoz>Y{694KMxYsd1>2{buxJrwVPtDiST4Nc&7sT@SzbQm}xrc8Uz5PH~^0<-=%R>vI5t& zaPdUE9Tj$$2%rnPKG5q6E4LB$W$@*VUp&{qEY|pcXWswk#{K6TfByZ(_xFSEAH#qD z+4%G4!Oy+1?`UHI_(1Rx0864kF{+o~;&FmwdfXD*{GAG=xVEq{uIJpj&?{_(PRy%) z{LxGN;HdC&E1Gkn1sI|C{;v6F%9xb07fuB0gbv7S?m7%#w!?n1XLS8R#Sw3CK^2-o znCc7u>4Mufq^W4aI7)ib5Ez55-R1JDimq~ebeakih_6FBYRnncJ3??T+)5meG0&gC z)N&?=oF9sEXaugfJP;{E>qif#p;l8u<=Fa*I3nHDtM4yf9MPFl{-i#KF0%-_OVLj> z2H?4JXv}fU^9=n*`2SMivmBoSzal>yta6}a4SdDI7V<@0H=kzgfw$0VGjKoaS=j0W77{%$={64z}N zU!->#44u7j)Wm`5fRj%T1#qa9$&HerK;{4gzEg1y&_4%Sik5vU*qh)}-a!qh+R@p` z8W(x*NKhQ(s8D47tqk+le(}FLJH{_3aSCdr$2um#N1y&i13#p!smOT;M)<$pmw%_w zy3dlJVf>L6MgN+es^(??=Qh!N3&r`^;{{RXL-5)jA-OP`V<)*tdBnDvRABAOJ~3K~#?} zt^&e*k0MtD5K4w3FFu-FN--Qt<2NV2v-Bus5q(Jo#PnL-<1g()T1gmdxkR&eghMP( zG_K;HqLs5&MG!_r&@YXdp+L`#xFThz2j^obu;x20%zhhBFKjI$(om8!IFhS_Mr~m% zkCdFL1Xe|2R^H?JoaERUB|H+Xp6ws~nh8Koe0X-kF{}WVci8`0z@?7Q5_~?2>k?ca#U;90`{qP;Kvt4lxpsD?5kQyTAX@?T zW+;g^bOG*~2c0<97F;T@1w4C4BtTJ{X%MKq$JV(Oye+;MDDyoBALQ@8-;Yn^AzG*n z@bQEmH%|43W|CTM+J*p8QX#d+0f6#UX5X4;y50IthH@#1U?Gloe-5dCH93SJp4QjB z-Z$2Ft#RKG0syG>xaDEc!%C)oMGXLeg=@?W&sWabu30Zy3IAVe9q>FK9$p$z|XPM_H8pLzc<05bRg=fU^4;XmIS|L4zxf4>bs4^Q-KC7}{)>y;tY5k@`c zMP8p1=mXfN#Eev0HsUEqt^B1nm2v543h(7ywQRQNi}X8+P29o4W*H#RvMMES!Kz-o zNE#sLpZpQvF0EuH7nW=VLrLKXKJ^4T-wa0UdhR$a zC-PVuZDmOP7O$dRL&~rFsBbzw!8cIh4rP51of7y;kJUQ{_BpB?<1h&3Z=s`_Ql50> z{Pdk(bJUTPX5i7a_|`ce4K-R$YCKn~lk)F)#%s5~*y=Yc|Hbj8g0BT!7jS(9D{251 ze7%^I$_)bUn+`z=d7M~gW^rWc-eCx|tx#4nk0o6qSn4nhBj8erh=50N&ojU>p37k- zFwW&}l(=(w#}M?A*=eDn2?npw*;JDF_4iPYgHNW_%LyObTyx3nn4EeN=TAfxBqaJ^ zDyomd{qgfR%=_C9w?whSI%J=lZ+fh!QE@2$ITitGs|+G(f&sw!n?oK5S+8m9-DK<< zHaa<#e|=N^7`^j;O&bo$hzaWSd3(vsX?-*DAS7xInu1+=CEt5y=qBQGz6Q;+lTM{F z`)nTHCBK*v_=bYd@o>L(hWp*QRV@`iV7vF#;BIwRnxRjZ<0^uP03;aFuv6grEPR>c zXKy^)u(LYeMKVedO9kcY16dIbFwqR(3Sb-d^T7W6WcdFZ_fJFsetsT&--dsG4FBGS z@5k!Q`|w7C#`DBHQglpl@nwNHU1OEO*QojO#FfH{`Pu2&_I@PrUR{8CCTIIxzXv)J zQwh)W=(~lDi#cbtA_$l=c+_4 zC5SOTW-K_qV>JnS%kN5iOvfVmo8`+LaL+dAh-QB}Pu{XN@sBt^(>`9I{G8i{il*|x zTd4V!F|`1(FW({^IqaVo3QIm@XFLA-{TpwBPL&pR)G8YpV*~Lhg@G%(!U^v=Ddn%> zXkQEXT)^i8{PU&we61+fuX9jiA!&xuvQeuymB2_A0*M)LZNOHo+m+l%Ckz3LVnC10 zfvydhIxO=LkMMAm*m>@9MgpWHj|{*if1J^&yqoqfbv_hPZ{WcHBqK2tBxD>P!Xcg8 zArnY5Q%(J_z-TfGuSzguD0uG_fUsG~N^FMyW%2`tSyLR-w#Zv6!2o!Vvb4Y#KmlQwMaGi8Q@o~kH$ny?}Sr~_0fRiX#yUb_$!68qC~F}LqiCe%eD=mw zrzehV+ls3?QAA#${EuMEkrN**8^w@LwUdT+@lxlV$?xPnru>Qx-ccm9$#53voxcf5 z)vYOS{GQ{e@y8Wo8UxMq;%yX^d`ed8dn?-NT}3YVjGW`Hei(YEI~+LED}$JnO658Q zM*P><$Rkwl^Ecg|*p8TbE2vuVHzFd$L`E}e{u~wEc*73oa@Lwn!k^=uiQW7rl{C*B z(Zmiy6VOH3THxKYO`K#u**A)|y2L5G0xWgpaUPNXU%=;z;(Wan*FP&Z0*a9;x|*3B zl*~Xok$GN4F60lbt+`WHc>V$<`>Mj#;HpqHEU_>EmSAncvN#}UNlYCp^(}wL*&`7AA_q|*w*Uc1quYQ8ZvQ!>2IAR+3waF2gO4!{FpP^ej zdN!^03V+WR9D`Y4{=xw3{Q+ij1invJk|ZBCW4W)hnW0Vt!UXyU+aj>jywycOJL zxtDzih020Nz5ot|e(o5vBX-ogZ|pz+;^*Igv-1DO^Yh^T+4#8)_hZ=GhtW6xmn(!M zls-=@uM;b4Ux2LM)}G5T^*GfrugHi1PDxF^FRhaERDi>IlhHcg5p?0!#L-b6l8d;5Y=g>}Jc2PcK%mxi z;&@sI;OHBrsfOy^mO_qwMTk+XZDHM+Vxomq^r)f)g@=tDOFYB=9-Hxrm-4?Z!TKol z60Fa{_0JVcd~2p>M~QJR?ct4LCxyf8ii6FwD9{PQ9^Ka+yKmWwrA(?0RmWO_&k{W5 zu_=(m8qS8;7o7h8fcW|ITVWiY^s9>Xm%xm1v&=0Rs)x@rr1^N{Q7O5tET?X&@X?q! z5f*p|j{T+QvqOna!)MlFMS$@8K+TjG2dL_{+8{|k;J3ea4-JWgh#RH$h*6b~IT{#(|Ln}(M&3(gq*Xsx2ahlryR3cL0tDuSDTz-floqe7+g_I#6azTZfya5=Hh=63? zt^~J~NqjMlfnX8qLK7d|Xp%HN1kK3x{0Rh=X6SH5d>cE8pj2ehsfj?v?8y8vn6pYC z_CB4et=S2%=Q(<0tq>U-FW3QQwiPLK!V&Eq?Jp zR?HV&1+~RqrY!jGNF`|1LGg!mNGF^R33c+gr$IpMCFjrp{vB3FzMH%xAf!hdv8{B{ zLA)G*q+apL?9tIS1_lWG&=$d5PE0z`OO{`J){qjBouU9L>RU$XRQdT}rr7%Ur-)Fo zYThs+Jq1rxs8Y@x$NFBOB&ks6oc(en+#x2li)}0Wt~=r8b>ys4JZK|;8Fwiw0Cm0R z2S>{K#FI3h#j@b9cl-Ni0sp0f&!t!&fqn$*OR&CHqyey2AW1Q8bjHmgJ1hOK;R_OR z)d5|QWsqwDc9o^$Mx_>ZrMh8V3$}MG5#*+VJ9ZdW^N0d0!QQb)0Hni%O_IqZFD9My z=kJHwU*ivnPKK+8X5PssW6Xk`_N1DpU*W;gpEJCllb&E2O4yRohx!%zCev@3ZPEBB z$ck^J=~BwY{4k&ryDQH$cN1ir<2ArBE?#Uyq<~@k6cFY;C&R|i-y%K?0rvO(uPt8&JN;^q707yk&Py-BuJeUdYE2KN8Op#;t{WEk%Dq)&og&K1F! zE9$r{Z5&F2K9LSc#ZK?%e3rd332&Zj#zRy`1c2T2VXSx<^4JEyV{T%{!0^OH|HMv# z*Hr)&ZDp;(-gxc@Ki@x5{P*+Vd3NA{qd=b^c=4Y`gz$64awS>F4T1Wf9aycWZgAd$5Uh62;IlK!Fx z!-)56Q?emHo@3kt@YH@hRr(-c83C^`zLY=j7a)zXc2>^Ea7}Dd!#`sV0?)VNZgK>>>=+(~Q?6{+ju4e54X^A#UOUitZFW()i z)yKPDW9E0mlAv?UzFiP}q`m&n6~9;b?6_9${`YldDnN0?5x_ZUXE}~XP2gj2eWHxe zS6Z?RS8EypiahxT^6|2)q9wy}#OZ>r*xO@Cpb3^Kt_3`15$@B70z4Ay7Z+IlFC~bB zH-{czC zG#scg0HGulLut#rg&qd`6(hv!ae^i7Zkg|*sC!%ajYDtv2WD4mF9M%m`#@tBjTQyBW!E7g-jVwx~s`Li`>0DX-C16dCE(4Yl#k=Og=R;KQu?3XJpWUldX zEEimv=QN8`yf%qd08i^|D7hm02?7lFltoL178XQ}f|kLMP3np2!*HlOa|+wUgX_qN z18FsOs8>M%Kw0>QhhJ|d<&u&3F7>JoEAdZGi)+DWM@nVTu13{4i=(WtX4+e6JJP$S0q{6(GyFiXg-V=tD&8wp5(Og~ zkaFQU;-sGqdLR5%P4w;&JL#h)__+n&YEXFq7wpU00FZPdJR*GXI8D#CW8W4hjykYB zLj5M0>qmzAk;{aa;7YHhQUFVWH#K>avLnt4HB>rKbHFAw)6)xe#$^S?e`RqMst7y} zN~3a%G-7k9<}Uj4d5rZK2S@T7>v+b;3qlH$X4|}t^jAsU>VRgbh|c5@&*FEE;*E0FJb5eU zCX{~`{|WF>!Dq!Pfa{7VfTkSj638c(@?IhW*W5(WEf*Afftf!$jDXAH$k16@A`<&? zUkl<_gbHQHE`ZlctCBvKLodZLg?SVxY*-wzx%1UN!ks{EV#4Dr!S69oD=@HAIVwg@4!64+>RucCbY>qm@NC1+ zopk>!e60oJNpQI@0rxG~xiaB?Vm|>OJpDL9SjuZznGfJbM5r zp+gZygDExB5Eu3(L~@*4hSB6+k&%wtL|I|Hrt7I#9WU=e zjxMv3y|8oKib1PcpWr67Bjv=}{CLuU3ZC}dG5b?~|1V+hy57dFYYPsLRnFX}`~6?E z_nL{NBGErE1^~)g-OA@!ma2**?l*#`ZUB%qKWVUdVXuq_($uG7@%F@&8Gaak!cj&f zq-VV5bLgFXoM0yUvW&J2(oY=s>&^RTD($jV{>B18OvAV?*mdD5Dx383SFCeq88YyG z16P~{E{PSBiRghl!o;{Q*k0@l;IK(W%#$*r<>|z91F%!sJ98*;+$Puoj0+^t<;@(W z7$IpuN-UzM059MYZ7BmS??2UmCE_|0mi6|L6KfLI`y)6|HZ&6A44FqdkbTk(A4#Ha z<9jM;4bFQu)c5AdVRyna&PRokAz0+?TSfsSetIANs)TM=h-fYFcW$W+L7T*iVm{p; z#d4o4_@SLpxXRI+VU=)`1&!MBBz+eGs@D$KCkQ#aMj3=*Lqo#R+gd8*+GwCXTaM^K zG^P-^AM{yj$_rm$9Rm~mdfN+(RPlVm%#*G2@4kQr?n-ZY=H)9y8yDx^e->Un&rZW} zIHKprD5Wi+Wv9YySQK~q^c1<0Nou6j6p1J>aKRWD zX|Dxie&7x;7J(7B;=R0H0FG3O6k&162aSHJ8;Pxko6aYH4^NjNuLoEWdOj=L2vHWE zbv0*r*=i9jQF+Am1uT#Iae}vs^&%OEcwxuzeY|IV)q^S&^z3pQu8-A+M1Ml`vQ09{eZ>n~#rfq9O55|Qz@ z4GP}9!w5i?t^wT7Iay&ZI2v%fV|#?zR_rFk?XflR@z`P51+XeRQ(!0IC0tVB)NS6P z0fh{2!0rmI-zU_6s;Q)fk9S=_baHlQxIHm_l6BtBXEb$EM8#*MVZjeYK)O2AT_
#I;J5E(+F$+>!{ml2S=W%!IA@Ig*5 zCm=yAF7U1aVY25>0Y&@|=HRo^-r0Z%jyDbV=`txj$BxEDh3LV~pab-LsfdRm^8Z$Q z$une0ha(LDO?wxQhH>7E>%ZVaCr1tz*zSf;d5mXbQ8=xrr#$rpwkhVwDUn*bC+`Kw zj)`;z3ODhes>;QQ(#l1y*4_hc!nx{-j-sNQ-mj3HsM?TDbg_dX49#IZP2}~{B8JB+ z`Jx%y#8H>g_0^{oXo{aS^mB!MzMgP$l)T9>y{=6i!4K@5%Q2@mZ~vTLpBvXD@zF0m zcrxYXXQZeZv6KOyVnaNbGy-PdJ(}rF18$Q6;J6uC8|FNWkNf{`!=Mo`t_wC|=MA#< zjg38QUVyCt{ED-;eQ@ia-M|>|tATFB>CS#lnBPSs2IlNm3YFoqracM)cO21qt=Ivu z-6AbOZ^LcVi<0sn^B%IkBfjN~yaa)Ood!tzyg$X-wLw4L5Y$j>%`1>l5F8~0y0W&K zr$#eaZU^)uZ6oMRCfm+|ydxcIjEVgTIr_o>( zUXBm$&$+-Yy(9npJ~4qG^ZBog2zvPnPr4u9fZyeoNlX)IW@gzfIs%UC47e zJ^6zSteINGr>dDPg-Luc03HU^=4$6$K22Wmxq^evUf0-!2ox$VBeAE3YK!J*->C@C z!04PK8y4k3Gjc1pl%)gaQP@{df(oBPQP9Y+k%qyb_cB`Ozevina14$gxRT-%d<-;9 zl~PL>6CeH&W>@N{(R5D>I5y(!2j+17!*CEBK4?Udhh9c59}$5SsJz)V_^0YO9@RF`Y<3|FV2+vz=jw-@J=PMyYS-gBPI zfWo=thiSz zYc;%e=Z-BIRRdK_9tD7&bpT;p*N&NaNBeG@Bcf}}5%?Im8tNmAHlr`VlJZ|0z7pa} zJj9NGF%U&n4%mj-gij%+FCBg3BBFomhD(28YBQfp^zkMm5+k~{iM2>UxkUX>bfyoD#VeuLHV-H zL7fbC7z#O_!2Zc#aqTD52}T3q6{U0D1Tshcypsd9W+r07X1g2_0tpNIc-BXnqpBMu zu#1k;L+&$4qp(8!J3aL_k{GbwwAEA)FQ;VT$*O*(&y|0`j1ehvt@h3*pk0bKisQC< z;(HLTdOxh;h&agc%zzn1L&HaF6UvC1Cug2(1X8(XDXyhy8mT+o$Hp`|U_}Rs7?sUr z`9vsx!x$sJ$3`zs8hi%0KJChJ=)NX!<>}MtF@9eufffl6%ue)IF8f$NQVArE@(?NV zzj(zY#F29?om~o}E0~Iz3upCP%GOYPBfe_3M$I#ILq!n)XLBAs$MSgwq@q2h*%W`} zWY3qDV+IyzauR&A*;$e?j+|rA4Gs46a+KV_z5 zq@0o-Av)w!;53wd5U%<0Ld{OsvLcLYz5p4 zu0|JgMAxr5%WE}2@xxTBX7oJX*a*wS#*VnYl!H4iAIuTPZQD22-nbE4clO(2|FVW5 z(EJCGno5!&_5z@jAV1)Xo@?@t=XHcsh&Y6EZRNqC_|57~r5yb9rl9Gmrs0F(#DzW2AsMEMm+NU7s5H6Wcu$0^7*^jC!9)`;Ao6#@` z#is9dU*R;?q(Z+j%8XPKAAnv8ac30JgAo7~M(X_!5->30aOU2RZJDGaPlYN^kQh-N zihTstJNW~U7ha@O`0H$PI1pAwwBRCPlDBcl(LR+>clRoKY=)(xIi+;SMIuLy-8@JM!SV0{eCweN}5YnkyBn!*n@h(cqGo3T|M%tdgt04E}u_k!a zi*G_E*4|Po{p4EhTB!(ghY)gHrHkB^%KjjdHslG5;(tYwBqISCxgRo0fAjGw_A>_~ z>hZTE)n(EDKaT04!q384zy~nyiFr+S0%UH1s4f5iAOJ~3K~$vwx^Q)W(c$nJ#eQRi z2w%^Fv0Be1aOYJ!2d>~yv#8=Jc~}Ur2k>REu`$<<2t)Fz+LJik2EH75+S%j4ngRUH zzTs+b`U&bh9`aM!9IRcIcHlhibo?Nx9^#V12Psy{&g;2=2!k*P-=m10FbP5DP|?ta zN3R57VWXT3oc^~HM+Pe)rRO$!w6^^4Y%Ea{f@5S$x(0ST}?p{&F~0xmpUdT(xkZP-@IEVROyz}y>`dE#{22_IvWMV@^6=Ne2) zXhoyNt`Sp@?RQ{49yC7a!8au~hYWxwMWjsm*_@@Eg#Cn)n)%4UF^8#x4oYEtW|_6# zol!UYp+pq27LRIY(cc`0QdlwXW>!JUPN|F^m^X1{`_t;GQhHrB{S5skkGTh~`%3wJ z7Y2&z=tNFMPiuin!|^XyB=KB)&PWkclM&TI;V#2b=|8>KLwF?_#eR$tTfh4R!l4`J zuxm@Efj6L#{1KJt2CX%9<6iK0RJ}?n*jl5WaGd)A=Xhrq{z^ZPzAUz?m-OklXh0KA zyK~g0Z|(p5%LBk^NIOzSXEe-M^$&*r;fKLKhU#Y!&3^6+;~ubkz<4l#T^BGf_5rYF z0n#GLFyz|s_ku6}4OAi!Uoe{i;6b%I#JWw9m|=_udoB3b(MOz+i15mj=a|RgCXUM; z_ug3Mah|~TJm0)bZ-Sr5F~#vfrROc>AR(w+6RIIYkycUPNhqgk>WEK~ru8%tF_KBF zymCELR{8npvUuBAU2uufv(Qq6*%&YLu3&x&U3n{#a1K0mORjt5d`d_;m8EOQgM9l> z3wEWa-J=i&DgROnQp!#RTg++4|D|LeX!iyeBYbjNbhq4`R zRGNGS|J(J4R*g#67*wdFv`(M8;9F6XC{PV5Ld5iOBy_4qG!1f;u)5`hZ&M~>eyeP5>5TR@XxBng3dZGnPBD&{HDi`(;nobFYB2#XR>jlVtE*;8SnDXaQjZJ0u(h#;Ml ztVuqio0ljSK;@tjDVd0}etPBI zuxN6OeCl5&nUEP3b_<-}sMh?27%Rilm7 z?t`2LChy$hprSxo)|rW5`}!J)AY=A~w&ydE<2Bp}mEzZSN!G!@8QJrE{$TDu>u9n@ z&ngvgjSTx6w*X@DIAGCBSUMxp0BRh-oP)hL_Im?t<(XI?BP@JI0&G~M2W-H{ijF0O zm(e}2Va-c;F#Z9CKe!Ov3*8s?-jM?EjlE-w(J;Wa=dqhX50=QuLax}D3rE!s6rA-P zsz|9LO(C@wrcdScQ;r=Ku~G<`6Ey%93Qu8D;k~5?Q31cE#dFT}Sr;Yewi8_-gQxr2 zG5jQRnf z&v3peZ{l2`@yUa^^BpPX9s%hJJa-9b?Nl(?cY_xT9~mu5uMv=?JoNboJhG0ei6DbT z?NDA*`XOa8uN%HGIUA+-CO~}gx&hdYIP&*0jN4#eL!E(mFhH~iw0Yr521r6Qzy@q6 zv~R&|aXx4<*g)hI?wQFzzi7W&EGj~|OWGl}Gg%>T5b)C$uC>WiR$b3HqM98u_XGy>xnBrw58`-5Y5fPhinO~JW^w0bQ7P>MI__6Z&N z2aO>iFp0%ueuWFmyM92@w2D?{DRP#SK$}X3C$(c5L0t2OwG@$HL=QmTNXxl?AhNB^ zD6o4G=tn-Xz|3NwSnULPZqvHoz#70FmWnRLk+C?a3nB>=vrK(tbcVzrEJ%r`P_?S* z(eqQTA5pQQ6DiZ9iIm~Yk21xh=!hK}x;{_kh0wRrNG!hh=IL)WN^;ANaS)DL6{-K2 zckkxcXizfIn|GQ-Sl(j#xF77+so;!d)c2qGH#_g_HdFGIby-jXMT%H!7DdE*YxLML z;-$;^Goe#h14=A`#V*ws@5D2Lr_z{8U2wgPdw;^^kOjO)vh3p(>*DAZ)%QONLJvPLb?lK?Y@eo2)4EXm2d|k2s zKP!T`Z`oQ{aS;%!0wSt4nDp4jSA;a-58OAdJ#cRx5xfk~_6YqiRILD_m_*jB6PU@Q zPBeK#91&4M9VxhI13-CW1$_Gf8`j=*AtfU0a!&qZ)6KnifjPdM4%8Aj4GL^s%=asr+x4pKEIUe?Fu`eVp5wEmRrtFc*(Q>yTS#^ zKkv`)Q{ehl+3kiF<)h(4I!^&$$RbF3>Iut6`=?>mM>jpV=HY|30Yz#~vY?1T^Un*EBa=}#v+4W2Uq6ya{_3CI* zQDgi0_PtOdIfv$*xAiJK59`s2E>SIYN8)~*GC0Svf`Pn#vq}djC1AF*Ixtf67EyMl z>BkHsz^;jL-@v?*#;)dz7dEZ|+%vZPaZ3TY4)9fB^REf}zJaed8wd?-76^`Exe%WQ zw^hou8yGfV_QrIz5H|QWe61DR57kOkA?O)>0v5ni2b+yefOYBR_}GfYq?mv!uZ;4e z^9SL96o6srdgf0*qM+@*V&XthCxe0X9>p-7#$1FEGfB*JC8M=9`aD8gc{hph$jJhE z{`L`zs*Nr2+?^q-HXTu}F!>SfI0^Vbf*LCDgUrv{Eaf71Rbk!)s75MVNk&nPB`e)Z z+YrCTwPwrWB9we?MUEJ$LN_%^$ac>VKort>%L{^rZ_Y!wu3{l41a?6jQ?kk()qlV- zCJ+s0JoC9mrF*nf?sPabd(NBqmpACUMK+9can}1tM!N8HN@f|y05auZ7Rp$(K5SqO z!BoXfG)7tq$q~GKCUlHO#m;@=1WUF+R3vLVG8IsvfAXm}RjbzJj;w)5GHA3a_-q|$ zL;wk2NP5(S42TZ;IKpF+(jNvz@%x8YXI28e)%Aq&htyjJuq&UaNc>W`tSQL3^5eT$ zpFXIFkQz}rO0LzcH3x@syRpKI^jkN7Hz}(n2K3*wnQc&8l zaBK5cP5RCVS$%n!Je-4_s5)efj9$sxskw4$!d*%NZ18-k_G%{4~F2ozsB zls`OE)LoVe-x!uV04BEp+OSCFUlaCq$Io>EW5O_S*)`$5bJEJ6+l-#U`;JgS0DHq% zFdYVf?>F}EH|&0Z@kDXp7*MPxLWm=QWn*BB*iqp8&c@&|!=f_4m%|sb>i^;IwKuK} zT+Xh6JLplYD4}Q+Y8iexIin$1L{N%RBqBo7b>4^|3kDm}rD56J+RjHEvHjcb*XP{2 zmCw%x@LZ>pMs2H7UJ4>5K$}+=SNtvs&a#%I zY7JugJ3H;v)+F$mT}k9hQ-2!ZE9U~iEhiM|LEpROi(@R$@ST)BdBAwR5~Sn{xU(?X zl0-^LC`%Ph5W6K1qA4bUVcr$2et~4FyVUxBkBNb4vhPP4Td%si*H^J z?Dv3uePi5lUF{h_gq9iQGU_FNkz($7~k;_Kj;f?mgnj;2l3o0Yn9jp5enkVyTjP9PA;nL1bs88w0`VzW?c-`iCM0qa@i+-ccBR)- zb1qfsZ^w6>c~f;C1V<#u^N4Z05!v4Wcm|ET^8PSo&UbW6Q}E?;Dt^$d@^e_L=tqOU zgpTJN3?)$npbmjHUXMq6-I|P_MuJQBri2ZTTF(vWr?K!~R-v_q*FT_AB=u-_2P^U^ zlm`{H%VQ3_bb9L4k$7){09Kw~hW|b2#RrcLrU4!I>Im>Gt`85p@skQ|lZNdh6bZ}z z!C-oRWzFNrRsiCx+t}TG6(_;CGoqlqg}Cs#*#sHzj&mkFDVmibmHCX zVH_U@hW-JYVD*3K?s;Dr_XS)$&qoyQjtes)0D!^wip32Bt_i;)4S?a1OEAOo4SyKA zn{U|f0lzQ!eZlSv_*!v@(6sbs%tk~4d=a4&D%xzVXR^Y7IIy?Db~Fx}+i?4cW#CZ20xYyx+jDH}KCJcy3@#_@0uWwEQ9!;M-#d z0iiUopl)R2V(yI{gD*1q+K~d7H!zoDu1E#k9!%h?ikj5iM|3IX-zJrD>IH9z15Qiy zhl=P-oyGt%Oe2pzk3+C}uJGChF8(=YkaE5WB8}_m&A|~ZRvQC%zgom8#Xsv%1CG%S zSjpLyk6z;7Bz&}IqsTbFDogo{Kj7n?jh+tBT9Khx9qt2{@IYhQP%X)H@`xJTby@Sj zD3mKzaa7>tx+r#~e1zz<=Ji|@UZjY(pwa3H5cMy@nbIR$Lc9G9+e|NUErZ@2Ew#~m z?j}G<6HN(=WTxj7X_PXf*%WIi|KPLe!4bP|9tR#&BtV3(69m)yG+=Dcj)22}wJm8T zrtI0UBy!U6eHK1>Uyv9}u!(tQu3uyTF@)Z}%3Hw?%_E~K;-0YMp?l1~H1W2W1)KZdrBbIBkXWEllO9DmI` z|Dg9j=y)3s{V^Wy7ghhWXn;SLVvDh_cm|NRL(O|ICS19LNtW6q4Y`n4e#(D$y#SUoh+&}6m zSeB1GP^Wy2D$>fl8NUaL2^IGG@8Re|X43^he2ocqvo2H7H^CDGTZLCjmx$00C3X-3 zs{X)vD20^~aOB4&fYfePM9co-Ge4kWb>)}}77_@DP|^ytoMWCPa*gY5(Z6gj!W5_kg;}&KlGjmu7sT10S+$)`?6xw#fvo@X$Jcy=SVE_b8 z?M}Z`YRdT=*?gGFf4E24R1EC-o#xzsGQ`hLh8(a2I`nrgpb8naJ|m6Vcg+VS|^1wx-vKMAXY(V=kh>T1Gb+OD zrV1G!o>S{e>UbW2s+Z_16|h9*b%~;yO1AZW^}4m=Hb6>Vss)O(&*+R`Q{)AhWpoT^ z%0D6Wfv5%+QN3sJLaSQ=ejqp=-BX)(7*g>oCZ}4p9=%OTmi*{-z1HY$?fKkFpA>6( zrNJ7l=X~-z&Y1()@H7JEFx>aV#IT&)d$!fD#e|*aL1mg-PrioEZ(U zYeZ9^g)jgHuxd;LP?9GLa6zWxbAahhsY%;aqwZm zdH+q}!06R-hxx`vHAcz0*{x%O9b;QYmSSf>*wLPr2`~Owu*+xQ=4Nik7C;Q zay;AdxZ~~N{Vy~Fz$jFcF63o1#7~_N@kCOCdFJ;gDl6DS?E%M{cYe3SIFi7N@8#7Q z;Le6PfNjh3G%^)}aF60BVN~is{3{;!PIISrh*|9euL{=-zLvEeN9Oo=UTwiF&r{xi zC^J3F({S%}IS#lB_8+um6(avk17sAUW+63IG}-0D-%<{r#(Z)^jCus85*H=rO97TK zBSRq0vj|$zkbB^a4q4#rC}^ajPkounu^R&iDhTJ2Ca1IIXB4N+@$8TrcOMPkv_=9k z=&EKql09o?Y+h>~YxFHSJ_{?p-O0bp$Xi>`k@2I03^cN8c6 zUXnHjL>^(zun-K9|K~ZvHVt-J{I-~#Z@}Mx{ds_U0)Ji@zb^QtibHyG5htk={jy@4 z=>PzjR2zmouiDw~{Bp;BCj55zGZ~v)tOEdi4;a0fhxcw+TI&&_kG8)OKr#?Zix8

E-a8lN(0J=BqCWu zo~_zovsr{pq-sH(%qw{GvU@7hxf>P*8tI%q^hQTnTysMoYa4BWgQGOGSs3x*`9uZO z@lC-avtJJHJ?fY{@5%l>`mlnI7Q{nz4@VfJgTI)|%-*2;M5@pJi$(u-d`6pR=&R>e< z`^Cp!_Z}v0b0s3DPC_l3bAJGK--pMn=9Q2l&+6Wrf>_52_dXlFUg%d}R^FoOIkGDB zo~Eisr;O(MIYY}h!Hva z)WnErV%L5Qvi=AG#}?@hV1LJYtJFPHO0wx^DKRe_({rKi-k~x(L9aMit=`llI)ofr zz-r2*oLQ#I(+sCA>V|#WyCQB1>#p23rEax{etP%5$k{r|@2z>8Ye!YDH1P2Mwo&(; zwi#DtUt!xqj$G{3)W}Vh*A?Eb@Vqq3=he!(Ha@>9|M?1ESG$G}MJXygpKZEbK6`0T z5>#yBn^++>O)D|D!GdjLth3)nZ*>}S8&xpTVKRtZD^V&t*6#=)CkFysQ*u-5C*Xjf zX+t#=o`3(OhTmY=eMD zb32DXvKR>Pb6dHktz+9NZQJcS#6zoDP3TbsuhdYCly_UX{Nu)7|GM&D-x`0vD%UMK z@Cgs4^6A|8=|OmTPCR|wIDg#9AKD#BP$QZefB;ajlt&V1zS+uY=HbJM-&bW}<9$(1 zi}3t$=Jc|#Yi51jxLr0Q$vF=p$+PMtt4;a6@J^%RrB;#L}+3k>!CF+9>!N? z*JiT@`ln;54}2-tSsinEM55c5dxjmoeYXyWr2le|!SSzOqczjGBL^PeV7hNe@o0eL za(Osk5LA1*VJK%Jo^p3JIvl8^R=c0^CU2fToiM)BA~tb$5zFtFNjwT*B)^oi<@*aA z43x=A{L*ZFOHxkcsgS3rSSsG?*8xB&PWZFDKPj62gz-;33J`Kw^q3qWEKL}uAr#R7 zV<4UwqS~I@DKJ@rjtyN{MSXDs-oeb=oV~}hXK{UL;(+Vv- zrz3I7gki-5u15lh=c#u>XI}FK7XyFcf{>so`(X{`%JV&o|}UW@SKWv6|^Li7A44_8#}X?oCmxJuQSntBrNHiF&)IFd`OX z0gMqHh)rsbd9;9z9u!f55&+hgM-HDv{OzK zskoPgtDZ>*fclsRx3`*D%h>ot{Cni`3DtK4gBQ-h=ZoCd-va7-<>) z&T!Nlz2oBnKqPe?+Kwl4S?z}ZShHmple@G>^@|*;wC=$}&;gT1M^pm=h33tB=*<2l zCzfn&xMwfrGp8!*`Yn`i5qvZ1X@Wc(5jExP{Yt#EUkLz^{ci>aG)Lc(;G>w)7s+?V zKl)Xal!xbjXRr<-I=fF#1%#n;Zz`b?PsRnuU@CtyYJ>$wO)e z0JK#bI;0J04J|vm7wbN_?@$XmRZ`i_6RNF`Q`OddqEjRL7{?g1y3`gNM4Ra3dD3I} zYj+-jb-MCYg1^4I<9H0CMkuv=?!C|Jy%3os4j(K9d)VLF8~=!Xs`|z-qM{oVVodn~ zb?fkUY4p&epuSWVnks@5{GuzIrHv*B0V&hVPf7;>hE}aoPU(b_1BMiW0Xy!sgPJ2K z!Xh5~R=M4FP7gE1OX4JzUc+l)eKWA@_myA1?tH)5hIx8wJe`HpLw037fk0Xkr>BXR zedG75vEIwp_$C(qpQQ1dDe-^)cIKaclX?0ukCL&7S;zKP=dv_29xZbIEsXz$t~>R* zvA=KZt0By#z=z2c%!4YgRk<}Yp3fOR&G5J+rr8wqx+&kUjW6$w*VV%C$;azTO2{ugvGe+?yofCPBfZ#d6s@# zx>fe;#`|UG?b7&qsk~h+6>!SJd4h*i;_*p&be@4srXzK&?3azp+s4;-_`V5OEDx@D zr?_V2$Lx&-_%t=1pM>dyMJ%-%u(c*oZuq>UvzwQ2s&YY=6QT)e-hz2E1feORrGQRs z?<;i=pgf*hr1Rq8^Z`9C*RhBl3^!IEI(1>4f91GG5`P|07*naR4|6@ zAewaW=18+E8gY#w4b=c1dhjB|JTOsfG}Qcko)$;|oIqp0sy28fiRC$(8b@IFw!_IN z!{X6_6!}hX9+aCk7Sd|f1nNVOS{rkotLI8h8~LZ48ZAcfTuXG|U} z6yH=~r(QBfZVhy#K+UR0}05PEL|;(9Aw-YUzv@;K#D6W_f= z1D@B{o&WmF&j0dRwWNjs3E*zOHPSjk+2UZcf6-IdMvj z53O~A-ISCM3p_t2o}PvIZ2O?rYSEDW5GlZz!6h5~^pAk>=s-Y@Tl1WAclz-t_f1(hEG^lpccJv& zonC`0Dp0*VE`_Xl=SVe>eN^-Q_eBaldR2@H7OVO9@7UX^c^w!PK30BVT z&*ENT5+-prYPNBrbN1X+F>sI_1O#H0BrcpoNR-s`it7Iaz7v%mo`jeONCzt0+PJ<| zPD@5kGEj?xRAGCs{Pph}|JUD@|K~mN9h2oRE96#rERE?QQO;`Ju9jlgJr&BivOMm5 zxKys!N~_K4=pPCX9}D?;fqAy(C$*82)nhmIzEOJ9o93jkZAWh#_3g^~y7K;7dHud~ zy~4JE?%I1hEGh9kDf4V3u{^`+v9LVOn0}iM3hFmXOSHk_hBAB>NTFP^&wZZ z!oD@GoASB}UvG`uX0lgMG+RW$Mu~b(Q?$#2&3_*epQUQO?e<&nSWGLi6wCL9Z6q_1n`{aSgwHP&j^HW%TsHXb#xXha)v z57p#Ox5oOm@ynN;zr8AdyDI;6gZJIewFtay2ApQCJWj%SF;X=-qiUnf&y(<68jrh? zNyB4~u&^-HQrE04jBi*~`ySIjpfl>iQeuPF)b*;0@V>&=@0HwONxPS!>b)1+_Zr>c zAN6=|_@rLW*maFvV{PUzsRlvr!2eL|B@)g>_Owr|y>vOD*Z*e?XHvsRxUF_Dsn!^$ zhva1#XY*ae4KQ6-9yI01|4STGdQ+$lSbZPC59DV#Kqc3i9CYz<5FCi>(>6-2-5yVg zPLd9Xs)X}Yyj^eT)nu=wVt}>G#XWklaKC%`l1-;tPl;jx&8C=FQDl{g}nn|1z^kqZKu)6t__*1P+ma=+A9{11xG`WjXYTZCMY7L=KqAi7F*|`H4pW=3-4%vXlQxF%+AUm!L%c zIr(*pZE*FCr6N5g6fV*T|BLfK$0ln{d3$xnbDk)(dvWgB?rY=qt@6taUYl?eTgR^r zzTV)rL9p~i7-X1PNvCEY;JWd&?iLo!R!xx4GqMz-8Wl30l@bC z#?{AH_&1%!739~4Vx$<#>mnHG^SXdr~{7^`zLRzdur)>?nHm139o-0oi ze65z-U$S}a#l3;~u%!V! z6FNe{GNAhe)}}Ox^F{3UlI$D_wNgMC#x3PU454Y*Ia_lwrz_Z2E4dsS`e4u9m2}&! z{P%KGe!0Le?`FI~I2Yx^);xNWnMIM#;qb`iTDiTgeEz=k%X{LrCf=K}ijlWeh0-i# z^S(AC&{-3BV_K(7nj6oL!XK_Sn?!HQXJAXFp9*kJ!iN|nG%M5W5uEHH`5@`^lt=St z?m96DsS$Q>jkZ^Ad*#pHZ@hnRoOZZry}eDPd-zvd)Hq|VOlckkXv zfA*RbA!i9>Z{W=IU@rXdKkQdu{ZExf%S)O=TIW+b27&3I_aV@{OEiTPzg7w^bL zg1m$5EL-N~miXP;SgZ0@;VHw*WKD3y8HJIuQ?xsi%^P8DyRz;!BjA0nY}J*Wdi&C* zv}7tb;lM8mMYJ3L-4$_$4lbJuW`t1-)_4Duge95hJYzi$JOF9RM#t8y!IE{I5o$Er z%o4{|oD zx5l|bF^}I>z4daWcDp7qaMeTMK^}HTEh<5>jA^VzT+gKu0f?>MpKl6oNkk~U*_fxG z4EuSDvUE&KN%zhJjOMO?+yUvTbCj!EaCyjN^xW@6>v(3a780WeKyTD`09WENoOxHJ6?_!TO%aNAro=0_L3MeYqnn3 z)9j}ZAx)X{EWDJ)lY4wwgrAG@^9jz=Vai;JKG%l)H5nRCOvCV~B2|qXx^C3>o%OPF zxm2z|}6$*0LSu^Y#v%JfipTD>QRSTy03;im`T{E)~?%qa-DQ0K7J9?i1)eW((<) zAUc1?_DQ5XX5gHZ=Sg{5gws5fG>5tBlfZMfIqauX<)_!ib+=;3#?wBb`?a|CJj@@`jp@YI0n>?A(kMO;a ze3(=ELpj+4=WraSg8b^ZAs=%1llCVs>Ya?bn(d5a@2a0j&*bLTZ`T8o3o?eK)lRL|$5$J!Md% z!k`^$XMHaAaWm34Vq^@*-_!-UZ%luyhAI;oAaapf0d>kObX(2NTxl z>{kx*m9vbtzuo~bYKupgzz`-!l!pz4E0#Nv@f9$=K0?gl{e(Br6fT#_a`w63$&5jo zGcQk>e|}SvR^FNsvHoy^KRyY|B;J(|=dY-z@5MZ3v95CcN*Z1^dSidRas9UQ`CH@f zugaI3v-L%In07urW`6##^YPQp{AlR__3{r<%biD{TRA9Ie-__&_`WsPYGrX`E8ikY z7E|5wOYR)*;mF*oY)`;v(W?SgX-~66H6O@`p40 z^q4q5*l-n@f_0s!s-)A*vdomz%6z`^{InU#H~{sMC?{chNaVAx-Q;O0Fz135c10yy zcRh_zc}(R?Y^(6szg>8}DsMXR{r1kR!ZOc1h;ep08PpWza5jGBV1-VRvG@F$w*&Zy z$ecZP_s;!1CU&W(kOo_WK2OEXFn%iUjw&Pl+aj6}-!Wo3ylXe^$s?66$FXiBr|-tN z8)!G)A|5&J(8yDkjwyxS<3qy0hMkFuh5p)s+h74e*K-3rhfa;X+)J608*?Y{N{;~K zgU4@?rBs|`n#OY>JoyOwdo(P<{UY~9e?(({h`Gme=>BHtL(>hVwR-SIp|5m2l{-1I zzx{XiTO~Y=@qhy=N=K#RgMGkF_l9E;?u9oRM%W+;&jB^)12#hIC-wOpmOScS1ctV| zTq?Z@NUvn@Je#Q6CUpRyP9l_6t=G2C*_O$@$7%>(t5Tx#T7%lEf^$gLiP9d z=OF#{A-48qo72K!&54JGs>Ra}>S0VPW82-s=$pqkd~Be2##SQa9=(VEyVA|pG^B^I z97#q8zh08%M$Uj+8`rOgwT>mim5m;F4Dq@f83k_d%JouNmW&j?(;_^*6#ltZJ}#D@ z%?MAY#KXx97^>*rkgBAKzHyUy{yd(wGdXqJ;JQ&?cfNk9{P`>V#|8ee8{u-!iRB7^ zzck)1m4De9zxl0F&dJ(VOJknkc~M?&@U6jG&0tyR({4yofHm8^*0Qr$q(p6Rs8>{o z2zlC=&PMJcLwT4ePiN9>oPh`pMfqxTnNx4wm$P|l=A|0}Fo!chu=vem6!7-M&L;uz z6i{=|y^X~)#Vm)i(c~debC8V$1w^gCD%QUq1LG+vMbtc;Y9!#j3D+vTJE8Vg6{J~y zwRlsWNH1bl8hgV@w*DFcI(6iCeV^YMIm|(h6AUqY}Q&E0eluwV!%X4CW z5Yl2j)n#(8ZMMNp0;E%>JWf1T=NfIB;p90Zi}hxwM57i@XQ0;Rd}}n_P))|XM|x=% zBJ5k^%jcDSh4bT?U;h5ed0TnV%5C4-r_!s0f;-h4*bwSF4WLNqmQhM4-5ELR+rA@B zU%1kcV!V`IMi&l<7zise0H=oekl+c#N=Y|bp<8-7*{`Fxo+^?k4iLgqzq4V(YI~&D z)-#2U^81MhK=?2w$LU}Z%~6stkabN<05jC)O1)2|-3?K3#~cYv&L#=`lDg^afxgaWgz66qC$LMZKERyG)nE$Iu> zbGRWm{k4GS!=q-1nk{}jxDF2Pfy7Zj#xqFsD`B;G1DjEzYk8k8IrC06%g0KRl06UaELD z(ucR$2bx-S!K@?NAR6OXBa1e?@<6VgKqC&7y8`GGLJ z|HOz=Xrn*3*2GIKhqn^O5{0!XZ?7B60uK)so{OU7cRyti?I|IPK6xy;Rq9%Kf2(}?R{86z@b_K#?jg|ky^;}Lfx0UvSy?9KiELrx zoLEl6%Y*WVYDWCL!E3c}bVHa?Ub6Bu3(Jxzi}&h|5FZc;T$wY%Y)0>#t?OmZu*^mn zjL!vlbgqhe1WKE&M}+g2EPd4IoWw|g0sOk6FyNMxRety@w!}%C_y|c|yNGrWU>t$~ zh}fh^q8eqi$u`f>geHp-4RfMLf^H4ob{hj-)k-DHrko}?Hz>8;)pTbcaXcsG-2s#V z5@9ZInuTR{Vpg&`hMv|IYp?qAqcUgV`)d2MB;{P-dCokX;ru8pPlfVO$fudKEMAIb z*B;H0(p2D-pe7?J>oDL^lGuT>D5}OUu`=Y1x+%0gf{|tF^V+YkJJl`;K03 z{L?AZ-j#niM@EC7c?Y(|jlsd#OL%8=&p)DeX4gi@TthxQZDhFB3}jNZD5=`}3elj< z&Y%5Wqo@NJ8$&If&ca~nV>(B0Whg}R4B@&It4thM9#_3wu-xr`d5Jp5C zM2-;zH@d@A^y}(6Ln6hEm8Ty8jUP)4wb<`&_!b2hpBRhV9S6d>~VI2ck1 zWqn}z$Cm8Cj>G-*M9cVBBItgEp5TNZfyQwCIQ~y!vht?mjRGY4MwCf1HQ6 zYe*oy+hBkL`1M8fqj?v>13B=3ChkAy8-HA>VgpJ%=^1T)qi+2yyCZ#mFULfFiv99}uNoZYUx;!Fep@@!BBz>GxV=BIG%q+2zgK z50jW@-?YgHee+q+y0dMK_tnep-jyjgo*$K`hKCqtvP7ue^JxL_{JX6?>viX{!etlM zI>MMS{&q!qU6rqI%KK~Oe6rjxNyu~I;R$}1jP3o?)yC7VzMYn&yqtvJz6c+FQ^-%V z-B^$@x));VCNJ1jK%GrGqLw$pfhuN14qXU)uVGh2MU;nP_qSDpk4qAkY)whBgFJPz zpCmaDu?z^#7_Wsiz+<3m)3<^o?L8#A=j8IZdnJm^h94>_0lPrSjg+k6*0nX>n($tw z1Ar;P<7QPjEnB&ix}G={_-Sr@Urk;%wcPznwzkO+6D*TjXFx2J9%SN_VO}yXV7dEE zsnv!tO(n4`nfWYCX9Jw+VM0!mHDU75M+^%J4_mxXh4?V})U8!0V><6bRbj8RwX$C; z?WWYt`bK~t>1L%~^9;>uY{i(woJHo zL*_!S# z?m7AMP2(ohNOzCN7k3@2phF+a;d&%=iI)oVqa_|PV!tFxhsQb=@a`)PUsEA9rPje5&gve3 zs`V}iqo#+oROn+)hjiZw``Bnhi0>j~@vZ}a2zlts@&jO#es1l#a+KatthPgRK$~Hp z077C0^y_y6rcaN;G&WS18fR*G`2M}?WC>gSKYkP&7`+LYjITapDW1cH7OJm!bmAPe@=fvrpm|te5 zPY>jW#Y=sBlbcHcp6`@MRUDrAvF0By3)80PZZiz(YO@EZR^~bfTBbZ|IcF z$dm9Opp0fKq2x@oyKW3lPbhOC6sRlf_}zD2!>U!bYJ|vDM|pb^VUotAki6XRrf_W@ z0q`imDH#W1-5N__gp9>%@P9tpIPjAww`TeK=K{Yy!H1Ku%+i_H5|$^xr&vzbda_%p zLK4=SeaYk{kx$9yt1pv#{?flwJ{ov`A}SUoo!e{W^?T!b zvnbG1tOWP;G?SmsyqssA9tx>JeY^4MCCzVJqai#`#$n)Yt++F6kz#dd&{4p_41_b@ zfp!4CYF>`u}1S zo+yDrdWX4UBZ#L{<#B0z+~7@wT5WE?q|IvFfuAPj(_&4MLYd=};xyalK4sx_R*Z;J zt$gxS$ma!lIKlZ0WkMt~2BUCL9AdnHu2=d__lH;e{%U(;yX|c68}+uKtJ12G^rozw zF+!TQVT5eXgQsZ@>*uRWg#N>zNAIJtZ+s7UdliwP95sYZe8^U7K2XRS zz5hL35_(A7`$}2JOCl{s`pc(moQo29T=6`vfv4VB3q>QksBUPE>R8;Z7Ly5ftohhl z*!K}?x9;$Bi=N~nkIhMB~-D$cm0KxG$TP+Hl5v#lnZckeVGxEAd7}BJvtC!wBz%( zzMY`#$Rg4LBu_h$+_>9C^=39Mzxewts%5v8Bn_iK%$wa;tW^LL`QbW;>g&e7AHqTO z@oR7rxF_fJD1;C-`r6-PUcaes>5=;Y)bwX`fAO&|$Ll)2r7ym%lSj!l$yf_qN2f%g z?M6-t<;xL2KnIO}(h&Br)x)TVB?u4QfPr-59EXS&mmCi4*=A8=(DvkGLr@ZjOap2Xj1y@0tHFMuEpwbaDU_>n+a-*dw02S4X!t3+Z*c!FOTprD`~fGcb8qc zRN=}fUy>`FrSY40<=|kY*uG6KS52IU&o0oECpgFxmhBAOJ~3K~$J#BwOu&fE^BU zG4{7_-ov*@B6_f^HrlpRZyWWxvt26t3R;I!En=bhsTkO+ZIJhHMbl-$AI#{icF=k< zWQYJOZZDdQQK%!-DA4ZPVBZ?tG&)$?@%ChEReW7yc1A?2?El2pgzIW^8x&z~iIOS^ zOcOkxGs|pj|Aev>%l%Jt>N)GCO5GakwXv>^Teapx5#1@GER!*_O|-@G4<(}|jWVsI z*1JE(FblTt{h>!=*ofbR6Qt5S%xf)tYunIkWxrHjzcv2)rSb3I;jgPjOeTR31+Lr9 zG~GBooRDc|+mzQg2o1pZhcdGxI7VCQZb=o|Z7k4p*NBecD*eNRYBHBA0Kzp{!Wh$n83OHGAh-8<}bkJEx zeJ&$n&_8l#P!E3_KLk4IQGswG^zb?kX5`0v3T{sT861e*5&V2#9|3~gpSyDdVAvsF zOmQdEWNhrs;auCfTfeWPJ&*e^TUnId^E%@J$PY?CIDrEQ9R7Or5V}!oPQY&iDQNhn zzO*_%ZqG7=EEJ=?uSXP|4KD|P(W3(4TK10xcu3ycAQao-9u7Ype;*zrV`KP()L4XA zTJh^h+Fy_16%vNHfB%5uR4q4o2c8ZB<@X`+TpRQv+5@M6q@-xb9oK$*gy9AFM~;uf zRF|Lc5H{>@_Uq6epVdKDe$*~Ks-c7F-wuxf#k)xcuyIflUP_$Lv=iH|e0{6L0HhN* zOW2!$`1zY!xOuM;^0FwAM7JDl(@9R&30#HpAS_$sMV0fT^6}dE`P#U7KmQ_d%J48- zcovlRi*ntCTeHcJ73FajK0PEJ&Voz=^F(?m$TGn^n*osQMl#m3jdco}n*@9oy$!z$ zAm)2RLH9;oD>rY2yKjxuobjJVTi%k?0YGOq^_I~xbVM&(4NTV5IVC-U7jGTi9mNfQ zgjr3otCysDXUdjX8?3%H!`P%IYzIYceJkt%WU*cXsCC%9R!FPYm^Wp~A@)isrfgfb zbi$lrnuX-uh*V*FuYA8WK3|m2*T!YHV`sPX4+TCh%10WHvrU4Fx@&87?R&;cyP_Y4 zy0!26I?TT}c1Vaf)#)`C=0IQ(fO@T5-YUOb8vnS$=S|pDD8Ty;r7FLDs=TZ_+hym^ zpEv&Pmm9xac1{R?oH8fDy|~zTeaqYd%j4b;d>8xdXiHn)`mW!yamACbeZ1GAihht3 zp1a@W(F;BpyP;ABC^4fwE+9Z#*Rugm!Hp!n8Q8dLmrUO$u@)nDFL(FY4e-&}AHMD? z3;K1$>j82&*huYq^k~2XI1B(_KWjLZVfZLLIU%sv+r#MjJGILgce(2@@Zq6`s~29MM+ADVN+TTS|7aNfbs!t!o`2=@QZWy}IyvH4L_oe^spO0aec#cQ3AgQ@wPu>K@nzbA^ z7l%vexv0Bn$FRR0h1d$)nUeIEOc`sBG$=>q9cdLevH`L}DIAS=zrOI$4;%Ujn>wgC z9$QCbr(+p)F^~ZY`a-n3XP|dyh^q+2V<6z$TV=_a(>ZZogpVh9T9wbcSmlFQ?)zmj zgI$WLHPO~vdycwWrB;EGDW4vY^UVCdbGofO-8`r63Q`oLDQ$(zd*$;x{NtARva6*G zfDaS=@xAf8$HvP`;_+m3ahZzI#&MFQu{Y7p%0xRr7J3ITDQbD=mhNO#o6>5f?Un7e zbGcT&->ie;BycXu*^PfUTq5K!z`hR0HSgnpom6TS8tMSR)~xA}0mYh28C$&B`~>Ko z(-g1!Z$VnMWADD)+4K-9){zjk-)cWyIdQkxCw*_+MT(AJR2N)GM14d5j4{wPJP zt6DJ<)OKt9^1bpO-<1FLuKcnoH?@X8Hlo!4!0%S`)aSEO!pR_rR(4&%L9n0O@Yo`E z+vRqwnTVJ(;1v-^@2@qFY*pn}EkaU#-z8OU*;{+7aJ%kYzTB8@l|L1DLO3z@8BOlu zn{=b%4#sh7`)~dJ?q4S6V1;8cjCzmG&eP}a=KuzGq4k5&|Ml^HxDMPTdMR($;|H((-st%8kALav zP!7-ThmSzlv3HyV=r&NIWFvHObC98ZaR@*bKXdrG1Ub)capZY_yqJF1Ze+Ta)_5AG zAS7JAj!x<@3~rD+8@nI3TaBZsxpN)W^X#qq4Bj6j0lk){lcE`(Dnt78ZdDK9W!y@X zT6Louz~cD6ae)8k8I9*-hxj33#DBBcM*&5hWO)%FntY@$;&KoxTYbvSb>K zZLhqqP|u0eIrH~bx(X1cudOwIKjU>DnC66^U1nyS-UVj5Rx1Wc=3A4nRKqS zhn;jSly&dv6(ej_+HI%Sopoz`c^CeCZTwP&cQxhvHNp3H`1;oP=Ue4ZQ=&Yp5tFjB zregx-<^W);R_kAl>?j#zD&*6GGQ%XJ(nf6`vD@h3ZLPfB8sBb}+pa7g(U_7lSru95 zaYz!_ogC^skwzGJH}Xx`nw4O#&2qkB$YFp1#k{PH^x;9)jm?m#GEzP^H-7BDyE0zX z2jv)VArk<>N8YMZn{ZLMGQsX-}jj^$VBCKNERcpXMjN=i=vR#Y!xh8YM){NNUO! z4NBSPaY!E^6V6RWcuc~1DwKJmRN+yL$SD{=FoJOKm>jUUlGmg^sJM~4cduv|1mB-1 zUMp|;=wrmR|9|{UfaCD+<86nCm8G3LIimEueR$J7deT1^oBm*|;!k(>ei-)f#)ncn zzByjH2LkV4wqs&eIXU&XC`6Bjvyc?!pk4--7}D<%88f8h<@_{uD!nmHoZZRx3kGB9sZr*~SbP8YwNdf!&~p zgNVBCthb$YZCqEeZg^5zve#c@4N5xRZCEa&>e$czc*FbO)n;034K@|FrasWhuid@v zke4i0_itSQ&6q}YMRR~L!hCcfD`L@!9Nth8ikdE*Bw07YWXG-wH&u3&Ya60ACF>fv zRV63oc}_NM&ZB;*Df`yAyjT8lQ9j?`U9BRa5o{pyjyHw34KAy)Zk1Lui_A9WdTeEr z%&Lea=(FnY6{VEi4U(i}-oI;#FbQdfwlu38c_{q!w)1&aE-GHU1wUo||Ju8^BuQ>$ zz2l#IMAoINo8$~-vNI;FORLag^sY5%UB_gmbKxPIT~(O@*8|`HqMD=8QTge*etg>H+ot1Nk#2{!D5I3lwDsp?YEJKkQ_JtIbnoSrjq~rg^Df$$FPf58CEqxNBET+hK(FgXfj1gUjAtp*a0g6E{7j zQ^#+;oui`2=%iP6krzBGyR3Xi1>Xm~oqjE2M0{^yh<@yG|L5AUMpmbKIN$F3n{13U zMn1r0q%RA$9HAd`8d_yIiihbmBY+t5g3rnS`zBKyNO`r71PD{42zX0@5V6sc{2 z>?R%0hwkr8cYA3Ymqgz#caPev+y}G8qz=}YKS)PYZRYLi-8&)2;~?I%Bux>UujVwVd zWh=U<#wti(CVSdha|;#p@gUAxXQ-?>70SPM4TLs<5XIcB9+9=Y>S53|MIbhveKYg3+ zFyd_M=bgWMzeicgndOw4_U=2L|2`dJ3dEw7!;(wIwbx$E{6=kwz@FKrD<&y->C2SG z^!psqZml1!SKL`&YPum=(dD&+0@^5``4b{n4@2xa})jBYn+dl z6unt~|w>E;doxcS;wI92_ z-G!@d>(_p+g!acx51(CseGYvMlfOvcTI_eH&}R?*e3Ab8xar}ct{*S6wl2h>czsno zUv>NKRloknP5=AX(7!!P&uw7ZgG+z8cm4cwt6}QhuDvZ9l&vGVp6M7UR8%Z?hRh1O ze&@|cmrCt=v9=&p^!(TxI-*wiudN&4xwHY5`KT%19@N)HxRg4+qc*VA5P8dioR;^j zR`h!b<&_(5u>vf}`$a_;Q54O1eq<<&d6>>%oieJ@jP{ zeR;?YUPIw^C%;DzecD{NQq!IrHEr$t?2;Zlbg^hdmHIgTUPjF;m-cd~<;~vu?KMCR zJ9@6pAi%P4kCyE&o3_vQdN@Kqg-Q0RPkZg&x|sCymtBAT&yU)l?)CMzqU+b2$~8{U z?P%hUUh%g$Mt!%-m@-6UuwYZAGzSIq18Jvwc=}AQ@W%(tvP^1aPhOM!!KpIqLBRZ9 zYsbw??B6HqRL=DrGs1@NKCg2bQ_q&QbvtRqm_aceQEdzQENe$)Z|9@FDSR^s$TINU zrQ817-o8WiKK0oeX0;IRGbZw*^EJ$}{d{3esssGm&xWMFfLEIa8F_uJ&fpni8TxL3 z3Ir5_7nG5<)}^5{dz^nA{PP5gJ(201rEyNB4`hgILsqsJZdHH&f%M#@ORbp1xA>6xS* zW<-hS>pc&u8_(Pv8OEISIjfChf)BjmQs#>YJ}@ z$`^T$=TF9HvTMOx&)-u%pR;_JN!upBYt8ukMVCjDA6F@kx|H#yZM@RvaQA~msP^5q zfm*GJ(%QpON9bmEnAiE;)>=+3Mcb!c4?o@OpDslYPenifa_G0`L&s5<+5NoNu?Ii> z7<&ARYk%77+Tf;^Zx5B1SG|0_>0kfj&_Dks{ma$$^;Rp=dk_6`ExLti-*37+y=r^h zYar3yO04Z8zVEKfUbJnhFP>6g^Sm$Q)MmDA(L(%Ere@N*q;+Z2^N!XW{t|WM{Ywh~ zu5CO(wEN|%fzsaZV_lr7Hsg;c&sAG(E~+aN<{RN|p~tQ6xOcJk;?kQ*Lz}z@13Bd| z>)b=NOW^ki{re$(3)7>U{&Ga$7a*I+_f7ip;QFV>Lx(~SSJSVD>Gw8#Xjjyo|4jN} zGkw}km$v`K_-duLD3td52+7(q&}MQk(=*w2$?I331p?Wu9W6-m8o+K37pa&Y&9z@# zU%p&*dkvXO4__X1_v53=w(0fxs@qE)Fj~usHml%V_vEWXf5PVf&L1i*pQsjtQ#JYr z4_sE1twP9HI0I0fJ~qACW>Io#g&3RW^y{0Sv2#kNLcA9}z4f6LmZSJ-W$s*2Pp62M zHfz^M(|3*Ye_G`kIbmr0U6z9}eln)(Q3I~hyE4AJ9$BtuWz_O~wiMNJvi?Klh0Z5# z8t~ZH56Ch;i{??Y_ZF2nGRgI&rZNh}!v zOw+WY&125#jZ-Dsf38R9(JoP({@eqEDOveXo$Rdy}LXnIo@-)j@jJ<}_xe{_eWY@-R_zMlM_2u6Unj)E{Nb`~ML`wAie_MT}s!6`=Bw|JnmmpS2h(#wjbj`6;hoaWAGHo}`DT ztA2cV(e+#Cb}QOUdbl^;J-P0G*mU{pqqe6z*}nCMO+_l#L(eaVe)(4PZ_lQGy&igL z_v4$@jd3;|`m`VV@}ukFr#pFEl)Hf0wrRiL_3&`h2bFf0A#`KeTB_yk;=7gV5EASwv@VxS!<~XU8DZ}^D#db^*pwlK0liNb_?Ba zML&Eq{ht@pFLGU5Ho3Uz$)%@V+O4z&p1e(8?nRL@sLw@cY9&}?xyn_vd}Uh;uCmK8 z3xDf_vwW-nzS*68yVO>m&kwqPIdojxmR@&vvdg_*en0f`?a=l0)(23|#cx)|`QlTX zuSe@n_B+?d*~Vux@ArXc?Kz#g0_MuJO=?sQHS0Ydy(u92EQfQn9;aYoE;sV+vkz3x z^Qul0%^4-9h#^|*dTCt;S?;y+vX`Y(3x=e&?n6Jy6ugWU;!I$j0y_ROqRmzaDF-d* zxkpi5Gk@L7V4B6yp9dS)wD-T4)-vD9+6*uJX{d<~v`rlOj z=S$iz)ih!^Mupf*U}-G2lb`87pxzQOzxAKutsVr_W0f)`G~afk$D)~sPNRzFJkXo| z^J`91Gkb4;jBS!ffZ01d`Z-3WKOL`ERyN90uY>h^I`YlpkaD#=JK9)u^V;pPwYTDs z=AE!ISTUQDEqL!u5I!{l0}>Z_@F4C~k-P>XfEBKmD@l?ygRC{Bmh~qAT>U)d6z3 zDA8zPX>SsJzIMyYZPA_5S_p2@1_P=#vtQe<#m2qd@@+0uk6UA~KHHSetuY>;L)}oL0f@HlAD^eWo?LMUNH?thJR@Uc0 zxY`m>+U{}Trr0Fi?eaY5^-%4=-&Km~b~|)^Df(`!maK3x|Ic+~>*A@q<7Ib@jk2nJ ze9QX7>N47OHR|?!di3;;n#5WKseZ!oMxFP5N=V+BR?xidx9^LWsdcfod}94ATjN;s z8-Kmjqre<>VE;{jBR2JE;KfE7qQ5ZZo4lR=O~>2j`{>`le zMo^WrAnLs-?cz_tQ%)^y)z+!(%`riFEY*A1Tg-=Y5Ta0~9euon+IF#Z*RyHizVCjfx9Xgp<1Elxi-y^o^J?VK((coAi^f>c zcE3-p5A%aC(q;L;wj(eVd4DZE81#wu{T|>skypZQ@eLZe(GeZRPEZ zbKw!=VU>qslkBd}>)-aebgadpoEL7FO?J1*FLnD^`PPELwhnwY1n)=eci}O^^47ez>pO{g%=y*1awF+g_cmMixE(7==?d%eVK{ zb{`|GH@6?E8~5aZ)+~2QyX7N$L=P^d=x_CXe!i(K)Kgn3?l!AC6NUGtk?Co zTj=pMbpL$l?)PimPTJd&&6{eC*;d-Ld;w`|OqfX)Tkm_XOJ>(C$U~dLHd);cu6C2O zX4%}NsBDtdTH#&&^yN*LyyizUNA$KXtWetH&(0 zbtPw|)v`XHgSVCV`J|&590hz1Hl1H`-hQT6sJ&urKW8Ja)ih>>o8?TNv$nL1?>*9F z?f5;YZ)N=0uqazi`iaknm;#-CzESX$$W&gAYi>O_&gj%nYJq9KL`7S}#iZ#4r2SYwuG%b|xScEKcDz%iJ=NoqdgY!M(qfeSqu)0x z_HzZ674O`4-=o_0Z+)s?_QSPInFWpYpPSQZr$3(~w=C{54K{tRsN)p=U^?4a-#;Vn z5jcd#_ptm-1_M%!vSOU0HyO2?-7{#uA@rJ2{RtRB%G9isH)4uN$5?@wFK4gVvk)oy zqa`OTR|_cK37Fx!Wz*wOzz|p3(IAw|OtG%oLgTU?$r2 z@|y4BC@L>kU4MPix37n8x7xh>aCg(?lXPD)>a{T>JzTY9S062#>F#e8JwNsvQLll! z;6csRIiz21b>}<})2B`Pyw%Fw zFW&YSug&8%DJI)DZTGwG?yvg%P@C0DQC$gd4{f`&wIysbkD94%?X1xXFqP*cUbdcp zBJcIvThsqO3pDj+|5m1qSrT4nQS6)P;w_DJ`33EsGb~!As5UyMHR<2>S_$1eTM$gw zQuG?8--={My;eW$(xAUn$LbscA|6ITC*9d)WD-hkc?hkkA{@(QP z9J<_>cCB2#g<_AkicxJ5@lvGikm6`<;=81_eX};nHf0-^x7A3qTfj0OMjeHng}+5n ziPE|sZn{3-bX;RBtDVJL%cQ*m^Qmj1l@+yrf0TJCO^YmLfz=D)_SbEoy-nwtpOrqWv^{r`T@>;$lE2*t zn*x#^5VQ-CtxqwMs?mZP(-$7!=iCt9E@+O6a#MtBx48X}(DuLHro11#KlPdM<`Mj( z0-p!;^$RssR6RDz3i?guueX0z9#`rGlivLMxMj-9f2=e(<-$xshR~-{Z9czFY0erd zrtd!fJbi~=Yh;dH8?n2+HM)xjr$wDTKoGc2~GbL^QY##G`(qW-j<8CY3g2#l0hwq^13DM-rid4 z(!DiEvRZEUIrTYj+VcDMXS{wOSNv-`ijD!qHeIvnBF<&*+rK}RXm5RYus8pl<<49v zY6Jy!ANbMA+0$sIc`8_5-uw-D6>9(h2kJ>gK~!w6HK5Xd-wL$t&Hr~(A7EzF_c2r5 zS*=~C`MMlYyEy90OX#(A$CT1WWgk<%Io*59AL@CkzVH;OF9kgJI8Q(S|GbX#&1?De z&?uAgh&}(GQuP0&l`8$`@<6>T&yj8O&xF3qFL};!X{>*C{-SUHy`Ok~g!1R+-)9Be z%6*I4XWgeKpUQe4fsRd0`!VP1`96-D&;yKi;+E?Eg?p;!s3ynIO3?ZRmfq~MdL?n@0vRE9HKN2Mw9s7uz zLx-`>aoLzCV;D1;a~7Nl0al5^rox{0e4oZYJw4~WKkxIt{n?K*4{jJaq5a7>dHzgJ z+Hg;6)_m)=g^CM`&W*2BDpJ1u_WXOT9||)&E*`nCIQFNt=;^iP`Abh1zSGJWvzL@i zJsSOlF*f(hx<>nxHyHb;^KL=+^5Ra$?!4PyqlC!iyBx=lHSgmvH!S;_7;|K)Vn4t& zad6lDK*lWT!E_ng^>fzJO2!s<`sZt7@hsDPgLgqa*Y+LT> zZv_M)gex$FSxnuxvR{LzK7B!8Fs^0zF6fdy!C}m6D_jkIOL|f*4neI)E{L10AeH#o zces-ql!YlT3ZiNM>sxSm20lGp7K5~_=6}!`$>QimJewO^*6yRTK^t1dJtT(`9-e`y z0UUzbej4~XrWR)&jc&)o+|?*$U?8flUU`74+xP2@uxa8{KT0>^l-c|{xoSELds1-@VZ$nHdzee3lz+V&8TVr0Sz0rU<_E!l?dGWlwJ zSWL6k|4MyQt;0j&;MF+7`%s|>d&bR3^4(jHD&V1K6{;BaD@fHd(67Vc@D52_C0ZUAYj5d2@?y20r64Qh%L!%cONk)ZBzDCG0TtUsJsdm6uLB&fvrp7>Qztxw zSMEx|VmWB>$p@q&`?$8vy#G{bb)nwDwlI zQ6al=WwVjyYDc0h9EhHj0aqs!U$4jL)5av_YDOIQ21hMDX ze_F8RypvyQX}*<{F=8+Fr@?^`Uq0WI2ZIW$MvPESoN)Ox&swCap<)}`cw-{4D41D{ z%&U{1dV!8DJqp6Ah$dD^)8uuYFphXOyFo9sNI zk2=w4O$geA`6uj#{Y`l|D(q0_3nLdeSPUKxpO|uCaR@qP6RVI2UMM;@hXQL^DiKp= zh~R-lcoWIKQtVnuG2~ub23MXEBB3Tf1vy%h3LA_G*E8@iPChv@4x-$)fs)Cb%>`Ak zJoDe$2>mzbA~F?=|?HjA@@=0RusopqRCoXb-D}CH8;0dD95f+ zz6}d}dspG+l6YD~A~}Cj@=YYoyGYgyb66PVdozlrTcAeE_bPN$54M&=Hp&|a9YiVq!SX&N(SCE($X=ZJ~sT#G(TtZlsYoRQ6EwOBCIrR7SRy!79eh%Yq>jL3rz0L?pT<7>jXlzc9$E+gq{ R>)(*E?OXGXzD-yT&lSULRai$Wa??Eqpe_rcN4d=#ar8n`??We96=P7eF;`JE_R+6 zYdZ%g9G34}6`2p?WQ*l9Ii@42Lr}GIbkZad?F>n}Mm8iD8+ltkWhF*MUj^8}&Cb&b zy&gB}R-Q(bitUKu!IR z#qbTw=jiE4P>_)D@$nJ&kru}j9VDdW<>e(Lk4hXpDh4yeJp6E;R=#354}R(vzxGhG z^ROX05j>snI1F`9D{H)$Czg*7#xZ|vZs+Ut*X}rvKdujokf4r8NQp~I{PT2AC;R^} zojUTj=>$i-C*H#mPx$i!|8m5i!+%={>ihRge60xoZnBQf|9iTd+rM1H!}GK^DB=&L z{)gfM9 zdf`8fs^VSoL_=^ZJ1n2n)*`Cz6tvu|9PCV-Y&{+S+U>6aZ9AO9-$tm?xq4B}dmiTm z_xUBl)*{ot#;|;HM0?E-JLv#M#`2xCw|4?{`eF2`-iwhEmy#4e_OB~^ z9PMDY|9m%zKO~c&M%_O|QE@+TD8;Q)V#05rzk z^o9sR6XFDB`I|WqMEI`P-S=lto!k?yJfp?MKu=$Cr@)vCi*eqa5k}8u&2YhOX^daL zsxLdNcxMj-{ka75s8uHC{l&~7kI|3qip8A`i6=~G`4@ILw91j=JYwZ(I|&z?CQ2xG zn#PLn3{E9RHJ{j@{NkM62_A*?$h_OzLTR#k8V|5b5BN4;?D#-&DSc9&7xd(uulBi; z#JLQD<+058YO%hj8IRAt%6x^>5f{GVGWp^tIW|#rF{bI_@z1m_Q3cXJqio2gT2A|{ z{N(er74p~n8m~lPlarF}ei9qFri)fKPt=wQj<#apeCTIdDXp23^X%TB#k&;y)5N`T z=NTPE?;kqNT=vZGIZsS1D^{Fer*3+4ux2tMt&Zqb#W9(@V>EXgS7~aw6K6{J^>d0L z@fziCjTcOqEk9pgYKa`{+199#c-gr46LTV7r7@JN6yZA}50I9@kPk zY2=$Y(|?KZ;0vX8zP|-m7|tD2pd~AW(mZwQh6?IkS_q19BrWnHJ&St|pP_&ISI=S- z^X050Qso5tBm0w2yV6eQTBnCt(+b~AM5&*;lgKhwyuDj>Wsdx5WAXbS->FZZo0Q1k z#|iqCpgRaN94BTdZhi~L&Rk2yIxDW!bt_Zd8Jd7d`7wmn@VN!P*M{Y9PS+!{qyRn^bW4_DS}DOp@n z($Uq$!OpImqJ&-DOi}Q1wzIP{H&3p!baZxJSfjwKVS@0g9Bp2N6kEizWSVm00|yQy zB_#n>5|4RrDd{>`L&*=MOx4z^EMF@zrEX5JQhGNHx3Ptw!ttzQ@! z8QI#~s|Q}x*C+IQb+yyJWQcLgj*d>c^1{z6!73P5bl9nb=XXDS`qbXm)>QP7yvNw*&!2NF z$Qxq`c;jO`=0eekVE#m*(&{eCV#=o3rAxh?ot*;%v&*ElwKd9Ba?f^hbp5boLJMdt zy-F2Vw)QnM#k}T9#cvfso8gG%Z~HEPxA31SAya1XN+}Yn~ij0`-8)V!Zd;`sGz2XspXp0$?PhhZ?|z@d^|nF>a99d8}4;DC!O$_UHqU-wr}C; zC{j^?seF~$MRxBWiCroMJ3E!m2F7%|iXS-=FJ<#)xyvF2o(B(#ZJX}hyT{hyagrN_ zJgheV=92%i6hBy_dFZ#UuCBqsz~NWd+Wq~P>}3-S4GrC7!E%=>h<1K{@&dJV{D{7# zXFm%=Xr^vbC1E(E&JxWKT4$-h?8q3a{j|7Prm7!T)QuxkR&)|%+Y#*@sGx|kWzy!4 zM&+9Ih4<}Vfws14!?zOdM>g5Md-tvqygNH9>-gSUIt&tfyq$J4K0e+sQ}>vROu_7C z*+h5H$FF7;#4r5OibwrdT*K?{#>PG)iBCizmVDEF6`=lg2Y>&yru#xwm6gXQ$<>Yw zL?RJaK74)We%S{P9|{Nx8lYZt)6^dCsqh#N=e^3wcYbxV{V`rG`kFd(Za$tQw@uHpfX16OLCdWhV>Yev*;V=iTd;AnO({ zhv&&e-Pnr?`V__UgBMF$`u(}#{S~L3?m{Hl0^fOSU3yj#Iz&pAH1utmBtIElG4Z_i zL*Rx7SCESa!YZAqmoiZ4HPwqJ_xJU2M@LUZa2!5-xX9tdMo0ctuf_vDZHO6ozl+!E z(pR_M(gP>FbIQuT_f>cV1O#LW{g%@0nha(wcKS&4@W{^2juF3{MdEuc04s>Fg2Up9 z`}f&?n0r@KZFJiYZCUknsa5ZI@DA+Sbdd~Vqk>4PgTnQcerBYlrInS%u-s#VSRN)k z0Emf+QC|6EV~dzvLo7wrS=Q6fDyQ&W13SeEC~mGVW;v)N%6m_L`WCpkM&6`+1td%ur|N6Bv?qj7XQ9jc?FLk5Yd+lPodEY)td zrKtj#Z{3^rzv5N!oFH@9!qi>(eR0dFSrZ%qgU*N3x| zm6c^D)89vP1kVSONF-)nrS-aPylR7k*(C1Q2Euz3eCLKbb1xYh7(nP4MTcqy_o~d} zu~_W4nzh+dx8B>l%CqynA$6&f5v>0E_U)5)XwAvXtAWv@($eRnX&a8y2Gz}xvo~Rr zXm0tD#hf^gedcyh9{ zZI(HNdxGA)Q6~@Plh}bpedc;OGd|s2l;sf2HB9(1Q#LqI;=&jDyq3#hvb>5 zsnL)EIy#j*6JsBS>%&#k?tlb-GaxeLbI_@bivO>{+FB%hvwVka$Y%@^;;Wbp`xdT_ zZYwD(^YQjx&_&PeLJotAM)NASjo)2T!TtgQshH*nA)CXVB+Nq90v zwn~M>j~Fa1EfuUqi*yYP)C6vBfI&J!ExC6gyFf*Ykf(@0qO*x}Lv`f!FA_UbH~8F1r}7De|zS@QLk0lBj2umKrbbx#7XK83A!c@Yd3k1#oN^gMVMUT&Y=*{Ka%h^+A+;=vYZQKd{;W)uo50$YbI9aCM@LQA zNeY#kd%4Q{z;S}g@}9P^597U%Wn(O^J}0rhW}|8Q2pk8vlb&Amf4?+Im5 znwXq4z%p51M<$-<<;~Ux)AslGgR?1BR#gpNS#06gxDEawrHU-c$jJQO+dK7r?K}%A zAna7y>?|(2F&#GFLDSX-o4dG(#7wh#TqToVytsQAEMtFvS-%S z)un4h%N{%S90XHAJPl1vj|Z%JW_M(fSSJp1?ugeGEb7hy!4R4@9Y~>v*oH+cIfc^n z9SMZCspYJ#RWf^aFi?HV0#IfeV9F0zWj*m*Zy6=Ar9hWC&GCiN1{4$@*tSr6MAv zm#pYHp>JW40^-Z((M|;;jsgd%Po1L-h!cNSSGTpPNlRDP7>mx^PSbVNRv=1e3k zs0a%S>+3Vi{0N3L+l@-yo6s^wIL^k#X2gPOxmIsg)ZI*baO40DBFTOit^za{)fI+J zJbnH=0zY9{9kAFUmvUu6%fq8+@+3hA9fYI$V^@&WK(#quPmd)!EXs#YMNaU3lkJGI zND%LvGc;TEpv^AkaA1C2!J}L>ZSUZ=1A&_qU>O~uDuKt29Rp|_QXrV|BNyZ3@a9@t z+XrcD>0;&Z0}Ef?1D^s@+&lp5yt*!%=wv6LuZd9vb>iI(a^5sjnYw7m2TQ}ru z-e&Fv@rTK#>`~VmRfe-zk^VV~_6u+ep@q{bKqy(!+Mn|4eJ%4<PyO0SSjF9)lR;;^I=|fuN__-uN*MCnu*q7A?aOFd_OaB?2@ha_!nRCJyoD zckkc=GCokMJbd(sSaNs(E_a-pIrC%F8X`F`?OjzrJal55de}eO1eNX;W)&3`(`{UEkpFanbE#X5dSX%b(f=W&fkfReXDU+2;lVLQLbBxh%WWxUad1{fQ*bR|z%` z6DuH44?yun&%~}c|9bcIrXzsuVG$7#Y3Yx)BV-Bd)PjNnAnQ>1Qpe~|>B%O{2r2(; z`t8YCfSz&(*@VT#MTeI7hRJ+hRH{&V`-FE@5~Q7ztltZZin{VGK8!^_LL))% z0@%v0cd^kRb1%X7z>#!yZ%>|-6h{Y@Y6}`(y?WK&{wb_%jEssh$uo;+Sp zlt)!R5W;Vi?}HyUqTfIg6J>v254m%$p5-HAmOC;sa$>gJrZrI>E_V}|Xm*rg-?K+? zv02(|d+mAms($d2kC}Q7%U%0v+7jCxn_F6-78DnvDL)0|=;c&i)u;8lLCAze<*s7q zjw9xuZ}Hl`FnuI`d37k1rSK;|4NaScC%@yHoBL!Fbe2V9r*V~EpJpbLvI-0Dby%QK zn2>hIM5wYaT!?G1K8IxzECHWcSRmfs8-_s)a!g-XH{BC3&OX14iLC~0GBGh-pnQRm z47mT3C-c{lD=E{{)02~vz~kq8B;-w*=?+Usq+tDlgOq2KxO6GOO;4XbU9D}zjKaK) z+$$pM)+2)-P~-~QypxoKb!bhTo^~}3Jcka#eEs^B8ed@73bvqc){7dVD9l+BX_flJ z0dzVDmIc*Mc6RsrF5%&y<0&RsT0tXSUEMQhz^Ttd@;T0JjAb?=R+vRAZ~PdIR&Je? z*zJIfsL6%M;s?ymovR!48wNuBeIh-&a5d^Qawt-E$U%AS0$hIbLTYnQi3>2w_OBl^ zi>RYvk+P{-S&?{#x5bc{E!Iak9zJ{sxCu1&==zr!5iFK+SA(YlN&`R5M3pFT=5j(> zKh6Y;HsV7bgWa%DZHO4>q|!Xj0pOA7&Dt4@AK%s6JU(C@ zBso`RdN~-c8R>;_iX1s|vDCF2>S0sL{AD_Xfp%xxMQAVV)>E7x<=reVD7e$XJJ^tp znZw%`$qNZN^b|Y6jm-1QDk|h5G4e1<6_A#}l#{>xW-zdDW3zT2vZ1%6XjvCR4~4UO zy8Gq^MNw3EpasbIOiu|w@Fp!9F{OnfNFKhR1&+Jk|AU{%0SJa)Dl44C*$3=ANDHv45tSMH^lq@>-Ss4sCJRS&IGp&bDyYbgBH z5wUGzGY&LMzIy^o@C#NMn#v~+0Q*l<4QJ*)uEHQ#1b8cya)r1&*#V{pu;}28Y21fg zRasK3o$;11uRbmz5p5W(_1?ZH7g`c<)t^6qic-qi=n!R5DJf_*3knGd2?~yV`9f_< z6&Dj^C7)+JeTwTT{`x#K`Q7{XHp`8Bt(nj!2U*cOcJ91&^Conzpmvdk=7XGE;7Yec zOG`_Z#%{4=$GjHDS|B;JzJD*xbt|j!WFH3MjB?x#*<(5$irCvtGMDQjozF=eoeUk>*bBIsU8b~uglyGbjGIDafKwqE;r}F6V-+=iP z_Rc^T#JYD|*9`eS8dnH4CaE{Z;aB)YV`Jg?Z!3DJ6qe3b$hj}g6aFFCmt=)W4m>MvudsAjSW;N(2p zSE1O=D|Hf)6j$Hh*3t20-WL@dG#N2Mbr&3N7Mh=wk0~1uI(Vg^Qs>kF!J*!|1m0g0 z;E%`WPr8p7Ko0m`D%4u-faf6w1*-lN|2h0>|5S7H-E0>9Swt~RL+GW zdjesOCGZFB&T_W>a=0sFaSo6mxtYTOOr*t8HhiC4O94!JT}z=8lAO#l%T#&u)_%E- zg&6Y9n%jWJZQKq>ECvMFSoW85N z2gXcfycx;!gNhGvadGz28uqd1KKihT&feY=l9F?<7a4kpiHvH|tI%~>`uY*>MeXLL zLrO2%mm-q%_-yK@aui5u8@ zpuJE%_lgNh*4+!|M4`*59Jm3@&?NWbF_1JP<4|Y7vscFa58M?X@k&cbNXW}~+a8_i zEtA;8_?*Z23Sb;|sZG^qFu(`6yR-9={Yv^#(#W&%#h=Uv6qXVO*T(>^I}2&r(>D$q zJ_S0OWB!uVnR7vu5(|zjc+HWP+7~SwAh`eraoN_|9tAp({rEATm{=}!c0l}JkxUz? z&EraAWl(T2SFVpx56&MI6{RC+XqLjrdFu_}F11E6HU@jdx7c?EXzM1@SQ7VP_oBn= zsZH1PqTmTPMfLRg&P(_JFekf&d17K>4oP^32vQtK`M?nnNNu=N6%2J2pnAZ@&+)AB zRlRl-OLdNb&^iJ{8LqEfN?Cajxct~ykE?74ElN2Ev0R9JgyGx)jJdR;!f&cGm-otC z@MPK!=&8EOI@sF}Ks5;g?En;HiRHrgT|VUuK~3+SOVoL9lmY?+WQByFpxIqO18)JK zaoNz&U|;l8LwU6w(qmC!q3QfC@^M;~KF)pnH%^fPr)kaCX^NxE&iAv zh4%tBYkSKEudYE^9DD!1O<8X=4|dYKibK?tm9lF}Nk$c6jd?6^W8)j)_OAFP{UfxPRr0t~ep2&eaHjU0NO~4|1KV`jWL{*Ub rhHswx;(uT9{rA1*|MK^}o3stjVoeUJbKa-^XDqGLx@vi+EJOYeh6?~< literal 0 HcmV?d00001 diff --git a/backend/modules/test_images/init-mask_no_mask.png b/backend/modules/test_images/init-mask_no_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..2aecd3ea7db2c6adc472e8a8483a8ee6025d89a2 GIT binary patch literal 3513 zcmeHK?@tqF9Dk4jibBlX)YWKi$CjAP-t}66_3X*8McPOi1(aff<7l6@N87vG-Cd$RC)(3-6nBNqbNZJcRMREs~|xvpU5W+`1)+jB6)pu zrETMsFhY!*-RRYq|vBH480uV6*j8pUqH!s(>#oU8~^OxsG9dKG*zxk@fWoL1u)re&IDJ!+5`T$BWF zlLvaW!;xGPl?9&?VI^4XM@eSzVxNyg;f!GwYV~3iK^chr*%pxiL~0Me8#(0}sdn8x z*DT~5=PerHzBWa6$vxEmXpWH6g9I(6M-k-F{E^V0@l1?g0wAr0Lur|l4ggl~Yufk4 zrVYi9?Jm0M&}C+1oNGI?MaN)`OOEZzc(ft2HhgC+ucCY8gI$T7;mi!z+uK@yU)Z=J zk=xQazY`{i#wuxDO?uv~MgFe}dk)D5&FSBXTL*qTH`z8YmS`Kj5pTV+Zbipg*YoRE z(eLizCMz3rg{CYBY{`iHimyf%mWv+AaUyq6P`6t>x)sMV)taDS} zi9X&*tlkkEKWpqc7+-Vyz`)jLucZfD&zOE|_4K$M+!Jif+*L+@^yf(bjy+7r;lule z^jBXkpI@{sUPit02AjG3t(f~0ll{ntC-;xOaQTR@M0)(t=Ip?lH=ioW{rF_;)T#pq z7c)ej^Wx8cjeb79=bejEQ}?p*jzvG5&eEMfdVyPhWcO<>OG|s{g-cs*)#TP+tGn~% z-m&4VemY*aB{7s67oO|isT=Hk`qajec6;xQ1#3%>-qp1)z0Caa{q>1eeZgCsYtD3M zeI{K!JCVcN{XczMw=;-784E;vtqj1zCF(B?w8xhNkhRibE3S^lZw^vv09({+=a9419C@d^#9n0dQr4#W3|qg& { const { shouldShowGalleryButton, shouldShowOptionsPanelButton } = useAppSelector(appSelector); - useEffect(() => { - dispatch(requestSystemConfig()); - }, [dispatch]); - return (

diff --git a/frontend/src/app/constants.ts b/frontend/src/app/constants.ts index bd457dc7fb..78511c10d7 100644 --- a/frontend/src/app/constants.ts +++ b/frontend/src/app/constants.ts @@ -1,6 +1,6 @@ // TODO: use Enums? -import { InProgressImageType } from '../features/system/systemSlice'; +import { InProgressImageType } from 'features/system/systemSlice'; // Valid samplers export const SAMPLERS: Array = [ diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index 0a263e2799..3407f68455 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -12,7 +12,9 @@ * 'gfpgan'. */ -import { Category as GalleryCategory } from '../features/gallery/gallerySlice'; +import { Category as GalleryCategory } from 'features/gallery/gallerySlice'; +import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { IRect } from 'konva/lib/types'; /** * TODO: @@ -115,8 +117,8 @@ export declare type Image = { metadata?: Metadata; width: number; height: number; - category: GalleryCategory; - isBase64: boolean; + category: GalleryCategory; + isBase64: boolean; }; // GalleryImages is an array of Image. @@ -171,10 +173,13 @@ export declare type SystemStatusResponse = SystemStatus; export declare type SystemConfigResponse = SystemConfig; -export declare type ImageResultResponse = Omit; +export declare type ImageResultResponse = Omit & { + boundingBox?: IRect; + generationMode: InvokeTabName; +}; export declare type ImageUploadResponse = Omit & { - destination: 'img2img' | 'inpainting'; + destination: 'img2img' | 'inpainting' | 'outpainting' | 'outpainting_merge'; }; export declare type ErrorResponse = { @@ -198,9 +203,17 @@ export declare type ImageUrlResponse = { url: string; }; -export declare type ImageUploadDestination = 'img2img' | 'inpainting'; +export declare type ImageUploadDestination = + | 'img2img' + | 'inpainting' + | 'outpainting_merge'; export declare type UploadImagePayload = { file: File; destination?: ImageUploadDestination; }; + +export declare type UploadOutpaintingMergeImagePayload = { + dataURL: string; + name: string; +}; diff --git a/frontend/src/app/selectors/readinessSelector.ts b/frontend/src/app/selectors/readinessSelector.ts index 702f45c473..559c71b614 100644 --- a/frontend/src/app/selectors/readinessSelector.ts +++ b/frontend/src/app/selectors/readinessSelector.ts @@ -1,39 +1,35 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; -import { RootState } from '../store'; -import { activeTabNameSelector } from '../../features/options/optionsSelectors'; -import { OptionsState } from '../../features/options/optionsSlice'; - -import { SystemState } from '../../features/system/systemSlice'; -import { InpaintingState } from '../../features/tabs/Inpainting/inpaintingSlice'; -import { validateSeedWeights } from '../../common/util/seedWeightPairs'; +import { RootState } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { OptionsState } from 'features/options/optionsSlice'; +import { SystemState } from 'features/system/systemSlice'; +import { baseCanvasImageSelector } from 'features/canvas/canvasSlice'; +import { validateSeedWeights } from 'common/util/seedWeightPairs'; export const readinessSelector = createSelector( [ (state: RootState) => state.options, (state: RootState) => state.system, - (state: RootState) => state.inpainting, + baseCanvasImageSelector, activeTabNameSelector, ], ( options: OptionsState, system: SystemState, - inpainting: InpaintingState, + baseCanvasImage, activeTabName ) => { const { prompt, shouldGenerateVariations, seedWeights, - // maskPath, initialImage, seed, } = options; const { isProcessing, isConnected } = system; - const { imageToInpaint } = inpainting; - let isReady = true; const reasonsWhyNotReady: string[] = []; @@ -48,20 +44,11 @@ export const readinessSelector = createSelector( reasonsWhyNotReady.push('No initial image selected'); } - if (activeTabName === 'inpainting' && !imageToInpaint) { + if (activeTabName === 'inpainting' && !baseCanvasImage) { isReady = false; reasonsWhyNotReady.push('No inpainting image selected'); } - // // We don't use mask paths now. - // // Cannot generate with a mask without img2img - // if (maskPath && !initialImage) { - // isReady = false; - // reasonsWhyNotReady.push( - // 'On ImageToImage tab, but no mask is provided.' - // ); - // } - // TODO: job queue // Cannot generate if already processing an image if (isProcessing) { diff --git a/frontend/src/app/socketio/actions.ts b/frontend/src/app/socketio/actions.ts index 05e0eb92b8..faad169b07 100644 --- a/frontend/src/app/socketio/actions.ts +++ b/frontend/src/app/socketio/actions.ts @@ -1,7 +1,7 @@ import { createAction } from '@reduxjs/toolkit'; -import { GalleryCategory } from '../../features/gallery/gallerySlice'; -import { InvokeTabName } from '../../features/tabs/InvokeTabs'; -import * as InvokeAI from '../invokeai'; +import { GalleryCategory } from 'features/gallery/gallerySlice'; +import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import * as InvokeAI from 'app/invokeai'; /** diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 3f1740b027..803b81ca03 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -4,23 +4,24 @@ import { Socket } from 'socket.io-client'; import { frontendToBackendParameters, FrontendToBackendParametersConfig, -} from '../../common/util/parameterTranslation'; +} from 'common/util/parameterTranslation'; import { GalleryCategory, GalleryState, removeImage, -} from '../../features/gallery/gallerySlice'; -import { OptionsState } from '../../features/options/optionsSlice'; +} from 'features/gallery/gallerySlice'; +import { OptionsState } from 'features/options/optionsSlice'; import { addLogEntry, errorOccurred, modelChangeRequested, setIsProcessing, -} from '../../features/system/systemSlice'; -import { inpaintingImageElementRef } from '../../features/tabs/Inpainting/InpaintingCanvas'; -import { InvokeTabName } from '../../features/tabs/InvokeTabs'; -import * as InvokeAI from '../invokeai'; -import { RootState } from '../store'; +} from 'features/system/systemSlice'; +import { inpaintingImageElementRef } from 'features/canvas/IAICanvas'; +import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import * as InvokeAI from 'app/invokeai'; +import { RootState } from 'app/store'; +import { baseCanvasImageSelector } from 'features/canvas/canvasSlice'; /** * Returns an object containing all functions which use `socketio.emit()`. @@ -42,7 +43,7 @@ const makeSocketIOEmitters = ( const { options: optionsState, system: systemState, - inpainting: inpaintingState, + canvas: canvasState, gallery: galleryState, } = state; @@ -50,15 +51,15 @@ const makeSocketIOEmitters = ( { generationMode, optionsState, - inpaintingState, + canvasState, systemState, }; - if (generationMode === 'inpainting') { - if ( - !inpaintingImageElementRef.current || - !inpaintingState.imageToInpaint?.url - ) { + if (['inpainting', 'outpainting'].includes(generationMode)) { + const baseCanvasImage = baseCanvasImageSelector(getState()); + const imageUrl = baseCanvasImage?.url; + + if (!inpaintingImageElementRef.current || !imageUrl) { dispatch( addLogEntry({ timestamp: dateFormat(new Date(), 'isoDateTime'), @@ -70,11 +71,10 @@ const makeSocketIOEmitters = ( return; } - frontendToBackendParametersConfig.imageToProcessUrl = - inpaintingState.imageToInpaint.url; + frontendToBackendParametersConfig.imageToProcessUrl = imageUrl; - frontendToBackendParametersConfig.maskImageElement = - inpaintingImageElementRef.current; + // frontendToBackendParametersConfig.maskImageElement = + // inpaintingImageElementRef.current; } else if (!['txt2img', 'img2img'].includes(generationMode)) { if (!galleryState.currentImage?.url) return; @@ -96,7 +96,12 @@ const makeSocketIOEmitters = ( // TODO: handle maintaining masks for reproducibility in future if (generationParameters.init_mask) { generationParameters.init_mask = generationParameters.init_mask - .substr(0, 20) + .substr(0, 64) + .concat('...'); + } + if (generationParameters.init_img) { + generationParameters.init_img = generationParameters.init_img + .substr(0, 64) .concat('...'); } diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index e27d79f55c..84dab263c2 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -2,7 +2,7 @@ import { AnyAction, MiddlewareAPI, Dispatch } from '@reduxjs/toolkit'; import { v4 as uuidv4 } from 'uuid'; import dateFormat from 'dateformat'; -import * as InvokeAI from '../invokeai'; +import * as InvokeAI from 'app/invokeai'; import { addLogEntry, @@ -15,7 +15,7 @@ import { errorOccurred, setModelList, setIsCancelable, -} from '../../features/system/systemSlice'; +} from 'features/system/systemSlice'; import { addGalleryImages, @@ -25,19 +25,21 @@ import { removeImage, setCurrentImage, setIntermediateImage, -} from '../../features/gallery/gallerySlice'; +} from 'features/gallery/gallerySlice'; import { clearInitialImage, setInitialImage, setMaskPath, -} from '../../features/options/optionsSlice'; -import { requestImages, requestNewImages } from './actions'; +} from 'features/options/optionsSlice'; +import { requestImages, requestNewImages, requestSystemConfig } from './actions'; import { + addImageToOutpaintingSesion, clearImageToInpaint, setImageToInpaint, -} from '../../features/tabs/Inpainting/inpaintingSlice'; -import { tabMap } from '../../features/tabs/InvokeTabs'; + setImageToOutpaint, +} from 'features/canvas/canvasSlice'; +import { tabMap } from 'features/tabs/InvokeTabs'; /** * Returns an object containing listener callbacks for socketio events. @@ -56,6 +58,7 @@ const makeSocketIOListeners = ( try { dispatch(setIsConnected(true)); dispatch(setCurrentStatus('Connected')); + dispatch(requestSystemConfig()); const gallery: GalleryState = getState().gallery; if (gallery.categories.user.latest_mtime) { @@ -111,6 +114,16 @@ const makeSocketIOListeners = ( }) ); + if (data.generationMode === 'outpainting' && data.boundingBox) { + const { boundingBox } = data; + dispatch( + addImageToOutpaintingSesion({ + image: newImage, + boundingBox, + }) + ); + } + if (shouldLoopback) { const activeTabName = tabMap[activeTab]; switch (activeTabName) { @@ -299,15 +312,15 @@ const makeSocketIOListeners = ( // remove references to image in options const { initialImage, maskPath } = getState().options; - const { imageToInpaint } = getState().inpainting; + const { inpainting, outpainting } = getState().canvas; if (initialImage?.url === url || initialImage === url) { dispatch(clearInitialImage()); } - if (imageToInpaint?.url === url) { - dispatch(clearImageToInpaint()); - } + // if (imageToInpaint?.url === url) { + // dispatch(clearImageToInpaint()); + // } if (maskPath === url) { dispatch(setMaskPath('')); diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 854e245c4f..3f4fd1d06c 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -4,7 +4,7 @@ import { io } from 'socket.io-client'; import makeSocketIOListeners from './listeners'; import makeSocketIOEmitters from './emitters'; -import * as InvokeAI from '../invokeai'; +import * as InvokeAI from 'app/invokeai'; /** * Creates a socketio middleware to handle communication with server. @@ -104,12 +104,9 @@ export const socketioMiddleware = () => { onImageDeleted(data); }); - socketio.on( - 'imageUploaded', - (data: InvokeAI.ImageUploadResponse) => { - onImageUploaded(data); - } - ); + socketio.on('imageUploaded', (data: InvokeAI.ImageUploadResponse) => { + onImageUploaded(data); + }); socketio.on('maskImageUploaded', (data: InvokeAI.ImageUrlResponse) => { onMaskImageUploaded(data); diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 76ccc09bfe..f2b5b8e636 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -5,16 +5,14 @@ import type { TypedUseSelectorHook } from 'react-redux'; import { persistReducer } from 'redux-persist'; import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web -import optionsReducer, { OptionsState } from '../features/options/optionsSlice'; -import galleryReducer, { GalleryState } from '../features/gallery/gallerySlice'; -import inpaintingReducer, { - InpaintingState, -} from '../features/tabs/Inpainting/inpaintingSlice'; +import { getPersistConfig } from 'redux-deep-persist'; + +import optionsReducer from 'features/options/optionsSlice'; +import galleryReducer from 'features/gallery/gallerySlice'; +import systemReducer from 'features/system/systemSlice'; +import canvasReducer from 'features/canvas/canvasSlice'; -import systemReducer, { SystemState } from '../features/system/systemSlice'; import { socketioMiddleware } from './socketio/middleware'; -import autoMergeLevel2 from 'redux-persist/es/stateReconciler/autoMergeLevel2'; -import { PersistPartial } from 'redux-persist/es/persistReducer'; /** * redux-persist provides an easy and reliable way to persist state across reloads. @@ -28,87 +26,82 @@ import { PersistPartial } from 'redux-persist/es/persistReducer'; * These can be blacklisted in redux-persist. * * The necesssary nested persistors with blacklists are configured below. - * - * TODO: Do we blacklist initialImagePath? If the image is deleted from disk we get an - * ugly 404. But if we blacklist it, then this is a valuable parameter that is lost - * on reload. Need to figure out a good way to handle this. */ -const rootPersistConfig = { - key: 'root', - storage, - stateReconciler: autoMergeLevel2, - blacklist: ['gallery', 'system', 'inpainting'], -}; +const genericCanvasBlacklist = [ + 'pastObjects', + 'futureObjects', + 'stageScale', + 'stageDimensions', + 'stageCoordinates', + 'cursorPosition', +]; -const systemPersistConfig = { - key: 'system', - storage, - stateReconciler: autoMergeLevel2, - blacklist: [ - 'isCancelable', - 'isConnected', - 'isProcessing', - 'currentStep', - 'socketId', - 'isESRGANAvailable', - 'isGFPGANAvailable', - 'currentStep', - 'totalSteps', - 'currentIteration', - 'totalIterations', - 'currentStatus', - ], -}; +const inpaintingCanvasBlacklist = genericCanvasBlacklist.map( + (blacklistItem) => `canvas.inpainting.${blacklistItem}` +); -const galleryPersistConfig = { - key: 'gallery', - storage, - stateReconciler: autoMergeLevel2, - whitelist: [ - 'galleryWidth', - 'shouldPinGallery', - 'shouldShowGallery', - 'galleryScrollPosition', - 'galleryImageMinimumWidth', - 'galleryImageObjectFit', - ], -}; +const outpaintingCanvasBlacklist = genericCanvasBlacklist.map( + (blacklistItem) => `canvas.outpainting.${blacklistItem}` +); -const inpaintingPersistConfig = { - key: 'inpainting', - storage, - stateReconciler: autoMergeLevel2, - blacklist: ['pastLines', 'futuresLines', 'cursorPosition'], -}; +const systemBlacklist = [ + 'currentIteration', + 'currentStatus', + 'currentStep', + 'isCancelable', + 'isConnected', + 'isESRGANAvailable', + 'isGFPGANAvailable', + 'isProcessing', + 'socketId', + 'totalIterations', + 'totalSteps', +].map((blacklistItem) => `system.${blacklistItem}`); -const reducers = combineReducers({ +const galleryBlacklist = [ + 'categories', + 'currentCategory', + 'currentImage', + 'currentImageUuid', + 'shouldAutoSwitchToNewImages', + 'shouldHoldGalleryOpen', + 'intermediateImage', +].map((blacklistItem) => `gallery.${blacklistItem}`); + +const rootReducer = combineReducers({ options: optionsReducer, - gallery: persistReducer(galleryPersistConfig, galleryReducer), - system: persistReducer(systemPersistConfig, systemReducer), - inpainting: persistReducer( - inpaintingPersistConfig, - inpaintingReducer - ), + gallery: galleryReducer, + system: systemReducer, + canvas: canvasReducer, }); -const persistedReducer = persistReducer<{ - options: OptionsState; - gallery: GalleryState & PersistPartial; - system: SystemState & PersistPartial; - inpainting: InpaintingState & PersistPartial; -}>(rootPersistConfig, reducers); +const rootPersistConfig = getPersistConfig({ + key: 'root', + storage, + rootReducer, + blacklist: [ + ...inpaintingCanvasBlacklist, + ...outpaintingCanvasBlacklist, + ...systemBlacklist, + ...galleryBlacklist, + ], + throttle: 500, +}); + +const persistedReducer = persistReducer(rootPersistConfig, rootReducer); // Continue with store setup export const store = configureStore({ reducer: persistedReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ - // redux-persist sometimes needs to temporarily put a function in redux state, need to disable this check + immutableCheck: false, serializableCheck: false, }).concat(socketioMiddleware()), }); +export type AppGetState = typeof store.getState; export type RootState = ReturnType; export type AppDispatch = typeof store.dispatch; diff --git a/frontend/src/common/components/GuideIcon.tsx b/frontend/src/common/components/GuideIcon.tsx index 2f4312ae76..e3e32ea32e 100644 --- a/frontend/src/common/components/GuideIcon.tsx +++ b/frontend/src/common/components/GuideIcon.tsx @@ -1,7 +1,7 @@ import { Box, forwardRef, Icon } from '@chakra-ui/react'; import { IconType } from 'react-icons'; import { MdHelp } from 'react-icons/md'; -import { Feature } from '../../app/features'; +import { Feature } from 'app/features'; import GuidePopover from './GuidePopover'; type GuideIconProps = { diff --git a/frontend/src/common/components/GuidePopover.scss b/frontend/src/common/components/GuidePopover.scss index faa31212bb..58434270b2 100644 --- a/frontend/src/common/components/GuidePopover.scss +++ b/frontend/src/common/components/GuidePopover.scss @@ -1,11 +1,11 @@ .guide-popover-arrow { - background-color: var(--tab-panel-bg) !important; - box-shadow: none !important; + background-color: var(--tab-panel-bg); + box-shadow: none; } .guide-popover-content { - background-color: var(--background-color-secondary) !important; - border: none !important; + background-color: var(--background-color-secondary); + border: none; } .guide-popover-guide-content { diff --git a/frontend/src/common/components/GuidePopover.tsx b/frontend/src/common/components/GuidePopover.tsx index b5893629c0..2fd6d082d0 100644 --- a/frontend/src/common/components/GuidePopover.tsx +++ b/frontend/src/common/components/GuidePopover.tsx @@ -5,12 +5,12 @@ import { PopoverTrigger, Box, } from '@chakra-ui/react'; -import { SystemState } from '../../features/system/systemSlice'; -import { useAppSelector } from '../../app/store'; -import { RootState } from '../../app/store'; +import { SystemState } from 'features/system/systemSlice'; +import { useAppSelector } from 'app/store'; +import { RootState } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; import { ReactElement } from 'react'; -import { Feature, FEATURES } from '../../app/features'; +import { Feature, FEATURES } from 'app/features'; type GuideProps = { children: ReactElement; diff --git a/frontend/src/common/components/IAIButton.scss b/frontend/src/common/components/IAIButton.scss index 1ac41cf0d7..90489a3bda 100644 --- a/frontend/src/common/components/IAIButton.scss +++ b/frontend/src/common/components/IAIButton.scss @@ -1,3 +1,8 @@ .invokeai__button { - justify-content: space-between; + background-color: var(--btn-base-color); + place-content: center; + + &:hover { + background-color: var(--btn-base-color-hover); + } } diff --git a/frontend/src/common/components/IAICheckbox.scss b/frontend/src/common/components/IAICheckbox.scss index c0118e25e1..3b79c8f4db 100644 --- a/frontend/src/common/components/IAICheckbox.scss +++ b/frontend/src/common/components/IAICheckbox.scss @@ -15,7 +15,7 @@ svg { width: 0.6rem; height: 0.6rem; - stroke-width: 3px !important; + stroke-width: 3px; } &[data-checked] { diff --git a/frontend/src/common/components/IAIIconButton.scss b/frontend/src/common/components/IAIIconButton.scss index 7bed75c3fc..d55e5de4c5 100644 --- a/frontend/src/common/components/IAIIconButton.scss +++ b/frontend/src/common/components/IAIIconButton.scss @@ -1,11 +1,11 @@ @use '../../styles/Mixins/' as *; .invokeai__icon-button { - background-color: var(--btn-grey); + background: var(--btn-base-color); cursor: pointer; &:hover { - background-color: var(--btn-grey-hover); + background-color: var(--btn-base-color-hover); } &[data-selected='true'] { @@ -20,16 +20,39 @@ } &[data-variant='link'] { - background: none !important; + background: none; &:hover { - background: none !important; + background: none; } } - &[data-selected='true'] { - border-color: var(--accent-color); + // Check Box Style + &[data-as-checkbox='true'] { + background-color: var(--btn-base-color); + border: 3px solid var(--btn-base-color); + + svg { + fill: var(--text-color); + } + &:hover { - border-color: var(--accent-color-hover); + background-color: var(--btn-base-color); + border-color: var(--btn-checkbox-border-hover); + svg { + fill: var(--text-color); + } + } + + &[data-selected='true'] { + border-color: var(--accent-color); + svg { + fill: var(--accent-color-hover); + } + &:hover { + svg { + fill: var(--accent-color-hover); + } + } } } @@ -38,28 +61,12 @@ animation-duration: 1s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; + &:hover { animation: none; background-color: var(--accent-color-hover); } } - - &[data-as-checkbox='true'] { - background-color: var(--btn-grey); - border: 3px solid var(--btn-grey); - - svg { - fill: var(--text-color); - } - - &:hover { - background-color: var(--btn-grey); - border-color: var(--btn-checkbox-border-hover); - svg { - fill: var(--text-color); - } - } - } } @keyframes pulseColor { diff --git a/frontend/src/common/components/IAIIconButton.tsx b/frontend/src/common/components/IAIIconButton.tsx index 3cc76c09f0..239e1f5372 100644 --- a/frontend/src/common/components/IAIIconButton.tsx +++ b/frontend/src/common/components/IAIIconButton.tsx @@ -25,13 +25,23 @@ const IAIIconButton = forwardRef((props: IAIIconButtonProps, forwardedRef) => { } = props; return ( - + diff --git a/frontend/src/common/components/IAINumberInput.scss b/frontend/src/common/components/IAINumberInput.scss index c7de72dd9a..5012828311 100644 --- a/frontend/src/common/components/IAINumberInput.scss +++ b/frontend/src/common/components/IAINumberInput.scss @@ -1,16 +1,14 @@ .invokeai__number-input-form-control { - display: grid; - grid-template-columns: max-content auto; + display: flex; align-items: center; + column-gap: 1rem; .invokeai__number-input-form-label { color: var(--text-color-secondary); margin-right: 0; font-size: 1rem; margin-bottom: 0; - flex-grow: 2; white-space: nowrap; - padding-right: 1rem; &[data-focus] + .invokeai__number-input-root { outline: none; @@ -33,7 +31,7 @@ align-items: center; background-color: var(--background-color-secondary); border: 2px solid var(--border-color); - border-radius: 0.2rem; + border-radius: 0.3rem; } .invokeai__number-input-field { @@ -41,10 +39,8 @@ font-weight: bold; width: 100%; height: auto; - padding: 0; font-size: 0.9rem; - padding-left: 0.5rem; - padding-right: 0.5rem; + padding: 0 0.5rem; &:focus { outline: none; diff --git a/frontend/src/common/components/IAINumberInput.tsx b/frontend/src/common/components/IAINumberInput.tsx index b538092909..9d6e6969a0 100644 --- a/frontend/src/common/components/IAINumberInput.tsx +++ b/frontend/src/common/components/IAINumberInput.tsx @@ -21,6 +21,7 @@ const numberStringRegex = /^-?(0\.)?\.?$/; interface Props extends Omit { styleClass?: string; label?: string; + labelFontSize?: string | number; width?: string | number; showStepper?: boolean; value: number; @@ -43,6 +44,7 @@ interface Props extends Omit { const IAINumberInput = (props: Props) => { const { label, + labelFontSize = '1rem', styleClass, isDisabled = false, showStepper = true, @@ -127,6 +129,7 @@ const IAINumberInput = (props: Props) => { {label} diff --git a/frontend/src/common/components/IAIPopover.scss b/frontend/src/common/components/IAIPopover.scss index 73fab8cfb5..ab2ac26b3a 100644 --- a/frontend/src/common/components/IAIPopover.scss +++ b/frontend/src/common/components/IAIPopover.scss @@ -1,10 +1,10 @@ .invokeai__popover-content { min-width: unset; - width: unset !important; + width: unset; padding: 1rem; - border-radius: 0.5rem !important; - background-color: var(--background-color) !important; - border: 2px solid var(--border-color) !important; + border-radius: 0.5rem; + background-color: var(--background-color); + border: 2px solid var(--border-color); .invokeai__popover-arrow { background-color: var(--background-color) !important; diff --git a/frontend/src/common/components/IAIPopover.tsx b/frontend/src/common/components/IAIPopover.tsx index ff18d96ddd..74bf1644a4 100644 --- a/frontend/src/common/components/IAIPopover.tsx +++ b/frontend/src/common/components/IAIPopover.tsx @@ -29,7 +29,7 @@ const IAIPopover = (props: IAIPopoverProps) => { {triggerComponent} - {hasArrow && } + {hasArrow && } {children} diff --git a/frontend/src/common/components/IAISelect.scss b/frontend/src/common/components/IAISelect.scss index d0b9e54037..83df2d41bf 100644 --- a/frontend/src/common/components/IAISelect.scss +++ b/frontend/src/common/components/IAISelect.scss @@ -27,5 +27,6 @@ .invokeai__select-option { background-color: var(--background-color-secondary); + color: var(--text-color-secondary); } } diff --git a/frontend/src/common/components/IAISelect.tsx b/frontend/src/common/components/IAISelect.tsx index cfec3ff18d..138ba2da30 100644 --- a/frontend/src/common/components/IAISelect.tsx +++ b/frontend/src/common/components/IAISelect.tsx @@ -2,7 +2,7 @@ import { FormControl, FormLabel, Select, SelectProps } from '@chakra-ui/react'; import { MouseEvent } from 'react'; type IAISelectProps = SelectProps & { - label: string; + label?: string; styleClass?: string; validValues: | Array @@ -32,15 +32,18 @@ const IAISelect = (props: IAISelectProps) => { e.nativeEvent.cancelBubble = true; }} > - - {label} - + {label && ( + + {label} + + )} + {children} {isDragActive && isHandlingUpload && ( diff --git a/frontend/src/common/components/ImageUploaderButton.tsx b/frontend/src/common/components/ImageUploaderButton.tsx index 373ab7ad21..c11428cec7 100644 --- a/frontend/src/common/components/ImageUploaderButton.tsx +++ b/frontend/src/common/components/ImageUploaderButton.tsx @@ -1,7 +1,7 @@ import { Heading } from '@chakra-ui/react'; import { useContext } from 'react'; import { FaUpload } from 'react-icons/fa'; -import { ImageUploaderTriggerContext } from '../../app/contexts/ImageUploaderTriggerContext'; +import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; type ImageUploaderButtonProps = { styleClass?: string; diff --git a/frontend/src/common/components/ImageUploaderIconButton.tsx b/frontend/src/common/components/ImageUploaderIconButton.tsx index 214e7b7b7c..b35b32afce 100644 --- a/frontend/src/common/components/ImageUploaderIconButton.tsx +++ b/frontend/src/common/components/ImageUploaderIconButton.tsx @@ -1,6 +1,6 @@ import { useContext } from 'react'; import { FaUpload } from 'react-icons/fa'; -import { ImageUploaderTriggerContext } from '../../app/contexts/ImageUploaderTriggerContext'; +import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; import IAIIconButton from './IAIIconButton'; const ImageUploaderIconButton = () => { diff --git a/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx b/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx index 20686087a0..0867232c31 100644 --- a/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx +++ b/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import Img2ImgPlaceHolder from '../../../assets/images/image2img.png'; +import Img2ImgPlaceHolder from 'assets/images/image2img.png'; export const ImageToImageWIP = () => { return ( diff --git a/frontend/src/common/util/openBase64ImageInTab.ts b/frontend/src/common/util/openBase64ImageInTab.ts new file mode 100644 index 0000000000..0e18ccb45f --- /dev/null +++ b/frontend/src/common/util/openBase64ImageInTab.ts @@ -0,0 +1,21 @@ +type Base64AndCaption = { + base64: string; + caption: string; +}; + +const openBase64ImageInTab = (images: Base64AndCaption[]) => { + const w = window.open(''); + if (!w) return; + + images.forEach((i) => { + const image = new Image(); + image.src = i.base64; + + w.document.write(i.caption); + w.document.write('
'); + w.document.write(image.outerHTML); + w.document.write('

'); + }); +}; + +export default openBase64ImageInTab; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index d1f52cd9ac..f73da43898 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -1,20 +1,21 @@ -import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from '../../app/constants'; -import { OptionsState } from '../../features/options/optionsSlice'; -import { SystemState } from '../../features/system/systemSlice'; +import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; +import { OptionsState } from 'features/options/optionsSlice'; +import { SystemState } from 'features/system/systemSlice'; import { stringToSeedWeightsArray } from './seedWeightPairs'; import randomInt from './randomInt'; -import { InvokeTabName } from '../../features/tabs/InvokeTabs'; -import { InpaintingState } from '../../features/tabs/Inpainting/inpaintingSlice'; -import generateMask from '../../features/tabs/Inpainting/util/generateMask'; +import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { CanvasState, isCanvasMaskLine } from 'features/canvas/canvasSlice'; +import generateMask from 'features/canvas/util/generateMask'; +import { canvasImageLayerRef } from 'features/canvas/IAICanvas'; +import openBase64ImageInTab from './openBase64ImageInTab'; export type FrontendToBackendParametersConfig = { generationMode: InvokeTabName; optionsState: OptionsState; - inpaintingState: InpaintingState; + canvasState: CanvasState; systemState: SystemState; imageToProcessUrl?: string; - maskImageElement?: HTMLImageElement; }; /** @@ -27,10 +28,9 @@ export const frontendToBackendParameters = ( const { generationMode, optionsState, - inpaintingState, + canvasState, systemState, imageToProcessUrl, - maskImageElement, } = config; const { @@ -62,8 +62,11 @@ export const frontendToBackendParameters = ( shouldRandomizeSeed, } = optionsState; - const { shouldDisplayInProgressType, saveIntermediatesInterval } = - systemState; + const { + shouldDisplayInProgressType, + saveIntermediatesInterval, + enableImageDebugging, + } = systemState; const generationParameters: { [k: string]: any } = { prompt, @@ -80,6 +83,8 @@ export const frontendToBackendParameters = ( progress_images: shouldDisplayInProgressType === 'full-res', progress_latents: shouldDisplayInProgressType === 'latents', save_intermediates: saveIntermediatesInterval, + generation_mode: generationMode, + init_mask: '', }; generationParameters.seed = shouldRandomizeSeed @@ -101,35 +106,36 @@ export const frontendToBackendParameters = ( } // inpainting exclusive parameters - if (generationMode === 'inpainting' && maskImageElement) { + if ( + ['inpainting', 'outpainting'].includes(generationMode) && + canvasImageLayerRef.current + ) { const { - lines, - boundingBoxCoordinate, + objects, + boundingBoxCoordinates, boundingBoxDimensions, inpaintReplace, shouldUseInpaintReplace, - } = inpaintingState; + stageScale, + isMaskEnabled, + } = canvasState[canvasState.currentCanvas]; const boundingBox = { - ...boundingBoxCoordinate, + ...boundingBoxCoordinates, ...boundingBoxDimensions, }; - generationParameters.init_img = imageToProcessUrl; - generationParameters.strength = img2imgStrength; - generationParameters.fit = false; - - const { maskDataURL, isMaskEmpty } = generateMask( - maskImageElement, - lines, + const maskDataURL = generateMask( + isMaskEnabled ? objects.filter(isCanvasMaskLine) : [], boundingBox ); - generationParameters.is_mask_empty = isMaskEmpty; + generationParameters.init_mask = maskDataURL; - generationParameters.init_mask = maskDataURL.split( - 'data:image/png;base64,' - )[1]; + generationParameters.fit = false; + + generationParameters.init_img = imageToProcessUrl; + generationParameters.strength = img2imgStrength; if (shouldUseInpaintReplace) { generationParameters.inpaint_replace = inpaintReplace; @@ -137,8 +143,44 @@ export const frontendToBackendParameters = ( generationParameters.bounding_box = boundingBox; - // TODO: The server metadata generation needs to be changed to fix this. - generationParameters.progress_images = false; + if (generationMode === 'outpainting') { + const tempScale = canvasImageLayerRef.current.scale(); + + canvasImageLayerRef.current.scale({ + x: 1 / stageScale, + y: 1 / stageScale, + }); + + const absPos = canvasImageLayerRef.current.getAbsolutePosition(); + + const imageDataURL = canvasImageLayerRef.current.toDataURL({ + x: boundingBox.x + absPos.x, + y: boundingBox.y + absPos.y, + width: boundingBox.width, + height: boundingBox.height, + }); + + if (enableImageDebugging) { + openBase64ImageInTab([ + { base64: maskDataURL, caption: 'mask sent as init_mask' }, + { base64: imageDataURL, caption: 'image sent as init_img' }, + ]); + } + + canvasImageLayerRef.current.scale(tempScale); + + generationParameters.init_img = imageDataURL; + + // TODO: The server metadata generation needs to be changed to fix this. + generationParameters.progress_images = false; + + generationParameters.seam_size = 96; + generationParameters.seam_blur = 16; + generationParameters.seam_strength = 0.7; + generationParameters.seam_steps = 10; + generationParameters.tile_size = 32; + generationParameters.force_outpaint = false; + } } if (shouldGenerateVariations) { @@ -171,6 +213,10 @@ export const frontendToBackendParameters = ( } } + if (enableImageDebugging) { + generationParameters.enable_image_debugging = enableImageDebugging; + } + return { generationParameters, esrganParameters, diff --git a/frontend/src/common/util/promptToString.ts b/frontend/src/common/util/promptToString.ts index d84a24acf8..ef1e7796e6 100644 --- a/frontend/src/common/util/promptToString.ts +++ b/frontend/src/common/util/promptToString.ts @@ -1,4 +1,4 @@ -import * as InvokeAI from '../../app/invokeai'; +import * as InvokeAI from 'app/invokeai'; const promptToString = (prompt: InvokeAI.Prompt): string => { if (prompt.length === 1) { diff --git a/frontend/src/common/util/seedWeightPairs.ts b/frontend/src/common/util/seedWeightPairs.ts index 9c024e1e1a..ec64b2742d 100644 --- a/frontend/src/common/util/seedWeightPairs.ts +++ b/frontend/src/common/util/seedWeightPairs.ts @@ -1,4 +1,4 @@ -import * as InvokeAI from '../../app/invokeai'; +import * as InvokeAI from 'app/invokeai'; export const stringToSeedWeights = ( string: string diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx new file mode 100644 index 0000000000..23ebd40925 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -0,0 +1,275 @@ +// lib +import { MutableRefObject, useEffect, useRef, useState } from 'react'; +import Konva from 'konva'; +import { Layer, Stage } from 'react-konva'; +import { Image as KonvaImage } from 'react-konva'; +import { Stage as StageType } from 'konva/lib/Stage'; + +// app +import { useAppDispatch, useAppSelector } from 'app/store'; +import { + baseCanvasImageSelector, + clearImageToInpaint, + currentCanvasSelector, + outpaintingCanvasSelector, +} from 'features/canvas/canvasSlice'; + +// component +import IAICanvasMaskLines from './IAICanvasMaskLines'; +import IAICanvasBrushPreview from './IAICanvasBrushPreview'; +import { Vector2d } from 'konva/lib/types'; +import IAICanvasBoundingBoxPreview from './IAICanvasBoundingBoxPreview'; +import { useToast } from '@chakra-ui/react'; +import useCanvasHotkeys from './hooks/useCanvasHotkeys'; +import _ from 'lodash'; +import { createSelector } from '@reduxjs/toolkit'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import IAICanvasMaskCompositer from './IAICanvasMaskCompositer'; +import useCanvasWheel from './hooks/useCanvasZoom'; +import useCanvasMouseDown from './hooks/useCanvasMouseDown'; +import useCanvasMouseUp from './hooks/useCanvasMouseUp'; +import useCanvasMouseMove from './hooks/useCanvasMouseMove'; +import useCanvasMouseEnter from './hooks/useCanvasMouseEnter'; +import useCanvasMouseOut from './hooks/useCanvasMouseOut'; +import useCanvasDragMove from './hooks/useCanvasDragMove'; +import IAICanvasOutpaintingObjects from './IAICanvasOutpaintingObjects'; +import IAICanvasGrid from './IAICanvasGrid'; +import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; +import IAICanvasStatusText from './IAICanvasStatusText'; + +const canvasSelector = createSelector( + [ + currentCanvasSelector, + outpaintingCanvasSelector, + baseCanvasImageSelector, + activeTabNameSelector, + ], + (currentCanvas, outpaintingCanvas, baseCanvasImage, activeTabName) => { + const { + shouldInvertMask, + isMaskEnabled, + shouldShowCheckboardTransparency, + stageScale, + shouldShowBoundingBox, + shouldLockBoundingBox, + isTransformingBoundingBox, + isMouseOverBoundingBox, + isMovingBoundingBox, + stageDimensions, + stageCoordinates, + isMoveStageKeyHeld, + tool, + isMovingStage, + } = currentCanvas; + + const { shouldShowGrid } = outpaintingCanvas; + + let stageCursor: string | undefined = ''; + + if (tool === 'move') { + if (isTransformingBoundingBox) { + stageCursor = undefined; + } else if (isMouseOverBoundingBox) { + stageCursor = 'move'; + } else { + if (isMovingStage) { + stageCursor = 'grabbing'; + } else { + stageCursor = 'grab'; + } + } + } else { + stageCursor = 'none'; + } + + return { + shouldInvertMask, + isMaskEnabled, + shouldShowCheckboardTransparency, + stageScale, + shouldShowBoundingBox, + shouldLockBoundingBox, + shouldShowGrid, + isTransformingBoundingBox, + isModifyingBoundingBox: isTransformingBoundingBox || isMovingBoundingBox, + stageCursor, + isMouseOverBoundingBox, + stageDimensions, + stageCoordinates, + isMoveStageKeyHeld, + activeTabName, + baseCanvasImage, + tool, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +// Use a closure allow other components to use these things... not ideal... +export let stageRef: MutableRefObject; +export let canvasImageLayerRef: MutableRefObject; +export let inpaintingImageElementRef: MutableRefObject; + +const IAICanvas = () => { + const dispatch = useAppDispatch(); + + const { + shouldInvertMask, + isMaskEnabled, + shouldShowCheckboardTransparency, + stageScale, + shouldShowBoundingBox, + isModifyingBoundingBox, + stageCursor, + stageDimensions, + stageCoordinates, + shouldShowGrid, + activeTabName, + baseCanvasImage, + tool, + } = useAppSelector(canvasSelector); + + useCanvasHotkeys(); + + const toast = useToast(); + // set the closure'd refs + stageRef = useRef(null); + canvasImageLayerRef = useRef(null); + inpaintingImageElementRef = useRef(null); + + const lastCursorPositionRef = useRef({ x: 0, y: 0 }); + + // Use refs for values that do not affect rendering, other values in redux + const didMouseMoveRef = useRef(false); + + // Load the image into this + const [canvasBgImage, setCanvasBgImage] = useState( + null + ); + + const handleWheel = useCanvasWheel(stageRef); + const handleMouseDown = useCanvasMouseDown(stageRef); + const handleMouseUp = useCanvasMouseUp(stageRef, didMouseMoveRef); + const handleMouseMove = useCanvasMouseMove( + stageRef, + didMouseMoveRef, + lastCursorPositionRef + ); + const handleMouseEnter = useCanvasMouseEnter(stageRef); + const handleMouseOut = useCanvasMouseOut(); + const { handleDragStart, handleDragMove, handleDragEnd } = + useCanvasDragMove(); + + // Load the image and set the options panel width & height + useEffect(() => { + if (baseCanvasImage) { + const image = new Image(); + image.onload = () => { + inpaintingImageElementRef.current = image; + setCanvasBgImage(image); + }; + image.onerror = () => { + toast({ + title: 'Unable to Load Image', + description: `Image ${baseCanvasImage.url} failed to load`, + status: 'error', + isClosable: true, + }); + dispatch(clearImageToInpaint()); + }; + image.src = baseCanvasImage.url; + } else { + setCanvasBgImage(null); + } + }, [baseCanvasImage, dispatch, stageScale, toast]); + + return ( +
+
+ + + + + + + + + + + + + + + {canvasBgImage && ( + <> + + + + + )} + + + + + + + +
+
+ ); +}; + +export default IAICanvas; diff --git a/frontend/src/features/tabs/Inpainting/components/InpaintingBoundingBoxPreview.tsx b/frontend/src/features/canvas/IAICanvasBoundingBoxPreview.tsx similarity index 62% rename from frontend/src/features/tabs/Inpainting/components/InpaintingBoundingBoxPreview.tsx rename to frontend/src/features/canvas/IAICanvasBoundingBoxPreview.tsx index df0d09ed65..94ba2e72a2 100644 --- a/frontend/src/features/tabs/Inpainting/components/InpaintingBoundingBoxPreview.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBoxPreview.tsx @@ -7,58 +7,60 @@ import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; import { useCallback, useEffect, useRef } from 'react'; import { Group, Rect, Transformer } from 'react-konva'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { roundToMultiple } from 'common/util/roundDownToMultiple'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import { roundToMultiple } from '../../../../common/util/roundDownToMultiple'; -import { - InpaintingState, - setBoundingBoxCoordinate, + baseCanvasImageSelector, + currentCanvasSelector, + outpaintingCanvasSelector, + setBoundingBoxCoordinates, setBoundingBoxDimensions, setIsMouseOverBoundingBox, setIsMovingBoundingBox, setIsTransformingBoundingBox, -} from '../inpaintingSlice'; -import { rgbaColorToString } from '../util/colorToString'; -import { - DASH_WIDTH, - // MARCHING_ANTS_SPEED, -} from '../util/constants'; +} from 'features/canvas/canvasSlice'; +import { GroupConfig } from 'konva/lib/Group'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; const boundingBoxPreviewSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { + currentCanvasSelector, + outpaintingCanvasSelector, + baseCanvasImageSelector, + activeTabNameSelector, + (currentCanvas, outpaintingCanvas, baseCanvasImage, activeTabName) => { const { - boundingBoxCoordinate, + boundingBoxCoordinates, boundingBoxDimensions, - boundingBoxPreviewFill, - canvasDimensions, + stageDimensions, stageScale, - imageToInpaint, shouldLockBoundingBox, isDrawing, isTransformingBoundingBox, isMovingBoundingBox, isMouseOverBoundingBox, - isSpacebarHeld, - } = inpainting; + shouldDarkenOutsideBoundingBox, + tool, + stageCoordinates, + } = currentCanvas; + const { shouldSnapToGrid } = outpaintingCanvas; + return { - boundingBoxCoordinate, + boundingBoxCoordinates, boundingBoxDimensions, - boundingBoxPreviewFillString: rgbaColorToString(boundingBoxPreviewFill), - canvasDimensions, - stageScale, - imageToInpaint, - dash: DASH_WIDTH / stageScale, // scale dash lengths - strokeWidth: 1 / stageScale, // scale stroke thickness - shouldLockBoundingBox, isDrawing, - isTransformingBoundingBox, isMouseOverBoundingBox, + shouldDarkenOutsideBoundingBox, isMovingBoundingBox, - isSpacebarHeld, + isTransformingBoundingBox, + shouldLockBoundingBox, + stageDimensions, + stageScale, + baseCanvasImage, + activeTabName, + shouldSnapToGrid, + tool, + stageCoordinates, + boundingBoxStrokeWidth: (isMouseOverBoundingBox ? 8 : 1) / stageScale, }; }, { @@ -68,52 +70,31 @@ const boundingBoxPreviewSelector = createSelector( } ); -/** - * Shades the area around the mask. - */ -export const InpaintingBoundingBoxPreviewOverlay = () => { - const { - boundingBoxCoordinate, - boundingBoxDimensions, - boundingBoxPreviewFillString, - canvasDimensions, - } = useAppSelector(boundingBoxPreviewSelector); +type IAICanvasBoundingBoxPreviewProps = GroupConfig; - return ( - - - - - ); -}; +const IAICanvasBoundingBoxPreview = ( + props: IAICanvasBoundingBoxPreviewProps +) => { + const { ...rest } = props; -const InpaintingBoundingBoxPreview = () => { const dispatch = useAppDispatch(); const { - boundingBoxCoordinate, + boundingBoxCoordinates, boundingBoxDimensions, - stageScale, - imageToInpaint, - shouldLockBoundingBox, isDrawing, - isTransformingBoundingBox, - isMovingBoundingBox, isMouseOverBoundingBox, - isSpacebarHeld, + shouldDarkenOutsideBoundingBox, + isMovingBoundingBox, + isTransformingBoundingBox, + shouldLockBoundingBox, + stageCoordinates, + stageDimensions, + stageScale, + baseCanvasImage, + activeTabName, + shouldSnapToGrid, + tool, + boundingBoxStrokeWidth, } = useAppSelector(boundingBoxPreviewSelector); const transformerRef = useRef(null); @@ -129,31 +110,60 @@ const InpaintingBoundingBoxPreview = () => { const handleOnDragMove = useCallback( (e: KonvaEventObject) => { + if (activeTabName === 'inpainting' || !shouldSnapToGrid) { + dispatch( + setBoundingBoxCoordinates({ + x: e.target.x(), + y: e.target.y(), + }) + ); + return; + } + + const dragX = e.target.x(); + const dragY = e.target.y(); + + const newX = roundToMultiple(dragX, 64); + const newY = roundToMultiple(dragY, 64); + + e.target.x(newX); + e.target.y(newY); + dispatch( - setBoundingBoxCoordinate({ - x: Math.floor(e.target.x()), - y: Math.floor(e.target.y()), + setBoundingBoxCoordinates({ + x: newX, + y: newY, }) ); }, - [dispatch] + [activeTabName, dispatch, shouldSnapToGrid] ); const dragBoundFunc = useCallback( (position: Vector2d) => { - if (!imageToInpaint) return boundingBoxCoordinate; + if (!baseCanvasImage) return boundingBoxCoordinates; const { x, y } = position; - const maxX = imageToInpaint.width - boundingBoxDimensions.width; - const maxY = imageToInpaint.height - boundingBoxDimensions.height; + const maxX = + stageDimensions.width - boundingBoxDimensions.width * stageScale; + const maxY = + stageDimensions.height - boundingBoxDimensions.height * stageScale; - const clampedX = Math.floor(_.clamp(x, 0, maxX * stageScale)); - const clampedY = Math.floor(_.clamp(y, 0, maxY * stageScale)); + const clampedX = Math.floor(_.clamp(x, 0, maxX)); + const clampedY = Math.floor(_.clamp(y, 0, maxY)); return { x: clampedX, y: clampedY }; }, - [boundingBoxCoordinate, boundingBoxDimensions, imageToInpaint, stageScale] + [ + baseCanvasImage, + boundingBoxCoordinates, + stageDimensions.width, + stageDimensions.height, + boundingBoxDimensions.width, + boundingBoxDimensions.height, + stageScale, + ] ); const handleOnTransform = useCallback(() => { @@ -184,7 +194,7 @@ const InpaintingBoundingBoxPreview = () => { ); dispatch( - setBoundingBoxCoordinate({ + setBoundingBoxCoordinates({ x, y, }) @@ -195,6 +205,7 @@ const InpaintingBoundingBoxPreview = () => { rect.scaleY(1); }, [dispatch]); + // OK const anchorDragBoundFunc = useCallback( ( oldPos: Vector2d, // old absolute position of anchor point @@ -253,6 +264,7 @@ const InpaintingBoundingBoxPreview = () => { [scaledStep] ); + // OK const boundBoxFunc = useCallback( (oldBoundBox: Box, newBoundBox: Box) => { /** @@ -260,12 +272,10 @@ const InpaintingBoundingBoxPreview = () => { * Unlike anchorDragBoundFunc, it does get a width and height, so * the logic to constrain the size of the bounding box is very simple. */ - if (!imageToInpaint) return oldBoundBox; - + if (!baseCanvasImage) return oldBoundBox; if ( - newBoundBox.width + newBoundBox.x > imageToInpaint.width * stageScale || - newBoundBox.height + newBoundBox.y > - imageToInpaint.height * stageScale || + newBoundBox.width + newBoundBox.x > stageDimensions.width || + newBoundBox.height + newBoundBox.y > stageDimensions.height || newBoundBox.x < 0 || newBoundBox.y < 0 ) { @@ -274,101 +284,107 @@ const InpaintingBoundingBoxPreview = () => { return newBoundBox; }, - [imageToInpaint, stageScale] + [baseCanvasImage, stageDimensions] ); - const handleStartedTransforming = (e: KonvaEventObject) => { - e.cancelBubble = true; - e.evt.stopImmediatePropagation(); - console.log("Started transform") + const handleStartedTransforming = () => { dispatch(setIsTransformingBoundingBox(true)); }; - const handleEndedTransforming = (e: KonvaEventObject) => { + const handleEndedTransforming = () => { dispatch(setIsTransformingBoundingBox(false)); dispatch(setIsMouseOverBoundingBox(false)); }; - const handleStartedMoving = (e: KonvaEventObject) => { - e.cancelBubble = true; - e.evt.stopImmediatePropagation(); + const handleStartedMoving = () => { dispatch(setIsMovingBoundingBox(true)); }; - const handleEndedModifying = (e: KonvaEventObject) => { + const handleEndedModifying = () => { dispatch(setIsTransformingBoundingBox(false)); dispatch(setIsMovingBoundingBox(false)); dispatch(setIsMouseOverBoundingBox(false)); }; - const spacebarHeldHitFunc = (context: Context, shape: Konva.Shape) => { - context.rect(0, 0, imageToInpaint?.width, imageToInpaint?.height); - context.fillShape(shape); + const handleMouseOver = () => { + dispatch(setIsMouseOverBoundingBox(true)); + }; + + const handleMouseOut = () => { + !isTransformingBoundingBox && + !isMovingBoundingBox && + dispatch(setIsMouseOverBoundingBox(false)); }; return ( - <> + + { - dispatch(setIsMouseOverBoundingBox(true)); - }} - onMouseOut={() => { - !isTransformingBoundingBox && - !isMovingBoundingBox && - dispatch(setIsMouseOverBoundingBox(false)); - }} - onMouseDown={handleStartedMoving} - onMouseUp={handleEndedModifying} + fill={'rgb(255,255,255)'} + listening={false} + visible={shouldDarkenOutsideBoundingBox} + globalCompositeOperation={'destination-out'} + /> + { - dispatch(setIsMouseOverBoundingBox(true)); - }} - onMouseOut={() => { - !isTransformingBoundingBox && - !isMovingBoundingBox && - dispatch(setIsMouseOverBoundingBox(false)); - }} + ref={transformerRef} + rotateEnabled={false} /> - + ); }; -export default InpaintingBoundingBoxPreview; +export default IAICanvasBoundingBoxPreview; diff --git a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx new file mode 100644 index 0000000000..c1b77a0edb --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx @@ -0,0 +1,95 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { + currentCanvasSelector, + outpaintingCanvasSelector, + setBrushColor, + setBrushSize, + setTool, +} from './canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import _ from 'lodash'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaPaintBrush } from 'react-icons/fa'; +import IAIPopover from 'common/components/IAIPopover'; +import IAIColorPicker from 'common/components/IAIColorPicker'; +import IAISlider from 'common/components/IAISlider'; +import { Flex } from '@chakra-ui/react'; +import IAINumberInput from 'common/components/IAINumberInput'; + +export const selector = createSelector( + [currentCanvasSelector, outpaintingCanvasSelector, activeTabNameSelector], + (currentCanvas, outpaintingCanvas, activeTabName) => { + const { + layer, + maskColor, + brushColor, + brushSize, + eraserSize, + tool, + shouldDarkenOutsideBoundingBox, + shouldShowIntermediates, + } = currentCanvas; + + const { shouldShowGrid, shouldSnapToGrid, shouldAutoSave } = + outpaintingCanvas; + + return { + layer, + tool, + maskColor, + brushColor, + brushSize, + eraserSize, + activeTabName, + shouldShowGrid, + shouldSnapToGrid, + shouldAutoSave, + shouldDarkenOutsideBoundingBox, + shouldShowIntermediates, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasBrushButtonPopover = () => { + const dispatch = useAppDispatch(); + const { tool, brushColor, brushSize } = useAppSelector(selector); + + return ( + } + data-selected={tool === 'brush'} + onClick={() => dispatch(setTool('brush'))} + /> + } + > + + + dispatch(setBrushSize(newSize))} + /> + + dispatch(setBrushColor(newColor))} + /> + + + ); +}; + +export default IAICanvasBrushButtonPopover; diff --git a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx b/frontend/src/features/canvas/IAICanvasBrushPreview.tsx new file mode 100644 index 0000000000..f2656f30c1 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasBrushPreview.tsx @@ -0,0 +1,121 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { GroupConfig } from 'konva/lib/Group'; +import _ from 'lodash'; +import { Circle, Group } from 'react-konva'; +import { useAppSelector } from 'app/store'; +import { currentCanvasSelector } from 'features/canvas/canvasSlice'; +import { rgbaColorToString } from './util/colorToString'; + +const canvasBrushPreviewSelector = createSelector( + currentCanvasSelector, + (currentCanvas) => { + const { + cursorPosition, + stageDimensions: { width, height }, + brushSize, + eraserSize, + maskColor, + brushColor, + tool, + layer, + shouldShowBrush, + isMovingBoundingBox, + isTransformingBoundingBox, + stageScale, + } = currentCanvas; + + return { + cursorPosition, + width, + height, + radius: tool === 'brush' ? brushSize / 2 : eraserSize / 2, + brushColorString: rgbaColorToString( + layer === 'mask' ? maskColor : brushColor + ), + tool, + shouldShowBrush, + shouldDrawBrushPreview: + !( + isMovingBoundingBox || + isTransformingBoundingBox || + !cursorPosition + ) && shouldShowBrush, + strokeWidth: 1.5 / stageScale, + dotRadius: 1.5 / stageScale, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +/** + * Draws a black circle around the canvas brush preview. + */ +const IAICanvasBrushPreview = (props: GroupConfig) => { + const { ...rest } = props; + const { + cursorPosition, + width, + height, + radius, + brushColorString, + tool, + shouldDrawBrushPreview, + dotRadius, + strokeWidth, + } = useAppSelector(canvasBrushPreviewSelector); + + if (!shouldDrawBrushPreview) return null; + + return ( + + + + + + + + ); +}; + +export default IAICanvasBrushPreview; diff --git a/frontend/src/features/canvas/IAICanvasControls.tsx b/frontend/src/features/canvas/IAICanvasControls.tsx new file mode 100644 index 0000000000..07e0c8d17c --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls.tsx @@ -0,0 +1,100 @@ +import IAICanvasBrushControl from './IAICanvasControls/IAICanvasBrushControl'; +import IAICanvasEraserControl from './IAICanvasControls/IAICanvasEraserControl'; +import IAICanvasUndoControl from './IAICanvasControls/IAICanvasUndoButton'; +import IAICanvasRedoControl from './IAICanvasControls/IAICanvasRedoButton'; +import { Button, ButtonGroup } from '@chakra-ui/react'; +import IAICanvasMaskClear from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear'; +import IAICanvasMaskVisibilityControl from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl'; +import IAICanvasMaskInvertControl from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl'; +import IAICanvasLockBoundingBoxControl from './IAICanvasControls/IAICanvasLockBoundingBoxControl'; +import IAICanvasShowHideBoundingBoxControl from './IAICanvasControls/IAICanvasShowHideBoundingBoxControl'; +import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; +import { createSelector } from '@reduxjs/toolkit'; +import { + currentCanvasSelector, + GenericCanvasState, + outpaintingCanvasSelector, + OutpaintingCanvasState, + uploadOutpaintingMergedImage, +} from './canvasSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { OptionsState } from 'features/options/optionsSlice'; +import _ from 'lodash'; +import IAICanvasImageEraserControl from './IAICanvasControls/IAICanvasImageEraserControl'; +import { canvasImageLayerRef } from './IAICanvas'; +import { uploadImage } from 'app/socketio/actions'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaSave } from 'react-icons/fa'; + +export const canvasControlsSelector = createSelector( + [ + outpaintingCanvasSelector, + (state: RootState) => state.options, + activeTabNameSelector, + ], + ( + outpaintingCanvas: OutpaintingCanvasState, + options: OptionsState, + activeTabName + ) => { + const { stageScale, boundingBoxCoordinates, boundingBoxDimensions } = + outpaintingCanvas; + return { + activeTabName, + stageScale, + boundingBoxCoordinates, + boundingBoxDimensions, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasControls = () => { + const dispatch = useAppDispatch(); + const { + activeTabName, + boundingBoxCoordinates, + boundingBoxDimensions, + stageScale, + } = useAppSelector(canvasControlsSelector); + + return ( +
+ + + + {activeTabName === 'outpainting' && } + + + + + + + + + } + onClick={() => { + dispatch(uploadOutpaintingMergedImage(canvasImageLayerRef)); + }} + fontSize={20} + /> + + + + + + + +
+ ); +}; + +export default IAICanvasControls; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingBrushControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx similarity index 60% rename from frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingBrushControl.tsx rename to frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx index 995c6a3b1f..3d3f9ee9f1 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingBrushControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx @@ -1,37 +1,31 @@ import { createSelector } from '@reduxjs/toolkit'; -import React from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { FaPaintBrush } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import IAIPopover from '../../../../common/components/IAIPopover'; -import IAISlider from '../../../../common/components/IAISlider'; -import { activeTabNameSelector } from '../../../options/optionsSelectors'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import IAINumberInput from 'common/components/IAINumberInput'; +import IAIPopover from 'common/components/IAIPopover'; +import IAISlider from 'common/components/IAISlider'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { - InpaintingState, + currentCanvasSelector, setBrushSize, setShouldShowBrushPreview, setTool, -} from '../inpaintingSlice'; +} from 'features/canvas/canvasSlice'; import _ from 'lodash'; -import InpaintingMaskColorPicker from './InpaintingMaskControls/InpaintingMaskColorPicker'; +import IAICanvasMaskColorPicker from './IAICanvasMaskControls/IAICanvasMaskColorPicker'; const inpaintingBrushSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { tool, brushSize, shouldShowMask } = inpainting; + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas, activeTabName) => { + const { tool, brushSize } = currentCanvas; return { tool, brushSize, - shouldShowMask, activeTabName, }; }, @@ -42,9 +36,9 @@ const inpaintingBrushSelector = createSelector( } ); -export default function InpaintingBrushControl() { +export default function IAICanvasBrushControl() { const dispatch = useAppDispatch(); - const { tool, brushSize, shouldShowMask, activeTabName } = useAppSelector( + const { tool, brushSize, activeTabName } = useAppSelector( inpaintingBrushSelector ); @@ -63,9 +57,6 @@ export default function InpaintingBrushControl() { dispatch(setBrushSize(v)); }; - // Hotkeys - - // Decrease brush size useHotkeys( '[', (e: KeyboardEvent) => { @@ -77,9 +68,9 @@ export default function InpaintingBrushControl() { } }, { - enabled: activeTabName === 'inpainting' && shouldShowMask, + enabled: true, }, - [activeTabName, shouldShowMask, brushSize] + [activeTabName, brushSize] ); // Increase brush size @@ -90,9 +81,9 @@ export default function InpaintingBrushControl() { handleChangeBrushSize(brushSize + 5); }, { - enabled: activeTabName === 'inpainting' && shouldShowMask, + enabled: true, }, - [activeTabName, shouldShowMask, brushSize] + [activeTabName, brushSize] ); // Set tool to brush @@ -103,9 +94,9 @@ export default function InpaintingBrushControl() { handleSelectBrushTool(); }, { - enabled: activeTabName === 'inpainting' && shouldShowMask, + enabled: true, }, - [activeTabName, shouldShowMask] + [activeTabName] ); return ( @@ -120,7 +111,6 @@ export default function InpaintingBrushControl() { icon={} onClick={handleSelectBrushTool} data-selected={tool === 'brush'} - isDisabled={!shouldShowMask} /> } > @@ -131,9 +121,6 @@ export default function InpaintingBrushControl() { onChange={handleChangeBrushSize} min={1} max={200} - width="100px" - focusThumbOnChange={false} - isDisabled={!shouldShowMask} /> - +
); diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingClearImageControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx similarity index 55% rename from frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingClearImageControl.tsx rename to frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx index 224a87a6dc..af04cc35f7 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingClearImageControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx @@ -1,10 +1,9 @@ -import React from 'react'; import { FaTrash } from 'react-icons/fa'; -import { useAppDispatch } from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { clearImageToInpaint } from '../inpaintingSlice'; +import { useAppDispatch } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { clearImageToInpaint } from 'features/canvas/canvasSlice'; -export default function InpaintingClearImageControl() { +export default function IAICanvasClearImageControl() { const dispatch = useAppDispatch(); const handleClearImage = () => { diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx new file mode 100644 index 0000000000..815709c1b4 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx @@ -0,0 +1,61 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { FaEraser } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { currentCanvasSelector, setTool } from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; + +const eraserSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas, activeTabName) => { + const { tool, isMaskEnabled } = currentCanvas; + + return { + tool, + isMaskEnabled, + activeTabName, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasEraserControl() { + const { tool, isMaskEnabled, activeTabName } = useAppSelector(eraserSelector); + const dispatch = useAppDispatch(); + + const handleSelectEraserTool = () => dispatch(setTool('eraser')); + + // Hotkeys + // Set tool to maskEraser + useHotkeys( + 'e', + (e: KeyboardEvent) => { + e.preventDefault(); + handleSelectEraserTool(); + }, + { + enabled: true, + }, + [activeTabName] + ); + + return ( + } + onClick={handleSelectEraserTool} + data-selected={tool === 'eraser'} + isDisabled={!isMaskEnabled} + /> + ); +} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx new file mode 100644 index 0000000000..b0047c6b8a --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx @@ -0,0 +1,60 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { currentCanvasSelector, setTool } from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { BsEraser } from 'react-icons/bs'; + +const imageEraserSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas, activeTabName) => { + const { tool, isMaskEnabled } = currentCanvas; + + return { + tool, + isMaskEnabled, + activeTabName, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasImageEraserControl() { + const { tool, isMaskEnabled, activeTabName } = + useAppSelector(imageEraserSelector); + const dispatch = useAppDispatch(); + + const handleSelectEraserTool = () => dispatch(setTool('eraser')); + + // Hotkeys + useHotkeys( + 'shift+e', + (e: KeyboardEvent) => { + e.preventDefault(); + handleSelectEraserTool(); + }, + { + enabled: true, + }, + [activeTabName, isMaskEnabled] + ); + + return ( + } + fontSize={18} + onClick={handleSelectEraserTool} + data-selected={tool === 'eraser'} + isDisabled={!isMaskEnabled} + /> + ); +} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx new file mode 100644 index 0000000000..5779a4a627 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx @@ -0,0 +1,47 @@ +import { FaLock, FaUnlock } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { + currentCanvasSelector, + GenericCanvasState, + setShouldLockBoundingBox, +} from 'features/canvas/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; +import _ from 'lodash'; + +const canvasLockBoundingBoxSelector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => { + const { shouldLockBoundingBox } = currentCanvas; + + return { + shouldLockBoundingBox, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasLockBoundingBoxControl = () => { + const dispatch = useAppDispatch(); + const { shouldLockBoundingBox } = useAppSelector( + canvasLockBoundingBoxSelector + ); + + return ( + : } + data-selected={shouldLockBoundingBox} + onClick={() => { + dispatch(setShouldLockBoundingBox(!shouldLockBoundingBox)); + }} + /> + ); +}; + +export default IAICanvasLockBoundingBoxControl; diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx new file mode 100644 index 0000000000..9d863f9775 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx @@ -0,0 +1,38 @@ +import { useState } from 'react'; +import { FaMask } from 'react-icons/fa'; + +import IAIPopover from 'common/components/IAIPopover'; +import IAIIconButton from 'common/components/IAIIconButton'; + +import IAICanvasMaskInvertControl from './IAICanvasMaskControls/IAICanvasMaskInvertControl'; +import IAICanvasMaskVisibilityControl from './IAICanvasMaskControls/IAICanvasMaskVisibilityControl'; +import IAICanvasMaskColorPicker from './IAICanvasMaskControls/IAICanvasMaskColorPicker'; + +export default function IAICanvasMaskControl() { + const [maskOptionsOpen, setMaskOptionsOpen] = useState(false); + + return ( + <> + setMaskOptionsOpen(true)} + onClose={() => setMaskOptionsOpen(false)} + triggerComponent={ + } + cursor={'pointer'} + data-selected={maskOptionsOpen} + /> + } + > +
+ + + +
+
+ + ); +} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx new file mode 100644 index 0000000000..15e5ab07b2 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx @@ -0,0 +1,75 @@ +import { RgbaColor } from 'react-colorful'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIColorPicker from 'common/components/IAIColorPicker'; +import { + currentCanvasSelector, + GenericCanvasState, + setMaskColor, +} from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; +import { createSelector } from '@reduxjs/toolkit'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { useHotkeys } from 'react-hotkeys-hook'; + +const selector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas: GenericCanvasState, activeTabName) => { + const { brushColor } = currentCanvas; + + return { + brushColor, + activeTabName, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasBrushColorPicker() { + const dispatch = useAppDispatch(); + const { brushColor, activeTabName } = useAppSelector(selector); + + const handleChangeBrushColor = (newColor: RgbaColor) => { + dispatch(setMaskColor(newColor)); + }; + + // Decrease brush opacity + useHotkeys( + 'shift+[', + (e: KeyboardEvent) => { + e.preventDefault(); + handleChangeBrushColor({ + ...brushColor, + a: Math.max(brushColor.a - 0.05, 0), + }); + }, + { + enabled: true, + }, + [activeTabName, brushColor.a] + ); + + // Increase brush opacity + useHotkeys( + 'shift+]', + (e: KeyboardEvent) => { + e.preventDefault(); + handleChangeBrushColor({ + ...brushColor, + a: Math.min(brushColor.a + 0.05, 1), + }); + }, + { + enabled: true, + }, + [activeTabName, brushColor.a] + ); + + return ( + + ); +} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx new file mode 100644 index 0000000000..6c0b7c0410 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx @@ -0,0 +1,77 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { FaPlus } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { + clearMask, + currentCanvasSelector, + InpaintingCanvasState, + isCanvasMaskLine, + OutpaintingCanvasState, +} from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { useToast } from '@chakra-ui/react'; + +const canvasMaskClearSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas, activeTabName) => { + const { isMaskEnabled, objects } = currentCanvas as + | InpaintingCanvasState + | OutpaintingCanvasState; + + return { + isMaskEnabled, + activeTabName, + isMaskEmpty: objects.filter(isCanvasMaskLine).length === 0, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasMaskClear() { + const { isMaskEnabled, activeTabName, isMaskEmpty } = useAppSelector( + canvasMaskClearSelector + ); + + const dispatch = useAppDispatch(); + const toast = useToast(); + + const handleClearMask = () => { + dispatch(clearMask()); + }; + + // Clear mask + useHotkeys( + 'shift+c', + (e: KeyboardEvent) => { + e.preventDefault(); + handleClearMask(); + toast({ + title: 'Mask Cleared', + status: 'success', + duration: 2500, + isClosable: true, + }); + }, + { + enabled: !isMaskEmpty, + }, + [activeTabName, isMaskEmpty, isMaskEnabled] + ); + return ( + } + onClick={handleClearMask} + isDisabled={isMaskEmpty || !isMaskEnabled} + /> + ); +} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskColorPicker.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx similarity index 51% rename from frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskColorPicker.tsx rename to frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx index e3f58b810d..29f63484e2 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskColorPicker.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx @@ -1,27 +1,31 @@ import React from 'react'; import { RgbaColor } from 'react-colorful'; import { FaPalette } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIColorPicker from 'common/components/IAIColorPicker'; +import IAIIconButton from 'common/components/IAIIconButton'; +import IAIPopover from 'common/components/IAIPopover'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAIColorPicker from '../../../../../common/components/IAIColorPicker'; -import IAIIconButton from '../../../../../common/components/IAIIconButton'; -import IAIPopover from '../../../../../common/components/IAIPopover'; -import { InpaintingState, setMaskColor } from '../../inpaintingSlice'; + currentCanvasSelector, + GenericCanvasState, + setMaskColor, +} from 'features/canvas/canvasSlice'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; -import { activeTabNameSelector } from '../../../../options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; -const inpaintingMaskColorPickerSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { shouldShowMask, maskColor } = inpainting; +const maskColorPickerSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas: GenericCanvasState, activeTabName) => { + const { isMaskEnabled, maskColor } = currentCanvas; - return { shouldShowMask, maskColor, activeTabName }; + return { + isMaskEnabled, + maskColor, + activeTabName, + }; }, { memoizeOptions: { @@ -30,9 +34,9 @@ const inpaintingMaskColorPickerSelector = createSelector( } ); -export default function InpaintingMaskColorPicker() { - const { shouldShowMask, maskColor, activeTabName } = useAppSelector( - inpaintingMaskColorPickerSelector +export default function IAICanvasMaskColorPicker() { + const { isMaskEnabled, maskColor, activeTabName } = useAppSelector( + maskColorPickerSelector ); const dispatch = useAppDispatch(); const handleChangeMaskColor = (newColor: RgbaColor) => { @@ -51,9 +55,9 @@ export default function InpaintingMaskColorPicker() { }); }, { - enabled: activeTabName === 'inpainting' && shouldShowMask, + enabled: true, }, - [activeTabName, shouldShowMask, maskColor.a] + [activeTabName, isMaskEnabled, maskColor.a] ); // Increase mask opacity @@ -63,13 +67,13 @@ export default function InpaintingMaskColorPicker() { e.preventDefault(); handleChangeMaskColor({ ...maskColor, - a: Math.min(maskColor.a + 0.05, 100), + a: Math.min(maskColor.a + 0.05, 1), }); }, { - enabled: activeTabName === 'inpainting' && shouldShowMask, + enabled: true, }, - [activeTabName, shouldShowMask, maskColor.a] + [activeTabName, isMaskEnabled, maskColor.a] ); return ( @@ -80,7 +84,7 @@ export default function InpaintingMaskColorPicker() { } - isDisabled={!shouldShowMask} + isDisabled={!isMaskEnabled} cursor={'pointer'} /> } diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskInvertControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx similarity index 50% rename from frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskInvertControl.tsx rename to frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx index 3842079c33..d9e79ef002 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskInvertControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx @@ -1,24 +1,27 @@ import { createSelector } from '@reduxjs/toolkit'; -import React from 'react'; import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAIIconButton from '../../../../../common/components/IAIIconButton'; -import { InpaintingState, setShouldInvertMask } from '../../inpaintingSlice'; + currentCanvasSelector, + GenericCanvasState, + setShouldInvertMask, +} from 'features/canvas/canvasSlice'; import _ from 'lodash'; -import { activeTabNameSelector } from '../../../../options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; -const inpaintingMaskInvertSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { shouldShowMask, shouldInvertMask } = inpainting; +const canvasMaskInvertSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas: GenericCanvasState, activeTabName) => { + const { isMaskEnabled, shouldInvertMask } = currentCanvas; - return { shouldInvertMask, shouldShowMask, activeTabName }; + return { + shouldInvertMask, + isMaskEnabled, + activeTabName, + }; }, { memoizeOptions: { @@ -27,9 +30,9 @@ const inpaintingMaskInvertSelector = createSelector( } ); -export default function InpaintingMaskInvertControl() { - const { shouldInvertMask, shouldShowMask, activeTabName } = useAppSelector( - inpaintingMaskInvertSelector +export default function IAICanvasMaskInvertControl() { + const { shouldInvertMask, isMaskEnabled, activeTabName } = useAppSelector( + canvasMaskInvertSelector ); const dispatch = useAppDispatch(); @@ -44,9 +47,9 @@ export default function InpaintingMaskInvertControl() { handleToggleShouldInvertMask(); }, { - enabled: activeTabName === 'inpainting' && shouldShowMask, + enabled: true, }, - [activeTabName, shouldInvertMask, shouldShowMask] + [activeTabName, shouldInvertMask, isMaskEnabled] ); return ( @@ -62,7 +65,7 @@ export default function InpaintingMaskInvertControl() { ) } onClick={handleToggleShouldInvertMask} - isDisabled={!shouldShowMask} + isDisabled={!isMaskEnabled} /> ); } diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx new file mode 100644 index 0000000000..459785e5d4 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx @@ -0,0 +1,60 @@ +import { useHotkeys } from 'react-hotkeys-hook'; +import { BiHide, BiShow } from 'react-icons/bi'; +import { createSelector } from 'reselect'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { + currentCanvasSelector, + GenericCanvasState, + setIsMaskEnabled, +} from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; + +const canvasMaskVisibilitySelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas: GenericCanvasState, activeTabName) => { + const { isMaskEnabled } = currentCanvas; + + return { isMaskEnabled, activeTabName }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasMaskVisibilityControl() { + const dispatch = useAppDispatch(); + + const { isMaskEnabled, activeTabName } = useAppSelector( + canvasMaskVisibilitySelector + ); + + const handleToggleShouldShowMask = () => + dispatch(setIsMaskEnabled(!isMaskEnabled)); + // Hotkeys + // Show/hide mask + useHotkeys( + 'h', + (e: KeyboardEvent) => { + e.preventDefault(); + handleToggleShouldShowMask(); + }, + { + enabled: activeTabName === 'inpainting' || activeTabName == 'outpainting', + }, + [activeTabName, isMaskEnabled] + ); + return ( + : } + onClick={handleToggleShouldShowMask} + /> + ); +} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx new file mode 100644 index 0000000000..190ebebbb7 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx @@ -0,0 +1,57 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { FaRedo } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { currentCanvasSelector, redo } from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; + +const canvasRedoSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas, activeTabName) => { + const { futureObjects } = currentCanvas; + + return { + canRedo: futureObjects.length > 0, + activeTabName, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasRedoButton() { + const dispatch = useAppDispatch(); + const { canRedo, activeTabName } = useAppSelector(canvasRedoSelector); + + const handleRedo = () => { + dispatch(redo()); + }; + + useHotkeys( + ['meta+shift+z', 'control+shift+z', 'control+y', 'meta+y'], + (e: KeyboardEvent) => { + e.preventDefault(); + handleRedo(); + }, + { + enabled: canRedo, + }, + [activeTabName, canRedo] + ); + + return ( + } + onClick={handleRedo} + isDisabled={!canRedo} + /> + ); +} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx new file mode 100644 index 0000000000..ca8f70fc4a --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx @@ -0,0 +1,46 @@ +import { FaVectorSquare } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { + currentCanvasSelector, + GenericCanvasState, + setShouldShowBoundingBox, +} from 'features/canvas/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; +import _ from 'lodash'; + +const canvasShowHideBoundingBoxControlSelector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => { + const { shouldShowBoundingBox } = currentCanvas; + + return { + shouldShowBoundingBox, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); +const IAICanvasShowHideBoundingBoxControl = () => { + const dispatch = useAppDispatch(); + const { shouldShowBoundingBox } = useAppSelector( + canvasShowHideBoundingBoxControlSelector + ); + + return ( + } + data-alert={!shouldShowBoundingBox} + onClick={() => { + dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); + }} + /> + ); +}; + +export default IAICanvasShowHideBoundingBoxControl; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingSplitLayoutControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx similarity index 64% rename from frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingSplitLayoutControl.tsx rename to frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx index 3f2bcceed4..ce84c168bd 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingSplitLayoutControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx @@ -1,16 +1,11 @@ -import React from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { VscSplitHorizontal } from 'react-icons/vsc'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { setShowDualDisplay } from '../../../options/optionsSlice'; -import { setNeedsCache } from '../inpaintingSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { setShowDualDisplay } from 'features/options/optionsSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; -export default function InpaintingSplitLayoutControl() { +export default function IAICanvasSplitLayoutControl() { const dispatch = useAppDispatch(); const showDualDisplay = useAppSelector( (state: RootState) => state.options.showDualDisplay @@ -18,7 +13,7 @@ export default function InpaintingSplitLayoutControl() { const handleDualDisplay = () => { dispatch(setShowDualDisplay(!showDualDisplay)); - dispatch(setNeedsCache(true)); + dispatch(setDoesCanvasNeedScaling(true)); }; // Hotkeys diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx new file mode 100644 index 0000000000..54be780dd5 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx @@ -0,0 +1,58 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { FaUndo } from 'react-icons/fa'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { currentCanvasSelector, undo } from 'features/canvas/canvasSlice'; + +import _ from 'lodash'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; + +const canvasUndoSelector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { pastObjects } = canvas; + + return { + canUndo: pastObjects.length > 0, + activeTabName, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasUndoButton() { + const dispatch = useAppDispatch(); + + const { canUndo, activeTabName } = useAppSelector(canvasUndoSelector); + + const handleUndo = () => { + dispatch(undo()); + }; + + useHotkeys( + ['meta+z', 'control+z'], + (e: KeyboardEvent) => { + e.preventDefault(); + handleUndo(); + }, + { + enabled: canUndo, + }, + [activeTabName, canUndo] + ); + + return ( + } + onClick={handleUndo} + isDisabled={!canUndo} + /> + ); +} diff --git a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx new file mode 100644 index 0000000000..ae5ee21125 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx @@ -0,0 +1,71 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { currentCanvasSelector, setEraserSize, setTool } from './canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaEraser } from 'react-icons/fa'; +import IAIPopover from 'common/components/IAIPopover'; +import IAISlider from 'common/components/IAISlider'; +import { Flex } from '@chakra-ui/react'; +import { useHotkeys } from 'react-hotkeys-hook'; + +export const selector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { eraserSize, tool } = currentCanvas; + + return { + tool, + eraserSize, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); +const IAICanvasEraserButtonPopover = () => { + const dispatch = useAppDispatch(); + const { tool, eraserSize } = useAppSelector(selector); + + const handleSelectEraserTool = () => dispatch(setTool('eraser')); + + useHotkeys( + 'e', + (e: KeyboardEvent) => { + e.preventDefault(); + handleSelectEraserTool(); + }, + { + enabled: true, + }, + [tool] + ); + + return ( + } + data-selected={tool === 'eraser'} + onClick={() => dispatch(setTool('eraser'))} + /> + } + > + + dispatch(setEraserSize(newSize))} + /> + + + ); +}; + +export default IAICanvasEraserButtonPopover; diff --git a/frontend/src/features/canvas/IAICanvasEraserLines.tsx b/frontend/src/features/canvas/IAICanvasEraserLines.tsx new file mode 100644 index 0000000000..9513ac0fef --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasEraserLines.tsx @@ -0,0 +1,49 @@ +// import { GroupConfig } from 'konva/lib/Group'; +// import { Group, Line } from 'react-konva'; +// import { RootState, useAppSelector } from 'app/store'; +// import { createSelector } from '@reduxjs/toolkit'; +// import { OutpaintingCanvasState } from './canvasSlice'; + +// export const canvasEraserLinesSelector = createSelector( +// (state: RootState) => state.canvas.outpainting, +// (outpainting: OutpaintingCanvasState) => { +// const { eraserLines } = outpainting; +// return { +// eraserLines, +// }; +// } +// ); + +// type IAICanvasEraserLinesProps = GroupConfig; + +// /** +// * Draws the lines which comprise the mask. +// * +// * Uses globalCompositeOperation to handle the brush and eraser tools. +// */ +// const IAICanvasEraserLines = (props: IAICanvasEraserLinesProps) => { +// const { ...rest } = props; +// const { eraserLines } = useAppSelector(canvasEraserLinesSelector); + +// return ( +// +// {eraserLines.map((line, i) => ( +// 0 +// strokeWidth={line.strokeWidth * 2} +// tension={0} +// lineCap="round" +// lineJoin="round" +// shadowForStrokeEnabled={false} +// listening={false} +// globalCompositeOperation={'source-over'} +// /> +// ))} +// +// ); +// }; + +// export default IAICanvasEraserLines; +export default {} \ No newline at end of file diff --git a/frontend/src/features/canvas/IAICanvasGrid.tsx b/frontend/src/features/canvas/IAICanvasGrid.tsx new file mode 100644 index 0000000000..495f22ba5b --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasGrid.tsx @@ -0,0 +1,88 @@ +// Grid drawing adapted from https://longviewcoder.com/2021/12/08/konva-a-better-grid/ + +import { useColorMode } from '@chakra-ui/react'; +import _ from 'lodash'; +import { Group, Line as KonvaLine } from 'react-konva'; +import useUnscaleCanvasValue from './hooks/useUnscaleCanvasValue'; +import { stageRef } from './IAICanvas'; + +const IAICanvasGrid = () => { + const { colorMode } = useColorMode(); + const unscale = useUnscaleCanvasValue(); + + if (!stageRef.current) return null; + const gridLineColor = + colorMode === 'light' ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)'; + + const stage = stageRef.current; + const width = stage.width(); + const height = stage.height(); + const x = stage.x(); + const y = stage.y(); + + const stageRect = { + x1: 0, + y1: 0, + x2: width, + y2: height, + offset: { + x: unscale(x), + y: unscale(y), + }, + }; + + const gridOffset = { + x: Math.ceil(unscale(x) / 64) * 64, + y: Math.ceil(unscale(y) / 64) * 64, + }; + + const gridRect = { + x1: -gridOffset.x, + y1: -gridOffset.y, + x2: unscale(width) - gridOffset.x + 64, + y2: unscale(height) - gridOffset.y + 64, + }; + + const gridFullRect = { + x1: Math.min(stageRect.x1, gridRect.x1), + y1: Math.min(stageRect.y1, gridRect.y1), + x2: Math.max(stageRect.x2, gridRect.x2), + y2: Math.max(stageRect.y2, gridRect.y2), + }; + + const fullRect = gridFullRect; + + const // find the x & y size of the grid + xSize = fullRect.x2 - fullRect.x1, + ySize = fullRect.y2 - fullRect.y1, + // compute the number of steps required on each axis. + xSteps = Math.round(xSize / 64) + 1, + ySteps = Math.round(ySize / 64) + 1; + + return ( + + {_.range(0, xSteps).map((i) => ( + + ))} + {_.range(0, ySteps).map((i) => ( + + ))} + + ); +}; + +export default IAICanvasGrid; diff --git a/frontend/src/features/canvas/IAICanvasImage.tsx b/frontend/src/features/canvas/IAICanvasImage.tsx new file mode 100644 index 0000000000..8229f8552f --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasImage.tsx @@ -0,0 +1,15 @@ +import { Image } from 'react-konva'; +import useImage from 'use-image'; + +type IAICanvasImageProps = { + url: string; + x: number; + y: number; +}; +const IAICanvasImage = (props: IAICanvasImageProps) => { + const { url, x, y } = props; + const [image] = useImage(url); + return ; +}; + +export default IAICanvasImage; diff --git a/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx b/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx new file mode 100644 index 0000000000..5562b1e44f --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx @@ -0,0 +1,59 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { RootState, useAppSelector } from 'app/store'; +import { GalleryState } from 'features/gallery/gallerySlice'; +import { ImageConfig } from 'konva/lib/shapes/Image'; +import _ from 'lodash'; +import { useEffect, useState } from 'react'; +import { Image as KonvaImage } from 'react-konva'; + +const selector = createSelector( + [(state: RootState) => state.gallery], + (gallery: GalleryState) => { + return gallery.intermediateImage ? gallery.intermediateImage : null; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +type Props = Omit; + +const IAICanvasIntermediateImage = (props: Props) => { + const { ...rest } = props; + const intermediateImage = useAppSelector(selector); + + const [loadedImageElement, setLoadedImageElement] = + useState(null); + + useEffect(() => { + if (!intermediateImage) return; + const tempImage = new Image(); + + tempImage.onload = () => { + setLoadedImageElement(tempImage); + }; + tempImage.src = intermediateImage.url; + }, [intermediateImage]); + + if (!intermediateImage?.boundingBox) return null; + + const { + boundingBox: { x, y, width, height }, + } = intermediateImage; + + return loadedImageElement ? ( + + ) : null; +}; + +export default IAICanvasIntermediateImage; diff --git a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx new file mode 100644 index 0000000000..787e1548aa --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx @@ -0,0 +1,69 @@ +import { Button, Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { + clearMask, + currentCanvasSelector, + setIsMaskEnabled, + setLayer, + setMaskColor, +} from './canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaMask } from 'react-icons/fa'; +import IAIPopover from 'common/components/IAIPopover'; +import IAICheckbox from 'common/components/IAICheckbox'; +import IAIColorPicker from 'common/components/IAIColorPicker'; + +export const selector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { maskColor, layer, isMaskEnabled } = currentCanvas; + + return { + layer, + maskColor, + isMaskEnabled, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); +const IAICanvasMaskButtonPopover = () => { + const dispatch = useAppDispatch(); + const { layer, maskColor, isMaskEnabled } = useAppSelector(selector); + + return ( + dispatch(setLayer(layer === 'mask' ? 'base' : 'mask'))} + icon={} + /> + } + > + + + dispatch(setIsMaskEnabled(e.target.checked))} + /> + + dispatch(setMaskColor(newColor))} + /> + + + ); +}; + +export default IAICanvasMaskButtonPopover; diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx new file mode 100644 index 0000000000..c3e218eff4 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -0,0 +1,49 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppSelector } from 'app/store'; +import { RectConfig } from 'konva/lib/shapes/Rect'; +import { Rect } from 'react-konva'; +import { + currentCanvasSelector, + InpaintingCanvasState, + OutpaintingCanvasState, +} from './canvasSlice'; +import { rgbaColorToString } from './util/colorToString'; + +export const canvasMaskCompositerSelector = createSelector( + currentCanvasSelector, + (currentCanvas) => { + const { maskColor, stageCoordinates, stageDimensions, stageScale } = + currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; + + return { + stageCoordinates, + stageDimensions, + stageScale, + maskColorString: rgbaColorToString(maskColor), + }; + } +); + +type IAICanvasMaskCompositerProps = RectConfig; + +const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { + const { ...rest } = props; + + const { maskColorString, stageCoordinates, stageDimensions, stageScale } = + useAppSelector(canvasMaskCompositerSelector); + + return ( + + ); +}; + +export default IAICanvasMaskCompositer; diff --git a/frontend/src/features/canvas/IAICanvasMaskLines.tsx b/frontend/src/features/canvas/IAICanvasMaskLines.tsx new file mode 100644 index 0000000000..32c5d358da --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasMaskLines.tsx @@ -0,0 +1,64 @@ +import { GroupConfig } from 'konva/lib/Group'; +import { Group, Line } from 'react-konva'; +import { useAppSelector } from 'app/store'; +import { createSelector } from '@reduxjs/toolkit'; +import { + currentCanvasSelector, + GenericCanvasState, + InpaintingCanvasState, + isCanvasMaskLine, + OutpaintingCanvasState, +} from './canvasSlice'; +import _ from 'lodash'; + +export const canvasLinesSelector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => { + const { objects } = currentCanvas as + | InpaintingCanvasState + | OutpaintingCanvasState; + return { + objects, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +type InpaintingCanvasLinesProps = GroupConfig; + +/** + * Draws the lines which comprise the mask. + * + * Uses globalCompositeOperation to handle the brush and eraser tools. + */ +const IAICanvasLines = (props: InpaintingCanvasLinesProps) => { + const { ...rest } = props; + const { objects } = useAppSelector(canvasLinesSelector); + + return ( + + {objects.filter(isCanvasMaskLine).map((line, i) => ( + 0 + strokeWidth={line.strokeWidth * 2} + tension={0} + lineCap="round" + lineJoin="round" + shadowForStrokeEnabled={false} + listening={false} + globalCompositeOperation={ + line.tool === 'brush' ? 'source-over' : 'destination-out' + } + /> + ))} + + ); +}; + +export default IAICanvasLines; diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx new file mode 100644 index 0000000000..c3504238d4 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx @@ -0,0 +1,112 @@ +import { ButtonGroup } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { + currentCanvasSelector, + resetCanvas, + setTool, + uploadOutpaintingMergedImage, +} from './canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import { canvasImageLayerRef } from './IAICanvas'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { + FaArrowsAlt, + FaCopy, + FaDownload, + FaLayerGroup, + FaSave, + FaTrash, + FaUpload, +} from 'react-icons/fa'; +import IAICanvasUndoButton from './IAICanvasControls/IAICanvasUndoButton'; +import IAICanvasRedoButton from './IAICanvasControls/IAICanvasRedoButton'; +import IAICanvasSettingsButtonPopover from './IAICanvasSettingsButtonPopover'; +import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; +import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; +import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; + +export const canvasControlsSelector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { tool } = currentCanvas; + + return { + tool, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasOutpaintingControls = () => { + const dispatch = useAppDispatch(); + const { tool } = useAppSelector(canvasControlsSelector); + + return ( +
+ + + + + } + data-selected={tool === 'move'} + onClick={() => dispatch(setTool('move'))} + /> + + + } + onClick={() => { + dispatch(uploadOutpaintingMergedImage(canvasImageLayerRef)); + }} + /> + } + /> + } + /> + } + /> + + + + + + + + + + } + /> + } + onClick={() => dispatch(resetCanvas())} + /> + +
+ ); +}; + +export default IAICanvasOutpaintingControls; diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx new file mode 100644 index 0000000000..eba52769f3 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx @@ -0,0 +1,65 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { RootState, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import { Group, Line } from 'react-konva'; +import { + CanvasState, + isCanvasBaseImage, + isCanvasBaseLine, +} from './canvasSlice'; +import IAICanvasImage from './IAICanvasImage'; +import { rgbaColorToString } from './util/colorToString'; + +const selector = createSelector( + [(state: RootState) => state.canvas], + (canvas: CanvasState) => { + return { + objects: + canvas.currentCanvas === 'outpainting' + ? canvas.outpainting.objects + : undefined, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasOutpaintingObjects = () => { + const { objects } = useAppSelector(selector); + + if (!objects) return null; + + return ( + + {objects.map((obj, i) => { + if (isCanvasBaseImage(obj)) { + return ( + + ); + } else if (isCanvasBaseLine(obj)) { + return ( + 0 + strokeWidth={obj.strokeWidth * 2} + tension={0} + lineCap="round" + lineJoin="round" + shadowForStrokeEnabled={false} + listening={false} + globalCompositeOperation={ + obj.tool === 'brush' ? 'source-over' : 'destination-out' + } + /> + ); + } + })} + + ); +}; + +export default IAICanvasOutpaintingObjects; diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/IAICanvasResizer.tsx new file mode 100644 index 0000000000..5649b2b20c --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasResizer.tsx @@ -0,0 +1,78 @@ +import { Spinner } from '@chakra-ui/react'; +import { useLayoutEffect, useRef } from 'react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { + baseCanvasImageSelector, + CanvasState, + currentCanvasSelector, + GenericCanvasState, + setStageDimensions, + setStageScale, +} from 'features/canvas/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; +import * as InvokeAI from 'app/invokeai'; +import { first } from 'lodash'; + +const canvasResizerSelector = createSelector( + (state: RootState) => state.canvas, + baseCanvasImageSelector, + activeTabNameSelector, + (canvas: CanvasState, baseCanvasImage, activeTabName) => { + const { doesCanvasNeedScaling } = canvas; + + return { + doesCanvasNeedScaling, + activeTabName, + baseCanvasImage, + }; + } +); + +const IAICanvasResizer = () => { + const dispatch = useAppDispatch(); + const { doesCanvasNeedScaling, activeTabName, baseCanvasImage } = + useAppSelector(canvasResizerSelector); + + const ref = useRef(null); + + useLayoutEffect(() => { + window.setTimeout(() => { + if (!ref.current || !baseCanvasImage) return; + + const width = ref.current.clientWidth; + const height = ref.current.clientHeight; + + const scale = Math.min( + 1, + Math.min(width / baseCanvasImage.width, height / baseCanvasImage.height) + ); + + dispatch(setStageScale(scale)); + + if (activeTabName === 'inpainting') { + dispatch( + setStageDimensions({ + width: Math.floor(baseCanvasImage.width * scale), + height: Math.floor(baseCanvasImage.height * scale), + }) + ); + } else if (activeTabName === 'outpainting') { + dispatch( + setStageDimensions({ + width: Math.floor(width), + height: Math.floor(height), + }) + ); + } + }, 0); + }, [dispatch, baseCanvasImage, doesCanvasNeedScaling, activeTabName]); + + return ( +
+ +
+ ); +}; + +export default IAICanvasResizer; diff --git a/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx new file mode 100644 index 0000000000..3efbaf3fd3 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx @@ -0,0 +1,101 @@ +import { Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { + currentCanvasSelector, + outpaintingCanvasSelector, + setShouldAutoSave, + setShouldDarkenOutsideBoundingBox, + setShouldShowGrid, + setShouldShowIntermediates, + setShouldSnapToGrid, +} from './canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaWrench } from 'react-icons/fa'; +import IAIPopover from 'common/components/IAIPopover'; +import IAICheckbox from 'common/components/IAICheckbox'; + +export const canvasControlsSelector = createSelector( + [currentCanvasSelector, outpaintingCanvasSelector], + (currentCanvas, outpaintingCanvas) => { + const { shouldDarkenOutsideBoundingBox, shouldShowIntermediates } = + currentCanvas; + + const { shouldShowGrid, shouldSnapToGrid, shouldAutoSave } = + outpaintingCanvas; + + return { + shouldShowGrid, + shouldSnapToGrid, + shouldAutoSave, + shouldDarkenOutsideBoundingBox, + shouldShowIntermediates, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasSettingsButtonPopover = () => { + const dispatch = useAppDispatch(); + const { + shouldShowIntermediates, + shouldShowGrid, + shouldSnapToGrid, + shouldAutoSave, + shouldDarkenOutsideBoundingBox, + } = useAppSelector(canvasControlsSelector); + + return ( + } + /> + } + > + + + dispatch(setShouldShowIntermediates(e.target.checked)) + } + /> + dispatch(setShouldShowGrid(e.target.checked))} + /> + dispatch(setShouldSnapToGrid(e.target.checked))} + /> + + dispatch(setShouldDarkenOutsideBoundingBox(e.target.checked)) + } + /> + dispatch(setShouldAutoSave(e.target.checked))} + /> + + + ); +}; + +export default IAICanvasSettingsButtonPopover; diff --git a/frontend/src/features/canvas/IAICanvasStatusText.tsx b/frontend/src/features/canvas/IAICanvasStatusText.tsx new file mode 100644 index 0000000000..3b9694a7c5 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasStatusText.tsx @@ -0,0 +1,74 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppSelector } from 'app/store'; +import _ from 'lodash'; +import { currentCanvasSelector } from './canvasSlice'; + +const roundToHundreth = (val: number): number => { + return Math.round(val * 100) / 100; +}; + +const selector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { + stageDimensions: { width: stageWidth, height: stageHeight }, + stageCoordinates: { x: stageX, y: stageY }, + boundingBoxDimensions: { width: boxWidth, height: boxHeight }, + boundingBoxCoordinates: { x: boxX, y: boxY }, + cursorPosition, + stageScale, + } = currentCanvas; + + const position = cursorPosition + ? { cursorX: cursorPosition.x, cursorY: cursorPosition.y } + : { cursorX: -1, cursorY: -1 }; + + return { + stageWidth, + stageHeight, + stageX, + stageY, + boxWidth, + boxHeight, + boxX, + boxY, + stageScale, + ...position, + }; + }, + + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); +const IAICanvasStatusText = () => { + const { + stageWidth, + stageHeight, + stageX, + stageY, + boxWidth, + boxHeight, + boxX, + boxY, + cursorX, + cursorY, + stageScale, + } = useAppSelector(selector); + return ( +
+
{`Stage: ${stageWidth} x ${stageHeight}`}
+
{`Stage: ${roundToHundreth(stageX)}, ${roundToHundreth( + stageY + )}`}
+
{`Scale: ${roundToHundreth(stageScale)}`}
+
{`Box: ${boxWidth} x ${boxHeight}`}
+
{`Box: ${roundToHundreth(boxX)}, ${roundToHundreth(boxY)}`}
+
{`Cursor: ${cursorX}, ${cursorY}`}
+
+ ); +}; + +export default IAICanvasStatusText; diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts new file mode 100644 index 0000000000..f940c4c978 --- /dev/null +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -0,0 +1,764 @@ +import { + createAsyncThunk, + createSelector, + createSlice, +} from '@reduxjs/toolkit'; +import { v4 as uuidv4 } from 'uuid'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { IRect, Vector2d } from 'konva/lib/types'; +import { RgbaColor } from 'react-colorful'; +import * as InvokeAI from 'app/invokeai'; +import _ from 'lodash'; +import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; +import { RootState } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { MutableRefObject } from 'react'; +import Konva from 'konva'; + +export interface GenericCanvasState { + tool: CanvasTool; + brushSize: number; + brushColor: RgbaColor; + eraserSize: number; + maskColor: RgbaColor; + cursorPosition: Vector2d | null; + stageDimensions: Dimensions; + stageCoordinates: Vector2d; + boundingBoxDimensions: Dimensions; + boundingBoxCoordinates: Vector2d; + boundingBoxPreviewFill: RgbaColor; + shouldShowBoundingBox: boolean; + shouldDarkenOutsideBoundingBox: boolean; + isMaskEnabled: boolean; + shouldInvertMask: boolean; + shouldShowCheckboardTransparency: boolean; + shouldShowBrush: boolean; + shouldShowBrushPreview: boolean; + stageScale: number; + isDrawing: boolean; + isTransformingBoundingBox: boolean; + isMouseOverBoundingBox: boolean; + isMovingBoundingBox: boolean; + isMovingStage: boolean; + shouldUseInpaintReplace: boolean; + inpaintReplace: number; + shouldLockBoundingBox: boolean; + isMoveBoundingBoxKeyHeld: boolean; + isMoveStageKeyHeld: boolean; + intermediateImage?: InvokeAI.Image; + shouldShowIntermediates: boolean; +} + +export type CanvasLayer = 'base' | 'mask'; + +export type CanvasDrawingTool = 'brush' | 'eraser'; + +export type CanvasTool = CanvasDrawingTool | 'move'; + +export type Dimensions = { + width: number; + height: number; +}; + +export type CanvasAnyLine = { + kind: 'line'; + tool: CanvasDrawingTool; + strokeWidth: number; + points: number[]; +}; + +export type CanvasImage = { + kind: 'image'; + layer: 'base'; + x: number; + y: number; + image: InvokeAI.Image; +}; + +export type CanvasMaskLine = CanvasAnyLine & { + layer: 'mask'; +}; + +export type CanvasLine = CanvasAnyLine & { + layer: 'base'; + color?: RgbaColor; +}; + +type CanvasObject = CanvasImage | CanvasLine | CanvasMaskLine; + +// type guards +export const isCanvasMaskLine = (obj: CanvasObject): obj is CanvasMaskLine => + obj.kind === 'line' && obj.layer === 'mask'; + +export const isCanvasBaseLine = (obj: CanvasObject): obj is CanvasLine => + obj.kind === 'line' && obj.layer === 'base'; + +export const isCanvasBaseImage = (obj: CanvasObject): obj is CanvasImage => + obj.kind === 'image' && obj.layer === 'base'; + +export const isCanvasAnyLine = ( + obj: CanvasObject +): obj is CanvasMaskLine | CanvasLine => obj.kind === 'line'; + +export type OutpaintingCanvasState = GenericCanvasState & { + layer: CanvasLayer; + objects: CanvasObject[]; + pastObjects: CanvasObject[][]; + futureObjects: CanvasObject[][]; + shouldShowGrid: boolean; + shouldSnapToGrid: boolean; + shouldAutoSave: boolean; + stagingArea: { + images: CanvasImage[]; + selectedImageIndex: number; + }; +}; + +export type InpaintingCanvasState = GenericCanvasState & { + layer: 'mask'; + objects: CanvasObject[]; + pastObjects: CanvasObject[][]; + futureObjects: CanvasObject[][]; + imageToInpaint?: InvokeAI.Image; +}; + +export type BaseCanvasState = InpaintingCanvasState | OutpaintingCanvasState; + +export type ValidCanvasName = 'inpainting' | 'outpainting'; + +export interface CanvasState { + doesCanvasNeedScaling: boolean; + currentCanvas: ValidCanvasName; + inpainting: InpaintingCanvasState; + outpainting: OutpaintingCanvasState; +} + +const initialGenericCanvasState: GenericCanvasState = { + tool: 'brush', + brushColor: { r: 90, g: 90, b: 255, a: 1 }, + brushSize: 50, + maskColor: { r: 255, g: 90, b: 90, a: 0.5 }, + eraserSize: 50, + stageDimensions: { width: 0, height: 0 }, + stageCoordinates: { x: 0, y: 0 }, + boundingBoxDimensions: { width: 512, height: 512 }, + boundingBoxCoordinates: { x: 0, y: 0 }, + boundingBoxPreviewFill: { r: 0, g: 0, b: 0, a: 0.5 }, + shouldShowBoundingBox: true, + shouldDarkenOutsideBoundingBox: false, + cursorPosition: null, + isMaskEnabled: true, + shouldInvertMask: false, + shouldShowCheckboardTransparency: false, + shouldShowBrush: true, + shouldShowBrushPreview: false, + isDrawing: false, + isTransformingBoundingBox: false, + isMouseOverBoundingBox: false, + isMovingBoundingBox: false, + stageScale: 1, + shouldUseInpaintReplace: false, + inpaintReplace: 0.1, + shouldLockBoundingBox: false, + isMoveBoundingBoxKeyHeld: false, + isMoveStageKeyHeld: false, + shouldShowIntermediates: true, + isMovingStage: false, +}; + +const initialCanvasState: CanvasState = { + currentCanvas: 'inpainting', + doesCanvasNeedScaling: false, + inpainting: { + layer: 'mask', + objects: [], + pastObjects: [], + futureObjects: [], + ...initialGenericCanvasState, + }, + outpainting: { + layer: 'base', + objects: [], + pastObjects: [], + futureObjects: [], + stagingArea: { + images: [], + selectedImageIndex: 0, + }, + shouldShowGrid: true, + shouldSnapToGrid: true, + shouldAutoSave: false, + ...initialGenericCanvasState, + }, +}; + +export const canvasSlice = createSlice({ + name: 'canvas', + initialState: initialCanvasState, + reducers: { + setTool: (state, action: PayloadAction) => { + const tool = action.payload; + state[state.currentCanvas].tool = action.payload; + if (tool !== 'move') { + state[state.currentCanvas].isTransformingBoundingBox = false; + state[state.currentCanvas].isMouseOverBoundingBox = false; + state[state.currentCanvas].isMovingBoundingBox = false; + state[state.currentCanvas].isMovingStage = false; + } + }, + setLayer: (state, action: PayloadAction) => { + state[state.currentCanvas].layer = action.payload; + }, + toggleTool: (state) => { + const currentTool = state[state.currentCanvas].tool; + if (currentTool !== 'move') { + state[state.currentCanvas].tool = + currentTool === 'brush' ? 'eraser' : 'brush'; + } + }, + setMaskColor: (state, action: PayloadAction) => { + state[state.currentCanvas].maskColor = action.payload; + }, + setBrushColor: (state, action: PayloadAction) => { + state[state.currentCanvas].brushColor = action.payload; + }, + setBrushSize: (state, action: PayloadAction) => { + state[state.currentCanvas].brushSize = action.payload; + }, + setEraserSize: (state, action: PayloadAction) => { + state[state.currentCanvas].eraserSize = action.payload; + }, + clearMask: (state) => { + state[state.currentCanvas].pastObjects.push( + state[state.currentCanvas].objects + ); + state[state.currentCanvas].objects = state[ + state.currentCanvas + ].objects.filter((obj) => !isCanvasMaskLine(obj)); + state[state.currentCanvas].futureObjects = []; + state[state.currentCanvas].shouldInvertMask = false; + }, + toggleShouldInvertMask: (state) => { + state[state.currentCanvas].shouldInvertMask = + !state[state.currentCanvas].shouldInvertMask; + }, + toggleShouldShowMask: (state) => { + state[state.currentCanvas].isMaskEnabled = + !state[state.currentCanvas].isMaskEnabled; + }, + setShouldInvertMask: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldInvertMask = action.payload; + }, + setIsMaskEnabled: (state, action: PayloadAction) => { + state[state.currentCanvas].isMaskEnabled = action.payload; + state[state.currentCanvas].layer = action.payload ? 'mask' : 'base'; + }, + setShouldShowCheckboardTransparency: ( + state, + action: PayloadAction + ) => { + state[state.currentCanvas].shouldShowCheckboardTransparency = + action.payload; + }, + setShouldShowBrushPreview: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldShowBrushPreview = action.payload; + }, + setShouldShowBrush: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldShowBrush = action.payload; + }, + setCursorPosition: (state, action: PayloadAction) => { + state[state.currentCanvas].cursorPosition = action.payload; + }, + clearImageToInpaint: (state) => { + state.inpainting.imageToInpaint = undefined; + }, + + setImageToOutpaint: (state, action: PayloadAction) => { + const { width: canvasWidth, height: canvasHeight } = + state.outpainting.stageDimensions; + const { width, height } = state.outpainting.boundingBoxDimensions; + const { x, y } = state.outpainting.boundingBoxCoordinates; + + const maxWidth = Math.min(action.payload.width, canvasWidth); + const maxHeight = Math.min(action.payload.height, canvasHeight); + + const newCoordinates: Vector2d = { x, y }; + const newDimensions: Dimensions = { width, height }; + + if (width + x > maxWidth) { + // Bounding box at least needs to be translated + if (width > maxWidth) { + // Bounding box also needs to be resized + newDimensions.width = roundDownToMultiple(maxWidth, 64); + } + newCoordinates.x = maxWidth - newDimensions.width; + } + + if (height + y > maxHeight) { + // Bounding box at least needs to be translated + if (height > maxHeight) { + // Bounding box also needs to be resized + newDimensions.height = roundDownToMultiple(maxHeight, 64); + } + newCoordinates.y = maxHeight - newDimensions.height; + } + + state.outpainting.boundingBoxDimensions = newDimensions; + state.outpainting.boundingBoxCoordinates = newCoordinates; + + // state.outpainting.imageToInpaint = action.payload; + state.outpainting.objects = [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + image: action.payload, + }, + ]; + state.doesCanvasNeedScaling = true; + }, + setImageToInpaint: (state, action: PayloadAction) => { + const { width: canvasWidth, height: canvasHeight } = + state.inpainting.stageDimensions; + const { width, height } = state.inpainting.boundingBoxDimensions; + const { x, y } = state.inpainting.boundingBoxCoordinates; + + const maxWidth = Math.min(action.payload.width, canvasWidth); + const maxHeight = Math.min(action.payload.height, canvasHeight); + + const newCoordinates: Vector2d = { x, y }; + const newDimensions: Dimensions = { width, height }; + + if (width + x > maxWidth) { + // Bounding box at least needs to be translated + if (width > maxWidth) { + // Bounding box also needs to be resized + newDimensions.width = roundDownToMultiple(maxWidth, 64); + } + newCoordinates.x = maxWidth - newDimensions.width; + } + + if (height + y > maxHeight) { + // Bounding box at least needs to be translated + if (height > maxHeight) { + // Bounding box also needs to be resized + newDimensions.height = roundDownToMultiple(maxHeight, 64); + } + newCoordinates.y = maxHeight - newDimensions.height; + } + + state.inpainting.boundingBoxDimensions = newDimensions; + state.inpainting.boundingBoxCoordinates = newCoordinates; + + state.inpainting.imageToInpaint = action.payload; + state.doesCanvasNeedScaling = true; + }, + setStageDimensions: (state, action: PayloadAction) => { + state[state.currentCanvas].stageDimensions = action.payload; + + const { width: canvasWidth, height: canvasHeight } = action.payload; + + const { width: boundingBoxWidth, height: boundingBoxHeight } = + state[state.currentCanvas].boundingBoxDimensions; + + const newBoundingBoxWidth = roundDownToMultiple( + _.clamp( + boundingBoxWidth, + 64, + canvasWidth / state[state.currentCanvas].stageScale + ), + 64 + ); + const newBoundingBoxHeight = roundDownToMultiple( + _.clamp( + boundingBoxHeight, + 64, + canvasHeight / state[state.currentCanvas].stageScale + ), + 64 + ); + + state[state.currentCanvas].boundingBoxDimensions = { + width: newBoundingBoxWidth, + height: newBoundingBoxHeight, + }; + }, + setBoundingBoxDimensions: (state, action: PayloadAction) => { + state[state.currentCanvas].boundingBoxDimensions = action.payload; + const { width: boundingBoxWidth, height: boundingBoxHeight } = + action.payload; + const { x: boundingBoxX, y: boundingBoxY } = + state[state.currentCanvas].boundingBoxCoordinates; + const { width: canvasWidth, height: canvasHeight } = + state[state.currentCanvas].stageDimensions; + + const scaledCanvasWidth = + canvasWidth / state[state.currentCanvas].stageScale; + const scaledCanvasHeight = + canvasHeight / state[state.currentCanvas].stageScale; + + const roundedCanvasWidth = roundDownToMultiple(scaledCanvasWidth, 64); + const roundedCanvasHeight = roundDownToMultiple(scaledCanvasHeight, 64); + + const roundedBoundingBoxWidth = roundDownToMultiple(boundingBoxWidth, 64); + const roundedBoundingBoxHeight = roundDownToMultiple( + boundingBoxHeight, + 64 + ); + + const overflowX = boundingBoxX + boundingBoxWidth - scaledCanvasWidth; + const overflowY = boundingBoxY + boundingBoxHeight - scaledCanvasHeight; + + const newBoundingBoxWidth = _.clamp( + roundedBoundingBoxWidth, + 64, + roundedCanvasWidth + ); + + const newBoundingBoxHeight = _.clamp( + roundedBoundingBoxHeight, + 64, + roundedCanvasHeight + ); + + const overflowCorrectedX = + overflowX > 0 ? boundingBoxX - overflowX : boundingBoxX; + + const overflowCorrectedY = + overflowY > 0 ? boundingBoxY - overflowY : boundingBoxY; + + const clampedX = _.clamp( + overflowCorrectedX, + state[state.currentCanvas].stageCoordinates.x, + roundedCanvasWidth - newBoundingBoxWidth + ); + + const clampedY = _.clamp( + overflowCorrectedY, + state[state.currentCanvas].stageCoordinates.y, + roundedCanvasHeight - newBoundingBoxHeight + ); + + state[state.currentCanvas].boundingBoxDimensions = { + width: newBoundingBoxWidth, + height: newBoundingBoxHeight, + }; + + state[state.currentCanvas].boundingBoxCoordinates = { + x: clampedX, + y: clampedY, + }; + }, + setBoundingBoxCoordinates: (state, action: PayloadAction) => { + state[state.currentCanvas].boundingBoxCoordinates = action.payload; + }, + setStageCoordinates: (state, action: PayloadAction) => { + state[state.currentCanvas].stageCoordinates = action.payload; + }, + setBoundingBoxPreviewFill: (state, action: PayloadAction) => { + state[state.currentCanvas].boundingBoxPreviewFill = action.payload; + }, + setDoesCanvasNeedScaling: (state, action: PayloadAction) => { + state.doesCanvasNeedScaling = action.payload; + }, + setStageScale: (state, action: PayloadAction) => { + state[state.currentCanvas].stageScale = action.payload; + state.doesCanvasNeedScaling = false; + }, + setShouldDarkenOutsideBoundingBox: ( + state, + action: PayloadAction + ) => { + state[state.currentCanvas].shouldDarkenOutsideBoundingBox = + action.payload; + }, + setIsDrawing: (state, action: PayloadAction) => { + state[state.currentCanvas].isDrawing = action.payload; + }, + setClearBrushHistory: (state) => { + state[state.currentCanvas].pastObjects = []; + state[state.currentCanvas].futureObjects = []; + }, + setShouldUseInpaintReplace: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldUseInpaintReplace = action.payload; + }, + setInpaintReplace: (state, action: PayloadAction) => { + state[state.currentCanvas].inpaintReplace = action.payload; + }, + setShouldLockBoundingBox: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldLockBoundingBox = action.payload; + }, + toggleShouldLockBoundingBox: (state) => { + state[state.currentCanvas].shouldLockBoundingBox = + !state[state.currentCanvas].shouldLockBoundingBox; + }, + setShouldShowBoundingBox: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldShowBoundingBox = action.payload; + }, + setIsTransformingBoundingBox: (state, action: PayloadAction) => { + state[state.currentCanvas].isTransformingBoundingBox = action.payload; + }, + setIsMovingBoundingBox: (state, action: PayloadAction) => { + state[state.currentCanvas].isMovingBoundingBox = action.payload; + }, + setIsMouseOverBoundingBox: (state, action: PayloadAction) => { + state[state.currentCanvas].isMouseOverBoundingBox = action.payload; + }, + setIsMoveBoundingBoxKeyHeld: (state, action: PayloadAction) => { + state[state.currentCanvas].isMoveBoundingBoxKeyHeld = action.payload; + }, + setIsMoveStageKeyHeld: (state, action: PayloadAction) => { + state[state.currentCanvas].isMoveStageKeyHeld = action.payload; + }, + setCurrentCanvas: (state, action: PayloadAction) => { + state.currentCanvas = action.payload; + }, + addImageToOutpaintingSesion: ( + state, + action: PayloadAction<{ + boundingBox: IRect; + image: InvokeAI.Image; + }> + ) => { + const { boundingBox, image } = action.payload; + if (!boundingBox || !image) return; + + const { x, y } = boundingBox; + + state.outpainting.pastObjects.push([...state.outpainting.objects]); + state.outpainting.futureObjects = []; + + state.outpainting.objects.push({ + kind: 'image', + layer: 'base', + x, + y, + image, + }); + }, + addLine: (state, action: PayloadAction) => { + const { tool, layer, brushColor, brushSize, eraserSize } = + state[state.currentCanvas]; + + if (tool === 'move') return; + + state[state.currentCanvas].pastObjects.push( + state[state.currentCanvas].objects + ); + + state[state.currentCanvas].objects.push({ + kind: 'line', + layer, + tool, + strokeWidth: tool === 'brush' ? brushSize / 2 : eraserSize / 2, + points: action.payload, + ...(layer === 'base' && tool === 'brush' && { color: brushColor }), + }); + + state[state.currentCanvas].futureObjects = []; + }, + addPointToCurrentLine: (state, action: PayloadAction) => { + const lastLine = + state[state.currentCanvas].objects.findLast(isCanvasAnyLine); + + if (!lastLine) return; + + lastLine.points.push(...action.payload); + }, + undo: (state) => { + if (state.outpainting.objects.length === 0) return; + + const newObjects = state.outpainting.pastObjects.pop(); + if (!newObjects) return; + state.outpainting.futureObjects.unshift(state.outpainting.objects); + state.outpainting.objects = newObjects; + }, + redo: (state) => { + if (state.outpainting.futureObjects.length === 0) return; + const newObjects = state.outpainting.futureObjects.shift(); + if (!newObjects) return; + state.outpainting.pastObjects.push(state.outpainting.objects); + state.outpainting.objects = newObjects; + }, + setShouldShowGrid: (state, action: PayloadAction) => { + state.outpainting.shouldShowGrid = action.payload; + }, + setIsMovingStage: (state, action: PayloadAction) => { + state[state.currentCanvas].isMovingStage = action.payload; + }, + setShouldSnapToGrid: (state, action: PayloadAction) => { + state.outpainting.shouldSnapToGrid = action.payload; + }, + setShouldAutoSave: (state, action: PayloadAction) => { + state.outpainting.shouldAutoSave = action.payload; + }, + setShouldShowIntermediates: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldShowIntermediates = action.payload; + }, + resetCanvas: (state) => { + state[state.currentCanvas].pastObjects.push( + state[state.currentCanvas].objects + ); + + state[state.currentCanvas].objects = []; + state[state.currentCanvas].futureObjects = []; + }, + }, + extraReducers: (builder) => { + builder.addCase(uploadOutpaintingMergedImage.fulfilled, (state, action) => { + if (!action.payload) return; + state.outpainting.pastObjects.push([...state.outpainting.objects]); + state.outpainting.futureObjects = []; + + state.outpainting.objects = [ + { + kind: 'image', + layer: 'base', + ...action.payload, + }, + ]; + }); + }, +}); + +export const { + setTool, + setLayer, + setBrushColor, + setBrushSize, + setEraserSize, + addLine, + addPointToCurrentLine, + setShouldInvertMask, + setIsMaskEnabled, + setShouldShowCheckboardTransparency, + setShouldShowBrushPreview, + setMaskColor, + clearMask, + clearImageToInpaint, + undo, + redo, + setCursorPosition, + setStageDimensions, + setImageToInpaint, + setImageToOutpaint, + setBoundingBoxDimensions, + setBoundingBoxCoordinates, + setBoundingBoxPreviewFill, + setDoesCanvasNeedScaling, + setStageScale, + toggleTool, + setShouldShowBoundingBox, + setShouldDarkenOutsideBoundingBox, + setIsDrawing, + setShouldShowBrush, + setClearBrushHistory, + setShouldUseInpaintReplace, + setInpaintReplace, + setShouldLockBoundingBox, + toggleShouldLockBoundingBox, + setIsMovingBoundingBox, + setIsTransformingBoundingBox, + setIsMouseOverBoundingBox, + setIsMoveBoundingBoxKeyHeld, + setIsMoveStageKeyHeld, + setStageCoordinates, + setCurrentCanvas, + addImageToOutpaintingSesion, + resetCanvas, + setShouldShowGrid, + setShouldSnapToGrid, + setShouldAutoSave, + setShouldShowIntermediates, + setIsMovingStage, +} = canvasSlice.actions; + +export default canvasSlice.reducer; + +export const uploadOutpaintingMergedImage = createAsyncThunk( + 'canvas/uploadOutpaintingMergedImage', + async ( + canvasImageLayerRef: MutableRefObject, + thunkAPI + ) => { + const { getState } = thunkAPI; + + const state = getState() as RootState; + const stageScale = state.canvas.outpainting.stageScale; + + if (!canvasImageLayerRef.current) return; + const tempScale = canvasImageLayerRef.current.scale(); + + const { x: relativeX, y: relativeY } = + canvasImageLayerRef.current.getClientRect({ + relativeTo: canvasImageLayerRef.current.getParent(), + }); + + canvasImageLayerRef.current.scale({ + x: 1 / stageScale, + y: 1 / stageScale, + }); + + const clientRect = canvasImageLayerRef.current.getClientRect(); + + const imageDataURL = canvasImageLayerRef.current.toDataURL(clientRect); + + canvasImageLayerRef.current.scale(tempScale); + + if (!imageDataURL) return; + + const response = await fetch(window.location.origin + '/upload', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + dataURL: imageDataURL, + name: 'outpaintingmerge.png', + }), + }); + + const data = (await response.json()) as InvokeAI.ImageUploadResponse; + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { destination, ...rest } = data; + const image = { + uuid: uuidv4(), + ...rest, + }; + + return { + image, + x: relativeX, + y: relativeY, + }; + } +); + +export const currentCanvasSelector = (state: RootState): BaseCanvasState => + state.canvas[state.canvas.currentCanvas]; + +export const outpaintingCanvasSelector = ( + state: RootState +): OutpaintingCanvasState => state.canvas.outpainting; + +export const inpaintingCanvasSelector = ( + state: RootState +): InpaintingCanvasState => state.canvas.inpainting; + +export const baseCanvasImageSelector = createSelector( + [(state: RootState) => state.canvas, activeTabNameSelector], + (canvas: CanvasState, activeTabName) => { + if (activeTabName === 'inpainting') { + return canvas.inpainting.imageToInpaint; + } else if (activeTabName === 'outpainting') { + const firstImageObject = canvas.outpainting.objects.find( + (obj) => obj.kind === 'image' + ); + if (firstImageObject && firstImageObject.kind === 'image') { + return firstImageObject.image; + } + } + } +); diff --git a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts new file mode 100644 index 0000000000..dedc9f3dc9 --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts @@ -0,0 +1,49 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { KonvaEventObject } from 'konva/lib/Node'; +import _ from 'lodash'; +import { useCallback } from 'react'; +import { + currentCanvasSelector, + setIsMovingStage, + setStageCoordinates, +} from '../canvasSlice'; + +const selector = createSelector( + [currentCanvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { tool } = canvas; + return { + tool, + + activeTabName, + }; + }, + { memoizeOptions: { resultEqualityCheck: _.isEqual } } +); + +const useCanvasDrag = () => { + const dispatch = useAppDispatch(); + const { tool, activeTabName } = useAppSelector(selector); + + return { + handleDragStart: useCallback(() => { + if (tool !== 'move' || activeTabName !== 'outpainting') return; + dispatch(setIsMovingStage(true)); + }, [activeTabName, dispatch, tool]), + handleDragMove: useCallback( + (e: KonvaEventObject) => { + if (tool !== 'move' || activeTabName !== 'outpainting') return; + dispatch(setStageCoordinates(e.target.getPosition())); + }, + [activeTabName, dispatch, tool] + ), + handleDragEnd: useCallback(() => { + if (tool !== 'move' || activeTabName !== 'outpainting') return; + dispatch(setIsMovingStage(false)); + }, [activeTabName, dispatch, tool]), + }; +}; + +export default useCanvasDrag; diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts new file mode 100644 index 0000000000..0a4339425b --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -0,0 +1,111 @@ +import { createSelector } from '@reduxjs/toolkit'; +import _ from 'lodash'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { OptionsState } from 'features/options/optionsSlice'; +import { + CanvasTool, + setShouldShowBoundingBox, + setTool, + toggleShouldLockBoundingBox, +} from 'features/canvas/canvasSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { currentCanvasSelector, GenericCanvasState } from '../canvasSlice'; +import { useRef } from 'react'; + +const inpaintingCanvasHotkeysSelector = createSelector( + [ + (state: RootState) => state.options, + currentCanvasSelector, + activeTabNameSelector, + ], + (options: OptionsState, currentCanvas: GenericCanvasState, activeTabName) => { + const { + isMaskEnabled, + cursorPosition, + shouldLockBoundingBox, + shouldShowBoundingBox, + tool, + } = currentCanvas; + + return { + activeTabName, + isMaskEnabled, + isCursorOnCanvas: Boolean(cursorPosition), + shouldLockBoundingBox, + shouldShowBoundingBox, + tool, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const useInpaintingCanvasHotkeys = () => { + const dispatch = useAppDispatch(); + const { isMaskEnabled, activeTabName, shouldShowBoundingBox, tool } = + useAppSelector(inpaintingCanvasHotkeysSelector); + + const previousToolRef = useRef(null); + // Toggle lock bounding box + useHotkeys( + 'shift+w', + (e: KeyboardEvent) => { + e.preventDefault(); + dispatch(toggleShouldLockBoundingBox()); + }, + { + enabled: true, + }, + [activeTabName] + ); + + useHotkeys( + 'shift+h', + (e: KeyboardEvent) => { + e.preventDefault(); + dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); + }, + { + enabled: true, + }, + [activeTabName, shouldShowBoundingBox] + ); + + useHotkeys( + ['space'], + (e: KeyboardEvent) => { + if (e.repeat) return; + + if (tool !== 'move') { + previousToolRef.current = tool; + dispatch(setTool('move')); + } + }, + { keyup: false, keydown: true }, + [tool, previousToolRef] + ); + + useHotkeys( + ['space'], + (e: KeyboardEvent) => { + if (e.repeat) return; + + if ( + tool === 'move' && + previousToolRef.current && + previousToolRef.current !== 'move' + ) { + dispatch(setTool(previousToolRef.current)); + previousToolRef.current = 'move'; + } + }, + { keyup: true, keydown: false }, + [tool, previousToolRef] + ); +}; + +export default useInpaintingCanvasHotkeys; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts new file mode 100644 index 0000000000..8750db005a --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -0,0 +1,56 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import Konva from 'konva'; +import { KonvaEventObject } from 'konva/lib/Node'; +import _ from 'lodash'; +import { MutableRefObject, useCallback } from 'react'; +import { + addLine, + currentCanvasSelector, + setIsDrawing, + setIsMovingStage, +} from '../canvasSlice'; +import getScaledCursorPosition from '../util/getScaledCursorPosition'; + +const selector = createSelector( + [activeTabNameSelector, currentCanvasSelector], + (activeTabName, currentCanvas) => { + const { tool } = currentCanvas; + return { + tool, + activeTabName, + }; + }, + { memoizeOptions: { resultEqualityCheck: _.isEqual } } +); + +const useCanvasMouseDown = (stageRef: MutableRefObject) => { + const dispatch = useAppDispatch(); + const { tool } = useAppSelector(selector); + + return useCallback( + (e: KonvaEventObject) => { + if (!stageRef.current) return; + + if (tool === 'move') { + dispatch(setIsMovingStage(true)); + return; + } + + const scaledCursorPosition = getScaledCursorPosition(stageRef.current); + + if (!scaledCursorPosition) return; + + e.evt.preventDefault(); + + dispatch(setIsDrawing(true)); + + // Add a new line starting from the current cursor position. + dispatch(addLine([scaledCursorPosition.x, scaledCursorPosition.y])); + }, + [stageRef, dispatch, tool] + ); +}; + +export default useCanvasMouseDown; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts new file mode 100644 index 0000000000..73231f911e --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts @@ -0,0 +1,48 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import Konva from 'konva'; +import { KonvaEventObject } from 'konva/lib/Node'; +import _ from 'lodash'; +import { MutableRefObject, useCallback } from 'react'; +import { addLine, currentCanvasSelector, setIsDrawing } from '../canvasSlice'; +import getScaledCursorPosition from '../util/getScaledCursorPosition'; + +const selector = createSelector( + [activeTabNameSelector, currentCanvasSelector], + (activeTabName, currentCanvas) => { + const { tool } = currentCanvas; + return { + tool, + activeTabName, + }; + }, + { memoizeOptions: { resultEqualityCheck: _.isEqual } } +); + +const useCanvasMouseEnter = ( + stageRef: MutableRefObject +) => { + const dispatch = useAppDispatch(); + const { tool } = useAppSelector(selector); + + return useCallback( + (e: KonvaEventObject) => { + if (e.evt.buttons !== 1) return; + + if (!stageRef.current) return; + + const scaledCursorPosition = getScaledCursorPosition(stageRef.current); + + if (!scaledCursorPosition || tool === 'move') return; + + dispatch(setIsDrawing(true)); + + // Add a new line starting from the current cursor position. + dispatch(addLine([scaledCursorPosition.x, scaledCursorPosition.y])); + }, + [stageRef, tool, dispatch] + ); +}; + +export default useCanvasMouseEnter; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts new file mode 100644 index 0000000000..aa4cbd9557 --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts @@ -0,0 +1,64 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import Konva from 'konva'; +import { Vector2d } from 'konva/lib/types'; +import _ from 'lodash'; +import { MutableRefObject, useCallback } from 'react'; +import { + addPointToCurrentLine, + currentCanvasSelector, + GenericCanvasState, + setCursorPosition, +} from '../canvasSlice'; +import getScaledCursorPosition from '../util/getScaledCursorPosition'; + +const selector = createSelector( + [activeTabNameSelector, currentCanvasSelector], + (activeTabName, canvas: GenericCanvasState) => { + const { tool, isDrawing } = canvas; + return { + tool, + isDrawing, + activeTabName, + }; + }, + { memoizeOptions: { resultEqualityCheck: _.isEqual } } +); + +const useCanvasMouseMove = ( + stageRef: MutableRefObject, + didMouseMoveRef: MutableRefObject, + lastCursorPositionRef: MutableRefObject +) => { + const dispatch = useAppDispatch(); + const { isDrawing, tool } = useAppSelector(selector); + + return useCallback(() => { + if (!stageRef.current) return; + + const scaledCursorPosition = getScaledCursorPosition(stageRef.current); + + if (!scaledCursorPosition) return; + + dispatch(setCursorPosition(scaledCursorPosition)); + + lastCursorPositionRef.current = scaledCursorPosition; + + if (!isDrawing || tool === 'move') return; + + didMouseMoveRef.current = true; + dispatch( + addPointToCurrentLine([scaledCursorPosition.x, scaledCursorPosition.y]) + ); + }, [ + didMouseMoveRef, + dispatch, + isDrawing, + lastCursorPositionRef, + stageRef, + tool, + ]); +}; + +export default useCanvasMouseMove; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts b/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts new file mode 100644 index 0000000000..2a29404865 --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts @@ -0,0 +1,15 @@ +import { useAppDispatch } from 'app/store'; +import _ from 'lodash'; +import { useCallback } from 'react'; +import { setCursorPosition, setIsDrawing } from '../canvasSlice'; + +const useCanvasMouseOut = () => { + const dispatch = useAppDispatch(); + + return useCallback(() => { + dispatch(setCursorPosition(null)); + dispatch(setIsDrawing(false)); + }, [dispatch]); +}; + +export default useCanvasMouseOut; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts new file mode 100644 index 0000000000..685d43b3e2 --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts @@ -0,0 +1,64 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import Konva from 'konva'; +import _ from 'lodash'; +import { MutableRefObject, useCallback } from 'react'; +import { + // addPointToCurrentEraserLine, + addPointToCurrentLine, + currentCanvasSelector, + GenericCanvasState, + setIsDrawing, + setIsMovingStage, +} from '../canvasSlice'; +import getScaledCursorPosition from '../util/getScaledCursorPosition'; + +const selector = createSelector( + [activeTabNameSelector, currentCanvasSelector], + (activeTabName, canvas: GenericCanvasState) => { + const { tool, isDrawing } = canvas; + return { + tool, + isDrawing, + activeTabName, + }; + }, + { memoizeOptions: { resultEqualityCheck: _.isEqual } } +); + +const useCanvasMouseUp = ( + stageRef: MutableRefObject, + didMouseMoveRef: MutableRefObject +) => { + const dispatch = useAppDispatch(); + const { tool, isDrawing } = useAppSelector(selector); + + return useCallback(() => { + if (tool === 'move') { + dispatch(setIsMovingStage(false)); + return; + } + + if (!didMouseMoveRef.current && isDrawing && stageRef.current) { + const scaledCursorPosition = getScaledCursorPosition(stageRef.current); + + if (!scaledCursorPosition) return; + + /** + * Extend the current line. + * In this case, the mouse didn't move, so we append the same point to + * the line's existing points. This allows the line to render as a circle + * centered on that point. + */ + dispatch( + addPointToCurrentLine([scaledCursorPosition.x, scaledCursorPosition.y]) + ); + } else { + didMouseMoveRef.current = false; + } + dispatch(setIsDrawing(false)); + }, [didMouseMoveRef, dispatch, isDrawing, stageRef, tool]); +}; + +export default useCanvasMouseUp; diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts new file mode 100644 index 0000000000..857b023328 --- /dev/null +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -0,0 +1,83 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import Konva from 'konva'; +import { KonvaEventObject } from 'konva/lib/Node'; +import _ from 'lodash'; +import { MutableRefObject, useCallback } from 'react'; +import { + currentCanvasSelector, + GenericCanvasState, + setStageCoordinates, + setStageScale, +} from '../canvasSlice'; +import { + CANVAS_SCALE_BY, + MAX_CANVAS_SCALE, + MIN_CANVAS_SCALE, +} from '../util/constants'; + +const selector = createSelector( + [activeTabNameSelector, currentCanvasSelector], + (activeTabName, canvas: GenericCanvasState) => { + const { isMoveStageKeyHeld, stageScale } = canvas; + return { + isMoveStageKeyHeld, + stageScale, + activeTabName, + }; + }, + { memoizeOptions: { resultEqualityCheck: _.isEqual } } +); + +const useCanvasWheel = (stageRef: MutableRefObject) => { + const dispatch = useAppDispatch(); + const { isMoveStageKeyHeld, stageScale, activeTabName } = + useAppSelector(selector); + + return useCallback( + (e: KonvaEventObject) => { + // stop default scrolling + if (activeTabName !== 'outpainting') return; + + e.evt.preventDefault(); + + // const oldScale = stageRef.current.scaleX(); + if (!stageRef.current || isMoveStageKeyHeld) return; + + const cursorPos = stageRef.current.getPointerPosition(); + + if (!cursorPos) return; + + const mousePointTo = { + x: (cursorPos.x - stageRef.current.x()) / stageScale, + y: (cursorPos.y - stageRef.current.y()) / stageScale, + }; + + let delta = e.evt.deltaY; + + // when we zoom on trackpad, e.evt.ctrlKey is true + // in that case lets revert direction + if (e.evt.ctrlKey) { + delta = -delta; + } + + const newScale = _.clamp( + stageScale * CANVAS_SCALE_BY ** delta, + MIN_CANVAS_SCALE, + MAX_CANVAS_SCALE + ); + + const newPos = { + x: cursorPos.x - mousePointTo.x * newScale, + y: cursorPos.y - mousePointTo.y * newScale, + }; + + dispatch(setStageScale(newScale)); + dispatch(setStageCoordinates(newPos)); + }, + [activeTabName, dispatch, isMoveStageKeyHeld, stageRef, stageScale] + ); +}; + +export default useCanvasWheel; diff --git a/frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts b/frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts new file mode 100644 index 0000000000..f2066c5f0b --- /dev/null +++ b/frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts @@ -0,0 +1,23 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppSelector } from 'app/store'; +import _ from 'lodash'; +import { currentCanvasSelector, GenericCanvasState } from '../canvasSlice'; + +const selector = createSelector( + [currentCanvasSelector], + (currentCanvas: GenericCanvasState) => { + return currentCanvas.stageScale; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const useUnscaleCanvasValue = () => { + const stageScale = useAppSelector(selector); + return (value: number) => value / stageScale; +}; + +export default useUnscaleCanvasValue; diff --git a/frontend/src/features/tabs/Inpainting/util/colorToString.ts b/frontend/src/features/canvas/util/colorToString.ts similarity index 100% rename from frontend/src/features/tabs/Inpainting/util/colorToString.ts rename to frontend/src/features/canvas/util/colorToString.ts diff --git a/frontend/src/features/tabs/Inpainting/util/constants.ts b/frontend/src/features/canvas/util/constants.ts similarity index 68% rename from frontend/src/features/tabs/Inpainting/util/constants.ts rename to frontend/src/features/canvas/util/constants.ts index 85fc3eb97c..59a9a46d71 100644 --- a/frontend/src/features/tabs/Inpainting/util/constants.ts +++ b/frontend/src/features/canvas/util/constants.ts @@ -7,4 +7,8 @@ export const MARCHING_ANTS_SPEED = 30; // bounding box anchor size export const TRANSFORMER_ANCHOR_SIZE = 15; +export const CANVAS_SCALE_BY = 0.999; +export const MIN_CANVAS_SCALE = 0.1 + +export const MAX_CANVAS_SCALE = 20 \ No newline at end of file diff --git a/frontend/src/features/canvas/util/generateMask.ts b/frontend/src/features/canvas/util/generateMask.ts new file mode 100644 index 0000000000..7a924b555b --- /dev/null +++ b/frontend/src/features/canvas/util/generateMask.ts @@ -0,0 +1,64 @@ +import Konva from 'konva'; +import { IRect } from 'konva/lib/types'; +import { CanvasMaskLine } from 'features/canvas/canvasSlice'; + +/** + * Generating a mask image from InpaintingCanvas.tsx is not as simple + * as calling toDataURL() on the canvas, because the mask may be represented + * by colored lines or transparency, or the user may have inverted the mask + * display. + * + * So we need to regenerate the mask image by creating an offscreen canvas, + * drawing the mask and compositing everything correctly to output a valid + * mask image. + */ +const generateMask = (lines: CanvasMaskLine[], boundingBox: IRect): string => { + // create an offscreen canvas and add the mask to it + const { width, height } = boundingBox; + + const offscreenContainer = document.createElement('div'); + + const stage = new Konva.Stage({ + container: offscreenContainer, + width: width, + height: height, + }); + + const baseLayer = new Konva.Layer(); + const maskLayer = new Konva.Layer(); + + // composite the image onto the mask layer + baseLayer.add( + new Konva.Rect({ + ...boundingBox, + fill: 'white', + }) + ); + + lines.forEach((line) => + maskLayer.add( + new Konva.Line({ + points: line.points, + stroke: 'black', + strokeWidth: line.strokeWidth * 2, + tension: 0, + lineCap: 'round', + lineJoin: 'round', + shadowForStrokeEnabled: false, + globalCompositeOperation: + line.tool === 'brush' ? 'source-over' : 'destination-out', + }) + ) + ); + + stage.add(baseLayer); + stage.add(maskLayer); + + const dataURL = stage.toDataURL({ ...boundingBox }); + + offscreenContainer.remove(); + + return dataURL; +}; + +export default generateMask; diff --git a/frontend/src/features/tabs/Inpainting/util/getScaledCursorPosition.ts b/frontend/src/features/canvas/util/getScaledCursorPosition.ts similarity index 100% rename from frontend/src/features/tabs/Inpainting/util/getScaledCursorPosition.ts rename to frontend/src/features/canvas/util/getScaledCursorPosition.ts diff --git a/frontend/src/features/gallery/CurrentImageButtons.scss b/frontend/src/features/gallery/CurrentImageButtons.scss index 982fcc4867..a48454bb8c 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.scss +++ b/frontend/src/features/gallery/CurrentImageButtons.scss @@ -13,11 +13,18 @@ max-width: 25rem; } + .current-image-send-to-popover { + .invokeai__button { + place-content: start; + } + } + .chakra-popover__popper { z-index: 11; } .delete-image-btn { + background-color: var(--btn-base-color); svg { fill: var(--btn-delete-image); } diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index b95e16dda9..3a21f4b0b1 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -1,24 +1,25 @@ import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { useAppDispatch, useAppSelector } from '../../app/store'; -import { RootState } from '../../app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { RootState } from 'app/store'; import { OptionsState, setActiveTab, setAllParameters, setInitialImage, + setIsLightBoxOpen, setPrompt, setSeed, setShouldShowImageDetails, -} from '../options/optionsSlice'; +} from 'features/options/optionsSlice'; import DeleteImageModal from './DeleteImageModal'; -import { SystemState } from '../system/systemSlice'; -import IAIButton from '../../common/components/IAIButton'; -import { runESRGAN, runFacetool } from '../../app/socketio/actions'; -import IAIIconButton from '../../common/components/IAIIconButton'; -import UpscaleOptions from '../options/AdvancedOptions/Upscale/UpscaleOptions'; -import FaceRestoreOptions from '../options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import { SystemState } from 'features/system/systemSlice'; +import IAIButton from 'common/components/IAIButton'; +import { runESRGAN, runFacetool } from 'app/socketio/actions'; +import IAIIconButton from 'common/components/IAIIconButton'; +import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; +import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import { useHotkeys } from 'react-hotkeys-hook'; import { ButtonGroup, Link, useClipboard, useToast } from '@chakra-ui/react'; import { @@ -36,11 +37,12 @@ import { } from 'react-icons/fa'; import { setImageToInpaint, - setNeedsCache, -} from '../tabs/Inpainting/inpaintingSlice'; + setDoesCanvasNeedScaling, + setImageToOutpaint, +} from 'features/canvas/canvasSlice'; import { GalleryState } from './gallerySlice'; -import { activeTabNameSelector } from '../options/optionsSelectors'; -import IAIPopover from '../../common/components/IAIPopover'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import IAIPopover from 'common/components/IAIPopover'; const systemSelector = createSelector( [ @@ -58,8 +60,12 @@ const systemSelector = createSelector( const { isProcessing, isConnected, isGFPGANAvailable, isESRGANAvailable } = system; - const { upscalingLevel, facetoolStrength, shouldShowImageDetails } = - options; + const { + upscalingLevel, + facetoolStrength, + shouldShowImageDetails, + isLightBoxOpen, + } = options; const { intermediateImage, currentImage } = gallery; @@ -74,6 +80,7 @@ const systemSelector = createSelector( currentImage, shouldShowImageDetails, activeTabName, + isLightBoxOpen, }; }, { @@ -99,28 +106,31 @@ const CurrentImageButtons = () => { shouldDisableToolbarButtons, shouldShowImageDetails, currentImage, + isLightBoxOpen, } = useAppSelector(systemSelector); - const { onCopy } = useClipboard( - currentImage ? window.location.toString() + currentImage.url : '' - ); - const toast = useToast(); const handleClickUseAsInitialImage = () => { if (!currentImage) return; + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); dispatch(setInitialImage(currentImage)); dispatch(setActiveTab('img2img')); }; const handleCopyImageLink = () => { - onCopy(); - toast({ - title: 'Image Link Copied', - status: 'success', - duration: 2500, - isClosable: true, - }); + navigator.clipboard + .writeText( + currentImage ? window.location.toString() + currentImage.url : '' + ) + .then(() => { + toast({ + title: 'Image Link Copied', + status: 'success', + duration: 2500, + isClosable: true, + }); + }); }; useHotkeys( @@ -308,11 +318,27 @@ const CurrentImageButtons = () => { const handleSendToInpainting = () => { if (!currentImage) return; + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); dispatch(setImageToInpaint(currentImage)); - dispatch(setActiveTab('inpainting')); - dispatch(setNeedsCache(true)); + dispatch(setDoesCanvasNeedScaling(true)); + + toast({ + title: 'Sent to Inpainting', + status: 'success', + duration: 2500, + isClosable: true, + }); + }; + + const handleSendToOutpainting = () => { + if (!currentImage) return; + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); + + dispatch(setImageToOutpaint(currentImage)); + dispatch(setActiveTab('outpainting')); + dispatch(setDoesCanvasNeedScaling(true)); toast({ title: 'Sent to Inpainting', @@ -363,6 +389,13 @@ const CurrentImageButtons = () => { > Send to Inpainting + } + > + Send to Outpainting + { + dispatch(setIsLightBoxOpen(true)); + }; + return (
{imageToDisplay && ( @@ -83,6 +87,7 @@ export default function CurrentImagePreview() { src={imageToDisplay.url} width={imageToDisplay.width} height={imageToDisplay.height} + onClick={handleLightBox} /> )} {!shouldShowImageDetails && ( diff --git a/frontend/src/features/gallery/DeleteImageModal.tsx b/frontend/src/features/gallery/DeleteImageModal.tsx index 417aa2d393..432062c001 100644 --- a/frontend/src/features/gallery/DeleteImageModal.tsx +++ b/frontend/src/features/gallery/DeleteImageModal.tsx @@ -22,11 +22,11 @@ import { SyntheticEvent, useRef, } from 'react'; -import { useAppDispatch, useAppSelector } from '../../app/store'; -import { deleteImage } from '../../app/socketio/actions'; -import { RootState } from '../../app/store'; -import { setShouldConfirmOnDelete, SystemState } from '../system/systemSlice'; -import * as InvokeAI from '../../app/invokeai'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { deleteImage } from 'app/socketio/actions'; +import { RootState } from 'app/store'; +import { setShouldConfirmOnDelete, SystemState } from 'features/system/systemSlice'; +import * as InvokeAI from 'app/invokeai'; import { useHotkeys } from 'react-hotkeys-hook'; import _ from 'lodash'; diff --git a/frontend/src/features/gallery/HoverableImage.tsx b/frontend/src/features/gallery/HoverableImage.tsx index 23348a69b7..d7896ce367 100644 --- a/frontend/src/features/gallery/HoverableImage.tsx +++ b/frontend/src/features/gallery/HoverableImage.tsx @@ -6,7 +6,7 @@ import { Tooltip, useToast, } from '@chakra-ui/react'; -import { useAppDispatch, useAppSelector } from '../../app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { setCurrentImage } from './gallerySlice'; import { FaCheck, FaTrashAlt } from 'react-icons/fa'; import DeleteImageModal from './DeleteImageModal'; @@ -16,12 +16,16 @@ import { setAllImageToImageParameters, setAllTextToImageParameters, setInitialImage, + setIsLightBoxOpen, setPrompt, setSeed, -} from '../options/optionsSlice'; -import * as InvokeAI from '../../app/invokeai'; +} from 'features/options/optionsSlice'; +import * as InvokeAI from 'app/invokeai'; import * as ContextMenu from '@radix-ui/react-context-menu'; -import { setImageToInpaint } from '../tabs/Inpainting/inpaintingSlice'; +import { + setImageToInpaint, + setImageToOutpaint, +} from 'features/canvas/canvasSlice'; import { hoverableImageSelector } from './gallerySliceSelectors'; interface HoverableImageProps { @@ -44,6 +48,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { galleryImageObjectFit, galleryImageMinimumWidth, mayDeleteImage, + isLightBoxOpen, } = useAppSelector(hoverableImageSelector); const { image, isSelected } = props; const { url, uuid, metadata } = image; @@ -77,6 +82,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { }; const handleSendToImageToImage = () => { + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); dispatch(setInitialImage(image)); if (activeTabName !== 'img2img') { dispatch(setActiveTab('img2img')); @@ -90,6 +96,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { }; const handleSendToInpainting = () => { + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); dispatch(setImageToInpaint(image)); if (activeTabName !== 'inpainting') { dispatch(setActiveTab('inpainting')); @@ -102,6 +109,20 @@ const HoverableImage = memo((props: HoverableImageProps) => { }); }; + const handleSendToOutpainting = () => { + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); + dispatch(setImageToOutpaint(image)); + if (activeTabName !== 'outpainting') { + dispatch(setActiveTab('outpainting')); + } + toast({ + title: 'Sent to Outpainting', + status: 'success', + duration: 2500, + isClosable: true, + }); + }; + const handleUseAllParameters = () => { metadata && dispatch(setAllTextToImageParameters(metadata)); toast({ @@ -228,6 +249,9 @@ const HoverableImage = memo((props: HoverableImageProps) => { Send to Inpainting + + Send to Outpainting + Delete Image diff --git a/frontend/src/features/gallery/ImageGallery.scss b/frontend/src/features/gallery/ImageGallery.scss index 3b8be38cfb..4321970562 100644 --- a/frontend/src/features/gallery/ImageGallery.scss +++ b/frontend/src/features/gallery/ImageGallery.scss @@ -35,7 +35,7 @@ } .image-gallery-popup { - background-color: var(--tab-color); + background-color: var(--background-color-secondary); padding: 1rem; display: flex; flex-direction: column; @@ -55,16 +55,16 @@ column-gap: 0.5rem; justify-content: space-between; - div { + .image-gallery-header-right-icons { display: flex; - column-gap: 0.5rem; + flex-direction: row; column-gap: 0.5rem; } .image-gallery-icon-btn { - background-color: var(--btn-load-more) !important; + background-color: var(--btn-load-more); &:hover { - background-color: var(--btn-load-more-hover) !important; + background-color: var(--btn-load-more-hover); } } @@ -96,7 +96,8 @@ .image-gallery-container-placeholder { display: flex; flex-direction: column; - background-color: var(--background-color-secondary); + row-gap: 0.5rem; + background-color: var(--background-color); border-radius: 0.5rem; place-items: center; padding: 2rem; @@ -108,26 +109,26 @@ } svg { - width: 5rem; - height: 5rem; + width: 4rem; + height: 4rem; color: var(--svg-color); } } .image-gallery-load-more-btn { - background-color: var(--btn-load-more) !important; - font-size: 0.85rem !important; + background-color: var(--btn-load-more); + font-size: 0.85rem; padding: 0.5rem; margin-top: 1rem; &:disabled { &:hover { - background-color: var(--btn-load-more) !important; + background-color: var(--btn-load-more); } } &:hover { - background-color: var(--btn-load-more-hover) !important; + background-color: var(--btn-load-more-hover); } } } @@ -135,11 +136,15 @@ } .image-gallery-category-btn-group { - width: 100% !important; - column-gap: 0 !important; - justify-content: stretch !important; + width: max-content; + column-gap: 0; + justify-content: stretch; button { + background-color: var(--btn-base-color); + &:hover { + background-color: var(--btn-base-color-hover); + } flex-grow: 1; &[data-selected='true'] { background-color: var(--accent-color); diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index 70098588f2..1b60c9c44e 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -5,9 +5,9 @@ import { ChangeEvent, useEffect, useRef, useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { MdPhotoLibrary } from 'react-icons/md'; import { BsPinAngle, BsPinAngleFill } from 'react-icons/bs'; -import { requestImages } from '../../app/socketio/actions'; -import { useAppDispatch, useAppSelector } from '../../app/store'; -import IAIIconButton from '../../common/components/IAIIconButton'; +import { requestImages } from 'app/socketio/actions'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; import { selectNextImage, selectPrevImage, @@ -21,19 +21,19 @@ import { setShouldPinGallery, } from './gallerySlice'; import HoverableImage from './HoverableImage'; -import { setShouldShowGallery } from '../gallery/gallerySlice'; +import { setShouldShowGallery } from 'features/gallery/gallerySlice'; import { ButtonGroup, useToast } from '@chakra-ui/react'; import { CSSTransition } from 'react-transition-group'; import { Direction } from 're-resizable/lib/resizer'; import { imageGallerySelector } from './gallerySliceSelectors'; import { FaImage, FaUser, FaWrench } from 'react-icons/fa'; -import IAIPopover from '../../common/components/IAIPopover'; -import IAISlider from '../../common/components/IAISlider'; +import IAIPopover from 'common/components/IAIPopover'; +import IAISlider from 'common/components/IAISlider'; import { BiReset } from 'react-icons/bi'; -import IAICheckbox from '../../common/components/IAICheckbox'; -import { setNeedsCache } from '../tabs/Inpainting/inpaintingSlice'; +import IAICheckbox from 'common/components/IAICheckbox'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; import _ from 'lodash'; -import useClickOutsideWatcher from '../../common/hooks/useClickOutsideWatcher'; +import useClickOutsideWatcher from 'common/hooks/useClickOutsideWatcher'; const GALLERY_SHOW_BUTTONS_MIN_WIDTH = 320; @@ -56,6 +56,7 @@ export default function ImageGallery() { shouldAutoSwitchToNewImages, areMoreImagesAvailable, galleryWidth, + isLightBoxOpen, } = useAppSelector(imageGallerySelector); const [galleryMinWidth, setGalleryMinWidth] = useState(300); @@ -68,6 +69,13 @@ export default function ImageGallery() { useEffect(() => { if (!shouldPinGallery) return; + if (isLightBoxOpen) { + dispatch(setGalleryWidth(400)); + setGalleryMinWidth(400); + setGalleryMaxWidth(400); + return; + } + if (activeTabName === 'inpainting') { dispatch(setGalleryWidth(190)); setGalleryMinWidth(190); @@ -83,14 +91,14 @@ export default function ImageGallery() { ); setGalleryMaxWidth(590); } - dispatch(setNeedsCache(true)); - }, [dispatch, activeTabName, shouldPinGallery, galleryWidth]); + dispatch(setDoesCanvasNeedScaling(true)); + }, [dispatch, activeTabName, shouldPinGallery, galleryWidth, isLightBoxOpen]); useEffect(() => { if (!shouldPinGallery) { setGalleryMaxWidth(window.innerWidth); } - }, [shouldPinGallery]); + }, [shouldPinGallery, isLightBoxOpen]); const galleryRef = useRef(null); const galleryContainerRef = useRef(null); @@ -98,7 +106,7 @@ export default function ImageGallery() { const handleSetShouldPinGallery = () => { dispatch(setShouldPinGallery(!shouldPinGallery)); - dispatch(setNeedsCache(true)); + dispatch(setDoesCanvasNeedScaling(true)); }; const handleToggleGallery = () => { @@ -107,7 +115,7 @@ export default function ImageGallery() { const handleOpenGallery = () => { dispatch(setShouldShowGallery(true)); - shouldPinGallery && dispatch(setNeedsCache(true)); + shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)); }; const handleCloseGallery = () => { @@ -119,7 +127,7 @@ export default function ImageGallery() { ) ); dispatch(setShouldHoldGalleryOpen(false)); - // dispatch(setNeedsCache(true)); + // dispatch(setDoesCanvasNeedScaling(true)); }; const handleClickLoadMore = () => { @@ -128,7 +136,7 @@ export default function ImageGallery() { const handleChangeGalleryImageMinimumWidth = (v: number) => { dispatch(setGalleryImageMinimumWidth(v)); - dispatch(setNeedsCache(true)); + dispatch(setDoesCanvasNeedScaling(true)); }; const setCloseGalleryTimer = () => { @@ -143,8 +151,10 @@ export default function ImageGallery() { 'g', () => { handleToggleGallery(); + shouldPinGallery && + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, - [shouldShowGallery] + [shouldShowGallery, shouldPinGallery] ); useHotkeys('left', () => { @@ -159,6 +169,7 @@ export default function ImageGallery() { 'shift+g', () => { handleSetShouldPinGallery(); + dispatch(setDoesCanvasNeedScaling(true)); }, [shouldPinGallery] ); @@ -168,6 +179,7 @@ export default function ImageGallery() { () => { if (shouldPinGallery) return; dispatch(setShouldShowGallery(false)); + dispatch(setDoesCanvasNeedScaling(true)); }, [shouldPinGallery] ); @@ -339,49 +351,48 @@ export default function ImageGallery() { }} >
-
- - {shouldShowButtons ? ( - <> - - - - ) : ( - <> - } - onClick={() => dispatch(setCurrentCategory('result'))} - /> - } - onClick={() => dispatch(setCurrentCategory('user'))} - /> - - )} - -
-
+ + {shouldShowButtons ? ( + <> + + + + ) : ( + <> + } + onClick={() => dispatch(setCurrentCategory('result'))} + /> + } + onClick={() => dispatch(setCurrentCategory('user'))} + /> + + )} + + +
) => { + setIntermediateImage: ( + state, + action: PayloadAction< + InvokeAI.Image & { boundingBox?: IRect; generationMode?: InvokeTabName } + > + ) => { state.intermediateImage = action.payload; }, clearIntermediateImage: (state) => { diff --git a/frontend/src/features/gallery/gallerySliceSelectors.ts b/frontend/src/features/gallery/gallerySliceSelectors.ts index d0bbb5af40..78bc6fcf58 100644 --- a/frontend/src/features/gallery/gallerySliceSelectors.ts +++ b/frontend/src/features/gallery/gallerySliceSelectors.ts @@ -1,8 +1,8 @@ import { createSelector } from '@reduxjs/toolkit'; -import { RootState } from '../../app/store'; -import { activeTabNameSelector } from '../options/optionsSelectors'; -import { OptionsState } from '../options/optionsSlice'; -import { SystemState } from '../system/systemSlice'; +import { RootState } from 'app/store'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { OptionsState } from 'features/options/optionsSlice'; +import { SystemState } from 'features/system/systemSlice'; import { GalleryState } from './gallerySlice'; import _ from 'lodash'; @@ -27,6 +27,8 @@ export const imageGallerySelector = createSelector( galleryWidth, } = gallery; + const { isLightBoxOpen } = options; + return { currentImageUuid, shouldPinGallery, @@ -43,6 +45,7 @@ export const imageGallerySelector = createSelector( categories[currentCategory].areMoreImagesAvailable, currentCategory, galleryWidth, + isLightBoxOpen, }; }, { @@ -70,6 +73,7 @@ export const hoverableImageSelector = createSelector( galleryImageObjectFit: gallery.galleryImageObjectFit, galleryImageMinimumWidth: gallery.galleryImageMinimumWidth, activeTabName, + isLightBoxOpen: options.isLightBoxOpen, }; }, { diff --git a/frontend/src/features/lightbox/Lightbox.scss b/frontend/src/features/lightbox/Lightbox.scss new file mode 100644 index 0000000000..74c4fb4fc5 --- /dev/null +++ b/frontend/src/features/lightbox/Lightbox.scss @@ -0,0 +1,74 @@ +@use '../../styles/Mixins/' as *; + +.lightbox-container { + width: 100%; + height: 100%; + color: var(--text-color); + overflow: hidden; + position: absolute; + left: 0; + top: 0; + background-color: var(--background-color-secondary); + z-index: 30; + + .image-gallery-wrapper { + max-height: 100% !important; + + .image-gallery-container { + max-height: calc(100vh - 5rem); + } + } + + .current-image-options { + z-index: 2; + position: absolute; + top: 1rem; + } +} + +.lightbox-close-btn { + z-index: 3; + position: absolute; + left: 1rem; + top: 1rem; + @include BaseButton; +} + +.lightbox-display-container { + display: flex; + flex-direction: row; +} + +.lightbox-preview-wrapper { + overflow: hidden; + background-color: red; + background-color: var(--background-color-secondary); + display: grid; + grid-template-columns: auto max-content; + + place-items: center; + width: 100vw; + height: 100vh; + + .current-image-next-prev-buttons { + position: absolute; + } + + .lightbox-image { + grid-area: lightbox-content; + border-radius: 0.5rem; + } + + .lightbox-image-options { + position: absolute; + z-index: 2; + left: 1rem; + top: 4.5rem; + user-select: none; + border-radius: 0.5rem; + + display: flex; + flex-direction: column; + row-gap: 0.5rem; + } +} diff --git a/frontend/src/features/lightbox/Lightbox.tsx b/frontend/src/features/lightbox/Lightbox.tsx new file mode 100644 index 0000000000..aa8f92885f --- /dev/null +++ b/frontend/src/features/lightbox/Lightbox.tsx @@ -0,0 +1,116 @@ +import { IconButton } from '@chakra-ui/react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import CurrentImageButtons from 'features/gallery/CurrentImageButtons'; +import { imagesSelector } from 'features/gallery/CurrentImagePreview'; +import { + selectNextImage, + selectPrevImage, +} from 'features/gallery/gallerySlice'; +import ImageGallery from 'features/gallery/ImageGallery'; +import { setIsLightBoxOpen } from 'features/options/optionsSlice'; +import React, { useState } from 'react'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { BiExit } from 'react-icons/bi'; +import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; +import ReactPanZoom from './ReactPanZoom'; + +export default function Lightbox() { + const dispatch = useAppDispatch(); + const isLightBoxOpen = useAppSelector( + (state: RootState) => state.options.isLightBoxOpen + ); + + const { + imageToDisplay, + shouldShowImageDetails, + isOnFirstImage, + isOnLastImage, + } = useAppSelector(imagesSelector); + + const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = + useState(false); + + const handleCurrentImagePreviewMouseOver = () => { + setShouldShowNextPrevButtons(true); + }; + + const handleCurrentImagePreviewMouseOut = () => { + setShouldShowNextPrevButtons(false); + }; + + const handleClickPrevButton = () => { + dispatch(selectPrevImage()); + }; + + const handleClickNextButton = () => { + dispatch(selectNextImage()); + }; + + useHotkeys( + 'Esc', + () => { + if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); + }, + [isLightBoxOpen] + ); + + return ( +
+ } + aria-label="Exit Viewer" + className="lightbox-close-btn" + onClick={() => { + dispatch(setIsLightBoxOpen(false)); + }} + fontSize={20} + /> + +
+
+ + {!shouldShowImageDetails && ( +
+
+ {shouldShowNextPrevButtons && !isOnFirstImage && ( + } + variant="unstyled" + onClick={handleClickPrevButton} + /> + )} +
+
+ {shouldShowNextPrevButtons && !isOnLastImage && ( + } + variant="unstyled" + onClick={handleClickNextButton} + /> + )} +
+
+ )} + {imageToDisplay && ( + + )} +
+ +
+
+ ); +} diff --git a/frontend/src/features/lightbox/ReactPanZoom.tsx b/frontend/src/features/lightbox/ReactPanZoom.tsx new file mode 100644 index 0000000000..0c84d8a0e8 --- /dev/null +++ b/frontend/src/features/lightbox/ReactPanZoom.tsx @@ -0,0 +1,155 @@ +import IAIIconButton from 'common/components/IAIIconButton'; +import * as React from 'react'; +import { + BiReset, + BiRotateLeft, + BiRotateRight, + BiZoomIn, + BiZoomOut, +} from 'react-icons/bi'; +import { MdFlip } from 'react-icons/md'; +import { PanViewer } from 'react-image-pan-zoom-rotate'; + +type ReactPanZoomProps = { + image: string; + styleClass?: string; + alt?: string; + ref?: any; +}; + +export default function ReactPanZoom({ + image, + alt, + ref, + styleClass, +}: ReactPanZoomProps) { + const [dx, setDx] = React.useState(0); + const [dy, setDy] = React.useState(0); + const [zoom, setZoom] = React.useState(1); + const [rotation, setRotation] = React.useState(0); + const [flip, setFlip] = React.useState(false); + + const resetAll = () => { + setDx(0); + setDy(0); + setZoom(1); + setRotation(0); + setFlip(false); + }; + const zoomIn = () => { + setZoom(zoom + 0.2); + }; + + const zoomOut = () => { + if (zoom >= 0.5) { + setZoom(zoom - 0.2); + } + }; + + const rotateLeft = () => { + if (rotation === -3) { + setRotation(0); + } else { + setRotation(rotation - 1); + } + }; + + const rotateRight = () => { + if (rotation === 3) { + setRotation(0); + } else { + setRotation(rotation + 1); + } + }; + + const flipImage = () => { + setFlip(!flip); + }; + + const onPan = (dx: number, dy: number) => { + setDx(dx); + setDy(dy); + }; + + return ( +
+
+ } + aria-label="Zoom In" + tooltip="Zoom In" + onClick={zoomIn} + fontSize={20} + /> + + } + aria-label="Zoom Out" + tooltip="Zoom Out" + onClick={zoomOut} + fontSize={20} + /> + + } + aria-label="Rotate Left" + tooltip="Rotate Left" + onClick={rotateLeft} + fontSize={20} + /> + + } + aria-label="Rotate Right" + tooltip="Rotate Right" + onClick={rotateRight} + fontSize={20} + /> + + } + aria-label="Flip Image" + tooltip="Flip Image" + onClick={flipImage} + fontSize={20} + /> + + } + aria-label="Reset" + tooltip="Reset" + onClick={resetAll} + fontSize={20} + /> +
+ + {alt} + +
+ ); +} diff --git a/frontend/src/features/options/AccordionItems/AdvancedSettings.scss b/frontend/src/features/options/AccordionItems/AdvancedSettings.scss index fd940e8182..9d0dcd9cca 100644 --- a/frontend/src/features/options/AccordionItems/AdvancedSettings.scss +++ b/frontend/src/features/options/AccordionItems/AdvancedSettings.scss @@ -21,7 +21,20 @@ .advanced-settings-panel { background-color: var(--tab-panel-bg); border-radius: 0 0 0.4rem 0.4rem; - border: 2px solid var(--tab-hover-color); + padding: 1rem; + + button { + background-color: var(--btn-base-color); + &:hover { + background-color: var(--btn-base-color-hover); + } + + &:disabled { + &:hover { + background-color: var(--btn-base-color); + } + } + } } .advanced-settings-header { @@ -33,6 +46,6 @@ } &:hover { - background-color: var(--tab-hover-color) !important; + background-color: var(--tab-hover-color); } } diff --git a/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx b/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx index 30d6f2a5e8..d11990a6a6 100644 --- a/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx +++ b/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx @@ -5,8 +5,8 @@ import { AccordionPanel, } from '@chakra-ui/react'; import React, { ReactElement } from 'react'; -import { Feature } from '../../../app/features'; -import GuideIcon from '../../../common/components/GuideIcon'; +import { Feature } from 'app/features'; +import GuideIcon from 'common/components/GuideIcon'; export interface InvokeAccordionItemProps { header: ReactElement; diff --git a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx b/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx index 0efe400d22..937a33cdab 100644 --- a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx +++ b/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx @@ -4,9 +4,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setShouldRunFacetool } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setShouldRunFacetool } from 'features/options/optionsSlice'; export default function FaceRestoreHeader() { const isGFPGANAvailable = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx b/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx index 1f8e170a6f..d0043f2f70 100644 --- a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx +++ b/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx @@ -1,7 +1,7 @@ import { Flex } from '@chakra-ui/react'; -import { RootState } from '../../../../app/store'; -import { useAppDispatch, useAppSelector } from '../../../../app/store'; +import { RootState } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { FacetoolType, @@ -9,14 +9,14 @@ import { setCodeformerFidelity, setFacetoolStrength, setFacetoolType, -} from '../../optionsSlice'; +} from 'features/options/optionsSlice'; import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { SystemState } from '../../../system/systemSlice'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import IAISelect from '../../../../common/components/IAISelect'; -import { FACETOOL_TYPES } from '../../../../app/constants'; +import { SystemState } from 'features/system/systemSlice'; +import IAINumberInput from 'common/components/IAINumberInput'; +import IAISelect from 'common/components/IAISelect'; +import { FACETOOL_TYPES } from 'app/constants'; import { ChangeEvent } from 'react'; const optionsSelector = createSelector( diff --git a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx b/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx index eaaa08dff4..738c3d2d96 100644 --- a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx +++ b/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx @@ -3,9 +3,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setShouldFitToWidthHeight } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setShouldFitToWidthHeight } from 'features/options/optionsSlice'; export default function ImageFit() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx b/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx index ea916c5460..624d958fb2 100644 --- a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx +++ b/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx @@ -1,11 +1,7 @@ import React from 'react'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import { setImg2imgStrength } from '../../optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAISlider from 'common/components/IAISlider'; +import { setImg2imgStrength } from 'features/options/optionsSlice'; interface ImageToImageStrengthProps { label?: string; @@ -22,17 +18,36 @@ export default function ImageToImageStrength(props: ImageToImageStrengthProps) { const handleChangeStrength = (v: number) => dispatch(setImg2imgStrength(v)); + const handleImg2ImgStrengthReset = () => { + dispatch(setImg2imgStrength(0.5)); + }; + return ( - + // ); } diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx index b91f5d5736..82f832d904 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx @@ -1,26 +1,33 @@ import React from 'react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAICheckbox from 'common/components/IAICheckbox'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAICheckbox from '../../../../../common/components/IAICheckbox'; -import { setShouldShowBoundingBoxFill } from '../../../../tabs/Inpainting/inpaintingSlice'; + currentCanvasSelector, + GenericCanvasState, + setShouldDarkenOutsideBoundingBox, +} from 'features/canvas/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; + +const selector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => + currentCanvas.shouldDarkenOutsideBoundingBox +); export default function BoundingBoxDarkenOutside() { const dispatch = useAppDispatch(); - const shouldShowBoundingBoxFill = useAppSelector( - (state: RootState) => state.inpainting.shouldShowBoundingBoxFill - ); + const shouldDarkenOutsideBoundingBox = useAppSelector(selector); const handleChangeShouldShowBoundingBoxFill = () => { - dispatch(setShouldShowBoundingBoxFill(!shouldShowBoundingBoxFill)); + dispatch( + setShouldDarkenOutsideBoundingBox(!shouldDarkenOutsideBoundingBox) + ); }; return ( diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx index 709a86a80b..aa8964aa89 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx @@ -1,30 +1,25 @@ import React from 'react'; -import IAISlider from '../../../../../common/components/IAISlider'; -import IAINumberInput from '../../../../../common/components/IAINumberInput'; -import IAIIconButton from '../../../../../common/components/IAIIconButton'; -import { BiReset } from 'react-icons/bi'; +import IAISlider from 'common/components/IAISlider'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; import { - InpaintingState, + currentCanvasSelector, + GenericCanvasState, + // InpaintingState, setBoundingBoxDimensions, -} from '../../../../tabs/Inpainting/inpaintingSlice'; +} from 'features/canvas/canvasSlice'; -import { roundDownToMultiple } from '../../../../../common/util/roundDownToMultiple'; +import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import _ from 'lodash'; const boundingBoxDimensionsSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { canvasDimensions, boundingBoxDimensions, shouldLockBoundingBox } = - inpainting; + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => { + const { stageDimensions, boundingBoxDimensions, shouldLockBoundingBox } = + currentCanvas; return { - canvasDimensions, + stageDimensions, boundingBoxDimensions, shouldLockBoundingBox, }; @@ -38,17 +33,18 @@ const boundingBoxDimensionsSelector = createSelector( type BoundingBoxDimensionSlidersType = { dimension: 'width' | 'height'; + label: string; }; export default function BoundingBoxDimensionSlider( props: BoundingBoxDimensionSlidersType ) { - const { dimension } = props; + const { dimension, label } = props; const dispatch = useAppDispatch(); - const { shouldLockBoundingBox, canvasDimensions, boundingBoxDimensions } = + const { shouldLockBoundingBox, stageDimensions, boundingBoxDimensions } = useAppSelector(boundingBoxDimensionsSelector); - const canvasDimension = canvasDimensions[dimension]; + const canvasDimension = stageDimensions[dimension]; const boundingBoxDimension = boundingBoxDimensions[dimension]; const handleBoundingBoxDimension = (v: number) => { @@ -91,38 +87,22 @@ export default function BoundingBoxDimensionSlider( }; return ( -
- - - } - styleClass="inpainting-bounding-box-reset-icon-btn" - isDisabled={ - shouldLockBoundingBox || canvasDimension === boundingBoxDimension - } - /> -
+ ); } diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx index adea1f3f54..ba90b02abb 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx @@ -1,16 +1,20 @@ import React from 'react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAICheckbox from 'common/components/IAICheckbox'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAICheckbox from '../../../../../common/components/IAICheckbox'; -import { setShouldLockBoundingBox } from '../../../../tabs/Inpainting/inpaintingSlice'; + currentCanvasSelector, + GenericCanvasState, + setShouldLockBoundingBox, +} from 'features/canvas/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; + +const boundingBoxLockSelector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => currentCanvas.shouldLockBoundingBox +); export default function BoundingBoxLock() { - const shouldLockBoundingBox = useAppSelector( - (state: RootState) => state.inpainting.shouldLockBoundingBox - ); + const shouldLockBoundingBox = useAppSelector(boundingBoxLockSelector); const dispatch = useAppDispatch(); const handleChangeShouldLockBoundingBox = () => { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss index 5eef7cc47d..b9fd319458 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss @@ -11,15 +11,15 @@ flex-direction: row; justify-content: space-between; padding: 0.5rem 1rem; - border-radius: 0.4rem 0.4rem 0 0; + border-radius: 0.3rem 0.3rem 0 0; align-items: center; button { - width: 0.5rem !important; - height: 1.2rem !important; - background: none !important; + width: 0.5rem; + height: 1.2rem; + background: none; &:hover { - background: none !important; + background: none; } } @@ -35,9 +35,9 @@ row-gap: 1rem; .inpainting-bounding-box-reset-icon-btn { - background-color: var(--btn-load-more) !important; + background-color: var(--btn-base-color); &:hover { - background-color: var(--btn-load-more-hover) !important; + background-color: var(--btn-base-color-hover); } } } diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx index 5038823d85..018d16cca1 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx @@ -12,8 +12,8 @@ const BoundingBoxSettings = () => {
- - + + diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx index ef0a76d166..b6b5a1b5de 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx @@ -1,17 +1,21 @@ import React from 'react'; import { BiHide, BiShow } from 'react-icons/bi'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAIIconButton from '../../../../../common/components/IAIIconButton'; -import { setShouldShowBoundingBox } from '../../../../tabs/Inpainting/inpaintingSlice'; + currentCanvasSelector, + GenericCanvasState, + setShouldShowBoundingBox, +} from 'features/canvas/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; + +const boundingBoxVisibilitySelector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => currentCanvas.shouldShowBoundingBox +); export default function BoundingBoxVisibility() { - const shouldShowBoundingBox = useAppSelector( - (state: RootState) => state.inpainting.shouldShowBoundingBox - ); + const shouldShowBoundingBox = useAppSelector(boundingBoxVisibilitySelector); const dispatch = useAppDispatch(); const handleShowBoundingBox = () => diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx index fd47f50196..4f8307b367 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx @@ -1,24 +1,24 @@ import { useToast } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIButton from 'common/components/IAIButton'; import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIButton from '../../../../common/components/IAIButton'; -import { - InpaintingState, + currentCanvasSelector, + InpaintingCanvasState, + OutpaintingCanvasState, setClearBrushHistory, -} from '../../../tabs/Inpainting/inpaintingSlice'; +} from 'features/canvas/canvasSlice'; import _ from 'lodash'; const clearBrushHistorySelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { pastLines, futureLines } = inpainting; + currentCanvasSelector, + (currentCanvas) => { + const { pastObjects, futureObjects } = currentCanvas as + | InpaintingCanvasState + | OutpaintingCanvasState; return { mayClearBrushHistory: - futureLines.length > 0 || pastLines.length > 0 ? false : true, + futureObjects.length > 0 || pastObjects.length > 0 ? false : true, }; }, { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx index 5333f7b8ab..837ce8d470 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx @@ -4,20 +4,22 @@ import { useAppDispatch, useAppSelector, } from '../../../../app/store'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; +import IAISwitch from '../../../../common/components/IAISwitch'; +import IAISlider from '../../../../common/components/IAISlider'; +import { Flex } from '@chakra-ui/react'; import { - InpaintingState, + currentCanvasSelector, + GenericCanvasState, setInpaintReplace, setShouldUseInpaintReplace, -} from '../../../tabs/Inpainting/inpaintingSlice'; -import IAISwitch from '../../../../common/components/IAISwitch'; +} from 'features/canvas/canvasSlice'; -const inpaintReplaceSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { inpaintReplace, shouldUseInpaintReplace } = inpainting; +const canvasInpaintReplaceSelector = createSelector( + currentCanvasSelector, + (currentCanvas: GenericCanvasState) => { + const { inpaintReplace, shouldUseInpaintReplace } = currentCanvas; return { inpaintReplace, shouldUseInpaintReplace, @@ -32,32 +34,29 @@ const inpaintReplaceSelector = createSelector( export default function InpaintReplace() { const { inpaintReplace, shouldUseInpaintReplace } = useAppSelector( - inpaintReplaceSelector + canvasInpaintReplaceSelector ); const dispatch = useAppDispatch(); return ( -
- + { dispatch(setInpaintReplace(v)); }} + min={0} + max={1.0} + step={0.05} + isInteger={false} + isSliderDisabled={!shouldUseInpaintReplace} + withSliderMarks + sliderMarkRightOffset={-2} + withReset + handleReset={() => dispatch(setInpaintReplace(1))} + isResetDisabled={!shouldUseInpaintReplace} /> -
+
); } diff --git a/frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx b/frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx index fc5606d027..4b65907b4d 100644 --- a/frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx +++ b/frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx @@ -4,9 +4,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setHiresFix } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setHiresFix } from 'features/options/optionsSlice'; /** * Hires Fix Toggle diff --git a/frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx b/frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx index df15292870..7b477844e7 100644 --- a/frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx +++ b/frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx @@ -4,9 +4,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setSeamless } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setSeamless } from 'features/options/optionsSlice'; /** * Seamless tiling toggle diff --git a/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx b/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx index 4b3df41305..c0049335d3 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx +++ b/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx @@ -3,9 +3,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import { setPerlin } from '../../optionsSlice'; +} from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { setPerlin } from 'features/options/optionsSlice'; export default function Perlin() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx b/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx index 904d82dcc2..d812d165d3 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx +++ b/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx @@ -4,9 +4,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setShouldRandomizeSeed } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setShouldRandomizeSeed } from 'features/options/optionsSlice'; export default function RandomizeSeed() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx b/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx index 3fc33012cc..46599c7188 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx +++ b/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from '../../../../app/constants'; +import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import { setSeed } from '../../optionsSlice'; +} from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { setSeed } from 'features/options/optionsSlice'; export default function Seed() { const seed = useAppSelector((state: RootState) => state.options.seed); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx b/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx index d2b235ddd0..a95562bc5c 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx +++ b/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx @@ -1,13 +1,9 @@ import { Button } from '@chakra-ui/react'; import React from 'react'; -import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from '../../../../app/constants'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import randomInt from '../../../../common/util/randomInt'; -import { setSeed } from '../../optionsSlice'; +import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import randomInt from 'common/util/randomInt'; +import { setSeed } from 'features/options/optionsSlice'; export default function ShuffleSeed() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx b/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx index 1b0f0e106e..a80b5497da 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx +++ b/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx @@ -3,9 +3,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import { setThreshold } from '../../optionsSlice'; +} from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { setThreshold } from 'features/options/optionsSlice'; export default function Threshold() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx b/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx index 4bb0347f04..10d37800b4 100644 --- a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx +++ b/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx @@ -4,9 +4,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setShouldRunESRGAN } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setShouldRunESRGAN } from 'features/options/optionsSlice'; export default function UpscaleHeader() { const isESRGANAvailable = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx b/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx index 482f773aa0..e95c367e95 100644 --- a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx +++ b/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx @@ -1,20 +1,20 @@ -import { RootState } from '../../../../app/store'; -import { useAppDispatch, useAppSelector } from '../../../../app/store'; +import { RootState } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { setUpscalingLevel, setUpscalingStrength, UpscalingLevel, OptionsState, -} from '../../optionsSlice'; +} from 'features/options/optionsSlice'; -import { UPSCALING_LEVELS } from '../../../../app/constants'; +import { UPSCALING_LEVELS } from 'app/constants'; import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { SystemState } from '../../../system/systemSlice'; +import { SystemState } from 'features/system/systemSlice'; import { ChangeEvent } from 'react'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import IAISelect from '../../../../common/components/IAISelect'; +import IAINumberInput from 'common/components/IAINumberInput'; +import IAISelect from 'common/components/IAISelect'; const optionsSelector = createSelector( (state: RootState) => state.options, diff --git a/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx b/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx index f17685b0a9..8d9d0fb522 100644 --- a/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx +++ b/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx @@ -3,9 +3,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import { setShouldGenerateVariations } from '../../optionsSlice'; +} from 'app/store'; +import IAISwitch from 'common/components/IAISwitch'; +import { setShouldGenerateVariations } from 'features/options/optionsSlice'; export default function GenerateVariations() { const shouldGenerateVariations = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx b/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx index 10e7d754b4..627b5458ee 100644 --- a/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx +++ b/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx @@ -3,10 +3,10 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAIInput from '../../../../common/components/IAIInput'; -import { validateSeedWeights } from '../../../../common/util/seedWeightPairs'; -import { setSeedWeights } from '../../optionsSlice'; +} from 'app/store'; +import IAIInput from 'common/components/IAIInput'; +import { validateSeedWeights } from 'common/util/seedWeightPairs'; +import { setSeedWeights } from 'features/options/optionsSlice'; export default function SeedWeights() { const seedWeights = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx b/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx index 24fc81bb3e..9114aaeb64 100644 --- a/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx +++ b/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx @@ -3,9 +3,9 @@ import { RootState, useAppDispatch, useAppSelector, -} from '../../../../app/store'; -import IAINumberInput from '../../../../common/components/IAINumberInput'; -import { setVariationAmount } from '../../optionsSlice'; +} from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { setVariationAmount } from 'features/options/optionsSlice'; export default function VariationAmount() { const variationAmount = useAppSelector( diff --git a/frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx b/frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx index b8b580856e..aa88af0382 100644 --- a/frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx +++ b/frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx @@ -1,7 +1,7 @@ import React, { ChangeEvent } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAICheckbox from '../../../common/components/IAICheckbox'; -import { setShowAdvancedOptions } from '../optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAICheckbox from 'common/components/IAICheckbox'; +import { setShowAdvancedOptions } from 'features/options/optionsSlice'; export default function MainAdvancedOptionsCheckbox() { const showAdvancedOptions = useAppSelector( diff --git a/frontend/src/features/options/MainOptions/MainCFGScale.tsx b/frontend/src/features/options/MainOptions/MainCFGScale.tsx index 07395c9fb6..3a4b753b91 100644 --- a/frontend/src/features/options/MainOptions/MainCFGScale.tsx +++ b/frontend/src/features/options/MainOptions/MainCFGScale.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAINumberInput from '../../../common/components/IAINumberInput'; -import { setCfgScale } from '../optionsSlice'; -import { fontSize, inputWidth } from './MainOptions'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { setCfgScale } from 'features/options/optionsSlice'; +import { inputWidth } from './MainOptions'; export default function MainCFGScale() { const dispatch = useAppDispatch(); @@ -19,7 +19,6 @@ export default function MainCFGScale() { onChange={handleChangeCfgScale} value={cfgScale} width={inputWidth} - fontSize={fontSize} styleClass="main-option-block" textAlign="center" isInteger={false} diff --git a/frontend/src/features/options/MainOptions/MainHeight.tsx b/frontend/src/features/options/MainOptions/MainHeight.tsx index 78285f7944..61ba0eb25c 100644 --- a/frontend/src/features/options/MainOptions/MainHeight.tsx +++ b/frontend/src/features/options/MainOptions/MainHeight.tsx @@ -1,10 +1,9 @@ import React, { ChangeEvent } from 'react'; -import { HEIGHTS } from '../../../app/constants'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAISelect from '../../../common/components/IAISelect'; -import { activeTabNameSelector } from '../optionsSelectors'; -import { setHeight } from '../optionsSlice'; -import { fontSize } from './MainOptions'; +import { HEIGHTS } from 'app/constants'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { setHeight } from 'features/options/optionsSlice'; export default function MainHeight() { const height = useAppSelector((state: RootState) => state.options.height); @@ -22,7 +21,6 @@ export default function MainHeight() { flexGrow={1} onChange={handleChangeHeight} validValues={HEIGHTS} - fontSize={fontSize} styleClass="main-option-block" /> ); diff --git a/frontend/src/features/options/MainOptions/MainIterations.tsx b/frontend/src/features/options/MainOptions/MainIterations.tsx index e244e02f05..10986f994e 100644 --- a/frontend/src/features/options/MainOptions/MainIterations.tsx +++ b/frontend/src/features/options/MainOptions/MainIterations.tsx @@ -1,11 +1,11 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import React from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAINumberInput from '../../../common/components/IAINumberInput'; -import { mayGenerateMultipleImagesSelector } from '../optionsSelectors'; -import { OptionsState, setIterations } from '../optionsSlice'; -import { fontSize, inputWidth } from './MainOptions'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { mayGenerateMultipleImagesSelector } from 'features/options/optionsSelectors'; +import { OptionsState, setIterations } from 'features/options/optionsSlice'; +import { inputWidth } from './MainOptions'; const mainIterationsSelector = createSelector( [(state: RootState) => state.options, mayGenerateMultipleImagesSelector], @@ -42,7 +42,7 @@ export default function MainIterations() { onChange={handleChangeIterations} value={iterations} width={inputWidth} - fontSize={fontSize} + labelFontSize={0.5} styleClass="main-option-block" textAlign="center" /> diff --git a/frontend/src/features/options/MainOptions/MainOptions.scss b/frontend/src/features/options/MainOptions/MainOptions.scss index b9854397a5..40423a112c 100644 --- a/frontend/src/features/options/MainOptions/MainOptions.scss +++ b/frontend/src/features/options/MainOptions/MainOptions.scss @@ -13,7 +13,7 @@ .main-options-row { display: grid; grid-template-columns: repeat(3, auto); - column-gap: 1rem; + column-gap: 0.5rem; max-width: $options-bar-max-width; } @@ -21,27 +21,22 @@ border-radius: 0.5rem; display: grid !important; grid-template-columns: auto !important; - row-gap: 0.4rem; + row-gap: 0.5rem; .invokeai__number-input-form-label, .invokeai__select-label { - width: 100%; - font-size: 0.9rem !important; font-weight: bold; + font-size: 0.9rem !important; } - .number-input-entry { - padding: 0; - height: 2.4rem; - } - - .iai-select-picker { - height: 2.4rem; - border-radius: 0.3rem; + .invokeai__select-label { + margin: 0; } } .advanced-options-checkbox { - padding: 1rem; + background-color: var(--background-color-secondary); + padding: 0.5rem 1rem; + border-radius: 0.4rem; font-weight: bold; } diff --git a/frontend/src/features/options/MainOptions/MainOptions.tsx b/frontend/src/features/options/MainOptions/MainOptions.tsx index 092cdea50d..15b92652ec 100644 --- a/frontend/src/features/options/MainOptions/MainOptions.tsx +++ b/frontend/src/features/options/MainOptions/MainOptions.tsx @@ -5,7 +5,6 @@ import MainSampler from './MainSampler'; import MainSteps from './MainSteps'; import MainWidth from './MainWidth'; -export const fontSize = '0.9rem'; export const inputWidth = 'auto'; export default function MainOptions() { diff --git a/frontend/src/features/options/MainOptions/MainSampler.tsx b/frontend/src/features/options/MainOptions/MainSampler.tsx index c6b0ae7dd3..992207aa6e 100644 --- a/frontend/src/features/options/MainOptions/MainSampler.tsx +++ b/frontend/src/features/options/MainOptions/MainSampler.tsx @@ -1,9 +1,8 @@ import React, { ChangeEvent } from 'react'; -import { SAMPLERS } from '../../../app/constants'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAISelect from '../../../common/components/IAISelect'; -import { setSampler } from '../optionsSlice'; -import { fontSize } from './MainOptions'; +import { SAMPLERS } from 'app/constants'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; +import { setSampler } from 'features/options/optionsSlice'; export default function MainSampler() { const sampler = useAppSelector((state: RootState) => state.options.sampler); @@ -18,7 +17,6 @@ export default function MainSampler() { value={sampler} onChange={handleChangeSampler} validValues={SAMPLERS} - fontSize={fontSize} styleClass="main-option-block" /> ); diff --git a/frontend/src/features/options/MainOptions/MainSteps.tsx b/frontend/src/features/options/MainOptions/MainSteps.tsx index 20670fc208..16be24a087 100644 --- a/frontend/src/features/options/MainOptions/MainSteps.tsx +++ b/frontend/src/features/options/MainOptions/MainSteps.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAINumberInput from '../../../common/components/IAINumberInput'; -import { setSteps } from '../optionsSlice'; -import { fontSize, inputWidth } from './MainOptions'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAINumberInput from 'common/components/IAINumberInput'; +import { setSteps } from 'features/options/optionsSlice'; +import { inputWidth } from './MainOptions'; export default function MainSteps() { const dispatch = useAppDispatch(); @@ -19,7 +19,6 @@ export default function MainSteps() { onChange={handleChangeSteps} value={steps} width={inputWidth} - fontSize={fontSize} styleClass="main-option-block" textAlign="center" /> diff --git a/frontend/src/features/options/MainOptions/MainWidth.tsx b/frontend/src/features/options/MainOptions/MainWidth.tsx index 69841f3954..779b1cb1ac 100644 --- a/frontend/src/features/options/MainOptions/MainWidth.tsx +++ b/frontend/src/features/options/MainOptions/MainWidth.tsx @@ -1,10 +1,9 @@ import React, { ChangeEvent } from 'react'; -import { WIDTHS } from '../../../app/constants'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAISelect from '../../../common/components/IAISelect'; -import { activeTabNameSelector } from '../optionsSelectors'; -import { setWidth } from '../optionsSlice'; -import { fontSize } from './MainOptions'; +import { WIDTHS } from 'app/constants'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { setWidth } from 'features/options/optionsSlice'; export default function MainWidth() { const width = useAppSelector((state: RootState) => state.options.width); @@ -23,7 +22,6 @@ export default function MainWidth() { flexGrow={1} onChange={handleChangeWidth} validValues={WIDTHS} - fontSize={fontSize} styleClass="main-option-block" /> ); diff --git a/frontend/src/features/options/OptionsAccordion.tsx b/frontend/src/features/options/OptionsAccordion.tsx index 9971d017a0..c3c1d68162 100644 --- a/frontend/src/features/options/OptionsAccordion.tsx +++ b/frontend/src/features/options/OptionsAccordion.tsx @@ -1,6 +1,6 @@ import { Accordion, ExpandedIndex } from '@chakra-ui/react'; -import { RootState, useAppDispatch, useAppSelector } from '../../app/store'; -import { setOpenAccordions } from '../system/systemSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { setOpenAccordions } from 'features/system/systemSlice'; import InvokeAccordionItem, { InvokeAccordionItemProps, } from './AccordionItems/InvokeAccordionItem'; diff --git a/frontend/src/features/options/ProcessButtons/CancelButton.tsx b/frontend/src/features/options/ProcessButtons/CancelButton.tsx index 7034a0338f..bd77ccd973 100644 --- a/frontend/src/features/options/ProcessButtons/CancelButton.tsx +++ b/frontend/src/features/options/ProcessButtons/CancelButton.tsx @@ -1,12 +1,12 @@ import { MdCancel } from 'react-icons/md'; -import { cancelProcessing } from '../../../app/socketio/actions'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; +import { cancelProcessing } from 'app/socketio/actions'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton, { IAIIconButtonProps, -} from '../../../common/components/IAIIconButton'; +} from 'common/components/IAIIconButton'; import { useHotkeys } from 'react-hotkeys-hook'; import { createSelector } from '@reduxjs/toolkit'; -import { SystemState } from '../../system/systemSlice'; +import { SystemState } from 'features/system/systemSlice'; import _ from 'lodash'; const cancelButtonSelector = createSelector( diff --git a/frontend/src/features/options/ProcessButtons/InvokeButton.tsx b/frontend/src/features/options/ProcessButtons/InvokeButton.tsx index e9a61002b4..793aa3fded 100644 --- a/frontend/src/features/options/ProcessButtons/InvokeButton.tsx +++ b/frontend/src/features/options/ProcessButtons/InvokeButton.tsx @@ -1,17 +1,15 @@ import { ListItem, UnorderedList } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; import { FaPlay } from 'react-icons/fa'; -import { readinessSelector } from '../../../app/selectors/readinessSelector'; -import { generateImage } from '../../../app/socketio/actions'; -import { useAppDispatch, useAppSelector } from '../../../app/store'; -import IAIButton, { - IAIButtonProps, -} from '../../../common/components/IAIButton'; +import { readinessSelector } from 'app/selectors/readinessSelector'; +import { generateImage } from 'app/socketio/actions'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIButton, { IAIButtonProps } from 'common/components/IAIButton'; import IAIIconButton, { IAIIconButtonProps, -} from '../../../common/components/IAIIconButton'; -import IAIPopover from '../../../common/components/IAIPopover'; -import { activeTabNameSelector } from '../optionsSelectors'; +} from 'common/components/IAIIconButton'; +import IAIPopover from 'common/components/IAIPopover'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; interface InvokeButton extends Omit { @@ -29,7 +27,7 @@ export default function InvokeButton(props: InvokeButton) { }; useHotkeys( - 'ctrl+enter, cmd+enter', + ['ctrl+enter', 'meta+enter'], () => { if (isReady) { dispatch(generateImage(activeTabName)); @@ -47,7 +45,7 @@ export default function InvokeButton(props: InvokeButton) { icon={} isDisabled={!isReady} onClick={handleClickGenerate} - className="invoke-btn invoke" + className="invoke-btn" tooltip="Invoke" tooltipProps={{ placement: 'bottom' }} {...rest} @@ -80,20 +78,4 @@ export default function InvokeButton(props: InvokeButton) { )} ); - - // return isReady ? ( - // buttonComponent - // ) : ( - // - // {reasonsWhyNotReady ? ( - // - // {reasonsWhyNotReady.map((reason, i) => ( - // {reason} - // ))} - // - // ) : ( - // 'test' - // )} - // - // ); } diff --git a/frontend/src/features/options/ProcessButtons/Loopback.tsx b/frontend/src/features/options/ProcessButtons/Loopback.tsx index 6d360f4f25..77eb5530f6 100644 --- a/frontend/src/features/options/ProcessButtons/Loopback.tsx +++ b/frontend/src/features/options/ProcessButtons/Loopback.tsx @@ -1,8 +1,8 @@ import { createSelector } from '@reduxjs/toolkit'; import { FaRecycle } from 'react-icons/fa'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import IAIIconButton from '../../../common/components/IAIIconButton'; -import { OptionsState, setShouldLoopback } from '../optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { OptionsState, setShouldLoopback } from 'features/options/optionsSlice'; const loopbackSelector = createSelector( (state: RootState) => state.options, diff --git a/frontend/src/features/options/ProcessButtons/ProcessButtons.scss b/frontend/src/features/options/ProcessButtons/ProcessButtons.scss index 0c107e0865..3b39cb55aa 100644 --- a/frontend/src/features/options/ProcessButtons/ProcessButtons.scss +++ b/frontend/src/features/options/ProcessButtons/ProcessButtons.scss @@ -8,14 +8,11 @@ .invoke-btn { flex-grow: 1; width: 100%; - svg { - width: 18px !important; - height: 18px !important; - } + @include Button( $btn-color: var(--accent-color), $btn-color-hover: var(--accent-color-hover), - // $btn-width: 5rem + $icon-size: 16px ); } @@ -23,19 +20,19 @@ @include Button( $btn-color: var(--destructive-color), $btn-color-hover: var(--destructive-color-hover), - // $btn-width: 3rem + $btn-width: 3rem ); } .loopback-btn { &[data-as-checkbox='true'] { - background-color: var(--btn-grey); - border: 3px solid var(--btn-grey); + background-color: var(--btn-btn-base-color); + border: 3px solid var(--btn-btn-base-color); svg { fill: var(--text-color); } &:hover { - background-color: var(--btn-grey); + background-color: var(--btn-btn-base-color); border-color: var(--btn-checkbox-border-hover); svg { fill: var(--text-color); @@ -43,13 +40,13 @@ } &[data-selected='true'] { border-color: var(--accent-color); - background-color: var(--btn-grey); + background-color: var(--btn-btn-base-color); svg { fill: var(--text-color); } &:hover { border-color: var(--accent-color); - background-color: var(--btn-grey); + background-color: var(--btn-btn-base-color); svg { fill: var(--text-color); } diff --git a/frontend/src/features/options/PromptInput/PromptInput.tsx b/frontend/src/features/options/PromptInput/PromptInput.tsx index 035d085013..165a82d651 100644 --- a/frontend/src/features/options/PromptInput/PromptInput.tsx +++ b/frontend/src/features/options/PromptInput/PromptInput.tsx @@ -1,14 +1,14 @@ import { FormControl, Textarea } from '@chakra-ui/react'; import { ChangeEvent, KeyboardEvent, useRef } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import { generateImage } from '../../../app/socketio/actions'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { generateImage } from 'app/socketio/actions'; -import { OptionsState, setPrompt } from '../optionsSlice'; +import { OptionsState, setPrompt } from 'features/options/optionsSlice'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; -import { activeTabNameSelector } from '../optionsSelectors'; -import { readinessSelector } from '../../../app/selectors/readinessSelector'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { readinessSelector } from 'app/selectors/readinessSelector'; const promptInputSelector = createSelector( [(state: RootState) => state.options, activeTabNameSelector], diff --git a/frontend/src/features/options/optionsSelectors.ts b/frontend/src/features/options/optionsSelectors.ts index 6a1f31c850..c02512e34f 100644 --- a/frontend/src/features/options/optionsSelectors.ts +++ b/frontend/src/features/options/optionsSelectors.ts @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; -import { RootState } from '../../app/store'; -import { tabMap } from '../tabs/InvokeTabs'; +import { RootState } from 'app/store'; +import { tabMap } from 'features/tabs/InvokeTabs'; import { OptionsState } from './optionsSlice'; export const activeTabNameSelector = createSelector( diff --git a/frontend/src/features/options/optionsSlice.ts b/frontend/src/features/options/optionsSlice.ts index 64f40a0307..1b6d3f63d9 100644 --- a/frontend/src/features/options/optionsSlice.ts +++ b/frontend/src/features/options/optionsSlice.ts @@ -1,10 +1,10 @@ import { createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; -import * as InvokeAI from '../../app/invokeai'; -import promptToString from '../../common/util/promptToString'; -import { seedWeightsToString } from '../../common/util/seedWeightPairs'; -import { FACETOOL_TYPES } from '../../app/constants'; -import { InvokeTabName, tabMap } from '../tabs/InvokeTabs'; +import * as InvokeAI from 'app/invokeai'; +import promptToString from 'common/util/promptToString'; +import { seedWeightsToString } from 'common/util/seedWeightPairs'; +import { FACETOOL_TYPES } from 'app/constants'; +import { InvokeTabName, tabMap } from 'features/tabs/InvokeTabs'; export type UpscalingLevel = 2 | 4; @@ -47,6 +47,8 @@ export interface OptionsState { optionsPanelScrollPosition: number; shouldHoldOptionsPanelOpen: boolean; shouldLoopback: boolean; + currentTheme: string; + isLightBoxOpen: boolean; } const initialOptionsState: OptionsState = { @@ -85,6 +87,8 @@ const initialOptionsState: OptionsState = { optionsPanelScrollPosition: 0, shouldHoldOptionsPanelOpen: false, shouldLoopback: false, + currentTheme: 'dark', + isLightBoxOpen: false, }; const initialState: OptionsState = initialOptionsState; @@ -349,6 +353,12 @@ export const optionsSlice = createSlice({ setShouldLoopback: (state, action: PayloadAction) => { state.shouldLoopback = action.payload; }, + setCurrentTheme: (state, action: PayloadAction) => { + state.currentTheme = action.payload; + }, + setIsLightBoxOpen: (state, action: PayloadAction) => { + state.isLightBoxOpen = action.payload; + }, }, }); @@ -396,6 +406,8 @@ export const { setOptionsPanelScrollPosition, setShouldHoldOptionsPanelOpen, setShouldLoopback, + setCurrentTheme, + setIsLightBoxOpen, } = optionsSlice.actions; export default optionsSlice.reducer; diff --git a/frontend/src/features/system/Console.scss b/frontend/src/features/system/Console.scss index 0246e33ca3..e043d58d51 100644 --- a/frontend/src/features/system/Console.scss +++ b/frontend/src/features/system/Console.scss @@ -37,39 +37,39 @@ } .console-toggle-icon-button { - background: var(--console-icon-button-bg-color) !important; - position: fixed !important; + background: var(--console-icon-button-bg-color); + position: fixed; left: 0.5rem; bottom: 0.5rem; z-index: 10000; &:hover { - background: var(--console-icon-button-bg-color-hover) !important; + background: var(--console-icon-button-bg-color-hover); } &[data-error-seen='true'] { - background: var(--status-bad-color) !important; + background: var(--status-bad-color); &:hover { - background: var(--status-bad-color) !important; + background: var(--status-bad-color); } } } .console-autoscroll-icon-button { - background: var(--console-icon-button-bg-color) !important; - position: fixed !important; + background: var(--console-icon-button-bg-color); + position: fixed; left: 0.5rem; bottom: 3rem; z-index: 10000; &:hover { - background: var(--console-icon-button-bg-color-hover) !important; + background: var(--console-icon-button-bg-color-hover); } &[data-autoscroll-enabled='true'] { - background: var(--accent-color) !important; + background: var(--accent-color); &:hover { - background: var(--accent-color-hover) !important; + background: var(--accent-color-hover); } } } diff --git a/frontend/src/features/system/Console.tsx b/frontend/src/features/system/Console.tsx index 2916d740f4..ed5867437d 100644 --- a/frontend/src/features/system/Console.tsx +++ b/frontend/src/features/system/Console.tsx @@ -1,6 +1,6 @@ import { IconButton, Tooltip } from '@chakra-ui/react'; -import { useAppDispatch, useAppSelector } from '../../app/store'; -import { RootState } from '../../app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { RootState } from 'app/store'; import { errorSeen, setShouldShowLogViewer, SystemState } from './systemSlice'; import { useLayoutEffect, useRef, useState } from 'react'; import { FaAngleDoubleDown, FaCode, FaMinus } from 'react-icons/fa'; diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.scss b/frontend/src/features/system/HotkeysModal/HotkeysModal.scss index 0a216b5c4b..5dd544a68e 100644 --- a/frontend/src/features/system/HotkeysModal/HotkeysModal.scss +++ b/frontend/src/features/system/HotkeysModal/HotkeysModal.scss @@ -1,11 +1,10 @@ @use '../../../styles/Mixins/' as *; .hotkeys-modal { - width: 36rem !important; - max-width: 36rem !important; + width: 36rem; + max-width: 36rem; display: grid; padding: 1rem; - background-color: var(--settings-modal-bg) !important; row-gap: 1rem; font-family: Inter; @@ -42,7 +41,7 @@ } button { - border-radius: 0.3rem !important; + border-radius: 0.3rem; &[aria-expanded='true'] { background-color: var(--tab-hover-color); @@ -81,7 +80,7 @@ .hotkey-key { font-size: 0.8rem; font-weight: bold; - border: 2px solid var(--settings-modal-bg); + background-color: var(--background-color-light); padding: 0.2rem 0.5rem; border-radius: 0.3rem; } diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx index 0c36f5fda9..90f83f569f 100644 --- a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx @@ -49,21 +49,27 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Pin the options panel', hotkey: 'Shift+O', }, + { + title: 'Toggle Viewer', + desc: 'Open and close Image Viewer', + hotkey: 'V', + }, { title: 'Toggle Gallery', desc: 'Open and close the gallery drawer', hotkey: 'G', }, + { + title: 'Maximize Workspace', + desc: 'Close panels and maximize work area', + hotkey: 'F', + }, { title: 'Change Tabs', desc: 'Switch to another workspace', hotkey: '1-6', }, - { - title: 'Theme Toggle', - desc: 'Switch between dark and light modes', - hotkey: 'Shift+D', - }, + { title: 'Console Toggle', desc: 'Open and close console', @@ -200,12 +206,17 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { { title: 'Lock Bounding Box', desc: 'Locks the bounding box', - hotkey: 'Shift+Q', + hotkey: 'Shift+W', + }, + { + title: 'Show/Hide Bounding Box', + desc: 'Toggle visibility of bounding box', + hotkey: 'Shift+H', }, { title: 'Quick Toggle Lock Bounding Box', desc: 'Hold to toggle locking the bounding box', - hotkey: 'Q', + hotkey: 'W', }, { title: 'Expand Inpainting Area', @@ -214,6 +225,14 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { }, ]; + const outpaintingHotkeys = [ + { + title: 'Erase Canvas', + desc: 'Erase the images on the canvas', + hotkey: 'Shift+E', + }, + ]; + const renderHotkeyModalItems = (hotkeys: HotkeyList[]) => { const hotkeyModalItemsToRender: ReactElement[] = []; @@ -240,8 +259,8 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { })} - - + +

Keyboard Shorcuts

@@ -285,6 +304,16 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { {renderHotkeyModalItems(inpaintingHotkeys)} + + + +

Outpainting Hotkeys

+ +
+ + {renderHotkeyModalItems(outpaintingHotkeys)} + +
diff --git a/frontend/src/features/system/Modal.scss b/frontend/src/features/system/Modal.scss new file mode 100644 index 0000000000..7ba1233fb3 --- /dev/null +++ b/frontend/src/features/system/Modal.scss @@ -0,0 +1,10 @@ +@use '../../styles/Mixins/' as *; + +.modal { + background-color: var(--background-color-secondary); + color: var(--text-color); +} + +.modal-close-btn { + @include BaseButton; +} diff --git a/frontend/src/features/system/ProgressBar.scss b/frontend/src/features/system/ProgressBar.scss index dcbcec98b5..9f60d5b8fc 100644 --- a/frontend/src/features/system/ProgressBar.scss +++ b/frontend/src/features/system/ProgressBar.scss @@ -2,7 +2,7 @@ .progress-bar { background-color: var(--root-bg-color); - height: $progress-bar-thickness !important; + height: $progress-bar-thickness; z-index: 99; div { diff --git a/frontend/src/features/system/ProgressBar.tsx b/frontend/src/features/system/ProgressBar.tsx index 9cbfcb8c5d..fa1d61f81b 100644 --- a/frontend/src/features/system/ProgressBar.tsx +++ b/frontend/src/features/system/ProgressBar.tsx @@ -1,9 +1,9 @@ import { Progress } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { useAppSelector } from '../../app/store'; -import { RootState } from '../../app/store'; -import { SystemState } from '../system/systemSlice'; +import { useAppSelector } from 'app/store'; +import { RootState } from 'app/store'; +import { SystemState } from 'features/system/systemSlice'; const systemSelector = createSelector( (state: RootState) => state.system, diff --git a/frontend/src/features/system/SettingsModal/ModelList.scss b/frontend/src/features/system/SettingsModal/ModelList.scss index f7951b0c7e..47e2d593c3 100644 --- a/frontend/src/features/system/SettingsModal/ModelList.scss +++ b/frontend/src/features/system/SettingsModal/ModelList.scss @@ -8,7 +8,7 @@ // } // button { -// border-radius: 0.3rem !important; +// border-radius: 0.3rem; // &[aria-expanded='true'] { // // background-color: var(--tab-hover-color); @@ -29,7 +29,7 @@ } div { - border: none !important; + border: none; } .model-list-button { @@ -79,6 +79,13 @@ .model-list-item-load-btn { button { padding: 0.5rem; + background-color: var(--btn-base-color); + color: var(--text-color); + border-radius: 0.2rem; + + &:hover { + background-color: var(--btn-base-color-hover); + } } } } diff --git a/frontend/src/features/system/SettingsModal/ModelList.tsx b/frontend/src/features/system/SettingsModal/ModelList.tsx index 66fc5129de..0feab08db8 100644 --- a/frontend/src/features/system/SettingsModal/ModelList.tsx +++ b/frontend/src/features/system/SettingsModal/ModelList.tsx @@ -10,10 +10,10 @@ import { } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; -import { ModelStatus } from '../../../app/invokeai'; -import { requestModelChange } from '../../../app/socketio/actions'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import { SystemState } from '../systemSlice'; +import { ModelStatus } from 'app/invokeai'; +import { requestModelChange } from 'app/socketio/actions'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { SystemState } from 'features/system/systemSlice'; type ModelListItemProps = { name: string; diff --git a/frontend/src/features/system/SettingsModal/SettingsModal.scss b/frontend/src/features/system/SettingsModal/SettingsModal.scss index 27adb3025e..689fcd22e5 100644 --- a/frontend/src/features/system/SettingsModal/SettingsModal.scss +++ b/frontend/src/features/system/SettingsModal/SettingsModal.scss @@ -1,7 +1,6 @@ @use '../../../styles/Mixins/' as *; .settings-modal { - background-color: var(--settings-modal-bg) !important; max-height: 36rem; font-family: Inter; diff --git a/frontend/src/features/system/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/SettingsModal/SettingsModal.tsx index 835f3fe296..174a5cca1b 100644 --- a/frontend/src/features/system/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/SettingsModal/SettingsModal.tsx @@ -15,21 +15,22 @@ import { import { createSelector } from '@reduxjs/toolkit'; import _, { isEqual } from 'lodash'; import { ChangeEvent, cloneElement, ReactElement } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import { persistor } from '../../../main'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { persistor } from 'main'; import { InProgressImageType, + setEnableImageDebugging, setSaveIntermediatesInterval, setShouldConfirmOnDelete, setShouldDisplayGuides, setShouldDisplayInProgressType, SystemState, -} from '../systemSlice'; +} from 'features/system/systemSlice'; import ModelList from './ModelList'; -import { IN_PROGRESS_IMAGE_TYPES } from '../../../app/constants'; -import IAISwitch from '../../../common/components/IAISwitch'; -import IAISelect from '../../../common/components/IAISelect'; -import IAINumberInput from '../../../common/components/IAINumberInput'; +import { IN_PROGRESS_IMAGE_TYPES } from 'app/constants'; +import IAISwitch from 'common/components/IAISwitch'; +import IAISelect from 'common/components/IAISelect'; +import IAINumberInput from 'common/components/IAINumberInput'; const systemSelector = createSelector( (state: RootState) => state.system, @@ -39,12 +40,16 @@ const systemSelector = createSelector( shouldConfirmOnDelete, shouldDisplayGuides, model_list, + saveIntermediatesInterval, + enableImageDebugging, } = system; return { shouldDisplayInProgressType, shouldConfirmOnDelete, shouldDisplayGuides, models: _.map(model_list, (_model, key) => key), + saveIntermediatesInterval, + enableImageDebugging, }; }, { @@ -66,10 +71,6 @@ type SettingsModalProps = { const SettingsModal = ({ children }: SettingsModalProps) => { const dispatch = useAppDispatch(); - const saveIntermediatesInterval = useAppSelector( - (state: RootState) => state.system.saveIntermediatesInterval - ); - const steps = useAppSelector((state: RootState) => state.options.steps); const { @@ -88,6 +89,8 @@ const SettingsModal = ({ children }: SettingsModalProps) => { shouldDisplayInProgressType, shouldConfirmOnDelete, shouldDisplayGuides, + saveIntermediatesInterval, + enableImageDebugging, } = useAppSelector(systemSelector); /** @@ -115,9 +118,9 @@ const SettingsModal = ({ children }: SettingsModalProps) => { - + Settings - +
@@ -170,6 +173,18 @@ const SettingsModal = ({ children }: SettingsModalProps) => { />
+
+

Developer

+ ) => + dispatch(setEnableImageDebugging(e.target.checked)) + } + /> +
+
Reset Web UI + diff --git a/frontend/src/features/system/SiteHeader.scss b/frontend/src/features/system/SiteHeader.scss index f9b40912c0..3c4d267ae5 100644 --- a/frontend/src/features/system/SiteHeader.scss +++ b/frontend/src/features/system/SiteHeader.scss @@ -24,3 +24,14 @@ align-items: center; column-gap: 0.5rem; } + +.theme-changer-dropdown { + .invokeai__select-picker { + background-color: var(--background-color-light) !important; + font-size: 0.9rem; + &:focus { + border: none !important; + box-shadow: none !important; + } + } +} diff --git a/frontend/src/features/system/SiteHeader.tsx b/frontend/src/features/system/SiteHeader.tsx index 86e916ed3f..b93306fd49 100644 --- a/frontend/src/features/system/SiteHeader.tsx +++ b/frontend/src/features/system/SiteHeader.tsx @@ -1,10 +1,6 @@ -import { Link, useColorMode } from '@chakra-ui/react'; - -import { useHotkeys } from 'react-hotkeys-hook'; +import { Link } from '@chakra-ui/react'; import { - FaSun, - FaMoon, FaGithub, FaDiscord, FaBug, @@ -12,28 +8,19 @@ import { FaWrench, } from 'react-icons/fa'; -import InvokeAILogo from '../../assets/images/logo.png'; -import IAIIconButton from '../../common/components/IAIIconButton'; +import InvokeAILogo from 'assets/images/logo.png'; +import IAIIconButton from 'common/components/IAIIconButton'; import HotkeysModal from './HotkeysModal/HotkeysModal'; import SettingsModal from './SettingsModal/SettingsModal'; import StatusIndicator from './StatusIndicator'; +import ThemeChanger from './ThemeChanger'; /** * Header, includes color mode toggle, settings button, status message. */ const SiteHeader = () => { - const { colorMode, toggleColorMode } = useColorMode(); - - useHotkeys( - 'shift+d', - () => { - toggleColorMode(); - }, - [colorMode, toggleColorMode] - ); - return (
@@ -58,16 +45,7 @@ const SiteHeader = () => { /> - : } - /> + state.options.currentTheme + ); + + const themeChangeHandler = (e: ChangeEvent) => { + setColorMode(e.target.value); + dispatch(setCurrentTheme(e.target.value)); + }; + + return ( + + ); +} diff --git a/frontend/src/features/system/systemSlice.ts b/frontend/src/features/system/systemSlice.ts index 76ecf82e48..3b1feb9e61 100644 --- a/frontend/src/features/system/systemSlice.ts +++ b/frontend/src/features/system/systemSlice.ts @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; import { ExpandedIndex } from '@chakra-ui/react'; -import * as InvokeAI from '../../app/invokeai'; +import * as InvokeAI from 'app/invokeai'; export type LogLevel = 'info' | 'warning' | 'error'; @@ -44,6 +44,7 @@ export interface SystemState wasErrorSeen: boolean; isCancelable: boolean; saveIntermediatesInterval: number; + enableImageDebugging: boolean; } const initialSystemState: SystemState = { @@ -74,6 +75,7 @@ const initialSystemState: SystemState = { wasErrorSeen: true, isCancelable: true, saveIntermediatesInterval: 5, + enableImageDebugging: false, }; export const systemSlice = createSlice({ @@ -191,6 +193,9 @@ export const systemSlice = createSlice({ setSaveIntermediatesInterval: (state, action: PayloadAction) => { state.saveIntermediatesInterval = action.payload; }, + setEnableImageDebugging: (state, action: PayloadAction) => { + state.enableImageDebugging = action.payload; + }, }, }); @@ -214,6 +219,7 @@ export const { setIsCancelable, modelChangeRequested, setSaveIntermediatesInterval, + setEnableImageDebugging, } = systemSlice.actions; export default systemSlice.reducer; diff --git a/frontend/src/features/tabs/FloatingButton.scss b/frontend/src/features/tabs/FloatingButton.scss index 7e39d884f3..c985ead031 100644 --- a/frontend/src/features/tabs/FloatingButton.scss +++ b/frontend/src/features/tabs/FloatingButton.scss @@ -1,41 +1,42 @@ @use '../../styles/Mixins/' as *; .floating-show-hide-button { - position: absolute !important; + position: absolute; top: 50%; transform: translate(0, -50%); z-index: 20; padding: 0; + background-color: red !important; &.left { left: 0; - border-radius: 0 0.5rem 0.5rem 0 !important; + border-radius: 0 0.5rem 0.5rem 0; } &.right { right: 0; - border-radius: 0.5rem 0 0 0.5rem !important; + border-radius: 0.5rem 0 0 0.5rem; } @include Button( - $btn-width: 1rem, + $btn-width: 2rem, $btn-height: 12rem, $icon-size: 20px, - $btn-color: var(--btn-grey), - $btn-color-hover: var(--btn-grey-hover) + $btn-color: var(--btn-btn-base-color), + $btn-color-hover: var(--btn-btn-base-color-hover) ); } .show-hide-button-options { - position: absolute !important; + position: absolute; transform: translate(0, -50%); z-index: 20; - min-width: 2rem !important; + min-width: 2rem; top: 50%; left: calc(42px + 2rem); - border-radius: 0 0.5rem 0.5rem 0 !important; + border-radius: 0 0.5rem 0.5rem 0; display: flex; flex-direction: column; @@ -43,10 +44,9 @@ button { border-radius: 0 0.3rem 0.3rem 0; - background-color: var(--btn-grey); - - svg { - width: 18px; - } } } + +.show-hide-button-gallery { + background-color: var(--background-color) !important; +} diff --git a/frontend/src/features/tabs/FloatingGalleryButton.tsx b/frontend/src/features/tabs/FloatingGalleryButton.tsx index 0f17e2271a..3c714d60d7 100644 --- a/frontend/src/features/tabs/FloatingGalleryButton.tsx +++ b/frontend/src/features/tabs/FloatingGalleryButton.tsx @@ -1,13 +1,20 @@ import { MdPhotoLibrary } from 'react-icons/md'; -import { useAppDispatch } from '../../app/store'; -import IAIIconButton from '../../common/components/IAIIconButton'; -import { setShouldShowGallery } from '../gallery/gallerySlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { setShouldShowGallery } from 'features/gallery/gallerySlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; const FloatingGalleryButton = () => { const dispatch = useAppDispatch(); + const shouldPinGallery = useAppSelector( + (state: RootState) => state.gallery.shouldPinGallery + ); const handleShowGallery = () => { dispatch(setShouldShowGallery(true)); + if (shouldPinGallery) { + dispatch(setDoesCanvasNeedScaling(true)); + } }; return ( @@ -15,8 +22,8 @@ const FloatingGalleryButton = () => { tooltip="Show Gallery (G)" tooltipProps={{ placement: 'top' }} aria-label="Show Gallery" - styleClass="floating-show-hide-button right" - onMouseOver={handleShowGallery} + styleClass="floating-show-hide-button right show-hide-button-gallery" + onClick={handleShowGallery} > diff --git a/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx b/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx index 82ae0c4bca..4834c3309b 100644 --- a/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx +++ b/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx @@ -1,15 +1,16 @@ import { createSelector } from '@reduxjs/toolkit'; import { IoMdOptions } from 'react-icons/io'; -import { RootState, useAppDispatch, useAppSelector } from '../../app/store'; -import IAIIconButton from '../../common/components/IAIIconButton'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAIIconButton from 'common/components/IAIIconButton'; import { OptionsState, setShouldShowOptionsPanel, -} from '../options/optionsSlice'; -import CancelButton from '../options/ProcessButtons/CancelButton'; -import InvokeButton from '../options/ProcessButtons/InvokeButton'; +} from 'features/options/optionsSlice'; +import CancelButton from 'features/options/ProcessButtons/CancelButton'; +import InvokeButton from 'features/options/ProcessButtons/InvokeButton'; import _ from 'lodash'; -import LoopbackButton from '../options/ProcessButtons/Loopback'; +import LoopbackButton from 'features/options/ProcessButtons/Loopback'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; const canInvokeSelector = createSelector( (state: RootState) => state.options, @@ -17,6 +18,7 @@ const canInvokeSelector = createSelector( (options: OptionsState) => { const { shouldPinOptionsPanel, shouldShowOptionsPanel } = options; return { + shouldPinOptionsPanel, shouldShowProcessButtons: !shouldPinOptionsPanel || !shouldShowOptionsPanel, }; @@ -26,10 +28,14 @@ const canInvokeSelector = createSelector( const FloatingOptionsPanelButtons = () => { const dispatch = useAppDispatch(); - const { shouldShowProcessButtons } = useAppSelector(canInvokeSelector); + const { shouldShowProcessButtons, shouldPinOptionsPanel } = + useAppSelector(canInvokeSelector); const handleShowOptionsPanel = () => { dispatch(setShouldShowOptionsPanel(true)); + if (shouldPinOptionsPanel) { + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); + } }; return ( diff --git a/frontend/src/features/tabs/ImageToImage/ImageToImage.scss b/frontend/src/features/tabs/ImageToImage/ImageToImage.scss index ecc488f3d3..29850f2a3c 100644 --- a/frontend/src/features/tabs/ImageToImage/ImageToImage.scss +++ b/frontend/src/features/tabs/ImageToImage/ImageToImage.scss @@ -9,11 +9,12 @@ } .image-to-image-strength-main-option { - display: grid; - grid-template-columns: none !important; + display: flex; + row-gap: 0.5rem !important; - .number-input-entry { - padding: 0 1rem; + .invokeai__slider-component-label { + color: var(--text-color-secondary); + font-size: 0.9rem !important; } } diff --git a/frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx b/frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx index aa217069aa..9a986e0feb 100644 --- a/frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx +++ b/frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx @@ -1,6 +1,6 @@ -import { RootState, useAppSelector } from '../../../app/store'; -import ImageUploadButton from '../../../common/components/ImageUploaderButton'; -import CurrentImageDisplay from '../../gallery/CurrentImageDisplay'; +import { RootState, useAppSelector } from 'app/store'; +import ImageUploadButton from 'common/components/ImageUploaderButton'; +import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; import InitImagePreview from './InitImagePreview'; const ImageToImageDisplay = () => { diff --git a/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx b/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx index d6e0b3b08e..65117d1972 100644 --- a/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx +++ b/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx @@ -1,23 +1,23 @@ -import { Feature } from '../../../app/features'; -import { RootState, useAppSelector } from '../../../app/store'; -import FaceRestoreHeader from '../../options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from '../../options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import ImageFit from '../../options/AdvancedOptions/ImageToImage/ImageFit'; -import ImageToImageStrength from '../../options/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import OutputHeader from '../../options/AdvancedOptions/Output/OutputHeader'; -import OutputOptions from '../../options/AdvancedOptions/Output/OutputOptions'; -import SeedHeader from '../../options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from '../../options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from '../../options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from '../../options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from '../../options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from '../../options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from '../../options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from '../../options/MainOptions/MainOptions'; -import OptionsAccordion from '../../options/OptionsAccordion'; -import ProcessButtons from '../../options/ProcessButtons/ProcessButtons'; -import PromptInput from '../../options/PromptInput/PromptInput'; -import InvokeOptionsPanel from '../InvokeOptionsPanel'; +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import ImageFit from 'features/options/AdvancedOptions/ImageToImage/ImageFit'; +import ImageToImageStrength from 'features/options/AdvancedOptions/ImageToImage/ImageToImageStrength'; +import OutputHeader from 'features/options/AdvancedOptions/Output/OutputHeader'; +import OutputOptions from 'features/options/AdvancedOptions/Output/OutputOptions'; +import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/OptionsAccordion'; +import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; export default function ImageToImagePanel() { const showAdvancedOptions = useAppSelector( diff --git a/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx b/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx index 5b2b8b4eb1..7a79f5f7ee 100644 --- a/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx +++ b/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx @@ -1,8 +1,8 @@ import { Image, useToast } from '@chakra-ui/react'; import { SyntheticEvent } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import ImageUploaderIconButton from '../../../common/components/ImageUploaderIconButton'; -import { clearInitialImage } from '../../options/optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; +import { clearInitialImage } from 'features/options/optionsSlice'; export default function InitImagePreview() { const initialImage = useAppSelector( diff --git a/frontend/src/features/tabs/ImageToImage/InitialImageOverlay.tsx b/frontend/src/features/tabs/ImageToImage/InitialImageOverlay.tsx index 0c342821cf..90f4f64709 100644 --- a/frontend/src/features/tabs/ImageToImage/InitialImageOverlay.tsx +++ b/frontend/src/features/tabs/ImageToImage/InitialImageOverlay.tsx @@ -1,6 +1,6 @@ import { Image } from '@chakra-ui/react'; import React from 'react'; -import { RootState, useAppSelector } from '../../../app/store'; +import { RootState, useAppSelector } from 'app/store'; export default function InitialImageOverlay() { const initialImage = useAppSelector( diff --git a/frontend/src/features/tabs/ImageToImage/index.tsx b/frontend/src/features/tabs/ImageToImage/index.tsx index 5363c95f06..1a6e496089 100644 --- a/frontend/src/features/tabs/ImageToImage/index.tsx +++ b/frontend/src/features/tabs/ImageToImage/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import ImageToImagePanel from './ImageToImagePanel'; import ImageToImageDisplay from './ImageToImageDisplay'; -import InvokeWorkarea from '../InvokeWorkarea'; +import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; export default function ImageToImageWorkarea() { return ( diff --git a/frontend/src/features/tabs/Inpainting/InpaintingCanvas.tsx b/frontend/src/features/tabs/Inpainting/InpaintingCanvas.tsx deleted file mode 100644 index ee3c4c7d26..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingCanvas.tsx +++ /dev/null @@ -1,309 +0,0 @@ -// lib -import { - MutableRefObject, - useCallback, - useEffect, - useRef, - useState, -} from 'react'; -import Konva from 'konva'; -import { Layer, Stage } from 'react-konva'; -import { Image as KonvaImage } from 'react-konva'; -import { Stage as StageType } from 'konva/lib/Stage'; - -// app -import { useAppDispatch, useAppSelector } from '../../../app/store'; -import { - addLine, - addPointToCurrentLine, - clearImageToInpaint, - setCursorPosition, - setIsDrawing, -} from './inpaintingSlice'; -import { inpaintingCanvasSelector } from './inpaintingSliceSelectors'; - -// component -import InpaintingCanvasLines from './components/InpaintingCanvasLines'; -import InpaintingCanvasBrushPreview from './components/InpaintingCanvasBrushPreview'; -import InpaintingCanvasBrushPreviewOutline from './components/InpaintingCanvasBrushPreviewOutline'; -import Cacher from './components/Cacher'; -import { Vector2d } from 'konva/lib/types'; -import getScaledCursorPosition from './util/getScaledCursorPosition'; -import InpaintingBoundingBoxPreview, { - InpaintingBoundingBoxPreviewOverlay, -} from './components/InpaintingBoundingBoxPreview'; -import { KonvaEventObject } from 'konva/lib/Node'; -import KeyboardEventManager from './KeyboardEventManager'; -import { useToast } from '@chakra-ui/react'; - -// Use a closure allow other components to use these things... not ideal... -export let stageRef: MutableRefObject; -export let maskLayerRef: MutableRefObject; -export let inpaintingImageElementRef: MutableRefObject; - -const InpaintingCanvas = () => { - const dispatch = useAppDispatch(); - - const { - tool, - brushSize, - shouldInvertMask, - shouldShowMask, - shouldShowCheckboardTransparency, - maskColor, - imageToInpaint, - stageScale, - shouldShowBoundingBox, - shouldShowBoundingBoxFill, - isDrawing, - isModifyingBoundingBox, - stageCursor, - } = useAppSelector(inpaintingCanvasSelector); - - const toast = useToast(); - - // set the closure'd refs - stageRef = useRef(null); - maskLayerRef = useRef(null); - inpaintingImageElementRef = useRef(null); - - const lastCursorPosition = useRef({ x: 0, y: 0 }); - - // Use refs for values that do not affect rendering, other values in redux - const didMouseMoveRef = useRef(false); - - // Load the image into this - const [canvasBgImage, setCanvasBgImage] = useState( - null - ); - - // Load the image and set the options panel width & height - useEffect(() => { - if (imageToInpaint) { - const image = new Image(); - image.onload = () => { - inpaintingImageElementRef.current = image; - setCanvasBgImage(image); - }; - image.onerror = () => { - toast({ - title: 'Unable to Load Image', - description: `Image ${imageToInpaint.url} failed to load`, - status: 'error', - isClosable: true, - }); - dispatch(clearImageToInpaint()); - }; - image.src = imageToInpaint.url; - } else { - setCanvasBgImage(null); - } - }, [imageToInpaint, dispatch, stageScale, toast]); - - /** - * - * Canvas onMouseDown - * - */ - const handleMouseDown = useCallback(() => { - if (!stageRef.current) return; - - const scaledCursorPosition = getScaledCursorPosition(stageRef.current); - - if ( - !scaledCursorPosition || - !maskLayerRef.current || - isModifyingBoundingBox - ) - return; - - dispatch(setIsDrawing(true)); - - // Add a new line starting from the current cursor position. - dispatch( - addLine({ - tool, - strokeWidth: brushSize / 2, - points: [scaledCursorPosition.x, scaledCursorPosition.y], - }) - ); - }, [dispatch, brushSize, tool, isModifyingBoundingBox]); - - /** - * - * Canvas onMouseMove - * - */ - const handleMouseMove = useCallback(() => { - if (!stageRef.current) return; - - const scaledCursorPosition = getScaledCursorPosition(stageRef.current); - - if (!scaledCursorPosition) return; - - dispatch(setCursorPosition(scaledCursorPosition)); - - if (!maskLayerRef.current) { - return; - } - - lastCursorPosition.current = scaledCursorPosition; - - if (!isDrawing || isModifyingBoundingBox) return; - - didMouseMoveRef.current = true; - // Extend the current line - dispatch( - addPointToCurrentLine([scaledCursorPosition.x, scaledCursorPosition.y]) - ); - }, [dispatch, isDrawing, isModifyingBoundingBox]); - - /** - * - * Canvas onMouseUp - * - */ - const handleMouseUp = useCallback(() => { - if (!didMouseMoveRef.current && isDrawing && stageRef.current) { - const scaledCursorPosition = getScaledCursorPosition(stageRef.current); - - if ( - !scaledCursorPosition || - !maskLayerRef.current || - isModifyingBoundingBox - ) - return; - - /** - * Extend the current line. - * In this case, the mouse didn't move, so we append the same point to - * the line's existing points. This allows the line to render as a circle - * centered on that point. - */ - dispatch( - addPointToCurrentLine([scaledCursorPosition.x, scaledCursorPosition.y]) - ); - } else { - didMouseMoveRef.current = false; - } - dispatch(setIsDrawing(false)); - }, [dispatch, isDrawing, isModifyingBoundingBox]); - - /** - * - * Canvas onMouseOut - * - */ - const handleMouseOutCanvas = useCallback(() => { - dispatch(setCursorPosition(null)); - dispatch(setIsDrawing(false)); - }, [dispatch]); - - /** - * - * Canvas onMouseEnter - * - */ - const handleMouseEnter = useCallback( - (e: KonvaEventObject) => { - if (e.evt.buttons === 1) { - if (!stageRef.current) return; - - const scaledCursorPosition = getScaledCursorPosition(stageRef.current); - - if ( - !scaledCursorPosition || - !maskLayerRef.current || - isModifyingBoundingBox - ) - return; - - dispatch(setIsDrawing(true)); - - // Add a new line starting from the current cursor position. - dispatch( - addLine({ - tool, - strokeWidth: brushSize / 2, - points: [scaledCursorPosition.x, scaledCursorPosition.y], - }) - ); - } - }, - [dispatch, brushSize, tool, isModifyingBoundingBox] - ); - - return ( -
-
- {canvasBgImage && ( - - {!shouldInvertMask && !shouldShowCheckboardTransparency && ( - - - - )} - {shouldShowMask && ( - <> - - - - - - {shouldInvertMask && ( - - )} - {!shouldInvertMask && shouldShowCheckboardTransparency && ( - - )} - - - {shouldShowBoundingBoxFill && shouldShowBoundingBox && ( - - )} - {shouldShowBoundingBox && } - - - - - )} - - )} - - -
-
- ); -}; - -export default InpaintingCanvas; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingCanvasPlaceholder.tsx b/frontend/src/features/tabs/Inpainting/InpaintingCanvasPlaceholder.tsx deleted file mode 100644 index a0c893e57f..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingCanvasPlaceholder.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Spinner } from '@chakra-ui/react'; -import { useLayoutEffect, useRef } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import { setStageScale } from './inpaintingSlice'; - -const InpaintingCanvasPlaceholder = () => { - const dispatch = useAppDispatch(); - const { needsCache, imageToInpaint } = useAppSelector( - (state: RootState) => state.inpainting - ); - const ref = useRef(null); - - useLayoutEffect(() => { - window.setTimeout(() => { - if (!ref.current || !imageToInpaint) return; - - const width = ref.current.clientWidth; - const height = ref.current.clientHeight; - - const scale = Math.min( - 1, - Math.min(width / imageToInpaint.width, height / imageToInpaint.height) - ); - - dispatch(setStageScale(scale)); - }, 0); - }, [dispatch, imageToInpaint, needsCache]); - - return ( -
- -
- ); -}; - -export default InpaintingCanvasPlaceholder; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss b/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss deleted file mode 100644 index dc57eea117..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss +++ /dev/null @@ -1,29 +0,0 @@ -.inpainting-alerts { - position: absolute; - top: 0; - left: 0; - z-index: 2; - margin: 0.5rem; - - button { - background-color: var(--inpainting-alerts-bg); - - svg { - fill: var(--inpainting-alerts-icon-color); - } - - &[data-selected='true'] { - background-color: var(--inpainting-alerts-bg-active); - svg { - fill: var(--inpainting-alerts-icon-active); - } - } - - &[data-alert='true'] { - background-color: var(--inpainting-alerts-bg-alert); - svg { - fill: var(--inpainting-alerts-icon-alert); - } - } - } -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx b/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx deleted file mode 100644 index 68b5360252..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import _ from 'lodash'; - -const inpaintingCanvasStatusIconsSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { - shouldShowMask, - shouldInvertMask, - shouldLockBoundingBox, - shouldShowBoundingBox, - boundingBoxDimensions, - } = inpainting; - - return { - shouldShowMask, - shouldInvertMask, - shouldLockBoundingBox, - shouldShowBoundingBox, - isBoundingBoxTooSmall: - boundingBoxDimensions.width < 512 || boundingBoxDimensions.height < 512, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -import { ButtonGroup, IconButton, Tooltip } from '@chakra-ui/react'; -import { createSelector } from '@reduxjs/toolkit'; -import { BiHide, BiShow } from 'react-icons/bi'; -import { GiResize } from 'react-icons/gi'; -import { BsBoundingBox } from 'react-icons/bs'; -import { FaLock, FaUnlock } from 'react-icons/fa'; -import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md'; -import { RootState, useAppSelector } from '../../../app/store'; -import { InpaintingState } from './inpaintingSlice'; -import { MouseEvent, useRef, useState } from 'react'; - -const InpaintingCanvasStatusIcons = () => { - const { - shouldShowMask, - shouldInvertMask, - shouldLockBoundingBox, - shouldShowBoundingBox, - isBoundingBoxTooSmall, - } = useAppSelector(inpaintingCanvasStatusIconsSelector); - - const [shouldAcceptPointerEvents, setShouldAcceptPointerEvents] = - useState(false); - const timeoutRef = useRef(0); - - const handleMouseOver = () => { - if (!shouldAcceptPointerEvents) { - timeoutRef.current = window.setTimeout( - () => setShouldAcceptPointerEvents(true), - 1000 - ); - } - }; - - const handleMouseOut = () => { - if (!shouldAcceptPointerEvents) { - setShouldAcceptPointerEvents(false); - window.clearTimeout(timeoutRef.current); - } - }; - - return ( -
- - - : } - /> - - : } - /> - : } - /> - } - /> - } - /> - -
- ); -}; - -export default InpaintingCanvasStatusIcons; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx deleted file mode 100644 index 67e09e445c..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import InpaintingBrushControl from './InpaintingControls/InpaintingBrushControl'; -import InpaintingEraserControl from './InpaintingControls/InpaintingEraserControl'; -import InpaintingUndoControl from './InpaintingControls/InpaintingUndoControl'; -import InpaintingRedoControl from './InpaintingControls/InpaintingRedoControl'; -import { ButtonGroup } from '@chakra-ui/react'; -import InpaintingMaskClear from './InpaintingControls/InpaintingMaskControls/InpaintingMaskClear'; -import InpaintingMaskVisibilityControl from './InpaintingControls/InpaintingMaskControls/InpaintingMaskVisibilityControl'; -import InpaintingMaskInvertControl from './InpaintingControls/InpaintingMaskControls/InpaintingMaskInvertControl'; -import InpaintingLockBoundingBoxControl from './InpaintingControls/InpaintingLockBoundingBoxControl'; -import InpaintingShowHideBoundingBoxControl from './InpaintingControls/InpaintingShowHideBoundingBoxControl'; -import ImageUploaderIconButton from '../../../common/components/ImageUploaderIconButton'; - -const InpaintingControls = () => { - return ( -
- - - - - - - - - - - - - - - - - - - - -
- ); -}; - -export default InpaintingControls; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingEraserControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingEraserControl.tsx deleted file mode 100644 index ce98017fe3..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingEraserControl.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import React from 'react'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { FaEraser } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { InpaintingState, setTool } from '../inpaintingSlice'; - -import _ from 'lodash'; -import { activeTabNameSelector } from '../../../options/optionsSelectors'; - -const inpaintingEraserSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { tool, shouldShowMask } = inpainting; - - return { - tool, - shouldShowMask, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function InpaintingEraserControl() { - const { tool, shouldShowMask, activeTabName } = useAppSelector( - inpaintingEraserSelector - ); - const dispatch = useAppDispatch(); - - const handleSelectEraserTool = () => dispatch(setTool('eraser')); - - // Hotkeys - // Set tool to eraser - useHotkeys( - 'e', - (e: KeyboardEvent) => { - e.preventDefault(); - if (activeTabName !== 'inpainting' || !shouldShowMask) return; - handleSelectEraserTool(); - }, - { - enabled: activeTabName === 'inpainting' && shouldShowMask, - }, - [activeTabName, shouldShowMask] - ); - - return ( - } - onClick={handleSelectEraserTool} - data-selected={tool === 'eraser'} - isDisabled={!shouldShowMask} - /> - ); -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingLockBoundingBoxControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingLockBoundingBoxControl.tsx deleted file mode 100644 index 15710be39a..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingLockBoundingBoxControl.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FaLock, FaUnlock } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { setShouldLockBoundingBox } from '../inpaintingSlice'; - -const InpaintingLockBoundingBoxControl = () => { - const dispatch = useAppDispatch(); - const shouldLockBoundingBox = useAppSelector( - (state: RootState) => state.inpainting.shouldLockBoundingBox - ); - - return ( - : } - data-selected={shouldLockBoundingBox} - onClick={() => { - dispatch(setShouldLockBoundingBox(!shouldLockBoundingBox)); - }} - /> - ); -}; - -export default InpaintingLockBoundingBoxControl; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControl.tsx deleted file mode 100644 index 1bd750dcaf..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControl.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React, { useState } from 'react'; -import { FaMask } from 'react-icons/fa'; - -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import IAIPopover from '../../../../common/components/IAIPopover'; - -import InpaintingMaskVisibilityControl from './InpaintingMaskControls/InpaintingMaskVisibilityControl'; -import InpaintingMaskInvertControl from './InpaintingMaskControls/InpaintingMaskInvertControl'; -import InpaintingMaskColorPicker from './InpaintingMaskControls/InpaintingMaskColorPicker'; - -export default function InpaintingMaskControl() { - const [maskOptionsOpen, setMaskOptionsOpen] = useState(false); - - return ( - <> - setMaskOptionsOpen(true)} - onClose={() => setMaskOptionsOpen(false)} - triggerComponent={ - } - cursor={'pointer'} - data-selected={maskOptionsOpen} - /> - } - > -
- - - -
-
- - ); -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskClear.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskClear.tsx deleted file mode 100644 index ea03f3cb6a..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskClear.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import React from 'react'; -import { FaPlus } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAIIconButton from '../../../../../common/components/IAIIconButton'; -import { activeTabNameSelector } from '../../../../options/optionsSelectors'; -import { clearMask, InpaintingState } from '../../inpaintingSlice'; - -import _ from 'lodash'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { useToast } from '@chakra-ui/react'; - -const inpaintingMaskClearSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { shouldShowMask, lines } = inpainting; - - return { shouldShowMask, activeTabName, isMaskEmpty: lines.length === 0 }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function InpaintingMaskClear() { - const { shouldShowMask, activeTabName, isMaskEmpty } = useAppSelector( - inpaintingMaskClearSelector - ); - - const dispatch = useAppDispatch(); - const toast = useToast(); - - const handleClearMask = () => { - dispatch(clearMask()); - }; - - // Clear mask - useHotkeys( - 'shift+c', - (e: KeyboardEvent) => { - e.preventDefault(); - handleClearMask(); - toast({ - title: 'Mask Cleared', - status: 'success', - duration: 2500, - isClosable: true, - }); - }, - { - enabled: activeTabName === 'inpainting' && shouldShowMask && !isMaskEmpty, - }, - [activeTabName, isMaskEmpty, shouldShowMask] - ); - return ( - } - onClick={handleClearMask} - isDisabled={isMaskEmpty || !shouldShowMask} - /> - ); -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskVisibilityControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskVisibilityControl.tsx deleted file mode 100644 index 82e66ea629..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingMaskControls/InpaintingMaskVisibilityControl.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { BiHide, BiShow } from 'react-icons/bi'; -import { createSelector } from 'reselect'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../../app/store'; -import IAIIconButton from '../../../../../common/components/IAIIconButton'; -import { activeTabNameSelector } from '../../../../options/optionsSelectors'; -import { InpaintingState, setShouldShowMask } from '../../inpaintingSlice'; - -import _ from 'lodash'; - -const inpaintingMaskVisibilitySelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { shouldShowMask } = inpainting; - - return { shouldShowMask, activeTabName }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function InpaintingMaskVisibilityControl() { - const dispatch = useAppDispatch(); - - const { shouldShowMask, activeTabName } = useAppSelector( - inpaintingMaskVisibilitySelector - ); - - const handleToggleShouldShowMask = () => - dispatch(setShouldShowMask(!shouldShowMask)); - // Hotkeys - // Show/hide mask - useHotkeys( - 'h', - (e: KeyboardEvent) => { - e.preventDefault(); - handleToggleShouldShowMask(); - }, - { - enabled: activeTabName === 'inpainting', - }, - [activeTabName, shouldShowMask] - ); - return ( - : } - onClick={handleToggleShouldShowMask} - /> - ); -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingRedoControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingRedoControl.tsx deleted file mode 100644 index c97ceb89bf..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingRedoControl.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import React from 'react'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { FaRedo } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { activeTabNameSelector } from '../../../options/optionsSelectors'; -import { InpaintingState, redo } from '../inpaintingSlice'; - -import _ from 'lodash'; - -const inpaintingRedoSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { futureLines, shouldShowMask } = inpainting; - - return { - canRedo: futureLines.length > 0, - shouldShowMask, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function InpaintingRedoControl() { - const dispatch = useAppDispatch(); - const { canRedo, shouldShowMask, activeTabName } = useAppSelector( - inpaintingRedoSelector - ); - - const handleRedo = () => dispatch(redo()); - - // Hotkeys - - // Redo - useHotkeys( - 'cmd+shift+z, control+shift+z, control+y, cmd+y', - (e: KeyboardEvent) => { - e.preventDefault(); - handleRedo(); - }, - { - enabled: activeTabName === 'inpainting' && shouldShowMask && canRedo, - }, - [activeTabName, shouldShowMask, canRedo] - ); - - return ( - } - onClick={handleRedo} - isDisabled={!canRedo || !shouldShowMask} - /> - ); -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingShowHideBoundingBoxControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingShowHideBoundingBoxControl.tsx deleted file mode 100644 index a91d83d864..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingShowHideBoundingBoxControl.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FaVectorSquare } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { setShouldShowBoundingBox } from '../inpaintingSlice'; - -const InpaintingShowHideBoundingBoxControl = () => { - const dispatch = useAppDispatch(); - const shouldShowBoundingBox = useAppSelector( - (state: RootState) => state.inpainting.shouldShowBoundingBox - ); - - return ( - } - data-alert={!shouldShowBoundingBox} - onClick={() => { - dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); - }} - /> - ); -}; - -export default InpaintingShowHideBoundingBoxControl; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingUndoControl.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingUndoControl.tsx deleted file mode 100644 index 4721487da6..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls/InpaintingUndoControl.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import React from 'react'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { FaUndo } from 'react-icons/fa'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; -import IAIIconButton from '../../../../common/components/IAIIconButton'; -import { InpaintingState, undo } from '../inpaintingSlice'; - -import _ from 'lodash'; -import { activeTabNameSelector } from '../../../options/optionsSelectors'; - -const inpaintingUndoSelector = createSelector( - [(state: RootState) => state.inpainting, activeTabNameSelector], - (inpainting: InpaintingState, activeTabName) => { - const { pastLines, shouldShowMask } = inpainting; - - return { - canUndo: pastLines.length > 0, - shouldShowMask, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function InpaintingUndoControl() { - const dispatch = useAppDispatch(); - - const { canUndo, shouldShowMask, activeTabName } = useAppSelector( - inpaintingUndoSelector - ); - - const handleUndo = () => dispatch(undo()); - - // Hotkeys - // Undo - useHotkeys( - 'cmd+z, control+z', - (e: KeyboardEvent) => { - e.preventDefault(); - handleUndo(); - }, - { - enabled: activeTabName === 'inpainting' && shouldShowMask && canUndo, - }, - [activeTabName, shouldShowMask, canUndo] - ); - - return ( - } - onClick={handleUndo} - isDisabled={!canUndo || !shouldShowMask} - /> - ); -} diff --git a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx index 3f58002721..77d39dc2c3 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx @@ -1,22 +1,29 @@ import { createSelector } from '@reduxjs/toolkit'; +// import IAICanvas from 'features/canvas/IAICanvas'; +import IAICanvasControls from 'features/canvas/IAICanvasControls'; +import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; import _ from 'lodash'; import { useLayoutEffect } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import ImageUploadButton from '../../../common/components/ImageUploaderButton'; -import CurrentImageDisplay from '../../gallery/CurrentImageDisplay'; -import { OptionsState } from '../../options/optionsSlice'; -import InpaintingCanvas from './InpaintingCanvas'; -import InpaintingCanvasPlaceholder from './InpaintingCanvasPlaceholder'; -import InpaintingControls from './InpaintingControls'; -import { InpaintingState, setNeedsCache } from './inpaintingSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import ImageUploadButton from 'common/components/ImageUploaderButton'; +import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; +import { OptionsState } from 'features/options/optionsSlice'; +import { + CanvasState, + setDoesCanvasNeedScaling, +} from 'features/canvas/canvasSlice'; +import IAICanvas from 'features/canvas/IAICanvas'; const inpaintingDisplaySelector = createSelector( - [(state: RootState) => state.inpainting, (state: RootState) => state.options], - (inpainting: InpaintingState, options: OptionsState) => { - const { needsCache, imageToInpaint } = inpainting; + [(state: RootState) => state.canvas, (state: RootState) => state.options], + (canvas: CanvasState, options: OptionsState) => { + const { + doesCanvasNeedScaling, + inpainting: { imageToInpaint }, + } = canvas; const { showDualDisplay } = options; return { - needsCache, + doesCanvasNeedScaling, showDualDisplay, imageToInpaint, }; @@ -30,21 +37,23 @@ const inpaintingDisplaySelector = createSelector( const InpaintingDisplay = () => { const dispatch = useAppDispatch(); - const { showDualDisplay, needsCache, imageToInpaint } = useAppSelector( - inpaintingDisplaySelector - ); + const { showDualDisplay, doesCanvasNeedScaling, imageToInpaint } = + useAppSelector(inpaintingDisplaySelector); useLayoutEffect(() => { - const resizeCallback = _.debounce(() => dispatch(setNeedsCache(true)), 250); + const resizeCallback = _.debounce( + () => dispatch(setDoesCanvasNeedScaling(true)), + 250 + ); window.addEventListener('resize', resizeCallback); return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); const inpaintingComponent = imageToInpaint ? (
- +
- {needsCache ? : } + {doesCanvasNeedScaling ? : }
) : ( @@ -57,7 +66,7 @@ const InpaintingDisplay = () => { showDualDisplay ? 'workarea-split-view' : 'workarea-single-view' } > -
{inpaintingComponent}
+
{inpaintingComponent}
{showDualDisplay && (
diff --git a/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx b/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx index 7bdc226dd5..fc2500428e 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx @@ -1,21 +1,22 @@ -import { Feature } from '../../../app/features'; -import { RootState, useAppSelector } from '../../../app/store'; -import FaceRestoreHeader from '../../options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from '../../options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import ImageToImageStrength from '../../options/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import InpaintingSettings from '../../options/AdvancedOptions/Inpainting/InpaintingSettings'; -import SeedHeader from '../../options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from '../../options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from '../../options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from '../../options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from '../../options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from '../../options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from '../../options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from '../../options/MainOptions/MainOptions'; -import OptionsAccordion from '../../options/OptionsAccordion'; -import ProcessButtons from '../../options/ProcessButtons/ProcessButtons'; -import PromptInput from '../../options/PromptInput/PromptInput'; -import InvokeOptionsPanel from '../InvokeOptionsPanel'; +// import { Feature } from 'app/features'; +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import ImageToImageStrength from 'features/options/AdvancedOptions/ImageToImage/ImageToImageStrength'; +import InpaintingSettings from 'features/options/AdvancedOptions/Inpainting/InpaintingSettings'; +import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/OptionsAccordion'; +import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; export default function InpaintingPanel() { const showAdvancedOptions = useAppSelector( @@ -56,9 +57,9 @@ export default function InpaintingPanel() { /> - {showAdvancedOptions ? ( + {showAdvancedOptions && ( - ) : null} + )} ); } diff --git a/frontend/src/features/tabs/Inpainting/Inpainting.scss b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss similarity index 94% rename from frontend/src/features/tabs/Inpainting/Inpainting.scss rename to frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss index de5871a080..dfc8c4244f 100644 --- a/frontend/src/features/tabs/Inpainting/Inpainting.scss +++ b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss @@ -30,7 +30,7 @@ } .inpainting-color-picker { - margin-left: 1rem !important; + margin-left: 1rem; } .inpainting-brush-options { @@ -70,6 +70,8 @@ .inpainting-canvas-stage { border-radius: 0.5rem; + border: 1px solid var(--border-color-light); + canvas { border-radius: 0.5rem; } diff --git a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx new file mode 100644 index 0000000000..b224d10b0a --- /dev/null +++ b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx @@ -0,0 +1,22 @@ +import InpaintingPanel from './InpaintingPanel'; +import InpaintingDisplay from './InpaintingDisplay'; +import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; +import { useAppDispatch } from 'app/store'; +import { useEffect } from 'react'; +import { setCurrentCanvas, setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; + +export default function InpaintingWorkarea() { + const dispatch = useAppDispatch(); + useEffect(() => { + dispatch(setCurrentCanvas('inpainting')); + dispatch(setDoesCanvasNeedScaling(true)); + }, [dispatch]); + return ( + } + styleClass="inpainting-workarea-overrides" + > + + + ); +} diff --git a/frontend/src/features/tabs/Inpainting/KeyboardEventManager.tsx b/frontend/src/features/tabs/Inpainting/KeyboardEventManager.tsx deleted file mode 100644 index a00b996847..0000000000 --- a/frontend/src/features/tabs/Inpainting/KeyboardEventManager.tsx +++ /dev/null @@ -1,143 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import _ from 'lodash'; -import { useEffect, useRef } from 'react'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { RootState, useAppDispatch, useAppSelector } from '../../../app/store'; -import { activeTabNameSelector } from '../../options/optionsSelectors'; -import { OptionsState } from '../../options/optionsSlice'; -import { - InpaintingState, - setIsSpacebarHeld, - setShouldLockBoundingBox, - toggleShouldLockBoundingBox, - toggleTool, -} from './inpaintingSlice'; - -const keyboardEventManagerSelector = createSelector( - [ - (state: RootState) => state.options, - (state: RootState) => state.inpainting, - activeTabNameSelector, - ], - (options: OptionsState, inpainting: InpaintingState, activeTabName) => { - const { - shouldShowMask, - cursorPosition, - shouldLockBoundingBox, - shouldShowBoundingBox, - } = inpainting; - return { - activeTabName, - shouldShowMask, - isCursorOnCanvas: Boolean(cursorPosition), - shouldLockBoundingBox, - shouldShowBoundingBox, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -const KeyboardEventManager = () => { - const dispatch = useAppDispatch(); - const { - shouldShowMask, - activeTabName, - isCursorOnCanvas, - shouldLockBoundingBox, - shouldShowBoundingBox, - } = useAppSelector(keyboardEventManagerSelector); - - const wasLastEventOverCanvas = useRef(false); - const lastEvent = useRef(null); - - // Toggle lock bounding box - useHotkeys( - 'shift+q', - (e: KeyboardEvent) => { - e.preventDefault(); - dispatch(toggleShouldLockBoundingBox()); - }, - { - enabled: activeTabName === 'inpainting' && shouldShowMask, - }, - [activeTabName, shouldShowMask] - ); - - // Manages hold-style keyboard shortcuts - useEffect(() => { - const listener = (e: KeyboardEvent) => { - if ( - !['x', 'q'].includes(e.key) || - activeTabName !== 'inpainting' || - !shouldShowMask - ) { - return; - } - - // cursor is NOT over canvas - if (!isCursorOnCanvas) { - if (!lastEvent.current) { - lastEvent.current = e; - } - - wasLastEventOverCanvas.current = false; - return; - } - e.stopPropagation(); - e.preventDefault(); - if (e.repeat) return; - // cursor is over canvas, we can preventDefault now - - // if this is the first event - if (!lastEvent.current) { - wasLastEventOverCanvas.current = true; - lastEvent.current = e; - } - - if (!wasLastEventOverCanvas.current && e.type === 'keyup') { - wasLastEventOverCanvas.current = true; - lastEvent.current = e; - return; - } - - switch (e.key) { - case 'x': { - dispatch(toggleTool()); - break; - } - case 'q': { - if (!shouldShowMask || !shouldShowBoundingBox) break; - dispatch(setIsSpacebarHeld(e.type === 'keydown')); - dispatch(setShouldLockBoundingBox(e.type !== 'keydown')); - break; - } - } - - lastEvent.current = e; - wasLastEventOverCanvas.current = true; - }; - - document.addEventListener('keydown', listener); - document.addEventListener('keyup', listener); - - return () => { - document.removeEventListener('keydown', listener); - document.removeEventListener('keyup', listener); - }; - }, [ - dispatch, - activeTabName, - shouldShowMask, - isCursorOnCanvas, - shouldLockBoundingBox, - shouldShowBoundingBox, - ]); - - return null; -}; - -export default KeyboardEventManager; diff --git a/frontend/src/features/tabs/Inpainting/components/Cacher.tsx b/frontend/src/features/tabs/Inpainting/components/Cacher.tsx deleted file mode 100644 index 7a6d96c3c9..0000000000 --- a/frontend/src/features/tabs/Inpainting/components/Cacher.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { useEffect, useLayoutEffect } from 'react'; -import { RootState, useAppSelector } from '../../../../app/store'; -import { maskLayerRef } from '../InpaintingCanvas'; - -/** - * Konva's cache() method basically rasterizes an object/canvas. - * This is needed to rasterize the mask, before setting the opacity. - * If we do not cache the maskLayer, the brush strokes will have opacity - * set individually. - * - * This logical component simply uses useLayoutEffect() to synchronously - * cache the mask layer every time something that changes how it should draw - * is changed. - */ -const Cacher = () => { - const { - tool, - lines, - cursorPosition, - brushSize, - canvasDimensions: { width, height }, - maskColor, - shouldInvertMask, - shouldShowMask, - shouldShowBrushPreview, - shouldShowCheckboardTransparency, - imageToInpaint, - shouldShowBrush, - shouldShowBoundingBoxFill, - shouldLockBoundingBox, - stageScale, - pastLines, - futureLines, - needsCache, - isDrawing, - isTransformingBoundingBox, - isMovingBoundingBox, - shouldShowBoundingBox, - } = useAppSelector((state: RootState) => state.inpainting); - - useLayoutEffect(() => { - if (!maskLayerRef.current) return; - maskLayerRef.current.cache({ - x: 0, - y: 0, - width, - height, - }); - }, [ - lines, - cursorPosition, - width, - height, - tool, - brushSize, - maskColor, - shouldInvertMask, - shouldShowMask, - shouldShowBrushPreview, - shouldShowCheckboardTransparency, - imageToInpaint, - shouldShowBrush, - shouldShowBoundingBoxFill, - shouldShowBoundingBox, - shouldLockBoundingBox, - stageScale, - pastLines, - futureLines, - needsCache, - isDrawing, - isTransformingBoundingBox, - isMovingBoundingBox, - ]); - - /** - * Hack to cache the mask layer after the canvas is ready. - */ - useEffect(() => { - const intervalId = window.setTimeout(() => { - if (!maskLayerRef.current) return; - maskLayerRef.current.cache({ - x: 0, - y: 0, - width, - height, - }); - }, 0); - - return () => { - window.clearTimeout(intervalId); - }; - }); - - return null; -}; - -export default Cacher; diff --git a/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreview.tsx b/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreview.tsx deleted file mode 100644 index 42beadd2b7..0000000000 --- a/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreview.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import _ from 'lodash'; -import { Circle } from 'react-konva'; -import { RootState, useAppSelector } from '../../../../app/store'; -import { InpaintingState } from '../inpaintingSlice'; -import { rgbaColorToRgbString } from '../util/colorToString'; - -const inpaintingCanvasBrushPreviewSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { - cursorPosition, - canvasDimensions: { width, height }, - brushSize, - maskColor, - tool, - shouldShowBrush, - isMovingBoundingBox, - isTransformingBoundingBox, - } = inpainting; - - return { - cursorPosition, - width, - height, - brushSize, - maskColorString: rgbaColorToRgbString(maskColor), - tool, - shouldShowBrush, - shouldDrawBrushPreview: - !( - isMovingBoundingBox || - isTransformingBoundingBox || - !cursorPosition - ) && shouldShowBrush, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -/** - * Draws a black circle around the canvas brush preview. - */ -const InpaintingCanvasBrushPreview = () => { - const { - cursorPosition, - width, - height, - brushSize, - maskColorString, - tool, - shouldDrawBrushPreview, - } = useAppSelector(inpaintingCanvasBrushPreviewSelector); - - if (!shouldDrawBrushPreview) return null; - - return ( - - ); -}; - -export default InpaintingCanvasBrushPreview; diff --git a/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreviewOutline.tsx b/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreviewOutline.tsx deleted file mode 100644 index 3a99d696ae..0000000000 --- a/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasBrushPreviewOutline.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import _ from 'lodash'; -import { Circle } from 'react-konva'; -import { RootState, useAppSelector } from '../../../../app/store'; -import { InpaintingState } from '../inpaintingSlice'; - -const inpaintingCanvasBrushPrevieOutlineSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { - cursorPosition, - canvasDimensions: { width, height }, - brushSize, - tool, - shouldShowBrush, - isMovingBoundingBox, - isTransformingBoundingBox, - stageScale, - } = inpainting; - - return { - cursorPosition, - width, - height, - brushSize, - tool, - strokeWidth: 1 / stageScale, // scale stroke thickness - radius: 1 / stageScale, // scale stroke thickness - shouldDrawBrushPreview: - !( - isMovingBoundingBox || - isTransformingBoundingBox || - !cursorPosition - ) && shouldShowBrush, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -/** - * Draws the canvas brush preview outline. - */ -const InpaintingCanvasBrushPreviewOutline = () => { - const { - cursorPosition, - width, - height, - brushSize, - shouldDrawBrushPreview, - strokeWidth, - radius, - } = useAppSelector(inpaintingCanvasBrushPrevieOutlineSelector); - - if (!shouldDrawBrushPreview) return null; - return ( - <> - - - - ); -}; -export default InpaintingCanvasBrushPreviewOutline; diff --git a/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasLines.tsx b/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasLines.tsx deleted file mode 100644 index d9cc41038d..0000000000 --- a/frontend/src/features/tabs/Inpainting/components/InpaintingCanvasLines.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Line } from 'react-konva'; -import { useAppSelector } from '../../../../app/store'; -import { inpaintingCanvasLinesSelector } from '../inpaintingSliceSelectors'; - -/** - * Draws the lines which comprise the mask. - * - * Uses globalCompositeOperation to handle the brush and eraser tools. - */ -const InpaintingCanvasLines = () => { - const { lines, maskColorString } = useAppSelector( - inpaintingCanvasLinesSelector - ); - - return ( - <> - {lines.map((line, i) => ( - - ))} - - ); -}; - -export default InpaintingCanvasLines; diff --git a/frontend/src/features/tabs/Inpainting/hooks/_useInpaintingHotkeys.ts b/frontend/src/features/tabs/Inpainting/hooks/_useInpaintingHotkeys.ts deleted file mode 100644 index af7f380fef..0000000000 --- a/frontend/src/features/tabs/Inpainting/hooks/_useInpaintingHotkeys.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { useToast } from '@chakra-ui/react'; -import { useHotkeys } from 'react-hotkeys-hook'; - -type UseInpaintingHotkeysConfig = { - activeTab: string; - brushSize: number; - handleChangeBrushSize: (newBrushSize: number) => void; - handleSelectEraserTool: () => void; - handleSelectBrushTool: () => void; - canUndo: boolean; - handleUndo: () => void; - canRedo: boolean; - handleRedo: () => void; - canClearMask: boolean; - handleClearMask: () => void; -}; - -const useInpaintingHotkeys = (config: UseInpaintingHotkeysConfig) => { - const { - activeTab, - brushSize, - handleChangeBrushSize, - handleSelectEraserTool, - handleSelectBrushTool, - canUndo, - handleUndo, - canRedo, - handleRedo, - canClearMask, - handleClearMask, - } = config; - - const toast = useToast(); - // Hotkeys - useHotkeys( - '[', - () => { - if (activeTab === 'inpainting' && brushSize - 5 > 0) { - handleChangeBrushSize(brushSize - 5); - } else { - handleChangeBrushSize(1); - } - }, - [brushSize] - ); - - useHotkeys( - ']', - () => { - if (activeTab === 'inpainting') { - handleChangeBrushSize(brushSize + 5); - } - }, - [brushSize] - ); - - useHotkeys('e', () => { - if (activeTab === 'inpainting') { - handleSelectEraserTool(); - } - }); - - useHotkeys('b', () => { - if (activeTab === 'inpainting') { - handleSelectBrushTool(); - } - }); - - useHotkeys( - 'cmd+z', - () => { - if (activeTab === 'inpainting' && canUndo) { - handleUndo(); - } - }, - [canUndo] - ); - - useHotkeys( - 'control+z', - () => { - if (activeTab === 'inpainting' && canUndo) { - handleUndo(); - } - }, - [canUndo] - ); - - useHotkeys( - 'cmd+shift+z', - () => { - if (activeTab === 'inpainting' && canRedo) { - handleRedo(); - } - }, - [canRedo] - ); - - useHotkeys( - 'control+shift+z', - () => { - if (activeTab === 'inpainting' && canRedo) { - handleRedo(); - } - }, - [canRedo] - ); - - useHotkeys( - 'control+y', - () => { - if (activeTab === 'inpainting' && canRedo) { - handleRedo(); - } - }, - [canRedo] - ); - - useHotkeys( - 'cmd+y', - () => { - if (activeTab === 'inpainting' && canRedo) { - handleRedo(); - } - }, - [canRedo] - ); - - useHotkeys( - 'c', - () => { - if (activeTab === 'inpainting' && canClearMask) { - handleClearMask(); - toast({ - title: 'Mask Cleared', - status: 'success', - duration: 2500, - isClosable: true, - }); - } - }, - [canClearMask] - ); -}; - -export default useInpaintingHotkeys; diff --git a/frontend/src/features/tabs/Inpainting/index.tsx b/frontend/src/features/tabs/Inpainting/index.tsx deleted file mode 100644 index 4b63c43412..0000000000 --- a/frontend/src/features/tabs/Inpainting/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import InpaintingPanel from './InpaintingPanel'; -import InpaintingDisplay from './InpaintingDisplay'; -import InvokeWorkarea from '../InvokeWorkarea'; - -export default function InpaintingWorkarea() { - return ( - } - styleClass="inpainting-workarea-overrides" - > - - - ); -} diff --git a/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts b/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts deleted file mode 100644 index dee72de7d9..0000000000 --- a/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts +++ /dev/null @@ -1,383 +0,0 @@ -import { createSlice } from '@reduxjs/toolkit'; -import type { PayloadAction } from '@reduxjs/toolkit'; -import { Vector2d } from 'konva/lib/types'; -import { RgbaColor } from 'react-colorful'; -import * as InvokeAI from '../../../app/invokeai'; -import _ from 'lodash'; -import { roundDownToMultiple } from '../../../common/util/roundDownToMultiple'; - -export type InpaintingTool = 'brush' | 'eraser'; - -export type MaskLine = { - tool: InpaintingTool; - strokeWidth: number; - points: number[]; -}; - -export type MaskCircle = { - tool: InpaintingTool; - radius: number; - x: number; - y: number; -}; - -export type Dimensions = { - width: number; - height: number; -}; - -export type BoundingBoxPreviewType = 'overlay' | 'ants' | 'marchingAnts'; - -export interface InpaintingState { - tool: 'brush' | 'eraser'; - brushSize: number; - maskColor: RgbaColor; - cursorPosition: Vector2d | null; - canvasDimensions: Dimensions; - boundingBoxDimensions: Dimensions; - boundingBoxCoordinate: Vector2d; - boundingBoxPreviewFill: RgbaColor; - shouldShowBoundingBox: boolean; - shouldShowBoundingBoxFill: boolean; - lines: MaskLine[]; - pastLines: MaskLine[][]; - futureLines: MaskLine[][]; - shouldShowMask: boolean; - shouldInvertMask: boolean; - shouldShowCheckboardTransparency: boolean; - shouldShowBrush: boolean; - shouldShowBrushPreview: boolean; - imageToInpaint?: InvokeAI.Image; - needsCache: boolean; - stageScale: number; - isDrawing: boolean; - isTransformingBoundingBox: boolean; - isMouseOverBoundingBox: boolean; - isMovingBoundingBox: boolean; - shouldUseInpaintReplace: boolean; - inpaintReplace: number; - shouldLockBoundingBox: boolean; - isSpacebarHeld: boolean; -} - -const initialInpaintingState: InpaintingState = { - tool: 'brush', - brushSize: 50, - maskColor: { r: 255, g: 90, b: 90, a: 0.5 }, - canvasDimensions: { width: 0, height: 0 }, - boundingBoxDimensions: { width: 512, height: 512 }, - boundingBoxCoordinate: { x: 0, y: 0 }, - boundingBoxPreviewFill: { r: 0, g: 0, b: 0, a: 0.5 }, - shouldShowBoundingBox: true, - shouldShowBoundingBoxFill: true, - cursorPosition: null, - lines: [], - pastLines: [], - futureLines: [], - shouldShowMask: true, - shouldInvertMask: false, - shouldShowCheckboardTransparency: false, - shouldShowBrush: true, - shouldShowBrushPreview: false, - needsCache: false, - isDrawing: false, - isTransformingBoundingBox: false, - isMouseOverBoundingBox: false, - isMovingBoundingBox: false, - stageScale: 1, - shouldUseInpaintReplace: false, - inpaintReplace: 0.1, - shouldLockBoundingBox: true, - isSpacebarHeld: false, -}; - -const initialState: InpaintingState = initialInpaintingState; - -export const inpaintingSlice = createSlice({ - name: 'inpainting', - initialState, - reducers: { - setTool: (state, action: PayloadAction) => { - state.tool = action.payload; - }, - toggleTool: (state) => { - state.tool = state.tool === 'brush' ? 'eraser' : 'brush'; - }, - setBrushSize: (state, action: PayloadAction) => { - state.brushSize = action.payload; - }, - addLine: (state, action: PayloadAction) => { - state.pastLines.push(state.lines); - state.lines.push(action.payload); - state.futureLines = []; - }, - addPointToCurrentLine: (state, action: PayloadAction) => { - state.lines[state.lines.length - 1].points.push(...action.payload); - }, - undo: (state) => { - if (state.pastLines.length === 0) return; - const newLines = state.pastLines.pop(); - if (!newLines) return; - state.futureLines.unshift(state.lines); - state.lines = newLines; - }, - redo: (state) => { - if (state.futureLines.length === 0) return; - const newLines = state.futureLines.shift(); - if (!newLines) return; - state.pastLines.push(state.lines); - state.lines = newLines; - }, - clearMask: (state) => { - state.pastLines.push(state.lines); - state.lines = []; - state.futureLines = []; - state.shouldInvertMask = false; - }, - toggleShouldInvertMask: (state) => { - state.shouldInvertMask = !state.shouldInvertMask; - }, - toggleShouldShowMask: (state) => { - state.shouldShowMask = !state.shouldShowMask; - }, - setShouldInvertMask: (state, action: PayloadAction) => { - state.shouldInvertMask = action.payload; - }, - setShouldShowMask: (state, action: PayloadAction) => { - state.shouldShowMask = action.payload; - if (!action.payload) { - state.shouldInvertMask = false; - } - }, - setShouldShowCheckboardTransparency: ( - state, - action: PayloadAction - ) => { - state.shouldShowCheckboardTransparency = action.payload; - }, - setShouldShowBrushPreview: (state, action: PayloadAction) => { - state.shouldShowBrushPreview = action.payload; - }, - setShouldShowBrush: (state, action: PayloadAction) => { - state.shouldShowBrush = action.payload; - }, - setMaskColor: (state, action: PayloadAction) => { - state.maskColor = action.payload; - }, - setCursorPosition: (state, action: PayloadAction) => { - state.cursorPosition = action.payload; - }, - clearImageToInpaint: (state) => { - state.imageToInpaint = undefined; - }, - setImageToInpaint: (state, action: PayloadAction) => { - const { width: imageWidth, height: imageHeight } = action.payload; - const { width, height } = state.boundingBoxDimensions; - const { x, y } = state.boundingBoxCoordinate; - - const newCoordinates: Vector2d = { x, y }; - const newDimensions: Dimensions = { width, height }; - - if (width + x > imageWidth) { - // Bounding box at least needs to be translated - if (width > imageWidth) { - // Bounding box also needs to be resized - newDimensions.width = roundDownToMultiple(imageWidth, 64); - } - newCoordinates.x = imageWidth - newDimensions.width; - } - - if (height + y > imageHeight) { - // Bounding box at least needs to be translated - if (height > imageHeight) { - // Bounding box also needs to be resized - newDimensions.height = roundDownToMultiple(imageHeight, 64); - } - newCoordinates.y = imageHeight - newDimensions.height; - } - - state.boundingBoxDimensions = newDimensions; - state.boundingBoxCoordinate = newCoordinates; - - state.canvasDimensions = { - width: imageWidth, - height: imageHeight, - }; - - state.imageToInpaint = action.payload; - state.needsCache = true; - }, - setCanvasDimensions: (state, action: PayloadAction) => { - state.canvasDimensions = action.payload; - - const { width: canvasWidth, height: canvasHeight } = action.payload; - - const { width: boundingBoxWidth, height: boundingBoxHeight } = - state.boundingBoxDimensions; - - const newBoundingBoxWidth = roundDownToMultiple( - _.clamp(boundingBoxWidth, 64, canvasWidth), - 64 - ); - const newBoundingBoxHeight = roundDownToMultiple( - _.clamp(boundingBoxHeight, 64, canvasHeight), - 64 - ); - - state.boundingBoxDimensions = { - width: newBoundingBoxWidth, - height: newBoundingBoxHeight, - }; - }, - setBoundingBoxDimensions: (state, action: PayloadAction) => { - state.boundingBoxDimensions = action.payload; - const { width: boundingBoxWidth, height: boundingBoxHeight } = - action.payload; - const { x: boundingBoxX, y: boundingBoxY } = state.boundingBoxCoordinate; - const { width: canvasWidth, height: canvasHeight } = - state.canvasDimensions; - - const roundedCanvasWidth = roundDownToMultiple(canvasWidth, 64); - const roundedCanvasHeight = roundDownToMultiple(canvasHeight, 64); - - const roundedBoundingBoxWidth = roundDownToMultiple(boundingBoxWidth, 64); - const roundedBoundingBoxHeight = roundDownToMultiple( - boundingBoxHeight, - 64 - ); - - const overflowX = boundingBoxX + boundingBoxWidth - canvasWidth; - const overflowY = boundingBoxY + boundingBoxHeight - canvasHeight; - - const newBoundingBoxWidth = _.clamp( - roundedBoundingBoxWidth, - 64, - roundedCanvasWidth - ); - - const newBoundingBoxHeight = _.clamp( - roundedBoundingBoxHeight, - 64, - roundedCanvasHeight - ); - - const overflowCorrectedX = - overflowX > 0 ? boundingBoxX - overflowX : boundingBoxX; - - const overflowCorrectedY = - overflowY > 0 ? boundingBoxY - overflowY : boundingBoxY; - - const clampedX = _.clamp( - overflowCorrectedX, - 0, - roundedCanvasWidth - newBoundingBoxWidth - ); - - const clampedY = _.clamp( - overflowCorrectedY, - 0, - roundedCanvasHeight - newBoundingBoxHeight - ); - - state.boundingBoxDimensions = { - width: newBoundingBoxWidth, - height: newBoundingBoxHeight, - }; - - state.boundingBoxCoordinate = { - x: clampedX, - y: clampedY, - }; - }, - setBoundingBoxCoordinate: (state, action: PayloadAction) => { - state.boundingBoxCoordinate = action.payload; - }, - setBoundingBoxPreviewFill: (state, action: PayloadAction) => { - state.boundingBoxPreviewFill = action.payload; - }, - setNeedsCache: (state, action: PayloadAction) => { - state.needsCache = action.payload; - }, - setStageScale: (state, action: PayloadAction) => { - state.stageScale = action.payload; - state.needsCache = false; - }, - setShouldShowBoundingBoxFill: (state, action: PayloadAction) => { - state.shouldShowBoundingBoxFill = action.payload; - }, - setIsDrawing: (state, action: PayloadAction) => { - state.isDrawing = action.payload; - }, - setClearBrushHistory: (state) => { - state.pastLines = []; - state.futureLines = []; - }, - setShouldUseInpaintReplace: (state, action: PayloadAction) => { - state.shouldUseInpaintReplace = action.payload; - }, - setInpaintReplace: (state, action: PayloadAction) => { - state.inpaintReplace = action.payload; - }, - setShouldLockBoundingBox: (state, action: PayloadAction) => { - state.shouldLockBoundingBox = action.payload; - }, - toggleShouldLockBoundingBox: (state) => { - state.shouldLockBoundingBox = !state.shouldLockBoundingBox; - }, - setShouldShowBoundingBox: (state, action: PayloadAction) => { - state.shouldShowBoundingBox = action.payload; - }, - setIsTransformingBoundingBox: (state, action: PayloadAction) => { - state.isTransformingBoundingBox = action.payload; - }, - setIsMovingBoundingBox: (state, action: PayloadAction) => { - state.isMovingBoundingBox = action.payload; - }, - setIsMouseOverBoundingBox: (state, action: PayloadAction) => { - state.isMouseOverBoundingBox = action.payload; - }, - setIsSpacebarHeld: (state, action: PayloadAction) => { - state.isSpacebarHeld = action.payload; - }, - }, -}); - -export const { - setTool, - setBrushSize, - addLine, - addPointToCurrentLine, - setShouldInvertMask, - setShouldShowMask, - setShouldShowCheckboardTransparency, - setShouldShowBrushPreview, - setMaskColor, - clearMask, - clearImageToInpaint, - undo, - redo, - setCursorPosition, - setCanvasDimensions, - setImageToInpaint, - setBoundingBoxDimensions, - setBoundingBoxCoordinate, - setBoundingBoxPreviewFill, - setNeedsCache, - setStageScale, - toggleTool, - setShouldShowBoundingBox, - setShouldShowBoundingBoxFill, - setIsDrawing, - setShouldShowBrush, - setClearBrushHistory, - setShouldUseInpaintReplace, - setInpaintReplace, - setShouldLockBoundingBox, - toggleShouldLockBoundingBox, - setIsMovingBoundingBox, - setIsTransformingBoundingBox, - setIsMouseOverBoundingBox, - setIsSpacebarHeld, -} = inpaintingSlice.actions; - -export default inpaintingSlice.reducer; diff --git a/frontend/src/features/tabs/Inpainting/inpaintingSliceSelectors.ts b/frontend/src/features/tabs/Inpainting/inpaintingSliceSelectors.ts deleted file mode 100644 index 3d7022d018..0000000000 --- a/frontend/src/features/tabs/Inpainting/inpaintingSliceSelectors.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import _ from 'lodash'; -import { RootState } from '../../../app/store'; -import { activeTabNameSelector } from '../../options/optionsSelectors'; -import { OptionsState } from '../../options/optionsSlice'; -import { InpaintingState } from './inpaintingSlice'; -import { rgbaColorToRgbString } from './util/colorToString'; - -export const inpaintingCanvasLinesSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { lines, maskColor } = inpainting; - return { - lines, - maskColorString: rgbaColorToRgbString(maskColor), - }; - } -); - -export const inpaintingControlsSelector = createSelector( - [ - (state: RootState) => state.inpainting, - (state: RootState) => state.options, - activeTabNameSelector, - ], - (inpainting: InpaintingState, options: OptionsState, activeTabName) => { - const { - tool, - brushSize, - maskColor, - shouldInvertMask, - shouldShowMask, - shouldShowCheckboardTransparency, - lines, - pastLines, - futureLines, - shouldShowBoundingBoxFill, - } = inpainting; - - const { showDualDisplay } = options; - - return { - tool, - brushSize, - maskColor, - shouldInvertMask, - shouldShowMask, - shouldShowCheckboardTransparency, - canUndo: pastLines.length > 0, - canRedo: futureLines.length > 0, - isMaskEmpty: lines.length === 0, - activeTabName, - showDualDisplay, - shouldShowBoundingBoxFill, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export const inpaintingCanvasSelector = createSelector( - (state: RootState) => state.inpainting, - (inpainting: InpaintingState) => { - const { - tool, - brushSize, - maskColor, - shouldInvertMask, - shouldShowMask, - shouldShowCheckboardTransparency, - imageToInpaint, - stageScale, - shouldShowBoundingBox, - shouldShowBoundingBoxFill, - isDrawing, - shouldLockBoundingBox, - boundingBoxDimensions, - isTransformingBoundingBox, - isMouseOverBoundingBox, - isMovingBoundingBox, - } = inpainting; - - let stageCursor: string | undefined = ''; - - if (isTransformingBoundingBox) { - stageCursor = undefined; - } else if (isMovingBoundingBox || isMouseOverBoundingBox) { - stageCursor = 'move'; - } else if (shouldShowMask) { - stageCursor = 'none'; - } else { - stageCursor = 'default'; - } - - return { - tool, - brushSize, - shouldInvertMask, - shouldShowMask, - shouldShowCheckboardTransparency, - maskColor, - imageToInpaint, - stageScale, - shouldShowBoundingBox, - shouldShowBoundingBoxFill, - isDrawing, - shouldLockBoundingBox, - boundingBoxDimensions, - isTransformingBoundingBox, - isModifyingBoundingBox: isTransformingBoundingBox || isMovingBoundingBox, - stageCursor, - isMouseOverBoundingBox, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: (a, b) => { - const { imageToInpaint: a_imageToInpaint, ...a_rest } = a; - const { imageToInpaint: b_imageToInpaint, ...b_rest } = b; - return ( - _.isEqual(a_rest, b_rest) && a_imageToInpaint == b_imageToInpaint - ); - }, - }, - } -); diff --git a/frontend/src/features/tabs/Inpainting/util/generateMask.ts b/frontend/src/features/tabs/Inpainting/util/generateMask.ts deleted file mode 100644 index 11e4cc2f00..0000000000 --- a/frontend/src/features/tabs/Inpainting/util/generateMask.ts +++ /dev/null @@ -1,109 +0,0 @@ -import Konva from 'konva'; -import { IRect } from 'konva/lib/types'; -import { MaskLine } from '../inpaintingSlice'; - -/** - * Re-draws the mask canvas onto a new Konva stage. - */ -export const generateMaskCanvas = ( - image: HTMLImageElement, - lines: MaskLine[] -): { - stage: Konva.Stage; - layer: Konva.Layer; -} => { - const { width, height } = image; - - const offscreenContainer = document.createElement('div'); - - const stage = new Konva.Stage({ - container: offscreenContainer, - width: width, - height: height, - }); - - const layer = new Konva.Layer(); - - stage.add(layer); - - lines.forEach((line) => - layer.add( - new Konva.Line({ - points: line.points, - stroke: 'rgb(0,0,0)', - strokeWidth: line.strokeWidth * 2, - tension: 0, - lineCap: 'round', - lineJoin: 'round', - shadowForStrokeEnabled: false, - globalCompositeOperation: - line.tool === 'brush' ? 'source-over' : 'destination-out', - }) - ) - ); - - layer.draw(); - - offscreenContainer.remove(); - - return { stage, layer }; -}; - -/** - * Check if the bounding box region has only fully transparent pixels. - */ -export const checkIsRegionEmpty = ( - stage: Konva.Stage, - boundingBox: IRect -): boolean => { - const imageData = stage - .toCanvas() - .getContext('2d') - ?.getImageData( - boundingBox.x, - boundingBox.y, - boundingBox.width, - boundingBox.height - ); - - if (!imageData) { - throw new Error('Unable to get image data from generated canvas'); - } - - const pixelBuffer = new Uint32Array(imageData.data.buffer); - - return !pixelBuffer.some((color) => color !== 0); -}; - -/** - * Generating a mask image from InpaintingCanvas.tsx is not as simple - * as calling toDataURL() on the canvas, because the mask may be represented - * by colored lines or transparency, or the user may have inverted the mask - * display. - * - * So we need to regenerate the mask image by creating an offscreen canvas, - * drawing the mask and compositing everything correctly to output a valid - * mask image. - */ -const generateMask = ( - image: HTMLImageElement, - lines: MaskLine[], - boundingBox: IRect -): { maskDataURL: string; isMaskEmpty: boolean } => { - // create an offscreen canvas and add the mask to it - const { stage, layer } = generateMaskCanvas(image, lines); - - // check if the mask layer is empty - const isMaskEmpty = checkIsRegionEmpty(stage, boundingBox); - - // composite the image onto the mask layer - layer.add( - new Konva.Image({ image: image, globalCompositeOperation: 'source-out' }) - ); - - const maskDataURL = stage.toDataURL({ ...boundingBox }); - - return { maskDataURL, isMaskEmpty }; -}; - -export default generateMask; diff --git a/frontend/src/features/tabs/InvokeOptionsPanel.scss b/frontend/src/features/tabs/InvokeOptionsPanel.scss index 5a50c5f79d..c11b86511e 100644 --- a/frontend/src/features/tabs/InvokeOptionsPanel.scss +++ b/frontend/src/features/tabs/InvokeOptionsPanel.scss @@ -35,7 +35,7 @@ row-gap: 1rem; height: 100%; @include HideScrollbar; - background-color: var(--background-color) !important; + background-color: var(--background-color); } &[data-pinned='false'] { diff --git a/frontend/src/features/tabs/InvokeOptionsPanel.tsx b/frontend/src/features/tabs/InvokeOptionsPanel.tsx index 5a60a93e18..9f24e377ec 100644 --- a/frontend/src/features/tabs/InvokeOptionsPanel.tsx +++ b/frontend/src/features/tabs/InvokeOptionsPanel.tsx @@ -5,17 +5,17 @@ import { MouseEvent, ReactNode, useCallback, useRef } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { BsPinAngle, BsPinAngleFill } from 'react-icons/bs'; import { CSSTransition } from 'react-transition-group'; -import { RootState, useAppDispatch, useAppSelector } from '../../app/store'; -import useClickOutsideWatcher from '../../common/hooks/useClickOutsideWatcher'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import useClickOutsideWatcher from 'common/hooks/useClickOutsideWatcher'; import { OptionsState, setOptionsPanelScrollPosition, setShouldHoldOptionsPanelOpen, setShouldPinOptionsPanel, setShouldShowOptionsPanel, -} from '../options/optionsSlice'; -import { setNeedsCache } from './Inpainting/inpaintingSlice'; -import InvokeAILogo from '../../assets/images/logo.png'; +} from 'features/options/optionsSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import InvokeAILogo from 'assets/images/logo.png'; type Props = { children: ReactNode }; @@ -63,8 +63,10 @@ const InvokeOptionsPanel = (props: Props) => { 'o', () => { dispatch(setShouldShowOptionsPanel(!shouldShowOptionsPanel)); + shouldPinOptionsPanel && + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, - [shouldShowOptionsPanel] + [shouldShowOptionsPanel, shouldPinOptionsPanel] ); useHotkeys( @@ -72,6 +74,7 @@ const InvokeOptionsPanel = (props: Props) => { () => { if (shouldPinOptionsPanel) return; dispatch(setShouldShowOptionsPanel(false)); + dispatch(setDoesCanvasNeedScaling(true)); }, [shouldPinOptionsPanel] ); @@ -80,6 +83,7 @@ const InvokeOptionsPanel = (props: Props) => { 'shift+o', () => { handleClickPinOptionsPanel(); + dispatch(setDoesCanvasNeedScaling(true)); }, [shouldPinOptionsPanel] ); @@ -95,7 +99,7 @@ const InvokeOptionsPanel = (props: Props) => { ); dispatch(setShouldShowOptionsPanel(false)); dispatch(setShouldHoldOptionsPanelOpen(false)); - // dispatch(setNeedsCache(true)); + // dispatch(setDoesCanvasNeedScaling(true)); }, [dispatch, shouldPinOptionsPanel]); useClickOutsideWatcher( @@ -117,7 +121,7 @@ const InvokeOptionsPanel = (props: Props) => { const handleClickPinOptionsPanel = () => { dispatch(setShouldPinOptionsPanel(!shouldPinOptionsPanel)); - dispatch(setNeedsCache(true)); + dispatch(setDoesCanvasNeedScaling(true)); }; return ( diff --git a/frontend/src/features/tabs/InvokeTabs.scss b/frontend/src/features/tabs/InvokeTabs.scss index da837a20ee..77bfeae581 100644 --- a/frontend/src/features/tabs/InvokeTabs.scss +++ b/frontend/src/features/tabs/InvokeTabs.scss @@ -1,7 +1,7 @@ @use '../../styles/Mixins/' as *; .app-tabs { - display: grid !important; + display: grid; grid-template-columns: min-content auto; column-gap: 1rem; // height: 100%; diff --git a/frontend/src/features/tabs/InvokeTabs.tsx b/frontend/src/features/tabs/InvokeTabs.tsx index 8cbd0df124..33dcd10b1e 100644 --- a/frontend/src/features/tabs/InvokeTabs.tsx +++ b/frontend/src/features/tabs/InvokeTabs.tsx @@ -2,21 +2,32 @@ import { Tab, TabPanel, TabPanels, Tabs, Tooltip } from '@chakra-ui/react'; import _ from 'lodash'; import React, { ReactElement } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; -import { RootState, useAppDispatch, useAppSelector } from '../../app/store'; -import NodesWIP from '../../common/components/WorkInProgress/NodesWIP'; -import OutpaintingWIP from '../../common/components/WorkInProgress/OutpaintingWIP'; -import { PostProcessingWIP } from '../../common/components/WorkInProgress/PostProcessingWIP'; -import ImageToImageIcon from '../../common/icons/ImageToImageIcon'; -import InpaintIcon from '../../common/icons/InpaintIcon'; -import NodesIcon from '../../common/icons/NodesIcon'; -import OutpaintIcon from '../../common/icons/OutpaintIcon'; -import PostprocessingIcon from '../../common/icons/PostprocessingIcon'; -import TextToImageIcon from '../../common/icons/TextToImageIcon'; -import { setActiveTab } from '../options/optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import NodesWIP from 'common/components/WorkInProgress/NodesWIP'; +import OutpaintingWIP from 'common/components/WorkInProgress/OutpaintingWIP'; +import { PostProcessingWIP } from 'common/components/WorkInProgress/PostProcessingWIP'; +import ImageToImageIcon from 'common/icons/ImageToImageIcon'; +import InpaintIcon from 'common/icons/InpaintIcon'; +import NodesIcon from 'common/icons/NodesIcon'; +import OutpaintIcon from 'common/icons/OutpaintIcon'; +import PostprocessingIcon from 'common/icons/PostprocessingIcon'; +import TextToImageIcon from 'common/icons/TextToImageIcon'; +import { + setActiveTab, + setIsLightBoxOpen, + setShouldShowOptionsPanel, +} from 'features/options/optionsSlice'; import ImageToImageWorkarea from './ImageToImage'; -import InpaintingWorkarea from './Inpainting'; -import { setNeedsCache } from './Inpainting/inpaintingSlice'; +import InpaintingWorkarea from './Inpainting/InpaintingWorkarea'; +// import { setDoesCanvasNeedScaling } from './Inpainting/inpaintingSlice'; import TextToImageWorkarea from './TextToImage'; +import Lightbox from 'features/lightbox/Lightbox'; +import { + setCurrentCanvas, + setDoesCanvasNeedScaling, +} from 'features/canvas/canvasSlice'; +import OutpaintingWorkarea from './Outpainting/OutpaintingWorkarea'; +import { setShouldShowGallery } from 'features/gallery/gallerySlice'; export const tabDict = { txt2img: { @@ -36,7 +47,7 @@ export const tabDict = { }, outpainting: { title: , - workarea: , + workarea: , tooltip: 'Outpainting', }, nodes: { @@ -62,6 +73,15 @@ export default function InvokeTabs() { const activeTab = useAppSelector( (state: RootState) => state.options.activeTab ); + const isLightBoxOpen = useAppSelector( + (state: RootState) => state.options.isLightBoxOpen + ); + const shouldShowGallery = useAppSelector( + (state: RootState) => state.gallery.shouldShowGallery + ); + const shouldShowOptionsPanel = useAppSelector( + (state: RootState) => state.options.shouldShowOptionsPanel + ); const dispatch = useAppDispatch(); useHotkeys('1', () => { @@ -74,7 +94,6 @@ export default function InvokeTabs() { useHotkeys('3', () => { dispatch(setActiveTab(2)); - dispatch(setNeedsCache(true)); }); useHotkeys('4', () => { @@ -89,6 +108,30 @@ export default function InvokeTabs() { dispatch(setActiveTab(5)); }); + // Lightbox Hotkey + useHotkeys( + 'v', + () => { + dispatch(setIsLightBoxOpen(!isLightBoxOpen)); + }, + [isLightBoxOpen] + ); + + useHotkeys( + 'f', + () => { + if (shouldShowGallery || shouldShowOptionsPanel) { + dispatch(setShouldShowOptionsPanel(false)); + dispatch(setShouldShowGallery(false)); + } else { + dispatch(setShouldShowOptionsPanel(true)); + dispatch(setShouldShowGallery(true)); + } + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); + }, + [shouldShowGallery, shouldShowOptionsPanel] + ); + const renderTabs = () => { const tabsToRender: ReactElement[] = []; Object.keys(tabDict).forEach((key) => { @@ -127,11 +170,13 @@ export default function InvokeTabs() { index={activeTab} onChange={(index: number) => { dispatch(setActiveTab(index)); - dispatch(setNeedsCache(true)); + dispatch(setDoesCanvasNeedScaling(true)); }} >
{renderTabs()}
- {renderTabPanels()} + + {isLightBoxOpen ? : renderTabPanels()} + ); } diff --git a/frontend/src/features/tabs/InvokeWorkarea.scss b/frontend/src/features/tabs/InvokeWorkarea.scss index 38ccdc34f8..83df214a1c 100644 --- a/frontend/src/features/tabs/InvokeWorkarea.scss +++ b/frontend/src/features/tabs/InvokeWorkarea.scss @@ -22,6 +22,12 @@ grid-template-columns: 1fr 1fr; background-color: var(--background-color-secondary); border-radius: 0.5rem; + .workarea-split-view-left { + padding-right: 0.5rem; + } + .workarea-split-view-right { + padding-left: 0.5rem; + } } .workarea-single-view { @@ -42,12 +48,6 @@ border-radius: 0.5rem; padding: 1rem; } - .workarea-split-view-left { - padding-right: 0.5rem; - } - .workarea-split-view-right { - padding-left: 0.5rem; - } } } .workarea-split-button { @@ -56,7 +56,7 @@ padding: 0.5rem; top: 0; right: 0; - z-index: 20; + // z-index: 20; &[data-selected='true'] { top: 0; diff --git a/frontend/src/features/tabs/InvokeWorkarea.tsx b/frontend/src/features/tabs/InvokeWorkarea.tsx index d79f413720..96552a6eef 100644 --- a/frontend/src/features/tabs/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/InvokeWorkarea.tsx @@ -3,16 +3,26 @@ import { createSelector } from '@reduxjs/toolkit'; import { ReactNode } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { VscSplitHorizontal } from 'react-icons/vsc'; -import { RootState, useAppDispatch, useAppSelector } from '../../app/store'; -import ImageGallery from '../gallery/ImageGallery'; -import { activeTabNameSelector } from '../options/optionsSelectors'; -import { OptionsState, setShowDualDisplay } from '../options/optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import ImageGallery from 'features/gallery/ImageGallery'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { + OptionsState, + setShowDualDisplay, +} from 'features/options/optionsSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; const workareaSelector = createSelector( [(state: RootState) => state.options, activeTabNameSelector], (options: OptionsState, activeTabName) => { - const { showDualDisplay, shouldPinOptionsPanel } = options; - return { showDualDisplay, shouldPinOptionsPanel, activeTabName }; + const { showDualDisplay, shouldPinOptionsPanel, isLightBoxOpen } = options; + return { + showDualDisplay, + shouldPinOptionsPanel, + activeTabName, + isLightBoxOpen, + shouldShowDualDisplayButton: ['inpainting'].includes(activeTabName), + }; } ); @@ -25,10 +35,16 @@ type InvokeWorkareaProps = { const InvokeWorkarea = (props: InvokeWorkareaProps) => { const dispatch = useAppDispatch(); const { optionsPanel, children, styleClass } = props; - const { showDualDisplay, activeTabName } = useAppSelector(workareaSelector); + const { + showDualDisplay, + activeTabName, + isLightBoxOpen, + shouldShowDualDisplayButton, + } = useAppSelector(workareaSelector); const handleDualDisplay = () => { dispatch(setShowDualDisplay(!showDualDisplay)); + dispatch(setDoesCanvasNeedScaling(true)); }; // Hotkeys @@ -39,7 +55,7 @@ const InvokeWorkarea = (props: InvokeWorkareaProps) => { handleDualDisplay(); }, { - enabled: activeTabName === 'inpainting', + enabled: shouldShowDualDisplayButton, }, [showDualDisplay] ); @@ -54,7 +70,7 @@ const InvokeWorkarea = (props: InvokeWorkareaProps) => { {optionsPanel}
{children} - {activeTabName === 'inpainting' && ( + {shouldShowDualDisplayButton && (
{ )}
- + {!isLightBoxOpen && }
); diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx new file mode 100644 index 0000000000..2799e612c5 --- /dev/null +++ b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx @@ -0,0 +1,74 @@ +import { createSelector } from '@reduxjs/toolkit'; +// import IAICanvas from 'features/canvas/IAICanvas'; +import IAICanvasControls from 'features/canvas/IAICanvasControls'; +import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; +import _ from 'lodash'; +import { useLayoutEffect } from 'react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import ImageUploadButton from 'common/components/ImageUploaderButton'; +import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; +import { OptionsState } from 'features/options/optionsSlice'; +import { + CanvasState, + currentCanvasSelector, + GenericCanvasState, + OutpaintingCanvasState, + setDoesCanvasNeedScaling, +} from 'features/canvas/canvasSlice'; +import IAICanvas from 'features/canvas/IAICanvas'; +import IAICanvasOutpaintingControls from 'features/canvas/IAICanvasOutpaintingControls'; + +const outpaintingDisplaySelector = createSelector( + [(state: RootState) => state.canvas, (state: RootState) => state.options], + (canvas: CanvasState, options: OptionsState) => { + const { + doesCanvasNeedScaling, + outpainting: { objects }, + } = canvas; + const { showDualDisplay } = options; + return { + doesCanvasNeedScaling, + showDualDisplay, + doesOutpaintingHaveObjects: objects.length > 0, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const OutpaintingDisplay = () => { + const dispatch = useAppDispatch(); + const { showDualDisplay, doesCanvasNeedScaling, doesOutpaintingHaveObjects } = + useAppSelector(outpaintingDisplaySelector); + + useLayoutEffect(() => { + const resizeCallback = _.debounce( + () => dispatch(setDoesCanvasNeedScaling(true)), + 250 + ); + window.addEventListener('resize', resizeCallback); + return () => window.removeEventListener('resize', resizeCallback); + }, [dispatch]); + + const outpaintingComponent = doesOutpaintingHaveObjects ? ( +
+ +
+ {doesCanvasNeedScaling ? : } +
+
+ ) : ( + + ); + + return ( +
+
{outpaintingComponent}
+
+ ); +}; + +export default OutpaintingDisplay; diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx new file mode 100644 index 0000000000..5428a923f2 --- /dev/null +++ b/frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx @@ -0,0 +1,65 @@ +// import { Feature } from 'app/features'; +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import ImageToImageStrength from 'features/options/AdvancedOptions/ImageToImage/ImageToImageStrength'; +import InpaintingSettings from 'features/options/AdvancedOptions/Inpainting/InpaintingSettings'; +import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/OptionsAccordion'; +import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; + +export default function OutpaintingPanel() { + const showAdvancedOptions = useAppSelector( + (state: RootState) => state.options.showAdvancedOptions + ); + + const imageToImageAccordions = { + seed: { + header: , + feature: Feature.SEED, + options: , + }, + variations: { + header: , + feature: Feature.VARIATIONS, + options: , + }, + face_restore: { + header: , + feature: Feature.FACE_CORRECTION, + options: , + }, + upscale: { + header: , + feature: Feature.UPSCALE, + options: , + }, + }; + + return ( + + + + + + + + {showAdvancedOptions && ( + + )} + + ); +} diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss new file mode 100644 index 0000000000..426db917d0 --- /dev/null +++ b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss @@ -0,0 +1,98 @@ +@use '../../../styles/Mixins/' as *; + +.inpainting-main-area { + display: flex; + flex-direction: column; + align-items: center; + row-gap: 1rem; + width: 100%; + height: 100%; + + .inpainting-settings { + display: flex; + align-items: center; + column-gap: 0.5rem; + + svg { + transform: scale(0.9); + } + + .inpainting-buttons-group { + display: flex; + align-items: center; + column-gap: 0.5rem; + } + + .inpainting-button-dropdown { + display: flex; + flex-direction: column; + row-gap: 0.5rem; + } + + .inpainting-color-picker { + margin-left: 1rem !important; + } + + .inpainting-brush-options { + display: flex; + align-items: center; + column-gap: 1rem; + } + } + + .inpainting-canvas-area { + display: flex; + flex-direction: column; + align-items: center; + row-gap: 1rem; + width: 100%; + height: 100%; + } + + .inpainting-canvas-spiner { + display: flex; + align-items: center; + width: 100%; + height: 100%; + } + + .inpainting-canvas-container { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + width: 100%; + border-radius: 0.5rem; + + .inpainting-canvas-wrapper { + position: relative; + } + + .inpainting-canvas-stage { + border-radius: 0.5rem; + canvas { + border-radius: 0.5rem; + } + } + } +} + +.inpainting-options-btn { + min-height: 2rem; +} + +.canvas-status-text { + position: absolute; + top: 0; + left: 0; + background-color: var(--background-color); + opacity: 0.5; + display: flex; + flex-direction: column; + font-size: 0.8rem; + padding: 0.25rem; + width: 12rem; + border-radius: 0.25rem; + margin: 0.25rem; + pointer-events: none; +} diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx new file mode 100644 index 0000000000..692ba324ed --- /dev/null +++ b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx @@ -0,0 +1,22 @@ +import OutpaintingPanel from './OutpaintingPanel'; +import OutpaintingDisplay from './OutpaintingDisplay'; +import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; +import { useAppDispatch } from 'app/store'; +import { useEffect } from 'react'; +import { setCurrentCanvas, setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; + +export default function OutpaintingWorkarea() { + const dispatch = useAppDispatch(); + useEffect(() => { + dispatch(setCurrentCanvas('outpainting')); + dispatch(setDoesCanvasNeedScaling(true)); + }, [dispatch]); + return ( + } + styleClass="inpainting-workarea-overrides" + > + + + ); +} diff --git a/frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx b/frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx index 4ea9736f35..6b68f80665 100644 --- a/frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx +++ b/frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx @@ -1,4 +1,4 @@ -import CurrentImageDisplay from '../../gallery/CurrentImageDisplay'; +import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; const TextToImageDisplay = () => { return ( diff --git a/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx b/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx index 58ed61525c..0792f71d52 100644 --- a/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx +++ b/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx @@ -1,21 +1,21 @@ -import { Feature } from '../../../app/features'; -import { RootState, useAppSelector } from '../../../app/store'; -import FaceRestoreHeader from '../../options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from '../../options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import OutputHeader from '../../options/AdvancedOptions/Output/OutputHeader'; -import OutputOptions from '../../options/AdvancedOptions/Output/OutputOptions'; -import SeedHeader from '../../options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from '../../options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from '../../options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from '../../options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from '../../options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from '../../options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from '../../options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from '../../options/MainOptions/MainOptions'; -import OptionsAccordion from '../../options/OptionsAccordion'; -import ProcessButtons from '../../options/ProcessButtons/ProcessButtons'; -import PromptInput from '../../options/PromptInput/PromptInput'; -import InvokeOptionsPanel from '../InvokeOptionsPanel'; +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import OutputHeader from 'features/options/AdvancedOptions/Output/OutputHeader'; +import OutputOptions from 'features/options/AdvancedOptions/Output/OutputOptions'; +import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/OptionsAccordion'; +import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; export default function TextToImagePanel() { const showAdvancedOptions = useAppSelector( diff --git a/frontend/src/features/tabs/TextToImage/index.tsx b/frontend/src/features/tabs/TextToImage/index.tsx index 7aaceca833..5f88215e56 100644 --- a/frontend/src/features/tabs/TextToImage/index.tsx +++ b/frontend/src/features/tabs/TextToImage/index.tsx @@ -1,5 +1,5 @@ import TextToImagePanel from './TextToImagePanel'; -import InvokeWorkarea from '../InvokeWorkarea'; +import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; import TextToImageDisplay from './TextToImageDisplay'; export default function TextToImageWorkarea() { diff --git a/frontend/src/global.d.ts b/frontend/src/global.d.ts new file mode 100644 index 0000000000..a0b48d49bb --- /dev/null +++ b/frontend/src/global.d.ts @@ -0,0 +1,39 @@ +export {}; + +declare global { + // Manual implementation of https://github.com/microsoft/TypeScript/issues/48829 + + interface Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: (this: void, value: T, index: number, obj: T[]) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: T, index: number, obj: T[]) => unknown, + thisArg?: any + ): T | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: T, index: number, obj: T[]) => unknown, + thisArg?: any + ): number; + } +} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 2036ed99bc..18ab6a62e2 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,6 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import { ChakraProvider, ColorModeScript } from '@chakra-ui/react'; +import { ChakraProvider } from '@chakra-ui/react'; +import { CacheProvider } from '@emotion/react'; +import createCache from '@emotion/cache'; import { store } from './app/store'; import { Provider } from 'react-redux'; import { PersistGate } from 'redux-persist/integration/react'; @@ -8,10 +10,14 @@ import { persistStore } from 'redux-persist'; export const persistor = persistStore(store); -import { theme } from './app/theme'; import Loading from './Loading'; import App from './app/App'; +const emotionCache = createCache({ + key: 'invokeai-style-cache', + prepend: true, +}); + // Custom Styling import './styles/index.scss'; @@ -19,10 +25,11 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( } persistor={persistor}> - - - - + + + + + diff --git a/frontend/src/styles/Mixins/Buttons.scss b/frontend/src/styles/Mixins/Buttons.scss index 511937d0af..f60bf8a3ac 100644 --- a/frontend/src/styles/Mixins/Buttons.scss +++ b/frontend/src/styles/Mixins/Buttons.scss @@ -1,6 +1,6 @@ @mixin Button( - $btn-color: rgb(45, 45, 55), - $btn-color-hover: rgb(65, 65, 75), + $btn-color: rgb(45, 49, 53), + $btn-color-hover: rgb(65, 69, 73), $btn-width: 100%, $btn-height: 100%, $icon-size: 20px @@ -10,13 +10,13 @@ background-color: $btn-color !important; &:hover { - background-color: $btn-color-hover !important; + background-color: $btn-color-hover; } &:disabled { - background-color: rgb(45, 45, 55) !important; + background-color: rgb(45, 49, 53) !important; &:hover { - background-color: rgb(45, 45, 55) !important; + background-color: rgb(45, 49, 53) !important; } } @@ -26,3 +26,15 @@ color: var(--btn-svg-color); } } + +@mixin BaseButton { + background-color: var(--btn-base-color); + &:hover { + background-color: var(--btn-base-color-hover); + } + &:disabled { + &:hover { + background-color: var(--btn-base-color); + } + } +} diff --git a/frontend/src/styles/_Colors_Dark.scss b/frontend/src/styles/Themes/_Colors_Dark.scss similarity index 77% rename from frontend/src/styles/_Colors_Dark.scss rename to frontend/src/styles/Themes/_Colors_Dark.scss index fdecb027bb..c3d673d053 100644 --- a/frontend/src/styles/_Colors_Dark.scss +++ b/frontend/src/styles/Themes/_Colors_Dark.scss @@ -2,27 +2,31 @@ // General Colors --white: rgb(255, 255, 255); + // Accent Colors + --accent-color-dim: rgb(57, 25, 153); + --accent-color: rgb(80, 40, 200); + --accent-color-bright: rgb(104, 60, 230); + --accent-color-hover: var(--accent-color-bright); + // App Colors --root-bg-color: rgb(10, 10, 10); --background-color: rgb(20, 20, 26); + --background-color-light: rgb(40, 44, 48); --background-color-secondary: rgb(16, 16, 22); --text-color: rgb(255, 255, 255); --text-color-secondary: rgb(160, 162, 188); - --subtext-color: rgb(24, 24, 34); --subtext-color-bright: rgb(48, 48, 64); --border-color: rgb(30, 30, 46); --border-color-light: rgb(60, 60, 76); + --svg-color: rgb(255, 255, 255); + --invalid: rgb(255, 75, 75); --invalid-secondary: rgb(120, 5, 5); - --accent-color-dim: rgb(57, 25, 153); - --accent-color: rgb(80, 40, 200); - --accent-color-hover: rgb(104, 60, 230); - --destructive-color: rgb(185, 55, 55); --destructive-color-hover: rgb(255, 75, 75); @@ -33,42 +37,45 @@ --border-color-invalid: rgb(255, 80, 50); --box-shadow-color-invalid: rgb(210, 30, 10); - --svg-color: rgb(24, 24, 34); - - // Progress Bar Color - --progress-bar-color: rgb(100, 50, 245); - - // Prompt Box Colors - --prompt-bg-color: rgb(10, 10, 10); + // Tabs + --tab-color: rgb(30, 32, 42); + --tab-hover-color: rgb(36, 38, 48); + --tab-panel-bg: rgb(20, 22, 28); + --tab-list-bg: var(--accent-color); + --tab-list-text: rgb(202, 204, 216); + --tab-list-text-inactive: rgb(92, 94, 114); // Button Colors - --btn-svg-color: rgb(255, 255, 255); - - --btn-grey: rgb(30, 32, 42); - --btn-grey-hover: rgb(46, 48, 68); + --btn-base-color: rgb(30, 32, 42); + --btn-base-color-hover: rgb(46, 48, 68); --btn-load-more: rgb(30, 32, 42); --btn-load-more-hover: rgb(54, 56, 66); + --btn-svg-color: rgb(255, 255, 255); --btn-delete-image: rgb(238, 107, 107); // IAI Button Colors --btn-checkbox-border-hover: rgb(46, 48, 68); + // Progress Bar Color + --progress-bar-color: var(--accent-color); + + // Prompt Box Colors + --prompt-bg-color: rgb(10, 10, 10); + // Switch --switch-bg-color: rgb(100, 102, 110); - --switch-bg-active-color: rgb(80, 40, 200); + --switch-bg-active-color: var(--accent-color); + + // Slider + --slider-color: var(--accent-color-bright); + + // Slider + --slider-color: rgb(151, 113, 255); // Resizable - --resizeable-handle-border-color: rgb(80, 82, 112); - - // Tabs - --tab-color: rgb(30, 32, 42); - --tab-hover-color: rgb(36, 38, 48); - --tab-list-bg: var(--accent-color); - --tab-list-text: rgb(202, 204, 216); - --tab-list-text-inactive: rgb(92, 94, 114); - --tab-panel-bg: rgb(20, 22, 28); + --resizeable-handle-border-color: var(--accent-color); // Metadata Viewer --metadata-bg-color: rgba(0, 0, 0, 0.7); @@ -86,11 +93,12 @@ --settings-modal-bg: rgb(30, 32, 42); // Input - --input-checkbox-bg: rgb(90, 90, 120); - --input-checkbox-checked-bg: rgb(80, 40, 200); + --input-checkbox-bg: rgb(60, 64, 68); + --input-checkbox-checked-bg: var(--accent-color); --input-checkbox-checked-tick: rgb(0, 0, 0); - --input-border-color: rgb(140, 110, 255); - --input-box-shadow-color: rgb(80, 30, 210); + + --input-border-color: var(--accent-color-bright); + --input-box-shadow-color: var(--accent-color); // Console --error-level-info: rgb(200, 202, 224); @@ -116,8 +124,11 @@ // Canvas --inpainting-alerts-bg: rgba(20, 20, 26, 0.75); --inpainting-alerts-icon-color: rgb(255, 255, 255); - --inpainting-alerts-bg-active: rgb(80, 40, 200); + --inpainting-alerts-bg-active: var(--accent-color); --inpainting-alerts-icon-active: rgb(255, 255, 255); --inpainting-alerts-bg-alert: var(--invalid); --inpainting-alerts-icon-alert: rgb(255, 255, 255); + + // Checkerboard + --checkboard-dots-color: rgb(35, 35, 39); } diff --git a/frontend/src/styles/Themes/_Colors_Green.scss b/frontend/src/styles/Themes/_Colors_Green.scss new file mode 100644 index 0000000000..a6e2110404 --- /dev/null +++ b/frontend/src/styles/Themes/_Colors_Green.scss @@ -0,0 +1,132 @@ +[data-theme='green'] { + // General Colors + --white: rgb(255, 255, 255); + + // Accent Colors + --accent-color-dim: rgb(10, 60, 40); + --accent-color: rgb(20, 110, 70); + --accent-color-bright: rgb(30, 180, 100); + --accent-color-hover: var(--accent-color-bright); + + // App Colors + --root-bg-color: rgb(10, 10, 14); + --background-color: rgb(30, 32, 37); + --background-color-light: rgb(40, 44, 48); + --background-color-secondary: rgb(22, 24, 28); + + --text-color: rgb(255, 255, 255); + --text-color-secondary: rgb(160, 164, 168); + --subtext-color: rgb(24, 24, 28); + --subtext-color-bright: rgb(68, 72, 76); + + --border-color: rgb(40, 44, 48); + --border-color-light: rgb(60, 60, 64); + + --svg-color: rgb(220, 224, 228); + + --invalid: rgb(255, 75, 75); + --invalid-secondary: rgb(120, 5, 5); + + --destructive-color: rgb(185, 55, 55); + --destructive-color-hover: rgb(255, 75, 75); + + --warning-color: rgb(200, 88, 40); + --warning-color-hover: rgb(230, 117, 60); + + // Error status colors + --border-color-invalid: rgb(255, 80, 50); + --box-shadow-color-invalid: rgb(210, 30, 10); + + // Tabs + --tab-color: rgb(40, 44, 48); + --tab-hover-color: rgb(48, 52, 56); //done + --tab-panel-bg: var(--background-color-secondary); + --tab-list-bg: var(--accent-color); + --tab-list-text: rgb(202, 204, 206); + --tab-list-text-inactive: rgb(92, 94, 96); //done + + // Button Colors + --btn-base-color: rgb(40, 44, 48); + --btn-base-color-hover: rgb(56, 60, 64); + + --btn-load-more: rgb(30, 32, 42); + --btn-load-more-hover: rgb(54, 56, 66); + + --btn-svg-color: rgb(255, 255, 255); + + --btn-delete-image: rgb(238, 107, 107); + + // IAI Button Colors + --btn-checkbox-border-hover: rgb(46, 48, 68); + + // Progress Bar Color + --progress-bar-color: var(--accent-color); + + // Prompt Box Colors + --prompt-bg-color: rgb(10, 10, 14); + + // Switch + --switch-bg-color: rgb(100, 102, 110); + --switch-bg-active-color: var(--accent-color); + + // Slider + --slider-color: var(--accent-color-bright); + + // Resizable + --resizeable-handle-border-color: var(--accent-color); + + // Metadata Viewer + --metadata-bg-color: rgba(0, 0, 0, 0.7); + --metadata-json-bg-color: rgba(255, 255, 255, 0.1); + + // Status Message + --status-good-color: rgb(125, 255, 100); + --status-good-glow: rgb(40, 215, 40); + --status-working-color: rgb(255, 175, 55); + --status-working-glow: rgb(255, 160, 55); + --status-bad-color: rgb(255, 90, 90); + --status-bad-glow: rgb(255, 40, 40); + + // Settings Modal + --settings-modal-bg: rgb(30, 32, 42); + + // Input + --input-checkbox-bg: rgb(60, 64, 68); + --input-checkbox-checked-bg: var(--accent-color); + --input-checkbox-checked-tick: rgb(0, 0, 0); + + --input-border-color: var(--accent-color-bright); + --input-box-shadow-color: var(--accent-color); + + // Console + --error-level-info: rgb(200, 202, 224); + --error-level-warning: rgb(255, 225, 105); + --error-level-error: rgb(255, 81, 46); + --console-bg-color: rgb(30, 30, 36); + --console-icon-button-bg-color: rgb(50, 53, 64); + --console-icon-button-bg-color-hover: rgb(70, 73, 84); + + // Img2Img + --img2img-img-bg-color: rgb(30, 32, 42); + + // Gallery + + // Context Menus + --context-menu-bg-color: rgb(46, 48, 58); + --context-menu-box-shadow: none; + --context-menu-bg-color-hover: rgb(30, 32, 42); + + // Shadows + --floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, 0.5)); + + // Canvas + --inpainting-alerts-bg: rgba(20, 20, 26, 0.75); + --inpainting-alerts-icon-color: rgb(255, 255, 255); + --inpainting-alerts-bg-active: var(--accent-color); + --inpainting-alerts-icon-active: rgb(255, 255, 255); + --inpainting-alerts-bg-alert: var(--invalid); + --inpainting-alerts-icon-alert: rgb(255, 255, 255); + + //Checkerboard + --checkboard-dots-color: rgb(35, 35, 39); +} diff --git a/frontend/src/styles/_Colors_Light.scss b/frontend/src/styles/Themes/_Colors_Light.scss similarity index 89% rename from frontend/src/styles/_Colors_Light.scss rename to frontend/src/styles/Themes/_Colors_Light.scss index f46513a297..5138704c79 100644 --- a/frontend/src/styles/_Colors_Light.scss +++ b/frontend/src/styles/Themes/_Colors_Light.scss @@ -2,27 +2,31 @@ // General Colors --white: rgb(255, 255, 255); + // Accent Colors + --accent-color-dim: rgb(186, 146, 0); + --accent-color: rgb(235, 185, 5); + --accent-color-bright: rgb(255, 200, 0); + --accent-color-hover: var(--accent-color-bright); + // App Colors --root-bg-color: rgb(255, 255, 255); --background-color: rgb(220, 222, 224); + --background-color-light: rgb(250, 252, 254); --background-color-secondary: rgb(204, 206, 208); --text-color: rgb(0, 0, 0); --text-color-secondary: rgb(40, 40, 40); - --subtext-color: rgb(24, 24, 34); --subtext-color-bright: rgb(142, 144, 146); --border-color: rgb(200, 200, 200); --border-color-light: rgb(147, 147, 147); + --svg-color: rgb(50, 50, 50); + --invalid: rgb(255, 75, 75); --invalid-secondary: rgb(120, 5, 5); - --accent-color-dim: rgb(186, 146, 0); - --accent-color: rgb(235, 185, 5); - --accent-color-hover: rgb(255, 200, 0); - --destructive-color: rgb(237, 51, 51); --destructive-color-hover: rgb(255, 55, 55); @@ -33,43 +37,41 @@ --border-color-invalid: rgb(255, 80, 50); --box-shadow-color-invalid: none; - --svg-color: rgb(186, 188, 190); - - // Progress Bar Color - --progress-bar-color: rgb(235, 185, 5); - - // Prompt Box Colors - --prompt-bg-color: rgb(225, 227, 229); + // Tabs + --tab-color: rgb(202, 204, 206); + --tab-hover-color: rgb(206, 208, 210); + --tab-panel-bg: rgb(214, 216, 218); + --tab-list-bg: rgb(235, 185, 5); + --tab-list-text: rgb(0, 0, 0); + --tab-list-text-inactive: rgb(106, 108, 110); // Button Colors - --btn-svg-color: rgb(0, 0, 0); - - --btn-grey: rgb(220, 222, 224); - --btn-grey-hover: rgb(230, 232, 234); + --btn-base-color: rgb(184, 186, 188); + --btn-base-color-hover: rgb(230, 232, 234); --btn-load-more: rgb(202, 204, 206); --btn-load-more-hover: rgb(178, 180, 182); + --btn-svg-color: rgb(0, 0, 0); --btn-delete-image: rgb(213, 49, 49); // IAI Button Colors --btn-checkbox-border-hover: rgb(176, 178, 182); + // Progress Bar Color + --progress-bar-color: rgb(235, 185, 5); + // Prompt Box Colors + --prompt-bg-color: rgb(225, 227, 229); // Switch --switch-bg-color: rgb(178, 180, 182); --switch-bg-active-color: rgb(235, 185, 5); + // Slider + --slider-color: rgb(0, 0, 0); + // Resizable --resizeable-handle-border-color: rgb(160, 162, 164); - // Tabs - --tab-color: rgb(202, 204, 206); - --tab-hover-color: rgb(206, 208, 210); - --tab-list-bg: rgb(235, 185, 5); - --tab-list-text: rgb(0, 0, 0); - --tab-list-text-inactive: rgb(106, 108, 110); - --tab-panel-bg: rgb(214, 216, 218); - // Metadata Viewer --metadata-bg-color: rgba(230, 230, 230, 0.9); --metadata-json-bg-color: rgba(0, 0, 0, 0.1); @@ -121,4 +123,7 @@ --inpainting-alerts-icon-active: rgb(0, 0, 0); --inpainting-alerts-bg-alert: var(--invalid); --inpainting-alerts-icon-alert: rgb(0, 0, 0); + + // Checkerboard + --checkboard-dots-color: rgb(160, 160, 172); } diff --git a/frontend/src/styles/_Misc.scss b/frontend/src/styles/_Misc.scss index d75046d008..4c09d8d73c 100644 --- a/frontend/src/styles/_Misc.scss +++ b/frontend/src/styles/_Misc.scss @@ -1,13 +1,16 @@ -.checkerboard { - background-position: 0px 0px, 10px 10px; - background-size: 20px 20px; - background-image: linear-gradient( - 45deg, - #eee 25%, - transparent 25%, - transparent 75%, - #eee 75%, - #eee 100% - ), - linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%); -} +// .checkerboard { +// background-position: 0px 0px, 10px 10px; +// // background-size: 20px 20px; +// // background-image: linear-gradient( +// // 45deg, +// // #eee 25%, +// // transparent 25%, +// // transparent 75%, +// // #eee 75%, +// // #eee 100% +// // ), +// // linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%); +// background: radial-gradient(var(--checkboard-dots-color) 3px, transparent 1px), +// var(--background-color-secondary); +// background-size: 64px 64px; +// } diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index de0f57020d..eacc765901 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -1,10 +1,13 @@ // General Imports -@use 'Colors_Dark'; -@use 'Colors_Light'; @use 'Fonts'; @use 'Animations'; @use 'Misc'; +// Themes +@use './Themes/Colors_Dark'; +@use './Themes/Colors_Light'; +@use './Themes/Colors_Green'; + // Component Styles //app @use '../app/App.scss'; @@ -33,6 +36,9 @@ @use '../features/gallery/HoverableImage.scss'; @use '../features/gallery/ImageMetaDataViewer/ImageMetadataViewer.scss'; +// Lightbox +@use '../features/lightbox//Lightbox.scss'; + // Tabs @use '../features/tabs/InvokeTabs.scss'; @use '../features/tabs/InvokeWorkarea.scss'; @@ -40,8 +46,8 @@ @use '../features/tabs/TextToImage/TextToImage.scss'; @use '../features/tabs/ImageToImage/ImageToImage.scss'; @use '../features/tabs/FloatingButton.scss'; -@use '../features/tabs/Inpainting/Inpainting.scss'; -@use '../features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss'; +@use '../features/tabs/Inpainting/InpaintingWorkarea.scss'; +@use '../features/tabs/Outpainting/OutpaintingWorkarea.scss'; // Component Shared @use '../common/components/IAINumberInput.scss'; @@ -59,11 +65,12 @@ @use '../common/components/GuidePopover.scss'; // Component Shared - Radix UI -// @use '../common/components/radix-ui/IAISlider.scss'; -// @use '../common/components/radix-ui/IAITooltip.scss'; +// @use 'common/components/radix-ui/IAISlider.scss'; +// @use 'common/components/radix-ui/IAITooltip.scss'; // Shared Styles @use './Mixins/' as *; +@use '../features/system/Modal.scss'; *, *::before, diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index a9619a8f91..2a75e16e88 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -14,6 +14,7 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, + "baseUrl": "src", "jsx": "react-jsx" }, "include": ["src", "index.d.ts"], diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json index 9d31e2aed9..a375708f74 100644 --- a/frontend/tsconfig.node.json +++ b/frontend/tsconfig.node.json @@ -3,7 +3,8 @@ "composite": true, "module": "ESNext", "moduleResolution": "Node", - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "baseUrl": "src" }, "include": ["vite.config.ts"] } diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index d8a8dcca62..548ba17314 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,12 +1,13 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import eslint from 'vite-plugin-eslint'; +import tsconfigPaths from 'vite-tsconfig-paths'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { const common = { base: '', - plugins: [react(), eslint()], + plugins: [react(), eslint(), tsconfigPaths()], server: { // Proxy HTTP requests to the flask server proxy: { @@ -15,6 +16,11 @@ export default defineConfig(({ mode }) => { changeOrigin: true, rewrite: (path) => path.replace(/^\/outputs/, ''), }, + '/upload': { + target: 'http://127.0.0.1:9090/upload', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/upload/, ''), + }, '/flaskwebgui-keep-server-alive': { target: 'http://127.0.0.1:9090/flaskwebgui-keep-server-alive', changeOrigin: true, diff --git a/frontend/yarn.lock b/frontend/yarn.lock index dae528a306..c62800507e 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -4,7 +4,7 @@ "@ampproject/remapping@^2.1.0": version "2.2.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== dependencies: "@jridgewell/gen-mapping" "^0.1.0" @@ -12,54 +12,54 @@ "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.0.tgz#9b61938c5f688212c7b9ae363a819df7d29d4093" - integrity sha512-Gt9jszFJYq7qzXVK4slhc6NzJXnOVmRECWcVjF/T23rNXD9NtWQ0W3qxdg+p9wWIB+VQw3GYV/U2Ha9bRTfs4w== + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" + integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== "@babel/core@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.6.tgz#7122ae4f5c5a37c0946c066149abd8e75f81540f" - integrity sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg== + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" + integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.6" - "@babel/helper-compilation-targets" "^7.19.3" - "@babel/helper-module-transforms" "^7.19.6" - "@babel/helpers" "^7.19.4" - "@babel/parser" "^7.19.6" + "@babel/generator" "^7.20.2" + "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-module-transforms" "^7.20.2" + "@babel/helpers" "^7.20.1" + "@babel/parser" "^7.20.2" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.6" - "@babel/types" "^7.19.4" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.2" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.19.6", "@babel/generator@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.0.tgz#0bfc5379e0efb05ca6092091261fcdf7ec36249d" - integrity sha512-GUPcXxWibClgmYJuIwC2Bc2Lg+8b9VjaJ+HlNdACEVt+Wlr1eoU1OPZjZRm7Hzl0gaTsUZNQfeihvZJhG7oc3w== +"@babel/generator@^7.20.1", "@babel/generator@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.2.tgz#c2e89e22613a039285c1e7b749e2cd0b30b9a481" + integrity sha512-SD75PMIK6i9H8G/tfGvB4KKl4Nw6Ssos9nGgYwxbgyTP0iX/Z55DveoH86rmUB/YHTQQ+ZC0F7xxaY8l2OF44Q== dependencies: - "@babel/types" "^7.20.0" + "@babel/types" "^7.20.2" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== dependencies: "@babel/types" "^7.18.6" -"@babel/helper-compilation-targets@^7.19.3": +"@babel/helper-compilation-targets@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== @@ -71,12 +71,12 @@ "@babel/helper-environment-visitor@^7.18.9": version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== "@babel/helper-function-name@^7.19.0": version "7.19.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== dependencies: "@babel/template" "^7.18.10" @@ -84,47 +84,47 @@ "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== dependencies: "@babel/types" "^7.18.6" "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz#6c52cc3ac63b70952d33ee987cbee1c9368b533f" - integrity sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw== +"@babel/helper-module-transforms@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" + integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== dependencies: "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.19.4" + "@babel/helper-simple-access" "^7.20.2" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.19.1" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.6" - "@babel/types" "^7.19.4" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.2" "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz" - integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" + integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== -"@babel/helper-simple-access@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz#be553f4951ac6352df2567f7daa19a0ee15668e7" - integrity sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg== +"@babel/helper-simple-access@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" + integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== dependencies: - "@babel/types" "^7.19.4" + "@babel/types" "^7.20.2" "@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== dependencies: "@babel/types" "^7.18.6" @@ -141,49 +141,49 @@ "@babel/helper-validator-option@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== -"@babel/helpers@^7.19.4": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.0.tgz#27c8ffa8cc32a2ed3762fba48886e7654dbcf77f" - integrity sha512-aGMjYraN0zosCEthoGLdqot1oRsmxVTQRHadsUPz5QM44Zej2PYRz7XiDE7GqnkZnNtLbOuxqoZw42vkU7+XEQ== +"@babel/helpers@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" + integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== dependencies: "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.0" + "@babel/traverse" "^7.20.1" "@babel/types" "^7.20.0" "@babel/highlight@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== dependencies: "@babel/helper-validator-identifier" "^7.18.6" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.18.10", "@babel/parser@^7.19.6", "@babel/parser@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.0.tgz#b26133c888da4d79b0d3edcf42677bcadc783046" - integrity sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg== +"@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.2.tgz#9aeb9b92f64412b5f81064d46f6a1ac0881337f4" + integrity sha512-afk318kh2uKbo7BEj2QtEi8HVCGrwHUffrYDy7dgVcSa2j9lY3LDjPzcyGdpX7xgm35aWqvciZJ4WKmdF/SxYg== "@babel/plugin-syntax-jsx@^7.17.12", "@babel/plugin-syntax-jsx@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-jsx-development@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== dependencies: "@babel/plugin-transform-react-jsx" "^7.18.6" "@babel/plugin-transform-react-jsx-self@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.18.6.tgz#3849401bab7ae8ffa1e3e5687c94a753fc75bda7" integrity sha512-A0LQGx4+4Jv7u/tWzoJF7alZwnBDQd6cGLh9P+Ttk4dpiL+J5p7NSNv/9tlEFFJDq3kjxOavWmbm6t0Gk+A3Ig== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -207,41 +207,41 @@ "@babel/types" "^7.19.0" "@babel/runtime@^7.0.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.18.3", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.0.tgz#824a9ef325ffde6f78056059db3168c08785e24a" - integrity sha512-NDYdls71fTXoU8TZHfbBWg7DiZfNzClcKui/+kyi6ppD2L1qnWW3VV6CjtaBXSUGGhiTWJ6ereOIkUvenif66Q== + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9" + integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg== dependencies: regenerator-runtime "^0.13.10" "@babel/template@^7.18.10": version "7.18.10" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== dependencies: "@babel/code-frame" "^7.18.6" "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.19.6", "@babel/traverse@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.0.tgz#538c4c6ce6255f5666eba02252a7b59fc2d5ed98" - integrity sha512-5+cAXQNARgjRUK0JWu2UBwja4JLSO/rBMPJzpsKb+oBF5xlUuCfljQepS4XypBQoiigL0VQjTZy6WiONtUdScQ== +"@babel/traverse@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" + integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.0" + "@babel/generator" "^7.20.1" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.19.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.0" + "@babel/parser" "^7.20.1" "@babel/types" "^7.20.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.19.4", "@babel/types@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.0.tgz#52c94cf8a7e24e89d2a194c25c35b17a64871479" - integrity sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg== +"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" + integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" @@ -304,10 +304,10 @@ "@chakra-ui/react-use-merge-refs" "2.0.4" "@chakra-ui/spinner" "2.0.10" -"@chakra-ui/checkbox@2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/checkbox/-/checkbox-2.2.2.tgz#494d7090ac11a0a43d05b7849aff6085f7a91045" - integrity sha512-Y6Zbkkk5VNoe0RzqU6F+rKlFVPlubz1KIgYcb7CCNHGOM97dLtRm78eAvJ+7Xmpitr+7zZ4hJLLjfAz+e1X7rA== +"@chakra-ui/checkbox@2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/checkbox/-/checkbox-2.2.3.tgz#ae4f7728defd8c5c080ff56cc4243a9c47e0d092" + integrity sha512-ScPIoBbdAbRV+Pdy3B4UqYtf+IxPpm+FHMVPELi2rJUe3k5UcyZcs9DxzKsBS+5e3QBD+H82a6ui0mx9Pyfq1A== dependencies: "@chakra-ui/form-control" "2.0.11" "@chakra-ui/react-context" "2.0.4" @@ -317,7 +317,7 @@ "@chakra-ui/react-use-merge-refs" "2.0.4" "@chakra-ui/react-use-safe-layout-effect" "2.0.2" "@chakra-ui/react-use-update-effect" "2.0.4" - "@chakra-ui/visually-hidden" "2.0.11" + "@chakra-ui/visually-hidden" "2.0.12" "@zag-js/focus-visible" "0.1.0" "@chakra-ui/clickable@2.0.10": @@ -354,10 +354,10 @@ "@chakra-ui/number-utils" "2.0.4" "@chakra-ui/react-use-callback-ref" "2.0.4" -"@chakra-ui/css-reset@2.0.8": - version "2.0.8" - resolved "https://registry.yarnpkg.com/@chakra-ui/css-reset/-/css-reset-2.0.8.tgz#093ce6b166b37f2dd14e63f246635c463a59c106" - integrity sha512-VuDD1rk1pFc+dItk4yUcstyoC9D2B35hatHDBtlPMqTczFAzpbgVJJYgEHANatXGfulM5SdckmYEIJ3Tac1Rtg== +"@chakra-ui/css-reset@2.0.9": + version "2.0.9" + resolved "https://registry.yarnpkg.com/@chakra-ui/css-reset/-/css-reset-2.0.9.tgz#fb7ec1f145562dcda2491038af2e1e7b414d4c22" + integrity sha512-pLEhUetGJ5Dee2xiPDGAzTDBzY7e1OsuS9yEq8/vcGBBVrQ4Y+r+qTEvpf1Zqb2dOl+vUUcqhhaVk8d7uRDGFA== "@chakra-ui/descendant@3.0.10": version "3.0.10" @@ -372,10 +372,10 @@ resolved "https://registry.yarnpkg.com/@chakra-ui/dom-utils/-/dom-utils-2.0.3.tgz#8a5498b107d3a42662f3502f7b8965cb73bf6a33" integrity sha512-aeGlRmTxcv0cvW44DyeZHru1i68ZDQsXpfX2dnG1I1yBlT6GlVx1xYjCULis9mjhgvd2O3NfcYPRTkjNWTDUbA== -"@chakra-ui/editable@2.0.13": - version "2.0.13" - resolved "https://registry.yarnpkg.com/@chakra-ui/editable/-/editable-2.0.13.tgz#4e6ff480956ae2dcacf4ba2a15019336486bd613" - integrity sha512-GM3n8t3/TOFFcDOWF/tuKsnqn66isZLsU+FkMRY2o0E8XjLBGjCKuXInPW5SRBqhje7EHC+kwViLE780PfwXbw== +"@chakra-ui/editable@2.0.14": + version "2.0.14" + resolved "https://registry.yarnpkg.com/@chakra-ui/editable/-/editable-2.0.14.tgz#969b0796dc1c3c1baebb8d807f310606b5b147db" + integrity sha512-BQSLOYyfcB6vk8AFMhprcoIk1jKPi3KuXAdApqM3w15l4TVwR5j1C1RNYbJaX28HKXRlO526PS3NZPzrQSLciQ== dependencies: "@chakra-ui/react-context" "2.0.4" "@chakra-ui/react-types" "2.0.3" @@ -410,10 +410,10 @@ "@chakra-ui/react-types" "2.0.3" "@chakra-ui/react-use-merge-refs" "2.0.4" -"@chakra-ui/hooks@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/hooks/-/hooks-2.1.0.tgz#a8df3692e407c2fed8cc551c8ce7f3fcd0ea9864" - integrity sha512-4H6BDITq/YrStW99LXurgPkcz4qHSVy9V/QWXCvt1pCuiDTqNztiW4r508H3ApAOsL9NEbyXcM/zWYD7r5VDjA== +"@chakra-ui/hooks@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/hooks/-/hooks-2.1.1.tgz#2ecf6389d583a1fd7dbfcb373d447e2559d98925" + integrity sha512-HG2cSn0ds6pE0WyGzbddtVcZH76ol543RZ5aYBiU3q0WnPtU6BzQQKorCdCLR1Kq6wVNcA29RlSLDrWiuN4GSQ== dependencies: "@chakra-ui/react-utils" "2.0.8" "@chakra-ui/utils" "2.0.11" @@ -482,10 +482,10 @@ "@chakra-ui/breakpoint-utils" "2.0.4" "@chakra-ui/react-env" "2.0.10" -"@chakra-ui/menu@2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/menu/-/menu-2.1.2.tgz#bbe39e1efdb408ba8e6616e0ec290417474f9454" - integrity sha512-6Z7ecXjp6BtZ1ExbFggfxsAj1hwtcathXekmCTxHpXOD+BdjAC/13+oLclwXeuBO85aoTmQrQ2ovfTkO31bzRQ== +"@chakra-ui/menu@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/menu/-/menu-2.1.3.tgz#a2e74d42655fc1d5c6598a16d27a72a064312b2b" + integrity sha512-uVS3gxl3o1b4v6Uwpgt+7DdEOuT0IgHjeM7jna5tFnOI3G2QTjIyd4DaKbYPxqZKlD8TQK+0wLA08th61paq/w== dependencies: "@chakra-ui/clickable" "2.0.10" "@chakra-ui/descendant" "3.0.10" @@ -496,7 +496,7 @@ "@chakra-ui/react-use-animation-state" "2.0.5" "@chakra-ui/react-use-controllable-state" "2.0.5" "@chakra-ui/react-use-disclosure" "2.0.5" - "@chakra-ui/react-use-focus-effect" "2.0.5" + "@chakra-ui/react-use-focus-effect" "2.0.6" "@chakra-ui/react-use-merge-refs" "2.0.4" "@chakra-ui/react-use-outside-click" "2.0.4" "@chakra-ui/react-use-update-effect" "2.0.4" @@ -555,10 +555,10 @@ "@chakra-ui/react-use-controllable-state" "2.0.5" "@chakra-ui/react-use-merge-refs" "2.0.4" -"@chakra-ui/popover@2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@chakra-ui/popover/-/popover-2.1.1.tgz#1b5e05e334ba5f9bce4bc5bcabfb92563393fc84" - integrity sha512-j09NsesfT+eaYITkITYJXDlRcPoOeQUM80neJZKOBgul2iHkVsEoii8dwS5Ip5ONeu4ane1b6zEOlYvYj2SrkA== +"@chakra-ui/popover@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@chakra-ui/popover/-/popover-2.1.2.tgz#06c0733b0a715ed559f418aba2e7e6d70de6b8ae" + integrity sha512-ANnKH5oA5HEeouRSch370iw6wQ8r5rBhz9NflVyXjmTlJ7/rjkOyQ8pEFzvJbvzp4iFj4htejHK2qDK0b/qKLA== dependencies: "@chakra-ui/close-button" "2.0.11" "@chakra-ui/lazy-utils" "2.0.2" @@ -567,7 +567,7 @@ "@chakra-ui/react-types" "2.0.3" "@chakra-ui/react-use-animation-state" "2.0.5" "@chakra-ui/react-use-disclosure" "2.0.5" - "@chakra-ui/react-use-focus-effect" "2.0.5" + "@chakra-ui/react-use-focus-effect" "2.0.6" "@chakra-ui/react-use-focus-on-pointer-down" "2.0.3" "@chakra-ui/react-use-merge-refs" "2.0.4" @@ -588,22 +588,22 @@ "@chakra-ui/react-context" "2.0.4" "@chakra-ui/react-use-safe-layout-effect" "2.0.2" -"@chakra-ui/progress@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/progress/-/progress-2.0.12.tgz#7ce57fe2822d1741c26e82960ca02c667a265a05" - integrity sha512-9qtZimZosTliI7siAZkLeCVdCpXCTxmSETCudHcCUsC+FtcFacmA65+We8qij1nOIqmsbm+NYU6PP89TU2n4Hg== +"@chakra-ui/progress@2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@chakra-ui/progress/-/progress-2.1.0.tgz#87d03da5c6075ec6326db9d8cc412be053945784" + integrity sha512-CK4XmDrbAzR95po5L07sGCniMeOZiF148CLC/dItwgRc65NFmaHSL1OvqXQz6qiDiBOmZxPq0Qu1KovJGg/esA== dependencies: "@chakra-ui/react-context" "2.0.4" -"@chakra-ui/provider@2.0.20": - version "2.0.20" - resolved "https://registry.yarnpkg.com/@chakra-ui/provider/-/provider-2.0.20.tgz#2f3f73f6142f4d2b2a5a8ad6dbd777a3fc4390ce" - integrity sha512-mNNfsgm05G4x1VzvHVR9+PNEiuxNnn9xUKDuEwoaO7+IHCMzCRMtPbSJjwmv0xvHUGB9+JChjPpZI5RuHQziJQ== +"@chakra-ui/provider@2.0.21": + version "2.0.21" + resolved "https://registry.yarnpkg.com/@chakra-ui/provider/-/provider-2.0.21.tgz#4ffafad4991d83af4fbf88873b78b09f9f7cb8f4" + integrity sha512-P3Pm/0hz6ViuC9JsxAOFKm+sOl4w5yaZdPWFFOeztHj4rEkFd7UnyNV3SfUlFOs/ZzIFnzaGNd9xngoSi728JQ== dependencies: - "@chakra-ui/css-reset" "2.0.8" + "@chakra-ui/css-reset" "2.0.9" "@chakra-ui/portal" "2.0.10" "@chakra-ui/react-env" "2.0.10" - "@chakra-ui/system" "2.3.0" + "@chakra-ui/system" "2.3.1" "@chakra-ui/utils" "2.0.11" "@chakra-ui/radio@2.0.12": @@ -634,7 +634,7 @@ "@chakra-ui/react-types@2.0.3": version "2.0.3" - resolved "https://registry.npmjs.org/@chakra-ui/react-types/-/react-types-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-types/-/react-types-2.0.3.tgz#dc454c4703b4de585e6461fd607304ede06fe595" integrity sha512-1mJYOQldFTALE0Wr3j6tk/MYvgQIp6CKkJulNzZrI8QN+ox/bJOh8OVP4vhwqvfigdLTui0g0k8M9h+j2ub/Mw== "@chakra-ui/react-use-animation-state@2.0.5": @@ -671,13 +671,14 @@ dependencies: "@chakra-ui/react-use-callback-ref" "2.0.4" -"@chakra-ui/react-use-focus-effect@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-focus-effect/-/react-use-focus-effect-2.0.5.tgz#b554277c38e84468b019e08a73579e9700e1003a" - integrity sha512-sbe1QnsXXfjukM+laxbKnT0UnMpHe/7kTzEPG/BYM6/ZDUUmrC1Nz+8l+3H/52iWIaruikDBdif/Xd37Yvu3Kg== +"@chakra-ui/react-use-focus-effect@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-focus-effect/-/react-use-focus-effect-2.0.6.tgz#e5a607a68ecf1240e7ab4b233403d55e3cddc4b5" + integrity sha512-J5I8pIUcros5VP8g5b3o3qAvJ8ltoYuO7w2n6V1xCVkBbY2J1dyDR5qkRjRG+cD9Ik/iCftnTiRWaUSokfDzEw== dependencies: "@chakra-ui/dom-utils" "2.0.3" "@chakra-ui/react-use-event-listener" "2.0.4" + "@chakra-ui/react-use-safe-layout-effect" "2.0.2" "@chakra-ui/react-use-update-effect" "2.0.4" "@chakra-ui/react-use-focus-on-pointer-down@2.0.3": @@ -757,38 +758,38 @@ "@chakra-ui/utils" "2.0.11" "@chakra-ui/react@^2.3.1": - version "2.3.6" - resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.3.6.tgz#a6d3e092cab433fcd9cf8e9876756818c4261df6" - integrity sha512-xo43UU+yMqRGHZLU4fSgzojeRl5stlIfT+GLbT9CUVEm0HMJCt2m8RsNPBvGOMzANdC+bzwSiOm+MNzQBi9IBQ== + version "2.3.7" + resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.3.7.tgz#58dfcec0bea9681957491948fd3033b2cb237b27" + integrity sha512-vnnBDwyvzhQfIgWkqhI8dAX2voVfJOZdTyOsKah0eHc5mvc2oUfoHGRzYNZPSb9bHiKd5roktaDp5tayXv/ECg== dependencies: "@chakra-ui/accordion" "2.1.2" "@chakra-ui/alert" "2.0.11" "@chakra-ui/avatar" "2.2.0" "@chakra-ui/breadcrumb" "2.1.0" "@chakra-ui/button" "2.0.11" - "@chakra-ui/checkbox" "2.2.2" + "@chakra-ui/checkbox" "2.2.3" "@chakra-ui/close-button" "2.0.11" "@chakra-ui/control-box" "2.0.10" "@chakra-ui/counter" "2.0.10" - "@chakra-ui/css-reset" "2.0.8" - "@chakra-ui/editable" "2.0.13" + "@chakra-ui/css-reset" "2.0.9" + "@chakra-ui/editable" "2.0.14" "@chakra-ui/form-control" "2.0.11" - "@chakra-ui/hooks" "2.1.0" + "@chakra-ui/hooks" "2.1.1" "@chakra-ui/icon" "3.0.11" "@chakra-ui/image" "2.0.11" "@chakra-ui/input" "2.0.12" "@chakra-ui/layout" "2.1.9" "@chakra-ui/live-region" "2.0.10" "@chakra-ui/media-query" "3.2.7" - "@chakra-ui/menu" "2.1.2" + "@chakra-ui/menu" "2.1.3" "@chakra-ui/modal" "2.2.2" "@chakra-ui/number-input" "2.0.12" "@chakra-ui/pin-input" "2.0.15" - "@chakra-ui/popover" "2.1.1" + "@chakra-ui/popover" "2.1.2" "@chakra-ui/popper" "3.0.8" "@chakra-ui/portal" "2.0.10" - "@chakra-ui/progress" "2.0.12" - "@chakra-ui/provider" "2.0.20" + "@chakra-ui/progress" "2.1.0" + "@chakra-ui/provider" "2.0.21" "@chakra-ui/radio" "2.0.12" "@chakra-ui/react-env" "2.0.10" "@chakra-ui/select" "2.0.12" @@ -797,19 +798,19 @@ "@chakra-ui/spinner" "2.0.10" "@chakra-ui/stat" "2.0.11" "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/switch" "2.0.14" - "@chakra-ui/system" "2.3.0" + "@chakra-ui/switch" "2.0.15" + "@chakra-ui/system" "2.3.1" "@chakra-ui/table" "2.0.11" "@chakra-ui/tabs" "2.1.4" "@chakra-ui/tag" "2.0.11" "@chakra-ui/textarea" "2.0.12" - "@chakra-ui/theme" "2.1.14" - "@chakra-ui/theme-utils" "2.0.1" - "@chakra-ui/toast" "4.0.0" + "@chakra-ui/theme" "2.1.15" + "@chakra-ui/theme-utils" "2.0.2" + "@chakra-ui/toast" "4.0.1" "@chakra-ui/tooltip" "2.2.0" "@chakra-ui/transition" "2.0.11" "@chakra-ui/utils" "2.0.11" - "@chakra-ui/visually-hidden" "2.0.11" + "@chakra-ui/visually-hidden" "2.0.12" "@chakra-ui/select@2.0.12": version "2.0.12" @@ -868,22 +869,22 @@ csstype "^3.0.11" lodash.mergewith "4.6.2" -"@chakra-ui/switch@2.0.14": - version "2.0.14" - resolved "https://registry.yarnpkg.com/@chakra-ui/switch/-/switch-2.0.14.tgz#62372355bf73c19896b39fb7e75c132333c5a882" - integrity sha512-6lzhCkJq7vbD3yGaorGLp0ZZU4ewdKwAu0e62qR8TfYZwbcbpkXbBKloIHbA2XKOduISzS2WYqjmoP6jSKIxrA== +"@chakra-ui/switch@2.0.15": + version "2.0.15" + resolved "https://registry.yarnpkg.com/@chakra-ui/switch/-/switch-2.0.15.tgz#7bcaf8380a3f3969685bc89d2b95b72d083b6f81" + integrity sha512-93tUSAKBnIIUddf7Bvk0uDNeZ5e5FDlWRbAmfaJNSN4YVKFZI3VYd9PCfxpmQB8Uu6Qt8Ex70v++meNhd3kpHA== dependencies: - "@chakra-ui/checkbox" "2.2.2" + "@chakra-ui/checkbox" "2.2.3" -"@chakra-ui/system@2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/system/-/system-2.3.0.tgz#b7ba122872d4d48806fbf994f1187680ae2296a6" - integrity sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ== +"@chakra-ui/system@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/system/-/system-2.3.1.tgz#1fbf18e1f19f1f3d489ce1b864be1b2eb444072d" + integrity sha512-pR8KYmqN6rQ+aZ8cT5IYfF7rVXEuh6ZWZgWIdgmt5NMseQ2DR9JlK0SRoHNFW1TnFD4Odq2T7Xh46MHiQZCm1g== dependencies: "@chakra-ui/color-mode" "2.1.9" "@chakra-ui/react-utils" "2.0.8" "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/theme-utils" "2.0.1" + "@chakra-ui/theme-utils" "2.0.2" "@chakra-ui/utils" "2.0.11" react-fast-compare "3.2.0" @@ -931,27 +932,27 @@ "@chakra-ui/anatomy" "2.0.7" "@ctrl/tinycolor" "^3.4.0" -"@chakra-ui/theme-utils@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@chakra-ui/theme-utils/-/theme-utils-2.0.1.tgz#a3dc99331ba943e155dd683fe25ce302e3084db0" - integrity sha512-NDwzgTPxm+v3PAJlSSU1MORHLMqO9vsRJ+ObELD5wpvE9aEyRziN/AZSoK2oLwCQMPEiU7R99K5ij1E6ptMt7w== +"@chakra-ui/theme-utils@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@chakra-ui/theme-utils/-/theme-utils-2.0.2.tgz#fae1c307fe82a4b7c824f73ef34f77fc515d970b" + integrity sha512-juGdDxTJx7deu2xgdNudRWi+qTbViPQKK0niLSOaXsZIfobVDgBn2iIgwLqFcIR0M1yPk64ERtEuvgGa2yI9iw== dependencies: "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/theme" "2.1.14" + "@chakra-ui/theme" "2.1.15" lodash.mergewith "4.6.2" -"@chakra-ui/theme@2.1.14": - version "2.1.14" - resolved "https://registry.yarnpkg.com/@chakra-ui/theme/-/theme-2.1.14.tgz#4726d65a65515f8ee96b5f2a725d0d17804ddfc9" - integrity sha512-6EYJCQlrjSjNAJvZmw1un50F8+sQDFsdwu/7UzWe+TeANpKlz4ZcHbh0gkl3PD62lGis+ehITUwqRm8htvDOjw== +"@chakra-ui/theme@2.1.15": + version "2.1.15" + resolved "https://registry.yarnpkg.com/@chakra-ui/theme/-/theme-2.1.15.tgz#caf7902435b6e09f957d376cd2dcb509e062a0fb" + integrity sha512-e+oZ0e7kXjtjWO0phUzlz9weWv0w4lv4Us/Lf8DXbstrPujgyxNYOF0LHTDRxzUNa5bYUsP9g5W+FW4e9E2UsQ== dependencies: "@chakra-ui/anatomy" "2.0.7" "@chakra-ui/theme-tools" "2.0.12" -"@chakra-ui/toast@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/toast/-/toast-4.0.0.tgz#797c34c4ecfcad7c6899c1cda221af0ff04d5d0b" - integrity sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og== +"@chakra-ui/toast@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/toast/-/toast-4.0.1.tgz#e06e868636b221aa6da9564e30716d76c5508fc5" + integrity sha512-F2Xrn+LwksgdgvkUDcMNJuGfZabBNwx9PgMq6SE0Oz5XYitgrGfEx55q6Hzl6nOyHq7IkEjmZGxv3N/nYq+P3w== dependencies: "@chakra-ui/alert" "2.0.11" "@chakra-ui/close-button" "2.0.11" @@ -959,7 +960,7 @@ "@chakra-ui/react-use-timeout" "2.0.2" "@chakra-ui/react-use-update-effect" "2.0.4" "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/theme" "2.1.14" + "@chakra-ui/theme" "2.1.15" "@chakra-ui/tooltip@2.2.0": version "2.2.0" @@ -988,16 +989,21 @@ framesync "5.3.0" lodash.mergewith "4.6.2" -"@chakra-ui/visually-hidden@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/visually-hidden/-/visually-hidden-2.0.11.tgz#b2eb236e803451b39cdfcce3c5ab52e773c066a3" - integrity sha512-e+5amYvnsmEQdiWH4XMyvrtGTdwz//+48vwj5CsNWWcselzkwqodmciy5rIrT71/SCQDOtmgnL7ZWAUOffxfsQ== +"@chakra-ui/visually-hidden@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/visually-hidden/-/visually-hidden-2.0.12.tgz#e4bb4983ed16dbdb7e8e84c29e81e3e493661284" + integrity sha512-5Vn21NpAol5tX5OKJlMh4pfTlX98CNhrbA29OGZyfPzNjXw2ZQo0iDUPG4gMNa9EdbVWpbbRmT6l6R6ObatEUw== "@ctrl/tinycolor@^3.4.0": version "3.4.1" - resolved "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz" + resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz#75b4c27948c81e88ccd3a8902047bcd797f38d32" integrity sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw== +"@cush/relative@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@cush/relative/-/relative-1.0.0.tgz#8cd1769bf9bde3bb27dac356b1bc94af40f6cc16" + integrity sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA== + "@emotion/babel-plugin@^11.10.5": version "11.10.5" resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.5.tgz#65fa6e1790ddc9e23cc22658a4c5dea423c55c3c" @@ -1029,19 +1035,19 @@ "@emotion/hash@^0.9.0": version "0.9.0" - resolved "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.0.tgz#c5153d50401ee3c027a57a177bc269b16d889cb7" integrity sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ== "@emotion/is-prop-valid@^0.8.2": version "0.8.8" - resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== dependencies: "@emotion/memoize" "0.7.4" "@emotion/is-prop-valid@^1.2.0": version "1.2.0" - resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz#7f2d35c97891669f7e276eb71c83376a5dc44c83" integrity sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg== dependencies: "@emotion/memoize" "^0.8.0" @@ -1053,7 +1059,7 @@ "@emotion/memoize@^0.8.0": version "0.8.0" - resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== "@emotion/react@^11.10.4": @@ -1100,33 +1106,33 @@ "@emotion/unitless@^0.8.0": version "0.8.0" - resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.0.tgz#a4a36e9cbdc6903737cd20d38033241e1b8833db" integrity sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw== "@emotion/use-insertion-effect-with-fallbacks@^1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz#ffadaec35dbb7885bd54de3fa267ab2f860294df" integrity sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A== "@emotion/utils@^1.2.0": version "1.2.0" - resolved "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561" integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw== "@emotion/weak-memoize@^0.3.0": version "0.3.0" - resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== -"@esbuild/android-arm@0.15.12": - version "0.15.12" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.12.tgz#e548b10a5e55b9e10537a049ebf0bc72c453b769" - integrity sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA== +"@esbuild/android-arm@0.15.13": + version "0.15.13" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.13.tgz#ce11237a13ee76d5eae3908e47ba4ddd380af86a" + integrity sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw== -"@esbuild/linux-loong64@0.15.12": - version "0.15.12" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.12.tgz#475b33a2631a3d8ca8aa95ee127f9a61d95bf9c1" - integrity sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw== +"@esbuild/linux-loong64@0.15.13": + version "0.15.13" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz#64e8825bf0ce769dac94ee39d92ebe6272020dfc" + integrity sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag== "@eslint/eslintrc@^1.3.3": version "1.3.3" @@ -1145,19 +1151,19 @@ "@floating-ui/core@^0.7.3": version "0.7.3" - resolved "https://registry.npmjs.org/@floating-ui/core/-/core-0.7.3.tgz" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-0.7.3.tgz#d274116678ffae87f6b60e90f88cc4083eefab86" integrity sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg== "@floating-ui/dom@^0.5.3": version "0.5.4" - resolved "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.5.4.tgz" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-0.5.4.tgz#4eae73f78bcd4bd553ae2ade30e6f1f9c73fe3f1" integrity sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg== dependencies: "@floating-ui/core" "^0.7.3" "@floating-ui/react-dom@0.7.2": version "0.7.2" - resolved "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-0.7.2.tgz" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-0.7.2.tgz#0bf4ceccb777a140fc535c87eb5d6241c8e89864" integrity sha512-1T0sJcpHgX/u4I1OzIEhlcrvkUN8ln39nz7fMoE/2HDHrPiMFoOGR7++GYyfUmIQHkkrTinaeQsO3XWubjSvGg== dependencies: "@floating-ui/dom" "^0.5.3" @@ -1174,17 +1180,17 @@ "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== dependencies: "@jridgewell/set-array" "^1.0.0" @@ -1192,7 +1198,7 @@ "@jridgewell/gen-mapping@^0.3.2": version "0.3.2" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== dependencies: "@jridgewell/set-array" "^1.0.1" @@ -1206,7 +1212,7 @@ "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== "@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": @@ -1224,7 +1230,7 @@ "@motionone/animation@^10.13.1": version "10.14.0" - resolved "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.14.0.tgz#2f2a3517183bb58d82e389aac777fe0850079de6" integrity sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ== dependencies: "@motionone/easing" "^10.14.0" @@ -1234,7 +1240,7 @@ "@motionone/dom@10.13.1": version "10.13.1" - resolved "https://registry.npmjs.org/@motionone/dom/-/dom-10.13.1.tgz" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.13.1.tgz#fc29ea5d12538f21b211b3168e502cfc07a24882" integrity sha512-zjfX+AGMIt/fIqd/SL1Lj93S6AiJsEA3oc5M9VkUr+Gz+juRmYN1vfvZd6MvEkSqEjwPQgcjN7rGZHrDB9APfQ== dependencies: "@motionone/animation" "^10.13.1" @@ -1246,7 +1252,7 @@ "@motionone/easing@^10.14.0": version "10.14.0" - resolved "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.14.0.tgz#d8154b7f71491414f3cdee23bd3838d763fffd00" integrity sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA== dependencies: "@motionone/utils" "^10.14.0" @@ -1254,7 +1260,7 @@ "@motionone/generators@^10.13.1": version "10.14.0" - resolved "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.14.0.tgz#e05d9dd56da78a4b92db99185848a0f3db62242d" integrity sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg== dependencies: "@motionone/types" "^10.14.0" @@ -1263,12 +1269,12 @@ "@motionone/types@^10.13.0", "@motionone/types@^10.14.0": version "10.14.0" - resolved "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.14.0.tgz#148c34f3270b175397e49c3058b33fab405c21e3" integrity sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ== "@motionone/utils@^10.13.1", "@motionone/utils@^10.14.0": version "10.14.0" - resolved "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.14.0.tgz#a19a3464ed35b08506747b062d035c7bc9bbe708" integrity sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw== dependencies: "@motionone/types" "^10.14.0" @@ -1277,7 +1283,7 @@ "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" @@ -1285,7 +1291,7 @@ "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": @@ -1298,26 +1304,26 @@ "@popperjs/core@^2.9.3": version "2.11.6" - resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== "@radix-ui/number@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.0.0.tgz#4c536161d0de750b3f5d55860fc3de46264f897b" integrity sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/primitive@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.0.0.tgz#e1d8ef30b10ea10e69c76e896f608d9276352253" integrity sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-arrow@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.0.1.tgz#5246adf79e97f89e819af68da51ddcf349ecf1c4" integrity sha512-1yientwXqXcErDHEv8av9ZVNEBldH8L9scVR3is20lL+jOCfcJyMFZFEY5cgIrgexsq1qggSXqiEL/d/4f+QXA== dependencies: "@babel/runtime" "^7.13.10" @@ -1325,7 +1331,7 @@ "@radix-ui/react-collection@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.0.1.tgz#259506f97c6703b36291826768d3c1337edd1de5" integrity sha512-uuiFbs+YCKjn3X1DTSx9G7BHApu4GHbi3kgiwsnFUbOKCrwejAJv4eE4Vc8C0Oaxt9T0aV4ox0WCOdx+39Xo+g== dependencies: "@babel/runtime" "^7.13.10" @@ -1336,14 +1342,14 @@ "@radix-ui/react-compose-refs@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz#37595b1f16ec7f228d698590e78eeed18ff218ae" integrity sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-context-menu@^2.0.1": version "2.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context-menu/-/react-context-menu-2.0.1.tgz#aee7c81bac9983b3748284bf3925dd63796c90b4" integrity sha512-7DuhU4xDcUk3AMJUlb5tHHOvJZ1GF4+snDIpjtWGlTvO0VktNKgbvBuGLlirdkYoUSI0mJXwOUcUXQapgIyefw== dependencies: "@babel/runtime" "^7.13.10" @@ -1356,21 +1362,21 @@ "@radix-ui/react-context@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.0.0.tgz#f38e30c5859a9fb5e9aa9a9da452ee3ed9e0aee0" integrity sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-direction@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.0.0.tgz#a2e0b552352459ecf96342c79949dd833c1e6e45" integrity sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-dismissable-layer@1.0.2": version "1.0.2" - resolved "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.2.tgz#f04d1061bddf00b1ca304148516b9ddc62e45fb2" integrity sha512-WjJzMrTWROozDqLB0uRWYvj4UuXsM/2L19EmQ3Au+IJWqwvwq9Bwd+P8ivo0Deg9JDPArR1I6MbWNi1CmXsskg== dependencies: "@babel/runtime" "^7.13.10" @@ -1382,14 +1388,14 @@ "@radix-ui/react-focus-guards@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.0.tgz#339c1c69c41628c1a5e655f15f7020bf11aa01fa" integrity sha512-UagjDk4ijOAnGu4WMUPj9ahi7/zJJqNZ9ZAiGPp7waUWJO0O1aWXi/udPphI0IUjvrhBsZJGSN66dR2dsueLWQ== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-focus-scope@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.1.tgz#faea8c25f537c5a5c38c50914b63722db0e7f951" integrity sha512-Ej2MQTit8IWJiS2uuujGUmxXjF/y5xZptIIQnyd2JHLwtV0R2j9NRVoRj/1j/gJ7e3REdaBw4Hjf4a1ImhkZcQ== dependencies: "@babel/runtime" "^7.13.10" @@ -1399,7 +1405,7 @@ "@radix-ui/react-id@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.0.0.tgz#8d43224910741870a45a8c9d092f25887bb6d11e" integrity sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw== dependencies: "@babel/runtime" "^7.13.10" @@ -1407,7 +1413,7 @@ "@radix-ui/react-menu@2.0.1": version "2.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-menu/-/react-menu-2.0.1.tgz#44ebfd45d8482db678b935c0b9d1102d683372d8" integrity sha512-I5FFZQxCl2fHoJ7R0m5/oWA9EX8/ttH4AbgneoCH7DAXQioFeb0XMAYnOVSp1GgJZ1Nx/mohxNQSeTMcaF1YPw== dependencies: "@babel/runtime" "^7.13.10" @@ -1432,7 +1438,7 @@ "@radix-ui/react-popper@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.0.1.tgz#9fa8a6a493404afa225866a5cd75af23d141baa0" integrity sha512-J4Vj7k3k+EHNWgcKrE+BLlQfpewxA7Zd76h5I0bIa+/EqaIZ3DuwrbPj49O3wqN+STnXsBuxiHLiF0iU3yfovw== dependencies: "@babel/runtime" "^7.13.10" @@ -1448,7 +1454,7 @@ "@radix-ui/react-portal@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.0.1.tgz#169c5a50719c2bb0079cf4c91a27aa6d37e5dd33" integrity sha512-NY2vUWI5WENgAT1nfC6JS7RU5xRYBfjZVLq0HmgEN1Ezy3rk/UruMV4+Rd0F40PEaFC5SrLS1ixYvcYIQrb4Ig== dependencies: "@babel/runtime" "^7.13.10" @@ -1456,7 +1462,7 @@ "@radix-ui/react-presence@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.0.0.tgz#814fe46df11f9a468808a6010e3f3ca7e0b2e84a" integrity sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w== dependencies: "@babel/runtime" "^7.13.10" @@ -1465,7 +1471,7 @@ "@radix-ui/react-primitive@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz#c1ebcce283dd2f02e4fbefdaa49d1cb13dbc990a" integrity sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA== dependencies: "@babel/runtime" "^7.13.10" @@ -1473,7 +1479,7 @@ "@radix-ui/react-roving-focus@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.1.tgz#475621f63aee43faa183a5270f35d49e530de3d7" integrity sha512-TB76u5TIxKpqMpUAuYH2VqMhHYKa+4Vs1NHygo/llLvlffN6mLVsFhz0AnSFlSBAvTBYVHYAkHAyEt7x1gPJOA== dependencies: "@babel/runtime" "^7.13.10" @@ -1489,7 +1495,7 @@ "@radix-ui/react-slider@^1.1.0": version "1.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slider/-/react-slider-1.1.0.tgz#b3fdaca27619150e9e6067ad9f979a4535f68d5e" integrity sha512-5H/QB4xD3GF9UfoSCVLBx2JjlXamMcmTyL6gr4kkd/MiAGaYB0W7Exi4MQa0tJApBFJe+KmS5InKCI56p2kmjA== dependencies: "@babel/runtime" "^7.13.10" @@ -1507,7 +1513,7 @@ "@radix-ui/react-slot@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.0.1.tgz#e7868c669c974d649070e9ecbec0b367ee0b4d81" integrity sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw== dependencies: "@babel/runtime" "^7.13.10" @@ -1515,7 +1521,7 @@ "@radix-ui/react-tooltip@^1.0.2": version "1.0.2" - resolved "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tooltip/-/react-tooltip-1.0.2.tgz#8e10b075767f785bf013146fdc954ac6885efda3" integrity sha512-11gUlok2rv5mu+KBtxniOKKNKjqC/uTbgFHWoQdbF46vMV+zjDaBvCtVDK9+MTddlpmlisGPGvvojX7Qm0yr+g== dependencies: "@babel/runtime" "^7.13.10" @@ -1534,14 +1540,14 @@ "@radix-ui/react-use-callback-ref@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz#9e7b8b6b4946fe3cbe8f748c82a2cce54e7b6a90" integrity sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-use-controllable-state@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.0.tgz#a64deaafbbc52d5d407afaa22d493d687c538b7f" integrity sha512-FohDoZvk3mEXh9AWAVyRTYR4Sq7/gavuofglmiXB2g1aKyboUD4YtgWxKj8O5n+Uak52gXQ4wKz5IFST4vtJHg== dependencies: "@babel/runtime" "^7.13.10" @@ -1549,7 +1555,7 @@ "@radix-ui/react-use-escape-keydown@1.0.2": version "1.0.2" - resolved "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.2.tgz#09ab6455ab240b4f0a61faf06d4e5132c4d639f6" integrity sha512-DXGim3x74WgUv+iMNCF+cAo8xUHHeqvjx8zs7trKf+FkQKPQXLk2sX7Gx1ysH7Q76xCpZuxIJE7HLPxRE+Q+GA== dependencies: "@babel/runtime" "^7.13.10" @@ -1557,21 +1563,21 @@ "@radix-ui/react-use-layout-effect@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz#2fc19e97223a81de64cd3ba1dc42ceffd82374dc" integrity sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-use-previous@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-previous/-/react-use-previous-1.0.0.tgz#e48a69c3a7d8078a967084038df66d0d181c56ac" integrity sha512-RG2K8z/K7InnOKpq6YLDmT49HGjNmrK+fr82UCVKT2sW0GYfVnYp4wZWBooT/EYfQ5faA9uIjvsuMMhH61rheg== dependencies: "@babel/runtime" "^7.13.10" "@radix-ui/react-use-rect@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz#b040cc88a4906b78696cd3a32b075ed5b1423b3e" integrity sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew== dependencies: "@babel/runtime" "^7.13.10" @@ -1579,7 +1585,7 @@ "@radix-ui/react-use-size@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz#a0b455ac826749419f6354dc733e2ca465054771" integrity sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg== dependencies: "@babel/runtime" "^7.13.10" @@ -1587,7 +1593,7 @@ "@radix-ui/react-visually-hidden@1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.1.tgz#9a4ac4fc97ae8d72a10e727f16b3121b5f0aa469" integrity sha512-K1hJcCMfWfiYUibRqf3V8r5Drpyf7rh44jnrwAbdvI5iCCijilBBeyQv9SKidYNZIopMdCyR9FnIjkHxHN0FcQ== dependencies: "@babel/runtime" "^7.13.10" @@ -1595,24 +1601,24 @@ "@radix-ui/rect@1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.0.0.tgz#0dc8e6a829ea2828d53cbc94b81793ba6383bf3c" integrity sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg== dependencies: "@babel/runtime" "^7.13.10" "@reduxjs/toolkit@^1.8.5": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.8.6.tgz#147fb7957befcdb75bc9c1230db63628e30e4332" - integrity sha512-4Ia/Loc6WLmdSOzi7k5ff7dLK8CgG2b8aqpLsCAJhazAzGdp//YBUSaj0ceW6a3kDBDNRrq5CRwyCS0wBiL1ig== + version "1.9.0" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.0.tgz#76b264fcea677d256b18f86cc77e00743a9e02b0" + integrity sha512-ak11IrjYcUXRqlhNPwnz6AcvA2ynJTu8PzDbbqQw4a3xR4KZtgiqbNblQD+10CRbfK4+5C79SOyxnT9dhBqFnA== dependencies: - immer "^9.0.7" - redux "^4.1.2" - redux-thunk "^2.4.1" - reselect "^4.1.5" + immer "^9.0.16" + redux "^4.2.0" + redux-thunk "^2.4.2" + reselect "^4.1.7" "@rollup/pluginutils@^4.2.1": version "4.2.1" - resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== dependencies: estree-walker "^2.0.1" @@ -1620,40 +1626,40 @@ "@socket.io/component-emitter@~3.1.0": version "3.1.0" - resolved "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== "@types/cookie@^0.4.1": version "0.4.1" - resolved "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== "@types/cors@^2.8.12": version "2.8.12" - resolved "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== "@types/dateformat@^5.0.0": version "5.0.0" - resolved "https://registry.npmjs.org/@types/dateformat/-/dateformat-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/@types/dateformat/-/dateformat-5.0.0.tgz#17ce64b0318f3f36d1c830c58a7a915445f1f93d" integrity sha512-SZg4JdHIWHQGEokbYGZSDvo5wA4TLYPXaqhigs/wH+REDOejcJzgH+qyY+HtEUtWOZxEUkbhbdYPqQDiEgrXeA== "@types/eslint@^8.4.5": - version "8.4.9" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.9.tgz#f7371980148697f4b582b086630319b55324b5aa" - integrity sha512-jFCSo4wJzlHQLCpceUhUnXdrPuCNOjGFMQ8Eg6JXxlz3QaCKOb7eGi2cephQdM4XTYsNej69P9JDJ1zqNIbncQ== + version "8.4.10" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.10.tgz#19731b9685c19ed1552da7052b6f668ed7eb64bb" + integrity sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw== dependencies: "@types/estree" "*" "@types/json-schema" "*" "@types/estree@*": version "1.0.0" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== "@types/hoist-non-react-statics@^3.3.1": version "3.3.1" - resolved "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== dependencies: "@types/react" "*" @@ -1661,34 +1667,34 @@ "@types/json-schema@*", "@types/json-schema@^7.0.9": version "7.0.11" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/lodash.mergewith@4.6.6": version "4.6.6" - resolved "https://registry.npmjs.org/@types/lodash.mergewith/-/lodash.mergewith-4.6.6.tgz" + resolved "https://registry.yarnpkg.com/@types/lodash.mergewith/-/lodash.mergewith-4.6.6.tgz#c4698f5b214a433ff35cb2c75ee6ec7f99d79f10" integrity sha512-RY/8IaVENjG19rxTZu9Nukqh0W2UrYgmBj5sdns4hWRZaV8PqR7wIKHFKzvOTjo4zVRV7sVI+yFhAJql12Kfqg== dependencies: "@types/lodash" "*" "@types/lodash@*": - version "4.14.186" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.186.tgz#862e5514dd7bd66ada6c70ee5fce844b06c8ee97" - integrity sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw== + version "4.14.188" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.188.tgz#e4990c4c81f7c9b00c5ff8eae389c10f27980da5" + integrity sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w== "@types/node@>=10.0.0": - version "18.11.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.8.tgz#16d222a58d4363a2a359656dd20b28414de5d265" - integrity sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A== + version "18.11.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" + integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== "@types/parse-json@^4.0.0": version "4.0.0" - resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prop-types@*": version "15.7.5" - resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== "@types/react-dom@^18.0.6": @@ -1700,22 +1706,22 @@ "@types/react-reconciler@^0.28.0": version "0.28.0" - resolved "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.0.tgz" + resolved "https://registry.yarnpkg.com/@types/react-reconciler/-/react-reconciler-0.28.0.tgz#513acbed173140e958c909041ca14eb40412077f" integrity sha512-5cjk9ottZAj7eaTsqzPUIlrVbh3hBAO2YaEL1rkjHKB3xNAId7oU8GhzvAX+gfmlfoxTwJnBjPxEHyxkEA1Ffg== dependencies: "@types/react" "*" "@types/react-transition-group@^4.4.5": version "4.4.5" - resolved "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.5.tgz#aae20dcf773c5aa275d5b9f7cdbca638abc5e416" integrity sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA== dependencies: "@types/react" "*" "@types/react@*", "@types/react@^18.0.17": - version "18.0.24" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.24.tgz#2f79ed5b27f08d05107aab45c17919754cc44c20" - integrity sha512-wRJWT6ouziGUy+9uX0aW4YOJxAY0bG6/AOk5AW5QSvZqI7dk6VBIbXvcVgIw/W5Jrl24f77df98GEKTJGOLx7Q== + version "18.0.25" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.25.tgz#8b1dcd7e56fe7315535a4af25435e0bb55c8ae44" + integrity sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -1723,7 +1729,7 @@ "@types/scheduler@*": version "0.16.2" - resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== "@types/semver@^7.3.12": @@ -1733,12 +1739,12 @@ "@types/use-sync-external-store@^0.0.3": version "0.0.3" - resolved "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== "@types/uuid@^8.3.4": version "8.3.4" - resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== "@typescript-eslint/eslint-plugin@^5.36.2": @@ -1839,17 +1845,17 @@ "@zag-js/element-size@0.1.0": version "0.1.0" - resolved "https://registry.npmjs.org/@zag-js/element-size/-/element-size-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/@zag-js/element-size/-/element-size-0.1.0.tgz#dfdb3f66a70328d0c3149aae29b8f99c10590c22" integrity sha512-QF8wp0+V8++z+FHXiIw93+zudtubYszOtYbNgK39fg3pi+nCZtuSm4L1jC5QZMatNZ83MfOzyNCfgUubapagJQ== "@zag-js/focus-visible@0.1.0": version "0.1.0" - resolved "https://registry.npmjs.org/@zag-js/focus-visible/-/focus-visible-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/@zag-js/focus-visible/-/focus-visible-0.1.0.tgz#9777bbaff8316d0b3a14a9095631e1494f69dbc7" integrity sha512-PeaBcTmdZWcFf7n1aM+oiOdZc+sy14qi0emPIeUuGMTjbP0xLGrZu43kdpHnWSXy7/r4Ubp/vlg50MCV8+9Isg== accepts@~1.3.4: version "1.3.8" - resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: mime-types "~2.1.34" @@ -1857,7 +1863,7 @@ accepts@~1.3.4: acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn@^8.8.0: @@ -1867,12 +1873,12 @@ acorn@^8.8.0: add@^2.0.6: version "2.0.6" - resolved "https://registry.npmjs.org/add/-/add-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/add/-/add-2.0.6.tgz#248f0a9f6e5a528ef2295dbeec30532130ae2235" integrity sha512-j5QzrmsokwWWp6kUcJQySpbG+xfOBqqKnup3OIk1pz+kB/80SLorZ9V8zHFLO92Lcd+hbvq8bT+zOGoPkmBV0Q== ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -1882,26 +1888,31 @@ ajv@^6.10.0, ajv@^6.12.4: ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + anymatch@~3.1.2: version "3.1.2" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" @@ -1909,29 +1920,29 @@ anymatch@~3.1.2: argparse@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== aria-hidden@^1.1.1: version "1.2.1" - resolved "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.1.tgz#ad8c1edbde360b454eb2bf717ea02da00bfee0f8" integrity sha512-PN344VAf9j1EAi+jyVHOJ8XidQdPVssGco39eNcsGdM4wcsILtxrKLkbuiMfLWYROK1FjRQasMWCBttrhjnr6A== dependencies: tslib "^2.0.0" array-union@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== attr-accept@^2.2.2: version "2.2.2" - resolved "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz" + resolved "https://registry.yarnpkg.com/attr-accept/-/attr-accept-2.2.2.tgz#646613809660110749e92f2c10833b70968d929b" integrity sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg== babel-plugin-macros@^3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== dependencies: "@babel/runtime" "^7.12.5" @@ -1940,22 +1951,22 @@ babel-plugin-macros@^3.1.0: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64id@2.0.0, base64id@~2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== binary-extensions@^2.0.0: version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -1963,14 +1974,14 @@ brace-expansion@^1.1.7: braces@^3.0.2, braces@~3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" browserslist@^4.21.3: version "4.21.4" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== dependencies: caniuse-lite "^1.0.30001400" @@ -1980,17 +1991,17 @@ browserslist@^4.21.3: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== caniuse-lite@^1.0.30001400: - version "1.0.30001427" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001427.tgz#d3a749f74be7ae0671fbec3a4eea18576e8ad646" - integrity sha512-lfXQ73oB9c8DP5Suxaszm+Ta2sr/4tf8+381GkIm1MLj/YdLf+rEDyDSRCzeltuyTVGm+/s18gdZ0q+Wmp8VsQ== + version "1.0.30001430" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001430.tgz#638a8ae00b5a8a97e66ff43733b2701f81b101fa" + integrity sha512-IB1BXTZKPDVPM7cnV4iaKaHxckvdr/3xtctB3f7Hmenx3qYBhGtTZ//7EllK66aKXW98Lx0+7Yr0kxBtIt3tzg== chalk@^2.0.0: version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" @@ -1999,7 +2010,7 @@ chalk@^2.0.0: chalk@^4.0.0: version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -2007,7 +2018,7 @@ chalk@^4.0.0: "chokidar@>=3.0.0 <4.0.0": version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" @@ -2022,36 +2033,41 @@ chalk@^4.0.0: color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@1.1.3: version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + compute-scroll-into-view@1.0.14: version "1.0.14" - resolved "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.14.tgz" + resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.14.tgz#80e3ebb25d6aa89f42e533956cb4b16a04cfe759" integrity sha512-mKDjINe3tc6hGelUMNDzuhorIUZ7kS7BwyY0r2wQd2HOH2tRuJykiC06iSEX8y1TuhNzvz4GcJnK16mM2J1NMQ== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== convert-source-map@^1.5.0, convert-source-map@^1.7.0: @@ -2061,19 +2077,19 @@ convert-source-map@^1.5.0, convert-source-map@^1.7.0: cookie@~0.4.1: version "0.4.2" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== copy-to-clipboard@3.3.1: version "3.3.1" - resolved "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz" + resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== dependencies: toggle-selection "^1.0.6" cors@~2.8.5: version "2.8.5" - resolved "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== dependencies: object-assign "^4" @@ -2081,7 +2097,7 @@ cors@~2.8.5: cosmiconfig@^7.0.0: version "7.0.1" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== dependencies: "@types/parse-json" "^4.0.0" @@ -2092,7 +2108,7 @@ cosmiconfig@^7.0.0: cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" @@ -2101,55 +2117,55 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: css-box-model@1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw== dependencies: tiny-invariant "^1.0.6" csstype@^3.0.11, csstype@^3.0.2: version "3.1.1" - resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== dateformat@^5.0.3: version "5.0.3" - resolved "https://registry.npmjs.org/dateformat/-/dateformat-5.0.3.tgz" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-5.0.3.tgz#fe2223eff3cc70ce716931cb3038b59a9280696e" integrity sha512-Kvr6HmPXUMerlLcLF+Pwq3K7apHpYmGDVqrxcDasBg86UcKeTSNWbEzU8bwdXnxnR44FtMhJAxI4Bov6Y/KUfA== debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" deep-is@^0.1.3: version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== detect-node-es@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== dir-glob@^3.0.1: version "3.0.1" - resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" doctrine@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" dom-helpers@^5.0.1: version "5.2.1" - resolved "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.1.tgz#d9400536b2bf8225ad98fe052e029451ac40e902" integrity sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA== dependencies: "@babel/runtime" "^7.8.7" @@ -2157,7 +2173,7 @@ dom-helpers@^5.0.1: duplexer@~0.1.1: version "0.1.2" - resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== electron-to-chromium@^1.4.251: @@ -2178,12 +2194,12 @@ engine.io-client@~6.2.3: engine.io-parser@~5.0.3: version "5.0.4" - resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== engine.io@~6.2.0: version "6.2.0" - resolved "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.0.tgz#003bec48f6815926f2b1b17873e576acd54f41d0" integrity sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg== dependencies: "@types/cookie" "^0.4.1" @@ -2199,169 +2215,169 @@ engine.io@~6.2.0: error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -esbuild-android-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.12.tgz#5e8151d5f0a748c71a7fbea8cee844ccf008e6fc" - integrity sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q== +esbuild-android-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz#5f25864055dbd62e250f360b38b4c382224063af" + integrity sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g== -esbuild-android-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.12.tgz#5ee72a6baa444bc96ffcb472a3ba4aba2cc80666" - integrity sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA== +esbuild-android-arm64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz#d8820f999314efbe8e0f050653a99ff2da632b0f" + integrity sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w== -esbuild-darwin-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.12.tgz#70047007e093fa1b3ba7ef86f9b3fa63db51fe25" - integrity sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q== +esbuild-darwin-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz#99ae7fdaa43947b06cd9d1a1c3c2c9f245d81fd0" + integrity sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg== -esbuild-darwin-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.12.tgz#41c951f23d9a70539bcca552bae6e5196696ae04" - integrity sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw== +esbuild-darwin-arm64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz#bafa1814354ad1a47adcad73de416130ef7f55e3" + integrity sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A== -esbuild-freebsd-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.12.tgz#a761b5afd12bbedb7d56c612e9cfa4d2711f33f0" - integrity sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw== +esbuild-freebsd-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz#84ef85535c5cc38b627d1c5115623b088d1de161" + integrity sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA== -esbuild-freebsd-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.12.tgz#6b0839d4d58deabc6cbd96276eb8cbf94f7f335e" - integrity sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g== +esbuild-freebsd-arm64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz#033f21de434ec8e0c478054b119af8056763c2d8" + integrity sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q== -esbuild-linux-32@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.12.tgz#bd50bfe22514d434d97d5150977496e2631345b4" - integrity sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA== +esbuild-linux-32@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz#54290ea8035cba0faf1791ce9ae6693005512535" + integrity sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w== -esbuild-linux-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.12.tgz#074bb2b194bf658245f8490f29c01ffcdfa8c931" - integrity sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA== +esbuild-linux-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz#4264249281ea388ead948614b57fb1ddf7779a2c" + integrity sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A== -esbuild-linux-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.12.tgz#3bf789c4396dc032875a122988efd6f3733f28f5" - integrity sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ== +esbuild-linux-arm64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz#9323c333924f97a02bdd2ae8912b36298acb312d" + integrity sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ== -esbuild-linux-arm@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.12.tgz#b91b5a8d470053f6c2c9c8a5e67ec10a71fe4a67" - integrity sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A== +esbuild-linux-arm@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz#b407f47b3ae721fe4e00e19e9f19289bef87a111" + integrity sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ== -esbuild-linux-mips64le@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.12.tgz#2fb54099ada3c950a7536dfcba46172c61e580e2" - integrity sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A== +esbuild-linux-mips64le@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz#bdf905aae5c0bcaa8f83567fe4c4c1bdc1f14447" + integrity sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A== -esbuild-linux-ppc64le@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.12.tgz#9e3b8c09825fb27886249dfb3142a750df29a1b7" - integrity sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg== +esbuild-linux-ppc64le@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz#2911eae1c90ff58a3bd3259cb557235df25aa3b4" + integrity sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA== -esbuild-linux-riscv64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.12.tgz#923d0f5b6e12ee0d1fe116b08e4ae4478fe40693" - integrity sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA== +esbuild-linux-riscv64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz#1837c660be12b1d20d2a29c7189ea703f93e9265" + integrity sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow== -esbuild-linux-s390x@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.12.tgz#3b1620220482b96266a0c6d9d471d451a1eab86f" - integrity sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww== +esbuild-linux-s390x@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz#d52880ece229d1bd10b2d936b792914ffb07c7fc" + integrity sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag== -esbuild-netbsd-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.12.tgz#276730f80da646859b1af5a740e7802d8cd73e42" - integrity sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w== +esbuild-netbsd-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz#de14da46f1d20352b43e15d97a80a8788275e6ed" + integrity sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ== -esbuild-openbsd-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.12.tgz#bd0eea1dd2ca0722ed489d88c26714034429f8ae" - integrity sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw== +esbuild-openbsd-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz#45e8a5fd74d92ad8f732c43582369c7990f5a0ac" + integrity sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w== -esbuild-sunos-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.12.tgz#5e56bf9eef3b2d92360d6d29dcde7722acbecc9e" - integrity sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg== +esbuild-sunos-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz#f646ac3da7aac521ee0fdbc192750c87da697806" + integrity sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw== -esbuild-windows-32@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.12.tgz#a4f1a301c1a2fa7701fcd4b91ef9d2620cf293d0" - integrity sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw== +esbuild-windows-32@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz#fb4fe77c7591418880b3c9b5900adc4c094f2401" + integrity sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA== -esbuild-windows-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.12.tgz#bc2b467541744d653be4fe64eaa9b0dbbf8e07f6" - integrity sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA== +esbuild-windows-64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz#1fca8c654392c0c31bdaaed168becfea80e20660" + integrity sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ== -esbuild-windows-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.12.tgz#9a7266404334a86be800957eaee9aef94c3df328" - integrity sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA== +esbuild-windows-arm64@0.15.13: + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz#4ffd01b6b2888603f1584a2fe96b1f6a6f2b3dd8" + integrity sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg== esbuild@^0.15.9: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.12.tgz#6c8e22d6d3b7430d165c33848298d3fc9a1f251c" - integrity sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng== + version "0.15.13" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.13.tgz#7293480038feb2bafa91d3f6a20edab3ba6c108a" + integrity sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ== optionalDependencies: - "@esbuild/android-arm" "0.15.12" - "@esbuild/linux-loong64" "0.15.12" - esbuild-android-64 "0.15.12" - esbuild-android-arm64 "0.15.12" - esbuild-darwin-64 "0.15.12" - esbuild-darwin-arm64 "0.15.12" - esbuild-freebsd-64 "0.15.12" - esbuild-freebsd-arm64 "0.15.12" - esbuild-linux-32 "0.15.12" - esbuild-linux-64 "0.15.12" - esbuild-linux-arm "0.15.12" - esbuild-linux-arm64 "0.15.12" - esbuild-linux-mips64le "0.15.12" - esbuild-linux-ppc64le "0.15.12" - esbuild-linux-riscv64 "0.15.12" - esbuild-linux-s390x "0.15.12" - esbuild-netbsd-64 "0.15.12" - esbuild-openbsd-64 "0.15.12" - esbuild-sunos-64 "0.15.12" - esbuild-windows-32 "0.15.12" - esbuild-windows-64 "0.15.12" - esbuild-windows-arm64 "0.15.12" + "@esbuild/android-arm" "0.15.13" + "@esbuild/linux-loong64" "0.15.13" + esbuild-android-64 "0.15.13" + esbuild-android-arm64 "0.15.13" + esbuild-darwin-64 "0.15.13" + esbuild-darwin-arm64 "0.15.13" + esbuild-freebsd-64 "0.15.13" + esbuild-freebsd-arm64 "0.15.13" + esbuild-linux-32 "0.15.13" + esbuild-linux-64 "0.15.13" + esbuild-linux-arm "0.15.13" + esbuild-linux-arm64 "0.15.13" + esbuild-linux-mips64le "0.15.13" + esbuild-linux-ppc64le "0.15.13" + esbuild-linux-riscv64 "0.15.13" + esbuild-linux-s390x "0.15.13" + esbuild-netbsd-64 "0.15.13" + esbuild-openbsd-64 "0.15.13" + esbuild-sunos-64 "0.15.13" + esbuild-windows-32 "0.15.13" + esbuild-windows-64 "0.15.13" + esbuild-windows-arm64 "0.15.13" escalade@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-plugin-prettier@^4.2.1: version "4.2.1" - resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" eslint-plugin-react-hooks@^4.6.0: version "4.6.0" - resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== eslint-scope@^5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -2369,7 +2385,7 @@ eslint-scope@^5.1.1: eslint-scope@^7.1.1: version "7.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== dependencies: esrecurse "^4.3.0" @@ -2377,19 +2393,19 @@ eslint-scope@^7.1.1: eslint-utils@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== dependencies: eslint-visitor-keys "^2.0.0" eslint-visitor-keys@^2.0.0: version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint-visitor-keys@^3.3.0: version "3.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8.23.0: @@ -2439,7 +2455,7 @@ eslint@^8.23.0: espree@^9.4.0: version "9.4.0" - resolved "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== dependencies: acorn "^8.8.0" @@ -2448,41 +2464,41 @@ espree@^9.4.0: esquery@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== estree-walker@^2.0.1: version "2.0.2" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== event-stream@=3.3.4: version "3.3.4" - resolved "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" integrity sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g== dependencies: duplexer "~0.1.1" @@ -2495,17 +2511,17 @@ event-stream@=3.3.4: fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2: version "1.2.0" - resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== fast-glob@^3.2.9: version "3.2.12" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -2516,50 +2532,50 @@ fast-glob@^3.2.9: fast-json-stable-stringify@^2.0.0: version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.13.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" file-entry-cache@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" file-selector@^0.6.0: version "0.6.0" - resolved "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz" + resolved "https://registry.yarnpkg.com/file-selector/-/file-selector-0.6.0.tgz#fa0a8d9007b829504db4d07dd4de0310b65287dc" integrity sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw== dependencies: tslib "^2.4.0" fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" find-root@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== find-up@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -2567,7 +2583,7 @@ find-up@^5.0.0: flat-cache@^3.0.4: version "3.0.4" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: flatted "^3.1.0" @@ -2575,7 +2591,7 @@ flat-cache@^3.0.4: flatted@^3.1.0: version "3.2.7" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== focus-lock@^0.11.2: @@ -2586,9 +2602,9 @@ focus-lock@^0.11.2: tslib "^2.0.3" framer-motion@^7.2.1: - version "7.6.2" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.6.2.tgz#7fb93ebfeda27c8c2cff1895ca7a417229e81bf7" - integrity sha512-YRr+KaC+1MlLx7iArVyjZRpc0QXI7H0XIOJrdol+dF1+WLQJwS2sP04KGq808BG+byD36UAmAt4YqObE5YFLtw== + version "7.6.4" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.6.4.tgz#e396b36f68a14e14cc95b01210feac8cd5d2824d" + integrity sha512-Ac3Bl9M45fS8A0ibOUnYMSCfjaCrFfWT0uh0/MZVm/DGWcr5IsRRinWRiVGABA9RGJgn4THehqcn235JVQkucQ== dependencies: "@motionone/dom" "10.13.1" framesync "6.1.2" @@ -2601,36 +2617,36 @@ framer-motion@^7.2.1: framesync@5.3.0: version "5.3.0" - resolved "https://registry.npmjs.org/framesync/-/framesync-5.3.0.tgz" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-5.3.0.tgz#0ecfc955e8f5a6ddc8fdb0cc024070947e1a0d9b" integrity sha512-oc5m68HDO/tuK2blj7ZcdEBRx3p1PjrgHazL8GYEpvULhrtGIFbQArN6cQS2QhW8mitffaB+VYzMjDqBxxQeoA== dependencies: tslib "^2.1.0" framesync@6.1.2: version "6.1.2" - resolved "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-6.1.2.tgz#755eff2fb5b8f3b4d2b266dd18121b300aefea27" integrity sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g== dependencies: tslib "2.4.0" from@~0: version "0.1.7" - resolved "https://registry.npmjs.org/from/-/from-0.1.7.tgz" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== gensync@^1.0.0-beta.2: @@ -2640,12 +2656,12 @@ gensync@^1.0.0-beta.2: get-nonce@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" @@ -2657,9 +2673,26 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-regex@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.3.2.tgz#27348f2f60648ec32a4a53137090b9fb934f3425" + integrity sha512-m5blUd3/OqDTWwzBBtWBPrGlAzatRywHameHeekAZyZrskYouOGdNB8T/q6JucucvJXtOuyHIn0/Yia7iDasDw== + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.1.3: version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -2671,19 +2704,19 @@ glob@^7.1.3: globals@^11.1.0: version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.15.0: version "13.17.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== dependencies: type-fest "^0.20.2" globby@^11.1.0: version "11.1.0" - resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -2693,63 +2726,63 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + grapheme-splitter@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has@^1.0.3: version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" hey-listen@^1.0.8: version "1.0.8" - resolved "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" - resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== dependencies: react-is "^16.7.0" -hotkeys-js@3.9.4: - version "3.9.4" - resolved "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.9.4.tgz" - integrity sha512-2zuLt85Ta+gIyvs4N88pCYskNrxf1TFv3LR9t5mdAZIX8BcgQQ48F2opUptvHa6m8zsy5v/a0i9mWzTrlNWU0Q== - ignore@^5.2.0: version "5.2.0" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -immer@^9.0.7: +immer@^9.0.16: version "9.0.16" resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.16.tgz#8e7caab80118c2b54b37ad43e05758cdefad0198" integrity sha512-qenGE7CstVm1NrHQbMh8YaSzTZTFNP3zPqr3YU0S0UY441j4bJTg4A2Hh5KAhwgaiU6ZZ1Ar6y/2f4TblnMReQ== immutable@^4.0.0: version "4.1.0" - resolved "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -2757,12 +2790,12 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -2770,24 +2803,24 @@ inflight@^1.0.4: inherits@2: version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== invariant@^2.2.4: version "2.2.4" - resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" @@ -2801,19 +2834,19 @@ is-core-module@^2.9.0: is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-path-inside@^3.0.3: @@ -2828,7 +2861,7 @@ isexe@^2.0.0: its-fine@^1.0.6: version "1.0.6" - resolved "https://registry.npmjs.org/its-fine/-/its-fine-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/its-fine/-/its-fine-1.0.6.tgz#087b14d71137816dab676d8b57c35a6cd5d2b021" integrity sha512-VZJZPwVT2kxe5KQv+TxCjojfLiUIut8zXDNLTxcM7gJ/xQ/bSPk5M0neZ+j3myy45KKkltY1mm1jyJgx3Fxsdg== dependencies: "@types/react-reconciler" "^0.28.0" @@ -2840,49 +2873,49 @@ js-sdsl@^4.1.4: "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsesc@^2.5.1: version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== json-parse-even-better-errors@^2.3.0: version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json5@^2.2.1: version "2.2.1" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== konva@^8.3.13: version "8.3.13" - resolved "https://registry.npmjs.org/konva/-/konva-8.3.13.tgz" + resolved "https://registry.yarnpkg.com/konva/-/konva-8.3.13.tgz#c1adc986ddf5dde4790c0ed47eef8d40a313232e" integrity sha512-O5VxHfRfTj4PscTglQH1NimS8+CC5hQYLeB8YQstu8MN/i2L8GjA1T9d7xxzITF2TD5+xcIs5ei7en3cztbNXg== levn@^0.4.1: version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -2890,41 +2923,41 @@ levn@^0.4.1: lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.mergewith@4.6.2: version "4.6.2" - resolved "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== -lodash@^4.17.21: +lodash@4.17.21, lodash@^4.17.21: version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" @@ -2938,17 +2971,17 @@ magic-string@^0.26.7: map-stream@~0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" integrity sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" - resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: version "4.0.5" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" @@ -2956,31 +2989,45 @@ micromatch@^4.0.4: mime-db@1.52.0: version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@~2.1.34: version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + ms@2.1.2: version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + nanoid@^3.3.4: version "3.3.4" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== natural-compare-lite@^1.4.0: @@ -2995,39 +3042,39 @@ natural-compare@^1.4.0: negotiator@0.6.3: version "0.6.3" - resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== node-cleanup@^2.1.2: version "2.1.2" - resolved "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz" + resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" integrity sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw== node-releases@^2.0.6: version "2.0.6" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -object-assign@^4, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== once@^1.3.0: version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" optionator@^0.9.1: version "0.9.1" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== dependencies: deep-is "^0.1.3" @@ -3039,28 +3086,28 @@ optionator@^0.9.1: p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-json@^5.0.0: version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -3070,49 +3117,54 @@ parse-json@^5.0.0: path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.1.0: version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-type@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== pause-stream@0.0.11: version "0.0.11" - resolved "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" integrity sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A== dependencies: through "~2.3" picocolors@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pirates@^4.0.1: + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + popmotion@11.0.5: version "11.0.5" - resolved "https://registry.npmjs.org/popmotion/-/popmotion-11.0.5.tgz" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.5.tgz#8e3e014421a0ffa30ecd722564fd2558954e1f7d" integrity sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA== dependencies: framesync "6.1.2" @@ -3131,19 +3183,19 @@ postcss@^8.4.18: prelude-ls@^1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== prettier-linter-helpers@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== dependencies: fast-diff "^1.1.2" prop-types@^15.6.2, prop-types@^15.8.1: version "15.8.1" - resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== dependencies: loose-envify "^1.4.0" @@ -3152,41 +3204,41 @@ prop-types@^15.6.2, prop-types@^15.8.1: ps-tree@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== dependencies: event-stream "=3.3.4" punycode@^2.1.0: version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== re-resizable@^6.9.9: version "6.9.9" - resolved "https://registry.npmjs.org/re-resizable/-/re-resizable-6.9.9.tgz" + resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.9.tgz#99e8b31c67a62115dc9c5394b7e55892265be216" integrity sha512-l+MBlKZffv/SicxDySKEEh42hR6m5bAHfNu3Tvxks2c4Ah+ldnWjfnVRwxo/nxF27SsUsxDS0raAzFuJNKABXA== react-clientside-effect@^1.2.6: version "1.2.6" - resolved "https://registry.npmjs.org/react-clientside-effect/-/react-clientside-effect-1.2.6.tgz" + resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.6.tgz#29f9b14e944a376b03fb650eed2a754dd128ea3a" integrity sha512-XGGGRQAKY+q25Lz9a/4EPqom7WRjz3z9R2k4jhVKA/puQFH/5Nt27vFZYql4m4NVNdUvX8PS3O7r/Zzm7cjUlg== dependencies: "@babel/runtime" "^7.12.13" react-colorful@^5.6.1: version "5.6.1" - resolved "https://registry.npmjs.org/react-colorful/-/react-colorful-5.6.1.tgz" + resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.6.1.tgz#7dc2aed2d7c72fac89694e834d179e32f3da563b" integrity sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw== react-dom@^18.2.0: version "18.2.0" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" @@ -3203,12 +3255,12 @@ react-dropzone@^14.2.2: react-fast-compare@3.2.0: version "3.2.0" - resolved "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== react-focus-lock@^2.9.1: version "2.9.1" - resolved "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.1.tgz" + resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.9.1.tgz#094cfc19b4f334122c73bb0bff65d77a0c92dd16" integrity sha512-pSWOQrUmiKLkffPO6BpMXN7SNKXMsuOakl652IBuALAu1esk+IcpJyM+ALcYzPTTFz1rD0R54aB9A4HuP5t1Wg== dependencies: "@babel/runtime" "^7.0.0" @@ -3218,31 +3270,36 @@ react-focus-lock@^2.9.1: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" -react-hotkeys-hook@^3.4.7: - version "3.4.7" - resolved "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-3.4.7.tgz" - integrity sha512-+bbPmhPAl6ns9VkXkNNyxlmCAIyDAcWbB76O4I0ntr3uWCRuIQf/aRLartUahe9chVMPj+OEzzfk3CQSjclUEQ== +react-hotkeys-hook@4: + version "4.0.3" + resolved "https://registry.yarnpkg.com/react-hotkeys-hook/-/react-hotkeys-hook-4.0.3.tgz#d5158ec6e6831f46145f779feab792257af854fd" + integrity sha512-w2wJ6Wf3yUhkMK+ouEbVaxVpWvFaEoUhRci6KMXyGUJRJuqijV8S7crOiH7597fPlg9gHErbYOV2vPou1vsyZg== dependencies: - hotkeys-js "3.9.4" + lodash "4.17.21" react-icons@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.6.0.tgz#f83eda179af5d02c047449a20b702c858653d397" integrity sha512-rR/L9m9340yO8yv1QT1QurxWQvWpbNHqVX0fzMln2HEb9TEIrQRGsqiNFQfiv9/JEUbyHmHPlNTB2LWm2Ttz0g== +react-image-pan-zoom-rotate@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/react-image-pan-zoom-rotate/-/react-image-pan-zoom-rotate-1.6.0.tgz#4b79dd5a160e61e1ec8d5481541e37ade4c28c6f" + integrity sha512-YpuMjhA9TlcyuC1vcKeTGnECAial0uEsjXUHcCk3GTeznwtnfpgLfMDhejCrilUud/hxueXrr9SJiQiycWjYVA== + react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== react-is@^18.0.0: version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== react-konva@^18.2.3: version "18.2.3" - resolved "https://registry.npmjs.org/react-konva/-/react-konva-18.2.3.tgz" + resolved "https://registry.yarnpkg.com/react-konva/-/react-konva-18.2.3.tgz#75c658fca493bdf515b38f2a8d544fa7a9c754c4" integrity sha512-OPxjBTgaEGU9pt/VJSVM7QNXYHEZ5CkulX+4fTTvbaH+Wh+vMLbXmH3yjWw4kT/5Qi6t0UQKHPPmirCv8/9sdg== dependencies: its-fine "^1.0.6" @@ -3251,16 +3308,16 @@ react-konva@^18.2.3: react-reconciler@~0.29.0: version "0.29.0" - resolved "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.0.tgz" + resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.29.0.tgz#ee769bd362915076753f3845822f2d1046603de7" integrity sha512-wa0fGj7Zht1EYMRhKWwoo1H9GApxYLBuhoAuXN0TlltESAjDssB+Apf0T/DngVqaMyPypDmabL37vw/2aRM98Q== dependencies: loose-envify "^1.1.0" scheduler "^0.23.0" react-redux@^8.0.2: - version "8.0.4" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.0.4.tgz#80c31dffa8af9526967c4267022ae1525ff0e36a" - integrity sha512-yMfQ7mX6bWuicz2fids6cR1YT59VTuT8MKyyE310wJQlINKENCeT1UcPdEiX6znI5tF8zXyJ/VYvDgeGuaaNwQ== + version "8.0.5" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.0.5.tgz#e5fb8331993a019b8aaf2e167a93d10af469c7bd" + integrity sha512-Q2f6fCKxPFpkXt1qNRZdEDLlScsDWyrgSj0mliK59qU6W5gvBiKkdMEG2lJzhd1rCctf0hb6EtePPLZ2e0m1uw== dependencies: "@babel/runtime" "^7.12.1" "@types/hoist-non-react-statics" "^3.3.1" @@ -3271,7 +3328,7 @@ react-redux@^8.0.2: react-refresh@^0.14.0: version "0.14.0" - resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== react-remove-scroll-bar@^2.3.3: @@ -3284,7 +3341,7 @@ react-remove-scroll-bar@^2.3.3: react-remove-scroll@2.5.5, react-remove-scroll@^2.5.4: version "2.5.5" - resolved "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz#1e31a1260df08887a8a0e46d09271b52b3a37e77" integrity sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw== dependencies: react-remove-scroll-bar "^2.3.3" @@ -3295,7 +3352,7 @@ react-remove-scroll@2.5.5, react-remove-scroll@^2.5.4: react-style-singleton@^2.2.1: version "2.2.1" - resolved "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz" + resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.1.tgz#f99e420492b2d8f34d38308ff660b60d0b1205b4" integrity sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g== dependencies: get-nonce "^1.0.0" @@ -3304,7 +3361,7 @@ react-style-singleton@^2.2.1: react-transition-group@^4.4.5: version "4.4.5" - resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1" integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g== dependencies: "@babel/runtime" "^7.5.5" @@ -3314,31 +3371,47 @@ react-transition-group@^4.4.5: react@^18.2.0: version "18.2.0" - resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" +recrawl-sync@^2.0.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/recrawl-sync/-/recrawl-sync-2.2.3.tgz#757adcdaae4799466dde5b8ee52122ff9636dfb1" + integrity sha512-vSaTR9t+cpxlskkdUFrsEpnf67kSmPk66yAGT1fZPrDudxQjoMzPgQhSMImQ0pAw5k0NPirefQfhopSjhdUtpQ== + dependencies: + "@cush/relative" "^1.0.0" + glob-regex "^0.3.0" + slash "^3.0.0" + sucrase "^3.20.3" + tslib "^1.9.3" + +redux-deep-persist@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/redux-deep-persist/-/redux-deep-persist-1.0.6.tgz#f7f0d15c76463a9c9f31269ea8e612ca7c058980" + integrity sha512-WL/u8MxJGsm0fpywW4zSOWOY3caGi1xx04aYz9UP7QXcqzStVq7fKFf/9g4JYAZ3YRPvukZw0m6O+vt4hTDn9g== + redux-persist@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/redux-persist/-/redux-persist-6.0.0.tgz#b4d2972f9859597c130d40d4b146fecdab51b3a8" integrity sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ== -redux-thunk@^2.4.1: - version "2.4.1" - resolved "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz" - integrity sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q== +redux-thunk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" + integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== -redux@^4.1.2: +redux@^4.2.0: version "4.2.0" - resolved "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.0.tgz#46f10d6e29b6666df758780437651eeb2b969f13" integrity sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA== dependencies: "@babel/runtime" "^7.9.2" @@ -3350,22 +3423,22 @@ regenerator-runtime@^0.13.10: regexpp@^3.2.0: version "3.2.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== -reselect@^4.1.5: - version "4.1.6" - resolved "https://registry.npmjs.org/reselect/-/reselect-4.1.6.tgz" - integrity sha512-ZovIuXqto7elwnxyXbBtCPo9YFEr3uJqj2rRbcOOog1bmu2Ag85M4hixSwFWyaBMKXNgvPaJ9OSu9SkBPIeJHQ== +reselect@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.7.tgz#56480d9ff3d3188970ee2b76527bd94a95567a42" + integrity sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A== resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve@^1.19.0, resolve@^1.22.1: version "1.22.1" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: is-core-module "^2.9.0" @@ -3374,12 +3447,12 @@ resolve@^1.19.0, resolve@^1.22.1: reusify@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" @@ -3399,9 +3472,9 @@ run-parallel@^1.1.9: queue-microtask "^1.2.2" sass@^1.55.0: - version "1.55.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c" - integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A== + version "1.56.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.56.0.tgz#134032075a3223c8d49cb5c35e091e5ba1de8e0a" + integrity sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -3409,14 +3482,14 @@ sass@^1.55.0: scheduler@^0.23.0: version "0.23.0" - resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" semver@^6.3.0: version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== semver@^7.3.7: @@ -3428,24 +3501,24 @@ semver@^7.3.7: shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== slash@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== socket.io-adapter@~2.4.0: version "2.4.0" - resolved "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== socket.io-client@^4.5.2: @@ -3460,7 +3533,7 @@ socket.io-client@^4.5.2: socket.io-parser@~4.2.0: version "4.2.1" - resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== dependencies: "@socket.io/component-emitter" "~3.1.0" @@ -3480,53 +3553,58 @@ socket.io@^4.5.2: "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== source-map@^0.5.7: version "0.5.7" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== sourcemap-codec@^1.4.8: version "1.4.8" - resolved "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== split@0.3: version "0.3.3" - resolved "https://registry.npmjs.org/split/-/split-0.3.3.tgz" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" integrity sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA== dependencies: through "2" stream-combiner@~0.0.4: version "0.0.4" - resolved "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" integrity sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw== dependencies: duplexer "~0.1.1" string-argv@^0.1.1: version "0.1.2" - resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.1.2.tgz" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.1.2.tgz#c5b7bc03fb2b11983ba3a72333dd0559e77e4738" integrity sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA== strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== style-value-types@5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/style-value-types/-/style-value-types-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.1.2.tgz#6be66b237bd546048a764883528072ed95713b62" integrity sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q== dependencies: hey-listen "^1.0.8" @@ -3537,33 +3615,59 @@ stylis@4.1.3: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== +sucrase@^3.20.3: + version "3.28.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.28.0.tgz#7fd8b3118d2155fcdf291088ab77fa6eefd63c4c" + integrity sha512-TK9600YInjuiIhVM3729rH4ZKPOsGeyXUwY+Ugu9eilNbdTFyHr6XcAGYbRVZPDgWj6tgI7bx95aaJjHnbffag== + dependencies: + commander "^4.0.0" + glob "7.1.6" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== text-table@^0.2.0: version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + through@2, through@~2.3, through@~2.3.1: version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== tiny-invariant@^1.0.6: @@ -3573,24 +3677,29 @@ tiny-invariant@^1.0.6: to-fast-properties@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" toggle-selection@^1.0.6: version "1.0.6" - resolved "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + tsc-watch@^5.0.3: version "5.0.3" - resolved "https://registry.npmjs.org/tsc-watch/-/tsc-watch-5.0.3.tgz" + resolved "https://registry.yarnpkg.com/tsc-watch/-/tsc-watch-5.0.3.tgz#4d0b2bda8f2677c8f9ed36e001c1a86c31701145" integrity sha512-Hz2UawwELMSLOf0xHvAFc7anLeMw62cMVXr1flYmhRuOhOyOljwmb1l/O60ZwRyy1k7N1iC1mrn1QYM2zITfuw== dependencies: cross-spawn "^7.0.3" @@ -3599,12 +3708,21 @@ tsc-watch@^5.0.3: string-argv "^0.1.1" strip-ansi "^6.0.0" +tsconfig-paths@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz#f8ef7d467f08ae3a695335bf1ece088c5538d2c1" + integrity sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow== + dependencies: + json5 "^2.2.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@2.4.0: version "2.4.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^1.8.1: +tslib@^1.8.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -3623,14 +3741,14 @@ tsutils@^3.21.0: type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" type-fest@^0.20.2: version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== typescript@^4.6.4: @@ -3648,26 +3766,31 @@ update-browserslist-db@^1.0.9: uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" use-callback-ref@^1.3.0: version "1.3.0" - resolved "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.0.tgz#772199899b9c9a50526fedc4993fc7fa1f7e32d5" integrity sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w== dependencies: tslib "^2.0.0" +use-image@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/use-image/-/use-image-1.1.0.tgz#dc244c34506d3cf3a8177c1f0bbfb158b9beefe5" + integrity sha512-+cBHRR/44ZyMUS873O0vbVylgMM0AbdTunEplAWXvIQ2p69h2sIo2Qq74zeUsq6AMo+27e5lERQvXzd1crGiMg== + use-isomorphic-layout-effect@^1.1.1: version "1.1.2" - resolved "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== use-sidecar@^1.1.2: version "1.1.2" - resolved "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.2.tgz#2f43126ba2d7d7e117aa5855e5d8f0276dfe73c2" integrity sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw== dependencies: detect-node-es "^1.1.0" @@ -3675,28 +3798,38 @@ use-sidecar@^1.1.2: use-sync-external-store@^1.0.0: version "1.2.0" - resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== uuid@^9.0.0: version "9.0.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== vary@^1: version "1.1.2" - resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== vite-plugin-eslint@^1.8.1: version "1.8.1" - resolved "https://registry.npmjs.org/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz" + resolved "https://registry.yarnpkg.com/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz#0381b8272e7f0fd8b663311b64f7608d55d8b04c" integrity sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang== dependencies: "@rollup/pluginutils" "^4.2.1" "@types/eslint" "^8.4.5" rollup "^2.77.2" +vite-tsconfig-paths@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-3.5.2.tgz#fd3232f93c426311d7e0d581187d8b63fff55fbc" + integrity sha512-xJMgHA2oJ28QCG2f+hXrcqzo7IttrSRK4A//Tp94CfuX5eetOx33qiwXHUdi3FwkHP2ocpxHuvE45Ix67gwEmQ== + dependencies: + debug "^4.1.1" + globrex "^0.1.2" + recrawl-sync "^2.0.3" + tsconfig-paths "^4.0.0" + vite@^3.0.7: version "3.2.2" resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.2.tgz#280762bfaf47bcea1d12698427331c0009ac7c1f" @@ -3711,47 +3844,47 @@ vite@^3.0.7: which@^2.0.1: version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" word-wrap@^1.2.3: version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wrappy@1: version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@~8.2.3: version "8.2.3" - resolved "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== xmlhttprequest-ssl@~2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.10.0: version "1.10.2" - resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yarn@^1.22.19: version "1.22.19" - resolved "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz" + resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.19.tgz#4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" integrity sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/ldm/generate.py b/ldm/generate.py index e544cbde4f..12127e69ea 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -324,6 +324,7 @@ class Generate: seam_steps: int = 10, tile_size: int = 32, force_outpaint: bool = False, + enable_image_debugging = False, **args, ): # eat up additional cruft """ @@ -462,7 +463,7 @@ class Generate: ) # TODO: Hacky selection of operation to perform. Needs to be refactored. - generator = self.select_generator(init_image, mask_image, embiggen, hires_fix) + generator = self.select_generator(init_image, mask_image, embiggen, hires_fix, force_outpaint) generator.set_variation( self.seed, variation_amount, with_variations @@ -505,8 +506,9 @@ class Generate: seam_steps = seam_steps, tile_size = tile_size, force_outpaint = force_outpaint, - inpaint_width = inpaint_width, - inpaint_height = inpaint_height + inpaint_height = inpaint_height, + inpaint_width = inpaint_width, + enable_image_debugging = enable_image_debugging, ) if init_color: diff --git a/ldm/invoke/args.py b/ldm/invoke/args.py index cb6a4ac3d9..e626b4206f 100644 --- a/ldm/invoke/args.py +++ b/ldm/invoke/args.py @@ -550,6 +550,11 @@ class Args(object): type=str, help='Path to a pre-trained embedding manager checkpoint - can only be set on command line', ) + render_group.add_argument( + '--enable_image_debugging', + action='store_true', + help='Generates debugging image to display' + ) # Restoration related args postprocessing_group.add_argument( '--no_restore', diff --git a/ldm/invoke/generator/base.py b/ldm/invoke/generator/base.py index 003ac1b466..a8ef62822d 100644 --- a/ldm/invoke/generator/base.py +++ b/ldm/invoke/generator/base.py @@ -8,7 +8,8 @@ import random import os import traceback from tqdm import tqdm, trange -from PIL import Image, ImageFilter +from PIL import Image, ImageFilter, ImageChops +import cv2 as cv from einops import rearrange, repeat from pytorch_lightning import seed_everything from ldm.invoke.devices import choose_autocast @@ -118,6 +119,55 @@ class Generator(): # write an approximate RGB image from latent samples for a single step to PNG + def repaste_and_color_correct(self, result: Image.Image, init_image: Image.Image, init_mask: Image.Image, mask_blur_radius: int = 8) -> Image.Image: + if init_image is None or init_mask is None: + return result + + # Get the original alpha channel of the mask if there is one. + # Otherwise it is some other black/white image format ('1', 'L' or 'RGB') + pil_init_mask = init_mask.getchannel('A') if init_mask.mode == 'RGBA' else init_mask.convert('L') + pil_init_image = init_image.convert('RGBA') # Add an alpha channel if one doesn't exist + + # Build an image with only visible pixels from source to use as reference for color-matching. + init_rgb_pixels = np.asarray(init_image.convert('RGB'), dtype=np.uint8) + init_a_pixels = np.asarray(pil_init_image.getchannel('A'), dtype=np.uint8) + init_mask_pixels = np.asarray(pil_init_mask, dtype=np.uint8) + + # Get numpy version of result + np_image = np.asarray(result, dtype=np.uint8) + + # Mask and calculate mean and standard deviation + mask_pixels = init_a_pixels * init_mask_pixels > 0 + np_init_rgb_pixels_masked = init_rgb_pixels[mask_pixels, :] + np_image_masked = np_image[mask_pixels, :] + + init_means = np_init_rgb_pixels_masked.mean(axis=0) + init_std = np_init_rgb_pixels_masked.std(axis=0) + gen_means = np_image_masked.mean(axis=0) + gen_std = np_image_masked.std(axis=0) + + # Color correct + np_matched_result = np_image.copy() + np_matched_result[:,:,:] = (((np_matched_result[:,:,:].astype(np.float32) - gen_means[None,None,:]) / gen_std[None,None,:]) * init_std[None,None,:] + init_means[None,None,:]).clip(0, 255).astype(np.uint8) + matched_result = Image.fromarray(np_matched_result, mode='RGB') + + # Blur the mask out (into init image) by specified amount + if mask_blur_radius > 0: + nm = np.asarray(pil_init_mask, dtype=np.uint8) + nmd = cv.erode(nm, kernel=np.ones((3,3), dtype=np.uint8), iterations=int(mask_blur_radius / 2)) + pmd = Image.fromarray(nmd, mode='L') + blurred_init_mask = pmd.filter(ImageFilter.BoxBlur(mask_blur_radius)) + else: + blurred_init_mask = pil_init_mask + + multiplied_blurred_init_mask = ImageChops.multiply(blurred_init_mask, self.pil_image.split()[-1]) + + # Paste original on color-corrected generation (using blurred mask) + matched_result.paste(init_image, (0,0), mask = multiplied_blurred_init_mask) + return matched_result + + + def sample_to_lowres_estimated_image(self,samples): # origingally adapted from code by @erucipe and @keturn here: # https://discuss.huggingface.co/t/decoding-latents-to-rgb-without-upscaling/23204/7 diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index d1f79b934f..72601a7146 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -8,7 +8,7 @@ import torchvision.transforms as T import numpy as np import cv2 as cv import PIL -from PIL import Image, ImageFilter, ImageOps +from PIL import Image, ImageFilter, ImageOps, ImageChops from skimage.exposure.histogram_matching import match_histograms from einops import rearrange, repeat from ldm.invoke.devices import choose_autocast @@ -16,6 +16,7 @@ from ldm.invoke.generator.img2img import Img2Img from ldm.models.diffusion.ddim import DDIMSampler from ldm.models.diffusion.ksampler import KSampler from ldm.invoke.generator.base import downsampling +from ldm.util import debug_image class Inpaint(Img2Img): def __init__(self, model, precision): @@ -47,6 +48,13 @@ class Inpaint(Img2Img): if im.mode != 'RGBA': return im + # # HACK PATCH MATCH + # from src.PyPatchMatch import patch_match + # im_patched_np = patch_match.inpaint(im.convert('RGB'), ImageOps.invert(im.split()[-1]), patch_size = 3) + # im_patched = Image.fromarray(im_patched_np, mode = 'RGB') + # return im_patched + # # /HACK + a = np.asarray(im, dtype=np.uint8) tile_size = (tile_size, tile_size) @@ -150,9 +158,7 @@ class Inpaint(Img2Img): seam_steps: int = 10, tile_size: int = 32, step_callback=None, - inpaint_replace=False, - inpaint_width=None, - inpaint_height=None, + inpaint_replace=False, enable_image_debugging=False, **kwargs): """ Returns a function returning an image derived from the prompt and @@ -160,8 +166,7 @@ class Inpaint(Img2Img): the time you call it. kwargs are 'init_latent' and 'strength' """ - self.inpaint_width = inpaint_width - self.inpaint_height = inpaint_height + self.enable_image_debugging = enable_image_debugging if isinstance(init_image, PIL.Image.Image): self.pil_image = init_image @@ -174,21 +179,17 @@ class Inpaint(Img2Img): tile_size = tile_size ) init_filled.paste(init_image, (0,0), init_image.split()[-1]) - - # Resize if requested for inpainting - if inpaint_width and inpaint_height: - init_filled = init_filled.resize((inpaint_width, inpaint_height)) - + debug_image(init_filled, "init_filled", debug_status=self.enable_image_debugging) + # Create init tensor init_image = self._image_to_tensor(init_filled.convert('RGB')) if isinstance(mask_image, PIL.Image.Image): self.pil_mask = mask_image + debug_image(mask_image, "mask_image BEFORE multiply with pil_image", debug_status=self.enable_image_debugging) - # Resize if requested for inpainting - if inpaint_width and inpaint_height: - mask_image = mask_image.resize((inpaint_width, inpaint_height)) - + mask_image = ImageChops.multiply(mask_image, self.pil_image.split()[-1].convert('RGB')) + debug_image(mask_image, "mask_image AFTER multiply with pil_image", debug_status=self.enable_image_debugging) mask_image = mask_image.resize( ( mask_image.width // downsampling, @@ -277,59 +278,14 @@ class Inpaint(Img2Img): return make_image - def color_correct(self, image: Image.Image, base_image: Image.Image, mask: Image.Image, mask_blur_radius: int) -> Image.Image: - # Get the original alpha channel of the mask if there is one. - # Otherwise it is some other black/white image format ('1', 'L' or 'RGB') - pil_init_mask = mask.getchannel('A') if mask.mode == 'RGBA' else mask.convert('L') - pil_init_image = base_image.convert('RGBA') # Add an alpha channel if one doesn't exist - - # Build an image with only visible pixels from source to use as reference for color-matching. - init_rgb_pixels = np.asarray(base_image.convert('RGB'), dtype=np.uint8) - init_a_pixels = np.asarray(pil_init_image.getchannel('A'), dtype=np.uint8) - init_mask_pixels = np.asarray(pil_init_mask, dtype=np.uint8) - - # Get numpy version of result - np_image = np.asarray(image, dtype=np.uint8) - - # Mask and calculate mean and standard deviation - mask_pixels = init_a_pixels * init_mask_pixels > 0 - np_init_rgb_pixels_masked = init_rgb_pixels[mask_pixels, :] - np_image_masked = np_image[mask_pixels, :] - - init_means = np_init_rgb_pixels_masked.mean(axis=0) - init_std = np_init_rgb_pixels_masked.std(axis=0) - gen_means = np_image_masked.mean(axis=0) - gen_std = np_image_masked.std(axis=0) - - # Color correct - np_matched_result = np_image.copy() - np_matched_result[:,:,:] = (((np_matched_result[:,:,:].astype(np.float32) - gen_means[None,None,:]) / gen_std[None,None,:]) * init_std[None,None,:] + init_means[None,None,:]).clip(0, 255).astype(np.uint8) - matched_result = Image.fromarray(np_matched_result, mode='RGB') - - # Blur the mask out (into init image) by specified amount - if mask_blur_radius > 0: - nm = np.asarray(pil_init_mask, dtype=np.uint8) - nmd = cv.erode(nm, kernel=np.ones((3,3), dtype=np.uint8), iterations=int(mask_blur_radius / 2)) - pmd = Image.fromarray(nmd, mode='L') - blurred_init_mask = pmd.filter(ImageFilter.BoxBlur(mask_blur_radius)) - else: - blurred_init_mask = pil_init_mask - - # Paste original on color-corrected generation (using blurred mask) - matched_result.paste(base_image, (0,0), mask = blurred_init_mask) - return matched_result - - def sample_to_image(self, samples)->Image.Image: gen_result = super().sample_to_image(samples).convert('RGB') - - # Resize if necessary - if self.inpaint_width and self.inpaint_height: - gen_result = gen_result.resize(self.pil_image.size) + debug_image(gen_result, "gen_result", debug_status=self.enable_image_debugging) if self.pil_image is None or self.pil_mask is None: return gen_result - corrected_result = self.color_correct(gen_result, self.pil_image, self.pil_mask, self.mask_blur_radius) + corrected_result = super().repaste_and_color_correct(gen_result, self.pil_image, self.pil_mask, self.mask_blur_radius) + debug_image(corrected_result, "corrected_result", debug_status=self.enable_image_debugging) return corrected_result diff --git a/ldm/invoke/generator/omnibus.py b/ldm/invoke/generator/omnibus.py index e8426a9205..35c4a62d66 100644 --- a/ldm/invoke/generator/omnibus.py +++ b/ldm/invoke/generator/omnibus.py @@ -3,7 +3,7 @@ import torch import numpy as np from einops import repeat -from PIL import Image, ImageOps +from PIL import Image, ImageOps, ImageChops from ldm.invoke.devices import choose_autocast from ldm.invoke.generator.base import downsampling from ldm.invoke.generator.img2img import Img2Img @@ -29,6 +29,7 @@ class Omnibus(Img2Img,Txt2Img): step_callback=None, threshold=0.0, perlin=0.0, + mask_blur_radius: int = 8, **kwargs): """ Returns a function returning an image derived from the prompt and the initial image @@ -42,12 +43,18 @@ class Omnibus(Img2Img,Txt2Img): ) if isinstance(init_image, Image.Image): + self.pil_image = init_image if init_image.mode != 'RGB': init_image = init_image.convert('RGB') init_image = self._image_to_tensor(init_image) if isinstance(mask_image, Image.Image): - mask_image = self._image_to_tensor(ImageOps.invert(mask_image).convert('L'),normalize=False) + self.pil_mask = mask_image + + mask_image = ImageChops.multiply(mask_image.convert('L'), self.pil_image.split()[-1]) + mask_image = self._image_to_tensor(ImageOps.invert(mask_image), normalize=False) + + self.mask_blur_radius = mask_blur_radius t_enc = steps @@ -151,3 +158,14 @@ class Omnibus(Img2Img,Txt2Img): height = self.init_latent.shape[2] width = self.init_latent.shape[3] return Txt2Img.get_noise(self,width,height) + + + def sample_to_image(self, samples)->Image.Image: + gen_result = super().sample_to_image(samples).convert('RGB') + + if self.pil_image is None or self.pil_mask is None: + return gen_result + + corrected_result = super(Img2Img, self).repaste_and_color_correct(gen_result, self.pil_image, self.pil_mask, self.mask_blur_radius) + + return corrected_result diff --git a/ldm/util.py b/ldm/util.py index 478c66b8b5..ae28edb96a 100644 --- a/ldm/util.py +++ b/ldm/util.py @@ -244,3 +244,21 @@ def ask_user(question: str, answers: list): user_answers = map(input, pose_question) valid_response = next(filter(answers.__contains__, user_answers)) return valid_response + + +def debug_image(debug_image, debug_text, debug_show=True, debug_result=False, debug_status=False ): + if not debug_status: + return + + image_copy = debug_image.copy() + ImageDraw.Draw(image_copy).text( + (5, 5), + debug_text, + (255, 0, 0) + ) + + if debug_show: + image_copy.show() + + if debug_result: + return image_copy \ No newline at end of file From d1fbe81a60cca3e4c25635e6ca9a3f9783cd9909 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 08:17:50 +1100 Subject: [PATCH 007/220] Pins react-hotkeys-hook to v4.0.2 See: https://github.com/JohannesKlauss/react-hotkeys-hook/issues/835 --- frontend/package.json | 2 +- frontend/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index add1d137ce..18c2ff4def 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -30,7 +30,7 @@ "react-colorful": "^5.6.1", "react-dom": "^18.2.0", "react-dropzone": "^14.2.2", - "react-hotkeys-hook": "4", + "react-hotkeys-hook": "4.0.2", "react-icons": "^4.4.0", "react-image-pan-zoom-rotate": "^1.6.0", "react-konva": "^18.2.3", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index c62800507e..1b3e06fea1 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3270,10 +3270,10 @@ react-focus-lock@^2.9.1: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" -react-hotkeys-hook@4: - version "4.0.3" - resolved "https://registry.yarnpkg.com/react-hotkeys-hook/-/react-hotkeys-hook-4.0.3.tgz#d5158ec6e6831f46145f779feab792257af854fd" - integrity sha512-w2wJ6Wf3yUhkMK+ouEbVaxVpWvFaEoUhRci6KMXyGUJRJuqijV8S7crOiH7597fPlg9gHErbYOV2vPou1vsyZg== +react-hotkeys-hook@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/react-hotkeys-hook/-/react-hotkeys-hook-4.0.2.tgz#f56905a07ae975d297b86d8a7bbc434b597749f4" + integrity sha512-4UVC0jpvgfBqfrfbeEJHm/Jh+MKRTqX/z0BZR6kc51wYMf9IXaNUbLna/7z6vphGESmHJbiU/9TvvHJeMZTIOA== dependencies: lodash "4.17.21" From 458081f9c99ef2f0d4239eeaa1f3103fda7e9eb6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 08:17:58 +1100 Subject: [PATCH 008/220] Builds fresh bundle --- frontend/dist/assets/index.40a72c80.css | 1 - frontend/dist/assets/index.4d3899e5.js | 515 ++++++++++++++++++++++++ frontend/dist/assets/index.a44a1287.css | 1 + frontend/dist/index.html | 5 + 4 files changed, 521 insertions(+), 1 deletion(-) delete mode 100644 frontend/dist/assets/index.40a72c80.css create mode 100644 frontend/dist/assets/index.4d3899e5.js create mode 100644 frontend/dist/assets/index.a44a1287.css diff --git a/frontend/dist/assets/index.40a72c80.css b/frontend/dist/assets/index.40a72c80.css deleted file mode 100644 index bd00208028..0000000000 --- a/frontend/dist/assets/index.40a72c80.css +++ /dev/null @@ -1 +0,0 @@ -[data-theme=dark]{--white: rgb(255, 255, 255);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-hover: rgb(104, 60, 230);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--svg-color: rgb(24, 24, 34);--progress-bar-color: rgb(100, 50, 245);--prompt-bg-color: rgb(10, 10, 10);--btn-svg-color: rgb(255, 255, 255);--btn-grey: rgb(30, 32, 42);--btn-grey-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: rgb(80, 40, 200);--resizeable-handle-border-color: rgb(80, 82, 112);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--tab-panel-bg: rgb(20, 22, 28);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(80, 40, 200);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(140, 110, 255);--input-box-shadow-color: rgb(80, 30, 210);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: rgb(80, 40, 200);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255)}[data-theme=light]{--white: rgb(255, 255, 255);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-hover: rgb(255, 200, 0);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--svg-color: rgb(186, 188, 190);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--btn-svg-color: rgb(0, 0, 0);--btn-grey: rgb(220, 222, 224);--btn-grey-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--resizeable-handle-border-color: rgb(160, 162, 164);--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--tab-panel-bg: rgb(214, 216, 218);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0)}@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}.checkerboard{background-position:0px 0px,10px 10px;background-size:20px 20px;background-image:linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%,#eee 100%),linear-gradient(45deg,#eee 25%,white 25%,white 75%,#eee 75%,#eee 100%)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{background-color:var(--settings-modal-bg)!important;max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)!important}.settings-modal .settings-modal-reset button:disabled{background-color:#2d2d37!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d2d37!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none!important}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem}.hotkeys-modal{width:36rem!important;max-width:36rem!important;display:grid;padding:1rem;background-color:var(--settings-modal-bg)!important;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem!important}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;border:2px solid var(--settings-modal-bg);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color)!important;position:fixed!important;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)!important}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)!important}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color)!important;position:fixed!important;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)!important}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)!important}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)!important}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn svg{width:18px!important;height:18px!important}.invoke-btn:hover{background-color:var(--accent-color-hover)!important}.invoke-btn:disabled{background-color:#2d2d37!important}.invoke-btn:disabled:hover{background-color:#2d2d37!important}.invoke-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.cancel-btn{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)!important}.cancel-btn:disabled{background-color:#2d2d37!important}.cancel-btn:disabled:hover{background-color:#2d2d37!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-grey);border:3px solid var(--btn-grey)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-grey);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-grey)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-grey)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.4rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{width:100%;font-size:.9rem!important;font-weight:700}.main-option-block .number-input-entry{padding:0;height:2.4rem}.main-option-block .iai-select-picker{height:2.4rem;border-radius:.3rem}.advanced-options-checkbox{padding:1rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;border:2px solid var(--tab-hover-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)!important}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.4rem .4rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem!important;height:1.2rem!important;background:none!important}.inpainting-bounding-box-header button:hover{background:none!important}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-load-more)!important}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-load-more-hover)!important}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem!important;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{background-color:var(--img2img-img-bg-color);border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--tab-color);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header div{display:flex;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)!important}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)!important}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;background-color:var(--background-color-secondary);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:5rem;height:5rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more)!important;font-size:.85rem!important;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)!important}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)!important}.image-gallery-category-btn-group{width:100%!important;column-gap:0!important;justify-content:stretch!important}.image-gallery-category-btn-group button{flex-grow:1}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.app-tabs{display:grid!important;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-wrapper .workarea-main .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-right{padding-left:.5rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0;z-index:20}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)!important}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:grid;grid-template-columns:none!important}.image-to-image-strength-main-option .number-input-entry{padding:0 1rem}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute!important;top:50%;transform:translateY(-50%);z-index:20;padding:0;min-width:1rem;min-height:12rem;background-color:var(--btn-grey)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0!important}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem!important}.floating-show-hide-button:hover{background-color:var(--btn-grey-hover)!important}.floating-show-hide-button:disabled{background-color:#2d2d37!important}.floating-show-hide-button:disabled:hover{background-color:#2d2d37!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute!important;transform:translateY(-50%);z-index:20;min-width:2rem!important;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0!important;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0;background-color:var(--btn-grey)}.show-hide-button-options button svg{width:18px}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem!important}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.inpainting-alerts{position:absolute;top:0;left:0;z-index:2;margin:.5rem}.inpainting-alerts button{background-color:var(--inpainting-alerts-bg)}.inpainting-alerts button svg{fill:var(--inpainting-alerts-icon-color)}.inpainting-alerts button[data-selected=true]{background-color:var(--inpainting-alerts-bg-active)}.inpainting-alerts button[data-selected=true] svg{fill:var(--inpainting-alerts-icon-active)}.inpainting-alerts button[data-alert=true]{background-color:var(--inpainting-alerts-bg-alert)}.inpainting-alerts button[data-alert=true] svg{fill:var(--inpainting-alerts-icon-alert)}.invokeai__number-input-form-control{display:grid;grid-template-columns:max-content auto;align-items:center}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;flex-grow:2;white-space:nowrap;padding-right:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;padding:0;font-size:.9rem;padding-left:.5rem;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background-color:var(--btn-grey);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-grey-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none!important}.invokeai__icon-button[data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{border-color:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-grey);border:3px solid var(--btn-grey)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-grey);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{justify-content:space-between}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary)}.invokeai__slider-form-control{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;width:max-content;padding-right:.25rem}.invokeai__slider-form-control .invokeai__slider-inner-container{display:flex;column-gap:.5rem}.invokeai__slider-form-control .invokeai__slider-inner-container .invokeai__slider-form-label{color:var(--text-color-secondary);margin:0;margin-right:.5rem;margin-bottom:.1rem}.invokeai__slider-form-control .invokeai__slider-inner-container .invokeai__slider-root .invokeai__slider-filled-track{background-color:var(--accent-color-hover)}.invokeai__slider-form-control .invokeai__slider-inner-container .invokeai__slider-root .invokeai__slider-track{background-color:var(--text-color-secondary);height:5px;border-radius:9999px}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px!important}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset!important;padding:1rem;border-radius:.5rem!important;background-color:var(--background-color)!important;border:2px solid var(--border-color)!important}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{min-width:20rem;width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--btn-grey)}.image-uploader-button-outer:hover{background-color:var(--btn-grey-hover)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem!important;height:4rem!important}.image-upload-button h2{font-size:1.2rem!important}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg)!important;box-shadow:none!important}.guide-popover-content{background-color:var(--background-color-secondary)!important;border:none!important}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.4d3899e5.js b/frontend/dist/assets/index.4d3899e5.js new file mode 100644 index 0000000000..9d3e9ca4dc --- /dev/null +++ b/frontend/dist/assets/index.4d3899e5.js @@ -0,0 +1,515 @@ +function Hq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Kt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sv=Symbol.for("react.element"),Vq=Symbol.for("react.portal"),Uq=Symbol.for("react.fragment"),jq=Symbol.for("react.strict_mode"),Gq=Symbol.for("react.profiler"),qq=Symbol.for("react.provider"),Kq=Symbol.for("react.context"),Yq=Symbol.for("react.forward_ref"),Zq=Symbol.for("react.suspense"),Xq=Symbol.for("react.memo"),Qq=Symbol.for("react.lazy"),eE=Symbol.iterator;function Jq(e){return e===null||typeof e!="object"?null:(e=eE&&e[eE]||e["@@iterator"],typeof e=="function"?e:null)}var oM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aM=Object.assign,sM={};function $0(e,t,n){this.props=e,this.context=t,this.refs=sM,this.updater=n||oM}$0.prototype.isReactComponent={};$0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lM(){}lM.prototype=$0.prototype;function I8(e,t,n){this.props=e,this.context=t,this.refs=sM,this.updater=n||oM}var M8=I8.prototype=new lM;M8.constructor=I8;aM(M8,$0.prototype);M8.isPureReactComponent=!0;var tE=Array.isArray,uM=Object.prototype.hasOwnProperty,O8={current:null},cM={key:!0,ref:!0,__self:!0,__source:!0};function dM(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)uM.call(t,r)&&!cM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=V[X];if(0>>1;Xi(He,Q))Uei(ct,He)?(V[X]=ct,V[Ue]=Q,X=Ue):(V[X]=He,V[Se]=Q,X=Se);else if(Uei(ct,Q))V[X]=ct,V[Ue]=Q,X=Ue;else break e}}return q}function i(V,q){var Q=V.sortIndex-q.sortIndex;return Q!==0?Q:V.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(V){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=V)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(V){if(w=!1,T(V),!b)if(n(l)!==null)b=!0,se(O);else{var q=n(u);q!==null&&G(I,q.startTime-V)}}function O(V,q){b=!1,w&&(w=!1,E(z),z=-1),v=!0;var Q=m;try{for(T(q),g=n(l);g!==null&&(!(g.expirationTime>q)||V&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),T(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var N=!1,D=null,z=-1,$=5,W=-1;function Y(){return!(e.unstable_now()-W<$)}function de(){if(D!==null){var V=e.unstable_now();W=V;var q=!0;try{q=D(!0,V)}finally{q?j():(N=!1,D=null)}}else N=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,re=te.port2;te.port1.onmessage=de,j=function(){re.postMessage(null)}}else j=function(){P(de,0)};function se(V){D=V,N||(N=!0,j())}function G(V,q){z=P(function(){V(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,se(O))},e.unstable_forceFrameRate=function(V){0>V||125X?(V.sortIndex=Q,t(u,V),n(l)===null&&V===n(u)&&(w?(E(z),z=-1):w=!0,G(I,Q-X))):(V.sortIndex=me,t(l,V),b||v||(b=!0,se(O))),V},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(V){var q=m;return function(){var Q=m;m=q;try{return V.apply(this,arguments)}finally{m=Q}}}})(fM);(function(e){e.exports=fM})(Gp);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hM=C.exports,la=Gp.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R6=Object.prototype.hasOwnProperty,iK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rE={},iE={};function oK(e){return R6.call(iE,e)?!0:R6.call(rE,e)?!1:iK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function aK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sK(e,t,n,r){if(t===null||typeof t>"u"||aK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Vx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bg(e):""}function lK(e){switch(e.tag){case 5:return Bg(e.type);case 16:return Bg("Lazy");case 13:return Bg("Suspense");case 19:return Bg("SuspenseList");case 0:case 2:case 15:return e=Ux(e.type,!1),e;case 11:return e=Ux(e.type.render,!1),e;case 1:return e=Ux(e.type,!0),e;default:return""}}function B6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ip:return"Fragment";case Ap:return"Portal";case N6:return"Profiler";case B8:return"StrictMode";case D6:return"Suspense";case z6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:B6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return B6(e(t))}catch{}}return null}function uK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function V2(e){e._valueTracker||(e._valueTracker=cK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function V3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function F6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function $6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?H6(e,t.type,n):t.hasOwnProperty("defaultValue")&&H6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function H6(e,t,n){(t!=="number"||V3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fg=Array.isArray;function qp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=U2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dK=["Webkit","ms","Moz","O"];Object.keys(tm).forEach(function(e){dK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tm[t]=tm[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tm.hasOwnProperty(e)&&tm[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function U6(e,t){if(t){if(fK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function j6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var G6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q6=null,Kp=null,Yp=null;function cE(e){if(e=_v(e)){if(typeof q6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=f5(t),q6(e.stateNode,e.type,t))}}function EM(e){Kp?Yp?Yp.push(e):Yp=[e]:Kp=e}function PM(){if(Kp){var e=Kp,t=Yp;if(Yp=Kp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(CK(e)/_K|0)|0}var j2=64,G2=4194304;function $g(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function q3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=$g(s):(o&=a,o!==0&&(r=$g(o)))}else a=n&~i,a!==0?r=$g(a):o!==0&&(r=$g(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function TK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rm),bE=String.fromCharCode(32),xE=!1;function qM(e,t){switch(e){case"keyup":return nY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mp=!1;function iY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function oY(e,t){if(Mp)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),r3=G8=Fc=null,Mp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_E(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=V3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=kE(n,o);var a=kE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Op=null,J6=null,om=null,ew=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ew||Op==null||Op!==V3(r)||(r=Op,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),om&&Bm(om,r)||(om=r,r=Z3(J6,"onSelect"),0Dp||(e.current=aw[Dp],aw[Dp]=null,Dp--)}function Gn(e,t){Dp++,aw[Dp]=e.current,e.current=t}var rd={},Vi=dd(rd),To=dd(!1),Uf=rd;function S0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Lo(e){return e=e.childContextTypes,e!=null}function Q3(){Xn(To),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(To,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,uK(e)||"Unknown",i));return hr({},n,r)}function J3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,Uf=Vi.current,Gn(Vi,e),Gn(To,To.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,Uf),r.__reactInternalMemoizedMergedChildContext=e,Xn(To),Xn(Vi),Gn(Vi,e)):Xn(To),Gn(To,n)}var su=null,h5=!1,iS=!1;function uO(e){su===null?su=[e]:su.push(e)}function EY(e){h5=!0,uO(e)}function fd(){if(!iS&&su!==null){iS=!0;var e=0,t=Ln;try{var n=su;for(Ln=1;e>=a,i-=a,uu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var W=m(E,D,T[z],I);if(W===null){D===null&&(D=$);break}e&&D&&W.alternate===null&&t(E,D),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W,D=$}if(z===T.length)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(E,D,W.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(E,D),k=o(Y,k,z),N===null?O=Y:N.sibling=Y,N=Y,D=$}if(W.done)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;!W.done;z++,W=T.next())W=g(E,W.value,I),W!==null&&(k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return rr&&vf(E,z),O}for(D=r(E,D);!W.done;z++,W=T.next())W=v(D,E,z,W.value,I),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?z:W.key),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return e&&D.forEach(function(de){return t(E,de)}),rr&&vf(E,z),O}function P(E,k,T,I){if(typeof T=="object"&&T!==null&&T.type===Ip&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case W2:e:{for(var O=T.key,N=k;N!==null;){if(N.key===O){if(O=T.type,O===Ip){if(N.tag===7){n(E,N.sibling),k=i(N,T.props.children),k.return=E,E=k;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===N.type){n(E,N.sibling),k=i(N,T.props),k.ref=mg(E,N,T),k.return=E,E=k;break e}n(E,N);break}else t(E,N);N=N.sibling}T.type===Ip?(k=Df(T.props.children,E.mode,I,T.key),k.return=E,E=k):(I=d3(T.type,T.key,T.props,null,E.mode,I),I.ref=mg(E,k,T),I.return=E,E=I)}return a(E);case Ap:e:{for(N=T.key;k!==null;){if(k.key===N)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(E,k.sibling),k=i(k,T.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=fS(T,E.mode,I),k.return=E,E=k}return a(E);case Pc:return N=T._init,P(E,k,N(T._payload),I)}if(Fg(T))return b(E,k,T,I);if(dg(T))return w(E,k,T,I);J2(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,T),k.return=E,E=k):(n(E,k),k=dS(T,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return P}var C0=vO(!0),yO=vO(!1),kv={},yl=dd(kv),Wm=dd(kv),Vm=dd(kv);function Af(e){if(e===kv)throw Error(Oe(174));return e}function o9(e,t){switch(Gn(Vm,t),Gn(Wm,e),Gn(yl,kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:V6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=V6(t,e)}Xn(yl),Gn(yl,t)}function _0(){Xn(yl),Xn(Wm),Xn(Vm)}function bO(e){Af(Vm.current);var t=Af(yl.current),n=V6(t,e.type);t!==n&&(Gn(Wm,e),Gn(yl,n))}function a9(e){Wm.current===e&&(Xn(yl),Xn(Wm))}var cr=dd(0);function o4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oS=[];function s9(){for(var e=0;en?n:4,e(!0);var r=aS.transition;aS.transition={};try{e(!1),t()}finally{Ln=n,aS.transition=r}}function NO(){return za().memoizedState}function AY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=io();ys(n,e,r,i),BO(n,t,r)}}function IY(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=io(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){am=a4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var s4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},MY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,s3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return s3(4194308,4,e,t)},useInsertionEffect:function(e,t){return s3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f9,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=LY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(Gf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Gm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=cu,r=uu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Um++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[Hm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=j6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iE0&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304)}else{if(!r)if(e=o4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>E0&&n!==1073741824&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return y9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function $Y(e,t){switch(Q8(t),t.tag){case 1:return Lo(t.type)&&Q3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _0(),Xn(To),Xn(Vi),s9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a9(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));w0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return _0(),null;case 10:return n9(t.type._context),null;case 22:case 23:return y9(),null;case 24:return null;default:return null}}var ty=!1,Wi=!1,HY=typeof WeakSet=="function"?WeakSet:Set,it=null;function $p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function yw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function WY(e,t){if(tw=K3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(nw={focusedElem:e,selectionRange:n},K3=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){t=it;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,P=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}return b=QE,QE=!1,b}function sm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&yw(t,n,o)}i=i.next}while(i!==r)}}function m5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Hm],delete t[ow],delete t[_Y],delete t[kY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=X3));else if(r!==4&&(e=e.child,e!==null))for(xw(e,t,n),e=e.sibling;e!==null;)xw(e,t,n),e=e.sibling}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}var Ti=null,fs=!1;function yc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(l5,n)}catch{}switch(n.tag){case 5:Wi||$p(n,t);case 6:var r=Ti,i=fs;Ti=null,yc(e,t,n),Ti=r,fs=i,Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ti.removeChild(n.stateNode));break;case 18:Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?rS(e.parentNode,n):e.nodeType===1&&rS(e,n),Dm(e)):rS(Ti,n.stateNode));break;case 4:r=Ti,i=fs,Ti=n.stateNode.containerInfo,fs=!0,yc(e,t,n),Ti=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&yw(n,t,a),i=i.next}while(i!==r)}yc(e,t,n);break;case 1:if(!Wi&&($p(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}yc(e,t,n);break;case 21:yc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,yc(e,t,n),Wi=r):yc(e,t,n);break;default:yc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HY),t.forEach(function(r){var i=XY.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,c4=0,(sn&6)!==0)throw Error(Oe(331));var i=sn;for(sn|=4,it=e.current;it!==null;){var o=it,a=o.child;if((it.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m9?Nf(e,0):g9|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=G2,G2<<=1,(G2&130023424)===0&&(G2=4194304)));var n=io();e=gu(e,t),e!==null&&(wv(e,t,n),Ao(e,n))}function ZY(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function XY(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,BY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,t4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l3(e,t),e=t.pendingProps;var i=S0(t,Vi.current);Xp(t,n),i=u9(null,t,r,e,i,n);var o=c9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lo(r)?(o=!0,J3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i9(t),i.updater=p5,t.stateNode=i,i._reactInternals=t,dw(t,r,e,n),t=pw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=JY(r),e=ds(r,e),i){case 0:t=hw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),hw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),i4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=k0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=k0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(w0(),r===i){t=mu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&lw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,rw(r,i)?a=null:o!==null&&rw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&lw(t),null;case 13:return jO(e,t,n);case 4:return o9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=C0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(n4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=mu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xp(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),l3(e,t),t.tag=1,Lo(r)?(e=!0,J3(t)):e=!1,Xp(t,n),mO(t,r,i),dw(t,r,i,n),pw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function QY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oa(e,t,n,r){return new QY(e,t,n,r)}function x9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function JY(e){if(typeof e=="function")return x9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Oa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function d3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ip:return Df(n.children,i,o,t);case B8:a=8,i|=8;break;case N6:return e=Oa(12,n,t,i|2),e.elementType=N6,e.lanes=o,e;case D6:return e=Oa(13,n,t,i),e.elementType=D6,e.lanes=o,e;case z6:return e=Oa(19,n,t,i),e.elementType=z6,e.lanes=o,e;case vM:return y5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Oa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Df(e,t,n,r){return e=Oa(7,e,r,t),e.lanes=n,e}function y5(e,t,n,r){return e=Oa(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function dS(e,t,n){return e=Oa(6,e,null,t),e.lanes=n,e}function fS(e,t,n){return t=Oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gx(0),this.expirationTimes=Gx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S9(e,t,n,r,i,o,a,s,l){return e=new eZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i9(o),e}function tZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=fa})(Al);const iy=A8(Al.exports);var lP=Al.exports;O6.createRoot=lP.createRoot,O6.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,C5={exports:{}},_5={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aZ=C.exports,sZ=Symbol.for("react.element"),lZ=Symbol.for("react.fragment"),uZ=Object.prototype.hasOwnProperty,cZ=aZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dZ={key:!0,ref:!0,__self:!0,__source:!0};function fR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)uZ.call(t,r)&&!dZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:sZ,type:e,key:o,ref:a,props:i,_owner:cZ.current}}_5.Fragment=lZ;_5.jsx=fR;_5.jsxs=fR;(function(e){e.exports=_5})(C5);const Kn=C5.exports.Fragment,x=C5.exports.jsx,ee=C5.exports.jsxs,fZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Kn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var k9=C.exports.createContext({});k9.displayName="ColorModeContext";function Ev(){const e=C.exports.useContext(k9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var oy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function hZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?oy.dark:oy.light),document.body.classList.remove(r?oy.light:oy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var pZ="chakra-ui-color-mode";function gZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var mZ=gZ(pZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=mZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>hZ({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?uP:k,setColorMode:t?uP:E,forced:t!==void 0}),[P,k,E,t]);return x(k9.Provider,{value:T,children:n})}hR.displayName="ColorModeProvider";var Ew={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",k="[object Object]",T="[object Proxy]",I="[object RegExp]",O="[object Set]",N="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",re="[object Int32Array]",se="[object Uint8Array]",G="[object Uint8ClampedArray]",V="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[re]=ye[se]=ye[G]=ye[V]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[g]=ye[m]=ye[v]=ye[w]=ye[P]=ye[k]=ye[I]=ye[O]=ye[N]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,et=qe&&qe.exports===ct,tt=et&&Se.process,at=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||tt&&tt.binding&&tt.binding("util")}catch{}}(),At=at&&at.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function s1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=a1,Ro.prototype.get=Ou,Ro.prototype.has=Pd,Ro.prototype.set=s1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,mt&&Ch(pe[0],pe[1],mt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function va(U,ne){return U===ne||U!==U&&ne!==ne}var Md=Dl(function(){return arguments}())?Dl:function(U){return Wn(U)&&yn.call(U,"callee")&&!$e.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&kh(U.length)&&!$u(U)}function _h(U){return Wn(U)&&Ht(U)}var Fu=Qt||x1;function $u(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==T}function kh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Os(U)!=k)return!1;var ne=ln(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Eh=At?dt(At):Nu;function Rd(U){return jr(U,Ph(U))}function Ph(U){return Ht(U)?v1(U,!0):Rs(U)}var un=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Th(U){return U}function x1(){return!1}e.exports=un})(Ew,Ew.exports);const gl=Ew.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function If(e,...t){return vZ(e)?e(...t):e}var vZ=e=>typeof e=="function",yZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Pw=(e,t)=>n=>{const r=String(t),i=yZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Km(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Pw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ay=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Km({scale:e,transform:t}),r}}var bZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:bZ(t),transform:n?Km({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function SZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function wZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var CZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},_Z={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function kZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var EZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",PZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},TZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},LZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),AZ=e=>e.trim();function IZ(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(AZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(LZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),MZ=(e,t)=>IZ(e,t??{});function OZ(e){return/^var\(--.+\)$/.test(e)}var RZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,on={filter(e){return e!=="auto"?e:CZ},backdropFilter(e){return e!=="auto"?e:_Z},ring(e){return kZ(on.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?SZ():e==="auto-gpu"?wZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=RZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(OZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:MZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=EZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},oe={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",on.px),space:as("space",ay(on.vh,on.px)),spaceT:as("space",ay(on.vh,on.px)),degreeT(e){return{property:e,transform:on.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Km({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ay(on.vh,on.px)),sizesT:as("sizes",ay(on.vh,on.fraction)),shadows:as("shadows"),logical:xZ,blur:as("blur",on.blur)},f3={background:oe.colors("background"),backgroundColor:oe.colors("backgroundColor"),backgroundImage:oe.propT("backgroundImage",on.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:on.bgClip},bgSize:oe.prop("backgroundSize"),bgPosition:oe.prop("backgroundPosition"),bg:oe.colors("background"),bgColor:oe.colors("backgroundColor"),bgPos:oe.prop("backgroundPosition"),bgRepeat:oe.prop("backgroundRepeat"),bgAttachment:oe.prop("backgroundAttachment"),bgGradient:oe.propT("backgroundImage",on.gradient),bgClip:{transform:on.bgClip}};Object.assign(f3,{bgImage:f3.backgroundImage,bgImg:f3.backgroundImage});var pn={border:oe.borders("border"),borderWidth:oe.borderWidths("borderWidth"),borderStyle:oe.borderStyles("borderStyle"),borderColor:oe.colors("borderColor"),borderRadius:oe.radii("borderRadius"),borderTop:oe.borders("borderTop"),borderBlockStart:oe.borders("borderBlockStart"),borderTopLeftRadius:oe.radii("borderTopLeftRadius"),borderStartStartRadius:oe.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:oe.radii("borderTopRightRadius"),borderStartEndRadius:oe.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:oe.borders("borderRight"),borderInlineEnd:oe.borders("borderInlineEnd"),borderBottom:oe.borders("borderBottom"),borderBlockEnd:oe.borders("borderBlockEnd"),borderBottomLeftRadius:oe.radii("borderBottomLeftRadius"),borderBottomRightRadius:oe.radii("borderBottomRightRadius"),borderLeft:oe.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:oe.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:oe.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:oe.borders(["borderLeft","borderRight"]),borderInline:oe.borders("borderInline"),borderY:oe.borders(["borderTop","borderBottom"]),borderBlock:oe.borders("borderBlock"),borderTopWidth:oe.borderWidths("borderTopWidth"),borderBlockStartWidth:oe.borderWidths("borderBlockStartWidth"),borderTopColor:oe.colors("borderTopColor"),borderBlockStartColor:oe.colors("borderBlockStartColor"),borderTopStyle:oe.borderStyles("borderTopStyle"),borderBlockStartStyle:oe.borderStyles("borderBlockStartStyle"),borderBottomWidth:oe.borderWidths("borderBottomWidth"),borderBlockEndWidth:oe.borderWidths("borderBlockEndWidth"),borderBottomColor:oe.colors("borderBottomColor"),borderBlockEndColor:oe.colors("borderBlockEndColor"),borderBottomStyle:oe.borderStyles("borderBottomStyle"),borderBlockEndStyle:oe.borderStyles("borderBlockEndStyle"),borderLeftWidth:oe.borderWidths("borderLeftWidth"),borderInlineStartWidth:oe.borderWidths("borderInlineStartWidth"),borderLeftColor:oe.colors("borderLeftColor"),borderInlineStartColor:oe.colors("borderInlineStartColor"),borderLeftStyle:oe.borderStyles("borderLeftStyle"),borderInlineStartStyle:oe.borderStyles("borderInlineStartStyle"),borderRightWidth:oe.borderWidths("borderRightWidth"),borderInlineEndWidth:oe.borderWidths("borderInlineEndWidth"),borderRightColor:oe.colors("borderRightColor"),borderInlineEndColor:oe.colors("borderInlineEndColor"),borderRightStyle:oe.borderStyles("borderRightStyle"),borderInlineEndStyle:oe.borderStyles("borderInlineEndStyle"),borderTopRadius:oe.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:oe.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:oe.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:oe.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var NZ={color:oe.colors("color"),textColor:oe.colors("color"),fill:oe.colors("fill"),stroke:oe.colors("stroke")},Lw={boxShadow:oe.shadows("boxShadow"),mixBlendMode:!0,blendMode:oe.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:oe.prop("backgroundBlendMode"),opacity:!0};Object.assign(Lw,{shadow:Lw.boxShadow});var DZ={filter:{transform:on.filter},blur:oe.blur("--chakra-blur"),brightness:oe.propT("--chakra-brightness",on.brightness),contrast:oe.propT("--chakra-contrast",on.contrast),hueRotate:oe.degreeT("--chakra-hue-rotate"),invert:oe.propT("--chakra-invert",on.invert),saturate:oe.propT("--chakra-saturate",on.saturate),dropShadow:oe.propT("--chakra-drop-shadow",on.dropShadow),backdropFilter:{transform:on.backdropFilter},backdropBlur:oe.blur("--chakra-backdrop-blur"),backdropBrightness:oe.propT("--chakra-backdrop-brightness",on.brightness),backdropContrast:oe.propT("--chakra-backdrop-contrast",on.contrast),backdropHueRotate:oe.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:oe.propT("--chakra-backdrop-invert",on.invert),backdropSaturate:oe.propT("--chakra-backdrop-saturate",on.saturate)},h4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:on.flexDirection},experimental_spaceX:{static:PZ,transform:Km({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:TZ,transform:Km({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:oe.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:oe.space("gap"),rowGap:oe.space("rowGap"),columnGap:oe.space("columnGap")};Object.assign(h4,{flexDir:h4.flexDirection});var yR={gridGap:oe.space("gridGap"),gridColumnGap:oe.space("gridColumnGap"),gridRowGap:oe.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},zZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:on.outline},outlineOffset:!0,outlineColor:oe.colors("outlineColor")},Pa={width:oe.sizesT("width"),inlineSize:oe.sizesT("inlineSize"),height:oe.sizes("height"),blockSize:oe.sizes("blockSize"),boxSize:oe.sizes(["width","height"]),minWidth:oe.sizes("minWidth"),minInlineSize:oe.sizes("minInlineSize"),minHeight:oe.sizes("minHeight"),minBlockSize:oe.sizes("minBlockSize"),maxWidth:oe.sizes("maxWidth"),maxInlineSize:oe.sizes("maxInlineSize"),maxHeight:oe.sizes("maxHeight"),maxBlockSize:oe.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:oe.propT("float",on.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Pa,{w:Pa.width,h:Pa.height,minW:Pa.minWidth,maxW:Pa.maxWidth,minH:Pa.minHeight,maxH:Pa.maxHeight,overscroll:Pa.overscrollBehavior,overscrollX:Pa.overscrollBehaviorX,overscrollY:Pa.overscrollBehaviorY});var BZ={listStyleType:!0,listStylePosition:!0,listStylePos:oe.prop("listStylePosition"),listStyleImage:!0,listStyleImg:oe.prop("listStyleImage")};function FZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},HZ=$Z(FZ),WZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},VZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},hS=(e,t,n)=>{const r={},i=HZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},UZ={srOnly:{transform(e){return e===!0?WZ:e==="focusable"?VZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>hS(t,e,n)}},cm={position:!0,pos:oe.prop("position"),zIndex:oe.prop("zIndex","zIndices"),inset:oe.spaceT("inset"),insetX:oe.spaceT(["left","right"]),insetInline:oe.spaceT("insetInline"),insetY:oe.spaceT(["top","bottom"]),insetBlock:oe.spaceT("insetBlock"),top:oe.spaceT("top"),insetBlockStart:oe.spaceT("insetBlockStart"),bottom:oe.spaceT("bottom"),insetBlockEnd:oe.spaceT("insetBlockEnd"),left:oe.spaceT("left"),insetInlineStart:oe.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:oe.spaceT("right"),insetInlineEnd:oe.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(cm,{insetStart:cm.insetInlineStart,insetEnd:cm.insetInlineEnd});var jZ={ring:{transform:on.ring},ringColor:oe.colors("--chakra-ring-color"),ringOffset:oe.prop("--chakra-ring-offset-width"),ringOffsetColor:oe.colors("--chakra-ring-offset-color"),ringInset:oe.prop("--chakra-ring-inset")},Zn={margin:oe.spaceT("margin"),marginTop:oe.spaceT("marginTop"),marginBlockStart:oe.spaceT("marginBlockStart"),marginRight:oe.spaceT("marginRight"),marginInlineEnd:oe.spaceT("marginInlineEnd"),marginBottom:oe.spaceT("marginBottom"),marginBlockEnd:oe.spaceT("marginBlockEnd"),marginLeft:oe.spaceT("marginLeft"),marginInlineStart:oe.spaceT("marginInlineStart"),marginX:oe.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:oe.spaceT("marginInline"),marginY:oe.spaceT(["marginTop","marginBottom"]),marginBlock:oe.spaceT("marginBlock"),padding:oe.space("padding"),paddingTop:oe.space("paddingTop"),paddingBlockStart:oe.space("paddingBlockStart"),paddingRight:oe.space("paddingRight"),paddingBottom:oe.space("paddingBottom"),paddingBlockEnd:oe.space("paddingBlockEnd"),paddingLeft:oe.space("paddingLeft"),paddingInlineStart:oe.space("paddingInlineStart"),paddingInlineEnd:oe.space("paddingInlineEnd"),paddingX:oe.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:oe.space("paddingInline"),paddingY:oe.space(["paddingTop","paddingBottom"]),paddingBlock:oe.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var GZ={textDecorationColor:oe.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:oe.shadows("textShadow")},qZ={clipPath:!0,transform:oe.propT("transform",on.transform),transformOrigin:!0,translateX:oe.spaceT("--chakra-translate-x"),translateY:oe.spaceT("--chakra-translate-y"),skewX:oe.degreeT("--chakra-skew-x"),skewY:oe.degreeT("--chakra-skew-y"),scaleX:oe.prop("--chakra-scale-x"),scaleY:oe.prop("--chakra-scale-y"),scale:oe.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:oe.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:oe.prop("transitionDuration","transition.duration"),transitionProperty:oe.prop("transitionProperty","transition.property"),transitionTimingFunction:oe.prop("transitionTimingFunction","transition.easing")},YZ={fontFamily:oe.prop("fontFamily","fonts"),fontSize:oe.prop("fontSize","fontSizes",on.px),fontWeight:oe.prop("fontWeight","fontWeights"),lineHeight:oe.prop("lineHeight","lineHeights"),letterSpacing:oe.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:oe.spaceT("scrollMargin"),scrollMarginTop:oe.spaceT("scrollMarginTop"),scrollMarginBottom:oe.spaceT("scrollMarginBottom"),scrollMarginLeft:oe.spaceT("scrollMarginLeft"),scrollMarginRight:oe.spaceT("scrollMarginRight"),scrollMarginX:oe.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:oe.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:oe.spaceT("scrollPadding"),scrollPaddingTop:oe.spaceT("scrollPaddingTop"),scrollPaddingBottom:oe.spaceT("scrollPaddingBottom"),scrollPaddingLeft:oe.spaceT("scrollPaddingLeft"),scrollPaddingRight:oe.spaceT("scrollPaddingRight"),scrollPaddingX:oe.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:oe.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var k5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${k5("+",...e)})`,hP=(...e)=>`calc(${k5("-",...e)})`,Aw=(...e)=>`calc(${k5("*",...e)})`,pP=(...e)=>`calc(${k5("/",...e)})`,gP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Aw(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(fP(e,...t)),subtract:(...t)=>_f(hP(e,...t)),multiply:(...t)=>_f(Aw(e,...t)),divide:(...t)=>_f(pP(e,...t)),negate:()=>_f(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Aw,divide:pP,negate:gP});function XZ(e,t="-"){return e.replace(/\s+/g,t)}function QZ(e){const t=XZ(e.toString());return eX(JZ(t))}function JZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function eX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function tX(e,t=""){return[t,e].filter(Boolean).join("-")}function nX(e,t){return`var(${e}${t?`, ${t}`:""})`}function rX(e,t=""){return QZ(`--${tX(e,t)}`)}function ei(e,t,n){const r=rX(e,n);return{variable:r,reference:nX(r,t)}}function iX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function oX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Iw(e){if(e==null)return e;const{unitless:t}=oX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E9=e=>Object.fromEntries(Object.entries(e).sort(xR));function mP(e){const t=E9(e);return Object.assign(Object.values(t),t)}function aX(e){const t=Object.keys(E9(e));return new Set(t)}function vP(e){if(!e)return e;e=Iw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Wg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Iw(e)})`),t&&n.push("and",`(max-width: ${Iw(t)})`),n.join(" ")}function sX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Wg(null,u),minWQuery:Wg(a),minMaxQuery:Wg(a,u)}}),r=aX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:E9(e),asArray:mP(e),details:n,media:[null,...t.map(o=>Wg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;iX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),E5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},lX=Object.keys(E5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function uX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:P}=yP(b,t?.cssVarPrefix);return P},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const P=h(b);if(v==="default")return m[l]=P,m;const E=((w=E5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function cX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var fX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function hX(e){return dX(e,fX)}function pX(e){return e.semanticTokens}function gX(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function mX({tokens:e,semanticTokens:t}){const n=Object.entries(Mw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Mw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Mw(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Mw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function vX(e){var t;const n=gX(e),r=hX(n),i=pX(n),o=mX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=uX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:sX(n.breakpoints)}),n}var P9=gl({},f3,pn,NZ,h4,Pa,DZ,jZ,zZ,yR,UZ,cm,Lw,Zn,ZZ,YZ,GZ,qZ,BZ,KZ),yX=Object.assign({},Zn,Pa,h4,yR,cm),bX=Object.keys(yX),xX=[...Object.keys(P9),...lX],SX={...P9,...E5},wX=e=>e in SX,CX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=If(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!kX(t),PX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=_X(t);return t=n(i)??r(o)??r(t),t};function TX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=If(o,r),u=CX(l)(r);let h={};for(let g in u){const m=u[g];let v=If(m,r);g in n&&(g=n[g]),EX(g,v)&&(v=PX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const P=If(b?.property,r);if(!a&&b?.static){const E=If(b.static,r);h=gl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&xs(w)?h=gl({},h,w):h[P]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>TX({theme:t,pseudos:E5,configs:P9})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function LX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function AX(e,t){for(let n=t+1;n{gl(u,{[T]:m?k[T]:{[E]:k[T]}})});continue}if(!v){m?gl(u,k):u[E]=k;continue}u[E]=k}}return u}}function MX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IX(i);return gl({},If(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function OX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return cX(e,["styleConfig","size","variant","colorScheme"])}function RX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Li(V0,--Oo):0,P0--,$r===10&&(P0=1,T5--),$r}function ia(){return $r=Oo2||Zm($r)>3?"":" "}function GX(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Pv(e,h3()+(t<6&&bl()==32&&ia()==32))}function Rw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Rw($r);break;case 40:e===41&&Rw(e);break;case 92:ia();break}return Oo}function qX(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Pv(t,Oo-1)+"*"+P5(e===47?e:ia())}function KX(e){for(;!Zm(bl());)ia();return Pv(e,Oo)}function YX(e){return TR(g3("",null,null,null,[""],e=PR(e),0,[0],e))}function g3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,P=1,E=1,k=0,T="",I=i,O=o,N=r,D=T;P;)switch(b=k,k=ia()){case 40:if(b!=108&&Li(D,g-1)==58){Ow(D+=wn(p3(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=p3(k);break;case 9:case 10:case 13:case 32:D+=jX(b);break;case 92:D+=GX(h3()-1,7);continue;case 47:switch(bl()){case 42:case 47:sy(ZX(qX(ia(),h3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=ul(D)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:P=0;case 59+h:v>0&&ul(D)-g&&sy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(sy(N=bP(D,t,n,u,h,i,s,T,I=[],O=[],g),o),k===123)if(h===0)g3(D,t,N,N,I,o,g,s,O);else switch(m===99&&Li(D,3)===110?100:m){case 100:case 109:case 115:g3(e,N,N,r&&sy(bP(e,N,N,0,0,i,s,T,i,I=[],g),O),i,O,g,s,r?I:O);break;default:g3(D,N,N,N,[""],O,0,s,O)}}u=h=v=0,w=E=1,T=D="",g=a;break;case 58:g=1+ul(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&UX()==125)continue}switch(D+=P5(k),k*w){case 38:E=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(ul(D)-1)*E,E=1;break;case 64:bl()===45&&(D+=p3(ia())),m=bl(),h=g=ul(T=D+=KX(h3())),k++;break;case 45:b===45&&ul(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A9(m),b=0,w=0,P=0;b0?m[E]+" "+k:wn(k,/&\f/g,m[E])))&&(l[P++]=T);return L5(e,t,n,i===0?T9:s,l,u,h)}function ZX(e,t,n){return L5(e,t,n,CR,P5(VX()),Ym(e,2,-2),0)}function xP(e,t,n,r){return L5(e,t,n,L9,Ym(e,0,r),Ym(e,r+1,-1),r)}function Jp(e,t){for(var n="",r=A9(e),i=0;i6)switch(Li(e,t+1)){case 109:if(Li(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+p4+(Li(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ow(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Li(e,t+1)!==115)break;case 6444:switch(Li(e,ul(e)-3-(~Ow(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Li(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Li(e,t+11)){case 114:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+$i+e+e}return e}var oQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L9:t.return=AR(t.value,t.length);break;case _R:return Jp([bg(t,{value:wn(t.value,"@","@"+gn)})],i);case T9:if(t.length)return WX(t.props,function(o){switch(HX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jp([bg(t,{props:[wn(o,/:(read-\w+)/,":"+p4+"$1")]})],i);case"::placeholder":return Jp([bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,":"+p4+"$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},aQ=[oQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||aQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yQ=/[A-Z]|^ms/g,bQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},pS=LR(function(e){return BR(e)?e:e.replace(yQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bQ,function(r,i,o){return cl={name:i,styles:o,next:cl},i})}return vQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function Xm(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return cl={name:n.name,styles:n.styles,next:cl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)cl={name:r.name,styles:r.styles,next:cl},r=r.next;var i=n.styles+";";return i}return xQ(e,t,n)}case"function":{if(e!==void 0){var o=cl,a=n(e);return cl=o,Xm(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function zQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},jR=BQ(zQ);function GR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var qR=e=>GR(e,t=>t!=null);function FQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $Q=FQ();function KR(e,...t){return NQ(e)?e(...t):e}function HQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function WQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var VQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,UQ=LR(function(e){return VQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jQ=UQ,GQ=function(t){return t!=="theme"},TP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jQ:GQ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},qQ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),wQ(function(){return zR(n,r,i)}),null},KQ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||TP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZQ=In("accordion").parts("root","container","button","panel").extend("icon"),XQ=In("alert").parts("title","description","container").extend("icon","spinner"),QQ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),JQ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var eJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var tJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),nJ=In("editable").parts("preview","input","textarea"),rJ=In("form").parts("container","requiredIndicator","helperText"),iJ=In("formError").parts("text","icon"),oJ=In("input").parts("addon","field","element"),aJ=In("list").parts("container","item","icon"),sJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),lJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),uJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var cJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),dJ=In("progress").parts("label","filledTrack","track"),fJ=In("radio").parts("container","control","label"),hJ=In("select").parts("field","icon"),pJ=In("slider").parts("container","track","thumb","filledTrack","mark"),gJ=In("stat").parts("container","label","helpText","number","icon"),mJ=In("switch").parts("container","track","thumb"),vJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),yJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),bJ=In("tag").parts("container","label","closeButton");function Mi(e,t){xJ(e)&&(e="100%");var n=SJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ly(e){return Math.min(1,Math.max(0,e))}function xJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function SJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function wJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function CJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=gS(s,a,e+1/3),i=gS(s,a,e),o=gS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Bw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function TJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=IJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=wJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=uy(e.s),i=uy(e.v),t=_J(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=uy(e.s),o=uy(e.l),t=CJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var LJ="[-\\+]?\\d+%?",AJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(AJ,")|(?:").concat(LJ,")"),mS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),vS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+mS),rgba:new RegExp("rgba"+vS),hsl:new RegExp("hsl"+mS),hsla:new RegExp("hsla"+vS),hsv:new RegExp("hsv"+mS),hsva:new RegExp("hsva"+vS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function IJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Bw[e])e=Bw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Tv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=PJ(t)),this.originalInput=t;var i=TJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=YR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=IP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),MP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),kJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Bw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(ZR(e));return e.count=t,n}var r=MJ(e.hue,e.seed),i=OJ(r,e),o=RJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Tv(a)}function MJ(e,t){var n=DJ(e),r=g4(n,t);return r<0&&(r=360+r),r}function OJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return g4([0,100],t.seed);var n=XR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return g4([r,i],t.seed)}function RJ(e,t,n){var r=NJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return g4([r,i],n.seed)}function NJ(e,t){for(var n=XR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function DJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=JR.find(function(a){return a.name===e});if(n){var r=QR(n);if(r.hueRange)return r.hueRange}var i=new Tv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function XR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=JR;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function g4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function QR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var JR=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function zJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=zJ(e,`colors.${t}`,t),{isValid:i}=new Tv(r);return i?r:n},FJ=e=>t=>{const n=Ai(t,e);return new Tv(n).isDark()?"dark":"light"},$J=e=>t=>FJ(e)(t)==="dark",T0=(e,t)=>n=>{const r=Ai(n,e);return new Tv(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function HJ(e){const t=ZR().toHexString();return!e||BJ(e)?t:e.string&&e.colors?VJ(e.string,e.colors):e.string&&!e.colors?WJ(e.string):e.colors&&!e.string?UJ(e.colors):t}function WJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function VJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function jJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function eN(e){return jJ(e)&&e.reference?e.reference:String(e)}var W5=(e,...t)=>t.map(eN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${W5("+",...e)})`,DP=(...e)=>`calc(${W5("-",...e)})`,Fw=(...e)=>`calc(${W5("*",...e)})`,zP=(...e)=>`calc(${W5("/",...e)})`,BP=e=>{const t=eN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Fw(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(NP(e,...t)),subtract:(...t)=>lu(DP(e,...t)),multiply:(...t)=>lu(Fw(e,...t)),divide:(...t)=>lu(zP(e,...t)),negate:()=>lu(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:Fw,divide:zP,negate:BP});function GJ(e){return!Number.isInteger(parseFloat(e.toString()))}function qJ(e,t="-"){return e.replace(/\s+/g,t)}function tN(e){const t=qJ(e.toString());return t.includes("\\.")?e:GJ(e)?t.replace(".","\\."):e}function KJ(e,t=""){return[t,tN(e)].filter(Boolean).join("-")}function YJ(e,t){return`var(${tN(e)}${t?`, ${t}`:""})`}function ZJ(e,t=""){return`--${KJ(e,t)}`}function ji(e,t){const n=ZJ(e,t?.prefix);return{variable:n,reference:YJ(n,XJ(t?.fallback))}}function XJ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:QJ,defineMultiStyleConfig:JJ}=ir(ZQ.keys),eee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},nee={pt:"2",px:"4",pb:"5"},ree={fontSize:"1.25em"},iee=QJ({container:eee,button:tee,panel:nee,icon:ree}),oee=JJ({baseStyle:iee}),{definePartsStyle:Lv,defineMultiStyleConfig:aee}=ir(XQ.keys),oa=ei("alert-fg"),vu=ei("alert-bg"),see=Lv({container:{bg:vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z9(e){const{theme:t,colorScheme:n}=e,r=T0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var lee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark}}}}),uee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),cee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),dee=Lv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[vu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[vu.variable]:`colors.${t}.200`},color:oa.reference}}}),fee={subtle:lee,"left-accent":uee,"top-accent":cee,solid:dee},hee=aee({baseStyle:see,variants:fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),nN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},pee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},gee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},mee={...nN,...pee,container:gee},rN=mee,vee=e=>typeof e=="function";function fi(e,...t){return vee(e)?e(...t):e}var{definePartsStyle:iN,defineMultiStyleConfig:yee}=ir(QQ.keys),e0=ei("avatar-border-color"),yS=ei("avatar-bg"),bee={borderRadius:"full",border:"0.2em solid",[e0.variable]:"white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference},xee={[yS.variable]:"colors.gray.200",_dark:{[yS.variable]:"colors.whiteAlpha.400"},bgColor:yS.reference},FP=ei("avatar-background"),See=e=>{const{name:t,theme:n}=e,r=t?HJ({string:t}):"colors.gray.400",i=$J(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[e0.variable]:"colors.white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference,verticalAlign:"top"}},wee=iN(e=>({badge:fi(bee,e),excessLabel:fi(xee,e),container:fi(See,e)}));function xc(e){const t=e!=="100%"?rN[e]:void 0;return iN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Cee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},_ee=yee({baseStyle:wee,sizes:Cee,defaultProps:{size:"md"}}),kee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},t0=ei("badge-bg"),ml=ei("badge-color"),Eee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.500`,.6)(n);return{[t0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[t0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:t0.reference,color:ml.reference}},Pee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.16)(n);return{[t0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[t0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:t0.reference,color:ml.reference}},Tee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},Lee={solid:Eee,subtle:Pee,outline:Tee},fm={baseStyle:kee,variants:Lee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Aee,definePartsStyle:Iee}=ir(JQ.keys),Mee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Oee=Iee({link:Mee}),Ree=Aee({baseStyle:Oee}),Nee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},oN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=T0(`${t}.200`,.12)(n),i=T0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Dee=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(oN,e)}},zee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Bee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=zee[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},Fee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},$ee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Hee={ghost:oN,outline:Dee,solid:Bee,link:Fee,unstyled:$ee},Wee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Vee={baseStyle:Nee,variants:Hee,sizes:Wee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:m3,defineMultiStyleConfig:Uee}=ir(eJ.keys),hm=ei("checkbox-size"),jee=e=>{const{colorScheme:t}=e;return{w:hm.reference,h:hm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Gee={_disabled:{cursor:"not-allowed"}},qee={userSelect:"none",_disabled:{opacity:.4}},Kee={transitionProperty:"transform",transitionDuration:"normal"},Yee=m3(e=>({icon:Kee,container:Gee,control:fi(jee,e),label:qee})),Zee={sm:m3({control:{[hm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:m3({control:{[hm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:m3({control:{[hm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},m4=Uee({baseStyle:Yee,sizes:Zee,defaultProps:{size:"md",colorScheme:"blue"}}),pm=ji("close-button-size"),xg=ji("close-button-bg"),Xee={w:[pm.reference],h:[pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[xg.variable]:"colors.blackAlpha.100",_dark:{[xg.variable]:"colors.whiteAlpha.100"}},_active:{[xg.variable]:"colors.blackAlpha.200",_dark:{[xg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:xg.reference},Qee={lg:{[pm.variable]:"sizes.10",fontSize:"md"},md:{[pm.variable]:"sizes.8",fontSize:"xs"},sm:{[pm.variable]:"sizes.6",fontSize:"2xs"}},Jee={baseStyle:Xee,sizes:Qee,defaultProps:{size:"md"}},{variants:ete,defaultProps:tte}=fm,nte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},rte={baseStyle:nte,variants:ete,defaultProps:tte},ite={w:"100%",mx:"auto",maxW:"prose",px:"4"},ote={baseStyle:ite},ate={opacity:.6,borderColor:"inherit"},ste={borderStyle:"solid"},lte={borderStyle:"dashed"},ute={solid:ste,dashed:lte},cte={baseStyle:ate,variants:ute,defaultProps:{variant:"solid"}},{definePartsStyle:$w,defineMultiStyleConfig:dte}=ir(tJ.keys),bS=ei("drawer-bg"),xS=ei("drawer-box-shadow");function gp(e){return $w(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var fte={bg:"blackAlpha.600",zIndex:"overlay"},hte={display:"flex",zIndex:"modal",justifyContent:"center"},pte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[bS.variable]:"colors.white",[xS.variable]:"shadows.lg",_dark:{[bS.variable]:"colors.gray.700",[xS.variable]:"shadows.dark-lg"},bg:bS.reference,boxShadow:xS.reference}},gte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},mte={position:"absolute",top:"2",insetEnd:"3"},vte={px:"6",py:"2",flex:"1",overflow:"auto"},yte={px:"6",py:"4"},bte=$w(e=>({overlay:fte,dialogContainer:hte,dialog:fi(pte,e),header:gte,closeButton:mte,body:vte,footer:yte})),xte={xs:gp("xs"),sm:gp("md"),md:gp("lg"),lg:gp("2xl"),xl:gp("4xl"),full:gp("full")},Ste=dte({baseStyle:bte,sizes:xte,defaultProps:{size:"xs"}}),{definePartsStyle:wte,defineMultiStyleConfig:Cte}=ir(nJ.keys),_te={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},kte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Ete={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Pte=wte({preview:_te,input:kte,textarea:Ete}),Tte=Cte({baseStyle:Pte}),{definePartsStyle:Lte,defineMultiStyleConfig:Ate}=ir(rJ.keys),n0=ei("form-control-color"),Ite={marginStart:"1",[n0.variable]:"colors.red.500",_dark:{[n0.variable]:"colors.red.300"},color:n0.reference},Mte={mt:"2",[n0.variable]:"colors.gray.600",_dark:{[n0.variable]:"colors.whiteAlpha.600"},color:n0.reference,lineHeight:"normal",fontSize:"sm"},Ote=Lte({container:{width:"100%",position:"relative"},requiredIndicator:Ite,helperText:Mte}),Rte=Ate({baseStyle:Ote}),{definePartsStyle:Nte,defineMultiStyleConfig:Dte}=ir(iJ.keys),r0=ei("form-error-color"),zte={[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Bte={marginEnd:"0.5em",[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference},Fte=Nte({text:zte,icon:Bte}),$te=Dte({baseStyle:Fte}),Hte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Wte={baseStyle:Hte},Vte={fontFamily:"heading",fontWeight:"bold"},Ute={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},jte={baseStyle:Vte,sizes:Ute,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Gte}=ir(oJ.keys),qte=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Kte={lg:du({field:Sc.lg,addon:Sc.lg}),md:du({field:Sc.md,addon:Sc.md}),sm:du({field:Sc.sm,addon:Sc.sm}),xs:du({field:Sc.xs,addon:Sc.xs})};function B9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var Yte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Zte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Xte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Qte=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Jte={outline:Yte,filled:Zte,flushed:Xte,unstyled:Qte},mn=Gte({baseStyle:qte,sizes:Kte,variants:Jte,defaultProps:{size:"md",variant:"outline"}}),ene=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),tne={baseStyle:ene},nne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},rne={baseStyle:nne},{defineMultiStyleConfig:ine,definePartsStyle:one}=ir(aJ.keys),ane={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},sne=one({icon:ane}),lne=ine({baseStyle:sne}),{defineMultiStyleConfig:une,definePartsStyle:cne}=ir(sJ.keys),dne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),hne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},pne={opacity:.6},gne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},mne={transitionProperty:"common",transitionDuration:"normal"},vne=cne(e=>({button:mne,list:fi(dne,e),item:fi(fne,e),groupTitle:hne,command:pne,divider:gne})),yne=une({baseStyle:vne}),{defineMultiStyleConfig:bne,definePartsStyle:Hw}=ir(lJ.keys),xne={bg:"blackAlpha.600",zIndex:"modal"},Sne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},wne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Cne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_ne={position:"absolute",top:"2",insetEnd:"3"},kne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ene={px:"6",py:"4"},Pne=Hw(e=>({overlay:xne,dialogContainer:fi(Sne,e),dialog:fi(wne,e),header:Cne,closeButton:_ne,body:fi(kne,e),footer:Ene}));function ss(e){return Hw(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Tne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Lne=bne({baseStyle:Pne,sizes:Tne,defaultProps:{size:"md"}}),Ane={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},aN=Ane,{defineMultiStyleConfig:Ine,definePartsStyle:sN}=ir(uJ.keys),F9=ji("number-input-stepper-width"),lN=ji("number-input-input-padding"),Mne=lu(F9).add("0.5rem").toString(),One={[F9.variable]:"sizes.6",[lN.variable]:Mne},Rne=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},Nne={width:[F9.reference]},Dne=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),zne=sN(e=>({root:One,field:fi(Rne,e)??{},stepperGroup:Nne,stepper:fi(Dne,e)??{}}));function cy(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=aN.fontSizes[o];return sN({field:{...r.field,paddingInlineEnd:lN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Bne={xs:cy("xs"),sm:cy("sm"),md:cy("md"),lg:cy("lg")},Fne=Ine({baseStyle:zne,sizes:Bne,variants:mn.variants,defaultProps:mn.defaultProps}),$P,$ne={...($P=mn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Hne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HP,Wne={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=mn.variants)==null?void 0:HP.unstyled.field)??{}},Vne={baseStyle:$ne,sizes:Hne,variants:Wne,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Une,definePartsStyle:jne}=ir(cJ.keys),dy=ji("popper-bg"),Gne=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),qne={zIndex:10},Kne={[dy.variable]:"colors.white",bg:dy.reference,[Gne.variable]:dy.reference,[WP.variable]:"colors.gray.200",_dark:{[dy.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Yne={px:3,py:2,borderBottomWidth:"1px"},Zne={px:3,py:2},Xne={px:3,py:2,borderTopWidth:"1px"},Qne={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Jne=jne({popper:qne,content:Kne,header:Yne,body:Zne,footer:Xne,closeButton:Qne}),ere=Une({baseStyle:Jne}),{defineMultiStyleConfig:tre,definePartsStyle:Vg}=ir(dJ.keys),nre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ai(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},rre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ire=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),ore=e=>({transitionProperty:"common",transitionDuration:"slow",...nre(e)}),are=Vg(e=>({label:rre,filledTrack:ore(e),track:ire(e)})),sre={xs:Vg({track:{h:"1"}}),sm:Vg({track:{h:"2"}}),md:Vg({track:{h:"3"}}),lg:Vg({track:{h:"4"}})},lre=tre({sizes:sre,baseStyle:are,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ure,definePartsStyle:v3}=ir(fJ.keys),cre=e=>{var t;const n=(t=fi(m4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},dre=v3(e=>{var t,n,r,i;return{label:(n=(t=m4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=m4).baseStyle)==null?void 0:i.call(r,e).container,control:cre(e)}}),fre={md:v3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:v3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:v3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},hre=ure({baseStyle:dre,sizes:fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:pre,definePartsStyle:gre}=ir(hJ.keys),mre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},vre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},yre=gre(e=>({field:mre(e),icon:vre})),fy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,bre={lg:{...(VP=mn.sizes)==null?void 0:VP.lg,field:{...(UP=mn.sizes)==null?void 0:UP.lg.field,...fy}},md:{...(jP=mn.sizes)==null?void 0:jP.md,field:{...(GP=mn.sizes)==null?void 0:GP.md.field,...fy}},sm:{...(qP=mn.sizes)==null?void 0:qP.sm,field:{...(KP=mn.sizes)==null?void 0:KP.sm.field,...fy}},xs:{...(YP=mn.sizes)==null?void 0:YP.xs,field:{...(ZP=mn.sizes)==null?void 0:ZP.xs.field,...fy},icon:{insetEnd:"1"}}},xre=pre({baseStyle:yre,sizes:bre,variants:mn.variants,defaultProps:mn.defaultProps}),Sre=ei("skeleton-start-color"),wre=ei("skeleton-end-color"),Cre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Sre.variable]:a,[wre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},_re={baseStyle:Cre},SS=ei("skip-link-bg"),kre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[SS.variable]:"colors.white",_dark:{[SS.variable]:"colors.gray.700"},bg:SS.reference}},Ere={baseStyle:kre},{defineMultiStyleConfig:Pre,definePartsStyle:V5}=ir(pJ.keys),ev=ei("slider-thumb-size"),tv=ei("slider-track-size"),Mc=ei("slider-bg"),Tre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Lre=e=>({...D9({orientation:e.orientation,horizontal:{h:tv.reference},vertical:{w:tv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Are=e=>{const{orientation:t}=e;return{...D9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ev.reference,h:ev.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Ire=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Mre=V5(e=>({container:Tre(e),track:Lre(e),thumb:Are(e),filledTrack:Ire(e)})),Ore=V5({container:{[ev.variable]:"sizes.4",[tv.variable]:"sizes.1"}}),Rre=V5({container:{[ev.variable]:"sizes.3.5",[tv.variable]:"sizes.1"}}),Nre=V5({container:{[ev.variable]:"sizes.2.5",[tv.variable]:"sizes.0.5"}}),Dre={lg:Ore,md:Rre,sm:Nre},zre=Pre({baseStyle:Mre,sizes:Dre,defaultProps:{size:"md",colorScheme:"blue"}}),kf=ji("spinner-size"),Bre={width:[kf.reference],height:[kf.reference]},Fre={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},$re={baseStyle:Bre,sizes:Fre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Hre,definePartsStyle:uN}=ir(gJ.keys),Wre={fontWeight:"medium"},Vre={opacity:.8,marginBottom:"2"},Ure={verticalAlign:"baseline",fontWeight:"semibold"},jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Gre=uN({container:{},label:Wre,helpText:Vre,number:Ure,icon:jre}),qre={md:uN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Kre=Hre({baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Yre,definePartsStyle:y3}=ir(mJ.keys),gm=ji("switch-track-width"),zf=ji("switch-track-height"),wS=ji("switch-track-diff"),Zre=lu.subtract(gm,zf),Ww=ji("switch-thumb-x"),Sg=ji("switch-bg"),Xre=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[gm.reference],height:[zf.reference],transitionProperty:"common",transitionDuration:"fast",[Sg.variable]:"colors.gray.300",_dark:{[Sg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Sg.variable]:`colors.${t}.500`,_dark:{[Sg.variable]:`colors.${t}.200`}},bg:Sg.reference}},Qre={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[zf.reference],height:[zf.reference],_checked:{transform:`translateX(${Ww.reference})`}},Jre=y3(e=>({container:{[wS.variable]:Zre,[Ww.variable]:wS.reference,_rtl:{[Ww.variable]:lu(wS).negate().toString()}},track:Xre(e),thumb:Qre})),eie={sm:y3({container:{[gm.variable]:"1.375rem",[zf.variable]:"sizes.3"}}),md:y3({container:{[gm.variable]:"1.875rem",[zf.variable]:"sizes.4"}}),lg:y3({container:{[gm.variable]:"2.875rem",[zf.variable]:"sizes.6"}})},tie=Yre({baseStyle:Jre,sizes:eie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nie,definePartsStyle:i0}=ir(vJ.keys),rie=i0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),v4={"&[data-is-numeric=true]":{textAlign:"end"}},iie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),oie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),aie={simple:iie,striped:oie,unstyled:{}},sie={sm:i0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:i0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:i0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},lie=nie({baseStyle:rie,variants:aie,sizes:sie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:uie,definePartsStyle:xl}=ir(yJ.keys),cie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},die=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},hie={p:4},pie=xl(e=>({root:cie(e),tab:die(e),tablist:fie(e),tabpanel:hie})),gie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},mie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),vie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),yie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),bie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),xie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),Sie=xl({}),wie={line:mie,enclosed:vie,"enclosed-colored":yie,"soft-rounded":bie,"solid-rounded":xie,unstyled:Sie},Cie=uie({baseStyle:pie,sizes:gie,variants:wie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:_ie,definePartsStyle:Bf}=ir(bJ.keys),kie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Eie={lineHeight:1.2,overflow:"visible"},Pie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Tie=Bf({container:kie,label:Eie,closeButton:Pie}),Lie={sm:Bf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Bf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Bf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Aie={subtle:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.subtle(e)}}),solid:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.solid(e)}}),outline:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.outline(e)}})},Iie=_ie({variants:Aie,baseStyle:Tie,sizes:Lie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,Mie={...(XP=mn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Oie={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eT,tT,nT,Rie={xs:((JP=mn.sizes)==null?void 0:JP.xs.field)??{},sm:((eT=mn.sizes)==null?void 0:eT.sm.field)??{},md:((tT=mn.sizes)==null?void 0:tT.md.field)??{},lg:((nT=mn.sizes)==null?void 0:nT.lg.field)??{}},Nie={baseStyle:Mie,sizes:Rie,variants:Oie,defaultProps:{size:"md",variant:"outline"}},hy=ji("tooltip-bg"),CS=ji("tooltip-fg"),Die=ji("popper-arrow-bg"),zie={bg:hy.reference,color:CS.reference,[hy.variable]:"colors.gray.700",[CS.variable]:"colors.whiteAlpha.900",_dark:{[hy.variable]:"colors.gray.300",[CS.variable]:"colors.gray.900"},[Die.variable]:hy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Bie={baseStyle:zie},Fie={Accordion:oee,Alert:hee,Avatar:_ee,Badge:fm,Breadcrumb:Ree,Button:Vee,Checkbox:m4,CloseButton:Jee,Code:rte,Container:ote,Divider:cte,Drawer:Ste,Editable:Tte,Form:Rte,FormError:$te,FormLabel:Wte,Heading:jte,Input:mn,Kbd:tne,Link:rne,List:lne,Menu:yne,Modal:Lne,NumberInput:Fne,PinInput:Vne,Popover:ere,Progress:lre,Radio:hre,Select:xre,Skeleton:_re,SkipLink:Ere,Slider:zre,Spinner:$re,Stat:Kre,Switch:tie,Table:lie,Tabs:Cie,Tag:Iie,Textarea:Nie,Tooltip:Bie},$ie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Hie=$ie,Wie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Vie=Wie,Uie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},jie=Uie,Gie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},qie=Gie,Kie={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Yie=Kie,Zie={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Xie={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Qie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Jie={property:Zie,easing:Xie,duration:Qie},eoe=Jie,toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},noe=toe,roe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ioe=roe,ooe={breakpoints:Vie,zIndices:noe,radii:qie,blur:ioe,colors:jie,...aN,sizes:rN,shadows:Yie,space:nN,borders:Hie,transition:eoe},aoe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},soe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},loe="ltr",uoe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},coe={semanticTokens:aoe,direction:loe,...ooe,components:Fie,styles:soe,config:uoe},doe=typeof Element<"u",foe=typeof Map=="function",hoe=typeof Set=="function",poe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!b3(e[r],t[r]))return!1;return!0}var o;if(foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!b3(r.value[1],t.get(r.value[0])))return!1;return!0}if(hoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(poe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(doe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!b3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var goe=function(t,n){try{return b3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function U0(){const e=C.exports.useContext(Qm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function cN(){const e=Ev(),t=U0();return{...e,theme:t}}function moe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function yoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return moe(o,l,a[u]??l);const h=`${e}.${l}`;return voe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function boe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>vX(n),[n]);return ee(EQ,{theme:i,children:[x(xoe,{root:t}),r]})}function xoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x($5,{styles:n=>({[t]:n.__cssVars})})}WQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Soe(){const{colorMode:e}=Ev();return x($5,{styles:t=>{const n=jR(t,"styles.global"),r=KR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var woe=new Set([...xX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Coe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function _oe(e){return Coe.has(e)||!woe.has(e)}var koe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=GR(a,(g,m)=>wX(m)),l=KR(e,t),u=Object.assign({},i,l,qR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function _S(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=_oe);const i=koe({baseStyle:n}),o=zw(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:g}=Ev();return le.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function dN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=cN(),a=e?jR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},qR(DQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=MX(s)(l);goe(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return dN(e,t)}function Ri(e,t={}){return dN(e,t)}function Eoe(){const e=new Map;return new Proxy(_S,{apply(t,n,r){return _S(...r)},get(t,n){return e.has(n)||e.set(n,_S(n)),e.get(n)}})}var we=Eoe();function Poe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Poe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Toe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Toe(n,t)})}}function Loe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Aoe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Vw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,y4=e=>e,Ioe=class{descendants=new Map;register=e=>{if(e!=null)return Aoe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=iT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=oT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=rT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Moe(){const e=C.exports.useRef(new Ioe);return Vw(()=>()=>e.current.destroy()),e.current}var[Ooe,fN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Roe(e){const t=fN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Vw(()=>()=>{!i.current||t.unregister(i.current)},[]),Vw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=y4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function hN(){return[y4(Ooe),()=>y4(fN()),()=>Moe(),i=>Roe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ga=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??aT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const b=a??aT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});ga.displayName="Icon";function lt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ga,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function U5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $9=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),j5=C.exports.createContext({});function Noe(){return C.exports.useContext(j5).visualElement}const j0=C.exports.createContext(null),nh=typeof document<"u",b4=nh?C.exports.useLayoutEffect:C.exports.useEffect,pN=C.exports.createContext({strict:!1});function Doe(e,t,n,r){const i=Noe(),o=C.exports.useContext(pN),a=C.exports.useContext(j0),s=C.exports.useContext($9).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return b4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),b4(()=>()=>u&&u.notifyUnmount(),[]),u}function Wp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zoe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wp(n)&&(n.current=r))},[t])}function nv(e){return typeof e=="string"||Array.isArray(e)}function G5(e){return typeof e=="object"&&typeof e.start=="function"}const Boe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function q5(e){return G5(e.animate)||Boe.some(t=>nv(e[t]))}function gN(e){return Boolean(q5(e)||e.variants)}function Foe(e,t){if(q5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||nv(n)?n:void 0,animate:nv(r)?r:void 0}}return e.inherit!==!1?t:{}}function $oe(e){const{initial:t,animate:n}=Foe(e,C.exports.useContext(j5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sT(t),sT(n)])}function sT(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),rv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Hoe(e){for(const t in e)t==="projectionNodeConstructor"?rv.projectionNodeConstructor=e[t]:rv[t].Component=e[t]}function K5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Woe=1;function Voe(){return K5(()=>{if(mm.hasEverUpdated)return Woe++})}const H9=C.exports.createContext({});class Uoe extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const mN=C.exports.createContext({}),joe=Symbol.for("motionComponentSymbol");function Goe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Hoe(e);function a(l,u){const h={...C.exports.useContext($9),...l,layoutId:qoe(l)},{isStatic:g}=h;let m=null;const v=$oe(l),b=g?void 0:Voe(),w=i(l,g);if(!g&&nh){v.visualElement=Doe(o,w,h,t);const P=C.exports.useContext(pN).strict,E=C.exports.useContext(mN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,b,n||rv.projectionNodeConstructor,E))}return ee(Uoe,{visualElement:v.visualElement,props:h,children:[m,x(j5.Provider,{value:v,children:r(o,l,b,zoe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[joe]=o,s}function qoe({layoutId:e}){const t=C.exports.useContext(H9).id;return t&&e!==void 0?t+"-"+e:e}function Koe(e){function t(r,i={}){return Goe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Yoe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function W9(e){return typeof e!="string"||e.includes("-")?!1:!!(Yoe.indexOf(e)>-1||/[A-Z]/.test(e))}const x4={};function Zoe(e){Object.assign(x4,e)}const S4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Av=new Set(S4);function vN(e,{layout:t,layoutId:n}){return Av.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,Xoe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qoe=(e,t)=>S4.indexOf(e)-S4.indexOf(t);function Joe({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Qoe);for(const s of t)a+=`${Xoe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function yN(e){return e.startsWith("--")}const eae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,bN=(e,t)=>n=>Math.max(Math.min(n,t),e),vm=e=>e%1?Number(e.toFixed(5)):e,iv=/(-)?([\d]*\.?[\d])+/g,Uw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Iv(e){return typeof e=="string"}const rh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ym=Object.assign(Object.assign({},rh),{transform:bN(0,1)}),py=Object.assign(Object.assign({},rh),{default:1}),Mv=e=>({test:t=>Iv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Mv("deg"),Sl=Mv("%"),St=Mv("px"),nae=Mv("vh"),rae=Mv("vw"),lT=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),V9=(e,t)=>n=>Boolean(Iv(n)&&tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),xN=(e,t,n)=>r=>{if(!Iv(r))return r;const[i,o,a,s]=r.match(iv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:V9("hsl","hue"),parse:xN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(vm(t))+", "+Sl.transform(vm(n))+", "+vm(ym.transform(r))+")"},iae=bN(0,255),kS=Object.assign(Object.assign({},rh),{transform:e=>Math.round(iae(e))}),Wc={test:V9("rgb","red"),parse:xN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kS.transform(e)+", "+kS.transform(t)+", "+kS.transform(n)+", "+vm(ym.transform(r))+")"};function oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const jw={test:V9("#"),parse:oae,transform:Wc.transform},to={test:e=>Wc.test(e)||jw.test(e)||Of.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Of.test(e)?Of.parse(e):jw.parse(e),transform:e=>Iv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Of.transform(e)},SN="${c}",wN="${n}";function aae(e){var t,n,r,i;return isNaN(e)&&Iv(e)&&((n=(t=e.match(iv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Uw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function CN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Uw);r&&(n=r.length,e=e.replace(Uw,SN),t.push(...r.map(to.parse)));const i=e.match(iv);return i&&(e=e.replace(iv,wN),t.push(...i.map(rh.parse))),{values:t,numColors:n,tokenised:e}}function _N(e){return CN(e).values}function kN(e){const{values:t,numColors:n,tokenised:r}=CN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function lae(e){const t=_N(e);return kN(e)(t.map(sae))}const yu={test:aae,parse:_N,createTransformer:kN,getAnimatableNone:lae},uae=new Set(["brightness","contrast","saturate","opacity"]);function cae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iv)||[];if(!r)return e;const i=n.replace(r,"");let o=uae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const dae=/([a-z-]*)\(.*?\)/g,Gw=Object.assign(Object.assign({},yu),{getAnimatableNone:e=>{const t=e.match(dae);return t?t.map(cae).join(" "):e}}),uT={...rh,transform:Math.round},EN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:py,scaleX:py,scaleY:py,scaleZ:py,skew:Cc,skewX:Cc,skewY:Cc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:ym,originX:lT,originY:lT,originZ:St,zIndex:uT,fillOpacity:ym,strokeOpacity:ym,numOctaves:uT};function U9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(yN(m)){o[m]=v;continue}const b=EN[m],w=eae(v,b);if(Av.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Joe(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const j9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function PN(e,t,n){for(const r in t)!Ss(t[r])&&!vN(r,n)&&(e[r]=t[r])}function fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j9();return U9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hae(e,t,n){const r=e.style||{},i={};return PN(i,r,e),Object.assign(i,fae(e,t,n)),e.transformValues?e.transformValues(i):i}function pae(e,t,n){const r={},i=hae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const gae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],mae=["whileTap","onTap","onTapStart","onTapCancel"],vae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],yae=["whileInView","onViewportEnter","onViewportLeave","viewport"],bae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...yae,...mae,...gae,...vae]);function w4(e){return bae.has(e)}let TN=e=>!w4(e);function xae(e){!e||(TN=t=>t.startsWith("on")?!w4(t):e(t))}try{xae(require("@emotion/is-prop-valid").default)}catch{}function Sae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&w4(i)||!t&&!w4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cT(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function wae(e,t,n){const r=cT(t,e.x,e.width),i=cT(n,e.y,e.height);return`${r} ${i}`}const Cae={offset:"stroke-dashoffset",array:"stroke-dasharray"},_ae={offset:"strokeDashoffset",array:"strokeDasharray"};function kae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Cae:_ae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U9(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=wae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&kae(g,o,a,s,!1)}const LN=()=>({...j9(),attrs:{}});function Eae(e,t){const n=C.exports.useMemo(()=>{const r=LN();return G9(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};PN(r,e.style,e),n.style={...r,...n.style}}return n}function Pae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W9(n)?Eae:pae)(r,a,s),g={...Sae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const AN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function IN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const MN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function ON(e,t,n,r){IN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(MN.has(i)?i:AN(i),t.attrs[i])}function q9(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||vN(r,e))&&(n[r]=t[r]);return n}function RN(e){const t=q9(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const ov=e=>Array.isArray(e),Tae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),NN=e=>ov(e)?e[e.length-1]||0:e;function x3(e){const t=Ss(e)?e.get():e;return Tae(t)?t.toValue():t}function Lae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Aae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const DN=e=>(t,n)=>{const r=C.exports.useContext(j5),i=C.exports.useContext(j0),o=()=>Lae(e,t,r,i);return n?o():K5(o)};function Aae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=x3(o[m]);let{initial:a,animate:s}=e;const l=q5(e),u=gN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!G5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K9(e,v);if(!b)return;const{transitionEnd:w,transition:P,...E}=b;for(const k in E){let T=E[k];if(Array.isArray(T)){const I=h?T.length-1:0;T=T[I]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Iae={useVisualState:DN({scrapeMotionValuesFromProps:RN,createRenderState:LN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G9(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),ON(t,n)}})},Mae={useVisualState:DN({scrapeMotionValuesFromProps:q9,createRenderState:j9})};function Oae(e,{forwardMotionProps:t=!1},n,r,i){return{...W9(e)?Iae:Mae,preloadedFeatures:n,useRender:Pae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function Y5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Y5(i,t,n,r)},[e,t,n,r])}function Rae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};qw(t,"focus",e?r:void 0),qw(t,"blur",e?i:void 0)}function zN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function BN(e){return!!e.touches}function Nae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Dae={pageX:0,pageY:0};function zae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Dae;return{x:r[t+"X"],y:r[t+"Y"]}}function Bae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y9(e,t="page"){return{point:BN(e)?zae(e,t):Bae(e,t)}}const FN=(e,t=!1)=>{const n=r=>e(r,Y9(r));return t?Nae(n):n},Fae=()=>nh&&window.onpointerdown===null,$ae=()=>nh&&window.ontouchstart===null,Hae=()=>nh&&window.onmousedown===null,Wae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Vae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function $N(e){return Fae()?e:$ae()?Vae[e]:Hae()?Wae[e]:e}function o0(e,t,n,r){return Y5(e,$N(t),FN(n,t==="pointerdown"),r)}function C4(e,t,n,r){return qw(e,$N(t),n&&FN(n,t==="pointerdown"),r)}function HN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dT=HN("dragHorizontal"),fT=HN("dragVertical");function WN(e){let t=!1;if(e==="y")t=fT();else if(e==="x")t=dT();else{const n=dT(),r=fT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function VN(){const e=WN(!0);return e?(e(),!1):!0}function hT(e,t,n){return(r,i)=>{!zN(r)||VN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Uae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){C4(r,"pointerenter",e||n?hT(r,!0,e):void 0,{passive:!e}),C4(r,"pointerleave",t||n?hT(r,!1,t):void 0,{passive:!t})}const UN=(e,t)=>t?e===t?!0:UN(e,t.parentElement):!1;function Z9(e){return C.exports.useEffect(()=>()=>e(),[])}function jN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),ES=.001,Gae=.01,pT=10,qae=.05,Kae=1;function Yae({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;jae(e<=pT*1e3);let a=1-t;a=k4(qae,Kae,a),e=k4(Gae,pT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Kw(u,a),b=Math.exp(-g);return ES-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Kw(Math.pow(u,2),a);return(-i(u)+ES>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-ES+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=Xae(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Zae=12;function Xae(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ese(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gT(e,Jae)&&gT(e,Qae)){const n=Yae(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X9(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=jN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ese(o),v=mT,b=mT;function w(){const P=h?-(h/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Kw(T,k);v=O=>{const N=Math.exp(-k*T*O);return n-N*((P+k*T*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const N=Math.exp(-k*T*O);return k*T*N*(Math.sin(I*O)*(P+k*T*E)/I+E*Math.cos(I*O))-N*(Math.cos(I*O)*(P+k*T*E)-I*E*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-T*I)*(E+(P+T*E)*I);else{const I=T*Math.sqrt(k*k-1);v=O=>{const N=Math.exp(-k*T*O),D=Math.min(I*O,300);return n-N*((P+k*T*E)*Math.sinh(D)+I*E*Math.cosh(D))/I}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=g;else{const k=b(P)*1e3,T=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=T&&I}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X9.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mT=e=>0,av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function PS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=PS(l,s,e+1/3),o=PS(l,s,e),a=PS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},nse=[jw,Wc,Of],yT=e=>nse.find(t=>t.test(e)),GN=(e,t)=>{let n=yT(e),r=yT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=vT(i),n=Wc),r===Of&&(o=vT(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=tse(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Yw=e=>typeof e=="number",rse=(e,t)=>n=>t(e(n)),Z5=(...e)=>e.reduce(rse);function qN(e,t){return Yw(e)?n=>_r(e,t,n):to.test(e)?GN(e,t):YN(e,t)}const KN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>qN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bT(e){const t=yu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=yu.createTransformer(t),r=bT(e),i=bT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Z5(KN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ose=(e,t)=>n=>_r(e,t,n);function ase(e){if(typeof e=="number")return ose;if(typeof e=="string")return to.test(e)?GN:YN;if(Array.isArray(e))return KN;if(typeof e=="object")return ise}function sse(e,t,n){const r=[],i=n||ase(e[0]),o=e.length-1;for(let a=0;an(av(e,t,r))}function use(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=av(e[o],e[o+1],i);return t[o](s)}}function ZN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;_4(o===t.length),_4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=sse(t,r,i),s=o===2?lse(e,a):use(e,a);return n?l=>s(k4(e[0],e[o-1],l)):s}const X5=e=>t=>1-e(1-t),Q9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cse=e=>t=>Math.pow(t,e),XN=e=>t=>t*t*((e+1)*t-e),dse=e=>{const t=XN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},QN=1.525,fse=4/11,hse=8/11,pse=9/10,J9=e=>e,e7=cse(2),gse=X5(e7),JN=Q9(e7),eD=e=>1-Math.sin(Math.acos(e)),t7=X5(eD),mse=Q9(t7),n7=XN(QN),vse=X5(n7),yse=Q9(n7),bse=dse(QN),xse=4356/361,Sse=35442/1805,wse=16061/1805,E4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-E4(1-e*2)):.5*E4(e*2-1)+.5;function kse(e,t){return e.map(()=>t||JN).splice(0,e.length-1)}function Ese(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Pse(e,t){return e.map(n=>n*t)}function S3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Pse(r&&r.length===a.length?r:Ese(a),i);function l(){return ZN(s,a,{ease:Array.isArray(n)?n:kse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Tse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const xT={keyframes:S3,spring:X9,decay:Tse};function Lse(e){if(Array.isArray(e.to))return S3;if(xT[e.type])return xT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X9:S3}const tD=1/60*1e3,Ase=typeof performance<"u"?()=>performance.now():()=>Date.now(),nD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ase()),tD);function Ise(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Ise(()=>sv=!0),e),{}),Ose=Ov.reduce((e,t)=>{const n=Q5[t];return e[t]=(r,i=!1,o=!1)=>(sv||Dse(),n.schedule(r,i,o)),e},{}),Rse=Ov.reduce((e,t)=>(e[t]=Q5[t].cancel,e),{});Ov.reduce((e,t)=>(e[t]=()=>Q5[t].process(a0),e),{});const Nse=e=>Q5[e].process(a0),rD=e=>{sv=!1,a0.delta=Zw?tD:Math.max(Math.min(e-a0.timestamp,Mse),1),a0.timestamp=e,Xw=!0,Ov.forEach(Nse),Xw=!1,sv&&(Zw=!1,nD(rD))},Dse=()=>{sv=!0,Zw=!0,Xw||nD(rD)},zse=()=>a0;function iD(e,t,n=0){return e-t-n}function Bse(e,t,n=0,r=!0){return r?iD(t+-e,t,n):t-(e-t)+n}function Fse(e,t,n,r){return r?e>=t+n:e<=-n}const $se=e=>{const t=({delta:n})=>e(n);return{start:()=>Ose.update(t,!0),stop:()=>Rse.update(t)}};function oD(e){var t,n,{from:r,autoplay:i=!0,driver:o=$se,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=jN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,k=0,T=w.duration,I,O=!1,N=!0,D;const z=Lse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(D=ZN([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){k++,l==="reverse"?(N=k%2===0,a=Bse(a,T,u,N)):(a=iD(a,T,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){E.stop(),m&&m()}function de(te){if(N||(te=-te),a+=te,!O){const re=$.next(Math.max(0,a));I=re.value,D&&(I=D(I)),O=N?re.done:a<=0}b?.(I),O&&(k===0&&(T??(T=a)),k{g?.(),E.stop()}}}function aD(e,t){return t?e*(1e3/t):0}function Hse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(I),(O=T.onUpdate)===null||O===void 0||O.call(T,I)},onComplete:m,onStop:v}))}function k(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const I=P(T),O=I===n?-1:1;let N,D;const z=$=>{N=D,D=$,t=aD($-N,zse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Qw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ST=e=>Qw(e)&&e.hasOwnProperty("z"),gy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Yw(e)&&Yw(t))return gy(e,t);if(Qw(e)&&Qw(t)){const n=gy(e.x,t.x),r=gy(e.y,t.y),i=ST(e)&&ST(t)?gy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const sD=(e,t)=>1-3*t+3*e,lD=(e,t)=>3*t-6*e,uD=e=>3*e,P4=(e,t,n)=>((sD(t,n)*e+lD(t,n))*e+uD(t))*e,cD=(e,t,n)=>3*sD(t,n)*e*e+2*lD(t,n)*e+uD(t),Wse=1e-7,Vse=10;function Use(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=P4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Wse&&++s=Gse?qse(a,g,e,n):m===0?g:Use(a,s,s+my,e,n)}return a=>a===0||a===1?a:P4(o(a),t,r)}function Yse({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!VN()}function g(b,w){!h()||(UN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=Z5(o0(window,"pointerup",g,l),o0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}C4(i,"pointerdown",o?v:void 0,l),Z9(u)}const Zse="production",dD=typeof process>"u"||process.env===void 0?Zse:"production",wT=new Set;function fD(e,t,n){e||wT.has(t)||(console.warn(t),n&&console.warn(n),wT.add(t))}const Jw=new WeakMap,TS=new WeakMap,Xse=e=>{const t=Jw.get(e.target);t&&t(e)},Qse=e=>{e.forEach(Xse)};function Jse({root:e,...t}){const n=e||document;TS.has(n)||TS.set(n,{});const r=TS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Qse,{root:e,...t})),r[i]}function ele(e,t,n){const r=Jse(t);return Jw.set(e,n),r.observe(e),()=>{Jw.delete(e),r.unobserve(e)}}function tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ile:rle)(a,o.current,e,i)}const nle={some:0,all:1};function rle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:nle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return ele(n.getInstance(),s,l)},[e,r,i,o])}function ile(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(dD!=="production"&&fD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),ole={inView:Vc(tle),tap:Vc(Yse),focus:Vc(Rae),hover:Vc(Uae)};function i7(){const e=C.exports.useContext(j0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ale(){return sle(C.exports.useContext(j0))}function sle(e){return e===null?!0:e.isPresent}function hD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,lle={linear:J9,easeIn:e7,easeInOut:JN,easeOut:gse,circIn:eD,circInOut:mse,circOut:t7,backIn:n7,backInOut:yse,backOut:vse,anticipate:bse,bounceIn:Cse,bounceInOut:_se,bounceOut:E4},CT=e=>{if(Array.isArray(e)){_4(e.length===4);const[t,n,r,i]=e;return Kse(t,n,r,i)}else if(typeof e=="string")return lle[e];return e},ule=e=>Array.isArray(e)&&typeof e[0]!="number",_T=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&yu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),vy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LS=()=>({type:"keyframes",ease:"linear",duration:.3}),cle=e=>({type:"keyframes",duration:.8,values:e}),kT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:vy,scaleY:vy,scale:vy,opacity:LS,backgroundColor:LS,color:LS,default:vy},dle=(e,t)=>{let n;return ov(t)?n=cle:n=kT[e]||kT.default,{to:t,...n(t)}},fle={...EN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:Gw,WebkitFilter:Gw},o7=e=>fle[e];function a7(e,t){var n;let r=o7(e);return r!==Gw&&(r=yu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const hle={current:!1},pD=1/60*1e3,ple=typeof performance<"u"?()=>performance.now():()=>Date.now(),gD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(ple()),pD);function gle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=gle(()=>lv=!0),e),{}),ws=Rv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(lv||yle(),n.schedule(r,i,o)),e},{}),Yf=Rv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{}),AS=Rv.reduce((e,t)=>(e[t]=()=>J5[t].process(s0),e),{}),vle=e=>J5[e].process(s0),mD=e=>{lv=!1,s0.delta=eC?pD:Math.max(Math.min(e-s0.timestamp,mle),1),s0.timestamp=e,tC=!0,Rv.forEach(vle),tC=!1,lv&&(eC=!1,gD(mD))},yle=()=>{lv=!0,eC=!0,tC||gD(mD)},nC=()=>s0;function vD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Yf.read(r),e(o-t))};return ws.read(r,!0),()=>Yf.read(r)}function ble({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function xle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=T4(o.duration)),o.repeatDelay&&(a.repeatDelay=T4(o.repeatDelay)),e&&(a.ease=ule(e)?e.map(CT):CT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Sle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function wle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Cle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),wle(t),ble(e)||(e={...e,...dle(n,t.to)}),{...t,...xle(e)}}function _le(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_T(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):ET(a)&&typeof n=="string"?a=PT(n):!Array.isArray(n)&&ET(n)&&typeof a=="string"&&(n=PT(a));const l=_T(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Hse({...g,...o}):oD({...Cle(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=NN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function ET(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PT(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return hle.current&&(r={type:!1}),t.start(i=>{let o;const a=_le(e,t,n,r,i),s=Sle(r,e),l=()=>o=a();let u;return s?u=vD(l,T4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const kle=e=>/^\-?\d*\.?\d+$/.test(e),Ele=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class bm{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new bm,this.velocityUpdateSubscribers=new bm,this.renderSubscribers=new bm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=nC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Ple(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?aD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function L0(e){return new Tle(e)}const yD=e=>t=>t.test(e),Lle={test:e=>e==="auto",parse:e=>e},bD=[rh,St,Sl,Cc,rae,nae,Lle],wg=e=>bD.find(yD(e)),Ale=[...bD,to,yu],Ile=e=>Ale.find(yD(e));function Mle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Ole(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function eb(e,t,n){const r=e.getProps();return K9(r,t,n!==void 0?n:r.custom,Mle(e),Ole(e))}function Rle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,L0(n))}function Nle(e,t){const n=eb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=NN(o[a]);Rle(e,a,s)}}function Dle(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;srC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=rC(e,t,n);else{const i=typeof t=="function"?eb(e,t,n.custom):t;r=xD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function rC(e,t,n={}){var r;const i=eb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>xD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return $le(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function xD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Wle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Av.has(m)&&(w={...w,type:!1,delay:0});let P=l7(m,v,b,w);L4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&Nle(e,s)})}function $le(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Hle).forEach((u,h)=>{a.push(rC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Hle(e,t){return e.sortNodePosition(t)}function Wle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Vle=[...d7].reverse(),Ule=d7.length;function jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Fle(e,n,r)))}function Gle(e){let t=jle(e);const n=Kle();let r=!0;const i=(l,u)=>{const h=eb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},P=1/0;for(let k=0;kP&&N;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},re=se=>{W=!0,b.delete(se),I.needsAnimating[se]=!0};for(const se in te){const G=de[se],V=j[se];w.hasOwnProperty(se)||(G!==V?ov(G)&&ov(V)?!hD(G,V)||$?re(se):I.protectedKeys[se]=!0:G!==void 0?re(se):b.add(se):G!==void 0&&b.has(se)?re(se):I.protectedKeys[se]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...Y.map(se=>({animation:se,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const I=e.getBaseTarget(T);I!==void 0&&(k[T]=I)}),v.push({animation:k})}let E=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function qle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kle(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Yle={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Gle(e)),G5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(j0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class SD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=MS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=nC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=IS(h,this.transformPagePoint),zN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=MS(IS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},BN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y9(t),o=IS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=nC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,MS(o,this.history)),this.removeListeners=Z5(o0(window,"pointermove",this.handlePointerMove),o0(window,"pointerup",this.handlePointerUp),o0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Yf.update(this.updatePoint)}}function IS(e,t){return t?{point:t(e.point)}:e}function TT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function MS({point:e},t){return{point:e,delta:TT(e,wD(t)),offset:TT(e,Zle(t)),velocity:Xle(t,.1)}}function Zle(e){return e[0]}function wD(e){return e[e.length-1]}function Xle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=wD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>T4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ua(e){return e.max-e.min}function LT(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function OT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eue(e,{top:t,left:n,bottom:r,right:i}){return{x:OT(e.x,n,i),y:OT(e.y,t,r)}}function RT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=av(t.min,t.max-r,e.min):r>i&&(n=av(e.min,e.max-i,t.min)),k4(0,1,n)}function rue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iC=.35;function iue(e=iC){return e===!1?e=0:e===!0&&(e=iC),{x:NT(e,"left","right"),y:NT(e,"top","bottom")}}function NT(e,t,n){return{min:DT(e,t),max:DT(e,n)}}function DT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zT=()=>({translate:0,scale:1,origin:0,originPoint:0}),wm=()=>({x:zT(),y:zT()}),BT=()=>({min:0,max:0}),ki=()=>({x:BT(),y:BT()});function sl(e){return[e("x"),e("y")]}function CD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function OS(e){return e===void 0||e===1}function oC({scale:e,scaleX:t,scaleY:n}){return!OS(e)||!OS(t)||!OS(n)}function bf(e){return oC(e)||_D(e)||e.z||e.rotate||e.rotateX||e.rotateY}function _D(e){return FT(e.x)||FT(e.y)}function FT(e){return e&&e!=="0%"}function A4(e,t,n){const r=e-n,i=t*r;return n+i}function $T(e,t,n,r,i){return i!==void 0&&(e=A4(e,i,r)),A4(e,n,r)+t}function aC(e,t=0,n=1,r,i){e.min=$T(e.min,t,n,r,i),e.max=$T(e.max,t,n,r,i)}function kD(e,{x:t,y:n}){aC(e.x,t.translate,t.scale,t.originPoint),aC(e.y,n.translate,n.scale,n.originPoint)}function sue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(Y9(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=WN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let P=this.getAxisMotionValue(v).get()||0;if(Sl.test(P)){const E=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=ua(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=hue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new SD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Jle(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Wp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eue(r.actual,t):this.constraints=!1,this.elastic=iue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=rue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cue(r,i.root,this.visualElement.getTransformPagePoint());let a=tue(i.layout.actual,o);if(n){const s=n(oue(a));this.hasMutatedConstraints=!!s,s&&(a=CD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!yy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!yy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=nue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!yy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;due.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=o0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Y5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=iC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function yy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function pue(e){const{dragControls:t,visualElement:n}=e,r=K5(()=>new fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function gue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($9),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new SD(h,l,{transformPagePoint:s})}C4(i,"pointerdown",o&&u),Z9(()=>a.current&&a.current.end())}const mue={pan:Vc(gue),drag:Vc(pue)},sC={current:null},PD={current:!1};function vue(){if(PD.current=!0,!!nh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sC.current=e.matches;e.addListener(t),t()}else sC.current=!1}const by=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function yue(){const e=by.map(()=>new bm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{by.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+by[i]]=o=>r.add(o),n["notify"+by[i]]=(...o)=>r.notify(...o)}),n}function bue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),L4(r)&&r.add(i);else if(Ss(a))e.addValue(i,L0(o)),L4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,L0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(rv),xue=TD.length,LD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:k,renderState:T}=b;let I;const O=yue(),N=new Map,D=new Map;let z={};const $={...k},W=g.initial?{...k}:{};let Y;function de(){!I||!E||(j(),o(I,T,g.style,Q.projection))}function j(){t(Q,T,k,P,g)}function te(){O.notifyUpdate(k)}function re(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:se,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),L4(se)&&se.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const V=q5(g),q=gN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){E=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!V&&(Y=h?.addVariantChild(Q)),N.forEach((me,ye)=>re(ye,me)),PD.current||vue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:sC.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Yf.update(te),Yf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,ye,Se,He,Ue){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:Ue,layoutScroll:At})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),N.set(X,me),k[X]=me.get(),re(X,me)},removeValue(X){var me;N.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,T)},hasValue:X=>N.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=N.get(X);return ye===void 0&&me!==void 0&&(ye=L0(me),Q.addValue(X,ye)),ye},forEachValue:X=>N.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,P),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K9(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),T},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=bue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!V){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!lC(o))return;const a=uC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!lC(o))continue;const a=uC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ue=new Set(["width","height","top","left","right","bottom","x","y"]),MD=e=>_ue.has(e),kue=e=>Object.keys(e).some(MD),OD=(e,t)=>{e.set(t,!1),e.set(t)},WT=e=>e===rh||e===St;var VT;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VT||(VT={}));const UT=(e,t)=>parseFloat(e.split(", ")[t]),jT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UT(o[1],e):0}},Eue=new Set(["x","y","z"]),Pue=S4.filter(e=>!Eue.has(e));function Tue(e){const t=[];return Pue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const GT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jT(4,13),y:jT(5,14)},Lue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=GT[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);OD(h,s[u]),e[u]=GT[u](l,o)}),e},Aue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(MD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=wg(h);const m=t[l];let v;if(ov(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=wg(h);for(let P=w;P=0?window.pageYOffset:null,u=Lue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),nh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Iue(e,t,n,r){return kue(t)?Aue(e,t,n,r):{target:t,transitionEnd:r}}const Mue=(e,t,n,r)=>{const i=Cue(e,t,r);return t=i.target,r=i.transitionEnd,Iue(e,t,n,r)};function Oue(e){return window.getComputedStyle(e)}const RD={treeType:"dom",readValueFromInstance(e,t){if(Av.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Oue(e),r=(yN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ED(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Ble(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Dle(e,r,a);const s=Mue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q9,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U9(t,n,r,i.transformTemplate)},render:IN},Rue=LD(RD),Nue=LD({...RD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Av.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=MN.has(t)?t:AN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:RN,build(e,t,n,r,i){G9(t,n,r,i.transformTemplate)},render:ON}),Due=(e,t)=>W9(e)?Nue(t,{enableHardwareAcceleration:!1}):Rue(t,{enableHardwareAcceleration:!0});function qT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Cg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qT(e,t.target.x),r=qT(e,t.target.y);return`${n}% ${r}%`}},KT="_$css",zue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(ID,v=>(o.push(v),KT)));const a=yu.parse(e);if(a.length>5)return r;const s=yu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(KT,()=>{const b=o[v];return v++,b})}return m}};class Bue extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Zoe($ue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Fue(e){const[t,n]=i7(),r=C.exports.useContext(H9);return x(Bue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(mN),isPresent:t,safeToRemove:n})}const $ue={borderRadius:{...Cg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cg,borderTopRightRadius:Cg,borderBottomLeftRadius:Cg,borderBottomRightRadius:Cg,boxShadow:zue},Hue={measureLayout:Fue};function Wue(e,t,n={}){const r=Ss(e)?e:L0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const ND=["TopLeft","TopRight","BottomLeft","BottomRight"],Vue=ND.length,YT=e=>typeof e=="string"?parseFloat(e):e,ZT=e=>typeof e=="number"||St.test(e);function Uue(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,Gue(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(av(e,t,r))}function QT(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QT(e.x,t.x),QT(e.y,t.y)}function JT(e,t,n,r,i){return e-=t,e=A4(e,1/n,r),i!==void 0&&(e=A4(e,1/i,r)),e}function que(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JT(e.min,t,n,s,i),e.max=JT(e.max,t,n,s,i)}function eL(e,t,[n,r,i],o,a){que(e,t[n],t[r],t[i],t.scale,o,a)}const Kue=["x","scaleX","originX"],Yue=["y","scaleY","originY"];function tL(e,t,n,r){eL(e.x,t,Kue,n?.x,r?.x),eL(e.y,t,Yue,n?.y,r?.y)}function nL(e){return e.translate===0&&e.scale===1}function zD(e){return nL(e.x)&&nL(e.y)}function BD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rL(e){return ua(e.x)/ua(e.y)}function Zue(e,t,n=.1){return r7(e,t)<=n}class Xue{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Que="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iL(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Que?"none":o}const Jue=(e,t)=>e.depth-t.depth;class ece{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jue),this.isDirty=!1,this.children.forEach(t)}}const oL=["","X","Y","Z"],aL=1e3;function FD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(oce),this.nodes.forEach(ace)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=vD(v,250),mm.hasAnimatedSinceResize&&(mm.hasAnimatedSinceResize=!1,this.nodes.forEach(lL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var P,E,k,T,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(P=this.options.transition)!==null&&P!==void 0?P:g.getDefaultTransition())!==null&&E!==void 0?E:dce,{onLayoutAnimationStart:N,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!BD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...s7(O,"layout"),onPlay:N,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&lL(this),this.isLead()&&((I=(T=this.options).onExitComplete)===null||I===void 0||I.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Yf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(sce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));fL(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=E/1e3;uL(m.x,a.x,T),uL(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Sm(v,this.layout.actual,this.relativeParent.layout.actual),uce(this.relativeTarget,this.relativeTargetOrigin,v,T)),b&&(this.animationValues=g,Uue(g,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Yf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{mm.hasAnimatedSinceResize=!0,this.currentAnimation=Wue(0,aL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,aL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&$D(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=ua(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ua(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Vp(s,h),xm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Xue),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(sL),this.root.sharedNodes.clear()}}}function tce(e){e.updateLayout()}function nce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=ua(v);v.min=o[m].min,v.max=v.min+b}):$D(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=ua(o[m]);v.max=v.min+b});const l=wm();xm(l,o,i.layout);const u=wm();i.isShared?xm(u,e.applyTransform(a,!0),i.measured):xm(u,o,i.layout);const h=!zD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Sm(b,i.layout,m.layout);const w=ki();Sm(w,o,v.actual),BD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function rce(e){e.clearSnapshot()}function sL(e){e.clearMeasurements()}function ice(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function oce(e){e.resolveTargetDelta()}function ace(e){e.calcProjection()}function sce(e){e.resetRotation()}function lce(e){e.removeLeadSnapshot()}function uL(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cL(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function uce(e,t,n,r){cL(e.x,t.x,n.x,r),cL(e.y,t.y,n.y,r)}function cce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dce={duration:.45,ease:[.4,0,.1,1]};function fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function dL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fL(e){dL(e.x),dL(e.y)}function $D(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zue(rL(t),rL(n),.2)}const hce=FD({attachResizeListener:(e,t)=>Y5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),RS={current:void 0},pce=FD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!RS.current){const e=new hce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),RS.current=e}return RS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),gce={...Yle,...ole,...mue,...Hue},Il=Koe((e,t)=>Oae(e,t,gce,Due,pce));function HD(){const e=C.exports.useRef(!1);return b4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mce(){const e=HD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class vce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(vce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const NS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=K5(bce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(yce,{isPresent:n,children:e})),x(j0.Provider,{value:u,children:e})};function bce(){return new Map}const Pp=e=>e.key||"";function xce(e,t){e.forEach(n=>{const r=Pp(n);t.set(r,n)})}function Sce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",fD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=mce();const l=C.exports.useContext(H9).forceRender;l&&(s=l);const u=HD(),h=Sce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(b4(()=>{w.current=!1,xce(h,b),v.current=g}),Z9(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Kn,{children:g.map(T=>x(NS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Pp(T)))});g=[...g];const P=v.current.map(Pp),E=h.map(Pp),k=P.length;for(let T=0;T{if(E.indexOf(T)!==-1)return;const I=b.get(T);if(!I)return;const O=P.indexOf(T),N=()=>{b.delete(T),m.delete(T);const D=v.current.findIndex(z=>z.key===T);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(NS,{isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:o,mode:a,children:I},Pp(I)))}),g=g.map(T=>{const I=T.key;return m.has(I)?T:x(NS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Pp(T))}),dD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Kn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function cC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function wce(){return!1}var Cce=e=>{const{condition:t,message:n}=e;t&&wce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},_g={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function dC(e){switch(e?.direction??"right"){case"right":return _g.slideRight;case"left":return _g.slideLeft;case"bottom":return _g.slideDown;case"top":return _g.slideUp;default:return _g.slideRight}}var Ff={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},_ce=e=>e!=null&&parseInt(e.toString(),10)>0,pL={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},kce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:_ce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pL.enter,i)})},VD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Cce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Il.div,{ref:t,...g,className:Nv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:kce,initial:r?"exit":!1,animate:E,exit:"exit"})})});VD.displayName="Collapse";var Ece={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit(Ff.exit,n),transitionEnd:t?.exit})},UD={initial:"exit",animate:"enter",exit:"exit",variants:Ece},Pce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:g&&le.createElement(Il.div,{ref:n,className:Nv("chakra-fade",o),custom:m,...UD,animate:h,...u})})});Pce.displayName="Fade";var Tce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit(Ff.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter(Ff.enter,n),transitionEnd:e?.enter})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Tce},Lce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:b,children:m&&le.createElement(Il.div,{ref:n,className:Nv("chakra-offset-slide",s),...jD,animate:v,custom:b,...g})})});Lce.displayName="ScaleFade";var gL={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Ace={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=dC({direction:e});return{...i,transition:t?.exit??Cs.exit(gL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=dC({direction:e});return{...i,transition:n?.enter??Cs.enter(gL.enter,r),transitionEnd:t?.enter}}},GD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=dC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Il.div,{...m,ref:n,initial:"exit",className:Nv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:Ace,style:b,...g})})});GD.displayName="Slide";var Ice={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit(Ff.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit(Ff.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},fC={initial:"initial",animate:"enter",exit:"exit",variants:Ice},Mce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(pd,{custom:w,children:v&&le.createElement(Il.div,{ref:n,className:Nv("chakra-offset-slide",a),custom:w,...fC,animate:b,...m})})});Mce.displayName="SlideFade";var Dv=(...e)=>e.filter(Boolean).join(" ");function Oce(){return!1}var tb=e=>{const{condition:t,message:n}=e;t&&Oce()&&console.warn(n)};function DS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rce,nb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Nce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Dce,Gke,zce,Bce]=hN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...nb().button};return le.createElement(we.button,{...i,className:Dv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function Fce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Wce(e),Vce(e);const s=zce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=U5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(k=>k!==v);g(E)}else P?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[$ce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Hce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Uce(e);const{register:m,index:v,descendants:b}=Bce({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);jce({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},k=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),I=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),N=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:DS($.onClick,T),onFocus:DS($.onFocus,O),onKeyDown:DS($.onKeyDown,I)}},[h,t,w,T,O,I,g,m]),D=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:N,getPanelProps:D,htmlProps:i}}function Wce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;tb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Vce(e){tb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Uce(e){tb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function jce(e){tb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Dv("chakra-accordion__icon",e.className),o=nb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ga,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Hce(t),l={...nb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(Nce,{value:u},le.createElement(we.div,{ref:n,...o,className:Dv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Dv("chakra-accordion__panel",r),g=nb();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(VD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var rb=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Fce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Dce,{value:l},le.createElement($ce,{value:h},le.createElement(Rce,{value:o},le.createElement(we.div,{ref:i,...s,className:Dv("chakra-accordion",r.className),__css:o.root},t))))});rb.displayName="Accordion";var Gce=(...e)=>e.filter(Boolean).join(" "),qce=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),zv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Gce("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${qce} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});zv.displayName="Spinner";var ib=(...e)=>e.filter(Boolean).join(" ");function Kce(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Yce(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mL(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Zce,Xce]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Qce,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),qD={info:{icon:Yce,colorScheme:"blue"},warning:{icon:mL,colorScheme:"orange"},success:{icon:Kce,colorScheme:"green"},error:{icon:mL,colorScheme:"red"},loading:{icon:zv,colorScheme:"blue"}};function Jce(e){return qD[e].colorScheme}function ede(e){return qD[e].icon}var KD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Jce(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Zce,{value:{status:r}},le.createElement(Qce,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ib("chakra-alert",t.className),__css:l})))});KD.displayName="Alert";var YD=Pe(function(t,n){const i={display:"inline",...p7().description};return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__desc",t.className),__css:i})});YD.displayName="AlertDescription";function ZD(e){const{status:t}=Xce(),n=ede(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:ib("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}ZD.displayName="AlertIcon";var XD=Pe(function(t,n){const r=p7();return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__title",t.className),__css:r.title})});XD.displayName="AlertTitle";function tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var rde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",I4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});I4.displayName="NativeImage";var ob=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=nde({...t,ignoreFallback:P}),k=rde(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?b:tde(b,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:I4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:I4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ob.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:I4,className:"chakra-image",...e}));function ab(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var sb=(...e)=>e.filter(Boolean).join(" "),vL=e=>e?"":void 0,[ide,ode]=Cn({strict:!1,name:"ButtonGroupContext"});function hC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=sb("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}hC.displayName="ButtonIcon";function pC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(zv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=sb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}pC.displayName="ButtonSpinner";function ade(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var aa=Pe((e,t)=>{const n=ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:P,...E}=vn(e),k=C.exports.useMemo(()=>{const N={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:N}}},[r,n]),{ref:T,type:I}=ade(P),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return le.createElement(we.button,{disabled:i||o,ref:Loe(t,T),as:P,type:m??I,"data-active":vL(a),"data-loading":vL(o),__css:k,className:sb("chakra-button",w),...E},o&&b==="start"&&x(pC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||le.createElement(we.span,{opacity:0},x(yL,{...O})):x(yL,{...O}),o&&b==="end"&&x(pC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});aa.displayName="Button";function yL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Kn,{children:[t&&x(hC,{marginEnd:i,children:t}),r,n&&x(hC,{marginStart:i,children:n})]})}var Eo=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=sb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(ide,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Eo.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(aa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var K0=(...e)=>e.filter(Boolean).join(" "),xy=e=>e?"":void 0,zS=e=>e?!0:void 0;function bL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,QD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[lde,Y0]=Cn({strict:!1,name:"FormControlContext"});function ude(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),T=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":xy(P),"data-disabled":xy(i),"data-invalid":xy(r),"data-readonly":xy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,P,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),N=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:N}}var gd=Pe(function(t,n){const r=Ri("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=ude(i),l=K0("chakra-form-control",t.className);return le.createElement(lde,{value:s},le.createElement(sde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var cde=Pe(function(t,n){const r=Y0(),i=QD(),o=K0("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});cde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":zS(n),"aria-required":zS(i),"aria-readonly":zS(r)}}function m7(e){const t=Y0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:bL(t?.onFocus,h),onBlur:bL(t?.onBlur,g)}}var[dde,fde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hde=Pe((e,t)=>{const n=Ri("FormError",e),r=vn(e),i=Y0();return i?.isInvalid?le.createElement(dde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:K0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});hde.displayName="FormErrorMessage";var pde=Pe((e,t)=>{const n=fde(),r=Y0();if(!r?.isInvalid)return null;const i=K0("chakra-form__error-icon",e.className);return x(ga,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});pde.displayName="FormErrorIcon";var ih=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(JD,{}),optionalIndicator:l=null,...u}=i,h=Y0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...g,className:K0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});ih.displayName="FormLabel";var JD=Pe(function(t,n){const r=Y0(),i=QD();if(!r?.isRequired)return null;const o=K0("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});JD.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},gde=we("span",{baseStyle:v7});gde.displayName="VisuallyHidden";var mde=we("input",{baseStyle:v7});mde.displayName="VisuallyHiddenInput";var xL=!1,lb=null,A0=!1,gC=new Set,vde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function yde(e){return!(e.metaKey||!vde&&e.altKey||e.ctrlKey)}function y7(e,t){gC.forEach(n=>n(e,t))}function SL(e){A0=!0,yde(e)&&(lb="keyboard",y7("keyboard",e))}function mp(e){lb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(A0=!0,y7("pointer",e))}function bde(e){e.target===window||e.target===document||(A0||(lb="keyboard",y7("keyboard",e)),A0=!1)}function xde(){A0=!1}function wL(){return lb!=="pointer"}function Sde(){if(typeof window>"u"||xL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){A0=!0,e.apply(this,n)},document.addEventListener("keydown",SL,!0),document.addEventListener("keyup",SL,!0),window.addEventListener("focus",bde,!0),window.addEventListener("blur",xde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",mp,!0),document.addEventListener("pointermove",mp,!0),document.addEventListener("pointerup",mp,!0)):(document.addEventListener("mousedown",mp,!0),document.addEventListener("mousemove",mp,!0),document.addEventListener("mouseup",mp,!0)),xL=!0}function wde(e){Sde(),e(wL());const t=()=>e(wL());return gC.add(t),()=>{gC.delete(t)}}var[qke,Cde]=Cn({name:"CheckboxGroupContext",strict:!1}),_de=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function Ea(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function kde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ede(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Pde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Tde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Pde:Ede;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Lde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ez(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:P,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":I,...O}=e,N=Lde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[W,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),[se,G]=C.exports.useState(!1);C.exports.useEffect(()=>wde(Y),[]);const V=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}ye||me(Se?Ae.target.checked:b?!0:Ae.target.checked),D?.(Ae)},[r,n,Se,ye,b,D]);bs(()=>{V.current&&(V.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Ae=V.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const Ue=n&&!m,ct=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!1)},[G]);bs(()=>{if(!V.current)return;V.current.checked!==Se&&me(V.current.checked)},[V.current]);const et=C.exports.useCallback((Ae={},dt=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Ae,ref:dt,"data-active":eo(se),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&W),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:Ea(Ae.onMouseDown,Mt),onMouseUp:Ea(Ae.onMouseUp,()=>G(!1)),onMouseEnter:Ea(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:Ea(Ae.onMouseLeave,()=>re(!1))}},[se,Se,n,de,W,te,b,o,r]),tt=C.exports.useCallback((Ae={},dt=null)=>({...N,...Ae,ref:$n(dt,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:Ea(Ae.onClick,()=>{var Mt;q||((Mt=V.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=V.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[N,n,Se,o,q]),at=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:$n(V,dt),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Ea(Ae.onChange,He),onBlur:Ea(Ae.onBlur,z,()=>j(!1)),onFocus:Ea(Ae.onFocus,$,()=>j(!0)),onKeyDown:Ea(Ae.onKeyDown,ct),onKeyUp:Ea(Ae.onKeyUp,qe),required:i,checked:Se,disabled:Ue,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,P,a,He,z,$,ct,qe,i,Se,Ue,r,k,T,I,o,u,n,E]),At=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:dt,onMouseDown:Ea(Ae.onMouseDown,CL),onTouchStart:Ea(Ae.onTouchStart,CL),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:se,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:et,getInputProps:at,getLabelProps:At,htmlProps:N}}function CL(e){e.preventDefault(),e.stopPropagation()}var Ade={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Ide={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Mde=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ode=hd({from:{opacity:0},to:{opacity:1}}),Rde=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),tz=Pe(function(t,n){const r=Cde(),i={...r,...t},o=Ri("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Tde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=kde(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:N,getLabelProps:D,getRootProps:z}=ez({...E,isDisabled:b,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Ode} 20ms linear, ${Rde} 200ms linear`:`${Mde} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return le.createElement(we.label,{__css:{...Ide,...o.container},className:_de("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(P,n)}),le.createElement(we.span,{__css:{...Ade,...o.control},className:"chakra-checkbox__control",...N()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});tz.displayName="Checkbox";function Nde(e){return x(ga,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var ub=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Nde,{width:"1em",height:"1em"}))});ub.displayName="CloseButton";function Dde(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Dde(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function mC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function M4(e,t,n){return(e-t)*100/(n-t)}function nz(e,t,n){return(n-t)*e+t}function vC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=mC(n);return b7(r,i)}function l0(e,t,n){return e==null?e:(nr==null?"":BS(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=rz(_c(v),o),w=n??b,P=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let Y=W;return l&&(Y=l0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(W):Y=_c(v)+W,Y=E(Y),P(Y)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(-W):Y=_c(v)-W,Y=E(Y),P(Y)},[E,o,P,v]),I=C.exports.useCallback(()=>{let W;r==null?W="":W=BS(r,o,n)??a,P(W)},[r,n,o,P,a]),O=C.exports.useCallback(W=>{const Y=BS(W,o,w)??a;P(Y)},[w,o,P,a]),N=_c(v);return{isOutOfRange:N>s||Nx($5,{styles:iz}),Fde=()=>x($5,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${iz} + `});function $f(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function $de(e){return"current"in e}var oz=()=>typeof window<"u";function Hde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Wde=e=>oz()&&e.test(navigator.vendor),Vde=e=>oz()&&e.test(Hde()),Ude=()=>Vde(/mac|iphone|ipad|ipod/i),jde=()=>Ude()&&Wde(/apple/i);function Gde(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};$f(i,"pointerdown",o=>{if(!jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=$de(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var qde=$Q?C.exports.useLayoutEffect:C.exports.useEffect;function _L(e,t=[]){const n=C.exports.useRef(e);return qde(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Kde(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Yde(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function O4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_L(n),a=_L(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Kde(r,s),g=Yde(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:HQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=vn(i),s=g7(a),l=Nr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[Zde,az]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=ab(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Zde,{value:r,children:g}))});Xde.displayName="InputGroup";var Qde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Jde=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Qde[r]??{},a=az();return x(Jde,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var sz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});sz.displayName="InputLeftAddon";sz.id="InputLeftAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});lz.displayName="InputRightAddon";lz.id="InputRightAddon";var efe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),cb=Pe(function(t,n){const{placement:r="left",...i}=t,o=az(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(efe,{ref:n,__css:l,...i})});cb.id="InputElement";cb.displayName="InputElement";var uz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(cb,{ref:n,placement:"left",className:o,...i})});uz.id="InputLeftElement";uz.displayName="InputLeftElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(cb,{ref:n,placement:"right",className:o,...i})});cz.id="InputRightElement";cz.displayName="InputRightElement";function tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var nfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});nfe.displayName="AspectRatio";var rfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});rfe.displayName="Badge";var md=we("div");md.displayName="Box";var dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(md,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});dz.displayName="Square";var ife=Pe(function(t,n){const{size:r,...i}=t;return x(dz,{size:r,ref:n,borderRadius:"9999px",...i})});ife.displayName="Circle";var fz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});fz.displayName="Center";var ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:ofe[r],...i,position:"absolute"})});var afe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});afe.displayName="Code";var sfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});sfe.displayName="Container";var lfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});lfe.displayName="Divider";var an=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:g,...h})});an.displayName="Flex";var hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...b})});hz.displayName="Grid";function kL(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ufe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kL(i),gridRow:kL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:g,...h})});ufe.displayName="GridItem";var Hf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Hf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(md,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var cfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});cfe.displayName="Kbd";var Wf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Wf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[dfe,pz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=ab(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(dfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});ffe.displayName="OrderedList";var gz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});gz.displayName="UnorderedList";var mz=Pe(function(t,n){const r=pz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});mz.displayName="ListItem";var hfe=Pe(function(t,n){const r=pz();return x(ga,{ref:n,role:"presentation",...t,__css:r.icon})});hfe.displayName="ListIcon";var pfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=U0(),h=s?mfe(s,u):vfe(r);return x(hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});pfe.displayName="SimpleGrid";function gfe(e){return typeof e=="number"?`${e}px`:e}function mfe(e,t){return od(e,n=>{const r=yoe("sizes",n,gfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function vfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});vz.displayName="Spacer";var yC="& > *:not(style) ~ *:not(style)";function yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[yC]:od(n,i=>r[i])}}function bfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>bfe({spacing:a,direction:v}),[a,v]),P=!!u,E=!g&&!P,k=C.exports.useMemo(()=>{const I=ab(l);return E?I:I.map((O,N)=>{const D=typeof O.key<"u"?O.key:N,z=N+1===I.length,W=g?x(yz,{children:O},D):O;if(!P)return W;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[W,de]},D)})},[u,w,P,E,g,l]),T=Nr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:P?{}:{[yC]:b[yC]},...m},k)});_7.displayName="Stack";var bz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));bz.displayName="HStack";var xfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));xfe.displayName="VStack";var ko=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});ko.displayName="Text";function EL(e){return typeof e=="number"?`${e}px`:e}var Sfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,k=>EL(Pw("space",k)(E))),"--chakra-wrap-y-spacing":E=>od(P,k=>EL(Pw("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,P)=>x(xz,{children:w},P)):a,[a,g]);return le.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Sfe.displayName="Wrap";var xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});xz.displayName="WrapItem";var wfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Sz=wfe,vp=()=>{},Cfe={document:Sz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:vp,removeEventListener:vp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:vp,removeListener:vp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:vp,setInterval:()=>0,clearInterval:vp},_fe=Cfe,kfe={window:_fe,document:Sz},wz=typeof window<"u"?{window,document}:kfe,Cz=C.exports.createContext(wz);Cz.displayName="EnvironmentContext";function _z(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:wz},[r,n]);return ee(Cz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}_z.displayName="EnvironmentProvider";var Efe=e=>e?"":void 0;function Pfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function FS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Tfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,P]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),T=Pfe(),I=G=>{!G||G.tagName!=="BUTTON"&&P(!1)},O=w?g:g||0,N=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{E&&FS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;const V=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),V&&(G.preventDefault(),G.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),T.remove(document,"mouseup",Y,!1))},[T]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,T,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),re=C.exports.useCallback(G=>{E&&(G.preventDefault(),k(!1)),v?.(G)},[E,v]),se=$n(t,I);return w?{...b,ref:se,type:"button","aria-disabled":N?void 0:n,disabled:N,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:se,role:"button","data-active":Efe(E),"aria-disabled":n?"true":void 0,tabIndex:N?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:W,onKeyDown:$,onMouseOver:te,onMouseLeave:re}}function kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ez(e){if(!kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Lfe(e){var t;return((t=Pz(e))==null?void 0:t.defaultView)??window}function Pz(e){return kz(e)?e.ownerDocument:document}function Afe(e){return Pz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ife=e=>Tz(e)&&e.tabIndex===-1;function Mfe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Lz(e){return e.parentElement&&Lz(e.parentElement)?!0:e.hidden}function Ofe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Az(e){if(!Ez(e)||Lz(e)||Mfe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ofe(e)?!0:Tz(e)}function Rfe(e){return e?Ez(e)&&Az(e)&&!Ife(e):!1}var Nfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Dfe=Nfe.join(),zfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Iz(e){const t=Array.from(e.querySelectorAll(Dfe));return t.unshift(e),t.filter(n=>Az(n)&&zfe(n))}function Bfe(e){const t=e.current;if(!t)return!1;const n=Afe(t);return!n||t.contains(n)?!1:!!Rfe(n)}function Ffe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Bfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var $fe={preventScroll:!0,shouldFocus:!1};function Hfe(e,t=$fe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Wfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Iz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),$f(a,"transitionend",h)}function Wfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Bv=[Io,Ba,Fa,Mo],I0="start",uv="end",Vfe="clippingParents",Mz="viewport",kg="popper",Ufe="reference",PL=Bv.reduce(function(e,t){return e.concat([t+"-"+I0,t+"-"+uv])},[]),Oz=[].concat(Bv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+I0,t+"-"+uv])},[]),jfe="beforeRead",Gfe="read",qfe="afterRead",Kfe="beforeMain",Yfe="main",Zfe="afterMain",Xfe="beforeWrite",Qfe="write",Jfe="afterWrite",ehe=[jfe,Gfe,qfe,Kfe,Yfe,Zfe,Xfe,Qfe,Jfe];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function the(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function nhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const rhe={name:"applyStyles",enabled:!0,phase:"write",fn:the,effect:nhe,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Vf=Math.max,R4=Math.min,M0=Math.round;function bC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Rz(){return!/^((?!chrome|android).)*safari/i.test(bC())}function O0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&M0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M0(r.height)/e.offsetHeight||1);var a=Zf(e)?Wa(e):window,s=a.visualViewport,l=!Rz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=O0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Wa(e).getComputedStyle(e)}function ihe(e){return["table","td","th"].indexOf(El(e))>=0}function vd(e){return((Zf(e)?e.ownerDocument:e.document)||window.document).documentElement}function db(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||vd(e)}function TL(e){return!Na(e)||bu(e).position==="fixed"?null:e.offsetParent}function ohe(e){var t=/firefox/i.test(bC()),n=/Trident/i.test(bC());if(n&&Na(e)){var r=bu(e);if(r.position==="fixed")return null}var i=db(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fv(e){for(var t=Wa(e),n=TL(e);n&&ihe(n)&&bu(n).position==="static";)n=TL(n);return n&&(El(n)==="html"||El(n)==="body"&&bu(n).position==="static")?t:n||ohe(e)||t}function T7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cm(e,t,n){return Vf(e,R4(t,n))}function ahe(e,t,n){var r=Cm(e,t,n);return r>n?n:r}function Dz(){return{top:0,right:0,bottom:0,left:0}}function zz(e){return Object.assign({},Dz(),e)}function Bz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var she=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zz(typeof t!="number"?t:Bz(t,Bv))};function lhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=T7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=she(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=Fv(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,I=g[v],O=k-m[h]-g[b],N=k/2-m[h]/2+T,D=Cm(I,N,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-N,t)}}function uhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Nz(t.elements.popper,i)||(t.elements.arrow=i))}const che={name:"arrow",enabled:!0,phase:"main",fn:lhe,effect:uhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function R0(e){return e.split("-")[1]}var dhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:M0(t*i)/i||0,y:M0(n*i)/i||0}}function LL(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Mo,I=Io,O=window;if(u){var N=Fv(n),D="clientHeight",z="clientWidth";if(N===Wa(n)&&(N=vd(n),bu(N).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),N=N,i===Io||(i===Mo||i===Fa)&&o===uv){I=Ba;var $=g&&N===O&&O.visualViewport?O.visualViewport.height:N[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===uv){T=Fa;var W=g&&N===O&&O.visualViewport?O.visualViewport.width:N[z];v-=W-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&dhe),de=h===!0?fhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[T]=E?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:R0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LL(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LL(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const phe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hhe,data:{}};var Sy={passive:!0};function ghe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Sy)}),s&&l.addEventListener("resize",n.update,Sy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Sy)}),s&&l.removeEventListener("resize",n.update,Sy)}}const mhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ghe,data:{}};var vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function C3(e){return e.replace(/left|right|bottom|top/g,function(t){return vhe[t]})}var yhe={start:"end",end:"start"};function AL(e){return e.replace(/start|end/g,function(t){return yhe[t]})}function L7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return O0(vd(e)).left+L7(e).scrollLeft}function bhe(e,t){var n=Wa(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Rz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function xhe(e){var t,n=vd(e),r=L7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Vf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=Vf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Fz(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Fz(db(e))}function _m(e,t){var n;t===void 0&&(t=[]);var r=Fz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(_m(db(a)))}function xC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function She(e,t){var n=O0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IL(e,t,n){return t===Mz?xC(bhe(e,n)):Zf(t)?She(t,n):xC(xhe(vd(e)))}function whe(e){var t=_m(db(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&Na(e)?Fv(e):e;return Zf(r)?t.filter(function(i){return Zf(i)&&Nz(i,r)&&El(i)!=="body"}):[]}function Che(e,t,n,r){var i=t==="clippingParents"?whe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IL(e,u,r);return l.top=Vf(h.top,l.top),l.right=R4(h.right,l.right),l.bottom=R4(h.bottom,l.bottom),l.left=Vf(h.left,l.left),l},IL(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function $z(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?R0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?T7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case I0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case uv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Vfe:s,u=n.rootBoundary,h=u===void 0?Mz:u,g=n.elementContext,m=g===void 0?kg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=zz(typeof P!="number"?P:Bz(P,Bv)),k=m===kg?Ufe:kg,T=e.rects.popper,I=e.elements[b?k:m],O=Che(Zf(I)?I:I.contextElement||vd(e.elements.popper),l,h,a),N=O0(e.elements.reference),D=$z({reference:N,element:T,strategy:"absolute",placement:i}),z=xC(Object.assign({},T,D)),$=m===kg?z:N,W={top:O.top-$.top+E.top,bottom:$.bottom-O.bottom+E.bottom,left:O.left-$.left+E.left,right:$.right-O.right+E.right},Y=e.modifiersData.offset;if(m===kg&&Y){var de=Y[i];Object.keys(W).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,re=[Io,Ba].indexOf(j)>=0?"y":"x";W[j]+=de[re]*te})}return W}function _he(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Oz:l,h=R0(r),g=h?s?PL:PL.filter(function(b){return R0(b)===h}):Bv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function khe(e){if(wl(e)===k7)return[];var t=C3(e);return[AL(e),t,AL(t)]}function Ehe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=wl(P),k=E===P,T=l||(k||!b?[C3(P)]:khe(P)),I=[P].concat(T).reduce(function(Se,He){return Se.concat(wl(He)===k7?_he(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,N=t.rects.popper,D=new Map,z=!0,$=I[0],W=0;W=0,re=te?"width":"height",se=cv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[re]>N[re]&&(G=C3(G));var V=C3(G),q=[];if(o&&q.push(se[de]<=0),s&&q.push(se[G]<=0,se[V]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var Ue=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(et){return et})});if(Ue)return $=Ue,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Phe={name:"flip",enabled:!0,phase:"main",fn:Ehe,requiresIfExists:["offset"],data:{_skip:!1}};function ML(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function OL(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function The(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=cv(t,{elementContext:"reference"}),s=cv(t,{altBoundary:!0}),l=ML(a,r),u=ML(s,i,o),h=OL(l),g=OL(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Lhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:The};function Ahe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Ihe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Oz.reduce(function(h,g){return h[g]=Ahe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Mhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ihe};function Ohe(e){var t=e.state,n=e.name;t.modifiersData[n]=$z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Rhe={name:"popperOffsets",enabled:!0,phase:"read",fn:Ohe,data:{}};function Nhe(e){return e==="x"?"y":"x"}function Dhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,P=cv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),E=wl(t.placement),k=R0(t.placement),T=!k,I=T7(E),O=Nhe(I),N=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!N){if(o){var j,te=I==="y"?Io:Mo,re=I==="y"?Ba:Fa,se=I==="y"?"height":"width",G=N[I],V=G+P[te],q=G-P[re],Q=v?-z[se]/2:0,X=k===I0?D[se]:z[se],me=k===I0?-z[se]:-D[se],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dz(),Ue=He[te],ct=He[re],qe=Cm(0,D[se],Se[se]),et=T?D[se]/2-Q-qe-Ue-W.mainAxis:X-qe-Ue-W.mainAxis,tt=T?-D[se]/2+Q+qe+ct+W.mainAxis:me+qe+ct+W.mainAxis,at=t.elements.arrow&&Fv(t.elements.arrow),At=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Ae=G+et-wt-At,dt=G+tt-wt,Mt=Cm(v?R4(V,Ae):V,G,v?Vf(q,dt):q);N[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=N[O],Zt=O==="y"?"height":"width",En=Et+P[xt],yn=Et-P[kn],Me=[Io,Mo].indexOf(E)!==-1,Je=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-Je+W.altAxis,Gt=Me?Et+D[Zt]+z[Zt]-Je-W.altAxis:yn,Ee=v&&Me?ahe(Xt,Et,Gt):Cm(v?Xt:En,Et,v?Gt:yn);N[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const zhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Dhe,requiresIfExists:["offset"]};function Bhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Fhe(e){return e===Wa(e)||!Na(e)?L7(e):Bhe(e)}function $he(e){var t=e.getBoundingClientRect(),n=M0(t.width)/e.offsetWidth||1,r=M0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Hhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&$he(t),o=vd(t),a=O0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=Fhe(t)),Na(t)?(l=O0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Whe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Vhe(e){var t=Whe(e);return ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Uhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var RL={placement:"bottom",modifiers:[],strategy:"absolute"};function NL(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:yp("--popper-arrow-shadow-color"),arrowSize:yp("--popper-arrow-size","8px"),arrowSizeHalf:yp("--popper-arrow-size-half"),arrowBg:yp("--popper-arrow-bg"),transformOrigin:yp("--popper-transform-origin"),arrowOffset:yp("--popper-arrow-offset")};function Yhe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Zhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Xhe=e=>Zhe[e],DL={scroll:!0,resize:!0};function Qhe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DL,...e}}:t={enabled:e,options:DL},t}var Jhe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zL(e)},effect:({state:e})=>()=>{zL(e)}},zL=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Xhe(e.placement))},tpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{npe(e)}},npe=e=>{var t;if(!e.placement)return;const n=rpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},rpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},ipe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BL(e)},effect:({state:e})=>()=>{BL(e)}},BL=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Yhe(e.placement)})},ope={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ape={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function spe(e,t="ltr"){var n;const r=((n=ope[e])==null?void 0:n[t])||e;return t==="ltr"?r:ape[e]??r}function Hz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=spe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!b.current||!w.current||((W=k.current)==null||W.call(k),P.current=Khe(b.current,w.current,{placement:E,modifiers:[ipe,tpe,epe,{...Jhe,enabled:!!m},{name:"eventListeners",...Qhe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),k.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!b.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const I=C.exports.useCallback(W=>{b.current=W,T()},[T]),O=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(I,Y)}),[I]),N=C.exports.useCallback(W=>{w.current=W,T()},[T]),D=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(N,Y),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,N,m]),z=C.exports.useCallback((W={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:re,...se}=W;return{...se,ref:Y,"data-popper-arrow":"",style:lpe(W)}},[]),$=C.exports.useCallback((W={},Y=null)=>({...W,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function lpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Wz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function P(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var I;(I=k.onClick)==null||I.call(k,T),w()}}}function E(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function upe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),$f(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Lfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Vz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[cpe,dpe]=Cn({strict:!1,name:"PortalManagerContext"});function Uz(e){const{children:t,zIndex:n}=e;return x(cpe,{value:{zIndex:n},children:t})}Uz.displayName="PortalManager";var[jz,fpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",hpe=".chakra-portal",ppe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),gpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=fpe(),l=dpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(ppe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(jz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},mpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(jz,{value:r?a:null,children:t}),a):null};function oh(e){const{containerRef:t,...n}=e;return t?x(mpe,{containerRef:t,...n}):x(gpe,{...n})}oh.defaultProps={appendToParentPortal:!0};oh.className=M7;oh.selector=hpe;oh.displayName="Portal";var vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bp=new WeakMap,wy=new WeakMap,Cy={},$S=0,ype=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Cy[n]||(Cy[n]=new WeakMap);var o=Cy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(bp.get(m)||0)+1,P=(o.get(m)||0)+1;bp.set(m,w),o.set(m,P),a.push(m),w===1&&b&&wy.set(m,!0),P===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),$S++,function(){a.forEach(function(g){var m=bp.get(g)-1,v=o.get(g)-1;bp.set(g,m),o.set(g,v),m||(wy.has(g)||g.removeAttribute(r),wy.delete(g)),v||g.removeAttribute(n)}),$S--,$S||(bp=new WeakMap,bp=new WeakMap,wy=new WeakMap,Cy={})}},Gz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ype(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},bpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xpe=bpe,Spe=xpe;function qz(){}function Kz(){}Kz.resetWarningCache=qz;var wpe=function(){function e(r,i,o,a,s,l){if(l!==Spe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kz,resetWarningCache:qz};return n.PropTypes=n,n};Rn.exports=wpe();var SC="data-focus-lock",Yz="data-focus-lock-disabled",Cpe="data-no-focus-lock",_pe="data-autofocus-inside",kpe="data-no-autofocus";function Epe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ppe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Zz(e,t){return Ppe(t||null,function(n){return e.forEach(function(r){return Epe(r,n)})})}var HS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Xz(e){return e}function Qz(e,t){t===void 0&&(t=Xz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Xz),Qz(e,t)}function Jz(e){e===void 0&&(e={});var t=Qz(null);return t.options=hl({async:!0,ssr:!1},e),t}var eB=function(e){var t=e.sideCar,n=WD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};eB.isSideCarExport=!0;function Tpe(e,t){return e.useMedium(t),eB}var tB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),nB=R7(),Lpe=R7(),Ape=Jz({async:!0}),Ipe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,k=t.whiteList,T=t.hasPositiveIndices,I=t.shards,O=I===void 0?Ipe:I,N=t.as,D=N===void 0?"div":N,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,re=C.exports.useState({}),se=re[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),V=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var et=typeof Y=="function"?Y(qe):Y;if(et){var tt=typeof et=="object"?et:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(tt)}):qe.focus(tt)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&tB.useMedium(ct)},[]),X=nB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Yz]=g&&"disabled",r[SC]=P,r),$),Se=m!==!0,He=Se&&m!=="tail",Ue=Zz([n,me]);return ee(Kn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:HS},"guard-nearest"):null],!g&&x(W,{id:se,sideCar:Ape,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:V,returnFocus:q,focusOptions:de}),x(D,{ref:Ue,...ye,className:E,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const rB=N7;function wC(e,t){return wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wC(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wC(e,t)}function iB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mpe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return iB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort($pe)},Hpe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Hpe.join(","),Wpe="".concat(B7,", [data-focus-guard]"),hB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Wpe:B7)?[i]:[],hB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(hB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Vpe=function(e){var t=e.querySelectorAll("[".concat(_pe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return sB(t,n)}).filter(function(n){return zpe(n)})},FL=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return lB(t,n)})},_C=function(e,t,n){return fB($7(F7(e,n),t),!0,n)},$L=function(e,t){return fB($7(F7(e),t),!1)},Upe=function(e,t){return $7(Vpe(e),t)},dv=function(e,t){return e.shadowRoot?dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return dv(n,t)})},jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},pB=function(e){return e.parentNode?pB(e.parentNode):e},H7=function(e){var t=CC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(SC);return n.push.apply(n,i?jpe(Ml(pB(r).querySelectorAll("[".concat(SC,'="').concat(i,'"]:not([').concat(Yz,'="disabled"])')))):[r]),n},[])},gB=function(e){return e.activeElement?e.activeElement.shadowRoot?gB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?gB(document.activeElement.shadowRoot):document.activeElement:void 0},Gpe=function(e){return e===document.activeElement},qpe=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return Gpe(t)}))},mB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return dv(n,t)||qpe(n)})},Kpe=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Cpe,"]"))).some(function(t){return dv(t,e)}):!1},Ype=function(e,t){return t.filter(dB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return dB(e)&&e.name?Ype(e,t):e},Zpe=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HL=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WL=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},vB="NEW_FOCUS",Xpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Zpe(t),w=n!==void 0?b.indexOf(n):-1,P=w-(r?b.indexOf(r):l),E=WL(e,0),k=WL(e,i-1);if(l===-1||h===-1)return vB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(P)>1)return h;if(l<=m)return k;if(l>v)return E;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},Qpe=function(e){return function(t){var n,r=(n=uB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Jpe=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FL(r.filter(Qpe(n)));return i&&i.length?HL(i):HL(FL(t))},kC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&kC(e.parentNode.host||e.parentNode,t),t},WS=function(e,t){for(var n=kC(e),r=kC(t),i=0;i=0)return o}return!1},yB=function(e,t,n){var r=CC(e),i=CC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=WS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=WS(o,l);u&&(!a||dv(u,a)?a=u:a=WS(u,a))})}),a},e0e=function(e,t){return e.reduce(function(n,r){return n.concat(Upe(r,t))},[])},t0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Fpe)},n0e=function(e,t){var n=document&&W7(),r=H7(e).filter(N4),i=yB(n||e,e,r),o=new Map,a=$L(r,o),s=_C(r,o).filter(function(m){var v=m.node;return N4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$L([i],o).map(function(m){var v=m.node;return v}),u=t0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=Xpe(h,l,n,t);return g===vB?{node:Jpe(a,h,e0e(r,o))}:g===void 0?g:u[g]}},r0e=function(e){var t=H7(e).filter(N4),n=yB(e,e,t),r=new Map,i=_C([n],r,!0),o=_C(t,r).filter(function(a){var s=a.node;return N4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},i0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},VS=0,US=!1,o0e=function(e,t,n){n===void 0&&(n={});var r=n0e(e,t);if(!US&&r){if(VS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),US=!0,setTimeout(function(){US=!1},1);return}VS++,i0e(r.node,n.focusOptions),VS--}};const bB=o0e;function xB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var a0e=function(){return document&&document.activeElement===document.body},s0e=function(){return a0e()||Kpe()},u0=null,Up=null,c0=null,fv=!1,l0e=function(){return!0},u0e=function(t){return(u0.whiteList||l0e)(t)},c0e=function(t,n){c0={observerNode:t,portaledElement:n}},d0e=function(t){return c0&&c0.portaledElement===t};function VL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var f0e=function(t){return t&&"current"in t?t.current:t},h0e=function(t){return t?Boolean(fv):fv==="meanwhile"},p0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},g0e=function(t,n){return n.some(function(r){return p0e(t,r,r)})},D4=function(){var t=!1;if(u0){var n=u0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||c0&&c0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(f0e).filter(Boolean));if((!h||u0e(h))&&(i||h0e(s)||!s0e()||!Up&&o)&&(u&&!(mB(g)||h&&g0e(h,g)||d0e(h))&&(document&&!Up&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=bB(g,Up,{focusOptions:l}),c0={})),fv=!1,Up=document&&document.activeElement),document){var m=document&&document.activeElement,v=r0e(g),b=v.map(function(w){var P=w.node;return P}).indexOf(m);b>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),VL(b,v.length,1,v),VL(b,-1,-1,v))}}}return t},SB=function(t){D4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return xB(D4)},m0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||c0e(r,n)},v0e=function(){return null},wB=function(){fv="just",setTimeout(function(){fv="meanwhile"},0)},y0e=function(){document.addEventListener("focusin",SB),document.addEventListener("focusout",U7),window.addEventListener("blur",wB)},b0e=function(){document.removeEventListener("focusin",SB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",wB)};function x0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function S0e(e){var t=e.slice(-1)[0];t&&!u0&&y0e();var n=u0,r=n&&t&&t.id===n.id;u0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Up=null,(!r||n.observed!==t.observed)&&t.onActivation(),D4(),xB(D4)):(b0e(),Up=null)}tB.assignSyncMedium(m0e);nB.assignMedium(U7);Lpe.assignMedium(function(e){return e({moveFocusInside:bB,focusInside:mB})});const w0e=Mpe(x0e,S0e)(v0e);var CB=C.exports.forwardRef(function(t,n){return x(rB,{sideCar:w0e,ref:n,...t})}),_B=rB.propTypes||{};_B.sideCar;O7(_B,["sideCar"]);CB.propTypes={};const C0e=CB;var kB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Iz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(C0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};kB.displayName="FocusLock";var _3="right-scroll-bar-position",k3="width-before-scroll-bar",_0e="with-scroll-bars-hidden",k0e="--removed-body-scroll-bar-size",EB=Jz(),jS=function(){},fb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:jS,onWheelCapture:jS,onTouchMoveCapture:jS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,k=WD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,I=Zz([n,t]),O=hl(hl({},k),i);return ee(Kn,{children:[h&&x(T,{sideCar:EB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(E,{...hl({},O,{className:l,ref:I}),children:s})]})});fb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fb.classNames={fullWidth:k3,zeroRight:_3};var E0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function P0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E0e();return t&&e.setAttribute("nonce",t),e}function T0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function L0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=P0e())&&(T0e(t,n),L0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I0e=function(){var e=A0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},PB=function(){var e=I0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},M0e={left:0,top:0,right:0,gap:0},GS=function(e){return parseInt(e||"",10)||0},O0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[GS(n),GS(r),GS(i)]},R0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M0e;var t=O0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},N0e=PB(),D0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(_0e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(_3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(k3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(_3," .").concat(_3,` { + right: 0 `).concat(r,`; + } + + .`).concat(k3," .").concat(k3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(k0e,": ").concat(s,`px; + } +`)},z0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return R0e(i)},[i]);return x(N0e,{styles:D0e(o,!t,i,n?"":"!important")})},EC=!1;if(typeof window<"u")try{var _y=Object.defineProperty({},"passive",{get:function(){return EC=!0,!0}});window.addEventListener("test",_y,_y),window.removeEventListener("test",_y,_y)}catch{EC=!1}var xp=EC?{passive:!1}:!1,B0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B0e(e)&&n[t]==="visible")},F0e=function(e){return TB(e,"overflowY")},$0e=function(e){return TB(e,"overflowX")},UL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=LB(e,n);if(r){var i=AB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},H0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},W0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},LB=function(e,t){return e==="v"?F0e(t):$0e(t)},AB=function(e,t){return e==="v"?H0e(t):W0e(t)},V0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},U0e=function(e,t,n,r,i){var o=V0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=AB(e,s),b=v[0],w=v[1],P=v[2],E=w-P-o*b;(b||E)&&LB(e,s)&&(g+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},ky=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jL=function(e){return[e.deltaX,e.deltaY]},GL=function(e){return e&&"current"in e?e.current:e},j0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},G0e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},q0e=0,Sp=[];function K0e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(q0e++)[0],o=C.exports.useState(function(){return PB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=cC([e.lockRef.current],(e.shards||[]).map(GL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=ky(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-E[0],I="deltaY"in w?w.deltaY:k[1]-E[1],O,N=w.target,D=Math.abs(T)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&N.type==="range")return!1;var z=UL(D,N);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UL(D,N)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||I)&&(r.current=O),!O)return!0;var $=r.current||O;return U0e($,P,w,$==="h"?T:I,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!Sp.length||Sp[Sp.length-1]!==o)){var E="deltaY"in P?jL(P):ky(P),k=t.current.filter(function(O){return O.name===P.type&&O.target===P.target&&j0e(O.delta,E)})[0];if(k&&k.should){P.cancelable&&P.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(GL).filter(Boolean).filter(function(O){return O.contains(P.target)}),I=T.length>0?s(P,T[0]):!a.current.noIsolation;I&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,k){var T={name:w,delta:P,target:E,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(I){return I!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=ky(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,ky(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Sp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,xp),document.addEventListener("touchmove",l,xp),document.addEventListener("touchstart",h,xp),function(){Sp=Sp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,xp),document.removeEventListener("touchmove",l,xp),document.removeEventListener("touchstart",h,xp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Kn,{children:[b?x(o,{styles:G0e(i)}):null,v?x(z0e,{gapMode:"margin"}):null]})}const Y0e=Tpe(EB,K0e);var IB=C.exports.forwardRef(function(e,t){return x(fb,{...hl({},e,{ref:t,sideCar:Y0e})})});IB.classNames=fb.classNames;const MB=IB;var ah=(...e)=>e.filter(Boolean).join(" ");function Ug(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var Z0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},PC=new Z0e;function X0e(e,t){C.exports.useEffect(()=>(t&&PC.add(e),()=>{PC.remove(e)}),[t,e])}function Q0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=e1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");J0e(u,t&&a),X0e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[T,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:Ug(z.onClick,W=>W.stopPropagation())}),[v,T,g,m,E]),N=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!PC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Ug(z.onClick,N),onKeyDown:Ug(z.onKeyDown,P),onMouseDown:Ug(z.onMouseDown,w)}),[P,w,N]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function J0e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Gz(e.current)},[t,e,n])}function e1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[t1e,sh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[n1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),P={...Q0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(n1e,{value:P,children:x(t1e,{value:b,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(oh,{...t,children:n})})})})};N0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};N0.displayName="Modal";var z4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__body",n),s=sh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});z4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=ah("chakra-modal__close-btn",r),s=sh();return x(ub,{ref:t,__css:s.closeButton,className:a,onClick:Ug(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function OB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(kB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(MB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var r1e={slideInBottom:{...fC,custom:{offsetY:16,reverse:!0}},slideInRight:{...fC,custom:{offsetX:16,reverse:!0}},scale:{...jD,custom:{initialScale:.95,reverse:!0}},none:{}},i1e=we(Il.section),o1e=e=>r1e[e||"none"],RB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=o1e(n),...i}=e;return x(i1e,{ref:t,...r,...i})});RB.displayName="ModalTransition";var hv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=ah("chakra-modal__content",n),m=sh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(OB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(RB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});hv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=ah("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...sh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__header",n),l={flex:0,...sh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var a1e=we(Il.div),pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ah("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...sh().overlay},{motionPreset:u}=ad();return x(a1e,{...i||(u==="none"?{}:UD),__css:l,ref:t,className:a,...o})});pv.displayName="ModalOverlay";function s1e(e){const{leastDestructiveRef:t,...n}=e;return x(N0,{...n,initialFocusRef:t})}var l1e=Pe((e,t)=>x(hv,{ref:t,role:"alertdialog",...e})),[Kke,u1e]=Cn(),c1e=we(GD),d1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=ah("chakra-modal__content",n),v=sh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=u1e();return le.createElement(OB,null,le.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(c1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:b,children:r})))});d1e.displayName="DrawerContent";function f1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var NB=(...e)=>e.filter(Boolean).join(" "),qS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var h1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),p1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function qL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var g1e=50,KL=300;function m1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);f1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?g1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KL)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var v1e=/^[Ee0-9+\-.]$/;function y1e(e){return v1e.test(e)}function b1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function x1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:P,name:E,"aria-describedby":k,"aria-label":T,"aria-labelledby":I,onFocus:O,onBlur:N,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:W,parse:Y,...de}=e,j=dr(O),te=dr(N),re=dr(D),se=dr($??y1e),G=dr(z),V=zde(e),{update:q,increment:Q,decrement:X}=V,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),et=C.exports.useCallback(Ee=>Ee.split("").filter(se).join(""),[se]),tt=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),at=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);id(()=>{(V.valueAsNumber>o||V.valueAsNumber{if(!He.current)return;if(He.current.value!=V.value){const It=tt(He.current.value);V.setValue(et(It))}},[tt,et]);const At=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Ae=m1e(At,wt);qL(ct,"disabled",Ae.stop,Ae.isSpinning),qL(qe,"disabled",Ae.stop,Ae.isSpinning);const dt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=tt(Ee.currentTarget.value);q(et(Ne)),Ue.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,et,tt]),Mt=C.exports.useCallback(Ee=>{var It;j?.(Ee),Ue.current&&(Ee.target.selectionStart=Ue.current.start??((It=Ee.currentTarget.value)==null?void 0:It.length),Ee.currentTarget.selectionEnd=Ue.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;b1e(Ee,se)||Ee.preventDefault();const It=xt(Ee)*a,Ne=Ee.key,ln={ArrowUp:()=>At(It),ArrowDown:()=>wt(It),Home:()=>q(i),End:()=>q(o)}[Ne];ln&&(Ee.preventDefault(),ln(Ee))},[se,a,At,wt,q,i,o]),xt=Ee=>{let It=1;return(Ee.metaKey||Ee.ctrlKey)&&(It=.1),Ee.shiftKey&&(It=10),It},kn=C.exports.useMemo(()=>{const Ee=G?.(V.value);if(Ee!=null)return Ee;const It=V.value.toString();return It||void 0},[V.value,G]),Et=C.exports.useCallback(()=>{let Ee=V.value;if(V.value==="")return;/^[eE]/.test(V.value.toString())?V.setValue(""):(V.valueAsNumbero&&(Ee=o),V.cast(Ee))},[V,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),En()},[En,Ae]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),En()},[En,Ae]);$f(()=>He.current,"wheel",Ee=>{var It;const st=(((It=He.current)==null?void 0:It.ownerDocument)??document).activeElement===He.current;if(!v||!st)return;Ee.preventDefault();const ln=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?At(ln):Dn===1&&wt(ln)},{passive:!1});const Je=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMax;return{...Ee,ref:$n(It,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||yn(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMax,r,yn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMin;return{...Ee,ref:$n(It,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||Me(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMin,r,Me,Ae.stop,l]),Gt=C.exports.useCallback((Ee={},It=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":T,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,It),value:at(V.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(V.valueAsNumber)?void 0:V.valueAsNumber,"aria-invalid":qS(h??V.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,dt),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[E,m,g,I,T,at,k,b,l,u,s,h,V.value,V.valueAsNumber,V.isOutOfRange,i,o,kn,dt,ut,Mt,te,Zt]);return{value:at(V.value),valueAsNumber:V.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Gt,htmlProps:de}}var[S1e,hb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[w1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=vn(t),o=m7(i),{htmlProps:a,...s}=x1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(w1e,{value:l},le.createElement(S1e,{value:r},le.createElement(we.div,{...a,ref:n,className:NB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var DB=Pe(function(t,n){const r=hb();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});DB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=hb();return le.createElement(we.input,{...i,className:NB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var zB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=hb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(zB,{...o,__css:r.stepper,children:t.children??x(h1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=hb();return x(zB,{...i,__css:o.stepper,children:t.children??x(p1e,{})})});Q7.displayName="NumberIncrementStepper";var $v=(...e)=>e.filter(Boolean).join(" ");function C1e(e,...t){return _1e(e)?e(...t):e}var _1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function k1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[E1e,lh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[P1e,Hv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wp={click:"click",hover:"hover"};function T1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=wp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:P,onClose:E,onOpen:k,onToggle:T}=Wz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[re,se,G,V]=["popover-trigger","popover-content","popover-header","popover-body"].map(dt=>`${dt}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Hz({...w,enabled:P||!!b}),Se=upe({isOpen:P,ref:N});Gde({enabled:P,ref:O}),Ffe(N,{focusRef:O,visible:P,shouldFocus:o&&u===wp.click}),Hfe(N,{focusRef:r,visible:P,shouldFocus:a&&u===wp.click});const He=Vz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),Ue=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,style:{...dt.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(N,Mt),children:He?dt.children:null,id:se,tabIndex:-1,role:"dialog",onKeyDown:il(dt.onKeyDown,xt=>{n&&xt.key==="Escape"&&E()}),onBlur:il(dt.onBlur,xt=>{const kn=YL(xt),Et=KS(N.current,kn),Zt=KS(O.current,kn);P&&t&&(!Et&&!Zt)&&E()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?V:void 0};return u===wp.hover&&(ut.role="tooltip",ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(dt.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),g))})),ut},[He,se,$,G,Y,V,u,n,E,P,t,g,l,s]),ct=C.exports.useCallback((dt={},Mt=null)=>X({...dt,style:{visibility:P?"visible":"hidden",...dt.style}},Mt),[P,X]),qe=C.exports.useCallback((dt,Mt=null)=>({...dt,ref:$n(Mt,I,q)}),[I,q]),et=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(dt=>{I.current==null&&q(dt)},[q]),At=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,ref:$n(O,Mt,at),id:re,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":se};return u===wp.click&&(ut.onClick=il(dt.onClick,T)),u===wp.hover&&(ut.onFocus=il(dt.onFocus,()=>{et.current===void 0&&k()}),ut.onBlur=il(dt.onBlur,xt=>{const kn=YL(xt),Et=!KS(N.current,kn);P&&t&&Et&&E()}),ut.onKeyDown=il(dt.onKeyDown,xt=>{xt.key==="Escape"&&E()}),ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0,et.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(dt.onMouseLeave,()=>{D.current=!1,et.current&&(clearTimeout(et.current),et.current=void 0),tt.current=window.setTimeout(()=>{D.current===!1&&E()},g)})),ut},[re,P,se,u,at,T,k,t,E,h,g]);C.exports.useEffect(()=>()=>{et.current&&clearTimeout(et.current),tt.current&&clearTimeout(tt.current)},[]);const wt=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:G,ref:$n(Mt,ut=>{W(!!ut)})}),[G]),Ae=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:V,ref:$n(Mt,ut=>{de(!!ut)})}),[V]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:Ue,getTriggerProps:At,getHeaderProps:wt,getBodyProps:Ae}}function KS(e,t){return e===t||e?.contains(t)}function YL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=vn(e),i=U0(),o=T1e({...r,direction:i.direction});return x(E1e,{value:o,children:x(P1e,{value:t,children:C1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=lh(),a=Hv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:$v("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var L1e=Pe(function(t,n){const{getBodyProps:r}=lh(),i=Hv();return le.createElement(we.div,{...r(t,n),className:$v("chakra-popover__body",t.className),__css:i.body})});L1e.displayName="PopoverBody";var A1e=Pe(function(t,n){const{onClose:r}=lh(),i=Hv();return x(ub,{size:"sm",onClick:r,className:$v("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});A1e.displayName="PopoverCloseButton";function I1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var M1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},O1e=we(Il.section),BB=Pe(function(t,n){const{variants:r=M1e,...i}=t,{isOpen:o}=lh();return le.createElement(O1e,{ref:n,variants:I1e(r),initial:!1,animate:o?"enter":"exit",...i})});BB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=lh(),u=Hv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(BB,{...i,...a(o,n),onAnimationComplete:k1e(l,o.onAnimationComplete),className:$v("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var R1e=Pe(function(t,n){const{getHeaderProps:r}=lh(),i=Hv();return le.createElement(we.header,{...r(t,n),className:$v("chakra-popover__header",t.className),__css:i.header})});R1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=lh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function N1e(e,t,n){return(e-t)*100/(n-t)}var D1e=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),z1e=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),B1e=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),F1e=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function FB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=N1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var $B=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${z1e} 2s linear infinite`:void 0},...r})};$B.displayName="Shape";var TC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});TC.displayName="Circle";var $1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=FB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,k=v?{css:{animation:`${D1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee($B,{size:n,isIndeterminate:v,children:[x(TC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(TC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});$1e.displayName="CircularProgress";var[H1e,W1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),V1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=FB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...W1e().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),HB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),P=Ri("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),k={animation:`${F1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${B1e} 1s ease infinite normal none running`}},N={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:N,...w},ee(H1e,{value:P,children:[x(V1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:E,title:v,role:b}),l]}))});HB.displayName="Progress";var U1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});U1e.displayName="CircularProgressLabel";var j1e=(...e)=>e.filter(Boolean).join(" "),G1e=e=>e?"":void 0;function q1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var WB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:j1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});WB.displayName="SelectField";var VB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,P]=q1e(b,bX),E=g7(P),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(WB,{ref:t,height:u??l,minH:h??g,placeholder:o,...E,__css:T,children:e.children}),x(UB,{"data-disabled":G1e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});VB.displayName="Select";var K1e=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Y1e=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),UB=e=>{const{children:t=x(K1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Y1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};UB.displayName="SelectIcon";function Z1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function X1e(e){const t=J1e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function jB(e){return!!e.touches}function Q1e(e){return jB(e)&&e.touches.length>1}function J1e(e){return e.view??window}function ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function tge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function GB(e,t="page"){return jB(e)?ege(e,t):tge(e,t)}function nge(e){return t=>{const n=X1e(t);(!n||n&&t.button===0)&&e(t)}}function rge(e,t=!1){function n(i){e(i,{point:GB(i)})}return t?nge(n):n}function E3(e,t,n,r){return Z1e(e,t,rge(n,t==="pointerdown"),r)}function qB(e){const t=C.exports.useRef(null);return t.current=e,t}var ige=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Q1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:GB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,YS(r,this.history)),this.removeListeners=sge(E3(this.win,"pointermove",this.onPointerMove),E3(this.win,"pointerup",this.onPointerUp),E3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=YS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=lge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=YS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),MQ.update(this.updatePoint)}};function ZL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function YS(e,t){return{point:e.point,delta:ZL(e.point,t[t.length-1]),offset:ZL(e.point,t[0]),velocity:age(t,.1)}}var oge=e=>e*1e3;function age(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function sge(...e){return t=>e.reduce((n,r)=>r(n),t)}function ZS(e,t){return Math.abs(e-t)}function XL(e){return"x"in e&&"y"in e}function lge(e,t){if(typeof e=="number"&&typeof t=="number")return ZS(e,t);if(XL(e)&&XL(t)){const n=ZS(e.x,t.x),r=ZS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function KB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=qB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new ige(v,h.current,s)}return E3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function uge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var cge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function dge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function YB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return cge(()=>{const a=e(),s=a.map((l,u)=>uge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(dge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function fge(e){return typeof e=="object"&&e!==null&&"current"in e}function hge(e){const[t]=YB({observeMutation:!1,getNodes(){return[fge(e)?e.current:e]}});return t}var pge=Object.getOwnPropertyNames,gge=(e,t)=>function(){return e&&(t=(0,e[pge(e)[0]])(e=0)),t},yd=gge({"../../../react-shim.js"(){}});yd();yd();yd();var Aa=e=>e?"":void 0,d0=e=>e?!0:void 0,bd=(...e)=>e.filter(Boolean).join(" ");yd();function f0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function mge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function jg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P3={width:0,height:0},Ey=e=>e||P3;function ZB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??P3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...jg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>Ey(w).height>Ey(P).height?w:P,P3):r.reduce((w,P)=>Ey(w).width>Ey(P).width?w:P,P3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...jg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...jg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...jg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function XB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...N}=e,D=dr(m),z=dr(v),$=dr(w),W=XB({isReversed:a,direction:s,orientation:l}),[Y,de]=U5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[re,se]=C.exports.useState(!1),[G,V]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map($e=>l0($e,t,n)),me=O*b,ye=yge(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map($e=>n-$e+t),ct=(W?He:X).map($e=>M4($e,t,n)),qe=l==="vertical",et=C.exports.useRef(null),tt=C.exports.useRef(null),at=YB({getNodes(){const $e=tt.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),At=C.exports.useId(),Ae=mge(u??At),dt=C.exports.useCallback($e=>{var pt;if(!et.current)return;Se.current.eventSource="pointer";const rt=et.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?rt.bottom-Qt:Nt-rt.left,lo=qe?rt.height:rt.width;let pi=Qn/lo;return W&&(pi=1-pi),nz(pi,t,n)},[qe,W,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!q)return;const rt=Se.current.valueBounds[$e];pt=parseFloat(vC(pt,rt.min,ut)),pt=l0(pt,rt.min,rt.max);const Nt=[...Se.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:V,stepUp($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt-pt:rt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt+pt:rt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(Q.current)}}),[ut,W,de,q]),kn=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>ZB({isReversed:W,orientation:l,thumbRects:at,thumbPercents:ct}),[W,l,ct,at]),Me=C.exports.useCallback($e=>{var pt;const rt=$e??G;if(rt!==-1&&I){const Nt=Ae.getThumb(rt),Qt=(pt=tt.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Ae]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=$e=>{const pt=dt($e)||0,rt=Se.current.value.map(pi=>Math.abs(pi-pt)),Nt=Math.min(...rt);let Qt=rt.indexOf(Nt);const Qn=rt.filter(pi=>pi===Nt);Qn.length>1&&pt>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),V(Qt),xt.setValueAtIndex(Qt,pt),Me(Qt)},Xt=$e=>{if(G==-1)return;const pt=dt($e)||0;V(G),xt.setValueAtIndex(G,pt),Me(G)};KB(tt,{onPanSessionStart($e){!q||(te(!0),Je($e),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan($e){!q||Xt($e)}});const Gt=C.exports.useCallback(($e={},pt=null)=>({...$e,...N,id:Ae.root,ref:$n(pt,tt),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Aa(re),style:{...$e.style,...Zt}}),[N,h,re,Zt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,et),id:Ae.track,"data-disabled":Aa(h),style:{...$e.style,...En}}),[h,En,Ae]),It=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...yn}}),[yn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e,Qt=X[rt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[rt];return{...Nt,ref:pt,role:"slider",tabIndex:q?0:void 0,id:Ae.getThumb(rt),"data-active":Aa(j&&G===rt),"aria-valuetext":$?.(Qt)??P?.[rt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E?.[rt],"aria-labelledby":E?.[rt]?void 0:k?.[rt],style:{...$e.style,...Et(rt)},onKeyDown:f0($e.onKeyDown,kn),onFocus:f0($e.onFocus,()=>{se(!0),V(rt)}),onBlur:f0($e.onBlur,()=>{se(!1),V(-1)})}},[Ae,X,ye,q,j,G,$,P,l,h,g,E,k,Et,kn,se]),st=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:X.map((rt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,X]),ln=C.exports.useCallback(($e,pt=null)=>{const{value:rt,...Nt}=$e,Qt=!(rtn),Qn=rt>=X[0]&&rt<=X[X.length-1];let lo=M4(rt,t,n);lo=W?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...jg({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":Aa(h),"data-invalid":Aa(!Qt),"data-highlighted":Aa(Qn),style:{...$e.style,...pi}}},[h,W,n,t,l,X,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(rt),type:"hidden",value:X[rt],name:Array.isArray(T)?T[rt]:`${T}-${rt}`}},[T,X,Ae]);return{state:{value:X,isFocused:re,isDragging:j,getThumbPercent:$e=>ct[$e],getThumbMinValue:$e=>ye[$e].min,getThumbMaxValue:$e=>ye[$e].max},actions:xt,getRootProps:Gt,getTrackProps:Ee,getInnerTrackProps:It,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Dn,getOutputProps:st}}function yge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[bge,pb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[xge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),QB=Pe(function(t,n){const r=Ri("Slider",t),i=vn(t),{direction:o}=U0();i.direction=o;const{getRootProps:a,...s}=vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(bge,{value:l},le.createElement(xge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});QB.defaultProps={orientation:"horizontal"};QB.displayName="RangeSlider";var Sge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=pb(),a=r_(),s=r(t,n);return le.createElement(we.div,{...s,className:bd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Sge.displayName="RangeSliderThumb";var wge=Pe(function(t,n){const{getTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:bd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});wge.displayName="RangeSliderTrack";var Cge=Pe(function(t,n){const{getInnerTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Cge.displayName="RangeSliderFilledTrack";var _ge=Pe(function(t,n){const{getMarkerProps:r}=pb(),i=r(t,n);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",t.className)})});_ge.displayName="RangeSliderMark";yd();yd();function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,...O}=e,N=dr(m),D=dr(v),z=dr(w),$=XB({isReversed:a,direction:s,orientation:l}),[W,Y]=U5({value:i,defaultValue:o??Pge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),se=!(h||g),G=(n-t)/10,V=b||(n-t)/100,q=l0(W,t,n),Q=n-q+t,me=M4($?Q:q,t,n),ye=l==="vertical",Se=qB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:se,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),et=u??qe,[tt,at]=[`slider-thumb-${et}`,`slider-track-${et}`],At=C.exports.useCallback(Ne=>{var st;if(!He.current)return;const ln=Se.current;ln.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((st=Ne.touches)==null?void 0:st[0])??Ne,rt=ye?Dn.bottom-pt:$e-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=rt/Nt;$&&(Qt=1-Qt);let Qn=nz(Qt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(vC(Qn,ln.min,ln.step))),Qn=l0(Qn,ln.min,ln.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const st=Se.current;!st.isInteractive||(Ne=parseFloat(vC(Ne,st.min,V)),Ne=l0(Ne,st.min,st.max),Y(Ne))},[V,Y,Se]),Ae=C.exports.useMemo(()=>({stepUp(Ne=V){const st=$?q-Ne:q+Ne;wt(st)},stepDown(Ne=V){const st=$?q+Ne:q-Ne;wt(st)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,V,o]),dt=C.exports.useCallback(Ne=>{const st=Se.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(G),PageDown:()=>Ae.stepDown(G),Home:()=>wt(st.min),End:()=>wt(st.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),st.eventSource="keyboard")},[Ae,wt,G,Se]),Mt=z?.(q)??P,ut=hge(Ue),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,st=ut??{width:0,height:0};return ZB({isReversed:$,orientation:Ne.orientation,thumbRects:[st],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var st;return(st=Ue.current)==null?void 0:st.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const st=At(Ne);st!=null&&st!==Se.current.value&&Y(st)}KB(ct,{onPanSessionStart(Ne){const st=Se.current;!st.isInteractive||(j(!0),En(),yn(Ne),N?.(st.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},st=null)=>({...Ne,...O,ref:$n(st,ct),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Aa(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),Je=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,He),id:at,"data-disabled":Aa(h),style:{...Ne.style,...Et}}),[h,at,Et]),Xt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,style:{...Ne.style,...Zt}}),[Zt]),Gt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,Ue),role:"slider",tabIndex:se?0:void 0,id:tt,"data-active":Aa(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:f0(Ne.onKeyDown,dt),onFocus:f0(Ne.onFocus,()=>re(!0)),onBlur:f0(Ne.onBlur,()=>re(!1))}),[se,tt,de,Mt,t,n,q,l,h,g,E,k,xt,dt]),Ee=C.exports.useCallback((Ne,st=null)=>{const ln=!(Ne.valuen),Dn=q>=Ne.value,$e=M4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Ege({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:st,role:"presentation","aria-hidden":!0,"data-disabled":Aa(h),"data-invalid":Aa(!ln),"data-highlighted":Aa(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,q]),It=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,type:"hidden",value:q,name:T}),[T,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Ae,getRootProps:Me,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Gt,getMarkerProps:Ee,getInputProps:It}}function Ege(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Pge(e,t){return t"}),[Lge,mb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=vn(e),{direction:i}=U0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=kge(r),l=a(),u=o({},t);return le.createElement(Tge,{value:s},le.createElement(Lge,{value:n},le.createElement(we.div,{...l,className:bd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var JB=Pe((e,t)=>{const{getThumbProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__thumb",e.className),__css:r.thumb})});JB.displayName="SliderThumb";var eF=Pe((e,t)=>{const{getTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__track",e.className),__css:r.track})});eF.displayName="SliderTrack";var tF=Pe((e,t)=>{const{getInnerTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});tF.displayName="SliderFilledTrack";var LC=Pe((e,t)=>{const{getMarkerProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",e.className),__css:r.mark})});LC.displayName="SliderMark";var Age=(...e)=>e.filter(Boolean).join(" "),QL=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:Age("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QL(s.isChecked),"data-hover":QL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var Z0=(...e)=>e.filter(Boolean).join(" ");function AC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ige,nF,Mge,Oge]=hN();function Rge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=U5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Mge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Nge,Wv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Dge(e){const{focusedIndex:t,orientation:n,direction:r}=Wv(),i=nF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:AC(e.onKeyDown,o)}}function zge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Wv(),{index:u,register:h}=Oge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Tfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:AC(e.onClick,m)}),w="button";return{...b,id:rF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":iF(a,u),onFocus:t?void 0:AC(e.onFocus,v)}}var[Bge,Fge]=Cn({});function $ge(e){const t=Wv(),{id:n,selectedIndex:r}=t,o=ab(e.children).map((a,s)=>C.exports.createElement(Bge,{key:s,value:{isSelected:s===r,id:iF(n,s),tabId:rF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Hge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Wv(),{isSelected:o,id:a,tabId:s}=Fge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Vz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Wge(){const e=Wv(),t=nF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function rF(e,t){return`${e}--tab-${t}`}function iF(e,t){return`${e}--tabpanel-${t}`}var[Vge,Vv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),oF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Rge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return le.createElement(Ige,{value:l},le.createElement(Nge,{value:h},le.createElement(Vge,{value:r},le.createElement(we.div,{className:Z0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});oF.displayName="Tabs";var Uge=Pe(function(t,n){const r=Wge(),i={...t.style,...r},o=Vv();return le.createElement(we.div,{ref:n,...t,className:Z0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Uge.displayName="TabIndicator";var jge=Pe(function(t,n){const r=Dge({...t,ref:n}),o={display:"flex",...Vv().tablist};return le.createElement(we.div,{...r,className:Z0("chakra-tabs__tablist",t.className),__css:o})});jge.displayName="TabList";var aF=Pe(function(t,n){const r=Hge({...t,ref:n}),i=Vv();return le.createElement(we.div,{outline:"0",...r,className:Z0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});aF.displayName="TabPanel";var sF=Pe(function(t,n){const r=$ge(t),i=Vv();return le.createElement(we.div,{...r,width:"100%",ref:n,className:Z0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});sF.displayName="TabPanels";var lF=Pe(function(t,n){const r=Vv(),i=zge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:Z0("chakra-tabs__tab",t.className),__css:o})});lF.displayName="Tab";var Gge=(...e)=>e.filter(Boolean).join(" ");function qge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Kge=["h","minH","height","minHeight"],uF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=g7(o),s=i?qge(n,Kge):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Gge("chakra-textarea",r),__css:s})});uF.displayName="Textarea";function Yge(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return Zge(e)?e(...t):e}var Zge=e=>typeof e=="function";function Xge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Qge=(e,t)=>e.find(n=>n.id===t);function JL(e,t){const n=cF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function cF(e,t){for(const[n,r]of Object.entries(e))if(Qge(r,t))return n}function Jge(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var tme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=nme(tme);function nme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=rme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=JL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:dF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=cF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(JL(pl.getState(),i).position)}}var eA=0;function rme(e,t={}){eA+=1;const n=t.id??eA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ime=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(KD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(ZD,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(XD,{id:u?.title,children:i}),s&&x(YD,{id:u?.description,display:"block",children:s})),o&&x(ub,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function dF(e={}){const{render:t,toastComponent:n=ime}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function ome(e,t){const n=i=>({...t,...i,position:Xge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=dF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function xd(e){const{theme:t}=cN();return C.exports.useMemo(()=>ome(t.direction,e),[e,t.direction])}var ame={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},fF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=ame,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ale();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Yge(P,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>Jge(a),[a]);return le.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},IC(n,{id:t,onClose:P})))});fF.displayName="ToastComponent";var sme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=fF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:eme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Kn,{children:[n,x(oh,{...o,children:s})]})};function lme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ume(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var cme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Eg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},MC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function dme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:k,gutter:T,offset:I,direction:O,...N}=e,{isOpen:D,onOpen:z,onClose:$}=Wz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Hz({enabled:D,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:I,direction:O}),te=C.exports.useId(),se=`tooltip-${g??te}`,G=C.exports.useRef(null),V=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=fme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!V.current){X();const tt=MC(G);V.current=tt.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0);const tt=MC(G);q.current=tt.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),Ue=C.exports.useCallback(tt=>{D&&tt.key==="Escape"&&ye()},[D,ye]);$f(()=>B4(G),"keydown",s?Ue:void 0),$f(()=>B4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(V.current),clearTimeout(q.current)},[]),$f(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((tt={},at=null)=>({...tt,ref:$n(G,at,W),onPointerEnter:Eg(tt.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Eg(tt.onClick,Se),onPointerDown:Eg(tt.onPointerDown,He),onFocus:Eg(tt.onFocus,me),onBlur:Eg(tt.onBlur,ye),"aria-describedby":D?se:void 0}),[me,ye,He,D,se,Se,W]),qe=C.exports.useCallback((tt={},at=null)=>Y({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},at),[Y,b,w]),et=C.exports.useCallback((tt={},at=null)=>{const At={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...N,...tt,id:se,role:"tooltip",style:At}},[N,se]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:et,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var XS="chakra-ui:close-tooltip";function fme(e,t){return C.exports.useEffect(()=>{const n=B4(e);return n.addEventListener(XS,t),()=>n.removeEventListener(XS,t)},[t,e]),()=>{const n=B4(e),r=MC(e);n.dispatchEvent(new r.CustomEvent(XS))}}var hme=we(Il.div),Ui=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=U0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...P}=r,E=m??v??h??b;if(E){n.bg=E;const $=OX(i,"colors",E);n[Hr.arrowBg.var]=$}const k=dme({...P,direction:i.direction}),T=typeof o=="string"||s;let I;if(T)I=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,N=k.getTooltipProps({},t),D=O?lme(N,["role","id"]):N,z=ume(N,["role","id"]);return a?ee(Kn,{children:[I,x(pd,{children:k.isOpen&&le.createElement(oh,{...g},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(hme,{variants:cme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Kn,{children:o})});Ui.displayName="Tooltip";var pme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(_z,{environment:a,children:t});return x(boe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(Fde,{}):x(Bde,{}),x(Soe,{}),r?x(Uz,{zIndex:r,children:l}):l]})})};function gme({children:e,theme:t=coe,toastOptions:n,...r}){return ee(pme,{theme:t,...r,children:[e,x(sme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function h0(e,t){return X0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mme(e,t){return X0(e)===2?e.get(t):e[t]}function hF(e,t,n){var r=X0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function pF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return wme&&e instanceof Map}function s_(e){return Cme&&e instanceof Set}function xf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mF(e);delete t[nr];for(var n=p0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=vme),Object.freeze(e),t&&Xf(e,function(n,r){return u_(r,!0)},!0)),e}function vme(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=DC[e];return t||ms(18,e),t}function yme(e,t){DC[e]||(DC[e]=t)}function OC(){return gv}function QS(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function F4(e){RC(e),e.p.forEach(bme),e.p=null}function RC(e){e===gv&&(gv=e.l)}function tA(e){return gv={p:[],l:gv,h:e,m:!0,_:0}}function bme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function JS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(F4(t),ms(4)),xu(e)&&(e=$4(t,e),t.l||H4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=$4(t,n,[]),F4(t),t.u&&t.v(t.u,t.s),e!==gF?e:void 0}function $4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Xf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return H4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Xf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),H4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=$4(e,i,o&&t&&t.i!==3&&!h0(t.D,r)?o.concat(r):void 0);if(hF(n,r,a),!sd(a))return;e.m=!1}if(xu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;$4(e,i),t&&t.A.l||H4(e,i)}}function H4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function e6(e,t){var n=e[nr];return(n?xf(n):e)[t]}function rA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function t6(e){e.o||(e.o=l_(e.t))}function NC(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:OC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=mv;a&&(l=[s],u=Gg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:OC()).p.push(r),r}function xme(e){return sd(e)||ms(22,e),function t(n){if(!xu(n))return n;var r,i=n[nr],o=X0(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Xf(r,function(a,s){i&&mme(i.t,a)===s||hF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Sme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return mv.get(l,o)},set:function(l){var u=this[nr];mv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=p0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!h0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!pF(m,g))return!0}}var b=!!a[nr];return l.length!==p0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ca=new kme,vF=ca.produce;ca.produceWithPatches.bind(ca);ca.setAutoFreeze.bind(ca);ca.setUseProxies.bind(ca);ca.applyPatches.bind(ca);ca.createDraft.bind(ca);ca.finishDraft.bind(ca);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error(Hi(6));P=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Eme(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error(Hi(12));if(typeof n(void 0,{type:W4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function yF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function V4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return U4}function i(s,l){r(s)===U4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Ime=function(t,n){return t===n};function Mme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?gve:pve;CF.useSyncExternalStore=D0.useSyncExternalStore!==void 0?D0.useSyncExternalStore:mve;(function(e){e.exports=CF})(wF);var _F={exports:{}},kF={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yb=C.exports,vve=wF.exports;function yve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bve=typeof Object.is=="function"?Object.is:yve,xve=vve.useSyncExternalStore,Sve=yb.useRef,wve=yb.useEffect,Cve=yb.useMemo,_ve=yb.useDebugValue;kF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Sve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Cve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,bve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=xve(e,o[0],o[1]);return wve(function(){a.hasValue=!0,a.value=s},[s]),_ve(s),s};(function(e){e.exports=kF})(_F);function kve(e){e()}let EF=kve;const Eve=e=>EF=e,Pve=()=>EF,ld=C.exports.createContext(null);function PF(){return C.exports.useContext(ld)}const Tve=()=>{throw new Error("uSES not initialized!")};let TF=Tve;const Lve=e=>{TF=e},Ave=(e,t)=>e===t;function Ive(e=ld){const t=e===ld?PF:()=>C.exports.useContext(e);return function(r,i=Ave){const{store:o,subscription:a,getServerState:s}=t(),l=TF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Mve=Ive();var Ove={exports:{}},On={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),bb=Symbol.for("react.fragment"),xb=Symbol.for("react.strict_mode"),Sb=Symbol.for("react.profiler"),wb=Symbol.for("react.provider"),Cb=Symbol.for("react.context"),Rve=Symbol.for("react.server_context"),_b=Symbol.for("react.forward_ref"),kb=Symbol.for("react.suspense"),Eb=Symbol.for("react.suspense_list"),Pb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Nve=Symbol.for("react.offscreen"),LF;LF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case bb:case Sb:case xb:case kb:case Eb:return e;default:switch(e=e&&e.$$typeof,e){case Rve:case Cb:case _b:case Tb:case Pb:case wb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=Cb;On.ContextProvider=wb;On.Element=p_;On.ForwardRef=_b;On.Fragment=bb;On.Lazy=Tb;On.Memo=Pb;On.Portal=g_;On.Profiler=Sb;On.StrictMode=xb;On.Suspense=kb;On.SuspenseList=Eb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===Cb};On.isContextProvider=function(e){return Va(e)===wb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===_b};On.isFragment=function(e){return Va(e)===bb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Pb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===Sb};On.isStrictMode=function(e){return Va(e)===xb};On.isSuspense=function(e){return Va(e)===kb};On.isSuspenseList=function(e){return Va(e)===Eb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bb||e===Sb||e===xb||e===kb||e===Eb||e===Nve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Pb||e.$$typeof===wb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===LF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})(Ove);function Dve(){const e=Pve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const mA={notify(){},get:()=>[]};function zve(e,t){let n,r=mA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Dve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const Bve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fve=Bve?C.exports.useLayoutEffect:C.exports.useEffect;function $ve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=zve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Fve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function AF(e=ld){const t=e===ld?PF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Hve=AF();function Wve(e=ld){const t=e===ld?Hve:AF(e);return function(){return t().dispatch}}const Vve=Wve();Lve(_F.exports.useSyncExternalStoreWithSelector);Eve(Al.exports.unstable_batchedUpdates);var m_="persist:",IF="persist/FLUSH",v_="persist/REHYDRATE",MF="persist/PAUSE",OF="persist/PERSIST",RF="persist/PURGE",NF="persist/REGISTER",Uve=-1;function T3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T3=function(n){return typeof n}:T3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T3(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jve(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function n2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var r2e=5e3;function i2e(e,t){var n=e.version!==void 0?e.version:Uve;e.debug;var r=e.stateReconciler===void 0?qve:e.stateReconciler,i=e.getStoredState||Zve,o=e.timeout!==void 0?e.timeout:r2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=t2e(m,["_persist"]),w=b;if(g.type===OF){var P=!1,E=function(z,$){P||(g.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Kve(e)),v)return nu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,W){return Promise.resolve($)};z(D,n).then(function($){E($)},function($){E(void 0,$)})},function(D){E(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===RF)return s=!0,g.result(Qve(e)),nu({},t(w,g),{_persist:v});if(g.type===IF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===MF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,I=r!==!1&&T!==void 0?r(T,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var N=t(w,g);return N===w?h:u(nu({},N,{_persist:v}))}}function bA(e){return s2e(e)||a2e(e)||o2e()}function o2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function a2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function s2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:DF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case NF:return BC({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),BC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function c2e(e,t,n){var r=n||!1,i=f_(u2e,DF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:NF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=BC({},i,{purge:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:IF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:MF})},persist:function(){e.dispatch({type:OF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=h2e;function L3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L3=function(n){return typeof n}:L3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},L3(e)}function a6(){}var d2e={getItem:a6,setItem:a6,removeItem:a6};function f2e(e){if((typeof self>"u"?"undefined":L3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function h2e(e){var t="".concat(e,"Storage");return f2e(t)?self[t]:d2e}y_.__esModule=!0;y_.default=m2e;var p2e=g2e(b_);function g2e(e){return e&&e.__esModule?e:{default:e}}function m2e(e){var t=(0,p2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var zF=void 0,v2e=y2e(y_);function y2e(e){return e&&e.__esModule?e:{default:e}}var b2e=(0,v2e.default)("local");zF=b2e;var BF={},FF={},Qf={};Object.defineProperty(Qf,"__esModule",{value:!0});Qf.PLACEHOLDER_UNDEFINED=Qf.PACKAGE_NAME=void 0;Qf.PACKAGE_NAME="redux-deep-persist";Qf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Qf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,re){re||(re=new Set([j])),te||(te="");for(const se in j){const G=te?`${te}.${se}`:se,V=j[se];if((0,e.isObjectLike)(V))return re.has(V)?`${te}.${se}:`:(re.add(V),(0,e.getCircularPath)(V,G,re))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const re in j){const se=j[re];te[re]=(0,e._cloneDeep)(se)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const re=(0,e.cloneDeep)(j),se=(0,e.cloneDeep)(te),G=Object.keys(re).reduce((q,Q)=>(h.call(se,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(re)||(0,e.isDate)(se))return re.valueOf()===se.valueOf()?{}:se;const V=Object.keys(se).reduce((q,Q)=>{if(!h.call(re,Q))return q[Q]=se[Q],q;const X=(0,e.difference)(re[Q],se[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(re)&&!(0,e.isArray)(se)||!(0,e.isArray)(re)&&(0,e.isArray)(se)?se:q:(q[Q]=X,q)},G);return delete V._persist,V};e.difference=b;const w=function(j,te){return te.reduce((re,se)=>{if(re){const G=parseInt(se,10),V=(0,e.isIntegerString)(se)&&G<0?re.length+G:se;return(0,e.isString)(re)?re.charAt(V):re[V]}},j)};e.path=w;const P=function(j,te){return[...j].reverse().reduce((G,V,q)=>{const Q=(0,e.isIntegerString)(V)?[]:{};return Q[V]=q===0?te:G,Q},{})};e.assocPath=P;const E=function(j,te){const re=(0,e.cloneDeep)(j);return te.reduce((se,G,V)=>(V===te.length-1&&se&&(0,e.isObjectLike)(se)&&delete se[G],se&&se[G]),re),re};e.dissocPath=E;const k=function(j,te,...re){if(!re||!re.length)return te;const se=re.shift(),{preservePlaceholder:G,preserveUndefined:V}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(se))for(const q in se)if((0,e.isObjectLike)(se[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],se[q]);else if((0,e.isArray)(te)){let Q=se[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;V||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=se[q]!==t.PLACEHOLDER_UNDEFINED?se[q]:void 0;te[q]=Q}return k(j,te,...re)},T=function(j,te,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=T;const I=function(j,te=[],re,se,G){if(!(0,e.isObjectLike)(j))return j;for(const V in j){const q=j[V],Q=(0,e.isArray)(j),X=se?se+"."+V:V;q===null&&(re===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||re===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(V,10)]=void 0),q===void 0&&G&&re===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(V,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,re,X,G)}},O=function(j,te,re,se){const G=(0,e.cloneDeep)(j);return I(G,te,re,"",se),G};e.preserveUndefined=O;const N=function(j,te,re){return re.indexOf(j)===te};e.unique=N;const D=function(j){return j.reduce((te,re)=>{const se=j.filter(me=>me===re),G=j.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:V,subsets:q}=te,Q=se.length>1&&V.indexOf(re)===-1,X=G.length>1;return{duplicates:[...V,...Q?se:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,re){const se=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${se} configuration.`,V=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${V}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. + + ${JSON.stringify(q)} + + ${V}`);if(Q.length>1)throw new Error(`${G} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(Q)} + + ${V}`)};e.singleTransformValidator=z;const $=function(j){if(!(0,e.isArray)(j))return;const te=j?.map(re=>re.deepPersistKey).filter(re=>re)||[];if(te.length){const re=te.filter((se,G)=>te.indexOf(se)!==G);if(re.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(re)}`)}};e.transformsValidator=$;const W=function({whitelist:j,blacklist:te}){if(j&&j.length&&te&&te.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:re,subsets:se}=(0,e.findDuplicatesAndSubsets)(j);(0,e.throwError)({duplicates:re,subsets:se},"whitelist")}if(te){const{duplicates:re,subsets:se}=(0,e.findDuplicatesAndSubsets)(te);(0,e.throwError)({duplicates:re,subsets:se},"blacklist")}};e.configValidator=W;const Y=function({duplicates:j,subsets:te},re){if(j.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${re}. + + ${JSON.stringify(j)}`);if(te.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,re)=>{const se=re.split("."),G=se[0],V=se.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:V?[V]:void 0}),q&&!Q&&V&&(q[G]=[V]),q&&Q&&V&&Q.push(V),te},[]):[]};e.getRootKeysGroup=de})(FF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!P(k)&&g?g(E,k,T):E,out:(E,k,T)=>!P(k)&&m?m(E,k,T):E,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(T=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(E,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:P,rootReducer:E}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(E(void 0,{type:""})),N=T.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>N.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...Y,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(BF);const A3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),x2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?x2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),G4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),S2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var da={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,P=1,E=2,k=4,T=8,I=16,O=32,N=64,D=128,z=256,$=512,W=30,Y="...",de=800,j=16,te=1,re=2,se=3,G=1/0,V=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",P],["bindKey",E],["curry",T],["curryRight",I],["flip",$],["partial",O],["partialRight",N],["rearg",z]],He="[object Arguments]",Ue="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",et="[object Date]",tt="[object DOMException]",at="[object Error]",At="[object Function]",wt="[object GeneratorFunction]",Ae="[object Map]",dt="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Gt="[object ArrayBuffer]",Ee="[object DataView]",It="[object Float32Array]",Ne="[object Float64Array]",st="[object Int8Array]",ln="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,i1=RegExp(pi.source),ma=RegExp(As.source),yh=/<%-([\s\S]+?)%>/g,o1=/<%([\s\S]+?)%>/g,Mu=/<%=([\s\S]+?)%>/g,bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,a1=RegExp(Ed.source),Ou=/^\s+/,Pd=/\s/,s1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ru=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u1=/[()=,{}\[\]\/\s]/,c1=/\\(\\)?/g,d1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,f1=/^[-+]0x[0-9a-f]+$/i,h1=/^0b[01]+$/i,p1=/^\[object .+?Constructor\]$/,g1=/^0o[0-7]+$/i,m1=/^(?:0|[1-9]\d*)$/,v1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,y1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Sh="\\u2700-\\u27bf",Nu="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Sh+"]",qa="["+Nu+"]",Ld="[^"+ja+Ur+Td+Sh+Nu+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",wh="(?:"+Ga+"|"+gi+")",Ch="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ld+")",b1="(?:"+uo+"|"+Ld+")",Du="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Id=wh+"?",Bu="["+kr+"]?",va="(?:"+zs+"(?:"+[Ch,Ad,Ds].join("|")+")"+Bu+Id+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Id+va,_h="(?:"+[zl,Ad,Ds].join("|")+")"+Ht,Fu="(?:"+[Ch+Ga+"?",Ga,Ad,Ds,Ns].join("|")+")",$u=RegExp(zo,"g"),kh=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Fu+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+Du+"(?="+[jr,uo,"$"].join("|")+")",b1+"+"+zu+"(?="+[jr,uo+Bl,"$"].join("|")+")",uo+"?"+Bl+"+"+Du,uo+"+"+zu,Fl,Md,Td,_h].join("|"),"g"),Od=RegExp("["+zs+ja+Dl+kr+"]"),Eh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ph=-1,un={};un[It]=un[Ne]=un[st]=un[ln]=un[Dn]=un[$e]=un[pt]=un[rt]=un[Nt]=!0,un[He]=un[Ue]=un[Gt]=un[qe]=un[Ee]=un[et]=un[at]=un[At]=un[Ae]=un[dt]=un[ut]=un[Et]=un[Zt]=un[En]=un[Je]=!1;var Wt={};Wt[He]=Wt[Ue]=Wt[Gt]=Wt[Ee]=Wt[qe]=Wt[et]=Wt[It]=Wt[Ne]=Wt[st]=Wt[ln]=Wt[Dn]=Wt[Ae]=Wt[dt]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[$e]=Wt[pt]=Wt[rt]=Wt[Nt]=!0,Wt[at]=Wt[At]=Wt[Je]=!1;var Th={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},x1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,fn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,hn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,ya=hn&&hn.isRegExp,Bs=hn&&hn.isSet,S1=hn&&hn.isTypedArray;function mi(ie,xe,ve){switch(ve.length){case 0:return ie.call(xe);case 1:return ie.call(xe,ve[0]);case 2:return ie.call(xe,ve[0],ve[1]);case 3:return ie.call(xe,ve[0],ve[1],ve[2])}return ie.apply(xe,ve)}function w1(ie,xe,ve,Ke){for(var _t=-1,Jt=ie==null?0:ie.length;++_t-1}function Lh(ie,xe,ve){for(var Ke=-1,_t=ie==null?0:ie.length;++Ke<_t;)if(ve(xe,ie[Ke]))return!0;return!1}function Bn(ie,xe){for(var ve=-1,Ke=ie==null?0:ie.length,_t=Array(Ke);++ve-1;);return ve}function Ka(ie,xe){for(var ve=ie.length;ve--&&Vu(xe,ie[ve],0)>-1;);return ve}function _1(ie,xe){for(var ve=ie.length,Ke=0;ve--;)ie[ve]===xe&&++Ke;return Ke}var i2=Bd(Th),Ya=Bd(x1);function $s(ie){return"\\"+ne[ie]}function Ih(ie,xe){return ie==null?n:ie[xe]}function Hl(ie){return Od.test(ie)}function Mh(ie){return Eh.test(ie)}function o2(ie){for(var xe,ve=[];!(xe=ie.next()).done;)ve.push(xe.value);return ve}function Oh(ie){var xe=-1,ve=Array(ie.size);return ie.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Rh(ie,xe){return function(ve){return ie(xe(ve))}}function Ho(ie,xe){for(var ve=-1,Ke=ie.length,_t=0,Jt=[];++ve-1}function _2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=w2,Wo.prototype.delete=C2,Wo.prototype.get=F1,Wo.prototype.has=$1,Wo.prototype.set=_2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,R,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=R?S(c,A,R,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=mV(c),!J)return wi(c,K)}else{var Le=si(c),je=Le==At||Le==wt;if(vc(c))return Xs(c,J);if(Le==ut||Le==He||je&&!R){if(K=ce||je?{}:ck(c),!J)return ce?ig(c,sc(K,c)):yo(c,Qe(K,c))}else{if(!Wt[Le])return R?c:{};K=vV(c,Le,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,jt){K.set(jt,ii(bt,p,S,jt,c,F))});var yt=_e?ce?ge:Ko:ce?xo:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Vs(K,jt,ii(bt,p,S,jt,c,F))}),K}function Wh(c){var p=li(c);return function(S){return Vh(S,c,p)}}function Vh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var R=S[A],F=p[R],K=c[R];if(K===n&&!(R in c)||!F(K))return!1}return!0}function U1(c,p,S){if(typeof c!="function")throw new vi(a);return ug(function(){c.apply(n,S)},p)}function lc(c,p,S,A){var R=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Lh,K=!1):p.length>=i&&(F=ju,K=!1,p=new wa(p));e:for(;++RR?0:R+S),A=A===n||A>R?R:Dt(A),A<0&&(A+=R),A=S>A?0:Hk(A);S0&&S(J)?p>1?Tr(J,p-1,S,A,R):ba(R,J):A||(R[R.length]=J)}return R}var jh=Qs(),go=Qs(!0);function qo(c,p){return c&&jh(c,p,li)}function mo(c,p){return c&&go(c,p,li)}function Gh(c,p){return ho(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Kh(c,p){return c!=null&&tn.call(c,p)}function Yh(c,p){return c!=null&&p in cn(c)}function Zh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new wa(K&&ke):n}ke=c[0];var Le=-1,je=J[0];e:for(;++Le-1;)J!==c&&Gd.call(J,ce,1),Gd.call(c,ce,1);return c}function tf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var R=p[S];if(S==A||R!==F){var F=R;Yl(R)?Gd.call(c,R,1):ap(c,R)}}return c}function nf(c,p){return c+Vl(O1()*(p-c+1))}function Ks(c,p,S,A){for(var R=-1,F=vr(Yd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++R]=c,c+=S;return K}function pc(c,p){var S="";if(!c||p<1||p>V)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return kx(hk(c,p,So),c+"")}function tp(c){return ac(hp(c))}function rf(c,p){var S=hp(c);return M2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var R=-1,F=p.length,K=F-1,J=c;J!=null&&++RR?0:R+p),S=S>R?R:S,S<0&&(S+=R),R=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(R);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Wd(_e);K=!1,R=ju,ce=new wa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var eg=c2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Zu?Zu(S):new c.constructor(S);return c.copy(A),A}function tg(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function T2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Xd?cn(Xd.call(c)):{}}function L2(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ng(c,p){if(c!==p){var S=c!==n,A=c===null,R=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!R)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function A2(c,p,S,A){for(var R=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Le=!A;++J1?S[R-1]:n,K=R>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(R--,F):n,K&&Qi(S[0],S[1],K)&&(F=R<3?n:F,R=1),p=cn(p);++A-1?R[F?p[K]:K]:n}}function ag(c){return er(function(p){var S=p.length,A=S,R=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(R&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Le=-1,je=!0,ht=S&w?new wa:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(s1,`{ +/* [wrapped with `+p+`] */ +`)}function bV(c){return Rt(c)||ff(c)||!!(I1&&c&&c[I1])}function Yl(c,p){var S=typeof c;return p=p??V,!!p&&(S=="number"||S!="symbol"&&m1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function M2(c,p){var S=-1,A=c.length,R=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function AU(c,p){return p(c),c}function O2(c,p){return p(c)}var IU=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,R=function(F){return Hh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(R):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:O2,args:[R],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function MU(){return Ek(this)}function OU(){return new Ki(this.value(),this.__chain__)}function RU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function NU(){return this}function DU(c){for(var p,S=this;S instanceof Qd;){var A=bk(S);A.__index__=0,A.__values__=n,p?R.__wrapped__=A:p=A;var R=A;S=S.__wrapped__}return R.__wrapped__=c,p}function zU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:O2,args:[Ex],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Ex)}function BU(){return Ys(this.__wrapped__,this.__actions__)}var FU=lp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function $U(c,p,S){var A=Rt(c)?zn:j1;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}function HU(c,p){var S=Rt(c)?ho:Go;return S(c,Te(p,3))}var WU=og(xk),VU=og(Sk);function UU(c,p){return Tr(R2(c,p),1)}function jU(c,p){return Tr(R2(c,p),G)}function GU(c,p,S){return S=S===n?1:Dt(S),Tr(R2(c,p),S)}function Pk(c,p){var S=Rt(c)?Vn:Qa;return S(c,Te(p,3))}function Tk(c,p){var S=Rt(c)?fo:Uh;return S(c,Te(p,3))}var qU=lp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function KU(c,p,S,A){c=bo(c)?c:hp(c),S=S&&!A?Dt(S):0;var R=c.length;return S<0&&(S=vr(R+S,0)),F2(c)?S<=R&&c.indexOf(p,S)>-1:!!R&&Vu(c,p,S)>-1}var YU=Ct(function(c,p,S){var A=-1,R=typeof p=="function",F=bo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=R?mi(p,K,S):Ja(K,p,S)}),F}),ZU=lp(function(c,p,S){Uo(c,S,p)});function R2(c,p){var S=Rt(c)?Bn:xr;return S(c,Te(p,3))}function XU(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var QU=lp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function JU(c,p,S){var A=Rt(c)?Nd:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Qa)}function ej(c,p,S){var A=Rt(c)?e2:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Uh)}function tj(c,p){var S=Rt(c)?ho:Go;return S(c,z2(Te(p,3)))}function nj(c){var p=Rt(c)?ac:tp;return p(c)}function rj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:rf;return A(c,p)}function ij(c){var p=Rt(c)?vx:ai;return p(c)}function oj(c){if(c==null)return 0;if(bo(c))return F2(c)?xa(c):c.length;var p=si(c);return p==Ae||p==Zt?c.size:Lr(c).length}function aj(c,p,S){var A=Rt(c)?Hu:vo;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}var sj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Tr(p,1),[])}),N2=d2||function(){return mt.Date.now()};function lj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Tx=Ct(function(c,p,S){var A=P;if(S.length){var R=Ho(S,We(Tx));A|=O}return he(c,A,p,S,R)}),Ik=Ct(function(c,p,S){var A=P|E;if(S.length){var R=Ho(S,We(Ik));A|=O}return he(p,A,c,S,R)});function Mk(c,p,S){p=S?n:p;var A=he(c,T,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,R,F,K,J,ce,_e=0,ke=!1,Le=!1,je=!0;if(typeof c!="function")throw new vi(a);p=ka(p)||0,lr(S)&&(ke=!!S.leading,Le="maxWait"in S,F=Le?vr(ka(S.maxWait)||0,p):F,je="trailing"in S?!!S.trailing:je);function ht(Mr){var is=A,Ql=R;return A=R=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=ug(jt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Jk=p-is;return Le?Kr(Jk,F-Ql):Jk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Le&&Ql>=F}function jt(){var Mr=N2();if(bt(Mr))return en(Mr);J=ug(jt,$t(Mr))}function en(Mr){return J=n,je&&A?ht(Mr):(A=R=n,K)}function Zo(){J!==n&&eg(J),_e=0,A=ce=R=J=n}function Ji(){return J===n?K:en(N2())}function Xo(){var Mr=N2(),is=bt(Mr);if(A=arguments,R=this,ce=Mr,is){if(J===n)return yt(ce);if(Le)return eg(J),J=ug(jt,p),ht(ce)}return J===n&&(J=ug(jt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var uj=Ct(function(c,p){return U1(c,1,p)}),cj=Ct(function(c,p,S){return U1(c,ka(p)||0,S)});function dj(c){return he(c,$)}function D2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,R=p?p.apply(this,A):A[0],F=S.cache;if(F.has(R))return F.get(R);var K=c.apply(this,A);return S.cache=F.set(R,K)||F,K};return S.cache=new(D2.Cache||Vo),S}D2.Cache=Vo;function z2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function fj(c){return Ak(2,c)}var hj=xx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Te())):Bn(Tr(p,1),Er(Te()));var S=p.length;return Ct(function(A){for(var R=-1,F=Kr(A.length,S);++R=p}),ff=Qh(function(){return arguments}())?Qh:function(c){return Sr(c)&&tn.call(c,"callee")&&!A1.call(c,"callee")},Rt=ve.isArray,Tj=Gr?Er(Gr):q1;function bo(c){return c!=null&&B2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&bo(c)}function Lj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var vc=f2||$x,Aj=co?Er(co):K1;function Ij(c){return Sr(c)&&c.nodeType===1&&!cg(c)}function Mj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||vc(c)||fp(c)||ff(c)))return!c.length;var p=si(c);if(p==Ae||p==Zt)return!c.size;if(lg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Oj(c,p){return cc(c,p)}function Rj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?cc(c,p,n,S):!!A}function Ax(c){if(!Sr(c))return!1;var p=oi(c);return p==at||p==tt||typeof c.message=="string"&&typeof c.name=="string"&&!cg(c)}function Nj(c){return typeof c=="number"&&zh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==At||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function B2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=V}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):bx;function Dj(c,p){return c===p||dc(c,p,kt(p))}function zj(c,p,S){return S=typeof S=="function"?S:n,dc(c,p,kt(p),S)}function Bj(c){return Bk(c)&&c!=+c}function Fj(c){if(wV(c))throw new _t(o);return Jh(c)}function $j(c){return c===null}function Hj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==dt}function cg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Xu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ix=ya?Er(ya):ar;function Wj(c){return Dk(c)&&c>=-V&&c<=V}var Fk=Bs?Er(Bs):Bt;function F2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var fp=S1?Er(S1):zr;function Vj(c){return c===n}function Uj(c){return Sr(c)&&si(c)==Je}function jj(c){return Sr(c)&&oi(c)==Xt}var Gj=_(js),qj=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(bo(c))return F2(c)?Di(c):wi(c);if(Qu&&c[Qu])return o2(c[Qu]());var p=si(c),S=p==Ae?Oh:p==Zt?Wd:hp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=ka(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?jl(Dt(c),0,X):0}function ka(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=h1.test(c);return S||g1.test(c)?Ze(c.slice(2),S?2:8):f1.test(c)?Q:+c}function Wk(c){return Ca(c,xo(c))}function Kj(c){return c?jl(Dt(c),-V,V):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var Yj=Xi(function(c,p){if(lg(p)||bo(p)){Ca(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){Ca(p,xo(p),c)}),$2=Xi(function(c,p,S,A){Ca(p,xo(p),c,A)}),Zj=Xi(function(c,p,S,A){Ca(p,li(p),c,A)}),Xj=er(Hh);function Qj(c,p){var S=Ul(c);return p==null?S:Qe(S,p)}var Jj=Ct(function(c,p){c=cn(c);var S=-1,A=p.length,R=A>2?p[2]:n;for(R&&Qi(p[0],p[1],R)&&(A=1);++S1),F}),Ca(c,ge(c),S),A&&(S=ii(S,g|m|v,Tt));for(var R=p.length;R--;)ap(S,p[R]);return S});function vG(c,p){return jk(c,z2(Te(p)))}var yG=er(function(c,p){return c==null?{}:X1(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Te(p),ep(c,S,function(A,R){return p(A,R[0])})}function bG(c,p,S){p=Zs(p,c);var A=-1,R=p.length;for(R||(R=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var R=O1();return Kr(c+R*(p-c+pe("1e-"+((R+"").length-1))),p)}return nf(c,p)}var AG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Rx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(v1,i2).replace(kh,"")}function IG(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var R=S;return S-=p.length,S>=0&&c.slice(S,R)==p}function MG(c){return c=Sn(c),c&&ma.test(c)?c.replace(As,Ya):c}function OG(c){return c=Sn(c),c&&a1.test(c)?c.replace(Ed,"\\$&"):c}var RG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),NG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),DG=cp("toLowerCase");function zG(c,p,S){c=Sn(c),p=Dt(p);var A=p?xa(c):0;if(!p||A>=p)return c;var R=(p-A)/2;return d(Vl(R),S)+c+d(Yd(R),S)}function BG(c,p,S){c=Sn(c),p=Dt(p);var A=p?xa(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ix(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var jG=Js(function(c,p,S){return c+(S?" ":"")+Rx(p)});function GG(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function qG(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=$2({},p,A,Re);var R=$2({},p.imports,A.imports,Re),F=li(R),K=Hd(R,F),J,ce,_e=0,ke=p.interpolate||Ms,Le="__p += '",je=Ud((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Mu?d1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ph+"]")+` +`;c.replace(je,function(bt,jt,en,Zo,Ji,Xo){return en||(en=Zo),Le+=c.slice(_e,Xo).replace(y1,$s),jt&&(J=!0,Le+=`' + +__e(`+jt+`) + +'`),Ji&&(ce=!0,Le+=`'; +`+Ji+`; +__p += '`),en&&(Le+=`' + +((__t = (`+en+`)) == null ? '' : __t) + +'`),_e=Xo+bt.length,bt}),Le+=`'; +`;var yt=tn.call(p,"variable")&&p.variable;if(!yt)Le=`with (obj) { +`+Le+` +} +`;else if(u1.test(yt))throw new _t(s);Le=(ce?Le.replace(Qt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { +`+(yt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(J?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Le+`return __p +}`;var $t=Xk(function(){return Jt(F,ht+"return "+Le).apply(n,K)});if($t.source=Le,Ax($t))throw $t;return $t}function KG(c){return Sn(c).toLowerCase()}function YG(c){return Sn(c).toUpperCase()}function ZG(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Di(p),F=$o(A,R),K=Ka(A,R)+1;return ts(A,F,K).join("")}function XG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,E1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Ka(A,Di(p))+1;return ts(A,0,R).join("")}function QG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Ou,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),R=$o(A,Di(p));return ts(A,R).join("")}function JG(c,p){var S=W,A=Y;if(lr(p)){var R="separator"in p?p.separator:R;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-xa(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(R===n)return ce+A;if(K&&(J+=ce.length-J),Ix(R)){if(c.slice(J).search(R)){var _e,ke=ce;for(R.global||(R=Ud(R.source,Sn(Ua.exec(R))+"g")),R.lastIndex=0;_e=R.exec(ke);)var Le=_e.index;ce=ce.slice(0,Le===n?J:Le)}}else if(c.indexOf(Zi(R),J)!=J){var je=ce.lastIndexOf(R);je>-1&&(ce=ce.slice(0,je))}return ce+A}function eq(c){return c=Sn(c),c&&i1.test(c)?c.replace(pi,l2):c}var tq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Rx=cp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Mh(c)?Vd(c):C1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Ax(S)?S:new _t(S)}}),nq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Tx(c[S],c))}),c});function rq(c){var p=c==null?0:c.length,S=Te();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var R=-1;++RV)return[];var S=X,A=Kr(c,X);p=Te(p),c-=X;for(var R=$d(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),R=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!R||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Le=function(jt){var en=R.apply(B,ba([jt],J));return A&&je?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var je=this.__chain__,ht=!!this.__actions__.length,yt=F&&!je,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:O2,args:[Le],thisArg:n}),new Ki(bt,je)}return yt&&$t?c.apply(this,J):(bt=this.thru(Le),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=qu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var R=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],R)}return this[S](function(K){return p.apply(Rt(K)?K:[],R)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[uf(n,E).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=v2,B.prototype.at=IU,B.prototype.chain=MU,B.prototype.commit=OU,B.prototype.next=RU,B.prototype.plant=DU,B.prototype.reverse=zU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=BU,B.prototype.first=B.prototype.head,Qu&&(B.prototype[Qu]=NU),B},Sa=po();Vt?((Vt.exports=Sa)._=Sa,Pt._=Sa):mt._=Sa}).call(gs)})(da,da.exports);const Ge=da.exports;var w2e=Object.create,$F=Object.defineProperty,C2e=Object.getOwnPropertyDescriptor,_2e=Object.getOwnPropertyNames,k2e=Object.getPrototypeOf,E2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),P2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _2e(t))!E2e.call(e,i)&&i!==n&&$F(e,i,{get:()=>t[i],enumerable:!(r=C2e(t,i))||r.enumerable});return e},HF=(e,t,n)=>(n=e!=null?w2e(k2e(e)):{},P2e(t||!e||!e.__esModule?$F(n,"default",{value:e,enumerable:!0}):n,e)),T2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),WF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Lb=De((e,t)=>{var n=WF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),L2e=De((e,t)=>{var n=Lb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),A2e=De((e,t)=>{var n=Lb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),I2e=De((e,t)=>{var n=Lb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),M2e=De((e,t)=>{var n=Lb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ab=De((e,t)=>{var n=T2e(),r=L2e(),i=A2e(),o=I2e(),a=M2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab();function r(){this.__data__=new n,this.size=0}t.exports=r}),R2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),N2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),D2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),VF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=VF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),z2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),B2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Ib=De((e,t)=>{var n=w_(),r=z2e(),i=B2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),UF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),jF=De((e,t)=>{var n=Ib(),r=UF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),F2e=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),$2e=De((e,t)=>{var n=F2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),GF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),H2e=De((e,t)=>{var n=jF(),r=$2e(),i=UF(),o=GF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),W2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),Q0=De((e,t)=>{var n=H2e(),r=W2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Map");t.exports=i}),Mb=De((e,t)=>{var n=Q0(),r=n(Object,"create");t.exports=r}),V2e=De((e,t)=>{var n=Mb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),U2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),j2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),G2e=De((e,t)=>{var n=Mb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),q2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),K2e=De((e,t)=>{var n=V2e(),r=U2e(),i=j2e(),o=G2e(),a=q2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=K2e(),r=Ab(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Z2e=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Ob=De((e,t)=>{var n=Z2e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),X2e=De((e,t)=>{var n=Ob();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Q2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).get(i)}t.exports=r}),J2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).has(i)}t.exports=r}),eye=De((e,t)=>{var n=Ob();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),qF=De((e,t)=>{var n=Y2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab(),r=C_(),i=qF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ab(),r=O2e(),i=R2e(),o=N2e(),a=D2e(),s=tye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),rye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),iye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),oye=De((e,t)=>{var n=qF(),r=rye(),i=iye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),KF=De((e,t)=>{var n=oye(),r=aye(),i=sye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,P=u.length;if(w!=P&&!(b&&P>w))return!1;var E=v.get(l),k=v.get(u);if(E&&k)return E==u&&k==l;var T=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),uye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),cye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),dye=De((e,t)=>{var n=w_(),r=lye(),i=WF(),o=KF(),a=uye(),s=cye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,N=O?O.valueOf:void 0;function D(z,$,W,Y,de,j,te){switch(W){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var re=a;case P:var se=Y&l;if(re||(re=s),z.size!=$.size&&!se)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var V=o(re(z),re($),Y,de,j,te);return te.delete(z),V;case k:if(N)return N.call(z)==N.call($)}return!1}t.exports=D}),fye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),hye=De((e,t)=>{var n=fye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),pye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),mye=De((e,t)=>{var n=pye(),r=gye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),vye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),yye=De((e,t)=>{var n=Ib(),r=Rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),bye=De((e,t)=>{var n=yye(),r=Rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),xye=De((e,t)=>{function n(){return!1}t.exports=n}),YF=De((e,t)=>{var n=Eu(),r=xye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Sye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),wye=De((e,t)=>{var n=Ib(),r=ZF(),i=Rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[N]=j[D]=j[z]=j[$]=j[W]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[T]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[P]=j[E]=!1;function te(re){return i(re)&&r(re.length)&&!!j[n(re)]}t.exports=te}),Cye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),_ye=De((e,t)=>{var n=VF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),XF=De((e,t)=>{var n=wye(),r=Cye(),i=_ye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),kye=De((e,t)=>{var n=vye(),r=bye(),i=__(),o=YF(),a=Sye(),s=XF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),P=!v&&!b&&!w&&s(g),E=v||b||w||P,k=E?n(g.length,String):[],T=k.length;for(var I in g)(m||u.call(g,I))&&!(E&&(I=="length"||w&&(I=="offset"||I=="parent")||P&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,T)))&&k.push(I);return k}t.exports=h}),Eye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Pye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Tye=De((e,t)=>{var n=Pye(),r=n(Object.keys,Object);t.exports=r}),Lye=De((e,t)=>{var n=Eye(),r=Tye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Aye=De((e,t)=>{var n=jF(),r=ZF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Iye=De((e,t)=>{var n=kye(),r=Lye(),i=Aye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Mye=De((e,t)=>{var n=hye(),r=mye(),i=Iye();function o(a){return n(a,i,r)}t.exports=o}),Oye=De((e,t)=>{var n=Mye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var N=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=Q0(),r=Eu(),i=n(r,"DataView");t.exports=i}),Nye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Promise");t.exports=i}),Dye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Set");t.exports=i}),zye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),Bye=De((e,t)=>{var n=Rye(),r=C_(),i=Nye(),o=Dye(),a=zye(),s=Ib(),l=GF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),P=l(r),E=l(i),k=l(o),T=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var N=s(O),D=N==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case P:return u;case E:return g;case k:return m;case T:return v}return N}),t.exports=I}),Fye=De((e,t)=>{var n=nye(),r=KF(),i=dye(),o=Oye(),a=Bye(),s=__(),l=YF(),u=XF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function P(E,k,T,I,O,N){var D=s(E),z=s(k),$=D?m:a(E),W=z?m:a(k);$=$==g?v:$,W=W==g?v:W;var Y=$==v,de=W==v,j=$==W;if(j&&l(E)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return N||(N=new n),D||u(E)?r(E,k,T,I,O,N):i(E,k,$,T,I,O,N);if(!(T&h)){var te=Y&&w.call(E,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(te||re){var se=te?E.value():E,G=re?k.value():k;return N||(N=new n),O(se,G,T,I,N)}}return j?(N||(N=new n),o(E,k,T,I,O,N)):!1}t.exports=P}),$ye=De((e,t)=>{var n=Fye(),r=Rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),QF=De((e,t)=>{var n=$ye();function r(i,o){return n(i,o)}t.exports=r}),Hye=["ctrl","shift","alt","meta","mod"],Wye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function s6(e,t=","){return typeof e=="string"?e.split(t):e}function km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Wye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Hye.includes(o));return{...r,keys:i}}function Vye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Uye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function jye(e){return JF(e,["input","textarea","select"])}function JF({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Gye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var qye=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},Kye=C.exports.createContext(void 0),Yye=()=>C.exports.useContext(Kye),Zye=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Xye=()=>C.exports.useContext(Zye),Qye=HF(QF());function Jye(e){let t=C.exports.useRef(void 0);return(0,Qye.default)(t.current,e)||(t.current=e),t.current}var SA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=Jye(a),{enabledScopes:h}=Xye(),g=Yye();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Gye(h,u?.scopes))return;let m=w=>{if(!(jye(w)&&!JF(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||s6(e,u?.splitKey).forEach(P=>{let E=km(P,u?.combinationKey);if(qye(w,E,o)||E.keys?.includes("*")){if(Vye(w,E,u?.preventDefault),!Uye(w,E,u?.enabled)){SA(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.addHotkey(km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.removeHotkey(km(w,u?.combinationKey)))}},[e,l,u,h]),i}HF(QF());var FC=new Set;function e3e(e){(Array.isArray(e)?e:[e]).forEach(t=>FC.add(km(t)))}function t3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=km(t);for(let r of FC)r.keys?.every(i=>n.keys?.includes(i))&&FC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{e3e(e.key)}),document.addEventListener("keyup",e=>{t3e(e.key)})});function n3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const r3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),i3e=lt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),o3e=lt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),a3e=lt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),s3e=lt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),l3e=lt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),u3e=lt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const c3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(ih,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Nb(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(n7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:k,...T}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const N=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ge.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(ih,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:N,onBlur:D,width:a,...T,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...E,className:"invokeai__number-input-stepper-button"}),x(X7,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},uh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(gd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(ih,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(VB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},d3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],f3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],h3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],p3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,g3e=["gfpgan","codeformer"],m3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],v3e=Xe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),y3e=Xe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),Uv=()=>{const e=Fe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(v3e),{isGFPGANAvailable:i}=Ce(y3e),o=l=>e(N3(l)),a=l=>e(MW(l)),s=l=>e(D3(l.target.value));return ee(an,{direction:"column",gap:2,children:[x(uh,{label:"Type",validValues:g3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function b3e(){const e=Fe(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(OW(r.target.checked))})}var e$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=le.createContext&&le.createContext(e$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ch(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:N,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:re,sliderTooltipProps:se,sliderIAIIconButtonProps:G,...V}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ge.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!T||T()};return ee(gd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(ih,{className:"invokeai__slider-component-label",...$,children:r}),ee(bz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...V,children:[h&&ee(Kn,{children:[x(LC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),x(LC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(eF,{className:"invokeai__slider_track",...Y,children:x(tF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...se,children:x(JB,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:N,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:P,...te}),ee(DB,{...re,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function T_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=Fe();return x(ch,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const i$=()=>x(md,{flex:"1",textAlign:"left",children:"Other Options"}),P3e=()=>{const e=Fe(),t=Ce(r=>r.options.hiresFix);return x(an,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(IW(r.target.checked))})})},T3e=()=>{const e=Fe(),t=Ce(r=>r.options.seamless);return x(an,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(AW(r.target.checked))})})},o$=()=>ee(an,{gap:2,direction:"column",children:[x(T3e,{}),x(P3e,{})]}),Db=()=>x(md,{flex:"1",textAlign:"left",children:"Seed"});function L3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(i7e(r.target.checked))})}function A3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=Fe(),i=o=>r(Qv(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const a$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function I3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(aa,{size:"sm",isDisabled:t,onClick:()=>e(Qv(a$(k_,E_))),children:x("p",{children:"Shuffle"})})}function M3e(){const e=Fe(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(X9e(r)),value:t,isInteger:!1})}function O3e(){const e=Fe(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(Q9e(r)),value:t,isInteger:!1})}const zb=()=>ee(an,{gap:2,direction:"column",children:[x(L3e,{}),ee(an,{gap:2,children:[x(A3e,{}),x(I3e,{})]}),x(an,{gap:2,children:x(M3e,{})}),x(an,{gap:2,children:x(O3e,{})})]});function Bb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(r7e(i.target.checked))})]})}const R3e=Xe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),N3e=Xe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),jv=()=>{const e=Fe(),{upscalingLevel:t,upscalingStrength:n}=Ce(R3e),{isESRGANAvailable:r}=Ce(N3e);return ee("div",{className:"upscale-options",children:[x(uh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:p3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function D3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=Fe();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(J9e(r.target.checked))})}function Fb(){return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(D3e,{})]})}function z3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(ih,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function B3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe(),r=i=>n(RW(i.target.value));return x(z3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function F3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(e7e(i)),isInteger:!1})}const $b=()=>ee(an,{gap:2,direction:"column",children:[x(F3e,{}),x(B3e,{})]}),Ia=e=>{const{label:t,styleClass:n,...r}=e;return x(tz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Hb(){const e=Ce(r=>r.options.showAdvancedOptions),t=Fe();return x(Ia,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(o7e(r.target.checked)),isChecked:e})}function $3e(){const e=Fe(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(EW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const rn=Xe(e=>e.options,e=>ux[e.activeTab],{memoizeOptions:{equalityCheck:Ge.isEqual}}),H3e=Xe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function W3e(){const e=Ce(i=>i.options.height),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(PW(Number(i.target.value))),validValues:h3e,styleClass:"main-option-block"})}const V3e=Xe([e=>e.options,H3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function U3e(){const e=Fe(),{iterations:t,mayGenerateMultipleImages:n}=Ce(V3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Z9e(i)),value:t,width:L_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function j3e(){const e=Ce(r=>r.options.sampler),t=Fe();return x(uh,{label:"Sampler",value:e,onChange:r=>t(LW(r.target.value)),validValues:d3e,styleClass:"main-option-block"})}function G3e(){const e=Fe(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(kW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center"})}function q3e(){const e=Ce(i=>i.options.width),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(TW(Number(i.target.value))),validValues:f3e,styleClass:"main-option-block"})}const L_="auto";function Wb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(U3e,{}),x(G3e,{}),x($3e,{})]}),ee("div",{className:"main-options-row",children:[x(q3e,{}),x(W3e,{}),x(j3e,{})]})]})})}const K3e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},s$=vb({name:"system",initialState:K3e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:Y3e,setIsProcessing:g0,addLogEntry:Ei,setShouldShowLogViewer:l6,setIsConnected:_A,setSocketId:Yke,setShouldConfirmOnDelete:l$,setOpenAccordions:Z3e,setSystemStatus:X3e,setCurrentStatus:u6,setSystemConfig:Q3e,setShouldDisplayGuides:J3e,processingCanceled:e4e,errorOccurred:$C,errorSeen:u$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:t4e,setSaveIntermediatesInterval:n4e,setEnableImageDebugging:r4e}=s$.actions,i4e=s$.reducer;function o4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function a4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function s4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function l4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function c$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function u4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function c4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const d4e=Xe(e=>e.system,e=>e.shouldDisplayGuides),f4e=({children:e,feature:t})=>{const n=Ce(d4e),{text:r}=c3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(md,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},h4e=Pe(({feature:e,icon:t=o4e},n)=>x(f4e,{feature:e,children:x(md,{ref:n,children:x(ga,{as:t})})}));function p4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(h4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Vb=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=Fe();return x(rb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(Z3e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(p4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function g4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function m4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function v4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function d$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function f$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function b4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function x4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function S4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function h$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function p$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function w4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function C4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function _4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function k4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function E4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function P4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function T4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function L4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function m$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function A4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function M4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function O4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function v$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function c6(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function B4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function y$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function F4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function $4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function I_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function M_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Py;const V4e=new Uint8Array(16);function U4e(){if(!Py&&(Py=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Py))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Py(V4e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function j4e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const G4e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:G4e};function Tp(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||U4e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return j4e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ty=(e,t)=>Math.round(e/t)*t,Ub=e=>e.kind==="line"&&e.layer==="mask",q4e=e=>e.kind==="line"&&e.layer==="base",K4e=e=>e.kind==="image"&&e.layer==="base",Y4e=e=>e.kind==="line",TA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:.5},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1},Z4e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",objects:[],pastObjects:[],futureObjects:[],...TA},outpainting:{layer:"base",objects:[],pastObjects:[],futureObjects:[],stagingArea:{images:[],selectedImageIndex:0},shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...TA}},b$=vb({name:"canvas",initialState:Z4e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=e[e.currentCanvas].objects.filter(t=>!Ub(t)),e[e.currentCanvas].futureObjects=[],e[e.currentCanvas].shouldInvertMask=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldInvertMask=!e[e.currentCanvas].shouldInvertMask},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldInvertMask:(e,t)=>{e[e.currentCanvas].shouldInvertMask=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{e.inpainting.imageToInpaint=void 0},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.imageToInpaint=t.payload,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ge.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ge.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,P=Ge.clamp(m,64,h),E=Ge.clamp(v,64,g),k=b>0?i-b:i,T=w>0?o-w:o,I=Ge.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-P),O=Ge.clamp(T,e[e.currentCanvas].stageCoordinates.y,g-E);e[e.currentCanvas].boundingBoxDimensions={width:P,height:E},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastObjects=[],e[e.currentCanvas].futureObjects=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpaintingSesion:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n;e.outpainting.pastObjects.push([...e.outpainting.objects]),e.outpainting.futureObjects=[],e.outpainting.objects.push({kind:"image",layer:"base",x:i,y:o,image:r})},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,eraserSize:a}=e[e.currentCanvas];n!=="move"&&(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects.push({kind:"line",layer:r,tool:n,strokeWidth:n==="brush"?o/2:a/2,points:t.payload,...r==="base"&&n==="brush"&&{color:i}}),e[e.currentCanvas].futureObjects=[])},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].objects.findLast(Y4e);!n||n.points.push(...t.payload)},undo:e=>{if(e.outpainting.objects.length===0)return;const t=e.outpainting.pastObjects.pop();!t||(e.outpainting.futureObjects.unshift(e.outpainting.objects),e.outpainting.objects=t)},redo:e=>{if(e.outpainting.futureObjects.length===0)return;const t=e.outpainting.futureObjects.shift();!t||(e.outpainting.pastObjects.push(e.outpainting.objects),e.outpainting.objects=t)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=[],e[e.currentCanvas].futureObjects=[]}},extraReducers:e=>{e.addCase(R_.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastObjects.push([...t.outpainting.objects]),t.outpainting.futureObjects=[],t.outpainting.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:Su,setLayer:X4e,setBrushColor:Q4e,setBrushSize:x$,setEraserSize:J4e,addLine:S$,addPointToCurrentLine:w$,setShouldInvertMask:e5e,setIsMaskEnabled:C$,setShouldShowCheckboardTransparency:Zke,setShouldShowBrushPreview:d6,setMaskColor:_$,clearMask:k$,clearImageToInpaint:t5e,undo:n5e,redo:r5e,setCursorPosition:E$,setStageDimensions:LA,setImageToInpaint:q4,setImageToOutpaint:P$,setBoundingBoxDimensions:qg,setBoundingBoxCoordinates:f6,setBoundingBoxPreviewFill:Xke,setDoesCanvasNeedScaling:Cr,setStageScale:T$,toggleTool:Qke,setShouldShowBoundingBox:O_,setShouldDarkenOutsideBoundingBox:L$,setIsDrawing:jb,setShouldShowBrush:Jke,setClearBrushHistory:i5e,setShouldUseInpaintReplace:o5e,setInpaintReplace:AA,setShouldLockBoundingBox:A$,toggleShouldLockBoundingBox:a5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:h6,setIsMouseOverBoundingBox:Ly,setIsMoveBoundingBoxKeyHeld:eEe,setIsMoveStageKeyHeld:tEe,setStageCoordinates:I$,setCurrentCanvas:M$,addImageToOutpaintingSesion:s5e,resetCanvas:l5e,setShouldShowGrid:u5e,setShouldSnapToGrid:c5e,setShouldAutoSave:d5e,setShouldShowIntermediates:f5e,setIsMovingStage:K4}=b$.actions,h5e=b$.reducer,R_=ove("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Tp(),...v},x:a,y:s}}),Yt=e=>e.canvas[e.canvas.currentCanvas],Gv=e=>e.canvas.outpainting,qv=Xe([e=>e.canvas,rn],(e,t)=>{if(t==="inpainting")return e.inpainting.imageToInpaint;if(t==="outpainting"){const n=e.outpainting.objects.find(r=>r.kind==="image");if(n&&n.kind==="image")return n.image}}),O$=Xe([e=>e.options,e=>e.system,qv,rn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ge.isEqual,resultEqualityCheck:Ge.isEqual}}),HC=Jr("socketio/generateImage"),p5e=Jr("socketio/runESRGAN"),g5e=Jr("socketio/runFacetool"),m5e=Jr("socketio/deleteImage"),WC=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),v5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const y5e=Jr("socketio/requestSystemConfig"),b5e=Jr("socketio/requestModelChange"),ou=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(aa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function R$(e){const{iconButton:t=!1,...n}=e,r=Fe(),{isReady:i,reasonsWhyNotReady:o}=Ce(O$),a=Ce(rn),s=()=>{r(HC(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(HC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(I4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ou,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(gz,{children:o.map((u,h)=>x(mz,{children:u},h))})})}const x5e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function N$(e){const{...t}=e,n=Fe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(x5e),a=()=>n(v5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(c4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const S5e=Xe(e=>e.options,e=>e.shouldLoopback),D$=()=>{const e=Fe(),t=Ce(S5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(R4e,{}),onClick:()=>{e(f7e(!t))}})},Gb=()=>ee("div",{className:"process-buttons",children:[x(R$,{}),x(D$,{}),x(N$,{})]}),w5e=Xe([e=>e.options,rn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),qb=()=>{const e=Fe(),{prompt:t,activeTabName:n}=Ce(w5e),{isReady:r}=Ce(O$),i=C.exports.useRef(null),o=s=>{e(cx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(HC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(uF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function C5e(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm2.121.707a1 1 0 0 0-1.414 0L4.16 7.547l5.293 5.293 4.633-4.633a1 1 0 0 0 0-1.414l-3.879-3.879zM8.746 13.547 3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function _5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function k5e(e,t){e.classList?e.classList.add(t):_5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function E5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},F$=le.createContext(null);var $$=function(t){return t.scrollTop},Kg="unmounted",Sf="exited",wf="entering",Lp="entered",VC="exiting",Pu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Sf,o.appearStatus=wf):l=Lp:r.unmountOnExit||r.mountOnEnter?l=Kg:l=Sf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Kg?{status:Sf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Lp&&(o=wf):(a===wf||a===Lp)&&(o=VC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this);a&&$$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sf&&this.setState({status:Kg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[iy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Lp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Lp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:iy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:Sf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:VC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Sf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Kg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(F$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Pu.contextType=F$;Pu.propTypes={};function Cp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cp,onEntering:Cp,onEntered:Cp,onExit:Cp,onExiting:Cp,onExited:Cp};Pu.UNMOUNTED=Kg;Pu.EXITED=Sf;Pu.ENTERING=wf;Pu.ENTERED=Lp;Pu.EXITING=VC;const P5e=Pu;var T5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k5e(t,r)})},p6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return E5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},V$=""+new URL("logo.13003d72.png",import.meta.url).href,L5e=Xe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Kb=e=>{const t=Fe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce(L5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(b0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(b0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(c7e(a.current?a.current.scrollTop:0)),t(b0(!1)),t(d7e(!1)))},[t,i]);W$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(u7e(!i)),t(Cr(!0))};return x(H$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(z$,{}):x(B$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function A5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(b3e,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(I_,{}),x(Hf,{size:"lg",children:"Click or Drag and Drop"})]})})},I5e=Xe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),UC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=O4(),a=Fe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(I5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(m5e(e)),o()};vt("del",()=>{s?i():m()},[e,s]);const v=b=>a(l$(!b.target.checked));return ee(Kn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(s1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(pv,{children:ee(l1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(z4,{children:ee(an,{direction:"column",gap:5,children:[x(ko,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ee(an,{alignItems:"center",children:[x(ih,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(aa,{ref:h,onClick:o,children:"Cancel"}),x(aa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),M5e=Xe([e=>e.system,e=>e.options,e=>e.gallery,rn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),U$=()=>{const e=Fe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(M5e),g=xd(),m=()=>{!u||(h&&e(_l(!1)),e(bv(u)),e(Co("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(t7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(Qv(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(cx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(P(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(p5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(g5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const T=()=>e(NW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(q4(u)),e(Co("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(P$(u)),e(Co("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?T():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(Eo,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(z4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ou,{size:"sm",onClick:m,leftIcon:x(c6,{}),children:"Send to Image to Image"}),x(ou,{size:"sm",onClick:I,leftIcon:x(c6,{}),children:"Send to Inpainting"}),x(ou,{size:"sm",onClick:O,leftIcon:x(c6,{}),children:"Send to Outpainting"}),x(ou,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ou,{leftIcon:x(p$,{}),size:"sm",children:x(Wf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(Eo,{isAttached:!0,children:[x(gt,{icon:x(O4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(D4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(gt,{icon:x(b4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(Eo,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(C4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Uv,{}),x(ou,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(w4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(jv,{}),x(ou,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),x(gt,{icon:x(h$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:T}),x(UC,{image:u,children:x(gt,{icon:x(y$,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},O5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},j$=vb({name:"gallery",initialState:O5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=da.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Ay,clearIntermediateImage:DA,removeImage:G$,setCurrentImage:q$,addGalleryImages:R5e,setIntermediateImage:N5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:D5e,setShouldShowGallery:m0,setGalleryScrollPosition:z5e,setGalleryImageMinimumWidth:gf,setGalleryImageObjectFit:B5e,setShouldHoldGalleryOpen:F5e,setShouldAutoSwitchToNewImages:$5e,setCurrentCategory:Iy,setGalleryWidth:Pg}=j$.actions,H5e=j$.reducer;lt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});lt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});lt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});lt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});lt({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});lt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});lt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});lt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});lt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});lt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});lt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});lt({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});lt({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});lt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});lt({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});lt({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});lt({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});lt({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});lt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});lt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});lt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});lt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});lt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});lt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});lt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});lt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});lt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var K$=lt({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});lt({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});lt({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});lt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});lt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});lt({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});lt({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});lt({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});lt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});lt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});lt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});lt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});lt({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});lt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});lt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});lt({displayName:"SpinnerIcon",path:ee(Kn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});lt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});lt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});lt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});lt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});lt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});lt({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});lt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});lt({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});lt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});lt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});lt({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});lt({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});lt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function W5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(an,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(W5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(an,{direction:i?"column":"row",children:[ee(ko,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Wf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(K$,{mx:"2px"})]}):x(ko,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),V5e=(e,t)=>e.image.uuid===t.image.uuid,U5e=C.exports.memo(({image:e,styleClass:t})=>{const n=Fe();vt("esc",()=>{n(NW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:P,fit:E,init_image_path:k,mask_image_path:T,orig_path:I,scale:O}=r,N=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(an,{gap:1,direction:"column",width:"100%",children:[ee(an,{gap:2,children:[x(ko,{fontWeight:"semibold",children:"File:"}),ee(Wf,{href:e.url,isExternal:!0,children:[e.url,x(K$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Kn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&P!==void 0&&x(tr,{label:"Fix faces strength",value:P,onClick:()=>n(N3(P))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&P!==void 0&&x(tr,{label:"Upscaling strength",value:P,onClick:()=>n(m8(P))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:A3(s),onClick:()=>n(cx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(Qv(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(LW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(kW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(EW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:G4(u),onClick:()=>n(RW(G4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(AW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(IW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(TW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(PW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(bv(k))}),T&&x(tr,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(v8(T))}),i==="img2img"&&P&&x(tr,{label:"Image to image strength",value:P,onClick:()=>n(p8(P))}),E&&x(tr,{label:"Image to image fit",value:E,onClick:()=>n(OW(E))}),o&&o.length>0&&ee(Kn,{children:[x(Hf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:W,onClick:()=>n(m8(W))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("codeformer"))}}),W&&x(tr,{label:"Fidelity",value:W,onClick:()=>{n(MW(W)),n(D3("codeformer"))}})]},z)}})]}),ee(an,{gap:2,direction:"column",children:[ee(an,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(ko,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(fz,{width:"100%",pt:10,children:x(ko,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},V5e),Y$=Xe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:i,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function j5e(){const e=Fe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())},m=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ob,{src:i.url,width:o?i.width:void 0,height:o?i.height:void 0,onClick:m}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(U5e,{image:i,styleClass:"current-image-metadata"})]})}const G5e=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(G5e);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Kn,{children:[x(U$,{}),x(j5e,{})]}):x("div",{className:"current-image-display-placeholder",children:x(u4e,{})})})},Z$=()=>{const e=C.exports.useContext(D_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(I_,{}),onClick:e||void 0})};function q5e(){const e=Ce(i=>i.options.initialImage),t=Fe(),n=xd(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(DW())};return ee(Kn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Z$,{})]}),e&&x("div",{className:"init-image-preview",children:x(ob,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const K5e=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(q5e,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function Y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Z5e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},rbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],HA="__resizable_base__",X$=function(e){J5e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(HA):o.className+=HA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ebe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return g6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?g6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?g6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&_p("left",o),s=i&&_p("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var P=(m-b)*this.ratio+w,E=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,I=Math.max(h,P),O=Math.min(g,E),N=Math.max(m,k),D=Math.min(v,T);n=Oy(n,I,O),r=Oy(r,N,D)}else n=Oy(n,h,g),r=Oy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Ry(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ry(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Ry(n)?n.touches[0].clientX:n.clientX,h=Ry(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,P=this.getParentSize(),E=nbe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=$A(T,this.props.snap.y,this.props.snapGap));var N=this.calculateNewSizeFromAspectRatio(I,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=N.newWidth,T=N.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(T,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:I-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/P.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=T/P.height*100;T=Y+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var j=T/this.window.innerHeight*100;T=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(Q5e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return rbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Kv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,P=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:P},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ibe(i,...t)]}function ibe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function obe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q$(...e){return t=>e.forEach(n=>obe(n,t))}function Ha(...e){return C.exports.useCallback(Q$(...e),e)}const vv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(sbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});vv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...lbe(r,n.props),ref:Q$(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const abe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function sbe(e){return C.exports.isValidElement(e)&&e.type===abe}function lbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const ube=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=ube.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?vv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function J$(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function eH(e){const t=e+"CollectionProvider",[n,r]=Kv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:b,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,b)=>{const{scope:w,children:P}=v,E=o(s,w),k=Ha(b,E.collectionRef);return le.createElement(vv,{ref:k},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=le.forwardRef((v,b)=>{const{scope:w,children:P,...E}=v,k=le.useRef(null),T=Ha(b,k),I=o(u,w);return le.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),le.createElement(vv,{[h]:"",ref:T},P)});function m(v){const b=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const cbe=C.exports.createContext(void 0);function tH(e){const t=C.exports.useContext(cbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function dbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const GC="dismissableLayer.update",fbe="dismissableLayer.pointerDownOutside",hbe="dismissableLayer.focusOutside";let WA;const pbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(pbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=P.indexOf(E),T=g?P.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,N=mbe(z=>{const $=z.target,W=[...h.branches].some(Y=>Y.contains($));!O||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=vbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return dbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(GC,z),()=>document.removeEventListener(GC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,N.onPointerDownCapture)}))});function mbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nH(fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&nH(hbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(GC);document.dispatchEvent(e)}function nH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?J$(i,o):i.dispatchEvent(o)}let m6=0;function ybe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),m6++,()=>{m6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),m6--}},[])}function UA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const v6="focusScope.autoFocusOnMount",y6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},bbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:Cf(g.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(v6,jA);s.addEventListener(v6,u),s.dispatchEvent(E),E.defaultPrevented||(xbe(kbe(rH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(v6,u),setTimeout(()=>{const E=new CustomEvent(y6,jA);s.addEventListener(y6,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(y6,h),qA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const k=w.currentTarget,[T,I]=Sbe(k);T&&I?!w.shiftKey&&E===I?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(I,{select:!0})):E===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function xbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function Sbe(e){const t=rH(e),n=GA(t,e),r=GA(t.reverse(),e);return[n,r]}function rH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GA(e,t){for(const n of e)if(!wbe(n,{upTo:t}))return n}function wbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cbe(e)&&t&&e.select()}}const qA=_be();function _be(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kbe(e){return e.filter(t=>t.tagName!=="A")}const z0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Ebe=M6["useId".toString()]||(()=>{});let Pbe=0;function Tbe(e){const[t,n]=C.exports.useState(Ebe());return z0(()=>{e||n(r=>r??String(Pbe++))},[e]),e||(t?`radix-${t}`:"")}function J0(e){return e.split("-")[0]}function Yb(e){return e.split("-")[1]}function e1(e){return["top","bottom"].includes(J0(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=e1(t),l=H_(s),u=r[l]/2-i[l]/2,h=J0(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Yb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Lbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=YA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=iH(r),h={x:i,y:o},g=e1(a),m=Yb(a),v=H_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=E/2-k/2,N=u[w],D=I-b[v]-u[P],z=I/2-b[v]/2+O,$=qC(N,z,D),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?zObe[t])}function Rbe(e,t,n){n===void 0&&(n=!1);const r=Yb(e),i=e1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X4(a)),{main:a,cross:X4(a)}}const Nbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>Nbe[t])}const Dbe=["top","right","bottom","left"];function zbe(e){const t=X4(e);return[XA(e),t,XA(t)]}const Bbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=J0(r),E=g||(w===a||!v?[X4(a)]:zbe(a)),k=[a,...E],T=await Z4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(T[w]),h){const{main:$,cross:W}=Rbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(T[$],T[W])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var N,D;const $=((N=(D=i.flip)==null?void 0:D.index)!=null?N:0)+1,W=k[$];if(W)return{data:{index:$,overflows:O},reset:{placement:W}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,re)=>te+re,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Dbe.some(t=>e[t]>=0)}const Fbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Z4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Z4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function $be(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=J0(n),s=Yb(n),l=e1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Hbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await $be(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function oH(e){return e==="x"?"y":"x"}const Wbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:k}=P;return{x:E,y:k}}},...l}=e,u={x:n,y:r},h=await Z4(t,l),g=e1(J0(i)),m=oH(g);let v=u[g],b=u[m];if(o){const P=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=v+h[P],T=v-h[E];v=qC(k,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+h[P],T=b-h[E];b=qC(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Vbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=e1(i),m=oH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",N=o.reference[g]-o.floating[O]+P.mainAxis,D=o.reference[g]+o.reference[O]-P.mainAxis;vD&&(v=D)}if(u){var E,k,T,I;const O=g==="y"?"width":"height",N=["top","left"].includes(J0(i)),D=o.reference[m]-o.floating[O]+(N&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(N?0:P.crossAxis),z=o.reference[m]+o.reference[O]+(N?0:(T=(I=a.offset)==null?void 0:I[m])!=null?T:0)-(N?P.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function aH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Tu(e){if(e==null)return window;if(!aH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Tu(e).getComputedStyle(e)}function Cu(e){return aH(e)?"":e?(e.nodeName||"").toLowerCase():""}function sH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Tl(e){return e instanceof Tu(e).HTMLElement}function ud(e){return e instanceof Tu(e).Element}function Ube(e){return e instanceof Tu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Tu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zb(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function jbe(e){return["table","td","th"].includes(Cu(e))}function lH(e){const t=/firefox/i.test(sH()),n=Yv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function uH(){return!/^((?!chrome|android).)*safari/i.test(sH())}const eI=Math.min,Em=Math.max,Q4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Tl(e)&&(l=e.offsetWidth>0&&Q4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Q4(s.height)/e.offsetHeight||1);const h=ud(e)?Tu(e):window,g=!uH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Ube(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xb(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cH(e){return _u(Sd(e)).left+Xb(e).scrollLeft}function Gbe(e){const t=_u(e);return Q4(t.width)!==e.offsetWidth||Q4(t.height)!==e.offsetHeight}function qbe(e,t,n){const r=Tl(t),i=Sd(t),o=_u(e,r&&Gbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||Zb(i))&&(a=Xb(t)),Tl(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||Sd(e)}function tI(e){return!Tl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Kbe(e){let t=dH(e);for(W_(t)&&(t=t.host);Tl(t)&&!["html","body"].includes(Cu(t));){if(lH(t))return t;t=t.parentNode}return null}function KC(e){const t=Tu(e);let n=tI(e);for(;n&&jbe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!lH(n))?t:n||Kbe(e)||t}function nI(e){if(Tl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Ybe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Tl(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||Zb(o))&&(a=Xb(n)),Tl(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Zbe(e,t){const n=Tu(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=uH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Xbe(e){var t;const n=Sd(e),r=Xb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Em(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Em(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+cH(e);const l=-r.scrollTop;return Yv(i||n).direction==="rtl"&&(s+=Em(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fH(e){const t=dH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Tl(t)&&Zb(t)?t:fH(t)}function J4(e,t){var n;t===void 0&&(t=[]);const r=fH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Tu(r),a=i?[o].concat(o.visualViewport||[],Zb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(J4(a))}function Qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Jbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function rI(e,t,n){return t==="viewport"?Y4(Zbe(e,n)):ud(t)?Jbe(t,n):Y4(Xbe(Sd(e)))}function exe(e){const t=J4(e),r=["absolute","fixed"].includes(Yv(e).position)&&Tl(e)?KC(e):e;return ud(r)?t.filter(i=>ud(i)&&Qbe(i,r)&&Cu(i)!=="body"):[]}function txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?exe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Em(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Em(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const nxe={getClippingRect:txe,convertOffsetParentRelativeRectToViewportRelativeRect:Ybe,isElement:ud,getDimensions:nI,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qbe(t,KC(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Yv(e).direction==="rtl"};function rxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?J4(e):[],...J4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?_u(e):null;s&&b();function b(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const ixe=(e,t,n)=>Lbe(e,t,{platform:nxe,...n});var YC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function oxe(e){const t=C.exports.useRef(e);return YC(()=>{t.current=e}),t}function axe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=oxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);ZC(g?.map(T=>{let{options:I}=T;return I}),t?.map(T=>{let{options:I}=T;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||ixe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Al.exports.flushSync(()=>{h(T)})})},[g,n,r]);YC(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);YC(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:P,floating:E}),[u,v,k,P,E])}const sxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function lxe(e){const[t,n]=C.exports.useState(void 0);return z0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hH="Popper",[V_,pH]=Kv(hH),[uxe,gH]=V_(hH),cxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(uxe,{scope:t,anchor:r,onAnchorChange:i},n)},dxe="PopperAnchor",fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gH(dxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),e5="PopperContent",[hxe,nEe]=V_(e5),[pxe,gxe]=V_(e5,{hasParent:!1,positionUpdateFns:new Set}),mxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:I=!0,...O}=e,N=gH(e5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[W,Y]=C.exports.useState(null),de=lxe(W),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,re=g+(v!=="center"?"-"+v:""),se=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},G=Array.isArray(P)?P:[P],V=G.length>0,q={padding:se,boundary:G.filter(yxe),altBoundary:V},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:Ue,update:ct}=axe({strategy:"fixed",placement:re,whileElementsMounted:rxe,middleware:[Hbe({mainAxis:m+te,alignmentAxis:b}),I?Wbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Vbe():void 0,...q}):void 0,W?sxe({element:W,padding:w}):void 0,I?Bbe({...q}):void 0,bxe({arrowWidth:j,arrowHeight:te}),T?Fbe({strategy:"referenceHidden"}):void 0].filter(vxe)});z0(()=>{Q(N.anchor)},[Q,N.anchor]);const qe=ye!==null&&Se!==null,[et,tt]=mH(He),at=(i=Ue.arrow)===null||i===void 0?void 0:i.x,At=(o=Ue.arrow)===null||o===void 0?void 0:o.y,wt=((a=Ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,dt]=C.exports.useState();z0(()=>{D&&dt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=gxe(e5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":et,"data-align":tt,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=Ue.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Ue.transformOrigin)===null||l===void 0?void 0:l.x,(u=Ue.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(hxe,{scope:h,placedSide:et,onArrowChange:Y,arrowX:at,arrowY:At,shouldHideArrow:wt},xt?C.exports.createElement(pxe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(wu.div,kn)):C.exports.createElement(wu.div,kn)))});function vxe(e){return e!==void 0}function yxe(e){return e!==null}const bxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=mH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",I="";return b==="bottom"?(T=g?P:`${E}px`,I=`${-v}px`):b==="top"?(T=g?P:`${E}px`,I=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,I=g?P:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,I=g?P:`${k}px`),{data:{x:T,y:I}}}});function mH(e){const[t,n="center"]=e.split("-");return[t,n]}const xxe=cxe,Sxe=fxe,wxe=mxe;function Cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vH=e=>{const{present:t,children:n}=e,r=_xe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};vH.displayName="Presence";function _xe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Dy(r.current);o.current=s==="mounted"?u:"none"},[s]),z0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Dy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),z0(()=>{if(t){const u=g=>{const v=Dy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Dy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Dy(e){return e?.animationName||"none"}function kxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Exe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Exe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const b6="rovingFocusGroup.onEntryFocus",Pxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[XC,yH,Txe]=eH(U_),[Lxe,bH]=Kv(U_,[Txe]),[Axe,Ixe]=Lxe(U_),Mxe=C.exports.forwardRef((e,t)=>C.exports.createElement(XC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(XC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Oxe,An({},e,{ref:t}))))),Oxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=tH(o),[b=null,w]=kxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),k=Pl(u),T=yH(n),I=C.exports.useRef(!1),[O,N]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(b6,k),()=>D.removeEventListener(b6,k)},[k]),C.exports.createElement(Axe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>N(D=>D-1),[])},C.exports.createElement(wu.div,An({tabIndex:P||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!P){const $=new CustomEvent(b6,Pxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),Y=W.find(re=>re.active),de=W.find(re=>re.id===b),te=[Y,de,...W].filter(Boolean).map(re=>re.ref.current);xH(te)}}I.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Rxe="RovingFocusGroupItem",Nxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Tbe(),s=Ixe(Rxe,n),l=s.currentTabStopId===a,u=yH(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(XC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Bxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Fxe(w,P+1):w.slice(P+1)}setTimeout(()=>xH(w))}})})))}),Dxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bxe(e,t,n){const r=zxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Dxe[r]}function xH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Fxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const $xe=Mxe,Hxe=Nxe,Wxe=["Enter"," "],Vxe=["ArrowDown","PageUp","Home"],SH=["ArrowUp","PageDown","End"],Uxe=[...Vxe,...SH],Qb="Menu",[QC,jxe,Gxe]=eH(Qb),[dh,wH]=Kv(Qb,[Gxe,pH,bH]),j_=pH(),CH=bH(),[qxe,Jb]=dh(Qb),[Kxe,G_]=dh(Qb),Yxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=tH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(xxe,s,C.exports.createElement(qxe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(Kxe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Sxe,An({},i,r,{ref:t}))}),Xxe="MenuPortal",[rEe,Qxe]=dh(Xxe,{forceMount:void 0}),td="MenuContent",[Jxe,_H]=dh(td),eSe=C.exports.forwardRef((e,t)=>{const n=Qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Jb(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(QC.Provider,{scope:e.__scopeMenu},C.exports.createElement(vH,{present:r||o.open},C.exports.createElement(QC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(tSe,An({},i,{ref:t})):C.exports.createElement(nSe,An({},i,{ref:t})))))}),tSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Gz(o)},[]),C.exports.createElement(kH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),nSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu);return C.exports.createElement(kH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=Jb(td,n),P=G_(td,n),E=j_(n),k=CH(n),T=jxe(n),[I,O]=C.exports.useState(null),N=C.exports.useRef(null),D=Ha(t,N,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?MB:C.exports.Fragment,re=v?{as:vv,allowPinchZoom:!0}:void 0,se=V=>{var q,Q;const X=$.current+V,me=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),Ue=dSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===Ue))===null||Q===void 0?void 0:Q.ref.current;(function qe(et){$.current=et,window.clearTimeout(z.current),et!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ybe();const G=C.exports.useCallback(V=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&hSe(V,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(Jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),onItemLeave:C.exports.useCallback(V=>{var q;G(V)||((q=N.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(V=>{Y.current=V},[])},C.exports.createElement(te,re,C.exports.createElement(bbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,V=>{var q;V.preventDefault(),(q=N.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(gbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement($xe,An({asChild:!0},k,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:V=>{P.isUsingKeyboardRef.current||V.preventDefault()}}),C.exports.createElement(wxe,An({role:"menu","aria-orientation":"vertical","data-state":lSe(w.open),"data-radix-menu-content":"",dir:P.dir},E,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,V=>{const Q=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,me=V.key.length===1;Q&&(V.key==="Tab"&&V.preventDefault(),!X&&me&&se(V.key));const ye=N.current;if(V.target!==ye||!Uxe.includes(V.key))return;V.preventDefault();const He=T().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);SH.includes(V.key)&&He.reverse(),uSe(He)}),onBlur:qn(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,e8(V=>{const q=V.target,Q=j.current!==V.clientX;if(V.currentTarget.contains(q)&&Q){const X=V.clientX>j.current?"right":"left";de.current=X,j.current=V.clientX}}))})))))))}),JC="MenuItem",iI="menu.itemSelect",rSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(JC,e.__scopeMenu),s=_H(JC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),J$(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(iSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Wxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),iSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_H(JC,n),s=CH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(QC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Hxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,e8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,e8(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),oSe="MenuRadioGroup";dh(oSe,{value:void 0,onValueChange:()=>{}});const aSe="MenuItemIndicator";dh(aSe,{checked:!1});const sSe="MenuSub";dh(sSe);function lSe(e){return e?"open":"closed"}function uSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function fSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function hSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fSe(n,t)}function e8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const pSe=Yxe,gSe=Zxe,mSe=eSe,vSe=rSe,EH="ContextMenu",[ySe,iEe]=Kv(EH,[wH]),ex=wH(),[bSe,PH]=ySe(EH),xSe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=ex(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(bSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(pSe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},SSe="ContextMenuTrigger",wSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(SSe,n),o=ex(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(gSe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,zy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,zy(u)),onPointerCancel:qn(e.onPointerCancel,zy(u)),onPointerUp:qn(e.onPointerUp,zy(u))})))}),CSe="ContextMenuContent",_Se=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(CSe,n),o=ex(n),a=C.exports.useRef(!1);return C.exports.createElement(mSe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),kSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=ex(n);return C.exports.createElement(vSe,An({},i,r,{ref:t}))});function zy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const ESe=xSe,PSe=wSe,TSe=_Se,wc=kSe,LSe=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ASe=Xe([e=>e.options,e=>e.gallery,e=>e.system,rn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ISe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,MSe=C.exports.memo(e=>{const t=Fe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce(ASe),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=xd(),w=()=>v(!0),P=()=>v(!1),E=()=>{s.metadata&&t(cx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(Qv(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},T=()=>{a&&t(_l(!1)),t(bv(s)),n!=="img2img"&&t(Co("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(q4(s)),n!=="inpainting"&&t(Co("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(P$(s)),n!=="outpainting"&&t(Co("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},N=()=>{g&&t(a7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(Co("img2img")),t(s7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(ESe,{children:[x(PSe,{children:ee(md,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:P,children:[x(ob,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(q$(s)),children:l&&x(ga,{width:"50%",height:"50%",as:S4e,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(UC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(B4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(TSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(wc,{onClickCapture:E,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(wc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(wc,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(wc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(wc,{onClickCapture:T,children:"Send to Image To Image"}),x(wc,{onClickCapture:I,children:"Send to Inpainting"}),x(wc,{onClickCapture:O,children:"Send to Outpainting"}),x(UC,{image:s,children:x(wc,{"data-warning":!0,children:"Delete Image"})})]})]})},ISe),OSe=320;function TH(){const e=Fe(),t=xd(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:P}=Ce(LSe),[E,k]=C.exports.useState(300),[T,I]=C.exports.useState(590),[O,N]=C.exports.useState(w>=OSe);C.exports.useEffect(()=>{if(!!o){if(P){e(Pg(400)),k(400),I(400);return}h==="inpainting"?(e(Pg(190)),k(190),I(190)):h==="img2img"?(e(Pg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Pg(Math.min(Math.max(Number(w),0),590))),I(590)),e(Cr(!0))}},[e,h,o,w,P]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,P]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),W=()=>{e(D5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(m0(!0)),o&&e(Cr(!0))},j=()=>{e(m0(!1)),e(z5e(z.current?z.current.scrollTop:0)),e(F5e(!1))},te=()=>{e(WC(r))},re=q=>{e(gf(q)),e(Cr(!0))},se=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{W(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(m0(!1)),e(Cr(!0)))},[o]);const V=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+V;q<=256?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-V;q>32?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(gf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),W$(D,j,!o),x(H$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:se,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(X$,{minWidth:E,maxWidth:T,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Pg(Ge.clamp(Number(w)+me.width,0,Number(T)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ge.clamp(Number(w)+me.width,0,Number(T));ye>=280&&!O?N(!0):ye<280&&O&&N(!1),ye>=T?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(Eo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Kn,{children:[x(aa,{"data-selected":r==="result",onClick:()=>e(Iy("result")),children:"Invocations"}),x(aa,{"data-selected":r==="user",onClick:()=>e(Iy("user")),children:"User"})]}):ee(Kn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(_4e,{}),onClick:()=>e(Iy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(H4e,{}),onClick:()=>e(Iy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(M_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ch,{value:l,onChange:re,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(gf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ia,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(B5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Ia,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e($5e(q.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?x(z$,{}):x(B$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Kn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(MSe,{image:q,isSelected:i===Q},Q)})}),x(aa,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(c$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const RSe=Xe([e=>e.options,rn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,activeTabName:t,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),tx=e=>{const t=Fe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,activeTabName:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ce(RSe),u=()=>{t(l7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{u()},{enabled:l},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,l&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:u,children:x(Y5e,{})})})]}),!s&&x(TH,{})]})})};function NSe(){return x(tx,{optionsPanel:x(A5e,{}),children:x(K5e,{})})}const DSe=Xe(Yt,e=>e.shouldDarkenOutsideBoundingBox);function zSe(){const e=Fe(),t=Ce(DSe);return x(Ia,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(L$(!t))},styleClass:"inpainting-bounding-box-darken"})}const BSe=Xe(Yt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=Fe(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(BSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(qg({...a,width:Math.floor(g)})),t=="height"&&r(qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(qg({...a,width:Math.floor(s)})),t=="height"&&r(qg({...a,height:Math.floor(s)}))};return x(ch,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const FSe=Xe(Yt,e=>e.shouldLockBoundingBox);function $Se(){const e=Ce(FSe),t=Fe();return x(Ia,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(A$(!e))},styleClass:"inpainting-bounding-box-darken"})}const HSe=Xe(Yt,e=>e.shouldShowBoundingBox);function WSe(){const e=Ce(HSe),t=Fe();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(r$,{size:22}):x(n$,{size:22}),onClick:()=>t(O_(!e)),background:"none",padding:0})}const VSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(WSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(an,{alignItems:"center",justifyContent:"space-between",children:[x(zSe,{}),x($Se,{})]})]})]}),USe=Xe(Yt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function jSe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(USe),n=Fe();return ee(an,{alignItems:"center",columnGap:"1rem",children:[x(ch,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(o5e(r.target.checked))})]})}const GSe=Xe(Yt,e=>{const{pastObjects:t,futureObjects:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function qSe(){const e=Fe(),t=xd(),{mayClearBrushHistory:n}=Ce(GSe);return x(ou,{onClick:()=>{e(i5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function LH(){return ee(Kn,{children:[x(jSe,{}),x(VSe,{}),x(qSe,{})]})}function KSe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}function nx(){return(nx=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function t8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var B0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(aI(i.current,P,s.current)):w(!1)},b=function(){return w(!1)};function w(P){var E=l.current,k=n8(i.current),T=P?k.addEventListener:k.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",b)}return[function(P){var E=P.nativeEvent,k=i.current;if(k&&(sI(E),!function(I,O){return O&&!Pm(I)}(E,l.current)&&k)){if(Pm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(aI(k,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...nx({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),rx=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=rx(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},IH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},r8=function(e){var t=IH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},x6=function(e){var t=IH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},YSe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},ZSe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},XSe=le.memo(function(e){var t=e.hue,n=e.onChange,r=rx(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:B0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:r8({h:t,s:100,v:100,a:1})})))}),QSe=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:r8({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:B0(t.s+100*i.left,0,100),v:B0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:r8(t)})))}),MH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function JSe(e,t,n){var r=t8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;MH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var e6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,t6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,n6e=function(e){e6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,lI.set(t,n);var r=t6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},r6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+x6(Object.assign({},n,{a:0}))+", "+x6(Object.assign({},n,{a:1}))+")"},o=rx(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:B0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:x6(n)})))},i6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);n6e(s);var l=JSe(n,i,o),u=l[0],h=l[1],g=rx(["react-colorful",t]);return le.createElement("div",nx({},a,{ref:s,className:g}),x(QSe,{hsva:u,onChange:h}),x(XSe,{hue:u.h,onChange:h}),le.createElement(r6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},o6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:ZSe,fromHsva:YSe,equal:MH},a6e=function(e){return le.createElement(i6e,nx({},e,{colorModel:o6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(a6e,{className:`invokeai__color-picker ${t}`,...n})},s6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function l6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(s6e),r=Fe(),i=o=>{r(_$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(gt,{"aria-label":"Mask Color",icon:x(A4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const u6e=Xe([Yt,rn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function c6e(){const e=Fe(),{tool:t,brushSize:n,activeTabName:r}=Ce(u6e),i=()=>e(Su("brush")),o=()=>{e(d6(!0))},a=()=>{e(d6(!1))},s=l=>{e(d6(!0)),e(x$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(ch,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(l6e,{})]})})}const d6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function f6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(d6e),r=Fe(),i=()=>r(Su("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(gt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(g$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const h6e=Xe([Yt,rn],(e,t)=>{const{pastObjects:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function OH(){const e=Fe(),{canUndo:t,activeTabName:n}=Ce(h6e),r=()=>{e(n5e())};return vt(["meta+z","control+z"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Undo",tooltip:"Undo",icon:x(F4e,{}),onClick:r,isDisabled:!t})}const p6e=Xe([Yt,rn],(e,t)=>{const{futureObjects:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function RH(){const e=Fe(),{canRedo:t,activeTabName:n}=Ce(p6e),r=()=>{e(r5e())};return vt(["meta+shift+z","control+shift+z","control+y","meta+y"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Redo",tooltip:"Redo",icon:x(N4e,{}),onClick:r,isDisabled:!t})}const g6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,objects:r}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(Ub).length===0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function m6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(g6e),r=Fe(),i=xd(),o=()=>{r(k$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(gt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(M4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const v6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function y6e(){const e=Fe(),{isMaskEnabled:t,activeTabName:n}=Ce(v6e),r=()=>e(C$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(gt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(r$,{size:22}):x(n$,{size:22}),onClick:r})}const b6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function x6e(){const{shouldInvertMask:e,isMaskEnabled:t,activeTabName:n}=Ce(b6e),r=Fe(),i=()=>r(e5e(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(gt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(a4e,{size:22}):x(s4e,{size:22}),onClick:i,isDisabled:!t})}const S6e=Xe(Yt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),w6e=()=>{const e=Fe(),{shouldLockBoundingBox:t}=Ce(S6e);return x(gt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(P4e,{}):x($4e,{}),"data-selected":t,onClick:()=>{e(A$(!t))}})},C6e=Xe(Yt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_6e=()=>{const e=Fe(),{shouldShowBoundingBox:t}=Ce(C6e);return x(gt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(W4e,{}),"data-alert":!t,onClick:()=>{e(O_(!t))}})},k6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function E6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(k6e),r=Fe(),i=()=>r(Su("eraser"));return vt("shift+e",o=>{o.preventDefault(),i()},{enabled:!0},[n,t]),x(gt,{"aria-label":"Erase Canvas (Shift+E)",tooltip:"Erase Canvas (Shift+E)",icon:x(C5e,{}),fontSize:18,onClick:i,"data-selected":e==="eraser",isDisabled:!t})}var P6e=Math.PI/180;function T6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const v0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:v0,version:"8.3.13",isBrowser:T6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*P6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:v0.document,_injectGlobal(e){v0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var L6e="[object Array]",A6e="[object Number]",I6e="[object String]",M6e="[object Boolean]",O6e=Math.PI/180,R6e=180/Math.PI,S6="#",N6e="",D6e="0",z6e="Konva warning: ",uI="Konva error: ",B6e="rgb(",w6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},F6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,By=[];const $6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===L6e},_isNumber(e){return Object.prototype.toString.call(e)===A6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===I6e},_isBoolean(e){return Object.prototype.toString.call(e)===M6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){By.push(e),By.length===1&&$6e(function(){const t=By;By=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(S6,N6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=D6e+e;return S6+e},getRGB(e){var t;return e in w6?(t=w6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===S6?this._hexToRgb(e.substring(1)):e.substr(0,4)===B6e?(t=F6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=w6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function DH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function t1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function zH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function H6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ts(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function W6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Tg="get",Lg="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Tg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Tg+a(t),l=Lg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Lg+n,i=Tg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Tg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Tg+fe._capitalize(n),a=Lg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function V6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=U6e+u.join(cI)+j6e)):(o+=s.property,t||(o+=Z6e+s.val)),o+=K6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Q6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=V6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var I3="absoluteOpacity",$y="allEventListeners",ru="absoluteTransform",fI="absoluteScale",Ag="canvas",nwe="Change",rwe="children",iwe="konva",i8="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",M3=" ",vI="stage",kc="transform",owe="Stage",o8="visible",awe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M3);let swe=1;class Be{constructor(t){this._id=swe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(M3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ag)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ag),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new y0({pixelRatio:a,width:i,height:o}),v=new y0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),P=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Ag),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(I3),this._clearSelfAndDescendantCache(fI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ag,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ag)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==rwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==owe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(I3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",kp=e=>{const t=Qg(e);if(t==="pointer")return ot.pointerEventsEnabled&&_6.pointer;if(t==="touch")return _6.touch;if(t==="mouse")return _6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const pwe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",O3=[];class ax extends sa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),O3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===uwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&O3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(pwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new y0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+yI,this.content.style.height=n+yI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rfwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||hwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a8,{evt:t}):this._fire(a8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=C6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(jp,Q_(t)),Tm(t.pointerId)}_lostpointercapture(t){Tm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new y0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ax.prototype.nodeType=lwe;gr(ax);Z.addGetterSetter(ax,"container");var XH="hasShadow",QH="shadowRGBA",JH="patternImage",eW="linearGradient",tW="radialGradient";let jy;function k6(){return jy||(jy=fe.createCanvasElement().getContext("2d"),jy)}const Lm={};function gwe(e){e.fill()}function mwe(e){e.stroke()}function vwe(e){e.fill()}function ywe(e){e.stroke()}function bwe(){this._clearCache(XH)}function xwe(){this._clearCache(QH)}function Swe(){this._clearCache(JH)}function wwe(){this._clearCache(eW)}function Cwe(){this._clearCache(tW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Lm)););this.colorKey=n,Lm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(XH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(JH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=k6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(eW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=k6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Lm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,P=v+b*2,E={width:w,height:P,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}}Ie.prototype._fillFunc=gwe;Ie.prototype._strokeFunc=mwe;Ie.prototype._fillFuncHit=vwe;Ie.prototype._strokeFuncHit=ywe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bwe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",xwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Swe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",wwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Cwe);Z.addGetterSetter(Ie,"stroke",void 0,zH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ts());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ts());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ts());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,t1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,zH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var _we="#",kwe="beforeDraw",Ewe="draw",nW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Pwe=nW.length;class fh extends sa{constructor(t){super(t),this.canvas=new y0,this.hitCanvas=new X_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(kwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),sa.prototype.drawScene.call(this,i,n),this._fire(Ewe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),sa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}fh.prototype.nodeType="Layer";gr(fh);Z.addGetterSetter(fh,"imageSmoothingEnabled",!0);Z.addGetterSetter(fh,"clearBeforeDraw",!0);Z.addGetterSetter(fh,"hitGraphEnabled",!0,Ts());class J_ extends fh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class F0 extends sa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}F0.prototype.nodeType="Group";gr(F0);var E6=function(){return v0.performance&&v0.performance.now?function(){return v0.performance.now()}:function(){return new Date().getTime()}}();class Ma{constructor(t,n){this.id=Ma.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:E6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Lwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Am.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Awe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ma(function(){n.tween.onEnterFrame()},u),this.tween=new Iwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Twe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Am={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ts());function l8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function CI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,g,g+m,1-b),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],I=l,O=u,N,D,z,$,W,Y,de,j,te,re;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var se=b.shift(),G=b.shift();if(l+=se,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var V=a.length-2;V>=0;V--)if(a[V].command==="M"){l=a[V].points[0]+se,u=a[V].points[1]+G;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(D,z,l,u);break;case"t":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(D,z,l,u);break;case"A":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break;case"a":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break}a.push({command:k||v,points:T,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,P=b*-l*g/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},I=function(W,Y){return(W[0]*Y[0]+W[1]*Y[1])/(T(W)*T(Y))},O=function(W,Y){return(W[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,k,s,l,N,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class hh extends Au{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}hh.prototype.className="Arrow";gr(hh);Z.addGetterSetter(hh,"pointerLength",10,ze());Z.addGetterSetter(hh,"pointerWidth",10,ze());Z.addGetterSetter(hh,"pointerAtBeginning",!1);Z.addGetterSetter(hh,"pointerAtEnding",!0);class n1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}n1.prototype._centroid=!0;n1.prototype.className="Circle";n1.prototype._attrsAffectingSize=["radius"];gr(n1);Z.addGetterSetter(n1,"radius",0,ze());class Cd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Cd);Z.addComponentsGetterSetter(Cd,"radius",["x","y"]);Z.addGetterSetter(Cd,"radiusX",0,ze());Z.addGetterSetter(Cd,"radiusY",0,ze());class Ls extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";gr(Ls);Z.addGetterSetter(Ls,"image");Z.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);Z.addGetterSetter(Ls,"cropX",0,ze());Z.addGetterSetter(Ls,"cropY",0,ze());Z.addGetterSetter(Ls,"cropWidth",0,ze());Z.addGetterSetter(Ls,"cropHeight",0,ze());var rW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Mwe="Change.konva",Owe="none",u8="up",c8="right",d8="down",f8="left",Rwe=rW.length;class ek extends F0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gh.prototype.className="RegularPolygon";gh.prototype._centroid=!0;gh.prototype._attrsAffectingSize=["radius"];gr(gh);Z.addGetterSetter(gh,"radius",0,ze());Z.addGetterSetter(gh,"sides",0,ze());var _I=Math.PI*2;class mh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}mh.prototype.className="Ring";mh.prototype._centroid=!0;mh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(mh);Z.addGetterSetter(mh,"innerRadius",0,ze());Z.addGetterSetter(mh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ma(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var qy;function T6(){return qy||(qy=fe.createCanvasElement().getContext(zwe),qy)}function Kwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Ywe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Zwe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(Zwe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Bwe,n),this}getWidth(){var t=this.attrs.width===Ep||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Ep||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=T6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Gy+this.fontVariant()+Gy+(this.fontSize()+Wwe)+qwe(this.fontFamily())}_addTextLine(t){this.align()===Ig&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return T6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Ep&&o!==void 0,l=a!==Ep&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==jwe&&b,P=this.ellipsis();this.textArr=[],T6().font=this._getContextFont();for(var E=P?this._getTextWidth(P6):0,k=0,T=t.length;kh)for(;I.length>0;){for(var N=0,D=I.length,z="",$=0;N>>1,Y=I.slice(0,W+1),de=this._getTextWidth(Y)+E;de<=h?(N=W+1,z=Y,$=de):D=W}if(z){if(w){var j,te=I[z.length],re=te===Gy||te===kI;re&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Gy),z.lastIndexOf(kI))+1,j>0&&(N=j,z=z.slice(0,N),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var se=this._shouldHandleEllipsis(m);if(se){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(N),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Ep&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Ep&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+P6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=iW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,re=0;for(v=void 0;Math.abs(j-te)/j>.01&&re<20;){re++;for(var se=te;b===void 0;)b=E(),b&&se+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var V=b.points[4],q=b.points[5],Q=b.points[4]+q;P===0?P=V+1e-8:j>te?P+=Math.PI/180*q/Math.abs(q):P-=Math.PI/360*q/Math.abs(q),(q<0&&P=0&&P>Q)&&(P=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case"C":P===0?j>b.pathLength?P=1e-8:P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength/2:P=Math.max(P-(te-j)/b.pathLength/2,0),P>1&&(P=1,G=!0),v=Nn.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":P===0?P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength:P-=(te-j)/b.pathLength,P>1&&(P=1,G=!0),v=Nn.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},T="C",I=t._getTextSize(T).width+r,O=u/I-1,N=0;Ne+`.${dW}`).join(" "),TI="nodesRect",Jwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],eCe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const tCe="ontouchstart"in ot._global;function nCe(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(eCe[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var t5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function rCe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function iCe(e,t){const n=rCe(e);return fW(e,t,n)}function oCe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Jwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(TI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(TI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return fW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),t5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Zv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:tCe?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=nCe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),se=oCe(this.rotationSnaps(),j,te)-g.rotation,G=iCe(g,se);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,P=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const P=w.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),F0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function aCe(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){t5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+t5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",t5,aCe);Z.addGetterSetter(_n,"flipEnabled",!0,Ts());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Iu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Iu.prototype.className="Wedge";Iu.prototype._centroid=!0;Iu.prototype._attrsAffectingSize=["radius"];gr(Iu);Z.addGetterSetter(Iu,"radius",0,ze());Z.addGetterSetter(Iu,"angle",0,ze());Z.addGetterSetter(Iu,"clockwise",!1);Z.backCompat(Iu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var sCe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],lCe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function uCe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,P,E,k,T,I,O,N,D,z,$,W,Y,de,j=t+t+1,te=r-1,re=i-1,se=t+1,G=se*(se+1)/2,V=new AI,q=null,Q=V,X=null,me=null,ye=sCe[t],Se=lCe[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=o+((l=a+se)0&&uCe(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const dCe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const hCe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var k=b+(w-1+E)*4,T=s[P]-s[k],I=s[P+1]-s[k+1],O=s[P+2]-s[k+2],N=T,D=N>0?N:-N,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(N=I),$>D&&(N=O),N*=t,i){var W=s[P]+N,Y=s[P+1]+N,de=s[P+2]+N;s[P]=W>255?255:W<0?0:W,s[P+1]=Y>255?255:Y<0?0:Y,s[P+2]=de>255?255:de<0?0:de}else{var j=n-N;j<0?j=0:j>255&&(j=255),s[P]=s[P+1]=s[P+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function L6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const pCe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,P,E,k,T,I,O,N;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),N=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),P=r+v*(r-b),E=(s+a)*.5,k=s+v*(s-E),T=a+v*(a-E),I=(h+u)*.5,O=h+v*(h-I),N=u+v*(u-I)),m=0;mE?P:E;var k=a,T=o,I,O,N=360/T*Math.PI/180,D,z;for(O=0;OT?k:T;var I=a,O=o,N,D,z=n.polarRotation||0,$,W;for(h=0;ht&&(I=T,O=0,N=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function PCe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const ICe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);const OCe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const RCe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},DCe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;iae||L[H]!==M[ae]){var he=` +`+L[H].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=ae);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Nl(d):""}var Sh=Object.prototype.hasOwnProperty,Nu=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Nu[Rs],Nu[Rs]=null,Rs--)}function bn(d,f){Rs++,Nu[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},M;for(M in y)L[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function zl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ld(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=zl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,wh=Math.log,Ch=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(wh(d)/Ch|0)|0}var Ds=64,uo=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Bl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var ae=H&~L;ae!==0?_=zs(ae):(M&=H,M!==0&&(_=zs(M)))}else H=y&~L,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,M=f&-f,L>=M||L===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function va(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Gi=1<<32-gi(f)+L|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var qt=Ye(ge,kt,be[Ft],We);if(qt===null){kt===null&&(kt=Br);break}d&&kt&&qt.alternate===null&&f(ge,kt),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,qt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Lt===null?Te=ns:Lt.sibling=ns,Lt=ns,kt=Br}if(qt.done)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;!qt.done;Ft++,qt=be.next())qt=Tt(ge,qt.value,We),qt!==null&&(ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return zn&&Bs(ge,Ft),Te}for(kt=_(ge,kt);!qt.done;Ft++,qt=be.next())qt=Fn(kt,ge,Ft,qt.value,We),qt!==null&&(d&&qt.alternate!==null&&kt.delete(qt.key===null?Ft:qt.key),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Te}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=be.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=L(Lt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&E1(Te)===Lt.type){y(ge,Lt.sibling),ue=L(Lt,be.props),ue.ref=xa(ge,Lt,be),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=sf(be.type,be.key,be.props,null,ge.mode,We),We.ref=xa(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Lt=be.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=L(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case T:return Lt=be._init,Ko(ge,ue,Lt(be._payload),We)}if(re(be))return Tn(ge,ue,be,We);if(N(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=L(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=cp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var Gu=l2(!0),u2=l2(!1),Vd={},po=No(Vd),Sa=No(Vd),ie=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){bn(ie,f),bn(Sa,d),bn(po,Vd),d=G(f),Pn(po),bn(po,d)}function Ke(){Pn(po),Pn(Sa),Pn(ie)}function _t(d){var f=xe(ie.current),y=xe(po.current);f=V(y,d.type,f),y!==f&&(bn(Sa,d),bn(po,f))}function Jt(d){Sa.current===d&&(Pn(po),Pn(Sa))}var Ot=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ou(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function P1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function ec(){return yi().memoizedState}function N1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},nc(d))rc(f,y);else if(y=ju(d,f,y,_),y!==null){var L=ai();vo(y,d,_,L),Zd(y,f,_)}}function tc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(nc(d))rc(f,L);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,ae=M(H,y);if(L.hasEagerState=!0,L.eagerState=ae,U(ae,H)){var he=f.interleaved;he===null?(L.next=L,Hd(f)):(L.next=he.next,he.next=L),f.interleaved=L;return}}catch{}finally{}y=ju(d,f,L,_),y!==null&&(L=ai(),vo(y,d,_,L),Zd(y,f,_))}}function nc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function rc(d,f){jd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Zd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Fl(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},fx={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:f2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Vl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Vl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Vl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=N1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:d2,useDebugValue:M1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=d2(!1),f=d[0];return d=R1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,L=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Wl&30)!==0||I1(_,f,y)}L.memoizedState=y;var M={value:y,getSnapshot:f};return L.queue=M,f2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Kd(9,Qu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=ya,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0ep&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),ac(L,!0),L.tail===null&&L.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-L.renderingStartTime>ep&&y!==1073741824&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304);L.isBackwards?(M.sibling=f.child,f.child=M):(d=L.last,d!==null?d.sibling=M:f.child=M,L.last=M)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return gc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function V1(d,f){switch(w1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),P1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Wu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,yx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function sc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Hh=!1;function jl(d,f){for(q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),L);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:at&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ae){Un(d,d.return,ae)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Hh,Hh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var M=L.destroy;L.destroy=void 0,M!==void 0&&Uo(f,y,M)}L=L.next}while(L!==_)}}function Wh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Vh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=se(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function U1(d){var f=d.alternate;f!==null&&(d.alternate=null,U1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function lc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||lc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Uh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(Uh(d,f,y),d=d.sibling;d!==null;)Uh(d,f,y),d=d.sibling}function j1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(j1(d,f,y),d=d.sibling;d!==null;)j1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||sc(y,f);case 6:if(at){var _=br,L=jo;br=null,Go(d,f,y),br=_,jo=L,br!==null&&(jo?rt(br,y.stateNode):pt(br,y.stateNode))}else Go(d,f,y);break;case 18:at&&br!==null&&(jo?v1(br,y.stateNode):m1(br,y.stateNode));break;case 4:at?(_=br,L=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=L):(At&&(_=y.stateNode.containerInfo,L=ma(_),Mu(_,L)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var M=L,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),L=L.next}while(L!==_)}Go(d,f,y);break;case 1:if(!Pr&&(sc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(ae){Un(y,f,ae)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function jh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new yx),f.forEach(function(_){var L=A2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Yh:return":has("+(K1(d)||"")+")";case Zh:return'[role="'+d.value+'"]';case Xh:return'"'+d.value+'"';case uc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function cc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~M}if(_=L,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*bx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?rp.bind(null,d):null}function ip(d,f){var y=hc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=mc(d,f),d!==2&&(f=xi,xi=y,f!==null&&op(f)),d}function op(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,tp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var M=Qe,H=M.child;if((Qe.flags&16)!==0){var ae=M.deletions;if(ae!==null){for(var he=0;heWn()-X1?Ys(d,0):Z1|=y),Yr(d,f)}function ng(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(va(d,f,y),Yr(d,y))}function Sx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ng(d,y)}function A2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ng(d,y)}var rg;rg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,mx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&S1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;wa(d,f),d=f.pendingProps;var L=Ns(f,kr.current);Uu(f,y),L=L1(null,f,_,d,L,y);var M=Yu();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,_1(f),L.updater=Ho,f.stateNode=L,L._reactInternals=f,k1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(wa(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=lp(_),d=Fo(_,d),L){case 0:f=B1(null,f,_,d,y);break e;case 1:f=S2(null,f,_,d,y);break e;case 11:f=v2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),B1(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),S2(d,f,_,L,y);case 3:e:{if(w2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,L=M.element,i2(d,f),Mh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){L=ic(Error(a(423)),f),f=C2(d,f,_,y,L);break e}else if(_!==L){L=ic(Error(a(424)),f),f=C2(d,f,_,y,L);break e}else for(wt&&(fo=u1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,ho=!1),y=u2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Wu(),_===L){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Nd(f),_=f.type,L=f.pendingProps,M=d!==null?d.memoizedProps:null,H=L.children,He(_,L)?H=null:M!==null&&He(_,M)&&(f.flags|=32),x2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return _2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Gu(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),v2(d,f,_,L,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,M=f.memoizedProps,H=L.value,r2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===L.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var ae=M.dependencies;if(ae!==null){H=M.child;for(var he=ae.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var nt=Re.pending;nt===null?he.next=he:(he.next=nt.next,nt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),$d(M.return,y,f),ae.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,ae=H.alternate,ae!==null&&(ae.lanes|=y),$d(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Uu(f,y),L=qi(L),_=_(L),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,L=Fo(_,f.pendingProps),L=Fo(_.type,L),Ws(d,f,_,L,y);case 15:return y2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),wa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Uu(f,y),a2(f,_,L),k1(f,_,L,y),Wo(null,f,_,!0,d,y);case 19:return E2(d,f,y);case 22:return b2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Fu(d,f)}function Ca(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ca(d,f,y,_)}function ig(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lp(d){if(typeof d=="function")return ig(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,_,L,M){var H=2;if(_=d,typeof d=="function")ig(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,L,M,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=M,d;case P:return d=yo(13,y,f,L),d.elementType=P,d.lanes=M,d;case E:return d=yo(19,y,f,L),d.elementType=E,d.lanes=M,d;case I:return up(y,L,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function up(d,f,y,_){return d=yo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function cp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=et,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=L,wt&&(this.mutableSourceEagerHydrationData=null)}function I2(d,f,y,_,L,M,H,ae,he){return d=new lf(d,f,y,ae,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=yo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},_1(M),d}function og(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return zl(d,y,f)}return f}function ag(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Tt&&L<=nt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Tt||y.height!==he.height||nt<_||Re>L)){Re>_&&(he.width+=Re-_,he.x=_),ntM&&(he.height+=Tt-M,he.y=M),Yey&&(y=H)),H ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return se(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:dp,findFiberByHostInstance:d.findFiberByHostInstance||sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=Y1(d,f);var L=Gt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,M=ai(),H=Ar(L);return y=og(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(L,f,H),d!==null&&(vo(d,L,H,M),Ih(d,L,H)),H},n};(function(e){e.exports=zCe})(hW);const BCe=A8(hW.exports);var tk={exports:{}},vh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */vh.ConcurrentRoot=1;vh.ContinuousEventPriority=4;vh.DefaultEventPriority=16;vh.DiscreteEventPriority=1;vh.IdleEventPriority=536870912;vh.LegacyRoot=0;(function(e){e.exports=vh})(tk);const II={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let MI=!1,OI=!1;const nk=".react-konva-event",FCe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,$Ce=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,HCe={};function sx(e,t,n=HCe){if(!MI&&"zIndex"in t&&(console.warn($Ce),MI=!0),!OI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(FCe),OI=!0)}for(var o in n)if(!II[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!II[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),kd(e));for(var l in v)e.on(l+nk,v[l])}function kd(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const pW={},WCe={};Jf.Node.prototype._applyProps=sx;function VCe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function UCe(e,t,n){let r=Jf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Jf.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return sx(l,o),l}function jCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function GCe(e,t,n){return!1}function qCe(e){return e}function KCe(){return null}function YCe(){return null}function ZCe(e,t,n,r){return WCe}function XCe(){}function QCe(e){}function JCe(e,t){return!1}function e8e(){return pW}function t8e(){return pW}const n8e=setTimeout,r8e=clearTimeout,i8e=-1;function o8e(e,t){return!1}const a8e=!1,s8e=!0,l8e=!0;function u8e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function c8e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function gW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function d8e(e,t,n){gW(e,t,n)}function f8e(e,t){t.destroy(),t.off(nk),kd(e)}function h8e(e,t){t.destroy(),t.off(nk),kd(e)}function p8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function g8e(e,t,n){}function m8e(e,t,n,r,i){sx(e,i,r)}function v8e(e){e.hide(),kd(e)}function y8e(e){}function b8e(e,t){(t.visible==null||t.visible)&&e.show()}function x8e(e,t){}function S8e(e){}function w8e(){}const C8e=()=>tk.exports.DefaultEventPriority,_8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:VCe,createInstance:UCe,createTextInstance:jCe,finalizeInitialChildren:GCe,getPublicInstance:qCe,prepareForCommit:KCe,preparePortalMount:YCe,prepareUpdate:ZCe,resetAfterCommit:XCe,resetTextContent:QCe,shouldDeprioritizeSubtree:JCe,getRootHostContext:e8e,getChildHostContext:t8e,scheduleTimeout:n8e,cancelTimeout:r8e,noTimeout:i8e,shouldSetTextContent:o8e,isPrimaryRenderer:a8e,warnsIfNotActing:s8e,supportsMutation:l8e,appendChild:u8e,appendChildToContainer:c8e,insertBefore:gW,insertInContainerBefore:d8e,removeChild:f8e,removeChildFromContainer:h8e,commitTextUpdate:p8e,commitMount:g8e,commitUpdate:m8e,hideInstance:v8e,hideTextInstance:y8e,unhideInstance:b8e,unhideTextInstance:x8e,clearContainer:S8e,detachDeletedInstance:w8e,getCurrentEventPriority:C8e,now:Gp.exports.unstable_now,idlePriority:Gp.exports.unstable_IdlePriority,run:Gp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var k8e=Object.defineProperty,E8e=Object.defineProperties,P8e=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,T8e=Object.prototype.hasOwnProperty,L8e=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?k8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))T8e.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))L8e.call(t,n)&&NI(e,n,t[n]);return e},A8e=(e,t)=>E8e(e,P8e(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function mW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=mW(C.exports.createContext(null));class vW extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:I8e,ReactCurrentDispatcher:M8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O8e(){const e=C.exports.useContext(ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=I8e.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Rg=[],zI=new WeakMap;function R8e(){var e;const t=O8e();Rg.splice(0,Rg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Rg.push(mW(i))});for(const n of Rg){const r=(e=M8e.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Rg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,A8e(DI({},i),{value:zI.get(r)}))),n=>x(vW,{...DI({},n)})),[])}function N8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const D8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=N8e(e),o=R8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new Jf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Jg.createContainer(n.current,tk.exports.LegacyRoot,!1,null),Jg.updateContainer(x(o,{children:e.children}),r.current),()=>{!Jf.isBrowser||(a(null),Jg.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sx(n.current,e,i),Jg.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Yy="Layer",Xv="Group",R3="Rect",Ng="Circle",n5="Line",r5="Image",z8e="Transformer",Jg=BCe(_8e);Jg.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const B8e=le.forwardRef((e,t)=>x(vW,{children:x(D8e,{...e,forwardedRef:t})})),F8e=Xe(Yt,e=>{const{objects:t}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$8e=e=>{const{...t}=e,{objects:n}=Ce(F8e);return x(Xv,{listening:!1,...t,children:n.filter(Ub).map((r,i)=>x(n5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},H8e=Xe(Yt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?a:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(H8e);return l?ee(Xv,{listening:!1,...t,children:[x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},V8e=Xe(Yt,Gv,qv,rn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,shouldLockBoundingBox:l,isDrawing:u,isTransformingBoundingBox:h,isMovingBoundingBox:g,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,tool:b,stageCoordinates:w}=e,{shouldSnapToGrid:P}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:u,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,isMovingBoundingBox:g,isTransformingBoundingBox:h,shouldLockBoundingBox:l,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:P,tool:b,stageCoordinates:w,boundingBoxStrokeWidth:(m?8:1)/s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U8e=e=>{const{...t}=e,n=Fe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,shouldLockBoundingBox:h,stageCoordinates:g,stageDimensions:m,stageScale:v,baseCanvasImage:b,activeTabName:w,shouldSnapToGrid:P,tool:E,boundingBoxStrokeWidth:k}=Ce(V8e),T=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!T.current||!I.current||(T.current.nodes([I.current]),T.current.getLayer()?.batchDraw())},[h]);const O=64*v,N=C.exports.useCallback(G=>{if(w==="inpainting"||!P){n(f6({x:G.target.x(),y:G.target.y()}));return}const V=G.target.x(),q=G.target.y(),Q=Ty(V,64),X=Ty(q,64);G.target.x(Q),G.target.y(X),n(f6({x:Q,y:X}))},[w,n,P]),D=C.exports.useCallback(G=>{if(!b)return r;const{x:V,y:q}=G,Q=m.width-i.width*v,X=m.height-i.height*v,me=Math.floor(Ge.clamp(V,0,Q)),ye=Math.floor(Ge.clamp(q,0,X));return{x:me,y:ye}},[b,r,m.width,m.height,i.width,i.height,v]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,V=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*V),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(qg({width:Q,height:X})),n(f6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,V,q)=>{const Q=G.x%O,X=G.y%O,me=Ty(V.x,O)+Q,ye=Ty(V.y,O)+X,Se=Math.abs(V.x-me),He=Math.abs(V.y-ye),Ue=Se!b||V.width+V.x>m.width||V.height+V.y>m.height||V.x<0||V.y<0?G:V,[b,m]),Y=()=>{n(h6(!0))},de=()=>{n(h6(!1)),n(Ly(!1))},j=()=>{n(IA(!0))},te=()=>{n(h6(!1)),n(IA(!1)),n(Ly(!1))},re=()=>{n(Ly(!0))},se=()=>{!u&&!l&&n(Ly(!1))};return ee(Xv,{...t,children:[x(R3,{offsetX:g.x/v,offsetY:g.y/v,height:m.height/v,width:m.width/v,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R3,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R3,{dragBoundFunc:w==="inpainting"?D:void 0,draggable:!0,fillEnabled:E==="move",height:i.height,listening:!o&&E==="move",onDragEnd:te,onDragMove:N,onMouseDown:j,onMouseOut:se,onMouseOver:re,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:k,width:i.width,x:r.x,y:r.y}),x(z8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:W,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:T,rotateEnabled:!1})]})},j8e=Xe([e=>e.options,Yt,rn],(e,t,n)=>{const{isMaskEnabled:r,cursorPosition:i,shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}=t;return{activeTabName:n,isMaskEnabled:r,isCursorOnCanvas:Boolean(i),shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G8e=()=>{const e=Fe(),{isMaskEnabled:t,activeTabName:n,shouldShowBoundingBox:r,tool:i}=Ce(j8e),o=C.exports.useRef(null);vt("shift+w",a=>{a.preventDefault(),e(a5e())},{enabled:!0},[n]),vt("shift+h",a=>{a.preventDefault(),e(O_(!r))},{enabled:!0},[n,r]),vt(["space"],a=>{a.repeat||i!=="move"&&(o.current=i,e(Su("move")))},{keyup:!1,keydown:!0},[i,o]),vt(["space"],a=>{a.repeat||i==="move"&&o.current&&o.current!=="move"&&(e(Su(o.current)),o.current="move")},{keyup:!0,keydown:!1},[i,o])},q8e=Xe(Yt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),K8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(q8e);return x(R3,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:n,globalCompositeOperation:"source-in",listening:!1,...t})},Y8e=.999,Z8e=.1,X8e=20,Q8e=Xe([rn,Yt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),J8e=e=>{const t=Fe(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(Q8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ge.clamp(r*Y8e**l,Z8e,X8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(T$(u)),t(I$(h))},[i,t,n,e,r])},lx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},e9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),t9e=e=>{const t=Fe(),{tool:n}=Ce(e9e);return C.exports.useCallback(r=>{if(!e.current)return;if(n==="move"){t(K4(!0));return}const i=lx(e.current);!i||(r.evt.preventDefault(),t(jb(!0)),t(S$([i.x,i.y])))},[e,t,n])},n9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),r9e=(e,t)=>{const n=Fe(),{tool:r,isDrawing:i}=Ce(n9e);return C.exports.useCallback(()=>{if(r==="move"){n(K4(!1));return}if(!t.current&&i&&e.current){const o=lx(e.current);if(!o)return;n(w$([o.x,o.y]))}else t.current=!1;n(jb(!1))},[t,n,i,e,r])},i9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),o9e=(e,t,n)=>{const r=Fe(),{isDrawing:i,tool:o}=Ce(i9e);return C.exports.useCallback(()=>{if(!e.current)return;const a=lx(e.current);!a||(r(E$(a)),n.current=a,!(!i||o==="move")&&(t.current=!0,r(w$([a.x,a.y]))))},[t,r,i,n,e,o])},a9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),s9e=e=>{const t=Fe(),{tool:n}=Ce(a9e);return C.exports.useCallback(r=>{if(r.evt.buttons!==1||!e.current)return;const i=lx(e.current);!i||n==="move"||(t(jb(!0)),t(S$([i.x,i.y])))},[e,n,t])},l9e=()=>{const e=Fe();return C.exports.useCallback(()=>{e(E$(null)),e(jb(!1))},[e])},u9e=Xe([Yt,rn],(e,t)=>{const{tool:n}=e;return{tool:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),c9e=()=>{const e=Fe(),{tool:t,activeTabName:n}=Ce(u9e);return{handleDragStart:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!0))},[n,e,t]),handleDragMove:C.exports.useCallback(r=>{t!=="move"||n!=="outpainting"||e(I$(r.target.getPosition()))},[n,e,t]),handleDragEnd:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!1))},[n,e,t])}};var mf=C.exports,d9e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const f9e=e=>{const{url:t,x:n,y:r}=e,[i]=d9e(t);return x(r5,{x:n,y:r,image:i,listening:!1})},h9e=Xe([e=>e.canvas],e=>({objects:e.currentCanvas==="outpainting"?e.outpainting.objects:void 0}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),p9e=()=>{const{objects:e}=Ce(h9e);return e?x(Xv,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(K4e(t))return x(f9e,{x:t.x,y:t.y,url:t.image.url},n);if(q4e(t))return x(n5,{points:t.points,stroke:t.color?ok(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},g9e=Xe([Yt],e=>e.stageScale,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),m9e=()=>{const e=Ce(g9e);return t=>t/e},v9e=()=>{const{colorMode:e}=Ev(),t=m9e();if(!au.current)return null;const n=e==="light"?"rgba(0,0,0,0.3)":"rgba(255,255,255,0.3)",r=au.current,i=r.width(),o=r.height(),a=r.x(),s=r.y(),l={x1:0,y1:0,x2:i,y2:o,offset:{x:t(a),y:t(s)}},u={x:Math.ceil(t(a)/64)*64,y:Math.ceil(t(s)/64)*64},h={x1:-u.x,y1:-u.y,x2:t(i)-u.x+64,y2:t(o)-u.y+64},m={x1:Math.min(l.x1,h.x1),y1:Math.min(l.y1,h.y1),x2:Math.max(l.x2,h.x2),y2:Math.max(l.y2,h.y2)},v=m.x2-m.x1,b=m.y2-m.y1,w=Math.round(v/64)+1,P=Math.round(b/64)+1;return ee(Xv,{children:[Ge.range(0,w).map(E=>x(n5,{x:m.x1+E*64,y:m.y1,points:[0,0,0,b],stroke:n,strokeWidth:1},`x_${E}`)),Ge.range(0,P).map(E=>x(n5,{x:m.x1,y:m.y1+E*64,points:[0,0,v,0],stroke:n,strokeWidth:1},`y_${E}`))]})},y9e=Xe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),b9e=e=>{const{...t}=e,n=Ce(y9e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(r5,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Dg=e=>Math.round(e*100)/100,x9e=Xe([Yt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),S9e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(x9e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Dg(n)}, ${Dg(r)}`}),x("div",{children:`Scale: ${Dg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Dg(a)}, ${Dg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})},w9e=Xe([Yt,Gv,qv,rn],(e,t,n,r)=>{const{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,isTransformingBoundingBox:h,isMouseOverBoundingBox:g,isMovingBoundingBox:m,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,tool:P,isMovingStage:E}=e,{shouldShowGrid:k}=t;let T="";return P==="move"?h?T=void 0:g?T="move":E?T="grabbing":T="grab":T="none",{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,shouldShowGrid:k,isTransformingBoundingBox:h,isModifyingBoundingBox:h||m,stageCursor:T,isMouseOverBoundingBox:g,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,activeTabName:r,baseCanvasImage:n,tool:P}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});let au,dl,h8;const yW=()=>{const e=Fe(),{shouldInvertMask:t,isMaskEnabled:n,shouldShowCheckboardTransparency:r,stageScale:i,shouldShowBoundingBox:o,isModifyingBoundingBox:a,stageCursor:s,stageDimensions:l,stageCoordinates:u,shouldShowGrid:h,activeTabName:g,baseCanvasImage:m,tool:v}=Ce(w9e);G8e();const b=xd();au=C.exports.useRef(null),dl=C.exports.useRef(null),h8=C.exports.useRef(null);const w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),[E,k]=C.exports.useState(null),T=J8e(au),I=t9e(au),O=r9e(au,P),N=o9e(au,P,w),D=s9e(au),z=l9e(),{handleDragStart:$,handleDragMove:W,handleDragEnd:Y}=c9e();return C.exports.useEffect(()=>{if(m){const de=new Image;de.onload=()=>{h8.current=de,k(de)},de.onerror=()=>{b({title:"Unable to Load Image",description:`Image ${m.url} failed to load`,status:"error",isClosable:!0}),e(t5e())},de.src=m.url}else k(null)},[m,e,i,b]),x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(B8e,{ref:au,style:{...s?{cursor:s}:{}},className:"inpainting-canvas-stage checkerboard",x:u.x,y:u.y,width:l.width,height:l.height,scale:{x:i,y:i},onMouseDown:I,onMouseEnter:D,onMouseLeave:z,onMouseMove:N,onMouseOut:z,onMouseUp:O,onDragStart:$,onDragMove:W,onDragEnd:Y,onWheel:T,listening:v==="move"&&!a&&g==="outpainting",draggable:v==="move"&&!a&&g==="outpainting",children:[x(Yy,{visible:h,children:x(v9e,{})}),ee(Yy,{id:"image-layer",ref:dl,listening:!1,imageSmoothingEnabled:!1,children:[x(p9e,{}),x(b9e,{})]}),ee(Yy,{id:"mask-layer",visible:n,listening:!1,children:[x($8e,{visible:!0,listening:!1}),x(K8e,{listening:!1}),E&&ee(Kn,{children:[x(r5,{image:E,listening:!1,globalCompositeOperation:"source-in",visible:t}),x(r5,{image:E,listening:!1,globalCompositeOperation:"source-out",visible:!t&&r})]})]}),ee(Yy,{id:"preview-layer",children:[x(U8e,{visible:o}),x(W8e,{visible:v!=="move",listening:!1})]})]}),x(S9e,{})]})})},C9e=Xe([Gv,e=>e.options,rn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_9e=()=>{const e=Fe(),{activeTabName:t,boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:i}=Ce(C9e);return ee("div",{className:"inpainting-settings",children:[ee(Eo,{isAttached:!0,children:[x(c6e,{}),x(f6e,{}),t==="outpainting"&&x(E6e,{})]}),ee(Eo,{isAttached:!0,children:[x(y6e,{}),x(x6e,{}),x(w6e,{}),x(_6e,{}),x(m6e,{})]}),x(gt,{"aria-label":"Save",tooltip:"Save",icon:x(v$,{}),onClick:()=>{e(R_(dl))},fontSize:20}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(Z$,{})})]})},k9e=Xe(e=>e.canvas,qv,rn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),bW=()=>{const e=Fe(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(k9e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const o=i.current.clientWidth,a=i.current.clientHeight,s=Math.min(1,Math.min(o/r.width,a/r.height));e(T$(s)),n==="inpainting"?e(LA({width:Math.floor(r.width*s),height:Math.floor(r.height*s)})):n==="outpainting"&&e(LA({width:Math.floor(o),height:Math.floor(a)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(zv,{thickness:"2px",speed:"1s",size:"xl"})})},E9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,inpainting:{imageToInpaint:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,imageToInpaint:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),P9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,imageToInpaint:r}=Ce(E9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(_9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function T9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("inpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(KSe,{}),styleClass:"inpainting-workarea-overrides",children:x(P9e,{})})}function L9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const A9e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function I9e(){return x(tx,{optionsPanel:x(L9e,{}),children:x(A9e,{})})}var xW={exports:{}},i5={};const SW=Wq(fZ);var ui=SW.jsx,Zy=SW.jsxs;Object.defineProperty(i5,"__esModule",{value:!0});var Ec=C.exports;function wW(e,t){return(wW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var A6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,wW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);A6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},i5.PanViewer=A6,i5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],P=Ec.useState(!1),E=P[0],k=P[1];return Ec.createElement("div",null,Zy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!E)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(A6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(T,I){a(T),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(E?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=i5})(xW);function M9e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},P=()=>{l>=.5&&u(l-.2)},E=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},T=()=>{v(!m)},I=(O,N)=>{o(O),s(N)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(k3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(gt,{icon:x(E3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:P,fontSize:20}),x(gt,{icon:x(C3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:E,fontSize:20}),x(gt,{icon:x(_3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(gt,{icon:x(l4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:T,fontSize:20}),x(gt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(xW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function O9e(){const e=Fe(),t=Ce(m=>m.options.isLightBoxOpen),{imageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(w3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(U$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&x(M9e,{image:n.url,styleClass:"lightbox-image"})]}),x(TH,{})]})]})}function R9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}const N9e=Xe([Yt,Gv],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),D9e=()=>{const e=Fe(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(N9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(M_,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(Ia,{label:"Show Intermediates",isChecked:t,onChange:a=>e(f5e(a.target.checked))}),x(Ia,{label:"Show Grid",isChecked:n,onChange:a=>e(u5e(a.target.checked))}),x(Ia,{label:"Snap to Grid",isChecked:r,onChange:a=>e(c5e(a.target.checked))}),x(Ia,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(L$(a.target.checked))}),x(Ia,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(d5e(a.target.checked))})]})})},z9e=Xe([Yt],e=>{const{eraserSize:t,tool:n}=e;return{tool:n,eraserSize:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),B9e=()=>{const e=Fe(),{tool:t,eraserSize:n}=Ce(z9e),r=()=>e(Su("eraser"));return vt("e",i=>{i.preventDefault(),r()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(g$,{}),"data-selected":t==="eraser",onClick:()=>e(Su("eraser"))}),children:x(an,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(ch,{label:"Size",value:n,withInput:!0,onChange:i=>e(J4e(i))})})})},F9e=Xe([Yt,Gv,rn],(e,t,n)=>{const{layer:r,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,tool:l,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}=e,{shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v}=t;return{layer:r,tool:l,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,activeTabName:n,shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$9e=()=>{const e=Fe(),{tool:t,brushColor:n,brushSize:r}=Ce(F9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),"data-selected":t==="brush",onClick:()=>e(Su("brush"))}),children:ee(an,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(an,{gap:"1rem",justifyContent:"space-between",children:x(ch,{label:"Size",value:r,withInput:!0,onChange:i=>e(x$(i))})}),x(Y_,{style:{width:"100%"},color:n,onChange:i=>e(Q4e(i))})]})})},H9e=Xe([Yt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r}=e;return{layer:n,maskColor:t,isMaskEnabled:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W9e=()=>{const e=Fe(),{layer:t,maskColor:n,isMaskEnabled:r}=Ce(H9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(X4e(t==="mask"?"base":"mask")),icon:x(T4e,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(aa,{onClick:()=>e(k$()),children:"Clear Mask"}),x(Ia,{label:"Enable Mask",isChecked:r,onChange:i=>e(C$(i.target.checked))}),x(Ia,{label:"Invert Mask"}),x(Y_,{color:n,onChange:i=>e(_$(i))})]})})},V9e=Xe([Yt],e=>{const{tool:t}=e;return{tool:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U9e=()=>{const e=Fe(),{tool:t}=Ce(V9e);return ee("div",{className:"inpainting-settings",children:[x(W9e,{}),ee(Eo,{isAttached:!0,children:[x($9e,{}),x(B9e,{}),x(gt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(y4e,{}),"data-selected":t==="move",onClick:()=>e(Su("move"))})]}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(E4e,{}),onClick:()=>{e(R_(dl))}}),x(gt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(v$,{})}),x(gt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(gt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(p$,{})})]}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(D9e,{})}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(I_,{})}),x(gt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(y$,{}),onClick:()=>e(l5e())})]})]})},j9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,outpainting:{objects:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,doesOutpaintingHaveObjects:r.length>0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,doesOutpaintingHaveObjects:r}=Ce(j9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(U9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})})})};function q9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("outpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(R9e,{}),styleClass:"inpainting-workarea-overrides",children:x(G9e,{})})}const Ef={txt2img:{title:x(u3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(I9e,{}),tooltip:"Text To Image"},img2img:{title:x(i3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(NSe,{}),tooltip:"Image To Image"},inpainting:{title:x(o3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T9e,{}),tooltip:"Inpainting"},outpainting:{title:x(s3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(q9e,{}),tooltip:"Outpainting"},nodes:{title:x(a3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n3e,{}),tooltip:"Nodes"},postprocess:{title:x(l3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r3e,{}),tooltip:"Post Processing"}},ux=Ge.map(Ef,(e,t)=>t);[...ux];function K9e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=Fe();vt("1",()=>{i(Co(0))}),vt("2",()=>{i(Co(1))}),vt("3",()=>{i(Co(2))}),vt("4",()=>{i(Co(3))}),vt("5",()=>{i(Co(4))}),vt("6",()=>{i(Co(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(b0(!1)),i(m0(!1))):(i(b0(!0)),i(m0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Ef[l].tooltip,placement:"right",children:x(lF,{children:Ef[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(aF,{className:"app-tabs-panel",children:Ef[l].workarea},l))}),s};return ee(oF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(Co(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(sF,{className:"app-tabs-panels",children:t?x(O9e,{}):a()})]})}const CW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},Y9e=CW,_W=vb({name:"options",initialState:Y9e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=A3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=G4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=A3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:P,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=G4(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=A3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...CW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=ux.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:cx,setIterations:Z9e,setSteps:kW,setCfgScale:EW,setThreshold:X9e,setPerlin:Q9e,setHeight:PW,setWidth:TW,setSampler:LW,setSeed:Qv,setSeamless:AW,setHiresFix:IW,setImg2imgStrength:p8,setFacetoolStrength:N3,setFacetoolType:D3,setCodeformerFidelity:MW,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:oEe,resetOptionsState:aEe,setShouldFitToWidthHeight:OW,setParameter:sEe,setShouldGenerateVariations:J9e,setSeedWeights:RW,setVariationAmount:e7e,setAllParameters:t7e,setShouldRunFacetool:n7e,setShouldRunESRGAN:r7e,setShouldRandomizeSeed:i7e,setShowAdvancedOptions:o7e,setActiveTab:Co,setShouldShowImageDetails:NW,setAllTextToImageParameters:a7e,setAllImageToImageParameters:s7e,setShowDualDisplay:l7e,setInitialImage:bv,clearInitialImage:DW,setShouldShowOptionsPanel:b0,setShouldPinOptionsPanel:u7e,setOptionsPanelScrollPosition:c7e,setShouldHoldOptionsPanelOpen:d7e,setShouldLoopback:f7e,setCurrentTheme:h7e,setIsLightBoxOpen:_l}=_W.actions,p7e=_W.reducer,Ll=Object.create(null);Ll.open="0";Ll.close="1";Ll.ping="2";Ll.pong="3";Ll.message="4";Ll.upgrade="5";Ll.noop="6";const z3=Object.create(null);Object.keys(Ll).forEach(e=>{z3[Ll[e]]=e});const g7e={type:"error",data:"parser error"},m7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v7e=typeof ArrayBuffer=="function",y7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,zW=({type:e,data:t},n,r)=>m7e&&t instanceof Blob?n?r(t):BI(t,r):v7e&&(t instanceof ArrayBuffer||y7e(t))?n?r(t):BI(new Blob([t]),r):r(Ll[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",em=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},x7e=typeof ArrayBuffer=="function",BW=(e,t)=>{if(typeof e!="string")return{type:"message",data:FW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:S7e(e.substring(1),t)}:z3[n]?e.length>1?{type:z3[n],data:e.substring(1)}:{type:z3[n]}:g7e},S7e=(e,t)=>{if(x7e){const n=b7e(e);return FW(n,t)}else return{base64:!0,data:e}},FW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},$W=String.fromCharCode(30),w7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{zW(o,!1,s=>{r[a]=s,++i===n&&t(r.join($W))})})},C7e=(e,t)=>{const n=e.split($W),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function WW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const k7e=setTimeout,E7e=clearTimeout;function dx(e,t){t.useNativeTimers?(e.setTimeoutFn=k7e.bind(Uc),e.clearTimeoutFn=E7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const P7e=1.33;function T7e(e){return typeof e=="string"?L7e(e):Math.ceil((e.byteLength||e.size)*P7e)}function L7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class A7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class VW extends Vr{constructor(t){super(),this.writable=!1,dx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new A7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=BW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const UW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,I7e={};let $I=0,Xy=0,HI;function WI(e){let t="";do t=UW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function jW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Xy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};C7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,w7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=jW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),dx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=WW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new KW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=R7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const YW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qy=Uc.WebSocket||Uc.MozWebSocket,UI=!0,z7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B7e extends VW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:WW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new Qy(t,n):new Qy(t):new Qy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||z7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&YW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=jW()),this.supportsBinary||(t.b64=1);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Qy}}const F7e={websocket:B7e,polling:D7e},$7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=$7e.exec(e||""),o={},a=14;for(;a--;)o[H7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=W7e(o,o.path),o.queryKey=V7e(o,o.query),o}function W7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function V7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),dx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=M7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=HW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new F7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ZW=Object.prototype.toString,q7e=typeof Blob=="function"||typeof Blob<"u"&&ZW.call(Blob)==="[object BlobConstructor]",K7e=typeof File=="function"||typeof File<"u"&&ZW.call(File)==="[object FileConstructor]";function ak(e){return j7e&&(e instanceof ArrayBuffer||G7e(e))||q7e&&e instanceof Blob||K7e&&e instanceof File}function B3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class J7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Z7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const e_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:X7e,get PacketType(){return nn},Encoder:Q7e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const t_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class XW extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(t_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}r1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};r1.prototype.reset=function(){this.attempts=0};r1.prototype.setMin=function(e){this.ms=e};r1.prototype.setMax=function(e){this.max=e};r1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,dx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new r1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||e_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){YW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new XW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zg={};function F3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=U7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=zg[i]&&o in zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(zg[i]||(zg[i]=new w8(r,t)),l=zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F3,{Manager:w8,Socket:XW,io:F3,connect:F3});var n_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,r_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,i_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return o_e(e)},P=function(){return a_e(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":s_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(n_e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},o_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},a_e=function(t){var n=t.getDay();return n===0&&(n=7),n},s_e=function(t){return(String(t).match(r_e)||[""]).pop().replace(i_e,"").replace(/GMT\+0000/g,"UTC")};const l_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(u6("Connected")),t(y5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(WC("user")),r.categories.result.latest_mtime?t(MA("result")):t(WC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(u6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Tp(),...r,category:"result"};if(t(Ay({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(s5e({image:a,boundingBox:s}))}if(i)switch(ux[o]){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(N5e({uuid:Tp(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Ay({category:"result",image:{uuid:Tp(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(g0(!0)),t(X3e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t($C()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Tp(),...l}));t(R5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(e4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Ay({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(G$(r));const{initialImage:o,maskPath:a}=n().options;n().canvas,(o?.url===i||o===i)&&t(DW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Tp(),...o};try{switch(t(Ay({image:a,category:"user"})),i){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}default:{t(q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(Q3e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(u6("Model Changed")),t(g0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(g0(!1)),t(EA(!0)),t($C()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},u_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Og.Stage({container:i,width:n,height:r}),a=new Og.Layer,s=new Og.Layer;a.add(new Og.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Og.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},c_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},d_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:P,hiresFix:E,img2imgStrength:k,initialImage:T,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:N,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:W,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:re}=n,{shouldDisplayInProgressType:se,saveIntermediatesInterval:G,enableImageDebugging:V}=i,q={prompt:a,iterations:re||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:se==="full-res",progress_latents:se==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=re?a$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=P,q.hires_fix=E),t==="img2img"&&T&&(q.init_img=typeof T=="string"?T:T.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&dl.current){const{objects:me,boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:Ue,stageScale:ct,isMaskEnabled:qe}=r[r.currentCanvas],et={...ye,...Se},tt=u_e(qe?me.filter(Ub):[],et);if(q.init_mask=tt,q.fit=!1,q.init_img=o,q.strength=k,Ue&&(q.inpaint_replace=He),q.bounding_box=et,t==="outpainting"){const at=dl.current.scale();dl.current.scale({x:1/ct,y:1/ct});const At=dl.current.getAbsolutePosition(),wt=dl.current.toDataURL({x:et.x+At.x,y:et.y+At.y,width:et.width,height:et.height});V&&c_e([{base64:tt,caption:"mask sent as init_mask"},{base64:wt,caption:"image sent as init_img"}]),dl.current.scale(at),q.init_img=wt,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=N,D&&(q.with_variations=S2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:W}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),V&&(q.enable_image_debugging=V),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},f_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(g0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=qv(r())?.url;if(!h8.current||!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n($C());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=d_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(g0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(g0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(G$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(t4e()),t.emit("requestModelChange",i)}}},h_e=()=>{const{origin:e}=new URL(window.location.href),t=F3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:P,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:T,onModelChanged:I,onModelChangeFailed:O}=l_e(i),{emitGenerateImage:N,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:W,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:re,emitRequestModelChange:se}=f_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{P(G)}),t.on("imageUploaded",G=>{E(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{T(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{N(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{W(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{re();break}case"socketio/requestModelChange":{se(a.payload);break}}o(a)}},QW=["pastObjects","futureObjects","stageScale","stageDimensions","stageCoordinates","cursorPosition"],p_e=QW.map(e=>`canvas.inpainting.${e}`),g_e=QW.map(e=>`canvas.outpainting.${e}`),m_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),v_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),JW=yF({options:p7e,gallery:H5e,system:i4e,canvas:h5e}),y_e=BF.getPersistConfig({key:"root",storage:zF,rootReducer:JW,blacklist:[...p_e,...g_e,...m_e,...v_e],throttle:500}),b_e=i2e(y_e,JW),eV=Xme({reducer:b_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(h_e())}),Fe=Vve,Ce=Mve;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function x_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(an,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(zv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),k_e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),E_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(k_e),i=t?Math.round(t*100/n):0;return x(HB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function P_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function T_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=O4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(P_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(N0,{isOpen:t,onClose:r,children:[x(pv,{}),ee(hv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(rb,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const L_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=Fe(),{name:i,status:o,description:a}=e,s=()=>{r(b5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(aa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},A_e=Xe(e=>e.system,e=>{const t=Ge.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),I_e=()=>{const{models:e}=Ce(A_e);return x(rb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(L_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},M_e=Xe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ge.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),O_e=({children:e})=>{const t=Fe(),n=Ce(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=O4(),{isOpen:a,onOpen:s,onClose:l}=O4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(M_e),b=()=>{hV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(n4e(P))};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(N0,{isOpen:r,onClose:o,children:[x(pv,{}),ee(hv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(z4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(I_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(uh,{label:"Display In-Progress Images",validValues:m3e,value:u,onChange:P=>t(Y3e(P.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(l$(P.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:P=>t(J3e(P.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(r4e(P.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Hf,{size:"md",children:"Reset Web UI"}),x(aa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(ko,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(ko,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(aa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(N0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(hv,{children:x(z4,{pb:6,pt:6,children:x(an,{justifyContent:"center",children:x(ko,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},R_e=Xe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),N_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(R_e),s=Fe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(ko,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(u$())},className:`status ${l}`,children:u})})},D_e=["dark","light","green"];function z_e(){const{setColorMode:e}=Ev(),t=Fe(),n=Ce(i=>i.options.currentTheme);return x(uh,{validValues:D_e,value:n,onChange:i=>{e(i.target.value),t(h7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const B_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(N_e,{}),x(T_e,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(k4e,{})})}),x(z_e,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(x4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(m4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(g4e,{})})}),x(O_e,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(M_,{})})})]})]}),F_e=Xe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),$_e=Xe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),H_e=()=>{const e=Fe(),t=Ce(F_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce($_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(u$()),e(l6(!n))};return vt("`",()=>{e(l6(!n))},[n]),vt("esc",()=>{e(l6(!1))}),ee(Kn,{children:[n&&x(X$,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(v4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(L4e,{}):x(h$,{}),onClick:l})})]})};function W_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var V_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jv(e,t){var n=U_e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function U_e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=V_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var j_e=[".DS_Store","Thumbs.db"];function G_e(e){return G0(this,void 0,void 0,function(){return q0(this,function(t){return o5(e)&&q_e(e.dataTransfer)?[2,X_e(e.dataTransfer,e.type)]:K_e(e)?[2,Y_e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Z_e(e)]:[2,[]]})})}function q_e(e){return o5(e)}function K_e(e){return o5(e)&&o5(e.target)}function o5(e){return typeof e=="object"&&e!==null}function Y_e(e){return k8(e.target.files).map(function(t){return Jv(t)})}function Z_e(e){return G0(this,void 0,void 0,function(){var t;return q0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Jv(r)})]}})})}function X_e(e,t){return G0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Q_e))]):[3,2];case 1:return r=i.sent(),[2,YI(nV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return Jv(o)}))]}})})}function YI(e){return e.filter(function(t){return j_e.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Pf(e){return e!=null}function pke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=aV(l,n),h=xv(u,1),g=h[0],m=sV(l,r,i),v=xv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function a5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jy(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function gke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function mke(e){return e.indexOf("Edge/")!==-1}function vke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return gke(e)||mke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Rke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lk=C.exports.forwardRef(function(e,t){var n=e.children,r=s5(e,Cke),i=fV(r),o=i.open,a=s5(i,_ke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});lk.displayName="Dropzone";var dV={disabled:!1,getFilesFromEvent:G_e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lk.defaultProps=dV;lk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var L8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},dV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,N=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return xke(n)},[n]),Y=C.exports.useMemo(function(){return bke(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:iM},[P]),j=C.exports.useMemo(function(){return typeof w=="function"?w:iM},[w]),te=C.exports.useRef(null),re=C.exports.useRef(null),se=C.exports.useReducer(Nke,L8),G=I6(se,2),V=G[0],q=G[1],Q=V.isFocused,X=V.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&yke()),ye=function(){!me.current&&X&&setTimeout(function(){if(re.current){var Je=re.current.files;Je.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[re,X,j,me]);var Se=C.exports.useRef([]),He=function(Je){te.current&&te.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",nM,!1),document.addEventListener("drop",He,!1)),function(){T&&(document.removeEventListener("dragover",nM),document.removeEventListener("drop",He))}},[te,T]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var Ue=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(Pke(Se.current),[Me.target]),Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){if(!(a5(Me)&&!D)){var Xt=Je.length,Gt=Xt>0&&pke({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!Gt;q({isDragAccept:Gt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(Je){return Ue(Je)})},[i,u,Ue,D,W,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Jy(Me);if(Je&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return Je&&g&&g(Me),!1},[g,D]),et=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Se.current.filter(function(Gt){return te.current&&te.current.contains(Gt)}),Xt=Je.indexOf(Me.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Jy(Me)&&h&&h(Me))},[te,h,D]),tt=C.exports.useCallback(function(Me,Je){var Xt=[],Gt=[];Me.forEach(function(Ee){var It=aV(Ee,W),Ne=I6(It,2),st=Ne[0],ln=Ne[1],Dn=sV(Ee,a,o),$e=I6(Dn,2),pt=$e[0],rt=$e[1],Nt=$?$(Ee):null;if(st&&pt&&!Nt)Xt.push(Ee);else{var Qt=[ln,rt];Nt&&(Qt=Qt.concat(Nt)),Gt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){Gt.push({file:Ee,errors:[hke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:Gt,type:"setFiles"}),m&&m(Xt,Gt,Je),Gt.length>0&&b&&b(Gt,Je),Xt.length>0&&v&&v(Xt,Je)},[q,s,W,a,o,l,m,v,b,$]),at=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){a5(Me)&&!D||tt(Je,Me)}).catch(function(Je){return Ue(Je)}),q({type:"reset"})},[i,tt,Ue,D]),At=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(Je){return i(Je)}).then(function(Je){tt(Je,null),q({type:"closeDialog"})}).catch(function(Je){Ske(Je)?(j(Je),q({type:"closeDialog"})):wke(Je)?(me.current=!1,re.current?(re.current.value=null,re.current.click()):Ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Ue(Je)});return}re.current&&(q({type:"openDialog"}),de(),re.current.value=null,re.current.click())},[q,de,j,E,tt,Ue,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),At())},[te,At]),Ae=C.exports.useCallback(function(){q({type:"focus"})},[]),dt=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(vke()?setTimeout(At,0):At())},[I,At]),ut=function(Je){return r?null:Je},xt=function(Je){return O?null:ut(Je)},kn=function(Je){return N?null:ut(Je)},Et=function(Je){D&&Je.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Me.refKey,Xt=Je===void 0?"ref":Je,Gt=Me.role,Ee=Me.onKeyDown,It=Me.onFocus,Ne=Me.onBlur,st=Me.onClick,ln=Me.onDragEnter,Dn=Me.onDragOver,$e=Me.onDragLeave,pt=Me.onDrop,rt=s5(Me,kke);return ur(ur(T8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(It,Ae)),onBlur:xt(ol(Ne,dt)),onClick:ut(ol(st,Mt)),onDragEnter:kn(ol(ln,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol($e,et)),onDrop:kn(ol(pt,at)),role:typeof Gt=="string"&&Gt!==""?Gt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),rt)}},[te,wt,Ae,dt,Mt,ct,qe,et,at,O,N,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Me.refKey,Xt=Je===void 0?"ref":Je,Gt=Me.onChange,Ee=Me.onClick,It=s5(Me,Eke),Ne=T8({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(Gt,at)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,re);return ur(ur({},Ne),It)}},[re,n,s,at,r]);return ur(ur({},V),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:re,open:ut(At)})}function Nke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},L8),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},L8);default:return e}}function iM(){}const Dke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Hf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Hf,{size:"lg",children:"Invalid Upload"}),x(Hf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},zke=e=>{const{children:t}=e,n=Fe(),r=Ce(rn),i=xd({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(E=>{a(!0);const k=E.errors.reduce((T,I)=>T+` +`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(E=>{a(!0);const k={file:E};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(OA(k))},[n,r]),u=C.exports.useCallback((E,k)=>{k.forEach(T=>{s(T)}),E.forEach(T=>{l(T)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=fV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const E=k=>{const T=k.clipboardData?.items;if(!T)return;const I=[];for(const D of T)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const N={file:O};["img2img","inpainting"].includes(r)&&(N.destination=r),n(OA(N))};return document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E)}},[n,i,r]);const P=["img2img","inpainting"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:E=>{E.key},children:[x("input",{...g()}),t,b&&o&&x(Dke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},Bke=()=>{const e=Fe(),t=Ce(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(m0(!0)),t&&e(Cr(!0))},children:x(c$,{})})};function Fke(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const $ke=Xe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Hke=()=>{const e=Fe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce($ke);return ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(b0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Fke,{})}),t&&ee(Kn,{children:[x(R$,{iconButton:!0}),x(D$,{}),x(N$,{})]})]})};W_e();const Wke=Xe([e=>e.gallery,e=>e.options,e=>e.system,rn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ge.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Vke=()=>{Fe();const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Wke);return x("div",{className:"App",children:ee(zke,{children:[x(E_e,{}),ee("div",{className:"app-content",children:[x(B_e,{}),x(K9e,{})]}),x("div",{className:"app-console",children:x(H_e,{})}),e&&x(Bke,{}),t&&x(Hke,{})]})})};const hV=c2e(eV),Uke=IR({key:"invokeai-style-cache",prepend:!0});O6.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x($ve,{store:eV,children:x(tV,{loading:x(__e,{}),persistor:hV,children:x(CQ,{value:Uke,children:x(gme,{children:x(Vke,{})})})})})})); diff --git a/frontend/dist/assets/index.a44a1287.css b/frontend/dist/assets/index.a44a1287.css new file mode 100644 index 0000000000..bfd9abdc64 --- /dev/null +++ b/frontend/dist/assets/index.a44a1287.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.theme-changer-dropdown .invokeai__select-picker{background-color:var(--background-color-light)!important;font-size:.9rem}.theme-changer-dropdown .invokeai__select-picker:focus{border:none!important;box-shadow:none!important}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{background-color:var(--img2img-img-bg-color);border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:red;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{border-radius:.5rem;border:1px solid var(--border-color-light)}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem!important}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.5;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index ca24f17b60..a1ab07fa76 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,13 @@ InvokeAI - A Stable Diffusion Toolkit +<<<<<<< refs/remotes/upstream/development +======= + + +>>>>>>> Builds fresh bundle From 72ea5453ce615cfb57849e9ca8b2c1e5125eca04 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 11 Nov 2022 04:09:40 +1300 Subject: [PATCH 009/220] Fix broken styling on the Clear Mask button --- frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx index 787e1548aa..b5525d279d 100644 --- a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx @@ -1,4 +1,4 @@ -import { Button, Flex } from '@chakra-ui/react'; +import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { clearMask, @@ -14,6 +14,7 @@ import { FaMask } from 'react-icons/fa'; import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import IAIColorPicker from 'common/components/IAIColorPicker'; +import IAIButton from 'common/components/IAIButton'; export const selector = createSelector( [currentCanvasSelector], @@ -50,7 +51,7 @@ const IAICanvasMaskButtonPopover = () => { } > - + dispatch(clearMask())}>Clear Mask Date: Fri, 11 Nov 2022 04:30:06 +1300 Subject: [PATCH 010/220] Fix delete hotkey not working --- frontend/src/features/gallery/DeleteImageModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/gallery/DeleteImageModal.tsx b/frontend/src/features/gallery/DeleteImageModal.tsx index 432062c001..9836930203 100644 --- a/frontend/src/features/gallery/DeleteImageModal.tsx +++ b/frontend/src/features/gallery/DeleteImageModal.tsx @@ -80,7 +80,7 @@ const DeleteImageModal = forwardRef( }; useHotkeys( - 'del', + 'delete', () => { shouldConfirmOnDelete ? onOpen() : handleDelete(); }, From c02a0da8379bdeca5b3476b22a492580ee6fd55c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 08:19:18 +1100 Subject: [PATCH 011/220] Builds fresh bundle --- .../{index.4d3899e5.js => index.a06633cf.js} | 48 +++++++++---------- frontend/dist/index.html | 4 ++ 2 files changed, 28 insertions(+), 24 deletions(-) rename frontend/dist/assets/{index.4d3899e5.js => index.a06633cf.js} (79%) diff --git a/frontend/dist/assets/index.4d3899e5.js b/frontend/dist/assets/index.a06633cf.js similarity index 79% rename from frontend/dist/assets/index.4d3899e5.js rename to frontend/dist/assets/index.a06633cf.js index 9d3e9ca4dc..a72f56d09a 100644 --- a/frontend/dist/assets/index.4d3899e5.js +++ b/frontend/dist/assets/index.a06633cf.js @@ -6,7 +6,7 @@ function Hq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R6=Object.prototype.hasOwnProperty,iK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rE={},iE={};function oK(e){return R6.call(iE,e)?!0:R6.call(rE,e)?!1:iK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function aK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sK(e,t,n,r){if(t===null||typeof t>"u"||aK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R6=Object.prototype.hasOwnProperty,iK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rE={},iE={};function oK(e){return R6.call(iE,e)?!0:R6.call(rE,e)?!1:iK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function aK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sK(e,t,n,r){if(t===null||typeof t>"u"||aK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Vx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bg(e):""}function lK(e){switch(e.tag){case 5:return Bg(e.type);case 16:return Bg("Lazy");case 13:return Bg("Suspense");case 19:return Bg("SuspenseList");case 0:case 2:case 15:return e=Ux(e.type,!1),e;case 11:return e=Ux(e.type.render,!1),e;case 1:return e=Ux(e.type,!0),e;default:return""}}function B6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ip:return"Fragment";case Ap:return"Portal";case N6:return"Profiler";case B8:return"StrictMode";case D6:return"Suspense";case z6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:B6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return B6(e(t))}catch{}}return null}function uK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function V2(e){e._valueTracker||(e._valueTracker=cK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function V3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function F6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function $6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?H6(e,t.type,n):t.hasOwnProperty("defaultValue")&&H6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function H6(e,t,n){(t!=="number"||V3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fg=Array.isArray;function qp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=U2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dK=["Webkit","ms","Moz","O"];Object.keys(tm).forEach(function(e){dK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tm[t]=tm[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tm.hasOwnProperty(e)&&tm[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function U6(e,t){if(t){if(fK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function j6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var G6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q6=null,Kp=null,Yp=null;function cE(e){if(e=_v(e)){if(typeof q6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=f5(t),q6(e.stateNode,e.type,t))}}function EM(e){Kp?Yp?Yp.push(e):Yp=[e]:Kp=e}function PM(){if(Kp){var e=Kp,t=Yp;if(Yp=Kp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(CK(e)/_K|0)|0}var j2=64,G2=4194304;function $g(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function q3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=$g(s):(o&=a,o!==0&&(r=$g(o)))}else a=n&~i,a!==0?r=$g(a):o!==0&&(r=$g(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function TK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rm),bE=String.fromCharCode(32),xE=!1;function qM(e,t){switch(e){case"keyup":return nY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mp=!1;function iY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function oY(e,t){if(Mp)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),r3=G8=Fc=null,Mp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_E(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=V3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=kE(n,o);var a=kE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Op=null,J6=null,om=null,ew=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ew||Op==null||Op!==V3(r)||(r=Op,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),om&&Bm(om,r)||(om=r,r=Z3(J6,"onSelect"),0Dp||(e.current=aw[Dp],aw[Dp]=null,Dp--)}function Gn(e,t){Dp++,aw[Dp]=e.current,e.current=t}var rd={},Vi=dd(rd),To=dd(!1),Uf=rd;function S0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Lo(e){return e=e.childContextTypes,e!=null}function Q3(){Xn(To),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(To,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,uK(e)||"Unknown",i));return hr({},n,r)}function J3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,Uf=Vi.current,Gn(Vi,e),Gn(To,To.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,Uf),r.__reactInternalMemoizedMergedChildContext=e,Xn(To),Xn(Vi),Gn(Vi,e)):Xn(To),Gn(To,n)}var su=null,h5=!1,iS=!1;function uO(e){su===null?su=[e]:su.push(e)}function EY(e){h5=!0,uO(e)}function fd(){if(!iS&&su!==null){iS=!0;var e=0,t=Ln;try{var n=su;for(Ln=1;e>=a,i-=a,uu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var W=m(E,D,T[z],I);if(W===null){D===null&&(D=$);break}e&&D&&W.alternate===null&&t(E,D),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W,D=$}if(z===T.length)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(E,D,W.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(E,D),k=o(Y,k,z),N===null?O=Y:N.sibling=Y,N=Y,D=$}if(W.done)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;!W.done;z++,W=T.next())W=g(E,W.value,I),W!==null&&(k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return rr&&vf(E,z),O}for(D=r(E,D);!W.done;z++,W=T.next())W=v(D,E,z,W.value,I),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?z:W.key),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return e&&D.forEach(function(de){return t(E,de)}),rr&&vf(E,z),O}function P(E,k,T,I){if(typeof T=="object"&&T!==null&&T.type===Ip&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case W2:e:{for(var O=T.key,N=k;N!==null;){if(N.key===O){if(O=T.type,O===Ip){if(N.tag===7){n(E,N.sibling),k=i(N,T.props.children),k.return=E,E=k;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===N.type){n(E,N.sibling),k=i(N,T.props),k.ref=mg(E,N,T),k.return=E,E=k;break e}n(E,N);break}else t(E,N);N=N.sibling}T.type===Ip?(k=Df(T.props.children,E.mode,I,T.key),k.return=E,E=k):(I=d3(T.type,T.key,T.props,null,E.mode,I),I.ref=mg(E,k,T),I.return=E,E=I)}return a(E);case Ap:e:{for(N=T.key;k!==null;){if(k.key===N)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(E,k.sibling),k=i(k,T.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=fS(T,E.mode,I),k.return=E,E=k}return a(E);case Pc:return N=T._init,P(E,k,N(T._payload),I)}if(Fg(T))return b(E,k,T,I);if(dg(T))return w(E,k,T,I);J2(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,T),k.return=E,E=k):(n(E,k),k=dS(T,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return P}var C0=vO(!0),yO=vO(!1),kv={},yl=dd(kv),Wm=dd(kv),Vm=dd(kv);function Af(e){if(e===kv)throw Error(Oe(174));return e}function o9(e,t){switch(Gn(Vm,t),Gn(Wm,e),Gn(yl,kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:V6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=V6(t,e)}Xn(yl),Gn(yl,t)}function _0(){Xn(yl),Xn(Wm),Xn(Vm)}function bO(e){Af(Vm.current);var t=Af(yl.current),n=V6(t,e.type);t!==n&&(Gn(Wm,e),Gn(yl,n))}function a9(e){Wm.current===e&&(Xn(yl),Xn(Wm))}var cr=dd(0);function o4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oS=[];function s9(){for(var e=0;en?n:4,e(!0);var r=aS.transition;aS.transition={};try{e(!1),t()}finally{Ln=n,aS.transition=r}}function NO(){return za().memoizedState}function AY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=io();ys(n,e,r,i),BO(n,t,r)}}function IY(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=io(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){am=a4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var s4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},MY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,s3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return s3(4194308,4,e,t)},useInsertionEffect:function(e,t){return s3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f9,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=LY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(Gf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Gm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=cu,r=uu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Um++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Vx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bg(e):""}function lK(e){switch(e.tag){case 5:return Bg(e.type);case 16:return Bg("Lazy");case 13:return Bg("Suspense");case 19:return Bg("SuspenseList");case 0:case 2:case 15:return e=Ux(e.type,!1),e;case 11:return e=Ux(e.type.render,!1),e;case 1:return e=Ux(e.type,!0),e;default:return""}}function B6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ip:return"Fragment";case Ap:return"Portal";case N6:return"Profiler";case B8:return"StrictMode";case D6:return"Suspense";case z6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:B6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return B6(e(t))}catch{}}return null}function uK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function V2(e){e._valueTracker||(e._valueTracker=cK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function V3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function F6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function $6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?H6(e,t.type,n):t.hasOwnProperty("defaultValue")&&H6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function H6(e,t,n){(t!=="number"||V3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fg=Array.isArray;function qp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=U2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dK=["Webkit","ms","Moz","O"];Object.keys(tm).forEach(function(e){dK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tm[t]=tm[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tm.hasOwnProperty(e)&&tm[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function U6(e,t){if(t){if(fK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function j6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var G6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q6=null,Kp=null,Yp=null;function cE(e){if(e=_v(e)){if(typeof q6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=f5(t),q6(e.stateNode,e.type,t))}}function EM(e){Kp?Yp?Yp.push(e):Yp=[e]:Kp=e}function PM(){if(Kp){var e=Kp,t=Yp;if(Yp=Kp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(CK(e)/_K|0)|0}var j2=64,G2=4194304;function $g(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function q3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=$g(s):(o&=a,o!==0&&(r=$g(o)))}else a=n&~i,a!==0?r=$g(a):o!==0&&(r=$g(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function TK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rm),bE=String.fromCharCode(32),xE=!1;function qM(e,t){switch(e){case"keyup":return nY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mp=!1;function iY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function oY(e,t){if(Mp)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),r3=G8=Fc=null,Mp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_E(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=V3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=kE(n,o);var a=kE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Op=null,J6=null,om=null,ew=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ew||Op==null||Op!==V3(r)||(r=Op,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),om&&Bm(om,r)||(om=r,r=Z3(J6,"onSelect"),0Dp||(e.current=aw[Dp],aw[Dp]=null,Dp--)}function Gn(e,t){Dp++,aw[Dp]=e.current,e.current=t}var rd={},Vi=dd(rd),To=dd(!1),Uf=rd;function S0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Lo(e){return e=e.childContextTypes,e!=null}function Q3(){Xn(To),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(To,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,uK(e)||"Unknown",i));return hr({},n,r)}function J3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,Uf=Vi.current,Gn(Vi,e),Gn(To,To.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,Uf),r.__reactInternalMemoizedMergedChildContext=e,Xn(To),Xn(Vi),Gn(Vi,e)):Xn(To),Gn(To,n)}var su=null,h5=!1,iS=!1;function uO(e){su===null?su=[e]:su.push(e)}function EY(e){h5=!0,uO(e)}function fd(){if(!iS&&su!==null){iS=!0;var e=0,t=Ln;try{var n=su;for(Ln=1;e>=a,i-=a,uu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var W=m(E,D,T[z],I);if(W===null){D===null&&(D=$);break}e&&D&&W.alternate===null&&t(E,D),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W,D=$}if(z===T.length)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(E,D,W.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(E,D),k=o(Y,k,z),N===null?O=Y:N.sibling=Y,N=Y,D=$}if(W.done)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;!W.done;z++,W=T.next())W=g(E,W.value,I),W!==null&&(k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return rr&&vf(E,z),O}for(D=r(E,D);!W.done;z++,W=T.next())W=v(D,E,z,W.value,I),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?z:W.key),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return e&&D.forEach(function(de){return t(E,de)}),rr&&vf(E,z),O}function P(E,k,T,I){if(typeof T=="object"&&T!==null&&T.type===Ip&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case W2:e:{for(var O=T.key,N=k;N!==null;){if(N.key===O){if(O=T.type,O===Ip){if(N.tag===7){n(E,N.sibling),k=i(N,T.props.children),k.return=E,E=k;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===N.type){n(E,N.sibling),k=i(N,T.props),k.ref=mg(E,N,T),k.return=E,E=k;break e}n(E,N);break}else t(E,N);N=N.sibling}T.type===Ip?(k=Df(T.props.children,E.mode,I,T.key),k.return=E,E=k):(I=d3(T.type,T.key,T.props,null,E.mode,I),I.ref=mg(E,k,T),I.return=E,E=I)}return a(E);case Ap:e:{for(N=T.key;k!==null;){if(k.key===N)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(E,k.sibling),k=i(k,T.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=fS(T,E.mode,I),k.return=E,E=k}return a(E);case Pc:return N=T._init,P(E,k,N(T._payload),I)}if(Fg(T))return b(E,k,T,I);if(dg(T))return w(E,k,T,I);J2(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,T),k.return=E,E=k):(n(E,k),k=dS(T,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return P}var C0=vO(!0),yO=vO(!1),kv={},bl=dd(kv),Wm=dd(kv),Vm=dd(kv);function Af(e){if(e===kv)throw Error(Oe(174));return e}function o9(e,t){switch(Gn(Vm,t),Gn(Wm,e),Gn(bl,kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:V6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=V6(t,e)}Xn(bl),Gn(bl,t)}function _0(){Xn(bl),Xn(Wm),Xn(Vm)}function bO(e){Af(Vm.current);var t=Af(bl.current),n=V6(t,e.type);t!==n&&(Gn(Wm,e),Gn(bl,n))}function a9(e){Wm.current===e&&(Xn(bl),Xn(Wm))}var cr=dd(0);function o4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oS=[];function s9(){for(var e=0;en?n:4,e(!0);var r=aS.transition;aS.transition={};try{e(!1),t()}finally{Ln=n,aS.transition=r}}function NO(){return za().memoizedState}function AY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=io();ys(n,e,r,i),BO(n,t,r)}}function IY(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=io(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){am=a4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var s4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},MY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,s3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return s3(4194308,4,e,t)},useInsertionEffect:function(e,t){return s3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f9,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=LY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(Gf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Gm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=cu,r=uu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Um++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[Hm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=j6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iE0&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304)}else{if(!r)if(e=o4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>E0&&n!==1073741824&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return y9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function $Y(e,t){switch(Q8(t),t.tag){case 1:return Lo(t.type)&&Q3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _0(),Xn(To),Xn(Vi),s9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a9(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));w0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return _0(),null;case 10:return n9(t.type._context),null;case 22:case 23:return y9(),null;case 24:return null;default:return null}}var ty=!1,Wi=!1,HY=typeof WeakSet=="function"?WeakSet:Set,it=null;function $p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function yw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function WY(e,t){if(tw=K3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(nw={focusedElem:e,selectionRange:n},K3=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){t=it;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,P=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}return b=QE,QE=!1,b}function sm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&yw(t,n,o)}i=i.next}while(i!==r)}}function m5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Hm],delete t[ow],delete t[_Y],delete t[kY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=X3));else if(r!==4&&(e=e.child,e!==null))for(xw(e,t,n),e=e.sibling;e!==null;)xw(e,t,n),e=e.sibling}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}var Ti=null,fs=!1;function yc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(l5,n)}catch{}switch(n.tag){case 5:Wi||$p(n,t);case 6:var r=Ti,i=fs;Ti=null,yc(e,t,n),Ti=r,fs=i,Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ti.removeChild(n.stateNode));break;case 18:Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?rS(e.parentNode,n):e.nodeType===1&&rS(e,n),Dm(e)):rS(Ti,n.stateNode));break;case 4:r=Ti,i=fs,Ti=n.stateNode.containerInfo,fs=!0,yc(e,t,n),Ti=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&yw(n,t,a),i=i.next}while(i!==r)}yc(e,t,n);break;case 1:if(!Wi&&($p(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}yc(e,t,n);break;case 21:yc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,yc(e,t,n),Wi=r):yc(e,t,n);break;default:yc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HY),t.forEach(function(r){var i=XY.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,c4=0,(sn&6)!==0)throw Error(Oe(331));var i=sn;for(sn|=4,it=e.current;it!==null;){var o=it,a=o.child;if((it.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m9?Nf(e,0):g9|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=G2,G2<<=1,(G2&130023424)===0&&(G2=4194304)));var n=io();e=gu(e,t),e!==null&&(wv(e,t,n),Ao(e,n))}function ZY(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function XY(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,BY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,t4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l3(e,t),e=t.pendingProps;var i=S0(t,Vi.current);Xp(t,n),i=u9(null,t,r,e,i,n);var o=c9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lo(r)?(o=!0,J3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i9(t),i.updater=p5,t.stateNode=i,i._reactInternals=t,dw(t,r,e,n),t=pw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=JY(r),e=ds(r,e),i){case 0:t=hw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),hw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),i4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=k0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=k0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(w0(),r===i){t=mu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&lw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,rw(r,i)?a=null:o!==null&&rw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&lw(t),null;case 13:return jO(e,t,n);case 4:return o9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=C0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(n4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=mu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xp(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),l3(e,t),t.tag=1,Lo(r)?(e=!0,J3(t)):e=!1,Xp(t,n),mO(t,r,i),dw(t,r,i,n),pw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function QY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oa(e,t,n,r){return new QY(e,t,n,r)}function x9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function JY(e){if(typeof e=="function")return x9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Oa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function d3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ip:return Df(n.children,i,o,t);case B8:a=8,i|=8;break;case N6:return e=Oa(12,n,t,i|2),e.elementType=N6,e.lanes=o,e;case D6:return e=Oa(13,n,t,i),e.elementType=D6,e.lanes=o,e;case z6:return e=Oa(19,n,t,i),e.elementType=z6,e.lanes=o,e;case vM:return y5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Oa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Df(e,t,n,r){return e=Oa(7,e,r,t),e.lanes=n,e}function y5(e,t,n,r){return e=Oa(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function dS(e,t,n){return e=Oa(6,e,null,t),e.lanes=n,e}function fS(e,t,n){return t=Oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gx(0),this.expirationTimes=Gx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S9(e,t,n,r,i,o,a,s,l){return e=new eZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i9(o),e}function tZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=fa})(Al);const iy=A8(Al.exports);var lP=Al.exports;O6.createRoot=lP.createRoot,O6.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,C5={exports:{}},_5={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function uS(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fw(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var NY=typeof WeakMap=="function"?WeakMap:Map;function FO(e,t,n){n=fu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){u4||(u4=!0,ww=r),fw(e,t)},n}function $O(e,t,n){n=fu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){fw(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){fw(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function UE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new NY;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=YY.bind(null,e,t,n),t.then(e,e))}function jE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function GE(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=fu(-1,1),t.tag=2,Yc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var DY=ku.ReactCurrentOwner,Po=!1;function no(e,t,n,r){t.child=e===null?yO(t,null,n,r):C0(t,e.child,n,r)}function qE(e,t,n,r,i){n=n.render;var o=t.ref;return Xp(t,i),r=u9(e,t,n,r,o,i),n=c9(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mu(e,t,i)):(rr&&n&&X8(t),t.flags|=1,no(e,t,r,i),t.child)}function KE(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!x9(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,HO(e,t,o,r,i)):(e=d3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Bm,n(a,r)&&e.ref===t.ref)return mu(e,t,i)}return t.flags|=1,e=Qc(o,r),e.ref=t.ref,e.return=t,t.child=e}function HO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Bm(o,r)&&e.ref===t.ref)if(Po=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Po=!0);else return t.lanes=e.lanes,mu(e,t,i)}return hw(e,t,n,r,i)}function WO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gn(Hp,ea),ea|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Gn(Hp,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Gn(Hp,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Gn(Hp,ea),ea|=r;return no(e,t,i,n),t.child}function VO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hw(e,t,n,r,i){var o=Lo(n)?Uf:Vi.current;return o=S0(t,o),Xp(t,i),n=u9(e,t,n,r,o,i),r=c9(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mu(e,t,i)):(rr&&r&&X8(t),t.flags|=1,no(e,t,n,i),t.child)}function YE(e,t,n,r,i){if(Lo(n)){var o=!0;J3(t)}else o=!1;if(Xp(t,i),t.stateNode===null)l3(e,t),mO(t,n,r),dw(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Da(u):(u=Lo(n)?Uf:Vi.current,u=S0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&$E(t,a,r,u),Tc=!1;var m=t.memoizedState;a.state=m,i4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||To.current||Tc?(typeof h=="function"&&(cw(t,n,h,r),l=t.memoizedState),(s=Tc||FE(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,pO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ds(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Da(l):(l=Lo(n)?Uf:Vi.current,l=S0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&$E(t,a,r,l),Tc=!1,m=t.memoizedState,a.state=m,i4(t,r,a,i);var b=t.memoizedState;s!==g||m!==b||To.current||Tc?(typeof v=="function"&&(cw(t,n,v,r),b=t.memoizedState),(u=Tc||FE(t,n,u,r,m,b,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return pw(e,t,n,r,o,i)}function pw(e,t,n,r,i,o){VO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&RE(t,n,!1),mu(e,t,o);r=t.stateNode,DY.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=C0(t,e.child,null,o),t.child=C0(t,null,s,o)):no(e,t,s,o),t.memoizedState=r.state,i&&RE(t,n,!0),t.child}function UO(e){var t=e.stateNode;t.pendingContext?OE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&OE(e,t.context,!1),o9(e,t.containerInfo)}function ZE(e,t,n,r,i){return w0(),J8(i),t.flags|=256,no(e,t,n,r),t.child}var gw={dehydrated:null,treeContext:null,retryLane:0};function mw(e){return{baseLanes:e,cachePool:null,transitions:null}}function jO(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Gn(cr,i&1),e===null)return lw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=y5(a,r,0,null),e=Df(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=mw(n),t.memoizedState=gw,e):h9(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return zY(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qc(s,o):(o=Df(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?mw(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=gw,r}return o=e.child,e=o.sibling,r=Qc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function h9(e,t){return t=y5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ey(e,t,n,r){return r!==null&&J8(r),C0(t,e.child,null,n),e=h9(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zY(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=uS(Error(Oe(422))),ey(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=y5({mode:"visible",children:r.children},i,0,null),o=Df(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&C0(t,e.child,null,a),t.child.memoizedState=mw(a),t.memoizedState=gw,o);if((t.mode&1)===0)return ey(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Oe(419)),r=uS(o,r,void 0),ey(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=di,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,gu(e,i),ys(r,e,i,-1))}return b9(),r=uS(Error(Oe(421))),ey(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ZY.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,na=Kc(i.nextSibling),ra=t,rr=!0,ps=null,e!==null&&(Pa[Ta++]=uu,Pa[Ta++]=cu,Pa[Ta++]=jf,uu=e.id,cu=e.overflow,jf=t),t=h9(t,r.children),t.flags|=4096,t)}function XE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),uw(e.return,t,n)}function cS(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function GO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(no(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&XE(e,n,t);else if(e.tag===19)XE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Gn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&o4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cS(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&o4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cS(t,!0,n,null,o);break;case"together":cS(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function l3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Qc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function BY(e,t,n){switch(t.tag){case 3:UO(t),w0();break;case 5:bO(t);break;case 1:Lo(t.type)&&J3(t);break;case 4:o9(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Gn(n4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Gn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?jO(e,t,n):(Gn(cr,cr.current&1),e=mu(e,t,n),e!==null?e.sibling:null);Gn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return GO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Gn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,WO(e,t,n)}return mu(e,t,n)}var qO,vw,KO,YO;qO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};vw=function(){};KO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Af(bl.current);var o=null;switch(n){case"input":i=F6(e,i),r=F6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=W6(e,i),r=W6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=X3)}U6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Im.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Im.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Yn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};YO=function(e,t,n,r){n!==r&&(t.flags|=4)};function vg(e,t){if(!rr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function FY(e,t,n){var r=t.pendingProps;switch(Q8(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fi(t),null;case 1:return Lo(t.type)&&Q3(),Fi(t),null;case 3:return r=t.stateNode,_0(),Xn(To),Xn(Vi),s9(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Q2(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps!==null&&(kw(ps),ps=null))),vw(e,t),Fi(t),null;case 5:a9(t);var i=Af(Vm.current);if(n=t.type,e!==null&&t.stateNode!=null)KO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Fi(t),null}if(e=Af(bl.current),Q2(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hl]=t,r[Hm]=o,e=(t.mode&1)!==0,n){case"dialog":Yn("cancel",r),Yn("close",r);break;case"iframe":case"object":case"embed":Yn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[Hm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=j6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iE0&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304)}else{if(!r)if(e=o4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>E0&&n!==1073741824&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return y9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function $Y(e,t){switch(Q8(t),t.tag){case 1:return Lo(t.type)&&Q3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _0(),Xn(To),Xn(Vi),s9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a9(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));w0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return _0(),null;case 10:return n9(t.type._context),null;case 22:case 23:return y9(),null;case 24:return null;default:return null}}var ty=!1,Wi=!1,HY=typeof WeakSet=="function"?WeakSet:Set,it=null;function $p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function yw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function WY(e,t){if(tw=K3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(nw={focusedElem:e,selectionRange:n},K3=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){t=it;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,P=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}return b=QE,QE=!1,b}function sm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&yw(t,n,o)}i=i.next}while(i!==r)}}function m5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[Hm],delete t[ow],delete t[_Y],delete t[kY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=X3));else if(r!==4&&(e=e.child,e!==null))for(xw(e,t,n),e=e.sibling;e!==null;)xw(e,t,n),e=e.sibling}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}var Ti=null,fs=!1;function yc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(yl&&typeof yl.onCommitFiberUnmount=="function")try{yl.onCommitFiberUnmount(l5,n)}catch{}switch(n.tag){case 5:Wi||$p(n,t);case 6:var r=Ti,i=fs;Ti=null,yc(e,t,n),Ti=r,fs=i,Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ti.removeChild(n.stateNode));break;case 18:Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?rS(e.parentNode,n):e.nodeType===1&&rS(e,n),Dm(e)):rS(Ti,n.stateNode));break;case 4:r=Ti,i=fs,Ti=n.stateNode.containerInfo,fs=!0,yc(e,t,n),Ti=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&yw(n,t,a),i=i.next}while(i!==r)}yc(e,t,n);break;case 1:if(!Wi&&($p(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}yc(e,t,n);break;case 21:yc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,yc(e,t,n),Wi=r):yc(e,t,n);break;default:yc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HY),t.forEach(function(r){var i=XY.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,c4=0,(sn&6)!==0)throw Error(Oe(331));var i=sn;for(sn|=4,it=e.current;it!==null;){var o=it,a=o.child;if((it.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m9?Nf(e,0):g9|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=G2,G2<<=1,(G2&130023424)===0&&(G2=4194304)));var n=io();e=gu(e,t),e!==null&&(wv(e,t,n),Ao(e,n))}function ZY(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function XY(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,BY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,t4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l3(e,t),e=t.pendingProps;var i=S0(t,Vi.current);Xp(t,n),i=u9(null,t,r,e,i,n);var o=c9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lo(r)?(o=!0,J3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i9(t),i.updater=p5,t.stateNode=i,i._reactInternals=t,dw(t,r,e,n),t=pw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=JY(r),e=ds(r,e),i){case 0:t=hw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),hw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),i4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=k0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=k0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(w0(),r===i){t=mu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&lw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,rw(r,i)?a=null:o!==null&&rw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&lw(t),null;case 13:return jO(e,t,n);case 4:return o9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=C0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(n4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=mu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xp(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),l3(e,t),t.tag=1,Lo(r)?(e=!0,J3(t)):e=!1,Xp(t,n),mO(t,r,i),dw(t,r,i,n),pw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function QY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new QY(e,t,n,r)}function x9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function JY(e){if(typeof e=="function")return x9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function d3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ip:return Df(n.children,i,o,t);case B8:a=8,i|=8;break;case N6:return e=Ma(12,n,t,i|2),e.elementType=N6,e.lanes=o,e;case D6:return e=Ma(13,n,t,i),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(19,n,t,i),e.elementType=z6,e.lanes=o,e;case vM:return y5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Df(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function y5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function dS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function fS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gx(0),this.expirationTimes=Gx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S9(e,t,n,r,i,o,a,s,l){return e=new eZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i9(o),e}function tZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Il);const iy=A8(Il.exports);var lP=Il.exports;O6.createRoot=lP.createRoot,O6.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,C5={exports:{}},_5={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var aZ=C.exports,sZ=Symbol.for("react.element"),lZ=Symbol.for("react.fragment"),uZ=Object.prototype.hasOwnProperty,cZ=aZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dZ={key:!0,ref:!0,__self:!0,__source:!0};function fR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)uZ.call(t,r)&&!dZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:sZ,type:e,key:o,ref:a,props:i,_owner:cZ.current}}_5.Fragment=lZ;_5.jsx=fR;_5.jsxs=fR;(function(e){e.exports=_5})(C5);const Kn=C5.exports.Fragment,x=C5.exports.jsx,ee=C5.exports.jsxs,fZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Kn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var k9=C.exports.createContext({});k9.displayName="ColorModeContext";function Ev(){const e=C.exports.useContext(k9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var oy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function hZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?oy.dark:oy.light),document.body.classList.remove(r?oy.light:oy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var pZ="chakra-ui-color-mode";function gZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var mZ=gZ(pZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=mZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>hZ({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?uP:k,setColorMode:t?uP:E,forced:t!==void 0}),[P,k,E,t]);return x(k9.Provider,{value:T,children:n})}hR.displayName="ColorModeProvider";var Ew={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",k="[object Object]",T="[object Proxy]",I="[object RegExp]",O="[object Set]",N="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",re="[object Int32Array]",se="[object Uint8Array]",G="[object Uint8ClampedArray]",V="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[re]=ye[se]=ye[G]=ye[V]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[g]=ye[m]=ye[v]=ye[w]=ye[P]=ye[k]=ye[I]=ye[O]=ye[N]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,et=qe&&qe.exports===ct,tt=et&&Se.process,at=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||tt&&tt.binding&&tt.binding("util")}catch{}}(),At=at&&at.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function s1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=a1,Ro.prototype.get=Ou,Ro.prototype.has=Pd,Ro.prototype.set=s1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,mt&&Ch(pe[0],pe[1],mt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function va(U,ne){return U===ne||U!==U&&ne!==ne}var Md=Dl(function(){return arguments}())?Dl:function(U){return Wn(U)&&yn.call(U,"callee")&&!$e.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&kh(U.length)&&!$u(U)}function _h(U){return Wn(U)&&Ht(U)}var Fu=Qt||x1;function $u(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==T}function kh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Os(U)!=k)return!1;var ne=ln(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Eh=At?dt(At):Nu;function Rd(U){return jr(U,Ph(U))}function Ph(U){return Ht(U)?v1(U,!0):Rs(U)}var un=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Th(U){return U}function x1(){return!1}e.exports=un})(Ew,Ew.exports);const gl=Ew.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function If(e,...t){return vZ(e)?e(...t):e}var vZ=e=>typeof e=="function",yZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Pw=(e,t)=>n=>{const r=String(t),i=yZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Km(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Pw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ay=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Km({scale:e,transform:t}),r}}var bZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:bZ(t),transform:n?Km({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function SZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function wZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var CZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},_Z={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function kZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var EZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",PZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},TZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},LZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),AZ=e=>e.trim();function IZ(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(AZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(LZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),MZ=(e,t)=>IZ(e,t??{});function OZ(e){return/^var\(--.+\)$/.test(e)}var RZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,on={filter(e){return e!=="auto"?e:CZ},backdropFilter(e){return e!=="auto"?e:_Z},ring(e){return kZ(on.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?SZ():e==="auto-gpu"?wZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=RZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(OZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:MZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=EZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},oe={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",on.px),space:as("space",ay(on.vh,on.px)),spaceT:as("space",ay(on.vh,on.px)),degreeT(e){return{property:e,transform:on.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Km({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ay(on.vh,on.px)),sizesT:as("sizes",ay(on.vh,on.fraction)),shadows:as("shadows"),logical:xZ,blur:as("blur",on.blur)},f3={background:oe.colors("background"),backgroundColor:oe.colors("backgroundColor"),backgroundImage:oe.propT("backgroundImage",on.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:on.bgClip},bgSize:oe.prop("backgroundSize"),bgPosition:oe.prop("backgroundPosition"),bg:oe.colors("background"),bgColor:oe.colors("backgroundColor"),bgPos:oe.prop("backgroundPosition"),bgRepeat:oe.prop("backgroundRepeat"),bgAttachment:oe.prop("backgroundAttachment"),bgGradient:oe.propT("backgroundImage",on.gradient),bgClip:{transform:on.bgClip}};Object.assign(f3,{bgImage:f3.backgroundImage,bgImg:f3.backgroundImage});var pn={border:oe.borders("border"),borderWidth:oe.borderWidths("borderWidth"),borderStyle:oe.borderStyles("borderStyle"),borderColor:oe.colors("borderColor"),borderRadius:oe.radii("borderRadius"),borderTop:oe.borders("borderTop"),borderBlockStart:oe.borders("borderBlockStart"),borderTopLeftRadius:oe.radii("borderTopLeftRadius"),borderStartStartRadius:oe.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:oe.radii("borderTopRightRadius"),borderStartEndRadius:oe.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:oe.borders("borderRight"),borderInlineEnd:oe.borders("borderInlineEnd"),borderBottom:oe.borders("borderBottom"),borderBlockEnd:oe.borders("borderBlockEnd"),borderBottomLeftRadius:oe.radii("borderBottomLeftRadius"),borderBottomRightRadius:oe.radii("borderBottomRightRadius"),borderLeft:oe.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:oe.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:oe.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:oe.borders(["borderLeft","borderRight"]),borderInline:oe.borders("borderInline"),borderY:oe.borders(["borderTop","borderBottom"]),borderBlock:oe.borders("borderBlock"),borderTopWidth:oe.borderWidths("borderTopWidth"),borderBlockStartWidth:oe.borderWidths("borderBlockStartWidth"),borderTopColor:oe.colors("borderTopColor"),borderBlockStartColor:oe.colors("borderBlockStartColor"),borderTopStyle:oe.borderStyles("borderTopStyle"),borderBlockStartStyle:oe.borderStyles("borderBlockStartStyle"),borderBottomWidth:oe.borderWidths("borderBottomWidth"),borderBlockEndWidth:oe.borderWidths("borderBlockEndWidth"),borderBottomColor:oe.colors("borderBottomColor"),borderBlockEndColor:oe.colors("borderBlockEndColor"),borderBottomStyle:oe.borderStyles("borderBottomStyle"),borderBlockEndStyle:oe.borderStyles("borderBlockEndStyle"),borderLeftWidth:oe.borderWidths("borderLeftWidth"),borderInlineStartWidth:oe.borderWidths("borderInlineStartWidth"),borderLeftColor:oe.colors("borderLeftColor"),borderInlineStartColor:oe.colors("borderInlineStartColor"),borderLeftStyle:oe.borderStyles("borderLeftStyle"),borderInlineStartStyle:oe.borderStyles("borderInlineStartStyle"),borderRightWidth:oe.borderWidths("borderRightWidth"),borderInlineEndWidth:oe.borderWidths("borderInlineEndWidth"),borderRightColor:oe.colors("borderRightColor"),borderInlineEndColor:oe.colors("borderInlineEndColor"),borderRightStyle:oe.borderStyles("borderRightStyle"),borderInlineEndStyle:oe.borderStyles("borderInlineEndStyle"),borderTopRadius:oe.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:oe.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:oe.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:oe.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var NZ={color:oe.colors("color"),textColor:oe.colors("color"),fill:oe.colors("fill"),stroke:oe.colors("stroke")},Lw={boxShadow:oe.shadows("boxShadow"),mixBlendMode:!0,blendMode:oe.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:oe.prop("backgroundBlendMode"),opacity:!0};Object.assign(Lw,{shadow:Lw.boxShadow});var DZ={filter:{transform:on.filter},blur:oe.blur("--chakra-blur"),brightness:oe.propT("--chakra-brightness",on.brightness),contrast:oe.propT("--chakra-contrast",on.contrast),hueRotate:oe.degreeT("--chakra-hue-rotate"),invert:oe.propT("--chakra-invert",on.invert),saturate:oe.propT("--chakra-saturate",on.saturate),dropShadow:oe.propT("--chakra-drop-shadow",on.dropShadow),backdropFilter:{transform:on.backdropFilter},backdropBlur:oe.blur("--chakra-backdrop-blur"),backdropBrightness:oe.propT("--chakra-backdrop-brightness",on.brightness),backdropContrast:oe.propT("--chakra-backdrop-contrast",on.contrast),backdropHueRotate:oe.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:oe.propT("--chakra-backdrop-invert",on.invert),backdropSaturate:oe.propT("--chakra-backdrop-saturate",on.saturate)},h4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:on.flexDirection},experimental_spaceX:{static:PZ,transform:Km({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:TZ,transform:Km({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:oe.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:oe.space("gap"),rowGap:oe.space("rowGap"),columnGap:oe.space("columnGap")};Object.assign(h4,{flexDir:h4.flexDirection});var yR={gridGap:oe.space("gridGap"),gridColumnGap:oe.space("gridColumnGap"),gridRowGap:oe.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},zZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:on.outline},outlineOffset:!0,outlineColor:oe.colors("outlineColor")},Pa={width:oe.sizesT("width"),inlineSize:oe.sizesT("inlineSize"),height:oe.sizes("height"),blockSize:oe.sizes("blockSize"),boxSize:oe.sizes(["width","height"]),minWidth:oe.sizes("minWidth"),minInlineSize:oe.sizes("minInlineSize"),minHeight:oe.sizes("minHeight"),minBlockSize:oe.sizes("minBlockSize"),maxWidth:oe.sizes("maxWidth"),maxInlineSize:oe.sizes("maxInlineSize"),maxHeight:oe.sizes("maxHeight"),maxBlockSize:oe.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:oe.propT("float",on.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Pa,{w:Pa.width,h:Pa.height,minW:Pa.minWidth,maxW:Pa.maxWidth,minH:Pa.minHeight,maxH:Pa.maxHeight,overscroll:Pa.overscrollBehavior,overscrollX:Pa.overscrollBehaviorX,overscrollY:Pa.overscrollBehaviorY});var BZ={listStyleType:!0,listStylePosition:!0,listStylePos:oe.prop("listStylePosition"),listStyleImage:!0,listStyleImg:oe.prop("listStyleImage")};function FZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},HZ=$Z(FZ),WZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},VZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},hS=(e,t,n)=>{const r={},i=HZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},UZ={srOnly:{transform(e){return e===!0?WZ:e==="focusable"?VZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>hS(t,e,n)}},cm={position:!0,pos:oe.prop("position"),zIndex:oe.prop("zIndex","zIndices"),inset:oe.spaceT("inset"),insetX:oe.spaceT(["left","right"]),insetInline:oe.spaceT("insetInline"),insetY:oe.spaceT(["top","bottom"]),insetBlock:oe.spaceT("insetBlock"),top:oe.spaceT("top"),insetBlockStart:oe.spaceT("insetBlockStart"),bottom:oe.spaceT("bottom"),insetBlockEnd:oe.spaceT("insetBlockEnd"),left:oe.spaceT("left"),insetInlineStart:oe.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:oe.spaceT("right"),insetInlineEnd:oe.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(cm,{insetStart:cm.insetInlineStart,insetEnd:cm.insetInlineEnd});var jZ={ring:{transform:on.ring},ringColor:oe.colors("--chakra-ring-color"),ringOffset:oe.prop("--chakra-ring-offset-width"),ringOffsetColor:oe.colors("--chakra-ring-offset-color"),ringInset:oe.prop("--chakra-ring-inset")},Zn={margin:oe.spaceT("margin"),marginTop:oe.spaceT("marginTop"),marginBlockStart:oe.spaceT("marginBlockStart"),marginRight:oe.spaceT("marginRight"),marginInlineEnd:oe.spaceT("marginInlineEnd"),marginBottom:oe.spaceT("marginBottom"),marginBlockEnd:oe.spaceT("marginBlockEnd"),marginLeft:oe.spaceT("marginLeft"),marginInlineStart:oe.spaceT("marginInlineStart"),marginX:oe.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:oe.spaceT("marginInline"),marginY:oe.spaceT(["marginTop","marginBottom"]),marginBlock:oe.spaceT("marginBlock"),padding:oe.space("padding"),paddingTop:oe.space("paddingTop"),paddingBlockStart:oe.space("paddingBlockStart"),paddingRight:oe.space("paddingRight"),paddingBottom:oe.space("paddingBottom"),paddingBlockEnd:oe.space("paddingBlockEnd"),paddingLeft:oe.space("paddingLeft"),paddingInlineStart:oe.space("paddingInlineStart"),paddingInlineEnd:oe.space("paddingInlineEnd"),paddingX:oe.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:oe.space("paddingInline"),paddingY:oe.space(["paddingTop","paddingBottom"]),paddingBlock:oe.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var GZ={textDecorationColor:oe.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:oe.shadows("textShadow")},qZ={clipPath:!0,transform:oe.propT("transform",on.transform),transformOrigin:!0,translateX:oe.spaceT("--chakra-translate-x"),translateY:oe.spaceT("--chakra-translate-y"),skewX:oe.degreeT("--chakra-skew-x"),skewY:oe.degreeT("--chakra-skew-y"),scaleX:oe.prop("--chakra-scale-x"),scaleY:oe.prop("--chakra-scale-y"),scale:oe.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:oe.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:oe.prop("transitionDuration","transition.duration"),transitionProperty:oe.prop("transitionProperty","transition.property"),transitionTimingFunction:oe.prop("transitionTimingFunction","transition.easing")},YZ={fontFamily:oe.prop("fontFamily","fonts"),fontSize:oe.prop("fontSize","fontSizes",on.px),fontWeight:oe.prop("fontWeight","fontWeights"),lineHeight:oe.prop("lineHeight","lineHeights"),letterSpacing:oe.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:oe.spaceT("scrollMargin"),scrollMarginTop:oe.spaceT("scrollMarginTop"),scrollMarginBottom:oe.spaceT("scrollMarginBottom"),scrollMarginLeft:oe.spaceT("scrollMarginLeft"),scrollMarginRight:oe.spaceT("scrollMarginRight"),scrollMarginX:oe.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:oe.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:oe.spaceT("scrollPadding"),scrollPaddingTop:oe.spaceT("scrollPaddingTop"),scrollPaddingBottom:oe.spaceT("scrollPaddingBottom"),scrollPaddingLeft:oe.spaceT("scrollPaddingLeft"),scrollPaddingRight:oe.spaceT("scrollPaddingRight"),scrollPaddingX:oe.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:oe.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var k5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${k5("+",...e)})`,hP=(...e)=>`calc(${k5("-",...e)})`,Aw=(...e)=>`calc(${k5("*",...e)})`,pP=(...e)=>`calc(${k5("/",...e)})`,gP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Aw(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(fP(e,...t)),subtract:(...t)=>_f(hP(e,...t)),multiply:(...t)=>_f(Aw(e,...t)),divide:(...t)=>_f(pP(e,...t)),negate:()=>_f(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Aw,divide:pP,negate:gP});function XZ(e,t="-"){return e.replace(/\s+/g,t)}function QZ(e){const t=XZ(e.toString());return eX(JZ(t))}function JZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function eX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function tX(e,t=""){return[t,e].filter(Boolean).join("-")}function nX(e,t){return`var(${e}${t?`, ${t}`:""})`}function rX(e,t=""){return QZ(`--${tX(e,t)}`)}function ei(e,t,n){const r=rX(e,n);return{variable:r,reference:nX(r,t)}}function iX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function oX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Iw(e){if(e==null)return e;const{unitless:t}=oX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E9=e=>Object.fromEntries(Object.entries(e).sort(xR));function mP(e){const t=E9(e);return Object.assign(Object.values(t),t)}function aX(e){const t=Object.keys(E9(e));return new Set(t)}function vP(e){if(!e)return e;e=Iw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Wg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Iw(e)})`),t&&n.push("and",`(max-width: ${Iw(t)})`),n.join(" ")}function sX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Wg(null,u),minWQuery:Wg(a),minMaxQuery:Wg(a,u)}}),r=aX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:E9(e),asArray:mP(e),details:n,media:[null,...t.map(o=>Wg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;iX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),E5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},lX=Object.keys(E5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function uX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:P}=yP(b,t?.cssVarPrefix);return P},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const P=h(b);if(v==="default")return m[l]=P,m;const E=((w=E5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function cX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var fX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function hX(e){return dX(e,fX)}function pX(e){return e.semanticTokens}function gX(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function mX({tokens:e,semanticTokens:t}){const n=Object.entries(Mw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Mw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Mw(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Mw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function vX(e){var t;const n=gX(e),r=hX(n),i=pX(n),o=mX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=uX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:sX(n.breakpoints)}),n}var P9=gl({},f3,pn,NZ,h4,Pa,DZ,jZ,zZ,yR,UZ,cm,Lw,Zn,ZZ,YZ,GZ,qZ,BZ,KZ),yX=Object.assign({},Zn,Pa,h4,yR,cm),bX=Object.keys(yX),xX=[...Object.keys(P9),...lX],SX={...P9,...E5},wX=e=>e in SX,CX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=If(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!kX(t),PX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=_X(t);return t=n(i)??r(o)??r(t),t};function TX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=If(o,r),u=CX(l)(r);let h={};for(let g in u){const m=u[g];let v=If(m,r);g in n&&(g=n[g]),EX(g,v)&&(v=PX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const P=If(b?.property,r);if(!a&&b?.static){const E=If(b.static,r);h=gl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&xs(w)?h=gl({},h,w):h[P]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>TX({theme:t,pseudos:E5,configs:P9})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function LX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function AX(e,t){for(let n=t+1;n{gl(u,{[T]:m?k[T]:{[E]:k[T]}})});continue}if(!v){m?gl(u,k):u[E]=k;continue}u[E]=k}}return u}}function MX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IX(i);return gl({},If(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function OX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return cX(e,["styleConfig","size","variant","colorScheme"])}function RX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Li(V0,--Oo):0,P0--,$r===10&&(P0=1,T5--),$r}function ia(){return $r=Oo2||Zm($r)>3?"":" "}function GX(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Pv(e,h3()+(t<6&&bl()==32&&ia()==32))}function Rw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Rw($r);break;case 40:e===41&&Rw(e);break;case 92:ia();break}return Oo}function qX(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Pv(t,Oo-1)+"*"+P5(e===47?e:ia())}function KX(e){for(;!Zm(bl());)ia();return Pv(e,Oo)}function YX(e){return TR(g3("",null,null,null,[""],e=PR(e),0,[0],e))}function g3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,P=1,E=1,k=0,T="",I=i,O=o,N=r,D=T;P;)switch(b=k,k=ia()){case 40:if(b!=108&&Li(D,g-1)==58){Ow(D+=wn(p3(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=p3(k);break;case 9:case 10:case 13:case 32:D+=jX(b);break;case 92:D+=GX(h3()-1,7);continue;case 47:switch(bl()){case 42:case 47:sy(ZX(qX(ia(),h3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=ul(D)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:P=0;case 59+h:v>0&&ul(D)-g&&sy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(sy(N=bP(D,t,n,u,h,i,s,T,I=[],O=[],g),o),k===123)if(h===0)g3(D,t,N,N,I,o,g,s,O);else switch(m===99&&Li(D,3)===110?100:m){case 100:case 109:case 115:g3(e,N,N,r&&sy(bP(e,N,N,0,0,i,s,T,i,I=[],g),O),i,O,g,s,r?I:O);break;default:g3(D,N,N,N,[""],O,0,s,O)}}u=h=v=0,w=E=1,T=D="",g=a;break;case 58:g=1+ul(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&UX()==125)continue}switch(D+=P5(k),k*w){case 38:E=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(ul(D)-1)*E,E=1;break;case 64:bl()===45&&(D+=p3(ia())),m=bl(),h=g=ul(T=D+=KX(h3())),k++;break;case 45:b===45&&ul(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A9(m),b=0,w=0,P=0;b0?m[E]+" "+k:wn(k,/&\f/g,m[E])))&&(l[P++]=T);return L5(e,t,n,i===0?T9:s,l,u,h)}function ZX(e,t,n){return L5(e,t,n,CR,P5(VX()),Ym(e,2,-2),0)}function xP(e,t,n,r){return L5(e,t,n,L9,Ym(e,0,r),Ym(e,r+1,-1),r)}function Jp(e,t){for(var n="",r=A9(e),i=0;i6)switch(Li(e,t+1)){case 109:if(Li(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+p4+(Li(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ow(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Li(e,t+1)!==115)break;case 6444:switch(Li(e,ul(e)-3-(~Ow(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Li(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Li(e,t+11)){case 114:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+$i+e+e}return e}var oQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L9:t.return=AR(t.value,t.length);break;case _R:return Jp([bg(t,{value:wn(t.value,"@","@"+gn)})],i);case T9:if(t.length)return WX(t.props,function(o){switch(HX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jp([bg(t,{props:[wn(o,/:(read-\w+)/,":"+p4+"$1")]})],i);case"::placeholder":return Jp([bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,":"+p4+"$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},aQ=[oQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||aQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?oy.dark:oy.light),document.body.classList.remove(r?oy.light:oy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var pZ="chakra-ui-color-mode";function gZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var mZ=gZ(pZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=mZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>hZ({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?uP:k,setColorMode:t?uP:E,forced:t!==void 0}),[P,k,E,t]);return x(k9.Provider,{value:T,children:n})}hR.displayName="ColorModeProvider";var Ew={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",k="[object Object]",T="[object Proxy]",I="[object RegExp]",O="[object Set]",N="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",re="[object Int32Array]",se="[object Uint8Array]",G="[object Uint8ClampedArray]",V="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[re]=ye[se]=ye[G]=ye[V]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[g]=ye[m]=ye[v]=ye[w]=ye[P]=ye[k]=ye[I]=ye[O]=ye[N]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,et=qe&&qe.exports===ct,tt=et&&Se.process,at=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||tt&&tt.binding&&tt.binding("util")}catch{}}(),At=at&&at.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function s1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=a1,Ro.prototype.get=Ou,Ro.prototype.has=Pd,Ro.prototype.set=s1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,mt&&Ch(pe[0],pe[1],mt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Md=zl(function(){return arguments}())?zl:function(U){return Wn(U)&&yn.call(U,"callee")&&!$e.call(U,"callee")},$l=Array.isArray;function Ht(U){return U!=null&&kh(U.length)&&!$u(U)}function _h(U){return Wn(U)&&Ht(U)}var Fu=Qt||x1;function $u(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==T}function kh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Os(U)!=k)return!1;var ne=ln(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Eh=At?dt(At):Nu;function Rd(U){return jr(U,Ph(U))}function Ph(U){return Ht(U)?v1(U,!0):Rs(U)}var un=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Th(U){return U}function x1(){return!1}e.exports=un})(Ew,Ew.exports);const ml=Ew.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function If(e,...t){return vZ(e)?e(...t):e}var vZ=e=>typeof e=="function",yZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Pw=(e,t)=>n=>{const r=String(t),i=yZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Km(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Pw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ay=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Km({scale:e,transform:t}),r}}var bZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:bZ(t),transform:n?Km({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function SZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function wZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var CZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},_Z={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function kZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var EZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",PZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},TZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},LZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),AZ=e=>e.trim();function IZ(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(AZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(LZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),MZ=(e,t)=>IZ(e,t??{});function OZ(e){return/^var\(--.+\)$/.test(e)}var RZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,on={filter(e){return e!=="auto"?e:CZ},backdropFilter(e){return e!=="auto"?e:_Z},ring(e){return kZ(on.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?SZ():e==="auto-gpu"?wZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=RZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(OZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:MZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=EZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},oe={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",on.px),space:as("space",ay(on.vh,on.px)),spaceT:as("space",ay(on.vh,on.px)),degreeT(e){return{property:e,transform:on.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Km({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ay(on.vh,on.px)),sizesT:as("sizes",ay(on.vh,on.fraction)),shadows:as("shadows"),logical:xZ,blur:as("blur",on.blur)},f3={background:oe.colors("background"),backgroundColor:oe.colors("backgroundColor"),backgroundImage:oe.propT("backgroundImage",on.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:on.bgClip},bgSize:oe.prop("backgroundSize"),bgPosition:oe.prop("backgroundPosition"),bg:oe.colors("background"),bgColor:oe.colors("backgroundColor"),bgPos:oe.prop("backgroundPosition"),bgRepeat:oe.prop("backgroundRepeat"),bgAttachment:oe.prop("backgroundAttachment"),bgGradient:oe.propT("backgroundImage",on.gradient),bgClip:{transform:on.bgClip}};Object.assign(f3,{bgImage:f3.backgroundImage,bgImg:f3.backgroundImage});var pn={border:oe.borders("border"),borderWidth:oe.borderWidths("borderWidth"),borderStyle:oe.borderStyles("borderStyle"),borderColor:oe.colors("borderColor"),borderRadius:oe.radii("borderRadius"),borderTop:oe.borders("borderTop"),borderBlockStart:oe.borders("borderBlockStart"),borderTopLeftRadius:oe.radii("borderTopLeftRadius"),borderStartStartRadius:oe.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:oe.radii("borderTopRightRadius"),borderStartEndRadius:oe.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:oe.borders("borderRight"),borderInlineEnd:oe.borders("borderInlineEnd"),borderBottom:oe.borders("borderBottom"),borderBlockEnd:oe.borders("borderBlockEnd"),borderBottomLeftRadius:oe.radii("borderBottomLeftRadius"),borderBottomRightRadius:oe.radii("borderBottomRightRadius"),borderLeft:oe.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:oe.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:oe.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:oe.borders(["borderLeft","borderRight"]),borderInline:oe.borders("borderInline"),borderY:oe.borders(["borderTop","borderBottom"]),borderBlock:oe.borders("borderBlock"),borderTopWidth:oe.borderWidths("borderTopWidth"),borderBlockStartWidth:oe.borderWidths("borderBlockStartWidth"),borderTopColor:oe.colors("borderTopColor"),borderBlockStartColor:oe.colors("borderBlockStartColor"),borderTopStyle:oe.borderStyles("borderTopStyle"),borderBlockStartStyle:oe.borderStyles("borderBlockStartStyle"),borderBottomWidth:oe.borderWidths("borderBottomWidth"),borderBlockEndWidth:oe.borderWidths("borderBlockEndWidth"),borderBottomColor:oe.colors("borderBottomColor"),borderBlockEndColor:oe.colors("borderBlockEndColor"),borderBottomStyle:oe.borderStyles("borderBottomStyle"),borderBlockEndStyle:oe.borderStyles("borderBlockEndStyle"),borderLeftWidth:oe.borderWidths("borderLeftWidth"),borderInlineStartWidth:oe.borderWidths("borderInlineStartWidth"),borderLeftColor:oe.colors("borderLeftColor"),borderInlineStartColor:oe.colors("borderInlineStartColor"),borderLeftStyle:oe.borderStyles("borderLeftStyle"),borderInlineStartStyle:oe.borderStyles("borderInlineStartStyle"),borderRightWidth:oe.borderWidths("borderRightWidth"),borderInlineEndWidth:oe.borderWidths("borderInlineEndWidth"),borderRightColor:oe.colors("borderRightColor"),borderInlineEndColor:oe.colors("borderInlineEndColor"),borderRightStyle:oe.borderStyles("borderRightStyle"),borderInlineEndStyle:oe.borderStyles("borderInlineEndStyle"),borderTopRadius:oe.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:oe.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:oe.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:oe.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var NZ={color:oe.colors("color"),textColor:oe.colors("color"),fill:oe.colors("fill"),stroke:oe.colors("stroke")},Lw={boxShadow:oe.shadows("boxShadow"),mixBlendMode:!0,blendMode:oe.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:oe.prop("backgroundBlendMode"),opacity:!0};Object.assign(Lw,{shadow:Lw.boxShadow});var DZ={filter:{transform:on.filter},blur:oe.blur("--chakra-blur"),brightness:oe.propT("--chakra-brightness",on.brightness),contrast:oe.propT("--chakra-contrast",on.contrast),hueRotate:oe.degreeT("--chakra-hue-rotate"),invert:oe.propT("--chakra-invert",on.invert),saturate:oe.propT("--chakra-saturate",on.saturate),dropShadow:oe.propT("--chakra-drop-shadow",on.dropShadow),backdropFilter:{transform:on.backdropFilter},backdropBlur:oe.blur("--chakra-backdrop-blur"),backdropBrightness:oe.propT("--chakra-backdrop-brightness",on.brightness),backdropContrast:oe.propT("--chakra-backdrop-contrast",on.contrast),backdropHueRotate:oe.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:oe.propT("--chakra-backdrop-invert",on.invert),backdropSaturate:oe.propT("--chakra-backdrop-saturate",on.saturate)},h4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:on.flexDirection},experimental_spaceX:{static:PZ,transform:Km({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:TZ,transform:Km({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:oe.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:oe.space("gap"),rowGap:oe.space("rowGap"),columnGap:oe.space("columnGap")};Object.assign(h4,{flexDir:h4.flexDirection});var yR={gridGap:oe.space("gridGap"),gridColumnGap:oe.space("gridColumnGap"),gridRowGap:oe.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},zZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:on.outline},outlineOffset:!0,outlineColor:oe.colors("outlineColor")},Ea={width:oe.sizesT("width"),inlineSize:oe.sizesT("inlineSize"),height:oe.sizes("height"),blockSize:oe.sizes("blockSize"),boxSize:oe.sizes(["width","height"]),minWidth:oe.sizes("minWidth"),minInlineSize:oe.sizes("minInlineSize"),minHeight:oe.sizes("minHeight"),minBlockSize:oe.sizes("minBlockSize"),maxWidth:oe.sizes("maxWidth"),maxInlineSize:oe.sizes("maxInlineSize"),maxHeight:oe.sizes("maxHeight"),maxBlockSize:oe.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:oe.propT("float",on.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var BZ={listStyleType:!0,listStylePosition:!0,listStylePos:oe.prop("listStylePosition"),listStyleImage:!0,listStyleImg:oe.prop("listStyleImage")};function FZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},HZ=$Z(FZ),WZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},VZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},hS=(e,t,n)=>{const r={},i=HZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},UZ={srOnly:{transform(e){return e===!0?WZ:e==="focusable"?VZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>hS(t,e,n)}},cm={position:!0,pos:oe.prop("position"),zIndex:oe.prop("zIndex","zIndices"),inset:oe.spaceT("inset"),insetX:oe.spaceT(["left","right"]),insetInline:oe.spaceT("insetInline"),insetY:oe.spaceT(["top","bottom"]),insetBlock:oe.spaceT("insetBlock"),top:oe.spaceT("top"),insetBlockStart:oe.spaceT("insetBlockStart"),bottom:oe.spaceT("bottom"),insetBlockEnd:oe.spaceT("insetBlockEnd"),left:oe.spaceT("left"),insetInlineStart:oe.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:oe.spaceT("right"),insetInlineEnd:oe.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(cm,{insetStart:cm.insetInlineStart,insetEnd:cm.insetInlineEnd});var jZ={ring:{transform:on.ring},ringColor:oe.colors("--chakra-ring-color"),ringOffset:oe.prop("--chakra-ring-offset-width"),ringOffsetColor:oe.colors("--chakra-ring-offset-color"),ringInset:oe.prop("--chakra-ring-inset")},Zn={margin:oe.spaceT("margin"),marginTop:oe.spaceT("marginTop"),marginBlockStart:oe.spaceT("marginBlockStart"),marginRight:oe.spaceT("marginRight"),marginInlineEnd:oe.spaceT("marginInlineEnd"),marginBottom:oe.spaceT("marginBottom"),marginBlockEnd:oe.spaceT("marginBlockEnd"),marginLeft:oe.spaceT("marginLeft"),marginInlineStart:oe.spaceT("marginInlineStart"),marginX:oe.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:oe.spaceT("marginInline"),marginY:oe.spaceT(["marginTop","marginBottom"]),marginBlock:oe.spaceT("marginBlock"),padding:oe.space("padding"),paddingTop:oe.space("paddingTop"),paddingBlockStart:oe.space("paddingBlockStart"),paddingRight:oe.space("paddingRight"),paddingBottom:oe.space("paddingBottom"),paddingBlockEnd:oe.space("paddingBlockEnd"),paddingLeft:oe.space("paddingLeft"),paddingInlineStart:oe.space("paddingInlineStart"),paddingInlineEnd:oe.space("paddingInlineEnd"),paddingX:oe.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:oe.space("paddingInline"),paddingY:oe.space(["paddingTop","paddingBottom"]),paddingBlock:oe.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var GZ={textDecorationColor:oe.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:oe.shadows("textShadow")},qZ={clipPath:!0,transform:oe.propT("transform",on.transform),transformOrigin:!0,translateX:oe.spaceT("--chakra-translate-x"),translateY:oe.spaceT("--chakra-translate-y"),skewX:oe.degreeT("--chakra-skew-x"),skewY:oe.degreeT("--chakra-skew-y"),scaleX:oe.prop("--chakra-scale-x"),scaleY:oe.prop("--chakra-scale-y"),scale:oe.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:oe.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:oe.prop("transitionDuration","transition.duration"),transitionProperty:oe.prop("transitionProperty","transition.property"),transitionTimingFunction:oe.prop("transitionTimingFunction","transition.easing")},YZ={fontFamily:oe.prop("fontFamily","fonts"),fontSize:oe.prop("fontSize","fontSizes",on.px),fontWeight:oe.prop("fontWeight","fontWeights"),lineHeight:oe.prop("lineHeight","lineHeights"),letterSpacing:oe.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:oe.spaceT("scrollMargin"),scrollMarginTop:oe.spaceT("scrollMarginTop"),scrollMarginBottom:oe.spaceT("scrollMarginBottom"),scrollMarginLeft:oe.spaceT("scrollMarginLeft"),scrollMarginRight:oe.spaceT("scrollMarginRight"),scrollMarginX:oe.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:oe.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:oe.spaceT("scrollPadding"),scrollPaddingTop:oe.spaceT("scrollPaddingTop"),scrollPaddingBottom:oe.spaceT("scrollPaddingBottom"),scrollPaddingLeft:oe.spaceT("scrollPaddingLeft"),scrollPaddingRight:oe.spaceT("scrollPaddingRight"),scrollPaddingX:oe.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:oe.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var k5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${k5("+",...e)})`,hP=(...e)=>`calc(${k5("-",...e)})`,Aw=(...e)=>`calc(${k5("*",...e)})`,pP=(...e)=>`calc(${k5("/",...e)})`,gP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Aw(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(fP(e,...t)),subtract:(...t)=>_f(hP(e,...t)),multiply:(...t)=>_f(Aw(e,...t)),divide:(...t)=>_f(pP(e,...t)),negate:()=>_f(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Aw,divide:pP,negate:gP});function XZ(e,t="-"){return e.replace(/\s+/g,t)}function QZ(e){const t=XZ(e.toString());return eX(JZ(t))}function JZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function eX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function tX(e,t=""){return[t,e].filter(Boolean).join("-")}function nX(e,t){return`var(${e}${t?`, ${t}`:""})`}function rX(e,t=""){return QZ(`--${tX(e,t)}`)}function ei(e,t,n){const r=rX(e,n);return{variable:r,reference:nX(r,t)}}function iX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function oX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Iw(e){if(e==null)return e;const{unitless:t}=oX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E9=e=>Object.fromEntries(Object.entries(e).sort(xR));function mP(e){const t=E9(e);return Object.assign(Object.values(t),t)}function aX(e){const t=Object.keys(E9(e));return new Set(t)}function vP(e){if(!e)return e;e=Iw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Wg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Iw(e)})`),t&&n.push("and",`(max-width: ${Iw(t)})`),n.join(" ")}function sX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Wg(null,u),minWQuery:Wg(a),minMaxQuery:Wg(a,u)}}),r=aX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:E9(e),asArray:mP(e),details:n,media:[null,...t.map(o=>Wg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;iX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),eu=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),E5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:eu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:eu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:eu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:eu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:eu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:eu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:eu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:eu(Ci.focusWithin),_peerPlaceholderShown:eu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},lX=Object.keys(E5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function uX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:P}=yP(b,t?.cssVarPrefix);return P},g=xs(s)?s:{default:s};n=ml(n,Object.entries(g).reduce((m,[v,b])=>{var w;const P=h(b);if(v==="default")return m[l]=P,m;const E=((w=E5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function cX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var fX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function hX(e){return dX(e,fX)}function pX(e){return e.semanticTokens}function gX(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function mX({tokens:e,semanticTokens:t}){const n=Object.entries(Mw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Mw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Mw(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Mw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function vX(e){var t;const n=gX(e),r=hX(n),i=pX(n),o=mX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=uX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:sX(n.breakpoints)}),n}var P9=ml({},f3,pn,NZ,h4,Ea,DZ,jZ,zZ,yR,UZ,cm,Lw,Zn,ZZ,YZ,GZ,qZ,BZ,KZ),yX=Object.assign({},Zn,Ea,h4,yR,cm),bX=Object.keys(yX),xX=[...Object.keys(P9),...lX],SX={...P9,...E5},wX=e=>e in SX,CX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=If(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!kX(t),PX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=_X(t);return t=n(i)??r(o)??r(t),t};function TX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=If(o,r),u=CX(l)(r);let h={};for(let g in u){const m=u[g];let v=If(m,r);g in n&&(g=n[g]),EX(g,v)&&(v=PX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=ml({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const P=If(b?.property,r);if(!a&&b?.static){const E=If(b.static,r);h=ml({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&xs(w)?h=ml({},h,w):h[P]=w;continue}if(xs(w)){h=ml({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>TX({theme:t,pseudos:E5,configs:P9})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function LX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function AX(e,t){for(let n=t+1;n{ml(u,{[T]:m?k[T]:{[E]:k[T]}})});continue}if(!v){m?ml(u,k):u[E]=k;continue}u[E]=k}}return u}}function MX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IX(i);return ml({},If(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function OX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return cX(e,["styleConfig","size","variant","colorScheme"])}function RX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Li(V0,--Oo):0,P0--,$r===10&&(P0=1,T5--),$r}function ia(){return $r=Oo2||Zm($r)>3?"":" "}function GX(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Pv(e,h3()+(t<6&&xl()==32&&ia()==32))}function Rw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Rw($r);break;case 40:e===41&&Rw(e);break;case 92:ia();break}return Oo}function qX(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Pv(t,Oo-1)+"*"+P5(e===47?e:ia())}function KX(e){for(;!Zm(xl());)ia();return Pv(e,Oo)}function YX(e){return TR(g3("",null,null,null,[""],e=PR(e),0,[0],e))}function g3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,P=1,E=1,k=0,T="",I=i,O=o,N=r,D=T;P;)switch(b=k,k=ia()){case 40:if(b!=108&&Li(D,g-1)==58){Ow(D+=wn(p3(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=p3(k);break;case 9:case 10:case 13:case 32:D+=jX(b);break;case 92:D+=GX(h3()-1,7);continue;case 47:switch(xl()){case 42:case 47:sy(ZX(qX(ia(),h3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:P=0;case 59+h:v>0&&cl(D)-g&&sy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(sy(N=bP(D,t,n,u,h,i,s,T,I=[],O=[],g),o),k===123)if(h===0)g3(D,t,N,N,I,o,g,s,O);else switch(m===99&&Li(D,3)===110?100:m){case 100:case 109:case 115:g3(e,N,N,r&&sy(bP(e,N,N,0,0,i,s,T,i,I=[],g),O),i,O,g,s,r?I:O);break;default:g3(D,N,N,N,[""],O,0,s,O)}}u=h=v=0,w=E=1,T=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&UX()==125)continue}switch(D+=P5(k),k*w){case 38:E=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*E,E=1;break;case 64:xl()===45&&(D+=p3(ia())),m=xl(),h=g=cl(T=D+=KX(h3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A9(m),b=0,w=0,P=0;b0?m[E]+" "+k:wn(k,/&\f/g,m[E])))&&(l[P++]=T);return L5(e,t,n,i===0?T9:s,l,u,h)}function ZX(e,t,n){return L5(e,t,n,CR,P5(VX()),Ym(e,2,-2),0)}function xP(e,t,n,r){return L5(e,t,n,L9,Ym(e,0,r),Ym(e,r+1,-1),r)}function Jp(e,t){for(var n="",r=A9(e),i=0;i6)switch(Li(e,t+1)){case 109:if(Li(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+p4+(Li(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ow(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Li(e,t+1)!==115)break;case 6444:switch(Li(e,cl(e)-3-(~Ow(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Li(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Li(e,t+11)){case 114:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+$i+e+e}return e}var oQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L9:t.return=AR(t.value,t.length);break;case _R:return Jp([bg(t,{value:wn(t.value,"@","@"+gn)})],i);case T9:if(t.length)return WX(t.props,function(o){switch(HX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jp([bg(t,{props:[wn(o,/:(read-\w+)/,":"+p4+"$1")]})],i);case"::placeholder":return Jp([bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,":"+p4+"$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},aQ=[oQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||aQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yQ=/[A-Z]|^ms/g,bQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},pS=LR(function(e){return BR(e)?e:e.replace(yQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bQ,function(r,i,o){return cl={name:i,styles:o,next:cl},i})}return vQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function Xm(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return cl={name:n.name,styles:n.styles,next:cl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)cl={name:r.name,styles:r.styles,next:cl},r=r.next;var i=n.styles+";";return i}return xQ(e,t,n)}case"function":{if(e!==void 0){var o=cl,a=n(e);return cl=o,Xm(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function zQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},jR=BQ(zQ);function GR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var qR=e=>GR(e,t=>t!=null);function FQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $Q=FQ();function KR(e,...t){return NQ(e)?e(...t):e}function HQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function WQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var VQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,UQ=LR(function(e){return VQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jQ=UQ,GQ=function(t){return t!=="theme"},TP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jQ:GQ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},qQ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),wQ(function(){return zR(n,r,i)}),null},KQ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||TP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZQ=In("accordion").parts("root","container","button","panel").extend("icon"),XQ=In("alert").parts("title","description","container").extend("icon","spinner"),QQ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),JQ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var eJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var tJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),nJ=In("editable").parts("preview","input","textarea"),rJ=In("form").parts("container","requiredIndicator","helperText"),iJ=In("formError").parts("text","icon"),oJ=In("input").parts("addon","field","element"),aJ=In("list").parts("container","item","icon"),sJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),lJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),uJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var cJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),dJ=In("progress").parts("label","filledTrack","track"),fJ=In("radio").parts("container","control","label"),hJ=In("select").parts("field","icon"),pJ=In("slider").parts("container","track","thumb","filledTrack","mark"),gJ=In("stat").parts("container","label","helpText","number","icon"),mJ=In("switch").parts("container","track","thumb"),vJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),yJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),bJ=In("tag").parts("container","label","closeButton");function Mi(e,t){xJ(e)&&(e="100%");var n=SJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ly(e){return Math.min(1,Math.max(0,e))}function xJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function SJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function wJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function CJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=gS(s,a,e+1/3),i=gS(s,a,e),o=gS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Bw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function TJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=IJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=wJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=uy(e.s),i=uy(e.v),t=_J(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=uy(e.s),o=uy(e.l),t=CJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var LJ="[-\\+]?\\d+%?",AJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(AJ,")|(?:").concat(LJ,")"),mS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),vS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+mS),rgba:new RegExp("rgba"+vS),hsl:new RegExp("hsl"+mS),hsla:new RegExp("hsla"+vS),hsv:new RegExp("hsv"+mS),hsva:new RegExp("hsva"+vS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function IJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Bw[e])e=Bw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Tv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=PJ(t)),this.originalInput=t;var i=TJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=YR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=IP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),MP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),kJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Bw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(ZR(e));return e.count=t,n}var r=MJ(e.hue,e.seed),i=OJ(r,e),o=RJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Tv(a)}function MJ(e,t){var n=DJ(e),r=g4(n,t);return r<0&&(r=360+r),r}function OJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return g4([0,100],t.seed);var n=XR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return g4([r,i],t.seed)}function RJ(e,t,n){var r=NJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return g4([r,i],n.seed)}function NJ(e,t){for(var n=XR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function DJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=JR.find(function(a){return a.name===e});if(n){var r=QR(n);if(r.hueRange)return r.hueRange}var i=new Tv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function XR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=JR;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function g4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function QR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var JR=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function zJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=zJ(e,`colors.${t}`,t),{isValid:i}=new Tv(r);return i?r:n},FJ=e=>t=>{const n=Ai(t,e);return new Tv(n).isDark()?"dark":"light"},$J=e=>t=>FJ(e)(t)==="dark",T0=(e,t)=>n=>{const r=Ai(n,e);return new Tv(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var hi=typeof Symbol=="function"&&Symbol.for,I9=hi?Symbol.for("react.element"):60103,M9=hi?Symbol.for("react.portal"):60106,A5=hi?Symbol.for("react.fragment"):60107,I5=hi?Symbol.for("react.strict_mode"):60108,M5=hi?Symbol.for("react.profiler"):60114,O5=hi?Symbol.for("react.provider"):60109,R5=hi?Symbol.for("react.context"):60110,O9=hi?Symbol.for("react.async_mode"):60111,N5=hi?Symbol.for("react.concurrent_mode"):60111,D5=hi?Symbol.for("react.forward_ref"):60112,z5=hi?Symbol.for("react.suspense"):60113,sQ=hi?Symbol.for("react.suspense_list"):60120,B5=hi?Symbol.for("react.memo"):60115,F5=hi?Symbol.for("react.lazy"):60116,lQ=hi?Symbol.for("react.block"):60121,uQ=hi?Symbol.for("react.fundamental"):60117,cQ=hi?Symbol.for("react.responder"):60118,dQ=hi?Symbol.for("react.scope"):60119;function ha(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case I9:switch(e=e.type,e){case O9:case N5:case A5:case M5:case I5:case z5:return e;default:switch(e=e&&e.$$typeof,e){case R5:case D5:case F5:case B5:case O5:return e;default:return t}}case M9:return t}}}function OR(e){return ha(e)===N5}Mn.AsyncMode=O9;Mn.ConcurrentMode=N5;Mn.ContextConsumer=R5;Mn.ContextProvider=O5;Mn.Element=I9;Mn.ForwardRef=D5;Mn.Fragment=A5;Mn.Lazy=F5;Mn.Memo=B5;Mn.Portal=M9;Mn.Profiler=M5;Mn.StrictMode=I5;Mn.Suspense=z5;Mn.isAsyncMode=function(e){return OR(e)||ha(e)===O9};Mn.isConcurrentMode=OR;Mn.isContextConsumer=function(e){return ha(e)===R5};Mn.isContextProvider=function(e){return ha(e)===O5};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===I9};Mn.isForwardRef=function(e){return ha(e)===D5};Mn.isFragment=function(e){return ha(e)===A5};Mn.isLazy=function(e){return ha(e)===F5};Mn.isMemo=function(e){return ha(e)===B5};Mn.isPortal=function(e){return ha(e)===M9};Mn.isProfiler=function(e){return ha(e)===M5};Mn.isStrictMode=function(e){return ha(e)===I5};Mn.isSuspense=function(e){return ha(e)===z5};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===A5||e===N5||e===M5||e===I5||e===z5||e===sQ||typeof e=="object"&&e!==null&&(e.$$typeof===F5||e.$$typeof===B5||e.$$typeof===O5||e.$$typeof===R5||e.$$typeof===D5||e.$$typeof===uQ||e.$$typeof===cQ||e.$$typeof===dQ||e.$$typeof===lQ)};Mn.typeOf=ha;(function(e){e.exports=Mn})(MR);var RR=MR.exports,fQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hQ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},NR={};NR[RR.ForwardRef]=fQ;NR[RR.Memo]=hQ;var pQ=!0;function gQ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var DR=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||pQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},zR=function(t,n,r){DR(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function mQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yQ=/[A-Z]|^ms/g,bQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},pS=LR(function(e){return BR(e)?e:e.replace(yQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return vQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function Xm(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return xQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,Xm(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function zQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},jR=BQ(zQ);function GR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var qR=e=>GR(e,t=>t!=null);function FQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $Q=FQ();function KR(e,...t){return NQ(e)?e(...t):e}function HQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function WQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var VQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,UQ=LR(function(e){return VQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jQ=UQ,GQ=function(t){return t!=="theme"},TP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jQ:GQ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},qQ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),wQ(function(){return zR(n,r,i)}),null},KQ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||TP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZQ=In("accordion").parts("root","container","button","panel").extend("icon"),XQ=In("alert").parts("title","description","container").extend("icon","spinner"),QQ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),JQ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var eJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var tJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),nJ=In("editable").parts("preview","input","textarea"),rJ=In("form").parts("container","requiredIndicator","helperText"),iJ=In("formError").parts("text","icon"),oJ=In("input").parts("addon","field","element"),aJ=In("list").parts("container","item","icon"),sJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),lJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),uJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var cJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),dJ=In("progress").parts("label","filledTrack","track"),fJ=In("radio").parts("container","control","label"),hJ=In("select").parts("field","icon"),pJ=In("slider").parts("container","track","thumb","filledTrack","mark"),gJ=In("stat").parts("container","label","helpText","number","icon"),mJ=In("switch").parts("container","track","thumb"),vJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),yJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),bJ=In("tag").parts("container","label","closeButton");function Mi(e,t){xJ(e)&&(e="100%");var n=SJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ly(e){return Math.min(1,Math.max(0,e))}function xJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function SJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function wJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function CJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=gS(s,a,e+1/3),i=gS(s,a,e),o=gS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Bw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function TJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=IJ(e)),typeof e=="object"&&(tu(e.r)&&tu(e.g)&&tu(e.b)?(t=wJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):tu(e.h)&&tu(e.s)&&tu(e.v)?(r=uy(e.s),i=uy(e.v),t=_J(e.h,r,i),a=!0,s="hsv"):tu(e.h)&&tu(e.s)&&tu(e.l)&&(r=uy(e.s),o=uy(e.l),t=CJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var LJ="[-\\+]?\\d+%?",AJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(AJ,")|(?:").concat(LJ,")"),mS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),vS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+mS),rgba:new RegExp("rgba"+vS),hsl:new RegExp("hsl"+mS),hsla:new RegExp("hsla"+vS),hsv:new RegExp("hsv"+mS),hsva:new RegExp("hsva"+vS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function IJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Bw[e])e=Bw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function tu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Tv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=PJ(t)),this.originalInput=t;var i=TJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=YR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=IP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),MP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),kJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Bw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(ZR(e));return e.count=t,n}var r=MJ(e.hue,e.seed),i=OJ(r,e),o=RJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Tv(a)}function MJ(e,t){var n=DJ(e),r=g4(n,t);return r<0&&(r=360+r),r}function OJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return g4([0,100],t.seed);var n=XR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return g4([r,i],t.seed)}function RJ(e,t,n){var r=NJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return g4([r,i],n.seed)}function NJ(e,t){for(var n=XR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function DJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=JR.find(function(a){return a.name===e});if(n){var r=QR(n);if(r.hueRange)return r.hueRange}var i=new Tv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function XR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=JR;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function g4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function QR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var JR=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function zJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=zJ(e,`colors.${t}`,t),{isValid:i}=new Tv(r);return i?r:n},FJ=e=>t=>{const n=Ai(t,e);return new Tv(n).isDark()?"dark":"light"},$J=e=>t=>FJ(e)(t)==="dark",T0=(e,t)=>n=>{const r=Ai(n,e);return new Tv(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -53,12 +53,12 @@ Error generating stack: `+o.message+` ${t} 75%, transparent 75%, transparent - )`,backgroundSize:`${e} ${e}`}}function HJ(e){const t=ZR().toHexString();return!e||BJ(e)?t:e.string&&e.colors?VJ(e.string,e.colors):e.string&&!e.colors?WJ(e.string):e.colors&&!e.string?UJ(e.colors):t}function WJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function VJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function jJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function eN(e){return jJ(e)&&e.reference?e.reference:String(e)}var W5=(e,...t)=>t.map(eN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${W5("+",...e)})`,DP=(...e)=>`calc(${W5("-",...e)})`,Fw=(...e)=>`calc(${W5("*",...e)})`,zP=(...e)=>`calc(${W5("/",...e)})`,BP=e=>{const t=eN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Fw(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(NP(e,...t)),subtract:(...t)=>lu(DP(e,...t)),multiply:(...t)=>lu(Fw(e,...t)),divide:(...t)=>lu(zP(e,...t)),negate:()=>lu(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:Fw,divide:zP,negate:BP});function GJ(e){return!Number.isInteger(parseFloat(e.toString()))}function qJ(e,t="-"){return e.replace(/\s+/g,t)}function tN(e){const t=qJ(e.toString());return t.includes("\\.")?e:GJ(e)?t.replace(".","\\."):e}function KJ(e,t=""){return[t,tN(e)].filter(Boolean).join("-")}function YJ(e,t){return`var(${tN(e)}${t?`, ${t}`:""})`}function ZJ(e,t=""){return`--${KJ(e,t)}`}function ji(e,t){const n=ZJ(e,t?.prefix);return{variable:n,reference:YJ(n,XJ(t?.fallback))}}function XJ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:QJ,defineMultiStyleConfig:JJ}=ir(ZQ.keys),eee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},nee={pt:"2",px:"4",pb:"5"},ree={fontSize:"1.25em"},iee=QJ({container:eee,button:tee,panel:nee,icon:ree}),oee=JJ({baseStyle:iee}),{definePartsStyle:Lv,defineMultiStyleConfig:aee}=ir(XQ.keys),oa=ei("alert-fg"),vu=ei("alert-bg"),see=Lv({container:{bg:vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z9(e){const{theme:t,colorScheme:n}=e,r=T0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var lee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark}}}}),uee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),cee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),dee=Lv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[vu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[vu.variable]:`colors.${t}.200`},color:oa.reference}}}),fee={subtle:lee,"left-accent":uee,"top-accent":cee,solid:dee},hee=aee({baseStyle:see,variants:fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),nN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},pee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},gee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},mee={...nN,...pee,container:gee},rN=mee,vee=e=>typeof e=="function";function fi(e,...t){return vee(e)?e(...t):e}var{definePartsStyle:iN,defineMultiStyleConfig:yee}=ir(QQ.keys),e0=ei("avatar-border-color"),yS=ei("avatar-bg"),bee={borderRadius:"full",border:"0.2em solid",[e0.variable]:"white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference},xee={[yS.variable]:"colors.gray.200",_dark:{[yS.variable]:"colors.whiteAlpha.400"},bgColor:yS.reference},FP=ei("avatar-background"),See=e=>{const{name:t,theme:n}=e,r=t?HJ({string:t}):"colors.gray.400",i=$J(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[e0.variable]:"colors.white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference,verticalAlign:"top"}},wee=iN(e=>({badge:fi(bee,e),excessLabel:fi(xee,e),container:fi(See,e)}));function xc(e){const t=e!=="100%"?rN[e]:void 0;return iN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Cee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},_ee=yee({baseStyle:wee,sizes:Cee,defaultProps:{size:"md"}}),kee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},t0=ei("badge-bg"),ml=ei("badge-color"),Eee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.500`,.6)(n);return{[t0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[t0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:t0.reference,color:ml.reference}},Pee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.16)(n);return{[t0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[t0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:t0.reference,color:ml.reference}},Tee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},Lee={solid:Eee,subtle:Pee,outline:Tee},fm={baseStyle:kee,variants:Lee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Aee,definePartsStyle:Iee}=ir(JQ.keys),Mee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Oee=Iee({link:Mee}),Ree=Aee({baseStyle:Oee}),Nee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},oN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=T0(`${t}.200`,.12)(n),i=T0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Dee=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(oN,e)}},zee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Bee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=zee[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},Fee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},$ee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Hee={ghost:oN,outline:Dee,solid:Bee,link:Fee,unstyled:$ee},Wee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Vee={baseStyle:Nee,variants:Hee,sizes:Wee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:m3,defineMultiStyleConfig:Uee}=ir(eJ.keys),hm=ei("checkbox-size"),jee=e=>{const{colorScheme:t}=e;return{w:hm.reference,h:hm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Gee={_disabled:{cursor:"not-allowed"}},qee={userSelect:"none",_disabled:{opacity:.4}},Kee={transitionProperty:"transform",transitionDuration:"normal"},Yee=m3(e=>({icon:Kee,container:Gee,control:fi(jee,e),label:qee})),Zee={sm:m3({control:{[hm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:m3({control:{[hm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:m3({control:{[hm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},m4=Uee({baseStyle:Yee,sizes:Zee,defaultProps:{size:"md",colorScheme:"blue"}}),pm=ji("close-button-size"),xg=ji("close-button-bg"),Xee={w:[pm.reference],h:[pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[xg.variable]:"colors.blackAlpha.100",_dark:{[xg.variable]:"colors.whiteAlpha.100"}},_active:{[xg.variable]:"colors.blackAlpha.200",_dark:{[xg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:xg.reference},Qee={lg:{[pm.variable]:"sizes.10",fontSize:"md"},md:{[pm.variable]:"sizes.8",fontSize:"xs"},sm:{[pm.variable]:"sizes.6",fontSize:"2xs"}},Jee={baseStyle:Xee,sizes:Qee,defaultProps:{size:"md"}},{variants:ete,defaultProps:tte}=fm,nte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},rte={baseStyle:nte,variants:ete,defaultProps:tte},ite={w:"100%",mx:"auto",maxW:"prose",px:"4"},ote={baseStyle:ite},ate={opacity:.6,borderColor:"inherit"},ste={borderStyle:"solid"},lte={borderStyle:"dashed"},ute={solid:ste,dashed:lte},cte={baseStyle:ate,variants:ute,defaultProps:{variant:"solid"}},{definePartsStyle:$w,defineMultiStyleConfig:dte}=ir(tJ.keys),bS=ei("drawer-bg"),xS=ei("drawer-box-shadow");function gp(e){return $w(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var fte={bg:"blackAlpha.600",zIndex:"overlay"},hte={display:"flex",zIndex:"modal",justifyContent:"center"},pte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[bS.variable]:"colors.white",[xS.variable]:"shadows.lg",_dark:{[bS.variable]:"colors.gray.700",[xS.variable]:"shadows.dark-lg"},bg:bS.reference,boxShadow:xS.reference}},gte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},mte={position:"absolute",top:"2",insetEnd:"3"},vte={px:"6",py:"2",flex:"1",overflow:"auto"},yte={px:"6",py:"4"},bte=$w(e=>({overlay:fte,dialogContainer:hte,dialog:fi(pte,e),header:gte,closeButton:mte,body:vte,footer:yte})),xte={xs:gp("xs"),sm:gp("md"),md:gp("lg"),lg:gp("2xl"),xl:gp("4xl"),full:gp("full")},Ste=dte({baseStyle:bte,sizes:xte,defaultProps:{size:"xs"}}),{definePartsStyle:wte,defineMultiStyleConfig:Cte}=ir(nJ.keys),_te={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},kte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Ete={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Pte=wte({preview:_te,input:kte,textarea:Ete}),Tte=Cte({baseStyle:Pte}),{definePartsStyle:Lte,defineMultiStyleConfig:Ate}=ir(rJ.keys),n0=ei("form-control-color"),Ite={marginStart:"1",[n0.variable]:"colors.red.500",_dark:{[n0.variable]:"colors.red.300"},color:n0.reference},Mte={mt:"2",[n0.variable]:"colors.gray.600",_dark:{[n0.variable]:"colors.whiteAlpha.600"},color:n0.reference,lineHeight:"normal",fontSize:"sm"},Ote=Lte({container:{width:"100%",position:"relative"},requiredIndicator:Ite,helperText:Mte}),Rte=Ate({baseStyle:Ote}),{definePartsStyle:Nte,defineMultiStyleConfig:Dte}=ir(iJ.keys),r0=ei("form-error-color"),zte={[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Bte={marginEnd:"0.5em",[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference},Fte=Nte({text:zte,icon:Bte}),$te=Dte({baseStyle:Fte}),Hte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Wte={baseStyle:Hte},Vte={fontFamily:"heading",fontWeight:"bold"},Ute={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},jte={baseStyle:Vte,sizes:Ute,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Gte}=ir(oJ.keys),qte=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Kte={lg:du({field:Sc.lg,addon:Sc.lg}),md:du({field:Sc.md,addon:Sc.md}),sm:du({field:Sc.sm,addon:Sc.sm}),xs:du({field:Sc.xs,addon:Sc.xs})};function B9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var Yte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Zte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Xte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Qte=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Jte={outline:Yte,filled:Zte,flushed:Xte,unstyled:Qte},mn=Gte({baseStyle:qte,sizes:Kte,variants:Jte,defaultProps:{size:"md",variant:"outline"}}),ene=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),tne={baseStyle:ene},nne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},rne={baseStyle:nne},{defineMultiStyleConfig:ine,definePartsStyle:one}=ir(aJ.keys),ane={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},sne=one({icon:ane}),lne=ine({baseStyle:sne}),{defineMultiStyleConfig:une,definePartsStyle:cne}=ir(sJ.keys),dne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),hne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},pne={opacity:.6},gne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},mne={transitionProperty:"common",transitionDuration:"normal"},vne=cne(e=>({button:mne,list:fi(dne,e),item:fi(fne,e),groupTitle:hne,command:pne,divider:gne})),yne=une({baseStyle:vne}),{defineMultiStyleConfig:bne,definePartsStyle:Hw}=ir(lJ.keys),xne={bg:"blackAlpha.600",zIndex:"modal"},Sne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},wne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Cne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_ne={position:"absolute",top:"2",insetEnd:"3"},kne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ene={px:"6",py:"4"},Pne=Hw(e=>({overlay:xne,dialogContainer:fi(Sne,e),dialog:fi(wne,e),header:Cne,closeButton:_ne,body:fi(kne,e),footer:Ene}));function ss(e){return Hw(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Tne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Lne=bne({baseStyle:Pne,sizes:Tne,defaultProps:{size:"md"}}),Ane={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},aN=Ane,{defineMultiStyleConfig:Ine,definePartsStyle:sN}=ir(uJ.keys),F9=ji("number-input-stepper-width"),lN=ji("number-input-input-padding"),Mne=lu(F9).add("0.5rem").toString(),One={[F9.variable]:"sizes.6",[lN.variable]:Mne},Rne=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},Nne={width:[F9.reference]},Dne=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),zne=sN(e=>({root:One,field:fi(Rne,e)??{},stepperGroup:Nne,stepper:fi(Dne,e)??{}}));function cy(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=aN.fontSizes[o];return sN({field:{...r.field,paddingInlineEnd:lN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Bne={xs:cy("xs"),sm:cy("sm"),md:cy("md"),lg:cy("lg")},Fne=Ine({baseStyle:zne,sizes:Bne,variants:mn.variants,defaultProps:mn.defaultProps}),$P,$ne={...($P=mn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Hne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HP,Wne={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=mn.variants)==null?void 0:HP.unstyled.field)??{}},Vne={baseStyle:$ne,sizes:Hne,variants:Wne,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Une,definePartsStyle:jne}=ir(cJ.keys),dy=ji("popper-bg"),Gne=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),qne={zIndex:10},Kne={[dy.variable]:"colors.white",bg:dy.reference,[Gne.variable]:dy.reference,[WP.variable]:"colors.gray.200",_dark:{[dy.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Yne={px:3,py:2,borderBottomWidth:"1px"},Zne={px:3,py:2},Xne={px:3,py:2,borderTopWidth:"1px"},Qne={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Jne=jne({popper:qne,content:Kne,header:Yne,body:Zne,footer:Xne,closeButton:Qne}),ere=Une({baseStyle:Jne}),{defineMultiStyleConfig:tre,definePartsStyle:Vg}=ir(dJ.keys),nre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + )`,backgroundSize:`${e} ${e}`}}function HJ(e){const t=ZR().toHexString();return!e||BJ(e)?t:e.string&&e.colors?VJ(e.string,e.colors):e.string&&!e.colors?WJ(e.string):e.colors&&!e.string?UJ(e.colors):t}function WJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function VJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function jJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function eN(e){return jJ(e)&&e.reference?e.reference:String(e)}var W5=(e,...t)=>t.map(eN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${W5("+",...e)})`,DP=(...e)=>`calc(${W5("-",...e)})`,Fw=(...e)=>`calc(${W5("*",...e)})`,zP=(...e)=>`calc(${W5("/",...e)})`,BP=e=>{const t=eN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Fw(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(NP(e,...t)),subtract:(...t)=>lu(DP(e,...t)),multiply:(...t)=>lu(Fw(e,...t)),divide:(...t)=>lu(zP(e,...t)),negate:()=>lu(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:Fw,divide:zP,negate:BP});function GJ(e){return!Number.isInteger(parseFloat(e.toString()))}function qJ(e,t="-"){return e.replace(/\s+/g,t)}function tN(e){const t=qJ(e.toString());return t.includes("\\.")?e:GJ(e)?t.replace(".","\\."):e}function KJ(e,t=""){return[t,tN(e)].filter(Boolean).join("-")}function YJ(e,t){return`var(${tN(e)}${t?`, ${t}`:""})`}function ZJ(e,t=""){return`--${KJ(e,t)}`}function ji(e,t){const n=ZJ(e,t?.prefix);return{variable:n,reference:YJ(n,XJ(t?.fallback))}}function XJ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:QJ,defineMultiStyleConfig:JJ}=ir(ZQ.keys),eee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},nee={pt:"2",px:"4",pb:"5"},ree={fontSize:"1.25em"},iee=QJ({container:eee,button:tee,panel:nee,icon:ree}),oee=JJ({baseStyle:iee}),{definePartsStyle:Lv,defineMultiStyleConfig:aee}=ir(XQ.keys),oa=ei("alert-fg"),vu=ei("alert-bg"),see=Lv({container:{bg:vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z9(e){const{theme:t,colorScheme:n}=e,r=T0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var lee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark}}}}),uee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),cee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),dee=Lv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[vu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[vu.variable]:`colors.${t}.200`},color:oa.reference}}}),fee={subtle:lee,"left-accent":uee,"top-accent":cee,solid:dee},hee=aee({baseStyle:see,variants:fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),nN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},pee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},gee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},mee={...nN,...pee,container:gee},rN=mee,vee=e=>typeof e=="function";function fi(e,...t){return vee(e)?e(...t):e}var{definePartsStyle:iN,defineMultiStyleConfig:yee}=ir(QQ.keys),e0=ei("avatar-border-color"),yS=ei("avatar-bg"),bee={borderRadius:"full",border:"0.2em solid",[e0.variable]:"white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference},xee={[yS.variable]:"colors.gray.200",_dark:{[yS.variable]:"colors.whiteAlpha.400"},bgColor:yS.reference},FP=ei("avatar-background"),See=e=>{const{name:t,theme:n}=e,r=t?HJ({string:t}):"colors.gray.400",i=$J(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[e0.variable]:"colors.white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference,verticalAlign:"top"}},wee=iN(e=>({badge:fi(bee,e),excessLabel:fi(xee,e),container:fi(See,e)}));function xc(e){const t=e!=="100%"?rN[e]:void 0;return iN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Cee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},_ee=yee({baseStyle:wee,sizes:Cee,defaultProps:{size:"md"}}),kee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},t0=ei("badge-bg"),vl=ei("badge-color"),Eee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.500`,.6)(n);return{[t0.variable]:`colors.${t}.500`,[vl.variable]:"colors.white",_dark:{[t0.variable]:r,[vl.variable]:"colors.whiteAlpha.800"},bg:t0.reference,color:vl.reference}},Pee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.16)(n);return{[t0.variable]:`colors.${t}.100`,[vl.variable]:`colors.${t}.800`,_dark:{[t0.variable]:r,[vl.variable]:`colors.${t}.200`},bg:t0.reference,color:vl.reference}},Tee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.8)(n);return{[vl.variable]:`colors.${t}.500`,_dark:{[vl.variable]:r},color:vl.reference,boxShadow:`inset 0 0 0px 1px ${vl.reference}`}},Lee={solid:Eee,subtle:Pee,outline:Tee},fm={baseStyle:kee,variants:Lee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Aee,definePartsStyle:Iee}=ir(JQ.keys),Mee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Oee=Iee({link:Mee}),Ree=Aee({baseStyle:Oee}),Nee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},oN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=T0(`${t}.200`,.12)(n),i=T0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Dee=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(oN,e)}},zee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Bee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=zee[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},Fee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},$ee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Hee={ghost:oN,outline:Dee,solid:Bee,link:Fee,unstyled:$ee},Wee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Vee={baseStyle:Nee,variants:Hee,sizes:Wee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:m3,defineMultiStyleConfig:Uee}=ir(eJ.keys),hm=ei("checkbox-size"),jee=e=>{const{colorScheme:t}=e;return{w:hm.reference,h:hm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Gee={_disabled:{cursor:"not-allowed"}},qee={userSelect:"none",_disabled:{opacity:.4}},Kee={transitionProperty:"transform",transitionDuration:"normal"},Yee=m3(e=>({icon:Kee,container:Gee,control:fi(jee,e),label:qee})),Zee={sm:m3({control:{[hm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:m3({control:{[hm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:m3({control:{[hm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},m4=Uee({baseStyle:Yee,sizes:Zee,defaultProps:{size:"md",colorScheme:"blue"}}),pm=ji("close-button-size"),xg=ji("close-button-bg"),Xee={w:[pm.reference],h:[pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[xg.variable]:"colors.blackAlpha.100",_dark:{[xg.variable]:"colors.whiteAlpha.100"}},_active:{[xg.variable]:"colors.blackAlpha.200",_dark:{[xg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:xg.reference},Qee={lg:{[pm.variable]:"sizes.10",fontSize:"md"},md:{[pm.variable]:"sizes.8",fontSize:"xs"},sm:{[pm.variable]:"sizes.6",fontSize:"2xs"}},Jee={baseStyle:Xee,sizes:Qee,defaultProps:{size:"md"}},{variants:ete,defaultProps:tte}=fm,nte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},rte={baseStyle:nte,variants:ete,defaultProps:tte},ite={w:"100%",mx:"auto",maxW:"prose",px:"4"},ote={baseStyle:ite},ate={opacity:.6,borderColor:"inherit"},ste={borderStyle:"solid"},lte={borderStyle:"dashed"},ute={solid:ste,dashed:lte},cte={baseStyle:ate,variants:ute,defaultProps:{variant:"solid"}},{definePartsStyle:$w,defineMultiStyleConfig:dte}=ir(tJ.keys),bS=ei("drawer-bg"),xS=ei("drawer-box-shadow");function gp(e){return $w(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var fte={bg:"blackAlpha.600",zIndex:"overlay"},hte={display:"flex",zIndex:"modal",justifyContent:"center"},pte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[bS.variable]:"colors.white",[xS.variable]:"shadows.lg",_dark:{[bS.variable]:"colors.gray.700",[xS.variable]:"shadows.dark-lg"},bg:bS.reference,boxShadow:xS.reference}},gte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},mte={position:"absolute",top:"2",insetEnd:"3"},vte={px:"6",py:"2",flex:"1",overflow:"auto"},yte={px:"6",py:"4"},bte=$w(e=>({overlay:fte,dialogContainer:hte,dialog:fi(pte,e),header:gte,closeButton:mte,body:vte,footer:yte})),xte={xs:gp("xs"),sm:gp("md"),md:gp("lg"),lg:gp("2xl"),xl:gp("4xl"),full:gp("full")},Ste=dte({baseStyle:bte,sizes:xte,defaultProps:{size:"xs"}}),{definePartsStyle:wte,defineMultiStyleConfig:Cte}=ir(nJ.keys),_te={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},kte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Ete={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Pte=wte({preview:_te,input:kte,textarea:Ete}),Tte=Cte({baseStyle:Pte}),{definePartsStyle:Lte,defineMultiStyleConfig:Ate}=ir(rJ.keys),n0=ei("form-control-color"),Ite={marginStart:"1",[n0.variable]:"colors.red.500",_dark:{[n0.variable]:"colors.red.300"},color:n0.reference},Mte={mt:"2",[n0.variable]:"colors.gray.600",_dark:{[n0.variable]:"colors.whiteAlpha.600"},color:n0.reference,lineHeight:"normal",fontSize:"sm"},Ote=Lte({container:{width:"100%",position:"relative"},requiredIndicator:Ite,helperText:Mte}),Rte=Ate({baseStyle:Ote}),{definePartsStyle:Nte,defineMultiStyleConfig:Dte}=ir(iJ.keys),r0=ei("form-error-color"),zte={[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Bte={marginEnd:"0.5em",[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference},Fte=Nte({text:zte,icon:Bte}),$te=Dte({baseStyle:Fte}),Hte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Wte={baseStyle:Hte},Vte={fontFamily:"heading",fontWeight:"bold"},Ute={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},jte={baseStyle:Vte,sizes:Ute,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Gte}=ir(oJ.keys),qte=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Kte={lg:du({field:Sc.lg,addon:Sc.lg}),md:du({field:Sc.md,addon:Sc.md}),sm:du({field:Sc.sm,addon:Sc.sm}),xs:du({field:Sc.xs,addon:Sc.xs})};function B9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var Yte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Zte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Xte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Qte=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Jte={outline:Yte,filled:Zte,flushed:Xte,unstyled:Qte},mn=Gte({baseStyle:qte,sizes:Kte,variants:Jte,defaultProps:{size:"md",variant:"outline"}}),ene=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),tne={baseStyle:ene},nne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},rne={baseStyle:nne},{defineMultiStyleConfig:ine,definePartsStyle:one}=ir(aJ.keys),ane={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},sne=one({icon:ane}),lne=ine({baseStyle:sne}),{defineMultiStyleConfig:une,definePartsStyle:cne}=ir(sJ.keys),dne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),hne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},pne={opacity:.6},gne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},mne={transitionProperty:"common",transitionDuration:"normal"},vne=cne(e=>({button:mne,list:fi(dne,e),item:fi(fne,e),groupTitle:hne,command:pne,divider:gne})),yne=une({baseStyle:vne}),{defineMultiStyleConfig:bne,definePartsStyle:Hw}=ir(lJ.keys),xne={bg:"blackAlpha.600",zIndex:"modal"},Sne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},wne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Cne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_ne={position:"absolute",top:"2",insetEnd:"3"},kne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ene={px:"6",py:"4"},Pne=Hw(e=>({overlay:xne,dialogContainer:fi(Sne,e),dialog:fi(wne,e),header:Cne,closeButton:_ne,body:fi(kne,e),footer:Ene}));function ss(e){return Hw(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Tne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Lne=bne({baseStyle:Pne,sizes:Tne,defaultProps:{size:"md"}}),Ane={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},aN=Ane,{defineMultiStyleConfig:Ine,definePartsStyle:sN}=ir(uJ.keys),F9=ji("number-input-stepper-width"),lN=ji("number-input-input-padding"),Mne=lu(F9).add("0.5rem").toString(),One={[F9.variable]:"sizes.6",[lN.variable]:Mne},Rne=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},Nne={width:[F9.reference]},Dne=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),zne=sN(e=>({root:One,field:fi(Rne,e)??{},stepperGroup:Nne,stepper:fi(Dne,e)??{}}));function cy(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=aN.fontSizes[o];return sN({field:{...r.field,paddingInlineEnd:lN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Bne={xs:cy("xs"),sm:cy("sm"),md:cy("md"),lg:cy("lg")},Fne=Ine({baseStyle:zne,sizes:Bne,variants:mn.variants,defaultProps:mn.defaultProps}),$P,$ne={...($P=mn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Hne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HP,Wne={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=mn.variants)==null?void 0:HP.unstyled.field)??{}},Vne={baseStyle:$ne,sizes:Hne,variants:Wne,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Une,definePartsStyle:jne}=ir(cJ.keys),dy=ji("popper-bg"),Gne=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),qne={zIndex:10},Kne={[dy.variable]:"colors.white",bg:dy.reference,[Gne.variable]:dy.reference,[WP.variable]:"colors.gray.200",_dark:{[dy.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Yne={px:3,py:2,borderBottomWidth:"1px"},Zne={px:3,py:2},Xne={px:3,py:2,borderTopWidth:"1px"},Qne={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Jne=jne({popper:qne,content:Kne,header:Yne,body:Zne,footer:Xne,closeButton:Qne}),ere=Une({baseStyle:Jne}),{defineMultiStyleConfig:tre,definePartsStyle:Vg}=ir(dJ.keys),nre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${Ai(n,a)} 50%, transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},rre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ire=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),ore=e=>({transitionProperty:"common",transitionDuration:"slow",...nre(e)}),are=Vg(e=>({label:rre,filledTrack:ore(e),track:ire(e)})),sre={xs:Vg({track:{h:"1"}}),sm:Vg({track:{h:"2"}}),md:Vg({track:{h:"3"}}),lg:Vg({track:{h:"4"}})},lre=tre({sizes:sre,baseStyle:are,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ure,definePartsStyle:v3}=ir(fJ.keys),cre=e=>{var t;const n=(t=fi(m4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},dre=v3(e=>{var t,n,r,i;return{label:(n=(t=m4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=m4).baseStyle)==null?void 0:i.call(r,e).container,control:cre(e)}}),fre={md:v3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:v3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:v3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},hre=ure({baseStyle:dre,sizes:fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:pre,definePartsStyle:gre}=ir(hJ.keys),mre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},vre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},yre=gre(e=>({field:mre(e),icon:vre})),fy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,bre={lg:{...(VP=mn.sizes)==null?void 0:VP.lg,field:{...(UP=mn.sizes)==null?void 0:UP.lg.field,...fy}},md:{...(jP=mn.sizes)==null?void 0:jP.md,field:{...(GP=mn.sizes)==null?void 0:GP.md.field,...fy}},sm:{...(qP=mn.sizes)==null?void 0:qP.sm,field:{...(KP=mn.sizes)==null?void 0:KP.sm.field,...fy}},xs:{...(YP=mn.sizes)==null?void 0:YP.xs,field:{...(ZP=mn.sizes)==null?void 0:ZP.xs.field,...fy},icon:{insetEnd:"1"}}},xre=pre({baseStyle:yre,sizes:bre,variants:mn.variants,defaultProps:mn.defaultProps}),Sre=ei("skeleton-start-color"),wre=ei("skeleton-end-color"),Cre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Sre.variable]:a,[wre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},_re={baseStyle:Cre},SS=ei("skip-link-bg"),kre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[SS.variable]:"colors.white",_dark:{[SS.variable]:"colors.gray.700"},bg:SS.reference}},Ere={baseStyle:kre},{defineMultiStyleConfig:Pre,definePartsStyle:V5}=ir(pJ.keys),ev=ei("slider-thumb-size"),tv=ei("slider-track-size"),Mc=ei("slider-bg"),Tre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Lre=e=>({...D9({orientation:e.orientation,horizontal:{h:tv.reference},vertical:{w:tv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Are=e=>{const{orientation:t}=e;return{...D9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ev.reference,h:ev.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Ire=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Mre=V5(e=>({container:Tre(e),track:Lre(e),thumb:Are(e),filledTrack:Ire(e)})),Ore=V5({container:{[ev.variable]:"sizes.4",[tv.variable]:"sizes.1"}}),Rre=V5({container:{[ev.variable]:"sizes.3.5",[tv.variable]:"sizes.1"}}),Nre=V5({container:{[ev.variable]:"sizes.2.5",[tv.variable]:"sizes.0.5"}}),Dre={lg:Ore,md:Rre,sm:Nre},zre=Pre({baseStyle:Mre,sizes:Dre,defaultProps:{size:"md",colorScheme:"blue"}}),kf=ji("spinner-size"),Bre={width:[kf.reference],height:[kf.reference]},Fre={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},$re={baseStyle:Bre,sizes:Fre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Hre,definePartsStyle:uN}=ir(gJ.keys),Wre={fontWeight:"medium"},Vre={opacity:.8,marginBottom:"2"},Ure={verticalAlign:"baseline",fontWeight:"semibold"},jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Gre=uN({container:{},label:Wre,helpText:Vre,number:Ure,icon:jre}),qre={md:uN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Kre=Hre({baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Yre,definePartsStyle:y3}=ir(mJ.keys),gm=ji("switch-track-width"),zf=ji("switch-track-height"),wS=ji("switch-track-diff"),Zre=lu.subtract(gm,zf),Ww=ji("switch-thumb-x"),Sg=ji("switch-bg"),Xre=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[gm.reference],height:[zf.reference],transitionProperty:"common",transitionDuration:"fast",[Sg.variable]:"colors.gray.300",_dark:{[Sg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Sg.variable]:`colors.${t}.500`,_dark:{[Sg.variable]:`colors.${t}.200`}},bg:Sg.reference}},Qre={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[zf.reference],height:[zf.reference],_checked:{transform:`translateX(${Ww.reference})`}},Jre=y3(e=>({container:{[wS.variable]:Zre,[Ww.variable]:wS.reference,_rtl:{[Ww.variable]:lu(wS).negate().toString()}},track:Xre(e),thumb:Qre})),eie={sm:y3({container:{[gm.variable]:"1.375rem",[zf.variable]:"sizes.3"}}),md:y3({container:{[gm.variable]:"1.875rem",[zf.variable]:"sizes.4"}}),lg:y3({container:{[gm.variable]:"2.875rem",[zf.variable]:"sizes.6"}})},tie=Yre({baseStyle:Jre,sizes:eie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nie,definePartsStyle:i0}=ir(vJ.keys),rie=i0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),v4={"&[data-is-numeric=true]":{textAlign:"end"}},iie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),oie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),aie={simple:iie,striped:oie,unstyled:{}},sie={sm:i0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:i0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:i0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},lie=nie({baseStyle:rie,variants:aie,sizes:sie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:uie,definePartsStyle:xl}=ir(yJ.keys),cie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},die=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},hie={p:4},pie=xl(e=>({root:cie(e),tab:die(e),tablist:fie(e),tabpanel:hie})),gie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},mie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),vie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),yie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),bie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),xie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),Sie=xl({}),wie={line:mie,enclosed:vie,"enclosed-colored":yie,"soft-rounded":bie,"solid-rounded":xie,unstyled:Sie},Cie=uie({baseStyle:pie,sizes:gie,variants:wie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:_ie,definePartsStyle:Bf}=ir(bJ.keys),kie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Eie={lineHeight:1.2,overflow:"visible"},Pie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Tie=Bf({container:kie,label:Eie,closeButton:Pie}),Lie={sm:Bf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Bf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Bf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Aie={subtle:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.subtle(e)}}),solid:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.solid(e)}}),outline:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.outline(e)}})},Iie=_ie({variants:Aie,baseStyle:Tie,sizes:Lie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,Mie={...(XP=mn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Oie={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eT,tT,nT,Rie={xs:((JP=mn.sizes)==null?void 0:JP.xs.field)??{},sm:((eT=mn.sizes)==null?void 0:eT.sm.field)??{},md:((tT=mn.sizes)==null?void 0:tT.md.field)??{},lg:((nT=mn.sizes)==null?void 0:nT.lg.field)??{}},Nie={baseStyle:Mie,sizes:Rie,variants:Oie,defaultProps:{size:"md",variant:"outline"}},hy=ji("tooltip-bg"),CS=ji("tooltip-fg"),Die=ji("popper-arrow-bg"),zie={bg:hy.reference,color:CS.reference,[hy.variable]:"colors.gray.700",[CS.variable]:"colors.whiteAlpha.900",_dark:{[hy.variable]:"colors.gray.300",[CS.variable]:"colors.gray.900"},[Die.variable]:hy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Bie={baseStyle:zie},Fie={Accordion:oee,Alert:hee,Avatar:_ee,Badge:fm,Breadcrumb:Ree,Button:Vee,Checkbox:m4,CloseButton:Jee,Code:rte,Container:ote,Divider:cte,Drawer:Ste,Editable:Tte,Form:Rte,FormError:$te,FormLabel:Wte,Heading:jte,Input:mn,Kbd:tne,Link:rne,List:lne,Menu:yne,Modal:Lne,NumberInput:Fne,PinInput:Vne,Popover:ere,Progress:lre,Radio:hre,Select:xre,Skeleton:_re,SkipLink:Ere,Slider:zre,Spinner:$re,Stat:Kre,Switch:tie,Table:lie,Tabs:Cie,Tag:Iie,Textarea:Nie,Tooltip:Bie},$ie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Hie=$ie,Wie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Vie=Wie,Uie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},jie=Uie,Gie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},qie=Gie,Kie={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Yie=Kie,Zie={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Xie={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Qie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Jie={property:Zie,easing:Xie,duration:Qie},eoe=Jie,toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},noe=toe,roe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ioe=roe,ooe={breakpoints:Vie,zIndices:noe,radii:qie,blur:ioe,colors:jie,...aN,sizes:rN,shadows:Yie,space:nN,borders:Hie,transition:eoe},aoe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},soe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},loe="ltr",uoe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},coe={semanticTokens:aoe,direction:loe,...ooe,components:Fie,styles:soe,config:uoe},doe=typeof Element<"u",foe=typeof Map=="function",hoe=typeof Set=="function",poe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!b3(e[r],t[r]))return!1;return!0}var o;if(foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!b3(r.value[1],t.get(r.value[0])))return!1;return!0}if(hoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(poe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(doe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!b3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var goe=function(t,n){try{return b3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function U0(){const e=C.exports.useContext(Qm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function cN(){const e=Ev(),t=U0();return{...e,theme:t}}function moe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function yoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return moe(o,l,a[u]??l);const h=`${e}.${l}`;return voe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function boe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>vX(n),[n]);return ee(EQ,{theme:i,children:[x(xoe,{root:t}),r]})}function xoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x($5,{styles:n=>({[t]:n.__cssVars})})}WQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Soe(){const{colorMode:e}=Ev();return x($5,{styles:t=>{const n=jR(t,"styles.global"),r=KR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var woe=new Set([...xX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Coe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function _oe(e){return Coe.has(e)||!woe.has(e)}var koe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=GR(a,(g,m)=>wX(m)),l=KR(e,t),u=Object.assign({},i,l,qR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function _S(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=_oe);const i=koe({baseStyle:n}),o=zw(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:g}=Ev();return le.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function dN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=cN(),a=e?jR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},qR(DQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=MX(s)(l);goe(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return dN(e,t)}function Ri(e,t={}){return dN(e,t)}function Eoe(){const e=new Map;return new Proxy(_S,{apply(t,n,r){return _S(...r)},get(t,n){return e.has(n)||e.set(n,_S(n)),e.get(n)}})}var we=Eoe();function Poe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Poe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Toe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Toe(n,t)})}}function Loe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Aoe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Vw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,y4=e=>e,Ioe=class{descendants=new Map;register=e=>{if(e!=null)return Aoe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=iT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=oT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=rT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Moe(){const e=C.exports.useRef(new Ioe);return Vw(()=>()=>e.current.destroy()),e.current}var[Ooe,fN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Roe(e){const t=fN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Vw(()=>()=>{!i.current||t.unregister(i.current)},[]),Vw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=y4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function hN(){return[y4(Ooe),()=>y4(fN()),()=>Moe(),i=>Roe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ga=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??aT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const b=a??aT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});ga.displayName="Icon";function lt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ga,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function U5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $9=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),j5=C.exports.createContext({});function Noe(){return C.exports.useContext(j5).visualElement}const j0=C.exports.createContext(null),nh=typeof document<"u",b4=nh?C.exports.useLayoutEffect:C.exports.useEffect,pN=C.exports.createContext({strict:!1});function Doe(e,t,n,r){const i=Noe(),o=C.exports.useContext(pN),a=C.exports.useContext(j0),s=C.exports.useContext($9).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return b4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),b4(()=>()=>u&&u.notifyUnmount(),[]),u}function Wp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zoe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wp(n)&&(n.current=r))},[t])}function nv(e){return typeof e=="string"||Array.isArray(e)}function G5(e){return typeof e=="object"&&typeof e.start=="function"}const Boe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function q5(e){return G5(e.animate)||Boe.some(t=>nv(e[t]))}function gN(e){return Boolean(q5(e)||e.variants)}function Foe(e,t){if(q5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||nv(n)?n:void 0,animate:nv(r)?r:void 0}}return e.inherit!==!1?t:{}}function $oe(e){const{initial:t,animate:n}=Foe(e,C.exports.useContext(j5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sT(t),sT(n)])}function sT(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),rv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Hoe(e){for(const t in e)t==="projectionNodeConstructor"?rv.projectionNodeConstructor=e[t]:rv[t].Component=e[t]}function K5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Woe=1;function Voe(){return K5(()=>{if(mm.hasEverUpdated)return Woe++})}const H9=C.exports.createContext({});class Uoe extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const mN=C.exports.createContext({}),joe=Symbol.for("motionComponentSymbol");function Goe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Hoe(e);function a(l,u){const h={...C.exports.useContext($9),...l,layoutId:qoe(l)},{isStatic:g}=h;let m=null;const v=$oe(l),b=g?void 0:Voe(),w=i(l,g);if(!g&&nh){v.visualElement=Doe(o,w,h,t);const P=C.exports.useContext(pN).strict,E=C.exports.useContext(mN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,b,n||rv.projectionNodeConstructor,E))}return ee(Uoe,{visualElement:v.visualElement,props:h,children:[m,x(j5.Provider,{value:v,children:r(o,l,b,zoe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[joe]=o,s}function qoe({layoutId:e}){const t=C.exports.useContext(H9).id;return t&&e!==void 0?t+"-"+e:e}function Koe(e){function t(r,i={}){return Goe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Yoe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function W9(e){return typeof e!="string"||e.includes("-")?!1:!!(Yoe.indexOf(e)>-1||/[A-Z]/.test(e))}const x4={};function Zoe(e){Object.assign(x4,e)}const S4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Av=new Set(S4);function vN(e,{layout:t,layoutId:n}){return Av.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,Xoe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qoe=(e,t)=>S4.indexOf(e)-S4.indexOf(t);function Joe({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Qoe);for(const s of t)a+=`${Xoe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function yN(e){return e.startsWith("--")}const eae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,bN=(e,t)=>n=>Math.max(Math.min(n,t),e),vm=e=>e%1?Number(e.toFixed(5)):e,iv=/(-)?([\d]*\.?[\d])+/g,Uw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Iv(e){return typeof e=="string"}const rh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ym=Object.assign(Object.assign({},rh),{transform:bN(0,1)}),py=Object.assign(Object.assign({},rh),{default:1}),Mv=e=>({test:t=>Iv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Mv("deg"),Sl=Mv("%"),St=Mv("px"),nae=Mv("vh"),rae=Mv("vw"),lT=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),V9=(e,t)=>n=>Boolean(Iv(n)&&tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),xN=(e,t,n)=>r=>{if(!Iv(r))return r;const[i,o,a,s]=r.match(iv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:V9("hsl","hue"),parse:xN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(vm(t))+", "+Sl.transform(vm(n))+", "+vm(ym.transform(r))+")"},iae=bN(0,255),kS=Object.assign(Object.assign({},rh),{transform:e=>Math.round(iae(e))}),Wc={test:V9("rgb","red"),parse:xN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kS.transform(e)+", "+kS.transform(t)+", "+kS.transform(n)+", "+vm(ym.transform(r))+")"};function oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const jw={test:V9("#"),parse:oae,transform:Wc.transform},to={test:e=>Wc.test(e)||jw.test(e)||Of.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Of.test(e)?Of.parse(e):jw.parse(e),transform:e=>Iv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Of.transform(e)},SN="${c}",wN="${n}";function aae(e){var t,n,r,i;return isNaN(e)&&Iv(e)&&((n=(t=e.match(iv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Uw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function CN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Uw);r&&(n=r.length,e=e.replace(Uw,SN),t.push(...r.map(to.parse)));const i=e.match(iv);return i&&(e=e.replace(iv,wN),t.push(...i.map(rh.parse))),{values:t,numColors:n,tokenised:e}}function _N(e){return CN(e).values}function kN(e){const{values:t,numColors:n,tokenised:r}=CN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function lae(e){const t=_N(e);return kN(e)(t.map(sae))}const yu={test:aae,parse:_N,createTransformer:kN,getAnimatableNone:lae},uae=new Set(["brightness","contrast","saturate","opacity"]);function cae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iv)||[];if(!r)return e;const i=n.replace(r,"");let o=uae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const dae=/([a-z-]*)\(.*?\)/g,Gw=Object.assign(Object.assign({},yu),{getAnimatableNone:e=>{const t=e.match(dae);return t?t.map(cae).join(" "):e}}),uT={...rh,transform:Math.round},EN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:py,scaleX:py,scaleY:py,scaleZ:py,skew:Cc,skewX:Cc,skewY:Cc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:ym,originX:lT,originY:lT,originZ:St,zIndex:uT,fillOpacity:ym,strokeOpacity:ym,numOctaves:uT};function U9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(yN(m)){o[m]=v;continue}const b=EN[m],w=eae(v,b);if(Av.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Joe(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const j9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function PN(e,t,n){for(const r in t)!Ss(t[r])&&!vN(r,n)&&(e[r]=t[r])}function fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j9();return U9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hae(e,t,n){const r=e.style||{},i={};return PN(i,r,e),Object.assign(i,fae(e,t,n)),e.transformValues?e.transformValues(i):i}function pae(e,t,n){const r={},i=hae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const gae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],mae=["whileTap","onTap","onTapStart","onTapCancel"],vae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],yae=["whileInView","onViewportEnter","onViewportLeave","viewport"],bae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...yae,...mae,...gae,...vae]);function w4(e){return bae.has(e)}let TN=e=>!w4(e);function xae(e){!e||(TN=t=>t.startsWith("on")?!w4(t):e(t))}try{xae(require("@emotion/is-prop-valid").default)}catch{}function Sae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&w4(i)||!t&&!w4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cT(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function wae(e,t,n){const r=cT(t,e.x,e.width),i=cT(n,e.y,e.height);return`${r} ${i}`}const Cae={offset:"stroke-dashoffset",array:"stroke-dasharray"},_ae={offset:"strokeDashoffset",array:"strokeDasharray"};function kae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Cae:_ae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U9(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=wae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&kae(g,o,a,s,!1)}const LN=()=>({...j9(),attrs:{}});function Eae(e,t){const n=C.exports.useMemo(()=>{const r=LN();return G9(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};PN(r,e.style,e),n.style={...r,...n.style}}return n}function Pae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W9(n)?Eae:pae)(r,a,s),g={...Sae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const AN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function IN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const MN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function ON(e,t,n,r){IN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(MN.has(i)?i:AN(i),t.attrs[i])}function q9(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||vN(r,e))&&(n[r]=t[r]);return n}function RN(e){const t=q9(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const ov=e=>Array.isArray(e),Tae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),NN=e=>ov(e)?e[e.length-1]||0:e;function x3(e){const t=Ss(e)?e.get():e;return Tae(t)?t.toValue():t}function Lae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Aae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const DN=e=>(t,n)=>{const r=C.exports.useContext(j5),i=C.exports.useContext(j0),o=()=>Lae(e,t,r,i);return n?o():K5(o)};function Aae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=x3(o[m]);let{initial:a,animate:s}=e;const l=q5(e),u=gN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!G5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K9(e,v);if(!b)return;const{transitionEnd:w,transition:P,...E}=b;for(const k in E){let T=E[k];if(Array.isArray(T)){const I=h?T.length-1:0;T=T[I]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Iae={useVisualState:DN({scrapeMotionValuesFromProps:RN,createRenderState:LN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G9(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),ON(t,n)}})},Mae={useVisualState:DN({scrapeMotionValuesFromProps:q9,createRenderState:j9})};function Oae(e,{forwardMotionProps:t=!1},n,r,i){return{...W9(e)?Iae:Mae,preloadedFeatures:n,useRender:Pae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function Y5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Y5(i,t,n,r)},[e,t,n,r])}function Rae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};qw(t,"focus",e?r:void 0),qw(t,"blur",e?i:void 0)}function zN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function BN(e){return!!e.touches}function Nae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Dae={pageX:0,pageY:0};function zae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Dae;return{x:r[t+"X"],y:r[t+"Y"]}}function Bae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y9(e,t="page"){return{point:BN(e)?zae(e,t):Bae(e,t)}}const FN=(e,t=!1)=>{const n=r=>e(r,Y9(r));return t?Nae(n):n},Fae=()=>nh&&window.onpointerdown===null,$ae=()=>nh&&window.ontouchstart===null,Hae=()=>nh&&window.onmousedown===null,Wae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Vae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function $N(e){return Fae()?e:$ae()?Vae[e]:Hae()?Wae[e]:e}function o0(e,t,n,r){return Y5(e,$N(t),FN(n,t==="pointerdown"),r)}function C4(e,t,n,r){return qw(e,$N(t),n&&FN(n,t==="pointerdown"),r)}function HN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dT=HN("dragHorizontal"),fT=HN("dragVertical");function WN(e){let t=!1;if(e==="y")t=fT();else if(e==="x")t=dT();else{const n=dT(),r=fT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function VN(){const e=WN(!0);return e?(e(),!1):!0}function hT(e,t,n){return(r,i)=>{!zN(r)||VN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Uae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){C4(r,"pointerenter",e||n?hT(r,!0,e):void 0,{passive:!e}),C4(r,"pointerleave",t||n?hT(r,!1,t):void 0,{passive:!t})}const UN=(e,t)=>t?e===t?!0:UN(e,t.parentElement):!1;function Z9(e){return C.exports.useEffect(()=>()=>e(),[])}function jN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),ES=.001,Gae=.01,pT=10,qae=.05,Kae=1;function Yae({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;jae(e<=pT*1e3);let a=1-t;a=k4(qae,Kae,a),e=k4(Gae,pT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Kw(u,a),b=Math.exp(-g);return ES-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Kw(Math.pow(u,2),a);return(-i(u)+ES>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-ES+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=Xae(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Zae=12;function Xae(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ese(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gT(e,Jae)&&gT(e,Qae)){const n=Yae(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X9(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=jN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ese(o),v=mT,b=mT;function w(){const P=h?-(h/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Kw(T,k);v=O=>{const N=Math.exp(-k*T*O);return n-N*((P+k*T*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const N=Math.exp(-k*T*O);return k*T*N*(Math.sin(I*O)*(P+k*T*E)/I+E*Math.cos(I*O))-N*(Math.cos(I*O)*(P+k*T*E)-I*E*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-T*I)*(E+(P+T*E)*I);else{const I=T*Math.sqrt(k*k-1);v=O=>{const N=Math.exp(-k*T*O),D=Math.min(I*O,300);return n-N*((P+k*T*E)*Math.sinh(D)+I*E*Math.cosh(D))/I}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=g;else{const k=b(P)*1e3,T=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=T&&I}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X9.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mT=e=>0,av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function PS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=PS(l,s,e+1/3),o=PS(l,s,e),a=PS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},nse=[jw,Wc,Of],yT=e=>nse.find(t=>t.test(e)),GN=(e,t)=>{let n=yT(e),r=yT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=vT(i),n=Wc),r===Of&&(o=vT(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=tse(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Yw=e=>typeof e=="number",rse=(e,t)=>n=>t(e(n)),Z5=(...e)=>e.reduce(rse);function qN(e,t){return Yw(e)?n=>_r(e,t,n):to.test(e)?GN(e,t):YN(e,t)}const KN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>qN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bT(e){const t=yu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=yu.createTransformer(t),r=bT(e),i=bT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Z5(KN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ose=(e,t)=>n=>_r(e,t,n);function ase(e){if(typeof e=="number")return ose;if(typeof e=="string")return to.test(e)?GN:YN;if(Array.isArray(e))return KN;if(typeof e=="object")return ise}function sse(e,t,n){const r=[],i=n||ase(e[0]),o=e.length-1;for(let a=0;an(av(e,t,r))}function use(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=av(e[o],e[o+1],i);return t[o](s)}}function ZN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;_4(o===t.length),_4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=sse(t,r,i),s=o===2?lse(e,a):use(e,a);return n?l=>s(k4(e[0],e[o-1],l)):s}const X5=e=>t=>1-e(1-t),Q9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cse=e=>t=>Math.pow(t,e),XN=e=>t=>t*t*((e+1)*t-e),dse=e=>{const t=XN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},QN=1.525,fse=4/11,hse=8/11,pse=9/10,J9=e=>e,e7=cse(2),gse=X5(e7),JN=Q9(e7),eD=e=>1-Math.sin(Math.acos(e)),t7=X5(eD),mse=Q9(t7),n7=XN(QN),vse=X5(n7),yse=Q9(n7),bse=dse(QN),xse=4356/361,Sse=35442/1805,wse=16061/1805,E4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-E4(1-e*2)):.5*E4(e*2-1)+.5;function kse(e,t){return e.map(()=>t||JN).splice(0,e.length-1)}function Ese(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Pse(e,t){return e.map(n=>n*t)}function S3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Pse(r&&r.length===a.length?r:Ese(a),i);function l(){return ZN(s,a,{ease:Array.isArray(n)?n:kse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Tse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const xT={keyframes:S3,spring:X9,decay:Tse};function Lse(e){if(Array.isArray(e.to))return S3;if(xT[e.type])return xT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X9:S3}const tD=1/60*1e3,Ase=typeof performance<"u"?()=>performance.now():()=>Date.now(),nD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ase()),tD);function Ise(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Ise(()=>sv=!0),e),{}),Ose=Ov.reduce((e,t)=>{const n=Q5[t];return e[t]=(r,i=!1,o=!1)=>(sv||Dse(),n.schedule(r,i,o)),e},{}),Rse=Ov.reduce((e,t)=>(e[t]=Q5[t].cancel,e),{});Ov.reduce((e,t)=>(e[t]=()=>Q5[t].process(a0),e),{});const Nse=e=>Q5[e].process(a0),rD=e=>{sv=!1,a0.delta=Zw?tD:Math.max(Math.min(e-a0.timestamp,Mse),1),a0.timestamp=e,Xw=!0,Ov.forEach(Nse),Xw=!1,sv&&(Zw=!1,nD(rD))},Dse=()=>{sv=!0,Zw=!0,Xw||nD(rD)},zse=()=>a0;function iD(e,t,n=0){return e-t-n}function Bse(e,t,n=0,r=!0){return r?iD(t+-e,t,n):t-(e-t)+n}function Fse(e,t,n,r){return r?e>=t+n:e<=-n}const $se=e=>{const t=({delta:n})=>e(n);return{start:()=>Ose.update(t,!0),stop:()=>Rse.update(t)}};function oD(e){var t,n,{from:r,autoplay:i=!0,driver:o=$se,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=jN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,k=0,T=w.duration,I,O=!1,N=!0,D;const z=Lse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(D=ZN([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){k++,l==="reverse"?(N=k%2===0,a=Bse(a,T,u,N)):(a=iD(a,T,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){E.stop(),m&&m()}function de(te){if(N||(te=-te),a+=te,!O){const re=$.next(Math.max(0,a));I=re.value,D&&(I=D(I)),O=N?re.done:a<=0}b?.(I),O&&(k===0&&(T??(T=a)),k{g?.(),E.stop()}}}function aD(e,t){return t?e*(1e3/t):0}function Hse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(I),(O=T.onUpdate)===null||O===void 0||O.call(T,I)},onComplete:m,onStop:v}))}function k(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const I=P(T),O=I===n?-1:1;let N,D;const z=$=>{N=D,D=$,t=aD($-N,zse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Qw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ST=e=>Qw(e)&&e.hasOwnProperty("z"),gy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Yw(e)&&Yw(t))return gy(e,t);if(Qw(e)&&Qw(t)){const n=gy(e.x,t.x),r=gy(e.y,t.y),i=ST(e)&&ST(t)?gy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const sD=(e,t)=>1-3*t+3*e,lD=(e,t)=>3*t-6*e,uD=e=>3*e,P4=(e,t,n)=>((sD(t,n)*e+lD(t,n))*e+uD(t))*e,cD=(e,t,n)=>3*sD(t,n)*e*e+2*lD(t,n)*e+uD(t),Wse=1e-7,Vse=10;function Use(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=P4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Wse&&++s=Gse?qse(a,g,e,n):m===0?g:Use(a,s,s+my,e,n)}return a=>a===0||a===1?a:P4(o(a),t,r)}function Yse({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!VN()}function g(b,w){!h()||(UN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=Z5(o0(window,"pointerup",g,l),o0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}C4(i,"pointerdown",o?v:void 0,l),Z9(u)}const Zse="production",dD=typeof process>"u"||process.env===void 0?Zse:"production",wT=new Set;function fD(e,t,n){e||wT.has(t)||(console.warn(t),n&&console.warn(n),wT.add(t))}const Jw=new WeakMap,TS=new WeakMap,Xse=e=>{const t=Jw.get(e.target);t&&t(e)},Qse=e=>{e.forEach(Xse)};function Jse({root:e,...t}){const n=e||document;TS.has(n)||TS.set(n,{});const r=TS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Qse,{root:e,...t})),r[i]}function ele(e,t,n){const r=Jse(t);return Jw.set(e,n),r.observe(e),()=>{Jw.delete(e),r.unobserve(e)}}function tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ile:rle)(a,o.current,e,i)}const nle={some:0,all:1};function rle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:nle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return ele(n.getInstance(),s,l)},[e,r,i,o])}function ile(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(dD!=="production"&&fD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),ole={inView:Vc(tle),tap:Vc(Yse),focus:Vc(Rae),hover:Vc(Uae)};function i7(){const e=C.exports.useContext(j0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ale(){return sle(C.exports.useContext(j0))}function sle(e){return e===null?!0:e.isPresent}function hD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,lle={linear:J9,easeIn:e7,easeInOut:JN,easeOut:gse,circIn:eD,circInOut:mse,circOut:t7,backIn:n7,backInOut:yse,backOut:vse,anticipate:bse,bounceIn:Cse,bounceInOut:_se,bounceOut:E4},CT=e=>{if(Array.isArray(e)){_4(e.length===4);const[t,n,r,i]=e;return Kse(t,n,r,i)}else if(typeof e=="string")return lle[e];return e},ule=e=>Array.isArray(e)&&typeof e[0]!="number",_T=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&yu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),vy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LS=()=>({type:"keyframes",ease:"linear",duration:.3}),cle=e=>({type:"keyframes",duration:.8,values:e}),kT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:vy,scaleY:vy,scale:vy,opacity:LS,backgroundColor:LS,color:LS,default:vy},dle=(e,t)=>{let n;return ov(t)?n=cle:n=kT[e]||kT.default,{to:t,...n(t)}},fle={...EN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:Gw,WebkitFilter:Gw},o7=e=>fle[e];function a7(e,t){var n;let r=o7(e);return r!==Gw&&(r=yu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const hle={current:!1},pD=1/60*1e3,ple=typeof performance<"u"?()=>performance.now():()=>Date.now(),gD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(ple()),pD);function gle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=gle(()=>lv=!0),e),{}),ws=Rv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(lv||yle(),n.schedule(r,i,o)),e},{}),Yf=Rv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{}),AS=Rv.reduce((e,t)=>(e[t]=()=>J5[t].process(s0),e),{}),vle=e=>J5[e].process(s0),mD=e=>{lv=!1,s0.delta=eC?pD:Math.max(Math.min(e-s0.timestamp,mle),1),s0.timestamp=e,tC=!0,Rv.forEach(vle),tC=!1,lv&&(eC=!1,gD(mD))},yle=()=>{lv=!0,eC=!0,tC||gD(mD)},nC=()=>s0;function vD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Yf.read(r),e(o-t))};return ws.read(r,!0),()=>Yf.read(r)}function ble({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function xle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=T4(o.duration)),o.repeatDelay&&(a.repeatDelay=T4(o.repeatDelay)),e&&(a.ease=ule(e)?e.map(CT):CT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Sle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function wle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Cle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),wle(t),ble(e)||(e={...e,...dle(n,t.to)}),{...t,...xle(e)}}function _le(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_T(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):ET(a)&&typeof n=="string"?a=PT(n):!Array.isArray(n)&&ET(n)&&typeof a=="string"&&(n=PT(a));const l=_T(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Hse({...g,...o}):oD({...Cle(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=NN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function ET(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PT(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return hle.current&&(r={type:!1}),t.start(i=>{let o;const a=_le(e,t,n,r,i),s=Sle(r,e),l=()=>o=a();let u;return s?u=vD(l,T4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const kle=e=>/^\-?\d*\.?\d+$/.test(e),Ele=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class bm{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new bm,this.velocityUpdateSubscribers=new bm,this.renderSubscribers=new bm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=nC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Ple(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?aD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function L0(e){return new Tle(e)}const yD=e=>t=>t.test(e),Lle={test:e=>e==="auto",parse:e=>e},bD=[rh,St,Sl,Cc,rae,nae,Lle],wg=e=>bD.find(yD(e)),Ale=[...bD,to,yu],Ile=e=>Ale.find(yD(e));function Mle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Ole(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function eb(e,t,n){const r=e.getProps();return K9(r,t,n!==void 0?n:r.custom,Mle(e),Ole(e))}function Rle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,L0(n))}function Nle(e,t){const n=eb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=NN(o[a]);Rle(e,a,s)}}function Dle(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;srC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=rC(e,t,n);else{const i=typeof t=="function"?eb(e,t,n.custom):t;r=xD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function rC(e,t,n={}){var r;const i=eb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>xD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return $le(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function xD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Wle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Av.has(m)&&(w={...w,type:!1,delay:0});let P=l7(m,v,b,w);L4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&Nle(e,s)})}function $le(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Hle).forEach((u,h)=>{a.push(rC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Hle(e,t){return e.sortNodePosition(t)}function Wle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Vle=[...d7].reverse(),Ule=d7.length;function jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Fle(e,n,r)))}function Gle(e){let t=jle(e);const n=Kle();let r=!0;const i=(l,u)=>{const h=eb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},P=1/0;for(let k=0;kP&&N;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},re=se=>{W=!0,b.delete(se),I.needsAnimating[se]=!0};for(const se in te){const G=de[se],V=j[se];w.hasOwnProperty(se)||(G!==V?ov(G)&&ov(V)?!hD(G,V)||$?re(se):I.protectedKeys[se]=!0:G!==void 0?re(se):b.add(se):G!==void 0&&b.has(se)?re(se):I.protectedKeys[se]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...Y.map(se=>({animation:se,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const I=e.getBaseTarget(T);I!==void 0&&(k[T]=I)}),v.push({animation:k})}let E=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function qle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kle(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Yle={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Gle(e)),G5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(j0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class SD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=MS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=nC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=IS(h,this.transformPagePoint),zN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=MS(IS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},BN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y9(t),o=IS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=nC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,MS(o,this.history)),this.removeListeners=Z5(o0(window,"pointermove",this.handlePointerMove),o0(window,"pointerup",this.handlePointerUp),o0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Yf.update(this.updatePoint)}}function IS(e,t){return t?{point:t(e.point)}:e}function TT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function MS({point:e},t){return{point:e,delta:TT(e,wD(t)),offset:TT(e,Zle(t)),velocity:Xle(t,.1)}}function Zle(e){return e[0]}function wD(e){return e[e.length-1]}function Xle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=wD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>T4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ua(e){return e.max-e.min}function LT(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function OT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eue(e,{top:t,left:n,bottom:r,right:i}){return{x:OT(e.x,n,i),y:OT(e.y,t,r)}}function RT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=av(t.min,t.max-r,e.min):r>i&&(n=av(e.min,e.max-i,t.min)),k4(0,1,n)}function rue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iC=.35;function iue(e=iC){return e===!1?e=0:e===!0&&(e=iC),{x:NT(e,"left","right"),y:NT(e,"top","bottom")}}function NT(e,t,n){return{min:DT(e,t),max:DT(e,n)}}function DT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zT=()=>({translate:0,scale:1,origin:0,originPoint:0}),wm=()=>({x:zT(),y:zT()}),BT=()=>({min:0,max:0}),ki=()=>({x:BT(),y:BT()});function sl(e){return[e("x"),e("y")]}function CD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function OS(e){return e===void 0||e===1}function oC({scale:e,scaleX:t,scaleY:n}){return!OS(e)||!OS(t)||!OS(n)}function bf(e){return oC(e)||_D(e)||e.z||e.rotate||e.rotateX||e.rotateY}function _D(e){return FT(e.x)||FT(e.y)}function FT(e){return e&&e!=="0%"}function A4(e,t,n){const r=e-n,i=t*r;return n+i}function $T(e,t,n,r,i){return i!==void 0&&(e=A4(e,i,r)),A4(e,n,r)+t}function aC(e,t=0,n=1,r,i){e.min=$T(e.min,t,n,r,i),e.max=$T(e.max,t,n,r,i)}function kD(e,{x:t,y:n}){aC(e.x,t.translate,t.scale,t.originPoint),aC(e.y,n.translate,n.scale,n.originPoint)}function sue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(Y9(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=WN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let P=this.getAxisMotionValue(v).get()||0;if(Sl.test(P)){const E=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=ua(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=hue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new SD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Jle(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Wp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eue(r.actual,t):this.constraints=!1,this.elastic=iue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=rue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cue(r,i.root,this.visualElement.getTransformPagePoint());let a=tue(i.layout.actual,o);if(n){const s=n(oue(a));this.hasMutatedConstraints=!!s,s&&(a=CD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!yy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!yy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=nue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!yy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;due.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=o0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Y5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=iC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function yy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function pue(e){const{dragControls:t,visualElement:n}=e,r=K5(()=>new fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function gue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($9),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new SD(h,l,{transformPagePoint:s})}C4(i,"pointerdown",o&&u),Z9(()=>a.current&&a.current.end())}const mue={pan:Vc(gue),drag:Vc(pue)},sC={current:null},PD={current:!1};function vue(){if(PD.current=!0,!!nh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sC.current=e.matches;e.addListener(t),t()}else sC.current=!1}const by=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function yue(){const e=by.map(()=>new bm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{by.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+by[i]]=o=>r.add(o),n["notify"+by[i]]=(...o)=>r.notify(...o)}),n}function bue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),L4(r)&&r.add(i);else if(Ss(a))e.addValue(i,L0(o)),L4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,L0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(rv),xue=TD.length,LD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:k,renderState:T}=b;let I;const O=yue(),N=new Map,D=new Map;let z={};const $={...k},W=g.initial?{...k}:{};let Y;function de(){!I||!E||(j(),o(I,T,g.style,Q.projection))}function j(){t(Q,T,k,P,g)}function te(){O.notifyUpdate(k)}function re(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:se,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),L4(se)&&se.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const V=q5(g),q=gN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){E=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!V&&(Y=h?.addVariantChild(Q)),N.forEach((me,ye)=>re(ye,me)),PD.current||vue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:sC.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Yf.update(te),Yf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,ye,Se,He,Ue){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:Ue,layoutScroll:At})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),N.set(X,me),k[X]=me.get(),re(X,me)},removeValue(X){var me;N.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,T)},hasValue:X=>N.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=N.get(X);return ye===void 0&&me!==void 0&&(ye=L0(me),Q.addValue(X,ye)),ye},forEachValue:X=>N.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,P),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K9(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),T},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=bue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!V){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!lC(o))return;const a=uC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!lC(o))continue;const a=uC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ue=new Set(["width","height","top","left","right","bottom","x","y"]),MD=e=>_ue.has(e),kue=e=>Object.keys(e).some(MD),OD=(e,t)=>{e.set(t,!1),e.set(t)},WT=e=>e===rh||e===St;var VT;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VT||(VT={}));const UT=(e,t)=>parseFloat(e.split(", ")[t]),jT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UT(o[1],e):0}},Eue=new Set(["x","y","z"]),Pue=S4.filter(e=>!Eue.has(e));function Tue(e){const t=[];return Pue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const GT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jT(4,13),y:jT(5,14)},Lue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=GT[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);OD(h,s[u]),e[u]=GT[u](l,o)}),e},Aue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(MD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=wg(h);const m=t[l];let v;if(ov(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=wg(h);for(let P=w;P=0?window.pageYOffset:null,u=Lue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),nh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Iue(e,t,n,r){return kue(t)?Aue(e,t,n,r):{target:t,transitionEnd:r}}const Mue=(e,t,n,r)=>{const i=Cue(e,t,r);return t=i.target,r=i.transitionEnd,Iue(e,t,n,r)};function Oue(e){return window.getComputedStyle(e)}const RD={treeType:"dom",readValueFromInstance(e,t){if(Av.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Oue(e),r=(yN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ED(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Ble(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Dle(e,r,a);const s=Mue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q9,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U9(t,n,r,i.transformTemplate)},render:IN},Rue=LD(RD),Nue=LD({...RD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Av.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=MN.has(t)?t:AN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:RN,build(e,t,n,r,i){G9(t,n,r,i.transformTemplate)},render:ON}),Due=(e,t)=>W9(e)?Nue(t,{enableHardwareAcceleration:!1}):Rue(t,{enableHardwareAcceleration:!0});function qT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Cg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qT(e,t.target.x),r=qT(e,t.target.y);return`${n}% ${r}%`}},KT="_$css",zue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(ID,v=>(o.push(v),KT)));const a=yu.parse(e);if(a.length>5)return r;const s=yu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(KT,()=>{const b=o[v];return v++,b})}return m}};class Bue extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Zoe($ue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Fue(e){const[t,n]=i7(),r=C.exports.useContext(H9);return x(Bue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(mN),isPresent:t,safeToRemove:n})}const $ue={borderRadius:{...Cg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cg,borderTopRightRadius:Cg,borderBottomLeftRadius:Cg,borderBottomRightRadius:Cg,boxShadow:zue},Hue={measureLayout:Fue};function Wue(e,t,n={}){const r=Ss(e)?e:L0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const ND=["TopLeft","TopRight","BottomLeft","BottomRight"],Vue=ND.length,YT=e=>typeof e=="string"?parseFloat(e):e,ZT=e=>typeof e=="number"||St.test(e);function Uue(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,Gue(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(av(e,t,r))}function QT(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QT(e.x,t.x),QT(e.y,t.y)}function JT(e,t,n,r,i){return e-=t,e=A4(e,1/n,r),i!==void 0&&(e=A4(e,1/i,r)),e}function que(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JT(e.min,t,n,s,i),e.max=JT(e.max,t,n,s,i)}function eL(e,t,[n,r,i],o,a){que(e,t[n],t[r],t[i],t.scale,o,a)}const Kue=["x","scaleX","originX"],Yue=["y","scaleY","originY"];function tL(e,t,n,r){eL(e.x,t,Kue,n?.x,r?.x),eL(e.y,t,Yue,n?.y,r?.y)}function nL(e){return e.translate===0&&e.scale===1}function zD(e){return nL(e.x)&&nL(e.y)}function BD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rL(e){return ua(e.x)/ua(e.y)}function Zue(e,t,n=.1){return r7(e,t)<=n}class Xue{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Que="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iL(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Que?"none":o}const Jue=(e,t)=>e.depth-t.depth;class ece{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jue),this.isDirty=!1,this.children.forEach(t)}}const oL=["","X","Y","Z"],aL=1e3;function FD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(oce),this.nodes.forEach(ace)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=vD(v,250),mm.hasAnimatedSinceResize&&(mm.hasAnimatedSinceResize=!1,this.nodes.forEach(lL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var P,E,k,T,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(P=this.options.transition)!==null&&P!==void 0?P:g.getDefaultTransition())!==null&&E!==void 0?E:dce,{onLayoutAnimationStart:N,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!BD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...s7(O,"layout"),onPlay:N,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&lL(this),this.isLead()&&((I=(T=this.options).onExitComplete)===null||I===void 0||I.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Yf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(sce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));fL(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=E/1e3;uL(m.x,a.x,T),uL(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Sm(v,this.layout.actual,this.relativeParent.layout.actual),uce(this.relativeTarget,this.relativeTargetOrigin,v,T)),b&&(this.animationValues=g,Uue(g,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Yf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{mm.hasAnimatedSinceResize=!0,this.currentAnimation=Wue(0,aL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,aL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&$D(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=ua(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ua(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Vp(s,h),xm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Xue),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(sL),this.root.sharedNodes.clear()}}}function tce(e){e.updateLayout()}function nce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=ua(v);v.min=o[m].min,v.max=v.min+b}):$D(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=ua(o[m]);v.max=v.min+b});const l=wm();xm(l,o,i.layout);const u=wm();i.isShared?xm(u,e.applyTransform(a,!0),i.measured):xm(u,o,i.layout);const h=!zD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Sm(b,i.layout,m.layout);const w=ki();Sm(w,o,v.actual),BD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function rce(e){e.clearSnapshot()}function sL(e){e.clearMeasurements()}function ice(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function oce(e){e.resolveTargetDelta()}function ace(e){e.calcProjection()}function sce(e){e.resetRotation()}function lce(e){e.removeLeadSnapshot()}function uL(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cL(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function uce(e,t,n,r){cL(e.x,t.x,n.x,r),cL(e.y,t.y,n.y,r)}function cce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dce={duration:.45,ease:[.4,0,.1,1]};function fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function dL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fL(e){dL(e.x),dL(e.y)}function $D(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zue(rL(t),rL(n),.2)}const hce=FD({attachResizeListener:(e,t)=>Y5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),RS={current:void 0},pce=FD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!RS.current){const e=new hce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),RS.current=e}return RS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),gce={...Yle,...ole,...mue,...Hue},Il=Koe((e,t)=>Oae(e,t,gce,Due,pce));function HD(){const e=C.exports.useRef(!1);return b4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mce(){const e=HD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class vce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},rre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ire=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),ore=e=>({transitionProperty:"common",transitionDuration:"slow",...nre(e)}),are=Vg(e=>({label:rre,filledTrack:ore(e),track:ire(e)})),sre={xs:Vg({track:{h:"1"}}),sm:Vg({track:{h:"2"}}),md:Vg({track:{h:"3"}}),lg:Vg({track:{h:"4"}})},lre=tre({sizes:sre,baseStyle:are,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ure,definePartsStyle:v3}=ir(fJ.keys),cre=e=>{var t;const n=(t=fi(m4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},dre=v3(e=>{var t,n,r,i;return{label:(n=(t=m4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=m4).baseStyle)==null?void 0:i.call(r,e).container,control:cre(e)}}),fre={md:v3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:v3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:v3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},hre=ure({baseStyle:dre,sizes:fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:pre,definePartsStyle:gre}=ir(hJ.keys),mre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},vre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},yre=gre(e=>({field:mre(e),icon:vre})),fy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,bre={lg:{...(VP=mn.sizes)==null?void 0:VP.lg,field:{...(UP=mn.sizes)==null?void 0:UP.lg.field,...fy}},md:{...(jP=mn.sizes)==null?void 0:jP.md,field:{...(GP=mn.sizes)==null?void 0:GP.md.field,...fy}},sm:{...(qP=mn.sizes)==null?void 0:qP.sm,field:{...(KP=mn.sizes)==null?void 0:KP.sm.field,...fy}},xs:{...(YP=mn.sizes)==null?void 0:YP.xs,field:{...(ZP=mn.sizes)==null?void 0:ZP.xs.field,...fy},icon:{insetEnd:"1"}}},xre=pre({baseStyle:yre,sizes:bre,variants:mn.variants,defaultProps:mn.defaultProps}),Sre=ei("skeleton-start-color"),wre=ei("skeleton-end-color"),Cre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Sre.variable]:a,[wre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},_re={baseStyle:Cre},SS=ei("skip-link-bg"),kre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[SS.variable]:"colors.white",_dark:{[SS.variable]:"colors.gray.700"},bg:SS.reference}},Ere={baseStyle:kre},{defineMultiStyleConfig:Pre,definePartsStyle:V5}=ir(pJ.keys),ev=ei("slider-thumb-size"),tv=ei("slider-track-size"),Mc=ei("slider-bg"),Tre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Lre=e=>({...D9({orientation:e.orientation,horizontal:{h:tv.reference},vertical:{w:tv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Are=e=>{const{orientation:t}=e;return{...D9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ev.reference,h:ev.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Ire=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Mre=V5(e=>({container:Tre(e),track:Lre(e),thumb:Are(e),filledTrack:Ire(e)})),Ore=V5({container:{[ev.variable]:"sizes.4",[tv.variable]:"sizes.1"}}),Rre=V5({container:{[ev.variable]:"sizes.3.5",[tv.variable]:"sizes.1"}}),Nre=V5({container:{[ev.variable]:"sizes.2.5",[tv.variable]:"sizes.0.5"}}),Dre={lg:Ore,md:Rre,sm:Nre},zre=Pre({baseStyle:Mre,sizes:Dre,defaultProps:{size:"md",colorScheme:"blue"}}),kf=ji("spinner-size"),Bre={width:[kf.reference],height:[kf.reference]},Fre={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},$re={baseStyle:Bre,sizes:Fre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Hre,definePartsStyle:uN}=ir(gJ.keys),Wre={fontWeight:"medium"},Vre={opacity:.8,marginBottom:"2"},Ure={verticalAlign:"baseline",fontWeight:"semibold"},jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Gre=uN({container:{},label:Wre,helpText:Vre,number:Ure,icon:jre}),qre={md:uN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Kre=Hre({baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Yre,definePartsStyle:y3}=ir(mJ.keys),gm=ji("switch-track-width"),zf=ji("switch-track-height"),wS=ji("switch-track-diff"),Zre=lu.subtract(gm,zf),Ww=ji("switch-thumb-x"),Sg=ji("switch-bg"),Xre=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[gm.reference],height:[zf.reference],transitionProperty:"common",transitionDuration:"fast",[Sg.variable]:"colors.gray.300",_dark:{[Sg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Sg.variable]:`colors.${t}.500`,_dark:{[Sg.variable]:`colors.${t}.200`}},bg:Sg.reference}},Qre={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[zf.reference],height:[zf.reference],_checked:{transform:`translateX(${Ww.reference})`}},Jre=y3(e=>({container:{[wS.variable]:Zre,[Ww.variable]:wS.reference,_rtl:{[Ww.variable]:lu(wS).negate().toString()}},track:Xre(e),thumb:Qre})),eie={sm:y3({container:{[gm.variable]:"1.375rem",[zf.variable]:"sizes.3"}}),md:y3({container:{[gm.variable]:"1.875rem",[zf.variable]:"sizes.4"}}),lg:y3({container:{[gm.variable]:"2.875rem",[zf.variable]:"sizes.6"}})},tie=Yre({baseStyle:Jre,sizes:eie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nie,definePartsStyle:i0}=ir(vJ.keys),rie=i0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),v4={"&[data-is-numeric=true]":{textAlign:"end"}},iie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),oie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),aie={simple:iie,striped:oie,unstyled:{}},sie={sm:i0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:i0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:i0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},lie=nie({baseStyle:rie,variants:aie,sizes:sie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:uie,definePartsStyle:Sl}=ir(yJ.keys),cie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},die=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},hie={p:4},pie=Sl(e=>({root:cie(e),tab:die(e),tablist:fie(e),tabpanel:hie})),gie={sm:Sl({tab:{py:1,px:4,fontSize:"sm"}}),md:Sl({tab:{fontSize:"md",py:2,px:4}}),lg:Sl({tab:{fontSize:"lg",py:3,px:4}})},mie=Sl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),vie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),yie=Sl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),bie=Sl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),xie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),Sie=Sl({}),wie={line:mie,enclosed:vie,"enclosed-colored":yie,"soft-rounded":bie,"solid-rounded":xie,unstyled:Sie},Cie=uie({baseStyle:pie,sizes:gie,variants:wie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:_ie,definePartsStyle:Bf}=ir(bJ.keys),kie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Eie={lineHeight:1.2,overflow:"visible"},Pie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Tie=Bf({container:kie,label:Eie,closeButton:Pie}),Lie={sm:Bf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Bf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Bf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Aie={subtle:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.subtle(e)}}),solid:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.solid(e)}}),outline:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.outline(e)}})},Iie=_ie({variants:Aie,baseStyle:Tie,sizes:Lie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,Mie={...(XP=mn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Oie={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eT,tT,nT,Rie={xs:((JP=mn.sizes)==null?void 0:JP.xs.field)??{},sm:((eT=mn.sizes)==null?void 0:eT.sm.field)??{},md:((tT=mn.sizes)==null?void 0:tT.md.field)??{},lg:((nT=mn.sizes)==null?void 0:nT.lg.field)??{}},Nie={baseStyle:Mie,sizes:Rie,variants:Oie,defaultProps:{size:"md",variant:"outline"}},hy=ji("tooltip-bg"),CS=ji("tooltip-fg"),Die=ji("popper-arrow-bg"),zie={bg:hy.reference,color:CS.reference,[hy.variable]:"colors.gray.700",[CS.variable]:"colors.whiteAlpha.900",_dark:{[hy.variable]:"colors.gray.300",[CS.variable]:"colors.gray.900"},[Die.variable]:hy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Bie={baseStyle:zie},Fie={Accordion:oee,Alert:hee,Avatar:_ee,Badge:fm,Breadcrumb:Ree,Button:Vee,Checkbox:m4,CloseButton:Jee,Code:rte,Container:ote,Divider:cte,Drawer:Ste,Editable:Tte,Form:Rte,FormError:$te,FormLabel:Wte,Heading:jte,Input:mn,Kbd:tne,Link:rne,List:lne,Menu:yne,Modal:Lne,NumberInput:Fne,PinInput:Vne,Popover:ere,Progress:lre,Radio:hre,Select:xre,Skeleton:_re,SkipLink:Ere,Slider:zre,Spinner:$re,Stat:Kre,Switch:tie,Table:lie,Tabs:Cie,Tag:Iie,Textarea:Nie,Tooltip:Bie},$ie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Hie=$ie,Wie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Vie=Wie,Uie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},jie=Uie,Gie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},qie=Gie,Kie={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Yie=Kie,Zie={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Xie={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Qie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Jie={property:Zie,easing:Xie,duration:Qie},eoe=Jie,toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},noe=toe,roe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ioe=roe,ooe={breakpoints:Vie,zIndices:noe,radii:qie,blur:ioe,colors:jie,...aN,sizes:rN,shadows:Yie,space:nN,borders:Hie,transition:eoe},aoe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},soe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},loe="ltr",uoe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},coe={semanticTokens:aoe,direction:loe,...ooe,components:Fie,styles:soe,config:uoe},doe=typeof Element<"u",foe=typeof Map=="function",hoe=typeof Set=="function",poe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!b3(e[r],t[r]))return!1;return!0}var o;if(foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!b3(r.value[1],t.get(r.value[0])))return!1;return!0}if(hoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(poe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(doe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!b3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var goe=function(t,n){try{return b3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function U0(){const e=C.exports.useContext(Qm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function cN(){const e=Ev(),t=U0();return{...e,theme:t}}function moe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function yoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return moe(o,l,a[u]??l);const h=`${e}.${l}`;return voe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function boe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>vX(n),[n]);return ee(EQ,{theme:i,children:[x(xoe,{root:t}),r]})}function xoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x($5,{styles:n=>({[t]:n.__cssVars})})}WQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Soe(){const{colorMode:e}=Ev();return x($5,{styles:t=>{const n=jR(t,"styles.global"),r=KR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var woe=new Set([...xX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Coe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function _oe(e){return Coe.has(e)||!woe.has(e)}var koe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=GR(a,(g,m)=>wX(m)),l=KR(e,t),u=Object.assign({},i,l,qR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function _S(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=_oe);const i=koe({baseStyle:n}),o=zw(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:g}=Ev();return le.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function dN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=cN(),a=e?jR(i,`components.${e}`):void 0,s=n||a,l=ml({theme:i,colorMode:o},s?.defaultProps??{},qR(DQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=MX(s)(l);goe(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return dN(e,t)}function Ri(e,t={}){return dN(e,t)}function Eoe(){const e=new Map;return new Proxy(_S,{apply(t,n,r){return _S(...r)},get(t,n){return e.has(n)||e.set(n,_S(n)),e.get(n)}})}var we=Eoe();function Poe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Poe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Toe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Toe(n,t)})}}function Loe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Aoe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Vw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,y4=e=>e,Ioe=class{descendants=new Map;register=e=>{if(e!=null)return Aoe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=iT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=oT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=rT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Moe(){const e=C.exports.useRef(new Ioe);return Vw(()=>()=>e.current.destroy()),e.current}var[Ooe,fN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Roe(e){const t=fN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Vw(()=>()=>{!i.current||t.unregister(i.current)},[]),Vw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=y4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function hN(){return[y4(Ooe),()=>y4(fN()),()=>Moe(),i=>Roe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??aT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const b=a??aT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function lt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function U5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $9=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),j5=C.exports.createContext({});function Noe(){return C.exports.useContext(j5).visualElement}const j0=C.exports.createContext(null),nh=typeof document<"u",b4=nh?C.exports.useLayoutEffect:C.exports.useEffect,pN=C.exports.createContext({strict:!1});function Doe(e,t,n,r){const i=Noe(),o=C.exports.useContext(pN),a=C.exports.useContext(j0),s=C.exports.useContext($9).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return b4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),b4(()=>()=>u&&u.notifyUnmount(),[]),u}function Wp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zoe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wp(n)&&(n.current=r))},[t])}function nv(e){return typeof e=="string"||Array.isArray(e)}function G5(e){return typeof e=="object"&&typeof e.start=="function"}const Boe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function q5(e){return G5(e.animate)||Boe.some(t=>nv(e[t]))}function gN(e){return Boolean(q5(e)||e.variants)}function Foe(e,t){if(q5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||nv(n)?n:void 0,animate:nv(r)?r:void 0}}return e.inherit!==!1?t:{}}function $oe(e){const{initial:t,animate:n}=Foe(e,C.exports.useContext(j5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sT(t),sT(n)])}function sT(e){return Array.isArray(e)?e.join(" "):e}const nu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),rv={measureLayout:nu(["layout","layoutId","drag"]),animation:nu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:nu(["exit"]),drag:nu(["drag","dragControls"]),focus:nu(["whileFocus"]),hover:nu(["whileHover","onHoverStart","onHoverEnd"]),tap:nu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:nu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:nu(["whileInView","onViewportEnter","onViewportLeave"])};function Hoe(e){for(const t in e)t==="projectionNodeConstructor"?rv.projectionNodeConstructor=e[t]:rv[t].Component=e[t]}function K5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Woe=1;function Voe(){return K5(()=>{if(mm.hasEverUpdated)return Woe++})}const H9=C.exports.createContext({});class Uoe extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const mN=C.exports.createContext({}),joe=Symbol.for("motionComponentSymbol");function Goe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Hoe(e);function a(l,u){const h={...C.exports.useContext($9),...l,layoutId:qoe(l)},{isStatic:g}=h;let m=null;const v=$oe(l),b=g?void 0:Voe(),w=i(l,g);if(!g&&nh){v.visualElement=Doe(o,w,h,t);const P=C.exports.useContext(pN).strict,E=C.exports.useContext(mN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,b,n||rv.projectionNodeConstructor,E))}return ee(Uoe,{visualElement:v.visualElement,props:h,children:[m,x(j5.Provider,{value:v,children:r(o,l,b,zoe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[joe]=o,s}function qoe({layoutId:e}){const t=C.exports.useContext(H9).id;return t&&e!==void 0?t+"-"+e:e}function Koe(e){function t(r,i={}){return Goe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Yoe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function W9(e){return typeof e!="string"||e.includes("-")?!1:!!(Yoe.indexOf(e)>-1||/[A-Z]/.test(e))}const x4={};function Zoe(e){Object.assign(x4,e)}const S4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Av=new Set(S4);function vN(e,{layout:t,layoutId:n}){return Av.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,Xoe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qoe=(e,t)=>S4.indexOf(e)-S4.indexOf(t);function Joe({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Qoe);for(const s of t)a+=`${Xoe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function yN(e){return e.startsWith("--")}const eae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,bN=(e,t)=>n=>Math.max(Math.min(n,t),e),vm=e=>e%1?Number(e.toFixed(5)):e,iv=/(-)?([\d]*\.?[\d])+/g,Uw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Iv(e){return typeof e=="string"}const rh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ym=Object.assign(Object.assign({},rh),{transform:bN(0,1)}),py=Object.assign(Object.assign({},rh),{default:1}),Mv=e=>({test:t=>Iv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Mv("deg"),wl=Mv("%"),St=Mv("px"),nae=Mv("vh"),rae=Mv("vw"),lT=Object.assign(Object.assign({},wl),{parse:e=>wl.parse(e)/100,transform:e=>wl.transform(e*100)}),V9=(e,t)=>n=>Boolean(Iv(n)&&tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),xN=(e,t,n)=>r=>{if(!Iv(r))return r;const[i,o,a,s]=r.match(iv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:V9("hsl","hue"),parse:xN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wl.transform(vm(t))+", "+wl.transform(vm(n))+", "+vm(ym.transform(r))+")"},iae=bN(0,255),kS=Object.assign(Object.assign({},rh),{transform:e=>Math.round(iae(e))}),Wc={test:V9("rgb","red"),parse:xN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kS.transform(e)+", "+kS.transform(t)+", "+kS.transform(n)+", "+vm(ym.transform(r))+")"};function oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const jw={test:V9("#"),parse:oae,transform:Wc.transform},to={test:e=>Wc.test(e)||jw.test(e)||Of.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Of.test(e)?Of.parse(e):jw.parse(e),transform:e=>Iv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Of.transform(e)},SN="${c}",wN="${n}";function aae(e){var t,n,r,i;return isNaN(e)&&Iv(e)&&((n=(t=e.match(iv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Uw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function CN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Uw);r&&(n=r.length,e=e.replace(Uw,SN),t.push(...r.map(to.parse)));const i=e.match(iv);return i&&(e=e.replace(iv,wN),t.push(...i.map(rh.parse))),{values:t,numColors:n,tokenised:e}}function _N(e){return CN(e).values}function kN(e){const{values:t,numColors:n,tokenised:r}=CN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function lae(e){const t=_N(e);return kN(e)(t.map(sae))}const yu={test:aae,parse:_N,createTransformer:kN,getAnimatableNone:lae},uae=new Set(["brightness","contrast","saturate","opacity"]);function cae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iv)||[];if(!r)return e;const i=n.replace(r,"");let o=uae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const dae=/([a-z-]*)\(.*?\)/g,Gw=Object.assign(Object.assign({},yu),{getAnimatableNone:e=>{const t=e.match(dae);return t?t.map(cae).join(" "):e}}),uT={...rh,transform:Math.round},EN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:py,scaleX:py,scaleY:py,scaleZ:py,skew:Cc,skewX:Cc,skewY:Cc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:ym,originX:lT,originY:lT,originZ:St,zIndex:uT,fillOpacity:ym,strokeOpacity:ym,numOctaves:uT};function U9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(yN(m)){o[m]=v;continue}const b=EN[m],w=eae(v,b);if(Av.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Joe(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const j9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function PN(e,t,n){for(const r in t)!Ss(t[r])&&!vN(r,n)&&(e[r]=t[r])}function fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j9();return U9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hae(e,t,n){const r=e.style||{},i={};return PN(i,r,e),Object.assign(i,fae(e,t,n)),e.transformValues?e.transformValues(i):i}function pae(e,t,n){const r={},i=hae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const gae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],mae=["whileTap","onTap","onTapStart","onTapCancel"],vae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],yae=["whileInView","onViewportEnter","onViewportLeave","viewport"],bae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...yae,...mae,...gae,...vae]);function w4(e){return bae.has(e)}let TN=e=>!w4(e);function xae(e){!e||(TN=t=>t.startsWith("on")?!w4(t):e(t))}try{xae(require("@emotion/is-prop-valid").default)}catch{}function Sae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&w4(i)||!t&&!w4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cT(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function wae(e,t,n){const r=cT(t,e.x,e.width),i=cT(n,e.y,e.height);return`${r} ${i}`}const Cae={offset:"stroke-dashoffset",array:"stroke-dasharray"},_ae={offset:"strokeDashoffset",array:"strokeDasharray"};function kae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Cae:_ae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U9(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=wae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&kae(g,o,a,s,!1)}const LN=()=>({...j9(),attrs:{}});function Eae(e,t){const n=C.exports.useMemo(()=>{const r=LN();return G9(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};PN(r,e.style,e),n.style={...r,...n.style}}return n}function Pae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W9(n)?Eae:pae)(r,a,s),g={...Sae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const AN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function IN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const MN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function ON(e,t,n,r){IN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(MN.has(i)?i:AN(i),t.attrs[i])}function q9(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||vN(r,e))&&(n[r]=t[r]);return n}function RN(e){const t=q9(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const ov=e=>Array.isArray(e),Tae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),NN=e=>ov(e)?e[e.length-1]||0:e;function x3(e){const t=Ss(e)?e.get():e;return Tae(t)?t.toValue():t}function Lae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Aae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const DN=e=>(t,n)=>{const r=C.exports.useContext(j5),i=C.exports.useContext(j0),o=()=>Lae(e,t,r,i);return n?o():K5(o)};function Aae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=x3(o[m]);let{initial:a,animate:s}=e;const l=q5(e),u=gN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!G5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K9(e,v);if(!b)return;const{transitionEnd:w,transition:P,...E}=b;for(const k in E){let T=E[k];if(Array.isArray(T)){const I=h?T.length-1:0;T=T[I]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Iae={useVisualState:DN({scrapeMotionValuesFromProps:RN,createRenderState:LN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G9(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),ON(t,n)}})},Mae={useVisualState:DN({scrapeMotionValuesFromProps:q9,createRenderState:j9})};function Oae(e,{forwardMotionProps:t=!1},n,r,i){return{...W9(e)?Iae:Mae,preloadedFeatures:n,useRender:Pae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function Y5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Y5(i,t,n,r)},[e,t,n,r])}function Rae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};qw(t,"focus",e?r:void 0),qw(t,"blur",e?i:void 0)}function zN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function BN(e){return!!e.touches}function Nae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Dae={pageX:0,pageY:0};function zae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Dae;return{x:r[t+"X"],y:r[t+"Y"]}}function Bae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y9(e,t="page"){return{point:BN(e)?zae(e,t):Bae(e,t)}}const FN=(e,t=!1)=>{const n=r=>e(r,Y9(r));return t?Nae(n):n},Fae=()=>nh&&window.onpointerdown===null,$ae=()=>nh&&window.ontouchstart===null,Hae=()=>nh&&window.onmousedown===null,Wae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Vae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function $N(e){return Fae()?e:$ae()?Vae[e]:Hae()?Wae[e]:e}function o0(e,t,n,r){return Y5(e,$N(t),FN(n,t==="pointerdown"),r)}function C4(e,t,n,r){return qw(e,$N(t),n&&FN(n,t==="pointerdown"),r)}function HN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dT=HN("dragHorizontal"),fT=HN("dragVertical");function WN(e){let t=!1;if(e==="y")t=fT();else if(e==="x")t=dT();else{const n=dT(),r=fT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function VN(){const e=WN(!0);return e?(e(),!1):!0}function hT(e,t,n){return(r,i)=>{!zN(r)||VN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Uae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){C4(r,"pointerenter",e||n?hT(r,!0,e):void 0,{passive:!e}),C4(r,"pointerleave",t||n?hT(r,!1,t):void 0,{passive:!t})}const UN=(e,t)=>t?e===t?!0:UN(e,t.parentElement):!1;function Z9(e){return C.exports.useEffect(()=>()=>e(),[])}function jN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),ES=.001,Gae=.01,pT=10,qae=.05,Kae=1;function Yae({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;jae(e<=pT*1e3);let a=1-t;a=k4(qae,Kae,a),e=k4(Gae,pT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Kw(u,a),b=Math.exp(-g);return ES-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Kw(Math.pow(u,2),a);return(-i(u)+ES>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-ES+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=Xae(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Zae=12;function Xae(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ese(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gT(e,Jae)&&gT(e,Qae)){const n=Yae(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X9(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=jN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ese(o),v=mT,b=mT;function w(){const P=h?-(h/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Kw(T,k);v=O=>{const N=Math.exp(-k*T*O);return n-N*((P+k*T*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const N=Math.exp(-k*T*O);return k*T*N*(Math.sin(I*O)*(P+k*T*E)/I+E*Math.cos(I*O))-N*(Math.cos(I*O)*(P+k*T*E)-I*E*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-T*I)*(E+(P+T*E)*I);else{const I=T*Math.sqrt(k*k-1);v=O=>{const N=Math.exp(-k*T*O),D=Math.min(I*O,300);return n-N*((P+k*T*E)*Math.sinh(D)+I*E*Math.cosh(D))/I}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=g;else{const k=b(P)*1e3,T=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=T&&I}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X9.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mT=e=>0,av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function PS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=PS(l,s,e+1/3),o=PS(l,s,e),a=PS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},nse=[jw,Wc,Of],yT=e=>nse.find(t=>t.test(e)),GN=(e,t)=>{let n=yT(e),r=yT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=vT(i),n=Wc),r===Of&&(o=vT(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=tse(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Yw=e=>typeof e=="number",rse=(e,t)=>n=>t(e(n)),Z5=(...e)=>e.reduce(rse);function qN(e,t){return Yw(e)?n=>_r(e,t,n):to.test(e)?GN(e,t):YN(e,t)}const KN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>qN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bT(e){const t=yu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=yu.createTransformer(t),r=bT(e),i=bT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Z5(KN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ose=(e,t)=>n=>_r(e,t,n);function ase(e){if(typeof e=="number")return ose;if(typeof e=="string")return to.test(e)?GN:YN;if(Array.isArray(e))return KN;if(typeof e=="object")return ise}function sse(e,t,n){const r=[],i=n||ase(e[0]),o=e.length-1;for(let a=0;an(av(e,t,r))}function use(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=av(e[o],e[o+1],i);return t[o](s)}}function ZN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;_4(o===t.length),_4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=sse(t,r,i),s=o===2?lse(e,a):use(e,a);return n?l=>s(k4(e[0],e[o-1],l)):s}const X5=e=>t=>1-e(1-t),Q9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cse=e=>t=>Math.pow(t,e),XN=e=>t=>t*t*((e+1)*t-e),dse=e=>{const t=XN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},QN=1.525,fse=4/11,hse=8/11,pse=9/10,J9=e=>e,e7=cse(2),gse=X5(e7),JN=Q9(e7),eD=e=>1-Math.sin(Math.acos(e)),t7=X5(eD),mse=Q9(t7),n7=XN(QN),vse=X5(n7),yse=Q9(n7),bse=dse(QN),xse=4356/361,Sse=35442/1805,wse=16061/1805,E4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-E4(1-e*2)):.5*E4(e*2-1)+.5;function kse(e,t){return e.map(()=>t||JN).splice(0,e.length-1)}function Ese(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Pse(e,t){return e.map(n=>n*t)}function S3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Pse(r&&r.length===a.length?r:Ese(a),i);function l(){return ZN(s,a,{ease:Array.isArray(n)?n:kse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Tse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const xT={keyframes:S3,spring:X9,decay:Tse};function Lse(e){if(Array.isArray(e.to))return S3;if(xT[e.type])return xT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X9:S3}const tD=1/60*1e3,Ase=typeof performance<"u"?()=>performance.now():()=>Date.now(),nD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ase()),tD);function Ise(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Ise(()=>sv=!0),e),{}),Ose=Ov.reduce((e,t)=>{const n=Q5[t];return e[t]=(r,i=!1,o=!1)=>(sv||Dse(),n.schedule(r,i,o)),e},{}),Rse=Ov.reduce((e,t)=>(e[t]=Q5[t].cancel,e),{});Ov.reduce((e,t)=>(e[t]=()=>Q5[t].process(a0),e),{});const Nse=e=>Q5[e].process(a0),rD=e=>{sv=!1,a0.delta=Zw?tD:Math.max(Math.min(e-a0.timestamp,Mse),1),a0.timestamp=e,Xw=!0,Ov.forEach(Nse),Xw=!1,sv&&(Zw=!1,nD(rD))},Dse=()=>{sv=!0,Zw=!0,Xw||nD(rD)},zse=()=>a0;function iD(e,t,n=0){return e-t-n}function Bse(e,t,n=0,r=!0){return r?iD(t+-e,t,n):t-(e-t)+n}function Fse(e,t,n,r){return r?e>=t+n:e<=-n}const $se=e=>{const t=({delta:n})=>e(n);return{start:()=>Ose.update(t,!0),stop:()=>Rse.update(t)}};function oD(e){var t,n,{from:r,autoplay:i=!0,driver:o=$se,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=jN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,k=0,T=w.duration,I,O=!1,N=!0,D;const z=Lse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(D=ZN([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){k++,l==="reverse"?(N=k%2===0,a=Bse(a,T,u,N)):(a=iD(a,T,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){E.stop(),m&&m()}function de(te){if(N||(te=-te),a+=te,!O){const re=$.next(Math.max(0,a));I=re.value,D&&(I=D(I)),O=N?re.done:a<=0}b?.(I),O&&(k===0&&(T??(T=a)),k{g?.(),E.stop()}}}function aD(e,t){return t?e*(1e3/t):0}function Hse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(I),(O=T.onUpdate)===null||O===void 0||O.call(T,I)},onComplete:m,onStop:v}))}function k(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const I=P(T),O=I===n?-1:1;let N,D;const z=$=>{N=D,D=$,t=aD($-N,zse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Qw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ST=e=>Qw(e)&&e.hasOwnProperty("z"),gy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Yw(e)&&Yw(t))return gy(e,t);if(Qw(e)&&Qw(t)){const n=gy(e.x,t.x),r=gy(e.y,t.y),i=ST(e)&&ST(t)?gy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const sD=(e,t)=>1-3*t+3*e,lD=(e,t)=>3*t-6*e,uD=e=>3*e,P4=(e,t,n)=>((sD(t,n)*e+lD(t,n))*e+uD(t))*e,cD=(e,t,n)=>3*sD(t,n)*e*e+2*lD(t,n)*e+uD(t),Wse=1e-7,Vse=10;function Use(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=P4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Wse&&++s=Gse?qse(a,g,e,n):m===0?g:Use(a,s,s+my,e,n)}return a=>a===0||a===1?a:P4(o(a),t,r)}function Yse({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!VN()}function g(b,w){!h()||(UN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=Z5(o0(window,"pointerup",g,l),o0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}C4(i,"pointerdown",o?v:void 0,l),Z9(u)}const Zse="production",dD=typeof process>"u"||process.env===void 0?Zse:"production",wT=new Set;function fD(e,t,n){e||wT.has(t)||(console.warn(t),n&&console.warn(n),wT.add(t))}const Jw=new WeakMap,TS=new WeakMap,Xse=e=>{const t=Jw.get(e.target);t&&t(e)},Qse=e=>{e.forEach(Xse)};function Jse({root:e,...t}){const n=e||document;TS.has(n)||TS.set(n,{});const r=TS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Qse,{root:e,...t})),r[i]}function ele(e,t,n){const r=Jse(t);return Jw.set(e,n),r.observe(e),()=>{Jw.delete(e),r.unobserve(e)}}function tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ile:rle)(a,o.current,e,i)}const nle={some:0,all:1};function rle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:nle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return ele(n.getInstance(),s,l)},[e,r,i,o])}function ile(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(dD!=="production"&&fD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),ole={inView:Vc(tle),tap:Vc(Yse),focus:Vc(Rae),hover:Vc(Uae)};function i7(){const e=C.exports.useContext(j0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ale(){return sle(C.exports.useContext(j0))}function sle(e){return e===null?!0:e.isPresent}function hD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,lle={linear:J9,easeIn:e7,easeInOut:JN,easeOut:gse,circIn:eD,circInOut:mse,circOut:t7,backIn:n7,backInOut:yse,backOut:vse,anticipate:bse,bounceIn:Cse,bounceInOut:_se,bounceOut:E4},CT=e=>{if(Array.isArray(e)){_4(e.length===4);const[t,n,r,i]=e;return Kse(t,n,r,i)}else if(typeof e=="string")return lle[e];return e},ule=e=>Array.isArray(e)&&typeof e[0]!="number",_T=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&yu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),vy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LS=()=>({type:"keyframes",ease:"linear",duration:.3}),cle=e=>({type:"keyframes",duration:.8,values:e}),kT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:vy,scaleY:vy,scale:vy,opacity:LS,backgroundColor:LS,color:LS,default:vy},dle=(e,t)=>{let n;return ov(t)?n=cle:n=kT[e]||kT.default,{to:t,...n(t)}},fle={...EN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:Gw,WebkitFilter:Gw},o7=e=>fle[e];function a7(e,t){var n;let r=o7(e);return r!==Gw&&(r=yu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const hle={current:!1},pD=1/60*1e3,ple=typeof performance<"u"?()=>performance.now():()=>Date.now(),gD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(ple()),pD);function gle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=gle(()=>lv=!0),e),{}),ws=Rv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(lv||yle(),n.schedule(r,i,o)),e},{}),Yf=Rv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{}),AS=Rv.reduce((e,t)=>(e[t]=()=>J5[t].process(s0),e),{}),vle=e=>J5[e].process(s0),mD=e=>{lv=!1,s0.delta=eC?pD:Math.max(Math.min(e-s0.timestamp,mle),1),s0.timestamp=e,tC=!0,Rv.forEach(vle),tC=!1,lv&&(eC=!1,gD(mD))},yle=()=>{lv=!0,eC=!0,tC||gD(mD)},nC=()=>s0;function vD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Yf.read(r),e(o-t))};return ws.read(r,!0),()=>Yf.read(r)}function ble({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function xle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=T4(o.duration)),o.repeatDelay&&(a.repeatDelay=T4(o.repeatDelay)),e&&(a.ease=ule(e)?e.map(CT):CT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Sle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function wle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Cle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),wle(t),ble(e)||(e={...e,...dle(n,t.to)}),{...t,...xle(e)}}function _le(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_T(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):ET(a)&&typeof n=="string"?a=PT(n):!Array.isArray(n)&&ET(n)&&typeof a=="string"&&(n=PT(a));const l=_T(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Hse({...g,...o}):oD({...Cle(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=NN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function ET(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PT(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return hle.current&&(r={type:!1}),t.start(i=>{let o;const a=_le(e,t,n,r,i),s=Sle(r,e),l=()=>o=a();let u;return s?u=vD(l,T4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const kle=e=>/^\-?\d*\.?\d+$/.test(e),Ele=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class bm{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new bm,this.velocityUpdateSubscribers=new bm,this.renderSubscribers=new bm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=nC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Ple(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?aD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function L0(e){return new Tle(e)}const yD=e=>t=>t.test(e),Lle={test:e=>e==="auto",parse:e=>e},bD=[rh,St,wl,Cc,rae,nae,Lle],wg=e=>bD.find(yD(e)),Ale=[...bD,to,yu],Ile=e=>Ale.find(yD(e));function Mle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Ole(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function eb(e,t,n){const r=e.getProps();return K9(r,t,n!==void 0?n:r.custom,Mle(e),Ole(e))}function Rle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,L0(n))}function Nle(e,t){const n=eb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=NN(o[a]);Rle(e,a,s)}}function Dle(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;srC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=rC(e,t,n);else{const i=typeof t=="function"?eb(e,t,n.custom):t;r=xD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function rC(e,t,n={}){var r;const i=eb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>xD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return $le(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function xD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Wle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Av.has(m)&&(w={...w,type:!1,delay:0});let P=l7(m,v,b,w);L4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&Nle(e,s)})}function $le(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Hle).forEach((u,h)=>{a.push(rC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Hle(e,t){return e.sortNodePosition(t)}function Wle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Vle=[...d7].reverse(),Ule=d7.length;function jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Fle(e,n,r)))}function Gle(e){let t=jle(e);const n=Kle();let r=!0;const i=(l,u)=>{const h=eb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},P=1/0;for(let k=0;kP&&N;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},re=se=>{W=!0,b.delete(se),I.needsAnimating[se]=!0};for(const se in te){const G=de[se],V=j[se];w.hasOwnProperty(se)||(G!==V?ov(G)&&ov(V)?!hD(G,V)||$?re(se):I.protectedKeys[se]=!0:G!==void 0?re(se):b.add(se):G!==void 0&&b.has(se)?re(se):I.protectedKeys[se]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...Y.map(se=>({animation:se,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const I=e.getBaseTarget(T);I!==void 0&&(k[T]=I)}),v.push({animation:k})}let E=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function qle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kle(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Yle={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Gle(e)),G5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(j0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class SD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=MS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=nC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=IS(h,this.transformPagePoint),zN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=MS(IS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},BN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y9(t),o=IS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=nC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,MS(o,this.history)),this.removeListeners=Z5(o0(window,"pointermove",this.handlePointerMove),o0(window,"pointerup",this.handlePointerUp),o0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Yf.update(this.updatePoint)}}function IS(e,t){return t?{point:t(e.point)}:e}function TT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function MS({point:e},t){return{point:e,delta:TT(e,wD(t)),offset:TT(e,Zle(t)),velocity:Xle(t,.1)}}function Zle(e){return e[0]}function wD(e){return e[e.length-1]}function Xle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=wD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>T4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function LT(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function OT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eue(e,{top:t,left:n,bottom:r,right:i}){return{x:OT(e.x,n,i),y:OT(e.y,t,r)}}function RT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=av(t.min,t.max-r,e.min):r>i&&(n=av(e.min,e.max-i,t.min)),k4(0,1,n)}function rue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iC=.35;function iue(e=iC){return e===!1?e=0:e===!0&&(e=iC),{x:NT(e,"left","right"),y:NT(e,"top","bottom")}}function NT(e,t,n){return{min:DT(e,t),max:DT(e,n)}}function DT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zT=()=>({translate:0,scale:1,origin:0,originPoint:0}),wm=()=>({x:zT(),y:zT()}),BT=()=>({min:0,max:0}),ki=()=>({x:BT(),y:BT()});function sl(e){return[e("x"),e("y")]}function CD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function OS(e){return e===void 0||e===1}function oC({scale:e,scaleX:t,scaleY:n}){return!OS(e)||!OS(t)||!OS(n)}function bf(e){return oC(e)||_D(e)||e.z||e.rotate||e.rotateX||e.rotateY}function _D(e){return FT(e.x)||FT(e.y)}function FT(e){return e&&e!=="0%"}function A4(e,t,n){const r=e-n,i=t*r;return n+i}function $T(e,t,n,r,i){return i!==void 0&&(e=A4(e,i,r)),A4(e,n,r)+t}function aC(e,t=0,n=1,r,i){e.min=$T(e.min,t,n,r,i),e.max=$T(e.max,t,n,r,i)}function kD(e,{x:t,y:n}){aC(e.x,t.translate,t.scale,t.originPoint),aC(e.y,n.translate,n.scale,n.originPoint)}function sue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(Y9(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=WN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let P=this.getAxisMotionValue(v).get()||0;if(wl.test(P)){const E=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=la(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=hue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new SD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Jle(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Wp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eue(r.actual,t):this.constraints=!1,this.elastic=iue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=rue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cue(r,i.root,this.visualElement.getTransformPagePoint());let a=tue(i.layout.actual,o);if(n){const s=n(oue(a));this.hasMutatedConstraints=!!s,s&&(a=CD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!yy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!yy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=nue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!yy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;due.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=o0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Y5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=iC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function yy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function pue(e){const{dragControls:t,visualElement:n}=e,r=K5(()=>new fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function gue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($9),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new SD(h,l,{transformPagePoint:s})}C4(i,"pointerdown",o&&u),Z9(()=>a.current&&a.current.end())}const mue={pan:Vc(gue),drag:Vc(pue)},sC={current:null},PD={current:!1};function vue(){if(PD.current=!0,!!nh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sC.current=e.matches;e.addListener(t),t()}else sC.current=!1}const by=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function yue(){const e=by.map(()=>new bm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{by.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+by[i]]=o=>r.add(o),n["notify"+by[i]]=(...o)=>r.notify(...o)}),n}function bue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),L4(r)&&r.add(i);else if(Ss(a))e.addValue(i,L0(o)),L4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,L0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(rv),xue=TD.length,LD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:k,renderState:T}=b;let I;const O=yue(),N=new Map,D=new Map;let z={};const $={...k},W=g.initial?{...k}:{};let Y;function de(){!I||!E||(j(),o(I,T,g.style,Q.projection))}function j(){t(Q,T,k,P,g)}function te(){O.notifyUpdate(k)}function re(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:se,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),L4(se)&&se.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const V=q5(g),q=gN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){E=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!V&&(Y=h?.addVariantChild(Q)),N.forEach((me,ye)=>re(ye,me)),PD.current||vue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:sC.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Yf.update(te),Yf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,ye,Se,He,Ue){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:Ue,layoutScroll:At})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),N.set(X,me),k[X]=me.get(),re(X,me)},removeValue(X){var me;N.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,T)},hasValue:X=>N.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=N.get(X);return ye===void 0&&me!==void 0&&(ye=L0(me),Q.addValue(X,ye)),ye},forEachValue:X=>N.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,P),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K9(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),T},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=bue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!V){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!lC(o))return;const a=uC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!lC(o))continue;const a=uC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ue=new Set(["width","height","top","left","right","bottom","x","y"]),MD=e=>_ue.has(e),kue=e=>Object.keys(e).some(MD),OD=(e,t)=>{e.set(t,!1),e.set(t)},WT=e=>e===rh||e===St;var VT;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VT||(VT={}));const UT=(e,t)=>parseFloat(e.split(", ")[t]),jT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UT(o[1],e):0}},Eue=new Set(["x","y","z"]),Pue=S4.filter(e=>!Eue.has(e));function Tue(e){const t=[];return Pue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const GT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jT(4,13),y:jT(5,14)},Lue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=GT[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);OD(h,s[u]),e[u]=GT[u](l,o)}),e},Aue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(MD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=wg(h);const m=t[l];let v;if(ov(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=wg(h);for(let P=w;P=0?window.pageYOffset:null,u=Lue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),nh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Iue(e,t,n,r){return kue(t)?Aue(e,t,n,r):{target:t,transitionEnd:r}}const Mue=(e,t,n,r)=>{const i=Cue(e,t,r);return t=i.target,r=i.transitionEnd,Iue(e,t,n,r)};function Oue(e){return window.getComputedStyle(e)}const RD={treeType:"dom",readValueFromInstance(e,t){if(Av.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Oue(e),r=(yN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ED(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Ble(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Dle(e,r,a);const s=Mue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q9,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U9(t,n,r,i.transformTemplate)},render:IN},Rue=LD(RD),Nue=LD({...RD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Av.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=MN.has(t)?t:AN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:RN,build(e,t,n,r,i){G9(t,n,r,i.transformTemplate)},render:ON}),Due=(e,t)=>W9(e)?Nue(t,{enableHardwareAcceleration:!1}):Rue(t,{enableHardwareAcceleration:!0});function qT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Cg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qT(e,t.target.x),r=qT(e,t.target.y);return`${n}% ${r}%`}},KT="_$css",zue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(ID,v=>(o.push(v),KT)));const a=yu.parse(e);if(a.length>5)return r;const s=yu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(KT,()=>{const b=o[v];return v++,b})}return m}};class Bue extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Zoe($ue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Fue(e){const[t,n]=i7(),r=C.exports.useContext(H9);return x(Bue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(mN),isPresent:t,safeToRemove:n})}const $ue={borderRadius:{...Cg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cg,borderTopRightRadius:Cg,borderBottomLeftRadius:Cg,borderBottomRightRadius:Cg,boxShadow:zue},Hue={measureLayout:Fue};function Wue(e,t,n={}){const r=Ss(e)?e:L0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const ND=["TopLeft","TopRight","BottomLeft","BottomRight"],Vue=ND.length,YT=e=>typeof e=="string"?parseFloat(e):e,ZT=e=>typeof e=="number"||St.test(e);function Uue(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,Gue(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(av(e,t,r))}function QT(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QT(e.x,t.x),QT(e.y,t.y)}function JT(e,t,n,r,i){return e-=t,e=A4(e,1/n,r),i!==void 0&&(e=A4(e,1/i,r)),e}function que(e,t=0,n=1,r=.5,i,o=e,a=e){if(wl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JT(e.min,t,n,s,i),e.max=JT(e.max,t,n,s,i)}function eL(e,t,[n,r,i],o,a){que(e,t[n],t[r],t[i],t.scale,o,a)}const Kue=["x","scaleX","originX"],Yue=["y","scaleY","originY"];function tL(e,t,n,r){eL(e.x,t,Kue,n?.x,r?.x),eL(e.y,t,Yue,n?.y,r?.y)}function nL(e){return e.translate===0&&e.scale===1}function zD(e){return nL(e.x)&&nL(e.y)}function BD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rL(e){return la(e.x)/la(e.y)}function Zue(e,t,n=.1){return r7(e,t)<=n}class Xue{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Que="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iL(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Que?"none":o}const Jue=(e,t)=>e.depth-t.depth;class ece{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jue),this.isDirty=!1,this.children.forEach(t)}}const oL=["","X","Y","Z"],aL=1e3;function FD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(oce),this.nodes.forEach(ace)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=vD(v,250),mm.hasAnimatedSinceResize&&(mm.hasAnimatedSinceResize=!1,this.nodes.forEach(lL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var P,E,k,T,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(P=this.options.transition)!==null&&P!==void 0?P:g.getDefaultTransition())!==null&&E!==void 0?E:dce,{onLayoutAnimationStart:N,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!BD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...s7(O,"layout"),onPlay:N,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&lL(this),this.isLead()&&((I=(T=this.options).onExitComplete)===null||I===void 0||I.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Yf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(sce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));fL(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=E/1e3;uL(m.x,a.x,T),uL(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Sm(v,this.layout.actual,this.relativeParent.layout.actual),uce(this.relativeTarget,this.relativeTargetOrigin,v,T)),b&&(this.animationValues=g,Uue(g,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Yf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{mm.hasAnimatedSinceResize=!0,this.currentAnimation=Wue(0,aL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,aL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&$D(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Vp(s,h),xm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Xue),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(sL),this.root.sharedNodes.clear()}}}function tce(e){e.updateLayout()}function nce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):$D(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=wm();xm(l,o,i.layout);const u=wm();i.isShared?xm(u,e.applyTransform(a,!0),i.measured):xm(u,o,i.layout);const h=!zD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Sm(b,i.layout,m.layout);const w=ki();Sm(w,o,v.actual),BD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function rce(e){e.clearSnapshot()}function sL(e){e.clearMeasurements()}function ice(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function oce(e){e.resolveTargetDelta()}function ace(e){e.calcProjection()}function sce(e){e.resetRotation()}function lce(e){e.removeLeadSnapshot()}function uL(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cL(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function uce(e,t,n,r){cL(e.x,t.x,n.x,r),cL(e.y,t.y,n.y,r)}function cce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dce={duration:.45,ease:[.4,0,.1,1]};function fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function dL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fL(e){dL(e.x),dL(e.y)}function $D(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zue(rL(t),rL(n),.2)}const hce=FD({attachResizeListener:(e,t)=>Y5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),RS={current:void 0},pce=FD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!RS.current){const e=new hce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),RS.current=e}return RS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),gce={...Yle,...ole,...mue,...Hue},Ml=Koe((e,t)=>Oae(e,t,gce,Due,pce));function HD(){const e=C.exports.useRef(!1);return b4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mce(){const e=HD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class vce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -66,8 +66,8 @@ Error generating stack: `+o.message+` top: ${s}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(u)}},[t]),x(vce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const NS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=K5(bce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(yce,{isPresent:n,children:e})),x(j0.Provider,{value:u,children:e})};function bce(){return new Map}const Pp=e=>e.key||"";function xce(e,t){e.forEach(n=>{const r=Pp(n);t.set(r,n)})}function Sce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",fD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=mce();const l=C.exports.useContext(H9).forceRender;l&&(s=l);const u=HD(),h=Sce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(b4(()=>{w.current=!1,xce(h,b),v.current=g}),Z9(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Kn,{children:g.map(T=>x(NS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Pp(T)))});g=[...g];const P=v.current.map(Pp),E=h.map(Pp),k=P.length;for(let T=0;T{if(E.indexOf(T)!==-1)return;const I=b.get(T);if(!I)return;const O=P.indexOf(T),N=()=>{b.delete(T),m.delete(T);const D=v.current.findIndex(z=>z.key===T);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(NS,{isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:o,mode:a,children:I},Pp(I)))}),g=g.map(T=>{const I=T.key;return m.has(I)?T:x(NS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Pp(T))}),dD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Kn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function cC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function wce(){return!1}var Cce=e=>{const{condition:t,message:n}=e;t&&wce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},_g={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function dC(e){switch(e?.direction??"right"){case"right":return _g.slideRight;case"left":return _g.slideLeft;case"bottom":return _g.slideDown;case"top":return _g.slideUp;default:return _g.slideRight}}var Ff={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},_ce=e=>e!=null&&parseInt(e.toString(),10)>0,pL={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},kce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:_ce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pL.enter,i)})},VD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Cce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Il.div,{ref:t,...g,className:Nv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:kce,initial:r?"exit":!1,animate:E,exit:"exit"})})});VD.displayName="Collapse";var Ece={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit(Ff.exit,n),transitionEnd:t?.exit})},UD={initial:"exit",animate:"enter",exit:"exit",variants:Ece},Pce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:g&&le.createElement(Il.div,{ref:n,className:Nv("chakra-fade",o),custom:m,...UD,animate:h,...u})})});Pce.displayName="Fade";var Tce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit(Ff.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter(Ff.enter,n),transitionEnd:e?.enter})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Tce},Lce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:b,children:m&&le.createElement(Il.div,{ref:n,className:Nv("chakra-offset-slide",s),...jD,animate:v,custom:b,...g})})});Lce.displayName="ScaleFade";var gL={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Ace={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=dC({direction:e});return{...i,transition:t?.exit??Cs.exit(gL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=dC({direction:e});return{...i,transition:n?.enter??Cs.enter(gL.enter,r),transitionEnd:t?.enter}}},GD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=dC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Il.div,{...m,ref:n,initial:"exit",className:Nv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:Ace,style:b,...g})})});GD.displayName="Slide";var Ice={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit(Ff.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit(Ff.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},fC={initial:"initial",animate:"enter",exit:"exit",variants:Ice},Mce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(pd,{custom:w,children:v&&le.createElement(Il.div,{ref:n,className:Nv("chakra-offset-slide",a),custom:w,...fC,animate:b,...m})})});Mce.displayName="SlideFade";var Dv=(...e)=>e.filter(Boolean).join(" ");function Oce(){return!1}var tb=e=>{const{condition:t,message:n}=e;t&&Oce()&&console.warn(n)};function DS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rce,nb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Nce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Dce,Gke,zce,Bce]=hN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...nb().button};return le.createElement(we.button,{...i,className:Dv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function Fce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Wce(e),Vce(e);const s=zce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=U5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(k=>k!==v);g(E)}else P?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[$ce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Hce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Uce(e);const{register:m,index:v,descendants:b}=Bce({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);jce({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},k=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),I=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),N=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:DS($.onClick,T),onFocus:DS($.onFocus,O),onKeyDown:DS($.onKeyDown,I)}},[h,t,w,T,O,I,g,m]),D=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:N,getPanelProps:D,htmlProps:i}}function Wce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;tb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Vce(e){tb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Uce(e){tb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function jce(e){tb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Dv("chakra-accordion__icon",e.className),o=nb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ga,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Hce(t),l={...nb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(Nce,{value:u},le.createElement(we.div,{ref:n,...o,className:Dv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Dv("chakra-accordion__panel",r),g=nb();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(VD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var rb=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Fce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Dce,{value:l},le.createElement($ce,{value:h},le.createElement(Rce,{value:o},le.createElement(we.div,{ref:i,...s,className:Dv("chakra-accordion",r.className),__css:o.root},t))))});rb.displayName="Accordion";var Gce=(...e)=>e.filter(Boolean).join(" "),qce=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),zv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Gce("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${qce} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});zv.displayName="Spinner";var ib=(...e)=>e.filter(Boolean).join(" ");function Kce(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Yce(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mL(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Zce,Xce]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Qce,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),qD={info:{icon:Yce,colorScheme:"blue"},warning:{icon:mL,colorScheme:"orange"},success:{icon:Kce,colorScheme:"green"},error:{icon:mL,colorScheme:"red"},loading:{icon:zv,colorScheme:"blue"}};function Jce(e){return qD[e].colorScheme}function ede(e){return qD[e].icon}var KD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Jce(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Zce,{value:{status:r}},le.createElement(Qce,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ib("chakra-alert",t.className),__css:l})))});KD.displayName="Alert";var YD=Pe(function(t,n){const i={display:"inline",...p7().description};return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__desc",t.className),__css:i})});YD.displayName="AlertDescription";function ZD(e){const{status:t}=Xce(),n=ede(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:ib("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}ZD.displayName="AlertIcon";var XD=Pe(function(t,n){const r=p7();return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__title",t.className),__css:r.title})});XD.displayName="AlertTitle";function tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var rde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",I4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});I4.displayName="NativeImage";var ob=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=nde({...t,ignoreFallback:P}),k=rde(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?b:tde(b,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:I4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:I4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ob.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:I4,className:"chakra-image",...e}));function ab(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var sb=(...e)=>e.filter(Boolean).join(" "),vL=e=>e?"":void 0,[ide,ode]=Cn({strict:!1,name:"ButtonGroupContext"});function hC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=sb("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}hC.displayName="ButtonIcon";function pC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(zv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=sb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}pC.displayName="ButtonSpinner";function ade(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var aa=Pe((e,t)=>{const n=ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:P,...E}=vn(e),k=C.exports.useMemo(()=>{const N={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:N}}},[r,n]),{ref:T,type:I}=ade(P),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return le.createElement(we.button,{disabled:i||o,ref:Loe(t,T),as:P,type:m??I,"data-active":vL(a),"data-loading":vL(o),__css:k,className:sb("chakra-button",w),...E},o&&b==="start"&&x(pC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||le.createElement(we.span,{opacity:0},x(yL,{...O})):x(yL,{...O}),o&&b==="end"&&x(pC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});aa.displayName="Button";function yL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Kn,{children:[t&&x(hC,{marginEnd:i,children:t}),r,n&&x(hC,{marginStart:i,children:n})]})}var Eo=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=sb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(ide,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Eo.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(aa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var K0=(...e)=>e.filter(Boolean).join(" "),xy=e=>e?"":void 0,zS=e=>e?!0:void 0;function bL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,QD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[lde,Y0]=Cn({strict:!1,name:"FormControlContext"});function ude(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),T=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":xy(P),"data-disabled":xy(i),"data-invalid":xy(r),"data-readonly":xy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,P,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),N=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:N}}var gd=Pe(function(t,n){const r=Ri("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=ude(i),l=K0("chakra-form-control",t.className);return le.createElement(lde,{value:s},le.createElement(sde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var cde=Pe(function(t,n){const r=Y0(),i=QD(),o=K0("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});cde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":zS(n),"aria-required":zS(i),"aria-readonly":zS(r)}}function m7(e){const t=Y0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:bL(t?.onFocus,h),onBlur:bL(t?.onBlur,g)}}var[dde,fde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hde=Pe((e,t)=>{const n=Ri("FormError",e),r=vn(e),i=Y0();return i?.isInvalid?le.createElement(dde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:K0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});hde.displayName="FormErrorMessage";var pde=Pe((e,t)=>{const n=fde(),r=Y0();if(!r?.isInvalid)return null;const i=K0("chakra-form__error-icon",e.className);return x(ga,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});pde.displayName="FormErrorIcon";var ih=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(JD,{}),optionalIndicator:l=null,...u}=i,h=Y0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...g,className:K0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});ih.displayName="FormLabel";var JD=Pe(function(t,n){const r=Y0(),i=QD();if(!r?.isRequired)return null;const o=K0("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});JD.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},gde=we("span",{baseStyle:v7});gde.displayName="VisuallyHidden";var mde=we("input",{baseStyle:v7});mde.displayName="VisuallyHiddenInput";var xL=!1,lb=null,A0=!1,gC=new Set,vde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function yde(e){return!(e.metaKey||!vde&&e.altKey||e.ctrlKey)}function y7(e,t){gC.forEach(n=>n(e,t))}function SL(e){A0=!0,yde(e)&&(lb="keyboard",y7("keyboard",e))}function mp(e){lb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(A0=!0,y7("pointer",e))}function bde(e){e.target===window||e.target===document||(A0||(lb="keyboard",y7("keyboard",e)),A0=!1)}function xde(){A0=!1}function wL(){return lb!=="pointer"}function Sde(){if(typeof window>"u"||xL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){A0=!0,e.apply(this,n)},document.addEventListener("keydown",SL,!0),document.addEventListener("keyup",SL,!0),window.addEventListener("focus",bde,!0),window.addEventListener("blur",xde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",mp,!0),document.addEventListener("pointermove",mp,!0),document.addEventListener("pointerup",mp,!0)):(document.addEventListener("mousedown",mp,!0),document.addEventListener("mousemove",mp,!0),document.addEventListener("mouseup",mp,!0)),xL=!0}function wde(e){Sde(),e(wL());const t=()=>e(wL());return gC.add(t),()=>{gC.delete(t)}}var[qke,Cde]=Cn({name:"CheckboxGroupContext",strict:!1}),_de=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function Ea(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function kde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ede(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Pde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Tde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Pde:Ede;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Lde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ez(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:P,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":I,...O}=e,N=Lde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[W,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),[se,G]=C.exports.useState(!1);C.exports.useEffect(()=>wde(Y),[]);const V=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}ye||me(Se?Ae.target.checked:b?!0:Ae.target.checked),D?.(Ae)},[r,n,Se,ye,b,D]);bs(()=>{V.current&&(V.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Ae=V.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const Ue=n&&!m,ct=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!1)},[G]);bs(()=>{if(!V.current)return;V.current.checked!==Se&&me(V.current.checked)},[V.current]);const et=C.exports.useCallback((Ae={},dt=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Ae,ref:dt,"data-active":eo(se),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&W),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:Ea(Ae.onMouseDown,Mt),onMouseUp:Ea(Ae.onMouseUp,()=>G(!1)),onMouseEnter:Ea(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:Ea(Ae.onMouseLeave,()=>re(!1))}},[se,Se,n,de,W,te,b,o,r]),tt=C.exports.useCallback((Ae={},dt=null)=>({...N,...Ae,ref:$n(dt,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:Ea(Ae.onClick,()=>{var Mt;q||((Mt=V.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=V.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[N,n,Se,o,q]),at=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:$n(V,dt),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Ea(Ae.onChange,He),onBlur:Ea(Ae.onBlur,z,()=>j(!1)),onFocus:Ea(Ae.onFocus,$,()=>j(!0)),onKeyDown:Ea(Ae.onKeyDown,ct),onKeyUp:Ea(Ae.onKeyUp,qe),required:i,checked:Se,disabled:Ue,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,P,a,He,z,$,ct,qe,i,Se,Ue,r,k,T,I,o,u,n,E]),At=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:dt,onMouseDown:Ea(Ae.onMouseDown,CL),onTouchStart:Ea(Ae.onTouchStart,CL),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:se,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:et,getInputProps:at,getLabelProps:At,htmlProps:N}}function CL(e){e.preventDefault(),e.stopPropagation()}var Ade={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Ide={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Mde=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ode=hd({from:{opacity:0},to:{opacity:1}}),Rde=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),tz=Pe(function(t,n){const r=Cde(),i={...r,...t},o=Ri("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Tde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=kde(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:N,getLabelProps:D,getRootProps:z}=ez({...E,isDisabled:b,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Ode} 20ms linear, ${Rde} 200ms linear`:`${Mde} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return le.createElement(we.label,{__css:{...Ide,...o.container},className:_de("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(P,n)}),le.createElement(we.span,{__css:{...Ade,...o.control},className:"chakra-checkbox__control",...N()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});tz.displayName="Checkbox";function Nde(e){return x(ga,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var ub=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Nde,{width:"1em",height:"1em"}))});ub.displayName="CloseButton";function Dde(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Dde(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function mC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function M4(e,t,n){return(e-t)*100/(n-t)}function nz(e,t,n){return(n-t)*e+t}function vC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=mC(n);return b7(r,i)}function l0(e,t,n){return e==null?e:(nr==null?"":BS(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=rz(_c(v),o),w=n??b,P=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let Y=W;return l&&(Y=l0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(W):Y=_c(v)+W,Y=E(Y),P(Y)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(-W):Y=_c(v)-W,Y=E(Y),P(Y)},[E,o,P,v]),I=C.exports.useCallback(()=>{let W;r==null?W="":W=BS(r,o,n)??a,P(W)},[r,n,o,P,a]),O=C.exports.useCallback(W=>{const Y=BS(W,o,w)??a;P(Y)},[w,o,P,a]),N=_c(v);return{isOutOfRange:N>s||N{document.head.removeChild(u)}},[t]),x(vce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const NS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=K5(bce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(yce,{isPresent:n,children:e})),x(j0.Provider,{value:u,children:e})};function bce(){return new Map}const Pp=e=>e.key||"";function xce(e,t){e.forEach(n=>{const r=Pp(n);t.set(r,n)})}function Sce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",fD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=mce();const l=C.exports.useContext(H9).forceRender;l&&(s=l);const u=HD(),h=Sce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(b4(()=>{w.current=!1,xce(h,b),v.current=g}),Z9(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Kn,{children:g.map(T=>x(NS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Pp(T)))});g=[...g];const P=v.current.map(Pp),E=h.map(Pp),k=P.length;for(let T=0;T{if(E.indexOf(T)!==-1)return;const I=b.get(T);if(!I)return;const O=P.indexOf(T),N=()=>{b.delete(T),m.delete(T);const D=v.current.findIndex(z=>z.key===T);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(NS,{isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:o,mode:a,children:I},Pp(I)))}),g=g.map(T=>{const I=T.key;return m.has(I)?T:x(NS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Pp(T))}),dD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Kn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function cC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function wce(){return!1}var Cce=e=>{const{condition:t,message:n}=e;t&&wce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},_g={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function dC(e){switch(e?.direction??"right"){case"right":return _g.slideRight;case"left":return _g.slideLeft;case"bottom":return _g.slideDown;case"top":return _g.slideUp;default:return _g.slideRight}}var Ff={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},_ce=e=>e!=null&&parseInt(e.toString(),10)>0,pL={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},kce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:_ce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pL.enter,i)})},VD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Cce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Ml.div,{ref:t,...g,className:Nv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:kce,initial:r?"exit":!1,animate:E,exit:"exit"})})});VD.displayName="Collapse";var Ece={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit(Ff.exit,n),transitionEnd:t?.exit})},UD={initial:"exit",animate:"enter",exit:"exit",variants:Ece},Pce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:g&&le.createElement(Ml.div,{ref:n,className:Nv("chakra-fade",o),custom:m,...UD,animate:h,...u})})});Pce.displayName="Fade";var Tce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit(Ff.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter(Ff.enter,n),transitionEnd:e?.enter})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Tce},Lce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:b,children:m&&le.createElement(Ml.div,{ref:n,className:Nv("chakra-offset-slide",s),...jD,animate:v,custom:b,...g})})});Lce.displayName="ScaleFade";var gL={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Ace={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=dC({direction:e});return{...i,transition:t?.exit??Cs.exit(gL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=dC({direction:e});return{...i,transition:n?.enter??Cs.enter(gL.enter,r),transitionEnd:t?.enter}}},GD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=dC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Ml.div,{...m,ref:n,initial:"exit",className:Nv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:Ace,style:b,...g})})});GD.displayName="Slide";var Ice={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit(Ff.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit(Ff.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},fC={initial:"initial",animate:"enter",exit:"exit",variants:Ice},Mce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(pd,{custom:w,children:v&&le.createElement(Ml.div,{ref:n,className:Nv("chakra-offset-slide",a),custom:w,...fC,animate:b,...m})})});Mce.displayName="SlideFade";var Dv=(...e)=>e.filter(Boolean).join(" ");function Oce(){return!1}var tb=e=>{const{condition:t,message:n}=e;t&&Oce()&&console.warn(n)};function DS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rce,nb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Nce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Dce,Gke,zce,Bce]=hN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...nb().button};return le.createElement(we.button,{...i,className:Dv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function Fce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Wce(e),Vce(e);const s=zce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=U5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(k=>k!==v);g(E)}else P?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[$ce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Hce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Uce(e);const{register:m,index:v,descendants:b}=Bce({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);jce({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},k=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),I=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),N=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:DS($.onClick,T),onFocus:DS($.onFocus,O),onKeyDown:DS($.onKeyDown,I)}},[h,t,w,T,O,I,g,m]),D=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:N,getPanelProps:D,htmlProps:i}}function Wce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;tb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Vce(e){tb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Uce(e){tb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function jce(e){tb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Dv("chakra-accordion__icon",e.className),o=nb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Hce(t),l={...nb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(Nce,{value:u},le.createElement(we.div,{ref:n,...o,className:Dv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Dv("chakra-accordion__panel",r),g=nb();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(VD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var rb=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Fce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Dce,{value:l},le.createElement($ce,{value:h},le.createElement(Rce,{value:o},le.createElement(we.div,{ref:i,...s,className:Dv("chakra-accordion",r.className),__css:o.root},t))))});rb.displayName="Accordion";var Gce=(...e)=>e.filter(Boolean).join(" "),qce=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),zv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Gce("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${qce} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});zv.displayName="Spinner";var ib=(...e)=>e.filter(Boolean).join(" ");function Kce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Yce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mL(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Zce,Xce]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Qce,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),qD={info:{icon:Yce,colorScheme:"blue"},warning:{icon:mL,colorScheme:"orange"},success:{icon:Kce,colorScheme:"green"},error:{icon:mL,colorScheme:"red"},loading:{icon:zv,colorScheme:"blue"}};function Jce(e){return qD[e].colorScheme}function ede(e){return qD[e].icon}var KD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Jce(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Zce,{value:{status:r}},le.createElement(Qce,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ib("chakra-alert",t.className),__css:l})))});KD.displayName="Alert";var YD=Pe(function(t,n){const i={display:"inline",...p7().description};return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__desc",t.className),__css:i})});YD.displayName="AlertDescription";function ZD(e){const{status:t}=Xce(),n=ede(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:ib("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}ZD.displayName="AlertIcon";var XD=Pe(function(t,n){const r=p7();return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__title",t.className),__css:r.title})});XD.displayName="AlertTitle";function tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var rde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",I4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});I4.displayName="NativeImage";var ob=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=nde({...t,ignoreFallback:P}),k=rde(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?b:tde(b,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:I4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:I4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ob.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:I4,className:"chakra-image",...e}));function ab(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var sb=(...e)=>e.filter(Boolean).join(" "),vL=e=>e?"":void 0,[ide,ode]=Cn({strict:!1,name:"ButtonGroupContext"});function hC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=sb("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}hC.displayName="ButtonIcon";function pC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(zv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=sb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}pC.displayName="ButtonSpinner";function ade(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:P,...E}=vn(e),k=C.exports.useMemo(()=>{const N={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:N}}},[r,n]),{ref:T,type:I}=ade(P),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return le.createElement(we.button,{disabled:i||o,ref:Loe(t,T),as:P,type:m??I,"data-active":vL(a),"data-loading":vL(o),__css:k,className:sb("chakra-button",w),...E},o&&b==="start"&&x(pC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||le.createElement(we.span,{opacity:0},x(yL,{...O})):x(yL,{...O}),o&&b==="end"&&x(pC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function yL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Kn,{children:[t&&x(hC,{marginEnd:i,children:t}),r,n&&x(hC,{marginStart:i,children:n})]})}var Eo=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=sb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(ide,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Eo.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var K0=(...e)=>e.filter(Boolean).join(" "),xy=e=>e?"":void 0,zS=e=>e?!0:void 0;function bL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,QD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[lde,Y0]=Cn({strict:!1,name:"FormControlContext"});function ude(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),T=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":xy(P),"data-disabled":xy(i),"data-invalid":xy(r),"data-readonly":xy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,P,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),N=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:N}}var gd=Pe(function(t,n){const r=Ri("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=ude(i),l=K0("chakra-form-control",t.className);return le.createElement(lde,{value:s},le.createElement(sde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var cde=Pe(function(t,n){const r=Y0(),i=QD(),o=K0("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});cde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":zS(n),"aria-required":zS(i),"aria-readonly":zS(r)}}function m7(e){const t=Y0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:bL(t?.onFocus,h),onBlur:bL(t?.onBlur,g)}}var[dde,fde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hde=Pe((e,t)=>{const n=Ri("FormError",e),r=vn(e),i=Y0();return i?.isInvalid?le.createElement(dde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:K0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});hde.displayName="FormErrorMessage";var pde=Pe((e,t)=>{const n=fde(),r=Y0();if(!r?.isInvalid)return null;const i=K0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});pde.displayName="FormErrorIcon";var ih=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(JD,{}),optionalIndicator:l=null,...u}=i,h=Y0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...g,className:K0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});ih.displayName="FormLabel";var JD=Pe(function(t,n){const r=Y0(),i=QD();if(!r?.isRequired)return null;const o=K0("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});JD.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},gde=we("span",{baseStyle:v7});gde.displayName="VisuallyHidden";var mde=we("input",{baseStyle:v7});mde.displayName="VisuallyHiddenInput";var xL=!1,lb=null,A0=!1,gC=new Set,vde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function yde(e){return!(e.metaKey||!vde&&e.altKey||e.ctrlKey)}function y7(e,t){gC.forEach(n=>n(e,t))}function SL(e){A0=!0,yde(e)&&(lb="keyboard",y7("keyboard",e))}function mp(e){lb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(A0=!0,y7("pointer",e))}function bde(e){e.target===window||e.target===document||(A0||(lb="keyboard",y7("keyboard",e)),A0=!1)}function xde(){A0=!1}function wL(){return lb!=="pointer"}function Sde(){if(typeof window>"u"||xL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){A0=!0,e.apply(this,n)},document.addEventListener("keydown",SL,!0),document.addEventListener("keyup",SL,!0),window.addEventListener("focus",bde,!0),window.addEventListener("blur",xde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",mp,!0),document.addEventListener("pointermove",mp,!0),document.addEventListener("pointerup",mp,!0)):(document.addEventListener("mousedown",mp,!0),document.addEventListener("mousemove",mp,!0),document.addEventListener("mouseup",mp,!0)),xL=!0}function wde(e){Sde(),e(wL());const t=()=>e(wL());return gC.add(t),()=>{gC.delete(t)}}var[qke,Cde]=Cn({name:"CheckboxGroupContext",strict:!1}),_de=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function kde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ede(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Pde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Tde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Pde:Ede;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Lde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ez(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:P,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":I,...O}=e,N=Lde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[W,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),[se,G]=C.exports.useState(!1);C.exports.useEffect(()=>wde(Y),[]);const V=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}ye||me(Se?Ae.target.checked:b?!0:Ae.target.checked),D?.(Ae)},[r,n,Se,ye,b,D]);bs(()=>{V.current&&(V.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Ae=V.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const Ue=n&&!m,ct=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!1)},[G]);bs(()=>{if(!V.current)return;V.current.checked!==Se&&me(V.current.checked)},[V.current]);const et=C.exports.useCallback((Ae={},dt=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Ae,ref:dt,"data-active":eo(se),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&W),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Ae.onMouseDown,Mt),onMouseUp:ka(Ae.onMouseUp,()=>G(!1)),onMouseEnter:ka(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:ka(Ae.onMouseLeave,()=>re(!1))}},[se,Se,n,de,W,te,b,o,r]),tt=C.exports.useCallback((Ae={},dt=null)=>({...N,...Ae,ref:$n(dt,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Ae.onClick,()=>{var Mt;q||((Mt=V.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=V.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[N,n,Se,o,q]),at=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:$n(V,dt),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:ka(Ae.onChange,He),onBlur:ka(Ae.onBlur,z,()=>j(!1)),onFocus:ka(Ae.onFocus,$,()=>j(!0)),onKeyDown:ka(Ae.onKeyDown,ct),onKeyUp:ka(Ae.onKeyUp,qe),required:i,checked:Se,disabled:Ue,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,P,a,He,z,$,ct,qe,i,Se,Ue,r,k,T,I,o,u,n,E]),At=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:dt,onMouseDown:ka(Ae.onMouseDown,CL),onTouchStart:ka(Ae.onTouchStart,CL),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:se,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:et,getInputProps:at,getLabelProps:At,htmlProps:N}}function CL(e){e.preventDefault(),e.stopPropagation()}var Ade={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Ide={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Mde=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ode=hd({from:{opacity:0},to:{opacity:1}}),Rde=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),tz=Pe(function(t,n){const r=Cde(),i={...r,...t},o=Ri("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Tde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=kde(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:N,getLabelProps:D,getRootProps:z}=ez({...E,isDisabled:b,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Ode} 20ms linear, ${Rde} 200ms linear`:`${Mde} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return le.createElement(we.label,{__css:{...Ide,...o.container},className:_de("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(P,n)}),le.createElement(we.span,{__css:{...Ade,...o.control},className:"chakra-checkbox__control",...N()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});tz.displayName="Checkbox";function Nde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var ub=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Nde,{width:"1em",height:"1em"}))});ub.displayName="CloseButton";function Dde(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Dde(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function mC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function M4(e,t,n){return(e-t)*100/(n-t)}function nz(e,t,n){return(n-t)*e+t}function vC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=mC(n);return b7(r,i)}function l0(e,t,n){return e==null?e:(nr==null?"":BS(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=rz(_c(v),o),w=n??b,P=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let Y=W;return l&&(Y=l0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(W):Y=_c(v)+W,Y=E(Y),P(Y)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(-W):Y=_c(v)-W,Y=E(Y),P(Y)},[E,o,P,v]),I=C.exports.useCallback(()=>{let W;r==null?W="":W=BS(r,o,n)??a,P(W)},[r,n,o,P,a]),O=C.exports.useCallback(W=>{const Y=BS(W,o,w)??a;P(Y)},[w,o,P,a]),N=_c(v);return{isOutOfRange:N>s||N{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function $de(e){return"current"in e}var oz=()=>typeof window<"u";function Hde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Wde=e=>oz()&&e.test(navigator.vendor),Vde=e=>oz()&&e.test(Hde()),Ude=()=>Vde(/mac|iphone|ipad|ipod/i),jde=()=>Ude()&&Wde(/apple/i);function Gde(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};$f(i,"pointerdown",o=>{if(!jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=$de(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var qde=$Q?C.exports.useLayoutEffect:C.exports.useEffect;function _L(e,t=[]){const n=C.exports.useRef(e);return qde(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Kde(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Yde(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function O4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_L(n),a=_L(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Kde(r,s),g=Yde(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:HQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=vn(i),s=g7(a),l=Nr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[Zde,az]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=ab(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Zde,{value:r,children:g}))});Xde.displayName="InputGroup";var Qde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Jde=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Qde[r]??{},a=az();return x(Jde,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var sz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});sz.displayName="InputLeftAddon";sz.id="InputLeftAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});lz.displayName="InputRightAddon";lz.id="InputRightAddon";var efe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),cb=Pe(function(t,n){const{placement:r="left",...i}=t,o=az(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(efe,{ref:n,__css:l,...i})});cb.id="InputElement";cb.displayName="InputElement";var uz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(cb,{ref:n,placement:"left",className:o,...i})});uz.id="InputLeftElement";uz.displayName="InputLeftElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(cb,{ref:n,placement:"right",className:o,...i})});cz.id="InputRightElement";cz.displayName="InputRightElement";function tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var nfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});nfe.displayName="AspectRatio";var rfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});rfe.displayName="Badge";var md=we("div");md.displayName="Box";var dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(md,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});dz.displayName="Square";var ife=Pe(function(t,n){const{size:r,...i}=t;return x(dz,{size:r,ref:n,borderRadius:"9999px",...i})});ife.displayName="Circle";var fz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});fz.displayName="Center";var ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:ofe[r],...i,position:"absolute"})});var afe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});afe.displayName="Code";var sfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});sfe.displayName="Container";var lfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});lfe.displayName="Divider";var an=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:g,...h})});an.displayName="Flex";var hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...b})});hz.displayName="Grid";function kL(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ufe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kL(i),gridRow:kL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:g,...h})});ufe.displayName="GridItem";var Hf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Hf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(md,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var cfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});cfe.displayName="Kbd";var Wf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Wf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[dfe,pz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=ab(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(dfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});ffe.displayName="OrderedList";var gz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});gz.displayName="UnorderedList";var mz=Pe(function(t,n){const r=pz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});mz.displayName="ListItem";var hfe=Pe(function(t,n){const r=pz();return x(ga,{ref:n,role:"presentation",...t,__css:r.icon})});hfe.displayName="ListIcon";var pfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=U0(),h=s?mfe(s,u):vfe(r);return x(hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});pfe.displayName="SimpleGrid";function gfe(e){return typeof e=="number"?`${e}px`:e}function mfe(e,t){return od(e,n=>{const r=yoe("sizes",n,gfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function vfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});vz.displayName="Spacer";var yC="& > *:not(style) ~ *:not(style)";function yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[yC]:od(n,i=>r[i])}}function bfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>bfe({spacing:a,direction:v}),[a,v]),P=!!u,E=!g&&!P,k=C.exports.useMemo(()=>{const I=ab(l);return E?I:I.map((O,N)=>{const D=typeof O.key<"u"?O.key:N,z=N+1===I.length,W=g?x(yz,{children:O},D):O;if(!P)return W;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[W,de]},D)})},[u,w,P,E,g,l]),T=Nr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:P?{}:{[yC]:b[yC]},...m},k)});_7.displayName="Stack";var bz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));bz.displayName="HStack";var xfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));xfe.displayName="VStack";var ko=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});ko.displayName="Text";function EL(e){return typeof e=="number"?`${e}px`:e}var Sfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,k=>EL(Pw("space",k)(E))),"--chakra-wrap-y-spacing":E=>od(P,k=>EL(Pw("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,P)=>x(xz,{children:w},P)):a,[a,g]);return le.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Sfe.displayName="Wrap";var xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});xz.displayName="WrapItem";var wfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Sz=wfe,vp=()=>{},Cfe={document:Sz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:vp,removeEventListener:vp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:vp,removeListener:vp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:vp,setInterval:()=>0,clearInterval:vp},_fe=Cfe,kfe={window:_fe,document:Sz},wz=typeof window<"u"?{window,document}:kfe,Cz=C.exports.createContext(wz);Cz.displayName="EnvironmentContext";function _z(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:wz},[r,n]);return ee(Cz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}_z.displayName="EnvironmentProvider";var Efe=e=>e?"":void 0;function Pfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function FS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Tfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,P]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),T=Pfe(),I=G=>{!G||G.tagName!=="BUTTON"&&P(!1)},O=w?g:g||0,N=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{E&&FS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;const V=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),V&&(G.preventDefault(),G.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),T.remove(document,"mouseup",Y,!1))},[T]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,T,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),re=C.exports.useCallback(G=>{E&&(G.preventDefault(),k(!1)),v?.(G)},[E,v]),se=$n(t,I);return w?{...b,ref:se,type:"button","aria-disabled":N?void 0:n,disabled:N,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:se,role:"button","data-active":Efe(E),"aria-disabled":n?"true":void 0,tabIndex:N?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:W,onKeyDown:$,onMouseOver:te,onMouseLeave:re}}function kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ez(e){if(!kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Lfe(e){var t;return((t=Pz(e))==null?void 0:t.defaultView)??window}function Pz(e){return kz(e)?e.ownerDocument:document}function Afe(e){return Pz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ife=e=>Tz(e)&&e.tabIndex===-1;function Mfe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Lz(e){return e.parentElement&&Lz(e.parentElement)?!0:e.hidden}function Ofe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Az(e){if(!Ez(e)||Lz(e)||Mfe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ofe(e)?!0:Tz(e)}function Rfe(e){return e?Ez(e)&&Az(e)&&!Ife(e):!1}var Nfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Dfe=Nfe.join(),zfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Iz(e){const t=Array.from(e.querySelectorAll(Dfe));return t.unshift(e),t.filter(n=>Az(n)&&zfe(n))}function Bfe(e){const t=e.current;if(!t)return!1;const n=Afe(t);return!n||t.contains(n)?!1:!!Rfe(n)}function Ffe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Bfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var $fe={preventScroll:!0,shouldFocus:!1};function Hfe(e,t=$fe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Wfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Iz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),$f(a,"transitionend",h)}function Wfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Bv=[Io,Ba,Fa,Mo],I0="start",uv="end",Vfe="clippingParents",Mz="viewport",kg="popper",Ufe="reference",PL=Bv.reduce(function(e,t){return e.concat([t+"-"+I0,t+"-"+uv])},[]),Oz=[].concat(Bv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+I0,t+"-"+uv])},[]),jfe="beforeRead",Gfe="read",qfe="afterRead",Kfe="beforeMain",Yfe="main",Zfe="afterMain",Xfe="beforeWrite",Qfe="write",Jfe="afterWrite",ehe=[jfe,Gfe,qfe,Kfe,Yfe,Zfe,Xfe,Qfe,Jfe];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function the(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function nhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const rhe={name:"applyStyles",enabled:!0,phase:"write",fn:the,effect:nhe,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Vf=Math.max,R4=Math.min,M0=Math.round;function bC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Rz(){return!/^((?!chrome|android).)*safari/i.test(bC())}function O0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&M0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M0(r.height)/e.offsetHeight||1);var a=Zf(e)?Wa(e):window,s=a.visualViewport,l=!Rz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=O0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Wa(e).getComputedStyle(e)}function ihe(e){return["table","td","th"].indexOf(El(e))>=0}function vd(e){return((Zf(e)?e.ownerDocument:e.document)||window.document).documentElement}function db(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||vd(e)}function TL(e){return!Na(e)||bu(e).position==="fixed"?null:e.offsetParent}function ohe(e){var t=/firefox/i.test(bC()),n=/Trident/i.test(bC());if(n&&Na(e)){var r=bu(e);if(r.position==="fixed")return null}var i=db(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fv(e){for(var t=Wa(e),n=TL(e);n&&ihe(n)&&bu(n).position==="static";)n=TL(n);return n&&(El(n)==="html"||El(n)==="body"&&bu(n).position==="static")?t:n||ohe(e)||t}function T7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cm(e,t,n){return Vf(e,R4(t,n))}function ahe(e,t,n){var r=Cm(e,t,n);return r>n?n:r}function Dz(){return{top:0,right:0,bottom:0,left:0}}function zz(e){return Object.assign({},Dz(),e)}function Bz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var she=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zz(typeof t!="number"?t:Bz(t,Bv))};function lhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=T7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=she(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=Fv(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,I=g[v],O=k-m[h]-g[b],N=k/2-m[h]/2+T,D=Cm(I,N,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-N,t)}}function uhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Nz(t.elements.popper,i)||(t.elements.arrow=i))}const che={name:"arrow",enabled:!0,phase:"main",fn:lhe,effect:uhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function R0(e){return e.split("-")[1]}var dhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:M0(t*i)/i||0,y:M0(n*i)/i||0}}function LL(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Mo,I=Io,O=window;if(u){var N=Fv(n),D="clientHeight",z="clientWidth";if(N===Wa(n)&&(N=vd(n),bu(N).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),N=N,i===Io||(i===Mo||i===Fa)&&o===uv){I=Ba;var $=g&&N===O&&O.visualViewport?O.visualViewport.height:N[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===uv){T=Fa;var W=g&&N===O&&O.visualViewport?O.visualViewport.width:N[z];v-=W-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&dhe),de=h===!0?fhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[T]=E?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:R0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LL(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LL(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const phe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hhe,data:{}};var Sy={passive:!0};function ghe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Sy)}),s&&l.addEventListener("resize",n.update,Sy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Sy)}),s&&l.removeEventListener("resize",n.update,Sy)}}const mhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ghe,data:{}};var vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function C3(e){return e.replace(/left|right|bottom|top/g,function(t){return vhe[t]})}var yhe={start:"end",end:"start"};function AL(e){return e.replace(/start|end/g,function(t){return yhe[t]})}function L7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return O0(vd(e)).left+L7(e).scrollLeft}function bhe(e,t){var n=Wa(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Rz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function xhe(e){var t,n=vd(e),r=L7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Vf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=Vf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Fz(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Fz(db(e))}function _m(e,t){var n;t===void 0&&(t=[]);var r=Fz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(_m(db(a)))}function xC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function She(e,t){var n=O0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IL(e,t,n){return t===Mz?xC(bhe(e,n)):Zf(t)?She(t,n):xC(xhe(vd(e)))}function whe(e){var t=_m(db(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&Na(e)?Fv(e):e;return Zf(r)?t.filter(function(i){return Zf(i)&&Nz(i,r)&&El(i)!=="body"}):[]}function Che(e,t,n,r){var i=t==="clippingParents"?whe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IL(e,u,r);return l.top=Vf(h.top,l.top),l.right=R4(h.right,l.right),l.bottom=R4(h.bottom,l.bottom),l.left=Vf(h.left,l.left),l},IL(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function $z(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?R0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?T7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case I0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case uv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Vfe:s,u=n.rootBoundary,h=u===void 0?Mz:u,g=n.elementContext,m=g===void 0?kg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=zz(typeof P!="number"?P:Bz(P,Bv)),k=m===kg?Ufe:kg,T=e.rects.popper,I=e.elements[b?k:m],O=Che(Zf(I)?I:I.contextElement||vd(e.elements.popper),l,h,a),N=O0(e.elements.reference),D=$z({reference:N,element:T,strategy:"absolute",placement:i}),z=xC(Object.assign({},T,D)),$=m===kg?z:N,W={top:O.top-$.top+E.top,bottom:$.bottom-O.bottom+E.bottom,left:O.left-$.left+E.left,right:$.right-O.right+E.right},Y=e.modifiersData.offset;if(m===kg&&Y){var de=Y[i];Object.keys(W).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,re=[Io,Ba].indexOf(j)>=0?"y":"x";W[j]+=de[re]*te})}return W}function _he(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Oz:l,h=R0(r),g=h?s?PL:PL.filter(function(b){return R0(b)===h}):Bv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function khe(e){if(wl(e)===k7)return[];var t=C3(e);return[AL(e),t,AL(t)]}function Ehe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=wl(P),k=E===P,T=l||(k||!b?[C3(P)]:khe(P)),I=[P].concat(T).reduce(function(Se,He){return Se.concat(wl(He)===k7?_he(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,N=t.rects.popper,D=new Map,z=!0,$=I[0],W=0;W=0,re=te?"width":"height",se=cv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[re]>N[re]&&(G=C3(G));var V=C3(G),q=[];if(o&&q.push(se[de]<=0),s&&q.push(se[G]<=0,se[V]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var Ue=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(et){return et})});if(Ue)return $=Ue,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Phe={name:"flip",enabled:!0,phase:"main",fn:Ehe,requiresIfExists:["offset"],data:{_skip:!1}};function ML(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function OL(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function The(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=cv(t,{elementContext:"reference"}),s=cv(t,{altBoundary:!0}),l=ML(a,r),u=ML(s,i,o),h=OL(l),g=OL(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Lhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:The};function Ahe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Ihe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Oz.reduce(function(h,g){return h[g]=Ahe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Mhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ihe};function Ohe(e){var t=e.state,n=e.name;t.modifiersData[n]=$z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Rhe={name:"popperOffsets",enabled:!0,phase:"read",fn:Ohe,data:{}};function Nhe(e){return e==="x"?"y":"x"}function Dhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,P=cv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),E=wl(t.placement),k=R0(t.placement),T=!k,I=T7(E),O=Nhe(I),N=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!N){if(o){var j,te=I==="y"?Io:Mo,re=I==="y"?Ba:Fa,se=I==="y"?"height":"width",G=N[I],V=G+P[te],q=G-P[re],Q=v?-z[se]/2:0,X=k===I0?D[se]:z[se],me=k===I0?-z[se]:-D[se],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dz(),Ue=He[te],ct=He[re],qe=Cm(0,D[se],Se[se]),et=T?D[se]/2-Q-qe-Ue-W.mainAxis:X-qe-Ue-W.mainAxis,tt=T?-D[se]/2+Q+qe+ct+W.mainAxis:me+qe+ct+W.mainAxis,at=t.elements.arrow&&Fv(t.elements.arrow),At=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Ae=G+et-wt-At,dt=G+tt-wt,Mt=Cm(v?R4(V,Ae):V,G,v?Vf(q,dt):q);N[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=N[O],Zt=O==="y"?"height":"width",En=Et+P[xt],yn=Et-P[kn],Me=[Io,Mo].indexOf(E)!==-1,Je=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-Je+W.altAxis,Gt=Me?Et+D[Zt]+z[Zt]-Je-W.altAxis:yn,Ee=v&&Me?ahe(Xt,Et,Gt):Cm(v?Xt:En,Et,v?Gt:yn);N[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const zhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Dhe,requiresIfExists:["offset"]};function Bhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Fhe(e){return e===Wa(e)||!Na(e)?L7(e):Bhe(e)}function $he(e){var t=e.getBoundingClientRect(),n=M0(t.width)/e.offsetWidth||1,r=M0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Hhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&$he(t),o=vd(t),a=O0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=Fhe(t)),Na(t)?(l=O0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Whe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Vhe(e){var t=Whe(e);return ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Uhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var RL={placement:"bottom",modifiers:[],strategy:"absolute"};function NL(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:yp("--popper-arrow-shadow-color"),arrowSize:yp("--popper-arrow-size","8px"),arrowSizeHalf:yp("--popper-arrow-size-half"),arrowBg:yp("--popper-arrow-bg"),transformOrigin:yp("--popper-transform-origin"),arrowOffset:yp("--popper-arrow-offset")};function Yhe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Zhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Xhe=e=>Zhe[e],DL={scroll:!0,resize:!0};function Qhe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DL,...e}}:t={enabled:e,options:DL},t}var Jhe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zL(e)},effect:({state:e})=>()=>{zL(e)}},zL=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Xhe(e.placement))},tpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{npe(e)}},npe=e=>{var t;if(!e.placement)return;const n=rpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},rpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},ipe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BL(e)},effect:({state:e})=>()=>{BL(e)}},BL=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Yhe(e.placement)})},ope={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ape={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function spe(e,t="ltr"){var n;const r=((n=ope[e])==null?void 0:n[t])||e;return t==="ltr"?r:ape[e]??r}function Hz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=spe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!b.current||!w.current||((W=k.current)==null||W.call(k),P.current=Khe(b.current,w.current,{placement:E,modifiers:[ipe,tpe,epe,{...Jhe,enabled:!!m},{name:"eventListeners",...Qhe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),k.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!b.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const I=C.exports.useCallback(W=>{b.current=W,T()},[T]),O=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(I,Y)}),[I]),N=C.exports.useCallback(W=>{w.current=W,T()},[T]),D=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(N,Y),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,N,m]),z=C.exports.useCallback((W={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:re,...se}=W;return{...se,ref:Y,"data-popper-arrow":"",style:lpe(W)}},[]),$=C.exports.useCallback((W={},Y=null)=>({...W,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function lpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Wz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function P(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var I;(I=k.onClick)==null||I.call(k,T),w()}}}function E(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function upe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),$f(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Lfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Vz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[cpe,dpe]=Cn({strict:!1,name:"PortalManagerContext"});function Uz(e){const{children:t,zIndex:n}=e;return x(cpe,{value:{zIndex:n},children:t})}Uz.displayName="PortalManager";var[jz,fpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",hpe=".chakra-portal",ppe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),gpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=fpe(),l=dpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(ppe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(jz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},mpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(jz,{value:r?a:null,children:t}),a):null};function oh(e){const{containerRef:t,...n}=e;return t?x(mpe,{containerRef:t,...n}):x(gpe,{...n})}oh.defaultProps={appendToParentPortal:!0};oh.className=M7;oh.selector=hpe;oh.displayName="Portal";var vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bp=new WeakMap,wy=new WeakMap,Cy={},$S=0,ype=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Cy[n]||(Cy[n]=new WeakMap);var o=Cy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(bp.get(m)||0)+1,P=(o.get(m)||0)+1;bp.set(m,w),o.set(m,P),a.push(m),w===1&&b&&wy.set(m,!0),P===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),$S++,function(){a.forEach(function(g){var m=bp.get(g)-1,v=o.get(g)-1;bp.set(g,m),o.set(g,v),m||(wy.has(g)||g.removeAttribute(r),wy.delete(g)),v||g.removeAttribute(n)}),$S--,$S||(bp=new WeakMap,bp=new WeakMap,wy=new WeakMap,Cy={})}},Gz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ype(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},bpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xpe=bpe,Spe=xpe;function qz(){}function Kz(){}Kz.resetWarningCache=qz;var wpe=function(){function e(r,i,o,a,s,l){if(l!==Spe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kz,resetWarningCache:qz};return n.PropTypes=n,n};Rn.exports=wpe();var SC="data-focus-lock",Yz="data-focus-lock-disabled",Cpe="data-no-focus-lock",_pe="data-autofocus-inside",kpe="data-no-autofocus";function Epe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ppe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Zz(e,t){return Ppe(t||null,function(n){return e.forEach(function(r){return Epe(r,n)})})}var HS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Xz(e){return e}function Qz(e,t){t===void 0&&(t=Xz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Xz),Qz(e,t)}function Jz(e){e===void 0&&(e={});var t=Qz(null);return t.options=hl({async:!0,ssr:!1},e),t}var eB=function(e){var t=e.sideCar,n=WD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};eB.isSideCarExport=!0;function Tpe(e,t){return e.useMedium(t),eB}var tB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),nB=R7(),Lpe=R7(),Ape=Jz({async:!0}),Ipe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,k=t.whiteList,T=t.hasPositiveIndices,I=t.shards,O=I===void 0?Ipe:I,N=t.as,D=N===void 0?"div":N,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,re=C.exports.useState({}),se=re[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),V=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var et=typeof Y=="function"?Y(qe):Y;if(et){var tt=typeof et=="object"?et:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(tt)}):qe.focus(tt)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&tB.useMedium(ct)},[]),X=nB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Yz]=g&&"disabled",r[SC]=P,r),$),Se=m!==!0,He=Se&&m!=="tail",Ue=Zz([n,me]);return ee(Kn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:HS},"guard-nearest"):null],!g&&x(W,{id:se,sideCar:Ape,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:V,returnFocus:q,focusOptions:de}),x(D,{ref:Ue,...ye,className:E,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const rB=N7;function wC(e,t){return wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wC(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wC(e,t)}function iB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mpe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return iB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort($pe)},Hpe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Hpe.join(","),Wpe="".concat(B7,", [data-focus-guard]"),hB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Wpe:B7)?[i]:[],hB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(hB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Vpe=function(e){var t=e.querySelectorAll("[".concat(_pe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return sB(t,n)}).filter(function(n){return zpe(n)})},FL=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return lB(t,n)})},_C=function(e,t,n){return fB($7(F7(e,n),t),!0,n)},$L=function(e,t){return fB($7(F7(e),t),!1)},Upe=function(e,t){return $7(Vpe(e),t)},dv=function(e,t){return e.shadowRoot?dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return dv(n,t)})},jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},pB=function(e){return e.parentNode?pB(e.parentNode):e},H7=function(e){var t=CC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(SC);return n.push.apply(n,i?jpe(Ml(pB(r).querySelectorAll("[".concat(SC,'="').concat(i,'"]:not([').concat(Yz,'="disabled"])')))):[r]),n},[])},gB=function(e){return e.activeElement?e.activeElement.shadowRoot?gB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?gB(document.activeElement.shadowRoot):document.activeElement:void 0},Gpe=function(e){return e===document.activeElement},qpe=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return Gpe(t)}))},mB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return dv(n,t)||qpe(n)})},Kpe=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Cpe,"]"))).some(function(t){return dv(t,e)}):!1},Ype=function(e,t){return t.filter(dB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return dB(e)&&e.name?Ype(e,t):e},Zpe=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HL=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WL=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},vB="NEW_FOCUS",Xpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Zpe(t),w=n!==void 0?b.indexOf(n):-1,P=w-(r?b.indexOf(r):l),E=WL(e,0),k=WL(e,i-1);if(l===-1||h===-1)return vB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(P)>1)return h;if(l<=m)return k;if(l>v)return E;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},Qpe=function(e){return function(t){var n,r=(n=uB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Jpe=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FL(r.filter(Qpe(n)));return i&&i.length?HL(i):HL(FL(t))},kC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&kC(e.parentNode.host||e.parentNode,t),t},WS=function(e,t){for(var n=kC(e),r=kC(t),i=0;i=0)return o}return!1},yB=function(e,t,n){var r=CC(e),i=CC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=WS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=WS(o,l);u&&(!a||dv(u,a)?a=u:a=WS(u,a))})}),a},e0e=function(e,t){return e.reduce(function(n,r){return n.concat(Upe(r,t))},[])},t0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Fpe)},n0e=function(e,t){var n=document&&W7(),r=H7(e).filter(N4),i=yB(n||e,e,r),o=new Map,a=$L(r,o),s=_C(r,o).filter(function(m){var v=m.node;return N4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$L([i],o).map(function(m){var v=m.node;return v}),u=t0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=Xpe(h,l,n,t);return g===vB?{node:Jpe(a,h,e0e(r,o))}:g===void 0?g:u[g]}},r0e=function(e){var t=H7(e).filter(N4),n=yB(e,e,t),r=new Map,i=_C([n],r,!0),o=_C(t,r).filter(function(a){var s=a.node;return N4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},i0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},VS=0,US=!1,o0e=function(e,t,n){n===void 0&&(n={});var r=n0e(e,t);if(!US&&r){if(VS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),US=!0,setTimeout(function(){US=!1},1);return}VS++,i0e(r.node,n.focusOptions),VS--}};const bB=o0e;function xB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var a0e=function(){return document&&document.activeElement===document.body},s0e=function(){return a0e()||Kpe()},u0=null,Up=null,c0=null,fv=!1,l0e=function(){return!0},u0e=function(t){return(u0.whiteList||l0e)(t)},c0e=function(t,n){c0={observerNode:t,portaledElement:n}},d0e=function(t){return c0&&c0.portaledElement===t};function VL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var f0e=function(t){return t&&"current"in t?t.current:t},h0e=function(t){return t?Boolean(fv):fv==="meanwhile"},p0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},g0e=function(t,n){return n.some(function(r){return p0e(t,r,r)})},D4=function(){var t=!1;if(u0){var n=u0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||c0&&c0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(f0e).filter(Boolean));if((!h||u0e(h))&&(i||h0e(s)||!s0e()||!Up&&o)&&(u&&!(mB(g)||h&&g0e(h,g)||d0e(h))&&(document&&!Up&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=bB(g,Up,{focusOptions:l}),c0={})),fv=!1,Up=document&&document.activeElement),document){var m=document&&document.activeElement,v=r0e(g),b=v.map(function(w){var P=w.node;return P}).indexOf(m);b>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),VL(b,v.length,1,v),VL(b,-1,-1,v))}}}return t},SB=function(t){D4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return xB(D4)},m0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||c0e(r,n)},v0e=function(){return null},wB=function(){fv="just",setTimeout(function(){fv="meanwhile"},0)},y0e=function(){document.addEventListener("focusin",SB),document.addEventListener("focusout",U7),window.addEventListener("blur",wB)},b0e=function(){document.removeEventListener("focusin",SB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",wB)};function x0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function S0e(e){var t=e.slice(-1)[0];t&&!u0&&y0e();var n=u0,r=n&&t&&t.id===n.id;u0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Up=null,(!r||n.observed!==t.observed)&&t.onActivation(),D4(),xB(D4)):(b0e(),Up=null)}tB.assignSyncMedium(m0e);nB.assignMedium(U7);Lpe.assignMedium(function(e){return e({moveFocusInside:bB,focusInside:mB})});const w0e=Mpe(x0e,S0e)(v0e);var CB=C.exports.forwardRef(function(t,n){return x(rB,{sideCar:w0e,ref:n,...t})}),_B=rB.propTypes||{};_B.sideCar;O7(_B,["sideCar"]);CB.propTypes={};const C0e=CB;var kB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Iz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(C0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};kB.displayName="FocusLock";var _3="right-scroll-bar-position",k3="width-before-scroll-bar",_0e="with-scroll-bars-hidden",k0e="--removed-body-scroll-bar-size",EB=Jz(),jS=function(){},fb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:jS,onWheelCapture:jS,onTouchMoveCapture:jS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,k=WD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,I=Zz([n,t]),O=hl(hl({},k),i);return ee(Kn,{children:[h&&x(T,{sideCar:EB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(E,{...hl({},O,{className:l,ref:I}),children:s})]})});fb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fb.classNames={fullWidth:k3,zeroRight:_3};var E0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function P0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E0e();return t&&e.setAttribute("nonce",t),e}function T0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function L0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=P0e())&&(T0e(t,n),L0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I0e=function(){var e=A0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},PB=function(){var e=I0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},M0e={left:0,top:0,right:0,gap:0},GS=function(e){return parseInt(e||"",10)||0},O0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[GS(n),GS(r),GS(i)]},R0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M0e;var t=O0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},N0e=PB(),D0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + `});function $f(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function $de(e){return"current"in e}var oz=()=>typeof window<"u";function Hde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Wde=e=>oz()&&e.test(navigator.vendor),Vde=e=>oz()&&e.test(Hde()),Ude=()=>Vde(/mac|iphone|ipad|ipod/i),jde=()=>Ude()&&Wde(/apple/i);function Gde(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};$f(i,"pointerdown",o=>{if(!jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=$de(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var qde=$Q?C.exports.useLayoutEffect:C.exports.useEffect;function _L(e,t=[]){const n=C.exports.useRef(e);return qde(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Kde(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Yde(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function O4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_L(n),a=_L(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Kde(r,s),g=Yde(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:HQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=vn(i),s=g7(a),l=Nr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[Zde,az]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=ab(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Zde,{value:r,children:g}))});Xde.displayName="InputGroup";var Qde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Jde=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Qde[r]??{},a=az();return x(Jde,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var sz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});sz.displayName="InputLeftAddon";sz.id="InputLeftAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});lz.displayName="InputRightAddon";lz.id="InputRightAddon";var efe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),cb=Pe(function(t,n){const{placement:r="left",...i}=t,o=az(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(efe,{ref:n,__css:l,...i})});cb.id="InputElement";cb.displayName="InputElement";var uz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(cb,{ref:n,placement:"left",className:o,...i})});uz.id="InputLeftElement";uz.displayName="InputLeftElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(cb,{ref:n,placement:"right",className:o,...i})});cz.id="InputRightElement";cz.displayName="InputRightElement";function tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var nfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});nfe.displayName="AspectRatio";var rfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});rfe.displayName="Badge";var md=we("div");md.displayName="Box";var dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(md,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});dz.displayName="Square";var ife=Pe(function(t,n){const{size:r,...i}=t;return x(dz,{size:r,ref:n,borderRadius:"9999px",...i})});ife.displayName="Circle";var fz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});fz.displayName="Center";var ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:ofe[r],...i,position:"absolute"})});var afe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});afe.displayName="Code";var sfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});sfe.displayName="Container";var lfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});lfe.displayName="Divider";var an=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:g,...h})});an.displayName="Flex";var hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...b})});hz.displayName="Grid";function kL(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ufe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kL(i),gridRow:kL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:g,...h})});ufe.displayName="GridItem";var Hf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Hf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(md,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var cfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});cfe.displayName="Kbd";var Wf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Wf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[dfe,pz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=ab(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(dfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});ffe.displayName="OrderedList";var gz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});gz.displayName="UnorderedList";var mz=Pe(function(t,n){const r=pz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});mz.displayName="ListItem";var hfe=Pe(function(t,n){const r=pz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});hfe.displayName="ListIcon";var pfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=U0(),h=s?mfe(s,u):vfe(r);return x(hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});pfe.displayName="SimpleGrid";function gfe(e){return typeof e=="number"?`${e}px`:e}function mfe(e,t){return od(e,n=>{const r=yoe("sizes",n,gfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function vfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});vz.displayName="Spacer";var yC="& > *:not(style) ~ *:not(style)";function yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[yC]:od(n,i=>r[i])}}function bfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>bfe({spacing:a,direction:v}),[a,v]),P=!!u,E=!g&&!P,k=C.exports.useMemo(()=>{const I=ab(l);return E?I:I.map((O,N)=>{const D=typeof O.key<"u"?O.key:N,z=N+1===I.length,W=g?x(yz,{children:O},D):O;if(!P)return W;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[W,de]},D)})},[u,w,P,E,g,l]),T=Nr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:P?{}:{[yC]:b[yC]},...m},k)});_7.displayName="Stack";var bz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));bz.displayName="HStack";var xfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));xfe.displayName="VStack";var ko=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});ko.displayName="Text";function EL(e){return typeof e=="number"?`${e}px`:e}var Sfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,k=>EL(Pw("space",k)(E))),"--chakra-wrap-y-spacing":E=>od(P,k=>EL(Pw("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,P)=>x(xz,{children:w},P)):a,[a,g]);return le.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Sfe.displayName="Wrap";var xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});xz.displayName="WrapItem";var wfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Sz=wfe,vp=()=>{},Cfe={document:Sz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:vp,removeEventListener:vp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:vp,removeListener:vp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:vp,setInterval:()=>0,clearInterval:vp},_fe=Cfe,kfe={window:_fe,document:Sz},wz=typeof window<"u"?{window,document}:kfe,Cz=C.exports.createContext(wz);Cz.displayName="EnvironmentContext";function _z(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:wz},[r,n]);return ee(Cz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}_z.displayName="EnvironmentProvider";var Efe=e=>e?"":void 0;function Pfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function FS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Tfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,P]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),T=Pfe(),I=G=>{!G||G.tagName!=="BUTTON"&&P(!1)},O=w?g:g||0,N=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{E&&FS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;const V=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),V&&(G.preventDefault(),G.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),T.remove(document,"mouseup",Y,!1))},[T]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,T,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),re=C.exports.useCallback(G=>{E&&(G.preventDefault(),k(!1)),v?.(G)},[E,v]),se=$n(t,I);return w?{...b,ref:se,type:"button","aria-disabled":N?void 0:n,disabled:N,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:se,role:"button","data-active":Efe(E),"aria-disabled":n?"true":void 0,tabIndex:N?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:W,onKeyDown:$,onMouseOver:te,onMouseLeave:re}}function kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ez(e){if(!kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Lfe(e){var t;return((t=Pz(e))==null?void 0:t.defaultView)??window}function Pz(e){return kz(e)?e.ownerDocument:document}function Afe(e){return Pz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ife=e=>Tz(e)&&e.tabIndex===-1;function Mfe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Lz(e){return e.parentElement&&Lz(e.parentElement)?!0:e.hidden}function Ofe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Az(e){if(!Ez(e)||Lz(e)||Mfe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ofe(e)?!0:Tz(e)}function Rfe(e){return e?Ez(e)&&Az(e)&&!Ife(e):!1}var Nfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Dfe=Nfe.join(),zfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Iz(e){const t=Array.from(e.querySelectorAll(Dfe));return t.unshift(e),t.filter(n=>Az(n)&&zfe(n))}function Bfe(e){const t=e.current;if(!t)return!1;const n=Afe(t);return!n||t.contains(n)?!1:!!Rfe(n)}function Ffe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Bfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var $fe={preventScroll:!0,shouldFocus:!1};function Hfe(e,t=$fe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Wfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Iz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),$f(a,"transitionend",h)}function Wfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Bv=[Io,Ba,Fa,Mo],I0="start",uv="end",Vfe="clippingParents",Mz="viewport",kg="popper",Ufe="reference",PL=Bv.reduce(function(e,t){return e.concat([t+"-"+I0,t+"-"+uv])},[]),Oz=[].concat(Bv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+I0,t+"-"+uv])},[]),jfe="beforeRead",Gfe="read",qfe="afterRead",Kfe="beforeMain",Yfe="main",Zfe="afterMain",Xfe="beforeWrite",Qfe="write",Jfe="afterWrite",ehe=[jfe,Gfe,qfe,Kfe,Yfe,Zfe,Xfe,Qfe,Jfe];function Pl(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function the(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!Pl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function nhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!Pl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const rhe={name:"applyStyles",enabled:!0,phase:"write",fn:the,effect:nhe,requires:["computeStyles"]};function Cl(e){return e.split("-")[0]}var Vf=Math.max,R4=Math.min,M0=Math.round;function bC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Rz(){return!/^((?!chrome|android).)*safari/i.test(bC())}function O0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&M0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M0(r.height)/e.offsetHeight||1);var a=Zf(e)?Wa(e):window,s=a.visualViewport,l=!Rz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=O0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Wa(e).getComputedStyle(e)}function ihe(e){return["table","td","th"].indexOf(Pl(e))>=0}function vd(e){return((Zf(e)?e.ownerDocument:e.document)||window.document).documentElement}function db(e){return Pl(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||vd(e)}function TL(e){return!Na(e)||bu(e).position==="fixed"?null:e.offsetParent}function ohe(e){var t=/firefox/i.test(bC()),n=/Trident/i.test(bC());if(n&&Na(e)){var r=bu(e);if(r.position==="fixed")return null}var i=db(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(Pl(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fv(e){for(var t=Wa(e),n=TL(e);n&&ihe(n)&&bu(n).position==="static";)n=TL(n);return n&&(Pl(n)==="html"||Pl(n)==="body"&&bu(n).position==="static")?t:n||ohe(e)||t}function T7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cm(e,t,n){return Vf(e,R4(t,n))}function ahe(e,t,n){var r=Cm(e,t,n);return r>n?n:r}function Dz(){return{top:0,right:0,bottom:0,left:0}}function zz(e){return Object.assign({},Dz(),e)}function Bz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var she=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zz(typeof t!="number"?t:Bz(t,Bv))};function lhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Cl(n.placement),l=T7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=she(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=Fv(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,I=g[v],O=k-m[h]-g[b],N=k/2-m[h]/2+T,D=Cm(I,N,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-N,t)}}function uhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Nz(t.elements.popper,i)||(t.elements.arrow=i))}const che={name:"arrow",enabled:!0,phase:"main",fn:lhe,effect:uhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function R0(e){return e.split("-")[1]}var dhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:M0(t*i)/i||0,y:M0(n*i)/i||0}}function LL(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Mo,I=Io,O=window;if(u){var N=Fv(n),D="clientHeight",z="clientWidth";if(N===Wa(n)&&(N=vd(n),bu(N).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),N=N,i===Io||(i===Mo||i===Fa)&&o===uv){I=Ba;var $=g&&N===O&&O.visualViewport?O.visualViewport.height:N[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===uv){T=Fa;var W=g&&N===O&&O.visualViewport?O.visualViewport.width:N[z];v-=W-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&dhe),de=h===!0?fhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[T]=E?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Cl(t.placement),variation:R0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LL(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LL(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const phe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hhe,data:{}};var Sy={passive:!0};function ghe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Sy)}),s&&l.addEventListener("resize",n.update,Sy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Sy)}),s&&l.removeEventListener("resize",n.update,Sy)}}const mhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ghe,data:{}};var vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function C3(e){return e.replace(/left|right|bottom|top/g,function(t){return vhe[t]})}var yhe={start:"end",end:"start"};function AL(e){return e.replace(/start|end/g,function(t){return yhe[t]})}function L7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return O0(vd(e)).left+L7(e).scrollLeft}function bhe(e,t){var n=Wa(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Rz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function xhe(e){var t,n=vd(e),r=L7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Vf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=Vf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Fz(e){return["html","body","#document"].indexOf(Pl(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Fz(db(e))}function _m(e,t){var n;t===void 0&&(t=[]);var r=Fz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(_m(db(a)))}function xC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function She(e,t){var n=O0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IL(e,t,n){return t===Mz?xC(bhe(e,n)):Zf(t)?She(t,n):xC(xhe(vd(e)))}function whe(e){var t=_m(db(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&Na(e)?Fv(e):e;return Zf(r)?t.filter(function(i){return Zf(i)&&Nz(i,r)&&Pl(i)!=="body"}):[]}function Che(e,t,n,r){var i=t==="clippingParents"?whe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IL(e,u,r);return l.top=Vf(h.top,l.top),l.right=R4(h.right,l.right),l.bottom=R4(h.bottom,l.bottom),l.left=Vf(h.left,l.left),l},IL(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function $z(e){var t=e.reference,n=e.element,r=e.placement,i=r?Cl(r):null,o=r?R0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?T7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case I0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case uv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Vfe:s,u=n.rootBoundary,h=u===void 0?Mz:u,g=n.elementContext,m=g===void 0?kg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=zz(typeof P!="number"?P:Bz(P,Bv)),k=m===kg?Ufe:kg,T=e.rects.popper,I=e.elements[b?k:m],O=Che(Zf(I)?I:I.contextElement||vd(e.elements.popper),l,h,a),N=O0(e.elements.reference),D=$z({reference:N,element:T,strategy:"absolute",placement:i}),z=xC(Object.assign({},T,D)),$=m===kg?z:N,W={top:O.top-$.top+E.top,bottom:$.bottom-O.bottom+E.bottom,left:O.left-$.left+E.left,right:$.right-O.right+E.right},Y=e.modifiersData.offset;if(m===kg&&Y){var de=Y[i];Object.keys(W).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,re=[Io,Ba].indexOf(j)>=0?"y":"x";W[j]+=de[re]*te})}return W}function _he(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Oz:l,h=R0(r),g=h?s?PL:PL.filter(function(b){return R0(b)===h}):Bv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Cl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function khe(e){if(Cl(e)===k7)return[];var t=C3(e);return[AL(e),t,AL(t)]}function Ehe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=Cl(P),k=E===P,T=l||(k||!b?[C3(P)]:khe(P)),I=[P].concat(T).reduce(function(Se,He){return Se.concat(Cl(He)===k7?_he(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,N=t.rects.popper,D=new Map,z=!0,$=I[0],W=0;W=0,re=te?"width":"height",se=cv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[re]>N[re]&&(G=C3(G));var V=C3(G),q=[];if(o&&q.push(se[de]<=0),s&&q.push(se[G]<=0,se[V]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var Ue=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(et){return et})});if(Ue)return $=Ue,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Phe={name:"flip",enabled:!0,phase:"main",fn:Ehe,requiresIfExists:["offset"],data:{_skip:!1}};function ML(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function OL(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function The(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=cv(t,{elementContext:"reference"}),s=cv(t,{altBoundary:!0}),l=ML(a,r),u=ML(s,i,o),h=OL(l),g=OL(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Lhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:The};function Ahe(e,t,n){var r=Cl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Ihe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Oz.reduce(function(h,g){return h[g]=Ahe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Mhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ihe};function Ohe(e){var t=e.state,n=e.name;t.modifiersData[n]=$z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Rhe={name:"popperOffsets",enabled:!0,phase:"read",fn:Ohe,data:{}};function Nhe(e){return e==="x"?"y":"x"}function Dhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,P=cv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),E=Cl(t.placement),k=R0(t.placement),T=!k,I=T7(E),O=Nhe(I),N=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!N){if(o){var j,te=I==="y"?Io:Mo,re=I==="y"?Ba:Fa,se=I==="y"?"height":"width",G=N[I],V=G+P[te],q=G-P[re],Q=v?-z[se]/2:0,X=k===I0?D[se]:z[se],me=k===I0?-z[se]:-D[se],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dz(),Ue=He[te],ct=He[re],qe=Cm(0,D[se],Se[se]),et=T?D[se]/2-Q-qe-Ue-W.mainAxis:X-qe-Ue-W.mainAxis,tt=T?-D[se]/2+Q+qe+ct+W.mainAxis:me+qe+ct+W.mainAxis,at=t.elements.arrow&&Fv(t.elements.arrow),At=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Ae=G+et-wt-At,dt=G+tt-wt,Mt=Cm(v?R4(V,Ae):V,G,v?Vf(q,dt):q);N[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=N[O],Zt=O==="y"?"height":"width",En=Et+P[xt],yn=Et-P[kn],Me=[Io,Mo].indexOf(E)!==-1,Je=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-Je+W.altAxis,Gt=Me?Et+D[Zt]+z[Zt]-Je-W.altAxis:yn,Ee=v&&Me?ahe(Xt,Et,Gt):Cm(v?Xt:En,Et,v?Gt:yn);N[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const zhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Dhe,requiresIfExists:["offset"]};function Bhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Fhe(e){return e===Wa(e)||!Na(e)?L7(e):Bhe(e)}function $he(e){var t=e.getBoundingClientRect(),n=M0(t.width)/e.offsetWidth||1,r=M0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Hhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&$he(t),o=vd(t),a=O0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pl(t)!=="body"||I7(o))&&(s=Fhe(t)),Na(t)?(l=O0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Whe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Vhe(e){var t=Whe(e);return ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Uhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var RL={placement:"bottom",modifiers:[],strategy:"absolute"};function NL(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:yp("--popper-arrow-shadow-color"),arrowSize:yp("--popper-arrow-size","8px"),arrowSizeHalf:yp("--popper-arrow-size-half"),arrowBg:yp("--popper-arrow-bg"),transformOrigin:yp("--popper-transform-origin"),arrowOffset:yp("--popper-arrow-offset")};function Yhe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Zhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Xhe=e=>Zhe[e],DL={scroll:!0,resize:!0};function Qhe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DL,...e}}:t={enabled:e,options:DL},t}var Jhe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zL(e)},effect:({state:e})=>()=>{zL(e)}},zL=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Xhe(e.placement))},tpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{npe(e)}},npe=e=>{var t;if(!e.placement)return;const n=rpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},rpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},ipe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BL(e)},effect:({state:e})=>()=>{BL(e)}},BL=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Yhe(e.placement)})},ope={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ape={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function spe(e,t="ltr"){var n;const r=((n=ope[e])==null?void 0:n[t])||e;return t==="ltr"?r:ape[e]??r}function Hz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=spe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!b.current||!w.current||((W=k.current)==null||W.call(k),P.current=Khe(b.current,w.current,{placement:E,modifiers:[ipe,tpe,epe,{...Jhe,enabled:!!m},{name:"eventListeners",...Qhe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),k.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!b.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const I=C.exports.useCallback(W=>{b.current=W,T()},[T]),O=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(I,Y)}),[I]),N=C.exports.useCallback(W=>{w.current=W,T()},[T]),D=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(N,Y),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,N,m]),z=C.exports.useCallback((W={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:re,...se}=W;return{...se,ref:Y,"data-popper-arrow":"",style:lpe(W)}},[]),$=C.exports.useCallback((W={},Y=null)=>({...W,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function lpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Wz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function P(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var I;(I=k.onClick)==null||I.call(k,T),w()}}}function E(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function upe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),$f(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Lfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Vz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[cpe,dpe]=Cn({strict:!1,name:"PortalManagerContext"});function Uz(e){const{children:t,zIndex:n}=e;return x(cpe,{value:{zIndex:n},children:t})}Uz.displayName="PortalManager";var[jz,fpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",hpe=".chakra-portal",ppe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),gpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=fpe(),l=dpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(ppe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(jz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},mpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(jz,{value:r?a:null,children:t}),a):null};function oh(e){const{containerRef:t,...n}=e;return t?x(mpe,{containerRef:t,...n}):x(gpe,{...n})}oh.defaultProps={appendToParentPortal:!0};oh.className=M7;oh.selector=hpe;oh.displayName="Portal";var vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bp=new WeakMap,wy=new WeakMap,Cy={},$S=0,ype=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Cy[n]||(Cy[n]=new WeakMap);var o=Cy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(bp.get(m)||0)+1,P=(o.get(m)||0)+1;bp.set(m,w),o.set(m,P),a.push(m),w===1&&b&&wy.set(m,!0),P===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),$S++,function(){a.forEach(function(g){var m=bp.get(g)-1,v=o.get(g)-1;bp.set(g,m),o.set(g,v),m||(wy.has(g)||g.removeAttribute(r),wy.delete(g)),v||g.removeAttribute(n)}),$S--,$S||(bp=new WeakMap,bp=new WeakMap,wy=new WeakMap,Cy={})}},Gz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ype(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},bpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xpe=bpe,Spe=xpe;function qz(){}function Kz(){}Kz.resetWarningCache=qz;var wpe=function(){function e(r,i,o,a,s,l){if(l!==Spe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kz,resetWarningCache:qz};return n.PropTypes=n,n};Rn.exports=wpe();var SC="data-focus-lock",Yz="data-focus-lock-disabled",Cpe="data-no-focus-lock",_pe="data-autofocus-inside",kpe="data-no-autofocus";function Epe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ppe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Zz(e,t){return Ppe(t||null,function(n){return e.forEach(function(r){return Epe(r,n)})})}var HS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Xz(e){return e}function Qz(e,t){t===void 0&&(t=Xz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Xz),Qz(e,t)}function Jz(e){e===void 0&&(e={});var t=Qz(null);return t.options=pl({async:!0,ssr:!1},e),t}var eB=function(e){var t=e.sideCar,n=WD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};eB.isSideCarExport=!0;function Tpe(e,t){return e.useMedium(t),eB}var tB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),nB=R7(),Lpe=R7(),Ape=Jz({async:!0}),Ipe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,k=t.whiteList,T=t.hasPositiveIndices,I=t.shards,O=I===void 0?Ipe:I,N=t.as,D=N===void 0?"div":N,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,re=C.exports.useState({}),se=re[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),V=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var et=typeof Y=="function"?Y(qe):Y;if(et){var tt=typeof et=="object"?et:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(tt)}):qe.focus(tt)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&tB.useMedium(ct)},[]),X=nB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Yz]=g&&"disabled",r[SC]=P,r),$),Se=m!==!0,He=Se&&m!=="tail",Ue=Zz([n,me]);return ee(Kn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:HS},"guard-nearest"):null],!g&&x(W,{id:se,sideCar:Ape,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:V,returnFocus:q,focusOptions:de}),x(D,{ref:Ue,...ye,className:E,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const rB=N7;function wC(e,t){return wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wC(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wC(e,t)}function iB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mpe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return iB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ol=function(e){for(var t=Array(e.length),n=0;n=0}).sort($pe)},Hpe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Hpe.join(","),Wpe="".concat(B7,", [data-focus-guard]"),hB=function(e,t){var n;return Ol(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Wpe:B7)?[i]:[],hB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(hB(r,t),r.parentNode?Ol(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Vpe=function(e){var t=e.querySelectorAll("[".concat(_pe,"]"));return Ol(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ol(e).filter(function(n){return sB(t,n)}).filter(function(n){return zpe(n)})},FL=function(e,t){return t===void 0&&(t=new Map),Ol(e).filter(function(n){return lB(t,n)})},_C=function(e,t,n){return fB($7(F7(e,n),t),!0,n)},$L=function(e,t){return fB($7(F7(e),t),!1)},Upe=function(e,t){return $7(Vpe(e),t)},dv=function(e,t){return e.shadowRoot?dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ol(e.children).some(function(n){return dv(n,t)})},jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},pB=function(e){return e.parentNode?pB(e.parentNode):e},H7=function(e){var t=CC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(SC);return n.push.apply(n,i?jpe(Ol(pB(r).querySelectorAll("[".concat(SC,'="').concat(i,'"]:not([').concat(Yz,'="disabled"])')))):[r]),n},[])},gB=function(e){return e.activeElement?e.activeElement.shadowRoot?gB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?gB(document.activeElement.shadowRoot):document.activeElement:void 0},Gpe=function(e){return e===document.activeElement},qpe=function(e){return Boolean(Ol(e.querySelectorAll("iframe")).some(function(t){return Gpe(t)}))},mB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return dv(n,t)||qpe(n)})},Kpe=function(){var e=document&&W7();return e?Ol(document.querySelectorAll("[".concat(Cpe,"]"))).some(function(t){return dv(t,e)}):!1},Ype=function(e,t){return t.filter(dB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return dB(e)&&e.name?Ype(e,t):e},Zpe=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HL=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WL=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},vB="NEW_FOCUS",Xpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Zpe(t),w=n!==void 0?b.indexOf(n):-1,P=w-(r?b.indexOf(r):l),E=WL(e,0),k=WL(e,i-1);if(l===-1||h===-1)return vB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(P)>1)return h;if(l<=m)return k;if(l>v)return E;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},Qpe=function(e){return function(t){var n,r=(n=uB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Jpe=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FL(r.filter(Qpe(n)));return i&&i.length?HL(i):HL(FL(t))},kC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&kC(e.parentNode.host||e.parentNode,t),t},WS=function(e,t){for(var n=kC(e),r=kC(t),i=0;i=0)return o}return!1},yB=function(e,t,n){var r=CC(e),i=CC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=WS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=WS(o,l);u&&(!a||dv(u,a)?a=u:a=WS(u,a))})}),a},e0e=function(e,t){return e.reduce(function(n,r){return n.concat(Upe(r,t))},[])},t0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Fpe)},n0e=function(e,t){var n=document&&W7(),r=H7(e).filter(N4),i=yB(n||e,e,r),o=new Map,a=$L(r,o),s=_C(r,o).filter(function(m){var v=m.node;return N4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$L([i],o).map(function(m){var v=m.node;return v}),u=t0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=Xpe(h,l,n,t);return g===vB?{node:Jpe(a,h,e0e(r,o))}:g===void 0?g:u[g]}},r0e=function(e){var t=H7(e).filter(N4),n=yB(e,e,t),r=new Map,i=_C([n],r,!0),o=_C(t,r).filter(function(a){var s=a.node;return N4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},i0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},VS=0,US=!1,o0e=function(e,t,n){n===void 0&&(n={});var r=n0e(e,t);if(!US&&r){if(VS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),US=!0,setTimeout(function(){US=!1},1);return}VS++,i0e(r.node,n.focusOptions),VS--}};const bB=o0e;function xB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var a0e=function(){return document&&document.activeElement===document.body},s0e=function(){return a0e()||Kpe()},u0=null,Up=null,c0=null,fv=!1,l0e=function(){return!0},u0e=function(t){return(u0.whiteList||l0e)(t)},c0e=function(t,n){c0={observerNode:t,portaledElement:n}},d0e=function(t){return c0&&c0.portaledElement===t};function VL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var f0e=function(t){return t&&"current"in t?t.current:t},h0e=function(t){return t?Boolean(fv):fv==="meanwhile"},p0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},g0e=function(t,n){return n.some(function(r){return p0e(t,r,r)})},D4=function(){var t=!1;if(u0){var n=u0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||c0&&c0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(f0e).filter(Boolean));if((!h||u0e(h))&&(i||h0e(s)||!s0e()||!Up&&o)&&(u&&!(mB(g)||h&&g0e(h,g)||d0e(h))&&(document&&!Up&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=bB(g,Up,{focusOptions:l}),c0={})),fv=!1,Up=document&&document.activeElement),document){var m=document&&document.activeElement,v=r0e(g),b=v.map(function(w){var P=w.node;return P}).indexOf(m);b>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),VL(b,v.length,1,v),VL(b,-1,-1,v))}}}return t},SB=function(t){D4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return xB(D4)},m0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||c0e(r,n)},v0e=function(){return null},wB=function(){fv="just",setTimeout(function(){fv="meanwhile"},0)},y0e=function(){document.addEventListener("focusin",SB),document.addEventListener("focusout",U7),window.addEventListener("blur",wB)},b0e=function(){document.removeEventListener("focusin",SB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",wB)};function x0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function S0e(e){var t=e.slice(-1)[0];t&&!u0&&y0e();var n=u0,r=n&&t&&t.id===n.id;u0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Up=null,(!r||n.observed!==t.observed)&&t.onActivation(),D4(),xB(D4)):(b0e(),Up=null)}tB.assignSyncMedium(m0e);nB.assignMedium(U7);Lpe.assignMedium(function(e){return e({moveFocusInside:bB,focusInside:mB})});const w0e=Mpe(x0e,S0e)(v0e);var CB=C.exports.forwardRef(function(t,n){return x(rB,{sideCar:w0e,ref:n,...t})}),_B=rB.propTypes||{};_B.sideCar;O7(_B,["sideCar"]);CB.propTypes={};const C0e=CB;var kB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Iz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(C0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};kB.displayName="FocusLock";var _3="right-scroll-bar-position",k3="width-before-scroll-bar",_0e="with-scroll-bars-hidden",k0e="--removed-body-scroll-bar-size",EB=Jz(),jS=function(){},fb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:jS,onWheelCapture:jS,onTouchMoveCapture:jS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,k=WD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,I=Zz([n,t]),O=pl(pl({},k),i);return ee(Kn,{children:[h&&x(T,{sideCar:EB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},O),{ref:I})):x(E,{...pl({},O,{className:l,ref:I}),children:s})]})});fb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fb.classNames={fullWidth:k3,zeroRight:_3};var E0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function P0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E0e();return t&&e.setAttribute("nonce",t),e}function T0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function L0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=P0e())&&(T0e(t,n),L0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I0e=function(){var e=A0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},PB=function(){var e=I0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},M0e={left:0,top:0,right:0,gap:0},GS=function(e){return parseInt(e||"",10)||0},O0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[GS(n),GS(r),GS(i)]},R0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M0e;var t=O0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},N0e=PB(),D0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(_0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -407,7 +407,7 @@ Error generating stack: `+o.message+` `)},z0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return R0e(i)},[i]);return x(N0e,{styles:D0e(o,!t,i,n?"":"!important")})},EC=!1;if(typeof window<"u")try{var _y=Object.defineProperty({},"passive",{get:function(){return EC=!0,!0}});window.addEventListener("test",_y,_y),window.removeEventListener("test",_y,_y)}catch{EC=!1}var xp=EC?{passive:!1}:!1,B0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B0e(e)&&n[t]==="visible")},F0e=function(e){return TB(e,"overflowY")},$0e=function(e){return TB(e,"overflowX")},UL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=LB(e,n);if(r){var i=AB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},H0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},W0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},LB=function(e,t){return e==="v"?F0e(t):$0e(t)},AB=function(e,t){return e==="v"?H0e(t):W0e(t)},V0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},U0e=function(e,t,n,r,i){var o=V0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=AB(e,s),b=v[0],w=v[1],P=v[2],E=w-P-o*b;(b||E)&&LB(e,s)&&(g+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},ky=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jL=function(e){return[e.deltaX,e.deltaY]},GL=function(e){return e&&"current"in e?e.current:e},j0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},G0e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},q0e=0,Sp=[];function K0e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(q0e++)[0],o=C.exports.useState(function(){return PB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=cC([e.lockRef.current],(e.shards||[]).map(GL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=ky(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-E[0],I="deltaY"in w?w.deltaY:k[1]-E[1],O,N=w.target,D=Math.abs(T)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&N.type==="range")return!1;var z=UL(D,N);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UL(D,N)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||I)&&(r.current=O),!O)return!0;var $=r.current||O;return U0e($,P,w,$==="h"?T:I,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!Sp.length||Sp[Sp.length-1]!==o)){var E="deltaY"in P?jL(P):ky(P),k=t.current.filter(function(O){return O.name===P.type&&O.target===P.target&&j0e(O.delta,E)})[0];if(k&&k.should){P.cancelable&&P.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(GL).filter(Boolean).filter(function(O){return O.contains(P.target)}),I=T.length>0?s(P,T[0]):!a.current.noIsolation;I&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,k){var T={name:w,delta:P,target:E,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(I){return I!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=ky(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,ky(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Sp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,xp),document.addEventListener("touchmove",l,xp),document.addEventListener("touchstart",h,xp),function(){Sp=Sp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,xp),document.removeEventListener("touchmove",l,xp),document.removeEventListener("touchstart",h,xp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Kn,{children:[b?x(o,{styles:G0e(i)}):null,v?x(z0e,{gapMode:"margin"}):null]})}const Y0e=Tpe(EB,K0e);var IB=C.exports.forwardRef(function(e,t){return x(fb,{...hl({},e,{ref:t,sideCar:Y0e})})});IB.classNames=fb.classNames;const MB=IB;var ah=(...e)=>e.filter(Boolean).join(" ");function Ug(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var Z0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},PC=new Z0e;function X0e(e,t){C.exports.useEffect(()=>(t&&PC.add(e),()=>{PC.remove(e)}),[t,e])}function Q0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=e1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");J0e(u,t&&a),X0e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[T,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:Ug(z.onClick,W=>W.stopPropagation())}),[v,T,g,m,E]),N=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!PC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Ug(z.onClick,N),onKeyDown:Ug(z.onKeyDown,P),onMouseDown:Ug(z.onMouseDown,w)}),[P,w,N]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function J0e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Gz(e.current)},[t,e,n])}function e1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[t1e,sh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[n1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),P={...Q0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(n1e,{value:P,children:x(t1e,{value:b,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(oh,{...t,children:n})})})})};N0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};N0.displayName="Modal";var z4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__body",n),s=sh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});z4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=ah("chakra-modal__close-btn",r),s=sh();return x(ub,{ref:t,__css:s.closeButton,className:a,onClick:Ug(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function OB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(kB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(MB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var r1e={slideInBottom:{...fC,custom:{offsetY:16,reverse:!0}},slideInRight:{...fC,custom:{offsetX:16,reverse:!0}},scale:{...jD,custom:{initialScale:.95,reverse:!0}},none:{}},i1e=we(Il.section),o1e=e=>r1e[e||"none"],RB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=o1e(n),...i}=e;return x(i1e,{ref:t,...r,...i})});RB.displayName="ModalTransition";var hv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=ah("chakra-modal__content",n),m=sh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(OB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(RB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});hv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=ah("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...sh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__header",n),l={flex:0,...sh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var a1e=we(Il.div),pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ah("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...sh().overlay},{motionPreset:u}=ad();return x(a1e,{...i||(u==="none"?{}:UD),__css:l,ref:t,className:a,...o})});pv.displayName="ModalOverlay";function s1e(e){const{leastDestructiveRef:t,...n}=e;return x(N0,{...n,initialFocusRef:t})}var l1e=Pe((e,t)=>x(hv,{ref:t,role:"alertdialog",...e})),[Kke,u1e]=Cn(),c1e=we(GD),d1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=ah("chakra-modal__content",n),v=sh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=u1e();return le.createElement(OB,null,le.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(c1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:b,children:r})))});d1e.displayName="DrawerContent";function f1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var NB=(...e)=>e.filter(Boolean).join(" "),qS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var h1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),p1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function qL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var g1e=50,KL=300;function m1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);f1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?g1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KL)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var v1e=/^[Ee0-9+\-.]$/;function y1e(e){return v1e.test(e)}function b1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function x1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:P,name:E,"aria-describedby":k,"aria-label":T,"aria-labelledby":I,onFocus:O,onBlur:N,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:W,parse:Y,...de}=e,j=dr(O),te=dr(N),re=dr(D),se=dr($??y1e),G=dr(z),V=zde(e),{update:q,increment:Q,decrement:X}=V,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),et=C.exports.useCallback(Ee=>Ee.split("").filter(se).join(""),[se]),tt=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),at=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);id(()=>{(V.valueAsNumber>o||V.valueAsNumber{if(!He.current)return;if(He.current.value!=V.value){const It=tt(He.current.value);V.setValue(et(It))}},[tt,et]);const At=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Ae=m1e(At,wt);qL(ct,"disabled",Ae.stop,Ae.isSpinning),qL(qe,"disabled",Ae.stop,Ae.isSpinning);const dt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=tt(Ee.currentTarget.value);q(et(Ne)),Ue.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,et,tt]),Mt=C.exports.useCallback(Ee=>{var It;j?.(Ee),Ue.current&&(Ee.target.selectionStart=Ue.current.start??((It=Ee.currentTarget.value)==null?void 0:It.length),Ee.currentTarget.selectionEnd=Ue.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;b1e(Ee,se)||Ee.preventDefault();const It=xt(Ee)*a,Ne=Ee.key,ln={ArrowUp:()=>At(It),ArrowDown:()=>wt(It),Home:()=>q(i),End:()=>q(o)}[Ne];ln&&(Ee.preventDefault(),ln(Ee))},[se,a,At,wt,q,i,o]),xt=Ee=>{let It=1;return(Ee.metaKey||Ee.ctrlKey)&&(It=.1),Ee.shiftKey&&(It=10),It},kn=C.exports.useMemo(()=>{const Ee=G?.(V.value);if(Ee!=null)return Ee;const It=V.value.toString();return It||void 0},[V.value,G]),Et=C.exports.useCallback(()=>{let Ee=V.value;if(V.value==="")return;/^[eE]/.test(V.value.toString())?V.setValue(""):(V.valueAsNumbero&&(Ee=o),V.cast(Ee))},[V,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),En()},[En,Ae]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),En()},[En,Ae]);$f(()=>He.current,"wheel",Ee=>{var It;const st=(((It=He.current)==null?void 0:It.ownerDocument)??document).activeElement===He.current;if(!v||!st)return;Ee.preventDefault();const ln=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?At(ln):Dn===1&&wt(ln)},{passive:!1});const Je=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMax;return{...Ee,ref:$n(It,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||yn(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMax,r,yn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMin;return{...Ee,ref:$n(It,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||Me(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMin,r,Me,Ae.stop,l]),Gt=C.exports.useCallback((Ee={},It=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":T,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,It),value:at(V.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(V.valueAsNumber)?void 0:V.valueAsNumber,"aria-invalid":qS(h??V.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,dt),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[E,m,g,I,T,at,k,b,l,u,s,h,V.value,V.valueAsNumber,V.isOutOfRange,i,o,kn,dt,ut,Mt,te,Zt]);return{value:at(V.value),valueAsNumber:V.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Gt,htmlProps:de}}var[S1e,hb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[w1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=vn(t),o=m7(i),{htmlProps:a,...s}=x1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(w1e,{value:l},le.createElement(S1e,{value:r},le.createElement(we.div,{...a,ref:n,className:NB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var DB=Pe(function(t,n){const r=hb();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});DB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=hb();return le.createElement(we.input,{...i,className:NB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var zB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=hb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(zB,{...o,__css:r.stepper,children:t.children??x(h1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=hb();return x(zB,{...i,__css:o.stepper,children:t.children??x(p1e,{})})});Q7.displayName="NumberIncrementStepper";var $v=(...e)=>e.filter(Boolean).join(" ");function C1e(e,...t){return _1e(e)?e(...t):e}var _1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function k1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[E1e,lh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[P1e,Hv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wp={click:"click",hover:"hover"};function T1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=wp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:P,onClose:E,onOpen:k,onToggle:T}=Wz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[re,se,G,V]=["popover-trigger","popover-content","popover-header","popover-body"].map(dt=>`${dt}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Hz({...w,enabled:P||!!b}),Se=upe({isOpen:P,ref:N});Gde({enabled:P,ref:O}),Ffe(N,{focusRef:O,visible:P,shouldFocus:o&&u===wp.click}),Hfe(N,{focusRef:r,visible:P,shouldFocus:a&&u===wp.click});const He=Vz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),Ue=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,style:{...dt.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(N,Mt),children:He?dt.children:null,id:se,tabIndex:-1,role:"dialog",onKeyDown:il(dt.onKeyDown,xt=>{n&&xt.key==="Escape"&&E()}),onBlur:il(dt.onBlur,xt=>{const kn=YL(xt),Et=KS(N.current,kn),Zt=KS(O.current,kn);P&&t&&(!Et&&!Zt)&&E()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?V:void 0};return u===wp.hover&&(ut.role="tooltip",ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(dt.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),g))})),ut},[He,se,$,G,Y,V,u,n,E,P,t,g,l,s]),ct=C.exports.useCallback((dt={},Mt=null)=>X({...dt,style:{visibility:P?"visible":"hidden",...dt.style}},Mt),[P,X]),qe=C.exports.useCallback((dt,Mt=null)=>({...dt,ref:$n(Mt,I,q)}),[I,q]),et=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(dt=>{I.current==null&&q(dt)},[q]),At=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,ref:$n(O,Mt,at),id:re,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":se};return u===wp.click&&(ut.onClick=il(dt.onClick,T)),u===wp.hover&&(ut.onFocus=il(dt.onFocus,()=>{et.current===void 0&&k()}),ut.onBlur=il(dt.onBlur,xt=>{const kn=YL(xt),Et=!KS(N.current,kn);P&&t&&Et&&E()}),ut.onKeyDown=il(dt.onKeyDown,xt=>{xt.key==="Escape"&&E()}),ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0,et.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(dt.onMouseLeave,()=>{D.current=!1,et.current&&(clearTimeout(et.current),et.current=void 0),tt.current=window.setTimeout(()=>{D.current===!1&&E()},g)})),ut},[re,P,se,u,at,T,k,t,E,h,g]);C.exports.useEffect(()=>()=>{et.current&&clearTimeout(et.current),tt.current&&clearTimeout(tt.current)},[]);const wt=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:G,ref:$n(Mt,ut=>{W(!!ut)})}),[G]),Ae=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:V,ref:$n(Mt,ut=>{de(!!ut)})}),[V]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:Ue,getTriggerProps:At,getHeaderProps:wt,getBodyProps:Ae}}function KS(e,t){return e===t||e?.contains(t)}function YL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=vn(e),i=U0(),o=T1e({...r,direction:i.direction});return x(E1e,{value:o,children:x(P1e,{value:t,children:C1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=lh(),a=Hv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:$v("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var L1e=Pe(function(t,n){const{getBodyProps:r}=lh(),i=Hv();return le.createElement(we.div,{...r(t,n),className:$v("chakra-popover__body",t.className),__css:i.body})});L1e.displayName="PopoverBody";var A1e=Pe(function(t,n){const{onClose:r}=lh(),i=Hv();return x(ub,{size:"sm",onClick:r,className:$v("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});A1e.displayName="PopoverCloseButton";function I1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var M1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},O1e=we(Il.section),BB=Pe(function(t,n){const{variants:r=M1e,...i}=t,{isOpen:o}=lh();return le.createElement(O1e,{ref:n,variants:I1e(r),initial:!1,animate:o?"enter":"exit",...i})});BB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=lh(),u=Hv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(BB,{...i,...a(o,n),onAnimationComplete:k1e(l,o.onAnimationComplete),className:$v("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var R1e=Pe(function(t,n){const{getHeaderProps:r}=lh(),i=Hv();return le.createElement(we.header,{...r(t,n),className:$v("chakra-popover__header",t.className),__css:i.header})});R1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=lh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function N1e(e,t,n){return(e-t)*100/(n-t)}var D1e=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),z1e=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),B1e=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),F1e=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function FB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=N1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var $B=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${z1e} 2s linear infinite`:void 0},...r})};$B.displayName="Shape";var TC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});TC.displayName="Circle";var $1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=FB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,k=v?{css:{animation:`${D1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee($B,{size:n,isIndeterminate:v,children:[x(TC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(TC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});$1e.displayName="CircularProgress";var[H1e,W1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),V1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=FB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...W1e().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),HB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),P=Ri("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),k={animation:`${F1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${B1e} 1s ease infinite normal none running`}},N={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:N,...w},ee(H1e,{value:P,children:[x(V1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:E,title:v,role:b}),l]}))});HB.displayName="Progress";var U1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});U1e.displayName="CircularProgressLabel";var j1e=(...e)=>e.filter(Boolean).join(" "),G1e=e=>e?"":void 0;function q1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var WB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:j1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});WB.displayName="SelectField";var VB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,P]=q1e(b,bX),E=g7(P),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(WB,{ref:t,height:u??l,minH:h??g,placeholder:o,...E,__css:T,children:e.children}),x(UB,{"data-disabled":G1e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});VB.displayName="Select";var K1e=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Y1e=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),UB=e=>{const{children:t=x(K1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Y1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};UB.displayName="SelectIcon";function Z1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function X1e(e){const t=J1e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function jB(e){return!!e.touches}function Q1e(e){return jB(e)&&e.touches.length>1}function J1e(e){return e.view??window}function ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function tge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function GB(e,t="page"){return jB(e)?ege(e,t):tge(e,t)}function nge(e){return t=>{const n=X1e(t);(!n||n&&t.button===0)&&e(t)}}function rge(e,t=!1){function n(i){e(i,{point:GB(i)})}return t?nge(n):n}function E3(e,t,n,r){return Z1e(e,t,rge(n,t==="pointerdown"),r)}function qB(e){const t=C.exports.useRef(null);return t.current=e,t}var ige=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Q1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:GB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,YS(r,this.history)),this.removeListeners=sge(E3(this.win,"pointermove",this.onPointerMove),E3(this.win,"pointerup",this.onPointerUp),E3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=YS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=lge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=YS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),MQ.update(this.updatePoint)}};function ZL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function YS(e,t){return{point:e.point,delta:ZL(e.point,t[t.length-1]),offset:ZL(e.point,t[0]),velocity:age(t,.1)}}var oge=e=>e*1e3;function age(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function sge(...e){return t=>e.reduce((n,r)=>r(n),t)}function ZS(e,t){return Math.abs(e-t)}function XL(e){return"x"in e&&"y"in e}function lge(e,t){if(typeof e=="number"&&typeof t=="number")return ZS(e,t);if(XL(e)&&XL(t)){const n=ZS(e.x,t.x),r=ZS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function KB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=qB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new ige(v,h.current,s)}return E3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function uge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var cge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function dge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function YB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return cge(()=>{const a=e(),s=a.map((l,u)=>uge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(dge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function fge(e){return typeof e=="object"&&e!==null&&"current"in e}function hge(e){const[t]=YB({observeMutation:!1,getNodes(){return[fge(e)?e.current:e]}});return t}var pge=Object.getOwnPropertyNames,gge=(e,t)=>function(){return e&&(t=(0,e[pge(e)[0]])(e=0)),t},yd=gge({"../../../react-shim.js"(){}});yd();yd();yd();var Aa=e=>e?"":void 0,d0=e=>e?!0:void 0,bd=(...e)=>e.filter(Boolean).join(" ");yd();function f0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function mge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function jg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P3={width:0,height:0},Ey=e=>e||P3;function ZB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??P3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...jg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>Ey(w).height>Ey(P).height?w:P,P3):r.reduce((w,P)=>Ey(w).width>Ey(P).width?w:P,P3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...jg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...jg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...jg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function XB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...N}=e,D=dr(m),z=dr(v),$=dr(w),W=XB({isReversed:a,direction:s,orientation:l}),[Y,de]=U5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[re,se]=C.exports.useState(!1),[G,V]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map($e=>l0($e,t,n)),me=O*b,ye=yge(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map($e=>n-$e+t),ct=(W?He:X).map($e=>M4($e,t,n)),qe=l==="vertical",et=C.exports.useRef(null),tt=C.exports.useRef(null),at=YB({getNodes(){const $e=tt.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),At=C.exports.useId(),Ae=mge(u??At),dt=C.exports.useCallback($e=>{var pt;if(!et.current)return;Se.current.eventSource="pointer";const rt=et.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?rt.bottom-Qt:Nt-rt.left,lo=qe?rt.height:rt.width;let pi=Qn/lo;return W&&(pi=1-pi),nz(pi,t,n)},[qe,W,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!q)return;const rt=Se.current.valueBounds[$e];pt=parseFloat(vC(pt,rt.min,ut)),pt=l0(pt,rt.min,rt.max);const Nt=[...Se.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:V,stepUp($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt-pt:rt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt+pt:rt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(Q.current)}}),[ut,W,de,q]),kn=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>ZB({isReversed:W,orientation:l,thumbRects:at,thumbPercents:ct}),[W,l,ct,at]),Me=C.exports.useCallback($e=>{var pt;const rt=$e??G;if(rt!==-1&&I){const Nt=Ae.getThumb(rt),Qt=(pt=tt.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Ae]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=$e=>{const pt=dt($e)||0,rt=Se.current.value.map(pi=>Math.abs(pi-pt)),Nt=Math.min(...rt);let Qt=rt.indexOf(Nt);const Qn=rt.filter(pi=>pi===Nt);Qn.length>1&&pt>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),V(Qt),xt.setValueAtIndex(Qt,pt),Me(Qt)},Xt=$e=>{if(G==-1)return;const pt=dt($e)||0;V(G),xt.setValueAtIndex(G,pt),Me(G)};KB(tt,{onPanSessionStart($e){!q||(te(!0),Je($e),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan($e){!q||Xt($e)}});const Gt=C.exports.useCallback(($e={},pt=null)=>({...$e,...N,id:Ae.root,ref:$n(pt,tt),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Aa(re),style:{...$e.style,...Zt}}),[N,h,re,Zt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,et),id:Ae.track,"data-disabled":Aa(h),style:{...$e.style,...En}}),[h,En,Ae]),It=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...yn}}),[yn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e,Qt=X[rt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[rt];return{...Nt,ref:pt,role:"slider",tabIndex:q?0:void 0,id:Ae.getThumb(rt),"data-active":Aa(j&&G===rt),"aria-valuetext":$?.(Qt)??P?.[rt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E?.[rt],"aria-labelledby":E?.[rt]?void 0:k?.[rt],style:{...$e.style,...Et(rt)},onKeyDown:f0($e.onKeyDown,kn),onFocus:f0($e.onFocus,()=>{se(!0),V(rt)}),onBlur:f0($e.onBlur,()=>{se(!1),V(-1)})}},[Ae,X,ye,q,j,G,$,P,l,h,g,E,k,Et,kn,se]),st=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:X.map((rt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,X]),ln=C.exports.useCallback(($e,pt=null)=>{const{value:rt,...Nt}=$e,Qt=!(rtn),Qn=rt>=X[0]&&rt<=X[X.length-1];let lo=M4(rt,t,n);lo=W?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...jg({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":Aa(h),"data-invalid":Aa(!Qt),"data-highlighted":Aa(Qn),style:{...$e.style,...pi}}},[h,W,n,t,l,X,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(rt),type:"hidden",value:X[rt],name:Array.isArray(T)?T[rt]:`${T}-${rt}`}},[T,X,Ae]);return{state:{value:X,isFocused:re,isDragging:j,getThumbPercent:$e=>ct[$e],getThumbMinValue:$e=>ye[$e].min,getThumbMaxValue:$e=>ye[$e].max},actions:xt,getRootProps:Gt,getTrackProps:Ee,getInnerTrackProps:It,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Dn,getOutputProps:st}}function yge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[bge,pb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[xge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),QB=Pe(function(t,n){const r=Ri("Slider",t),i=vn(t),{direction:o}=U0();i.direction=o;const{getRootProps:a,...s}=vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(bge,{value:l},le.createElement(xge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});QB.defaultProps={orientation:"horizontal"};QB.displayName="RangeSlider";var Sge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=pb(),a=r_(),s=r(t,n);return le.createElement(we.div,{...s,className:bd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Sge.displayName="RangeSliderThumb";var wge=Pe(function(t,n){const{getTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:bd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});wge.displayName="RangeSliderTrack";var Cge=Pe(function(t,n){const{getInnerTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Cge.displayName="RangeSliderFilledTrack";var _ge=Pe(function(t,n){const{getMarkerProps:r}=pb(),i=r(t,n);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",t.className)})});_ge.displayName="RangeSliderMark";yd();yd();function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,...O}=e,N=dr(m),D=dr(v),z=dr(w),$=XB({isReversed:a,direction:s,orientation:l}),[W,Y]=U5({value:i,defaultValue:o??Pge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),se=!(h||g),G=(n-t)/10,V=b||(n-t)/100,q=l0(W,t,n),Q=n-q+t,me=M4($?Q:q,t,n),ye=l==="vertical",Se=qB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:se,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),et=u??qe,[tt,at]=[`slider-thumb-${et}`,`slider-track-${et}`],At=C.exports.useCallback(Ne=>{var st;if(!He.current)return;const ln=Se.current;ln.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((st=Ne.touches)==null?void 0:st[0])??Ne,rt=ye?Dn.bottom-pt:$e-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=rt/Nt;$&&(Qt=1-Qt);let Qn=nz(Qt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(vC(Qn,ln.min,ln.step))),Qn=l0(Qn,ln.min,ln.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const st=Se.current;!st.isInteractive||(Ne=parseFloat(vC(Ne,st.min,V)),Ne=l0(Ne,st.min,st.max),Y(Ne))},[V,Y,Se]),Ae=C.exports.useMemo(()=>({stepUp(Ne=V){const st=$?q-Ne:q+Ne;wt(st)},stepDown(Ne=V){const st=$?q+Ne:q-Ne;wt(st)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,V,o]),dt=C.exports.useCallback(Ne=>{const st=Se.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(G),PageDown:()=>Ae.stepDown(G),Home:()=>wt(st.min),End:()=>wt(st.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),st.eventSource="keyboard")},[Ae,wt,G,Se]),Mt=z?.(q)??P,ut=hge(Ue),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,st=ut??{width:0,height:0};return ZB({isReversed:$,orientation:Ne.orientation,thumbRects:[st],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var st;return(st=Ue.current)==null?void 0:st.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const st=At(Ne);st!=null&&st!==Se.current.value&&Y(st)}KB(ct,{onPanSessionStart(Ne){const st=Se.current;!st.isInteractive||(j(!0),En(),yn(Ne),N?.(st.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},st=null)=>({...Ne,...O,ref:$n(st,ct),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Aa(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),Je=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,He),id:at,"data-disabled":Aa(h),style:{...Ne.style,...Et}}),[h,at,Et]),Xt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,style:{...Ne.style,...Zt}}),[Zt]),Gt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,Ue),role:"slider",tabIndex:se?0:void 0,id:tt,"data-active":Aa(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:f0(Ne.onKeyDown,dt),onFocus:f0(Ne.onFocus,()=>re(!0)),onBlur:f0(Ne.onBlur,()=>re(!1))}),[se,tt,de,Mt,t,n,q,l,h,g,E,k,xt,dt]),Ee=C.exports.useCallback((Ne,st=null)=>{const ln=!(Ne.valuen),Dn=q>=Ne.value,$e=M4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Ege({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:st,role:"presentation","aria-hidden":!0,"data-disabled":Aa(h),"data-invalid":Aa(!ln),"data-highlighted":Aa(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,q]),It=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,type:"hidden",value:q,name:T}),[T,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Ae,getRootProps:Me,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Gt,getMarkerProps:Ee,getInputProps:It}}function Ege(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Pge(e,t){return t"}),[Lge,mb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=vn(e),{direction:i}=U0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=kge(r),l=a(),u=o({},t);return le.createElement(Tge,{value:s},le.createElement(Lge,{value:n},le.createElement(we.div,{...l,className:bd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var JB=Pe((e,t)=>{const{getThumbProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__thumb",e.className),__css:r.thumb})});JB.displayName="SliderThumb";var eF=Pe((e,t)=>{const{getTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__track",e.className),__css:r.track})});eF.displayName="SliderTrack";var tF=Pe((e,t)=>{const{getInnerTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});tF.displayName="SliderFilledTrack";var LC=Pe((e,t)=>{const{getMarkerProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",e.className),__css:r.mark})});LC.displayName="SliderMark";var Age=(...e)=>e.filter(Boolean).join(" "),QL=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:Age("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QL(s.isChecked),"data-hover":QL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var Z0=(...e)=>e.filter(Boolean).join(" ");function AC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ige,nF,Mge,Oge]=hN();function Rge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=U5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Mge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Nge,Wv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Dge(e){const{focusedIndex:t,orientation:n,direction:r}=Wv(),i=nF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:AC(e.onKeyDown,o)}}function zge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Wv(),{index:u,register:h}=Oge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Tfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:AC(e.onClick,m)}),w="button";return{...b,id:rF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":iF(a,u),onFocus:t?void 0:AC(e.onFocus,v)}}var[Bge,Fge]=Cn({});function $ge(e){const t=Wv(),{id:n,selectedIndex:r}=t,o=ab(e.children).map((a,s)=>C.exports.createElement(Bge,{key:s,value:{isSelected:s===r,id:iF(n,s),tabId:rF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Hge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Wv(),{isSelected:o,id:a,tabId:s}=Fge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Vz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Wge(){const e=Wv(),t=nF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function rF(e,t){return`${e}--tab-${t}`}function iF(e,t){return`${e}--tabpanel-${t}`}var[Vge,Vv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),oF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Rge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return le.createElement(Ige,{value:l},le.createElement(Nge,{value:h},le.createElement(Vge,{value:r},le.createElement(we.div,{className:Z0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});oF.displayName="Tabs";var Uge=Pe(function(t,n){const r=Wge(),i={...t.style,...r},o=Vv();return le.createElement(we.div,{ref:n,...t,className:Z0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Uge.displayName="TabIndicator";var jge=Pe(function(t,n){const r=Dge({...t,ref:n}),o={display:"flex",...Vv().tablist};return le.createElement(we.div,{...r,className:Z0("chakra-tabs__tablist",t.className),__css:o})});jge.displayName="TabList";var aF=Pe(function(t,n){const r=Hge({...t,ref:n}),i=Vv();return le.createElement(we.div,{outline:"0",...r,className:Z0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});aF.displayName="TabPanel";var sF=Pe(function(t,n){const r=$ge(t),i=Vv();return le.createElement(we.div,{...r,width:"100%",ref:n,className:Z0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});sF.displayName="TabPanels";var lF=Pe(function(t,n){const r=Vv(),i=zge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:Z0("chakra-tabs__tab",t.className),__css:o})});lF.displayName="Tab";var Gge=(...e)=>e.filter(Boolean).join(" ");function qge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Kge=["h","minH","height","minHeight"],uF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=g7(o),s=i?qge(n,Kge):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Gge("chakra-textarea",r),__css:s})});uF.displayName="Textarea";function Yge(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return Zge(e)?e(...t):e}var Zge=e=>typeof e=="function";function Xge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Qge=(e,t)=>e.find(n=>n.id===t);function JL(e,t){const n=cF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function cF(e,t){for(const[n,r]of Object.entries(e))if(Qge(r,t))return n}function Jge(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var tme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=nme(tme);function nme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=rme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=JL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:dF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=cF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(JL(pl.getState(),i).position)}}var eA=0;function rme(e,t={}){eA+=1;const n=t.id??eA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ime=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(KD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(ZD,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(XD,{id:u?.title,children:i}),s&&x(YD,{id:u?.description,display:"block",children:s})),o&&x(ub,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function dF(e={}){const{render:t,toastComponent:n=ime}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function ome(e,t){const n=i=>({...t,...i,position:Xge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=dF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function xd(e){const{theme:t}=cN();return C.exports.useMemo(()=>ome(t.direction,e),[e,t.direction])}var ame={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},fF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=ame,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ale();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Yge(P,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>Jge(a),[a]);return le.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},IC(n,{id:t,onClose:P})))});fF.displayName="ToastComponent";var sme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=fF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:eme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Kn,{children:[n,x(oh,{...o,children:s})]})};function lme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ume(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var cme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Eg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},MC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function dme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:k,gutter:T,offset:I,direction:O,...N}=e,{isOpen:D,onOpen:z,onClose:$}=Wz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Hz({enabled:D,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:I,direction:O}),te=C.exports.useId(),se=`tooltip-${g??te}`,G=C.exports.useRef(null),V=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=fme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!V.current){X();const tt=MC(G);V.current=tt.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0);const tt=MC(G);q.current=tt.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),Ue=C.exports.useCallback(tt=>{D&&tt.key==="Escape"&&ye()},[D,ye]);$f(()=>B4(G),"keydown",s?Ue:void 0),$f(()=>B4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(V.current),clearTimeout(q.current)},[]),$f(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((tt={},at=null)=>({...tt,ref:$n(G,at,W),onPointerEnter:Eg(tt.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Eg(tt.onClick,Se),onPointerDown:Eg(tt.onPointerDown,He),onFocus:Eg(tt.onFocus,me),onBlur:Eg(tt.onBlur,ye),"aria-describedby":D?se:void 0}),[me,ye,He,D,se,Se,W]),qe=C.exports.useCallback((tt={},at=null)=>Y({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},at),[Y,b,w]),et=C.exports.useCallback((tt={},at=null)=>{const At={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...N,...tt,id:se,role:"tooltip",style:At}},[N,se]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:et,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var XS="chakra-ui:close-tooltip";function fme(e,t){return C.exports.useEffect(()=>{const n=B4(e);return n.addEventListener(XS,t),()=>n.removeEventListener(XS,t)},[t,e]),()=>{const n=B4(e),r=MC(e);n.dispatchEvent(new r.CustomEvent(XS))}}var hme=we(Il.div),Ui=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=U0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...P}=r,E=m??v??h??b;if(E){n.bg=E;const $=OX(i,"colors",E);n[Hr.arrowBg.var]=$}const k=dme({...P,direction:i.direction}),T=typeof o=="string"||s;let I;if(T)I=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,N=k.getTooltipProps({},t),D=O?lme(N,["role","id"]):N,z=ume(N,["role","id"]);return a?ee(Kn,{children:[I,x(pd,{children:k.isOpen&&le.createElement(oh,{...g},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(hme,{variants:cme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Kn,{children:o})});Ui.displayName="Tooltip";var pme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(_z,{environment:a,children:t});return x(boe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(Fde,{}):x(Bde,{}),x(Soe,{}),r?x(Uz,{zIndex:r,children:l}):l]})})};function gme({children:e,theme:t=coe,toastOptions:n,...r}){return ee(pme,{theme:t,...r,children:[e,x(sme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function h0(e,t){return X0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mme(e,t){return X0(e)===2?e.get(t):e[t]}function hF(e,t,n){var r=X0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function pF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return wme&&e instanceof Map}function s_(e){return Cme&&e instanceof Set}function xf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mF(e);delete t[nr];for(var n=p0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=vme),Object.freeze(e),t&&Xf(e,function(n,r){return u_(r,!0)},!0)),e}function vme(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=DC[e];return t||ms(18,e),t}function yme(e,t){DC[e]||(DC[e]=t)}function OC(){return gv}function QS(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function F4(e){RC(e),e.p.forEach(bme),e.p=null}function RC(e){e===gv&&(gv=e.l)}function tA(e){return gv={p:[],l:gv,h:e,m:!0,_:0}}function bme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function JS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(F4(t),ms(4)),xu(e)&&(e=$4(t,e),t.l||H4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=$4(t,n,[]),F4(t),t.u&&t.v(t.u,t.s),e!==gF?e:void 0}function $4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Xf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return H4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Xf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),H4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=$4(e,i,o&&t&&t.i!==3&&!h0(t.D,r)?o.concat(r):void 0);if(hF(n,r,a),!sd(a))return;e.m=!1}if(xu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;$4(e,i),t&&t.A.l||H4(e,i)}}function H4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function e6(e,t){var n=e[nr];return(n?xf(n):e)[t]}function rA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function t6(e){e.o||(e.o=l_(e.t))}function NC(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:OC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=mv;a&&(l=[s],u=Gg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:OC()).p.push(r),r}function xme(e){return sd(e)||ms(22,e),function t(n){if(!xu(n))return n;var r,i=n[nr],o=X0(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Xf(r,function(a,s){i&&mme(i.t,a)===s||hF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Sme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return mv.get(l,o)},set:function(l){var u=this[nr];mv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=p0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!h0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!pF(m,g))return!0}}var b=!!a[nr];return l.length!==p0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ca=new kme,vF=ca.produce;ca.produceWithPatches.bind(ca);ca.setAutoFreeze.bind(ca);ca.setUseProxies.bind(ca);ca.applyPatches.bind(ca);ca.createDraft.bind(ca);ca.finishDraft.bind(ca);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error(Hi(6));P=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Eme(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error(Hi(12));if(typeof n(void 0,{type:W4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function yF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function V4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return U4}function i(s,l){r(s)===U4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Ime=function(t,n){return t===n};function Mme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&N.type==="range")return!1;var z=UL(D,N);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UL(D,N)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||I)&&(r.current=O),!O)return!0;var $=r.current||O;return U0e($,P,w,$==="h"?T:I,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!Sp.length||Sp[Sp.length-1]!==o)){var E="deltaY"in P?jL(P):ky(P),k=t.current.filter(function(O){return O.name===P.type&&O.target===P.target&&j0e(O.delta,E)})[0];if(k&&k.should){P.cancelable&&P.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(GL).filter(Boolean).filter(function(O){return O.contains(P.target)}),I=T.length>0?s(P,T[0]):!a.current.noIsolation;I&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,k){var T={name:w,delta:P,target:E,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(I){return I!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=ky(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,ky(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Sp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,xp),document.addEventListener("touchmove",l,xp),document.addEventListener("touchstart",h,xp),function(){Sp=Sp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,xp),document.removeEventListener("touchmove",l,xp),document.removeEventListener("touchstart",h,xp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Kn,{children:[b?x(o,{styles:G0e(i)}):null,v?x(z0e,{gapMode:"margin"}):null]})}const Y0e=Tpe(EB,K0e);var IB=C.exports.forwardRef(function(e,t){return x(fb,{...pl({},e,{ref:t,sideCar:Y0e})})});IB.classNames=fb.classNames;const MB=IB;var ah=(...e)=>e.filter(Boolean).join(" ");function Ug(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var Z0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},PC=new Z0e;function X0e(e,t){C.exports.useEffect(()=>(t&&PC.add(e),()=>{PC.remove(e)}),[t,e])}function Q0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=e1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");J0e(u,t&&a),X0e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[T,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:Ug(z.onClick,W=>W.stopPropagation())}),[v,T,g,m,E]),N=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!PC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Ug(z.onClick,N),onKeyDown:Ug(z.onKeyDown,P),onMouseDown:Ug(z.onMouseDown,w)}),[P,w,N]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function J0e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Gz(e.current)},[t,e,n])}function e1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[t1e,sh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[n1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),P={...Q0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(n1e,{value:P,children:x(t1e,{value:b,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(oh,{...t,children:n})})})})};N0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};N0.displayName="Modal";var z4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__body",n),s=sh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});z4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=ah("chakra-modal__close-btn",r),s=sh();return x(ub,{ref:t,__css:s.closeButton,className:a,onClick:Ug(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function OB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(kB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(MB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var r1e={slideInBottom:{...fC,custom:{offsetY:16,reverse:!0}},slideInRight:{...fC,custom:{offsetX:16,reverse:!0}},scale:{...jD,custom:{initialScale:.95,reverse:!0}},none:{}},i1e=we(Ml.section),o1e=e=>r1e[e||"none"],RB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=o1e(n),...i}=e;return x(i1e,{ref:t,...r,...i})});RB.displayName="ModalTransition";var hv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=ah("chakra-modal__content",n),m=sh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(OB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(RB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});hv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=ah("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...sh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__header",n),l={flex:0,...sh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var a1e=we(Ml.div),pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ah("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...sh().overlay},{motionPreset:u}=ad();return x(a1e,{...i||(u==="none"?{}:UD),__css:l,ref:t,className:a,...o})});pv.displayName="ModalOverlay";function s1e(e){const{leastDestructiveRef:t,...n}=e;return x(N0,{...n,initialFocusRef:t})}var l1e=Pe((e,t)=>x(hv,{ref:t,role:"alertdialog",...e})),[Kke,u1e]=Cn(),c1e=we(GD),d1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=ah("chakra-modal__content",n),v=sh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=u1e();return le.createElement(OB,null,le.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(c1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:b,children:r})))});d1e.displayName="DrawerContent";function f1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var NB=(...e)=>e.filter(Boolean).join(" "),qS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var h1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),p1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function qL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var g1e=50,KL=300;function m1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);f1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?g1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KL)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var v1e=/^[Ee0-9+\-.]$/;function y1e(e){return v1e.test(e)}function b1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function x1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:P,name:E,"aria-describedby":k,"aria-label":T,"aria-labelledby":I,onFocus:O,onBlur:N,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:W,parse:Y,...de}=e,j=dr(O),te=dr(N),re=dr(D),se=dr($??y1e),G=dr(z),V=zde(e),{update:q,increment:Q,decrement:X}=V,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),et=C.exports.useCallback(Ee=>Ee.split("").filter(se).join(""),[se]),tt=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),at=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);id(()=>{(V.valueAsNumber>o||V.valueAsNumber{if(!He.current)return;if(He.current.value!=V.value){const It=tt(He.current.value);V.setValue(et(It))}},[tt,et]);const At=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Ae=m1e(At,wt);qL(ct,"disabled",Ae.stop,Ae.isSpinning),qL(qe,"disabled",Ae.stop,Ae.isSpinning);const dt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=tt(Ee.currentTarget.value);q(et(Ne)),Ue.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,et,tt]),Mt=C.exports.useCallback(Ee=>{var It;j?.(Ee),Ue.current&&(Ee.target.selectionStart=Ue.current.start??((It=Ee.currentTarget.value)==null?void 0:It.length),Ee.currentTarget.selectionEnd=Ue.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;b1e(Ee,se)||Ee.preventDefault();const It=xt(Ee)*a,Ne=Ee.key,ln={ArrowUp:()=>At(It),ArrowDown:()=>wt(It),Home:()=>q(i),End:()=>q(o)}[Ne];ln&&(Ee.preventDefault(),ln(Ee))},[se,a,At,wt,q,i,o]),xt=Ee=>{let It=1;return(Ee.metaKey||Ee.ctrlKey)&&(It=.1),Ee.shiftKey&&(It=10),It},kn=C.exports.useMemo(()=>{const Ee=G?.(V.value);if(Ee!=null)return Ee;const It=V.value.toString();return It||void 0},[V.value,G]),Et=C.exports.useCallback(()=>{let Ee=V.value;if(V.value==="")return;/^[eE]/.test(V.value.toString())?V.setValue(""):(V.valueAsNumbero&&(Ee=o),V.cast(Ee))},[V,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),En()},[En,Ae]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),En()},[En,Ae]);$f(()=>He.current,"wheel",Ee=>{var It;const st=(((It=He.current)==null?void 0:It.ownerDocument)??document).activeElement===He.current;if(!v||!st)return;Ee.preventDefault();const ln=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?At(ln):Dn===1&&wt(ln)},{passive:!1});const Je=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMax;return{...Ee,ref:$n(It,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||yn(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMax,r,yn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMin;return{...Ee,ref:$n(It,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||Me(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMin,r,Me,Ae.stop,l]),Gt=C.exports.useCallback((Ee={},It=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":T,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,It),value:at(V.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(V.valueAsNumber)?void 0:V.valueAsNumber,"aria-invalid":qS(h??V.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,dt),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[E,m,g,I,T,at,k,b,l,u,s,h,V.value,V.valueAsNumber,V.isOutOfRange,i,o,kn,dt,ut,Mt,te,Zt]);return{value:at(V.value),valueAsNumber:V.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Gt,htmlProps:de}}var[S1e,hb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[w1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=vn(t),o=m7(i),{htmlProps:a,...s}=x1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(w1e,{value:l},le.createElement(S1e,{value:r},le.createElement(we.div,{...a,ref:n,className:NB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var DB=Pe(function(t,n){const r=hb();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});DB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=hb();return le.createElement(we.input,{...i,className:NB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var zB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=hb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(zB,{...o,__css:r.stepper,children:t.children??x(h1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=hb();return x(zB,{...i,__css:o.stepper,children:t.children??x(p1e,{})})});Q7.displayName="NumberIncrementStepper";var $v=(...e)=>e.filter(Boolean).join(" ");function C1e(e,...t){return _1e(e)?e(...t):e}var _1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function k1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[E1e,lh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[P1e,Hv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wp={click:"click",hover:"hover"};function T1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=wp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:P,onClose:E,onOpen:k,onToggle:T}=Wz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[re,se,G,V]=["popover-trigger","popover-content","popover-header","popover-body"].map(dt=>`${dt}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Hz({...w,enabled:P||!!b}),Se=upe({isOpen:P,ref:N});Gde({enabled:P,ref:O}),Ffe(N,{focusRef:O,visible:P,shouldFocus:o&&u===wp.click}),Hfe(N,{focusRef:r,visible:P,shouldFocus:a&&u===wp.click});const He=Vz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),Ue=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,style:{...dt.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(N,Mt),children:He?dt.children:null,id:se,tabIndex:-1,role:"dialog",onKeyDown:il(dt.onKeyDown,xt=>{n&&xt.key==="Escape"&&E()}),onBlur:il(dt.onBlur,xt=>{const kn=YL(xt),Et=KS(N.current,kn),Zt=KS(O.current,kn);P&&t&&(!Et&&!Zt)&&E()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?V:void 0};return u===wp.hover&&(ut.role="tooltip",ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(dt.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),g))})),ut},[He,se,$,G,Y,V,u,n,E,P,t,g,l,s]),ct=C.exports.useCallback((dt={},Mt=null)=>X({...dt,style:{visibility:P?"visible":"hidden",...dt.style}},Mt),[P,X]),qe=C.exports.useCallback((dt,Mt=null)=>({...dt,ref:$n(Mt,I,q)}),[I,q]),et=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(dt=>{I.current==null&&q(dt)},[q]),At=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,ref:$n(O,Mt,at),id:re,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":se};return u===wp.click&&(ut.onClick=il(dt.onClick,T)),u===wp.hover&&(ut.onFocus=il(dt.onFocus,()=>{et.current===void 0&&k()}),ut.onBlur=il(dt.onBlur,xt=>{const kn=YL(xt),Et=!KS(N.current,kn);P&&t&&Et&&E()}),ut.onKeyDown=il(dt.onKeyDown,xt=>{xt.key==="Escape"&&E()}),ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0,et.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(dt.onMouseLeave,()=>{D.current=!1,et.current&&(clearTimeout(et.current),et.current=void 0),tt.current=window.setTimeout(()=>{D.current===!1&&E()},g)})),ut},[re,P,se,u,at,T,k,t,E,h,g]);C.exports.useEffect(()=>()=>{et.current&&clearTimeout(et.current),tt.current&&clearTimeout(tt.current)},[]);const wt=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:G,ref:$n(Mt,ut=>{W(!!ut)})}),[G]),Ae=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:V,ref:$n(Mt,ut=>{de(!!ut)})}),[V]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:Ue,getTriggerProps:At,getHeaderProps:wt,getBodyProps:Ae}}function KS(e,t){return e===t||e?.contains(t)}function YL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=vn(e),i=U0(),o=T1e({...r,direction:i.direction});return x(E1e,{value:o,children:x(P1e,{value:t,children:C1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=lh(),a=Hv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:$v("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var L1e=Pe(function(t,n){const{getBodyProps:r}=lh(),i=Hv();return le.createElement(we.div,{...r(t,n),className:$v("chakra-popover__body",t.className),__css:i.body})});L1e.displayName="PopoverBody";var A1e=Pe(function(t,n){const{onClose:r}=lh(),i=Hv();return x(ub,{size:"sm",onClick:r,className:$v("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});A1e.displayName="PopoverCloseButton";function I1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var M1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},O1e=we(Ml.section),BB=Pe(function(t,n){const{variants:r=M1e,...i}=t,{isOpen:o}=lh();return le.createElement(O1e,{ref:n,variants:I1e(r),initial:!1,animate:o?"enter":"exit",...i})});BB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=lh(),u=Hv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(BB,{...i,...a(o,n),onAnimationComplete:k1e(l,o.onAnimationComplete),className:$v("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var R1e=Pe(function(t,n){const{getHeaderProps:r}=lh(),i=Hv();return le.createElement(we.header,{...r(t,n),className:$v("chakra-popover__header",t.className),__css:i.header})});R1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=lh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function N1e(e,t,n){return(e-t)*100/(n-t)}var D1e=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),z1e=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),B1e=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),F1e=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function FB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=N1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var $B=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${z1e} 2s linear infinite`:void 0},...r})};$B.displayName="Shape";var TC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});TC.displayName="Circle";var $1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=FB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,k=v?{css:{animation:`${D1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee($B,{size:n,isIndeterminate:v,children:[x(TC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(TC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});$1e.displayName="CircularProgress";var[H1e,W1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),V1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=FB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...W1e().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),HB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),P=Ri("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),k={animation:`${F1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${B1e} 1s ease infinite normal none running`}},N={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:N,...w},ee(H1e,{value:P,children:[x(V1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:E,title:v,role:b}),l]}))});HB.displayName="Progress";var U1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});U1e.displayName="CircularProgressLabel";var j1e=(...e)=>e.filter(Boolean).join(" "),G1e=e=>e?"":void 0;function q1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var WB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:j1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});WB.displayName="SelectField";var VB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,P]=q1e(b,bX),E=g7(P),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(WB,{ref:t,height:u??l,minH:h??g,placeholder:o,...E,__css:T,children:e.children}),x(UB,{"data-disabled":G1e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});VB.displayName="Select";var K1e=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Y1e=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),UB=e=>{const{children:t=x(K1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Y1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};UB.displayName="SelectIcon";function Z1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function X1e(e){const t=J1e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function jB(e){return!!e.touches}function Q1e(e){return jB(e)&&e.touches.length>1}function J1e(e){return e.view??window}function ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function tge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function GB(e,t="page"){return jB(e)?ege(e,t):tge(e,t)}function nge(e){return t=>{const n=X1e(t);(!n||n&&t.button===0)&&e(t)}}function rge(e,t=!1){function n(i){e(i,{point:GB(i)})}return t?nge(n):n}function E3(e,t,n,r){return Z1e(e,t,rge(n,t==="pointerdown"),r)}function qB(e){const t=C.exports.useRef(null);return t.current=e,t}var ige=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Q1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:GB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,YS(r,this.history)),this.removeListeners=sge(E3(this.win,"pointermove",this.onPointerMove),E3(this.win,"pointerup",this.onPointerUp),E3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=YS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=lge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=YS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),MQ.update(this.updatePoint)}};function ZL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function YS(e,t){return{point:e.point,delta:ZL(e.point,t[t.length-1]),offset:ZL(e.point,t[0]),velocity:age(t,.1)}}var oge=e=>e*1e3;function age(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function sge(...e){return t=>e.reduce((n,r)=>r(n),t)}function ZS(e,t){return Math.abs(e-t)}function XL(e){return"x"in e&&"y"in e}function lge(e,t){if(typeof e=="number"&&typeof t=="number")return ZS(e,t);if(XL(e)&&XL(t)){const n=ZS(e.x,t.x),r=ZS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function KB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=qB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new ige(v,h.current,s)}return E3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function uge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var cge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function dge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function YB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return cge(()=>{const a=e(),s=a.map((l,u)=>uge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(dge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function fge(e){return typeof e=="object"&&e!==null&&"current"in e}function hge(e){const[t]=YB({observeMutation:!1,getNodes(){return[fge(e)?e.current:e]}});return t}var pge=Object.getOwnPropertyNames,gge=(e,t)=>function(){return e&&(t=(0,e[pge(e)[0]])(e=0)),t},yd=gge({"../../../react-shim.js"(){}});yd();yd();yd();var La=e=>e?"":void 0,d0=e=>e?!0:void 0,bd=(...e)=>e.filter(Boolean).join(" ");yd();function f0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function mge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function jg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P3={width:0,height:0},Ey=e=>e||P3;function ZB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??P3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...jg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>Ey(w).height>Ey(P).height?w:P,P3):r.reduce((w,P)=>Ey(w).width>Ey(P).width?w:P,P3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...jg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...jg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...jg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function XB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...N}=e,D=dr(m),z=dr(v),$=dr(w),W=XB({isReversed:a,direction:s,orientation:l}),[Y,de]=U5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[re,se]=C.exports.useState(!1),[G,V]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map($e=>l0($e,t,n)),me=O*b,ye=yge(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map($e=>n-$e+t),ct=(W?He:X).map($e=>M4($e,t,n)),qe=l==="vertical",et=C.exports.useRef(null),tt=C.exports.useRef(null),at=YB({getNodes(){const $e=tt.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),At=C.exports.useId(),Ae=mge(u??At),dt=C.exports.useCallback($e=>{var pt;if(!et.current)return;Se.current.eventSource="pointer";const rt=et.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?rt.bottom-Qt:Nt-rt.left,lo=qe?rt.height:rt.width;let pi=Qn/lo;return W&&(pi=1-pi),nz(pi,t,n)},[qe,W,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!q)return;const rt=Se.current.valueBounds[$e];pt=parseFloat(vC(pt,rt.min,ut)),pt=l0(pt,rt.min,rt.max);const Nt=[...Se.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:V,stepUp($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt-pt:rt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt+pt:rt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(Q.current)}}),[ut,W,de,q]),kn=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>ZB({isReversed:W,orientation:l,thumbRects:at,thumbPercents:ct}),[W,l,ct,at]),Me=C.exports.useCallback($e=>{var pt;const rt=$e??G;if(rt!==-1&&I){const Nt=Ae.getThumb(rt),Qt=(pt=tt.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Ae]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=$e=>{const pt=dt($e)||0,rt=Se.current.value.map(pi=>Math.abs(pi-pt)),Nt=Math.min(...rt);let Qt=rt.indexOf(Nt);const Qn=rt.filter(pi=>pi===Nt);Qn.length>1&&pt>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),V(Qt),xt.setValueAtIndex(Qt,pt),Me(Qt)},Xt=$e=>{if(G==-1)return;const pt=dt($e)||0;V(G),xt.setValueAtIndex(G,pt),Me(G)};KB(tt,{onPanSessionStart($e){!q||(te(!0),Je($e),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan($e){!q||Xt($e)}});const Gt=C.exports.useCallback(($e={},pt=null)=>({...$e,...N,id:Ae.root,ref:$n(pt,tt),tabIndex:-1,"aria-disabled":d0(h),"data-focused":La(re),style:{...$e.style,...Zt}}),[N,h,re,Zt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,et),id:Ae.track,"data-disabled":La(h),style:{...$e.style,...En}}),[h,En,Ae]),It=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...yn}}),[yn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e,Qt=X[rt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[rt];return{...Nt,ref:pt,role:"slider",tabIndex:q?0:void 0,id:Ae.getThumb(rt),"data-active":La(j&&G===rt),"aria-valuetext":$?.(Qt)??P?.[rt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E?.[rt],"aria-labelledby":E?.[rt]?void 0:k?.[rt],style:{...$e.style,...Et(rt)},onKeyDown:f0($e.onKeyDown,kn),onFocus:f0($e.onFocus,()=>{se(!0),V(rt)}),onBlur:f0($e.onBlur,()=>{se(!1),V(-1)})}},[Ae,X,ye,q,j,G,$,P,l,h,g,E,k,Et,kn,se]),st=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:X.map((rt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,X]),ln=C.exports.useCallback(($e,pt=null)=>{const{value:rt,...Nt}=$e,Qt=!(rtn),Qn=rt>=X[0]&&rt<=X[X.length-1];let lo=M4(rt,t,n);lo=W?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...jg({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!Qt),"data-highlighted":La(Qn),style:{...$e.style,...pi}}},[h,W,n,t,l,X,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(rt),type:"hidden",value:X[rt],name:Array.isArray(T)?T[rt]:`${T}-${rt}`}},[T,X,Ae]);return{state:{value:X,isFocused:re,isDragging:j,getThumbPercent:$e=>ct[$e],getThumbMinValue:$e=>ye[$e].min,getThumbMaxValue:$e=>ye[$e].max},actions:xt,getRootProps:Gt,getTrackProps:Ee,getInnerTrackProps:It,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Dn,getOutputProps:st}}function yge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[bge,pb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[xge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),QB=Pe(function(t,n){const r=Ri("Slider",t),i=vn(t),{direction:o}=U0();i.direction=o;const{getRootProps:a,...s}=vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(bge,{value:l},le.createElement(xge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});QB.defaultProps={orientation:"horizontal"};QB.displayName="RangeSlider";var Sge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=pb(),a=r_(),s=r(t,n);return le.createElement(we.div,{...s,className:bd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Sge.displayName="RangeSliderThumb";var wge=Pe(function(t,n){const{getTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:bd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});wge.displayName="RangeSliderTrack";var Cge=Pe(function(t,n){const{getInnerTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Cge.displayName="RangeSliderFilledTrack";var _ge=Pe(function(t,n){const{getMarkerProps:r}=pb(),i=r(t,n);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",t.className)})});_ge.displayName="RangeSliderMark";yd();yd();function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,...O}=e,N=dr(m),D=dr(v),z=dr(w),$=XB({isReversed:a,direction:s,orientation:l}),[W,Y]=U5({value:i,defaultValue:o??Pge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),se=!(h||g),G=(n-t)/10,V=b||(n-t)/100,q=l0(W,t,n),Q=n-q+t,me=M4($?Q:q,t,n),ye=l==="vertical",Se=qB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:se,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),et=u??qe,[tt,at]=[`slider-thumb-${et}`,`slider-track-${et}`],At=C.exports.useCallback(Ne=>{var st;if(!He.current)return;const ln=Se.current;ln.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((st=Ne.touches)==null?void 0:st[0])??Ne,rt=ye?Dn.bottom-pt:$e-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=rt/Nt;$&&(Qt=1-Qt);let Qn=nz(Qt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(vC(Qn,ln.min,ln.step))),Qn=l0(Qn,ln.min,ln.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const st=Se.current;!st.isInteractive||(Ne=parseFloat(vC(Ne,st.min,V)),Ne=l0(Ne,st.min,st.max),Y(Ne))},[V,Y,Se]),Ae=C.exports.useMemo(()=>({stepUp(Ne=V){const st=$?q-Ne:q+Ne;wt(st)},stepDown(Ne=V){const st=$?q+Ne:q-Ne;wt(st)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,V,o]),dt=C.exports.useCallback(Ne=>{const st=Se.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(G),PageDown:()=>Ae.stepDown(G),Home:()=>wt(st.min),End:()=>wt(st.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),st.eventSource="keyboard")},[Ae,wt,G,Se]),Mt=z?.(q)??P,ut=hge(Ue),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,st=ut??{width:0,height:0};return ZB({isReversed:$,orientation:Ne.orientation,thumbRects:[st],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var st;return(st=Ue.current)==null?void 0:st.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const st=At(Ne);st!=null&&st!==Se.current.value&&Y(st)}KB(ct,{onPanSessionStart(Ne){const st=Se.current;!st.isInteractive||(j(!0),En(),yn(Ne),N?.(st.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},st=null)=>({...Ne,...O,ref:$n(st,ct),tabIndex:-1,"aria-disabled":d0(h),"data-focused":La(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),Je=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,He),id:at,"data-disabled":La(h),style:{...Ne.style,...Et}}),[h,at,Et]),Xt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,style:{...Ne.style,...Zt}}),[Zt]),Gt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,Ue),role:"slider",tabIndex:se?0:void 0,id:tt,"data-active":La(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:f0(Ne.onKeyDown,dt),onFocus:f0(Ne.onFocus,()=>re(!0)),onBlur:f0(Ne.onBlur,()=>re(!1))}),[se,tt,de,Mt,t,n,q,l,h,g,E,k,xt,dt]),Ee=C.exports.useCallback((Ne,st=null)=>{const ln=!(Ne.valuen),Dn=q>=Ne.value,$e=M4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Ege({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:st,role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!ln),"data-highlighted":La(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,q]),It=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,type:"hidden",value:q,name:T}),[T,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Ae,getRootProps:Me,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Gt,getMarkerProps:Ee,getInputProps:It}}function Ege(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Pge(e,t){return t"}),[Lge,mb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=vn(e),{direction:i}=U0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=kge(r),l=a(),u=o({},t);return le.createElement(Tge,{value:s},le.createElement(Lge,{value:n},le.createElement(we.div,{...l,className:bd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var JB=Pe((e,t)=>{const{getThumbProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__thumb",e.className),__css:r.thumb})});JB.displayName="SliderThumb";var eF=Pe((e,t)=>{const{getTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__track",e.className),__css:r.track})});eF.displayName="SliderTrack";var tF=Pe((e,t)=>{const{getInnerTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});tF.displayName="SliderFilledTrack";var LC=Pe((e,t)=>{const{getMarkerProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",e.className),__css:r.mark})});LC.displayName="SliderMark";var Age=(...e)=>e.filter(Boolean).join(" "),QL=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:Age("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QL(s.isChecked),"data-hover":QL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var Z0=(...e)=>e.filter(Boolean).join(" ");function AC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ige,nF,Mge,Oge]=hN();function Rge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=U5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Mge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Nge,Wv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Dge(e){const{focusedIndex:t,orientation:n,direction:r}=Wv(),i=nF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:AC(e.onKeyDown,o)}}function zge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Wv(),{index:u,register:h}=Oge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Tfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:AC(e.onClick,m)}),w="button";return{...b,id:rF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":iF(a,u),onFocus:t?void 0:AC(e.onFocus,v)}}var[Bge,Fge]=Cn({});function $ge(e){const t=Wv(),{id:n,selectedIndex:r}=t,o=ab(e.children).map((a,s)=>C.exports.createElement(Bge,{key:s,value:{isSelected:s===r,id:iF(n,s),tabId:rF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Hge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Wv(),{isSelected:o,id:a,tabId:s}=Fge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Vz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Wge(){const e=Wv(),t=nF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function rF(e,t){return`${e}--tab-${t}`}function iF(e,t){return`${e}--tabpanel-${t}`}var[Vge,Vv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),oF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Rge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return le.createElement(Ige,{value:l},le.createElement(Nge,{value:h},le.createElement(Vge,{value:r},le.createElement(we.div,{className:Z0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});oF.displayName="Tabs";var Uge=Pe(function(t,n){const r=Wge(),i={...t.style,...r},o=Vv();return le.createElement(we.div,{ref:n,...t,className:Z0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Uge.displayName="TabIndicator";var jge=Pe(function(t,n){const r=Dge({...t,ref:n}),o={display:"flex",...Vv().tablist};return le.createElement(we.div,{...r,className:Z0("chakra-tabs__tablist",t.className),__css:o})});jge.displayName="TabList";var aF=Pe(function(t,n){const r=Hge({...t,ref:n}),i=Vv();return le.createElement(we.div,{outline:"0",...r,className:Z0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});aF.displayName="TabPanel";var sF=Pe(function(t,n){const r=$ge(t),i=Vv();return le.createElement(we.div,{...r,width:"100%",ref:n,className:Z0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});sF.displayName="TabPanels";var lF=Pe(function(t,n){const r=Vv(),i=zge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:Z0("chakra-tabs__tab",t.className),__css:o})});lF.displayName="Tab";var Gge=(...e)=>e.filter(Boolean).join(" ");function qge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Kge=["h","minH","height","minHeight"],uF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=g7(o),s=i?qge(n,Kge):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Gge("chakra-textarea",r),__css:s})});uF.displayName="Textarea";function Yge(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return Zge(e)?e(...t):e}var Zge=e=>typeof e=="function";function Xge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Qge=(e,t)=>e.find(n=>n.id===t);function JL(e,t){const n=cF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function cF(e,t){for(const[n,r]of Object.entries(e))if(Qge(r,t))return n}function Jge(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var tme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=nme(tme);function nme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=rme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=JL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:dF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=cF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(JL(gl.getState(),i).position)}}var eA=0;function rme(e,t={}){eA+=1;const n=t.id??eA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ime=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(KD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(ZD,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(XD,{id:u?.title,children:i}),s&&x(YD,{id:u?.description,display:"block",children:s})),o&&x(ub,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function dF(e={}){const{render:t,toastComponent:n=ime}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function ome(e,t){const n=i=>({...t,...i,position:Xge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=dF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function xd(e){const{theme:t}=cN();return C.exports.useMemo(()=>ome(t.direction,e),[e,t.direction])}var ame={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},fF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=ame,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ale();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Yge(P,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>Jge(a),[a]);return le.createElement(Ml.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},IC(n,{id:t,onClose:P})))});fF.displayName="ToastComponent";var sme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=fF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:eme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Kn,{children:[n,x(oh,{...o,children:s})]})};function lme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ume(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var cme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Eg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},MC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function dme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:k,gutter:T,offset:I,direction:O,...N}=e,{isOpen:D,onOpen:z,onClose:$}=Wz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Hz({enabled:D,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:I,direction:O}),te=C.exports.useId(),se=`tooltip-${g??te}`,G=C.exports.useRef(null),V=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=fme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!V.current){X();const tt=MC(G);V.current=tt.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0);const tt=MC(G);q.current=tt.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),Ue=C.exports.useCallback(tt=>{D&&tt.key==="Escape"&&ye()},[D,ye]);$f(()=>B4(G),"keydown",s?Ue:void 0),$f(()=>B4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(V.current),clearTimeout(q.current)},[]),$f(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((tt={},at=null)=>({...tt,ref:$n(G,at,W),onPointerEnter:Eg(tt.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Eg(tt.onClick,Se),onPointerDown:Eg(tt.onPointerDown,He),onFocus:Eg(tt.onFocus,me),onBlur:Eg(tt.onBlur,ye),"aria-describedby":D?se:void 0}),[me,ye,He,D,se,Se,W]),qe=C.exports.useCallback((tt={},at=null)=>Y({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},at),[Y,b,w]),et=C.exports.useCallback((tt={},at=null)=>{const At={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...N,...tt,id:se,role:"tooltip",style:At}},[N,se]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:et,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var XS="chakra-ui:close-tooltip";function fme(e,t){return C.exports.useEffect(()=>{const n=B4(e);return n.addEventListener(XS,t),()=>n.removeEventListener(XS,t)},[t,e]),()=>{const n=B4(e),r=MC(e);n.dispatchEvent(new r.CustomEvent(XS))}}var hme=we(Ml.div),Ui=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=U0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...P}=r,E=m??v??h??b;if(E){n.bg=E;const $=OX(i,"colors",E);n[Hr.arrowBg.var]=$}const k=dme({...P,direction:i.direction}),T=typeof o=="string"||s;let I;if(T)I=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,N=k.getTooltipProps({},t),D=O?lme(N,["role","id"]):N,z=ume(N,["role","id"]);return a?ee(Kn,{children:[I,x(pd,{children:k.isOpen&&le.createElement(oh,{...g},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(hme,{variants:cme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Kn,{children:o})});Ui.displayName="Tooltip";var pme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(_z,{environment:a,children:t});return x(boe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(Fde,{}):x(Bde,{}),x(Soe,{}),r?x(Uz,{zIndex:r,children:l}):l]})})};function gme({children:e,theme:t=coe,toastOptions:n,...r}){return ee(pme,{theme:t,...r,children:[e,x(sme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function h0(e,t){return X0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mme(e,t){return X0(e)===2?e.get(t):e[t]}function hF(e,t,n){var r=X0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function pF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return wme&&e instanceof Map}function s_(e){return Cme&&e instanceof Set}function xf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mF(e);delete t[nr];for(var n=p0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=vme),Object.freeze(e),t&&Xf(e,function(n,r){return u_(r,!0)},!0)),e}function vme(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function _l(e){var t=DC[e];return t||ms(18,e),t}function yme(e,t){DC[e]||(DC[e]=t)}function OC(){return gv}function QS(e,t){t&&(_l("Patches"),e.u=[],e.s=[],e.v=t)}function F4(e){RC(e),e.p.forEach(bme),e.p=null}function RC(e){e===gv&&(gv=e.l)}function tA(e){return gv={p:[],l:gv,h:e,m:!0,_:0}}function bme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function JS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||_l("ES5").S(t,e,r),r?(n[nr].P&&(F4(t),ms(4)),xu(e)&&(e=$4(t,e),t.l||H4(t,e)),t.u&&_l("Patches").M(n[nr].t,e,t.u,t.s)):e=$4(t,n,[]),F4(t),t.u&&t.v(t.u,t.s),e!==gF?e:void 0}function $4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Xf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return H4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Xf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),H4(e,i,!1),n&&e.u&&_l("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=$4(e,i,o&&t&&t.i!==3&&!h0(t.D,r)?o.concat(r):void 0);if(hF(n,r,a),!sd(a))return;e.m=!1}if(xu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;$4(e,i),t&&t.A.l||H4(e,i)}}function H4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function e6(e,t){var n=e[nr];return(n?xf(n):e)[t]}function rA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function t6(e){e.o||(e.o=l_(e.t))}function NC(e,t,n){var r=a_(t)?_l("MapSet").N(t,n):s_(t)?_l("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:OC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=mv;a&&(l=[s],u=Gg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):_l("ES5").J(t,n);return(n?n.A:OC()).p.push(r),r}function xme(e){return sd(e)||ms(22,e),function t(n){if(!xu(n))return n;var r,i=n[nr],o=X0(n);if(i){if(!i.P&&(i.i<4||!_l("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Xf(r,function(a,s){i&&mme(i.t,a)===s||hF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Sme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return mv.get(l,o)},set:function(l){var u=this[nr];mv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=p0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!h0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!pF(m,g))return!0}}var b=!!a[nr];return l.length!==p0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=_l("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new kme,vF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error(Hi(6));P=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Eme(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error(Hi(12));if(typeof n(void 0,{type:W4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function yF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function V4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return U4}function i(s,l){r(s)===U4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Ime=function(t,n){return t===n};function Mme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const mA={notify(){},get:()=>[]};function zve(e,t){let n,r=mA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Dve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const Bve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fve=Bve?C.exports.useLayoutEffect:C.exports.useEffect;function $ve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=zve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Fve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function AF(e=ld){const t=e===ld?PF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Hve=AF();function Wve(e=ld){const t=e===ld?Hve:AF(e);return function(){return t().dispatch}}const Vve=Wve();Lve(_F.exports.useSyncExternalStoreWithSelector);Eve(Al.exports.unstable_batchedUpdates);var m_="persist:",IF="persist/FLUSH",v_="persist/REHYDRATE",MF="persist/PAUSE",OF="persist/PERSIST",RF="persist/PURGE",NF="persist/REGISTER",Uve=-1;function T3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T3=function(n){return typeof n}:T3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T3(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jve(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function n2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var r2e=5e3;function i2e(e,t){var n=e.version!==void 0?e.version:Uve;e.debug;var r=e.stateReconciler===void 0?qve:e.stateReconciler,i=e.getStoredState||Zve,o=e.timeout!==void 0?e.timeout:r2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=t2e(m,["_persist"]),w=b;if(g.type===OF){var P=!1,E=function(z,$){P||(g.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Kve(e)),v)return nu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,W){return Promise.resolve($)};z(D,n).then(function($){E($)},function($){E(void 0,$)})},function(D){E(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===RF)return s=!0,g.result(Qve(e)),nu({},t(w,g),{_persist:v});if(g.type===IF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===MF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,I=r!==!1&&T!==void 0?r(T,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var N=t(w,g);return N===w?h:u(nu({},N,{_persist:v}))}}function bA(e){return s2e(e)||a2e(e)||o2e()}function o2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function a2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function s2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:DF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case NF:return BC({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),BC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function c2e(e,t,n){var r=n||!1,i=f_(u2e,DF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:NF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=BC({},i,{purge:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:IF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:MF})},persist:function(){e.dispatch({type:OF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=h2e;function L3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L3=function(n){return typeof n}:L3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},L3(e)}function a6(){}var d2e={getItem:a6,setItem:a6,removeItem:a6};function f2e(e){if((typeof self>"u"?"undefined":L3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function h2e(e){var t="".concat(e,"Storage");return f2e(t)?self[t]:d2e}y_.__esModule=!0;y_.default=m2e;var p2e=g2e(b_);function g2e(e){return e&&e.__esModule?e:{default:e}}function m2e(e){var t=(0,p2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var zF=void 0,v2e=y2e(y_);function y2e(e){return e&&e.__esModule?e:{default:e}}var b2e=(0,v2e.default)("local");zF=b2e;var BF={},FF={},Qf={};Object.defineProperty(Qf,"__esModule",{value:!0});Qf.PLACEHOLDER_UNDEFINED=Qf.PACKAGE_NAME=void 0;Qf.PACKAGE_NAME="redux-deep-persist";Qf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Qf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,re){re||(re=new Set([j])),te||(te="");for(const se in j){const G=te?`${te}.${se}`:se,V=j[se];if((0,e.isObjectLike)(V))return re.has(V)?`${te}.${se}:`:(re.add(V),(0,e.getCircularPath)(V,G,re))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const re in j){const se=j[re];te[re]=(0,e._cloneDeep)(se)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const re=(0,e.cloneDeep)(j),se=(0,e.cloneDeep)(te),G=Object.keys(re).reduce((q,Q)=>(h.call(se,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(re)||(0,e.isDate)(se))return re.valueOf()===se.valueOf()?{}:se;const V=Object.keys(se).reduce((q,Q)=>{if(!h.call(re,Q))return q[Q]=se[Q],q;const X=(0,e.difference)(re[Q],se[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(re)&&!(0,e.isArray)(se)||!(0,e.isArray)(re)&&(0,e.isArray)(se)?se:q:(q[Q]=X,q)},G);return delete V._persist,V};e.difference=b;const w=function(j,te){return te.reduce((re,se)=>{if(re){const G=parseInt(se,10),V=(0,e.isIntegerString)(se)&&G<0?re.length+G:se;return(0,e.isString)(re)?re.charAt(V):re[V]}},j)};e.path=w;const P=function(j,te){return[...j].reverse().reduce((G,V,q)=>{const Q=(0,e.isIntegerString)(V)?[]:{};return Q[V]=q===0?te:G,Q},{})};e.assocPath=P;const E=function(j,te){const re=(0,e.cloneDeep)(j);return te.reduce((se,G,V)=>(V===te.length-1&&se&&(0,e.isObjectLike)(se)&&delete se[G],se&&se[G]),re),re};e.dissocPath=E;const k=function(j,te,...re){if(!re||!re.length)return te;const se=re.shift(),{preservePlaceholder:G,preserveUndefined:V}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(se))for(const q in se)if((0,e.isObjectLike)(se[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],se[q]);else if((0,e.isArray)(te)){let Q=se[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;V||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=se[q]!==t.PLACEHOLDER_UNDEFINED?se[q]:void 0;te[q]=Q}return k(j,te,...re)},T=function(j,te,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=T;const I=function(j,te=[],re,se,G){if(!(0,e.isObjectLike)(j))return j;for(const V in j){const q=j[V],Q=(0,e.isArray)(j),X=se?se+"."+V:V;q===null&&(re===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||re===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(V,10)]=void 0),q===void 0&&G&&re===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(V,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,re,X,G)}},O=function(j,te,re,se){const G=(0,e.cloneDeep)(j);return I(G,te,re,"",se),G};e.preserveUndefined=O;const N=function(j,te,re){return re.indexOf(j)===te};e.unique=N;const D=function(j){return j.reduce((te,re)=>{const se=j.filter(me=>me===re),G=j.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:V,subsets:q}=te,Q=se.length>1&&V.indexOf(re)===-1,X=G.length>1;return{duplicates:[...V,...Q?se:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,re){const se=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${se} configuration.`,V=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),bb=Symbol.for("react.fragment"),xb=Symbol.for("react.strict_mode"),Sb=Symbol.for("react.profiler"),wb=Symbol.for("react.provider"),Cb=Symbol.for("react.context"),Rve=Symbol.for("react.server_context"),_b=Symbol.for("react.forward_ref"),kb=Symbol.for("react.suspense"),Eb=Symbol.for("react.suspense_list"),Pb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Nve=Symbol.for("react.offscreen"),LF;LF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case bb:case Sb:case xb:case kb:case Eb:return e;default:switch(e=e&&e.$$typeof,e){case Rve:case Cb:case _b:case Tb:case Pb:case wb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=Cb;On.ContextProvider=wb;On.Element=p_;On.ForwardRef=_b;On.Fragment=bb;On.Lazy=Tb;On.Memo=Pb;On.Portal=g_;On.Profiler=Sb;On.StrictMode=xb;On.Suspense=kb;On.SuspenseList=Eb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===Cb};On.isContextProvider=function(e){return Va(e)===wb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===_b};On.isFragment=function(e){return Va(e)===bb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Pb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===Sb};On.isStrictMode=function(e){return Va(e)===xb};On.isSuspense=function(e){return Va(e)===kb};On.isSuspenseList=function(e){return Va(e)===Eb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bb||e===Sb||e===xb||e===kb||e===Eb||e===Nve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Pb||e.$$typeof===wb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===LF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})(Ove);function Dve(){const e=Pve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const mA={notify(){},get:()=>[]};function zve(e,t){let n,r=mA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Dve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const Bve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fve=Bve?C.exports.useLayoutEffect:C.exports.useEffect;function $ve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=zve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Fve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function AF(e=ld){const t=e===ld?PF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Hve=AF();function Wve(e=ld){const t=e===ld?Hve:AF(e);return function(){return t().dispatch}}const Vve=Wve();Lve(_F.exports.useSyncExternalStoreWithSelector);Eve(Il.exports.unstable_batchedUpdates);var m_="persist:",IF="persist/FLUSH",v_="persist/REHYDRATE",MF="persist/PAUSE",OF="persist/PERSIST",RF="persist/PURGE",NF="persist/REGISTER",Uve=-1;function T3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T3=function(n){return typeof n}:T3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T3(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jve(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function n2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var r2e=5e3;function i2e(e,t){var n=e.version!==void 0?e.version:Uve;e.debug;var r=e.stateReconciler===void 0?qve:e.stateReconciler,i=e.getStoredState||Zve,o=e.timeout!==void 0?e.timeout:r2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=t2e(m,["_persist"]),w=b;if(g.type===OF){var P=!1,E=function(z,$){P||(g.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Kve(e)),v)return ru({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,W){return Promise.resolve($)};z(D,n).then(function($){E($)},function($){E(void 0,$)})},function(D){E(void 0,D)}),ru({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===RF)return s=!0,g.result(Qve(e)),ru({},t(w,g),{_persist:v});if(g.type===IF)return g.result(a&&a.flush()),ru({},t(w,g),{_persist:v});if(g.type===MF)l=!0;else if(g.type===v_){if(s)return ru({},w,{_persist:ru({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,I=r!==!1&&T!==void 0?r(T,h,k,e):k,O=ru({},I,{_persist:ru({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var N=t(w,g);return N===w?h:u(ru({},N,{_persist:v}))}}function bA(e){return s2e(e)||a2e(e)||o2e()}function o2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function a2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function s2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:DF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case NF:return BC({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),BC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function c2e(e,t,n){var r=n||!1,i=f_(u2e,DF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:NF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=BC({},i,{purge:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:IF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:MF})},persist:function(){e.dispatch({type:OF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=h2e;function L3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L3=function(n){return typeof n}:L3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},L3(e)}function a6(){}var d2e={getItem:a6,setItem:a6,removeItem:a6};function f2e(e){if((typeof self>"u"?"undefined":L3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function h2e(e){var t="".concat(e,"Storage");return f2e(t)?self[t]:d2e}y_.__esModule=!0;y_.default=m2e;var p2e=g2e(b_);function g2e(e){return e&&e.__esModule?e:{default:e}}function m2e(e){var t=(0,p2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var zF=void 0,v2e=y2e(y_);function y2e(e){return e&&e.__esModule?e:{default:e}}var b2e=(0,v2e.default)("local");zF=b2e;var BF={},FF={},Qf={};Object.defineProperty(Qf,"__esModule",{value:!0});Qf.PLACEHOLDER_UNDEFINED=Qf.PACKAGE_NAME=void 0;Qf.PACKAGE_NAME="redux-deep-persist";Qf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Qf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,re){re||(re=new Set([j])),te||(te="");for(const se in j){const G=te?`${te}.${se}`:se,V=j[se];if((0,e.isObjectLike)(V))return re.has(V)?`${te}.${se}:`:(re.add(V),(0,e.getCircularPath)(V,G,re))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const re in j){const se=j[re];te[re]=(0,e._cloneDeep)(se)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const re=(0,e.cloneDeep)(j),se=(0,e.cloneDeep)(te),G=Object.keys(re).reduce((q,Q)=>(h.call(se,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(re)||(0,e.isDate)(se))return re.valueOf()===se.valueOf()?{}:se;const V=Object.keys(se).reduce((q,Q)=>{if(!h.call(re,Q))return q[Q]=se[Q],q;const X=(0,e.difference)(re[Q],se[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(re)&&!(0,e.isArray)(se)||!(0,e.isArray)(re)&&(0,e.isArray)(se)?se:q:(q[Q]=X,q)},G);return delete V._persist,V};e.difference=b;const w=function(j,te){return te.reduce((re,se)=>{if(re){const G=parseInt(se,10),V=(0,e.isIntegerString)(se)&&G<0?re.length+G:se;return(0,e.isString)(re)?re.charAt(V):re[V]}},j)};e.path=w;const P=function(j,te){return[...j].reverse().reduce((G,V,q)=>{const Q=(0,e.isIntegerString)(V)?[]:{};return Q[V]=q===0?te:G,Q},{})};e.assocPath=P;const E=function(j,te){const re=(0,e.cloneDeep)(j);return te.reduce((se,G,V)=>(V===te.length-1&&se&&(0,e.isObjectLike)(se)&&delete se[G],se&&se[G]),re),re};e.dissocPath=E;const k=function(j,te,...re){if(!re||!re.length)return te;const se=re.shift(),{preservePlaceholder:G,preserveUndefined:V}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(se))for(const q in se)if((0,e.isObjectLike)(se[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],se[q]);else if((0,e.isArray)(te)){let Q=se[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;V||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=se[q]!==t.PLACEHOLDER_UNDEFINED?se[q]:void 0;te[q]=Q}return k(j,te,...re)},T=function(j,te,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=T;const I=function(j,te=[],re,se,G){if(!(0,e.isObjectLike)(j))return j;for(const V in j){const q=j[V],Q=(0,e.isArray)(j),X=se?se+"."+V:V;q===null&&(re===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||re===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(V,10)]=void 0),q===void 0&&G&&re===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(V,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,re,X,G)}},O=function(j,te,re,se){const G=(0,e.cloneDeep)(j);return I(G,te,re,"",se),G};e.preserveUndefined=O;const N=function(j,te,re){return re.indexOf(j)===te};e.unique=N;const D=function(j){return j.reduce((te,re)=>{const se=j.filter(me=>me===re),G=j.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:V,subsets:q}=te,Q=se.length>1&&V.indexOf(re)===-1,X=G.length>1;return{duplicates:[...V,...Q?se:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,re){const se=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${se} configuration.`,V=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${V}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. @@ -447,16 +447,16 @@ ${JSON.stringify(Q)} ${JSON.stringify(j)}`);if(te.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset. - ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,re)=>{const se=re.split("."),G=se[0],V=se.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:V?[V]:void 0}),q&&!Q&&V&&(q[G]=[V]),q&&Q&&V&&Q.push(V),te},[]):[]};e.getRootKeysGroup=de})(FF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!P(k)&&g?g(E,k,T):E,out:(E,k,T)=>!P(k)&&m?m(E,k,T):E,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(T=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(E,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:P,rootReducer:E}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(E(void 0,{type:""})),N=T.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>N.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...Y,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(BF);const A3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),x2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?x2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),G4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),S2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var da={exports:{}};/** + ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,re)=>{const se=re.split("."),G=se[0],V=se.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:V?[V]:void 0}),q&&!Q&&V&&(q[G]=[V]),q&&Q&&V&&Q.push(V),te},[]):[]};e.getRootKeysGroup=de})(FF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!P(k)&&g?g(E,k,T):E,out:(E,k,T)=>!P(k)&&m?m(E,k,T):E,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(T=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(E,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:P,rootReducer:E}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(E(void 0,{type:""})),N=T.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>N.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...Y,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(BF);const A3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),x2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?x2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),G4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),S2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,P=1,E=2,k=4,T=8,I=16,O=32,N=64,D=128,z=256,$=512,W=30,Y="...",de=800,j=16,te=1,re=2,se=3,G=1/0,V=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",P],["bindKey",E],["curry",T],["curryRight",I],["flip",$],["partial",O],["partialRight",N],["rearg",z]],He="[object Arguments]",Ue="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",et="[object Date]",tt="[object DOMException]",at="[object Error]",At="[object Function]",wt="[object GeneratorFunction]",Ae="[object Map]",dt="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Gt="[object ArrayBuffer]",Ee="[object DataView]",It="[object Float32Array]",Ne="[object Float64Array]",st="[object Int8Array]",ln="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,i1=RegExp(pi.source),ma=RegExp(As.source),yh=/<%-([\s\S]+?)%>/g,o1=/<%([\s\S]+?)%>/g,Mu=/<%=([\s\S]+?)%>/g,bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,a1=RegExp(Ed.source),Ou=/^\s+/,Pd=/\s/,s1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ru=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u1=/[()=,{}\[\]\/\s]/,c1=/\\(\\)?/g,d1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,f1=/^[-+]0x[0-9a-f]+$/i,h1=/^0b[01]+$/i,p1=/^\[object .+?Constructor\]$/,g1=/^0o[0-7]+$/i,m1=/^(?:0|[1-9]\d*)$/,v1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,y1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Sh="\\u2700-\\u27bf",Nu="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Sh+"]",qa="["+Nu+"]",Ld="[^"+ja+Ur+Td+Sh+Nu+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",wh="(?:"+Ga+"|"+gi+")",Ch="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ld+")",b1="(?:"+uo+"|"+Ld+")",Du="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Id=wh+"?",Bu="["+kr+"]?",va="(?:"+zs+"(?:"+[Ch,Ad,Ds].join("|")+")"+Bu+Id+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Id+va,_h="(?:"+[zl,Ad,Ds].join("|")+")"+Ht,Fu="(?:"+[Ch+Ga+"?",Ga,Ad,Ds,Ns].join("|")+")",$u=RegExp(zo,"g"),kh=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Fu+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+Du+"(?="+[jr,uo,"$"].join("|")+")",b1+"+"+zu+"(?="+[jr,uo+Bl,"$"].join("|")+")",uo+"?"+Bl+"+"+Du,uo+"+"+zu,Fl,Md,Td,_h].join("|"),"g"),Od=RegExp("["+zs+ja+Dl+kr+"]"),Eh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ph=-1,un={};un[It]=un[Ne]=un[st]=un[ln]=un[Dn]=un[$e]=un[pt]=un[rt]=un[Nt]=!0,un[He]=un[Ue]=un[Gt]=un[qe]=un[Ee]=un[et]=un[at]=un[At]=un[Ae]=un[dt]=un[ut]=un[Et]=un[Zt]=un[En]=un[Je]=!1;var Wt={};Wt[He]=Wt[Ue]=Wt[Gt]=Wt[Ee]=Wt[qe]=Wt[et]=Wt[It]=Wt[Ne]=Wt[st]=Wt[ln]=Wt[Dn]=Wt[Ae]=Wt[dt]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[$e]=Wt[pt]=Wt[rt]=Wt[Nt]=!0,Wt[at]=Wt[At]=Wt[Je]=!1;var Th={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},x1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,fn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,hn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,ya=hn&&hn.isRegExp,Bs=hn&&hn.isSet,S1=hn&&hn.isTypedArray;function mi(ie,xe,ve){switch(ve.length){case 0:return ie.call(xe);case 1:return ie.call(xe,ve[0]);case 2:return ie.call(xe,ve[0],ve[1]);case 3:return ie.call(xe,ve[0],ve[1],ve[2])}return ie.apply(xe,ve)}function w1(ie,xe,ve,Ke){for(var _t=-1,Jt=ie==null?0:ie.length;++_t-1}function Lh(ie,xe,ve){for(var Ke=-1,_t=ie==null?0:ie.length;++Ke<_t;)if(ve(xe,ie[Ke]))return!0;return!1}function Bn(ie,xe){for(var ve=-1,Ke=ie==null?0:ie.length,_t=Array(Ke);++ve-1;);return ve}function Ka(ie,xe){for(var ve=ie.length;ve--&&Vu(xe,ie[ve],0)>-1;);return ve}function _1(ie,xe){for(var ve=ie.length,Ke=0;ve--;)ie[ve]===xe&&++Ke;return Ke}var i2=Bd(Th),Ya=Bd(x1);function $s(ie){return"\\"+ne[ie]}function Ih(ie,xe){return ie==null?n:ie[xe]}function Hl(ie){return Od.test(ie)}function Mh(ie){return Eh.test(ie)}function o2(ie){for(var xe,ve=[];!(xe=ie.next()).done;)ve.push(xe.value);return ve}function Oh(ie){var xe=-1,ve=Array(ie.size);return ie.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Rh(ie,xe){return function(ve){return ie(xe(ve))}}function Ho(ie,xe){for(var ve=-1,Ke=ie.length,_t=0,Jt=[];++ve-1}function _2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=w2,Wo.prototype.delete=C2,Wo.prototype.get=F1,Wo.prototype.has=$1,Wo.prototype.set=_2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,R,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=R?S(c,A,R,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=mV(c),!J)return wi(c,K)}else{var Le=si(c),je=Le==At||Le==wt;if(vc(c))return Xs(c,J);if(Le==ut||Le==He||je&&!R){if(K=ce||je?{}:ck(c),!J)return ce?ig(c,sc(K,c)):yo(c,Qe(K,c))}else{if(!Wt[Le])return R?c:{};K=vV(c,Le,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,jt){K.set(jt,ii(bt,p,S,jt,c,F))});var yt=_e?ce?ge:Ko:ce?xo:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Vs(K,jt,ii(bt,p,S,jt,c,F))}),K}function Wh(c){var p=li(c);return function(S){return Vh(S,c,p)}}function Vh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var R=S[A],F=p[R],K=c[R];if(K===n&&!(R in c)||!F(K))return!1}return!0}function U1(c,p,S){if(typeof c!="function")throw new vi(a);return ug(function(){c.apply(n,S)},p)}function lc(c,p,S,A){var R=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Lh,K=!1):p.length>=i&&(F=ju,K=!1,p=new wa(p));e:for(;++RR?0:R+S),A=A===n||A>R?R:Dt(A),A<0&&(A+=R),A=S>A?0:Hk(A);S0&&S(J)?p>1?Tr(J,p-1,S,A,R):ba(R,J):A||(R[R.length]=J)}return R}var jh=Qs(),go=Qs(!0);function qo(c,p){return c&&jh(c,p,li)}function mo(c,p){return c&&go(c,p,li)}function Gh(c,p){return ho(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Kh(c,p){return c!=null&&tn.call(c,p)}function Yh(c,p){return c!=null&&p in cn(c)}function Zh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new wa(K&&ke):n}ke=c[0];var Le=-1,je=J[0];e:for(;++Le-1;)J!==c&&Gd.call(J,ce,1),Gd.call(c,ce,1);return c}function tf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var R=p[S];if(S==A||R!==F){var F=R;Yl(R)?Gd.call(c,R,1):ap(c,R)}}return c}function nf(c,p){return c+Vl(O1()*(p-c+1))}function Ks(c,p,S,A){for(var R=-1,F=vr(Yd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++R]=c,c+=S;return K}function pc(c,p){var S="";if(!c||p<1||p>V)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return kx(hk(c,p,So),c+"")}function tp(c){return ac(hp(c))}function rf(c,p){var S=hp(c);return M2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var R=-1,F=p.length,K=F-1,J=c;J!=null&&++RR?0:R+p),S=S>R?R:S,S<0&&(S+=R),R=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(R);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Wd(_e);K=!1,R=ju,ce=new wa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var eg=c2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Zu?Zu(S):new c.constructor(S);return c.copy(A),A}function tg(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function T2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Xd?cn(Xd.call(c)):{}}function L2(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ng(c,p){if(c!==p){var S=c!==n,A=c===null,R=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!R)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function A2(c,p,S,A){for(var R=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Le=!A;++J1?S[R-1]:n,K=R>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(R--,F):n,K&&Qi(S[0],S[1],K)&&(F=R<3?n:F,R=1),p=cn(p);++A-1?R[F?p[K]:K]:n}}function ag(c){return er(function(p){var S=p.length,A=S,R=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(R&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Le=-1,je=!0,ht=S&w?new wa:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(s1,`{ + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,P=1,E=2,k=4,T=8,I=16,O=32,N=64,D=128,z=256,$=512,W=30,Y="...",de=800,j=16,te=1,re=2,se=3,G=1/0,V=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",P],["bindKey",E],["curry",T],["curryRight",I],["flip",$],["partial",O],["partialRight",N],["rearg",z]],He="[object Arguments]",Ue="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",et="[object Date]",tt="[object DOMException]",at="[object Error]",At="[object Function]",wt="[object GeneratorFunction]",Ae="[object Map]",dt="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Gt="[object ArrayBuffer]",Ee="[object DataView]",It="[object Float32Array]",Ne="[object Float64Array]",st="[object Int8Array]",ln="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,i1=RegExp(pi.source),ga=RegExp(As.source),yh=/<%-([\s\S]+?)%>/g,o1=/<%([\s\S]+?)%>/g,Mu=/<%=([\s\S]+?)%>/g,bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,a1=RegExp(Ed.source),Ou=/^\s+/,Pd=/\s/,s1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ru=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u1=/[()=,{}\[\]\/\s]/,c1=/\\(\\)?/g,d1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,f1=/^[-+]0x[0-9a-f]+$/i,h1=/^0b[01]+$/i,p1=/^\[object .+?Constructor\]$/,g1=/^0o[0-7]+$/i,m1=/^(?:0|[1-9]\d*)$/,v1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,y1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Dl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",zl=Nl+Dl+Os,Sh="\\u2700-\\u27bf",Nu="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+zl+"]",Td="\\d+",Bl="["+Sh+"]",qa="["+Nu+"]",Ld="[^"+ja+Ur+Td+Sh+Nu+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",wh="(?:"+Ga+"|"+gi+")",Ch="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",zs="\\u200d",Fl="(?:"+qa+"|"+Ld+")",b1="(?:"+uo+"|"+Ld+")",Du="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Id=wh+"?",Bu="["+kr+"]?",ma="(?:"+zs+"(?:"+[Ch,Ad,Ds].join("|")+")"+Bu+Id+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$l="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Id+ma,_h="(?:"+[Bl,Ad,Ds].join("|")+")"+Ht,Fu="(?:"+[Ch+Ga+"?",Ga,Ad,Ds,Ns].join("|")+")",$u=RegExp(zo,"g"),kh=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Fu+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+Du+"(?="+[jr,uo,"$"].join("|")+")",b1+"+"+zu+"(?="+[jr,uo+Fl,"$"].join("|")+")",uo+"?"+Fl+"+"+Du,uo+"+"+zu,$l,Md,Td,_h].join("|"),"g"),Od=RegExp("["+zs+ja+zl+kr+"]"),Eh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ph=-1,un={};un[It]=un[Ne]=un[st]=un[ln]=un[Dn]=un[$e]=un[pt]=un[rt]=un[Nt]=!0,un[He]=un[Ue]=un[Gt]=un[qe]=un[Ee]=un[et]=un[at]=un[At]=un[Ae]=un[dt]=un[ut]=un[Et]=un[Zt]=un[En]=un[Je]=!1;var Wt={};Wt[He]=Wt[Ue]=Wt[Gt]=Wt[Ee]=Wt[qe]=Wt[et]=Wt[It]=Wt[Ne]=Wt[st]=Wt[ln]=Wt[Dn]=Wt[Ae]=Wt[dt]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[$e]=Wt[pt]=Wt[rt]=Wt[Nt]=!0,Wt[at]=Wt[At]=Wt[Je]=!1;var Th={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},x1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,fn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,hn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,va=hn&&hn.isRegExp,Bs=hn&&hn.isSet,S1=hn&&hn.isTypedArray;function mi(ie,xe,ve){switch(ve.length){case 0:return ie.call(xe);case 1:return ie.call(xe,ve[0]);case 2:return ie.call(xe,ve[0],ve[1]);case 3:return ie.call(xe,ve[0],ve[1],ve[2])}return ie.apply(xe,ve)}function w1(ie,xe,ve,Ke){for(var _t=-1,Jt=ie==null?0:ie.length;++_t-1}function Lh(ie,xe,ve){for(var Ke=-1,_t=ie==null?0:ie.length;++Ke<_t;)if(ve(xe,ie[Ke]))return!0;return!1}function Bn(ie,xe){for(var ve=-1,Ke=ie==null?0:ie.length,_t=Array(Ke);++ve-1;);return ve}function Ka(ie,xe){for(var ve=ie.length;ve--&&Vu(xe,ie[ve],0)>-1;);return ve}function _1(ie,xe){for(var ve=ie.length,Ke=0;ve--;)ie[ve]===xe&&++Ke;return Ke}var i2=Bd(Th),Ya=Bd(x1);function $s(ie){return"\\"+ne[ie]}function Ih(ie,xe){return ie==null?n:ie[xe]}function Wl(ie){return Od.test(ie)}function Mh(ie){return Eh.test(ie)}function o2(ie){for(var xe,ve=[];!(xe=ie.next()).done;)ve.push(xe.value);return ve}function Oh(ie){var xe=-1,ve=Array(ie.size);return ie.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Rh(ie,xe){return function(ve){return ie(xe(ve))}}function Ho(ie,xe){for(var ve=-1,Ke=ie.length,_t=0,Jt=[];++ve-1}function _2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=w2,Wo.prototype.delete=C2,Wo.prototype.get=F1,Wo.prototype.has=$1,Wo.prototype.set=_2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,R,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=R?S(c,A,R,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=mV(c),!J)return wi(c,K)}else{var Le=si(c),je=Le==At||Le==wt;if(vc(c))return Xs(c,J);if(Le==ut||Le==He||je&&!R){if(K=ce||je?{}:ck(c),!J)return ce?ig(c,sc(K,c)):yo(c,Qe(K,c))}else{if(!Wt[Le])return R?c:{};K=vV(c,Le,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,jt){K.set(jt,ii(bt,p,S,jt,c,F))});var yt=_e?ce?ge:Ko:ce?xo:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Vs(K,jt,ii(bt,p,S,jt,c,F))}),K}function Wh(c){var p=li(c);return function(S){return Vh(S,c,p)}}function Vh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var R=S[A],F=p[R],K=c[R];if(K===n&&!(R in c)||!F(K))return!1}return!0}function U1(c,p,S){if(typeof c!="function")throw new vi(a);return ug(function(){c.apply(n,S)},p)}function lc(c,p,S,A){var R=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Lh,K=!1):p.length>=i&&(F=ju,K=!1,p=new Sa(p));e:for(;++RR?0:R+S),A=A===n||A>R?R:Dt(A),A<0&&(A+=R),A=S>A?0:Hk(A);S0&&S(J)?p>1?Tr(J,p-1,S,A,R):ya(R,J):A||(R[R.length]=J)}return R}var jh=Qs(),go=Qs(!0);function qo(c,p){return c&&jh(c,p,li)}function mo(c,p){return c&&go(c,p,li)}function Gh(c,p){return ho(p,function(S){return Xl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Kh(c,p){return c!=null&&tn.call(c,p)}function Yh(c,p){return c!=null&&p in cn(c)}function Zh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Le=-1,je=J[0];e:for(;++Le-1;)J!==c&&Gd.call(J,ce,1),Gd.call(c,ce,1);return c}function tf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var R=p[S];if(S==A||R!==F){var F=R;Zl(R)?Gd.call(c,R,1):ap(c,R)}}return c}function nf(c,p){return c+Ul(O1()*(p-c+1))}function Ks(c,p,S,A){for(var R=-1,F=vr(Yd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++R]=c,c+=S;return K}function pc(c,p){var S="";if(!c||p<1||p>V)return S;do p%2&&(S+=c),p=Ul(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return kx(hk(c,p,So),c+"")}function tp(c){return ac(hp(c))}function rf(c,p){var S=hp(c);return M2(S,Gl(p,0,S.length))}function Kl(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var R=-1,F=p.length,K=F-1,J=c;J!=null&&++RR?0:R+p),S=S>R?R:S,S<0&&(S+=R),R=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(R);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Wd(_e);K=!1,R=ju,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var eg=c2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Zu?Zu(S):new c.constructor(S);return c.copy(A),A}function tg(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Yl(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function T2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Xd?cn(Xd.call(c)):{}}function L2(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ng(c,p){if(c!==p){var S=c!==n,A=c===null,R=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!R)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function A2(c,p,S,A){for(var R=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Le=!A;++J1?S[R-1]:n,K=R>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(R--,F):n,K&&Qi(S[0],S[1],K)&&(F=R<3?n:F,R=1),p=cn(p);++A-1?R[F?p[K]:K]:n}}function ag(c){return er(function(p){var S=p.length,A=S,R=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(R&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Le=-1,je=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(s1,`{ /* [wrapped with `+p+`] */ -`)}function bV(c){return Rt(c)||ff(c)||!!(I1&&c&&c[I1])}function Yl(c,p){var S=typeof c;return p=p??V,!!p&&(S=="number"||S!="symbol"&&m1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function M2(c,p){var S=-1,A=c.length,R=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function AU(c,p){return p(c),c}function O2(c,p){return p(c)}var IU=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,R=function(F){return Hh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(R):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:O2,args:[R],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function MU(){return Ek(this)}function OU(){return new Ki(this.value(),this.__chain__)}function RU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function NU(){return this}function DU(c){for(var p,S=this;S instanceof Qd;){var A=bk(S);A.__index__=0,A.__values__=n,p?R.__wrapped__=A:p=A;var R=A;S=S.__wrapped__}return R.__wrapped__=c,p}function zU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:O2,args:[Ex],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Ex)}function BU(){return Ys(this.__wrapped__,this.__actions__)}var FU=lp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function $U(c,p,S){var A=Rt(c)?zn:j1;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}function HU(c,p){var S=Rt(c)?ho:Go;return S(c,Te(p,3))}var WU=og(xk),VU=og(Sk);function UU(c,p){return Tr(R2(c,p),1)}function jU(c,p){return Tr(R2(c,p),G)}function GU(c,p,S){return S=S===n?1:Dt(S),Tr(R2(c,p),S)}function Pk(c,p){var S=Rt(c)?Vn:Qa;return S(c,Te(p,3))}function Tk(c,p){var S=Rt(c)?fo:Uh;return S(c,Te(p,3))}var qU=lp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function KU(c,p,S,A){c=bo(c)?c:hp(c),S=S&&!A?Dt(S):0;var R=c.length;return S<0&&(S=vr(R+S,0)),F2(c)?S<=R&&c.indexOf(p,S)>-1:!!R&&Vu(c,p,S)>-1}var YU=Ct(function(c,p,S){var A=-1,R=typeof p=="function",F=bo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=R?mi(p,K,S):Ja(K,p,S)}),F}),ZU=lp(function(c,p,S){Uo(c,S,p)});function R2(c,p){var S=Rt(c)?Bn:xr;return S(c,Te(p,3))}function XU(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var QU=lp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function JU(c,p,S){var A=Rt(c)?Nd:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Qa)}function ej(c,p,S){var A=Rt(c)?e2:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Uh)}function tj(c,p){var S=Rt(c)?ho:Go;return S(c,z2(Te(p,3)))}function nj(c){var p=Rt(c)?ac:tp;return p(c)}function rj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:rf;return A(c,p)}function ij(c){var p=Rt(c)?vx:ai;return p(c)}function oj(c){if(c==null)return 0;if(bo(c))return F2(c)?xa(c):c.length;var p=si(c);return p==Ae||p==Zt?c.size:Lr(c).length}function aj(c,p,S){var A=Rt(c)?Hu:vo;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}var sj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Tr(p,1),[])}),N2=d2||function(){return mt.Date.now()};function lj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Tx=Ct(function(c,p,S){var A=P;if(S.length){var R=Ho(S,We(Tx));A|=O}return he(c,A,p,S,R)}),Ik=Ct(function(c,p,S){var A=P|E;if(S.length){var R=Ho(S,We(Ik));A|=O}return he(p,A,c,S,R)});function Mk(c,p,S){p=S?n:p;var A=he(c,T,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,R,F,K,J,ce,_e=0,ke=!1,Le=!1,je=!0;if(typeof c!="function")throw new vi(a);p=ka(p)||0,lr(S)&&(ke=!!S.leading,Le="maxWait"in S,F=Le?vr(ka(S.maxWait)||0,p):F,je="trailing"in S?!!S.trailing:je);function ht(Mr){var is=A,Ql=R;return A=R=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=ug(jt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Jk=p-is;return Le?Kr(Jk,F-Ql):Jk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Le&&Ql>=F}function jt(){var Mr=N2();if(bt(Mr))return en(Mr);J=ug(jt,$t(Mr))}function en(Mr){return J=n,je&&A?ht(Mr):(A=R=n,K)}function Zo(){J!==n&&eg(J),_e=0,A=ce=R=J=n}function Ji(){return J===n?K:en(N2())}function Xo(){var Mr=N2(),is=bt(Mr);if(A=arguments,R=this,ce=Mr,is){if(J===n)return yt(ce);if(Le)return eg(J),J=ug(jt,p),ht(ce)}return J===n&&(J=ug(jt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var uj=Ct(function(c,p){return U1(c,1,p)}),cj=Ct(function(c,p,S){return U1(c,ka(p)||0,S)});function dj(c){return he(c,$)}function D2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,R=p?p.apply(this,A):A[0],F=S.cache;if(F.has(R))return F.get(R);var K=c.apply(this,A);return S.cache=F.set(R,K)||F,K};return S.cache=new(D2.Cache||Vo),S}D2.Cache=Vo;function z2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function fj(c){return Ak(2,c)}var hj=xx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Te())):Bn(Tr(p,1),Er(Te()));var S=p.length;return Ct(function(A){for(var R=-1,F=Kr(A.length,S);++R=p}),ff=Qh(function(){return arguments}())?Qh:function(c){return Sr(c)&&tn.call(c,"callee")&&!A1.call(c,"callee")},Rt=ve.isArray,Tj=Gr?Er(Gr):q1;function bo(c){return c!=null&&B2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&bo(c)}function Lj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var vc=f2||$x,Aj=co?Er(co):K1;function Ij(c){return Sr(c)&&c.nodeType===1&&!cg(c)}function Mj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||vc(c)||fp(c)||ff(c)))return!c.length;var p=si(c);if(p==Ae||p==Zt)return!c.size;if(lg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Oj(c,p){return cc(c,p)}function Rj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?cc(c,p,n,S):!!A}function Ax(c){if(!Sr(c))return!1;var p=oi(c);return p==at||p==tt||typeof c.message=="string"&&typeof c.name=="string"&&!cg(c)}function Nj(c){return typeof c=="number"&&zh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==At||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function B2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=V}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):bx;function Dj(c,p){return c===p||dc(c,p,kt(p))}function zj(c,p,S){return S=typeof S=="function"?S:n,dc(c,p,kt(p),S)}function Bj(c){return Bk(c)&&c!=+c}function Fj(c){if(wV(c))throw new _t(o);return Jh(c)}function $j(c){return c===null}function Hj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==dt}function cg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Xu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ix=ya?Er(ya):ar;function Wj(c){return Dk(c)&&c>=-V&&c<=V}var Fk=Bs?Er(Bs):Bt;function F2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var fp=S1?Er(S1):zr;function Vj(c){return c===n}function Uj(c){return Sr(c)&&si(c)==Je}function jj(c){return Sr(c)&&oi(c)==Xt}var Gj=_(js),qj=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(bo(c))return F2(c)?Di(c):wi(c);if(Qu&&c[Qu])return o2(c[Qu]());var p=si(c),S=p==Ae?Oh:p==Zt?Wd:hp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=ka(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?jl(Dt(c),0,X):0}function ka(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=h1.test(c);return S||g1.test(c)?Ze(c.slice(2),S?2:8):f1.test(c)?Q:+c}function Wk(c){return Ca(c,xo(c))}function Kj(c){return c?jl(Dt(c),-V,V):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var Yj=Xi(function(c,p){if(lg(p)||bo(p)){Ca(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){Ca(p,xo(p),c)}),$2=Xi(function(c,p,S,A){Ca(p,xo(p),c,A)}),Zj=Xi(function(c,p,S,A){Ca(p,li(p),c,A)}),Xj=er(Hh);function Qj(c,p){var S=Ul(c);return p==null?S:Qe(S,p)}var Jj=Ct(function(c,p){c=cn(c);var S=-1,A=p.length,R=A>2?p[2]:n;for(R&&Qi(p[0],p[1],R)&&(A=1);++S1),F}),Ca(c,ge(c),S),A&&(S=ii(S,g|m|v,Tt));for(var R=p.length;R--;)ap(S,p[R]);return S});function vG(c,p){return jk(c,z2(Te(p)))}var yG=er(function(c,p){return c==null?{}:X1(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Te(p),ep(c,S,function(A,R){return p(A,R[0])})}function bG(c,p,S){p=Zs(p,c);var A=-1,R=p.length;for(R||(R=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var R=O1();return Kr(c+R*(p-c+pe("1e-"+((R+"").length-1))),p)}return nf(c,p)}var AG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Rx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(v1,i2).replace(kh,"")}function IG(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var R=S;return S-=p.length,S>=0&&c.slice(S,R)==p}function MG(c){return c=Sn(c),c&&ma.test(c)?c.replace(As,Ya):c}function OG(c){return c=Sn(c),c&&a1.test(c)?c.replace(Ed,"\\$&"):c}var RG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),NG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),DG=cp("toLowerCase");function zG(c,p,S){c=Sn(c),p=Dt(p);var A=p?xa(c):0;if(!p||A>=p)return c;var R=(p-A)/2;return d(Vl(R),S)+c+d(Yd(R),S)}function BG(c,p,S){c=Sn(c),p=Dt(p);var A=p?xa(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ix(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var jG=Js(function(c,p,S){return c+(S?" ":"")+Rx(p)});function GG(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function qG(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=$2({},p,A,Re);var R=$2({},p.imports,A.imports,Re),F=li(R),K=Hd(R,F),J,ce,_e=0,ke=p.interpolate||Ms,Le="__p += '",je=Ud((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Mu?d1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ph+"]")+` +`)}function bV(c){return Rt(c)||ff(c)||!!(I1&&c&&c[I1])}function Zl(c,p){var S=typeof c;return p=p??V,!!p&&(S=="number"||S!="symbol"&&m1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function M2(c,p){var S=-1,A=c.length,R=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function AU(c,p){return p(c),c}function O2(c,p){return p(c)}var IU=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,R=function(F){return Hh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Zl(S)?this.thru(R):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:O2,args:[R],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function MU(){return Ek(this)}function OU(){return new Ki(this.value(),this.__chain__)}function RU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function NU(){return this}function DU(c){for(var p,S=this;S instanceof Qd;){var A=bk(S);A.__index__=0,A.__values__=n,p?R.__wrapped__=A:p=A;var R=A;S=S.__wrapped__}return R.__wrapped__=c,p}function zU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:O2,args:[Ex],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Ex)}function BU(){return Ys(this.__wrapped__,this.__actions__)}var FU=lp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function $U(c,p,S){var A=Rt(c)?zn:j1;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}function HU(c,p){var S=Rt(c)?ho:Go;return S(c,Te(p,3))}var WU=og(xk),VU=og(Sk);function UU(c,p){return Tr(R2(c,p),1)}function jU(c,p){return Tr(R2(c,p),G)}function GU(c,p,S){return S=S===n?1:Dt(S),Tr(R2(c,p),S)}function Pk(c,p){var S=Rt(c)?Vn:Qa;return S(c,Te(p,3))}function Tk(c,p){var S=Rt(c)?fo:Uh;return S(c,Te(p,3))}var qU=lp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function KU(c,p,S,A){c=bo(c)?c:hp(c),S=S&&!A?Dt(S):0;var R=c.length;return S<0&&(S=vr(R+S,0)),F2(c)?S<=R&&c.indexOf(p,S)>-1:!!R&&Vu(c,p,S)>-1}var YU=Ct(function(c,p,S){var A=-1,R=typeof p=="function",F=bo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=R?mi(p,K,S):Ja(K,p,S)}),F}),ZU=lp(function(c,p,S){Uo(c,S,p)});function R2(c,p){var S=Rt(c)?Bn:xr;return S(c,Te(p,3))}function XU(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var QU=lp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function JU(c,p,S){var A=Rt(c)?Nd:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Qa)}function ej(c,p,S){var A=Rt(c)?e2:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Uh)}function tj(c,p){var S=Rt(c)?ho:Go;return S(c,z2(Te(p,3)))}function nj(c){var p=Rt(c)?ac:tp;return p(c)}function rj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:rf;return A(c,p)}function ij(c){var p=Rt(c)?vx:ai;return p(c)}function oj(c){if(c==null)return 0;if(bo(c))return F2(c)?ba(c):c.length;var p=si(c);return p==Ae||p==Zt?c.size:Lr(c).length}function aj(c,p,S){var A=Rt(c)?Hu:vo;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}var sj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Tr(p,1),[])}),N2=d2||function(){return mt.Date.now()};function lj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Tx=Ct(function(c,p,S){var A=P;if(S.length){var R=Ho(S,We(Tx));A|=O}return he(c,A,p,S,R)}),Ik=Ct(function(c,p,S){var A=P|E;if(S.length){var R=Ho(S,We(Ik));A|=O}return he(p,A,c,S,R)});function Mk(c,p,S){p=S?n:p;var A=he(c,T,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,R,F,K,J,ce,_e=0,ke=!1,Le=!1,je=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Le="maxWait"in S,F=Le?vr(_a(S.maxWait)||0,p):F,je="trailing"in S?!!S.trailing:je);function ht(Mr){var is=A,Jl=R;return A=R=n,_e=Mr,K=c.apply(Jl,is),K}function yt(Mr){return _e=Mr,J=ug(jt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Jl=Mr-_e,Jk=p-is;return Le?Kr(Jk,F-Jl):Jk}function bt(Mr){var is=Mr-ce,Jl=Mr-_e;return ce===n||is>=p||is<0||Le&&Jl>=F}function jt(){var Mr=N2();if(bt(Mr))return en(Mr);J=ug(jt,$t(Mr))}function en(Mr){return J=n,je&&A?ht(Mr):(A=R=n,K)}function Zo(){J!==n&&eg(J),_e=0,A=ce=R=J=n}function Ji(){return J===n?K:en(N2())}function Xo(){var Mr=N2(),is=bt(Mr);if(A=arguments,R=this,ce=Mr,is){if(J===n)return yt(ce);if(Le)return eg(J),J=ug(jt,p),ht(ce)}return J===n&&(J=ug(jt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var uj=Ct(function(c,p){return U1(c,1,p)}),cj=Ct(function(c,p,S){return U1(c,_a(p)||0,S)});function dj(c){return he(c,$)}function D2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,R=p?p.apply(this,A):A[0],F=S.cache;if(F.has(R))return F.get(R);var K=c.apply(this,A);return S.cache=F.set(R,K)||F,K};return S.cache=new(D2.Cache||Vo),S}D2.Cache=Vo;function z2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function fj(c){return Ak(2,c)}var hj=xx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Te())):Bn(Tr(p,1),Er(Te()));var S=p.length;return Ct(function(A){for(var R=-1,F=Kr(A.length,S);++R=p}),ff=Qh(function(){return arguments}())?Qh:function(c){return Sr(c)&&tn.call(c,"callee")&&!A1.call(c,"callee")},Rt=ve.isArray,Tj=Gr?Er(Gr):q1;function bo(c){return c!=null&&B2(c.length)&&!Xl(c)}function Ir(c){return Sr(c)&&bo(c)}function Lj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var vc=f2||$x,Aj=co?Er(co):K1;function Ij(c){return Sr(c)&&c.nodeType===1&&!cg(c)}function Mj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||vc(c)||fp(c)||ff(c)))return!c.length;var p=si(c);if(p==Ae||p==Zt)return!c.size;if(lg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Oj(c,p){return cc(c,p)}function Rj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?cc(c,p,n,S):!!A}function Ax(c){if(!Sr(c))return!1;var p=oi(c);return p==at||p==tt||typeof c.message=="string"&&typeof c.name=="string"&&!cg(c)}function Nj(c){return typeof c=="number"&&zh(c)}function Xl(c){if(!lr(c))return!1;var p=oi(c);return p==At||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function B2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=V}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):bx;function Dj(c,p){return c===p||dc(c,p,kt(p))}function zj(c,p,S){return S=typeof S=="function"?S:n,dc(c,p,kt(p),S)}function Bj(c){return Bk(c)&&c!=+c}function Fj(c){if(wV(c))throw new _t(o);return Jh(c)}function $j(c){return c===null}function Hj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==dt}function cg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Xu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ix=va?Er(va):ar;function Wj(c){return Dk(c)&&c>=-V&&c<=V}var Fk=Bs?Er(Bs):Bt;function F2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var fp=S1?Er(S1):zr;function Vj(c){return c===n}function Uj(c){return Sr(c)&&si(c)==Je}function jj(c){return Sr(c)&&oi(c)==Xt}var Gj=_(js),qj=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(bo(c))return F2(c)?Di(c):wi(c);if(Qu&&c[Qu])return o2(c[Qu]());var p=si(c),S=p==Ae?Oh:p==Zt?Wd:hp;return S(c)}function Ql(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Ql(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?Gl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=h1.test(c);return S||g1.test(c)?Ze(c.slice(2),S?2:8):f1.test(c)?Q:+c}function Wk(c){return wa(c,xo(c))}function Kj(c){return c?Gl(Dt(c),-V,V):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var Yj=Xi(function(c,p){if(lg(p)||bo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){wa(p,xo(p),c)}),$2=Xi(function(c,p,S,A){wa(p,xo(p),c,A)}),Zj=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),Xj=er(Hh);function Qj(c,p){var S=jl(c);return p==null?S:Qe(S,p)}var Jj=Ct(function(c,p){c=cn(c);var S=-1,A=p.length,R=A>2?p[2]:n;for(R&&Qi(p[0],p[1],R)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Tt));for(var R=p.length;R--;)ap(S,p[R]);return S});function vG(c,p){return jk(c,z2(Te(p)))}var yG=er(function(c,p){return c==null?{}:X1(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Te(p),ep(c,S,function(A,R){return p(A,R[0])})}function bG(c,p,S){p=Zs(p,c);var A=-1,R=p.length;for(R||(R=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var R=O1();return Kr(c+R*(p-c+pe("1e-"+((R+"").length-1))),p)}return nf(c,p)}var AG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Rx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(v1,i2).replace(kh,"")}function IG(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:Gl(Dt(S),0,A);var R=S;return S-=p.length,S>=0&&c.slice(S,R)==p}function MG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function OG(c){return c=Sn(c),c&&a1.test(c)?c.replace(Ed,"\\$&"):c}var RG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),NG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),DG=cp("toLowerCase");function zG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var R=(p-A)/2;return d(Ul(R),S)+c+d(Yd(R),S)}function BG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ix(p))&&(p=Zi(p),!p&&Wl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var jG=Js(function(c,p,S){return c+(S?" ":"")+Rx(p)});function GG(c,p,S){return c=Sn(c),S=S==null?0:Gl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function qG(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=$2({},p,A,Re);var R=$2({},p.imports,A.imports,Re),F=li(R),K=Hd(R,F),J,ce,_e=0,ke=p.interpolate||Ms,Le="__p += '",je=Ud((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Mu?d1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ph+"]")+` `;c.replace(je,function(bt,jt,en,Zo,Ji,Xo){return en||(en=Zo),Le+=c.slice(_e,Xo).replace(y1,$s),jt&&(J=!0,Le+=`' + __e(`+jt+`) + '`),Ji&&(ce=!0,Le+=`'; @@ -473,8 +473,8 @@ __p += '`),en&&(Le+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Le+`return __p -}`;var $t=Xk(function(){return Jt(F,ht+"return "+Le).apply(n,K)});if($t.source=Le,Ax($t))throw $t;return $t}function KG(c){return Sn(c).toLowerCase()}function YG(c){return Sn(c).toUpperCase()}function ZG(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Di(p),F=$o(A,R),K=Ka(A,R)+1;return ts(A,F,K).join("")}function XG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,E1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Ka(A,Di(p))+1;return ts(A,0,R).join("")}function QG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Ou,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),R=$o(A,Di(p));return ts(A,R).join("")}function JG(c,p){var S=W,A=Y;if(lr(p)){var R="separator"in p?p.separator:R;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-xa(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(R===n)return ce+A;if(K&&(J+=ce.length-J),Ix(R)){if(c.slice(J).search(R)){var _e,ke=ce;for(R.global||(R=Ud(R.source,Sn(Ua.exec(R))+"g")),R.lastIndex=0;_e=R.exec(ke);)var Le=_e.index;ce=ce.slice(0,Le===n?J:Le)}}else if(c.indexOf(Zi(R),J)!=J){var je=ce.lastIndexOf(R);je>-1&&(ce=ce.slice(0,je))}return ce+A}function eq(c){return c=Sn(c),c&&i1.test(c)?c.replace(pi,l2):c}var tq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Rx=cp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Mh(c)?Vd(c):C1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Ax(S)?S:new _t(S)}}),nq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Tx(c[S],c))}),c});function rq(c){var p=c==null?0:c.length,S=Te();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var R=-1;++RV)return[];var S=X,A=Kr(c,X);p=Te(p),c-=X;for(var R=$d(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),R=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!R||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Le=function(jt){var en=R.apply(B,ba([jt],J));return A&&je?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var je=this.__chain__,ht=!!this.__actions__.length,yt=F&&!je,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:O2,args:[Le],thisArg:n}),new Ki(bt,je)}return yt&&$t?c.apply(this,J):(bt=this.thru(Le),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=qu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var R=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],R)}return this[S](function(K){return p.apply(Rt(K)?K:[],R)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[uf(n,E).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=v2,B.prototype.at=IU,B.prototype.chain=MU,B.prototype.commit=OU,B.prototype.next=RU,B.prototype.plant=DU,B.prototype.reverse=zU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=BU,B.prototype.first=B.prototype.head,Qu&&(B.prototype[Qu]=NU),B},Sa=po();Vt?((Vt.exports=Sa)._=Sa,Pt._=Sa):mt._=Sa}).call(gs)})(da,da.exports);const Ge=da.exports;var w2e=Object.create,$F=Object.defineProperty,C2e=Object.getOwnPropertyDescriptor,_2e=Object.getOwnPropertyNames,k2e=Object.getPrototypeOf,E2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),P2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _2e(t))!E2e.call(e,i)&&i!==n&&$F(e,i,{get:()=>t[i],enumerable:!(r=C2e(t,i))||r.enumerable});return e},HF=(e,t,n)=>(n=e!=null?w2e(k2e(e)):{},P2e(t||!e||!e.__esModule?$F(n,"default",{value:e,enumerable:!0}):n,e)),T2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),WF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Lb=De((e,t)=>{var n=WF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),L2e=De((e,t)=>{var n=Lb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),A2e=De((e,t)=>{var n=Lb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),I2e=De((e,t)=>{var n=Lb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),M2e=De((e,t)=>{var n=Lb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ab=De((e,t)=>{var n=T2e(),r=L2e(),i=A2e(),o=I2e(),a=M2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab();function r(){this.__data__=new n,this.size=0}t.exports=r}),R2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),N2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),D2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),VF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=VF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),z2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),B2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Ib=De((e,t)=>{var n=w_(),r=z2e(),i=B2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),UF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),jF=De((e,t)=>{var n=Ib(),r=UF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),F2e=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),$2e=De((e,t)=>{var n=F2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),GF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),H2e=De((e,t)=>{var n=jF(),r=$2e(),i=UF(),o=GF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),W2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),Q0=De((e,t)=>{var n=H2e(),r=W2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Map");t.exports=i}),Mb=De((e,t)=>{var n=Q0(),r=n(Object,"create");t.exports=r}),V2e=De((e,t)=>{var n=Mb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),U2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),j2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),G2e=De((e,t)=>{var n=Mb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),q2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),K2e=De((e,t)=>{var n=V2e(),r=U2e(),i=j2e(),o=G2e(),a=q2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=K2e(),r=Ab(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Z2e=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Ob=De((e,t)=>{var n=Z2e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),X2e=De((e,t)=>{var n=Ob();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Q2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).get(i)}t.exports=r}),J2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).has(i)}t.exports=r}),eye=De((e,t)=>{var n=Ob();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),qF=De((e,t)=>{var n=Y2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab(),r=C_(),i=qF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ab(),r=O2e(),i=R2e(),o=N2e(),a=D2e(),s=tye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),rye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),iye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),oye=De((e,t)=>{var n=qF(),r=rye(),i=iye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),KF=De((e,t)=>{var n=oye(),r=aye(),i=sye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,P=u.length;if(w!=P&&!(b&&P>w))return!1;var E=v.get(l),k=v.get(u);if(E&&k)return E==u&&k==l;var T=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),uye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),cye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),dye=De((e,t)=>{var n=w_(),r=lye(),i=WF(),o=KF(),a=uye(),s=cye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,N=O?O.valueOf:void 0;function D(z,$,W,Y,de,j,te){switch(W){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var re=a;case P:var se=Y&l;if(re||(re=s),z.size!=$.size&&!se)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var V=o(re(z),re($),Y,de,j,te);return te.delete(z),V;case k:if(N)return N.call(z)==N.call($)}return!1}t.exports=D}),fye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),hye=De((e,t)=>{var n=fye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),pye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),mye=De((e,t)=>{var n=pye(),r=gye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),vye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),yye=De((e,t)=>{var n=Ib(),r=Rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),bye=De((e,t)=>{var n=yye(),r=Rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),xye=De((e,t)=>{function n(){return!1}t.exports=n}),YF=De((e,t)=>{var n=Eu(),r=xye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Sye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),wye=De((e,t)=>{var n=Ib(),r=ZF(),i=Rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[N]=j[D]=j[z]=j[$]=j[W]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[T]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[P]=j[E]=!1;function te(re){return i(re)&&r(re.length)&&!!j[n(re)]}t.exports=te}),Cye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),_ye=De((e,t)=>{var n=VF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),XF=De((e,t)=>{var n=wye(),r=Cye(),i=_ye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),kye=De((e,t)=>{var n=vye(),r=bye(),i=__(),o=YF(),a=Sye(),s=XF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),P=!v&&!b&&!w&&s(g),E=v||b||w||P,k=E?n(g.length,String):[],T=k.length;for(var I in g)(m||u.call(g,I))&&!(E&&(I=="length"||w&&(I=="offset"||I=="parent")||P&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,T)))&&k.push(I);return k}t.exports=h}),Eye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Pye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Tye=De((e,t)=>{var n=Pye(),r=n(Object.keys,Object);t.exports=r}),Lye=De((e,t)=>{var n=Eye(),r=Tye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Aye=De((e,t)=>{var n=jF(),r=ZF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Iye=De((e,t)=>{var n=kye(),r=Lye(),i=Aye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Mye=De((e,t)=>{var n=hye(),r=mye(),i=Iye();function o(a){return n(a,i,r)}t.exports=o}),Oye=De((e,t)=>{var n=Mye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var N=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=Q0(),r=Eu(),i=n(r,"DataView");t.exports=i}),Nye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Promise");t.exports=i}),Dye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Set");t.exports=i}),zye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),Bye=De((e,t)=>{var n=Rye(),r=C_(),i=Nye(),o=Dye(),a=zye(),s=Ib(),l=GF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),P=l(r),E=l(i),k=l(o),T=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var N=s(O),D=N==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case P:return u;case E:return g;case k:return m;case T:return v}return N}),t.exports=I}),Fye=De((e,t)=>{var n=nye(),r=KF(),i=dye(),o=Oye(),a=Bye(),s=__(),l=YF(),u=XF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function P(E,k,T,I,O,N){var D=s(E),z=s(k),$=D?m:a(E),W=z?m:a(k);$=$==g?v:$,W=W==g?v:W;var Y=$==v,de=W==v,j=$==W;if(j&&l(E)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return N||(N=new n),D||u(E)?r(E,k,T,I,O,N):i(E,k,$,T,I,O,N);if(!(T&h)){var te=Y&&w.call(E,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(te||re){var se=te?E.value():E,G=re?k.value():k;return N||(N=new n),O(se,G,T,I,N)}}return j?(N||(N=new n),o(E,k,T,I,O,N)):!1}t.exports=P}),$ye=De((e,t)=>{var n=Fye(),r=Rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),QF=De((e,t)=>{var n=$ye();function r(i,o){return n(i,o)}t.exports=r}),Hye=["ctrl","shift","alt","meta","mod"],Wye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function s6(e,t=","){return typeof e=="string"?e.split(t):e}function km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Wye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Hye.includes(o));return{...r,keys:i}}function Vye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Uye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function jye(e){return JF(e,["input","textarea","select"])}function JF({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Gye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var qye=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},Kye=C.exports.createContext(void 0),Yye=()=>C.exports.useContext(Kye),Zye=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Xye=()=>C.exports.useContext(Zye),Qye=HF(QF());function Jye(e){let t=C.exports.useRef(void 0);return(0,Qye.default)(t.current,e)||(t.current=e),t.current}var SA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=Jye(a),{enabledScopes:h}=Xye(),g=Yye();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Gye(h,u?.scopes))return;let m=w=>{if(!(jye(w)&&!JF(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||s6(e,u?.splitKey).forEach(P=>{let E=km(P,u?.combinationKey);if(qye(w,E,o)||E.keys?.includes("*")){if(Vye(w,E,u?.preventDefault),!Uye(w,E,u?.enabled)){SA(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.addHotkey(km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.removeHotkey(km(w,u?.combinationKey)))}},[e,l,u,h]),i}HF(QF());var FC=new Set;function e3e(e){(Array.isArray(e)?e:[e]).forEach(t=>FC.add(km(t)))}function t3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=km(t);for(let r of FC)r.keys?.every(i=>n.keys?.includes(i))&&FC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{e3e(e.key)}),document.addEventListener("keyup",e=>{t3e(e.key)})});function n3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const r3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),i3e=lt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),o3e=lt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),a3e=lt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),s3e=lt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),l3e=lt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),u3e=lt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const c3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(ih,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Nb(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(n7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:k,...T}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const N=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ge.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(ih,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:N,onBlur:D,width:a,...T,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...E,className:"invokeai__number-input-stepper-button"}),x(X7,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},uh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(gd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(ih,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(VB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},d3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],f3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],h3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],p3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,g3e=["gfpgan","codeformer"],m3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],v3e=Xe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),y3e=Xe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),Uv=()=>{const e=Fe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(v3e),{isGFPGANAvailable:i}=Ce(y3e),o=l=>e(N3(l)),a=l=>e(MW(l)),s=l=>e(D3(l.target.value));return ee(an,{direction:"column",gap:2,children:[x(uh,{label:"Type",validValues:g3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function b3e(){const e=Fe(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(OW(r.target.checked))})}var e$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=le.createContext&&le.createContext(e$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ch(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:N,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:re,sliderTooltipProps:se,sliderIAIIconButtonProps:G,...V}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ge.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!T||T()};return ee(gd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(ih,{className:"invokeai__slider-component-label",...$,children:r}),ee(bz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...V,children:[h&&ee(Kn,{children:[x(LC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),x(LC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(eF,{className:"invokeai__slider_track",...Y,children:x(tF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...se,children:x(JB,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:N,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:P,...te}),ee(DB,{...re,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function T_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=Fe();return x(ch,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const i$=()=>x(md,{flex:"1",textAlign:"left",children:"Other Options"}),P3e=()=>{const e=Fe(),t=Ce(r=>r.options.hiresFix);return x(an,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(IW(r.target.checked))})})},T3e=()=>{const e=Fe(),t=Ce(r=>r.options.seamless);return x(an,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(AW(r.target.checked))})})},o$=()=>ee(an,{gap:2,direction:"column",children:[x(T3e,{}),x(P3e,{})]}),Db=()=>x(md,{flex:"1",textAlign:"left",children:"Seed"});function L3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(i7e(r.target.checked))})}function A3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=Fe(),i=o=>r(Qv(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const a$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function I3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(aa,{size:"sm",isDisabled:t,onClick:()=>e(Qv(a$(k_,E_))),children:x("p",{children:"Shuffle"})})}function M3e(){const e=Fe(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(X9e(r)),value:t,isInteger:!1})}function O3e(){const e=Fe(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(Q9e(r)),value:t,isInteger:!1})}const zb=()=>ee(an,{gap:2,direction:"column",children:[x(L3e,{}),ee(an,{gap:2,children:[x(A3e,{}),x(I3e,{})]}),x(an,{gap:2,children:x(M3e,{})}),x(an,{gap:2,children:x(O3e,{})})]});function Bb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(r7e(i.target.checked))})]})}const R3e=Xe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),N3e=Xe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),jv=()=>{const e=Fe(),{upscalingLevel:t,upscalingStrength:n}=Ce(R3e),{isESRGANAvailable:r}=Ce(N3e);return ee("div",{className:"upscale-options",children:[x(uh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:p3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function D3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=Fe();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(J9e(r.target.checked))})}function Fb(){return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(D3e,{})]})}function z3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(ih,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function B3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe(),r=i=>n(RW(i.target.value));return x(z3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function F3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(e7e(i)),isInteger:!1})}const $b=()=>ee(an,{gap:2,direction:"column",children:[x(F3e,{}),x(B3e,{})]}),Ia=e=>{const{label:t,styleClass:n,...r}=e;return x(tz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Hb(){const e=Ce(r=>r.options.showAdvancedOptions),t=Fe();return x(Ia,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(o7e(r.target.checked)),isChecked:e})}function $3e(){const e=Fe(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(EW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const rn=Xe(e=>e.options,e=>ux[e.activeTab],{memoizeOptions:{equalityCheck:Ge.isEqual}}),H3e=Xe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function W3e(){const e=Ce(i=>i.options.height),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(PW(Number(i.target.value))),validValues:h3e,styleClass:"main-option-block"})}const V3e=Xe([e=>e.options,H3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function U3e(){const e=Fe(),{iterations:t,mayGenerateMultipleImages:n}=Ce(V3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Z9e(i)),value:t,width:L_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function j3e(){const e=Ce(r=>r.options.sampler),t=Fe();return x(uh,{label:"Sampler",value:e,onChange:r=>t(LW(r.target.value)),validValues:d3e,styleClass:"main-option-block"})}function G3e(){const e=Fe(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(kW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center"})}function q3e(){const e=Ce(i=>i.options.width),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(TW(Number(i.target.value))),validValues:f3e,styleClass:"main-option-block"})}const L_="auto";function Wb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(U3e,{}),x(G3e,{}),x($3e,{})]}),ee("div",{className:"main-options-row",children:[x(q3e,{}),x(W3e,{}),x(j3e,{})]})]})})}const K3e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},s$=vb({name:"system",initialState:K3e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:Y3e,setIsProcessing:g0,addLogEntry:Ei,setShouldShowLogViewer:l6,setIsConnected:_A,setSocketId:Yke,setShouldConfirmOnDelete:l$,setOpenAccordions:Z3e,setSystemStatus:X3e,setCurrentStatus:u6,setSystemConfig:Q3e,setShouldDisplayGuides:J3e,processingCanceled:e4e,errorOccurred:$C,errorSeen:u$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:t4e,setSaveIntermediatesInterval:n4e,setEnableImageDebugging:r4e}=s$.actions,i4e=s$.reducer;function o4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function a4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function s4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function l4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function c$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function u4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function c4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const d4e=Xe(e=>e.system,e=>e.shouldDisplayGuides),f4e=({children:e,feature:t})=>{const n=Ce(d4e),{text:r}=c3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(md,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},h4e=Pe(({feature:e,icon:t=o4e},n)=>x(f4e,{feature:e,children:x(md,{ref:n,children:x(ga,{as:t})})}));function p4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(h4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Vb=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=Fe();return x(rb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(Z3e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(p4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function g4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function m4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function v4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function d$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function f$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function b4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function x4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function S4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function h$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function p$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function w4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function C4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function _4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function k4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function E4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function P4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function T4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function L4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function m$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function A4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function M4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function O4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function v$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function c6(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function B4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function y$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function F4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function $4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function I_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function M_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Py;const V4e=new Uint8Array(16);function U4e(){if(!Py&&(Py=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Py))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Py(V4e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function j4e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const G4e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:G4e};function Tp(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||U4e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return j4e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ty=(e,t)=>Math.round(e/t)*t,Ub=e=>e.kind==="line"&&e.layer==="mask",q4e=e=>e.kind==="line"&&e.layer==="base",K4e=e=>e.kind==="image"&&e.layer==="base",Y4e=e=>e.kind==="line",TA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:.5},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1},Z4e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",objects:[],pastObjects:[],futureObjects:[],...TA},outpainting:{layer:"base",objects:[],pastObjects:[],futureObjects:[],stagingArea:{images:[],selectedImageIndex:0},shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...TA}},b$=vb({name:"canvas",initialState:Z4e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=e[e.currentCanvas].objects.filter(t=>!Ub(t)),e[e.currentCanvas].futureObjects=[],e[e.currentCanvas].shouldInvertMask=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldInvertMask=!e[e.currentCanvas].shouldInvertMask},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldInvertMask:(e,t)=>{e[e.currentCanvas].shouldInvertMask=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{e.inpainting.imageToInpaint=void 0},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.imageToInpaint=t.payload,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ge.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ge.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,P=Ge.clamp(m,64,h),E=Ge.clamp(v,64,g),k=b>0?i-b:i,T=w>0?o-w:o,I=Ge.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-P),O=Ge.clamp(T,e[e.currentCanvas].stageCoordinates.y,g-E);e[e.currentCanvas].boundingBoxDimensions={width:P,height:E},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastObjects=[],e[e.currentCanvas].futureObjects=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpaintingSesion:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n;e.outpainting.pastObjects.push([...e.outpainting.objects]),e.outpainting.futureObjects=[],e.outpainting.objects.push({kind:"image",layer:"base",x:i,y:o,image:r})},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,eraserSize:a}=e[e.currentCanvas];n!=="move"&&(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects.push({kind:"line",layer:r,tool:n,strokeWidth:n==="brush"?o/2:a/2,points:t.payload,...r==="base"&&n==="brush"&&{color:i}}),e[e.currentCanvas].futureObjects=[])},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].objects.findLast(Y4e);!n||n.points.push(...t.payload)},undo:e=>{if(e.outpainting.objects.length===0)return;const t=e.outpainting.pastObjects.pop();!t||(e.outpainting.futureObjects.unshift(e.outpainting.objects),e.outpainting.objects=t)},redo:e=>{if(e.outpainting.futureObjects.length===0)return;const t=e.outpainting.futureObjects.shift();!t||(e.outpainting.pastObjects.push(e.outpainting.objects),e.outpainting.objects=t)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=[],e[e.currentCanvas].futureObjects=[]}},extraReducers:e=>{e.addCase(R_.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastObjects.push([...t.outpainting.objects]),t.outpainting.futureObjects=[],t.outpainting.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:Su,setLayer:X4e,setBrushColor:Q4e,setBrushSize:x$,setEraserSize:J4e,addLine:S$,addPointToCurrentLine:w$,setShouldInvertMask:e5e,setIsMaskEnabled:C$,setShouldShowCheckboardTransparency:Zke,setShouldShowBrushPreview:d6,setMaskColor:_$,clearMask:k$,clearImageToInpaint:t5e,undo:n5e,redo:r5e,setCursorPosition:E$,setStageDimensions:LA,setImageToInpaint:q4,setImageToOutpaint:P$,setBoundingBoxDimensions:qg,setBoundingBoxCoordinates:f6,setBoundingBoxPreviewFill:Xke,setDoesCanvasNeedScaling:Cr,setStageScale:T$,toggleTool:Qke,setShouldShowBoundingBox:O_,setShouldDarkenOutsideBoundingBox:L$,setIsDrawing:jb,setShouldShowBrush:Jke,setClearBrushHistory:i5e,setShouldUseInpaintReplace:o5e,setInpaintReplace:AA,setShouldLockBoundingBox:A$,toggleShouldLockBoundingBox:a5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:h6,setIsMouseOverBoundingBox:Ly,setIsMoveBoundingBoxKeyHeld:eEe,setIsMoveStageKeyHeld:tEe,setStageCoordinates:I$,setCurrentCanvas:M$,addImageToOutpaintingSesion:s5e,resetCanvas:l5e,setShouldShowGrid:u5e,setShouldSnapToGrid:c5e,setShouldAutoSave:d5e,setShouldShowIntermediates:f5e,setIsMovingStage:K4}=b$.actions,h5e=b$.reducer,R_=ove("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Tp(),...v},x:a,y:s}}),Yt=e=>e.canvas[e.canvas.currentCanvas],Gv=e=>e.canvas.outpainting,qv=Xe([e=>e.canvas,rn],(e,t)=>{if(t==="inpainting")return e.inpainting.imageToInpaint;if(t==="outpainting"){const n=e.outpainting.objects.find(r=>r.kind==="image");if(n&&n.kind==="image")return n.image}}),O$=Xe([e=>e.options,e=>e.system,qv,rn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ge.isEqual,resultEqualityCheck:Ge.isEqual}}),HC=Jr("socketio/generateImage"),p5e=Jr("socketio/runESRGAN"),g5e=Jr("socketio/runFacetool"),m5e=Jr("socketio/deleteImage"),WC=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),v5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const y5e=Jr("socketio/requestSystemConfig"),b5e=Jr("socketio/requestModelChange"),ou=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(aa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function R$(e){const{iconButton:t=!1,...n}=e,r=Fe(),{isReady:i,reasonsWhyNotReady:o}=Ce(O$),a=Ce(rn),s=()=>{r(HC(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(HC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(I4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ou,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(gz,{children:o.map((u,h)=>x(mz,{children:u},h))})})}const x5e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function N$(e){const{...t}=e,n=Fe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(x5e),a=()=>n(v5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(c4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const S5e=Xe(e=>e.options,e=>e.shouldLoopback),D$=()=>{const e=Fe(),t=Ce(S5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(R4e,{}),onClick:()=>{e(f7e(!t))}})},Gb=()=>ee("div",{className:"process-buttons",children:[x(R$,{}),x(D$,{}),x(N$,{})]}),w5e=Xe([e=>e.options,rn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),qb=()=>{const e=Fe(),{prompt:t,activeTabName:n}=Ce(w5e),{isReady:r}=Ce(O$),i=C.exports.useRef(null),o=s=>{e(cx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(HC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(uF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function C5e(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm2.121.707a1 1 0 0 0-1.414 0L4.16 7.547l5.293 5.293 4.633-4.633a1 1 0 0 0 0-1.414l-3.879-3.879zM8.746 13.547 3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function _5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function k5e(e,t){e.classList?e.classList.add(t):_5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function E5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},F$=le.createContext(null);var $$=function(t){return t.scrollTop},Kg="unmounted",Sf="exited",wf="entering",Lp="entered",VC="exiting",Pu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Sf,o.appearStatus=wf):l=Lp:r.unmountOnExit||r.mountOnEnter?l=Kg:l=Sf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Kg?{status:Sf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Lp&&(o=wf):(a===wf||a===Lp)&&(o=VC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this);a&&$$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sf&&this.setState({status:Kg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[iy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Lp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Lp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:iy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:Sf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:VC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Sf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Kg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(F$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Pu.contextType=F$;Pu.propTypes={};function Cp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cp,onEntering:Cp,onEntered:Cp,onExit:Cp,onExiting:Cp,onExited:Cp};Pu.UNMOUNTED=Kg;Pu.EXITED=Sf;Pu.ENTERING=wf;Pu.ENTERED=Lp;Pu.EXITING=VC;const P5e=Pu;var T5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k5e(t,r)})},p6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return E5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},V$=""+new URL("logo.13003d72.png",import.meta.url).href,L5e=Xe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Kb=e=>{const t=Fe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce(L5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(b0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(b0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(c7e(a.current?a.current.scrollTop:0)),t(b0(!1)),t(d7e(!1)))},[t,i]);W$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(u7e(!i)),t(Cr(!0))};return x(H$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(z$,{}):x(B$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function A5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(b3e,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(I_,{}),x(Hf,{size:"lg",children:"Click or Drag and Drop"})]})})},I5e=Xe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),UC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=O4(),a=Fe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(I5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(m5e(e)),o()};vt("del",()=>{s?i():m()},[e,s]);const v=b=>a(l$(!b.target.checked));return ee(Kn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(s1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(pv,{children:ee(l1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(z4,{children:ee(an,{direction:"column",gap:5,children:[x(ko,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ee(an,{alignItems:"center",children:[x(ih,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(aa,{ref:h,onClick:o,children:"Cancel"}),x(aa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),M5e=Xe([e=>e.system,e=>e.options,e=>e.gallery,rn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),U$=()=>{const e=Fe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(M5e),g=xd(),m=()=>{!u||(h&&e(_l(!1)),e(bv(u)),e(Co("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(t7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(Qv(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(cx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(P(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(p5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(g5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const T=()=>e(NW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(q4(u)),e(Co("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(P$(u)),e(Co("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?T():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(Eo,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(z4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ou,{size:"sm",onClick:m,leftIcon:x(c6,{}),children:"Send to Image to Image"}),x(ou,{size:"sm",onClick:I,leftIcon:x(c6,{}),children:"Send to Inpainting"}),x(ou,{size:"sm",onClick:O,leftIcon:x(c6,{}),children:"Send to Outpainting"}),x(ou,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ou,{leftIcon:x(p$,{}),size:"sm",children:x(Wf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(Eo,{isAttached:!0,children:[x(gt,{icon:x(O4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(D4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(gt,{icon:x(b4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(Eo,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(C4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Uv,{}),x(ou,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(w4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(jv,{}),x(ou,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),x(gt,{icon:x(h$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:T}),x(UC,{image:u,children:x(gt,{icon:x(y$,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},O5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},j$=vb({name:"gallery",initialState:O5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=da.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Ay,clearIntermediateImage:DA,removeImage:G$,setCurrentImage:q$,addGalleryImages:R5e,setIntermediateImage:N5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:D5e,setShouldShowGallery:m0,setGalleryScrollPosition:z5e,setGalleryImageMinimumWidth:gf,setGalleryImageObjectFit:B5e,setShouldHoldGalleryOpen:F5e,setShouldAutoSwitchToNewImages:$5e,setCurrentCategory:Iy,setGalleryWidth:Pg}=j$.actions,H5e=j$.reducer;lt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});lt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});lt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});lt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});lt({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});lt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});lt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});lt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});lt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});lt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});lt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});lt({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});lt({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});lt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});lt({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});lt({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});lt({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});lt({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});lt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});lt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});lt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});lt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});lt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});lt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});lt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});lt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});lt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var K$=lt({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});lt({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});lt({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});lt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});lt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});lt({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});lt({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});lt({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});lt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});lt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});lt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});lt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});lt({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});lt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});lt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});lt({displayName:"SpinnerIcon",path:ee(Kn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});lt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});lt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});lt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});lt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});lt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});lt({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});lt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});lt({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});lt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});lt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});lt({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});lt({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});lt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function W5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(an,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(W5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(an,{direction:i?"column":"row",children:[ee(ko,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Wf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(K$,{mx:"2px"})]}):x(ko,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),V5e=(e,t)=>e.image.uuid===t.image.uuid,U5e=C.exports.memo(({image:e,styleClass:t})=>{const n=Fe();vt("esc",()=>{n(NW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:P,fit:E,init_image_path:k,mask_image_path:T,orig_path:I,scale:O}=r,N=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(an,{gap:1,direction:"column",width:"100%",children:[ee(an,{gap:2,children:[x(ko,{fontWeight:"semibold",children:"File:"}),ee(Wf,{href:e.url,isExternal:!0,children:[e.url,x(K$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Kn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&P!==void 0&&x(tr,{label:"Fix faces strength",value:P,onClick:()=>n(N3(P))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&P!==void 0&&x(tr,{label:"Upscaling strength",value:P,onClick:()=>n(m8(P))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:A3(s),onClick:()=>n(cx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(Qv(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(LW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(kW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(EW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:G4(u),onClick:()=>n(RW(G4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(AW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(IW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(TW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(PW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(bv(k))}),T&&x(tr,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(v8(T))}),i==="img2img"&&P&&x(tr,{label:"Image to image strength",value:P,onClick:()=>n(p8(P))}),E&&x(tr,{label:"Image to image fit",value:E,onClick:()=>n(OW(E))}),o&&o.length>0&&ee(Kn,{children:[x(Hf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:W,onClick:()=>n(m8(W))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("codeformer"))}}),W&&x(tr,{label:"Fidelity",value:W,onClick:()=>{n(MW(W)),n(D3("codeformer"))}})]},z)}})]}),ee(an,{gap:2,direction:"column",children:[ee(an,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(ko,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(fz,{width:"100%",pt:10,children:x(ko,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},V5e),Y$=Xe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:i,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function j5e(){const e=Fe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())},m=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ob,{src:i.url,width:o?i.width:void 0,height:o?i.height:void 0,onClick:m}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(U5e,{image:i,styleClass:"current-image-metadata"})]})}const G5e=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(G5e);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Kn,{children:[x(U$,{}),x(j5e,{})]}):x("div",{className:"current-image-display-placeholder",children:x(u4e,{})})})},Z$=()=>{const e=C.exports.useContext(D_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(I_,{}),onClick:e||void 0})};function q5e(){const e=Ce(i=>i.options.initialImage),t=Fe(),n=xd(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(DW())};return ee(Kn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Z$,{})]}),e&&x("div",{className:"init-image-preview",children:x(ob,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const K5e=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(q5e,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function Y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Z5e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},rbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],HA="__resizable_base__",X$=function(e){J5e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(HA):o.className+=HA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ebe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return g6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?g6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?g6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&_p("left",o),s=i&&_p("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var P=(m-b)*this.ratio+w,E=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,I=Math.max(h,P),O=Math.min(g,E),N=Math.max(m,k),D=Math.min(v,T);n=Oy(n,I,O),r=Oy(r,N,D)}else n=Oy(n,h,g),r=Oy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Ry(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ry(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Ry(n)?n.touches[0].clientX:n.clientX,h=Ry(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,P=this.getParentSize(),E=nbe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=$A(T,this.props.snap.y,this.props.snapGap));var N=this.calculateNewSizeFromAspectRatio(I,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=N.newWidth,T=N.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(T,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:I-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/P.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=T/P.height*100;T=Y+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var j=T/this.window.innerHeight*100;T=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(Q5e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return rbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Kv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,P=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:P},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ibe(i,...t)]}function ibe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function obe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q$(...e){return t=>e.forEach(n=>obe(n,t))}function Ha(...e){return C.exports.useCallback(Q$(...e),e)}const vv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(sbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});vv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...lbe(r,n.props),ref:Q$(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const abe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function sbe(e){return C.exports.isValidElement(e)&&e.type===abe}function lbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const ube=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=ube.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?vv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function J$(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function eH(e){const t=e+"CollectionProvider",[n,r]=Kv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:b,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,b)=>{const{scope:w,children:P}=v,E=o(s,w),k=Ha(b,E.collectionRef);return le.createElement(vv,{ref:k},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=le.forwardRef((v,b)=>{const{scope:w,children:P,...E}=v,k=le.useRef(null),T=Ha(b,k),I=o(u,w);return le.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),le.createElement(vv,{[h]:"",ref:T},P)});function m(v){const b=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const cbe=C.exports.createContext(void 0);function tH(e){const t=C.exports.useContext(cbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function dbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const GC="dismissableLayer.update",fbe="dismissableLayer.pointerDownOutside",hbe="dismissableLayer.focusOutside";let WA;const pbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(pbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=P.indexOf(E),T=g?P.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,N=mbe(z=>{const $=z.target,W=[...h.branches].some(Y=>Y.contains($));!O||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=vbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return dbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(GC,z),()=>document.removeEventListener(GC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,N.onPointerDownCapture)}))});function mbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nH(fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&nH(hbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(GC);document.dispatchEvent(e)}function nH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?J$(i,o):i.dispatchEvent(o)}let m6=0;function ybe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),m6++,()=>{m6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),m6--}},[])}function UA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const v6="focusScope.autoFocusOnMount",y6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},bbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:Cf(g.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(v6,jA);s.addEventListener(v6,u),s.dispatchEvent(E),E.defaultPrevented||(xbe(kbe(rH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(v6,u),setTimeout(()=>{const E=new CustomEvent(y6,jA);s.addEventListener(y6,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(y6,h),qA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const k=w.currentTarget,[T,I]=Sbe(k);T&&I?!w.shiftKey&&E===I?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(I,{select:!0})):E===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function xbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function Sbe(e){const t=rH(e),n=GA(t,e),r=GA(t.reverse(),e);return[n,r]}function rH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GA(e,t){for(const n of e)if(!wbe(n,{upTo:t}))return n}function wbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cbe(e)&&t&&e.select()}}const qA=_be();function _be(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kbe(e){return e.filter(t=>t.tagName!=="A")}const z0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Ebe=M6["useId".toString()]||(()=>{});let Pbe=0;function Tbe(e){const[t,n]=C.exports.useState(Ebe());return z0(()=>{e||n(r=>r??String(Pbe++))},[e]),e||(t?`radix-${t}`:"")}function J0(e){return e.split("-")[0]}function Yb(e){return e.split("-")[1]}function e1(e){return["top","bottom"].includes(J0(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=e1(t),l=H_(s),u=r[l]/2-i[l]/2,h=J0(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Yb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Lbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=YA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=iH(r),h={x:i,y:o},g=e1(a),m=Yb(a),v=H_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=E/2-k/2,N=u[w],D=I-b[v]-u[P],z=I/2-b[v]/2+O,$=qC(N,z,D),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?zObe[t])}function Rbe(e,t,n){n===void 0&&(n=!1);const r=Yb(e),i=e1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X4(a)),{main:a,cross:X4(a)}}const Nbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>Nbe[t])}const Dbe=["top","right","bottom","left"];function zbe(e){const t=X4(e);return[XA(e),t,XA(t)]}const Bbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=J0(r),E=g||(w===a||!v?[X4(a)]:zbe(a)),k=[a,...E],T=await Z4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(T[w]),h){const{main:$,cross:W}=Rbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(T[$],T[W])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var N,D;const $=((N=(D=i.flip)==null?void 0:D.index)!=null?N:0)+1,W=k[$];if(W)return{data:{index:$,overflows:O},reset:{placement:W}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,re)=>te+re,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Dbe.some(t=>e[t]>=0)}const Fbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Z4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Z4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function $be(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=J0(n),s=Yb(n),l=e1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Hbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await $be(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function oH(e){return e==="x"?"y":"x"}const Wbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:k}=P;return{x:E,y:k}}},...l}=e,u={x:n,y:r},h=await Z4(t,l),g=e1(J0(i)),m=oH(g);let v=u[g],b=u[m];if(o){const P=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=v+h[P],T=v-h[E];v=qC(k,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+h[P],T=b-h[E];b=qC(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Vbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=e1(i),m=oH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",N=o.reference[g]-o.floating[O]+P.mainAxis,D=o.reference[g]+o.reference[O]-P.mainAxis;vD&&(v=D)}if(u){var E,k,T,I;const O=g==="y"?"width":"height",N=["top","left"].includes(J0(i)),D=o.reference[m]-o.floating[O]+(N&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(N?0:P.crossAxis),z=o.reference[m]+o.reference[O]+(N?0:(T=(I=a.offset)==null?void 0:I[m])!=null?T:0)-(N?P.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function aH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Tu(e){if(e==null)return window;if(!aH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Tu(e).getComputedStyle(e)}function Cu(e){return aH(e)?"":e?(e.nodeName||"").toLowerCase():""}function sH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Tl(e){return e instanceof Tu(e).HTMLElement}function ud(e){return e instanceof Tu(e).Element}function Ube(e){return e instanceof Tu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Tu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zb(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function jbe(e){return["table","td","th"].includes(Cu(e))}function lH(e){const t=/firefox/i.test(sH()),n=Yv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function uH(){return!/^((?!chrome|android).)*safari/i.test(sH())}const eI=Math.min,Em=Math.max,Q4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Tl(e)&&(l=e.offsetWidth>0&&Q4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Q4(s.height)/e.offsetHeight||1);const h=ud(e)?Tu(e):window,g=!uH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Ube(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xb(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cH(e){return _u(Sd(e)).left+Xb(e).scrollLeft}function Gbe(e){const t=_u(e);return Q4(t.width)!==e.offsetWidth||Q4(t.height)!==e.offsetHeight}function qbe(e,t,n){const r=Tl(t),i=Sd(t),o=_u(e,r&&Gbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||Zb(i))&&(a=Xb(t)),Tl(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||Sd(e)}function tI(e){return!Tl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Kbe(e){let t=dH(e);for(W_(t)&&(t=t.host);Tl(t)&&!["html","body"].includes(Cu(t));){if(lH(t))return t;t=t.parentNode}return null}function KC(e){const t=Tu(e);let n=tI(e);for(;n&&jbe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!lH(n))?t:n||Kbe(e)||t}function nI(e){if(Tl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Ybe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Tl(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||Zb(o))&&(a=Xb(n)),Tl(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Zbe(e,t){const n=Tu(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=uH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Xbe(e){var t;const n=Sd(e),r=Xb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Em(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Em(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+cH(e);const l=-r.scrollTop;return Yv(i||n).direction==="rtl"&&(s+=Em(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fH(e){const t=dH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Tl(t)&&Zb(t)?t:fH(t)}function J4(e,t){var n;t===void 0&&(t=[]);const r=fH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Tu(r),a=i?[o].concat(o.visualViewport||[],Zb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(J4(a))}function Qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Jbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function rI(e,t,n){return t==="viewport"?Y4(Zbe(e,n)):ud(t)?Jbe(t,n):Y4(Xbe(Sd(e)))}function exe(e){const t=J4(e),r=["absolute","fixed"].includes(Yv(e).position)&&Tl(e)?KC(e):e;return ud(r)?t.filter(i=>ud(i)&&Qbe(i,r)&&Cu(i)!=="body"):[]}function txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?exe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Em(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Em(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const nxe={getClippingRect:txe,convertOffsetParentRelativeRectToViewportRelativeRect:Ybe,isElement:ud,getDimensions:nI,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qbe(t,KC(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Yv(e).direction==="rtl"};function rxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?J4(e):[],...J4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?_u(e):null;s&&b();function b(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const ixe=(e,t,n)=>Lbe(e,t,{platform:nxe,...n});var YC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function oxe(e){const t=C.exports.useRef(e);return YC(()=>{t.current=e}),t}function axe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=oxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);ZC(g?.map(T=>{let{options:I}=T;return I}),t?.map(T=>{let{options:I}=T;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||ixe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Al.exports.flushSync(()=>{h(T)})})},[g,n,r]);YC(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);YC(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:P,floating:E}),[u,v,k,P,E])}const sxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function lxe(e){const[t,n]=C.exports.useState(void 0);return z0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hH="Popper",[V_,pH]=Kv(hH),[uxe,gH]=V_(hH),cxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(uxe,{scope:t,anchor:r,onAnchorChange:i},n)},dxe="PopperAnchor",fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gH(dxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),e5="PopperContent",[hxe,nEe]=V_(e5),[pxe,gxe]=V_(e5,{hasParent:!1,positionUpdateFns:new Set}),mxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:I=!0,...O}=e,N=gH(e5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[W,Y]=C.exports.useState(null),de=lxe(W),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,re=g+(v!=="center"?"-"+v:""),se=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},G=Array.isArray(P)?P:[P],V=G.length>0,q={padding:se,boundary:G.filter(yxe),altBoundary:V},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:Ue,update:ct}=axe({strategy:"fixed",placement:re,whileElementsMounted:rxe,middleware:[Hbe({mainAxis:m+te,alignmentAxis:b}),I?Wbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Vbe():void 0,...q}):void 0,W?sxe({element:W,padding:w}):void 0,I?Bbe({...q}):void 0,bxe({arrowWidth:j,arrowHeight:te}),T?Fbe({strategy:"referenceHidden"}):void 0].filter(vxe)});z0(()=>{Q(N.anchor)},[Q,N.anchor]);const qe=ye!==null&&Se!==null,[et,tt]=mH(He),at=(i=Ue.arrow)===null||i===void 0?void 0:i.x,At=(o=Ue.arrow)===null||o===void 0?void 0:o.y,wt=((a=Ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,dt]=C.exports.useState();z0(()=>{D&&dt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=gxe(e5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":et,"data-align":tt,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=Ue.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Ue.transformOrigin)===null||l===void 0?void 0:l.x,(u=Ue.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(hxe,{scope:h,placedSide:et,onArrowChange:Y,arrowX:at,arrowY:At,shouldHideArrow:wt},xt?C.exports.createElement(pxe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(wu.div,kn)):C.exports.createElement(wu.div,kn)))});function vxe(e){return e!==void 0}function yxe(e){return e!==null}const bxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=mH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",I="";return b==="bottom"?(T=g?P:`${E}px`,I=`${-v}px`):b==="top"?(T=g?P:`${E}px`,I=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,I=g?P:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,I=g?P:`${k}px`),{data:{x:T,y:I}}}});function mH(e){const[t,n="center"]=e.split("-");return[t,n]}const xxe=cxe,Sxe=fxe,wxe=mxe;function Cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vH=e=>{const{present:t,children:n}=e,r=_xe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};vH.displayName="Presence";function _xe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Dy(r.current);o.current=s==="mounted"?u:"none"},[s]),z0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Dy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),z0(()=>{if(t){const u=g=>{const v=Dy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Dy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Dy(e){return e?.animationName||"none"}function kxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Exe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Exe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const b6="rovingFocusGroup.onEntryFocus",Pxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[XC,yH,Txe]=eH(U_),[Lxe,bH]=Kv(U_,[Txe]),[Axe,Ixe]=Lxe(U_),Mxe=C.exports.forwardRef((e,t)=>C.exports.createElement(XC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(XC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Oxe,An({},e,{ref:t}))))),Oxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=tH(o),[b=null,w]=kxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),k=Pl(u),T=yH(n),I=C.exports.useRef(!1),[O,N]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(b6,k),()=>D.removeEventListener(b6,k)},[k]),C.exports.createElement(Axe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>N(D=>D-1),[])},C.exports.createElement(wu.div,An({tabIndex:P||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!P){const $=new CustomEvent(b6,Pxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),Y=W.find(re=>re.active),de=W.find(re=>re.id===b),te=[Y,de,...W].filter(Boolean).map(re=>re.ref.current);xH(te)}}I.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Rxe="RovingFocusGroupItem",Nxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Tbe(),s=Ixe(Rxe,n),l=s.currentTabStopId===a,u=yH(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(XC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Bxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Fxe(w,P+1):w.slice(P+1)}setTimeout(()=>xH(w))}})})))}),Dxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bxe(e,t,n){const r=zxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Dxe[r]}function xH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Fxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const $xe=Mxe,Hxe=Nxe,Wxe=["Enter"," "],Vxe=["ArrowDown","PageUp","Home"],SH=["ArrowUp","PageDown","End"],Uxe=[...Vxe,...SH],Qb="Menu",[QC,jxe,Gxe]=eH(Qb),[dh,wH]=Kv(Qb,[Gxe,pH,bH]),j_=pH(),CH=bH(),[qxe,Jb]=dh(Qb),[Kxe,G_]=dh(Qb),Yxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=tH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(xxe,s,C.exports.createElement(qxe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(Kxe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Sxe,An({},i,r,{ref:t}))}),Xxe="MenuPortal",[rEe,Qxe]=dh(Xxe,{forceMount:void 0}),td="MenuContent",[Jxe,_H]=dh(td),eSe=C.exports.forwardRef((e,t)=>{const n=Qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Jb(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(QC.Provider,{scope:e.__scopeMenu},C.exports.createElement(vH,{present:r||o.open},C.exports.createElement(QC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(tSe,An({},i,{ref:t})):C.exports.createElement(nSe,An({},i,{ref:t})))))}),tSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Gz(o)},[]),C.exports.createElement(kH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),nSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu);return C.exports.createElement(kH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=Jb(td,n),P=G_(td,n),E=j_(n),k=CH(n),T=jxe(n),[I,O]=C.exports.useState(null),N=C.exports.useRef(null),D=Ha(t,N,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?MB:C.exports.Fragment,re=v?{as:vv,allowPinchZoom:!0}:void 0,se=V=>{var q,Q;const X=$.current+V,me=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),Ue=dSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===Ue))===null||Q===void 0?void 0:Q.ref.current;(function qe(et){$.current=et,window.clearTimeout(z.current),et!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ybe();const G=C.exports.useCallback(V=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&hSe(V,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(Jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),onItemLeave:C.exports.useCallback(V=>{var q;G(V)||((q=N.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(V=>{Y.current=V},[])},C.exports.createElement(te,re,C.exports.createElement(bbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,V=>{var q;V.preventDefault(),(q=N.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(gbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement($xe,An({asChild:!0},k,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:V=>{P.isUsingKeyboardRef.current||V.preventDefault()}}),C.exports.createElement(wxe,An({role:"menu","aria-orientation":"vertical","data-state":lSe(w.open),"data-radix-menu-content":"",dir:P.dir},E,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,V=>{const Q=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,me=V.key.length===1;Q&&(V.key==="Tab"&&V.preventDefault(),!X&&me&&se(V.key));const ye=N.current;if(V.target!==ye||!Uxe.includes(V.key))return;V.preventDefault();const He=T().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);SH.includes(V.key)&&He.reverse(),uSe(He)}),onBlur:qn(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,e8(V=>{const q=V.target,Q=j.current!==V.clientX;if(V.currentTarget.contains(q)&&Q){const X=V.clientX>j.current?"right":"left";de.current=X,j.current=V.clientX}}))})))))))}),JC="MenuItem",iI="menu.itemSelect",rSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(JC,e.__scopeMenu),s=_H(JC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),J$(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(iSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Wxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),iSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_H(JC,n),s=CH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(QC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Hxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,e8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,e8(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),oSe="MenuRadioGroup";dh(oSe,{value:void 0,onValueChange:()=>{}});const aSe="MenuItemIndicator";dh(aSe,{checked:!1});const sSe="MenuSub";dh(sSe);function lSe(e){return e?"open":"closed"}function uSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function fSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function hSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fSe(n,t)}function e8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const pSe=Yxe,gSe=Zxe,mSe=eSe,vSe=rSe,EH="ContextMenu",[ySe,iEe]=Kv(EH,[wH]),ex=wH(),[bSe,PH]=ySe(EH),xSe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=ex(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(bSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(pSe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},SSe="ContextMenuTrigger",wSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(SSe,n),o=ex(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(gSe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,zy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,zy(u)),onPointerCancel:qn(e.onPointerCancel,zy(u)),onPointerUp:qn(e.onPointerUp,zy(u))})))}),CSe="ContextMenuContent",_Se=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(CSe,n),o=ex(n),a=C.exports.useRef(!1);return C.exports.createElement(mSe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),kSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=ex(n);return C.exports.createElement(vSe,An({},i,r,{ref:t}))});function zy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const ESe=xSe,PSe=wSe,TSe=_Se,wc=kSe,LSe=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ASe=Xe([e=>e.options,e=>e.gallery,e=>e.system,rn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ISe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,MSe=C.exports.memo(e=>{const t=Fe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce(ASe),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=xd(),w=()=>v(!0),P=()=>v(!1),E=()=>{s.metadata&&t(cx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(Qv(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},T=()=>{a&&t(_l(!1)),t(bv(s)),n!=="img2img"&&t(Co("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(q4(s)),n!=="inpainting"&&t(Co("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(P$(s)),n!=="outpainting"&&t(Co("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},N=()=>{g&&t(a7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(Co("img2img")),t(s7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(ESe,{children:[x(PSe,{children:ee(md,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:P,children:[x(ob,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(q$(s)),children:l&&x(ga,{width:"50%",height:"50%",as:S4e,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(UC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(B4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(TSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(wc,{onClickCapture:E,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(wc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(wc,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(wc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(wc,{onClickCapture:T,children:"Send to Image To Image"}),x(wc,{onClickCapture:I,children:"Send to Inpainting"}),x(wc,{onClickCapture:O,children:"Send to Outpainting"}),x(UC,{image:s,children:x(wc,{"data-warning":!0,children:"Delete Image"})})]})]})},ISe),OSe=320;function TH(){const e=Fe(),t=xd(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:P}=Ce(LSe),[E,k]=C.exports.useState(300),[T,I]=C.exports.useState(590),[O,N]=C.exports.useState(w>=OSe);C.exports.useEffect(()=>{if(!!o){if(P){e(Pg(400)),k(400),I(400);return}h==="inpainting"?(e(Pg(190)),k(190),I(190)):h==="img2img"?(e(Pg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Pg(Math.min(Math.max(Number(w),0),590))),I(590)),e(Cr(!0))}},[e,h,o,w,P]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,P]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),W=()=>{e(D5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(m0(!0)),o&&e(Cr(!0))},j=()=>{e(m0(!1)),e(z5e(z.current?z.current.scrollTop:0)),e(F5e(!1))},te=()=>{e(WC(r))},re=q=>{e(gf(q)),e(Cr(!0))},se=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{W(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(m0(!1)),e(Cr(!0)))},[o]);const V=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+V;q<=256?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-V;q>32?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(gf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),W$(D,j,!o),x(H$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:se,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(X$,{minWidth:E,maxWidth:T,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Pg(Ge.clamp(Number(w)+me.width,0,Number(T)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ge.clamp(Number(w)+me.width,0,Number(T));ye>=280&&!O?N(!0):ye<280&&O&&N(!1),ye>=T?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(Eo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Kn,{children:[x(aa,{"data-selected":r==="result",onClick:()=>e(Iy("result")),children:"Invocations"}),x(aa,{"data-selected":r==="user",onClick:()=>e(Iy("user")),children:"User"})]}):ee(Kn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(_4e,{}),onClick:()=>e(Iy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(H4e,{}),onClick:()=>e(Iy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(M_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ch,{value:l,onChange:re,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(gf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ia,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(B5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Ia,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e($5e(q.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?x(z$,{}):x(B$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Kn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(MSe,{image:q,isSelected:i===Q},Q)})}),x(aa,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(c$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const RSe=Xe([e=>e.options,rn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,activeTabName:t,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),tx=e=>{const t=Fe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,activeTabName:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ce(RSe),u=()=>{t(l7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{u()},{enabled:l},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,l&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:u,children:x(Y5e,{})})})]}),!s&&x(TH,{})]})})};function NSe(){return x(tx,{optionsPanel:x(A5e,{}),children:x(K5e,{})})}const DSe=Xe(Yt,e=>e.shouldDarkenOutsideBoundingBox);function zSe(){const e=Fe(),t=Ce(DSe);return x(Ia,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(L$(!t))},styleClass:"inpainting-bounding-box-darken"})}const BSe=Xe(Yt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=Fe(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(BSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(qg({...a,width:Math.floor(g)})),t=="height"&&r(qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(qg({...a,width:Math.floor(s)})),t=="height"&&r(qg({...a,height:Math.floor(s)}))};return x(ch,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const FSe=Xe(Yt,e=>e.shouldLockBoundingBox);function $Se(){const e=Ce(FSe),t=Fe();return x(Ia,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(A$(!e))},styleClass:"inpainting-bounding-box-darken"})}const HSe=Xe(Yt,e=>e.shouldShowBoundingBox);function WSe(){const e=Ce(HSe),t=Fe();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(r$,{size:22}):x(n$,{size:22}),onClick:()=>t(O_(!e)),background:"none",padding:0})}const VSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(WSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(an,{alignItems:"center",justifyContent:"space-between",children:[x(zSe,{}),x($Se,{})]})]})]}),USe=Xe(Yt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function jSe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(USe),n=Fe();return ee(an,{alignItems:"center",columnGap:"1rem",children:[x(ch,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(o5e(r.target.checked))})]})}const GSe=Xe(Yt,e=>{const{pastObjects:t,futureObjects:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function qSe(){const e=Fe(),t=xd(),{mayClearBrushHistory:n}=Ce(GSe);return x(ou,{onClick:()=>{e(i5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function LH(){return ee(Kn,{children:[x(jSe,{}),x(VSe,{}),x(qSe,{})]})}function KSe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}function nx(){return(nx=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function t8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var B0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(aI(i.current,P,s.current)):w(!1)},b=function(){return w(!1)};function w(P){var E=l.current,k=n8(i.current),T=P?k.addEventListener:k.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",b)}return[function(P){var E=P.nativeEvent,k=i.current;if(k&&(sI(E),!function(I,O){return O&&!Pm(I)}(E,l.current)&&k)){if(Pm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(aI(k,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...nx({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),rx=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=rx(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},IH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},r8=function(e){var t=IH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},x6=function(e){var t=IH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},YSe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},ZSe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},XSe=le.memo(function(e){var t=e.hue,n=e.onChange,r=rx(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:B0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:r8({h:t,s:100,v:100,a:1})})))}),QSe=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:r8({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:B0(t.s+100*i.left,0,100),v:B0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:r8(t)})))}),MH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function JSe(e,t,n){var r=t8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;MH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var e6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,t6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,n6e=function(e){e6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,lI.set(t,n);var r=t6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},r6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+x6(Object.assign({},n,{a:0}))+", "+x6(Object.assign({},n,{a:1}))+")"},o=rx(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:B0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:x6(n)})))},i6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);n6e(s);var l=JSe(n,i,o),u=l[0],h=l[1],g=rx(["react-colorful",t]);return le.createElement("div",nx({},a,{ref:s,className:g}),x(QSe,{hsva:u,onChange:h}),x(XSe,{hue:u.h,onChange:h}),le.createElement(r6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},o6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:ZSe,fromHsva:YSe,equal:MH},a6e=function(e){return le.createElement(i6e,nx({},e,{colorModel:o6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(a6e,{className:`invokeai__color-picker ${t}`,...n})},s6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function l6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(s6e),r=Fe(),i=o=>{r(_$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(gt,{"aria-label":"Mask Color",icon:x(A4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const u6e=Xe([Yt,rn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function c6e(){const e=Fe(),{tool:t,brushSize:n,activeTabName:r}=Ce(u6e),i=()=>e(Su("brush")),o=()=>{e(d6(!0))},a=()=>{e(d6(!1))},s=l=>{e(d6(!0)),e(x$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(ch,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(l6e,{})]})})}const d6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function f6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(d6e),r=Fe(),i=()=>r(Su("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(gt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(g$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const h6e=Xe([Yt,rn],(e,t)=>{const{pastObjects:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function OH(){const e=Fe(),{canUndo:t,activeTabName:n}=Ce(h6e),r=()=>{e(n5e())};return vt(["meta+z","control+z"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Undo",tooltip:"Undo",icon:x(F4e,{}),onClick:r,isDisabled:!t})}const p6e=Xe([Yt,rn],(e,t)=>{const{futureObjects:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function RH(){const e=Fe(),{canRedo:t,activeTabName:n}=Ce(p6e),r=()=>{e(r5e())};return vt(["meta+shift+z","control+shift+z","control+y","meta+y"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Redo",tooltip:"Redo",icon:x(N4e,{}),onClick:r,isDisabled:!t})}const g6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,objects:r}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(Ub).length===0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function m6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(g6e),r=Fe(),i=xd(),o=()=>{r(k$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(gt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(M4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const v6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function y6e(){const e=Fe(),{isMaskEnabled:t,activeTabName:n}=Ce(v6e),r=()=>e(C$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(gt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(r$,{size:22}):x(n$,{size:22}),onClick:r})}const b6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function x6e(){const{shouldInvertMask:e,isMaskEnabled:t,activeTabName:n}=Ce(b6e),r=Fe(),i=()=>r(e5e(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(gt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(a4e,{size:22}):x(s4e,{size:22}),onClick:i,isDisabled:!t})}const S6e=Xe(Yt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),w6e=()=>{const e=Fe(),{shouldLockBoundingBox:t}=Ce(S6e);return x(gt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(P4e,{}):x($4e,{}),"data-selected":t,onClick:()=>{e(A$(!t))}})},C6e=Xe(Yt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_6e=()=>{const e=Fe(),{shouldShowBoundingBox:t}=Ce(C6e);return x(gt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(W4e,{}),"data-alert":!t,onClick:()=>{e(O_(!t))}})},k6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function E6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(k6e),r=Fe(),i=()=>r(Su("eraser"));return vt("shift+e",o=>{o.preventDefault(),i()},{enabled:!0},[n,t]),x(gt,{"aria-label":"Erase Canvas (Shift+E)",tooltip:"Erase Canvas (Shift+E)",icon:x(C5e,{}),fontSize:18,onClick:i,"data-selected":e==="eraser",isDisabled:!t})}var P6e=Math.PI/180;function T6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const v0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:v0,version:"8.3.13",isBrowser:T6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*P6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:v0.document,_injectGlobal(e){v0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var L6e="[object Array]",A6e="[object Number]",I6e="[object String]",M6e="[object Boolean]",O6e=Math.PI/180,R6e=180/Math.PI,S6="#",N6e="",D6e="0",z6e="Konva warning: ",uI="Konva error: ",B6e="rgb(",w6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},F6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,By=[];const $6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===L6e},_isNumber(e){return Object.prototype.toString.call(e)===A6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===I6e},_isBoolean(e){return Object.prototype.toString.call(e)===M6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){By.push(e),By.length===1&&$6e(function(){const t=By;By=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(S6,N6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=D6e+e;return S6+e},getRGB(e){var t;return e in w6?(t=w6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===S6?this._hexToRgb(e.substring(1)):e.substr(0,4)===B6e?(t=F6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=w6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function DH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function t1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function zH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function H6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ts(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function W6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Tg="get",Lg="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Tg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Tg+a(t),l=Lg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Lg+n,i=Tg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Tg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Tg+fe._capitalize(n),a=Lg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function V6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=U6e+u.join(cI)+j6e)):(o+=s.property,t||(o+=Z6e+s.val)),o+=K6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Q6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=V6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var I3="absoluteOpacity",$y="allEventListeners",ru="absoluteTransform",fI="absoluteScale",Ag="canvas",nwe="Change",rwe="children",iwe="konva",i8="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",M3=" ",vI="stage",kc="transform",owe="Stage",o8="visible",awe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M3);let swe=1;class Be{constructor(t){this._id=swe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(M3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ag)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ag),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new y0({pixelRatio:a,width:i,height:o}),v=new y0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),P=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Ag),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(I3),this._clearSelfAndDescendantCache(fI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ag,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ag)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==rwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==owe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(I3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",kp=e=>{const t=Qg(e);if(t==="pointer")return ot.pointerEventsEnabled&&_6.pointer;if(t==="touch")return _6.touch;if(t==="mouse")return _6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const pwe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",O3=[];class ax extends sa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),O3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===uwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&O3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(pwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new y0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+yI,this.content.style.height=n+yI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rfwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||hwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a8,{evt:t}):this._fire(a8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=C6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(jp,Q_(t)),Tm(t.pointerId)}_lostpointercapture(t){Tm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new y0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ax.prototype.nodeType=lwe;gr(ax);Z.addGetterSetter(ax,"container");var XH="hasShadow",QH="shadowRGBA",JH="patternImage",eW="linearGradient",tW="radialGradient";let jy;function k6(){return jy||(jy=fe.createCanvasElement().getContext("2d"),jy)}const Lm={};function gwe(e){e.fill()}function mwe(e){e.stroke()}function vwe(e){e.fill()}function ywe(e){e.stroke()}function bwe(){this._clearCache(XH)}function xwe(){this._clearCache(QH)}function Swe(){this._clearCache(JH)}function wwe(){this._clearCache(eW)}function Cwe(){this._clearCache(tW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Lm)););this.colorKey=n,Lm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(XH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(JH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=k6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(eW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=k6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Lm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,P=v+b*2,E={width:w,height:P,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}}Ie.prototype._fillFunc=gwe;Ie.prototype._strokeFunc=mwe;Ie.prototype._fillFuncHit=vwe;Ie.prototype._strokeFuncHit=ywe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bwe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",xwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Swe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",wwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Cwe);Z.addGetterSetter(Ie,"stroke",void 0,zH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ts());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ts());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ts());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,t1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,zH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var _we="#",kwe="beforeDraw",Ewe="draw",nW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Pwe=nW.length;class fh extends sa{constructor(t){super(t),this.canvas=new y0,this.hitCanvas=new X_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(kwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),sa.prototype.drawScene.call(this,i,n),this._fire(Ewe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),sa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}fh.prototype.nodeType="Layer";gr(fh);Z.addGetterSetter(fh,"imageSmoothingEnabled",!0);Z.addGetterSetter(fh,"clearBeforeDraw",!0);Z.addGetterSetter(fh,"hitGraphEnabled",!0,Ts());class J_ extends fh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class F0 extends sa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}F0.prototype.nodeType="Group";gr(F0);var E6=function(){return v0.performance&&v0.performance.now?function(){return v0.performance.now()}:function(){return new Date().getTime()}}();class Ma{constructor(t,n){this.id=Ma.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:E6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Lwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Am.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Awe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ma(function(){n.tween.onEnterFrame()},u),this.tween=new Iwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Twe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Am={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ts());function l8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function CI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,g,g+m,1-b),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],I=l,O=u,N,D,z,$,W,Y,de,j,te,re;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var se=b.shift(),G=b.shift();if(l+=se,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var V=a.length-2;V>=0;V--)if(a[V].command==="M"){l=a[V].points[0]+se,u=a[V].points[1]+G;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(D,z,l,u);break;case"t":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(D,z,l,u);break;case"A":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break;case"a":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break}a.push({command:k||v,points:T,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,P=b*-l*g/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},I=function(W,Y){return(W[0]*Y[0]+W[1]*Y[1])/(T(W)*T(Y))},O=function(W,Y){return(W[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,k,s,l,N,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class hh extends Au{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}hh.prototype.className="Arrow";gr(hh);Z.addGetterSetter(hh,"pointerLength",10,ze());Z.addGetterSetter(hh,"pointerWidth",10,ze());Z.addGetterSetter(hh,"pointerAtBeginning",!1);Z.addGetterSetter(hh,"pointerAtEnding",!0);class n1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}n1.prototype._centroid=!0;n1.prototype.className="Circle";n1.prototype._attrsAffectingSize=["radius"];gr(n1);Z.addGetterSetter(n1,"radius",0,ze());class Cd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Cd);Z.addComponentsGetterSetter(Cd,"radius",["x","y"]);Z.addGetterSetter(Cd,"radiusX",0,ze());Z.addGetterSetter(Cd,"radiusY",0,ze());class Ls extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";gr(Ls);Z.addGetterSetter(Ls,"image");Z.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);Z.addGetterSetter(Ls,"cropX",0,ze());Z.addGetterSetter(Ls,"cropY",0,ze());Z.addGetterSetter(Ls,"cropWidth",0,ze());Z.addGetterSetter(Ls,"cropHeight",0,ze());var rW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Mwe="Change.konva",Owe="none",u8="up",c8="right",d8="down",f8="left",Rwe=rW.length;class ek extends F0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gh.prototype.className="RegularPolygon";gh.prototype._centroid=!0;gh.prototype._attrsAffectingSize=["radius"];gr(gh);Z.addGetterSetter(gh,"radius",0,ze());Z.addGetterSetter(gh,"sides",0,ze());var _I=Math.PI*2;class mh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}mh.prototype.className="Ring";mh.prototype._centroid=!0;mh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(mh);Z.addGetterSetter(mh,"innerRadius",0,ze());Z.addGetterSetter(mh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ma(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var qy;function T6(){return qy||(qy=fe.createCanvasElement().getContext(zwe),qy)}function Kwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Ywe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Zwe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(Zwe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Bwe,n),this}getWidth(){var t=this.attrs.width===Ep||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Ep||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=T6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Gy+this.fontVariant()+Gy+(this.fontSize()+Wwe)+qwe(this.fontFamily())}_addTextLine(t){this.align()===Ig&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return T6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Ep&&o!==void 0,l=a!==Ep&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==jwe&&b,P=this.ellipsis();this.textArr=[],T6().font=this._getContextFont();for(var E=P?this._getTextWidth(P6):0,k=0,T=t.length;kh)for(;I.length>0;){for(var N=0,D=I.length,z="",$=0;N>>1,Y=I.slice(0,W+1),de=this._getTextWidth(Y)+E;de<=h?(N=W+1,z=Y,$=de):D=W}if(z){if(w){var j,te=I[z.length],re=te===Gy||te===kI;re&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Gy),z.lastIndexOf(kI))+1,j>0&&(N=j,z=z.slice(0,N),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var se=this._shouldHandleEllipsis(m);if(se){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(N),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Ep&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Ep&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+P6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=iW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,re=0;for(v=void 0;Math.abs(j-te)/j>.01&&re<20;){re++;for(var se=te;b===void 0;)b=E(),b&&se+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var V=b.points[4],q=b.points[5],Q=b.points[4]+q;P===0?P=V+1e-8:j>te?P+=Math.PI/180*q/Math.abs(q):P-=Math.PI/360*q/Math.abs(q),(q<0&&P=0&&P>Q)&&(P=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case"C":P===0?j>b.pathLength?P=1e-8:P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength/2:P=Math.max(P-(te-j)/b.pathLength/2,0),P>1&&(P=1,G=!0),v=Nn.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":P===0?P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength:P-=(te-j)/b.pathLength,P>1&&(P=1,G=!0),v=Nn.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},T="C",I=t._getTextSize(T).width+r,O=u/I-1,N=0;Ne+`.${dW}`).join(" "),TI="nodesRect",Jwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],eCe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const tCe="ontouchstart"in ot._global;function nCe(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(eCe[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var t5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function rCe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function iCe(e,t){const n=rCe(e);return fW(e,t,n)}function oCe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Jwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(TI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(TI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return fW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),t5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Zv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:tCe?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=nCe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),se=oCe(this.rotationSnaps(),j,te)-g.rotation,G=iCe(g,se);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,P=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const P=w.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),F0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function aCe(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){t5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+t5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",t5,aCe);Z.addGetterSetter(_n,"flipEnabled",!0,Ts());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Iu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Iu.prototype.className="Wedge";Iu.prototype._centroid=!0;Iu.prototype._attrsAffectingSize=["radius"];gr(Iu);Z.addGetterSetter(Iu,"radius",0,ze());Z.addGetterSetter(Iu,"angle",0,ze());Z.addGetterSetter(Iu,"clockwise",!1);Z.backCompat(Iu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var sCe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],lCe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function uCe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,P,E,k,T,I,O,N,D,z,$,W,Y,de,j=t+t+1,te=r-1,re=i-1,se=t+1,G=se*(se+1)/2,V=new AI,q=null,Q=V,X=null,me=null,ye=sCe[t],Se=lCe[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=o+((l=a+se)0&&uCe(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const dCe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const hCe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var k=b+(w-1+E)*4,T=s[P]-s[k],I=s[P+1]-s[k+1],O=s[P+2]-s[k+2],N=T,D=N>0?N:-N,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(N=I),$>D&&(N=O),N*=t,i){var W=s[P]+N,Y=s[P+1]+N,de=s[P+2]+N;s[P]=W>255?255:W<0?0:W,s[P+1]=Y>255?255:Y<0?0:Y,s[P+2]=de>255?255:de<0?0:de}else{var j=n-N;j<0?j=0:j>255&&(j=255),s[P]=s[P+1]=s[P+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function L6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const pCe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,P,E,k,T,I,O,N;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),N=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),P=r+v*(r-b),E=(s+a)*.5,k=s+v*(s-E),T=a+v*(a-E),I=(h+u)*.5,O=h+v*(h-I),N=u+v*(u-I)),m=0;mE?P:E;var k=a,T=o,I,O,N=360/T*Math.PI/180,D,z;for(O=0;OT?k:T;var I=a,O=o,N,D,z=n.polarRotation||0,$,W;for(h=0;ht&&(I=T,O=0,N=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function PCe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const ICe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);const OCe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const RCe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},DCe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(R===n)return ce+A;if(K&&(J+=ce.length-J),Ix(R)){if(c.slice(J).search(R)){var _e,ke=ce;for(R.global||(R=Ud(R.source,Sn(Ua.exec(R))+"g")),R.lastIndex=0;_e=R.exec(ke);)var Le=_e.index;ce=ce.slice(0,Le===n?J:Le)}}else if(c.indexOf(Zi(R),J)!=J){var je=ce.lastIndexOf(R);je>-1&&(ce=ce.slice(0,je))}return ce+A}function eq(c){return c=Sn(c),c&&i1.test(c)?c.replace(pi,l2):c}var tq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Rx=cp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Mh(c)?Vd(c):C1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Ax(S)?S:new _t(S)}}),nq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Tx(c[S],c))}),c});function rq(c){var p=c==null?0:c.length,S=Te();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var R=-1;++RV)return[];var S=X,A=Kr(c,X);p=Te(p),c-=X;for(var R=$d(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),R=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!R||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Le=function(jt){var en=R.apply(B,ya([jt],J));return A&&je?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var je=this.__chain__,ht=!!this.__actions__.length,yt=F&&!je,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:O2,args:[Le],thisArg:n}),new Ki(bt,je)}return yt&&$t?c.apply(this,J):(bt=this.thru(Le),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=qu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var R=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],R)}return this[S](function(K){return p.apply(Rt(K)?K:[],R)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[uf(n,E).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=v2,B.prototype.at=IU,B.prototype.chain=MU,B.prototype.commit=OU,B.prototype.next=RU,B.prototype.plant=DU,B.prototype.reverse=zU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=BU,B.prototype.first=B.prototype.head,Qu&&(B.prototype[Qu]=NU),B},xa=po();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ge=ca.exports;var w2e=Object.create,$F=Object.defineProperty,C2e=Object.getOwnPropertyDescriptor,_2e=Object.getOwnPropertyNames,k2e=Object.getPrototypeOf,E2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),P2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _2e(t))!E2e.call(e,i)&&i!==n&&$F(e,i,{get:()=>t[i],enumerable:!(r=C2e(t,i))||r.enumerable});return e},HF=(e,t,n)=>(n=e!=null?w2e(k2e(e)):{},P2e(t||!e||!e.__esModule?$F(n,"default",{value:e,enumerable:!0}):n,e)),T2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),WF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Lb=De((e,t)=>{var n=WF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),L2e=De((e,t)=>{var n=Lb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),A2e=De((e,t)=>{var n=Lb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),I2e=De((e,t)=>{var n=Lb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),M2e=De((e,t)=>{var n=Lb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ab=De((e,t)=>{var n=T2e(),r=L2e(),i=A2e(),o=I2e(),a=M2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab();function r(){this.__data__=new n,this.size=0}t.exports=r}),R2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),N2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),D2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),VF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=VF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),z2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),B2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Ib=De((e,t)=>{var n=w_(),r=z2e(),i=B2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),UF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),jF=De((e,t)=>{var n=Ib(),r=UF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),F2e=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),$2e=De((e,t)=>{var n=F2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),GF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),H2e=De((e,t)=>{var n=jF(),r=$2e(),i=UF(),o=GF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),W2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),Q0=De((e,t)=>{var n=H2e(),r=W2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Map");t.exports=i}),Mb=De((e,t)=>{var n=Q0(),r=n(Object,"create");t.exports=r}),V2e=De((e,t)=>{var n=Mb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),U2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),j2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),G2e=De((e,t)=>{var n=Mb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),q2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),K2e=De((e,t)=>{var n=V2e(),r=U2e(),i=j2e(),o=G2e(),a=q2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=K2e(),r=Ab(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Z2e=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Ob=De((e,t)=>{var n=Z2e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),X2e=De((e,t)=>{var n=Ob();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Q2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).get(i)}t.exports=r}),J2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).has(i)}t.exports=r}),eye=De((e,t)=>{var n=Ob();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),qF=De((e,t)=>{var n=Y2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab(),r=C_(),i=qF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ab(),r=O2e(),i=R2e(),o=N2e(),a=D2e(),s=tye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),rye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),iye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),oye=De((e,t)=>{var n=qF(),r=rye(),i=iye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),KF=De((e,t)=>{var n=oye(),r=aye(),i=sye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,P=u.length;if(w!=P&&!(b&&P>w))return!1;var E=v.get(l),k=v.get(u);if(E&&k)return E==u&&k==l;var T=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),uye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),cye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),dye=De((e,t)=>{var n=w_(),r=lye(),i=WF(),o=KF(),a=uye(),s=cye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,N=O?O.valueOf:void 0;function D(z,$,W,Y,de,j,te){switch(W){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var re=a;case P:var se=Y&l;if(re||(re=s),z.size!=$.size&&!se)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var V=o(re(z),re($),Y,de,j,te);return te.delete(z),V;case k:if(N)return N.call(z)==N.call($)}return!1}t.exports=D}),fye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),hye=De((e,t)=>{var n=fye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),pye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),mye=De((e,t)=>{var n=pye(),r=gye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),vye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),yye=De((e,t)=>{var n=Ib(),r=Rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),bye=De((e,t)=>{var n=yye(),r=Rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),xye=De((e,t)=>{function n(){return!1}t.exports=n}),YF=De((e,t)=>{var n=Eu(),r=xye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Sye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),wye=De((e,t)=>{var n=Ib(),r=ZF(),i=Rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[N]=j[D]=j[z]=j[$]=j[W]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[T]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[P]=j[E]=!1;function te(re){return i(re)&&r(re.length)&&!!j[n(re)]}t.exports=te}),Cye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),_ye=De((e,t)=>{var n=VF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),XF=De((e,t)=>{var n=wye(),r=Cye(),i=_ye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),kye=De((e,t)=>{var n=vye(),r=bye(),i=__(),o=YF(),a=Sye(),s=XF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),P=!v&&!b&&!w&&s(g),E=v||b||w||P,k=E?n(g.length,String):[],T=k.length;for(var I in g)(m||u.call(g,I))&&!(E&&(I=="length"||w&&(I=="offset"||I=="parent")||P&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,T)))&&k.push(I);return k}t.exports=h}),Eye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Pye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Tye=De((e,t)=>{var n=Pye(),r=n(Object.keys,Object);t.exports=r}),Lye=De((e,t)=>{var n=Eye(),r=Tye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Aye=De((e,t)=>{var n=jF(),r=ZF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Iye=De((e,t)=>{var n=kye(),r=Lye(),i=Aye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Mye=De((e,t)=>{var n=hye(),r=mye(),i=Iye();function o(a){return n(a,i,r)}t.exports=o}),Oye=De((e,t)=>{var n=Mye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var N=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=Q0(),r=Eu(),i=n(r,"DataView");t.exports=i}),Nye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Promise");t.exports=i}),Dye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Set");t.exports=i}),zye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),Bye=De((e,t)=>{var n=Rye(),r=C_(),i=Nye(),o=Dye(),a=zye(),s=Ib(),l=GF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),P=l(r),E=l(i),k=l(o),T=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var N=s(O),D=N==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case P:return u;case E:return g;case k:return m;case T:return v}return N}),t.exports=I}),Fye=De((e,t)=>{var n=nye(),r=KF(),i=dye(),o=Oye(),a=Bye(),s=__(),l=YF(),u=XF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function P(E,k,T,I,O,N){var D=s(E),z=s(k),$=D?m:a(E),W=z?m:a(k);$=$==g?v:$,W=W==g?v:W;var Y=$==v,de=W==v,j=$==W;if(j&&l(E)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return N||(N=new n),D||u(E)?r(E,k,T,I,O,N):i(E,k,$,T,I,O,N);if(!(T&h)){var te=Y&&w.call(E,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(te||re){var se=te?E.value():E,G=re?k.value():k;return N||(N=new n),O(se,G,T,I,N)}}return j?(N||(N=new n),o(E,k,T,I,O,N)):!1}t.exports=P}),$ye=De((e,t)=>{var n=Fye(),r=Rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),QF=De((e,t)=>{var n=$ye();function r(i,o){return n(i,o)}t.exports=r}),Hye=["ctrl","shift","alt","meta","mod"],Wye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function s6(e,t=","){return typeof e=="string"?e.split(t):e}function km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Wye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Hye.includes(o));return{...r,keys:i}}function Vye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Uye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function jye(e){return JF(e,["input","textarea","select"])}function JF({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Gye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var qye=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},Kye=C.exports.createContext(void 0),Yye=()=>C.exports.useContext(Kye),Zye=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Xye=()=>C.exports.useContext(Zye),Qye=HF(QF());function Jye(e){let t=C.exports.useRef(void 0);return(0,Qye.default)(t.current,e)||(t.current=e),t.current}var SA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=Jye(a),{enabledScopes:h}=Xye(),g=Yye();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Gye(h,u?.scopes))return;let m=w=>{if(!(jye(w)&&!JF(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||s6(e,u?.splitKey).forEach(P=>{let E=km(P,u?.combinationKey);if(qye(w,E,o)||E.keys?.includes("*")){if(Vye(w,E,u?.preventDefault),!Uye(w,E,u?.enabled)){SA(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.addHotkey(km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.removeHotkey(km(w,u?.combinationKey)))}},[e,l,u,h]),i}HF(QF());var FC=new Set;function e3e(e){(Array.isArray(e)?e:[e]).forEach(t=>FC.add(km(t)))}function t3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=km(t);for(let r of FC)r.keys?.every(i=>n.keys?.includes(i))&&FC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{e3e(e.key)}),document.addEventListener("keyup",e=>{t3e(e.key)})});function n3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const r3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),i3e=lt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),o3e=lt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),a3e=lt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),s3e=lt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),l3e=lt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),u3e=lt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const c3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(ih,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Nb(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(n7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:k,...T}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const N=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ge.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(ih,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:N,onBlur:D,width:a,...T,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...E,className:"invokeai__number-input-stepper-button"}),x(X7,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},uh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(gd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(ih,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(VB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},d3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],f3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],h3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],p3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,g3e=["gfpgan","codeformer"],m3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],v3e=Xe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),y3e=Xe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Uv=()=>{const e=Fe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(v3e),{isGFPGANAvailable:i}=Ce(y3e),o=l=>e(N3(l)),a=l=>e(MW(l)),s=l=>e(D3(l.target.value));return ee(an,{direction:"column",gap:2,children:[x(uh,{label:"Type",validValues:g3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function b3e(){const e=Fe(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(OW(r.target.checked))})}var e$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=le.createContext&&le.createContext(e$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ch(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:N,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:re,sliderTooltipProps:se,sliderIAIIconButtonProps:G,...V}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ge.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!T||T()};return ee(gd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(ih,{className:"invokeai__slider-component-label",...$,children:r}),ee(bz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...V,children:[h&&ee(Kn,{children:[x(LC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),x(LC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(eF,{className:"invokeai__slider_track",...Y,children:x(tF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...se,children:x(JB,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:N,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:P,...te}),ee(DB,{...re,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function T_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=Fe();return x(ch,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const i$=()=>x(md,{flex:"1",textAlign:"left",children:"Other Options"}),P3e=()=>{const e=Fe(),t=Ce(r=>r.options.hiresFix);return x(an,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(IW(r.target.checked))})})},T3e=()=>{const e=Fe(),t=Ce(r=>r.options.seamless);return x(an,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(AW(r.target.checked))})})},o$=()=>ee(an,{gap:2,direction:"column",children:[x(T3e,{}),x(P3e,{})]}),Db=()=>x(md,{flex:"1",textAlign:"left",children:"Seed"});function L3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(i7e(r.target.checked))})}function A3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=Fe(),i=o=>r(Qv(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const a$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function I3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(Qv(a$(k_,E_))),children:x("p",{children:"Shuffle"})})}function M3e(){const e=Fe(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(X9e(r)),value:t,isInteger:!1})}function O3e(){const e=Fe(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(Q9e(r)),value:t,isInteger:!1})}const zb=()=>ee(an,{gap:2,direction:"column",children:[x(L3e,{}),ee(an,{gap:2,children:[x(A3e,{}),x(I3e,{})]}),x(an,{gap:2,children:x(M3e,{})}),x(an,{gap:2,children:x(O3e,{})})]});function Bb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(r7e(i.target.checked))})]})}const R3e=Xe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),N3e=Xe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),jv=()=>{const e=Fe(),{upscalingLevel:t,upscalingStrength:n}=Ce(R3e),{isESRGANAvailable:r}=Ce(N3e);return ee("div",{className:"upscale-options",children:[x(uh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:p3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function D3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=Fe();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(J9e(r.target.checked))})}function Fb(){return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(D3e,{})]})}function z3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(ih,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function B3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe(),r=i=>n(RW(i.target.value));return x(z3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function F3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(e7e(i)),isInteger:!1})}const $b=()=>ee(an,{gap:2,direction:"column",children:[x(F3e,{}),x(B3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(tz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Hb(){const e=Ce(r=>r.options.showAdvancedOptions),t=Fe();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(o7e(r.target.checked)),isChecked:e})}function $3e(){const e=Fe(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(EW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const rn=Xe(e=>e.options,e=>ux[e.activeTab],{memoizeOptions:{equalityCheck:Ge.isEqual}}),H3e=Xe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function W3e(){const e=Ce(i=>i.options.height),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(PW(Number(i.target.value))),validValues:h3e,styleClass:"main-option-block"})}const V3e=Xe([e=>e.options,H3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function U3e(){const e=Fe(),{iterations:t,mayGenerateMultipleImages:n}=Ce(V3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Z9e(i)),value:t,width:L_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function j3e(){const e=Ce(r=>r.options.sampler),t=Fe();return x(uh,{label:"Sampler",value:e,onChange:r=>t(LW(r.target.value)),validValues:d3e,styleClass:"main-option-block"})}function G3e(){const e=Fe(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(kW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center"})}function q3e(){const e=Ce(i=>i.options.width),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(TW(Number(i.target.value))),validValues:f3e,styleClass:"main-option-block"})}const L_="auto";function Wb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(U3e,{}),x(G3e,{}),x($3e,{})]}),ee("div",{className:"main-options-row",children:[x(q3e,{}),x(W3e,{}),x(j3e,{})]})]})})}const K3e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},s$=vb({name:"system",initialState:K3e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:Y3e,setIsProcessing:g0,addLogEntry:Ei,setShouldShowLogViewer:l6,setIsConnected:_A,setSocketId:Yke,setShouldConfirmOnDelete:l$,setOpenAccordions:Z3e,setSystemStatus:X3e,setCurrentStatus:u6,setSystemConfig:Q3e,setShouldDisplayGuides:J3e,processingCanceled:e4e,errorOccurred:$C,errorSeen:u$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:t4e,setSaveIntermediatesInterval:n4e,setEnableImageDebugging:r4e}=s$.actions,i4e=s$.reducer;function o4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function a4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function s4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function l4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function c$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function u4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function c4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const d4e=Xe(e=>e.system,e=>e.shouldDisplayGuides),f4e=({children:e,feature:t})=>{const n=Ce(d4e),{text:r}=c3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(md,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},h4e=Pe(({feature:e,icon:t=o4e},n)=>x(f4e,{feature:e,children:x(md,{ref:n,children:x(pa,{as:t})})}));function p4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(h4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Vb=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=Fe();return x(rb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(Z3e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(p4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function g4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function m4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function v4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function d$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function f$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function b4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function x4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function S4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function h$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function p$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function w4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function C4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function _4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function k4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function E4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function P4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function T4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function L4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function m$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function A4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function M4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function O4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function v$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function c6(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function B4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function y$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function F4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function $4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function I_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function M_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Py;const V4e=new Uint8Array(16);function U4e(){if(!Py&&(Py=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Py))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Py(V4e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function j4e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const G4e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:G4e};function Tp(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||U4e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return j4e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ty=(e,t)=>Math.round(e/t)*t,Ub=e=>e.kind==="line"&&e.layer==="mask",q4e=e=>e.kind==="line"&&e.layer==="base",K4e=e=>e.kind==="image"&&e.layer==="base",Y4e=e=>e.kind==="line",TA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:.5},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1},Z4e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",objects:[],pastObjects:[],futureObjects:[],...TA},outpainting:{layer:"base",objects:[],pastObjects:[],futureObjects:[],stagingArea:{images:[],selectedImageIndex:0},shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...TA}},b$=vb({name:"canvas",initialState:Z4e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=e[e.currentCanvas].objects.filter(t=>!Ub(t)),e[e.currentCanvas].futureObjects=[],e[e.currentCanvas].shouldInvertMask=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldInvertMask=!e[e.currentCanvas].shouldInvertMask},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldInvertMask:(e,t)=>{e[e.currentCanvas].shouldInvertMask=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{e.inpainting.imageToInpaint=void 0},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.imageToInpaint=t.payload,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ge.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ge.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,P=Ge.clamp(m,64,h),E=Ge.clamp(v,64,g),k=b>0?i-b:i,T=w>0?o-w:o,I=Ge.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-P),O=Ge.clamp(T,e[e.currentCanvas].stageCoordinates.y,g-E);e[e.currentCanvas].boundingBoxDimensions={width:P,height:E},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastObjects=[],e[e.currentCanvas].futureObjects=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpaintingSesion:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n;e.outpainting.pastObjects.push([...e.outpainting.objects]),e.outpainting.futureObjects=[],e.outpainting.objects.push({kind:"image",layer:"base",x:i,y:o,image:r})},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,eraserSize:a}=e[e.currentCanvas];n!=="move"&&(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects.push({kind:"line",layer:r,tool:n,strokeWidth:n==="brush"?o/2:a/2,points:t.payload,...r==="base"&&n==="brush"&&{color:i}}),e[e.currentCanvas].futureObjects=[])},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].objects.findLast(Y4e);!n||n.points.push(...t.payload)},undo:e=>{if(e.outpainting.objects.length===0)return;const t=e.outpainting.pastObjects.pop();!t||(e.outpainting.futureObjects.unshift(e.outpainting.objects),e.outpainting.objects=t)},redo:e=>{if(e.outpainting.futureObjects.length===0)return;const t=e.outpainting.futureObjects.shift();!t||(e.outpainting.pastObjects.push(e.outpainting.objects),e.outpainting.objects=t)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=[],e[e.currentCanvas].futureObjects=[]}},extraReducers:e=>{e.addCase(R_.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastObjects.push([...t.outpainting.objects]),t.outpainting.futureObjects=[],t.outpainting.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:Su,setLayer:X4e,setBrushColor:Q4e,setBrushSize:x$,setEraserSize:J4e,addLine:S$,addPointToCurrentLine:w$,setShouldInvertMask:e5e,setIsMaskEnabled:C$,setShouldShowCheckboardTransparency:Zke,setShouldShowBrushPreview:d6,setMaskColor:_$,clearMask:k$,clearImageToInpaint:t5e,undo:n5e,redo:r5e,setCursorPosition:E$,setStageDimensions:LA,setImageToInpaint:q4,setImageToOutpaint:P$,setBoundingBoxDimensions:qg,setBoundingBoxCoordinates:f6,setBoundingBoxPreviewFill:Xke,setDoesCanvasNeedScaling:Cr,setStageScale:T$,toggleTool:Qke,setShouldShowBoundingBox:O_,setShouldDarkenOutsideBoundingBox:L$,setIsDrawing:jb,setShouldShowBrush:Jke,setClearBrushHistory:i5e,setShouldUseInpaintReplace:o5e,setInpaintReplace:AA,setShouldLockBoundingBox:A$,toggleShouldLockBoundingBox:a5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:h6,setIsMouseOverBoundingBox:Ly,setIsMoveBoundingBoxKeyHeld:eEe,setIsMoveStageKeyHeld:tEe,setStageCoordinates:I$,setCurrentCanvas:M$,addImageToOutpaintingSesion:s5e,resetCanvas:l5e,setShouldShowGrid:u5e,setShouldSnapToGrid:c5e,setShouldAutoSave:d5e,setShouldShowIntermediates:f5e,setIsMovingStage:K4}=b$.actions,h5e=b$.reducer,R_=ove("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Tp(),...v},x:a,y:s}}),Yt=e=>e.canvas[e.canvas.currentCanvas],Gv=e=>e.canvas.outpainting,qv=Xe([e=>e.canvas,rn],(e,t)=>{if(t==="inpainting")return e.inpainting.imageToInpaint;if(t==="outpainting"){const n=e.outpainting.objects.find(r=>r.kind==="image");if(n&&n.kind==="image")return n.image}}),O$=Xe([e=>e.options,e=>e.system,qv,rn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ge.isEqual,resultEqualityCheck:Ge.isEqual}}),HC=Jr("socketio/generateImage"),p5e=Jr("socketio/runESRGAN"),g5e=Jr("socketio/runFacetool"),m5e=Jr("socketio/deleteImage"),WC=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),v5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const y5e=Jr("socketio/requestSystemConfig"),b5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function R$(e){const{iconButton:t=!1,...n}=e,r=Fe(),{isReady:i,reasonsWhyNotReady:o}=Ce(O$),a=Ce(rn),s=()=>{r(HC(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(HC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(I4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(gz,{children:o.map((u,h)=>x(mz,{children:u},h))})})}const x5e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function N$(e){const{...t}=e,n=Fe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(x5e),a=()=>n(v5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(c4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const S5e=Xe(e=>e.options,e=>e.shouldLoopback),D$=()=>{const e=Fe(),t=Ce(S5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(R4e,{}),onClick:()=>{e(f7e(!t))}})},Gb=()=>ee("div",{className:"process-buttons",children:[x(R$,{}),x(D$,{}),x(N$,{})]}),w5e=Xe([e=>e.options,rn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),qb=()=>{const e=Fe(),{prompt:t,activeTabName:n}=Ce(w5e),{isReady:r}=Ce(O$),i=C.exports.useRef(null),o=s=>{e(cx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(HC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(uF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function C5e(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm2.121.707a1 1 0 0 0-1.414 0L4.16 7.547l5.293 5.293 4.633-4.633a1 1 0 0 0 0-1.414l-3.879-3.879zM8.746 13.547 3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function _5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function k5e(e,t){e.classList?e.classList.add(t):_5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function E5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},F$=le.createContext(null);var $$=function(t){return t.scrollTop},Kg="unmounted",Sf="exited",wf="entering",Lp="entered",VC="exiting",Pu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Sf,o.appearStatus=wf):l=Lp:r.unmountOnExit||r.mountOnEnter?l=Kg:l=Sf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Kg?{status:Sf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Lp&&(o=wf):(a===wf||a===Lp)&&(o=VC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this);a&&$$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sf&&this.setState({status:Kg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[iy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Lp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Lp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:iy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:Sf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:VC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Sf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Kg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(F$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Pu.contextType=F$;Pu.propTypes={};function Cp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cp,onEntering:Cp,onEntered:Cp,onExit:Cp,onExiting:Cp,onExited:Cp};Pu.UNMOUNTED=Kg;Pu.EXITED=Sf;Pu.ENTERING=wf;Pu.ENTERED=Lp;Pu.EXITING=VC;const P5e=Pu;var T5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k5e(t,r)})},p6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return E5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},V$=""+new URL("logo.13003d72.png",import.meta.url).href,L5e=Xe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Kb=e=>{const t=Fe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce(L5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(b0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(b0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(c7e(a.current?a.current.scrollTop:0)),t(b0(!1)),t(d7e(!1)))},[t,i]);W$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(u7e(!i)),t(Cr(!0))};return x(H$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(z$,{}):x(B$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function A5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(b3e,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(I_,{}),x(Hf,{size:"lg",children:"Click or Drag and Drop"})]})})},I5e=Xe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),UC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=O4(),a=Fe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(I5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(m5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(l$(!b.target.checked));return ee(Kn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(s1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(pv,{children:ee(l1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(z4,{children:ee(an,{direction:"column",gap:5,children:[x(ko,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ee(an,{alignItems:"center",children:[x(ih,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),M5e=Xe([e=>e.system,e=>e.options,e=>e.gallery,rn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),U$=()=>{const e=Fe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(M5e),g=xd(),m=()=>{!u||(h&&e(kl(!1)),e(bv(u)),e(Co("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(t7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(Qv(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(cx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(P(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(p5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(g5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const T=()=>e(NW(!l)),I=()=>{!u||(h&&e(kl(!1)),e(q4(u)),e(Co("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(kl(!1)),e(P$(u)),e(Co("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?T():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(Eo,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(z4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(c6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(c6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(c6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(p$,{}),size:"sm",children:x(Wf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(Eo,{isAttached:!0,children:[x(gt,{icon:x(O4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(D4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(gt,{icon:x(b4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(Eo,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(C4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Uv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(w4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(jv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),x(gt,{icon:x(h$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:T}),x(UC,{image:u,children:x(gt,{icon:x(y$,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},O5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},j$=vb({name:"gallery",initialState:O5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Ay,clearIntermediateImage:DA,removeImage:G$,setCurrentImage:q$,addGalleryImages:R5e,setIntermediateImage:N5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:D5e,setShouldShowGallery:m0,setGalleryScrollPosition:z5e,setGalleryImageMinimumWidth:gf,setGalleryImageObjectFit:B5e,setShouldHoldGalleryOpen:F5e,setShouldAutoSwitchToNewImages:$5e,setCurrentCategory:Iy,setGalleryWidth:Pg}=j$.actions,H5e=j$.reducer;lt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});lt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});lt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});lt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});lt({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});lt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});lt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});lt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});lt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});lt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});lt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});lt({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});lt({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});lt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});lt({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});lt({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});lt({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});lt({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});lt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});lt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});lt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});lt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});lt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});lt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});lt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});lt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});lt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var K$=lt({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});lt({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});lt({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});lt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});lt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});lt({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});lt({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});lt({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});lt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});lt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});lt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});lt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});lt({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});lt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});lt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});lt({displayName:"SpinnerIcon",path:ee(Kn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});lt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});lt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});lt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});lt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});lt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});lt({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});lt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});lt({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});lt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});lt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});lt({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});lt({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});lt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function W5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(an,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(W5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(an,{direction:i?"column":"row",children:[ee(ko,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Wf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(K$,{mx:"2px"})]}):x(ko,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),V5e=(e,t)=>e.image.uuid===t.image.uuid,U5e=C.exports.memo(({image:e,styleClass:t})=>{const n=Fe();vt("esc",()=>{n(NW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:P,fit:E,init_image_path:k,mask_image_path:T,orig_path:I,scale:O}=r,N=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(an,{gap:1,direction:"column",width:"100%",children:[ee(an,{gap:2,children:[x(ko,{fontWeight:"semibold",children:"File:"}),ee(Wf,{href:e.url,isExternal:!0,children:[e.url,x(K$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Kn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&P!==void 0&&x(tr,{label:"Fix faces strength",value:P,onClick:()=>n(N3(P))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&P!==void 0&&x(tr,{label:"Upscaling strength",value:P,onClick:()=>n(m8(P))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:A3(s),onClick:()=>n(cx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(Qv(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(LW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(kW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(EW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:G4(u),onClick:()=>n(RW(G4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(AW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(IW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(TW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(PW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(bv(k))}),T&&x(tr,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(v8(T))}),i==="img2img"&&P&&x(tr,{label:"Image to image strength",value:P,onClick:()=>n(p8(P))}),E&&x(tr,{label:"Image to image fit",value:E,onClick:()=>n(OW(E))}),o&&o.length>0&&ee(Kn,{children:[x(Hf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:W,onClick:()=>n(m8(W))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("codeformer"))}}),W&&x(tr,{label:"Fidelity",value:W,onClick:()=>{n(MW(W)),n(D3("codeformer"))}})]},z)}})]}),ee(an,{gap:2,direction:"column",children:[ee(an,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(ko,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(fz,{width:"100%",pt:10,children:x(ko,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},V5e),Y$=Xe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:i,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function j5e(){const e=Fe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())},m=()=>{e(kl(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ob,{src:i.url,width:o?i.width:void 0,height:o?i.height:void 0,onClick:m}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(U5e,{image:i,styleClass:"current-image-metadata"})]})}const G5e=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(G5e);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Kn,{children:[x(U$,{}),x(j5e,{})]}):x("div",{className:"current-image-display-placeholder",children:x(u4e,{})})})},Z$=()=>{const e=C.exports.useContext(D_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(I_,{}),onClick:e||void 0})};function q5e(){const e=Ce(i=>i.options.initialImage),t=Fe(),n=xd(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(DW())};return ee(Kn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Z$,{})]}),e&&x("div",{className:"init-image-preview",children:x(ob,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const K5e=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(q5e,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function Y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Z5e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},rbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],HA="__resizable_base__",X$=function(e){J5e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(HA):o.className+=HA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ebe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return g6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?g6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?g6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&_p("left",o),s=i&&_p("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var P=(m-b)*this.ratio+w,E=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,I=Math.max(h,P),O=Math.min(g,E),N=Math.max(m,k),D=Math.min(v,T);n=Oy(n,I,O),r=Oy(r,N,D)}else n=Oy(n,h,g),r=Oy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Ry(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ry(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Ry(n)?n.touches[0].clientX:n.clientX,h=Ry(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,P=this.getParentSize(),E=nbe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=$A(T,this.props.snap.y,this.props.snapGap));var N=this.calculateNewSizeFromAspectRatio(I,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=N.newWidth,T=N.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(T,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:I-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/P.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=T/P.height*100;T=Y+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var j=T/this.window.innerHeight*100;T=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Il.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(Q5e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return rbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Kv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,P=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:P},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ibe(i,...t)]}function ibe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function obe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q$(...e){return t=>e.forEach(n=>obe(n,t))}function Ha(...e){return C.exports.useCallback(Q$(...e),e)}const vv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(sbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});vv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...lbe(r,n.props),ref:Q$(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const abe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function sbe(e){return C.exports.isValidElement(e)&&e.type===abe}function lbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const ube=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=ube.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?vv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function J$(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function eH(e){const t=e+"CollectionProvider",[n,r]=Kv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:b,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,b)=>{const{scope:w,children:P}=v,E=o(s,w),k=Ha(b,E.collectionRef);return le.createElement(vv,{ref:k},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=le.forwardRef((v,b)=>{const{scope:w,children:P,...E}=v,k=le.useRef(null),T=Ha(b,k),I=o(u,w);return le.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),le.createElement(vv,{[h]:"",ref:T},P)});function m(v){const b=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const cbe=C.exports.createContext(void 0);function tH(e){const t=C.exports.useContext(cbe);return e||t||"ltr"}function Tl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function dbe(e,t=globalThis?.document){const n=Tl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const GC="dismissableLayer.update",fbe="dismissableLayer.pointerDownOutside",hbe="dismissableLayer.focusOutside";let WA;const pbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(pbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=P.indexOf(E),T=g?P.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,N=mbe(z=>{const $=z.target,W=[...h.branches].some(Y=>Y.contains($));!O||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=vbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return dbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(GC,z),()=>document.removeEventListener(GC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,N.onPointerDownCapture)}))});function mbe(e,t=globalThis?.document){const n=Tl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nH(fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vbe(e,t=globalThis?.document){const n=Tl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&nH(hbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(GC);document.dispatchEvent(e)}function nH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?J$(i,o):i.dispatchEvent(o)}let m6=0;function ybe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),m6++,()=>{m6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),m6--}},[])}function UA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const v6="focusScope.autoFocusOnMount",y6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},bbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Tl(i),h=Tl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:Cf(g.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(v6,jA);s.addEventListener(v6,u),s.dispatchEvent(E),E.defaultPrevented||(xbe(kbe(rH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(v6,u),setTimeout(()=>{const E=new CustomEvent(y6,jA);s.addEventListener(y6,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(y6,h),qA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const k=w.currentTarget,[T,I]=Sbe(k);T&&I?!w.shiftKey&&E===I?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(I,{select:!0})):E===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function xbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function Sbe(e){const t=rH(e),n=GA(t,e),r=GA(t.reverse(),e);return[n,r]}function rH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GA(e,t){for(const n of e)if(!wbe(n,{upTo:t}))return n}function wbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cbe(e)&&t&&e.select()}}const qA=_be();function _be(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kbe(e){return e.filter(t=>t.tagName!=="A")}const z0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Ebe=M6["useId".toString()]||(()=>{});let Pbe=0;function Tbe(e){const[t,n]=C.exports.useState(Ebe());return z0(()=>{e||n(r=>r??String(Pbe++))},[e]),e||(t?`radix-${t}`:"")}function J0(e){return e.split("-")[0]}function Yb(e){return e.split("-")[1]}function e1(e){return["top","bottom"].includes(J0(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=e1(t),l=H_(s),u=r[l]/2-i[l]/2,h=J0(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Yb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Lbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=YA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=iH(r),h={x:i,y:o},g=e1(a),m=Yb(a),v=H_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=E/2-k/2,N=u[w],D=I-b[v]-u[P],z=I/2-b[v]/2+O,$=qC(N,z,D),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?zObe[t])}function Rbe(e,t,n){n===void 0&&(n=!1);const r=Yb(e),i=e1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X4(a)),{main:a,cross:X4(a)}}const Nbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>Nbe[t])}const Dbe=["top","right","bottom","left"];function zbe(e){const t=X4(e);return[XA(e),t,XA(t)]}const Bbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=J0(r),E=g||(w===a||!v?[X4(a)]:zbe(a)),k=[a,...E],T=await Z4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(T[w]),h){const{main:$,cross:W}=Rbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(T[$],T[W])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var N,D;const $=((N=(D=i.flip)==null?void 0:D.index)!=null?N:0)+1,W=k[$];if(W)return{data:{index:$,overflows:O},reset:{placement:W}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,re)=>te+re,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Dbe.some(t=>e[t]>=0)}const Fbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Z4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Z4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function $be(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=J0(n),s=Yb(n),l=e1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Hbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await $be(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function oH(e){return e==="x"?"y":"x"}const Wbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:k}=P;return{x:E,y:k}}},...l}=e,u={x:n,y:r},h=await Z4(t,l),g=e1(J0(i)),m=oH(g);let v=u[g],b=u[m];if(o){const P=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=v+h[P],T=v-h[E];v=qC(k,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+h[P],T=b-h[E];b=qC(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Vbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=e1(i),m=oH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",N=o.reference[g]-o.floating[O]+P.mainAxis,D=o.reference[g]+o.reference[O]-P.mainAxis;vD&&(v=D)}if(u){var E,k,T,I;const O=g==="y"?"width":"height",N=["top","left"].includes(J0(i)),D=o.reference[m]-o.floating[O]+(N&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(N?0:P.crossAxis),z=o.reference[m]+o.reference[O]+(N?0:(T=(I=a.offset)==null?void 0:I[m])!=null?T:0)-(N?P.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function aH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Tu(e){if(e==null)return window;if(!aH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Tu(e).getComputedStyle(e)}function Cu(e){return aH(e)?"":e?(e.nodeName||"").toLowerCase():""}function sH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Tu(e).HTMLElement}function ud(e){return e instanceof Tu(e).Element}function Ube(e){return e instanceof Tu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Tu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zb(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function jbe(e){return["table","td","th"].includes(Cu(e))}function lH(e){const t=/firefox/i.test(sH()),n=Yv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function uH(){return!/^((?!chrome|android).)*safari/i.test(sH())}const eI=Math.min,Em=Math.max,Q4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&Q4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Q4(s.height)/e.offsetHeight||1);const h=ud(e)?Tu(e):window,g=!uH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Ube(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xb(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cH(e){return _u(Sd(e)).left+Xb(e).scrollLeft}function Gbe(e){const t=_u(e);return Q4(t.width)!==e.offsetWidth||Q4(t.height)!==e.offsetHeight}function qbe(e,t,n){const r=Ll(t),i=Sd(t),o=_u(e,r&&Gbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||Zb(i))&&(a=Xb(t)),Ll(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||Sd(e)}function tI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Kbe(e){let t=dH(e);for(W_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Cu(t));){if(lH(t))return t;t=t.parentNode}return null}function KC(e){const t=Tu(e);let n=tI(e);for(;n&&jbe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!lH(n))?t:n||Kbe(e)||t}function nI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Ybe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||Zb(o))&&(a=Xb(n)),Ll(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Zbe(e,t){const n=Tu(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=uH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Xbe(e){var t;const n=Sd(e),r=Xb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Em(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Em(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+cH(e);const l=-r.scrollTop;return Yv(i||n).direction==="rtl"&&(s+=Em(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fH(e){const t=dH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Ll(t)&&Zb(t)?t:fH(t)}function J4(e,t){var n;t===void 0&&(t=[]);const r=fH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Tu(r),a=i?[o].concat(o.visualViewport||[],Zb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(J4(a))}function Qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Jbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function rI(e,t,n){return t==="viewport"?Y4(Zbe(e,n)):ud(t)?Jbe(t,n):Y4(Xbe(Sd(e)))}function exe(e){const t=J4(e),r=["absolute","fixed"].includes(Yv(e).position)&&Ll(e)?KC(e):e;return ud(r)?t.filter(i=>ud(i)&&Qbe(i,r)&&Cu(i)!=="body"):[]}function txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?exe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Em(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Em(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const nxe={getClippingRect:txe,convertOffsetParentRelativeRectToViewportRelativeRect:Ybe,isElement:ud,getDimensions:nI,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qbe(t,KC(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Yv(e).direction==="rtl"};function rxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?J4(e):[],...J4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?_u(e):null;s&&b();function b(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const ixe=(e,t,n)=>Lbe(e,t,{platform:nxe,...n});var YC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function oxe(e){const t=C.exports.useRef(e);return YC(()=>{t.current=e}),t}function axe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=oxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);ZC(g?.map(T=>{let{options:I}=T;return I}),t?.map(T=>{let{options:I}=T;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||ixe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Il.exports.flushSync(()=>{h(T)})})},[g,n,r]);YC(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);YC(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:P,floating:E}),[u,v,k,P,E])}const sxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function lxe(e){const[t,n]=C.exports.useState(void 0);return z0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hH="Popper",[V_,pH]=Kv(hH),[uxe,gH]=V_(hH),cxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(uxe,{scope:t,anchor:r,onAnchorChange:i},n)},dxe="PopperAnchor",fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gH(dxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),e5="PopperContent",[hxe,nEe]=V_(e5),[pxe,gxe]=V_(e5,{hasParent:!1,positionUpdateFns:new Set}),mxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:I=!0,...O}=e,N=gH(e5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[W,Y]=C.exports.useState(null),de=lxe(W),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,re=g+(v!=="center"?"-"+v:""),se=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},G=Array.isArray(P)?P:[P],V=G.length>0,q={padding:se,boundary:G.filter(yxe),altBoundary:V},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:Ue,update:ct}=axe({strategy:"fixed",placement:re,whileElementsMounted:rxe,middleware:[Hbe({mainAxis:m+te,alignmentAxis:b}),I?Wbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Vbe():void 0,...q}):void 0,W?sxe({element:W,padding:w}):void 0,I?Bbe({...q}):void 0,bxe({arrowWidth:j,arrowHeight:te}),T?Fbe({strategy:"referenceHidden"}):void 0].filter(vxe)});z0(()=>{Q(N.anchor)},[Q,N.anchor]);const qe=ye!==null&&Se!==null,[et,tt]=mH(He),at=(i=Ue.arrow)===null||i===void 0?void 0:i.x,At=(o=Ue.arrow)===null||o===void 0?void 0:o.y,wt=((a=Ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,dt]=C.exports.useState();z0(()=>{D&&dt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=gxe(e5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":et,"data-align":tt,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=Ue.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Ue.transformOrigin)===null||l===void 0?void 0:l.x,(u=Ue.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(hxe,{scope:h,placedSide:et,onArrowChange:Y,arrowX:at,arrowY:At,shouldHideArrow:wt},xt?C.exports.createElement(pxe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(wu.div,kn)):C.exports.createElement(wu.div,kn)))});function vxe(e){return e!==void 0}function yxe(e){return e!==null}const bxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=mH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",I="";return b==="bottom"?(T=g?P:`${E}px`,I=`${-v}px`):b==="top"?(T=g?P:`${E}px`,I=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,I=g?P:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,I=g?P:`${k}px`),{data:{x:T,y:I}}}});function mH(e){const[t,n="center"]=e.split("-");return[t,n]}const xxe=cxe,Sxe=fxe,wxe=mxe;function Cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vH=e=>{const{present:t,children:n}=e,r=_xe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};vH.displayName="Presence";function _xe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Dy(r.current);o.current=s==="mounted"?u:"none"},[s]),z0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Dy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),z0(()=>{if(t){const u=g=>{const v=Dy(r.current).includes(g.animationName);g.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Dy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Dy(e){return e?.animationName||"none"}function kxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Exe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Tl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Exe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Tl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const b6="rovingFocusGroup.onEntryFocus",Pxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[XC,yH,Txe]=eH(U_),[Lxe,bH]=Kv(U_,[Txe]),[Axe,Ixe]=Lxe(U_),Mxe=C.exports.forwardRef((e,t)=>C.exports.createElement(XC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(XC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Oxe,An({},e,{ref:t}))))),Oxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=tH(o),[b=null,w]=kxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),k=Tl(u),T=yH(n),I=C.exports.useRef(!1),[O,N]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(b6,k),()=>D.removeEventListener(b6,k)},[k]),C.exports.createElement(Axe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>N(D=>D-1),[])},C.exports.createElement(wu.div,An({tabIndex:P||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!P){const $=new CustomEvent(b6,Pxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),Y=W.find(re=>re.active),de=W.find(re=>re.id===b),te=[Y,de,...W].filter(Boolean).map(re=>re.ref.current);xH(te)}}I.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Rxe="RovingFocusGroupItem",Nxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Tbe(),s=Ixe(Rxe,n),l=s.currentTabStopId===a,u=yH(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(XC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Bxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Fxe(w,P+1):w.slice(P+1)}setTimeout(()=>xH(w))}})})))}),Dxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bxe(e,t,n){const r=zxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Dxe[r]}function xH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Fxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const $xe=Mxe,Hxe=Nxe,Wxe=["Enter"," "],Vxe=["ArrowDown","PageUp","Home"],SH=["ArrowUp","PageDown","End"],Uxe=[...Vxe,...SH],Qb="Menu",[QC,jxe,Gxe]=eH(Qb),[dh,wH]=Kv(Qb,[Gxe,pH,bH]),j_=pH(),CH=bH(),[qxe,Jb]=dh(Qb),[Kxe,G_]=dh(Qb),Yxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Tl(o),m=tH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(xxe,s,C.exports.createElement(qxe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(Kxe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Sxe,An({},i,r,{ref:t}))}),Xxe="MenuPortal",[rEe,Qxe]=dh(Xxe,{forceMount:void 0}),td="MenuContent",[Jxe,_H]=dh(td),eSe=C.exports.forwardRef((e,t)=>{const n=Qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Jb(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(QC.Provider,{scope:e.__scopeMenu},C.exports.createElement(vH,{present:r||o.open},C.exports.createElement(QC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(tSe,An({},i,{ref:t})):C.exports.createElement(nSe,An({},i,{ref:t})))))}),tSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Gz(o)},[]),C.exports.createElement(kH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),nSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu);return C.exports.createElement(kH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=Jb(td,n),P=G_(td,n),E=j_(n),k=CH(n),T=jxe(n),[I,O]=C.exports.useState(null),N=C.exports.useRef(null),D=Ha(t,N,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?MB:C.exports.Fragment,re=v?{as:vv,allowPinchZoom:!0}:void 0,se=V=>{var q,Q;const X=$.current+V,me=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),Ue=dSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===Ue))===null||Q===void 0?void 0:Q.ref.current;(function qe(et){$.current=et,window.clearTimeout(z.current),et!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ybe();const G=C.exports.useCallback(V=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&hSe(V,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(Jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),onItemLeave:C.exports.useCallback(V=>{var q;G(V)||((q=N.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(V=>{Y.current=V},[])},C.exports.createElement(te,re,C.exports.createElement(bbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,V=>{var q;V.preventDefault(),(q=N.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(gbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement($xe,An({asChild:!0},k,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:V=>{P.isUsingKeyboardRef.current||V.preventDefault()}}),C.exports.createElement(wxe,An({role:"menu","aria-orientation":"vertical","data-state":lSe(w.open),"data-radix-menu-content":"",dir:P.dir},E,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,V=>{const Q=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,me=V.key.length===1;Q&&(V.key==="Tab"&&V.preventDefault(),!X&&me&&se(V.key));const ye=N.current;if(V.target!==ye||!Uxe.includes(V.key))return;V.preventDefault();const He=T().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);SH.includes(V.key)&&He.reverse(),uSe(He)}),onBlur:qn(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,e8(V=>{const q=V.target,Q=j.current!==V.clientX;if(V.currentTarget.contains(q)&&Q){const X=V.clientX>j.current?"right":"left";de.current=X,j.current=V.clientX}}))})))))))}),JC="MenuItem",iI="menu.itemSelect",rSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(JC,e.__scopeMenu),s=_H(JC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),J$(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(iSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Wxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),iSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_H(JC,n),s=CH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(QC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Hxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,e8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,e8(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),oSe="MenuRadioGroup";dh(oSe,{value:void 0,onValueChange:()=>{}});const aSe="MenuItemIndicator";dh(aSe,{checked:!1});const sSe="MenuSub";dh(sSe);function lSe(e){return e?"open":"closed"}function uSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function fSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function hSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fSe(n,t)}function e8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const pSe=Yxe,gSe=Zxe,mSe=eSe,vSe=rSe,EH="ContextMenu",[ySe,iEe]=Kv(EH,[wH]),ex=wH(),[bSe,PH]=ySe(EH),xSe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=ex(t),u=Tl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(bSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(pSe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},SSe="ContextMenuTrigger",wSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(SSe,n),o=ex(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(gSe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,zy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,zy(u)),onPointerCancel:qn(e.onPointerCancel,zy(u)),onPointerUp:qn(e.onPointerUp,zy(u))})))}),CSe="ContextMenuContent",_Se=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(CSe,n),o=ex(n),a=C.exports.useRef(!1);return C.exports.createElement(mSe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),kSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=ex(n);return C.exports.createElement(vSe,An({},i,r,{ref:t}))});function zy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const ESe=xSe,PSe=wSe,TSe=_Se,wc=kSe,LSe=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ASe=Xe([e=>e.options,e=>e.gallery,e=>e.system,rn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ISe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,MSe=C.exports.memo(e=>{const t=Fe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce(ASe),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=xd(),w=()=>v(!0),P=()=>v(!1),E=()=>{s.metadata&&t(cx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(Qv(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},T=()=>{a&&t(kl(!1)),t(bv(s)),n!=="img2img"&&t(Co("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(kl(!1)),t(q4(s)),n!=="inpainting"&&t(Co("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(kl(!1)),t(P$(s)),n!=="outpainting"&&t(Co("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},N=()=>{g&&t(a7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(Co("img2img")),t(s7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(ESe,{children:[x(PSe,{children:ee(md,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:P,children:[x(ob,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:S4e,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(UC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(B4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(TSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(wc,{onClickCapture:E,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(wc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(wc,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(wc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(wc,{onClickCapture:T,children:"Send to Image To Image"}),x(wc,{onClickCapture:I,children:"Send to Inpainting"}),x(wc,{onClickCapture:O,children:"Send to Outpainting"}),x(UC,{image:s,children:x(wc,{"data-warning":!0,children:"Delete Image"})})]})]})},ISe),OSe=320;function TH(){const e=Fe(),t=xd(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:P}=Ce(LSe),[E,k]=C.exports.useState(300),[T,I]=C.exports.useState(590),[O,N]=C.exports.useState(w>=OSe);C.exports.useEffect(()=>{if(!!o){if(P){e(Pg(400)),k(400),I(400);return}h==="inpainting"?(e(Pg(190)),k(190),I(190)):h==="img2img"?(e(Pg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Pg(Math.min(Math.max(Number(w),0),590))),I(590)),e(Cr(!0))}},[e,h,o,w,P]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,P]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),W=()=>{e(D5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(m0(!0)),o&&e(Cr(!0))},j=()=>{e(m0(!1)),e(z5e(z.current?z.current.scrollTop:0)),e(F5e(!1))},te=()=>{e(WC(r))},re=q=>{e(gf(q)),e(Cr(!0))},se=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{W(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(m0(!1)),e(Cr(!0)))},[o]);const V=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+V;q<=256?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-V;q>32?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(gf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),W$(D,j,!o),x(H$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:se,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(X$,{minWidth:E,maxWidth:T,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Pg(Ge.clamp(Number(w)+me.width,0,Number(T)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ge.clamp(Number(w)+me.width,0,Number(T));ye>=280&&!O?N(!0):ye<280&&O&&N(!1),ye>=T?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(Eo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Kn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Iy("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Iy("user")),children:"User"})]}):ee(Kn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(_4e,{}),onClick:()=>e(Iy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(H4e,{}),onClick:()=>e(Iy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(M_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ch,{value:l,onChange:re,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(gf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(B5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e($5e(q.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?x(z$,{}):x(B$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Kn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(MSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(c$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const RSe=Xe([e=>e.options,rn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,activeTabName:t,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),tx=e=>{const t=Fe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,activeTabName:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ce(RSe),u=()=>{t(l7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{u()},{enabled:l},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,l&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:u,children:x(Y5e,{})})})]}),!s&&x(TH,{})]})})};function NSe(){return x(tx,{optionsPanel:x(A5e,{}),children:x(K5e,{})})}const DSe=Xe(Yt,e=>e.shouldDarkenOutsideBoundingBox);function zSe(){const e=Fe(),t=Ce(DSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(L$(!t))},styleClass:"inpainting-bounding-box-darken"})}const BSe=Xe(Yt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=Fe(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(BSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(qg({...a,width:Math.floor(g)})),t=="height"&&r(qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(qg({...a,width:Math.floor(s)})),t=="height"&&r(qg({...a,height:Math.floor(s)}))};return x(ch,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const FSe=Xe(Yt,e=>e.shouldLockBoundingBox);function $Se(){const e=Ce(FSe),t=Fe();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(A$(!e))},styleClass:"inpainting-bounding-box-darken"})}const HSe=Xe(Yt,e=>e.shouldShowBoundingBox);function WSe(){const e=Ce(HSe),t=Fe();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(r$,{size:22}):x(n$,{size:22}),onClick:()=>t(O_(!e)),background:"none",padding:0})}const VSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(WSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(an,{alignItems:"center",justifyContent:"space-between",children:[x(zSe,{}),x($Se,{})]})]})]}),USe=Xe(Yt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function jSe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(USe),n=Fe();return ee(an,{alignItems:"center",columnGap:"1rem",children:[x(ch,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(o5e(r.target.checked))})]})}const GSe=Xe(Yt,e=>{const{pastObjects:t,futureObjects:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function qSe(){const e=Fe(),t=xd(),{mayClearBrushHistory:n}=Ce(GSe);return x(ul,{onClick:()=>{e(i5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function LH(){return ee(Kn,{children:[x(jSe,{}),x(VSe,{}),x(qSe,{})]})}function KSe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}function nx(){return(nx=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function t8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var B0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(aI(i.current,P,s.current)):w(!1)},b=function(){return w(!1)};function w(P){var E=l.current,k=n8(i.current),T=P?k.addEventListener:k.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",b)}return[function(P){var E=P.nativeEvent,k=i.current;if(k&&(sI(E),!function(I,O){return O&&!Pm(I)}(E,l.current)&&k)){if(Pm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(aI(k,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...nx({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),rx=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=rx(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},IH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},r8=function(e){var t=IH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},x6=function(e){var t=IH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},YSe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},ZSe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},XSe=le.memo(function(e){var t=e.hue,n=e.onChange,r=rx(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:B0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:r8({h:t,s:100,v:100,a:1})})))}),QSe=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:r8({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:B0(t.s+100*i.left,0,100),v:B0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:r8(t)})))}),MH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function JSe(e,t,n){var r=t8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;MH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var e6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,t6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,n6e=function(e){e6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,lI.set(t,n);var r=t6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},r6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+x6(Object.assign({},n,{a:0}))+", "+x6(Object.assign({},n,{a:1}))+")"},o=rx(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:B0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:x6(n)})))},i6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);n6e(s);var l=JSe(n,i,o),u=l[0],h=l[1],g=rx(["react-colorful",t]);return le.createElement("div",nx({},a,{ref:s,className:g}),x(QSe,{hsva:u,onChange:h}),x(XSe,{hue:u.h,onChange:h}),le.createElement(r6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},o6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:ZSe,fromHsva:YSe,equal:MH},a6e=function(e){return le.createElement(i6e,nx({},e,{colorModel:o6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(a6e,{className:`invokeai__color-picker ${t}`,...n})},s6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function l6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(s6e),r=Fe(),i=o=>{r(_$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(gt,{"aria-label":"Mask Color",icon:x(A4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const u6e=Xe([Yt,rn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function c6e(){const e=Fe(),{tool:t,brushSize:n,activeTabName:r}=Ce(u6e),i=()=>e(Su("brush")),o=()=>{e(d6(!0))},a=()=>{e(d6(!1))},s=l=>{e(d6(!0)),e(x$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(ch,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(l6e,{})]})})}const d6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function f6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(d6e),r=Fe(),i=()=>r(Su("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(gt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(g$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const h6e=Xe([Yt,rn],(e,t)=>{const{pastObjects:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function OH(){const e=Fe(),{canUndo:t,activeTabName:n}=Ce(h6e),r=()=>{e(n5e())};return vt(["meta+z","control+z"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Undo",tooltip:"Undo",icon:x(F4e,{}),onClick:r,isDisabled:!t})}const p6e=Xe([Yt,rn],(e,t)=>{const{futureObjects:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function RH(){const e=Fe(),{canRedo:t,activeTabName:n}=Ce(p6e),r=()=>{e(r5e())};return vt(["meta+shift+z","control+shift+z","control+y","meta+y"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Redo",tooltip:"Redo",icon:x(N4e,{}),onClick:r,isDisabled:!t})}const g6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,objects:r}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(Ub).length===0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function m6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(g6e),r=Fe(),i=xd(),o=()=>{r(k$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(gt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(M4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const v6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function y6e(){const e=Fe(),{isMaskEnabled:t,activeTabName:n}=Ce(v6e),r=()=>e(C$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(gt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(r$,{size:22}):x(n$,{size:22}),onClick:r})}const b6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function x6e(){const{shouldInvertMask:e,isMaskEnabled:t,activeTabName:n}=Ce(b6e),r=Fe(),i=()=>r(e5e(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(gt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(a4e,{size:22}):x(s4e,{size:22}),onClick:i,isDisabled:!t})}const S6e=Xe(Yt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),w6e=()=>{const e=Fe(),{shouldLockBoundingBox:t}=Ce(S6e);return x(gt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(P4e,{}):x($4e,{}),"data-selected":t,onClick:()=>{e(A$(!t))}})},C6e=Xe(Yt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_6e=()=>{const e=Fe(),{shouldShowBoundingBox:t}=Ce(C6e);return x(gt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(W4e,{}),"data-alert":!t,onClick:()=>{e(O_(!t))}})},k6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function E6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(k6e),r=Fe(),i=()=>r(Su("eraser"));return vt("shift+e",o=>{o.preventDefault(),i()},{enabled:!0},[n,t]),x(gt,{"aria-label":"Erase Canvas (Shift+E)",tooltip:"Erase Canvas (Shift+E)",icon:x(C5e,{}),fontSize:18,onClick:i,"data-selected":e==="eraser",isDisabled:!t})}var P6e=Math.PI/180;function T6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const v0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:v0,version:"8.3.13",isBrowser:T6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*P6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:v0.document,_injectGlobal(e){v0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var L6e="[object Array]",A6e="[object Number]",I6e="[object String]",M6e="[object Boolean]",O6e=Math.PI/180,R6e=180/Math.PI,S6="#",N6e="",D6e="0",z6e="Konva warning: ",uI="Konva error: ",B6e="rgb(",w6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},F6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,By=[];const $6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===L6e},_isNumber(e){return Object.prototype.toString.call(e)===A6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===I6e},_isBoolean(e){return Object.prototype.toString.call(e)===M6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){By.push(e),By.length===1&&$6e(function(){const t=By;By=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(S6,N6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=D6e+e;return S6+e},getRGB(e){var t;return e in w6?(t=w6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===S6?this._hexToRgb(e.substring(1)):e.substr(0,4)===B6e?(t=F6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=w6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function DH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function t1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function zH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function H6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ts(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function W6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Tg="get",Lg="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Tg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Tg+a(t),l=Lg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Lg+n,i=Tg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Tg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Tg+fe._capitalize(n),a=Lg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function V6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=U6e+u.join(cI)+j6e)):(o+=s.property,t||(o+=Z6e+s.val)),o+=K6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Q6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=V6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var I3="absoluteOpacity",$y="allEventListeners",iu="absoluteTransform",fI="absoluteScale",Ag="canvas",nwe="Change",rwe="children",iwe="konva",i8="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",M3=" ",vI="stage",kc="transform",owe="Stage",o8="visible",awe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M3);let swe=1;class Be{constructor(t){this._id=swe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===iu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===iu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(M3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ag)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===iu&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ag),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new y0({pixelRatio:a,width:i,height:o}),v=new y0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),P=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Ag),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(I3),this._clearSelfAndDescendantCache(fI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ag,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ag)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==rwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==owe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(iu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(iu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(I3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",kp=e=>{const t=Qg(e);if(t==="pointer")return ot.pointerEventsEnabled&&_6.pointer;if(t==="touch")return _6.touch;if(t==="mouse")return _6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const pwe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",O3=[];class ax extends aa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),O3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===uwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&O3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(pwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new y0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+yI,this.content.style.height=n+yI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rfwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||hwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a8,{evt:t}):this._fire(a8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=C6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(jp,Q_(t)),Tm(t.pointerId)}_lostpointercapture(t){Tm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new y0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ax.prototype.nodeType=lwe;gr(ax);Z.addGetterSetter(ax,"container");var XH="hasShadow",QH="shadowRGBA",JH="patternImage",eW="linearGradient",tW="radialGradient";let jy;function k6(){return jy||(jy=fe.createCanvasElement().getContext("2d"),jy)}const Lm={};function gwe(e){e.fill()}function mwe(e){e.stroke()}function vwe(e){e.fill()}function ywe(e){e.stroke()}function bwe(){this._clearCache(XH)}function xwe(){this._clearCache(QH)}function Swe(){this._clearCache(JH)}function wwe(){this._clearCache(eW)}function Cwe(){this._clearCache(tW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Lm)););this.colorKey=n,Lm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(XH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(JH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=k6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(eW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=k6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Lm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,P=v+b*2,E={width:w,height:P,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}}Ie.prototype._fillFunc=gwe;Ie.prototype._strokeFunc=mwe;Ie.prototype._fillFuncHit=vwe;Ie.prototype._strokeFuncHit=ywe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bwe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",xwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Swe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",wwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Cwe);Z.addGetterSetter(Ie,"stroke",void 0,zH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ts());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ts());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ts());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,t1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,zH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var _we="#",kwe="beforeDraw",Ewe="draw",nW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Pwe=nW.length;class fh extends aa{constructor(t){super(t),this.canvas=new y0,this.hitCanvas=new X_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(kwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Ewe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}fh.prototype.nodeType="Layer";gr(fh);Z.addGetterSetter(fh,"imageSmoothingEnabled",!0);Z.addGetterSetter(fh,"clearBeforeDraw",!0);Z.addGetterSetter(fh,"hitGraphEnabled",!0,Ts());class J_ extends fh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class F0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}F0.prototype.nodeType="Group";gr(F0);var E6=function(){return v0.performance&&v0.performance.now?function(){return v0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:E6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Lwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Am.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Awe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Iwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Twe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Am={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ts());function l8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function CI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,g,g+m,1-b),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],I=l,O=u,N,D,z,$,W,Y,de,j,te,re;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var se=b.shift(),G=b.shift();if(l+=se,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var V=a.length-2;V>=0;V--)if(a[V].command==="M"){l=a[V].points[0]+se,u=a[V].points[1]+G;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(D,z,l,u);break;case"t":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(D,z,l,u);break;case"A":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break;case"a":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break}a.push({command:k||v,points:T,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,P=b*-l*g/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},I=function(W,Y){return(W[0]*Y[0]+W[1]*Y[1])/(T(W)*T(Y))},O=function(W,Y){return(W[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,k,s,l,N,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class hh extends Au{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}hh.prototype.className="Arrow";gr(hh);Z.addGetterSetter(hh,"pointerLength",10,ze());Z.addGetterSetter(hh,"pointerWidth",10,ze());Z.addGetterSetter(hh,"pointerAtBeginning",!1);Z.addGetterSetter(hh,"pointerAtEnding",!0);class n1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}n1.prototype._centroid=!0;n1.prototype.className="Circle";n1.prototype._attrsAffectingSize=["radius"];gr(n1);Z.addGetterSetter(n1,"radius",0,ze());class Cd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Cd);Z.addComponentsGetterSetter(Cd,"radius",["x","y"]);Z.addGetterSetter(Cd,"radiusX",0,ze());Z.addGetterSetter(Cd,"radiusY",0,ze());class Ls extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";gr(Ls);Z.addGetterSetter(Ls,"image");Z.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);Z.addGetterSetter(Ls,"cropX",0,ze());Z.addGetterSetter(Ls,"cropY",0,ze());Z.addGetterSetter(Ls,"cropWidth",0,ze());Z.addGetterSetter(Ls,"cropHeight",0,ze());var rW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Mwe="Change.konva",Owe="none",u8="up",c8="right",d8="down",f8="left",Rwe=rW.length;class ek extends F0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gh.prototype.className="RegularPolygon";gh.prototype._centroid=!0;gh.prototype._attrsAffectingSize=["radius"];gr(gh);Z.addGetterSetter(gh,"radius",0,ze());Z.addGetterSetter(gh,"sides",0,ze());var _I=Math.PI*2;class mh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}mh.prototype.className="Ring";mh.prototype._centroid=!0;mh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(mh);Z.addGetterSetter(mh,"innerRadius",0,ze());Z.addGetterSetter(mh,"outerRadius",0,ze());class Rl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var qy;function T6(){return qy||(qy=fe.createCanvasElement().getContext(zwe),qy)}function Kwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Ywe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Zwe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(Zwe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Bwe,n),this}getWidth(){var t=this.attrs.width===Ep||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Ep||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=T6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Gy+this.fontVariant()+Gy+(this.fontSize()+Wwe)+qwe(this.fontFamily())}_addTextLine(t){this.align()===Ig&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return T6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Ep&&o!==void 0,l=a!==Ep&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==jwe&&b,P=this.ellipsis();this.textArr=[],T6().font=this._getContextFont();for(var E=P?this._getTextWidth(P6):0,k=0,T=t.length;kh)for(;I.length>0;){for(var N=0,D=I.length,z="",$=0;N>>1,Y=I.slice(0,W+1),de=this._getTextWidth(Y)+E;de<=h?(N=W+1,z=Y,$=de):D=W}if(z){if(w){var j,te=I[z.length],re=te===Gy||te===kI;re&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Gy),z.lastIndexOf(kI))+1,j>0&&(N=j,z=z.slice(0,N),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var se=this._shouldHandleEllipsis(m);if(se){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(N),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Ep&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Ep&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+P6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=iW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,re=0;for(v=void 0;Math.abs(j-te)/j>.01&&re<20;){re++;for(var se=te;b===void 0;)b=E(),b&&se+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var V=b.points[4],q=b.points[5],Q=b.points[4]+q;P===0?P=V+1e-8:j>te?P+=Math.PI/180*q/Math.abs(q):P-=Math.PI/360*q/Math.abs(q),(q<0&&P=0&&P>Q)&&(P=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case"C":P===0?j>b.pathLength?P=1e-8:P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength/2:P=Math.max(P-(te-j)/b.pathLength/2,0),P>1&&(P=1,G=!0),v=Nn.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":P===0?P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength:P-=(te-j)/b.pathLength,P>1&&(P=1,G=!0),v=Nn.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},T="C",I=t._getTextSize(T).width+r,O=u/I-1,N=0;Ne+`.${dW}`).join(" "),TI="nodesRect",Jwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],eCe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const tCe="ontouchstart"in ot._global;function nCe(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(eCe[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var t5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function rCe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function iCe(e,t){const n=rCe(e);return fW(e,t,n)}function oCe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Jwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(TI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(TI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return fW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),t5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Zv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:tCe?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=nCe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),se=oCe(this.rotationSnaps(),j,te)-g.rotation,G=iCe(g,se);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,P=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const P=w.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),F0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function aCe(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){t5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+t5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",t5,aCe);Z.addGetterSetter(_n,"flipEnabled",!0,Ts());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Iu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Iu.prototype.className="Wedge";Iu.prototype._centroid=!0;Iu.prototype._attrsAffectingSize=["radius"];gr(Iu);Z.addGetterSetter(Iu,"radius",0,ze());Z.addGetterSetter(Iu,"angle",0,ze());Z.addGetterSetter(Iu,"clockwise",!1);Z.backCompat(Iu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var sCe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],lCe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function uCe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,P,E,k,T,I,O,N,D,z,$,W,Y,de,j=t+t+1,te=r-1,re=i-1,se=t+1,G=se*(se+1)/2,V=new AI,q=null,Q=V,X=null,me=null,ye=sCe[t],Se=lCe[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=o+((l=a+se)0&&uCe(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const dCe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const hCe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var k=b+(w-1+E)*4,T=s[P]-s[k],I=s[P+1]-s[k+1],O=s[P+2]-s[k+2],N=T,D=N>0?N:-N,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(N=I),$>D&&(N=O),N*=t,i){var W=s[P]+N,Y=s[P+1]+N,de=s[P+2]+N;s[P]=W>255?255:W<0?0:W,s[P+1]=Y>255?255:Y<0?0:Y,s[P+2]=de>255?255:de<0?0:de}else{var j=n-N;j<0?j=0:j>255&&(j=255),s[P]=s[P+1]=s[P+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function L6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const pCe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,P,E,k,T,I,O,N;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),N=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),P=r+v*(r-b),E=(s+a)*.5,k=s+v*(s-E),T=a+v*(a-E),I=(h+u)*.5,O=h+v*(h-I),N=u+v*(u-I)),m=0;mE?P:E;var k=a,T=o,I,O,N=360/T*Math.PI/180,D,z;for(O=0;OT?k:T;var I=a,O=o,N,D,z=n.polarRotation||0,$,W;for(h=0;ht&&(I=T,O=0,N=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function PCe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const ICe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);const OCe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const RCe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},DCe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;iae||L[H]!==M[ae]){var he=` -`+L[H].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=ae);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Nl(d):""}var Sh=Object.prototype.hasOwnProperty,Nu=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Nu[Rs],Nu[Rs]=null,Rs--)}function bn(d,f){Rs++,Nu[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},M;for(M in y)L[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function zl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ld(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=zl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,wh=Math.log,Ch=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(wh(d)/Ch|0)|0}var Ds=64,uo=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Bl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var ae=H&~L;ae!==0?_=zs(ae):(M&=H,M!==0&&(_=zs(M)))}else H=y&~L,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,M=f&-f,L>=M||L===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function va(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Gi=1<<32-gi(f)+L|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var qt=Ye(ge,kt,be[Ft],We);if(qt===null){kt===null&&(kt=Br);break}d&&kt&&qt.alternate===null&&f(ge,kt),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,qt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Lt===null?Te=ns:Lt.sibling=ns,Lt=ns,kt=Br}if(qt.done)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;!qt.done;Ft++,qt=be.next())qt=Tt(ge,qt.value,We),qt!==null&&(ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return zn&&Bs(ge,Ft),Te}for(kt=_(ge,kt);!qt.done;Ft++,qt=be.next())qt=Fn(kt,ge,Ft,qt.value,We),qt!==null&&(d&&qt.alternate!==null&&kt.delete(qt.key===null?Ft:qt.key),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Te}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=be.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=L(Lt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&E1(Te)===Lt.type){y(ge,Lt.sibling),ue=L(Lt,be.props),ue.ref=xa(ge,Lt,be),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=sf(be.type,be.key,be.props,null,ge.mode,We),We.ref=xa(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Lt=be.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=L(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case T:return Lt=be._init,Ko(ge,ue,Lt(be._payload),We)}if(re(be))return Tn(ge,ue,be,We);if(N(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=L(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=cp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var Gu=l2(!0),u2=l2(!1),Vd={},po=No(Vd),Sa=No(Vd),ie=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){bn(ie,f),bn(Sa,d),bn(po,Vd),d=G(f),Pn(po),bn(po,d)}function Ke(){Pn(po),Pn(Sa),Pn(ie)}function _t(d){var f=xe(ie.current),y=xe(po.current);f=V(y,d.type,f),y!==f&&(bn(Sa,d),bn(po,f))}function Jt(d){Sa.current===d&&(Pn(po),Pn(Sa))}var Ot=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ou(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function P1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function ec(){return yi().memoizedState}function N1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},nc(d))rc(f,y);else if(y=ju(d,f,y,_),y!==null){var L=ai();vo(y,d,_,L),Zd(y,f,_)}}function tc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(nc(d))rc(f,L);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,ae=M(H,y);if(L.hasEagerState=!0,L.eagerState=ae,U(ae,H)){var he=f.interleaved;he===null?(L.next=L,Hd(f)):(L.next=he.next,he.next=L),f.interleaved=L;return}}catch{}finally{}y=ju(d,f,L,_),y!==null&&(L=ai(),vo(y,d,_,L),Zd(y,f,_))}}function nc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function rc(d,f){jd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Zd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Fl(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},fx={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:f2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Vl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Vl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Vl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=N1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:d2,useDebugValue:M1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=d2(!1),f=d[0];return d=R1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,L=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Wl&30)!==0||I1(_,f,y)}L.memoizedState=y;var M={value:y,getSnapshot:f};return L.queue=M,f2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Kd(9,Qu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=ya,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=ae);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Dl(d):""}var Sh=Object.prototype.hasOwnProperty,Nu=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Nu[Rs],Nu[Rs]=null,Rs--)}function bn(d,f){Rs++,Nu[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},M;for(M in y)L[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ld(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,wh=Math.log,Ch=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(wh(d)/Ch|0)|0}var Ds=64,uo=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Fl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var ae=H&~L;ae!==0?_=zs(ae):(M&=H,M!==0&&(_=zs(M)))}else H=y&~L,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,M=f&-f,L>=M||L===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Gi=1<<32-gi(f)+L|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var qt=Ye(ge,kt,be[Ft],We);if(qt===null){kt===null&&(kt=Br);break}d&&kt&&qt.alternate===null&&f(ge,kt),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,qt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Lt===null?Te=ns:Lt.sibling=ns,Lt=ns,kt=Br}if(qt.done)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;!qt.done;Ft++,qt=be.next())qt=Tt(ge,qt.value,We),qt!==null&&(ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return zn&&Bs(ge,Ft),Te}for(kt=_(ge,kt);!qt.done;Ft++,qt=be.next())qt=Fn(kt,ge,Ft,qt.value,We),qt!==null&&(d&&qt.alternate!==null&&kt.delete(qt.key===null?Ft:qt.key),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Te}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=be.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=L(Lt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&E1(Te)===Lt.type){y(ge,Lt.sibling),ue=L(Lt,be.props),ue.ref=ba(ge,Lt,be),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=sf(be.type,be.key,be.props,null,ge.mode,We),We.ref=ba(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Lt=be.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=L(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case T:return Lt=be._init,Ko(ge,ue,Lt(be._payload),We)}if(re(be))return Tn(ge,ue,be,We);if(N(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=L(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=cp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var Gu=l2(!0),u2=l2(!1),Vd={},po=No(Vd),xa=No(Vd),ie=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){bn(ie,f),bn(xa,d),bn(po,Vd),d=G(f),Pn(po),bn(po,d)}function Ke(){Pn(po),Pn(xa),Pn(ie)}function _t(d){var f=xe(ie.current),y=xe(po.current);f=V(y,d.type,f),y!==f&&(bn(xa,d),bn(po,f))}function Jt(d){xa.current===d&&(Pn(po),Pn(xa))}var Ot=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ou(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function P1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function ec(){return yi().memoizedState}function N1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},nc(d))rc(f,y);else if(y=ju(d,f,y,_),y!==null){var L=ai();vo(y,d,_,L),Zd(y,f,_)}}function tc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(nc(d))rc(f,L);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,ae=M(H,y);if(L.hasEagerState=!0,L.eagerState=ae,U(ae,H)){var he=f.interleaved;he===null?(L.next=L,Hd(f)):(L.next=he.next,he.next=L),f.interleaved=L;return}}catch{}finally{}y=ju(d,f,L,_),y!==null&&(L=ai(),vo(y,d,_,L),Zd(y,f,_))}}function nc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function rc(d,f){jd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Zd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,$l(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},fx={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:f2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Ul(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Ul(4194308,4,d,f)},useInsertionEffect:function(d,f){return Ul(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=N1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:d2,useDebugValue:M1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=d2(!1),f=d[0];return d=R1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,L=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Vl&30)!==0||I1(_,f,y)}L.memoizedState=y;var M={value:y,getSnapshot:f};return L.queue=M,f2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Kd(9,Qu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0ep&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),ac(L,!0),L.tail===null&&L.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-L.renderingStartTime>ep&&y!==1073741824&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304);L.isBackwards?(M.sibling=f.child,f.child=M):(d=L.last,d!==null?d.sibling=M:f.child=M,L.last=M)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return gc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function V1(d,f){switch(w1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),P1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Wu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,yx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function sc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Hh=!1;function jl(d,f){for(q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),L);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:at&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ae){Un(d,d.return,ae)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Hh,Hh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var M=L.destroy;L.destroy=void 0,M!==void 0&&Uo(f,y,M)}L=L.next}while(L!==_)}}function Wh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Vh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=se(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function U1(d){var f=d.alternate;f!==null&&(d.alternate=null,U1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function lc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||lc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Uh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(Uh(d,f,y),d=d.sibling;d!==null;)Uh(d,f,y),d=d.sibling}function j1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(j1(d,f,y),d=d.sibling;d!==null;)j1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||sc(y,f);case 6:if(at){var _=br,L=jo;br=null,Go(d,f,y),br=_,jo=L,br!==null&&(jo?rt(br,y.stateNode):pt(br,y.stateNode))}else Go(d,f,y);break;case 18:at&&br!==null&&(jo?v1(br,y.stateNode):m1(br,y.stateNode));break;case 4:at?(_=br,L=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=L):(At&&(_=y.stateNode.containerInfo,L=ma(_),Mu(_,L)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var M=L,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),L=L.next}while(L!==_)}Go(d,f,y);break;case 1:if(!Pr&&(sc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(ae){Un(y,f,ae)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function jh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new yx),f.forEach(function(_){var L=A2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Yh:return":has("+(K1(d)||"")+")";case Zh:return'[role="'+d.value+'"]';case Xh:return'"'+d.value+'"';case uc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function cc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~M}if(_=L,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*bx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?rp.bind(null,d):null}function ip(d,f){var y=hc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=mc(d,f),d!==2&&(f=xi,xi=y,f!==null&&op(f)),d}function op(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,tp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var M=Qe,H=M.child;if((Qe.flags&16)!==0){var ae=M.deletions;if(ae!==null){for(var he=0;heWn()-X1?Ys(d,0):Z1|=y),Yr(d,f)}function ng(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(va(d,f,y),Yr(d,y))}function Sx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ng(d,y)}function A2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ng(d,y)}var rg;rg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,mx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&S1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;wa(d,f),d=f.pendingProps;var L=Ns(f,kr.current);Uu(f,y),L=L1(null,f,_,d,L,y);var M=Yu();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,_1(f),L.updater=Ho,f.stateNode=L,L._reactInternals=f,k1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(wa(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=lp(_),d=Fo(_,d),L){case 0:f=B1(null,f,_,d,y);break e;case 1:f=S2(null,f,_,d,y);break e;case 11:f=v2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),B1(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),S2(d,f,_,L,y);case 3:e:{if(w2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,L=M.element,i2(d,f),Mh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){L=ic(Error(a(423)),f),f=C2(d,f,_,y,L);break e}else if(_!==L){L=ic(Error(a(424)),f),f=C2(d,f,_,y,L);break e}else for(wt&&(fo=u1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,ho=!1),y=u2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Wu(),_===L){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Nd(f),_=f.type,L=f.pendingProps,M=d!==null?d.memoizedProps:null,H=L.children,He(_,L)?H=null:M!==null&&He(_,M)&&(f.flags|=32),x2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return _2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Gu(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),v2(d,f,_,L,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,M=f.memoizedProps,H=L.value,r2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===L.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var ae=M.dependencies;if(ae!==null){H=M.child;for(var he=ae.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var nt=Re.pending;nt===null?he.next=he:(he.next=nt.next,nt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),$d(M.return,y,f),ae.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,ae=H.alternate,ae!==null&&(ae.lanes|=y),$d(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Uu(f,y),L=qi(L),_=_(L),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,L=Fo(_,f.pendingProps),L=Fo(_.type,L),Ws(d,f,_,L,y);case 15:return y2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),wa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Uu(f,y),a2(f,_,L),k1(f,_,L,y),Wo(null,f,_,!0,d,y);case 19:return E2(d,f,y);case 22:return b2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Fu(d,f)}function Ca(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ca(d,f,y,_)}function ig(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lp(d){if(typeof d=="function")return ig(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,_,L,M){var H=2;if(_=d,typeof d=="function")ig(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,L,M,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=M,d;case P:return d=yo(13,y,f,L),d.elementType=P,d.lanes=M,d;case E:return d=yo(19,y,f,L),d.elementType=E,d.lanes=M,d;case I:return up(y,L,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function up(d,f,y,_){return d=yo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function cp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=et,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=L,wt&&(this.mutableSourceEagerHydrationData=null)}function I2(d,f,y,_,L,M,H,ae,he){return d=new lf(d,f,y,ae,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=yo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},_1(M),d}function og(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return zl(d,y,f)}return f}function ag(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Tt&&L<=nt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Tt||y.height!==he.height||nt<_||Re>L)){Re>_&&(he.width+=Re-_,he.x=_),ntM&&(he.height+=Tt-M,he.y=M),Yey&&(y=H)),Hep&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),ac(L,!0),L.tail===null&&L.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-L.renderingStartTime>ep&&y!==1073741824&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304);L.isBackwards?(M.sibling=f.child,f.child=M):(d=L.last,d!==null?d.sibling=M:f.child=M,L.last=M)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return gc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function V1(d,f){switch(w1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),P1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Wu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,yx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function sc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Hh=!1;function Gl(d,f){for(q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),L);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:at&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ae){Un(d,d.return,ae)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Hh,Hh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var M=L.destroy;L.destroy=void 0,M!==void 0&&Uo(f,y,M)}L=L.next}while(L!==_)}}function Wh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Vh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=se(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function U1(d){var f=d.alternate;f!==null&&(d.alternate=null,U1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function lc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||lc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Uh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(Uh(d,f,y),d=d.sibling;d!==null;)Uh(d,f,y),d=d.sibling}function j1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(j1(d,f,y),d=d.sibling;d!==null;)j1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||sc(y,f);case 6:if(at){var _=br,L=jo;br=null,Go(d,f,y),br=_,jo=L,br!==null&&(jo?rt(br,y.stateNode):pt(br,y.stateNode))}else Go(d,f,y);break;case 18:at&&br!==null&&(jo?v1(br,y.stateNode):m1(br,y.stateNode));break;case 4:at?(_=br,L=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=L):(At&&(_=y.stateNode.containerInfo,L=ga(_),Mu(_,L)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var M=L,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),L=L.next}while(L!==_)}Go(d,f,y);break;case 1:if(!Pr&&(sc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(ae){Un(y,f,ae)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function jh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new yx),f.forEach(function(_){var L=A2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Yh:return":has("+(K1(d)||"")+")";case Zh:return'[role="'+d.value+'"]';case Xh:return'"'+d.value+'"';case uc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function cc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~M}if(_=L,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*bx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?rp.bind(null,d):null}function ip(d,f){var y=hc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=mc(d,f),d!==2&&(f=xi,xi=y,f!==null&&op(f)),d}function op(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,tp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var M=Qe,H=M.child;if((Qe.flags&16)!==0){var ae=M.deletions;if(ae!==null){for(var he=0;heWn()-X1?Ys(d,0):Z1|=y),Yr(d,f)}function ng(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function Sx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ng(d,y)}function A2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ng(d,y)}var rg;rg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,mx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&S1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var L=Ns(f,kr.current);Uu(f,y),L=L1(null,f,_,d,L,y);var M=Yu();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,_1(f),L.updater=Ho,f.stateNode=L,L._reactInternals=f,k1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=lp(_),d=Fo(_,d),L){case 0:f=B1(null,f,_,d,y);break e;case 1:f=S2(null,f,_,d,y);break e;case 11:f=v2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),B1(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),S2(d,f,_,L,y);case 3:e:{if(w2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,L=M.element,i2(d,f),Mh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){L=ic(Error(a(423)),f),f=C2(d,f,_,y,L);break e}else if(_!==L){L=ic(Error(a(424)),f),f=C2(d,f,_,y,L);break e}else for(wt&&(fo=u1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,ho=!1),y=u2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Wu(),_===L){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Nd(f),_=f.type,L=f.pendingProps,M=d!==null?d.memoizedProps:null,H=L.children,He(_,L)?H=null:M!==null&&He(_,M)&&(f.flags|=32),x2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return _2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Gu(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),v2(d,f,_,L,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,M=f.memoizedProps,H=L.value,r2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===L.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var ae=M.dependencies;if(ae!==null){H=M.child;for(var he=ae.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var nt=Re.pending;nt===null?he.next=he:(he.next=nt.next,nt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),$d(M.return,y,f),ae.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,ae=H.alternate,ae!==null&&(ae.lanes|=y),$d(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Uu(f,y),L=qi(L),_=_(L),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,L=Fo(_,f.pendingProps),L=Fo(_.type,L),Ws(d,f,_,L,y);case 15:return y2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Uu(f,y),a2(f,_,L),k1(f,_,L,y),Wo(null,f,_,!0,d,y);case 19:return E2(d,f,y);case 22:return b2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Fu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new wa(d,f,y,_)}function ig(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lp(d){if(typeof d=="function")return ig(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,_,L,M){var H=2;if(_=d,typeof d=="function")ig(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,L,M,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=M,d;case P:return d=yo(13,y,f,L),d.elementType=P,d.lanes=M,d;case E:return d=yo(19,y,f,L),d.elementType=E,d.lanes=M,d;case I:return up(y,L,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function up(d,f,y,_){return d=yo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function cp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=et,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=L,wt&&(this.mutableSourceEagerHydrationData=null)}function I2(d,f,y,_,L,M,H,ae,he){return d=new lf(d,f,y,ae,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=yo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},_1(M),d}function og(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Bl(d,y,f)}return f}function ag(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Tt&&L<=nt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Tt||y.height!==he.height||nt<_||Re>L)){Re>_&&(he.width+=Re-_,he.x=_),ntM&&(he.height+=Tt-M,he.y=M),Yey&&(y=H)),H ")+` No matching component was found for: @@ -507,7 +507,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/256 `,$Ce=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 -`,HCe={};function sx(e,t,n=HCe){if(!MI&&"zIndex"in t&&(console.warn($Ce),MI=!0),!OI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(FCe),OI=!0)}for(var o in n)if(!II[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!II[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),kd(e));for(var l in v)e.on(l+nk,v[l])}function kd(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const pW={},WCe={};Jf.Node.prototype._applyProps=sx;function VCe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function UCe(e,t,n){let r=Jf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Jf.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return sx(l,o),l}function jCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function GCe(e,t,n){return!1}function qCe(e){return e}function KCe(){return null}function YCe(){return null}function ZCe(e,t,n,r){return WCe}function XCe(){}function QCe(e){}function JCe(e,t){return!1}function e8e(){return pW}function t8e(){return pW}const n8e=setTimeout,r8e=clearTimeout,i8e=-1;function o8e(e,t){return!1}const a8e=!1,s8e=!0,l8e=!0;function u8e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function c8e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function gW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function d8e(e,t,n){gW(e,t,n)}function f8e(e,t){t.destroy(),t.off(nk),kd(e)}function h8e(e,t){t.destroy(),t.off(nk),kd(e)}function p8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function g8e(e,t,n){}function m8e(e,t,n,r,i){sx(e,i,r)}function v8e(e){e.hide(),kd(e)}function y8e(e){}function b8e(e,t){(t.visible==null||t.visible)&&e.show()}function x8e(e,t){}function S8e(e){}function w8e(){}const C8e=()=>tk.exports.DefaultEventPriority,_8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:VCe,createInstance:UCe,createTextInstance:jCe,finalizeInitialChildren:GCe,getPublicInstance:qCe,prepareForCommit:KCe,preparePortalMount:YCe,prepareUpdate:ZCe,resetAfterCommit:XCe,resetTextContent:QCe,shouldDeprioritizeSubtree:JCe,getRootHostContext:e8e,getChildHostContext:t8e,scheduleTimeout:n8e,cancelTimeout:r8e,noTimeout:i8e,shouldSetTextContent:o8e,isPrimaryRenderer:a8e,warnsIfNotActing:s8e,supportsMutation:l8e,appendChild:u8e,appendChildToContainer:c8e,insertBefore:gW,insertInContainerBefore:d8e,removeChild:f8e,removeChildFromContainer:h8e,commitTextUpdate:p8e,commitMount:g8e,commitUpdate:m8e,hideInstance:v8e,hideTextInstance:y8e,unhideInstance:b8e,unhideTextInstance:x8e,clearContainer:S8e,detachDeletedInstance:w8e,getCurrentEventPriority:C8e,now:Gp.exports.unstable_now,idlePriority:Gp.exports.unstable_IdlePriority,run:Gp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var k8e=Object.defineProperty,E8e=Object.defineProperties,P8e=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,T8e=Object.prototype.hasOwnProperty,L8e=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?k8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))T8e.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))L8e.call(t,n)&&NI(e,n,t[n]);return e},A8e=(e,t)=>E8e(e,P8e(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function mW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=mW(C.exports.createContext(null));class vW extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:I8e,ReactCurrentDispatcher:M8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O8e(){const e=C.exports.useContext(ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=I8e.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Rg=[],zI=new WeakMap;function R8e(){var e;const t=O8e();Rg.splice(0,Rg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Rg.push(mW(i))});for(const n of Rg){const r=(e=M8e.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Rg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,A8e(DI({},i),{value:zI.get(r)}))),n=>x(vW,{...DI({},n)})),[])}function N8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const D8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=N8e(e),o=R8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new Jf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Jg.createContainer(n.current,tk.exports.LegacyRoot,!1,null),Jg.updateContainer(x(o,{children:e.children}),r.current),()=>{!Jf.isBrowser||(a(null),Jg.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sx(n.current,e,i),Jg.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Yy="Layer",Xv="Group",R3="Rect",Ng="Circle",n5="Line",r5="Image",z8e="Transformer",Jg=BCe(_8e);Jg.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const B8e=le.forwardRef((e,t)=>x(vW,{children:x(D8e,{...e,forwardedRef:t})})),F8e=Xe(Yt,e=>{const{objects:t}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$8e=e=>{const{...t}=e,{objects:n}=Ce(F8e);return x(Xv,{listening:!1,...t,children:n.filter(Ub).map((r,i)=>x(n5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},H8e=Xe(Yt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?a:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(H8e);return l?ee(Xv,{listening:!1,...t,children:[x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},V8e=Xe(Yt,Gv,qv,rn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,shouldLockBoundingBox:l,isDrawing:u,isTransformingBoundingBox:h,isMovingBoundingBox:g,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,tool:b,stageCoordinates:w}=e,{shouldSnapToGrid:P}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:u,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,isMovingBoundingBox:g,isTransformingBoundingBox:h,shouldLockBoundingBox:l,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:P,tool:b,stageCoordinates:w,boundingBoxStrokeWidth:(m?8:1)/s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U8e=e=>{const{...t}=e,n=Fe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,shouldLockBoundingBox:h,stageCoordinates:g,stageDimensions:m,stageScale:v,baseCanvasImage:b,activeTabName:w,shouldSnapToGrid:P,tool:E,boundingBoxStrokeWidth:k}=Ce(V8e),T=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!T.current||!I.current||(T.current.nodes([I.current]),T.current.getLayer()?.batchDraw())},[h]);const O=64*v,N=C.exports.useCallback(G=>{if(w==="inpainting"||!P){n(f6({x:G.target.x(),y:G.target.y()}));return}const V=G.target.x(),q=G.target.y(),Q=Ty(V,64),X=Ty(q,64);G.target.x(Q),G.target.y(X),n(f6({x:Q,y:X}))},[w,n,P]),D=C.exports.useCallback(G=>{if(!b)return r;const{x:V,y:q}=G,Q=m.width-i.width*v,X=m.height-i.height*v,me=Math.floor(Ge.clamp(V,0,Q)),ye=Math.floor(Ge.clamp(q,0,X));return{x:me,y:ye}},[b,r,m.width,m.height,i.width,i.height,v]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,V=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*V),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(qg({width:Q,height:X})),n(f6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,V,q)=>{const Q=G.x%O,X=G.y%O,me=Ty(V.x,O)+Q,ye=Ty(V.y,O)+X,Se=Math.abs(V.x-me),He=Math.abs(V.y-ye),Ue=Se!b||V.width+V.x>m.width||V.height+V.y>m.height||V.x<0||V.y<0?G:V,[b,m]),Y=()=>{n(h6(!0))},de=()=>{n(h6(!1)),n(Ly(!1))},j=()=>{n(IA(!0))},te=()=>{n(h6(!1)),n(IA(!1)),n(Ly(!1))},re=()=>{n(Ly(!0))},se=()=>{!u&&!l&&n(Ly(!1))};return ee(Xv,{...t,children:[x(R3,{offsetX:g.x/v,offsetY:g.y/v,height:m.height/v,width:m.width/v,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R3,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R3,{dragBoundFunc:w==="inpainting"?D:void 0,draggable:!0,fillEnabled:E==="move",height:i.height,listening:!o&&E==="move",onDragEnd:te,onDragMove:N,onMouseDown:j,onMouseOut:se,onMouseOver:re,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:k,width:i.width,x:r.x,y:r.y}),x(z8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:W,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:T,rotateEnabled:!1})]})},j8e=Xe([e=>e.options,Yt,rn],(e,t,n)=>{const{isMaskEnabled:r,cursorPosition:i,shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}=t;return{activeTabName:n,isMaskEnabled:r,isCursorOnCanvas:Boolean(i),shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G8e=()=>{const e=Fe(),{isMaskEnabled:t,activeTabName:n,shouldShowBoundingBox:r,tool:i}=Ce(j8e),o=C.exports.useRef(null);vt("shift+w",a=>{a.preventDefault(),e(a5e())},{enabled:!0},[n]),vt("shift+h",a=>{a.preventDefault(),e(O_(!r))},{enabled:!0},[n,r]),vt(["space"],a=>{a.repeat||i!=="move"&&(o.current=i,e(Su("move")))},{keyup:!1,keydown:!0},[i,o]),vt(["space"],a=>{a.repeat||i==="move"&&o.current&&o.current!=="move"&&(e(Su(o.current)),o.current="move")},{keyup:!0,keydown:!1},[i,o])},q8e=Xe(Yt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),K8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(q8e);return x(R3,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:n,globalCompositeOperation:"source-in",listening:!1,...t})},Y8e=.999,Z8e=.1,X8e=20,Q8e=Xe([rn,Yt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),J8e=e=>{const t=Fe(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(Q8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ge.clamp(r*Y8e**l,Z8e,X8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(T$(u)),t(I$(h))},[i,t,n,e,r])},lx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},e9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),t9e=e=>{const t=Fe(),{tool:n}=Ce(e9e);return C.exports.useCallback(r=>{if(!e.current)return;if(n==="move"){t(K4(!0));return}const i=lx(e.current);!i||(r.evt.preventDefault(),t(jb(!0)),t(S$([i.x,i.y])))},[e,t,n])},n9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),r9e=(e,t)=>{const n=Fe(),{tool:r,isDrawing:i}=Ce(n9e);return C.exports.useCallback(()=>{if(r==="move"){n(K4(!1));return}if(!t.current&&i&&e.current){const o=lx(e.current);if(!o)return;n(w$([o.x,o.y]))}else t.current=!1;n(jb(!1))},[t,n,i,e,r])},i9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),o9e=(e,t,n)=>{const r=Fe(),{isDrawing:i,tool:o}=Ce(i9e);return C.exports.useCallback(()=>{if(!e.current)return;const a=lx(e.current);!a||(r(E$(a)),n.current=a,!(!i||o==="move")&&(t.current=!0,r(w$([a.x,a.y]))))},[t,r,i,n,e,o])},a9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),s9e=e=>{const t=Fe(),{tool:n}=Ce(a9e);return C.exports.useCallback(r=>{if(r.evt.buttons!==1||!e.current)return;const i=lx(e.current);!i||n==="move"||(t(jb(!0)),t(S$([i.x,i.y])))},[e,n,t])},l9e=()=>{const e=Fe();return C.exports.useCallback(()=>{e(E$(null)),e(jb(!1))},[e])},u9e=Xe([Yt,rn],(e,t)=>{const{tool:n}=e;return{tool:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),c9e=()=>{const e=Fe(),{tool:t,activeTabName:n}=Ce(u9e);return{handleDragStart:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!0))},[n,e,t]),handleDragMove:C.exports.useCallback(r=>{t!=="move"||n!=="outpainting"||e(I$(r.target.getPosition()))},[n,e,t]),handleDragEnd:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!1))},[n,e,t])}};var mf=C.exports,d9e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const f9e=e=>{const{url:t,x:n,y:r}=e,[i]=d9e(t);return x(r5,{x:n,y:r,image:i,listening:!1})},h9e=Xe([e=>e.canvas],e=>({objects:e.currentCanvas==="outpainting"?e.outpainting.objects:void 0}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),p9e=()=>{const{objects:e}=Ce(h9e);return e?x(Xv,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(K4e(t))return x(f9e,{x:t.x,y:t.y,url:t.image.url},n);if(q4e(t))return x(n5,{points:t.points,stroke:t.color?ok(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},g9e=Xe([Yt],e=>e.stageScale,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),m9e=()=>{const e=Ce(g9e);return t=>t/e},v9e=()=>{const{colorMode:e}=Ev(),t=m9e();if(!au.current)return null;const n=e==="light"?"rgba(0,0,0,0.3)":"rgba(255,255,255,0.3)",r=au.current,i=r.width(),o=r.height(),a=r.x(),s=r.y(),l={x1:0,y1:0,x2:i,y2:o,offset:{x:t(a),y:t(s)}},u={x:Math.ceil(t(a)/64)*64,y:Math.ceil(t(s)/64)*64},h={x1:-u.x,y1:-u.y,x2:t(i)-u.x+64,y2:t(o)-u.y+64},m={x1:Math.min(l.x1,h.x1),y1:Math.min(l.y1,h.y1),x2:Math.max(l.x2,h.x2),y2:Math.max(l.y2,h.y2)},v=m.x2-m.x1,b=m.y2-m.y1,w=Math.round(v/64)+1,P=Math.round(b/64)+1;return ee(Xv,{children:[Ge.range(0,w).map(E=>x(n5,{x:m.x1+E*64,y:m.y1,points:[0,0,0,b],stroke:n,strokeWidth:1},`x_${E}`)),Ge.range(0,P).map(E=>x(n5,{x:m.x1,y:m.y1+E*64,points:[0,0,v,0],stroke:n,strokeWidth:1},`y_${E}`))]})},y9e=Xe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),b9e=e=>{const{...t}=e,n=Ce(y9e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(r5,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Dg=e=>Math.round(e*100)/100,x9e=Xe([Yt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),S9e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(x9e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Dg(n)}, ${Dg(r)}`}),x("div",{children:`Scale: ${Dg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Dg(a)}, ${Dg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})},w9e=Xe([Yt,Gv,qv,rn],(e,t,n,r)=>{const{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,isTransformingBoundingBox:h,isMouseOverBoundingBox:g,isMovingBoundingBox:m,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,tool:P,isMovingStage:E}=e,{shouldShowGrid:k}=t;let T="";return P==="move"?h?T=void 0:g?T="move":E?T="grabbing":T="grab":T="none",{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,shouldShowGrid:k,isTransformingBoundingBox:h,isModifyingBoundingBox:h||m,stageCursor:T,isMouseOverBoundingBox:g,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,activeTabName:r,baseCanvasImage:n,tool:P}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});let au,dl,h8;const yW=()=>{const e=Fe(),{shouldInvertMask:t,isMaskEnabled:n,shouldShowCheckboardTransparency:r,stageScale:i,shouldShowBoundingBox:o,isModifyingBoundingBox:a,stageCursor:s,stageDimensions:l,stageCoordinates:u,shouldShowGrid:h,activeTabName:g,baseCanvasImage:m,tool:v}=Ce(w9e);G8e();const b=xd();au=C.exports.useRef(null),dl=C.exports.useRef(null),h8=C.exports.useRef(null);const w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),[E,k]=C.exports.useState(null),T=J8e(au),I=t9e(au),O=r9e(au,P),N=o9e(au,P,w),D=s9e(au),z=l9e(),{handleDragStart:$,handleDragMove:W,handleDragEnd:Y}=c9e();return C.exports.useEffect(()=>{if(m){const de=new Image;de.onload=()=>{h8.current=de,k(de)},de.onerror=()=>{b({title:"Unable to Load Image",description:`Image ${m.url} failed to load`,status:"error",isClosable:!0}),e(t5e())},de.src=m.url}else k(null)},[m,e,i,b]),x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(B8e,{ref:au,style:{...s?{cursor:s}:{}},className:"inpainting-canvas-stage checkerboard",x:u.x,y:u.y,width:l.width,height:l.height,scale:{x:i,y:i},onMouseDown:I,onMouseEnter:D,onMouseLeave:z,onMouseMove:N,onMouseOut:z,onMouseUp:O,onDragStart:$,onDragMove:W,onDragEnd:Y,onWheel:T,listening:v==="move"&&!a&&g==="outpainting",draggable:v==="move"&&!a&&g==="outpainting",children:[x(Yy,{visible:h,children:x(v9e,{})}),ee(Yy,{id:"image-layer",ref:dl,listening:!1,imageSmoothingEnabled:!1,children:[x(p9e,{}),x(b9e,{})]}),ee(Yy,{id:"mask-layer",visible:n,listening:!1,children:[x($8e,{visible:!0,listening:!1}),x(K8e,{listening:!1}),E&&ee(Kn,{children:[x(r5,{image:E,listening:!1,globalCompositeOperation:"source-in",visible:t}),x(r5,{image:E,listening:!1,globalCompositeOperation:"source-out",visible:!t&&r})]})]}),ee(Yy,{id:"preview-layer",children:[x(U8e,{visible:o}),x(W8e,{visible:v!=="move",listening:!1})]})]}),x(S9e,{})]})})},C9e=Xe([Gv,e=>e.options,rn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_9e=()=>{const e=Fe(),{activeTabName:t,boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:i}=Ce(C9e);return ee("div",{className:"inpainting-settings",children:[ee(Eo,{isAttached:!0,children:[x(c6e,{}),x(f6e,{}),t==="outpainting"&&x(E6e,{})]}),ee(Eo,{isAttached:!0,children:[x(y6e,{}),x(x6e,{}),x(w6e,{}),x(_6e,{}),x(m6e,{})]}),x(gt,{"aria-label":"Save",tooltip:"Save",icon:x(v$,{}),onClick:()=>{e(R_(dl))},fontSize:20}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(Z$,{})})]})},k9e=Xe(e=>e.canvas,qv,rn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),bW=()=>{const e=Fe(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(k9e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const o=i.current.clientWidth,a=i.current.clientHeight,s=Math.min(1,Math.min(o/r.width,a/r.height));e(T$(s)),n==="inpainting"?e(LA({width:Math.floor(r.width*s),height:Math.floor(r.height*s)})):n==="outpainting"&&e(LA({width:Math.floor(o),height:Math.floor(a)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(zv,{thickness:"2px",speed:"1s",size:"xl"})})},E9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,inpainting:{imageToInpaint:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,imageToInpaint:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),P9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,imageToInpaint:r}=Ce(E9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(_9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function T9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("inpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(KSe,{}),styleClass:"inpainting-workarea-overrides",children:x(P9e,{})})}function L9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const A9e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function I9e(){return x(tx,{optionsPanel:x(L9e,{}),children:x(A9e,{})})}var xW={exports:{}},i5={};const SW=Wq(fZ);var ui=SW.jsx,Zy=SW.jsxs;Object.defineProperty(i5,"__esModule",{value:!0});var Ec=C.exports;function wW(e,t){return(wW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var A6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,wW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);A6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},i5.PanViewer=A6,i5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],P=Ec.useState(!1),E=P[0],k=P[1];return Ec.createElement("div",null,Zy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!E)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(A6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(T,I){a(T),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(E?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=i5})(xW);function M9e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},P=()=>{l>=.5&&u(l-.2)},E=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},T=()=>{v(!m)},I=(O,N)=>{o(O),s(N)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(k3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(gt,{icon:x(E3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:P,fontSize:20}),x(gt,{icon:x(C3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:E,fontSize:20}),x(gt,{icon:x(_3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(gt,{icon:x(l4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:T,fontSize:20}),x(gt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(xW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function O9e(){const e=Fe(),t=Ce(m=>m.options.isLightBoxOpen),{imageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(w3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(U$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&x(M9e,{image:n.url,styleClass:"lightbox-image"})]}),x(TH,{})]})]})}function R9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}const N9e=Xe([Yt,Gv],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),D9e=()=>{const e=Fe(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(N9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(M_,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(Ia,{label:"Show Intermediates",isChecked:t,onChange:a=>e(f5e(a.target.checked))}),x(Ia,{label:"Show Grid",isChecked:n,onChange:a=>e(u5e(a.target.checked))}),x(Ia,{label:"Snap to Grid",isChecked:r,onChange:a=>e(c5e(a.target.checked))}),x(Ia,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(L$(a.target.checked))}),x(Ia,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(d5e(a.target.checked))})]})})},z9e=Xe([Yt],e=>{const{eraserSize:t,tool:n}=e;return{tool:n,eraserSize:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),B9e=()=>{const e=Fe(),{tool:t,eraserSize:n}=Ce(z9e),r=()=>e(Su("eraser"));return vt("e",i=>{i.preventDefault(),r()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(g$,{}),"data-selected":t==="eraser",onClick:()=>e(Su("eraser"))}),children:x(an,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(ch,{label:"Size",value:n,withInput:!0,onChange:i=>e(J4e(i))})})})},F9e=Xe([Yt,Gv,rn],(e,t,n)=>{const{layer:r,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,tool:l,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}=e,{shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v}=t;return{layer:r,tool:l,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,activeTabName:n,shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$9e=()=>{const e=Fe(),{tool:t,brushColor:n,brushSize:r}=Ce(F9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),"data-selected":t==="brush",onClick:()=>e(Su("brush"))}),children:ee(an,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(an,{gap:"1rem",justifyContent:"space-between",children:x(ch,{label:"Size",value:r,withInput:!0,onChange:i=>e(x$(i))})}),x(Y_,{style:{width:"100%"},color:n,onChange:i=>e(Q4e(i))})]})})},H9e=Xe([Yt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r}=e;return{layer:n,maskColor:t,isMaskEnabled:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W9e=()=>{const e=Fe(),{layer:t,maskColor:n,isMaskEnabled:r}=Ce(H9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(X4e(t==="mask"?"base":"mask")),icon:x(T4e,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(aa,{onClick:()=>e(k$()),children:"Clear Mask"}),x(Ia,{label:"Enable Mask",isChecked:r,onChange:i=>e(C$(i.target.checked))}),x(Ia,{label:"Invert Mask"}),x(Y_,{color:n,onChange:i=>e(_$(i))})]})})},V9e=Xe([Yt],e=>{const{tool:t}=e;return{tool:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U9e=()=>{const e=Fe(),{tool:t}=Ce(V9e);return ee("div",{className:"inpainting-settings",children:[x(W9e,{}),ee(Eo,{isAttached:!0,children:[x($9e,{}),x(B9e,{}),x(gt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(y4e,{}),"data-selected":t==="move",onClick:()=>e(Su("move"))})]}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(E4e,{}),onClick:()=>{e(R_(dl))}}),x(gt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(v$,{})}),x(gt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(gt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(p$,{})})]}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(D9e,{})}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(I_,{})}),x(gt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(y$,{}),onClick:()=>e(l5e())})]})]})},j9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,outpainting:{objects:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,doesOutpaintingHaveObjects:r.length>0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,doesOutpaintingHaveObjects:r}=Ce(j9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(U9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})})})};function q9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("outpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(R9e,{}),styleClass:"inpainting-workarea-overrides",children:x(G9e,{})})}const Ef={txt2img:{title:x(u3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(I9e,{}),tooltip:"Text To Image"},img2img:{title:x(i3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(NSe,{}),tooltip:"Image To Image"},inpainting:{title:x(o3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T9e,{}),tooltip:"Inpainting"},outpainting:{title:x(s3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(q9e,{}),tooltip:"Outpainting"},nodes:{title:x(a3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n3e,{}),tooltip:"Nodes"},postprocess:{title:x(l3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r3e,{}),tooltip:"Post Processing"}},ux=Ge.map(Ef,(e,t)=>t);[...ux];function K9e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=Fe();vt("1",()=>{i(Co(0))}),vt("2",()=>{i(Co(1))}),vt("3",()=>{i(Co(2))}),vt("4",()=>{i(Co(3))}),vt("5",()=>{i(Co(4))}),vt("6",()=>{i(Co(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(b0(!1)),i(m0(!1))):(i(b0(!0)),i(m0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Ef[l].tooltip,placement:"right",children:x(lF,{children:Ef[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(aF,{className:"app-tabs-panel",children:Ef[l].workarea},l))}),s};return ee(oF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(Co(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(sF,{className:"app-tabs-panels",children:t?x(O9e,{}):a()})]})}const CW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},Y9e=CW,_W=vb({name:"options",initialState:Y9e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=A3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=G4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=A3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:P,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=G4(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=A3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...CW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=ux.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:cx,setIterations:Z9e,setSteps:kW,setCfgScale:EW,setThreshold:X9e,setPerlin:Q9e,setHeight:PW,setWidth:TW,setSampler:LW,setSeed:Qv,setSeamless:AW,setHiresFix:IW,setImg2imgStrength:p8,setFacetoolStrength:N3,setFacetoolType:D3,setCodeformerFidelity:MW,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:oEe,resetOptionsState:aEe,setShouldFitToWidthHeight:OW,setParameter:sEe,setShouldGenerateVariations:J9e,setSeedWeights:RW,setVariationAmount:e7e,setAllParameters:t7e,setShouldRunFacetool:n7e,setShouldRunESRGAN:r7e,setShouldRandomizeSeed:i7e,setShowAdvancedOptions:o7e,setActiveTab:Co,setShouldShowImageDetails:NW,setAllTextToImageParameters:a7e,setAllImageToImageParameters:s7e,setShowDualDisplay:l7e,setInitialImage:bv,clearInitialImage:DW,setShouldShowOptionsPanel:b0,setShouldPinOptionsPanel:u7e,setOptionsPanelScrollPosition:c7e,setShouldHoldOptionsPanelOpen:d7e,setShouldLoopback:f7e,setCurrentTheme:h7e,setIsLightBoxOpen:_l}=_W.actions,p7e=_W.reducer,Ll=Object.create(null);Ll.open="0";Ll.close="1";Ll.ping="2";Ll.pong="3";Ll.message="4";Ll.upgrade="5";Ll.noop="6";const z3=Object.create(null);Object.keys(Ll).forEach(e=>{z3[Ll[e]]=e});const g7e={type:"error",data:"parser error"},m7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v7e=typeof ArrayBuffer=="function",y7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,zW=({type:e,data:t},n,r)=>m7e&&t instanceof Blob?n?r(t):BI(t,r):v7e&&(t instanceof ArrayBuffer||y7e(t))?n?r(t):BI(new Blob([t]),r):r(Ll[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",em=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},x7e=typeof ArrayBuffer=="function",BW=(e,t)=>{if(typeof e!="string")return{type:"message",data:FW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:S7e(e.substring(1),t)}:z3[n]?e.length>1?{type:z3[n],data:e.substring(1)}:{type:z3[n]}:g7e},S7e=(e,t)=>{if(x7e){const n=b7e(e);return FW(n,t)}else return{base64:!0,data:e}},FW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},$W=String.fromCharCode(30),w7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{zW(o,!1,s=>{r[a]=s,++i===n&&t(r.join($W))})})},C7e=(e,t)=>{const n=e.split($W),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function WW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const k7e=setTimeout,E7e=clearTimeout;function dx(e,t){t.useNativeTimers?(e.setTimeoutFn=k7e.bind(Uc),e.clearTimeoutFn=E7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const P7e=1.33;function T7e(e){return typeof e=="string"?L7e(e):Math.ceil((e.byteLength||e.size)*P7e)}function L7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class A7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class VW extends Vr{constructor(t){super(),this.writable=!1,dx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new A7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=BW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const UW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,I7e={};let $I=0,Xy=0,HI;function WI(e){let t="";do t=UW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function jW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Xy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};C7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,w7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=jW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),dx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=WW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new KW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=R7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const YW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qy=Uc.WebSocket||Uc.MozWebSocket,UI=!0,z7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B7e extends VW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:WW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new Qy(t,n):new Qy(t):new Qy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||z7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&YW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=jW()),this.supportsBinary||(t.b64=1);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Qy}}const F7e={websocket:B7e,polling:D7e},$7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=$7e.exec(e||""),o={},a=14;for(;a--;)o[H7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=W7e(o,o.path),o.queryKey=V7e(o,o.query),o}function W7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function V7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),dx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=M7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=HW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new F7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ZW=Object.prototype.toString,q7e=typeof Blob=="function"||typeof Blob<"u"&&ZW.call(Blob)==="[object BlobConstructor]",K7e=typeof File=="function"||typeof File<"u"&&ZW.call(File)==="[object FileConstructor]";function ak(e){return j7e&&(e instanceof ArrayBuffer||G7e(e))||q7e&&e instanceof Blob||K7e&&e instanceof File}function B3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class J7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Z7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const e_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:X7e,get PacketType(){return nn},Encoder:Q7e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const t_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class XW extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(t_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}r1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};r1.prototype.reset=function(){this.attempts=0};r1.prototype.setMin=function(e){this.ms=e};r1.prototype.setMax=function(e){this.max=e};r1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,dx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new r1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||e_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){YW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new XW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zg={};function F3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=U7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=zg[i]&&o in zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(zg[i]||(zg[i]=new w8(r,t)),l=zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F3,{Manager:w8,Socket:XW,io:F3,connect:F3});var n_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,r_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,i_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return o_e(e)},P=function(){return a_e(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":s_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(n_e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},o_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},a_e=function(t){var n=t.getDay();return n===0&&(n=7),n},s_e=function(t){return(String(t).match(r_e)||[""]).pop().replace(i_e,"").replace(/GMT\+0000/g,"UTC")};const l_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(u6("Connected")),t(y5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(WC("user")),r.categories.result.latest_mtime?t(MA("result")):t(WC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(u6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Tp(),...r,category:"result"};if(t(Ay({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(s5e({image:a,boundingBox:s}))}if(i)switch(ux[o]){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(N5e({uuid:Tp(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Ay({category:"result",image:{uuid:Tp(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(g0(!0)),t(X3e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t($C()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Tp(),...l}));t(R5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(e4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Ay({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(G$(r));const{initialImage:o,maskPath:a}=n().options;n().canvas,(o?.url===i||o===i)&&t(DW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Tp(),...o};try{switch(t(Ay({image:a,category:"user"})),i){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}default:{t(q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(Q3e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(u6("Model Changed")),t(g0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(g0(!1)),t(EA(!0)),t($C()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},u_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Og.Stage({container:i,width:n,height:r}),a=new Og.Layer,s=new Og.Layer;a.add(new Og.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Og.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},c_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},d_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:P,hiresFix:E,img2imgStrength:k,initialImage:T,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:N,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:W,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:re}=n,{shouldDisplayInProgressType:se,saveIntermediatesInterval:G,enableImageDebugging:V}=i,q={prompt:a,iterations:re||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:se==="full-res",progress_latents:se==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=re?a$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=P,q.hires_fix=E),t==="img2img"&&T&&(q.init_img=typeof T=="string"?T:T.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&dl.current){const{objects:me,boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:Ue,stageScale:ct,isMaskEnabled:qe}=r[r.currentCanvas],et={...ye,...Se},tt=u_e(qe?me.filter(Ub):[],et);if(q.init_mask=tt,q.fit=!1,q.init_img=o,q.strength=k,Ue&&(q.inpaint_replace=He),q.bounding_box=et,t==="outpainting"){const at=dl.current.scale();dl.current.scale({x:1/ct,y:1/ct});const At=dl.current.getAbsolutePosition(),wt=dl.current.toDataURL({x:et.x+At.x,y:et.y+At.y,width:et.width,height:et.height});V&&c_e([{base64:tt,caption:"mask sent as init_mask"},{base64:wt,caption:"image sent as init_img"}]),dl.current.scale(at),q.init_img=wt,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=N,D&&(q.with_variations=S2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:W}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),V&&(q.enable_image_debugging=V),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},f_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(g0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=qv(r())?.url;if(!h8.current||!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n($C());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=d_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(g0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(g0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(G$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(t4e()),t.emit("requestModelChange",i)}}},h_e=()=>{const{origin:e}=new URL(window.location.href),t=F3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:P,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:T,onModelChanged:I,onModelChangeFailed:O}=l_e(i),{emitGenerateImage:N,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:W,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:re,emitRequestModelChange:se}=f_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{P(G)}),t.on("imageUploaded",G=>{E(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{T(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{N(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{W(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{re();break}case"socketio/requestModelChange":{se(a.payload);break}}o(a)}},QW=["pastObjects","futureObjects","stageScale","stageDimensions","stageCoordinates","cursorPosition"],p_e=QW.map(e=>`canvas.inpainting.${e}`),g_e=QW.map(e=>`canvas.outpainting.${e}`),m_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),v_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),JW=yF({options:p7e,gallery:H5e,system:i4e,canvas:h5e}),y_e=BF.getPersistConfig({key:"root",storage:zF,rootReducer:JW,blacklist:[...p_e,...g_e,...m_e,...v_e],throttle:500}),b_e=i2e(y_e,JW),eV=Xme({reducer:b_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(h_e())}),Fe=Vve,Ce=Mve;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function x_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(an,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(zv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),k_e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),E_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(k_e),i=t?Math.round(t*100/n):0;return x(HB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function P_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function T_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=O4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(P_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(N0,{isOpen:t,onClose:r,children:[x(pv,{}),ee(hv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(rb,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const L_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=Fe(),{name:i,status:o,description:a}=e,s=()=>{r(b5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(aa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},A_e=Xe(e=>e.system,e=>{const t=Ge.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),I_e=()=>{const{models:e}=Ce(A_e);return x(rb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(L_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},M_e=Xe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ge.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),O_e=({children:e})=>{const t=Fe(),n=Ce(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=O4(),{isOpen:a,onOpen:s,onClose:l}=O4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(M_e),b=()=>{hV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(n4e(P))};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(N0,{isOpen:r,onClose:o,children:[x(pv,{}),ee(hv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(z4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(I_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(uh,{label:"Display In-Progress Images",validValues:m3e,value:u,onChange:P=>t(Y3e(P.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(l$(P.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:P=>t(J3e(P.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(r4e(P.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Hf,{size:"md",children:"Reset Web UI"}),x(aa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(ko,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(ko,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(aa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(N0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(hv,{children:x(z4,{pb:6,pt:6,children:x(an,{justifyContent:"center",children:x(ko,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},R_e=Xe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),N_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(R_e),s=Fe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(ko,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(u$())},className:`status ${l}`,children:u})})},D_e=["dark","light","green"];function z_e(){const{setColorMode:e}=Ev(),t=Fe(),n=Ce(i=>i.options.currentTheme);return x(uh,{validValues:D_e,value:n,onChange:i=>{e(i.target.value),t(h7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const B_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(N_e,{}),x(T_e,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(k4e,{})})}),x(z_e,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(x4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(m4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(g4e,{})})}),x(O_e,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(M_,{})})})]})]}),F_e=Xe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),$_e=Xe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:da.exports.isEqual}}),H_e=()=>{const e=Fe(),t=Ce(F_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce($_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(u$()),e(l6(!n))};return vt("`",()=>{e(l6(!n))},[n]),vt("esc",()=>{e(l6(!1))}),ee(Kn,{children:[n&&x(X$,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(v4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(L4e,{}):x(h$,{}),onClick:l})})]})};function W_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var V_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jv(e,t){var n=U_e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function U_e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=V_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var j_e=[".DS_Store","Thumbs.db"];function G_e(e){return G0(this,void 0,void 0,function(){return q0(this,function(t){return o5(e)&&q_e(e.dataTransfer)?[2,X_e(e.dataTransfer,e.type)]:K_e(e)?[2,Y_e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Z_e(e)]:[2,[]]})})}function q_e(e){return o5(e)}function K_e(e){return o5(e)&&o5(e.target)}function o5(e){return typeof e=="object"&&e!==null}function Y_e(e){return k8(e.target.files).map(function(t){return Jv(t)})}function Z_e(e){return G0(this,void 0,void 0,function(){var t;return q0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Jv(r)})]}})})}function X_e(e,t){return G0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Q_e))]):[3,2];case 1:return r=i.sent(),[2,YI(nV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return Jv(o)}))]}})})}function YI(e){return e.filter(function(t){return j_e.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ntk.exports.DefaultEventPriority,_8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:VCe,createInstance:UCe,createTextInstance:jCe,finalizeInitialChildren:GCe,getPublicInstance:qCe,prepareForCommit:KCe,preparePortalMount:YCe,prepareUpdate:ZCe,resetAfterCommit:XCe,resetTextContent:QCe,shouldDeprioritizeSubtree:JCe,getRootHostContext:e8e,getChildHostContext:t8e,scheduleTimeout:n8e,cancelTimeout:r8e,noTimeout:i8e,shouldSetTextContent:o8e,isPrimaryRenderer:a8e,warnsIfNotActing:s8e,supportsMutation:l8e,appendChild:u8e,appendChildToContainer:c8e,insertBefore:gW,insertInContainerBefore:d8e,removeChild:f8e,removeChildFromContainer:h8e,commitTextUpdate:p8e,commitMount:g8e,commitUpdate:m8e,hideInstance:v8e,hideTextInstance:y8e,unhideInstance:b8e,unhideTextInstance:x8e,clearContainer:S8e,detachDeletedInstance:w8e,getCurrentEventPriority:C8e,now:Gp.exports.unstable_now,idlePriority:Gp.exports.unstable_IdlePriority,run:Gp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var k8e=Object.defineProperty,E8e=Object.defineProperties,P8e=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,T8e=Object.prototype.hasOwnProperty,L8e=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?k8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))T8e.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))L8e.call(t,n)&&NI(e,n,t[n]);return e},A8e=(e,t)=>E8e(e,P8e(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function mW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=mW(C.exports.createContext(null));class vW extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:I8e,ReactCurrentDispatcher:M8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O8e(){const e=C.exports.useContext(ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=I8e.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Rg=[],zI=new WeakMap;function R8e(){var e;const t=O8e();Rg.splice(0,Rg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Rg.push(mW(i))});for(const n of Rg){const r=(e=M8e.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Rg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,A8e(DI({},i),{value:zI.get(r)}))),n=>x(vW,{...DI({},n)})),[])}function N8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const D8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=N8e(e),o=R8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new Jf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Jg.createContainer(n.current,tk.exports.LegacyRoot,!1,null),Jg.updateContainer(x(o,{children:e.children}),r.current),()=>{!Jf.isBrowser||(a(null),Jg.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sx(n.current,e,i),Jg.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Yy="Layer",Xv="Group",R3="Rect",Ng="Circle",n5="Line",r5="Image",z8e="Transformer",Jg=BCe(_8e);Jg.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const B8e=le.forwardRef((e,t)=>x(vW,{children:x(D8e,{...e,forwardedRef:t})})),F8e=Xe(Yt,e=>{const{objects:t}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$8e=e=>{const{...t}=e,{objects:n}=Ce(F8e);return x(Xv,{listening:!1,...t,children:n.filter(Ub).map((r,i)=>x(n5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},H8e=Xe(Yt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?a:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(H8e);return l?ee(Xv,{listening:!1,...t,children:[x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},V8e=Xe(Yt,Gv,qv,rn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,shouldLockBoundingBox:l,isDrawing:u,isTransformingBoundingBox:h,isMovingBoundingBox:g,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,tool:b,stageCoordinates:w}=e,{shouldSnapToGrid:P}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:u,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,isMovingBoundingBox:g,isTransformingBoundingBox:h,shouldLockBoundingBox:l,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:P,tool:b,stageCoordinates:w,boundingBoxStrokeWidth:(m?8:1)/s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U8e=e=>{const{...t}=e,n=Fe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,shouldLockBoundingBox:h,stageCoordinates:g,stageDimensions:m,stageScale:v,baseCanvasImage:b,activeTabName:w,shouldSnapToGrid:P,tool:E,boundingBoxStrokeWidth:k}=Ce(V8e),T=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!T.current||!I.current||(T.current.nodes([I.current]),T.current.getLayer()?.batchDraw())},[h]);const O=64*v,N=C.exports.useCallback(G=>{if(w==="inpainting"||!P){n(f6({x:G.target.x(),y:G.target.y()}));return}const V=G.target.x(),q=G.target.y(),Q=Ty(V,64),X=Ty(q,64);G.target.x(Q),G.target.y(X),n(f6({x:Q,y:X}))},[w,n,P]),D=C.exports.useCallback(G=>{if(!b)return r;const{x:V,y:q}=G,Q=m.width-i.width*v,X=m.height-i.height*v,me=Math.floor(Ge.clamp(V,0,Q)),ye=Math.floor(Ge.clamp(q,0,X));return{x:me,y:ye}},[b,r,m.width,m.height,i.width,i.height,v]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,V=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*V),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(qg({width:Q,height:X})),n(f6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,V,q)=>{const Q=G.x%O,X=G.y%O,me=Ty(V.x,O)+Q,ye=Ty(V.y,O)+X,Se=Math.abs(V.x-me),He=Math.abs(V.y-ye),Ue=Se!b||V.width+V.x>m.width||V.height+V.y>m.height||V.x<0||V.y<0?G:V,[b,m]),Y=()=>{n(h6(!0))},de=()=>{n(h6(!1)),n(Ly(!1))},j=()=>{n(IA(!0))},te=()=>{n(h6(!1)),n(IA(!1)),n(Ly(!1))},re=()=>{n(Ly(!0))},se=()=>{!u&&!l&&n(Ly(!1))};return ee(Xv,{...t,children:[x(R3,{offsetX:g.x/v,offsetY:g.y/v,height:m.height/v,width:m.width/v,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R3,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R3,{dragBoundFunc:w==="inpainting"?D:void 0,draggable:!0,fillEnabled:E==="move",height:i.height,listening:!o&&E==="move",onDragEnd:te,onDragMove:N,onMouseDown:j,onMouseOut:se,onMouseOver:re,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:k,width:i.width,x:r.x,y:r.y}),x(z8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:W,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:T,rotateEnabled:!1})]})},j8e=Xe([e=>e.options,Yt,rn],(e,t,n)=>{const{isMaskEnabled:r,cursorPosition:i,shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}=t;return{activeTabName:n,isMaskEnabled:r,isCursorOnCanvas:Boolean(i),shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G8e=()=>{const e=Fe(),{isMaskEnabled:t,activeTabName:n,shouldShowBoundingBox:r,tool:i}=Ce(j8e),o=C.exports.useRef(null);vt("shift+w",a=>{a.preventDefault(),e(a5e())},{enabled:!0},[n]),vt("shift+h",a=>{a.preventDefault(),e(O_(!r))},{enabled:!0},[n,r]),vt(["space"],a=>{a.repeat||i!=="move"&&(o.current=i,e(Su("move")))},{keyup:!1,keydown:!0},[i,o]),vt(["space"],a=>{a.repeat||i==="move"&&o.current&&o.current!=="move"&&(e(Su(o.current)),o.current="move")},{keyup:!0,keydown:!1},[i,o])},q8e=Xe(Yt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),K8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(q8e);return x(R3,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:n,globalCompositeOperation:"source-in",listening:!1,...t})},Y8e=.999,Z8e=.1,X8e=20,Q8e=Xe([rn,Yt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),J8e=e=>{const t=Fe(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(Q8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ge.clamp(r*Y8e**l,Z8e,X8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(T$(u)),t(I$(h))},[i,t,n,e,r])},lx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},e9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),t9e=e=>{const t=Fe(),{tool:n}=Ce(e9e);return C.exports.useCallback(r=>{if(!e.current)return;if(n==="move"){t(K4(!0));return}const i=lx(e.current);!i||(r.evt.preventDefault(),t(jb(!0)),t(S$([i.x,i.y])))},[e,t,n])},n9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),r9e=(e,t)=>{const n=Fe(),{tool:r,isDrawing:i}=Ce(n9e);return C.exports.useCallback(()=>{if(r==="move"){n(K4(!1));return}if(!t.current&&i&&e.current){const o=lx(e.current);if(!o)return;n(w$([o.x,o.y]))}else t.current=!1;n(jb(!1))},[t,n,i,e,r])},i9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),o9e=(e,t,n)=>{const r=Fe(),{isDrawing:i,tool:o}=Ce(i9e);return C.exports.useCallback(()=>{if(!e.current)return;const a=lx(e.current);!a||(r(E$(a)),n.current=a,!(!i||o==="move")&&(t.current=!0,r(w$([a.x,a.y]))))},[t,r,i,n,e,o])},a9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),s9e=e=>{const t=Fe(),{tool:n}=Ce(a9e);return C.exports.useCallback(r=>{if(r.evt.buttons!==1||!e.current)return;const i=lx(e.current);!i||n==="move"||(t(jb(!0)),t(S$([i.x,i.y])))},[e,n,t])},l9e=()=>{const e=Fe();return C.exports.useCallback(()=>{e(E$(null)),e(jb(!1))},[e])},u9e=Xe([Yt,rn],(e,t)=>{const{tool:n}=e;return{tool:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),c9e=()=>{const e=Fe(),{tool:t,activeTabName:n}=Ce(u9e);return{handleDragStart:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!0))},[n,e,t]),handleDragMove:C.exports.useCallback(r=>{t!=="move"||n!=="outpainting"||e(I$(r.target.getPosition()))},[n,e,t]),handleDragEnd:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!1))},[n,e,t])}};var mf=C.exports,d9e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const f9e=e=>{const{url:t,x:n,y:r}=e,[i]=d9e(t);return x(r5,{x:n,y:r,image:i,listening:!1})},h9e=Xe([e=>e.canvas],e=>({objects:e.currentCanvas==="outpainting"?e.outpainting.objects:void 0}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),p9e=()=>{const{objects:e}=Ce(h9e);return e?x(Xv,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(K4e(t))return x(f9e,{x:t.x,y:t.y,url:t.image.url},n);if(q4e(t))return x(n5,{points:t.points,stroke:t.color?ok(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},g9e=Xe([Yt],e=>e.stageScale,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),m9e=()=>{const e=Ce(g9e);return t=>t/e},v9e=()=>{const{colorMode:e}=Ev(),t=m9e();if(!au.current)return null;const n=e==="light"?"rgba(0,0,0,0.3)":"rgba(255,255,255,0.3)",r=au.current,i=r.width(),o=r.height(),a=r.x(),s=r.y(),l={x1:0,y1:0,x2:i,y2:o,offset:{x:t(a),y:t(s)}},u={x:Math.ceil(t(a)/64)*64,y:Math.ceil(t(s)/64)*64},h={x1:-u.x,y1:-u.y,x2:t(i)-u.x+64,y2:t(o)-u.y+64},m={x1:Math.min(l.x1,h.x1),y1:Math.min(l.y1,h.y1),x2:Math.max(l.x2,h.x2),y2:Math.max(l.y2,h.y2)},v=m.x2-m.x1,b=m.y2-m.y1,w=Math.round(v/64)+1,P=Math.round(b/64)+1;return ee(Xv,{children:[Ge.range(0,w).map(E=>x(n5,{x:m.x1+E*64,y:m.y1,points:[0,0,0,b],stroke:n,strokeWidth:1},`x_${E}`)),Ge.range(0,P).map(E=>x(n5,{x:m.x1,y:m.y1+E*64,points:[0,0,v,0],stroke:n,strokeWidth:1},`y_${E}`))]})},y9e=Xe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),b9e=e=>{const{...t}=e,n=Ce(y9e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(r5,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Dg=e=>Math.round(e*100)/100,x9e=Xe([Yt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),S9e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(x9e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Dg(n)}, ${Dg(r)}`}),x("div",{children:`Scale: ${Dg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Dg(a)}, ${Dg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})},w9e=Xe([Yt,Gv,qv,rn],(e,t,n,r)=>{const{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,isTransformingBoundingBox:h,isMouseOverBoundingBox:g,isMovingBoundingBox:m,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,tool:P,isMovingStage:E}=e,{shouldShowGrid:k}=t;let T="";return P==="move"?h?T=void 0:g?T="move":E?T="grabbing":T="grab":T="none",{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,shouldShowGrid:k,isTransformingBoundingBox:h,isModifyingBoundingBox:h||m,stageCursor:T,isMouseOverBoundingBox:g,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,activeTabName:r,baseCanvasImage:n,tool:P}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});let au,fl,h8;const yW=()=>{const e=Fe(),{shouldInvertMask:t,isMaskEnabled:n,shouldShowCheckboardTransparency:r,stageScale:i,shouldShowBoundingBox:o,isModifyingBoundingBox:a,stageCursor:s,stageDimensions:l,stageCoordinates:u,shouldShowGrid:h,activeTabName:g,baseCanvasImage:m,tool:v}=Ce(w9e);G8e();const b=xd();au=C.exports.useRef(null),fl=C.exports.useRef(null),h8=C.exports.useRef(null);const w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),[E,k]=C.exports.useState(null),T=J8e(au),I=t9e(au),O=r9e(au,P),N=o9e(au,P,w),D=s9e(au),z=l9e(),{handleDragStart:$,handleDragMove:W,handleDragEnd:Y}=c9e();return C.exports.useEffect(()=>{if(m){const de=new Image;de.onload=()=>{h8.current=de,k(de)},de.onerror=()=>{b({title:"Unable to Load Image",description:`Image ${m.url} failed to load`,status:"error",isClosable:!0}),e(t5e())},de.src=m.url}else k(null)},[m,e,i,b]),x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(B8e,{ref:au,style:{...s?{cursor:s}:{}},className:"inpainting-canvas-stage checkerboard",x:u.x,y:u.y,width:l.width,height:l.height,scale:{x:i,y:i},onMouseDown:I,onMouseEnter:D,onMouseLeave:z,onMouseMove:N,onMouseOut:z,onMouseUp:O,onDragStart:$,onDragMove:W,onDragEnd:Y,onWheel:T,listening:v==="move"&&!a&&g==="outpainting",draggable:v==="move"&&!a&&g==="outpainting",children:[x(Yy,{visible:h,children:x(v9e,{})}),ee(Yy,{id:"image-layer",ref:fl,listening:!1,imageSmoothingEnabled:!1,children:[x(p9e,{}),x(b9e,{})]}),ee(Yy,{id:"mask-layer",visible:n,listening:!1,children:[x($8e,{visible:!0,listening:!1}),x(K8e,{listening:!1}),E&&ee(Kn,{children:[x(r5,{image:E,listening:!1,globalCompositeOperation:"source-in",visible:t}),x(r5,{image:E,listening:!1,globalCompositeOperation:"source-out",visible:!t&&r})]})]}),ee(Yy,{id:"preview-layer",children:[x(U8e,{visible:o}),x(W8e,{visible:v!=="move",listening:!1})]})]}),x(S9e,{})]})})},C9e=Xe([Gv,e=>e.options,rn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_9e=()=>{const e=Fe(),{activeTabName:t,boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:i}=Ce(C9e);return ee("div",{className:"inpainting-settings",children:[ee(Eo,{isAttached:!0,children:[x(c6e,{}),x(f6e,{}),t==="outpainting"&&x(E6e,{})]}),ee(Eo,{isAttached:!0,children:[x(y6e,{}),x(x6e,{}),x(w6e,{}),x(_6e,{}),x(m6e,{})]}),x(gt,{"aria-label":"Save",tooltip:"Save",icon:x(v$,{}),onClick:()=>{e(R_(fl))},fontSize:20}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(Z$,{})})]})},k9e=Xe(e=>e.canvas,qv,rn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),bW=()=>{const e=Fe(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(k9e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const o=i.current.clientWidth,a=i.current.clientHeight,s=Math.min(1,Math.min(o/r.width,a/r.height));e(T$(s)),n==="inpainting"?e(LA({width:Math.floor(r.width*s),height:Math.floor(r.height*s)})):n==="outpainting"&&e(LA({width:Math.floor(o),height:Math.floor(a)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(zv,{thickness:"2px",speed:"1s",size:"xl"})})},E9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,inpainting:{imageToInpaint:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,imageToInpaint:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),P9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,imageToInpaint:r}=Ce(E9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(_9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function T9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("inpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(KSe,{}),styleClass:"inpainting-workarea-overrides",children:x(P9e,{})})}function L9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const A9e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function I9e(){return x(tx,{optionsPanel:x(L9e,{}),children:x(A9e,{})})}var xW={exports:{}},i5={};const SW=Wq(fZ);var ui=SW.jsx,Zy=SW.jsxs;Object.defineProperty(i5,"__esModule",{value:!0});var Ec=C.exports;function wW(e,t){return(wW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var A6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,wW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);A6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},i5.PanViewer=A6,i5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],P=Ec.useState(!1),E=P[0],k=P[1];return Ec.createElement("div",null,Zy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!E)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(A6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(T,I){a(T),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(E?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=i5})(xW);function M9e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},P=()=>{l>=.5&&u(l-.2)},E=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},T=()=>{v(!m)},I=(O,N)=>{o(O),s(N)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(k3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(gt,{icon:x(E3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:P,fontSize:20}),x(gt,{icon:x(C3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:E,fontSize:20}),x(gt,{icon:x(_3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(gt,{icon:x(l4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:T,fontSize:20}),x(gt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(xW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function O9e(){const e=Fe(),t=Ce(m=>m.options.isLightBoxOpen),{imageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(kl(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(w3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(kl(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(U$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&x(M9e,{image:n.url,styleClass:"lightbox-image"})]}),x(TH,{})]})]})}function R9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}const N9e=Xe([Yt,Gv],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),D9e=()=>{const e=Fe(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(N9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(M_,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(f5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(u5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(c5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(L$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(d5e(a.target.checked))})]})})},z9e=Xe([Yt],e=>{const{eraserSize:t,tool:n}=e;return{tool:n,eraserSize:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),B9e=()=>{const e=Fe(),{tool:t,eraserSize:n}=Ce(z9e),r=()=>e(Su("eraser"));return vt("e",i=>{i.preventDefault(),r()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(g$,{}),"data-selected":t==="eraser",onClick:()=>e(Su("eraser"))}),children:x(an,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(ch,{label:"Size",value:n,withInput:!0,onChange:i=>e(J4e(i))})})})},F9e=Xe([Yt,Gv,rn],(e,t,n)=>{const{layer:r,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,tool:l,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}=e,{shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v}=t;return{layer:r,tool:l,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,activeTabName:n,shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$9e=()=>{const e=Fe(),{tool:t,brushColor:n,brushSize:r}=Ce(F9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),"data-selected":t==="brush",onClick:()=>e(Su("brush"))}),children:ee(an,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(an,{gap:"1rem",justifyContent:"space-between",children:x(ch,{label:"Size",value:r,withInput:!0,onChange:i=>e(x$(i))})}),x(Y_,{style:{width:"100%"},color:n,onChange:i=>e(Q4e(i))})]})})},H9e=Xe([Yt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r}=e;return{layer:n,maskColor:t,isMaskEnabled:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W9e=()=>{const e=Fe(),{layer:t,maskColor:n,isMaskEnabled:r}=Ce(H9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(X4e(t==="mask"?"base":"mask")),icon:x(T4e,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(k$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:i=>e(C$(i.target.checked))}),x(Aa,{label:"Invert Mask"}),x(Y_,{color:n,onChange:i=>e(_$(i))})]})})},V9e=Xe([Yt],e=>{const{tool:t}=e;return{tool:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U9e=()=>{const e=Fe(),{tool:t}=Ce(V9e);return ee("div",{className:"inpainting-settings",children:[x(W9e,{}),ee(Eo,{isAttached:!0,children:[x($9e,{}),x(B9e,{}),x(gt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(y4e,{}),"data-selected":t==="move",onClick:()=>e(Su("move"))})]}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(E4e,{}),onClick:()=>{e(R_(fl))}}),x(gt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(v$,{})}),x(gt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(gt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(p$,{})})]}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(D9e,{})}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(I_,{})}),x(gt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(y$,{}),onClick:()=>e(l5e())})]})]})},j9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,outpainting:{objects:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,doesOutpaintingHaveObjects:r.length>0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,doesOutpaintingHaveObjects:r}=Ce(j9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(U9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})})})};function q9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("outpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(R9e,{}),styleClass:"inpainting-workarea-overrides",children:x(G9e,{})})}const Ef={txt2img:{title:x(u3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(I9e,{}),tooltip:"Text To Image"},img2img:{title:x(i3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(NSe,{}),tooltip:"Image To Image"},inpainting:{title:x(o3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T9e,{}),tooltip:"Inpainting"},outpainting:{title:x(s3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(q9e,{}),tooltip:"Outpainting"},nodes:{title:x(a3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n3e,{}),tooltip:"Nodes"},postprocess:{title:x(l3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r3e,{}),tooltip:"Post Processing"}},ux=Ge.map(Ef,(e,t)=>t);[...ux];function K9e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=Fe();vt("1",()=>{i(Co(0))}),vt("2",()=>{i(Co(1))}),vt("3",()=>{i(Co(2))}),vt("4",()=>{i(Co(3))}),vt("5",()=>{i(Co(4))}),vt("6",()=>{i(Co(5))}),vt("v",()=>{i(kl(!t))},[t]),vt("f",()=>{n||r?(i(b0(!1)),i(m0(!1))):(i(b0(!0)),i(m0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Ef[l].tooltip,placement:"right",children:x(lF,{children:Ef[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(aF,{className:"app-tabs-panel",children:Ef[l].workarea},l))}),s};return ee(oF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(Co(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(sF,{className:"app-tabs-panels",children:t?x(O9e,{}):a()})]})}const CW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},Y9e=CW,_W=vb({name:"options",initialState:Y9e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=A3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=G4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=A3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:P,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=G4(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=A3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...CW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=ux.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:cx,setIterations:Z9e,setSteps:kW,setCfgScale:EW,setThreshold:X9e,setPerlin:Q9e,setHeight:PW,setWidth:TW,setSampler:LW,setSeed:Qv,setSeamless:AW,setHiresFix:IW,setImg2imgStrength:p8,setFacetoolStrength:N3,setFacetoolType:D3,setCodeformerFidelity:MW,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:oEe,resetOptionsState:aEe,setShouldFitToWidthHeight:OW,setParameter:sEe,setShouldGenerateVariations:J9e,setSeedWeights:RW,setVariationAmount:e7e,setAllParameters:t7e,setShouldRunFacetool:n7e,setShouldRunESRGAN:r7e,setShouldRandomizeSeed:i7e,setShowAdvancedOptions:o7e,setActiveTab:Co,setShouldShowImageDetails:NW,setAllTextToImageParameters:a7e,setAllImageToImageParameters:s7e,setShowDualDisplay:l7e,setInitialImage:bv,clearInitialImage:DW,setShouldShowOptionsPanel:b0,setShouldPinOptionsPanel:u7e,setOptionsPanelScrollPosition:c7e,setShouldHoldOptionsPanelOpen:d7e,setShouldLoopback:f7e,setCurrentTheme:h7e,setIsLightBoxOpen:kl}=_W.actions,p7e=_W.reducer,Al=Object.create(null);Al.open="0";Al.close="1";Al.ping="2";Al.pong="3";Al.message="4";Al.upgrade="5";Al.noop="6";const z3=Object.create(null);Object.keys(Al).forEach(e=>{z3[Al[e]]=e});const g7e={type:"error",data:"parser error"},m7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v7e=typeof ArrayBuffer=="function",y7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,zW=({type:e,data:t},n,r)=>m7e&&t instanceof Blob?n?r(t):BI(t,r):v7e&&(t instanceof ArrayBuffer||y7e(t))?n?r(t):BI(new Blob([t]),r):r(Al[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",em=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},x7e=typeof ArrayBuffer=="function",BW=(e,t)=>{if(typeof e!="string")return{type:"message",data:FW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:S7e(e.substring(1),t)}:z3[n]?e.length>1?{type:z3[n],data:e.substring(1)}:{type:z3[n]}:g7e},S7e=(e,t)=>{if(x7e){const n=b7e(e);return FW(n,t)}else return{base64:!0,data:e}},FW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},$W=String.fromCharCode(30),w7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{zW(o,!1,s=>{r[a]=s,++i===n&&t(r.join($W))})})},C7e=(e,t)=>{const n=e.split($W),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function WW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const k7e=setTimeout,E7e=clearTimeout;function dx(e,t){t.useNativeTimers?(e.setTimeoutFn=k7e.bind(Uc),e.clearTimeoutFn=E7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const P7e=1.33;function T7e(e){return typeof e=="string"?L7e(e):Math.ceil((e.byteLength||e.size)*P7e)}function L7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class A7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class VW extends Vr{constructor(t){super(),this.writable=!1,dx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new A7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=BW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const UW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,I7e={};let $I=0,Xy=0,HI;function WI(e){let t="";do t=UW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function jW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Xy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};C7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,w7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=jW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new El(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class El extends Vr{constructor(t,n){super(),dx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=WW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new KW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=El.requestsCount++,El.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=R7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete El.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}El.requestsCount=0;El.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in El.requests)El.requests.hasOwnProperty(e)&&El.requests[e].abort()}const YW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qy=Uc.WebSocket||Uc.MozWebSocket,UI=!0,z7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B7e extends VW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:WW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new Qy(t,n):new Qy(t):new Qy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||z7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&YW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=jW()),this.supportsBinary||(t.b64=1);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Qy}}const F7e={websocket:B7e,polling:D7e},$7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=$7e.exec(e||""),o={},a=14;for(;a--;)o[H7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=W7e(o,o.path),o.queryKey=V7e(o,o.query),o}function W7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function V7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),dx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=M7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=HW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new F7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ZW=Object.prototype.toString,q7e=typeof Blob=="function"||typeof Blob<"u"&&ZW.call(Blob)==="[object BlobConstructor]",K7e=typeof File=="function"||typeof File<"u"&&ZW.call(File)==="[object FileConstructor]";function ak(e){return j7e&&(e instanceof ArrayBuffer||G7e(e))||q7e&&e instanceof Blob||K7e&&e instanceof File}function B3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class J7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Z7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const e_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:X7e,get PacketType(){return nn},Encoder:Q7e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const t_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class XW extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(t_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}r1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};r1.prototype.reset=function(){this.attempts=0};r1.prototype.setMin=function(e){this.ms=e};r1.prototype.setMax=function(e){this.max=e};r1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,dx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new r1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||e_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){YW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new XW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zg={};function F3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=U7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=zg[i]&&o in zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(zg[i]||(zg[i]=new w8(r,t)),l=zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F3,{Manager:w8,Socket:XW,io:F3,connect:F3});var n_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,r_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,i_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return o_e(e)},P=function(){return a_e(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":s_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(n_e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},o_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},a_e=function(t){var n=t.getDay();return n===0&&(n=7),n},s_e=function(t){return(String(t).match(r_e)||[""]).pop().replace(i_e,"").replace(/GMT\+0000/g,"UTC")};const l_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(u6("Connected")),t(y5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(WC("user")),r.categories.result.latest_mtime?t(MA("result")):t(WC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(u6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Tp(),...r,category:"result"};if(t(Ay({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(s5e({image:a,boundingBox:s}))}if(i)switch(ux[o]){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(N5e({uuid:Tp(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Ay({category:"result",image:{uuid:Tp(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(g0(!0)),t(X3e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t($C()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Tp(),...l}));t(R5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(e4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Ay({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(G$(r));const{initialImage:o,maskPath:a}=n().options;n().canvas,(o?.url===i||o===i)&&t(DW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Tp(),...o};try{switch(t(Ay({image:a,category:"user"})),i){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}default:{t(q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(Q3e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(u6("Model Changed")),t(g0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(g0(!1)),t(EA(!0)),t($C()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},u_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Og.Stage({container:i,width:n,height:r}),a=new Og.Layer,s=new Og.Layer;a.add(new Og.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Og.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},c_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},d_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:P,hiresFix:E,img2imgStrength:k,initialImage:T,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:N,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:W,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:re}=n,{shouldDisplayInProgressType:se,saveIntermediatesInterval:G,enableImageDebugging:V}=i,q={prompt:a,iterations:re||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:se==="full-res",progress_latents:se==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=re?a$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=P,q.hires_fix=E),t==="img2img"&&T&&(q.init_img=typeof T=="string"?T:T.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&fl.current){const{objects:me,boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:Ue,stageScale:ct,isMaskEnabled:qe}=r[r.currentCanvas],et={...ye,...Se},tt=u_e(qe?me.filter(Ub):[],et);if(q.init_mask=tt,q.fit=!1,q.init_img=o,q.strength=k,Ue&&(q.inpaint_replace=He),q.bounding_box=et,t==="outpainting"){const at=fl.current.scale();fl.current.scale({x:1/ct,y:1/ct});const At=fl.current.getAbsolutePosition(),wt=fl.current.toDataURL({x:et.x+At.x,y:et.y+At.y,width:et.width,height:et.height});V&&c_e([{base64:tt,caption:"mask sent as init_mask"},{base64:wt,caption:"image sent as init_img"}]),fl.current.scale(at),q.init_img=wt,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=N,D&&(q.with_variations=S2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:W}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),V&&(q.enable_image_debugging=V),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},f_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(g0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=qv(r())?.url;if(!h8.current||!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n($C());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=d_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(g0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(g0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(G$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(t4e()),t.emit("requestModelChange",i)}}},h_e=()=>{const{origin:e}=new URL(window.location.href),t=F3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:P,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:T,onModelChanged:I,onModelChangeFailed:O}=l_e(i),{emitGenerateImage:N,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:W,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:re,emitRequestModelChange:se}=f_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{P(G)}),t.on("imageUploaded",G=>{E(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{T(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{N(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{W(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{re();break}case"socketio/requestModelChange":{se(a.payload);break}}o(a)}},QW=["pastObjects","futureObjects","stageScale","stageDimensions","stageCoordinates","cursorPosition"],p_e=QW.map(e=>`canvas.inpainting.${e}`),g_e=QW.map(e=>`canvas.outpainting.${e}`),m_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),v_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),JW=yF({options:p7e,gallery:H5e,system:i4e,canvas:h5e}),y_e=BF.getPersistConfig({key:"root",storage:zF,rootReducer:JW,blacklist:[...p_e,...g_e,...m_e,...v_e],throttle:500}),b_e=i2e(y_e,JW),eV=Xme({reducer:b_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(h_e())}),Fe=Vve,Ce=Mve;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function x_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(an,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(zv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),k_e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),E_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(k_e),i=t?Math.round(t*100/n):0;return x(HB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function P_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function T_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=O4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(P_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(N0,{isOpen:t,onClose:r,children:[x(pv,{}),ee(hv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(rb,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const L_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=Fe(),{name:i,status:o,description:a}=e,s=()=>{r(b5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},A_e=Xe(e=>e.system,e=>{const t=Ge.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),I_e=()=>{const{models:e}=Ce(A_e);return x(rb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(L_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},M_e=Xe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ge.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),O_e=({children:e})=>{const t=Fe(),n=Ce(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=O4(),{isOpen:a,onOpen:s,onClose:l}=O4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(M_e),b=()=>{hV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(n4e(P))};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(N0,{isOpen:r,onClose:o,children:[x(pv,{}),ee(hv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(z4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(I_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(uh,{label:"Display In-Progress Images",validValues:m3e,value:u,onChange:P=>t(Y3e(P.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(l$(P.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:P=>t(J3e(P.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(r4e(P.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Hf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(ko,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(ko,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(N0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(hv,{children:x(z4,{pb:6,pt:6,children:x(an,{justifyContent:"center",children:x(ko,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},R_e=Xe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),N_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(R_e),s=Fe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(ko,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(u$())},className:`status ${l}`,children:u})})},D_e=["dark","light","green"];function z_e(){const{setColorMode:e}=Ev(),t=Fe(),n=Ce(i=>i.options.currentTheme);return x(uh,{validValues:D_e,value:n,onChange:i=>{e(i.target.value),t(h7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const B_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(N_e,{}),x(T_e,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(k4e,{})})}),x(z_e,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(x4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(m4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(g4e,{})})}),x(O_e,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(M_,{})})})]})]}),F_e=Xe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),$_e=Xe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),H_e=()=>{const e=Fe(),t=Ce(F_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce($_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(u$()),e(l6(!n))};return vt("`",()=>{e(l6(!n))},[n]),vt("esc",()=>{e(l6(!1))}),ee(Kn,{children:[n&&x(X$,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(v4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(L4e,{}):x(h$,{}),onClick:l})})]})};function W_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var V_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jv(e,t){var n=U_e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function U_e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=V_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var j_e=[".DS_Store","Thumbs.db"];function G_e(e){return G0(this,void 0,void 0,function(){return q0(this,function(t){return o5(e)&&q_e(e.dataTransfer)?[2,X_e(e.dataTransfer,e.type)]:K_e(e)?[2,Y_e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Z_e(e)]:[2,[]]})})}function q_e(e){return o5(e)}function K_e(e){return o5(e)&&o5(e.target)}function o5(e){return typeof e=="object"&&e!==null}function Y_e(e){return k8(e.target.files).map(function(t){return Jv(t)})}function Z_e(e){return G0(this,void 0,void 0,function(){var t;return q0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Jv(r)})]}})})}function X_e(e,t){return G0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Q_e))]):[3,2];case 1:return r=i.sent(),[2,YI(nV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return Jv(o)}))]}})})}function YI(e){return e.filter(function(t){return j_e.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Pf(e){return e!=null}function pke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=aV(l,n),h=xv(u,1),g=h[0],m=sV(l,r,i),v=xv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function a5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jy(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function gke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function mke(e){return e.indexOf("Edge/")!==-1}function vke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return gke(e)||mke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;a InvokeAI - A Stable Diffusion Toolkit +<<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development ======= +======= + +>>>>>>> Builds fresh bundle >>>>>>> Builds fresh bundle From 77d3839860cb5f225042794dd508304012f68f1a Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 11 Nov 2022 16:08:09 +1300 Subject: [PATCH 012/220] Do not show progress images in the viewer --- frontend/src/features/gallery/CurrentImagePreview.tsx | 1 + frontend/src/features/lightbox/Lightbox.tsx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/gallery/CurrentImagePreview.tsx b/frontend/src/features/gallery/CurrentImagePreview.tsx index dc338f3239..03789c6ad5 100644 --- a/frontend/src/features/gallery/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/CurrentImagePreview.tsx @@ -30,6 +30,7 @@ export const imagesSelector = createSelector( return { imageToDisplay: intermediateImage ? intermediateImage : currentImage, + viewerImageToDisplay: currentImage, currentCategory, isOnFirstImage: currentImageIndex === 0, isOnLastImage: diff --git a/frontend/src/features/lightbox/Lightbox.tsx b/frontend/src/features/lightbox/Lightbox.tsx index aa8f92885f..1b87bfd80a 100644 --- a/frontend/src/features/lightbox/Lightbox.tsx +++ b/frontend/src/features/lightbox/Lightbox.tsx @@ -22,7 +22,7 @@ export default function Lightbox() { ); const { - imageToDisplay, + viewerImageToDisplay, shouldShowImageDetails, isOnFirstImage, isOnLastImage, @@ -102,9 +102,9 @@ export default function Lightbox() {
)} - {imageToDisplay && ( + {viewerImageToDisplay && ( )} From 83f369053f2223aebdc381fce3e03df8c11cbbb6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 18:32:42 +1100 Subject: [PATCH 013/220] Fixes issue with intermediates size Sorry @lstein ! --- frontend/src/features/gallery/CurrentImagePreview.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/gallery/CurrentImagePreview.tsx b/frontend/src/features/gallery/CurrentImagePreview.tsx index 03789c6ad5..3943046665 100644 --- a/frontend/src/features/gallery/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/CurrentImagePreview.tsx @@ -12,6 +12,7 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { OptionsState, setIsLightBoxOpen } from 'features/options/optionsSlice'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; +import FlexibleLoadingSpinner from 'common/components/FlexibleLoadingSpinner'; export const imagesSelector = createSelector( [(state: RootState) => state.gallery, (state: RootState) => state.options], From 6adebf065fc401c49c066ce6f13a344ea2e62d98 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 18:35:56 +1100 Subject: [PATCH 014/220] Fixes bad import --- frontend/src/features/gallery/CurrentImagePreview.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/features/gallery/CurrentImagePreview.tsx b/frontend/src/features/gallery/CurrentImagePreview.tsx index 3943046665..03789c6ad5 100644 --- a/frontend/src/features/gallery/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/CurrentImagePreview.tsx @@ -12,7 +12,6 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { OptionsState, setIsLightBoxOpen } from 'features/options/optionsSlice'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; -import FlexibleLoadingSpinner from 'common/components/FlexibleLoadingSpinner'; export const imagesSelector = createSelector( [(state: RootState) => state.gallery, (state: RootState) => state.options], From 82a53782d099f9b0d8296f66296cfdbfb11f81b8 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 11 Nov 2022 21:26:35 +1300 Subject: [PATCH 015/220] Fix Inpainting Canvas Rendering --- frontend/src/features/canvas/IAICanvas.tsx | 47 ++++++++++--------- .../canvas/IAICanvasMaskCompositer.tsx | 2 +- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 23ebd40925..e3ec8a7efc 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -1,7 +1,7 @@ // lib import { MutableRefObject, useEffect, useRef, useState } from 'react'; import Konva from 'konva'; -import { Layer, Stage } from 'react-konva'; +import { Group, Layer, Stage } from 'react-konva'; import { Image as KonvaImage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; @@ -233,30 +233,31 @@ const IAICanvas = () => { - - + + - + - {canvasBgImage && ( - <> - - - - - )} + + {canvasBgImage && ( + <> + + + + )} + diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index c3e218eff4..506fbdc76e 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -39,7 +39,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { height={stageDimensions.height / stageScale} width={stageDimensions.width / stageScale} fill={maskColorString} - globalCompositeOperation={'source-in'} + globalCompositeOperation={'source-over'} listening={false} {...rest} /> From 8ed10c732baa583a54b46562480af20e546a7fbd Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 11 Nov 2022 21:52:25 +1300 Subject: [PATCH 016/220] Revert "Fix Inpainting Canvas Rendering" This reverts commit 114a74982944fbcd0feb3ce79e81fade4d3da147. --- frontend/src/features/canvas/IAICanvas.tsx | 47 +++++++++---------- .../canvas/IAICanvasMaskCompositer.tsx | 2 +- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index e3ec8a7efc..23ebd40925 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -1,7 +1,7 @@ // lib import { MutableRefObject, useEffect, useRef, useState } from 'react'; import Konva from 'konva'; -import { Group, Layer, Stage } from 'react-konva'; +import { Layer, Stage } from 'react-konva'; import { Image as KonvaImage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; @@ -233,31 +233,30 @@ const IAICanvas = () => { - - + + - + - - {canvasBgImage && ( - <> - - - - )} - + {canvasBgImage && ( + <> + + + + + )} diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 506fbdc76e..c3e218eff4 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -39,7 +39,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { height={stageDimensions.height / stageScale} width={stageDimensions.width / stageScale} fill={maskColorString} - globalCompositeOperation={'source-over'} + globalCompositeOperation={'source-in'} listening={false} {...rest} /> From b44e9c775203cc2b4fb65b07529662a53a2ae06e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 20:03:03 +1100 Subject: [PATCH 017/220] Changes mask to diagonal line pattern --- frontend/src/assets/images/mask_pattern2.png | Bin 0 -> 1902 bytes .../canvas/IAICanvasMaskCompositer.tsx | 55 ++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 frontend/src/assets/images/mask_pattern2.png diff --git a/frontend/src/assets/images/mask_pattern2.png b/frontend/src/assets/images/mask_pattern2.png new file mode 100644 index 0000000000000000000000000000000000000000..b917d0c421fae3006e657806f62c7515f832e9e8 GIT binary patch literal 1902 zcmb_de@qis96vHQE#RgO1JO)x*TtDYd%YrH&lZFhq|CC~!h|_sNBi2Iw0Gy-RSITo zf}4TFIMBIh7-nJ^A~H9#p<~0Dj7bcHWSAg=V3={54DiP`U1W3bS|}j0{j=mbV1fTy=~?s~{3R#)c?4N-n$F4*b4;5_8|zV0cD4{G zeI5?tkeB4+C|eN_(L&&)867s>b{<1%yAInLXHuCsJ#f+Kr97~fW@gz+i)a!h7a&+-6`Q^qM(SYjxubMMwkpACIXiboKULpnRJnM%tM!uIdsm&imc#bxnKaZwg|#= z3}O17ZsMc3r;$yjf2Vsqv%(O>)SWO9lS!TB)6@n+RtX1i3lLZ@Zv&}20VB%&nUL~A znrRfE= zfaICmE0s2zp6KAzCT$1Bvzzz(ozB($X+B?d}_EVT;uCPBcFMXV>|2vWU1njlD3AXR=gJPUS8 zr2dO9bu_Al7A6y!P75N-m-v?gZEgiS0<*x>P5b*BMg3JKDVvle9mesj-D?AOe^^j1 zfC{WbET(vn?1Tl@VaW~$4bxeInx)P~2_>OY#?7`Ub^)k1e{A@qXSj6Yrd-qFbDY=u z2{Vo;vkhRs`>fz{$Em0Sf zRvvMb9n3q+-EG(rSC}!lc3Xyll=3PtOs(W+$$WqEfZxsz{2ryjpy zX{lWKTWP-az^}D+zx-J{uIcI3^n^Iq)jPVc=6Bw_mu8P??E3L$M4x=|*^Y15b!1yt z%l5u{f*fMFD|ed)TC)EdJYP={bkp_5$W?E6<+xUGs28cfL41{9#yV z!9eM;uGix~yEH+aS-Nk}_x)J&@vvgsD{+u?kt!b&SeT8;)vMu~g{DQ7vtiLC5Z|jo0k3RqAz0sF$)!gq6E0C$2 zZOfMqG4N|4GS`KSs2 literal 0 HcmV?d00001 diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index c3e218eff4..27ee3c0027 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -1,13 +1,18 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import { RectConfig } from 'konva/lib/shapes/Rect'; +import _ from 'lodash'; import { Rect } from 'react-konva'; import { currentCanvasSelector, InpaintingCanvasState, OutpaintingCanvasState, } from './canvasSlice'; +import maskPatternImage from 'assets/images/mask_pattern2.png'; + import { rgbaColorToString } from './util/colorToString'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import Konva from 'konva'; export const canvasMaskCompositerSelector = createSelector( currentCanvasSelector, @@ -20,6 +25,7 @@ export const canvasMaskCompositerSelector = createSelector( stageDimensions, stageScale, maskColorString: rgbaColorToString(maskColor), + maskOpacity: maskColor.a, }; } ); @@ -29,18 +35,59 @@ type IAICanvasMaskCompositerProps = RectConfig; const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { const { ...rest } = props; - const { maskColorString, stageCoordinates, stageDimensions, stageScale } = - useAppSelector(canvasMaskCompositerSelector); + const { + maskColorString, + maskOpacity, + stageCoordinates, + stageDimensions, + stageScale, + } = useAppSelector(canvasMaskCompositerSelector); + + const [fillPatternImage, setFillPatternImage] = + useState(null); + + const [offset, setOffset] = useState(0); + + const rectRef = useRef(null); + const incrementOffset = useCallback(() => { + setOffset(offset + 1); + setTimeout(incrementOffset, 500); + console.log('toggle'); + console.log('incrementing'); + }, [offset]); + + useEffect(() => { + if (fillPatternImage) return; + const image = new Image(); + + image.onload = () => { + setFillPatternImage(image); + }; + + image.src = maskPatternImage; + }, [fillPatternImage]); + + useEffect(() => { + const timer = setInterval(() => setOffset((i) => (i + 1) % 6), 100); + return () => clearInterval(timer); + }, []); + + if (!fillPatternImage) return null; return ( ); From b8bb46042c5fe6ed50777feb4ca10f7f81666a56 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 20:49:15 +1100 Subject: [PATCH 018/220] SVG mask --- frontend/src/assets/images/mask.svg | 77 +++++++++++++ frontend/src/assets/images/mask_pattern2.png | Bin 1902 -> 0 bytes .../canvas/IAICanvasMaskCompositer.tsx | 102 ++++++++++++++++-- 3 files changed, 170 insertions(+), 9 deletions(-) create mode 100644 frontend/src/assets/images/mask.svg delete mode 100644 frontend/src/assets/images/mask_pattern2.png diff --git a/frontend/src/assets/images/mask.svg b/frontend/src/assets/images/mask.svg new file mode 100644 index 0000000000..8cc4bee424 --- /dev/null +++ b/frontend/src/assets/images/mask.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/assets/images/mask_pattern2.png b/frontend/src/assets/images/mask_pattern2.png deleted file mode 100644 index b917d0c421fae3006e657806f62c7515f832e9e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1902 zcmb_de@qis96vHQE#RgO1JO)x*TtDYd%YrH&lZFhq|CC~!h|_sNBi2Iw0Gy-RSITo zf}4TFIMBIh7-nJ^A~H9#p<~0Dj7bcHWSAg=V3={54DiP`U1W3bS|}j0{j=mbV1fTy=~?s~{3R#)c?4N-n$F4*b4;5_8|zV0cD4{G zeI5?tkeB4+C|eN_(L&&)867s>b{<1%yAInLXHuCsJ#f+Kr97~fW@gz+i)a!h7a&+-6`Q^qM(SYjxubMMwkpACIXiboKULpnRJnM%tM!uIdsm&imc#bxnKaZwg|#= z3}O17ZsMc3r;$yjf2Vsqv%(O>)SWO9lS!TB)6@n+RtX1i3lLZ@Zv&}20VB%&nUL~A znrRfE= zfaICmE0s2zp6KAzCT$1Bvzzz(ozB($X+B?d}_EVT;uCPBcFMXV>|2vWU1njlD3AXR=gJPUS8 zr2dO9bu_Al7A6y!P75N-m-v?gZEgiS0<*x>P5b*BMg3JKDVvle9mesj-D?AOe^^j1 zfC{WbET(vn?1Tl@VaW~$4bxeInx)P~2_>OY#?7`Ub^)k1e{A@qXSj6Yrd-qFbDY=u z2{Vo;vkhRs`>fz{$Em0Sf zRvvMb9n3q+-EG(rSC}!lc3Xyll=3PtOs(W+$$WqEfZxsz{2ryjpy zX{lWKTWP-az^}D+zx-J{uIcI3^n^Iq)jPVc=6Bw_mu8P??E3L$M4x=|*^Y15b!1yt z%l5u{f*fMFD|ed)TC)EdJYP={bkp_5$W?E6<+xUGs28cfL41{9#yV z!9eM;uGix~yEH+aS-Nk}_x)J&@vvgsD{+u?kt!b&SeT8;)vMu~g{DQ7vtiLC5Z|jo0k3RqAz0sF$)!gq6E0C$2 zZOfMqG4N|4GS`KSs2 diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 27ee3c0027..9a09ef7572 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -8,7 +8,6 @@ import { InpaintingCanvasState, OutpaintingCanvasState, } from './canvasSlice'; -import maskPatternImage from 'assets/images/mask_pattern2.png'; import { rgbaColorToString } from './util/colorToString'; import { useCallback, useEffect, useRef, useState } from 'react'; @@ -32,6 +31,86 @@ export const canvasMaskCompositerSelector = createSelector( type IAICanvasMaskCompositerProps = RectConfig; +const getColoredSVG = (color: string) => { + return `data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll('black', color); +}; + const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { const { ...rest } = props; @@ -52,8 +131,6 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { const incrementOffset = useCallback(() => { setOffset(offset + 1); setTimeout(incrementOffset, 500); - console.log('toggle'); - console.log('incrementing'); }, [offset]); useEffect(() => { @@ -63,14 +140,21 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { image.onload = () => { setFillPatternImage(image); }; - - image.src = maskPatternImage; - }, [fillPatternImage]); + image.src = getColoredSVG(maskColorString); + }, [fillPatternImage, maskColorString]); useEffect(() => { - const timer = setInterval(() => setOffset((i) => (i + 1) % 6), 100); + if (!fillPatternImage) return; + fillPatternImage.src = getColoredSVG(maskColorString); + }, [fillPatternImage, maskColorString]); + + useEffect(() => { + const timer = setInterval( + () => setOffset((i) => (i + 2) % Number(fillPatternImage?.width)), + 100 + ); return () => clearInterval(timer); - }, []); + }, [fillPatternImage?.width]); if (!fillPatternImage) return null; @@ -84,7 +168,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { fillPatternImage={fillPatternImage} fillPatternOffsetY={offset} fillPatternRepeat={'repeat'} - fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }} + fillPatternScale={{ x: 0.5 / stageScale, y: 0.5 / stageScale }} listening={true} opacity={maskOpacity} globalCompositeOperation={'source-in'} From 016551e03683083ec0050dbd32e03849f16f2042 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 20:59:38 +1100 Subject: [PATCH 019/220] Fixes warning about NaN? --- frontend/src/features/canvas/IAICanvasMaskCompositer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 9a09ef7572..58b58662b9 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -150,7 +150,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { useEffect(() => { const timer = setInterval( - () => setOffset((i) => (i + 2) % Number(fillPatternImage?.width)), + () => setOffset((i) => (i + 2) % (fillPatternImage?.width || 0)), 100 ); return () => clearInterval(timer); From 0a96d2a8886e012873dce594e0c85f0a4484387b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 21:14:22 +1100 Subject: [PATCH 020/220] Fixes mask for FF --- .../features/canvas/IAICanvasMaskCompositer.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 58b58662b9..124bd928e6 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -32,7 +32,9 @@ export const canvasMaskCompositerSelector = createSelector( type IAICanvasMaskCompositerProps = RectConfig; const getColoredSVG = (color: string) => { - return `data:image/svg+xml;utf8, + return `data:image/svg+xml;utf8, + + @@ -149,12 +151,9 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { }, [fillPatternImage, maskColorString]); useEffect(() => { - const timer = setInterval( - () => setOffset((i) => (i + 2) % (fillPatternImage?.width || 0)), - 100 - ); + const timer = setInterval(() => setOffset((i) => (i + 1) % 5), 50); return () => clearInterval(timer); - }, [fillPatternImage?.width]); + }, []); if (!fillPatternImage) return null; @@ -166,11 +165,10 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { height={stageDimensions.height / stageScale} width={stageDimensions.width / stageScale} fillPatternImage={fillPatternImage} - fillPatternOffsetY={offset} + fillPatternOffsetY={isNaN(offset) ? 0 : offset} fillPatternRepeat={'repeat'} - fillPatternScale={{ x: 0.5 / stageScale, y: 0.5 / stageScale }} + fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }} listening={true} - opacity={maskOpacity} globalCompositeOperation={'source-in'} {...rest} /> From 00385240e701e1bdc28aaeaf5b36b17dd89b6406 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 11 Nov 2022 21:54:11 +1100 Subject: [PATCH 021/220] Adds mask design file --- frontend/src/assets/images/mask.afdesign | Bin 0 -> 68382 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend/src/assets/images/mask.afdesign diff --git a/frontend/src/assets/images/mask.afdesign b/frontend/src/assets/images/mask.afdesign new file mode 100644 index 0000000000000000000000000000000000000000..52c8ea41058e9283217158eeebe14bf570b056eb GIT binary patch literal 68382 zcmZ^~by!qw*FHRyq~ws&HI$Te4Ba)vARrwoh@>c8(%mIel0$=}bcX^GQc5G;o%3z) z=XreZ-yh#~9JBYHy*G2!igTT70Ya+D;DSIP2UiyulZwN04=Ugb&^G>iX8-T`KX*YO zUQ!3EKi8=L{lHut-=G24Op3PlY;`<$AZ3j2pzD%&Z7uqhF)H2$MskV(yXqu z`Ce*Z1q7l-j3@sH*2<-leG)ks5rPL7br_N7DYD`WVz?5 zjww%!9zJtB0WJm&#wEJhOT6gCmjYCzyu<6O<4 zWG6JF4H$zN$7y<>p}OUdvhBhcc_w|N8A@=Kn7?lXKNjzRB=D!eY*7RrBH?e#(w7rq~#$ ztqCtt-5A)>-@aoGY1Y|7`|=%=h4I%oo1TBHtsYMI7?aQ9jL%c>Tlz`1$#m%WbaIQA z9AOyqdl3B?Gfp%tM++Oit(b+qt7;AmzA#}r9mdK7^eC4`A^nmnw@Zrx=K$kN{D9uJ zq9dN$5+uSzB%@~>i|V1u3QLQlb#vi?tJ0^c8(F#;AL&Bai|eG0{hJ;wJV_n}5KA03 zSmBV#C%5{MTyDvYatrVqmqGoxUx{2Lbm8DU#Z^pCD@Y2oiYZw+mm8fU*n|xnz(|qN2Z~cHCXlBJmS?V>4DTY^ zt#~K*i^an<6g65l@0|=e_T)>hfEEIY?I-#1yxM(Fou`6InQVHr*6n!3Fr^DZ=&^=tpy2M4@CMDTSPJNKpFP3t3qz2 zg0Pr<$>bYP=HvH#$}2}xz&^&Dh0sYyBGS>3_OKX%Z|z|bLf=Nii_u}<1|yU0nDV%0 zpAY{!#pL{r9Ma(Oa2BQXW2)D@EOuu! z>8lsp(X}U^9s6eu@4r;73Mx6aaD2Ug+^74zR5d_C4DqZ@ptM58x6}c9r>r@5_KMd{ zyHz(H+5f%E>X*Ifz5o{E{wp6Df3H%G=?{H~iV~gbs&;sRUU3u$OCi(f-RiD{pZLf~ z5|Z?7%kNER$Nti;dzD?sZf6Ob`)+M@B~7u){7K7pmfp#JER^RK9@>&O&q#?dsJk5f zyz*9i9Tk$&RD(wK7=sxS1|9`FT%gDm?nm^&-l^o3aE4pGJf)P8A}KZ8_S|)ZzkIw( zs7QJ9EE$d~g8oJInKZotuYB%D!+Q9cjve1b+vC@^yVvrd~JF=^C2>TOlfR@$#y6e9U%+YdI%}#;c2GhQ_bxUa+Nq#s007^6>Wx z`U%%O?(eROuakx^rb`u0D@wW~tSMIcADUV2s`e+3RJ>tMzkF9fZ*0`F#7%Cp%Vd#c6zcn{K5|e?qs$ymG2NP{OPfBKSQe z-OhC6^~c;N>3FxX^bPhMUq9Ge;T8vu@x4Q*xHV8~paW@jsniKr2h zUcA}VXyNTTrU&xr0Gw3znVOENz{JTsIE8O2=@o}iS8J=F!4-0LabY}Y(0If@uH}{D zt0S}KDv4$7?^O2B1An~yO!XB#1;NTUY5d)Ya2z>E;Eo9ETo_ONVc$2Q2rlP-9LgBMnIYY*l6Z9F z(hNs{`6@b7ur^aj#-m590zyK4^K&!2xfZhBL4CWK43Pz_0-nV@84oFTwvH3htM@S! zqsdO)Mnr6RGH08zay%+(-5zi$zVBX6bLW>JaZ}L9@W^1TN>foYN^~yd7BYzHUUm}U zHJ>yvvE!BQV#rpD$tj`eaGbh;UJ;&*Uzjj18{r_LC-Rwx#1{s ze7wYIyYc76n|O%@WL}-cNBnXMT64G?br}MW_H6oaqoboqqSCN`pkaMYM$H${r5AoK zq5i%8x=dcgd@}5t2rq&#SgNBqV8lqBY{c%|ztx@xLgjcDXQg0DaB<$Hf3aBm)Y#-8 zxz1R;biid#qHEyk#*iw#`mLG%@cK%6IzwdLlgD@UZWVP2iEtJ5Kh4&wQ)oS-;sYEu zZV>AAC@;Sn8OyTlyPpVO_pEIXhnwiGmsrn`8ecR7eOwsecy04T+jecJr(MFrd76^6RdTzdLmf*L(Y>jbDf-xK{su&S0U}OJ4 z++xzSKw@14F%I`FCcPOa!6;{{>#y5XY2yasebGrZ?3)V%;CQmTbNd=w9L}JXRXS%F zEb(+yGmC|A|AkCe#k0Z1KyON0me3-~o!k0?aeJ0Z)17TY@awv_ToEaZ;zjcDr;Rk_ zG)OkGrqu>Evhe#EMyG$OqkcYTD4+E8u4JGl;Qi^RV0|9tf=ng zUfJFXbj@ZMq5gg?^6Z(~S7*-DGia5nq1Nxkl%3%lX^!)i!AAW8So&{>;WztIVy|x` zyFbTn1!OZGhW>uRSNORu$ji$SaAeqzM)WhLb*4}0g1d~`P3k7k8f?@|kd(kg>rS~} zmz26DBv`6-Q}yVecO{>f`UfbM_m&d%O=3jX|HD zx)HL19-57})v+%`^_fRU-hjY9ub;OUetUM$8Rh^OkH>q)#DSP0$#JcoBbUEKW zcth2!SlBktCRzqBkWjd>VMSGm1Sz6l7V%Iwb^L~@C`~w`^?RrLyy6Y*6Bg48qcD&Yra{5q1(8Bh_xCT)H#MGql-;XO|Zi^giD;?9!&C zr`x6@R8L|*t53m?xvg(Ahd4Mre)}e!JijSd4R*N~xA2Q}SneV$ba&igg}u$OIY zs32Fn8m*DSB^xF|;Hfkf*0O5`O7qDQOK&>KMUbR0sQ%2rRRg;sahM0dUMfzZ7gB96 zg-88f$xk1sh{UXl5R=I{Aw$;dGw5a#cs@TLBsaRbClz_lN1LI$v$NY`gMwdcGgU@m z_W479otRlI_*T$b!$fkvI;7$}X7l>ar<^C&%WHKP<-T$^J8R6tpM(p1^dgtvW=9bd zpZqd0&H~@#B?=x9SqI^k@3)e$p``LhSOZw7azPJx<*A*3=?eKXpsxA_xGdPyezBSD zAZ7UZEaf3O5`O-8STF@y(3A&EvW(Oi`JpO%MO|b{5T2!q%Bgc6awp7{0?|u{ci;;m zNtxS;*E2>6MO09hei$3%rKPLnma3xei-Mg@klMQnDDT{nv7h0|S9Bj5OZb1zi^r59 zzb`nqaKYZy>)O%tDNae zc{TURm1Ddc?%?Y%)m_KoQE=|$agM&4F)N>pTkc&hZ2VOx^sz-H^-qGl#~Tn@o(~Zb zyg%Iws4h<`bpSU}JY*AOJ8>AQ zls%W;V-YW*L(ZLQ(BcxQISxTG#ugZ0krE5t?jLA^_L|lMvLr%+_L49(A_yHQ7cGJ) zVWxu}U3$~sGKg7d43nccClH6DSY(SqIgVZ?5M6XxhBa}}x<;2qnw}5~UF=)H!xx|c zX?ob^TJWFe*o?hf*niH%@(~z#40)VNx^tS7_mJU$b-b{_0A7mgUmT(~6DSEZFO$s4 z9|gVqI$xHNYrA1s)}kpGkxlYF`P1@3NGAbmP_rUV`z$JoM_4E-x?JI$)iVC{I!X297Y$vL>kZ}lY4_7rkZdGf zE)j~C9DM7Jzfl`*dO+~xNr1a}w{<0=h4$jyRQKGh<|3x3e>G~bSe*{>6+d~BW?65N zY(id7<=0rsn}QzYdU$F1!e~Kp{yx@4%A2|$@vW;Kp2+ee01pp8idOi&A)@W3);j#; zP1g;0F2l_?Mz__W87bqy#d+ z_wCqGJB4)fzW}jG3mn z2U*7+v7gVL8r0k$n48!P9arQ_7)%LCz_&jAl#RoPYfk#eUv*ZEPEMb(E`?a)2^AvkWdV6`V9`GU9GKzx)xF2JgX zqK7bq>~l)R`e+~yuXn(SEctHsN8EFgr&M}C)2}yw_Ekj&m&x!@huiwk$+yT)=6(cUqiUZN8uq5hil=gOIGcT;cyclV{?sTs|YZF)TJ%4mDrXQh@%KmLFtTf=HViNccHw2zv2|CvLhPl!_5cT zcOhJI0~9wZ5!9&c==@mBgadSOP~d5thpCSJ!6l}C(jC|YyvY9iRv)w~`_^_~Y}rSwv3t z59G@>eTHd?>6_8OsHT05rHs+4>j{72!Shqbh)EmF|Ck7YU=;z3I zq8T0ZtmFI891N^oBo&*1cL(&zlP9&PAw6hJG)p4pf+eqz4-GW7?_cF$(Vs(BgnA*qkf|dCccF{cf6TU|VWM z3fzna97UC60H%IXaC8bPoHBhYwRg}Xs09zXsr0C5Cw(=2dtd=vEwIGS#g2?NISAGE z=$S2R$*yor&m&3B9knYObVIyG;1%o0ugybezh7$)3EuI%E+Jz$-;ilGD!qHgl|Cmw zS`o&^{js<9v)it!t++U{ri<~a|4`o9))ZSSX(W|3i{{IUC#CpX43=o%4fj5=w>D?0 zz}H@zAJv>o9&hz?8^4MPF)J8tG_b!>P~%FEv3$W#+8aaK8~>xan4)<5=RB2~esNCe zuxW6zTA>gJbNZZuxK_=nOnh!E+X?aVddfH3Zp*Vb)UwyQ z+7ve>*vIoeNH=<8Yc|Q#=40ZU0i@7;RIQ5DHZgKQN@v7BP4yPM#MW^~kX0O$kVww= zr|IUy+@hT$r(|P1YFdnuAzafRHXzG=vmTy&6vM;!X8yX#JKt^|cL0RIsWI2`OFz6B zt(b72rFZQ&`on>TsBber7WKEfRR^v5VeF1Fs#_txdN#LM|GpCh(972HLbE~7Q8w!N zJBF+xj&9(+s2wDFS)@(AN4+|O?#I^=>fc66uy)-X?z>a%?C#ZOw#H}T)xY7ZvFfIe zIfwPRY>wTMNqncyc%6<~Z=Wt(4^@j|qw7eIP|F6c7r)Qc8p9L9B#9#F&^S4rvstCztwU+@0(>Z#-Rh z$UZPTMLux&ZvN^>2qpQ0<33*DucIf1khl08m#6L2b##Ytgls;FoWHR0qpnG`FT{PH zDsiX>^(W6w^@LQPuPu|9-ukKrkfZnosM(D$e)W6l?=E5!;lcg<>Acl`E1Ff9 zll8T!$M6+AyLjV~S#qt|DYgPth%MsD6R?8qi~Aa8A;mNmH*}5NK(4y=#Ej1+Bgraf zEy&=cI=t*6yT|>R42KK&Xr-;ij)bzu^ZZSjr>E3US0nWHzHIULZZ%pjAOOG{*nmq) zwCAc=qi2!T`5TJka5J+M@A`}AZE1w7nPE=R3+5YY2yHzmN&tlQ>8Z#8!*}zmdhKA| z76Ai+Vk$NYX|g_19`QXLzLSX7@3VsLF?IZrWLIj14}*lZ}5%^nIcNUIOdc1b7R zn#`q80Ab2>_?x}-U(-Gf->7E5c8GSJhqJ-EnMofYl1EkFj#noaYk%_H38_D1A_g;J zRCG!id5VV{t7J^&^hIfvJi==go;O>L`S6Zu|75$nb(tL9vW0C0V-a zlj{5S{R~UGCOc9${5%q^N4WQQ-ooMUM$*{2>S;J8Y(*xlme6T_$qw5Me%|d`nG}sH z!zSq(rK+O(IovB?W7??S(Sda7CUWTY0%5zqF?^})=wxE?89bXcXWPl+;znp`cReRO zm6wDIW)(N!;Z!ty;h9j?)cR=6w(m@kzTfbI$X57ADZy7x*JR}&ru4VUFdCJ{T)U%u z&G6LWna8%VL7Em(M#a@1iuz+(kU-u+o9~1jo`jAmCTW_(!kx1Y(!$(+AZ@g2(n~ay}<6QY>lIN^H`Sw-k zr~{rsNa+~X>PSqNLOh&(><`{{kWu*P3t6LBd9IkRRb#?*dg=G)$?(bQvC$kOS*!`} ztT_)oy$?Sl4KtgYEQV5uglws$KZ;mw3|4(Dd{}REH3Ux7vNU2(E8~#ZK-r+MqxwB{ z2Q_=&Pp$a&Nq4O|9{yH$e&4*$hp^fn7J)+PAMXum)yd@G>}jdvbdo)vpij_yXmrBM zxxW?FPoc+(;XXlJdLF*Z6#cf06pwtN{z1CEs53=b75nhPr*N0)0=M%p3e7KD==s|h zyI0KxO&@fgL(5kv#};FB;s@GpupbFeyvINKuICZJ@K%ykZOg^@(_=k?#|-X|c(_uj z`^;C{O+S9pPa|Snv zwyd#;$62s^RwW+FH1@^I>$6pr)sKQJsHW2BRQ<0Ag%Opqh;r?u@8tE9Iud5HI>VNe z(RB4nTdLhv1!|N&B#&^kamml0HL}6;;j@*JL%jJS>=my)#o|;4J18 z`sc2Wjby8(8tK_2=_B~$#8dl{ye!ks6xknR!u3fyvS!t}5hdQ9qU7`1*Ap=NV&GwQ z?vQ6jh3B{35ESpILq?;hE5SI3O;lD%)-o^ePxaOBHppMl4T>LLl#RW}BK*a{`-9C^Nzyw)4T5(%j zy!q3k-pkjPfBqD52m;ak_phmdYm{)9rqV+kDjeY6LltFto&ROGupR(+PTeQ3ffKfq zvY{&ogx~Y$gObdN{|E&55*2wFJ@?FApI5Fc#+7AN4~2w87-o@3f_?0FyyRvhm z($%dur`$d+c^zN;zJS9Ax8AsHxJ#TbJcY9;XgAgxaCsg?=EZRh2U0jMw9eH(wCtIt zNF{KbcH@~5Fzs89d`;c&SS_SM(qjPpx{qJZN-q8)$)x}HU`)I#azo6R< z4{ka-y5plGhV1O@gr!GI0vb%O=T)cO#@#-Kg{iZWgy#+T+?k-#W6#wm7utGCJI8@; z?o9DR-|t@BEZkjrr>wiM+ZYbHG$qaN{YH-nQ>O0cPgkdA?W0tPznNQHLf7xZF6&?Y z9(m#!V;XB{doimQ2iIPx_)o(Rl zms^avV_b=xtDpQC?4L3B_xovsU0O|PHZ(y$9fUD6Wl&yH_xn9e2{;~Y{N=!13=Hk< zmyh-h^9!QX_{UdQ?7+&Mc_uekm`HzOOW1mIP27QeYB0J{OC8%!p6R|=U#?r;Ft4%Q z{8k>K!dN?7c5xzta{r)|0Af{+P#po@!^d<~Z3$ zWH58{#)LpL6P>vmDzCxfk%out$HN;0V$G#Vc|w3#AzsaY(3;UOWzeoJVajd_%@`c4 zrcW~os|j(cf4$==0gbw(8rgfBSpS+O#%i!ey}80wioie$3jGMO{0?99>fNRTwE^|PY(0Xkc ze}2mETE|LacJh;;HKD_4EoO^g*3eDG(wJyuK4X_==5$)YfftZWh1S|qO|MdR4Uy#1 zOAgm8z^#H2im3F3Vup1_G+hz=1XfmM8z)VnaCv4G;=z-jEV9~Q9zL5gXu&@c_Gf#M z2OI5NYLMbgP>0z)g?iZPW$&j=P82@nJ+&a>&cmR377)ED8;XUc3xB$@Vak3L!V&|^ zyItGAqu;&ByUT~9?<*-Wk+T$LHw~b3FVMalh-wRJ(&^La{&ZFM5drjblRN>RgLl-` z(YOiy<$tFAN2&lNyW#-xrq2jO>xy^_z=)h>dSR$xl{?MC>x23P&|-lq&()nbV#&Rh z%Yl@t{)Czz%RFb$o=QsOI`6;zl8S+U9pO7>S-ojtgE7z(IxszmSdBnmQqh6}GcMxy znU)wetJ)^c`PWhd;!=5*m}4L4clXX@qho6o7m;-?5356TF|RzYjsNzXiE%|$lCRdaQmY%><-<;j;3D@EW`Yv$y0PysN@yi{>dsA7E=hS zL7dFp6Ki;MnnS}gKogebXEC=4faLPpHzT%g%0IjPXVX_#=uj~jS<*F&_IZ4>Fb-+( z%eYIc==kzMvvT1PXcxZY0?B!7#n0vB%3W&DL~{(e0#vy!_{lAQf&U) ze;*R-YT6PZj9zSp7qb`&rtd&4et?_fcYo`=cC-dL*8?WU3q}mY}4(L(@?GCGj zphYse&5#ZF5;A)*sGFn>Zgpp&d^hdZT7VBNOUo%kAR3rNBeEV9IeEML7|g1oWgb{Y zhU-Pg9xN+OiMJ%KH95GjWx;$63_3;J)c@;lfPRmqK78xBX=L74x~wQWlns52&8WpP zE)WfPMj&W!km!7&WYM*#@hPN2d0;Hy_&r@R+;&>>0prusDKm?yddij%r{lPOn7UR` z;J3@oYyq_M%2*d`G$tEicU zwvL?f3t2(51X_aE_Ou;Ed@DmXB<5>g#goJ9jBX~w*8I*siGaTm@$gE?QuJw%K;xS- z@JM*eRtWPA;{>~96f!baQ1_`pKhwb-^N;`4FVTG+$h>OvgA)>6X8j&Nh3HTc=>bB& z(wI0V<<+zC8V_N4?wrP>h8QkNsUN zd$pw;*`upTx>7iPz9Rz$CMkt;>n{f$gSyt9P+iVahO#z-l zhqO?wMOhqf6x+-;X!2iub+}*D2T`!$mvUrf_K4EPR&aIMVEV=`qob2tfN*!vQNv#q zm!XzLO*F(uWD5lsSsg8f9Eb&xAhsI} zSU@u|OV6@$?!o{_bLYgyaq17kvcZ-tA3#LBA9$K=bY^ju3>WxOXlq?<(3pUuDxH}_ zMMtLzqSKT#Ch59%VCa2b>nub`1 ztr94{J>ARn8YkXeiD8ZC9o&{&TIOECZAynCqRz3zFlChMs^fEJ^WKBVa8!-MYq?pOb_s>nyT5R+*$ z)SxUJl2~??*0q3PX%PxknRLvFh(jMsk1oqwrY!xedU)*#))N-6a)POVaY{XWiP_cTm`AM_}PX-eiN%L(ATBFlILsaZ>c-YX2o~=ohbhD&;m~Zb@;#5cZ25r^5(!(X;8 z`xzlY^@JZepK@v zCl2$aNFnrqYZd*+n13u!;a`;#xw^ms0hYs*6~ZSHU=iEByrfEOaFU|T5#A95!c!z3 zWN=K+2w*dEPDsa?ERMII`P7lX|BP7waJw%HjJol7jd`Bv^7HF?T}q?DT~}7;v&vwF5leqlj6wFTr z%KG&ln>7*Vnt;pCB1H|b_<(-(bi&B@sPt<}YcE7Ar(dZg$Y=b%T4PS~&rwYoE9dZKBB_~Hk-Ju_Q$^(R!#%*!#rqp_&!wHyo7D|`0)=yP2U4G(9-&b^$vPRLg@S+ zE8}SY^N6qysE>zr+S=PcGWLEyILgK8)mxn${EO^jQvtR3{EoO&BAYJuO;3K&fK{WF z*xtdLks9^m+a?YoNjlS{j$xXaEdKyZbb<@U*eo1JS6RXenF;c|fI|RbT z00@wD^MDW|BG1Y0U}vYaA+Ad}ia&_7l5nJA$CD*%Ovd|&YeU3$-?{JN;&DDmf5|&k z5d8G#j)p0fuuI3^Z6`-IC&y=M7G<#jwLBt%@6n|f(NVHSHypJ1iT%lmbEt`olsjbB zi3t{kH6|Wqn#XskM8G4IM+7tqcCx;F)K2I+Mz43@w8r=W1Bw10+0&OQ5@Jj_dQvuql-S>{eh?q-zHK25w3oWZHi4R zX>63PmCgO-fuSIZ1B&=ff{Nvc9mZ>T^I3 z@(DJ9(j;xKmN+aqutXGUe4t&gLqp=t-NH?qGN^BqVm1{}Pd@#nUNua(l|r@>kB4~+ z<9K&)cIX8F=|go(;mo*)d_UrhrbMp%KoTO|f1>WcA})ImgyYOAnZ?eJL0JBGz6YKU zjcJ$vbT56pq@)e5K<}}6py>}Y_i!PeNc<_aypBD;r(Zu`E}${d9c+PfPgTXIukSBs zu&CjFEQ_P>9|jq5XmF)tq|v3-!R`f1(%e}HXma$P+JOX+ zLJl7hITrfpsfKt}p8Oemp#+bFKXNRO0 z%G7s($78C>Xh_%KDlH%&4k>Qxqo+lSz(^CAhl3r|k)^8FH+0$=kL8mm%WOsY=5D zxTrH73z3vTVMKvKp{7p!rp)eG8-!OK;YgIjH;8@1kE1XCI{u*Bb}auqHtQy1VCF@7 za2983@q_$PF%;OY65g3c2)?R>_tHU+WQflG#r-Gh>IEX`XdDejz=VO%dlI=9Sddg- z?$pRhw>_u;Ffh(<{r&xsbW=bGn3(1FXrj<|!Lm1>=eAh;G;_av$LRM-)4v3dAq|M| z3vFppbGXz>5dA_00OeLXwY_&76gR3{N(8+XJlEXj+;?_p_@L$wDBt9Qy^vSukR&ZS zsfb&RT_*JF>v^#RId|uB#1IPz_3<&=O_I&*4eU-s-KUk!%pPDO9CQ0&#%D+nS!A%h zHUMz`iQ4~QJEk=$4P77-)R{hGDl7&8-lt^82#DQ)Wj#=2)c2p;7(~NvrtV|`w`|m4 zt4drS=3sD2CwWqo9vF^@70<0+;dAacIsO)h!$mX8K#_S)s)TSdcgavbMZ-|)%~AYkM#Tewt2rgM8uGbOq1yIYfjsYW(9O;HbgJkRJp^vPN#DT z-IGLPq6JSg=SASok^644u>AEzBEWT}*zg#*8QNeK>BE0+EC&!QF5#K+qz>civuUyE zyNfSA9zA^QITjv~#@`1RBuOaV$jcU(@1^f0xpYS1e(T?*2UrUpzI1iwm{lc=C0{?N zyahB{+{x1!)xXPiP>GWipF>OYH~|x%;{l;FerUIv^r?)LvXu=+v2%zXsg+HpGDtFd z2(z114l|jouawjrt4LFy8PT`(L2=69NM?n3^};~e;;)iNA_4j-anQ9%7ZB^ud#*}{ zXP!Ps+ACFVj1i{f5|@)W@7HZd313=e&Mw-xMYR8m@r@h6XVOVlb+yuI z>LYKHsKv>E*)uoiv1CJ`;PQkuW9GLee)**dV2VeV9is}t zsAzQ1s9mLp7L#_#!&14y;JJ+^(@L9G(?9HJ4cEu!-|Vm?FK>z?LADOUkvLSmD{Z$L z#=@O5qvy37Pg-8orgNgmCU?dDYwMAK@2{Qxirt#eh7-Oz;~{l$@x|Kkhc3@Gz{N3+ zDqvHq@1vlUJs7%IDMtXV=l1q?;O&>>dLO7ze3A6Bk_i_XKq^0{gGNt1MYSv#!ih`f zNRjB6$M%N(IQ-=6dt?+N03-Grl z)B8LCi^C3xm8LVZ%1S2ax+;}FB5#2nn?MT0{JsldL4MKUV+zZ7w3`0XsI0;zYU$WAO#Q$EmKnnUJzg87v>#(%w6y zM&oUeTL_q6V{URl=eP?QS44gjlUnt*qyCFmsGP@9NnoxZ2y{^!5HC?9y4`3@?GhrO zzN0ngNmZ+4hJ#~&jR33nIDgDnub7=xB8W5qZ+YEC59?sr$;o%J{bJ7MApn!rI z7=du-oohm6d-pn)?`UG8cTRpzVO16(c1J;$#OV6T$;6js-LG3}p@0si4)?y!2_y|3)=@@1|8%@o_Agzm z4h1~{t0YLgL(^gj)?UcmE^H|Cy0SNs4i!V1>b9pFSY3J6+d?3It zle3!&oqD0vnS;51X3ZMH`X`m~qk9l14)Vgs`60V>^pnqVfk*oAsc!5Sn1w#tsMeXc zxw8KXsaNS9VVhupa2O&O$=UFkA=1j_hilAU5T9X^rEL589}fYFyEYZ=6%K*-%L8UG zlN0}scOuSa@HG+F*{&5$7h+hdtI*R9?#!ILqE`)nowq6C?Pm5B=*d&Qf$kU>n3@4=IcE|0K!J z`}S49N(jhVKL2Tod0Z}SoFhX(C3??-3Kl;4lZY%I9A7AZirD7+nuxx_BUfy;ps6AR z1t*Wk*uw1SsMd=UiY}ajjmQo0x*;J_ZWNh26o}Sjp)CjF3Ykt$c3&jFH$>yF*a8Wo zSI*;)P;d9tN)d!GeYhv^-v`0~BcGEC0(k7To11wL4!LQOn8g)p9k{ZdS&fUi0xiM2 zfs>yaCC_KA2+ja%yoL+Yc|}g}bX@my)R|{%Gp6LGFKOu%P*NW9a=RI6yj{b!eslBe zSc0xc^uxEm3+m_Zcd&SGOf;q>Pn|XR?!juV_ z@F#zXx3Fc?qZ~_+$17oD`09NurZ!kwdu`Z;K6ZI1SU=Jd$w{Uoz4w?b79vsidOp&2 z({Q0J?fUxpUvJ@l>2q5~} zd6Qi>iFs^4K^WH%Bg2P2#cyibx=R3Mz~p=q586D-@n&UgWua?Zr@WTyT`>Hgs37T9 zkboB4VV%O>z^a4H+ZVs=Y`yVhf0y$!$tL}c2?XGNXNkOh_3%6{$skTr7yuuZ=#$jk z-YrrchuRM07Bx`;I0W#FXNnxruI-Cz69TP`j9GxzUr_5VUaNEK z-u*TM{hgo49}19K+5L~o@rs78WB0FWuZWy;OLa_-5g2ii?c>x1n&IT{yzg+q4i1%| zcmmrVk zCNbf~T}ajc5ox~{IYFNh$B#V@HJDa_MBW9O#kw>$mRYD-{9SlkPECU@CTW1pnJ{2H zAQF6%hSP2YuM#A(qj03k?^GZT^i!9#Z z{yRo>3{9C#f(Hfs4TDwCXKt7Ydqch_h^8 zyhxGAQNr-1K)u0;8lf_Ja>X^hGnLH8n@`V3;1tPOS`;PVa_ zf$45`(!cb6J^!OMbWRQwpk*bQO*g9b;740BO|T&j=23U2_bJO>GoTOPn%>OnWWt-pRiqx-jxqRfGbI15Deo=~d4n@XhsX z$+9}GVuyLSCUqTqE(T;ym8r$&3=ceL>LKa!0;maZ=*2D@Am7P8d2B8QvoU!Ph@X|x zcZw@Xr{F_b4J(G=0oQ1&35nYhz#KgG#F8A``S?xsos{fc19qUEsby0U(fhwzfD=s@)J?ROIkDw#ys{RFfMFe#ghqLrgM6N12@g>L z(VgyL`J2P6(HBKnJI(EV0HGo=MAW9Ye{&c*6zazIe-z&3ACtiL>#(Qj+@oeOF_{j5 z>B%M|Z_F!)i_II?VeTWd*IW@AOF;1HWmKc=5)ci6%~NbfHUOhZt%;AQ*90*^O0~*E zszNLyIKwbaiJZGxHm`ENev;Ay7{hrhmN zgg~US>zsNXx}A+FUg2Iq_Evk{k?%4><;Euw|Oqb zCpJ%Qj9kr^kaTQ*Lq|Xqzm?_Ug$< zTVzSh|Izdg_wP}ce#xRrxH$d85XPt%vu7y>9S~l4uh-!CJ4+Mk(dL=kVCB zN`N-re%ZUTPjac@@`_A+k2tEno_H^qS=Lc0#!M5_%mou(P8w07;gl*D8!94{Qp!L;w$vN|D}8HGH~)Db0` z|HqlP0HHIeb&UZ%gaAwO2^Al8W&ej6WEnk?$yCl< z?185u{<>f1lS(t}GU7v)EKMNAcEPitQe0SQ3n*Mx|HOvUsUdMA^>??sU~F%~F$CfP z0r9CzQ;Pv)s0K{r+@`V^1OaEAf4UBlp!m=i8IUyAWXxSNzqj`0SZbJ3j>-N5-h@SPk^b~uKffA zah}>#Obf57$^WGYk$$%gmoy|`kbpsYO~vCD*&{L8%do81ERpX&YQ$0Zqj7#_gOK3wo6?_~x#yh0@ z5#L&_mNLrm5;}obj(694l48Bxx8hBU2aeUKbgO5NwZ=r`5IFCj*ymzvjPU;+v>xxy zU=Ba&Vx$zw%8k}*59frG#&Bwl)XJVr63TlJO+3v~OeUkp9934jtdn)McIBM@LXVJvqUkAc~bf*3?6cZ-F z2?Ap8A3JsS4bKdLEIAazQyRtw>U{ytZs*eKs6rv2#S5_c5L*A~6J{vMlB|ICcRY9!_4AIbtwvn@iBoadk0`Al}Nk6#>7AoPS0d$dEzBil_luY zju`pG)@d~lP{JaPVUSWl4)Kzb;RooOO|7j)M&FJhzTQv#ME@62WZnW*O#QCYZVBMt zRcyJU2`dIz0`u|N*}BPThaLJbi96MI;iwKo5Q=L!CiBS|kR>e9Gl1~=2eJ@MY)x96 zNe)x8&}P#pq-w~D%-8#L7CL{5)`5?{5d8$k*y-)>S2}2#pg2D4O{xZz9U5hFVGJbJ z!giJq-O*WEYRlxmQ~*%=ubCq{j>Q=Sn3g{Tp?QzWL}2-ERR3Lnwz zf2hJtCYZ!^%+DCzU}SWN7*8#p6C>&xQjPGEpaLZQ8b5FtoA)DBNGEq!H^pXDeE9tn zs#gQQi6Yo}tr!%rAo8X_nuI|CEIIAo_ooK#FJ%1>Ke%{MF}}(HGAN8IESb;fL8x+e zFsro8Cwilt(X_6i3?h6ZuUs34f6I8InaeM2H=9IDi8(x>_K zH9+<;TCYRg`Uq?JRAXeDb4Z6x!-68%%lEGcTwZ36Zd6zjDtwm%(X%&KBytT?OB>5A zsNiqIngWX?oV|ZwLqoeeeWbj#&@s)1Ysx|=8YBYvwu$5P{X0sIuE}%`0aGqn2J=tj z{ix1b0qJ%3SumvgksAPpDuc2zr;1+BFDzl*W5gB4hMF>~SpJ0@amYOPGL^oc@-+rr zKjXT95{7Qt>nhZsW|Sj2N%}0swG#Pq1aCA>X+J=-$n=of(9vEVS^y@!EGp4Ux~yzQ ze5*TR9lyh?)zquedm5(hvoOm5JX_tmfn8Na4AAQ*q5Uo6a6a;DHKjuyBel4I&CcYA zS~aMce&vXbVn(D_%nMq3lCS69|M|hN?<7D60>0wxBalT}CsNP9K0HdkE52^gMYODS zKGnC#-T+E|fI>%K?ja~3=DqVGY)=2@`-Kovjx_9|i%Z08q>LpcQHORzfKEbdX-MqembIc8zey_prY(Ok9HtTi+=Zj3)m z5HUvrx>g*v{UyxK4jj66J_lwE?N?NMGZ5_Fs5<%h&+8AyAMg|DVE}3pkvoIe#jrRdE6x^wEaVP&n8J>yu^U9rALVGA4tK7HBh2D z)e%u{^b)2sFXT#Z9{ao6#HKvGZ~WGHsD_lwnCPNY)5iC!JDq#T#-|O#b#qLx8+@nd z1|M`SXW%OZ7WZ{M4q3GfscKR?9OAvgf>r^xZ~i23i>JwBui}5put{6c$@5SPB(Nxi z$64Uwx)0UU&q#9rF!DO5y@s#)id?FZO*txoIMw%vZYn6_AWpMwq@9#DJ4?tkJ=6ub zfUyirtot;wOvJl5BE>M@4BS*noKRDf;`q=CP8}Hu%9?Ry{-XPf!zh#XM(Mxdtn60}_jOMEFl2?nDB(Qtmk-AHzblu+0W1Z=KLy5RYD!KVhjl;c47|8?)O zoAjw_^dAL3<5uU`+#?hM$<|uMiI~QdPc5k^<@0cyRYl!{&lAt@9bsnPD{O8!M??=i zKrJ}2rW2L&ZjxDmGEoDq*g^cTqL~T7qoUuoTR>dg0Y{W8*6BRxMWIX%X`|$?I^caV zueYlSfi0Qhz=H^wVX?8WEa`+VuCV7L0z}v|*em+Z18ZR#WL9Eji_%6siyBsys9)bv z(t^&mpy<4dhiWUKx!_1CM=KR~cBpQk3=>uwth881vMEngbTvS}qfoL}O>Q(bAExGh z+PCO~Zh0jjwcV1QTo+;VGMy1{W~+o#7r#q1(^{K?)&v;gK4TLF9ohtAPDEkpv;m9< zuhd6&ytQ@g;|)tlS0mSsF~cgo^oFi&{MUjn?**vAjZGx1^pJk7!J->eIVgwh_<_->w>4TQ%f_j5VV|wb%x+)4uVjjwmP--am+IMnC!VisABs zfWNVM6%p88*vWQc1%g@CxLYO~Cq=R`;*ueDRnArCuSPo5`H0I7skoZSGyA>g1ad&GZzeUFC^71kP6@@QT&t7#DYW8#{ z(Z>}Sf@bQL3$ugjU1G%3avibUO^u%MPFz^9o~1`pQn{5r{0P_8OL7PPueS~z931x7 zXMUKLKh?J!^_qlZngwUdJKrrkW#lJW=6 zh)M^BPXDPnZrL70)C{#hN!FAzSAub`H)2(Gvu0h}oqo$oH!4 z6pvrR+~5-Z3NH#+>&4(hW-X*@5~kdyH*xXv9LvCi?0LN3i(Ht0p=ey0k2zEM57TI` z?UHfipDo+{2no#{lP3&`W6Xfj>ynQ$DY3&q5ja}V2E0Ob`9rB{yrEUAJAne9dTrbR z+YXH^8sMZ82nMuP2p~JHL_A?-*LX6jXQ$*tRFgId>;P@!lCOcIF1FU;^`>qd6tLOQ zKx}V5+3Pr%7W;E)9k{3D{}QBlf4s_cQJae(QVh)=FrhUQexSZG`sba=cxyA0T7!wv zeedR1zL8b0x#|uA1k*{!|FkJ}JgJ%a<5c?{E>NNpTzl-iG112f>EP@zkaq^%#bMPg z@RWGk!RzF_#gNx4U$%E#xvk?jMQ6@c-_Vvs?TuZolml$&=^V2$yRa~vd@|;*Lv{C= zs3kXO(I4&~A*H9n1`xYHdZX0-r`?FsE&O8(C!uJvzMiH|sI_S*llv$2jZ(hc>(Un_ zg{g|SB-Y?TV{HcJSXw}q@VKzOP+r!DnIr0~m^_C8SYf~*M}tmlwJ{@ndk>j$Bie&@j9kX|=V0h@)p01#aH?BdiAtnN4Ip^~GL{ZX|nQY9)~L$kL0-_{>su*ubD z$uRP@s0a+umnaqjesFH+H&NIA(iTw}%aNLjSE{eoW$_>6(Jw=3@QVquQ7IkcIV@$| zW{3q-Uia=pa*>?1jY|0ltx!uYp!fOiRuicsp+xDyrvT*b3y!UL^Hrdk0pp@ zf01MM%WGxZ%OrI31&a8B9O%Q*$P|3>c1wuMIIie`8O%lRH^kyJ+#lFaQ=^PE`K=un z_Jf8sHofygqADzbY!&;(=~&L&*=~u@a<|*Jz*+=1L`_qgT9zf3au`m2l`F4>!pZHC zp1LjH0>lTx=8Uk1hH#pIIL=$QX+u*&wBO}pr39JE|IZLwwp?CQ++m4urNB9G4ule1 zTay|-jjzy#VDh(T)!YFzY?wHAZ>Zogw*0M^40kwC=hwxGrz=;}C@tF?X;SVM4-!CK zp(*-b2eHwOCe~n+lI|~Tah@ucxiUerqA;74197tlOSM2%(s)9pNA!u6g)>neOt>40 zQ3pxF_m3?CrGMO|ISsdJy_`&37-%}wSuJR0X5&!s#}XVkfn?e*I_SetlM3f5Jb!H1 zvPQkG7XTV`XeO+Tz*9yG*?f5=HF^$XR8FaSHfR~Qi&NT1hrW*v%4X8qeJHq3&&)y@ zzf+QT#G-n0zYX>nV8|RmsnEoLqJ>jc$-+@7BYdllzw7(4TnA>lo}>WREY#X=y`u3g z;MVTZdQMLvWTyO6SFYBoo!Mq)C*Ld$xiJUx7XBm-J32DhbszFYv*`e5pk#Pez>HkF z7?P}Q7vld$y1|0A!vpwNaC1?q)Gvr@*Y^W(&uKNlf#&~X< zJ0gnzTJ`CBHkDJ1HO1gQj(VBaEnV`4Az-{v(ttl+L8*R8qRdMU?U6K{zYZhpsl}pm zlWq5>J`M#xNk;k8h7ER)pk^H=Iqgjg$U^|srKZr*@$Oc#-&L3mdo`%4a#;n>{L!dr z+%oCUO&D3WN7iYgu%mTyrMpTs7sNDcfBK`q^>&)jEG9@C)x!u9%nOGdhv%>Uwdkdd zEbu&d%Op_AmpLx7!#_l;*KW^!Pd;v2{?B1ZB)`k`63>7ZAa`>qXEdZ{swwYytB!oy z-c|*+EEoD?U;BR6LDb!-1nLA1rw*3jW~cKgV<~kF;oSUck~o%8YpmTU8x%Fz{~fzy z?@9)?Hx4-W9>$zpG&a6hijaY>UoBc=sTagQ6 z58ws`u4}_0E#&FK!CdO+Is@|f4>Ey};il%*fB7}Vn34OaWDItU$=n0XgPi3Wj?GSq z-`1Kc(IfLt+$m&=^R!Hwl(A+_GD->P+bocd$FJAPbOu(v<6XfT`!bz3EJNYeOV>3J zKMTQQqnu;5y`M9!B#k^h!m|7p_5RWmxkiDn$b8*;H2NiCpyb?uYCEo|B6P~2c{mD= zOX0bu*;3z4L>v z+IyI;d5aD)y-xGj_^9M;SCQ;<)QhoyD1Re1YCcrPCEx&;mY#6w4XxrVf`gwjHp&TD z{2<7`e{JT$ln%o=r3Ouvfw17aV!vWf$YtWTjvCt+bHWt-u)mvhwm$Wrv6(Z6=Xo|cW!rHrEs zLu$>H!Cnq1w;ewPss-3zaMELTviobHijU34>86b5F{YKtPM_^hObIE&>q6zeR3l;J z0{y~|M(bba_qk84!||dv) zp)D}`!HEezOEAK6u%tDsIY_wQ_sKLV7bP=^gh?3ZzGxuoUAuQk7eBP3)ta2DRRn%J4GwIvg_;x zzWG`IE7ZB`BPAd?jE274UhFghPCz=#$-sm(Tva<8_@V=}K!8n7%&`S#JRqN4VAy?! zsdo7El4-DQTEzP#3Zps^$P}$4U=kxH8{?!gh0B%Nr>c%MKa}ZEw@cY${BFQ;>{y!I z<3OK`kg}(YW`OKSqHlhByuGU#w1t74U`|9BgCzP`bRW7=T$bjxQa!4LL!8j%{p$KQ zS6??NmQmu0MF6Ler>N_JJcRuzp-Q2O8Zc_8CuUZmL`LXsu=;Npvr1>wi0q?JE>6|t z=)f^D{yJ8Q%W9)XQov>=aXNAfnMdW(OW8j3wKpwSb4{>2!)dD2v46+^7lnokk7~|v zdN>H5RwY?70aR}Q@GV45v3 z1e}vD_6|L-_298+@s>Wiw_0OjnA-0~pT57#*$5rjOCoAFsO{j{Bkhon2;sHATipT1 z;&}QQ)52j|xhRbBo(U4rhng*CLCB4@V#Z$>>H+Q95!!*jCe!)H(t}s%v%{u+h8jIF zPN^5n#F17B7DS0=MD~u!qlm{M%e#-A)sX7xfXdk@0n6q|cD@jt3?pcvM=DVSoOI=v zX}?&>>n=<69rHCyNVI8>aDcW_th35!PVY`h7$tx}a%3hFb07v-xb4?lU<-QU_*y(w zK$a*$%6|TQVA|}IP~0kCYmytvL}_3RiYq&SBeYy7dm7>ou#CKwbBH%~8LKt^3h1bwB_1c;z7_BK3iM#h5vVz|DxNPCde1RRxt7$k zv)|u(B7x4V*xqNCmvhZZx*mD`^%;!7FlO@AfM3bf?jwoBt;1L3m6^vz|7tD5eUq>- zy=g>jP0daE7K9hBoEt5&@mrml?$p87L`D3c!&gm1YKMhp#?P+F(_9_e_;kL>tmt79 zhq**?N%zRJT`-NCVllS#ci?JH5a1p=B>KC?Rp0z@_?exID3~bKn%^9H^=XWm<(=Q; z>IzKJ{8!b|K#wyUaxzxvJV2|)j^7O=KJwKbSr9u9{lQ~kzycFEW6~raN>F0WWS#|&5@X}eF}@s97~4ipM_oH)bl!7q5oq6(#d+3HOrPCR69xA<*xu{t8|XI zBx*!X+L3J{ZWdB?%&9W9y~y^uD`L0Qh*+-zfo#V!eA`m2M6+w`t>rh z{`O7-_0w*Sp?ovo9f84Ax}MVjgt;cJKG}~0YtAD6Z7GP6O)ic2`pGR5@k`I>a1_sg zhGc3gH`k29Y1v#ydz3utpsgX4>-;P|@an|AiB0DujIfvn9MJEda^ku+AFQ4bDm0OY zn#V7-q#yk~X1^7&9VHADcIti<6?{Ldji|v z7N{t%N!Q*+?9<8gG(G@)E;mKb6bR5u$9W1xd)DiG)rofP_3pj;>(iF3i>FETU=;e# zXN@C`aR{J1wpL*<8s6Q?W3Bc*KF@>DtWMoF>pFIDhDV0o2ubU=t=FAY1&!hTa6TvT zE+@^W8}yjfCakXGwDq-HcMs}-;-FuRD*4%^y&_cn>AMYhO_VHuhOg?Fgz$RL{6`O? zN9!6N$T9ouu#Vq3sLF45%En0pz(40b^+5Y@Gyd2pns9O9=ulVjUdhyP5R39Ir3d<# zKv?XMsu^_x#MkH9H`cI0(haI}6_ax`Wru7_NeH=u@*xSD;UIPD>$yY43qgxewW56ZU ziAfsOY3Ex26eH>XC96rH>MWfYeg0`fN;K@kLjLFS>+c=NlI#SENHdClk$2xx8N zYrpuszxt-;_x4WmflwXqQKW6mv&f zr$o&mp#>I?@9D1nAlqfAz>GYi8g%`{3n}9suHtWE`(o4Y9;#cBeSFifcX=5bY8@I_ z*yi$V=7;Dq1Ocfp{1`2P<>m1mhmAwC7;q4d9SWo zZ=VHESHeyp9rKhbDE>Yi5NPtenkjSNvRVu$n@K;NOa&*C=)L@EbmalF0evYuoY#wi z=@<2^1HMc+>t4?)@KUFhw2*;t zGx1cD9l7o&IwWb(+h-UnmX{2(g|Y8Ob)*3v&U9XsBx&60!J)$&WS(QoGahp~%z4~` zIH<@W(Bp@5yb$+7nS9=XC`AZmi2WSf_rK}^1QYY;_g>O7sd0;At!@Oi(`ANx$K@Z!p`((qQPh!iRfyiJ7dGGf>hW1vnu|vqj-E~_3_pcVf zZLOyF_Va6=%c|>wDJcEhzZu1@C{54-1$fWhu>S5H*J!j1TD0Q znX?zF5erlHbkXNO-b`zv@;o{9Qcmcy0YOb1@W`nMey0fEAL?{clPIEb=YSnE_4&KD|_ptUf&ovvMeQn-MS2 zCIQ1B`D2y{ym>py8Lg5lF3i7nEF!Qo%Y~_K&4vvpdx?pF4GjBYe zmWcu0mtCoGO2Z&R<@&wj=@yzw+-_hl!7M?uEvb#_bNYVY4bk{Rujbp0B#>I^;K60= z@Y9=)-iS+WA7waeh=e~dI7k1}4Ag(%d@c>rjq#g=XSjXXnOEy$5yBf=^8mKBlc={l zCGYi>Lk>n;tN`~_E^GmF^C43!IsIT$mtL&HcFSC|jzJ?rvECBM&GnU$P&Vv0BE1Bu zmB!VM8FS=E4$;>vr~z9%mRF7I%|w7CSPc@v#S=z1S_c_1;dRF>GsaFpOR@eX6H(Vm zZGXoMjV{Cx>5`LPaj_qvalFA{VXAth!hsQ5C)HAx`n#2ogJl6Gg@^!k4eUgmk$Fn1 zSL>CJ0~6V9w?0zCj%FANqXnRTQ~QHmc-OgSK*7ATP#Y zq#4UMGUl_rTnsuiq7e6(S2mgs^%30l6MFMWNsw1SS;jY;~nP&QNo#`yfmgKBZDS`oreO}iI%8M+Y;V`Z9W3@#Ul^oYOE2vP!G44*p^!@ER1Pf}j3E z>@gDlybQt&y`;~VaBy}ng`^-7a}}!PV0nV`I3aTvrG=!Pbb7AN9}ef88klL&^D!kh z<%YWlT`GhgQM|#o;_nqx1r^)&D;~9OUieOcstif^EOeE4X65(oy& zah)vLi2OQm`xoP$g*9|?f;$%|l5@9L zGU$6w5BgP!HE$_6bs6Hs{)Ga4=>(W|#Aq%Q&2x9eZ6UZ1z8P{R% zsQx8~voX}oLK7ZT$7Z-uJN2CB&fFy-h9KPRQ5+yY;v9%ZuEe7*diHuQE;at%79n;p zU2=qMo26iRhE<3n>m2iuFSel6+8yXhKJIq(8t`~^0qVKiZx{Pqu4w$4ClJuzkV?7K z7pFRaZ)3HDq#1WQ8kk#K3md!b<3Z^kDN3shWBKXm$eskw$I`gWPdL}SnOEZcq!0?f-O#=}ZizZd}-p7%b9ck)*X$8z03d=Sf>{^<<^W#<9Oq}0o~_U zLRQ&}4;Ow$qzB=dq-d?9QV6JPzM`=+!!Sxbil9F}YWY*LvwA6iHR~o2fVJ--uk4F< zQvTD)Eu_ruo$&>Rlg|(TPay#@?shRW`$hMr3`{JMPfyOXY1^D7#Fg7!yqVI`0OW}w}*Tan1a>KOQl{U z6YD+hMAS1ch~F*_*psbErSBV=eJ|}9w@`uud{L(Jbme4q2b398Ho6=H@E8$2ej~|7ir<=?Jt~Ibw`LIpJ56jR@oQvga!Uu=VuYnk3dqA0 zL?B-}CPq4Dm(>15Tj@Gl_?DsdweBO=C{@FeO-3!#Rmlz8i=1Z*!q&u7$9+oRwLbT0 z{QBV3;_7f=lhc$g*9%$ynKJGjo!w-iN*I;F&I00ud$i^U#-c_(B(;dT1ZSptpks89 zMs|h71Pd^rHc2qrao!Kvacb*)A~e!|v6)alnJhp!;m+14LE^Vrpu9cw-QH|l3Y?`u zfuGlPGu$vp!MWfbkrOXWK*-xd-W7~t5YF$foPTpYaud)DJJf@D zKP2%rl=ezxhH1mNoO&5r_rMn!Ya6m|_A0)wtnwt5mgR@fTM$7tWPos$Nmo6SzNtrl zpP{<@Q_mcl{`{_`2 ztZ5sm#|ak?@1@0Q!TjaoTJQy7^YDfw@X?&EJomSHFdvQEF;3?elqSdo5T9@^=T!_D zY^<)LTR3h82t~I{P9c$?4nk!J^Z$vVMs1Qz(6Xh1>2?+nB&`(ne{^vi@Bjw?e-bZsxhl-I!Yr- zKZZEik4zDln1mTEM%1uLUH^pp?5w4_&V4PJslAZgVV7?h;tw2BCN%%rrnyviKuBTD zoix#F^8Q;)s)ZEBu$=)iGUD)r8Nr96keu!%SB(rDy^#3!ApMHh$4ag zD+kJo6NdR4r508u{-A5@Y3Lj)W%~jqto2gJZ#d2MPL*T`M1G;GJ!tkWDqOa*v&(=6 z+T5{QmA_>IFW?irj(Oqc;ot6?E%i;P+dfYY{Q~yTI=ayAO#dV55Ek3XzD~yBRy2*Y zOr6w(IEY8pU}6d}27V&xKh3I1Xx7508OWq)XHT8~tq{Zc)YN(zf2in)^*zF?vTTU2^{}$n1x*5~qa%Vi zc<1VLaNv}O(4r-^M|yO2^55GxjZUH9s-GSTrkr{`LJQMB)o#LKI((j%0g}os2r%?8 z-!USe`&n=--=$DuIlFe5tQF9=DXoBz_q(NT)i})Y9F5@8=F*e3;5RfQCLbSaH~ML| znt`j+`0)7d-rEq7B**xU3%mUKi;;x>plijn*KjRm6`V?=qgVg(^$)0{yTjiCXIP}& zhgMMPGsA+t$2i#JsE9An5zfv#xnTh2+(Q2GX5}8?c)lBt@?gw+)yWQ zUb;XE3&YQZ`kLuN`$*j5QvKTJ3gIyv7L{ z;k(00;9w0^Pm}DRc^-`aR6qMr&8*1bIK%rg^@0F54``ztnB!igvhg#W;Zj@US`T)W z@qNwc#(m9nWSql-sob2P0At0x7Z1Q9-t~_{6t^*zhwA5%eo^WqDq@umCibS?*1Apm zi!?Q^@whDmLHWnQ-8Woxgns!`rVT*|V(%7E3@o0IBdV!`4E;4Zd@^qxbI+UqWwUY- zCAqZLb*zqr$NoqjhgjuT)vegcUJo%h`(49Lu^wOVl$_l&wHWA&34FaFWm67ra@IFJ zzFW_F{vA|~2B^nfKAg2pBWxkIzP#LcCY+ZPrzD?$Sv?oV$DN=VT#XV9xaY0A#TaTm z;DQUVj3Dce)wZkF=qQy>K8r_lrky0AuKMG3s6H{TB5`UVjS?!?*ReWS9Y*u^h6gqI zx-eQ=6ZA0&G0%Sc#eSjip~v=d-TI0qTnWFKwjWx#_w+txQVcnGz_6QEE_BY(=lUIR zHDFH>)aNh#%g^6ZT?;iDAS;~2fnF~K-&18>`={z)=DgXV^A~agcx-`D_;^AFYwiz& zX2>vjP!poCxcJ+CJUa&};FS+iN7bJ8iD5$!9Cw6dvos$;1lq6Kz&bxK#=4iyM&g)& zSw(?vS#+m3#PlN33+4~2`Bp6^Tti~5XwCqeGs4K%Q(7w~x`9X4gF6o{#FAb-*#7o3 znzsHzBUahJ=6}s|X08u?>DLF8`LQ3G&m=n!OguM(B$Eds5at7ZhW%!Pp=i*}rqg;F(n&6;mK^d(pt0=@O{uF#6mc3@^D1`xwK=IMA2? z`7>rVKMPS)kcv^?W-JQAK*w#s@P$*wv#gP^!s zA!oT=UWY|)IoKi`a~!8d8PoUE^cK^g0+V`*xwOPG$A`k(Zq#V5Z?{;|34p?&*>)!_ z27YH^5BOo)!X;68Kp)l_cT1VV)XiP?#~z||X~%iiGQECN1~;XpZApT#;#IrG^JkAb zunSpDiNHZb=TH{#(J!!IFhxK71@l0K7f4Fx=CS6EXeF74U1TZ;iW|7g{Q;Uu=w%T0 z#+bojuJ_8LhKYj7g+5J5Tw^q6Y`-}T+Uq78TF9=|CGnAPX8f)7cDvGhw<{X&*<7Mm zjm4Z(^=zCLJy$AueBK`P3~3ifLoHqGq_9!Htg}Q47{{^B%N*W$#jhi^UN3)qd^ZU5 zC>DXr1?pCVoXb)HA;2-}L~hlzaNjDsg$(@HMmlaj9H#EdslKDe`>0@$O*ls&$QIY3 z8(tTpY?`1Z-AkU$S^`gevvlF;+1ulj^$^GMZ!ja&6C!ai`(z<)evl>RlN z|0Caq*gbXu0jSJ7kcu4N@x{o&B4Ezvtk1jH%=n)}pzNEmzw-^dCK9ObpC%Gq*1t4_ zNyk7m@Ag|XI}h7{#q*(f^Y8PnFLBZu)|ds0h`6VYF_7*c7+${`@zM7bMnC}O@x0#A zbM)@CkSHcXB1aLm!y^IEqI0Q~-9|2RnSUZP@D z_jZvix21+83UqL$fiRE#N{prtJiw{5_p22`@SZwDoa1C(ZPr}VENkIRByLx%4hC20 z{Y=ud8w-cN>#&ZSqIhoV^%oBUd85q<1UajsuZx3IUvm{sZ{)uve-a{mPx$?fnf)RF zQ+d~C_KOn3I40>4D=^6J!@P~H*H+NCTqv*(cH@SgF;IvBeEGM$&;4x?E>vL%DRXxz z%FIe2*e%YnI069zrnG2uPwRM22#~#D%*$C zawBrD`4=!Q$lj|!D8llra*O^wIoS)JMx?5i@o>FK$r=hzyapT0j98iv1y_Q2e%8VG=Kdo!ieP(8bro>*{ZS_UWG%Jq}0 z>4rj~MsyKN&LLBWVI?lBoZmY6uk?n%b{!@exj;>O`a4*O40zq)^rrdPf^+iE1Fog% zzY@`bX0s}-<#-K`;9pv2g5kzRL0C}s8Zll4PZoc0uYx2EGdUB8=t*#~^;TwNH$OWgLvr ze}DMkXijv9xNFXAGv|_F3oUYEd$BRC@J!e;ag=hX&xjQSqk5avjU613Tx#Uk+Nhem z+fREMDHuw8bNn<~W72i*WU9m*uQiO-Wh?6_ksV60-z2_$A6){i>Pf%Wh|AVE?6uA8 zPeGjmmWJ7Bak1c#eoddV+#d^pXKUGWR#hCI9_Nmk&x>w5zXieGP<6Wllx??z<hF zTTHTc{8-v<2}qWJ?%OWwA0TUuvc{hseG4`?{@2MAl&pZw#hh8EX1)%PI8QBo%N06T zDB+{v1}RvIX_V^|o|OmAe9!4s%0ITf-o0m&UM_>=m$v>!wLX$RkC)8^@#A?Ht9YLE zkTi0lnRz+?Bx)Fm$ql;^Ny1_>)CTRlDz31ZBoFxJG=7yA*bBD|{Ch{hCz$Q6n%!Nk z1ad*Z@zU*L9@{h`bbSC+(0q)&VuFKB(?9oS3!Zf8-B8;H2mhaH;7qb;JVa{pARy@J z=URyQsV49KsUtIN4A*~(IJfEKCZk5{nXx}LSE3kk7G(hJ_`Dn#aAr_%nS!)hT7cFL z_xIW~Q1@>@4Pq6IIL4#(4tU{p_LhZm+L}SAJ2~48^5nqWy}e{X0(>)4Zx9!T@@1d} z<((8@)OBW}2lkP1S10oo3;Wq~p2FqaHj*_;LJw2W30R1Zf*-LlI+}T15g0585d`Oq zba{8OUk2plfXhClofP&&KLy;uAEm`Y>o-^>@r%*@3~Mfn+m zw_xBUg3W3H@yENDD@tWBvE(vpnA`ylxOn89of0>zW$s9z#~109_)R2)y;ey<5}foF z0*{GxN8^o*7Y@x_2J~S}Anh0t_RJ)y7|Exi91R`uWtbDVSw+WYgnpl|Y;pI5i^ES4 zchHqGN9D|ZhDNx8eDfyvt+(DfG2Mk^;3oXLqflA_dguB$glkBWS~+9PN?Nt^M2$wL zraJ%n8s5v4ftxv0;K>_KV5a+r17rBl6jc0HWtC=*2!^9rV2m0k!OCWgS63y0Wd?Ha z*CI?u^!MJOkf}cUlIV8{pbUPwT%s^KlpqQDVFkgwfBkp{gEjWP#-UjzV}E!1_^YRI zdY0R5o5-jD_YF{5XaZrK&$BD!4!G8$0~gpH35u|WbE)UBYX1=@jFdnr&lf|*T&kXK zKi3^O%SXP#QR(SiOa6y!$k~hg=rcJTRYEQlX@4k@=_LDQFuEUlm;6eE%gV7uo5W@o zR|8`bZIVRby;-n|e*6!t2m0X4fm3%{35ZG)Ayca-it&VW8=}z-|0lQ=)TAm*XVWCt zEERY`I6R6l(GfnIn4ZdQr)aiIiffR~>{`0_Bq2@7g80=)%N3@Nd&`J^ZNuyh6It24 zwrO`PZa2uIm)5r{y4hKcT8$@_g@I8e31r4~+zHh06and|3RGd4=M zVqbWkFgtnf_WpgE+8poS53FhAEAMSGdRse46(?NTdB5|nq_B!8|M_oM+#ZORs62T1 z;esn99bGP|mN^wff8AO@z19ayxbJ729*bZ8D3v`Ajvk-@KU4KSxgWSyMO0)KaxQE z{qxJxdx~c1-MUlEcRpkBa_L#54PmV7%^xoWn7R5LHr?#i={0ZQ=gE-XF{YZoYf(*F zZAa^5(lx>3NbRz(yV)@205xAtXj;EFimJ)-i?Ao?AmtK;?TVnkV+*)TY_k6IrMpg!a`N2g?%E z=WhhY$El7m4^>QkR1+Pc`SP$#KOoH}om#MrCtW6c1^Q&gYADqxSJ523%1NZJEGKJW z?}XHE$kj7&ul$drR~F-S2f`QW5!o5jZLu6qgocX(hz5DoL-FM=w$@L%=JA;jeDW$_ zceF-Qhh0GGs{HU~;ENp!lO|%AqB{L+1+4+Bn1C5Q_h22YQqt-!Fa*t))*c_mrq(_U z*};$_8V?b#@C4@T@^NNQ zF&1U_kUl>}wH&iuQyZavkAU6Ubr~+?}ju zGo!;e&08~jFa^xKhV^L1A4X5D^_m`09>N72ZFV6Z=|?Cnd?d3O?W-9lPD%U&mGR?? zZU=5DCE5iB?)L2Qqwx6xuyXrA3#87&Jv>Wm&U6UK{knJY&Iz0R+rO9VU>GE1T!qR8 z+9=fEsg?&*r>}7a3Wi@78GQcfJB=fw!d?>I-0%Sdstncq-GGR--Ir|se8)%wrgHd) ztHVZiAu*LZZ}YRZJE6vY53bzfdY3$eLorrCCW4!NZI9K~ABk7su|oc;F@b>FW}+4T9U;Y6L|z9qXx{-2}w5%FoBmw8M9rrB*#c6QFs1+LDz~|;gM+cXjUeBK! z>WSgLYqRIP#B~(()~buQip$C`TH;GoCx^Havo!vIqn2B-b&AblOd^i(%>7RqUMh>S z<|cy7{bdhZxzs3os^|nVaU>MG2zij)7^$NU;ip{IrER+WS7UIHd2{3|a`XW+tuThU z-AXXFsST_wDbsI4_B2eMM|zvW)lbuj=*8xl#9x;-{j5A!vuyFZnHb59WxFG&{Zf$0 zD{1Mu9@4ELK}0ayzR58f%z&gldYEbCM=7O3FtmC#k3`=eGKuzHtz2aqXTaUTNbAcS zekD=@JTs$&>xauXI810UrklE1?xn>#N{a7jGFJDe?<+SAvdhL+8dnl-@79}*upAHF z-cV=fb4lY2VyNVPeeh?O=m*;^6=?Jj^h?qHw~j$1%=J@R;p9K>F@i92z*d289i|DO>J`rW-suo z_%`IlGALOzE)p%odtnJ2m316BQ19 z)pBvGsl7e<@iEl(q-!lPn8DHVOXU-{QGeo*ARNB`R{u;_Rth6Zl%8E$vZbY*?_^wp zzQzrgf9xTpW8UBj>SdAK_=m?%p7xa68PA&c z;0FGE_%zI2N1Z(gchaTgJt|aS)xjY-r1gnWoNbU5?q~qat%C6AxuQ|99{o@U!gP~6#IKTcVsJU4lxsj8_-07X$_>R??3(d*yD0d$N{>43&9Po z&C{0FFYJ(W`n`LJ4^k^Avbsi#xK zc{WHra)_t=WiqPi%sxIN;H02KX$>*wRbSp58PNeOFOv7e|5K^y)pHyMu~-bS zj6QWOX>GvSNSQ;-DoLdYWvr4XbsZbk?(r&5G{yxr9aBoWJ)Wd+-E!fkc62z`$7`gB zn7Pv1>ueCo@sFjV`YGF{W4dIQ18;to!RVIZyT|9jB?(rRs7!dd>n_c!Yx zSI7ozb32I7JpddU6*`2kx3#`|Y)@A0jG99tM1-)P4cYBPLa37Rl#qi>1b`}!C1+MRA zi*qN8b(+QWpgj@US@J;npHAegZT{uxwa=hI<$3>e^d6DU0!MGT!hm$wS)P)*?72lLv*m( zb}MVBy(3+4VMWQ8iq)k?w6gmik#YP7YP@i7@G+Xsb#Cz)=}W1X`6h$(2>q?6 z1~JE6dMKp$6>0D;)i)k|czO2})PWGqGHh~SIS{HH#gN$E5^KfZc<(yxQ*sPg^l#~Y!#b2W z^1j?Ugf^_R8=7lU=2jOK+>ldzHII)=JyPyj_`AIMXW$bOf@ub?GE}ER_679IBbY4* z1x|MZAv*SR?ID6I#g8~F~sm)Ac8R1Iad8dGQ^gph{c=zK6YVLc-1gYNQ(7wR`*d?}n9?c``9%{BIR#m~F0b>!lQ#9R2}{ z9K=YrC<|YQ_!QmISy5b$L61AWHoIiHUsvv_qOwZ3_Af&(3mAH(Nez1lKqb`#SgV7f z_ab>Fg*CWlIS~xKjei){=B4UM3^2s?Yzi6Lh75tCoeoEN7Z z(jK%V4vfJqe4o^F$4(N`tr~gB^$M8aQaiP^%1s6w#G0tLT-rYJlfu@UlhUi-xBy$0 zjXTaKob-TPAi=)^1G{?W+HayJ*sym01~BxVEt|3D>cI}^tbD$7#P40I+bt0YR8q~J z-f;{u?Jz9CR}Lks%}J-nT3L)}c~dJt@fJH}70!;XU6PstX0GnB9wbcd_G6ZXJ1=~~ zU{vPLh=`%bw}m@c?6U}0%0#TFj4T=;Q=?>LF6VZ2bYGN;0;ZQQ9ZYn3CYbq#;`hUOrJsxcZ32R*F z%BdwbM4Tv1MVnrFahT4bO6fK+gCv*KcE0p(L42#WlM>qnwVO(>H&rRs6T%D%M=;S-J0V`vHf+Y z21f5w>)NnW#?Oe_-qzz8MP&D0p9D;BqdW9;4?x3^V3ISPEN_q~m+<$%o z4e*uinHghpgfPIH8eTi1b~8vztfPW+-8R07-cPPxJ&)y%N{F@yiFi z8fW*u8Zqo7h{6~WrMZ&~xdQmq@=Sb#3`Wi*W*>FqjK+uz%;$+-qebmutWNcTvT^64 zKqL-;w7UW?g8df}=&L~!e6#18smtcZhA(x_?1noC4uFGf z_cY+=?Zk>?u^X6l&MDMFN(k-tAvpZ@{_^u)J+z8Wu%UPGzE1@|@52bCBnqoQ-DE=H zU?TW=Ni;uimL*&waL=x+VSmD7jJ|8k;VFkoAL$O;6W_DPPD=d<=cJQ-O+x+i_~LdS z0~qJ{v#IsCHXTIXzMezZfDlM%9(HSs{DR(NjAi9|UW$)T#&I0jV?nIA zXYroR20K@GQJ|&ME1)sanASxA%aim`Xfa${cYmlOp7xK}))*8ML_=6u=8w^7z zjVFw}|3k1lyJ7IgMbHB9@lRYp0YI5z73V*(n{6&iB{MElR%$NJ?&DZ|I5RlzS&wO+ zU>;C4;^6tD>8%JuJmSUDyA4pY(5oe*E?Lt8n1Xm$OjuviT|drSvS|_RLFtv^q}rQ5 z?0vW=`aay-d;Dr!$=si}dpKp#_nm{6on|eh1+#nc8Y2o(Poxeh)E*Q(WsQX?Klve~ zZ+)CzQnRAx;`rfo(zPNu8XPjNk2<6{K^iEMs#zMA{_SsA^*C)n070eK^xp9;T^Uz95>kn^=Lu5j z`rux}{P|J~X}Ay0G~u8i8Q=Wg-|0b&S4__&o6QTDBwqbX*#r`rF*Z=bVl3J$6JBvP zC|h^uf2+V6RzU^=)On2<^)`7R=eA#O^-Z|bmoo&6u*YbzU%tM7ea?Qa&AzB;gl(k1 z=~cS~;zMPd*(!;IpZs-elC1Z-d~oH?EC06U6beLrgk-qEWZ*E^c`w>Hg3sx#FI5N= zY_>Q%J47Ckg`TqD+u9hUY zdKL=84aR}A)f)qq-OgD4rPt>VX9djD5@3`iA^bPS>E!CzdCPMZ!S^_h zgGJsx!`xkLOry#kwpphhC0wczTluApv)Sw6=;m{kx=mSI`#axW{9T6yufvrQna2T+ zy-|El3SLhE_*HIv;-JXjOV<5LxcuzkC9go?>!@CObJPJc;7tP~?BVG-smDK0G{2O~ z!uvBZKw{964;~v709O)fW^{G^e{7w3Jk!C11UvM(VeB$7l_ zc4HSpA(gQ!42dL^>`SPjA{EKngvx$U;&+eELEq2s-*bBO)|mI}buZU-JtxY<9*4hA z-l?Rpt%qY@x{-c-YpdrjupYhUd7M36v$rD!2BqiT=WdirOH1VUXUxrS8i*vO4?Exe z@_m|yZt}$9uQ}MiP0#y@K{-Zf2t6v(=?R7p%IXMz*$eEv7v4d0aA6FtRyt88anoZy z8ije2N{e&&WZCqrZ{MCp(Mzo=xl9!9`B5s4jaN!l(e=IMxO`K0?Au;RlZ_7^x02IA zJ@EEmfa*@^Xra6s%L3{5V$mQNA*s#!pw;bIknH@NXVC&73_0}j8gCD}B|;7k$%n$< zg<=undY*F{GDs?G98w}Rxc6AD9T=_8vxqFoe%1J%vV)qirPlb89lM__BMl05#b;dX=N<-eZgn(0L) z03Q2?YsHg%*ysM*J#L2V=7ka@A29H+vi7z^Gr!-EefzQ=$#}L3#aA#@@`yMb6$wXd z+PZQe=0XWn7Nl&KmwahF4McM}c}e$)Z+nyYU7%(Fv~ncd1^#@s?(Rs|ZCe8M{8uzH z)pK)Uw)eZa^AzIqaKpqC6qyygwCjVvN$m6oLkOc2$@-q70H9s$aYj2n7v%W2GbekW zKLJq`)C~|7?e_(3^Ln;`C=ta$+*!$;LGpP-{DPZ+3G^6Fvr!f-q2SlER(p|hsV|=1 zaY>r&vss!Z1ns-;E293}-hD+i7lFJbdyR=x9pJirKHpZrXYVFJaquc94m0hkjSK<@ zFRBB2u`y1Ti+IrOL8k&)ii&Dg-vN2!2qK2lJ=?rBuped$%*)efn_OVw0j(S`c55y7 z0;=QL)pz6*gtRRp%v$BUT@o}jvaf%hN6;Ak^i@hDh$G`YUHe)GuN~As*&SxSBT2l% z*xOm-D^ItQWLxF4;z{Pq({|yZkBZN)J9wS{b@1kZgSYsJd#;PWe>_e??YZ&j(0mj9 z)qEiA;_{TtHsgP*De=EPN5p(*e8Q%7-c@Rfari^njc?s^*6JN^`e00s^w3m)ewL*C z8RtXGg7NLd$CH?d7XX6JD4BTAbPBXbqcUc1ArUCTNj=&A$s#0}40n^y3U10XY8%1U zH<&FH|6-A#t2HxE8C$T1zc9Ez?hq%7A~;%Il(+#Y!O}ABb_*g1)$6Rs-BJ<4pEd8n z3<3sYK=xKv(7Tx%nV9EvPGREN5Kn$VOS{3xth*Y^S;a=(R=2K2RbJsnFL(KvsoZGa z938FcF7;C3>xcWpIt`8L-@jk_PYYnC`ng`3s)nqF#tYP*+X+Xw@@R1VrLdtiDw-#? zr^mvdpc#-lggGFi#WXhz&0jzebi*H&!3~wKa-CzpAmOG)SPDfZY)R!731f~BTgoo9_+;rqM##h8>u3B#}o3PI1lPng&>;TyL+1Y!2S|*MfE+_;jb44ZD1rpg~-0%*uDCqfvK0>RcgI zD6wD2Hh=;K>a}=n36^Lg(dH=aK7j$??Me-Ro%iE9Z&#ohc)K#d+ucsFTgffhohkD5 zoc-N(cJpiBymo>u6O&%|K~DvT^x4AOWyV`Iai`bKfSq@E=1Y@`wYnhf*T(j@iFl4$ zDZXUs;H0sCdAqPorSNu{!OnZJ8{S0dB&{2ALp&w8%_2&^_ze6i`8B=KD6P@0o$FnQ zM8N#~TI5j^w9lYC3+FKb=efEEQT?J3qTrSL$l2d8c;#O=uS_W@>SY193+mOyUn4Wu zjLfxXZl}*LEXYN%J-E$cpkK2pomKp8!_6!I?lkqkZr-v7S1mUxQ;#_*p_^bW$O})NL?C=h7AHFo8U>y&V*Sj|%@CVNA_e8bV@?XJS@3XD5pVlOcRT494w* zuY4M*q9>&JbETb*%v+TXcILOhe9J7oG?`a?zJiBU_s}g){&djJ+RdtWTzH|#YrSz_ zV?mxbA6UCMdkuyRc{-LVLn@p?>_*<$IdErDh^iePH1Y=S7*>+rXRD-(mrwSBZeXN) z5yXhI`M`yg%>eYuJ3(@;RQ$wwZIAv?E*GV+#L`(Sc6m(@x5+t@fwx#mewT9PZRzVxKvj zqzJmP*awNLt!>AxFkQMLsHhxXVp;zep$wEf}j=8iWm)r+ubNpQwA|FQE{An_>~i4PPI5jbdm zS$$OHO|=NyykM~o!Ct1hmOoWg&9d&g5PZwFJlwX{BrQ!##xSo{c-PQ8yU%T9k;K(w zWL)PxvGklB9$y+mcX(G)x3Zn~R-bW~n#Gz9oih*#$VBL7C>?(pTPNlKB(VG z@$)K(>xkQXp0xrEAK`oKE%pde_a@DY7N?ohw8N)o)lr-#u^d>4L7qB>;x7@4KIQT= zWr#;`_Ogn{Lw(hnkDH%8%paFWI`8vk0m$_dmd|%LLLg%fqHXd_B4(q4%q4ueSxJ8L zRg9biq27C4jo2$-v5kj0e0OQgT67PY&=a%fH;^gqyIXHIB>DVZvd_gP;gN33J8GwD zaKsir9A@L}1+D;ChsmbgDyI)aEUdwvO8NRVN9CCs&~jy;xi{Ql@Dopw+5Y1#z0&-I zx`r(A06*_vV!l?7y`YUZ9*KjkJ@g66=Li2`sFjLt;JA66-_hzRCrbs7H+2}QgQQm} zy1Wt=Nr{99)!mze`e?3~Tl~D9-tY-q;PXY_tpj&Yn#vc1xkSqXaCb&0pu(!E7?%)| zR%ZD(ZUgex{gFQy{`h&3;OE6sLyR`~dDH&$^O7ijUcrC;yb)-2Y7rI{vHD21;v@Vd zqiu&B7W8x9P>X}a5N<&Tn~cH=&B$Fhb%>xEeFvlu>32*$NqsK<^Nl{;e+ehocKe9X zLPgDh5Gxe(9mQ#m8~tWrNqz=%(!zg1pKRZ zUQS-*z6`(=pu&vD{;cxoJ+dFnaurn@FG!;-dfu-Cchkv~Y~gtt+9>AfnVFf8#2Ne0 zNcZhG(1ay^#52={J3W7i8Q~^`OCALF5Uh9PBqc5ZzH-@Yh-ROruBx^!jhINT*|f?? z@v$qDYVE8eyKX=dx3LlSdXE!<+gcM_wE%{mF`x;c^^Mv0ADM$E-qc;F!hINDwmlDP z!xKgBKZW9Vwi;fYT2IV7yD@D~2x7QT2@AO!iGU9tAi?L3B(`bY>KN-AV$33dp|^VJ zJb_~9bvXI(cm)y^v8H~Y7NC{Pn90nqD}defcw_&Q2f~VBT)p5;q*Kq*#$3n%?Ia*~ zQ||sGW&4*u|K#>O7^8U^wwd`9t1>t-x3pAiP}Zym`2}^e@4|PC2`&CQ`7c*b3z)k~ zoO91(TozH0Btzl@uQ%I*9))s_@Jdd*%ZgX*+KITp4ddZ== zE$v_A?m*G|{GEB7e;mE3v7a3T!Z)U3`&SEzH^qFnUp>SLj zGn07w3~RfRZ~rg_e{z+7^vMm(Vb8>9KB@}rdd+Y~B%sPL&S3gY1c&Ocp;ytjNL^(F z)&;0JrC#5JX>H>}nc0L$77N>x<;3k{#+SY5E?*ycZ`W)EF`>_2T-*2oR9684KW8|) zJ`C*CRT)k}N@H{oYa$yX(ZXb7P405* zv40Gm1;R-_kSz>%JeX2J{D{5$YQNFrt;pRmkYs4}MK&@xDW^dP(;T3FvSg{CW}EC~`8Vt2c)8+y%q z%PEFl(jlKJ8-gT9E35PJbkQh9&q7ZILobMqz|czu;x7A*ZTT}4+1hRTkNcKXjpwn3 zLp~n_l1nvi{G49pkVI2v0e4l?41fj!Beth^qoYP{pD>H%SVL`I_pP<67Lc`fnJnO3 z5%wtYDMx)!T&D^4OYptV)Zf4bRG!;DE7Rwrl=c*KE%7M1<}etHB?wmc$DxK)__ptl z2g8zbOoKNFTI_l}l5l9U@n!wUiS~UM{+^pqEB_QMIraYZIQSBLeeTj34 zPib>Yw--Q2y)7TD4!ZxmlgP2erH@`p--pi7z93oIp46l`{y}h14ZWGW&qPOVY6KNAoSZKX=h5!1Uk8eaUrkIWv3`ebsjiiAd=*_znJOcf>o2_k2hucGcylq zqh*oy*A7422Yy~B^%{UQaI!dw3Sy03Vgu7nr{`|SbRUwUR1ViOPN)O$)4bWz=S3)q z1Q~lzZ?}R=RK-^1bAfqWf%`Uw2{bJ1QyuR_Me!aEo;!$18aiQhYs&)5HYPEhar&Xu z1EPkymH9XlC4CXn!Z!W99pLBHyID=~^OhI~q$Y2Zob|5MG-fB=18t0AH#qsBJrOYQ z&yP6uQM>gEB z)oQi^4Q=KEq96q(PT?k*%^(J*;m%(?!!oJv-(4||UKROA$ z;hi1gP0vy@+cHyK6I}g#8R3ozmSsO_#v};u+7DkG#`fbbX9Wm3`Lm<*ps~eph@d|Y z(x@6D4X*fHiZjWWk~UzU! zeY2opR~6nMf^K=4nmm_J!Cl%)Ke~DJ?c+$+MvT|C7m=^?EIwcxy+I80nr9FKyM%v8vfyr_}Pm6kSdD`d;eWLIo$i?N1}S)kSzz;gDms0nu*h~&34 zK1zD~h}e>`aKY@qb`^#bYn{6gTB2CxHtn$}%E-md@Ugh%!a3S-8zCpNxfR8P5ZT16 zCr7|h588BC=Is&`>a1#W52liI==OeXVMo|mRy=OBTU%1S+w1u$?cJ=a=^eT zY>%A#wACIxv-XbW1rc=zMn+n0v+me=l9*Qde(>;sn#TmVK;jw}Hb&-R7)jON<$^`f z?*c|qVHD|PR!7gq5FrY=;9PQrGuip7{?-rd8)cTWzU?*ifmk39H$zt=w_gJBJBgwe zH+R=tZ!iDL&>P}j-Sx-N%g%1l31k+q;g`#tHetCD`Sh@orVC#&_3v<~Jc*Um%1>Un^V&_1iPtU8g?zsC!(YJ&s0kVWy9B4^1M;H+I z>zCQtuI^b%KYQ0DQa zez{=?P<6L1&98c=rXH1LS#O*^6mO%67VG;=gu3scdnN6|%y`+1U%yum;10F24mgVX zP=BSZR$8a*;&8!zCP1FP-u^+)*7$>u;wWKZ$T2$rO0z`MutmS1SYeX?w3zOw$#Q=r z&~J-0%qt=6BYtqm$x~;HL-R)BNu{ z8&tirNP`FzQx*$&&4}wlQZqi5WxLNzF#TibwV%kY@$|7@ekryxc&%}$tC7*Q->scO z-OEGVSu#3ty^XBj`oZdg&X9TULQD+1lgg43X`Qk={*pr3?b%EjUKbjE(BoF~r)EsZ z2vb6;pMt$s8vS@PP`RW|*dIw~G?^Tq!fddvUE z&?}`}K)(Z~ZxBxm%W{GfpIWE*piz@L{pSWNS}tR)Qv+qzj$?U|xUdqa->W`h40A$0 zQlEW!wU{`u&*GELEM<`*=0YOP!YL}09%6mqEWyyuG{ORuznA%l1p}M)%O6AU3o!Je zebrCUJOD#4kvKXxX9{{Zn_^in{hLkO7^G~Ct&k1jAgzZ?9&oo(Jb~e(+%MpIdmS%G z!2W^kR^ErZN&jL+YM}!pvtBi32m3#a*-u1gb2nYPK9}-z!eZ+_WkFKgjH;>$$g=QV z-=oaf0}_%^pMef<@F3J2rm7HrTC64=%!RVuYcb2@PLLRE-46E-B~d zF-)xfNVwph$0TwYpjs6%zad)VT$qEb<_D`LCym!UwkjU+ueh!M9?=N>-hK#W-mtAo z>#1 z$W;`AK;51XZQsdHR+CCO`Y^6;pAcjWV&U|i+Iz&I$#3638k_bh@YSwy);hEoYvKHE zU*{BhNEQWHEk)mlN~k~3)kW8J`t{9WKR4}j!9eeo1lt5qcKHqm>z`l`@5|L>E2zvA zG^e#uEmBe%X^fUhf`04i51+sYecsm6LUA%Ki!Jxv~J_(QR3?I1|=V;zq833WSRnR1f)#Q zn^FF;y$ZNPl#nfMC#(kBC7|qr*nmQDv9fffD|T`g>am?@Pc`pNPAenm(!Lv+ao!jJ zB&=ZraZ3yfhFQe|6f3QAEAobP@M#Y1p*lNk@O}wN)inJxLGqbh{zKU<7Oy~n-1++z zNeE5dB1i&V4GAc_%A1s3C}f^{q6o-CSqS!rklS_uhdfIy50u@p+mUfOU%&pL>=KDu zqaFs$A}sl0*WL+;SEOuWcT>nwow@=KM+UKR$A_@#wz||yvZXu(zKjZ zEIC16WMhhxVB2!ZwXFeQ6?gTd=s7FZbZIY~Djn6ma}r=_8#sh6(vijme~MC-r7GM( z_i`U5;U##_M{NqC4C?S9f@ruk)*-w5Ft&W!6&sM<5$=1%8BpO%qF(>&;kBEc?g7Xy z4CKJWtGMamJ@d!I>u9xcwL?$3>*jjOD0q0`w7k;}^U;r@zR)5WOyKOl_BT~5^@qvk zS7)B`7V2@8XJhr)f8?`H&+BU}78WM{Ejgu+Jl|Cq*$f~O+Z=>AKB~g%Cne2sBo@4F zK4C7Xm)wV08yIgK?=9y&%-Y&1ldgC3aNm=StBYZ|^U*O7Mo!LGZbw9jLpsuZky7Ft zih_4)ez)zRfTL(1{DCo?M64hfM=l^L1&x8Sn@Tb9?%y!+8YfvA;jxJ!FNW_%h?pR! zjGBbQ-oi%U_~UzBcSCr>JO48ALLJm95H}KusJs6ail&#ChlKyM0Jy6N4`xTvs(j7w zs4H;yXR}rRYv>gNLoe9}487i9=-v0Pp_e&#@G=x^VCWr^zMlOeO;6^O?Ui?tmtQ0_ zY~#hJmHC!m=#z~bv_)9`HU?%7MEhO+VRq}@ z`S`jU6OFCMNjVb>1_iST^tLC$J<}on4{R5|s+@lvgJf3MyobfAMNglo7UdUU4%b^M z#)Tx`FQEKiN5~1;aL}x+DXc|N356%zavZl-gZxPND`2ftfneE2JW_%4dM1)f^lxMX zE%J?Nn0Lp9oXmt2CpXjWb|6hC@;}u~Jfgt>jytKG-oq*e(zjwFBXRJ3SCj0QG% zp|;!1;nkzS?Hv2+z$dPFcgp}0?)hIGwR<}v5r=O&4a~v7++VaitH$YG>!9WDQdTWV zbukX;nuZu*#&N@zUAvP8wwqv1J4z((Y`Ww4LBODe*eCJAuSGH?u8Z>Web_*9QKC7cXum2&?8z?>6R=M{md3Cd}Z4G*R@W)peU>>Fz zzjv!^5fIbbDjE?q>^ExZq%D6wC*?#(30D#^BfCDxw6UTsj9wUA5=kz-bjn1E)x!xV zNVt6RS>zd;{VC~hsOur3w*;2$8M+=MHUmSqxoP@H1yRm!X9h{KF>6|IN5$Twa5-$3 zbr}1~B%izSiR@o}J%%hksQ)${fqy%@YuQMs=t$*vYISZM{5zV@zoJno_UUAh=RH^K z%$_D2^GIGaff!=jhrI$iX$7Of?C%7ED!S|fq)1@Lx3Z_;ZItJCLmWn$4byXh#-VDN%}R*x1W18=t& zcq46gAlody1uA#D{n5j;h4Q3Lml{QkS-N&YX-d+Xs03mHIntHVdwDmp9bbR zajI~%w|HauM!l340%0*Y`28uV{DD`8#1>5z-%2NWu6H{E4C1>D5Y-*tS3VVbXrOm@ zdC=H^ode z^Rz(CDew*(cMsH8cPyJmwVS_J1ED;BX%pvIve~u1a?v1v%$%wa%RJ`oK@%n$!(HV5{M1RA zoUcPF>L+NO%-|d=_O70mBNRvj9E^XcdN6n1t~sjtzR#%H$kGfVe6OE@NyvC($F{^v{Np=&s2c6D_f2W!Uh??%@#W)J<-2u^$%P%{X^UB+o0`+SORUgW}UWs z%W?lYZC6Ywt8at0>#w?)bjp|=%(r{uM%2cP70HTc2#h_qI=wX@++*-jnNc>j7e)xs zQUeyS%E>1ZGdA9l^ON*{aJ$mpVVqERY;!@eT`O6~?b=?s`6*wMSN)=e{5o#8!gAS; z`j|*Oy<+A*&`;0gF|)Mi{sh!*FndsexV$=4U*xLuzrZFhKM9>hBlK?@Re2CT=y!@* zA-l>TGUij1^zP{eZ`?n_+XT{*Pp6Y-;V(M?%DnsMe&%H#kPnRiN(1GM432>-X!t-3xLj|A)7ms)9{`DH_BZC1aGOsSSh=~G3p!ec3)6;dty z39Zg`^HyX00$8eW&cEttsHz1Cu^jLHZ-YUP72fJoy&|kP(zevifWn9K0?K_c*lm5IyCiwKuTSNqWV8fy)H{zDQG899D%8L{>S) z*hs$#@Ovild5F&h?<){)f#*K#QDwuo{Eg}XvAt@Yw@Y?XE&3UR*eF`D%Z7mPYZD7O zV^cZ};LQ%0=5`oFtLn9@|c6*=Kesg6LABR~LYtbo6nA2kaIaeL_{n6Pe z^jP&!#~_)Z zy}X5`OcC*6H5tjfc}1})459Rac8?{d8(&jV%@h&+KeRz8Ei>Met>pt{XWvl4Ey^zN zLaM_A7QMXlEGGEa*LjGAvyP^y9|3Y>ur8sb?toh4Y&^Uqv2zc%v}2tReChtqR9Vzc zXYf2!X}r&Hg5@4yup&!Tzh4HnfnShFHyHk?axTIQN;1gyv_rqut>=T?spe~emV)HH z4xSvg(QI4w7RdR_??9V`9_7+dYdO)D1dPBd$UQx8q4*H*Y*hg zpw|!_!nid)@>lh|{feXC!VZ6|M)mk>UXCAawWl2k0&I&fj9g-^&1GcZ`f3#O_Kvth zvIi6$rg*m=L66Q>Dth=H;Pw7LxZSy^tgkc?6z;v=+io6JFmrX%410=BB$GRXX+XYg z6M!;ug48ka$)~<*DcEybi!Xc^QIPN+#K0bWe#sCcY|*n*(k307*APjQ3o$r8>GU46 zXSa;~gZfwelo46MH2uZuS1y%Xw|OZAtPHJ5ibS8dbx&3-(>uz45Tgz&jlsu^yB{;o z>nsd`5f~J3;9clzYldkvl$-a6L@s~-SC3Y~R)u|RwI*pHUr=Wh$_%zw%2Yu9-c)oj zyI`zMZx?;XmV+vPd2A6`Sg#VDKQ$gq7HP(@Cm`8T;Fw?&)kjn;04A zt*&=|&rYHgdreELqWQ*I?!Pi370Ab&tE4gW>(?ZHlDTeCDW0JOp>z-zyshIk{i!H} z66x3Ww7j?IO#}vlpL9bS-$iPKWTChUuHK2j2!*;uaqnczrFXYyo`DV%GTzGwU|@3L zZj^;}KboV^iT_>g;3%wJTiSw zYa5XQtBdFoW*>)YOvuL(Ke1Xs4Uv2yA!HQnP_VX9M-Bcy%BStn10`#;-$3x;UCyV-QCVc|&Q@*9UKM3YA24d=jJ}u+!#)1>-HfAl8lEfBZ?z)-Tl+G`2 zV;J1&31P;vuJR;Ebi1gtBNUB;X&^p9|5Kio5?+5WU7x80Rxc)HS)JOKWL&>-9dq>dv|T z7>K)PAtmr8L%@@*J{0=@$DwMwDl{uWnF0RFa{lE$39?SbMqS9K0NQRkS;gJ|OQw19 zeu)SZCY5&9JKaw%>=FSAUUW0J;v!?&f3)3U@X$zDtAibzLfiH9BAu1hg*xfE_4!zT z^gX38xm>egHXpN9egxULqVK`qKY^&;8(HcaKBOze@yyYa@Lk!bX~S*tQ)NXNX`>t_ z7D2Ca?A;rDpL4SMC{k#<(DF(dRO_D5c6eLW3Gv(@fId4Wh=v5j_DA2U)I7BL991*W z?~=;OYVMs-k7eT*gXema(LK-x{51m&QoRDn0OzP6@B?P_{rS48bM?RNOA{b9M7-lo zT88?}%&;tX;4*&JiZ+z_Rc?e4BH1$))3EiJ*HniA0QSE1m}Rf~)Yi-_0^h%^VY z4Pf%l*Mb}oVr}`<@|^0Ic^abbwY{?}r*ggf#W81sQ{ZY4{F%Q$gmu_1L@U7#zq{r8 zmANNJ=Z6)Wqx`3op<69Dwb*t;2Rb3tY3O?MD4D zNx2kQ%c31|(i$ckkH0%iYu&wHypWTEeuz=8cQd>&KRp!QaeTz#C6+uQ$m7BH%u|eY z6Wj9wrhzvm7bIZf{_#mNdqgP68S_}AM+Mo_7?^#g(`Fuj_bj3Q4A91bGrON-O|K0x zp8LtIa_vdynFAoYX}Ok#o3Qn`acS5aDLOB` zi_@{SdmRn9lZC2lQ_&VIWaIK7YRdo*cBr(6w2Yy~aFmTkOLlWenpZl${--|bW!Kr? z+brC)mt6{B5Pq~-#ob$nL5o%OI4+o03p+6yOA zzVq!oT#tn;%dEQ-c?QcRAx{4MD`*7S--BT)){Xb>E6cqO4l7PxdvaGkXBsAer#iMTo7HTdZmnuBZw@Mfjq~>ye`_hB z(}{k&CgW+dK?{KGUZu;8fq$O=+eA2JPQW4Lv<};ijfqWuXoOddEwZq3q=L~h-E@_4 zDSX|8Z|L)_3`D+Gz-eCmned3t;tbCC?N!UHrBb-=rywR^m{PI0k*5?Qc8jCx+o>3^-!$4wu_;WHpMq|KdlF)?up}%Kwk+at+(b7lebN^22$OkWHTLsAVSh6nE-{F^cg=C#f`;FC0 z{2Js^`J^j*+-z8qxpV9c^jmBA6Z`z*Ww{Y=q^?N(Jlv}BGIRvv3(J&?t01pc7IkD0 z{U{xKwAO#0#P#G(bB)3aC&W8u$BS}TMCH%JAsxFDN)AT*o(KHb6V;5eu*|ojyyt2` zz5Qx)zZJg*?iG`5un+_3HbBP~H354vh6^}Lvr>^oOWvK7IE67VY%`I4C`ea~`YR4Up^g#3;D922_ z-NnE7><9J4tqweLF$v*^8ymhMwOH)t>vWv&wp=iQOdCZ*n=B%wSaiL6zjv6?&QVwFaH|z}@y%n1}a5D@mI`@+1-RQds^js+%^O$K>*MZV8u)%L9wwqYk0FsoB#{* zc@ge*1ECQ{2Wa)LB4#wUF_7hr*{g=OR~rX3vPE1(fNazQ- z&PW!}9Xk9L1Nl3hUW~PIdpvw4wv#;Wwc~fg{ZQ22=!O%=-L_7|C~s^Z=wEG`H6{N$)@L(M)c*#aP0sX?N% z&>ZrG#f5P>&IGum@(u(X=Qiao{Oeg6%t;0a2*F!jfQ)16yp)IeAHQGA2EMN1AHJ@& zA~f@3*BS)X+7yqd9uF2?fT%Kaz8N@TbN=vkOV|0jR>0TIS?BAvK)_jATKKG{KGX~l zK;xeMoq8ei?oVm^Ax+24_bG^hJu1lyW_z_uAGQsiu(AAPF@&S=bt!|tE4%1bf3-bo zZQA`fV7_I{b~{-@FjjM)Kw4VS@&l@MX@Yb0t{P8ahteQVnxzu93Hjh88^p zT?j6JPH=Me);ZY=>v@|=`ehThUo)9Z{9kaL8>K1h>_Zql(&XDR#eI%s7pS`=a-*K= zD<#JxJ}m>h_aMUk`SX&K2_b8AaaxMWPTP(Lda-`0VdfH$_m*4hy*;Qx7Oe;XTM;Ds za25F?4H-n0Rbkp;nr`_36wYAK7tWaa6C1Kf`sp82wuy#VTDq#sW*v?{En*$Sj7J=? z1#OG$oqlthR9+`}1X2GH;ux?_0?(Ktf-(%|+Uw)S|kS>zVkPs$n?8B=c2^YYhY}lkj?U; z?O?!551rt$y_5QTW>v246rtN+G(c0ACo|lBf$j9DUw-%8@?JQZA?}zg0{#;B+4;TS zbpjM{)Nmkw&{H-u6;tcxh*s)20EY4HBZB-&@nE1?F4>qPuQ9AyBcv?}sng4h(d}eq zZk@Wt6*7`#R6$?ZC*3a+Cv6!gU2Tf5`v;sCUH>2j>!LiZ*blc zF$Wd#AZJ3$xN_cRyZCCYZ##mz+1|XFq*p{)VsH*Up{|WoL^e06)Coa;)9_B0LWJbV zyne2R7gaAz*<{_8iZ!uW#MNlIu*8$;J0&?Gynsp0k|NZJW}dU%{KQ5^)(oleBMcxY zREl4MrZ5o8&OyQ>7%nh=w>V?otUU@#42Xn;JRO*7Ku+EHf=t>bUbB&rX5P9;)70}C zkbjp8UaS2g!a^jwyN*^5@2kcFM%18&|Kq0krgAChJXLoi8&QdA%wwjH_W(ha?L zuvQ?YW4PhJpURpt#tjfEb+?J-A_6RZe0P)#FNWvr5J`ZMhTKtyw^Kd>;pm4VYLAhR zsYb6qwSEAEr{hO&o4Fg%hPJc3!*%-cU*SLXUmXfULbdNtS6KvLW!e@c;w$__pzkisqyl6#) zz}Ef8@_B(}7@Q9?I9eTfdk`EWkPY;VEbQ6T$d!iod~?<9z~ioAo`&cl#@@*uaTV95 zVn5s>OjD+^*}hG8^NX;2Z)^|UbJn0Kc7{bq*;>lAO zxlYfkUm#7cQE8MgKV}^8KrGI0T0=k5{eXpPOvBlH;>5lC-w0!9j^2Y_E#wm$72&$B zilEm`&FFQWytvrQ>s)!i=G)#8ns*8Ht;aW$1qdsCvTHakuAO65&`pmJn6RX_QVD5`s45vwaUW z29&5Gr$!cdoVcA%_NoxxBe-V;gn-DvC3z7KV?7FBck*w*ZWh+vk-WQ=)f>uiQy%NK ztX)l-Z2oN5jE>p5-BiHK-y3Wv>1pA-zc2n0(Ag^{+0-Yi`JWcxG&4uC2c*VaZ`VP8 z&ZH-K&jQfu5WyRUsSZ7C1^(b)cWmBp_pI?!#DvdwTy6pP0nE4n9T&qrSVXnoa4%`k z?64;XU4Ffb14>@973XzA+X*OkC#6uq4erONmPvv|v9FF>K0uUO8JofdIHyIqdSOTt zsi(y^0|9YT%9DlTMqZn7!wPGmRA6`-by5UlC2*esc|E%OF+TGM*l4K7o(+EspNoP4 zAA(uDu48NmAK2;JKoSYH{5`Th+#3; zY{s609S5Y=VY@v43)^+3ri{?}!|0VyQzwl%csGFjY~Qu65JjX^K&Q60T~$6oZ{Y$Z z2Lmp8XloA!aI3wi2|3(sU+NtLC)?*=@`&kK&qoVjs*Z%_R|tk*(NUhk`(d%Zx_Tv= z{b+4#B&<=dn_k?Ex}jLCiDijmU&iOXbA<`%LTJy{GjB4+3FIpFW=}IAlE1eR75eI+ zHx(0Fi~`$rlEA%U)E=E2a!-J*4#?J=0JaN@!J?Wc=$9A}1p;i>G8RJ4RAVdY-@y$A zbvm@6#gjHC^m@A^!SArJs(f8GEV;HNROMjH+_LLN{gV{LfV43s99>ye%}|N8r0P#M z+T;A|<=L`{@MYYuvSg6=#TQY*5fDsJC&iD9+3)K z`H&>c4jK@k+r-l#Mm^KPz-HENgqeAGL>n#K;1jQ^P~YIk5+BYSJq#JTywfm;SGqD| zTl$kw<~tMA$;+-2zgzEA$t8UVH@fb9hOkp|uC*gYx5pd!@LQ$=Gbw7T{-_*!ra!dZ zUXi6*SJ4631ldq%yC3xUyTC`>jY01Yxfb$Dj79vb1 z5j1tsCpa9dUZU~<+ie;hc{>S#atE*sOu;)P!SYv2(7D|agJM!90pzss#=x6%{=_uL;`s`X$`6BFrVnJPq`7XFFs`8MWr;u;DS`-J`8tS{ zbGfLLR&#nx7Q@bgU4Y&6CT_R4ybmGv_(jh5G60@{f zKBkB60Acv#yc42=I%HXdEyj_)b-Y(S$4T-|rl`$B6 zNz)6t%cuM_bEne3t$QBoL8PULEhi3pV&wgoVrBg)LTt+{T$bgH@BRw7Muo43E}C^G z$-t4MJQC`mGZH@AxY$^WfQL+N{Nrb4(6w6Z+BbK%0L=r(%M}o`ctX zWWEYQLj4oG6KDLGayNaK%|YhoJG48848W55=1C_{eM-mJ9^GrrudiVPcTEqPN;2L0 zv=z6@6|UY#pDVmG_+_rtVjHNEK9)2%sa0FOe#7H?OEwz=4ay#C%CvS#P6q=Ft%*Wd z-DTm3aimP(ODY#(3&FU+rMNM5Zf&JR^{rl89|n#t=j*NK|H z{?ZcU;K6_t;(5=dlMOs_&rRG!_g4)7HXt;X2cf8Ogq}%{>d|Y$t&uBl3Mq|k0I4R!T0~99ZK&|~4 zWfoxcHt($-oE7lO9XDn5;PZ@$E*-W-Zux0sCWKcn-JJ4| z>;v3xT4Hr(ZsvXIbQWIx2^DBhD7amrWD*6pd&gMA+ed(QWW+CjFH^31-?7obdKS}eY{O`vlt?R+HIpzd}cqD=5{%OCkCg7%CtX@h{^2_==o#lefzJW_X5Sx8vuab zH)a`49O9cAeead?!NYeErCPbkw@xQy?M%2R5G+O8G@!?@odz~Nmr<(xJes@aHLPI~ zxui(T-Y{Wm9t&Z5&QsrD!CvMAnZ0l3n&;B29aB+x_{>#&qOwcbUJ$KQiyIk^9O9`- zcD%FkO;cYj$DWfz2L60Ql%Pp6PsU{8zg)+4?s68ZgHr&`36d$#(-w~vPNxiFgARy% zw->#bbC1jxvq^DDS0fw2QWRE4&#^N`3(vi{_Bp`h@<%59$v=MHlWebk52&X2%BQx$ zSdv})b&Mwtv$2B;Laq&bUL~-09o6Ey-KB(yf3%+9tfZ`Qv$_SFy-KY{oO-W^Ny>a? zT;(>q{USfanaEv3?Mfp20rWa4Hh!s3ORqW0zDqYSUL?LI-1Lz<#m@_8DO#wt`|5Dg zKcsBTJ@c}Sf353kC>5ULT3{!t^J?>NIE!5ol}r%60r4F?>4S3y5#Pjwb~HuNUS8ZT z^+xnPLL0P9vf)%}#DRQ1%fZoeRyE8UfL_QP|5!*QGa6n#Sz*6ZsiTj})b`WM4Ryx; zwOz=}w<3gz`sW5SUuhE#GkbibAwmc;SWX76t@C-o(@x>@#%5~~!{3U)+Jp|(4Se1S zzx?^Lz~{Y6`pKzt)}A`^UFiIssK*ihOA$_A|Kju70-u)&F~OQo;qx-ogAfjsj9q$H z1wJK_s}AZ5Lk;4apqgEv zUe`=r=ks0zJ}(G)z&aBxIeZ85J33_+u6K?e>=9j~+PJ?X+W=HDsNSFqf!}zN9+TnH z@88MTxaW=NX}RuDP@Nsm=U6ckI4MPQ%T%m?wEnhF*&}`qNTfVZFDzNLThE$X=G&n> zygxTUfOws_rLK}5U8ciAZ5DM{G%l8RTmVDJGF7)(oNU}!q@YvbkzK@gh0*%n>rv&O zr#?~myzKwO=Y0t6{8jI4zuCariV~5wIU0!;5|&3wvQBJb`>Unybv`faozz$NIW+zM zUs-1!5B1vq@tHxEmLX)zSdz7plYP&Up^SB$AzABKpQ4V87!4(|E6K5qH5y|pl~l+Y z9!W^r>=DYAUHM(38lC6YzrD=MjPKm{eO>qU{=APQo!X&ODxNf%e+nO?Gx4^7vGw#l zU2hUV5TssfG#@?{)dWS*`wXmA>3AmxN0q@s!AIzfu>?x$d)(l(p`b1|xZbl<11rV3 z>m4i{v}lVVL%T32IMi>El6Z;`T%9m)tF9fw1y)ch%-CAuwbQ1)vpD^#rO{FA4@}84 zYQOO|8Qmqx#Z^+_5wY2ERC?QA(EiV*Qj^3_Hn8Bs`pX789VhC>g|Gl)+3915`eQssncUV6UnRC(i;-*c z%P?{6bJs&)Uh+W-_<0W{hTNl4U&XUNsQ{dJcuVpv54%*$rnw;P2QE-%*&hqxy_|J~ zg%%-Gdd26C)?S{?-q`E4Ik^ER(E@WKB4?^MX`1->2-*g}7u2B{qv-?eZ(V1zNoOZ%AByTLAkD%MA_rRdqKK@gH}Q4-oRnGw|&LW+);B9eeh&{EZ3iHS^`t zg@(0?#|{7X7D=^_z2V^Qj~S#-(<6GmH$D z`tOVpfwYNfGre?#XbD8JYGLKKY;E8-v@p88^isB_nFz`{&~hIddYPPs(kGPJ(u)shQe@ur49#IAeJ*$6ZbC~llZexN?Wqh0t zRhf5C27FX`mU2k_erOMPt2f=w3m1E~Ix9Ze_rcD4p+J>R^Bx1rC+a873)S>6s6ivM z#~Og$>f8cR}a3$0+{0 z7XFF%YveO~=X&VMs~Mu=uhCi7XVq8@{dnCQ)1mTQpSTMo7c5p#TQdu0E^pb{&(d9g z8)HK3FyhU`Jca@Iw%F%J&{WNV2 zzruK7$`PK)A}#qyzf_;}>(S-#egj!KlAlwt4an`cW&3BHyI%>2*hFVNre_wGtOzLohsW^1 zt;xB|)GL^shqU33p3D?9{ylF8O#@(=(i z)vvF{QokLey)MDZtAyDWSo6!zs~A%^mdbGQ+VRLc1#4o8D#Te7F>#O(4fCtc-7?_h zZC_x=aTb@2uVlnRSC_FLvp&-yVy_vDSDxNV?>RquUz~SfQ1x`TP{mc$(N(UF;jBNg z$g@MtDuJS;+8FL<)=)u0zwk^MN@Qpr5^YuWsT?tfytCN-0O##+@2X9axH?zsatNHf z+_$x_%AElx@0SfHFPO|2izpeKymS3~>UBaYLlGc&ERJOo?_dta^Mo;l4=}42(3Z+o z61q7Gc`#|5DcG>X^h^@_LEN4<|3I2cWI_)E}DNm~u?gfi^ie zyaG5c3C-J-Xhpt2Y=m}R-N5Fa2`F*wiNA~t90bVFe1!Qo2;)1J-)WPMQWBNsArC?} zzj___3-6j3R+3Zi$E?rNZ`478YhaK|mE{U}b-RL{S=MA|D6GN*QXfDZ?>EMkFxw$hvvB0CBuH^kBlKWH1 znHZ?P=~ zn-Y5GS<0>3Lk~R!jay~|YF`XY?`BJsxC)C|AgflX;L~a5FGs#A?J1RYu1On2HV0{8 z;)>;XU$HA@Iz7`*xwQj$e79U;(0QJ8Wx9d0@)8(%1xEh9kUkP^%|qjxTYl{KMKMJ) zNZ}N%$}SP@+W8npSPu?X_UXiBUiMGA;SP7ZNqN5(a~<9931aYM&k{8=P)_RU>Sl0O zIRA-TYxr=W)IAXeYn7S(#i^yNH~6}?n&rZiCN5qa_42_lBX18FdA~r84)aYF-4typ zOR>*~Qrql4*q%=7Am}T{nI8)gV3N^O6`KV;G|;?;B?=k7yN{meVJtm}pEPgl*NScb zqIr#X(rI4ZA2ct>tp)XgG>~FbkAt| zyz^%->_FJ|8bElv{oZ@-ehS^f$$&9v5B~O6oGeCGV=I z?z@<0CqT)YB?L;|Z^2Wb(7A62Z@#MBuW5@R71R!Ypzy z;r9^xKL~Gin+}caBPIc5T30(!6J9|Uj-UGx^`X?4GU)VT_S>=$CMIlsOycqTH{ljO zeDqkU)H`S|5%B9?;4PFTX)9N1-4o&U*wYp4vmgAm8w79u2Ej|IrxU#Q(Y!K1@Y)Nv zF{((+`h&M^-)7}oXJrtBOCyVq`=*}vvHKNF*?v+`wYm6?Et^*~F%pNInZ687jc4+a z+1^FtSijSKMCH29|Uj4 zknls-Yx^;@%>ML~X0ooQs&gI02R(t{1xQu+8lXjXCTM0A)6UwKd(y>5W$oPQ8EGE} z7zFRCg>(Ahn`dm3AP89Kzb3RwjGnYZCjBWL&HNu>RFj*@1F2!kHgw z$sIJcRko7u*9E1)Jot6{{^i&8G~4j&3ddy33xfXT?(?N9nx!K1!p|#%mn}$T^;(i7 z-<53~>ang6xK~wOt>G3hcVzR(+q4dU(V2bpKSk!1BRL70n7IBe(=xop#y*~UtC|X9 z$VJTq30BewQgxp&p>M;li!s~q>#G0s>+*nK_dnh3@WXfOot`nRTJ**a3Sm2X)FvKP zMZvY^--M~fM^Pj2g-(vj9&_rB*^Hx}UTV@6um9t)kyPR_m~_mnN{qB2Po@sj5#HjN zniO&f56$O=*3|=eF5la-MN|S9+$nY=kc@eS#{IZIeZ-nCRE=?zsDIgcmzYy!)g6(8 zmTO8>fK-0?&msz+5P}GLJ`cI{I~)yNh4SHe1OiPoHaKj}cqF&1cYZ2QMUoMarN>V8 z$F$%2q>LL2VSW=!23h6}XdA3V18GRu*A+~};{${5e8*(f%ziw%l|_YkxpaK0WC+A% zb&aaF$Z^Vk>%zgd7FApPT|at0aJ~Z#?DDor>BQf0-ntM>TN;buXpTe&;_XySS zb%M(WGJ$W0K}bQ_>fmiJGGkSnUUF0D9!J8v3vqI)nA%Efk7Hwb#(fnee=sx0V_5w5 z5QJ8u^bl%cgU7K?gF>x9S}NVGJyGv@?;4eA7bEMtrha(q*6+9{OLW=pb~(GEKVHQP zvk>U`g(J9iRiHf6i;8HaQ3{UzH~-;nL@7oGem+YMC{ z)Cxq$+Z>MZ)TTV@pQ-IJw{iyhK)W^|>pJ8x?Aav}mv5#NnL(HBdR^O@0_wkqtK1$L zRmlqjT?7czmb&%e?L@LsSJ&)X?{ZW!+_OI|AXRUE=F4XFbD=wtSX>U^;Ff!;};s7k^c#cUo#rx^y`v>v+_Jv>X?ph8yE%O9Od$^zDF%((0=pF6tQRR-@ z-vc-=Y&VYq=Pj6k9vF<|!B_dc?T4%!O;WJ6V@x~aNj|XdfFy5;dofsU?0(qPS)5Cm z9HGiPGKV{>;@P+5Me2=I%Ox%D&&O$NrO20G1LB!pS_0jcvz>GHC(TQ#=MfT(6bD~M z9trM6QtzE%8XFK$zr}c8jy2WaN7`i#(Zrg;(*}w_^ZKZkPyVENfwR(pdwK6`5+W>g z)hph%!V|kx3hXKOztHT==1%7WJ6B1WIMb^9!Iob;r$#0-B(VG zUpUOoHhl$#!JOutUs3IjYo2~^{3xuC{qO?&?L`l^-icl0;TJfhEa&+<%v<+yJ!cc< zg89i-5s$BM zP9I6e<r@3V%;~5MkbNljS|QY=((5YRX}|=G#!a`u;T3+SSiBWM;jw zx{-PY>Pl=5=92FBUsPGY-!Sba&`rBU&B}B6Wdd9kP%Em{gjj)TcXwLmlZ>?AO}nt* z!Ofo0K^KTqQ=k7s>i~C)z)}AfE117GS&;D7>RpoTK`FG{_{f@iF^9>cnw0hfq)_Y2 z5nwB(cmLuFF5MQgRE?;)5@@e*_GLKNVrgEfh*CSnb+=K@D39#6+!yZ)*xaARQJc|F zKim|-4|V#6?Kd1&lH~TFz=})&?2X^;nMPq5W6I-v5q!c6S(RcJZ$YBI-91u%=9 zK@=3i_9ZyWDVWi}m1=W4+SJkSO?^18Um=|KAnz;r;6KOGDor}O2D&~N3wLSL))33Z zZ!{pyB9BfB^*MrlZyMP^4R^cjB1k{nh-@b9CDZ5s0;N0Dnq#;pj~W2X>y#@yJ%B}q z5N+_4NbH#* zdOL@qhEvcfS}>n`@VS{Q<6DWQK$qO9B>zjA0jPFG;=)%OpPOMl(j<)SPlWOL2gf!I zy`r$g23b%u2HL^emOj4M{QgO&guwzaP62*Nt(Cubv^o85G<+9ZAOxa5Q7hGgNA052 zLAdd1q^ihv$(~`T$JVF%p_kQf*cEIbt@Ag|9Nl)DJI9ib=NG+R zG9e4$;DNK;v}o>=gBXlSj76cW33DJt!EX{wHt~nD!T2oTeaP z{k$hTzq8T6j&4pIo#2slqeibQ1aFwh2S-)P9-3h7Mc{`FyLL}hKR;VcZMp3Xzd$N0M%JcXn?~s$4mTNcon-9CaEO)%{Ks--u zmNw60H~@81?RMOBfK9%!MUP%hdTt5ADp7PQ|XlV6;z_5El8E z@)~A-|C8=atH|!%;(?K_fydD_y6ldhVVNmHR5$#Wv}<}|Fq(UYz{f)Gnc}7 zzfGh7DQ5VTgF^?==Vtp>qggJOrae!mc|Gs#0<|@4*sx}-u=9w>7jLL`y?D1ND_$4W8)>KL#2$=)zBspR57|7S z{4?_s#_FmhLY9p!zD!3c7jYAaoSR2)2E*7M4C6{)Fm2Zxbz|F;BzfGmn`0WvL}e-t zd3M1KZUz3`0uFXy%V55J1t=MKZG+r%(R+Gu@!A7w4W&U#DLeJ#i#R&cYGU>*ZOb)* zD_WC}8;9pJWq%x5$UDp3ASIvP;z9!}3k{p#%$=i;_s?E%9!XwNch`y8KXejq?pzIz zbt*C{V(2+9av4}i(1)W&)uSS;yC?qZ+}B%YPShr^Ged*BA9}rhM|T;D!BjCOE*wtd zIUSv~WOeizgwv^`CKQo*%3v4aVJwW`x-2kU}T{AI2y5V9J%rmbaKhYB#lKA@-&Cq$} Date: Sat, 12 Nov 2022 00:06:26 +1100 Subject: [PATCH 022/220] Fixes inpainting + code cleanup --- backend/invoke_ai_web_server.py | 6 +- frontend/dist/assets/index.a06633cf.js | 515 --------------- frontend/dist/assets/index.ece4fb83.js | 593 ++++++++++++++++++ frontend/dist/index.html | 4 + frontend/src/app/App.tsx | 5 - frontend/src/app/socketio/emitters.ts | 8 +- frontend/src/app/socketio/listeners.ts | 13 +- .../common/components/ImageUploadOverlay.tsx | 1 - frontend/src/features/canvas/IAICanvas.tsx | 109 +--- ...oxPreview.tsx => IAICanvasBoundingBox.tsx} | 15 +- .../canvas/IAICanvasBrushButtonPopover.tsx | 1 - .../src/features/canvas/IAICanvasControls.tsx | 12 +- .../canvas/IAICanvasIntermediateImage.tsx | 2 +- .../canvas/IAICanvasMaskCompositer.tsx | 11 +- ...bjects.tsx => IAICanvasObjectRenderer.tsx} | 21 +- .../src/features/canvas/IAICanvasResizer.tsx | 19 +- frontend/src/features/canvas/canvasSlice.ts | 45 +- .../features/canvas/hooks/useCanvasHotkeys.ts | 20 +- .../canvas/hooks/useCanvasMouseOut.ts | 1 - .../features/gallery/CurrentImageButtons.tsx | 2 +- .../features/gallery/CurrentImagePreview.tsx | 2 +- .../BoundingBoxDarkenOutside.tsx | 2 +- .../BoundingBoxDimensionSlider.tsx | 6 +- .../BoundingBoxSettings/BoundingBoxLock.tsx | 5 +- .../BoundingBoxVisibility.tsx | 5 +- .../Inpainting/InpaintReplace.tsx | 6 +- .../tabs/ImageToImage/InitImagePreview.tsx | 1 - .../tabs/Inpainting/InpaintingDisplay.tsx | 21 +- frontend/src/features/tabs/InvokeTabs.tsx | 7 +- frontend/src/features/tabs/InvokeWorkarea.tsx | 2 - .../tabs/Outpainting/OutpaintingDisplay.tsx | 17 +- 31 files changed, 715 insertions(+), 762 deletions(-) delete mode 100644 frontend/dist/assets/index.a06633cf.js create mode 100644 frontend/dist/assets/index.ece4fb83.js rename frontend/src/features/canvas/{IAICanvasBoundingBoxPreview.tsx => IAICanvasBoundingBox.tsx} (97%) rename frontend/src/features/canvas/{IAICanvasOutpaintingObjects.tsx => IAICanvasObjectRenderer.tsx} (76%) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 93f19bb8fa..91af9ed17f 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -698,22 +698,24 @@ class InvokeAIWebServer: So we need to convert each into a PIL Image. """ - init_img_url = generation_parameters["init_img"] truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] init_img_url = generation_parameters["init_img"] + init_img_url = generation_parameters["init_img"] + init_img_path = self.get_image_path_from_url(init_img_url) original_image = Image.open(init_img_path) rgba_image = original_image.convert("RGBA") - # copy a region from it which we will inpaint cropped_init_image = copy_image_from_bounding_box( rgba_image, **generation_parameters["bounding_box"] ) + original_bounding_box = generation_parameters["bounding_box"].copy() + generation_parameters["init_img"] = cropped_init_image # Convert mask dataURL to an image and convert to greyscale diff --git a/frontend/dist/assets/index.a06633cf.js b/frontend/dist/assets/index.a06633cf.js deleted file mode 100644 index a72f56d09a..0000000000 --- a/frontend/dist/assets/index.a06633cf.js +++ /dev/null @@ -1,515 +0,0 @@ -function Hq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Kt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Sv=Symbol.for("react.element"),Vq=Symbol.for("react.portal"),Uq=Symbol.for("react.fragment"),jq=Symbol.for("react.strict_mode"),Gq=Symbol.for("react.profiler"),qq=Symbol.for("react.provider"),Kq=Symbol.for("react.context"),Yq=Symbol.for("react.forward_ref"),Zq=Symbol.for("react.suspense"),Xq=Symbol.for("react.memo"),Qq=Symbol.for("react.lazy"),eE=Symbol.iterator;function Jq(e){return e===null||typeof e!="object"?null:(e=eE&&e[eE]||e["@@iterator"],typeof e=="function"?e:null)}var oM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aM=Object.assign,sM={};function $0(e,t,n){this.props=e,this.context=t,this.refs=sM,this.updater=n||oM}$0.prototype.isReactComponent={};$0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lM(){}lM.prototype=$0.prototype;function I8(e,t,n){this.props=e,this.context=t,this.refs=sM,this.updater=n||oM}var M8=I8.prototype=new lM;M8.constructor=I8;aM(M8,$0.prototype);M8.isPureReactComponent=!0;var tE=Array.isArray,uM=Object.prototype.hasOwnProperty,O8={current:null},cM={key:!0,ref:!0,__self:!0,__source:!0};function dM(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)uM.call(t,r)&&!cM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=V[X];if(0>>1;Xi(He,Q))Uei(ct,He)?(V[X]=ct,V[Ue]=Q,X=Ue):(V[X]=He,V[Se]=Q,X=Se);else if(Uei(ct,Q))V[X]=ct,V[Ue]=Q,X=Ue;else break e}}return q}function i(V,q){var Q=V.sortIndex-q.sortIndex;return Q!==0?Q:V.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(V){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=V)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(V){if(w=!1,T(V),!b)if(n(l)!==null)b=!0,se(O);else{var q=n(u);q!==null&&G(I,q.startTime-V)}}function O(V,q){b=!1,w&&(w=!1,E(z),z=-1),v=!0;var Q=m;try{for(T(q),g=n(l);g!==null&&(!(g.expirationTime>q)||V&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),T(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var N=!1,D=null,z=-1,$=5,W=-1;function Y(){return!(e.unstable_now()-W<$)}function de(){if(D!==null){var V=e.unstable_now();W=V;var q=!0;try{q=D(!0,V)}finally{q?j():(N=!1,D=null)}}else N=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,re=te.port2;te.port1.onmessage=de,j=function(){re.postMessage(null)}}else j=function(){P(de,0)};function se(V){D=V,N||(N=!0,j())}function G(V,q){z=P(function(){V(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,se(O))},e.unstable_forceFrameRate=function(V){0>V||125X?(V.sortIndex=Q,t(u,V),n(l)===null&&V===n(u)&&(w?(E(z),z=-1):w=!0,G(I,Q-X))):(V.sortIndex=me,t(l,V),b||v||(b=!0,se(O))),V},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(V){var q=m;return function(){var Q=m;m=q;try{return V.apply(this,arguments)}finally{m=Q}}}})(fM);(function(e){e.exports=fM})(Gp);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hM=C.exports,sa=Gp.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R6=Object.prototype.hasOwnProperty,iK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rE={},iE={};function oK(e){return R6.call(iE,e)?!0:R6.call(rE,e)?!1:iK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function aK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sK(e,t,n,r){if(t===null||typeof t>"u"||aK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Vx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bg(e):""}function lK(e){switch(e.tag){case 5:return Bg(e.type);case 16:return Bg("Lazy");case 13:return Bg("Suspense");case 19:return Bg("SuspenseList");case 0:case 2:case 15:return e=Ux(e.type,!1),e;case 11:return e=Ux(e.type.render,!1),e;case 1:return e=Ux(e.type,!0),e;default:return""}}function B6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ip:return"Fragment";case Ap:return"Portal";case N6:return"Profiler";case B8:return"StrictMode";case D6:return"Suspense";case z6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:B6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return B6(e(t))}catch{}}return null}function uK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function V2(e){e._valueTracker||(e._valueTracker=cK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function V3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function F6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function $6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?H6(e,t.type,n):t.hasOwnProperty("defaultValue")&&H6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function H6(e,t,n){(t!=="number"||V3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fg=Array.isArray;function qp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=U2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dK=["Webkit","ms","Moz","O"];Object.keys(tm).forEach(function(e){dK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tm[t]=tm[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tm.hasOwnProperty(e)&&tm[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function U6(e,t){if(t){if(fK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function j6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var G6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q6=null,Kp=null,Yp=null;function cE(e){if(e=_v(e)){if(typeof q6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=f5(t),q6(e.stateNode,e.type,t))}}function EM(e){Kp?Yp?Yp.push(e):Yp=[e]:Kp=e}function PM(){if(Kp){var e=Kp,t=Yp;if(Yp=Kp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(CK(e)/_K|0)|0}var j2=64,G2=4194304;function $g(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function q3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=$g(s):(o&=a,o!==0&&(r=$g(o)))}else a=n&~i,a!==0?r=$g(a):o!==0&&(r=$g(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function TK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rm),bE=String.fromCharCode(32),xE=!1;function qM(e,t){switch(e){case"keyup":return nY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mp=!1;function iY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function oY(e,t){if(Mp)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),r3=G8=Fc=null,Mp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_E(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=V3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=kE(n,o);var a=kE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Op=null,J6=null,om=null,ew=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ew||Op==null||Op!==V3(r)||(r=Op,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),om&&Bm(om,r)||(om=r,r=Z3(J6,"onSelect"),0Dp||(e.current=aw[Dp],aw[Dp]=null,Dp--)}function Gn(e,t){Dp++,aw[Dp]=e.current,e.current=t}var rd={},Vi=dd(rd),To=dd(!1),Uf=rd;function S0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Lo(e){return e=e.childContextTypes,e!=null}function Q3(){Xn(To),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(To,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,uK(e)||"Unknown",i));return hr({},n,r)}function J3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,Uf=Vi.current,Gn(Vi,e),Gn(To,To.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,Uf),r.__reactInternalMemoizedMergedChildContext=e,Xn(To),Xn(Vi),Gn(Vi,e)):Xn(To),Gn(To,n)}var su=null,h5=!1,iS=!1;function uO(e){su===null?su=[e]:su.push(e)}function EY(e){h5=!0,uO(e)}function fd(){if(!iS&&su!==null){iS=!0;var e=0,t=Ln;try{var n=su;for(Ln=1;e>=a,i-=a,uu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var W=m(E,D,T[z],I);if(W===null){D===null&&(D=$);break}e&&D&&W.alternate===null&&t(E,D),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W,D=$}if(z===T.length)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(E,D,W.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(E,D),k=o(Y,k,z),N===null?O=Y:N.sibling=Y,N=Y,D=$}if(W.done)return n(E,D),rr&&vf(E,z),O;if(D===null){for(;!W.done;z++,W=T.next())W=g(E,W.value,I),W!==null&&(k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return rr&&vf(E,z),O}for(D=r(E,D);!W.done;z++,W=T.next())W=v(D,E,z,W.value,I),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?z:W.key),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return e&&D.forEach(function(de){return t(E,de)}),rr&&vf(E,z),O}function P(E,k,T,I){if(typeof T=="object"&&T!==null&&T.type===Ip&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case W2:e:{for(var O=T.key,N=k;N!==null;){if(N.key===O){if(O=T.type,O===Ip){if(N.tag===7){n(E,N.sibling),k=i(N,T.props.children),k.return=E,E=k;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===N.type){n(E,N.sibling),k=i(N,T.props),k.ref=mg(E,N,T),k.return=E,E=k;break e}n(E,N);break}else t(E,N);N=N.sibling}T.type===Ip?(k=Df(T.props.children,E.mode,I,T.key),k.return=E,E=k):(I=d3(T.type,T.key,T.props,null,E.mode,I),I.ref=mg(E,k,T),I.return=E,E=I)}return a(E);case Ap:e:{for(N=T.key;k!==null;){if(k.key===N)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(E,k.sibling),k=i(k,T.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=fS(T,E.mode,I),k.return=E,E=k}return a(E);case Pc:return N=T._init,P(E,k,N(T._payload),I)}if(Fg(T))return b(E,k,T,I);if(dg(T))return w(E,k,T,I);J2(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,T),k.return=E,E=k):(n(E,k),k=dS(T,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return P}var C0=vO(!0),yO=vO(!1),kv={},bl=dd(kv),Wm=dd(kv),Vm=dd(kv);function Af(e){if(e===kv)throw Error(Oe(174));return e}function o9(e,t){switch(Gn(Vm,t),Gn(Wm,e),Gn(bl,kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:V6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=V6(t,e)}Xn(bl),Gn(bl,t)}function _0(){Xn(bl),Xn(Wm),Xn(Vm)}function bO(e){Af(Vm.current);var t=Af(bl.current),n=V6(t,e.type);t!==n&&(Gn(Wm,e),Gn(bl,n))}function a9(e){Wm.current===e&&(Xn(bl),Xn(Wm))}var cr=dd(0);function o4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oS=[];function s9(){for(var e=0;en?n:4,e(!0);var r=aS.transition;aS.transition={};try{e(!1),t()}finally{Ln=n,aS.transition=r}}function NO(){return za().memoizedState}function AY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=io();ys(n,e,r,i),BO(n,t,r)}}function IY(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=io(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){am=a4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var s4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},MY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,s3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return s3(4194308,4,e,t)},useInsertionEffect:function(e,t){return s3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f9,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=LY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(Gf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Gm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=cu,r=uu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Um++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[Hm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=j6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iE0&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304)}else{if(!r)if(e=o4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>E0&&n!==1073741824&&(t.flags|=128,r=!0,vg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return y9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function $Y(e,t){switch(Q8(t),t.tag){case 1:return Lo(t.type)&&Q3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _0(),Xn(To),Xn(Vi),s9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a9(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));w0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return _0(),null;case 10:return n9(t.type._context),null;case 22:case 23:return y9(),null;case 24:return null;default:return null}}var ty=!1,Wi=!1,HY=typeof WeakSet=="function"?WeakSet:Set,it=null;function $p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function yw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function WY(e,t){if(tw=K3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(nw={focusedElem:e,selectionRange:n},K3=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){t=it;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,P=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}return b=QE,QE=!1,b}function sm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&yw(t,n,o)}i=i.next}while(i!==r)}}function m5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[Hm],delete t[ow],delete t[_Y],delete t[kY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=X3));else if(r!==4&&(e=e.child,e!==null))for(xw(e,t,n),e=e.sibling;e!==null;)xw(e,t,n),e=e.sibling}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}var Ti=null,fs=!1;function yc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(yl&&typeof yl.onCommitFiberUnmount=="function")try{yl.onCommitFiberUnmount(l5,n)}catch{}switch(n.tag){case 5:Wi||$p(n,t);case 6:var r=Ti,i=fs;Ti=null,yc(e,t,n),Ti=r,fs=i,Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ti.removeChild(n.stateNode));break;case 18:Ti!==null&&(fs?(e=Ti,n=n.stateNode,e.nodeType===8?rS(e.parentNode,n):e.nodeType===1&&rS(e,n),Dm(e)):rS(Ti,n.stateNode));break;case 4:r=Ti,i=fs,Ti=n.stateNode.containerInfo,fs=!0,yc(e,t,n),Ti=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&yw(n,t,a),i=i.next}while(i!==r)}yc(e,t,n);break;case 1:if(!Wi&&($p(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}yc(e,t,n);break;case 21:yc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,yc(e,t,n),Wi=r):yc(e,t,n);break;default:yc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HY),t.forEach(function(r){var i=XY.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,c4=0,(sn&6)!==0)throw Error(Oe(331));var i=sn;for(sn|=4,it=e.current;it!==null;){var o=it,a=o.child;if((it.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m9?Nf(e,0):g9|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=G2,G2<<=1,(G2&130023424)===0&&(G2=4194304)));var n=io();e=gu(e,t),e!==null&&(wv(e,t,n),Ao(e,n))}function ZY(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function XY(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,BY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,t4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l3(e,t),e=t.pendingProps;var i=S0(t,Vi.current);Xp(t,n),i=u9(null,t,r,e,i,n);var o=c9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lo(r)?(o=!0,J3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i9(t),i.updater=p5,t.stateNode=i,i._reactInternals=t,dw(t,r,e,n),t=pw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=JY(r),e=ds(r,e),i){case 0:t=hw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),hw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),i4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=k0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=k0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(w0(),r===i){t=mu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&lw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,rw(r,i)?a=null:o!==null&&rw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&lw(t),null;case 13:return jO(e,t,n);case 4:return o9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=C0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(n4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=mu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xp(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),l3(e,t),t.tag=1,Lo(r)?(e=!0,J3(t)):e=!1,Xp(t,n),mO(t,r,i),dw(t,r,i,n),pw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function QY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new QY(e,t,n,r)}function x9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function JY(e){if(typeof e=="function")return x9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function d3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ip:return Df(n.children,i,o,t);case B8:a=8,i|=8;break;case N6:return e=Ma(12,n,t,i|2),e.elementType=N6,e.lanes=o,e;case D6:return e=Ma(13,n,t,i),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(19,n,t,i),e.elementType=z6,e.lanes=o,e;case vM:return y5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Df(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function y5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function dS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function fS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gx(0),this.expirationTimes=Gx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S9(e,t,n,r,i,o,a,s,l){return e=new eZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i9(o),e}function tZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Il);const iy=A8(Il.exports);var lP=Il.exports;O6.createRoot=lP.createRoot,O6.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,C5={exports:{}},_5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var aZ=C.exports,sZ=Symbol.for("react.element"),lZ=Symbol.for("react.fragment"),uZ=Object.prototype.hasOwnProperty,cZ=aZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dZ={key:!0,ref:!0,__self:!0,__source:!0};function fR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)uZ.call(t,r)&&!dZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:sZ,type:e,key:o,ref:a,props:i,_owner:cZ.current}}_5.Fragment=lZ;_5.jsx=fR;_5.jsxs=fR;(function(e){e.exports=_5})(C5);const Kn=C5.exports.Fragment,x=C5.exports.jsx,ee=C5.exports.jsxs,fZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Kn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var k9=C.exports.createContext({});k9.displayName="ColorModeContext";function Ev(){const e=C.exports.useContext(k9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var oy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function hZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?oy.dark:oy.light),document.body.classList.remove(r?oy.light:oy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var pZ="chakra-ui-color-mode";function gZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var mZ=gZ(pZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=mZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>hZ({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?uP:k,setColorMode:t?uP:E,forced:t!==void 0}),[P,k,E,t]);return x(k9.Provider,{value:T,children:n})}hR.displayName="ColorModeProvider";var Ew={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",k="[object Object]",T="[object Proxy]",I="[object RegExp]",O="[object Set]",N="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",re="[object Int32Array]",se="[object Uint8Array]",G="[object Uint8ClampedArray]",V="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[re]=ye[se]=ye[G]=ye[V]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[g]=ye[m]=ye[v]=ye[w]=ye[P]=ye[k]=ye[I]=ye[O]=ye[N]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,et=qe&&qe.exports===ct,tt=et&&Se.process,at=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||tt&&tt.binding&&tt.binding("util")}catch{}}(),At=at&&at.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function s1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=a1,Ro.prototype.get=Ou,Ro.prototype.has=Pd,Ro.prototype.set=s1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,mt&&Ch(pe[0],pe[1],mt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Md=zl(function(){return arguments}())?zl:function(U){return Wn(U)&&yn.call(U,"callee")&&!$e.call(U,"callee")},$l=Array.isArray;function Ht(U){return U!=null&&kh(U.length)&&!$u(U)}function _h(U){return Wn(U)&&Ht(U)}var Fu=Qt||x1;function $u(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==T}function kh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Os(U)!=k)return!1;var ne=ln(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Eh=At?dt(At):Nu;function Rd(U){return jr(U,Ph(U))}function Ph(U){return Ht(U)?v1(U,!0):Rs(U)}var un=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Th(U){return U}function x1(){return!1}e.exports=un})(Ew,Ew.exports);const ml=Ew.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function If(e,...t){return vZ(e)?e(...t):e}var vZ=e=>typeof e=="function",yZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Pw=(e,t)=>n=>{const r=String(t),i=yZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Km(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Pw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ay=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Km({scale:e,transform:t}),r}}var bZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:bZ(t),transform:n?Km({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function SZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function wZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var CZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},_Z={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function kZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var EZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",PZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},TZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},LZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),AZ=e=>e.trim();function IZ(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(AZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(LZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),MZ=(e,t)=>IZ(e,t??{});function OZ(e){return/^var\(--.+\)$/.test(e)}var RZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,on={filter(e){return e!=="auto"?e:CZ},backdropFilter(e){return e!=="auto"?e:_Z},ring(e){return kZ(on.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?SZ():e==="auto-gpu"?wZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=RZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(OZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:MZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=EZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},oe={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",on.px),space:as("space",ay(on.vh,on.px)),spaceT:as("space",ay(on.vh,on.px)),degreeT(e){return{property:e,transform:on.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Km({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ay(on.vh,on.px)),sizesT:as("sizes",ay(on.vh,on.fraction)),shadows:as("shadows"),logical:xZ,blur:as("blur",on.blur)},f3={background:oe.colors("background"),backgroundColor:oe.colors("backgroundColor"),backgroundImage:oe.propT("backgroundImage",on.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:on.bgClip},bgSize:oe.prop("backgroundSize"),bgPosition:oe.prop("backgroundPosition"),bg:oe.colors("background"),bgColor:oe.colors("backgroundColor"),bgPos:oe.prop("backgroundPosition"),bgRepeat:oe.prop("backgroundRepeat"),bgAttachment:oe.prop("backgroundAttachment"),bgGradient:oe.propT("backgroundImage",on.gradient),bgClip:{transform:on.bgClip}};Object.assign(f3,{bgImage:f3.backgroundImage,bgImg:f3.backgroundImage});var pn={border:oe.borders("border"),borderWidth:oe.borderWidths("borderWidth"),borderStyle:oe.borderStyles("borderStyle"),borderColor:oe.colors("borderColor"),borderRadius:oe.radii("borderRadius"),borderTop:oe.borders("borderTop"),borderBlockStart:oe.borders("borderBlockStart"),borderTopLeftRadius:oe.radii("borderTopLeftRadius"),borderStartStartRadius:oe.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:oe.radii("borderTopRightRadius"),borderStartEndRadius:oe.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:oe.borders("borderRight"),borderInlineEnd:oe.borders("borderInlineEnd"),borderBottom:oe.borders("borderBottom"),borderBlockEnd:oe.borders("borderBlockEnd"),borderBottomLeftRadius:oe.radii("borderBottomLeftRadius"),borderBottomRightRadius:oe.radii("borderBottomRightRadius"),borderLeft:oe.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:oe.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:oe.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:oe.borders(["borderLeft","borderRight"]),borderInline:oe.borders("borderInline"),borderY:oe.borders(["borderTop","borderBottom"]),borderBlock:oe.borders("borderBlock"),borderTopWidth:oe.borderWidths("borderTopWidth"),borderBlockStartWidth:oe.borderWidths("borderBlockStartWidth"),borderTopColor:oe.colors("borderTopColor"),borderBlockStartColor:oe.colors("borderBlockStartColor"),borderTopStyle:oe.borderStyles("borderTopStyle"),borderBlockStartStyle:oe.borderStyles("borderBlockStartStyle"),borderBottomWidth:oe.borderWidths("borderBottomWidth"),borderBlockEndWidth:oe.borderWidths("borderBlockEndWidth"),borderBottomColor:oe.colors("borderBottomColor"),borderBlockEndColor:oe.colors("borderBlockEndColor"),borderBottomStyle:oe.borderStyles("borderBottomStyle"),borderBlockEndStyle:oe.borderStyles("borderBlockEndStyle"),borderLeftWidth:oe.borderWidths("borderLeftWidth"),borderInlineStartWidth:oe.borderWidths("borderInlineStartWidth"),borderLeftColor:oe.colors("borderLeftColor"),borderInlineStartColor:oe.colors("borderInlineStartColor"),borderLeftStyle:oe.borderStyles("borderLeftStyle"),borderInlineStartStyle:oe.borderStyles("borderInlineStartStyle"),borderRightWidth:oe.borderWidths("borderRightWidth"),borderInlineEndWidth:oe.borderWidths("borderInlineEndWidth"),borderRightColor:oe.colors("borderRightColor"),borderInlineEndColor:oe.colors("borderInlineEndColor"),borderRightStyle:oe.borderStyles("borderRightStyle"),borderInlineEndStyle:oe.borderStyles("borderInlineEndStyle"),borderTopRadius:oe.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:oe.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:oe.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:oe.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var NZ={color:oe.colors("color"),textColor:oe.colors("color"),fill:oe.colors("fill"),stroke:oe.colors("stroke")},Lw={boxShadow:oe.shadows("boxShadow"),mixBlendMode:!0,blendMode:oe.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:oe.prop("backgroundBlendMode"),opacity:!0};Object.assign(Lw,{shadow:Lw.boxShadow});var DZ={filter:{transform:on.filter},blur:oe.blur("--chakra-blur"),brightness:oe.propT("--chakra-brightness",on.brightness),contrast:oe.propT("--chakra-contrast",on.contrast),hueRotate:oe.degreeT("--chakra-hue-rotate"),invert:oe.propT("--chakra-invert",on.invert),saturate:oe.propT("--chakra-saturate",on.saturate),dropShadow:oe.propT("--chakra-drop-shadow",on.dropShadow),backdropFilter:{transform:on.backdropFilter},backdropBlur:oe.blur("--chakra-backdrop-blur"),backdropBrightness:oe.propT("--chakra-backdrop-brightness",on.brightness),backdropContrast:oe.propT("--chakra-backdrop-contrast",on.contrast),backdropHueRotate:oe.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:oe.propT("--chakra-backdrop-invert",on.invert),backdropSaturate:oe.propT("--chakra-backdrop-saturate",on.saturate)},h4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:on.flexDirection},experimental_spaceX:{static:PZ,transform:Km({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:TZ,transform:Km({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:oe.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:oe.space("gap"),rowGap:oe.space("rowGap"),columnGap:oe.space("columnGap")};Object.assign(h4,{flexDir:h4.flexDirection});var yR={gridGap:oe.space("gridGap"),gridColumnGap:oe.space("gridColumnGap"),gridRowGap:oe.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},zZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:on.outline},outlineOffset:!0,outlineColor:oe.colors("outlineColor")},Ea={width:oe.sizesT("width"),inlineSize:oe.sizesT("inlineSize"),height:oe.sizes("height"),blockSize:oe.sizes("blockSize"),boxSize:oe.sizes(["width","height"]),minWidth:oe.sizes("minWidth"),minInlineSize:oe.sizes("minInlineSize"),minHeight:oe.sizes("minHeight"),minBlockSize:oe.sizes("minBlockSize"),maxWidth:oe.sizes("maxWidth"),maxInlineSize:oe.sizes("maxInlineSize"),maxHeight:oe.sizes("maxHeight"),maxBlockSize:oe.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:oe.propT("float",on.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var BZ={listStyleType:!0,listStylePosition:!0,listStylePos:oe.prop("listStylePosition"),listStyleImage:!0,listStyleImg:oe.prop("listStyleImage")};function FZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},HZ=$Z(FZ),WZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},VZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},hS=(e,t,n)=>{const r={},i=HZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},UZ={srOnly:{transform(e){return e===!0?WZ:e==="focusable"?VZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>hS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>hS(t,e,n)}},cm={position:!0,pos:oe.prop("position"),zIndex:oe.prop("zIndex","zIndices"),inset:oe.spaceT("inset"),insetX:oe.spaceT(["left","right"]),insetInline:oe.spaceT("insetInline"),insetY:oe.spaceT(["top","bottom"]),insetBlock:oe.spaceT("insetBlock"),top:oe.spaceT("top"),insetBlockStart:oe.spaceT("insetBlockStart"),bottom:oe.spaceT("bottom"),insetBlockEnd:oe.spaceT("insetBlockEnd"),left:oe.spaceT("left"),insetInlineStart:oe.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:oe.spaceT("right"),insetInlineEnd:oe.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(cm,{insetStart:cm.insetInlineStart,insetEnd:cm.insetInlineEnd});var jZ={ring:{transform:on.ring},ringColor:oe.colors("--chakra-ring-color"),ringOffset:oe.prop("--chakra-ring-offset-width"),ringOffsetColor:oe.colors("--chakra-ring-offset-color"),ringInset:oe.prop("--chakra-ring-inset")},Zn={margin:oe.spaceT("margin"),marginTop:oe.spaceT("marginTop"),marginBlockStart:oe.spaceT("marginBlockStart"),marginRight:oe.spaceT("marginRight"),marginInlineEnd:oe.spaceT("marginInlineEnd"),marginBottom:oe.spaceT("marginBottom"),marginBlockEnd:oe.spaceT("marginBlockEnd"),marginLeft:oe.spaceT("marginLeft"),marginInlineStart:oe.spaceT("marginInlineStart"),marginX:oe.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:oe.spaceT("marginInline"),marginY:oe.spaceT(["marginTop","marginBottom"]),marginBlock:oe.spaceT("marginBlock"),padding:oe.space("padding"),paddingTop:oe.space("paddingTop"),paddingBlockStart:oe.space("paddingBlockStart"),paddingRight:oe.space("paddingRight"),paddingBottom:oe.space("paddingBottom"),paddingBlockEnd:oe.space("paddingBlockEnd"),paddingLeft:oe.space("paddingLeft"),paddingInlineStart:oe.space("paddingInlineStart"),paddingInlineEnd:oe.space("paddingInlineEnd"),paddingX:oe.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:oe.space("paddingInline"),paddingY:oe.space(["paddingTop","paddingBottom"]),paddingBlock:oe.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var GZ={textDecorationColor:oe.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:oe.shadows("textShadow")},qZ={clipPath:!0,transform:oe.propT("transform",on.transform),transformOrigin:!0,translateX:oe.spaceT("--chakra-translate-x"),translateY:oe.spaceT("--chakra-translate-y"),skewX:oe.degreeT("--chakra-skew-x"),skewY:oe.degreeT("--chakra-skew-y"),scaleX:oe.prop("--chakra-scale-x"),scaleY:oe.prop("--chakra-scale-y"),scale:oe.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:oe.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:oe.prop("transitionDuration","transition.duration"),transitionProperty:oe.prop("transitionProperty","transition.property"),transitionTimingFunction:oe.prop("transitionTimingFunction","transition.easing")},YZ={fontFamily:oe.prop("fontFamily","fonts"),fontSize:oe.prop("fontSize","fontSizes",on.px),fontWeight:oe.prop("fontWeight","fontWeights"),lineHeight:oe.prop("lineHeight","lineHeights"),letterSpacing:oe.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:oe.spaceT("scrollMargin"),scrollMarginTop:oe.spaceT("scrollMarginTop"),scrollMarginBottom:oe.spaceT("scrollMarginBottom"),scrollMarginLeft:oe.spaceT("scrollMarginLeft"),scrollMarginRight:oe.spaceT("scrollMarginRight"),scrollMarginX:oe.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:oe.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:oe.spaceT("scrollPadding"),scrollPaddingTop:oe.spaceT("scrollPaddingTop"),scrollPaddingBottom:oe.spaceT("scrollPaddingBottom"),scrollPaddingLeft:oe.spaceT("scrollPaddingLeft"),scrollPaddingRight:oe.spaceT("scrollPaddingRight"),scrollPaddingX:oe.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:oe.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var k5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${k5("+",...e)})`,hP=(...e)=>`calc(${k5("-",...e)})`,Aw=(...e)=>`calc(${k5("*",...e)})`,pP=(...e)=>`calc(${k5("/",...e)})`,gP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Aw(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(fP(e,...t)),subtract:(...t)=>_f(hP(e,...t)),multiply:(...t)=>_f(Aw(e,...t)),divide:(...t)=>_f(pP(e,...t)),negate:()=>_f(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Aw,divide:pP,negate:gP});function XZ(e,t="-"){return e.replace(/\s+/g,t)}function QZ(e){const t=XZ(e.toString());return eX(JZ(t))}function JZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function eX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function tX(e,t=""){return[t,e].filter(Boolean).join("-")}function nX(e,t){return`var(${e}${t?`, ${t}`:""})`}function rX(e,t=""){return QZ(`--${tX(e,t)}`)}function ei(e,t,n){const r=rX(e,n);return{variable:r,reference:nX(r,t)}}function iX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function oX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Iw(e){if(e==null)return e;const{unitless:t}=oX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E9=e=>Object.fromEntries(Object.entries(e).sort(xR));function mP(e){const t=E9(e);return Object.assign(Object.values(t),t)}function aX(e){const t=Object.keys(E9(e));return new Set(t)}function vP(e){if(!e)return e;e=Iw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Wg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Iw(e)})`),t&&n.push("and",`(max-width: ${Iw(t)})`),n.join(" ")}function sX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Wg(null,u),minWQuery:Wg(a),minMaxQuery:Wg(a,u)}}),r=aX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:E9(e),asArray:mP(e),details:n,media:[null,...t.map(o=>Wg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;iX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),eu=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),E5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:eu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:eu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:eu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:eu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:eu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:eu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:eu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:eu(Ci.focusWithin),_peerPlaceholderShown:eu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},lX=Object.keys(E5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function uX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:P}=yP(b,t?.cssVarPrefix);return P},g=xs(s)?s:{default:s};n=ml(n,Object.entries(g).reduce((m,[v,b])=>{var w;const P=h(b);if(v==="default")return m[l]=P,m;const E=((w=E5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function cX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var fX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function hX(e){return dX(e,fX)}function pX(e){return e.semanticTokens}function gX(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function mX({tokens:e,semanticTokens:t}){const n=Object.entries(Mw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Mw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Mw(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Mw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function vX(e){var t;const n=gX(e),r=hX(n),i=pX(n),o=mX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=uX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:sX(n.breakpoints)}),n}var P9=ml({},f3,pn,NZ,h4,Ea,DZ,jZ,zZ,yR,UZ,cm,Lw,Zn,ZZ,YZ,GZ,qZ,BZ,KZ),yX=Object.assign({},Zn,Ea,h4,yR,cm),bX=Object.keys(yX),xX=[...Object.keys(P9),...lX],SX={...P9,...E5},wX=e=>e in SX,CX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=If(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!kX(t),PX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=_X(t);return t=n(i)??r(o)??r(t),t};function TX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=If(o,r),u=CX(l)(r);let h={};for(let g in u){const m=u[g];let v=If(m,r);g in n&&(g=n[g]),EX(g,v)&&(v=PX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=ml({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const P=If(b?.property,r);if(!a&&b?.static){const E=If(b.static,r);h=ml({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&xs(w)?h=ml({},h,w):h[P]=w;continue}if(xs(w)){h=ml({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>TX({theme:t,pseudos:E5,configs:P9})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function LX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function AX(e,t){for(let n=t+1;n{ml(u,{[T]:m?k[T]:{[E]:k[T]}})});continue}if(!v){m?ml(u,k):u[E]=k;continue}u[E]=k}}return u}}function MX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IX(i);return ml({},If(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function OX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return cX(e,["styleConfig","size","variant","colorScheme"])}function RX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Li(V0,--Oo):0,P0--,$r===10&&(P0=1,T5--),$r}function ia(){return $r=Oo2||Zm($r)>3?"":" "}function GX(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Pv(e,h3()+(t<6&&xl()==32&&ia()==32))}function Rw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Rw($r);break;case 40:e===41&&Rw(e);break;case 92:ia();break}return Oo}function qX(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Pv(t,Oo-1)+"*"+P5(e===47?e:ia())}function KX(e){for(;!Zm(xl());)ia();return Pv(e,Oo)}function YX(e){return TR(g3("",null,null,null,[""],e=PR(e),0,[0],e))}function g3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,P=1,E=1,k=0,T="",I=i,O=o,N=r,D=T;P;)switch(b=k,k=ia()){case 40:if(b!=108&&Li(D,g-1)==58){Ow(D+=wn(p3(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=p3(k);break;case 9:case 10:case 13:case 32:D+=jX(b);break;case 92:D+=GX(h3()-1,7);continue;case 47:switch(xl()){case 42:case 47:sy(ZX(qX(ia(),h3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:P=0;case 59+h:v>0&&cl(D)-g&&sy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(sy(N=bP(D,t,n,u,h,i,s,T,I=[],O=[],g),o),k===123)if(h===0)g3(D,t,N,N,I,o,g,s,O);else switch(m===99&&Li(D,3)===110?100:m){case 100:case 109:case 115:g3(e,N,N,r&&sy(bP(e,N,N,0,0,i,s,T,i,I=[],g),O),i,O,g,s,r?I:O);break;default:g3(D,N,N,N,[""],O,0,s,O)}}u=h=v=0,w=E=1,T=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&UX()==125)continue}switch(D+=P5(k),k*w){case 38:E=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*E,E=1;break;case 64:xl()===45&&(D+=p3(ia())),m=xl(),h=g=cl(T=D+=KX(h3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A9(m),b=0,w=0,P=0;b0?m[E]+" "+k:wn(k,/&\f/g,m[E])))&&(l[P++]=T);return L5(e,t,n,i===0?T9:s,l,u,h)}function ZX(e,t,n){return L5(e,t,n,CR,P5(VX()),Ym(e,2,-2),0)}function xP(e,t,n,r){return L5(e,t,n,L9,Ym(e,0,r),Ym(e,r+1,-1),r)}function Jp(e,t){for(var n="",r=A9(e),i=0;i6)switch(Li(e,t+1)){case 109:if(Li(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+p4+(Li(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ow(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Li(e,t+1)!==115)break;case 6444:switch(Li(e,cl(e)-3-(~Ow(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Li(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Li(e,t+11)){case 114:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+$i+e+e}return e}var oQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L9:t.return=AR(t.value,t.length);break;case _R:return Jp([bg(t,{value:wn(t.value,"@","@"+gn)})],i);case T9:if(t.length)return WX(t.props,function(o){switch(HX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jp([bg(t,{props:[wn(o,/:(read-\w+)/,":"+p4+"$1")]})],i);case"::placeholder":return Jp([bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,":"+p4+"$1")]}),bg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},aQ=[oQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||aQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yQ=/[A-Z]|^ms/g,bQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},pS=LR(function(e){return BR(e)?e:e.replace(yQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return vQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function Xm(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return xQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,Xm(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function zQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},jR=BQ(zQ);function GR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var qR=e=>GR(e,t=>t!=null);function FQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $Q=FQ();function KR(e,...t){return NQ(e)?e(...t):e}function HQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function WQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var VQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,UQ=LR(function(e){return VQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jQ=UQ,GQ=function(t){return t!=="theme"},TP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jQ:GQ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},qQ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),wQ(function(){return zR(n,r,i)}),null},KQ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||TP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZQ=In("accordion").parts("root","container","button","panel").extend("icon"),XQ=In("alert").parts("title","description","container").extend("icon","spinner"),QQ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),JQ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var eJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var tJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),nJ=In("editable").parts("preview","input","textarea"),rJ=In("form").parts("container","requiredIndicator","helperText"),iJ=In("formError").parts("text","icon"),oJ=In("input").parts("addon","field","element"),aJ=In("list").parts("container","item","icon"),sJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),lJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),uJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var cJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),dJ=In("progress").parts("label","filledTrack","track"),fJ=In("radio").parts("container","control","label"),hJ=In("select").parts("field","icon"),pJ=In("slider").parts("container","track","thumb","filledTrack","mark"),gJ=In("stat").parts("container","label","helpText","number","icon"),mJ=In("switch").parts("container","track","thumb"),vJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),yJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),bJ=In("tag").parts("container","label","closeButton");function Mi(e,t){xJ(e)&&(e="100%");var n=SJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ly(e){return Math.min(1,Math.max(0,e))}function xJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function SJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function wJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function CJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=gS(s,a,e+1/3),i=gS(s,a,e),o=gS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Bw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function TJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=IJ(e)),typeof e=="object"&&(tu(e.r)&&tu(e.g)&&tu(e.b)?(t=wJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):tu(e.h)&&tu(e.s)&&tu(e.v)?(r=uy(e.s),i=uy(e.v),t=_J(e.h,r,i),a=!0,s="hsv"):tu(e.h)&&tu(e.s)&&tu(e.l)&&(r=uy(e.s),o=uy(e.l),t=CJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var LJ="[-\\+]?\\d+%?",AJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(AJ,")|(?:").concat(LJ,")"),mS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),vS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+mS),rgba:new RegExp("rgba"+vS),hsl:new RegExp("hsl"+mS),hsla:new RegExp("hsla"+vS),hsv:new RegExp("hsv"+mS),hsva:new RegExp("hsva"+vS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function IJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Bw[e])e=Bw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function tu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Tv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=PJ(t)),this.originalInput=t;var i=TJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=YR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=IP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),MP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),kJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Bw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(ZR(e));return e.count=t,n}var r=MJ(e.hue,e.seed),i=OJ(r,e),o=RJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Tv(a)}function MJ(e,t){var n=DJ(e),r=g4(n,t);return r<0&&(r=360+r),r}function OJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return g4([0,100],t.seed);var n=XR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return g4([r,i],t.seed)}function RJ(e,t,n){var r=NJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return g4([r,i],n.seed)}function NJ(e,t){for(var n=XR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function DJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=JR.find(function(a){return a.name===e});if(n){var r=QR(n);if(r.hueRange)return r.hueRange}var i=new Tv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function XR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=JR;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function g4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function QR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var JR=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function zJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=zJ(e,`colors.${t}`,t),{isValid:i}=new Tv(r);return i?r:n},FJ=e=>t=>{const n=Ai(t,e);return new Tv(n).isDark()?"dark":"light"},$J=e=>t=>FJ(e)(t)==="dark",T0=(e,t)=>n=>{const r=Ai(n,e);return new Tv(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function HJ(e){const t=ZR().toHexString();return!e||BJ(e)?t:e.string&&e.colors?VJ(e.string,e.colors):e.string&&!e.colors?WJ(e.string):e.colors&&!e.string?UJ(e.colors):t}function WJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function VJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function jJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function eN(e){return jJ(e)&&e.reference?e.reference:String(e)}var W5=(e,...t)=>t.map(eN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${W5("+",...e)})`,DP=(...e)=>`calc(${W5("-",...e)})`,Fw=(...e)=>`calc(${W5("*",...e)})`,zP=(...e)=>`calc(${W5("/",...e)})`,BP=e=>{const t=eN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Fw(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(NP(e,...t)),subtract:(...t)=>lu(DP(e,...t)),multiply:(...t)=>lu(Fw(e,...t)),divide:(...t)=>lu(zP(e,...t)),negate:()=>lu(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:Fw,divide:zP,negate:BP});function GJ(e){return!Number.isInteger(parseFloat(e.toString()))}function qJ(e,t="-"){return e.replace(/\s+/g,t)}function tN(e){const t=qJ(e.toString());return t.includes("\\.")?e:GJ(e)?t.replace(".","\\."):e}function KJ(e,t=""){return[t,tN(e)].filter(Boolean).join("-")}function YJ(e,t){return`var(${tN(e)}${t?`, ${t}`:""})`}function ZJ(e,t=""){return`--${KJ(e,t)}`}function ji(e,t){const n=ZJ(e,t?.prefix);return{variable:n,reference:YJ(n,XJ(t?.fallback))}}function XJ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:QJ,defineMultiStyleConfig:JJ}=ir(ZQ.keys),eee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},nee={pt:"2",px:"4",pb:"5"},ree={fontSize:"1.25em"},iee=QJ({container:eee,button:tee,panel:nee,icon:ree}),oee=JJ({baseStyle:iee}),{definePartsStyle:Lv,defineMultiStyleConfig:aee}=ir(XQ.keys),oa=ei("alert-fg"),vu=ei("alert-bg"),see=Lv({container:{bg:vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z9(e){const{theme:t,colorScheme:n}=e,r=T0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var lee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark}}}}),uee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),cee=Lv(e=>{const{colorScheme:t}=e,n=z9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),dee=Lv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[vu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[vu.variable]:`colors.${t}.200`},color:oa.reference}}}),fee={subtle:lee,"left-accent":uee,"top-accent":cee,solid:dee},hee=aee({baseStyle:see,variants:fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),nN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},pee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},gee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},mee={...nN,...pee,container:gee},rN=mee,vee=e=>typeof e=="function";function fi(e,...t){return vee(e)?e(...t):e}var{definePartsStyle:iN,defineMultiStyleConfig:yee}=ir(QQ.keys),e0=ei("avatar-border-color"),yS=ei("avatar-bg"),bee={borderRadius:"full",border:"0.2em solid",[e0.variable]:"white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference},xee={[yS.variable]:"colors.gray.200",_dark:{[yS.variable]:"colors.whiteAlpha.400"},bgColor:yS.reference},FP=ei("avatar-background"),See=e=>{const{name:t,theme:n}=e,r=t?HJ({string:t}):"colors.gray.400",i=$J(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[e0.variable]:"colors.white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference,verticalAlign:"top"}},wee=iN(e=>({badge:fi(bee,e),excessLabel:fi(xee,e),container:fi(See,e)}));function xc(e){const t=e!=="100%"?rN[e]:void 0;return iN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Cee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},_ee=yee({baseStyle:wee,sizes:Cee,defaultProps:{size:"md"}}),kee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},t0=ei("badge-bg"),vl=ei("badge-color"),Eee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.500`,.6)(n);return{[t0.variable]:`colors.${t}.500`,[vl.variable]:"colors.white",_dark:{[t0.variable]:r,[vl.variable]:"colors.whiteAlpha.800"},bg:t0.reference,color:vl.reference}},Pee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.16)(n);return{[t0.variable]:`colors.${t}.100`,[vl.variable]:`colors.${t}.800`,_dark:{[t0.variable]:r,[vl.variable]:`colors.${t}.200`},bg:t0.reference,color:vl.reference}},Tee=e=>{const{colorScheme:t,theme:n}=e,r=T0(`${t}.200`,.8)(n);return{[vl.variable]:`colors.${t}.500`,_dark:{[vl.variable]:r},color:vl.reference,boxShadow:`inset 0 0 0px 1px ${vl.reference}`}},Lee={solid:Eee,subtle:Pee,outline:Tee},fm={baseStyle:kee,variants:Lee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Aee,definePartsStyle:Iee}=ir(JQ.keys),Mee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Oee=Iee({link:Mee}),Ree=Aee({baseStyle:Oee}),Nee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},oN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=T0(`${t}.200`,.12)(n),i=T0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Dee=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(oN,e)}},zee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Bee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=zee[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},Fee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},$ee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Hee={ghost:oN,outline:Dee,solid:Bee,link:Fee,unstyled:$ee},Wee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Vee={baseStyle:Nee,variants:Hee,sizes:Wee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:m3,defineMultiStyleConfig:Uee}=ir(eJ.keys),hm=ei("checkbox-size"),jee=e=>{const{colorScheme:t}=e;return{w:hm.reference,h:hm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Gee={_disabled:{cursor:"not-allowed"}},qee={userSelect:"none",_disabled:{opacity:.4}},Kee={transitionProperty:"transform",transitionDuration:"normal"},Yee=m3(e=>({icon:Kee,container:Gee,control:fi(jee,e),label:qee})),Zee={sm:m3({control:{[hm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:m3({control:{[hm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:m3({control:{[hm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},m4=Uee({baseStyle:Yee,sizes:Zee,defaultProps:{size:"md",colorScheme:"blue"}}),pm=ji("close-button-size"),xg=ji("close-button-bg"),Xee={w:[pm.reference],h:[pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[xg.variable]:"colors.blackAlpha.100",_dark:{[xg.variable]:"colors.whiteAlpha.100"}},_active:{[xg.variable]:"colors.blackAlpha.200",_dark:{[xg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:xg.reference},Qee={lg:{[pm.variable]:"sizes.10",fontSize:"md"},md:{[pm.variable]:"sizes.8",fontSize:"xs"},sm:{[pm.variable]:"sizes.6",fontSize:"2xs"}},Jee={baseStyle:Xee,sizes:Qee,defaultProps:{size:"md"}},{variants:ete,defaultProps:tte}=fm,nte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},rte={baseStyle:nte,variants:ete,defaultProps:tte},ite={w:"100%",mx:"auto",maxW:"prose",px:"4"},ote={baseStyle:ite},ate={opacity:.6,borderColor:"inherit"},ste={borderStyle:"solid"},lte={borderStyle:"dashed"},ute={solid:ste,dashed:lte},cte={baseStyle:ate,variants:ute,defaultProps:{variant:"solid"}},{definePartsStyle:$w,defineMultiStyleConfig:dte}=ir(tJ.keys),bS=ei("drawer-bg"),xS=ei("drawer-box-shadow");function gp(e){return $w(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var fte={bg:"blackAlpha.600",zIndex:"overlay"},hte={display:"flex",zIndex:"modal",justifyContent:"center"},pte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[bS.variable]:"colors.white",[xS.variable]:"shadows.lg",_dark:{[bS.variable]:"colors.gray.700",[xS.variable]:"shadows.dark-lg"},bg:bS.reference,boxShadow:xS.reference}},gte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},mte={position:"absolute",top:"2",insetEnd:"3"},vte={px:"6",py:"2",flex:"1",overflow:"auto"},yte={px:"6",py:"4"},bte=$w(e=>({overlay:fte,dialogContainer:hte,dialog:fi(pte,e),header:gte,closeButton:mte,body:vte,footer:yte})),xte={xs:gp("xs"),sm:gp("md"),md:gp("lg"),lg:gp("2xl"),xl:gp("4xl"),full:gp("full")},Ste=dte({baseStyle:bte,sizes:xte,defaultProps:{size:"xs"}}),{definePartsStyle:wte,defineMultiStyleConfig:Cte}=ir(nJ.keys),_te={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},kte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Ete={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Pte=wte({preview:_te,input:kte,textarea:Ete}),Tte=Cte({baseStyle:Pte}),{definePartsStyle:Lte,defineMultiStyleConfig:Ate}=ir(rJ.keys),n0=ei("form-control-color"),Ite={marginStart:"1",[n0.variable]:"colors.red.500",_dark:{[n0.variable]:"colors.red.300"},color:n0.reference},Mte={mt:"2",[n0.variable]:"colors.gray.600",_dark:{[n0.variable]:"colors.whiteAlpha.600"},color:n0.reference,lineHeight:"normal",fontSize:"sm"},Ote=Lte({container:{width:"100%",position:"relative"},requiredIndicator:Ite,helperText:Mte}),Rte=Ate({baseStyle:Ote}),{definePartsStyle:Nte,defineMultiStyleConfig:Dte}=ir(iJ.keys),r0=ei("form-error-color"),zte={[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Bte={marginEnd:"0.5em",[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference},Fte=Nte({text:zte,icon:Bte}),$te=Dte({baseStyle:Fte}),Hte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Wte={baseStyle:Hte},Vte={fontFamily:"heading",fontWeight:"bold"},Ute={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},jte={baseStyle:Vte,sizes:Ute,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Gte}=ir(oJ.keys),qte=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Kte={lg:du({field:Sc.lg,addon:Sc.lg}),md:du({field:Sc.md,addon:Sc.md}),sm:du({field:Sc.sm,addon:Sc.sm}),xs:du({field:Sc.xs,addon:Sc.xs})};function B9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var Yte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Zte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Xte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Qte=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Jte={outline:Yte,filled:Zte,flushed:Xte,unstyled:Qte},mn=Gte({baseStyle:qte,sizes:Kte,variants:Jte,defaultProps:{size:"md",variant:"outline"}}),ene=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),tne={baseStyle:ene},nne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},rne={baseStyle:nne},{defineMultiStyleConfig:ine,definePartsStyle:one}=ir(aJ.keys),ane={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},sne=one({icon:ane}),lne=ine({baseStyle:sne}),{defineMultiStyleConfig:une,definePartsStyle:cne}=ir(sJ.keys),dne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),hne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},pne={opacity:.6},gne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},mne={transitionProperty:"common",transitionDuration:"normal"},vne=cne(e=>({button:mne,list:fi(dne,e),item:fi(fne,e),groupTitle:hne,command:pne,divider:gne})),yne=une({baseStyle:vne}),{defineMultiStyleConfig:bne,definePartsStyle:Hw}=ir(lJ.keys),xne={bg:"blackAlpha.600",zIndex:"modal"},Sne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},wne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Cne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_ne={position:"absolute",top:"2",insetEnd:"3"},kne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ene={px:"6",py:"4"},Pne=Hw(e=>({overlay:xne,dialogContainer:fi(Sne,e),dialog:fi(wne,e),header:Cne,closeButton:_ne,body:fi(kne,e),footer:Ene}));function ss(e){return Hw(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Tne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Lne=bne({baseStyle:Pne,sizes:Tne,defaultProps:{size:"md"}}),Ane={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},aN=Ane,{defineMultiStyleConfig:Ine,definePartsStyle:sN}=ir(uJ.keys),F9=ji("number-input-stepper-width"),lN=ji("number-input-input-padding"),Mne=lu(F9).add("0.5rem").toString(),One={[F9.variable]:"sizes.6",[lN.variable]:Mne},Rne=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},Nne={width:[F9.reference]},Dne=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),zne=sN(e=>({root:One,field:fi(Rne,e)??{},stepperGroup:Nne,stepper:fi(Dne,e)??{}}));function cy(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=aN.fontSizes[o];return sN({field:{...r.field,paddingInlineEnd:lN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Bne={xs:cy("xs"),sm:cy("sm"),md:cy("md"),lg:cy("lg")},Fne=Ine({baseStyle:zne,sizes:Bne,variants:mn.variants,defaultProps:mn.defaultProps}),$P,$ne={...($P=mn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Hne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HP,Wne={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=mn.variants)==null?void 0:HP.unstyled.field)??{}},Vne={baseStyle:$ne,sizes:Hne,variants:Wne,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Une,definePartsStyle:jne}=ir(cJ.keys),dy=ji("popper-bg"),Gne=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),qne={zIndex:10},Kne={[dy.variable]:"colors.white",bg:dy.reference,[Gne.variable]:dy.reference,[WP.variable]:"colors.gray.200",_dark:{[dy.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Yne={px:3,py:2,borderBottomWidth:"1px"},Zne={px:3,py:2},Xne={px:3,py:2,borderTopWidth:"1px"},Qne={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Jne=jne({popper:qne,content:Kne,header:Yne,body:Zne,footer:Xne,closeButton:Qne}),ere=Une({baseStyle:Jne}),{defineMultiStyleConfig:tre,definePartsStyle:Vg}=ir(dJ.keys),nre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ai(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},rre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ire=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),ore=e=>({transitionProperty:"common",transitionDuration:"slow",...nre(e)}),are=Vg(e=>({label:rre,filledTrack:ore(e),track:ire(e)})),sre={xs:Vg({track:{h:"1"}}),sm:Vg({track:{h:"2"}}),md:Vg({track:{h:"3"}}),lg:Vg({track:{h:"4"}})},lre=tre({sizes:sre,baseStyle:are,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ure,definePartsStyle:v3}=ir(fJ.keys),cre=e=>{var t;const n=(t=fi(m4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},dre=v3(e=>{var t,n,r,i;return{label:(n=(t=m4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=m4).baseStyle)==null?void 0:i.call(r,e).container,control:cre(e)}}),fre={md:v3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:v3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:v3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},hre=ure({baseStyle:dre,sizes:fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:pre,definePartsStyle:gre}=ir(hJ.keys),mre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},vre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},yre=gre(e=>({field:mre(e),icon:vre})),fy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,bre={lg:{...(VP=mn.sizes)==null?void 0:VP.lg,field:{...(UP=mn.sizes)==null?void 0:UP.lg.field,...fy}},md:{...(jP=mn.sizes)==null?void 0:jP.md,field:{...(GP=mn.sizes)==null?void 0:GP.md.field,...fy}},sm:{...(qP=mn.sizes)==null?void 0:qP.sm,field:{...(KP=mn.sizes)==null?void 0:KP.sm.field,...fy}},xs:{...(YP=mn.sizes)==null?void 0:YP.xs,field:{...(ZP=mn.sizes)==null?void 0:ZP.xs.field,...fy},icon:{insetEnd:"1"}}},xre=pre({baseStyle:yre,sizes:bre,variants:mn.variants,defaultProps:mn.defaultProps}),Sre=ei("skeleton-start-color"),wre=ei("skeleton-end-color"),Cre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Sre.variable]:a,[wre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},_re={baseStyle:Cre},SS=ei("skip-link-bg"),kre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[SS.variable]:"colors.white",_dark:{[SS.variable]:"colors.gray.700"},bg:SS.reference}},Ere={baseStyle:kre},{defineMultiStyleConfig:Pre,definePartsStyle:V5}=ir(pJ.keys),ev=ei("slider-thumb-size"),tv=ei("slider-track-size"),Mc=ei("slider-bg"),Tre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Lre=e=>({...D9({orientation:e.orientation,horizontal:{h:tv.reference},vertical:{w:tv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Are=e=>{const{orientation:t}=e;return{...D9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ev.reference,h:ev.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Ire=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Mre=V5(e=>({container:Tre(e),track:Lre(e),thumb:Are(e),filledTrack:Ire(e)})),Ore=V5({container:{[ev.variable]:"sizes.4",[tv.variable]:"sizes.1"}}),Rre=V5({container:{[ev.variable]:"sizes.3.5",[tv.variable]:"sizes.1"}}),Nre=V5({container:{[ev.variable]:"sizes.2.5",[tv.variable]:"sizes.0.5"}}),Dre={lg:Ore,md:Rre,sm:Nre},zre=Pre({baseStyle:Mre,sizes:Dre,defaultProps:{size:"md",colorScheme:"blue"}}),kf=ji("spinner-size"),Bre={width:[kf.reference],height:[kf.reference]},Fre={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},$re={baseStyle:Bre,sizes:Fre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Hre,definePartsStyle:uN}=ir(gJ.keys),Wre={fontWeight:"medium"},Vre={opacity:.8,marginBottom:"2"},Ure={verticalAlign:"baseline",fontWeight:"semibold"},jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Gre=uN({container:{},label:Wre,helpText:Vre,number:Ure,icon:jre}),qre={md:uN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Kre=Hre({baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Yre,definePartsStyle:y3}=ir(mJ.keys),gm=ji("switch-track-width"),zf=ji("switch-track-height"),wS=ji("switch-track-diff"),Zre=lu.subtract(gm,zf),Ww=ji("switch-thumb-x"),Sg=ji("switch-bg"),Xre=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[gm.reference],height:[zf.reference],transitionProperty:"common",transitionDuration:"fast",[Sg.variable]:"colors.gray.300",_dark:{[Sg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Sg.variable]:`colors.${t}.500`,_dark:{[Sg.variable]:`colors.${t}.200`}},bg:Sg.reference}},Qre={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[zf.reference],height:[zf.reference],_checked:{transform:`translateX(${Ww.reference})`}},Jre=y3(e=>({container:{[wS.variable]:Zre,[Ww.variable]:wS.reference,_rtl:{[Ww.variable]:lu(wS).negate().toString()}},track:Xre(e),thumb:Qre})),eie={sm:y3({container:{[gm.variable]:"1.375rem",[zf.variable]:"sizes.3"}}),md:y3({container:{[gm.variable]:"1.875rem",[zf.variable]:"sizes.4"}}),lg:y3({container:{[gm.variable]:"2.875rem",[zf.variable]:"sizes.6"}})},tie=Yre({baseStyle:Jre,sizes:eie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nie,definePartsStyle:i0}=ir(vJ.keys),rie=i0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),v4={"&[data-is-numeric=true]":{textAlign:"end"}},iie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),oie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),aie={simple:iie,striped:oie,unstyled:{}},sie={sm:i0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:i0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:i0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},lie=nie({baseStyle:rie,variants:aie,sizes:sie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:uie,definePartsStyle:Sl}=ir(yJ.keys),cie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},die=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},hie={p:4},pie=Sl(e=>({root:cie(e),tab:die(e),tablist:fie(e),tabpanel:hie})),gie={sm:Sl({tab:{py:1,px:4,fontSize:"sm"}}),md:Sl({tab:{fontSize:"md",py:2,px:4}}),lg:Sl({tab:{fontSize:"lg",py:3,px:4}})},mie=Sl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),vie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),yie=Sl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),bie=Sl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),xie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),Sie=Sl({}),wie={line:mie,enclosed:vie,"enclosed-colored":yie,"soft-rounded":bie,"solid-rounded":xie,unstyled:Sie},Cie=uie({baseStyle:pie,sizes:gie,variants:wie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:_ie,definePartsStyle:Bf}=ir(bJ.keys),kie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Eie={lineHeight:1.2,overflow:"visible"},Pie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Tie=Bf({container:kie,label:Eie,closeButton:Pie}),Lie={sm:Bf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Bf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Bf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Aie={subtle:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.subtle(e)}}),solid:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.solid(e)}}),outline:Bf(e=>{var t;return{container:(t=fm.variants)==null?void 0:t.outline(e)}})},Iie=_ie({variants:Aie,baseStyle:Tie,sizes:Lie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,Mie={...(XP=mn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Oie={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eT,tT,nT,Rie={xs:((JP=mn.sizes)==null?void 0:JP.xs.field)??{},sm:((eT=mn.sizes)==null?void 0:eT.sm.field)??{},md:((tT=mn.sizes)==null?void 0:tT.md.field)??{},lg:((nT=mn.sizes)==null?void 0:nT.lg.field)??{}},Nie={baseStyle:Mie,sizes:Rie,variants:Oie,defaultProps:{size:"md",variant:"outline"}},hy=ji("tooltip-bg"),CS=ji("tooltip-fg"),Die=ji("popper-arrow-bg"),zie={bg:hy.reference,color:CS.reference,[hy.variable]:"colors.gray.700",[CS.variable]:"colors.whiteAlpha.900",_dark:{[hy.variable]:"colors.gray.300",[CS.variable]:"colors.gray.900"},[Die.variable]:hy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Bie={baseStyle:zie},Fie={Accordion:oee,Alert:hee,Avatar:_ee,Badge:fm,Breadcrumb:Ree,Button:Vee,Checkbox:m4,CloseButton:Jee,Code:rte,Container:ote,Divider:cte,Drawer:Ste,Editable:Tte,Form:Rte,FormError:$te,FormLabel:Wte,Heading:jte,Input:mn,Kbd:tne,Link:rne,List:lne,Menu:yne,Modal:Lne,NumberInput:Fne,PinInput:Vne,Popover:ere,Progress:lre,Radio:hre,Select:xre,Skeleton:_re,SkipLink:Ere,Slider:zre,Spinner:$re,Stat:Kre,Switch:tie,Table:lie,Tabs:Cie,Tag:Iie,Textarea:Nie,Tooltip:Bie},$ie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Hie=$ie,Wie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Vie=Wie,Uie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},jie=Uie,Gie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},qie=Gie,Kie={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Yie=Kie,Zie={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Xie={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Qie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Jie={property:Zie,easing:Xie,duration:Qie},eoe=Jie,toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},noe=toe,roe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ioe=roe,ooe={breakpoints:Vie,zIndices:noe,radii:qie,blur:ioe,colors:jie,...aN,sizes:rN,shadows:Yie,space:nN,borders:Hie,transition:eoe},aoe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},soe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},loe="ltr",uoe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},coe={semanticTokens:aoe,direction:loe,...ooe,components:Fie,styles:soe,config:uoe},doe=typeof Element<"u",foe=typeof Map=="function",hoe=typeof Set=="function",poe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!b3(e[r],t[r]))return!1;return!0}var o;if(foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!b3(r.value[1],t.get(r.value[0])))return!1;return!0}if(hoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(poe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(doe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!b3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var goe=function(t,n){try{return b3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function U0(){const e=C.exports.useContext(Qm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function cN(){const e=Ev(),t=U0();return{...e,theme:t}}function moe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function yoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return moe(o,l,a[u]??l);const h=`${e}.${l}`;return voe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function boe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>vX(n),[n]);return ee(EQ,{theme:i,children:[x(xoe,{root:t}),r]})}function xoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x($5,{styles:n=>({[t]:n.__cssVars})})}WQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Soe(){const{colorMode:e}=Ev();return x($5,{styles:t=>{const n=jR(t,"styles.global"),r=KR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var woe=new Set([...xX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Coe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function _oe(e){return Coe.has(e)||!woe.has(e)}var koe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=GR(a,(g,m)=>wX(m)),l=KR(e,t),u=Object.assign({},i,l,qR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function _S(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=_oe);const i=koe({baseStyle:n}),o=zw(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:g}=Ev();return le.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function dN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=cN(),a=e?jR(i,`components.${e}`):void 0,s=n||a,l=ml({theme:i,colorMode:o},s?.defaultProps??{},qR(DQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=MX(s)(l);goe(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return dN(e,t)}function Ri(e,t={}){return dN(e,t)}function Eoe(){const e=new Map;return new Proxy(_S,{apply(t,n,r){return _S(...r)},get(t,n){return e.has(n)||e.set(n,_S(n)),e.get(n)}})}var we=Eoe();function Poe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Poe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Toe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Toe(n,t)})}}function Loe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Aoe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Vw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,y4=e=>e,Ioe=class{descendants=new Map;register=e=>{if(e!=null)return Aoe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=iT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=oT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=rT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Moe(){const e=C.exports.useRef(new Ioe);return Vw(()=>()=>e.current.destroy()),e.current}var[Ooe,fN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Roe(e){const t=fN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Vw(()=>()=>{!i.current||t.unregister(i.current)},[]),Vw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=y4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function hN(){return[y4(Ooe),()=>y4(fN()),()=>Moe(),i=>Roe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??aT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const b=a??aT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function lt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function U5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $9=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),j5=C.exports.createContext({});function Noe(){return C.exports.useContext(j5).visualElement}const j0=C.exports.createContext(null),nh=typeof document<"u",b4=nh?C.exports.useLayoutEffect:C.exports.useEffect,pN=C.exports.createContext({strict:!1});function Doe(e,t,n,r){const i=Noe(),o=C.exports.useContext(pN),a=C.exports.useContext(j0),s=C.exports.useContext($9).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return b4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),b4(()=>()=>u&&u.notifyUnmount(),[]),u}function Wp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zoe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wp(n)&&(n.current=r))},[t])}function nv(e){return typeof e=="string"||Array.isArray(e)}function G5(e){return typeof e=="object"&&typeof e.start=="function"}const Boe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function q5(e){return G5(e.animate)||Boe.some(t=>nv(e[t]))}function gN(e){return Boolean(q5(e)||e.variants)}function Foe(e,t){if(q5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||nv(n)?n:void 0,animate:nv(r)?r:void 0}}return e.inherit!==!1?t:{}}function $oe(e){const{initial:t,animate:n}=Foe(e,C.exports.useContext(j5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sT(t),sT(n)])}function sT(e){return Array.isArray(e)?e.join(" "):e}const nu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),rv={measureLayout:nu(["layout","layoutId","drag"]),animation:nu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:nu(["exit"]),drag:nu(["drag","dragControls"]),focus:nu(["whileFocus"]),hover:nu(["whileHover","onHoverStart","onHoverEnd"]),tap:nu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:nu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:nu(["whileInView","onViewportEnter","onViewportLeave"])};function Hoe(e){for(const t in e)t==="projectionNodeConstructor"?rv.projectionNodeConstructor=e[t]:rv[t].Component=e[t]}function K5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Woe=1;function Voe(){return K5(()=>{if(mm.hasEverUpdated)return Woe++})}const H9=C.exports.createContext({});class Uoe extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const mN=C.exports.createContext({}),joe=Symbol.for("motionComponentSymbol");function Goe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Hoe(e);function a(l,u){const h={...C.exports.useContext($9),...l,layoutId:qoe(l)},{isStatic:g}=h;let m=null;const v=$oe(l),b=g?void 0:Voe(),w=i(l,g);if(!g&&nh){v.visualElement=Doe(o,w,h,t);const P=C.exports.useContext(pN).strict,E=C.exports.useContext(mN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,b,n||rv.projectionNodeConstructor,E))}return ee(Uoe,{visualElement:v.visualElement,props:h,children:[m,x(j5.Provider,{value:v,children:r(o,l,b,zoe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[joe]=o,s}function qoe({layoutId:e}){const t=C.exports.useContext(H9).id;return t&&e!==void 0?t+"-"+e:e}function Koe(e){function t(r,i={}){return Goe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Yoe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function W9(e){return typeof e!="string"||e.includes("-")?!1:!!(Yoe.indexOf(e)>-1||/[A-Z]/.test(e))}const x4={};function Zoe(e){Object.assign(x4,e)}const S4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Av=new Set(S4);function vN(e,{layout:t,layoutId:n}){return Av.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,Xoe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qoe=(e,t)=>S4.indexOf(e)-S4.indexOf(t);function Joe({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Qoe);for(const s of t)a+=`${Xoe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function yN(e){return e.startsWith("--")}const eae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,bN=(e,t)=>n=>Math.max(Math.min(n,t),e),vm=e=>e%1?Number(e.toFixed(5)):e,iv=/(-)?([\d]*\.?[\d])+/g,Uw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Iv(e){return typeof e=="string"}const rh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ym=Object.assign(Object.assign({},rh),{transform:bN(0,1)}),py=Object.assign(Object.assign({},rh),{default:1}),Mv=e=>({test:t=>Iv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Mv("deg"),wl=Mv("%"),St=Mv("px"),nae=Mv("vh"),rae=Mv("vw"),lT=Object.assign(Object.assign({},wl),{parse:e=>wl.parse(e)/100,transform:e=>wl.transform(e*100)}),V9=(e,t)=>n=>Boolean(Iv(n)&&tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),xN=(e,t,n)=>r=>{if(!Iv(r))return r;const[i,o,a,s]=r.match(iv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:V9("hsl","hue"),parse:xN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wl.transform(vm(t))+", "+wl.transform(vm(n))+", "+vm(ym.transform(r))+")"},iae=bN(0,255),kS=Object.assign(Object.assign({},rh),{transform:e=>Math.round(iae(e))}),Wc={test:V9("rgb","red"),parse:xN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kS.transform(e)+", "+kS.transform(t)+", "+kS.transform(n)+", "+vm(ym.transform(r))+")"};function oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const jw={test:V9("#"),parse:oae,transform:Wc.transform},to={test:e=>Wc.test(e)||jw.test(e)||Of.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Of.test(e)?Of.parse(e):jw.parse(e),transform:e=>Iv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Of.transform(e)},SN="${c}",wN="${n}";function aae(e){var t,n,r,i;return isNaN(e)&&Iv(e)&&((n=(t=e.match(iv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Uw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function CN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Uw);r&&(n=r.length,e=e.replace(Uw,SN),t.push(...r.map(to.parse)));const i=e.match(iv);return i&&(e=e.replace(iv,wN),t.push(...i.map(rh.parse))),{values:t,numColors:n,tokenised:e}}function _N(e){return CN(e).values}function kN(e){const{values:t,numColors:n,tokenised:r}=CN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function lae(e){const t=_N(e);return kN(e)(t.map(sae))}const yu={test:aae,parse:_N,createTransformer:kN,getAnimatableNone:lae},uae=new Set(["brightness","contrast","saturate","opacity"]);function cae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iv)||[];if(!r)return e;const i=n.replace(r,"");let o=uae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const dae=/([a-z-]*)\(.*?\)/g,Gw=Object.assign(Object.assign({},yu),{getAnimatableNone:e=>{const t=e.match(dae);return t?t.map(cae).join(" "):e}}),uT={...rh,transform:Math.round},EN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:py,scaleX:py,scaleY:py,scaleZ:py,skew:Cc,skewX:Cc,skewY:Cc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:ym,originX:lT,originY:lT,originZ:St,zIndex:uT,fillOpacity:ym,strokeOpacity:ym,numOctaves:uT};function U9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(yN(m)){o[m]=v;continue}const b=EN[m],w=eae(v,b);if(Av.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Joe(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const j9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function PN(e,t,n){for(const r in t)!Ss(t[r])&&!vN(r,n)&&(e[r]=t[r])}function fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j9();return U9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hae(e,t,n){const r=e.style||{},i={};return PN(i,r,e),Object.assign(i,fae(e,t,n)),e.transformValues?e.transformValues(i):i}function pae(e,t,n){const r={},i=hae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const gae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],mae=["whileTap","onTap","onTapStart","onTapCancel"],vae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],yae=["whileInView","onViewportEnter","onViewportLeave","viewport"],bae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...yae,...mae,...gae,...vae]);function w4(e){return bae.has(e)}let TN=e=>!w4(e);function xae(e){!e||(TN=t=>t.startsWith("on")?!w4(t):e(t))}try{xae(require("@emotion/is-prop-valid").default)}catch{}function Sae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&w4(i)||!t&&!w4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cT(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function wae(e,t,n){const r=cT(t,e.x,e.width),i=cT(n,e.y,e.height);return`${r} ${i}`}const Cae={offset:"stroke-dashoffset",array:"stroke-dasharray"},_ae={offset:"strokeDashoffset",array:"strokeDasharray"};function kae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Cae:_ae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U9(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=wae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&kae(g,o,a,s,!1)}const LN=()=>({...j9(),attrs:{}});function Eae(e,t){const n=C.exports.useMemo(()=>{const r=LN();return G9(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};PN(r,e.style,e),n.style={...r,...n.style}}return n}function Pae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W9(n)?Eae:pae)(r,a,s),g={...Sae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const AN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function IN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const MN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function ON(e,t,n,r){IN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(MN.has(i)?i:AN(i),t.attrs[i])}function q9(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||vN(r,e))&&(n[r]=t[r]);return n}function RN(e){const t=q9(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const ov=e=>Array.isArray(e),Tae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),NN=e=>ov(e)?e[e.length-1]||0:e;function x3(e){const t=Ss(e)?e.get():e;return Tae(t)?t.toValue():t}function Lae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Aae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const DN=e=>(t,n)=>{const r=C.exports.useContext(j5),i=C.exports.useContext(j0),o=()=>Lae(e,t,r,i);return n?o():K5(o)};function Aae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=x3(o[m]);let{initial:a,animate:s}=e;const l=q5(e),u=gN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!G5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K9(e,v);if(!b)return;const{transitionEnd:w,transition:P,...E}=b;for(const k in E){let T=E[k];if(Array.isArray(T)){const I=h?T.length-1:0;T=T[I]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Iae={useVisualState:DN({scrapeMotionValuesFromProps:RN,createRenderState:LN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G9(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),ON(t,n)}})},Mae={useVisualState:DN({scrapeMotionValuesFromProps:q9,createRenderState:j9})};function Oae(e,{forwardMotionProps:t=!1},n,r,i){return{...W9(e)?Iae:Mae,preloadedFeatures:n,useRender:Pae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function Y5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Y5(i,t,n,r)},[e,t,n,r])}function Rae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};qw(t,"focus",e?r:void 0),qw(t,"blur",e?i:void 0)}function zN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function BN(e){return!!e.touches}function Nae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Dae={pageX:0,pageY:0};function zae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Dae;return{x:r[t+"X"],y:r[t+"Y"]}}function Bae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y9(e,t="page"){return{point:BN(e)?zae(e,t):Bae(e,t)}}const FN=(e,t=!1)=>{const n=r=>e(r,Y9(r));return t?Nae(n):n},Fae=()=>nh&&window.onpointerdown===null,$ae=()=>nh&&window.ontouchstart===null,Hae=()=>nh&&window.onmousedown===null,Wae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Vae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function $N(e){return Fae()?e:$ae()?Vae[e]:Hae()?Wae[e]:e}function o0(e,t,n,r){return Y5(e,$N(t),FN(n,t==="pointerdown"),r)}function C4(e,t,n,r){return qw(e,$N(t),n&&FN(n,t==="pointerdown"),r)}function HN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dT=HN("dragHorizontal"),fT=HN("dragVertical");function WN(e){let t=!1;if(e==="y")t=fT();else if(e==="x")t=dT();else{const n=dT(),r=fT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function VN(){const e=WN(!0);return e?(e(),!1):!0}function hT(e,t,n){return(r,i)=>{!zN(r)||VN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Uae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){C4(r,"pointerenter",e||n?hT(r,!0,e):void 0,{passive:!e}),C4(r,"pointerleave",t||n?hT(r,!1,t):void 0,{passive:!t})}const UN=(e,t)=>t?e===t?!0:UN(e,t.parentElement):!1;function Z9(e){return C.exports.useEffect(()=>()=>e(),[])}function jN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),ES=.001,Gae=.01,pT=10,qae=.05,Kae=1;function Yae({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;jae(e<=pT*1e3);let a=1-t;a=k4(qae,Kae,a),e=k4(Gae,pT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Kw(u,a),b=Math.exp(-g);return ES-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Kw(Math.pow(u,2),a);return(-i(u)+ES>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-ES+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=Xae(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Zae=12;function Xae(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ese(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gT(e,Jae)&&gT(e,Qae)){const n=Yae(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X9(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=jN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ese(o),v=mT,b=mT;function w(){const P=h?-(h/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Kw(T,k);v=O=>{const N=Math.exp(-k*T*O);return n-N*((P+k*T*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const N=Math.exp(-k*T*O);return k*T*N*(Math.sin(I*O)*(P+k*T*E)/I+E*Math.cos(I*O))-N*(Math.cos(I*O)*(P+k*T*E)-I*E*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-T*I)*(E+(P+T*E)*I);else{const I=T*Math.sqrt(k*k-1);v=O=>{const N=Math.exp(-k*T*O),D=Math.min(I*O,300);return n-N*((P+k*T*E)*Math.sinh(D)+I*E*Math.cosh(D))/I}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=g;else{const k=b(P)*1e3,T=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=T&&I}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X9.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mT=e=>0,av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function PS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=PS(l,s,e+1/3),o=PS(l,s,e),a=PS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},nse=[jw,Wc,Of],yT=e=>nse.find(t=>t.test(e)),GN=(e,t)=>{let n=yT(e),r=yT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=vT(i),n=Wc),r===Of&&(o=vT(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=tse(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Yw=e=>typeof e=="number",rse=(e,t)=>n=>t(e(n)),Z5=(...e)=>e.reduce(rse);function qN(e,t){return Yw(e)?n=>_r(e,t,n):to.test(e)?GN(e,t):YN(e,t)}const KN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>qN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bT(e){const t=yu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=yu.createTransformer(t),r=bT(e),i=bT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Z5(KN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ose=(e,t)=>n=>_r(e,t,n);function ase(e){if(typeof e=="number")return ose;if(typeof e=="string")return to.test(e)?GN:YN;if(Array.isArray(e))return KN;if(typeof e=="object")return ise}function sse(e,t,n){const r=[],i=n||ase(e[0]),o=e.length-1;for(let a=0;an(av(e,t,r))}function use(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=av(e[o],e[o+1],i);return t[o](s)}}function ZN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;_4(o===t.length),_4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=sse(t,r,i),s=o===2?lse(e,a):use(e,a);return n?l=>s(k4(e[0],e[o-1],l)):s}const X5=e=>t=>1-e(1-t),Q9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cse=e=>t=>Math.pow(t,e),XN=e=>t=>t*t*((e+1)*t-e),dse=e=>{const t=XN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},QN=1.525,fse=4/11,hse=8/11,pse=9/10,J9=e=>e,e7=cse(2),gse=X5(e7),JN=Q9(e7),eD=e=>1-Math.sin(Math.acos(e)),t7=X5(eD),mse=Q9(t7),n7=XN(QN),vse=X5(n7),yse=Q9(n7),bse=dse(QN),xse=4356/361,Sse=35442/1805,wse=16061/1805,E4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-E4(1-e*2)):.5*E4(e*2-1)+.5;function kse(e,t){return e.map(()=>t||JN).splice(0,e.length-1)}function Ese(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Pse(e,t){return e.map(n=>n*t)}function S3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Pse(r&&r.length===a.length?r:Ese(a),i);function l(){return ZN(s,a,{ease:Array.isArray(n)?n:kse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Tse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const xT={keyframes:S3,spring:X9,decay:Tse};function Lse(e){if(Array.isArray(e.to))return S3;if(xT[e.type])return xT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X9:S3}const tD=1/60*1e3,Ase=typeof performance<"u"?()=>performance.now():()=>Date.now(),nD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ase()),tD);function Ise(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Ise(()=>sv=!0),e),{}),Ose=Ov.reduce((e,t)=>{const n=Q5[t];return e[t]=(r,i=!1,o=!1)=>(sv||Dse(),n.schedule(r,i,o)),e},{}),Rse=Ov.reduce((e,t)=>(e[t]=Q5[t].cancel,e),{});Ov.reduce((e,t)=>(e[t]=()=>Q5[t].process(a0),e),{});const Nse=e=>Q5[e].process(a0),rD=e=>{sv=!1,a0.delta=Zw?tD:Math.max(Math.min(e-a0.timestamp,Mse),1),a0.timestamp=e,Xw=!0,Ov.forEach(Nse),Xw=!1,sv&&(Zw=!1,nD(rD))},Dse=()=>{sv=!0,Zw=!0,Xw||nD(rD)},zse=()=>a0;function iD(e,t,n=0){return e-t-n}function Bse(e,t,n=0,r=!0){return r?iD(t+-e,t,n):t-(e-t)+n}function Fse(e,t,n,r){return r?e>=t+n:e<=-n}const $se=e=>{const t=({delta:n})=>e(n);return{start:()=>Ose.update(t,!0),stop:()=>Rse.update(t)}};function oD(e){var t,n,{from:r,autoplay:i=!0,driver:o=$se,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=jN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,k=0,T=w.duration,I,O=!1,N=!0,D;const z=Lse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(D=ZN([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){k++,l==="reverse"?(N=k%2===0,a=Bse(a,T,u,N)):(a=iD(a,T,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){E.stop(),m&&m()}function de(te){if(N||(te=-te),a+=te,!O){const re=$.next(Math.max(0,a));I=re.value,D&&(I=D(I)),O=N?re.done:a<=0}b?.(I),O&&(k===0&&(T??(T=a)),k{g?.(),E.stop()}}}function aD(e,t){return t?e*(1e3/t):0}function Hse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(I),(O=T.onUpdate)===null||O===void 0||O.call(T,I)},onComplete:m,onStop:v}))}function k(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const I=P(T),O=I===n?-1:1;let N,D;const z=$=>{N=D,D=$,t=aD($-N,zse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Qw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ST=e=>Qw(e)&&e.hasOwnProperty("z"),gy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Yw(e)&&Yw(t))return gy(e,t);if(Qw(e)&&Qw(t)){const n=gy(e.x,t.x),r=gy(e.y,t.y),i=ST(e)&&ST(t)?gy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const sD=(e,t)=>1-3*t+3*e,lD=(e,t)=>3*t-6*e,uD=e=>3*e,P4=(e,t,n)=>((sD(t,n)*e+lD(t,n))*e+uD(t))*e,cD=(e,t,n)=>3*sD(t,n)*e*e+2*lD(t,n)*e+uD(t),Wse=1e-7,Vse=10;function Use(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=P4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Wse&&++s=Gse?qse(a,g,e,n):m===0?g:Use(a,s,s+my,e,n)}return a=>a===0||a===1?a:P4(o(a),t,r)}function Yse({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!VN()}function g(b,w){!h()||(UN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=Z5(o0(window,"pointerup",g,l),o0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}C4(i,"pointerdown",o?v:void 0,l),Z9(u)}const Zse="production",dD=typeof process>"u"||process.env===void 0?Zse:"production",wT=new Set;function fD(e,t,n){e||wT.has(t)||(console.warn(t),n&&console.warn(n),wT.add(t))}const Jw=new WeakMap,TS=new WeakMap,Xse=e=>{const t=Jw.get(e.target);t&&t(e)},Qse=e=>{e.forEach(Xse)};function Jse({root:e,...t}){const n=e||document;TS.has(n)||TS.set(n,{});const r=TS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Qse,{root:e,...t})),r[i]}function ele(e,t,n){const r=Jse(t);return Jw.set(e,n),r.observe(e),()=>{Jw.delete(e),r.unobserve(e)}}function tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ile:rle)(a,o.current,e,i)}const nle={some:0,all:1};function rle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:nle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return ele(n.getInstance(),s,l)},[e,r,i,o])}function ile(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(dD!=="production"&&fD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),ole={inView:Vc(tle),tap:Vc(Yse),focus:Vc(Rae),hover:Vc(Uae)};function i7(){const e=C.exports.useContext(j0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ale(){return sle(C.exports.useContext(j0))}function sle(e){return e===null?!0:e.isPresent}function hD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,lle={linear:J9,easeIn:e7,easeInOut:JN,easeOut:gse,circIn:eD,circInOut:mse,circOut:t7,backIn:n7,backInOut:yse,backOut:vse,anticipate:bse,bounceIn:Cse,bounceInOut:_se,bounceOut:E4},CT=e=>{if(Array.isArray(e)){_4(e.length===4);const[t,n,r,i]=e;return Kse(t,n,r,i)}else if(typeof e=="string")return lle[e];return e},ule=e=>Array.isArray(e)&&typeof e[0]!="number",_T=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&yu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),vy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LS=()=>({type:"keyframes",ease:"linear",duration:.3}),cle=e=>({type:"keyframes",duration:.8,values:e}),kT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:vy,scaleY:vy,scale:vy,opacity:LS,backgroundColor:LS,color:LS,default:vy},dle=(e,t)=>{let n;return ov(t)?n=cle:n=kT[e]||kT.default,{to:t,...n(t)}},fle={...EN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:Gw,WebkitFilter:Gw},o7=e=>fle[e];function a7(e,t){var n;let r=o7(e);return r!==Gw&&(r=yu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const hle={current:!1},pD=1/60*1e3,ple=typeof performance<"u"?()=>performance.now():()=>Date.now(),gD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(ple()),pD);function gle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=gle(()=>lv=!0),e),{}),ws=Rv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(lv||yle(),n.schedule(r,i,o)),e},{}),Yf=Rv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{}),AS=Rv.reduce((e,t)=>(e[t]=()=>J5[t].process(s0),e),{}),vle=e=>J5[e].process(s0),mD=e=>{lv=!1,s0.delta=eC?pD:Math.max(Math.min(e-s0.timestamp,mle),1),s0.timestamp=e,tC=!0,Rv.forEach(vle),tC=!1,lv&&(eC=!1,gD(mD))},yle=()=>{lv=!0,eC=!0,tC||gD(mD)},nC=()=>s0;function vD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Yf.read(r),e(o-t))};return ws.read(r,!0),()=>Yf.read(r)}function ble({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function xle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=T4(o.duration)),o.repeatDelay&&(a.repeatDelay=T4(o.repeatDelay)),e&&(a.ease=ule(e)?e.map(CT):CT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Sle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function wle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Cle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),wle(t),ble(e)||(e={...e,...dle(n,t.to)}),{...t,...xle(e)}}function _le(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_T(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):ET(a)&&typeof n=="string"?a=PT(n):!Array.isArray(n)&&ET(n)&&typeof a=="string"&&(n=PT(a));const l=_T(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Hse({...g,...o}):oD({...Cle(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=NN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function ET(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PT(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return hle.current&&(r={type:!1}),t.start(i=>{let o;const a=_le(e,t,n,r,i),s=Sle(r,e),l=()=>o=a();let u;return s?u=vD(l,T4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const kle=e=>/^\-?\d*\.?\d+$/.test(e),Ele=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class bm{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new bm,this.velocityUpdateSubscribers=new bm,this.renderSubscribers=new bm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=nC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Ple(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?aD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function L0(e){return new Tle(e)}const yD=e=>t=>t.test(e),Lle={test:e=>e==="auto",parse:e=>e},bD=[rh,St,wl,Cc,rae,nae,Lle],wg=e=>bD.find(yD(e)),Ale=[...bD,to,yu],Ile=e=>Ale.find(yD(e));function Mle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Ole(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function eb(e,t,n){const r=e.getProps();return K9(r,t,n!==void 0?n:r.custom,Mle(e),Ole(e))}function Rle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,L0(n))}function Nle(e,t){const n=eb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=NN(o[a]);Rle(e,a,s)}}function Dle(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;srC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=rC(e,t,n);else{const i=typeof t=="function"?eb(e,t,n.custom):t;r=xD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function rC(e,t,n={}){var r;const i=eb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>xD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return $le(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function xD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Wle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Av.has(m)&&(w={...w,type:!1,delay:0});let P=l7(m,v,b,w);L4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&Nle(e,s)})}function $le(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Hle).forEach((u,h)=>{a.push(rC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Hle(e,t){return e.sortNodePosition(t)}function Wle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Vle=[...d7].reverse(),Ule=d7.length;function jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Fle(e,n,r)))}function Gle(e){let t=jle(e);const n=Kle();let r=!0;const i=(l,u)=>{const h=eb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},P=1/0;for(let k=0;kP&&N;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},re=se=>{W=!0,b.delete(se),I.needsAnimating[se]=!0};for(const se in te){const G=de[se],V=j[se];w.hasOwnProperty(se)||(G!==V?ov(G)&&ov(V)?!hD(G,V)||$?re(se):I.protectedKeys[se]=!0:G!==void 0?re(se):b.add(se):G!==void 0&&b.has(se)?re(se):I.protectedKeys[se]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...Y.map(se=>({animation:se,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const I=e.getBaseTarget(T);I!==void 0&&(k[T]=I)}),v.push({animation:k})}let E=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function qle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kle(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Yle={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Gle(e)),G5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(j0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class SD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=MS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=nC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=IS(h,this.transformPagePoint),zN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=MS(IS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},BN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y9(t),o=IS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=nC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,MS(o,this.history)),this.removeListeners=Z5(o0(window,"pointermove",this.handlePointerMove),o0(window,"pointerup",this.handlePointerUp),o0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Yf.update(this.updatePoint)}}function IS(e,t){return t?{point:t(e.point)}:e}function TT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function MS({point:e},t){return{point:e,delta:TT(e,wD(t)),offset:TT(e,Zle(t)),velocity:Xle(t,.1)}}function Zle(e){return e[0]}function wD(e){return e[e.length-1]}function Xle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=wD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>T4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function LT(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function OT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eue(e,{top:t,left:n,bottom:r,right:i}){return{x:OT(e.x,n,i),y:OT(e.y,t,r)}}function RT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=av(t.min,t.max-r,e.min):r>i&&(n=av(e.min,e.max-i,t.min)),k4(0,1,n)}function rue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iC=.35;function iue(e=iC){return e===!1?e=0:e===!0&&(e=iC),{x:NT(e,"left","right"),y:NT(e,"top","bottom")}}function NT(e,t,n){return{min:DT(e,t),max:DT(e,n)}}function DT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zT=()=>({translate:0,scale:1,origin:0,originPoint:0}),wm=()=>({x:zT(),y:zT()}),BT=()=>({min:0,max:0}),ki=()=>({x:BT(),y:BT()});function sl(e){return[e("x"),e("y")]}function CD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function OS(e){return e===void 0||e===1}function oC({scale:e,scaleX:t,scaleY:n}){return!OS(e)||!OS(t)||!OS(n)}function bf(e){return oC(e)||_D(e)||e.z||e.rotate||e.rotateX||e.rotateY}function _D(e){return FT(e.x)||FT(e.y)}function FT(e){return e&&e!=="0%"}function A4(e,t,n){const r=e-n,i=t*r;return n+i}function $T(e,t,n,r,i){return i!==void 0&&(e=A4(e,i,r)),A4(e,n,r)+t}function aC(e,t=0,n=1,r,i){e.min=$T(e.min,t,n,r,i),e.max=$T(e.max,t,n,r,i)}function kD(e,{x:t,y:n}){aC(e.x,t.translate,t.scale,t.originPoint),aC(e.y,n.translate,n.scale,n.originPoint)}function sue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(Y9(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=WN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let P=this.getAxisMotionValue(v).get()||0;if(wl.test(P)){const E=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=la(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=hue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new SD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Jle(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Wp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eue(r.actual,t):this.constraints=!1,this.elastic=iue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=rue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cue(r,i.root,this.visualElement.getTransformPagePoint());let a=tue(i.layout.actual,o);if(n){const s=n(oue(a));this.hasMutatedConstraints=!!s,s&&(a=CD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!yy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!yy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=nue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!yy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;due.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=o0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Y5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=iC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function yy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function pue(e){const{dragControls:t,visualElement:n}=e,r=K5(()=>new fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function gue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($9),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new SD(h,l,{transformPagePoint:s})}C4(i,"pointerdown",o&&u),Z9(()=>a.current&&a.current.end())}const mue={pan:Vc(gue),drag:Vc(pue)},sC={current:null},PD={current:!1};function vue(){if(PD.current=!0,!!nh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sC.current=e.matches;e.addListener(t),t()}else sC.current=!1}const by=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function yue(){const e=by.map(()=>new bm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{by.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+by[i]]=o=>r.add(o),n["notify"+by[i]]=(...o)=>r.notify(...o)}),n}function bue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),L4(r)&&r.add(i);else if(Ss(a))e.addValue(i,L0(o)),L4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,L0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(rv),xue=TD.length,LD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:k,renderState:T}=b;let I;const O=yue(),N=new Map,D=new Map;let z={};const $={...k},W=g.initial?{...k}:{};let Y;function de(){!I||!E||(j(),o(I,T,g.style,Q.projection))}function j(){t(Q,T,k,P,g)}function te(){O.notifyUpdate(k)}function re(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:se,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),L4(se)&&se.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const V=q5(g),q=gN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){E=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!V&&(Y=h?.addVariantChild(Q)),N.forEach((me,ye)=>re(ye,me)),PD.current||vue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:sC.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Yf.update(te),Yf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,ye,Se,He,Ue){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:Ue,layoutScroll:At})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),N.set(X,me),k[X]=me.get(),re(X,me)},removeValue(X){var me;N.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,T)},hasValue:X=>N.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=N.get(X);return ye===void 0&&me!==void 0&&(ye=L0(me),Q.addValue(X,ye)),ye},forEachValue:X=>N.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,P),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K9(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),T},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=bue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!V){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!lC(o))return;const a=uC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!lC(o))continue;const a=uC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ue=new Set(["width","height","top","left","right","bottom","x","y"]),MD=e=>_ue.has(e),kue=e=>Object.keys(e).some(MD),OD=(e,t)=>{e.set(t,!1),e.set(t)},WT=e=>e===rh||e===St;var VT;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VT||(VT={}));const UT=(e,t)=>parseFloat(e.split(", ")[t]),jT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UT(o[1],e):0}},Eue=new Set(["x","y","z"]),Pue=S4.filter(e=>!Eue.has(e));function Tue(e){const t=[];return Pue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const GT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jT(4,13),y:jT(5,14)},Lue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=GT[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);OD(h,s[u]),e[u]=GT[u](l,o)}),e},Aue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(MD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=wg(h);const m=t[l];let v;if(ov(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=wg(h);for(let P=w;P=0?window.pageYOffset:null,u=Lue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),nh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Iue(e,t,n,r){return kue(t)?Aue(e,t,n,r):{target:t,transitionEnd:r}}const Mue=(e,t,n,r)=>{const i=Cue(e,t,r);return t=i.target,r=i.transitionEnd,Iue(e,t,n,r)};function Oue(e){return window.getComputedStyle(e)}const RD={treeType:"dom",readValueFromInstance(e,t){if(Av.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Oue(e),r=(yN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ED(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Ble(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Dle(e,r,a);const s=Mue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q9,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U9(t,n,r,i.transformTemplate)},render:IN},Rue=LD(RD),Nue=LD({...RD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Av.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=MN.has(t)?t:AN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:RN,build(e,t,n,r,i){G9(t,n,r,i.transformTemplate)},render:ON}),Due=(e,t)=>W9(e)?Nue(t,{enableHardwareAcceleration:!1}):Rue(t,{enableHardwareAcceleration:!0});function qT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Cg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qT(e,t.target.x),r=qT(e,t.target.y);return`${n}% ${r}%`}},KT="_$css",zue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(ID,v=>(o.push(v),KT)));const a=yu.parse(e);if(a.length>5)return r;const s=yu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(KT,()=>{const b=o[v];return v++,b})}return m}};class Bue extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Zoe($ue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Fue(e){const[t,n]=i7(),r=C.exports.useContext(H9);return x(Bue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(mN),isPresent:t,safeToRemove:n})}const $ue={borderRadius:{...Cg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cg,borderTopRightRadius:Cg,borderBottomLeftRadius:Cg,borderBottomRightRadius:Cg,boxShadow:zue},Hue={measureLayout:Fue};function Wue(e,t,n={}){const r=Ss(e)?e:L0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const ND=["TopLeft","TopRight","BottomLeft","BottomRight"],Vue=ND.length,YT=e=>typeof e=="string"?parseFloat(e):e,ZT=e=>typeof e=="number"||St.test(e);function Uue(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,Gue(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(av(e,t,r))}function QT(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QT(e.x,t.x),QT(e.y,t.y)}function JT(e,t,n,r,i){return e-=t,e=A4(e,1/n,r),i!==void 0&&(e=A4(e,1/i,r)),e}function que(e,t=0,n=1,r=.5,i,o=e,a=e){if(wl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JT(e.min,t,n,s,i),e.max=JT(e.max,t,n,s,i)}function eL(e,t,[n,r,i],o,a){que(e,t[n],t[r],t[i],t.scale,o,a)}const Kue=["x","scaleX","originX"],Yue=["y","scaleY","originY"];function tL(e,t,n,r){eL(e.x,t,Kue,n?.x,r?.x),eL(e.y,t,Yue,n?.y,r?.y)}function nL(e){return e.translate===0&&e.scale===1}function zD(e){return nL(e.x)&&nL(e.y)}function BD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rL(e){return la(e.x)/la(e.y)}function Zue(e,t,n=.1){return r7(e,t)<=n}class Xue{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Que="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iL(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Que?"none":o}const Jue=(e,t)=>e.depth-t.depth;class ece{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jue),this.isDirty=!1,this.children.forEach(t)}}const oL=["","X","Y","Z"],aL=1e3;function FD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(oce),this.nodes.forEach(ace)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=vD(v,250),mm.hasAnimatedSinceResize&&(mm.hasAnimatedSinceResize=!1,this.nodes.forEach(lL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var P,E,k,T,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(P=this.options.transition)!==null&&P!==void 0?P:g.getDefaultTransition())!==null&&E!==void 0?E:dce,{onLayoutAnimationStart:N,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!BD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...s7(O,"layout"),onPlay:N,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&lL(this),this.isLead()&&((I=(T=this.options).onExitComplete)===null||I===void 0||I.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Yf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(sce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));fL(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=E/1e3;uL(m.x,a.x,T),uL(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Sm(v,this.layout.actual,this.relativeParent.layout.actual),uce(this.relativeTarget,this.relativeTargetOrigin,v,T)),b&&(this.animationValues=g,Uue(g,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Yf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{mm.hasAnimatedSinceResize=!0,this.currentAnimation=Wue(0,aL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,aL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&$D(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Vp(s,h),xm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Xue),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(sL),this.root.sharedNodes.clear()}}}function tce(e){e.updateLayout()}function nce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):$D(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=wm();xm(l,o,i.layout);const u=wm();i.isShared?xm(u,e.applyTransform(a,!0),i.measured):xm(u,o,i.layout);const h=!zD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Sm(b,i.layout,m.layout);const w=ki();Sm(w,o,v.actual),BD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function rce(e){e.clearSnapshot()}function sL(e){e.clearMeasurements()}function ice(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function oce(e){e.resolveTargetDelta()}function ace(e){e.calcProjection()}function sce(e){e.resetRotation()}function lce(e){e.removeLeadSnapshot()}function uL(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cL(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function uce(e,t,n,r){cL(e.x,t.x,n.x,r),cL(e.y,t.y,n.y,r)}function cce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dce={duration:.45,ease:[.4,0,.1,1]};function fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function dL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fL(e){dL(e.x),dL(e.y)}function $D(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zue(rL(t),rL(n),.2)}const hce=FD({attachResizeListener:(e,t)=>Y5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),RS={current:void 0},pce=FD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!RS.current){const e=new hce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),RS.current=e}return RS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),gce={...Yle,...ole,...mue,...Hue},Ml=Koe((e,t)=>Oae(e,t,gce,Due,pce));function HD(){const e=C.exports.useRef(!1);return b4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mce(){const e=HD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class vce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(vce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const NS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=K5(bce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(yce,{isPresent:n,children:e})),x(j0.Provider,{value:u,children:e})};function bce(){return new Map}const Pp=e=>e.key||"";function xce(e,t){e.forEach(n=>{const r=Pp(n);t.set(r,n)})}function Sce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",fD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=mce();const l=C.exports.useContext(H9).forceRender;l&&(s=l);const u=HD(),h=Sce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(b4(()=>{w.current=!1,xce(h,b),v.current=g}),Z9(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Kn,{children:g.map(T=>x(NS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Pp(T)))});g=[...g];const P=v.current.map(Pp),E=h.map(Pp),k=P.length;for(let T=0;T{if(E.indexOf(T)!==-1)return;const I=b.get(T);if(!I)return;const O=P.indexOf(T),N=()=>{b.delete(T),m.delete(T);const D=v.current.findIndex(z=>z.key===T);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(NS,{isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:o,mode:a,children:I},Pp(I)))}),g=g.map(T=>{const I=T.key;return m.has(I)?T:x(NS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Pp(T))}),dD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Kn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function cC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function wce(){return!1}var Cce=e=>{const{condition:t,message:n}=e;t&&wce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},_g={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function dC(e){switch(e?.direction??"right"){case"right":return _g.slideRight;case"left":return _g.slideLeft;case"bottom":return _g.slideDown;case"top":return _g.slideUp;default:return _g.slideRight}}var Ff={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},_ce=e=>e!=null&&parseInt(e.toString(),10)>0,pL={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},kce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:_ce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pL.enter,i)})},VD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Cce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Ml.div,{ref:t,...g,className:Nv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:kce,initial:r?"exit":!1,animate:E,exit:"exit"})})});VD.displayName="Collapse";var Ece={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit(Ff.exit,n),transitionEnd:t?.exit})},UD={initial:"exit",animate:"enter",exit:"exit",variants:Ece},Pce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:g&&le.createElement(Ml.div,{ref:n,className:Nv("chakra-fade",o),custom:m,...UD,animate:h,...u})})});Pce.displayName="Fade";var Tce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit(Ff.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter(Ff.enter,n),transitionEnd:e?.enter})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Tce},Lce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:b,children:m&&le.createElement(Ml.div,{ref:n,className:Nv("chakra-offset-slide",s),...jD,animate:v,custom:b,...g})})});Lce.displayName="ScaleFade";var gL={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Ace={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=dC({direction:e});return{...i,transition:t?.exit??Cs.exit(gL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=dC({direction:e});return{...i,transition:n?.enter??Cs.enter(gL.enter,r),transitionEnd:t?.enter}}},GD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=dC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Ml.div,{...m,ref:n,initial:"exit",className:Nv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:Ace,style:b,...g})})});GD.displayName="Slide";var Ice={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit(Ff.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter(Ff.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit(Ff.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},fC={initial:"initial",animate:"enter",exit:"exit",variants:Ice},Mce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(pd,{custom:w,children:v&&le.createElement(Ml.div,{ref:n,className:Nv("chakra-offset-slide",a),custom:w,...fC,animate:b,...m})})});Mce.displayName="SlideFade";var Dv=(...e)=>e.filter(Boolean).join(" ");function Oce(){return!1}var tb=e=>{const{condition:t,message:n}=e;t&&Oce()&&console.warn(n)};function DS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rce,nb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Nce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Dce,Gke,zce,Bce]=hN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...nb().button};return le.createElement(we.button,{...i,className:Dv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function Fce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Wce(e),Vce(e);const s=zce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=U5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(k=>k!==v);g(E)}else P?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[$ce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Hce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Uce(e);const{register:m,index:v,descendants:b}=Bce({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);jce({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},k=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),I=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),N=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:DS($.onClick,T),onFocus:DS($.onFocus,O),onKeyDown:DS($.onKeyDown,I)}},[h,t,w,T,O,I,g,m]),D=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:N,getPanelProps:D,htmlProps:i}}function Wce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;tb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Vce(e){tb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Uce(e){tb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function jce(e){tb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Dv("chakra-accordion__icon",e.className),o=nb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Hce(t),l={...nb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(Nce,{value:u},le.createElement(we.div,{ref:n,...o,className:Dv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Dv("chakra-accordion__panel",r),g=nb();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(VD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var rb=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Fce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Dce,{value:l},le.createElement($ce,{value:h},le.createElement(Rce,{value:o},le.createElement(we.div,{ref:i,...s,className:Dv("chakra-accordion",r.className),__css:o.root},t))))});rb.displayName="Accordion";var Gce=(...e)=>e.filter(Boolean).join(" "),qce=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),zv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Gce("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${qce} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});zv.displayName="Spinner";var ib=(...e)=>e.filter(Boolean).join(" ");function Kce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Yce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mL(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Zce,Xce]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Qce,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),qD={info:{icon:Yce,colorScheme:"blue"},warning:{icon:mL,colorScheme:"orange"},success:{icon:Kce,colorScheme:"green"},error:{icon:mL,colorScheme:"red"},loading:{icon:zv,colorScheme:"blue"}};function Jce(e){return qD[e].colorScheme}function ede(e){return qD[e].icon}var KD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Jce(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Zce,{value:{status:r}},le.createElement(Qce,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ib("chakra-alert",t.className),__css:l})))});KD.displayName="Alert";var YD=Pe(function(t,n){const i={display:"inline",...p7().description};return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__desc",t.className),__css:i})});YD.displayName="AlertDescription";function ZD(e){const{status:t}=Xce(),n=ede(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:ib("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}ZD.displayName="AlertIcon";var XD=Pe(function(t,n){const r=p7();return le.createElement(we.div,{ref:n,...t,className:ib("chakra-alert__title",t.className),__css:r.title})});XD.displayName="AlertTitle";function tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var rde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",I4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});I4.displayName="NativeImage";var ob=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=nde({...t,ignoreFallback:P}),k=rde(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?b:tde(b,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:I4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:I4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ob.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:I4,className:"chakra-image",...e}));function ab(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var sb=(...e)=>e.filter(Boolean).join(" "),vL=e=>e?"":void 0,[ide,ode]=Cn({strict:!1,name:"ButtonGroupContext"});function hC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=sb("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}hC.displayName="ButtonIcon";function pC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(zv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=sb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}pC.displayName="ButtonSpinner";function ade(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:P,...E}=vn(e),k=C.exports.useMemo(()=>{const N={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:N}}},[r,n]),{ref:T,type:I}=ade(P),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return le.createElement(we.button,{disabled:i||o,ref:Loe(t,T),as:P,type:m??I,"data-active":vL(a),"data-loading":vL(o),__css:k,className:sb("chakra-button",w),...E},o&&b==="start"&&x(pC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||le.createElement(we.span,{opacity:0},x(yL,{...O})):x(yL,{...O}),o&&b==="end"&&x(pC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function yL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Kn,{children:[t&&x(hC,{marginEnd:i,children:t}),r,n&&x(hC,{marginStart:i,children:n})]})}var Eo=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=sb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(ide,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Eo.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var K0=(...e)=>e.filter(Boolean).join(" "),xy=e=>e?"":void 0,zS=e=>e?!0:void 0;function bL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,QD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[lde,Y0]=Cn({strict:!1,name:"FormControlContext"});function ude(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),T=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":xy(P),"data-disabled":xy(i),"data-invalid":xy(r),"data-readonly":xy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,P,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),N=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:N}}var gd=Pe(function(t,n){const r=Ri("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=ude(i),l=K0("chakra-form-control",t.className);return le.createElement(lde,{value:s},le.createElement(sde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var cde=Pe(function(t,n){const r=Y0(),i=QD(),o=K0("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});cde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":zS(n),"aria-required":zS(i),"aria-readonly":zS(r)}}function m7(e){const t=Y0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:bL(t?.onFocus,h),onBlur:bL(t?.onBlur,g)}}var[dde,fde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hde=Pe((e,t)=>{const n=Ri("FormError",e),r=vn(e),i=Y0();return i?.isInvalid?le.createElement(dde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:K0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});hde.displayName="FormErrorMessage";var pde=Pe((e,t)=>{const n=fde(),r=Y0();if(!r?.isInvalid)return null;const i=K0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});pde.displayName="FormErrorIcon";var ih=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(JD,{}),optionalIndicator:l=null,...u}=i,h=Y0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...g,className:K0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});ih.displayName="FormLabel";var JD=Pe(function(t,n){const r=Y0(),i=QD();if(!r?.isRequired)return null;const o=K0("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});JD.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},gde=we("span",{baseStyle:v7});gde.displayName="VisuallyHidden";var mde=we("input",{baseStyle:v7});mde.displayName="VisuallyHiddenInput";var xL=!1,lb=null,A0=!1,gC=new Set,vde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function yde(e){return!(e.metaKey||!vde&&e.altKey||e.ctrlKey)}function y7(e,t){gC.forEach(n=>n(e,t))}function SL(e){A0=!0,yde(e)&&(lb="keyboard",y7("keyboard",e))}function mp(e){lb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(A0=!0,y7("pointer",e))}function bde(e){e.target===window||e.target===document||(A0||(lb="keyboard",y7("keyboard",e)),A0=!1)}function xde(){A0=!1}function wL(){return lb!=="pointer"}function Sde(){if(typeof window>"u"||xL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){A0=!0,e.apply(this,n)},document.addEventListener("keydown",SL,!0),document.addEventListener("keyup",SL,!0),window.addEventListener("focus",bde,!0),window.addEventListener("blur",xde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",mp,!0),document.addEventListener("pointermove",mp,!0),document.addEventListener("pointerup",mp,!0)):(document.addEventListener("mousedown",mp,!0),document.addEventListener("mousemove",mp,!0),document.addEventListener("mouseup",mp,!0)),xL=!0}function wde(e){Sde(),e(wL());const t=()=>e(wL());return gC.add(t),()=>{gC.delete(t)}}var[qke,Cde]=Cn({name:"CheckboxGroupContext",strict:!1}),_de=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function kde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ede(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Pde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Tde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Pde:Ede;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Lde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ez(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:P,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":I,...O}=e,N=Lde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[W,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),[se,G]=C.exports.useState(!1);C.exports.useEffect(()=>wde(Y),[]);const V=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}ye||me(Se?Ae.target.checked:b?!0:Ae.target.checked),D?.(Ae)},[r,n,Se,ye,b,D]);bs(()=>{V.current&&(V.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Ae=V.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const Ue=n&&!m,ct=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&G(!1)},[G]);bs(()=>{if(!V.current)return;V.current.checked!==Se&&me(V.current.checked)},[V.current]);const et=C.exports.useCallback((Ae={},dt=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Ae,ref:dt,"data-active":eo(se),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&W),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Ae.onMouseDown,Mt),onMouseUp:ka(Ae.onMouseUp,()=>G(!1)),onMouseEnter:ka(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:ka(Ae.onMouseLeave,()=>re(!1))}},[se,Se,n,de,W,te,b,o,r]),tt=C.exports.useCallback((Ae={},dt=null)=>({...N,...Ae,ref:$n(dt,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Ae.onClick,()=>{var Mt;q||((Mt=V.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=V.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[N,n,Se,o,q]),at=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:$n(V,dt),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:ka(Ae.onChange,He),onBlur:ka(Ae.onBlur,z,()=>j(!1)),onFocus:ka(Ae.onFocus,$,()=>j(!0)),onKeyDown:ka(Ae.onKeyDown,ct),onKeyUp:ka(Ae.onKeyUp,qe),required:i,checked:Se,disabled:Ue,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,P,a,He,z,$,ct,qe,i,Se,Ue,r,k,T,I,o,u,n,E]),At=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:dt,onMouseDown:ka(Ae.onMouseDown,CL),onTouchStart:ka(Ae.onTouchStart,CL),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:se,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:et,getInputProps:at,getLabelProps:At,htmlProps:N}}function CL(e){e.preventDefault(),e.stopPropagation()}var Ade={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Ide={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Mde=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ode=hd({from:{opacity:0},to:{opacity:1}}),Rde=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),tz=Pe(function(t,n){const r=Cde(),i={...r,...t},o=Ri("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Tde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=kde(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:N,getLabelProps:D,getRootProps:z}=ez({...E,isDisabled:b,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Ode} 20ms linear, ${Rde} 200ms linear`:`${Mde} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return le.createElement(we.label,{__css:{...Ide,...o.container},className:_de("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(P,n)}),le.createElement(we.span,{__css:{...Ade,...o.control},className:"chakra-checkbox__control",...N()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});tz.displayName="Checkbox";function Nde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var ub=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Nde,{width:"1em",height:"1em"}))});ub.displayName="CloseButton";function Dde(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Dde(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function mC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function M4(e,t,n){return(e-t)*100/(n-t)}function nz(e,t,n){return(n-t)*e+t}function vC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=mC(n);return b7(r,i)}function l0(e,t,n){return e==null?e:(nr==null?"":BS(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=rz(_c(v),o),w=n??b,P=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let Y=W;return l&&(Y=l0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(W):Y=_c(v)+W,Y=E(Y),P(Y)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(-W):Y=_c(v)-W,Y=E(Y),P(Y)},[E,o,P,v]),I=C.exports.useCallback(()=>{let W;r==null?W="":W=BS(r,o,n)??a,P(W)},[r,n,o,P,a]),O=C.exports.useCallback(W=>{const Y=BS(W,o,w)??a;P(Y)},[w,o,P,a]),N=_c(v);return{isOutOfRange:N>s||Nx($5,{styles:iz}),Fde=()=>x($5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${iz} - `});function $f(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function $de(e){return"current"in e}var oz=()=>typeof window<"u";function Hde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Wde=e=>oz()&&e.test(navigator.vendor),Vde=e=>oz()&&e.test(Hde()),Ude=()=>Vde(/mac|iphone|ipad|ipod/i),jde=()=>Ude()&&Wde(/apple/i);function Gde(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};$f(i,"pointerdown",o=>{if(!jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=$de(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var qde=$Q?C.exports.useLayoutEffect:C.exports.useEffect;function _L(e,t=[]){const n=C.exports.useRef(e);return qde(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Kde(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Yde(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function O4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_L(n),a=_L(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Kde(r,s),g=Yde(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:HQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=vn(i),s=g7(a),l=Nr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[Zde,az]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=ab(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Zde,{value:r,children:g}))});Xde.displayName="InputGroup";var Qde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Jde=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Qde[r]??{},a=az();return x(Jde,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var sz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});sz.displayName="InputLeftAddon";sz.id="InputLeftAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});lz.displayName="InputRightAddon";lz.id="InputRightAddon";var efe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),cb=Pe(function(t,n){const{placement:r="left",...i}=t,o=az(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(efe,{ref:n,__css:l,...i})});cb.id="InputElement";cb.displayName="InputElement";var uz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(cb,{ref:n,placement:"left",className:o,...i})});uz.id="InputLeftElement";uz.displayName="InputLeftElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(cb,{ref:n,placement:"right",className:o,...i})});cz.id="InputRightElement";cz.displayName="InputRightElement";function tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var nfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});nfe.displayName="AspectRatio";var rfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});rfe.displayName="Badge";var md=we("div");md.displayName="Box";var dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(md,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});dz.displayName="Square";var ife=Pe(function(t,n){const{size:r,...i}=t;return x(dz,{size:r,ref:n,borderRadius:"9999px",...i})});ife.displayName="Circle";var fz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});fz.displayName="Center";var ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:ofe[r],...i,position:"absolute"})});var afe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});afe.displayName="Code";var sfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});sfe.displayName="Container";var lfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});lfe.displayName="Divider";var an=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:g,...h})});an.displayName="Flex";var hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...b})});hz.displayName="Grid";function kL(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ufe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kL(i),gridRow:kL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:g,...h})});ufe.displayName="GridItem";var Hf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Hf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(md,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var cfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});cfe.displayName="Kbd";var Wf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Wf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[dfe,pz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=ab(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(dfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});ffe.displayName="OrderedList";var gz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});gz.displayName="UnorderedList";var mz=Pe(function(t,n){const r=pz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});mz.displayName="ListItem";var hfe=Pe(function(t,n){const r=pz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});hfe.displayName="ListIcon";var pfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=U0(),h=s?mfe(s,u):vfe(r);return x(hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});pfe.displayName="SimpleGrid";function gfe(e){return typeof e=="number"?`${e}px`:e}function mfe(e,t){return od(e,n=>{const r=yoe("sizes",n,gfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function vfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});vz.displayName="Spacer";var yC="& > *:not(style) ~ *:not(style)";function yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[yC]:od(n,i=>r[i])}}function bfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>bfe({spacing:a,direction:v}),[a,v]),P=!!u,E=!g&&!P,k=C.exports.useMemo(()=>{const I=ab(l);return E?I:I.map((O,N)=>{const D=typeof O.key<"u"?O.key:N,z=N+1===I.length,W=g?x(yz,{children:O},D):O;if(!P)return W;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[W,de]},D)})},[u,w,P,E,g,l]),T=Nr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:P?{}:{[yC]:b[yC]},...m},k)});_7.displayName="Stack";var bz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));bz.displayName="HStack";var xfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));xfe.displayName="VStack";var ko=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});ko.displayName="Text";function EL(e){return typeof e=="number"?`${e}px`:e}var Sfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,k=>EL(Pw("space",k)(E))),"--chakra-wrap-y-spacing":E=>od(P,k=>EL(Pw("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,P)=>x(xz,{children:w},P)):a,[a,g]);return le.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Sfe.displayName="Wrap";var xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});xz.displayName="WrapItem";var wfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Sz=wfe,vp=()=>{},Cfe={document:Sz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:vp,removeEventListener:vp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:vp,removeListener:vp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:vp,setInterval:()=>0,clearInterval:vp},_fe=Cfe,kfe={window:_fe,document:Sz},wz=typeof window<"u"?{window,document}:kfe,Cz=C.exports.createContext(wz);Cz.displayName="EnvironmentContext";function _z(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:wz},[r,n]);return ee(Cz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}_z.displayName="EnvironmentProvider";var Efe=e=>e?"":void 0;function Pfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function FS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Tfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,P]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),T=Pfe(),I=G=>{!G||G.tagName!=="BUTTON"&&P(!1)},O=w?g:g||0,N=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{E&&FS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;const V=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),V&&(G.preventDefault(),G.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!FS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),T.remove(document,"mouseup",Y,!1))},[T]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,T,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),re=C.exports.useCallback(G=>{E&&(G.preventDefault(),k(!1)),v?.(G)},[E,v]),se=$n(t,I);return w?{...b,ref:se,type:"button","aria-disabled":N?void 0:n,disabled:N,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:se,role:"button","data-active":Efe(E),"aria-disabled":n?"true":void 0,tabIndex:N?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:W,onKeyDown:$,onMouseOver:te,onMouseLeave:re}}function kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ez(e){if(!kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Lfe(e){var t;return((t=Pz(e))==null?void 0:t.defaultView)??window}function Pz(e){return kz(e)?e.ownerDocument:document}function Afe(e){return Pz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ife=e=>Tz(e)&&e.tabIndex===-1;function Mfe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Lz(e){return e.parentElement&&Lz(e.parentElement)?!0:e.hidden}function Ofe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Az(e){if(!Ez(e)||Lz(e)||Mfe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ofe(e)?!0:Tz(e)}function Rfe(e){return e?Ez(e)&&Az(e)&&!Ife(e):!1}var Nfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Dfe=Nfe.join(),zfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Iz(e){const t=Array.from(e.querySelectorAll(Dfe));return t.unshift(e),t.filter(n=>Az(n)&&zfe(n))}function Bfe(e){const t=e.current;if(!t)return!1;const n=Afe(t);return!n||t.contains(n)?!1:!!Rfe(n)}function Ffe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Bfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var $fe={preventScroll:!0,shouldFocus:!1};function Hfe(e,t=$fe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Wfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Iz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),$f(a,"transitionend",h)}function Wfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Bv=[Io,Ba,Fa,Mo],I0="start",uv="end",Vfe="clippingParents",Mz="viewport",kg="popper",Ufe="reference",PL=Bv.reduce(function(e,t){return e.concat([t+"-"+I0,t+"-"+uv])},[]),Oz=[].concat(Bv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+I0,t+"-"+uv])},[]),jfe="beforeRead",Gfe="read",qfe="afterRead",Kfe="beforeMain",Yfe="main",Zfe="afterMain",Xfe="beforeWrite",Qfe="write",Jfe="afterWrite",ehe=[jfe,Gfe,qfe,Kfe,Yfe,Zfe,Xfe,Qfe,Jfe];function Pl(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function the(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!Pl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function nhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!Pl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const rhe={name:"applyStyles",enabled:!0,phase:"write",fn:the,effect:nhe,requires:["computeStyles"]};function Cl(e){return e.split("-")[0]}var Vf=Math.max,R4=Math.min,M0=Math.round;function bC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Rz(){return!/^((?!chrome|android).)*safari/i.test(bC())}function O0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&M0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M0(r.height)/e.offsetHeight||1);var a=Zf(e)?Wa(e):window,s=a.visualViewport,l=!Rz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=O0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Wa(e).getComputedStyle(e)}function ihe(e){return["table","td","th"].indexOf(Pl(e))>=0}function vd(e){return((Zf(e)?e.ownerDocument:e.document)||window.document).documentElement}function db(e){return Pl(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||vd(e)}function TL(e){return!Na(e)||bu(e).position==="fixed"?null:e.offsetParent}function ohe(e){var t=/firefox/i.test(bC()),n=/Trident/i.test(bC());if(n&&Na(e)){var r=bu(e);if(r.position==="fixed")return null}var i=db(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(Pl(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fv(e){for(var t=Wa(e),n=TL(e);n&&ihe(n)&&bu(n).position==="static";)n=TL(n);return n&&(Pl(n)==="html"||Pl(n)==="body"&&bu(n).position==="static")?t:n||ohe(e)||t}function T7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cm(e,t,n){return Vf(e,R4(t,n))}function ahe(e,t,n){var r=Cm(e,t,n);return r>n?n:r}function Dz(){return{top:0,right:0,bottom:0,left:0}}function zz(e){return Object.assign({},Dz(),e)}function Bz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var she=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zz(typeof t!="number"?t:Bz(t,Bv))};function lhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Cl(n.placement),l=T7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=she(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=Fv(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,I=g[v],O=k-m[h]-g[b],N=k/2-m[h]/2+T,D=Cm(I,N,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-N,t)}}function uhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Nz(t.elements.popper,i)||(t.elements.arrow=i))}const che={name:"arrow",enabled:!0,phase:"main",fn:lhe,effect:uhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function R0(e){return e.split("-")[1]}var dhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:M0(t*i)/i||0,y:M0(n*i)/i||0}}function LL(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Mo,I=Io,O=window;if(u){var N=Fv(n),D="clientHeight",z="clientWidth";if(N===Wa(n)&&(N=vd(n),bu(N).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),N=N,i===Io||(i===Mo||i===Fa)&&o===uv){I=Ba;var $=g&&N===O&&O.visualViewport?O.visualViewport.height:N[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===uv){T=Fa;var W=g&&N===O&&O.visualViewport?O.visualViewport.width:N[z];v-=W-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&dhe),de=h===!0?fhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[T]=E?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Cl(t.placement),variation:R0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LL(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LL(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const phe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hhe,data:{}};var Sy={passive:!0};function ghe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Sy)}),s&&l.addEventListener("resize",n.update,Sy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Sy)}),s&&l.removeEventListener("resize",n.update,Sy)}}const mhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ghe,data:{}};var vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function C3(e){return e.replace(/left|right|bottom|top/g,function(t){return vhe[t]})}var yhe={start:"end",end:"start"};function AL(e){return e.replace(/start|end/g,function(t){return yhe[t]})}function L7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return O0(vd(e)).left+L7(e).scrollLeft}function bhe(e,t){var n=Wa(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Rz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function xhe(e){var t,n=vd(e),r=L7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Vf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=Vf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Fz(e){return["html","body","#document"].indexOf(Pl(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Fz(db(e))}function _m(e,t){var n;t===void 0&&(t=[]);var r=Fz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(_m(db(a)))}function xC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function She(e,t){var n=O0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IL(e,t,n){return t===Mz?xC(bhe(e,n)):Zf(t)?She(t,n):xC(xhe(vd(e)))}function whe(e){var t=_m(db(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&Na(e)?Fv(e):e;return Zf(r)?t.filter(function(i){return Zf(i)&&Nz(i,r)&&Pl(i)!=="body"}):[]}function Che(e,t,n,r){var i=t==="clippingParents"?whe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IL(e,u,r);return l.top=Vf(h.top,l.top),l.right=R4(h.right,l.right),l.bottom=R4(h.bottom,l.bottom),l.left=Vf(h.left,l.left),l},IL(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function $z(e){var t=e.reference,n=e.element,r=e.placement,i=r?Cl(r):null,o=r?R0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?T7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case I0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case uv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Vfe:s,u=n.rootBoundary,h=u===void 0?Mz:u,g=n.elementContext,m=g===void 0?kg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=zz(typeof P!="number"?P:Bz(P,Bv)),k=m===kg?Ufe:kg,T=e.rects.popper,I=e.elements[b?k:m],O=Che(Zf(I)?I:I.contextElement||vd(e.elements.popper),l,h,a),N=O0(e.elements.reference),D=$z({reference:N,element:T,strategy:"absolute",placement:i}),z=xC(Object.assign({},T,D)),$=m===kg?z:N,W={top:O.top-$.top+E.top,bottom:$.bottom-O.bottom+E.bottom,left:O.left-$.left+E.left,right:$.right-O.right+E.right},Y=e.modifiersData.offset;if(m===kg&&Y){var de=Y[i];Object.keys(W).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,re=[Io,Ba].indexOf(j)>=0?"y":"x";W[j]+=de[re]*te})}return W}function _he(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Oz:l,h=R0(r),g=h?s?PL:PL.filter(function(b){return R0(b)===h}):Bv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Cl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function khe(e){if(Cl(e)===k7)return[];var t=C3(e);return[AL(e),t,AL(t)]}function Ehe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=Cl(P),k=E===P,T=l||(k||!b?[C3(P)]:khe(P)),I=[P].concat(T).reduce(function(Se,He){return Se.concat(Cl(He)===k7?_he(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,N=t.rects.popper,D=new Map,z=!0,$=I[0],W=0;W=0,re=te?"width":"height",se=cv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[re]>N[re]&&(G=C3(G));var V=C3(G),q=[];if(o&&q.push(se[de]<=0),s&&q.push(se[G]<=0,se[V]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var Ue=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(et){return et})});if(Ue)return $=Ue,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Phe={name:"flip",enabled:!0,phase:"main",fn:Ehe,requiresIfExists:["offset"],data:{_skip:!1}};function ML(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function OL(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function The(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=cv(t,{elementContext:"reference"}),s=cv(t,{altBoundary:!0}),l=ML(a,r),u=ML(s,i,o),h=OL(l),g=OL(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Lhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:The};function Ahe(e,t,n){var r=Cl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Ihe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Oz.reduce(function(h,g){return h[g]=Ahe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Mhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ihe};function Ohe(e){var t=e.state,n=e.name;t.modifiersData[n]=$z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Rhe={name:"popperOffsets",enabled:!0,phase:"read",fn:Ohe,data:{}};function Nhe(e){return e==="x"?"y":"x"}function Dhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,P=cv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),E=Cl(t.placement),k=R0(t.placement),T=!k,I=T7(E),O=Nhe(I),N=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!N){if(o){var j,te=I==="y"?Io:Mo,re=I==="y"?Ba:Fa,se=I==="y"?"height":"width",G=N[I],V=G+P[te],q=G-P[re],Q=v?-z[se]/2:0,X=k===I0?D[se]:z[se],me=k===I0?-z[se]:-D[se],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dz(),Ue=He[te],ct=He[re],qe=Cm(0,D[se],Se[se]),et=T?D[se]/2-Q-qe-Ue-W.mainAxis:X-qe-Ue-W.mainAxis,tt=T?-D[se]/2+Q+qe+ct+W.mainAxis:me+qe+ct+W.mainAxis,at=t.elements.arrow&&Fv(t.elements.arrow),At=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Ae=G+et-wt-At,dt=G+tt-wt,Mt=Cm(v?R4(V,Ae):V,G,v?Vf(q,dt):q);N[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=N[O],Zt=O==="y"?"height":"width",En=Et+P[xt],yn=Et-P[kn],Me=[Io,Mo].indexOf(E)!==-1,Je=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-Je+W.altAxis,Gt=Me?Et+D[Zt]+z[Zt]-Je-W.altAxis:yn,Ee=v&&Me?ahe(Xt,Et,Gt):Cm(v?Xt:En,Et,v?Gt:yn);N[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const zhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Dhe,requiresIfExists:["offset"]};function Bhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Fhe(e){return e===Wa(e)||!Na(e)?L7(e):Bhe(e)}function $he(e){var t=e.getBoundingClientRect(),n=M0(t.width)/e.offsetWidth||1,r=M0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Hhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&$he(t),o=vd(t),a=O0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pl(t)!=="body"||I7(o))&&(s=Fhe(t)),Na(t)?(l=O0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Whe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Vhe(e){var t=Whe(e);return ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Uhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var RL={placement:"bottom",modifiers:[],strategy:"absolute"};function NL(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:yp("--popper-arrow-shadow-color"),arrowSize:yp("--popper-arrow-size","8px"),arrowSizeHalf:yp("--popper-arrow-size-half"),arrowBg:yp("--popper-arrow-bg"),transformOrigin:yp("--popper-transform-origin"),arrowOffset:yp("--popper-arrow-offset")};function Yhe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Zhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Xhe=e=>Zhe[e],DL={scroll:!0,resize:!0};function Qhe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DL,...e}}:t={enabled:e,options:DL},t}var Jhe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zL(e)},effect:({state:e})=>()=>{zL(e)}},zL=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Xhe(e.placement))},tpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{npe(e)}},npe=e=>{var t;if(!e.placement)return;const n=rpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},rpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},ipe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BL(e)},effect:({state:e})=>()=>{BL(e)}},BL=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Yhe(e.placement)})},ope={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ape={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function spe(e,t="ltr"){var n;const r=((n=ope[e])==null?void 0:n[t])||e;return t==="ltr"?r:ape[e]??r}function Hz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=spe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!b.current||!w.current||((W=k.current)==null||W.call(k),P.current=Khe(b.current,w.current,{placement:E,modifiers:[ipe,tpe,epe,{...Jhe,enabled:!!m},{name:"eventListeners",...Qhe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),k.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!b.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const I=C.exports.useCallback(W=>{b.current=W,T()},[T]),O=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(I,Y)}),[I]),N=C.exports.useCallback(W=>{w.current=W,T()},[T]),D=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(N,Y),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,N,m]),z=C.exports.useCallback((W={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:re,...se}=W;return{...se,ref:Y,"data-popper-arrow":"",style:lpe(W)}},[]),$=C.exports.useCallback((W={},Y=null)=>({...W,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function lpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Wz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function P(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var I;(I=k.onClick)==null||I.call(k,T),w()}}}function E(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function upe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),$f(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Lfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Vz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[cpe,dpe]=Cn({strict:!1,name:"PortalManagerContext"});function Uz(e){const{children:t,zIndex:n}=e;return x(cpe,{value:{zIndex:n},children:t})}Uz.displayName="PortalManager";var[jz,fpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",hpe=".chakra-portal",ppe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),gpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=fpe(),l=dpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(ppe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(jz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},mpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(jz,{value:r?a:null,children:t}),a):null};function oh(e){const{containerRef:t,...n}=e;return t?x(mpe,{containerRef:t,...n}):x(gpe,{...n})}oh.defaultProps={appendToParentPortal:!0};oh.className=M7;oh.selector=hpe;oh.displayName="Portal";var vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bp=new WeakMap,wy=new WeakMap,Cy={},$S=0,ype=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Cy[n]||(Cy[n]=new WeakMap);var o=Cy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(bp.get(m)||0)+1,P=(o.get(m)||0)+1;bp.set(m,w),o.set(m,P),a.push(m),w===1&&b&&wy.set(m,!0),P===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),$S++,function(){a.forEach(function(g){var m=bp.get(g)-1,v=o.get(g)-1;bp.set(g,m),o.set(g,v),m||(wy.has(g)||g.removeAttribute(r),wy.delete(g)),v||g.removeAttribute(n)}),$S--,$S||(bp=new WeakMap,bp=new WeakMap,wy=new WeakMap,Cy={})}},Gz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ype(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},bpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xpe=bpe,Spe=xpe;function qz(){}function Kz(){}Kz.resetWarningCache=qz;var wpe=function(){function e(r,i,o,a,s,l){if(l!==Spe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kz,resetWarningCache:qz};return n.PropTypes=n,n};Rn.exports=wpe();var SC="data-focus-lock",Yz="data-focus-lock-disabled",Cpe="data-no-focus-lock",_pe="data-autofocus-inside",kpe="data-no-autofocus";function Epe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ppe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Zz(e,t){return Ppe(t||null,function(n){return e.forEach(function(r){return Epe(r,n)})})}var HS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Xz(e){return e}function Qz(e,t){t===void 0&&(t=Xz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Xz),Qz(e,t)}function Jz(e){e===void 0&&(e={});var t=Qz(null);return t.options=pl({async:!0,ssr:!1},e),t}var eB=function(e){var t=e.sideCar,n=WD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};eB.isSideCarExport=!0;function Tpe(e,t){return e.useMedium(t),eB}var tB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),nB=R7(),Lpe=R7(),Ape=Jz({async:!0}),Ipe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,k=t.whiteList,T=t.hasPositiveIndices,I=t.shards,O=I===void 0?Ipe:I,N=t.as,D=N===void 0?"div":N,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,re=C.exports.useState({}),se=re[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),V=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var et=typeof Y=="function"?Y(qe):Y;if(et){var tt=typeof et=="object"?et:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(tt)}):qe.focus(tt)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&tB.useMedium(ct)},[]),X=nB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Yz]=g&&"disabled",r[SC]=P,r),$),Se=m!==!0,He=Se&&m!=="tail",Ue=Zz([n,me]);return ee(Kn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:HS},"guard-nearest"):null],!g&&x(W,{id:se,sideCar:Ape,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:V,returnFocus:q,focusOptions:de}),x(D,{ref:Ue,...ye,className:E,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:HS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const rB=N7;function wC(e,t){return wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wC(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wC(e,t)}function iB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mpe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return iB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ol=function(e){for(var t=Array(e.length),n=0;n=0}).sort($pe)},Hpe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Hpe.join(","),Wpe="".concat(B7,", [data-focus-guard]"),hB=function(e,t){var n;return Ol(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Wpe:B7)?[i]:[],hB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(hB(r,t),r.parentNode?Ol(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Vpe=function(e){var t=e.querySelectorAll("[".concat(_pe,"]"));return Ol(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ol(e).filter(function(n){return sB(t,n)}).filter(function(n){return zpe(n)})},FL=function(e,t){return t===void 0&&(t=new Map),Ol(e).filter(function(n){return lB(t,n)})},_C=function(e,t,n){return fB($7(F7(e,n),t),!0,n)},$L=function(e,t){return fB($7(F7(e),t),!1)},Upe=function(e,t){return $7(Vpe(e),t)},dv=function(e,t){return e.shadowRoot?dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ol(e.children).some(function(n){return dv(n,t)})},jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},pB=function(e){return e.parentNode?pB(e.parentNode):e},H7=function(e){var t=CC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(SC);return n.push.apply(n,i?jpe(Ol(pB(r).querySelectorAll("[".concat(SC,'="').concat(i,'"]:not([').concat(Yz,'="disabled"])')))):[r]),n},[])},gB=function(e){return e.activeElement?e.activeElement.shadowRoot?gB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?gB(document.activeElement.shadowRoot):document.activeElement:void 0},Gpe=function(e){return e===document.activeElement},qpe=function(e){return Boolean(Ol(e.querySelectorAll("iframe")).some(function(t){return Gpe(t)}))},mB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return dv(n,t)||qpe(n)})},Kpe=function(){var e=document&&W7();return e?Ol(document.querySelectorAll("[".concat(Cpe,"]"))).some(function(t){return dv(t,e)}):!1},Ype=function(e,t){return t.filter(dB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return dB(e)&&e.name?Ype(e,t):e},Zpe=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HL=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WL=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},vB="NEW_FOCUS",Xpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Zpe(t),w=n!==void 0?b.indexOf(n):-1,P=w-(r?b.indexOf(r):l),E=WL(e,0),k=WL(e,i-1);if(l===-1||h===-1)return vB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(P)>1)return h;if(l<=m)return k;if(l>v)return E;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},Qpe=function(e){return function(t){var n,r=(n=uB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Jpe=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FL(r.filter(Qpe(n)));return i&&i.length?HL(i):HL(FL(t))},kC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&kC(e.parentNode.host||e.parentNode,t),t},WS=function(e,t){for(var n=kC(e),r=kC(t),i=0;i=0)return o}return!1},yB=function(e,t,n){var r=CC(e),i=CC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=WS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=WS(o,l);u&&(!a||dv(u,a)?a=u:a=WS(u,a))})}),a},e0e=function(e,t){return e.reduce(function(n,r){return n.concat(Upe(r,t))},[])},t0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Fpe)},n0e=function(e,t){var n=document&&W7(),r=H7(e).filter(N4),i=yB(n||e,e,r),o=new Map,a=$L(r,o),s=_C(r,o).filter(function(m){var v=m.node;return N4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$L([i],o).map(function(m){var v=m.node;return v}),u=t0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=Xpe(h,l,n,t);return g===vB?{node:Jpe(a,h,e0e(r,o))}:g===void 0?g:u[g]}},r0e=function(e){var t=H7(e).filter(N4),n=yB(e,e,t),r=new Map,i=_C([n],r,!0),o=_C(t,r).filter(function(a){var s=a.node;return N4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},i0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},VS=0,US=!1,o0e=function(e,t,n){n===void 0&&(n={});var r=n0e(e,t);if(!US&&r){if(VS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),US=!0,setTimeout(function(){US=!1},1);return}VS++,i0e(r.node,n.focusOptions),VS--}};const bB=o0e;function xB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var a0e=function(){return document&&document.activeElement===document.body},s0e=function(){return a0e()||Kpe()},u0=null,Up=null,c0=null,fv=!1,l0e=function(){return!0},u0e=function(t){return(u0.whiteList||l0e)(t)},c0e=function(t,n){c0={observerNode:t,portaledElement:n}},d0e=function(t){return c0&&c0.portaledElement===t};function VL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var f0e=function(t){return t&&"current"in t?t.current:t},h0e=function(t){return t?Boolean(fv):fv==="meanwhile"},p0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},g0e=function(t,n){return n.some(function(r){return p0e(t,r,r)})},D4=function(){var t=!1;if(u0){var n=u0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||c0&&c0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(f0e).filter(Boolean));if((!h||u0e(h))&&(i||h0e(s)||!s0e()||!Up&&o)&&(u&&!(mB(g)||h&&g0e(h,g)||d0e(h))&&(document&&!Up&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=bB(g,Up,{focusOptions:l}),c0={})),fv=!1,Up=document&&document.activeElement),document){var m=document&&document.activeElement,v=r0e(g),b=v.map(function(w){var P=w.node;return P}).indexOf(m);b>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),VL(b,v.length,1,v),VL(b,-1,-1,v))}}}return t},SB=function(t){D4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return xB(D4)},m0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||c0e(r,n)},v0e=function(){return null},wB=function(){fv="just",setTimeout(function(){fv="meanwhile"},0)},y0e=function(){document.addEventListener("focusin",SB),document.addEventListener("focusout",U7),window.addEventListener("blur",wB)},b0e=function(){document.removeEventListener("focusin",SB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",wB)};function x0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function S0e(e){var t=e.slice(-1)[0];t&&!u0&&y0e();var n=u0,r=n&&t&&t.id===n.id;u0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Up=null,(!r||n.observed!==t.observed)&&t.onActivation(),D4(),xB(D4)):(b0e(),Up=null)}tB.assignSyncMedium(m0e);nB.assignMedium(U7);Lpe.assignMedium(function(e){return e({moveFocusInside:bB,focusInside:mB})});const w0e=Mpe(x0e,S0e)(v0e);var CB=C.exports.forwardRef(function(t,n){return x(rB,{sideCar:w0e,ref:n,...t})}),_B=rB.propTypes||{};_B.sideCar;O7(_B,["sideCar"]);CB.propTypes={};const C0e=CB;var kB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Iz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(C0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};kB.displayName="FocusLock";var _3="right-scroll-bar-position",k3="width-before-scroll-bar",_0e="with-scroll-bars-hidden",k0e="--removed-body-scroll-bar-size",EB=Jz(),jS=function(){},fb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:jS,onWheelCapture:jS,onTouchMoveCapture:jS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,k=WD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,I=Zz([n,t]),O=pl(pl({},k),i);return ee(Kn,{children:[h&&x(T,{sideCar:EB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},O),{ref:I})):x(E,{...pl({},O,{className:l,ref:I}),children:s})]})});fb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fb.classNames={fullWidth:k3,zeroRight:_3};var E0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function P0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E0e();return t&&e.setAttribute("nonce",t),e}function T0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function L0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=P0e())&&(T0e(t,n),L0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I0e=function(){var e=A0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},PB=function(){var e=I0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},M0e={left:0,top:0,right:0,gap:0},GS=function(e){return parseInt(e||"",10)||0},O0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[GS(n),GS(r),GS(i)]},R0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M0e;var t=O0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},N0e=PB(),D0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(_0e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(_3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(k3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(_3," .").concat(_3,` { - right: 0 `).concat(r,`; - } - - .`).concat(k3," .").concat(k3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(k0e,": ").concat(s,`px; - } -`)},z0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return R0e(i)},[i]);return x(N0e,{styles:D0e(o,!t,i,n?"":"!important")})},EC=!1;if(typeof window<"u")try{var _y=Object.defineProperty({},"passive",{get:function(){return EC=!0,!0}});window.addEventListener("test",_y,_y),window.removeEventListener("test",_y,_y)}catch{EC=!1}var xp=EC?{passive:!1}:!1,B0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B0e(e)&&n[t]==="visible")},F0e=function(e){return TB(e,"overflowY")},$0e=function(e){return TB(e,"overflowX")},UL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=LB(e,n);if(r){var i=AB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},H0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},W0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},LB=function(e,t){return e==="v"?F0e(t):$0e(t)},AB=function(e,t){return e==="v"?H0e(t):W0e(t)},V0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},U0e=function(e,t,n,r,i){var o=V0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=AB(e,s),b=v[0],w=v[1],P=v[2],E=w-P-o*b;(b||E)&&LB(e,s)&&(g+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},ky=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jL=function(e){return[e.deltaX,e.deltaY]},GL=function(e){return e&&"current"in e?e.current:e},j0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},G0e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},q0e=0,Sp=[];function K0e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(q0e++)[0],o=C.exports.useState(function(){return PB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=cC([e.lockRef.current],(e.shards||[]).map(GL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=ky(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-E[0],I="deltaY"in w?w.deltaY:k[1]-E[1],O,N=w.target,D=Math.abs(T)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&N.type==="range")return!1;var z=UL(D,N);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UL(D,N)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||I)&&(r.current=O),!O)return!0;var $=r.current||O;return U0e($,P,w,$==="h"?T:I,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!Sp.length||Sp[Sp.length-1]!==o)){var E="deltaY"in P?jL(P):ky(P),k=t.current.filter(function(O){return O.name===P.type&&O.target===P.target&&j0e(O.delta,E)})[0];if(k&&k.should){P.cancelable&&P.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(GL).filter(Boolean).filter(function(O){return O.contains(P.target)}),I=T.length>0?s(P,T[0]):!a.current.noIsolation;I&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,k){var T={name:w,delta:P,target:E,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(I){return I!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=ky(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,ky(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Sp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,xp),document.addEventListener("touchmove",l,xp),document.addEventListener("touchstart",h,xp),function(){Sp=Sp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,xp),document.removeEventListener("touchmove",l,xp),document.removeEventListener("touchstart",h,xp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Kn,{children:[b?x(o,{styles:G0e(i)}):null,v?x(z0e,{gapMode:"margin"}):null]})}const Y0e=Tpe(EB,K0e);var IB=C.exports.forwardRef(function(e,t){return x(fb,{...pl({},e,{ref:t,sideCar:Y0e})})});IB.classNames=fb.classNames;const MB=IB;var ah=(...e)=>e.filter(Boolean).join(" ");function Ug(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var Z0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},PC=new Z0e;function X0e(e,t){C.exports.useEffect(()=>(t&&PC.add(e),()=>{PC.remove(e)}),[t,e])}function Q0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=e1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");J0e(u,t&&a),X0e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[T,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:Ug(z.onClick,W=>W.stopPropagation())}),[v,T,g,m,E]),N=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!PC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Ug(z.onClick,N),onKeyDown:Ug(z.onKeyDown,P),onMouseDown:Ug(z.onMouseDown,w)}),[P,w,N]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function J0e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Gz(e.current)},[t,e,n])}function e1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[t1e,sh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[n1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),P={...Q0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(n1e,{value:P,children:x(t1e,{value:b,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(oh,{...t,children:n})})})})};N0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};N0.displayName="Modal";var z4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__body",n),s=sh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});z4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=ah("chakra-modal__close-btn",r),s=sh();return x(ub,{ref:t,__css:s.closeButton,className:a,onClick:Ug(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function OB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(kB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(MB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var r1e={slideInBottom:{...fC,custom:{offsetY:16,reverse:!0}},slideInRight:{...fC,custom:{offsetX:16,reverse:!0}},scale:{...jD,custom:{initialScale:.95,reverse:!0}},none:{}},i1e=we(Ml.section),o1e=e=>r1e[e||"none"],RB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=o1e(n),...i}=e;return x(i1e,{ref:t,...r,...i})});RB.displayName="ModalTransition";var hv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=ah("chakra-modal__content",n),m=sh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(OB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(RB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});hv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=ah("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...sh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ah("chakra-modal__header",n),l={flex:0,...sh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var a1e=we(Ml.div),pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ah("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...sh().overlay},{motionPreset:u}=ad();return x(a1e,{...i||(u==="none"?{}:UD),__css:l,ref:t,className:a,...o})});pv.displayName="ModalOverlay";function s1e(e){const{leastDestructiveRef:t,...n}=e;return x(N0,{...n,initialFocusRef:t})}var l1e=Pe((e,t)=>x(hv,{ref:t,role:"alertdialog",...e})),[Kke,u1e]=Cn(),c1e=we(GD),d1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=ah("chakra-modal__content",n),v=sh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=u1e();return le.createElement(OB,null,le.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(c1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:b,children:r})))});d1e.displayName="DrawerContent";function f1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var NB=(...e)=>e.filter(Boolean).join(" "),qS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var h1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),p1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function qL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var g1e=50,KL=300;function m1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);f1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?g1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KL)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var v1e=/^[Ee0-9+\-.]$/;function y1e(e){return v1e.test(e)}function b1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function x1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:P,name:E,"aria-describedby":k,"aria-label":T,"aria-labelledby":I,onFocus:O,onBlur:N,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:W,parse:Y,...de}=e,j=dr(O),te=dr(N),re=dr(D),se=dr($??y1e),G=dr(z),V=zde(e),{update:q,increment:Q,decrement:X}=V,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),et=C.exports.useCallback(Ee=>Ee.split("").filter(se).join(""),[se]),tt=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),at=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);id(()=>{(V.valueAsNumber>o||V.valueAsNumber{if(!He.current)return;if(He.current.value!=V.value){const It=tt(He.current.value);V.setValue(et(It))}},[tt,et]);const At=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Ae=m1e(At,wt);qL(ct,"disabled",Ae.stop,Ae.isSpinning),qL(qe,"disabled",Ae.stop,Ae.isSpinning);const dt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=tt(Ee.currentTarget.value);q(et(Ne)),Ue.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,et,tt]),Mt=C.exports.useCallback(Ee=>{var It;j?.(Ee),Ue.current&&(Ee.target.selectionStart=Ue.current.start??((It=Ee.currentTarget.value)==null?void 0:It.length),Ee.currentTarget.selectionEnd=Ue.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;b1e(Ee,se)||Ee.preventDefault();const It=xt(Ee)*a,Ne=Ee.key,ln={ArrowUp:()=>At(It),ArrowDown:()=>wt(It),Home:()=>q(i),End:()=>q(o)}[Ne];ln&&(Ee.preventDefault(),ln(Ee))},[se,a,At,wt,q,i,o]),xt=Ee=>{let It=1;return(Ee.metaKey||Ee.ctrlKey)&&(It=.1),Ee.shiftKey&&(It=10),It},kn=C.exports.useMemo(()=>{const Ee=G?.(V.value);if(Ee!=null)return Ee;const It=V.value.toString();return It||void 0},[V.value,G]),Et=C.exports.useCallback(()=>{let Ee=V.value;if(V.value==="")return;/^[eE]/.test(V.value.toString())?V.setValue(""):(V.valueAsNumbero&&(Ee=o),V.cast(Ee))},[V,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),En()},[En,Ae]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),En()},[En,Ae]);$f(()=>He.current,"wheel",Ee=>{var It;const st=(((It=He.current)==null?void 0:It.ownerDocument)??document).activeElement===He.current;if(!v||!st)return;Ee.preventDefault();const ln=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?At(ln):Dn===1&&wt(ln)},{passive:!1});const Je=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMax;return{...Ee,ref:$n(It,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||yn(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMax,r,yn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMin;return{...Ee,ref:$n(It,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||Me(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":qS(Ne)}},[V.isAtMin,r,Me,Ae.stop,l]),Gt=C.exports.useCallback((Ee={},It=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":T,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,It),value:at(V.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(V.valueAsNumber)?void 0:V.valueAsNumber,"aria-invalid":qS(h??V.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,dt),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[E,m,g,I,T,at,k,b,l,u,s,h,V.value,V.valueAsNumber,V.isOutOfRange,i,o,kn,dt,ut,Mt,te,Zt]);return{value:at(V.value),valueAsNumber:V.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Gt,htmlProps:de}}var[S1e,hb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[w1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=vn(t),o=m7(i),{htmlProps:a,...s}=x1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(w1e,{value:l},le.createElement(S1e,{value:r},le.createElement(we.div,{...a,ref:n,className:NB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var DB=Pe(function(t,n){const r=hb();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});DB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=hb();return le.createElement(we.input,{...i,className:NB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var zB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=hb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(zB,{...o,__css:r.stepper,children:t.children??x(h1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=hb();return x(zB,{...i,__css:o.stepper,children:t.children??x(p1e,{})})});Q7.displayName="NumberIncrementStepper";var $v=(...e)=>e.filter(Boolean).join(" ");function C1e(e,...t){return _1e(e)?e(...t):e}var _1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function k1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[E1e,lh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[P1e,Hv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wp={click:"click",hover:"hover"};function T1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=wp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:P,onClose:E,onOpen:k,onToggle:T}=Wz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[re,se,G,V]=["popover-trigger","popover-content","popover-header","popover-body"].map(dt=>`${dt}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Hz({...w,enabled:P||!!b}),Se=upe({isOpen:P,ref:N});Gde({enabled:P,ref:O}),Ffe(N,{focusRef:O,visible:P,shouldFocus:o&&u===wp.click}),Hfe(N,{focusRef:r,visible:P,shouldFocus:a&&u===wp.click});const He=Vz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),Ue=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,style:{...dt.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(N,Mt),children:He?dt.children:null,id:se,tabIndex:-1,role:"dialog",onKeyDown:il(dt.onKeyDown,xt=>{n&&xt.key==="Escape"&&E()}),onBlur:il(dt.onBlur,xt=>{const kn=YL(xt),Et=KS(N.current,kn),Zt=KS(O.current,kn);P&&t&&(!Et&&!Zt)&&E()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?V:void 0};return u===wp.hover&&(ut.role="tooltip",ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(dt.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),g))})),ut},[He,se,$,G,Y,V,u,n,E,P,t,g,l,s]),ct=C.exports.useCallback((dt={},Mt=null)=>X({...dt,style:{visibility:P?"visible":"hidden",...dt.style}},Mt),[P,X]),qe=C.exports.useCallback((dt,Mt=null)=>({...dt,ref:$n(Mt,I,q)}),[I,q]),et=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(dt=>{I.current==null&&q(dt)},[q]),At=C.exports.useCallback((dt={},Mt=null)=>{const ut={...dt,ref:$n(O,Mt,at),id:re,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":se};return u===wp.click&&(ut.onClick=il(dt.onClick,T)),u===wp.hover&&(ut.onFocus=il(dt.onFocus,()=>{et.current===void 0&&k()}),ut.onBlur=il(dt.onBlur,xt=>{const kn=YL(xt),Et=!KS(N.current,kn);P&&t&&Et&&E()}),ut.onKeyDown=il(dt.onKeyDown,xt=>{xt.key==="Escape"&&E()}),ut.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0,et.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(dt.onMouseLeave,()=>{D.current=!1,et.current&&(clearTimeout(et.current),et.current=void 0),tt.current=window.setTimeout(()=>{D.current===!1&&E()},g)})),ut},[re,P,se,u,at,T,k,t,E,h,g]);C.exports.useEffect(()=>()=>{et.current&&clearTimeout(et.current),tt.current&&clearTimeout(tt.current)},[]);const wt=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:G,ref:$n(Mt,ut=>{W(!!ut)})}),[G]),Ae=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:V,ref:$n(Mt,ut=>{de(!!ut)})}),[V]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:Ue,getTriggerProps:At,getHeaderProps:wt,getBodyProps:Ae}}function KS(e,t){return e===t||e?.contains(t)}function YL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=vn(e),i=U0(),o=T1e({...r,direction:i.direction});return x(E1e,{value:o,children:x(P1e,{value:t,children:C1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=lh(),a=Hv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:$v("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var L1e=Pe(function(t,n){const{getBodyProps:r}=lh(),i=Hv();return le.createElement(we.div,{...r(t,n),className:$v("chakra-popover__body",t.className),__css:i.body})});L1e.displayName="PopoverBody";var A1e=Pe(function(t,n){const{onClose:r}=lh(),i=Hv();return x(ub,{size:"sm",onClick:r,className:$v("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});A1e.displayName="PopoverCloseButton";function I1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var M1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},O1e=we(Ml.section),BB=Pe(function(t,n){const{variants:r=M1e,...i}=t,{isOpen:o}=lh();return le.createElement(O1e,{ref:n,variants:I1e(r),initial:!1,animate:o?"enter":"exit",...i})});BB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=lh(),u=Hv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(BB,{...i,...a(o,n),onAnimationComplete:k1e(l,o.onAnimationComplete),className:$v("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var R1e=Pe(function(t,n){const{getHeaderProps:r}=lh(),i=Hv();return le.createElement(we.header,{...r(t,n),className:$v("chakra-popover__header",t.className),__css:i.header})});R1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=lh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function N1e(e,t,n){return(e-t)*100/(n-t)}var D1e=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),z1e=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),B1e=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),F1e=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function FB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=N1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var $B=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${z1e} 2s linear infinite`:void 0},...r})};$B.displayName="Shape";var TC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});TC.displayName="Circle";var $1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=FB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,k=v?{css:{animation:`${D1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee($B,{size:n,isIndeterminate:v,children:[x(TC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(TC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});$1e.displayName="CircularProgress";var[H1e,W1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),V1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=FB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...W1e().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),HB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),P=Ri("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),k={animation:`${F1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${B1e} 1s ease infinite normal none running`}},N={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:N,...w},ee(H1e,{value:P,children:[x(V1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:E,title:v,role:b}),l]}))});HB.displayName="Progress";var U1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});U1e.displayName="CircularProgressLabel";var j1e=(...e)=>e.filter(Boolean).join(" "),G1e=e=>e?"":void 0;function q1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var WB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:j1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});WB.displayName="SelectField";var VB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,P]=q1e(b,bX),E=g7(P),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(WB,{ref:t,height:u??l,minH:h??g,placeholder:o,...E,__css:T,children:e.children}),x(UB,{"data-disabled":G1e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});VB.displayName="Select";var K1e=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Y1e=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),UB=e=>{const{children:t=x(K1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Y1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};UB.displayName="SelectIcon";function Z1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function X1e(e){const t=J1e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function jB(e){return!!e.touches}function Q1e(e){return jB(e)&&e.touches.length>1}function J1e(e){return e.view??window}function ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function tge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function GB(e,t="page"){return jB(e)?ege(e,t):tge(e,t)}function nge(e){return t=>{const n=X1e(t);(!n||n&&t.button===0)&&e(t)}}function rge(e,t=!1){function n(i){e(i,{point:GB(i)})}return t?nge(n):n}function E3(e,t,n,r){return Z1e(e,t,rge(n,t==="pointerdown"),r)}function qB(e){const t=C.exports.useRef(null);return t.current=e,t}var ige=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Q1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:GB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,YS(r,this.history)),this.removeListeners=sge(E3(this.win,"pointermove",this.onPointerMove),E3(this.win,"pointerup",this.onPointerUp),E3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=YS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=lge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=YS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),MQ.update(this.updatePoint)}};function ZL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function YS(e,t){return{point:e.point,delta:ZL(e.point,t[t.length-1]),offset:ZL(e.point,t[0]),velocity:age(t,.1)}}var oge=e=>e*1e3;function age(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function sge(...e){return t=>e.reduce((n,r)=>r(n),t)}function ZS(e,t){return Math.abs(e-t)}function XL(e){return"x"in e&&"y"in e}function lge(e,t){if(typeof e=="number"&&typeof t=="number")return ZS(e,t);if(XL(e)&&XL(t)){const n=ZS(e.x,t.x),r=ZS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function KB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=qB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new ige(v,h.current,s)}return E3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function uge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var cge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function dge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function YB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return cge(()=>{const a=e(),s=a.map((l,u)=>uge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(dge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function fge(e){return typeof e=="object"&&e!==null&&"current"in e}function hge(e){const[t]=YB({observeMutation:!1,getNodes(){return[fge(e)?e.current:e]}});return t}var pge=Object.getOwnPropertyNames,gge=(e,t)=>function(){return e&&(t=(0,e[pge(e)[0]])(e=0)),t},yd=gge({"../../../react-shim.js"(){}});yd();yd();yd();var La=e=>e?"":void 0,d0=e=>e?!0:void 0,bd=(...e)=>e.filter(Boolean).join(" ");yd();function f0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function mge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function jg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P3={width:0,height:0},Ey=e=>e||P3;function ZB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??P3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...jg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>Ey(w).height>Ey(P).height?w:P,P3):r.reduce((w,P)=>Ey(w).width>Ey(P).width?w:P,P3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...jg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...jg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...jg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function XB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...N}=e,D=dr(m),z=dr(v),$=dr(w),W=XB({isReversed:a,direction:s,orientation:l}),[Y,de]=U5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[re,se]=C.exports.useState(!1),[G,V]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map($e=>l0($e,t,n)),me=O*b,ye=yge(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map($e=>n-$e+t),ct=(W?He:X).map($e=>M4($e,t,n)),qe=l==="vertical",et=C.exports.useRef(null),tt=C.exports.useRef(null),at=YB({getNodes(){const $e=tt.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),At=C.exports.useId(),Ae=mge(u??At),dt=C.exports.useCallback($e=>{var pt;if(!et.current)return;Se.current.eventSource="pointer";const rt=et.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?rt.bottom-Qt:Nt-rt.left,lo=qe?rt.height:rt.width;let pi=Qn/lo;return W&&(pi=1-pi),nz(pi,t,n)},[qe,W,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!q)return;const rt=Se.current.valueBounds[$e];pt=parseFloat(vC(pt,rt.min,ut)),pt=l0(pt,rt.min,rt.max);const Nt=[...Se.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:V,stepUp($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt-pt:rt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=ut){const rt=Se.current.value[$e],Nt=W?rt+pt:rt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(Q.current)}}),[ut,W,de,q]),kn=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>ZB({isReversed:W,orientation:l,thumbRects:at,thumbPercents:ct}),[W,l,ct,at]),Me=C.exports.useCallback($e=>{var pt;const rt=$e??G;if(rt!==-1&&I){const Nt=Ae.getThumb(rt),Qt=(pt=tt.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Ae]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=$e=>{const pt=dt($e)||0,rt=Se.current.value.map(pi=>Math.abs(pi-pt)),Nt=Math.min(...rt);let Qt=rt.indexOf(Nt);const Qn=rt.filter(pi=>pi===Nt);Qn.length>1&&pt>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),V(Qt),xt.setValueAtIndex(Qt,pt),Me(Qt)},Xt=$e=>{if(G==-1)return;const pt=dt($e)||0;V(G),xt.setValueAtIndex(G,pt),Me(G)};KB(tt,{onPanSessionStart($e){!q||(te(!0),Je($e),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan($e){!q||Xt($e)}});const Gt=C.exports.useCallback(($e={},pt=null)=>({...$e,...N,id:Ae.root,ref:$n(pt,tt),tabIndex:-1,"aria-disabled":d0(h),"data-focused":La(re),style:{...$e.style,...Zt}}),[N,h,re,Zt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,et),id:Ae.track,"data-disabled":La(h),style:{...$e.style,...En}}),[h,En,Ae]),It=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...yn}}),[yn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e,Qt=X[rt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[rt];return{...Nt,ref:pt,role:"slider",tabIndex:q?0:void 0,id:Ae.getThumb(rt),"data-active":La(j&&G===rt),"aria-valuetext":$?.(Qt)??P?.[rt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E?.[rt],"aria-labelledby":E?.[rt]?void 0:k?.[rt],style:{...$e.style,...Et(rt)},onKeyDown:f0($e.onKeyDown,kn),onFocus:f0($e.onFocus,()=>{se(!0),V(rt)}),onBlur:f0($e.onBlur,()=>{se(!1),V(-1)})}},[Ae,X,ye,q,j,G,$,P,l,h,g,E,k,Et,kn,se]),st=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:X.map((rt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,X]),ln=C.exports.useCallback(($e,pt=null)=>{const{value:rt,...Nt}=$e,Qt=!(rtn),Qn=rt>=X[0]&&rt<=X[X.length-1];let lo=M4(rt,t,n);lo=W?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...jg({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!Qt),"data-highlighted":La(Qn),style:{...$e.style,...pi}}},[h,W,n,t,l,X,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:rt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(rt),type:"hidden",value:X[rt],name:Array.isArray(T)?T[rt]:`${T}-${rt}`}},[T,X,Ae]);return{state:{value:X,isFocused:re,isDragging:j,getThumbPercent:$e=>ct[$e],getThumbMinValue:$e=>ye[$e].min,getThumbMaxValue:$e=>ye[$e].max},actions:xt,getRootProps:Gt,getTrackProps:Ee,getInnerTrackProps:It,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Dn,getOutputProps:st}}function yge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[bge,pb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[xge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),QB=Pe(function(t,n){const r=Ri("Slider",t),i=vn(t),{direction:o}=U0();i.direction=o;const{getRootProps:a,...s}=vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(bge,{value:l},le.createElement(xge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});QB.defaultProps={orientation:"horizontal"};QB.displayName="RangeSlider";var Sge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=pb(),a=r_(),s=r(t,n);return le.createElement(we.div,{...s,className:bd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Sge.displayName="RangeSliderThumb";var wge=Pe(function(t,n){const{getTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:bd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});wge.displayName="RangeSliderTrack";var Cge=Pe(function(t,n){const{getInnerTrackProps:r}=pb(),i=r_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Cge.displayName="RangeSliderFilledTrack";var _ge=Pe(function(t,n){const{getMarkerProps:r}=pb(),i=r(t,n);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",t.className)})});_ge.displayName="RangeSliderMark";yd();yd();function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:T,focusThumbOnChange:I=!0,...O}=e,N=dr(m),D=dr(v),z=dr(w),$=XB({isReversed:a,direction:s,orientation:l}),[W,Y]=U5({value:i,defaultValue:o??Pge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,re]=C.exports.useState(!1),se=!(h||g),G=(n-t)/10,V=b||(n-t)/100,q=l0(W,t,n),Q=n-q+t,me=M4($?Q:q,t,n),ye=l==="vertical",Se=qB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:se,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),et=u??qe,[tt,at]=[`slider-thumb-${et}`,`slider-track-${et}`],At=C.exports.useCallback(Ne=>{var st;if(!He.current)return;const ln=Se.current;ln.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((st=Ne.touches)==null?void 0:st[0])??Ne,rt=ye?Dn.bottom-pt:$e-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=rt/Nt;$&&(Qt=1-Qt);let Qn=nz(Qt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(vC(Qn,ln.min,ln.step))),Qn=l0(Qn,ln.min,ln.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const st=Se.current;!st.isInteractive||(Ne=parseFloat(vC(Ne,st.min,V)),Ne=l0(Ne,st.min,st.max),Y(Ne))},[V,Y,Se]),Ae=C.exports.useMemo(()=>({stepUp(Ne=V){const st=$?q-Ne:q+Ne;wt(st)},stepDown(Ne=V){const st=$?q+Ne:q-Ne;wt(st)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,V,o]),dt=C.exports.useCallback(Ne=>{const st=Se.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(G),PageDown:()=>Ae.stepDown(G),Home:()=>wt(st.min),End:()=>wt(st.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),st.eventSource="keyboard")},[Ae,wt,G,Se]),Mt=z?.(q)??P,ut=hge(Ue),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,st=ut??{width:0,height:0};return ZB({isReversed:$,orientation:Ne.orientation,thumbRects:[st],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var st;return(st=Ue.current)==null?void 0:st.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const st=At(Ne);st!=null&&st!==Se.current.value&&Y(st)}KB(ct,{onPanSessionStart(Ne){const st=Se.current;!st.isInteractive||(j(!0),En(),yn(Ne),N?.(st.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},st=null)=>({...Ne,...O,ref:$n(st,ct),tabIndex:-1,"aria-disabled":d0(h),"data-focused":La(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),Je=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,He),id:at,"data-disabled":La(h),style:{...Ne.style,...Et}}),[h,at,Et]),Xt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,style:{...Ne.style,...Zt}}),[Zt]),Gt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,Ue),role:"slider",tabIndex:se?0:void 0,id:tt,"data-active":La(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:f0(Ne.onKeyDown,dt),onFocus:f0(Ne.onFocus,()=>re(!0)),onBlur:f0(Ne.onBlur,()=>re(!1))}),[se,tt,de,Mt,t,n,q,l,h,g,E,k,xt,dt]),Ee=C.exports.useCallback((Ne,st=null)=>{const ln=!(Ne.valuen),Dn=q>=Ne.value,$e=M4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Ege({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:st,role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!ln),"data-highlighted":La(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,q]),It=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,type:"hidden",value:q,name:T}),[T,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Ae,getRootProps:Me,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Gt,getMarkerProps:Ee,getInputProps:It}}function Ege(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Pge(e,t){return t"}),[Lge,mb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=vn(e),{direction:i}=U0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=kge(r),l=a(),u=o({},t);return le.createElement(Tge,{value:s},le.createElement(Lge,{value:n},le.createElement(we.div,{...l,className:bd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var JB=Pe((e,t)=>{const{getThumbProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__thumb",e.className),__css:r.thumb})});JB.displayName="SliderThumb";var eF=Pe((e,t)=>{const{getTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__track",e.className),__css:r.track})});eF.displayName="SliderTrack";var tF=Pe((e,t)=>{const{getInnerTrackProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});tF.displayName="SliderFilledTrack";var LC=Pe((e,t)=>{const{getMarkerProps:n}=gb(),r=mb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",e.className),__css:r.mark})});LC.displayName="SliderMark";var Age=(...e)=>e.filter(Boolean).join(" "),QL=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:Age("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QL(s.isChecked),"data-hover":QL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var Z0=(...e)=>e.filter(Boolean).join(" ");function AC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ige,nF,Mge,Oge]=hN();function Rge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=U5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Mge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Nge,Wv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Dge(e){const{focusedIndex:t,orientation:n,direction:r}=Wv(),i=nF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:AC(e.onKeyDown,o)}}function zge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Wv(),{index:u,register:h}=Oge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Tfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:AC(e.onClick,m)}),w="button";return{...b,id:rF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":iF(a,u),onFocus:t?void 0:AC(e.onFocus,v)}}var[Bge,Fge]=Cn({});function $ge(e){const t=Wv(),{id:n,selectedIndex:r}=t,o=ab(e.children).map((a,s)=>C.exports.createElement(Bge,{key:s,value:{isSelected:s===r,id:iF(n,s),tabId:rF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Hge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Wv(),{isSelected:o,id:a,tabId:s}=Fge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Vz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Wge(){const e=Wv(),t=nF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function rF(e,t){return`${e}--tab-${t}`}function iF(e,t){return`${e}--tabpanel-${t}`}var[Vge,Vv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),oF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Rge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return le.createElement(Ige,{value:l},le.createElement(Nge,{value:h},le.createElement(Vge,{value:r},le.createElement(we.div,{className:Z0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});oF.displayName="Tabs";var Uge=Pe(function(t,n){const r=Wge(),i={...t.style,...r},o=Vv();return le.createElement(we.div,{ref:n,...t,className:Z0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Uge.displayName="TabIndicator";var jge=Pe(function(t,n){const r=Dge({...t,ref:n}),o={display:"flex",...Vv().tablist};return le.createElement(we.div,{...r,className:Z0("chakra-tabs__tablist",t.className),__css:o})});jge.displayName="TabList";var aF=Pe(function(t,n){const r=Hge({...t,ref:n}),i=Vv();return le.createElement(we.div,{outline:"0",...r,className:Z0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});aF.displayName="TabPanel";var sF=Pe(function(t,n){const r=$ge(t),i=Vv();return le.createElement(we.div,{...r,width:"100%",ref:n,className:Z0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});sF.displayName="TabPanels";var lF=Pe(function(t,n){const r=Vv(),i=zge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:Z0("chakra-tabs__tab",t.className),__css:o})});lF.displayName="Tab";var Gge=(...e)=>e.filter(Boolean).join(" ");function qge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Kge=["h","minH","height","minHeight"],uF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=g7(o),s=i?qge(n,Kge):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Gge("chakra-textarea",r),__css:s})});uF.displayName="Textarea";function Yge(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return Zge(e)?e(...t):e}var Zge=e=>typeof e=="function";function Xge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Qge=(e,t)=>e.find(n=>n.id===t);function JL(e,t){const n=cF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function cF(e,t){for(const[n,r]of Object.entries(e))if(Qge(r,t))return n}function Jge(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var tme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=nme(tme);function nme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=rme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=JL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:dF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=cF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(JL(gl.getState(),i).position)}}var eA=0;function rme(e,t={}){eA+=1;const n=t.id??eA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ime=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(KD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(ZD,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(XD,{id:u?.title,children:i}),s&&x(YD,{id:u?.description,display:"block",children:s})),o&&x(ub,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function dF(e={}){const{render:t,toastComponent:n=ime}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function ome(e,t){const n=i=>({...t,...i,position:Xge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=dF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function xd(e){const{theme:t}=cN();return C.exports.useMemo(()=>ome(t.direction,e),[e,t.direction])}var ame={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},fF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=ame,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ale();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Yge(P,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>Jge(a),[a]);return le.createElement(Ml.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},IC(n,{id:t,onClose:P})))});fF.displayName="ToastComponent";var sme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=fF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:eme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Kn,{children:[n,x(oh,{...o,children:s})]})};function lme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ume(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var cme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Eg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},MC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function dme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:k,gutter:T,offset:I,direction:O,...N}=e,{isOpen:D,onOpen:z,onClose:$}=Wz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Hz({enabled:D,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:I,direction:O}),te=C.exports.useId(),se=`tooltip-${g??te}`,G=C.exports.useRef(null),V=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=fme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!V.current){X();const tt=MC(G);V.current=tt.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0);const tt=MC(G);q.current=tt.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),Ue=C.exports.useCallback(tt=>{D&&tt.key==="Escape"&&ye()},[D,ye]);$f(()=>B4(G),"keydown",s?Ue:void 0),$f(()=>B4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(V.current),clearTimeout(q.current)},[]),$f(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((tt={},at=null)=>({...tt,ref:$n(G,at,W),onPointerEnter:Eg(tt.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Eg(tt.onClick,Se),onPointerDown:Eg(tt.onPointerDown,He),onFocus:Eg(tt.onFocus,me),onBlur:Eg(tt.onBlur,ye),"aria-describedby":D?se:void 0}),[me,ye,He,D,se,Se,W]),qe=C.exports.useCallback((tt={},at=null)=>Y({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},at),[Y,b,w]),et=C.exports.useCallback((tt={},at=null)=>{const At={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...N,...tt,id:se,role:"tooltip",style:At}},[N,se]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:et,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var XS="chakra-ui:close-tooltip";function fme(e,t){return C.exports.useEffect(()=>{const n=B4(e);return n.addEventListener(XS,t),()=>n.removeEventListener(XS,t)},[t,e]),()=>{const n=B4(e),r=MC(e);n.dispatchEvent(new r.CustomEvent(XS))}}var hme=we(Ml.div),Ui=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=U0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...P}=r,E=m??v??h??b;if(E){n.bg=E;const $=OX(i,"colors",E);n[Hr.arrowBg.var]=$}const k=dme({...P,direction:i.direction}),T=typeof o=="string"||s;let I;if(T)I=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,N=k.getTooltipProps({},t),D=O?lme(N,["role","id"]):N,z=ume(N,["role","id"]);return a?ee(Kn,{children:[I,x(pd,{children:k.isOpen&&le.createElement(oh,{...g},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(hme,{variants:cme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Kn,{children:o})});Ui.displayName="Tooltip";var pme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(_z,{environment:a,children:t});return x(boe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(Fde,{}):x(Bde,{}),x(Soe,{}),r?x(Uz,{zIndex:r,children:l}):l]})})};function gme({children:e,theme:t=coe,toastOptions:n,...r}){return ee(pme,{theme:t,...r,children:[e,x(sme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function h0(e,t){return X0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mme(e,t){return X0(e)===2?e.get(t):e[t]}function hF(e,t,n){var r=X0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function pF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return wme&&e instanceof Map}function s_(e){return Cme&&e instanceof Set}function xf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mF(e);delete t[nr];for(var n=p0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=vme),Object.freeze(e),t&&Xf(e,function(n,r){return u_(r,!0)},!0)),e}function vme(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function _l(e){var t=DC[e];return t||ms(18,e),t}function yme(e,t){DC[e]||(DC[e]=t)}function OC(){return gv}function QS(e,t){t&&(_l("Patches"),e.u=[],e.s=[],e.v=t)}function F4(e){RC(e),e.p.forEach(bme),e.p=null}function RC(e){e===gv&&(gv=e.l)}function tA(e){return gv={p:[],l:gv,h:e,m:!0,_:0}}function bme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function JS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||_l("ES5").S(t,e,r),r?(n[nr].P&&(F4(t),ms(4)),xu(e)&&(e=$4(t,e),t.l||H4(t,e)),t.u&&_l("Patches").M(n[nr].t,e,t.u,t.s)):e=$4(t,n,[]),F4(t),t.u&&t.v(t.u,t.s),e!==gF?e:void 0}function $4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Xf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return H4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Xf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),H4(e,i,!1),n&&e.u&&_l("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=$4(e,i,o&&t&&t.i!==3&&!h0(t.D,r)?o.concat(r):void 0);if(hF(n,r,a),!sd(a))return;e.m=!1}if(xu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;$4(e,i),t&&t.A.l||H4(e,i)}}function H4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function e6(e,t){var n=e[nr];return(n?xf(n):e)[t]}function rA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function t6(e){e.o||(e.o=l_(e.t))}function NC(e,t,n){var r=a_(t)?_l("MapSet").N(t,n):s_(t)?_l("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:OC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=mv;a&&(l=[s],u=Gg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):_l("ES5").J(t,n);return(n?n.A:OC()).p.push(r),r}function xme(e){return sd(e)||ms(22,e),function t(n){if(!xu(n))return n;var r,i=n[nr],o=X0(n);if(i){if(!i.P&&(i.i<4||!_l("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Xf(r,function(a,s){i&&mme(i.t,a)===s||hF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Sme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return mv.get(l,o)},set:function(l){var u=this[nr];mv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=p0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!h0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!pF(m,g))return!0}}var b=!!a[nr];return l.length!==p0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=_l("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new kme,vF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error(Hi(6));P=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Eme(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error(Hi(12));if(typeof n(void 0,{type:W4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function yF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function V4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return U4}function i(s,l){r(s)===U4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Ime=function(t,n){return t===n};function Mme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?gve:pve;CF.useSyncExternalStore=D0.useSyncExternalStore!==void 0?D0.useSyncExternalStore:mve;(function(e){e.exports=CF})(wF);var _F={exports:{}},kF={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var yb=C.exports,vve=wF.exports;function yve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bve=typeof Object.is=="function"?Object.is:yve,xve=vve.useSyncExternalStore,Sve=yb.useRef,wve=yb.useEffect,Cve=yb.useMemo,_ve=yb.useDebugValue;kF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Sve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Cve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,bve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=xve(e,o[0],o[1]);return wve(function(){a.hasValue=!0,a.value=s},[s]),_ve(s),s};(function(e){e.exports=kF})(_F);function kve(e){e()}let EF=kve;const Eve=e=>EF=e,Pve=()=>EF,ld=C.exports.createContext(null);function PF(){return C.exports.useContext(ld)}const Tve=()=>{throw new Error("uSES not initialized!")};let TF=Tve;const Lve=e=>{TF=e},Ave=(e,t)=>e===t;function Ive(e=ld){const t=e===ld?PF:()=>C.exports.useContext(e);return function(r,i=Ave){const{store:o,subscription:a,getServerState:s}=t(),l=TF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Mve=Ive();var Ove={exports:{}},On={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),bb=Symbol.for("react.fragment"),xb=Symbol.for("react.strict_mode"),Sb=Symbol.for("react.profiler"),wb=Symbol.for("react.provider"),Cb=Symbol.for("react.context"),Rve=Symbol.for("react.server_context"),_b=Symbol.for("react.forward_ref"),kb=Symbol.for("react.suspense"),Eb=Symbol.for("react.suspense_list"),Pb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Nve=Symbol.for("react.offscreen"),LF;LF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case bb:case Sb:case xb:case kb:case Eb:return e;default:switch(e=e&&e.$$typeof,e){case Rve:case Cb:case _b:case Tb:case Pb:case wb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=Cb;On.ContextProvider=wb;On.Element=p_;On.ForwardRef=_b;On.Fragment=bb;On.Lazy=Tb;On.Memo=Pb;On.Portal=g_;On.Profiler=Sb;On.StrictMode=xb;On.Suspense=kb;On.SuspenseList=Eb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===Cb};On.isContextProvider=function(e){return Va(e)===wb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===_b};On.isFragment=function(e){return Va(e)===bb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Pb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===Sb};On.isStrictMode=function(e){return Va(e)===xb};On.isSuspense=function(e){return Va(e)===kb};On.isSuspenseList=function(e){return Va(e)===Eb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bb||e===Sb||e===xb||e===kb||e===Eb||e===Nve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Pb||e.$$typeof===wb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===LF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})(Ove);function Dve(){const e=Pve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const mA={notify(){},get:()=>[]};function zve(e,t){let n,r=mA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Dve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const Bve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fve=Bve?C.exports.useLayoutEffect:C.exports.useEffect;function $ve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=zve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Fve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function AF(e=ld){const t=e===ld?PF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Hve=AF();function Wve(e=ld){const t=e===ld?Hve:AF(e);return function(){return t().dispatch}}const Vve=Wve();Lve(_F.exports.useSyncExternalStoreWithSelector);Eve(Il.exports.unstable_batchedUpdates);var m_="persist:",IF="persist/FLUSH",v_="persist/REHYDRATE",MF="persist/PAUSE",OF="persist/PERSIST",RF="persist/PURGE",NF="persist/REGISTER",Uve=-1;function T3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T3=function(n){return typeof n}:T3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T3(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jve(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function n2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var r2e=5e3;function i2e(e,t){var n=e.version!==void 0?e.version:Uve;e.debug;var r=e.stateReconciler===void 0?qve:e.stateReconciler,i=e.getStoredState||Zve,o=e.timeout!==void 0?e.timeout:r2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=t2e(m,["_persist"]),w=b;if(g.type===OF){var P=!1,E=function(z,$){P||(g.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Kve(e)),v)return ru({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,W){return Promise.resolve($)};z(D,n).then(function($){E($)},function($){E(void 0,$)})},function(D){E(void 0,D)}),ru({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===RF)return s=!0,g.result(Qve(e)),ru({},t(w,g),{_persist:v});if(g.type===IF)return g.result(a&&a.flush()),ru({},t(w,g),{_persist:v});if(g.type===MF)l=!0;else if(g.type===v_){if(s)return ru({},w,{_persist:ru({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,I=r!==!1&&T!==void 0?r(T,h,k,e):k,O=ru({},I,{_persist:ru({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var N=t(w,g);return N===w?h:u(ru({},N,{_persist:v}))}}function bA(e){return s2e(e)||a2e(e)||o2e()}function o2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function a2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function s2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:DF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case NF:return BC({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),BC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function c2e(e,t,n){var r=n||!1,i=f_(u2e,DF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:NF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=BC({},i,{purge:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:IF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:MF})},persist:function(){e.dispatch({type:OF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=h2e;function L3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L3=function(n){return typeof n}:L3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},L3(e)}function a6(){}var d2e={getItem:a6,setItem:a6,removeItem:a6};function f2e(e){if((typeof self>"u"?"undefined":L3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function h2e(e){var t="".concat(e,"Storage");return f2e(t)?self[t]:d2e}y_.__esModule=!0;y_.default=m2e;var p2e=g2e(b_);function g2e(e){return e&&e.__esModule?e:{default:e}}function m2e(e){var t=(0,p2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var zF=void 0,v2e=y2e(y_);function y2e(e){return e&&e.__esModule?e:{default:e}}var b2e=(0,v2e.default)("local");zF=b2e;var BF={},FF={},Qf={};Object.defineProperty(Qf,"__esModule",{value:!0});Qf.PLACEHOLDER_UNDEFINED=Qf.PACKAGE_NAME=void 0;Qf.PACKAGE_NAME="redux-deep-persist";Qf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Qf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,re){re||(re=new Set([j])),te||(te="");for(const se in j){const G=te?`${te}.${se}`:se,V=j[se];if((0,e.isObjectLike)(V))return re.has(V)?`${te}.${se}:`:(re.add(V),(0,e.getCircularPath)(V,G,re))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const re in j){const se=j[re];te[re]=(0,e._cloneDeep)(se)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const re=(0,e.cloneDeep)(j),se=(0,e.cloneDeep)(te),G=Object.keys(re).reduce((q,Q)=>(h.call(se,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(re)||(0,e.isDate)(se))return re.valueOf()===se.valueOf()?{}:se;const V=Object.keys(se).reduce((q,Q)=>{if(!h.call(re,Q))return q[Q]=se[Q],q;const X=(0,e.difference)(re[Q],se[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(re)&&!(0,e.isArray)(se)||!(0,e.isArray)(re)&&(0,e.isArray)(se)?se:q:(q[Q]=X,q)},G);return delete V._persist,V};e.difference=b;const w=function(j,te){return te.reduce((re,se)=>{if(re){const G=parseInt(se,10),V=(0,e.isIntegerString)(se)&&G<0?re.length+G:se;return(0,e.isString)(re)?re.charAt(V):re[V]}},j)};e.path=w;const P=function(j,te){return[...j].reverse().reduce((G,V,q)=>{const Q=(0,e.isIntegerString)(V)?[]:{};return Q[V]=q===0?te:G,Q},{})};e.assocPath=P;const E=function(j,te){const re=(0,e.cloneDeep)(j);return te.reduce((se,G,V)=>(V===te.length-1&&se&&(0,e.isObjectLike)(se)&&delete se[G],se&&se[G]),re),re};e.dissocPath=E;const k=function(j,te,...re){if(!re||!re.length)return te;const se=re.shift(),{preservePlaceholder:G,preserveUndefined:V}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(se))for(const q in se)if((0,e.isObjectLike)(se[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],se[q]);else if((0,e.isArray)(te)){let Q=se[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;V||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=se[q]!==t.PLACEHOLDER_UNDEFINED?se[q]:void 0;te[q]=Q}return k(j,te,...re)},T=function(j,te,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=T;const I=function(j,te=[],re,se,G){if(!(0,e.isObjectLike)(j))return j;for(const V in j){const q=j[V],Q=(0,e.isArray)(j),X=se?se+"."+V:V;q===null&&(re===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||re===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(V,10)]=void 0),q===void 0&&G&&re===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(V,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,re,X,G)}},O=function(j,te,re,se){const G=(0,e.cloneDeep)(j);return I(G,te,re,"",se),G};e.preserveUndefined=O;const N=function(j,te,re){return re.indexOf(j)===te};e.unique=N;const D=function(j){return j.reduce((te,re)=>{const se=j.filter(me=>me===re),G=j.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:V,subsets:q}=te,Q=se.length>1&&V.indexOf(re)===-1,X=G.length>1;return{duplicates:[...V,...Q?se:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,re){const se=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${se} configuration.`,V=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${V}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. - - ${JSON.stringify(q)} - - ${V}`);if(Q.length>1)throw new Error(`${G} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(Q)} - - ${V}`)};e.singleTransformValidator=z;const $=function(j){if(!(0,e.isArray)(j))return;const te=j?.map(re=>re.deepPersistKey).filter(re=>re)||[];if(te.length){const re=te.filter((se,G)=>te.indexOf(se)!==G);if(re.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(re)}`)}};e.transformsValidator=$;const W=function({whitelist:j,blacklist:te}){if(j&&j.length&&te&&te.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:re,subsets:se}=(0,e.findDuplicatesAndSubsets)(j);(0,e.throwError)({duplicates:re,subsets:se},"whitelist")}if(te){const{duplicates:re,subsets:se}=(0,e.findDuplicatesAndSubsets)(te);(0,e.throwError)({duplicates:re,subsets:se},"blacklist")}};e.configValidator=W;const Y=function({duplicates:j,subsets:te},re){if(j.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${re}. - - ${JSON.stringify(j)}`);if(te.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,re)=>{const se=re.split("."),G=se[0],V=se.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:V?[V]:void 0}),q&&!Q&&V&&(q[G]=[V]),q&&Q&&V&&Q.push(V),te},[]):[]};e.getRootKeysGroup=de})(FF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!P(k)&&g?g(E,k,T):E,out:(E,k,T)=>!P(k)&&m?m(E,k,T):E,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(T=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(E,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:P,rootReducer:E}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(E(void 0,{type:""})),N=T.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>N.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...Y,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(BF);const A3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),x2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?x2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),G4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),S2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,P=1,E=2,k=4,T=8,I=16,O=32,N=64,D=128,z=256,$=512,W=30,Y="...",de=800,j=16,te=1,re=2,se=3,G=1/0,V=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",P],["bindKey",E],["curry",T],["curryRight",I],["flip",$],["partial",O],["partialRight",N],["rearg",z]],He="[object Arguments]",Ue="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",et="[object Date]",tt="[object DOMException]",at="[object Error]",At="[object Function]",wt="[object GeneratorFunction]",Ae="[object Map]",dt="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Gt="[object ArrayBuffer]",Ee="[object DataView]",It="[object Float32Array]",Ne="[object Float64Array]",st="[object Int8Array]",ln="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,i1=RegExp(pi.source),ga=RegExp(As.source),yh=/<%-([\s\S]+?)%>/g,o1=/<%([\s\S]+?)%>/g,Mu=/<%=([\s\S]+?)%>/g,bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,a1=RegExp(Ed.source),Ou=/^\s+/,Pd=/\s/,s1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ru=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u1=/[()=,{}\[\]\/\s]/,c1=/\\(\\)?/g,d1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,f1=/^[-+]0x[0-9a-f]+$/i,h1=/^0b[01]+$/i,p1=/^\[object .+?Constructor\]$/,g1=/^0o[0-7]+$/i,m1=/^(?:0|[1-9]\d*)$/,v1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,y1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Dl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",zl=Nl+Dl+Os,Sh="\\u2700-\\u27bf",Nu="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+zl+"]",Td="\\d+",Bl="["+Sh+"]",qa="["+Nu+"]",Ld="[^"+ja+Ur+Td+Sh+Nu+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",wh="(?:"+Ga+"|"+gi+")",Ch="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",zs="\\u200d",Fl="(?:"+qa+"|"+Ld+")",b1="(?:"+uo+"|"+Ld+")",Du="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Id=wh+"?",Bu="["+kr+"]?",ma="(?:"+zs+"(?:"+[Ch,Ad,Ds].join("|")+")"+Bu+Id+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$l="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Id+ma,_h="(?:"+[Bl,Ad,Ds].join("|")+")"+Ht,Fu="(?:"+[Ch+Ga+"?",Ga,Ad,Ds,Ns].join("|")+")",$u=RegExp(zo,"g"),kh=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Fu+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+Du+"(?="+[jr,uo,"$"].join("|")+")",b1+"+"+zu+"(?="+[jr,uo+Fl,"$"].join("|")+")",uo+"?"+Fl+"+"+Du,uo+"+"+zu,$l,Md,Td,_h].join("|"),"g"),Od=RegExp("["+zs+ja+zl+kr+"]"),Eh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ph=-1,un={};un[It]=un[Ne]=un[st]=un[ln]=un[Dn]=un[$e]=un[pt]=un[rt]=un[Nt]=!0,un[He]=un[Ue]=un[Gt]=un[qe]=un[Ee]=un[et]=un[at]=un[At]=un[Ae]=un[dt]=un[ut]=un[Et]=un[Zt]=un[En]=un[Je]=!1;var Wt={};Wt[He]=Wt[Ue]=Wt[Gt]=Wt[Ee]=Wt[qe]=Wt[et]=Wt[It]=Wt[Ne]=Wt[st]=Wt[ln]=Wt[Dn]=Wt[Ae]=Wt[dt]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[$e]=Wt[pt]=Wt[rt]=Wt[Nt]=!0,Wt[at]=Wt[At]=Wt[Je]=!1;var Th={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},x1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,fn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,hn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,va=hn&&hn.isRegExp,Bs=hn&&hn.isSet,S1=hn&&hn.isTypedArray;function mi(ie,xe,ve){switch(ve.length){case 0:return ie.call(xe);case 1:return ie.call(xe,ve[0]);case 2:return ie.call(xe,ve[0],ve[1]);case 3:return ie.call(xe,ve[0],ve[1],ve[2])}return ie.apply(xe,ve)}function w1(ie,xe,ve,Ke){for(var _t=-1,Jt=ie==null?0:ie.length;++_t-1}function Lh(ie,xe,ve){for(var Ke=-1,_t=ie==null?0:ie.length;++Ke<_t;)if(ve(xe,ie[Ke]))return!0;return!1}function Bn(ie,xe){for(var ve=-1,Ke=ie==null?0:ie.length,_t=Array(Ke);++ve-1;);return ve}function Ka(ie,xe){for(var ve=ie.length;ve--&&Vu(xe,ie[ve],0)>-1;);return ve}function _1(ie,xe){for(var ve=ie.length,Ke=0;ve--;)ie[ve]===xe&&++Ke;return Ke}var i2=Bd(Th),Ya=Bd(x1);function $s(ie){return"\\"+ne[ie]}function Ih(ie,xe){return ie==null?n:ie[xe]}function Wl(ie){return Od.test(ie)}function Mh(ie){return Eh.test(ie)}function o2(ie){for(var xe,ve=[];!(xe=ie.next()).done;)ve.push(xe.value);return ve}function Oh(ie){var xe=-1,ve=Array(ie.size);return ie.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Rh(ie,xe){return function(ve){return ie(xe(ve))}}function Ho(ie,xe){for(var ve=-1,Ke=ie.length,_t=0,Jt=[];++ve-1}function _2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=w2,Wo.prototype.delete=C2,Wo.prototype.get=F1,Wo.prototype.has=$1,Wo.prototype.set=_2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,R,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=R?S(c,A,R,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=mV(c),!J)return wi(c,K)}else{var Le=si(c),je=Le==At||Le==wt;if(vc(c))return Xs(c,J);if(Le==ut||Le==He||je&&!R){if(K=ce||je?{}:ck(c),!J)return ce?ig(c,sc(K,c)):yo(c,Qe(K,c))}else{if(!Wt[Le])return R?c:{};K=vV(c,Le,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,jt){K.set(jt,ii(bt,p,S,jt,c,F))});var yt=_e?ce?ge:Ko:ce?xo:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Vs(K,jt,ii(bt,p,S,jt,c,F))}),K}function Wh(c){var p=li(c);return function(S){return Vh(S,c,p)}}function Vh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var R=S[A],F=p[R],K=c[R];if(K===n&&!(R in c)||!F(K))return!1}return!0}function U1(c,p,S){if(typeof c!="function")throw new vi(a);return ug(function(){c.apply(n,S)},p)}function lc(c,p,S,A){var R=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Lh,K=!1):p.length>=i&&(F=ju,K=!1,p=new Sa(p));e:for(;++RR?0:R+S),A=A===n||A>R?R:Dt(A),A<0&&(A+=R),A=S>A?0:Hk(A);S0&&S(J)?p>1?Tr(J,p-1,S,A,R):ya(R,J):A||(R[R.length]=J)}return R}var jh=Qs(),go=Qs(!0);function qo(c,p){return c&&jh(c,p,li)}function mo(c,p){return c&&go(c,p,li)}function Gh(c,p){return ho(p,function(S){return Xl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Kh(c,p){return c!=null&&tn.call(c,p)}function Yh(c,p){return c!=null&&p in cn(c)}function Zh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Le=-1,je=J[0];e:for(;++Le-1;)J!==c&&Gd.call(J,ce,1),Gd.call(c,ce,1);return c}function tf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var R=p[S];if(S==A||R!==F){var F=R;Zl(R)?Gd.call(c,R,1):ap(c,R)}}return c}function nf(c,p){return c+Ul(O1()*(p-c+1))}function Ks(c,p,S,A){for(var R=-1,F=vr(Yd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++R]=c,c+=S;return K}function pc(c,p){var S="";if(!c||p<1||p>V)return S;do p%2&&(S+=c),p=Ul(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return kx(hk(c,p,So),c+"")}function tp(c){return ac(hp(c))}function rf(c,p){var S=hp(c);return M2(S,Gl(p,0,S.length))}function Kl(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var R=-1,F=p.length,K=F-1,J=c;J!=null&&++RR?0:R+p),S=S>R?R:S,S<0&&(S+=R),R=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(R);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Wd(_e);K=!1,R=ju,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var eg=c2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Zu?Zu(S):new c.constructor(S);return c.copy(A),A}function tg(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Yl(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function T2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Xd?cn(Xd.call(c)):{}}function L2(c,p){var S=p?tg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ng(c,p){if(c!==p){var S=c!==n,A=c===null,R=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!R)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function A2(c,p,S,A){for(var R=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Le=!A;++J1?S[R-1]:n,K=R>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(R--,F):n,K&&Qi(S[0],S[1],K)&&(F=R<3?n:F,R=1),p=cn(p);++A-1?R[F?p[K]:K]:n}}function ag(c){return er(function(p){var S=p.length,A=S,R=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(R&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Le=-1,je=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(s1,`{ -/* [wrapped with `+p+`] */ -`)}function bV(c){return Rt(c)||ff(c)||!!(I1&&c&&c[I1])}function Zl(c,p){var S=typeof c;return p=p??V,!!p&&(S=="number"||S!="symbol"&&m1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function M2(c,p){var S=-1,A=c.length,R=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function AU(c,p){return p(c),c}function O2(c,p){return p(c)}var IU=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,R=function(F){return Hh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Zl(S)?this.thru(R):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:O2,args:[R],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function MU(){return Ek(this)}function OU(){return new Ki(this.value(),this.__chain__)}function RU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function NU(){return this}function DU(c){for(var p,S=this;S instanceof Qd;){var A=bk(S);A.__index__=0,A.__values__=n,p?R.__wrapped__=A:p=A;var R=A;S=S.__wrapped__}return R.__wrapped__=c,p}function zU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:O2,args:[Ex],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Ex)}function BU(){return Ys(this.__wrapped__,this.__actions__)}var FU=lp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function $U(c,p,S){var A=Rt(c)?zn:j1;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}function HU(c,p){var S=Rt(c)?ho:Go;return S(c,Te(p,3))}var WU=og(xk),VU=og(Sk);function UU(c,p){return Tr(R2(c,p),1)}function jU(c,p){return Tr(R2(c,p),G)}function GU(c,p,S){return S=S===n?1:Dt(S),Tr(R2(c,p),S)}function Pk(c,p){var S=Rt(c)?Vn:Qa;return S(c,Te(p,3))}function Tk(c,p){var S=Rt(c)?fo:Uh;return S(c,Te(p,3))}var qU=lp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function KU(c,p,S,A){c=bo(c)?c:hp(c),S=S&&!A?Dt(S):0;var R=c.length;return S<0&&(S=vr(R+S,0)),F2(c)?S<=R&&c.indexOf(p,S)>-1:!!R&&Vu(c,p,S)>-1}var YU=Ct(function(c,p,S){var A=-1,R=typeof p=="function",F=bo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=R?mi(p,K,S):Ja(K,p,S)}),F}),ZU=lp(function(c,p,S){Uo(c,S,p)});function R2(c,p){var S=Rt(c)?Bn:xr;return S(c,Te(p,3))}function XU(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var QU=lp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function JU(c,p,S){var A=Rt(c)?Nd:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Qa)}function ej(c,p,S){var A=Rt(c)?e2:Ah,R=arguments.length<3;return A(c,Te(p,4),S,R,Uh)}function tj(c,p){var S=Rt(c)?ho:Go;return S(c,z2(Te(p,3)))}function nj(c){var p=Rt(c)?ac:tp;return p(c)}function rj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:rf;return A(c,p)}function ij(c){var p=Rt(c)?vx:ai;return p(c)}function oj(c){if(c==null)return 0;if(bo(c))return F2(c)?ba(c):c.length;var p=si(c);return p==Ae||p==Zt?c.size:Lr(c).length}function aj(c,p,S){var A=Rt(c)?Hu:vo;return S&&Qi(c,p,S)&&(p=n),A(c,Te(p,3))}var sj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Tr(p,1),[])}),N2=d2||function(){return mt.Date.now()};function lj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Tx=Ct(function(c,p,S){var A=P;if(S.length){var R=Ho(S,We(Tx));A|=O}return he(c,A,p,S,R)}),Ik=Ct(function(c,p,S){var A=P|E;if(S.length){var R=Ho(S,We(Ik));A|=O}return he(p,A,c,S,R)});function Mk(c,p,S){p=S?n:p;var A=he(c,T,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,R,F,K,J,ce,_e=0,ke=!1,Le=!1,je=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Le="maxWait"in S,F=Le?vr(_a(S.maxWait)||0,p):F,je="trailing"in S?!!S.trailing:je);function ht(Mr){var is=A,Jl=R;return A=R=n,_e=Mr,K=c.apply(Jl,is),K}function yt(Mr){return _e=Mr,J=ug(jt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Jl=Mr-_e,Jk=p-is;return Le?Kr(Jk,F-Jl):Jk}function bt(Mr){var is=Mr-ce,Jl=Mr-_e;return ce===n||is>=p||is<0||Le&&Jl>=F}function jt(){var Mr=N2();if(bt(Mr))return en(Mr);J=ug(jt,$t(Mr))}function en(Mr){return J=n,je&&A?ht(Mr):(A=R=n,K)}function Zo(){J!==n&&eg(J),_e=0,A=ce=R=J=n}function Ji(){return J===n?K:en(N2())}function Xo(){var Mr=N2(),is=bt(Mr);if(A=arguments,R=this,ce=Mr,is){if(J===n)return yt(ce);if(Le)return eg(J),J=ug(jt,p),ht(ce)}return J===n&&(J=ug(jt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var uj=Ct(function(c,p){return U1(c,1,p)}),cj=Ct(function(c,p,S){return U1(c,_a(p)||0,S)});function dj(c){return he(c,$)}function D2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,R=p?p.apply(this,A):A[0],F=S.cache;if(F.has(R))return F.get(R);var K=c.apply(this,A);return S.cache=F.set(R,K)||F,K};return S.cache=new(D2.Cache||Vo),S}D2.Cache=Vo;function z2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function fj(c){return Ak(2,c)}var hj=xx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Te())):Bn(Tr(p,1),Er(Te()));var S=p.length;return Ct(function(A){for(var R=-1,F=Kr(A.length,S);++R=p}),ff=Qh(function(){return arguments}())?Qh:function(c){return Sr(c)&&tn.call(c,"callee")&&!A1.call(c,"callee")},Rt=ve.isArray,Tj=Gr?Er(Gr):q1;function bo(c){return c!=null&&B2(c.length)&&!Xl(c)}function Ir(c){return Sr(c)&&bo(c)}function Lj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var vc=f2||$x,Aj=co?Er(co):K1;function Ij(c){return Sr(c)&&c.nodeType===1&&!cg(c)}function Mj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||vc(c)||fp(c)||ff(c)))return!c.length;var p=si(c);if(p==Ae||p==Zt)return!c.size;if(lg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Oj(c,p){return cc(c,p)}function Rj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?cc(c,p,n,S):!!A}function Ax(c){if(!Sr(c))return!1;var p=oi(c);return p==at||p==tt||typeof c.message=="string"&&typeof c.name=="string"&&!cg(c)}function Nj(c){return typeof c=="number"&&zh(c)}function Xl(c){if(!lr(c))return!1;var p=oi(c);return p==At||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function B2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=V}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):bx;function Dj(c,p){return c===p||dc(c,p,kt(p))}function zj(c,p,S){return S=typeof S=="function"?S:n,dc(c,p,kt(p),S)}function Bj(c){return Bk(c)&&c!=+c}function Fj(c){if(wV(c))throw new _t(o);return Jh(c)}function $j(c){return c===null}function Hj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==dt}function cg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Xu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ix=va?Er(va):ar;function Wj(c){return Dk(c)&&c>=-V&&c<=V}var Fk=Bs?Er(Bs):Bt;function F2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var fp=S1?Er(S1):zr;function Vj(c){return c===n}function Uj(c){return Sr(c)&&si(c)==Je}function jj(c){return Sr(c)&&oi(c)==Xt}var Gj=_(js),qj=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(bo(c))return F2(c)?Di(c):wi(c);if(Qu&&c[Qu])return o2(c[Qu]());var p=si(c),S=p==Ae?Oh:p==Zt?Wd:hp;return S(c)}function Ql(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Ql(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?Gl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=h1.test(c);return S||g1.test(c)?Ze(c.slice(2),S?2:8):f1.test(c)?Q:+c}function Wk(c){return wa(c,xo(c))}function Kj(c){return c?Gl(Dt(c),-V,V):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var Yj=Xi(function(c,p){if(lg(p)||bo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){wa(p,xo(p),c)}),$2=Xi(function(c,p,S,A){wa(p,xo(p),c,A)}),Zj=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),Xj=er(Hh);function Qj(c,p){var S=jl(c);return p==null?S:Qe(S,p)}var Jj=Ct(function(c,p){c=cn(c);var S=-1,A=p.length,R=A>2?p[2]:n;for(R&&Qi(p[0],p[1],R)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Tt));for(var R=p.length;R--;)ap(S,p[R]);return S});function vG(c,p){return jk(c,z2(Te(p)))}var yG=er(function(c,p){return c==null?{}:X1(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Te(p),ep(c,S,function(A,R){return p(A,R[0])})}function bG(c,p,S){p=Zs(p,c);var A=-1,R=p.length;for(R||(R=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var R=O1();return Kr(c+R*(p-c+pe("1e-"+((R+"").length-1))),p)}return nf(c,p)}var AG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Rx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(v1,i2).replace(kh,"")}function IG(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:Gl(Dt(S),0,A);var R=S;return S-=p.length,S>=0&&c.slice(S,R)==p}function MG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function OG(c){return c=Sn(c),c&&a1.test(c)?c.replace(Ed,"\\$&"):c}var RG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),NG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),DG=cp("toLowerCase");function zG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var R=(p-A)/2;return d(Ul(R),S)+c+d(Yd(R),S)}function BG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ix(p))&&(p=Zi(p),!p&&Wl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var jG=Js(function(c,p,S){return c+(S?" ":"")+Rx(p)});function GG(c,p,S){return c=Sn(c),S=S==null?0:Gl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function qG(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=$2({},p,A,Re);var R=$2({},p.imports,A.imports,Re),F=li(R),K=Hd(R,F),J,ce,_e=0,ke=p.interpolate||Ms,Le="__p += '",je=Ud((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Mu?d1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ph+"]")+` -`;c.replace(je,function(bt,jt,en,Zo,Ji,Xo){return en||(en=Zo),Le+=c.slice(_e,Xo).replace(y1,$s),jt&&(J=!0,Le+=`' + -__e(`+jt+`) + -'`),Ji&&(ce=!0,Le+=`'; -`+Ji+`; -__p += '`),en&&(Le+=`' + -((__t = (`+en+`)) == null ? '' : __t) + -'`),_e=Xo+bt.length,bt}),Le+=`'; -`;var yt=tn.call(p,"variable")&&p.variable;if(!yt)Le=`with (obj) { -`+Le+` -} -`;else if(u1.test(yt))throw new _t(s);Le=(ce?Le.replace(Qt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { -`+(yt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(J?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Le+`return __p -}`;var $t=Xk(function(){return Jt(F,ht+"return "+Le).apply(n,K)});if($t.source=Le,Ax($t))throw $t;return $t}function KG(c){return Sn(c).toLowerCase()}function YG(c){return Sn(c).toUpperCase()}function ZG(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Di(p),F=$o(A,R),K=Ka(A,R)+1;return ts(A,F,K).join("")}function XG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,E1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Ka(A,Di(p))+1;return ts(A,0,R).join("")}function QG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Ou,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),R=$o(A,Di(p));return ts(A,R).join("")}function JG(c,p){var S=W,A=Y;if(lr(p)){var R="separator"in p?p.separator:R;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Wl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(R===n)return ce+A;if(K&&(J+=ce.length-J),Ix(R)){if(c.slice(J).search(R)){var _e,ke=ce;for(R.global||(R=Ud(R.source,Sn(Ua.exec(R))+"g")),R.lastIndex=0;_e=R.exec(ke);)var Le=_e.index;ce=ce.slice(0,Le===n?J:Le)}}else if(c.indexOf(Zi(R),J)!=J){var je=ce.lastIndexOf(R);je>-1&&(ce=ce.slice(0,je))}return ce+A}function eq(c){return c=Sn(c),c&&i1.test(c)?c.replace(pi,l2):c}var tq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Rx=cp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Mh(c)?Vd(c):C1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Ax(S)?S:new _t(S)}}),nq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Tx(c[S],c))}),c});function rq(c){var p=c==null?0:c.length,S=Te();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var R=-1;++RV)return[];var S=X,A=Kr(c,X);p=Te(p),c-=X;for(var R=$d(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),R=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!R||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Le=function(jt){var en=R.apply(B,ya([jt],J));return A&&je?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var je=this.__chain__,ht=!!this.__actions__.length,yt=F&&!je,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:O2,args:[Le],thisArg:n}),new Ki(bt,je)}return yt&&$t?c.apply(this,J):(bt=this.thru(Le),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=qu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var R=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],R)}return this[S](function(K){return p.apply(Rt(K)?K:[],R)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[uf(n,E).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=v2,B.prototype.at=IU,B.prototype.chain=MU,B.prototype.commit=OU,B.prototype.next=RU,B.prototype.plant=DU,B.prototype.reverse=zU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=BU,B.prototype.first=B.prototype.head,Qu&&(B.prototype[Qu]=NU),B},xa=po();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ge=ca.exports;var w2e=Object.create,$F=Object.defineProperty,C2e=Object.getOwnPropertyDescriptor,_2e=Object.getOwnPropertyNames,k2e=Object.getPrototypeOf,E2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),P2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _2e(t))!E2e.call(e,i)&&i!==n&&$F(e,i,{get:()=>t[i],enumerable:!(r=C2e(t,i))||r.enumerable});return e},HF=(e,t,n)=>(n=e!=null?w2e(k2e(e)):{},P2e(t||!e||!e.__esModule?$F(n,"default",{value:e,enumerable:!0}):n,e)),T2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),WF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Lb=De((e,t)=>{var n=WF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),L2e=De((e,t)=>{var n=Lb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),A2e=De((e,t)=>{var n=Lb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),I2e=De((e,t)=>{var n=Lb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),M2e=De((e,t)=>{var n=Lb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ab=De((e,t)=>{var n=T2e(),r=L2e(),i=A2e(),o=I2e(),a=M2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab();function r(){this.__data__=new n,this.size=0}t.exports=r}),R2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),N2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),D2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),VF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=VF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),z2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),B2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Ib=De((e,t)=>{var n=w_(),r=z2e(),i=B2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),UF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),jF=De((e,t)=>{var n=Ib(),r=UF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),F2e=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),$2e=De((e,t)=>{var n=F2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),GF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),H2e=De((e,t)=>{var n=jF(),r=$2e(),i=UF(),o=GF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),W2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),Q0=De((e,t)=>{var n=H2e(),r=W2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Map");t.exports=i}),Mb=De((e,t)=>{var n=Q0(),r=n(Object,"create");t.exports=r}),V2e=De((e,t)=>{var n=Mb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),U2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),j2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),G2e=De((e,t)=>{var n=Mb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),q2e=De((e,t)=>{var n=Mb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),K2e=De((e,t)=>{var n=V2e(),r=U2e(),i=j2e(),o=G2e(),a=q2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=K2e(),r=Ab(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Z2e=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Ob=De((e,t)=>{var n=Z2e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),X2e=De((e,t)=>{var n=Ob();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Q2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).get(i)}t.exports=r}),J2e=De((e,t)=>{var n=Ob();function r(i){return n(this,i).has(i)}t.exports=r}),eye=De((e,t)=>{var n=Ob();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),qF=De((e,t)=>{var n=Y2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ab(),r=C_(),i=qF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ab(),r=O2e(),i=R2e(),o=N2e(),a=D2e(),s=tye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),rye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),iye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),oye=De((e,t)=>{var n=qF(),r=rye(),i=iye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),KF=De((e,t)=>{var n=oye(),r=aye(),i=sye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,P=u.length;if(w!=P&&!(b&&P>w))return!1;var E=v.get(l),k=v.get(u);if(E&&k)return E==u&&k==l;var T=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),uye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),cye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),dye=De((e,t)=>{var n=w_(),r=lye(),i=WF(),o=KF(),a=uye(),s=cye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,N=O?O.valueOf:void 0;function D(z,$,W,Y,de,j,te){switch(W){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var re=a;case P:var se=Y&l;if(re||(re=s),z.size!=$.size&&!se)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var V=o(re(z),re($),Y,de,j,te);return te.delete(z),V;case k:if(N)return N.call(z)==N.call($)}return!1}t.exports=D}),fye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),hye=De((e,t)=>{var n=fye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),pye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),mye=De((e,t)=>{var n=pye(),r=gye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),vye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),yye=De((e,t)=>{var n=Ib(),r=Rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),bye=De((e,t)=>{var n=yye(),r=Rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),xye=De((e,t)=>{function n(){return!1}t.exports=n}),YF=De((e,t)=>{var n=Eu(),r=xye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Sye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),wye=De((e,t)=>{var n=Ib(),r=ZF(),i=Rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[N]=j[D]=j[z]=j[$]=j[W]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[T]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[P]=j[E]=!1;function te(re){return i(re)&&r(re.length)&&!!j[n(re)]}t.exports=te}),Cye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),_ye=De((e,t)=>{var n=VF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),XF=De((e,t)=>{var n=wye(),r=Cye(),i=_ye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),kye=De((e,t)=>{var n=vye(),r=bye(),i=__(),o=YF(),a=Sye(),s=XF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),P=!v&&!b&&!w&&s(g),E=v||b||w||P,k=E?n(g.length,String):[],T=k.length;for(var I in g)(m||u.call(g,I))&&!(E&&(I=="length"||w&&(I=="offset"||I=="parent")||P&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,T)))&&k.push(I);return k}t.exports=h}),Eye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Pye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Tye=De((e,t)=>{var n=Pye(),r=n(Object.keys,Object);t.exports=r}),Lye=De((e,t)=>{var n=Eye(),r=Tye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Aye=De((e,t)=>{var n=jF(),r=ZF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Iye=De((e,t)=>{var n=kye(),r=Lye(),i=Aye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Mye=De((e,t)=>{var n=hye(),r=mye(),i=Iye();function o(a){return n(a,i,r)}t.exports=o}),Oye=De((e,t)=>{var n=Mye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var N=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=Q0(),r=Eu(),i=n(r,"DataView");t.exports=i}),Nye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Promise");t.exports=i}),Dye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Set");t.exports=i}),zye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),Bye=De((e,t)=>{var n=Rye(),r=C_(),i=Nye(),o=Dye(),a=zye(),s=Ib(),l=GF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),P=l(r),E=l(i),k=l(o),T=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var N=s(O),D=N==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case P:return u;case E:return g;case k:return m;case T:return v}return N}),t.exports=I}),Fye=De((e,t)=>{var n=nye(),r=KF(),i=dye(),o=Oye(),a=Bye(),s=__(),l=YF(),u=XF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function P(E,k,T,I,O,N){var D=s(E),z=s(k),$=D?m:a(E),W=z?m:a(k);$=$==g?v:$,W=W==g?v:W;var Y=$==v,de=W==v,j=$==W;if(j&&l(E)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return N||(N=new n),D||u(E)?r(E,k,T,I,O,N):i(E,k,$,T,I,O,N);if(!(T&h)){var te=Y&&w.call(E,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(te||re){var se=te?E.value():E,G=re?k.value():k;return N||(N=new n),O(se,G,T,I,N)}}return j?(N||(N=new n),o(E,k,T,I,O,N)):!1}t.exports=P}),$ye=De((e,t)=>{var n=Fye(),r=Rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),QF=De((e,t)=>{var n=$ye();function r(i,o){return n(i,o)}t.exports=r}),Hye=["ctrl","shift","alt","meta","mod"],Wye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function s6(e,t=","){return typeof e=="string"?e.split(t):e}function km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Wye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Hye.includes(o));return{...r,keys:i}}function Vye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Uye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function jye(e){return JF(e,["input","textarea","select"])}function JF({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Gye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var qye=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},Kye=C.exports.createContext(void 0),Yye=()=>C.exports.useContext(Kye),Zye=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Xye=()=>C.exports.useContext(Zye),Qye=HF(QF());function Jye(e){let t=C.exports.useRef(void 0);return(0,Qye.default)(t.current,e)||(t.current=e),t.current}var SA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=Jye(a),{enabledScopes:h}=Xye(),g=Yye();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Gye(h,u?.scopes))return;let m=w=>{if(!(jye(w)&&!JF(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||s6(e,u?.splitKey).forEach(P=>{let E=km(P,u?.combinationKey);if(qye(w,E,o)||E.keys?.includes("*")){if(Vye(w,E,u?.preventDefault),!Uye(w,E,u?.enabled)){SA(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.addHotkey(km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&s6(e,u?.splitKey).forEach(w=>g.removeHotkey(km(w,u?.combinationKey)))}},[e,l,u,h]),i}HF(QF());var FC=new Set;function e3e(e){(Array.isArray(e)?e:[e]).forEach(t=>FC.add(km(t)))}function t3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=km(t);for(let r of FC)r.keys?.every(i=>n.keys?.includes(i))&&FC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{e3e(e.key)}),document.addEventListener("keyup",e=>{t3e(e.key)})});function n3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const r3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),i3e=lt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),o3e=lt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),a3e=lt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),s3e=lt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),l3e=lt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),u3e=lt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const c3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(ih,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Nb(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(n7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:k,...T}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const N=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ge.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(ih,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:N,onBlur:D,width:a,...T,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...E,className:"invokeai__number-input-stepper-button"}),x(X7,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},uh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(gd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(ih,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(VB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},d3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],f3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],h3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],p3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,g3e=["gfpgan","codeformer"],m3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],v3e=Xe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),y3e=Xe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Uv=()=>{const e=Fe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(v3e),{isGFPGANAvailable:i}=Ce(y3e),o=l=>e(N3(l)),a=l=>e(MW(l)),s=l=>e(D3(l.target.value));return ee(an,{direction:"column",gap:2,children:[x(uh,{label:"Type",validValues:g3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function b3e(){const e=Fe(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(OW(r.target.checked))})}var e$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=le.createContext&&le.createContext(e$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ch(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:N,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:re,sliderTooltipProps:se,sliderIAIIconButtonProps:G,...V}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ge.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!T||T()};return ee(gd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(ih,{className:"invokeai__slider-component-label",...$,children:r}),ee(bz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...V,children:[h&&ee(Kn,{children:[x(LC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),x(LC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(eF,{className:"invokeai__slider_track",...Y,children:x(tF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...se,children:x(JB,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:N,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:P,...te}),ee(DB,{...re,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function T_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=Fe();return x(ch,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const i$=()=>x(md,{flex:"1",textAlign:"left",children:"Other Options"}),P3e=()=>{const e=Fe(),t=Ce(r=>r.options.hiresFix);return x(an,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(IW(r.target.checked))})})},T3e=()=>{const e=Fe(),t=Ce(r=>r.options.seamless);return x(an,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(AW(r.target.checked))})})},o$=()=>ee(an,{gap:2,direction:"column",children:[x(T3e,{}),x(P3e,{})]}),Db=()=>x(md,{flex:"1",textAlign:"left",children:"Seed"});function L3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(i7e(r.target.checked))})}function A3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=Fe(),i=o=>r(Qv(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const a$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function I3e(){const e=Fe(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(Qv(a$(k_,E_))),children:x("p",{children:"Shuffle"})})}function M3e(){const e=Fe(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(X9e(r)),value:t,isInteger:!1})}function O3e(){const e=Fe(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(Q9e(r)),value:t,isInteger:!1})}const zb=()=>ee(an,{gap:2,direction:"column",children:[x(L3e,{}),ee(an,{gap:2,children:[x(A3e,{}),x(I3e,{})]}),x(an,{gap:2,children:x(M3e,{})}),x(an,{gap:2,children:x(O3e,{})})]});function Bb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=Fe();return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(r7e(i.target.checked))})]})}const R3e=Xe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),N3e=Xe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),jv=()=>{const e=Fe(),{upscalingLevel:t,upscalingStrength:n}=Ce(R3e),{isESRGANAvailable:r}=Ce(N3e);return ee("div",{className:"upscale-options",children:[x(uh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:p3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function D3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=Fe();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(J9e(r.target.checked))})}function Fb(){return ee(an,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(D3e,{})]})}function z3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(ih,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function B3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe(),r=i=>n(RW(i.target.value));return x(z3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function F3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=Fe();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(e7e(i)),isInteger:!1})}const $b=()=>ee(an,{gap:2,direction:"column",children:[x(F3e,{}),x(B3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(tz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Hb(){const e=Ce(r=>r.options.showAdvancedOptions),t=Fe();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(o7e(r.target.checked)),isChecked:e})}function $3e(){const e=Fe(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(EW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const rn=Xe(e=>e.options,e=>ux[e.activeTab],{memoizeOptions:{equalityCheck:Ge.isEqual}}),H3e=Xe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function W3e(){const e=Ce(i=>i.options.height),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(PW(Number(i.target.value))),validValues:h3e,styleClass:"main-option-block"})}const V3e=Xe([e=>e.options,H3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function U3e(){const e=Fe(),{iterations:t,mayGenerateMultipleImages:n}=Ce(V3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Z9e(i)),value:t,width:L_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function j3e(){const e=Ce(r=>r.options.sampler),t=Fe();return x(uh,{label:"Sampler",value:e,onChange:r=>t(LW(r.target.value)),validValues:d3e,styleClass:"main-option-block"})}function G3e(){const e=Fe(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(kW(r)),value:t,width:L_,styleClass:"main-option-block",textAlign:"center"})}function q3e(){const e=Ce(i=>i.options.width),t=Ce(rn),n=Fe();return x(uh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(TW(Number(i.target.value))),validValues:f3e,styleClass:"main-option-block"})}const L_="auto";function Wb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(U3e,{}),x(G3e,{}),x($3e,{})]}),ee("div",{className:"main-options-row",children:[x(q3e,{}),x(W3e,{}),x(j3e,{})]})]})})}const K3e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},s$=vb({name:"system",initialState:K3e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:Y3e,setIsProcessing:g0,addLogEntry:Ei,setShouldShowLogViewer:l6,setIsConnected:_A,setSocketId:Yke,setShouldConfirmOnDelete:l$,setOpenAccordions:Z3e,setSystemStatus:X3e,setCurrentStatus:u6,setSystemConfig:Q3e,setShouldDisplayGuides:J3e,processingCanceled:e4e,errorOccurred:$C,errorSeen:u$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:t4e,setSaveIntermediatesInterval:n4e,setEnableImageDebugging:r4e}=s$.actions,i4e=s$.reducer;function o4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function a4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function s4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function l4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function c$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function u4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function c4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const d4e=Xe(e=>e.system,e=>e.shouldDisplayGuides),f4e=({children:e,feature:t})=>{const n=Ce(d4e),{text:r}=c3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(md,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},h4e=Pe(({feature:e,icon:t=o4e},n)=>x(f4e,{feature:e,children:x(md,{ref:n,children:x(pa,{as:t})})}));function p4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(h4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Vb=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=Fe();return x(rb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(Z3e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(p4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function g4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function m4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function v4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function d$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function f$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function b4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function x4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function S4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function h$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function p$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function w4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function C4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function _4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function k4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function E4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function P4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function T4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function L4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function m$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function A4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function M4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function O4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function v$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function c6(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function B4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function y$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function F4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function $4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function I_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function M_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Py;const V4e=new Uint8Array(16);function U4e(){if(!Py&&(Py=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Py))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Py(V4e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function j4e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const G4e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:G4e};function Tp(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||U4e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return j4e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ty=(e,t)=>Math.round(e/t)*t,Ub=e=>e.kind==="line"&&e.layer==="mask",q4e=e=>e.kind==="line"&&e.layer==="base",K4e=e=>e.kind==="image"&&e.layer==="base",Y4e=e=>e.kind==="line",TA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:.5},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1},Z4e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",objects:[],pastObjects:[],futureObjects:[],...TA},outpainting:{layer:"base",objects:[],pastObjects:[],futureObjects:[],stagingArea:{images:[],selectedImageIndex:0},shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...TA}},b$=vb({name:"canvas",initialState:Z4e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=e[e.currentCanvas].objects.filter(t=>!Ub(t)),e[e.currentCanvas].futureObjects=[],e[e.currentCanvas].shouldInvertMask=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldInvertMask=!e[e.currentCanvas].shouldInvertMask},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldInvertMask:(e,t)=>{e[e.currentCanvas].shouldInvertMask=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{e.inpainting.imageToInpaint=void 0},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.imageToInpaint=t.payload,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ge.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ge.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,P=Ge.clamp(m,64,h),E=Ge.clamp(v,64,g),k=b>0?i-b:i,T=w>0?o-w:o,I=Ge.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-P),O=Ge.clamp(T,e[e.currentCanvas].stageCoordinates.y,g-E);e[e.currentCanvas].boundingBoxDimensions={width:P,height:E},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastObjects=[],e[e.currentCanvas].futureObjects=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpaintingSesion:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n;e.outpainting.pastObjects.push([...e.outpainting.objects]),e.outpainting.futureObjects=[],e.outpainting.objects.push({kind:"image",layer:"base",x:i,y:o,image:r})},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,eraserSize:a}=e[e.currentCanvas];n!=="move"&&(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects.push({kind:"line",layer:r,tool:n,strokeWidth:n==="brush"?o/2:a/2,points:t.payload,...r==="base"&&n==="brush"&&{color:i}}),e[e.currentCanvas].futureObjects=[])},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].objects.findLast(Y4e);!n||n.points.push(...t.payload)},undo:e=>{if(e.outpainting.objects.length===0)return;const t=e.outpainting.pastObjects.pop();!t||(e.outpainting.futureObjects.unshift(e.outpainting.objects),e.outpainting.objects=t)},redo:e=>{if(e.outpainting.futureObjects.length===0)return;const t=e.outpainting.futureObjects.shift();!t||(e.outpainting.pastObjects.push(e.outpainting.objects),e.outpainting.objects=t)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=[],e[e.currentCanvas].futureObjects=[]}},extraReducers:e=>{e.addCase(R_.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastObjects.push([...t.outpainting.objects]),t.outpainting.futureObjects=[],t.outpainting.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:Su,setLayer:X4e,setBrushColor:Q4e,setBrushSize:x$,setEraserSize:J4e,addLine:S$,addPointToCurrentLine:w$,setShouldInvertMask:e5e,setIsMaskEnabled:C$,setShouldShowCheckboardTransparency:Zke,setShouldShowBrushPreview:d6,setMaskColor:_$,clearMask:k$,clearImageToInpaint:t5e,undo:n5e,redo:r5e,setCursorPosition:E$,setStageDimensions:LA,setImageToInpaint:q4,setImageToOutpaint:P$,setBoundingBoxDimensions:qg,setBoundingBoxCoordinates:f6,setBoundingBoxPreviewFill:Xke,setDoesCanvasNeedScaling:Cr,setStageScale:T$,toggleTool:Qke,setShouldShowBoundingBox:O_,setShouldDarkenOutsideBoundingBox:L$,setIsDrawing:jb,setShouldShowBrush:Jke,setClearBrushHistory:i5e,setShouldUseInpaintReplace:o5e,setInpaintReplace:AA,setShouldLockBoundingBox:A$,toggleShouldLockBoundingBox:a5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:h6,setIsMouseOverBoundingBox:Ly,setIsMoveBoundingBoxKeyHeld:eEe,setIsMoveStageKeyHeld:tEe,setStageCoordinates:I$,setCurrentCanvas:M$,addImageToOutpaintingSesion:s5e,resetCanvas:l5e,setShouldShowGrid:u5e,setShouldSnapToGrid:c5e,setShouldAutoSave:d5e,setShouldShowIntermediates:f5e,setIsMovingStage:K4}=b$.actions,h5e=b$.reducer,R_=ove("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Tp(),...v},x:a,y:s}}),Yt=e=>e.canvas[e.canvas.currentCanvas],Gv=e=>e.canvas.outpainting,qv=Xe([e=>e.canvas,rn],(e,t)=>{if(t==="inpainting")return e.inpainting.imageToInpaint;if(t==="outpainting"){const n=e.outpainting.objects.find(r=>r.kind==="image");if(n&&n.kind==="image")return n.image}}),O$=Xe([e=>e.options,e=>e.system,qv,rn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ge.isEqual,resultEqualityCheck:Ge.isEqual}}),HC=Jr("socketio/generateImage"),p5e=Jr("socketio/runESRGAN"),g5e=Jr("socketio/runFacetool"),m5e=Jr("socketio/deleteImage"),WC=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),v5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const y5e=Jr("socketio/requestSystemConfig"),b5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function R$(e){const{iconButton:t=!1,...n}=e,r=Fe(),{isReady:i,reasonsWhyNotReady:o}=Ce(O$),a=Ce(rn),s=()=>{r(HC(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(HC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(I4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(gz,{children:o.map((u,h)=>x(mz,{children:u},h))})})}const x5e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function N$(e){const{...t}=e,n=Fe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(x5e),a=()=>n(v5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(c4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const S5e=Xe(e=>e.options,e=>e.shouldLoopback),D$=()=>{const e=Fe(),t=Ce(S5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(R4e,{}),onClick:()=>{e(f7e(!t))}})},Gb=()=>ee("div",{className:"process-buttons",children:[x(R$,{}),x(D$,{}),x(N$,{})]}),w5e=Xe([e=>e.options,rn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),qb=()=>{const e=Fe(),{prompt:t,activeTabName:n}=Ce(w5e),{isReady:r}=Ce(O$),i=C.exports.useRef(null),o=s=>{e(cx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(HC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(uF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function C5e(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm2.121.707a1 1 0 0 0-1.414 0L4.16 7.547l5.293 5.293 4.633-4.633a1 1 0 0 0 0-1.414l-3.879-3.879zM8.746 13.547 3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function _5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function k5e(e,t){e.classList?e.classList.add(t):_5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function E5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},F$=le.createContext(null);var $$=function(t){return t.scrollTop},Kg="unmounted",Sf="exited",wf="entering",Lp="entered",VC="exiting",Pu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Sf,o.appearStatus=wf):l=Lp:r.unmountOnExit||r.mountOnEnter?l=Kg:l=Sf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Kg?{status:Sf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Lp&&(o=wf):(a===wf||a===Lp)&&(o=VC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this);a&&$$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sf&&this.setState({status:Kg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[iy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Lp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Lp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:iy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:Sf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:VC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Sf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Kg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(F$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Pu.contextType=F$;Pu.propTypes={};function Cp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cp,onEntering:Cp,onEntered:Cp,onExit:Cp,onExiting:Cp,onExited:Cp};Pu.UNMOUNTED=Kg;Pu.EXITED=Sf;Pu.ENTERING=wf;Pu.ENTERED=Lp;Pu.EXITING=VC;const P5e=Pu;var T5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k5e(t,r)})},p6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return E5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},V$=""+new URL("logo.13003d72.png",import.meta.url).href,L5e=Xe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Kb=e=>{const t=Fe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce(L5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(b0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(b0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(c7e(a.current?a.current.scrollTop:0)),t(b0(!1)),t(d7e(!1)))},[t,i]);W$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(u7e(!i)),t(Cr(!0))};return x(H$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(z$,{}):x(B$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function A5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(b3e,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(I_,{}),x(Hf,{size:"lg",children:"Click or Drag and Drop"})]})})},I5e=Xe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),UC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=O4(),a=Fe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(I5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(m5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(l$(!b.target.checked));return ee(Kn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(s1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(pv,{children:ee(l1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(z4,{children:ee(an,{direction:"column",gap:5,children:[x(ko,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ee(an,{alignItems:"center",children:[x(ih,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),M5e=Xe([e=>e.system,e=>e.options,e=>e.gallery,rn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),U$=()=>{const e=Fe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(M5e),g=xd(),m=()=>{!u||(h&&e(kl(!1)),e(bv(u)),e(Co("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(t7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(Qv(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(cx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(P(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(p5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(g5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const T=()=>e(NW(!l)),I=()=>{!u||(h&&e(kl(!1)),e(q4(u)),e(Co("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(kl(!1)),e(P$(u)),e(Co("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?T():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(Eo,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(z4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(c6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(c6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(c6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(p$,{}),size:"sm",children:x(Wf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(Eo,{isAttached:!0,children:[x(gt,{icon:x(O4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(D4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(gt,{icon:x(b4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(Eo,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(C4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Uv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(w4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(jv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),x(gt,{icon:x(h$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:T}),x(UC,{image:u,children:x(gt,{icon:x(y$,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},O5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},j$=vb({name:"gallery",initialState:O5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Ay,clearIntermediateImage:DA,removeImage:G$,setCurrentImage:q$,addGalleryImages:R5e,setIntermediateImage:N5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:D5e,setShouldShowGallery:m0,setGalleryScrollPosition:z5e,setGalleryImageMinimumWidth:gf,setGalleryImageObjectFit:B5e,setShouldHoldGalleryOpen:F5e,setShouldAutoSwitchToNewImages:$5e,setCurrentCategory:Iy,setGalleryWidth:Pg}=j$.actions,H5e=j$.reducer;lt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});lt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});lt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});lt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});lt({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});lt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});lt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});lt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});lt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});lt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});lt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});lt({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});lt({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});lt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});lt({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});lt({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});lt({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});lt({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});lt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});lt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});lt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});lt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});lt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});lt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});lt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});lt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});lt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var K$=lt({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});lt({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});lt({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});lt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});lt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});lt({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});lt({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});lt({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});lt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});lt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});lt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});lt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});lt({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});lt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});lt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});lt({displayName:"SpinnerIcon",path:ee(Kn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});lt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});lt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});lt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});lt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});lt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});lt({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});lt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});lt({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});lt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});lt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});lt({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});lt({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});lt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function W5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(an,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(W5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(an,{direction:i?"column":"row",children:[ee(ko,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Wf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(K$,{mx:"2px"})]}):x(ko,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),V5e=(e,t)=>e.image.uuid===t.image.uuid,U5e=C.exports.memo(({image:e,styleClass:t})=>{const n=Fe();vt("esc",()=>{n(NW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:P,fit:E,init_image_path:k,mask_image_path:T,orig_path:I,scale:O}=r,N=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(an,{gap:1,direction:"column",width:"100%",children:[ee(an,{gap:2,children:[x(ko,{fontWeight:"semibold",children:"File:"}),ee(Wf,{href:e.url,isExternal:!0,children:[e.url,x(K$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Kn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&P!==void 0&&x(tr,{label:"Fix faces strength",value:P,onClick:()=>n(N3(P))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&P!==void 0&&x(tr,{label:"Upscaling strength",value:P,onClick:()=>n(m8(P))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:A3(s),onClick:()=>n(cx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(Qv(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(LW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(kW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(EW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:G4(u),onClick:()=>n(RW(G4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(AW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(IW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(TW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(PW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(bv(k))}),T&&x(tr,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(v8(T))}),i==="img2img"&&P&&x(tr,{label:"Image to image strength",value:P,onClick:()=>n(p8(P))}),E&&x(tr,{label:"Image to image fit",value:E,onClick:()=>n(OW(E))}),o&&o.length>0&&ee(Kn,{children:[x(Hf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:W,onClick:()=>n(m8(W))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:W}=D;return ee(an,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(N3($)),n(D3("codeformer"))}}),W&&x(tr,{label:"Fidelity",value:W,onClick:()=>{n(MW(W)),n(D3("codeformer"))}})]},z)}})]}),ee(an,{gap:2,direction:"column",children:[ee(an,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(ko,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(fz,{width:"100%",pt:10,children:x(ko,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},V5e),Y$=Xe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:i,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function j5e(){const e=Fe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())},m=()=>{e(kl(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ob,{src:i.url,width:o?i.width:void 0,height:o?i.height:void 0,onClick:m}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(U5e,{image:i,styleClass:"current-image-metadata"})]})}const G5e=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(G5e);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Kn,{children:[x(U$,{}),x(j5e,{})]}):x("div",{className:"current-image-display-placeholder",children:x(u4e,{})})})},Z$=()=>{const e=C.exports.useContext(D_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(I_,{}),onClick:e||void 0})};function q5e(){const e=Ce(i=>i.options.initialImage),t=Fe(),n=xd(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(DW())};return ee(Kn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Z$,{})]}),e&&x("div",{className:"init-image-preview",children:x(ob,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const K5e=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(q5e,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function Y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Z5e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},rbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],HA="__resizable_base__",X$=function(e){J5e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(HA):o.className+=HA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ebe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return g6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?g6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?g6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&_p("left",o),s=i&&_p("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var P=(m-b)*this.ratio+w,E=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,I=Math.max(h,P),O=Math.min(g,E),N=Math.max(m,k),D=Math.min(v,T);n=Oy(n,I,O),r=Oy(r,N,D)}else n=Oy(n,h,g),r=Oy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Ry(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ry(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Ry(n)?n.touches[0].clientX:n.clientX,h=Ry(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,P=this.getParentSize(),E=nbe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=$A(T,this.props.snap.y,this.props.snapGap));var N=this.calculateNewSizeFromAspectRatio(I,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=N.newWidth,T=N.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(T,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:I-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/P.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=T/P.height*100;T=Y+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var j=T/this.window.innerHeight*100;T=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Il.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(Q5e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return rbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Kv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,P=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:P},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ibe(i,...t)]}function ibe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function obe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q$(...e){return t=>e.forEach(n=>obe(n,t))}function Ha(...e){return C.exports.useCallback(Q$(...e),e)}const vv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(sbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});vv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...lbe(r,n.props),ref:Q$(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const abe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function sbe(e){return C.exports.isValidElement(e)&&e.type===abe}function lbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const ube=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=ube.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?vv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function J$(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function eH(e){const t=e+"CollectionProvider",[n,r]=Kv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:b,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,b)=>{const{scope:w,children:P}=v,E=o(s,w),k=Ha(b,E.collectionRef);return le.createElement(vv,{ref:k},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=le.forwardRef((v,b)=>{const{scope:w,children:P,...E}=v,k=le.useRef(null),T=Ha(b,k),I=o(u,w);return le.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),le.createElement(vv,{[h]:"",ref:T},P)});function m(v){const b=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const cbe=C.exports.createContext(void 0);function tH(e){const t=C.exports.useContext(cbe);return e||t||"ltr"}function Tl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function dbe(e,t=globalThis?.document){const n=Tl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const GC="dismissableLayer.update",fbe="dismissableLayer.pointerDownOutside",hbe="dismissableLayer.focusOutside";let WA;const pbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(pbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=P.indexOf(E),T=g?P.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,N=mbe(z=>{const $=z.target,W=[...h.branches].some(Y=>Y.contains($));!O||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=vbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return dbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(GC,z),()=>document.removeEventListener(GC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,N.onPointerDownCapture)}))});function mbe(e,t=globalThis?.document){const n=Tl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nH(fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vbe(e,t=globalThis?.document){const n=Tl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&nH(hbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(GC);document.dispatchEvent(e)}function nH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?J$(i,o):i.dispatchEvent(o)}let m6=0;function ybe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),m6++,()=>{m6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),m6--}},[])}function UA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const v6="focusScope.autoFocusOnMount",y6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},bbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Tl(i),h=Tl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:Cf(g.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(v6,jA);s.addEventListener(v6,u),s.dispatchEvent(E),E.defaultPrevented||(xbe(kbe(rH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(v6,u),setTimeout(()=>{const E=new CustomEvent(y6,jA);s.addEventListener(y6,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(y6,h),qA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const k=w.currentTarget,[T,I]=Sbe(k);T&&I?!w.shiftKey&&E===I?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(I,{select:!0})):E===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function xbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function Sbe(e){const t=rH(e),n=GA(t,e),r=GA(t.reverse(),e);return[n,r]}function rH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GA(e,t){for(const n of e)if(!wbe(n,{upTo:t}))return n}function wbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cbe(e)&&t&&e.select()}}const qA=_be();function _be(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kbe(e){return e.filter(t=>t.tagName!=="A")}const z0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Ebe=M6["useId".toString()]||(()=>{});let Pbe=0;function Tbe(e){const[t,n]=C.exports.useState(Ebe());return z0(()=>{e||n(r=>r??String(Pbe++))},[e]),e||(t?`radix-${t}`:"")}function J0(e){return e.split("-")[0]}function Yb(e){return e.split("-")[1]}function e1(e){return["top","bottom"].includes(J0(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=e1(t),l=H_(s),u=r[l]/2-i[l]/2,h=J0(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Yb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Lbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=YA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=iH(r),h={x:i,y:o},g=e1(a),m=Yb(a),v=H_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=E/2-k/2,N=u[w],D=I-b[v]-u[P],z=I/2-b[v]/2+O,$=qC(N,z,D),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?zObe[t])}function Rbe(e,t,n){n===void 0&&(n=!1);const r=Yb(e),i=e1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X4(a)),{main:a,cross:X4(a)}}const Nbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>Nbe[t])}const Dbe=["top","right","bottom","left"];function zbe(e){const t=X4(e);return[XA(e),t,XA(t)]}const Bbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=J0(r),E=g||(w===a||!v?[X4(a)]:zbe(a)),k=[a,...E],T=await Z4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(T[w]),h){const{main:$,cross:W}=Rbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(T[$],T[W])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var N,D;const $=((N=(D=i.flip)==null?void 0:D.index)!=null?N:0)+1,W=k[$];if(W)return{data:{index:$,overflows:O},reset:{placement:W}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,re)=>te+re,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Dbe.some(t=>e[t]>=0)}const Fbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Z4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Z4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function $be(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=J0(n),s=Yb(n),l=e1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Hbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await $be(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function oH(e){return e==="x"?"y":"x"}const Wbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:k}=P;return{x:E,y:k}}},...l}=e,u={x:n,y:r},h=await Z4(t,l),g=e1(J0(i)),m=oH(g);let v=u[g],b=u[m];if(o){const P=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=v+h[P],T=v-h[E];v=qC(k,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+h[P],T=b-h[E];b=qC(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Vbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=e1(i),m=oH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",N=o.reference[g]-o.floating[O]+P.mainAxis,D=o.reference[g]+o.reference[O]-P.mainAxis;vD&&(v=D)}if(u){var E,k,T,I;const O=g==="y"?"width":"height",N=["top","left"].includes(J0(i)),D=o.reference[m]-o.floating[O]+(N&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(N?0:P.crossAxis),z=o.reference[m]+o.reference[O]+(N?0:(T=(I=a.offset)==null?void 0:I[m])!=null?T:0)-(N?P.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function aH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Tu(e){if(e==null)return window;if(!aH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Tu(e).getComputedStyle(e)}function Cu(e){return aH(e)?"":e?(e.nodeName||"").toLowerCase():""}function sH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Tu(e).HTMLElement}function ud(e){return e instanceof Tu(e).Element}function Ube(e){return e instanceof Tu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Tu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zb(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function jbe(e){return["table","td","th"].includes(Cu(e))}function lH(e){const t=/firefox/i.test(sH()),n=Yv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function uH(){return!/^((?!chrome|android).)*safari/i.test(sH())}const eI=Math.min,Em=Math.max,Q4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&Q4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Q4(s.height)/e.offsetHeight||1);const h=ud(e)?Tu(e):window,g=!uH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Ube(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xb(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cH(e){return _u(Sd(e)).left+Xb(e).scrollLeft}function Gbe(e){const t=_u(e);return Q4(t.width)!==e.offsetWidth||Q4(t.height)!==e.offsetHeight}function qbe(e,t,n){const r=Ll(t),i=Sd(t),o=_u(e,r&&Gbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||Zb(i))&&(a=Xb(t)),Ll(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||Sd(e)}function tI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Kbe(e){let t=dH(e);for(W_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Cu(t));){if(lH(t))return t;t=t.parentNode}return null}function KC(e){const t=Tu(e);let n=tI(e);for(;n&&jbe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!lH(n))?t:n||Kbe(e)||t}function nI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Ybe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||Zb(o))&&(a=Xb(n)),Ll(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Zbe(e,t){const n=Tu(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=uH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Xbe(e){var t;const n=Sd(e),r=Xb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Em(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Em(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+cH(e);const l=-r.scrollTop;return Yv(i||n).direction==="rtl"&&(s+=Em(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fH(e){const t=dH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Ll(t)&&Zb(t)?t:fH(t)}function J4(e,t){var n;t===void 0&&(t=[]);const r=fH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Tu(r),a=i?[o].concat(o.visualViewport||[],Zb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(J4(a))}function Qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Jbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function rI(e,t,n){return t==="viewport"?Y4(Zbe(e,n)):ud(t)?Jbe(t,n):Y4(Xbe(Sd(e)))}function exe(e){const t=J4(e),r=["absolute","fixed"].includes(Yv(e).position)&&Ll(e)?KC(e):e;return ud(r)?t.filter(i=>ud(i)&&Qbe(i,r)&&Cu(i)!=="body"):[]}function txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?exe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Em(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Em(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const nxe={getClippingRect:txe,convertOffsetParentRelativeRectToViewportRelativeRect:Ybe,isElement:ud,getDimensions:nI,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qbe(t,KC(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Yv(e).direction==="rtl"};function rxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?J4(e):[],...J4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?_u(e):null;s&&b();function b(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const ixe=(e,t,n)=>Lbe(e,t,{platform:nxe,...n});var YC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function oxe(e){const t=C.exports.useRef(e);return YC(()=>{t.current=e}),t}function axe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=oxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);ZC(g?.map(T=>{let{options:I}=T;return I}),t?.map(T=>{let{options:I}=T;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||ixe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Il.exports.flushSync(()=>{h(T)})})},[g,n,r]);YC(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);YC(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:P,floating:E}),[u,v,k,P,E])}const sxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function lxe(e){const[t,n]=C.exports.useState(void 0);return z0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hH="Popper",[V_,pH]=Kv(hH),[uxe,gH]=V_(hH),cxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(uxe,{scope:t,anchor:r,onAnchorChange:i},n)},dxe="PopperAnchor",fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gH(dxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),e5="PopperContent",[hxe,nEe]=V_(e5),[pxe,gxe]=V_(e5,{hasParent:!1,positionUpdateFns:new Set}),mxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:I=!0,...O}=e,N=gH(e5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[W,Y]=C.exports.useState(null),de=lxe(W),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,re=g+(v!=="center"?"-"+v:""),se=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},G=Array.isArray(P)?P:[P],V=G.length>0,q={padding:se,boundary:G.filter(yxe),altBoundary:V},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:Ue,update:ct}=axe({strategy:"fixed",placement:re,whileElementsMounted:rxe,middleware:[Hbe({mainAxis:m+te,alignmentAxis:b}),I?Wbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Vbe():void 0,...q}):void 0,W?sxe({element:W,padding:w}):void 0,I?Bbe({...q}):void 0,bxe({arrowWidth:j,arrowHeight:te}),T?Fbe({strategy:"referenceHidden"}):void 0].filter(vxe)});z0(()=>{Q(N.anchor)},[Q,N.anchor]);const qe=ye!==null&&Se!==null,[et,tt]=mH(He),at=(i=Ue.arrow)===null||i===void 0?void 0:i.x,At=(o=Ue.arrow)===null||o===void 0?void 0:o.y,wt=((a=Ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,dt]=C.exports.useState();z0(()=>{D&&dt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=gxe(e5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":et,"data-align":tt,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=Ue.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Ue.transformOrigin)===null||l===void 0?void 0:l.x,(u=Ue.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(hxe,{scope:h,placedSide:et,onArrowChange:Y,arrowX:at,arrowY:At,shouldHideArrow:wt},xt?C.exports.createElement(pxe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(wu.div,kn)):C.exports.createElement(wu.div,kn)))});function vxe(e){return e!==void 0}function yxe(e){return e!==null}const bxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=mH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",I="";return b==="bottom"?(T=g?P:`${E}px`,I=`${-v}px`):b==="top"?(T=g?P:`${E}px`,I=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,I=g?P:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,I=g?P:`${k}px`),{data:{x:T,y:I}}}});function mH(e){const[t,n="center"]=e.split("-");return[t,n]}const xxe=cxe,Sxe=fxe,wxe=mxe;function Cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vH=e=>{const{present:t,children:n}=e,r=_xe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};vH.displayName="Presence";function _xe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Dy(r.current);o.current=s==="mounted"?u:"none"},[s]),z0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Dy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),z0(()=>{if(t){const u=g=>{const v=Dy(r.current).includes(g.animationName);g.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Dy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Dy(e){return e?.animationName||"none"}function kxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Exe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Tl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Exe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Tl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const b6="rovingFocusGroup.onEntryFocus",Pxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[XC,yH,Txe]=eH(U_),[Lxe,bH]=Kv(U_,[Txe]),[Axe,Ixe]=Lxe(U_),Mxe=C.exports.forwardRef((e,t)=>C.exports.createElement(XC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(XC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Oxe,An({},e,{ref:t}))))),Oxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=tH(o),[b=null,w]=kxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),k=Tl(u),T=yH(n),I=C.exports.useRef(!1),[O,N]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(b6,k),()=>D.removeEventListener(b6,k)},[k]),C.exports.createElement(Axe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>N(D=>D-1),[])},C.exports.createElement(wu.div,An({tabIndex:P||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!P){const $=new CustomEvent(b6,Pxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),Y=W.find(re=>re.active),de=W.find(re=>re.id===b),te=[Y,de,...W].filter(Boolean).map(re=>re.ref.current);xH(te)}}I.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Rxe="RovingFocusGroupItem",Nxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Tbe(),s=Ixe(Rxe,n),l=s.currentTabStopId===a,u=yH(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(XC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Bxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Fxe(w,P+1):w.slice(P+1)}setTimeout(()=>xH(w))}})})))}),Dxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bxe(e,t,n){const r=zxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Dxe[r]}function xH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Fxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const $xe=Mxe,Hxe=Nxe,Wxe=["Enter"," "],Vxe=["ArrowDown","PageUp","Home"],SH=["ArrowUp","PageDown","End"],Uxe=[...Vxe,...SH],Qb="Menu",[QC,jxe,Gxe]=eH(Qb),[dh,wH]=Kv(Qb,[Gxe,pH,bH]),j_=pH(),CH=bH(),[qxe,Jb]=dh(Qb),[Kxe,G_]=dh(Qb),Yxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Tl(o),m=tH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(xxe,s,C.exports.createElement(qxe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(Kxe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Sxe,An({},i,r,{ref:t}))}),Xxe="MenuPortal",[rEe,Qxe]=dh(Xxe,{forceMount:void 0}),td="MenuContent",[Jxe,_H]=dh(td),eSe=C.exports.forwardRef((e,t)=>{const n=Qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Jb(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(QC.Provider,{scope:e.__scopeMenu},C.exports.createElement(vH,{present:r||o.open},C.exports.createElement(QC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(tSe,An({},i,{ref:t})):C.exports.createElement(nSe,An({},i,{ref:t})))))}),tSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Gz(o)},[]),C.exports.createElement(kH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),nSe=C.exports.forwardRef((e,t)=>{const n=Jb(td,e.__scopeMenu);return C.exports.createElement(kH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=Jb(td,n),P=G_(td,n),E=j_(n),k=CH(n),T=jxe(n),[I,O]=C.exports.useState(null),N=C.exports.useRef(null),D=Ha(t,N,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?MB:C.exports.Fragment,re=v?{as:vv,allowPinchZoom:!0}:void 0,se=V=>{var q,Q;const X=$.current+V,me=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),Ue=dSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===Ue))===null||Q===void 0?void 0:Q.ref.current;(function qe(et){$.current=et,window.clearTimeout(z.current),et!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ybe();const G=C.exports.useCallback(V=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&hSe(V,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(Jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),onItemLeave:C.exports.useCallback(V=>{var q;G(V)||((q=N.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(V=>{G(V)&&V.preventDefault()},[G]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(V=>{Y.current=V},[])},C.exports.createElement(te,re,C.exports.createElement(bbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,V=>{var q;V.preventDefault(),(q=N.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(gbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement($xe,An({asChild:!0},k,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:V=>{P.isUsingKeyboardRef.current||V.preventDefault()}}),C.exports.createElement(wxe,An({role:"menu","aria-orientation":"vertical","data-state":lSe(w.open),"data-radix-menu-content":"",dir:P.dir},E,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,V=>{const Q=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,me=V.key.length===1;Q&&(V.key==="Tab"&&V.preventDefault(),!X&&me&&se(V.key));const ye=N.current;if(V.target!==ye||!Uxe.includes(V.key))return;V.preventDefault();const He=T().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);SH.includes(V.key)&&He.reverse(),uSe(He)}),onBlur:qn(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,e8(V=>{const q=V.target,Q=j.current!==V.clientX;if(V.currentTarget.contains(q)&&Q){const X=V.clientX>j.current?"right":"left";de.current=X,j.current=V.clientX}}))})))))))}),JC="MenuItem",iI="menu.itemSelect",rSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(JC,e.__scopeMenu),s=_H(JC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),J$(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(iSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Wxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),iSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_H(JC,n),s=CH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(QC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Hxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,e8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,e8(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),oSe="MenuRadioGroup";dh(oSe,{value:void 0,onValueChange:()=>{}});const aSe="MenuItemIndicator";dh(aSe,{checked:!1});const sSe="MenuSub";dh(sSe);function lSe(e){return e?"open":"closed"}function uSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function fSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function hSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fSe(n,t)}function e8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const pSe=Yxe,gSe=Zxe,mSe=eSe,vSe=rSe,EH="ContextMenu",[ySe,iEe]=Kv(EH,[wH]),ex=wH(),[bSe,PH]=ySe(EH),xSe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=ex(t),u=Tl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(bSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(pSe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},SSe="ContextMenuTrigger",wSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(SSe,n),o=ex(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(gSe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,zy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,zy(u)),onPointerCancel:qn(e.onPointerCancel,zy(u)),onPointerUp:qn(e.onPointerUp,zy(u))})))}),CSe="ContextMenuContent",_Se=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(CSe,n),o=ex(n),a=C.exports.useRef(!1);return C.exports.createElement(mSe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),kSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=ex(n);return C.exports.createElement(vSe,An({},i,r,{ref:t}))});function zy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const ESe=xSe,PSe=wSe,TSe=_Se,wc=kSe,LSe=Xe([e=>e.gallery,e=>e.options,rn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ASe=Xe([e=>e.options,e=>e.gallery,e=>e.system,rn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ISe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,MSe=C.exports.memo(e=>{const t=Fe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce(ASe),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=xd(),w=()=>v(!0),P=()=>v(!1),E=()=>{s.metadata&&t(cx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(Qv(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},T=()=>{a&&t(kl(!1)),t(bv(s)),n!=="img2img"&&t(Co("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(kl(!1)),t(q4(s)),n!=="inpainting"&&t(Co("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(kl(!1)),t(P$(s)),n!=="outpainting"&&t(Co("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},N=()=>{g&&t(a7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(Co("img2img")),t(s7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(ESe,{children:[x(PSe,{children:ee(md,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:P,children:[x(ob,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:S4e,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(UC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(B4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(TSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(wc,{onClickCapture:E,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(wc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(wc,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(wc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(wc,{onClickCapture:T,children:"Send to Image To Image"}),x(wc,{onClickCapture:I,children:"Send to Inpainting"}),x(wc,{onClickCapture:O,children:"Send to Outpainting"}),x(UC,{image:s,children:x(wc,{"data-warning":!0,children:"Delete Image"})})]})]})},ISe),OSe=320;function TH(){const e=Fe(),t=xd(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:P}=Ce(LSe),[E,k]=C.exports.useState(300),[T,I]=C.exports.useState(590),[O,N]=C.exports.useState(w>=OSe);C.exports.useEffect(()=>{if(!!o){if(P){e(Pg(400)),k(400),I(400);return}h==="inpainting"?(e(Pg(190)),k(190),I(190)):h==="img2img"?(e(Pg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Pg(Math.min(Math.max(Number(w),0),590))),I(590)),e(Cr(!0))}},[e,h,o,w,P]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,P]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),W=()=>{e(D5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(m0(!0)),o&&e(Cr(!0))},j=()=>{e(m0(!1)),e(z5e(z.current?z.current.scrollTop:0)),e(F5e(!1))},te=()=>{e(WC(r))},re=q=>{e(gf(q)),e(Cr(!0))},se=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{W(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(m0(!1)),e(Cr(!0)))},[o]);const V=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+V;q<=256?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-V;q>32?(e(gf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(gf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(gf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),W$(D,j,!o),x(H$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:se,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(X$,{minWidth:E,maxWidth:T,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Pg(Ge.clamp(Number(w)+me.width,0,Number(T)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ge.clamp(Number(w)+me.width,0,Number(T));ye>=280&&!O?N(!0):ye<280&&O&&N(!1),ye>=T?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(Eo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Kn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Iy("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Iy("user")),children:"User"})]}):ee(Kn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(_4e,{}),onClick:()=>e(Iy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(H4e,{}),onClick:()=>e(Iy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(M_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ch,{value:l,onChange:re,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(gf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(B5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e($5e(q.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?x(z$,{}):x(B$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Kn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(MSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(c$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const RSe=Xe([e=>e.options,rn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,activeTabName:t,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),tx=e=>{const t=Fe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,activeTabName:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ce(RSe),u=()=>{t(l7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{u()},{enabled:l},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,l&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:u,children:x(Y5e,{})})})]}),!s&&x(TH,{})]})})};function NSe(){return x(tx,{optionsPanel:x(A5e,{}),children:x(K5e,{})})}const DSe=Xe(Yt,e=>e.shouldDarkenOutsideBoundingBox);function zSe(){const e=Fe(),t=Ce(DSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(L$(!t))},styleClass:"inpainting-bounding-box-darken"})}const BSe=Xe(Yt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=Fe(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(BSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(qg({...a,width:Math.floor(g)})),t=="height"&&r(qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(qg({...a,width:Math.floor(s)})),t=="height"&&r(qg({...a,height:Math.floor(s)}))};return x(ch,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const FSe=Xe(Yt,e=>e.shouldLockBoundingBox);function $Se(){const e=Ce(FSe),t=Fe();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(A$(!e))},styleClass:"inpainting-bounding-box-darken"})}const HSe=Xe(Yt,e=>e.shouldShowBoundingBox);function WSe(){const e=Ce(HSe),t=Fe();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(r$,{size:22}):x(n$,{size:22}),onClick:()=>t(O_(!e)),background:"none",padding:0})}const VSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(WSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(an,{alignItems:"center",justifyContent:"space-between",children:[x(zSe,{}),x($Se,{})]})]})]}),USe=Xe(Yt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function jSe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(USe),n=Fe();return ee(an,{alignItems:"center",columnGap:"1rem",children:[x(ch,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(o5e(r.target.checked))})]})}const GSe=Xe(Yt,e=>{const{pastObjects:t,futureObjects:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function qSe(){const e=Fe(),t=xd(),{mayClearBrushHistory:n}=Ce(GSe);return x(ul,{onClick:()=>{e(i5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function LH(){return ee(Kn,{children:[x(jSe,{}),x(VSe,{}),x(qSe,{})]})}function KSe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}function nx(){return(nx=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function t8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var B0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(aI(i.current,P,s.current)):w(!1)},b=function(){return w(!1)};function w(P){var E=l.current,k=n8(i.current),T=P?k.addEventListener:k.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",b)}return[function(P){var E=P.nativeEvent,k=i.current;if(k&&(sI(E),!function(I,O){return O&&!Pm(I)}(E,l.current)&&k)){if(Pm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(aI(k,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...nx({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),rx=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=rx(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},IH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},r8=function(e){var t=IH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},x6=function(e){var t=IH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},YSe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},ZSe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},XSe=le.memo(function(e){var t=e.hue,n=e.onChange,r=rx(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:B0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:r8({h:t,s:100,v:100,a:1})})))}),QSe=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:r8({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:B0(t.s+100*i.left,0,100),v:B0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:r8(t)})))}),MH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function JSe(e,t,n){var r=t8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;MH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var e6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,t6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,n6e=function(e){e6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,lI.set(t,n);var r=t6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},r6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+x6(Object.assign({},n,{a:0}))+", "+x6(Object.assign({},n,{a:1}))+")"},o=rx(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:B0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:x6(n)})))},i6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);n6e(s);var l=JSe(n,i,o),u=l[0],h=l[1],g=rx(["react-colorful",t]);return le.createElement("div",nx({},a,{ref:s,className:g}),x(QSe,{hsva:u,onChange:h}),x(XSe,{hue:u.h,onChange:h}),le.createElement(r6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},o6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:ZSe,fromHsva:YSe,equal:MH},a6e=function(e){return le.createElement(i6e,nx({},e,{colorModel:o6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(a6e,{className:`invokeai__color-picker ${t}`,...n})},s6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function l6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(s6e),r=Fe(),i=o=>{r(_$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(gt,{"aria-label":"Mask Color",icon:x(A4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const u6e=Xe([Yt,rn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function c6e(){const e=Fe(),{tool:t,brushSize:n,activeTabName:r}=Ce(u6e),i=()=>e(Su("brush")),o=()=>{e(d6(!0))},a=()=>{e(d6(!1))},s=l=>{e(d6(!0)),e(x$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(ch,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(l6e,{})]})})}const d6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function f6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(d6e),r=Fe(),i=()=>r(Su("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(gt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(g$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const h6e=Xe([Yt,rn],(e,t)=>{const{pastObjects:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function OH(){const e=Fe(),{canUndo:t,activeTabName:n}=Ce(h6e),r=()=>{e(n5e())};return vt(["meta+z","control+z"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Undo",tooltip:"Undo",icon:x(F4e,{}),onClick:r,isDisabled:!t})}const p6e=Xe([Yt,rn],(e,t)=>{const{futureObjects:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function RH(){const e=Fe(),{canRedo:t,activeTabName:n}=Ce(p6e),r=()=>{e(r5e())};return vt(["meta+shift+z","control+shift+z","control+y","meta+y"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Redo",tooltip:"Redo",icon:x(N4e,{}),onClick:r,isDisabled:!t})}const g6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,objects:r}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(Ub).length===0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function m6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(g6e),r=Fe(),i=xd(),o=()=>{r(k$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(gt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(M4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const v6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function y6e(){const e=Fe(),{isMaskEnabled:t,activeTabName:n}=Ce(v6e),r=()=>e(C$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(gt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(r$,{size:22}):x(n$,{size:22}),onClick:r})}const b6e=Xe([Yt,rn],(e,t)=>{const{isMaskEnabled:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function x6e(){const{shouldInvertMask:e,isMaskEnabled:t,activeTabName:n}=Ce(b6e),r=Fe(),i=()=>r(e5e(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(gt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(a4e,{size:22}):x(s4e,{size:22}),onClick:i,isDisabled:!t})}const S6e=Xe(Yt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),w6e=()=>{const e=Fe(),{shouldLockBoundingBox:t}=Ce(S6e);return x(gt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(P4e,{}):x($4e,{}),"data-selected":t,onClick:()=>{e(A$(!t))}})},C6e=Xe(Yt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_6e=()=>{const e=Fe(),{shouldShowBoundingBox:t}=Ce(C6e);return x(gt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(W4e,{}),"data-alert":!t,onClick:()=>{e(O_(!t))}})},k6e=Xe([Yt,rn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function E6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(k6e),r=Fe(),i=()=>r(Su("eraser"));return vt("shift+e",o=>{o.preventDefault(),i()},{enabled:!0},[n,t]),x(gt,{"aria-label":"Erase Canvas (Shift+E)",tooltip:"Erase Canvas (Shift+E)",icon:x(C5e,{}),fontSize:18,onClick:i,"data-selected":e==="eraser",isDisabled:!t})}var P6e=Math.PI/180;function T6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const v0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:v0,version:"8.3.13",isBrowser:T6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*P6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:v0.document,_injectGlobal(e){v0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var L6e="[object Array]",A6e="[object Number]",I6e="[object String]",M6e="[object Boolean]",O6e=Math.PI/180,R6e=180/Math.PI,S6="#",N6e="",D6e="0",z6e="Konva warning: ",uI="Konva error: ",B6e="rgb(",w6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},F6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,By=[];const $6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===L6e},_isNumber(e){return Object.prototype.toString.call(e)===A6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===I6e},_isBoolean(e){return Object.prototype.toString.call(e)===M6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){By.push(e),By.length===1&&$6e(function(){const t=By;By=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(S6,N6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=D6e+e;return S6+e},getRGB(e){var t;return e in w6?(t=w6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===S6?this._hexToRgb(e.substring(1)):e.substr(0,4)===B6e?(t=F6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=w6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function DH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function t1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function zH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function H6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ts(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function W6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Tg="get",Lg="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Tg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Lg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Tg+a(t),l=Lg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Lg+n,i=Tg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Tg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Tg+fe._capitalize(n),a=Lg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function V6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=U6e+u.join(cI)+j6e)):(o+=s.property,t||(o+=Z6e+s.val)),o+=K6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Q6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=V6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var I3="absoluteOpacity",$y="allEventListeners",iu="absoluteTransform",fI="absoluteScale",Ag="canvas",nwe="Change",rwe="children",iwe="konva",i8="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",M3=" ",vI="stage",kc="transform",owe="Stage",o8="visible",awe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M3);let swe=1;class Be{constructor(t){this._id=swe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===iu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===iu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(M3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ag)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===iu&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ag),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new y0({pixelRatio:a,width:i,height:o}),v=new y0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),P=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Ag),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(I3),this._clearSelfAndDescendantCache(fI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ag,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ag)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==rwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==owe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(iu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(iu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(I3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",kp=e=>{const t=Qg(e);if(t==="pointer")return ot.pointerEventsEnabled&&_6.pointer;if(t==="touch")return _6.touch;if(t==="mouse")return _6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const pwe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",O3=[];class ax extends aa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),O3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===uwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&O3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(pwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new y0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+yI,this.content.style.height=n+yI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rfwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||hwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=kp(t.type),r=Qg(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=kp(t.type),r=Qg(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=C6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a8,{evt:t}):this._fire(a8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=C6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(jp,Q_(t)),Tm(t.pointerId)}_lostpointercapture(t){Tm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new y0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ax.prototype.nodeType=lwe;gr(ax);Z.addGetterSetter(ax,"container");var XH="hasShadow",QH="shadowRGBA",JH="patternImage",eW="linearGradient",tW="radialGradient";let jy;function k6(){return jy||(jy=fe.createCanvasElement().getContext("2d"),jy)}const Lm={};function gwe(e){e.fill()}function mwe(e){e.stroke()}function vwe(e){e.fill()}function ywe(e){e.stroke()}function bwe(){this._clearCache(XH)}function xwe(){this._clearCache(QH)}function Swe(){this._clearCache(JH)}function wwe(){this._clearCache(eW)}function Cwe(){this._clearCache(tW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Lm)););this.colorKey=n,Lm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(XH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(JH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=k6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(eW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=k6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Lm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,P=v+b*2,E={width:w,height:P,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}}Ie.prototype._fillFunc=gwe;Ie.prototype._strokeFunc=mwe;Ie.prototype._fillFuncHit=vwe;Ie.prototype._strokeFuncHit=ywe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bwe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",xwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Swe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",wwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Cwe);Z.addGetterSetter(Ie,"stroke",void 0,zH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ts());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ts());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ts());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,t1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,zH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var _we="#",kwe="beforeDraw",Ewe="draw",nW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Pwe=nW.length;class fh extends aa{constructor(t){super(t),this.canvas=new y0,this.hitCanvas=new X_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(kwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Ewe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}fh.prototype.nodeType="Layer";gr(fh);Z.addGetterSetter(fh,"imageSmoothingEnabled",!0);Z.addGetterSetter(fh,"clearBeforeDraw",!0);Z.addGetterSetter(fh,"hitGraphEnabled",!0,Ts());class J_ extends fh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class F0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}F0.prototype.nodeType="Group";gr(F0);var E6=function(){return v0.performance&&v0.performance.now?function(){return v0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:E6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Lwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Am.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Awe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Iwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Twe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Am={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ts());function l8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function CI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,g,g+m,1-b),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],I=l,O=u,N,D,z,$,W,Y,de,j,te,re;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var se=b.shift(),G=b.shift();if(l+=se,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var V=a.length-2;V>=0;V--)if(a[V].command==="M"){l=a[V].points[0]+se,u=a[V].points[1]+G;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),T.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(D,z,l,u);break;case"t":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(D,z,l,u);break;case"A":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break;case"a":$=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,re=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(te,re,l,u,de,j,$,W,Y);break}a.push({command:k||v,points:T,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,P=b*-l*g/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},I=function(W,Y){return(W[0]*Y[0]+W[1]*Y[1])/(T(W)*T(Y))},O=function(W,Y){return(W[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,k,s,l,N,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class hh extends Au{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}hh.prototype.className="Arrow";gr(hh);Z.addGetterSetter(hh,"pointerLength",10,ze());Z.addGetterSetter(hh,"pointerWidth",10,ze());Z.addGetterSetter(hh,"pointerAtBeginning",!1);Z.addGetterSetter(hh,"pointerAtEnding",!0);class n1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}n1.prototype._centroid=!0;n1.prototype.className="Circle";n1.prototype._attrsAffectingSize=["radius"];gr(n1);Z.addGetterSetter(n1,"radius",0,ze());class Cd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Cd);Z.addComponentsGetterSetter(Cd,"radius",["x","y"]);Z.addGetterSetter(Cd,"radiusX",0,ze());Z.addGetterSetter(Cd,"radiusY",0,ze());class Ls extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";gr(Ls);Z.addGetterSetter(Ls,"image");Z.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);Z.addGetterSetter(Ls,"cropX",0,ze());Z.addGetterSetter(Ls,"cropY",0,ze());Z.addGetterSetter(Ls,"cropWidth",0,ze());Z.addGetterSetter(Ls,"cropHeight",0,ze());var rW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Mwe="Change.konva",Owe="none",u8="up",c8="right",d8="down",f8="left",Rwe=rW.length;class ek extends F0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gh.prototype.className="RegularPolygon";gh.prototype._centroid=!0;gh.prototype._attrsAffectingSize=["radius"];gr(gh);Z.addGetterSetter(gh,"radius",0,ze());Z.addGetterSetter(gh,"sides",0,ze());var _I=Math.PI*2;class mh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}mh.prototype.className="Ring";mh.prototype._centroid=!0;mh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(mh);Z.addGetterSetter(mh,"innerRadius",0,ze());Z.addGetterSetter(mh,"outerRadius",0,ze());class Rl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var qy;function T6(){return qy||(qy=fe.createCanvasElement().getContext(zwe),qy)}function Kwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Ywe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Zwe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(Zwe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Bwe,n),this}getWidth(){var t=this.attrs.width===Ep||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Ep||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=T6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Gy+this.fontVariant()+Gy+(this.fontSize()+Wwe)+qwe(this.fontFamily())}_addTextLine(t){this.align()===Ig&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return T6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Ep&&o!==void 0,l=a!==Ep&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==jwe&&b,P=this.ellipsis();this.textArr=[],T6().font=this._getContextFont();for(var E=P?this._getTextWidth(P6):0,k=0,T=t.length;kh)for(;I.length>0;){for(var N=0,D=I.length,z="",$=0;N>>1,Y=I.slice(0,W+1),de=this._getTextWidth(Y)+E;de<=h?(N=W+1,z=Y,$=de):D=W}if(z){if(w){var j,te=I[z.length],re=te===Gy||te===kI;re&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Gy),z.lastIndexOf(kI))+1,j>0&&(N=j,z=z.slice(0,N),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var se=this._shouldHandleEllipsis(m);if(se){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(N),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Ep&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Ep&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+P6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=iW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,re=0;for(v=void 0;Math.abs(j-te)/j>.01&&re<20;){re++;for(var se=te;b===void 0;)b=E(),b&&se+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var V=b.points[4],q=b.points[5],Q=b.points[4]+q;P===0?P=V+1e-8:j>te?P+=Math.PI/180*q/Math.abs(q):P-=Math.PI/360*q/Math.abs(q),(q<0&&P=0&&P>Q)&&(P=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case"C":P===0?j>b.pathLength?P=1e-8:P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength/2:P=Math.max(P-(te-j)/b.pathLength/2,0),P>1&&(P=1,G=!0),v=Nn.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":P===0?P=j/b.pathLength:j>te?P+=(j-te)/b.pathLength:P-=(te-j)/b.pathLength,P>1&&(P=1,G=!0),v=Nn.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},T="C",I=t._getTextSize(T).width+r,O=u/I-1,N=0;Ne+`.${dW}`).join(" "),TI="nodesRect",Jwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],eCe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const tCe="ontouchstart"in ot._global;function nCe(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(eCe[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var t5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function rCe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function iCe(e,t){const n=rCe(e);return fW(e,t,n)}function oCe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Jwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(TI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(TI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return fW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),t5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Zv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:tCe?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=nCe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),se=oCe(this.rotationSnaps(),j,te)-g.rotation,G=iCe(g,se);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,P=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const P=w.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),F0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function aCe(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){t5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+t5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",t5,aCe);Z.addGetterSetter(_n,"flipEnabled",!0,Ts());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Iu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Iu.prototype.className="Wedge";Iu.prototype._centroid=!0;Iu.prototype._attrsAffectingSize=["radius"];gr(Iu);Z.addGetterSetter(Iu,"radius",0,ze());Z.addGetterSetter(Iu,"angle",0,ze());Z.addGetterSetter(Iu,"clockwise",!1);Z.backCompat(Iu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var sCe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],lCe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function uCe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,P,E,k,T,I,O,N,D,z,$,W,Y,de,j=t+t+1,te=r-1,re=i-1,se=t+1,G=se*(se+1)/2,V=new AI,q=null,Q=V,X=null,me=null,ye=sCe[t],Se=lCe[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,b-=k,w-=T,P-=X.r,E-=X.g,k-=X.b,T-=X.a,l=o+((l=a+se)0&&uCe(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const dCe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const hCe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var k=b+(w-1+E)*4,T=s[P]-s[k],I=s[P+1]-s[k+1],O=s[P+2]-s[k+2],N=T,D=N>0?N:-N,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(N=I),$>D&&(N=O),N*=t,i){var W=s[P]+N,Y=s[P+1]+N,de=s[P+2]+N;s[P]=W>255?255:W<0?0:W,s[P+1]=Y>255?255:Y<0?0:Y,s[P+2]=de>255?255:de<0?0:de}else{var j=n-N;j<0?j=0:j>255&&(j=255),s[P]=s[P+1]=s[P+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function L6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const pCe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,P,E,k,T,I,O,N;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),N=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),P=r+v*(r-b),E=(s+a)*.5,k=s+v*(s-E),T=a+v*(a-E),I=(h+u)*.5,O=h+v*(h-I),N=u+v*(u-I)),m=0;mE?P:E;var k=a,T=o,I,O,N=360/T*Math.PI/180,D,z;for(O=0;OT?k:T;var I=a,O=o,N,D,z=n.polarRotation||0,$,W;for(h=0;ht&&(I=T,O=0,N=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function PCe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const ICe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);const OCe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const RCe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},DCe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;iae||L[H]!==M[ae]){var he=` -`+L[H].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=ae);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Dl(d):""}var Sh=Object.prototype.hasOwnProperty,Nu=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Nu[Rs],Nu[Rs]=null,Rs--)}function bn(d,f){Rs++,Nu[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},M;for(M in y)L[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ld(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,wh=Math.log,Ch=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(wh(d)/Ch|0)|0}var Ds=64,uo=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Fl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var ae=H&~L;ae!==0?_=zs(ae):(M&=H,M!==0&&(_=zs(M)))}else H=y&~L,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,M=f&-f,L>=M||L===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Gi=1<<32-gi(f)+L|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var qt=Ye(ge,kt,be[Ft],We);if(qt===null){kt===null&&(kt=Br);break}d&&kt&&qt.alternate===null&&f(ge,kt),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,qt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Lt===null?Te=ns:Lt.sibling=ns,Lt=ns,kt=Br}if(qt.done)return y(ge,kt),zn&&Bs(ge,Ft),Te;if(kt===null){for(;!qt.done;Ft++,qt=be.next())qt=Tt(ge,qt.value,We),qt!==null&&(ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return zn&&Bs(ge,Ft),Te}for(kt=_(ge,kt);!qt.done;Ft++,qt=be.next())qt=Fn(kt,ge,Ft,qt.value,We),qt!==null&&(d&&qt.alternate!==null&&kt.delete(qt.key===null?Ft:qt.key),ue=M(qt,ue,Ft),Lt===null?Te=qt:Lt.sibling=qt,Lt=qt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Te}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=be.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=L(Lt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&E1(Te)===Lt.type){y(ge,Lt.sibling),ue=L(Lt,be.props),ue.ref=ba(ge,Lt,be),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=sf(be.type,be.key,be.props,null,ge.mode,We),We.ref=ba(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Lt=be.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=L(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case T:return Lt=be._init,Ko(ge,ue,Lt(be._payload),We)}if(re(be))return Tn(ge,ue,be,We);if(N(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=L(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=cp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var Gu=l2(!0),u2=l2(!1),Vd={},po=No(Vd),xa=No(Vd),ie=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){bn(ie,f),bn(xa,d),bn(po,Vd),d=G(f),Pn(po),bn(po,d)}function Ke(){Pn(po),Pn(xa),Pn(ie)}function _t(d){var f=xe(ie.current),y=xe(po.current);f=V(y,d.type,f),y!==f&&(bn(xa,d),bn(po,f))}function Jt(d){xa.current===d&&(Pn(po),Pn(xa))}var Ot=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ou(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function P1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function ec(){return yi().memoizedState}function N1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},nc(d))rc(f,y);else if(y=ju(d,f,y,_),y!==null){var L=ai();vo(y,d,_,L),Zd(y,f,_)}}function tc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(nc(d))rc(f,L);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,ae=M(H,y);if(L.hasEagerState=!0,L.eagerState=ae,U(ae,H)){var he=f.interleaved;he===null?(L.next=L,Hd(f)):(L.next=he.next,he.next=L),f.interleaved=L;return}}catch{}finally{}y=ju(d,f,L,_),y!==null&&(L=ai(),vo(y,d,_,L),Zd(y,f,_))}}function nc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function rc(d,f){jd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Zd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,$l(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},fx={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:f2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Ul(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Ul(4194308,4,d,f)},useInsertionEffect:function(d,f){return Ul(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=N1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:d2,useDebugValue:M1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=d2(!1),f=d[0];return d=R1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,L=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Vl&30)!==0||I1(_,f,y)}L.memoizedState=y;var M={value:y,getSnapshot:f};return L.queue=M,f2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Kd(9,Qu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0ep&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),ac(L,!0),L.tail===null&&L.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-L.renderingStartTime>ep&&y!==1073741824&&(f.flags|=128,_=!0,ac(L,!1),f.lanes=4194304);L.isBackwards?(M.sibling=f.child,f.child=M):(d=L.last,d!==null?d.sibling=M:f.child=M,L.last=M)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return gc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function V1(d,f){switch(w1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),P1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Wu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,yx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function sc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Hh=!1;function Gl(d,f){for(q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),L);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:at&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ae){Un(d,d.return,ae)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Hh,Hh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var M=L.destroy;L.destroy=void 0,M!==void 0&&Uo(f,y,M)}L=L.next}while(L!==_)}}function Wh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Vh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=se(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function U1(d){var f=d.alternate;f!==null&&(d.alternate=null,U1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function lc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||lc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Uh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(Uh(d,f,y),d=d.sibling;d!==null;)Uh(d,f,y),d=d.sibling}function j1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(j1(d,f,y),d=d.sibling;d!==null;)j1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||sc(y,f);case 6:if(at){var _=br,L=jo;br=null,Go(d,f,y),br=_,jo=L,br!==null&&(jo?rt(br,y.stateNode):pt(br,y.stateNode))}else Go(d,f,y);break;case 18:at&&br!==null&&(jo?v1(br,y.stateNode):m1(br,y.stateNode));break;case 4:at?(_=br,L=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=L):(At&&(_=y.stateNode.containerInfo,L=ga(_),Mu(_,L)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var M=L,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),L=L.next}while(L!==_)}Go(d,f,y);break;case 1:if(!Pr&&(sc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(ae){Un(y,f,ae)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function jh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new yx),f.forEach(function(_){var L=A2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Yh:return":has("+(K1(d)||"")+")";case Zh:return'[role="'+d.value+'"]';case Xh:return'"'+d.value+'"';case uc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function cc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~M}if(_=L,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*bx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?rp.bind(null,d):null}function ip(d,f){var y=hc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=mc(d,f),d!==2&&(f=xi,xi=y,f!==null&&op(f)),d}function op(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,tp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var M=Qe,H=M.child;if((Qe.flags&16)!==0){var ae=M.deletions;if(ae!==null){for(var he=0;heWn()-X1?Ys(d,0):Z1|=y),Yr(d,f)}function ng(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function Sx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ng(d,y)}function A2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ng(d,y)}var rg;rg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,mx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&S1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var L=Ns(f,kr.current);Uu(f,y),L=L1(null,f,_,d,L,y);var M=Yu();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,_1(f),L.updater=Ho,f.stateNode=L,L._reactInternals=f,k1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=lp(_),d=Fo(_,d),L){case 0:f=B1(null,f,_,d,y);break e;case 1:f=S2(null,f,_,d,y);break e;case 11:f=v2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),B1(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),S2(d,f,_,L,y);case 3:e:{if(w2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,L=M.element,i2(d,f),Mh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){L=ic(Error(a(423)),f),f=C2(d,f,_,y,L);break e}else if(_!==L){L=ic(Error(a(424)),f),f=C2(d,f,_,y,L);break e}else for(wt&&(fo=u1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,ho=!1),y=u2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Wu(),_===L){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Nd(f),_=f.type,L=f.pendingProps,M=d!==null?d.memoizedProps:null,H=L.children,He(_,L)?H=null:M!==null&&He(_,M)&&(f.flags|=32),x2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return _2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Gu(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),v2(d,f,_,L,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,M=f.memoizedProps,H=L.value,r2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===L.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var ae=M.dependencies;if(ae!==null){H=M.child;for(var he=ae.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var nt=Re.pending;nt===null?he.next=he:(he.next=nt.next,nt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),$d(M.return,y,f),ae.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,ae=H.alternate,ae!==null&&(ae.lanes|=y),$d(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Uu(f,y),L=qi(L),_=_(L),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,L=Fo(_,f.pendingProps),L=Fo(_.type,L),Ws(d,f,_,L,y);case 15:return y2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Fo(_,L),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Uu(f,y),a2(f,_,L),k1(f,_,L,y),Wo(null,f,_,!0,d,y);case 19:return E2(d,f,y);case 22:return b2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Fu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new wa(d,f,y,_)}function ig(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lp(d){if(typeof d=="function")return ig(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,_,L,M){var H=2;if(_=d,typeof d=="function")ig(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,L,M,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=M,d;case P:return d=yo(13,y,f,L),d.elementType=P,d.lanes=M,d;case E:return d=yo(19,y,f,L),d.elementType=E,d.lanes=M,d;case I:return up(y,L,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function up(d,f,y,_){return d=yo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function cp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=et,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=L,wt&&(this.mutableSourceEagerHydrationData=null)}function I2(d,f,y,_,L,M,H,ae,he){return d=new lf(d,f,y,ae,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=yo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},_1(M),d}function og(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Bl(d,y,f)}return f}function ag(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Tt&&L<=nt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Tt||y.height!==he.height||nt<_||Re>L)){Re>_&&(he.width+=Re-_,he.x=_),ntM&&(he.height+=Tt-M,he.y=M),Yey&&(y=H)),H ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return se(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:dp,findFiberByHostInstance:d.findFiberByHostInstance||sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=Y1(d,f);var L=Gt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,M=ai(),H=Ar(L);return y=og(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(L,f,H),d!==null&&(vo(d,L,H,M),Ih(d,L,H)),H},n};(function(e){e.exports=zCe})(hW);const BCe=A8(hW.exports);var tk={exports:{}},vh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */vh.ConcurrentRoot=1;vh.ContinuousEventPriority=4;vh.DefaultEventPriority=16;vh.DiscreteEventPriority=1;vh.IdleEventPriority=536870912;vh.LegacyRoot=0;(function(e){e.exports=vh})(tk);const II={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let MI=!1,OI=!1;const nk=".react-konva-event",FCe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,$Ce=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,HCe={};function sx(e,t,n=HCe){if(!MI&&"zIndex"in t&&(console.warn($Ce),MI=!0),!OI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(FCe),OI=!0)}for(var o in n)if(!II[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!II[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),kd(e));for(var l in v)e.on(l+nk,v[l])}function kd(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const pW={},WCe={};Jf.Node.prototype._applyProps=sx;function VCe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function UCe(e,t,n){let r=Jf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Jf.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return sx(l,o),l}function jCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function GCe(e,t,n){return!1}function qCe(e){return e}function KCe(){return null}function YCe(){return null}function ZCe(e,t,n,r){return WCe}function XCe(){}function QCe(e){}function JCe(e,t){return!1}function e8e(){return pW}function t8e(){return pW}const n8e=setTimeout,r8e=clearTimeout,i8e=-1;function o8e(e,t){return!1}const a8e=!1,s8e=!0,l8e=!0;function u8e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function c8e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function gW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function d8e(e,t,n){gW(e,t,n)}function f8e(e,t){t.destroy(),t.off(nk),kd(e)}function h8e(e,t){t.destroy(),t.off(nk),kd(e)}function p8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function g8e(e,t,n){}function m8e(e,t,n,r,i){sx(e,i,r)}function v8e(e){e.hide(),kd(e)}function y8e(e){}function b8e(e,t){(t.visible==null||t.visible)&&e.show()}function x8e(e,t){}function S8e(e){}function w8e(){}const C8e=()=>tk.exports.DefaultEventPriority,_8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:VCe,createInstance:UCe,createTextInstance:jCe,finalizeInitialChildren:GCe,getPublicInstance:qCe,prepareForCommit:KCe,preparePortalMount:YCe,prepareUpdate:ZCe,resetAfterCommit:XCe,resetTextContent:QCe,shouldDeprioritizeSubtree:JCe,getRootHostContext:e8e,getChildHostContext:t8e,scheduleTimeout:n8e,cancelTimeout:r8e,noTimeout:i8e,shouldSetTextContent:o8e,isPrimaryRenderer:a8e,warnsIfNotActing:s8e,supportsMutation:l8e,appendChild:u8e,appendChildToContainer:c8e,insertBefore:gW,insertInContainerBefore:d8e,removeChild:f8e,removeChildFromContainer:h8e,commitTextUpdate:p8e,commitMount:g8e,commitUpdate:m8e,hideInstance:v8e,hideTextInstance:y8e,unhideInstance:b8e,unhideTextInstance:x8e,clearContainer:S8e,detachDeletedInstance:w8e,getCurrentEventPriority:C8e,now:Gp.exports.unstable_now,idlePriority:Gp.exports.unstable_IdlePriority,run:Gp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var k8e=Object.defineProperty,E8e=Object.defineProperties,P8e=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,T8e=Object.prototype.hasOwnProperty,L8e=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?k8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))T8e.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))L8e.call(t,n)&&NI(e,n,t[n]);return e},A8e=(e,t)=>E8e(e,P8e(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function mW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=mW(C.exports.createContext(null));class vW extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:I8e,ReactCurrentDispatcher:M8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O8e(){const e=C.exports.useContext(ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=I8e.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Rg=[],zI=new WeakMap;function R8e(){var e;const t=O8e();Rg.splice(0,Rg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Rg.push(mW(i))});for(const n of Rg){const r=(e=M8e.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Rg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,A8e(DI({},i),{value:zI.get(r)}))),n=>x(vW,{...DI({},n)})),[])}function N8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const D8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=N8e(e),o=R8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new Jf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Jg.createContainer(n.current,tk.exports.LegacyRoot,!1,null),Jg.updateContainer(x(o,{children:e.children}),r.current),()=>{!Jf.isBrowser||(a(null),Jg.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sx(n.current,e,i),Jg.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Yy="Layer",Xv="Group",R3="Rect",Ng="Circle",n5="Line",r5="Image",z8e="Transformer",Jg=BCe(_8e);Jg.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const B8e=le.forwardRef((e,t)=>x(vW,{children:x(D8e,{...e,forwardedRef:t})})),F8e=Xe(Yt,e=>{const{objects:t}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$8e=e=>{const{...t}=e,{objects:n}=Ce(F8e);return x(Xv,{listening:!1,...t,children:n.filter(Ub).map((r,i)=>x(n5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},H8e=Xe(Yt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?a:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(H8e);return l?ee(Xv,{listening:!1,...t,children:[x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Ng,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},V8e=Xe(Yt,Gv,qv,rn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,shouldLockBoundingBox:l,isDrawing:u,isTransformingBoundingBox:h,isMovingBoundingBox:g,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,tool:b,stageCoordinates:w}=e,{shouldSnapToGrid:P}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:u,isMouseOverBoundingBox:m,shouldDarkenOutsideBoundingBox:v,isMovingBoundingBox:g,isTransformingBoundingBox:h,shouldLockBoundingBox:l,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:P,tool:b,stageCoordinates:w,boundingBoxStrokeWidth:(m?8:1)/s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U8e=e=>{const{...t}=e,n=Fe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,shouldLockBoundingBox:h,stageCoordinates:g,stageDimensions:m,stageScale:v,baseCanvasImage:b,activeTabName:w,shouldSnapToGrid:P,tool:E,boundingBoxStrokeWidth:k}=Ce(V8e),T=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!T.current||!I.current||(T.current.nodes([I.current]),T.current.getLayer()?.batchDraw())},[h]);const O=64*v,N=C.exports.useCallback(G=>{if(w==="inpainting"||!P){n(f6({x:G.target.x(),y:G.target.y()}));return}const V=G.target.x(),q=G.target.y(),Q=Ty(V,64),X=Ty(q,64);G.target.x(Q),G.target.y(X),n(f6({x:Q,y:X}))},[w,n,P]),D=C.exports.useCallback(G=>{if(!b)return r;const{x:V,y:q}=G,Q=m.width-i.width*v,X=m.height-i.height*v,me=Math.floor(Ge.clamp(V,0,Q)),ye=Math.floor(Ge.clamp(q,0,X));return{x:me,y:ye}},[b,r,m.width,m.height,i.width,i.height,v]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,V=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*V),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(qg({width:Q,height:X})),n(f6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,V,q)=>{const Q=G.x%O,X=G.y%O,me=Ty(V.x,O)+Q,ye=Ty(V.y,O)+X,Se=Math.abs(V.x-me),He=Math.abs(V.y-ye),Ue=Se!b||V.width+V.x>m.width||V.height+V.y>m.height||V.x<0||V.y<0?G:V,[b,m]),Y=()=>{n(h6(!0))},de=()=>{n(h6(!1)),n(Ly(!1))},j=()=>{n(IA(!0))},te=()=>{n(h6(!1)),n(IA(!1)),n(Ly(!1))},re=()=>{n(Ly(!0))},se=()=>{!u&&!l&&n(Ly(!1))};return ee(Xv,{...t,children:[x(R3,{offsetX:g.x/v,offsetY:g.y/v,height:m.height/v,width:m.width/v,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R3,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R3,{dragBoundFunc:w==="inpainting"?D:void 0,draggable:!0,fillEnabled:E==="move",height:i.height,listening:!o&&E==="move",onDragEnd:te,onDragMove:N,onMouseDown:j,onMouseOut:se,onMouseOver:re,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:k,width:i.width,x:r.x,y:r.y}),x(z8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:W,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:T,rotateEnabled:!1})]})},j8e=Xe([e=>e.options,Yt,rn],(e,t,n)=>{const{isMaskEnabled:r,cursorPosition:i,shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}=t;return{activeTabName:n,isMaskEnabled:r,isCursorOnCanvas:Boolean(i),shouldLockBoundingBox:o,shouldShowBoundingBox:a,tool:s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G8e=()=>{const e=Fe(),{isMaskEnabled:t,activeTabName:n,shouldShowBoundingBox:r,tool:i}=Ce(j8e),o=C.exports.useRef(null);vt("shift+w",a=>{a.preventDefault(),e(a5e())},{enabled:!0},[n]),vt("shift+h",a=>{a.preventDefault(),e(O_(!r))},{enabled:!0},[n,r]),vt(["space"],a=>{a.repeat||i!=="move"&&(o.current=i,e(Su("move")))},{keyup:!1,keydown:!0},[i,o]),vt(["space"],a=>{a.repeat||i==="move"&&o.current&&o.current!=="move"&&(e(Su(o.current)),o.current="move")},{keyup:!0,keydown:!1},[i,o])},q8e=Xe(Yt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),K8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(q8e);return x(R3,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:n,globalCompositeOperation:"source-in",listening:!1,...t})},Y8e=.999,Z8e=.1,X8e=20,Q8e=Xe([rn,Yt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),J8e=e=>{const t=Fe(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(Q8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ge.clamp(r*Y8e**l,Z8e,X8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(T$(u)),t(I$(h))},[i,t,n,e,r])},lx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},e9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),t9e=e=>{const t=Fe(),{tool:n}=Ce(e9e);return C.exports.useCallback(r=>{if(!e.current)return;if(n==="move"){t(K4(!0));return}const i=lx(e.current);!i||(r.evt.preventDefault(),t(jb(!0)),t(S$([i.x,i.y])))},[e,t,n])},n9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),r9e=(e,t)=>{const n=Fe(),{tool:r,isDrawing:i}=Ce(n9e);return C.exports.useCallback(()=>{if(r==="move"){n(K4(!1));return}if(!t.current&&i&&e.current){const o=lx(e.current);if(!o)return;n(w$([o.x,o.y]))}else t.current=!1;n(jb(!1))},[t,n,i,e,r])},i9e=Xe([rn,Yt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),o9e=(e,t,n)=>{const r=Fe(),{isDrawing:i,tool:o}=Ce(i9e);return C.exports.useCallback(()=>{if(!e.current)return;const a=lx(e.current);!a||(r(E$(a)),n.current=a,!(!i||o==="move")&&(t.current=!0,r(w$([a.x,a.y]))))},[t,r,i,n,e,o])},a9e=Xe([rn,Yt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),s9e=e=>{const t=Fe(),{tool:n}=Ce(a9e);return C.exports.useCallback(r=>{if(r.evt.buttons!==1||!e.current)return;const i=lx(e.current);!i||n==="move"||(t(jb(!0)),t(S$([i.x,i.y])))},[e,n,t])},l9e=()=>{const e=Fe();return C.exports.useCallback(()=>{e(E$(null)),e(jb(!1))},[e])},u9e=Xe([Yt,rn],(e,t)=>{const{tool:n}=e;return{tool:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),c9e=()=>{const e=Fe(),{tool:t,activeTabName:n}=Ce(u9e);return{handleDragStart:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!0))},[n,e,t]),handleDragMove:C.exports.useCallback(r=>{t!=="move"||n!=="outpainting"||e(I$(r.target.getPosition()))},[n,e,t]),handleDragEnd:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K4(!1))},[n,e,t])}};var mf=C.exports,d9e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const f9e=e=>{const{url:t,x:n,y:r}=e,[i]=d9e(t);return x(r5,{x:n,y:r,image:i,listening:!1})},h9e=Xe([e=>e.canvas],e=>({objects:e.currentCanvas==="outpainting"?e.outpainting.objects:void 0}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),p9e=()=>{const{objects:e}=Ce(h9e);return e?x(Xv,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(K4e(t))return x(f9e,{x:t.x,y:t.y,url:t.image.url},n);if(q4e(t))return x(n5,{points:t.points,stroke:t.color?ok(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},g9e=Xe([Yt],e=>e.stageScale,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),m9e=()=>{const e=Ce(g9e);return t=>t/e},v9e=()=>{const{colorMode:e}=Ev(),t=m9e();if(!au.current)return null;const n=e==="light"?"rgba(0,0,0,0.3)":"rgba(255,255,255,0.3)",r=au.current,i=r.width(),o=r.height(),a=r.x(),s=r.y(),l={x1:0,y1:0,x2:i,y2:o,offset:{x:t(a),y:t(s)}},u={x:Math.ceil(t(a)/64)*64,y:Math.ceil(t(s)/64)*64},h={x1:-u.x,y1:-u.y,x2:t(i)-u.x+64,y2:t(o)-u.y+64},m={x1:Math.min(l.x1,h.x1),y1:Math.min(l.y1,h.y1),x2:Math.max(l.x2,h.x2),y2:Math.max(l.y2,h.y2)},v=m.x2-m.x1,b=m.y2-m.y1,w=Math.round(v/64)+1,P=Math.round(b/64)+1;return ee(Xv,{children:[Ge.range(0,w).map(E=>x(n5,{x:m.x1+E*64,y:m.y1,points:[0,0,0,b],stroke:n,strokeWidth:1},`x_${E}`)),Ge.range(0,P).map(E=>x(n5,{x:m.x1,y:m.y1+E*64,points:[0,0,v,0],stroke:n,strokeWidth:1},`y_${E}`))]})},y9e=Xe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),b9e=e=>{const{...t}=e,n=Ce(y9e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(r5,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Dg=e=>Math.round(e*100)/100,x9e=Xe([Yt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),S9e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(x9e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Dg(n)}, ${Dg(r)}`}),x("div",{children:`Scale: ${Dg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Dg(a)}, ${Dg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})},w9e=Xe([Yt,Gv,qv,rn],(e,t,n,r)=>{const{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,isTransformingBoundingBox:h,isMouseOverBoundingBox:g,isMovingBoundingBox:m,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,tool:P,isMovingStage:E}=e,{shouldShowGrid:k}=t;let T="";return P==="move"?h?T=void 0:g?T="move":E?T="grabbing":T="grab":T="none",{shouldInvertMask:i,isMaskEnabled:o,shouldShowCheckboardTransparency:a,stageScale:s,shouldShowBoundingBox:l,shouldLockBoundingBox:u,shouldShowGrid:k,isTransformingBoundingBox:h,isModifyingBoundingBox:h||m,stageCursor:T,isMouseOverBoundingBox:g,stageDimensions:v,stageCoordinates:b,isMoveStageKeyHeld:w,activeTabName:r,baseCanvasImage:n,tool:P}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});let au,fl,h8;const yW=()=>{const e=Fe(),{shouldInvertMask:t,isMaskEnabled:n,shouldShowCheckboardTransparency:r,stageScale:i,shouldShowBoundingBox:o,isModifyingBoundingBox:a,stageCursor:s,stageDimensions:l,stageCoordinates:u,shouldShowGrid:h,activeTabName:g,baseCanvasImage:m,tool:v}=Ce(w9e);G8e();const b=xd();au=C.exports.useRef(null),fl=C.exports.useRef(null),h8=C.exports.useRef(null);const w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),[E,k]=C.exports.useState(null),T=J8e(au),I=t9e(au),O=r9e(au,P),N=o9e(au,P,w),D=s9e(au),z=l9e(),{handleDragStart:$,handleDragMove:W,handleDragEnd:Y}=c9e();return C.exports.useEffect(()=>{if(m){const de=new Image;de.onload=()=>{h8.current=de,k(de)},de.onerror=()=>{b({title:"Unable to Load Image",description:`Image ${m.url} failed to load`,status:"error",isClosable:!0}),e(t5e())},de.src=m.url}else k(null)},[m,e,i,b]),x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(B8e,{ref:au,style:{...s?{cursor:s}:{}},className:"inpainting-canvas-stage checkerboard",x:u.x,y:u.y,width:l.width,height:l.height,scale:{x:i,y:i},onMouseDown:I,onMouseEnter:D,onMouseLeave:z,onMouseMove:N,onMouseOut:z,onMouseUp:O,onDragStart:$,onDragMove:W,onDragEnd:Y,onWheel:T,listening:v==="move"&&!a&&g==="outpainting",draggable:v==="move"&&!a&&g==="outpainting",children:[x(Yy,{visible:h,children:x(v9e,{})}),ee(Yy,{id:"image-layer",ref:fl,listening:!1,imageSmoothingEnabled:!1,children:[x(p9e,{}),x(b9e,{})]}),ee(Yy,{id:"mask-layer",visible:n,listening:!1,children:[x($8e,{visible:!0,listening:!1}),x(K8e,{listening:!1}),E&&ee(Kn,{children:[x(r5,{image:E,listening:!1,globalCompositeOperation:"source-in",visible:t}),x(r5,{image:E,listening:!1,globalCompositeOperation:"source-out",visible:!t&&r})]})]}),ee(Yy,{id:"preview-layer",children:[x(U8e,{visible:o}),x(W8e,{visible:v!=="move",listening:!1})]})]}),x(S9e,{})]})})},C9e=Xe([Gv,e=>e.options,rn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),_9e=()=>{const e=Fe(),{activeTabName:t,boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:i}=Ce(C9e);return ee("div",{className:"inpainting-settings",children:[ee(Eo,{isAttached:!0,children:[x(c6e,{}),x(f6e,{}),t==="outpainting"&&x(E6e,{})]}),ee(Eo,{isAttached:!0,children:[x(y6e,{}),x(x6e,{}),x(w6e,{}),x(_6e,{}),x(m6e,{})]}),x(gt,{"aria-label":"Save",tooltip:"Save",icon:x(v$,{}),onClick:()=>{e(R_(fl))},fontSize:20}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(Z$,{})})]})},k9e=Xe(e=>e.canvas,qv,rn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),bW=()=>{const e=Fe(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(k9e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const o=i.current.clientWidth,a=i.current.clientHeight,s=Math.min(1,Math.min(o/r.width,a/r.height));e(T$(s)),n==="inpainting"?e(LA({width:Math.floor(r.width*s),height:Math.floor(r.height*s)})):n==="outpainting"&&e(LA({width:Math.floor(o),height:Math.floor(a)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(zv,{thickness:"2px",speed:"1s",size:"xl"})})},E9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,inpainting:{imageToInpaint:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,imageToInpaint:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),P9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,imageToInpaint:r}=Ce(E9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(_9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function T9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("inpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(KSe,{}),styleClass:"inpainting-workarea-overrides",children:x(P9e,{})})}function L9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})},other:{header:x(i$,{}),feature:Xr.OTHER,options:x(o$,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(Hb,{}),e?x(Vb,{accordionInfo:t}):null]})}const A9e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function I9e(){return x(tx,{optionsPanel:x(L9e,{}),children:x(A9e,{})})}var xW={exports:{}},i5={};const SW=Wq(fZ);var ui=SW.jsx,Zy=SW.jsxs;Object.defineProperty(i5,"__esModule",{value:!0});var Ec=C.exports;function wW(e,t){return(wW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var A6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,wW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);A6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},i5.PanViewer=A6,i5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],P=Ec.useState(!1),E=P[0],k=P[1];return Ec.createElement("div",null,Zy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!E)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(A6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(T,I){a(T),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(E?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=i5})(xW);function M9e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},P=()=>{l>=.5&&u(l-.2)},E=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},T=()=>{v(!m)},I=(O,N)=>{o(O),s(N)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(k3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(gt,{icon:x(E3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:P,fontSize:20}),x(gt,{icon:x(C3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:E,fontSize:20}),x(gt,{icon:x(_3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(gt,{icon:x(l4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:T,fontSize:20}),x(gt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(xW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function O9e(){const e=Fe(),t=Ce(m=>m.options.isLightBoxOpen),{imageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(kl(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(w3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(kl(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(U$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(f$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&x(M9e,{image:n.url,styleClass:"lightbox-image"})]}),x(TH,{})]})]})}function R9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Db,{}),feature:Xr.SEED,options:x(zb,{})},variations:{header:x(Fb,{}),feature:Xr.VARIATIONS,options:x($b,{})},face_restore:{header:x(Nb,{}),feature:Xr.FACE_CORRECTION,options:x(Uv,{})},upscale:{header:x(Bb,{}),feature:Xr.UPSCALE,options:x(jv,{})}};return ee(Kb,{children:[x(qb,{}),x(Gb,{}),x(Wb,{}),x(T_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(LH,{}),x(Hb,{}),e&&x(Vb,{accordionInfo:t})]})}const N9e=Xe([Yt,Gv],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),D9e=()=>{const e=Fe(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(N9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(M_,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(f5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(u5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(c5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(L$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(d5e(a.target.checked))})]})})},z9e=Xe([Yt],e=>{const{eraserSize:t,tool:n}=e;return{tool:n,eraserSize:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),B9e=()=>{const e=Fe(),{tool:t,eraserSize:n}=Ce(z9e),r=()=>e(Su("eraser"));return vt("e",i=>{i.preventDefault(),r()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(g$,{}),"data-selected":t==="eraser",onClick:()=>e(Su("eraser"))}),children:x(an,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(ch,{label:"Size",value:n,withInput:!0,onChange:i=>e(J4e(i))})})})},F9e=Xe([Yt,Gv,rn],(e,t,n)=>{const{layer:r,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,tool:l,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}=e,{shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v}=t;return{layer:r,tool:l,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,activeTabName:n,shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$9e=()=>{const e=Fe(),{tool:t,brushColor:n,brushSize:r}=Ce(F9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(m$,{}),"data-selected":t==="brush",onClick:()=>e(Su("brush"))}),children:ee(an,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(an,{gap:"1rem",justifyContent:"space-between",children:x(ch,{label:"Size",value:r,withInput:!0,onChange:i=>e(x$(i))})}),x(Y_,{style:{width:"100%"},color:n,onChange:i=>e(Q4e(i))})]})})},H9e=Xe([Yt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r}=e;return{layer:n,maskColor:t,isMaskEnabled:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),W9e=()=>{const e=Fe(),{layer:t,maskColor:n,isMaskEnabled:r}=Ce(H9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(X4e(t==="mask"?"base":"mask")),icon:x(T4e,{})}),children:ee(an,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(k$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:i=>e(C$(i.target.checked))}),x(Aa,{label:"Invert Mask"}),x(Y_,{color:n,onChange:i=>e(_$(i))})]})})},V9e=Xe([Yt],e=>{const{tool:t}=e;return{tool:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),U9e=()=>{const e=Fe(),{tool:t}=Ce(V9e);return ee("div",{className:"inpainting-settings",children:[x(W9e,{}),ee(Eo,{isAttached:!0,children:[x($9e,{}),x(B9e,{}),x(gt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(y4e,{}),"data-selected":t==="move",onClick:()=>e(Su("move"))})]}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(E4e,{}),onClick:()=>{e(R_(fl))}}),x(gt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(v$,{})}),x(gt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(gt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(p$,{})})]}),ee(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(D9e,{})}),ee(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(I_,{})}),x(gt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(y$,{}),onClick:()=>e(l5e())})]})]})},j9e=Xe([e=>e.canvas,e=>e.options],(e,t)=>{const{doesCanvasNeedScaling:n,outpainting:{objects:r}}=e,{showDualDisplay:i}=t;return{doesCanvasNeedScaling:n,showDualDisplay:i,doesOutpaintingHaveObjects:r.length>0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),G9e=()=>{const e=Fe(),{showDualDisplay:t,doesCanvasNeedScaling:n,doesOutpaintingHaveObjects:r}=Ce(j9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(U9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(bW,{}):x(yW,{})})]}):x(z_,{})})})};function q9e(){const e=Fe();return C.exports.useEffect(()=>{e(M$("outpainting")),e(Cr(!0))},[e]),x(tx,{optionsPanel:x(R9e,{}),styleClass:"inpainting-workarea-overrides",children:x(G9e,{})})}const Ef={txt2img:{title:x(u3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(I9e,{}),tooltip:"Text To Image"},img2img:{title:x(i3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(NSe,{}),tooltip:"Image To Image"},inpainting:{title:x(o3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T9e,{}),tooltip:"Inpainting"},outpainting:{title:x(s3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(q9e,{}),tooltip:"Outpainting"},nodes:{title:x(a3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n3e,{}),tooltip:"Nodes"},postprocess:{title:x(l3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r3e,{}),tooltip:"Post Processing"}},ux=Ge.map(Ef,(e,t)=>t);[...ux];function K9e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=Fe();vt("1",()=>{i(Co(0))}),vt("2",()=>{i(Co(1))}),vt("3",()=>{i(Co(2))}),vt("4",()=>{i(Co(3))}),vt("5",()=>{i(Co(4))}),vt("6",()=>{i(Co(5))}),vt("v",()=>{i(kl(!t))},[t]),vt("f",()=>{n||r?(i(b0(!1)),i(m0(!1))):(i(b0(!0)),i(m0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Ef[l].tooltip,placement:"right",children:x(lF,{children:Ef[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Ef).forEach(l=>{s.push(x(aF,{className:"app-tabs-panel",children:Ef[l].workarea},l))}),s};return ee(oF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(Co(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(sF,{className:"app-tabs-panels",children:t?x(O9e,{}):a()})]})}const CW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},Y9e=CW,_W=vb({name:"options",initialState:Y9e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=A3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=G4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=A3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:P,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=G4(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=A3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...CW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=ux.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:cx,setIterations:Z9e,setSteps:kW,setCfgScale:EW,setThreshold:X9e,setPerlin:Q9e,setHeight:PW,setWidth:TW,setSampler:LW,setSeed:Qv,setSeamless:AW,setHiresFix:IW,setImg2imgStrength:p8,setFacetoolStrength:N3,setFacetoolType:D3,setCodeformerFidelity:MW,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:oEe,resetOptionsState:aEe,setShouldFitToWidthHeight:OW,setParameter:sEe,setShouldGenerateVariations:J9e,setSeedWeights:RW,setVariationAmount:e7e,setAllParameters:t7e,setShouldRunFacetool:n7e,setShouldRunESRGAN:r7e,setShouldRandomizeSeed:i7e,setShowAdvancedOptions:o7e,setActiveTab:Co,setShouldShowImageDetails:NW,setAllTextToImageParameters:a7e,setAllImageToImageParameters:s7e,setShowDualDisplay:l7e,setInitialImage:bv,clearInitialImage:DW,setShouldShowOptionsPanel:b0,setShouldPinOptionsPanel:u7e,setOptionsPanelScrollPosition:c7e,setShouldHoldOptionsPanelOpen:d7e,setShouldLoopback:f7e,setCurrentTheme:h7e,setIsLightBoxOpen:kl}=_W.actions,p7e=_W.reducer,Al=Object.create(null);Al.open="0";Al.close="1";Al.ping="2";Al.pong="3";Al.message="4";Al.upgrade="5";Al.noop="6";const z3=Object.create(null);Object.keys(Al).forEach(e=>{z3[Al[e]]=e});const g7e={type:"error",data:"parser error"},m7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v7e=typeof ArrayBuffer=="function",y7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,zW=({type:e,data:t},n,r)=>m7e&&t instanceof Blob?n?r(t):BI(t,r):v7e&&(t instanceof ArrayBuffer||y7e(t))?n?r(t):BI(new Blob([t]),r):r(Al[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",em=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},x7e=typeof ArrayBuffer=="function",BW=(e,t)=>{if(typeof e!="string")return{type:"message",data:FW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:S7e(e.substring(1),t)}:z3[n]?e.length>1?{type:z3[n],data:e.substring(1)}:{type:z3[n]}:g7e},S7e=(e,t)=>{if(x7e){const n=b7e(e);return FW(n,t)}else return{base64:!0,data:e}},FW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},$W=String.fromCharCode(30),w7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{zW(o,!1,s=>{r[a]=s,++i===n&&t(r.join($W))})})},C7e=(e,t)=>{const n=e.split($W),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function WW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const k7e=setTimeout,E7e=clearTimeout;function dx(e,t){t.useNativeTimers?(e.setTimeoutFn=k7e.bind(Uc),e.clearTimeoutFn=E7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const P7e=1.33;function T7e(e){return typeof e=="string"?L7e(e):Math.ceil((e.byteLength||e.size)*P7e)}function L7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class A7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class VW extends Vr{constructor(t){super(),this.writable=!1,dx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new A7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=BW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const UW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,I7e={};let $I=0,Xy=0,HI;function WI(e){let t="";do t=UW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function jW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Xy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};C7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,w7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=jW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new El(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class El extends Vr{constructor(t,n){super(),dx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=WW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new KW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=El.requestsCount++,El.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=R7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete El.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}El.requestsCount=0;El.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in El.requests)El.requests.hasOwnProperty(e)&&El.requests[e].abort()}const YW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qy=Uc.WebSocket||Uc.MozWebSocket,UI=!0,z7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B7e extends VW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:WW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new Qy(t,n):new Qy(t):new Qy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||z7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&YW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=jW()),this.supportsBinary||(t.b64=1);const i=GW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Qy}}const F7e={websocket:B7e,polling:D7e},$7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=$7e.exec(e||""),o={},a=14;for(;a--;)o[H7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=W7e(o,o.path),o.queryKey=V7e(o,o.query),o}function W7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function V7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),dx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=M7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=HW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new F7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ZW=Object.prototype.toString,q7e=typeof Blob=="function"||typeof Blob<"u"&&ZW.call(Blob)==="[object BlobConstructor]",K7e=typeof File=="function"||typeof File<"u"&&ZW.call(File)==="[object FileConstructor]";function ak(e){return j7e&&(e instanceof ArrayBuffer||G7e(e))||q7e&&e instanceof Blob||K7e&&e instanceof File}function B3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class J7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Z7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const e_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:X7e,get PacketType(){return nn},Encoder:Q7e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const t_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class XW extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(t_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}r1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};r1.prototype.reset=function(){this.attempts=0};r1.prototype.setMin=function(e){this.ms=e};r1.prototype.setMax=function(e){this.max=e};r1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,dx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new r1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||e_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){YW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new XW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zg={};function F3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=U7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=zg[i]&&o in zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(zg[i]||(zg[i]=new w8(r,t)),l=zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F3,{Manager:w8,Socket:XW,io:F3,connect:F3});var n_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,r_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,i_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return o_e(e)},P=function(){return a_e(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":s_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(n_e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},o_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},a_e=function(t){var n=t.getDay();return n===0&&(n=7),n},s_e=function(t){return(String(t).match(r_e)||[""]).pop().replace(i_e,"").replace(/GMT\+0000/g,"UTC")};const l_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(u6("Connected")),t(y5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(WC("user")),r.categories.result.latest_mtime?t(MA("result")):t(WC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(u6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Tp(),...r,category:"result"};if(t(Ay({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(s5e({image:a,boundingBox:s}))}if(i)switch(ux[o]){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(N5e({uuid:Tp(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Ay({category:"result",image:{uuid:Tp(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(g0(!0)),t(X3e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t($C()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Tp(),...l}));t(R5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(e4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Ay({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(G$(r));const{initialImage:o,maskPath:a}=n().options;n().canvas,(o?.url===i||o===i)&&t(DW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Tp(),...o};try{switch(t(Ay({image:a,category:"user"})),i){case"img2img":{t(bv(a));break}case"inpainting":{t(q4(a));break}default:{t(q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(Q3e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(u6("Model Changed")),t(g0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(g0(!1)),t(EA(!0)),t($C()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},u_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Og.Stage({container:i,width:n,height:r}),a=new Og.Layer,s=new Og.Layer;a.add(new Og.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Og.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},c_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},d_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:P,hiresFix:E,img2imgStrength:k,initialImage:T,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:N,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:W,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:re}=n,{shouldDisplayInProgressType:se,saveIntermediatesInterval:G,enableImageDebugging:V}=i,q={prompt:a,iterations:re||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:se==="full-res",progress_latents:se==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=re?a$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=P,q.hires_fix=E),t==="img2img"&&T&&(q.init_img=typeof T=="string"?T:T.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&fl.current){const{objects:me,boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:Ue,stageScale:ct,isMaskEnabled:qe}=r[r.currentCanvas],et={...ye,...Se},tt=u_e(qe?me.filter(Ub):[],et);if(q.init_mask=tt,q.fit=!1,q.init_img=o,q.strength=k,Ue&&(q.inpaint_replace=He),q.bounding_box=et,t==="outpainting"){const at=fl.current.scale();fl.current.scale({x:1/ct,y:1/ct});const At=fl.current.getAbsolutePosition(),wt=fl.current.toDataURL({x:et.x+At.x,y:et.y+At.y,width:et.width,height:et.height});V&&c_e([{base64:tt,caption:"mask sent as init_mask"},{base64:wt,caption:"image sent as init_img"}]),fl.current.scale(at),q.init_img=wt,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=N,D&&(q.with_variations=S2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:W}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),V&&(q.enable_image_debugging=V),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},f_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(g0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=qv(r())?.url;if(!h8.current||!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n($C());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=d_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(g0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(g0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(G$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(t4e()),t.emit("requestModelChange",i)}}},h_e=()=>{const{origin:e}=new URL(window.location.href),t=F3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:P,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:T,onModelChanged:I,onModelChangeFailed:O}=l_e(i),{emitGenerateImage:N,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:W,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:re,emitRequestModelChange:se}=f_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{P(G)}),t.on("imageUploaded",G=>{E(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{T(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{N(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{W(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{re();break}case"socketio/requestModelChange":{se(a.payload);break}}o(a)}},QW=["pastObjects","futureObjects","stageScale","stageDimensions","stageCoordinates","cursorPosition"],p_e=QW.map(e=>`canvas.inpainting.${e}`),g_e=QW.map(e=>`canvas.outpainting.${e}`),m_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),v_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),JW=yF({options:p7e,gallery:H5e,system:i4e,canvas:h5e}),y_e=BF.getPersistConfig({key:"root",storage:zF,rootReducer:JW,blacklist:[...p_e,...g_e,...m_e,...v_e],throttle:500}),b_e=i2e(y_e,JW),eV=Xme({reducer:b_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(h_e())}),Fe=Vve,Ce=Mve;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function x_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(an,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(zv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),k_e=Xe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),E_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(k_e),i=t?Math.round(t*100/n):0;return x(HB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function P_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function T_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=O4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(P_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(N0,{isOpen:t,onClose:r,children:[x(pv,{}),ee(hv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(rb,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const L_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=Fe(),{name:i,status:o,description:a}=e,s=()=>{r(b5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},A_e=Xe(e=>e.system,e=>{const t=Ge.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),I_e=()=>{const{models:e}=Ce(A_e);return x(rb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(L_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},M_e=Xe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ge.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),O_e=({children:e})=>{const t=Fe(),n=Ce(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=O4(),{isOpen:a,onOpen:s,onClose:l}=O4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(M_e),b=()=>{hV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(n4e(P))};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(N0,{isOpen:r,onClose:o,children:[x(pv,{}),ee(hv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(z4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(I_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(uh,{label:"Display In-Progress Images",validValues:m3e,value:u,onChange:P=>t(Y3e(P.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(l$(P.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:P=>t(J3e(P.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(r4e(P.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Hf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(ko,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(ko,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(N0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(hv,{children:x(z4,{pb:6,pt:6,children:x(an,{justifyContent:"center",children:x(ko,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},R_e=Xe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),N_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(R_e),s=Fe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(ko,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(u$())},className:`status ${l}`,children:u})})},D_e=["dark","light","green"];function z_e(){const{setColorMode:e}=Ev(),t=Fe(),n=Ce(i=>i.options.currentTheme);return x(uh,{validValues:D_e,value:n,onChange:i=>{e(i.target.value),t(h7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const B_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(N_e,{}),x(T_e,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(k4e,{})})}),x(z_e,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(x4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(m4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Wf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(g4e,{})})}),x(O_e,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(M_,{})})})]})]}),F_e=Xe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),$_e=Xe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),H_e=()=>{const e=Fe(),t=Ce(F_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce($_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(u$()),e(l6(!n))};return vt("`",()=>{e(l6(!n))},[n]),vt("esc",()=>{e(l6(!1))}),ee(Kn,{children:[n&&x(X$,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(v4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(L4e,{}):x(h$,{}),onClick:l})})]})};function W_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var V_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jv(e,t){var n=U_e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function U_e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=V_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var j_e=[".DS_Store","Thumbs.db"];function G_e(e){return G0(this,void 0,void 0,function(){return q0(this,function(t){return o5(e)&&q_e(e.dataTransfer)?[2,X_e(e.dataTransfer,e.type)]:K_e(e)?[2,Y_e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Z_e(e)]:[2,[]]})})}function q_e(e){return o5(e)}function K_e(e){return o5(e)&&o5(e.target)}function o5(e){return typeof e=="object"&&e!==null}function Y_e(e){return k8(e.target.files).map(function(t){return Jv(t)})}function Z_e(e){return G0(this,void 0,void 0,function(){var t;return q0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Jv(r)})]}})})}function X_e(e,t){return G0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Q_e))]):[3,2];case 1:return r=i.sent(),[2,YI(nV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return Jv(o)}))]}})})}function YI(e){return e.filter(function(t){return j_e.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Pf(e){return e!=null}function pke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=aV(l,n),h=xv(u,1),g=h[0],m=sV(l,r,i),v=xv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function a5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jy(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function gke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function mke(e){return e.indexOf("Edge/")!==-1}function vke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return gke(e)||mke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Rke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lk=C.exports.forwardRef(function(e,t){var n=e.children,r=s5(e,Cke),i=fV(r),o=i.open,a=s5(i,_ke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});lk.displayName="Dropzone";var dV={disabled:!1,getFilesFromEvent:G_e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lk.defaultProps=dV;lk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var L8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},dV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,N=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return xke(n)},[n]),Y=C.exports.useMemo(function(){return bke(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:iM},[P]),j=C.exports.useMemo(function(){return typeof w=="function"?w:iM},[w]),te=C.exports.useRef(null),re=C.exports.useRef(null),se=C.exports.useReducer(Nke,L8),G=I6(se,2),V=G[0],q=G[1],Q=V.isFocused,X=V.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&yke()),ye=function(){!me.current&&X&&setTimeout(function(){if(re.current){var Je=re.current.files;Je.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[re,X,j,me]);var Se=C.exports.useRef([]),He=function(Je){te.current&&te.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",nM,!1),document.addEventListener("drop",He,!1)),function(){T&&(document.removeEventListener("dragover",nM),document.removeEventListener("drop",He))}},[te,T]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var Ue=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(Pke(Se.current),[Me.target]),Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){if(!(a5(Me)&&!D)){var Xt=Je.length,Gt=Xt>0&&pke({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!Gt;q({isDragAccept:Gt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(Je){return Ue(Je)})},[i,u,Ue,D,W,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Jy(Me);if(Je&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return Je&&g&&g(Me),!1},[g,D]),et=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Se.current.filter(function(Gt){return te.current&&te.current.contains(Gt)}),Xt=Je.indexOf(Me.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Jy(Me)&&h&&h(Me))},[te,h,D]),tt=C.exports.useCallback(function(Me,Je){var Xt=[],Gt=[];Me.forEach(function(Ee){var It=aV(Ee,W),Ne=I6(It,2),st=Ne[0],ln=Ne[1],Dn=sV(Ee,a,o),$e=I6(Dn,2),pt=$e[0],rt=$e[1],Nt=$?$(Ee):null;if(st&&pt&&!Nt)Xt.push(Ee);else{var Qt=[ln,rt];Nt&&(Qt=Qt.concat(Nt)),Gt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){Gt.push({file:Ee,errors:[hke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:Gt,type:"setFiles"}),m&&m(Xt,Gt,Je),Gt.length>0&&b&&b(Gt,Je),Xt.length>0&&v&&v(Xt,Je)},[q,s,W,a,o,l,m,v,b,$]),at=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){a5(Me)&&!D||tt(Je,Me)}).catch(function(Je){return Ue(Je)}),q({type:"reset"})},[i,tt,Ue,D]),At=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(Je){return i(Je)}).then(function(Je){tt(Je,null),q({type:"closeDialog"})}).catch(function(Je){Ske(Je)?(j(Je),q({type:"closeDialog"})):wke(Je)?(me.current=!1,re.current?(re.current.value=null,re.current.click()):Ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no
",t=U2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Om(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fK=["Webkit","ms","Moz","O"];Object.keys(nm).forEach(function(e){fK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nm[t]=nm[e]})});function CM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||nm.hasOwnProperty(e)&&nm[e]?(""+t).trim():t+"px"}function _M(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=CM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var hK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function V6(e,t){if(t){if(hK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function U6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var j6=null;function F8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var G6=null,Kp=null,Yp=null;function lE(e){if(e=kv(e)){if(typeof G6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=d4(t),G6(e.stateNode,e.type,t))}}function kM(e){Kp?Yp?Yp.push(e):Yp=[e]:Kp=e}function EM(){if(Kp){var e=Kp,t=Yp;if(Yp=Kp=null,lE(e),t)for(e=0;e>>=0,e===0?32:31-(_K(e)/kK|0)|0}var j2=64,G2=4194304;function Hg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function q3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Hg(s):(o&=a,o!==0&&(r=Hg(o)))}else a=n&~i,a!==0?r=Hg(a):o!==0&&(r=Hg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Cv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function TK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=im),vE=String.fromCharCode(32),yE=!1;function GM(e,t){switch(e){case"keyup":return rY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mp=!1;function oY(e,t){switch(e){case"compositionend":return qM(t);case"keypress":return t.which!==32?null:(yE=!0,vE);case"textInput":return e=t.data,e===vE&&yE?null:e;default:return null}}function aY(e,t){if(Mp)return e==="compositionend"||!q8&&GM(e,t)?(e=UM(),r3=U8=Fc=null,Mp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wE(n)}}function XM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?XM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QM(){for(var e=window,t=V3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V3(e.document)}return t}function K8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gY(e){var t=QM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&XM(n.ownerDocument.documentElement,n)){if(r!==null&&K8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=CE(n,o);var a=CE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Op=null,Q6=null,am=null,J6=!1;function _E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;J6||Op==null||Op!==V3(r)||(r=Op,"selectionStart"in r&&K8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),am&&Fm(am,r)||(am=r,r=Z3(Q6,"onSelect"),0Dp||(e.current=ow[Dp],ow[Dp]=null,Dp--)}function Gn(e,t){Dp++,ow[Dp]=e.current,e.current=t}var rd={},Vi=dd(rd),Lo=dd(!1),Vf=rd;function S0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function Q3(){Zn(Lo),Zn(Vi)}function IE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(Lo,n)}function sO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,cK(e)||"Unknown",i));return hr({},n,r)}function J3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,Vf=Vi.current,Gn(Vi,e),Gn(Lo,Lo.current),!0}function ME(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=sO(e,t,Vf),r.__reactInternalMemoizedMergedChildContext=e,Zn(Lo),Zn(Vi),Gn(Vi,e)):Zn(Lo),Gn(Lo,n)}var su=null,f4=!1,rS=!1;function lO(e){su===null?su=[e]:su.push(e)}function PY(e){f4=!0,lO(e)}function fd(){if(!rS&&su!==null){rS=!0;var e=0,t=Tn;try{var n=su;for(Tn=1;e>=a,i-=a,uu=1<<32-vs(t)+i|n<z?(H=D,D=null):H=D.sibling;var W=m(E,D,L[z],I);if(W===null){D===null&&(D=H);break}e&&D&&W.alternate===null&&t(E,D),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W,D=H}if(z===L.length)return n(E,D),rr&&mf(E,z),O;if(D===null){for(;zz?(H=D,D=null):H=D.sibling;var Y=m(E,D,W.value,I);if(Y===null){D===null&&(D=H);break}e&&D&&Y.alternate===null&&t(E,D),k=o(Y,k,z),N===null?O=Y:N.sibling=Y,N=Y,D=H}if(W.done)return n(E,D),rr&&mf(E,z),O;if(D===null){for(;!W.done;z++,W=L.next())W=g(E,W.value,I),W!==null&&(k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return rr&&mf(E,z),O}for(D=r(E,D);!W.done;z++,W=L.next())W=v(D,E,z,W.value,I),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?z:W.key),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return e&&D.forEach(function(de){return t(E,de)}),rr&&mf(E,z),O}function P(E,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Ip&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case W2:e:{for(var O=L.key,N=k;N!==null;){if(N.key===O){if(O=L.type,O===Ip){if(N.tag===7){n(E,N.sibling),k=i(N,L.props.children),k.return=E,E=k;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&FE(O)===N.type){n(E,N.sibling),k=i(N,L.props),k.ref=vg(E,N,L),k.return=E,E=k;break e}n(E,N);break}else t(E,N);N=N.sibling}L.type===Ip?(k=Nf(L.props.children,E.mode,I,L.key),k.return=E,E=k):(I=d3(L.type,L.key,L.props,null,E.mode,I),I.ref=vg(E,k,L),I.return=E,E=I)}return a(E);case Ap:e:{for(N=L.key;k!==null;){if(k.key===N)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(E,k.sibling),k=i(k,L.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=dS(L,E.mode,I),k.return=E,E=k}return a(E);case Pc:return N=L._init,P(E,k,N(L._payload),I)}if($g(L))return b(E,k,L,I);if(fg(L))return w(E,k,L,I);J2(E,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,L),k.return=E,E=k):(n(E,k),k=cS(L,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return P}var C0=mO(!0),vO=mO(!1),Ev={},bl=dd(Ev),Vm=dd(Ev),Um=dd(Ev);function Tf(e){if(e===Ev)throw Error(Oe(174));return e}function r9(e,t){switch(Gn(Um,t),Gn(Vm,e),Gn(bl,Ev),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:W6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=W6(t,e)}Zn(bl),Gn(bl,t)}function _0(){Zn(bl),Zn(Vm),Zn(Um)}function yO(e){Tf(Um.current);var t=Tf(bl.current),n=W6(t,e.type);t!==n&&(Gn(Vm,e),Gn(bl,n))}function i9(e){Vm.current===e&&(Zn(bl),Zn(Vm))}var cr=dd(0);function o5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var iS=[];function o9(){for(var e=0;en?n:4,e(!0);var r=oS.transition;oS.transition={};try{e(!1),t()}finally{Tn=n,oS.transition=r}}function RO(){return za().memoizedState}function IY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},NO(e))DO(t,n);else if(n=fO(e,t,n,r),n!==null){var i=io();ys(n,e,r,i),zO(n,t,r)}}function MY(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(NO(e))DO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,t9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=fO(e,t,i,r),n!==null&&(i=io(),ys(n,e,r,i),zO(n,t,r))}}function NO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function DO(e,t){sm=a5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,H8(e,n)}}var s5={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},OY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:HE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,s3(4194308,4,TO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return s3(4194308,4,e,t)},useInsertionEffect:function(e,t){return s3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=IY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:$E,useDebugValue:c9,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=$E(!1),t=e[0];return e=AY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(jf&30)!==0||SO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,HE(CO.bind(null,r,o,e),[e]),r.flags|=2048,qm(9,wO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=cu,r=uu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[Wm]=r,GO(e,t,!1,!1),t.stateNode=e;e:{switch(a=U6(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iE0&&(t.flags|=128,r=!0,yg(o,!1),t.lanes=4194304)}else{if(!r)if(e=o5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>E0&&n!==1073741824&&(t.flags|=128,r=!0,yg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return m9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function HY(e,t){switch(Z8(t),t.tag){case 1:return To(t.type)&&Q3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _0(),Zn(Lo),Zn(Vi),o9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return i9(t),null;case 13:if(Zn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));w0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(cr),null;case 4:return _0(),null;case 10:return e9(t.type._context),null;case 22:case 23:return m9(),null;case 24:return null;default:return null}}var ty=!1,Wi=!1,WY=typeof WeakSet=="function"?WeakSet:Set,it=null;function $p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function vw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var ZE=!1;function VY(e,t){if(ew=K3,e=QM(),K8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(tw={focusedElem:e,selectionRange:n},K3=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){t=it;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,P=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}return b=ZE,ZE=!1,b}function lm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&vw(t,n,o)}i=i.next}while(i!==r)}}function g4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function YO(e){var t=e.alternate;t!==null&&(e.alternate=null,YO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[Wm],delete t[iw],delete t[kY],delete t[EY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ZO(e){return e.tag===5||e.tag===3||e.tag===4}function XE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=X3));else if(r!==4&&(e=e.child,e!==null))for(bw(e,t,n),e=e.sibling;e!==null;)bw(e,t,n),e=e.sibling}function xw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xw(e,t,n),e=e.sibling;e!==null;)xw(e,t,n),e=e.sibling}var Li=null,fs=!1;function yc(e,t,n){for(n=n.child;n!==null;)XO(e,t,n),n=n.sibling}function XO(e,t,n){if(yl&&typeof yl.onCommitFiberUnmount=="function")try{yl.onCommitFiberUnmount(s4,n)}catch{}switch(n.tag){case 5:Wi||$p(n,t);case 6:var r=Li,i=fs;Li=null,yc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?nS(e.parentNode,n):e.nodeType===1&&nS(e,n),zm(e)):nS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,yc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&vw(n,t,a),i=i.next}while(i!==r)}yc(e,t,n);break;case 1:if(!Wi&&($p(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}yc(e,t,n);break;case 21:yc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,yc(e,t,n),Wi=r):yc(e,t,n);break;default:yc(e,t,n)}}function QE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new WY),t.forEach(function(r){var i=QY.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,c5=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,it=e.current;it!==null;){var o=it,a=o.child;if((it.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-p9?Rf(e,0):h9|=n),Ao(e,t)}function oR(e,t){t===0&&((e.mode&1)===0?t=1:(t=G2,G2<<=1,(G2&130023424)===0&&(G2=4194304)));var n=io();e=gu(e,t),e!==null&&(Cv(e,t,n),Ao(e,n))}function XY(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),oR(e,n)}function QY(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),oR(e,n)}var aR;aR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,FY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&uO(t,t5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l3(e,t),e=t.pendingProps;var i=S0(t,Vi.current);Xp(t,n),i=s9(null,t,r,e,i,n);var o=l9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,J3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,n9(t),i.updater=h4,t.stateNode=i,i._reactInternals=t,cw(t,r,e,n),t=hw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&Y8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=eZ(r),e=ds(r,e),i){case 0:t=fw(null,t,r,e,n);break e;case 1:t=qE(null,t,r,e,n);break e;case 11:t=jE(null,t,r,e,n);break e;case 14:t=GE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),fw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 3:e:{if(VO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,hO(e,t),i5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=k0(Error(Oe(423)),t),t=KE(e,t,r,n,i);break e}else if(r!==i){i=k0(Error(Oe(424)),t),t=KE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=vO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(w0(),r===i){t=mu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return yO(t),e===null&&sw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,nw(r,i)?a=null:o!==null&&nw(r,o)&&(t.flags|=32),WO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&sw(t),null;case 13:return UO(e,t,n);case 4:return r9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=C0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),jE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(n5,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=mu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),lw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),lw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xp(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),GE(e,t,r,i,n);case 15:return $O(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),l3(e,t),t.tag=1,To(r)?(e=!0,J3(t)):e=!1,Xp(t,n),gO(t,r,i),cw(t,r,i,n),hw(null,t,r,!0,e,n);case 19:return jO(e,t,n);case 22:return HO(e,t,n)}throw Error(Oe(156,t.tag))};function sR(e,t){return OM(e,t)}function JY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new JY(e,t,n,r)}function y9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eZ(e){if(typeof e=="function")return y9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===z8)return 11;if(e===B8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function d3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")y9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ip:return Nf(n.children,i,o,t);case D8:a=8,i|=8;break;case R6:return e=Ma(12,n,t,i|2),e.elementType=R6,e.lanes=o,e;case N6:return e=Ma(13,n,t,i),e.elementType=N6,e.lanes=o,e;case D6:return e=Ma(19,n,t,i),e.elementType=D6,e.lanes=o,e;case mM:return v4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pM:a=10;break e;case gM:a=9;break e;case z8:a=11;break e;case B8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Nf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function v4(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=mM,e.lanes=n,e.stateNode={isHidden:!1},e}function cS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function dS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jx(0),this.expirationTimes=jx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function b9(e,t,n,r,i,o,a,s,l){return e=new tZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},n9(o),e}function nZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Il);const iy=L8(Il.exports);var aP=Il.exports;M6.createRoot=aP.createRoot,M6.hydrateRoot=aP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,w4={exports:{}},C4={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sZ=C.exports,lZ=Symbol.for("react.element"),uZ=Symbol.for("react.fragment"),cZ=Object.prototype.hasOwnProperty,dZ=sZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fZ={key:!0,ref:!0,__self:!0,__source:!0};function dR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)cZ.call(t,r)&&!fZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:lZ,type:e,key:o,ref:a,props:i,_owner:dZ.current}}C4.Fragment=uZ;C4.jsx=dR;C4.jsxs=dR;(function(e){e.exports=C4})(w4);const Xn=w4.exports.Fragment,x=w4.exports.jsx,te=w4.exports.jsxs,hZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Xn,jsx:x,jsxs:te},Symbol.toStringTag,{value:"Module"}));var C9=C.exports.createContext({});C9.displayName="ColorModeContext";function Pv(){const e=C.exports.useContext(C9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var oy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function pZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?oy.dark:oy.light),document.body.classList.remove(r?oy.light:oy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var gZ="chakra-ui-color-mode";function mZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var vZ=mZ(gZ),sP=()=>{};function lP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function fR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=vZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>lP(a,s)),[h,g]=C.exports.useState(()=>lP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>pZ({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const L=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?sP:k,setColorMode:t?sP:E,forced:t!==void 0}),[P,k,E,t]);return x(C9.Provider,{value:L,children:n})}fR.displayName="ColorModeProvider";var kw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",N="[object String]",D="[object Undefined]",z="[object WeakMap]",H="[object ArrayBuffer]",W="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",ne="[object Int16Array]",ie="[object Int32Array]",J="[object Uint8Array]",q="[object Uint8ClampedArray]",V="[object Uint16Array]",G="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,xe={};xe[Y]=xe[de]=xe[j]=xe[ne]=xe[ie]=xe[J]=xe[q]=xe[V]=xe[G]=!0,xe[s]=xe[l]=xe[H]=xe[h]=xe[W]=xe[g]=xe[m]=xe[v]=xe[w]=xe[P]=xe[k]=xe[I]=xe[O]=xe[N]=xe[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Se||He||Function("return this")(),ut=t&&!t.nodeType&&t,Xe=ut&&!0&&e&&!e.nodeType&&e,et=Xe&&Xe.exports===ut,tt=et&&Se.process,at=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||tt&&tt.binding&&tt.binding("util")}catch{}}(),At=at&&at.isTypedArray;function wt(U,re,pe){switch(pe.length){case 0:return U.call(re);case 1:return U.call(re,pe[0]);case 2:return U.call(re,pe[0],pe[1]);case 3:return U.call(re,pe[0],pe[1],pe[2])}return U.apply(re,pe)}function Ae(U,re){for(var pe=-1,Ye=Array(U);++pe-1}function l1(U,re){var pe=this.__data__,Ye=ja(pe,U);return Ye<0?(++this.size,pe.push([U,re])):pe[Ye][1]=re,this}Ro.prototype.clear=kd,Ro.prototype.delete=s1,Ro.prototype.get=Ou,Ro.prototype.has=Ed,Ro.prototype.set=l1;function Is(U){var re=-1,pe=U==null?0:U.length;for(this.clear();++re1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,mt&&Ch(pe[0],pe[1],mt)&&(fn=zt<3?void 0:fn,zt=1),re=Object(re);++Ye-1&&U%1==0&&U0){if(++re>=i)return arguments[0]}else re=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,re){return U===re||U!==U&&re!==re}var Id=zl(function(){return arguments}())?zl:function(U){return Wn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},$l=Array.isArray;function Ht(U){return U!=null&&kh(U.length)&&!$u(U)}function _h(U){return Wn(U)&&Ht(U)}var Fu=Qt||S1;function $u(U){if(!Bo(U))return!1;var re=Os(U);return re==v||re==b||re==u||re==L}function kh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var re=typeof U;return U!=null&&(re=="object"||re=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Md(U){if(!Wn(U)||Os(U)!=k)return!1;var re=ln(U);if(re===null)return!0;var pe=yn.call(re,"constructor")&&re.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Eh=At?dt(At):Nu;function Od(U){return jr(U,Ph(U))}function Ph(U){return Ht(U)?y1(U,!0):Rs(U)}var un=Ga(function(U,re,pe,Ye){No(U,re,pe,Ye)});function Wt(U){return function(){return U}}function Lh(U){return U}function S1(){return!1}e.exports=un})(kw,kw.exports);const ml=kw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Af(e,...t){return yZ(e)?e(...t):e}var yZ=e=>typeof e=="function",bZ=e=>/!(important)?$/.test(e),uP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Ew=(e,t)=>n=>{const r=String(t),i=bZ(r),o=uP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=uP(s),i?`${s} !important`:s};function Ym(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Ew(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ay=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Ym({scale:e,transform:t}),r}}var xZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function SZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:xZ(t),transform:n?Ym({scale:n,compose:r}):r}}var hR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function wZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...hR].join(" ")}function CZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...hR].join(" ")}var _Z={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},kZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function EZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var PZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},pR="& > :not(style) ~ :not(style)",LZ={[pR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},TZ={[pR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Pw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},AZ=new Set(Object.values(Pw)),gR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),IZ=e=>e.trim();function MZ(e,t){var n;if(e==null||gR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(IZ).filter(Boolean);if(l?.length===0)return e;const u=s in Pw?Pw[s]:s;l.unshift(u);const h=l.map(g=>{if(AZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=mR(b)?b:b&&b.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var mR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),OZ=(e,t)=>MZ(e,t??{});function RZ(e){return/^var\(--.+\)$/.test(e)}var NZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:_Z},backdropFilter(e){return e!=="auto"?e:kZ},ring(e){return EZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?wZ():e==="auto-gpu"?CZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=NZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(RZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:OZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||mR(e)||gR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=PZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",ay(rn.vh,rn.px)),spaceT:as("space",ay(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Ym({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ay(rn.vh,rn.px)),sizesT:as("sizes",ay(rn.vh,rn.fraction)),shadows:as("shadows"),logical:SZ,blur:as("blur",rn.blur)},f3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(f3,{bgImage:f3.backgroundImage,bgImg:f3.backgroundImage});var pn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var DZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Lw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Lw,{shadow:Lw.boxShadow});var zZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},h5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:LZ,transform:Ym({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:TZ,transform:Ym({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(h5,{flexDir:h5.flexDirection});var vR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},BZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var FZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function $Z(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},WZ=HZ($Z),VZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},UZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},fS=(e,t,n)=>{const r={},i=WZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},jZ={srOnly:{transform(e){return e===!0?VZ:e==="focusable"?UZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>fS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>fS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>fS(t,e,n)}},dm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(dm,{insetStart:dm.insetInlineStart,insetEnd:dm.insetInlineEnd});var GZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Yn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Yn,{m:Yn.margin,mt:Yn.marginTop,mr:Yn.marginRight,me:Yn.marginInlineEnd,marginEnd:Yn.marginInlineEnd,mb:Yn.marginBottom,ml:Yn.marginLeft,ms:Yn.marginInlineStart,marginStart:Yn.marginInlineStart,mx:Yn.marginX,my:Yn.marginY,p:Yn.padding,pt:Yn.paddingTop,py:Yn.paddingY,px:Yn.paddingX,pb:Yn.paddingBottom,pl:Yn.paddingLeft,ps:Yn.paddingInlineStart,paddingStart:Yn.paddingInlineStart,pr:Yn.paddingRight,pe:Yn.paddingInlineEnd,paddingEnd:Yn.paddingInlineEnd});var qZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},KZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},YZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},ZZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},XZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function yR(e){return xs(e)&&e.reference?e.reference:String(e)}var _4=(e,...t)=>t.map(yR).join(` ${e} `).replace(/calc/g,""),cP=(...e)=>`calc(${_4("+",...e)})`,dP=(...e)=>`calc(${_4("-",...e)})`,Tw=(...e)=>`calc(${_4("*",...e)})`,fP=(...e)=>`calc(${_4("/",...e)})`,hP=e=>{const t=yR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Tw(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(cP(e,...t)),subtract:(...t)=>Cf(dP(e,...t)),multiply:(...t)=>Cf(Tw(e,...t)),divide:(...t)=>Cf(fP(e,...t)),negate:()=>Cf(hP(e)),toString:()=>e.toString()}),{add:cP,subtract:dP,multiply:Tw,divide:fP,negate:hP});function QZ(e,t="-"){return e.replace(/\s+/g,t)}function JZ(e){const t=QZ(e.toString());return tX(eX(t))}function eX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function tX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function nX(e,t=""){return[t,e].filter(Boolean).join("-")}function rX(e,t){return`var(${e}${t?`, ${t}`:""})`}function iX(e,t=""){return JZ(`--${nX(e,t)}`)}function ei(e,t,n){const r=iX(e,n);return{variable:r,reference:rX(r,t)}}function oX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function aX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Aw(e){if(e==null)return e;const{unitless:t}=aX(e);return t||typeof e=="number"?`${e}px`:e}var bR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,_9=e=>Object.fromEntries(Object.entries(e).sort(bR));function pP(e){const t=_9(e);return Object.assign(Object.values(t),t)}function sX(e){const t=Object.keys(_9(e));return new Set(t)}function gP(e){if(!e)return e;e=Aw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Vg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Aw(e)})`),t&&n.push("and",`(max-width: ${Aw(t)})`),n.join(" ")}function lX(e){if(!e)return null;e.base=e.base??"0px";const t=pP(e),n=Object.entries(e).sort(bR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?gP(u):void 0,{_minW:gP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Vg(null,u),minWQuery:Vg(a),minMaxQuery:Vg(a,u)}}),r=sX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:_9(e),asArray:pP(e),details:n,media:[null,...t.map(o=>Vg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;oX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>xR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),eu=e=>xR(t=>e(t,"~ &"),"[data-peer]",".peer"),xR=(e,...t)=>t.map(e).join(", "),k4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:eu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:eu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:eu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:eu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:eu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:eu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:eu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:eu(Ci.focusWithin),_peerPlaceholderShown:eu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},uX=Object.keys(k4);function mP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function cX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=mP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,P=Cf.negate(s),E=Cf.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:P}=mP(b,t?.cssVarPrefix);return P},g=xs(s)?s:{default:s};n=ml(n,Object.entries(g).reduce((m,[v,b])=>{var w;const P=h(b);if(v==="default")return m[l]=P,m;const E=((w=k4)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function dX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function fX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var hX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function pX(e){return fX(e,hX)}function gX(e){return e.semanticTokens}function mX(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function vX({tokens:e,semanticTokens:t}){const n=Object.entries(Iw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Iw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Iw(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Iw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function yX(e){var t;const n=mX(e),r=pX(n),i=gX(n),o=vX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=cX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:lX(n.breakpoints)}),n}var k9=ml({},f3,pn,DZ,h5,Ea,zZ,GZ,BZ,vR,jZ,dm,Lw,Yn,XZ,ZZ,qZ,KZ,FZ,YZ),bX=Object.assign({},Yn,Ea,h5,vR,dm),xX=Object.keys(bX),SX=[...Object.keys(k9),...uX],wX={...k9,...k4},CX=e=>e in wX,_X=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Af(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!EX(t),LX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=kX(t);return t=n(i)??r(o)??r(t),t};function TX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Af(o,r),u=_X(l)(r);let h={};for(let g in u){const m=u[g];let v=Af(m,r);g in n&&(g=n[g]),PX(g,v)&&(v=LX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=ml({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const P=Af(b?.property,r);if(!a&&b?.static){const E=Af(b.static,r);h=ml({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&xs(w)?h=ml({},h,w):h[P]=w;continue}if(xs(w)){h=ml({},h,w);continue}h[g]=w}return h};return i}var SR=e=>t=>TX({theme:t,pseudos:k4,configs:k9})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function AX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function IX(e,t){for(let n=t+1;n{ml(u,{[L]:m?k[L]:{[E]:k[L]}})});continue}if(!v){m?ml(u,k):u[E]=k;continue}u[E]=k}}return u}}function OX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=MX(i);return ml({},Af(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function RX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return dX(e,["styleConfig","size","variant","colorScheme"])}function NX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(V0,--Oo):0,P0--,$r===10&&(P0=1,P4--),$r}function ia(){return $r=Oo2||Xm($r)>3?"":" "}function qX(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Lv(e,h3()+(t<6&&xl()==32&&ia()==32))}function Ow(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Ow($r);break;case 40:e===41&&Ow(e);break;case 92:ia();break}return Oo}function KX(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Lv(t,Oo-1)+"*"+E4(e===47?e:ia())}function YX(e){for(;!Xm(xl());)ia();return Lv(e,Oo)}function ZX(e){return PR(g3("",null,null,null,[""],e=ER(e),0,[0],e))}function g3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,P=1,E=1,k=0,L="",I=i,O=o,N=r,D=L;P;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Mw(D+=wn(p3(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=p3(k);break;case 9:case 10:case 13:case 32:D+=GX(b);break;case 92:D+=qX(h3()-1,7);continue;case 47:switch(xl()){case 42:case 47:sy(XX(KX(ia(),h3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:P=0;case 59+h:v>0&&cl(D)-g&&sy(v>32?yP(D+";",r,n,g-1):yP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(sy(N=vP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)g3(D,t,N,N,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:g3(e,N,N,r&&sy(vP(e,N,N,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:g3(D,N,N,N,[""],O,0,s,O)}}u=h=v=0,w=E=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&jX()==125)continue}switch(D+=E4(k),k*w){case 38:E=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*E,E=1;break;case 64:xl()===45&&(D+=p3(ia())),m=xl(),h=g=cl(L=D+=YX(h3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function vP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=L9(m),b=0,w=0,P=0;b0?m[E]+" "+k:wn(k,/&\f/g,m[E])))&&(l[P++]=L);return L4(e,t,n,i===0?E9:s,l,u,h)}function XX(e,t,n){return L4(e,t,n,wR,E4(UX()),Zm(e,2,-2),0)}function yP(e,t,n,r){return L4(e,t,n,P9,Zm(e,0,r),Zm(e,r+1,-1),r)}function Jp(e,t){for(var n="",r=L9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+p5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Mw(e,"stretch")?TR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Mw(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+$i+e+e}return e}var aQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case P9:t.return=TR(t.value,t.length);break;case CR:return Jp([xg(t,{value:wn(t.value,"@","@"+gn)})],i);case E9:if(t.length)return VX(t.props,function(o){switch(WX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jp([xg(t,{props:[wn(o,/:(read-\w+)/,":"+p5+"$1")]})],i);case"::placeholder":return Jp([xg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),xg(t,{props:[wn(o,/:(plac\w+)/,":"+p5+"$1")]}),xg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},sQ=[aQ],AR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||sQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var yQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bQ=/[A-Z]|^ms/g,xQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zR=function(t){return t.charCodeAt(1)===45},SP=function(t){return t!=null&&typeof t!="boolean"},hS=LR(function(e){return zR(e)?e:e.replace(bQ,"-$&").toLowerCase()}),wP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(xQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return yQ[t]!==1&&!zR(t)&&typeof n=="number"&&n!==0?n+"px":n};function Qm(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return SQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,Qm(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function SQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function BQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},UR=FQ(BQ);function jR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var GR=e=>jR(e,t=>t!=null);function $Q(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var HQ=$Q();function qR(e,...t){return DQ(e)?e(...t):e}function WQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function VQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var UQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jQ=LR(function(e){return UQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),GQ=jQ,qQ=function(t){return t!=="theme"},EP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?GQ:qQ},PP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},KQ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return NR(n,r,i),CQ(function(){return DR(n,r,i)}),null},YQ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=PP(t,n,r),l=s||EP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var XQ=In("accordion").parts("root","container","button","panel").extend("icon"),QQ=In("alert").parts("title","description","container").extend("icon","spinner"),JQ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),eJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var tJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var nJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),rJ=In("editable").parts("preview","input","textarea"),iJ=In("form").parts("container","requiredIndicator","helperText"),oJ=In("formError").parts("text","icon"),aJ=In("input").parts("addon","field","element"),sJ=In("list").parts("container","item","icon"),lJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),uJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var dJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),fJ=In("progress").parts("label","filledTrack","track"),hJ=In("radio").parts("container","control","label"),pJ=In("select").parts("field","icon"),gJ=In("slider").parts("container","track","thumb","filledTrack","mark"),mJ=In("stat").parts("container","label","helpText","number","icon"),vJ=In("switch").parts("container","track","thumb"),yJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),bJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),xJ=In("tag").parts("container","label","closeButton");function Mi(e,t){SJ(e)&&(e="100%");var n=wJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ly(e){return Math.min(1,Math.max(0,e))}function SJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function wJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function KR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function If(e){return e.length===1?"0"+e:String(e)}function CJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function LP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _J(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=pS(s,a,e+1/3),i=pS(s,a,e),o=pS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function TP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var zw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function TJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=MJ(e)),typeof e=="object"&&(tu(e.r)&&tu(e.g)&&tu(e.b)?(t=CJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):tu(e.h)&&tu(e.s)&&tu(e.v)?(r=uy(e.s),i=uy(e.v),t=kJ(e.h,r,i),a=!0,s="hsv"):tu(e.h)&&tu(e.s)&&tu(e.l)&&(r=uy(e.s),o=uy(e.l),t=_J(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=KR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var AJ="[-\\+]?\\d+%?",IJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(IJ,")|(?:").concat(AJ,")"),gS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),mS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+gS),rgba:new RegExp("rgba"+mS),hsl:new RegExp("hsl"+gS),hsla:new RegExp("hsla"+mS),hsv:new RegExp("hsv"+gS),hsva:new RegExp("hsva"+mS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function MJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(zw[e])e=zw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:IP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:IP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function tu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Tv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=LJ(t)),this.originalInput=t;var i=TJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=KR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=TP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=TP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=LP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=LP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),AP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),EJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+AP(this.r,this.g,this.b,!1),n=0,r=Object.entries(zw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(YR(e));return e.count=t,n}var r=OJ(e.hue,e.seed),i=RJ(r,e),o=NJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Tv(a)}function OJ(e,t){var n=zJ(e),r=g5(n,t);return r<0&&(r=360+r),r}function RJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return g5([0,100],t.seed);var n=ZR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return g5([r,i],t.seed)}function NJ(e,t,n){var r=DJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return g5([r,i],n.seed)}function DJ(e,t){for(var n=ZR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function zJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=QR.find(function(a){return a.name===e});if(n){var r=XR(n);if(r.hueRange)return r.hueRange}var i=new Tv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function ZR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=QR;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function g5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function XR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var QR=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function BJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=BJ(e,`colors.${t}`,t),{isValid:i}=new Tv(r);return i?r:n},$J=e=>t=>{const n=Ai(t,e);return new Tv(n).isDark()?"dark":"light"},HJ=e=>t=>$J(e)(t)==="dark",L0=(e,t)=>n=>{const r=Ai(n,e);return new Tv(r).setAlpha(t).toRgbString()};function MP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function WJ(e){const t=YR().toHexString();return!e||FJ(e)?t:e.string&&e.colors?UJ(e.string,e.colors):e.string&&!e.colors?VJ(e.string):e.colors&&!e.string?jJ(e.colors):t}function VJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function UJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function R9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function GJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function JR(e){return GJ(e)&&e.reference?e.reference:String(e)}var H4=(e,...t)=>t.map(JR).join(` ${e} `).replace(/calc/g,""),OP=(...e)=>`calc(${H4("+",...e)})`,RP=(...e)=>`calc(${H4("-",...e)})`,Bw=(...e)=>`calc(${H4("*",...e)})`,NP=(...e)=>`calc(${H4("/",...e)})`,DP=e=>{const t=JR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Bw(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(OP(e,...t)),subtract:(...t)=>lu(RP(e,...t)),multiply:(...t)=>lu(Bw(e,...t)),divide:(...t)=>lu(NP(e,...t)),negate:()=>lu(DP(e)),toString:()=>e.toString()}),{add:OP,subtract:RP,multiply:Bw,divide:NP,negate:DP});function qJ(e){return!Number.isInteger(parseFloat(e.toString()))}function KJ(e,t="-"){return e.replace(/\s+/g,t)}function eN(e){const t=KJ(e.toString());return t.includes("\\.")?e:qJ(e)?t.replace(".","\\."):e}function YJ(e,t=""){return[t,eN(e)].filter(Boolean).join("-")}function ZJ(e,t){return`var(${eN(e)}${t?`, ${t}`:""})`}function XJ(e,t=""){return`--${YJ(e,t)}`}function ji(e,t){const n=XJ(e,t?.prefix);return{variable:n,reference:ZJ(n,QJ(t?.fallback))}}function QJ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:JJ,defineMultiStyleConfig:eee}=ir(XQ.keys),tee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},nee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ree={pt:"2",px:"4",pb:"5"},iee={fontSize:"1.25em"},oee=JJ({container:tee,button:nee,panel:ree,icon:iee}),aee=eee({baseStyle:oee}),{definePartsStyle:Av,defineMultiStyleConfig:see}=ir(QQ.keys),oa=ei("alert-fg"),vu=ei("alert-bg"),lee=Av({container:{bg:vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function N9(e){const{theme:t,colorScheme:n}=e,r=L0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var uee=Av(e=>{const{colorScheme:t}=e,n=N9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark}}}}),cee=Av(e=>{const{colorScheme:t}=e,n=N9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),dee=Av(e=>{const{colorScheme:t}=e,n=N9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),fee=Av(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[vu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[vu.variable]:`colors.${t}.200`},color:oa.reference}}}),hee={subtle:uee,"left-accent":cee,"top-accent":dee,solid:fee},pee=see({baseStyle:lee,variants:hee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),tN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},gee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},mee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},vee={...tN,...gee,container:mee},nN=vee,yee=e=>typeof e=="function";function fi(e,...t){return yee(e)?e(...t):e}var{definePartsStyle:rN,defineMultiStyleConfig:bee}=ir(JQ.keys),e0=ei("avatar-border-color"),vS=ei("avatar-bg"),xee={borderRadius:"full",border:"0.2em solid",[e0.variable]:"white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference},See={[vS.variable]:"colors.gray.200",_dark:{[vS.variable]:"colors.whiteAlpha.400"},bgColor:vS.reference},zP=ei("avatar-background"),wee=e=>{const{name:t,theme:n}=e,r=t?WJ({string:t}):"colors.gray.400",i=HJ(r)(n);let o="white";return i||(o="gray.800"),{bg:zP.reference,"&:not([data-loaded])":{[zP.variable]:r},color:o,[e0.variable]:"colors.white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference,verticalAlign:"top"}},Cee=rN(e=>({badge:fi(xee,e),excessLabel:fi(See,e),container:fi(wee,e)}));function xc(e){const t=e!=="100%"?nN[e]:void 0;return rN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var _ee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},kee=bee({baseStyle:Cee,sizes:_ee,defaultProps:{size:"md"}}),Eee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},t0=ei("badge-bg"),vl=ei("badge-color"),Pee=e=>{const{colorScheme:t,theme:n}=e,r=L0(`${t}.500`,.6)(n);return{[t0.variable]:`colors.${t}.500`,[vl.variable]:"colors.white",_dark:{[t0.variable]:r,[vl.variable]:"colors.whiteAlpha.800"},bg:t0.reference,color:vl.reference}},Lee=e=>{const{colorScheme:t,theme:n}=e,r=L0(`${t}.200`,.16)(n);return{[t0.variable]:`colors.${t}.100`,[vl.variable]:`colors.${t}.800`,_dark:{[t0.variable]:r,[vl.variable]:`colors.${t}.200`},bg:t0.reference,color:vl.reference}},Tee=e=>{const{colorScheme:t,theme:n}=e,r=L0(`${t}.200`,.8)(n);return{[vl.variable]:`colors.${t}.500`,_dark:{[vl.variable]:r},color:vl.reference,boxShadow:`inset 0 0 0px 1px ${vl.reference}`}},Aee={solid:Pee,subtle:Lee,outline:Tee},hm={baseStyle:Eee,variants:Aee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Iee,definePartsStyle:Mee}=ir(eJ.keys),Oee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Ree=Mee({link:Oee}),Nee=Iee({baseStyle:Ree}),Dee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},iN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=L0(`${t}.200`,.12)(n),i=L0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},zee=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(iN,e)}},Bee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Fee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Bee[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},$ee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},Hee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Wee={ghost:iN,outline:zee,solid:Fee,link:$ee,unstyled:Hee},Vee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Uee={baseStyle:Dee,variants:Wee,sizes:Vee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:m3,defineMultiStyleConfig:jee}=ir(tJ.keys),pm=ei("checkbox-size"),Gee=e=>{const{colorScheme:t}=e;return{w:pm.reference,h:pm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},qee={_disabled:{cursor:"not-allowed"}},Kee={userSelect:"none",_disabled:{opacity:.4}},Yee={transitionProperty:"transform",transitionDuration:"normal"},Zee=m3(e=>({icon:Yee,container:qee,control:fi(Gee,e),label:Kee})),Xee={sm:m3({control:{[pm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:m3({control:{[pm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:m3({control:{[pm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},m5=jee({baseStyle:Zee,sizes:Xee,defaultProps:{size:"md",colorScheme:"blue"}}),gm=ji("close-button-size"),Sg=ji("close-button-bg"),Qee={w:[gm.reference],h:[gm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Sg.variable]:"colors.blackAlpha.100",_dark:{[Sg.variable]:"colors.whiteAlpha.100"}},_active:{[Sg.variable]:"colors.blackAlpha.200",_dark:{[Sg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Sg.reference},Jee={lg:{[gm.variable]:"sizes.10",fontSize:"md"},md:{[gm.variable]:"sizes.8",fontSize:"xs"},sm:{[gm.variable]:"sizes.6",fontSize:"2xs"}},ete={baseStyle:Qee,sizes:Jee,defaultProps:{size:"md"}},{variants:tte,defaultProps:nte}=hm,rte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},ite={baseStyle:rte,variants:tte,defaultProps:nte},ote={w:"100%",mx:"auto",maxW:"prose",px:"4"},ate={baseStyle:ote},ste={opacity:.6,borderColor:"inherit"},lte={borderStyle:"solid"},ute={borderStyle:"dashed"},cte={solid:lte,dashed:ute},dte={baseStyle:ste,variants:cte,defaultProps:{variant:"solid"}},{definePartsStyle:Fw,defineMultiStyleConfig:fte}=ir(nJ.keys),yS=ei("drawer-bg"),bS=ei("drawer-box-shadow");function gp(e){return Fw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var hte={bg:"blackAlpha.600",zIndex:"overlay"},pte={display:"flex",zIndex:"modal",justifyContent:"center"},gte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[yS.variable]:"colors.white",[bS.variable]:"shadows.lg",_dark:{[yS.variable]:"colors.gray.700",[bS.variable]:"shadows.dark-lg"},bg:yS.reference,boxShadow:bS.reference}},mte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},vte={position:"absolute",top:"2",insetEnd:"3"},yte={px:"6",py:"2",flex:"1",overflow:"auto"},bte={px:"6",py:"4"},xte=Fw(e=>({overlay:hte,dialogContainer:pte,dialog:fi(gte,e),header:mte,closeButton:vte,body:yte,footer:bte})),Ste={xs:gp("xs"),sm:gp("md"),md:gp("lg"),lg:gp("2xl"),xl:gp("4xl"),full:gp("full")},wte=fte({baseStyle:xte,sizes:Ste,defaultProps:{size:"xs"}}),{definePartsStyle:Cte,defineMultiStyleConfig:_te}=ir(rJ.keys),kte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ete={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Pte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Lte=Cte({preview:kte,input:Ete,textarea:Pte}),Tte=_te({baseStyle:Lte}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(iJ.keys),n0=ei("form-control-color"),Mte={marginStart:"1",[n0.variable]:"colors.red.500",_dark:{[n0.variable]:"colors.red.300"},color:n0.reference},Ote={mt:"2",[n0.variable]:"colors.gray.600",_dark:{[n0.variable]:"colors.whiteAlpha.600"},color:n0.reference,lineHeight:"normal",fontSize:"sm"},Rte=Ate({container:{width:"100%",position:"relative"},requiredIndicator:Mte,helperText:Ote}),Nte=Ite({baseStyle:Rte}),{definePartsStyle:Dte,defineMultiStyleConfig:zte}=ir(oJ.keys),r0=ei("form-error-color"),Bte={[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Fte={marginEnd:"0.5em",[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference},$te=Dte({text:Bte,icon:Fte}),Hte=zte({baseStyle:$te}),Wte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Vte={baseStyle:Wte},Ute={fontFamily:"heading",fontWeight:"bold"},jte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Gte={baseStyle:Ute,sizes:jte,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:qte}=ir(aJ.keys),Kte=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Yte={lg:du({field:Sc.lg,addon:Sc.lg}),md:du({field:Sc.md,addon:Sc.md}),sm:du({field:Sc.sm,addon:Sc.sm}),xs:du({field:Sc.xs,addon:Sc.xs})};function D9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var Zte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=D9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Xte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=D9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Qte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=D9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Jte=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),ene={outline:Zte,filled:Xte,flushed:Qte,unstyled:Jte},mn=qte({baseStyle:Kte,sizes:Yte,variants:ene,defaultProps:{size:"md",variant:"outline"}}),tne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),nne={baseStyle:tne},rne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ine={baseStyle:rne},{defineMultiStyleConfig:one,definePartsStyle:ane}=ir(sJ.keys),sne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},lne=ane({icon:sne}),une=one({baseStyle:lne}),{defineMultiStyleConfig:cne,definePartsStyle:dne}=ir(lJ.keys),fne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),hne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),pne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},gne={opacity:.6},mne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},vne={transitionProperty:"common",transitionDuration:"normal"},yne=dne(e=>({button:vne,list:fi(fne,e),item:fi(hne,e),groupTitle:pne,command:gne,divider:mne})),bne=cne({baseStyle:yne}),{defineMultiStyleConfig:xne,definePartsStyle:$w}=ir(uJ.keys),Sne={bg:"blackAlpha.600",zIndex:"modal"},wne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Cne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},_ne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},kne={position:"absolute",top:"2",insetEnd:"3"},Ene=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Pne={px:"6",py:"4"},Lne=$w(e=>({overlay:Sne,dialogContainer:fi(wne,e),dialog:fi(Cne,e),header:_ne,closeButton:kne,body:fi(Ene,e),footer:Pne}));function ss(e){return $w(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Tne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Ane=xne({baseStyle:Lne,sizes:Tne,defaultProps:{size:"md"}}),Ine={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},oN=Ine,{defineMultiStyleConfig:Mne,definePartsStyle:aN}=ir(cJ.keys),z9=ji("number-input-stepper-width"),sN=ji("number-input-input-padding"),One=lu(z9).add("0.5rem").toString(),Rne={[z9.variable]:"sizes.6",[sN.variable]:One},Nne=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},Dne={width:[z9.reference]},zne=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Bne=aN(e=>({root:Rne,field:fi(Nne,e)??{},stepperGroup:Dne,stepper:fi(zne,e)??{}}));function cy(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=oN.fontSizes[o];return aN({field:{...r.field,paddingInlineEnd:sN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Fne={xs:cy("xs"),sm:cy("sm"),md:cy("md"),lg:cy("lg")},$ne=Mne({baseStyle:Bne,sizes:Fne,variants:mn.variants,defaultProps:mn.defaultProps}),BP,Hne={...(BP=mn.baseStyle)==null?void 0:BP.field,textAlign:"center"},Wne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},FP,Vne={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((FP=mn.variants)==null?void 0:FP.unstyled.field)??{}},Une={baseStyle:Hne,sizes:Wne,variants:Vne,defaultProps:mn.defaultProps},{defineMultiStyleConfig:jne,definePartsStyle:Gne}=ir(dJ.keys),dy=ji("popper-bg"),qne=ji("popper-arrow-bg"),$P=ji("popper-arrow-shadow-color"),Kne={zIndex:10},Yne={[dy.variable]:"colors.white",bg:dy.reference,[qne.variable]:dy.reference,[$P.variable]:"colors.gray.200",_dark:{[dy.variable]:"colors.gray.700",[$P.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Zne={px:3,py:2,borderBottomWidth:"1px"},Xne={px:3,py:2},Qne={px:3,py:2,borderTopWidth:"1px"},Jne={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},ere=Gne({popper:Kne,content:Yne,header:Zne,body:Xne,footer:Qne,closeButton:Jne}),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:Ug}=ir(fJ.keys),rre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(MP(),MP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ai(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},ire={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ore=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),are=e=>({transitionProperty:"common",transitionDuration:"slow",...rre(e)}),sre=Ug(e=>({label:ire,filledTrack:are(e),track:ore(e)})),lre={xs:Ug({track:{h:"1"}}),sm:Ug({track:{h:"2"}}),md:Ug({track:{h:"3"}}),lg:Ug({track:{h:"4"}})},ure=nre({sizes:lre,baseStyle:sre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cre,definePartsStyle:v3}=ir(hJ.keys),dre=e=>{var t;const n=(t=fi(m5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},fre=v3(e=>{var t,n,r,i;return{label:(n=(t=m5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=m5).baseStyle)==null?void 0:i.call(r,e).container,control:dre(e)}}),hre={md:v3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:v3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:v3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},pre=cre({baseStyle:fre,sizes:hre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:gre,definePartsStyle:mre}=ir(pJ.keys),vre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},yre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},bre=mre(e=>({field:vre(e),icon:yre})),fy={paddingInlineEnd:"8"},HP,WP,VP,UP,jP,GP,qP,KP,xre={lg:{...(HP=mn.sizes)==null?void 0:HP.lg,field:{...(WP=mn.sizes)==null?void 0:WP.lg.field,...fy}},md:{...(VP=mn.sizes)==null?void 0:VP.md,field:{...(UP=mn.sizes)==null?void 0:UP.md.field,...fy}},sm:{...(jP=mn.sizes)==null?void 0:jP.sm,field:{...(GP=mn.sizes)==null?void 0:GP.sm.field,...fy}},xs:{...(qP=mn.sizes)==null?void 0:qP.xs,field:{...(KP=mn.sizes)==null?void 0:KP.xs.field,...fy},icon:{insetEnd:"1"}}},Sre=gre({baseStyle:bre,sizes:xre,variants:mn.variants,defaultProps:mn.defaultProps}),wre=ei("skeleton-start-color"),Cre=ei("skeleton-end-color"),_re=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[wre.variable]:a,[Cre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},kre={baseStyle:_re},xS=ei("skip-link-bg"),Ere={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[xS.variable]:"colors.white",_dark:{[xS.variable]:"colors.gray.700"},bg:xS.reference}},Pre={baseStyle:Ere},{defineMultiStyleConfig:Lre,definePartsStyle:W4}=ir(gJ.keys),tv=ei("slider-thumb-size"),nv=ei("slider-track-size"),Mc=ei("slider-bg"),Tre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...R9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Are=e=>({...R9({orientation:e.orientation,horizontal:{h:nv.reference},vertical:{w:nv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Ire=e=>{const{orientation:t}=e;return{...R9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:tv.reference,h:tv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Mre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Ore=W4(e=>({container:Tre(e),track:Are(e),thumb:Ire(e),filledTrack:Mre(e)})),Rre=W4({container:{[tv.variable]:"sizes.4",[nv.variable]:"sizes.1"}}),Nre=W4({container:{[tv.variable]:"sizes.3.5",[nv.variable]:"sizes.1"}}),Dre=W4({container:{[tv.variable]:"sizes.2.5",[nv.variable]:"sizes.0.5"}}),zre={lg:Rre,md:Nre,sm:Dre},Bre=Lre({baseStyle:Ore,sizes:zre,defaultProps:{size:"md",colorScheme:"blue"}}),_f=ji("spinner-size"),Fre={width:[_f.reference],height:[_f.reference]},$re={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},Hre={baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}},{defineMultiStyleConfig:Wre,definePartsStyle:lN}=ir(mJ.keys),Vre={fontWeight:"medium"},Ure={opacity:.8,marginBottom:"2"},jre={verticalAlign:"baseline",fontWeight:"semibold"},Gre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},qre=lN({container:{},label:Vre,helpText:Ure,number:jre,icon:Gre}),Kre={md:lN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Yre=Wre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Zre,definePartsStyle:y3}=ir(vJ.keys),mm=ji("switch-track-width"),Df=ji("switch-track-height"),SS=ji("switch-track-diff"),Xre=lu.subtract(mm,Df),Hw=ji("switch-thumb-x"),wg=ji("switch-bg"),Qre=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[mm.reference],height:[Df.reference],transitionProperty:"common",transitionDuration:"fast",[wg.variable]:"colors.gray.300",_dark:{[wg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[wg.variable]:`colors.${t}.500`,_dark:{[wg.variable]:`colors.${t}.200`}},bg:wg.reference}},Jre={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Df.reference],height:[Df.reference],_checked:{transform:`translateX(${Hw.reference})`}},eie=y3(e=>({container:{[SS.variable]:Xre,[Hw.variable]:SS.reference,_rtl:{[Hw.variable]:lu(SS).negate().toString()}},track:Qre(e),thumb:Jre})),tie={sm:y3({container:{[mm.variable]:"1.375rem",[Df.variable]:"sizes.3"}}),md:y3({container:{[mm.variable]:"1.875rem",[Df.variable]:"sizes.4"}}),lg:y3({container:{[mm.variable]:"2.875rem",[Df.variable]:"sizes.6"}})},nie=Zre({baseStyle:eie,sizes:tie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:rie,definePartsStyle:i0}=ir(yJ.keys),iie=i0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),v5={"&[data-is-numeric=true]":{textAlign:"end"}},oie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),aie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),sie={simple:oie,striped:aie,unstyled:{}},lie={sm:i0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:i0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:i0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},uie=rie({baseStyle:iie,variants:sie,sizes:lie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:cie,definePartsStyle:Sl}=ir(bJ.keys),die=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},fie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},hie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},pie={p:4},gie=Sl(e=>({root:die(e),tab:fie(e),tablist:hie(e),tabpanel:pie})),mie={sm:Sl({tab:{py:1,px:4,fontSize:"sm"}}),md:Sl({tab:{fontSize:"md",py:2,px:4}}),lg:Sl({tab:{fontSize:"lg",py:3,px:4}})},vie=Sl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),yie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),bie=Sl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),xie=Sl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Sie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),wie=Sl({}),Cie={line:vie,enclosed:yie,"enclosed-colored":bie,"soft-rounded":xie,"solid-rounded":Sie,unstyled:wie},_ie=cie({baseStyle:gie,sizes:mie,variants:Cie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:kie,definePartsStyle:zf}=ir(xJ.keys),Eie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Pie={lineHeight:1.2,overflow:"visible"},Lie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Tie=zf({container:Eie,label:Pie,closeButton:Lie}),Aie={sm:zf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:zf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:zf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Iie={subtle:zf(e=>{var t;return{container:(t=hm.variants)==null?void 0:t.subtle(e)}}),solid:zf(e=>{var t;return{container:(t=hm.variants)==null?void 0:t.solid(e)}}),outline:zf(e=>{var t;return{container:(t=hm.variants)==null?void 0:t.outline(e)}})},Mie=kie({variants:Iie,baseStyle:Tie,sizes:Aie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),YP,Oie={...(YP=mn.baseStyle)==null?void 0:YP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},ZP,Rie={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((ZP=mn.variants)==null?void 0:ZP.unstyled.field)??{}},XP,QP,JP,eL,Nie={xs:((XP=mn.sizes)==null?void 0:XP.xs.field)??{},sm:((QP=mn.sizes)==null?void 0:QP.sm.field)??{},md:((JP=mn.sizes)==null?void 0:JP.md.field)??{},lg:((eL=mn.sizes)==null?void 0:eL.lg.field)??{}},Die={baseStyle:Oie,sizes:Nie,variants:Rie,defaultProps:{size:"md",variant:"outline"}},hy=ji("tooltip-bg"),wS=ji("tooltip-fg"),zie=ji("popper-arrow-bg"),Bie={bg:hy.reference,color:wS.reference,[hy.variable]:"colors.gray.700",[wS.variable]:"colors.whiteAlpha.900",_dark:{[hy.variable]:"colors.gray.300",[wS.variable]:"colors.gray.900"},[zie.variable]:hy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Fie={baseStyle:Bie},$ie={Accordion:aee,Alert:pee,Avatar:kee,Badge:hm,Breadcrumb:Nee,Button:Uee,Checkbox:m5,CloseButton:ete,Code:ite,Container:ate,Divider:dte,Drawer:wte,Editable:Tte,Form:Nte,FormError:Hte,FormLabel:Vte,Heading:Gte,Input:mn,Kbd:nne,Link:ine,List:une,Menu:bne,Modal:Ane,NumberInput:$ne,PinInput:Une,Popover:tre,Progress:ure,Radio:pre,Select:Sre,Skeleton:kre,SkipLink:Pre,Slider:Bre,Spinner:Hre,Stat:Yre,Switch:nie,Table:uie,Tabs:_ie,Tag:Mie,Textarea:Die,Tooltip:Fie},Hie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Wie=Hie,Vie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Uie=Vie,jie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Gie=jie,qie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Kie=qie,Yie={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Zie=Yie,Xie={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Qie={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Jie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},eoe={property:Xie,easing:Qie,duration:Jie},toe=eoe,noe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},roe=noe,ioe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ooe=ioe,aoe={breakpoints:Uie,zIndices:roe,radii:Kie,blur:ooe,colors:Gie,...oN,sizes:nN,shadows:Zie,space:tN,borders:Wie,transition:toe},soe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},loe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},uoe="ltr",coe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},doe={semanticTokens:soe,direction:uoe,...aoe,components:$ie,styles:loe,config:coe},foe=typeof Element<"u",hoe=typeof Map=="function",poe=typeof Set=="function",goe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!b3(e[r],t[r]))return!1;return!0}var o;if(hoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!b3(r.value[1],t.get(r.value[0])))return!1;return!0}if(poe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(goe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(foe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!b3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var moe=function(t,n){try{return b3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function U0(){const e=C.exports.useContext(Jm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function uN(){const e=Pv(),t=U0();return{...e,theme:t}}function voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function yoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function boe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return voe(o,l,a[u]??l);const h=`${e}.${l}`;return yoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function xoe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>yX(n),[n]);return te(PQ,{theme:i,children:[x(Soe,{root:t}),r]})}function Soe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(F4,{styles:n=>({[t]:n.__cssVars})})}VQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function woe(){const{colorMode:e}=Pv();return x(F4,{styles:t=>{const n=UR(t,"styles.global"),r=qR(n,{theme:t,colorMode:e});return r?SR(r)(t):void 0}})}var Coe=new Set([...SX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),_oe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function koe(e){return _oe.has(e)||!Coe.has(e)}var Eoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=jR(a,(g,m)=>CX(m)),l=qR(e,t),u=Object.assign({},i,l,GR(s),o),h=SR(u)(t.theme);return r?[h,r]:h};function CS(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=koe);const i=Eoe({baseStyle:n}),o=Dw(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:g}=Pv();return le.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function cN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=uN(),a=e?UR(i,`components.${e}`):void 0,s=n||a,l=ml({theme:i,colorMode:o},s?.defaultProps??{},GR(zQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=OX(s)(l);moe(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return cN(e,t)}function Ri(e,t={}){return cN(e,t)}function Poe(){const e=new Map;return new Proxy(CS,{apply(t,n,r){return CS(...r)},get(t,n){return e.has(n)||e.set(n,CS(n)),e.get(n)}})}var we=Poe();function Loe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Loe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Toe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Toe(n,t)})}}function Aoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function tL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Ioe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function nL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function rL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Ww=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,y5=e=>e,Moe=class{descendants=new Map;register=e=>{if(e!=null)return Ioe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=tL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=nL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=nL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=rL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=rL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=tL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Ooe(){const e=C.exports.useRef(new Moe);return Ww(()=>()=>e.current.destroy()),e.current}var[Roe,dN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Noe(e){const t=dN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Ww(()=>()=>{!i.current||t.unregister(i.current)},[]),Ww(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=y5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function fN(){return[y5(Roe),()=>y5(dN()),()=>Ooe(),i=>Noe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),iL={path:te("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??iL.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const b=a??iL.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function lt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function V4(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const B9=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),U4=C.exports.createContext({});function Doe(){return C.exports.useContext(U4).visualElement}const j0=C.exports.createContext(null),th=typeof document<"u",b5=th?C.exports.useLayoutEffect:C.exports.useEffect,hN=C.exports.createContext({strict:!1});function zoe(e,t,n,r){const i=Doe(),o=C.exports.useContext(hN),a=C.exports.useContext(j0),s=C.exports.useContext(B9).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return b5(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),b5(()=>()=>u&&u.notifyUnmount(),[]),u}function Wp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Boe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wp(n)&&(n.current=r))},[t])}function rv(e){return typeof e=="string"||Array.isArray(e)}function j4(e){return typeof e=="object"&&typeof e.start=="function"}const Foe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function G4(e){return j4(e.animate)||Foe.some(t=>rv(e[t]))}function pN(e){return Boolean(G4(e)||e.variants)}function $oe(e,t){if(G4(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rv(n)?n:void 0,animate:rv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Hoe(e){const{initial:t,animate:n}=$oe(e,C.exports.useContext(U4));return C.exports.useMemo(()=>({initial:t,animate:n}),[oL(t),oL(n)])}function oL(e){return Array.isArray(e)?e.join(" "):e}const nu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),iv={measureLayout:nu(["layout","layoutId","drag"]),animation:nu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:nu(["exit"]),drag:nu(["drag","dragControls"]),focus:nu(["whileFocus"]),hover:nu(["whileHover","onHoverStart","onHoverEnd"]),tap:nu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:nu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:nu(["whileInView","onViewportEnter","onViewportLeave"])};function Woe(e){for(const t in e)t==="projectionNodeConstructor"?iv.projectionNodeConstructor=e[t]:iv[t].Component=e[t]}function q4(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const vm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Voe=1;function Uoe(){return q4(()=>{if(vm.hasEverUpdated)return Voe++})}const F9=C.exports.createContext({});class joe extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const gN=C.exports.createContext({}),Goe=Symbol.for("motionComponentSymbol");function qoe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Woe(e);function a(l,u){const h={...C.exports.useContext(B9),...l,layoutId:Koe(l)},{isStatic:g}=h;let m=null;const v=Hoe(l),b=g?void 0:Uoe(),w=i(l,g);if(!g&&th){v.visualElement=zoe(o,w,h,t);const P=C.exports.useContext(hN).strict,E=C.exports.useContext(gN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,b,n||iv.projectionNodeConstructor,E))}return te(joe,{visualElement:v.visualElement,props:h,children:[m,x(U4.Provider,{value:v,children:r(o,l,b,Boe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Goe]=o,s}function Koe({layoutId:e}){const t=C.exports.useContext(F9).id;return t&&e!==void 0?t+"-"+e:e}function Yoe(e){function t(r,i={}){return qoe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Zoe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function $9(e){return typeof e!="string"||e.includes("-")?!1:!!(Zoe.indexOf(e)>-1||/[A-Z]/.test(e))}const x5={};function Xoe(e){Object.assign(x5,e)}const S5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Iv=new Set(S5);function mN(e,{layout:t,layoutId:n}){return Iv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x5[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,Qoe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Joe=(e,t)=>S5.indexOf(e)-S5.indexOf(t);function eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Joe);for(const s of t)a+=`${Qoe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function vN(e){return e.startsWith("--")}const tae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yN=(e,t)=>n=>Math.max(Math.min(n,t),e),ym=e=>e%1?Number(e.toFixed(5)):e,ov=/(-)?([\d]*\.?[\d])+/g,Vw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,nae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Mv(e){return typeof e=="string"}const nh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bm=Object.assign(Object.assign({},nh),{transform:yN(0,1)}),py=Object.assign(Object.assign({},nh),{default:1}),Ov=e=>({test:t=>Mv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Ov("deg"),wl=Ov("%"),St=Ov("px"),rae=Ov("vh"),iae=Ov("vw"),aL=Object.assign(Object.assign({},wl),{parse:e=>wl.parse(e)/100,transform:e=>wl.transform(e*100)}),H9=(e,t)=>n=>Boolean(Mv(n)&&nae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),bN=(e,t,n)=>r=>{if(!Mv(r))return r;const[i,o,a,s]=r.match(ov);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Mf={test:H9("hsl","hue"),parse:bN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wl.transform(ym(t))+", "+wl.transform(ym(n))+", "+ym(bm.transform(r))+")"},oae=yN(0,255),_S=Object.assign(Object.assign({},nh),{transform:e=>Math.round(oae(e))}),Wc={test:H9("rgb","red"),parse:bN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_S.transform(e)+", "+_S.transform(t)+", "+_S.transform(n)+", "+ym(bm.transform(r))+")"};function aae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Uw={test:H9("#"),parse:aae,transform:Wc.transform},to={test:e=>Wc.test(e)||Uw.test(e)||Mf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Mf.test(e)?Mf.parse(e):Uw.parse(e),transform:e=>Mv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Mf.transform(e)},xN="${c}",SN="${n}";function sae(e){var t,n,r,i;return isNaN(e)&&Mv(e)&&((n=(t=e.match(ov))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Vw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function wN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Vw);r&&(n=r.length,e=e.replace(Vw,xN),t.push(...r.map(to.parse)));const i=e.match(ov);return i&&(e=e.replace(ov,SN),t.push(...i.map(nh.parse))),{values:t,numColors:n,tokenised:e}}function CN(e){return wN(e).values}function _N(e){const{values:t,numColors:n,tokenised:r}=wN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function uae(e){const t=CN(e);return _N(e)(t.map(lae))}const yu={test:sae,parse:CN,createTransformer:_N,getAnimatableNone:uae},cae=new Set(["brightness","contrast","saturate","opacity"]);function dae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ov)||[];if(!r)return e;const i=n.replace(r,"");let o=cae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const fae=/([a-z-]*)\(.*?\)/g,jw=Object.assign(Object.assign({},yu),{getAnimatableNone:e=>{const t=e.match(fae);return t?t.map(dae).join(" "):e}}),sL={...nh,transform:Math.round},kN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:py,scaleX:py,scaleY:py,scaleZ:py,skew:Cc,skewX:Cc,skewY:Cc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:bm,originX:aL,originY:aL,originZ:St,zIndex:sL,fillOpacity:bm,strokeOpacity:bm,numOctaves:sL};function W9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(vN(m)){o[m]=v;continue}const b=kN[m],w=tae(v,b);if(Iv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=eae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const V9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function EN(e,t,n){for(const r in t)!Ss(t[r])&&!mN(r,n)&&(e[r]=t[r])}function hae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=V9();return W9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function pae(e,t,n){const r=e.style||{},i={};return EN(i,r,e),Object.assign(i,hae(e,t,n)),e.transformValues?e.transformValues(i):i}function gae(e,t,n){const r={},i=pae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const mae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],vae=["whileTap","onTap","onTapStart","onTapCancel"],yae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],bae=["whileInView","onViewportEnter","onViewportLeave","viewport"],xae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...bae,...vae,...mae,...yae]);function w5(e){return xae.has(e)}let PN=e=>!w5(e);function Sae(e){!e||(PN=t=>t.startsWith("on")?!w5(t):e(t))}try{Sae(require("@emotion/is-prop-valid").default)}catch{}function wae(e,t,n){const r={};for(const i in e)(PN(i)||n===!0&&w5(i)||!t&&!w5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function lL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Cae(e,t,n){const r=lL(t,e.x,e.width),i=lL(n,e.y,e.height);return`${r} ${i}`}const _ae={offset:"stroke-dashoffset",array:"stroke-dasharray"},kae={offset:"strokeDashoffset",array:"strokeDasharray"};function Eae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?_ae:kae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function U9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){W9(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Cae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Eae(g,o,a,s,!1)}const LN=()=>({...V9(),attrs:{}});function Pae(e,t){const n=C.exports.useMemo(()=>{const r=LN();return U9(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};EN(r,e.style,e),n.style={...r,...n.style}}return n}function Lae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=($9(n)?Pae:gae)(r,a,s),g={...wae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const TN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function AN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const IN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function MN(e,t,n,r){AN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(IN.has(i)?i:TN(i),t.attrs[i])}function j9(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||mN(r,e))&&(n[r]=t[r]);return n}function ON(e){const t=j9(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function G9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const av=e=>Array.isArray(e),Tae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),RN=e=>av(e)?e[e.length-1]||0:e;function x3(e){const t=Ss(e)?e.get():e;return Tae(t)?t.toValue():t}function Aae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Iae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const NN=e=>(t,n)=>{const r=C.exports.useContext(U4),i=C.exports.useContext(j0),o=()=>Aae(e,t,r,i);return n?o():q4(o)};function Iae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=x3(o[m]);let{initial:a,animate:s}=e;const l=G4(e),u=pN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!j4(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=G9(e,v);if(!b)return;const{transitionEnd:w,transition:P,...E}=b;for(const k in E){let L=E[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Mae={useVisualState:NN({scrapeMotionValuesFromProps:ON,createRenderState:LN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}U9(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),MN(t,n)}})},Oae={useVisualState:NN({scrapeMotionValuesFromProps:j9,createRenderState:V9})};function Rae(e,{forwardMotionProps:t=!1},n,r,i){return{...$9(e)?Mae:Oae,preloadedFeatures:n,useRender:Lae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function K4(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return K4(i,t,n,r)},[e,t,n,r])}function Nae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Gw(t,"focus",e?r:void 0),Gw(t,"blur",e?i:void 0)}function DN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function zN(e){return!!e.touches}function Dae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const zae={pageX:0,pageY:0};function Bae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||zae;return{x:r[t+"X"],y:r[t+"Y"]}}function Fae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function q9(e,t="page"){return{point:zN(e)?Bae(e,t):Fae(e,t)}}const BN=(e,t=!1)=>{const n=r=>e(r,q9(r));return t?Dae(n):n},$ae=()=>th&&window.onpointerdown===null,Hae=()=>th&&window.ontouchstart===null,Wae=()=>th&&window.onmousedown===null,Vae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Uae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function FN(e){return $ae()?e:Hae()?Uae[e]:Wae()?Vae[e]:e}function o0(e,t,n,r){return K4(e,FN(t),BN(n,t==="pointerdown"),r)}function C5(e,t,n,r){return Gw(e,FN(t),n&&BN(n,t==="pointerdown"),r)}function $N(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const uL=$N("dragHorizontal"),cL=$N("dragVertical");function HN(e){let t=!1;if(e==="y")t=cL();else if(e==="x")t=uL();else{const n=uL(),r=cL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function WN(){const e=HN(!0);return e?(e(),!1):!0}function dL(e,t,n){return(r,i)=>{!DN(r)||WN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function jae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){C5(r,"pointerenter",e||n?dL(r,!0,e):void 0,{passive:!e}),C5(r,"pointerleave",t||n?dL(r,!1,t):void 0,{passive:!t})}const VN=(e,t)=>t?e===t?!0:VN(e,t.parentElement):!1;function K9(e){return C.exports.useEffect(()=>()=>e(),[])}function UN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),kS=.001,qae=.01,fL=10,Kae=.05,Yae=1;function Zae({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Gae(e<=fL*1e3);let a=1-t;a=k5(Kae,Yae,a),e=k5(qae,fL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=qw(u,a),b=Math.exp(-g);return kS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=qw(Math.pow(u,2),a);return(-i(u)+kS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-kS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=Qae(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Xae=12;function Qae(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function tse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!hL(e,ese)&&hL(e,Jae)){const n=Zae(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Y9(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=UN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=tse(o),v=pL,b=pL;function w(){const P=h?-(h/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=qw(L,k);v=O=>{const N=Math.exp(-k*L*O);return n-N*((P+k*L*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const N=Math.exp(-k*L*O);return k*L*N*(Math.sin(I*O)*(P+k*L*E)/I+E*Math.cos(I*O))-N*(Math.cos(I*O)*(P+k*L*E)-I*E*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(E+(P+L*E)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const N=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-N*((P+k*L*E)*Math.sinh(D)+I*E*Math.cosh(D))/I}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=g;else{const k=b(P)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=L&&I}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}Y9.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const pL=e=>0,sv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function ES(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=ES(l,s,e+1/3),o=ES(l,s,e),a=ES(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const nse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},rse=[Uw,Wc,Mf],mL=e=>rse.find(t=>t.test(e)),jN=(e,t)=>{let n=mL(e),r=mL(t),i=n.parse(e),o=r.parse(t);n===Mf&&(i=gL(i),n=Wc),r===Mf&&(o=gL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=nse(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Kw=e=>typeof e=="number",ise=(e,t)=>n=>t(e(n)),Y4=(...e)=>e.reduce(ise);function GN(e,t){return Kw(e)?n=>_r(e,t,n):to.test(e)?jN(e,t):KN(e,t)}const qN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>GN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=GN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function vL(e){const t=yu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=yu.createTransformer(t),r=vL(e),i=vL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Y4(qN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ase=(e,t)=>n=>_r(e,t,n);function sse(e){if(typeof e=="number")return ase;if(typeof e=="string")return to.test(e)?jN:KN;if(Array.isArray(e))return qN;if(typeof e=="object")return ose}function lse(e,t,n){const r=[],i=n||sse(e[0]),o=e.length-1;for(let a=0;an(sv(e,t,r))}function cse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=sv(e[o],e[o+1],i);return t[o](s)}}function YN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;_5(o===t.length),_5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=lse(t,r,i),s=o===2?use(e,a):cse(e,a);return n?l=>s(k5(e[0],e[o-1],l)):s}const Z4=e=>t=>1-e(1-t),Z9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dse=e=>t=>Math.pow(t,e),ZN=e=>t=>t*t*((e+1)*t-e),fse=e=>{const t=ZN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},XN=1.525,hse=4/11,pse=8/11,gse=9/10,X9=e=>e,Q9=dse(2),mse=Z4(Q9),QN=Z9(Q9),JN=e=>1-Math.sin(Math.acos(e)),J9=Z4(JN),vse=Z9(J9),e7=ZN(XN),yse=Z4(e7),bse=Z9(e7),xse=fse(XN),Sse=4356/361,wse=35442/1805,Cse=16061/1805,E5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-E5(1-e*2)):.5*E5(e*2-1)+.5;function Ese(e,t){return e.map(()=>t||QN).splice(0,e.length-1)}function Pse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Lse(e,t){return e.map(n=>n*t)}function S3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Lse(r&&r.length===a.length?r:Pse(a),i);function l(){return YN(s,a,{ease:Array.isArray(n)?n:Ese(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Tse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const yL={keyframes:S3,spring:Y9,decay:Tse};function Ase(e){if(Array.isArray(e.to))return S3;if(yL[e.type])return yL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Y9:S3}const eD=1/60*1e3,Ise=typeof performance<"u"?()=>performance.now():()=>Date.now(),tD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ise()),eD);function Mse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Mse(()=>lv=!0),e),{}),Rse=Rv.reduce((e,t)=>{const n=X4[t];return e[t]=(r,i=!1,o=!1)=>(lv||zse(),n.schedule(r,i,o)),e},{}),Nse=Rv.reduce((e,t)=>(e[t]=X4[t].cancel,e),{});Rv.reduce((e,t)=>(e[t]=()=>X4[t].process(a0),e),{});const Dse=e=>X4[e].process(a0),nD=e=>{lv=!1,a0.delta=Yw?eD:Math.max(Math.min(e-a0.timestamp,Ose),1),a0.timestamp=e,Zw=!0,Rv.forEach(Dse),Zw=!1,lv&&(Yw=!1,tD(nD))},zse=()=>{lv=!0,Yw=!0,Zw||tD(nD)},Bse=()=>a0;function rD(e,t,n=0){return e-t-n}function Fse(e,t,n=0,r=!0){return r?rD(t+-e,t,n):t-(e-t)+n}function $se(e,t,n,r){return r?e>=t+n:e<=-n}const Hse=e=>{const t=({delta:n})=>e(n);return{start:()=>Rse.update(t,!0),stop:()=>Nse.update(t)}};function iD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Hse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=UN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,k=0,L=w.duration,I,O=!1,N=!0,D;const z=Ase(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(D=YN([0,100],[r,P],{clamp:!1}),r=0,P=100);const H=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){k++,l==="reverse"?(N=k%2===0,a=Fse(a,L,u,N)):(a=rD(a,L,u),l==="mirror"&&H.flipTarget()),O=!1,v&&v()}function Y(){E.stop(),m&&m()}function de(ne){if(N||(ne=-ne),a+=ne,!O){const ie=H.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=N?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),E.stop()}}}function oD(e,t){return t?e*(1e3/t):0}function Wse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function P(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:P(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=P(L),O=I===n?-1:1;let N,D;const z=H=>{N=D,D=H,t=oD(H-N,Bse().delta),(O===1&&H>I||O===-1&&Hb?.stop()}}const Xw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),bL=e=>Xw(e)&&e.hasOwnProperty("z"),gy=(e,t)=>Math.abs(e-t);function t7(e,t){if(Kw(e)&&Kw(t))return gy(e,t);if(Xw(e)&&Xw(t)){const n=gy(e.x,t.x),r=gy(e.y,t.y),i=bL(e)&&bL(t)?gy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const aD=(e,t)=>1-3*t+3*e,sD=(e,t)=>3*t-6*e,lD=e=>3*e,P5=(e,t,n)=>((aD(t,n)*e+sD(t,n))*e+lD(t))*e,uD=(e,t,n)=>3*aD(t,n)*e*e+2*sD(t,n)*e+lD(t),Vse=1e-7,Use=10;function jse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=P5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Vse&&++s=qse?Kse(a,g,e,n):m===0?g:jse(a,s,s+my,e,n)}return a=>a===0||a===1?a:P5(o(a),t,r)}function Zse({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!WN()}function g(b,w){!h()||(VN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=Y4(o0(window,"pointerup",g,l),o0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}C5(i,"pointerdown",o?v:void 0,l),K9(u)}const Xse="production",cD=typeof process>"u"||process.env===void 0?Xse:"production",xL=new Set;function dD(e,t,n){e||xL.has(t)||(console.warn(t),n&&console.warn(n),xL.add(t))}const Qw=new WeakMap,PS=new WeakMap,Qse=e=>{const t=Qw.get(e.target);t&&t(e)},Jse=e=>{e.forEach(Qse)};function ele({root:e,...t}){const n=e||document;PS.has(n)||PS.set(n,{});const r=PS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Jse,{root:e,...t})),r[i]}function tle(e,t,n){const r=ele(t);return Qw.set(e,n),r.observe(e),()=>{Qw.delete(e),r.unobserve(e)}}function nle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ole:ile)(a,o.current,e,i)}const rle={some:0,all:1};function ile(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:rle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return tle(n.getInstance(),s,l)},[e,r,i,o])}function ole(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(cD!=="production"&&dD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),ale={inView:Vc(nle),tap:Vc(Zse),focus:Vc(Nae),hover:Vc(jae)};function n7(){const e=C.exports.useContext(j0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function sle(){return lle(C.exports.useContext(j0))}function lle(e){return e===null?!0:e.isPresent}function fD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,ule={linear:X9,easeIn:Q9,easeInOut:QN,easeOut:mse,circIn:JN,circInOut:vse,circOut:J9,backIn:e7,backInOut:bse,backOut:yse,anticipate:xse,bounceIn:_se,bounceInOut:kse,bounceOut:E5},SL=e=>{if(Array.isArray(e)){_5(e.length===4);const[t,n,r,i]=e;return Yse(t,n,r,i)}else if(typeof e=="string")return ule[e];return e},cle=e=>Array.isArray(e)&&typeof e[0]!="number",wL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&yu.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),vy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LS=()=>({type:"keyframes",ease:"linear",duration:.3}),dle=e=>({type:"keyframes",duration:.8,values:e}),CL={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:vy,scaleY:vy,scale:vy,opacity:LS,backgroundColor:LS,color:LS,default:vy},fle=(e,t)=>{let n;return av(t)?n=dle:n=CL[e]||CL.default,{to:t,...n(t)}},hle={...kN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:jw,WebkitFilter:jw},r7=e=>hle[e];function i7(e,t){var n;let r=r7(e);return r!==jw&&(r=yu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const ple={current:!1},hD=1/60*1e3,gle=typeof performance<"u"?()=>performance.now():()=>Date.now(),pD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(gle()),hD);function mle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=mle(()=>uv=!0),e),{}),ws=Nv.reduce((e,t)=>{const n=Q4[t];return e[t]=(r,i=!1,o=!1)=>(uv||ble(),n.schedule(r,i,o)),e},{}),Kf=Nv.reduce((e,t)=>(e[t]=Q4[t].cancel,e),{}),TS=Nv.reduce((e,t)=>(e[t]=()=>Q4[t].process(s0),e),{}),yle=e=>Q4[e].process(s0),gD=e=>{uv=!1,s0.delta=Jw?hD:Math.max(Math.min(e-s0.timestamp,vle),1),s0.timestamp=e,eC=!0,Nv.forEach(yle),eC=!1,uv&&(Jw=!1,pD(gD))},ble=()=>{uv=!0,Jw=!0,eC||pD(gD)},tC=()=>s0;function mD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Kf.read(r),e(o-t))};return ws.read(r,!0),()=>Kf.read(r)}function xle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Sle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=L5(o.duration)),o.repeatDelay&&(a.repeatDelay=L5(o.repeatDelay)),e&&(a.ease=cle(e)?e.map(SL):SL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function wle(e,t){var n,r;return(r=(n=(o7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Cle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function _le(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Cle(t),xle(e)||(e={...e,...fle(n,t.to)}),{...t,...Sle(e)}}function kle(e,t,n,r,i){const o=o7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=wL(e,n);a==="none"&&s&&typeof n=="string"?a=i7(e,n):_L(a)&&typeof n=="string"?a=kL(n):!Array.isArray(n)&&_L(n)&&typeof a=="string"&&(n=kL(a));const l=wL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Wse({...g,...o}):iD({..._le(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=RN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function _L(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function kL(e){return typeof e=="number"?0:i7("",e)}function o7(e,t){return e[t]||e.default||e}function a7(e,t,n,r={}){return ple.current&&(r={type:!1}),t.start(i=>{let o;const a=kle(e,t,n,r,i),s=wle(r,e),l=()=>o=a();let u;return s?u=mD(l,L5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ele=e=>/^\-?\d*\.?\d+$/.test(e),Ple=e=>/^0[^.\s]+$/.test(e);function s7(e,t){e.indexOf(t)===-1&&e.push(t)}function l7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class xm{constructor(){this.subscriptions=[]}add(t){return s7(this.subscriptions,t),()=>l7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new xm,this.velocityUpdateSubscribers=new xm,this.renderSubscribers=new xm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=tC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Lle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?oD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function T0(e){return new Tle(e)}const vD=e=>t=>t.test(e),Ale={test:e=>e==="auto",parse:e=>e},yD=[nh,St,wl,Cc,iae,rae,Ale],Cg=e=>yD.find(vD(e)),Ile=[...yD,to,yu],Mle=e=>Ile.find(vD(e));function Ole(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Rle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function J4(e,t,n){const r=e.getProps();return G9(r,t,n!==void 0?n:r.custom,Ole(e),Rle(e))}function Nle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,T0(n))}function Dle(e,t){const n=J4(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=RN(o[a]);Nle(e,a,s)}}function zle(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;snC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=nC(e,t,n);else{const i=typeof t=="function"?J4(e,t,n.custom):t;r=bD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function nC(e,t,n={}){var r;const i=J4(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>bD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Hle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function bD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Vle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Iv.has(m)&&(w={...w,type:!1,delay:0});let P=a7(m,v,b,w);T5(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&Dle(e,s)})}function Hle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Wle).forEach((u,h)=>{a.push(nC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Wle(e,t){return e.sortNodePosition(t)}function Vle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const u7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Ule=[...u7].reverse(),jle=u7.length;function Gle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$le(e,n,r)))}function qle(e){let t=Gle(e);const n=Yle();let r=!0;const i=(l,u)=>{const h=J4(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},P=1/0;for(let k=0;kP&&N;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,ne={...j,...de},ie=J=>{W=!0,b.delete(J),I.needsAnimating[J]=!0};for(const J in ne){const q=de[J],V=j[J];w.hasOwnProperty(J)||(q!==V?av(q)&&av(V)?!fD(q,V)||H?ie(J):I.protectedKeys[J]=!0:q!==void 0?ie(J):b.add(J):q!==void 0&&b.has(J)?ie(J):I.protectedKeys[J]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...Y.map(J=>({animation:J,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let E=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Kle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yle(){return{[jn.Animate]:hf(!0),[jn.InView]:hf(),[jn.Hover]:hf(),[jn.Tap]:hf(),[jn.Drag]:hf(),[jn.Focus]:hf(),[jn.Exit]:hf()}}const Zle={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=qle(e)),j4(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=n7(),o=C.exports.useContext(j0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class xD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=IS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=t7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=tC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=AS(h,this.transformPagePoint),DN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=IS(AS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},zN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=q9(t),o=AS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=tC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,IS(o,this.history)),this.removeListeners=Y4(o0(window,"pointermove",this.handlePointerMove),o0(window,"pointerup",this.handlePointerUp),o0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Kf.update(this.updatePoint)}}function AS(e,t){return t?{point:t(e.point)}:e}function EL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function IS({point:e},t){return{point:e,delta:EL(e,SD(t)),offset:EL(e,Xle(t)),velocity:Qle(t,.1)}}function Xle(e){return e[0]}function SD(e){return e[e.length-1]}function Qle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=SD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>L5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function PL(e,t=0,n=.01){return t7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function IL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tue(e,{top:t,left:n,bottom:r,right:i}){return{x:IL(e.x,n,i),y:IL(e.y,t,r)}}function ML(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=sv(t.min,t.max-r,e.min):r>i&&(n=sv(e.min,e.max-i,t.min)),k5(0,1,n)}function iue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const rC=.35;function oue(e=rC){return e===!1?e=0:e===!0&&(e=rC),{x:OL(e,"left","right"),y:OL(e,"top","bottom")}}function OL(e,t,n){return{min:RL(e,t),max:RL(e,n)}}function RL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const NL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Cm=()=>({x:NL(),y:NL()}),DL=()=>({min:0,max:0}),ki=()=>({x:DL(),y:DL()});function sl(e){return[e("x"),e("y")]}function wD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function sue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function MS(e){return e===void 0||e===1}function iC({scale:e,scaleX:t,scaleY:n}){return!MS(e)||!MS(t)||!MS(n)}function yf(e){return iC(e)||CD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function CD(e){return zL(e.x)||zL(e.y)}function zL(e){return e&&e!=="0%"}function A5(e,t,n){const r=e-n,i=t*r;return n+i}function BL(e,t,n,r,i){return i!==void 0&&(e=A5(e,i,r)),A5(e,n,r)+t}function oC(e,t=0,n=1,r,i){e.min=BL(e.min,t,n,r,i),e.max=BL(e.max,t,n,r,i)}function _D(e,{x:t,y:n}){oC(e.x,t.translate,t.scale,t.originPoint),oC(e.y,n.translate,n.scale,n.originPoint)}function lue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(q9(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=HN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let P=this.getAxisMotionValue(v).get()||0;if(wl.test(P)){const E=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=la(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=pue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new xD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Wp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tue(r.actual,t):this.constraints=!1,this.elastic=oue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=iue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=due(r,i.root,this.visualElement.getTransformPagePoint());let a=nue(i.layout.actual,o);if(n){const s=n(aue(a));this.hasMutatedConstraints=!!s,s&&(a=wD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!yy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return a7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!yy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=rue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!yy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;fue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=o0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=K4(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=rC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function yy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function gue(e){const{dragControls:t,visualElement:n}=e,r=q4(()=>new hue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function mue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(B9),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new xD(h,l,{transformPagePoint:s})}C5(i,"pointerdown",o&&u),K9(()=>a.current&&a.current.end())}const vue={pan:Vc(mue),drag:Vc(gue)},aC={current:null},ED={current:!1};function yue(){if(ED.current=!0,!!th)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>aC.current=e.matches;e.addListener(t),t()}else aC.current=!1}const by=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function bue(){const e=by.map(()=>new xm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{by.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+by[i]]=o=>r.add(o),n["notify"+by[i]]=(...o)=>r.notify(...o)}),n}function xue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),T5(r)&&r.add(i);else if(Ss(a))e.addValue(i,T0(o)),T5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,T0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const PD=Object.keys(iv),Sue=PD.length,LD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:k,renderState:L}=b;let I;const O=bue(),N=new Map,D=new Map;let z={};const H={...k},W=g.initial?{...k}:{};let Y;function de(){!I||!E||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,P,g)}function ne(){O.notifyUpdate(k)}function ie(X,me){const xe=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(ne,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{xe(),Se()})}const{willChange:J,...q}=u(g);for(const X in q){const me=q[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),T5(J)&&J.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const V=G4(g),G=pN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:G?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){E=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),G&&h&&!V&&(Y=h?.addVariantChild(Q)),N.forEach((me,xe)=>ie(xe,me)),ED.current||yue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:aC.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Kf.update(ne),Kf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,xe,Se,He,Ue){const ut=[];for(let Xe=0;XeQ.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:Ue,layoutScroll:At})}return ut},addVariantChild(X){var me;const xe=Q.getClosestVariantNode();if(xe)return(me=xe.variantChildren)===null||me===void 0||me.add(X),()=>xe.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>G?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),N.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;N.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>N.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let xe=N.get(X);return xe===void 0&&me!==void 0&&(xe=T0(me),Q.addValue(X,xe)),xe},forEachValue:X=>N.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,P),setBaseTarget(X,me){H[X]=me},getBaseTarget(X){var me;const{initial:xe}=g,Se=typeof xe=="string"||typeof xe=="object"?(me=G9(g,xe))===null||me===void 0?void 0:me[X]:void 0;if(xe&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return W[X]!==void 0&&Se===void 0?void 0:H[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=xue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!V){const xe=h?.getVariantContext()||{};return g.initial!==void 0&&(xe.initial=g.initial),xe}const me={};for(let xe=0;xe{const o=i.get();if(!sC(o))return;const a=lC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!sC(o))continue;const a=lC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const kue=new Set(["width","height","top","left","right","bottom","x","y"]),ID=e=>kue.has(e),Eue=e=>Object.keys(e).some(ID),MD=(e,t)=>{e.set(t,!1),e.set(t)},$L=e=>e===nh||e===St;var HL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(HL||(HL={}));const WL=(e,t)=>parseFloat(e.split(", ")[t]),VL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return WL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?WL(o[1],e):0}},Pue=new Set(["x","y","z"]),Lue=S5.filter(e=>!Pue.has(e));function Tue(e){const t=[];return Lue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const UL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:VL(4,13),y:VL(5,14)},Aue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=UL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);MD(h,s[u]),e[u]=UL[u](l,o)}),e},Iue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(ID);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Cg(h);const m=t[l];let v;if(av(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Cg(h);for(let P=w;P=0?window.pageYOffset:null,u=Aue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),th&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Mue(e,t,n,r){return Eue(t)?Iue(e,t,n,r):{target:t,transitionEnd:r}}const Oue=(e,t,n,r)=>{const i=_ue(e,t,r);return t=i.target,r=i.transitionEnd,Mue(e,t,n,r)};function Rue(e){return window.getComputedStyle(e)}const OD={treeType:"dom",readValueFromInstance(e,t){if(Iv.has(t)){const n=r7(t);return n&&n.default||0}else{const n=Rue(e),r=(vN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return kD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Fle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){zle(e,r,a);const s=Oue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:j9,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),W9(t,n,r,i.transformTemplate)},render:AN},Nue=LD(OD),Due=LD({...OD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Iv.has(t)?((n=r7(t))===null||n===void 0?void 0:n.default)||0:(t=IN.has(t)?t:TN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:ON,build(e,t,n,r,i){U9(t,n,r,i.transformTemplate)},render:MN}),zue=(e,t)=>$9(e)?Due(t,{enableHardwareAcceleration:!1}):Nue(t,{enableHardwareAcceleration:!0});function jL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _g={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=jL(e,t.target.x),r=jL(e,t.target.y);return`${n}% ${r}%`}},GL="_$css",Bue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(AD,v=>(o.push(v),GL)));const a=yu.parse(e);if(a.length>5)return r;const s=yu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(GL,()=>{const b=o[v];return v++,b})}return m}};class Fue extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Xoe(Hue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),vm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function $ue(e){const[t,n]=n7(),r=C.exports.useContext(F9);return x(Fue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(gN),isPresent:t,safeToRemove:n})}const Hue={borderRadius:{..._g,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_g,borderTopRightRadius:_g,borderBottomLeftRadius:_g,borderBottomRightRadius:_g,boxShadow:Bue},Wue={measureLayout:$ue};function Vue(e,t,n={}){const r=Ss(e)?e:T0(e);return a7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const RD=["TopLeft","TopRight","BottomLeft","BottomRight"],Uue=RD.length,qL=e=>typeof e=="string"?parseFloat(e):e,KL=e=>typeof e=="number"||St.test(e);function jue(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Gue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,que(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(sv(e,t,r))}function ZL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){ZL(e.x,t.x),ZL(e.y,t.y)}function XL(e,t,n,r,i){return e-=t,e=A5(e,1/n,r),i!==void 0&&(e=A5(e,1/i,r)),e}function Kue(e,t=0,n=1,r=.5,i,o=e,a=e){if(wl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=XL(e.min,t,n,s,i),e.max=XL(e.max,t,n,s,i)}function QL(e,t,[n,r,i],o,a){Kue(e,t[n],t[r],t[i],t.scale,o,a)}const Yue=["x","scaleX","originX"],Zue=["y","scaleY","originY"];function JL(e,t,n,r){QL(e.x,t,Yue,n?.x,r?.x),QL(e.y,t,Zue,n?.y,r?.y)}function eT(e){return e.translate===0&&e.scale===1}function DD(e){return eT(e.x)&&eT(e.y)}function zD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function tT(e){return la(e.x)/la(e.y)}function Xue(e,t,n=.1){return t7(e,t)<=n}class Que{constructor(){this.members=[]}add(t){s7(this.members,t),t.scheduleRender()}remove(t){if(l7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Jue="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function nT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Jue?"none":o}const ece=(e,t)=>e.depth-t.depth;class tce{constructor(){this.children=[],this.isDirty=!1}add(t){s7(this.children,t),this.isDirty=!0}remove(t){l7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ece),this.isDirty=!1,this.children.forEach(t)}}const rT=["","X","Y","Z"],iT=1e3;function BD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(ace),this.nodes.forEach(sce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=mD(v,250),vm.hasAnimatedSinceResize&&(vm.hasAnimatedSinceResize=!1,this.nodes.forEach(aT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var P,E,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(P=this.options.transition)!==null&&P!==void 0?P:g.getDefaultTransition())!==null&&E!==void 0?E:fce,{onLayoutAnimationStart:N,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!zD(this.targetLayout,w)||b,H=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,H);const W={...o7(O,"layout"),onPlay:N,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&aT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Kf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(lce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));cT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=E/1e3;sT(m.x,a.x,L),sT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(wm(v,this.layout.actual,this.relativeParent.layout.actual),cce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,jue(g,h,this.latestValues,L,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Kf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{vm.hasAnimatedSinceResize=!0,this.currentAnimation=Vue(0,iT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,iT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&FD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Vp(s,h),Sm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Que),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(oT),this.root.sharedNodes.clear()}}}function nce(e){e.updateLayout()}function rce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):FD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Cm();Sm(l,o,i.layout);const u=Cm();i.isShared?Sm(u,e.applyTransform(a,!0),i.measured):Sm(u,o,i.layout);const h=!DD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();wm(b,i.layout,m.layout);const w=ki();wm(w,o,v.actual),zD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function ice(e){e.clearSnapshot()}function oT(e){e.clearMeasurements()}function oce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function aT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function ace(e){e.resolveTargetDelta()}function sce(e){e.calcProjection()}function lce(e){e.resetRotation()}function uce(e){e.removeLeadSnapshot()}function sT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function cce(e,t,n,r){lT(e.x,t.x,n.x,r),lT(e.y,t.y,n.y,r)}function dce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const fce={duration:.45,ease:[.4,0,.1,1]};function hce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function uT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function cT(e){uT(e.x),uT(e.y)}function FD(e,t,n){return e==="position"||e==="preserve-aspect"&&!Xue(tT(t),tT(n),.2)}const pce=BD({attachResizeListener:(e,t)=>K4(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),OS={current:void 0},gce=BD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!OS.current){const e=new pce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),OS.current=e}return OS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),mce={...Zle,...ale,...vue,...Wue},Ml=Yoe((e,t)=>Rae(e,t,mce,zue,gce));function $D(){const e=C.exports.useRef(!1);return b5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vce(){const e=$D(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class yce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(yce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const RS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=q4(xce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(bce,{isPresent:n,children:e})),x(j0.Provider,{value:u,children:e})};function xce(){return new Map}const Pp=e=>e.key||"";function Sce(e,t){e.forEach(n=>{const r=Pp(n);t.set(r,n)})}function wce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",dD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=vce();const l=C.exports.useContext(F9).forceRender;l&&(s=l);const u=$D(),h=wce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(b5(()=>{w.current=!1,Sce(h,b),v.current=g}),K9(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Xn,{children:g.map(L=>x(RS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Pp(L)))});g=[...g];const P=v.current.map(Pp),E=h.map(Pp),k=P.length;for(let L=0;L{if(E.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=P.indexOf(L),N=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(RS,{isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:o,mode:a,children:I},Pp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(RS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Pp(L))}),cD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Xn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function uC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Cce(){return!1}var _ce=e=>{const{condition:t,message:n}=e;t&&Cce()&&console.warn(n)},Of={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},kg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function cC(e){switch(e?.direction??"right"){case"right":return kg.slideRight;case"left":return kg.slideLeft;case"bottom":return kg.slideDown;case"top":return kg.slideUp;default:return kg.slideRight}}var Bf={enter:{duration:.2,ease:Of.easeOut},exit:{duration:.1,ease:Of.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},kce=e=>e!=null&&parseInt(e.toString(),10)>0,fT={exit:{height:{duration:.2,ease:Of.ease},opacity:{duration:.3,ease:Of.ease}},enter:{height:{duration:.3,ease:Of.ease},opacity:{duration:.4,ease:Of.ease}}},Ece={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:kce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(fT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(fT.enter,i)})},WD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),_ce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Ml.div,{ref:t,...g,className:Dv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Ece,initial:r?"exit":!1,animate:E,exit:"exit"})})});WD.displayName="Collapse";var Pce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter(Bf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit(Bf.exit,n),transitionEnd:t?.exit})},VD={initial:"exit",animate:"enter",exit:"exit",variants:Pce},Lce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:g&&le.createElement(Ml.div,{ref:n,className:Dv("chakra-fade",o),custom:m,...VD,animate:h,...u})})});Lce.displayName="Fade";var Tce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit(Bf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter(Bf.enter,n),transitionEnd:e?.enter})},UD={initial:"exit",animate:"enter",exit:"exit",variants:Tce},Ace=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:b,children:m&&le.createElement(Ml.div,{ref:n,className:Dv("chakra-offset-slide",s),...UD,animate:v,custom:b,...g})})});Ace.displayName="ScaleFade";var hT={exit:{duration:.15,ease:Of.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Ice={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=cC({direction:e});return{...i,transition:t?.exit??Cs.exit(hT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=cC({direction:e});return{...i,transition:n?.enter??Cs.enter(hT.enter,r),transitionEnd:t?.enter}}},jD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=cC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Ml.div,{...m,ref:n,initial:"exit",className:Dv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:Ice,style:b,...g})})});jD.displayName="Slide";var Mce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit(Bf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter(Bf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit(Bf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},dC={initial:"initial",animate:"enter",exit:"exit",variants:Mce},Oce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(pd,{custom:w,children:v&&le.createElement(Ml.div,{ref:n,className:Dv("chakra-offset-slide",a),custom:w,...dC,animate:b,...m})})});Oce.displayName="SlideFade";var zv=(...e)=>e.filter(Boolean).join(" ");function Rce(){return!1}var eb=e=>{const{condition:t,message:n}=e;t&&Rce()&&console.warn(n)};function NS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Nce,tb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Dce,c7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[zce,jke,Bce,Fce]=fN(),Oc=Pe(function(t,n){const{getButtonProps:r}=c7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...tb().button};return le.createElement(we.button,{...i,className:zv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function $ce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Vce(e),Uce(e);const s=Bce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=V4({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(k=>k!==v);g(E)}else P?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Hce,d7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Wce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=d7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;jce(e);const{register:m,index:v,descendants:b}=Fce({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Gce({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},k=()=>{P?.(!1)},L=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),I=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),N=C.exports.useCallback(function(H={},W=null){return{...H,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:NS(H.onClick,L),onFocus:NS(H.onFocus,O),onKeyDown:NS(H.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function(H={},W=null){return{...H,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:N,getPanelProps:D,htmlProps:i}}function Vce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;eb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Uce(e){eb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function jce(e){eb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Gce(e){eb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=c7(),{reduceMotion:r}=d7(),i=zv("chakra-accordion__icon",e.className),o=tb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Wce(t),l={...tb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(Dce,{value:u},le.createElement(we.div,{ref:n,...o,className:zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=d7(),{getPanelProps:s,isOpen:l}=c7(),u=s(o,n),h=zv("chakra-accordion__panel",r),g=tb();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(WD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var nb=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=$ce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(zce,{value:l},le.createElement(Hce,{value:h},le.createElement(Nce,{value:o},le.createElement(we.div,{ref:i,...s,className:zv("chakra-accordion",r.className),__css:o.root},t))))});nb.displayName="Accordion";var qce=(...e)=>e.filter(Boolean).join(" "),Kce=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Bv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=qce("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Kce} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Bv.displayName="Spinner";var rb=(...e)=>e.filter(Boolean).join(" ");function Yce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Zce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function pT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Xce,Qce]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Jce,f7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),GD={info:{icon:Zce,colorScheme:"blue"},warning:{icon:pT,colorScheme:"orange"},success:{icon:Yce,colorScheme:"green"},error:{icon:pT,colorScheme:"red"},loading:{icon:Bv,colorScheme:"blue"}};function ede(e){return GD[e].colorScheme}function tde(e){return GD[e].icon}var qD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??ede(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Xce,{value:{status:r}},le.createElement(Jce,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:rb("chakra-alert",t.className),__css:l})))});qD.displayName="Alert";var KD=Pe(function(t,n){const i={display:"inline",...f7().description};return le.createElement(we.div,{ref:n,...t,className:rb("chakra-alert__desc",t.className),__css:i})});KD.displayName="AlertDescription";function YD(e){const{status:t}=Qce(),n=tde(t),r=f7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:rb("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}YD.displayName="AlertIcon";var ZD=Pe(function(t,n){const r=f7();return le.createElement(we.div,{ref:n,...t,className:rb("chakra-alert__title",t.className),__css:r.title})});ZD.displayName="AlertTitle";function nde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function rde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ide=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",I5=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});I5.displayName="NativeImage";var ib=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=rde({...t,ignoreFallback:P}),k=ide(E,m),L={ref:n,objectFit:l,objectPosition:s,...P?b:nde(b,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:I5,className:"chakra-image__placeholder",src:r,...L}):le.createElement(we.img,{as:I5,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ib.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:I5,className:"chakra-image",...e}));function ob(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var ab=(...e)=>e.filter(Boolean).join(" "),gT=e=>e?"":void 0,[ode,ade]=Cn({strict:!1,name:"ButtonGroupContext"});function fC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=ab("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}fC.displayName="ButtonIcon";function hC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Bv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=ab("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}hC.displayName="ButtonSpinner";function sde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=ade(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:P,...E}=vn(e),k=C.exports.useMemo(()=>{const N={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:N}}},[r,n]),{ref:L,type:I}=sde(P),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return le.createElement(we.button,{disabled:i||o,ref:Aoe(t,L),as:P,type:m??I,"data-active":gT(a),"data-loading":gT(o),__css:k,className:ab("chakra-button",w),...E},o&&b==="start"&&x(hC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||le.createElement(we.span,{opacity:0},x(mT,{...O})):x(mT,{...O}),o&&b==="end"&&x(hC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function mT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return te(Xn,{children:[t&&x(fC,{marginEnd:i,children:t}),r,n&&x(fC,{marginStart:i,children:n})]})}var Eo=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=ab("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(ode,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Eo.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var K0=(...e)=>e.filter(Boolean).join(" "),xy=e=>e?"":void 0,DS=e=>e?!0:void 0;function vT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[lde,XD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ude,Y0]=Cn({strict:!1,name:"FormControlContext"});function cde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,H=>{!H||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":xy(P),"data-disabled":xy(i),"data-invalid":xy(r),"data-readonly":xy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,P,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,H=>{!H||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),N=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:N}}var gd=Pe(function(t,n){const r=Ri("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=cde(i),l=K0("chakra-form-control",t.className);return le.createElement(ude,{value:s},le.createElement(lde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var dde=Pe(function(t,n){const r=Y0(),i=XD(),o=K0("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});dde.displayName="FormHelperText";function h7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=p7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":DS(n),"aria-required":DS(i),"aria-readonly":DS(r)}}function p7(e){const t=Y0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:vT(t?.onFocus,h),onBlur:vT(t?.onBlur,g)}}var[fde,hde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),pde=Pe((e,t)=>{const n=Ri("FormError",e),r=vn(e),i=Y0();return i?.isInvalid?le.createElement(fde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:K0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});pde.displayName="FormErrorMessage";var gde=Pe((e,t)=>{const n=hde(),r=Y0();if(!r?.isInvalid)return null;const i=K0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});gde.displayName="FormErrorIcon";var rh=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(QD,{}),optionalIndicator:l=null,...u}=i,h=Y0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...g,className:K0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});rh.displayName="FormLabel";var QD=Pe(function(t,n){const r=Y0(),i=XD();if(!r?.isRequired)return null;const o=K0("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});QD.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var g7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mde=we("span",{baseStyle:g7});mde.displayName="VisuallyHidden";var vde=we("input",{baseStyle:g7});vde.displayName="VisuallyHiddenInput";var yT=!1,sb=null,A0=!1,pC=new Set,yde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function bde(e){return!(e.metaKey||!yde&&e.altKey||e.ctrlKey)}function m7(e,t){pC.forEach(n=>n(e,t))}function bT(e){A0=!0,bde(e)&&(sb="keyboard",m7("keyboard",e))}function mp(e){sb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(A0=!0,m7("pointer",e))}function xde(e){e.target===window||e.target===document||(A0||(sb="keyboard",m7("keyboard",e)),A0=!1)}function Sde(){A0=!1}function xT(){return sb!=="pointer"}function wde(){if(typeof window>"u"||yT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){A0=!0,e.apply(this,n)},document.addEventListener("keydown",bT,!0),document.addEventListener("keyup",bT,!0),window.addEventListener("focus",xde,!0),window.addEventListener("blur",Sde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",mp,!0),document.addEventListener("pointermove",mp,!0),document.addEventListener("pointerup",mp,!0)):(document.addEventListener("mousedown",mp,!0),document.addEventListener("mousemove",mp,!0),document.addEventListener("mouseup",mp,!0)),yT=!0}function Cde(e){wde(),e(xT());const t=()=>e(xT());return pC.add(t),()=>{pC.delete(t)}}var[Gke,_de]=Cn({name:"CheckboxGroupContext",strict:!1}),kde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ede(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Pde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Lde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Tde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Lde:Pde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Ade(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function JD(e={}){const t=p7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:P,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,N=Ade(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),H=dr(l),[W,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[ne,ie]=C.exports.useState(!1),[J,q]=C.exports.useState(!1);C.exports.useEffect(()=>Cde(Y),[]);const V=C.exports.useRef(null),[G,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:X,He=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}xe||me(Se?Ae.target.checked:b?!0:Ae.target.checked),D?.(Ae)},[r,n,Se,xe,b,D]);bs(()=>{V.current&&(V.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Ae=V.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const Ue=n&&!m,ut=C.exports.useCallback(Ae=>{Ae.key===" "&&q(!0)},[q]),Xe=C.exports.useCallback(Ae=>{Ae.key===" "&&q(!1)},[q]);bs(()=>{if(!V.current)return;V.current.checked!==Se&&me(V.current.checked)},[V.current]);const et=C.exports.useCallback((Ae={},dt=null)=>{const Mt=ct=>{de&&ct.preventDefault(),q(!0)};return{...Ae,ref:dt,"data-active":eo(J),"data-hover":eo(ne),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&W),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Ae.onMouseDown,Mt),onMouseUp:ka(Ae.onMouseUp,()=>q(!1)),onMouseEnter:ka(Ae.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Ae.onMouseLeave,()=>ie(!1))}},[J,Se,n,de,W,ne,b,o,r]),tt=C.exports.useCallback((Ae={},dt=null)=>({...N,...Ae,ref:$n(dt,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Ae.onClick,()=>{var Mt;G||((Mt=V.current)==null||Mt.click(),requestAnimationFrame(()=>{var ct;(ct=V.current)==null||ct.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[N,n,Se,o,G]),at=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:$n(V,dt),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:ka(Ae.onChange,He),onBlur:ka(Ae.onBlur,z,()=>j(!1)),onFocus:ka(Ae.onFocus,H,()=>j(!0)),onKeyDown:ka(Ae.onKeyDown,ut),onKeyUp:ka(Ae.onKeyUp,Xe),required:i,checked:Se,disabled:Ue,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:g7}),[w,P,a,He,z,H,ut,Xe,i,Se,Ue,r,k,L,I,o,u,n,E]),At=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:dt,onMouseDown:ka(Ae.onMouseDown,ST),onTouchStart:ka(Ae.onTouchStart,ST),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:J,isHovered:ne,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:et,getInputProps:at,getLabelProps:At,htmlProps:N}}function ST(e){e.preventDefault(),e.stopPropagation()}var Ide={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Mde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Ode=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Rde=hd({from:{opacity:0},to:{opacity:1}}),Nde=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),ez=Pe(function(t,n){const r=_de(),i={...r,...t},o=Ri("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Tde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ede(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:N,getLabelProps:D,getRootProps:z}=JD({...E,isDisabled:b,isChecked:k,onChange:L}),H=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Rde} 20ms linear, ${Nde} 200ms linear`:`${Ode} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:H,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return le.createElement(we.label,{__css:{...Mde,...o.container},className:kde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(P,n)}),le.createElement(we.span,{__css:{...Ide,...o.control},className:"chakra-checkbox__control",...N()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});ez.displayName="Checkbox";function Dde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var lb=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Dde,{width:"1em",height:"1em"}))});lb.displayName="CloseButton";function zde(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function v7(e,t){let n=zde(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function gC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function M5(e,t,n){return(e-t)*100/(n-t)}function tz(e,t,n){return(n-t)*e+t}function mC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=gC(n);return v7(r,i)}function l0(e,t,n){return e==null?e:(nr==null?"":zS(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=nz(_c(v),o),w=n??b,P=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let Y=W;return l&&(Y=l0(Y,a,s)),v7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(W):Y=_c(v)+W,Y=E(Y),P(Y)},[E,o,P,v]),L=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(-W):Y=_c(v)-W,Y=E(Y),P(Y)},[E,o,P,v]),I=C.exports.useCallback(()=>{let W;r==null?W="":W=zS(r,o,n)??a,P(W)},[r,n,o,P,a]),O=C.exports.useCallback(W=>{const Y=zS(W,o,w)??a;P(Y)},[w,o,P,a]),N=_c(v);return{isOutOfRange:N>s||Nx(F4,{styles:rz}),$de=()=>x(F4,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${rz} + `});function Ff(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Hde(e){return"current"in e}var iz=()=>typeof window<"u";function Wde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Vde=e=>iz()&&e.test(navigator.vendor),Ude=e=>iz()&&e.test(Wde()),jde=()=>Ude(/mac|iphone|ipad|ipod/i),Gde=()=>jde()&&Vde(/apple/i);function qde(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Ff(i,"pointerdown",o=>{if(!Gde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Hde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Kde=HQ?C.exports.useLayoutEffect:C.exports.useEffect;function wT(e,t=[]){const n=C.exports.useRef(e);return Kde(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Yde(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Zde(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function O5(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=wT(n),a=wT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Yde(r,s),g=Zde(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:WQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function y7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var b7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=vn(i),s=h7(a),l=Nr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});b7.displayName="Input";b7.id="Input";var[Xde,oz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Qde=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=ob(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=y7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Xde,{value:r,children:g}))});Qde.displayName="InputGroup";var Jde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),x7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Jde[r]??{},a=oz();return x(efe,{ref:n,...i,__css:{...a.addon,...o}})});x7.displayName="InputAddon";var az=Pe(function(t,n){return x(x7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});az.displayName="InputLeftAddon";az.id="InputLeftAddon";var sz=Pe(function(t,n){return x(x7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});sz.displayName="InputRightAddon";sz.id="InputRightAddon";var tfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),ub=Pe(function(t,n){const{placement:r="left",...i}=t,o=oz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(tfe,{ref:n,__css:l,...i})});ub.id="InputElement";ub.displayName="InputElement";var lz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(ub,{ref:n,placement:"left",className:o,...i})});lz.id="InputLeftElement";lz.displayName="InputLeftElement";var uz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(ub,{ref:n,placement:"right",className:o,...i})});uz.id="InputRightElement";uz.displayName="InputRightElement";function nfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):nfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var rfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});rfe.displayName="AspectRatio";var ife=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});ife.displayName="Badge";var md=we("div");md.displayName="Box";var cz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(md,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});cz.displayName="Square";var ofe=Pe(function(t,n){const{size:r,...i}=t;return x(cz,{size:r,ref:n,borderRadius:"9999px",...i})});ofe.displayName="Circle";var dz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});dz.displayName="Center";var afe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:afe[r],...i,position:"absolute"})});var sfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});sfe.displayName="Code";var lfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});lfe.displayName="Container";var ufe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});ufe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...b})});fz.displayName="Grid";function CT(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var cfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=y7({gridArea:r,gridColumn:CT(i),gridRow:CT(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:g,...h})});cfe.displayName="GridItem";var $f=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});$f.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(md,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var dfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});dfe.displayName="Kbd";var Hf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Hf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[ffe,hz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),S7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=ob(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(ffe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});S7.displayName="List";var hfe=Pe((e,t)=>{const{as:n,...r}=e;return x(S7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});hfe.displayName="OrderedList";var pz=Pe(function(t,n){const{as:r,...i}=t;return x(S7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});pz.displayName="UnorderedList";var gz=Pe(function(t,n){const r=hz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});gz.displayName="ListItem";var pfe=Pe(function(t,n){const r=hz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});pfe.displayName="ListIcon";var gfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=U0(),h=s?vfe(s,u):yfe(r);return x(fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});gfe.displayName="SimpleGrid";function mfe(e){return typeof e=="number"?`${e}px`:e}function vfe(e,t){return od(e,n=>{const r=boe("sizes",n,mfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function yfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var mz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});mz.displayName="Spacer";var vC="& > *:not(style) ~ *:not(style)";function bfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[vC]:od(n,i=>r[i])}}function xfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var vz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});vz.displayName="StackItem";var w7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>bfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>xfe({spacing:a,direction:v}),[a,v]),P=!!u,E=!g&&!P,k=C.exports.useMemo(()=>{const I=ob(l);return E?I:I.map((O,N)=>{const D=typeof O.key<"u"?O.key:N,z=N+1===I.length,W=g?x(vz,{children:O},D):O;if(!P)return W;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return te(C.exports.Fragment,{children:[W,de]},D)})},[u,w,P,E,g,l]),L=Nr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:P?{}:{[vC]:b[vC]},...m},k)});w7.displayName="Stack";var yz=Pe((e,t)=>x(w7,{align:"center",...e,direction:"row",ref:t}));yz.displayName="HStack";var Sfe=Pe((e,t)=>x(w7,{align:"center",...e,direction:"column",ref:t}));Sfe.displayName="VStack";var ko=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=y7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});ko.displayName="Text";function _T(e){return typeof e=="number"?`${e}px`:e}var wfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,k=>_T(Ew("space",k)(E))),"--chakra-wrap-y-spacing":E=>od(P,k=>_T(Ew("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,P)=>x(bz,{children:w},P)):a,[a,g]);return le.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});wfe.displayName="Wrap";var bz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});bz.displayName="WrapItem";var Cfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},xz=Cfe,vp=()=>{},_fe={document:xz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:vp,removeEventListener:vp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:vp,removeListener:vp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:vp,setInterval:()=>0,clearInterval:vp},kfe=_fe,Efe={window:kfe,document:xz},Sz=typeof window<"u"?{window,document}:Efe,wz=C.exports.createContext(Sz);wz.displayName="EnvironmentContext";function Cz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Sz},[r,n]);return te(wz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Cz.displayName="EnvironmentProvider";var Pfe=e=>e?"":void 0;function Lfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function BS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Tfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,P]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),L=Lfe(),I=q=>{!q||q.tagName!=="BUTTON"&&P(!1)},O=w?g:g||0,N=n&&!r,D=C.exports.useCallback(q=>{if(n){q.stopPropagation(),q.preventDefault();return}q.currentTarget.focus(),l?.(q)},[n,l]),z=C.exports.useCallback(q=>{E&&BS(q)&&(q.preventDefault(),q.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[E,L]),H=C.exports.useCallback(q=>{if(u?.(q),n||q.defaultPrevented||q.metaKey||!BS(q.nativeEvent)||w)return;const V=i&&q.key==="Enter";o&&q.key===" "&&(q.preventDefault(),k(!0)),V&&(q.preventDefault(),q.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),W=C.exports.useCallback(q=>{if(h?.(q),n||q.defaultPrevented||q.metaKey||!BS(q.nativeEvent)||w)return;o&&q.key===" "&&(q.preventDefault(),k(!1),q.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(q=>{q.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(q=>{if(q.button!==0)return;if(n){q.stopPropagation(),q.preventDefault();return}w||k(!0),q.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(q)},[n,w,a,L,Y]),j=C.exports.useCallback(q=>{q.button===0&&(w||k(!1),s?.(q))},[s,w]),ne=C.exports.useCallback(q=>{if(n){q.preventDefault();return}m?.(q)},[n,m]),ie=C.exports.useCallback(q=>{E&&(q.preventDefault(),k(!1)),v?.(q)},[E,v]),J=$n(t,I);return w?{...b,ref:J,type:"button","aria-disabled":N?void 0:n,disabled:N,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:J,role:"button","data-active":Pfe(E),"aria-disabled":n?"true":void 0,tabIndex:N?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:W,onKeyDown:H,onMouseOver:ne,onMouseLeave:ie}}function _z(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function kz(e){if(!_z(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Afe(e){var t;return((t=Ez(e))==null?void 0:t.defaultView)??window}function Ez(e){return _z(e)?e.ownerDocument:document}function Ife(e){return Ez(e).activeElement}var Pz=e=>e.hasAttribute("tabindex"),Mfe=e=>Pz(e)&&e.tabIndex===-1;function Ofe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Lz(e){return e.parentElement&&Lz(e.parentElement)?!0:e.hidden}function Rfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Tz(e){if(!kz(e)||Lz(e)||Ofe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Rfe(e)?!0:Pz(e)}function Nfe(e){return e?kz(e)&&Tz(e)&&!Mfe(e):!1}var Dfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],zfe=Dfe.join(),Bfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Az(e){const t=Array.from(e.querySelectorAll(zfe));return t.unshift(e),t.filter(n=>Tz(n)&&Bfe(n))}function Ffe(e){const t=e.current;if(!t)return!1;const n=Ife(t);return!n||t.contains(n)?!1:!!Nfe(n)}function $fe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Ffe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Hfe={preventScroll:!0,shouldFocus:!1};function Wfe(e,t=Hfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Vfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Az(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Ff(a,"transitionend",h)}function Vfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",C7="auto",Fv=[Io,Ba,Fa,Mo],I0="start",cv="end",Ufe="clippingParents",Iz="viewport",Eg="popper",jfe="reference",kT=Fv.reduce(function(e,t){return e.concat([t+"-"+I0,t+"-"+cv])},[]),Mz=[].concat(Fv,[C7]).reduce(function(e,t){return e.concat([t,t+"-"+I0,t+"-"+cv])},[]),Gfe="beforeRead",qfe="read",Kfe="afterRead",Yfe="beforeMain",Zfe="main",Xfe="afterMain",Qfe="beforeWrite",Jfe="write",ehe="afterWrite",the=[Gfe,qfe,Kfe,Yfe,Zfe,Xfe,Qfe,Jfe,ehe];function Pl(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!Pl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function rhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!Pl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const ihe={name:"applyStyles",enabled:!0,phase:"write",fn:nhe,effect:rhe,requires:["computeStyles"]};function Cl(e){return e.split("-")[0]}var Wf=Math.max,R5=Math.min,M0=Math.round;function yC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Oz(){return!/^((?!chrome|android).)*safari/i.test(yC())}function O0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&M0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M0(r.height)/e.offsetHeight||1);var a=Yf(e)?Wa(e):window,s=a.visualViewport,l=!Oz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function k7(e){var t=O0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Rz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Wa(e).getComputedStyle(e)}function ohe(e){return["table","td","th"].indexOf(Pl(e))>=0}function vd(e){return((Yf(e)?e.ownerDocument:e.document)||window.document).documentElement}function cb(e){return Pl(e)==="html"?e:e.assignedSlot||e.parentNode||(_7(e)?e.host:null)||vd(e)}function ET(e){return!Na(e)||bu(e).position==="fixed"?null:e.offsetParent}function ahe(e){var t=/firefox/i.test(yC()),n=/Trident/i.test(yC());if(n&&Na(e)){var r=bu(e);if(r.position==="fixed")return null}var i=cb(e);for(_7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(Pl(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function $v(e){for(var t=Wa(e),n=ET(e);n&&ohe(n)&&bu(n).position==="static";)n=ET(n);return n&&(Pl(n)==="html"||Pl(n)==="body"&&bu(n).position==="static")?t:n||ahe(e)||t}function E7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _m(e,t,n){return Wf(e,R5(t,n))}function she(e,t,n){var r=_m(e,t,n);return r>n?n:r}function Nz(){return{top:0,right:0,bottom:0,left:0}}function Dz(e){return Object.assign({},Nz(),e)}function zz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var lhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Dz(typeof t!="number"?t:zz(t,Fv))};function uhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Cl(n.placement),l=E7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=lhe(i.padding,n),m=k7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=$v(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,L=w/2-P/2,I=g[v],O=k-m[h]-g[b],N=k/2-m[h]/2+L,D=_m(I,N,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-N,t)}}function che(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Rz(t.elements.popper,i)||(t.elements.arrow=i))}const dhe={name:"arrow",enabled:!0,phase:"main",fn:uhe,effect:che,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function R0(e){return e.split("-")[1]}var fhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:M0(t*i)/i||0,y:M0(n*i)/i||0}}function PT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var N=$v(n),D="clientHeight",z="clientWidth";if(N===Wa(n)&&(N=vd(n),bu(N).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),N=N,i===Io||(i===Mo||i===Fa)&&o===cv){I=Ba;var H=g&&N===O&&O.visualViewport?O.visualViewport.height:N[D];w-=H-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===cv){L=Fa;var W=g&&N===O&&O.visualViewport?O.visualViewport.width:N[z];v-=W-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&fhe),de=h===!0?hhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=E?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=E?v+"px":"",t.transform="",t))}function phe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Cl(t.placement),variation:R0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,PT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,PT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ghe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:phe,data:{}};var Sy={passive:!0};function mhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Sy)}),s&&l.addEventListener("resize",n.update,Sy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Sy)}),s&&l.removeEventListener("resize",n.update,Sy)}}const vhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:mhe,data:{}};var yhe={left:"right",right:"left",bottom:"top",top:"bottom"};function C3(e){return e.replace(/left|right|bottom|top/g,function(t){return yhe[t]})}var bhe={start:"end",end:"start"};function LT(e){return e.replace(/start|end/g,function(t){return bhe[t]})}function P7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function L7(e){return O0(vd(e)).left+P7(e).scrollLeft}function xhe(e,t){var n=Wa(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Oz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+L7(e),y:l}}function She(e){var t,n=vd(e),r=P7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+L7(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=Wf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function T7(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Bz(e){return["html","body","#document"].indexOf(Pl(e))>=0?e.ownerDocument.body:Na(e)&&T7(e)?e:Bz(cb(e))}function km(e,t){var n;t===void 0&&(t=[]);var r=Bz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],T7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(km(cb(a)))}function bC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function whe(e,t){var n=O0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function TT(e,t,n){return t===Iz?bC(xhe(e,n)):Yf(t)?whe(t,n):bC(She(vd(e)))}function Che(e){var t=km(cb(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&Na(e)?$v(e):e;return Yf(r)?t.filter(function(i){return Yf(i)&&Rz(i,r)&&Pl(i)!=="body"}):[]}function _he(e,t,n,r){var i=t==="clippingParents"?Che(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=TT(e,u,r);return l.top=Wf(h.top,l.top),l.right=R5(h.right,l.right),l.bottom=R5(h.bottom,l.bottom),l.left=Wf(h.left,l.left),l},TT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fz(e){var t=e.reference,n=e.element,r=e.placement,i=r?Cl(r):null,o=r?R0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?E7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case I0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case cv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function dv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Ufe:s,u=n.rootBoundary,h=u===void 0?Iz:u,g=n.elementContext,m=g===void 0?Eg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=Dz(typeof P!="number"?P:zz(P,Fv)),k=m===Eg?jfe:Eg,L=e.rects.popper,I=e.elements[b?k:m],O=_he(Yf(I)?I:I.contextElement||vd(e.elements.popper),l,h,a),N=O0(e.elements.reference),D=Fz({reference:N,element:L,strategy:"absolute",placement:i}),z=bC(Object.assign({},L,D)),H=m===Eg?z:N,W={top:O.top-H.top+E.top,bottom:H.bottom-O.bottom+E.bottom,left:O.left-H.left+E.left,right:H.right-O.right+E.right},Y=e.modifiersData.offset;if(m===Eg&&Y){var de=Y[i];Object.keys(W).forEach(function(j){var ne=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";W[j]+=de[ie]*ne})}return W}function khe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Mz:l,h=R0(r),g=h?s?kT:kT.filter(function(b){return R0(b)===h}):Fv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=dv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Cl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ehe(e){if(Cl(e)===C7)return[];var t=C3(e);return[LT(e),t,LT(t)]}function Phe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=Cl(P),k=E===P,L=l||(k||!b?[C3(P)]:Ehe(P)),I=[P].concat(L).reduce(function(Se,He){return Se.concat(Cl(He)===C7?khe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,N=t.rects.popper,D=new Map,z=!0,H=I[0],W=0;W=0,ie=ne?"width":"height",J=dv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),q=ne?j?Fa:Mo:j?Ba:Io;O[ie]>N[ie]&&(q=C3(q));var V=C3(q),G=[];if(o&&G.push(J[de]<=0),s&&G.push(J[q]<=0,J[V]<=0),G.every(function(Se){return Se})){H=Y,z=!1;break}D.set(Y,G)}if(z)for(var Q=b?3:1,X=function(He){var Ue=I.find(function(ut){var Xe=D.get(ut);if(Xe)return Xe.slice(0,He).every(function(et){return et})});if(Ue)return H=Ue,"break"},me=Q;me>0;me--){var xe=X(me);if(xe==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const Lhe={name:"flip",enabled:!0,phase:"main",fn:Phe,requiresIfExists:["offset"],data:{_skip:!1}};function AT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function IT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function The(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=dv(t,{elementContext:"reference"}),s=dv(t,{altBoundary:!0}),l=AT(a,r),u=AT(s,i,o),h=IT(l),g=IT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Ahe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:The};function Ihe(e,t,n){var r=Cl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Mhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Mz.reduce(function(h,g){return h[g]=Ihe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Ohe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Mhe};function Rhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Fz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Nhe={name:"popperOffsets",enabled:!0,phase:"read",fn:Rhe,data:{}};function Dhe(e){return e==="x"?"y":"x"}function zhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,P=dv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),E=Cl(t.placement),k=R0(t.placement),L=!k,I=E7(E),O=Dhe(I),N=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,H=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!N){if(o){var j,ne=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,J=I==="y"?"height":"width",q=N[I],V=q+P[ne],G=q-P[ie],Q=v?-z[J]/2:0,X=k===I0?D[J]:z[J],me=k===I0?-z[J]:-D[J],xe=t.elements.arrow,Se=v&&xe?k7(xe):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Nz(),Ue=He[ne],ut=He[ie],Xe=_m(0,D[J],Se[J]),et=L?D[J]/2-Q-Xe-Ue-W.mainAxis:X-Xe-Ue-W.mainAxis,tt=L?-D[J]/2+Q+Xe+ut+W.mainAxis:me+Xe+ut+W.mainAxis,at=t.elements.arrow&&$v(t.elements.arrow),At=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Ae=q+et-wt-At,dt=q+tt-wt,Mt=_m(v?R5(V,Ae):V,q,v?Wf(G,dt):G);N[I]=Mt,de[I]=Mt-q}if(s){var ct,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=N[O],Zt=O==="y"?"height":"width",En=Et+P[xt],yn=Et-P[kn],Me=[Io,Mo].indexOf(E)!==-1,Je=(ct=Y?.[O])!=null?ct:0,Xt=Me?En:Et-D[Zt]-z[Zt]-Je+W.altAxis,qt=Me?Et+D[Zt]+z[Zt]-Je-W.altAxis:yn,Ee=v&&Me?she(Xt,Et,qt):_m(v?Xt:En,Et,v?qt:yn);N[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const Bhe={name:"preventOverflow",enabled:!0,phase:"main",fn:zhe,requiresIfExists:["offset"]};function Fhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function $he(e){return e===Wa(e)||!Na(e)?P7(e):Fhe(e)}function Hhe(e){var t=e.getBoundingClientRect(),n=M0(t.width)/e.offsetWidth||1,r=M0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Whe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Hhe(t),o=vd(t),a=O0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pl(t)!=="body"||T7(o))&&(s=$he(t)),Na(t)?(l=O0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=L7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Vhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Uhe(e){var t=Vhe(e);return the.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function jhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ghe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var MT={placement:"bottom",modifiers:[],strategy:"absolute"};function OT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:yp("--popper-arrow-shadow-color"),arrowSize:yp("--popper-arrow-size","8px"),arrowSizeHalf:yp("--popper-arrow-size-half"),arrowBg:yp("--popper-arrow-bg"),transformOrigin:yp("--popper-transform-origin"),arrowOffset:yp("--popper-arrow-offset")};function Zhe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Xhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Qhe=e=>Xhe[e],RT={scroll:!0,resize:!0};function Jhe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...RT,...e}}:t={enabled:e,options:RT},t}var epe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},tpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{NT(e)},effect:({state:e})=>()=>{NT(e)}},NT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Qhe(e.placement))},npe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{rpe(e)}},rpe=e=>{var t;if(!e.placement)return;const n=ipe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},ipe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},ope={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Zhe(e.placement)})},ape={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},spe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function lpe(e,t="ltr"){var n;const r=((n=ape[e])==null?void 0:n[t])||e;return t==="ltr"?r:spe[e]??r}function $z(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=lpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var W;!t||!b.current||!w.current||((W=k.current)==null||W.call(k),P.current=Yhe(b.current,w.current,{placement:E,modifiers:[ope,npe,tpe,{...epe,enabled:!!m},{name:"eventListeners",...Jhe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),k.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!b.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const I=C.exports.useCallback(W=>{b.current=W,L()},[L]),O=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(I,Y)}),[I]),N=C.exports.useCallback(W=>{w.current=W,L()},[L]),D=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(N,Y),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,N,m]),z=C.exports.useCallback((W={},Y=null)=>{const{size:de,shadowColor:j,bg:ne,style:ie,...J}=W;return{...J,ref:Y,"data-popper-arrow":"",style:upe(W)}},[]),H=C.exports.useCallback((W={},Y=null)=>({...W,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:z,getArrowInnerProps:H,getReferenceProps:O}}function upe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Hz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function P(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function E(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function cpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Ff(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Afe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Wz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[dpe,fpe]=Cn({strict:!1,name:"PortalManagerContext"});function Vz(e){const{children:t,zIndex:n}=e;return x(dpe,{value:{zIndex:n},children:t})}Vz.displayName="PortalManager";var[Uz,hpe]=Cn({strict:!1,name:"PortalContext"}),A7="chakra-portal",ppe=".chakra-portal",gpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),mpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=hpe(),l=fpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=A7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(gpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(Uz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},vpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=A7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(Uz,{value:r?a:null,children:t}),a):null};function ih(e){const{containerRef:t,...n}=e;return t?x(vpe,{containerRef:t,...n}):x(mpe,{...n})}ih.defaultProps={appendToParentPortal:!0};ih.className=A7;ih.selector=ppe;ih.displayName="Portal";var ype=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bp=new WeakMap,wy=new WeakMap,Cy={},FS=0,bpe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Cy[n]||(Cy[n]=new WeakMap);var o=Cy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(bp.get(m)||0)+1,P=(o.get(m)||0)+1;bp.set(m,w),o.set(m,P),a.push(m),w===1&&b&&wy.set(m,!0),P===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),FS++,function(){a.forEach(function(g){var m=bp.get(g)-1,v=o.get(g)-1;bp.set(g,m),o.set(g,v),m||(wy.has(g)||g.removeAttribute(r),wy.delete(g)),v||g.removeAttribute(n)}),FS--,FS||(bp=new WeakMap,bp=new WeakMap,wy=new WeakMap,Cy={})}},jz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||ype(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),bpe(r,i,n,"aria-hidden")):function(){return null}};function I7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},xpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Spe=xpe,wpe=Spe;function Gz(){}function qz(){}qz.resetWarningCache=Gz;var Cpe=function(){function e(r,i,o,a,s,l){if(l!==wpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:qz,resetWarningCache:Gz};return n.PropTypes=n,n};Rn.exports=Cpe();var xC="data-focus-lock",Kz="data-focus-lock-disabled",_pe="data-no-focus-lock",kpe="data-autofocus-inside",Epe="data-no-autofocus";function Ppe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lpe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Yz(e,t){return Lpe(t||null,function(n){return e.forEach(function(r){return Ppe(r,n)})})}var $S={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Zz(e){return e}function Xz(e,t){t===void 0&&(t=Zz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function M7(e,t){return t===void 0&&(t=Zz),Xz(e,t)}function Qz(e){e===void 0&&(e={});var t=Xz(null);return t.options=pl({async:!0,ssr:!1},e),t}var Jz=function(e){var t=e.sideCar,n=HD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};Jz.isSideCarExport=!0;function Tpe(e,t){return e.useMedium(t),Jz}var eB=M7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),tB=M7(),Ape=M7(),Ipe=Qz({async:!0}),Mpe=[],O7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Mpe:I,N=t.as,D=N===void 0?"div":N,z=t.lockProps,H=z===void 0?{}:z,W=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,ne=t.onDeactivation,ie=C.exports.useState({}),J=ie[0],q=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),V=C.exports.useCallback(function(){l.current=!1,ne&&ne(s.current)},[ne]);C.exports.useEffect(function(){g||(u.current=null)},[]);var G=C.exports.useCallback(function(ut){var Xe=u.current;if(Xe&&Xe.focus){var et=typeof Y=="function"?Y(Xe):Y;if(et){var tt=typeof et=="object"?et:void 0;u.current=null,ut?Promise.resolve().then(function(){return Xe.focus(tt)}):Xe.focus(tt)}}},[Y]),Q=C.exports.useCallback(function(ut){l.current&&eB.useMedium(ut)},[]),X=tB.useMedium,me=C.exports.useCallback(function(ut){s.current!==ut&&(s.current=ut,a(ut))},[]),xe=An((r={},r[Kz]=g&&"disabled",r[xC]=P,r),H),Se=m!==!0,He=Se&&m!=="tail",Ue=Yz([n,me]);return te(Xn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:$S},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:$S},"guard-nearest"):null],!g&&x(W,{id:J,sideCar:Ipe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:q,onDeactivation:V,returnFocus:G,focusOptions:de}),x(D,{ref:Ue,...xe,className:E,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:$S})]})});O7.propTypes={};O7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const nB=O7;function SC(e,t){return SC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},SC(e,t)}function R7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,SC(e,t)}function rB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ope(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){R7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return rB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ol=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Hpe)},Wpe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],D7=Wpe.join(","),Vpe="".concat(D7,", [data-focus-guard]"),fB=function(e,t){var n;return Ol(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Vpe:D7)?[i]:[],fB(i))},[])},z7=function(e,t){return e.reduce(function(n,r){return n.concat(fB(r,t),r.parentNode?Ol(r.parentNode.querySelectorAll(D7)).filter(function(i){return i===r}):[])},[])},Upe=function(e){var t=e.querySelectorAll("[".concat(kpe,"]"));return Ol(t).map(function(n){return z7([n])}).reduce(function(n,r){return n.concat(r)},[])},B7=function(e,t){return Ol(e).filter(function(n){return aB(t,n)}).filter(function(n){return Bpe(n)})},zT=function(e,t){return t===void 0&&(t=new Map),Ol(e).filter(function(n){return sB(t,n)})},CC=function(e,t,n){return dB(B7(z7(e,n),t),!0,n)},BT=function(e,t){return dB(B7(z7(e),t),!1)},jpe=function(e,t){return B7(Upe(e),t)},fv=function(e,t){return e.shadowRoot?fv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ol(e.children).some(function(n){return fv(n,t)})},Gpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},hB=function(e){return e.parentNode?hB(e.parentNode):e},F7=function(e){var t=wC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(xC);return n.push.apply(n,i?Gpe(Ol(hB(r).querySelectorAll("[".concat(xC,'="').concat(i,'"]:not([').concat(Kz,'="disabled"])')))):[r]),n},[])},pB=function(e){return e.activeElement?e.activeElement.shadowRoot?pB(e.activeElement.shadowRoot):e.activeElement:void 0},$7=function(){return document.activeElement?document.activeElement.shadowRoot?pB(document.activeElement.shadowRoot):document.activeElement:void 0},qpe=function(e){return e===document.activeElement},Kpe=function(e){return Boolean(Ol(e.querySelectorAll("iframe")).some(function(t){return qpe(t)}))},gB=function(e){var t=document&&$7();return!t||t.dataset&&t.dataset.focusGuard?!1:F7(e).some(function(n){return fv(n,t)||Kpe(n)})},Ype=function(){var e=document&&$7();return e?Ol(document.querySelectorAll("[".concat(_pe,"]"))).some(function(t){return fv(t,e)}):!1},Zpe=function(e,t){return t.filter(cB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},H7=function(e,t){return cB(e)&&e.name?Zpe(e,t):e},Xpe=function(e){var t=new Set;return e.forEach(function(n){return t.add(H7(n,e))}),e.filter(function(n){return t.has(n)})},FT=function(e){return e[0]&&e.length>1?H7(e[0],e):e[0]},$T=function(e,t){return e.length>1?e.indexOf(H7(e[t],e)):t},mB="NEW_FOCUS",Qpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=N7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Xpe(t),w=n!==void 0?b.indexOf(n):-1,P=w-(r?b.indexOf(r):l),E=$T(e,0),k=$T(e,i-1);if(l===-1||h===-1)return mB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(P)>1)return h;if(l<=m)return k;if(l>v)return E;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},Jpe=function(e){return function(t){var n,r=(n=lB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},e0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=zT(r.filter(Jpe(n)));return i&&i.length?FT(i):FT(zT(t))},_C=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&_C(e.parentNode.host||e.parentNode,t),t},HS=function(e,t){for(var n=_C(e),r=_C(t),i=0;i=0)return o}return!1},vB=function(e,t,n){var r=wC(e),i=wC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=HS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=HS(o,l);u&&(!a||fv(u,a)?a=u:a=HS(u,a))})}),a},t0e=function(e,t){return e.reduce(function(n,r){return n.concat(jpe(r,t))},[])},n0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter($pe)},r0e=function(e,t){var n=document&&$7(),r=F7(e).filter(N5),i=vB(n||e,e,r),o=new Map,a=BT(r,o),s=CC(r,o).filter(function(m){var v=m.node;return N5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=BT([i],o).map(function(m){var v=m.node;return v}),u=n0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=Qpe(h,l,n,t);return g===mB?{node:e0e(a,h,t0e(r,o))}:g===void 0?g:u[g]}},i0e=function(e){var t=F7(e).filter(N5),n=vB(e,e,t),r=new Map,i=CC([n],r,!0),o=CC(t,r).filter(function(a){var s=a.node;return N5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:N7(s)}})},o0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},WS=0,VS=!1,a0e=function(e,t,n){n===void 0&&(n={});var r=r0e(e,t);if(!VS&&r){if(WS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),VS=!0,setTimeout(function(){VS=!1},1);return}WS++,o0e(r.node,n.focusOptions),WS--}};const yB=a0e;function bB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var s0e=function(){return document&&document.activeElement===document.body},l0e=function(){return s0e()||Ype()},u0=null,Up=null,c0=null,hv=!1,u0e=function(){return!0},c0e=function(t){return(u0.whiteList||u0e)(t)},d0e=function(t,n){c0={observerNode:t,portaledElement:n}},f0e=function(t){return c0&&c0.portaledElement===t};function HT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var h0e=function(t){return t&&"current"in t?t.current:t},p0e=function(t){return t?Boolean(hv):hv==="meanwhile"},g0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},m0e=function(t,n){return n.some(function(r){return g0e(t,r,r)})},D5=function(){var t=!1;if(u0){var n=u0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||c0&&c0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(h0e).filter(Boolean));if((!h||c0e(h))&&(i||p0e(s)||!l0e()||!Up&&o)&&(u&&!(gB(g)||h&&m0e(h,g)||f0e(h))&&(document&&!Up&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=yB(g,Up,{focusOptions:l}),c0={})),hv=!1,Up=document&&document.activeElement),document){var m=document&&document.activeElement,v=i0e(g),b=v.map(function(w){var P=w.node;return P}).indexOf(m);b>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),HT(b,v.length,1,v),HT(b,-1,-1,v))}}}return t},xB=function(t){D5()&&t&&(t.stopPropagation(),t.preventDefault())},W7=function(){return bB(D5)},v0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||d0e(r,n)},y0e=function(){return null},SB=function(){hv="just",setTimeout(function(){hv="meanwhile"},0)},b0e=function(){document.addEventListener("focusin",xB),document.addEventListener("focusout",W7),window.addEventListener("blur",SB)},x0e=function(){document.removeEventListener("focusin",xB),document.removeEventListener("focusout",W7),window.removeEventListener("blur",SB)};function S0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function w0e(e){var t=e.slice(-1)[0];t&&!u0&&b0e();var n=u0,r=n&&t&&t.id===n.id;u0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Up=null,(!r||n.observed!==t.observed)&&t.onActivation(),D5(),bB(D5)):(x0e(),Up=null)}eB.assignSyncMedium(v0e);tB.assignMedium(W7);Ape.assignMedium(function(e){return e({moveFocusInside:yB,focusInside:gB})});const C0e=Ope(S0e,w0e)(y0e);var wB=C.exports.forwardRef(function(t,n){return x(nB,{sideCar:C0e,ref:n,...t})}),CB=nB.propTypes||{};CB.sideCar;I7(CB,["sideCar"]);wB.propTypes={};const _0e=wB;var _B=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Az(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(_0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};_B.displayName="FocusLock";var _3="right-scroll-bar-position",k3="width-before-scroll-bar",k0e="with-scroll-bars-hidden",E0e="--removed-body-scroll-bar-size",kB=Qz(),US=function(){},db=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:US,onWheelCapture:US,onTouchMoveCapture:US}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,k=HD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Yz([n,t]),O=pl(pl({},k),i);return te(Xn,{children:[h&&x(L,{sideCar:kB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},O),{ref:I})):x(E,{...pl({},O,{className:l,ref:I}),children:s})]})});db.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};db.classNames={fullWidth:k3,zeroRight:_3};var P0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function L0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=P0e();return t&&e.setAttribute("nonce",t),e}function T0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function A0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var I0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=L0e())&&(T0e(t,n),A0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},M0e=function(){var e=I0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},EB=function(){var e=M0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},O0e={left:0,top:0,right:0,gap:0},jS=function(e){return parseInt(e||"",10)||0},R0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[jS(n),jS(r),jS(i)]},N0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return O0e;var t=R0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},D0e=EB(),z0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(k0e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(_3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(k3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(_3," .").concat(_3,` { + right: 0 `).concat(r,`; + } + + .`).concat(k3," .").concat(k3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(E0e,": ").concat(s,`px; + } +`)},B0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return N0e(i)},[i]);return x(D0e,{styles:z0e(o,!t,i,n?"":"!important")})},kC=!1;if(typeof window<"u")try{var _y=Object.defineProperty({},"passive",{get:function(){return kC=!0,!0}});window.addEventListener("test",_y,_y),window.removeEventListener("test",_y,_y)}catch{kC=!1}var xp=kC?{passive:!1}:!1,F0e=function(e){return e.tagName==="TEXTAREA"},PB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!F0e(e)&&n[t]==="visible")},$0e=function(e){return PB(e,"overflowY")},H0e=function(e){return PB(e,"overflowX")},WT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=LB(e,n);if(r){var i=TB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},W0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},V0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},LB=function(e,t){return e==="v"?$0e(t):H0e(t)},TB=function(e,t){return e==="v"?W0e(t):V0e(t)},U0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},j0e=function(e,t,n,r,i){var o=U0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=TB(e,s),b=v[0],w=v[1],P=v[2],E=w-P-o*b;(b||E)&&LB(e,s)&&(g+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},ky=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},VT=function(e){return[e.deltaX,e.deltaY]},UT=function(e){return e&&"current"in e?e.current:e},G0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},q0e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},K0e=0,Sp=[];function Y0e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(K0e++)[0],o=C.exports.useState(function(){return EB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=uC([e.lockRef.current],(e.shards||[]).map(UT),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=ky(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-E[0],I="deltaY"in w?w.deltaY:k[1]-E[1],O,N=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&N.type==="range")return!1;var z=WT(D,N);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=WT(D,N)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var H=r.current||O;return j0e(H,P,w,H==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!Sp.length||Sp[Sp.length-1]!==o)){var E="deltaY"in P?VT(P):ky(P),k=t.current.filter(function(O){return O.name===P.type&&O.target===P.target&&G0e(O.delta,E)})[0];if(k&&k.should){P.cancelable&&P.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(UT).filter(Boolean).filter(function(O){return O.contains(P.target)}),I=L.length>0?s(P,L[0]):!a.current.noIsolation;I&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,k){var L={name:w,delta:P,target:E,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=ky(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,VT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,ky(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Sp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,xp),document.addEventListener("touchmove",l,xp),document.addEventListener("touchstart",h,xp),function(){Sp=Sp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,xp),document.removeEventListener("touchmove",l,xp),document.removeEventListener("touchstart",h,xp)}},[]);var v=e.removeScrollBar,b=e.inert;return te(Xn,{children:[b?x(o,{styles:q0e(i)}):null,v?x(B0e,{gapMode:"margin"}):null]})}const Z0e=Tpe(kB,Y0e);var AB=C.exports.forwardRef(function(e,t){return x(db,{...pl({},e,{ref:t,sideCar:Z0e})})});AB.classNames=db.classNames;const IB=AB;var oh=(...e)=>e.filter(Boolean).join(" ");function jg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},EC=new X0e;function Q0e(e,t){C.exports.useEffect(()=>(t&&EC.add(e),()=>{EC.remove(e)}),[t,e])}function J0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=t1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");e1e(u,t&&a),Q0e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},H=null)=>({role:"dialog",...z,ref:$n(H,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":L?v:void 0,onClick:jg(z.onClick,W=>W.stopPropagation())}),[v,L,g,m,E]),N=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!EC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},H=null)=>({...z,ref:$n(H,h),onClick:jg(z.onClick,N),onKeyDown:jg(z.onKeyDown,P),onMouseDown:jg(z.onMouseDown,w)}),[P,w,N]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function e1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return jz(e.current)},[t,e,n])}function t1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[n1e,ah]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[r1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),P={...J0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(r1e,{value:P,children:x(n1e,{value:b,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(ih,{...t,children:n})})})})};N0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};N0.displayName="Modal";var z5=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=oh("chakra-modal__body",n),s=ah();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});z5.displayName="ModalBody";var V7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=oh("chakra-modal__close-btn",r),s=ah();return x(lb,{ref:t,__css:s.closeButton,className:a,onClick:jg(n,l=>{l.stopPropagation(),o()}),...i})});V7.displayName="ModalCloseButton";function MB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=n7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(_B,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(IB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var i1e={slideInBottom:{...dC,custom:{offsetY:16,reverse:!0}},slideInRight:{...dC,custom:{offsetX:16,reverse:!0}},scale:{...UD,custom:{initialScale:.95,reverse:!0}},none:{}},o1e=we(Ml.section),a1e=e=>i1e[e||"none"],OB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=a1e(n),...i}=e;return x(o1e,{ref:t,...r,...i})});OB.displayName="ModalTransition";var pv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=oh("chakra-modal__content",n),m=ah(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(MB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(OB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});pv.displayName="ModalContent";var U7=Pe((e,t)=>{const{className:n,...r}=e,i=oh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...ah().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});U7.displayName="ModalFooter";var j7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=oh("chakra-modal__header",n),l={flex:0,...ah().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});j7.displayName="ModalHeader";var s1e=we(Ml.div),gv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=oh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...ah().overlay},{motionPreset:u}=ad();return x(s1e,{...i||(u==="none"?{}:VD),__css:l,ref:t,className:a,...o})});gv.displayName="ModalOverlay";function l1e(e){const{leastDestructiveRef:t,...n}=e;return x(N0,{...n,initialFocusRef:t})}var u1e=Pe((e,t)=>x(pv,{ref:t,role:"alertdialog",...e})),[qke,c1e]=Cn(),d1e=we(jD),f1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=oh("chakra-modal__content",n),v=ah(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=c1e();return le.createElement(MB,null,le.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(d1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:b,children:r})))});f1e.displayName="DrawerContent";function h1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var RB=(...e)=>e.filter(Boolean).join(" "),GS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var p1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),g1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function jT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var m1e=50,GT=300;function v1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);h1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?m1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},GT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},GT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var y1e=/^[Ee0-9+\-.]$/;function b1e(e){return y1e.test(e)}function x1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function S1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:P,name:E,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:N,onInvalid:D,getAriaValueText:z,isValidCharacter:H,format:W,parse:Y,...de}=e,j=dr(O),ne=dr(N),ie=dr(D),J=dr(H??b1e),q=dr(z),V=Bde(e),{update:G,increment:Q,decrement:X}=V,[me,xe]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ut=C.exports.useRef(null),Xe=C.exports.useRef(null),et=C.exports.useCallback(Ee=>Ee.split("").filter(J).join(""),[J]),tt=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),at=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);id(()=>{(V.valueAsNumber>o||V.valueAsNumber{if(!He.current)return;if(He.current.value!=V.value){const It=tt(He.current.value);V.setValue(et(It))}},[tt,et]);const At=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Ae=v1e(At,wt);jT(ut,"disabled",Ae.stop,Ae.isSpinning),jT(Xe,"disabled",Ae.stop,Ae.isSpinning);const dt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=tt(Ee.currentTarget.value);G(et(Ne)),Ue.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[G,et,tt]),Mt=C.exports.useCallback(Ee=>{var It;j?.(Ee),Ue.current&&(Ee.target.selectionStart=Ue.current.start??((It=Ee.currentTarget.value)==null?void 0:It.length),Ee.currentTarget.selectionEnd=Ue.current.end??Ee.currentTarget.selectionStart)},[j]),ct=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;x1e(Ee,J)||Ee.preventDefault();const It=xt(Ee)*a,Ne=Ee.key,ln={ArrowUp:()=>At(It),ArrowDown:()=>wt(It),Home:()=>G(i),End:()=>G(o)}[Ne];ln&&(Ee.preventDefault(),ln(Ee))},[J,a,At,wt,G,i,o]),xt=Ee=>{let It=1;return(Ee.metaKey||Ee.ctrlKey)&&(It=.1),Ee.shiftKey&&(It=10),It},kn=C.exports.useMemo(()=>{const Ee=q?.(V.value);if(Ee!=null)return Ee;const It=V.value.toString();return It||void 0},[V.value,q]),Et=C.exports.useCallback(()=>{let Ee=V.value;if(V.value==="")return;/^[eE]/.test(V.value.toString())?V.setValue(""):(V.valueAsNumbero&&(Ee=o),V.cast(Ee))},[V,o,i]),Zt=C.exports.useCallback(()=>{xe(!1),n&&Et()},[n,xe,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),En()},[En,Ae]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),En()},[En,Ae]);Ff(()=>He.current,"wheel",Ee=>{var It;const st=(((It=He.current)==null?void 0:It.ownerDocument)??document).activeElement===He.current;if(!v||!st)return;Ee.preventDefault();const ln=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?At(ln):Dn===1&&wt(ln)},{passive:!1});const Je=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMax;return{...Ee,ref:$n(It,ut),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||yn(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":GS(Ne)}},[V.isAtMax,r,yn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMin;return{...Ee,ref:$n(It,Xe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||Me(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":GS(Ne)}},[V.isAtMin,r,Me,Ae.stop,l]),qt=C.exports.useCallback((Ee={},It=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,It),value:at(V.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(V.valueAsNumber)?void 0:V.valueAsNumber,"aria-invalid":GS(h??V.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,dt),onKeyDown:rl(Ee.onKeyDown,ct),onFocus:rl(Ee.onFocus,Mt,()=>xe(!0)),onBlur:rl(Ee.onBlur,ne,Zt)}),[E,m,g,I,L,at,k,b,l,u,s,h,V.value,V.valueAsNumber,V.isOutOfRange,i,o,kn,dt,ct,Mt,ne,Zt]);return{value:at(V.value),valueAsNumber:V.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[w1e,fb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[C1e,G7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),q7=Pe(function(t,n){const r=Ri("NumberInput",t),i=vn(t),o=p7(i),{htmlProps:a,...s}=S1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(C1e,{value:l},le.createElement(w1e,{value:r},le.createElement(we.div,{...a,ref:n,className:RB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});q7.displayName="NumberInput";var NB=Pe(function(t,n){const r=fb();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});NB.displayName="NumberInputStepper";var K7=Pe(function(t,n){const{getInputProps:r}=G7(),i=r(t,n),o=fb();return le.createElement(we.input,{...i,className:RB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});K7.displayName="NumberInputField";var DB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Y7=Pe(function(t,n){const r=fb(),{getDecrementButtonProps:i}=G7(),o=i(t,n);return x(DB,{...o,__css:r.stepper,children:t.children??x(p1e,{})})});Y7.displayName="NumberDecrementStepper";var Z7=Pe(function(t,n){const{getIncrementButtonProps:r}=G7(),i=r(t,n),o=fb();return x(DB,{...i,__css:o.stepper,children:t.children??x(g1e,{})})});Z7.displayName="NumberIncrementStepper";var Hv=(...e)=>e.filter(Boolean).join(" ");function _1e(e,...t){return k1e(e)?e(...t):e}var k1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function E1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[P1e,sh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[L1e,Wv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wp={click:"click",hover:"hover"};function T1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=wp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:P,onClose:E,onOpen:k,onToggle:L}=Hz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[H,W]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),ne=i??j,[ie,J,q,V]=["popover-trigger","popover-content","popover-header","popover-body"].map(dt=>`${dt}-${ne}`),{referenceRef:G,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:xe}=$z({...w,enabled:P||!!b}),Se=cpe({isOpen:P,ref:N});qde({enabled:P,ref:O}),$fe(N,{focusRef:O,visible:P,shouldFocus:o&&u===wp.click}),Wfe(N,{focusRef:r,visible:P,shouldFocus:a&&u===wp.click});const He=Wz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),Ue=C.exports.useCallback((dt={},Mt=null)=>{const ct={...dt,style:{...dt.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(N,Mt),children:He?dt.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:il(dt.onKeyDown,xt=>{n&&xt.key==="Escape"&&E()}),onBlur:il(dt.onBlur,xt=>{const kn=qT(xt),Et=qS(N.current,kn),Zt=qS(O.current,kn);P&&t&&(!Et&&!Zt)&&E()}),"aria-labelledby":H?q:void 0,"aria-describedby":Y?V:void 0};return u===wp.hover&&(ct.role="tooltip",ct.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0}),ct.onMouseLeave=il(dt.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),g))})),ct},[He,J,H,q,Y,V,u,n,E,P,t,g,l,s]),ut=C.exports.useCallback((dt={},Mt=null)=>X({...dt,style:{visibility:P?"visible":"hidden",...dt.style}},Mt),[P,X]),Xe=C.exports.useCallback((dt,Mt=null)=>({...dt,ref:$n(Mt,I,G)}),[I,G]),et=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(dt=>{I.current==null&&G(dt)},[G]),At=C.exports.useCallback((dt={},Mt=null)=>{const ct={...dt,ref:$n(O,Mt,at),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":J};return u===wp.click&&(ct.onClick=il(dt.onClick,L)),u===wp.hover&&(ct.onFocus=il(dt.onFocus,()=>{et.current===void 0&&k()}),ct.onBlur=il(dt.onBlur,xt=>{const kn=qT(xt),Et=!qS(N.current,kn);P&&t&&Et&&E()}),ct.onKeyDown=il(dt.onKeyDown,xt=>{xt.key==="Escape"&&E()}),ct.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0,et.current=window.setTimeout(()=>k(),h)}),ct.onMouseLeave=il(dt.onMouseLeave,()=>{D.current=!1,et.current&&(clearTimeout(et.current),et.current=void 0),tt.current=window.setTimeout(()=>{D.current===!1&&E()},g)})),ct},[ie,P,J,u,at,L,k,t,E,h,g]);C.exports.useEffect(()=>()=>{et.current&&clearTimeout(et.current),tt.current&&clearTimeout(tt.current)},[]);const wt=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:q,ref:$n(Mt,ct=>{W(!!ct)})}),[q]),Ae=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:V,ref:$n(Mt,ct=>{de(!!ct)})}),[V]);return{forceUpdate:xe,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:Xe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ut,getPopoverProps:Ue,getTriggerProps:At,getHeaderProps:wt,getBodyProps:Ae}}function qS(e,t){return e===t||e?.contains(t)}function qT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function X7(e){const t=Ri("Popover",e),{children:n,...r}=vn(e),i=U0(),o=T1e({...r,direction:i.direction});return x(P1e,{value:o,children:x(L1e,{value:t,children:_1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}X7.displayName="Popover";function Q7(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=sh(),a=Wv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:Hv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}Q7.displayName="PopoverArrow";var A1e=Pe(function(t,n){const{getBodyProps:r}=sh(),i=Wv();return le.createElement(we.div,{...r(t,n),className:Hv("chakra-popover__body",t.className),__css:i.body})});A1e.displayName="PopoverBody";var I1e=Pe(function(t,n){const{onClose:r}=sh(),i=Wv();return x(lb,{size:"sm",onClick:r,className:Hv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});I1e.displayName="PopoverCloseButton";function M1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var O1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},R1e=we(Ml.section),zB=Pe(function(t,n){const{variants:r=O1e,...i}=t,{isOpen:o}=sh();return le.createElement(R1e,{ref:n,variants:M1e(r),initial:!1,animate:o?"enter":"exit",...i})});zB.displayName="PopoverTransition";var J7=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=sh(),u=Wv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(zB,{...i,...a(o,n),onAnimationComplete:E1e(l,o.onAnimationComplete),className:Hv("chakra-popover__content",t.className),__css:h}))});J7.displayName="PopoverContent";var N1e=Pe(function(t,n){const{getHeaderProps:r}=sh(),i=Wv();return le.createElement(we.header,{...r(t,n),className:Hv("chakra-popover__header",t.className),__css:i.header})});N1e.displayName="PopoverHeader";function e_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=sh();return C.exports.cloneElement(t,n(t.props,t.ref))}e_.displayName="PopoverTrigger";function D1e(e,t,n){return(e-t)*100/(n-t)}var z1e=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),B1e=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),F1e=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),$1e=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function BB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=D1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var FB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${B1e} 2s linear infinite`:void 0},...r})};FB.displayName="Shape";var PC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});PC.displayName="Circle";var H1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=BB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,k=v?{css:{animation:`${z1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},te(FB,{size:n,isIndeterminate:v,children:[x(PC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(PC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});H1e.displayName="CircularProgress";var[W1e,V1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),U1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=BB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...V1e().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),$B=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),P=Ri("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),k={animation:`${$1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${F1e} 1s ease infinite normal none running`}},N={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:N,...w},te(W1e,{value:P,children:[x(U1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:E,title:v,role:b}),l]}))});$B.displayName="Progress";var j1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});j1e.displayName="CircularProgressLabel";var G1e=(...e)=>e.filter(Boolean).join(" "),q1e=e=>e?"":void 0;function K1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var HB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:G1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});HB.displayName="SelectField";var WB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,P]=K1e(b,xX),E=h7(P),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(HB,{ref:t,height:u??l,minH:h??g,placeholder:o,...E,__css:L,children:e.children}),x(VB,{"data-disabled":q1e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});WB.displayName="Select";var Y1e=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Z1e=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),VB=e=>{const{children:t=x(Y1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Z1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};VB.displayName="SelectIcon";function X1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Q1e(e){const t=ege(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function UB(e){return!!e.touches}function J1e(e){return UB(e)&&e.touches.length>1}function ege(e){return e.view??window}function tge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function nge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function jB(e,t="page"){return UB(e)?tge(e,t):nge(e,t)}function rge(e){return t=>{const n=Q1e(t);(!n||n&&t.button===0)&&e(t)}}function ige(e,t=!1){function n(i){e(i,{point:jB(i)})}return t?rge(n):n}function E3(e,t,n,r){return X1e(e,t,ige(n,t==="pointerdown"),r)}function GB(e){const t=C.exports.useRef(null);return t.current=e,t}var oge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,J1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:jB(e)},{timestamp:i}=kP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,KS(r,this.history)),this.removeListeners=lge(E3(this.win,"pointermove",this.onPointerMove),E3(this.win,"pointerup",this.onPointerUp),E3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=KS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=kP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,MQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=KS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),OQ.update(this.updatePoint)}};function KT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function KS(e,t){return{point:e.point,delta:KT(e.point,t[t.length-1]),offset:KT(e.point,t[0]),velocity:sge(t,.1)}}var age=e=>e*1e3;function sge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>age(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function lge(...e){return t=>e.reduce((n,r)=>r(n),t)}function YS(e,t){return Math.abs(e-t)}function YT(e){return"x"in e&&"y"in e}function uge(e,t){if(typeof e=="number"&&typeof t=="number")return YS(e,t);if(YT(e)&&YT(t)){const n=YS(e.x,t.x),r=YS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function qB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=GB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new oge(v,h.current,s)}return E3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function cge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function fge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function KB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return dge(()=>{const a=e(),s=a.map((l,u)=>cge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(fge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function hge(e){return typeof e=="object"&&e!==null&&"current"in e}function pge(e){const[t]=KB({observeMutation:!1,getNodes(){return[hge(e)?e.current:e]}});return t}var gge=Object.getOwnPropertyNames,mge=(e,t)=>function(){return e&&(t=(0,e[gge(e)[0]])(e=0)),t},yd=mge({"../../../react-shim.js"(){}});yd();yd();yd();var Ta=e=>e?"":void 0,d0=e=>e?!0:void 0,bd=(...e)=>e.filter(Boolean).join(" ");yd();function f0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function vge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Gg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P3={width:0,height:0},Ey=e=>e||P3;function YB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??P3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Gg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>Ey(w).height>Ey(P).height?w:P,P3):r.reduce((w,P)=>Ey(w).width>Ey(P).width?w:P,P3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Gg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Gg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Gg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function ZB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function yge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...N}=e,D=dr(m),z=dr(v),H=dr(w),W=ZB({isReversed:a,direction:s,orientation:l}),[Y,de]=V4({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,ne]=C.exports.useState(!1),[ie,J]=C.exports.useState(!1),[q,V]=C.exports.useState(-1),G=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>l0(Fe,t,n)),me=O*b,xe=bge(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=xe;const He=X.map(Fe=>n-Fe+t),ut=(W?He:X).map(Fe=>M5(Fe,t,n)),Xe=l==="vertical",et=C.exports.useRef(null),tt=C.exports.useRef(null),at=KB({getNodes(){const Fe=tt.current,pt=Fe?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),At=C.exports.useId(),Ae=vge(u??At),dt=C.exports.useCallback(Fe=>{var pt;if(!et.current)return;Se.current.eventSource="pointer";const rt=et.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((pt=Fe.touches)==null?void 0:pt[0])??Fe,Qn=Xe?rt.bottom-Qt:Nt-rt.left,lo=Xe?rt.height:rt.width;let pi=Qn/lo;return W&&(pi=1-pi),tz(pi,t,n)},[Xe,W,n,t]),Mt=(n-t)/10,ct=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,pt){if(!G)return;const rt=Se.current.valueBounds[Fe];pt=parseFloat(mC(pt,rt.min,ct)),pt=l0(pt,rt.min,rt.max);const Nt=[...Se.current.value];Nt[Fe]=pt,de(Nt)},setActiveIndex:V,stepUp(Fe,pt=ct){const rt=Se.current.value[Fe],Nt=W?rt-pt:rt+pt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,pt=ct){const rt=Se.current.value[Fe],Nt=W?rt+pt:rt-pt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ct,W,de,G]),kn=C.exports.useCallback(Fe=>{const pt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(q),ArrowUp:()=>xt.stepUp(q),ArrowLeft:()=>xt.stepDown(q),ArrowDown:()=>xt.stepDown(q),PageUp:()=>xt.stepUp(q,Mt),PageDown:()=>xt.stepDown(q,Mt),Home:()=>{const{min:Qt}=xe[q];xt.setValueAtIndex(q,Qt)},End:()=>{const{max:Qt}=xe[q];xt.setValueAtIndex(q,Qt)}}[pt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,q,Mt,xe]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>YB({isReversed:W,orientation:l,thumbRects:at,thumbPercents:ut}),[W,l,ut,at]),Me=C.exports.useCallback(Fe=>{var pt;const rt=Fe??q;if(rt!==-1&&I){const Nt=Ae.getThumb(rt),Qt=(pt=tt.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,q,Ae]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=Fe=>{const pt=dt(Fe)||0,rt=Se.current.value.map(pi=>Math.abs(pi-pt)),Nt=Math.min(...rt);let Qt=rt.indexOf(Nt);const Qn=rt.filter(pi=>pi===Nt);Qn.length>1&&pt>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),V(Qt),xt.setValueAtIndex(Qt,pt),Me(Qt)},Xt=Fe=>{if(q==-1)return;const pt=dt(Fe)||0;V(q),xt.setValueAtIndex(q,pt),Me(q)};qB(tt,{onPanSessionStart(Fe){!G||(ne(!0),Je(Fe),D?.(Se.current.value))},onPanSessionEnd(){!G||(ne(!1),z?.(Se.current.value))},onPan(Fe){!G||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},pt=null)=>({...Fe,...N,id:Ae.root,ref:$n(pt,tt),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[N,h,ie,Zt,Ae]),Ee=C.exports.useCallback((Fe={},pt=null)=>({...Fe,ref:$n(pt,et),id:Ae.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Ae]),It=C.exports.useCallback((Fe={},pt=null)=>({...Fe,ref:pt,id:Ae.innerTrack,style:{...Fe.style,...yn}}),[yn,Ae]),Ne=C.exports.useCallback((Fe,pt=null)=>{const{index:rt,...Nt}=Fe,Qt=X[rt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=xe[rt];return{...Nt,ref:pt,role:"slider",tabIndex:G?0:void 0,id:Ae.getThumb(rt),"data-active":Ta(j&&q===rt),"aria-valuetext":H?.(Qt)??P?.[rt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E?.[rt],"aria-labelledby":E?.[rt]?void 0:k?.[rt],style:{...Fe.style,...Et(rt)},onKeyDown:f0(Fe.onKeyDown,kn),onFocus:f0(Fe.onFocus,()=>{J(!0),V(rt)}),onBlur:f0(Fe.onBlur,()=>{J(!1),V(-1)})}},[Ae,X,xe,G,j,q,H,P,l,h,g,E,k,Et,kn,J]),st=C.exports.useCallback((Fe={},pt=null)=>({...Fe,ref:pt,id:Ae.output,htmlFor:X.map((rt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,X]),ln=C.exports.useCallback((Fe,pt=null)=>{const{value:rt,...Nt}=Fe,Qt=!(rtn),Qn=rt>=X[0]&&rt<=X[X.length-1];let lo=M5(rt,t,n);lo=W?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...Gg({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,W,n,t,l,X,Ae]),Dn=C.exports.useCallback((Fe,pt=null)=>{const{index:rt,...Nt}=Fe;return{...Nt,ref:pt,id:Ae.getInput(rt),type:"hidden",value:X[rt],name:Array.isArray(L)?L[rt]:`${L}-${rt}`}},[L,X,Ae]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ut[Fe],getThumbMinValue:Fe=>xe[Fe].min,getThumbMaxValue:Fe=>xe[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:It,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Dn,getOutputProps:st}}function bge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[xge,hb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Sge,t_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),XB=Pe(function(t,n){const r=Ri("Slider",t),i=vn(t),{direction:o}=U0();i.direction=o;const{getRootProps:a,...s}=yge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(xge,{value:l},le.createElement(Sge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});XB.defaultProps={orientation:"horizontal"};XB.displayName="RangeSlider";var wge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=hb(),a=t_(),s=r(t,n);return le.createElement(we.div,{...s,className:bd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});wge.displayName="RangeSliderThumb";var Cge=Pe(function(t,n){const{getTrackProps:r}=hb(),i=t_(),o=r(t,n);return le.createElement(we.div,{...o,className:bd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Cge.displayName="RangeSliderTrack";var _ge=Pe(function(t,n){const{getInnerTrackProps:r}=hb(),i=t_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});_ge.displayName="RangeSliderFilledTrack";var kge=Pe(function(t,n){const{getMarkerProps:r}=hb(),i=r(t,n);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",t.className)})});kge.displayName="RangeSliderMark";yd();yd();function Ege(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,N=dr(m),D=dr(v),z=dr(w),H=ZB({isReversed:a,direction:s,orientation:l}),[W,Y]=V4({value:i,defaultValue:o??Lge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[ne,ie]=C.exports.useState(!1),J=!(h||g),q=(n-t)/10,V=b||(n-t)/100,G=l0(W,t,n),Q=n-G+t,me=M5(H?Q:G,t,n),xe=l==="vertical",Se=GB({min:t,max:n,step:b,isDisabled:h,value:G,isInteractive:J,isReversed:H,isVertical:xe,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ut=C.exports.useRef(null),Xe=C.exports.useId(),et=u??Xe,[tt,at]=[`slider-thumb-${et}`,`slider-track-${et}`],At=C.exports.useCallback(Ne=>{var st;if(!He.current)return;const ln=Se.current;ln.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:pt}=((st=Ne.touches)==null?void 0:st[0])??Ne,rt=xe?Dn.bottom-pt:Fe-Dn.left,Nt=xe?Dn.height:Dn.width;let Qt=rt/Nt;H&&(Qt=1-Qt);let Qn=tz(Qt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(mC(Qn,ln.min,ln.step))),Qn=l0(Qn,ln.min,ln.max),Qn},[xe,H,Se]),wt=C.exports.useCallback(Ne=>{const st=Se.current;!st.isInteractive||(Ne=parseFloat(mC(Ne,st.min,V)),Ne=l0(Ne,st.min,st.max),Y(Ne))},[V,Y,Se]),Ae=C.exports.useMemo(()=>({stepUp(Ne=V){const st=H?G-Ne:G+Ne;wt(st)},stepDown(Ne=V){const st=H?G+Ne:G-Ne;wt(st)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,H,G,V,o]),dt=C.exports.useCallback(Ne=>{const st=Se.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(q),PageDown:()=>Ae.stepDown(q),Home:()=>wt(st.min),End:()=>wt(st.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),st.eventSource="keyboard")},[Ae,wt,q,Se]),Mt=z?.(G)??P,ct=pge(Ue),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,st=ct??{width:0,height:0};return YB({isReversed:H,orientation:Ne.orientation,thumbRects:[st],thumbPercents:[me]})},[H,ct,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var st;return(st=Ue.current)==null?void 0:st.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[G,D]);function yn(Ne){const st=At(Ne);st!=null&&st!==Se.current.value&&Y(st)}qB(ut,{onPanSessionStart(Ne){const st=Se.current;!st.isInteractive||(j(!0),En(),yn(Ne),N?.(st.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},st=null)=>({...Ne,...O,ref:$n(st,ut),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Ta(ne),style:{...Ne.style,...kn}}),[O,h,ne,kn]),Je=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,He),id:at,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,at,Et]),Xt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,Ue),role:"slider",tabIndex:J?0:void 0,id:tt,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":G,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:f0(Ne.onKeyDown,dt),onFocus:f0(Ne.onFocus,()=>ie(!0)),onBlur:f0(Ne.onBlur,()=>ie(!1))}),[J,tt,de,Mt,t,n,G,l,h,g,E,k,xt,dt]),Ee=C.exports.useCallback((Ne,st=null)=>{const ln=!(Ne.valuen),Dn=G>=Ne.value,Fe=M5(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Pge({orientation:l,vertical:{bottom:H?`${100-Fe}%`:`${Fe}%`},horizontal:{left:H?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:st,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!ln),"data-highlighted":Ta(Dn),style:{...Ne.style,...pt}}},[h,H,n,t,l,G]),It=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,type:"hidden",value:G,name:L}),[L,G]);return{state:{value:G,isFocused:ne,isDragging:de},actions:Ae,getRootProps:Me,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:It}}function Pge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Lge(e,t){return t"}),[Age,gb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),n_=Pe((e,t)=>{const n=Ri("Slider",e),r=vn(e),{direction:i}=U0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Ege(r),l=a(),u=o({},t);return le.createElement(Tge,{value:s},le.createElement(Age,{value:n},le.createElement(we.div,{...l,className:bd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});n_.defaultProps={orientation:"horizontal"};n_.displayName="Slider";var QB=Pe((e,t)=>{const{getThumbProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__thumb",e.className),__css:r.thumb})});QB.displayName="SliderThumb";var JB=Pe((e,t)=>{const{getTrackProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__track",e.className),__css:r.track})});JB.displayName="SliderTrack";var eF=Pe((e,t)=>{const{getInnerTrackProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});eF.displayName="SliderFilledTrack";var LC=Pe((e,t)=>{const{getMarkerProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",e.className),__css:r.mark})});LC.displayName="SliderMark";var Ige=(...e)=>e.filter(Boolean).join(" "),ZT=e=>e?"":void 0,r_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=JD(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:Ige("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":ZT(s.isChecked),"data-hover":ZT(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});r_.displayName="Switch";var Z0=(...e)=>e.filter(Boolean).join(" ");function TC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Mge,tF,Oge,Rge]=fN();function Nge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=V4({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Oge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Dge,Vv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function zge(e){const{focusedIndex:t,orientation:n,direction:r}=Vv(),i=tF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:TC(e.onKeyDown,o)}}function Bge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Vv(),{index:u,register:h}=Rge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Tfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:TC(e.onClick,m)}),w="button";return{...b,id:nF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":rF(a,u),onFocus:t?void 0:TC(e.onFocus,v)}}var[Fge,$ge]=Cn({});function Hge(e){const t=Vv(),{id:n,selectedIndex:r}=t,o=ob(e.children).map((a,s)=>C.exports.createElement(Fge,{key:s,value:{isSelected:s===r,id:rF(n,s),tabId:nF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Wge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Vv(),{isSelected:o,id:a,tabId:s}=$ge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Wz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Vge(){const e=Vv(),t=tF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function nF(e,t){return`${e}--tab-${t}`}function rF(e,t){return`${e}--tabpanel-${t}`}var[Uge,Uv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),iF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Nge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return le.createElement(Mge,{value:l},le.createElement(Dge,{value:h},le.createElement(Uge,{value:r},le.createElement(we.div,{className:Z0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});iF.displayName="Tabs";var jge=Pe(function(t,n){const r=Vge(),i={...t.style,...r},o=Uv();return le.createElement(we.div,{ref:n,...t,className:Z0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});jge.displayName="TabIndicator";var Gge=Pe(function(t,n){const r=zge({...t,ref:n}),o={display:"flex",...Uv().tablist};return le.createElement(we.div,{...r,className:Z0("chakra-tabs__tablist",t.className),__css:o})});Gge.displayName="TabList";var oF=Pe(function(t,n){const r=Wge({...t,ref:n}),i=Uv();return le.createElement(we.div,{outline:"0",...r,className:Z0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});oF.displayName="TabPanel";var aF=Pe(function(t,n){const r=Hge(t),i=Uv();return le.createElement(we.div,{...r,width:"100%",ref:n,className:Z0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});aF.displayName="TabPanels";var sF=Pe(function(t,n){const r=Uv(),i=Bge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:Z0("chakra-tabs__tab",t.className),__css:o})});sF.displayName="Tab";var qge=(...e)=>e.filter(Boolean).join(" ");function Kge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Yge=["h","minH","height","minHeight"],lF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=h7(o),s=i?Kge(n,Yge):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:qge("chakra-textarea",r),__css:s})});lF.displayName="Textarea";function Zge(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function AC(e,...t){return Xge(e)?e(...t):e}var Xge=e=>typeof e=="function";function Qge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Jge=(e,t)=>e.find(n=>n.id===t);function XT(e,t){const n=uF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function uF(e,t){for(const[n,r]of Object.entries(e))if(Jge(r,t))return n}function eme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function tme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var nme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=rme(nme);function rme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=ime(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=XT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:cF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=uF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(XT(gl.getState(),i).position)}}var QT=0;function ime(e,t={}){QT+=1;const n=t.id??QT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ome=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(qD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(YD,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(ZD,{id:u?.title,children:i}),s&&x(KD,{id:u?.description,display:"block",children:s})),o&&x(lb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function cF(e={}){const{render:t,toastComponent:n=ome}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function ame(e,t){const n=i=>({...t,...i,position:Qge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=cF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...AC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...AC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function lh(e){const{theme:t}=uN();return C.exports.useMemo(()=>ame(t.direction,e),[e,t.direction])}var sme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},dF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=sme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=sle();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Zge(P,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>eme(a),[a]);return le.createElement(Ml.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},AC(n,{id:t,onClose:P})))});dF.displayName="ToastComponent";var lme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=dF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:tme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return te(Xn,{children:[n,x(ih,{...o,children:s})]})};function ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Pg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},IC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function fme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:k,gutter:L,offset:I,direction:O,...N}=e,{isOpen:D,onOpen:z,onClose:H}=Hz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=$z({enabled:D,placement:h,arrowPadding:P,modifiers:E,gutter:L,offset:I,direction:O}),ne=C.exports.useId(),J=`tooltip-${g??ne}`,q=C.exports.useRef(null),V=C.exports.useRef(),G=C.exports.useRef(),Q=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0),H()},[H]),X=hme(q,Q),me=C.exports.useCallback(()=>{if(!k&&!V.current){X();const tt=IC(q);V.current=tt.setTimeout(z,t)}},[X,k,z,t]),xe=C.exports.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0);const tt=IC(q);G.current=tt.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&xe()},[r,xe,D]),He=C.exports.useCallback(()=>{D&&a&&xe()},[a,xe,D]),Ue=C.exports.useCallback(tt=>{D&&tt.key==="Escape"&&xe()},[D,xe]);Ff(()=>B5(q),"keydown",s?Ue:void 0),Ff(()=>B5(q),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(V.current),clearTimeout(G.current)},[]),Ff(()=>q.current,"pointerleave",xe);const ut=C.exports.useCallback((tt={},at=null)=>({...tt,ref:$n(q,at,W),onPointerEnter:Pg(tt.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Pg(tt.onClick,Se),onPointerDown:Pg(tt.onPointerDown,He),onFocus:Pg(tt.onFocus,me),onBlur:Pg(tt.onBlur,xe),"aria-describedby":D?J:void 0}),[me,xe,He,D,J,Se,W]),Xe=C.exports.useCallback((tt={},at=null)=>Y({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},at),[Y,b,w]),et=C.exports.useCallback((tt={},at=null)=>{const At={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...N,...tt,id:J,role:"tooltip",style:At}},[N,J]);return{isOpen:D,show:me,hide:xe,getTriggerProps:ut,getTooltipProps:et,getTooltipPositionerProps:Xe,getArrowProps:j,getArrowInnerProps:de}}var ZS="chakra-ui:close-tooltip";function hme(e,t){return C.exports.useEffect(()=>{const n=B5(e);return n.addEventListener(ZS,t),()=>n.removeEventListener(ZS,t)},[t,e]),()=>{const n=B5(e),r=IC(e);n.dispatchEvent(new r.CustomEvent(ZS))}}var pme=we(Ml.div),Ui=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=U0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...P}=r,E=m??v??h??b;if(E){n.bg=E;const H=RX(i,"colors",E);n[Hr.arrowBg.var]=H}const k=fme({...P,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const H=C.exports.Children.only(o);I=C.exports.cloneElement(H,k.getTriggerProps(H.props,H.ref))}const O=!!l,N=k.getTooltipProps({},t),D=O?ume(N,["role","id"]):N,z=cme(N,["role","id"]);return a?te(Xn,{children:[I,x(pd,{children:k.isOpen&&le.createElement(ih,{...g},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},te(pme,{variants:dme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Xn,{children:o})});Ui.displayName="Tooltip";var gme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Cz,{environment:a,children:t});return x(xoe,{theme:o,cssVarsRoot:s,children:te(fR,{colorModeManager:n,options:o.config,children:[i?x($de,{}):x(Fde,{}),x(woe,{}),r?x(Vz,{zIndex:r,children:l}):l]})})};function mme({children:e,theme:t=doe,toastOptions:n,...r}){return te(gme,{theme:t,...r,children:[e,x(lme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:i_(e)?2:o_(e)?3:0}function h0(e,t){return X0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vme(e,t){return X0(e)===2?e.get(t):e[t]}function fF(e,t,n){var r=X0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function hF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function i_(e){return Cme&&e instanceof Map}function o_(e){return _me&&e instanceof Set}function bf(e){return e.o||e.t}function a_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=gF(e);delete t[nr];for(var n=p0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=yme),Object.freeze(e),t&&Zf(e,function(n,r){return s_(r,!0)},!0)),e}function yme(){ms(2)}function l_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function _l(e){var t=NC[e];return t||ms(18,e),t}function bme(e,t){NC[e]||(NC[e]=t)}function MC(){return mv}function XS(e,t){t&&(_l("Patches"),e.u=[],e.s=[],e.v=t)}function F5(e){OC(e),e.p.forEach(xme),e.p=null}function OC(e){e===mv&&(mv=e.l)}function JT(e){return mv={p:[],l:mv,h:e,m:!0,_:0}}function xme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function QS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||_l("ES5").S(t,e,r),r?(n[nr].P&&(F5(t),ms(4)),xu(e)&&(e=$5(t,e),t.l||H5(t,e)),t.u&&_l("Patches").M(n[nr].t,e,t.u,t.s)):e=$5(t,n,[]),F5(t),t.u&&t.v(t.u,t.s),e!==pF?e:void 0}function $5(e,t,n){if(l_(t))return t;var r=t[nr];if(!r)return Zf(t,function(o,a){return eA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return H5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=a_(r.k):r.o;Zf(r.i===3?new Set(i):i,function(o,a){return eA(e,r,i,o,a,n)}),H5(e,i,!1),n&&e.u&&_l("Patches").R(r,n,e.u,e.s)}return r.o}function eA(e,t,n,r,i,o){if(sd(i)){var a=$5(e,i,o&&t&&t.i!==3&&!h0(t.D,r)?o.concat(r):void 0);if(fF(n,r,a),!sd(a))return;e.m=!1}if(xu(i)&&!l_(i)){if(!e.h.F&&e._<1)return;$5(e,i),t&&t.A.l||H5(e,i)}}function H5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&s_(t,n)}function JS(e,t){var n=e[nr];return(n?bf(n):e)[t]}function tA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function e6(e){e.o||(e.o=a_(e.t))}function RC(e,t,n){var r=i_(t)?_l("MapSet").N(t,n):o_(t)?_l("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:MC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=vv;a&&(l=[s],u=qg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):_l("ES5").J(t,n);return(n?n.A:MC()).p.push(r),r}function Sme(e){return sd(e)||ms(22,e),function t(n){if(!xu(n))return n;var r,i=n[nr],o=X0(n);if(i){if(!i.P&&(i.i<4||!_l("ES5").K(i)))return i.t;i.I=!0,r=nA(n,o),i.I=!1}else r=nA(n,o);return Zf(r,function(a,s){i&&vme(i.t,a)===s||fF(r,a,t(s))}),o===3?new Set(r):r}(e)}function nA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return a_(e)}function wme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return vv.get(l,o)},set:function(l){var u=this[nr];vv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=p0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!h0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!hF(m,g))return!0}}var b=!!a[nr];return l.length!==p0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=_l("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Eme,mF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function aA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(c_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error(Hi(6));P=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Pme(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error(Hi(12));if(typeof n(void 0,{type:W5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function vF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function V5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return U5}function i(s,l){r(s)===U5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Mme=function(t,n){return t===n};function Ome(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?mve:gve;wF.useSyncExternalStore=D0.useSyncExternalStore!==void 0?D0.useSyncExternalStore:vve;(function(e){e.exports=wF})(SF);var CF={exports:{}},_F={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vb=C.exports,yve=SF.exports;function bve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xve=typeof Object.is=="function"?Object.is:bve,Sve=yve.useSyncExternalStore,wve=vb.useRef,Cve=vb.useEffect,_ve=vb.useMemo,kve=vb.useDebugValue;_F.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=wve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=_ve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,xve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Sve(e,o[0],o[1]);return Cve(function(){a.hasValue=!0,a.value=s},[s]),kve(s),s};(function(e){e.exports=_F})(CF);function Eve(e){e()}let kF=Eve;const Pve=e=>kF=e,Lve=()=>kF,ld=C.exports.createContext(null);function EF(){return C.exports.useContext(ld)}const Tve=()=>{throw new Error("uSES not initialized!")};let PF=Tve;const Ave=e=>{PF=e},Ive=(e,t)=>e===t;function Mve(e=ld){const t=e===ld?EF:()=>C.exports.useContext(e);return function(r,i=Ive){const{store:o,subscription:a,getServerState:s}=t(),l=PF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Ove=Mve();var Rve={exports:{}},On={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var f_=Symbol.for("react.element"),h_=Symbol.for("react.portal"),yb=Symbol.for("react.fragment"),bb=Symbol.for("react.strict_mode"),xb=Symbol.for("react.profiler"),Sb=Symbol.for("react.provider"),wb=Symbol.for("react.context"),Nve=Symbol.for("react.server_context"),Cb=Symbol.for("react.forward_ref"),_b=Symbol.for("react.suspense"),kb=Symbol.for("react.suspense_list"),Eb=Symbol.for("react.memo"),Pb=Symbol.for("react.lazy"),Dve=Symbol.for("react.offscreen"),LF;LF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case f_:switch(e=e.type,e){case yb:case xb:case bb:case _b:case kb:return e;default:switch(e=e&&e.$$typeof,e){case Nve:case wb:case Cb:case Pb:case Eb:case Sb:return e;default:return t}}case h_:return t}}}On.ContextConsumer=wb;On.ContextProvider=Sb;On.Element=f_;On.ForwardRef=Cb;On.Fragment=yb;On.Lazy=Pb;On.Memo=Eb;On.Portal=h_;On.Profiler=xb;On.StrictMode=bb;On.Suspense=_b;On.SuspenseList=kb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===wb};On.isContextProvider=function(e){return Va(e)===Sb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===f_};On.isForwardRef=function(e){return Va(e)===Cb};On.isFragment=function(e){return Va(e)===yb};On.isLazy=function(e){return Va(e)===Pb};On.isMemo=function(e){return Va(e)===Eb};On.isPortal=function(e){return Va(e)===h_};On.isProfiler=function(e){return Va(e)===xb};On.isStrictMode=function(e){return Va(e)===bb};On.isSuspense=function(e){return Va(e)===_b};On.isSuspenseList=function(e){return Va(e)===kb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===yb||e===xb||e===bb||e===_b||e===kb||e===Dve||typeof e=="object"&&e!==null&&(e.$$typeof===Pb||e.$$typeof===Eb||e.$$typeof===Sb||e.$$typeof===wb||e.$$typeof===Cb||e.$$typeof===LF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})(Rve);function zve(){const e=Lve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const pA={notify(){},get:()=>[]};function Bve(e,t){let n,r=pA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=zve())}function u(){n&&(n(),n=void 0,r.clear(),r=pA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const Fve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$ve=Fve?C.exports.useLayoutEffect:C.exports.useEffect;function Hve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Bve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return $ve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function TF(e=ld){const t=e===ld?EF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Wve=TF();function Vve(e=ld){const t=e===ld?Wve:TF(e);return function(){return t().dispatch}}const Uve=Vve();Ave(CF.exports.useSyncExternalStoreWithSelector);Pve(Il.exports.unstable_batchedUpdates);var p_="persist:",AF="persist/FLUSH",g_="persist/REHYDRATE",IF="persist/PAUSE",MF="persist/PERSIST",OF="persist/PURGE",RF="persist/REGISTER",jve=-1;function L3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L3=function(n){return typeof n}:L3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},L3(e)}function gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gve(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function r2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var i2e=5e3;function o2e(e,t){var n=e.version!==void 0?e.version:jve;e.debug;var r=e.stateReconciler===void 0?Kve:e.stateReconciler,i=e.getStoredState||Xve,o=e.timeout!==void 0?e.timeout:i2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=n2e(m,["_persist"]),w=b;if(g.type===MF){var P=!1,E=function(z,H){P||(g.rehydrate(e.key,z,H),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Yve(e)),v)return ru({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function(H,W){return Promise.resolve(H)};z(D,n).then(function(H){E(H)},function(H){E(void 0,H)})},function(D){E(void 0,D)}),ru({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===OF)return s=!0,g.result(Jve(e)),ru({},t(w,g),{_persist:v});if(g.type===AF)return g.result(a&&a.flush()),ru({},t(w,g),{_persist:v});if(g.type===IF)l=!0;else if(g.type===g_){if(s)return ru({},w,{_persist:ru({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=ru({},I,{_persist:ru({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var N=t(w,g);return N===w?h:u(ru({},N,{_persist:v}))}}function vA(e){return l2e(e)||s2e(e)||a2e()}function a2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function s2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function l2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:NF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case RF:return zC({},t,{registry:[].concat(vA(t.registry),[n.key])});case g_:var r=t.registry.indexOf(n.key),i=vA(t.registry);return i.splice(r,1),zC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function d2e(e,t,n){var r=n||!1,i=c_(c2e,NF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:RF,key:u})},a=function(u,h,g){var m={type:g_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=zC({},i,{purge:function(){var u=[];return e.dispatch({type:OF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:AF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:IF})},persist:function(){e.dispatch({type:MF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var m_={},v_={};v_.__esModule=!0;v_.default=p2e;function T3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T3=function(n){return typeof n}:T3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T3(e)}function o6(){}var f2e={getItem:o6,setItem:o6,removeItem:o6};function h2e(e){if((typeof self>"u"?"undefined":T3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function p2e(e){var t="".concat(e,"Storage");return h2e(t)?self[t]:f2e}m_.__esModule=!0;m_.default=v2e;var g2e=m2e(v_);function m2e(e){return e&&e.__esModule?e:{default:e}}function v2e(e){var t=(0,g2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var DF=void 0,y2e=b2e(m_);function b2e(e){return e&&e.__esModule?e:{default:e}}var x2e=(0,y2e.default)("local");DF=x2e;var zF={},BF={},Xf={};Object.defineProperty(Xf,"__esModule",{value:!0});Xf.PLACEHOLDER_UNDEFINED=Xf.PACKAGE_NAME=void 0;Xf.PACKAGE_NAME="redux-deep-persist";Xf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var y_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(y_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Xf,n=y_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,ne,ie){ie||(ie=new Set([j])),ne||(ne="");for(const J in j){const q=ne?`${ne}.${J}`:J,V=j[J];if((0,e.isObjectLike)(V))return ie.has(V)?`${ne}.${J}:`:(ie.add(V),(0,e.getCircularPath)(V,q,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const ne=(0,e.isArray)(j)?[]:{};for(const ie in j){const J=j[ie];ne[ie]=(0,e._cloneDeep)(J)}return ne};e._cloneDeep=m;const v=function(j){const ne=(0,e.getCircularPath)(j);if(ne)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${ne}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,ne){if(j===ne)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(ne))return ne;const ie=(0,e.cloneDeep)(j),J=(0,e.cloneDeep)(ne),q=Object.keys(ie).reduce((G,Q)=>(h.call(J,Q)||(G[Q]=void 0),G),{});if((0,e.isDate)(ie)||(0,e.isDate)(J))return ie.valueOf()===J.valueOf()?{}:J;const V=Object.keys(J).reduce((G,Q)=>{if(!h.call(ie,Q))return G[Q]=J[Q],G;const X=(0,e.difference)(ie[Q],J[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(J)||!(0,e.isArray)(ie)&&(0,e.isArray)(J)?J:G:(G[Q]=X,G)},q);return delete V._persist,V};e.difference=b;const w=function(j,ne){return ne.reduce((ie,J)=>{if(ie){const q=parseInt(J,10),V=(0,e.isIntegerString)(J)&&q<0?ie.length+q:J;return(0,e.isString)(ie)?ie.charAt(V):ie[V]}},j)};e.path=w;const P=function(j,ne){return[...j].reverse().reduce((q,V,G)=>{const Q=(0,e.isIntegerString)(V)?[]:{};return Q[V]=G===0?ne:q,Q},{})};e.assocPath=P;const E=function(j,ne){const ie=(0,e.cloneDeep)(j);return ne.reduce((J,q,V)=>(V===ne.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[q],J&&J[q]),ie),ie};e.dissocPath=E;const k=function(j,ne,...ie){if(!ie||!ie.length)return ne;const J=ie.shift(),{preservePlaceholder:q,preserveUndefined:V}=j;if((0,e.isObjectLike)(ne)&&(0,e.isObjectLike)(J))for(const G in J)if((0,e.isObjectLike)(J[G])&&(0,e.isObjectLike)(ne[G]))ne[G]||(ne[G]={}),k(j,ne[G],J[G]);else if((0,e.isArray)(ne)){let Q=J[G];const X=q?t.PLACEHOLDER_UNDEFINED:void 0;V||(Q=typeof Q<"u"?Q:ne[parseInt(G,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,ne[parseInt(G,10)]=Q}else{const Q=J[G]!==t.PLACEHOLDER_UNDEFINED?J[G]:void 0;ne[G]=Q}return k(j,ne,...ie)},L=function(j,ne,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(ne))};e.mergeDeep=L;const I=function(j,ne=[],ie,J,q){if(!(0,e.isObjectLike)(j))return j;for(const V in j){const G=j[V],Q=(0,e.isArray)(j),X=J?J+"."+V:V;G===null&&(ie===n.ConfigType.WHITELIST&&ne.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&ne.indexOf(X)!==-1)&&Q&&(j[parseInt(V,10)]=void 0),G===void 0&&q&&ie===n.ConfigType.BLACKLIST&&ne.indexOf(X)===-1&&Q&&(j[parseInt(V,10)]=t.PLACEHOLDER_UNDEFINED),I(G,ne,ie,X,q)}},O=function(j,ne,ie,J){const q=(0,e.cloneDeep)(j);return I(q,ne,ie,"",J),q};e.preserveUndefined=O;const N=function(j,ne,ie){return ie.indexOf(j)===ne};e.unique=N;const D=function(j){return j.reduce((ne,ie)=>{const J=j.filter(me=>me===ie),q=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:V,subsets:G}=ne,Q=J.length>1&&V.indexOf(ie)===-1,X=q.length>1;return{duplicates:[...V,...Q?J:[]],subsets:[...G,...X?q:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,ne,ie){const J=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",q=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,V=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(ne)||ne.length<1)throw new Error(`${q} Name (key) of reducer is required. ${V}`);if(!j||!j.length)return;const{duplicates:G,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(G.length>1)throw new Error(`${q} Duplicated paths. + + ${JSON.stringify(G)} + + ${V}`);if(Q.length>1)throw new Error(`${q} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(Q)} + + ${V}`)};e.singleTransformValidator=z;const H=function(j){if(!(0,e.isArray)(j))return;const ne=j?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(ne.length){const ie=ne.filter((J,q)=>ne.indexOf(J)!==q);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=H;const W=function({whitelist:j,blacklist:ne}){if(j&&j.length&&ne&&ne.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:ie,subsets:J}=(0,e.findDuplicatesAndSubsets)(j);(0,e.throwError)({duplicates:ie,subsets:J},"whitelist")}if(ne){const{duplicates:ie,subsets:J}=(0,e.findDuplicatesAndSubsets)(ne);(0,e.throwError)({duplicates:ie,subsets:J},"blacklist")}};e.configValidator=W;const Y=function({duplicates:j,subsets:ne},ie){if(j.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. + + ${JSON.stringify(j)}`);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(ne)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((ne,ie)=>{const J=ie.split("."),q=J[0],V=J.slice(1).join(".")||void 0,G=ne.filter(X=>Object.keys(X)[0]===q)[0],Q=G?Object.values(G)[0]:void 0;return G||ne.push({[q]:V?[V]:void 0}),G&&!Q&&V&&(G[q]=[V]),G&&Q&&V&&Q.push(V),ne},[]):[]};e.getRootKeysGroup=de})(BF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!P(k)&&g?g(E,k,L):E,out:(E,k,L)=>!P(k)&&m?m(E,k,L):E,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const k=(0,n.cloneDeep)(v);let L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(E,w),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:P,rootReducer:E}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(E(void 0,{type:""})),N=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>N.indexOf(de)===-1&&D.indexOf(de)===-1),H=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...H,...W,...Y,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(zF);const A3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),S2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return b_(r)?r:!1},b_=e=>Boolean(typeof e=="string"?S2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),G5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),w2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,P=1,E=2,k=4,L=8,I=16,O=32,N=64,D=128,z=256,H=512,W=30,Y="...",de=800,j=16,ne=1,ie=2,J=3,q=1/0,V=9007199254740991,G=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,xe=X>>>1,Se=[["ary",D],["bind",P],["bindKey",E],["curry",L],["curryRight",I],["flip",H],["partial",O],["partialRight",N],["rearg",z]],He="[object Arguments]",Ue="[object Array]",ut="[object AsyncFunction]",Xe="[object Boolean]",et="[object Date]",tt="[object DOMException]",at="[object Error]",At="[object Function]",wt="[object GeneratorFunction]",Ae="[object Map]",dt="[object Number]",Mt="[object Null]",ct="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",It="[object Float32Array]",Ne="[object Float64Array]",st="[object Int8Array]",ln="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",pt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,o1=RegExp(pi.source),ga=RegExp(As.source),yh=/<%-([\s\S]+?)%>/g,a1=/<%([\s\S]+?)%>/g,Mu=/<%=([\s\S]+?)%>/g,bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,s1=RegExp(kd.source),Ou=/^\s+/,Ed=/\s/,l1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ru=/,? & /,u1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,c1=/[()=,{}\[\]\/\s]/,d1=/\\(\\)?/g,f1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,h1=/^[-+]0x[0-9a-f]+$/i,p1=/^0b[01]+$/i,g1=/^\[object .+?Constructor\]$/,m1=/^0o[0-7]+$/i,v1=/^(?:0|[1-9]\d*)$/,y1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,b1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Dl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",zl=Nl+Dl+Os,Sh="\\u2700-\\u27bf",Nu="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+zl+"]",Pd="\\d+",Bl="["+Sh+"]",qa="["+Nu+"]",Ld="[^"+ja+Ur+Pd+Sh+Nu+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",wh="(?:"+Ga+"|"+gi+")",Ch="[^"+ja+"]",Td="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",zs="\\u200d",Fl="(?:"+qa+"|"+Ld+")",x1="(?:"+uo+"|"+Ld+")",Du="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ad=wh+"?",Bu="["+kr+"]?",ma="(?:"+zs+"(?:"+[Ch,Td,Ds].join("|")+")"+Bu+Ad+")*",Id="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$l="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Ad+ma,_h="(?:"+[Bl,Td,Ds].join("|")+")"+Ht,Fu="(?:"+[Ch+Ga+"?",Ga,Td,Ds,Ns].join("|")+")",$u=RegExp(zo,"g"),kh=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Fu+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+Du+"(?="+[jr,uo,"$"].join("|")+")",x1+"+"+zu+"(?="+[jr,uo+Fl,"$"].join("|")+")",uo+"?"+Fl+"+"+Du,uo+"+"+zu,$l,Id,Pd,_h].join("|"),"g"),Md=RegExp("["+zs+ja+zl+kr+"]"),Eh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Od=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ph=-1,un={};un[It]=un[Ne]=un[st]=un[ln]=un[Dn]=un[Fe]=un[pt]=un[rt]=un[Nt]=!0,un[He]=un[Ue]=un[qt]=un[Xe]=un[Ee]=un[et]=un[at]=un[At]=un[Ae]=un[dt]=un[ct]=un[Et]=un[Zt]=un[En]=un[Je]=!1;var Wt={};Wt[He]=Wt[Ue]=Wt[qt]=Wt[Ee]=Wt[Xe]=Wt[et]=Wt[It]=Wt[Ne]=Wt[st]=Wt[ln]=Wt[Dn]=Wt[Ae]=Wt[dt]=Wt[ct]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[pt]=Wt[rt]=Wt[Nt]=!0,Wt[at]=Wt[At]=Wt[Je]=!1;var Lh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},S1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ye=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,fn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,hn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,va=hn&&hn.isRegExp,Bs=hn&&hn.isSet,w1=hn&&hn.isTypedArray;function mi(oe,be,ve){switch(ve.length){case 0:return oe.call(be);case 1:return oe.call(be,ve[0]);case 2:return oe.call(be,ve[0],ve[1]);case 3:return oe.call(be,ve[0],ve[1],ve[2])}return oe.apply(be,ve)}function C1(oe,be,ve,qe){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Th(oe,be,ve){for(var qe=-1,_t=oe==null?0:oe.length;++qe<_t;)if(ve(be,oe[qe]))return!0;return!1}function Bn(oe,be){for(var ve=-1,qe=oe==null?0:oe.length,_t=Array(qe);++ve-1;);return ve}function Ka(oe,be){for(var ve=oe.length;ve--&&Vu(be,oe[ve],0)>-1;);return ve}function k1(oe,be){for(var ve=oe.length,qe=0;ve--;)oe[ve]===be&&++qe;return qe}var i2=zd(Lh),Ya=zd(S1);function $s(oe){return"\\"+re[oe]}function Ih(oe,be){return oe==null?n:oe[be]}function Wl(oe){return Md.test(oe)}function Mh(oe){return Eh.test(oe)}function o2(oe){for(var be,ve=[];!(be=oe.next()).done;)ve.push(be.value);return ve}function Oh(oe){var be=-1,ve=Array(oe.size);return oe.forEach(function(qe,_t){ve[++be]=[_t,qe]}),ve}function Rh(oe,be){return function(ve){return oe(be(ve))}}function Ho(oe,be){for(var ve=-1,qe=oe.length,_t=0,Jt=[];++ve-1}function _2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=w2,Wo.prototype.delete=C2,Wo.prototype.get=$1,Wo.prototype.has=H1,Wo.prototype.set=_2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,R,F){var K,ee=p&g,ce=p&m,_e=p&v;if(S&&(K=R?S(c,A,R,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=vV(c),!ee)return wi(c,K)}else{var Te=si(c),je=Te==At||Te==wt;if(vc(c))return Xs(c,ee);if(Te==ct||Te==He||je&&!R){if(K=ce||je?{}:lk(c),!ee)return ce?og(c,sc(K,c)):yo(c,Qe(K,c))}else{if(!Wt[Te])return R?c:{};K=yV(c,Te,ee)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),zk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Nk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?xo:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Wh(c){var p=li(c);return function(S){return Vh(S,c,p)}}function Vh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var R=S[A],F=p[R],K=c[R];if(K===n&&!(R in c)||!F(K))return!1}return!0}function j1(c,p,S){if(typeof c!="function")throw new vi(a);return cg(function(){c.apply(n,S)},p)}function lc(c,p,S,A){var R=-1,F=Ni,K=!0,ee=c.length,ce=[],_e=p.length;if(!ee)return ce;S&&(p=Bn(p,Er(S))),A?(F=Th,K=!1):p.length>=i&&(F=ju,K=!1,p=new Sa(p));e:for(;++RR?0:R+S),A=A===n||A>R?R:Dt(A),A<0&&(A+=R),A=S>A?0:Fk(A);S0&&S(ee)?p>1?Lr(ee,p-1,S,A,R):ya(R,ee):A||(R[R.length]=ee)}return R}var jh=Qs(),go=Qs(!0);function qo(c,p){return c&&jh(c,p,li)}function mo(c,p){return c&&go(c,p,li)}function Gh(c,p){return ho(p,function(S){return Xl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Kh(c,p){return c!=null&&tn.call(c,p)}function Yh(c,p){return c!=null&&p in cn(c)}function Zh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Te=-1,je=ee[0];e:for(;++Te-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function ef(c,p){for(var S=c?p.length:0,A=S-1;S--;){var R=p[S];if(S==A||R!==F){var F=R;Zl(R)?jd.call(c,R,1):ap(c,R)}}return c}function tf(c,p){return c+Ul(R1()*(p-c+1))}function Ks(c,p,S,A){for(var R=-1,F=vr(Kd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++R]=c,c+=S;return K}function pc(c,p){var S="";if(!c||p<1||p>V)return S;do p%2&&(S+=c),p=Ul(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return _x(dk(c,p,So),c+"")}function tp(c){return ac(hp(c))}function nf(c,p){var S=hp(c);return M2(S,Gl(p,0,S.length))}function Kl(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var R=-1,F=p.length,K=F-1,ee=c;ee!=null&&++RR?0:R+p),S=S>R?R:S,S<0&&(S+=R),R=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(R);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:$(c);if(_e)return Hd(_e);K=!1,R=ju,ce=new Sa}else ce=p?[]:ee;e:for(;++A=A?c:Ar(c,p,S)}var tg=c2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Zu?Zu(S):new c.constructor(S);return c.copy(A),A}function ng(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Yl(c,p){var S=p?ng(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function L2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Zd?cn(Zd.call(c)):{}}function T2(c,p){var S=p?ng(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function rg(c,p){if(c!==p){var S=c!==n,A=c===null,R=c===c,F=Yo(c),K=p!==n,ee=p===null,ce=p===p,_e=Yo(p);if(!ee&&!_e&&!F&&c>p||F&&K&&ce&&!ee&&!_e||A&&K&&ce||!S&&ce||!R)return 1;if(!A&&!F&&!_e&&c=ee)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function A2(c,p,S,A){for(var R=-1,F=c.length,K=S.length,ee=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Te=!A;++ee1?S[R-1]:n,K=R>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(R--,F):n,K&&Qi(S[0],S[1],K)&&(F=R<3?n:F,R=1),p=cn(p);++A-1?R[F?p[K]:K]:n}}function sg(c){return er(function(p){var S=p.length,A=S,R=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(R&&!K&&ye(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceee))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Te=-1,je=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(l1,`{ +/* [wrapped with `+p+`] */ +`)}function xV(c){return Rt(c)||df(c)||!!(M1&&c&&c[M1])}function Zl(c,p){var S=typeof c;return p=p??V,!!p&&(S=="number"||S!="symbol"&&v1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function M2(c,p){var S=-1,A=c.length,R=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Ck(c,S)});function _k(c){var p=B(c);return p.__chain__=!0,p}function IU(c,p){return p(c),c}function O2(c,p){return p(c)}var MU=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,R=function(F){return Hh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Zl(S)?this.thru(R):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:O2,args:[R],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function OU(){return _k(this)}function RU(){return new Ki(this.value(),this.__chain__)}function NU(){this.__values__===n&&(this.__values__=Bk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function DU(){return this}function zU(c){for(var p,S=this;S instanceof Xd;){var A=vk(S);A.__index__=0,A.__values__=n,p?R.__wrapped__=A:p=A;var R=A;S=S.__wrapped__}return R.__wrapped__=c,p}function BU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:O2,args:[kx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(kx)}function FU(){return Ys(this.__wrapped__,this.__actions__)}var $U=lp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function HU(c,p,S){var A=Rt(c)?zn:G1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function WU(c,p){var S=Rt(c)?ho:Go;return S(c,Le(p,3))}var VU=ag(yk),UU=ag(bk);function jU(c,p){return Lr(R2(c,p),1)}function GU(c,p){return Lr(R2(c,p),q)}function qU(c,p,S){return S=S===n?1:Dt(S),Lr(R2(c,p),S)}function kk(c,p){var S=Rt(c)?Vn:Qa;return S(c,Le(p,3))}function Ek(c,p){var S=Rt(c)?fo:Uh;return S(c,Le(p,3))}var KU=lp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function YU(c,p,S,A){c=bo(c)?c:hp(c),S=S&&!A?Dt(S):0;var R=c.length;return S<0&&(S=vr(R+S,0)),F2(c)?S<=R&&c.indexOf(p,S)>-1:!!R&&Vu(c,p,S)>-1}var ZU=Ct(function(c,p,S){var A=-1,R=typeof p=="function",F=bo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=R?mi(p,K,S):Ja(K,p,S)}),F}),XU=lp(function(c,p,S){Uo(c,S,p)});function R2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function QU(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var JU=lp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function ej(c,p,S){var A=Rt(c)?Rd:Ah,R=arguments.length<3;return A(c,Le(p,4),S,R,Qa)}function tj(c,p,S){var A=Rt(c)?e2:Ah,R=arguments.length<3;return A(c,Le(p,4),S,R,Uh)}function nj(c,p){var S=Rt(c)?ho:Go;return S(c,z2(Le(p,3)))}function rj(c){var p=Rt(c)?ac:tp;return p(c)}function ij(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:nf;return A(c,p)}function oj(c){var p=Rt(c)?mx:ai;return p(c)}function aj(c){if(c==null)return 0;if(bo(c))return F2(c)?ba(c):c.length;var p=si(c);return p==Ae||p==Zt?c.size:Tr(c).length}function sj(c,p,S){var A=Rt(c)?Hu:vo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var lj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),N2=d2||function(){return mt.Date.now()};function uj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Pk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Lk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Px=Ct(function(c,p,S){var A=P;if(S.length){var R=Ho(S,We(Px));A|=O}return he(c,A,p,S,R)}),Tk=Ct(function(c,p,S){var A=P|E;if(S.length){var R=Ho(S,We(Tk));A|=O}return he(p,A,c,S,R)});function Ak(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ak.placeholder,A}function Ik(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){var A,R,F,K,ee,ce,_e=0,ke=!1,Te=!1,je=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Te="maxWait"in S,F=Te?vr(_a(S.maxWait)||0,p):F,je="trailing"in S?!!S.trailing:je);function ht(Mr){var is=A,Jl=R;return A=R=n,_e=Mr,K=c.apply(Jl,is),K}function yt(Mr){return _e=Mr,ee=cg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Jl=Mr-_e,Xk=p-is;return Te?Kr(Xk,F-Jl):Xk}function bt(Mr){var is=Mr-ce,Jl=Mr-_e;return ce===n||is>=p||is<0||Te&&Jl>=F}function Gt(){var Mr=N2();if(bt(Mr))return en(Mr);ee=cg(Gt,$t(Mr))}function en(Mr){return ee=n,je&&A?ht(Mr):(A=R=n,K)}function Zo(){ee!==n&&tg(ee),_e=0,A=ce=R=ee=n}function Ji(){return ee===n?K:en(N2())}function Xo(){var Mr=N2(),is=bt(Mr);if(A=arguments,R=this,ce=Mr,is){if(ee===n)return yt(ce);if(Te)return tg(ee),ee=cg(Gt,p),ht(ce)}return ee===n&&(ee=cg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var cj=Ct(function(c,p){return j1(c,1,p)}),dj=Ct(function(c,p,S){return j1(c,_a(p)||0,S)});function fj(c){return he(c,H)}function D2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,R=p?p.apply(this,A):A[0],F=S.cache;if(F.has(R))return F.get(R);var K=c.apply(this,A);return S.cache=F.set(R,K)||F,K};return S.cache=new(D2.Cache||Vo),S}D2.Cache=Vo;function z2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function hj(c){return Lk(2,c)}var pj=bx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var R=-1,F=Kr(A.length,S);++R=p}),df=Qh(function(){return arguments}())?Qh:function(c){return Sr(c)&&tn.call(c,"callee")&&!I1.call(c,"callee")},Rt=ve.isArray,Tj=Gr?Er(Gr):K1;function bo(c){return c!=null&&B2(c.length)&&!Xl(c)}function Ir(c){return Sr(c)&&bo(c)}function Aj(c){return c===!0||c===!1||Sr(c)&&oi(c)==Xe}var vc=f2||Fx,Ij=co?Er(co):Y1;function Mj(c){return Sr(c)&&c.nodeType===1&&!dg(c)}function Oj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||vc(c)||fp(c)||df(c)))return!c.length;var p=si(c);if(p==Ae||p==Zt)return!c.size;if(ug(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Rj(c,p){return cc(c,p)}function Nj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?cc(c,p,n,S):!!A}function Tx(c){if(!Sr(c))return!1;var p=oi(c);return p==at||p==tt||typeof c.message=="string"&&typeof c.name=="string"&&!dg(c)}function Dj(c){return typeof c=="number"&&zh(c)}function Xl(c){if(!lr(c))return!1;var p=oi(c);return p==At||p==wt||p==ut||p==kn}function Rk(c){return typeof c=="number"&&c==Dt(c)}function B2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=V}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Nk=Gi?Er(Gi):yx;function zj(c,p){return c===p||dc(c,p,kt(p))}function Bj(c,p,S){return S=typeof S=="function"?S:n,dc(c,p,kt(p),S)}function Fj(c){return Dk(c)&&c!=+c}function $j(c){if(CV(c))throw new _t(o);return Jh(c)}function Hj(c){return c===null}function Wj(c){return c==null}function Dk(c){return typeof c=="number"||Sr(c)&&oi(c)==dt}function dg(c){if(!Sr(c)||oi(c)!=ct)return!1;var p=Xu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ax=va?Er(va):ar;function Vj(c){return Rk(c)&&c>=-V&&c<=V}var zk=Bs?Er(Bs):Bt;function F2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var fp=w1?Er(w1):zr;function Uj(c){return c===n}function jj(c){return Sr(c)&&si(c)==Je}function Gj(c){return Sr(c)&&oi(c)==Xt}var qj=_(js),Kj=_(function(c,p){return c<=p});function Bk(c){if(!c)return[];if(bo(c))return F2(c)?Di(c):wi(c);if(Qu&&c[Qu])return o2(c[Qu]());var p=si(c),S=p==Ae?Oh:p==Zt?Hd:hp;return S(c)}function Ql(c){if(!c)return c===0?c:0;if(c=_a(c),c===q||c===-q){var p=c<0?-1:1;return p*G}return c===c?c:0}function Dt(c){var p=Ql(c),S=p%1;return p===p?S?p-S:p:0}function Fk(c){return c?Gl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=p1.test(c);return S||m1.test(c)?Ye(c.slice(2),S?2:8):h1.test(c)?Q:+c}function $k(c){return wa(c,xo(c))}function Yj(c){return c?Gl(Dt(c),-V,V):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var Zj=Xi(function(c,p){if(ug(p)||bo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Hk=Xi(function(c,p){wa(p,xo(p),c)}),$2=Xi(function(c,p,S,A){wa(p,xo(p),c,A)}),Xj=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),Qj=er(Hh);function Jj(c,p){var S=jl(c);return p==null?S:Qe(S,p)}var eG=Ct(function(c,p){c=cn(c);var S=-1,A=p.length,R=A>2?p[2]:n;for(R&&Qi(p[0],p[1],R)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var R=p.length;R--;)ap(S,p[R]);return S});function yG(c,p){return Vk(c,z2(Le(p)))}var bG=er(function(c,p){return c==null?{}:Q1(c,p)});function Vk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),ep(c,S,function(A,R){return p(A,R[0])})}function xG(c,p,S){p=Zs(p,c);var A=-1,R=p.length;for(R||(R=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var R=R1();return Kr(c+R*(p-c+pe("1e-"+((R+"").length-1))),p)}return tf(c,p)}var IG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Gk(p):p)});function Gk(c){return Ox(Sn(c).toLowerCase())}function qk(c){return c=Sn(c),c&&c.replace(y1,i2).replace(kh,"")}function MG(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:Gl(Dt(S),0,A);var R=S;return S-=p.length,S>=0&&c.slice(S,R)==p}function OG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function RG(c){return c=Sn(c),c&&s1.test(c)?c.replace(kd,"\\$&"):c}var NG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),DG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),zG=cp("toLowerCase");function BG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var R=(p-A)/2;return d(Ul(R),S)+c+d(Kd(R),S)}function FG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ax(p))&&(p=Zi(p),!p&&Wl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var GG=Js(function(c,p,S){return c+(S?" ":"")+Ox(p)});function qG(c,p,S){return c=Sn(c),S=S==null?0:Gl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function KG(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=$2({},p,A,Re);var R=$2({},p.imports,A.imports,Re),F=li(R),K=$d(R,F),ee,ce,_e=0,ke=p.interpolate||Ms,Te="__p += '",je=Vd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Mu?f1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ph+"]")+` +`;c.replace(je,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Te+=c.slice(_e,Xo).replace(b1,$s),Gt&&(ee=!0,Te+=`' + +__e(`+Gt+`) + +'`),Ji&&(ce=!0,Te+=`'; +`+Ji+`; +__p += '`),en&&(Te+=`' + +((__t = (`+en+`)) == null ? '' : __t) + +'`),_e=Xo+bt.length,bt}),Te+=`'; +`;var yt=tn.call(p,"variable")&&p.variable;if(!yt)Te=`with (obj) { +`+Te+` +} +`;else if(c1.test(yt))throw new _t(s);Te=(ce?Te.replace(Qt,""):Te).replace(Qn,"$1").replace(lo,"$1;"),Te="function("+(yt||"obj")+`) { +`+(yt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Te+`return __p +}`;var $t=Yk(function(){return Jt(F,ht+"return "+Te).apply(n,K)});if($t.source=Te,Tx($t))throw $t;return $t}function YG(c){return Sn(c).toLowerCase()}function ZG(c){return Sn(c).toUpperCase()}function XG(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Di(p),F=$o(A,R),K=Ka(A,R)+1;return ts(A,F,K).join("")}function QG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,P1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Ka(A,Di(p))+1;return ts(A,0,R).join("")}function JG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Ou,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),R=$o(A,Di(p));return ts(A,R).join("")}function eq(c,p){var S=W,A=Y;if(lr(p)){var R="separator"in p?p.separator:R;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Wl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var ee=S-ba(A);if(ee<1)return A;var ce=K?ts(K,0,ee).join(""):c.slice(0,ee);if(R===n)return ce+A;if(K&&(ee+=ce.length-ee),Ax(R)){if(c.slice(ee).search(R)){var _e,ke=ce;for(R.global||(R=Vd(R.source,Sn(Ua.exec(R))+"g")),R.lastIndex=0;_e=R.exec(ke);)var Te=_e.index;ce=ce.slice(0,Te===n?ee:Te)}}else if(c.indexOf(Zi(R),ee)!=ee){var je=ce.lastIndexOf(R);je>-1&&(ce=ce.slice(0,je))}return ce+A}function tq(c){return c=Sn(c),c&&o1.test(c)?c.replace(pi,l2):c}var nq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Ox=cp("toUpperCase");function Kk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Mh(c)?Wd(c):_1(c):c.match(p)||[]}var Yk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Tx(S)?S:new _t(S)}}),rq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Px(c[S],c))}),c});function iq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var R=-1;++RV)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var R=Fd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),R=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!R||(B.prototype[p]=function(){var K=this.__wrapped__,ee=A?[1]:arguments,ce=K instanceof Ut,_e=ee[0],ke=ce||Rt(K),Te=function(Gt){var en=R.apply(B,ya([Gt],ee));return A&&je?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var je=this.__chain__,ht=!!this.__actions__.length,yt=F&&!je,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,ee);return bt.__actions__.push({func:O2,args:[Te],thisArg:n}),new Ki(bt,je)}return yt&&$t?c.apply(this,ee):(bt=this.thru(Te),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=qu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var R=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],R)}return this[S](function(K){return p.apply(Rt(K)?K:[],R)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[lf(n,E).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=v2,B.prototype.at=MU,B.prototype.chain=OU,B.prototype.commit=RU,B.prototype.next=NU,B.prototype.plant=zU,B.prototype.reverse=BU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=FU,B.prototype.first=B.prototype.head,Qu&&(B.prototype[Qu]=DU),B},xa=po();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ge=ca.exports;var C2e=Object.create,FF=Object.defineProperty,_2e=Object.getOwnPropertyDescriptor,k2e=Object.getOwnPropertyNames,E2e=Object.getPrototypeOf,P2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),L2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of k2e(t))!P2e.call(e,i)&&i!==n&&FF(e,i,{get:()=>t[i],enumerable:!(r=_2e(t,i))||r.enumerable});return e},$F=(e,t,n)=>(n=e!=null?C2e(E2e(e)):{},L2e(t||!e||!e.__esModule?FF(n,"default",{value:e,enumerable:!0}):n,e)),T2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),HF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Lb=De((e,t)=>{var n=HF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),A2e=De((e,t)=>{var n=Lb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),I2e=De((e,t)=>{var n=Lb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),M2e=De((e,t)=>{var n=Lb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),O2e=De((e,t)=>{var n=Lb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Tb=De((e,t)=>{var n=T2e(),r=A2e(),i=I2e(),o=M2e(),a=O2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Tb();function r(){this.__data__=new n,this.size=0}t.exports=r}),N2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),D2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),z2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),WF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=WF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),x_=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),B2e=De((e,t)=>{var n=x_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),F2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Ab=De((e,t)=>{var n=x_(),r=B2e(),i=F2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),VF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),UF=De((e,t)=>{var n=Ab(),r=VF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),$2e=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),H2e=De((e,t)=>{var n=$2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),jF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),W2e=De((e,t)=>{var n=UF(),r=H2e(),i=VF(),o=jF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),V2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),Q0=De((e,t)=>{var n=W2e(),r=V2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),S_=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Map");t.exports=i}),Ib=De((e,t)=>{var n=Q0(),r=n(Object,"create");t.exports=r}),U2e=De((e,t)=>{var n=Ib();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),j2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),G2e=De((e,t)=>{var n=Ib(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),q2e=De((e,t)=>{var n=Ib(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),K2e=De((e,t)=>{var n=Ib(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Y2e=De((e,t)=>{var n=U2e(),r=j2e(),i=G2e(),o=q2e(),a=K2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Y2e(),r=Tb(),i=S_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),X2e=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Mb=De((e,t)=>{var n=X2e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Q2e=De((e,t)=>{var n=Mb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),J2e=De((e,t)=>{var n=Mb();function r(i){return n(this,i).get(i)}t.exports=r}),eye=De((e,t)=>{var n=Mb();function r(i){return n(this,i).has(i)}t.exports=r}),tye=De((e,t)=>{var n=Mb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),GF=De((e,t)=>{var n=Z2e(),r=Q2e(),i=J2e(),o=eye(),a=tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Tb(),r=S_(),i=GF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Tb(),r=R2e(),i=N2e(),o=D2e(),a=z2e(),s=nye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),iye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),oye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),aye=De((e,t)=>{var n=GF(),r=iye(),i=oye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),qF=De((e,t)=>{var n=aye(),r=sye(),i=lye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,P=u.length;if(w!=P&&!(b&&P>w))return!1;var E=v.get(l),k=v.get(u);if(E&&k)return E==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=Eu(),r=n.Uint8Array;t.exports=r}),cye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),dye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),fye=De((e,t)=>{var n=x_(),r=uye(),i=HF(),o=qF(),a=cye(),s=dye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,N=O?O.valueOf:void 0;function D(z,H,W,Y,de,j,ne){switch(W){case I:if(z.byteLength!=H.byteLength||z.byteOffset!=H.byteOffset)return!1;z=z.buffer,H=H.buffer;case L:return!(z.byteLength!=H.byteLength||!j(new r(z),new r(H)));case h:case g:case b:return i(+z,+H);case m:return z.name==H.name&&z.message==H.message;case w:case E:return z==H+"";case v:var ie=a;case P:var J=Y&l;if(ie||(ie=s),z.size!=H.size&&!J)return!1;var q=ne.get(z);if(q)return q==H;Y|=u,ne.set(z,H);var V=o(ie(z),ie(H),Y,de,j,ne);return ne.delete(z),V;case k:if(N)return N.call(z)==N.call(H)}return!1}t.exports=D}),hye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),pye=De((e,t)=>{var n=hye(),r=w_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),gye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),vye=De((e,t)=>{var n=gye(),r=mye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),yye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),bye=De((e,t)=>{var n=Ab(),r=Ob(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),xye=De((e,t)=>{var n=bye(),r=Ob(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Sye=De((e,t)=>{function n(){return!1}t.exports=n}),KF=De((e,t)=>{var n=Eu(),r=Sye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),wye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Cye=De((e,t)=>{var n=Ab(),r=YF(),i=Ob(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[N]=j[D]=j[z]=j[H]=j[W]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[P]=j[E]=!1;function ne(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=ne}),_ye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),kye=De((e,t)=>{var n=WF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),ZF=De((e,t)=>{var n=Cye(),r=_ye(),i=kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Eye=De((e,t)=>{var n=yye(),r=xye(),i=w_(),o=KF(),a=wye(),s=ZF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),P=!v&&!b&&!w&&s(g),E=v||b||w||P,k=E?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(E&&(I=="length"||w&&(I=="offset"||I=="parent")||P&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Pye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Lye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Tye=De((e,t)=>{var n=Lye(),r=n(Object.keys,Object);t.exports=r}),Aye=De((e,t)=>{var n=Pye(),r=Tye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Iye=De((e,t)=>{var n=UF(),r=YF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Mye=De((e,t)=>{var n=Eye(),r=Aye(),i=Iye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Oye=De((e,t)=>{var n=pye(),r=vye(),i=Mye();function o(a){return n(a,i,r)}t.exports=o}),Rye=De((e,t)=>{var n=Oye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var N=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=Q0(),r=Eu(),i=n(r,"DataView");t.exports=i}),Dye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Promise");t.exports=i}),zye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Set");t.exports=i}),Bye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),Fye=De((e,t)=>{var n=Nye(),r=S_(),i=Dye(),o=zye(),a=Bye(),s=Ab(),l=jF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),P=l(r),E=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var N=s(O),D=N==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case P:return u;case E:return g;case k:return m;case L:return v}return N}),t.exports=I}),$ye=De((e,t)=>{var n=rye(),r=qF(),i=fye(),o=Rye(),a=Fye(),s=w_(),l=KF(),u=ZF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function P(E,k,L,I,O,N){var D=s(E),z=s(k),H=D?m:a(E),W=z?m:a(k);H=H==g?v:H,W=W==g?v:W;var Y=H==v,de=W==v,j=H==W;if(j&&l(E)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return N||(N=new n),D||u(E)?r(E,k,L,I,O,N):i(E,k,H,L,I,O,N);if(!(L&h)){var ne=Y&&w.call(E,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(ne||ie){var J=ne?E.value():E,q=ie?k.value():k;return N||(N=new n),O(J,q,L,I,N)}}return j?(N||(N=new n),o(E,k,L,I,O,N)):!1}t.exports=P}),Hye=De((e,t)=>{var n=$ye(),r=Ob();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),XF=De((e,t)=>{var n=Hye();function r(i,o){return n(i,o)}t.exports=r}),Wye=["ctrl","shift","alt","meta","mod"],Vye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function a6(e,t=","){return typeof e=="string"?e.split(t):e}function Em(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Vye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Wye.includes(o));return{...r,keys:i}}function Uye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function jye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Gye(e){return QF(e,["input","textarea","select"])}function QF({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function qye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var Kye=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},Yye=C.exports.createContext(void 0),Zye=()=>C.exports.useContext(Yye),Xye=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Qye=()=>C.exports.useContext(Xye),Jye=$F(XF());function e3e(e){let t=C.exports.useRef(void 0);return(0,Jye.default)(t.current,e)||(t.current=e),t.current}var bA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=e3e(a),{enabledScopes:h}=Qye(),g=Zye();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!qye(h,u?.scopes))return;let m=w=>{if(!(Gye(w)&&!QF(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){bA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||a6(e,u?.splitKey).forEach(P=>{let E=Em(P,u?.combinationKey);if(Kye(w,E,o)||E.keys?.includes("*")){if(Uye(w,E,u?.preventDefault),!jye(w,E,u?.enabled)){bA(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&a6(e,u?.splitKey).forEach(w=>g.addHotkey(Em(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&a6(e,u?.splitKey).forEach(w=>g.removeHotkey(Em(w,u?.combinationKey)))}},[e,l,u,h]),i}$F(XF());var BC=new Set;function t3e(e){(Array.isArray(e)?e:[e]).forEach(t=>BC.add(Em(t)))}function n3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Em(t);for(let r of BC)r.keys?.every(i=>n.keys?.includes(i))&&BC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{t3e(e.key)}),document.addEventListener("keyup",e=>{n3e(e.key)})});function r3e(){return te("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const i3e=()=>te("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),o3e=lt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),a3e=lt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),s3e=lt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),l3e=lt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),u3e=lt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),c3e=lt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const d3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:te(rh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(r_,{className:"invokeai__switch-root",...s})]})})};function Rb(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return te(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(t7e(i.target.checked))})]})}const xA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(xA)&&u!==Number(I)&&O(String(u))},[u,I]);const N=z=>{O(z),z.match(xA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const H=Ge.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(H)),h(H)};return x(Ui,{...k,children:te(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(rh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),te(q7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:N,onBlur:D,width:a,...L,children:[x(K7,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&te("div",{className:"invokeai__number-input-stepper",children:[x(Z7,{...E,className:"invokeai__number-input-stepper-button"}),x(Y7,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},uh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return te(gd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(rh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(WB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},f3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],h3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],p3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],g3e=[{key:"2x",value:2},{key:"4x",value:4}],C_=0,__=4294967295,m3e=["gfpgan","codeformer"],v3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],y3e=Ze(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),b3e=Ze(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),jv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(y3e),{isGFPGANAvailable:i}=Ce(b3e),o=l=>e(N3(l)),a=l=>e(OW(l)),s=l=>e(D3(l.target.value));return te(on,{direction:"column",gap:2,children:[x(uh,{label:"Type",validValues:m3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function x3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(RW(r.target.checked))})}var JF={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},SA=le.createContext&&le.createContext(JF),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ch(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:N,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:H,sliderMarkProps:W,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:ne,sliderNumberInputStepperProps:ie,sliderTooltipProps:J,sliderIAIIconButtonProps:q,...V}=e,[G,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==G&&G!==""&&Q(String(i))},[i,G,Q]);const X=Se=>{const He=Ge.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},xe=()=>{!L||L()};return te(gd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(rh,{className:"invokeai__slider-component-label",...H,children:r}),te(yz,{w:"100%",gap:2,children:[te(n_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...V,children:[h&&te(Xn,{children:[x(LC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),x(LC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(JB,{className:"invokeai__slider_track",...Y,children:x(eF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(QB,{className:"invokeai__slider-thumb",...de})})]}),v&&te(q7,{min:o,max:a,step:s,value:G,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:N,...j,children:[x(K7,{className:"invokeai__slider-number-input",width:w,readOnly:P,...ne}),te(NB,{...ie,children:[x(Z7,{className:"invokeai__slider-number-stepper"}),x(Y7,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(k_,{}),onClick:xe,isDisabled:I,...q})]})]})}function E_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(ch,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(f8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(f8(.5))}})}const r$=()=>x(md,{flex:"1",textAlign:"left",children:"Other Options"}),L3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(MW(r.target.checked))})})},T3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(IW(r.target.checked))})})},i$=()=>te(on,{gap:2,direction:"column",children:[x(T3e,{}),x(L3e,{})]}),Nb=()=>x(md,{flex:"1",textAlign:"left",children:"Seed"});function A3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(r7e(r.target.checked))})}function I3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(Qv(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:C_,max:__,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const o$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function M3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(Qv(o$(C_,__))),children:x("p",{children:"Shuffle"})})}function O3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(Z9e(r)),value:t,isInteger:!1})}function R3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(X9e(r)),value:t,isInteger:!1})}const Db=()=>te(on,{gap:2,direction:"column",children:[x(A3e,{}),te(on,{gap:2,children:[x(I3e,{}),x(M3e,{})]}),x(on,{gap:2,children:x(O3e,{})}),x(on,{gap:2,children:x(R3e,{})})]});function zb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return te(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(n7e(i.target.checked))})]})}const N3e=Ze(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D3e=Ze(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Gv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(N3e),{isESRGANAvailable:r}=Ce(D3e);return te("div",{className:"upscale-options",children:[x(uh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(h8(Number(a.target.value))),validValues:g3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(p8(a)),value:n,isInteger:!1})]})};function z3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(Q9e(r.target.checked))})}function Bb(){return te(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(z3e,{})]})}function B3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return te(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(rh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(b7,{...s,className:"input-entry",size:"sm",width:o})]})}function F3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(NW(i.target.value));return x(B3e,{label:"Seed Weights",value:e,isInvalid:t&&!(b_(e)||e===""),isDisabled:!t,onChange:r})}function $3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(J9e(i)),isInteger:!1})}const Fb=()=>te(on,{gap:2,direction:"column",children:[x($3e,{}),x(F3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(ez,{className:`invokeai__checkbox ${n}`,...r,children:t})};function $b(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(i7e(r.target.checked)),isChecked:e})}function H3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(PW(r)),value:t,width:P_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const sn=Ze(e=>e.options,e=>lx[e.activeTab],{memoizeOptions:{equalityCheck:Ge.isEqual}}),W3e=Ze(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function V3e(){const e=Ce(i=>i.options.height),t=Ce(sn),n=$e();return x(uh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(LW(Number(i.target.value))),validValues:p3e,styleClass:"main-option-block"})}const U3e=Ze([e=>e.options,W3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function j3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(U3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Y9e(i)),value:t,width:P_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function G3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(uh,{label:"Sampler",value:e,onChange:r=>t(AW(r.target.value)),validValues:f3e,styleClass:"main-option-block"})}function q3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(EW(r)),value:t,width:P_,styleClass:"main-option-block",textAlign:"center"})}function K3e(){const e=Ce(i=>i.options.width),t=Ce(sn),n=$e();return x(uh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(TW(Number(i.target.value))),validValues:h3e,styleClass:"main-option-block"})}const P_="auto";function Hb(){return x("div",{className:"main-options",children:te("div",{className:"main-options-list",children:[te("div",{className:"main-options-row",children:[x(j3e,{}),x(q3e,{}),x(H3e,{})]}),te("div",{className:"main-options-row",children:[x(K3e,{}),x(V3e,{}),x(G3e,{})]})]})})}const Y3e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},a$=mb({name:"system",initialState:Y3e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:Z3e,setIsProcessing:g0,addLogEntry:Ei,setShouldShowLogViewer:s6,setIsConnected:wA,setSocketId:Kke,setShouldConfirmOnDelete:s$,setOpenAccordions:X3e,setSystemStatus:Q3e,setCurrentStatus:l6,setSystemConfig:J3e,setShouldDisplayGuides:e5e,processingCanceled:t5e,errorOccurred:FC,errorSeen:l$,setModelList:CA,setIsCancelable:_A,modelChangeRequested:n5e,setSaveIntermediatesInterval:r5e,setEnableImageDebugging:i5e}=a$.actions,o5e=a$.reducer;function a5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function s5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function l5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function u5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function u$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function c5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function d5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const f5e=Ze(e=>e.system,e=>e.shouldDisplayGuides),h5e=({children:e,feature:t})=>{const n=Ce(f5e),{text:r}=d3e[t];return n?te(X7,{trigger:"hover",children:[x(e_,{children:x(md,{children:e})}),te(J7,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(Q7,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},p5e=Pe(({feature:e,icon:t=a5e},n)=>x(h5e,{feature:e,children:x(md,{ref:n,children:x(pa,{as:t})})}));function g5e(e){const{header:t,feature:n,options:r}=e;return te(Nc,{className:"advanced-settings-item",children:[x("h2",{children:te(Oc,{className:"advanced-settings-header",children:[t,x(p5e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Wb=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(nb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(X3e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(g5e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function m5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function v5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function c$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function d$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function b5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function x5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function S5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function w5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function f$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function L_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function h$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function p$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function C5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function _5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function k5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function E5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function P5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function L5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function T5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function A5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function g$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function I5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function M5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function O5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function R5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function N5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function D5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function m$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function z5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function B5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function u6(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function F5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function v$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function $5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function H5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function T_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function W5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function A_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Py;const U5e=new Uint8Array(16);function j5e(){if(!Py&&(Py=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Py))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Py(U5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function G5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const q5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kA={randomUUID:q5e};function Lp(e,t,n){if(kA.randomUUID&&!t&&!e)return kA.randomUUID();e=e||{};const r=e.random||(e.rng||j5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return G5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ly=(e,t)=>Math.round(e/t)*t,Vb=e=>e.kind==="line"&&e.layer==="mask",K5e=e=>e.kind==="line"&&e.layer==="base",y$=e=>e.kind==="image"&&e.layer==="base",Y5e=e=>e.kind==="line",EA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1},Z5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",objects:[],pastObjects:[],futureObjects:[],...EA},outpainting:{layer:"base",objects:[],pastObjects:[],futureObjects:[],stagingArea:{images:[],selectedImageIndex:0},shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...EA}},b$=mb({name:"canvas",initialState:Z5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=e[e.currentCanvas].objects.filter(t=>!Vb(t)),e[e.currentCanvas].futureObjects=[],e[e.currentCanvas].shouldInvertMask=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldInvertMask=!e[e.currentCanvas].shouldInvertMask},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldInvertMask:(e,t)=>{e[e.currentCanvas].shouldInvertMask=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{e.inpainting.imageToInpaint=void 0},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ge.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ge.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,P=Ge.clamp(m,64,h),E=Ge.clamp(v,64,g),k=b>0?i-b:i,L=w>0?o-w:o,I=Ge.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-P),O=Ge.clamp(L,e[e.currentCanvas].stageCoordinates.y,g-E);e[e.currentCanvas].boundingBoxDimensions={width:P,height:E},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastObjects=[],e[e.currentCanvas].futureObjects=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpaintingSesion:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n;e.outpainting.pastObjects.push([...e.outpainting.objects]),e.outpainting.futureObjects=[],e.outpainting.objects.push({kind:"image",layer:"base",x:i,y:o,image:r})},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,eraserSize:a}=e[e.currentCanvas];n!=="move"&&(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects.push({kind:"line",layer:r,tool:n,strokeWidth:n==="brush"?o/2:a/2,points:t.payload,...r==="base"&&n==="brush"&&{color:i}}),e[e.currentCanvas].futureObjects=[])},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].objects.findLast(Y5e);!n||n.points.push(...t.payload)},undo:e=>{if(e[e.currentCanvas].objects.length===0)return;const t=e[e.currentCanvas].pastObjects.pop();!t||(e[e.currentCanvas].futureObjects.unshift(e[e.currentCanvas].objects),e[e.currentCanvas].objects=t)},redo:e=>{if(e[e.currentCanvas].futureObjects.length===0)return;const t=e[e.currentCanvas].futureObjects.shift();!t||(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=t)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=[],e[e.currentCanvas].futureObjects=[]}},extraReducers:e=>{e.addCase(M_.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastObjects.push([...t.outpainting.objects]),t.outpainting.futureObjects=[],t.outpainting.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:Su,setLayer:X5e,setBrushColor:Q5e,setBrushSize:x$,setEraserSize:J5e,addLine:S$,addPointToCurrentLine:w$,setShouldInvertMask:e4e,setIsMaskEnabled:C$,setShouldShowCheckboardTransparency:Yke,setShouldShowBrushPreview:c6,setMaskColor:_$,clearMask:k$,clearImageToInpaint:Zke,undo:t4e,redo:n4e,setCursorPosition:E$,setStageDimensions:PA,setImageToInpaint:q5,setImageToOutpaint:P$,setBoundingBoxDimensions:Kg,setBoundingBoxCoordinates:d6,setBoundingBoxPreviewFill:Xke,setDoesCanvasNeedScaling:Cr,setStageScale:L$,toggleTool:Qke,setShouldShowBoundingBox:I_,setShouldDarkenOutsideBoundingBox:T$,setIsDrawing:Ub,setShouldShowBrush:Jke,setClearBrushHistory:r4e,setShouldUseInpaintReplace:i4e,setInpaintReplace:LA,setShouldLockBoundingBox:A$,toggleShouldLockBoundingBox:o4e,setIsMovingBoundingBox:TA,setIsTransformingBoundingBox:f6,setIsMouseOverBoundingBox:Ty,setIsMoveBoundingBoxKeyHeld:eEe,setIsMoveStageKeyHeld:tEe,setStageCoordinates:I$,setCurrentCanvas:M$,addImageToOutpaintingSesion:a4e,resetCanvas:s4e,setShouldShowGrid:l4e,setShouldSnapToGrid:u4e,setShouldAutoSave:c4e,setShouldShowIntermediates:d4e,setIsMovingStage:K5}=b$.actions,f4e=b$.reducer,M_=ave("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Lp(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],qv=e=>e.canvas.outpainting,J0=Ze([jt],e=>e.objects.find(y$)),O$=Ze([e=>e.options,e=>e.system,J0,sn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(b_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ge.isEqual,resultEqualityCheck:Ge.isEqual}}),$C=Jr("socketio/generateImage"),h4e=Jr("socketio/runESRGAN"),p4e=Jr("socketio/runFacetool"),g4e=Jr("socketio/deleteImage"),HC=Jr("socketio/requestImages"),AA=Jr("socketio/requestNewImages"),m4e=Jr("socketio/cancelProcessing"),IA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const v4e=Jr("socketio/requestSystemConfig"),y4e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return te(X7,{...o,children:[x(e_,{children:t}),te(J7,{className:`invokeai__popover-content ${r}`,children:[i&&x(Q7,{className:"invokeai__popover-arrow"}),n]})]})};function R$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(O$),a=Ce(sn),s=()=>{r($C(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r($C(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(M5e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(pz,{children:o.map((u,h)=>x(gz,{children:u},h))})})}const b4e=Ze(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function N$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(b4e),a=()=>n(m4e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(d5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const x4e=Ze(e=>e.options,e=>e.shouldLoopback),D$=()=>{const e=$e(),t=Ce(x4e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(N5e,{}),onClick:()=>{e(d7e(!t))}})},jb=()=>te("div",{className:"process-buttons",children:[x(R$,{}),x(D$,{}),x(N$,{})]}),S4e=Ze([e=>e.options,sn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Gb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(S4e),{isReady:r}=Ce(O$),i=C.exports.useRef(null),o=s=>{e(ux(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e($C(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(lF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function w4e(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm2.121.707a1 1 0 0 0-1.414 0L4.16 7.547l5.293 5.293 4.633-4.633a1 1 0 0 0 0-1.414l-3.879-3.879zM8.746 13.547 3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function C4e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function _4e(e,t){e.classList?e.classList.add(t):C4e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function MA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function k4e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=MA(e.className,t):e.setAttribute("class",MA(e.className&&e.className.baseVal||"",t))}const OA={disabled:!1},F$=le.createContext(null);var $$=function(t){return t.scrollTop},Yg="unmounted",xf="exited",Sf="entering",Tp="entered",WC="exiting",Pu=function(e){R7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=xf,o.appearStatus=Sf):l=Tp:r.unmountOnExit||r.mountOnEnter?l=Yg:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Yg?{status:xf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Sf&&a!==Tp&&(o=Sf):(a===Sf||a===Tp)&&(o=WC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Sf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this);a&&$$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:Yg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[iy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||OA.disabled){this.safeSetState({status:Tp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Sf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Tp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:iy.findDOMNode(this);if(!o||OA.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:WC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Yg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=I7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(F$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Pu.contextType=F$;Pu.propTypes={};function Cp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cp,onEntering:Cp,onEntered:Cp,onExit:Cp,onExiting:Cp,onExited:Cp};Pu.UNMOUNTED=Yg;Pu.EXITED=xf;Pu.ENTERING=Sf;Pu.ENTERED=Tp;Pu.EXITING=WC;const E4e=Pu;var P4e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return _4e(t,r)})},h6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k4e(t,r)})},O_=function(e){R7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},V$=""+new URL("logo.13003d72.png",import.meta.url).href,L4e=Ze(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),qb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce(L4e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(b0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(b0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(u7e(a.current?a.current.scrollTop:0)),t(b0(!1)),t(c7e(!1)))},[t,i]);W$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(l7e(!i)),t(Cr(!0))};return x(H$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:te("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(z$,{}):x(B$,{})})}),!i&&te("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),te("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function T4e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})},other:{header:x(r$,{}),feature:Xr.OTHER,options:x(i$,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x(E_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(x3e,{}),x($b,{}),e?x(Wb,{accordionInfo:t}):null]})}const R_=C.exports.createContext(null),N_=e=>{const{styleClass:t}=e,n=C.exports.useContext(R_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:te("div",{className:"image-upload-button",children:[x(T_,{}),x($f,{size:"lg",children:"Click or Drag and Drop"})]})})},A4e=Ze(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),VC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=O5(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(A4e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(g4e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(s$(!b.target.checked));return te(Xn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(l1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(gv,{children:te(u1e,{children:[x(j7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(z5,{children:te(on,{direction:"column",gap:5,children:[x(ko,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:te(on,{alignItems:"center",children:[x(rh,{mb:0,children:"Don't ask me again"}),x(r_,{checked:!s,onChange:v})]})})]})}),te(U7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),I4e=Ze([e=>e.system,e=>e.options,e=>e.gallery,sn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),U$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(I4e),g=lh(),m=()=>{!u||(h&&e(kl(!1)),e(xv(u)),e(Co("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(e7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(Qv(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(ux(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(P(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(h4e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(p4e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(DW(!l)),I=()=>{!u||(h&&e(kl(!1)),e(q5(u)),e(Co("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(kl(!1)),e(P$(u)),e(Co("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),te("div",{className:"current-image-options",children:[x(Eo,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(B5e,{})}),children:te("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(u6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(u6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(u6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(L_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(h$,{}),size:"sm",children:x(Hf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),te(Eo,{isAttached:!0,children:[x(gt,{icon:x(R5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(z5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(gt,{icon:x(x5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),te(Eo,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(_5e,{}),"aria-label":"Restore Faces"}),children:te("div",{className:"current-image-postprocessing-popover",children:[x(jv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(C5e,{}),"aria-label":"Upscale"}),children:te("div",{className:"current-image-postprocessing-popover",children:[x(Gv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),x(gt,{icon:x(f$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(VC,{image:u,children:x(gt,{icon:x(v$,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},M4e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},j$=mb({name:"gallery",initialState:M4e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Ay,clearIntermediateImage:RA,removeImage:G$,setCurrentImage:q$,addGalleryImages:O4e,setIntermediateImage:R4e,selectNextImage:D_,selectPrevImage:z_,setShouldPinGallery:N4e,setShouldShowGallery:m0,setGalleryScrollPosition:D4e,setGalleryImageMinimumWidth:pf,setGalleryImageObjectFit:z4e,setShouldHoldGalleryOpen:B4e,setShouldAutoSwitchToNewImages:F4e,setCurrentCategory:Iy,setGalleryWidth:Lg}=j$.actions,$4e=j$.reducer;lt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});lt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});lt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});lt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});lt({displayName:"SunIcon",path:te("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});lt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});lt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});lt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});lt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});lt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});lt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});lt({displayName:"ViewIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});lt({displayName:"ViewOffIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});lt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});lt({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});lt({displayName:"RepeatIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});lt({displayName:"RepeatClockIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});lt({displayName:"EditIcon",path:te("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});lt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});lt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});lt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});lt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});lt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});lt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});lt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});lt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});lt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var K$=lt({displayName:"ExternalLinkIcon",path:te("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});lt({displayName:"LinkIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});lt({displayName:"PlusSquareIcon",path:te("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});lt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});lt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});lt({displayName:"TimeIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});lt({displayName:"ArrowRightIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});lt({displayName:"ArrowLeftIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});lt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});lt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});lt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});lt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});lt({displayName:"EmailIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});lt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});lt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});lt({displayName:"SpinnerIcon",path:te(Xn,{children:[x("defs",{children:te("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),te("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});lt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});lt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});lt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});lt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});lt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});lt({displayName:"InfoOutlineIcon",path:te("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});lt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});lt({displayName:"QuestionOutlineIcon",path:te("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});lt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});lt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});lt({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});lt({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});lt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>te(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(H4e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),te(on,{direction:i?"column":"row",children:[te(ko,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?te(Hf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(K$,{mx:"2px"})]}):x(ko,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),W4e=(e,t)=>e.image.uuid===t.image.uuid,V4e=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(DW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:P,fit:E,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,N=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:te(on,{gap:1,direction:"column",width:"100%",children:[te(on,{gap:2,children:[x(ko,{fontWeight:"semibold",children:"File:"}),te(Hf,{href:e.url,isExternal:!0,children:[e.url,x(K$,{mx:"2px"})]})]}),Object.keys(r).length>0?te(Xn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&P!==void 0&&x(tr,{label:"Fix faces strength",value:P,onClick:()=>n(N3(P))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(h8(O))}),i==="esrgan"&&P!==void 0&&x(tr,{label:"Upscaling strength",value:P,onClick:()=>n(p8(P))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:A3(s),onClick:()=>n(ux(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(Qv(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(AW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(EW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(PW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:G5(u),onClick:()=>n(NW(G5(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(IW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(MW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(TW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(LW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(xv(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(g8(L))}),i==="img2img"&&P&&x(tr,{label:"Image to image strength",value:P,onClick:()=>n(f8(P))}),E&&x(tr,{label:"Image to image fit",value:E,onClick:()=>n(RW(E))}),o&&o.length>0&&te(Xn,{children:[x($f,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:H,strength:W}=D;return te(on,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:H,onClick:()=>n(h8(H))}),x(tr,{label:"Strength",value:W,onClick:()=>n(p8(W))})]},z)}else if(D.type==="gfpgan"){const{strength:H}=D;return te(on,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:H,onClick:()=>{n(N3(H)),n(D3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:H,fidelity:W}=D;return te(on,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:H,onClick:()=>{n(N3(H)),n(D3("codeformer"))}}),W&&x(tr,{label:"Fidelity",value:W,onClick:()=>{n(OW(W)),n(D3("codeformer"))}})]},z)}})]}),te(on,{gap:2,direction:"column",children:[te(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(L_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(ko,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(dz,{width:"100%",pt:10,children:x(ko,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},W4e),Y$=Ze([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function U4e(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(Y$),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(z_())},h=()=>{e(D_())},g=()=>{e(kl(!0))};return te("div",{className:"current-image-preview",children:[i&&x(ib,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&te("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(c$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(V4e,{image:i,styleClass:"current-image-metadata"})]})}const j4e=Ze([e=>e.gallery,e=>e.options,sn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),B_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(j4e);return x("div",{className:"current-image-area","data-tab-name":t,children:e?te(Xn,{children:[x(U$,{}),x(U4e,{})]}):x("div",{className:"current-image-display-placeholder",children:x(c5e,{})})})},Z$=()=>{const e=C.exports.useContext(R_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(T_,{}),onClick:e||void 0})};function G4e(){const e=Ce(i=>i.options.initialImage),t=$e(),n=lh(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(zW())};return te(Xn,{children:[te("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Z$,{})]}),e&&x("div",{className:"init-image-preview",children:x(ib,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const q4e=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return te("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(G4e,{})}):x(N_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(B_,{})})]})};function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Y4e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},nbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],FA="__resizable_base__",X$=function(e){Q4e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(FA):o.className+=FA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||J4e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return p6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?p6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?p6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&_p("left",o),s=i&&_p("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var P=(m-b)*this.ratio+w,E=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,P),O=Math.min(g,E),N=Math.max(m,k),D=Math.min(v,L);n=Oy(n,I,O),r=Oy(r,N,D)}else n=Oy(n,h,g),r=Oy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&ebe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Ry(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ry(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Ry(n)?n.touches[0].clientX:n.clientX,h=Ry(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,P=this.getParentSize(),E=tbe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=BA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=BA(L,this.props.snap.y,this.props.snapGap));var N=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=N.newWidth,L=N.newHeight,this.props.grid){var D=zA(I,this.props.grid[0]),z=zA(L,this.props.grid[1]),H=this.props.snapGap||0;I=H===0||Math.abs(D-I)<=H?D:I,L=H===0||Math.abs(z-L)<=H?z:L}var W={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/P.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/P.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var ne={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?ne.flexBasis=ne.width:this.flexDir==="column"&&(ne.flexBasis=ne.height),Il.exports.flushSync(function(){r.setState(ne)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(X4e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return nbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return te(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Kv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,P=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:P},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,rbe(i,...t)]}function rbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q$(...e){return t=>e.forEach(n=>ibe(n,t))}function Ha(...e){return C.exports.useCallback(Q$(...e),e)}const yv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(abe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(UC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(UC,An({},r,{ref:t}),n)});yv.displayName="Slot";const UC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...sbe(r,n.props),ref:Q$(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});UC.displayName="SlotClone";const obe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function abe(e){return C.exports.isValidElement(e)&&e.type===obe}function sbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const lbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=lbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?yv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function J$(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function eH(e){const t=e+"CollectionProvider",[n,r]=Kv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:b,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,b)=>{const{scope:w,children:P}=v,E=o(s,w),k=Ha(b,E.collectionRef);return le.createElement(yv,{ref:k},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=le.forwardRef((v,b)=>{const{scope:w,children:P,...E}=v,k=le.useRef(null),L=Ha(b,k),I=o(u,w);return le.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),le.createElement(yv,{[h]:"",ref:L},P)});function m(v){const b=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const ube=C.exports.createContext(void 0);function tH(e){const t=C.exports.useContext(ube);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function cbe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const jC="dismissableLayer.update",dbe="dismissableLayer.pointerDownOutside",fbe="dismissableLayer.focusOutside";let $A;const hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=P.indexOf(E),L=g?P.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,N=gbe(z=>{const H=z.target,W=[...h.branches].some(Y=>Y.contains(H));!O||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=mbe(z=>{const H=z.target;[...h.branches].some(Y=>Y.contains(H))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return cbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&($A=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),HA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=$A)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),HA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(jC,z),()=>document.removeEventListener(jC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,N.onPointerDownCapture)}))});function gbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nH(dbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function mbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&nH(fbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function HA(){const e=new CustomEvent(jC);document.dispatchEvent(e)}function nH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?J$(i,o):i.dispatchEvent(o)}let g6=0;function vbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:WA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:WA()),g6++,()=>{g6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),g6--}},[])}function WA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const m6="focusScope.autoFocusOnMount",v6="focusScope.autoFocusOnUnmount",VA={bubbles:!1,cancelable:!0},ybe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:wf(g.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||wf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){jA.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(m6,VA);s.addEventListener(m6,u),s.dispatchEvent(E),E.defaultPrevented||(bbe(_be(rH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(m6,u),setTimeout(()=>{const E=new CustomEvent(v6,VA);s.addEventListener(v6,h),s.dispatchEvent(E),E.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(v6,h),jA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const k=w.currentTarget,[L,I]=xbe(k);L&&I?!w.shiftKey&&E===I?(w.preventDefault(),n&&wf(L,{select:!0})):w.shiftKey&&E===L&&(w.preventDefault(),n&&wf(I,{select:!0})):E===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function bbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function xbe(e){const t=rH(e),n=UA(t,e),r=UA(t.reverse(),e);return[n,r]}function rH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function UA(e,t){for(const n of e)if(!Sbe(n,{upTo:t}))return n}function Sbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wbe(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wbe(e)&&t&&e.select()}}const jA=Cbe();function Cbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=GA(e,t),e.unshift(t)},remove(t){var n;e=GA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function GA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _be(e){return e.filter(t=>t.tagName!=="A")}const z0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},kbe=I6["useId".toString()]||(()=>{});let Ebe=0;function Pbe(e){const[t,n]=C.exports.useState(kbe());return z0(()=>{e||n(r=>r??String(Ebe++))},[e]),e||(t?`radix-${t}`:"")}function e1(e){return e.split("-")[0]}function Kb(e){return e.split("-")[1]}function t1(e){return["top","bottom"].includes(e1(e))?"x":"y"}function F_(e){return e==="y"?"height":"width"}function qA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=t1(t),l=F_(s),u=r[l]/2-i[l]/2,h=e1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Kb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Lbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=qA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=iH(r),h={x:i,y:o},g=t1(a),m=Kb(a),v=F_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=E/2-k/2,N=u[w],D=I-b[v]-u[P],z=I/2-b[v]/2+O,H=GC(N,z,D),de=(m==="start"?u[w]:u[P])>0&&z!==H&&s.reference[v]<=s.floating[v]?zMbe[t])}function Obe(e,t,n){n===void 0&&(n=!1);const r=Kb(e),i=t1(e),o=F_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X5(a)),{main:a,cross:X5(a)}}const Rbe={start:"end",end:"start"};function YA(e){return e.replace(/start|end/g,t=>Rbe[t])}const Nbe=["top","right","bottom","left"];function Dbe(e){const t=X5(e);return[YA(e),t,YA(t)]}const zbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=e1(r),E=g||(w===a||!v?[X5(a)]:Dbe(a)),k=[a,...E],L=await Z5(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:H,cross:W}=Obe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[H],L[W])}if(O=[...O,{placement:r,overflows:I}],!I.every(H=>H<=0)){var N,D;const H=((N=(D=i.flip)==null?void 0:D.index)!=null?N:0)+1,W=k[H];if(W)return{data:{index:H,overflows:O},reset:{placement:W}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(ne=>ne>0).reduce((ne,ie)=>ne+ie,0)]).sort((j,ne)=>j[1]-ne[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function ZA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XA(e){return Nbe.some(t=>e[t]>=0)}const Bbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Z5(r,{...n,elementContext:"reference"}),a=ZA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:XA(a)}}}case"escaped":{const o=await Z5(r,{...n,altBoundary:!0}),a=ZA(o,i.floating);return{data:{escapedOffsets:a,escaped:XA(a)}}}default:return{}}}}};async function Fbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=e1(n),s=Kb(n),l=t1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const $be=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Fbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function oH(e){return e==="x"?"y":"x"}const Hbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:k}=P;return{x:E,y:k}}},...l}=e,u={x:n,y:r},h=await Z5(t,l),g=t1(e1(i)),m=oH(g);let v=u[g],b=u[m];if(o){const P=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=v+h[P],L=v-h[E];v=GC(k,v,L)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+h[P],L=b-h[E];b=GC(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Wbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=t1(i),m=oH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",N=o.reference[g]-o.floating[O]+P.mainAxis,D=o.reference[g]+o.reference[O]-P.mainAxis;vD&&(v=D)}if(u){var E,k,L,I;const O=g==="y"?"width":"height",N=["top","left"].includes(e1(i)),D=o.reference[m]-o.floating[O]+(N&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(N?0:P.crossAxis),z=o.reference[m]+o.reference[O]+(N?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(N?P.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function aH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Lu(e){if(e==null)return window;if(!aH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Lu(e).getComputedStyle(e)}function Cu(e){return aH(e)?"":e?(e.nodeName||"").toLowerCase():""}function sH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Tl(e){return e instanceof Lu(e).HTMLElement}function ud(e){return e instanceof Lu(e).Element}function Vbe(e){return e instanceof Lu(e).Node}function $_(e){if(typeof ShadowRoot>"u")return!1;const t=Lu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Yb(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Ube(e){return["table","td","th"].includes(Cu(e))}function lH(e){const t=/firefox/i.test(sH()),n=Yv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function uH(){return!/^((?!chrome|android).)*safari/i.test(sH())}const QA=Math.min,Pm=Math.max,Q5=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Tl(e)&&(l=e.offsetWidth>0&&Q5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Q5(s.height)/e.offsetHeight||1);const h=ud(e)?Lu(e):window,g=!uH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function xd(e){return((Vbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zb(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cH(e){return _u(xd(e)).left+Zb(e).scrollLeft}function jbe(e){const t=_u(e);return Q5(t.width)!==e.offsetWidth||Q5(t.height)!==e.offsetHeight}function Gbe(e,t,n){const r=Tl(t),i=xd(t),o=_u(e,r&&jbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||Yb(i))&&(a=Zb(t)),Tl(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||($_(e)?e.host:null)||xd(e)}function JA(e){return!Tl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function qbe(e){let t=dH(e);for($_(t)&&(t=t.host);Tl(t)&&!["html","body"].includes(Cu(t));){if(lH(t))return t;t=t.parentNode}return null}function qC(e){const t=Lu(e);let n=JA(e);for(;n&&Ube(n)&&getComputedStyle(n).position==="static";)n=JA(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!lH(n))?t:n||qbe(e)||t}function eI(e){if(Tl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Kbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Tl(n),o=xd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||Yb(o))&&(a=Zb(n)),Tl(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Ybe(e,t){const n=Lu(e),r=xd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=uH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Zbe(e){var t;const n=xd(e),r=Zb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Pm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Pm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+cH(e);const l=-r.scrollTop;return Yv(i||n).direction==="rtl"&&(s+=Pm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fH(e){const t=dH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Tl(t)&&Yb(t)?t:fH(t)}function J5(e,t){var n;t===void 0&&(t=[]);const r=fH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Lu(r),a=i?[o].concat(o.visualViewport||[],Yb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(J5(a))}function Xbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&$_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Qbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function tI(e,t,n){return t==="viewport"?Y5(Ybe(e,n)):ud(t)?Qbe(t,n):Y5(Zbe(xd(e)))}function Jbe(e){const t=J5(e),r=["absolute","fixed"].includes(Yv(e).position)&&Tl(e)?qC(e):e;return ud(r)?t.filter(i=>ud(i)&&Xbe(i,r)&&Cu(i)!=="body"):[]}function exe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Jbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=tI(t,h,i);return u.top=Pm(g.top,u.top),u.right=QA(g.right,u.right),u.bottom=QA(g.bottom,u.bottom),u.left=Pm(g.left,u.left),u},tI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const txe={getClippingRect:exe,convertOffsetParentRelativeRectToViewportRelativeRect:Kbe,isElement:ud,getDimensions:eI,getOffsetParent:qC,getDocumentElement:xd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Gbe(t,qC(n),r),floating:{...eI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Yv(e).direction==="rtl"};function nxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?J5(e):[],...J5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?_u(e):null;s&&b();function b(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const rxe=(e,t,n)=>Lbe(e,t,{platform:txe,...n});var KC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function YC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!YC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!YC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ixe(e){const t=C.exports.useRef(e);return KC(()=>{t.current=e}),t}function oxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);YC(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||rxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Il.exports.flushSync(()=>{h(L)})})},[g,n,r]);KC(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);KC(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),P=C.exports.useCallback(L=>{o.current=L,w()},[w]),E=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:P,floating:E}),[u,v,k,P,E])}const axe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?KA({element:t.current,padding:n}).fn(i):{}:t?KA({element:t,padding:n}).fn(i):{}}}};function sxe(e){const[t,n]=C.exports.useState(void 0);return z0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hH="Popper",[H_,pH]=Kv(hH),[lxe,gH]=H_(hH),uxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(lxe,{scope:t,anchor:r,onAnchorChange:i},n)},cxe="PopperAnchor",dxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gH(cxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),e4="PopperContent",[fxe,nEe]=H_(e4),[hxe,pxe]=H_(e4,{hasParent:!1,positionUpdateFns:new Set}),gxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,N=gH(e4,h),[D,z]=C.exports.useState(null),H=Ha(t,Et=>z(Et)),[W,Y]=C.exports.useState(null),de=sxe(W),j=(n=de?.width)!==null&&n!==void 0?n:0,ne=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),J=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},q=Array.isArray(P)?P:[P],V=q.length>0,G={padding:J,boundary:q.filter(vxe),altBoundary:V},{reference:Q,floating:X,strategy:me,x:xe,y:Se,placement:He,middlewareData:Ue,update:ut}=oxe({strategy:"fixed",placement:ie,whileElementsMounted:nxe,middleware:[$be({mainAxis:m+ne,alignmentAxis:b}),I?Hbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Wbe():void 0,...G}):void 0,W?axe({element:W,padding:w}):void 0,I?zbe({...G}):void 0,yxe({arrowWidth:j,arrowHeight:ne}),L?Bbe({strategy:"referenceHidden"}):void 0].filter(mxe)});z0(()=>{Q(N.anchor)},[Q,N.anchor]);const Xe=xe!==null&&Se!==null,[et,tt]=mH(He),at=(i=Ue.arrow)===null||i===void 0?void 0:i.x,At=(o=Ue.arrow)===null||o===void 0?void 0:o.y,wt=((a=Ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,dt]=C.exports.useState();z0(()=>{D&&dt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ct}=pxe(e4,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ct.add(ut),()=>{ct.delete(ut)}},[xt,ct,ut]),C.exports.useLayoutEffect(()=>{xt&&Xe&&Array.from(ct).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,Xe,ct]);const kn={"data-side":et,"data-align":tt,...O,ref:H,style:{...O.style,animation:Xe?void 0:"none",opacity:(s=Ue.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Ue.transformOrigin)===null||l===void 0?void 0:l.x,(u=Ue.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(fxe,{scope:h,placedSide:et,onArrowChange:Y,arrowX:at,arrowY:At,shouldHideArrow:wt},xt?C.exports.createElement(hxe,{scope:h,hasParent:!0,positionUpdateFns:ct},C.exports.createElement(wu.div,kn)):C.exports.createElement(wu.div,kn)))});function mxe(e){return e!==void 0}function vxe(e){return e!==null}const yxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=mH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?P:`${E}px`,I=`${-v}px`):b==="top"?(L=g?P:`${E}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?P:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?P:`${k}px`),{data:{x:L,y:I}}}});function mH(e){const[t,n="center"]=e.split("-");return[t,n]}const bxe=uxe,xxe=dxe,Sxe=gxe;function wxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vH=e=>{const{present:t,children:n}=e,r=Cxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};vH.displayName="Presence";function Cxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=wxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Dy(r.current);o.current=s==="mounted"?u:"none"},[s]),z0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Dy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),z0(()=>{if(t){const u=g=>{const v=Dy(r.current).includes(g.animationName);g.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Dy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Dy(e){return e?.animationName||"none"}function _xe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=kxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function kxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const y6="rovingFocusGroup.onEntryFocus",Exe={bubbles:!1,cancelable:!0},W_="RovingFocusGroup",[ZC,yH,Pxe]=eH(W_),[Lxe,bH]=Kv(W_,[Pxe]),[Txe,Axe]=Lxe(W_),Ixe=C.exports.forwardRef((e,t)=>C.exports.createElement(ZC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(ZC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Mxe,An({},e,{ref:t}))))),Mxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=tH(o),[b=null,w]=_xe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),k=Ll(u),L=yH(n),I=C.exports.useRef(!1),[O,N]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(y6,k),()=>D.removeEventListener(y6,k)},[k]),C.exports.createElement(Txe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>N(D=>D-1),[])},C.exports.createElement(wu.div,An({tabIndex:P||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!P){const H=new CustomEvent(y6,Exe);if(D.currentTarget.dispatchEvent(H),!H.defaultPrevented){const W=L().filter(ie=>ie.focusable),Y=W.find(ie=>ie.active),de=W.find(ie=>ie.id===b),ne=[Y,de,...W].filter(Boolean).map(ie=>ie.ref.current);xH(ne)}}I.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Oxe="RovingFocusGroupItem",Rxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Pbe(),s=Axe(Oxe,n),l=s.currentTabStopId===a,u=yH(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(ZC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=zxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Bxe(w,P+1):w.slice(P+1)}setTimeout(()=>xH(w))}})})))}),Nxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zxe(e,t,n){const r=Dxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Nxe[r]}function xH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Bxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Fxe=Ixe,$xe=Rxe,Hxe=["Enter"," "],Wxe=["ArrowDown","PageUp","Home"],SH=["ArrowUp","PageDown","End"],Vxe=[...Wxe,...SH],Xb="Menu",[XC,Uxe,jxe]=eH(Xb),[dh,wH]=Kv(Xb,[jxe,pH,bH]),V_=pH(),CH=bH(),[Gxe,Qb]=dh(Xb),[qxe,U_]=dh(Xb),Kxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=V_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ll(o),m=tH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(bxe,s,C.exports.createElement(Gxe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(qxe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Yxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=V_(n);return C.exports.createElement(xxe,An({},i,r,{ref:t}))}),Zxe="MenuPortal",[rEe,Xxe]=dh(Zxe,{forceMount:void 0}),td="MenuContent",[Qxe,_H]=dh(td),Jxe=C.exports.forwardRef((e,t)=>{const n=Xxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Qb(td,e.__scopeMenu),a=U_(td,e.__scopeMenu);return C.exports.createElement(XC.Provider,{scope:e.__scopeMenu},C.exports.createElement(vH,{present:r||o.open},C.exports.createElement(XC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(eSe,An({},i,{ref:t})):C.exports.createElement(tSe,An({},i,{ref:t})))))}),eSe=C.exports.forwardRef((e,t)=>{const n=Qb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return jz(o)},[]),C.exports.createElement(kH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),tSe=C.exports.forwardRef((e,t)=>{const n=Qb(td,e.__scopeMenu);return C.exports.createElement(kH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=Qb(td,n),P=U_(td,n),E=V_(n),k=CH(n),L=Uxe(n),[I,O]=C.exports.useState(null),N=C.exports.useRef(null),D=Ha(t,N,w.onContentChange),z=C.exports.useRef(0),H=C.exports.useRef(""),W=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),ne=v?IB:C.exports.Fragment,ie=v?{as:yv,allowPinchZoom:!0}:void 0,J=V=>{var G,Q;const X=H.current+V,me=L().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(G=me.find(Xe=>Xe.ref.current===xe))===null||G===void 0?void 0:G.textValue,He=me.map(Xe=>Xe.textValue),Ue=cSe(He,X,Se),ut=(Q=me.find(Xe=>Xe.textValue===Ue))===null||Q===void 0?void 0:Q.ref.current;(function Xe(et){H.current=et,window.clearTimeout(z.current),et!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(X),ut&&setTimeout(()=>ut.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),vbe();const q=C.exports.useCallback(V=>{var G,Q;return de.current===((G=Y.current)===null||G===void 0?void 0:G.side)&&fSe(V,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(Qxe,{scope:n,searchRef:H,onItemEnter:C.exports.useCallback(V=>{q(V)&&V.preventDefault()},[q]),onItemLeave:C.exports.useCallback(V=>{var G;q(V)||((G=N.current)===null||G===void 0||G.focus(),O(null))},[q]),onTriggerLeave:C.exports.useCallback(V=>{q(V)&&V.preventDefault()},[q]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(V=>{Y.current=V},[])},C.exports.createElement(ne,ie,C.exports.createElement(ybe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,V=>{var G;V.preventDefault(),(G=N.current)===null||G===void 0||G.focus()}),onUnmountAutoFocus:a},C.exports.createElement(pbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Fxe,An({asChild:!0},k,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:V=>{P.isUsingKeyboardRef.current||V.preventDefault()}}),C.exports.createElement(Sxe,An({role:"menu","aria-orientation":"vertical","data-state":sSe(w.open),"data-radix-menu-content":"",dir:P.dir},E,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,V=>{const Q=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,me=V.key.length===1;Q&&(V.key==="Tab"&&V.preventDefault(),!X&&me&&J(V.key));const xe=N.current;if(V.target!==xe||!Vxe.includes(V.key))return;V.preventDefault();const He=L().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);SH.includes(V.key)&&He.reverse(),lSe(He)}),onBlur:qn(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:qn(e.onPointerMove,JC(V=>{const G=V.target,Q=j.current!==V.clientX;if(V.currentTarget.contains(G)&&Q){const X=V.clientX>j.current?"right":"left";de.current=X,j.current=V.clientX}}))})))))))}),QC="MenuItem",nI="menu.itemSelect",nSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=U_(QC,e.__scopeMenu),s=_H(QC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(nI,{bubbles:!0,cancelable:!0});g.addEventListener(nI,v=>r?.(v),{once:!0}),J$(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(rSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Hxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),rSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_H(QC,n),s=CH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(XC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement($xe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,JC(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,JC(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),iSe="MenuRadioGroup";dh(iSe,{value:void 0,onValueChange:()=>{}});const oSe="MenuItemIndicator";dh(oSe,{checked:!1});const aSe="MenuSub";dh(aSe);function sSe(e){return e?"open":"closed"}function lSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=uSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function dSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function fSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dSe(n,t)}function JC(e){return t=>t.pointerType==="mouse"?e(t):void 0}const hSe=Kxe,pSe=Yxe,gSe=Jxe,mSe=nSe,EH="ContextMenu",[vSe,iEe]=Kv(EH,[wH]),Jb=wH(),[ySe,PH]=vSe(EH),bSe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=Jb(t),u=Ll(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(ySe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(hSe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},xSe="ContextMenuTrigger",SSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(xSe,n),o=Jb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(pSe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,zy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,zy(u)),onPointerCancel:qn(e.onPointerCancel,zy(u)),onPointerUp:qn(e.onPointerUp,zy(u))})))}),wSe="ContextMenuContent",CSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(wSe,n),o=Jb(n),a=C.exports.useRef(!1);return C.exports.createElement(gSe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),_Se=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Jb(n);return C.exports.createElement(mSe,An({},i,r,{ref:t}))});function zy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const kSe=bSe,ESe=SSe,PSe=CSe,wc=_Se,LSe=Ze([e=>e.gallery,e=>e.options,sn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),TSe=Ze([e=>e.options,e=>e.gallery,e=>e.system,sn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ASe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,ISe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce(TSe),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=lh(),w=()=>v(!0),P=()=>v(!1),E=()=>{s.metadata&&t(ux(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(Qv(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(kl(!1)),t(xv(s)),n!=="img2img"&&t(Co("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(kl(!1)),t(q5(s)),n!=="inpainting"&&t(Co("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(kl(!1)),t(P$(s)),n!=="outpainting"&&t(Co("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},N=()=>{g&&t(o7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(Co("img2img")),t(a7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return te(kSe,{children:[x(ESe,{children:te(md,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:P,children:[x(ib,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:w5e,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(VC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(F5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),te(PSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(wc,{onClickCapture:E,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(wc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(wc,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(wc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(wc,{onClickCapture:L,children:"Send to Image To Image"}),x(wc,{onClickCapture:I,children:"Send to Inpainting"}),x(wc,{onClickCapture:O,children:"Send to Outpainting"}),x(VC,{image:s,children:x(wc,{"data-warning":!0,children:"Delete Image"})})]})]})},ASe),MSe=320;function LH(){const e=$e(),t=lh(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:P}=Ce(LSe),[E,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,N]=C.exports.useState(w>=MSe);C.exports.useEffect(()=>{if(!!o){if(P){e(Lg(400)),k(400),I(400);return}h==="inpainting"?(e(Lg(190)),k(190),I(190)):h==="img2img"?(e(Lg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Lg(Math.min(Math.max(Number(w),0),590))),I(590)),e(Cr(!0))}},[e,h,o,w,P]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,P]);const D=C.exports.useRef(null),z=C.exports.useRef(null),H=C.exports.useRef(null),W=()=>{e(N4e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(m0(!0)),o&&e(Cr(!0))},j=()=>{e(m0(!1)),e(D4e(z.current?z.current.scrollTop:0)),e(B4e(!1))},ne=()=>{e(HC(r))},ie=G=>{e(pf(G)),e(Cr(!0))},J=()=>{H.current=window.setTimeout(()=>j(),500)},q=()=>{H.current&&window.clearTimeout(H.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(z_())}),vt("right",()=>{e(D_())}),vt("shift+g",()=>{W(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(m0(!1)),e(Cr(!0)))},[o]);const V=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const G=l+V;G<=256?(e(pf(G)),t({title:`Gallery Thumbnail Size set to ${G}`,status:"success",duration:1e3,isClosable:!0})):(e(pf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const G=l-V;G>32?(e(pf(G)),t({title:`Gallery Thumbnail Size set to ${G}`,status:"success",duration:1e3,isClosable:!0})):(e(pf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(pf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),W$(D,j,!o),x(H$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:J,onMouseEnter:o?void 0:q,onMouseOver:o?void 0:q,children:te(X$,{minWidth:E,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(G,Q,X,me)=>{e(Lg(Ge.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(G,Q,X,me)=>{const xe=Ge.clamp(Number(w)+me.width,0,Number(L));xe>=280&&!O?N(!0):xe<280&&O&&N(!1),xe>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[te("div",{className:"image-gallery-header",children:[x(Eo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?te(Xn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Iy("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Iy("user")),children:"User"})]}):te(Xn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(k5e,{}),onClick:()=>e(Iy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(W5e,{}),onClick:()=>e(Iy("user"))})]})}),te("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(A_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:te("div",{className:"image-gallery-settings-popover",children:[te("div",{children:[x(ch,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(pf(64)),icon:x(k_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(z4e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:G=>e(F4e(G.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?x(z$,{}):x(B$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?te(Xn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(G=>{const{uuid:Q}=G;return x(ISe,{image:G,isSelected:i===Q},Q)})}),x(Ra,{onClick:ne,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):te("div",{className:"image-gallery-container-placeholder",children:[x(u$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const OSe=Ze([e=>e.options,sn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ex=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(OSe),l=()=>{t(s7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:te("div",{className:"workarea-main",children:[n,te("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(K4e,{})})})]}),!a&&x(LH,{})]})})};function RSe(){return x(ex,{optionsPanel:x(T4e,{}),children:x(q4e,{})})}const NSe=Ze(jt,e=>e.shouldDarkenOutsideBoundingBox);function DSe(){const e=$e(),t=Ce(NSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(T$(!t))},styleClass:"inpainting-bounding-box-darken"})}const zSe=Ze(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function rI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(zSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Kg({...a,width:Math.floor(g)})),t=="height"&&r(Kg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Kg({...a,width:Math.floor(s)})),t=="height"&&r(Kg({...a,height:Math.floor(s)}))};return x(ch,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const BSe=Ze(jt,e=>e.shouldLockBoundingBox);function FSe(){const e=Ce(BSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(A$(!e))},styleClass:"inpainting-bounding-box-darken"})}const $Se=Ze(jt,e=>e.shouldShowBoundingBox);function HSe(){const e=Ce($Se),t=$e();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(n$,{size:22}):x(t$,{size:22}),onClick:()=>t(I_(!e)),background:"none",padding:0})}const WSe=()=>te("div",{className:"inpainting-bounding-box-settings",children:[te("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(HSe,{})]}),te("div",{className:"inpainting-bounding-box-settings-items",children:[x(rI,{dimension:"width",label:"Box W"}),x(rI,{dimension:"height",label:"Box H"}),te(on,{alignItems:"center",justifyContent:"space-between",children:[x(DSe,{}),x(FSe,{})]})]})]}),VSe=Ze(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function USe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(VSe),n=$e();return te(on,{alignItems:"center",columnGap:"1rem",children:[x(ch,{label:"Inpaint Replace",value:e,onChange:r=>{n(LA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(LA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(i4e(r.target.checked))})]})}const jSe=Ze(jt,e=>{const{pastObjects:t,futureObjects:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function GSe(){const e=$e(),t=lh(),{mayClearBrushHistory:n}=Ce(jSe);return x(ul,{onClick:()=>{e(r4e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function TH(){return te(Xn,{children:[x(USe,{}),x(WSe,{}),x(GSe,{})]})}function qSe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x(E_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(TH,{}),x($b,{}),e&&x(Wb,{accordionInfo:t})]})}function tx(){return(tx=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function e8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var B0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(iI(i.current,P,s.current)):w(!1)},b=function(){return w(!1)};function w(P){var E=l.current,k=t8(i.current),L=P?k.addEventListener:k.removeEventListener;L(E?"touchmove":"mousemove",v),L(E?"touchend":"mouseup",b)}return[function(P){var E=P.nativeEvent,k=i.current;if(k&&(oI(E),!function(I,O){return O&&!Lm(I)}(E,l.current)&&k)){if(Lm(E)){l.current=!0;var L=E.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(iI(k,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...tx({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),nx=function(e){return e.filter(Boolean).join(" ")},G_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=nx(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},IH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},n8=function(e){var t=IH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},b6=function(e){var t=IH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},KSe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},YSe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},ZSe=le.memo(function(e){var t=e.hue,n=e.onChange,r=nx(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(j_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:B0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(G_,{className:"react-colorful__hue-pointer",left:t/360,color:n8({h:t,s:100,v:100,a:1})})))}),XSe=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:n8({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(j_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:B0(t.s+100*i.left,0,100),v:B0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(G_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:n8(t)})))}),MH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function QSe(e,t,n){var r=e8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;MH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var JSe=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,e6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aI=new Map,t6e=function(e){JSe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aI.set(t,n);var r=e6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},n6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+b6(Object.assign({},n,{a:0}))+", "+b6(Object.assign({},n,{a:1}))+")"},o=nx(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(j_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:B0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(G_,{className:"react-colorful__alpha-pointer",left:n.a,color:b6(n)})))},r6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);t6e(s);var l=QSe(n,i,o),u=l[0],h=l[1],g=nx(["react-colorful",t]);return le.createElement("div",tx({},a,{ref:s,className:g}),x(XSe,{hsva:u,onChange:h}),x(ZSe,{hue:u.h,onChange:h}),le.createElement(n6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},i6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:YSe,fromHsva:KSe,equal:MH},o6e=function(e){return le.createElement(r6e,tx({},e,{colorModel:i6e}))};const q_=e=>{const{styleClass:t,...n}=e;return x(o6e,{className:`invokeai__color-picker ${t}`,...n})},a6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function s6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(a6e),r=$e(),i=o=>{r(_$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(gt,{"aria-label":"Mask Color",icon:x(I5e,{}),isDisabled:!e,cursor:"pointer"}),children:x(q_,{color:t,onChange:i})})}const l6e=Ze([jt,sn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function u6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(l6e),i=()=>e(Su("brush")),o=()=>{e(c6(!0))},a=()=>{e(c6(!1))},s=l=>{e(c6(!0)),e(x$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(g$,{}),onClick:i,"data-selected":t==="brush"}),children:te("div",{className:"inpainting-brush-options",children:[x(ch,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(s6e,{})]})})}const c6e=Ze([jt,sn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function d6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(c6e),r=$e(),i=()=>r(Su("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(gt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(p$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const f6e=Ze([jt,sn],(e,t)=>{const{pastObjects:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function OH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(f6e),r=()=>{e(t4e())};return vt(["meta+z","control+z"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Undo",tooltip:"Undo",icon:x($5e,{}),onClick:r,isDisabled:!t})}const h6e=Ze([jt,sn],(e,t)=>{const{futureObjects:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function RH(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(h6e),r=()=>{e(n4e())};return vt(["meta+shift+z","control+shift+z","control+y","meta+y"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Redo",tooltip:"Redo",icon:x(D5e,{}),onClick:r,isDisabled:!t})}const p6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n,objects:r}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(Vb).length===0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function g6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(p6e),r=$e(),i=lh(),o=()=>{r(k$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(gt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(O5e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const m6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function v6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(m6e),r=()=>e(C$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(gt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(n$,{size:22}):x(t$,{size:22}),onClick:r})}const y6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function b6e(){const{shouldInvertMask:e,isMaskEnabled:t,activeTabName:n}=Ce(y6e),r=$e(),i=()=>r(e4e(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(gt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(s5e,{size:22}):x(l5e,{size:22}),onClick:i,isDisabled:!t})}const x6e=Ze(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),S6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(x6e);return x(gt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(L5e,{}):x(H5e,{}),"data-selected":t,onClick:()=>{e(A$(!t))}})},w6e=Ze(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),C6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(w6e);return x(gt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(V5e,{}),"data-alert":!t,onClick:()=>{e(I_(!t))}})},_6e=Ze([jt,sn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function k6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(_6e),r=$e(),i=()=>r(Su("eraser"));return vt("shift+e",o=>{o.preventDefault(),i()},{enabled:!0},[n,t]),x(gt,{"aria-label":"Erase Canvas (Shift+E)",tooltip:"Erase Canvas (Shift+E)",icon:x(w4e,{}),fontSize:18,onClick:i,"data-selected":e==="eraser",isDisabled:!t})}var E6e=Math.PI/180;function P6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const v0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:v0,version:"8.3.13",isBrowser:P6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*E6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:v0.document,_injectGlobal(e){v0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var L6e="[object Array]",T6e="[object Number]",A6e="[object String]",I6e="[object Boolean]",M6e=Math.PI/180,O6e=180/Math.PI,x6="#",R6e="",N6e="0",D6e="Konva warning: ",sI="Konva error: ",z6e="rgb(",S6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},B6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,By=[];const F6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===L6e},_isNumber(e){return Object.prototype.toString.call(e)===T6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===A6e},_isBoolean(e){return Object.prototype.toString.call(e)===I6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){By.push(e),By.length===1&&F6e(function(){const t=By;By=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(x6,R6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=N6e+e;return x6+e},getRGB(e){var t;return e in S6?(t=S6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===x6?this._hexToRgb(e.substring(1)):e.substr(0,4)===z6e?(t=B6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=S6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function DH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Sd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function K_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function n1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function zH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function $6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function H6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Sd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Tg="get",Ag="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Tg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Ag+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Ag+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Tg+a(t),l=Ag+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Ag+n,i=Tg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Tg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Tg+fe._capitalize(n),a=Ag+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function W6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=V6e+u.join(lI)+U6e)):(o+=s.property,t||(o+=Y6e+s.val)),o+=q6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=X6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=uI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=W6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var I3="absoluteOpacity",$y="allEventListeners",iu="absoluteTransform",cI="absoluteScale",Ig="canvas",twe="Change",nwe="children",rwe="konva",r8="listening",dI="mouseenter",fI="mouseleave",hI="set",pI="Shape",M3=" ",gI="stage",kc="transform",iwe="Stage",i8="visible",owe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M3);let awe=1;class Be{constructor(t){this._id=awe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===iu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===iu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(M3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ig)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===iu&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ig),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new y0({pixelRatio:a,width:i,height:o}),v=new y0({pixelRatio:a,width:0,height:0}),b=new Y_({pixelRatio:g,width:i,height:o}),w=m.getContext(),P=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Ig),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(I3),this._clearSelfAndDescendantCache(cI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ig,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ig)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==nwe&&(r=hI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(r8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(i8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==iwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(iu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(iu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(I3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",kp=e=>{const t=Jg(e);if(t==="pointer")return ot.pointerEventsEnabled&&C6.pointer;if(t==="touch")return C6.touch;if(t==="mouse")return C6.mouse};function vI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const hwe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",O3=[];class ox extends aa{constructor(t){super(vI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),O3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{vI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===lwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&O3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(hwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new y0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+mI,this.content.style.height=n+mI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rdwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||fwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=kp(t.type),r=Jg(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=kp(t.type),r=Jg(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=kp(t.type),r=Jg(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=w6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=kp(t.type),r=Jg(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=w6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(o8,{evt:t}):this._fire(o8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a8,{evt:t}):this._fire(a8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=w6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(jp,Z_(t)),Tm(t.pointerId)}_lostpointercapture(t){Tm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new y0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Y_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ox.prototype.nodeType=swe;gr(ox);Z.addGetterSetter(ox,"container");var XH="hasShadow",QH="shadowRGBA",JH="patternImage",eW="linearGradient",tW="radialGradient";let jy;function _6(){return jy||(jy=fe.createCanvasElement().getContext("2d"),jy)}const Am={};function pwe(e){e.fill()}function gwe(e){e.stroke()}function mwe(e){e.fill()}function vwe(e){e.stroke()}function ywe(){this._clearCache(XH)}function bwe(){this._clearCache(QH)}function xwe(){this._clearCache(JH)}function Swe(){this._clearCache(eW)}function wwe(){this._clearCache(tW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Am)););this.colorKey=n,Am[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(XH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(JH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=_6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(eW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=_6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Am[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,P=v+b*2,E={width:w,height:P,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}}Ie.prototype._fillFunc=pwe;Ie.prototype._strokeFunc=gwe;Ie.prototype._fillFuncHit=mwe;Ie.prototype._strokeFuncHit=vwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",ywe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",xwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Swe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",wwe);Z.addGetterSetter(Ie,"stroke",void 0,zH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",K_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,n1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,zH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Cwe="#",_we="beforeDraw",kwe="draw",nW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Ewe=nW.length;class fh extends aa{constructor(t){super(t),this.canvas=new y0,this.hitCanvas=new Y_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(_we,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(kwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}fh.prototype.nodeType="Layer";gr(fh);Z.addGetterSetter(fh,"imageSmoothingEnabled",!0);Z.addGetterSetter(fh,"clearBeforeDraw",!0);Z.addGetterSetter(fh,"hitGraphEnabled",!0,Ls());class X_ extends fh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}X_.prototype.nodeType="FastLayer";gr(X_);class F0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}F0.prototype.nodeType="Group";gr(F0);var k6=function(){return v0.performance&&v0.performance.now?function(){return v0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:k6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=yI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=bI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===yI?this.setTime(t):this.state===bI&&this.setTime(this.duration-t)}pause(){this.state=Lwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Im.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Twe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Awe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Pwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Im={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Tu.prototype._centroid=!0;Tu.prototype.className="Arc";Tu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Tu);Z.addGetterSetter(Tu,"innerRadius",0,ze());Z.addGetterSetter(Tu,"outerRadius",0,ze());Z.addGetterSetter(Tu,"angle",0,ze());Z.addGetterSetter(Tu,"clockwise",!1,Ls());function s8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function SI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,g,g+m,1-b),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,N,D,z,H,W,Y,de,j,ne,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var J=b.shift(),q=b.shift();if(l+=J,u+=q,k="M",a.length>2&&a[a.length-1].command==="z"){for(var V=a.length-2;V>=0;V--)if(a[V].command==="M"){l=a[V].points[0]+J,u=a[V].points[1]+q;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":H=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),ne=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(ne,ie,l,u,de,j,H,W,Y);break;case"a":H=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),ne=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(ne,ie,l,u,de,j,H,W,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,P=b*-l*g/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,L=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},I=function(W,Y){return(W[0]*Y[0]+W[1]*Y[1])/(L(W)*L(Y))},O=function(W,Y){return(W[0]*Y[1]=1&&(H=0),a===0&&H>0&&(H=H-2*Math.PI),a===1&&H<0&&(H=H+2*Math.PI),[E,k,s,l,N,H,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class hh extends Au{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}hh.prototype.className="Arrow";gr(hh);Z.addGetterSetter(hh,"pointerLength",10,ze());Z.addGetterSetter(hh,"pointerWidth",10,ze());Z.addGetterSetter(hh,"pointerAtBeginning",!1);Z.addGetterSetter(hh,"pointerAtEnding",!0);class r1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}r1.prototype._centroid=!0;r1.prototype.className="Circle";r1.prototype._attrsAffectingSize=["radius"];gr(r1);Z.addGetterSetter(r1,"radius",0,ze());class wd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(wd);Z.addComponentsGetterSetter(wd,"radius",["x","y"]);Z.addGetterSetter(wd,"radiusX",0,ze());Z.addGetterSetter(wd,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var rW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Iwe="Change.konva",Mwe="none",l8="up",u8="right",c8="down",d8="left",Owe=rW.length;class Q_ extends F0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gh.prototype.className="RegularPolygon";gh.prototype._centroid=!0;gh.prototype._attrsAffectingSize=["radius"];gr(gh);Z.addGetterSetter(gh,"radius",0,ze());Z.addGetterSetter(gh,"sides",0,ze());var wI=Math.PI*2;class mh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,wI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),wI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}mh.prototype.className="Ring";mh.prototype._centroid=!0;mh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(mh);Z.addGetterSetter(mh,"innerRadius",0,ze());Z.addGetterSetter(mh,"outerRadius",0,ze());class Rl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var qy;function P6(){return qy||(qy=fe.createCanvasElement().getContext(Dwe),qy)}function qwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Kwe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Ywe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(Ywe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(zwe,n),this}getWidth(){var t=this.attrs.width===Ep||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Ep||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=P6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Gy+this.fontVariant()+Gy+(this.fontSize()+Hwe)+Gwe(this.fontFamily())}_addTextLine(t){this.align()===Mg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return P6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Ep&&o!==void 0,l=a!==Ep&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==kI,w=v!==Uwe&&b,P=this.ellipsis();this.textArr=[],P6().font=this._getContextFont();for(var E=P?this._getTextWidth(E6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var N=0,D=I.length,z="",H=0;N>>1,Y=I.slice(0,W+1),de=this._getTextWidth(Y)+E;de<=h?(N=W+1,z=Y,H=de):D=W}if(z){if(w){var j,ne=I[z.length],ie=ne===Gy||ne===CI;ie&&H<=h?j=z.length:j=Math.max(z.lastIndexOf(Gy),z.lastIndexOf(CI))+1,j>0&&(N=j,z=z.slice(0,N),H=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,H),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(N),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Ep&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==kI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Ep&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+E6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=iW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var ne=0,ie=0;for(v=void 0;Math.abs(j-ne)/j>.01&&ie<20;){ie++;for(var J=ne;b===void 0;)b=E(),b&&J+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var V=b.points[4],G=b.points[5],Q=b.points[4]+G;P===0?P=V+1e-8:j>ne?P+=Math.PI/180*G/Math.abs(G):P-=Math.PI/360*G/Math.abs(G),(G<0&&P=0&&P>Q)&&(P=Q,q=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case"C":P===0?j>b.pathLength?P=1e-8:P=j/b.pathLength:j>ne?P+=(j-ne)/b.pathLength/2:P=Math.max(P-(ne-j)/b.pathLength/2,0),P>1&&(P=1,q=!0),v=Nn.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":P===0?P=j/b.pathLength:j>ne?P+=(j-ne)/b.pathLength:P-=(ne-j)/b.pathLength,P>1&&(P=1,q=!0),v=Nn.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(ne=Nn.getLineLength(m.x,m.y,v.x,v.y)),q&&(q=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,N=0;Ne+`.${dW}`).join(" "),EI="nodesRect",Qwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],Jwe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const eCe="ontouchstart"in ot._global;function tCe(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(Jwe[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var t4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],PI=1e8;function nCe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function rCe(e,t){const n=nCe(e);return fW(e,t,n)}function iCe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Qwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(EI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(EI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return fW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-PI,y:-PI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),t4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Zv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:eCe?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=tCe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,ne=ot.getAngle(this.rotationSnapTolerance()),J=iCe(this.rotationSnaps(),j,ne)-g.rotation,q=rCe(g,J);this._fitNodesInto(q,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,P=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const P=w.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),F0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function oCe(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){t4.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+t4.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",t4,oCe);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Iu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Iu.prototype.className="Wedge";Iu.prototype._centroid=!0;Iu.prototype._attrsAffectingSize=["radius"];gr(Iu);Z.addGetterSetter(Iu,"radius",0,ze());Z.addGetterSetter(Iu,"angle",0,ze());Z.addGetterSetter(Iu,"clockwise",!1);Z.backCompat(Iu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function LI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var aCe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],sCe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function lCe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,P,E,k,L,I,O,N,D,z,H,W,Y,de,j=t+t+1,ne=r-1,ie=i-1,J=t+1,q=J*(J+1)/2,V=new LI,G=null,Q=V,X=null,me=null,xe=aCe[t],Se=sCe[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*xe>>Se)*Y,n[h+1]=(v*xe>>Se)*Y,n[h+2]=(b*xe>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,b-=k,w-=L,P-=X.r,E-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*xe>>Se)*Y,n[l+1]=(v*xe>>Se)*Y,n[l+2]=(b*xe>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,b-=k,w-=L,P-=X.r,E-=X.g,k-=X.b,L-=X.a,l=o+((l=a+J)0&&lCe(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const cCe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const fCe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var k=b+(w-1+E)*4,L=s[P]-s[k],I=s[P+1]-s[k+1],O=s[P+2]-s[k+2],N=L,D=N>0?N:-N,z=I>0?I:-I,H=O>0?O:-O;if(z>D&&(N=I),H>D&&(N=O),N*=t,i){var W=s[P]+N,Y=s[P+1]+N,de=s[P+2]+N;s[P]=W>255?255:W<0?0:W,s[P+1]=Y>255?255:Y<0?0:Y,s[P+2]=de>255?255:de<0?0:de}else{var j=n-N;j<0?j=0:j>255&&(j=255),s[P]=s[P+1]=s[P+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function L6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const hCe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,P,E,k,L,I,O,N;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),N=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),P=r+v*(r-b),E=(s+a)*.5,k=s+v*(s-E),L=a+v*(a-E),I=(h+u)*.5,O=h+v*(h-I),N=u+v*(u-I)),m=0;mE?P:E;var k=a,L=o,I,O,N=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,N,D,z=n.polarRotation||0,H,W;for(h=0;ht&&(I=L,O=0,N=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function ECe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const ACe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);const MCe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const OCe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},NCe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||T[$]!==M[se]){var he=` +`+T[$].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=$&&0<=se);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Dl(d):""}var Sh=Object.prototype.hasOwnProperty,Nu=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Nu[Rs],Nu[Rs]=null,Rs--)}function bn(d,f){Rs++,Nu[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var T={},M;for(M in y)T[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Pd(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var T in _)if(!(T in f))throw Error(a(108,z(d)||"Unknown",T));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ld(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Td,wh=Math.log,Ch=Math.LN2;function Td(d){return d>>>=0,d===0?32:31-(wh(d)/Ch|0)|0}var Ds=64,uo=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Fl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,T=d.suspendedLanes,M=d.pingedLanes,$=y&268435455;if($!==0){var se=$&~T;se!==0?_=zs(se):(M&=$,M!==0&&(_=zs(M)))}else $=y&~T,$!==0?_=zs($):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&T)===0&&(T=_&-_,M=f&-f,T>=M||T===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Id(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=$,T-=$,Gi=1<<32-gi(f)+T|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var Kt=Ke(ge,kt,ye[Ft],We);if(Kt===null){kt===null&&(kt=Br);break}d&&kt&&Kt.alternate===null&&f(ge,kt),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt,kt=Br}if(Ft===ye.length)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ke(ge,kt,Kt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Tt===null?Le=ns:Tt.sibling=ns,Tt=ns,kt=Br}if(Kt.done)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;!Kt.done;Ft++,Kt=ye.next())Kt=Lt(ge,Kt.value,We),Kt!==null&&(ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return zn&&Bs(ge,Ft),Le}for(kt=_(ge,kt);!Kt.done;Ft++,Kt=ye.next())Kt=Fn(kt,ge,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&kt.delete(Kt.key===null?Ft:Kt.key),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Le}function Ko(ge,ue,ye,We){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Le=ye.key,Tt=ue;Tt!==null;){if(Tt.key===Le){if(Le=ye.type,Le===h){if(Tt.tag===7){y(ge,Tt.sibling),ue=T(Tt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Tt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===L&&P1(Le)===Tt.type){y(ge,Tt.sibling),ue=T(Tt,ye.props),ue.ref=ba(ge,Tt,ye),ue.return=ge,ge=ue;break e}y(ge,Tt);break}else f(ge,Tt);Tt=Tt.sibling}ye.type===h?(ue=Qs(ye.props.children,ge.mode,We,ye.key),ue.return=ge,ge=ue):(We=af(ye.type,ye.key,ye.props,null,ge.mode,We),We.ref=ba(ge,ue,ye),We.return=ge,ge=We)}return $(ge);case u:e:{for(Tt=ye.key;ue!==null;){if(ue.key===Tt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=T(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(ye,ge.mode,We),ue.return=ge,ge=ue}return $(ge);case L:return Tt=ye._init,Ko(ge,ue,Tt(ye._payload),We)}if(ie(ye))return Ln(ge,ue,ye,We);if(N(ye))return er(ge,ue,ye,We);Di(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=T(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=cp(ye,ge.mode,We),ue.return=ge,ge=ue),$(ge)):y(ge,ue)}return Ko}var Gu=l2(!0),u2=l2(!1),Wd={},po=No(Wd),xa=No(Wd),oe=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){bn(oe,f),bn(xa,d),bn(po,Wd),d=q(f),Pn(po),bn(po,d)}function qe(){Pn(po),Pn(xa),Pn(oe)}function _t(d){var f=be(oe.current),y=be(po.current);f=V(y,d.type,f),y!==f&&(bn(xa,d),bn(po,f))}function Jt(d){xa.current===d&&(Pn(po),Pn(xa))}var Ot=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ou(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function L1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function ec(){return yi().memoizedState}function D1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},nc(d))rc(f,y);else if(y=ju(d,f,y,_),y!==null){var T=ai();vo(y,d,_,T),Yd(y,f,_)}}function tc(d,f,y){var _=Ar(d),T={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(nc(d))rc(f,T);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var $=f.lastRenderedState,se=M($,y);if(T.hasEagerState=!0,T.eagerState=se,U(se,$)){var he=f.interleaved;he===null?(T.next=T,$d(f)):(T.next=he.next,he.next=T),f.interleaved=T;return}}catch{}finally{}y=ju(d,f,T,_),y!==null&&(T=ai(),vo(y,d,_,T),Yd(y,f,_))}}function nc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function rc(d,f){Ud=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Yd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,$l(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},dx={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:f2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Ul(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Ul(4194308,4,d,f)},useInsertionEffect:function(d,f){return Ul(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=D1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:d2,useDebugValue:O1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=d2(!1),f=d[0];return d=N1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,T=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Vl&30)!==0||M1(_,f,y)}T.memoizedState=y;var M={value:y,getSnapshot:f};return T.queue=M,f2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,qd(9,Qu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0ep&&(f.flags|=128,_=!0,ac(T,!1),f.lanes=4194304)}else{if(!_)if(d=cn(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),ac(T,!0),T.tail===null&&T.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-T.renderingStartTime>ep&&y!==1073741824&&(f.flags|=128,_=!0,ac(T,!1),f.lanes=4194304);T.isBackwards?(M.sibling=f.child,f.child=M):(d=T.last,d!==null?d.sibling=M:f.child=M,T.last=M)}return T.tail!==null?(f=T.tail,T.rendering=f,T.tail=f.sibling,T.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return gc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function U1(d,f){switch(C1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return qe(),Pn(Ur),Pn(kr),L1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Wu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return qe(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,vx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function sc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Hh=!1;function Gl(d,f){for(G(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,M=d.stateNode,$=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),T);M.__reactInternalSnapshotBeforeUpdate=$}break;case 3:at&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Hh,Hh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var T=_=_.next;do{if((T.tag&d)===d){var M=T.destroy;T.destroy=void 0,M!==void 0&&Uo(f,y,M)}T=T.next}while(T!==_)}}function Wh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Vh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function j1(d){var f=d.alternate;f!==null&&(d.alternate=null,j1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ct(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function lc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||lc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Uh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Fe(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(Uh(d,f,y),d=d.sibling;d!==null;)Uh(d,f,y),d=d.sibling}function G1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(G1(d,f,y),d=d.sibling;d!==null;)G1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Lr(d,f,y),y=y.sibling}function Lr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||sc(y,f);case 6:if(at){var _=br,T=jo;br=null,Go(d,f,y),br=_,jo=T,br!==null&&(jo?rt(br,y.stateNode):pt(br,y.stateNode))}else Go(d,f,y);break;case 18:at&&br!==null&&(jo?y1(br,y.stateNode):v1(br,y.stateNode));break;case 4:at?(_=br,T=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=T):(At&&(_=y.stateNode.containerInfo,T=ga(_),Mu(_,T)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){T=_=_.next;do{var M=T,$=M.destroy;M=M.tag,$!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,$),T=T.next}while(T!==_)}Go(d,f,y);break;case 1:if(!Pr&&(sc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function jh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new vx),f.forEach(function(_){var T=A2.bind(null,d,_);y.has(_)||(y.add(_),_.then(T,T))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Yh:return":has("+(Y1(d)||"")+")";case Zh:return'[role="'+d.value+'"]';case Xh:return'"'+d.value+'"';case uc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function cc(d,f){var y=[];d=[d,0];for(var _=0;_T&&(T=$),_&=~M}if(_=T,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*yx(_/1960))-_,10<_){d.timeoutHandle=ut(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?rp.bind(null,d):null}function ip(d,f){var y=hc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=mc(d,f),d!==2&&(f=xi,xi=y,f!==null&&op(f)),d}function op(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,tp=0,(Bt&6)!==0)throw Error(a(331));var T=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var M=Qe,$=M.child;if((Qe.flags&16)!==0){var se=M.deletions;if(se!==null){for(var he=0;heWn()-Q1?Ys(d,0):X1|=y),Yr(d,f)}function rg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function xx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),rg(d,y)}function A2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),rg(d,y)}var ig;ig=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,gx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&w1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var T=Ns(f,kr.current);Uu(f,y),T=A1(null,f,_,d,T,y);var M=Yu();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,k1(f),T.updater=Ho,f.stateNode=T,T._reactInternals=f,E1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,T,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,T=_._init,_=T(_._payload),f.type=_,T=f.tag=lp(_),d=Fo(_,d),T){case 0:f=F1(null,f,_,d,y);break e;case 1:f=S2(null,f,_,d,y);break e;case 11:f=v2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),F1(d,f,_,T,y);case 1:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),S2(d,f,_,T,y);case 3:e:{if(w2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,T=M.element,i2(d,f),Mh(f,_,null,y);var $=f.memoizedState;if(_=$.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){T=ic(Error(a(423)),f),f=C2(d,f,_,y,T);break e}else if(_!==T){T=ic(Error(a(424)),f),f=C2(d,f,_,y,T);break e}else for(wt&&(fo=c1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,ho=!1),y=u2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Wu(),_===T){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Rd(f),_=f.type,T=f.pendingProps,M=d!==null?d.memoizedProps:null,$=T.children,He(_,T)?$=null:M!==null&&He(_,M)&&(f.flags|=32),x2(d,f),bi(d,f,$,y),f.child;case 6:return d===null&&Rd(f),null;case 13:return _2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Gu(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),v2(d,f,_,T,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,T=f.pendingProps,M=f.memoizedProps,$=T.value,r2(f,_,$),M!==null)if(U(M.value,$)){if(M.children===T.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var se=M.dependencies;if(se!==null){$=M.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var nt=Re.pending;nt===null?he.next=he:(he.next=nt.next,nt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),Fd(M.return,y,f),se.lanes|=y;break}he=he.next}}else if(M.tag===10)$=M.type===f.type?null:M.child;else if(M.tag===18){if($=M.return,$===null)throw Error(a(341));$.lanes|=y,se=$.alternate,se!==null&&(se.lanes|=y),Fd($,y,f),$=M.sibling}else $=M.child;if($!==null)$.return=M;else for($=M;$!==null;){if($===f){$=null;break}if(M=$.sibling,M!==null){M.return=$.return,$=M;break}$=$.return}M=$}bi(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,_=f.pendingProps.children,Uu(f,y),T=qi(T),_=_(T),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,T=Fo(_,f.pendingProps),T=Fo(_.type,T),Ws(d,f,_,T,y);case 15:return y2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Uu(f,y),a2(f,_,T),E1(f,_,T,y),Wo(null,f,_,!0,d,y);case 19:return E2(d,f,y);case 22:return b2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Fu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new wa(d,f,y,_)}function og(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lp(d){if(typeof d=="function")return og(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,T,M){var $=2;if(_=d,typeof d=="function")og(d)&&($=1);else if(typeof d=="string")$=5;else e:switch(d){case h:return Qs(y.children,T,M,f);case g:$=8,T|=8;break;case m:return d=yo(12,y,f,T|2),d.elementType=m,d.lanes=M,d;case P:return d=yo(13,y,f,T),d.elementType=P,d.lanes=M,d;case E:return d=yo(19,y,f,T),d.elementType=E,d.lanes=M,d;case I:return up(y,T,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:$=10;break e;case b:$=9;break e;case w:$=11;break e;case k:$=14;break e;case L:$=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo($,y,f,T),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function up(d,f,y,_){return d=yo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function cp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=et,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=T,wt&&(this.mutableSourceEagerHydrationData=null)}function I2(d,f,y,_,T,M,$,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=yo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},k1(M),d}function ag(d){if(!d)return Do;d=d._reactInternals;e:{if(H(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Bl(d,y,f)}return f}function sg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Lt&&T<=nt&&$<=Ke){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||Ke$){if(!(M!==Lt||y.height!==he.height||nt<_||Re>T)){Re>_&&(he.width+=Re-_,he.x=_),ntM&&(he.height+=Lt-M,he.y=M),Ke<$&&(he.height=$-Lt),d.splice(f,1);break}}}return d},n.findHostInstance=sg,n.findHostInstanceWithNoPortals=function(d){return d=Y(d),d=d!==null?ne(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return sg(d)},n.flushControlled=function(d){var f=Bt;Bt|=1;var y=ar.transition,_=Ht;try{ar.transition=null,Ht=1,d()}finally{Ht=_,ar.transition=y,Bt=f,Bt===0&&(qs(),mt())}},n.flushPassiveEffects=Yl,n.flushSync=J1,n.focusWithin=function(d,f){if(!Et)throw Error(a(363));for(d=Qh(d),f=cc(d,f),f=Array.from(f),d=0;dy&&(y=$)),$ ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:dp,findFiberByHostInstance:d.findFiberByHostInstance||lg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=Z1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var T=f.current,M=ai(),$=Ar(T);return y=ag(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,$),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,$),d!==null&&(vo(d,T,$,M),Ih(d,T,$)),$},n};(function(e){e.exports=DCe})(hW);const zCe=L8(hW.exports);var J_={exports:{}},vh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */vh.ConcurrentRoot=1;vh.ContinuousEventPriority=4;vh.DefaultEventPriority=16;vh.DiscreteEventPriority=1;vh.IdleEventPriority=536870912;vh.LegacyRoot=0;(function(e){e.exports=vh})(J_);const TI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let AI=!1,II=!1;const ek=".react-konva-event",BCe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,FCe=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,$Ce={};function ax(e,t,n=$Ce){if(!AI&&"zIndex"in t&&(console.warn(FCe),AI=!0),!II&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(BCe),II=!0)}for(var o in n)if(!TI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!TI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),_d(e));for(var l in v)e.on(l+ek,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const pW={},HCe={};Qf.Node.prototype._applyProps=ax;function WCe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function VCe(e,t,n){let r=Qf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Qf.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ax(l,o),l}function UCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function jCe(e,t,n){return!1}function GCe(e){return e}function qCe(){return null}function KCe(){return null}function YCe(e,t,n,r){return HCe}function ZCe(){}function XCe(e){}function QCe(e,t){return!1}function JCe(){return pW}function e8e(){return pW}const t8e=setTimeout,n8e=clearTimeout,r8e=-1;function i8e(e,t){return!1}const o8e=!1,a8e=!0,s8e=!0;function l8e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function u8e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function gW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function c8e(e,t,n){gW(e,t,n)}function d8e(e,t){t.destroy(),t.off(ek),_d(e)}function f8e(e,t){t.destroy(),t.off(ek),_d(e)}function h8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function p8e(e,t,n){}function g8e(e,t,n,r,i){ax(e,i,r)}function m8e(e){e.hide(),_d(e)}function v8e(e){}function y8e(e,t){(t.visible==null||t.visible)&&e.show()}function b8e(e,t){}function x8e(e){}function S8e(){}const w8e=()=>J_.exports.DefaultEventPriority,C8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:WCe,createInstance:VCe,createTextInstance:UCe,finalizeInitialChildren:jCe,getPublicInstance:GCe,prepareForCommit:qCe,preparePortalMount:KCe,prepareUpdate:YCe,resetAfterCommit:ZCe,resetTextContent:XCe,shouldDeprioritizeSubtree:QCe,getRootHostContext:JCe,getChildHostContext:e8e,scheduleTimeout:t8e,cancelTimeout:n8e,noTimeout:r8e,shouldSetTextContent:i8e,isPrimaryRenderer:o8e,warnsIfNotActing:a8e,supportsMutation:s8e,appendChild:l8e,appendChildToContainer:u8e,insertBefore:gW,insertInContainerBefore:c8e,removeChild:d8e,removeChildFromContainer:f8e,commitTextUpdate:h8e,commitMount:p8e,commitUpdate:g8e,hideInstance:m8e,hideTextInstance:v8e,unhideInstance:y8e,unhideTextInstance:b8e,clearContainer:x8e,detachDeletedInstance:S8e,getCurrentEventPriority:w8e,now:Gp.exports.unstable_now,idlePriority:Gp.exports.unstable_IdlePriority,run:Gp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var _8e=Object.defineProperty,k8e=Object.defineProperties,E8e=Object.getOwnPropertyDescriptors,MI=Object.getOwnPropertySymbols,P8e=Object.prototype.hasOwnProperty,L8e=Object.prototype.propertyIsEnumerable,OI=(e,t,n)=>t in e?_8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RI=(e,t)=>{for(var n in t||(t={}))P8e.call(t,n)&&OI(e,n,t[n]);if(MI)for(var n of MI(t))L8e.call(t,n)&&OI(e,n,t[n]);return e},T8e=(e,t)=>k8e(e,E8e(t));function tk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=tk(r,t,n);if(i)return i;r=t?null:r.sibling}}function mW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const nk=mW(C.exports.createContext(null));class vW extends C.exports.Component{render(){return x(nk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:A8e,ReactCurrentDispatcher:I8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M8e(){const e=C.exports.useContext(nk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=A8e.current)!=null?r:tk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Ng=[],NI=new WeakMap;function O8e(){var e;const t=M8e();Ng.splice(0,Ng.length),tk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==nk&&Ng.push(mW(i))});for(const n of Ng){const r=(e=I8e.current)==null?void 0:e.readContext(n);NI.set(n,r)}return C.exports.useMemo(()=>Ng.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,T8e(RI({},i),{value:NI.get(r)}))),n=>x(vW,{...RI({},n)})),[])}function R8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const N8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=R8e(e),o=O8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new Qf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=em.createContainer(n.current,J_.exports.LegacyRoot,!1,null),em.updateContainer(x(o,{children:e.children}),r.current),()=>{!Qf.isBrowser||(a(null),em.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),ax(n.current,e,i),em.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Yy="Layer",Xv="Group",R3="Rect",Dg="Circle",n4="Line",yW="Image",D8e="Transformer",em=zCe(C8e);em.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const z8e=le.forwardRef((e,t)=>x(vW,{children:x(N8e,{...e,forwardedRef:t})})),B8e=Ze(jt,e=>{const{objects:t}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),F8e=e=>{const{...t}=e,{objects:n}=Ce(B8e);return x(Xv,{listening:!1,...t,children:n.filter(Vb).map((r,i)=>x(n4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},rk=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},$8e=Ze(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:rk(u==="mask"?a:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),H8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce($8e);return l?te(Xv,{listening:!1,...t,children:[x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},W8e=Ze(jt,qv,J0,sn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),V8e=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:P,boundingBoxStrokeWidth:E}=Ce(W8e),k=C.exports.useRef(null),L=C.exports.useRef(null);C.exports.useEffect(()=>{!k.current||!L.current||(k.current.nodes([L.current]),k.current.getLayer()?.batchDraw())},[]);const I=64*m,O=C.exports.useCallback(J=>{if(b==="inpainting"||!w){n(d6({x:J.target.x(),y:J.target.y()}));return}const q=J.target.x(),V=J.target.y(),G=Ly(q,64),Q=Ly(V,64);J.target.x(G),J.target.y(Q),n(d6({x:G,y:Q}))},[b,n,w]),N=C.exports.useCallback(J=>{if(!v)return r;const{x:q,y:V}=J,G=g.width-i.width*m,Q=g.height-i.height*m,X=Math.floor(Ge.clamp(q,0,G)),me=Math.floor(Ge.clamp(V,0,Q));return{x:X,y:me}},[v,r,g.width,g.height,i.width,i.height,m]),D=C.exports.useCallback(()=>{if(!L.current)return;const J=L.current,q=J.scaleX(),V=J.scaleY(),G=Math.round(J.width()*q),Q=Math.round(J.height()*V),X=Math.round(J.x()),me=Math.round(J.y());n(Kg({width:G,height:Q})),n(d6({x:X,y:me})),J.scaleX(1),J.scaleY(1)},[n]),z=C.exports.useCallback((J,q,V)=>{const G=J.x%I,Q=J.y%I,X=Ly(q.x,I)+G,me=Ly(q.y,I)+Q,xe=Math.abs(q.x-X),Se=Math.abs(q.y-me),He=xe!v||q.width+q.x>g.width||q.height+q.y>g.height||q.x<0||q.y<0?J:q,[v,g]),W=()=>{n(f6(!0))},Y=()=>{n(f6(!1)),n(Ty(!1))},de=()=>{n(TA(!0))},j=()=>{n(f6(!1)),n(TA(!1)),n(Ty(!1))},ne=()=>{n(Ty(!0))},ie=()=>{!u&&!l&&n(Ty(!1))};return te(Xv,{...t,children:[x(R3,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R3,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R3,{dragBoundFunc:b==="inpainting"?N:void 0,listening:!o&&P==="move",draggable:!0,fillEnabled:P==="move",height:i.height,onDragEnd:j,onDragMove:O,onMouseDown:de,onMouseOut:ie,onMouseOver:ne,onMouseUp:j,onTransform:D,onTransformEnd:Y,ref:L,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:E,width:i.width,x:r.x,y:r.y}),x(D8e,{anchorCornerRadius:3,anchorDragBoundFunc:z,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:H,draggable:!1,enabledAnchors:P==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&P==="move",onDragEnd:j,onMouseDown:W,onMouseUp:Y,onTransformEnd:Y,ref:k,rotateEnabled:!1})]})},U8e=Ze([jt,sn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),j8e=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(U8e),i=C.exports.useRef(null);vt("shift+w",o=>{o.preventDefault(),e(o4e())},{enabled:!0},[t]),vt("shift+h",o=>{o.preventDefault(),e(I_(!n))},{enabled:!0},[t,n]),vt(["space"],o=>{o.repeat||r!=="move"&&(i.current=r,e(Su("move")))},{keyup:!1,keydown:!0},[r,i]),vt(["space"],o=>{o.repeat||r==="move"&&i.current&&i.current!=="move"&&(e(Su(i.current)),i.current="move")},{keyup:!0,keydown:!1},[r,i])},G8e=Ze(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:rk(t)}}),DI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),q8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(G8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=DI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=DI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a?x(R3,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},K8e=.999,Y8e=.1,Z8e=20,X8e=Ze([sn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Q8e=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(X8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ge.clamp(r*K8e**l,Y8e,Z8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(L$(u)),t(I$(h))},[i,t,n,e,r])},sx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},J8e=Ze([sn,jt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),e9e=e=>{const t=$e(),{tool:n}=Ce(J8e);return C.exports.useCallback(r=>{if(!e.current)return;if(n==="move"){t(K5(!0));return}const i=sx(e.current);!i||(r.evt.preventDefault(),t(Ub(!0)),t(S$([i.x,i.y])))},[e,t,n])},t9e=Ze([sn,jt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),n9e=(e,t)=>{const n=$e(),{tool:r,isDrawing:i}=Ce(t9e);return C.exports.useCallback(()=>{if(r==="move"){n(K5(!1));return}if(!t.current&&i&&e.current){const o=sx(e.current);if(!o)return;n(w$([o.x,o.y]))}else t.current=!1;n(Ub(!1))},[t,n,i,e,r])},r9e=Ze([sn,jt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),i9e=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o}=Ce(r9e);return C.exports.useCallback(()=>{if(!e.current)return;const a=sx(e.current);!a||(r(E$(a)),n.current=a,!(!i||o==="move")&&(t.current=!0,r(w$([a.x,a.y]))))},[t,r,i,n,e,o])},o9e=Ze([sn,jt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),a9e=e=>{const t=$e(),{tool:n}=Ce(o9e);return C.exports.useCallback(r=>{if(r.evt.buttons!==1||!e.current)return;const i=sx(e.current);!i||n==="move"||(t(Ub(!0)),t(S$([i.x,i.y])))},[e,n,t])},s9e=()=>{const e=$e();return C.exports.useCallback(()=>{e(E$(null)),e(Ub(!1))},[e])},l9e=Ze([jt,sn],(e,t)=>{const{tool:n}=e;return{tool:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),u9e=()=>{const e=$e(),{tool:t,activeTabName:n}=Ce(l9e);return{handleDragStart:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K5(!0))},[n,e,t]),handleDragMove:C.exports.useCallback(r=>{t!=="move"||n!=="outpainting"||e(I$(r.target.getPosition()))},[n,e,t]),handleDragEnd:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K5(!1))},[n,e,t])}};var gf=C.exports,c9e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const d9e=e=>{const{url:t,x:n,y:r}=e,[i]=c9e(t);return x(yW,{x:n,y:r,image:i,listening:!1})},f9e=Ze([jt],e=>e.objects,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),h9e=()=>{const e=Ce(f9e);return e?x(Xv,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(y$(t))return x(d9e,{x:t.x,y:t.y,url:t.image.url},n);if(K5e(t))return x(n4,{points:t.points,stroke:t.color?rk(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},p9e=Ze([jt],e=>e.stageScale,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),g9e=()=>{const e=Ce(p9e);return t=>t/e},m9e=()=>{const{colorMode:e}=Pv(),t=g9e();if(!au.current)return null;const n=e==="light"?"rgba(0,0,0,0.3)":"rgba(255,255,255,0.3)",r=au.current,i=r.width(),o=r.height(),a=r.x(),s=r.y(),l={x1:0,y1:0,x2:i,y2:o,offset:{x:t(a),y:t(s)}},u={x:Math.ceil(t(a)/64)*64,y:Math.ceil(t(s)/64)*64},h={x1:-u.x,y1:-u.y,x2:t(i)-u.x+64,y2:t(o)-u.y+64},m={x1:Math.min(l.x1,h.x1),y1:Math.min(l.y1,h.y1),x2:Math.max(l.x2,h.x2),y2:Math.max(l.y2,h.y2)},v=m.x2-m.x1,b=m.y2-m.y1,w=Math.round(v/64)+1,P=Math.round(b/64)+1;return te(Xv,{children:[Ge.range(0,w).map(E=>x(n4,{x:m.x1+E*64,y:m.y1,points:[0,0,0,b],stroke:n,strokeWidth:1},`x_${E}`)),Ge.range(0,P).map(E=>x(n4,{x:m.x1,y:m.y1+E*64,points:[0,0,v,0],stroke:n,strokeWidth:1},`y_${E}`))]})},v9e=Ze([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),y9e=e=>{const{...t}=e,n=Ce(v9e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(yW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},zg=e=>Math.round(e*100)/100,b9e=Ze([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),x9e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(b9e);return te("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${zg(n)}, ${zg(r)}`}),x("div",{children:`Scale: ${zg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${zg(a)}, ${zg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})},S9e=Ze([jt,qv,J0,sn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"?s?w=void 0:l?w="move":r==="outpainting"&&(v?w="grabbing":w="grab"):w="none",{activeTabName:r,isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});let au,fl;const bW=()=>{const{activeTabName:e,isMaskEnabled:t,isModifyingBoundingBox:n,shouldShowBoundingBox:r,shouldShowGrid:i,stageCoordinates:o,stageCursor:a,stageDimensions:s,stageScale:l,tool:u}=Ce(S9e);j8e(),au=C.exports.useRef(null),fl=C.exports.useRef(null);const h=C.exports.useRef({x:0,y:0}),g=C.exports.useRef(!1),m=Q8e(au),v=e9e(au),b=n9e(au,g),w=i9e(au,g,h),P=a9e(au),E=s9e(),{handleDragStart:k,handleDragMove:L,handleDragEnd:I}=u9e();return x("div",{className:"inpainting-canvas-container",children:te("div",{className:"inpainting-canvas-wrapper",children:[te(z8e,{ref:au,style:{...a?{cursor:a}:{}},className:"inpainting-canvas-stage checkerboard",x:o.x,y:o.y,width:s.width,height:s.height,scale:{x:l,y:l},onMouseDown:v,onMouseEnter:P,onMouseLeave:E,onMouseMove:w,onMouseOut:E,onMouseUp:b,onDragStart:k,onDragMove:L,onDragEnd:I,onWheel:m,listening:u==="move"&&!n,draggable:u==="move"&&!n&&e==="outpainting",children:[x(Yy,{id:"grid",visible:i,children:x(m9e,{})}),te(Yy,{id:"image",ref:fl,listening:!1,imageSmoothingEnabled:!1,children:[x(h9e,{}),x(y9e,{})]}),te(Yy,{id:"mask",visible:t,listening:!1,children:[x(F8e,{visible:!0,listening:!1}),x(q8e,{listening:!1})]}),te(Yy,{id:"tool",children:[x(V8e,{visible:r}),x(H8e,{visible:u!=="move",listening:!1})]})]}),x(x9e,{})]})})},w9e=Ze([qv,e=>e.options,sn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),C9e=()=>{const e=$e(),{activeTabName:t}=Ce(w9e);return te("div",{className:"inpainting-settings",children:[te(Eo,{isAttached:!0,children:[x(u6e,{}),x(d6e,{}),t==="outpainting"&&x(k6e,{})]}),te(Eo,{isAttached:!0,children:[x(v6e,{}),x(b6e,{}),x(S6e,{}),x(C6e,{}),x(g6e,{})]}),x(gt,{"aria-label":"Save",tooltip:"Save",icon:x(m$,{}),onClick:()=>{e(M_(fl))},fontSize:20}),te(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(Z$,{})})]})},_9e=Ze(e=>e.canvas,J0,sn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),xW=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(_9e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const{width:o,height:a}=r.image,{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(L$(u)),n==="inpainting"?e(PA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(PA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Bv,{thickness:"2px",speed:"1s",size:"xl"})})},k9e=Ze([J0,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),E9e=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(k9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),te("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?te("div",{className:"inpainting-main-area",children:[x(C9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(xW,{}):x(bW,{})})]}):x(N_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(B_,{})})]})};function P9e(){const e=$e();return C.exports.useEffect(()=>{e(M$("inpainting")),e(Cr(!0))},[e]),x(ex,{optionsPanel:x(qSe,{}),styleClass:"inpainting-workarea-overrides",children:x(E9e,{})})}function L9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})},other:{header:x(r$,{}),feature:Xr.OTHER,options:x(i$,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x($b,{}),e?x(Wb,{accordionInfo:t}):null]})}const T9e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(B_,{})})});function A9e(){return x(ex,{optionsPanel:x(L9e,{}),children:x(T9e,{})})}var SW={exports:{}},r4={};const wW=Vq(hZ);var ui=wW.jsx,Zy=wW.jsxs;Object.defineProperty(r4,"__esModule",{value:!0});var Ec=C.exports;function CW(e,t){return(CW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var T6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,CW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);T6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},r4.PanViewer=T6,r4.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],P=Ec.useState(!1),E=P[0],k=P[1];return Ec.createElement("div",null,Zy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!E)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(T6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(E?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=r4})(SW);function I9e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},P=()=>{l>=.5&&u(l-.2)},E=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,N)=>{o(O),s(N)};return te("div",{children:[te("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(E3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(gt,{icon:x(P3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:P,fontSize:20}),x(gt,{icon:x(_3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:E,fontSize:20}),x(gt,{icon:x(k3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(gt,{icon:x(u5e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(gt,{icon:x(k_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(SW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function M9e(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(z_())},g=()=>{e(D_())};return vt("Esc",()=>{t&&e(kl(!1))},[t]),te("div",{className:"lightbox-container",children:[x(gt,{icon:x(C3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(kl(!1))},fontSize:20}),te("div",{className:"lightbox-display-container",children:[te("div",{className:"lightbox-preview-wrapper",children:[x(U$,{}),!r&&te("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(c$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&x(I9e,{image:n.url,styleClass:"lightbox-image"})]}),x(LH,{})]})]})}function O9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x(E_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(TH,{}),x($b,{}),e&&x(Wb,{accordionInfo:t})]})}const R9e=Ze([jt,qv],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),N9e=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(R9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(A_,{})}),children:te(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(d4e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(l4e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(u4e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(T$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(c4e(a.target.checked))})]})})},D9e=Ze([jt],e=>{const{eraserSize:t,tool:n}=e;return{tool:n,eraserSize:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),z9e=()=>{const e=$e(),{tool:t,eraserSize:n}=Ce(D9e),r=()=>e(Su("eraser"));return vt("e",i=>{i.preventDefault(),r()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(p$,{}),"data-selected":t==="eraser",onClick:()=>e(Su("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(ch,{label:"Size",value:n,withInput:!0,onChange:i=>e(J5e(i))})})})},B9e=Ze([jt,qv,sn],(e,t,n)=>{const{layer:r,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,tool:l,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}=e,{shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v}=t;return{layer:r,tool:l,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,activeTabName:n,shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),F9e=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r}=Ce(B9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(g$,{}),"data-selected":t==="brush",onClick:()=>e(Su("brush"))}),children:te(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(ch,{label:"Size",value:r,withInput:!0,onChange:i=>e(x$(i))})}),x(q_,{style:{width:"100%"},color:n,onChange:i=>e(Q5e(i))})]})})},$9e=Ze([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r}=e;return{layer:n,maskColor:t,isMaskEnabled:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),H9e=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r}=Ce($9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(X5e(t==="mask"?"base":"mask")),icon:x(T5e,{})}),children:te(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(k$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:i=>e(C$(i.target.checked))}),x(Aa,{label:"Invert Mask"}),x(q_,{color:n,onChange:i=>e(_$(i))})]})})},W9e=Ze([jt],e=>{const{tool:t}=e;return{tool:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),V9e=()=>{const e=$e(),{tool:t}=Ce(W9e);return te("div",{className:"inpainting-settings",children:[x(H9e,{}),te(Eo,{isAttached:!0,children:[x(F9e,{}),x(z9e,{}),x(gt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(b5e,{}),"data-selected":t==="move",onClick:()=>e(Su("move"))})]}),te(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(P5e,{}),onClick:()=>{e(M_(fl))}}),x(gt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(m$,{})}),x(gt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(L_,{})}),x(gt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(h$,{})})]}),te(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(N9e,{})}),te(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(T_,{})}),x(gt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(v$,{}),onClick:()=>e(s4e())})]})]})},U9e=Ze([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{objects:n}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),j9e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(U9e);return C.exports.useLayoutEffect(()=>{const i=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:n?te("div",{className:"inpainting-main-area",children:[x(V9e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(xW,{}):x(bW,{})})]}):x(N_,{})})})};function G9e(){const e=$e();return C.exports.useEffect(()=>{e(M$("outpainting")),e(Cr(!0))},[e]),x(ex,{optionsPanel:x(O9e,{}),styleClass:"inpainting-workarea-overrides",children:x(j9e,{})})}const kf={txt2img:{title:x(c3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(A9e,{}),tooltip:"Text To Image"},img2img:{title:x(o3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(RSe,{}),tooltip:"Image To Image"},inpainting:{title:x(a3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P9e,{}),tooltip:"Inpainting"},outpainting:{title:x(l3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(G9e,{}),tooltip:"Outpainting"},nodes:{title:x(s3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r3e,{}),tooltip:"Nodes"},postprocess:{title:x(u3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(i3e,{}),tooltip:"Post Processing"}},lx=Ge.map(kf,(e,t)=>t);[...lx];function q9e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(Co(0))}),vt("2",()=>{i(Co(1))}),vt("3",()=>{i(Co(2))}),vt("4",()=>{i(Co(3))}),vt("5",()=>{i(Co(4))}),vt("6",()=>{i(Co(5))}),vt("v",()=>{i(kl(!t))},[t]),vt("f",()=>{n||r?(i(b0(!1)),i(m0(!1))):(i(b0(!0)),i(m0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(kf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:kf[l].tooltip,placement:"right",children:x(sF,{children:kf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(kf).forEach(l=>{s.push(x(oF,{className:"app-tabs-panel",children:kf[l].workarea},l))}),s};return te(iF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(Co(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(aF,{className:"app-tabs-panels",children:t?x(M9e,{}):a()})]})}const _W={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},K9e=_W,kW=mb({name:"options",initialState:K9e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=A3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=G5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=A3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:P,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=G5(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=A3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,..._W}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=lx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:ux,setIterations:Y9e,setSteps:EW,setCfgScale:PW,setThreshold:Z9e,setPerlin:X9e,setHeight:LW,setWidth:TW,setSampler:AW,setSeed:Qv,setSeamless:IW,setHiresFix:MW,setImg2imgStrength:f8,setFacetoolStrength:N3,setFacetoolType:D3,setCodeformerFidelity:OW,setUpscalingLevel:h8,setUpscalingStrength:p8,setMaskPath:g8,resetSeed:oEe,resetOptionsState:aEe,setShouldFitToWidthHeight:RW,setParameter:sEe,setShouldGenerateVariations:Q9e,setSeedWeights:NW,setVariationAmount:J9e,setAllParameters:e7e,setShouldRunFacetool:t7e,setShouldRunESRGAN:n7e,setShouldRandomizeSeed:r7e,setShowAdvancedOptions:i7e,setActiveTab:Co,setShouldShowImageDetails:DW,setAllTextToImageParameters:o7e,setAllImageToImageParameters:a7e,setShowDualDisplay:s7e,setInitialImage:xv,clearInitialImage:zW,setShouldShowOptionsPanel:b0,setShouldPinOptionsPanel:l7e,setOptionsPanelScrollPosition:u7e,setShouldHoldOptionsPanelOpen:c7e,setShouldLoopback:d7e,setCurrentTheme:f7e,setIsLightBoxOpen:kl}=kW.actions,h7e=kW.reducer,Al=Object.create(null);Al.open="0";Al.close="1";Al.ping="2";Al.pong="3";Al.message="4";Al.upgrade="5";Al.noop="6";const z3=Object.create(null);Object.keys(Al).forEach(e=>{z3[Al[e]]=e});const p7e={type:"error",data:"parser error"},g7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",m7e=typeof ArrayBuffer=="function",v7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,BW=({type:e,data:t},n,r)=>g7e&&t instanceof Blob?n?r(t):zI(t,r):m7e&&(t instanceof ArrayBuffer||v7e(t))?n?r(t):zI(new Blob([t]),r):r(Al[e]+(t||"")),zI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},BI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},b7e=typeof ArrayBuffer=="function",FW=(e,t)=>{if(typeof e!="string")return{type:"message",data:$W(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:x7e(e.substring(1),t)}:z3[n]?e.length>1?{type:z3[n],data:e.substring(1)}:{type:z3[n]}:p7e},x7e=(e,t)=>{if(b7e){const n=y7e(e);return $W(n,t)}else return{base64:!0,data:e}},$W=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},HW=String.fromCharCode(30),S7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{BW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(HW))})})},w7e=(e,t)=>{const n=e.split(HW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function VW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const _7e=setTimeout,k7e=clearTimeout;function cx(e,t){t.useNativeTimers?(e.setTimeoutFn=_7e.bind(Uc),e.clearTimeoutFn=k7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const E7e=1.33;function P7e(e){return typeof e=="string"?L7e(e):Math.ceil((e.byteLength||e.size)*E7e)}function L7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class T7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class UW extends Vr{constructor(t){super(),this.writable=!1,cx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new T7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=FW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const jW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),m8=64,A7e={};let FI=0,Xy=0,$I;function HI(e){let t="";do t=jW[e%m8]+t,e=Math.floor(e/m8);while(e>0);return t}function GW(){const e=HI(+new Date);return e!==$I?(FI=0,$I=e):e+"."+HI(FI++)}for(;Xy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};w7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,S7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=GW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=qW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new El(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class El extends Vr{constructor(t,n){super(),cx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=VW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new YW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=El.requestsCount++,El.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=O7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete El.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}El.requestsCount=0;El.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",WI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,WI,!1)}}function WI(){for(let e in El.requests)El.requests.hasOwnProperty(e)&&El.requests[e].abort()}const ZW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qy=Uc.WebSocket||Uc.MozWebSocket,VI=!0,D7e="arraybuffer",UI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class z7e extends UW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=UI?{}:VW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=VI&&!UI?n?new Qy(t,n):new Qy(t):new Qy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||D7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{VI&&this.ws.send(o)}catch{}i&&ZW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=GW()),this.supportsBinary||(t.b64=1);const i=qW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Qy}}const B7e={websocket:z7e,polling:N7e},F7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function v8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=F7e.exec(e||""),o={},a=14;for(;a--;)o[$7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=H7e(o,o.path),o.queryKey=W7e(o,o.query),o}function H7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function W7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=v8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=v8(n.host).host),cx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=I7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=WW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new B7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,XW=Object.prototype.toString,G7e=typeof Blob=="function"||typeof Blob<"u"&&XW.call(Blob)==="[object BlobConstructor]",q7e=typeof File=="function"||typeof File<"u"&&XW.call(File)==="[object FileConstructor]";function ik(e){return U7e&&(e instanceof ArrayBuffer||j7e(e))||G7e&&e instanceof Blob||q7e&&e instanceof File}function B3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Q7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Y7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const J7e=Object.freeze(Object.defineProperty({__proto__:null,protocol:Z7e,get PacketType(){return nn},Encoder:X7e,Decoder:ok},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const e_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class QW extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(e_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}i1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};i1.prototype.reset=function(){this.attempts=0};i1.prototype.setMin=function(e){this.ms=e};i1.prototype.setMax=function(e){this.max=e};i1.prototype.setJitter=function(e){this.jitter=e};class x8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,cx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new i1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||J7e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ZW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new QW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bg={};function F3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=V7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Bg[i]&&o in Bg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new x8(r,t):(Bg[i]||(Bg[i]=new x8(r,t)),l=Bg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F3,{Manager:x8,Socket:QW,io:F3,connect:F3});var t_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,n_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,r_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(jI[t]||t||jI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return i_e(e)},P=function(){return o_e(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return GI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return GI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":a_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(t_e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var jI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},GI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},i_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},o_e=function(t){var n=t.getDay();return n===0&&(n=7),n},a_e=function(t){return(String(t).match(n_e)||[""]).pop().replace(r_e,"").replace(/GMT\+0000/g,"UTC")};const s_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(wA(!0)),t(l6("Connected")),t(v4e());const r=n().gallery;r.categories.user.latest_mtime?t(AA("user")):t(HC("user")),r.categories.result.latest_mtime?t(AA("result")):t(HC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(wA(!1)),t(l6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Lp(),...r,category:"result"};if(t(Ay({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(a4e({image:a,boundingBox:s}))}if(i)switch(lx[o]){case"img2img":{t(xv(a));break}case"inpainting":{t(q5(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(R4e({uuid:Lp(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Ay({category:"result",image:{uuid:Lp(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(g0(!0)),t(Q3e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(FC()),t(RA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Lp(),...l}));t(O4e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(t5e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Ay({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(RA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(G$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(zW()),a===i&&t(g8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Lp(),...o};try{switch(t(Ay({image:a,category:"user"})),i){case"img2img":{t(xv(a));break}case"inpainting":{t(q5(a));break}default:{t(q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(g8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(J3e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(CA(o)),t(l6("Model Changed")),t(g0(!1)),t(_A(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(CA(o)),t(g0(!1)),t(_A(!0)),t(FC()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},l_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Rg.Stage({container:i,width:n,height:r}),a=new Rg.Layer,s=new Rg.Layer;a.add(new Rg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Rg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},u_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},c_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:P,hiresFix:E,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:N,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:H,upscalingStrength:W,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:ne,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:J,saveIntermediatesInterval:q,enableImageDebugging:V}=i,G={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:J==="full-res",progress_latents:J==="latents",save_intermediates:q,generation_mode:t,init_mask:""};if(G.seed=ie?o$(C_,__):w,["txt2img","img2img"].includes(t)&&(G.seamless=P,G.hires_fix=E),t==="img2img"&&L&&(G.init_img=typeof L=="string"?L:L.url,G.strength=k,G.fit=I),["inpainting","outpainting"].includes(t)&&fl.current){const{objects:me,boundingBoxCoordinates:xe,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:Ue,stageScale:ut,isMaskEnabled:Xe}=r[r.currentCanvas],et={...xe,...Se},tt=l_e(Xe?me.filter(Vb):[],et);if(G.init_mask=tt,G.fit=!1,G.init_img=o,G.strength=k,Ue&&(G.inpaint_replace=He),G.bounding_box=et,t==="outpainting"){const at=fl.current.scale();fl.current.scale({x:1/ut,y:1/ut});const At=fl.current.getAbsolutePosition(),wt=fl.current.toDataURL({x:et.x+At.x,y:et.y+At.y,width:et.width,height:et.height});V&&u_e([{base64:tt,caption:"mask sent as init_mask"},{base64:wt,caption:"image sent as init_img"}]),fl.current.scale(at),G.init_img=wt,G.progress_images=!1,G.seam_size=96,G.seam_blur=16,G.seam_strength=.7,G.seam_steps=10,G.tile_size=32,G.force_outpaint=!1}}O?(G.variation_amount=N,D&&(G.with_variations=w2e(D))):G.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:H,strength:W}),Y&&(X={type:ne,strength:de},ne==="codeformer"&&(X.codeformer_fidelity=j)),V&&(G.enable_image_debugging=V),{generationParameters:G,esrganParameters:Q,facetoolParameters:X}},d_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(g0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=J0(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(FC());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=c_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(g0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(g0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(G$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(n5e()),t.emit("requestModelChange",i)}}},f_e=()=>{const{origin:e}=new URL(window.location.href),t=F3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:P,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=s_e(i),{emitGenerateImage:N,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:H,emitRequestImages:W,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:ne,emitRequestSystemConfig:ie,emitRequestModelChange:J}=d_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",q=>u(q)),t.on("generationResult",q=>g(q)),t.on("postprocessingResult",q=>h(q)),t.on("intermediateResult",q=>m(q)),t.on("progressUpdate",q=>v(q)),t.on("galleryImages",q=>b(q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",q=>{P(q)}),t.on("imageUploaded",q=>{E(q)}),t.on("maskImageUploaded",q=>{k(q)}),t.on("systemConfig",q=>{L(q)}),t.on("modelChanged",q=>{I(q)}),t.on("modelChangeFailed",q=>{O(q)}),n=!0),a.type){case"socketio/generateImage":{N(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{H(a.payload);break}case"socketio/requestImages":{W(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{ne(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{J(a.payload);break}}o(a)}},JW=["pastObjects","futureObjects","stageScale","stageDimensions","stageCoordinates","cursorPosition"],h_e=JW.map(e=>`canvas.inpainting.${e}`),p_e=JW.map(e=>`canvas.outpainting.${e}`),g_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),m_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),eV=vF({options:h7e,gallery:$4e,system:o5e,canvas:f4e}),v_e=zF.getPersistConfig({key:"root",storage:DF,rootReducer:eV,blacklist:[...h_e,...p_e,...g_e,...m_e],throttle:500}),y_e=o2e(v_e,eV),tV=Qme({reducer:y_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(f_e())}),$e=Uve,Ce=Ove;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function b_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Bv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),__e=Ze(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(__e),i=t?Math.round(t*100/n):0;return x($B,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function E_e(e){const{title:t,hotkey:n,description:r}=e;return te("div",{className:"hotkey-modal-item",children:[te("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function P_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=O5(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(E_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return te(Xn,{children:[C.exports.cloneElement(e,{onClick:n}),te(N0,{isOpen:t,onClose:r,children:[x(gv,{}),te(pv,{className:" modal hotkeys-modal",children:[x(V7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:te(nb,{allowMultiple:!0,children:[te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const L_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(y4e(i))};return te("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(mz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},T_e=Ze(e=>e.system,e=>{const t=Ge.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),A_e=()=>{const{models:e}=Ce(T_e);return x(nb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:te(Nc,{children:[x(Oc,{children:te("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(L_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},I_e=Ze(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ge.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),M_e=({children:e})=>{const t=$e(),n=Ce(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=O5(),{isOpen:a,onOpen:s,onClose:l}=O5(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(I_e),b=()=>{pV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(r5e(P))};return te(Xn,{children:[C.exports.cloneElement(e,{onClick:i}),te(N0,{isOpen:r,onClose:o,children:[x(gv,{}),te(pv,{className:"modal settings-modal",children:[x(j7,{className:"settings-modal-header",children:"Settings"}),x(V7,{className:"modal-close-btn"}),te(z5,{className:"settings-modal-content",children:[te("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(A_e,{})}),te("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(uh,{label:"Display In-Progress Images",validValues:v3e,value:u,onChange:P=>t(Z3e(P.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(s$(P.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:P=>t(e5e(P.target.checked))})]}),te("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(i5e(P.target.checked))})]}),te("div",{className:"settings-modal-reset",children:[x($f,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(ko,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(ko,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(U7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),te(N0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(gv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(pv,{children:x(z5,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(ko,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},O_e=Ze(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),R_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(O_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(ko,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(l$())},className:`status ${l}`,children:u})})},N_e=["dark","light","green"];function D_e(){const{setColorMode:e}=Pv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(uh,{validValues:N_e,value:n,onChange:i=>{e(i.target.value),t(f7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const z_e=()=>te("div",{className:"site-header",children:[te("div",{className:"site-header-left-side",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),te("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),te("div",{className:"site-header-right-side",children:[x(R_e,{}),x(P_e,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(E5e,{})})}),x(D_e,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Hf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(S5e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Hf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(v5e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Hf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(m5e,{})})}),x(M_e,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(A_,{})})})]})]}),B_e=Ze(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),F_e=Ze(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),$_e=()=>{const e=$e(),t=Ce(B_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(F_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(l$()),e(s6(!n))};return vt("`",()=>{e(s6(!n))},[n]),vt("esc",()=>{e(s6(!1))}),te(Xn,{children:[n&&x(X$,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return te("div",{className:`console-entry console-${b}-color`,children:[te("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(y5e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(A5e,{}):x(f$,{}),onClick:l})})]})};function H_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var W_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jv(e,t){var n=V_e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function V_e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=W_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var U_e=[".DS_Store","Thumbs.db"];function j_e(e){return G0(this,void 0,void 0,function(){return q0(this,function(t){return i4(e)&&G_e(e.dataTransfer)?[2,Z_e(e.dataTransfer,e.type)]:q_e(e)?[2,K_e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Y_e(e)]:[2,[]]})})}function G_e(e){return i4(e)}function q_e(e){return i4(e)&&i4(e.target)}function i4(e){return typeof e=="object"&&e!==null}function K_e(e){return C8(e.target.files).map(function(t){return Jv(t)})}function Y_e(e){return G0(this,void 0,void 0,function(){var t;return q0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Jv(r)})]}})})}function Z_e(e,t){return G0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=C8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(X_e))]):[3,2];case 1:return r=i.sent(),[2,KI(rV(r))];case 2:return[2,KI(C8(e.files).map(function(o){return Jv(o)}))]}})})}function KI(e){return e.filter(function(t){return U_e.indexOf(t.name)===-1})}function C8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,JI(n)];if(e.sizen)return[!1,JI(n)]}return[!0,null]}function Ef(e){return e!=null}function hke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=sV(l,n),h=Sv(u,1),g=h[0],m=lV(l,r,i),v=Sv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function o4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jy(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function tM(e){e.preventDefault()}function pke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gke(e){return e.indexOf("Edge/")!==-1}function mke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pke(e)||gke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Oke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ak=C.exports.forwardRef(function(e,t){var n=e.children,r=a4(e,wke),i=hV(r),o=i.open,a=a4(i,Cke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});ak.displayName="Dropzone";var fV={disabled:!1,getFilesFromEvent:j_e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ak.defaultProps=fV;ak.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var P8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function hV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},fV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,N=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,H=t.validator,W=C.exports.useMemo(function(){return bke(n)},[n]),Y=C.exports.useMemo(function(){return yke(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:rM},[P]),j=C.exports.useMemo(function(){return typeof w=="function"?w:rM},[w]),ne=C.exports.useRef(null),ie=C.exports.useRef(null),J=C.exports.useReducer(Rke,P8),q=A6(J,2),V=q[0],G=q[1],Q=V.isFocused,X=V.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&vke()),xe=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(G({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(Je){ne.current&&ne.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",tM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",tM),document.removeEventListener("drop",He))}},[ne,L]),C.exports.useEffect(function(){return!r&&k&&ne.current&&ne.current.focus(),function(){}},[ne,k,r]);var Ue=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ut=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(Eke(Se.current),[Me.target]),Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){if(!(o4(Me)&&!D)){var Xt=Je.length,qt=Xt>0&&hke({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:H}),Ee=Xt>0&&!qt;G({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(Je){return Ue(Je)})},[i,u,Ue,D,W,a,o,s,l,H]),Xe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Jy(Me);if(Je&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return Je&&g&&g(Me),!1},[g,D]),et=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Se.current.filter(function(qt){return ne.current&&ne.current.contains(qt)}),Xt=Je.indexOf(Me.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Jy(Me)&&h&&h(Me))},[ne,h,D]),tt=C.exports.useCallback(function(Me,Je){var Xt=[],qt=[];Me.forEach(function(Ee){var It=sV(Ee,W),Ne=A6(It,2),st=Ne[0],ln=Ne[1],Dn=lV(Ee,a,o),Fe=A6(Dn,2),pt=Fe[0],rt=Fe[1],Nt=H?H(Ee):null;if(st&&pt&&!Nt)Xt.push(Ee);else{var Qt=[ln,rt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[fke]})}),Xt.splice(0)),G({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,Je),qt.length>0&&b&&b(qt,Je),Xt.length>0&&v&&v(Xt,Je)},[G,s,W,a,o,l,m,v,b,H]),at=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){o4(Me)&&!D||tt(Je,Me)}).catch(function(Je){return Ue(Je)}),G({type:"reset"})},[i,tt,Ue,D]),At=C.exports.useCallback(function(){if(me.current){G({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(Je){return i(Je)}).then(function(Je){tt(Je,null),G({type:"closeDialog"})}).catch(function(Je){xke(Je)?(j(Je),G({type:"closeDialog"})):Ske(Je)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):Ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Ue(Je)});return}ie.current&&(G({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[G,de,j,E,tt,Ue,Y,s]),wt=C.exports.useCallback(function(Me){!ne.current||!ne.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),At())},[ne,At]),Ae=C.exports.useCallback(function(){G({type:"focus"})},[]),dt=C.exports.useCallback(function(){G({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(mke()?setTimeout(At,0):At())},[I,At]),ct=function(Je){return r?null:Je},xt=function(Je){return O?null:ct(Je)},kn=function(Je){return N?null:ct(Je)},Et=function(Je){D&&Je.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Me.refKey,Xt=Je===void 0?"ref":Je,qt=Me.role,Ee=Me.onKeyDown,It=Me.onFocus,Ne=Me.onBlur,st=Me.onClick,ln=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,pt=Me.onDrop,rt=a4(Me,_ke);return ur(ur(E8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(It,Ae)),onBlur:xt(ol(Ne,dt)),onClick:ct(ol(st,Mt)),onDragEnter:kn(ol(ln,ut)),onDragOver:kn(ol(Dn,Xe)),onDragLeave:kn(ol(Fe,et)),onDrop:kn(ol(pt,at)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,ne),!r&&!O?{tabIndex:0}:{}),rt)}},[ne,wt,Ae,dt,Mt,ut,Xe,et,at,O,N,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Me.refKey,Xt=Je===void 0?"ref":Je,qt=Me.onChange,Ee=Me.onClick,It=a4(Me,kke),Ne=E8({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:ct(ol(qt,at)),onClick:ct(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),It)}},[ie,n,s,at,r]);return ur(ur({},V),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:ne,inputRef:ie,open:ct(At)})}function Rke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},P8),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},P8);default:return e}}function rM(){}const Nke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),te("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:te($f,{size:"lg",children:["Upload Image",r]})}),n&&te("div",{className:"dropzone-overlay is-drag-reject",children:[x($f,{size:"lg",children:"Invalid Upload"}),x($f,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},Dke=e=>{const{children:t}=e,n=$e(),r=Ce(sn),i=lh({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(E=>{a(!0);const k=E.errors.reduce((L,I)=>L+` +`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(E=>{a(!0);const k={file:E};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(IA(k))},[n,r]),u=C.exports.useCallback((E,k)=>{k.forEach(L=>{s(L)}),E.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=hV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const E=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const N={file:O};["img2img","inpainting"].includes(r)&&(N.destination=r),n(IA(N))};return document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E)}},[n,i,r]);const P=["img2img","inpainting"].includes(r)?` to ${kf[r].tooltip}`:"";return x(R_.Provider,{value:w,children:te("div",{...h({style:{}}),onKeyDown:E=>{E.key},children:[x("input",{...g()}),t,b&&o&&x(Nke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},zke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(m0(!0)),t&&e(Cr(!0))},children:x(u$,{})})};function Bke(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Fke=Ze(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$ke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Fke);return te("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(b0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Bke,{})}),t&&te(Xn,{children:[x(R$,{iconButton:!0}),x(D$,{}),x(N$,{})]})]})};H_e();const Hke=Ze([e=>e.gallery,e=>e.options,e=>e.system,sn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ge.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Wke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Hke);return x("div",{className:"App",children:te(Dke,{children:[x(k_e,{}),te("div",{className:"app-content",children:[x(z_e,{}),x(q9e,{})]}),x("div",{className:"app-console",children:x($_e,{})}),e&&x(zke,{}),t&&x($ke,{})]})})};const pV=d2e(tV),Vke=AR({key:"invokeai-style-cache",prepend:!0});M6.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(Hve,{store:tV,children:x(nV,{loading:x(C_e,{}),persistor:pV,children:x(_Q,{value:Vke,children:x(mme,{children:x(Wke,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 46fec19dde..c4396e1ad0 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,6 +7,7 @@ InvokeAI - A Stable Diffusion Toolkit <<<<<<< refs/remotes/upstream/development +<<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development @@ -15,6 +16,9 @@ ======= >>>>>>> Builds fresh bundle +======= + +>>>>>>> Fixes inpainting + code cleanup >>>>>>> Builds fresh bundle diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index 29e71a466f..0e781ed972 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -1,9 +1,6 @@ -import { useEffect } from 'react'; import ProgressBar from 'features/system/ProgressBar'; import SiteHeader from 'features/system/SiteHeader'; import Console from 'features/system/Console'; -import { useAppDispatch } from './store'; -import { requestSystemConfig } from './socketio/actions'; import { keepGUIAlive } from './utils'; import InvokeTabs from 'features/tabs/InvokeTabs'; import ImageUploader from 'common/components/ImageUploader'; @@ -80,8 +77,6 @@ const appSelector = createSelector( ); const App = () => { - const dispatch = useAppDispatch(); - const { shouldShowGalleryButton, shouldShowOptionsPanelButton } = useAppSelector(appSelector); diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 803b81ca03..e48b41ff9c 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -17,7 +17,6 @@ import { modelChangeRequested, setIsProcessing, } from 'features/system/systemSlice'; -import { inpaintingImageElementRef } from 'features/canvas/IAICanvas'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; import * as InvokeAI from 'app/invokeai'; import { RootState } from 'app/store'; @@ -57,9 +56,9 @@ const makeSocketIOEmitters = ( if (['inpainting', 'outpainting'].includes(generationMode)) { const baseCanvasImage = baseCanvasImageSelector(getState()); - const imageUrl = baseCanvasImage?.url; + const imageUrl = baseCanvasImage?.image.url; - if (!inpaintingImageElementRef.current || !imageUrl) { + if (!imageUrl) { dispatch( addLogEntry({ timestamp: dateFormat(new Date(), 'isoDateTime'), @@ -72,9 +71,6 @@ const makeSocketIOEmitters = ( } frontendToBackendParametersConfig.imageToProcessUrl = imageUrl; - - // frontendToBackendParametersConfig.maskImageElement = - // inpaintingImageElementRef.current; } else if (!['txt2img', 'img2img'].includes(generationMode)) { if (!galleryState.currentImage?.url) return; diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 84dab263c2..fc1472ec5b 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -32,12 +32,14 @@ import { setInitialImage, setMaskPath, } from 'features/options/optionsSlice'; -import { requestImages, requestNewImages, requestSystemConfig } from './actions'; +import { + requestImages, + requestNewImages, + requestSystemConfig, +} from './actions'; import { addImageToOutpaintingSesion, - clearImageToInpaint, setImageToInpaint, - setImageToOutpaint, } from 'features/canvas/canvasSlice'; import { tabMap } from 'features/tabs/InvokeTabs'; @@ -312,16 +314,11 @@ const makeSocketIOListeners = ( // remove references to image in options const { initialImage, maskPath } = getState().options; - const { inpainting, outpainting } = getState().canvas; if (initialImage?.url === url || initialImage === url) { dispatch(clearInitialImage()); } - // if (imageToInpaint?.url === url) { - // dispatch(clearImageToInpaint()); - // } - if (maskPath === url) { dispatch(setMaskPath('')); } diff --git a/frontend/src/common/components/ImageUploadOverlay.tsx b/frontend/src/common/components/ImageUploadOverlay.tsx index 46f317d532..85da3253e1 100644 --- a/frontend/src/common/components/ImageUploadOverlay.tsx +++ b/frontend/src/common/components/ImageUploadOverlay.tsx @@ -1,5 +1,4 @@ import { Heading } from '@chakra-ui/react'; -import { KeyboardEvent } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; type ImageUploadOverlayProps = { diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 23ebd40925..25f8cc5767 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -1,15 +1,13 @@ // lib -import { MutableRefObject, useEffect, useRef, useState } from 'react'; +import { MutableRefObject, useRef } from 'react'; import Konva from 'konva'; import { Layer, Stage } from 'react-konva'; -import { Image as KonvaImage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; // app -import { useAppDispatch, useAppSelector } from 'app/store'; +import { useAppSelector } from 'app/store'; import { baseCanvasImageSelector, - clearImageToInpaint, currentCanvasSelector, outpaintingCanvasSelector, } from 'features/canvas/canvasSlice'; @@ -18,8 +16,7 @@ import { import IAICanvasMaskLines from './IAICanvasMaskLines'; import IAICanvasBrushPreview from './IAICanvasBrushPreview'; import { Vector2d } from 'konva/lib/types'; -import IAICanvasBoundingBoxPreview from './IAICanvasBoundingBoxPreview'; -import { useToast } from '@chakra-ui/react'; +import IAICanvasBoundingBox from './IAICanvasBoundingBox'; import useCanvasHotkeys from './hooks/useCanvasHotkeys'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; @@ -32,7 +29,7 @@ import useCanvasMouseMove from './hooks/useCanvasMouseMove'; import useCanvasMouseEnter from './hooks/useCanvasMouseEnter'; import useCanvasMouseOut from './hooks/useCanvasMouseOut'; import useCanvasDragMove from './hooks/useCanvasDragMove'; -import IAICanvasOutpaintingObjects from './IAICanvasOutpaintingObjects'; +import IAICanvasObjectRenderer from './IAICanvasObjectRenderer'; import IAICanvasGrid from './IAICanvasGrid'; import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; import IAICanvasStatusText from './IAICanvasStatusText'; @@ -46,18 +43,14 @@ const canvasSelector = createSelector( ], (currentCanvas, outpaintingCanvas, baseCanvasImage, activeTabName) => { const { - shouldInvertMask, isMaskEnabled, - shouldShowCheckboardTransparency, stageScale, shouldShowBoundingBox, - shouldLockBoundingBox, isTransformingBoundingBox, isMouseOverBoundingBox, isMovingBoundingBox, stageDimensions, stageCoordinates, - isMoveStageKeyHeld, tool, isMovingStage, } = currentCanvas; @@ -71,7 +64,7 @@ const canvasSelector = createSelector( stageCursor = undefined; } else if (isMouseOverBoundingBox) { stageCursor = 'move'; - } else { + } else if (activeTabName === 'outpainting') { if (isMovingStage) { stageCursor = 'grabbing'; } else { @@ -83,22 +76,15 @@ const canvasSelector = createSelector( } return { - shouldInvertMask, - isMaskEnabled, - shouldShowCheckboardTransparency, - stageScale, - shouldShowBoundingBox, - shouldLockBoundingBox, - shouldShowGrid, - isTransformingBoundingBox, - isModifyingBoundingBox: isTransformingBoundingBox || isMovingBoundingBox, - stageCursor, - isMouseOverBoundingBox, - stageDimensions, - stageCoordinates, - isMoveStageKeyHeld, activeTabName, - baseCanvasImage, + isMaskEnabled, + isModifyingBoundingBox: isTransformingBoundingBox || isMovingBoundingBox, + shouldShowBoundingBox, + shouldShowGrid, + stageCoordinates, + stageCursor, + stageDimensions, + stageScale, tool, }; }, @@ -112,45 +98,32 @@ const canvasSelector = createSelector( // Use a closure allow other components to use these things... not ideal... export let stageRef: MutableRefObject; export let canvasImageLayerRef: MutableRefObject; -export let inpaintingImageElementRef: MutableRefObject; const IAICanvas = () => { - const dispatch = useAppDispatch(); - const { - shouldInvertMask, + activeTabName, isMaskEnabled, - shouldShowCheckboardTransparency, - stageScale, - shouldShowBoundingBox, isModifyingBoundingBox, + shouldShowBoundingBox, + shouldShowGrid, + stageCoordinates, stageCursor, stageDimensions, - stageCoordinates, - shouldShowGrid, - activeTabName, - baseCanvasImage, + stageScale, tool, } = useAppSelector(canvasSelector); useCanvasHotkeys(); - const toast = useToast(); // set the closure'd refs stageRef = useRef(null); canvasImageLayerRef = useRef(null); - inpaintingImageElementRef = useRef(null); const lastCursorPositionRef = useRef({ x: 0, y: 0 }); // Use refs for values that do not affect rendering, other values in redux const didMouseMoveRef = useRef(false); - // Load the image into this - const [canvasBgImage, setCanvasBgImage] = useState( - null - ); - const handleWheel = useCanvasWheel(stageRef); const handleMouseDown = useCanvasMouseDown(stageRef); const handleMouseUp = useCanvasMouseUp(stageRef, didMouseMoveRef); @@ -164,29 +137,6 @@ const IAICanvas = () => { const { handleDragStart, handleDragMove, handleDragEnd } = useCanvasDragMove(); - // Load the image and set the options panel width & height - useEffect(() => { - if (baseCanvasImage) { - const image = new Image(); - image.onload = () => { - inpaintingImageElementRef.current = image; - setCanvasBgImage(image); - }; - image.onerror = () => { - toast({ - title: 'Unable to Load Image', - description: `Image ${baseCanvasImage.url} failed to load`, - status: 'error', - isClosable: true, - }); - dispatch(clearImageToInpaint()); - }; - image.src = baseCanvasImage.url; - } else { - setCanvasBgImage(null); - } - }, [baseCanvasImage, dispatch, stageScale, toast]); - return (
@@ -209,36 +159,31 @@ const IAICanvas = () => { onDragMove={handleDragMove} onDragEnd={handleDragEnd} onWheel={handleWheel} - listening={ - tool === 'move' && - !isModifyingBoundingBox && - activeTabName === 'outpainting' - } + listening={tool === 'move' && !isModifyingBoundingBox} draggable={ tool === 'move' && !isModifyingBoundingBox && activeTabName === 'outpainting' } > - + - + - + - - {canvasBgImage && ( + {/* {canvasBgImage && ( <> { } /> - )} + )} */} - - + + { +const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { const { ...rest } = props; const dispatch = useAppDispatch(); @@ -86,7 +81,6 @@ const IAICanvasBoundingBoxPreview = ( shouldDarkenOutsideBoundingBox, isMovingBoundingBox, isTransformingBoundingBox, - shouldLockBoundingBox, stageCoordinates, stageDimensions, stageScale, @@ -104,7 +98,7 @@ const IAICanvasBoundingBoxPreview = ( if (!transformerRef.current || !shapeRef.current) return; transformerRef.current.nodes([shapeRef.current]); transformerRef.current.getLayer()?.batchDraw(); - }, [shouldLockBoundingBox]); + }, []); const scaledStep = 64 * stageScale; @@ -264,7 +258,6 @@ const IAICanvasBoundingBoxPreview = ( [scaledStep] ); - // OK const boundBoxFunc = useCallback( (oldBoundBox: Box, newBoundBox: Box) => { /** @@ -341,10 +334,10 @@ const IAICanvasBoundingBoxPreview = ( dragBoundFunc={ activeTabName === 'inpainting' ? dragBoundFunc : undefined } + listening={!isDrawing && tool === 'move'} draggable={true} fillEnabled={tool === 'move'} height={boundingBoxDimensions.height} - listening={!isDrawing && tool === 'move'} onDragEnd={handleEndedModifying} onDragMove={handleOnDragMove} onMouseDown={handleStartedMoving} @@ -387,4 +380,4 @@ const IAICanvasBoundingBoxPreview = ( ); }; -export default IAICanvasBoundingBoxPreview; +export default IAICanvasBoundingBox; diff --git a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx index c1b77a0edb..860390460a 100644 --- a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx @@ -15,7 +15,6 @@ import IAIPopover from 'common/components/IAIPopover'; import IAIColorPicker from 'common/components/IAIColorPicker'; import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; -import IAINumberInput from 'common/components/IAINumberInput'; export const selector = createSelector( [currentCanvasSelector, outpaintingCanvasSelector, activeTabNameSelector], diff --git a/frontend/src/features/canvas/IAICanvasControls.tsx b/frontend/src/features/canvas/IAICanvasControls.tsx index 07e0c8d17c..bedcb32ed2 100644 --- a/frontend/src/features/canvas/IAICanvasControls.tsx +++ b/frontend/src/features/canvas/IAICanvasControls.tsx @@ -2,7 +2,7 @@ import IAICanvasBrushControl from './IAICanvasControls/IAICanvasBrushControl'; import IAICanvasEraserControl from './IAICanvasControls/IAICanvasEraserControl'; import IAICanvasUndoControl from './IAICanvasControls/IAICanvasUndoButton'; import IAICanvasRedoControl from './IAICanvasControls/IAICanvasRedoButton'; -import { Button, ButtonGroup } from '@chakra-ui/react'; +import { ButtonGroup } from '@chakra-ui/react'; import IAICanvasMaskClear from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear'; import IAICanvasMaskVisibilityControl from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl'; import IAICanvasMaskInvertControl from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl'; @@ -11,8 +11,6 @@ import IAICanvasShowHideBoundingBoxControl from './IAICanvasControls/IAICanvasSh import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; import { createSelector } from '@reduxjs/toolkit'; import { - currentCanvasSelector, - GenericCanvasState, outpaintingCanvasSelector, OutpaintingCanvasState, uploadOutpaintingMergedImage, @@ -23,7 +21,6 @@ import { OptionsState } from 'features/options/optionsSlice'; import _ from 'lodash'; import IAICanvasImageEraserControl from './IAICanvasControls/IAICanvasImageEraserControl'; import { canvasImageLayerRef } from './IAICanvas'; -import { uploadImage } from 'app/socketio/actions'; import IAIIconButton from 'common/components/IAIIconButton'; import { FaSave } from 'react-icons/fa'; @@ -56,12 +53,7 @@ export const canvasControlsSelector = createSelector( const IAICanvasControls = () => { const dispatch = useAppDispatch(); - const { - activeTabName, - boundingBoxCoordinates, - boundingBoxDimensions, - stageScale, - } = useAppSelector(canvasControlsSelector); + const { activeTabName } = useAppSelector(canvasControlsSelector); return (
diff --git a/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx b/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx index 5562b1e44f..60df35c105 100644 --- a/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx +++ b/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx @@ -42,7 +42,7 @@ const IAICanvasIntermediateImage = (props: Props) => { const { boundingBox: { x, y, width, height }, } = intermediateImage; - + return loadedImageElement ? ( { const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { const { ...rest } = props; - const { - maskColorString, - maskOpacity, - stageCoordinates, - stageDimensions, - stageScale, - } = useAppSelector(canvasMaskCompositerSelector); + const { maskColorString, stageCoordinates, stageDimensions, stageScale } = + useAppSelector(canvasMaskCompositerSelector); const [fillPatternImage, setFillPatternImage] = useState(null); diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx b/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx similarity index 76% rename from frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx rename to frontend/src/features/canvas/IAICanvasObjectRenderer.tsx index eba52769f3..a776ff69ee 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingObjects.tsx +++ b/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx @@ -1,9 +1,9 @@ import { createSelector } from '@reduxjs/toolkit'; -import { RootState, useAppSelector } from 'app/store'; +import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { Group, Line } from 'react-konva'; import { - CanvasState, + currentCanvasSelector, isCanvasBaseImage, isCanvasBaseLine, } from './canvasSlice'; @@ -11,14 +11,9 @@ import IAICanvasImage from './IAICanvasImage'; import { rgbaColorToString } from './util/colorToString'; const selector = createSelector( - [(state: RootState) => state.canvas], - (canvas: CanvasState) => { - return { - objects: - canvas.currentCanvas === 'outpainting' - ? canvas.outpainting.objects - : undefined, - }; + [currentCanvasSelector], + (currentCanvas) => { + return currentCanvas.objects; }, { memoizeOptions: { @@ -27,8 +22,8 @@ const selector = createSelector( } ); -const IAICanvasOutpaintingObjects = () => { - const { objects } = useAppSelector(selector); +const IAICanvasObjectRenderer = () => { + const objects = useAppSelector(selector); if (!objects) return null; @@ -62,4 +57,4 @@ const IAICanvasOutpaintingObjects = () => { ); }; -export default IAICanvasOutpaintingObjects; +export default IAICanvasObjectRenderer; diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/IAICanvasResizer.tsx index 5649b2b20c..645f8812bd 100644 --- a/frontend/src/features/canvas/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/IAICanvasResizer.tsx @@ -5,14 +5,10 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { baseCanvasImageSelector, CanvasState, - currentCanvasSelector, - GenericCanvasState, setStageDimensions, setStageScale, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; -import * as InvokeAI from 'app/invokeai'; -import { first } from 'lodash'; const canvasResizerSelector = createSelector( (state: RootState) => state.canvas, @@ -39,13 +35,12 @@ const IAICanvasResizer = () => { useLayoutEffect(() => { window.setTimeout(() => { if (!ref.current || !baseCanvasImage) return; - - const width = ref.current.clientWidth; - const height = ref.current.clientHeight; + const { width: imageWidth, height: imageHeight } = baseCanvasImage.image; + const { clientWidth, clientHeight } = ref.current; const scale = Math.min( 1, - Math.min(width / baseCanvasImage.width, height / baseCanvasImage.height) + Math.min(clientWidth / imageWidth, clientHeight / imageHeight) ); dispatch(setStageScale(scale)); @@ -53,15 +48,15 @@ const IAICanvasResizer = () => { if (activeTabName === 'inpainting') { dispatch( setStageDimensions({ - width: Math.floor(baseCanvasImage.width * scale), - height: Math.floor(baseCanvasImage.height * scale), + width: Math.floor(imageWidth * scale), + height: Math.floor(imageHeight * scale), }) ); } else if (activeTabName === 'outpainting') { dispatch( setStageDimensions({ - width: Math.floor(width), - height: Math.floor(height), + width: Math.floor(clientWidth), + height: Math.floor(clientHeight), }) ); } diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index f940c4c978..d1535105f0 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -11,7 +11,6 @@ import * as InvokeAI from 'app/invokeai'; import _ from 'lodash'; import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import { RootState } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { MutableRefObject } from 'react'; import Konva from 'konva'; @@ -137,7 +136,7 @@ const initialGenericCanvasState: GenericCanvasState = { tool: 'brush', brushColor: { r: 90, g: 90, b: 255, a: 1 }, brushSize: 50, - maskColor: { r: 255, g: 90, b: 90, a: 0.5 }, + maskColor: { r: 255, g: 90, b: 90, a: 1 }, eraserSize: 50, stageDimensions: { width: 0, height: 0 }, stageCoordinates: { x: 0, y: 0 }, @@ -351,7 +350,16 @@ export const canvasSlice = createSlice({ state.inpainting.boundingBoxDimensions = newDimensions; state.inpainting.boundingBoxCoordinates = newCoordinates; - state.inpainting.imageToInpaint = action.payload; + // state.inpainting.imageToInpaint = action.payload; + state.inpainting.objects = [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + image: action.payload, + }, + ]; state.doesCanvasNeedScaling = true; }, setStageDimensions: (state, action: PayloadAction) => { @@ -567,19 +575,19 @@ export const canvasSlice = createSlice({ lastLine.points.push(...action.payload); }, undo: (state) => { - if (state.outpainting.objects.length === 0) return; + if (state[state.currentCanvas].objects.length === 0) return; - const newObjects = state.outpainting.pastObjects.pop(); + const newObjects = state[state.currentCanvas].pastObjects.pop(); if (!newObjects) return; - state.outpainting.futureObjects.unshift(state.outpainting.objects); - state.outpainting.objects = newObjects; + state[state.currentCanvas].futureObjects.unshift(state[state.currentCanvas].objects); + state[state.currentCanvas].objects = newObjects; }, redo: (state) => { - if (state.outpainting.futureObjects.length === 0) return; - const newObjects = state.outpainting.futureObjects.shift(); + if (state[state.currentCanvas].futureObjects.length === 0) return; + const newObjects = state[state.currentCanvas].futureObjects.shift(); if (!newObjects) return; - state.outpainting.pastObjects.push(state.outpainting.objects); - state.outpainting.objects = newObjects; + state[state.currentCanvas].pastObjects.push(state[state.currentCanvas].objects); + state[state.currentCanvas].objects = newObjects; }, setShouldShowGrid: (state, action: PayloadAction) => { state.outpainting.shouldShowGrid = action.payload; @@ -748,17 +756,8 @@ export const inpaintingCanvasSelector = ( ): InpaintingCanvasState => state.canvas.inpainting; export const baseCanvasImageSelector = createSelector( - [(state: RootState) => state.canvas, activeTabNameSelector], - (canvas: CanvasState, activeTabName) => { - if (activeTabName === 'inpainting') { - return canvas.inpainting.imageToInpaint; - } else if (activeTabName === 'outpainting') { - const firstImageObject = canvas.outpainting.objects.find( - (obj) => obj.kind === 'image' - ); - if (firstImageObject && firstImageObject.kind === 'image') { - return firstImageObject.image; - } - } + [currentCanvasSelector], + (currentCanvas) => { + return currentCanvas.objects.find(isCanvasBaseImage); } ); diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index 0a4339425b..6300a4fa21 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -2,26 +2,20 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { OptionsState } from 'features/options/optionsSlice'; import { CanvasTool, setShouldShowBoundingBox, setTool, toggleShouldLockBoundingBox, } from 'features/canvas/canvasSlice'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import { currentCanvasSelector, GenericCanvasState } from '../canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { currentCanvasSelector } from '../canvasSlice'; import { useRef } from 'react'; const inpaintingCanvasHotkeysSelector = createSelector( - [ - (state: RootState) => state.options, - currentCanvasSelector, - activeTabNameSelector, - ], - (options: OptionsState, currentCanvas: GenericCanvasState, activeTabName) => { + [currentCanvasSelector, activeTabNameSelector], + (currentCanvas, activeTabName) => { const { - isMaskEnabled, cursorPosition, shouldLockBoundingBox, shouldShowBoundingBox, @@ -30,7 +24,6 @@ const inpaintingCanvasHotkeysSelector = createSelector( return { activeTabName, - isMaskEnabled, isCursorOnCanvas: Boolean(cursorPosition), shouldLockBoundingBox, shouldShowBoundingBox, @@ -46,8 +39,9 @@ const inpaintingCanvasHotkeysSelector = createSelector( const useInpaintingCanvasHotkeys = () => { const dispatch = useAppDispatch(); - const { isMaskEnabled, activeTabName, shouldShowBoundingBox, tool } = - useAppSelector(inpaintingCanvasHotkeysSelector); + const { activeTabName, shouldShowBoundingBox, tool } = useAppSelector( + inpaintingCanvasHotkeysSelector + ); const previousToolRef = useRef(null); // Toggle lock bounding box diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts b/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts index 2a29404865..18fb0a337d 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts @@ -1,5 +1,4 @@ import { useAppDispatch } from 'app/store'; -import _ from 'lodash'; import { useCallback } from 'react'; import { setCursorPosition, setIsDrawing } from '../canvasSlice'; diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index 3a21f4b0b1..426c8674c1 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -21,7 +21,7 @@ import IAIIconButton from 'common/components/IAIIconButton'; import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import { useHotkeys } from 'react-hotkeys-hook'; -import { ButtonGroup, Link, useClipboard, useToast } from '@chakra-ui/react'; +import { ButtonGroup, Link, useToast } from '@chakra-ui/react'; import { FaAsterisk, FaCode, diff --git a/frontend/src/features/gallery/CurrentImagePreview.tsx b/frontend/src/features/gallery/CurrentImagePreview.tsx index 03789c6ad5..cb39109ec1 100644 --- a/frontend/src/features/gallery/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/CurrentImagePreview.tsx @@ -1,4 +1,4 @@ -import { IconButton, Image, Spinner } from '@chakra-ui/react'; +import { IconButton, Image } from '@chakra-ui/react'; import { useState } from 'react'; import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx index 82f832d904..267c82e3c1 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; import { currentCanvasSelector, diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx index aa8964aa89..f874a05860 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx @@ -1,12 +1,10 @@ import React from 'react'; import IAISlider from 'common/components/IAISlider'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; import { currentCanvasSelector, - GenericCanvasState, - // InpaintingState, setBoundingBoxDimensions, } from 'features/canvas/canvasSlice'; @@ -15,7 +13,7 @@ import _ from 'lodash'; const boundingBoxDimensionsSelector = createSelector( currentCanvasSelector, - (currentCanvas: GenericCanvasState) => { + (currentCanvas) => { const { stageDimensions, boundingBoxDimensions, shouldLockBoundingBox } = currentCanvas; return { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx index ba90b02abb..5bf5d77007 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx @@ -1,16 +1,15 @@ import React from 'react'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; import { currentCanvasSelector, - GenericCanvasState, setShouldLockBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; const boundingBoxLockSelector = createSelector( currentCanvasSelector, - (currentCanvas: GenericCanvasState) => currentCanvas.shouldLockBoundingBox + (currentCanvas) => currentCanvas.shouldLockBoundingBox ); export default function BoundingBoxLock() { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx index b6b5a1b5de..622b68f1df 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx @@ -1,17 +1,16 @@ import React from 'react'; import { BiHide, BiShow } from 'react-icons/bi'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { currentCanvasSelector, - GenericCanvasState, setShouldShowBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; const boundingBoxVisibilitySelector = createSelector( currentCanvasSelector, - (currentCanvas: GenericCanvasState) => currentCanvas.shouldShowBoundingBox + (currentCanvas) => currentCanvas.shouldShowBoundingBox ); export default function BoundingBoxVisibility() { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx index 837ce8d470..ac6f1b1109 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx @@ -1,9 +1,5 @@ import React, { ChangeEvent } from 'react'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from '../../../../app/store'; +import { useAppDispatch, useAppSelector } from '../../../../app/store'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; import IAISwitch from '../../../../common/components/IAISwitch'; diff --git a/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx b/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx index 7a79f5f7ee..86e551537e 100644 --- a/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx +++ b/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx @@ -1,5 +1,4 @@ import { Image, useToast } from '@chakra-ui/react'; -import { SyntheticEvent } from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; import { clearInitialImage } from 'features/options/optionsSlice'; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx index 77d39dc2c3..db341e350c 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx @@ -1,5 +1,4 @@ import { createSelector } from '@reduxjs/toolkit'; -// import IAICanvas from 'features/canvas/IAICanvas'; import IAICanvasControls from 'features/canvas/IAICanvasControls'; import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; import _ from 'lodash'; @@ -9,23 +8,25 @@ import ImageUploadButton from 'common/components/ImageUploaderButton'; import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; import { OptionsState } from 'features/options/optionsSlice'; import { + baseCanvasImageSelector, CanvasState, setDoesCanvasNeedScaling, } from 'features/canvas/canvasSlice'; import IAICanvas from 'features/canvas/IAICanvas'; const inpaintingDisplaySelector = createSelector( - [(state: RootState) => state.canvas, (state: RootState) => state.options], - (canvas: CanvasState, options: OptionsState) => { - const { - doesCanvasNeedScaling, - inpainting: { imageToInpaint }, - } = canvas; + [ + baseCanvasImageSelector, + (state: RootState) => state.canvas, + (state: RootState) => state.options, + ], + (baseCanvasImage, canvas: CanvasState, options: OptionsState) => { + const { doesCanvasNeedScaling } = canvas; const { showDualDisplay } = options; return { doesCanvasNeedScaling, showDualDisplay, - imageToInpaint, + baseCanvasImage, }; }, { @@ -37,7 +38,7 @@ const inpaintingDisplaySelector = createSelector( const InpaintingDisplay = () => { const dispatch = useAppDispatch(); - const { showDualDisplay, doesCanvasNeedScaling, imageToInpaint } = + const { showDualDisplay, doesCanvasNeedScaling, baseCanvasImage } = useAppSelector(inpaintingDisplaySelector); useLayoutEffect(() => { @@ -49,7 +50,7 @@ const InpaintingDisplay = () => { return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); - const inpaintingComponent = imageToInpaint ? ( + const inpaintingComponent = baseCanvasImage ? (
diff --git a/frontend/src/features/tabs/InvokeTabs.tsx b/frontend/src/features/tabs/InvokeTabs.tsx index 33dcd10b1e..518a542958 100644 --- a/frontend/src/features/tabs/InvokeTabs.tsx +++ b/frontend/src/features/tabs/InvokeTabs.tsx @@ -4,7 +4,6 @@ import React, { ReactElement } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import NodesWIP from 'common/components/WorkInProgress/NodesWIP'; -import OutpaintingWIP from 'common/components/WorkInProgress/OutpaintingWIP'; import { PostProcessingWIP } from 'common/components/WorkInProgress/PostProcessingWIP'; import ImageToImageIcon from 'common/icons/ImageToImageIcon'; import InpaintIcon from 'common/icons/InpaintIcon'; @@ -19,13 +18,9 @@ import { } from 'features/options/optionsSlice'; import ImageToImageWorkarea from './ImageToImage'; import InpaintingWorkarea from './Inpainting/InpaintingWorkarea'; -// import { setDoesCanvasNeedScaling } from './Inpainting/inpaintingSlice'; import TextToImageWorkarea from './TextToImage'; import Lightbox from 'features/lightbox/Lightbox'; -import { - setCurrentCanvas, - setDoesCanvasNeedScaling, -} from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; import OutpaintingWorkarea from './Outpainting/OutpaintingWorkarea'; import { setShouldShowGallery } from 'features/gallery/gallerySlice'; diff --git a/frontend/src/features/tabs/InvokeWorkarea.tsx b/frontend/src/features/tabs/InvokeWorkarea.tsx index 96552a6eef..4f76a708ed 100644 --- a/frontend/src/features/tabs/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/InvokeWorkarea.tsx @@ -19,7 +19,6 @@ const workareaSelector = createSelector( return { showDualDisplay, shouldPinOptionsPanel, - activeTabName, isLightBoxOpen, shouldShowDualDisplayButton: ['inpainting'].includes(activeTabName), }; @@ -37,7 +36,6 @@ const InvokeWorkarea = (props: InvokeWorkareaProps) => { const { optionsPanel, children, styleClass } = props; const { showDualDisplay, - activeTabName, isLightBoxOpen, shouldShowDualDisplayButton, } = useAppSelector(workareaSelector); diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx index 2799e612c5..e5fd54f008 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx @@ -1,34 +1,26 @@ import { createSelector } from '@reduxjs/toolkit'; // import IAICanvas from 'features/canvas/IAICanvas'; -import IAICanvasControls from 'features/canvas/IAICanvasControls'; import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; import _ from 'lodash'; import { useLayoutEffect } from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import ImageUploadButton from 'common/components/ImageUploaderButton'; -import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; -import { OptionsState } from 'features/options/optionsSlice'; import { CanvasState, - currentCanvasSelector, - GenericCanvasState, - OutpaintingCanvasState, setDoesCanvasNeedScaling, } from 'features/canvas/canvasSlice'; import IAICanvas from 'features/canvas/IAICanvas'; import IAICanvasOutpaintingControls from 'features/canvas/IAICanvasOutpaintingControls'; const outpaintingDisplaySelector = createSelector( - [(state: RootState) => state.canvas, (state: RootState) => state.options], - (canvas: CanvasState, options: OptionsState) => { + [(state: RootState) => state.canvas], + (canvas: CanvasState) => { const { doesCanvasNeedScaling, outpainting: { objects }, } = canvas; - const { showDualDisplay } = options; return { doesCanvasNeedScaling, - showDualDisplay, doesOutpaintingHaveObjects: objects.length > 0, }; }, @@ -41,8 +33,9 @@ const outpaintingDisplaySelector = createSelector( const OutpaintingDisplay = () => { const dispatch = useAppDispatch(); - const { showDualDisplay, doesCanvasNeedScaling, doesOutpaintingHaveObjects } = - useAppSelector(outpaintingDisplaySelector); + const { doesCanvasNeedScaling, doesOutpaintingHaveObjects } = useAppSelector( + outpaintingDisplaySelector + ); useLayoutEffect(() => { const resizeCallback = _.debounce( From 5410d42da05a86719edf198b08a1d225b9eb3908 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 12 Nov 2022 08:08:37 +1300 Subject: [PATCH 023/220] Disable stage info in Inpainting Tab --- frontend/src/features/canvas/IAICanvas.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 25f8cc5767..3cf573d94a 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -76,7 +76,6 @@ const canvasSelector = createSelector( } return { - activeTabName, isMaskEnabled, isModifyingBoundingBox: isTransformingBoundingBox || isMovingBoundingBox, shouldShowBoundingBox, @@ -86,6 +85,7 @@ const canvasSelector = createSelector( stageDimensions, stageScale, tool, + outpaintingOnly: activeTabName === 'outpainting', }; }, { @@ -101,7 +101,6 @@ export let canvasImageLayerRef: MutableRefObject; const IAICanvas = () => { const { - activeTabName, isMaskEnabled, isModifyingBoundingBox, shouldShowBoundingBox, @@ -111,6 +110,7 @@ const IAICanvas = () => { stageDimensions, stageScale, tool, + outpaintingOnly, } = useAppSelector(canvasSelector); useCanvasHotkeys(); @@ -161,9 +161,7 @@ const IAICanvas = () => { onWheel={handleWheel} listening={tool === 'move' && !isModifyingBoundingBox} draggable={ - tool === 'move' && - !isModifyingBoundingBox && - activeTabName === 'outpainting' + tool === 'move' && !isModifyingBoundingBox && outpaintingOnly } > @@ -211,7 +209,7 @@ const IAICanvas = () => { /> - + {outpaintingOnly && }
); From 775f032c561ee81cc353b0fbd86c322aad9c6092 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 12 Nov 2022 08:09:35 +1300 Subject: [PATCH 024/220] Mask Brush Preview now always at 0.5 opacity The new mask is only visible properly at max opacity but at max opacity the brush preview becomes fully opaque blocking the view. So the mask brush preview no remains at 0.5 no matter what the Brush opacity is. --- frontend/src/features/canvas/IAICanvasBrushPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx b/frontend/src/features/canvas/IAICanvasBrushPreview.tsx index f2656f30c1..c4f3e0b20c 100644 --- a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx +++ b/frontend/src/features/canvas/IAICanvasBrushPreview.tsx @@ -30,7 +30,7 @@ const canvasBrushPreviewSelector = createSelector( height, radius: tool === 'brush' ? brushSize / 2 : eraserSize / 2, brushColorString: rgbaColorToString( - layer === 'mask' ? maskColor : brushColor + layer === 'mask' ? { ...maskColor, a: 0.5 } : brushColor ), tool, shouldShowBrush, From 7f0fb47cf30ca1f7690a82abf00a6157298baaf8 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 12 Nov 2022 08:09:55 +1300 Subject: [PATCH 025/220] Remove save button from Canvas Controls (cleanup) --- .../src/features/canvas/IAICanvasControls.tsx | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasControls.tsx b/frontend/src/features/canvas/IAICanvasControls.tsx index bedcb32ed2..85f42f8b5a 100644 --- a/frontend/src/features/canvas/IAICanvasControls.tsx +++ b/frontend/src/features/canvas/IAICanvasControls.tsx @@ -13,16 +13,11 @@ import { createSelector } from '@reduxjs/toolkit'; import { outpaintingCanvasSelector, OutpaintingCanvasState, - uploadOutpaintingMergedImage, } from './canvasSlice'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { RootState } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { OptionsState } from 'features/options/optionsSlice'; import _ from 'lodash'; -import IAICanvasImageEraserControl from './IAICanvasControls/IAICanvasImageEraserControl'; -import { canvasImageLayerRef } from './IAICanvas'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { FaSave } from 'react-icons/fa'; export const canvasControlsSelector = createSelector( [ @@ -52,15 +47,11 @@ export const canvasControlsSelector = createSelector( ); const IAICanvasControls = () => { - const dispatch = useAppDispatch(); - const { activeTabName } = useAppSelector(canvasControlsSelector); - return (
- {activeTabName === 'outpainting' && } @@ -69,15 +60,6 @@ const IAICanvasControls = () => { - } - onClick={() => { - dispatch(uploadOutpaintingMergedImage(canvasImageLayerRef)); - }} - fontSize={20} - /> From 7075a17091e30c6c50312b56e48f50cb412463e3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 07:36:19 +1100 Subject: [PATCH 026/220] Implements invert mask --- backend/invoke_ai_web_server.py | 9 ++-- .../src/common/util/parameterTranslation.ts | 5 +++ .../canvas/IAICanvasMaskButtonPopover.tsx | 13 ++++-- .../canvas/IAICanvasMaskCompositer.tsx | 21 +++++++--- frontend/src/features/canvas/canvasSlice.ts | 41 +++++++++++++------ 5 files changed, 66 insertions(+), 23 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 91af9ed17f..5b15ffc12b 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -12,7 +12,7 @@ import os from werkzeug.utils import secure_filename from flask import Flask, redirect, send_from_directory, flash, request, url_for, jsonify from flask_socketio import SocketIO -from PIL import Image +from PIL import Image, ImageOps from PIL.Image import Image as ImageType from uuid import uuid4 from threading import Event @@ -698,11 +698,11 @@ class InvokeAIWebServer: So we need to convert each into a PIL Image. """ + truncated_outpaint_image_b64 = generation_parameters["init_img"][:64] truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] init_img_url = generation_parameters["init_img"] - - init_img_url = generation_parameters["init_img"] + init_mask_url = generation_parameters["init_mask"] init_img_path = self.get_image_path_from_url(init_img_url) @@ -723,6 +723,9 @@ class InvokeAIWebServer: generation_parameters["init_mask"] ).convert("L") + if generation_parameters.invert_mask: + mask_image = ImageOps.invert(mask_image) + """ Apply the mask to the init image, creating a "mask" image with transparency where inpainting should occur. This is the kind of diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index f73da43898..4a816b86db 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -118,6 +118,7 @@ export const frontendToBackendParameters = ( shouldUseInpaintReplace, stageScale, isMaskEnabled, + shouldInvertMask, } = canvasState[canvasState.currentCanvas]; const boundingBox = { @@ -137,6 +138,10 @@ export const frontendToBackendParameters = ( generationParameters.init_img = imageToProcessUrl; generationParameters.strength = img2imgStrength; + if (shouldInvertMask) { + generationParameters.invert_mask = true; + } + if (shouldUseInpaintReplace) { generationParameters.inpaint_replace = inpaintReplace; } diff --git a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx index b5525d279d..e55127a23e 100644 --- a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx @@ -6,6 +6,7 @@ import { setIsMaskEnabled, setLayer, setMaskColor, + setShouldInvertMask, } from './canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; @@ -19,12 +20,13 @@ import IAIButton from 'common/components/IAIButton'; export const selector = createSelector( [currentCanvasSelector], (currentCanvas) => { - const { maskColor, layer, isMaskEnabled } = currentCanvas; + const { maskColor, layer, isMaskEnabled, shouldInvertMask } = currentCanvas; return { layer, maskColor, isMaskEnabled, + shouldInvertMask, }; }, { @@ -35,7 +37,8 @@ export const selector = createSelector( ); const IAICanvasMaskButtonPopover = () => { const dispatch = useAppDispatch(); - const { layer, maskColor, isMaskEnabled } = useAppSelector(selector); + const { layer, maskColor, isMaskEnabled, shouldInvertMask } = + useAppSelector(selector); return ( { isChecked={isMaskEnabled} onChange={(e) => dispatch(setIsMaskEnabled(e.target.checked))} /> - + dispatch(setShouldInvertMask(e.target.checked))} + /> dispatch(setMaskColor(newColor))} diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 93c91ec619..1f9c46ee19 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -15,14 +15,20 @@ import Konva from 'konva'; export const canvasMaskCompositerSelector = createSelector( currentCanvasSelector, (currentCanvas) => { - const { maskColor, stageCoordinates, stageDimensions, stageScale } = - currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; + const { + maskColor, + stageCoordinates, + stageDimensions, + stageScale, + shouldInvertMask, + } = currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; return { stageCoordinates, stageDimensions, stageScale, maskColorString: rgbaColorToString(maskColor), + shouldInvertMask, }; } ); @@ -114,8 +120,13 @@ const getColoredSVG = (color: string) => { const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { const { ...rest } = props; - const { maskColorString, stageCoordinates, stageDimensions, stageScale } = - useAppSelector(canvasMaskCompositerSelector); + const { + maskColorString, + stageCoordinates, + stageDimensions, + stageScale, + shouldInvertMask, + } = useAppSelector(canvasMaskCompositerSelector); const [fillPatternImage, setFillPatternImage] = useState(null); @@ -162,7 +173,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { fillPatternRepeat={'repeat'} fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }} listening={true} - globalCompositeOperation={'source-in'} + globalCompositeOperation={shouldInvertMask ? 'source-out' : 'source-in'} {...rest} /> ); diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index d1535105f0..7ff15ce6e7 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -546,25 +546,38 @@ export const canvasSlice = createSlice({ }); }, addLine: (state, action: PayloadAction) => { - const { tool, layer, brushColor, brushSize, eraserSize } = - state[state.currentCanvas]; + const currentCanvas = state[state.currentCanvas]; + + const { tool, layer, brushColor, brushSize, eraserSize } = currentCanvas; if (tool === 'move') return; - state[state.currentCanvas].pastObjects.push( - state[state.currentCanvas].objects - ); + let newTool: CanvasDrawingTool; - state[state.currentCanvas].objects.push({ + if (layer === 'mask' && currentCanvas.shouldInvertMask) { + newTool = tool === 'eraser' ? 'brush' : 'eraser'; + } else { + newTool = tool; + } + + const newStrokeWidth = tool === 'brush' ? brushSize / 2 : eraserSize / 2; + + // set & then spread this to only conditionally add the "color" key + const newColor = + layer === 'base' && tool === 'brush' ? { color: brushColor } : {}; + + currentCanvas.pastObjects.push(currentCanvas.objects); + + currentCanvas.objects.push({ kind: 'line', layer, - tool, - strokeWidth: tool === 'brush' ? brushSize / 2 : eraserSize / 2, + tool: newTool, + strokeWidth: newStrokeWidth, points: action.payload, - ...(layer === 'base' && tool === 'brush' && { color: brushColor }), + ...newColor, }); - state[state.currentCanvas].futureObjects = []; + currentCanvas.futureObjects = []; }, addPointToCurrentLine: (state, action: PayloadAction) => { const lastLine = @@ -579,14 +592,18 @@ export const canvasSlice = createSlice({ const newObjects = state[state.currentCanvas].pastObjects.pop(); if (!newObjects) return; - state[state.currentCanvas].futureObjects.unshift(state[state.currentCanvas].objects); + state[state.currentCanvas].futureObjects.unshift( + state[state.currentCanvas].objects + ); state[state.currentCanvas].objects = newObjects; }, redo: (state) => { if (state[state.currentCanvas].futureObjects.length === 0) return; const newObjects = state[state.currentCanvas].futureObjects.shift(); if (!newObjects) return; - state[state.currentCanvas].pastObjects.push(state[state.currentCanvas].objects); + state[state.currentCanvas].pastObjects.push( + state[state.currentCanvas].objects + ); state[state.currentCanvas].objects = newObjects; }, setShouldShowGrid: (state, action: PayloadAction) => { From c7ef41af54242ae23ed8595ae55fba60ed9315b1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 08:44:48 +1100 Subject: [PATCH 027/220] Changes "Invert Mask" to "Preserve Masked Areas" --- .../src/common/util/parameterTranslation.ts | 4 +-- frontend/src/features/canvas/IAICanvas.tsx | 4 +-- .../IAICanvasMaskInvertControl.tsx | 16 ++++++------ .../canvas/IAICanvasMaskButtonPopover.tsx | 14 +++++----- .../canvas/IAICanvasMaskCompositer.tsx | 21 ++++----------- frontend/src/features/canvas/canvasSlice.ts | 26 +++++++------------ 6 files changed, 33 insertions(+), 52 deletions(-) diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 4a816b86db..5f3c9294dd 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -118,7 +118,7 @@ export const frontendToBackendParameters = ( shouldUseInpaintReplace, stageScale, isMaskEnabled, - shouldInvertMask, + shouldPreserveMaskedArea, } = canvasState[canvasState.currentCanvas]; const boundingBox = { @@ -138,7 +138,7 @@ export const frontendToBackendParameters = ( generationParameters.init_img = imageToProcessUrl; generationParameters.strength = img2imgStrength; - if (shouldInvertMask) { + if (shouldPreserveMaskedArea) { generationParameters.invert_mask = true; } diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 3cf573d94a..954759b236 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -187,7 +187,7 @@ const IAICanvas = () => { image={canvasBgImage} listening={false} globalCompositeOperation="source-in" - visible={shouldInvertMask} + visible={shouldPreserveMaskedArea} /> { listening={false} globalCompositeOperation="source-out" visible={ - !shouldInvertMask && shouldShowCheckboardTransparency + !shouldPreserveMaskedArea && shouldShowCheckboardTransparency } /> diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx index d9e79ef002..bb901bf79c 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx @@ -5,7 +5,7 @@ import IAIIconButton from 'common/components/IAIIconButton'; import { currentCanvasSelector, GenericCanvasState, - setShouldInvertMask, + setShouldPreserveMaskedArea, } from 'features/canvas/canvasSlice'; import _ from 'lodash'; @@ -15,10 +15,10 @@ import { useHotkeys } from 'react-hotkeys-hook'; const canvasMaskInvertSelector = createSelector( [currentCanvasSelector, activeTabNameSelector], (currentCanvas: GenericCanvasState, activeTabName) => { - const { isMaskEnabled, shouldInvertMask } = currentCanvas; + const { isMaskEnabled, shouldPreserveMaskedArea } = currentCanvas; return { - shouldInvertMask, + shouldPreserveMaskedArea, isMaskEnabled, activeTabName, }; @@ -31,13 +31,13 @@ const canvasMaskInvertSelector = createSelector( ); export default function IAICanvasMaskInvertControl() { - const { shouldInvertMask, isMaskEnabled, activeTabName } = useAppSelector( + const { shouldPreserveMaskedArea, isMaskEnabled, activeTabName } = useAppSelector( canvasMaskInvertSelector ); const dispatch = useAppDispatch(); const handleToggleShouldInvertMask = () => - dispatch(setShouldInvertMask(!shouldInvertMask)); + dispatch(setShouldPreserveMaskedArea(!shouldPreserveMaskedArea)); // Invert mask useHotkeys( @@ -49,16 +49,16 @@ export default function IAICanvasMaskInvertControl() { { enabled: true, }, - [activeTabName, shouldInvertMask, isMaskEnabled] + [activeTabName, shouldPreserveMaskedArea, isMaskEnabled] ); return ( ) : ( diff --git a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx index e55127a23e..c20abafce2 100644 --- a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx @@ -6,7 +6,7 @@ import { setIsMaskEnabled, setLayer, setMaskColor, - setShouldInvertMask, + setShouldPreserveMaskedArea, } from './canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; @@ -20,13 +20,13 @@ import IAIButton from 'common/components/IAIButton'; export const selector = createSelector( [currentCanvasSelector], (currentCanvas) => { - const { maskColor, layer, isMaskEnabled, shouldInvertMask } = currentCanvas; + const { maskColor, layer, isMaskEnabled, shouldPreserveMaskedArea } = currentCanvas; return { layer, maskColor, isMaskEnabled, - shouldInvertMask, + shouldPreserveMaskedArea, }; }, { @@ -37,7 +37,7 @@ export const selector = createSelector( ); const IAICanvasMaskButtonPopover = () => { const dispatch = useAppDispatch(); - const { layer, maskColor, isMaskEnabled, shouldInvertMask } = + const { layer, maskColor, isMaskEnabled, shouldPreserveMaskedArea } = useAppSelector(selector); return ( @@ -61,9 +61,9 @@ const IAICanvasMaskButtonPopover = () => { onChange={(e) => dispatch(setIsMaskEnabled(e.target.checked))} /> dispatch(setShouldInvertMask(e.target.checked))} + label="Preserve Masked Area" + isChecked={shouldPreserveMaskedArea} + onChange={(e) => dispatch(setShouldPreserveMaskedArea(e.target.checked))} /> { - const { - maskColor, - stageCoordinates, - stageDimensions, - stageScale, - shouldInvertMask, - } = currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; + const { maskColor, stageCoordinates, stageDimensions, stageScale } = + currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; return { stageCoordinates, stageDimensions, stageScale, maskColorString: rgbaColorToString(maskColor), - shouldInvertMask, }; } ); @@ -120,13 +114,8 @@ const getColoredSVG = (color: string) => { const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { const { ...rest } = props; - const { - maskColorString, - stageCoordinates, - stageDimensions, - stageScale, - shouldInvertMask, - } = useAppSelector(canvasMaskCompositerSelector); + const { maskColorString, stageCoordinates, stageDimensions, stageScale } = + useAppSelector(canvasMaskCompositerSelector); const [fillPatternImage, setFillPatternImage] = useState(null); @@ -173,7 +162,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { fillPatternRepeat={'repeat'} fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }} listening={true} - globalCompositeOperation={shouldInvertMask ? 'source-out' : 'source-in'} + globalCompositeOperation={'source-in'} {...rest} /> ); diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index 7ff15ce6e7..3acfdcd126 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -29,7 +29,7 @@ export interface GenericCanvasState { shouldShowBoundingBox: boolean; shouldDarkenOutsideBoundingBox: boolean; isMaskEnabled: boolean; - shouldInvertMask: boolean; + shouldPreserveMaskedArea: boolean; shouldShowCheckboardTransparency: boolean; shouldShowBrush: boolean; shouldShowBrushPreview: boolean; @@ -147,7 +147,7 @@ const initialGenericCanvasState: GenericCanvasState = { shouldDarkenOutsideBoundingBox: false, cursorPosition: null, isMaskEnabled: true, - shouldInvertMask: false, + shouldPreserveMaskedArea: false, shouldShowCheckboardTransparency: false, shouldShowBrush: true, shouldShowBrushPreview: false, @@ -235,18 +235,18 @@ export const canvasSlice = createSlice({ state.currentCanvas ].objects.filter((obj) => !isCanvasMaskLine(obj)); state[state.currentCanvas].futureObjects = []; - state[state.currentCanvas].shouldInvertMask = false; + state[state.currentCanvas].shouldPreserveMaskedArea = false; }, toggleShouldInvertMask: (state) => { - state[state.currentCanvas].shouldInvertMask = - !state[state.currentCanvas].shouldInvertMask; + state[state.currentCanvas].shouldPreserveMaskedArea = + !state[state.currentCanvas].shouldPreserveMaskedArea; }, toggleShouldShowMask: (state) => { state[state.currentCanvas].isMaskEnabled = !state[state.currentCanvas].isMaskEnabled; }, - setShouldInvertMask: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldInvertMask = action.payload; + setShouldPreserveMaskedArea: (state, action: PayloadAction) => { + state[state.currentCanvas].shouldPreserveMaskedArea = action.payload; }, setIsMaskEnabled: (state, action: PayloadAction) => { state[state.currentCanvas].isMaskEnabled = action.payload; @@ -552,14 +552,6 @@ export const canvasSlice = createSlice({ if (tool === 'move') return; - let newTool: CanvasDrawingTool; - - if (layer === 'mask' && currentCanvas.shouldInvertMask) { - newTool = tool === 'eraser' ? 'brush' : 'eraser'; - } else { - newTool = tool; - } - const newStrokeWidth = tool === 'brush' ? brushSize / 2 : eraserSize / 2; // set & then spread this to only conditionally add the "color" key @@ -571,7 +563,7 @@ export const canvasSlice = createSlice({ currentCanvas.objects.push({ kind: 'line', layer, - tool: newTool, + tool, strokeWidth: newStrokeWidth, points: action.payload, ...newColor, @@ -655,7 +647,7 @@ export const { setEraserSize, addLine, addPointToCurrentLine, - setShouldInvertMask, + setShouldPreserveMaskedArea, setIsMaskEnabled, setShouldShowCheckboardTransparency, setShouldShowBrushPreview, From 1114ac97e200dd1f7da2c063423cded86bd6c5c4 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 12:16:06 +1100 Subject: [PATCH 028/220] Fixes (?) spacebar issues --- frontend/src/features/canvas/IAICanvas.tsx | 26 ++++--------------- .../features/canvas/IAICanvasBoundingBox.tsx | 5 +++- .../features/canvas/hooks/useCanvasHotkeys.ts | 22 +++++++--------- .../canvas/hooks/useCanvasMouseDown.ts | 1 + 4 files changed, 20 insertions(+), 34 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 954759b236..53712b7306 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -141,8 +141,12 @@ const IAICanvas = () => {
{ - - {/* {canvasBgImage && ( - <> - - - - - )} */} diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx index 0c56e4c55f..1f732df36f 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx @@ -58,6 +58,7 @@ const boundingBoxPreviewSelector = createSelector( tool, stageCoordinates, boundingBoxStrokeWidth: (isMouseOverBoundingBox ? 8 : 1) / stageScale, + hitStrokeWidth: 20 / stageScale, }; }, { @@ -89,6 +90,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { shouldSnapToGrid, tool, boundingBoxStrokeWidth, + hitStrokeWidth, } = useAppSelector(boundingBoxPreviewSelector); const transformerRef = useRef(null); @@ -336,7 +338,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { } listening={!isDrawing && tool === 'move'} draggable={true} - fillEnabled={tool === 'move'} + fillEnabled={false} height={boundingBoxDimensions.height} onDragEnd={handleEndedModifying} onDragMove={handleOnDragMove} @@ -352,6 +354,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { width={boundingBoxDimensions.width} x={boundingBoxCoordinates.x} y={boundingBoxCoordinates.y} + hitStrokeWidth={hitStrokeWidth} /> { dispatch(toggleShouldLockBoundingBox()); }, { - enabled: true, + scopes: ['inpainting', 'outpainting'], }, [activeTabName] ); @@ -64,7 +65,7 @@ const useInpaintingCanvasHotkeys = () => { dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); }, { - enabled: true, + scopes: ['inpainting', 'outpainting'], }, [activeTabName, shouldShowBoundingBox] ); @@ -74,19 +75,12 @@ const useInpaintingCanvasHotkeys = () => { (e: KeyboardEvent) => { if (e.repeat) return; + stageRef.current?.container().focus(); + if (tool !== 'move') { previousToolRef.current = tool; dispatch(setTool('move')); } - }, - { keyup: false, keydown: true }, - [tool, previousToolRef] - ); - - useHotkeys( - ['space'], - (e: KeyboardEvent) => { - if (e.repeat) return; if ( tool === 'move' && @@ -97,7 +91,11 @@ const useInpaintingCanvasHotkeys = () => { previousToolRef.current = 'move'; } }, - { keyup: true, keydown: false }, + { + keyup: true, + keydown: true, + scopes: ['inpainting', 'outpainting'], + }, [tool, previousToolRef] ); }; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index 8750db005a..503daeaf77 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -32,6 +32,7 @@ const useCanvasMouseDown = (stageRef: MutableRefObject) => { return useCallback( (e: KonvaEventObject) => { if (!stageRef.current) return; + stageRef.current.container().focus(); if (tool === 'move') { dispatch(setIsMovingStage(true)); From eb17dfdeaad16397c6888876ed552968af9150e4 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 20:41:48 +1100 Subject: [PATCH 029/220] Patches redux-persist and redux-deep-persist with debounced persists Our app changes redux state very, very often. As our undo/redo history grows, the calls to persist state start to take in the 100ms range, due to a the deep cloning of the history. This causes very noticeable performance lag. The deep cloning is required because we need to blacklist certain items in redux from being persisted (e.g. the app's connection status). Debouncing the whole process of persistence is a simple and effective solution. Unfortunately, `redux-persist` dropped `debounce` between v4 and v5, replacing it with `throttle`. `throttle`, instead of delaying the expensive action until a period of X ms of inactivity, simply ensures the action is executed at least every X ms. Of course, this does not fix our performance issue. The patch is very simple. It adds a `debounce` argument - a number of milliseconds - and debounces `redux-persist`'s `update()` method (provided by `createPersistoid`) by that many ms. Before this, I also tried writing a custom storage adapter for `redux-persist` to debounce the calls to `localStorage.setItem()`. While this worked and was far less invasive, it doesn't actually address the issue. It turns out `setItem()` is a very fast part of the process. We use `redux-deep-persist` to simplify the `redux-persist` configuration, which can get complicated when you need to blacklist or whitelist deeply nested state. There is also a patch here for that library because it uses the same types as `redux-persist`. Unfortunately, the last release of `redux-persist` used a package `flat-stream` which was malicious and has been removed from npm. The latest commits to `redux-persist` (about 1 year ago) do not build; we cannot use the master branch. And between the last release and last commit, the changes have all been breaking. Patching this last release (about 3 years old at this point) directly is far simpler than attempting to fix the upstream library's master branch or figuring out an alternative to the malicious and now non-existent dependency. --- .../patches/redux-deep-persist+1.0.6.patch | 24 ++++++ frontend/patches/redux-persist+6.0.0.patch | 86 +++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 frontend/patches/redux-deep-persist+1.0.6.patch create mode 100644 frontend/patches/redux-persist+6.0.0.patch diff --git a/frontend/patches/redux-deep-persist+1.0.6.patch b/frontend/patches/redux-deep-persist+1.0.6.patch new file mode 100644 index 0000000000..47a62e6aac --- /dev/null +++ b/frontend/patches/redux-deep-persist+1.0.6.patch @@ -0,0 +1,24 @@ +diff --git a/node_modules/redux-deep-persist/lib/types.d.ts b/node_modules/redux-deep-persist/lib/types.d.ts +index b67b8c2..7fc0fa1 100644 +--- a/node_modules/redux-deep-persist/lib/types.d.ts ++++ b/node_modules/redux-deep-persist/lib/types.d.ts +@@ -35,6 +35,7 @@ export interface PersistConfig { + whitelist?: Array; + transforms?: Array>; + throttle?: number; ++ debounce?: number; + migrate?: PersistMigrate; + stateReconciler?: false | StateReconciler; + getStoredState?: (config: PersistConfig) => Promise; +diff --git a/node_modules/redux-deep-persist/src/types.ts b/node_modules/redux-deep-persist/src/types.ts +index 398ac19..cbc5663 100644 +--- a/node_modules/redux-deep-persist/src/types.ts ++++ b/node_modules/redux-deep-persist/src/types.ts +@@ -91,6 +91,7 @@ export interface PersistConfig { + whitelist?: Array; + transforms?: Array>; + throttle?: number; ++ debounce?: number; + migrate?: PersistMigrate; + stateReconciler?: false | StateReconciler; + /** diff --git a/frontend/patches/redux-persist+6.0.0.patch b/frontend/patches/redux-persist+6.0.0.patch new file mode 100644 index 0000000000..7ae1493d46 --- /dev/null +++ b/frontend/patches/redux-persist+6.0.0.patch @@ -0,0 +1,86 @@ +diff --git a/node_modules/redux-persist/es/createPersistoid.js b/node_modules/redux-persist/es/createPersistoid.js +index 8b43b9a..316d975 100644 +--- a/node_modules/redux-persist/es/createPersistoid.js ++++ b/node_modules/redux-persist/es/createPersistoid.js +@@ -6,6 +6,7 @@ export default function createPersistoid(config) { + var whitelist = config.whitelist || null; + var transforms = config.transforms || []; + var throttle = config.throttle || 0; ++ var debounce = config.debounce || 0; + var storageKey = "".concat(config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX).concat(config.key); + var storage = config.storage; + var serialize; +@@ -28,7 +29,15 @@ export default function createPersistoid(config) { + var timeIterator = null; + var writePromise = null; + +- var update = function update(state) { ++ function debounce(func, timeout){ ++ let timer; ++ return (...args) => { ++ clearTimeout(timer); ++ timer = setTimeout(() => { func.apply(this, args); }, timeout); ++ }; ++ } ++ ++ var update = debounce(function update(state) { + // add any changed keys to the queue + Object.keys(state).forEach(function (key) { + if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop +@@ -52,7 +61,7 @@ export default function createPersistoid(config) { + } + + lastState = state; +- }; ++ }, debounce); + + function processNextKey() { + if (keysToProcess.length === 0) { +diff --git a/node_modules/redux-persist/es/types.js.flow b/node_modules/redux-persist/es/types.js.flow +index c50d3cd..39d8be2 100644 +--- a/node_modules/redux-persist/es/types.js.flow ++++ b/node_modules/redux-persist/es/types.js.flow +@@ -19,6 +19,7 @@ export type PersistConfig = { + whitelist?: Array, + transforms?: Array, + throttle?: number, ++ debounce?: number, + migrate?: (PersistedState, number) => Promise, + stateReconciler?: false | Function, + getStoredState?: PersistConfig => Promise, // used for migrations +diff --git a/node_modules/redux-persist/lib/types.js.flow b/node_modules/redux-persist/lib/types.js.flow +index c50d3cd..39d8be2 100644 +--- a/node_modules/redux-persist/lib/types.js.flow ++++ b/node_modules/redux-persist/lib/types.js.flow +@@ -19,6 +19,7 @@ export type PersistConfig = { + whitelist?: Array, + transforms?: Array, + throttle?: number, ++ debounce?: number, + migrate?: (PersistedState, number) => Promise, + stateReconciler?: false | Function, + getStoredState?: PersistConfig => Promise, // used for migrations +diff --git a/node_modules/redux-persist/src/types.js b/node_modules/redux-persist/src/types.js +index c50d3cd..39d8be2 100644 +--- a/node_modules/redux-persist/src/types.js ++++ b/node_modules/redux-persist/src/types.js +@@ -19,6 +19,7 @@ export type PersistConfig = { + whitelist?: Array, + transforms?: Array, + throttle?: number, ++ debounce?: number, + migrate?: (PersistedState, number) => Promise, + stateReconciler?: false | Function, + getStoredState?: PersistConfig => Promise, // used for migrations +diff --git a/node_modules/redux-persist/types/types.d.ts b/node_modules/redux-persist/types/types.d.ts +index b3733bc..2a1696c 100644 +--- a/node_modules/redux-persist/types/types.d.ts ++++ b/node_modules/redux-persist/types/types.d.ts +@@ -35,6 +35,7 @@ declare module "redux-persist/es/types" { + whitelist?: Array; + transforms?: Array>; + throttle?: number; ++ debounce?: number; + migrate?: PersistMigrate; + stateReconciler?: false | StateReconciler; + /** From e3735ebb45b996efd7cae7b21d2cbd9a8c232c9f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 21:09:48 +1100 Subject: [PATCH 030/220] Adds debouncing --- frontend/src/app/store.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index f2b5b8e636..0057174d6b 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -29,11 +29,11 @@ import { socketioMiddleware } from './socketio/middleware'; */ const genericCanvasBlacklist = [ - 'pastObjects', - 'futureObjects', - 'stageScale', - 'stageDimensions', - 'stageCoordinates', + // 'pastObjects', + // 'futureObjects', + // 'stageScale', + // 'stageDimensions', + // 'stageCoordinates', 'cursorPosition', ]; @@ -86,9 +86,11 @@ const rootPersistConfig = getPersistConfig({ ...systemBlacklist, ...galleryBlacklist, ], - throttle: 500, + debounce: 500, }); +// console.log(rootPersistConfig) + const persistedReducer = persistReducer(rootPersistConfig, rootReducer); // Continue with store setup From bb79c78fe8e030ae36d5c19f162ce92a89ce625d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 21:12:48 +1100 Subject: [PATCH 031/220] Fixes AttributeError: 'dict' object has no attribute 'invert_mask' --- frontend/src/common/util/parameterTranslation.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 5f3c9294dd..2d010b3815 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -138,9 +138,7 @@ export const frontendToBackendParameters = ( generationParameters.init_img = imageToProcessUrl; generationParameters.strength = img2imgStrength; - if (shouldPreserveMaskedArea) { - generationParameters.invert_mask = true; - } + generationParameters.invert_mask = shouldPreserveMaskedArea; if (shouldUseInpaintReplace) { generationParameters.inpaint_replace = inpaintReplace; From 9284983429d7b9e5d2c161918de26d50fc5dde03 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 21:22:32 +1100 Subject: [PATCH 032/220] Updates package.json to use redux-persist patches --- frontend/package.json | 5 +- frontend/yarn.lock | 177 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 178 insertions(+), 4 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 18c2ff4def..0327ed0f99 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -7,7 +7,8 @@ "dev": "vite dev", "build": "tsc && vite build", "build-dev": "tsc && vite build -m development", - "preview": "vite preview" + "preview": "vite preview", + "postinstall": "patch-package" }, "dependencies": { "@chakra-ui/icons": "^2.0.10", @@ -55,6 +56,8 @@ "eslint": "^8.23.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react-hooks": "^4.6.0", + "patch-package": "^6.5.0", + "postinstall-postinstall": "^2.1.0", "sass": "^1.55.0", "tsc-watch": "^5.0.3", "typescript": "^4.6.4", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 1b3e06fea1..bb5bac14de 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1843,6 +1843,11 @@ magic-string "^0.26.7" react-refresh "^0.14.0" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + "@zag-js/element-size@0.1.0": version "0.1.0" resolved "https://registry.yarnpkg.com/@zag-js/element-size/-/element-size-0.1.0.tgz#dfdb3f66a70328d0c3149aae29b8f99c10590c22" @@ -2008,7 +2013,7 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0: +chalk@^4.0.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2031,6 +2036,11 @@ chalk@^4.0.0: optionalDependencies: fsevents "~2.3.2" +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -2106,6 +2116,17 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -2581,6 +2602,13 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -2634,6 +2662,15 @@ from@~0: resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g== +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2731,6 +2768,11 @@ globrex@^0.1.2: resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" @@ -2825,6 +2867,13 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" @@ -2832,6 +2881,11 @@ is-core-module@^2.9.0: dependencies: has "^1.0.3" +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -2854,6 +2908,13 @@ is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2908,6 +2969,20 @@ json5@^2.2.1: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + konva@^8.3.13: version "8.3.13" resolved "https://registry.yarnpkg.com/konva/-/konva-8.3.13.tgz#c1adc986ddf5dde4790c0ed47eef8d40a313232e" @@ -2979,7 +3054,7 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^4.0.4: +micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -3045,6 +3120,11 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + node-cleanup@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" @@ -3072,6 +3152,14 @@ once@^1.3.0: dependencies: wrappy "1" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -3084,6 +3172,11 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -3115,6 +3208,26 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +patch-package@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.5.0.tgz#feb058db56f0005da59cfa316488321de585e88a" + integrity sha512-tC3EqJmo74yKqfsMzELaFwxOAu6FH6t+FzFOsnWAuARm7/n2xB5AOeOueE221eM9gtMuIKMKpF9tBy/X2mNP0Q== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^1.10.2" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -3125,6 +3238,11 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -3181,6 +3299,11 @@ postcss@^8.4.18: picocolors "^1.0.0" source-map-js "^1.0.2" +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -3450,6 +3573,13 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -3487,6 +3617,11 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" +semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -3499,6 +3634,13 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + dependencies: + shebang-regex "^1.0.0" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -3506,11 +3648,21 @@ shebang-command@^2.0.0: dependencies: shebang-regex "^3.0.0" +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -3675,6 +3827,13 @@ tiny-invariant@^1.0.6: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -3756,6 +3915,11 @@ typescript@^4.6.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + update-browserslist-db@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" @@ -3842,6 +4006,13 @@ vite@^3.0.7: optionalDependencies: fsevents "~2.3.2" +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -3874,7 +4045,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0: +yaml@^1.10.0, yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== From d5467e7db520d7c1f3aea49e1477f3106637d62a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 21:47:05 +1100 Subject: [PATCH 033/220] Attempts to fix redux-persist debounce patch --- frontend/patches/redux-persist+6.0.0.patch | 78 ++++++++++++++++------ 1 file changed, 57 insertions(+), 21 deletions(-) diff --git a/frontend/patches/redux-persist+6.0.0.patch b/frontend/patches/redux-persist+6.0.0.patch index 7ae1493d46..f30381ddd4 100644 --- a/frontend/patches/redux-persist+6.0.0.patch +++ b/frontend/patches/redux-persist+6.0.0.patch @@ -1,8 +1,14 @@ diff --git a/node_modules/redux-persist/es/createPersistoid.js b/node_modules/redux-persist/es/createPersistoid.js -index 8b43b9a..316d975 100644 +index 8b43b9a..ffe8d3f 100644 --- a/node_modules/redux-persist/es/createPersistoid.js +++ b/node_modules/redux-persist/es/createPersistoid.js -@@ -6,6 +6,7 @@ export default function createPersistoid(config) { +@@ -1,11 +1,13 @@ + import { KEY_PREFIX, REHYDRATE } from './constants'; + // @TODO remove once flow < 0.63 support is no longer required. + export default function createPersistoid(config) { ++ console.log(config) + // defaults + var blacklist = config.blacklist || null; var whitelist = config.whitelist || null; var transforms = config.transforms || []; var throttle = config.throttle || 0; @@ -10,32 +16,62 @@ index 8b43b9a..316d975 100644 var storageKey = "".concat(config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX).concat(config.key); var storage = config.storage; var serialize; -@@ -28,7 +29,15 @@ export default function createPersistoid(config) { +@@ -28,30 +30,37 @@ export default function createPersistoid(config) { var timeIterator = null; var writePromise = null; - var update = function update(state) { -+ function debounce(func, timeout){ -+ let timer; -+ return (...args) => { -+ clearTimeout(timer); -+ timer = setTimeout(() => { func.apply(this, args); }, timeout); -+ }; -+ } -+ -+ var update = debounce(function update(state) { - // add any changed keys to the queue - Object.keys(state).forEach(function (key) { - if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop -@@ -52,7 +61,7 @@ export default function createPersistoid(config) { - } +- // add any changed keys to the queue +- Object.keys(state).forEach(function (key) { +- if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop ++ // Timer for debounced `update()` ++ let timer = 0; - lastState = state; -- }; -+ }, debounce); +- if (lastState[key] === state[key]) return; // value unchanged? noop ++ function update(state) { ++ // Debounce the update ++ clearTimeout(timer); ++ timer = setTimeout(() => { ++ // add any changed keys to the queue ++ Object.keys(state).forEach(function (key) { ++ if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop + +- if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop ++ if (lastState[key] === state[key]) return; // value unchanged? noop + +- keysToProcess.push(key); // add key to queue +- }); //if any key is missing in the new state which was present in the lastState, +- //add it for processing too ++ if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop + +- Object.keys(lastState).forEach(function (key) { +- if (state[key] === undefined && passWhitelistBlacklist(key) && keysToProcess.indexOf(key) === -1 && lastState[key] !== undefined) { +- keysToProcess.push(key); +- } +- }); // start the time iterator if not running (read: throttle) ++ keysToProcess.push(key); // add key to queue ++ }); //if any key is missing in the new state which was present in the lastState, ++ //add it for processing too + +- if (timeIterator === null) { +- timeIterator = setInterval(processNextKey, throttle); +- } ++ Object.keys(lastState).forEach(function (key) { ++ if (state[key] === undefined && passWhitelistBlacklist(key) && keysToProcess.indexOf(key) === -1 && lastState[key] !== undefined) { ++ keysToProcess.push(key); ++ } ++ }); // start the time iterator if not running (read: throttle) ++ ++ if (timeIterator === null) { ++ timeIterator = setInterval(processNextKey, throttle); ++ } + +- lastState = state; ++ lastState = state; ++ }, debounce) + }; function processNextKey() { - if (keysToProcess.length === 0) { diff --git a/node_modules/redux-persist/es/types.js.flow b/node_modules/redux-persist/es/types.js.flow index c50d3cd..39d8be2 100644 --- a/node_modules/redux-persist/es/types.js.flow From 3f1360368d01b1a5fe47ba8c5713d901abc0c2e3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 22:02:47 +1100 Subject: [PATCH 034/220] Fixes undo/redo --- .../canvas/IAICanvasControls/IAICanvasRedoButton.tsx | 6 +++--- .../canvas/IAICanvasControls/IAICanvasUndoButton.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx index 190ebebbb7..212e9fd87f 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx @@ -35,12 +35,12 @@ export default function IAICanvasRedoButton() { useHotkeys( ['meta+shift+z', 'control+shift+z', 'control+y', 'meta+y'], - (e: KeyboardEvent) => { - e.preventDefault(); + () => { handleRedo(); }, { - enabled: canRedo, + enabled: () => canRedo, + preventDefault: true, }, [activeTabName, canRedo] ); diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx index 54be780dd5..64a60edd02 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx @@ -36,12 +36,12 @@ export default function IAICanvasUndoButton() { useHotkeys( ['meta+z', 'control+z'], - (e: KeyboardEvent) => { - e.preventDefault(); + () => { handleUndo(); }, { - enabled: canUndo, + enabled: () => canUndo, + preventDefault: true, }, [activeTabName, canUndo] ); From 317762861f98abea9d9959cb5355974d6a8bb456 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 23:56:01 +1100 Subject: [PATCH 035/220] Fixes invert mask --- backend/invoke_ai_web_server.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 5b15ffc12b..36494f720c 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -723,9 +723,6 @@ class InvokeAIWebServer: generation_parameters["init_mask"] ).convert("L") - if generation_parameters.invert_mask: - mask_image = ImageOps.invert(mask_image) - """ Apply the mask to the init image, creating a "mask" image with transparency where inpainting should occur. This is the kind of From f82e82f1bb34c989731737e22d60ab6b65c8564e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 23:57:53 +1100 Subject: [PATCH 036/220] Debounce > 300ms --- frontend/src/app/store.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 0057174d6b..39ee82e93e 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -28,14 +28,7 @@ import { socketioMiddleware } from './socketio/middleware'; * The necesssary nested persistors with blacklists are configured below. */ -const genericCanvasBlacklist = [ - // 'pastObjects', - // 'futureObjects', - // 'stageScale', - // 'stageDimensions', - // 'stageCoordinates', - 'cursorPosition', -]; +const genericCanvasBlacklist = ['cursorPosition']; const inpaintingCanvasBlacklist = genericCanvasBlacklist.map( (blacklistItem) => `canvas.inpainting.${blacklistItem}` @@ -86,7 +79,7 @@ const rootPersistConfig = getPersistConfig({ ...systemBlacklist, ...galleryBlacklist, ], - debounce: 500, + debounce: 300, }); // console.log(rootPersistConfig) From 88d02585e717cfd7891e94dec0703021bfab01cc Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 23:58:08 +1100 Subject: [PATCH 037/220] Limits history to 256 for each of undo and redo --- frontend/src/features/canvas/canvasSlice.ts | 57 +++++++++++++++------ 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index 3acfdcd126..529cb605b3 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -46,6 +46,7 @@ export interface GenericCanvasState { isMoveStageKeyHeld: boolean; intermediateImage?: InvokeAI.Image; shouldShowIntermediates: boolean; + maxHistory: number; } export type CanvasLayer = 'base' | 'mask'; @@ -163,6 +164,7 @@ const initialGenericCanvasState: GenericCanvasState = { isMoveStageKeyHeld: false, shouldShowIntermediates: true, isMovingStage: false, + maxHistory: 256, }; const initialCanvasState: CanvasState = { @@ -530,14 +532,21 @@ export const canvasSlice = createSlice({ }> ) => { const { boundingBox, image } = action.payload; + if (!boundingBox || !image) return; const { x, y } = boundingBox; + const currentCanvas = state.outpainting; - state.outpainting.pastObjects.push([...state.outpainting.objects]); - state.outpainting.futureObjects = []; + currentCanvas.pastObjects.push([...currentCanvas.objects]); - state.outpainting.objects.push({ + if (currentCanvas.pastObjects.length > currentCanvas.maxHistory) { + currentCanvas.pastObjects.shift(); + } + + currentCanvas.futureObjects = []; + + currentCanvas.objects.push({ kind: 'image', layer: 'base', x, @@ -560,6 +569,10 @@ export const canvasSlice = createSlice({ currentCanvas.pastObjects.push(currentCanvas.objects); + if (currentCanvas.pastObjects.length > currentCanvas.maxHistory) { + currentCanvas.pastObjects.shift(); + } + currentCanvas.objects.push({ kind: 'line', layer, @@ -580,23 +593,37 @@ export const canvasSlice = createSlice({ lastLine.points.push(...action.payload); }, undo: (state) => { - if (state[state.currentCanvas].objects.length === 0) return; + const currentCanvas = state[state.currentCanvas]; + if (currentCanvas.objects.length === 0) return; + + const newObjects = currentCanvas.pastObjects.pop(); - const newObjects = state[state.currentCanvas].pastObjects.pop(); if (!newObjects) return; - state[state.currentCanvas].futureObjects.unshift( - state[state.currentCanvas].objects - ); - state[state.currentCanvas].objects = newObjects; + + currentCanvas.futureObjects.unshift(currentCanvas.objects); + + if (currentCanvas.futureObjects.length > currentCanvas.maxHistory) { + currentCanvas.futureObjects.pop(); + } + + currentCanvas.objects = newObjects; }, redo: (state) => { - if (state[state.currentCanvas].futureObjects.length === 0) return; - const newObjects = state[state.currentCanvas].futureObjects.shift(); + const currentCanvas = state[state.currentCanvas]; + + if (currentCanvas.futureObjects.length === 0) return; + + const newObjects = currentCanvas.futureObjects.shift(); + if (!newObjects) return; - state[state.currentCanvas].pastObjects.push( - state[state.currentCanvas].objects - ); - state[state.currentCanvas].objects = newObjects; + + currentCanvas.pastObjects.push(currentCanvas.objects); + + if (currentCanvas.pastObjects.length > currentCanvas.maxHistory) { + currentCanvas.pastObjects.shift(); + } + + currentCanvas.objects = newObjects; }, setShouldShowGrid: (state, action: PayloadAction) => { state.outpainting.shouldShowGrid = action.payload; From 78314683046c2c337c3b4d8b41f2e9f7f02192b0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 23:59:05 +1100 Subject: [PATCH 038/220] Canvas styling --- frontend/src/features/canvas/IAICanvas.tsx | 25 +++++- ...ntingWorkarea.scss => CanvasWorkarea.scss} | 8 +- .../tabs/Inpainting/InpaintingWorkarea.scss | 84 ------------------- frontend/src/styles/index.scss | 3 +- 4 files changed, 30 insertions(+), 90 deletions(-) rename frontend/src/features/tabs/{Outpainting/OutpaintingWorkarea.scss => CanvasWorkarea.scss} (91%) delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 53712b7306..14c9115332 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -33,6 +33,8 @@ import IAICanvasObjectRenderer from './IAICanvasObjectRenderer'; import IAICanvasGrid from './IAICanvasGrid'; import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; import IAICanvasStatusText from './IAICanvasStatusText'; +import { Box, Button } from '@chakra-ui/react'; +import { rgbaColorToRgbString, rgbaColorToString } from './util/colorToString'; const canvasSelector = createSelector( [ @@ -52,7 +54,11 @@ const canvasSelector = createSelector( stageDimensions, stageCoordinates, tool, + layer, + boundingBoxCoordinates, + boundingBoxDimensions, isMovingStage, + maskColor, } = currentCanvas; const { shouldShowGrid } = outpaintingCanvas; @@ -85,6 +91,10 @@ const canvasSelector = createSelector( stageDimensions, stageScale, tool, + layer, + boundingBoxCoordinates, + boundingBoxDimensions, + maskColorString: rgbaColorToString({ ...maskColor, a: 0.5 }), outpaintingOnly: activeTabName === 'outpainting', }; }, @@ -110,7 +120,11 @@ const IAICanvas = () => { stageDimensions, stageScale, tool, + layer, outpaintingOnly, + boundingBoxCoordinates, + boundingBoxDimensions, + maskColorString, } = useAppSelector(canvasSelector); useCanvasHotkeys(); @@ -137,6 +151,9 @@ const IAICanvas = () => { const { handleDragStart, handleDragMove, handleDragEnd } = useCanvasDragMove(); + const panelTop = boundingBoxCoordinates.y + boundingBoxDimensions.height; + const panelLeft = boundingBoxCoordinates.x + boundingBoxDimensions.width; + return (
@@ -146,8 +163,14 @@ const IAICanvas = () => { style={{ outline: 'none', ...(stageCursor ? { cursor: stageCursor } : {}), + border: `1px solid var(--border-color-light)`, + borderRadius: '0.5rem', + boxShadow: `inset 0 0 20px ${layer === 'mask' ? '1px' : '1px'} ${ + layer === 'mask' + ? 'var(--accent-color)' + : 'var(--border-color-light)' + }`, }} - className="inpainting-canvas-stage checkerboard" x={stageCoordinates.x} y={stageCoordinates.y} width={stageDimensions.width} diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss b/frontend/src/features/tabs/CanvasWorkarea.scss similarity index 91% rename from frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss rename to frontend/src/features/tabs/CanvasWorkarea.scss index 426db917d0..d3921b7a5f 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.scss +++ b/frontend/src/features/tabs/CanvasWorkarea.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../styles/Mixins/' as *; .inpainting-main-area { display: flex; @@ -30,7 +30,7 @@ } .inpainting-color-picker { - margin-left: 1rem !important; + margin-left: 1rem; } .inpainting-brush-options { @@ -69,7 +69,9 @@ } .inpainting-canvas-stage { - border-radius: 0.5rem; + // border-radius: 0.5rem; + // border: 1px solid var(--border-color-light); + canvas { border-radius: 0.5rem; } diff --git a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss deleted file mode 100644 index dfc8c4244f..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.scss +++ /dev/null @@ -1,84 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.inpainting-main-area { - display: flex; - flex-direction: column; - align-items: center; - row-gap: 1rem; - width: 100%; - height: 100%; - - .inpainting-settings { - display: flex; - align-items: center; - column-gap: 0.5rem; - - svg { - transform: scale(0.9); - } - - .inpainting-buttons-group { - display: flex; - align-items: center; - column-gap: 0.5rem; - } - - .inpainting-button-dropdown { - display: flex; - flex-direction: column; - row-gap: 0.5rem; - } - - .inpainting-color-picker { - margin-left: 1rem; - } - - .inpainting-brush-options { - display: flex; - align-items: center; - column-gap: 1rem; - } - } - - .inpainting-canvas-area { - display: flex; - flex-direction: column; - align-items: center; - row-gap: 1rem; - width: 100%; - height: 100%; - } - - .inpainting-canvas-spiner { - display: flex; - align-items: center; - width: 100%; - height: 100%; - } - - .inpainting-canvas-container { - display: flex; - align-items: center; - justify-content: center; - height: 100%; - width: 100%; - border-radius: 0.5rem; - - .inpainting-canvas-wrapper { - position: relative; - } - - .inpainting-canvas-stage { - border-radius: 0.5rem; - border: 1px solid var(--border-color-light); - - canvas { - border-radius: 0.5rem; - } - } - } -} - -.inpainting-options-btn { - min-height: 2rem; -} diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index eacc765901..f6dda5a8a9 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -46,8 +46,7 @@ @use '../features/tabs/TextToImage/TextToImage.scss'; @use '../features/tabs/ImageToImage/ImageToImage.scss'; @use '../features/tabs/FloatingButton.scss'; -@use '../features/tabs/Inpainting/InpaintingWorkarea.scss'; -@use '../features/tabs/Outpainting/OutpaintingWorkarea.scss'; +@use '../features/tabs/CanvasWorkarea.scss'; // Component Shared @use '../common/components/IAINumberInput.scss'; From 0a2e67df1ab4935d49b41ac254690ec89f0a2f53 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 23:59:17 +1100 Subject: [PATCH 039/220] Hotkeys improvement --- .../src/features/canvas/hooks/useCanvasHotkeys.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index e607e34bbd..9ccef4731d 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -48,24 +48,22 @@ const useInpaintingCanvasHotkeys = () => { // Toggle lock bounding box useHotkeys( 'shift+w', - (e: KeyboardEvent) => { - e.preventDefault(); + () => { dispatch(toggleShouldLockBoundingBox()); }, { - scopes: ['inpainting', 'outpainting'], + preventDefault: true, }, [activeTabName] ); useHotkeys( 'shift+h', - (e: KeyboardEvent) => { - e.preventDefault(); + () => { dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); }, { - scopes: ['inpainting', 'outpainting'], + preventDefault: true, }, [activeTabName, shouldShowBoundingBox] ); @@ -94,7 +92,7 @@ const useInpaintingCanvasHotkeys = () => { { keyup: true, keydown: true, - scopes: ['inpainting', 'outpainting'], + preventDefault: true, }, [tool, previousToolRef] ); From 00e2674076e2bde4133a10162310f26a1b95533a Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 13 Nov 2022 09:24:48 +1300 Subject: [PATCH 040/220] Add Metadata To Viewer --- frontend/src/features/lightbox/Lightbox.scss | 5 +++++ frontend/src/features/lightbox/Lightbox.tsx | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/src/features/lightbox/Lightbox.scss b/frontend/src/features/lightbox/Lightbox.scss index 74c4fb4fc5..e8e5ff6ee5 100644 --- a/frontend/src/features/lightbox/Lightbox.scss +++ b/frontend/src/features/lightbox/Lightbox.scss @@ -24,6 +24,11 @@ position: absolute; top: 1rem; } + + .image-metadata-viewer { + left: 0; + max-height: 100%; + } } .lightbox-close-btn { diff --git a/frontend/src/features/lightbox/Lightbox.tsx b/frontend/src/features/lightbox/Lightbox.tsx index 1b87bfd80a..be44c3a1fa 100644 --- a/frontend/src/features/lightbox/Lightbox.tsx +++ b/frontend/src/features/lightbox/Lightbox.tsx @@ -8,6 +8,7 @@ import { selectPrevImage, } from 'features/gallery/gallerySlice'; import ImageGallery from 'features/gallery/ImageGallery'; +import ImageMetadataViewer from 'features/gallery/ImageMetaDataViewer/ImageMetadataViewer'; import { setIsLightBoxOpen } from 'features/options/optionsSlice'; import React, { useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; @@ -103,10 +104,15 @@ export default function Lightbox() {
)} {viewerImageToDisplay && ( - + <> + + {shouldShowImageDetails && ( + + )} + )}
From 4e3419447940fc57267fe3b082b1fec1796458c3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 13 Nov 2022 08:20:12 +1100 Subject: [PATCH 041/220] Increases CFG Scale max to 200 --- frontend/src/features/options/MainOptions/MainCFGScale.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/options/MainOptions/MainCFGScale.tsx b/frontend/src/features/options/MainOptions/MainCFGScale.tsx index 3a4b753b91..0a66842d7b 100644 --- a/frontend/src/features/options/MainOptions/MainCFGScale.tsx +++ b/frontend/src/features/options/MainOptions/MainCFGScale.tsx @@ -15,7 +15,7 @@ export default function MainCFGScale() { label="CFG Scale" step={0.5} min={1.01} - max={30} + max={200} onChange={handleChangeCfgScale} value={cfgScale} width={inputWidth} From c223d93b4d7b421a37a973c108c46056e4d04749 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 13 Nov 2022 10:51:45 +1300 Subject: [PATCH 042/220] Fix gallery width size for Outpainting Also fixes the canvas resizing failing n fast pushes --- frontend/src/features/gallery/ImageGallery.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index 1b60c9c44e..321f62325d 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -76,7 +76,7 @@ export default function ImageGallery() { return; } - if (activeTabName === 'inpainting') { + if (activeTabName === 'inpainting' || activeTabName === 'outpainting') { dispatch(setGalleryWidth(190)); setGalleryMinWidth(190); setGalleryMaxWidth(190); @@ -91,7 +91,7 @@ export default function ImageGallery() { ); setGalleryMaxWidth(590); } - dispatch(setDoesCanvasNeedScaling(true)); + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, [dispatch, activeTabName, shouldPinGallery, galleryWidth, isLightBoxOpen]); useEffect(() => { From 73099af6eccd5049c851d0d97998a8960372f805 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 13 Nov 2022 22:42:07 +1100 Subject: [PATCH 043/220] Fixes disappearing canvas grid lines --- .../src/features/canvas/IAICanvasGrid.tsx | 175 +++++++++++------- 1 file changed, 103 insertions(+), 72 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasGrid.tsx b/frontend/src/features/canvas/IAICanvasGrid.tsx index 495f22ba5b..c7d36bb04f 100644 --- a/frontend/src/features/canvas/IAICanvasGrid.tsx +++ b/frontend/src/features/canvas/IAICanvasGrid.tsx @@ -1,88 +1,119 @@ // Grid drawing adapted from https://longviewcoder.com/2021/12/08/konva-a-better-grid/ import { useColorMode } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppSelector } from 'app/store'; import _ from 'lodash'; +import { + ReactNode, + useCallback, + useEffect, + useLayoutEffect, + useState, +} from 'react'; import { Group, Line as KonvaLine } from 'react-konva'; +import { currentCanvasSelector } from './canvasSlice'; import useUnscaleCanvasValue from './hooks/useUnscaleCanvasValue'; import { stageRef } from './IAICanvas'; +const selector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { stageScale, stageCoordinates, stageDimensions } = currentCanvas; + return { stageScale, stageCoordinates, stageDimensions }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + const IAICanvasGrid = () => { const { colorMode } = useColorMode(); - const unscale = useUnscaleCanvasValue(); + // const unscale = useUnscaleCanvasValue(); + const { stageScale, stageCoordinates, stageDimensions } = + useAppSelector(selector); + const [gridLines, setGridLines] = useState([]); - if (!stageRef.current) return null; - const gridLineColor = - colorMode === 'light' ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)'; - - const stage = stageRef.current; - const width = stage.width(); - const height = stage.height(); - const x = stage.x(); - const y = stage.y(); - - const stageRect = { - x1: 0, - y1: 0, - x2: width, - y2: height, - offset: { - x: unscale(x), - y: unscale(y), + const unscale = useCallback( + (value: number) => { + return value / stageScale; }, - }; - - const gridOffset = { - x: Math.ceil(unscale(x) / 64) * 64, - y: Math.ceil(unscale(y) / 64) * 64, - }; - - const gridRect = { - x1: -gridOffset.x, - y1: -gridOffset.y, - x2: unscale(width) - gridOffset.x + 64, - y2: unscale(height) - gridOffset.y + 64, - }; - - const gridFullRect = { - x1: Math.min(stageRect.x1, gridRect.x1), - y1: Math.min(stageRect.y1, gridRect.y1), - x2: Math.max(stageRect.x2, gridRect.x2), - y2: Math.max(stageRect.y2, gridRect.y2), - }; - - const fullRect = gridFullRect; - - const // find the x & y size of the grid - xSize = fullRect.x2 - fullRect.x1, - ySize = fullRect.y2 - fullRect.y1, - // compute the number of steps required on each axis. - xSteps = Math.round(xSize / 64) + 1, - ySteps = Math.round(ySize / 64) + 1; - - return ( - - {_.range(0, xSteps).map((i) => ( - - ))} - {_.range(0, ySteps).map((i) => ( - - ))} - + [stageScale] ); + + useLayoutEffect(() => { + const gridLineColor = + colorMode === 'light' ? 'rgba(136, 136, 136, 1)' : 'rgba(84, 84, 84, 1)'; + + const { width, height } = stageDimensions; + const { x, y } = stageCoordinates; + + const stageRect = { + x1: 0, + y1: 0, + x2: width, + y2: height, + offset: { + x: unscale(x), + y: unscale(y), + }, + }; + + const gridOffset = { + x: Math.ceil(unscale(x) / 64) * 64, + y: Math.ceil(unscale(y) / 64) * 64, + }; + + const gridRect = { + x1: -gridOffset.x, + y1: -gridOffset.y, + x2: unscale(width) - gridOffset.x + 64, + y2: unscale(height) - gridOffset.y + 64, + }; + + const gridFullRect = { + x1: Math.min(stageRect.x1, gridRect.x1), + y1: Math.min(stageRect.y1, gridRect.y1), + x2: Math.max(stageRect.x2, gridRect.x2), + y2: Math.max(stageRect.y2, gridRect.y2), + }; + + const fullRect = gridFullRect; + + const // find the x & y size of the grid + xSize = fullRect.x2 - fullRect.x1, + ySize = fullRect.y2 - fullRect.y1, + // compute the number of steps required on each axis. + xSteps = Math.round(xSize / 64) + 1, + ySteps = Math.round(ySize / 64) + 1; + + const xLines = _.range(0, xSteps).map((i) => ( + + )); + const yLines = _.range(0, ySteps).map((i) => ( + + )); + + setGridLines(xLines.concat(yLines)); + }, [stageScale, stageCoordinates, stageDimensions, colorMode, unscale]); + + return {gridLines}; }; export default IAICanvasGrid; From 179656d541eaf2788de9c7fff19f395c8a6dc5aa Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 13 Nov 2022 22:43:45 +1100 Subject: [PATCH 044/220] Adds staging area --- frontend/package.json | 1 + frontend/src/app/socketio/listeners.ts | 4 +- frontend/src/app/store.ts | 12 + .../src/common/util/parameterTranslation.ts | 2 +- frontend/src/features/canvas/IAICanvas.tsx | 83 ++-- .../canvas/IAICanvasBrushButtonPopover.tsx | 36 +- .../IAICanvasMaskClear.tsx | 7 +- .../IAICanvasControls/IAICanvasRedoButton.tsx | 6 +- .../IAICanvasControls/IAICanvasUndoButton.tsx | 6 +- .../canvas/IAICanvasEraserButtonPopover.tsx | 17 +- .../canvas/IAICanvasMaskCompositer.tsx | 12 +- .../features/canvas/IAICanvasMaskLines.tsx | 11 +- .../canvas/IAICanvasObjectRenderer.tsx | 9 +- .../canvas/IAICanvasOutpaintingControls.tsx | 10 +- .../features/canvas/IAICanvasStagingArea.tsx | 164 ++++++++ frontend/src/features/canvas/canvasSlice.ts | 381 +++++++++++++----- .../canvas/hooks/useCanvasDragMove.ts | 23 +- .../canvas/hooks/useCanvasMouseDown.ts | 13 +- .../canvas/hooks/useCanvasMouseEnter.ts | 18 +- .../canvas/hooks/useCanvasMouseMove.ts | 13 +- .../features/canvas/hooks/useCanvasMouseUp.ts | 14 +- .../Inpainting/ClearBrushHistory.tsx | 4 +- .../src/features/tabs/CanvasWorkarea.scss | 7 +- .../tabs/Outpainting/OutpaintingDisplay.tsx | 4 +- frontend/src/main.tsx | 2 +- frontend/yarn.lock | 12 +- 26 files changed, 631 insertions(+), 240 deletions(-) create mode 100644 frontend/src/features/canvas/IAICanvasStagingArea.tsx diff --git a/frontend/package.json b/frontend/package.json index 0327ed0f99..5b4ca2c587 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -35,6 +35,7 @@ "react-icons": "^4.4.0", "react-image-pan-zoom-rotate": "^1.6.0", "react-konva": "^18.2.3", + "react-konva-utils": "^0.3.0", "react-redux": "^8.0.2", "react-transition-group": "^4.4.5", "redux-deep-persist": "^1.0.6", diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index fc1472ec5b..3d7e6fb86e 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -38,7 +38,7 @@ import { requestSystemConfig, } from './actions'; import { - addImageToOutpaintingSesion, + addImageToOutpainting, setImageToInpaint, } from 'features/canvas/canvasSlice'; import { tabMap } from 'features/tabs/InvokeTabs'; @@ -119,7 +119,7 @@ const makeSocketIOListeners = ( if (data.generationMode === 'outpainting' && data.boundingBox) { const { boundingBox } = data; dispatch( - addImageToOutpaintingSesion({ + addImageToOutpainting({ image: newImage, boundingBox, }) diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 39ee82e93e..6b20d53982 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -94,6 +94,18 @@ export const store = configureStore({ immutableCheck: false, serializableCheck: false, }).concat(socketioMiddleware()), + devTools: { + actionsDenylist: [ + // 'canvas/setCursorPosition', + // 'canvas/setStageCoordinates', + // 'canvas/setStageScale', + // 'canvas/setIsDrawing', + // 'canvas/setBoundingBoxCoordinates', + // 'canvas/setBoundingBoxDimensions', + // 'canvas/setIsDrawing', + // 'canvas/addPointToCurrentLine', + ], + }, }); export type AppGetState = typeof store.getState; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 2d010b3815..c47b8e3c56 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -111,7 +111,7 @@ export const frontendToBackendParameters = ( canvasImageLayerRef.current ) { const { - objects, + layerState: { objects }, boundingBoxCoordinates, boundingBoxDimensions, inpaintReplace, diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 14c9115332..a7bca897c7 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -9,6 +9,7 @@ import { useAppSelector } from 'app/store'; import { baseCanvasImageSelector, currentCanvasSelector, + isStagingSelector, outpaintingCanvasSelector, } from 'features/canvas/canvasSlice'; @@ -33,17 +34,16 @@ import IAICanvasObjectRenderer from './IAICanvasObjectRenderer'; import IAICanvasGrid from './IAICanvasGrid'; import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; import IAICanvasStatusText from './IAICanvasStatusText'; -import { Box, Button } from '@chakra-ui/react'; -import { rgbaColorToRgbString, rgbaColorToString } from './util/colorToString'; +import IAICanvasStagingArea from './IAICanvasStagingArea'; const canvasSelector = createSelector( [ currentCanvasSelector, outpaintingCanvasSelector, - baseCanvasImageSelector, + isStagingSelector, activeTabNameSelector, ], - (currentCanvas, outpaintingCanvas, baseCanvasImage, activeTabName) => { + (currentCanvas, outpaintingCanvas, isStaging, activeTabName) => { const { isMaskEnabled, stageScale, @@ -54,29 +54,23 @@ const canvasSelector = createSelector( stageDimensions, stageCoordinates, tool, - layer, - boundingBoxCoordinates, - boundingBoxDimensions, isMovingStage, - maskColor, } = currentCanvas; const { shouldShowGrid } = outpaintingCanvas; let stageCursor: string | undefined = ''; - if (tool === 'move') { - if (isTransformingBoundingBox) { - stageCursor = undefined; - } else if (isMouseOverBoundingBox) { - stageCursor = 'move'; - } else if (activeTabName === 'outpainting') { - if (isMovingStage) { - stageCursor = 'grabbing'; - } else { - stageCursor = 'grab'; - } + if (tool === 'move' || isStaging) { + if (isMovingStage) { + stageCursor = 'grabbing'; + } else { + stageCursor = 'grab'; } + } else if (isTransformingBoundingBox) { + stageCursor = undefined; + } else if (isMouseOverBoundingBox) { + stageCursor = 'move'; } else { stageCursor = 'none'; } @@ -91,11 +85,8 @@ const canvasSelector = createSelector( stageDimensions, stageScale, tool, - layer, - boundingBoxCoordinates, - boundingBoxDimensions, - maskColorString: rgbaColorToString({ ...maskColor, a: 0.5 }), - outpaintingOnly: activeTabName === 'outpainting', + isOnOutpaintingTab: activeTabName === 'outpainting', + isStaging, }; }, { @@ -120,11 +111,8 @@ const IAICanvas = () => { stageDimensions, stageScale, tool, - layer, - outpaintingOnly, - boundingBoxCoordinates, - boundingBoxDimensions, - maskColorString, + isOnOutpaintingTab, + isStaging, } = useAppSelector(canvasSelector); useCanvasHotkeys(); @@ -151,25 +139,15 @@ const IAICanvas = () => { const { handleDragStart, handleDragMove, handleDragEnd } = useCanvasDragMove(); - const panelTop = boundingBoxCoordinates.y + boundingBoxDimensions.height; - const panelLeft = boundingBoxCoordinates.x + boundingBoxDimensions.width; - return (
{ onDragMove={handleDragMove} onDragEnd={handleDragEnd} onWheel={handleWheel} - listening={tool === 'move' && !isModifyingBoundingBox} + listening={(tool === 'move' || isStaging) && !isModifyingBoundingBox} draggable={ - tool === 'move' && !isModifyingBoundingBox && outpaintingOnly + (tool === 'move' || isStaging) && + !isModifyingBoundingBox && + isOnOutpaintingTab } > @@ -209,14 +189,21 @@ const IAICanvas = () => { - - + {!isStaging && ( + <> + + + + )} + + + {isStaging && } - {outpaintingOnly && } + {isOnOutpaintingTab && }
); diff --git a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx index 860390460a..bbffd98c49 100644 --- a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx @@ -1,13 +1,12 @@ import { createSelector } from '@reduxjs/toolkit'; import { currentCanvasSelector, - outpaintingCanvasSelector, + isStagingSelector, setBrushColor, setBrushSize, setTool, } from './canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; import { FaPaintBrush } from 'react-icons/fa'; @@ -17,35 +16,15 @@ import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; export const selector = createSelector( - [currentCanvasSelector, outpaintingCanvasSelector, activeTabNameSelector], - (currentCanvas, outpaintingCanvas, activeTabName) => { - const { - layer, - maskColor, - brushColor, - brushSize, - eraserSize, - tool, - shouldDarkenOutsideBoundingBox, - shouldShowIntermediates, - } = currentCanvas; - - const { shouldShowGrid, shouldSnapToGrid, shouldAutoSave } = - outpaintingCanvas; + [currentCanvasSelector, isStagingSelector], + (currentCanvas, isStaging) => { + const { brushColor, brushSize, tool } = currentCanvas; return { - layer, tool, - maskColor, brushColor, brushSize, - eraserSize, - activeTabName, - shouldShowGrid, - shouldSnapToGrid, - shouldAutoSave, - shouldDarkenOutsideBoundingBox, - shouldShowIntermediates, + isStaging, }; }, { @@ -57,7 +36,7 @@ export const selector = createSelector( const IAICanvasBrushButtonPopover = () => { const dispatch = useAppDispatch(); - const { tool, brushColor, brushSize } = useAppSelector(selector); + const { tool, brushColor, brushSize, isStaging } = useAppSelector(selector); return ( { aria-label="Brush (B)" tooltip="Brush (B)" icon={} - data-selected={tool === 'brush'} + data-selected={tool === 'brush' && !isStaging} onClick={() => dispatch(setTool('brush'))} + isDisabled={isStaging} /> } > diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx index 6c0b7c0410..325455b74c 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx @@ -18,9 +18,10 @@ import { useToast } from '@chakra-ui/react'; const canvasMaskClearSelector = createSelector( [currentCanvasSelector, activeTabNameSelector], (currentCanvas, activeTabName) => { - const { isMaskEnabled, objects } = currentCanvas as - | InpaintingCanvasState - | OutpaintingCanvasState; + const { + isMaskEnabled, + layerState: { objects }, + } = currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; return { isMaskEnabled, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx index 212e9fd87f..67ba63301a 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx @@ -11,10 +11,10 @@ import _ from 'lodash'; const canvasRedoSelector = createSelector( [currentCanvasSelector, activeTabNameSelector], (currentCanvas, activeTabName) => { - const { futureObjects } = currentCanvas; + const { futureLayerStates } = currentCanvas; return { - canRedo: futureObjects.length > 0, + canRedo: futureLayerStates.length > 0, activeTabName, }; }, @@ -34,7 +34,7 @@ export default function IAICanvasRedoButton() { }; useHotkeys( - ['meta+shift+z', 'control+shift+z', 'control+y', 'meta+y'], + ['meta+shift+z', 'ctrl+shift+z', 'control+y', 'meta+y'], () => { handleRedo(); }, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx index 64a60edd02..0582d32637 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx @@ -11,10 +11,10 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; const canvasUndoSelector = createSelector( [currentCanvasSelector, activeTabNameSelector], (canvas, activeTabName) => { - const { pastObjects } = canvas; + const { pastLayerStates } = canvas; return { - canUndo: pastObjects.length > 0, + canUndo: pastLayerStates.length > 0, activeTabName, }; }, @@ -35,7 +35,7 @@ export default function IAICanvasUndoButton() { }; useHotkeys( - ['meta+z', 'control+z'], + ['meta+z', 'ctrl+z'], () => { handleUndo(); }, diff --git a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx index ae5ee21125..b36c757b82 100644 --- a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx @@ -1,5 +1,10 @@ import { createSelector } from '@reduxjs/toolkit'; -import { currentCanvasSelector, setEraserSize, setTool } from './canvasSlice'; +import { + currentCanvasSelector, + isStagingSelector, + setEraserSize, + setTool, +} from './canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -10,13 +15,14 @@ import { Flex } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; export const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { + [currentCanvasSelector, isStagingSelector], + (currentCanvas, isStaging) => { const { eraserSize, tool } = currentCanvas; return { tool, eraserSize, + isStaging, }; }, { @@ -27,7 +33,7 @@ export const selector = createSelector( ); const IAICanvasEraserButtonPopover = () => { const dispatch = useAppDispatch(); - const { tool, eraserSize } = useAppSelector(selector); + const { tool, eraserSize, isStaging } = useAppSelector(selector); const handleSelectEraserTool = () => dispatch(setTool('eraser')); @@ -51,7 +57,8 @@ const IAICanvasEraserButtonPopover = () => { aria-label="Eraser (E)" tooltip="Eraser (E)" icon={} - data-selected={tool === 'eraser'} + data-selected={tool === 'eraser' && !isStaging} + isDisabled={isStaging} onClick={() => dispatch(setTool('eraser'))} /> } diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 93c91ec619..798b6e85b1 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -148,7 +148,17 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { return () => clearInterval(timer); }, []); - if (!fillPatternImage) return null; + if ( + !( + fillPatternImage && + stageCoordinates.x && + stageCoordinates.y && + stageScale && + stageDimensions.width && + stageDimensions.height + ) + ) + return null; return ( { - const { objects } = currentCanvas as - | InpaintingCanvasState - | OutpaintingCanvasState; - return { - objects, - }; + (currentCanvas) => { + return currentCanvas.layerState.objects; }, { memoizeOptions: { @@ -37,7 +32,7 @@ type InpaintingCanvasLinesProps = GroupConfig; */ const IAICanvasLines = (props: InpaintingCanvasLinesProps) => { const { ...rest } = props; - const { objects } = useAppSelector(canvasLinesSelector); + const objects = useAppSelector(canvasLinesSelector); return ( diff --git a/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx b/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx index a776ff69ee..9187b1f5ec 100644 --- a/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx +++ b/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx @@ -1,4 +1,4 @@ -import { createSelector } from '@reduxjs/toolkit'; +import { createSelector, current } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { Group, Line } from 'react-konva'; @@ -13,7 +13,10 @@ import { rgbaColorToString } from './util/colorToString'; const selector = createSelector( [currentCanvasSelector], (currentCanvas) => { - return currentCanvas.objects; + const { objects } = currentCanvas.layerState; + return { + objects, + }; }, { memoizeOptions: { @@ -23,7 +26,7 @@ const selector = createSelector( ); const IAICanvasObjectRenderer = () => { - const objects = useAppSelector(selector); + const { objects } = useAppSelector(selector); if (!objects) return null; diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx index c3504238d4..99bde3a7a0 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx +++ b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx @@ -2,6 +2,7 @@ import { ButtonGroup } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { currentCanvasSelector, + isStagingSelector, resetCanvas, setTool, uploadOutpaintingMergedImage, @@ -27,12 +28,13 @@ import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; export const canvasControlsSelector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { + [currentCanvasSelector, isStagingSelector], + (currentCanvas, isStaging) => { const { tool } = currentCanvas; return { tool, + isStaging, }; }, { @@ -44,7 +46,7 @@ export const canvasControlsSelector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool } = useAppSelector(canvasControlsSelector); + const { tool, isStaging } = useAppSelector(canvasControlsSelector); return (
@@ -56,7 +58,7 @@ const IAICanvasOutpaintingControls = () => { aria-label="Move (M)" tooltip="Move (M)" icon={} - data-selected={tool === 'move'} + data-selected={tool === 'move' || isStaging} onClick={() => dispatch(setTool('move'))} /> diff --git a/frontend/src/features/canvas/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/IAICanvasStagingArea.tsx new file mode 100644 index 0000000000..fc80a26b07 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasStagingArea.tsx @@ -0,0 +1,164 @@ +import { background, ButtonGroup, ChakraProvider } from '@chakra-ui/react'; +import { CacheProvider } from '@emotion/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIButton from 'common/components/IAIButton'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { GroupConfig } from 'konva/lib/Group'; +import _ from 'lodash'; +import { emotionCache } from 'main'; +import { useState } from 'react'; +import { + FaArrowLeft, + FaArrowRight, + FaCheck, + FaEye, + FaEyeSlash, + FaTrash, +} from 'react-icons/fa'; +import { Group, Rect } from 'react-konva'; +import { Html } from 'react-konva-utils'; +import { + commitStagingAreaImage, + currentCanvasSelector, + discardStagedImages, + nextStagingAreaImage, + prevStagingAreaImage, +} from './canvasSlice'; +import IAICanvasImage from './IAICanvasImage'; + +const selector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { + layerState: { + stagingArea: { images, selectedImageIndex }, + }, + } = currentCanvas; + + return { + currentStagingAreaImage: + images.length > 0 ? images[selectedImageIndex] : undefined, + isOnFirstImage: selectedImageIndex === 0, + isOnLastImage: selectedImageIndex === images.length - 1, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +type Props = GroupConfig; + +const IAICanvasStagingArea = (props: Props) => { + const { ...rest } = props; + const dispatch = useAppDispatch(); + const { isOnFirstImage, isOnLastImage, currentStagingAreaImage } = + useAppSelector(selector); + + const [shouldShowStagedImage, setShouldShowStagedImage] = + useState(true); + + if (!currentStagingAreaImage) return null; + + const { + x, + y, + image: { width, height, url }, + } = currentStagingAreaImage; + + return ( + + + {shouldShowStagedImage && } + + + + + + + +
+ + } + onClick={() => dispatch(prevStagingAreaImage())} + data-selected={true} + isDisabled={isOnFirstImage} + /> + } + onClick={() => dispatch(nextStagingAreaImage())} + data-selected={true} + isDisabled={isOnLastImage} + /> + } + onClick={() => dispatch(commitStagingAreaImage())} + data-selected={true} + /> + : } + onClick={() => + setShouldShowStagedImage(!shouldShowStagedImage) + } + data-selected={true} + /> + } + onClick={() => dispatch(discardStagedImages())} + data-selected={true} + /> + +
+
+
+ +
+ ); +}; + +export default IAICanvasStagingArea; diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index 529cb605b3..be8f0e2f56 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -47,6 +47,9 @@ export interface GenericCanvasState { intermediateImage?: InvokeAI.Image; shouldShowIntermediates: boolean; maxHistory: number; + layerState: CanvasLayerState; + pastLayerStates: CanvasLayerState[]; + futureLayerStates: CanvasLayerState[]; } export type CanvasLayer = 'base' | 'mask'; @@ -84,7 +87,19 @@ export type CanvasLine = CanvasAnyLine & { color?: RgbaColor; }; -type CanvasObject = CanvasImage | CanvasLine | CanvasMaskLine; +export type CanvasObject = CanvasImage | CanvasLine | CanvasMaskLine; + +export type CanvasLayerState = { + objects: CanvasObject[]; + stagingArea: { + x: number; + y: number; + width: number; + height: number; + images: CanvasImage[]; + selectedImageIndex: number; + }; +}; // type guards export const isCanvasMaskLine = (obj: CanvasObject): obj is CanvasMaskLine => @@ -102,24 +117,13 @@ export const isCanvasAnyLine = ( export type OutpaintingCanvasState = GenericCanvasState & { layer: CanvasLayer; - objects: CanvasObject[]; - pastObjects: CanvasObject[][]; - futureObjects: CanvasObject[][]; shouldShowGrid: boolean; shouldSnapToGrid: boolean; shouldAutoSave: boolean; - stagingArea: { - images: CanvasImage[]; - selectedImageIndex: number; - }; }; export type InpaintingCanvasState = GenericCanvasState & { layer: 'mask'; - objects: CanvasObject[]; - pastObjects: CanvasObject[][]; - futureObjects: CanvasObject[][]; - imageToInpaint?: InvokeAI.Image; }; export type BaseCanvasState = InpaintingCanvasState | OutpaintingCanvasState; @@ -133,6 +137,18 @@ export interface CanvasState { outpainting: OutpaintingCanvasState; } +const initialLayerState: CanvasLayerState = { + objects: [], + stagingArea: { + x: -1, + y: -1, + width: -1, + height: -1, + images: [], + selectedImageIndex: -1, + }, +}; + const initialGenericCanvasState: GenericCanvasState = { tool: 'brush', brushColor: { r: 90, g: 90, b: 255, a: 1 }, @@ -164,7 +180,10 @@ const initialGenericCanvasState: GenericCanvasState = { isMoveStageKeyHeld: false, shouldShowIntermediates: true, isMovingStage: false, - maxHistory: 256, + maxHistory: 128, + layerState: initialLayerState, + futureLayerStates: [], + pastLayerStates: [], }; const initialCanvasState: CanvasState = { @@ -172,20 +191,10 @@ const initialCanvasState: CanvasState = { doesCanvasNeedScaling: false, inpainting: { layer: 'mask', - objects: [], - pastObjects: [], - futureObjects: [], ...initialGenericCanvasState, }, outpainting: { layer: 'base', - objects: [], - pastObjects: [], - futureObjects: [], - stagingArea: { - images: [], - selectedImageIndex: 0, - }, shouldShowGrid: true, shouldSnapToGrid: true, shouldAutoSave: false, @@ -230,14 +239,13 @@ export const canvasSlice = createSlice({ state[state.currentCanvas].eraserSize = action.payload; }, clearMask: (state) => { - state[state.currentCanvas].pastObjects.push( - state[state.currentCanvas].objects - ); - state[state.currentCanvas].objects = state[ + const currentCanvas = state[state.currentCanvas]; + currentCanvas.pastLayerStates.push(currentCanvas.layerState); + currentCanvas.layerState.objects = state[ state.currentCanvas - ].objects.filter((obj) => !isCanvasMaskLine(obj)); - state[state.currentCanvas].futureObjects = []; - state[state.currentCanvas].shouldPreserveMaskedArea = false; + ].layerState.objects.filter((obj) => !isCanvasMaskLine(obj)); + currentCanvas.futureLayerStates = []; + currentCanvas.shouldPreserveMaskedArea = false; }, toggleShouldInvertMask: (state) => { state[state.currentCanvas].shouldPreserveMaskedArea = @@ -271,9 +279,9 @@ export const canvasSlice = createSlice({ state[state.currentCanvas].cursorPosition = action.payload; }, clearImageToInpaint: (state) => { - state.inpainting.imageToInpaint = undefined; + // TODO + // state.inpainting.imageToInpaint = undefined; }, - setImageToOutpaint: (state, action: PayloadAction) => { const { width: canvasWidth, height: canvasHeight } = state.outpainting.stageDimensions; @@ -307,16 +315,20 @@ export const canvasSlice = createSlice({ state.outpainting.boundingBoxDimensions = newDimensions; state.outpainting.boundingBoxCoordinates = newCoordinates; - // state.outpainting.imageToInpaint = action.payload; - state.outpainting.objects = [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - image: action.payload, - }, - ]; + state.outpainting.pastLayerStates.push(state.outpainting.layerState); + state.outpainting.layerState = { + ...initialLayerState, + objects: [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + image: action.payload, + }, + ], + }; + state.outpainting.futureLayerStates = []; state.doesCanvasNeedScaling = true; }, setImageToInpaint: (state, action: PayloadAction) => { @@ -352,16 +364,22 @@ export const canvasSlice = createSlice({ state.inpainting.boundingBoxDimensions = newDimensions; state.inpainting.boundingBoxCoordinates = newCoordinates; - // state.inpainting.imageToInpaint = action.payload; - state.inpainting.objects = [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - image: action.payload, - }, - ]; + state.inpainting.pastLayerStates.push(state.inpainting.layerState); + + state.inpainting.layerState = { + ...initialLayerState, + objects: [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + image: action.payload, + }, + ], + }; + + state.outpainting.futureLayerStates = []; state.doesCanvasNeedScaling = true; }, setStageDimensions: (state, action: PayloadAction) => { @@ -487,8 +505,8 @@ export const canvasSlice = createSlice({ state[state.currentCanvas].isDrawing = action.payload; }, setClearBrushHistory: (state) => { - state[state.currentCanvas].pastObjects = []; - state[state.currentCanvas].futureObjects = []; + state[state.currentCanvas].pastLayerStates = []; + state[state.currentCanvas].futureLayerStates = []; }, setShouldUseInpaintReplace: (state, action: PayloadAction) => { state[state.currentCanvas].shouldUseInpaintReplace = action.payload; @@ -524,7 +542,7 @@ export const canvasSlice = createSlice({ setCurrentCanvas: (state, action: PayloadAction) => { state.currentCanvas = action.payload; }, - addImageToOutpaintingSesion: ( + addImageToOutpainting: ( state, action: PayloadAction<{ boundingBox: IRect; @@ -536,23 +554,151 @@ export const canvasSlice = createSlice({ if (!boundingBox || !image) return; const { x, y } = boundingBox; + const { width, height } = image; + const currentCanvas = state.outpainting; - currentCanvas.pastObjects.push([...currentCanvas.objects]); + // const { + // x: stagingX, + // y: stagingY, + // width: stagingWidth, + // height: stagingHeight, + // images: stagedImages, + // } = currentCanvas.layerState.stagingArea; - if (currentCanvas.pastObjects.length > currentCanvas.maxHistory) { - currentCanvas.pastObjects.shift(); + currentCanvas.pastLayerStates.push(_.cloneDeep(currentCanvas.layerState)); + + if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + currentCanvas.pastLayerStates.shift(); } - currentCanvas.futureObjects = []; - - currentCanvas.objects.push({ + currentCanvas.layerState.stagingArea.images.push({ kind: 'image', layer: 'base', x, y, image, }); + + currentCanvas.layerState.stagingArea.selectedImageIndex = + currentCanvas.layerState.stagingArea.images.length - 1; + + currentCanvas.futureLayerStates = []; + + // // If the new image is in the staging area region, push it to staging area + // if ( + // x === stagingX && + // y === stagingY && + // width === stagingWidth && + // height === stagingHeight + // ) { + // console.log('pushing new image to staging area images'); + // currentCanvas.pastLayerStates.push( + // _.cloneDeep(currentCanvas.layerState) + // ); + + // if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + // currentCanvas.pastLayerStates.shift(); + // } + + // currentCanvas.layerState.stagingArea.images.push({ + // kind: 'image', + // layer: 'base', + // x, + // y, + // image, + // }); + + // currentCanvas.layerState.stagingArea.selectedImageIndex = + // currentCanvas.layerState.stagingArea.images.length - 1; + + // currentCanvas.futureLayerStates = []; + // } + // // Else, if the staging area is empty, set it to this image + // else if (stagedImages.length === 0) { + // console.log('setting staging area image to be this one image'); + // // add new image to staging area + // currentCanvas.pastLayerStates.push( + // _.cloneDeep(currentCanvas.layerState) + // ); + + // if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + // currentCanvas.pastLayerStates.shift(); + // } + + // currentCanvas.layerState.stagingArea = { + // images: [ + // { + // kind: 'image', + // layer: 'base', + // x, + // y, + // image, + // }, + // ], + // x, + // y, + // width: image.width, + // height: image.height, + // selectedImageIndex: 0, + // }; + + // currentCanvas.futureLayerStates = []; + // } else { + // // commit the current staging area image & set the new image as the only staging area image + // currentCanvas.pastLayerStates.push( + // _.cloneDeep(currentCanvas.layerState) + // ); + + // if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + // currentCanvas.pastLayerStates.shift(); + // } + + // if (stagedImages.length === 1) { + // // commit the current staging area image + // console.log('committing current image'); + + // const { + // x: currentStagedX, + // y: currentStagedY, + // image: currentStagedImage, + // } = stagedImages[0]; + + // currentCanvas.layerState.objects.push({ + // kind: 'image', + // layer: 'base', + // x: currentStagedX, + // y: currentStagedY, + // image: currentStagedImage, + // }); + // } + + // console.log('setting staging area to this singel new image'); + // currentCanvas.layerState.stagingArea = { + // images: [ + // { + // kind: 'image', + // layer: 'base', + // x, + // y, + // image, + // }, + // ], + // x, + // y, + // width: image.width, + // height: image.height, + // selectedImageIndex: 0, + // }; + + // currentCanvas.futureLayerStates = []; + // } + }, + discardStagedImages: (state) => { + const currentCanvas = state[state.currentCanvas]; + currentCanvas.layerState.stagingArea = { + ...initialLayerState.stagingArea, + }; }, addLine: (state, action: PayloadAction) => { const currentCanvas = state[state.currentCanvas]; @@ -567,13 +713,13 @@ export const canvasSlice = createSlice({ const newColor = layer === 'base' && tool === 'brush' ? { color: brushColor } : {}; - currentCanvas.pastObjects.push(currentCanvas.objects); + currentCanvas.pastLayerStates.push(currentCanvas.layerState); - if (currentCanvas.pastObjects.length > currentCanvas.maxHistory) { - currentCanvas.pastObjects.shift(); + if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + currentCanvas.pastLayerStates.shift(); } - currentCanvas.objects.push({ + currentCanvas.layerState.objects.push({ kind: 'line', layer, tool, @@ -582,11 +728,11 @@ export const canvasSlice = createSlice({ ...newColor, }); - currentCanvas.futureObjects = []; + currentCanvas.futureLayerStates = []; }, addPointToCurrentLine: (state, action: PayloadAction) => { const lastLine = - state[state.currentCanvas].objects.findLast(isCanvasAnyLine); + state[state.currentCanvas].layerState.objects.findLast(isCanvasAnyLine); if (!lastLine) return; @@ -594,36 +740,33 @@ export const canvasSlice = createSlice({ }, undo: (state) => { const currentCanvas = state[state.currentCanvas]; - if (currentCanvas.objects.length === 0) return; - const newObjects = currentCanvas.pastObjects.pop(); + const targetState = currentCanvas.pastLayerStates.pop(); - if (!newObjects) return; + if (!targetState) return; - currentCanvas.futureObjects.unshift(currentCanvas.objects); + currentCanvas.futureLayerStates.unshift(currentCanvas.layerState); - if (currentCanvas.futureObjects.length > currentCanvas.maxHistory) { - currentCanvas.futureObjects.pop(); + if (currentCanvas.futureLayerStates.length > currentCanvas.maxHistory) { + currentCanvas.futureLayerStates.pop(); } - currentCanvas.objects = newObjects; + currentCanvas.layerState = targetState; }, redo: (state) => { const currentCanvas = state[state.currentCanvas]; - if (currentCanvas.futureObjects.length === 0) return; + const targetState = currentCanvas.futureLayerStates.shift(); - const newObjects = currentCanvas.futureObjects.shift(); + if (!targetState) return; - if (!newObjects) return; + currentCanvas.pastLayerStates.push(currentCanvas.layerState); - currentCanvas.pastObjects.push(currentCanvas.objects); - - if (currentCanvas.pastObjects.length > currentCanvas.maxHistory) { - currentCanvas.pastObjects.shift(); + if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + currentCanvas.pastLayerStates.shift(); } - currentCanvas.objects = newObjects; + currentCanvas.layerState = targetState; }, setShouldShowGrid: (state, action: PayloadAction) => { state.outpainting.shouldShowGrid = action.payload; @@ -641,21 +784,69 @@ export const canvasSlice = createSlice({ state[state.currentCanvas].shouldShowIntermediates = action.payload; }, resetCanvas: (state) => { - state[state.currentCanvas].pastObjects.push( - state[state.currentCanvas].objects + state[state.currentCanvas].pastLayerStates.push( + state[state.currentCanvas].layerState ); - state[state.currentCanvas].objects = []; - state[state.currentCanvas].futureObjects = []; + state[state.currentCanvas].layerState = initialLayerState; + state[state.currentCanvas].futureLayerStates = []; + }, + nextStagingAreaImage: (state) => { + const currentIndex = + state.outpainting.layerState.stagingArea.selectedImageIndex; + const length = state.outpainting.layerState.stagingArea.images.length; + + state.outpainting.layerState.stagingArea.selectedImageIndex = Math.min( + currentIndex + 1, + length - 1 + ); + }, + prevStagingAreaImage: (state) => { + const currentIndex = + state.outpainting.layerState.stagingArea.selectedImageIndex; + + state.outpainting.layerState.stagingArea.selectedImageIndex = Math.max( + currentIndex - 1, + 0 + ); + }, + commitStagingAreaImage: (state) => { + const currentCanvas = state[state.currentCanvas]; + const { images, selectedImageIndex } = + currentCanvas.layerState.stagingArea; + + currentCanvas.pastLayerStates.push(_.cloneDeep(currentCanvas.layerState)); + + if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { + currentCanvas.pastLayerStates.shift(); + } + + const { x, y, image } = images[selectedImageIndex]; + + currentCanvas.layerState.objects.push({ + kind: 'image', + layer: 'base', + x, + y, + image, + }); + + currentCanvas.layerState.stagingArea = { + ...initialLayerState.stagingArea, + }; + + currentCanvas.futureLayerStates = []; }, }, extraReducers: (builder) => { builder.addCase(uploadOutpaintingMergedImage.fulfilled, (state, action) => { if (!action.payload) return; - state.outpainting.pastObjects.push([...state.outpainting.objects]); - state.outpainting.futureObjects = []; + state.outpainting.pastLayerStates.push({ + ...state.outpainting.layerState, + }); + state.outpainting.futureLayerStates = []; - state.outpainting.objects = [ + state.outpainting.layerState.objects = [ { kind: 'image', layer: 'base', @@ -709,13 +900,17 @@ export const { setIsMoveStageKeyHeld, setStageCoordinates, setCurrentCanvas, - addImageToOutpaintingSesion, + addImageToOutpainting, resetCanvas, setShouldShowGrid, setShouldSnapToGrid, setShouldAutoSave, setShouldShowIntermediates, setIsMovingStage, + nextStagingAreaImage, + prevStagingAreaImage, + commitStagingAreaImage, + discardStagedImages, } = canvasSlice.actions; export default canvasSlice.reducer; @@ -783,6 +978,10 @@ export const uploadOutpaintingMergedImage = createAsyncThunk( export const currentCanvasSelector = (state: RootState): BaseCanvasState => state.canvas[state.canvas.currentCanvas]; +export const isStagingSelector = (state: RootState): boolean => + state.canvas[state.canvas.currentCanvas].layerState.stagingArea.images + .length > 0; + export const outpaintingCanvasSelector = ( state: RootState ): OutpaintingCanvasState => state.canvas.outpainting; @@ -794,6 +993,6 @@ export const inpaintingCanvasSelector = ( export const baseCanvasImageSelector = createSelector( [currentCanvasSelector], (currentCanvas) => { - return currentCanvas.objects.find(isCanvasBaseImage); + return currentCanvas.layerState.objects.find(isCanvasBaseImage); } ); diff --git a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts index dedc9f3dc9..268bdf6e75 100644 --- a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts @@ -6,17 +6,18 @@ import _ from 'lodash'; import { useCallback } from 'react'; import { currentCanvasSelector, + isStagingSelector, setIsMovingStage, setStageCoordinates, } from '../canvasSlice'; const selector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { + [currentCanvasSelector, isStagingSelector, activeTabNameSelector], + (canvas, isStaging, activeTabName) => { const { tool } = canvas; return { tool, - + isStaging, activeTabName, }; }, @@ -25,24 +26,26 @@ const selector = createSelector( const useCanvasDrag = () => { const dispatch = useAppDispatch(); - const { tool, activeTabName } = useAppSelector(selector); + const { tool, activeTabName, isStaging } = useAppSelector(selector); return { handleDragStart: useCallback(() => { - if (tool !== 'move' || activeTabName !== 'outpainting') return; + if (!(tool === 'move' || isStaging)) return; dispatch(setIsMovingStage(true)); - }, [activeTabName, dispatch, tool]), + }, [dispatch, isStaging, tool]), + handleDragMove: useCallback( (e: KonvaEventObject) => { - if (tool !== 'move' || activeTabName !== 'outpainting') return; + if (!(tool === 'move' || isStaging)) return; dispatch(setStageCoordinates(e.target.getPosition())); }, - [activeTabName, dispatch, tool] + [dispatch, isStaging, tool] ), + handleDragEnd: useCallback(() => { - if (tool !== 'move' || activeTabName !== 'outpainting') return; + if (!(tool === 'move' || isStaging)) return; dispatch(setIsMovingStage(false)); - }, [activeTabName, dispatch, tool]), + }, [dispatch, isStaging, tool]), }; }; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index 503daeaf77..ae72b1686f 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -8,18 +8,20 @@ import { MutableRefObject, useCallback } from 'react'; import { addLine, currentCanvasSelector, + isStagingSelector, setIsDrawing, setIsMovingStage, } from '../canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector], - (activeTabName, currentCanvas) => { + [activeTabNameSelector, currentCanvasSelector, isStagingSelector], + (activeTabName, currentCanvas, isStaging) => { const { tool } = currentCanvas; return { tool, activeTabName, + isStaging, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -27,14 +29,15 @@ const selector = createSelector( const useCanvasMouseDown = (stageRef: MutableRefObject) => { const dispatch = useAppDispatch(); - const { tool } = useAppSelector(selector); + const { tool, isStaging } = useAppSelector(selector); return useCallback( (e: KonvaEventObject) => { if (!stageRef.current) return; + stageRef.current.container().focus(); - if (tool === 'move') { + if (tool === 'move' || isStaging) { dispatch(setIsMovingStage(true)); return; } @@ -50,7 +53,7 @@ const useCanvasMouseDown = (stageRef: MutableRefObject) => { // Add a new line starting from the current cursor position. dispatch(addLine([scaledCursorPosition.x, scaledCursorPosition.y])); }, - [stageRef, dispatch, tool] + [stageRef, tool, isStaging, dispatch] ); }; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts index 73231f911e..997faa058b 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts @@ -5,16 +5,22 @@ import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; -import { addLine, currentCanvasSelector, setIsDrawing } from '../canvasSlice'; +import { + addLine, + currentCanvasSelector, + isStagingSelector, + setIsDrawing, +} from '../canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector], - (activeTabName, currentCanvas) => { + [activeTabNameSelector, currentCanvasSelector, isStagingSelector], + (activeTabName, currentCanvas, isStaging) => { const { tool } = currentCanvas; return { tool, activeTabName, + isStaging, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -24,7 +30,7 @@ const useCanvasMouseEnter = ( stageRef: MutableRefObject ) => { const dispatch = useAppDispatch(); - const { tool } = useAppSelector(selector); + const { tool, isStaging } = useAppSelector(selector); return useCallback( (e: KonvaEventObject) => { @@ -34,14 +40,14 @@ const useCanvasMouseEnter = ( const scaledCursorPosition = getScaledCursorPosition(stageRef.current); - if (!scaledCursorPosition || tool === 'move') return; + if (!scaledCursorPosition || tool === 'move' || isStaging) return; dispatch(setIsDrawing(true)); // Add a new line starting from the current cursor position. dispatch(addLine([scaledCursorPosition.x, scaledCursorPosition.y])); }, - [stageRef, tool, dispatch] + [stageRef, tool, isStaging, dispatch] ); }; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts index aa4cbd9557..8519e8e9ab 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts @@ -9,18 +9,20 @@ import { addPointToCurrentLine, currentCanvasSelector, GenericCanvasState, + isStagingSelector, setCursorPosition, } from '../canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector], - (activeTabName, canvas: GenericCanvasState) => { - const { tool, isDrawing } = canvas; + [activeTabNameSelector, currentCanvasSelector, isStagingSelector], + (activeTabName, currentCanvas, isStaging) => { + const { tool, isDrawing } = currentCanvas; return { tool, isDrawing, activeTabName, + isStaging, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -32,7 +34,7 @@ const useCanvasMouseMove = ( lastCursorPositionRef: MutableRefObject ) => { const dispatch = useAppDispatch(); - const { isDrawing, tool } = useAppSelector(selector); + const { isDrawing, tool, isStaging } = useAppSelector(selector); return useCallback(() => { if (!stageRef.current) return; @@ -45,7 +47,7 @@ const useCanvasMouseMove = ( lastCursorPositionRef.current = scaledCursorPosition; - if (!isDrawing || tool === 'move') return; + if (!isDrawing || tool === 'move' || isStaging) return; didMouseMoveRef.current = true; dispatch( @@ -55,6 +57,7 @@ const useCanvasMouseMove = ( didMouseMoveRef, dispatch, isDrawing, + isStaging, lastCursorPositionRef, stageRef, tool, diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts index 685d43b3e2..64c6d68da1 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts @@ -9,19 +9,21 @@ import { addPointToCurrentLine, currentCanvasSelector, GenericCanvasState, + isStagingSelector, setIsDrawing, setIsMovingStage, } from '../canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector], - (activeTabName, canvas: GenericCanvasState) => { - const { tool, isDrawing } = canvas; + [activeTabNameSelector, currentCanvasSelector, isStagingSelector], + (activeTabName, currentCanvas, isStaging) => { + const { tool, isDrawing } = currentCanvas; return { tool, isDrawing, activeTabName, + isStaging, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -32,10 +34,10 @@ const useCanvasMouseUp = ( didMouseMoveRef: MutableRefObject ) => { const dispatch = useAppDispatch(); - const { tool, isDrawing } = useAppSelector(selector); + const { tool, isDrawing, isStaging } = useAppSelector(selector); return useCallback(() => { - if (tool === 'move') { + if (tool === 'move' || isStaging) { dispatch(setIsMovingStage(false)); return; } @@ -58,7 +60,7 @@ const useCanvasMouseUp = ( didMouseMoveRef.current = false; } dispatch(setIsDrawing(false)); - }, [didMouseMoveRef, dispatch, isDrawing, stageRef, tool]); + }, [didMouseMoveRef, dispatch, isDrawing, isStaging, stageRef, tool]); }; export default useCanvasMouseUp; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx index 4f8307b367..993349990e 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx @@ -13,12 +13,12 @@ import _ from 'lodash'; const clearBrushHistorySelector = createSelector( currentCanvasSelector, (currentCanvas) => { - const { pastObjects, futureObjects } = currentCanvas as + const { pastLayerStates, futureLayerStates } = currentCanvas as | InpaintingCanvasState | OutpaintingCanvasState; return { mayClearBrushHistory: - futureObjects.length > 0 || pastObjects.length > 0 ? false : true, + futureLayerStates.length > 0 || pastLayerStates.length > 0 ? false : true, }; }, { diff --git a/frontend/src/features/tabs/CanvasWorkarea.scss b/frontend/src/features/tabs/CanvasWorkarea.scss index d3921b7a5f..f83d8f8441 100644 --- a/frontend/src/features/tabs/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/CanvasWorkarea.scss @@ -69,10 +69,13 @@ } .inpainting-canvas-stage { - // border-radius: 0.5rem; - // border: 1px solid var(--border-color-light); + outline: none; + border-radius: 0.5rem; + border: 1px solid var(--border-color-light); + overflow: hidden; canvas { + outline: none; border-radius: 0.5rem; } } diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx index e5fd54f008..47ff66111c 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx @@ -17,7 +17,9 @@ const outpaintingDisplaySelector = createSelector( (canvas: CanvasState) => { const { doesCanvasNeedScaling, - outpainting: { objects }, + outpainting: { + layerState: { objects }, + }, } = canvas; return { doesCanvasNeedScaling, diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 18ab6a62e2..02350c73bd 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -13,7 +13,7 @@ export const persistor = persistStore(store); import Loading from './Loading'; import App from './app/App'; -const emotionCache = createCache({ +export const emotionCache = createCache({ key: 'invokeai-style-cache', prepend: true, }); diff --git a/frontend/yarn.lock b/frontend/yarn.lock index bb5bac14de..8477d67ffb 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3420,7 +3420,15 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-konva@^18.2.3: +react-konva-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/react-konva-utils/-/react-konva-utils-0.3.0.tgz#d9099ad1a767286b24fb1b08377af2dfa5c9f176" + integrity sha512-yH5FVpDGQ8gHeClyHY533M4oSLjEfYuvn+Z29zXm9osjhuulhtJrh5k+wtyY6QSC0MG0ioqE0cjiudGl1WGB9A== + dependencies: + react-konva "^18.0.0-0" + use-image "^1.0.12" + +react-konva@^18.0.0-0, react-konva@^18.2.3: version "18.2.3" resolved "https://registry.yarnpkg.com/react-konva/-/react-konva-18.2.3.tgz#75c658fca493bdf515b38f2a8d544fa7a9c754c4" integrity sha512-OPxjBTgaEGU9pt/VJSVM7QNXYHEZ5CkulX+4fTTvbaH+Wh+vMLbXmH3yjWw4kT/5Qi6t0UQKHPPmirCv8/9sdg== @@ -3942,7 +3950,7 @@ use-callback-ref@^1.3.0: dependencies: tslib "^2.0.0" -use-image@^1.1.0: +use-image@^1.0.12, use-image@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/use-image/-/use-image-1.1.0.tgz#dc244c34506d3cf3a8177c1f0bbfb158b9beefe5" integrity sha512-+cBHRR/44ZyMUS873O0vbVylgMM0AbdTunEplAWXvIQ2p69h2sIo2Qq74zeUsq6AMo+27e5lERQvXzd1crGiMg== From 5d484273ed52d8293f1bfc0ee4cfd5866cdb7857 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 13 Nov 2022 22:50:41 +1100 Subject: [PATCH 045/220] Fixes "use all" not setting variationAmount Now sets to 0 when the image had variations. --- frontend/src/features/options/optionsSlice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/options/optionsSlice.ts b/frontend/src/features/options/optionsSlice.ts index 1b6d3f63d9..a17c754bdb 100644 --- a/frontend/src/features/options/optionsSlice.ts +++ b/frontend/src/features/options/optionsSlice.ts @@ -273,6 +273,7 @@ export const optionsSlice = createSlice({ if (variations && variations.length > 0) { state.seedWeights = seedWeightsToString(variations); state.shouldGenerateVariations = true; + state.variationAmount = 0; } else { state.shouldGenerateVariations = false; } From 70dcfa168439d8c538790f90db044c3878a65dbb Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 13 Nov 2022 22:56:09 +1100 Subject: [PATCH 046/220] Builds fresh bundle --- frontend/dist/assets/index.205e5ea1.js | 593 ++++++++++++++++++ ...{index.a44a1287.css => index.978b75a1.css} | 2 +- frontend/dist/assets/index.ece4fb83.js | 593 ------------------ frontend/dist/index.html | 5 + 4 files changed, 599 insertions(+), 594 deletions(-) create mode 100644 frontend/dist/assets/index.205e5ea1.js rename frontend/dist/assets/{index.a44a1287.css => index.978b75a1.css} (60%) delete mode 100644 frontend/dist/assets/index.ece4fb83.js diff --git a/frontend/dist/assets/index.205e5ea1.js b/frontend/dist/assets/index.205e5ea1.js new file mode 100644 index 0000000000..cbc7acfa14 --- /dev/null +++ b/frontend/dist/assets/index.205e5ea1.js @@ -0,0 +1,593 @@ +function Zq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function AC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ev=Symbol.for("react.element"),Qq=Symbol.for("react.portal"),Jq=Symbol.for("react.fragment"),eK=Symbol.for("react.strict_mode"),tK=Symbol.for("react.profiler"),nK=Symbol.for("react.provider"),rK=Symbol.for("react.context"),iK=Symbol.for("react.forward_ref"),oK=Symbol.for("react.suspense"),aK=Symbol.for("react.memo"),sK=Symbol.for("react.lazy"),eE=Symbol.iterator;function lK(e){return e===null||typeof e!="object"?null:(e=eE&&e[eE]||e["@@iterator"],typeof e=="function"?e:null)}var aM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sM=Object.assign,lM={};function U0(e,t,n){this.props=e,this.context=t,this.refs=lM,this.updater=n||aM}U0.prototype.isReactComponent={};U0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};U0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uM(){}uM.prototype=U0.prototype;function IC(e,t,n){this.props=e,this.context=t,this.refs=lM,this.updater=n||aM}var MC=IC.prototype=new uM;MC.constructor=IC;sM(MC,U0.prototype);MC.isPureReactComponent=!0;var tE=Array.isArray,cM=Object.prototype.hasOwnProperty,OC={current:null},dM={key:!0,ref:!0,__self:!0,__source:!0};function fM(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)cM.call(t,r)&&!dM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=W[X];if(0>>1;Xi(He,Q))jei(ct,He)?(W[X]=ct,W[je]=Q,X=je):(W[X]=He,W[Se]=Q,X=Se);else if(jei(ct,Q))W[X]=ct,W[je]=Q,X=je;else break e}}return q}function i(W,q){var Q=W.sortIndex-q.sortIndex;return Q!==0?Q:W.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(W){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=W)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(W){if(w=!1,L(W),!b)if(n(l)!==null)b=!0,le(O);else{var q=n(u);q!==null&&G(I,q.startTime-W)}}function O(W,q){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var Q=m;try{for(L(q),g=n(l);g!==null&&(!(g.expirationTime>q)||W&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var R=!1,D=null,z=-1,$=5,V=-1;function Y(){return!(e.unstable_now()-V<$)}function de(){if(D!==null){var W=e.unstable_now();V=W;var q=!0;try{q=D(!0,W)}finally{q?j():(R=!1,D=null)}}else R=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=de,j=function(){ie.postMessage(null)}}else j=function(){E(de,0)};function le(W){D=W,R||(R=!0,j())}function G(W,q){z=E(function(){W(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,le(O))},e.unstable_forceFrameRate=function(W){0>W||125X?(W.sortIndex=Q,t(u,W),n(l)===null&&W===n(u)&&(w?(P(z),z=-1):w=!0,G(I,Q-X))):(W.sortIndex=me,t(l,W),b||v||(b=!0,le(O))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var q=m;return function(){var Q=m;m=q;try{return W.apply(this,arguments)}finally{m=Q}}}})(hM);(function(e){e.exports=hM})(Yp);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var pM=C.exports,sa=Yp.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rE={},iE={};function pK(e){return N6.call(iE,e)?!0:N6.call(rE,e)?!1:hK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function gK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mK(e,t,n,r){if(t===null||typeof t>"u"||gK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function so(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new so(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var NC=/[\-:]([a-z])/g;function DC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(NC,DC);Oi[t]=new so(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(NC,DC);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(NC,DC);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function zC(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vg(e):""}function vK(e){switch(e.tag){case 5:return Vg(e.type);case 16:return Vg("Lazy");case 13:return Vg("Suspense");case 19:return Vg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case BC:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vM:return(e.displayName||"Context")+".Consumer";case mM:return(e._context.displayName||"Context")+".Provider";case FC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $C:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F6(t);case 8:return t===BC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=bM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function G2(e){e._valueTracker||(e._valueTracker=bK(e))}function xM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function SM(e,t){t=t.checked,t!=null&&zC(e,"checked",t,!1)}function H6(e,t){SM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ug=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=q2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var am={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xK=["Webkit","ms","Moz","O"];Object.keys(am).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),am[t]=am[e]})});function kM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||am.hasOwnProperty(e)&&am[e]?(""+t).trim():t+"px"}function EM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=kM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q6=null;function HC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function cE(e){if(e=Tv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function PM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function LM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var K2=64,Y2=4194304;function jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=jg(s):(o&=a,o!==0&&(r=jg(o)))}else a=n&~i,a!==0?r=jg(a):o!==0&&(r=jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Pv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=lm),bE=String.fromCharCode(32),xE=!1;function KM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return YM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!YC&&KM(e,t)?(e=GM(),o3=GC=Fc=null,Np=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_E(n)}}function JM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eO(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function ZC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CY(e){var t=eO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JM(n.ownerDocument.documentElement,n)){if(r!==null&&ZC(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=kE(n,o);var a=kE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dp=null,ew=null,cm=null,tw=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&ZC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cm&&Vm(cm,r)||(cm=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function qn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));qn(Vi,t),qn(Lo,n)}function uO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,qn(Vi,e),qn(Lo,Lo.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=uO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),qn(Vi,e)):Xn(Lo),qn(Lo,n)}var ou=null,p5=!1,aS=!1;function cO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,cO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Ug(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ny(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=yO(!0),bO=yO(!1),Av={},yl=hd(Av),qm=hd(Av),Km=hd(Av);function If(e){if(e===Av)throw Error(Oe(174));return e}function o8(e,t){switch(qn(Km,t),qn(qm,e),qn(yl,Av),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),qn(yl,t)}function L0(){Xn(yl),Xn(qm),Xn(Km)}function xO(e){If(Km.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(qn(qm,e),qn(yl,n))}function a8(e){qm.current===e&&(Xn(yl),Xn(qm))}var cr=hd(0);function s4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sS=[];function s8(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function DO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zO(e))BO(t,n);else if(n=pO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),FO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zO(e))BO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r8(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=pO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),FO(n,t,r))}}function zO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function BO(e,t){dm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,VC(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,IO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f8,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||CO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(kO.bind(null,r,o,e),[e]),r.flags|=2048,Xm(9,_O.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ym++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[Gm]=r,KO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304)}else{if(!r)if(e=s4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return y8(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(QC(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),s8(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a8(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return n8(t.type._context),null;case 22:case 23:return y8(),null;case 24:return null;default:return null}}var iy=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function XY(e,t){if(nw=Z3,e=eO(),ZC(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=QE,QE=!1,b}function fm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function XO(e){var t=e.alternate;t!==null&&(e.alternate=null,XO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Gm],delete t[aw],delete t[OY],delete t[RY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function QO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)JO(e,t,n),n=n.sibling}function JO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),Hm(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m8?Df(e,0):g8|=n),Ao(e,t)}function sR(e,t){t===0&&((e.mode&1)===0?t=1:(t=Y2,Y2<<=1,(Y2&130023424)===0&&(Y2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Pv(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sR(e,n)}function aZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),sR(e,n)}var lR;lR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&dO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=u8(null,t,r,e,i,n);var o=c8();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i8(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&XC(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(jO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,gO(e,t),a4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=T0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=bO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return xO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),UO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return GO(e,t,n);case 4:return o8(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=du(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return WO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),vO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return qO(e,t,n);case 22:return VO(e,t,n)}throw Error(Oe(156,t.tag))};function uR(e,t){return NM(e,t)}function sZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new sZ(e,t,n,r)}function x8(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return x8(e)?1:0;if(e!=null){if(e=e.$$typeof,e===FC)return 11;if(e===$C)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x8(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case BC:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case yM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mM:a=10;break e;case vM:a=9;break e;case FC:a=11;break e;case $C:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=yM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S8(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i8(o),e}function cZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Al);const sy=AC(Al.exports);var lP=Al.exports;U3.createRoot=lP.createRoot,U3.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gZ=C.exports,mZ=Symbol.for("react.element"),vZ=Symbol.for("react.fragment"),yZ=Object.prototype.hasOwnProperty,bZ=gZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xZ={key:!0,ref:!0,__self:!0,__source:!0};function hR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)yZ.call(t,r)&&!xZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:mZ,type:e,key:o,ref:a,props:i,_owner:bZ.current}}k5.Fragment=vZ;k5.jsx=hR;k5.jsxs=hR;(function(e){e.exports=k5})(_5);const Hn=_5.exports.Fragment,x=_5.exports.jsx,ee=_5.exports.jsxs,SZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Hn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var k8=C.exports.createContext({});k8.displayName="ColorModeContext";function Iv(){const e=C.exports.useContext(k8);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var ly={light:"chakra-ui-light",dark:"chakra-ui-dark"};function wZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?ly.dark:ly.light),document.body.classList.remove(r?ly.light:ly.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var CZ="chakra-ui-color-mode";function _Z(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var kZ=_Z(CZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function pR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?uP:k,setColorMode:t?uP:P,forced:t!==void 0}),[E,k,P,t]);return x(k8.Provider,{value:L,children:n})}pR.displayName="ColorModeProvider";var Pw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Vn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Vn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Vn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Vn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return EZ(e)?e(...t):e}var EZ=e=>typeof e=="function",PZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Jm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var uy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Jm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Jm({scale:n,compose:r}):r}}var gR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...gR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...gR].join(" ")}var MZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},OZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function RZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},mR="& > :not(style) ~ :not(style)",DZ={[mR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[mR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},BZ=new Set(Object.values(Tw)),vR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||vR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=yR(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var yR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(e){return/^var\(--.+\)$/.test(e)}var VZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=VZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||yR(e)||vR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",uy(rn.vh,rn.px)),spaceT:as("space",uy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Jm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",uy(rn.vh,rn.px)),sizesT:as("sizes",uy(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Jm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Jm({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(g4,{flexDir:g4.flexDirection});var bR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},gm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(gm,{insetStart:gm.insetInlineStart,insetEnd:gm.insetInlineEnd});var eX={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Zn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},rX={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},iX={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},oX={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function xR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(xR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${E5("+",...e)})`,hP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,pP=(...e)=>`calc(${E5("/",...e)})`,gP=e=>{const t=xR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(fP(e,...t)),subtract:(...t)=>kf(hP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(pP(e,...t)),negate:()=>kf(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Iw,divide:pP,negate:gP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var SR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E8=e=>Object.fromEntries(Object.entries(e).sort(SR));function mP(e){const t=E8(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(E8(e));return new Set(t)}function vP(e){if(!e)return e;e=Mw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function qg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(SR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:qg(null,u),minWQuery:qg(a),minMaxQuery:qg(a,u)}}),r=gX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:E8(e),asArray:mP(e),details:n,media:[null,...t.map(o=>qg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},yc=e=>wR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>wR(t=>e(t,"~ &"),"[data-peer]",".peer"),wR=(e,...t)=>t.map(e).join(", "),P5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},vX=Object.keys(P5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=yP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=P5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:mX(n.breakpoints)}),n}var P8=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,bR,JZ,gm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,bR,gm),LX=Object.keys(PX),TX=[...Object.keys(P8),...vX],AX={...P8,...P5},IX=e=>e in AX,MX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!RX(t),DX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var CR=e=>t=>zX({theme:t,pseudos:P5,configs:P8})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||tv($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Mv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Mv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!tv(bl());)ia();return Mv(e,Oo)}function iQ(e){return TR(v3("",null,null,null,[""],e=LR(e),0,[0],e))}function v3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:cy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&cy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(cy(R=bP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&cy(bP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A8(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?L8:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,_R,L5(QX()),ev(e,2,-2),0)}function xP(e,t,n,r){return A5(e,t,n,T8,ev(e,0,r),ev(e,r+1,-1),r)}function n0(e,t){for(var n="",r=A8(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?IR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case T8:t.return=IR(t.value,t.length);break;case kR:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case L8:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],MR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||gQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,FR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},mS=AR(function(e){return FR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!FR(t)&&typeof n=="number"&&n!==0?n+"px":n};function nv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,nv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},qR=GQ(jQ);function KR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var YR=e=>KR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function ZR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var XQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=AR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},LP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},TP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return zR(n,r,i),IQ(function(){return BR(n,r,i)}),null},nJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=TP(t,n,r),l=s||LP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function dy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function XR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Fw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function DJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=fy(e.s),i=fy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=fy(e.s),o=fy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=XR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Ov=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=NJ(t)),this.originalInput=t;var i=DJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=XR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=IP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),MP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),OJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=dy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=dy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=dy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=dy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(QR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Ov(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=JR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return v4([r,i],n.seed)}function VJ(e,t){for(var n=JR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=tN.find(function(a){return a.name===e});if(n){var r=eN(n);if(r.hueRange)return r.hueRange}var i=new Ov(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function JR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=tN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function eN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var tN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function jJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=jJ(e,`colors.${t}`,t),{isValid:i}=new Ov(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Ov(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Ov(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=QR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function nN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(nN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${V5("+",...e)})`,DP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,zP=(...e)=>`calc(${V5("/",...e)})`,BP=e=>{const t=nN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(NP(e,...t)),subtract:(...t)=>su(DP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(zP(e,...t)),negate:()=>su(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:$w,divide:zP,negate:BP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function rN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,rN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${rN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Rv,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Rv({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z8(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Rv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),iN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},wee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...iN,...wee,container:Cee},oN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:aN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},FP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=aN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?oN[e]:void 0;return aN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},vm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},sN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=M0(`${t}.200`,.12)(n),i=M0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Uee=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(sN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=jee[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},qee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:sN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),ym=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:ym.reference,h:ym.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[ym.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[ym.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[ym.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),bm=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[bm.reference],h:[bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[bm.variable]:"sizes.10",fontSize:"md"},md:{[bm.variable]:"sizes.8",fontSize:"xs"},sm:{[bm.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=vm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function B8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),ine=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),xne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},lN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:uN}=ir(vJ.keys),F8=ji("number-input-stepper-width"),cN=ji("number-input-input-padding"),$ne=su(F8).add("0.5rem").toString(),Hne={[F8.variable]:"sizes.6",[cN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[F8.reference]},Une=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),jne=uN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function hy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=lN.fontSizes[o];return uN({field:{...r.field,paddingInlineEnd:cN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:hy("xs"),sm:hy("sm"),md:hy("md"),lg:hy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),$P,Kne={...($P=gn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Yne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HP,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=gn.variants)==null?void 0:HP.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),py=ji("popper-bg"),ere=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[py.variable]:"colors.white",bg:py.reference,[ere.variable]:py.reference,[WP.variable]:"colors.gray.200",_dark:{[py.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:Kg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ai(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=Kg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:Kg({track:{h:"1"}}),sm:Kg({track:{h:"2"}}),md:Kg({track:{h:"3"}}),lg:Kg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),gy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,Pre={lg:{...(VP=gn.sizes)==null?void 0:VP.lg,field:{...(UP=gn.sizes)==null?void 0:UP.lg.field,...gy}},md:{...(jP=gn.sizes)==null?void 0:jP.md,field:{...(GP=gn.sizes)==null?void 0:GP.md.field,...gy}},sm:{...(qP=gn.sizes)==null?void 0:qP.sm,field:{...(KP=gn.sizes)==null?void 0:KP.sm.field,...gy}},xs:{...(YP=gn.sizes)==null?void 0:YP.xs,field:{...(ZP=gn.sizes)==null?void 0:ZP.xs.field,...gy},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),ov=ei("slider-thumb-size"),av=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...D8({orientation:e.orientation,horizontal:{h:av.reference},vertical:{w:av.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...D8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ov.reference,h:ov.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[ov.variable]:"sizes.4",[av.variable]:"sizes.1"}}),Wre=U5({container:{[ov.variable]:"sizes.3.5",[av.variable]:"sizes.1"}}),Vre=U5({container:{[ov.variable]:"sizes.2.5",[av.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:dN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=dN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:dN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),xm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(xm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[xm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[xm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[xm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[xm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=s0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={sm:s0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:s0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:s0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),kie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Lie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,$ie={...(XP=gn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=gn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eL,tL,nL,Wie={xs:((JP=gn.sizes)==null?void 0:JP.xs.field)??{},sm:((eL=gn.sizes)==null?void 0:eL.sm.field)??{},md:((tL=gn.sizes)==null?void 0:tL.md.field)??{},lg:((nL=gn.sizes)==null?void 0:nL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},my=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:my.reference,color:kS.reference,[my.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[my.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:my.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:vm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},roe=noe,ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ooe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...lN,sizes:oN,shadows:roe,space:iN,borders:Yie,transition:loe},poe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},goe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(woe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function K0(){const e=C.exports.useContext(rv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function fN(){const e=Iv(),t=K0();return{...e,theme:t}}function _oe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function koe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Iv();return x(H5,{styles:t=>{const n=qR(t,"styles.global"),r=ZR(n,{theme:t,colorMode:e});return r?CR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=KR(a,(g,m)=>IX(m)),l=ZR(e,t),u=Object.assign({},i,l,YR(s),o),h=CR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Iv();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function hN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=fN(),a=e?qR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},YR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return hN(e,t)}function Ri(e,t={}){return hN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=iL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=oL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=rL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,pN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=pN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function gN(){return[x4(Hoe),()=>x4(pN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??aL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??aL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function j5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,mN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(mN),a=C.exports.useContext(Y0),s=C.exports.useContext($8).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function sv(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>sv(e[t]))}function vN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sv(n)?n:void 0,animate:sv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sL(t),sL(n)])}function sL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),lv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?lv.projectionNodeConstructor=e[t]:lv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(Sm.hasEverUpdated)return Zoe++})}const H8=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const yN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($8),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(mN).strict,P=C.exports.useContext(yN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||lv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(H8).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function W8(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nv=new Set(C4);function bN(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function xN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,SN=(e,t)=>n=>Math.max(Math.min(n,t),e),wm=e=>e%1?Number(e.toFixed(5)):e,uv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cm=Object.assign(Object.assign({},ih),{transform:SN(0,1)}),vy=Object.assign(Object.assign({},ih),{default:1}),zv=e=>({test:t=>Dv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=zv("deg"),Sl=zv("%"),St=zv("px"),cae=zv("vh"),dae=zv("vw"),lL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),V8=(e,t)=>n=>Boolean(Dv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),wN=(e,t,n)=>r=>{if(!Dv(r))return r;const[i,o,a,s]=r.match(uv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:V8("hsl","hue"),parse:wN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(wm(t))+", "+Sl.transform(wm(n))+", "+wm(Cm.transform(r))+")"},fae=SN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:V8("rgb","red"),parse:wN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+wm(Cm.transform(r))+")"};function hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gw={test:V8("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Dv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},CN="${c}",_N="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Dv(e)&&((n=(t=e.match(uv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function kN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,CN),t.push(...r.map(to.parse)));const i=e.match(uv);return i&&(e=e.replace(uv,_N),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function EN(e){return kN(e).values}function PN(e){const{values:t,numColors:n,tokenised:r}=kN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=EN(e);return PN(e)(t.map(gae))}const vu={test:pae,parse:EN,createTransformer:PN,getAnimatableNone:mae},vae=new Set(["brightness","contrast","saturate","opacity"]);function yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(uv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),uL={...ih,transform:Math.round},LN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:vy,scaleX:vy,scaleY:vy,scaleZ:vy,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:Cm,originX:lL,originY:lL,originZ:St,zIndex:uL,fillOpacity:Cm,strokeOpacity:Cm,numOctaves:uL};function U8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(xN(m)){o[m]=v;continue}const b=LN[m],w=lae(v,b);if(Nv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const j8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function TN(e,t,n){for(const r in t)!Ss(t[r])&&!bN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j8();return U8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return TN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let AN=e=>!_4(e);function Lae(e){!e||(AN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(AN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=cL(t,e.x,e.width),i=cL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Aae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Oae(g,o,a,s,!1)}const IN=()=>({...j8(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=IN();return G8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};TN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W8(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const MN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ON(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const RN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function NN(e,t,n,r){ON(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(RN.has(i)?i:MN(i),t.attrs[i])}function q8(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||bN(r,e))&&(n[r]=t[r]);return n}function DN(e){const t=q8(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const cv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),zN=e=>cv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const BN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=vN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:BN({scrapeMotionValuesFromProps:DN,createRenderState:IN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),NN(t,n)}})},$ae={useVisualState:BN({scrapeMotionValuesFromProps:q8,createRenderState:j8})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...W8(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function FN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function $N(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y8(e,t="page"){return{point:$N(e)?jae(e,t):Gae(e,t)}}const HN=(e,t=!1)=>{const n=r=>e(r,Y8(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function WN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,WN(t),HN(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,WN(t),n&&HN(n,t==="pointerdown"),r)}function VN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dL=VN("dragHorizontal"),fL=VN("dragVertical");function UN(e){let t=!1;if(e==="y")t=fL();else if(e==="x")t=dL();else{const n=dL(),r=fL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jN(){const e=UN(!0);return e?(e(),!1):!0}function hL(e,t,n){return(r,i)=>{!FN(r)||jN()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?hL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?hL(r,!1,t):void 0,{passive:!t})}const GN=(e,t)=>t?e===t?!0:GN(e,t.parentElement):!1;function Z8(e){return C.exports.useEffect(()=>()=>e(),[])}function qN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),LS=.001,ese=.01,pL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=pL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,pL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ise=12;function ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gL(e,sse)&&gL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=qN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=mL,b=mL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mL=e=>0,dv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],yL=e=>cse.find(t=>t.test(e)),KN=(e,t)=>{let n=yL(e),r=yL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=vL(i),n=Wc),r===Rf&&(o=vL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function YN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?KN(e,t):XN(e,t)}const ZN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>YN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=YN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=bL(e),i=bL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(ZN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?KN:XN;if(Array.isArray(e))return ZN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(dv(e,t,r))}function vse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=dv(e[o],e[o+1],i);return t[o](s)}}function QN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),Q8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),JN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=JN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},eD=1.525,xse=4/11,Sse=8/11,wse=9/10,J8=e=>e,e7=yse(2),Cse=Q5(e7),tD=Q8(e7),nD=e=>1-Math.sin(Math.acos(e)),t7=Q5(nD),_se=Q8(t7),n7=JN(eD),kse=Q5(n7),Ese=Q8(n7),Pse=bse(eD),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||tD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return QN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const xL={keyframes:C3,spring:X8,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(xL[e.type])return xL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X8:C3}const rD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),iD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),rD);function Fse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fse(()=>fv=!0),e),{}),Hse=Bv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(fv||Use(),n.schedule(r,i,o)),e},{}),Wse=Bv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});Bv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),oD=e=>{fv=!1,u0.delta=Xw?rD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,Bv.forEach(Vse),Qw=!1,fv&&(Xw=!1,iD(oD))},Use=()=>{fv=!0,Xw=!0,Qw||iD(oD)},jse=()=>u0;function aD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?aD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function sD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=qN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=QN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=aD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function lD(e,t){return t?e*(1e3/t):0}function Yse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=lD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),SL=e=>Jw(e)&&e.hasOwnProperty("z"),yy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return yy(e,t);if(Jw(e)&&Jw(t)){const n=yy(e.x,t.x),r=yy(e.y,t.y),i=SL(e)&&SL(t)?yy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const uD=(e,t)=>1-3*t+3*e,cD=(e,t)=>3*t-6*e,dD=e=>3*e,T4=(e,t,n)=>((uD(t,n)*e+cD(t,n))*e+dD(t))*e,fD=(e,t,n)=>3*uD(t,n)*e*e+2*cD(t,n)*e+dD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+by,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!jN()}function g(b,w){!h()||(GN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),Z8(u)}const ile="production",hD=typeof process>"u"||process.env===void 0?ile:"production",wL=new Set;function pD(e,t,n){e||wL.has(t)||(console.warn(t),n&&console.warn(n),wL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(hD!=="production"&&pD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function gD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:J8,easeIn:e7,easeInOut:tD,easeOut:Cse,circIn:nD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},CL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",_L=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),kL={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:xy,scaleY:xy,scale:xy,opacity:IS,backgroundColor:IS,color:IS,default:xy},ble=(e,t)=>{let n;return cv(t)?n=yle:n=kL[e]||kL.default,{to:t,...n(t)}},xle={...LN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},mD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),vD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),mD);function Cle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cle(()=>hv=!0),e),{}),ws=Fv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(hv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Fv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Fv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),yD=e=>{hv=!1,c0.delta=t9?mD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Fv.forEach(kle),n9=!1,hv&&(t9=!1,vD(yD))},Ele=()=>{hv=!0,t9=!0,n9||vD(yD)},r9=()=>c0;function bD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(CL):CL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_L(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):EL(a)&&typeof n=="string"?a=PL(n):!Array.isArray(n)&&EL(n)&&typeof a=="string"&&(n=PL(a));const l=_L(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Yse({...g,...o}):sD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=zN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function EL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=bD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _m{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Dle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new _m,this.velocityUpdateSubscribers=new _m,this.renderSubscribers=new _m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?lD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function O0(e){return new Dle(e)}const xD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},SD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>SD.find(xD(e)),Ble=[...SD,to,vu],Fle=e=>Ble.find(xD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return K8(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=zN(o[a]);Wle(e,a,s)}}function Ule(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=wD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>wD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Kle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function wD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Nv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?cv(G)&&cv(W)?!gD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[Gn.Animate]:gf(!0),[Gn.InView]:gf(),[Gn.Hover]:gf(),[Gn.Tap]:gf(),[Gn.Drag]:gf(),[Gn.Focus]:gf(),[Gn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class CD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=OS(h,this.transformPagePoint),FN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},$N(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y8(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function LL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:LL(e,_D(t)),offset:LL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function _D(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=_D(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function TL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function OL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lue(e,{top:t,left:n,bottom:r,right:i}){return{x:OL(e.x,n,i),y:OL(e.y,t,r)}}function RL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=dv(t.min,t.max-r,e.min):r>i&&(n=dv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:NL(e,"left","right"),y:NL(e,"top","bottom")}}function NL(e,t,n){return{min:DL(e,t),max:DL(e,n)}}function DL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pm=()=>({x:zL(),y:zL()}),BL=()=>({min:0,max:0}),ki=()=>({x:BL(),y:BL()});function sl(e){return[e("x"),e("y")]}function kD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||ED(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ED(e){return FL(e.x)||FL(e.y)}function FL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function $L(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=$L(e.min,t,n,r,i),e.max=$L(e.max,t,n,r,i)}function PD(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(Y8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=UN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Sue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new CD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Sy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yue(r,i.root,this.visualElement.getTransformPagePoint());let a=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=kD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!Sy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!Sy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!Sy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Sy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new CD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),Z8(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},TD={current:!1};function kue(){if(TD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const wy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=wy.map(()=>new _m),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{wy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+wy[i]]=o=>r.add(o),n["notify"+wy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const AD=Object.keys(lv),Lue=AD.length,ID=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=vN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),TD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K8(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),RD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(RD),ND=(e,t)=>{e.set(t,!1),e.set(t)},WL=e=>e===ih||e===St;var VL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VL||(VL={}));const UL=(e,t)=>parseFloat(e.split(", ")[t]),jL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const GL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jL(4,13),y:jL(5,14)},zue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=GL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);ND(h,s[u]),e[u]=GL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(RD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Eg(h);const m=t[l];let v;if(cv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const DD={treeType:"dom",readValueFromInstance(e,t){if(Nv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(xN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return LD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q8,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U8(t,n,r,i.transformTemplate)},render:ON},Wue=ID(DD),Vue=ID({...DD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Nv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=RN.has(t)?t:MN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:DN,build(e,t,n,r,i){G8(t,n,r,i.transformTemplate)},render:NN}),Uue=(e,t)=>W8(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function qL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qL(e,t.target.x),r=qL(e,t.target.y);return`${n}% ${r}%`}},KL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(OD,v=>(o.push(v),KL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(KL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Sm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function que(e){const[t,n]=i7(),r=C.exports.useContext(H8);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(yN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const zD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=zD.length,YL=e=>typeof e=="string"?parseFloat(e):e,ZL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(dv(e,t,r))}function QL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QL(e.x,t.x),QL(e.y,t.y)}function JL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JL(e.min,t,n,s,i),e.max=JL(e.max,t,n,s,i)}function eT(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function tT(e,t,n,r){eT(e.x,t,nce,n?.x,r?.x),eT(e.y,t,rce,n?.y,r?.y)}function nT(e){return e.translate===0&&e.scale===1}function FD(e){return nT(e.x)&&nT(e.y)}function $D(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const oT=["","X","Y","Z"],aT=1e3;function HD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hce),this.nodes.forEach(pce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=bD(v,250),Sm.hasAnimatedSinceResize&&(Sm.hasAnimatedSinceResize=!1,this.nodes.forEach(lT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!$D(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&lT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));fT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=P/1e3;uT(m.x,a.x,L),uT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Em(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{Sm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,aT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,aT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&WD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),km(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(sT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):WD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Pm();km(l,o,i.layout);const u=Pm();i.isShared?km(u,e.applyTransform(a,!0),i.measured):km(u,o,i.layout);const h=!FD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Em(b,i.layout,m.layout);const w=ki();Em(w,o,v.actual),$D(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function sT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function uT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){cT(e.x,t.x,n.x,r),cT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function dT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fT(e){dT(e.x),dT(e.y)}function WD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(rT(t),rT(n),.2)}const Sce=HD({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=HD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function VD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=VD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ece({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",pD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(H8).forceRender;l&&(s=l);const u=VD(),h=Tce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),Z8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Hn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),hD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Hn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,pT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pT.enter,i)})},jD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ice({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:$v("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});jD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:$v("chakra-fade",o),custom:m,...GD,animate:h,...u})})});Nce.displayName="Fade";var Dce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},qD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",s),...qD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var gT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(gT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(gT.enter,r),transitionEnd:t?.enter}}},KD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=f9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:$v("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});KD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var Hv=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=gN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:Hv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Qce(e){nb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Hv("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:Hv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Hv("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(jD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:Hv("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Wv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Wv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function rde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ide,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),YD={info:{icon:rde,colorScheme:"blue"},warning:{icon:mT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:mT,colorScheme:"red"},loading:{icon:Wv,colorScheme:"blue"}};function sde(e){return YD[e].colorScheme}function lde(e){return YD[e].icon}var ZD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});ZD.displayName="Alert";var XD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});XD.displayName="AlertDescription";function QD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}QD.displayName="AlertIcon";var JD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});JD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});O4.displayName="NativeImage";var ab=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),vT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Wv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=hde(),r=lo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=mn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":vT(a),"data-loading":vT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(yT,{...O})):x(yT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function yT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Hn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),Cy=e=>e?"":void 0,FS=e=>e?!0:void 0;function bT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":Cy(E),"data-disabled":Cy(i),"data-invalid":Cy(r),"data-readonly":Cy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=ez(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:bT(t?.onFocus,h),onBlur:bT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(tz,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var tz=Pe(function(t,n){const r=J0(),i=ez();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});tz.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var xT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function ST(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function wT(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||xT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",ST,!0),document.addEventListener("keyup",ST,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),xT=!0}function Ade(e){Tde(),e(wT());const t=()=>e(wT());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Nde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nz(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,CT),onTouchStart:ka(Te.onTouchStart,CT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function CT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),rz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=nz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});rz.displayName="Checkbox";function Vde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function R4(e,t,n){return(e-t)*100/(n-t)}function iz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=oz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||Rx(H5,{styles:az}),qde=()=>x(H5,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${az} + `});function Hf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kde(e){return"current"in e}var sz=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>sz()&&e.test(navigator.vendor),Xde=e=>sz()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function _T(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_T(n),a=_T(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,lz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=lz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});uz.displayName="InputLeftAddon";uz.id="InputLeftAddon";var cz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});cz.displayName="InputRightAddon";cz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=lz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});dz.id="InputLeftElement";dz.displayName="InputLeftElement";var fz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});fz.id="InputRightElement";fz.displayName="InputRightElement";function ufe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return re.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var hz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});hz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(hz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var pz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});pz.displayName="Center";var hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var gz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return re.createElement(we.div,{ref:n,__css:w,...b})});gz.displayName="Grid";function kT(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kT(i),gridRow:kT(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[bfe,mz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var vz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});vz.displayName="UnorderedList";var yz=Pe(function(t,n){const r=mz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});yz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=mz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(gz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var bz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});bz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[b9]:od(n,i=>r[i])}}function Pfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var xz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});xz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(xz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var Sz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));Sz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function ET(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>od(w,k=>ET(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>ET(Lw("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(wz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var wz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});wz.displayName="WrapItem";var Afe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Cz=Afe,bp=()=>{},Ife={document:Cz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Mfe=Ife,Ofe={window:Mfe,document:Cz},_z=typeof window<"u"?{window,document}:Ofe,kz=C.exports.createContext(_z);kz.displayName="EnvironmentContext";function Ez(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:_z},[r,n]);return ee(kz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Ez.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Pz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Lz(e){if(!Pz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Tz(e))==null?void 0:t.defaultView)??window}function Tz(e){return Pz(e)?e.ownerDocument:document}function Bfe(e){return Tz(e).activeElement}var Az=e=>e.hasAttribute("tabindex"),Ffe=e=>Az(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Iz(e){return e.parentElement&&Iz(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Mz(e){if(!Lz(e)||Iz(e)||$fe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Hfe(e)?!0:Az(e)}function Wfe(e){return e?Lz(e)&&Mz(e)&&!Ffe(e):!1}var Vfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Oz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Mz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Oz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Vv=[Io,Ba,Fa,Mo],N0="start",pv="end",Xfe="clippingParents",Rz="viewport",Tg="popper",Qfe="reference",PT=Vv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+pv])},[]),Nz=[].concat(Vv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+pv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function che(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Dz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Dz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=z0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function LT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Uv(e){for(var t=Wa(e),n=LT(e);n&&fhe(n)&&yu(n).position==="static";)n=LT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Lm(e,t,n);return r>n?n:r}function Bz(){return{top:0,right:0,bottom:0,left:0}}function Fz(e){return Object.assign({},Bz(),e)}function $z(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Fz(typeof t!="number"?t:$z(t,Vv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Uv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Lm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!zz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:D0(t*i)/i||0,y:D0(n*i)/i||0}}function TT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var R=Uv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===pv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===pv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:B0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,TT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,TT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var _y={passive:!0};function Che(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,_y)}),s&&l.addEventListener("resize",n.update,_y),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,_y)}),s&&l.removeEventListener("resize",n.update,_y)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function AT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Dz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Hz(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Hz(fb(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=Hz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Tm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IT(e,t,n){return t===Rz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Tm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Uv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&zz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},IT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Wz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case pv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function gv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xfe:s,u=n.rootBoundary,h=u===void 0?Rz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Fz(typeof E!="number"?E:$z(E,Vv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Wz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Nz:l,h=B0(r),g=h?s?PT:PT.filter(function(b){return B0(b)===h}):Vv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=gv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[AT(e),t,AT(t)]}function Rhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=gv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function MT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function OT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=gv(t,{elementContext:"reference"}),s=gv(t,{altBoundary:!0}),l=MT(a,r),u=MT(s,i,o),h=OT(l),g=OT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Nz.reduce(function(h,g){return h[g]=Bhe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Wz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=gv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bz(),je=He[te],ct=He[ie],qe=Lm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Uv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Lm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Lm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var RT={placement:"bottom",modifiers:[],strategy:"absolute"};function NT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function rpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var ipe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ope=e=>ipe[e],DT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DT,...e}}:t={enabled:e,options:DT},t}var spe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},dpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BT(e)},effect:({state:e})=>()=>{BT(e)}},BT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:rpe(e.placement)})},hpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ppe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gpe(e,t="ltr"){var n;const r=((n=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Vz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Uz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function vpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function jz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function Gz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}Gz.displayName="PortalManager";var[qz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=xpe(),l=bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(qz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(qz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,ky=new WeakMap,Ey={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ey[n]||(Ey[n]=new WeakMap);var o=Ey[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&ky.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(ky.has(g)||g.removeAttribute(r),ky.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,ky=new WeakMap,Ey={})}},Kz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Yz(){}function Zz(){}Zz.resetWarningCache=Yz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Zz,resetWarningCache:Yz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Xz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Qz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Jz(e){return e}function eB(e,t){t===void 0&&(t=Jz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Jz),eB(e,t)}function tB(e){e===void 0&&(e={});var t=eB(null);return t.options=hl({async:!0,ssr:!1},e),t}var nB=function(e){var t=e.sideCar,n=UD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};nB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),nB}var rB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),iB=R7(),zpe=R7(),Bpe=tB({async:!0}),Fpe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&rB.useMedium(ct)},[]),X=iB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Xz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Qz([n,me]);return ee(Hn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const oB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function aB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return aB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),gB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],gB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(gB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return uB(t,n)}).filter(function(n){return jpe(n)})},FT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return cB(t,n)})},k9=function(e,t,n){return pB($7(F7(e,n),t),!0,n)},$T=function(e,t){return pB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},mv=function(e,t){return e.shadowRoot?mv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return mv(n,t)})},Jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},mB=function(e){return e.parentNode?mB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(mB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Xz,'="disabled"])')))):[r]),n},[])},vB=function(e){return e.activeElement?e.activeElement.shadowRoot?vB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?vB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},yB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return mv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return mv(t,e)}):!1},r0e=function(e,t){return t.filter(hB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return hB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HT=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},bB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=WT(e,0),k=WT(e,i-1);if(l===-1||h===-1)return bB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a0e=function(e){return function(t){var n,r=(n=dB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FT(r.filter(a0e(n)));return i&&i.length?HT(i):HT(FT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},xB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||mv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=xB(n||e,e,r),o=new Map,a=$T(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$T([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===bB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=xB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const SB=h0e;function wB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,vv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function VT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var x0e=function(t){return t&&"current"in t?t.current:t},S0e=function(t){return t?Boolean(vv):vv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(yB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=SB(g,qp,{focusOptions:l}),h0={})),vv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),VT(b,v.length,1,v),VT(b,-1,-1,v))}}}return t},CB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return wB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},_B=function(){vv="just",setTimeout(function(){vv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",CB),document.addEventListener("focusout",U7),window.addEventListener("blur",_B)},P0e=function(){document.removeEventListener("focusin",CB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",_B)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),B4(),wB(B4)):(P0e(),qp=null)}rB.assignSyncMedium(_0e);iB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:SB,focusInside:yB})});const A0e=$pe(L0e,T0e)(k0e);var kB=C.exports.forwardRef(function(t,n){return x(oB,{sideCar:A0e,ref:n,...t})}),EB=oB.propTypes||{};EB.sideCar;O7(EB,["sideCar"]);kB.propTypes={};const I0e=kB;var PB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Oz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};PB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",LB=tB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=UD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Qz([n,t]),O=hl(hl({},k),i);return ee(Hn,{children:[h&&x(L,{sideCar:LB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},TB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V0e=TB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(M0e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(E3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(P3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(E3," .").concat(E3,` { + right: 0 `).concat(r,`; + } + + .`).concat(P3," .").concat(P3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(O0e,": ").concat(s,`px; + } +`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Py=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Py,Py),window.removeEventListener("test",Py,Py)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},AB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return AB(e,"overflowY")},K0e=function(e){return AB(e,"overflowX")},UT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=IB(e,n);if(r){var i=MB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},IB=function(e,t){return e==="v"?q0e(t):K0e(t)},MB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=MB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&IB(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jT=function(e){return[e.deltaX,e.deltaY]},GT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},t1e=0,Cp=[];function n1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(t1e++)[0],o=C.exports.useState(function(){return TB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=d9([e.lockRef.current],(e.shards||[]).map(GT),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Ly(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-P[0],I="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=UT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?jT(E):Ly(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(GT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Ly(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Ly(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Hn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(LB,n1e);var OB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});OB.classNames=hb.classNames;const RB=OB;var sh=(...e)=>e.filter(Boolean).join(" ");function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Yg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Yg(z.onClick,R),onKeyDown:Yg(z.onKeyDown,E),onMouseDown:Yg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Kz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Yg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function NB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(PB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(RB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...qD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],DB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});DB.displayName="ModalTransition";var yv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=sh("chakra-modal__content",n),m=lh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return re.createElement(NB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(DB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});yv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),bv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:GD),__css:l,ref:t,className:a,...o})});bv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(yv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(KD),b1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=sh("chakra-modal__content",n),v=lh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=v1e();return re.createElement(NB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var zB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),w1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function qT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var C1e=50,KT=300;function _1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);qT(ct,"disabled",Te.stop,Te.isSpinning),qT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:zB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var BB=Pe(function(t,n){const r=pb();return re.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});BB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:zB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var FB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(FB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(FB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var jv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,Gv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Uz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Vz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=jz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=YT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=YT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function YT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=Gv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:jv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=Gv();return re.createElement(we.div,{...r(t,n),className:jv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=Gv();return x(cb,{size:"sm",onClick:r,className:jv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H1e=we(Il.section),$B=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});$B.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=Gv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x($B,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:jv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=Gv();return re.createElement(we.header,{...r(t,n),className:jv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function HB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var WB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};WB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=HB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(WB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=HB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),VB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});VB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var UB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});UB.displayName="SelectField";var jB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(UB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(GB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});jB.displayName="Select";var nge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),GB=e=>{const{children:t=x(nge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};GB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function qB(e){return!!e.touches}function age(e){return qB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function KB(e,t="page"){return qB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:KB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function YB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:KB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$Q.update(this.updatePoint)}};function ZT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:ZT(e.point,t[t.length-1]),offset:ZT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function XT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(XT(e)&&XT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function ZB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=YB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function XB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=XB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Zg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ty=e=>e||T3;function QB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Zg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ty(w).height>Ty(E).height?w:E,T3):r.reduce((w,E)=>Ty(w).width>Ty(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Zg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Zg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Zg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function JB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=JB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=XB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),iz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>QB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};ZB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Zg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eF=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});eF.defaultProps={orientation:"horizontal"};eF.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=JB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=YB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=iz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return QB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}ZB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var tF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});tF.displayName="SliderThumb";var nF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});nF.displayName="SliderTrack";var rF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});rF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),QT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=nz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QT(s.isChecked),"data-hover":QT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,iF,$ge,Hge]=gN();function Wge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Vge,qv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=qv(),i=iF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=qv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:oF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":aF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=qv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:aF(n,s),tabId:oF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=qv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=jz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zge(){const e=qv(),t=iF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function oF(e,t){return`${e}--tab-${t}`}function aF(e,t){return`${e}--tabpanel-${t}`}var[Xge,Kv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),sF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});sF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=Kv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...Kv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var lF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=Kv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});lF.displayName="TabPanel";var uF=Pe(function(t,n){const r=Kge(t),i=Kv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});uF.displayName="TabPanels";var cF=Pe(function(t,n){const r=Kv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});cF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],dF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});dF.displayName="Textarea";function rme(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ame=(e,t)=>e.find(n=>n.id===t);function JT(e,t){const n=fF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function fF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=JT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:hF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=fF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(JT(pl.getState(),i).position)}}var eA=0;function dme(e,t={}){eA+=1;const n=t.id??eA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(ZD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(QD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(JD,{id:u?.title,children:i}),s&&x(XD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function hF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=hF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=fN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},pF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});pF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=pF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Hn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Uz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Vz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Hn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Hn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Ez,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(pR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(Gz,{zIndex:r,children:l}):l]})})};function gF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function mF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function vF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=bF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return xv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===xv&&(xv=e.l)}function tA(e){return xv={p:[],l:xv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==yF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(mF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function rA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Sv;a&&(l=[s],u=Xg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||mF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return Sv.get(l,o)},set:function(l){var u=this[nr];Sv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!vF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,xF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function SF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G4}function i(s,l){r(s)===G4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bme=function(t,n){return t===n};function Fme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wve:Sve;EF.useSyncExternalStore=$0.useSyncExternalStore!==void 0?$0.useSyncExternalStore:Cve;(function(e){e.exports=EF})(kF);var PF={exports:{}},LF={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var bb=C.exports,_ve=kF.exports;function kve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eve=typeof Object.is=="function"?Object.is:kve,Pve=_ve.useSyncExternalStore,Lve=bb.useRef,Tve=bb.useEffect,Ave=bb.useMemo,Ive=bb.useDebugValue;LF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ave(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,Eve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Pve(e,o[0],o[1]);return Tve(function(){a.hasValue=!0,a.value=s},[s]),Ive(s),s};(function(e){e.exports=LF})(PF);function Mve(e){e()}let TF=Mve;const Ove=e=>TF=e,Rve=()=>TF,ld=C.exports.createContext(null);function AF(){return C.exports.useContext(ld)}const Nve=()=>{throw new Error("uSES not initialized!")};let IF=Nve;const Dve=e=>{IF=e},zve=(e,t)=>e===t;function Bve(e=ld){const t=e===ld?AF:()=>C.exports.useContext(e);return function(r,i=zve){const{store:o,subscription:a,getServerState:s}=t(),l=IF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Fve=Bve();var $ve={exports:{}},On={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),xb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),wb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),_b=Symbol.for("react.context"),Hve=Symbol.for("react.server_context"),kb=Symbol.for("react.forward_ref"),Eb=Symbol.for("react.suspense"),Pb=Symbol.for("react.suspense_list"),Lb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Wve=Symbol.for("react.offscreen"),MF;MF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case xb:case wb:case Sb:case Eb:case Pb:return e;default:switch(e=e&&e.$$typeof,e){case Hve:case _b:case kb:case Tb:case Lb:case Cb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=_b;On.ContextProvider=Cb;On.Element=p_;On.ForwardRef=kb;On.Fragment=xb;On.Lazy=Tb;On.Memo=Lb;On.Portal=g_;On.Profiler=wb;On.StrictMode=Sb;On.Suspense=Eb;On.SuspenseList=Pb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===_b};On.isContextProvider=function(e){return Va(e)===Cb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===kb};On.isFragment=function(e){return Va(e)===xb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Lb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===wb};On.isStrictMode=function(e){return Va(e)===Sb};On.isSuspense=function(e){return Va(e)===Eb};On.isSuspenseList=function(e){return Va(e)===Pb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xb||e===wb||e===Sb||e===Eb||e===Pb||e===Wve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Lb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===kb||e.$$typeof===MF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})($ve);function Vve(){const e=Rve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const mA={notify(){},get:()=>[]};function Uve(e,t){let n,r=mA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Vve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const jve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gve=jve?C.exports.useLayoutEffect:C.exports.useEffect;function qve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Uve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Gve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function OF(e=ld){const t=e===ld?AF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Kve=OF();function Yve(e=ld){const t=e===ld?Kve:OF(e);return function(){return t().dispatch}}const Zve=Yve();Dve(PF.exports.useSyncExternalStoreWithSelector);Ove(Al.exports.unstable_batchedUpdates);var m_="persist:",RF="persist/FLUSH",v_="persist/REHYDRATE",NF="persist/PAUSE",DF="persist/PERSIST",zF="persist/PURGE",BF="persist/REGISTER",Xve=-1;function A3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A3=function(n){return typeof n}:A3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A3(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qve(e){for(var t=1;t{Object.keys(R).forEach(function(D){!L(D)||h[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){R[D]===void 0&&L(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),D=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(D!==void 0)try{g[R]=l(D)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(I)}function L(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function I(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function n2e(e){return JSON.stringify(e)}function r2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=i2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function i2e(e){return JSON.parse(e)}function o2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key);return t.removeItem(n,a2e)}function a2e(e){}function yA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function u2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var c2e=5e3;function d2e(e,t){var n=e.version!==void 0?e.version:Xve;e.debug;var r=e.stateReconciler===void 0?e2e:e.stateReconciler,i=e.getStoredState||r2e,o=e.timeout!==void 0?e.timeout:c2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=l2e(m,["_persist"]),w=b;if(g.type===DF){var E=!1,P=function(z,$){E||(g.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=t2e(e)),v)return nu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,V){return Promise.resolve($)};z(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===zF)return s=!0,g.result(o2e(e)),nu({},t(w,g),{_persist:v});if(g.type===RF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===NF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(nu({},R,{_persist:v}))}}function bA(e){return p2e(e)||h2e(e)||f2e()}function f2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function h2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function p2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:FF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case BF:return F9({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),F9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function v2e(e,t,n){var r=n||!1,i=f_(m2e,FF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:BF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=F9({},i,{purge:function(){var u=[];return e.dispatch({type:zF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:NF})},persist:function(){e.dispatch({type:DF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=x2e;function I3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I3=function(n){return typeof n}:I3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I3(e)}function l6(){}var y2e={getItem:l6,setItem:l6,removeItem:l6};function b2e(e){if((typeof self>"u"?"undefined":I3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function x2e(e){var t="".concat(e,"Storage");return b2e(t)?self[t]:y2e}y_.__esModule=!0;y_.default=C2e;var S2e=w2e(b_);function w2e(e){return e&&e.__esModule?e:{default:e}}function C2e(e){var t=(0,S2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var $F=void 0,_2e=k2e(y_);function k2e(e){return e&&e.__esModule?e:{default:e}}var E2e=(0,_2e.default)("local");$F=E2e;var HF={},WF={},Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.PLACEHOLDER_UNDEFINED=Jf.PACKAGE_NAME=void 0;Jf.PACKAGE_NAME="redux-deep-persist";Jf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Jf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,ie){ie||(ie=new Set([j])),te||(te="");for(const le in j){const G=te?`${te}.${le}`:le,W=j[le];if((0,e.isObjectLike)(W))return ie.has(W)?`${te}.${le}:`:(ie.add(W),(0,e.getCircularPath)(W,G,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const ie in j){const le=j[ie];te[ie]=(0,e._cloneDeep)(le)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const ie=(0,e.cloneDeep)(j),le=(0,e.cloneDeep)(te),G=Object.keys(ie).reduce((q,Q)=>(h.call(le,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(ie)||(0,e.isDate)(le))return ie.valueOf()===le.valueOf()?{}:le;const W=Object.keys(le).reduce((q,Q)=>{if(!h.call(ie,Q))return q[Q]=le[Q],q;const X=(0,e.difference)(ie[Q],le[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(le)||!(0,e.isArray)(ie)&&(0,e.isArray)(le)?le:q:(q[Q]=X,q)},G);return delete W._persist,W};e.difference=b;const w=function(j,te){return te.reduce((ie,le)=>{if(ie){const G=parseInt(le,10),W=(0,e.isIntegerString)(le)&&G<0?ie.length+G:le;return(0,e.isString)(ie)?ie.charAt(W):ie[W]}},j)};e.path=w;const E=function(j,te){return[...j].reverse().reduce((G,W,q)=>{const Q=(0,e.isIntegerString)(W)?[]:{};return Q[W]=q===0?te:G,Q},{})};e.assocPath=E;const P=function(j,te){const ie=(0,e.cloneDeep)(j);return te.reduce((le,G,W)=>(W===te.length-1&&le&&(0,e.isObjectLike)(le)&&delete le[G],le&&le[G]),ie),ie};e.dissocPath=P;const k=function(j,te,...ie){if(!ie||!ie.length)return te;const le=ie.shift(),{preservePlaceholder:G,preserveUndefined:W}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(le))for(const q in le)if((0,e.isObjectLike)(le[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],le[q]);else if((0,e.isArray)(te)){let Q=le[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=le[q]!==t.PLACEHOLDER_UNDEFINED?le[q]:void 0;te[q]=Q}return k(j,te,...ie)},L=function(j,te,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=L;const I=function(j,te=[],ie,le,G){if(!(0,e.isObjectLike)(j))return j;for(const W in j){const q=j[W],Q=(0,e.isArray)(j),X=le?le+"."+W:W;q===null&&(ie===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),q===void 0&&G&&ie===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,ie,X,G)}},O=function(j,te,ie,le){const G=(0,e.cloneDeep)(j);return I(G,te,ie,"",le),G};e.preserveUndefined=O;const R=function(j,te,ie){return ie.indexOf(j)===te};e.unique=R;const D=function(j){return j.reduce((te,ie)=>{const le=j.filter(me=>me===ie),G=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:W,subsets:q}=te,Q=le.length>1&&W.indexOf(ie)===-1,X=G.length>1;return{duplicates:[...W,...Q?le:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,ie){const le=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${le} configuration.`,W=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${W}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. + + ${JSON.stringify(q)} + + ${W}`);if(Q.length>1)throw new Error(`${G} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(Q)} + + ${W}`)};e.singleTransformValidator=z;const $=function(j){if(!(0,e.isArray)(j))return;const te=j?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(te.length){const ie=te.filter((le,G)=>te.indexOf(le)!==G);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const V=function({whitelist:j,blacklist:te}){if(j&&j.length&&te&&te.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:ie,subsets:le}=(0,e.findDuplicatesAndSubsets)(j);(0,e.throwError)({duplicates:ie,subsets:le},"whitelist")}if(te){const{duplicates:ie,subsets:le}=(0,e.findDuplicatesAndSubsets)(te);(0,e.throwError)({duplicates:ie,subsets:le},"blacklist")}};e.configValidator=V;const Y=function({duplicates:j,subsets:te},ie){if(j.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. + + ${JSON.stringify(j)}`);if(te.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,ie)=>{const le=ie.split("."),G=le[0],W=le.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:W?[W]:void 0}),q&&!Q&&W&&(q[G]=[W]),q&&Q&&W&&Q.push(W),te},[]):[]};e.getRootKeysGroup=de})(WF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,L):P,out:(P,k,L)=>!E(k)&&m?m(P,k,L):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>R.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...V,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(HF);const M3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),P2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?P2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),K4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),L2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Vn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var s2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function l2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function P2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=k2,Wo.prototype.delete=E2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=P2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:ck(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Un($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(c);return function(S){return jh(S,c,p)}}function jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:Hk(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(hk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return N2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=h2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function I2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return Qd?un(Qd.call(c)):{}}function M2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function O2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ +/* [wrapped with `+p+`] */ +`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function N2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function D2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:D2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return Ek(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=bk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:D2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(xk),QU=ug(Sk);function JU(c,p){return Lr(z2(c,p),1)}function ej(c,p){return Lr(z2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(z2(c,p),S)}function Pk(c,p){var S=Rt(c)?Un:Qa;return S(c,Le(p,3))}function Lk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),W2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function z2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?r2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,$2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return W2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),B2=p2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Tk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ik=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ik));A|=O}return he(p,A,c,S,N)});function Mk(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Jk=p-is;return Ae?Kr(Jk,F-Ql):Jk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=B2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(B2())}function Xo(){var Mr=B2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function F2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(F2.Cache||Vo),S}F2.Cache=Vo;function $2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Sj(c){return Ak(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&H2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=g2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function H2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return Bk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Dk(c)&&c>=-W&&c<=W}var Fk=Bs?Er(Bs):Bt;function W2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(xo(c))return W2(c)?Di(c):wi(c);if(Xu&&c[Xu])return l2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Wk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){wa(p,So(p),c)}),V2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return jk(c,$2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Dx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(S1,s2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=V2({},p,A,Re);var N=V2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` +`;c.replace(Ge,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Ae+=c.slice(_e,Xo).replace(w1,$s),Gt&&(J=!0,Ae+=`' + +__e(`+Gt+`) + +'`),Ji&&(ce=!0,Ae+=`'; +`+Ji+`; +__p += '`),en&&(Ae+=`' + +((__t = (`+en+`)) == null ? '' : __t) + +'`),_e=Xo+bt.length,bt}),Ae+=`'; +`;var yt=tn.call(p,"variable")&&p.variable;if(!yt)Ae=`with (obj) { +`+Ae+` +} +`;else if(h1.test(yt))throw new _t(s);Ae=(ce?Ae.replace(Qt,""):Ae).replace(Qn,"$1").replace(uo,"$1;"),Ae="function("+(yt||"obj")+`) { +`+(yt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(J?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Ae+`return __p +}`;var $t=Xk(function(){return Jt(F,ht+"return "+Ae).apply(n,K)});if($t.source=Ae,Mx($t))throw $t;return $t}function rq(c){return Sn(c).toLowerCase()}function iq(c){return Sn(c).toUpperCase()}function oq(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Di(p),F=$o(A,N),K=Ka(A,N)+1;return ts(A,F,K).join("")}function aq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,A1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Ka(A,Di(p))+1;return ts(A,0,N).join("")}function sq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Mu,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),N=$o(A,Di(p));return ts(A,N).join("")}function lq(c,p){var S=V,A=Y;if(lr(p)){var N="separator"in p?p.separator:N;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,d2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Un(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:D2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Un(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=x2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,VF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&VF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},UF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?VF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),jF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=jF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),GF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=GF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),qF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),KF=De((e,t)=>{var n=Mb(),r=qF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),YF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),K2e=De((e,t)=>{var n=KF(),r=q2e(),i=qF(),o=YF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),J2e=De((e,t)=>{var n=Ob(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),eye=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),ZF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=ZF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=ZF(),r=cye(),i=dye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),XF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=jF(),o=XF(),a=mye(),s=vye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Cye=De((e,t)=>{var n=Sye(),r=wye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),_ye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),QF=De((e,t)=>{var n=_u(),r=Pye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Lye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Tye=De((e,t)=>{var n=Mb(),r=JF(),i=Nb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=GF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),e$=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=QF(),a=Lye(),s=e$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),zye=De((e,t)=>{var n=KF(),r=JF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=YF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=XF(),i=yye(),o=$ye(),a=jye(),s=__(),l=QF(),u=e$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),t$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Am(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return n$(e,["input","textarea","select"])}function n$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Jye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var e3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=UF(t$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var SA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!n$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Am(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){SA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Am(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Am(w,u?.combinationKey)))}},[e,l,u,h]),i}UF(t$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Am(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Am(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const c3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),d3e=st({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),m3e=st({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const v3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(jB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var r$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=re.createContext&&re.createContext(r$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function fh(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(Sz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Hn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(nF,{className:"invokeai__slider_track",...Y,children:x(rF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(tF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(BB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(pC(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(pC(.5))}})}const s$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},l$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(t2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const u$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(t2(u$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Zv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(gC(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(mC(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(rz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},c$=yb({name:"system",initialState:t4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:_A,setSocketId:iEe,setShouldConfirmOnDelete:d$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:f$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=c$.actions,d4e=c$.reducer;function f4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function h$(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function p$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function g$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function m$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function v$(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function y$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function b$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function A4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function I4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function O4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function R4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function N4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function D4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function F4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function x$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function $4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function H4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function U4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function G4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function f6(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function I_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Ay;const e5e=new Uint8Array(16);function t5e(){if(!Ay&&(Ay=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ay))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ay(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:r5e};function Ap(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Iy=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",S$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},LA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...LA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...LA}},w$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,E=Ve.clamp(m,64,h),P=Ve.clamp(v,64,g),k=b>0?i-b:i,L=w>0?o-w:o,I=Ve.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-E),O=Ve.clamp(L,e[e.currentCanvas].stageCoordinates.y,g-P);e[e.currentCanvas].boundingBoxDimensions={width:E,height:P},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(z$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:C$,setEraserSize:u5e,addLine:_$,addPointToCurrentLine:k$,setShouldPreserveMaskedArea:E$,setIsMaskEnabled:P$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:L$,clearMask:T$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:A$,setStageDimensions:TA,setImageToInpaint:Y4,setImageToOutpaint:I$,setBoundingBoxDimensions:Qg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:M$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:O$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:AA,setShouldLockBoundingBox:R$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:My,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:N$,setCurrentCanvas:D$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=w$.actions,k5e=w$.reducer,z$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Xv=Qe([jt],e=>e.layerState.objects.find(S$)),B$=Qe([e=>e.options,e=>e.system,Xv,vn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function F$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(B$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(vz,{children:o.map((u,h)=>x(yz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),H$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(F$,{}),x(H$,{}),x($$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(B$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(dF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function W$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function V$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},U$=re.createContext(null);var j$=function(t){return t.scrollTop},Jg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Jg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Jg?{status:wf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this);a&&j$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Jg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[sy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:sy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Jg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(U$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=U$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Jg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},K$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);q$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(G$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(W$,{}):x(V$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:K$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(s$,{}),feature:Xr.OTHER,options:x(l$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(d$(!b.target.checked));return ee(Hn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(bv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(_v(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(t2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(I$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(y$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Zv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(v$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},Z$=yb({name:"gallery",initialState:U5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Oy,clearIntermediateImage:DA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Ry,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});st({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});st({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});st({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});st({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});st({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});st({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});st({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});st({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});st({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});st({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});st({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});st({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});st({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});st({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});st({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});st({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});st({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});st({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});st({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});st({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});st({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});st({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});st({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});st({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});st({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});st({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});st({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});st({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});st({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});st({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});st({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});st({displayName:"SpinnerIcon",path:ee(Hn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});st({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});st({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});st({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});st({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});st({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});st({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});st({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});st({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});st({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});st({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});st({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function J5e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Hn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(gC(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(mC(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(t2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(_v(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(vC(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(pC(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Hn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(gC($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(mC(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(pz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(F_())},h=()=>{e(B_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(g$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Hn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Hn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(rbe,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function obe(e){return lt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var abe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],HA="__resizable_base__",rH=function(e){ube(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(HA):o.className+=HA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ep("left",o),s=i&&Ep("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Dy(n,I,O),r=Dy(r,R,D)}else n=Dy(n,h,g),r=Dy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&dbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&zy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=zy(n)?n.touches[0].clientX:n.clientX,h=zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=fbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=$A(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(lbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Qv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pbe(i,...t)]}function pbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});wv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Qv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(wv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let WA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){lH(wbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function UA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},Tbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,jA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,jA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),qA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=GA(t,e),r=GA(t.reverse(),e);return[n,r]}function uH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const qA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=i1(t),l=H_(s),u=r[l]/2-i[l]/2,h=r1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=YA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=H_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[XA(e),t,XA(t)]}const Kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Q4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await Q4(t,l),g=i1(r1(i)),m=dH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=i1(i),m=dH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Jv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Jv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const eI=Math.min,Im=Math.max,e5=Math.round;function wu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||wd(e)}function tI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(W_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=tI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function nI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function axe(e,t){const n=Pu(e),r=wd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Im(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Im(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Jv(i||n).direction==="rtl"&&(s+=Im(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function rI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Jv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Im(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Im(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:nI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jv(e).direction==="rtl"};function hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...cd(e)?t5(e):[],...t5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!X9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=gxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const vxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const bH="Popper",[V_,xH]=Qv(bH),[bxe,SH]=V_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=V_(n5),[_xe,kxe]=V_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=wH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Fy(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Fy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=Fy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Fy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Fy(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[Q9,_H,Bxe]=aH(U_),[Fxe,kH]=Qv(U_,[Bxe]),[$xe,Hxe]=Fxe(U_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Qv(ex,[nSe,xH,kH]),j_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,G_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Kz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=tx(td,n),E=G_(td,n),P=j_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?RB:C.exports.Fragment,ie=v?{as:wv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:Kn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,tC(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),eC="MenuItem",iI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(eC,e.__scopeMenu),s=AH(eC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(eC,n),s=TH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,tC(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,tC(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function tC(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Qv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,$y(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,$y(u)),onPointerCancel:Kn(e.onPointerCancel,$y(u)),onPointerUp:Kn(e.onPointerUp,$y(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function $y(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(t2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(_v(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(I$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:m$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),q$(D,j,!o),x(G$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Hn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Ry("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Ry("user")),children:"User"})]}):ee(Hn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Ry("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Ry("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(W$,{}):x(V$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Hn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(h$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(O$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Qg({...a,width:Math.floor(g)})),t=="height"&&r(Qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Qg({...a,width:Math.floor(s)})),t=="height"&&r(Qg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(R$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(a$,{size:22}):x(o$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Hn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function nC(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var W0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(aI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=rC(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(sI(P),!function(I,O){return O&&!Mm(I)}(P,l.current)&&k)){if(Mm(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(aI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},iC=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:iC({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:iC({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:iC(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=nC(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;BH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,lI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(L$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(C$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(x$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(b$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(T$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(P$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(a$,{size:22}):x(o$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(E$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(R$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Xv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const{width:o,height:a}=r.image,{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(M$(u)),n==="inpainting"?e(TA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(TA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Wv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",uI="Konva error: ",K6e="rgb(",_6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Hy=[];const Z6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Hy.push(e),Hy.length===1&&Z6e(function(){const t=Hy;Hy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,j6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Mg+a(t),l=Og+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Mg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(cI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];cn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Vy="allEventListeners",ru="absoluteTransform",fI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",oC="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",R3=" ",vI="stage",_c="transform",gwe="Stage",aC="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===_c||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===_c||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(O3),this._clearSelfAndDescendantCache(fI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==hwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(oC,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(aC,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==gwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_c),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(_c);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(_c),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(O3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;cn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Pp=e=>{const t=rm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",N3=[];class lx extends aa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===bwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new S0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+yI,this.content.style.height=n+yI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rwwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(sC,{evt:t}):this._fire(sC,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(lC,{evt:t}):this._fire(lC,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,Q_(t)),Om(t.pointerId)}_lostpointercapture(t){Om(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let Ky;function P6(){return Ky||(Ky=fe.createCanvasElement().getContext("2d"),Ky)}const Rm={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Rm)););this.colorKey=n,Rm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Rm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new X_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class J_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Nm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Bwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Nm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function uC(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function CI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",cC="up",dC="right",fC="down",hC="left",Uwe=cW.length;class ek extends V0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var _I=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Zy;function A6(){return Zy||(Zy=fe.createCanvasElement().getContext(qwe),Zy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Yy+this.fontVariant()+Yy+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Yy||te===kI;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Yy),z.lastIndexOf(kI))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+T6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),LI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],TI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function bW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(LI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(LI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-TI,y:-TI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new e2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new AI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||T[H]!==M[se]){var he=` +`+T[H].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=se);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Nl(d):""}var Ch=Object.prototype.hasOwnProperty,Ru=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Ru[Rs],Ru[Rs]=null,Rs--)}function bn(d,f){Rs++,Ru[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var T={},M;for(M in y)T[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function zl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var T in _)if(!(T in f))throw Error(a(108,z(d)||"Unknown",T));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ad(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=zl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Id,_h=Math.log,kh=Math.LN2;function Id(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var Ds=64,co=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Bl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,T=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~T;se!==0?_=zs(se):(M&=H,M!==0&&(_=zs(M)))}else H=y&~T,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&T)===0&&(T=_&-_,M=f&-f,T>=M||T===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,T-=H,Gi=1<<32-gi(f)+T|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var Kt=Ye(ge,kt,be[Ft],We);if(Kt===null){kt===null&&(kt=Br);break}d&&kt&&Kt.alternate===null&&f(ge,kt),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,Kt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Tt===null?Le=ns:Tt.sibling=ns,Tt=ns,kt=Br}if(Kt.done)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;!Kt.done;Ft++,Kt=be.next())Kt=Lt(ge,Kt.value,We),Kt!==null&&(ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return zn&&Bs(ge,Ft),Le}for(kt=_(ge,kt);!Kt.done;Ft++,Kt=be.next())Kt=Fn(kt,ge,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&kt.delete(Kt.key===null?Ft:Kt.key),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Le}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Le=be.key,Tt=ue;Tt!==null;){if(Tt.key===Le){if(Le=be.type,Le===h){if(Tt.tag===7){y(ge,Tt.sibling),ue=T(Tt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Tt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===L&&A1(Le)===Tt.type){y(ge,Tt.sibling),ue=T(Tt,be.props),ue.ref=ba(ge,Tt,be),ue.return=ge,ge=ue;break e}y(ge,Tt);break}else f(ge,Tt);Tt=Tt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=lf(be.type,be.key,be.props,null,ge.mode,We),We.ref=ba(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Tt=be.key;ue!==null;){if(ue.key===Tt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=T(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case L:return Tt=be._init,Ko(ge,ue,Tt(be._payload),We)}if(ie(be))return Ln(ge,ue,be,We);if(R(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=T(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var ju=d2(!0),f2=d2(!1),Ud={},go=No(Ud),xa=No(Ud),oe=No(Ud);function xe(d){if(d===Ud)throw Error(a(174));return d}function ve(d,f){bn(oe,f),bn(xa,d),bn(go,Ud),d=G(f),Pn(go),bn(go,d)}function Ke(){Pn(go),Pn(xa),Pn(oe)}function _t(d){var f=xe(oe.current),y=xe(go.current);f=W(y,d.type,f),y!==f&&(bn(xa,d),bn(go,f))}function Jt(d){xa.current===d&&(Pn(go),Pn(xa))}var Ot=No(0);function un(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Mu(y)||Ld(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var jd=[];function I1(){for(var d=0;dy?y:4,d(!0);var _=Gu.transition;Gu.transition={};try{d(!1),f()}finally{Ht=y,Gu.transition=_}}function Ju(){return yi().memoizedState}function F1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},tc(d))nc(f,y);else if(y=Uu(d,f,y,_),y!==null){var T=ai();yo(y,d,_,T),Xd(y,f,_)}}function ec(d,f,y){var _=Ar(d),T={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(tc(d))nc(f,T);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,se=M(H,y);if(T.hasEagerState=!0,T.eagerState=se,U(se,H)){var he=f.interleaved;he===null?(T.next=T,Wd(f)):(T.next=he.next,he.next=T),f.interleaved=T;return}}catch{}finally{}y=Uu(d,f,T,_),y!==null&&(T=ai(),yo(y,d,_,T),Xd(y,f,_))}}function tc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function nc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Fl(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},px={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:g2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Vl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Vl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Vl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=F1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:p2,useDebugValue:D1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=p2(!1),f=d[0];return d=B1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,T=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Wl&30)!==0||N1(_,f,y)}T.memoizedState=y;var M={value:y,getSnapshot:f};return T.queue=M,g2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Yd(9,Xu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=qu++,0np&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304)}else{if(!_)if(d=un(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),oc(T,!0),T.tail===null&&T.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Vn()-T.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304);T.isBackwards?(M.sibling=f.child,f.child=M):(d=T.last,d!==null?d.sibling=M:f.child=M,T.last=M)}return T.tail!==null?(f=T.tail,T.rendering=f,T.tail=f.sibling,T.renderingStartTime=Vn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return pc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),it&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function q1(d,f){switch(E1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),I1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Hu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return $d(f.type._context),null;case 22:case 23:return pc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,xx=typeof WeakSet=="function"?WeakSet:Set,Je=null;function ac(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Vh=!1;function jl(d,f){for(q(d.containerInfo),Je=f;Je!==null;)if(d=Je,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Je=f;else for(;Je!==null;){d=Je;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),T);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:it&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){jn(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Je=f;break}Je=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var T=_=_.next;do{if((T.tag&d)===d){var M=T.destroy;T.destroy=void 0,M!==void 0&&Uo(f,y,M)}T=T.next}while(T!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=le(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function K1(d){var f=d.alternate;f!==null&&(d.alternate=null,K1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function sc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||sc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Gh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Fe(y,d,f):At(y,d);else if(_!==4&&(d=d.child,d!==null))for(Gh(d,f,y),d=d.sibling;d!==null;)Gh(d,f,y),d=d.sibling}function Y1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(Y1(d,f,y),d=d.sibling;d!==null;)Y1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Lr(d,f,y),y=y.sibling}function Lr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(ln,y)}catch{}switch(y.tag){case 5:Pr||ac(y,f);case 6:if(it){var _=br,T=jo;br=null,Go(d,f,y),br=_,jo=T,br!==null&&(jo?nt(br,y.stateNode):gt(br,y.stateNode))}else Go(d,f,y);break;case 18:it&&br!==null&&(jo?S1(br,y.stateNode):x1(br,y.stateNode));break;case 4:it?(_=br,T=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=T):(It&&(_=y.stateNode.containerInfo,T=ga(_),Iu(_,T)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){T=_=_.next;do{var M=T,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),T=T.next}while(T!==_)}Go(d,f,y);break;case 1:if(!Pr&&(ac(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){jn(y,f,se)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new xx),f.forEach(function(_){var T=O2.bind(null,d,_);y.has(_)||(y.add(_),_.then(T,T))})}}function mo(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Xh:return":has("+(Q1(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case lc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function uc(d,f){var y=[];d=[d,0];for(var _=0;_T&&(T=H),_&=~M}if(_=T,_=Vn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Sx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Vn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=fc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=gc(d,f),d!==2&&(f=xi,xi=y,f!==null&&sp(f)),d}function sp(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Bt&6)!==0)throw Error(a(331));var T=Bt;for(Bt|=4,Je=d.current;Je!==null;){var M=Je,H=M.child;if((Je.flags&16)!==0){var se=M.deletions;if(se!==null){for(var he=0;heVn()-tg?Ys(d,0):eg|=y),Yr(d,f)}function ag(d,f){f===0&&((d.mode&1)===0?f=1:(f=co,co<<=1,(co&130023424)===0&&(co=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function Cx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ag(d,y)}function O2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ag(d,y)}var sg;sg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,yx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&k1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var T=Ns(f,kr.current);Vu(f,y),T=O1(null,f,_,d,T,y);var M=Ku();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,L1(f),T.updater=Ho,f.stateNode=T,T._reactInternals=f,T1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,T,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,T=_._init,_=T(_._payload),f.type=_,T=f.tag=cp(_),d=Fo(_,d),T){case 0:f=W1(null,f,_,d,y);break e;case 1:f=_2(null,f,_,d,y);break e;case 11:f=x2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),W1(d,f,_,T,y);case 1:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),_2(d,f,_,T,y);case 3:e:{if(k2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,T=M.element,s2(d,f),Rh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){T=rc(Error(a(423)),f),f=E2(d,f,_,y,T);break e}else if(_!==T){T=rc(Error(a(424)),f),f=E2(d,f,_,y,T);break e}else for(wt&&(ho=h1(f.stateNode.containerInfo),Un=f,zn=!0,Ni=null,po=!1),y=f2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Hu(),_===T){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Dd(f),_=f.type,T=f.pendingProps,M=d!==null?d.memoizedProps:null,H=T.children,He(_,T)?H=null:M!==null&&He(_,M)&&(f.flags|=32),C2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Dd(f),null;case 13:return P2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=ju(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),x2(d,f,_,T,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,T=f.pendingProps,M=f.memoizedProps,H=T.value,a2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===T.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var se=M.dependencies;if(se!==null){H=M.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var tt=Re.pending;tt===null?he.next=he:(he.next=tt.next,tt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),Hd(M.return,y,f),se.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),Hd(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,_=f.pendingProps.children,Vu(f,y),T=qi(T),_=_(T),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,T=Fo(_,f.pendingProps),T=Fo(_.type,T),Ws(d,f,_,T,y);case 15:return S2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Vu(f,y),u2(f,_,T),T1(f,_,T,y),Wo(null,f,_,!0,d,y);case 19:return T2(d,f,y);case 22:return w2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Bu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bo(d,f,y,_){return new wa(d,f,y,_)}function lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=bo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function lf(d,f,y,_,T,M){var H=2;if(_=d,typeof d=="function")lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,T,M,f);case g:H=8,T|=8;break;case m:return d=bo(12,y,f,T|2),d.elementType=m,d.lanes=M,d;case E:return d=bo(13,y,f,T),d.elementType=E,d.lanes=M,d;case P:return d=bo(19,y,f,T),d.elementType=P,d.lanes=M,d;case I:return dp(y,T,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case L:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=bo(H,y,f,T),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=bo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=bo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=bo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=bo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function uf(d,f,y,_,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zu(0),this.expirationTimes=zu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zu(0),this.identifierPrefix=_,this.onRecoverableError=T,wt&&(this.mutableSourceEagerHydrationData=null)}function R2(d,f,y,_,T,M,H,se,he){return d=new uf(d,f,y,se,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=bo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},L1(M),d}function ug(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return zl(d,y,f)}return f}function cg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function cf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Lt&&T<=tt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Lt||y.height!==he.height||tt<_||Re>T)){Re>_&&(he.width+=Re-_,he.x=_),ttM&&(he.height+=Lt-M,he.y=M),Yey&&(y=H)),H ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return le(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||dg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{ln=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=J1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var T=f.current,M=ai(),H=Ar(T);return y=ug(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,H),d!==null&&(yo(d,T,H,M),Oh(d,T,H)),H},n};(function(e){e.exports=q9e})(xW);const K9e=AC(xW.exports);var tk={exports:{}},bh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(tk);const II={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let MI=!1,OI=!1;const nk=".react-konva-event",Y9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,Z9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,X9e={};function ux(e,t,n=X9e){if(!MI&&"zIndex"in t&&(console.warn(Z9e),MI=!0),!OI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),OI=!0)}for(var o in n)if(!II[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!II[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ed(e));for(var l in v)e.on(l+nk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ed(e)}function eCe(e,t,n){let r=eh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=eh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ux(l,o),l}function tCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function nCe(e,t,n){return!1}function rCe(e){return e}function iCe(){return null}function oCe(){return null}function aCe(e,t,n,r){return Q9e}function sCe(){}function lCe(e){}function uCe(e,t){return!1}function cCe(){return SW}function dCe(){return SW}const fCe=setTimeout,hCe=clearTimeout,pCe=-1;function gCe(e,t){return!1}const mCe=!1,vCe=!0,yCe=!0;function bCe(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function xCe(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function SCe(e,t,n){wW(e,t,n)}function wCe(e,t){t.destroy(),t.off(nk),Ed(e)}function CCe(e,t){t.destroy(),t.off(nk),Ed(e)}function _Ce(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function kCe(e,t,n){}function ECe(e,t,n,r,i){ux(e,i,r)}function PCe(e){e.hide(),Ed(e)}function LCe(e){}function TCe(e,t){(t.visible==null||t.visible)&&e.show()}function ACe(e,t){}function ICe(e){}function MCe(){}const OCe=()=>tk.exports.DefaultEventPriority,RCe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:eCe,createTextInstance:tCe,finalizeInitialChildren:nCe,getPublicInstance:rCe,prepareForCommit:iCe,preparePortalMount:oCe,prepareUpdate:aCe,resetAfterCommit:sCe,resetTextContent:lCe,shouldDeprioritizeSubtree:uCe,getRootHostContext:cCe,getChildHostContext:dCe,scheduleTimeout:fCe,cancelTimeout:hCe,noTimeout:pCe,shouldSetTextContent:gCe,isPrimaryRenderer:mCe,warnsIfNotActing:vCe,supportsMutation:yCe,appendChild:bCe,appendChildToContainer:xCe,insertBefore:wW,insertInContainerBefore:SCe,removeChild:wCe,removeChildFromContainer:CCe,commitTextUpdate:_Ce,commitMount:kCe,commitUpdate:ECe,hideInstance:PCe,hideTextInstance:LCe,unhideInstance:TCe,unhideTextInstance:ACe,clearContainer:ICe,detachDeletedInstance:MCe,getCurrentEventPriority:OCe,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var NCe=Object.defineProperty,DCe=Object.defineProperties,zCe=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,BCe=Object.prototype.hasOwnProperty,FCe=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?NCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))BCe.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))FCe.call(t,n)&&NI(e,n,t[n]);return e},$Ce=(e,t)=>DCe(e,zCe(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:HCe,ReactCurrentDispatcher:WCe}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function VCe(){const e=C.exports.useContext(ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=HCe.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],zI=new WeakMap;function UCe(){var e;const t=VCe();Bg.splice(0,Bg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Bg.push(CW(i))});for(const n of Bg){const r=(e=WCe.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$Ce(DI({},i),{value:zI.get(r)}))),n=>x(_W,{...DI({},n)})),[])}function jCe(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const GCe=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=jCe(e),o=UCe(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=im.createContainer(n.current,tk.exports.LegacyRoot,!1,null),im.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),im.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),im.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Fg="Layer",dd="Group",w0="Rect",$g="Circle",i5="Line",kW="Image",qCe="Transformer",im=K9e(RCe);im.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const KCe=re.forwardRef((e,t)=>x(_W,{children:x(GCe,{...e,forwardedRef:t})})),YCe=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=e=>{const{...t}=e,n=Ce(YCe);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},XCe=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(XCe);return l?ee(dd,{listening:!1,...t,children:[x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},JCe=Qe(jt,qb,Xv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e8e=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(JCe),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Iy(W,64),X=Iy(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v)return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Qg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Iy(W.x,O)+Q,ye=Iy(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[v,g]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(My(!1))},j=()=>{n(IA(!0))},te=()=>{n(g6(!1)),n(IA(!1)),n(My(!1))},ie=()=>{n(My(!0))},le=()=>{!u&&!l&&n(My(!1))};return ee(dd,{...t,children:[x(w0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(w0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(w0,{dragBoundFunc:b==="inpainting"?D:void 0,listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(qCe,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},t8e=Qe([jt,vn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n8e=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(t8e),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},r8e=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),BI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),i8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(r8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=BI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=BI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x&&r.y&&o&&i.width&&i.height?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},o8e=.999,a8e=.1,s8e=20,l8e=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),u8e=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(l8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*o8e**l,a8e,s8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(M$(u)),t(N$(h))},[i,t,n,e,r])},cx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},c8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),d8e=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(c8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(_$([o.x,o.y])))},[e,n,r,t])},f8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),h8e=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(f8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(k$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},p8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),g8e=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(p8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(A$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(k$([s.x,s.y]))))},[t,r,i,a,n,e,o])},m8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),v8e=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(m8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(_$([o.x,o.y])))},[e,n,r,t])},y8e=()=>{const e=$e();return C.exports.useCallback(()=>{e(A$(null)),e(Gb(!1))},[e])},b8e=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),x8e=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(b8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(N$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,S8e=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),vf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const EW=e=>{const{url:t,x:n,y:r}=e,[i]=S8e(t);return x(kW,{x:n,y:r,image:i,listening:!1})},w8e=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),C8e=()=>{const{objects:e}=Ce(w8e);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(S$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ok(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},_8e=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),k8e=()=>{const{colorMode:e}=Iv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},E8e=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),P8e=e=>{const{...t}=e,n=Ce(E8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hg=e=>Math.round(e*100)/100,L8e=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),T8e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(L8e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Hg(n)}, ${Hg(r)}`}),x("div",{children:`Scale: ${Hg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Hg(a)}, ${Hg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var A8e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},M8e=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=A8e(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&I8e(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},O8e=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R8e=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(O8e),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(M8e,{children:x(WR,{value:wV,children:x(gF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(m$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},N8e=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"||n?v?w="grabbing":w="grab":s?w=void 0:l?w="move":w="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h}=Ce(N8e);n8e(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const g=C.exports.useRef({x:0,y:0}),m=C.exports.useRef(!1),v=u8e(kc),b=d8e(kc),w=h8e(kc,m),E=g8e(kc,m,g),P=v8e(kc),k=y8e(),{handleDragStart:L,handleDragMove:I,handleDragEnd:O}=x8e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(KCe,{tabIndex:-1,ref:kc,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onMouseDown:b,onMouseEnter:P,onMouseLeave:k,onMouseMove:E,onMouseOut:k,onMouseUp:w,onDragStart:L,onDragMove:I,onDragEnd:O,onWheel:v,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Fg,{id:"grid",visible:r,children:x(k8e,{})}),ee(Fg,{id:"image",ref:au,listening:!1,imageSmoothingEnabled:!1,children:[x(C8e,{}),x(P8e,{})]}),ee(Fg,{id:"mask",visible:e,listening:!1,children:[x(ZCe,{visible:!0,listening:!1}),x(i8e,{listening:!1})]}),x(Fg,{id:"tool",children:!h&&ee(Hn,{children:[x(e8e,{visible:n}),x(QCe,{visible:l!=="move",listening:!1})]})}),x(Fg,{imageSmoothingEnabled:!1,children:h&&x(R8e,{})})]}),u&&x(T8e,{})]})})},D8e=Qe([Xv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),z8e=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(D8e);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function B8e(){const e=$e();return C.exports.useEffect(()=>{e(D$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(z8e,{})})}function F8e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(s$,{}),feature:Xr.OTHER,options:x(l$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $8e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function H8e(){return x(rx,{optionsPanel:x(F8e,{}),children:x($8e,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function W8e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function V8e(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(g$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Hn,{children:[x(W8e,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function U8e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const j8e=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),G8e=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(j8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(O$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},q8e=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),K8e=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(q8e),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(b$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},Y8e=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(Y8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(x$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(C$(o))})}),x(Y_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},X8e=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(X8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(T$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(P$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(E$(o.target.checked))}),x(Y_,{color:n,onChange:o=>e(L$(o))})]})})},J8e=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(J8e);return ee("div",{className:"inpainting-settings",children:[x(Q8e,{}),ee(ro,{isAttached:!0,children:[x(Z8e,{}),x(K8e,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(z$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(y$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(G8e,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const i=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:n?ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]}):x(z_,{})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(D$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(U8e,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(H8e,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B8e,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(cF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(lF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(sF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(uF,{className:"app-tabs-panels",children:t?x(V8e,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...IW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=dx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:t2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:pC,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:gC,setUpscalingStrength:mC,setMaskPath:vC,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:_v,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):FI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):FI(new Blob([t]),r):r(Tl[e]+(t||"")),FI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},$I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",om=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<$I.length;e++)om[$I.charCodeAt(e)]=e;const T7e=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),yC=64,H7e={};let HI=0,Jy=0,WI;function VI(e){let t="";do t=QW[e%yC]+t,e=Math.floor(e/yC);while(e>0);return t}function JW(){const e=VI(+new Date);return e!==WI?(HI=0,WI=e):e+"."+VI(HI++)}for(;Jy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};O7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),hx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=ZW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",UI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,UI,!1)}}function UI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,jI=!0,q7e="arraybuffer",GI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=GI?{}:ZW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=jI&&!GI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{jI&&this.ws.send(o)}catch{}i&&rV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JW()),this.supportsBinary||(t.b64=1);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function bC(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=bC(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=bC(n.host).host),hx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=W7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ak(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class u_e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(d_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}s1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class wC extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new s1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||c_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Wg[i]&&o in Wg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new wC(r,t):(Wg[i]||(Wg[i]=new wC(r,t)),l=Wg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:wC,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(qI[t]||t||qI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return KI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return KI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var qI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Co={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},KI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(V9("user")),r.categories.result.latest_mtime?t(MA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(Oy({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Oy({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Oy({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(vC("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(Oy({image:a,category:"user"})),i){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(vC(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(d6("Model Changed")),t(y0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(y0(!1)),t(EA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},x_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?u$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=Xv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=SF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=HF.getPersistConfig({key:"root",storage:$F,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Wv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(VB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(bv,{}),ee(yv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(bz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(bv,{}),ee(yv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(d$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(bv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(yv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(f$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Iv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:K$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(f$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Hn,{children:[n&&x(rH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(v$,{}),onClick:l})})]})};function Q_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var J_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function n2(e,t){var n=eke(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return kC(e.target.files).map(function(t){return n2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return n2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=kC(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,ZI(cV(r))];case 2:return[2,ZI(kC(e.files).map(function(o){return n2(o)}))]}})})}function ZI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function kC(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,tM(n)];if(e.sizen)return[!1,tM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=pV(l,n),h=kv(u,1),g=h[0],m=gV(l,r,i),v=kv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Uke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lk=C.exports.forwardRef(function(e,t){var n=e.children,r=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});lk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lk.defaultProps=bV;lk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var TC={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:oM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:oM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,TC),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",rM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",rM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(LC({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=LC({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},TC),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},TC);default:return e}}function oM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` +`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(OA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(OA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(h$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Hn,{children:[x(F$,{iconButton:!0}),x(H$,{}),x($$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=MR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(WR,{value:wV,children:x(gF,{children:x(Jke,{})})})})})})); diff --git a/frontend/dist/assets/index.a44a1287.css b/frontend/dist/assets/index.978b75a1.css similarity index 60% rename from frontend/dist/assets/index.a44a1287.css rename to frontend/dist/assets/index.978b75a1.css index bfd9abdc64..cbe58f696c 100644 --- a/frontend/dist/assets/index.a44a1287.css +++ b/frontend/dist/assets/index.978b75a1.css @@ -1 +1 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.theme-changer-dropdown .invokeai__select-picker{background-color:var(--background-color-light)!important;font-size:.9rem}.theme-changer-dropdown .invokeai__select-picker:focus{border:none!important;box-shadow:none!important}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{background-color:var(--img2img-img-bg-color);border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:red;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{border-radius:.5rem;border:1px solid var(--border-color-light)}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem!important}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.5;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.theme-changer-dropdown .invokeai__select-picker{background-color:var(--background-color-light)!important;font-size:.9rem}.theme-changer-dropdown .invokeai__select-picker:focus{border:none!important;box-shadow:none!important}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{background-color:var(--img2img-img-bg-color);border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:red;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;border:1px solid var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.5;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.ece4fb83.js b/frontend/dist/assets/index.ece4fb83.js deleted file mode 100644 index acde88b677..0000000000 --- a/frontend/dist/assets/index.ece4fb83.js +++ /dev/null @@ -1,593 +0,0 @@ -function Wq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function L8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var wv=Symbol.for("react.element"),Uq=Symbol.for("react.portal"),jq=Symbol.for("react.fragment"),Gq=Symbol.for("react.strict_mode"),qq=Symbol.for("react.profiler"),Kq=Symbol.for("react.provider"),Yq=Symbol.for("react.context"),Zq=Symbol.for("react.forward_ref"),Xq=Symbol.for("react.suspense"),Qq=Symbol.for("react.memo"),Jq=Symbol.for("react.lazy"),Qk=Symbol.iterator;function eK(e){return e===null||typeof e!="object"?null:(e=Qk&&e[Qk]||e["@@iterator"],typeof e=="function"?e:null)}var iM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oM=Object.assign,aM={};function $0(e,t,n){this.props=e,this.context=t,this.refs=aM,this.updater=n||iM}$0.prototype.isReactComponent={};$0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sM(){}sM.prototype=$0.prototype;function T8(e,t,n){this.props=e,this.context=t,this.refs=aM,this.updater=n||iM}var A8=T8.prototype=new sM;A8.constructor=T8;oM(A8,$0.prototype);A8.isPureReactComponent=!0;var Jk=Array.isArray,lM=Object.prototype.hasOwnProperty,I8={current:null},uM={key:!0,ref:!0,__self:!0,__source:!0};function cM(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)lM.call(t,r)&&!uM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=V[X];if(0>>1;Xi(He,Q))Uei(ut,He)?(V[X]=ut,V[Ue]=Q,X=Ue):(V[X]=He,V[Se]=Q,X=Se);else if(Uei(ut,Q))V[X]=ut,V[Ue]=Q,X=Ue;else break e}}return G}function i(V,G){var Q=V.sortIndex-G.sortIndex;return Q!==0?Q:V.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(V){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=V)r(u),G.sortIndex=G.expirationTime,t(l,G);else break;G=n(u)}}function I(V){if(w=!1,L(V),!b)if(n(l)!==null)b=!0,J(O);else{var G=n(u);G!==null&&q(I,G.startTime-V)}}function O(V,G){b=!1,w&&(w=!1,E(z),z=-1),v=!0;var Q=m;try{for(L(G),g=n(l);g!==null&&(!(g.expirationTime>G)||V&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=G);G=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(G)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var Se=n(u);Se!==null&&q(I,Se.startTime-G),xe=!1}return xe}finally{g=null,m=Q,v=!1}}var N=!1,D=null,z=-1,H=5,W=-1;function Y(){return!(e.unstable_now()-WV||125X?(V.sortIndex=Q,t(u,V),n(l)===null&&V===n(u)&&(w?(E(z),z=-1):w=!0,q(I,Q-X))):(V.sortIndex=me,t(l,V),b||v||(b=!0,J(O))),V},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(V){var G=m;return function(){var Q=m;m=G;try{return V.apply(this,arguments)}finally{m=Q}}}})(dM);(function(e){e.exports=dM})(Gp);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var fM=C.exports,sa=Gp.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),O6=Object.prototype.hasOwnProperty,oK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,tE={},nE={};function aK(e){return O6.call(nE,e)?!0:O6.call(tE,e)?!1:oK.test(e)?nE[e]=!0:(tE[e]=!0,!1)}function sK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lK(e,t,n,r){if(t===null||typeof t>"u"||sK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var O8=/[\-:]([a-z])/g;function R8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(O8,R8);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(O8,R8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(O8,R8);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function N8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Wx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fg(e):""}function uK(e){switch(e.tag){case 5:return Fg(e.type);case 16:return Fg("Lazy");case 13:return Fg("Suspense");case 19:return Fg("SuspenseList");case 0:case 2:case 15:return e=Vx(e.type,!1),e;case 11:return e=Vx(e.type.render,!1),e;case 1:return e=Vx(e.type,!0),e;default:return""}}function z6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ip:return"Fragment";case Ap:return"Portal";case R6:return"Profiler";case D8:return"StrictMode";case N6:return"Suspense";case D6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gM:return(e.displayName||"Context")+".Consumer";case pM:return(e._context.displayName||"Context")+".Provider";case z8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B8:return t=e.displayName||null,t!==null?t:z6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return z6(e(t))}catch{}}return null}function cK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z6(t);case 8:return t===D8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dK(e){var t=vM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function V2(e){e._valueTracker||(e._valueTracker=dK(e))}function yM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function V3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function B6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function iE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function bM(e,t){t=t.checked,t!=null&&N8(e,"checked",t,!1)}function F6(e,t){bM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$6(e,t.type,n):t.hasOwnProperty("defaultValue")&&$6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function oE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $6(e,t,n){(t!=="number"||V3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $g=Array.isArray;function qp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=U2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Om(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fK=["Webkit","ms","Moz","O"];Object.keys(nm).forEach(function(e){fK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nm[t]=nm[e]})});function CM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||nm.hasOwnProperty(e)&&nm[e]?(""+t).trim():t+"px"}function _M(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=CM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var hK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function V6(e,t){if(t){if(hK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function U6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var j6=null;function F8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var G6=null,Kp=null,Yp=null;function lE(e){if(e=kv(e)){if(typeof G6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=d4(t),G6(e.stateNode,e.type,t))}}function kM(e){Kp?Yp?Yp.push(e):Yp=[e]:Kp=e}function EM(){if(Kp){var e=Kp,t=Yp;if(Yp=Kp=null,lE(e),t)for(e=0;e>>=0,e===0?32:31-(_K(e)/kK|0)|0}var j2=64,G2=4194304;function Hg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function q3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Hg(s):(o&=a,o!==0&&(r=Hg(o)))}else a=n&~i,a!==0?r=Hg(a):o!==0&&(r=Hg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Cv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function TK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=im),vE=String.fromCharCode(32),yE=!1;function GM(e,t){switch(e){case"keyup":return rY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mp=!1;function oY(e,t){switch(e){case"compositionend":return qM(t);case"keypress":return t.which!==32?null:(yE=!0,vE);case"textInput":return e=t.data,e===vE&&yE?null:e;default:return null}}function aY(e,t){if(Mp)return e==="compositionend"||!q8&&GM(e,t)?(e=UM(),r3=U8=Fc=null,Mp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wE(n)}}function XM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?XM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QM(){for(var e=window,t=V3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V3(e.document)}return t}function K8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gY(e){var t=QM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&XM(n.ownerDocument.documentElement,n)){if(r!==null&&K8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=CE(n,o);var a=CE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Op=null,Q6=null,am=null,J6=!1;function _E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;J6||Op==null||Op!==V3(r)||(r=Op,"selectionStart"in r&&K8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),am&&Fm(am,r)||(am=r,r=Z3(Q6,"onSelect"),0Dp||(e.current=ow[Dp],ow[Dp]=null,Dp--)}function Gn(e,t){Dp++,ow[Dp]=e.current,e.current=t}var rd={},Vi=dd(rd),Lo=dd(!1),Vf=rd;function S0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function Q3(){Zn(Lo),Zn(Vi)}function IE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(Lo,n)}function sO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,cK(e)||"Unknown",i));return hr({},n,r)}function J3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,Vf=Vi.current,Gn(Vi,e),Gn(Lo,Lo.current),!0}function ME(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=sO(e,t,Vf),r.__reactInternalMemoizedMergedChildContext=e,Zn(Lo),Zn(Vi),Gn(Vi,e)):Zn(Lo),Gn(Lo,n)}var su=null,f4=!1,rS=!1;function lO(e){su===null?su=[e]:su.push(e)}function PY(e){f4=!0,lO(e)}function fd(){if(!rS&&su!==null){rS=!0;var e=0,t=Tn;try{var n=su;for(Tn=1;e>=a,i-=a,uu=1<<32-vs(t)+i|n<z?(H=D,D=null):H=D.sibling;var W=m(E,D,L[z],I);if(W===null){D===null&&(D=H);break}e&&D&&W.alternate===null&&t(E,D),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W,D=H}if(z===L.length)return n(E,D),rr&&mf(E,z),O;if(D===null){for(;zz?(H=D,D=null):H=D.sibling;var Y=m(E,D,W.value,I);if(Y===null){D===null&&(D=H);break}e&&D&&Y.alternate===null&&t(E,D),k=o(Y,k,z),N===null?O=Y:N.sibling=Y,N=Y,D=H}if(W.done)return n(E,D),rr&&mf(E,z),O;if(D===null){for(;!W.done;z++,W=L.next())W=g(E,W.value,I),W!==null&&(k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return rr&&mf(E,z),O}for(D=r(E,D);!W.done;z++,W=L.next())W=v(D,E,z,W.value,I),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?z:W.key),k=o(W,k,z),N===null?O=W:N.sibling=W,N=W);return e&&D.forEach(function(de){return t(E,de)}),rr&&mf(E,z),O}function P(E,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Ip&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case W2:e:{for(var O=L.key,N=k;N!==null;){if(N.key===O){if(O=L.type,O===Ip){if(N.tag===7){n(E,N.sibling),k=i(N,L.props.children),k.return=E,E=k;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&FE(O)===N.type){n(E,N.sibling),k=i(N,L.props),k.ref=vg(E,N,L),k.return=E,E=k;break e}n(E,N);break}else t(E,N);N=N.sibling}L.type===Ip?(k=Nf(L.props.children,E.mode,I,L.key),k.return=E,E=k):(I=d3(L.type,L.key,L.props,null,E.mode,I),I.ref=vg(E,k,L),I.return=E,E=I)}return a(E);case Ap:e:{for(N=L.key;k!==null;){if(k.key===N)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(E,k.sibling),k=i(k,L.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=dS(L,E.mode,I),k.return=E,E=k}return a(E);case Pc:return N=L._init,P(E,k,N(L._payload),I)}if($g(L))return b(E,k,L,I);if(fg(L))return w(E,k,L,I);J2(E,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,L),k.return=E,E=k):(n(E,k),k=cS(L,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return P}var C0=mO(!0),vO=mO(!1),Ev={},bl=dd(Ev),Vm=dd(Ev),Um=dd(Ev);function Tf(e){if(e===Ev)throw Error(Oe(174));return e}function r9(e,t){switch(Gn(Um,t),Gn(Vm,e),Gn(bl,Ev),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:W6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=W6(t,e)}Zn(bl),Gn(bl,t)}function _0(){Zn(bl),Zn(Vm),Zn(Um)}function yO(e){Tf(Um.current);var t=Tf(bl.current),n=W6(t,e.type);t!==n&&(Gn(Vm,e),Gn(bl,n))}function i9(e){Vm.current===e&&(Zn(bl),Zn(Vm))}var cr=dd(0);function o5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var iS=[];function o9(){for(var e=0;en?n:4,e(!0);var r=oS.transition;oS.transition={};try{e(!1),t()}finally{Tn=n,oS.transition=r}}function RO(){return za().memoizedState}function IY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},NO(e))DO(t,n);else if(n=fO(e,t,n,r),n!==null){var i=io();ys(n,e,r,i),zO(n,t,r)}}function MY(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(NO(e))DO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,t9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=fO(e,t,i,r),n!==null&&(i=io(),ys(n,e,r,i),zO(n,t,r))}}function NO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function DO(e,t){sm=a5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,H8(e,n)}}var s5={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},OY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:HE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,s3(4194308,4,TO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return s3(4194308,4,e,t)},useInsertionEffect:function(e,t){return s3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=IY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:$E,useDebugValue:c9,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=$E(!1),t=e[0];return e=AY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(jf&30)!==0||SO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,HE(CO.bind(null,r,o,e),[e]),r.flags|=2048,qm(9,wO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=cu,r=uu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[Wm]=r,GO(e,t,!1,!1),t.stateNode=e;e:{switch(a=U6(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iE0&&(t.flags|=128,r=!0,yg(o,!1),t.lanes=4194304)}else{if(!r)if(e=o5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>E0&&n!==1073741824&&(t.flags|=128,r=!0,yg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return m9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function HY(e,t){switch(Z8(t),t.tag){case 1:return To(t.type)&&Q3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _0(),Zn(Lo),Zn(Vi),o9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return i9(t),null;case 13:if(Zn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));w0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(cr),null;case 4:return _0(),null;case 10:return e9(t.type._context),null;case 22:case 23:return m9(),null;case 24:return null;default:return null}}var ty=!1,Wi=!1,WY=typeof WeakSet=="function"?WeakSet:Set,it=null;function $p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function vw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var ZE=!1;function VY(e,t){if(ew=K3,e=QM(),K8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(tw={focusedElem:e,selectionRange:n},K3=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){t=it;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,P=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}return b=ZE,ZE=!1,b}function lm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&vw(t,n,o)}i=i.next}while(i!==r)}}function g4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function YO(e){var t=e.alternate;t!==null&&(e.alternate=null,YO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[Wm],delete t[iw],delete t[kY],delete t[EY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ZO(e){return e.tag===5||e.tag===3||e.tag===4}function XE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=X3));else if(r!==4&&(e=e.child,e!==null))for(bw(e,t,n),e=e.sibling;e!==null;)bw(e,t,n),e=e.sibling}function xw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xw(e,t,n),e=e.sibling;e!==null;)xw(e,t,n),e=e.sibling}var Li=null,fs=!1;function yc(e,t,n){for(n=n.child;n!==null;)XO(e,t,n),n=n.sibling}function XO(e,t,n){if(yl&&typeof yl.onCommitFiberUnmount=="function")try{yl.onCommitFiberUnmount(s4,n)}catch{}switch(n.tag){case 5:Wi||$p(n,t);case 6:var r=Li,i=fs;Li=null,yc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?nS(e.parentNode,n):e.nodeType===1&&nS(e,n),zm(e)):nS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,yc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&vw(n,t,a),i=i.next}while(i!==r)}yc(e,t,n);break;case 1:if(!Wi&&($p(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}yc(e,t,n);break;case 21:yc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,yc(e,t,n),Wi=r):yc(e,t,n);break;default:yc(e,t,n)}}function QE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new WY),t.forEach(function(r){var i=QY.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,c5=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,it=e.current;it!==null;){var o=it,a=o.child;if((it.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-p9?Rf(e,0):h9|=n),Ao(e,t)}function oR(e,t){t===0&&((e.mode&1)===0?t=1:(t=G2,G2<<=1,(G2&130023424)===0&&(G2=4194304)));var n=io();e=gu(e,t),e!==null&&(Cv(e,t,n),Ao(e,n))}function XY(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),oR(e,n)}function QY(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),oR(e,n)}var aR;aR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,FY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&uO(t,t5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l3(e,t),e=t.pendingProps;var i=S0(t,Vi.current);Xp(t,n),i=s9(null,t,r,e,i,n);var o=l9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,J3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,n9(t),i.updater=h4,t.stateNode=i,i._reactInternals=t,cw(t,r,e,n),t=hw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&Y8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=eZ(r),e=ds(r,e),i){case 0:t=fw(null,t,r,e,n);break e;case 1:t=qE(null,t,r,e,n);break e;case 11:t=jE(null,t,r,e,n);break e;case 14:t=GE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),fw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 3:e:{if(VO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,hO(e,t),i5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=k0(Error(Oe(423)),t),t=KE(e,t,r,n,i);break e}else if(r!==i){i=k0(Error(Oe(424)),t),t=KE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=vO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(w0(),r===i){t=mu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return yO(t),e===null&&sw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,nw(r,i)?a=null:o!==null&&nw(r,o)&&(t.flags|=32),WO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&sw(t),null;case 13:return UO(e,t,n);case 4:return r9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=C0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),jE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(n5,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=mu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),lw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),lw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xp(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),GE(e,t,r,i,n);case 15:return $O(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),l3(e,t),t.tag=1,To(r)?(e=!0,J3(t)):e=!1,Xp(t,n),gO(t,r,i),cw(t,r,i,n),hw(null,t,r,!0,e,n);case 19:return jO(e,t,n);case 22:return HO(e,t,n)}throw Error(Oe(156,t.tag))};function sR(e,t){return OM(e,t)}function JY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new JY(e,t,n,r)}function y9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eZ(e){if(typeof e=="function")return y9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===z8)return 11;if(e===B8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function d3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")y9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ip:return Nf(n.children,i,o,t);case D8:a=8,i|=8;break;case R6:return e=Ma(12,n,t,i|2),e.elementType=R6,e.lanes=o,e;case N6:return e=Ma(13,n,t,i),e.elementType=N6,e.lanes=o,e;case D6:return e=Ma(19,n,t,i),e.elementType=D6,e.lanes=o,e;case mM:return v4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pM:a=10;break e;case gM:a=9;break e;case z8:a=11;break e;case B8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Nf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function v4(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=mM,e.lanes=n,e.stateNode={isHidden:!1},e}function cS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function dS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jx(0),this.expirationTimes=jx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function b9(e,t,n,r,i,o,a,s,l){return e=new tZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},n9(o),e}function nZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Il);const iy=L8(Il.exports);var aP=Il.exports;M6.createRoot=aP.createRoot,M6.hydrateRoot=aP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,w4={exports:{}},C4={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sZ=C.exports,lZ=Symbol.for("react.element"),uZ=Symbol.for("react.fragment"),cZ=Object.prototype.hasOwnProperty,dZ=sZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fZ={key:!0,ref:!0,__self:!0,__source:!0};function dR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)cZ.call(t,r)&&!fZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:lZ,type:e,key:o,ref:a,props:i,_owner:dZ.current}}C4.Fragment=uZ;C4.jsx=dR;C4.jsxs=dR;(function(e){e.exports=C4})(w4);const Xn=w4.exports.Fragment,x=w4.exports.jsx,te=w4.exports.jsxs,hZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Xn,jsx:x,jsxs:te},Symbol.toStringTag,{value:"Module"}));var C9=C.exports.createContext({});C9.displayName="ColorModeContext";function Pv(){const e=C.exports.useContext(C9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var oy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function pZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?oy.dark:oy.light),document.body.classList.remove(r?oy.light:oy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var gZ="chakra-ui-color-mode";function mZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var vZ=mZ(gZ),sP=()=>{};function lP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function fR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=vZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>lP(a,s)),[h,g]=C.exports.useState(()=>lP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>pZ({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const L=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?sP:k,setColorMode:t?sP:E,forced:t!==void 0}),[P,k,E,t]);return x(C9.Provider,{value:L,children:n})}fR.displayName="ColorModeProvider";var kw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",N="[object String]",D="[object Undefined]",z="[object WeakMap]",H="[object ArrayBuffer]",W="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",ne="[object Int16Array]",ie="[object Int32Array]",J="[object Uint8Array]",q="[object Uint8ClampedArray]",V="[object Uint16Array]",G="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,xe={};xe[Y]=xe[de]=xe[j]=xe[ne]=xe[ie]=xe[J]=xe[q]=xe[V]=xe[G]=!0,xe[s]=xe[l]=xe[H]=xe[h]=xe[W]=xe[g]=xe[m]=xe[v]=xe[w]=xe[P]=xe[k]=xe[I]=xe[O]=xe[N]=xe[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Se||He||Function("return this")(),ut=t&&!t.nodeType&&t,Xe=ut&&!0&&e&&!e.nodeType&&e,et=Xe&&Xe.exports===ut,tt=et&&Se.process,at=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||tt&&tt.binding&&tt.binding("util")}catch{}}(),At=at&&at.isTypedArray;function wt(U,re,pe){switch(pe.length){case 0:return U.call(re);case 1:return U.call(re,pe[0]);case 2:return U.call(re,pe[0],pe[1]);case 3:return U.call(re,pe[0],pe[1],pe[2])}return U.apply(re,pe)}function Ae(U,re){for(var pe=-1,Ye=Array(U);++pe-1}function l1(U,re){var pe=this.__data__,Ye=ja(pe,U);return Ye<0?(++this.size,pe.push([U,re])):pe[Ye][1]=re,this}Ro.prototype.clear=kd,Ro.prototype.delete=s1,Ro.prototype.get=Ou,Ro.prototype.has=Ed,Ro.prototype.set=l1;function Is(U){var re=-1,pe=U==null?0:U.length;for(this.clear();++re1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,mt&&Ch(pe[0],pe[1],mt)&&(fn=zt<3?void 0:fn,zt=1),re=Object(re);++Ye-1&&U%1==0&&U0){if(++re>=i)return arguments[0]}else re=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,re){return U===re||U!==U&&re!==re}var Id=zl(function(){return arguments}())?zl:function(U){return Wn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},$l=Array.isArray;function Ht(U){return U!=null&&kh(U.length)&&!$u(U)}function _h(U){return Wn(U)&&Ht(U)}var Fu=Qt||S1;function $u(U){if(!Bo(U))return!1;var re=Os(U);return re==v||re==b||re==u||re==L}function kh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var re=typeof U;return U!=null&&(re=="object"||re=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Md(U){if(!Wn(U)||Os(U)!=k)return!1;var re=ln(U);if(re===null)return!0;var pe=yn.call(re,"constructor")&&re.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Eh=At?dt(At):Nu;function Od(U){return jr(U,Ph(U))}function Ph(U){return Ht(U)?y1(U,!0):Rs(U)}var un=Ga(function(U,re,pe,Ye){No(U,re,pe,Ye)});function Wt(U){return function(){return U}}function Lh(U){return U}function S1(){return!1}e.exports=un})(kw,kw.exports);const ml=kw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Af(e,...t){return yZ(e)?e(...t):e}var yZ=e=>typeof e=="function",bZ=e=>/!(important)?$/.test(e),uP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Ew=(e,t)=>n=>{const r=String(t),i=bZ(r),o=uP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=uP(s),i?`${s} !important`:s};function Ym(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Ew(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ay=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Ym({scale:e,transform:t}),r}}var xZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function SZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:xZ(t),transform:n?Ym({scale:n,compose:r}):r}}var hR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function wZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...hR].join(" ")}function CZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...hR].join(" ")}var _Z={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},kZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function EZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var PZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},pR="& > :not(style) ~ :not(style)",LZ={[pR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},TZ={[pR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Pw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},AZ=new Set(Object.values(Pw)),gR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),IZ=e=>e.trim();function MZ(e,t){var n;if(e==null||gR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(IZ).filter(Boolean);if(l?.length===0)return e;const u=s in Pw?Pw[s]:s;l.unshift(u);const h=l.map(g=>{if(AZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=mR(b)?b:b&&b.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var mR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),OZ=(e,t)=>MZ(e,t??{});function RZ(e){return/^var\(--.+\)$/.test(e)}var NZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:_Z},backdropFilter(e){return e!=="auto"?e:kZ},ring(e){return EZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?wZ():e==="auto-gpu"?CZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=NZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(RZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:OZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||mR(e)||gR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=PZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",ay(rn.vh,rn.px)),spaceT:as("space",ay(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Ym({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ay(rn.vh,rn.px)),sizesT:as("sizes",ay(rn.vh,rn.fraction)),shadows:as("shadows"),logical:SZ,blur:as("blur",rn.blur)},f3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(f3,{bgImage:f3.backgroundImage,bgImg:f3.backgroundImage});var pn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var DZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Lw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Lw,{shadow:Lw.boxShadow});var zZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},h5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:LZ,transform:Ym({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:TZ,transform:Ym({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(h5,{flexDir:h5.flexDirection});var vR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},BZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var FZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function $Z(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},WZ=HZ($Z),VZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},UZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},fS=(e,t,n)=>{const r={},i=WZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},jZ={srOnly:{transform(e){return e===!0?VZ:e==="focusable"?UZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>fS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>fS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>fS(t,e,n)}},dm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(dm,{insetStart:dm.insetInlineStart,insetEnd:dm.insetInlineEnd});var GZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Yn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Yn,{m:Yn.margin,mt:Yn.marginTop,mr:Yn.marginRight,me:Yn.marginInlineEnd,marginEnd:Yn.marginInlineEnd,mb:Yn.marginBottom,ml:Yn.marginLeft,ms:Yn.marginInlineStart,marginStart:Yn.marginInlineStart,mx:Yn.marginX,my:Yn.marginY,p:Yn.padding,pt:Yn.paddingTop,py:Yn.paddingY,px:Yn.paddingX,pb:Yn.paddingBottom,pl:Yn.paddingLeft,ps:Yn.paddingInlineStart,paddingStart:Yn.paddingInlineStart,pr:Yn.paddingRight,pe:Yn.paddingInlineEnd,paddingEnd:Yn.paddingInlineEnd});var qZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},KZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},YZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},ZZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},XZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function yR(e){return xs(e)&&e.reference?e.reference:String(e)}var _4=(e,...t)=>t.map(yR).join(` ${e} `).replace(/calc/g,""),cP=(...e)=>`calc(${_4("+",...e)})`,dP=(...e)=>`calc(${_4("-",...e)})`,Tw=(...e)=>`calc(${_4("*",...e)})`,fP=(...e)=>`calc(${_4("/",...e)})`,hP=e=>{const t=yR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Tw(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(cP(e,...t)),subtract:(...t)=>Cf(dP(e,...t)),multiply:(...t)=>Cf(Tw(e,...t)),divide:(...t)=>Cf(fP(e,...t)),negate:()=>Cf(hP(e)),toString:()=>e.toString()}),{add:cP,subtract:dP,multiply:Tw,divide:fP,negate:hP});function QZ(e,t="-"){return e.replace(/\s+/g,t)}function JZ(e){const t=QZ(e.toString());return tX(eX(t))}function eX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function tX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function nX(e,t=""){return[t,e].filter(Boolean).join("-")}function rX(e,t){return`var(${e}${t?`, ${t}`:""})`}function iX(e,t=""){return JZ(`--${nX(e,t)}`)}function ei(e,t,n){const r=iX(e,n);return{variable:r,reference:rX(r,t)}}function oX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function aX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Aw(e){if(e==null)return e;const{unitless:t}=aX(e);return t||typeof e=="number"?`${e}px`:e}var bR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,_9=e=>Object.fromEntries(Object.entries(e).sort(bR));function pP(e){const t=_9(e);return Object.assign(Object.values(t),t)}function sX(e){const t=Object.keys(_9(e));return new Set(t)}function gP(e){if(!e)return e;e=Aw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Vg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Aw(e)})`),t&&n.push("and",`(max-width: ${Aw(t)})`),n.join(" ")}function lX(e){if(!e)return null;e.base=e.base??"0px";const t=pP(e),n=Object.entries(e).sort(bR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?gP(u):void 0,{_minW:gP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Vg(null,u),minWQuery:Vg(a),minMaxQuery:Vg(a,u)}}),r=sX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:_9(e),asArray:pP(e),details:n,media:[null,...t.map(o=>Vg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;oX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>xR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),eu=e=>xR(t=>e(t,"~ &"),"[data-peer]",".peer"),xR=(e,...t)=>t.map(e).join(", "),k4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:eu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:eu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:eu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:eu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:eu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:eu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:eu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:eu(Ci.focusWithin),_peerPlaceholderShown:eu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},uX=Object.keys(k4);function mP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function cX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=mP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,P=Cf.negate(s),E=Cf.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:P}=mP(b,t?.cssVarPrefix);return P},g=xs(s)?s:{default:s};n=ml(n,Object.entries(g).reduce((m,[v,b])=>{var w;const P=h(b);if(v==="default")return m[l]=P,m;const E=((w=k4)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function dX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function fX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var hX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function pX(e){return fX(e,hX)}function gX(e){return e.semanticTokens}function mX(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function vX({tokens:e,semanticTokens:t}){const n=Object.entries(Iw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Iw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Iw(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Iw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function yX(e){var t;const n=mX(e),r=pX(n),i=gX(n),o=vX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=cX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:lX(n.breakpoints)}),n}var k9=ml({},f3,pn,DZ,h5,Ea,zZ,GZ,BZ,vR,jZ,dm,Lw,Yn,XZ,ZZ,qZ,KZ,FZ,YZ),bX=Object.assign({},Yn,Ea,h5,vR,dm),xX=Object.keys(bX),SX=[...Object.keys(k9),...uX],wX={...k9,...k4},CX=e=>e in wX,_X=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Af(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!EX(t),LX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=kX(t);return t=n(i)??r(o)??r(t),t};function TX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Af(o,r),u=_X(l)(r);let h={};for(let g in u){const m=u[g];let v=Af(m,r);g in n&&(g=n[g]),PX(g,v)&&(v=LX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=ml({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const P=Af(b?.property,r);if(!a&&b?.static){const E=Af(b.static,r);h=ml({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&xs(w)?h=ml({},h,w):h[P]=w;continue}if(xs(w)){h=ml({},h,w);continue}h[g]=w}return h};return i}var SR=e=>t=>TX({theme:t,pseudos:k4,configs:k9})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function AX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function IX(e,t){for(let n=t+1;n{ml(u,{[L]:m?k[L]:{[E]:k[L]}})});continue}if(!v){m?ml(u,k):u[E]=k;continue}u[E]=k}}return u}}function OX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=MX(i);return ml({},Af(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function RX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return dX(e,["styleConfig","size","variant","colorScheme"])}function NX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(V0,--Oo):0,P0--,$r===10&&(P0=1,P4--),$r}function ia(){return $r=Oo2||Xm($r)>3?"":" "}function qX(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Lv(e,h3()+(t<6&&xl()==32&&ia()==32))}function Ow(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Ow($r);break;case 40:e===41&&Ow(e);break;case 92:ia();break}return Oo}function KX(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Lv(t,Oo-1)+"*"+E4(e===47?e:ia())}function YX(e){for(;!Xm(xl());)ia();return Lv(e,Oo)}function ZX(e){return PR(g3("",null,null,null,[""],e=ER(e),0,[0],e))}function g3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,P=1,E=1,k=0,L="",I=i,O=o,N=r,D=L;P;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Mw(D+=wn(p3(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=p3(k);break;case 9:case 10:case 13:case 32:D+=GX(b);break;case 92:D+=qX(h3()-1,7);continue;case 47:switch(xl()){case 42:case 47:sy(XX(KX(ia(),h3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:P=0;case 59+h:v>0&&cl(D)-g&&sy(v>32?yP(D+";",r,n,g-1):yP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(sy(N=vP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)g3(D,t,N,N,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:g3(e,N,N,r&&sy(vP(e,N,N,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:g3(D,N,N,N,[""],O,0,s,O)}}u=h=v=0,w=E=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&jX()==125)continue}switch(D+=E4(k),k*w){case 38:E=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*E,E=1;break;case 64:xl()===45&&(D+=p3(ia())),m=xl(),h=g=cl(L=D+=YX(h3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function vP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=L9(m),b=0,w=0,P=0;b0?m[E]+" "+k:wn(k,/&\f/g,m[E])))&&(l[P++]=L);return L4(e,t,n,i===0?E9:s,l,u,h)}function XX(e,t,n){return L4(e,t,n,wR,E4(UX()),Zm(e,2,-2),0)}function yP(e,t,n,r){return L4(e,t,n,P9,Zm(e,0,r),Zm(e,r+1,-1),r)}function Jp(e,t){for(var n="",r=L9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+p5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Mw(e,"stretch")?TR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Mw(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+$i+e+e}return e}var aQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case P9:t.return=TR(t.value,t.length);break;case CR:return Jp([xg(t,{value:wn(t.value,"@","@"+gn)})],i);case E9:if(t.length)return VX(t.props,function(o){switch(WX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jp([xg(t,{props:[wn(o,/:(read-\w+)/,":"+p5+"$1")]})],i);case"::placeholder":return Jp([xg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),xg(t,{props:[wn(o,/:(plac\w+)/,":"+p5+"$1")]}),xg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},sQ=[aQ],AR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||sQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var yQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bQ=/[A-Z]|^ms/g,xQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zR=function(t){return t.charCodeAt(1)===45},SP=function(t){return t!=null&&typeof t!="boolean"},hS=LR(function(e){return zR(e)?e:e.replace(bQ,"-$&").toLowerCase()}),wP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(xQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return yQ[t]!==1&&!zR(t)&&typeof n=="number"&&n!==0?n+"px":n};function Qm(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return SQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,Qm(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function SQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function BQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},UR=FQ(BQ);function jR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var GR=e=>jR(e,t=>t!=null);function $Q(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var HQ=$Q();function qR(e,...t){return DQ(e)?e(...t):e}function WQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function VQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var UQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jQ=LR(function(e){return UQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),GQ=jQ,qQ=function(t){return t!=="theme"},EP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?GQ:qQ},PP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},KQ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return NR(n,r,i),CQ(function(){return DR(n,r,i)}),null},YQ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=PP(t,n,r),l=s||EP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var XQ=In("accordion").parts("root","container","button","panel").extend("icon"),QQ=In("alert").parts("title","description","container").extend("icon","spinner"),JQ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),eJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var tJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var nJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),rJ=In("editable").parts("preview","input","textarea"),iJ=In("form").parts("container","requiredIndicator","helperText"),oJ=In("formError").parts("text","icon"),aJ=In("input").parts("addon","field","element"),sJ=In("list").parts("container","item","icon"),lJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),uJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var dJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),fJ=In("progress").parts("label","filledTrack","track"),hJ=In("radio").parts("container","control","label"),pJ=In("select").parts("field","icon"),gJ=In("slider").parts("container","track","thumb","filledTrack","mark"),mJ=In("stat").parts("container","label","helpText","number","icon"),vJ=In("switch").parts("container","track","thumb"),yJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),bJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),xJ=In("tag").parts("container","label","closeButton");function Mi(e,t){SJ(e)&&(e="100%");var n=wJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ly(e){return Math.min(1,Math.max(0,e))}function SJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function wJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function KR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function If(e){return e.length===1?"0"+e:String(e)}function CJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function LP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _J(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=pS(s,a,e+1/3),i=pS(s,a,e),o=pS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function TP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var zw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function TJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=MJ(e)),typeof e=="object"&&(tu(e.r)&&tu(e.g)&&tu(e.b)?(t=CJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):tu(e.h)&&tu(e.s)&&tu(e.v)?(r=uy(e.s),i=uy(e.v),t=kJ(e.h,r,i),a=!0,s="hsv"):tu(e.h)&&tu(e.s)&&tu(e.l)&&(r=uy(e.s),o=uy(e.l),t=_J(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=KR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var AJ="[-\\+]?\\d+%?",IJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(IJ,")|(?:").concat(AJ,")"),gS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),mS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+gS),rgba:new RegExp("rgba"+mS),hsl:new RegExp("hsl"+gS),hsla:new RegExp("hsla"+mS),hsv:new RegExp("hsv"+gS),hsva:new RegExp("hsva"+mS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function MJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(zw[e])e=zw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:IP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:IP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function tu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Tv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=LJ(t)),this.originalInput=t;var i=TJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=KR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=TP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=TP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=LP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=LP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),AP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),EJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+AP(this.r,this.g,this.b,!1),n=0,r=Object.entries(zw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(YR(e));return e.count=t,n}var r=OJ(e.hue,e.seed),i=RJ(r,e),o=NJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Tv(a)}function OJ(e,t){var n=zJ(e),r=g5(n,t);return r<0&&(r=360+r),r}function RJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return g5([0,100],t.seed);var n=ZR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return g5([r,i],t.seed)}function NJ(e,t,n){var r=DJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return g5([r,i],n.seed)}function DJ(e,t){for(var n=ZR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function zJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=QR.find(function(a){return a.name===e});if(n){var r=XR(n);if(r.hueRange)return r.hueRange}var i=new Tv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function ZR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=QR;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function g5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function XR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var QR=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function BJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=BJ(e,`colors.${t}`,t),{isValid:i}=new Tv(r);return i?r:n},$J=e=>t=>{const n=Ai(t,e);return new Tv(n).isDark()?"dark":"light"},HJ=e=>t=>$J(e)(t)==="dark",L0=(e,t)=>n=>{const r=Ai(n,e);return new Tv(r).setAlpha(t).toRgbString()};function MP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function WJ(e){const t=YR().toHexString();return!e||FJ(e)?t:e.string&&e.colors?UJ(e.string,e.colors):e.string&&!e.colors?VJ(e.string):e.colors&&!e.string?jJ(e.colors):t}function VJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function UJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function R9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function GJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function JR(e){return GJ(e)&&e.reference?e.reference:String(e)}var H4=(e,...t)=>t.map(JR).join(` ${e} `).replace(/calc/g,""),OP=(...e)=>`calc(${H4("+",...e)})`,RP=(...e)=>`calc(${H4("-",...e)})`,Bw=(...e)=>`calc(${H4("*",...e)})`,NP=(...e)=>`calc(${H4("/",...e)})`,DP=e=>{const t=JR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Bw(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(OP(e,...t)),subtract:(...t)=>lu(RP(e,...t)),multiply:(...t)=>lu(Bw(e,...t)),divide:(...t)=>lu(NP(e,...t)),negate:()=>lu(DP(e)),toString:()=>e.toString()}),{add:OP,subtract:RP,multiply:Bw,divide:NP,negate:DP});function qJ(e){return!Number.isInteger(parseFloat(e.toString()))}function KJ(e,t="-"){return e.replace(/\s+/g,t)}function eN(e){const t=KJ(e.toString());return t.includes("\\.")?e:qJ(e)?t.replace(".","\\."):e}function YJ(e,t=""){return[t,eN(e)].filter(Boolean).join("-")}function ZJ(e,t){return`var(${eN(e)}${t?`, ${t}`:""})`}function XJ(e,t=""){return`--${YJ(e,t)}`}function ji(e,t){const n=XJ(e,t?.prefix);return{variable:n,reference:ZJ(n,QJ(t?.fallback))}}function QJ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:JJ,defineMultiStyleConfig:eee}=ir(XQ.keys),tee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},nee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ree={pt:"2",px:"4",pb:"5"},iee={fontSize:"1.25em"},oee=JJ({container:tee,button:nee,panel:ree,icon:iee}),aee=eee({baseStyle:oee}),{definePartsStyle:Av,defineMultiStyleConfig:see}=ir(QQ.keys),oa=ei("alert-fg"),vu=ei("alert-bg"),lee=Av({container:{bg:vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function N9(e){const{theme:t,colorScheme:n}=e,r=L0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var uee=Av(e=>{const{colorScheme:t}=e,n=N9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark}}}}),cee=Av(e=>{const{colorScheme:t}=e,n=N9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),dee=Av(e=>{const{colorScheme:t}=e,n=N9(e);return{container:{[oa.variable]:`colors.${t}.500`,[vu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),fee=Av(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[vu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[vu.variable]:`colors.${t}.200`},color:oa.reference}}}),hee={subtle:uee,"left-accent":cee,"top-accent":dee,solid:fee},pee=see({baseStyle:lee,variants:hee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),tN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},gee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},mee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},vee={...tN,...gee,container:mee},nN=vee,yee=e=>typeof e=="function";function fi(e,...t){return yee(e)?e(...t):e}var{definePartsStyle:rN,defineMultiStyleConfig:bee}=ir(JQ.keys),e0=ei("avatar-border-color"),vS=ei("avatar-bg"),xee={borderRadius:"full",border:"0.2em solid",[e0.variable]:"white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference},See={[vS.variable]:"colors.gray.200",_dark:{[vS.variable]:"colors.whiteAlpha.400"},bgColor:vS.reference},zP=ei("avatar-background"),wee=e=>{const{name:t,theme:n}=e,r=t?WJ({string:t}):"colors.gray.400",i=HJ(r)(n);let o="white";return i||(o="gray.800"),{bg:zP.reference,"&:not([data-loaded])":{[zP.variable]:r},color:o,[e0.variable]:"colors.white",_dark:{[e0.variable]:"colors.gray.800"},borderColor:e0.reference,verticalAlign:"top"}},Cee=rN(e=>({badge:fi(xee,e),excessLabel:fi(See,e),container:fi(wee,e)}));function xc(e){const t=e!=="100%"?nN[e]:void 0;return rN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var _ee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},kee=bee({baseStyle:Cee,sizes:_ee,defaultProps:{size:"md"}}),Eee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},t0=ei("badge-bg"),vl=ei("badge-color"),Pee=e=>{const{colorScheme:t,theme:n}=e,r=L0(`${t}.500`,.6)(n);return{[t0.variable]:`colors.${t}.500`,[vl.variable]:"colors.white",_dark:{[t0.variable]:r,[vl.variable]:"colors.whiteAlpha.800"},bg:t0.reference,color:vl.reference}},Lee=e=>{const{colorScheme:t,theme:n}=e,r=L0(`${t}.200`,.16)(n);return{[t0.variable]:`colors.${t}.100`,[vl.variable]:`colors.${t}.800`,_dark:{[t0.variable]:r,[vl.variable]:`colors.${t}.200`},bg:t0.reference,color:vl.reference}},Tee=e=>{const{colorScheme:t,theme:n}=e,r=L0(`${t}.200`,.8)(n);return{[vl.variable]:`colors.${t}.500`,_dark:{[vl.variable]:r},color:vl.reference,boxShadow:`inset 0 0 0px 1px ${vl.reference}`}},Aee={solid:Pee,subtle:Lee,outline:Tee},hm={baseStyle:Eee,variants:Aee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Iee,definePartsStyle:Mee}=ir(eJ.keys),Oee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Ree=Mee({link:Oee}),Nee=Iee({baseStyle:Ree}),Dee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},iN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=L0(`${t}.200`,.12)(n),i=L0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},zee=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(iN,e)}},Bee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Fee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Bee[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},$ee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},Hee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Wee={ghost:iN,outline:zee,solid:Fee,link:$ee,unstyled:Hee},Vee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Uee={baseStyle:Dee,variants:Wee,sizes:Vee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:m3,defineMultiStyleConfig:jee}=ir(tJ.keys),pm=ei("checkbox-size"),Gee=e=>{const{colorScheme:t}=e;return{w:pm.reference,h:pm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},qee={_disabled:{cursor:"not-allowed"}},Kee={userSelect:"none",_disabled:{opacity:.4}},Yee={transitionProperty:"transform",transitionDuration:"normal"},Zee=m3(e=>({icon:Yee,container:qee,control:fi(Gee,e),label:Kee})),Xee={sm:m3({control:{[pm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:m3({control:{[pm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:m3({control:{[pm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},m5=jee({baseStyle:Zee,sizes:Xee,defaultProps:{size:"md",colorScheme:"blue"}}),gm=ji("close-button-size"),Sg=ji("close-button-bg"),Qee={w:[gm.reference],h:[gm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Sg.variable]:"colors.blackAlpha.100",_dark:{[Sg.variable]:"colors.whiteAlpha.100"}},_active:{[Sg.variable]:"colors.blackAlpha.200",_dark:{[Sg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Sg.reference},Jee={lg:{[gm.variable]:"sizes.10",fontSize:"md"},md:{[gm.variable]:"sizes.8",fontSize:"xs"},sm:{[gm.variable]:"sizes.6",fontSize:"2xs"}},ete={baseStyle:Qee,sizes:Jee,defaultProps:{size:"md"}},{variants:tte,defaultProps:nte}=hm,rte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},ite={baseStyle:rte,variants:tte,defaultProps:nte},ote={w:"100%",mx:"auto",maxW:"prose",px:"4"},ate={baseStyle:ote},ste={opacity:.6,borderColor:"inherit"},lte={borderStyle:"solid"},ute={borderStyle:"dashed"},cte={solid:lte,dashed:ute},dte={baseStyle:ste,variants:cte,defaultProps:{variant:"solid"}},{definePartsStyle:Fw,defineMultiStyleConfig:fte}=ir(nJ.keys),yS=ei("drawer-bg"),bS=ei("drawer-box-shadow");function gp(e){return Fw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var hte={bg:"blackAlpha.600",zIndex:"overlay"},pte={display:"flex",zIndex:"modal",justifyContent:"center"},gte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[yS.variable]:"colors.white",[bS.variable]:"shadows.lg",_dark:{[yS.variable]:"colors.gray.700",[bS.variable]:"shadows.dark-lg"},bg:yS.reference,boxShadow:bS.reference}},mte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},vte={position:"absolute",top:"2",insetEnd:"3"},yte={px:"6",py:"2",flex:"1",overflow:"auto"},bte={px:"6",py:"4"},xte=Fw(e=>({overlay:hte,dialogContainer:pte,dialog:fi(gte,e),header:mte,closeButton:vte,body:yte,footer:bte})),Ste={xs:gp("xs"),sm:gp("md"),md:gp("lg"),lg:gp("2xl"),xl:gp("4xl"),full:gp("full")},wte=fte({baseStyle:xte,sizes:Ste,defaultProps:{size:"xs"}}),{definePartsStyle:Cte,defineMultiStyleConfig:_te}=ir(rJ.keys),kte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ete={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Pte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Lte=Cte({preview:kte,input:Ete,textarea:Pte}),Tte=_te({baseStyle:Lte}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(iJ.keys),n0=ei("form-control-color"),Mte={marginStart:"1",[n0.variable]:"colors.red.500",_dark:{[n0.variable]:"colors.red.300"},color:n0.reference},Ote={mt:"2",[n0.variable]:"colors.gray.600",_dark:{[n0.variable]:"colors.whiteAlpha.600"},color:n0.reference,lineHeight:"normal",fontSize:"sm"},Rte=Ate({container:{width:"100%",position:"relative"},requiredIndicator:Mte,helperText:Ote}),Nte=Ite({baseStyle:Rte}),{definePartsStyle:Dte,defineMultiStyleConfig:zte}=ir(oJ.keys),r0=ei("form-error-color"),Bte={[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Fte={marginEnd:"0.5em",[r0.variable]:"colors.red.500",_dark:{[r0.variable]:"colors.red.300"},color:r0.reference},$te=Dte({text:Bte,icon:Fte}),Hte=zte({baseStyle:$te}),Wte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Vte={baseStyle:Wte},Ute={fontFamily:"heading",fontWeight:"bold"},jte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Gte={baseStyle:Ute,sizes:jte,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:qte}=ir(aJ.keys),Kte=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Yte={lg:du({field:Sc.lg,addon:Sc.lg}),md:du({field:Sc.md,addon:Sc.md}),sm:du({field:Sc.sm,addon:Sc.sm}),xs:du({field:Sc.xs,addon:Sc.xs})};function D9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var Zte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=D9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Xte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=D9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Qte=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=D9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Jte=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),ene={outline:Zte,filled:Xte,flushed:Qte,unstyled:Jte},mn=qte({baseStyle:Kte,sizes:Yte,variants:ene,defaultProps:{size:"md",variant:"outline"}}),tne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),nne={baseStyle:tne},rne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ine={baseStyle:rne},{defineMultiStyleConfig:one,definePartsStyle:ane}=ir(sJ.keys),sne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},lne=ane({icon:sne}),une=one({baseStyle:lne}),{defineMultiStyleConfig:cne,definePartsStyle:dne}=ir(lJ.keys),fne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),hne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),pne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},gne={opacity:.6},mne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},vne={transitionProperty:"common",transitionDuration:"normal"},yne=dne(e=>({button:vne,list:fi(fne,e),item:fi(hne,e),groupTitle:pne,command:gne,divider:mne})),bne=cne({baseStyle:yne}),{defineMultiStyleConfig:xne,definePartsStyle:$w}=ir(uJ.keys),Sne={bg:"blackAlpha.600",zIndex:"modal"},wne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Cne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},_ne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},kne={position:"absolute",top:"2",insetEnd:"3"},Ene=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Pne={px:"6",py:"4"},Lne=$w(e=>({overlay:Sne,dialogContainer:fi(wne,e),dialog:fi(Cne,e),header:_ne,closeButton:kne,body:fi(Ene,e),footer:Pne}));function ss(e){return $w(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Tne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Ane=xne({baseStyle:Lne,sizes:Tne,defaultProps:{size:"md"}}),Ine={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},oN=Ine,{defineMultiStyleConfig:Mne,definePartsStyle:aN}=ir(cJ.keys),z9=ji("number-input-stepper-width"),sN=ji("number-input-input-padding"),One=lu(z9).add("0.5rem").toString(),Rne={[z9.variable]:"sizes.6",[sN.variable]:One},Nne=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},Dne={width:[z9.reference]},zne=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Bne=aN(e=>({root:Rne,field:fi(Nne,e)??{},stepperGroup:Dne,stepper:fi(zne,e)??{}}));function cy(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=oN.fontSizes[o];return aN({field:{...r.field,paddingInlineEnd:sN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Fne={xs:cy("xs"),sm:cy("sm"),md:cy("md"),lg:cy("lg")},$ne=Mne({baseStyle:Bne,sizes:Fne,variants:mn.variants,defaultProps:mn.defaultProps}),BP,Hne={...(BP=mn.baseStyle)==null?void 0:BP.field,textAlign:"center"},Wne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},FP,Vne={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((FP=mn.variants)==null?void 0:FP.unstyled.field)??{}},Une={baseStyle:Hne,sizes:Wne,variants:Vne,defaultProps:mn.defaultProps},{defineMultiStyleConfig:jne,definePartsStyle:Gne}=ir(dJ.keys),dy=ji("popper-bg"),qne=ji("popper-arrow-bg"),$P=ji("popper-arrow-shadow-color"),Kne={zIndex:10},Yne={[dy.variable]:"colors.white",bg:dy.reference,[qne.variable]:dy.reference,[$P.variable]:"colors.gray.200",_dark:{[dy.variable]:"colors.gray.700",[$P.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Zne={px:3,py:2,borderBottomWidth:"1px"},Xne={px:3,py:2},Qne={px:3,py:2,borderTopWidth:"1px"},Jne={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},ere=Gne({popper:Kne,content:Yne,header:Zne,body:Xne,footer:Qne,closeButton:Jne}),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:Ug}=ir(fJ.keys),rre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(MP(),MP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ai(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},ire={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ore=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),are=e=>({transitionProperty:"common",transitionDuration:"slow",...rre(e)}),sre=Ug(e=>({label:ire,filledTrack:are(e),track:ore(e)})),lre={xs:Ug({track:{h:"1"}}),sm:Ug({track:{h:"2"}}),md:Ug({track:{h:"3"}}),lg:Ug({track:{h:"4"}})},ure=nre({sizes:lre,baseStyle:sre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cre,definePartsStyle:v3}=ir(hJ.keys),dre=e=>{var t;const n=(t=fi(m5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},fre=v3(e=>{var t,n,r,i;return{label:(n=(t=m5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=m5).baseStyle)==null?void 0:i.call(r,e).container,control:dre(e)}}),hre={md:v3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:v3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:v3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},pre=cre({baseStyle:fre,sizes:hre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:gre,definePartsStyle:mre}=ir(pJ.keys),vre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},yre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},bre=mre(e=>({field:vre(e),icon:yre})),fy={paddingInlineEnd:"8"},HP,WP,VP,UP,jP,GP,qP,KP,xre={lg:{...(HP=mn.sizes)==null?void 0:HP.lg,field:{...(WP=mn.sizes)==null?void 0:WP.lg.field,...fy}},md:{...(VP=mn.sizes)==null?void 0:VP.md,field:{...(UP=mn.sizes)==null?void 0:UP.md.field,...fy}},sm:{...(jP=mn.sizes)==null?void 0:jP.sm,field:{...(GP=mn.sizes)==null?void 0:GP.sm.field,...fy}},xs:{...(qP=mn.sizes)==null?void 0:qP.xs,field:{...(KP=mn.sizes)==null?void 0:KP.xs.field,...fy},icon:{insetEnd:"1"}}},Sre=gre({baseStyle:bre,sizes:xre,variants:mn.variants,defaultProps:mn.defaultProps}),wre=ei("skeleton-start-color"),Cre=ei("skeleton-end-color"),_re=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[wre.variable]:a,[Cre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},kre={baseStyle:_re},xS=ei("skip-link-bg"),Ere={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[xS.variable]:"colors.white",_dark:{[xS.variable]:"colors.gray.700"},bg:xS.reference}},Pre={baseStyle:Ere},{defineMultiStyleConfig:Lre,definePartsStyle:W4}=ir(gJ.keys),tv=ei("slider-thumb-size"),nv=ei("slider-track-size"),Mc=ei("slider-bg"),Tre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...R9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Are=e=>({...R9({orientation:e.orientation,horizontal:{h:nv.reference},vertical:{w:nv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Ire=e=>{const{orientation:t}=e;return{...R9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:tv.reference,h:tv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Mre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Ore=W4(e=>({container:Tre(e),track:Are(e),thumb:Ire(e),filledTrack:Mre(e)})),Rre=W4({container:{[tv.variable]:"sizes.4",[nv.variable]:"sizes.1"}}),Nre=W4({container:{[tv.variable]:"sizes.3.5",[nv.variable]:"sizes.1"}}),Dre=W4({container:{[tv.variable]:"sizes.2.5",[nv.variable]:"sizes.0.5"}}),zre={lg:Rre,md:Nre,sm:Dre},Bre=Lre({baseStyle:Ore,sizes:zre,defaultProps:{size:"md",colorScheme:"blue"}}),_f=ji("spinner-size"),Fre={width:[_f.reference],height:[_f.reference]},$re={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},Hre={baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}},{defineMultiStyleConfig:Wre,definePartsStyle:lN}=ir(mJ.keys),Vre={fontWeight:"medium"},Ure={opacity:.8,marginBottom:"2"},jre={verticalAlign:"baseline",fontWeight:"semibold"},Gre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},qre=lN({container:{},label:Vre,helpText:Ure,number:jre,icon:Gre}),Kre={md:lN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Yre=Wre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Zre,definePartsStyle:y3}=ir(vJ.keys),mm=ji("switch-track-width"),Df=ji("switch-track-height"),SS=ji("switch-track-diff"),Xre=lu.subtract(mm,Df),Hw=ji("switch-thumb-x"),wg=ji("switch-bg"),Qre=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[mm.reference],height:[Df.reference],transitionProperty:"common",transitionDuration:"fast",[wg.variable]:"colors.gray.300",_dark:{[wg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[wg.variable]:`colors.${t}.500`,_dark:{[wg.variable]:`colors.${t}.200`}},bg:wg.reference}},Jre={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Df.reference],height:[Df.reference],_checked:{transform:`translateX(${Hw.reference})`}},eie=y3(e=>({container:{[SS.variable]:Xre,[Hw.variable]:SS.reference,_rtl:{[Hw.variable]:lu(SS).negate().toString()}},track:Qre(e),thumb:Jre})),tie={sm:y3({container:{[mm.variable]:"1.375rem",[Df.variable]:"sizes.3"}}),md:y3({container:{[mm.variable]:"1.875rem",[Df.variable]:"sizes.4"}}),lg:y3({container:{[mm.variable]:"2.875rem",[Df.variable]:"sizes.6"}})},nie=Zre({baseStyle:eie,sizes:tie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:rie,definePartsStyle:i0}=ir(yJ.keys),iie=i0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),v5={"&[data-is-numeric=true]":{textAlign:"end"}},oie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),aie=i0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...v5},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),sie={simple:oie,striped:aie,unstyled:{}},lie={sm:i0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:i0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:i0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},uie=rie({baseStyle:iie,variants:sie,sizes:lie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:cie,definePartsStyle:Sl}=ir(bJ.keys),die=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},fie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},hie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},pie={p:4},gie=Sl(e=>({root:die(e),tab:fie(e),tablist:hie(e),tabpanel:pie})),mie={sm:Sl({tab:{py:1,px:4,fontSize:"sm"}}),md:Sl({tab:{fontSize:"md",py:2,px:4}}),lg:Sl({tab:{fontSize:"lg",py:3,px:4}})},vie=Sl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),yie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),bie=Sl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),xie=Sl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Sie=Sl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),wie=Sl({}),Cie={line:vie,enclosed:yie,"enclosed-colored":bie,"soft-rounded":xie,"solid-rounded":Sie,unstyled:wie},_ie=cie({baseStyle:gie,sizes:mie,variants:Cie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:kie,definePartsStyle:zf}=ir(xJ.keys),Eie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Pie={lineHeight:1.2,overflow:"visible"},Lie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Tie=zf({container:Eie,label:Pie,closeButton:Lie}),Aie={sm:zf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:zf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:zf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Iie={subtle:zf(e=>{var t;return{container:(t=hm.variants)==null?void 0:t.subtle(e)}}),solid:zf(e=>{var t;return{container:(t=hm.variants)==null?void 0:t.solid(e)}}),outline:zf(e=>{var t;return{container:(t=hm.variants)==null?void 0:t.outline(e)}})},Mie=kie({variants:Iie,baseStyle:Tie,sizes:Aie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),YP,Oie={...(YP=mn.baseStyle)==null?void 0:YP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},ZP,Rie={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((ZP=mn.variants)==null?void 0:ZP.unstyled.field)??{}},XP,QP,JP,eL,Nie={xs:((XP=mn.sizes)==null?void 0:XP.xs.field)??{},sm:((QP=mn.sizes)==null?void 0:QP.sm.field)??{},md:((JP=mn.sizes)==null?void 0:JP.md.field)??{},lg:((eL=mn.sizes)==null?void 0:eL.lg.field)??{}},Die={baseStyle:Oie,sizes:Nie,variants:Rie,defaultProps:{size:"md",variant:"outline"}},hy=ji("tooltip-bg"),wS=ji("tooltip-fg"),zie=ji("popper-arrow-bg"),Bie={bg:hy.reference,color:wS.reference,[hy.variable]:"colors.gray.700",[wS.variable]:"colors.whiteAlpha.900",_dark:{[hy.variable]:"colors.gray.300",[wS.variable]:"colors.gray.900"},[zie.variable]:hy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Fie={baseStyle:Bie},$ie={Accordion:aee,Alert:pee,Avatar:kee,Badge:hm,Breadcrumb:Nee,Button:Uee,Checkbox:m5,CloseButton:ete,Code:ite,Container:ate,Divider:dte,Drawer:wte,Editable:Tte,Form:Nte,FormError:Hte,FormLabel:Vte,Heading:Gte,Input:mn,Kbd:nne,Link:ine,List:une,Menu:bne,Modal:Ane,NumberInput:$ne,PinInput:Une,Popover:tre,Progress:ure,Radio:pre,Select:Sre,Skeleton:kre,SkipLink:Pre,Slider:Bre,Spinner:Hre,Stat:Yre,Switch:nie,Table:uie,Tabs:_ie,Tag:Mie,Textarea:Die,Tooltip:Fie},Hie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Wie=Hie,Vie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Uie=Vie,jie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Gie=jie,qie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Kie=qie,Yie={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Zie=Yie,Xie={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Qie={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Jie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},eoe={property:Xie,easing:Qie,duration:Jie},toe=eoe,noe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},roe=noe,ioe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ooe=ioe,aoe={breakpoints:Uie,zIndices:roe,radii:Kie,blur:ooe,colors:Gie,...oN,sizes:nN,shadows:Zie,space:tN,borders:Wie,transition:toe},soe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},loe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},uoe="ltr",coe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},doe={semanticTokens:soe,direction:uoe,...aoe,components:$ie,styles:loe,config:coe},foe=typeof Element<"u",hoe=typeof Map=="function",poe=typeof Set=="function",goe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!b3(e[r],t[r]))return!1;return!0}var o;if(hoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!b3(r.value[1],t.get(r.value[0])))return!1;return!0}if(poe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(goe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(foe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!b3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var moe=function(t,n){try{return b3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function U0(){const e=C.exports.useContext(Jm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function uN(){const e=Pv(),t=U0();return{...e,theme:t}}function voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function yoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function boe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return voe(o,l,a[u]??l);const h=`${e}.${l}`;return yoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function xoe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>yX(n),[n]);return te(PQ,{theme:i,children:[x(Soe,{root:t}),r]})}function Soe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(F4,{styles:n=>({[t]:n.__cssVars})})}VQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function woe(){const{colorMode:e}=Pv();return x(F4,{styles:t=>{const n=UR(t,"styles.global"),r=qR(n,{theme:t,colorMode:e});return r?SR(r)(t):void 0}})}var Coe=new Set([...SX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),_oe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function koe(e){return _oe.has(e)||!Coe.has(e)}var Eoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=jR(a,(g,m)=>CX(m)),l=qR(e,t),u=Object.assign({},i,l,GR(s),o),h=SR(u)(t.theme);return r?[h,r]:h};function CS(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=koe);const i=Eoe({baseStyle:n}),o=Dw(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:g}=Pv();return le.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function cN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=uN(),a=e?UR(i,`components.${e}`):void 0,s=n||a,l=ml({theme:i,colorMode:o},s?.defaultProps??{},GR(zQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=OX(s)(l);moe(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return cN(e,t)}function Ri(e,t={}){return cN(e,t)}function Poe(){const e=new Map;return new Proxy(CS,{apply(t,n,r){return CS(...r)},get(t,n){return e.has(n)||e.set(n,CS(n)),e.get(n)}})}var we=Poe();function Loe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Loe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Toe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Toe(n,t)})}}function Aoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function tL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Ioe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function nL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function rL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Ww=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,y5=e=>e,Moe=class{descendants=new Map;register=e=>{if(e!=null)return Ioe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=tL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=nL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=nL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=rL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=rL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=tL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Ooe(){const e=C.exports.useRef(new Moe);return Ww(()=>()=>e.current.destroy()),e.current}var[Roe,dN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Noe(e){const t=dN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Ww(()=>()=>{!i.current||t.unregister(i.current)},[]),Ww(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=y5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function fN(){return[y5(Roe),()=>y5(dN()),()=>Ooe(),i=>Noe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),iL={path:te("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??iL.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const b=a??iL.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function lt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function V4(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const B9=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),U4=C.exports.createContext({});function Doe(){return C.exports.useContext(U4).visualElement}const j0=C.exports.createContext(null),th=typeof document<"u",b5=th?C.exports.useLayoutEffect:C.exports.useEffect,hN=C.exports.createContext({strict:!1});function zoe(e,t,n,r){const i=Doe(),o=C.exports.useContext(hN),a=C.exports.useContext(j0),s=C.exports.useContext(B9).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return b5(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),b5(()=>()=>u&&u.notifyUnmount(),[]),u}function Wp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Boe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wp(n)&&(n.current=r))},[t])}function rv(e){return typeof e=="string"||Array.isArray(e)}function j4(e){return typeof e=="object"&&typeof e.start=="function"}const Foe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function G4(e){return j4(e.animate)||Foe.some(t=>rv(e[t]))}function pN(e){return Boolean(G4(e)||e.variants)}function $oe(e,t){if(G4(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rv(n)?n:void 0,animate:rv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Hoe(e){const{initial:t,animate:n}=$oe(e,C.exports.useContext(U4));return C.exports.useMemo(()=>({initial:t,animate:n}),[oL(t),oL(n)])}function oL(e){return Array.isArray(e)?e.join(" "):e}const nu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),iv={measureLayout:nu(["layout","layoutId","drag"]),animation:nu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:nu(["exit"]),drag:nu(["drag","dragControls"]),focus:nu(["whileFocus"]),hover:nu(["whileHover","onHoverStart","onHoverEnd"]),tap:nu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:nu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:nu(["whileInView","onViewportEnter","onViewportLeave"])};function Woe(e){for(const t in e)t==="projectionNodeConstructor"?iv.projectionNodeConstructor=e[t]:iv[t].Component=e[t]}function q4(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const vm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Voe=1;function Uoe(){return q4(()=>{if(vm.hasEverUpdated)return Voe++})}const F9=C.exports.createContext({});class joe extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const gN=C.exports.createContext({}),Goe=Symbol.for("motionComponentSymbol");function qoe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Woe(e);function a(l,u){const h={...C.exports.useContext(B9),...l,layoutId:Koe(l)},{isStatic:g}=h;let m=null;const v=Hoe(l),b=g?void 0:Uoe(),w=i(l,g);if(!g&&th){v.visualElement=zoe(o,w,h,t);const P=C.exports.useContext(hN).strict,E=C.exports.useContext(gN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,b,n||iv.projectionNodeConstructor,E))}return te(joe,{visualElement:v.visualElement,props:h,children:[m,x(U4.Provider,{value:v,children:r(o,l,b,Boe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Goe]=o,s}function Koe({layoutId:e}){const t=C.exports.useContext(F9).id;return t&&e!==void 0?t+"-"+e:e}function Yoe(e){function t(r,i={}){return qoe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Zoe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function $9(e){return typeof e!="string"||e.includes("-")?!1:!!(Zoe.indexOf(e)>-1||/[A-Z]/.test(e))}const x5={};function Xoe(e){Object.assign(x5,e)}const S5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Iv=new Set(S5);function mN(e,{layout:t,layoutId:n}){return Iv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x5[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,Qoe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Joe=(e,t)=>S5.indexOf(e)-S5.indexOf(t);function eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Joe);for(const s of t)a+=`${Qoe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function vN(e){return e.startsWith("--")}const tae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yN=(e,t)=>n=>Math.max(Math.min(n,t),e),ym=e=>e%1?Number(e.toFixed(5)):e,ov=/(-)?([\d]*\.?[\d])+/g,Vw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,nae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Mv(e){return typeof e=="string"}const nh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bm=Object.assign(Object.assign({},nh),{transform:yN(0,1)}),py=Object.assign(Object.assign({},nh),{default:1}),Ov=e=>({test:t=>Mv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Ov("deg"),wl=Ov("%"),St=Ov("px"),rae=Ov("vh"),iae=Ov("vw"),aL=Object.assign(Object.assign({},wl),{parse:e=>wl.parse(e)/100,transform:e=>wl.transform(e*100)}),H9=(e,t)=>n=>Boolean(Mv(n)&&nae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),bN=(e,t,n)=>r=>{if(!Mv(r))return r;const[i,o,a,s]=r.match(ov);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Mf={test:H9("hsl","hue"),parse:bN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wl.transform(ym(t))+", "+wl.transform(ym(n))+", "+ym(bm.transform(r))+")"},oae=yN(0,255),_S=Object.assign(Object.assign({},nh),{transform:e=>Math.round(oae(e))}),Wc={test:H9("rgb","red"),parse:bN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_S.transform(e)+", "+_S.transform(t)+", "+_S.transform(n)+", "+ym(bm.transform(r))+")"};function aae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Uw={test:H9("#"),parse:aae,transform:Wc.transform},to={test:e=>Wc.test(e)||Uw.test(e)||Mf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Mf.test(e)?Mf.parse(e):Uw.parse(e),transform:e=>Mv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Mf.transform(e)},xN="${c}",SN="${n}";function sae(e){var t,n,r,i;return isNaN(e)&&Mv(e)&&((n=(t=e.match(ov))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Vw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function wN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Vw);r&&(n=r.length,e=e.replace(Vw,xN),t.push(...r.map(to.parse)));const i=e.match(ov);return i&&(e=e.replace(ov,SN),t.push(...i.map(nh.parse))),{values:t,numColors:n,tokenised:e}}function CN(e){return wN(e).values}function _N(e){const{values:t,numColors:n,tokenised:r}=wN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function uae(e){const t=CN(e);return _N(e)(t.map(lae))}const yu={test:sae,parse:CN,createTransformer:_N,getAnimatableNone:uae},cae=new Set(["brightness","contrast","saturate","opacity"]);function dae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ov)||[];if(!r)return e;const i=n.replace(r,"");let o=cae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const fae=/([a-z-]*)\(.*?\)/g,jw=Object.assign(Object.assign({},yu),{getAnimatableNone:e=>{const t=e.match(fae);return t?t.map(dae).join(" "):e}}),sL={...nh,transform:Math.round},kN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:py,scaleX:py,scaleY:py,scaleZ:py,skew:Cc,skewX:Cc,skewY:Cc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:bm,originX:aL,originY:aL,originZ:St,zIndex:sL,fillOpacity:bm,strokeOpacity:bm,numOctaves:sL};function W9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(vN(m)){o[m]=v;continue}const b=kN[m],w=tae(v,b);if(Iv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=eae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const V9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function EN(e,t,n){for(const r in t)!Ss(t[r])&&!mN(r,n)&&(e[r]=t[r])}function hae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=V9();return W9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function pae(e,t,n){const r=e.style||{},i={};return EN(i,r,e),Object.assign(i,hae(e,t,n)),e.transformValues?e.transformValues(i):i}function gae(e,t,n){const r={},i=pae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const mae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],vae=["whileTap","onTap","onTapStart","onTapCancel"],yae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],bae=["whileInView","onViewportEnter","onViewportLeave","viewport"],xae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...bae,...vae,...mae,...yae]);function w5(e){return xae.has(e)}let PN=e=>!w5(e);function Sae(e){!e||(PN=t=>t.startsWith("on")?!w5(t):e(t))}try{Sae(require("@emotion/is-prop-valid").default)}catch{}function wae(e,t,n){const r={};for(const i in e)(PN(i)||n===!0&&w5(i)||!t&&!w5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function lL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Cae(e,t,n){const r=lL(t,e.x,e.width),i=lL(n,e.y,e.height);return`${r} ${i}`}const _ae={offset:"stroke-dashoffset",array:"stroke-dasharray"},kae={offset:"strokeDashoffset",array:"strokeDasharray"};function Eae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?_ae:kae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function U9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){W9(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Cae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Eae(g,o,a,s,!1)}const LN=()=>({...V9(),attrs:{}});function Pae(e,t){const n=C.exports.useMemo(()=>{const r=LN();return U9(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};EN(r,e.style,e),n.style={...r,...n.style}}return n}function Lae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=($9(n)?Pae:gae)(r,a,s),g={...wae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const TN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function AN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const IN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function MN(e,t,n,r){AN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(IN.has(i)?i:TN(i),t.attrs[i])}function j9(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||mN(r,e))&&(n[r]=t[r]);return n}function ON(e){const t=j9(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function G9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const av=e=>Array.isArray(e),Tae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),RN=e=>av(e)?e[e.length-1]||0:e;function x3(e){const t=Ss(e)?e.get():e;return Tae(t)?t.toValue():t}function Aae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Iae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const NN=e=>(t,n)=>{const r=C.exports.useContext(U4),i=C.exports.useContext(j0),o=()=>Aae(e,t,r,i);return n?o():q4(o)};function Iae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=x3(o[m]);let{initial:a,animate:s}=e;const l=G4(e),u=pN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!j4(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=G9(e,v);if(!b)return;const{transitionEnd:w,transition:P,...E}=b;for(const k in E){let L=E[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Mae={useVisualState:NN({scrapeMotionValuesFromProps:ON,createRenderState:LN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}U9(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),MN(t,n)}})},Oae={useVisualState:NN({scrapeMotionValuesFromProps:j9,createRenderState:V9})};function Rae(e,{forwardMotionProps:t=!1},n,r,i){return{...$9(e)?Mae:Oae,preloadedFeatures:n,useRender:Lae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function K4(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return K4(i,t,n,r)},[e,t,n,r])}function Nae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Gw(t,"focus",e?r:void 0),Gw(t,"blur",e?i:void 0)}function DN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function zN(e){return!!e.touches}function Dae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const zae={pageX:0,pageY:0};function Bae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||zae;return{x:r[t+"X"],y:r[t+"Y"]}}function Fae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function q9(e,t="page"){return{point:zN(e)?Bae(e,t):Fae(e,t)}}const BN=(e,t=!1)=>{const n=r=>e(r,q9(r));return t?Dae(n):n},$ae=()=>th&&window.onpointerdown===null,Hae=()=>th&&window.ontouchstart===null,Wae=()=>th&&window.onmousedown===null,Vae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Uae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function FN(e){return $ae()?e:Hae()?Uae[e]:Wae()?Vae[e]:e}function o0(e,t,n,r){return K4(e,FN(t),BN(n,t==="pointerdown"),r)}function C5(e,t,n,r){return Gw(e,FN(t),n&&BN(n,t==="pointerdown"),r)}function $N(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const uL=$N("dragHorizontal"),cL=$N("dragVertical");function HN(e){let t=!1;if(e==="y")t=cL();else if(e==="x")t=uL();else{const n=uL(),r=cL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function WN(){const e=HN(!0);return e?(e(),!1):!0}function dL(e,t,n){return(r,i)=>{!DN(r)||WN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function jae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){C5(r,"pointerenter",e||n?dL(r,!0,e):void 0,{passive:!e}),C5(r,"pointerleave",t||n?dL(r,!1,t):void 0,{passive:!t})}const VN=(e,t)=>t?e===t?!0:VN(e,t.parentElement):!1;function K9(e){return C.exports.useEffect(()=>()=>e(),[])}function UN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),kS=.001,qae=.01,fL=10,Kae=.05,Yae=1;function Zae({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Gae(e<=fL*1e3);let a=1-t;a=k5(Kae,Yae,a),e=k5(qae,fL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=qw(u,a),b=Math.exp(-g);return kS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=qw(Math.pow(u,2),a);return(-i(u)+kS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-kS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=Qae(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Xae=12;function Qae(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function tse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!hL(e,ese)&&hL(e,Jae)){const n=Zae(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Y9(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=UN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=tse(o),v=pL,b=pL;function w(){const P=h?-(h/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=qw(L,k);v=O=>{const N=Math.exp(-k*L*O);return n-N*((P+k*L*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const N=Math.exp(-k*L*O);return k*L*N*(Math.sin(I*O)*(P+k*L*E)/I+E*Math.cos(I*O))-N*(Math.cos(I*O)*(P+k*L*E)-I*E*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(E+(P+L*E)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const N=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-N*((P+k*L*E)*Math.sinh(D)+I*E*Math.cosh(D))/I}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=g;else{const k=b(P)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=L&&I}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}Y9.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const pL=e=>0,sv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function ES(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=ES(l,s,e+1/3),o=ES(l,s,e),a=ES(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const nse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},rse=[Uw,Wc,Mf],mL=e=>rse.find(t=>t.test(e)),jN=(e,t)=>{let n=mL(e),r=mL(t),i=n.parse(e),o=r.parse(t);n===Mf&&(i=gL(i),n=Wc),r===Mf&&(o=gL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=nse(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Kw=e=>typeof e=="number",ise=(e,t)=>n=>t(e(n)),Y4=(...e)=>e.reduce(ise);function GN(e,t){return Kw(e)?n=>_r(e,t,n):to.test(e)?jN(e,t):KN(e,t)}const qN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>GN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=GN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function vL(e){const t=yu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=yu.createTransformer(t),r=vL(e),i=vL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Y4(qN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ase=(e,t)=>n=>_r(e,t,n);function sse(e){if(typeof e=="number")return ase;if(typeof e=="string")return to.test(e)?jN:KN;if(Array.isArray(e))return qN;if(typeof e=="object")return ose}function lse(e,t,n){const r=[],i=n||sse(e[0]),o=e.length-1;for(let a=0;an(sv(e,t,r))}function cse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=sv(e[o],e[o+1],i);return t[o](s)}}function YN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;_5(o===t.length),_5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=lse(t,r,i),s=o===2?use(e,a):cse(e,a);return n?l=>s(k5(e[0],e[o-1],l)):s}const Z4=e=>t=>1-e(1-t),Z9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dse=e=>t=>Math.pow(t,e),ZN=e=>t=>t*t*((e+1)*t-e),fse=e=>{const t=ZN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},XN=1.525,hse=4/11,pse=8/11,gse=9/10,X9=e=>e,Q9=dse(2),mse=Z4(Q9),QN=Z9(Q9),JN=e=>1-Math.sin(Math.acos(e)),J9=Z4(JN),vse=Z9(J9),e7=ZN(XN),yse=Z4(e7),bse=Z9(e7),xse=fse(XN),Sse=4356/361,wse=35442/1805,Cse=16061/1805,E5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-E5(1-e*2)):.5*E5(e*2-1)+.5;function Ese(e,t){return e.map(()=>t||QN).splice(0,e.length-1)}function Pse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Lse(e,t){return e.map(n=>n*t)}function S3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Lse(r&&r.length===a.length?r:Pse(a),i);function l(){return YN(s,a,{ease:Array.isArray(n)?n:Ese(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Tse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const yL={keyframes:S3,spring:Y9,decay:Tse};function Ase(e){if(Array.isArray(e.to))return S3;if(yL[e.type])return yL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Y9:S3}const eD=1/60*1e3,Ise=typeof performance<"u"?()=>performance.now():()=>Date.now(),tD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ise()),eD);function Mse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Mse(()=>lv=!0),e),{}),Rse=Rv.reduce((e,t)=>{const n=X4[t];return e[t]=(r,i=!1,o=!1)=>(lv||zse(),n.schedule(r,i,o)),e},{}),Nse=Rv.reduce((e,t)=>(e[t]=X4[t].cancel,e),{});Rv.reduce((e,t)=>(e[t]=()=>X4[t].process(a0),e),{});const Dse=e=>X4[e].process(a0),nD=e=>{lv=!1,a0.delta=Yw?eD:Math.max(Math.min(e-a0.timestamp,Ose),1),a0.timestamp=e,Zw=!0,Rv.forEach(Dse),Zw=!1,lv&&(Yw=!1,tD(nD))},zse=()=>{lv=!0,Yw=!0,Zw||tD(nD)},Bse=()=>a0;function rD(e,t,n=0){return e-t-n}function Fse(e,t,n=0,r=!0){return r?rD(t+-e,t,n):t-(e-t)+n}function $se(e,t,n,r){return r?e>=t+n:e<=-n}const Hse=e=>{const t=({delta:n})=>e(n);return{start:()=>Rse.update(t,!0),stop:()=>Nse.update(t)}};function iD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Hse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=UN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,k=0,L=w.duration,I,O=!1,N=!0,D;const z=Ase(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(D=YN([0,100],[r,P],{clamp:!1}),r=0,P=100);const H=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){k++,l==="reverse"?(N=k%2===0,a=Fse(a,L,u,N)):(a=rD(a,L,u),l==="mirror"&&H.flipTarget()),O=!1,v&&v()}function Y(){E.stop(),m&&m()}function de(ne){if(N||(ne=-ne),a+=ne,!O){const ie=H.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=N?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),E.stop()}}}function oD(e,t){return t?e*(1e3/t):0}function Wse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function P(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:P(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=P(L),O=I===n?-1:1;let N,D;const z=H=>{N=D,D=H,t=oD(H-N,Bse().delta),(O===1&&H>I||O===-1&&Hb?.stop()}}const Xw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),bL=e=>Xw(e)&&e.hasOwnProperty("z"),gy=(e,t)=>Math.abs(e-t);function t7(e,t){if(Kw(e)&&Kw(t))return gy(e,t);if(Xw(e)&&Xw(t)){const n=gy(e.x,t.x),r=gy(e.y,t.y),i=bL(e)&&bL(t)?gy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const aD=(e,t)=>1-3*t+3*e,sD=(e,t)=>3*t-6*e,lD=e=>3*e,P5=(e,t,n)=>((aD(t,n)*e+sD(t,n))*e+lD(t))*e,uD=(e,t,n)=>3*aD(t,n)*e*e+2*sD(t,n)*e+lD(t),Vse=1e-7,Use=10;function jse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=P5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Vse&&++s=qse?Kse(a,g,e,n):m===0?g:jse(a,s,s+my,e,n)}return a=>a===0||a===1?a:P5(o(a),t,r)}function Zse({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!WN()}function g(b,w){!h()||(VN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=Y4(o0(window,"pointerup",g,l),o0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}C5(i,"pointerdown",o?v:void 0,l),K9(u)}const Xse="production",cD=typeof process>"u"||process.env===void 0?Xse:"production",xL=new Set;function dD(e,t,n){e||xL.has(t)||(console.warn(t),n&&console.warn(n),xL.add(t))}const Qw=new WeakMap,PS=new WeakMap,Qse=e=>{const t=Qw.get(e.target);t&&t(e)},Jse=e=>{e.forEach(Qse)};function ele({root:e,...t}){const n=e||document;PS.has(n)||PS.set(n,{});const r=PS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Jse,{root:e,...t})),r[i]}function tle(e,t,n){const r=ele(t);return Qw.set(e,n),r.observe(e),()=>{Qw.delete(e),r.unobserve(e)}}function nle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ole:ile)(a,o.current,e,i)}const rle={some:0,all:1};function ile(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:rle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return tle(n.getInstance(),s,l)},[e,r,i,o])}function ole(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(cD!=="production"&&dD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),ale={inView:Vc(nle),tap:Vc(Zse),focus:Vc(Nae),hover:Vc(jae)};function n7(){const e=C.exports.useContext(j0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function sle(){return lle(C.exports.useContext(j0))}function lle(e){return e===null?!0:e.isPresent}function fD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,ule={linear:X9,easeIn:Q9,easeInOut:QN,easeOut:mse,circIn:JN,circInOut:vse,circOut:J9,backIn:e7,backInOut:bse,backOut:yse,anticipate:xse,bounceIn:_se,bounceInOut:kse,bounceOut:E5},SL=e=>{if(Array.isArray(e)){_5(e.length===4);const[t,n,r,i]=e;return Yse(t,n,r,i)}else if(typeof e=="string")return ule[e];return e},cle=e=>Array.isArray(e)&&typeof e[0]!="number",wL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&yu.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),vy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LS=()=>({type:"keyframes",ease:"linear",duration:.3}),dle=e=>({type:"keyframes",duration:.8,values:e}),CL={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:vy,scaleY:vy,scale:vy,opacity:LS,backgroundColor:LS,color:LS,default:vy},fle=(e,t)=>{let n;return av(t)?n=dle:n=CL[e]||CL.default,{to:t,...n(t)}},hle={...kN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:jw,WebkitFilter:jw},r7=e=>hle[e];function i7(e,t){var n;let r=r7(e);return r!==jw&&(r=yu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const ple={current:!1},hD=1/60*1e3,gle=typeof performance<"u"?()=>performance.now():()=>Date.now(),pD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(gle()),hD);function mle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=mle(()=>uv=!0),e),{}),ws=Nv.reduce((e,t)=>{const n=Q4[t];return e[t]=(r,i=!1,o=!1)=>(uv||ble(),n.schedule(r,i,o)),e},{}),Kf=Nv.reduce((e,t)=>(e[t]=Q4[t].cancel,e),{}),TS=Nv.reduce((e,t)=>(e[t]=()=>Q4[t].process(s0),e),{}),yle=e=>Q4[e].process(s0),gD=e=>{uv=!1,s0.delta=Jw?hD:Math.max(Math.min(e-s0.timestamp,vle),1),s0.timestamp=e,eC=!0,Nv.forEach(yle),eC=!1,uv&&(Jw=!1,pD(gD))},ble=()=>{uv=!0,Jw=!0,eC||pD(gD)},tC=()=>s0;function mD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Kf.read(r),e(o-t))};return ws.read(r,!0),()=>Kf.read(r)}function xle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Sle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=L5(o.duration)),o.repeatDelay&&(a.repeatDelay=L5(o.repeatDelay)),e&&(a.ease=cle(e)?e.map(SL):SL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function wle(e,t){var n,r;return(r=(n=(o7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Cle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function _le(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Cle(t),xle(e)||(e={...e,...fle(n,t.to)}),{...t,...Sle(e)}}function kle(e,t,n,r,i){const o=o7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=wL(e,n);a==="none"&&s&&typeof n=="string"?a=i7(e,n):_L(a)&&typeof n=="string"?a=kL(n):!Array.isArray(n)&&_L(n)&&typeof a=="string"&&(n=kL(a));const l=wL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Wse({...g,...o}):iD({..._le(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=RN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function _L(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function kL(e){return typeof e=="number"?0:i7("",e)}function o7(e,t){return e[t]||e.default||e}function a7(e,t,n,r={}){return ple.current&&(r={type:!1}),t.start(i=>{let o;const a=kle(e,t,n,r,i),s=wle(r,e),l=()=>o=a();let u;return s?u=mD(l,L5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ele=e=>/^\-?\d*\.?\d+$/.test(e),Ple=e=>/^0[^.\s]+$/.test(e);function s7(e,t){e.indexOf(t)===-1&&e.push(t)}function l7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class xm{constructor(){this.subscriptions=[]}add(t){return s7(this.subscriptions,t),()=>l7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new xm,this.velocityUpdateSubscribers=new xm,this.renderSubscribers=new xm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=tC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Lle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?oD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function T0(e){return new Tle(e)}const vD=e=>t=>t.test(e),Ale={test:e=>e==="auto",parse:e=>e},yD=[nh,St,wl,Cc,iae,rae,Ale],Cg=e=>yD.find(vD(e)),Ile=[...yD,to,yu],Mle=e=>Ile.find(vD(e));function Ole(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Rle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function J4(e,t,n){const r=e.getProps();return G9(r,t,n!==void 0?n:r.custom,Ole(e),Rle(e))}function Nle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,T0(n))}function Dle(e,t){const n=J4(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=RN(o[a]);Nle(e,a,s)}}function zle(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;snC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=nC(e,t,n);else{const i=typeof t=="function"?J4(e,t,n.custom):t;r=bD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function nC(e,t,n={}){var r;const i=J4(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>bD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Hle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function bD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Vle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Iv.has(m)&&(w={...w,type:!1,delay:0});let P=a7(m,v,b,w);T5(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&Dle(e,s)})}function Hle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Wle).forEach((u,h)=>{a.push(nC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Wle(e,t){return e.sortNodePosition(t)}function Vle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const u7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Ule=[...u7].reverse(),jle=u7.length;function Gle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$le(e,n,r)))}function qle(e){let t=Gle(e);const n=Yle();let r=!0;const i=(l,u)=>{const h=J4(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},P=1/0;for(let k=0;kP&&N;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,ne={...j,...de},ie=J=>{W=!0,b.delete(J),I.needsAnimating[J]=!0};for(const J in ne){const q=de[J],V=j[J];w.hasOwnProperty(J)||(q!==V?av(q)&&av(V)?!fD(q,V)||H?ie(J):I.protectedKeys[J]=!0:q!==void 0?ie(J):b.add(J):q!==void 0&&b.has(J)?ie(J):I.protectedKeys[J]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...Y.map(J=>({animation:J,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let E=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Kle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yle(){return{[jn.Animate]:hf(!0),[jn.InView]:hf(),[jn.Hover]:hf(),[jn.Tap]:hf(),[jn.Drag]:hf(),[jn.Focus]:hf(),[jn.Exit]:hf()}}const Zle={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=qle(e)),j4(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=n7(),o=C.exports.useContext(j0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class xD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=IS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=t7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=tC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=AS(h,this.transformPagePoint),DN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=IS(AS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},zN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=q9(t),o=AS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=tC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,IS(o,this.history)),this.removeListeners=Y4(o0(window,"pointermove",this.handlePointerMove),o0(window,"pointerup",this.handlePointerUp),o0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Kf.update(this.updatePoint)}}function AS(e,t){return t?{point:t(e.point)}:e}function EL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function IS({point:e},t){return{point:e,delta:EL(e,SD(t)),offset:EL(e,Xle(t)),velocity:Qle(t,.1)}}function Xle(e){return e[0]}function SD(e){return e[e.length-1]}function Qle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=SD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>L5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function PL(e,t=0,n=.01){return t7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function IL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tue(e,{top:t,left:n,bottom:r,right:i}){return{x:IL(e.x,n,i),y:IL(e.y,t,r)}}function ML(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=sv(t.min,t.max-r,e.min):r>i&&(n=sv(e.min,e.max-i,t.min)),k5(0,1,n)}function iue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const rC=.35;function oue(e=rC){return e===!1?e=0:e===!0&&(e=rC),{x:OL(e,"left","right"),y:OL(e,"top","bottom")}}function OL(e,t,n){return{min:RL(e,t),max:RL(e,n)}}function RL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const NL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Cm=()=>({x:NL(),y:NL()}),DL=()=>({min:0,max:0}),ki=()=>({x:DL(),y:DL()});function sl(e){return[e("x"),e("y")]}function wD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function sue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function MS(e){return e===void 0||e===1}function iC({scale:e,scaleX:t,scaleY:n}){return!MS(e)||!MS(t)||!MS(n)}function yf(e){return iC(e)||CD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function CD(e){return zL(e.x)||zL(e.y)}function zL(e){return e&&e!=="0%"}function A5(e,t,n){const r=e-n,i=t*r;return n+i}function BL(e,t,n,r,i){return i!==void 0&&(e=A5(e,i,r)),A5(e,n,r)+t}function oC(e,t=0,n=1,r,i){e.min=BL(e.min,t,n,r,i),e.max=BL(e.max,t,n,r,i)}function _D(e,{x:t,y:n}){oC(e.x,t.translate,t.scale,t.originPoint),oC(e.y,n.translate,n.scale,n.originPoint)}function lue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(q9(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=HN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let P=this.getAxisMotionValue(v).get()||0;if(wl.test(P)){const E=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=la(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=pue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new xD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Wp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tue(r.actual,t):this.constraints=!1,this.elastic=oue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=iue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=due(r,i.root,this.visualElement.getTransformPagePoint());let a=nue(i.layout.actual,o);if(n){const s=n(aue(a));this.hasMutatedConstraints=!!s,s&&(a=wD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!yy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return a7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!yy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=rue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!yy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;fue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=o0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=K4(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=rC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function yy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function gue(e){const{dragControls:t,visualElement:n}=e,r=q4(()=>new hue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function mue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(B9),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new xD(h,l,{transformPagePoint:s})}C5(i,"pointerdown",o&&u),K9(()=>a.current&&a.current.end())}const vue={pan:Vc(mue),drag:Vc(gue)},aC={current:null},ED={current:!1};function yue(){if(ED.current=!0,!!th)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>aC.current=e.matches;e.addListener(t),t()}else aC.current=!1}const by=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function bue(){const e=by.map(()=>new xm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{by.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+by[i]]=o=>r.add(o),n["notify"+by[i]]=(...o)=>r.notify(...o)}),n}function xue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),T5(r)&&r.add(i);else if(Ss(a))e.addValue(i,T0(o)),T5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,T0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const PD=Object.keys(iv),Sue=PD.length,LD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:k,renderState:L}=b;let I;const O=bue(),N=new Map,D=new Map;let z={};const H={...k},W=g.initial?{...k}:{};let Y;function de(){!I||!E||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,P,g)}function ne(){O.notifyUpdate(k)}function ie(X,me){const xe=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(ne,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{xe(),Se()})}const{willChange:J,...q}=u(g);for(const X in q){const me=q[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),T5(J)&&J.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const V=G4(g),G=pN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:G?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){E=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),G&&h&&!V&&(Y=h?.addVariantChild(Q)),N.forEach((me,xe)=>ie(xe,me)),ED.current||yue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:aC.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Kf.update(ne),Kf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,xe,Se,He,Ue){const ut=[];for(let Xe=0;XeQ.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:Ue,layoutScroll:At})}return ut},addVariantChild(X){var me;const xe=Q.getClosestVariantNode();if(xe)return(me=xe.variantChildren)===null||me===void 0||me.add(X),()=>xe.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>G?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),N.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;N.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>N.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let xe=N.get(X);return xe===void 0&&me!==void 0&&(xe=T0(me),Q.addValue(X,xe)),xe},forEachValue:X=>N.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,P),setBaseTarget(X,me){H[X]=me},getBaseTarget(X){var me;const{initial:xe}=g,Se=typeof xe=="string"||typeof xe=="object"?(me=G9(g,xe))===null||me===void 0?void 0:me[X]:void 0;if(xe&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return W[X]!==void 0&&Se===void 0?void 0:H[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=xue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!V){const xe=h?.getVariantContext()||{};return g.initial!==void 0&&(xe.initial=g.initial),xe}const me={};for(let xe=0;xe{const o=i.get();if(!sC(o))return;const a=lC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!sC(o))continue;const a=lC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const kue=new Set(["width","height","top","left","right","bottom","x","y"]),ID=e=>kue.has(e),Eue=e=>Object.keys(e).some(ID),MD=(e,t)=>{e.set(t,!1),e.set(t)},$L=e=>e===nh||e===St;var HL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(HL||(HL={}));const WL=(e,t)=>parseFloat(e.split(", ")[t]),VL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return WL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?WL(o[1],e):0}},Pue=new Set(["x","y","z"]),Lue=S5.filter(e=>!Pue.has(e));function Tue(e){const t=[];return Lue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const UL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:VL(4,13),y:VL(5,14)},Aue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=UL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);MD(h,s[u]),e[u]=UL[u](l,o)}),e},Iue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(ID);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Cg(h);const m=t[l];let v;if(av(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Cg(h);for(let P=w;P=0?window.pageYOffset:null,u=Aue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),th&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Mue(e,t,n,r){return Eue(t)?Iue(e,t,n,r):{target:t,transitionEnd:r}}const Oue=(e,t,n,r)=>{const i=_ue(e,t,r);return t=i.target,r=i.transitionEnd,Mue(e,t,n,r)};function Rue(e){return window.getComputedStyle(e)}const OD={treeType:"dom",readValueFromInstance(e,t){if(Iv.has(t)){const n=r7(t);return n&&n.default||0}else{const n=Rue(e),r=(vN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return kD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Fle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){zle(e,r,a);const s=Oue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:j9,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),W9(t,n,r,i.transformTemplate)},render:AN},Nue=LD(OD),Due=LD({...OD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Iv.has(t)?((n=r7(t))===null||n===void 0?void 0:n.default)||0:(t=IN.has(t)?t:TN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:ON,build(e,t,n,r,i){U9(t,n,r,i.transformTemplate)},render:MN}),zue=(e,t)=>$9(e)?Due(t,{enableHardwareAcceleration:!1}):Nue(t,{enableHardwareAcceleration:!0});function jL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _g={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=jL(e,t.target.x),r=jL(e,t.target.y);return`${n}% ${r}%`}},GL="_$css",Bue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(AD,v=>(o.push(v),GL)));const a=yu.parse(e);if(a.length>5)return r;const s=yu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(GL,()=>{const b=o[v];return v++,b})}return m}};class Fue extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Xoe(Hue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),vm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function $ue(e){const[t,n]=n7(),r=C.exports.useContext(F9);return x(Fue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(gN),isPresent:t,safeToRemove:n})}const Hue={borderRadius:{..._g,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_g,borderTopRightRadius:_g,borderBottomLeftRadius:_g,borderBottomRightRadius:_g,boxShadow:Bue},Wue={measureLayout:$ue};function Vue(e,t,n={}){const r=Ss(e)?e:T0(e);return a7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const RD=["TopLeft","TopRight","BottomLeft","BottomRight"],Uue=RD.length,qL=e=>typeof e=="string"?parseFloat(e):e,KL=e=>typeof e=="number"||St.test(e);function jue(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Gue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,que(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(sv(e,t,r))}function ZL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){ZL(e.x,t.x),ZL(e.y,t.y)}function XL(e,t,n,r,i){return e-=t,e=A5(e,1/n,r),i!==void 0&&(e=A5(e,1/i,r)),e}function Kue(e,t=0,n=1,r=.5,i,o=e,a=e){if(wl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=XL(e.min,t,n,s,i),e.max=XL(e.max,t,n,s,i)}function QL(e,t,[n,r,i],o,a){Kue(e,t[n],t[r],t[i],t.scale,o,a)}const Yue=["x","scaleX","originX"],Zue=["y","scaleY","originY"];function JL(e,t,n,r){QL(e.x,t,Yue,n?.x,r?.x),QL(e.y,t,Zue,n?.y,r?.y)}function eT(e){return e.translate===0&&e.scale===1}function DD(e){return eT(e.x)&&eT(e.y)}function zD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function tT(e){return la(e.x)/la(e.y)}function Xue(e,t,n=.1){return t7(e,t)<=n}class Que{constructor(){this.members=[]}add(t){s7(this.members,t),t.scheduleRender()}remove(t){if(l7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Jue="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function nT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Jue?"none":o}const ece=(e,t)=>e.depth-t.depth;class tce{constructor(){this.children=[],this.isDirty=!1}add(t){s7(this.children,t),this.isDirty=!0}remove(t){l7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ece),this.isDirty=!1,this.children.forEach(t)}}const rT=["","X","Y","Z"],iT=1e3;function BD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(ace),this.nodes.forEach(sce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=mD(v,250),vm.hasAnimatedSinceResize&&(vm.hasAnimatedSinceResize=!1,this.nodes.forEach(aT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var P,E,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(P=this.options.transition)!==null&&P!==void 0?P:g.getDefaultTransition())!==null&&E!==void 0?E:fce,{onLayoutAnimationStart:N,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!zD(this.targetLayout,w)||b,H=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,H);const W={...o7(O,"layout"),onPlay:N,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&aT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Kf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(lce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));cT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=E/1e3;sT(m.x,a.x,L),sT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(wm(v,this.layout.actual,this.relativeParent.layout.actual),cce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,jue(g,h,this.latestValues,L,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Kf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{vm.hasAnimatedSinceResize=!0,this.currentAnimation=Vue(0,iT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,iT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&FD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Vp(s,h),Sm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Que),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(oT),this.root.sharedNodes.clear()}}}function nce(e){e.updateLayout()}function rce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):FD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Cm();Sm(l,o,i.layout);const u=Cm();i.isShared?Sm(u,e.applyTransform(a,!0),i.measured):Sm(u,o,i.layout);const h=!DD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();wm(b,i.layout,m.layout);const w=ki();wm(w,o,v.actual),zD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function ice(e){e.clearSnapshot()}function oT(e){e.clearMeasurements()}function oce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function aT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function ace(e){e.resolveTargetDelta()}function sce(e){e.calcProjection()}function lce(e){e.resetRotation()}function uce(e){e.removeLeadSnapshot()}function sT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function cce(e,t,n,r){lT(e.x,t.x,n.x,r),lT(e.y,t.y,n.y,r)}function dce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const fce={duration:.45,ease:[.4,0,.1,1]};function hce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function uT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function cT(e){uT(e.x),uT(e.y)}function FD(e,t,n){return e==="position"||e==="preserve-aspect"&&!Xue(tT(t),tT(n),.2)}const pce=BD({attachResizeListener:(e,t)=>K4(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),OS={current:void 0},gce=BD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!OS.current){const e=new pce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),OS.current=e}return OS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),mce={...Zle,...ale,...vue,...Wue},Ml=Yoe((e,t)=>Rae(e,t,mce,zue,gce));function $D(){const e=C.exports.useRef(!1);return b5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vce(){const e=$D(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class yce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(yce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const RS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=q4(xce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(bce,{isPresent:n,children:e})),x(j0.Provider,{value:u,children:e})};function xce(){return new Map}const Pp=e=>e.key||"";function Sce(e,t){e.forEach(n=>{const r=Pp(n);t.set(r,n)})}function wce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",dD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=vce();const l=C.exports.useContext(F9).forceRender;l&&(s=l);const u=$D(),h=wce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(b5(()=>{w.current=!1,Sce(h,b),v.current=g}),K9(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Xn,{children:g.map(L=>x(RS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Pp(L)))});g=[...g];const P=v.current.map(Pp),E=h.map(Pp),k=P.length;for(let L=0;L{if(E.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=P.indexOf(L),N=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(RS,{isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:o,mode:a,children:I},Pp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(RS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Pp(L))}),cD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Xn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function uC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Cce(){return!1}var _ce=e=>{const{condition:t,message:n}=e;t&&Cce()&&console.warn(n)},Of={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},kg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function cC(e){switch(e?.direction??"right"){case"right":return kg.slideRight;case"left":return kg.slideLeft;case"bottom":return kg.slideDown;case"top":return kg.slideUp;default:return kg.slideRight}}var Bf={enter:{duration:.2,ease:Of.easeOut},exit:{duration:.1,ease:Of.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},kce=e=>e!=null&&parseInt(e.toString(),10)>0,fT={exit:{height:{duration:.2,ease:Of.ease},opacity:{duration:.3,ease:Of.ease}},enter:{height:{duration:.3,ease:Of.ease},opacity:{duration:.4,ease:Of.ease}}},Ece={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:kce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(fT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(fT.enter,i)})},WD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),_ce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Ml.div,{ref:t,...g,className:Dv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Ece,initial:r?"exit":!1,animate:E,exit:"exit"})})});WD.displayName="Collapse";var Pce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter(Bf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit(Bf.exit,n),transitionEnd:t?.exit})},VD={initial:"exit",animate:"enter",exit:"exit",variants:Pce},Lce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:g&&le.createElement(Ml.div,{ref:n,className:Dv("chakra-fade",o),custom:m,...VD,animate:h,...u})})});Lce.displayName="Fade";var Tce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit(Bf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter(Bf.enter,n),transitionEnd:e?.enter})},UD={initial:"exit",animate:"enter",exit:"exit",variants:Tce},Ace=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:b,children:m&&le.createElement(Ml.div,{ref:n,className:Dv("chakra-offset-slide",s),...UD,animate:v,custom:b,...g})})});Ace.displayName="ScaleFade";var hT={exit:{duration:.15,ease:Of.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Ice={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=cC({direction:e});return{...i,transition:t?.exit??Cs.exit(hT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=cC({direction:e});return{...i,transition:n?.enter??Cs.enter(hT.enter,r),transitionEnd:t?.enter}}},jD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=cC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Ml.div,{...m,ref:n,initial:"exit",className:Dv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:Ice,style:b,...g})})});jD.displayName="Slide";var Mce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit(Bf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter(Bf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit(Bf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},dC={initial:"initial",animate:"enter",exit:"exit",variants:Mce},Oce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(pd,{custom:w,children:v&&le.createElement(Ml.div,{ref:n,className:Dv("chakra-offset-slide",a),custom:w,...dC,animate:b,...m})})});Oce.displayName="SlideFade";var zv=(...e)=>e.filter(Boolean).join(" ");function Rce(){return!1}var eb=e=>{const{condition:t,message:n}=e;t&&Rce()&&console.warn(n)};function NS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Nce,tb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Dce,c7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[zce,jke,Bce,Fce]=fN(),Oc=Pe(function(t,n){const{getButtonProps:r}=c7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...tb().button};return le.createElement(we.button,{...i,className:zv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function $ce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Vce(e),Uce(e);const s=Bce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=V4({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(k=>k!==v);g(E)}else P?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Hce,d7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Wce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=d7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;jce(e);const{register:m,index:v,descendants:b}=Fce({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Gce({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},k=()=>{P?.(!1)},L=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),I=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),N=C.exports.useCallback(function(H={},W=null){return{...H,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:NS(H.onClick,L),onFocus:NS(H.onFocus,O),onKeyDown:NS(H.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function(H={},W=null){return{...H,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:N,getPanelProps:D,htmlProps:i}}function Vce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;eb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Uce(e){eb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function jce(e){eb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Gce(e){eb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=c7(),{reduceMotion:r}=d7(),i=zv("chakra-accordion__icon",e.className),o=tb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Wce(t),l={...tb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(Dce,{value:u},le.createElement(we.div,{ref:n,...o,className:zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=d7(),{getPanelProps:s,isOpen:l}=c7(),u=s(o,n),h=zv("chakra-accordion__panel",r),g=tb();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(WD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var nb=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=$ce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(zce,{value:l},le.createElement(Hce,{value:h},le.createElement(Nce,{value:o},le.createElement(we.div,{ref:i,...s,className:zv("chakra-accordion",r.className),__css:o.root},t))))});nb.displayName="Accordion";var qce=(...e)=>e.filter(Boolean).join(" "),Kce=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Bv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=qce("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Kce} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Bv.displayName="Spinner";var rb=(...e)=>e.filter(Boolean).join(" ");function Yce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Zce(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function pT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Xce,Qce]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Jce,f7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),GD={info:{icon:Zce,colorScheme:"blue"},warning:{icon:pT,colorScheme:"orange"},success:{icon:Yce,colorScheme:"green"},error:{icon:pT,colorScheme:"red"},loading:{icon:Bv,colorScheme:"blue"}};function ede(e){return GD[e].colorScheme}function tde(e){return GD[e].icon}var qD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??ede(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Xce,{value:{status:r}},le.createElement(Jce,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:rb("chakra-alert",t.className),__css:l})))});qD.displayName="Alert";var KD=Pe(function(t,n){const i={display:"inline",...f7().description};return le.createElement(we.div,{ref:n,...t,className:rb("chakra-alert__desc",t.className),__css:i})});KD.displayName="AlertDescription";function YD(e){const{status:t}=Qce(),n=tde(t),r=f7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:rb("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}YD.displayName="AlertIcon";var ZD=Pe(function(t,n){const r=f7();return le.createElement(we.div,{ref:n,...t,className:rb("chakra-alert__title",t.className),__css:r.title})});ZD.displayName="AlertTitle";function nde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function rde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ide=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",I5=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});I5.displayName="NativeImage";var ib=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=rde({...t,ignoreFallback:P}),k=ide(E,m),L={ref:n,objectFit:l,objectPosition:s,...P?b:nde(b,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:I5,className:"chakra-image__placeholder",src:r,...L}):le.createElement(we.img,{as:I5,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ib.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:I5,className:"chakra-image",...e}));function ob(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var ab=(...e)=>e.filter(Boolean).join(" "),gT=e=>e?"":void 0,[ode,ade]=Cn({strict:!1,name:"ButtonGroupContext"});function fC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=ab("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}fC.displayName="ButtonIcon";function hC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Bv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=ab("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}hC.displayName="ButtonSpinner";function sde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=ade(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:P,...E}=vn(e),k=C.exports.useMemo(()=>{const N={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:N}}},[r,n]),{ref:L,type:I}=sde(P),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return le.createElement(we.button,{disabled:i||o,ref:Aoe(t,L),as:P,type:m??I,"data-active":gT(a),"data-loading":gT(o),__css:k,className:ab("chakra-button",w),...E},o&&b==="start"&&x(hC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||le.createElement(we.span,{opacity:0},x(mT,{...O})):x(mT,{...O}),o&&b==="end"&&x(hC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function mT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return te(Xn,{children:[t&&x(fC,{marginEnd:i,children:t}),r,n&&x(fC,{marginStart:i,children:n})]})}var Eo=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=ab("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(ode,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Eo.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var K0=(...e)=>e.filter(Boolean).join(" "),xy=e=>e?"":void 0,DS=e=>e?!0:void 0;function vT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[lde,XD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ude,Y0]=Cn({strict:!1,name:"FormControlContext"});function cde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,H=>{!H||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":xy(P),"data-disabled":xy(i),"data-invalid":xy(r),"data-readonly":xy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,P,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,H=>{!H||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),N=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:N}}var gd=Pe(function(t,n){const r=Ri("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=cde(i),l=K0("chakra-form-control",t.className);return le.createElement(ude,{value:s},le.createElement(lde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var dde=Pe(function(t,n){const r=Y0(),i=XD(),o=K0("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});dde.displayName="FormHelperText";function h7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=p7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":DS(n),"aria-required":DS(i),"aria-readonly":DS(r)}}function p7(e){const t=Y0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:vT(t?.onFocus,h),onBlur:vT(t?.onBlur,g)}}var[fde,hde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),pde=Pe((e,t)=>{const n=Ri("FormError",e),r=vn(e),i=Y0();return i?.isInvalid?le.createElement(fde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:K0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});pde.displayName="FormErrorMessage";var gde=Pe((e,t)=>{const n=hde(),r=Y0();if(!r?.isInvalid)return null;const i=K0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});gde.displayName="FormErrorIcon";var rh=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(QD,{}),optionalIndicator:l=null,...u}=i,h=Y0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...g,className:K0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});rh.displayName="FormLabel";var QD=Pe(function(t,n){const r=Y0(),i=XD();if(!r?.isRequired)return null;const o=K0("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});QD.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var g7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mde=we("span",{baseStyle:g7});mde.displayName="VisuallyHidden";var vde=we("input",{baseStyle:g7});vde.displayName="VisuallyHiddenInput";var yT=!1,sb=null,A0=!1,pC=new Set,yde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function bde(e){return!(e.metaKey||!yde&&e.altKey||e.ctrlKey)}function m7(e,t){pC.forEach(n=>n(e,t))}function bT(e){A0=!0,bde(e)&&(sb="keyboard",m7("keyboard",e))}function mp(e){sb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(A0=!0,m7("pointer",e))}function xde(e){e.target===window||e.target===document||(A0||(sb="keyboard",m7("keyboard",e)),A0=!1)}function Sde(){A0=!1}function xT(){return sb!=="pointer"}function wde(){if(typeof window>"u"||yT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){A0=!0,e.apply(this,n)},document.addEventListener("keydown",bT,!0),document.addEventListener("keyup",bT,!0),window.addEventListener("focus",xde,!0),window.addEventListener("blur",Sde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",mp,!0),document.addEventListener("pointermove",mp,!0),document.addEventListener("pointerup",mp,!0)):(document.addEventListener("mousedown",mp,!0),document.addEventListener("mousemove",mp,!0),document.addEventListener("mouseup",mp,!0)),yT=!0}function Cde(e){wde(),e(xT());const t=()=>e(xT());return pC.add(t),()=>{pC.delete(t)}}var[Gke,_de]=Cn({name:"CheckboxGroupContext",strict:!1}),kde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ede(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Pde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Lde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Tde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Lde:Pde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Ade(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function JD(e={}){const t=p7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:P,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,N=Ade(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),H=dr(l),[W,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[ne,ie]=C.exports.useState(!1),[J,q]=C.exports.useState(!1);C.exports.useEffect(()=>Cde(Y),[]);const V=C.exports.useRef(null),[G,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:X,He=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}xe||me(Se?Ae.target.checked:b?!0:Ae.target.checked),D?.(Ae)},[r,n,Se,xe,b,D]);bs(()=>{V.current&&(V.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Ae=V.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const Ue=n&&!m,ut=C.exports.useCallback(Ae=>{Ae.key===" "&&q(!0)},[q]),Xe=C.exports.useCallback(Ae=>{Ae.key===" "&&q(!1)},[q]);bs(()=>{if(!V.current)return;V.current.checked!==Se&&me(V.current.checked)},[V.current]);const et=C.exports.useCallback((Ae={},dt=null)=>{const Mt=ct=>{de&&ct.preventDefault(),q(!0)};return{...Ae,ref:dt,"data-active":eo(J),"data-hover":eo(ne),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&W),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Ae.onMouseDown,Mt),onMouseUp:ka(Ae.onMouseUp,()=>q(!1)),onMouseEnter:ka(Ae.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Ae.onMouseLeave,()=>ie(!1))}},[J,Se,n,de,W,ne,b,o,r]),tt=C.exports.useCallback((Ae={},dt=null)=>({...N,...Ae,ref:$n(dt,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Ae.onClick,()=>{var Mt;G||((Mt=V.current)==null||Mt.click(),requestAnimationFrame(()=>{var ct;(ct=V.current)==null||ct.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[N,n,Se,o,G]),at=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:$n(V,dt),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:ka(Ae.onChange,He),onBlur:ka(Ae.onBlur,z,()=>j(!1)),onFocus:ka(Ae.onFocus,H,()=>j(!0)),onKeyDown:ka(Ae.onKeyDown,ut),onKeyUp:ka(Ae.onKeyUp,Xe),required:i,checked:Se,disabled:Ue,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:g7}),[w,P,a,He,z,H,ut,Xe,i,Se,Ue,r,k,L,I,o,u,n,E]),At=C.exports.useCallback((Ae={},dt=null)=>({...Ae,ref:dt,onMouseDown:ka(Ae.onMouseDown,ST),onTouchStart:ka(Ae.onTouchStart,ST),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:J,isHovered:ne,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:et,getInputProps:at,getLabelProps:At,htmlProps:N}}function ST(e){e.preventDefault(),e.stopPropagation()}var Ide={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Mde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Ode=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Rde=hd({from:{opacity:0},to:{opacity:1}}),Nde=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),ez=Pe(function(t,n){const r=_de(),i={...r,...t},o=Ri("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Tde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ede(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:N,getLabelProps:D,getRootProps:z}=JD({...E,isDisabled:b,isChecked:k,onChange:L}),H=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Rde} 20ms linear, ${Nde} 200ms linear`:`${Ode} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:H,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return le.createElement(we.label,{__css:{...Mde,...o.container},className:kde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(P,n)}),le.createElement(we.span,{__css:{...Ide,...o.control},className:"chakra-checkbox__control",...N()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});ez.displayName="Checkbox";function Dde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var lb=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Dde,{width:"1em",height:"1em"}))});lb.displayName="CloseButton";function zde(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function v7(e,t){let n=zde(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function gC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function M5(e,t,n){return(e-t)*100/(n-t)}function tz(e,t,n){return(n-t)*e+t}function mC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=gC(n);return v7(r,i)}function l0(e,t,n){return e==null?e:(nr==null?"":zS(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=nz(_c(v),o),w=n??b,P=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let Y=W;return l&&(Y=l0(Y,a,s)),v7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(W):Y=_c(v)+W,Y=E(Y),P(Y)},[E,o,P,v]),L=C.exports.useCallback((W=o)=>{let Y;v===""?Y=_c(-W):Y=_c(v)-W,Y=E(Y),P(Y)},[E,o,P,v]),I=C.exports.useCallback(()=>{let W;r==null?W="":W=zS(r,o,n)??a,P(W)},[r,n,o,P,a]),O=C.exports.useCallback(W=>{const Y=zS(W,o,w)??a;P(Y)},[w,o,P,a]),N=_c(v);return{isOutOfRange:N>s||Nx(F4,{styles:rz}),$de=()=>x(F4,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${rz} - `});function Ff(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Hde(e){return"current"in e}var iz=()=>typeof window<"u";function Wde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Vde=e=>iz()&&e.test(navigator.vendor),Ude=e=>iz()&&e.test(Wde()),jde=()=>Ude(/mac|iphone|ipad|ipod/i),Gde=()=>jde()&&Vde(/apple/i);function qde(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Ff(i,"pointerdown",o=>{if(!Gde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Hde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Kde=HQ?C.exports.useLayoutEffect:C.exports.useEffect;function wT(e,t=[]){const n=C.exports.useRef(e);return Kde(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Yde(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Zde(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function O5(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=wT(n),a=wT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Yde(r,s),g=Zde(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:WQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function y7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var b7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=vn(i),s=h7(a),l=Nr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});b7.displayName="Input";b7.id="Input";var[Xde,oz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Qde=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=ob(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=y7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Xde,{value:r,children:g}))});Qde.displayName="InputGroup";var Jde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),x7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Jde[r]??{},a=oz();return x(efe,{ref:n,...i,__css:{...a.addon,...o}})});x7.displayName="InputAddon";var az=Pe(function(t,n){return x(x7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});az.displayName="InputLeftAddon";az.id="InputLeftAddon";var sz=Pe(function(t,n){return x(x7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});sz.displayName="InputRightAddon";sz.id="InputRightAddon";var tfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),ub=Pe(function(t,n){const{placement:r="left",...i}=t,o=oz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(tfe,{ref:n,__css:l,...i})});ub.id="InputElement";ub.displayName="InputElement";var lz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(ub,{ref:n,placement:"left",className:o,...i})});lz.id="InputLeftElement";lz.displayName="InputLeftElement";var uz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(ub,{ref:n,placement:"right",className:o,...i})});uz.id="InputRightElement";uz.displayName="InputRightElement";function nfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):nfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var rfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});rfe.displayName="AspectRatio";var ife=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});ife.displayName="Badge";var md=we("div");md.displayName="Box";var cz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(md,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});cz.displayName="Square";var ofe=Pe(function(t,n){const{size:r,...i}=t;return x(cz,{size:r,ref:n,borderRadius:"9999px",...i})});ofe.displayName="Circle";var dz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});dz.displayName="Center";var afe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:afe[r],...i,position:"absolute"})});var sfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});sfe.displayName="Code";var lfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});lfe.displayName="Container";var ufe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});ufe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...b})});fz.displayName="Grid";function CT(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var cfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=y7({gridArea:r,gridColumn:CT(i),gridRow:CT(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:g,...h})});cfe.displayName="GridItem";var $f=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});$f.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(md,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var dfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});dfe.displayName="Kbd";var Hf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Hf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[ffe,hz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),S7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=ob(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(ffe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});S7.displayName="List";var hfe=Pe((e,t)=>{const{as:n,...r}=e;return x(S7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});hfe.displayName="OrderedList";var pz=Pe(function(t,n){const{as:r,...i}=t;return x(S7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});pz.displayName="UnorderedList";var gz=Pe(function(t,n){const r=hz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});gz.displayName="ListItem";var pfe=Pe(function(t,n){const r=hz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});pfe.displayName="ListIcon";var gfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=U0(),h=s?vfe(s,u):yfe(r);return x(fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});gfe.displayName="SimpleGrid";function mfe(e){return typeof e=="number"?`${e}px`:e}function vfe(e,t){return od(e,n=>{const r=boe("sizes",n,mfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function yfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var mz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});mz.displayName="Spacer";var vC="& > *:not(style) ~ *:not(style)";function bfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[vC]:od(n,i=>r[i])}}function xfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var vz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});vz.displayName="StackItem";var w7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>bfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>xfe({spacing:a,direction:v}),[a,v]),P=!!u,E=!g&&!P,k=C.exports.useMemo(()=>{const I=ob(l);return E?I:I.map((O,N)=>{const D=typeof O.key<"u"?O.key:N,z=N+1===I.length,W=g?x(vz,{children:O},D):O;if(!P)return W;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return te(C.exports.Fragment,{children:[W,de]},D)})},[u,w,P,E,g,l]),L=Nr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:P?{}:{[vC]:b[vC]},...m},k)});w7.displayName="Stack";var yz=Pe((e,t)=>x(w7,{align:"center",...e,direction:"row",ref:t}));yz.displayName="HStack";var Sfe=Pe((e,t)=>x(w7,{align:"center",...e,direction:"column",ref:t}));Sfe.displayName="VStack";var ko=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=y7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});ko.displayName="Text";function _T(e){return typeof e=="number"?`${e}px`:e}var wfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,k=>_T(Ew("space",k)(E))),"--chakra-wrap-y-spacing":E=>od(P,k=>_T(Ew("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,P)=>x(bz,{children:w},P)):a,[a,g]);return le.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});wfe.displayName="Wrap";var bz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});bz.displayName="WrapItem";var Cfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},xz=Cfe,vp=()=>{},_fe={document:xz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:vp,removeEventListener:vp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:vp,removeListener:vp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:vp,setInterval:()=>0,clearInterval:vp},kfe=_fe,Efe={window:kfe,document:xz},Sz=typeof window<"u"?{window,document}:Efe,wz=C.exports.createContext(Sz);wz.displayName="EnvironmentContext";function Cz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Sz},[r,n]);return te(wz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Cz.displayName="EnvironmentProvider";var Pfe=e=>e?"":void 0;function Lfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function BS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Tfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,P]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),L=Lfe(),I=q=>{!q||q.tagName!=="BUTTON"&&P(!1)},O=w?g:g||0,N=n&&!r,D=C.exports.useCallback(q=>{if(n){q.stopPropagation(),q.preventDefault();return}q.currentTarget.focus(),l?.(q)},[n,l]),z=C.exports.useCallback(q=>{E&&BS(q)&&(q.preventDefault(),q.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[E,L]),H=C.exports.useCallback(q=>{if(u?.(q),n||q.defaultPrevented||q.metaKey||!BS(q.nativeEvent)||w)return;const V=i&&q.key==="Enter";o&&q.key===" "&&(q.preventDefault(),k(!0)),V&&(q.preventDefault(),q.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),W=C.exports.useCallback(q=>{if(h?.(q),n||q.defaultPrevented||q.metaKey||!BS(q.nativeEvent)||w)return;o&&q.key===" "&&(q.preventDefault(),k(!1),q.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(q=>{q.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(q=>{if(q.button!==0)return;if(n){q.stopPropagation(),q.preventDefault();return}w||k(!0),q.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(q)},[n,w,a,L,Y]),j=C.exports.useCallback(q=>{q.button===0&&(w||k(!1),s?.(q))},[s,w]),ne=C.exports.useCallback(q=>{if(n){q.preventDefault();return}m?.(q)},[n,m]),ie=C.exports.useCallback(q=>{E&&(q.preventDefault(),k(!1)),v?.(q)},[E,v]),J=$n(t,I);return w?{...b,ref:J,type:"button","aria-disabled":N?void 0:n,disabled:N,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:J,role:"button","data-active":Pfe(E),"aria-disabled":n?"true":void 0,tabIndex:N?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:W,onKeyDown:H,onMouseOver:ne,onMouseLeave:ie}}function _z(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function kz(e){if(!_z(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Afe(e){var t;return((t=Ez(e))==null?void 0:t.defaultView)??window}function Ez(e){return _z(e)?e.ownerDocument:document}function Ife(e){return Ez(e).activeElement}var Pz=e=>e.hasAttribute("tabindex"),Mfe=e=>Pz(e)&&e.tabIndex===-1;function Ofe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Lz(e){return e.parentElement&&Lz(e.parentElement)?!0:e.hidden}function Rfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Tz(e){if(!kz(e)||Lz(e)||Ofe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Rfe(e)?!0:Pz(e)}function Nfe(e){return e?kz(e)&&Tz(e)&&!Mfe(e):!1}var Dfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],zfe=Dfe.join(),Bfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Az(e){const t=Array.from(e.querySelectorAll(zfe));return t.unshift(e),t.filter(n=>Tz(n)&&Bfe(n))}function Ffe(e){const t=e.current;if(!t)return!1;const n=Ife(t);return!n||t.contains(n)?!1:!!Nfe(n)}function $fe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Ffe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Hfe={preventScroll:!0,shouldFocus:!1};function Wfe(e,t=Hfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Vfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Az(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Ff(a,"transitionend",h)}function Vfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",C7="auto",Fv=[Io,Ba,Fa,Mo],I0="start",cv="end",Ufe="clippingParents",Iz="viewport",Eg="popper",jfe="reference",kT=Fv.reduce(function(e,t){return e.concat([t+"-"+I0,t+"-"+cv])},[]),Mz=[].concat(Fv,[C7]).reduce(function(e,t){return e.concat([t,t+"-"+I0,t+"-"+cv])},[]),Gfe="beforeRead",qfe="read",Kfe="afterRead",Yfe="beforeMain",Zfe="main",Xfe="afterMain",Qfe="beforeWrite",Jfe="write",ehe="afterWrite",the=[Gfe,qfe,Kfe,Yfe,Zfe,Xfe,Qfe,Jfe,ehe];function Pl(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!Pl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function rhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!Pl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const ihe={name:"applyStyles",enabled:!0,phase:"write",fn:nhe,effect:rhe,requires:["computeStyles"]};function Cl(e){return e.split("-")[0]}var Wf=Math.max,R5=Math.min,M0=Math.round;function yC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Oz(){return!/^((?!chrome|android).)*safari/i.test(yC())}function O0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&M0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M0(r.height)/e.offsetHeight||1);var a=Yf(e)?Wa(e):window,s=a.visualViewport,l=!Oz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function k7(e){var t=O0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Rz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Wa(e).getComputedStyle(e)}function ohe(e){return["table","td","th"].indexOf(Pl(e))>=0}function vd(e){return((Yf(e)?e.ownerDocument:e.document)||window.document).documentElement}function cb(e){return Pl(e)==="html"?e:e.assignedSlot||e.parentNode||(_7(e)?e.host:null)||vd(e)}function ET(e){return!Na(e)||bu(e).position==="fixed"?null:e.offsetParent}function ahe(e){var t=/firefox/i.test(yC()),n=/Trident/i.test(yC());if(n&&Na(e)){var r=bu(e);if(r.position==="fixed")return null}var i=cb(e);for(_7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(Pl(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function $v(e){for(var t=Wa(e),n=ET(e);n&&ohe(n)&&bu(n).position==="static";)n=ET(n);return n&&(Pl(n)==="html"||Pl(n)==="body"&&bu(n).position==="static")?t:n||ahe(e)||t}function E7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _m(e,t,n){return Wf(e,R5(t,n))}function she(e,t,n){var r=_m(e,t,n);return r>n?n:r}function Nz(){return{top:0,right:0,bottom:0,left:0}}function Dz(e){return Object.assign({},Nz(),e)}function zz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var lhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Dz(typeof t!="number"?t:zz(t,Fv))};function uhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Cl(n.placement),l=E7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=lhe(i.padding,n),m=k7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=$v(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,L=w/2-P/2,I=g[v],O=k-m[h]-g[b],N=k/2-m[h]/2+L,D=_m(I,N,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-N,t)}}function che(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Rz(t.elements.popper,i)||(t.elements.arrow=i))}const dhe={name:"arrow",enabled:!0,phase:"main",fn:uhe,effect:che,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function R0(e){return e.split("-")[1]}var fhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:M0(t*i)/i||0,y:M0(n*i)/i||0}}function PT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var N=$v(n),D="clientHeight",z="clientWidth";if(N===Wa(n)&&(N=vd(n),bu(N).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),N=N,i===Io||(i===Mo||i===Fa)&&o===cv){I=Ba;var H=g&&N===O&&O.visualViewport?O.visualViewport.height:N[D];w-=H-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===cv){L=Fa;var W=g&&N===O&&O.visualViewport?O.visualViewport.width:N[z];v-=W-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&fhe),de=h===!0?hhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=E?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=E?v+"px":"",t.transform="",t))}function phe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Cl(t.placement),variation:R0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,PT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,PT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ghe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:phe,data:{}};var Sy={passive:!0};function mhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Sy)}),s&&l.addEventListener("resize",n.update,Sy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Sy)}),s&&l.removeEventListener("resize",n.update,Sy)}}const vhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:mhe,data:{}};var yhe={left:"right",right:"left",bottom:"top",top:"bottom"};function C3(e){return e.replace(/left|right|bottom|top/g,function(t){return yhe[t]})}var bhe={start:"end",end:"start"};function LT(e){return e.replace(/start|end/g,function(t){return bhe[t]})}function P7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function L7(e){return O0(vd(e)).left+P7(e).scrollLeft}function xhe(e,t){var n=Wa(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Oz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+L7(e),y:l}}function She(e){var t,n=vd(e),r=P7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+L7(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=Wf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function T7(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Bz(e){return["html","body","#document"].indexOf(Pl(e))>=0?e.ownerDocument.body:Na(e)&&T7(e)?e:Bz(cb(e))}function km(e,t){var n;t===void 0&&(t=[]);var r=Bz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],T7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(km(cb(a)))}function bC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function whe(e,t){var n=O0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function TT(e,t,n){return t===Iz?bC(xhe(e,n)):Yf(t)?whe(t,n):bC(She(vd(e)))}function Che(e){var t=km(cb(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&Na(e)?$v(e):e;return Yf(r)?t.filter(function(i){return Yf(i)&&Rz(i,r)&&Pl(i)!=="body"}):[]}function _he(e,t,n,r){var i=t==="clippingParents"?Che(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=TT(e,u,r);return l.top=Wf(h.top,l.top),l.right=R5(h.right,l.right),l.bottom=R5(h.bottom,l.bottom),l.left=Wf(h.left,l.left),l},TT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fz(e){var t=e.reference,n=e.element,r=e.placement,i=r?Cl(r):null,o=r?R0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?E7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case I0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case cv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function dv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Ufe:s,u=n.rootBoundary,h=u===void 0?Iz:u,g=n.elementContext,m=g===void 0?Eg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=Dz(typeof P!="number"?P:zz(P,Fv)),k=m===Eg?jfe:Eg,L=e.rects.popper,I=e.elements[b?k:m],O=_he(Yf(I)?I:I.contextElement||vd(e.elements.popper),l,h,a),N=O0(e.elements.reference),D=Fz({reference:N,element:L,strategy:"absolute",placement:i}),z=bC(Object.assign({},L,D)),H=m===Eg?z:N,W={top:O.top-H.top+E.top,bottom:H.bottom-O.bottom+E.bottom,left:O.left-H.left+E.left,right:H.right-O.right+E.right},Y=e.modifiersData.offset;if(m===Eg&&Y){var de=Y[i];Object.keys(W).forEach(function(j){var ne=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";W[j]+=de[ie]*ne})}return W}function khe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Mz:l,h=R0(r),g=h?s?kT:kT.filter(function(b){return R0(b)===h}):Fv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=dv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Cl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ehe(e){if(Cl(e)===C7)return[];var t=C3(e);return[LT(e),t,LT(t)]}function Phe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=Cl(P),k=E===P,L=l||(k||!b?[C3(P)]:Ehe(P)),I=[P].concat(L).reduce(function(Se,He){return Se.concat(Cl(He)===C7?khe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,N=t.rects.popper,D=new Map,z=!0,H=I[0],W=0;W=0,ie=ne?"width":"height",J=dv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),q=ne?j?Fa:Mo:j?Ba:Io;O[ie]>N[ie]&&(q=C3(q));var V=C3(q),G=[];if(o&&G.push(J[de]<=0),s&&G.push(J[q]<=0,J[V]<=0),G.every(function(Se){return Se})){H=Y,z=!1;break}D.set(Y,G)}if(z)for(var Q=b?3:1,X=function(He){var Ue=I.find(function(ut){var Xe=D.get(ut);if(Xe)return Xe.slice(0,He).every(function(et){return et})});if(Ue)return H=Ue,"break"},me=Q;me>0;me--){var xe=X(me);if(xe==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const Lhe={name:"flip",enabled:!0,phase:"main",fn:Phe,requiresIfExists:["offset"],data:{_skip:!1}};function AT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function IT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function The(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=dv(t,{elementContext:"reference"}),s=dv(t,{altBoundary:!0}),l=AT(a,r),u=AT(s,i,o),h=IT(l),g=IT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Ahe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:The};function Ihe(e,t,n){var r=Cl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Mhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Mz.reduce(function(h,g){return h[g]=Ihe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Ohe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Mhe};function Rhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Fz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Nhe={name:"popperOffsets",enabled:!0,phase:"read",fn:Rhe,data:{}};function Dhe(e){return e==="x"?"y":"x"}function zhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,P=dv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),E=Cl(t.placement),k=R0(t.placement),L=!k,I=E7(E),O=Dhe(I),N=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,H=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!N){if(o){var j,ne=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,J=I==="y"?"height":"width",q=N[I],V=q+P[ne],G=q-P[ie],Q=v?-z[J]/2:0,X=k===I0?D[J]:z[J],me=k===I0?-z[J]:-D[J],xe=t.elements.arrow,Se=v&&xe?k7(xe):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Nz(),Ue=He[ne],ut=He[ie],Xe=_m(0,D[J],Se[J]),et=L?D[J]/2-Q-Xe-Ue-W.mainAxis:X-Xe-Ue-W.mainAxis,tt=L?-D[J]/2+Q+Xe+ut+W.mainAxis:me+Xe+ut+W.mainAxis,at=t.elements.arrow&&$v(t.elements.arrow),At=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Ae=q+et-wt-At,dt=q+tt-wt,Mt=_m(v?R5(V,Ae):V,q,v?Wf(G,dt):G);N[I]=Mt,de[I]=Mt-q}if(s){var ct,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=N[O],Zt=O==="y"?"height":"width",En=Et+P[xt],yn=Et-P[kn],Me=[Io,Mo].indexOf(E)!==-1,Je=(ct=Y?.[O])!=null?ct:0,Xt=Me?En:Et-D[Zt]-z[Zt]-Je+W.altAxis,qt=Me?Et+D[Zt]+z[Zt]-Je-W.altAxis:yn,Ee=v&&Me?she(Xt,Et,qt):_m(v?Xt:En,Et,v?qt:yn);N[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const Bhe={name:"preventOverflow",enabled:!0,phase:"main",fn:zhe,requiresIfExists:["offset"]};function Fhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function $he(e){return e===Wa(e)||!Na(e)?P7(e):Fhe(e)}function Hhe(e){var t=e.getBoundingClientRect(),n=M0(t.width)/e.offsetWidth||1,r=M0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Whe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Hhe(t),o=vd(t),a=O0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pl(t)!=="body"||T7(o))&&(s=$he(t)),Na(t)?(l=O0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=L7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Vhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Uhe(e){var t=Vhe(e);return the.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function jhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ghe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var MT={placement:"bottom",modifiers:[],strategy:"absolute"};function OT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:yp("--popper-arrow-shadow-color"),arrowSize:yp("--popper-arrow-size","8px"),arrowSizeHalf:yp("--popper-arrow-size-half"),arrowBg:yp("--popper-arrow-bg"),transformOrigin:yp("--popper-transform-origin"),arrowOffset:yp("--popper-arrow-offset")};function Zhe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Xhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Qhe=e=>Xhe[e],RT={scroll:!0,resize:!0};function Jhe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...RT,...e}}:t={enabled:e,options:RT},t}var epe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},tpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{NT(e)},effect:({state:e})=>()=>{NT(e)}},NT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Qhe(e.placement))},npe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{rpe(e)}},rpe=e=>{var t;if(!e.placement)return;const n=ipe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},ipe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},ope={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Zhe(e.placement)})},ape={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},spe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function lpe(e,t="ltr"){var n;const r=((n=ape[e])==null?void 0:n[t])||e;return t==="ltr"?r:spe[e]??r}function $z(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=lpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var W;!t||!b.current||!w.current||((W=k.current)==null||W.call(k),P.current=Yhe(b.current,w.current,{placement:E,modifiers:[ope,npe,tpe,{...epe,enabled:!!m},{name:"eventListeners",...Jhe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),k.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!b.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const I=C.exports.useCallback(W=>{b.current=W,L()},[L]),O=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(I,Y)}),[I]),N=C.exports.useCallback(W=>{w.current=W,L()},[L]),D=C.exports.useCallback((W={},Y=null)=>({...W,ref:$n(N,Y),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,N,m]),z=C.exports.useCallback((W={},Y=null)=>{const{size:de,shadowColor:j,bg:ne,style:ie,...J}=W;return{...J,ref:Y,"data-popper-arrow":"",style:upe(W)}},[]),H=C.exports.useCallback((W={},Y=null)=>({...W,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:z,getArrowInnerProps:H,getReferenceProps:O}}function upe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Hz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function P(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function E(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function cpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Ff(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Afe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Wz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[dpe,fpe]=Cn({strict:!1,name:"PortalManagerContext"});function Vz(e){const{children:t,zIndex:n}=e;return x(dpe,{value:{zIndex:n},children:t})}Vz.displayName="PortalManager";var[Uz,hpe]=Cn({strict:!1,name:"PortalContext"}),A7="chakra-portal",ppe=".chakra-portal",gpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),mpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=hpe(),l=fpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=A7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(gpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(Uz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},vpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=A7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(Uz,{value:r?a:null,children:t}),a):null};function ih(e){const{containerRef:t,...n}=e;return t?x(vpe,{containerRef:t,...n}):x(mpe,{...n})}ih.defaultProps={appendToParentPortal:!0};ih.className=A7;ih.selector=ppe;ih.displayName="Portal";var ype=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bp=new WeakMap,wy=new WeakMap,Cy={},FS=0,bpe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Cy[n]||(Cy[n]=new WeakMap);var o=Cy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(bp.get(m)||0)+1,P=(o.get(m)||0)+1;bp.set(m,w),o.set(m,P),a.push(m),w===1&&b&&wy.set(m,!0),P===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),FS++,function(){a.forEach(function(g){var m=bp.get(g)-1,v=o.get(g)-1;bp.set(g,m),o.set(g,v),m||(wy.has(g)||g.removeAttribute(r),wy.delete(g)),v||g.removeAttribute(n)}),FS--,FS||(bp=new WeakMap,bp=new WeakMap,wy=new WeakMap,Cy={})}},jz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||ype(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),bpe(r,i,n,"aria-hidden")):function(){return null}};function I7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},xpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Spe=xpe,wpe=Spe;function Gz(){}function qz(){}qz.resetWarningCache=Gz;var Cpe=function(){function e(r,i,o,a,s,l){if(l!==wpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:qz,resetWarningCache:Gz};return n.PropTypes=n,n};Rn.exports=Cpe();var xC="data-focus-lock",Kz="data-focus-lock-disabled",_pe="data-no-focus-lock",kpe="data-autofocus-inside",Epe="data-no-autofocus";function Ppe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lpe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Yz(e,t){return Lpe(t||null,function(n){return e.forEach(function(r){return Ppe(r,n)})})}var $S={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Zz(e){return e}function Xz(e,t){t===void 0&&(t=Zz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function M7(e,t){return t===void 0&&(t=Zz),Xz(e,t)}function Qz(e){e===void 0&&(e={});var t=Xz(null);return t.options=pl({async:!0,ssr:!1},e),t}var Jz=function(e){var t=e.sideCar,n=HD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};Jz.isSideCarExport=!0;function Tpe(e,t){return e.useMedium(t),Jz}var eB=M7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),tB=M7(),Ape=M7(),Ipe=Qz({async:!0}),Mpe=[],O7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Mpe:I,N=t.as,D=N===void 0?"div":N,z=t.lockProps,H=z===void 0?{}:z,W=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,ne=t.onDeactivation,ie=C.exports.useState({}),J=ie[0],q=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),V=C.exports.useCallback(function(){l.current=!1,ne&&ne(s.current)},[ne]);C.exports.useEffect(function(){g||(u.current=null)},[]);var G=C.exports.useCallback(function(ut){var Xe=u.current;if(Xe&&Xe.focus){var et=typeof Y=="function"?Y(Xe):Y;if(et){var tt=typeof et=="object"?et:void 0;u.current=null,ut?Promise.resolve().then(function(){return Xe.focus(tt)}):Xe.focus(tt)}}},[Y]),Q=C.exports.useCallback(function(ut){l.current&&eB.useMedium(ut)},[]),X=tB.useMedium,me=C.exports.useCallback(function(ut){s.current!==ut&&(s.current=ut,a(ut))},[]),xe=An((r={},r[Kz]=g&&"disabled",r[xC]=P,r),H),Se=m!==!0,He=Se&&m!=="tail",Ue=Yz([n,me]);return te(Xn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:$S},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:$S},"guard-nearest"):null],!g&&x(W,{id:J,sideCar:Ipe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:q,onDeactivation:V,returnFocus:G,focusOptions:de}),x(D,{ref:Ue,...xe,className:E,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:$S})]})});O7.propTypes={};O7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const nB=O7;function SC(e,t){return SC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},SC(e,t)}function R7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,SC(e,t)}function rB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ope(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){R7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return rB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ol=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Hpe)},Wpe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],D7=Wpe.join(","),Vpe="".concat(D7,", [data-focus-guard]"),fB=function(e,t){var n;return Ol(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Vpe:D7)?[i]:[],fB(i))},[])},z7=function(e,t){return e.reduce(function(n,r){return n.concat(fB(r,t),r.parentNode?Ol(r.parentNode.querySelectorAll(D7)).filter(function(i){return i===r}):[])},[])},Upe=function(e){var t=e.querySelectorAll("[".concat(kpe,"]"));return Ol(t).map(function(n){return z7([n])}).reduce(function(n,r){return n.concat(r)},[])},B7=function(e,t){return Ol(e).filter(function(n){return aB(t,n)}).filter(function(n){return Bpe(n)})},zT=function(e,t){return t===void 0&&(t=new Map),Ol(e).filter(function(n){return sB(t,n)})},CC=function(e,t,n){return dB(B7(z7(e,n),t),!0,n)},BT=function(e,t){return dB(B7(z7(e),t),!1)},jpe=function(e,t){return B7(Upe(e),t)},fv=function(e,t){return e.shadowRoot?fv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ol(e.children).some(function(n){return fv(n,t)})},Gpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},hB=function(e){return e.parentNode?hB(e.parentNode):e},F7=function(e){var t=wC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(xC);return n.push.apply(n,i?Gpe(Ol(hB(r).querySelectorAll("[".concat(xC,'="').concat(i,'"]:not([').concat(Kz,'="disabled"])')))):[r]),n},[])},pB=function(e){return e.activeElement?e.activeElement.shadowRoot?pB(e.activeElement.shadowRoot):e.activeElement:void 0},$7=function(){return document.activeElement?document.activeElement.shadowRoot?pB(document.activeElement.shadowRoot):document.activeElement:void 0},qpe=function(e){return e===document.activeElement},Kpe=function(e){return Boolean(Ol(e.querySelectorAll("iframe")).some(function(t){return qpe(t)}))},gB=function(e){var t=document&&$7();return!t||t.dataset&&t.dataset.focusGuard?!1:F7(e).some(function(n){return fv(n,t)||Kpe(n)})},Ype=function(){var e=document&&$7();return e?Ol(document.querySelectorAll("[".concat(_pe,"]"))).some(function(t){return fv(t,e)}):!1},Zpe=function(e,t){return t.filter(cB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},H7=function(e,t){return cB(e)&&e.name?Zpe(e,t):e},Xpe=function(e){var t=new Set;return e.forEach(function(n){return t.add(H7(n,e))}),e.filter(function(n){return t.has(n)})},FT=function(e){return e[0]&&e.length>1?H7(e[0],e):e[0]},$T=function(e,t){return e.length>1?e.indexOf(H7(e[t],e)):t},mB="NEW_FOCUS",Qpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=N7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Xpe(t),w=n!==void 0?b.indexOf(n):-1,P=w-(r?b.indexOf(r):l),E=$T(e,0),k=$T(e,i-1);if(l===-1||h===-1)return mB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(P)>1)return h;if(l<=m)return k;if(l>v)return E;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},Jpe=function(e){return function(t){var n,r=(n=lB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},e0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=zT(r.filter(Jpe(n)));return i&&i.length?FT(i):FT(zT(t))},_C=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&_C(e.parentNode.host||e.parentNode,t),t},HS=function(e,t){for(var n=_C(e),r=_C(t),i=0;i=0)return o}return!1},vB=function(e,t,n){var r=wC(e),i=wC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=HS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=HS(o,l);u&&(!a||fv(u,a)?a=u:a=HS(u,a))})}),a},t0e=function(e,t){return e.reduce(function(n,r){return n.concat(jpe(r,t))},[])},n0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter($pe)},r0e=function(e,t){var n=document&&$7(),r=F7(e).filter(N5),i=vB(n||e,e,r),o=new Map,a=BT(r,o),s=CC(r,o).filter(function(m){var v=m.node;return N5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=BT([i],o).map(function(m){var v=m.node;return v}),u=n0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=Qpe(h,l,n,t);return g===mB?{node:e0e(a,h,t0e(r,o))}:g===void 0?g:u[g]}},i0e=function(e){var t=F7(e).filter(N5),n=vB(e,e,t),r=new Map,i=CC([n],r,!0),o=CC(t,r).filter(function(a){var s=a.node;return N5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:N7(s)}})},o0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},WS=0,VS=!1,a0e=function(e,t,n){n===void 0&&(n={});var r=r0e(e,t);if(!VS&&r){if(WS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),VS=!0,setTimeout(function(){VS=!1},1);return}WS++,o0e(r.node,n.focusOptions),WS--}};const yB=a0e;function bB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var s0e=function(){return document&&document.activeElement===document.body},l0e=function(){return s0e()||Ype()},u0=null,Up=null,c0=null,hv=!1,u0e=function(){return!0},c0e=function(t){return(u0.whiteList||u0e)(t)},d0e=function(t,n){c0={observerNode:t,portaledElement:n}},f0e=function(t){return c0&&c0.portaledElement===t};function HT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var h0e=function(t){return t&&"current"in t?t.current:t},p0e=function(t){return t?Boolean(hv):hv==="meanwhile"},g0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},m0e=function(t,n){return n.some(function(r){return g0e(t,r,r)})},D5=function(){var t=!1;if(u0){var n=u0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||c0&&c0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(h0e).filter(Boolean));if((!h||c0e(h))&&(i||p0e(s)||!l0e()||!Up&&o)&&(u&&!(gB(g)||h&&m0e(h,g)||f0e(h))&&(document&&!Up&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=yB(g,Up,{focusOptions:l}),c0={})),hv=!1,Up=document&&document.activeElement),document){var m=document&&document.activeElement,v=i0e(g),b=v.map(function(w){var P=w.node;return P}).indexOf(m);b>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),HT(b,v.length,1,v),HT(b,-1,-1,v))}}}return t},xB=function(t){D5()&&t&&(t.stopPropagation(),t.preventDefault())},W7=function(){return bB(D5)},v0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||d0e(r,n)},y0e=function(){return null},SB=function(){hv="just",setTimeout(function(){hv="meanwhile"},0)},b0e=function(){document.addEventListener("focusin",xB),document.addEventListener("focusout",W7),window.addEventListener("blur",SB)},x0e=function(){document.removeEventListener("focusin",xB),document.removeEventListener("focusout",W7),window.removeEventListener("blur",SB)};function S0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function w0e(e){var t=e.slice(-1)[0];t&&!u0&&b0e();var n=u0,r=n&&t&&t.id===n.id;u0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Up=null,(!r||n.observed!==t.observed)&&t.onActivation(),D5(),bB(D5)):(x0e(),Up=null)}eB.assignSyncMedium(v0e);tB.assignMedium(W7);Ape.assignMedium(function(e){return e({moveFocusInside:yB,focusInside:gB})});const C0e=Ope(S0e,w0e)(y0e);var wB=C.exports.forwardRef(function(t,n){return x(nB,{sideCar:C0e,ref:n,...t})}),CB=nB.propTypes||{};CB.sideCar;I7(CB,["sideCar"]);wB.propTypes={};const _0e=wB;var _B=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Az(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(_0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};_B.displayName="FocusLock";var _3="right-scroll-bar-position",k3="width-before-scroll-bar",k0e="with-scroll-bars-hidden",E0e="--removed-body-scroll-bar-size",kB=Qz(),US=function(){},db=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:US,onWheelCapture:US,onTouchMoveCapture:US}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,k=HD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Yz([n,t]),O=pl(pl({},k),i);return te(Xn,{children:[h&&x(L,{sideCar:kB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},O),{ref:I})):x(E,{...pl({},O,{className:l,ref:I}),children:s})]})});db.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};db.classNames={fullWidth:k3,zeroRight:_3};var P0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function L0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=P0e();return t&&e.setAttribute("nonce",t),e}function T0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function A0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var I0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=L0e())&&(T0e(t,n),A0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},M0e=function(){var e=I0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},EB=function(){var e=M0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},O0e={left:0,top:0,right:0,gap:0},jS=function(e){return parseInt(e||"",10)||0},R0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[jS(n),jS(r),jS(i)]},N0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return O0e;var t=R0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},D0e=EB(),z0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(k0e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(_3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(k3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(_3," .").concat(_3,` { - right: 0 `).concat(r,`; - } - - .`).concat(k3," .").concat(k3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(E0e,": ").concat(s,`px; - } -`)},B0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return N0e(i)},[i]);return x(D0e,{styles:z0e(o,!t,i,n?"":"!important")})},kC=!1;if(typeof window<"u")try{var _y=Object.defineProperty({},"passive",{get:function(){return kC=!0,!0}});window.addEventListener("test",_y,_y),window.removeEventListener("test",_y,_y)}catch{kC=!1}var xp=kC?{passive:!1}:!1,F0e=function(e){return e.tagName==="TEXTAREA"},PB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!F0e(e)&&n[t]==="visible")},$0e=function(e){return PB(e,"overflowY")},H0e=function(e){return PB(e,"overflowX")},WT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=LB(e,n);if(r){var i=TB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},W0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},V0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},LB=function(e,t){return e==="v"?$0e(t):H0e(t)},TB=function(e,t){return e==="v"?W0e(t):V0e(t)},U0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},j0e=function(e,t,n,r,i){var o=U0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=TB(e,s),b=v[0],w=v[1],P=v[2],E=w-P-o*b;(b||E)&&LB(e,s)&&(g+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},ky=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},VT=function(e){return[e.deltaX,e.deltaY]},UT=function(e){return e&&"current"in e?e.current:e},G0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},q0e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},K0e=0,Sp=[];function Y0e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(K0e++)[0],o=C.exports.useState(function(){return EB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=uC([e.lockRef.current],(e.shards||[]).map(UT),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=ky(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-E[0],I="deltaY"in w?w.deltaY:k[1]-E[1],O,N=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&N.type==="range")return!1;var z=WT(D,N);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=WT(D,N)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var H=r.current||O;return j0e(H,P,w,H==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!Sp.length||Sp[Sp.length-1]!==o)){var E="deltaY"in P?VT(P):ky(P),k=t.current.filter(function(O){return O.name===P.type&&O.target===P.target&&G0e(O.delta,E)})[0];if(k&&k.should){P.cancelable&&P.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(UT).filter(Boolean).filter(function(O){return O.contains(P.target)}),I=L.length>0?s(P,L[0]):!a.current.noIsolation;I&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,k){var L={name:w,delta:P,target:E,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=ky(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,VT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,ky(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Sp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,xp),document.addEventListener("touchmove",l,xp),document.addEventListener("touchstart",h,xp),function(){Sp=Sp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,xp),document.removeEventListener("touchmove",l,xp),document.removeEventListener("touchstart",h,xp)}},[]);var v=e.removeScrollBar,b=e.inert;return te(Xn,{children:[b?x(o,{styles:q0e(i)}):null,v?x(B0e,{gapMode:"margin"}):null]})}const Z0e=Tpe(kB,Y0e);var AB=C.exports.forwardRef(function(e,t){return x(db,{...pl({},e,{ref:t,sideCar:Z0e})})});AB.classNames=db.classNames;const IB=AB;var oh=(...e)=>e.filter(Boolean).join(" ");function jg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},EC=new X0e;function Q0e(e,t){C.exports.useEffect(()=>(t&&EC.add(e),()=>{EC.remove(e)}),[t,e])}function J0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=t1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");e1e(u,t&&a),Q0e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},H=null)=>({role:"dialog",...z,ref:$n(H,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":L?v:void 0,onClick:jg(z.onClick,W=>W.stopPropagation())}),[v,L,g,m,E]),N=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!EC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},H=null)=>({...z,ref:$n(H,h),onClick:jg(z.onClick,N),onKeyDown:jg(z.onKeyDown,P),onMouseDown:jg(z.onMouseDown,w)}),[P,w,N]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function e1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return jz(e.current)},[t,e,n])}function t1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[n1e,ah]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[r1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),P={...J0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(r1e,{value:P,children:x(n1e,{value:b,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(ih,{...t,children:n})})})})};N0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};N0.displayName="Modal";var z5=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=oh("chakra-modal__body",n),s=ah();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});z5.displayName="ModalBody";var V7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=oh("chakra-modal__close-btn",r),s=ah();return x(lb,{ref:t,__css:s.closeButton,className:a,onClick:jg(n,l=>{l.stopPropagation(),o()}),...i})});V7.displayName="ModalCloseButton";function MB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=n7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(_B,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(IB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var i1e={slideInBottom:{...dC,custom:{offsetY:16,reverse:!0}},slideInRight:{...dC,custom:{offsetX:16,reverse:!0}},scale:{...UD,custom:{initialScale:.95,reverse:!0}},none:{}},o1e=we(Ml.section),a1e=e=>i1e[e||"none"],OB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=a1e(n),...i}=e;return x(o1e,{ref:t,...r,...i})});OB.displayName="ModalTransition";var pv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=oh("chakra-modal__content",n),m=ah(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(MB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(OB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});pv.displayName="ModalContent";var U7=Pe((e,t)=>{const{className:n,...r}=e,i=oh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...ah().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});U7.displayName="ModalFooter";var j7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=oh("chakra-modal__header",n),l={flex:0,...ah().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});j7.displayName="ModalHeader";var s1e=we(Ml.div),gv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=oh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...ah().overlay},{motionPreset:u}=ad();return x(s1e,{...i||(u==="none"?{}:VD),__css:l,ref:t,className:a,...o})});gv.displayName="ModalOverlay";function l1e(e){const{leastDestructiveRef:t,...n}=e;return x(N0,{...n,initialFocusRef:t})}var u1e=Pe((e,t)=>x(pv,{ref:t,role:"alertdialog",...e})),[qke,c1e]=Cn(),d1e=we(jD),f1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=oh("chakra-modal__content",n),v=ah(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=c1e();return le.createElement(MB,null,le.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(d1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:b,children:r})))});f1e.displayName="DrawerContent";function h1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var RB=(...e)=>e.filter(Boolean).join(" "),GS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var p1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),g1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function jT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var m1e=50,GT=300;function v1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);h1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?m1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},GT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},GT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var y1e=/^[Ee0-9+\-.]$/;function b1e(e){return y1e.test(e)}function x1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function S1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:P,name:E,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:N,onInvalid:D,getAriaValueText:z,isValidCharacter:H,format:W,parse:Y,...de}=e,j=dr(O),ne=dr(N),ie=dr(D),J=dr(H??b1e),q=dr(z),V=Bde(e),{update:G,increment:Q,decrement:X}=V,[me,xe]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ut=C.exports.useRef(null),Xe=C.exports.useRef(null),et=C.exports.useCallback(Ee=>Ee.split("").filter(J).join(""),[J]),tt=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),at=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);id(()=>{(V.valueAsNumber>o||V.valueAsNumber{if(!He.current)return;if(He.current.value!=V.value){const It=tt(He.current.value);V.setValue(et(It))}},[tt,et]);const At=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Ae=v1e(At,wt);jT(ut,"disabled",Ae.stop,Ae.isSpinning),jT(Xe,"disabled",Ae.stop,Ae.isSpinning);const dt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=tt(Ee.currentTarget.value);G(et(Ne)),Ue.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[G,et,tt]),Mt=C.exports.useCallback(Ee=>{var It;j?.(Ee),Ue.current&&(Ee.target.selectionStart=Ue.current.start??((It=Ee.currentTarget.value)==null?void 0:It.length),Ee.currentTarget.selectionEnd=Ue.current.end??Ee.currentTarget.selectionStart)},[j]),ct=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;x1e(Ee,J)||Ee.preventDefault();const It=xt(Ee)*a,Ne=Ee.key,ln={ArrowUp:()=>At(It),ArrowDown:()=>wt(It),Home:()=>G(i),End:()=>G(o)}[Ne];ln&&(Ee.preventDefault(),ln(Ee))},[J,a,At,wt,G,i,o]),xt=Ee=>{let It=1;return(Ee.metaKey||Ee.ctrlKey)&&(It=.1),Ee.shiftKey&&(It=10),It},kn=C.exports.useMemo(()=>{const Ee=q?.(V.value);if(Ee!=null)return Ee;const It=V.value.toString();return It||void 0},[V.value,q]),Et=C.exports.useCallback(()=>{let Ee=V.value;if(V.value==="")return;/^[eE]/.test(V.value.toString())?V.setValue(""):(V.valueAsNumbero&&(Ee=o),V.cast(Ee))},[V,o,i]),Zt=C.exports.useCallback(()=>{xe(!1),n&&Et()},[n,xe,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),En()},[En,Ae]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),En()},[En,Ae]);Ff(()=>He.current,"wheel",Ee=>{var It;const st=(((It=He.current)==null?void 0:It.ownerDocument)??document).activeElement===He.current;if(!v||!st)return;Ee.preventDefault();const ln=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?At(ln):Dn===1&&wt(ln)},{passive:!1});const Je=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMax;return{...Ee,ref:$n(It,ut),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||yn(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":GS(Ne)}},[V.isAtMax,r,yn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},It=null)=>{const Ne=l||r&&V.isAtMin;return{...Ee,ref:$n(It,Xe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,st=>{st.button!==0||Ne||Me(st)}),onPointerLeave:rl(Ee.onPointerLeave,Ae.stop),onPointerUp:rl(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":GS(Ne)}},[V.isAtMin,r,Me,Ae.stop,l]),qt=C.exports.useCallback((Ee={},It=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,It),value:at(V.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(V.valueAsNumber)?void 0:V.valueAsNumber,"aria-invalid":GS(h??V.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,dt),onKeyDown:rl(Ee.onKeyDown,ct),onFocus:rl(Ee.onFocus,Mt,()=>xe(!0)),onBlur:rl(Ee.onBlur,ne,Zt)}),[E,m,g,I,L,at,k,b,l,u,s,h,V.value,V.valueAsNumber,V.isOutOfRange,i,o,kn,dt,ct,Mt,ne,Zt]);return{value:at(V.value),valueAsNumber:V.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[w1e,fb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[C1e,G7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),q7=Pe(function(t,n){const r=Ri("NumberInput",t),i=vn(t),o=p7(i),{htmlProps:a,...s}=S1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(C1e,{value:l},le.createElement(w1e,{value:r},le.createElement(we.div,{...a,ref:n,className:RB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});q7.displayName="NumberInput";var NB=Pe(function(t,n){const r=fb();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});NB.displayName="NumberInputStepper";var K7=Pe(function(t,n){const{getInputProps:r}=G7(),i=r(t,n),o=fb();return le.createElement(we.input,{...i,className:RB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});K7.displayName="NumberInputField";var DB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Y7=Pe(function(t,n){const r=fb(),{getDecrementButtonProps:i}=G7(),o=i(t,n);return x(DB,{...o,__css:r.stepper,children:t.children??x(p1e,{})})});Y7.displayName="NumberDecrementStepper";var Z7=Pe(function(t,n){const{getIncrementButtonProps:r}=G7(),i=r(t,n),o=fb();return x(DB,{...i,__css:o.stepper,children:t.children??x(g1e,{})})});Z7.displayName="NumberIncrementStepper";var Hv=(...e)=>e.filter(Boolean).join(" ");function _1e(e,...t){return k1e(e)?e(...t):e}var k1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function E1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[P1e,sh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[L1e,Wv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wp={click:"click",hover:"hover"};function T1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=wp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:P,onClose:E,onOpen:k,onToggle:L}=Hz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[H,W]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),ne=i??j,[ie,J,q,V]=["popover-trigger","popover-content","popover-header","popover-body"].map(dt=>`${dt}-${ne}`),{referenceRef:G,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:xe}=$z({...w,enabled:P||!!b}),Se=cpe({isOpen:P,ref:N});qde({enabled:P,ref:O}),$fe(N,{focusRef:O,visible:P,shouldFocus:o&&u===wp.click}),Wfe(N,{focusRef:r,visible:P,shouldFocus:a&&u===wp.click});const He=Wz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),Ue=C.exports.useCallback((dt={},Mt=null)=>{const ct={...dt,style:{...dt.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(N,Mt),children:He?dt.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:il(dt.onKeyDown,xt=>{n&&xt.key==="Escape"&&E()}),onBlur:il(dt.onBlur,xt=>{const kn=qT(xt),Et=qS(N.current,kn),Zt=qS(O.current,kn);P&&t&&(!Et&&!Zt)&&E()}),"aria-labelledby":H?q:void 0,"aria-describedby":Y?V:void 0};return u===wp.hover&&(ct.role="tooltip",ct.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0}),ct.onMouseLeave=il(dt.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),g))})),ct},[He,J,H,q,Y,V,u,n,E,P,t,g,l,s]),ut=C.exports.useCallback((dt={},Mt=null)=>X({...dt,style:{visibility:P?"visible":"hidden",...dt.style}},Mt),[P,X]),Xe=C.exports.useCallback((dt,Mt=null)=>({...dt,ref:$n(Mt,I,G)}),[I,G]),et=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(dt=>{I.current==null&&G(dt)},[G]),At=C.exports.useCallback((dt={},Mt=null)=>{const ct={...dt,ref:$n(O,Mt,at),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":J};return u===wp.click&&(ct.onClick=il(dt.onClick,L)),u===wp.hover&&(ct.onFocus=il(dt.onFocus,()=>{et.current===void 0&&k()}),ct.onBlur=il(dt.onBlur,xt=>{const kn=qT(xt),Et=!qS(N.current,kn);P&&t&&Et&&E()}),ct.onKeyDown=il(dt.onKeyDown,xt=>{xt.key==="Escape"&&E()}),ct.onMouseEnter=il(dt.onMouseEnter,()=>{D.current=!0,et.current=window.setTimeout(()=>k(),h)}),ct.onMouseLeave=il(dt.onMouseLeave,()=>{D.current=!1,et.current&&(clearTimeout(et.current),et.current=void 0),tt.current=window.setTimeout(()=>{D.current===!1&&E()},g)})),ct},[ie,P,J,u,at,L,k,t,E,h,g]);C.exports.useEffect(()=>()=>{et.current&&clearTimeout(et.current),tt.current&&clearTimeout(tt.current)},[]);const wt=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:q,ref:$n(Mt,ct=>{W(!!ct)})}),[q]),Ae=C.exports.useCallback((dt={},Mt=null)=>({...dt,id:V,ref:$n(Mt,ct=>{de(!!ct)})}),[V]);return{forceUpdate:xe,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:Xe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ut,getPopoverProps:Ue,getTriggerProps:At,getHeaderProps:wt,getBodyProps:Ae}}function qS(e,t){return e===t||e?.contains(t)}function qT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function X7(e){const t=Ri("Popover",e),{children:n,...r}=vn(e),i=U0(),o=T1e({...r,direction:i.direction});return x(P1e,{value:o,children:x(L1e,{value:t,children:_1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}X7.displayName="Popover";function Q7(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=sh(),a=Wv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:Hv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}Q7.displayName="PopoverArrow";var A1e=Pe(function(t,n){const{getBodyProps:r}=sh(),i=Wv();return le.createElement(we.div,{...r(t,n),className:Hv("chakra-popover__body",t.className),__css:i.body})});A1e.displayName="PopoverBody";var I1e=Pe(function(t,n){const{onClose:r}=sh(),i=Wv();return x(lb,{size:"sm",onClick:r,className:Hv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});I1e.displayName="PopoverCloseButton";function M1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var O1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},R1e=we(Ml.section),zB=Pe(function(t,n){const{variants:r=O1e,...i}=t,{isOpen:o}=sh();return le.createElement(R1e,{ref:n,variants:M1e(r),initial:!1,animate:o?"enter":"exit",...i})});zB.displayName="PopoverTransition";var J7=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=sh(),u=Wv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(zB,{...i,...a(o,n),onAnimationComplete:E1e(l,o.onAnimationComplete),className:Hv("chakra-popover__content",t.className),__css:h}))});J7.displayName="PopoverContent";var N1e=Pe(function(t,n){const{getHeaderProps:r}=sh(),i=Wv();return le.createElement(we.header,{...r(t,n),className:Hv("chakra-popover__header",t.className),__css:i.header})});N1e.displayName="PopoverHeader";function e_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=sh();return C.exports.cloneElement(t,n(t.props,t.ref))}e_.displayName="PopoverTrigger";function D1e(e,t,n){return(e-t)*100/(n-t)}var z1e=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),B1e=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),F1e=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),$1e=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function BB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=D1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var FB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${B1e} 2s linear infinite`:void 0},...r})};FB.displayName="Shape";var PC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});PC.displayName="Circle";var H1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=BB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,k=v?{css:{animation:`${z1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},te(FB,{size:n,isIndeterminate:v,children:[x(PC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(PC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});H1e.displayName="CircularProgress";var[W1e,V1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),U1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=BB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...V1e().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),$B=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),P=Ri("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),k={animation:`${$1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${F1e} 1s ease infinite normal none running`}},N={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:N,...w},te(W1e,{value:P,children:[x(U1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:E,title:v,role:b}),l]}))});$B.displayName="Progress";var j1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});j1e.displayName="CircularProgressLabel";var G1e=(...e)=>e.filter(Boolean).join(" "),q1e=e=>e?"":void 0;function K1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var HB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:G1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});HB.displayName="SelectField";var WB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,P]=K1e(b,xX),E=h7(P),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(HB,{ref:t,height:u??l,minH:h??g,placeholder:o,...E,__css:L,children:e.children}),x(VB,{"data-disabled":q1e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});WB.displayName="Select";var Y1e=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Z1e=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),VB=e=>{const{children:t=x(Y1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Z1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};VB.displayName="SelectIcon";function X1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Q1e(e){const t=ege(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function UB(e){return!!e.touches}function J1e(e){return UB(e)&&e.touches.length>1}function ege(e){return e.view??window}function tge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function nge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function jB(e,t="page"){return UB(e)?tge(e,t):nge(e,t)}function rge(e){return t=>{const n=Q1e(t);(!n||n&&t.button===0)&&e(t)}}function ige(e,t=!1){function n(i){e(i,{point:jB(i)})}return t?rge(n):n}function E3(e,t,n,r){return X1e(e,t,ige(n,t==="pointerdown"),r)}function GB(e){const t=C.exports.useRef(null);return t.current=e,t}var oge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,J1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:jB(e)},{timestamp:i}=kP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,KS(r,this.history)),this.removeListeners=lge(E3(this.win,"pointermove",this.onPointerMove),E3(this.win,"pointerup",this.onPointerUp),E3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=KS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=kP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,MQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=KS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),OQ.update(this.updatePoint)}};function KT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function KS(e,t){return{point:e.point,delta:KT(e.point,t[t.length-1]),offset:KT(e.point,t[0]),velocity:sge(t,.1)}}var age=e=>e*1e3;function sge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>age(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function lge(...e){return t=>e.reduce((n,r)=>r(n),t)}function YS(e,t){return Math.abs(e-t)}function YT(e){return"x"in e&&"y"in e}function uge(e,t){if(typeof e=="number"&&typeof t=="number")return YS(e,t);if(YT(e)&&YT(t)){const n=YS(e.x,t.x),r=YS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function qB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=GB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new oge(v,h.current,s)}return E3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function cge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function fge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function KB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return dge(()=>{const a=e(),s=a.map((l,u)=>cge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(fge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function hge(e){return typeof e=="object"&&e!==null&&"current"in e}function pge(e){const[t]=KB({observeMutation:!1,getNodes(){return[hge(e)?e.current:e]}});return t}var gge=Object.getOwnPropertyNames,mge=(e,t)=>function(){return e&&(t=(0,e[gge(e)[0]])(e=0)),t},yd=mge({"../../../react-shim.js"(){}});yd();yd();yd();var Ta=e=>e?"":void 0,d0=e=>e?!0:void 0,bd=(...e)=>e.filter(Boolean).join(" ");yd();function f0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function vge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Gg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P3={width:0,height:0},Ey=e=>e||P3;function YB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??P3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Gg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>Ey(w).height>Ey(P).height?w:P,P3):r.reduce((w,P)=>Ey(w).width>Ey(P).width?w:P,P3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Gg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Gg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Gg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function ZB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function yge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...N}=e,D=dr(m),z=dr(v),H=dr(w),W=ZB({isReversed:a,direction:s,orientation:l}),[Y,de]=V4({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,ne]=C.exports.useState(!1),[ie,J]=C.exports.useState(!1),[q,V]=C.exports.useState(-1),G=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>l0(Fe,t,n)),me=O*b,xe=bge(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=xe;const He=X.map(Fe=>n-Fe+t),ut=(W?He:X).map(Fe=>M5(Fe,t,n)),Xe=l==="vertical",et=C.exports.useRef(null),tt=C.exports.useRef(null),at=KB({getNodes(){const Fe=tt.current,pt=Fe?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),At=C.exports.useId(),Ae=vge(u??At),dt=C.exports.useCallback(Fe=>{var pt;if(!et.current)return;Se.current.eventSource="pointer";const rt=et.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((pt=Fe.touches)==null?void 0:pt[0])??Fe,Qn=Xe?rt.bottom-Qt:Nt-rt.left,lo=Xe?rt.height:rt.width;let pi=Qn/lo;return W&&(pi=1-pi),tz(pi,t,n)},[Xe,W,n,t]),Mt=(n-t)/10,ct=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,pt){if(!G)return;const rt=Se.current.valueBounds[Fe];pt=parseFloat(mC(pt,rt.min,ct)),pt=l0(pt,rt.min,rt.max);const Nt=[...Se.current.value];Nt[Fe]=pt,de(Nt)},setActiveIndex:V,stepUp(Fe,pt=ct){const rt=Se.current.value[Fe],Nt=W?rt-pt:rt+pt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,pt=ct){const rt=Se.current.value[Fe],Nt=W?rt+pt:rt-pt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ct,W,de,G]),kn=C.exports.useCallback(Fe=>{const pt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(q),ArrowUp:()=>xt.stepUp(q),ArrowLeft:()=>xt.stepDown(q),ArrowDown:()=>xt.stepDown(q),PageUp:()=>xt.stepUp(q,Mt),PageDown:()=>xt.stepDown(q,Mt),Home:()=>{const{min:Qt}=xe[q];xt.setValueAtIndex(q,Qt)},End:()=>{const{max:Qt}=xe[q];xt.setValueAtIndex(q,Qt)}}[pt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,q,Mt,xe]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>YB({isReversed:W,orientation:l,thumbRects:at,thumbPercents:ut}),[W,l,ut,at]),Me=C.exports.useCallback(Fe=>{var pt;const rt=Fe??q;if(rt!==-1&&I){const Nt=Ae.getThumb(rt),Qt=(pt=tt.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,q,Ae]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=Fe=>{const pt=dt(Fe)||0,rt=Se.current.value.map(pi=>Math.abs(pi-pt)),Nt=Math.min(...rt);let Qt=rt.indexOf(Nt);const Qn=rt.filter(pi=>pi===Nt);Qn.length>1&&pt>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),V(Qt),xt.setValueAtIndex(Qt,pt),Me(Qt)},Xt=Fe=>{if(q==-1)return;const pt=dt(Fe)||0;V(q),xt.setValueAtIndex(q,pt),Me(q)};qB(tt,{onPanSessionStart(Fe){!G||(ne(!0),Je(Fe),D?.(Se.current.value))},onPanSessionEnd(){!G||(ne(!1),z?.(Se.current.value))},onPan(Fe){!G||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},pt=null)=>({...Fe,...N,id:Ae.root,ref:$n(pt,tt),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[N,h,ie,Zt,Ae]),Ee=C.exports.useCallback((Fe={},pt=null)=>({...Fe,ref:$n(pt,et),id:Ae.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Ae]),It=C.exports.useCallback((Fe={},pt=null)=>({...Fe,ref:pt,id:Ae.innerTrack,style:{...Fe.style,...yn}}),[yn,Ae]),Ne=C.exports.useCallback((Fe,pt=null)=>{const{index:rt,...Nt}=Fe,Qt=X[rt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=xe[rt];return{...Nt,ref:pt,role:"slider",tabIndex:G?0:void 0,id:Ae.getThumb(rt),"data-active":Ta(j&&q===rt),"aria-valuetext":H?.(Qt)??P?.[rt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E?.[rt],"aria-labelledby":E?.[rt]?void 0:k?.[rt],style:{...Fe.style,...Et(rt)},onKeyDown:f0(Fe.onKeyDown,kn),onFocus:f0(Fe.onFocus,()=>{J(!0),V(rt)}),onBlur:f0(Fe.onBlur,()=>{J(!1),V(-1)})}},[Ae,X,xe,G,j,q,H,P,l,h,g,E,k,Et,kn,J]),st=C.exports.useCallback((Fe={},pt=null)=>({...Fe,ref:pt,id:Ae.output,htmlFor:X.map((rt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,X]),ln=C.exports.useCallback((Fe,pt=null)=>{const{value:rt,...Nt}=Fe,Qt=!(rtn),Qn=rt>=X[0]&&rt<=X[X.length-1];let lo=M5(rt,t,n);lo=W?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...Gg({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,W,n,t,l,X,Ae]),Dn=C.exports.useCallback((Fe,pt=null)=>{const{index:rt,...Nt}=Fe;return{...Nt,ref:pt,id:Ae.getInput(rt),type:"hidden",value:X[rt],name:Array.isArray(L)?L[rt]:`${L}-${rt}`}},[L,X,Ae]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ut[Fe],getThumbMinValue:Fe=>xe[Fe].min,getThumbMaxValue:Fe=>xe[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:It,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Dn,getOutputProps:st}}function bge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[xge,hb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Sge,t_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),XB=Pe(function(t,n){const r=Ri("Slider",t),i=vn(t),{direction:o}=U0();i.direction=o;const{getRootProps:a,...s}=yge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(xge,{value:l},le.createElement(Sge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});XB.defaultProps={orientation:"horizontal"};XB.displayName="RangeSlider";var wge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=hb(),a=t_(),s=r(t,n);return le.createElement(we.div,{...s,className:bd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});wge.displayName="RangeSliderThumb";var Cge=Pe(function(t,n){const{getTrackProps:r}=hb(),i=t_(),o=r(t,n);return le.createElement(we.div,{...o,className:bd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Cge.displayName="RangeSliderTrack";var _ge=Pe(function(t,n){const{getInnerTrackProps:r}=hb(),i=t_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});_ge.displayName="RangeSliderFilledTrack";var kge=Pe(function(t,n){const{getMarkerProps:r}=hb(),i=r(t,n);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",t.className)})});kge.displayName="RangeSliderMark";yd();yd();function Ege(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,N=dr(m),D=dr(v),z=dr(w),H=ZB({isReversed:a,direction:s,orientation:l}),[W,Y]=V4({value:i,defaultValue:o??Lge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[ne,ie]=C.exports.useState(!1),J=!(h||g),q=(n-t)/10,V=b||(n-t)/100,G=l0(W,t,n),Q=n-G+t,me=M5(H?Q:G,t,n),xe=l==="vertical",Se=GB({min:t,max:n,step:b,isDisabled:h,value:G,isInteractive:J,isReversed:H,isVertical:xe,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),Ue=C.exports.useRef(null),ut=C.exports.useRef(null),Xe=C.exports.useId(),et=u??Xe,[tt,at]=[`slider-thumb-${et}`,`slider-track-${et}`],At=C.exports.useCallback(Ne=>{var st;if(!He.current)return;const ln=Se.current;ln.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:pt}=((st=Ne.touches)==null?void 0:st[0])??Ne,rt=xe?Dn.bottom-pt:Fe-Dn.left,Nt=xe?Dn.height:Dn.width;let Qt=rt/Nt;H&&(Qt=1-Qt);let Qn=tz(Qt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(mC(Qn,ln.min,ln.step))),Qn=l0(Qn,ln.min,ln.max),Qn},[xe,H,Se]),wt=C.exports.useCallback(Ne=>{const st=Se.current;!st.isInteractive||(Ne=parseFloat(mC(Ne,st.min,V)),Ne=l0(Ne,st.min,st.max),Y(Ne))},[V,Y,Se]),Ae=C.exports.useMemo(()=>({stepUp(Ne=V){const st=H?G-Ne:G+Ne;wt(st)},stepDown(Ne=V){const st=H?G+Ne:G-Ne;wt(st)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,H,G,V,o]),dt=C.exports.useCallback(Ne=>{const st=Se.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(q),PageDown:()=>Ae.stepDown(q),Home:()=>wt(st.min),End:()=>wt(st.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),st.eventSource="keyboard")},[Ae,wt,q,Se]),Mt=z?.(G)??P,ct=pge(Ue),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,st=ct??{width:0,height:0};return YB({isReversed:H,orientation:Ne.orientation,thumbRects:[st],thumbPercents:[me]})},[H,ct,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var st;return(st=Ue.current)==null?void 0:st.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[G,D]);function yn(Ne){const st=At(Ne);st!=null&&st!==Se.current.value&&Y(st)}qB(ut,{onPanSessionStart(Ne){const st=Se.current;!st.isInteractive||(j(!0),En(),yn(Ne),N?.(st.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},st=null)=>({...Ne,...O,ref:$n(st,ut),tabIndex:-1,"aria-disabled":d0(h),"data-focused":Ta(ne),style:{...Ne.style,...kn}}),[O,h,ne,kn]),Je=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,He),id:at,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,at,Et]),Xt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:$n(st,Ue),role:"slider",tabIndex:J?0:void 0,id:tt,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":G,"aria-orientation":l,"aria-disabled":d0(h),"aria-readonly":d0(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:f0(Ne.onKeyDown,dt),onFocus:f0(Ne.onFocus,()=>ie(!0)),onBlur:f0(Ne.onBlur,()=>ie(!1))}),[J,tt,de,Mt,t,n,G,l,h,g,E,k,xt,dt]),Ee=C.exports.useCallback((Ne,st=null)=>{const ln=!(Ne.valuen),Dn=G>=Ne.value,Fe=M5(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Pge({orientation:l,vertical:{bottom:H?`${100-Fe}%`:`${Fe}%`},horizontal:{left:H?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:st,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!ln),"data-highlighted":Ta(Dn),style:{...Ne.style,...pt}}},[h,H,n,t,l,G]),It=C.exports.useCallback((Ne={},st=null)=>({...Ne,ref:st,type:"hidden",value:G,name:L}),[L,G]);return{state:{value:G,isFocused:ne,isDragging:de},actions:Ae,getRootProps:Me,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:It}}function Pge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Lge(e,t){return t"}),[Age,gb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),n_=Pe((e,t)=>{const n=Ri("Slider",e),r=vn(e),{direction:i}=U0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Ege(r),l=a(),u=o({},t);return le.createElement(Tge,{value:s},le.createElement(Age,{value:n},le.createElement(we.div,{...l,className:bd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});n_.defaultProps={orientation:"horizontal"};n_.displayName="Slider";var QB=Pe((e,t)=>{const{getThumbProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__thumb",e.className),__css:r.thumb})});QB.displayName="SliderThumb";var JB=Pe((e,t)=>{const{getTrackProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__track",e.className),__css:r.track})});JB.displayName="SliderTrack";var eF=Pe((e,t)=>{const{getInnerTrackProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});eF.displayName="SliderFilledTrack";var LC=Pe((e,t)=>{const{getMarkerProps:n}=pb(),r=gb(),i=n(e,t);return le.createElement(we.div,{...i,className:bd("chakra-slider__marker",e.className),__css:r.mark})});LC.displayName="SliderMark";var Ige=(...e)=>e.filter(Boolean).join(" "),ZT=e=>e?"":void 0,r_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=JD(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:Ige("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":ZT(s.isChecked),"data-hover":ZT(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});r_.displayName="Switch";var Z0=(...e)=>e.filter(Boolean).join(" ");function TC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Mge,tF,Oge,Rge]=fN();function Nge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=V4({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Oge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Dge,Vv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function zge(e){const{focusedIndex:t,orientation:n,direction:r}=Vv(),i=tF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:TC(e.onKeyDown,o)}}function Bge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Vv(),{index:u,register:h}=Rge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Tfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:TC(e.onClick,m)}),w="button";return{...b,id:nF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":rF(a,u),onFocus:t?void 0:TC(e.onFocus,v)}}var[Fge,$ge]=Cn({});function Hge(e){const t=Vv(),{id:n,selectedIndex:r}=t,o=ob(e.children).map((a,s)=>C.exports.createElement(Fge,{key:s,value:{isSelected:s===r,id:rF(n,s),tabId:nF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Wge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Vv(),{isSelected:o,id:a,tabId:s}=$ge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Wz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Vge(){const e=Vv(),t=tF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function nF(e,t){return`${e}--tab-${t}`}function rF(e,t){return`${e}--tabpanel-${t}`}var[Uge,Uv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),iF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Nge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return le.createElement(Mge,{value:l},le.createElement(Dge,{value:h},le.createElement(Uge,{value:r},le.createElement(we.div,{className:Z0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});iF.displayName="Tabs";var jge=Pe(function(t,n){const r=Vge(),i={...t.style,...r},o=Uv();return le.createElement(we.div,{ref:n,...t,className:Z0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});jge.displayName="TabIndicator";var Gge=Pe(function(t,n){const r=zge({...t,ref:n}),o={display:"flex",...Uv().tablist};return le.createElement(we.div,{...r,className:Z0("chakra-tabs__tablist",t.className),__css:o})});Gge.displayName="TabList";var oF=Pe(function(t,n){const r=Wge({...t,ref:n}),i=Uv();return le.createElement(we.div,{outline:"0",...r,className:Z0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});oF.displayName="TabPanel";var aF=Pe(function(t,n){const r=Hge(t),i=Uv();return le.createElement(we.div,{...r,width:"100%",ref:n,className:Z0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});aF.displayName="TabPanels";var sF=Pe(function(t,n){const r=Uv(),i=Bge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:Z0("chakra-tabs__tab",t.className),__css:o})});sF.displayName="Tab";var qge=(...e)=>e.filter(Boolean).join(" ");function Kge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Yge=["h","minH","height","minHeight"],lF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=h7(o),s=i?Kge(n,Yge):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:qge("chakra-textarea",r),__css:s})});lF.displayName="Textarea";function Zge(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function AC(e,...t){return Xge(e)?e(...t):e}var Xge=e=>typeof e=="function";function Qge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Jge=(e,t)=>e.find(n=>n.id===t);function XT(e,t){const n=uF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function uF(e,t){for(const[n,r]of Object.entries(e))if(Jge(r,t))return n}function eme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function tme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var nme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=rme(nme);function rme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=ime(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=XT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:cF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=uF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(XT(gl.getState(),i).position)}}var QT=0;function ime(e,t={}){QT+=1;const n=t.id??QT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ome=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(qD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(YD,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(ZD,{id:u?.title,children:i}),s&&x(KD,{id:u?.description,display:"block",children:s})),o&&x(lb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function cF(e={}){const{render:t,toastComponent:n=ome}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function ame(e,t){const n=i=>({...t,...i,position:Qge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=cF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...AC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...AC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function lh(e){const{theme:t}=uN();return C.exports.useMemo(()=>ame(t.direction,e),[e,t.direction])}var sme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},dF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=sme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=sle();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Zge(P,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>eme(a),[a]);return le.createElement(Ml.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},AC(n,{id:t,onClose:P})))});dF.displayName="ToastComponent";var lme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=dF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:tme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return te(Xn,{children:[n,x(ih,{...o,children:s})]})};function ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Pg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},IC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function fme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:k,gutter:L,offset:I,direction:O,...N}=e,{isOpen:D,onOpen:z,onClose:H}=Hz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=$z({enabled:D,placement:h,arrowPadding:P,modifiers:E,gutter:L,offset:I,direction:O}),ne=C.exports.useId(),J=`tooltip-${g??ne}`,q=C.exports.useRef(null),V=C.exports.useRef(),G=C.exports.useRef(),Q=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0),H()},[H]),X=hme(q,Q),me=C.exports.useCallback(()=>{if(!k&&!V.current){X();const tt=IC(q);V.current=tt.setTimeout(z,t)}},[X,k,z,t]),xe=C.exports.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0);const tt=IC(q);G.current=tt.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&xe()},[r,xe,D]),He=C.exports.useCallback(()=>{D&&a&&xe()},[a,xe,D]),Ue=C.exports.useCallback(tt=>{D&&tt.key==="Escape"&&xe()},[D,xe]);Ff(()=>B5(q),"keydown",s?Ue:void 0),Ff(()=>B5(q),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(V.current),clearTimeout(G.current)},[]),Ff(()=>q.current,"pointerleave",xe);const ut=C.exports.useCallback((tt={},at=null)=>({...tt,ref:$n(q,at,W),onPointerEnter:Pg(tt.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Pg(tt.onClick,Se),onPointerDown:Pg(tt.onPointerDown,He),onFocus:Pg(tt.onFocus,me),onBlur:Pg(tt.onBlur,xe),"aria-describedby":D?J:void 0}),[me,xe,He,D,J,Se,W]),Xe=C.exports.useCallback((tt={},at=null)=>Y({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},at),[Y,b,w]),et=C.exports.useCallback((tt={},at=null)=>{const At={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...N,...tt,id:J,role:"tooltip",style:At}},[N,J]);return{isOpen:D,show:me,hide:xe,getTriggerProps:ut,getTooltipProps:et,getTooltipPositionerProps:Xe,getArrowProps:j,getArrowInnerProps:de}}var ZS="chakra-ui:close-tooltip";function hme(e,t){return C.exports.useEffect(()=>{const n=B5(e);return n.addEventListener(ZS,t),()=>n.removeEventListener(ZS,t)},[t,e]),()=>{const n=B5(e),r=IC(e);n.dispatchEvent(new r.CustomEvent(ZS))}}var pme=we(Ml.div),Ui=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=U0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...P}=r,E=m??v??h??b;if(E){n.bg=E;const H=RX(i,"colors",E);n[Hr.arrowBg.var]=H}const k=fme({...P,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const H=C.exports.Children.only(o);I=C.exports.cloneElement(H,k.getTriggerProps(H.props,H.ref))}const O=!!l,N=k.getTooltipProps({},t),D=O?ume(N,["role","id"]):N,z=cme(N,["role","id"]);return a?te(Xn,{children:[I,x(pd,{children:k.isOpen&&le.createElement(ih,{...g},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},te(pme,{variants:dme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Xn,{children:o})});Ui.displayName="Tooltip";var gme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Cz,{environment:a,children:t});return x(xoe,{theme:o,cssVarsRoot:s,children:te(fR,{colorModeManager:n,options:o.config,children:[i?x($de,{}):x(Fde,{}),x(woe,{}),r?x(Vz,{zIndex:r,children:l}):l]})})};function mme({children:e,theme:t=doe,toastOptions:n,...r}){return te(gme,{theme:t,...r,children:[e,x(lme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:i_(e)?2:o_(e)?3:0}function h0(e,t){return X0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vme(e,t){return X0(e)===2?e.get(t):e[t]}function fF(e,t,n){var r=X0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function hF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function i_(e){return Cme&&e instanceof Map}function o_(e){return _me&&e instanceof Set}function bf(e){return e.o||e.t}function a_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=gF(e);delete t[nr];for(var n=p0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=yme),Object.freeze(e),t&&Zf(e,function(n,r){return s_(r,!0)},!0)),e}function yme(){ms(2)}function l_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function _l(e){var t=NC[e];return t||ms(18,e),t}function bme(e,t){NC[e]||(NC[e]=t)}function MC(){return mv}function XS(e,t){t&&(_l("Patches"),e.u=[],e.s=[],e.v=t)}function F5(e){OC(e),e.p.forEach(xme),e.p=null}function OC(e){e===mv&&(mv=e.l)}function JT(e){return mv={p:[],l:mv,h:e,m:!0,_:0}}function xme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function QS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||_l("ES5").S(t,e,r),r?(n[nr].P&&(F5(t),ms(4)),xu(e)&&(e=$5(t,e),t.l||H5(t,e)),t.u&&_l("Patches").M(n[nr].t,e,t.u,t.s)):e=$5(t,n,[]),F5(t),t.u&&t.v(t.u,t.s),e!==pF?e:void 0}function $5(e,t,n){if(l_(t))return t;var r=t[nr];if(!r)return Zf(t,function(o,a){return eA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return H5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=a_(r.k):r.o;Zf(r.i===3?new Set(i):i,function(o,a){return eA(e,r,i,o,a,n)}),H5(e,i,!1),n&&e.u&&_l("Patches").R(r,n,e.u,e.s)}return r.o}function eA(e,t,n,r,i,o){if(sd(i)){var a=$5(e,i,o&&t&&t.i!==3&&!h0(t.D,r)?o.concat(r):void 0);if(fF(n,r,a),!sd(a))return;e.m=!1}if(xu(i)&&!l_(i)){if(!e.h.F&&e._<1)return;$5(e,i),t&&t.A.l||H5(e,i)}}function H5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&s_(t,n)}function JS(e,t){var n=e[nr];return(n?bf(n):e)[t]}function tA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function e6(e){e.o||(e.o=a_(e.t))}function RC(e,t,n){var r=i_(t)?_l("MapSet").N(t,n):o_(t)?_l("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:MC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=vv;a&&(l=[s],u=qg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):_l("ES5").J(t,n);return(n?n.A:MC()).p.push(r),r}function Sme(e){return sd(e)||ms(22,e),function t(n){if(!xu(n))return n;var r,i=n[nr],o=X0(n);if(i){if(!i.P&&(i.i<4||!_l("ES5").K(i)))return i.t;i.I=!0,r=nA(n,o),i.I=!1}else r=nA(n,o);return Zf(r,function(a,s){i&&vme(i.t,a)===s||fF(r,a,t(s))}),o===3?new Set(r):r}(e)}function nA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return a_(e)}function wme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return vv.get(l,o)},set:function(l){var u=this[nr];vv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=p0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!h0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!hF(m,g))return!0}}var b=!!a[nr];return l.length!==p0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=_l("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Eme,mF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function aA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(c_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error(Hi(6));P=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Pme(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error(Hi(12));if(typeof n(void 0,{type:W5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function vF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function V5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return U5}function i(s,l){r(s)===U5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Mme=function(t,n){return t===n};function Ome(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?mve:gve;wF.useSyncExternalStore=D0.useSyncExternalStore!==void 0?D0.useSyncExternalStore:vve;(function(e){e.exports=wF})(SF);var CF={exports:{}},_F={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var vb=C.exports,yve=SF.exports;function bve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xve=typeof Object.is=="function"?Object.is:bve,Sve=yve.useSyncExternalStore,wve=vb.useRef,Cve=vb.useEffect,_ve=vb.useMemo,kve=vb.useDebugValue;_F.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=wve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=_ve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,xve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Sve(e,o[0],o[1]);return Cve(function(){a.hasValue=!0,a.value=s},[s]),kve(s),s};(function(e){e.exports=_F})(CF);function Eve(e){e()}let kF=Eve;const Pve=e=>kF=e,Lve=()=>kF,ld=C.exports.createContext(null);function EF(){return C.exports.useContext(ld)}const Tve=()=>{throw new Error("uSES not initialized!")};let PF=Tve;const Ave=e=>{PF=e},Ive=(e,t)=>e===t;function Mve(e=ld){const t=e===ld?EF:()=>C.exports.useContext(e);return function(r,i=Ive){const{store:o,subscription:a,getServerState:s}=t(),l=PF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Ove=Mve();var Rve={exports:{}},On={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var f_=Symbol.for("react.element"),h_=Symbol.for("react.portal"),yb=Symbol.for("react.fragment"),bb=Symbol.for("react.strict_mode"),xb=Symbol.for("react.profiler"),Sb=Symbol.for("react.provider"),wb=Symbol.for("react.context"),Nve=Symbol.for("react.server_context"),Cb=Symbol.for("react.forward_ref"),_b=Symbol.for("react.suspense"),kb=Symbol.for("react.suspense_list"),Eb=Symbol.for("react.memo"),Pb=Symbol.for("react.lazy"),Dve=Symbol.for("react.offscreen"),LF;LF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case f_:switch(e=e.type,e){case yb:case xb:case bb:case _b:case kb:return e;default:switch(e=e&&e.$$typeof,e){case Nve:case wb:case Cb:case Pb:case Eb:case Sb:return e;default:return t}}case h_:return t}}}On.ContextConsumer=wb;On.ContextProvider=Sb;On.Element=f_;On.ForwardRef=Cb;On.Fragment=yb;On.Lazy=Pb;On.Memo=Eb;On.Portal=h_;On.Profiler=xb;On.StrictMode=bb;On.Suspense=_b;On.SuspenseList=kb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===wb};On.isContextProvider=function(e){return Va(e)===Sb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===f_};On.isForwardRef=function(e){return Va(e)===Cb};On.isFragment=function(e){return Va(e)===yb};On.isLazy=function(e){return Va(e)===Pb};On.isMemo=function(e){return Va(e)===Eb};On.isPortal=function(e){return Va(e)===h_};On.isProfiler=function(e){return Va(e)===xb};On.isStrictMode=function(e){return Va(e)===bb};On.isSuspense=function(e){return Va(e)===_b};On.isSuspenseList=function(e){return Va(e)===kb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===yb||e===xb||e===bb||e===_b||e===kb||e===Dve||typeof e=="object"&&e!==null&&(e.$$typeof===Pb||e.$$typeof===Eb||e.$$typeof===Sb||e.$$typeof===wb||e.$$typeof===Cb||e.$$typeof===LF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})(Rve);function zve(){const e=Lve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const pA={notify(){},get:()=>[]};function Bve(e,t){let n,r=pA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=zve())}function u(){n&&(n(),n=void 0,r.clear(),r=pA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const Fve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$ve=Fve?C.exports.useLayoutEffect:C.exports.useEffect;function Hve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Bve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return $ve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function TF(e=ld){const t=e===ld?EF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Wve=TF();function Vve(e=ld){const t=e===ld?Wve:TF(e);return function(){return t().dispatch}}const Uve=Vve();Ave(CF.exports.useSyncExternalStoreWithSelector);Pve(Il.exports.unstable_batchedUpdates);var p_="persist:",AF="persist/FLUSH",g_="persist/REHYDRATE",IF="persist/PAUSE",MF="persist/PERSIST",OF="persist/PURGE",RF="persist/REGISTER",jve=-1;function L3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L3=function(n){return typeof n}:L3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},L3(e)}function gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gve(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function r2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var i2e=5e3;function o2e(e,t){var n=e.version!==void 0?e.version:jve;e.debug;var r=e.stateReconciler===void 0?Kve:e.stateReconciler,i=e.getStoredState||Xve,o=e.timeout!==void 0?e.timeout:i2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=n2e(m,["_persist"]),w=b;if(g.type===MF){var P=!1,E=function(z,H){P||(g.rehydrate(e.key,z,H),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Yve(e)),v)return ru({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function(H,W){return Promise.resolve(H)};z(D,n).then(function(H){E(H)},function(H){E(void 0,H)})},function(D){E(void 0,D)}),ru({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===OF)return s=!0,g.result(Jve(e)),ru({},t(w,g),{_persist:v});if(g.type===AF)return g.result(a&&a.flush()),ru({},t(w,g),{_persist:v});if(g.type===IF)l=!0;else if(g.type===g_){if(s)return ru({},w,{_persist:ru({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=ru({},I,{_persist:ru({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var N=t(w,g);return N===w?h:u(ru({},N,{_persist:v}))}}function vA(e){return l2e(e)||s2e(e)||a2e()}function a2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function s2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function l2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:NF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case RF:return zC({},t,{registry:[].concat(vA(t.registry),[n.key])});case g_:var r=t.registry.indexOf(n.key),i=vA(t.registry);return i.splice(r,1),zC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function d2e(e,t,n){var r=n||!1,i=c_(c2e,NF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:RF,key:u})},a=function(u,h,g){var m={type:g_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=zC({},i,{purge:function(){var u=[];return e.dispatch({type:OF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:AF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:IF})},persist:function(){e.dispatch({type:MF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var m_={},v_={};v_.__esModule=!0;v_.default=p2e;function T3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T3=function(n){return typeof n}:T3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T3(e)}function o6(){}var f2e={getItem:o6,setItem:o6,removeItem:o6};function h2e(e){if((typeof self>"u"?"undefined":T3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function p2e(e){var t="".concat(e,"Storage");return h2e(t)?self[t]:f2e}m_.__esModule=!0;m_.default=v2e;var g2e=m2e(v_);function m2e(e){return e&&e.__esModule?e:{default:e}}function v2e(e){var t=(0,g2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var DF=void 0,y2e=b2e(m_);function b2e(e){return e&&e.__esModule?e:{default:e}}var x2e=(0,y2e.default)("local");DF=x2e;var zF={},BF={},Xf={};Object.defineProperty(Xf,"__esModule",{value:!0});Xf.PLACEHOLDER_UNDEFINED=Xf.PACKAGE_NAME=void 0;Xf.PACKAGE_NAME="redux-deep-persist";Xf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var y_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(y_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Xf,n=y_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,ne,ie){ie||(ie=new Set([j])),ne||(ne="");for(const J in j){const q=ne?`${ne}.${J}`:J,V=j[J];if((0,e.isObjectLike)(V))return ie.has(V)?`${ne}.${J}:`:(ie.add(V),(0,e.getCircularPath)(V,q,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const ne=(0,e.isArray)(j)?[]:{};for(const ie in j){const J=j[ie];ne[ie]=(0,e._cloneDeep)(J)}return ne};e._cloneDeep=m;const v=function(j){const ne=(0,e.getCircularPath)(j);if(ne)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${ne}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,ne){if(j===ne)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(ne))return ne;const ie=(0,e.cloneDeep)(j),J=(0,e.cloneDeep)(ne),q=Object.keys(ie).reduce((G,Q)=>(h.call(J,Q)||(G[Q]=void 0),G),{});if((0,e.isDate)(ie)||(0,e.isDate)(J))return ie.valueOf()===J.valueOf()?{}:J;const V=Object.keys(J).reduce((G,Q)=>{if(!h.call(ie,Q))return G[Q]=J[Q],G;const X=(0,e.difference)(ie[Q],J[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(J)||!(0,e.isArray)(ie)&&(0,e.isArray)(J)?J:G:(G[Q]=X,G)},q);return delete V._persist,V};e.difference=b;const w=function(j,ne){return ne.reduce((ie,J)=>{if(ie){const q=parseInt(J,10),V=(0,e.isIntegerString)(J)&&q<0?ie.length+q:J;return(0,e.isString)(ie)?ie.charAt(V):ie[V]}},j)};e.path=w;const P=function(j,ne){return[...j].reverse().reduce((q,V,G)=>{const Q=(0,e.isIntegerString)(V)?[]:{};return Q[V]=G===0?ne:q,Q},{})};e.assocPath=P;const E=function(j,ne){const ie=(0,e.cloneDeep)(j);return ne.reduce((J,q,V)=>(V===ne.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[q],J&&J[q]),ie),ie};e.dissocPath=E;const k=function(j,ne,...ie){if(!ie||!ie.length)return ne;const J=ie.shift(),{preservePlaceholder:q,preserveUndefined:V}=j;if((0,e.isObjectLike)(ne)&&(0,e.isObjectLike)(J))for(const G in J)if((0,e.isObjectLike)(J[G])&&(0,e.isObjectLike)(ne[G]))ne[G]||(ne[G]={}),k(j,ne[G],J[G]);else if((0,e.isArray)(ne)){let Q=J[G];const X=q?t.PLACEHOLDER_UNDEFINED:void 0;V||(Q=typeof Q<"u"?Q:ne[parseInt(G,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,ne[parseInt(G,10)]=Q}else{const Q=J[G]!==t.PLACEHOLDER_UNDEFINED?J[G]:void 0;ne[G]=Q}return k(j,ne,...ie)},L=function(j,ne,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(ne))};e.mergeDeep=L;const I=function(j,ne=[],ie,J,q){if(!(0,e.isObjectLike)(j))return j;for(const V in j){const G=j[V],Q=(0,e.isArray)(j),X=J?J+"."+V:V;G===null&&(ie===n.ConfigType.WHITELIST&&ne.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&ne.indexOf(X)!==-1)&&Q&&(j[parseInt(V,10)]=void 0),G===void 0&&q&&ie===n.ConfigType.BLACKLIST&&ne.indexOf(X)===-1&&Q&&(j[parseInt(V,10)]=t.PLACEHOLDER_UNDEFINED),I(G,ne,ie,X,q)}},O=function(j,ne,ie,J){const q=(0,e.cloneDeep)(j);return I(q,ne,ie,"",J),q};e.preserveUndefined=O;const N=function(j,ne,ie){return ie.indexOf(j)===ne};e.unique=N;const D=function(j){return j.reduce((ne,ie)=>{const J=j.filter(me=>me===ie),q=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:V,subsets:G}=ne,Q=J.length>1&&V.indexOf(ie)===-1,X=q.length>1;return{duplicates:[...V,...Q?J:[]],subsets:[...G,...X?q:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,ne,ie){const J=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",q=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,V=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(ne)||ne.length<1)throw new Error(`${q} Name (key) of reducer is required. ${V}`);if(!j||!j.length)return;const{duplicates:G,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(G.length>1)throw new Error(`${q} Duplicated paths. - - ${JSON.stringify(G)} - - ${V}`);if(Q.length>1)throw new Error(`${q} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(Q)} - - ${V}`)};e.singleTransformValidator=z;const H=function(j){if(!(0,e.isArray)(j))return;const ne=j?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(ne.length){const ie=ne.filter((J,q)=>ne.indexOf(J)!==q);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=H;const W=function({whitelist:j,blacklist:ne}){if(j&&j.length&&ne&&ne.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:ie,subsets:J}=(0,e.findDuplicatesAndSubsets)(j);(0,e.throwError)({duplicates:ie,subsets:J},"whitelist")}if(ne){const{duplicates:ie,subsets:J}=(0,e.findDuplicatesAndSubsets)(ne);(0,e.throwError)({duplicates:ie,subsets:J},"blacklist")}};e.configValidator=W;const Y=function({duplicates:j,subsets:ne},ie){if(j.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. - - ${JSON.stringify(j)}`);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(ne)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((ne,ie)=>{const J=ie.split("."),q=J[0],V=J.slice(1).join(".")||void 0,G=ne.filter(X=>Object.keys(X)[0]===q)[0],Q=G?Object.values(G)[0]:void 0;return G||ne.push({[q]:V?[V]:void 0}),G&&!Q&&V&&(G[q]=[V]),G&&Q&&V&&Q.push(V),ne},[]):[]};e.getRootKeysGroup=de})(BF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!P(k)&&g?g(E,k,L):E,out:(E,k,L)=>!P(k)&&m?m(E,k,L):E,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const k=(0,n.cloneDeep)(v);let L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(E,w),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:P,rootReducer:E}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(E(void 0,{type:""})),N=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>N.indexOf(de)===-1&&D.indexOf(de)===-1),H=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...H,...W,...Y,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(zF);const A3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),S2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return b_(r)?r:!1},b_=e=>Boolean(typeof e=="string"?S2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),G5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),w2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,P=1,E=2,k=4,L=8,I=16,O=32,N=64,D=128,z=256,H=512,W=30,Y="...",de=800,j=16,ne=1,ie=2,J=3,q=1/0,V=9007199254740991,G=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,xe=X>>>1,Se=[["ary",D],["bind",P],["bindKey",E],["curry",L],["curryRight",I],["flip",H],["partial",O],["partialRight",N],["rearg",z]],He="[object Arguments]",Ue="[object Array]",ut="[object AsyncFunction]",Xe="[object Boolean]",et="[object Date]",tt="[object DOMException]",at="[object Error]",At="[object Function]",wt="[object GeneratorFunction]",Ae="[object Map]",dt="[object Number]",Mt="[object Null]",ct="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",It="[object Float32Array]",Ne="[object Float64Array]",st="[object Int8Array]",ln="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",pt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,o1=RegExp(pi.source),ga=RegExp(As.source),yh=/<%-([\s\S]+?)%>/g,a1=/<%([\s\S]+?)%>/g,Mu=/<%=([\s\S]+?)%>/g,bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,s1=RegExp(kd.source),Ou=/^\s+/,Ed=/\s/,l1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ru=/,? & /,u1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,c1=/[()=,{}\[\]\/\s]/,d1=/\\(\\)?/g,f1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,h1=/^[-+]0x[0-9a-f]+$/i,p1=/^0b[01]+$/i,g1=/^\[object .+?Constructor\]$/,m1=/^0o[0-7]+$/i,v1=/^(?:0|[1-9]\d*)$/,y1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,b1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Dl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",zl=Nl+Dl+Os,Sh="\\u2700-\\u27bf",Nu="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+zl+"]",Pd="\\d+",Bl="["+Sh+"]",qa="["+Nu+"]",Ld="[^"+ja+Ur+Pd+Sh+Nu+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",wh="(?:"+Ga+"|"+gi+")",Ch="[^"+ja+"]",Td="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",zs="\\u200d",Fl="(?:"+qa+"|"+Ld+")",x1="(?:"+uo+"|"+Ld+")",Du="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ad=wh+"?",Bu="["+kr+"]?",ma="(?:"+zs+"(?:"+[Ch,Td,Ds].join("|")+")"+Bu+Ad+")*",Id="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$l="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Ad+ma,_h="(?:"+[Bl,Td,Ds].join("|")+")"+Ht,Fu="(?:"+[Ch+Ga+"?",Ga,Td,Ds,Ns].join("|")+")",$u=RegExp(zo,"g"),kh=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Fu+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+Du+"(?="+[jr,uo,"$"].join("|")+")",x1+"+"+zu+"(?="+[jr,uo+Fl,"$"].join("|")+")",uo+"?"+Fl+"+"+Du,uo+"+"+zu,$l,Id,Pd,_h].join("|"),"g"),Md=RegExp("["+zs+ja+zl+kr+"]"),Eh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Od=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ph=-1,un={};un[It]=un[Ne]=un[st]=un[ln]=un[Dn]=un[Fe]=un[pt]=un[rt]=un[Nt]=!0,un[He]=un[Ue]=un[qt]=un[Xe]=un[Ee]=un[et]=un[at]=un[At]=un[Ae]=un[dt]=un[ct]=un[Et]=un[Zt]=un[En]=un[Je]=!1;var Wt={};Wt[He]=Wt[Ue]=Wt[qt]=Wt[Ee]=Wt[Xe]=Wt[et]=Wt[It]=Wt[Ne]=Wt[st]=Wt[ln]=Wt[Dn]=Wt[Ae]=Wt[dt]=Wt[ct]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[pt]=Wt[rt]=Wt[Nt]=!0,Wt[at]=Wt[At]=Wt[Je]=!1;var Lh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},S1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ye=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,fn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,hn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,va=hn&&hn.isRegExp,Bs=hn&&hn.isSet,w1=hn&&hn.isTypedArray;function mi(oe,be,ve){switch(ve.length){case 0:return oe.call(be);case 1:return oe.call(be,ve[0]);case 2:return oe.call(be,ve[0],ve[1]);case 3:return oe.call(be,ve[0],ve[1],ve[2])}return oe.apply(be,ve)}function C1(oe,be,ve,qe){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Th(oe,be,ve){for(var qe=-1,_t=oe==null?0:oe.length;++qe<_t;)if(ve(be,oe[qe]))return!0;return!1}function Bn(oe,be){for(var ve=-1,qe=oe==null?0:oe.length,_t=Array(qe);++ve-1;);return ve}function Ka(oe,be){for(var ve=oe.length;ve--&&Vu(be,oe[ve],0)>-1;);return ve}function k1(oe,be){for(var ve=oe.length,qe=0;ve--;)oe[ve]===be&&++qe;return qe}var i2=zd(Lh),Ya=zd(S1);function $s(oe){return"\\"+re[oe]}function Ih(oe,be){return oe==null?n:oe[be]}function Wl(oe){return Md.test(oe)}function Mh(oe){return Eh.test(oe)}function o2(oe){for(var be,ve=[];!(be=oe.next()).done;)ve.push(be.value);return ve}function Oh(oe){var be=-1,ve=Array(oe.size);return oe.forEach(function(qe,_t){ve[++be]=[_t,qe]}),ve}function Rh(oe,be){return function(ve){return oe(be(ve))}}function Ho(oe,be){for(var ve=-1,qe=oe.length,_t=0,Jt=[];++ve-1}function _2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=w2,Wo.prototype.delete=C2,Wo.prototype.get=$1,Wo.prototype.has=H1,Wo.prototype.set=_2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,R,F){var K,ee=p&g,ce=p&m,_e=p&v;if(S&&(K=R?S(c,A,R,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=vV(c),!ee)return wi(c,K)}else{var Te=si(c),je=Te==At||Te==wt;if(vc(c))return Xs(c,ee);if(Te==ct||Te==He||je&&!R){if(K=ce||je?{}:lk(c),!ee)return ce?og(c,sc(K,c)):yo(c,Qe(K,c))}else{if(!Wt[Te])return R?c:{};K=yV(c,Te,ee)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),zk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Nk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?xo:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Wh(c){var p=li(c);return function(S){return Vh(S,c,p)}}function Vh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var R=S[A],F=p[R],K=c[R];if(K===n&&!(R in c)||!F(K))return!1}return!0}function j1(c,p,S){if(typeof c!="function")throw new vi(a);return cg(function(){c.apply(n,S)},p)}function lc(c,p,S,A){var R=-1,F=Ni,K=!0,ee=c.length,ce=[],_e=p.length;if(!ee)return ce;S&&(p=Bn(p,Er(S))),A?(F=Th,K=!1):p.length>=i&&(F=ju,K=!1,p=new Sa(p));e:for(;++RR?0:R+S),A=A===n||A>R?R:Dt(A),A<0&&(A+=R),A=S>A?0:Fk(A);S0&&S(ee)?p>1?Lr(ee,p-1,S,A,R):ya(R,ee):A||(R[R.length]=ee)}return R}var jh=Qs(),go=Qs(!0);function qo(c,p){return c&&jh(c,p,li)}function mo(c,p){return c&&go(c,p,li)}function Gh(c,p){return ho(p,function(S){return Xl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Kh(c,p){return c!=null&&tn.call(c,p)}function Yh(c,p){return c!=null&&p in cn(c)}function Zh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Te=-1,je=ee[0];e:for(;++Te-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function ef(c,p){for(var S=c?p.length:0,A=S-1;S--;){var R=p[S];if(S==A||R!==F){var F=R;Zl(R)?jd.call(c,R,1):ap(c,R)}}return c}function tf(c,p){return c+Ul(R1()*(p-c+1))}function Ks(c,p,S,A){for(var R=-1,F=vr(Kd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++R]=c,c+=S;return K}function pc(c,p){var S="";if(!c||p<1||p>V)return S;do p%2&&(S+=c),p=Ul(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return _x(dk(c,p,So),c+"")}function tp(c){return ac(hp(c))}function nf(c,p){var S=hp(c);return M2(S,Gl(p,0,S.length))}function Kl(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var R=-1,F=p.length,K=F-1,ee=c;ee!=null&&++RR?0:R+p),S=S>R?R:S,S<0&&(S+=R),R=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(R);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:$(c);if(_e)return Hd(_e);K=!1,R=ju,ce=new Sa}else ce=p?[]:ee;e:for(;++A=A?c:Ar(c,p,S)}var tg=c2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Zu?Zu(S):new c.constructor(S);return c.copy(A),A}function ng(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Yl(c,p){var S=p?ng(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function L2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Zd?cn(Zd.call(c)):{}}function T2(c,p){var S=p?ng(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function rg(c,p){if(c!==p){var S=c!==n,A=c===null,R=c===c,F=Yo(c),K=p!==n,ee=p===null,ce=p===p,_e=Yo(p);if(!ee&&!_e&&!F&&c>p||F&&K&&ce&&!ee&&!_e||A&&K&&ce||!S&&ce||!R)return 1;if(!A&&!F&&!_e&&c=ee)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function A2(c,p,S,A){for(var R=-1,F=c.length,K=S.length,ee=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Te=!A;++ee1?S[R-1]:n,K=R>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(R--,F):n,K&&Qi(S[0],S[1],K)&&(F=R<3?n:F,R=1),p=cn(p);++A-1?R[F?p[K]:K]:n}}function sg(c){return er(function(p){var S=p.length,A=S,R=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(R&&!K&&ye(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceee))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Te=-1,je=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(l1,`{ -/* [wrapped with `+p+`] */ -`)}function xV(c){return Rt(c)||df(c)||!!(M1&&c&&c[M1])}function Zl(c,p){var S=typeof c;return p=p??V,!!p&&(S=="number"||S!="symbol"&&v1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function M2(c,p){var S=-1,A=c.length,R=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Ck(c,S)});function _k(c){var p=B(c);return p.__chain__=!0,p}function IU(c,p){return p(c),c}function O2(c,p){return p(c)}var MU=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,R=function(F){return Hh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Zl(S)?this.thru(R):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:O2,args:[R],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function OU(){return _k(this)}function RU(){return new Ki(this.value(),this.__chain__)}function NU(){this.__values__===n&&(this.__values__=Bk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function DU(){return this}function zU(c){for(var p,S=this;S instanceof Xd;){var A=vk(S);A.__index__=0,A.__values__=n,p?R.__wrapped__=A:p=A;var R=A;S=S.__wrapped__}return R.__wrapped__=c,p}function BU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:O2,args:[kx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(kx)}function FU(){return Ys(this.__wrapped__,this.__actions__)}var $U=lp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function HU(c,p,S){var A=Rt(c)?zn:G1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function WU(c,p){var S=Rt(c)?ho:Go;return S(c,Le(p,3))}var VU=ag(yk),UU=ag(bk);function jU(c,p){return Lr(R2(c,p),1)}function GU(c,p){return Lr(R2(c,p),q)}function qU(c,p,S){return S=S===n?1:Dt(S),Lr(R2(c,p),S)}function kk(c,p){var S=Rt(c)?Vn:Qa;return S(c,Le(p,3))}function Ek(c,p){var S=Rt(c)?fo:Uh;return S(c,Le(p,3))}var KU=lp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function YU(c,p,S,A){c=bo(c)?c:hp(c),S=S&&!A?Dt(S):0;var R=c.length;return S<0&&(S=vr(R+S,0)),F2(c)?S<=R&&c.indexOf(p,S)>-1:!!R&&Vu(c,p,S)>-1}var ZU=Ct(function(c,p,S){var A=-1,R=typeof p=="function",F=bo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=R?mi(p,K,S):Ja(K,p,S)}),F}),XU=lp(function(c,p,S){Uo(c,S,p)});function R2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function QU(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var JU=lp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function ej(c,p,S){var A=Rt(c)?Rd:Ah,R=arguments.length<3;return A(c,Le(p,4),S,R,Qa)}function tj(c,p,S){var A=Rt(c)?e2:Ah,R=arguments.length<3;return A(c,Le(p,4),S,R,Uh)}function nj(c,p){var S=Rt(c)?ho:Go;return S(c,z2(Le(p,3)))}function rj(c){var p=Rt(c)?ac:tp;return p(c)}function ij(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:nf;return A(c,p)}function oj(c){var p=Rt(c)?mx:ai;return p(c)}function aj(c){if(c==null)return 0;if(bo(c))return F2(c)?ba(c):c.length;var p=si(c);return p==Ae||p==Zt?c.size:Tr(c).length}function sj(c,p,S){var A=Rt(c)?Hu:vo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var lj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),N2=d2||function(){return mt.Date.now()};function uj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Pk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Lk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Px=Ct(function(c,p,S){var A=P;if(S.length){var R=Ho(S,We(Px));A|=O}return he(c,A,p,S,R)}),Tk=Ct(function(c,p,S){var A=P|E;if(S.length){var R=Ho(S,We(Tk));A|=O}return he(p,A,c,S,R)});function Ak(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ak.placeholder,A}function Ik(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){var A,R,F,K,ee,ce,_e=0,ke=!1,Te=!1,je=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Te="maxWait"in S,F=Te?vr(_a(S.maxWait)||0,p):F,je="trailing"in S?!!S.trailing:je);function ht(Mr){var is=A,Jl=R;return A=R=n,_e=Mr,K=c.apply(Jl,is),K}function yt(Mr){return _e=Mr,ee=cg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Jl=Mr-_e,Xk=p-is;return Te?Kr(Xk,F-Jl):Xk}function bt(Mr){var is=Mr-ce,Jl=Mr-_e;return ce===n||is>=p||is<0||Te&&Jl>=F}function Gt(){var Mr=N2();if(bt(Mr))return en(Mr);ee=cg(Gt,$t(Mr))}function en(Mr){return ee=n,je&&A?ht(Mr):(A=R=n,K)}function Zo(){ee!==n&&tg(ee),_e=0,A=ce=R=ee=n}function Ji(){return ee===n?K:en(N2())}function Xo(){var Mr=N2(),is=bt(Mr);if(A=arguments,R=this,ce=Mr,is){if(ee===n)return yt(ce);if(Te)return tg(ee),ee=cg(Gt,p),ht(ce)}return ee===n&&(ee=cg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var cj=Ct(function(c,p){return j1(c,1,p)}),dj=Ct(function(c,p,S){return j1(c,_a(p)||0,S)});function fj(c){return he(c,H)}function D2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,R=p?p.apply(this,A):A[0],F=S.cache;if(F.has(R))return F.get(R);var K=c.apply(this,A);return S.cache=F.set(R,K)||F,K};return S.cache=new(D2.Cache||Vo),S}D2.Cache=Vo;function z2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function hj(c){return Lk(2,c)}var pj=bx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var R=-1,F=Kr(A.length,S);++R=p}),df=Qh(function(){return arguments}())?Qh:function(c){return Sr(c)&&tn.call(c,"callee")&&!I1.call(c,"callee")},Rt=ve.isArray,Tj=Gr?Er(Gr):K1;function bo(c){return c!=null&&B2(c.length)&&!Xl(c)}function Ir(c){return Sr(c)&&bo(c)}function Aj(c){return c===!0||c===!1||Sr(c)&&oi(c)==Xe}var vc=f2||Fx,Ij=co?Er(co):Y1;function Mj(c){return Sr(c)&&c.nodeType===1&&!dg(c)}function Oj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||vc(c)||fp(c)||df(c)))return!c.length;var p=si(c);if(p==Ae||p==Zt)return!c.size;if(ug(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Rj(c,p){return cc(c,p)}function Nj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?cc(c,p,n,S):!!A}function Tx(c){if(!Sr(c))return!1;var p=oi(c);return p==at||p==tt||typeof c.message=="string"&&typeof c.name=="string"&&!dg(c)}function Dj(c){return typeof c=="number"&&zh(c)}function Xl(c){if(!lr(c))return!1;var p=oi(c);return p==At||p==wt||p==ut||p==kn}function Rk(c){return typeof c=="number"&&c==Dt(c)}function B2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=V}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Nk=Gi?Er(Gi):yx;function zj(c,p){return c===p||dc(c,p,kt(p))}function Bj(c,p,S){return S=typeof S=="function"?S:n,dc(c,p,kt(p),S)}function Fj(c){return Dk(c)&&c!=+c}function $j(c){if(CV(c))throw new _t(o);return Jh(c)}function Hj(c){return c===null}function Wj(c){return c==null}function Dk(c){return typeof c=="number"||Sr(c)&&oi(c)==dt}function dg(c){if(!Sr(c)||oi(c)!=ct)return!1;var p=Xu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ax=va?Er(va):ar;function Vj(c){return Rk(c)&&c>=-V&&c<=V}var zk=Bs?Er(Bs):Bt;function F2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var fp=w1?Er(w1):zr;function Uj(c){return c===n}function jj(c){return Sr(c)&&si(c)==Je}function Gj(c){return Sr(c)&&oi(c)==Xt}var qj=_(js),Kj=_(function(c,p){return c<=p});function Bk(c){if(!c)return[];if(bo(c))return F2(c)?Di(c):wi(c);if(Qu&&c[Qu])return o2(c[Qu]());var p=si(c),S=p==Ae?Oh:p==Zt?Hd:hp;return S(c)}function Ql(c){if(!c)return c===0?c:0;if(c=_a(c),c===q||c===-q){var p=c<0?-1:1;return p*G}return c===c?c:0}function Dt(c){var p=Ql(c),S=p%1;return p===p?S?p-S:p:0}function Fk(c){return c?Gl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=p1.test(c);return S||m1.test(c)?Ye(c.slice(2),S?2:8):h1.test(c)?Q:+c}function $k(c){return wa(c,xo(c))}function Yj(c){return c?Gl(Dt(c),-V,V):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var Zj=Xi(function(c,p){if(ug(p)||bo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Hk=Xi(function(c,p){wa(p,xo(p),c)}),$2=Xi(function(c,p,S,A){wa(p,xo(p),c,A)}),Xj=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),Qj=er(Hh);function Jj(c,p){var S=jl(c);return p==null?S:Qe(S,p)}var eG=Ct(function(c,p){c=cn(c);var S=-1,A=p.length,R=A>2?p[2]:n;for(R&&Qi(p[0],p[1],R)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var R=p.length;R--;)ap(S,p[R]);return S});function yG(c,p){return Vk(c,z2(Le(p)))}var bG=er(function(c,p){return c==null?{}:Q1(c,p)});function Vk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),ep(c,S,function(A,R){return p(A,R[0])})}function xG(c,p,S){p=Zs(p,c);var A=-1,R=p.length;for(R||(R=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var R=R1();return Kr(c+R*(p-c+pe("1e-"+((R+"").length-1))),p)}return tf(c,p)}var IG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Gk(p):p)});function Gk(c){return Ox(Sn(c).toLowerCase())}function qk(c){return c=Sn(c),c&&c.replace(y1,i2).replace(kh,"")}function MG(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:Gl(Dt(S),0,A);var R=S;return S-=p.length,S>=0&&c.slice(S,R)==p}function OG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function RG(c){return c=Sn(c),c&&s1.test(c)?c.replace(kd,"\\$&"):c}var NG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),DG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),zG=cp("toLowerCase");function BG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var R=(p-A)/2;return d(Ul(R),S)+c+d(Kd(R),S)}function FG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ax(p))&&(p=Zi(p),!p&&Wl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var GG=Js(function(c,p,S){return c+(S?" ":"")+Ox(p)});function qG(c,p,S){return c=Sn(c),S=S==null?0:Gl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function KG(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=$2({},p,A,Re);var R=$2({},p.imports,A.imports,Re),F=li(R),K=$d(R,F),ee,ce,_e=0,ke=p.interpolate||Ms,Te="__p += '",je=Vd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Mu?f1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ph+"]")+` -`;c.replace(je,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Te+=c.slice(_e,Xo).replace(b1,$s),Gt&&(ee=!0,Te+=`' + -__e(`+Gt+`) + -'`),Ji&&(ce=!0,Te+=`'; -`+Ji+`; -__p += '`),en&&(Te+=`' + -((__t = (`+en+`)) == null ? '' : __t) + -'`),_e=Xo+bt.length,bt}),Te+=`'; -`;var yt=tn.call(p,"variable")&&p.variable;if(!yt)Te=`with (obj) { -`+Te+` -} -`;else if(c1.test(yt))throw new _t(s);Te=(ce?Te.replace(Qt,""):Te).replace(Qn,"$1").replace(lo,"$1;"),Te="function("+(yt||"obj")+`) { -`+(yt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Te+`return __p -}`;var $t=Yk(function(){return Jt(F,ht+"return "+Te).apply(n,K)});if($t.source=Te,Tx($t))throw $t;return $t}function YG(c){return Sn(c).toLowerCase()}function ZG(c){return Sn(c).toUpperCase()}function XG(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Di(p),F=$o(A,R),K=Ka(A,R)+1;return ts(A,F,K).join("")}function QG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,P1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),R=Ka(A,Di(p))+1;return ts(A,0,R).join("")}function JG(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Ou,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),R=$o(A,Di(p));return ts(A,R).join("")}function eq(c,p){var S=W,A=Y;if(lr(p)){var R="separator"in p?p.separator:R;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Wl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var ee=S-ba(A);if(ee<1)return A;var ce=K?ts(K,0,ee).join(""):c.slice(0,ee);if(R===n)return ce+A;if(K&&(ee+=ce.length-ee),Ax(R)){if(c.slice(ee).search(R)){var _e,ke=ce;for(R.global||(R=Vd(R.source,Sn(Ua.exec(R))+"g")),R.lastIndex=0;_e=R.exec(ke);)var Te=_e.index;ce=ce.slice(0,Te===n?ee:Te)}}else if(c.indexOf(Zi(R),ee)!=ee){var je=ce.lastIndexOf(R);je>-1&&(ce=ce.slice(0,je))}return ce+A}function tq(c){return c=Sn(c),c&&o1.test(c)?c.replace(pi,l2):c}var nq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Ox=cp("toUpperCase");function Kk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Mh(c)?Wd(c):_1(c):c.match(p)||[]}var Yk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Tx(S)?S:new _t(S)}}),rq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Px(c[S],c))}),c});function iq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var R=-1;++RV)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var R=Fd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),R=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!R||(B.prototype[p]=function(){var K=this.__wrapped__,ee=A?[1]:arguments,ce=K instanceof Ut,_e=ee[0],ke=ce||Rt(K),Te=function(Gt){var en=R.apply(B,ya([Gt],ee));return A&&je?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var je=this.__chain__,ht=!!this.__actions__.length,yt=F&&!je,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,ee);return bt.__actions__.push({func:O2,args:[Te],thisArg:n}),new Ki(bt,je)}return yt&&$t?c.apply(this,ee):(bt=this.thru(Te),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=qu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var R=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],R)}return this[S](function(K){return p.apply(Rt(K)?K:[],R)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[lf(n,E).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=v2,B.prototype.at=MU,B.prototype.chain=OU,B.prototype.commit=RU,B.prototype.next=NU,B.prototype.plant=zU,B.prototype.reverse=BU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=FU,B.prototype.first=B.prototype.head,Qu&&(B.prototype[Qu]=DU),B},xa=po();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ge=ca.exports;var C2e=Object.create,FF=Object.defineProperty,_2e=Object.getOwnPropertyDescriptor,k2e=Object.getOwnPropertyNames,E2e=Object.getPrototypeOf,P2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),L2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of k2e(t))!P2e.call(e,i)&&i!==n&&FF(e,i,{get:()=>t[i],enumerable:!(r=_2e(t,i))||r.enumerable});return e},$F=(e,t,n)=>(n=e!=null?C2e(E2e(e)):{},L2e(t||!e||!e.__esModule?FF(n,"default",{value:e,enumerable:!0}):n,e)),T2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),HF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Lb=De((e,t)=>{var n=HF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),A2e=De((e,t)=>{var n=Lb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),I2e=De((e,t)=>{var n=Lb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),M2e=De((e,t)=>{var n=Lb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),O2e=De((e,t)=>{var n=Lb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Tb=De((e,t)=>{var n=T2e(),r=A2e(),i=I2e(),o=M2e(),a=O2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Tb();function r(){this.__data__=new n,this.size=0}t.exports=r}),N2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),D2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),z2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),WF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=WF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),x_=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),B2e=De((e,t)=>{var n=x_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),F2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Ab=De((e,t)=>{var n=x_(),r=B2e(),i=F2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),VF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),UF=De((e,t)=>{var n=Ab(),r=VF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),$2e=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),H2e=De((e,t)=>{var n=$2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),jF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),W2e=De((e,t)=>{var n=UF(),r=H2e(),i=VF(),o=jF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),V2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),Q0=De((e,t)=>{var n=W2e(),r=V2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),S_=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Map");t.exports=i}),Ib=De((e,t)=>{var n=Q0(),r=n(Object,"create");t.exports=r}),U2e=De((e,t)=>{var n=Ib();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),j2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),G2e=De((e,t)=>{var n=Ib(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),q2e=De((e,t)=>{var n=Ib(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),K2e=De((e,t)=>{var n=Ib(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Y2e=De((e,t)=>{var n=U2e(),r=j2e(),i=G2e(),o=q2e(),a=K2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Y2e(),r=Tb(),i=S_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),X2e=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Mb=De((e,t)=>{var n=X2e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Q2e=De((e,t)=>{var n=Mb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),J2e=De((e,t)=>{var n=Mb();function r(i){return n(this,i).get(i)}t.exports=r}),eye=De((e,t)=>{var n=Mb();function r(i){return n(this,i).has(i)}t.exports=r}),tye=De((e,t)=>{var n=Mb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),GF=De((e,t)=>{var n=Z2e(),r=Q2e(),i=J2e(),o=eye(),a=tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Tb(),r=S_(),i=GF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Tb(),r=R2e(),i=N2e(),o=D2e(),a=z2e(),s=nye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),iye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),oye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),aye=De((e,t)=>{var n=GF(),r=iye(),i=oye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),qF=De((e,t)=>{var n=aye(),r=sye(),i=lye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,P=u.length;if(w!=P&&!(b&&P>w))return!1;var E=v.get(l),k=v.get(u);if(E&&k)return E==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=Eu(),r=n.Uint8Array;t.exports=r}),cye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),dye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),fye=De((e,t)=>{var n=x_(),r=uye(),i=HF(),o=qF(),a=cye(),s=dye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,N=O?O.valueOf:void 0;function D(z,H,W,Y,de,j,ne){switch(W){case I:if(z.byteLength!=H.byteLength||z.byteOffset!=H.byteOffset)return!1;z=z.buffer,H=H.buffer;case L:return!(z.byteLength!=H.byteLength||!j(new r(z),new r(H)));case h:case g:case b:return i(+z,+H);case m:return z.name==H.name&&z.message==H.message;case w:case E:return z==H+"";case v:var ie=a;case P:var J=Y&l;if(ie||(ie=s),z.size!=H.size&&!J)return!1;var q=ne.get(z);if(q)return q==H;Y|=u,ne.set(z,H);var V=o(ie(z),ie(H),Y,de,j,ne);return ne.delete(z),V;case k:if(N)return N.call(z)==N.call(H)}return!1}t.exports=D}),hye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),pye=De((e,t)=>{var n=hye(),r=w_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),gye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),vye=De((e,t)=>{var n=gye(),r=mye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),yye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),bye=De((e,t)=>{var n=Ab(),r=Ob(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),xye=De((e,t)=>{var n=bye(),r=Ob(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Sye=De((e,t)=>{function n(){return!1}t.exports=n}),KF=De((e,t)=>{var n=Eu(),r=Sye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),wye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Cye=De((e,t)=>{var n=Ab(),r=YF(),i=Ob(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[N]=j[D]=j[z]=j[H]=j[W]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[P]=j[E]=!1;function ne(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=ne}),_ye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),kye=De((e,t)=>{var n=WF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),ZF=De((e,t)=>{var n=Cye(),r=_ye(),i=kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Eye=De((e,t)=>{var n=yye(),r=xye(),i=w_(),o=KF(),a=wye(),s=ZF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),P=!v&&!b&&!w&&s(g),E=v||b||w||P,k=E?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(E&&(I=="length"||w&&(I=="offset"||I=="parent")||P&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Pye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Lye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Tye=De((e,t)=>{var n=Lye(),r=n(Object.keys,Object);t.exports=r}),Aye=De((e,t)=>{var n=Pye(),r=Tye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Iye=De((e,t)=>{var n=UF(),r=YF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Mye=De((e,t)=>{var n=Eye(),r=Aye(),i=Iye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Oye=De((e,t)=>{var n=pye(),r=vye(),i=Mye();function o(a){return n(a,i,r)}t.exports=o}),Rye=De((e,t)=>{var n=Oye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var N=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=Q0(),r=Eu(),i=n(r,"DataView");t.exports=i}),Dye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Promise");t.exports=i}),zye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"Set");t.exports=i}),Bye=De((e,t)=>{var n=Q0(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),Fye=De((e,t)=>{var n=Nye(),r=S_(),i=Dye(),o=zye(),a=Bye(),s=Ab(),l=jF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),P=l(r),E=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var N=s(O),D=N==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case P:return u;case E:return g;case k:return m;case L:return v}return N}),t.exports=I}),$ye=De((e,t)=>{var n=rye(),r=qF(),i=fye(),o=Rye(),a=Fye(),s=w_(),l=KF(),u=ZF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function P(E,k,L,I,O,N){var D=s(E),z=s(k),H=D?m:a(E),W=z?m:a(k);H=H==g?v:H,W=W==g?v:W;var Y=H==v,de=W==v,j=H==W;if(j&&l(E)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return N||(N=new n),D||u(E)?r(E,k,L,I,O,N):i(E,k,H,L,I,O,N);if(!(L&h)){var ne=Y&&w.call(E,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(ne||ie){var J=ne?E.value():E,q=ie?k.value():k;return N||(N=new n),O(J,q,L,I,N)}}return j?(N||(N=new n),o(E,k,L,I,O,N)):!1}t.exports=P}),Hye=De((e,t)=>{var n=$ye(),r=Ob();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),XF=De((e,t)=>{var n=Hye();function r(i,o){return n(i,o)}t.exports=r}),Wye=["ctrl","shift","alt","meta","mod"],Vye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function a6(e,t=","){return typeof e=="string"?e.split(t):e}function Em(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Vye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Wye.includes(o));return{...r,keys:i}}function Uye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function jye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Gye(e){return QF(e,["input","textarea","select"])}function QF({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function qye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var Kye=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},Yye=C.exports.createContext(void 0),Zye=()=>C.exports.useContext(Yye),Xye=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Qye=()=>C.exports.useContext(Xye),Jye=$F(XF());function e3e(e){let t=C.exports.useRef(void 0);return(0,Jye.default)(t.current,e)||(t.current=e),t.current}var bA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=e3e(a),{enabledScopes:h}=Qye(),g=Zye();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!qye(h,u?.scopes))return;let m=w=>{if(!(Gye(w)&&!QF(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){bA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||a6(e,u?.splitKey).forEach(P=>{let E=Em(P,u?.combinationKey);if(Kye(w,E,o)||E.keys?.includes("*")){if(Uye(w,E,u?.preventDefault),!jye(w,E,u?.enabled)){bA(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&a6(e,u?.splitKey).forEach(w=>g.addHotkey(Em(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&a6(e,u?.splitKey).forEach(w=>g.removeHotkey(Em(w,u?.combinationKey)))}},[e,l,u,h]),i}$F(XF());var BC=new Set;function t3e(e){(Array.isArray(e)?e:[e]).forEach(t=>BC.add(Em(t)))}function n3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Em(t);for(let r of BC)r.keys?.every(i=>n.keys?.includes(i))&&BC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{t3e(e.key)}),document.addEventListener("keyup",e=>{n3e(e.key)})});function r3e(){return te("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const i3e=()=>te("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),o3e=lt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),a3e=lt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),s3e=lt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),l3e=lt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),u3e=lt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),c3e=lt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const d3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:te(rh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(r_,{className:"invokeai__switch-root",...s})]})})};function Rb(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return te(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(t7e(i.target.checked))})]})}const xA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(xA)&&u!==Number(I)&&O(String(u))},[u,I]);const N=z=>{O(z),z.match(xA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const H=Ge.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(H)),h(H)};return x(Ui,{...k,children:te(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(rh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),te(q7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:N,onBlur:D,width:a,...L,children:[x(K7,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&te("div",{className:"invokeai__number-input-stepper",children:[x(Z7,{...E,className:"invokeai__number-input-stepper-button"}),x(Y7,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},uh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return te(gd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(rh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(WB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},f3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],h3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],p3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],g3e=[{key:"2x",value:2},{key:"4x",value:4}],C_=0,__=4294967295,m3e=["gfpgan","codeformer"],v3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],y3e=Ze(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),b3e=Ze(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),jv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(y3e),{isGFPGANAvailable:i}=Ce(b3e),o=l=>e(N3(l)),a=l=>e(OW(l)),s=l=>e(D3(l.target.value));return te(on,{direction:"column",gap:2,children:[x(uh,{label:"Type",validValues:m3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function x3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(RW(r.target.checked))})}var JF={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},SA=le.createContext&&le.createContext(JF),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ch(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:N,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:H,sliderMarkProps:W,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:ne,sliderNumberInputStepperProps:ie,sliderTooltipProps:J,sliderIAIIconButtonProps:q,...V}=e,[G,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==G&&G!==""&&Q(String(i))},[i,G,Q]);const X=Se=>{const He=Ge.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},xe=()=>{!L||L()};return te(gd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(rh,{className:"invokeai__slider-component-label",...H,children:r}),te(yz,{w:"100%",gap:2,children:[te(n_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...V,children:[h&&te(Xn,{children:[x(LC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),x(LC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(JB,{className:"invokeai__slider_track",...Y,children:x(eF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(QB,{className:"invokeai__slider-thumb",...de})})]}),v&&te(q7,{min:o,max:a,step:s,value:G,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:N,...j,children:[x(K7,{className:"invokeai__slider-number-input",width:w,readOnly:P,...ne}),te(NB,{...ie,children:[x(Z7,{className:"invokeai__slider-number-stepper"}),x(Y7,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(k_,{}),onClick:xe,isDisabled:I,...q})]})]})}function E_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(ch,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(f8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(f8(.5))}})}const r$=()=>x(md,{flex:"1",textAlign:"left",children:"Other Options"}),L3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(MW(r.target.checked))})})},T3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(IW(r.target.checked))})})},i$=()=>te(on,{gap:2,direction:"column",children:[x(T3e,{}),x(L3e,{})]}),Nb=()=>x(md,{flex:"1",textAlign:"left",children:"Seed"});function A3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(r7e(r.target.checked))})}function I3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(Qv(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:C_,max:__,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const o$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function M3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(Qv(o$(C_,__))),children:x("p",{children:"Shuffle"})})}function O3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(Z9e(r)),value:t,isInteger:!1})}function R3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(X9e(r)),value:t,isInteger:!1})}const Db=()=>te(on,{gap:2,direction:"column",children:[x(A3e,{}),te(on,{gap:2,children:[x(I3e,{}),x(M3e,{})]}),x(on,{gap:2,children:x(O3e,{})}),x(on,{gap:2,children:x(R3e,{})})]});function zb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return te(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(n7e(i.target.checked))})]})}const N3e=Ze(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D3e=Ze(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Gv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(N3e),{isESRGANAvailable:r}=Ce(D3e);return te("div",{className:"upscale-options",children:[x(uh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(h8(Number(a.target.value))),validValues:g3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(p8(a)),value:n,isInteger:!1})]})};function z3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(Q9e(r.target.checked))})}function Bb(){return te(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(z3e,{})]})}function B3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return te(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(rh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(b7,{...s,className:"input-entry",size:"sm",width:o})]})}function F3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(NW(i.target.value));return x(B3e,{label:"Seed Weights",value:e,isInvalid:t&&!(b_(e)||e===""),isDisabled:!t,onChange:r})}function $3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(J9e(i)),isInteger:!1})}const Fb=()=>te(on,{gap:2,direction:"column",children:[x($3e,{}),x(F3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(ez,{className:`invokeai__checkbox ${n}`,...r,children:t})};function $b(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(i7e(r.target.checked)),isChecked:e})}function H3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(PW(r)),value:t,width:P_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const sn=Ze(e=>e.options,e=>lx[e.activeTab],{memoizeOptions:{equalityCheck:Ge.isEqual}}),W3e=Ze(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function V3e(){const e=Ce(i=>i.options.height),t=Ce(sn),n=$e();return x(uh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(LW(Number(i.target.value))),validValues:p3e,styleClass:"main-option-block"})}const U3e=Ze([e=>e.options,W3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function j3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(U3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Y9e(i)),value:t,width:P_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function G3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(uh,{label:"Sampler",value:e,onChange:r=>t(AW(r.target.value)),validValues:f3e,styleClass:"main-option-block"})}function q3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(EW(r)),value:t,width:P_,styleClass:"main-option-block",textAlign:"center"})}function K3e(){const e=Ce(i=>i.options.width),t=Ce(sn),n=$e();return x(uh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(TW(Number(i.target.value))),validValues:h3e,styleClass:"main-option-block"})}const P_="auto";function Hb(){return x("div",{className:"main-options",children:te("div",{className:"main-options-list",children:[te("div",{className:"main-options-row",children:[x(j3e,{}),x(q3e,{}),x(H3e,{})]}),te("div",{className:"main-options-row",children:[x(K3e,{}),x(V3e,{}),x(G3e,{})]})]})})}const Y3e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},a$=mb({name:"system",initialState:Y3e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:Z3e,setIsProcessing:g0,addLogEntry:Ei,setShouldShowLogViewer:s6,setIsConnected:wA,setSocketId:Kke,setShouldConfirmOnDelete:s$,setOpenAccordions:X3e,setSystemStatus:Q3e,setCurrentStatus:l6,setSystemConfig:J3e,setShouldDisplayGuides:e5e,processingCanceled:t5e,errorOccurred:FC,errorSeen:l$,setModelList:CA,setIsCancelable:_A,modelChangeRequested:n5e,setSaveIntermediatesInterval:r5e,setEnableImageDebugging:i5e}=a$.actions,o5e=a$.reducer;function a5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function s5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function l5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function u5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function u$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function c5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function d5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const f5e=Ze(e=>e.system,e=>e.shouldDisplayGuides),h5e=({children:e,feature:t})=>{const n=Ce(f5e),{text:r}=d3e[t];return n?te(X7,{trigger:"hover",children:[x(e_,{children:x(md,{children:e})}),te(J7,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(Q7,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},p5e=Pe(({feature:e,icon:t=a5e},n)=>x(h5e,{feature:e,children:x(md,{ref:n,children:x(pa,{as:t})})}));function g5e(e){const{header:t,feature:n,options:r}=e;return te(Nc,{className:"advanced-settings-item",children:[x("h2",{children:te(Oc,{className:"advanced-settings-header",children:[t,x(p5e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Wb=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(nb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(X3e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(g5e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function m5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function v5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function c$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function d$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function b5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function x5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function S5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function w5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function f$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function L_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function h$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function p$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function C5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function _5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function k5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function E5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function P5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function L5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function T5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function A5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function g$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function I5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function M5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function O5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function R5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function N5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function D5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function m$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function z5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function B5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function u6(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function F5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function v$(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function $5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function H5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function T_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function W5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function A_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Py;const U5e=new Uint8Array(16);function j5e(){if(!Py&&(Py=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Py))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Py(U5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function G5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const q5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kA={randomUUID:q5e};function Lp(e,t,n){if(kA.randomUUID&&!t&&!e)return kA.randomUUID();e=e||{};const r=e.random||(e.rng||j5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return G5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ly=(e,t)=>Math.round(e/t)*t,Vb=e=>e.kind==="line"&&e.layer==="mask",K5e=e=>e.kind==="line"&&e.layer==="base",y$=e=>e.kind==="image"&&e.layer==="base",Y5e=e=>e.kind==="line",EA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1},Z5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",objects:[],pastObjects:[],futureObjects:[],...EA},outpainting:{layer:"base",objects:[],pastObjects:[],futureObjects:[],stagingArea:{images:[],selectedImageIndex:0},shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...EA}},b$=mb({name:"canvas",initialState:Z5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=e[e.currentCanvas].objects.filter(t=>!Vb(t)),e[e.currentCanvas].futureObjects=[],e[e.currentCanvas].shouldInvertMask=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldInvertMask=!e[e.currentCanvas].shouldInvertMask},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldInvertMask:(e,t)=>{e[e.currentCanvas].shouldInvertMask=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{e.inpainting.imageToInpaint=void 0},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.objects=[{kind:"image",layer:"base",x:0,y:0,image:t.payload}],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ge.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ge.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,P=Ge.clamp(m,64,h),E=Ge.clamp(v,64,g),k=b>0?i-b:i,L=w>0?o-w:o,I=Ge.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-P),O=Ge.clamp(L,e[e.currentCanvas].stageCoordinates.y,g-E);e[e.currentCanvas].boundingBoxDimensions={width:P,height:E},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastObjects=[],e[e.currentCanvas].futureObjects=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpaintingSesion:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n;e.outpainting.pastObjects.push([...e.outpainting.objects]),e.outpainting.futureObjects=[],e.outpainting.objects.push({kind:"image",layer:"base",x:i,y:o,image:r})},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,eraserSize:a}=e[e.currentCanvas];n!=="move"&&(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects.push({kind:"line",layer:r,tool:n,strokeWidth:n==="brush"?o/2:a/2,points:t.payload,...r==="base"&&n==="brush"&&{color:i}}),e[e.currentCanvas].futureObjects=[])},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].objects.findLast(Y5e);!n||n.points.push(...t.payload)},undo:e=>{if(e[e.currentCanvas].objects.length===0)return;const t=e[e.currentCanvas].pastObjects.pop();!t||(e[e.currentCanvas].futureObjects.unshift(e[e.currentCanvas].objects),e[e.currentCanvas].objects=t)},redo:e=>{if(e[e.currentCanvas].futureObjects.length===0)return;const t=e[e.currentCanvas].futureObjects.shift();!t||(e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=t)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastObjects.push(e[e.currentCanvas].objects),e[e.currentCanvas].objects=[],e[e.currentCanvas].futureObjects=[]}},extraReducers:e=>{e.addCase(M_.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastObjects.push([...t.outpainting.objects]),t.outpainting.futureObjects=[],t.outpainting.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:Su,setLayer:X5e,setBrushColor:Q5e,setBrushSize:x$,setEraserSize:J5e,addLine:S$,addPointToCurrentLine:w$,setShouldInvertMask:e4e,setIsMaskEnabled:C$,setShouldShowCheckboardTransparency:Yke,setShouldShowBrushPreview:c6,setMaskColor:_$,clearMask:k$,clearImageToInpaint:Zke,undo:t4e,redo:n4e,setCursorPosition:E$,setStageDimensions:PA,setImageToInpaint:q5,setImageToOutpaint:P$,setBoundingBoxDimensions:Kg,setBoundingBoxCoordinates:d6,setBoundingBoxPreviewFill:Xke,setDoesCanvasNeedScaling:Cr,setStageScale:L$,toggleTool:Qke,setShouldShowBoundingBox:I_,setShouldDarkenOutsideBoundingBox:T$,setIsDrawing:Ub,setShouldShowBrush:Jke,setClearBrushHistory:r4e,setShouldUseInpaintReplace:i4e,setInpaintReplace:LA,setShouldLockBoundingBox:A$,toggleShouldLockBoundingBox:o4e,setIsMovingBoundingBox:TA,setIsTransformingBoundingBox:f6,setIsMouseOverBoundingBox:Ty,setIsMoveBoundingBoxKeyHeld:eEe,setIsMoveStageKeyHeld:tEe,setStageCoordinates:I$,setCurrentCanvas:M$,addImageToOutpaintingSesion:a4e,resetCanvas:s4e,setShouldShowGrid:l4e,setShouldSnapToGrid:u4e,setShouldAutoSave:c4e,setShouldShowIntermediates:d4e,setIsMovingStage:K5}=b$.actions,f4e=b$.reducer,M_=ave("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Lp(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],qv=e=>e.canvas.outpainting,J0=Ze([jt],e=>e.objects.find(y$)),O$=Ze([e=>e.options,e=>e.system,J0,sn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(b_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ge.isEqual,resultEqualityCheck:Ge.isEqual}}),$C=Jr("socketio/generateImage"),h4e=Jr("socketio/runESRGAN"),p4e=Jr("socketio/runFacetool"),g4e=Jr("socketio/deleteImage"),HC=Jr("socketio/requestImages"),AA=Jr("socketio/requestNewImages"),m4e=Jr("socketio/cancelProcessing"),IA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const v4e=Jr("socketio/requestSystemConfig"),y4e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return te(X7,{...o,children:[x(e_,{children:t}),te(J7,{className:`invokeai__popover-content ${r}`,children:[i&&x(Q7,{className:"invokeai__popover-arrow"}),n]})]})};function R$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(O$),a=Ce(sn),s=()=>{r($C(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r($C(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(M5e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(pz,{children:o.map((u,h)=>x(gz,{children:u},h))})})}const b4e=Ze(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function N$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(b4e),a=()=>n(m4e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(d5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const x4e=Ze(e=>e.options,e=>e.shouldLoopback),D$=()=>{const e=$e(),t=Ce(x4e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(N5e,{}),onClick:()=>{e(d7e(!t))}})},jb=()=>te("div",{className:"process-buttons",children:[x(R$,{}),x(D$,{}),x(N$,{})]}),S4e=Ze([e=>e.options,sn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Gb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(S4e),{isReady:r}=Ce(O$),i=C.exports.useRef(null),o=s=>{e(ux(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e($C(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(lF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function w4e(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm2.121.707a1 1 0 0 0-1.414 0L4.16 7.547l5.293 5.293 4.633-4.633a1 1 0 0 0 0-1.414l-3.879-3.879zM8.746 13.547 3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function C4e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function _4e(e,t){e.classList?e.classList.add(t):C4e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function MA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function k4e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=MA(e.className,t):e.setAttribute("class",MA(e.className&&e.className.baseVal||"",t))}const OA={disabled:!1},F$=le.createContext(null);var $$=function(t){return t.scrollTop},Yg="unmounted",xf="exited",Sf="entering",Tp="entered",WC="exiting",Pu=function(e){R7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=xf,o.appearStatus=Sf):l=Tp:r.unmountOnExit||r.mountOnEnter?l=Yg:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Yg?{status:xf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Sf&&a!==Tp&&(o=Sf):(a===Sf||a===Tp)&&(o=WC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Sf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this);a&&$$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:Yg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[iy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||OA.disabled){this.safeSetState({status:Tp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Sf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Tp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:iy.findDOMNode(this);if(!o||OA.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:WC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:iy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Yg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=I7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(F$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Pu.contextType=F$;Pu.propTypes={};function Cp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cp,onEntering:Cp,onEntered:Cp,onExit:Cp,onExiting:Cp,onExited:Cp};Pu.UNMOUNTED=Yg;Pu.EXITED=xf;Pu.ENTERING=Sf;Pu.ENTERED=Tp;Pu.EXITING=WC;const E4e=Pu;var P4e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return _4e(t,r)})},h6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k4e(t,r)})},O_=function(e){R7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},V$=""+new URL("logo.13003d72.png",import.meta.url).href,L4e=Ze(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),qb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce(L4e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(b0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(b0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(u7e(a.current?a.current.scrollTop:0)),t(b0(!1)),t(c7e(!1)))},[t,i]);W$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(l7e(!i)),t(Cr(!0))};return x(H$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:te("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(z$,{}):x(B$,{})})}),!i&&te("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),te("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function T4e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})},other:{header:x(r$,{}),feature:Xr.OTHER,options:x(i$,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x(E_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(x3e,{}),x($b,{}),e?x(Wb,{accordionInfo:t}):null]})}const R_=C.exports.createContext(null),N_=e=>{const{styleClass:t}=e,n=C.exports.useContext(R_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:te("div",{className:"image-upload-button",children:[x(T_,{}),x($f,{size:"lg",children:"Click or Drag and Drop"})]})})},A4e=Ze(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),VC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=O5(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(A4e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(g4e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(s$(!b.target.checked));return te(Xn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(l1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(gv,{children:te(u1e,{children:[x(j7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(z5,{children:te(on,{direction:"column",gap:5,children:[x(ko,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:te(on,{alignItems:"center",children:[x(rh,{mb:0,children:"Don't ask me again"}),x(r_,{checked:!s,onChange:v})]})})]})}),te(U7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),I4e=Ze([e=>e.system,e=>e.options,e=>e.gallery,sn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),U$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(I4e),g=lh(),m=()=>{!u||(h&&e(kl(!1)),e(xv(u)),e(Co("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(e7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(Qv(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(ux(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(P(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(h4e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(p4e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(DW(!l)),I=()=>{!u||(h&&e(kl(!1)),e(q5(u)),e(Co("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(kl(!1)),e(P$(u)),e(Co("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),te("div",{className:"current-image-options",children:[x(Eo,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(B5e,{})}),children:te("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(u6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(u6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(u6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(L_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(h$,{}),size:"sm",children:x(Hf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),te(Eo,{isAttached:!0,children:[x(gt,{icon:x(R5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(z5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(gt,{icon:x(x5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),te(Eo,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(_5e,{}),"aria-label":"Restore Faces"}),children:te("div",{className:"current-image-postprocessing-popover",children:[x(jv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(gt,{icon:x(C5e,{}),"aria-label":"Upscale"}),children:te("div",{className:"current-image-postprocessing-popover",children:[x(Gv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),x(gt,{icon:x(f$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(VC,{image:u,children:x(gt,{icon:x(v$,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},M4e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},j$=mb({name:"gallery",initialState:M4e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ge.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Ay,clearIntermediateImage:RA,removeImage:G$,setCurrentImage:q$,addGalleryImages:O4e,setIntermediateImage:R4e,selectNextImage:D_,selectPrevImage:z_,setShouldPinGallery:N4e,setShouldShowGallery:m0,setGalleryScrollPosition:D4e,setGalleryImageMinimumWidth:pf,setGalleryImageObjectFit:z4e,setShouldHoldGalleryOpen:B4e,setShouldAutoSwitchToNewImages:F4e,setCurrentCategory:Iy,setGalleryWidth:Lg}=j$.actions,$4e=j$.reducer;lt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});lt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});lt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});lt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});lt({displayName:"SunIcon",path:te("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});lt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});lt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});lt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});lt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});lt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});lt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});lt({displayName:"ViewIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});lt({displayName:"ViewOffIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});lt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});lt({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});lt({displayName:"RepeatIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});lt({displayName:"RepeatClockIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});lt({displayName:"EditIcon",path:te("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});lt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});lt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});lt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});lt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});lt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});lt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});lt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});lt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});lt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var K$=lt({displayName:"ExternalLinkIcon",path:te("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});lt({displayName:"LinkIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});lt({displayName:"PlusSquareIcon",path:te("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});lt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});lt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});lt({displayName:"TimeIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});lt({displayName:"ArrowRightIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});lt({displayName:"ArrowLeftIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});lt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});lt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});lt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});lt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});lt({displayName:"EmailIcon",path:te("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});lt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});lt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});lt({displayName:"SpinnerIcon",path:te(Xn,{children:[x("defs",{children:te("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),te("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});lt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});lt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});lt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});lt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});lt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});lt({displayName:"InfoOutlineIcon",path:te("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});lt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});lt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});lt({displayName:"QuestionOutlineIcon",path:te("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});lt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});lt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});lt({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});lt({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});lt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>te(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(H4e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),te(on,{direction:i?"column":"row",children:[te(ko,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?te(Hf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(K$,{mx:"2px"})]}):x(ko,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),W4e=(e,t)=>e.image.uuid===t.image.uuid,V4e=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(DW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:P,fit:E,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,N=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:te(on,{gap:1,direction:"column",width:"100%",children:[te(on,{gap:2,children:[x(ko,{fontWeight:"semibold",children:"File:"}),te(Hf,{href:e.url,isExternal:!0,children:[e.url,x(K$,{mx:"2px"})]})]}),Object.keys(r).length>0?te(Xn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&P!==void 0&&x(tr,{label:"Fix faces strength",value:P,onClick:()=>n(N3(P))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(h8(O))}),i==="esrgan"&&P!==void 0&&x(tr,{label:"Upscaling strength",value:P,onClick:()=>n(p8(P))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:A3(s),onClick:()=>n(ux(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(Qv(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(AW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(EW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(PW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:G5(u),onClick:()=>n(NW(G5(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(IW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(MW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(TW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(LW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(xv(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(g8(L))}),i==="img2img"&&P&&x(tr,{label:"Image to image strength",value:P,onClick:()=>n(f8(P))}),E&&x(tr,{label:"Image to image fit",value:E,onClick:()=>n(RW(E))}),o&&o.length>0&&te(Xn,{children:[x($f,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:H,strength:W}=D;return te(on,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:H,onClick:()=>n(h8(H))}),x(tr,{label:"Strength",value:W,onClick:()=>n(p8(W))})]},z)}else if(D.type==="gfpgan"){const{strength:H}=D;return te(on,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:H,onClick:()=>{n(N3(H)),n(D3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:H,fidelity:W}=D;return te(on,{pl:"2rem",gap:1,direction:"column",children:[x(ko,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:H,onClick:()=>{n(N3(H)),n(D3("codeformer"))}}),W&&x(tr,{label:"Fidelity",value:W,onClick:()=>{n(OW(W)),n(D3("codeformer"))}})]},z)}})]}),te(on,{gap:2,direction:"column",children:[te(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(L_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(ko,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(dz,{width:"100%",pt:10,children:x(ko,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},W4e),Y$=Ze([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function U4e(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(Y$),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(z_())},h=()=>{e(D_())},g=()=>{e(kl(!0))};return te("div",{className:"current-image-preview",children:[i&&x(ib,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&te("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(c$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(V4e,{image:i,styleClass:"current-image-metadata"})]})}const j4e=Ze([e=>e.gallery,e=>e.options,sn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),B_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(j4e);return x("div",{className:"current-image-area","data-tab-name":t,children:e?te(Xn,{children:[x(U$,{}),x(U4e,{})]}):x("div",{className:"current-image-display-placeholder",children:x(c5e,{})})})},Z$=()=>{const e=C.exports.useContext(R_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(T_,{}),onClick:e||void 0})};function G4e(){const e=Ce(i=>i.options.initialImage),t=$e(),n=lh(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(zW())};return te(Xn,{children:[te("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Z$,{})]}),e&&x("div",{className:"init-image-preview",children:x(ib,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const q4e=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return te("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(G4e,{})}):x(N_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(B_,{})})]})};function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Y4e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},nbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],FA="__resizable_base__",X$=function(e){Q4e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(FA):o.className+=FA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||J4e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return p6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?p6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?p6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&_p("left",o),s=i&&_p("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var P=(m-b)*this.ratio+w,E=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,P),O=Math.min(g,E),N=Math.max(m,k),D=Math.min(v,L);n=Oy(n,I,O),r=Oy(r,N,D)}else n=Oy(n,h,g),r=Oy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&ebe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Ry(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ry(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Ry(n)?n.touches[0].clientX:n.clientX,h=Ry(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,P=this.getParentSize(),E=tbe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=BA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=BA(L,this.props.snap.y,this.props.snapGap));var N=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=N.newWidth,L=N.newHeight,this.props.grid){var D=zA(I,this.props.grid[0]),z=zA(L,this.props.grid[1]),H=this.props.snapGap||0;I=H===0||Math.abs(D-I)<=H?D:I,L=H===0||Math.abs(z-L)<=H?z:L}var W={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/P.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/P.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var ne={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?ne.flexBasis=ne.width:this.flexDir==="column"&&(ne.flexBasis=ne.height),Il.exports.flushSync(function(){r.setState(ne)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(X4e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return nbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return te(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Kv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,P=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:P},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,rbe(i,...t)]}function rbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q$(...e){return t=>e.forEach(n=>ibe(n,t))}function Ha(...e){return C.exports.useCallback(Q$(...e),e)}const yv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(abe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(UC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(UC,An({},r,{ref:t}),n)});yv.displayName="Slot";const UC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...sbe(r,n.props),ref:Q$(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});UC.displayName="SlotClone";const obe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function abe(e){return C.exports.isValidElement(e)&&e.type===obe}function sbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const lbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=lbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?yv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function J$(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function eH(e){const t=e+"CollectionProvider",[n,r]=Kv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:b,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,b)=>{const{scope:w,children:P}=v,E=o(s,w),k=Ha(b,E.collectionRef);return le.createElement(yv,{ref:k},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=le.forwardRef((v,b)=>{const{scope:w,children:P,...E}=v,k=le.useRef(null),L=Ha(b,k),I=o(u,w);return le.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),le.createElement(yv,{[h]:"",ref:L},P)});function m(v){const b=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const ube=C.exports.createContext(void 0);function tH(e){const t=C.exports.useContext(ube);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function cbe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const jC="dismissableLayer.update",dbe="dismissableLayer.pointerDownOutside",fbe="dismissableLayer.focusOutside";let $A;const hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=P.indexOf(E),L=g?P.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,N=gbe(z=>{const H=z.target,W=[...h.branches].some(Y=>Y.contains(H));!O||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=mbe(z=>{const H=z.target;[...h.branches].some(Y=>Y.contains(H))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return cbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&($A=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),HA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=$A)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),HA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(jC,z),()=>document.removeEventListener(jC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,N.onPointerDownCapture)}))});function gbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nH(dbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function mbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&nH(fbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function HA(){const e=new CustomEvent(jC);document.dispatchEvent(e)}function nH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?J$(i,o):i.dispatchEvent(o)}let g6=0;function vbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:WA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:WA()),g6++,()=>{g6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),g6--}},[])}function WA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const m6="focusScope.autoFocusOnMount",v6="focusScope.autoFocusOnUnmount",VA={bubbles:!1,cancelable:!0},ybe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:wf(g.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||wf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){jA.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(m6,VA);s.addEventListener(m6,u),s.dispatchEvent(E),E.defaultPrevented||(bbe(_be(rH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(m6,u),setTimeout(()=>{const E=new CustomEvent(v6,VA);s.addEventListener(v6,h),s.dispatchEvent(E),E.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(v6,h),jA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const k=w.currentTarget,[L,I]=xbe(k);L&&I?!w.shiftKey&&E===I?(w.preventDefault(),n&&wf(L,{select:!0})):w.shiftKey&&E===L&&(w.preventDefault(),n&&wf(I,{select:!0})):E===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function bbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function xbe(e){const t=rH(e),n=UA(t,e),r=UA(t.reverse(),e);return[n,r]}function rH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function UA(e,t){for(const n of e)if(!Sbe(n,{upTo:t}))return n}function Sbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wbe(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wbe(e)&&t&&e.select()}}const jA=Cbe();function Cbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=GA(e,t),e.unshift(t)},remove(t){var n;e=GA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function GA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _be(e){return e.filter(t=>t.tagName!=="A")}const z0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},kbe=I6["useId".toString()]||(()=>{});let Ebe=0;function Pbe(e){const[t,n]=C.exports.useState(kbe());return z0(()=>{e||n(r=>r??String(Ebe++))},[e]),e||(t?`radix-${t}`:"")}function e1(e){return e.split("-")[0]}function Kb(e){return e.split("-")[1]}function t1(e){return["top","bottom"].includes(e1(e))?"x":"y"}function F_(e){return e==="y"?"height":"width"}function qA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=t1(t),l=F_(s),u=r[l]/2-i[l]/2,h=e1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Kb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Lbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=qA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=iH(r),h={x:i,y:o},g=t1(a),m=Kb(a),v=F_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=E/2-k/2,N=u[w],D=I-b[v]-u[P],z=I/2-b[v]/2+O,H=GC(N,z,D),de=(m==="start"?u[w]:u[P])>0&&z!==H&&s.reference[v]<=s.floating[v]?zMbe[t])}function Obe(e,t,n){n===void 0&&(n=!1);const r=Kb(e),i=t1(e),o=F_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X5(a)),{main:a,cross:X5(a)}}const Rbe={start:"end",end:"start"};function YA(e){return e.replace(/start|end/g,t=>Rbe[t])}const Nbe=["top","right","bottom","left"];function Dbe(e){const t=X5(e);return[YA(e),t,YA(t)]}const zbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=e1(r),E=g||(w===a||!v?[X5(a)]:Dbe(a)),k=[a,...E],L=await Z5(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:H,cross:W}=Obe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[H],L[W])}if(O=[...O,{placement:r,overflows:I}],!I.every(H=>H<=0)){var N,D;const H=((N=(D=i.flip)==null?void 0:D.index)!=null?N:0)+1,W=k[H];if(W)return{data:{index:H,overflows:O},reset:{placement:W}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(ne=>ne>0).reduce((ne,ie)=>ne+ie,0)]).sort((j,ne)=>j[1]-ne[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function ZA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XA(e){return Nbe.some(t=>e[t]>=0)}const Bbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Z5(r,{...n,elementContext:"reference"}),a=ZA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:XA(a)}}}case"escaped":{const o=await Z5(r,{...n,altBoundary:!0}),a=ZA(o,i.floating);return{data:{escapedOffsets:a,escaped:XA(a)}}}default:return{}}}}};async function Fbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=e1(n),s=Kb(n),l=t1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const $be=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Fbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function oH(e){return e==="x"?"y":"x"}const Hbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:k}=P;return{x:E,y:k}}},...l}=e,u={x:n,y:r},h=await Z5(t,l),g=t1(e1(i)),m=oH(g);let v=u[g],b=u[m];if(o){const P=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=v+h[P],L=v-h[E];v=GC(k,v,L)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+h[P],L=b-h[E];b=GC(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Wbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=t1(i),m=oH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",N=o.reference[g]-o.floating[O]+P.mainAxis,D=o.reference[g]+o.reference[O]-P.mainAxis;vD&&(v=D)}if(u){var E,k,L,I;const O=g==="y"?"width":"height",N=["top","left"].includes(e1(i)),D=o.reference[m]-o.floating[O]+(N&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(N?0:P.crossAxis),z=o.reference[m]+o.reference[O]+(N?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(N?P.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function aH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Lu(e){if(e==null)return window;if(!aH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Lu(e).getComputedStyle(e)}function Cu(e){return aH(e)?"":e?(e.nodeName||"").toLowerCase():""}function sH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Tl(e){return e instanceof Lu(e).HTMLElement}function ud(e){return e instanceof Lu(e).Element}function Vbe(e){return e instanceof Lu(e).Node}function $_(e){if(typeof ShadowRoot>"u")return!1;const t=Lu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Yb(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Ube(e){return["table","td","th"].includes(Cu(e))}function lH(e){const t=/firefox/i.test(sH()),n=Yv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function uH(){return!/^((?!chrome|android).)*safari/i.test(sH())}const QA=Math.min,Pm=Math.max,Q5=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Tl(e)&&(l=e.offsetWidth>0&&Q5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Q5(s.height)/e.offsetHeight||1);const h=ud(e)?Lu(e):window,g=!uH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function xd(e){return((Vbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zb(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cH(e){return _u(xd(e)).left+Zb(e).scrollLeft}function jbe(e){const t=_u(e);return Q5(t.width)!==e.offsetWidth||Q5(t.height)!==e.offsetHeight}function Gbe(e,t,n){const r=Tl(t),i=xd(t),o=_u(e,r&&jbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||Yb(i))&&(a=Zb(t)),Tl(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||($_(e)?e.host:null)||xd(e)}function JA(e){return!Tl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function qbe(e){let t=dH(e);for($_(t)&&(t=t.host);Tl(t)&&!["html","body"].includes(Cu(t));){if(lH(t))return t;t=t.parentNode}return null}function qC(e){const t=Lu(e);let n=JA(e);for(;n&&Ube(n)&&getComputedStyle(n).position==="static";)n=JA(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!lH(n))?t:n||qbe(e)||t}function eI(e){if(Tl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Kbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Tl(n),o=xd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||Yb(o))&&(a=Zb(n)),Tl(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Ybe(e,t){const n=Lu(e),r=xd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=uH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Zbe(e){var t;const n=xd(e),r=Zb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Pm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Pm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+cH(e);const l=-r.scrollTop;return Yv(i||n).direction==="rtl"&&(s+=Pm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fH(e){const t=dH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Tl(t)&&Yb(t)?t:fH(t)}function J5(e,t){var n;t===void 0&&(t=[]);const r=fH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Lu(r),a=i?[o].concat(o.visualViewport||[],Yb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(J5(a))}function Xbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&$_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Qbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function tI(e,t,n){return t==="viewport"?Y5(Ybe(e,n)):ud(t)?Qbe(t,n):Y5(Zbe(xd(e)))}function Jbe(e){const t=J5(e),r=["absolute","fixed"].includes(Yv(e).position)&&Tl(e)?qC(e):e;return ud(r)?t.filter(i=>ud(i)&&Xbe(i,r)&&Cu(i)!=="body"):[]}function exe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Jbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=tI(t,h,i);return u.top=Pm(g.top,u.top),u.right=QA(g.right,u.right),u.bottom=QA(g.bottom,u.bottom),u.left=Pm(g.left,u.left),u},tI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const txe={getClippingRect:exe,convertOffsetParentRelativeRectToViewportRelativeRect:Kbe,isElement:ud,getDimensions:eI,getOffsetParent:qC,getDocumentElement:xd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Gbe(t,qC(n),r),floating:{...eI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Yv(e).direction==="rtl"};function nxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?J5(e):[],...J5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?_u(e):null;s&&b();function b(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const rxe=(e,t,n)=>Lbe(e,t,{platform:txe,...n});var KC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function YC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!YC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!YC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ixe(e){const t=C.exports.useRef(e);return KC(()=>{t.current=e}),t}function oxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);YC(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||rxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Il.exports.flushSync(()=>{h(L)})})},[g,n,r]);KC(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);KC(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),P=C.exports.useCallback(L=>{o.current=L,w()},[w]),E=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:P,floating:E}),[u,v,k,P,E])}const axe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?KA({element:t.current,padding:n}).fn(i):{}:t?KA({element:t,padding:n}).fn(i):{}}}};function sxe(e){const[t,n]=C.exports.useState(void 0);return z0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hH="Popper",[H_,pH]=Kv(hH),[lxe,gH]=H_(hH),uxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(lxe,{scope:t,anchor:r,onAnchorChange:i},n)},cxe="PopperAnchor",dxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gH(cxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),e4="PopperContent",[fxe,nEe]=H_(e4),[hxe,pxe]=H_(e4,{hasParent:!1,positionUpdateFns:new Set}),gxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,N=gH(e4,h),[D,z]=C.exports.useState(null),H=Ha(t,Et=>z(Et)),[W,Y]=C.exports.useState(null),de=sxe(W),j=(n=de?.width)!==null&&n!==void 0?n:0,ne=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),J=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},q=Array.isArray(P)?P:[P],V=q.length>0,G={padding:J,boundary:q.filter(vxe),altBoundary:V},{reference:Q,floating:X,strategy:me,x:xe,y:Se,placement:He,middlewareData:Ue,update:ut}=oxe({strategy:"fixed",placement:ie,whileElementsMounted:nxe,middleware:[$be({mainAxis:m+ne,alignmentAxis:b}),I?Hbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Wbe():void 0,...G}):void 0,W?axe({element:W,padding:w}):void 0,I?zbe({...G}):void 0,yxe({arrowWidth:j,arrowHeight:ne}),L?Bbe({strategy:"referenceHidden"}):void 0].filter(mxe)});z0(()=>{Q(N.anchor)},[Q,N.anchor]);const Xe=xe!==null&&Se!==null,[et,tt]=mH(He),at=(i=Ue.arrow)===null||i===void 0?void 0:i.x,At=(o=Ue.arrow)===null||o===void 0?void 0:o.y,wt=((a=Ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,dt]=C.exports.useState();z0(()=>{D&&dt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ct}=pxe(e4,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ct.add(ut),()=>{ct.delete(ut)}},[xt,ct,ut]),C.exports.useLayoutEffect(()=>{xt&&Xe&&Array.from(ct).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,Xe,ct]);const kn={"data-side":et,"data-align":tt,...O,ref:H,style:{...O.style,animation:Xe?void 0:"none",opacity:(s=Ue.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Ue.transformOrigin)===null||l===void 0?void 0:l.x,(u=Ue.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(fxe,{scope:h,placedSide:et,onArrowChange:Y,arrowX:at,arrowY:At,shouldHideArrow:wt},xt?C.exports.createElement(hxe,{scope:h,hasParent:!0,positionUpdateFns:ct},C.exports.createElement(wu.div,kn)):C.exports.createElement(wu.div,kn)))});function mxe(e){return e!==void 0}function vxe(e){return e!==null}const yxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=mH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?P:`${E}px`,I=`${-v}px`):b==="top"?(L=g?P:`${E}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?P:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?P:`${k}px`),{data:{x:L,y:I}}}});function mH(e){const[t,n="center"]=e.split("-");return[t,n]}const bxe=uxe,xxe=dxe,Sxe=gxe;function wxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vH=e=>{const{present:t,children:n}=e,r=Cxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};vH.displayName="Presence";function Cxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=wxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Dy(r.current);o.current=s==="mounted"?u:"none"},[s]),z0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Dy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),z0(()=>{if(t){const u=g=>{const v=Dy(r.current).includes(g.animationName);g.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Dy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Dy(e){return e?.animationName||"none"}function _xe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=kxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function kxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const y6="rovingFocusGroup.onEntryFocus",Exe={bubbles:!1,cancelable:!0},W_="RovingFocusGroup",[ZC,yH,Pxe]=eH(W_),[Lxe,bH]=Kv(W_,[Pxe]),[Txe,Axe]=Lxe(W_),Ixe=C.exports.forwardRef((e,t)=>C.exports.createElement(ZC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(ZC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Mxe,An({},e,{ref:t}))))),Mxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=tH(o),[b=null,w]=_xe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),k=Ll(u),L=yH(n),I=C.exports.useRef(!1),[O,N]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(y6,k),()=>D.removeEventListener(y6,k)},[k]),C.exports.createElement(Txe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>N(D=>D-1),[])},C.exports.createElement(wu.div,An({tabIndex:P||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!P){const H=new CustomEvent(y6,Exe);if(D.currentTarget.dispatchEvent(H),!H.defaultPrevented){const W=L().filter(ie=>ie.focusable),Y=W.find(ie=>ie.active),de=W.find(ie=>ie.id===b),ne=[Y,de,...W].filter(Boolean).map(ie=>ie.ref.current);xH(ne)}}I.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Oxe="RovingFocusGroupItem",Rxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Pbe(),s=Axe(Oxe,n),l=s.currentTabStopId===a,u=yH(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(ZC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=zxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Bxe(w,P+1):w.slice(P+1)}setTimeout(()=>xH(w))}})})))}),Nxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zxe(e,t,n){const r=Dxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Nxe[r]}function xH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Bxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Fxe=Ixe,$xe=Rxe,Hxe=["Enter"," "],Wxe=["ArrowDown","PageUp","Home"],SH=["ArrowUp","PageDown","End"],Vxe=[...Wxe,...SH],Xb="Menu",[XC,Uxe,jxe]=eH(Xb),[dh,wH]=Kv(Xb,[jxe,pH,bH]),V_=pH(),CH=bH(),[Gxe,Qb]=dh(Xb),[qxe,U_]=dh(Xb),Kxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=V_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ll(o),m=tH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(bxe,s,C.exports.createElement(Gxe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(qxe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Yxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=V_(n);return C.exports.createElement(xxe,An({},i,r,{ref:t}))}),Zxe="MenuPortal",[rEe,Xxe]=dh(Zxe,{forceMount:void 0}),td="MenuContent",[Qxe,_H]=dh(td),Jxe=C.exports.forwardRef((e,t)=>{const n=Xxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Qb(td,e.__scopeMenu),a=U_(td,e.__scopeMenu);return C.exports.createElement(XC.Provider,{scope:e.__scopeMenu},C.exports.createElement(vH,{present:r||o.open},C.exports.createElement(XC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(eSe,An({},i,{ref:t})):C.exports.createElement(tSe,An({},i,{ref:t})))))}),eSe=C.exports.forwardRef((e,t)=>{const n=Qb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return jz(o)},[]),C.exports.createElement(kH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),tSe=C.exports.forwardRef((e,t)=>{const n=Qb(td,e.__scopeMenu);return C.exports.createElement(kH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=Qb(td,n),P=U_(td,n),E=V_(n),k=CH(n),L=Uxe(n),[I,O]=C.exports.useState(null),N=C.exports.useRef(null),D=Ha(t,N,w.onContentChange),z=C.exports.useRef(0),H=C.exports.useRef(""),W=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),ne=v?IB:C.exports.Fragment,ie=v?{as:yv,allowPinchZoom:!0}:void 0,J=V=>{var G,Q;const X=H.current+V,me=L().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(G=me.find(Xe=>Xe.ref.current===xe))===null||G===void 0?void 0:G.textValue,He=me.map(Xe=>Xe.textValue),Ue=cSe(He,X,Se),ut=(Q=me.find(Xe=>Xe.textValue===Ue))===null||Q===void 0?void 0:Q.ref.current;(function Xe(et){H.current=et,window.clearTimeout(z.current),et!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(X),ut&&setTimeout(()=>ut.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),vbe();const q=C.exports.useCallback(V=>{var G,Q;return de.current===((G=Y.current)===null||G===void 0?void 0:G.side)&&fSe(V,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(Qxe,{scope:n,searchRef:H,onItemEnter:C.exports.useCallback(V=>{q(V)&&V.preventDefault()},[q]),onItemLeave:C.exports.useCallback(V=>{var G;q(V)||((G=N.current)===null||G===void 0||G.focus(),O(null))},[q]),onTriggerLeave:C.exports.useCallback(V=>{q(V)&&V.preventDefault()},[q]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(V=>{Y.current=V},[])},C.exports.createElement(ne,ie,C.exports.createElement(ybe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,V=>{var G;V.preventDefault(),(G=N.current)===null||G===void 0||G.focus()}),onUnmountAutoFocus:a},C.exports.createElement(pbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Fxe,An({asChild:!0},k,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:V=>{P.isUsingKeyboardRef.current||V.preventDefault()}}),C.exports.createElement(Sxe,An({role:"menu","aria-orientation":"vertical","data-state":sSe(w.open),"data-radix-menu-content":"",dir:P.dir},E,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,V=>{const Q=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,me=V.key.length===1;Q&&(V.key==="Tab"&&V.preventDefault(),!X&&me&&J(V.key));const xe=N.current;if(V.target!==xe||!Vxe.includes(V.key))return;V.preventDefault();const He=L().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);SH.includes(V.key)&&He.reverse(),lSe(He)}),onBlur:qn(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:qn(e.onPointerMove,JC(V=>{const G=V.target,Q=j.current!==V.clientX;if(V.currentTarget.contains(G)&&Q){const X=V.clientX>j.current?"right":"left";de.current=X,j.current=V.clientX}}))})))))))}),QC="MenuItem",nI="menu.itemSelect",nSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=U_(QC,e.__scopeMenu),s=_H(QC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(nI,{bubbles:!0,cancelable:!0});g.addEventListener(nI,v=>r?.(v),{once:!0}),J$(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(rSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Hxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),rSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_H(QC,n),s=CH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(XC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement($xe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,JC(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,JC(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),iSe="MenuRadioGroup";dh(iSe,{value:void 0,onValueChange:()=>{}});const oSe="MenuItemIndicator";dh(oSe,{checked:!1});const aSe="MenuSub";dh(aSe);function sSe(e){return e?"open":"closed"}function lSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=uSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function dSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function fSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dSe(n,t)}function JC(e){return t=>t.pointerType==="mouse"?e(t):void 0}const hSe=Kxe,pSe=Yxe,gSe=Jxe,mSe=nSe,EH="ContextMenu",[vSe,iEe]=Kv(EH,[wH]),Jb=wH(),[ySe,PH]=vSe(EH),bSe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=Jb(t),u=Ll(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(ySe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(hSe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},xSe="ContextMenuTrigger",SSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(xSe,n),o=Jb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(pSe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,zy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,zy(u)),onPointerCancel:qn(e.onPointerCancel,zy(u)),onPointerUp:qn(e.onPointerUp,zy(u))})))}),wSe="ContextMenuContent",CSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PH(wSe,n),o=Jb(n),a=C.exports.useRef(!1);return C.exports.createElement(gSe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),_Se=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Jb(n);return C.exports.createElement(mSe,An({},i,r,{ref:t}))});function zy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const kSe=bSe,ESe=SSe,PSe=CSe,wc=_Se,LSe=Ze([e=>e.gallery,e=>e.options,sn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),TSe=Ze([e=>e.options,e=>e.gallery,e=>e.system,sn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),ASe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,ISe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce(TSe),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=lh(),w=()=>v(!0),P=()=>v(!1),E=()=>{s.metadata&&t(ux(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(Qv(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(kl(!1)),t(xv(s)),n!=="img2img"&&t(Co("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(kl(!1)),t(q5(s)),n!=="inpainting"&&t(Co("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(kl(!1)),t(P$(s)),n!=="outpainting"&&t(Co("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},N=()=>{g&&t(o7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(Co("img2img")),t(a7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return te(kSe,{children:[x(ESe,{children:te(md,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:P,children:[x(ib,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:w5e,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(VC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(F5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),te(PSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(wc,{onClickCapture:E,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(wc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(wc,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(wc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(wc,{onClickCapture:L,children:"Send to Image To Image"}),x(wc,{onClickCapture:I,children:"Send to Inpainting"}),x(wc,{onClickCapture:O,children:"Send to Outpainting"}),x(VC,{image:s,children:x(wc,{"data-warning":!0,children:"Delete Image"})})]})]})},ASe),MSe=320;function LH(){const e=$e(),t=lh(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:P}=Ce(LSe),[E,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,N]=C.exports.useState(w>=MSe);C.exports.useEffect(()=>{if(!!o){if(P){e(Lg(400)),k(400),I(400);return}h==="inpainting"?(e(Lg(190)),k(190),I(190)):h==="img2img"?(e(Lg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Lg(Math.min(Math.max(Number(w),0),590))),I(590)),e(Cr(!0))}},[e,h,o,w,P]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,P]);const D=C.exports.useRef(null),z=C.exports.useRef(null),H=C.exports.useRef(null),W=()=>{e(N4e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(m0(!0)),o&&e(Cr(!0))},j=()=>{e(m0(!1)),e(D4e(z.current?z.current.scrollTop:0)),e(B4e(!1))},ne=()=>{e(HC(r))},ie=G=>{e(pf(G)),e(Cr(!0))},J=()=>{H.current=window.setTimeout(()=>j(),500)},q=()=>{H.current&&window.clearTimeout(H.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(z_())}),vt("right",()=>{e(D_())}),vt("shift+g",()=>{W(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(m0(!1)),e(Cr(!0)))},[o]);const V=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const G=l+V;G<=256?(e(pf(G)),t({title:`Gallery Thumbnail Size set to ${G}`,status:"success",duration:1e3,isClosable:!0})):(e(pf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const G=l-V;G>32?(e(pf(G)),t({title:`Gallery Thumbnail Size set to ${G}`,status:"success",duration:1e3,isClosable:!0})):(e(pf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(pf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),W$(D,j,!o),x(H$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:J,onMouseEnter:o?void 0:q,onMouseOver:o?void 0:q,children:te(X$,{minWidth:E,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(G,Q,X,me)=>{e(Lg(Ge.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(G,Q,X,me)=>{const xe=Ge.clamp(Number(w)+me.width,0,Number(L));xe>=280&&!O?N(!0):xe<280&&O&&N(!1),xe>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[te("div",{className:"image-gallery-header",children:[x(Eo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?te(Xn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Iy("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Iy("user")),children:"User"})]}):te(Xn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(k5e,{}),onClick:()=>e(Iy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(W5e,{}),onClick:()=>e(Iy("user"))})]})}),te("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(A_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:te("div",{className:"image-gallery-settings-popover",children:[te("div",{children:[x(ch,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(pf(64)),icon:x(k_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(z4e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:G=>e(F4e(G.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?x(z$,{}):x(B$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?te(Xn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(G=>{const{uuid:Q}=G;return x(ISe,{image:G,isSelected:i===Q},Q)})}),x(Ra,{onClick:ne,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):te("div",{className:"image-gallery-container-placeholder",children:[x(u$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const OSe=Ze([e=>e.options,sn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ex=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(OSe),l=()=>{t(s7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:te("div",{className:"workarea-main",children:[n,te("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(K4e,{})})})]}),!a&&x(LH,{})]})})};function RSe(){return x(ex,{optionsPanel:x(T4e,{}),children:x(q4e,{})})}const NSe=Ze(jt,e=>e.shouldDarkenOutsideBoundingBox);function DSe(){const e=$e(),t=Ce(NSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(T$(!t))},styleClass:"inpainting-bounding-box-darken"})}const zSe=Ze(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function rI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(zSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Kg({...a,width:Math.floor(g)})),t=="height"&&r(Kg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Kg({...a,width:Math.floor(s)})),t=="height"&&r(Kg({...a,height:Math.floor(s)}))};return x(ch,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const BSe=Ze(jt,e=>e.shouldLockBoundingBox);function FSe(){const e=Ce(BSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(A$(!e))},styleClass:"inpainting-bounding-box-darken"})}const $Se=Ze(jt,e=>e.shouldShowBoundingBox);function HSe(){const e=Ce($Se),t=$e();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(n$,{size:22}):x(t$,{size:22}),onClick:()=>t(I_(!e)),background:"none",padding:0})}const WSe=()=>te("div",{className:"inpainting-bounding-box-settings",children:[te("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(HSe,{})]}),te("div",{className:"inpainting-bounding-box-settings-items",children:[x(rI,{dimension:"width",label:"Box W"}),x(rI,{dimension:"height",label:"Box H"}),te(on,{alignItems:"center",justifyContent:"space-between",children:[x(DSe,{}),x(FSe,{})]})]})]}),VSe=Ze(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function USe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(VSe),n=$e();return te(on,{alignItems:"center",columnGap:"1rem",children:[x(ch,{label:"Inpaint Replace",value:e,onChange:r=>{n(LA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(LA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(i4e(r.target.checked))})]})}const jSe=Ze(jt,e=>{const{pastObjects:t,futureObjects:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function GSe(){const e=$e(),t=lh(),{mayClearBrushHistory:n}=Ce(jSe);return x(ul,{onClick:()=>{e(r4e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function TH(){return te(Xn,{children:[x(USe,{}),x(WSe,{}),x(GSe,{})]})}function qSe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x(E_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(TH,{}),x($b,{}),e&&x(Wb,{accordionInfo:t})]})}function tx(){return(tx=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function e8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var B0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(iI(i.current,P,s.current)):w(!1)},b=function(){return w(!1)};function w(P){var E=l.current,k=t8(i.current),L=P?k.addEventListener:k.removeEventListener;L(E?"touchmove":"mousemove",v),L(E?"touchend":"mouseup",b)}return[function(P){var E=P.nativeEvent,k=i.current;if(k&&(oI(E),!function(I,O){return O&&!Lm(I)}(E,l.current)&&k)){if(Lm(E)){l.current=!0;var L=E.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(iI(k,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...tx({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),nx=function(e){return e.filter(Boolean).join(" ")},G_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=nx(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},IH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},n8=function(e){var t=IH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},b6=function(e){var t=IH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},KSe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},YSe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},ZSe=le.memo(function(e){var t=e.hue,n=e.onChange,r=nx(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(j_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:B0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(G_,{className:"react-colorful__hue-pointer",left:t/360,color:n8({h:t,s:100,v:100,a:1})})))}),XSe=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:n8({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(j_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:B0(t.s+100*i.left,0,100),v:B0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(G_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:n8(t)})))}),MH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function QSe(e,t,n){var r=e8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;MH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var JSe=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,e6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aI=new Map,t6e=function(e){JSe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aI.set(t,n);var r=e6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},n6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+b6(Object.assign({},n,{a:0}))+", "+b6(Object.assign({},n,{a:1}))+")"},o=nx(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(j_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:B0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(G_,{className:"react-colorful__alpha-pointer",left:n.a,color:b6(n)})))},r6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);t6e(s);var l=QSe(n,i,o),u=l[0],h=l[1],g=nx(["react-colorful",t]);return le.createElement("div",tx({},a,{ref:s,className:g}),x(XSe,{hsva:u,onChange:h}),x(ZSe,{hue:u.h,onChange:h}),le.createElement(n6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},i6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:YSe,fromHsva:KSe,equal:MH},o6e=function(e){return le.createElement(r6e,tx({},e,{colorModel:i6e}))};const q_=e=>{const{styleClass:t,...n}=e;return x(o6e,{className:`invokeai__color-picker ${t}`,...n})},a6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function s6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(a6e),r=$e(),i=o=>{r(_$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(gt,{"aria-label":"Mask Color",icon:x(I5e,{}),isDisabled:!e,cursor:"pointer"}),children:x(q_,{color:t,onChange:i})})}const l6e=Ze([jt,sn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function u6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(l6e),i=()=>e(Su("brush")),o=()=>{e(c6(!0))},a=()=>{e(c6(!1))},s=l=>{e(c6(!0)),e(x$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(g$,{}),onClick:i,"data-selected":t==="brush"}),children:te("div",{className:"inpainting-brush-options",children:[x(ch,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(s6e,{})]})})}const c6e=Ze([jt,sn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function d6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(c6e),r=$e(),i=()=>r(Su("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(gt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(p$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const f6e=Ze([jt,sn],(e,t)=>{const{pastObjects:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function OH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(f6e),r=()=>{e(t4e())};return vt(["meta+z","control+z"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Undo",tooltip:"Undo",icon:x($5e,{}),onClick:r,isDisabled:!t})}const h6e=Ze([jt,sn],(e,t)=>{const{futureObjects:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function RH(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(h6e),r=()=>{e(n4e())};return vt(["meta+shift+z","control+shift+z","control+y","meta+y"],i=>{i.preventDefault(),r()},{enabled:t},[n,t]),x(gt,{"aria-label":"Redo",tooltip:"Redo",icon:x(D5e,{}),onClick:r,isDisabled:!t})}const p6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n,objects:r}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(Vb).length===0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function g6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(p6e),r=$e(),i=lh(),o=()=>{r(k$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(gt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(O5e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const m6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function v6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(m6e),r=()=>e(C$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(gt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(n$,{size:22}):x(t$,{size:22}),onClick:r})}const y6e=Ze([jt,sn],(e,t)=>{const{isMaskEnabled:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function b6e(){const{shouldInvertMask:e,isMaskEnabled:t,activeTabName:n}=Ce(y6e),r=$e(),i=()=>r(e4e(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(gt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(s5e,{size:22}):x(l5e,{size:22}),onClick:i,isDisabled:!t})}const x6e=Ze(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),S6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(x6e);return x(gt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(L5e,{}):x(H5e,{}),"data-selected":t,onClick:()=>{e(A$(!t))}})},w6e=Ze(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),C6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(w6e);return x(gt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(V5e,{}),"data-alert":!t,onClick:()=>{e(I_(!t))}})},_6e=Ze([jt,sn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});function k6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(_6e),r=$e(),i=()=>r(Su("eraser"));return vt("shift+e",o=>{o.preventDefault(),i()},{enabled:!0},[n,t]),x(gt,{"aria-label":"Erase Canvas (Shift+E)",tooltip:"Erase Canvas (Shift+E)",icon:x(w4e,{}),fontSize:18,onClick:i,"data-selected":e==="eraser",isDisabled:!t})}var E6e=Math.PI/180;function P6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const v0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:v0,version:"8.3.13",isBrowser:P6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*E6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:v0.document,_injectGlobal(e){v0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var L6e="[object Array]",T6e="[object Number]",A6e="[object String]",I6e="[object Boolean]",M6e=Math.PI/180,O6e=180/Math.PI,x6="#",R6e="",N6e="0",D6e="Konva warning: ",sI="Konva error: ",z6e="rgb(",S6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},B6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,By=[];const F6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===L6e},_isNumber(e){return Object.prototype.toString.call(e)===T6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===A6e},_isBoolean(e){return Object.prototype.toString.call(e)===I6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){By.push(e),By.length===1&&F6e(function(){const t=By;By=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(x6,R6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=N6e+e;return x6+e},getRGB(e){var t;return e in S6?(t=S6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===x6?this._hexToRgb(e.substring(1)):e.substr(0,4)===z6e?(t=B6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=S6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function DH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Sd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function K_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function n1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function zH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function $6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Sd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function H6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Sd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Tg="get",Ag="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Tg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Ag+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Ag+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Tg+a(t),l=Ag+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Ag+n,i=Tg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Tg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Tg+fe._capitalize(n),a=Ag+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function W6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=V6e+u.join(lI)+U6e)):(o+=s.property,t||(o+=Y6e+s.val)),o+=q6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=X6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=uI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=W6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var I3="absoluteOpacity",$y="allEventListeners",iu="absoluteTransform",cI="absoluteScale",Ig="canvas",twe="Change",nwe="children",rwe="konva",r8="listening",dI="mouseenter",fI="mouseleave",hI="set",pI="Shape",M3=" ",gI="stage",kc="transform",iwe="Stage",i8="visible",owe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M3);let awe=1;class Be{constructor(t){this._id=awe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===iu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===iu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(M3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ig)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===iu&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ig),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new y0({pixelRatio:a,width:i,height:o}),v=new y0({pixelRatio:a,width:0,height:0}),b=new Y_({pixelRatio:g,width:i,height:o}),w=m.getContext(),P=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Ig),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(I3),this._clearSelfAndDescendantCache(cI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ig,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ig)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==nwe&&(r=hI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(r8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(i8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==iwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(iu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(iu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(I3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",kp=e=>{const t=Jg(e);if(t==="pointer")return ot.pointerEventsEnabled&&C6.pointer;if(t==="touch")return C6.touch;if(t==="mouse")return C6.mouse};function vI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const hwe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",O3=[];class ox extends aa{constructor(t){super(vI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),O3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{vI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===lwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&O3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(hwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new y0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+mI,this.content.style.height=n+mI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rdwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||fwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=kp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=kp(t.type),r=Jg(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=kp(t.type),r=Jg(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=kp(t.type),r=Jg(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=w6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=kp(t.type),r=Jg(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=w6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(o8,{evt:t}):this._fire(o8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a8,{evt:t}):this._fire(a8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=w6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(jp,Z_(t)),Tm(t.pointerId)}_lostpointercapture(t){Tm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new y0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Y_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ox.prototype.nodeType=swe;gr(ox);Z.addGetterSetter(ox,"container");var XH="hasShadow",QH="shadowRGBA",JH="patternImage",eW="linearGradient",tW="radialGradient";let jy;function _6(){return jy||(jy=fe.createCanvasElement().getContext("2d"),jy)}const Am={};function pwe(e){e.fill()}function gwe(e){e.stroke()}function mwe(e){e.fill()}function vwe(e){e.stroke()}function ywe(){this._clearCache(XH)}function bwe(){this._clearCache(QH)}function xwe(){this._clearCache(JH)}function Swe(){this._clearCache(eW)}function wwe(){this._clearCache(tW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Am)););this.colorKey=n,Am[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(XH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(JH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=_6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(eW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=_6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Am[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,P=v+b*2,E={width:w,height:P,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return FH(t,this)}setPointerCapture(t){$H(t,this)}releaseCapture(t){Tm(t)}}Ie.prototype._fillFunc=pwe;Ie.prototype._strokeFunc=gwe;Ie.prototype._fillFuncHit=mwe;Ie.prototype._strokeFuncHit=vwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",ywe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",xwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Swe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",wwe);Z.addGetterSetter(Ie,"stroke",void 0,zH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",K_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,n1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,zH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Cwe="#",_we="beforeDraw",kwe="draw",nW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Ewe=nW.length;class fh extends aa{constructor(t){super(t),this.canvas=new y0,this.hitCanvas=new Y_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(_we,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(kwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}fh.prototype.nodeType="Layer";gr(fh);Z.addGetterSetter(fh,"imageSmoothingEnabled",!0);Z.addGetterSetter(fh,"clearBeforeDraw",!0);Z.addGetterSetter(fh,"hitGraphEnabled",!0,Ls());class X_ extends fh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}X_.prototype.nodeType="FastLayer";gr(X_);class F0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}F0.prototype.nodeType="Group";gr(F0);var k6=function(){return v0.performance&&v0.performance.now?function(){return v0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:k6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=yI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=bI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===yI?this.setTime(t):this.state===bI&&this.setTime(this.duration-t)}pause(){this.state=Lwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Im.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Twe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Awe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Pwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Im={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Tu.prototype._centroid=!0;Tu.prototype.className="Arc";Tu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Tu);Z.addGetterSetter(Tu,"innerRadius",0,ze());Z.addGetterSetter(Tu,"outerRadius",0,ze());Z.addGetterSetter(Tu,"angle",0,ze());Z.addGetterSetter(Tu,"clockwise",!1,Ls());function s8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function SI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,g,g+m,1-b),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,N,D,z,H,W,Y,de,j,ne,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var J=b.shift(),q=b.shift();if(l+=J,u+=q,k="M",a.length>2&&a[a.length-1].command==="z"){for(var V=a.length-2;V>=0;V--)if(a[V].command==="M"){l=a[V].points[0]+J,u=a[V].points[1]+q;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,N=a[a.length-1],N.command==="C"&&(D=l+(l-N.points[2]),z=u+(u-N.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,N=a[a.length-1],N.command==="Q"&&(D=l+(l-N.points[0]),z=u+(u-N.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":H=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),ne=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(ne,ie,l,u,de,j,H,W,Y);break;case"a":H=b.shift(),W=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),ne=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(ne,ie,l,u,de,j,H,W,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,P=b*-l*g/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,L=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},I=function(W,Y){return(W[0]*Y[0]+W[1]*Y[1])/(L(W)*L(Y))},O=function(W,Y){return(W[0]*Y[1]=1&&(H=0),a===0&&H>0&&(H=H-2*Math.PI),a===1&&H<0&&(H=H+2*Math.PI),[E,k,s,l,N,H,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class hh extends Au{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}hh.prototype.className="Arrow";gr(hh);Z.addGetterSetter(hh,"pointerLength",10,ze());Z.addGetterSetter(hh,"pointerWidth",10,ze());Z.addGetterSetter(hh,"pointerAtBeginning",!1);Z.addGetterSetter(hh,"pointerAtEnding",!0);class r1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}r1.prototype._centroid=!0;r1.prototype.className="Circle";r1.prototype._attrsAffectingSize=["radius"];gr(r1);Z.addGetterSetter(r1,"radius",0,ze());class wd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(wd);Z.addComponentsGetterSetter(wd,"radius",["x","y"]);Z.addGetterSetter(wd,"radiusX",0,ze());Z.addGetterSetter(wd,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var rW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Iwe="Change.konva",Mwe="none",l8="up",u8="right",c8="down",d8="left",Owe=rW.length;class Q_ extends F0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gh.prototype.className="RegularPolygon";gh.prototype._centroid=!0;gh.prototype._attrsAffectingSize=["radius"];gr(gh);Z.addGetterSetter(gh,"radius",0,ze());Z.addGetterSetter(gh,"sides",0,ze());var wI=Math.PI*2;class mh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,wI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),wI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}mh.prototype.className="Ring";mh.prototype._centroid=!0;mh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(mh);Z.addGetterSetter(mh,"innerRadius",0,ze());Z.addGetterSetter(mh,"outerRadius",0,ze());class Rl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var qy;function P6(){return qy||(qy=fe.createCanvasElement().getContext(Dwe),qy)}function qwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Kwe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Ywe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(Ywe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(zwe,n),this}getWidth(){var t=this.attrs.width===Ep||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Ep||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=P6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Gy+this.fontVariant()+Gy+(this.fontSize()+Hwe)+Gwe(this.fontFamily())}_addTextLine(t){this.align()===Mg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return P6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Ep&&o!==void 0,l=a!==Ep&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==kI,w=v!==Uwe&&b,P=this.ellipsis();this.textArr=[],P6().font=this._getContextFont();for(var E=P?this._getTextWidth(E6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var N=0,D=I.length,z="",H=0;N>>1,Y=I.slice(0,W+1),de=this._getTextWidth(Y)+E;de<=h?(N=W+1,z=Y,H=de):D=W}if(z){if(w){var j,ne=I[z.length],ie=ne===Gy||ne===CI;ie&&H<=h?j=z.length:j=Math.max(z.lastIndexOf(Gy),z.lastIndexOf(CI))+1,j>0&&(N=j,z=z.slice(0,N),H=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,H),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(N),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Ep&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==kI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Ep&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+E6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=iW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var ne=0,ie=0;for(v=void 0;Math.abs(j-ne)/j>.01&&ie<20;){ie++;for(var J=ne;b===void 0;)b=E(),b&&J+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var V=b.points[4],G=b.points[5],Q=b.points[4]+G;P===0?P=V+1e-8:j>ne?P+=Math.PI/180*G/Math.abs(G):P-=Math.PI/360*G/Math.abs(G),(G<0&&P=0&&P>Q)&&(P=Q,q=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case"C":P===0?j>b.pathLength?P=1e-8:P=j/b.pathLength:j>ne?P+=(j-ne)/b.pathLength/2:P=Math.max(P-(ne-j)/b.pathLength/2,0),P>1&&(P=1,q=!0),v=Nn.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":P===0?P=j/b.pathLength:j>ne?P+=(j-ne)/b.pathLength:P-=(ne-j)/b.pathLength,P>1&&(P=1,q=!0),v=Nn.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(ne=Nn.getLineLength(m.x,m.y,v.x,v.y)),q&&(q=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,N=0;Ne+`.${dW}`).join(" "),EI="nodesRect",Qwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],Jwe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const eCe="ontouchstart"in ot._global;function tCe(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(Jwe[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var t4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],PI=1e8;function nCe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function rCe(e,t){const n=nCe(e);return fW(e,t,n)}function iCe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Qwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(EI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(EI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return fW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-PI,y:-PI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),t4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Zv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:eCe?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=tCe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,ne=ot.getAngle(this.rotationSnapTolerance()),J=iCe(this.rotationSnaps(),j,ne)-g.rotation,q=rCe(g,J);this._fitNodesInto(q,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,P=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const P=w.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),F0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function oCe(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){t4.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+t4.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",t4,oCe);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Iu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Iu.prototype.className="Wedge";Iu.prototype._centroid=!0;Iu.prototype._attrsAffectingSize=["radius"];gr(Iu);Z.addGetterSetter(Iu,"radius",0,ze());Z.addGetterSetter(Iu,"angle",0,ze());Z.addGetterSetter(Iu,"clockwise",!1);Z.backCompat(Iu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function LI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var aCe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],sCe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function lCe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,P,E,k,L,I,O,N,D,z,H,W,Y,de,j=t+t+1,ne=r-1,ie=i-1,J=t+1,q=J*(J+1)/2,V=new LI,G=null,Q=V,X=null,me=null,xe=aCe[t],Se=sCe[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*xe>>Se)*Y,n[h+1]=(v*xe>>Se)*Y,n[h+2]=(b*xe>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,b-=k,w-=L,P-=X.r,E-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*xe>>Se)*Y,n[l+1]=(v*xe>>Se)*Y,n[l+2]=(b*xe>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,b-=k,w-=L,P-=X.r,E-=X.g,k-=X.b,L-=X.a,l=o+((l=a+J)0&&lCe(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const cCe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const fCe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var k=b+(w-1+E)*4,L=s[P]-s[k],I=s[P+1]-s[k+1],O=s[P+2]-s[k+2],N=L,D=N>0?N:-N,z=I>0?I:-I,H=O>0?O:-O;if(z>D&&(N=I),H>D&&(N=O),N*=t,i){var W=s[P]+N,Y=s[P+1]+N,de=s[P+2]+N;s[P]=W>255?255:W<0?0:W,s[P+1]=Y>255?255:Y<0?0:Y,s[P+2]=de>255?255:de<0?0:de}else{var j=n-N;j<0?j=0:j>255&&(j=255),s[P]=s[P+1]=s[P+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function L6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const hCe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,P,E,k,L,I,O,N;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),N=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),P=r+v*(r-b),E=(s+a)*.5,k=s+v*(s-E),L=a+v*(a-E),I=(h+u)*.5,O=h+v*(h-I),N=u+v*(u-I)),m=0;mE?P:E;var k=a,L=o,I,O,N=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,N,D,z=n.polarRotation||0,H,W;for(h=0;ht&&(I=L,O=0,N=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function ECe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const ACe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);const MCe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,NH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const OCe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},NCe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||T[$]!==M[se]){var he=` -`+T[$].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=$&&0<=se);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Dl(d):""}var Sh=Object.prototype.hasOwnProperty,Nu=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Nu[Rs],Nu[Rs]=null,Rs--)}function bn(d,f){Rs++,Nu[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var T={},M;for(M in y)T[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Pd(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var T in _)if(!(T in f))throw Error(a(108,z(d)||"Unknown",T));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ld(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Td,wh=Math.log,Ch=Math.LN2;function Td(d){return d>>>=0,d===0?32:31-(wh(d)/Ch|0)|0}var Ds=64,uo=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Fl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,T=d.suspendedLanes,M=d.pingedLanes,$=y&268435455;if($!==0){var se=$&~T;se!==0?_=zs(se):(M&=$,M!==0&&(_=zs(M)))}else $=y&~T,$!==0?_=zs($):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&T)===0&&(T=_&-_,M=f&-f,T>=M||T===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Id(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=$,T-=$,Gi=1<<32-gi(f)+T|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var Kt=Ke(ge,kt,ye[Ft],We);if(Kt===null){kt===null&&(kt=Br);break}d&&kt&&Kt.alternate===null&&f(ge,kt),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt,kt=Br}if(Ft===ye.length)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ke(ge,kt,Kt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Tt===null?Le=ns:Tt.sibling=ns,Tt=ns,kt=Br}if(Kt.done)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;!Kt.done;Ft++,Kt=ye.next())Kt=Lt(ge,Kt.value,We),Kt!==null&&(ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return zn&&Bs(ge,Ft),Le}for(kt=_(ge,kt);!Kt.done;Ft++,Kt=ye.next())Kt=Fn(kt,ge,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&kt.delete(Kt.key===null?Ft:Kt.key),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Le}function Ko(ge,ue,ye,We){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Le=ye.key,Tt=ue;Tt!==null;){if(Tt.key===Le){if(Le=ye.type,Le===h){if(Tt.tag===7){y(ge,Tt.sibling),ue=T(Tt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Tt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===L&&P1(Le)===Tt.type){y(ge,Tt.sibling),ue=T(Tt,ye.props),ue.ref=ba(ge,Tt,ye),ue.return=ge,ge=ue;break e}y(ge,Tt);break}else f(ge,Tt);Tt=Tt.sibling}ye.type===h?(ue=Qs(ye.props.children,ge.mode,We,ye.key),ue.return=ge,ge=ue):(We=af(ye.type,ye.key,ye.props,null,ge.mode,We),We.ref=ba(ge,ue,ye),We.return=ge,ge=We)}return $(ge);case u:e:{for(Tt=ye.key;ue!==null;){if(ue.key===Tt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=T(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(ye,ge.mode,We),ue.return=ge,ge=ue}return $(ge);case L:return Tt=ye._init,Ko(ge,ue,Tt(ye._payload),We)}if(ie(ye))return Ln(ge,ue,ye,We);if(N(ye))return er(ge,ue,ye,We);Di(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=T(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=cp(ye,ge.mode,We),ue.return=ge,ge=ue),$(ge)):y(ge,ue)}return Ko}var Gu=l2(!0),u2=l2(!1),Wd={},po=No(Wd),xa=No(Wd),oe=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){bn(oe,f),bn(xa,d),bn(po,Wd),d=q(f),Pn(po),bn(po,d)}function qe(){Pn(po),Pn(xa),Pn(oe)}function _t(d){var f=be(oe.current),y=be(po.current);f=V(y,d.type,f),y!==f&&(bn(xa,d),bn(po,f))}function Jt(d){xa.current===d&&(Pn(po),Pn(xa))}var Ot=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ou(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function L1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function ec(){return yi().memoizedState}function D1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},nc(d))rc(f,y);else if(y=ju(d,f,y,_),y!==null){var T=ai();vo(y,d,_,T),Yd(y,f,_)}}function tc(d,f,y){var _=Ar(d),T={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(nc(d))rc(f,T);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var $=f.lastRenderedState,se=M($,y);if(T.hasEagerState=!0,T.eagerState=se,U(se,$)){var he=f.interleaved;he===null?(T.next=T,$d(f)):(T.next=he.next,he.next=T),f.interleaved=T;return}}catch{}finally{}y=ju(d,f,T,_),y!==null&&(T=ai(),vo(y,d,_,T),Yd(y,f,_))}}function nc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function rc(d,f){Ud=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Yd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,$l(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},dx={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:f2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Ul(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Ul(4194308,4,d,f)},useInsertionEffect:function(d,f){return Ul(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=D1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:d2,useDebugValue:O1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=d2(!1),f=d[0];return d=N1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,T=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Vl&30)!==0||M1(_,f,y)}T.memoizedState=y;var M={value:y,getSnapshot:f};return T.queue=M,f2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,qd(9,Qu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0ep&&(f.flags|=128,_=!0,ac(T,!1),f.lanes=4194304)}else{if(!_)if(d=cn(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),ac(T,!0),T.tail===null&&T.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-T.renderingStartTime>ep&&y!==1073741824&&(f.flags|=128,_=!0,ac(T,!1),f.lanes=4194304);T.isBackwards?(M.sibling=f.child,f.child=M):(d=T.last,d!==null?d.sibling=M:f.child=M,T.last=M)}return T.tail!==null?(f=T.tail,T.rendering=f,T.tail=f.sibling,T.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return gc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function U1(d,f){switch(C1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return qe(),Pn(Ur),Pn(kr),L1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Wu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return qe(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,vx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function sc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Hh=!1;function Gl(d,f){for(G(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,M=d.stateNode,$=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),T);M.__reactInternalSnapshotBeforeUpdate=$}break;case 3:at&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Hh,Hh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var T=_=_.next;do{if((T.tag&d)===d){var M=T.destroy;T.destroy=void 0,M!==void 0&&Uo(f,y,M)}T=T.next}while(T!==_)}}function Wh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Vh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function j1(d){var f=d.alternate;f!==null&&(d.alternate=null,j1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ct(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function lc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||lc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Uh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Fe(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(Uh(d,f,y),d=d.sibling;d!==null;)Uh(d,f,y),d=d.sibling}function G1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(G1(d,f,y),d=d.sibling;d!==null;)G1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Lr(d,f,y),y=y.sibling}function Lr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||sc(y,f);case 6:if(at){var _=br,T=jo;br=null,Go(d,f,y),br=_,jo=T,br!==null&&(jo?rt(br,y.stateNode):pt(br,y.stateNode))}else Go(d,f,y);break;case 18:at&&br!==null&&(jo?y1(br,y.stateNode):v1(br,y.stateNode));break;case 4:at?(_=br,T=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=T):(At&&(_=y.stateNode.containerInfo,T=ga(_),Mu(_,T)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){T=_=_.next;do{var M=T,$=M.destroy;M=M.tag,$!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,$),T=T.next}while(T!==_)}Go(d,f,y);break;case 1:if(!Pr&&(sc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function jh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new vx),f.forEach(function(_){var T=A2.bind(null,d,_);y.has(_)||(y.add(_),_.then(T,T))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Yh:return":has("+(Y1(d)||"")+")";case Zh:return'[role="'+d.value+'"]';case Xh:return'"'+d.value+'"';case uc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function cc(d,f){var y=[];d=[d,0];for(var _=0;_T&&(T=$),_&=~M}if(_=T,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*yx(_/1960))-_,10<_){d.timeoutHandle=ut(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?rp.bind(null,d):null}function ip(d,f){var y=hc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=mc(d,f),d!==2&&(f=xi,xi=y,f!==null&&op(f)),d}function op(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,tp=0,(Bt&6)!==0)throw Error(a(331));var T=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var M=Qe,$=M.child;if((Qe.flags&16)!==0){var se=M.deletions;if(se!==null){for(var he=0;heWn()-Q1?Ys(d,0):X1|=y),Yr(d,f)}function rg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function xx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),rg(d,y)}function A2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),rg(d,y)}var ig;ig=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,gx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&w1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var T=Ns(f,kr.current);Uu(f,y),T=A1(null,f,_,d,T,y);var M=Yu();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,k1(f),T.updater=Ho,f.stateNode=T,T._reactInternals=f,E1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,T,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,T=_._init,_=T(_._payload),f.type=_,T=f.tag=lp(_),d=Fo(_,d),T){case 0:f=F1(null,f,_,d,y);break e;case 1:f=S2(null,f,_,d,y);break e;case 11:f=v2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),F1(d,f,_,T,y);case 1:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),S2(d,f,_,T,y);case 3:e:{if(w2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,T=M.element,i2(d,f),Mh(f,_,null,y);var $=f.memoizedState;if(_=$.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){T=ic(Error(a(423)),f),f=C2(d,f,_,y,T);break e}else if(_!==T){T=ic(Error(a(424)),f),f=C2(d,f,_,y,T);break e}else for(wt&&(fo=c1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,ho=!1),y=u2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Wu(),_===T){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Rd(f),_=f.type,T=f.pendingProps,M=d!==null?d.memoizedProps:null,$=T.children,He(_,T)?$=null:M!==null&&He(_,M)&&(f.flags|=32),x2(d,f),bi(d,f,$,y),f.child;case 6:return d===null&&Rd(f),null;case 13:return _2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Gu(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),v2(d,f,_,T,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,T=f.pendingProps,M=f.memoizedProps,$=T.value,r2(f,_,$),M!==null)if(U(M.value,$)){if(M.children===T.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var se=M.dependencies;if(se!==null){$=M.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var nt=Re.pending;nt===null?he.next=he:(he.next=nt.next,nt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),Fd(M.return,y,f),se.lanes|=y;break}he=he.next}}else if(M.tag===10)$=M.type===f.type?null:M.child;else if(M.tag===18){if($=M.return,$===null)throw Error(a(341));$.lanes|=y,se=$.alternate,se!==null&&(se.lanes|=y),Fd($,y,f),$=M.sibling}else $=M.child;if($!==null)$.return=M;else for($=M;$!==null;){if($===f){$=null;break}if(M=$.sibling,M!==null){M.return=$.return,$=M;break}$=$.return}M=$}bi(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,_=f.pendingProps.children,Uu(f,y),T=qi(T),_=_(T),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,T=Fo(_,f.pendingProps),T=Fo(_.type,T),Ws(d,f,_,T,y);case 15:return y2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Uu(f,y),a2(f,_,T),E1(f,_,T,y),Wo(null,f,_,!0,d,y);case 19:return E2(d,f,y);case 22:return b2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Fu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new wa(d,f,y,_)}function og(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lp(d){if(typeof d=="function")return og(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,T,M){var $=2;if(_=d,typeof d=="function")og(d)&&($=1);else if(typeof d=="string")$=5;else e:switch(d){case h:return Qs(y.children,T,M,f);case g:$=8,T|=8;break;case m:return d=yo(12,y,f,T|2),d.elementType=m,d.lanes=M,d;case P:return d=yo(13,y,f,T),d.elementType=P,d.lanes=M,d;case E:return d=yo(19,y,f,T),d.elementType=E,d.lanes=M,d;case I:return up(y,T,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:$=10;break e;case b:$=9;break e;case w:$=11;break e;case k:$=14;break e;case L:$=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo($,y,f,T),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function up(d,f,y,_){return d=yo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function cp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=et,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=T,wt&&(this.mutableSourceEagerHydrationData=null)}function I2(d,f,y,_,T,M,$,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=yo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},k1(M),d}function ag(d){if(!d)return Do;d=d._reactInternals;e:{if(H(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Bl(d,y,f)}return f}function sg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Lt&&T<=nt&&$<=Ke){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||Ke$){if(!(M!==Lt||y.height!==he.height||nt<_||Re>T)){Re>_&&(he.width+=Re-_,he.x=_),ntM&&(he.height+=Lt-M,he.y=M),Ke<$&&(he.height=$-Lt),d.splice(f,1);break}}}return d},n.findHostInstance=sg,n.findHostInstanceWithNoPortals=function(d){return d=Y(d),d=d!==null?ne(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return sg(d)},n.flushControlled=function(d){var f=Bt;Bt|=1;var y=ar.transition,_=Ht;try{ar.transition=null,Ht=1,d()}finally{Ht=_,ar.transition=y,Bt=f,Bt===0&&(qs(),mt())}},n.flushPassiveEffects=Yl,n.flushSync=J1,n.focusWithin=function(d,f){if(!Et)throw Error(a(363));for(d=Qh(d),f=cc(d,f),f=Array.from(f),d=0;dy&&(y=$)),$ ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:dp,findFiberByHostInstance:d.findFiberByHostInstance||lg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=Z1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var T=f.current,M=ai(),$=Ar(T);return y=ag(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,$),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,$),d!==null&&(vo(d,T,$,M),Ih(d,T,$)),$},n};(function(e){e.exports=DCe})(hW);const zCe=L8(hW.exports);var J_={exports:{}},vh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */vh.ConcurrentRoot=1;vh.ContinuousEventPriority=4;vh.DefaultEventPriority=16;vh.DiscreteEventPriority=1;vh.IdleEventPriority=536870912;vh.LegacyRoot=0;(function(e){e.exports=vh})(J_);const TI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let AI=!1,II=!1;const ek=".react-konva-event",BCe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,FCe=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,$Ce={};function ax(e,t,n=$Ce){if(!AI&&"zIndex"in t&&(console.warn(FCe),AI=!0),!II&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(BCe),II=!0)}for(var o in n)if(!TI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!TI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),_d(e));for(var l in v)e.on(l+ek,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const pW={},HCe={};Qf.Node.prototype._applyProps=ax;function WCe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function VCe(e,t,n){let r=Qf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Qf.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ax(l,o),l}function UCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function jCe(e,t,n){return!1}function GCe(e){return e}function qCe(){return null}function KCe(){return null}function YCe(e,t,n,r){return HCe}function ZCe(){}function XCe(e){}function QCe(e,t){return!1}function JCe(){return pW}function e8e(){return pW}const t8e=setTimeout,n8e=clearTimeout,r8e=-1;function i8e(e,t){return!1}const o8e=!1,a8e=!0,s8e=!0;function l8e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function u8e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function gW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function c8e(e,t,n){gW(e,t,n)}function d8e(e,t){t.destroy(),t.off(ek),_d(e)}function f8e(e,t){t.destroy(),t.off(ek),_d(e)}function h8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function p8e(e,t,n){}function g8e(e,t,n,r,i){ax(e,i,r)}function m8e(e){e.hide(),_d(e)}function v8e(e){}function y8e(e,t){(t.visible==null||t.visible)&&e.show()}function b8e(e,t){}function x8e(e){}function S8e(){}const w8e=()=>J_.exports.DefaultEventPriority,C8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:WCe,createInstance:VCe,createTextInstance:UCe,finalizeInitialChildren:jCe,getPublicInstance:GCe,prepareForCommit:qCe,preparePortalMount:KCe,prepareUpdate:YCe,resetAfterCommit:ZCe,resetTextContent:XCe,shouldDeprioritizeSubtree:QCe,getRootHostContext:JCe,getChildHostContext:e8e,scheduleTimeout:t8e,cancelTimeout:n8e,noTimeout:r8e,shouldSetTextContent:i8e,isPrimaryRenderer:o8e,warnsIfNotActing:a8e,supportsMutation:s8e,appendChild:l8e,appendChildToContainer:u8e,insertBefore:gW,insertInContainerBefore:c8e,removeChild:d8e,removeChildFromContainer:f8e,commitTextUpdate:h8e,commitMount:p8e,commitUpdate:g8e,hideInstance:m8e,hideTextInstance:v8e,unhideInstance:y8e,unhideTextInstance:b8e,clearContainer:x8e,detachDeletedInstance:S8e,getCurrentEventPriority:w8e,now:Gp.exports.unstable_now,idlePriority:Gp.exports.unstable_IdlePriority,run:Gp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var _8e=Object.defineProperty,k8e=Object.defineProperties,E8e=Object.getOwnPropertyDescriptors,MI=Object.getOwnPropertySymbols,P8e=Object.prototype.hasOwnProperty,L8e=Object.prototype.propertyIsEnumerable,OI=(e,t,n)=>t in e?_8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RI=(e,t)=>{for(var n in t||(t={}))P8e.call(t,n)&&OI(e,n,t[n]);if(MI)for(var n of MI(t))L8e.call(t,n)&&OI(e,n,t[n]);return e},T8e=(e,t)=>k8e(e,E8e(t));function tk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=tk(r,t,n);if(i)return i;r=t?null:r.sibling}}function mW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const nk=mW(C.exports.createContext(null));class vW extends C.exports.Component{render(){return x(nk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:A8e,ReactCurrentDispatcher:I8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M8e(){const e=C.exports.useContext(nk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=A8e.current)!=null?r:tk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Ng=[],NI=new WeakMap;function O8e(){var e;const t=M8e();Ng.splice(0,Ng.length),tk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==nk&&Ng.push(mW(i))});for(const n of Ng){const r=(e=I8e.current)==null?void 0:e.readContext(n);NI.set(n,r)}return C.exports.useMemo(()=>Ng.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,T8e(RI({},i),{value:NI.get(r)}))),n=>x(vW,{...RI({},n)})),[])}function R8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const N8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=R8e(e),o=O8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new Qf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=em.createContainer(n.current,J_.exports.LegacyRoot,!1,null),em.updateContainer(x(o,{children:e.children}),r.current),()=>{!Qf.isBrowser||(a(null),em.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),ax(n.current,e,i),em.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Yy="Layer",Xv="Group",R3="Rect",Dg="Circle",n4="Line",yW="Image",D8e="Transformer",em=zCe(C8e);em.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const z8e=le.forwardRef((e,t)=>x(vW,{children:x(N8e,{...e,forwardedRef:t})})),B8e=Ze(jt,e=>{const{objects:t}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),F8e=e=>{const{...t}=e,{objects:n}=Ce(B8e);return x(Xv,{listening:!1,...t,children:n.filter(Vb).map((r,i)=>x(n4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},rk=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},$8e=Ze(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:rk(u==="mask"?a:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),H8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce($8e);return l?te(Xv,{listening:!1,...t,children:[x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Dg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},W8e=Ze(jt,qv,J0,sn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),V8e=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:P,boundingBoxStrokeWidth:E}=Ce(W8e),k=C.exports.useRef(null),L=C.exports.useRef(null);C.exports.useEffect(()=>{!k.current||!L.current||(k.current.nodes([L.current]),k.current.getLayer()?.batchDraw())},[]);const I=64*m,O=C.exports.useCallback(J=>{if(b==="inpainting"||!w){n(d6({x:J.target.x(),y:J.target.y()}));return}const q=J.target.x(),V=J.target.y(),G=Ly(q,64),Q=Ly(V,64);J.target.x(G),J.target.y(Q),n(d6({x:G,y:Q}))},[b,n,w]),N=C.exports.useCallback(J=>{if(!v)return r;const{x:q,y:V}=J,G=g.width-i.width*m,Q=g.height-i.height*m,X=Math.floor(Ge.clamp(q,0,G)),me=Math.floor(Ge.clamp(V,0,Q));return{x:X,y:me}},[v,r,g.width,g.height,i.width,i.height,m]),D=C.exports.useCallback(()=>{if(!L.current)return;const J=L.current,q=J.scaleX(),V=J.scaleY(),G=Math.round(J.width()*q),Q=Math.round(J.height()*V),X=Math.round(J.x()),me=Math.round(J.y());n(Kg({width:G,height:Q})),n(d6({x:X,y:me})),J.scaleX(1),J.scaleY(1)},[n]),z=C.exports.useCallback((J,q,V)=>{const G=J.x%I,Q=J.y%I,X=Ly(q.x,I)+G,me=Ly(q.y,I)+Q,xe=Math.abs(q.x-X),Se=Math.abs(q.y-me),He=xe!v||q.width+q.x>g.width||q.height+q.y>g.height||q.x<0||q.y<0?J:q,[v,g]),W=()=>{n(f6(!0))},Y=()=>{n(f6(!1)),n(Ty(!1))},de=()=>{n(TA(!0))},j=()=>{n(f6(!1)),n(TA(!1)),n(Ty(!1))},ne=()=>{n(Ty(!0))},ie=()=>{!u&&!l&&n(Ty(!1))};return te(Xv,{...t,children:[x(R3,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R3,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R3,{dragBoundFunc:b==="inpainting"?N:void 0,listening:!o&&P==="move",draggable:!0,fillEnabled:P==="move",height:i.height,onDragEnd:j,onDragMove:O,onMouseDown:de,onMouseOut:ie,onMouseOver:ne,onMouseUp:j,onTransform:D,onTransformEnd:Y,ref:L,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:E,width:i.width,x:r.x,y:r.y}),x(D8e,{anchorCornerRadius:3,anchorDragBoundFunc:z,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:H,draggable:!1,enabledAnchors:P==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&P==="move",onDragEnd:j,onMouseDown:W,onMouseUp:Y,onTransformEnd:Y,ref:k,rotateEnabled:!1})]})},U8e=Ze([jt,sn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),j8e=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(U8e),i=C.exports.useRef(null);vt("shift+w",o=>{o.preventDefault(),e(o4e())},{enabled:!0},[t]),vt("shift+h",o=>{o.preventDefault(),e(I_(!n))},{enabled:!0},[t,n]),vt(["space"],o=>{o.repeat||r!=="move"&&(i.current=r,e(Su("move")))},{keyup:!1,keydown:!0},[r,i]),vt(["space"],o=>{o.repeat||r==="move"&&i.current&&i.current!=="move"&&(e(Su(i.current)),i.current="move")},{keyup:!0,keydown:!1},[r,i])},G8e=Ze(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:rk(t)}}),DI=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),q8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(G8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=DI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=DI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a?x(R3,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},K8e=.999,Y8e=.1,Z8e=20,X8e=Ze([sn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Q8e=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(X8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ge.clamp(r*K8e**l,Y8e,Z8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(L$(u)),t(I$(h))},[i,t,n,e,r])},sx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},J8e=Ze([sn,jt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),e9e=e=>{const t=$e(),{tool:n}=Ce(J8e);return C.exports.useCallback(r=>{if(!e.current)return;if(n==="move"){t(K5(!0));return}const i=sx(e.current);!i||(r.evt.preventDefault(),t(Ub(!0)),t(S$([i.x,i.y])))},[e,t,n])},t9e=Ze([sn,jt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),n9e=(e,t)=>{const n=$e(),{tool:r,isDrawing:i}=Ce(t9e);return C.exports.useCallback(()=>{if(r==="move"){n(K5(!1));return}if(!t.current&&i&&e.current){const o=sx(e.current);if(!o)return;n(w$([o.x,o.y]))}else t.current=!1;n(Ub(!1))},[t,n,i,e,r])},r9e=Ze([sn,jt],(e,t)=>{const{tool:n,isDrawing:r}=t;return{tool:n,isDrawing:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),i9e=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o}=Ce(r9e);return C.exports.useCallback(()=>{if(!e.current)return;const a=sx(e.current);!a||(r(E$(a)),n.current=a,!(!i||o==="move")&&(t.current=!0,r(w$([a.x,a.y]))))},[t,r,i,n,e,o])},o9e=Ze([sn,jt],(e,t)=>{const{tool:n}=t;return{tool:n,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),a9e=e=>{const t=$e(),{tool:n}=Ce(o9e);return C.exports.useCallback(r=>{if(r.evt.buttons!==1||!e.current)return;const i=sx(e.current);!i||n==="move"||(t(Ub(!0)),t(S$([i.x,i.y])))},[e,n,t])},s9e=()=>{const e=$e();return C.exports.useCallback(()=>{e(E$(null)),e(Ub(!1))},[e])},l9e=Ze([jt,sn],(e,t)=>{const{tool:n}=e;return{tool:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),u9e=()=>{const e=$e(),{tool:t,activeTabName:n}=Ce(l9e);return{handleDragStart:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K5(!0))},[n,e,t]),handleDragMove:C.exports.useCallback(r=>{t!=="move"||n!=="outpainting"||e(I$(r.target.getPosition()))},[n,e,t]),handleDragEnd:C.exports.useCallback(()=>{t!=="move"||n!=="outpainting"||e(K5(!1))},[n,e,t])}};var gf=C.exports,c9e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const d9e=e=>{const{url:t,x:n,y:r}=e,[i]=c9e(t);return x(yW,{x:n,y:r,image:i,listening:!1})},f9e=Ze([jt],e=>e.objects,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),h9e=()=>{const e=Ce(f9e);return e?x(Xv,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(y$(t))return x(d9e,{x:t.x,y:t.y,url:t.image.url},n);if(K5e(t))return x(n4,{points:t.points,stroke:t.color?rk(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},p9e=Ze([jt],e=>e.stageScale,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),g9e=()=>{const e=Ce(p9e);return t=>t/e},m9e=()=>{const{colorMode:e}=Pv(),t=g9e();if(!au.current)return null;const n=e==="light"?"rgba(0,0,0,0.3)":"rgba(255,255,255,0.3)",r=au.current,i=r.width(),o=r.height(),a=r.x(),s=r.y(),l={x1:0,y1:0,x2:i,y2:o,offset:{x:t(a),y:t(s)}},u={x:Math.ceil(t(a)/64)*64,y:Math.ceil(t(s)/64)*64},h={x1:-u.x,y1:-u.y,x2:t(i)-u.x+64,y2:t(o)-u.y+64},m={x1:Math.min(l.x1,h.x1),y1:Math.min(l.y1,h.y1),x2:Math.max(l.x2,h.x2),y2:Math.max(l.y2,h.y2)},v=m.x2-m.x1,b=m.y2-m.y1,w=Math.round(v/64)+1,P=Math.round(b/64)+1;return te(Xv,{children:[Ge.range(0,w).map(E=>x(n4,{x:m.x1+E*64,y:m.y1,points:[0,0,0,b],stroke:n,strokeWidth:1},`x_${E}`)),Ge.range(0,P).map(E=>x(n4,{x:m.x1,y:m.y1+E*64,points:[0,0,v,0],stroke:n,strokeWidth:1},`y_${E}`))]})},v9e=Ze([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),y9e=e=>{const{...t}=e,n=Ce(v9e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(yW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},zg=e=>Math.round(e*100)/100,b9e=Ze([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),x9e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(b9e);return te("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${zg(n)}, ${zg(r)}`}),x("div",{children:`Scale: ${zg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${zg(a)}, ${zg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})},S9e=Ze([jt,qv,J0,sn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"?s?w=void 0:l?w="move":r==="outpainting"&&(v?w="grabbing":w="grab"):w="none",{activeTabName:r,isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}});let au,fl;const bW=()=>{const{activeTabName:e,isMaskEnabled:t,isModifyingBoundingBox:n,shouldShowBoundingBox:r,shouldShowGrid:i,stageCoordinates:o,stageCursor:a,stageDimensions:s,stageScale:l,tool:u}=Ce(S9e);j8e(),au=C.exports.useRef(null),fl=C.exports.useRef(null);const h=C.exports.useRef({x:0,y:0}),g=C.exports.useRef(!1),m=Q8e(au),v=e9e(au),b=n9e(au,g),w=i9e(au,g,h),P=a9e(au),E=s9e(),{handleDragStart:k,handleDragMove:L,handleDragEnd:I}=u9e();return x("div",{className:"inpainting-canvas-container",children:te("div",{className:"inpainting-canvas-wrapper",children:[te(z8e,{ref:au,style:{...a?{cursor:a}:{}},className:"inpainting-canvas-stage checkerboard",x:o.x,y:o.y,width:s.width,height:s.height,scale:{x:l,y:l},onMouseDown:v,onMouseEnter:P,onMouseLeave:E,onMouseMove:w,onMouseOut:E,onMouseUp:b,onDragStart:k,onDragMove:L,onDragEnd:I,onWheel:m,listening:u==="move"&&!n,draggable:u==="move"&&!n&&e==="outpainting",children:[x(Yy,{id:"grid",visible:i,children:x(m9e,{})}),te(Yy,{id:"image",ref:fl,listening:!1,imageSmoothingEnabled:!1,children:[x(h9e,{}),x(y9e,{})]}),te(Yy,{id:"mask",visible:t,listening:!1,children:[x(F8e,{visible:!0,listening:!1}),x(q8e,{listening:!1})]}),te(Yy,{id:"tool",children:[x(V8e,{visible:r}),x(H8e,{visible:u!=="move",listening:!1})]})]}),x(x9e,{})]})})},w9e=Ze([qv,e=>e.options,sn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),C9e=()=>{const e=$e(),{activeTabName:t}=Ce(w9e);return te("div",{className:"inpainting-settings",children:[te(Eo,{isAttached:!0,children:[x(u6e,{}),x(d6e,{}),t==="outpainting"&&x(k6e,{})]}),te(Eo,{isAttached:!0,children:[x(v6e,{}),x(b6e,{}),x(S6e,{}),x(C6e,{}),x(g6e,{})]}),x(gt,{"aria-label":"Save",tooltip:"Save",icon:x(m$,{}),onClick:()=>{e(M_(fl))},fontSize:20}),te(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(Z$,{})})]})},_9e=Ze(e=>e.canvas,J0,sn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),xW=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(_9e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const{width:o,height:a}=r.image,{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(L$(u)),n==="inpainting"?e(PA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(PA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Bv,{thickness:"2px",speed:"1s",size:"xl"})})},k9e=Ze([J0,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),E9e=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(k9e);return C.exports.useLayoutEffect(()=>{const o=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),te("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?te("div",{className:"inpainting-main-area",children:[x(C9e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(xW,{}):x(bW,{})})]}):x(N_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(B_,{})})]})};function P9e(){const e=$e();return C.exports.useEffect(()=>{e(M$("inpainting")),e(Cr(!0))},[e]),x(ex,{optionsPanel:x(qSe,{}),styleClass:"inpainting-workarea-overrides",children:x(E9e,{})})}function L9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})},other:{header:x(r$,{}),feature:Xr.OTHER,options:x(i$,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x($b,{}),e?x(Wb,{accordionInfo:t}):null]})}const T9e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(B_,{})})});function A9e(){return x(ex,{optionsPanel:x(L9e,{}),children:x(T9e,{})})}var SW={exports:{}},r4={};const wW=Vq(hZ);var ui=wW.jsx,Zy=wW.jsxs;Object.defineProperty(r4,"__esModule",{value:!0});var Ec=C.exports;function CW(e,t){return(CW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var T6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,CW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);T6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},r4.PanViewer=T6,r4.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],P=Ec.useState(!1),E=P[0],k=P[1];return Ec.createElement("div",null,Zy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!E)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Zy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(T6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(E?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=r4})(SW);function I9e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},P=()=>{l>=.5&&u(l-.2)},E=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,N)=>{o(O),s(N)};return te("div",{children:[te("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(E3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(gt,{icon:x(P3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:P,fontSize:20}),x(gt,{icon:x(_3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:E,fontSize:20}),x(gt,{icon:x(k3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(gt,{icon:x(u5e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(gt,{icon:x(k_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(SW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function M9e(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(Y$),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(z_())},g=()=>{e(D_())};return vt("Esc",()=>{t&&e(kl(!1))},[t]),te("div",{className:"lightbox-container",children:[x(gt,{icon:x(C3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(kl(!1))},fontSize:20}),te("div",{className:"lightbox-display-container",children:[te("div",{className:"lightbox-preview-wrapper",children:[x(U$,{}),!r&&te("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(c$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(d$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&x(I9e,{image:n.url,styleClass:"lightbox-image"})]}),x(LH,{})]})]})}function O9e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(Nb,{}),feature:Xr.SEED,options:x(Db,{})},variations:{header:x(Bb,{}),feature:Xr.VARIATIONS,options:x(Fb,{})},face_restore:{header:x(Rb,{}),feature:Xr.FACE_CORRECTION,options:x(jv,{})},upscale:{header:x(zb,{}),feature:Xr.UPSCALE,options:x(Gv,{})}};return te(qb,{children:[x(Gb,{}),x(jb,{}),x(Hb,{}),x(E_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(TH,{}),x($b,{}),e&&x(Wb,{accordionInfo:t})]})}const R9e=Ze([jt,qv],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),N9e=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(R9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(A_,{})}),children:te(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(d4e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(l4e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(u4e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(T$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(c4e(a.target.checked))})]})})},D9e=Ze([jt],e=>{const{eraserSize:t,tool:n}=e;return{tool:n,eraserSize:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),z9e=()=>{const e=$e(),{tool:t,eraserSize:n}=Ce(D9e),r=()=>e(Su("eraser"));return vt("e",i=>{i.preventDefault(),r()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(p$,{}),"data-selected":t==="eraser",onClick:()=>e(Su("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(ch,{label:"Size",value:n,withInput:!0,onChange:i=>e(J5e(i))})})})},B9e=Ze([jt,qv,sn],(e,t,n)=>{const{layer:r,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,tool:l,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}=e,{shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v}=t;return{layer:r,tool:l,maskColor:i,brushColor:o,brushSize:a,eraserSize:s,activeTabName:n,shouldShowGrid:g,shouldSnapToGrid:m,shouldAutoSave:v,shouldDarkenOutsideBoundingBox:u,shouldShowIntermediates:h}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),F9e=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r}=Ce(B9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(g$,{}),"data-selected":t==="brush",onClick:()=>e(Su("brush"))}),children:te(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(ch,{label:"Size",value:r,withInput:!0,onChange:i=>e(x$(i))})}),x(q_,{style:{width:"100%"},color:n,onChange:i=>e(Q5e(i))})]})})},$9e=Ze([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r}=e;return{layer:n,maskColor:t,isMaskEnabled:r}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),H9e=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r}=Ce($9e);return x(ks,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(X5e(t==="mask"?"base":"mask")),icon:x(T5e,{})}),children:te(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(k$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:i=>e(C$(i.target.checked))}),x(Aa,{label:"Invert Mask"}),x(q_,{color:n,onChange:i=>e(_$(i))})]})})},W9e=Ze([jt],e=>{const{tool:t}=e;return{tool:t}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),V9e=()=>{const e=$e(),{tool:t}=Ce(W9e);return te("div",{className:"inpainting-settings",children:[x(H9e,{}),te(Eo,{isAttached:!0,children:[x(F9e,{}),x(z9e,{}),x(gt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(b5e,{}),"data-selected":t==="move",onClick:()=>e(Su("move"))})]}),te(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(P5e,{}),onClick:()=>{e(M_(fl))}}),x(gt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(m$,{})}),x(gt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(L_,{})}),x(gt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(h$,{})})]}),te(Eo,{isAttached:!0,children:[x(OH,{}),x(RH,{})]}),x(Eo,{isAttached:!0,children:x(N9e,{})}),te(Eo,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(T_,{})}),x(gt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(v$,{}),onClick:()=>e(s4e())})]})]})},U9e=Ze([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{objects:n}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),j9e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(U9e);return C.exports.useLayoutEffect(()=>{const i=Ge.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:n?te("div",{className:"inpainting-main-area",children:[x(V9e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(xW,{}):x(bW,{})})]}):x(N_,{})})})};function G9e(){const e=$e();return C.exports.useEffect(()=>{e(M$("outpainting")),e(Cr(!0))},[e]),x(ex,{optionsPanel:x(O9e,{}),styleClass:"inpainting-workarea-overrides",children:x(j9e,{})})}const kf={txt2img:{title:x(c3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(A9e,{}),tooltip:"Text To Image"},img2img:{title:x(o3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(RSe,{}),tooltip:"Image To Image"},inpainting:{title:x(a3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P9e,{}),tooltip:"Inpainting"},outpainting:{title:x(l3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(G9e,{}),tooltip:"Outpainting"},nodes:{title:x(s3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r3e,{}),tooltip:"Nodes"},postprocess:{title:x(u3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(i3e,{}),tooltip:"Post Processing"}},lx=Ge.map(kf,(e,t)=>t);[...lx];function q9e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(Co(0))}),vt("2",()=>{i(Co(1))}),vt("3",()=>{i(Co(2))}),vt("4",()=>{i(Co(3))}),vt("5",()=>{i(Co(4))}),vt("6",()=>{i(Co(5))}),vt("v",()=>{i(kl(!t))},[t]),vt("f",()=>{n||r?(i(b0(!1)),i(m0(!1))):(i(b0(!0)),i(m0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(kf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:kf[l].tooltip,placement:"right",children:x(sF,{children:kf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(kf).forEach(l=>{s.push(x(oF,{className:"app-tabs-panel",children:kf[l].workarea},l))}),s};return te(iF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(Co(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(aF,{className:"app-tabs-panels",children:t?x(M9e,{}):a()})]})}const _W={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},K9e=_W,kW=mb({name:"options",initialState:K9e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=A3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=G5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=A3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:P,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=G5(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=A3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,..._W}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=lx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:ux,setIterations:Y9e,setSteps:EW,setCfgScale:PW,setThreshold:Z9e,setPerlin:X9e,setHeight:LW,setWidth:TW,setSampler:AW,setSeed:Qv,setSeamless:IW,setHiresFix:MW,setImg2imgStrength:f8,setFacetoolStrength:N3,setFacetoolType:D3,setCodeformerFidelity:OW,setUpscalingLevel:h8,setUpscalingStrength:p8,setMaskPath:g8,resetSeed:oEe,resetOptionsState:aEe,setShouldFitToWidthHeight:RW,setParameter:sEe,setShouldGenerateVariations:Q9e,setSeedWeights:NW,setVariationAmount:J9e,setAllParameters:e7e,setShouldRunFacetool:t7e,setShouldRunESRGAN:n7e,setShouldRandomizeSeed:r7e,setShowAdvancedOptions:i7e,setActiveTab:Co,setShouldShowImageDetails:DW,setAllTextToImageParameters:o7e,setAllImageToImageParameters:a7e,setShowDualDisplay:s7e,setInitialImage:xv,clearInitialImage:zW,setShouldShowOptionsPanel:b0,setShouldPinOptionsPanel:l7e,setOptionsPanelScrollPosition:u7e,setShouldHoldOptionsPanelOpen:c7e,setShouldLoopback:d7e,setCurrentTheme:f7e,setIsLightBoxOpen:kl}=kW.actions,h7e=kW.reducer,Al=Object.create(null);Al.open="0";Al.close="1";Al.ping="2";Al.pong="3";Al.message="4";Al.upgrade="5";Al.noop="6";const z3=Object.create(null);Object.keys(Al).forEach(e=>{z3[Al[e]]=e});const p7e={type:"error",data:"parser error"},g7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",m7e=typeof ArrayBuffer=="function",v7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,BW=({type:e,data:t},n,r)=>g7e&&t instanceof Blob?n?r(t):zI(t,r):m7e&&(t instanceof ArrayBuffer||v7e(t))?n?r(t):zI(new Blob([t]),r):r(Al[e]+(t||"")),zI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},BI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},b7e=typeof ArrayBuffer=="function",FW=(e,t)=>{if(typeof e!="string")return{type:"message",data:$W(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:x7e(e.substring(1),t)}:z3[n]?e.length>1?{type:z3[n],data:e.substring(1)}:{type:z3[n]}:p7e},x7e=(e,t)=>{if(b7e){const n=y7e(e);return $W(n,t)}else return{base64:!0,data:e}},$W=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},HW=String.fromCharCode(30),S7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{BW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(HW))})})},w7e=(e,t)=>{const n=e.split(HW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function VW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const _7e=setTimeout,k7e=clearTimeout;function cx(e,t){t.useNativeTimers?(e.setTimeoutFn=_7e.bind(Uc),e.clearTimeoutFn=k7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const E7e=1.33;function P7e(e){return typeof e=="string"?L7e(e):Math.ceil((e.byteLength||e.size)*E7e)}function L7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class T7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class UW extends Vr{constructor(t){super(),this.writable=!1,cx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new T7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=FW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const jW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),m8=64,A7e={};let FI=0,Xy=0,$I;function HI(e){let t="";do t=jW[e%m8]+t,e=Math.floor(e/m8);while(e>0);return t}function GW(){const e=HI(+new Date);return e!==$I?(FI=0,$I=e):e+"."+HI(FI++)}for(;Xy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};w7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,S7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=GW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=qW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new El(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class El extends Vr{constructor(t,n){super(),cx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=VW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new YW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=El.requestsCount++,El.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=O7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete El.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}El.requestsCount=0;El.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",WI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,WI,!1)}}function WI(){for(let e in El.requests)El.requests.hasOwnProperty(e)&&El.requests[e].abort()}const ZW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qy=Uc.WebSocket||Uc.MozWebSocket,VI=!0,D7e="arraybuffer",UI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class z7e extends UW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=UI?{}:VW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=VI&&!UI?n?new Qy(t,n):new Qy(t):new Qy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||D7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{VI&&this.ws.send(o)}catch{}i&&ZW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=GW()),this.supportsBinary||(t.b64=1);const i=qW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Qy}}const B7e={websocket:z7e,polling:N7e},F7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function v8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=F7e.exec(e||""),o={},a=14;for(;a--;)o[$7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=H7e(o,o.path),o.queryKey=W7e(o,o.query),o}function H7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function W7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=v8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=v8(n.host).host),cx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=I7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=WW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new B7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,XW=Object.prototype.toString,G7e=typeof Blob=="function"||typeof Blob<"u"&&XW.call(Blob)==="[object BlobConstructor]",q7e=typeof File=="function"||typeof File<"u"&&XW.call(File)==="[object FileConstructor]";function ik(e){return U7e&&(e instanceof ArrayBuffer||j7e(e))||G7e&&e instanceof Blob||q7e&&e instanceof File}function B3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Q7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Y7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const J7e=Object.freeze(Object.defineProperty({__proto__:null,protocol:Z7e,get PacketType(){return nn},Encoder:X7e,Decoder:ok},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const e_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class QW extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(e_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}i1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};i1.prototype.reset=function(){this.attempts=0};i1.prototype.setMin=function(e){this.ms=e};i1.prototype.setMax=function(e){this.max=e};i1.prototype.setJitter=function(e){this.jitter=e};class x8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,cx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new i1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||J7e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ZW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new QW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bg={};function F3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=V7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Bg[i]&&o in Bg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new x8(r,t):(Bg[i]||(Bg[i]=new x8(r,t)),l=Bg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F3,{Manager:x8,Socket:QW,io:F3,connect:F3});var t_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,n_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,r_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(jI[t]||t||jI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return i_e(e)},P=function(){return o_e(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return GI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return GI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":a_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(t_e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var jI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},GI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},i_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},o_e=function(t){var n=t.getDay();return n===0&&(n=7),n},a_e=function(t){return(String(t).match(n_e)||[""]).pop().replace(r_e,"").replace(/GMT\+0000/g,"UTC")};const s_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(wA(!0)),t(l6("Connected")),t(v4e());const r=n().gallery;r.categories.user.latest_mtime?t(AA("user")):t(HC("user")),r.categories.result.latest_mtime?t(AA("result")):t(HC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(wA(!1)),t(l6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Lp(),...r,category:"result"};if(t(Ay({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(a4e({image:a,boundingBox:s}))}if(i)switch(lx[o]){case"img2img":{t(xv(a));break}case"inpainting":{t(q5(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(R4e({uuid:Lp(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Ay({category:"result",image:{uuid:Lp(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(g0(!0)),t(Q3e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(FC()),t(RA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Lp(),...l}));t(O4e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(t5e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Ay({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(RA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(G$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(zW()),a===i&&t(g8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Lp(),...o};try{switch(t(Ay({image:a,category:"user"})),i){case"img2img":{t(xv(a));break}case"inpainting":{t(q5(a));break}default:{t(q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(g8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(J3e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(CA(o)),t(l6("Model Changed")),t(g0(!1)),t(_A(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(CA(o)),t(g0(!1)),t(_A(!0)),t(FC()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},l_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Rg.Stage({container:i,width:n,height:r}),a=new Rg.Layer,s=new Rg.Layer;a.add(new Rg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Rg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},u_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},c_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:P,hiresFix:E,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:N,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:H,upscalingStrength:W,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:ne,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:J,saveIntermediatesInterval:q,enableImageDebugging:V}=i,G={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:J==="full-res",progress_latents:J==="latents",save_intermediates:q,generation_mode:t,init_mask:""};if(G.seed=ie?o$(C_,__):w,["txt2img","img2img"].includes(t)&&(G.seamless=P,G.hires_fix=E),t==="img2img"&&L&&(G.init_img=typeof L=="string"?L:L.url,G.strength=k,G.fit=I),["inpainting","outpainting"].includes(t)&&fl.current){const{objects:me,boundingBoxCoordinates:xe,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:Ue,stageScale:ut,isMaskEnabled:Xe}=r[r.currentCanvas],et={...xe,...Se},tt=l_e(Xe?me.filter(Vb):[],et);if(G.init_mask=tt,G.fit=!1,G.init_img=o,G.strength=k,Ue&&(G.inpaint_replace=He),G.bounding_box=et,t==="outpainting"){const at=fl.current.scale();fl.current.scale({x:1/ut,y:1/ut});const At=fl.current.getAbsolutePosition(),wt=fl.current.toDataURL({x:et.x+At.x,y:et.y+At.y,width:et.width,height:et.height});V&&u_e([{base64:tt,caption:"mask sent as init_mask"},{base64:wt,caption:"image sent as init_img"}]),fl.current.scale(at),G.init_img=wt,G.progress_images=!1,G.seam_size=96,G.seam_blur=16,G.seam_strength=.7,G.seam_steps=10,G.tile_size=32,G.force_outpaint=!1}}O?(G.variation_amount=N,D&&(G.with_variations=w2e(D))):G.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:H,strength:W}),Y&&(X={type:ne,strength:de},ne==="codeformer"&&(X.codeformer_fidelity=j)),V&&(G.enable_image_debugging=V),{generationParameters:G,esrganParameters:Q,facetoolParameters:X}},d_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(g0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=J0(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(FC());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=c_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(g0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(g0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(G$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(n5e()),t.emit("requestModelChange",i)}}},f_e=()=>{const{origin:e}=new URL(window.location.href),t=F3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:P,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=s_e(i),{emitGenerateImage:N,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:H,emitRequestImages:W,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:ne,emitRequestSystemConfig:ie,emitRequestModelChange:J}=d_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",q=>u(q)),t.on("generationResult",q=>g(q)),t.on("postprocessingResult",q=>h(q)),t.on("intermediateResult",q=>m(q)),t.on("progressUpdate",q=>v(q)),t.on("galleryImages",q=>b(q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",q=>{P(q)}),t.on("imageUploaded",q=>{E(q)}),t.on("maskImageUploaded",q=>{k(q)}),t.on("systemConfig",q=>{L(q)}),t.on("modelChanged",q=>{I(q)}),t.on("modelChangeFailed",q=>{O(q)}),n=!0),a.type){case"socketio/generateImage":{N(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{H(a.payload);break}case"socketio/requestImages":{W(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{ne(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{J(a.payload);break}}o(a)}},JW=["pastObjects","futureObjects","stageScale","stageDimensions","stageCoordinates","cursorPosition"],h_e=JW.map(e=>`canvas.inpainting.${e}`),p_e=JW.map(e=>`canvas.outpainting.${e}`),g_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),m_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),eV=vF({options:h7e,gallery:$4e,system:o5e,canvas:f4e}),v_e=zF.getPersistConfig({key:"root",storage:DF,rootReducer:eV,blacklist:[...h_e,...p_e,...g_e,...m_e],throttle:500}),y_e=o2e(v_e,eV),tV=Qme({reducer:y_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(f_e())}),$e=Uve,Ce=Ove;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function b_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Bv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),__e=Ze(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(__e),i=t?Math.round(t*100/n):0;return x($B,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function E_e(e){const{title:t,hotkey:n,description:r}=e;return te("div",{className:"hotkey-modal-item",children:[te("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function P_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=O5(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(E_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return te(Xn,{children:[C.exports.cloneElement(e,{onClick:n}),te(N0,{isOpen:t,onClose:r,children:[x(gv,{}),te(pv,{className:" modal hotkeys-modal",children:[x(V7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:te(nb,{allowMultiple:!0,children:[te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),te(Nc,{children:[te(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const L_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(y4e(i))};return te("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(mz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},T_e=Ze(e=>e.system,e=>{const t=Ge.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),A_e=()=>{const{models:e}=Ce(T_e);return x(nb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:te(Nc,{children:[x(Oc,{children:te("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(L_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},I_e=Ze(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ge.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),M_e=({children:e})=>{const t=$e(),n=Ce(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=O5(),{isOpen:a,onOpen:s,onClose:l}=O5(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(I_e),b=()=>{pV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(r5e(P))};return te(Xn,{children:[C.exports.cloneElement(e,{onClick:i}),te(N0,{isOpen:r,onClose:o,children:[x(gv,{}),te(pv,{className:"modal settings-modal",children:[x(j7,{className:"settings-modal-header",children:"Settings"}),x(V7,{className:"modal-close-btn"}),te(z5,{className:"settings-modal-content",children:[te("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(A_e,{})}),te("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(uh,{label:"Display In-Progress Images",validValues:v3e,value:u,onChange:P=>t(Z3e(P.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(s$(P.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:P=>t(e5e(P.target.checked))})]}),te("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(i5e(P.target.checked))})]}),te("div",{className:"settings-modal-reset",children:[x($f,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(ko,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(ko,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(U7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),te(N0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(gv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(pv,{children:x(z5,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(ko,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},O_e=Ze(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),R_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(O_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(ko,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(l$())},className:`status ${l}`,children:u})})},N_e=["dark","light","green"];function D_e(){const{setColorMode:e}=Pv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(uh,{validValues:N_e,value:n,onChange:i=>{e(i.target.value),t(f7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const z_e=()=>te("div",{className:"site-header",children:[te("div",{className:"site-header-left-side",children:[x("img",{src:V$,alt:"invoke-ai-logo"}),te("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),te("div",{className:"site-header-right-side",children:[x(R_e,{}),x(P_e,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(E5e,{})})}),x(D_e,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Hf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(S5e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Hf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(v5e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Hf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(m5e,{})})}),x(M_e,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(A_,{})})})]})]}),B_e=Ze(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),F_e=Ze(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),$_e=()=>{const e=$e(),t=Ce(B_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(F_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(l$()),e(s6(!n))};return vt("`",()=>{e(s6(!n))},[n]),vt("esc",()=>{e(s6(!1))}),te(Xn,{children:[n&&x(X$,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return te("div",{className:`console-entry console-${b}-color`,children:[te("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(y5e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(A5e,{}):x(f$,{}),onClick:l})})]})};function H_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var W_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jv(e,t){var n=V_e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function V_e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=W_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var U_e=[".DS_Store","Thumbs.db"];function j_e(e){return G0(this,void 0,void 0,function(){return q0(this,function(t){return i4(e)&&G_e(e.dataTransfer)?[2,Z_e(e.dataTransfer,e.type)]:q_e(e)?[2,K_e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Y_e(e)]:[2,[]]})})}function G_e(e){return i4(e)}function q_e(e){return i4(e)&&i4(e.target)}function i4(e){return typeof e=="object"&&e!==null}function K_e(e){return C8(e.target.files).map(function(t){return Jv(t)})}function Y_e(e){return G0(this,void 0,void 0,function(){var t;return q0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Jv(r)})]}})})}function Z_e(e,t){return G0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=C8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(X_e))]):[3,2];case 1:return r=i.sent(),[2,KI(rV(r))];case 2:return[2,KI(C8(e.files).map(function(o){return Jv(o)}))]}})})}function KI(e){return e.filter(function(t){return U_e.indexOf(t.name)===-1})}function C8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,JI(n)];if(e.sizen)return[!1,JI(n)]}return[!0,null]}function Ef(e){return e!=null}function hke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=sV(l,n),h=Sv(u,1),g=h[0],m=lV(l,r,i),v=Sv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function o4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jy(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function tM(e){e.preventDefault()}function pke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gke(e){return e.indexOf("Edge/")!==-1}function mke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pke(e)||gke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Oke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ak=C.exports.forwardRef(function(e,t){var n=e.children,r=a4(e,wke),i=hV(r),o=i.open,a=a4(i,Cke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});ak.displayName="Dropzone";var fV={disabled:!1,getFilesFromEvent:j_e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ak.defaultProps=fV;ak.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var P8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function hV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},fV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,N=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,H=t.validator,W=C.exports.useMemo(function(){return bke(n)},[n]),Y=C.exports.useMemo(function(){return yke(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:rM},[P]),j=C.exports.useMemo(function(){return typeof w=="function"?w:rM},[w]),ne=C.exports.useRef(null),ie=C.exports.useRef(null),J=C.exports.useReducer(Rke,P8),q=A6(J,2),V=q[0],G=q[1],Q=V.isFocused,X=V.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&vke()),xe=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(G({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(Je){ne.current&&ne.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",tM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",tM),document.removeEventListener("drop",He))}},[ne,L]),C.exports.useEffect(function(){return!r&&k&&ne.current&&ne.current.focus(),function(){}},[ne,k,r]);var Ue=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ut=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(Eke(Se.current),[Me.target]),Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){if(!(o4(Me)&&!D)){var Xt=Je.length,qt=Xt>0&&hke({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:H}),Ee=Xt>0&&!qt;G({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(Je){return Ue(Je)})},[i,u,Ue,D,W,a,o,s,l,H]),Xe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Jy(Me);if(Je&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return Je&&g&&g(Me),!1},[g,D]),et=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var Je=Se.current.filter(function(qt){return ne.current&&ne.current.contains(qt)}),Xt=Je.indexOf(Me.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Jy(Me)&&h&&h(Me))},[ne,h,D]),tt=C.exports.useCallback(function(Me,Je){var Xt=[],qt=[];Me.forEach(function(Ee){var It=sV(Ee,W),Ne=A6(It,2),st=Ne[0],ln=Ne[1],Dn=lV(Ee,a,o),Fe=A6(Dn,2),pt=Fe[0],rt=Fe[1],Nt=H?H(Ee):null;if(st&&pt&&!Nt)Xt.push(Ee);else{var Qt=[ln,rt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[fke]})}),Xt.splice(0)),G({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,Je),qt.length>0&&b&&b(qt,Je),Xt.length>0&&v&&v(Xt,Je)},[G,s,W,a,o,l,m,v,b,H]),at=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],Jy(Me)&&Promise.resolve(i(Me)).then(function(Je){o4(Me)&&!D||tt(Je,Me)}).catch(function(Je){return Ue(Je)}),G({type:"reset"})},[i,tt,Ue,D]),At=C.exports.useCallback(function(){if(me.current){G({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(Je){return i(Je)}).then(function(Je){tt(Je,null),G({type:"closeDialog"})}).catch(function(Je){xke(Je)?(j(Je),G({type:"closeDialog"})):Ske(Je)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):Ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Ue(Je)});return}ie.current&&(G({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[G,de,j,E,tt,Ue,Y,s]),wt=C.exports.useCallback(function(Me){!ne.current||!ne.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),At())},[ne,At]),Ae=C.exports.useCallback(function(){G({type:"focus"})},[]),dt=C.exports.useCallback(function(){G({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(mke()?setTimeout(At,0):At())},[I,At]),ct=function(Je){return r?null:Je},xt=function(Je){return O?null:ct(Je)},kn=function(Je){return N?null:ct(Je)},Et=function(Je){D&&Je.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Me.refKey,Xt=Je===void 0?"ref":Je,qt=Me.role,Ee=Me.onKeyDown,It=Me.onFocus,Ne=Me.onBlur,st=Me.onClick,ln=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,pt=Me.onDrop,rt=a4(Me,_ke);return ur(ur(E8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(It,Ae)),onBlur:xt(ol(Ne,dt)),onClick:ct(ol(st,Mt)),onDragEnter:kn(ol(ln,ut)),onDragOver:kn(ol(Dn,Xe)),onDragLeave:kn(ol(Fe,et)),onDrop:kn(ol(pt,at)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,ne),!r&&!O?{tabIndex:0}:{}),rt)}},[ne,wt,Ae,dt,Mt,ut,Xe,et,at,O,N,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Me.refKey,Xt=Je===void 0?"ref":Je,qt=Me.onChange,Ee=Me.onClick,It=a4(Me,kke),Ne=E8({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:ct(ol(qt,at)),onClick:ct(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),It)}},[ie,n,s,at,r]);return ur(ur({},V),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:ne,inputRef:ie,open:ct(At)})}function Rke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},P8),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},P8);default:return e}}function rM(){}const Nke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),te("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:te($f,{size:"lg",children:["Upload Image",r]})}),n&&te("div",{className:"dropzone-overlay is-drag-reject",children:[x($f,{size:"lg",children:"Invalid Upload"}),x($f,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},Dke=e=>{const{children:t}=e,n=$e(),r=Ce(sn),i=lh({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(E=>{a(!0);const k=E.errors.reduce((L,I)=>L+` -`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(E=>{a(!0);const k={file:E};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(IA(k))},[n,r]),u=C.exports.useCallback((E,k)=>{k.forEach(L=>{s(L)}),E.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=hV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const E=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const N={file:O};["img2img","inpainting"].includes(r)&&(N.destination=r),n(IA(N))};return document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E)}},[n,i,r]);const P=["img2img","inpainting"].includes(r)?` to ${kf[r].tooltip}`:"";return x(R_.Provider,{value:w,children:te("div",{...h({style:{}}),onKeyDown:E=>{E.key},children:[x("input",{...g()}),t,b&&o&&x(Nke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},zke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(m0(!0)),t&&e(Cr(!0))},children:x(u$,{})})};function Bke(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Fke=Ze(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),$ke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Fke);return te("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(b0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Bke,{})}),t&&te(Xn,{children:[x(R$,{iconButton:!0}),x(D$,{}),x(N$,{})]})]})};H_e();const Hke=Ze([e=>e.gallery,e=>e.options,e=>e.system,sn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ge.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ge.isEqual}}),Wke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Hke);return x("div",{className:"App",children:te(Dke,{children:[x(k_e,{}),te("div",{className:"app-content",children:[x(z_e,{}),x(q9e,{})]}),x("div",{className:"app-console",children:x($_e,{})}),e&&x(zke,{}),t&&x($ke,{})]})})};const pV=d2e(tV),Vke=AR({key:"invokeai-style-cache",prepend:!0});M6.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(Hve,{store:tV,children:x(nV,{loading:x(C_e,{}),persistor:pV,children:x(_Q,{value:Vke,children:x(mme,{children:x(Wke,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index c4396e1ad0..c034553ec8 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -8,6 +8,7 @@ <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development +<<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development @@ -21,6 +22,10 @@ >>>>>>> Fixes inpainting + code cleanup >>>>>>> Builds fresh bundle +======= + + +>>>>>>> Builds fresh bundle From 17b295871f6c702f5f5cd0ea26e12e9345068372 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 00:05:57 +1100 Subject: [PATCH 047/220] Outpainting tab loads to empty canvas instead of upload --- .../{index.205e5ea1.js => index.7f5e02f1.js} | 70 +++++++++---------- frontend/dist/index.html | 4 ++ frontend/src/app/socketio/emitters.ts | 2 +- .../features/canvas/IAICanvasBoundingBox.tsx | 20 ++++-- .../src/features/canvas/IAICanvasResizer.tsx | 6 +- frontend/src/features/canvas/canvasSlice.ts | 22 +++--- .../tabs/Outpainting/OutpaintingDisplay.tsx | 10 ++- 7 files changed, 77 insertions(+), 57 deletions(-) rename frontend/dist/assets/{index.205e5ea1.js => index.7f5e02f1.js} (66%) diff --git a/frontend/dist/assets/index.205e5ea1.js b/frontend/dist/assets/index.7f5e02f1.js similarity index 66% rename from frontend/dist/assets/index.205e5ea1.js rename to frontend/dist/assets/index.7f5e02f1.js index cbc7acfa14..e14d954227 100644 --- a/frontend/dist/assets/index.205e5ea1.js +++ b/frontend/dist/assets/index.7f5e02f1.js @@ -1,4 +1,4 @@ -function Zq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function AC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** +function Zq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function Zq(e,t){for(var n=0;n>>1,me=W[X];if(0>>1;Xi(He,Q))jei(ct,He)?(W[X]=ct,W[je]=Q,X=je):(W[X]=He,W[Se]=Q,X=Se);else if(jei(ct,Q))W[X]=ct,W[je]=Q,X=je;else break e}}return q}function i(W,q){var Q=W.sortIndex-q.sortIndex;return Q!==0?Q:W.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(W){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=W)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(W){if(w=!1,L(W),!b)if(n(l)!==null)b=!0,le(O);else{var q=n(u);q!==null&&G(I,q.startTime-W)}}function O(W,q){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var Q=m;try{for(L(q),g=n(l);g!==null&&(!(g.expirationTime>q)||W&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var R=!1,D=null,z=-1,$=5,V=-1;function Y(){return!(e.unstable_now()-V<$)}function de(){if(D!==null){var W=e.unstable_now();V=W;var q=!0;try{q=D(!0,W)}finally{q?j():(R=!1,D=null)}}else R=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=de,j=function(){ie.postMessage(null)}}else j=function(){E(de,0)};function le(W){D=W,R||(R=!0,j())}function G(W,q){z=E(function(){W(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,le(O))},e.unstable_forceFrameRate=function(W){0>W||125X?(W.sortIndex=Q,t(u,W),n(l)===null&&W===n(u)&&(w?(P(z),z=-1):w=!0,G(I,Q-X))):(W.sortIndex=me,t(l,W),b||v||(b=!0,le(O))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var q=m;return function(){var Q=m;m=q;try{return W.apply(this,arguments)}finally{m=Q}}}})(hM);(function(e){e.exports=hM})(Yp);/** + */(function(e){function t(W,q){var Q=W.length;W.push(q);e:for(;0>>1,me=W[X];if(0>>1;Xi(He,Q))jei(ct,He)?(W[X]=ct,W[je]=Q,X=je):(W[X]=He,W[Se]=Q,X=Se);else if(jei(ct,Q))W[X]=ct,W[je]=Q,X=je;else break e}}return q}function i(W,q){var Q=W.sortIndex-q.sortIndex;return Q!==0?Q:W.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(W){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=W)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(W){if(w=!1,L(W),!b)if(n(l)!==null)b=!0,le(O);else{var q=n(u);q!==null&&G(I,q.startTime-W)}}function O(W,q){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var Q=m;try{for(L(q),g=n(l);g!==null&&(!(g.expirationTime>q)||W&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var R=!1,D=null,z=-1,$=5,V=-1;function Y(){return!(e.unstable_now()-V<$)}function de(){if(D!==null){var W=e.unstable_now();V=W;var q=!0;try{q=D(!0,W)}finally{q?j():(R=!1,D=null)}}else R=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=de,j=function(){ie.postMessage(null)}}else j=function(){E(de,0)};function le(W){D=W,R||(R=!0,j())}function G(W,q){z=E(function(){W(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,le(O))},e.unstable_forceFrameRate=function(W){0>W||125X?(W.sortIndex=Q,t(u,W),n(l)===null&&W===n(u)&&(w?(P(z),z=-1):w=!0,G(I,Q-X))):(W.sortIndex=me,t(l,W),b||v||(b=!0,le(O))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var q=m;return function(){var Q=m;m=q;try{return W.apply(this,arguments)}finally{m=Q}}}})(fM);(function(e){e.exports=fM})(Yp);/** * @license React * react-dom.production.min.js * @@ -22,14 +22,14 @@ function Zq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rE={},iE={};function pK(e){return N6.call(iE,e)?!0:N6.call(rE,e)?!1:hK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function gK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mK(e,t,n,r){if(t===null||typeof t>"u"||gK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function so(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new so(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var NC=/[\-:]([a-z])/g;function DC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(NC,DC);Oi[t]=new so(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(NC,DC);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(NC,DC);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function zC(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nE={},rE={};function pK(e){return N6.call(rE,e)?!0:N6.call(nE,e)?!1:hK.test(e)?rE[e]=!0:(nE[e]=!0,!1)}function gK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mK(e,t,n,r){if(t===null||typeof t>"u"||gK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function so(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new so(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vg(e):""}function vK(e){switch(e.tag){case 5:return Vg(e.type);case 16:return Vg("Lazy");case 13:return Vg("Suspense");case 19:return Vg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case BC:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vM:return(e.displayName||"Context")+".Consumer";case mM:return(e._context.displayName||"Context")+".Provider";case FC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $C:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F6(t);case 8:return t===BC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=bM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function G2(e){e._valueTracker||(e._valueTracker=bK(e))}function xM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function SM(e,t){t=t.checked,t!=null&&zC(e,"checked",t,!1)}function H6(e,t){SM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ug=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=q2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var am={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xK=["Webkit","ms","Moz","O"];Object.keys(am).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),am[t]=am[e]})});function kM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||am.hasOwnProperty(e)&&am[e]?(""+t).trim():t+"px"}function EM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=kM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q6=null;function HC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function cE(e){if(e=Tv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function PM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function LM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var K2=64,Y2=4194304;function jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=jg(s):(o&=a,o!==0&&(r=jg(o)))}else a=n&~i,a!==0?r=jg(a):o!==0&&(r=jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Pv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=lm),bE=String.fromCharCode(32),xE=!1;function KM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return YM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!YC&&KM(e,t)?(e=GM(),o3=GC=Fc=null,Np=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_E(n)}}function JM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eO(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function ZC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CY(e){var t=eO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JM(n.ownerDocument.documentElement,n)){if(r!==null&&ZC(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=kE(n,o);var a=kE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dp=null,ew=null,cm=null,tw=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&ZC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cm&&Vm(cm,r)||(cm=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function qn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));qn(Vi,t),qn(Lo,n)}function uO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,qn(Vi,e),qn(Lo,Lo.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=uO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),qn(Vi,e)):Xn(Lo),qn(Lo,n)}var ou=null,p5=!1,aS=!1;function cO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,cO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Ug(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ny(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=yO(!0),bO=yO(!1),Av={},yl=hd(Av),qm=hd(Av),Km=hd(Av);function If(e){if(e===Av)throw Error(Oe(174));return e}function o8(e,t){switch(qn(Km,t),qn(qm,e),qn(yl,Av),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),qn(yl,t)}function L0(){Xn(yl),Xn(qm),Xn(Km)}function xO(e){If(Km.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(qn(qm,e),qn(yl,n))}function a8(e){qm.current===e&&(Xn(yl),Xn(qm))}var cr=hd(0);function s4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sS=[];function s8(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function DO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zO(e))BO(t,n);else if(n=pO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),FO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zO(e))BO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r8(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=pO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),FO(n,t,r))}}function zO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function BO(e,t){dm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,VC(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,IO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f8,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||CO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(kO.bind(null,r,o,e),[e]),r.flags|=2048,Xm(9,_O.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ym++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vg(e):""}function vK(e){switch(e.tag){case 5:return Vg(e.type);case 16:return Vg("Lazy");case 13:return Vg("Suspense");case 19:return Vg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case B8:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function G2(e){e._valueTracker||(e._valueTracker=bK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function H6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ug=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=q2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var am={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xK=["Webkit","ms","Moz","O"];Object.keys(am).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),am[t]=am[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||am.hasOwnProperty(e)&&am[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function uE(e){if(e=Tv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function EM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function PM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,uE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var K2=64,Y2=4194304;function jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=jg(s):(o&=a,o!==0&&(r=jg(o)))}else a=n&~i,a!==0?r=jg(a):o!==0&&(r=jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Pv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=lm),yE=String.fromCharCode(32),bE=!1;function qM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(bE=!0,yE);case"textInput":return e=t.data,e===yE&&bE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),o3=G8=Fc=null,Np=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CE(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_E(n,o);var a=_E(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dp=null,ew=null,cm=null,tw=!1;function kE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cm&&Vm(cm,r)||(cm=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function qn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function ME(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));qn(Vi,t),qn(Lo,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,qn(Vi,e),qn(Lo,Lo.current),!0}function OE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),qn(Vi,e)):Xn(Lo),qn(Lo,n)}var ou=null,p5=!1,aS=!1;function uO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,uO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&$E(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Ug(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ny(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=vO(!0),yO=vO(!1),Av={},yl=hd(Av),qm=hd(Av),Km=hd(Av);function If(e){if(e===Av)throw Error(Oe(174));return e}function oC(e,t){switch(qn(Km,t),qn(qm,e),qn(yl,Av),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),qn(yl,t)}function L0(){Xn(yl),Xn(qm),Xn(Km)}function bO(e){If(Km.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(qn(qm,e),qn(yl,n))}function aC(e){qm.current===e&&(Xn(yl),Xn(qm))}var cr=hd(0);function s4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sS=[];function sC(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function NO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),BO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,rC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){dm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:WE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:HE,useDebugValue:fC,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=HE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,WE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Xm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ym++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[Gm]=r,KO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304)}else{if(!r)if(e=s4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return y8(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(QC(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),s8(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a8(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return n8(t.type._context),null;case 22:case 23:return y8(),null;case 24:return null;default:return null}}var iy=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function XY(e,t){if(nw=Z3,e=eO(),ZC(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=QE,QE=!1,b}function fm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function XO(e){var t=e.alternate;t!==null&&(e.alternate=null,XO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Gm],delete t[aw],delete t[OY],delete t[RY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function QO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)JO(e,t,n),n=n.sibling}function JO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),Hm(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m8?Df(e,0):g8|=n),Ao(e,t)}function sR(e,t){t===0&&((e.mode&1)===0?t=1:(t=Y2,Y2<<=1,(Y2&130023424)===0&&(Y2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Pv(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sR(e,n)}function aZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),sR(e,n)}var lR;lR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&dO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=u8(null,t,r,e,i,n);var o=c8();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i8(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&XC(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(jO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,gO(e,t),a4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=T0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=bO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return xO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),UO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return GO(e,t,n);case 4:return o8(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=du(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return WO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),vO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return qO(e,t,n);case 22:return VO(e,t,n)}throw Error(Oe(156,t.tag))};function uR(e,t){return NM(e,t)}function sZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new sZ(e,t,n,r)}function x8(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return x8(e)?1:0;if(e!=null){if(e=e.$$typeof,e===FC)return 11;if(e===$C)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x8(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case BC:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case yM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mM:a=10;break e;case vM:a=9;break e;case FC:a=11;break e;case $C:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=yM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S8(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i8(o),e}function cZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Al);const sy=AC(Al.exports);var lP=Al.exports;U3.createRoot=lP.createRoot,U3.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function dS(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hw(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UY=typeof WeakMap=="function"?WeakMap:Map;function FO(e,t,n){n=du(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){d4||(d4=!0,Cw=r),hw(e,t)},n}function $O(e,t,n){n=du(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hw(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){hw(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function VE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UY;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iZ.bind(null,e,t,n),t.then(e,e))}function UE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function jE(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=du(-1,1),t.tag=2,Yc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var jY=Cu.ReactCurrentOwner,Po=!1;function no(e,t,n,r){t.child=e===null?yO(t,null,n,r):P0(t,e.child,n,r)}function GE(e,t,n,r,i){n=n.render;var o=t.ref;return e0(t,i),r=uC(e,t,n,r,o,i),n=cC(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gu(e,t,i)):(rr&&n&&X8(t),t.flags|=1,no(e,t,r,i),t.child)}function qE(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!xC(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,HO(e,t,o,r,i)):(e=h3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Vm,n(a,r)&&e.ref===t.ref)return gu(e,t,i)}return t.flags|=1,e=Qc(o,r),e.ref=t.ref,e.return=t,t.child=e}function HO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Vm(o,r)&&e.ref===t.ref)if(Po=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Po=!0);else return t.lanes=e.lanes,gu(e,t,i)}return pw(e,t,n,r,i)}function WO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(Up,ea),ea|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qn(Up,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,qn(Up,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,qn(Up,ea),ea|=r;return no(e,t,i,n),t.child}function VO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pw(e,t,n,r,i){var o=To(n)?jf:Vi.current;return o=k0(t,o),e0(t,i),n=uC(e,t,n,r,o,i),r=cC(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gu(e,t,i)):(rr&&r&&X8(t),t.flags|=1,no(e,t,n,i),t.child)}function KE(e,t,n,r,i){if(To(n)){var o=!0;t4(t)}else o=!1;if(e0(t,i),t.stateNode===null)c3(e,t),mO(t,n,r),fw(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Da(u):(u=To(n)?jf:Vi.current,u=k0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&FE(t,a,r,u),Lc=!1;var m=t.memoizedState;a.state=m,a4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Lo.current||Lc?(typeof h=="function"&&(dw(t,n,h,r),l=t.memoizedState),(s=Lc||BE(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,pO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ds(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Da(l):(l=To(n)?jf:Vi.current,l=k0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&FE(t,a,r,l),Lc=!1,m=t.memoizedState,a.state=m,a4(t,r,a,i);var b=t.memoizedState;s!==g||m!==b||Lo.current||Lc?(typeof v=="function"&&(dw(t,n,v,r),b=t.memoizedState),(u=Lc||BE(t,n,u,r,m,b,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return gw(e,t,n,r,o,i)}function gw(e,t,n,r,i,o){VO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&OE(t,n,!1),gu(e,t,o);r=t.stateNode,jY.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=P0(t,e.child,null,o),t.child=P0(t,null,s,o)):no(e,t,s,o),t.memoizedState=r.state,i&&OE(t,n,!0),t.child}function UO(e){var t=e.stateNode;t.pendingContext?ME(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ME(e,t.context,!1),oC(e,t.containerInfo)}function YE(e,t,n,r,i){return E0(),J8(i),t.flags|=256,no(e,t,n,r),t.child}var mw={dehydrated:null,treeContext:null,retryLane:0};function vw(e){return{baseLanes:e,cachePool:null,transitions:null}}function jO(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qn(cr,i&1),e===null)return uw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=b5(a,r,0,null),e=zf(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=vw(n),t.memoizedState=mw,e):hC(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return GY(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qc(s,o):(o=zf(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?vw(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=mw,r}return o=e.child,e=o.sibling,r=Qc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function hC(e,t){return t=b5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ry(e,t,n,r){return r!==null&&J8(r),P0(t,e.child,null,n),e=hC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GY(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=dS(Error(Oe(422))),ry(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=b5({mode:"visible",children:r.children},i,0,null),o=zf(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&P0(t,e.child,null,a),t.child.memoizedState=vw(a),t.memoizedState=mw,o);if((t.mode&1)===0)return ry(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Oe(419)),r=dS(o,r,void 0),ry(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=di,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,pu(e,i),ys(r,e,i,-1))}return bC(),r=dS(Error(Oe(421))),ry(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=oZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,na=Kc(i.nextSibling),ra=t,rr=!0,ps=null,e!==null&&(Pa[La++]=lu,Pa[La++]=uu,Pa[La++]=Gf,lu=e.id,uu=e.overflow,Gf=t),t=hC(t,r.children),t.flags|=4096,t)}function ZE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cw(e.return,t,n)}function fS(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function GO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(no(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ZE(e,n,t);else if(e.tag===19)ZE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&s4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fS(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&s4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fS(t,!0,n,null,o);break;case"together":fS(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function c3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Qc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qY(e,t,n){switch(t.tag){case 3:UO(t),E0();break;case 5:bO(t);break;case 1:To(t.type)&&t4(t);break;case 4:oC(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qn(i4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?jO(e,t,n):(qn(cr,cr.current&1),e=gu(e,t,n),e!==null?e.sibling:null);qn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return GO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,WO(e,t,n)}return gu(e,t,n)}var qO,yw,KO,YO;qO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yw=function(){};KO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,If(yl.current);var o=null;switch(n){case"input":i=$6(e,i),r=$6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=V6(e,i),r=V6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=J3)}j6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Dm.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Dm.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Yn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};YO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Sg(e,t){if(!rr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function KY(e,t,n){var r=t.pendingProps;switch(Q8(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fi(t),null;case 1:return To(t.type)&&e4(),Fi(t),null;case 3:return r=t.stateNode,L0(),Xn(Lo),Xn(Vi),sC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ty(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps!==null&&(Ew(ps),ps=null))),yw(e,t),Fi(t),null;case 5:aC(t);var i=If(Km.current);if(n=t.type,e!==null&&t.stateNode!=null)KO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Fi(t),null}if(e=If(yl.current),ty(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[fl]=t,r[Gm]=o,e=(t.mode&1)!==0,n){case"dialog":Yn("cancel",r),Yn("close",r);break;case"iframe":case"object":case"embed":Yn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[Gm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304)}else{if(!r)if(e=s4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return yC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(Q8(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),sC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return aC(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return nC(t.type._context),null;case 22:case 23:return yC(),null;case 24:return null;default:return null}}var iy=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var XE=!1;function XY(e,t){if(nw=Z3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=XE,XE=!1,b}function fm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Gm],delete t[aw],delete t[OY],delete t[RY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function QE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),Hm(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function JE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-mC?Df(e,0):gC|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=Y2,Y2<<=1,(Y2&130023424)===0&&(Y2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Pv(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function aZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=uC(null,t,r,e,i,n);var o=cC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iC(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=KE(null,t,r,e,n);break e;case 11:t=GE(null,t,r,e,n);break e;case 14:t=qE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),KE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),a4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=T0(Error(Oe(423)),t),t=YE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=YE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return jO(e,t,n);case 4:return oC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),GE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=du(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),qE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),mO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function sZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new sZ(e,t,n,r)}function xC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return xC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")xC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case B8:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case vM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function SC(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iC(o),e}function cZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Al);const sy=A8(Al.exports);var sP=Al.exports;U3.createRoot=sP.createRoot,U3.hydrateRoot=sP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var gZ=C.exports,mZ=Symbol.for("react.element"),vZ=Symbol.for("react.fragment"),yZ=Object.prototype.hasOwnProperty,bZ=gZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xZ={key:!0,ref:!0,__self:!0,__source:!0};function hR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)yZ.call(t,r)&&!xZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:mZ,type:e,key:o,ref:a,props:i,_owner:bZ.current}}k5.Fragment=vZ;k5.jsx=hR;k5.jsxs=hR;(function(e){e.exports=k5})(_5);const Hn=_5.exports.Fragment,x=_5.exports.jsx,ee=_5.exports.jsxs,SZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Hn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var k8=C.exports.createContext({});k8.displayName="ColorModeContext";function Iv(){const e=C.exports.useContext(k8);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var ly={light:"chakra-ui-light",dark:"chakra-ui-dark"};function wZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?ly.dark:ly.light),document.body.classList.remove(r?ly.light:ly.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var CZ="chakra-ui-color-mode";function _Z(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var kZ=_Z(CZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function pR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?uP:k,setColorMode:t?uP:P,forced:t!==void 0}),[E,k,P,t]);return x(k8.Provider,{value:L,children:n})}pR.displayName="ColorModeProvider";var Pw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Vn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Vn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Vn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Vn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return EZ(e)?e(...t):e}var EZ=e=>typeof e=="function",PZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Jm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var uy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Jm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Jm({scale:n,compose:r}):r}}var gR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...gR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...gR].join(" ")}var MZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},OZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function RZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},mR="& > :not(style) ~ :not(style)",DZ={[mR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[mR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},BZ=new Set(Object.values(Tw)),vR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||vR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=yR(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var yR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(e){return/^var\(--.+\)$/.test(e)}var VZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=VZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||yR(e)||vR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",uy(rn.vh,rn.px)),spaceT:as("space",uy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Jm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",uy(rn.vh,rn.px)),sizesT:as("sizes",uy(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Jm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Jm({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(g4,{flexDir:g4.flexDirection});var bR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},gm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(gm,{insetStart:gm.insetInlineStart,insetEnd:gm.insetInlineEnd});var eX={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Zn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},rX={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},iX={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},oX={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function xR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(xR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${E5("+",...e)})`,hP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,pP=(...e)=>`calc(${E5("/",...e)})`,gP=e=>{const t=xR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(fP(e,...t)),subtract:(...t)=>kf(hP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(pP(e,...t)),negate:()=>kf(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Iw,divide:pP,negate:gP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var SR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E8=e=>Object.fromEntries(Object.entries(e).sort(SR));function mP(e){const t=E8(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(E8(e));return new Set(t)}function vP(e){if(!e)return e;e=Mw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function qg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(SR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:qg(null,u),minWQuery:qg(a),minMaxQuery:qg(a,u)}}),r=gX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:E8(e),asArray:mP(e),details:n,media:[null,...t.map(o=>qg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},yc=e=>wR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>wR(t=>e(t,"~ &"),"[data-peer]",".peer"),wR=(e,...t)=>t.map(e).join(", "),P5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},vX=Object.keys(P5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=yP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=P5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:mX(n.breakpoints)}),n}var P8=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,bR,JZ,gm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,bR,gm),LX=Object.keys(PX),TX=[...Object.keys(P8),...vX],AX={...P8,...P5},IX=e=>e in AX,MX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!RX(t),DX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var CR=e=>t=>zX({theme:t,pseudos:P5,configs:P8})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||tv($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Mv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Mv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!tv(bl());)ia();return Mv(e,Oo)}function iQ(e){return TR(v3("",null,null,null,[""],e=LR(e),0,[0],e))}function v3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:cy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&cy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(cy(R=bP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&cy(bP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A8(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?L8:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,_R,L5(QX()),ev(e,2,-2),0)}function xP(e,t,n,r){return A5(e,t,n,T8,ev(e,0,r),ev(e,r+1,-1),r)}function n0(e,t){for(var n="",r=A8(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?IR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case T8:t.return=IR(t.value,t.length);break;case kR:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case L8:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],MR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||gQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?ly.dark:ly.light),document.body.classList.remove(r?ly.light:ly.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var CZ="chakra-ui-color-mode";function _Z(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var kZ=_Z(CZ),lP=()=>{};function uP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>uP(a,s)),[h,g]=C.exports.useState(()=>uP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?lP:k,setColorMode:t?lP:P,forced:t!==void 0}),[E,k,P,t]);return x(kC.Provider,{value:L,children:n})}hR.displayName="ColorModeProvider";var Pw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Vn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Vn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Vn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Vn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return EZ(e)?e(...t):e}var EZ=e=>typeof e=="function",PZ=e=>/!(important)?$/.test(e),cP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=cP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=cP(s),i?`${s} !important`:s};function Jm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var uy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Jm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Jm({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var MZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},OZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function RZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",DZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},BZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(e){return/^var\(--.+\)$/.test(e)}var VZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=VZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",uy(rn.vh,rn.px)),spaceT:as("space",uy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Jm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",uy(rn.vh,rn.px)),sizesT:as("sizes",uy(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Jm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Jm({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(g4,{flexDir:g4.flexDirection});var yR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},gm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(gm,{insetStart:gm.insetInlineStart,insetEnd:gm.insetInlineEnd});var eX={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Zn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},rX={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},iX={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},oX={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),dP=(...e)=>`calc(${E5("+",...e)})`,fP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,hP=(...e)=>`calc(${E5("/",...e)})`,pP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(dP(e,...t)),subtract:(...t)=>kf(fP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(hP(e,...t)),negate:()=>kf(pP(e)),toString:()=>e.toString()}),{add:dP,subtract:fP,multiply:Iw,divide:hP,negate:pP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,EC=e=>Object.fromEntries(Object.entries(e).sort(xR));function gP(e){const t=EC(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(EC(e));return new Set(t)}function mP(e){if(!e)return e;e=Mw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function qg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=gP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?mP(u):void 0,{_minW:mP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:qg(null,u),minWQuery:qg(a),minMaxQuery:qg(a,u)}}),r=gX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:EC(e),asArray:gP(e),details:n,media:[null,...t.map(o=>qg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},yc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),P5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},vX=Object.keys(P5);function vP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=vP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=vP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=P5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:mX(n.breakpoints)}),n}var PC=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,yR,JZ,gm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,yR,gm),LX=Object.keys(PX),TX=[...Object.keys(PC),...vX],AX={...PC,...P5},IX=e=>e in AX,MX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!RX(t),DX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>zX({theme:t,pseudos:P5,configs:PC})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||tv($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Mv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Mv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!tv(bl());)ia();return Mv(e,Oo)}function iQ(e){return LR(v3("",null,null,null,[""],e=PR(e),0,[0],e))}function v3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:cy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&cy(v>32?bP(D+";",r,n,g-1):bP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(cy(R=yP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&cy(yP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function yP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=AC(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?LC:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,CR,L5(QX()),ev(e,2,-2),0)}function bP(e,t,n,r){return A5(e,t,n,TC,ev(e,0,r),ev(e,r+1,-1),r)}function n0(e,t){for(var n="",r=AC(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case TC:t.return=AR(t.value,t.length);break;case _R:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case LC:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||gQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,FR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},mS=AR(function(e){return FR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!FR(t)&&typeof n=="number"&&n!==0?n+"px":n};function nv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,nv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},qR=GQ(jQ);function KR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var YR=e=>KR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function ZR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var XQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=AR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},LP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},TP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return zR(n,r,i),IQ(function(){return BR(n,r,i)}),null},nJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=TP(t,n,r),l=s||LP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function dy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function XR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Fw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function DJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=fy(e.s),i=fy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=fy(e.s),o=fy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=XR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Ov=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=NJ(t)),this.originalInput=t;var i=DJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=XR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=IP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),MP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),OJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=dy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=dy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=dy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=dy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(QR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Ov(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=JR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return v4([r,i],n.seed)}function VJ(e,t){for(var n=JR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=tN.find(function(a){return a.name===e});if(n){var r=eN(n);if(r.hueRange)return r.hueRange}var i=new Ov(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function JR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=tN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function eN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var tN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function jJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=jJ(e,`colors.${t}`,t),{isValid:i}=new Ov(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Ov(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Ov(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var hi=typeof Symbol=="function"&&Symbol.for,IC=hi?Symbol.for("react.element"):60103,MC=hi?Symbol.for("react.portal"):60106,I5=hi?Symbol.for("react.fragment"):60107,M5=hi?Symbol.for("react.strict_mode"):60108,O5=hi?Symbol.for("react.profiler"):60114,R5=hi?Symbol.for("react.provider"):60109,N5=hi?Symbol.for("react.context"):60110,OC=hi?Symbol.for("react.async_mode"):60111,D5=hi?Symbol.for("react.concurrent_mode"):60111,z5=hi?Symbol.for("react.forward_ref"):60112,B5=hi?Symbol.for("react.suspense"):60113,mQ=hi?Symbol.for("react.suspense_list"):60120,F5=hi?Symbol.for("react.memo"):60115,$5=hi?Symbol.for("react.lazy"):60116,vQ=hi?Symbol.for("react.block"):60121,yQ=hi?Symbol.for("react.fundamental"):60117,bQ=hi?Symbol.for("react.responder"):60118,xQ=hi?Symbol.for("react.scope"):60119;function ha(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case IC:switch(e=e.type,e){case OC:case D5:case I5:case O5:case M5:case B5:return e;default:switch(e=e&&e.$$typeof,e){case N5:case z5:case $5:case F5:case R5:return e;default:return t}}case MC:return t}}}function OR(e){return ha(e)===D5}Mn.AsyncMode=OC;Mn.ConcurrentMode=D5;Mn.ContextConsumer=N5;Mn.ContextProvider=R5;Mn.Element=IC;Mn.ForwardRef=z5;Mn.Fragment=I5;Mn.Lazy=$5;Mn.Memo=F5;Mn.Portal=MC;Mn.Profiler=O5;Mn.StrictMode=M5;Mn.Suspense=B5;Mn.isAsyncMode=function(e){return OR(e)||ha(e)===OC};Mn.isConcurrentMode=OR;Mn.isContextConsumer=function(e){return ha(e)===N5};Mn.isContextProvider=function(e){return ha(e)===R5};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===IC};Mn.isForwardRef=function(e){return ha(e)===z5};Mn.isFragment=function(e){return ha(e)===I5};Mn.isLazy=function(e){return ha(e)===$5};Mn.isMemo=function(e){return ha(e)===F5};Mn.isPortal=function(e){return ha(e)===MC};Mn.isProfiler=function(e){return ha(e)===O5};Mn.isStrictMode=function(e){return ha(e)===M5};Mn.isSuspense=function(e){return ha(e)===B5};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===I5||e===D5||e===O5||e===M5||e===B5||e===mQ||typeof e=="object"&&e!==null&&(e.$$typeof===$5||e.$$typeof===F5||e.$$typeof===R5||e.$$typeof===N5||e.$$typeof===z5||e.$$typeof===yQ||e.$$typeof===bQ||e.$$typeof===xQ||e.$$typeof===vQ)};Mn.typeOf=ha;(function(e){e.exports=Mn})(MR);var RR=MR.exports,SQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},wQ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},NR={};NR[RR.ForwardRef]=SQ;NR[RR.Memo]=wQ;var CQ=!0;function _Q(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var DR=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||CQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},zR=function(t,n,r){DR(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function kQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},wP=function(t){return t!=null&&typeof t!="boolean"},mS=TR(function(e){return BR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),CP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function nv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,nv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},GR=GQ(jQ);function qR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var KR=e=>qR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function YR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var XQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=TR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},PP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),IQ(function(){return zR(n,r,i)}),null},nJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||PP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function dy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function TP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Fw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function DJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=fy(e.s),i=fy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=fy(e.s),o=fy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:MP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:MP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Ov=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=NJ(t)),this.originalInput=t;var i=DJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ZR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=TP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=TP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),IP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),OJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+IP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=dy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=dy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=dy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=dy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(XR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Ov(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=QR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return v4([r,i],n.seed)}function VJ(e,t){for(var n=QR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=eN.find(function(a){return a.name===e});if(n){var r=JR(n);if(r.hueRange)return r.hueRange}var i=new Ov(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function QR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=eN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function JR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var eN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function jJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=jJ(e,`colors.${t}`,t),{isValid:i}=new Ov(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Ov(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Ov(r).setAlpha(t).toRgbString()};function OP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -53,12 +53,12 @@ Error generating stack: `+o.message+` ${t} 75%, transparent 75%, transparent - )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=QR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function nN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(nN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${V5("+",...e)})`,DP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,zP=(...e)=>`calc(${V5("/",...e)})`,BP=e=>{const t=nN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(NP(e,...t)),subtract:(...t)=>su(DP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(zP(e,...t)),negate:()=>su(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:$w,divide:zP,negate:BP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function rN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,rN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${rN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Rv,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Rv({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z8(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Rv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),iN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},wee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...iN,...wee,container:Cee},oN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:aN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},FP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=aN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?oN[e]:void 0;return aN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},vm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},sN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=M0(`${t}.200`,.12)(n),i=M0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Uee=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(sN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=jee[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},qee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:sN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),ym=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:ym.reference,h:ym.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[ym.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[ym.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[ym.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),bm=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[bm.reference],h:[bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[bm.variable]:"sizes.10",fontSize:"md"},md:{[bm.variable]:"sizes.8",fontSize:"xs"},sm:{[bm.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=vm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function B8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),ine=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),xne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},lN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:uN}=ir(vJ.keys),F8=ji("number-input-stepper-width"),cN=ji("number-input-input-padding"),$ne=su(F8).add("0.5rem").toString(),Hne={[F8.variable]:"sizes.6",[cN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[F8.reference]},Une=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),jne=uN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function hy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=lN.fontSizes[o];return uN({field:{...r.field,paddingInlineEnd:cN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:hy("xs"),sm:hy("sm"),md:hy("md"),lg:hy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),$P,Kne={...($P=gn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Yne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HP,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=gn.variants)==null?void 0:HP.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),py=ji("popper-bg"),ere=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[py.variable]:"colors.white",bg:py.reference,[ere.variable]:py.reference,[WP.variable]:"colors.gray.200",_dark:{[py.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:Kg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=XR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function DC(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function tN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(tN).join(` ${e} `).replace(/calc/g,""),RP=(...e)=>`calc(${V5("+",...e)})`,NP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,DP=(...e)=>`calc(${V5("/",...e)})`,zP=e=>{const t=tN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(RP(e,...t)),subtract:(...t)=>su(NP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(DP(e,...t)),negate:()=>su(zP(e)),toString:()=>e.toString()}),{add:RP,subtract:NP,multiply:$w,divide:DP,negate:zP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function nN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,nN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${nN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Rv,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Rv({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function zC(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Rv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),rN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},wee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...rN,...wee,container:Cee},iN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:oN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},BP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:BP.reference,"&:not([data-loaded])":{[BP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=oN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?iN[e]:void 0;return oN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},vm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},aN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=M0(`${t}.200`,.12)(n),i=M0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Uee=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(aN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=jee[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},qee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:aN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),ym=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:ym.reference,h:ym.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[ym.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[ym.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[ym.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),bm=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[bm.reference],h:[bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[bm.variable]:"sizes.10",fontSize:"md"},md:{[bm.variable]:"sizes.8",fontSize:"xs"},sm:{[bm.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=vm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function BC(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),ine=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),xne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},sN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:lN}=ir(vJ.keys),FC=ji("number-input-stepper-width"),uN=ji("number-input-input-padding"),$ne=su(FC).add("0.5rem").toString(),Hne={[FC.variable]:"sizes.6",[uN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[FC.reference]},Une=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),jne=lN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function hy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=sN.fontSizes[o];return lN({field:{...r.field,paddingInlineEnd:uN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:hy("xs"),sm:hy("sm"),md:hy("md"),lg:hy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),FP,Kne={...(FP=gn.baseStyle)==null?void 0:FP.field,textAlign:"center"},Yne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},$P,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:(($P=gn.variants)==null?void 0:$P.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),py=ji("popper-bg"),ere=ji("popper-arrow-bg"),HP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[py.variable]:"colors.white",bg:py.reference,[ere.variable]:py.reference,[HP.variable]:"colors.gray.200",_dark:{[py.variable]:"colors.gray.700",[HP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:Kg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(OP(),OP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${Ai(n,a)} 50%, transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=Kg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:Kg({track:{h:"1"}}),sm:Kg({track:{h:"2"}}),md:Kg({track:{h:"3"}}),lg:Kg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),gy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,Pre={lg:{...(VP=gn.sizes)==null?void 0:VP.lg,field:{...(UP=gn.sizes)==null?void 0:UP.lg.field,...gy}},md:{...(jP=gn.sizes)==null?void 0:jP.md,field:{...(GP=gn.sizes)==null?void 0:GP.md.field,...gy}},sm:{...(qP=gn.sizes)==null?void 0:qP.sm,field:{...(KP=gn.sizes)==null?void 0:KP.sm.field,...gy}},xs:{...(YP=gn.sizes)==null?void 0:YP.xs,field:{...(ZP=gn.sizes)==null?void 0:ZP.xs.field,...gy},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),ov=ei("slider-thumb-size"),av=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...D8({orientation:e.orientation,horizontal:{h:av.reference},vertical:{w:av.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...D8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ov.reference,h:ov.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[ov.variable]:"sizes.4",[av.variable]:"sizes.1"}}),Wre=U5({container:{[ov.variable]:"sizes.3.5",[av.variable]:"sizes.1"}}),Vre=U5({container:{[ov.variable]:"sizes.2.5",[av.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:dN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=dN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:dN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),xm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(xm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[xm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[xm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[xm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[xm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=s0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={sm:s0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:s0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:s0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),kie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Lie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,$ie={...(XP=gn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=gn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eL,tL,nL,Wie={xs:((JP=gn.sizes)==null?void 0:JP.xs.field)??{},sm:((eL=gn.sizes)==null?void 0:eL.sm.field)??{},md:((tL=gn.sizes)==null?void 0:tL.md.field)??{},lg:((nL=gn.sizes)==null?void 0:nL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},my=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:my.reference,color:kS.reference,[my.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[my.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:my.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:vm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},roe=noe,ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ooe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...lN,sizes:oN,shadows:roe,space:iN,borders:Yie,transition:loe},poe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},goe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(woe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function K0(){const e=C.exports.useContext(rv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function fN(){const e=Iv(),t=K0();return{...e,theme:t}}function _oe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function koe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Iv();return x(H5,{styles:t=>{const n=qR(t,"styles.global"),r=ZR(n,{theme:t,colorMode:e});return r?CR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=KR(a,(g,m)=>IX(m)),l=ZR(e,t),u=Object.assign({},i,l,YR(s),o),h=CR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Iv();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function hN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=fN(),a=e?qR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},YR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return hN(e,t)}function Ri(e,t={}){return hN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=iL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=oL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=rL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,pN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=pN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function gN(){return[x4(Hoe),()=>x4(pN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??aL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??aL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function j5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,mN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(mN),a=C.exports.useContext(Y0),s=C.exports.useContext($8).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function sv(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>sv(e[t]))}function vN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sv(n)?n:void 0,animate:sv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sL(t),sL(n)])}function sL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),lv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?lv.projectionNodeConstructor=e[t]:lv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(Sm.hasEverUpdated)return Zoe++})}const H8=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const yN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($8),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(mN).strict,P=C.exports.useContext(yN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||lv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(H8).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function W8(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nv=new Set(C4);function bN(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function xN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,SN=(e,t)=>n=>Math.max(Math.min(n,t),e),wm=e=>e%1?Number(e.toFixed(5)):e,uv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cm=Object.assign(Object.assign({},ih),{transform:SN(0,1)}),vy=Object.assign(Object.assign({},ih),{default:1}),zv=e=>({test:t=>Dv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=zv("deg"),Sl=zv("%"),St=zv("px"),cae=zv("vh"),dae=zv("vw"),lL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),V8=(e,t)=>n=>Boolean(Dv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),wN=(e,t,n)=>r=>{if(!Dv(r))return r;const[i,o,a,s]=r.match(uv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:V8("hsl","hue"),parse:wN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(wm(t))+", "+Sl.transform(wm(n))+", "+wm(Cm.transform(r))+")"},fae=SN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:V8("rgb","red"),parse:wN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+wm(Cm.transform(r))+")"};function hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gw={test:V8("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Dv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},CN="${c}",_N="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Dv(e)&&((n=(t=e.match(uv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function kN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,CN),t.push(...r.map(to.parse)));const i=e.match(uv);return i&&(e=e.replace(uv,_N),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function EN(e){return kN(e).values}function PN(e){const{values:t,numColors:n,tokenised:r}=kN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=EN(e);return PN(e)(t.map(gae))}const vu={test:pae,parse:EN,createTransformer:PN,getAnimatableNone:mae},vae=new Set(["brightness","contrast","saturate","opacity"]);function yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(uv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),uL={...ih,transform:Math.round},LN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:vy,scaleX:vy,scaleY:vy,scaleZ:vy,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:Cm,originX:lL,originY:lL,originZ:St,zIndex:uL,fillOpacity:Cm,strokeOpacity:Cm,numOctaves:uL};function U8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(xN(m)){o[m]=v;continue}const b=LN[m],w=lae(v,b);if(Nv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const j8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function TN(e,t,n){for(const r in t)!Ss(t[r])&&!bN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j8();return U8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return TN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let AN=e=>!_4(e);function Lae(e){!e||(AN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(AN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=cL(t,e.x,e.width),i=cL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Aae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Oae(g,o,a,s,!1)}const IN=()=>({...j8(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=IN();return G8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};TN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W8(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const MN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ON(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const RN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function NN(e,t,n,r){ON(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(RN.has(i)?i:MN(i),t.attrs[i])}function q8(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||bN(r,e))&&(n[r]=t[r]);return n}function DN(e){const t=q8(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const cv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),zN=e=>cv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const BN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=vN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:BN({scrapeMotionValuesFromProps:DN,createRenderState:IN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),NN(t,n)}})},$ae={useVisualState:BN({scrapeMotionValuesFromProps:q8,createRenderState:j8})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...W8(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function FN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function $N(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y8(e,t="page"){return{point:$N(e)?jae(e,t):Gae(e,t)}}const HN=(e,t=!1)=>{const n=r=>e(r,Y8(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function WN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,WN(t),HN(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,WN(t),n&&HN(n,t==="pointerdown"),r)}function VN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dL=VN("dragHorizontal"),fL=VN("dragVertical");function UN(e){let t=!1;if(e==="y")t=fL();else if(e==="x")t=dL();else{const n=dL(),r=fL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jN(){const e=UN(!0);return e?(e(),!1):!0}function hL(e,t,n){return(r,i)=>{!FN(r)||jN()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?hL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?hL(r,!1,t):void 0,{passive:!t})}const GN=(e,t)=>t?e===t?!0:GN(e,t.parentElement):!1;function Z8(e){return C.exports.useEffect(()=>()=>e(),[])}function qN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),LS=.001,ese=.01,pL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=pL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,pL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ise=12;function ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gL(e,sse)&&gL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=qN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=mL,b=mL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mL=e=>0,dv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],yL=e=>cse.find(t=>t.test(e)),KN=(e,t)=>{let n=yL(e),r=yL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=vL(i),n=Wc),r===Rf&&(o=vL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function YN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?KN(e,t):XN(e,t)}const ZN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>YN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=YN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=bL(e),i=bL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(ZN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?KN:XN;if(Array.isArray(e))return ZN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(dv(e,t,r))}function vse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=dv(e[o],e[o+1],i);return t[o](s)}}function QN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),Q8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),JN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=JN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},eD=1.525,xse=4/11,Sse=8/11,wse=9/10,J8=e=>e,e7=yse(2),Cse=Q5(e7),tD=Q8(e7),nD=e=>1-Math.sin(Math.acos(e)),t7=Q5(nD),_se=Q8(t7),n7=JN(eD),kse=Q5(n7),Ese=Q8(n7),Pse=bse(eD),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||tD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return QN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const xL={keyframes:C3,spring:X8,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(xL[e.type])return xL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X8:C3}const rD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),iD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),rD);function Fse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fse(()=>fv=!0),e),{}),Hse=Bv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(fv||Use(),n.schedule(r,i,o)),e},{}),Wse=Bv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});Bv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),oD=e=>{fv=!1,u0.delta=Xw?rD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,Bv.forEach(Vse),Qw=!1,fv&&(Xw=!1,iD(oD))},Use=()=>{fv=!0,Xw=!0,Qw||iD(oD)},jse=()=>u0;function aD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?aD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function sD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=qN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=QN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=aD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function lD(e,t){return t?e*(1e3/t):0}function Yse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=lD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),SL=e=>Jw(e)&&e.hasOwnProperty("z"),yy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return yy(e,t);if(Jw(e)&&Jw(t)){const n=yy(e.x,t.x),r=yy(e.y,t.y),i=SL(e)&&SL(t)?yy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const uD=(e,t)=>1-3*t+3*e,cD=(e,t)=>3*t-6*e,dD=e=>3*e,T4=(e,t,n)=>((uD(t,n)*e+cD(t,n))*e+dD(t))*e,fD=(e,t,n)=>3*uD(t,n)*e*e+2*cD(t,n)*e+dD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+by,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!jN()}function g(b,w){!h()||(GN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),Z8(u)}const ile="production",hD=typeof process>"u"||process.env===void 0?ile:"production",wL=new Set;function pD(e,t,n){e||wL.has(t)||(console.warn(t),n&&console.warn(n),wL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(hD!=="production"&&pD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function gD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:J8,easeIn:e7,easeInOut:tD,easeOut:Cse,circIn:nD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},CL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",_L=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),kL={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:xy,scaleY:xy,scale:xy,opacity:IS,backgroundColor:IS,color:IS,default:xy},ble=(e,t)=>{let n;return cv(t)?n=yle:n=kL[e]||kL.default,{to:t,...n(t)}},xle={...LN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},mD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),vD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),mD);function Cle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cle(()=>hv=!0),e),{}),ws=Fv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(hv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Fv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Fv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),yD=e=>{hv=!1,c0.delta=t9?mD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Fv.forEach(kle),n9=!1,hv&&(t9=!1,vD(yD))},Ele=()=>{hv=!0,t9=!0,n9||vD(yD)},r9=()=>c0;function bD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(CL):CL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_L(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):EL(a)&&typeof n=="string"?a=PL(n):!Array.isArray(n)&&EL(n)&&typeof a=="string"&&(n=PL(a));const l=_L(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Yse({...g,...o}):sD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=zN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function EL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=bD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _m{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Dle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new _m,this.velocityUpdateSubscribers=new _m,this.renderSubscribers=new _m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?lD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function O0(e){return new Dle(e)}const xD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},SD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>SD.find(xD(e)),Ble=[...SD,to,vu],Fle=e=>Ble.find(xD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return K8(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=zN(o[a]);Wle(e,a,s)}}function Ule(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=wD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>wD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Kle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function wD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Nv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?cv(G)&&cv(W)?!gD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[Gn.Animate]:gf(!0),[Gn.InView]:gf(),[Gn.Hover]:gf(),[Gn.Tap]:gf(),[Gn.Drag]:gf(),[Gn.Focus]:gf(),[Gn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class CD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=OS(h,this.transformPagePoint),FN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},$N(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y8(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function LL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:LL(e,_D(t)),offset:LL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function _D(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=_D(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function TL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function OL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lue(e,{top:t,left:n,bottom:r,right:i}){return{x:OL(e.x,n,i),y:OL(e.y,t,r)}}function RL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=dv(t.min,t.max-r,e.min):r>i&&(n=dv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:NL(e,"left","right"),y:NL(e,"top","bottom")}}function NL(e,t,n){return{min:DL(e,t),max:DL(e,n)}}function DL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pm=()=>({x:zL(),y:zL()}),BL=()=>({min:0,max:0}),ki=()=>({x:BL(),y:BL()});function sl(e){return[e("x"),e("y")]}function kD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||ED(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ED(e){return FL(e.x)||FL(e.y)}function FL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function $L(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=$L(e.min,t,n,r,i),e.max=$L(e.max,t,n,r,i)}function PD(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(Y8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=UN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Sue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new CD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Sy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yue(r,i.root,this.visualElement.getTransformPagePoint());let a=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=kD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!Sy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!Sy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!Sy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Sy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new CD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),Z8(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},TD={current:!1};function kue(){if(TD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const wy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=wy.map(()=>new _m),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{wy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+wy[i]]=o=>r.add(o),n["notify"+wy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const AD=Object.keys(lv),Lue=AD.length,ID=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=vN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),TD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K8(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),RD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(RD),ND=(e,t)=>{e.set(t,!1),e.set(t)},WL=e=>e===ih||e===St;var VL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VL||(VL={}));const UL=(e,t)=>parseFloat(e.split(", ")[t]),jL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const GL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jL(4,13),y:jL(5,14)},zue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=GL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);ND(h,s[u]),e[u]=GL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(RD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Eg(h);const m=t[l];let v;if(cv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const DD={treeType:"dom",readValueFromInstance(e,t){if(Nv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(xN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return LD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q8,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U8(t,n,r,i.transformTemplate)},render:ON},Wue=ID(DD),Vue=ID({...DD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Nv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=RN.has(t)?t:MN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:DN,build(e,t,n,r,i){G8(t,n,r,i.transformTemplate)},render:NN}),Uue=(e,t)=>W8(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function qL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qL(e,t.target.x),r=qL(e,t.target.y);return`${n}% ${r}%`}},KL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(OD,v=>(o.push(v),KL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(KL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Sm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function que(e){const[t,n]=i7(),r=C.exports.useContext(H8);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(yN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const zD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=zD.length,YL=e=>typeof e=="string"?parseFloat(e):e,ZL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(dv(e,t,r))}function QL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QL(e.x,t.x),QL(e.y,t.y)}function JL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JL(e.min,t,n,s,i),e.max=JL(e.max,t,n,s,i)}function eT(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function tT(e,t,n,r){eT(e.x,t,nce,n?.x,r?.x),eT(e.y,t,rce,n?.y,r?.y)}function nT(e){return e.translate===0&&e.scale===1}function FD(e){return nT(e.x)&&nT(e.y)}function $D(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const oT=["","X","Y","Z"],aT=1e3;function HD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hce),this.nodes.forEach(pce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=bD(v,250),Sm.hasAnimatedSinceResize&&(Sm.hasAnimatedSinceResize=!1,this.nodes.forEach(lT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!$D(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&lT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));fT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=P/1e3;uT(m.x,a.x,L),uT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Em(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{Sm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,aT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,aT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&WD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),km(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(sT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):WD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Pm();km(l,o,i.layout);const u=Pm();i.isShared?km(u,e.applyTransform(a,!0),i.measured):km(u,o,i.layout);const h=!FD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Em(b,i.layout,m.layout);const w=ki();Em(w,o,v.actual),$D(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function sT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function uT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){cT(e.x,t.x,n.x,r),cT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function dT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fT(e){dT(e.x),dT(e.y)}function WD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(rT(t),rT(n),.2)}const Sce=HD({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=HD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function VD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=VD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ece({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=Kg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:Kg({track:{h:"1"}}),sm:Kg({track:{h:"2"}}),md:Kg({track:{h:"3"}}),lg:Kg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),gy={paddingInlineEnd:"8"},WP,VP,UP,jP,GP,qP,KP,YP,Pre={lg:{...(WP=gn.sizes)==null?void 0:WP.lg,field:{...(VP=gn.sizes)==null?void 0:VP.lg.field,...gy}},md:{...(UP=gn.sizes)==null?void 0:UP.md,field:{...(jP=gn.sizes)==null?void 0:jP.md.field,...gy}},sm:{...(GP=gn.sizes)==null?void 0:GP.sm,field:{...(qP=gn.sizes)==null?void 0:qP.sm.field,...gy}},xs:{...(KP=gn.sizes)==null?void 0:KP.xs,field:{...(YP=gn.sizes)==null?void 0:YP.xs.field,...gy},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),ov=ei("slider-thumb-size"),av=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...DC({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...DC({orientation:e.orientation,horizontal:{h:av.reference},vertical:{w:av.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...DC({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ov.reference,h:ov.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[ov.variable]:"sizes.4",[av.variable]:"sizes.1"}}),Wre=U5({container:{[ov.variable]:"sizes.3.5",[av.variable]:"sizes.1"}}),Vre=U5({container:{[ov.variable]:"sizes.2.5",[av.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:cN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=cN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:cN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),xm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(xm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[xm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[xm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[xm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[xm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=s0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={sm:s0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:s0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:s0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),kie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Lie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ZP,$ie={...(ZP=gn.baseStyle)==null?void 0:ZP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},XP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((XP=gn.variants)==null?void 0:XP.unstyled.field)??{}},QP,JP,eL,tL,Wie={xs:((QP=gn.sizes)==null?void 0:QP.xs.field)??{},sm:((JP=gn.sizes)==null?void 0:JP.sm.field)??{},md:((eL=gn.sizes)==null?void 0:eL.md.field)??{},lg:((tL=gn.sizes)==null?void 0:tL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},my=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:my.reference,color:kS.reference,[my.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[my.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:my.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:vm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},roe=noe,ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ooe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...sN,sizes:iN,shadows:roe,space:rN,borders:Yie,transition:loe},poe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},goe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(woe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function K0(){const e=C.exports.useContext(rv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function dN(){const e=Iv(),t=K0();return{...e,theme:t}}function _oe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function koe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Iv();return x(H5,{styles:t=>{const n=GR(t,"styles.global"),r=YR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=qR(a,(g,m)=>IX(m)),l=YR(e,t),u=Object.assign({},i,l,KR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Iv();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function fN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=dN(),a=e?GR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},KR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return fN(e,t)}function Ri(e,t={}){return fN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function nL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function rL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function iL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=nL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=rL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=rL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=iL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=nL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,hN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=hN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function pN(){return[x4(Hoe),()=>x4(hN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),oL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??oL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??oL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function j5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $C=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,gN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(gN),a=C.exports.useContext(Y0),s=C.exports.useContext($C).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function sv(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>sv(e[t]))}function mN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sv(n)?n:void 0,animate:sv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[aL(t),aL(n)])}function aL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),lv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?lv.projectionNodeConstructor=e[t]:lv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(Sm.hasEverUpdated)return Zoe++})}const HC=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const vN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($C),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(gN).strict,P=C.exports.useContext(vN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||lv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(HC).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function WC(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nv=new Set(C4);function yN(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function bN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xN=(e,t)=>n=>Math.max(Math.min(n,t),e),wm=e=>e%1?Number(e.toFixed(5)):e,uv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cm=Object.assign(Object.assign({},ih),{transform:xN(0,1)}),vy=Object.assign(Object.assign({},ih),{default:1}),zv=e=>({test:t=>Dv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=zv("deg"),Sl=zv("%"),St=zv("px"),cae=zv("vh"),dae=zv("vw"),sL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),VC=(e,t)=>n=>Boolean(Dv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!Dv(r))return r;const[i,o,a,s]=r.match(uv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:VC("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(wm(t))+", "+Sl.transform(wm(n))+", "+wm(Cm.transform(r))+")"},fae=xN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:VC("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+wm(Cm.transform(r))+")"};function hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gw={test:VC("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Dv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},wN="${c}",CN="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Dv(e)&&((n=(t=e.match(uv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function _N(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,wN),t.push(...r.map(to.parse)));const i=e.match(uv);return i&&(e=e.replace(uv,CN),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function kN(e){return _N(e).values}function EN(e){const{values:t,numColors:n,tokenised:r}=_N(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=kN(e);return EN(e)(t.map(gae))}const vu={test:pae,parse:kN,createTransformer:EN,getAnimatableNone:mae},vae=new Set(["brightness","contrast","saturate","opacity"]);function yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(uv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),lL={...ih,transform:Math.round},PN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:vy,scaleX:vy,scaleY:vy,scaleZ:vy,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:Cm,originX:sL,originY:sL,originZ:St,zIndex:lL,fillOpacity:Cm,strokeOpacity:Cm,numOctaves:lL};function UC(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(bN(m)){o[m]=v;continue}const b=PN[m],w=lae(v,b);if(Nv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const jC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function LN(e,t,n){for(const r in t)!Ss(t[r])&&!yN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=jC();return UC(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return LN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let TN=e=>!_4(e);function Lae(e){!e||(TN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function uL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=uL(t,e.x,e.width),i=uL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function GC(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){UC(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Aae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Oae(g,o,a,s,!1)}const AN=()=>({...jC(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=AN();return GC(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};LN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(WC(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const IN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function MN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ON=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function RN(e,t,n,r){MN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ON.has(i)?i:IN(i),t.attrs[i])}function qC(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||yN(r,e))&&(n[r]=t[r]);return n}function NN(e){const t=qC(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function KC(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const cv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),DN=e=>cv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const zN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=mN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=KC(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:zN({scrapeMotionValuesFromProps:NN,createRenderState:AN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}GC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),RN(t,n)}})},$ae={useVisualState:zN({scrapeMotionValuesFromProps:qC,createRenderState:jC})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...WC(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function BN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function FN(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function YC(e,t="page"){return{point:FN(e)?jae(e,t):Gae(e,t)}}const $N=(e,t=!1)=>{const n=r=>e(r,YC(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function HN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,HN(t),$N(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,HN(t),n&&$N(n,t==="pointerdown"),r)}function WN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const cL=WN("dragHorizontal"),dL=WN("dragVertical");function VN(e){let t=!1;if(e==="y")t=dL();else if(e==="x")t=cL();else{const n=cL(),r=dL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function UN(){const e=VN(!0);return e?(e(),!1):!0}function fL(e,t,n){return(r,i)=>{!BN(r)||UN()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?fL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?fL(r,!1,t):void 0,{passive:!t})}const jN=(e,t)=>t?e===t?!0:jN(e,t.parentElement):!1;function ZC(e){return C.exports.useEffect(()=>()=>e(),[])}function GN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),LS=.001,ese=.01,hL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=hL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,hL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ise=12;function ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!pL(e,sse)&&pL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=GN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=gL,b=gL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const gL=e=>0,dv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],vL=e=>cse.find(t=>t.test(e)),qN=(e,t)=>{let n=vL(e),r=vL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=mL(i),n=Wc),r===Rf&&(o=mL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function KN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?qN(e,t):ZN(e,t)}const YN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>KN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=KN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function yL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=yL(e),i=yL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(YN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?qN:ZN;if(Array.isArray(e))return YN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(dv(e,t,r))}function vse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=dv(e[o],e[o+1],i);return t[o](s)}}function XN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),QC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),QN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=QN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},JN=1.525,xse=4/11,Sse=8/11,wse=9/10,JC=e=>e,e7=yse(2),Cse=Q5(e7),eD=QC(e7),tD=e=>1-Math.sin(Math.acos(e)),t7=Q5(tD),_se=QC(t7),n7=QN(JN),kse=Q5(n7),Ese=QC(n7),Pse=bse(JN),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||eD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return XN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const bL={keyframes:C3,spring:XC,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(bL[e.type])return bL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:C3}const nD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),rD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),nD);function Fse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fse(()=>fv=!0),e),{}),Hse=Bv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(fv||Use(),n.schedule(r,i,o)),e},{}),Wse=Bv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});Bv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),iD=e=>{fv=!1,u0.delta=Xw?nD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,Bv.forEach(Vse),Qw=!1,fv&&(Xw=!1,rD(iD))},Use=()=>{fv=!0,Xw=!0,Qw||rD(iD)},jse=()=>u0;function oD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?oD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function aD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=GN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=XN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=oD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function sD(e,t){return t?e*(1e3/t):0}function Yse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=sD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),xL=e=>Jw(e)&&e.hasOwnProperty("z"),yy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return yy(e,t);if(Jw(e)&&Jw(t)){const n=yy(e.x,t.x),r=yy(e.y,t.y),i=xL(e)&&xL(t)?yy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const lD=(e,t)=>1-3*t+3*e,uD=(e,t)=>3*t-6*e,cD=e=>3*e,T4=(e,t,n)=>((lD(t,n)*e+uD(t,n))*e+cD(t))*e,dD=(e,t,n)=>3*lD(t,n)*e*e+2*uD(t,n)*e+cD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+by,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!UN()}function g(b,w){!h()||(jN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),ZC(u)}const ile="production",fD=typeof process>"u"||process.env===void 0?ile:"production",SL=new Set;function hD(e,t,n){e||SL.has(t)||(console.warn(t),n&&console.warn(n),SL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(fD!=="production"&&hD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function pD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:JC,easeIn:e7,easeInOut:eD,easeOut:Cse,circIn:tD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},wL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",CL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),_L={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:xy,scaleY:xy,scale:xy,opacity:IS,backgroundColor:IS,color:IS,default:xy},ble=(e,t)=>{let n;return cv(t)?n=yle:n=_L[e]||_L.default,{to:t,...n(t)}},xle={...PN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},gD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),mD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),gD);function Cle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cle(()=>hv=!0),e),{}),ws=Fv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(hv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Fv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Fv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),vD=e=>{hv=!1,c0.delta=t9?gD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Fv.forEach(kle),n9=!1,hv&&(t9=!1,mD(vD))},Ele=()=>{hv=!0,t9=!0,n9||mD(vD)},r9=()=>c0;function yD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(wL):wL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=CL(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):kL(a)&&typeof n=="string"?a=EL(n):!Array.isArray(n)&&kL(n)&&typeof a=="string"&&(n=EL(a));const l=CL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Yse({...g,...o}):aD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=DN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function kL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function EL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=yD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _m{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Dle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new _m,this.velocityUpdateSubscribers=new _m,this.renderSubscribers=new _m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?sD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function O0(e){return new Dle(e)}const bD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},xD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>xD.find(bD(e)),Ble=[...xD,to,vu],Fle=e=>Ble.find(bD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return KC(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=DN(o[a]);Wle(e,a,s)}}function Ule(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=SD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>SD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Kle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function SD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Nv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?cv(G)&&cv(W)?!pD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[Gn.Animate]:gf(!0),[Gn.InView]:gf(),[Gn.Hover]:gf(),[Gn.Tap]:gf(),[Gn.Drag]:gf(),[Gn.Focus]:gf(),[Gn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class wD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=OS(h,this.transformPagePoint),BN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},FN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=YC(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function PL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:PL(e,CD(t)),offset:PL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function CD(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=CD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function LL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function ML(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lue(e,{top:t,left:n,bottom:r,right:i}){return{x:ML(e.x,n,i),y:ML(e.y,t,r)}}function OL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=dv(t.min,t.max-r,e.min):r>i&&(n=dv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:RL(e,"left","right"),y:RL(e,"top","bottom")}}function RL(e,t,n){return{min:NL(e,t),max:NL(e,n)}}function NL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const DL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pm=()=>({x:DL(),y:DL()}),zL=()=>({min:0,max:0}),ki=()=>({x:zL(),y:zL()});function sl(e){return[e("x"),e("y")]}function _D({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||kD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function kD(e){return BL(e.x)||BL(e.y)}function BL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function FL(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=FL(e.min,t,n,r,i),e.max=FL(e.max,t,n,r,i)}function ED(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(YC(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Sue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new wD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Sy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yue(r,i.root,this.visualElement.getTransformPagePoint());let a=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=_D(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!Sy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!Sy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!Sy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Sy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($C),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new wD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),ZC(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},LD={current:!1};function kue(){if(LD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const wy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=wy.map(()=>new _m),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{wy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+wy[i]]=o=>r.add(o),n["notify"+wy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(lv),Lue=TD.length,AD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=mN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),LD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=KC(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),OD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(OD),RD=(e,t)=>{e.set(t,!1),e.set(t)},HL=e=>e===ih||e===St;var WL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(WL||(WL={}));const VL=(e,t)=>parseFloat(e.split(", ")[t]),UL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return VL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?VL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const jL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:UL(4,13),y:UL(5,14)},zue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=jL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);RD(h,s[u]),e[u]=jL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(OD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Eg(h);const m=t[l];let v;if(cv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const ND={treeType:"dom",readValueFromInstance(e,t){if(Nv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(bN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return PD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:qC,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),UC(t,n,r,i.transformTemplate)},render:MN},Wue=AD(ND),Vue=AD({...ND,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Nv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=ON.has(t)?t:IN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:NN,build(e,t,n,r,i){GC(t,n,r,i.transformTemplate)},render:RN}),Uue=(e,t)=>WC(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function GL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=GL(e,t.target.x),r=GL(e,t.target.y);return`${n}% ${r}%`}},qL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(MD,v=>(o.push(v),qL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(qL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Sm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function que(e){const[t,n]=i7(),r=C.exports.useContext(HC);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(vN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const DD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=DD.length,KL=e=>typeof e=="string"?parseFloat(e):e,YL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(dv(e,t,r))}function XL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){XL(e.x,t.x),XL(e.y,t.y)}function QL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=QL(e.min,t,n,s,i),e.max=QL(e.max,t,n,s,i)}function JL(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function eT(e,t,n,r){JL(e.x,t,nce,n?.x,r?.x),JL(e.y,t,rce,n?.y,r?.y)}function tT(e){return e.translate===0&&e.scale===1}function BD(e){return tT(e.x)&&tT(e.y)}function FD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function nT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function rT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const iT=["","X","Y","Z"],oT=1e3;function $D({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hce),this.nodes.forEach(pce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=yD(v,250),Sm.hasAnimatedSinceResize&&(Sm.hasAnimatedSinceResize=!1,this.nodes.forEach(sT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!FD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&sT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));dT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=P/1e3;lT(m.x,a.x,L),lT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Em(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{Sm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,oT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,oT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&HD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),km(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(aT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):HD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Pm();km(l,o,i.layout);const u=Pm();i.isShared?km(u,e.applyTransform(a,!0),i.measured):km(u,o,i.layout);const h=!BD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Em(b,i.layout,m.layout);const w=ki();Em(w,o,v.actual),FD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function aT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function sT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function lT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){uT(e.x,t.x,n.x,r),uT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function cT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function dT(e){cT(e.x),cT(e.y)}function HD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(nT(t),nT(n),.2)}const Sce=$D({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=$D({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function WD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=WD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ece({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -66,8 +66,8 @@ Error generating stack: `+o.message+` top: ${s}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",pD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(H8).forceRender;l&&(s=l);const u=VD(),h=Tce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),Z8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Hn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),hD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Hn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,pT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pT.enter,i)})},jD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ice({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:$v("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});jD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:$v("chakra-fade",o),custom:m,...GD,animate:h,...u})})});Nce.displayName="Fade";var Dce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},qD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",s),...qD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var gT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(gT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(gT.enter,r),transitionEnd:t?.enter}}},KD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=f9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:$v("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});KD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var Hv=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=gN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:Hv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Qce(e){nb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Hv("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:Hv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Hv("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(jD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:Hv("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Wv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Wv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function rde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ide,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),YD={info:{icon:rde,colorScheme:"blue"},warning:{icon:mT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:mT,colorScheme:"red"},loading:{icon:Wv,colorScheme:"blue"}};function sde(e){return YD[e].colorScheme}function lde(e){return YD[e].icon}var ZD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});ZD.displayName="Alert";var XD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});XD.displayName="AlertDescription";function QD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}QD.displayName="AlertIcon";var JD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});JD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});O4.displayName="NativeImage";var ab=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),vT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Wv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=hde(),r=lo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=mn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":vT(a),"data-loading":vT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(yT,{...O})):x(yT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function yT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Hn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),Cy=e=>e?"":void 0,FS=e=>e?!0:void 0;function bT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":Cy(E),"data-disabled":Cy(i),"data-invalid":Cy(r),"data-readonly":Cy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=ez(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:bT(t?.onFocus,h),onBlur:bT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(tz,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var tz=Pe(function(t,n){const r=J0(),i=ez();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});tz.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var xT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function ST(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function wT(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||xT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",ST,!0),document.addEventListener("keyup",ST,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),xT=!0}function Ade(e){Tde(),e(wT());const t=()=>e(wT());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Nde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nz(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,CT),onTouchStart:ka(Te.onTouchStart,CT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function CT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),rz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=nz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});rz.displayName="Checkbox";function Vde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function R4(e,t,n){return(e-t)*100/(n-t)}function iz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=oz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||R{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",hD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(HC).forceRender;l&&(s=l);const u=WD(),h=Tce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),ZC(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Hn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),fD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Hn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,hT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(hT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(hT.enter,i)})},UD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ice({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:$v("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});UD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:$v("chakra-fade",o),custom:m,...jD,animate:h,...u})})});Nce.displayName="Fade";var Dce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",s),...GD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var pT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(pT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(pT.enter,r),transitionEnd:t?.enter}}},qD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=f9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:$v("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});qD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var Hv=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=pN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:Hv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Qce(e){nb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Hv("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:Hv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Hv("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(UD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:Hv("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Wv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Wv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function rde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function gT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ide,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),KD={info:{icon:rde,colorScheme:"blue"},warning:{icon:gT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:gT,colorScheme:"red"},loading:{icon:Wv,colorScheme:"blue"}};function sde(e){return KD[e].colorScheme}function lde(e){return KD[e].icon}var YD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});YD.displayName="Alert";var ZD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});ZD.displayName="AlertDescription";function XD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}XD.displayName="AlertIcon";var QD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});QD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});O4.displayName="NativeImage";var ab=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),mT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Wv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=hde(),r=lo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=mn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":mT(a),"data-loading":mT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(vT,{...O})):x(vT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function vT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Hn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),Cy=e=>e?"":void 0,FS=e=>e?!0:void 0;function yT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,JD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":Cy(E),"data-disabled":Cy(i),"data-invalid":Cy(r),"data-readonly":Cy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=JD(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:yT(t?.onFocus,h),onBlur:yT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(ez,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var ez=Pe(function(t,n){const r=J0(),i=JD();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});ez.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var bT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function xT(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function ST(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||bT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",xT,!0),document.addEventListener("keyup",xT,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),bT=!0}function Ade(e){Tde(),e(ST());const t=()=>e(ST());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Nde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function tz(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,wT),onTouchStart:ka(Te.onTouchStart,wT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function wT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),nz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=tz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});nz.displayName="Checkbox";function Vde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function R4(e,t,n){return(e-t)*100/(n-t)}function rz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=iz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||Rx(H5,{styles:az}),qde=()=>x(H5,{styles:` +`,Gde=()=>x(H5,{styles:oz}),qde=()=>x(H5,{styles:` html { line-height: 1.5; -webkit-text-size-adjust: 100%; @@ -366,8 +366,8 @@ Error generating stack: `+o.message+` display: none; } - ${az} - `});function Hf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kde(e){return"current"in e}var sz=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>sz()&&e.test(navigator.vendor),Xde=e=>sz()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function _T(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_T(n),a=_T(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,lz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=lz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});uz.displayName="InputLeftAddon";uz.id="InputLeftAddon";var cz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});cz.displayName="InputRightAddon";cz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=lz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});dz.id="InputLeftElement";dz.displayName="InputLeftElement";var fz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});fz.id="InputRightElement";fz.displayName="InputRightElement";function ufe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return re.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var hz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});hz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(hz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var pz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});pz.displayName="Center";var hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var gz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return re.createElement(we.div,{ref:n,__css:w,...b})});gz.displayName="Grid";function kT(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kT(i),gridRow:kT(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[bfe,mz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var vz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});vz.displayName="UnorderedList";var yz=Pe(function(t,n){const r=mz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});yz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=mz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(gz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var bz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});bz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[b9]:od(n,i=>r[i])}}function Pfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var xz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});xz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(xz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var Sz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));Sz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function ET(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>od(w,k=>ET(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>ET(Lw("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(wz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var wz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});wz.displayName="WrapItem";var Afe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Cz=Afe,bp=()=>{},Ife={document:Cz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Mfe=Ife,Ofe={window:Mfe,document:Cz},_z=typeof window<"u"?{window,document}:Ofe,kz=C.exports.createContext(_z);kz.displayName="EnvironmentContext";function Ez(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:_z},[r,n]);return ee(kz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Ez.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Pz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Lz(e){if(!Pz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Tz(e))==null?void 0:t.defaultView)??window}function Tz(e){return Pz(e)?e.ownerDocument:document}function Bfe(e){return Tz(e).activeElement}var Az=e=>e.hasAttribute("tabindex"),Ffe=e=>Az(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Iz(e){return e.parentElement&&Iz(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Mz(e){if(!Lz(e)||Iz(e)||$fe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Hfe(e)?!0:Az(e)}function Wfe(e){return e?Lz(e)&&Mz(e)&&!Ffe(e):!1}var Vfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Oz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Mz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Oz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Vv=[Io,Ba,Fa,Mo],N0="start",pv="end",Xfe="clippingParents",Rz="viewport",Tg="popper",Qfe="reference",PT=Vv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+pv])},[]),Nz=[].concat(Vv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+pv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function che(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Dz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Dz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=z0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function LT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Uv(e){for(var t=Wa(e),n=LT(e);n&&fhe(n)&&yu(n).position==="static";)n=LT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Lm(e,t,n);return r>n?n:r}function Bz(){return{top:0,right:0,bottom:0,left:0}}function Fz(e){return Object.assign({},Bz(),e)}function $z(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Fz(typeof t!="number"?t:$z(t,Vv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Uv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Lm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!zz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:D0(t*i)/i||0,y:D0(n*i)/i||0}}function TT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var R=Uv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===pv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===pv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:B0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,TT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,TT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var _y={passive:!0};function Che(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,_y)}),s&&l.addEventListener("resize",n.update,_y),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,_y)}),s&&l.removeEventListener("resize",n.update,_y)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function AT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Dz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Hz(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Hz(fb(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=Hz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Tm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IT(e,t,n){return t===Rz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Tm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Uv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&zz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},IT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Wz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case pv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function gv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xfe:s,u=n.rootBoundary,h=u===void 0?Rz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Fz(typeof E!="number"?E:$z(E,Vv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Wz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Nz:l,h=B0(r),g=h?s?PT:PT.filter(function(b){return B0(b)===h}):Vv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=gv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[AT(e),t,AT(t)]}function Rhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=gv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function MT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function OT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=gv(t,{elementContext:"reference"}),s=gv(t,{altBoundary:!0}),l=MT(a,r),u=MT(s,i,o),h=OT(l),g=OT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Nz.reduce(function(h,g){return h[g]=Bhe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Wz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=gv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bz(),je=He[te],ct=He[ie],qe=Lm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Uv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Lm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Lm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var RT={placement:"bottom",modifiers:[],strategy:"absolute"};function NT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function rpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var ipe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ope=e=>ipe[e],DT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DT,...e}}:t={enabled:e,options:DT},t}var spe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},dpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BT(e)},effect:({state:e})=>()=>{BT(e)}},BT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:rpe(e.placement)})},hpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ppe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gpe(e,t="ltr"){var n;const r=((n=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Vz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Uz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function vpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function jz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function Gz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}Gz.displayName="PortalManager";var[qz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=xpe(),l=bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(qz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(qz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,ky=new WeakMap,Ey={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ey[n]||(Ey[n]=new WeakMap);var o=Ey[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&ky.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(ky.has(g)||g.removeAttribute(r),ky.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,ky=new WeakMap,Ey={})}},Kz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Yz(){}function Zz(){}Zz.resetWarningCache=Yz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Zz,resetWarningCache:Yz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Xz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Qz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Jz(e){return e}function eB(e,t){t===void 0&&(t=Jz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Jz),eB(e,t)}function tB(e){e===void 0&&(e={});var t=eB(null);return t.options=hl({async:!0,ssr:!1},e),t}var nB=function(e){var t=e.sideCar,n=UD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};nB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),nB}var rB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),iB=R7(),zpe=R7(),Bpe=tB({async:!0}),Fpe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&rB.useMedium(ct)},[]),X=iB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Xz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Qz([n,me]);return ee(Hn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const oB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function aB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return aB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),gB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],gB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(gB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return uB(t,n)}).filter(function(n){return jpe(n)})},FT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return cB(t,n)})},k9=function(e,t,n){return pB($7(F7(e,n),t),!0,n)},$T=function(e,t){return pB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},mv=function(e,t){return e.shadowRoot?mv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return mv(n,t)})},Jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},mB=function(e){return e.parentNode?mB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(mB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Xz,'="disabled"])')))):[r]),n},[])},vB=function(e){return e.activeElement?e.activeElement.shadowRoot?vB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?vB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},yB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return mv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return mv(t,e)}):!1},r0e=function(e,t){return t.filter(hB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return hB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HT=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},bB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=WT(e,0),k=WT(e,i-1);if(l===-1||h===-1)return bB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a0e=function(e){return function(t){var n,r=(n=dB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FT(r.filter(a0e(n)));return i&&i.length?HT(i):HT(FT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},xB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||mv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=xB(n||e,e,r),o=new Map,a=$T(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$T([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===bB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=xB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const SB=h0e;function wB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,vv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function VT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var x0e=function(t){return t&&"current"in t?t.current:t},S0e=function(t){return t?Boolean(vv):vv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(yB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=SB(g,qp,{focusOptions:l}),h0={})),vv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),VT(b,v.length,1,v),VT(b,-1,-1,v))}}}return t},CB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return wB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},_B=function(){vv="just",setTimeout(function(){vv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",CB),document.addEventListener("focusout",U7),window.addEventListener("blur",_B)},P0e=function(){document.removeEventListener("focusin",CB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",_B)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),B4(),wB(B4)):(P0e(),qp=null)}rB.assignSyncMedium(_0e);iB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:SB,focusInside:yB})});const A0e=$pe(L0e,T0e)(k0e);var kB=C.exports.forwardRef(function(t,n){return x(oB,{sideCar:A0e,ref:n,...t})}),EB=oB.propTypes||{};EB.sideCar;O7(EB,["sideCar"]);kB.propTypes={};const I0e=kB;var PB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Oz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};PB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",LB=tB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=UD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Qz([n,t]),O=hl(hl({},k),i);return ee(Hn,{children:[h&&x(L,{sideCar:LB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},TB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V0e=TB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + ${oz} + `});function Hf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kde(e){return"current"in e}var az=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>az()&&e.test(navigator.vendor),Xde=e=>az()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function CT(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=CT(n),a=CT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,sz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=sz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});lz.displayName="InputLeftAddon";lz.id="InputLeftAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});uz.displayName="InputRightAddon";uz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=sz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});cz.id="InputLeftElement";cz.displayName="InputLeftElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});dz.id="InputRightElement";dz.displayName="InputRightElement";function ufe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return re.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});fz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(fz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var hz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});hz.displayName="Center";var hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var pz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return re.createElement(we.div,{ref:n,__css:w,...b})});pz.displayName="Grid";function _T(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:_T(i),gridRow:_T(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[bfe,gz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var mz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});mz.displayName="UnorderedList";var vz=Pe(function(t,n){const r=gz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});vz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=gz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(pz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var yz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});yz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[b9]:od(n,i=>r[i])}}function Pfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var bz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});bz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(bz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var xz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));xz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function kT(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>od(w,k=>kT(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>kT(Lw("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(Sz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var Sz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});Sz.displayName="WrapItem";var Afe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},wz=Afe,bp=()=>{},Ife={document:wz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Mfe=Ife,Ofe={window:Mfe,document:wz},Cz=typeof window<"u"?{window,document}:Ofe,_z=C.exports.createContext(Cz);_z.displayName="EnvironmentContext";function kz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Cz},[r,n]);return ee(_z.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}kz.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Ez(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Pz(e){if(!Ez(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Lz(e))==null?void 0:t.defaultView)??window}function Lz(e){return Ez(e)?e.ownerDocument:document}function Bfe(e){return Lz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ffe=e=>Tz(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Az(e){return e.parentElement&&Az(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Iz(e){if(!Pz(e)||Az(e)||$fe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Hfe(e)?!0:Tz(e)}function Wfe(e){return e?Pz(e)&&Iz(e)&&!Ffe(e):!1}var Vfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Mz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Iz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Mz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Vv=[Io,Ba,Fa,Mo],N0="start",pv="end",Xfe="clippingParents",Oz="viewport",Tg="popper",Qfe="reference",ET=Vv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+pv])},[]),Rz=[].concat(Vv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+pv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function che(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Nz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=z0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Dz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function PT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Uv(e){for(var t=Wa(e),n=PT(e);n&&fhe(n)&&yu(n).position==="static";)n=PT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Lm(e,t,n);return r>n?n:r}function zz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign({},zz(),e)}function Fz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Bz(typeof t!="number"?t:Fz(t,Vv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Uv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Lm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Dz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:D0(t*i)/i||0,y:D0(n*i)/i||0}}function LT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var R=Uv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===pv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===pv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:B0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var _y={passive:!0};function Che(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,_y)}),s&&l.addEventListener("resize",n.update,_y),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,_y)}),s&&l.removeEventListener("resize",n.update,_y)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function TT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Nz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $z(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:$z(fb(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=$z(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Tm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function AT(e,t,n){return t===Oz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Tm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Uv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&Dz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=AT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},AT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Hz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case pv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function gv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xfe:s,u=n.rootBoundary,h=u===void 0?Oz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Bz(typeof E!="number"?E:Fz(E,Vv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Hz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Rz:l,h=B0(r),g=h?s?ET:ET.filter(function(b){return B0(b)===h}):Vv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=gv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[TT(e),t,TT(t)]}function Rhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=gv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function IT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function MT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=gv(t,{elementContext:"reference"}),s=gv(t,{altBoundary:!0}),l=IT(a,r),u=IT(s,i,o),h=MT(l),g=MT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Rz.reduce(function(h,g){return h[g]=Bhe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Hz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=gv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zz(),je=He[te],ct=He[ie],qe=Lm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Uv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Lm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Lm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var OT={placement:"bottom",modifiers:[],strategy:"absolute"};function RT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function rpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var ipe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ope=e=>ipe[e],NT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...NT,...e}}:t={enabled:e,options:NT},t}var spe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},dpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:rpe(e.placement)})},hpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ppe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gpe(e,t="ltr"){var n;const r=((n=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Wz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Vz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function vpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Uz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function jz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}jz.displayName="PortalManager";var[Gz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=xpe(),l=bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(Gz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(Gz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,ky=new WeakMap,Ey={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ey[n]||(Ey[n]=new WeakMap);var o=Ey[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&ky.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(ky.has(g)||g.removeAttribute(r),ky.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,ky=new WeakMap,Ey={})}},qz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Kz(){}function Yz(){}Yz.resetWarningCache=Kz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Yz,resetWarningCache:Kz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Zz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Xz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Qz(e){return e}function Jz(e,t){t===void 0&&(t=Qz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Qz),Jz(e,t)}function eB(e){e===void 0&&(e={});var t=Jz(null);return t.options=hl({async:!0,ssr:!1},e),t}var tB=function(e){var t=e.sideCar,n=VD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};tB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),tB}var nB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),rB=R7(),zpe=R7(),Bpe=eB({async:!0}),Fpe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&nB.useMedium(ct)},[]),X=rB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Zz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Xz([n,me]);return ee(Hn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const iB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function oB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return oB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),pB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],pB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(pB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return lB(t,n)}).filter(function(n){return jpe(n)})},BT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return uB(t,n)})},k9=function(e,t,n){return hB($7(F7(e,n),t),!0,n)},FT=function(e,t){return hB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},mv=function(e,t){return e.shadowRoot?mv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return mv(n,t)})},Jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},gB=function(e){return e.parentNode?gB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(gB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Zz,'="disabled"])')))):[r]),n},[])},mB=function(e){return e.activeElement?e.activeElement.shadowRoot?mB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?mB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},vB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return mv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return mv(t,e)}):!1},r0e=function(e,t){return t.filter(fB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return fB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},$T=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},HT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},yB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=HT(e,0),k=HT(e,i-1);if(l===-1||h===-1)return yB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a0e=function(e){return function(t){var n,r=(n=cB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=BT(r.filter(a0e(n)));return i&&i.length?$T(i):$T(BT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},bB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||mv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=bB(n||e,e,r),o=new Map,a=FT(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=FT([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===yB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=bB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const xB=h0e;function SB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,vv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function WT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var x0e=function(t){return t&&"current"in t?t.current:t},S0e=function(t){return t?Boolean(vv):vv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(vB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=xB(g,qp,{focusOptions:l}),h0={})),vv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),WT(b,v.length,1,v),WT(b,-1,-1,v))}}}return t},wB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return SB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},CB=function(){vv="just",setTimeout(function(){vv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",wB),document.addEventListener("focusout",U7),window.addEventListener("blur",CB)},P0e=function(){document.removeEventListener("focusin",wB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",CB)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),B4(),SB(B4)):(P0e(),qp=null)}nB.assignSyncMedium(_0e);rB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:xB,focusInside:vB})});const A0e=$pe(L0e,T0e)(k0e);var _B=C.exports.forwardRef(function(t,n){return x(iB,{sideCar:A0e,ref:n,...t})}),kB=iB.propTypes||{};kB.sideCar;O7(kB,["sideCar"]);_B.propTypes={};const I0e=_B;var EB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Mz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};EB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",PB=eB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=VD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Xz([n,t]),O=hl(hl({},k),i);return ee(Hn,{children:[h&&x(L,{sideCar:PB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V0e=LB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(M0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -404,10 +404,10 @@ Error generating stack: `+o.message+` body { `).concat(O0e,": ").concat(s,`px; } -`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Py=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Py,Py),window.removeEventListener("test",Py,Py)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},AB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return AB(e,"overflowY")},K0e=function(e){return AB(e,"overflowX")},UT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=IB(e,n);if(r){var i=MB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},IB=function(e,t){return e==="v"?q0e(t):K0e(t)},MB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=MB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&IB(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jT=function(e){return[e.deltaX,e.deltaY]},GT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` +`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Py=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Py,Py),window.removeEventListener("test",Py,Py)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return TB(e,"overflowY")},K0e=function(e){return TB(e,"overflowX")},VT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=AB(e,n);if(r){var i=IB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},AB=function(e,t){return e==="v"?q0e(t):K0e(t)},IB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=IB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&AB(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UT=function(e){return[e.deltaX,e.deltaY]},jT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},t1e=0,Cp=[];function n1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(t1e++)[0],o=C.exports.useState(function(){return TB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=d9([e.lockRef.current],(e.shards||[]).map(GT),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Ly(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-P[0],I="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=UT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?jT(E):Ly(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(GT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Ly(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Ly(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Hn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(LB,n1e);var OB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});OB.classNames=hb.classNames;const RB=OB;var sh=(...e)=>e.filter(Boolean).join(" ");function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Yg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Yg(z.onClick,R),onKeyDown:Yg(z.onKeyDown,E),onMouseDown:Yg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Kz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Yg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function NB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(PB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(RB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...qD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],DB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});DB.displayName="ModalTransition";var yv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=sh("chakra-modal__content",n),m=lh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return re.createElement(NB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(DB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});yv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),bv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:GD),__css:l,ref:t,className:a,...o})});bv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(yv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(KD),b1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=sh("chakra-modal__content",n),v=lh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=v1e();return re.createElement(NB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var zB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),w1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function qT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var C1e=50,KT=300;function _1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);qT(ct,"disabled",Te.stop,Te.isSpinning),qT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:zB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var BB=Pe(function(t,n){const r=pb();return re.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});BB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:zB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var FB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(FB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(FB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var jv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,Gv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Uz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Vz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=jz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=YT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=YT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function YT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=Gv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:jv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=Gv();return re.createElement(we.div,{...r(t,n),className:jv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=Gv();return x(cb,{size:"sm",onClick:r,className:jv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H1e=we(Il.section),$B=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});$B.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=Gv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x($B,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:jv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=Gv();return re.createElement(we.header,{...r(t,n),className:jv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function HB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var WB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};WB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=HB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(WB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=HB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),VB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});VB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var UB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});UB.displayName="SelectField";var jB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(UB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(GB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});jB.displayName="Select";var nge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),GB=e=>{const{children:t=x(nge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};GB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function qB(e){return!!e.touches}function age(e){return qB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function KB(e,t="page"){return qB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:KB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function YB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:KB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$Q.update(this.updatePoint)}};function ZT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:ZT(e.point,t[t.length-1]),offset:ZT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function XT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(XT(e)&&XT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function ZB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=YB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function XB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=XB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Zg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ty=e=>e||T3;function QB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Zg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ty(w).height>Ty(E).height?w:E,T3):r.reduce((w,E)=>Ty(w).width>Ty(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Zg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Zg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Zg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function JB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=JB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=XB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),iz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>QB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};ZB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Zg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eF=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});eF.defaultProps={orientation:"horizontal"};eF.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=JB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=YB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=iz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return QB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}ZB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var tF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});tF.displayName="SliderThumb";var nF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});nF.displayName="SliderTrack";var rF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});rF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),QT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=nz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QT(s.isChecked),"data-hover":QT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,iF,$ge,Hge]=gN();function Wge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Vge,qv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=qv(),i=iF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=qv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:oF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":aF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=qv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:aF(n,s),tabId:oF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=qv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=jz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zge(){const e=qv(),t=iF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function oF(e,t){return`${e}--tab-${t}`}function aF(e,t){return`${e}--tabpanel-${t}`}var[Xge,Kv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),sF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});sF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=Kv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...Kv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var lF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=Kv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});lF.displayName="TabPanel";var uF=Pe(function(t,n){const r=Kge(t),i=Kv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});uF.displayName="TabPanels";var cF=Pe(function(t,n){const r=Kv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});cF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],dF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});dF.displayName="Textarea";function rme(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ame=(e,t)=>e.find(n=>n.id===t);function JT(e,t){const n=fF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function fF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=JT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:hF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=fF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(JT(pl.getState(),i).position)}}var eA=0;function dme(e,t={}){eA+=1;const n=t.id??eA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(ZD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(QD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(JD,{id:u?.title,children:i}),s&&x(XD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function hF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=hF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=fN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},pF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});pF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=pF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Hn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Uz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Vz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Hn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Hn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Ez,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(pR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(Gz,{zIndex:r,children:l}):l]})})};function gF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function mF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function vF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=bF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return xv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===xv&&(xv=e.l)}function tA(e){return xv={p:[],l:xv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==yF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(mF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function rA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Sv;a&&(l=[s],u=Xg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||mF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return Sv.get(l,o)},set:function(l){var u=this[nr];Sv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!vF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,xF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function SF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G4}function i(s,l){r(s)===G4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bme=function(t,n){return t===n};function Fme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=VT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=VT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?UT(E):Ly(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(jT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Ly(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,UT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Ly(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Hn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(PB,n1e);var MB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});MB.classNames=hb.classNames;const OB=MB;var sh=(...e)=>e.filter(Boolean).join(" ");function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Yg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Yg(z.onClick,R),onKeyDown:Yg(z.onKeyDown,E),onMouseDown:Yg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return qz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Yg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function RB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(EB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(OB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...GD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],NB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});NB.displayName="ModalTransition";var yv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=sh("chakra-modal__content",n),m=lh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return re.createElement(RB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(NB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});yv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),bv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:jD),__css:l,ref:t,className:a,...o})});bv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(yv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(qD),b1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=sh("chakra-modal__content",n),v=lh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=v1e();return re.createElement(RB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var DB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),w1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function GT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var C1e=50,qT=300;function _1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},qT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},qT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);GT(ct,"disabled",Te.stop,Te.isSpinning),GT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:DB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var zB=Pe(function(t,n){const r=pb();return re.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});zB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:DB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var BB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(BB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(BB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var jv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,Gv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Vz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Wz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=Uz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=KT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=KT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function KT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=Gv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:jv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=Gv();return re.createElement(we.div,{...r(t,n),className:jv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=Gv();return x(cb,{size:"sm",onClick:r,className:jv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H1e=we(Il.section),FB=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});FB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=Gv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(FB,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:jv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=Gv();return re.createElement(we.header,{...r(t,n),className:jv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function $B(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var HB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};HB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=$B({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(HB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=$B({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),WB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});WB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var VB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});VB.displayName="SelectField";var UB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(VB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(jB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});UB.displayName="Select";var nge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),jB=e=>{const{children:t=x(nge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};jB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function GB(e){return!!e.touches}function age(e){return GB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function qB(e,t="page"){return GB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:qB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function KB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:qB(e)},{timestamp:i}=EP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=EP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$Q.update(this.updatePoint)}};function YT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:YT(e.point,t[t.length-1]),offset:YT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function ZT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(ZT(e)&&ZT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function YB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=KB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function ZB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=ZB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Zg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ty=e=>e||T3;function XB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Zg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ty(w).height>Ty(E).height?w:E,T3):r.reduce((w,E)=>Ty(w).width>Ty(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Zg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Zg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Zg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function QB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=QB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=ZB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),rz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>XB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};YB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Zg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),JB=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});JB.defaultProps={orientation:"horizontal"};JB.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=QB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=KB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=rz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return XB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}YB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var eF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});eF.displayName="SliderThumb";var tF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});tF.displayName="SliderTrack";var nF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});nF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),XT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=tz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":XT(s.isChecked),"data-hover":XT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,rF,$ge,Hge]=pN();function Wge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Vge,qv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=qv(),i=rF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=qv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:iF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":oF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=qv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:oF(n,s),tabId:iF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=qv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Uz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zge(){const e=qv(),t=rF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function iF(e,t){return`${e}--tab-${t}`}function oF(e,t){return`${e}--tabpanel-${t}`}var[Xge,Kv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),aF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});aF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=Kv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...Kv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var sF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=Kv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});sF.displayName="TabPanel";var lF=Pe(function(t,n){const r=Kge(t),i=Kv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});lF.displayName="TabPanels";var uF=Pe(function(t,n){const r=Kv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});uF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],cF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});cF.displayName="Textarea";function rme(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ame=(e,t)=>e.find(n=>n.id===t);function QT(e,t){const n=dF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function dF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=QT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:fF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=dF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(QT(pl.getState(),i).position)}}var JT=0;function dme(e,t={}){JT+=1;const n=t.id??JT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(YD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(XD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(QD,{id:u?.title,children:i}),s&&x(ZD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function fF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=fF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=dN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},hF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});hF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=hF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Hn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Vz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Wz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Hn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Hn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(kz,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(jz,{zIndex:r,children:l}):l]})})};function pF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function gF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function mF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return xv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===xv&&(xv=e.l)}function eA(e){return xv={p:[],l:xv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==vF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return tA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return tA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function tA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(gF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function nA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Sv;a&&(l=[s],u=Xg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=rA(n,o),i.I=!1}else r=rA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||gF(r,a,t(s))}),o===3?new Set(r):r}(e)}function rA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return Sv.get(l,o)},set:function(l){var u=this[nr];Sv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!mF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,bF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function xF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G4}function i(s,l){r(s)===G4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bme=function(t,n){return t===n};function Fme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wve:Sve;EF.useSyncExternalStore=$0.useSyncExternalStore!==void 0?$0.useSyncExternalStore:Cve;(function(e){e.exports=EF})(kF);var PF={exports:{}},LF={};/** + */var $0=C.exports;function gve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mve=typeof Object.is=="function"?Object.is:gve,vve=$0.useState,yve=$0.useEffect,bve=$0.useLayoutEffect,xve=$0.useDebugValue;function Sve(e,t){var n=t(),r=vve({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return bve(function(){i.value=n,i.getSnapshot=t,s6(i)&&o({inst:i})},[e,n,t]),yve(function(){return s6(i)&&o({inst:i}),e(function(){s6(i)&&o({inst:i})})},[e]),xve(n),n}function s6(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mve(e,n)}catch{return!0}}function wve(e,t){return t()}var Cve=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wve:Sve;kF.useSyncExternalStore=$0.useSyncExternalStore!==void 0?$0.useSyncExternalStore:Cve;(function(e){e.exports=kF})(_F);var EF={exports:{}},PF={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -423,7 +423,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var bb=C.exports,_ve=kF.exports;function kve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eve=typeof Object.is=="function"?Object.is:kve,Pve=_ve.useSyncExternalStore,Lve=bb.useRef,Tve=bb.useEffect,Ave=bb.useMemo,Ive=bb.useDebugValue;LF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ave(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,Eve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Pve(e,o[0],o[1]);return Tve(function(){a.hasValue=!0,a.value=s},[s]),Ive(s),s};(function(e){e.exports=LF})(PF);function Mve(e){e()}let TF=Mve;const Ove=e=>TF=e,Rve=()=>TF,ld=C.exports.createContext(null);function AF(){return C.exports.useContext(ld)}const Nve=()=>{throw new Error("uSES not initialized!")};let IF=Nve;const Dve=e=>{IF=e},zve=(e,t)=>e===t;function Bve(e=ld){const t=e===ld?AF:()=>C.exports.useContext(e);return function(r,i=zve){const{store:o,subscription:a,getServerState:s}=t(),l=IF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Fve=Bve();var $ve={exports:{}},On={};/** + */var bb=C.exports,_ve=_F.exports;function kve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eve=typeof Object.is=="function"?Object.is:kve,Pve=_ve.useSyncExternalStore,Lve=bb.useRef,Tve=bb.useEffect,Ave=bb.useMemo,Ive=bb.useDebugValue;PF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ave(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,Eve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Pve(e,o[0],o[1]);return Tve(function(){a.hasValue=!0,a.value=s},[s]),Ive(s),s};(function(e){e.exports=PF})(EF);function Mve(e){e()}let LF=Mve;const Ove=e=>LF=e,Rve=()=>LF,ld=C.exports.createContext(null);function TF(){return C.exports.useContext(ld)}const Nve=()=>{throw new Error("uSES not initialized!")};let AF=Nve;const Dve=e=>{AF=e},zve=(e,t)=>e===t;function Bve(e=ld){const t=e===ld?TF:()=>C.exports.useContext(e);return function(r,i=zve){const{store:o,subscription:a,getServerState:s}=t(),l=AF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Fve=Bve();var $ve={exports:{}},On={};/** * @license React * react-is.production.min.js * @@ -431,7 +431,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),xb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),wb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),_b=Symbol.for("react.context"),Hve=Symbol.for("react.server_context"),kb=Symbol.for("react.forward_ref"),Eb=Symbol.for("react.suspense"),Pb=Symbol.for("react.suspense_list"),Lb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Wve=Symbol.for("react.offscreen"),MF;MF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case xb:case wb:case Sb:case Eb:case Pb:return e;default:switch(e=e&&e.$$typeof,e){case Hve:case _b:case kb:case Tb:case Lb:case Cb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=_b;On.ContextProvider=Cb;On.Element=p_;On.ForwardRef=kb;On.Fragment=xb;On.Lazy=Tb;On.Memo=Lb;On.Portal=g_;On.Profiler=wb;On.StrictMode=Sb;On.Suspense=Eb;On.SuspenseList=Pb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===_b};On.isContextProvider=function(e){return Va(e)===Cb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===kb};On.isFragment=function(e){return Va(e)===xb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Lb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===wb};On.isStrictMode=function(e){return Va(e)===Sb};On.isSuspense=function(e){return Va(e)===Eb};On.isSuspenseList=function(e){return Va(e)===Pb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xb||e===wb||e===Sb||e===Eb||e===Pb||e===Wve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Lb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===kb||e.$$typeof===MF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})($ve);function Vve(){const e=Rve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const mA={notify(){},get:()=>[]};function Uve(e,t){let n,r=mA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Vve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const jve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gve=jve?C.exports.useLayoutEffect:C.exports.useEffect;function qve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Uve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Gve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function OF(e=ld){const t=e===ld?AF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Kve=OF();function Yve(e=ld){const t=e===ld?Kve:OF(e);return function(){return t().dispatch}}const Zve=Yve();Dve(PF.exports.useSyncExternalStoreWithSelector);Ove(Al.exports.unstable_batchedUpdates);var m_="persist:",RF="persist/FLUSH",v_="persist/REHYDRATE",NF="persist/PAUSE",DF="persist/PERSIST",zF="persist/PURGE",BF="persist/REGISTER",Xve=-1;function A3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A3=function(n){return typeof n}:A3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A3(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qve(e){for(var t=1;t{Object.keys(R).forEach(function(D){!L(D)||h[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){R[D]===void 0&&L(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),D=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(D!==void 0)try{g[R]=l(D)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(I)}function L(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function I(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function n2e(e){return JSON.stringify(e)}function r2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=i2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function i2e(e){return JSON.parse(e)}function o2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key);return t.removeItem(n,a2e)}function a2e(e){}function yA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function u2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var c2e=5e3;function d2e(e,t){var n=e.version!==void 0?e.version:Xve;e.debug;var r=e.stateReconciler===void 0?e2e:e.stateReconciler,i=e.getStoredState||r2e,o=e.timeout!==void 0?e.timeout:c2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=l2e(m,["_persist"]),w=b;if(g.type===DF){var E=!1,P=function(z,$){E||(g.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=t2e(e)),v)return nu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,V){return Promise.resolve($)};z(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===zF)return s=!0,g.result(o2e(e)),nu({},t(w,g),{_persist:v});if(g.type===RF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===NF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(nu({},R,{_persist:v}))}}function bA(e){return p2e(e)||h2e(e)||f2e()}function f2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function h2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function p2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:FF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case BF:return F9({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),F9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function v2e(e,t,n){var r=n||!1,i=f_(m2e,FF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:BF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=F9({},i,{purge:function(){var u=[];return e.dispatch({type:zF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:NF})},persist:function(){e.dispatch({type:DF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=x2e;function I3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I3=function(n){return typeof n}:I3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I3(e)}function l6(){}var y2e={getItem:l6,setItem:l6,removeItem:l6};function b2e(e){if((typeof self>"u"?"undefined":I3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function x2e(e){var t="".concat(e,"Storage");return b2e(t)?self[t]:y2e}y_.__esModule=!0;y_.default=C2e;var S2e=w2e(b_);function w2e(e){return e&&e.__esModule?e:{default:e}}function C2e(e){var t=(0,S2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var $F=void 0,_2e=k2e(y_);function k2e(e){return e&&e.__esModule?e:{default:e}}var E2e=(0,_2e.default)("local");$F=E2e;var HF={},WF={},Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.PLACEHOLDER_UNDEFINED=Jf.PACKAGE_NAME=void 0;Jf.PACKAGE_NAME="redux-deep-persist";Jf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Jf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,ie){ie||(ie=new Set([j])),te||(te="");for(const le in j){const G=te?`${te}.${le}`:le,W=j[le];if((0,e.isObjectLike)(W))return ie.has(W)?`${te}.${le}:`:(ie.add(W),(0,e.getCircularPath)(W,G,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const ie in j){const le=j[ie];te[ie]=(0,e._cloneDeep)(le)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const ie=(0,e.cloneDeep)(j),le=(0,e.cloneDeep)(te),G=Object.keys(ie).reduce((q,Q)=>(h.call(le,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(ie)||(0,e.isDate)(le))return ie.valueOf()===le.valueOf()?{}:le;const W=Object.keys(le).reduce((q,Q)=>{if(!h.call(ie,Q))return q[Q]=le[Q],q;const X=(0,e.difference)(ie[Q],le[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(le)||!(0,e.isArray)(ie)&&(0,e.isArray)(le)?le:q:(q[Q]=X,q)},G);return delete W._persist,W};e.difference=b;const w=function(j,te){return te.reduce((ie,le)=>{if(ie){const G=parseInt(le,10),W=(0,e.isIntegerString)(le)&&G<0?ie.length+G:le;return(0,e.isString)(ie)?ie.charAt(W):ie[W]}},j)};e.path=w;const E=function(j,te){return[...j].reverse().reduce((G,W,q)=>{const Q=(0,e.isIntegerString)(W)?[]:{};return Q[W]=q===0?te:G,Q},{})};e.assocPath=E;const P=function(j,te){const ie=(0,e.cloneDeep)(j);return te.reduce((le,G,W)=>(W===te.length-1&&le&&(0,e.isObjectLike)(le)&&delete le[G],le&&le[G]),ie),ie};e.dissocPath=P;const k=function(j,te,...ie){if(!ie||!ie.length)return te;const le=ie.shift(),{preservePlaceholder:G,preserveUndefined:W}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(le))for(const q in le)if((0,e.isObjectLike)(le[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],le[q]);else if((0,e.isArray)(te)){let Q=le[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=le[q]!==t.PLACEHOLDER_UNDEFINED?le[q]:void 0;te[q]=Q}return k(j,te,...ie)},L=function(j,te,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=L;const I=function(j,te=[],ie,le,G){if(!(0,e.isObjectLike)(j))return j;for(const W in j){const q=j[W],Q=(0,e.isArray)(j),X=le?le+"."+W:W;q===null&&(ie===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),q===void 0&&G&&ie===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,ie,X,G)}},O=function(j,te,ie,le){const G=(0,e.cloneDeep)(j);return I(G,te,ie,"",le),G};e.preserveUndefined=O;const R=function(j,te,ie){return ie.indexOf(j)===te};e.unique=R;const D=function(j){return j.reduce((te,ie)=>{const le=j.filter(me=>me===ie),G=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:W,subsets:q}=te,Q=le.length>1&&W.indexOf(ie)===-1,X=G.length>1;return{duplicates:[...W,...Q?le:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,ie){const le=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${le} configuration.`,W=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),xb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),wb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),_b=Symbol.for("react.context"),Hve=Symbol.for("react.server_context"),kb=Symbol.for("react.forward_ref"),Eb=Symbol.for("react.suspense"),Pb=Symbol.for("react.suspense_list"),Lb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Wve=Symbol.for("react.offscreen"),IF;IF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case xb:case wb:case Sb:case Eb:case Pb:return e;default:switch(e=e&&e.$$typeof,e){case Hve:case _b:case kb:case Tb:case Lb:case Cb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=_b;On.ContextProvider=Cb;On.Element=p_;On.ForwardRef=kb;On.Fragment=xb;On.Lazy=Tb;On.Memo=Lb;On.Portal=g_;On.Profiler=wb;On.StrictMode=Sb;On.Suspense=Eb;On.SuspenseList=Pb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===_b};On.isContextProvider=function(e){return Va(e)===Cb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===kb};On.isFragment=function(e){return Va(e)===xb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Lb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===wb};On.isStrictMode=function(e){return Va(e)===Sb};On.isSuspense=function(e){return Va(e)===Eb};On.isSuspenseList=function(e){return Va(e)===Pb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xb||e===wb||e===Sb||e===Eb||e===Pb||e===Wve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Lb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===kb||e.$$typeof===IF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})($ve);function Vve(){const e=Rve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const gA={notify(){},get:()=>[]};function Uve(e,t){let n,r=gA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Vve())}function u(){n&&(n(),n=void 0,r.clear(),r=gA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const jve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gve=jve?C.exports.useLayoutEffect:C.exports.useEffect;function qve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Uve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Gve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function MF(e=ld){const t=e===ld?TF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Kve=MF();function Yve(e=ld){const t=e===ld?Kve:MF(e);return function(){return t().dispatch}}const Zve=Yve();Dve(EF.exports.useSyncExternalStoreWithSelector);Ove(Al.exports.unstable_batchedUpdates);var m_="persist:",OF="persist/FLUSH",v_="persist/REHYDRATE",RF="persist/PAUSE",NF="persist/PERSIST",DF="persist/PURGE",zF="persist/REGISTER",Xve=-1;function A3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A3=function(n){return typeof n}:A3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A3(e)}function mA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qve(e){for(var t=1;t{Object.keys(R).forEach(function(D){!L(D)||h[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){R[D]===void 0&&L(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),D=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(D!==void 0)try{g[R]=l(D)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(I)}function L(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function I(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function n2e(e){return JSON.stringify(e)}function r2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=i2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function i2e(e){return JSON.parse(e)}function o2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key);return t.removeItem(n,a2e)}function a2e(e){}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function u2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var c2e=5e3;function d2e(e,t){var n=e.version!==void 0?e.version:Xve;e.debug;var r=e.stateReconciler===void 0?e2e:e.stateReconciler,i=e.getStoredState||r2e,o=e.timeout!==void 0?e.timeout:c2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=l2e(m,["_persist"]),w=b;if(g.type===NF){var E=!1,P=function(z,$){E||(g.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=t2e(e)),v)return nu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,V){return Promise.resolve($)};z(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===DF)return s=!0,g.result(o2e(e)),nu({},t(w,g),{_persist:v});if(g.type===OF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===RF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(nu({},R,{_persist:v}))}}function yA(e){return p2e(e)||h2e(e)||f2e()}function f2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function h2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function p2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:BF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case zF:return F9({},t,{registry:[].concat(yA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=yA(t.registry);return i.splice(r,1),F9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function v2e(e,t,n){var r=n||!1,i=f_(m2e,BF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:zF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=F9({},i,{purge:function(){var u=[];return e.dispatch({type:DF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:OF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:RF})},persist:function(){e.dispatch({type:NF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=x2e;function I3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I3=function(n){return typeof n}:I3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I3(e)}function l6(){}var y2e={getItem:l6,setItem:l6,removeItem:l6};function b2e(e){if((typeof self>"u"?"undefined":I3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function x2e(e){var t="".concat(e,"Storage");return b2e(t)?self[t]:y2e}y_.__esModule=!0;y_.default=C2e;var S2e=w2e(b_);function w2e(e){return e&&e.__esModule?e:{default:e}}function C2e(e){var t=(0,S2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var FF=void 0,_2e=k2e(y_);function k2e(e){return e&&e.__esModule?e:{default:e}}var E2e=(0,_2e.default)("local");FF=E2e;var $F={},HF={},Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.PLACEHOLDER_UNDEFINED=Jf.PACKAGE_NAME=void 0;Jf.PACKAGE_NAME="redux-deep-persist";Jf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Jf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,ie){ie||(ie=new Set([j])),te||(te="");for(const le in j){const G=te?`${te}.${le}`:le,W=j[le];if((0,e.isObjectLike)(W))return ie.has(W)?`${te}.${le}:`:(ie.add(W),(0,e.getCircularPath)(W,G,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const ie in j){const le=j[ie];te[ie]=(0,e._cloneDeep)(le)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const ie=(0,e.cloneDeep)(j),le=(0,e.cloneDeep)(te),G=Object.keys(ie).reduce((q,Q)=>(h.call(le,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(ie)||(0,e.isDate)(le))return ie.valueOf()===le.valueOf()?{}:le;const W=Object.keys(le).reduce((q,Q)=>{if(!h.call(ie,Q))return q[Q]=le[Q],q;const X=(0,e.difference)(ie[Q],le[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(le)||!(0,e.isArray)(ie)&&(0,e.isArray)(le)?le:q:(q[Q]=X,q)},G);return delete W._persist,W};e.difference=b;const w=function(j,te){return te.reduce((ie,le)=>{if(ie){const G=parseInt(le,10),W=(0,e.isIntegerString)(le)&&G<0?ie.length+G:le;return(0,e.isString)(ie)?ie.charAt(W):ie[W]}},j)};e.path=w;const E=function(j,te){return[...j].reverse().reduce((G,W,q)=>{const Q=(0,e.isIntegerString)(W)?[]:{};return Q[W]=q===0?te:G,Q},{})};e.assocPath=E;const P=function(j,te){const ie=(0,e.cloneDeep)(j);return te.reduce((le,G,W)=>(W===te.length-1&&le&&(0,e.isObjectLike)(le)&&delete le[G],le&&le[G]),ie),ie};e.dissocPath=P;const k=function(j,te,...ie){if(!ie||!ie.length)return te;const le=ie.shift(),{preservePlaceholder:G,preserveUndefined:W}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(le))for(const q in le)if((0,e.isObjectLike)(le[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],le[q]);else if((0,e.isArray)(te)){let Q=le[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=le[q]!==t.PLACEHOLDER_UNDEFINED?le[q]:void 0;te[q]=Q}return k(j,te,...ie)},L=function(j,te,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=L;const I=function(j,te=[],ie,le,G){if(!(0,e.isObjectLike)(j))return j;for(const W in j){const q=j[W],Q=(0,e.isArray)(j),X=le?le+"."+W:W;q===null&&(ie===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),q===void 0&&G&&ie===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,ie,X,G)}},O=function(j,te,ie,le){const G=(0,e.cloneDeep)(j);return I(G,te,ie,"",le),G};e.preserveUndefined=O;const R=function(j,te,ie){return ie.indexOf(j)===te};e.unique=R;const D=function(j){return j.reduce((te,ie)=>{const le=j.filter(me=>me===ie),G=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:W,subsets:q}=te,Q=le.length>1&&W.indexOf(ie)===-1,X=G.length>1;return{duplicates:[...W,...Q?le:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,ie){const le=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${le} configuration.`,W=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${W}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. @@ -447,16 +447,16 @@ ${JSON.stringify(Q)} ${JSON.stringify(j)}`);if(te.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,ie)=>{const le=ie.split("."),G=le[0],W=le.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:W?[W]:void 0}),q&&!Q&&W&&(q[G]=[W]),q&&Q&&W&&Q.push(W),te},[]):[]};e.getRootKeysGroup=de})(WF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,L):P,out:(P,k,L)=>!E(k)&&m?m(P,k,L):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>R.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...V,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(HF);const M3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),P2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?P2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),K4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),L2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** + ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,ie)=>{const le=ie.split("."),G=le[0],W=le.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:W?[W]:void 0}),q&&!Q&&W&&(q[G]=[W]),q&&Q&&W&&Q.push(W),te},[]):[]};e.getRootKeysGroup=de})(HF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,L):P,out:(P,k,L)=>!E(k)&&m?m(P,k,L):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>R.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...V,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})($F);const M3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),P2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?P2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),K4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),L2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Vn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var s2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function l2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function P2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=k2,Wo.prototype.delete=E2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=P2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:ck(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Un($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(c);return function(S){return jh(S,c,p)}}function jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:Hk(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(hk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return N2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=h2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function I2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return Qd?un(Qd.call(c)):{}}function M2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function O2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Vn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var s2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function l2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function P2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=k2,Wo.prototype.delete=E2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=P2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:uk(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Bk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Dk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Un($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(c);return function(S){return jh(S,c,p)}}function jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:$k(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(fk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return N2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=h2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function I2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return Qd?un(Qd.call(c)):{}}function M2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function O2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ /* [wrapped with `+p+`] */ -`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function N2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function D2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:D2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return Ek(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=bk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:D2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(xk),QU=ug(Sk);function JU(c,p){return Lr(z2(c,p),1)}function ej(c,p){return Lr(z2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(z2(c,p),S)}function Pk(c,p){var S=Rt(c)?Un:Qa;return S(c,Le(p,3))}function Lk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),W2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function z2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?r2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,$2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return W2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),B2=p2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Tk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ik=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ik));A|=O}return he(p,A,c,S,N)});function Mk(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Jk=p-is;return Ae?Kr(Jk,F-Ql):Jk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=B2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(B2())}function Xo(){var Mr=B2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function F2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(F2.Cache||Vo),S}F2.Cache=Vo;function $2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Sj(c){return Ak(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&H2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=g2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function H2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return Bk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Dk(c)&&c>=-W&&c<=W}var Fk=Bs?Er(Bs):Bt;function W2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(xo(c))return W2(c)?Di(c):wi(c);if(Xu&&c[Xu])return l2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Wk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){wa(p,So(p),c)}),V2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return jk(c,$2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Dx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(S1,s2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=V2({},p,A,Re);var N=V2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` +`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function N2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,_k(c,S)});function kk(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function D2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:D2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return kk(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=Fk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=yk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:D2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(bk),QU=ug(xk);function JU(c,p){return Lr(z2(c,p),1)}function ej(c,p){return Lr(z2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(z2(c,p),S)}function Ek(c,p){var S=Rt(c)?Un:Qa;return S(c,Le(p,3))}function Pk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),W2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function z2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?r2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,$2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return W2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),B2=p2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Tk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ak=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ak));A|=O}return he(p,A,c,S,N)});function Ik(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Qk=p-is;return Ae?Kr(Qk,F-Ql):Qk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=B2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(B2())}function Xo(){var Mr=B2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function F2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(F2.Cache||Vo),S}F2.Cache=Vo;function $2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Sj(c){return Tk(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&H2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=g2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Nk(c){return typeof c=="number"&&c==Dt(c)}function H2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Dk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return zk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function zk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Nk(c)&&c>=-W&&c<=W}var Bk=Bs?Er(Bs):Bt;function W2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function Fk(c){if(!c)return[];if(xo(c))return W2(c)?Di(c):wi(c);if(Xu&&c[Xu])return l2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function $k(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Hk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Wk=Xi(function(c,p){wa(p,So(p),c)}),V2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return Uk(c,$2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function Uk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?qk(p):p)});function qk(c){return Dx(Sn(c).toLowerCase())}function Kk(c){return c=Sn(c),c&&c.replace(S1,s2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=V2({},p,A,Re);var N=V2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` `;c.replace(Ge,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Ae+=c.slice(_e,Xo).replace(w1,$s),Gt&&(J=!0,Ae+=`' + __e(`+Gt+`) + '`),Ji&&(ce=!0,Ae+=`'; @@ -473,8 +473,8 @@ __p += '`),en&&(Ae+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ae+`return __p -}`;var $t=Xk(function(){return Jt(F,ht+"return "+Ae).apply(n,K)});if($t.source=Ae,Mx($t))throw $t;return $t}function rq(c){return Sn(c).toLowerCase()}function iq(c){return Sn(c).toUpperCase()}function oq(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Di(p),F=$o(A,N),K=Ka(A,N)+1;return ts(A,F,K).join("")}function aq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,A1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Ka(A,Di(p))+1;return ts(A,0,N).join("")}function sq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Mu,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),N=$o(A,Di(p));return ts(A,N).join("")}function lq(c,p){var S=V,A=Y;if(lr(p)){var N="separator"in p?p.separator:N;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,d2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Un(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:D2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Un(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=x2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,VF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&VF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},UF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?VF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),jF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=jF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),GF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=GF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),qF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),KF=De((e,t)=>{var n=Mb(),r=qF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),YF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),K2e=De((e,t)=>{var n=KF(),r=q2e(),i=qF(),o=YF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),J2e=De((e,t)=>{var n=Ob(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),eye=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),ZF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=ZF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=ZF(),r=cye(),i=dye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),XF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=jF(),o=XF(),a=mye(),s=vye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Cye=De((e,t)=>{var n=Sye(),r=wye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),_ye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),QF=De((e,t)=>{var n=_u(),r=Pye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Lye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Tye=De((e,t)=>{var n=Mb(),r=JF(),i=Nb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=GF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),e$=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=QF(),a=Lye(),s=e$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),zye=De((e,t)=>{var n=KF(),r=JF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=YF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=XF(),i=yye(),o=$ye(),a=jye(),s=__(),l=QF(),u=e$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),t$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Am(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return n$(e,["input","textarea","select"])}function n$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Jye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var e3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=UF(t$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var SA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!n$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Am(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){SA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Am(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Am(w,u?.combinationKey)))}},[e,l,u,h]),i}UF(t$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Am(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Am(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const c3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),d3e=st({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),m3e=st({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const v3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(jB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var r$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=re.createContext&&re.createContext(r$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function fh(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(Sz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Hn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(nF,{className:"invokeai__slider_track",...Y,children:x(rF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(tF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(BB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(pC(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(pC(.5))}})}const s$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},l$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(t2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const u$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(t2(u$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Zv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(gC(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(mC(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(rz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},c$=yb({name:"system",initialState:t4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:_A,setSocketId:iEe,setShouldConfirmOnDelete:d$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:f$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=c$.actions,d4e=c$.reducer;function f4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function h$(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function p$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function g$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function m$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function v$(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function y$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function b$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function A4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function I4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function O4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function R4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function N4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function D4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function F4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function x$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function $4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function H4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function U4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function G4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function f6(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function I_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Ay;const e5e=new Uint8Array(16);function t5e(){if(!Ay&&(Ay=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ay))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ay(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:r5e};function Ap(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Iy=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",S$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},LA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...LA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...LA}},w$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,E=Ve.clamp(m,64,h),P=Ve.clamp(v,64,g),k=b>0?i-b:i,L=w>0?o-w:o,I=Ve.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-E),O=Ve.clamp(L,e[e.currentCanvas].stageCoordinates.y,g-P);e[e.currentCanvas].boundingBoxDimensions={width:E,height:P},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(z$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:C$,setEraserSize:u5e,addLine:_$,addPointToCurrentLine:k$,setShouldPreserveMaskedArea:E$,setIsMaskEnabled:P$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:L$,clearMask:T$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:A$,setStageDimensions:TA,setImageToInpaint:Y4,setImageToOutpaint:I$,setBoundingBoxDimensions:Qg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:M$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:O$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:AA,setShouldLockBoundingBox:R$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:My,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:N$,setCurrentCanvas:D$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=w$.actions,k5e=w$.reducer,z$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Xv=Qe([jt],e=>e.layerState.objects.find(S$)),B$=Qe([e=>e.options,e=>e.system,Xv,vn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function F$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(B$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(vz,{children:o.map((u,h)=>x(yz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),H$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(F$,{}),x(H$,{}),x($$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(B$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(dF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function W$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function V$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},U$=re.createContext(null);var j$=function(t){return t.scrollTop},Jg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Jg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Jg?{status:wf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this);a&&j$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Jg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[sy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:sy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Jg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(U$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=U$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Jg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},K$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);q$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(G$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(W$,{}):x(V$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:K$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(s$,{}),feature:Xr.OTHER,options:x(l$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(d$(!b.target.checked));return ee(Hn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(bv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(_v(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(t2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(I$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(y$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Zv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(v$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},Z$=yb({name:"gallery",initialState:U5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Oy,clearIntermediateImage:DA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Ry,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});st({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});st({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});st({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});st({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});st({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});st({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});st({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});st({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});st({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});st({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});st({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});st({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});st({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});st({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});st({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});st({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});st({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});st({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});st({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});st({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});st({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});st({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});st({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});st({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});st({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});st({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});st({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});st({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});st({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});st({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});st({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});st({displayName:"SpinnerIcon",path:ee(Hn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});st({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});st({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});st({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});st({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});st({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});st({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});st({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});st({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});st({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});st({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});st({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function J5e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Hn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(gC(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(mC(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(t2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(_v(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(vC(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(pC(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Hn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(gC($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(mC(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(pz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(F_())},h=()=>{e(B_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(g$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Hn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Hn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(rbe,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function obe(e){return lt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var abe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],HA="__resizable_base__",rH=function(e){ube(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(HA):o.className+=HA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ep("left",o),s=i&&Ep("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Dy(n,I,O),r=Dy(r,R,D)}else n=Dy(n,h,g),r=Dy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&dbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&zy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=zy(n)?n.touches[0].clientX:n.clientX,h=zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=fbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=$A(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(lbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Qv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pbe(i,...t)]}function pbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});wv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Qv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(wv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let WA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){lH(wbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function UA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},Tbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,jA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,jA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),qA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=GA(t,e),r=GA(t.reverse(),e);return[n,r]}function uH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const qA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=i1(t),l=H_(s),u=r[l]/2-i[l]/2,h=r1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=YA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=H_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[XA(e),t,XA(t)]}const Kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Q4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await Q4(t,l),g=i1(r1(i)),m=dH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=i1(i),m=dH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Jv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Jv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const eI=Math.min,Im=Math.max,e5=Math.round;function wu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||wd(e)}function tI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(W_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=tI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function nI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function axe(e,t){const n=Pu(e),r=wd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Im(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Im(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Jv(i||n).direction==="rtl"&&(s+=Im(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function rI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Jv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Im(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Im(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:nI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jv(e).direction==="rtl"};function hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...cd(e)?t5(e):[],...t5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!X9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=gxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const vxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const bH="Popper",[V_,xH]=Qv(bH),[bxe,SH]=V_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=V_(n5),[_xe,kxe]=V_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=wH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Fy(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Fy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=Fy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Fy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Fy(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[Q9,_H,Bxe]=aH(U_),[Fxe,kH]=Qv(U_,[Bxe]),[$xe,Hxe]=Fxe(U_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Qv(ex,[nSe,xH,kH]),j_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,G_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Kz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=tx(td,n),E=G_(td,n),P=j_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?RB:C.exports.Fragment,ie=v?{as:wv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:Kn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,tC(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),eC="MenuItem",iI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(eC,e.__scopeMenu),s=AH(eC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(eC,n),s=TH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,tC(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,tC(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function tC(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Qv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,$y(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,$y(u)),onPointerCancel:Kn(e.onPointerCancel,$y(u)),onPointerUp:Kn(e.onPointerUp,$y(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function $y(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(t2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(_v(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(I$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:m$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),q$(D,j,!o),x(G$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Hn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Ry("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Ry("user")),children:"User"})]}):ee(Hn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Ry("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Ry("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(W$,{}):x(V$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Hn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(h$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(O$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Qg({...a,width:Math.floor(g)})),t=="height"&&r(Qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Qg({...a,width:Math.floor(s)})),t=="height"&&r(Qg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(R$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(a$,{size:22}):x(o$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Hn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function nC(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var W0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(aI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=rC(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(sI(P),!function(I,O){return O&&!Mm(I)}(P,l.current)&&k)){if(Mm(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(aI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},iC=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:iC({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:iC({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:iC(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=nC(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;BH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,lI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(L$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(C$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(x$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(b$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(T$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(P$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(a$,{size:22}):x(o$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(E$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(R$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Xv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const{width:o,height:a}=r.image,{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(M$(u)),n==="inpainting"?e(TA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(TA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Wv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",uI="Konva error: ",K6e="rgb(",_6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Hy=[];const Z6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Hy.push(e),Hy.length===1&&Z6e(function(){const t=Hy;Hy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,j6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Mg+a(t),l=Og+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Mg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(cI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];cn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Vy="allEventListeners",ru="absoluteTransform",fI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",oC="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",R3=" ",vI="stage",_c="transform",gwe="Stage",aC="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===_c||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===_c||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(O3),this._clearSelfAndDescendantCache(fI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==hwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(oC,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(aC,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==gwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_c),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(_c);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(_c),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(O3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;cn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Pp=e=>{const t=rm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",N3=[];class lx extends aa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===bwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new S0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+yI,this.content.style.height=n+yI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rwwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(sC,{evt:t}):this._fire(sC,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(lC,{evt:t}):this._fire(lC,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,Q_(t)),Om(t.pointerId)}_lostpointercapture(t){Om(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let Ky;function P6(){return Ky||(Ky=fe.createCanvasElement().getContext("2d"),Ky)}const Rm={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Rm)););this.colorKey=n,Rm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Rm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new X_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class J_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Nm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Bwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Nm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function uC(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function CI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",cC="up",dC="right",fC="down",hC="left",Uwe=cW.length;class ek extends V0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var _I=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Zy;function A6(){return Zy||(Zy=fe.createCanvasElement().getContext(qwe),Zy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Yy+this.fontVariant()+Yy+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Yy||te===kI;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Yy),z.lastIndexOf(kI))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+T6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),LI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],TI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function bW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(LI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(LI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-TI,y:-TI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new e2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new AI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,d2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Yk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Zk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Un(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:D2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Un(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=x2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,WF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&WF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},VF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?WF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),UF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=UF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),jF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=jF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),GF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),qF=De((e,t)=>{var n=Mb(),r=GF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),KF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),K2e=De((e,t)=>{var n=qF(),r=q2e(),i=GF(),o=KF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),J2e=De((e,t)=>{var n=Ob(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),eye=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),YF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=YF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=YF(),r=cye(),i=dye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),ZF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=UF(),o=ZF(),a=mye(),s=vye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Cye=De((e,t)=>{var n=Sye(),r=wye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),_ye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),XF=De((e,t)=>{var n=_u(),r=Pye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Lye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Tye=De((e,t)=>{var n=Mb(),r=QF(),i=Nb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=jF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),JF=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=XF(),a=Lye(),s=JF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),zye=De((e,t)=>{var n=qF(),r=QF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=KF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=ZF(),i=yye(),o=$ye(),a=jye(),s=__(),l=XF(),u=JF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),e$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Am(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return t$(e,["input","textarea","select"])}function t$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Jye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var e3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=VF(e$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var xA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!t$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){xA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Am(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){xA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Am(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Am(w,u?.combinationKey)))}},[e,l,u,h]),i}VF(e$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Am(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Am(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const c3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),d3e=st({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),m3e=st({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const v3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const SA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(SA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(SA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(UB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var n$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wA=re.createContext&&re.createContext(n$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function fh(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(xz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Hn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(tF,{className:"invokeai__slider_track",...Y,children:x(nF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(eF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(zB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const a$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},s$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(t2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const l$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(t2(l$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Zv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(nz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},u$=yb({name:"system",initialState:t4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:CA,setSocketId:iEe,setShouldConfirmOnDelete:c$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:d$,setModelList:_A,setIsCancelable:kA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=u$.actions,d4e=u$.reducer;function f4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function f$(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function h$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function p$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function g$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function m$(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function v$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function A4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function I4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function O4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function R4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function N4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function D4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function F4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function b$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function $4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function H4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function U4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function G4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function f6(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function I_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Ay;const e5e=new Uint8Array(16);function t5e(){if(!Ay&&(Ay=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ay))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ay(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),EA={randomUUID:r5e};function Ap(e,t,n){if(EA.randomUUID&&!t&&!e)return EA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Iy=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",x$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},PA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...PA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...PA}},S$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=e[e.currentCanvas];n.boundingBoxDimensions=t.payload;const{width:r,height:i}=t.payload,{x:o,y:a}=n.boundingBoxCoordinates,{width:s,height:l}=n.stageDimensions,u=s/n.stageScale,h=l/n.stageScale,g=cs(u,64),m=cs(h,64),v=cs(r,64),b=cs(i,64),w=o+r-u,E=a+i-h,P=Ve.clamp(v,64,g),k=Ve.clamp(b,64,m),L=w>0?o-w:o,I=E>0?a-E:a,O=Ve.clamp(L,n.stageCoordinates.x,g-P),R=Ve.clamp(I,n.stageCoordinates.y,m-k);n.boundingBoxDimensions={width:P,height:k},n.boundingBoxCoordinates={x:O,y:R}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(D$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:w$,setEraserSize:u5e,addLine:C$,addPointToCurrentLine:_$,setShouldPreserveMaskedArea:k$,setIsMaskEnabled:E$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:P$,clearMask:L$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:T$,setStageDimensions:LA,setImageToInpaint:Y4,setImageToOutpaint:A$,setBoundingBoxDimensions:Qg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:I$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:M$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:TA,setShouldLockBoundingBox:O$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:AA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:My,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:R$,setCurrentCanvas:N$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=S$.actions,k5e=S$.reducer,D$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Xv=Qe([jt],e=>e.layerState.objects.find(x$)),z$=Qe([e=>e.options,e=>e.system,Xv,vn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),IA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),MA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function B$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(z$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(mz,{children:o.map((u,h)=>x(vz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function F$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),$$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(B$,{}),x($$,{}),x(F$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(z$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(cF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function H$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function W$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function OA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=OA(e.className,t):e.setAttribute("class",OA(e.className&&e.className.baseVal||"",t))}const RA={disabled:!1},V$=re.createContext(null);var U$=function(t){return t.scrollTop},Jg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Jg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Jg?{status:wf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this);a&&U$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Jg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[sy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||RA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:sy.findDOMNode(this);if(!o||RA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Jg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(V$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=V$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Jg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},q$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);G$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(j$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(H$,{}):x(W$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),K$=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(c$(!b.target.checked));return ee(Hn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(bv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(_v(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(t2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(A$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(v$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Zv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(m$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},Z$=yb({name:"gallery",initialState:U5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Oy,clearIntermediateImage:NA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:z_,selectPrevImage:B_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Ry,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});st({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});st({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});st({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});st({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});st({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});st({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});st({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});st({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});st({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});st({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});st({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});st({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});st({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});st({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});st({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});st({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});st({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});st({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});st({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});st({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});st({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});st({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});st({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});st({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});st({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});st({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});st({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});st({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});st({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});st({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});st({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});st({displayName:"SpinnerIcon",path:ee(Hn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});st({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});st({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});st({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});st({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});st({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});st({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});st({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});st({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});st({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});st({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});st({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function J5e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Hn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(m8(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(t2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(_v(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(v8(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(p8(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Hn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(m8(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(hz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(B_())},h=()=>{e(z_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),F_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Hn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Hn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(rbe,{})}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function obe(e){return lt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var abe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],$A="__resizable_base__",rH=function(e){ube(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add($A):o.className+=$A,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ep("left",o),s=i&&Ep("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Dy(n,I,O),r=Dy(r,R,D)}else n=Dy(n,h,g),r=Dy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&dbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&zy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=zy(n)?n.touches[0].clientX:n.clientX,h=zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=fbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=FA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=FA(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=BA(I,this.props.grid[0]),z=BA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(lbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Qv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pbe(i,...t)]}function pbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});wv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Qv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(wv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let HA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(HA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),WA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=HA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),WA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){lH(wbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:VA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:VA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function VA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",UA={bubbles:!1,cancelable:!0},Tbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){GA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,UA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,UA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),GA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=jA(t,e),r=jA(t.reverse(),e);return[n,r]}function uH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const GA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qA(e,t),e.unshift(t)},remove(t){var n;e=qA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function qA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function $_(e){return e==="y"?"height":"width"}function KA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=i1(t),l=$_(s),u=r[l]/2-i[l]/2,h=r1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=KA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=$_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=$_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function ZA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[ZA(e),t,ZA(t)]}const Kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function XA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Q4(r,{...n,elementContext:"reference"}),a=XA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:QA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=XA(o,i.floating);return{data:{escapedOffsets:a,escaped:QA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await Q4(t,l),g=i1(r1(i)),m=dH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=i1(i),m=dH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function H_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Jv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Jv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const JA=Math.min,Im=Math.max,e5=Math.round;function wu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(H_(e)?e.host:null)||wd(e)}function eI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(H_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=eI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=eI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function tI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function axe(e,t){const n=Pu(e),r=wd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Im(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Im(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Jv(i||n).direction==="rtl"&&(s+=Im(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&H_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function nI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Jv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=nI(t,h,i);return u.top=Im(g.top,u.top),u.right=JA(g.right,u.right),u.bottom=JA(g.bottom,u.bottom),u.left=Im(g.left,u.left),u},nI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:tI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...tI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jv(e).direction==="rtl"};function hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...cd(e)?t5(e):[],...t5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!X9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=gxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const vxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?YA({element:t.current,padding:n}).fn(i):{}:t?YA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const bH="Popper",[W_,xH]=Qv(bH),[bxe,SH]=W_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=W_(n5),[_xe,kxe]=W_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=wH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Fy(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Fy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=Fy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Fy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Fy(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},V_="RovingFocusGroup",[Q9,_H,Bxe]=aH(V_),[Fxe,kH]=Qv(V_,[Bxe]),[$xe,Hxe]=Fxe(V_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Qv(ex,[nSe,xH,kH]),U_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,j_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=U_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=U_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=j_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return qz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=tx(td,n),E=j_(td,n),P=U_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?OB:C.exports.Fragment,ie=v?{as:wv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:Kn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,t8(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),e8="MenuItem",rI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=j_(e8,e.__scopeMenu),s=AH(e8,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(rI,{bubbles:!0,cancelable:!0});g.addEventListener(rI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(e8,n),s=TH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,t8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,t8(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function t8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Qv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,$y(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,$y(u)),onPointerCancel:Kn(e.onPointerCancel,$y(u)),onPointerUp:Kn(e.onPointerUp,$y(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function $y(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(t2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(_v(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(A$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:g$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(B_())}),vt("right",()=>{e(z_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),G$(D,j,!o),x(j$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Hn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Ry("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Ry("user")),children:"User"})]}):ee(Hn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Ry("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Ry("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(H$,{}):x(W$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Hn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(f$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(M$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function iI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Qg({...a,width:Math.floor(g)})),t=="height"&&r(Qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Qg({...a,width:Math.floor(s)})),t=="height"&&r(Qg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(O$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(o$,{size:22}):x(i$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(iI,{dimension:"width",label:"Box W"}),x(iI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(TA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(TA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Hn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function n8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var W0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(oI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=r8(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(aI(P),!function(I,O){return O&&!Mm(I)}(P,l.current)&&k)){if(Mm(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(oI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},q_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},i8=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(G_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(q_,{className:"react-colorful__hue-pointer",left:t/360,color:i8({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:i8({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(G_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:i8(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=n8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;BH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},sI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!sI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,sI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(G_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(q_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const K_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(P$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(K_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(w$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(y$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(L$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(E$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(o$,{size:22}):x(i$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(k$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(O$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Xv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current)return;const{width:o,height:a}=r?.image?r.image:{width:512,height:512},{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(I$(u)),n==="inpainting"?e(LA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(LA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Wv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",lI="Konva error: ",K6e="rgb(",_6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Hy=[];const Z6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Hy.push(e),Hy.length===1&&Z6e(function(){const t=Hy;Hy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,j6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Y_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Mg+a(t),l=Og+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Mg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(uI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=cI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];cn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Vy="allEventListeners",ru="absoluteTransform",dI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",o8="listening",fI="mouseenter",hI="mouseleave",pI="set",gI="Shape",R3=" ",mI="stage",_c="transform",gwe="Stage",a8="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===_c||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===_c||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new Z_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(O3),this._clearSelfAndDescendantCache(dI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==hwe&&(r=pI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(o8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(a8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==gwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_c),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(_c);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(_c),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(O3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;cn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Pp=e=>{const t=rm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function yI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",N3=[];class lx extends aa{constructor(t){super(yI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{yI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===bwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new S0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+vI,this.content.style.height=n+vI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rwwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(l8,{evt:t}):this._fire(l8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,X_(t)),Om(t.pointerId)}_lostpointercapture(t){Om(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Z_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let Ky;function P6(){return Ky||(Ky=fe.createCanvasElement().getContext("2d"),Ky)}const Rm={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Rm)););this.colorKey=n,Rm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Rm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Y_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new Z_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class Q_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Q_.prototype.nodeType="FastLayer";gr(Q_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=bI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=xI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===bI?this.setTime(t):this.state===xI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Nm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Bwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Nm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function u8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function wI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",c8="up",d8="right",f8="down",h8="left",Uwe=cW.length;class J_ extends V0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var CI=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,CI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),CI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Zy;function A6(){return Zy||(Zy=fe.createCanvasElement().getContext(qwe),Zy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Yy+this.fontVariant()+Yy+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==EI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Yy||te===_I;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Yy),z.lastIndexOf(_I))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==EI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+T6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),PI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function bW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(PI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(PI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new e2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function TI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new TI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i ")+` No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return le(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||dg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{ln=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=J1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var T=f.current,M=ai(),H=Ar(T);return y=ug(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,H),d!==null&&(yo(d,T,H,M),Oh(d,T,H)),H},n};(function(e){e.exports=q9e})(xW);const K9e=AC(xW.exports);var tk={exports:{}},bh={};/** + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return le(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||dg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{ln=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=J1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var T=f.current,M=ai(),H=Ar(T);return y=ug(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,H),d!==null&&(yo(d,T,H,M),Oh(d,T,H)),H},n};(function(e){e.exports=q9e})(xW);const K9e=A8(xW.exports);var ek={exports:{}},bh={};/** * @license React * react-reconciler-constants.production.min.js * @@ -500,14 +500,14 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(tk);const II={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let MI=!1,OI=!1;const nk=".react-konva-event",Y9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. + */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(ek);const AI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let II=!1,MI=!1;const tk=".react-konva-event",Y9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. Position of a node will be changed during drag&drop, so you should update state of the react app as well. Consider to add onDragMove or onDragEnd events. For more info see: https://github.com/konvajs/react-konva/issues/256 `,Z9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 -`,X9e={};function ux(e,t,n=X9e){if(!MI&&"zIndex"in t&&(console.warn(Z9e),MI=!0),!OI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),OI=!0)}for(var o in n)if(!II[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!II[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ed(e));for(var l in v)e.on(l+nk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ed(e)}function eCe(e,t,n){let r=eh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=eh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ux(l,o),l}function tCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function nCe(e,t,n){return!1}function rCe(e){return e}function iCe(){return null}function oCe(){return null}function aCe(e,t,n,r){return Q9e}function sCe(){}function lCe(e){}function uCe(e,t){return!1}function cCe(){return SW}function dCe(){return SW}const fCe=setTimeout,hCe=clearTimeout,pCe=-1;function gCe(e,t){return!1}const mCe=!1,vCe=!0,yCe=!0;function bCe(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function xCe(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function SCe(e,t,n){wW(e,t,n)}function wCe(e,t){t.destroy(),t.off(nk),Ed(e)}function CCe(e,t){t.destroy(),t.off(nk),Ed(e)}function _Ce(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function kCe(e,t,n){}function ECe(e,t,n,r,i){ux(e,i,r)}function PCe(e){e.hide(),Ed(e)}function LCe(e){}function TCe(e,t){(t.visible==null||t.visible)&&e.show()}function ACe(e,t){}function ICe(e){}function MCe(){}const OCe=()=>tk.exports.DefaultEventPriority,RCe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:eCe,createTextInstance:tCe,finalizeInitialChildren:nCe,getPublicInstance:rCe,prepareForCommit:iCe,preparePortalMount:oCe,prepareUpdate:aCe,resetAfterCommit:sCe,resetTextContent:lCe,shouldDeprioritizeSubtree:uCe,getRootHostContext:cCe,getChildHostContext:dCe,scheduleTimeout:fCe,cancelTimeout:hCe,noTimeout:pCe,shouldSetTextContent:gCe,isPrimaryRenderer:mCe,warnsIfNotActing:vCe,supportsMutation:yCe,appendChild:bCe,appendChildToContainer:xCe,insertBefore:wW,insertInContainerBefore:SCe,removeChild:wCe,removeChildFromContainer:CCe,commitTextUpdate:_Ce,commitMount:kCe,commitUpdate:ECe,hideInstance:PCe,hideTextInstance:LCe,unhideInstance:TCe,unhideTextInstance:ACe,clearContainer:ICe,detachDeletedInstance:MCe,getCurrentEventPriority:OCe,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var NCe=Object.defineProperty,DCe=Object.defineProperties,zCe=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,BCe=Object.prototype.hasOwnProperty,FCe=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?NCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))BCe.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))FCe.call(t,n)&&NI(e,n,t[n]);return e},$Ce=(e,t)=>DCe(e,zCe(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:HCe,ReactCurrentDispatcher:WCe}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function VCe(){const e=C.exports.useContext(ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=HCe.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],zI=new WeakMap;function UCe(){var e;const t=VCe();Bg.splice(0,Bg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Bg.push(CW(i))});for(const n of Bg){const r=(e=WCe.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$Ce(DI({},i),{value:zI.get(r)}))),n=>x(_W,{...DI({},n)})),[])}function jCe(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const GCe=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=jCe(e),o=UCe(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=im.createContainer(n.current,tk.exports.LegacyRoot,!1,null),im.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),im.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),im.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Fg="Layer",dd="Group",w0="Rect",$g="Circle",i5="Line",kW="Image",qCe="Transformer",im=K9e(RCe);im.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const KCe=re.forwardRef((e,t)=>x(_W,{children:x(GCe,{...e,forwardedRef:t})})),YCe=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=e=>{const{...t}=e,n=Ce(YCe);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},XCe=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(XCe);return l?ee(dd,{listening:!1,...t,children:[x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},JCe=Qe(jt,qb,Xv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e8e=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(JCe),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Iy(W,64),X=Iy(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v)return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Qg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Iy(W.x,O)+Q,ye=Iy(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[v,g]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(My(!1))},j=()=>{n(IA(!0))},te=()=>{n(g6(!1)),n(IA(!1)),n(My(!1))},ie=()=>{n(My(!0))},le=()=>{!u&&!l&&n(My(!1))};return ee(dd,{...t,children:[x(w0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(w0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(w0,{dragBoundFunc:b==="inpainting"?D:void 0,listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(qCe,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},t8e=Qe([jt,vn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n8e=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(t8e),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},r8e=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),BI=e=>`data:image/svg+xml;utf8, +`,X9e={};function ux(e,t,n=X9e){if(!II&&"zIndex"in t&&(console.warn(Z9e),II=!0),!MI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),MI=!0)}for(var o in n)if(!AI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!AI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ed(e));for(var l in v)e.on(l+tk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ed(e)}function e8e(e,t,n){let r=eh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=eh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ux(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return SW}function d8e(){return SW}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function x8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function S8e(e,t,n){wW(e,t,n)}function w8e(e,t){t.destroy(),t.off(tk),Ed(e)}function C8e(e,t){t.destroy(),t.off(tk),Ed(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){ux(e,i,r)}function P8e(e){e.hide(),Ed(e)}function L8e(e){}function T8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function I8e(e){}function M8e(){}const O8e=()=>ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:x8e,insertBefore:wW,insertInContainerBefore:S8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:L8e,unhideInstance:T8e,unhideTextInstance:A8e,clearContainer:I8e,detachDeletedInstance:M8e,getCurrentEventPriority:O8e,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,OI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,RI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&RI(e,n,t[n]);if(OI)for(var n of OI(t))F8e.call(t,n)&&RI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function nk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=nk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const rk=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(rk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(rk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:nk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],DI=new WeakMap;function U8e(){var e;const t=V8e();Bg.splice(0,Bg.length),nk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==rk&&Bg.push(CW(i))});for(const n of Bg){const r=(e=W8e.current)==null?void 0:e.readContext(n);DI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(NI({},i),{value:DI.get(r)}))),n=>x(_W,{...NI({},n)})),[])}function j8e(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const G8e=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=j8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=im.createContainer(n.current,ek.exports.LegacyRoot,!1,null),im.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),im.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),im.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Fg="Layer",dd="Group",w0="Rect",$g="Circle",i5="Line",kW="Image",q8e="Transformer",im=K9e(R8e);im.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const K8e=re.forwardRef((e,t)=>x(_W,{children:x(G8e,{...e,forwardedRef:t})})),Y8e=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=e=>{const{...t}=e,n=Ce(Y8e);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ik=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},X8e=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ik(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(X8e);return l?ee(dd,{listening:!1,...t,children:[x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=Qe(jt,qb,Xv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),eCe=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(J8e),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Iy(W,64),X=Iy(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v&&b!=="outpainting")return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,b,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Qg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Iy(W.x,O)+Q,ye=Iy(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v&&b!=="outpainting"||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[b,v,g.height,g.width]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(My(!1))},j=()=>{n(AA(!0))},te=()=>{n(g6(!1)),n(AA(!1)),n(My(!1))},ie=()=>{n(My(!0))},le=()=>{!u&&!l&&n(My(!1))};return ee(dd,{...t,children:[x(w0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(w0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(w0,{...b==="inpainting"?{dragBoundFunc:D}:{},listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(q8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},tCe=Qe([jt,vn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),nCe=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(tCe),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},rCe=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ik(t)}}),zI=e=>`data:image/svg+xml;utf8, @@ -585,9 +585,9 @@ For more info see: https://github.com/konvajs/react-konva/issues/194 -`.replaceAll("black",e),i8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(r8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=BI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=BI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x&&r.y&&o&&i.width&&i.height?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},o8e=.999,a8e=.1,s8e=20,l8e=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),u8e=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(l8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*o8e**l,a8e,s8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(M$(u)),t(N$(h))},[i,t,n,e,r])},cx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},c8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),d8e=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(c8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(_$([o.x,o.y])))},[e,n,r,t])},f8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),h8e=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(f8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(k$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},p8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),g8e=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(p8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(A$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(k$([s.x,s.y]))))},[t,r,i,a,n,e,o])},m8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),v8e=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(m8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(_$([o.x,o.y])))},[e,n,r,t])},y8e=()=>{const e=$e();return C.exports.useCallback(()=>{e(A$(null)),e(Gb(!1))},[e])},b8e=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),x8e=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(b8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(N$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,S8e=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),vf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const EW=e=>{const{url:t,x:n,y:r}=e,[i]=S8e(t);return x(kW,{x:n,y:r,image:i,listening:!1})},w8e=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),C8e=()=>{const{objects:e}=Ce(w8e);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(S$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ok(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},_8e=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),k8e=()=>{const{colorMode:e}=Iv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},E8e=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),P8e=e=>{const{...t}=e,n=Ce(E8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hg=e=>Math.round(e*100)/100,L8e=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),T8e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(L8e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Hg(n)}, ${Hg(r)}`}),x("div",{children:`Scale: ${Hg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Hg(a)}, ${Hg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var A8e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},M8e=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=A8e(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&I8e(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},O8e=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R8e=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(O8e),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(M8e,{children:x(WR,{value:wV,children:x(gF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(m$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},N8e=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"||n?v?w="grabbing":w="grab":s?w=void 0:l?w="move":w="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h}=Ce(N8e);n8e(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const g=C.exports.useRef({x:0,y:0}),m=C.exports.useRef(!1),v=u8e(kc),b=d8e(kc),w=h8e(kc,m),E=g8e(kc,m,g),P=v8e(kc),k=y8e(),{handleDragStart:L,handleDragMove:I,handleDragEnd:O}=x8e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(KCe,{tabIndex:-1,ref:kc,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onMouseDown:b,onMouseEnter:P,onMouseLeave:k,onMouseMove:E,onMouseOut:k,onMouseUp:w,onDragStart:L,onDragMove:I,onDragEnd:O,onWheel:v,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Fg,{id:"grid",visible:r,children:x(k8e,{})}),ee(Fg,{id:"image",ref:au,listening:!1,imageSmoothingEnabled:!1,children:[x(C8e,{}),x(P8e,{})]}),ee(Fg,{id:"mask",visible:e,listening:!1,children:[x(ZCe,{visible:!0,listening:!1}),x(i8e,{listening:!1})]}),x(Fg,{id:"tool",children:!h&&ee(Hn,{children:[x(e8e,{visible:n}),x(QCe,{visible:l!=="move",listening:!1})]})}),x(Fg,{imageSmoothingEnabled:!1,children:h&&x(R8e,{})})]}),u&&x(T8e,{})]})})},D8e=Qe([Xv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),z8e=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(D8e);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function B8e(){const e=$e();return C.exports.useEffect(()=>{e(D$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(z8e,{})})}function F8e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(s$,{}),feature:Xr.OTHER,options:x(l$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $8e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function H8e(){return x(rx,{optionsPanel:x(F8e,{}),children:x($8e,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function W8e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function V8e(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(g$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Hn,{children:[x(W8e,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function U8e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const j8e=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),G8e=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(j8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(O$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},q8e=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),K8e=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(q8e),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(b$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},Y8e=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(Y8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(x$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(C$(o))})}),x(Y_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},X8e=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(X8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(T$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(P$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(E$(o.target.checked))}),x(Y_,{color:n,onChange:o=>e(L$(o))})]})})},J8e=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(J8e);return ee("div",{className:"inpainting-settings",children:[x(Q8e,{}),ee(ro,{isAttached:!0,children:[x(Z8e,{}),x(K8e,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(z$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(y$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(G8e,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const i=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:n?ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]}):x(z_,{})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(D$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(U8e,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(H8e,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B8e,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(cF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(lF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(sF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(uF,{className:"app-tabs-panels",children:t?x(V8e,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...IW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=dx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:t2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:pC,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:gC,setUpscalingStrength:mC,setMaskPath:vC,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:_v,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):FI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):FI(new Blob([t]),r):r(Tl[e]+(t||"")),FI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},$I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",om=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<$I.length;e++)om[$I.charCodeAt(e)]=e;const T7e=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),yC=64,H7e={};let HI=0,Jy=0,WI;function VI(e){let t="";do t=QW[e%yC]+t,e=Math.floor(e/yC);while(e>0);return t}function JW(){const e=VI(+new Date);return e!==WI?(HI=0,WI=e):e+"."+VI(HI++)}for(;Jy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};O7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),hx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=ZW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",UI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,UI,!1)}}function UI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,jI=!0,q7e="arraybuffer",GI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=GI?{}:ZW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=jI&&!GI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{jI&&this.ws.send(o)}catch{}i&&rV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JW()),this.supportsBinary||(t.b64=1);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function bC(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=bC(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=bC(n.host).host),hx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=W7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ak(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class u_e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(d_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}s1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class wC extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new s1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||c_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Wg[i]&&o in Wg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new wC(r,t):(Wg[i]||(Wg[i]=new wC(r,t)),l=Wg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:wC,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(qI[t]||t||qI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return KI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return KI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var qI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Co={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},KI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(V9("user")),r.categories.result.latest_mtime?t(MA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(Oy({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Oy({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Oy({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(vC("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(Oy({image:a,category:"user"})),i){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(vC(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(d6("Model Changed")),t(y0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(y0(!1)),t(EA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},x_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?u$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=Xv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=SF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=HF.getPersistConfig({key:"root",storage:$F,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Wv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(VB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(bv,{}),ee(yv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(bz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(bv,{}),ee(yv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(d$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(bv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(yv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(f$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Iv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:K$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(f$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Hn,{children:[n&&x(rH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(v$,{}),onClick:l})})]})};function Q_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var J_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function n2(e,t){var n=eke(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return kC(e.target.files).map(function(t){return n2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return n2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=kC(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,ZI(cV(r))];case 2:return[2,ZI(kC(e.files).map(function(o){return n2(o)}))]}})})}function ZI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function kC(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,tM(n)];if(e.sizen)return[!1,tM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=pV(l,n),h=kv(u,1),g=h[0],m=gV(l,r,i),v=kv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Uke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lk=C.exports.forwardRef(function(e,t){var n=e.children,r=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});lk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lk.defaultProps=bV;lk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var TC={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:oM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:oM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,TC),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",rM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",rM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(LC({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=LC({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},TC),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},TC);default:return e}}function oM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` -`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(OA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(OA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(h$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Hn,{children:[x(F$,{iconButton:!0}),x(H$,{}),x($$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=MR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(WR,{value:wV,children:x(gF,{children:x(Jke,{})})})})})})); +`.replaceAll("black",e),iCe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(rCe),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=zI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=zI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x&&r.y&&o&&i.width&&i.height?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},oCe=.999,aCe=.1,sCe=20,lCe=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),uCe=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(lCe);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*oCe**l,aCe,sCe),h={x:a.x-s.x*u,y:a.y-s.y*u};t(I$(u)),t(R$(h))},[i,t,n,e,r])},cx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},cCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),dCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(cCe);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},fCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),hCe=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(fCe);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(_$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},pCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),gCe=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(pCe);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(T$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(_$([s.x,s.y]))))},[t,r,i,a,n,e,o])},mCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),vCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(mCe);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},yCe=()=>{const e=$e();return C.exports.useCallback(()=>{e(T$(null)),e(Gb(!1))},[e])},bCe=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),xCe=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(bCe);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(R$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,SCe=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),vf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const EW=e=>{const{url:t,x:n,y:r}=e,[i]=SCe(t);return x(kW,{x:n,y:r,image:i,listening:!1})},wCe=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),CCe=()=>{const{objects:e}=Ce(wCe);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ik(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},_Ce=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),kCe=()=>{const{colorMode:e}=Iv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_Ce),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},ECe=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),PCe=e=>{const{...t}=e,n=Ce(ECe),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hg=e=>Math.round(e*100)/100,LCe=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),TCe=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(LCe);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Hg(n)}, ${Hg(r)}`}),x("div",{children:`Scale: ${Hg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Hg(a)}, ${Hg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var ACe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},MCe=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=ACe(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&ICe(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},OCe=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),RCe=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(OCe),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(MCe,{children:x(HR,{value:wV,children:x(pF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(g$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},NCe=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"||n?v?w="grabbing":w="grab":s?w=void 0:l?w="move":w="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h}=Ce(NCe);nCe(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const g=C.exports.useRef({x:0,y:0}),m=C.exports.useRef(!1),v=uCe(kc),b=dCe(kc),w=hCe(kc,m),E=gCe(kc,m,g),P=vCe(kc),k=yCe(),{handleDragStart:L,handleDragMove:I,handleDragEnd:O}=xCe();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(K8e,{tabIndex:-1,ref:kc,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onMouseDown:b,onMouseEnter:P,onMouseLeave:k,onMouseMove:E,onMouseOut:k,onMouseUp:w,onDragStart:L,onDragMove:I,onDragEnd:O,onWheel:v,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Fg,{id:"grid",visible:r,children:x(kCe,{})}),ee(Fg,{id:"image",ref:au,listening:!1,imageSmoothingEnabled:!1,children:[x(CCe,{}),x(PCe,{})]}),ee(Fg,{id:"mask",visible:e,listening:!1,children:[x(Z8e,{visible:!0,listening:!1}),x(iCe,{listening:!1})]}),x(Fg,{id:"tool",children:!h&&ee(Hn,{children:[x(eCe,{visible:n}),x(Q8e,{visible:l!=="move",listening:!1})]})}),x(Fg,{imageSmoothingEnabled:!1,children:h&&x(RCe,{})})]}),u&&x(TCe,{})]})})},DCe=Qe([Xv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),zCe=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(DCe);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function BCe(){const e=$e();return C.exports.useEffect(()=>{e(N$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(zCe,{})})}function FCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $Ce=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(F_,{})})});function HCe(){return x(rx,{optionsPanel:x(FCe,{}),children:x($Ce,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function WCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function VCe(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(B_())},g=()=>{e(z_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Hn,{children:[x(WCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function UCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const jCe=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),GCe=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(jCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(M$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},qCe=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),KCe=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(qCe),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(y$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},YCe=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(YCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(w$(o))})}),x(K_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},XCe=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(XCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(L$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(E$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(k$(o.target.checked))}),x(K_,{color:n,onChange:o=>e(P$(o))})]})})},JCe=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(JCe);return ee("div",{className:"inpainting-settings",children:[x(QCe,{}),ee(ro,{isAttached:!0,children:[x(ZCe,{}),x(KCe,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(D$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(v$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(GCe,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const r=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(N$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(UCe,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(HCe,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(BCe,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(uF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(sF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(aF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(lF,{className:"app-tabs-panels",children:t?x(VCe,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...IW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=dx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:t2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:p8,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:_v,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):BI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):BI(new Blob([t]),r):r(Tl[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",om=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,H7e={};let $I=0,Jy=0,HI;function WI(e){let t="";do t=QW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function JW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Jy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};O7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),hx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=ZW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,UI=!0,q7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:ZW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&rV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JW()),this.supportsBinary||(t.b64=1);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),hx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=W7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ok(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class u_e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:ak},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(d_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}s1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new s1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||c_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Wg[i]&&o in Wg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(Wg[i]||(Wg[i]=new w8(r,t)),l=Wg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:w8,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Co={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(CA(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(IA("user")):t(V9("user")),r.categories.result.latest_mtime?t(IA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(CA(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(Oy({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Oy({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(NA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Oy({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(NA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(Oy({image:a,category:"user"})),i){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(d6("Model Changed")),t(y0(!1)),t(kA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(y0(!1)),t(kA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},x_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?l$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(i==="inpainting"){const w=Xv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=xF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=$F.getPersistConfig({key:"root",storage:FF,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Wv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(WB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(bv,{}),ee(yv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(yz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(bv,{}),ee(yv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(c$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(bv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(yv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(d$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Iv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(d$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Hn,{children:[n&&x(rH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(m$,{}),onClick:l})})]})};function Q_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var J_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function n2(e,t){var n=eke(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return k8(e.target.files).map(function(t){return n2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return n2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,YI(cV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return n2(o)}))]}})})}function YI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=pV(l,n),h=kv(u,1),g=h[0],m=gV(l,r,i),v=kv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Uke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var sk=C.exports.forwardRef(function(e,t){var n=e.children,r=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});sk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};sk.defaultProps=bV;sk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var T8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:iM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:iM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,T8),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",nM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",nM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(L8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=L8({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},T8),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},T8);default:return e}}function iM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` +`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(MA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(MA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(f$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Hn,{children:[x(B$,{iconButton:!0}),x($$,{}),x(F$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=IR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(HR,{value:wV,children:x(pF,{children:x(Jke,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index c034553ec8..3f9aa0c552 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -9,6 +9,7 @@ <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development +<<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development @@ -24,6 +25,9 @@ >>>>>>> Builds fresh bundle ======= +======= + +>>>>>>> Outpainting tab loads to empty canvas instead of upload >>>>>>> Builds fresh bundle diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index e48b41ff9c..d0e3abed36 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -54,7 +54,7 @@ const makeSocketIOEmitters = ( systemState, }; - if (['inpainting', 'outpainting'].includes(generationMode)) { + if (generationMode === 'inpainting') { const baseCanvasImage = baseCanvasImageSelector(getState()); const imageUrl = baseCanvasImage?.image.url; diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx index 1f732df36f..d8f64e8e26 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx @@ -137,7 +137,8 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { const dragBoundFunc = useCallback( (position: Vector2d) => { - if (!baseCanvasImage) return boundingBoxCoordinates; + if (!baseCanvasImage && activeTabName !== 'outpainting') + return boundingBoxCoordinates; const { x, y } = position; @@ -153,6 +154,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { }, [ baseCanvasImage, + activeTabName, boundingBoxCoordinates, stageDimensions.width, stageDimensions.height, @@ -236,7 +238,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { // We may not change anything, stash the old position let newCoordinate = { ...oldPos }; - + console.log(oldPos, newPos); // Set the new coords based on what snapped if (didSnapX && !didSnapY) { newCoordinate = { @@ -267,7 +269,8 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { * Unlike anchorDragBoundFunc, it does get a width and height, so * the logic to constrain the size of the bounding box is very simple. */ - if (!baseCanvasImage) return oldBoundBox; + if (!baseCanvasImage && activeTabName !== 'outpainting') + return oldBoundBox; if ( newBoundBox.width + newBoundBox.x > stageDimensions.width || newBoundBox.height + newBoundBox.y > stageDimensions.height || @@ -279,7 +282,12 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { return newBoundBox; }, - [baseCanvasImage, stageDimensions] + [ + activeTabName, + baseCanvasImage, + stageDimensions.height, + stageDimensions.width, + ] ); const handleStartedTransforming = () => { @@ -333,9 +341,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { globalCompositeOperation={'destination-out'} /> { useLayoutEffect(() => { window.setTimeout(() => { - if (!ref.current || !baseCanvasImage) return; - const { width: imageWidth, height: imageHeight } = baseCanvasImage.image; + if (!ref.current) return; + const { width: imageWidth, height: imageHeight } = baseCanvasImage?.image + ? baseCanvasImage.image + : { width: 512, height: 512 }; const { clientWidth, clientHeight } = ref.current; const scale = Math.min( diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index be8f0e2f56..cf4cfffd13 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -413,18 +413,18 @@ export const canvasSlice = createSlice({ }; }, setBoundingBoxDimensions: (state, action: PayloadAction) => { - state[state.currentCanvas].boundingBoxDimensions = action.payload; + const currentCanvas = state[state.currentCanvas]; + currentCanvas.boundingBoxDimensions = action.payload; + const { width: boundingBoxWidth, height: boundingBoxHeight } = action.payload; const { x: boundingBoxX, y: boundingBoxY } = - state[state.currentCanvas].boundingBoxCoordinates; + currentCanvas.boundingBoxCoordinates; const { width: canvasWidth, height: canvasHeight } = - state[state.currentCanvas].stageDimensions; + currentCanvas.stageDimensions; - const scaledCanvasWidth = - canvasWidth / state[state.currentCanvas].stageScale; - const scaledCanvasHeight = - canvasHeight / state[state.currentCanvas].stageScale; + const scaledCanvasWidth = canvasWidth / currentCanvas.stageScale; + const scaledCanvasHeight = canvasHeight / currentCanvas.stageScale; const roundedCanvasWidth = roundDownToMultiple(scaledCanvasWidth, 64); const roundedCanvasHeight = roundDownToMultiple(scaledCanvasHeight, 64); @@ -458,22 +458,22 @@ export const canvasSlice = createSlice({ const clampedX = _.clamp( overflowCorrectedX, - state[state.currentCanvas].stageCoordinates.x, + currentCanvas.stageCoordinates.x, roundedCanvasWidth - newBoundingBoxWidth ); const clampedY = _.clamp( overflowCorrectedY, - state[state.currentCanvas].stageCoordinates.y, + currentCanvas.stageCoordinates.y, roundedCanvasHeight - newBoundingBoxHeight ); - state[state.currentCanvas].boundingBoxDimensions = { + currentCanvas.boundingBoxDimensions = { width: newBoundingBoxWidth, height: newBoundingBoxHeight, }; - state[state.currentCanvas].boundingBoxCoordinates = { + currentCanvas.boundingBoxCoordinates = { x: clampedX, y: clampedY, }; diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx index 47ff66111c..891f3a20f3 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx @@ -61,7 +61,15 @@ const OutpaintingDisplay = () => { return (
-
{outpaintingComponent}
+
+
+ +
+ {doesCanvasNeedScaling ? : } +
+
+
+ {/*
{outpaintingComponent}
*/}
); }; From 5304ef504cd9087c91c8490def2a8d0d4df65872 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 00:22:44 +1100 Subject: [PATCH 048/220] Fixes wonky canvas layer ordering & compositing --- .../{index.7f5e02f1.js => index.c26f71e8.js} | 50 +++++++++---------- frontend/dist/index.html | 4 ++ frontend/src/features/canvas/IAICanvas.tsx | 25 +++++----- .../canvas/IAICanvasMaskCompositer.tsx | 10 ++-- 4 files changed, 47 insertions(+), 42 deletions(-) rename frontend/dist/assets/{index.7f5e02f1.js => index.c26f71e8.js} (86%) diff --git a/frontend/dist/assets/index.7f5e02f1.js b/frontend/dist/assets/index.c26f71e8.js similarity index 86% rename from frontend/dist/assets/index.7f5e02f1.js rename to frontend/dist/assets/index.c26f71e8.js index e14d954227..b94d8d6b16 100644 --- a/frontend/dist/assets/index.7f5e02f1.js +++ b/frontend/dist/assets/index.c26f71e8.js @@ -6,7 +6,7 @@ function Zq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nE={},rE={};function pK(e){return N6.call(rE,e)?!0:N6.call(nE,e)?!1:hK.test(e)?rE[e]=!0:(nE[e]=!0,!1)}function gK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mK(e,t,n,r){if(t===null||typeof t>"u"||gK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function so(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new so(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nE={},rE={};function pK(e){return N6.call(rE,e)?!0:N6.call(nE,e)?!1:hK.test(e)?rE[e]=!0:(nE[e]=!0,!1)}function gK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mK(e,t,n,r){if(t===null||typeof t>"u"||gK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function so(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new so(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vg(e):""}function vK(e){switch(e.tag){case 5:return Vg(e.type);case 16:return Vg("Lazy");case 13:return Vg("Suspense");case 19:return Vg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case B8:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function G2(e){e._valueTracker||(e._valueTracker=bK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function H6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ug=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=q2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var am={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xK=["Webkit","ms","Moz","O"];Object.keys(am).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),am[t]=am[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||am.hasOwnProperty(e)&&am[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function uE(e){if(e=Tv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function EM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function PM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,uE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var K2=64,Y2=4194304;function jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=jg(s):(o&=a,o!==0&&(r=jg(o)))}else a=n&~i,a!==0?r=jg(a):o!==0&&(r=jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Pv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=lm),yE=String.fromCharCode(32),bE=!1;function qM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(bE=!0,yE);case"textInput":return e=t.data,e===yE&&bE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),o3=G8=Fc=null,Np=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CE(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_E(n,o);var a=_E(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dp=null,ew=null,cm=null,tw=!1;function kE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cm&&Vm(cm,r)||(cm=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function qn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function ME(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));qn(Vi,t),qn(Lo,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,qn(Vi,e),qn(Lo,Lo.current),!0}function OE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),qn(Vi,e)):Xn(Lo),qn(Lo,n)}var ou=null,p5=!1,aS=!1;function uO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,uO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&$E(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Ug(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ny(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=vO(!0),yO=vO(!1),Av={},yl=hd(Av),qm=hd(Av),Km=hd(Av);function If(e){if(e===Av)throw Error(Oe(174));return e}function oC(e,t){switch(qn(Km,t),qn(qm,e),qn(yl,Av),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),qn(yl,t)}function L0(){Xn(yl),Xn(qm),Xn(Km)}function bO(e){If(Km.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(qn(qm,e),qn(yl,n))}function aC(e){qm.current===e&&(Xn(yl),Xn(qm))}var cr=hd(0);function s4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sS=[];function sC(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function NO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),BO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,rC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){dm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:WE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:HE,useDebugValue:fC,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=HE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,WE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Xm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ym++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wg(e):""}function vK(e){switch(e.tag){case 5:return Wg(e.type);case 16:return Wg("Lazy");case 13:return Wg("Suspense");case 19:return Wg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case B8:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function j2(e){e._valueTracker||(e._valueTracker=bK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function H6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vg=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=G2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var om={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xK=["Webkit","ms","Moz","O"];Object.keys(om).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),om[t]=om[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||om.hasOwnProperty(e)&&om[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function uE(e){if(e=Lv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function EM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function PM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,uE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var q2=64,K2=4194304;function Ug(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Ug(s):(o&=a,o!==0&&(r=Ug(o)))}else a=n&~i,a!==0?r=Ug(a):o!==0&&(r=Ug(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ev(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=sm),yE=String.fromCharCode(32),bE=!1;function qM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(bE=!0,yE);case"textInput":return e=t.data,e===yE&&bE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),o3=G8=Fc=null,Np=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CE(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_E(n,o);var a=_E(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dp=null,ew=null,um=null,tw=!1;function kE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),um&&Wm(um,r)||(um=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function Gn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function ME(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(Lo,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,Gn(Vi,e),Gn(Lo,Lo.current),!0}function OE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),Gn(Vi,e)):Xn(Lo),Gn(Lo,n)}var ou=null,p5=!1,aS=!1;function uO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,uO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case U2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&$E(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Vg(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ty(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=vO(!0),yO=vO(!1),Tv={},yl=hd(Tv),Gm=hd(Tv),qm=hd(Tv);function If(e){if(e===Tv)throw Error(Oe(174));return e}function oC(e,t){switch(Gn(qm,t),Gn(Gm,e),Gn(yl,Tv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),Gn(yl,t)}function L0(){Xn(yl),Xn(Gm),Xn(qm)}function bO(e){If(qm.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(Gn(Gm,e),Gn(yl,n))}function aC(e){Gm.current===e&&(Xn(yl),Xn(Gm))}var cr=hd(0);function s4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sS=[];function sC(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function NO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),BO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,rC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){cm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:WE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:HE,useDebugValue:fC,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=HE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,WE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Zm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Km++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[Gm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304)}else{if(!r)if(e=s4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return yC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(Q8(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),sC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return aC(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return nC(t.type._context),null;case 22:case 23:return yC(),null;case 24:return null;default:return null}}var iy=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var XE=!1;function XY(e,t){if(nw=Z3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=XE,XE=!1,b}function fm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Gm],delete t[aw],delete t[OY],delete t[RY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function QE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),Hm(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function JE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-mC?Df(e,0):gC|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=Y2,Y2<<=1,(Y2&130023424)===0&&(Y2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Pv(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function aZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=uC(null,t,r,e,i,n);var o=cC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iC(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=KE(null,t,r,e,n);break e;case 11:t=GE(null,t,r,e,n);break e;case 14:t=qE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),KE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),a4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=T0(Error(Oe(423)),t),t=YE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=YE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return jO(e,t,n);case 4:return oC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),GE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=du(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),qE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),mO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function sZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new sZ(e,t,n,r)}function xC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return xC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")xC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case B8:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case vM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function SC(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iC(o),e}function cZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Al);const sy=A8(Al.exports);var sP=Al.exports;U3.createRoot=sP.createRoot,U3.hydrateRoot=sP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function dS(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hw(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UY=typeof WeakMap=="function"?WeakMap:Map;function FO(e,t,n){n=du(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){d4||(d4=!0,Cw=r),hw(e,t)},n}function $O(e,t,n){n=du(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hw(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){hw(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function VE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UY;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iZ.bind(null,e,t,n),t.then(e,e))}function UE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function jE(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=du(-1,1),t.tag=2,Yc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var jY=Cu.ReactCurrentOwner,Po=!1;function no(e,t,n,r){t.child=e===null?yO(t,null,n,r):P0(t,e.child,n,r)}function GE(e,t,n,r,i){n=n.render;var o=t.ref;return e0(t,i),r=uC(e,t,n,r,o,i),n=cC(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gu(e,t,i)):(rr&&n&&X8(t),t.flags|=1,no(e,t,r,i),t.child)}function qE(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!xC(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,HO(e,t,o,r,i)):(e=h3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Wm,n(a,r)&&e.ref===t.ref)return gu(e,t,i)}return t.flags|=1,e=Qc(o,r),e.ref=t.ref,e.return=t,t.child=e}function HO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Wm(o,r)&&e.ref===t.ref)if(Po=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Po=!0);else return t.lanes=e.lanes,gu(e,t,i)}return pw(e,t,n,r,i)}function WO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gn(Up,ea),ea|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Gn(Up,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Gn(Up,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Gn(Up,ea),ea|=r;return no(e,t,i,n),t.child}function VO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pw(e,t,n,r,i){var o=To(n)?jf:Vi.current;return o=k0(t,o),e0(t,i),n=uC(e,t,n,r,o,i),r=cC(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gu(e,t,i)):(rr&&r&&X8(t),t.flags|=1,no(e,t,n,i),t.child)}function KE(e,t,n,r,i){if(To(n)){var o=!0;t4(t)}else o=!1;if(e0(t,i),t.stateNode===null)c3(e,t),mO(t,n,r),fw(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Da(u):(u=To(n)?jf:Vi.current,u=k0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&FE(t,a,r,u),Lc=!1;var m=t.memoizedState;a.state=m,a4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Lo.current||Lc?(typeof h=="function"&&(dw(t,n,h,r),l=t.memoizedState),(s=Lc||BE(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,pO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ds(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Da(l):(l=To(n)?jf:Vi.current,l=k0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&FE(t,a,r,l),Lc=!1,m=t.memoizedState,a.state=m,a4(t,r,a,i);var b=t.memoizedState;s!==g||m!==b||Lo.current||Lc?(typeof v=="function"&&(dw(t,n,v,r),b=t.memoizedState),(u=Lc||BE(t,n,u,r,m,b,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return gw(e,t,n,r,o,i)}function gw(e,t,n,r,i,o){VO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&OE(t,n,!1),gu(e,t,o);r=t.stateNode,jY.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=P0(t,e.child,null,o),t.child=P0(t,null,s,o)):no(e,t,s,o),t.memoizedState=r.state,i&&OE(t,n,!0),t.child}function UO(e){var t=e.stateNode;t.pendingContext?ME(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ME(e,t.context,!1),oC(e,t.containerInfo)}function YE(e,t,n,r,i){return E0(),J8(i),t.flags|=256,no(e,t,n,r),t.child}var mw={dehydrated:null,treeContext:null,retryLane:0};function vw(e){return{baseLanes:e,cachePool:null,transitions:null}}function jO(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Gn(cr,i&1),e===null)return uw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=b5(a,r,0,null),e=zf(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=vw(n),t.memoizedState=mw,e):hC(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return GY(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qc(s,o):(o=zf(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?vw(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=mw,r}return o=e.child,e=o.sibling,r=Qc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function hC(e,t){return t=b5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ny(e,t,n,r){return r!==null&&J8(r),P0(t,e.child,null,n),e=hC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GY(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=dS(Error(Oe(422))),ny(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=b5({mode:"visible",children:r.children},i,0,null),o=zf(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&P0(t,e.child,null,a),t.child.memoizedState=vw(a),t.memoizedState=mw,o);if((t.mode&1)===0)return ny(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Oe(419)),r=dS(o,r,void 0),ny(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=di,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,pu(e,i),ys(r,e,i,-1))}return bC(),r=dS(Error(Oe(421))),ny(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=oZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,na=Kc(i.nextSibling),ra=t,rr=!0,ps=null,e!==null&&(Pa[La++]=lu,Pa[La++]=uu,Pa[La++]=Gf,lu=e.id,uu=e.overflow,Gf=t),t=hC(t,r.children),t.flags|=4096,t)}function ZE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cw(e.return,t,n)}function fS(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function GO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(no(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ZE(e,n,t);else if(e.tag===19)ZE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Gn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&s4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fS(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&s4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fS(t,!0,n,null,o);break;case"together":fS(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function c3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Qc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qY(e,t,n){switch(t.tag){case 3:UO(t),E0();break;case 5:bO(t);break;case 1:To(t.type)&&t4(t);break;case 4:oC(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Gn(i4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Gn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?jO(e,t,n):(Gn(cr,cr.current&1),e=gu(e,t,n),e!==null?e.sibling:null);Gn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return GO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Gn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,WO(e,t,n)}return gu(e,t,n)}var qO,yw,KO,YO;qO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yw=function(){};KO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,If(yl.current);var o=null;switch(n){case"input":i=$6(e,i),r=$6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=V6(e,i),r=V6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=J3)}j6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Nm.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Nm.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Yn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};YO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Sg(e,t){if(!rr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function KY(e,t,n){var r=t.pendingProps;switch(Q8(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fi(t),null;case 1:return To(t.type)&&e4(),Fi(t),null;case 3:return r=t.stateNode,L0(),Xn(Lo),Xn(Vi),sC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ey(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps!==null&&(Ew(ps),ps=null))),yw(e,t),Fi(t),null;case 5:aC(t);var i=If(qm.current);if(n=t.type,e!==null&&t.stateNode!=null)KO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Fi(t),null}if(e=If(yl.current),ey(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[fl]=t,r[jm]=o,e=(t.mode&1)!==0,n){case"dialog":Yn("cancel",r),Yn("close",r);break;case"iframe":case"object":case"embed":Yn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[jm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304)}else{if(!r)if(e=s4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return yC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(Q8(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),sC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return aC(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return nC(t.type._context),null;case 22:case 23:return yC(),null;case 24:return null;default:return null}}var ry=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var XE=!1;function XY(e,t){if(nw=Z3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=XE,XE=!1,b}function dm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[jm],delete t[aw],delete t[OY],delete t[RY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function QE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),$m(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function JE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-mC?Df(e,0):gC|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=K2,K2<<=1,(K2&130023424)===0&&(K2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Ev(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function aZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=uC(null,t,r,e,i,n);var o=cC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iC(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=KE(null,t,r,e,n);break e;case 11:t=GE(null,t,r,e,n);break e;case 14:t=qE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),KE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),a4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=T0(Error(Oe(423)),t),t=YE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=YE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return jO(e,t,n);case 4:return oC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),GE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=du(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),qE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),mO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function sZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new sZ(e,t,n,r)}function xC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return xC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")xC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case B8:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case vM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function SC(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iC(o),e}function cZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Al);const ay=A8(Al.exports);var sP=Al.exports;U3.createRoot=sP.createRoot,U3.hydrateRoot=sP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var gZ=C.exports,mZ=Symbol.for("react.element"),vZ=Symbol.for("react.fragment"),yZ=Object.prototype.hasOwnProperty,bZ=gZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xZ={key:!0,ref:!0,__self:!0,__source:!0};function fR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)yZ.call(t,r)&&!xZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:mZ,type:e,key:o,ref:a,props:i,_owner:bZ.current}}k5.Fragment=vZ;k5.jsx=fR;k5.jsxs=fR;(function(e){e.exports=k5})(_5);const Hn=_5.exports.Fragment,x=_5.exports.jsx,ee=_5.exports.jsxs,SZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Hn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var kC=C.exports.createContext({});kC.displayName="ColorModeContext";function Iv(){const e=C.exports.useContext(kC);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var ly={light:"chakra-ui-light",dark:"chakra-ui-dark"};function wZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?ly.dark:ly.light),document.body.classList.remove(r?ly.light:ly.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var CZ="chakra-ui-color-mode";function _Z(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var kZ=_Z(CZ),lP=()=>{};function uP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>uP(a,s)),[h,g]=C.exports.useState(()=>uP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?lP:k,setColorMode:t?lP:P,forced:t!==void 0}),[E,k,P,t]);return x(kC.Provider,{value:L,children:n})}hR.displayName="ColorModeProvider";var Pw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Vn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Vn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Vn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Vn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return EZ(e)?e(...t):e}var EZ=e=>typeof e=="function",PZ=e=>/!(important)?$/.test(e),cP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=cP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=cP(s),i?`${s} !important`:s};function Jm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var uy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Jm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Jm({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var MZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},OZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function RZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",DZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},BZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(e){return/^var\(--.+\)$/.test(e)}var VZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=VZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",uy(rn.vh,rn.px)),spaceT:as("space",uy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Jm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",uy(rn.vh,rn.px)),sizesT:as("sizes",uy(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Jm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Jm({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(g4,{flexDir:g4.flexDirection});var yR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},gm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(gm,{insetStart:gm.insetInlineStart,insetEnd:gm.insetInlineEnd});var eX={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Zn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},rX={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},iX={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},oX={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),dP=(...e)=>`calc(${E5("+",...e)})`,fP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,hP=(...e)=>`calc(${E5("/",...e)})`,pP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(dP(e,...t)),subtract:(...t)=>kf(fP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(hP(e,...t)),negate:()=>kf(pP(e)),toString:()=>e.toString()}),{add:dP,subtract:fP,multiply:Iw,divide:hP,negate:pP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,EC=e=>Object.fromEntries(Object.entries(e).sort(xR));function gP(e){const t=EC(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(EC(e));return new Set(t)}function mP(e){if(!e)return e;e=Mw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function qg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=gP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?mP(u):void 0,{_minW:mP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:qg(null,u),minWQuery:qg(a),minMaxQuery:qg(a,u)}}),r=gX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:EC(e),asArray:gP(e),details:n,media:[null,...t.map(o=>qg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},yc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),P5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},vX=Object.keys(P5);function vP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=vP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=vP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=P5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:mX(n.breakpoints)}),n}var PC=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,yR,JZ,gm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,yR,gm),LX=Object.keys(PX),TX=[...Object.keys(PC),...vX],AX={...PC,...P5},IX=e=>e in AX,MX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!RX(t),DX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>zX({theme:t,pseudos:P5,configs:PC})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||tv($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Mv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Mv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!tv(bl());)ia();return Mv(e,Oo)}function iQ(e){return LR(v3("",null,null,null,[""],e=PR(e),0,[0],e))}function v3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:cy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&cy(v>32?bP(D+";",r,n,g-1):bP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(cy(R=yP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&cy(yP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function yP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=AC(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?LC:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,CR,L5(QX()),ev(e,2,-2),0)}function bP(e,t,n,r){return A5(e,t,n,TC,ev(e,0,r),ev(e,r+1,-1),r)}function n0(e,t){for(var n="",r=AC(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case TC:t.return=AR(t.value,t.length);break;case _R:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case LC:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||gQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?sy.dark:sy.light),document.body.classList.remove(r?sy.light:sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var CZ="chakra-ui-color-mode";function _Z(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var kZ=_Z(CZ),lP=()=>{};function uP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>uP(a,s)),[h,g]=C.exports.useState(()=>uP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?lP:k,setColorMode:t?lP:P,forced:t!==void 0}),[E,k,P,t]);return x(kC.Provider,{value:L,children:n})}hR.displayName="ColorModeProvider";var Pw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Wn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Wn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Wn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return EZ(e)?e(...t):e}var EZ=e=>typeof e=="function",PZ=e=>/!(important)?$/.test(e),cP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=cP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=cP(s),i?`${s} !important`:s};function Qm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ly=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Qm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Qm({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var MZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},OZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function RZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",DZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},BZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(e){return/^var\(--.+\)$/.test(e)}var VZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=VZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",ly(rn.vh,rn.px)),spaceT:as("space",ly(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Qm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ly(rn.vh,rn.px)),sizesT:as("sizes",ly(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Qm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Qm({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(g4,{flexDir:g4.flexDirection});var yR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},pm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(pm,{insetStart:pm.insetInlineStart,insetEnd:pm.insetInlineEnd});var eX={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Zn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},rX={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},iX={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},oX={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),dP=(...e)=>`calc(${E5("+",...e)})`,fP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,hP=(...e)=>`calc(${E5("/",...e)})`,pP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(dP(e,...t)),subtract:(...t)=>kf(fP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(hP(e,...t)),negate:()=>kf(pP(e)),toString:()=>e.toString()}),{add:dP,subtract:fP,multiply:Iw,divide:hP,negate:pP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,EC=e=>Object.fromEntries(Object.entries(e).sort(xR));function gP(e){const t=EC(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(EC(e));return new Set(t)}function mP(e){if(!e)return e;e=Mw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Gg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=gP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?mP(u):void 0,{_minW:mP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Gg(null,u),minWQuery:Gg(a),minMaxQuery:Gg(a,u)}}),r=gX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:EC(e),asArray:gP(e),details:n,media:[null,...t.map(o=>Gg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},yc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),P5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},vX=Object.keys(P5);function vP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=vP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=vP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=P5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:mX(n.breakpoints)}),n}var PC=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,yR,JZ,pm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,yR,pm),LX=Object.keys(PX),TX=[...Object.keys(PC),...vX],AX={...PC,...P5},IX=e=>e in AX,MX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!RX(t),DX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>zX({theme:t,pseudos:P5,configs:PC})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||ev($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Iv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Iv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!ev(bl());)ia();return Iv(e,Oo)}function iQ(e){return LR(v3("",null,null,null,[""],e=PR(e),0,[0],e))}function v3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:uy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&uy(v>32?bP(D+";",r,n,g-1):bP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(uy(R=yP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&uy(yP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function yP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=AC(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?LC:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,CR,L5(QX()),Jm(e,2,-2),0)}function bP(e,t,n,r){return A5(e,t,n,TC,Jm(e,0,r),Jm(e,r+1,-1),r)}function n0(e,t){for(var n="",r=AC(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case TC:t.return=AR(t.value,t.length);break;case _R:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case LC:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||gQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},wP=function(t){return t!=null&&typeof t!="boolean"},mS=TR(function(e){return BR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),CP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function nv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,nv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},GR=GQ(jQ);function qR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var KR=e=>qR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function YR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var XQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=TR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},PP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),IQ(function(){return zR(n,r,i)}),null},nJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||PP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function dy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function TP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Fw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function DJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=fy(e.s),i=fy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=fy(e.s),o=fy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:MP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:MP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Ov=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=NJ(t)),this.originalInput=t;var i=DJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ZR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=TP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=TP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),IP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),OJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+IP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=dy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=dy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=dy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=dy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(XR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Ov(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=QR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return v4([r,i],n.seed)}function VJ(e,t){for(var n=QR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=eN.find(function(a){return a.name===e});if(n){var r=JR(n);if(r.hueRange)return r.hueRange}var i=new Ov(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function QR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=eN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function JR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var eN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function jJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=jJ(e,`colors.${t}`,t),{isValid:i}=new Ov(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Ov(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Ov(r).setAlpha(t).toRgbString()};function OP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var hi=typeof Symbol=="function"&&Symbol.for,IC=hi?Symbol.for("react.element"):60103,MC=hi?Symbol.for("react.portal"):60106,I5=hi?Symbol.for("react.fragment"):60107,M5=hi?Symbol.for("react.strict_mode"):60108,O5=hi?Symbol.for("react.profiler"):60114,R5=hi?Symbol.for("react.provider"):60109,N5=hi?Symbol.for("react.context"):60110,OC=hi?Symbol.for("react.async_mode"):60111,D5=hi?Symbol.for("react.concurrent_mode"):60111,z5=hi?Symbol.for("react.forward_ref"):60112,B5=hi?Symbol.for("react.suspense"):60113,mQ=hi?Symbol.for("react.suspense_list"):60120,F5=hi?Symbol.for("react.memo"):60115,$5=hi?Symbol.for("react.lazy"):60116,vQ=hi?Symbol.for("react.block"):60121,yQ=hi?Symbol.for("react.fundamental"):60117,bQ=hi?Symbol.for("react.responder"):60118,xQ=hi?Symbol.for("react.scope"):60119;function ha(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case IC:switch(e=e.type,e){case OC:case D5:case I5:case O5:case M5:case B5:return e;default:switch(e=e&&e.$$typeof,e){case N5:case z5:case $5:case F5:case R5:return e;default:return t}}case MC:return t}}}function OR(e){return ha(e)===D5}Mn.AsyncMode=OC;Mn.ConcurrentMode=D5;Mn.ContextConsumer=N5;Mn.ContextProvider=R5;Mn.Element=IC;Mn.ForwardRef=z5;Mn.Fragment=I5;Mn.Lazy=$5;Mn.Memo=F5;Mn.Portal=MC;Mn.Profiler=O5;Mn.StrictMode=M5;Mn.Suspense=B5;Mn.isAsyncMode=function(e){return OR(e)||ha(e)===OC};Mn.isConcurrentMode=OR;Mn.isContextConsumer=function(e){return ha(e)===N5};Mn.isContextProvider=function(e){return ha(e)===R5};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===IC};Mn.isForwardRef=function(e){return ha(e)===z5};Mn.isFragment=function(e){return ha(e)===I5};Mn.isLazy=function(e){return ha(e)===$5};Mn.isMemo=function(e){return ha(e)===F5};Mn.isPortal=function(e){return ha(e)===MC};Mn.isProfiler=function(e){return ha(e)===O5};Mn.isStrictMode=function(e){return ha(e)===M5};Mn.isSuspense=function(e){return ha(e)===B5};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===I5||e===D5||e===O5||e===M5||e===B5||e===mQ||typeof e=="object"&&e!==null&&(e.$$typeof===$5||e.$$typeof===F5||e.$$typeof===R5||e.$$typeof===N5||e.$$typeof===z5||e.$$typeof===yQ||e.$$typeof===bQ||e.$$typeof===xQ||e.$$typeof===vQ)};Mn.typeOf=ha;(function(e){e.exports=Mn})(MR);var RR=MR.exports,SQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},wQ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},NR={};NR[RR.ForwardRef]=SQ;NR[RR.Memo]=wQ;var CQ=!0;function _Q(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var DR=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||CQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},zR=function(t,n,r){DR(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function kQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},wP=function(t){return t!=null&&typeof t!="boolean"},mS=TR(function(e){return BR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),CP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function tv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,tv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},GR=GQ(jQ);function qR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var KR=e=>qR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function YR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var XQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=TR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},PP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),IQ(function(){return zR(n,r,i)}),null},nJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||PP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function cy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function dy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function TP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Fw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function DJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=dy(e.s),i=dy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=dy(e.s),o=dy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:MP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:MP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Mv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=NJ(t)),this.originalInput=t;var i=DJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ZR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=TP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=TP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),IP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),OJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+IP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=cy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=cy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=cy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=cy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(XR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Mv(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=QR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return v4([r,i],n.seed)}function VJ(e,t){for(var n=QR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=eN.find(function(a){return a.name===e});if(n){var r=JR(n);if(r.hueRange)return r.hueRange}var i=new Mv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function QR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=eN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function JR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var eN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function jJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=jJ(e,`colors.${t}`,t),{isValid:i}=new Mv(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Mv(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Mv(r).setAlpha(t).toRgbString()};function OP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -53,12 +53,12 @@ Error generating stack: `+o.message+` ${t} 75%, transparent 75%, transparent - )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=XR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function DC(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function tN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(tN).join(` ${e} `).replace(/calc/g,""),RP=(...e)=>`calc(${V5("+",...e)})`,NP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,DP=(...e)=>`calc(${V5("/",...e)})`,zP=e=>{const t=tN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(RP(e,...t)),subtract:(...t)=>su(NP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(DP(e,...t)),negate:()=>su(zP(e)),toString:()=>e.toString()}),{add:RP,subtract:NP,multiply:$w,divide:DP,negate:zP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function nN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,nN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${nN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Rv,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Rv({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function zC(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Rv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),rN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},wee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...rN,...wee,container:Cee},iN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:oN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},BP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:BP.reference,"&:not([data-loaded])":{[BP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=oN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?iN[e]:void 0;return oN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},vm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},aN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=M0(`${t}.200`,.12)(n),i=M0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Uee=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(aN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=jee[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},qee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:aN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),ym=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:ym.reference,h:ym.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[ym.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[ym.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[ym.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),bm=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[bm.reference],h:[bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[bm.variable]:"sizes.10",fontSize:"md"},md:{[bm.variable]:"sizes.8",fontSize:"xs"},sm:{[bm.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=vm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function BC(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),ine=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),xne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},sN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:lN}=ir(vJ.keys),FC=ji("number-input-stepper-width"),uN=ji("number-input-input-padding"),$ne=su(FC).add("0.5rem").toString(),Hne={[FC.variable]:"sizes.6",[uN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[FC.reference]},Une=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),jne=lN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function hy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=sN.fontSizes[o];return lN({field:{...r.field,paddingInlineEnd:uN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:hy("xs"),sm:hy("sm"),md:hy("md"),lg:hy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),FP,Kne={...(FP=gn.baseStyle)==null?void 0:FP.field,textAlign:"center"},Yne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},$P,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:(($P=gn.variants)==null?void 0:$P.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),py=ji("popper-bg"),ere=ji("popper-arrow-bg"),HP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[py.variable]:"colors.white",bg:py.reference,[ere.variable]:py.reference,[HP.variable]:"colors.gray.200",_dark:{[py.variable]:"colors.gray.700",[HP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:Kg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(OP(),OP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=XR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function DC(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function tN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(tN).join(` ${e} `).replace(/calc/g,""),RP=(...e)=>`calc(${V5("+",...e)})`,NP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,DP=(...e)=>`calc(${V5("/",...e)})`,zP=e=>{const t=tN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(RP(e,...t)),subtract:(...t)=>su(NP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(DP(e,...t)),negate:()=>su(zP(e)),toString:()=>e.toString()}),{add:RP,subtract:NP,multiply:$w,divide:DP,negate:zP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function nN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,nN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${nN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Ov,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Ov({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function zC(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Ov(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Ov(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Ov(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Ov(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),rN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},wee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...rN,...wee,container:Cee},iN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:oN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},BP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:BP.reference,"&:not([data-loaded])":{[BP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=oN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?iN[e]:void 0;return oN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},mm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},aN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=M0(`${t}.200`,.12)(n),i=M0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Uee=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(aN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=jee[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},qee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:aN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),vm=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:vm.reference,h:vm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[vm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[vm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[vm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),ym=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[ym.reference],h:[ym.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[ym.variable]:"sizes.10",fontSize:"md"},md:{[ym.variable]:"sizes.8",fontSize:"xs"},sm:{[ym.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=mm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function BC(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),ine=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),xne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},sN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:lN}=ir(vJ.keys),FC=ji("number-input-stepper-width"),uN=ji("number-input-input-padding"),$ne=su(FC).add("0.5rem").toString(),Hne={[FC.variable]:"sizes.6",[uN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[FC.reference]},Une=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),jne=lN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function fy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=sN.fontSizes[o];return lN({field:{...r.field,paddingInlineEnd:uN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:fy("xs"),sm:fy("sm"),md:fy("md"),lg:fy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),FP,Kne={...(FP=gn.baseStyle)==null?void 0:FP.field,textAlign:"center"},Yne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},$P,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:(($P=gn.variants)==null?void 0:$P.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),hy=ji("popper-bg"),ere=ji("popper-arrow-bg"),HP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[hy.variable]:"colors.white",bg:hy.reference,[ere.variable]:hy.reference,[HP.variable]:"colors.gray.200",_dark:{[hy.variable]:"colors.gray.700",[HP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:qg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(OP(),OP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${Ai(n,a)} 50%, transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=Kg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:Kg({track:{h:"1"}}),sm:Kg({track:{h:"2"}}),md:Kg({track:{h:"3"}}),lg:Kg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),gy={paddingInlineEnd:"8"},WP,VP,UP,jP,GP,qP,KP,YP,Pre={lg:{...(WP=gn.sizes)==null?void 0:WP.lg,field:{...(VP=gn.sizes)==null?void 0:VP.lg.field,...gy}},md:{...(UP=gn.sizes)==null?void 0:UP.md,field:{...(jP=gn.sizes)==null?void 0:jP.md.field,...gy}},sm:{...(GP=gn.sizes)==null?void 0:GP.sm,field:{...(qP=gn.sizes)==null?void 0:qP.sm.field,...gy}},xs:{...(KP=gn.sizes)==null?void 0:KP.xs,field:{...(YP=gn.sizes)==null?void 0:YP.xs.field,...gy},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),ov=ei("slider-thumb-size"),av=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...DC({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...DC({orientation:e.orientation,horizontal:{h:av.reference},vertical:{w:av.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...DC({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:ov.reference,h:ov.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[ov.variable]:"sizes.4",[av.variable]:"sizes.1"}}),Wre=U5({container:{[ov.variable]:"sizes.3.5",[av.variable]:"sizes.1"}}),Vre=U5({container:{[ov.variable]:"sizes.2.5",[av.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:cN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=cN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:cN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),xm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(xm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[xm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[xm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[xm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[xm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=s0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={sm:s0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:s0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:s0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),kie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Lie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ZP,$ie={...(ZP=gn.baseStyle)==null?void 0:ZP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},XP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((XP=gn.variants)==null?void 0:XP.unstyled.field)??{}},QP,JP,eL,tL,Wie={xs:((QP=gn.sizes)==null?void 0:QP.xs.field)??{},sm:((JP=gn.sizes)==null?void 0:JP.sm.field)??{},md:((eL=gn.sizes)==null?void 0:eL.md.field)??{},lg:((tL=gn.sizes)==null?void 0:tL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},my=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:my.reference,color:kS.reference,[my.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[my.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:my.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:vm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},roe=noe,ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ooe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...sN,sizes:iN,shadows:roe,space:rN,borders:Yie,transition:loe},poe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},goe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(woe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function K0(){const e=C.exports.useContext(rv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function dN(){const e=Iv(),t=K0();return{...e,theme:t}}function _oe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function koe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Iv();return x(H5,{styles:t=>{const n=GR(t,"styles.global"),r=YR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=qR(a,(g,m)=>IX(m)),l=YR(e,t),u=Object.assign({},i,l,KR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Iv();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function fN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=dN(),a=e?GR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},KR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return fN(e,t)}function Ri(e,t={}){return fN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function nL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function rL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function iL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=nL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=rL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=rL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=iL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=nL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,hN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=hN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function pN(){return[x4(Hoe),()=>x4(hN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),oL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??oL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??oL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function j5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $C=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,gN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(gN),a=C.exports.useContext(Y0),s=C.exports.useContext($C).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function sv(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>sv(e[t]))}function mN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sv(n)?n:void 0,animate:sv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[aL(t),aL(n)])}function aL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),lv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?lv.projectionNodeConstructor=e[t]:lv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(Sm.hasEverUpdated)return Zoe++})}const HC=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const vN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($C),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(gN).strict,P=C.exports.useContext(vN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||lv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(HC).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function WC(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nv=new Set(C4);function yN(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function bN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xN=(e,t)=>n=>Math.max(Math.min(n,t),e),wm=e=>e%1?Number(e.toFixed(5)):e,uv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cm=Object.assign(Object.assign({},ih),{transform:xN(0,1)}),vy=Object.assign(Object.assign({},ih),{default:1}),zv=e=>({test:t=>Dv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=zv("deg"),Sl=zv("%"),St=zv("px"),cae=zv("vh"),dae=zv("vw"),sL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),VC=(e,t)=>n=>Boolean(Dv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!Dv(r))return r;const[i,o,a,s]=r.match(uv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:VC("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(wm(t))+", "+Sl.transform(wm(n))+", "+wm(Cm.transform(r))+")"},fae=xN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:VC("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+wm(Cm.transform(r))+")"};function hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gw={test:VC("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Dv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},wN="${c}",CN="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Dv(e)&&((n=(t=e.match(uv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function _N(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,wN),t.push(...r.map(to.parse)));const i=e.match(uv);return i&&(e=e.replace(uv,CN),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function kN(e){return _N(e).values}function EN(e){const{values:t,numColors:n,tokenised:r}=_N(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=kN(e);return EN(e)(t.map(gae))}const vu={test:pae,parse:kN,createTransformer:EN,getAnimatableNone:mae},vae=new Set(["brightness","contrast","saturate","opacity"]);function yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(uv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),lL={...ih,transform:Math.round},PN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:vy,scaleX:vy,scaleY:vy,scaleZ:vy,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:Cm,originX:sL,originY:sL,originZ:St,zIndex:lL,fillOpacity:Cm,strokeOpacity:Cm,numOctaves:lL};function UC(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(bN(m)){o[m]=v;continue}const b=PN[m],w=lae(v,b);if(Nv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const jC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function LN(e,t,n){for(const r in t)!Ss(t[r])&&!yN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=jC();return UC(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return LN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let TN=e=>!_4(e);function Lae(e){!e||(TN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function uL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=uL(t,e.x,e.width),i=uL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function GC(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){UC(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Aae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Oae(g,o,a,s,!1)}const AN=()=>({...jC(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=AN();return GC(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};LN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(WC(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const IN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function MN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ON=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function RN(e,t,n,r){MN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ON.has(i)?i:IN(i),t.attrs[i])}function qC(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||yN(r,e))&&(n[r]=t[r]);return n}function NN(e){const t=qC(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function KC(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const cv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),DN=e=>cv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const zN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=mN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=KC(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:zN({scrapeMotionValuesFromProps:NN,createRenderState:AN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}GC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),RN(t,n)}})},$ae={useVisualState:zN({scrapeMotionValuesFromProps:qC,createRenderState:jC})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...WC(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function BN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function FN(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function YC(e,t="page"){return{point:FN(e)?jae(e,t):Gae(e,t)}}const $N=(e,t=!1)=>{const n=r=>e(r,YC(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function HN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,HN(t),$N(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,HN(t),n&&$N(n,t==="pointerdown"),r)}function WN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const cL=WN("dragHorizontal"),dL=WN("dragVertical");function VN(e){let t=!1;if(e==="y")t=dL();else if(e==="x")t=cL();else{const n=cL(),r=dL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function UN(){const e=VN(!0);return e?(e(),!1):!0}function fL(e,t,n){return(r,i)=>{!BN(r)||UN()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?fL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?fL(r,!1,t):void 0,{passive:!t})}const jN=(e,t)=>t?e===t?!0:jN(e,t.parentElement):!1;function ZC(e){return C.exports.useEffect(()=>()=>e(),[])}function GN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),LS=.001,ese=.01,hL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=hL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,hL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ise=12;function ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!pL(e,sse)&&pL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=GN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=gL,b=gL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const gL=e=>0,dv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],vL=e=>cse.find(t=>t.test(e)),qN=(e,t)=>{let n=vL(e),r=vL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=mL(i),n=Wc),r===Rf&&(o=mL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function KN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?qN(e,t):ZN(e,t)}const YN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>KN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=KN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function yL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=yL(e),i=yL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(YN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?qN:ZN;if(Array.isArray(e))return YN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(dv(e,t,r))}function vse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=dv(e[o],e[o+1],i);return t[o](s)}}function XN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),QC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),QN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=QN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},JN=1.525,xse=4/11,Sse=8/11,wse=9/10,JC=e=>e,e7=yse(2),Cse=Q5(e7),eD=QC(e7),tD=e=>1-Math.sin(Math.acos(e)),t7=Q5(tD),_se=QC(t7),n7=QN(JN),kse=Q5(n7),Ese=QC(n7),Pse=bse(JN),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||eD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return XN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const bL={keyframes:C3,spring:XC,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(bL[e.type])return bL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:C3}const nD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),rD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),nD);function Fse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fse(()=>fv=!0),e),{}),Hse=Bv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(fv||Use(),n.schedule(r,i,o)),e},{}),Wse=Bv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});Bv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),iD=e=>{fv=!1,u0.delta=Xw?nD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,Bv.forEach(Vse),Qw=!1,fv&&(Xw=!1,rD(iD))},Use=()=>{fv=!0,Xw=!0,Qw||rD(iD)},jse=()=>u0;function oD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?oD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function aD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=GN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=XN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=oD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function sD(e,t){return t?e*(1e3/t):0}function Yse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=sD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),xL=e=>Jw(e)&&e.hasOwnProperty("z"),yy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return yy(e,t);if(Jw(e)&&Jw(t)){const n=yy(e.x,t.x),r=yy(e.y,t.y),i=xL(e)&&xL(t)?yy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const lD=(e,t)=>1-3*t+3*e,uD=(e,t)=>3*t-6*e,cD=e=>3*e,T4=(e,t,n)=>((lD(t,n)*e+uD(t,n))*e+cD(t))*e,dD=(e,t,n)=>3*lD(t,n)*e*e+2*uD(t,n)*e+cD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+by,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!UN()}function g(b,w){!h()||(jN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),ZC(u)}const ile="production",fD=typeof process>"u"||process.env===void 0?ile:"production",SL=new Set;function hD(e,t,n){e||SL.has(t)||(console.warn(t),n&&console.warn(n),SL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(fD!=="production"&&hD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function pD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:JC,easeIn:e7,easeInOut:eD,easeOut:Cse,circIn:tD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},wL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",CL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),_L={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:xy,scaleY:xy,scale:xy,opacity:IS,backgroundColor:IS,color:IS,default:xy},ble=(e,t)=>{let n;return cv(t)?n=yle:n=_L[e]||_L.default,{to:t,...n(t)}},xle={...PN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},gD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),mD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),gD);function Cle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cle(()=>hv=!0),e),{}),ws=Fv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(hv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Fv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Fv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),vD=e=>{hv=!1,c0.delta=t9?gD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Fv.forEach(kle),n9=!1,hv&&(t9=!1,mD(vD))},Ele=()=>{hv=!0,t9=!0,n9||mD(vD)},r9=()=>c0;function yD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(wL):wL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=CL(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):kL(a)&&typeof n=="string"?a=EL(n):!Array.isArray(n)&&kL(n)&&typeof a=="string"&&(n=EL(a));const l=CL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Yse({...g,...o}):aD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=DN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function kL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function EL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=yD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _m{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Dle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new _m,this.velocityUpdateSubscribers=new _m,this.renderSubscribers=new _m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?sD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function O0(e){return new Dle(e)}const bD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},xD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>xD.find(bD(e)),Ble=[...xD,to,vu],Fle=e=>Ble.find(bD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return KC(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=DN(o[a]);Wle(e,a,s)}}function Ule(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=SD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>SD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Kle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function SD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Nv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?cv(G)&&cv(W)?!pD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[Gn.Animate]:gf(!0),[Gn.InView]:gf(),[Gn.Hover]:gf(),[Gn.Tap]:gf(),[Gn.Drag]:gf(),[Gn.Focus]:gf(),[Gn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class wD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=OS(h,this.transformPagePoint),BN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},FN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=YC(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function PL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:PL(e,CD(t)),offset:PL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function CD(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=CD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function LL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function ML(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lue(e,{top:t,left:n,bottom:r,right:i}){return{x:ML(e.x,n,i),y:ML(e.y,t,r)}}function OL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=dv(t.min,t.max-r,e.min):r>i&&(n=dv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:RL(e,"left","right"),y:RL(e,"top","bottom")}}function RL(e,t,n){return{min:NL(e,t),max:NL(e,n)}}function NL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const DL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pm=()=>({x:DL(),y:DL()}),zL=()=>({min:0,max:0}),ki=()=>({x:zL(),y:zL()});function sl(e){return[e("x"),e("y")]}function _D({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||kD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function kD(e){return BL(e.x)||BL(e.y)}function BL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function FL(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=FL(e.min,t,n,r,i),e.max=FL(e.max,t,n,r,i)}function ED(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(YC(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Sue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new wD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Sy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yue(r,i.root,this.visualElement.getTransformPagePoint());let a=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=_D(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!Sy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!Sy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!Sy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Sy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($C),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new wD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),ZC(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},LD={current:!1};function kue(){if(LD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const wy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=wy.map(()=>new _m),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{wy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+wy[i]]=o=>r.add(o),n["notify"+wy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(lv),Lue=TD.length,AD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=mN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),LD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=KC(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),OD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(OD),RD=(e,t)=>{e.set(t,!1),e.set(t)},HL=e=>e===ih||e===St;var WL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(WL||(WL={}));const VL=(e,t)=>parseFloat(e.split(", ")[t]),UL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return VL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?VL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const jL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:UL(4,13),y:UL(5,14)},zue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=jL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);RD(h,s[u]),e[u]=jL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(OD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Eg(h);const m=t[l];let v;if(cv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const ND={treeType:"dom",readValueFromInstance(e,t){if(Nv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(bN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return PD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:qC,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),UC(t,n,r,i.transformTemplate)},render:MN},Wue=AD(ND),Vue=AD({...ND,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Nv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=ON.has(t)?t:IN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:NN,build(e,t,n,r,i){GC(t,n,r,i.transformTemplate)},render:RN}),Uue=(e,t)=>WC(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function GL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=GL(e,t.target.x),r=GL(e,t.target.y);return`${n}% ${r}%`}},qL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(MD,v=>(o.push(v),qL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(qL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Sm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function que(e){const[t,n]=i7(),r=C.exports.useContext(HC);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(vN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const DD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=DD.length,KL=e=>typeof e=="string"?parseFloat(e):e,YL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(dv(e,t,r))}function XL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){XL(e.x,t.x),XL(e.y,t.y)}function QL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=QL(e.min,t,n,s,i),e.max=QL(e.max,t,n,s,i)}function JL(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function eT(e,t,n,r){JL(e.x,t,nce,n?.x,r?.x),JL(e.y,t,rce,n?.y,r?.y)}function tT(e){return e.translate===0&&e.scale===1}function BD(e){return tT(e.x)&&tT(e.y)}function FD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function nT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function rT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const iT=["","X","Y","Z"],oT=1e3;function $D({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hce),this.nodes.forEach(pce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=yD(v,250),Sm.hasAnimatedSinceResize&&(Sm.hasAnimatedSinceResize=!1,this.nodes.forEach(sT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!FD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&sT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));dT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=P/1e3;lT(m.x,a.x,L),lT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Em(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{Sm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,oT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,oT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&HD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),km(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(aT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):HD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Pm();km(l,o,i.layout);const u=Pm();i.isShared?km(u,e.applyTransform(a,!0),i.measured):km(u,o,i.layout);const h=!BD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Em(b,i.layout,m.layout);const w=ki();Em(w,o,v.actual),FD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function aT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function sT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function lT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){uT(e.x,t.x,n.x,r),uT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function cT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function dT(e){cT(e.x),cT(e.y)}function HD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(nT(t),nT(n),.2)}const Sce=$D({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=$D({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function WD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=WD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ece({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=qg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:qg({track:{h:"1"}}),sm:qg({track:{h:"2"}}),md:qg({track:{h:"3"}}),lg:qg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),py={paddingInlineEnd:"8"},WP,VP,UP,jP,GP,qP,KP,YP,Pre={lg:{...(WP=gn.sizes)==null?void 0:WP.lg,field:{...(VP=gn.sizes)==null?void 0:VP.lg.field,...py}},md:{...(UP=gn.sizes)==null?void 0:UP.md,field:{...(jP=gn.sizes)==null?void 0:jP.md.field,...py}},sm:{...(GP=gn.sizes)==null?void 0:GP.sm,field:{...(qP=gn.sizes)==null?void 0:qP.sm.field,...py}},xs:{...(KP=gn.sizes)==null?void 0:KP.xs,field:{...(YP=gn.sizes)==null?void 0:YP.xs.field,...py},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),iv=ei("slider-thumb-size"),ov=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...DC({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...DC({orientation:e.orientation,horizontal:{h:ov.reference},vertical:{w:ov.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...DC({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:iv.reference,h:iv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[iv.variable]:"sizes.4",[ov.variable]:"sizes.1"}}),Wre=U5({container:{[iv.variable]:"sizes.3.5",[ov.variable]:"sizes.1"}}),Vre=U5({container:{[iv.variable]:"sizes.2.5",[ov.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:cN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=cN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:cN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),bm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(bm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[bm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[bm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[bm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[bm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=s0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={sm:s0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:s0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:s0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),kie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Lie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=mm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=mm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=mm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ZP,$ie={...(ZP=gn.baseStyle)==null?void 0:ZP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},XP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((XP=gn.variants)==null?void 0:XP.unstyled.field)??{}},QP,JP,eL,tL,Wie={xs:((QP=gn.sizes)==null?void 0:QP.xs.field)??{},sm:((JP=gn.sizes)==null?void 0:JP.sm.field)??{},md:((eL=gn.sizes)==null?void 0:eL.md.field)??{},lg:((tL=gn.sizes)==null?void 0:tL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},gy=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:gy.reference,color:kS.reference,[gy.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[gy.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:gy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:mm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},roe=noe,ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ooe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...sN,sizes:iN,shadows:roe,space:rN,borders:Yie,transition:loe},poe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},goe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(woe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function K0(){const e=C.exports.useContext(nv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function dN(){const e=Av(),t=K0();return{...e,theme:t}}function _oe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function koe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Av();return x(H5,{styles:t=>{const n=GR(t,"styles.global"),r=YR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=qR(a,(g,m)=>IX(m)),l=YR(e,t),u=Object.assign({},i,l,KR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Av();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function fN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=dN(),a=e?GR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},KR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return fN(e,t)}function Ri(e,t={}){return fN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function nL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function rL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function iL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=nL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=rL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=rL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=iL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=nL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,hN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=hN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function pN(){return[x4(Hoe),()=>x4(hN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),oL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??oL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??oL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function j5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $C=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,gN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(gN),a=C.exports.useContext(Y0),s=C.exports.useContext($C).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function av(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>av(e[t]))}function mN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||av(n)?n:void 0,animate:av(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[aL(t),aL(n)])}function aL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),sv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?sv.projectionNodeConstructor=e[t]:sv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const xm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(xm.hasEverUpdated)return Zoe++})}const HC=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const vN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($C),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(gN).strict,P=C.exports.useContext(vN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||sv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(HC).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function WC(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rv=new Set(C4);function yN(e,{layout:t,layoutId:n}){return Rv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function bN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xN=(e,t)=>n=>Math.max(Math.min(n,t),e),Sm=e=>e%1?Number(e.toFixed(5)):e,lv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Nv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wm=Object.assign(Object.assign({},ih),{transform:xN(0,1)}),my=Object.assign(Object.assign({},ih),{default:1}),Dv=e=>({test:t=>Nv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=Dv("deg"),Sl=Dv("%"),St=Dv("px"),cae=Dv("vh"),dae=Dv("vw"),sL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),VC=(e,t)=>n=>Boolean(Nv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!Nv(r))return r;const[i,o,a,s]=r.match(lv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:VC("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(Sm(t))+", "+Sl.transform(Sm(n))+", "+Sm(wm.transform(r))+")"},fae=xN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:VC("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+Sm(wm.transform(r))+")"};function hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gw={test:VC("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Nv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},wN="${c}",CN="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Nv(e)&&((n=(t=e.match(lv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function _N(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,wN),t.push(...r.map(to.parse)));const i=e.match(lv);return i&&(e=e.replace(lv,CN),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function kN(e){return _N(e).values}function EN(e){const{values:t,numColors:n,tokenised:r}=_N(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=kN(e);return EN(e)(t.map(gae))}const vu={test:pae,parse:kN,createTransformer:EN,getAnimatableNone:mae},vae=new Set(["brightness","contrast","saturate","opacity"]);function yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(lv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),lL={...ih,transform:Math.round},PN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:my,scaleX:my,scaleY:my,scaleZ:my,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:wm,originX:sL,originY:sL,originZ:St,zIndex:lL,fillOpacity:wm,strokeOpacity:wm,numOctaves:lL};function UC(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(bN(m)){o[m]=v;continue}const b=PN[m],w=lae(v,b);if(Rv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const jC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function LN(e,t,n){for(const r in t)!Ss(t[r])&&!yN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=jC();return UC(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return LN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let TN=e=>!_4(e);function Lae(e){!e||(TN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function uL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=uL(t,e.x,e.width),i=uL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function GC(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){UC(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Aae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Oae(g,o,a,s,!1)}const AN=()=>({...jC(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=AN();return GC(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};LN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(WC(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const IN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function MN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ON=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function RN(e,t,n,r){MN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ON.has(i)?i:IN(i),t.attrs[i])}function qC(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||yN(r,e))&&(n[r]=t[r]);return n}function NN(e){const t=qC(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function KC(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const uv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),DN=e=>uv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const zN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=mN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=KC(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:zN({scrapeMotionValuesFromProps:NN,createRenderState:AN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}GC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),RN(t,n)}})},$ae={useVisualState:zN({scrapeMotionValuesFromProps:qC,createRenderState:jC})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...WC(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function BN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function FN(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function YC(e,t="page"){return{point:FN(e)?jae(e,t):Gae(e,t)}}const $N=(e,t=!1)=>{const n=r=>e(r,YC(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function HN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,HN(t),$N(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,HN(t),n&&$N(n,t==="pointerdown"),r)}function WN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const cL=WN("dragHorizontal"),dL=WN("dragVertical");function VN(e){let t=!1;if(e==="y")t=dL();else if(e==="x")t=cL();else{const n=cL(),r=dL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function UN(){const e=VN(!0);return e?(e(),!1):!0}function fL(e,t,n){return(r,i)=>{!BN(r)||UN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?fL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?fL(r,!1,t):void 0,{passive:!t})}const jN=(e,t)=>t?e===t?!0:jN(e,t.parentElement):!1;function ZC(e){return C.exports.useEffect(()=>()=>e(),[])}function GN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),LS=.001,ese=.01,hL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=hL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,hL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ise=12;function ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!pL(e,sse)&&pL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=GN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=gL,b=gL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const gL=e=>0,cv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],vL=e=>cse.find(t=>t.test(e)),qN=(e,t)=>{let n=vL(e),r=vL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=mL(i),n=Wc),r===Rf&&(o=mL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function KN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?qN(e,t):ZN(e,t)}const YN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>KN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=KN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function yL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=yL(e),i=yL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(YN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?qN:ZN;if(Array.isArray(e))return YN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(cv(e,t,r))}function vse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=cv(e[o],e[o+1],i);return t[o](s)}}function XN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),QC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),QN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=QN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},JN=1.525,xse=4/11,Sse=8/11,wse=9/10,JC=e=>e,e7=yse(2),Cse=Q5(e7),eD=QC(e7),tD=e=>1-Math.sin(Math.acos(e)),t7=Q5(tD),_se=QC(t7),n7=QN(JN),kse=Q5(n7),Ese=QC(n7),Pse=bse(JN),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||eD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return XN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const bL={keyframes:C3,spring:XC,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(bL[e.type])return bL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:C3}const nD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),rD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),nD);function Fse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fse(()=>dv=!0),e),{}),Hse=zv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(dv||Use(),n.schedule(r,i,o)),e},{}),Wse=zv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});zv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),iD=e=>{dv=!1,u0.delta=Xw?nD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,zv.forEach(Vse),Qw=!1,dv&&(Xw=!1,rD(iD))},Use=()=>{dv=!0,Xw=!0,Qw||rD(iD)},jse=()=>u0;function oD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?oD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function aD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=GN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=XN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=oD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function sD(e,t){return t?e*(1e3/t):0}function Yse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=sD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),xL=e=>Jw(e)&&e.hasOwnProperty("z"),vy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return vy(e,t);if(Jw(e)&&Jw(t)){const n=vy(e.x,t.x),r=vy(e.y,t.y),i=xL(e)&&xL(t)?vy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const lD=(e,t)=>1-3*t+3*e,uD=(e,t)=>3*t-6*e,cD=e=>3*e,T4=(e,t,n)=>((lD(t,n)*e+uD(t,n))*e+cD(t))*e,dD=(e,t,n)=>3*lD(t,n)*e*e+2*uD(t,n)*e+cD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+yy,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!UN()}function g(b,w){!h()||(jN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),ZC(u)}const ile="production",fD=typeof process>"u"||process.env===void 0?ile:"production",SL=new Set;function hD(e,t,n){e||SL.has(t)||(console.warn(t),n&&console.warn(n),SL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(fD!=="production"&&hD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function pD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:JC,easeIn:e7,easeInOut:eD,easeOut:Cse,circIn:tD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},wL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",CL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),by=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),_L={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:by,scaleY:by,scale:by,opacity:IS,backgroundColor:IS,color:IS,default:by},ble=(e,t)=>{let n;return uv(t)?n=yle:n=_L[e]||_L.default,{to:t,...n(t)}},xle={...PN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},gD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),mD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),gD);function Cle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cle(()=>fv=!0),e),{}),ws=Bv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(fv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Bv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Bv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),vD=e=>{fv=!1,c0.delta=t9?gD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Bv.forEach(kle),n9=!1,fv&&(t9=!1,mD(vD))},Ele=()=>{fv=!0,t9=!0,n9||mD(vD)},r9=()=>c0;function yD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(wL):wL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=CL(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):kL(a)&&typeof n=="string"?a=EL(n):!Array.isArray(n)&&kL(n)&&typeof a=="string"&&(n=EL(a));const l=CL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Yse({...g,...o}):aD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=DN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function kL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function EL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=yD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Cm{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Dle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Cm,this.velocityUpdateSubscribers=new Cm,this.renderSubscribers=new Cm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?sD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function O0(e){return new Dle(e)}const bD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},xD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>xD.find(bD(e)),Ble=[...xD,to,vu],Fle=e=>Ble.find(bD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return KC(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=DN(o[a]);Wle(e,a,s)}}function Ule(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=SD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>SD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Kle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function SD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Rv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?uv(G)&&uv(W)?!pD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[jn.Animate]:gf(!0),[jn.InView]:gf(),[jn.Hover]:gf(),[jn.Tap]:gf(),[jn.Drag]:gf(),[jn.Focus]:gf(),[jn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class wD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=OS(h,this.transformPagePoint),BN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},FN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=YC(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function PL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:PL(e,CD(t)),offset:PL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function CD(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=CD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function LL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function ML(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lue(e,{top:t,left:n,bottom:r,right:i}){return{x:ML(e.x,n,i),y:ML(e.y,t,r)}}function OL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=cv(t.min,t.max-r,e.min):r>i&&(n=cv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:RL(e,"left","right"),y:RL(e,"top","bottom")}}function RL(e,t,n){return{min:NL(e,t),max:NL(e,n)}}function NL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const DL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Em=()=>({x:DL(),y:DL()}),zL=()=>({min:0,max:0}),ki=()=>({x:zL(),y:zL()});function sl(e){return[e("x"),e("y")]}function _D({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||kD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function kD(e){return BL(e.x)||BL(e.y)}function BL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function FL(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=FL(e.min,t,n,r,i),e.max=FL(e.max,t,n,r,i)}function ED(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(YC(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Sue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new wD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!xy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yue(r,i.root,this.visualElement.getTransformPagePoint());let a=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=_D(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!xy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!xy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!xy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function xy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($C),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new wD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),ZC(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},LD={current:!1};function kue(){if(LD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const Sy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=Sy.map(()=>new Cm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Sy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Sy[i]]=o=>r.add(o),n["notify"+Sy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(sv),Lue=TD.length,AD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=mN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),LD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=KC(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),OD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(OD),RD=(e,t)=>{e.set(t,!1),e.set(t)},HL=e=>e===ih||e===St;var WL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(WL||(WL={}));const VL=(e,t)=>parseFloat(e.split(", ")[t]),UL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return VL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?VL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const jL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:UL(4,13),y:UL(5,14)},zue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=jL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);RD(h,s[u]),e[u]=jL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(OD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Eg(h);const m=t[l];let v;if(uv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const ND={treeType:"dom",readValueFromInstance(e,t){if(Rv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(bN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return PD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:qC,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),UC(t,n,r,i.transformTemplate)},render:MN},Wue=AD(ND),Vue=AD({...ND,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Rv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=ON.has(t)?t:IN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:NN,build(e,t,n,r,i){GC(t,n,r,i.transformTemplate)},render:RN}),Uue=(e,t)=>WC(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function GL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=GL(e,t.target.x),r=GL(e,t.target.y);return`${n}% ${r}%`}},qL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(MD,v=>(o.push(v),qL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(qL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),xm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function que(e){const[t,n]=i7(),r=C.exports.useContext(HC);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(vN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const DD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=DD.length,KL=e=>typeof e=="string"?parseFloat(e):e,YL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(cv(e,t,r))}function XL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){XL(e.x,t.x),XL(e.y,t.y)}function QL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=QL(e.min,t,n,s,i),e.max=QL(e.max,t,n,s,i)}function JL(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function eT(e,t,n,r){JL(e.x,t,nce,n?.x,r?.x),JL(e.y,t,rce,n?.y,r?.y)}function tT(e){return e.translate===0&&e.scale===1}function BD(e){return tT(e.x)&&tT(e.y)}function FD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function nT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function rT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const iT=["","X","Y","Z"],oT=1e3;function $D({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hce),this.nodes.forEach(pce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=yD(v,250),xm.hasAnimatedSinceResize&&(xm.hasAnimatedSinceResize=!1,this.nodes.forEach(sT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!FD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&sT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));dT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=P/1e3;lT(m.x,a.x,L),lT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(km(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{xm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,oT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,oT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&HD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),_m(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(aT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):HD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Em();_m(l,o,i.layout);const u=Em();i.isShared?_m(u,e.applyTransform(a,!0),i.measured):_m(u,o,i.layout);const h=!BD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();km(b,i.layout,m.layout);const w=ki();km(w,o,v.actual),FD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function aT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function sT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function lT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){uT(e.x,t.x,n.x,r),uT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function cT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function dT(e){cT(e.x),cT(e.y)}function HD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(nT(t),nT(n),.2)}const Sce=$D({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=$D({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function WD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=WD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ece({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -66,8 +66,8 @@ Error generating stack: `+o.message+` top: ${s}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",hD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(HC).forceRender;l&&(s=l);const u=WD(),h=Tce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),ZC(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Hn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),fD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Hn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,hT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(hT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(hT.enter,i)})},UD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ice({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:$v("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});UD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:$v("chakra-fade",o),custom:m,...jD,animate:h,...u})})});Nce.displayName="Fade";var Dce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",s),...GD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var pT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(pT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(pT.enter,r),transitionEnd:t?.enter}}},qD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=f9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:$v("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});qD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var Hv=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=pN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:Hv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Qce(e){nb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Hv("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:Hv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Hv("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(UD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:Hv("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Wv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Wv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function rde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function gT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ide,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),KD={info:{icon:rde,colorScheme:"blue"},warning:{icon:gT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:gT,colorScheme:"red"},loading:{icon:Wv,colorScheme:"blue"}};function sde(e){return KD[e].colorScheme}function lde(e){return KD[e].icon}var YD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});YD.displayName="Alert";var ZD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});ZD.displayName="AlertDescription";function XD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}XD.displayName="AlertIcon";var QD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});QD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});O4.displayName="NativeImage";var ab=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),mT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Wv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=hde(),r=lo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=mn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":mT(a),"data-loading":mT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(vT,{...O})):x(vT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function vT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Hn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),Cy=e=>e?"":void 0,FS=e=>e?!0:void 0;function yT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,JD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":Cy(E),"data-disabled":Cy(i),"data-invalid":Cy(r),"data-readonly":Cy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=JD(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:yT(t?.onFocus,h),onBlur:yT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(ez,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var ez=Pe(function(t,n){const r=J0(),i=JD();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});ez.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var bT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function xT(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function ST(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||bT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",xT,!0),document.addEventListener("keyup",xT,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),bT=!0}function Ade(e){Tde(),e(ST());const t=()=>e(ST());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Nde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function tz(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,wT),onTouchStart:ka(Te.onTouchStart,wT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function wT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),nz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=tz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});nz.displayName="Checkbox";function Vde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function R4(e,t,n){return(e-t)*100/(n-t)}function rz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=iz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||R{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",hD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(HC).forceRender;l&&(s=l);const u=WD(),h=Tce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),ZC(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Kn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),fD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Kn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,hT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(hT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(hT.enter,i)})},UD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ice({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:Fv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});UD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:Fv("chakra-fade",o),custom:m,...jD,animate:h,...u})})});Nce.displayName="Fade";var Dce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:Fv("chakra-offset-slide",s),...GD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var pT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(pT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(pT.enter,r),transitionEnd:t?.enter}}},qD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=f9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:Fv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});qD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:Fv("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var $v=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=pN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:$v("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Qce(e){nb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=$v("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:$v("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=$v("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(UD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:$v("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Hv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Hv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function rde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function gT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ide,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),KD={info:{icon:rde,colorScheme:"blue"},warning:{icon:gT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:gT,colorScheme:"red"},loading:{icon:Hv,colorScheme:"blue"}};function sde(e){return KD[e].colorScheme}function lde(e){return KD[e].icon}var YD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});YD.displayName="Alert";var ZD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});ZD.displayName="AlertDescription";function XD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}XD.displayName="AlertIcon";var QD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});QD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});O4.displayName="NativeImage";var ab=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),mT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Hv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=hde(),r=lo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=mn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":mT(a),"data-loading":mT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(vT,{...O})):x(vT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function vT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Kn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),wy=e=>e?"":void 0,FS=e=>e?!0:void 0;function yT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,JD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":wy(E),"data-disabled":wy(i),"data-invalid":wy(r),"data-readonly":wy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=JD(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:yT(t?.onFocus,h),onBlur:yT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(ez,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var ez=Pe(function(t,n){const r=J0(),i=JD();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});ez.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var bT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function xT(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function ST(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||bT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",xT,!0),document.addEventListener("keyup",xT,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),bT=!0}function Ade(e){Tde(),e(ST());const t=()=>e(ST());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Nde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function tz(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,wT),onTouchStart:ka(Te.onTouchStart,wT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function wT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),nz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=tz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});nz.displayName="Checkbox";function Vde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function R4(e,t,n){return(e-t)*100/(n-t)}function rz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=iz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||R{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kde(e){return"current"in e}var az=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>az()&&e.test(navigator.vendor),Xde=e=>az()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function CT(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=CT(n),a=CT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,sz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=sz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});lz.displayName="InputLeftAddon";lz.id="InputLeftAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});uz.displayName="InputRightAddon";uz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=sz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});cz.id="InputLeftElement";cz.displayName="InputLeftElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});dz.id="InputRightElement";dz.displayName="InputRightElement";function ufe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return re.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});fz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(fz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var hz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});hz.displayName="Center";var hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var pz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return re.createElement(we.div,{ref:n,__css:w,...b})});pz.displayName="Grid";function _T(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:_T(i),gridRow:_T(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[bfe,gz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var mz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});mz.displayName="UnorderedList";var vz=Pe(function(t,n){const r=gz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});vz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=gz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(pz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var yz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});yz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[b9]:od(n,i=>r[i])}}function Pfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var bz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});bz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(bz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var xz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));xz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function kT(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>od(w,k=>kT(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>kT(Lw("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(Sz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var Sz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});Sz.displayName="WrapItem";var Afe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},wz=Afe,bp=()=>{},Ife={document:wz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Mfe=Ife,Ofe={window:Mfe,document:wz},Cz=typeof window<"u"?{window,document}:Ofe,_z=C.exports.createContext(Cz);_z.displayName="EnvironmentContext";function kz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Cz},[r,n]);return ee(_z.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}kz.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Ez(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Pz(e){if(!Ez(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Lz(e))==null?void 0:t.defaultView)??window}function Lz(e){return Ez(e)?e.ownerDocument:document}function Bfe(e){return Lz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ffe=e=>Tz(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Az(e){return e.parentElement&&Az(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Iz(e){if(!Pz(e)||Az(e)||$fe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Hfe(e)?!0:Tz(e)}function Wfe(e){return e?Pz(e)&&Iz(e)&&!Ffe(e):!1}var Vfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Mz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Iz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Mz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Vv=[Io,Ba,Fa,Mo],N0="start",pv="end",Xfe="clippingParents",Oz="viewport",Tg="popper",Qfe="reference",ET=Vv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+pv])},[]),Rz=[].concat(Vv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+pv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function che(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Nz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=z0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Dz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function PT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Uv(e){for(var t=Wa(e),n=PT(e);n&&fhe(n)&&yu(n).position==="static";)n=PT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Lm(e,t,n);return r>n?n:r}function zz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign({},zz(),e)}function Fz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Bz(typeof t!="number"?t:Fz(t,Vv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Uv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Lm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Dz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:D0(t*i)/i||0,y:D0(n*i)/i||0}}function LT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var R=Uv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===pv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===pv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:B0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var _y={passive:!0};function Che(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,_y)}),s&&l.addEventListener("resize",n.update,_y),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,_y)}),s&&l.removeEventListener("resize",n.update,_y)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function TT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Nz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $z(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:$z(fb(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=$z(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Tm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function AT(e,t,n){return t===Oz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Tm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Uv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&Dz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=AT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},AT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Hz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case pv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function gv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xfe:s,u=n.rootBoundary,h=u===void 0?Oz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Bz(typeof E!="number"?E:Fz(E,Vv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Hz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Rz:l,h=B0(r),g=h?s?ET:ET.filter(function(b){return B0(b)===h}):Vv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=gv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[TT(e),t,TT(t)]}function Rhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=gv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function IT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function MT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=gv(t,{elementContext:"reference"}),s=gv(t,{altBoundary:!0}),l=IT(a,r),u=IT(s,i,o),h=MT(l),g=MT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Rz.reduce(function(h,g){return h[g]=Bhe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Hz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=gv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zz(),je=He[te],ct=He[ie],qe=Lm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Uv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Lm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Lm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var OT={placement:"bottom",modifiers:[],strategy:"absolute"};function RT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function rpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var ipe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ope=e=>ipe[e],NT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...NT,...e}}:t={enabled:e,options:NT},t}var spe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},dpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:rpe(e.placement)})},hpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ppe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gpe(e,t="ltr"){var n;const r=((n=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Wz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Vz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function vpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Uz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function jz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}jz.displayName="PortalManager";var[Gz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=xpe(),l=bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(Gz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(Gz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,ky=new WeakMap,Ey={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ey[n]||(Ey[n]=new WeakMap);var o=Ey[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&ky.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(ky.has(g)||g.removeAttribute(r),ky.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,ky=new WeakMap,Ey={})}},qz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Kz(){}function Yz(){}Yz.resetWarningCache=Kz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Yz,resetWarningCache:Kz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Zz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Xz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Qz(e){return e}function Jz(e,t){t===void 0&&(t=Qz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Qz),Jz(e,t)}function eB(e){e===void 0&&(e={});var t=Jz(null);return t.options=hl({async:!0,ssr:!1},e),t}var tB=function(e){var t=e.sideCar,n=VD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};tB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),tB}var nB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),rB=R7(),zpe=R7(),Bpe=eB({async:!0}),Fpe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&nB.useMedium(ct)},[]),X=rB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Zz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Xz([n,me]);return ee(Hn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const iB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function oB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return oB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),pB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],pB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(pB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return lB(t,n)}).filter(function(n){return jpe(n)})},BT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return uB(t,n)})},k9=function(e,t,n){return hB($7(F7(e,n),t),!0,n)},FT=function(e,t){return hB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},mv=function(e,t){return e.shadowRoot?mv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return mv(n,t)})},Jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},gB=function(e){return e.parentNode?gB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(gB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Zz,'="disabled"])')))):[r]),n},[])},mB=function(e){return e.activeElement?e.activeElement.shadowRoot?mB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?mB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},vB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return mv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return mv(t,e)}):!1},r0e=function(e,t){return t.filter(fB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return fB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},$T=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},HT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},yB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=HT(e,0),k=HT(e,i-1);if(l===-1||h===-1)return yB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a0e=function(e){return function(t){var n,r=(n=cB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=BT(r.filter(a0e(n)));return i&&i.length?$T(i):$T(BT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},bB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||mv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=bB(n||e,e,r),o=new Map,a=FT(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=FT([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===yB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=bB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const xB=h0e;function SB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,vv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function WT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var x0e=function(t){return t&&"current"in t?t.current:t},S0e=function(t){return t?Boolean(vv):vv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(vB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=xB(g,qp,{focusOptions:l}),h0={})),vv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),WT(b,v.length,1,v),WT(b,-1,-1,v))}}}return t},wB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return SB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},CB=function(){vv="just",setTimeout(function(){vv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",wB),document.addEventListener("focusout",U7),window.addEventListener("blur",CB)},P0e=function(){document.removeEventListener("focusin",wB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",CB)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),B4(),SB(B4)):(P0e(),qp=null)}nB.assignSyncMedium(_0e);rB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:xB,focusInside:vB})});const A0e=$pe(L0e,T0e)(k0e);var _B=C.exports.forwardRef(function(t,n){return x(iB,{sideCar:A0e,ref:n,...t})}),kB=iB.propTypes||{};kB.sideCar;O7(kB,["sideCar"]);_B.propTypes={};const I0e=_B;var EB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Mz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};EB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",PB=eB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=VD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Xz([n,t]),O=hl(hl({},k),i);return ee(Hn,{children:[h&&x(L,{sideCar:PB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V0e=LB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + `});function Hf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kde(e){return"current"in e}var az=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>az()&&e.test(navigator.vendor),Xde=e=>az()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function CT(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=CT(n),a=CT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,sz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=sz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});lz.displayName="InputLeftAddon";lz.id="InputLeftAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});uz.displayName="InputRightAddon";uz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=sz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});cz.id="InputLeftElement";cz.displayName="InputLeftElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});dz.id="InputRightElement";dz.displayName="InputRightElement";function ufe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return re.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});fz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(fz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var hz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});hz.displayName="Center";var hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var pz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return re.createElement(we.div,{ref:n,__css:w,...b})});pz.displayName="Grid";function _T(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:_T(i),gridRow:_T(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[bfe,gz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var mz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});mz.displayName="UnorderedList";var vz=Pe(function(t,n){const r=gz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});vz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=gz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(pz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var yz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});yz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[b9]:od(n,i=>r[i])}}function Pfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var bz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});bz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(bz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var xz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));xz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function kT(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>od(w,k=>kT(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>kT(Lw("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(Sz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var Sz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});Sz.displayName="WrapItem";var Afe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},wz=Afe,bp=()=>{},Ife={document:wz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Mfe=Ife,Ofe={window:Mfe,document:wz},Cz=typeof window<"u"?{window,document}:Ofe,_z=C.exports.createContext(Cz);_z.displayName="EnvironmentContext";function kz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Cz},[r,n]);return ee(_z.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}kz.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Ez(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Pz(e){if(!Ez(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Lz(e))==null?void 0:t.defaultView)??window}function Lz(e){return Ez(e)?e.ownerDocument:document}function Bfe(e){return Lz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ffe=e=>Tz(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Az(e){return e.parentElement&&Az(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Iz(e){if(!Pz(e)||Az(e)||$fe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Hfe(e)?!0:Tz(e)}function Wfe(e){return e?Pz(e)&&Iz(e)&&!Ffe(e):!1}var Vfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Mz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Iz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Mz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Wv=[Io,Ba,Fa,Mo],N0="start",hv="end",Xfe="clippingParents",Oz="viewport",Tg="popper",Qfe="reference",ET=Wv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+hv])},[]),Rz=[].concat(Wv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+hv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function che(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Nz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=z0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Dz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function PT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Vv(e){for(var t=Wa(e),n=PT(e);n&&fhe(n)&&yu(n).position==="static";)n=PT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Pm(e,t,n);return r>n?n:r}function zz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign({},zz(),e)}function Fz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Bz(typeof t!="number"?t:Fz(t,Wv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Vv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Pm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Dz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:D0(t*i)/i||0,y:D0(n*i)/i||0}}function LT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var R=Vv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===hv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===hv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:B0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var Cy={passive:!0};function Che(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Cy)}),s&&l.addEventListener("resize",n.update,Cy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Cy)}),s&&l.removeEventListener("resize",n.update,Cy)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function TT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Nz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $z(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:$z(fb(e))}function Lm(e,t){var n;t===void 0&&(t=[]);var r=$z(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Lm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function AT(e,t,n){return t===Oz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Lm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Vv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&Dz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=AT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},AT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Hz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case hv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function pv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xfe:s,u=n.rootBoundary,h=u===void 0?Oz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Bz(typeof E!="number"?E:Fz(E,Wv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Hz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Rz:l,h=B0(r),g=h?s?ET:ET.filter(function(b){return B0(b)===h}):Wv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=pv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[TT(e),t,TT(t)]}function Rhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=pv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function IT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function MT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=pv(t,{elementContext:"reference"}),s=pv(t,{altBoundary:!0}),l=IT(a,r),u=IT(s,i,o),h=MT(l),g=MT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Rz.reduce(function(h,g){return h[g]=Bhe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Hz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=pv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zz(),je=He[te],ct=He[ie],qe=Pm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Vv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Pm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Pm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var OT={placement:"bottom",modifiers:[],strategy:"absolute"};function RT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function rpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var ipe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ope=e=>ipe[e],NT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...NT,...e}}:t={enabled:e,options:NT},t}var spe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},dpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:rpe(e.placement)})},hpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ppe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gpe(e,t="ltr"){var n;const r=((n=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Wz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Vz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function vpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Uz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function jz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}jz.displayName="PortalManager";var[Gz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=xpe(),l=bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(Gz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(Gz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,_y=new WeakMap,ky={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];ky[n]||(ky[n]=new WeakMap);var o=ky[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&_y.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(_y.has(g)||g.removeAttribute(r),_y.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,_y=new WeakMap,ky={})}},qz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Kz(){}function Yz(){}Yz.resetWarningCache=Kz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Yz,resetWarningCache:Kz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Zz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Xz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Qz(e){return e}function Jz(e,t){t===void 0&&(t=Qz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Qz),Jz(e,t)}function eB(e){e===void 0&&(e={});var t=Jz(null);return t.options=hl({async:!0,ssr:!1},e),t}var tB=function(e){var t=e.sideCar,n=VD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};tB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),tB}var nB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),rB=R7(),zpe=R7(),Bpe=eB({async:!0}),Fpe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&nB.useMedium(ct)},[]),X=rB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Zz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Xz([n,me]);return ee(Kn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const iB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function oB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return oB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),pB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],pB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(pB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return lB(t,n)}).filter(function(n){return jpe(n)})},BT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return uB(t,n)})},k9=function(e,t,n){return hB($7(F7(e,n),t),!0,n)},FT=function(e,t){return hB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},gv=function(e,t){return e.shadowRoot?gv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return gv(n,t)})},Jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},gB=function(e){return e.parentNode?gB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(gB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Zz,'="disabled"])')))):[r]),n},[])},mB=function(e){return e.activeElement?e.activeElement.shadowRoot?mB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?mB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},vB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return gv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return gv(t,e)}):!1},r0e=function(e,t){return t.filter(fB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return fB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},$T=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},HT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},yB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=HT(e,0),k=HT(e,i-1);if(l===-1||h===-1)return yB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a0e=function(e){return function(t){var n,r=(n=cB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=BT(r.filter(a0e(n)));return i&&i.length?$T(i):$T(BT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},bB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||gv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=bB(n||e,e,r),o=new Map,a=FT(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=FT([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===yB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=bB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const xB=h0e;function SB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,mv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function WT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var x0e=function(t){return t&&"current"in t?t.current:t},S0e=function(t){return t?Boolean(mv):mv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(vB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=xB(g,qp,{focusOptions:l}),h0={})),mv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),WT(b,v.length,1,v),WT(b,-1,-1,v))}}}return t},wB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return SB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},CB=function(){mv="just",setTimeout(function(){mv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",wB),document.addEventListener("focusout",U7),window.addEventListener("blur",CB)},P0e=function(){document.removeEventListener("focusin",wB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",CB)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),B4(),SB(B4)):(P0e(),qp=null)}nB.assignSyncMedium(_0e);rB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:xB,focusInside:vB})});const A0e=$pe(L0e,T0e)(k0e);var _B=C.exports.forwardRef(function(t,n){return x(iB,{sideCar:A0e,ref:n,...t})}),kB=iB.propTypes||{};kB.sideCar;O7(kB,["sideCar"]);_B.propTypes={};const I0e=_B;var EB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Mz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};EB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",PB=eB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=VD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Xz([n,t]),O=hl(hl({},k),i);return ee(Kn,{children:[h&&x(L,{sideCar:PB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V0e=LB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(M0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -404,10 +404,10 @@ Error generating stack: `+o.message+` body { `).concat(O0e,": ").concat(s,`px; } -`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Py=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Py,Py),window.removeEventListener("test",Py,Py)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return TB(e,"overflowY")},K0e=function(e){return TB(e,"overflowX")},VT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=AB(e,n);if(r){var i=IB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},AB=function(e,t){return e==="v"?q0e(t):K0e(t)},IB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=IB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&AB(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UT=function(e){return[e.deltaX,e.deltaY]},jT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` +`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Ey=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Ey,Ey),window.removeEventListener("test",Ey,Ey)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return TB(e,"overflowY")},K0e=function(e){return TB(e,"overflowX")},VT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=AB(e,n);if(r){var i=IB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},AB=function(e,t){return e==="v"?q0e(t):K0e(t)},IB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=IB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&AB(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Py=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UT=function(e){return[e.deltaX,e.deltaY]},jT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},t1e=0,Cp=[];function n1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(t1e++)[0],o=C.exports.useState(function(){return LB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=d9([e.lockRef.current],(e.shards||[]).map(jT),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Ly(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-P[0],I="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=VT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=VT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?UT(E):Ly(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(jT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Ly(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,UT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Ly(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Hn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(PB,n1e);var MB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});MB.classNames=hb.classNames;const OB=MB;var sh=(...e)=>e.filter(Boolean).join(" ");function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Yg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Yg(z.onClick,R),onKeyDown:Yg(z.onKeyDown,E),onMouseDown:Yg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return qz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Yg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function RB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(EB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(OB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...GD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],NB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});NB.displayName="ModalTransition";var yv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=sh("chakra-modal__content",n),m=lh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return re.createElement(RB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(NB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});yv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),bv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:jD),__css:l,ref:t,className:a,...o})});bv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(yv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(qD),b1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=sh("chakra-modal__content",n),v=lh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=v1e();return re.createElement(RB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var DB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),w1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function GT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var C1e=50,qT=300;function _1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},qT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},qT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);GT(ct,"disabled",Te.stop,Te.isSpinning),GT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:DB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var zB=Pe(function(t,n){const r=pb();return re.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});zB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:DB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var BB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(BB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(BB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var jv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,Gv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Vz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Wz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=Uz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=KT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=KT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function KT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=Gv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:jv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=Gv();return re.createElement(we.div,{...r(t,n),className:jv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=Gv();return x(cb,{size:"sm",onClick:r,className:jv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H1e=we(Il.section),FB=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});FB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=Gv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(FB,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:jv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=Gv();return re.createElement(we.header,{...r(t,n),className:jv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function $B(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var HB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};HB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=$B({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(HB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=$B({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),WB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});WB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var VB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});VB.displayName="SelectField";var UB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(VB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(jB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});UB.displayName="Select";var nge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),jB=e=>{const{children:t=x(nge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};jB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function GB(e){return!!e.touches}function age(e){return GB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function qB(e,t="page"){return GB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:qB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function KB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:qB(e)},{timestamp:i}=EP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=EP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$Q.update(this.updatePoint)}};function YT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:YT(e.point,t[t.length-1]),offset:YT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function ZT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(ZT(e)&&ZT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function YB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=KB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function ZB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=ZB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Zg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ty=e=>e||T3;function XB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Zg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ty(w).height>Ty(E).height?w:E,T3):r.reduce((w,E)=>Ty(w).width>Ty(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Zg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Zg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Zg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function QB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=QB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=ZB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),rz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>XB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};YB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Zg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),JB=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});JB.defaultProps={orientation:"horizontal"};JB.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=QB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=KB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=rz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return XB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}YB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var eF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});eF.displayName="SliderThumb";var tF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});tF.displayName="SliderTrack";var nF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});nF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),XT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=tz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":XT(s.isChecked),"data-hover":XT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,rF,$ge,Hge]=pN();function Wge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Vge,qv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=qv(),i=rF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=qv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:iF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":oF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=qv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:oF(n,s),tabId:iF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=qv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Uz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zge(){const e=qv(),t=rF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function iF(e,t){return`${e}--tab-${t}`}function oF(e,t){return`${e}--tabpanel-${t}`}var[Xge,Kv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),aF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});aF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=Kv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...Kv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var sF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=Kv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});sF.displayName="TabPanel";var lF=Pe(function(t,n){const r=Kge(t),i=Kv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});lF.displayName="TabPanels";var uF=Pe(function(t,n){const r=Kv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});uF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],cF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});cF.displayName="Textarea";function rme(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ame=(e,t)=>e.find(n=>n.id===t);function QT(e,t){const n=dF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function dF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=QT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:fF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=dF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(QT(pl.getState(),i).position)}}var JT=0;function dme(e,t={}){JT+=1;const n=t.id??JT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(YD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(XD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(QD,{id:u?.title,children:i}),s&&x(ZD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function fF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=fF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=dN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},hF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});hF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=hF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Hn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Vz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Wz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Hn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Hn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(kz,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(jz,{zIndex:r,children:l}):l]})})};function pF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function gF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function mF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return xv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===xv&&(xv=e.l)}function eA(e){return xv={p:[],l:xv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==vF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return tA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return tA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function tA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(gF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function nA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Sv;a&&(l=[s],u=Xg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=rA(n,o),i.I=!1}else r=rA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||gF(r,a,t(s))}),o===3?new Set(r):r}(e)}function rA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return Sv.get(l,o)},set:function(l){var u=this[nr];Sv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!mF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,bF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function xF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G4}function i(s,l){r(s)===G4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bme=function(t,n){return t===n};function Fme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=VT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=VT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?UT(E):Py(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(jT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Py(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,UT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Py(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Kn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(PB,n1e);var MB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});MB.classNames=hb.classNames;const OB=MB;var sh=(...e)=>e.filter(Boolean).join(" ");function Kg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Kg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Kg(z.onClick,R),onKeyDown:Kg(z.onKeyDown,E),onMouseDown:Kg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return qz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Kg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function RB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(EB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(OB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...GD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],NB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});NB.displayName="ModalTransition";var vv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=sh("chakra-modal__content",n),m=lh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return re.createElement(RB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(NB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});vv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),yv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:jD),__css:l,ref:t,className:a,...o})});yv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(vv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(qD),b1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=sh("chakra-modal__content",n),v=lh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=v1e();return re.createElement(RB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var DB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),w1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function GT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var C1e=50,qT=300;function _1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},qT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},qT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);GT(ct,"disabled",Te.stop,Te.isSpinning),GT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:DB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var zB=Pe(function(t,n){const r=pb();return re.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});zB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:DB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var BB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(BB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(BB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var Uv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,jv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Vz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Wz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=Uz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=KT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=KT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function KT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=jv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:Uv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=jv();return re.createElement(we.div,{...r(t,n),className:Uv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=jv();return x(cb,{size:"sm",onClick:r,className:Uv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H1e=we(Il.section),FB=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});FB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=jv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(FB,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:Uv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=jv();return re.createElement(we.header,{...r(t,n),className:Uv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function $B(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var HB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};HB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=$B({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(HB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=$B({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),WB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});WB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var VB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});VB.displayName="SelectField";var UB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(VB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(jB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});UB.displayName="Select";var nge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),jB=e=>{const{children:t=x(nge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};jB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function GB(e){return!!e.touches}function age(e){return GB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function qB(e,t="page"){return GB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:qB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function KB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:qB(e)},{timestamp:i}=EP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=EP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$Q.update(this.updatePoint)}};function YT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:YT(e.point,t[t.length-1]),offset:YT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function ZT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(ZT(e)&&ZT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function YB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=KB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function ZB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=ZB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Yg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ly=e=>e||T3;function XB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Yg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ly(w).height>Ly(E).height?w:E,T3):r.reduce((w,E)=>Ly(w).width>Ly(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Yg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Yg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Yg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function QB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=QB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=ZB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),rz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>XB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};YB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Yg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),JB=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});JB.defaultProps={orientation:"horizontal"};JB.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=QB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=KB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=rz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return XB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}YB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var eF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});eF.displayName="SliderThumb";var tF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});tF.displayName="SliderTrack";var nF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});nF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),XT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=tz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":XT(s.isChecked),"data-hover":XT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,rF,$ge,Hge]=pN();function Wge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Vge,Gv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=Gv(),i=rF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Gv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:iF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":oF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=Gv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:oF(n,s),tabId:iF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Gv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Uz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zge(){const e=Gv(),t=rF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function iF(e,t){return`${e}--tab-${t}`}function oF(e,t){return`${e}--tabpanel-${t}`}var[Xge,qv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),aF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});aF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=qv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...qv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var sF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=qv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});sF.displayName="TabPanel";var lF=Pe(function(t,n){const r=Kge(t),i=qv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});lF.displayName="TabPanels";var uF=Pe(function(t,n){const r=qv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});uF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],cF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});cF.displayName="Textarea";function rme(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ame=(e,t)=>e.find(n=>n.id===t);function QT(e,t){const n=dF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function dF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=QT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:fF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=dF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(QT(pl.getState(),i).position)}}var JT=0;function dme(e,t={}){JT+=1;const n=t.id??JT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(YD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(XD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(QD,{id:u?.title,children:i}),s&&x(ZD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function fF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=fF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=dN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},hF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});hF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=hF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Kn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Vz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Wz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Kn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Kn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(kz,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(jz,{zIndex:r,children:l}):l]})})};function pF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function gF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function mF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return bv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===bv&&(bv=e.l)}function eA(e){return bv={p:[],l:bv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==vF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return tA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return tA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function tA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(gF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function nA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=xv;a&&(l=[s],u=Zg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=rA(n,o),i.I=!1}else r=rA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||gF(r,a,t(s))}),o===3?new Set(r):r}(e)}function rA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return xv.get(l,o)},set:function(l){var u=this[nr];xv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!mF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,bF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function xF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G4}function i(s,l){r(s)===G4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bme=function(t,n){return t===n};function Fme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1] * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Vn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var s2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function l2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function P2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=k2,Wo.prototype.delete=E2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=P2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:uk(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Bk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Dk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Un($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(c);return function(S){return jh(S,c,p)}}function jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:$k(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(fk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return N2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=h2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function I2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return Qd?un(Qd.call(c)):{}}function M2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function O2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Wn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var a2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function s2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function E2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=_2,Wo.prototype.delete=k2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=E2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:uk(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Bk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Dk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(c);return function(S){return jh(S,c,p)}}function jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:$k(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(fk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return R2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=f2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function A2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Qd?un(Qd.call(c)):{}}function I2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function M2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ /* [wrapped with `+p+`] */ -`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function N2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,_k(c,S)});function kk(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function D2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:D2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return kk(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=Fk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=yk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:D2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(bk),QU=ug(xk);function JU(c,p){return Lr(z2(c,p),1)}function ej(c,p){return Lr(z2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(z2(c,p),S)}function Ek(c,p){var S=Rt(c)?Un:Qa;return S(c,Le(p,3))}function Pk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),W2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function z2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?r2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,$2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return W2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),B2=p2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Tk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ak=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ak));A|=O}return he(p,A,c,S,N)});function Ik(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Qk=p-is;return Ae?Kr(Qk,F-Ql):Qk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=B2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(B2())}function Xo(){var Mr=B2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function F2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(F2.Cache||Vo),S}F2.Cache=Vo;function $2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Sj(c){return Tk(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&H2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=g2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Nk(c){return typeof c=="number"&&c==Dt(c)}function H2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Dk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return zk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function zk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Nk(c)&&c>=-W&&c<=W}var Bk=Bs?Er(Bs):Bt;function W2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function Fk(c){if(!c)return[];if(xo(c))return W2(c)?Di(c):wi(c);if(Xu&&c[Xu])return l2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function $k(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Hk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Wk=Xi(function(c,p){wa(p,So(p),c)}),V2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return Uk(c,$2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function Uk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?qk(p):p)});function qk(c){return Dx(Sn(c).toLowerCase())}function Kk(c){return c=Sn(c),c&&c.replace(S1,s2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=V2({},p,A,Re);var N=V2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` +`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function R2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,_k(c,S)});function kk(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function N2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:N2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return kk(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=Fk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=yk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:N2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(bk),QU=ug(xk);function JU(c,p){return Lr(D2(c,p),1)}function ej(c,p){return Lr(D2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(D2(c,p),S)}function Ek(c,p){var S=Rt(c)?Vn:Qa;return S(c,Le(p,3))}function Pk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),H2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function D2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?n2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,F2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return H2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),z2=h2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Tk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ak=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ak));A|=O}return he(p,A,c,S,N)});function Ik(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Qk=p-is;return Ae?Kr(Qk,F-Ql):Qk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=z2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(z2())}function Xo(){var Mr=z2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function B2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(B2.Cache||Vo),S}B2.Cache=Vo;function F2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Sj(c){return Tk(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&$2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=p2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Nk(c){return typeof c=="number"&&c==Dt(c)}function $2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Dk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return zk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function zk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Nk(c)&&c>=-W&&c<=W}var Bk=Bs?Er(Bs):Bt;function H2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function Fk(c){if(!c)return[];if(xo(c))return H2(c)?Di(c):wi(c);if(Xu&&c[Xu])return s2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function $k(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Hk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Wk=Xi(function(c,p){wa(p,So(p),c)}),W2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return Uk(c,F2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function Uk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?qk(p):p)});function qk(c){return Dx(Sn(c).toLowerCase())}function Kk(c){return c=Sn(c),c&&c.replace(S1,a2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=W2({},p,A,Re);var N=W2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` `;c.replace(Ge,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Ae+=c.slice(_e,Xo).replace(w1,$s),Gt&&(J=!0,Ae+=`' + __e(`+Gt+`) + '`),Ji&&(ce=!0,Ae+=`'; @@ -473,8 +473,8 @@ __p += '`),en&&(Ae+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ae+`return __p -}`;var $t=Zk(function(){return Jt(F,ht+"return "+Ae).apply(n,K)});if($t.source=Ae,Mx($t))throw $t;return $t}function rq(c){return Sn(c).toLowerCase()}function iq(c){return Sn(c).toUpperCase()}function oq(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Di(p),F=$o(A,N),K=Ka(A,N)+1;return ts(A,F,K).join("")}function aq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,A1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Ka(A,Di(p))+1;return ts(A,0,N).join("")}function sq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Mu,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),N=$o(A,Di(p));return ts(A,N).join("")}function lq(c,p){var S=V,A=Y;if(lr(p)){var N="separator"in p?p.separator:N;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,d2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Yk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Zk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Un(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:D2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Un(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=x2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,WF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&WF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},VF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?WF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),UF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=UF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),jF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=jF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),GF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),qF=De((e,t)=>{var n=Mb(),r=GF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),KF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),K2e=De((e,t)=>{var n=qF(),r=q2e(),i=GF(),o=KF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),J2e=De((e,t)=>{var n=Ob(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),eye=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),YF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=YF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=YF(),r=cye(),i=dye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),ZF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=UF(),o=ZF(),a=mye(),s=vye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Cye=De((e,t)=>{var n=Sye(),r=wye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),_ye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),XF=De((e,t)=>{var n=_u(),r=Pye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Lye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Tye=De((e,t)=>{var n=Mb(),r=QF(),i=Nb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=jF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),JF=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=XF(),a=Lye(),s=JF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),zye=De((e,t)=>{var n=qF(),r=QF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=KF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=ZF(),i=yye(),o=$ye(),a=jye(),s=__(),l=XF(),u=JF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),e$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Am(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return t$(e,["input","textarea","select"])}function t$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Jye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var e3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=VF(e$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var xA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!t$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){xA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Am(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){xA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Am(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Am(w,u?.combinationKey)))}},[e,l,u,h]),i}VF(e$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Am(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Am(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const c3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),d3e=st({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),m3e=st({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const v3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const SA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(SA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(SA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(UB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var n$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wA=re.createContext&&re.createContext(n$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function fh(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(xz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Hn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(tF,{className:"invokeai__slider_track",...Y,children:x(nF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(eF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(zB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const a$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},s$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(t2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const l$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(t2(l$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Zv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(nz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},u$=yb({name:"system",initialState:t4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:CA,setSocketId:iEe,setShouldConfirmOnDelete:c$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:d$,setModelList:_A,setIsCancelable:kA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=u$.actions,d4e=u$.reducer;function f4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function f$(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function h$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function p$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function g$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function m$(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function v$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function A4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function I4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function O4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function R4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function N4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function D4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function F4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function b$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function $4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function H4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function U4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function G4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function f6(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function I_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Ay;const e5e=new Uint8Array(16);function t5e(){if(!Ay&&(Ay=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ay))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ay(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),EA={randomUUID:r5e};function Ap(e,t,n){if(EA.randomUUID&&!t&&!e)return EA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Iy=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",x$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},PA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...PA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...PA}},S$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=e[e.currentCanvas];n.boundingBoxDimensions=t.payload;const{width:r,height:i}=t.payload,{x:o,y:a}=n.boundingBoxCoordinates,{width:s,height:l}=n.stageDimensions,u=s/n.stageScale,h=l/n.stageScale,g=cs(u,64),m=cs(h,64),v=cs(r,64),b=cs(i,64),w=o+r-u,E=a+i-h,P=Ve.clamp(v,64,g),k=Ve.clamp(b,64,m),L=w>0?o-w:o,I=E>0?a-E:a,O=Ve.clamp(L,n.stageCoordinates.x,g-P),R=Ve.clamp(I,n.stageCoordinates.y,m-k);n.boundingBoxDimensions={width:P,height:k},n.boundingBoxCoordinates={x:O,y:R}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(D$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:w$,setEraserSize:u5e,addLine:C$,addPointToCurrentLine:_$,setShouldPreserveMaskedArea:k$,setIsMaskEnabled:E$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:P$,clearMask:L$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:T$,setStageDimensions:LA,setImageToInpaint:Y4,setImageToOutpaint:A$,setBoundingBoxDimensions:Qg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:I$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:M$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:TA,setShouldLockBoundingBox:O$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:AA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:My,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:R$,setCurrentCanvas:N$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=S$.actions,k5e=S$.reducer,D$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Xv=Qe([jt],e=>e.layerState.objects.find(x$)),z$=Qe([e=>e.options,e=>e.system,Xv,vn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),IA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),MA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function B$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(z$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(mz,{children:o.map((u,h)=>x(vz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function F$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),$$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(B$,{}),x($$,{}),x(F$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(z$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(cF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function H$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function W$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function OA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=OA(e.className,t):e.setAttribute("class",OA(e.className&&e.className.baseVal||"",t))}const RA={disabled:!1},V$=re.createContext(null);var U$=function(t){return t.scrollTop},Jg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Jg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Jg?{status:wf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this);a&&U$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Jg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[sy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||RA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:sy.findDOMNode(this);if(!o||RA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Jg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(V$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=V$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Jg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},q$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);G$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(j$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(H$,{}):x(W$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),K$=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(c$(!b.target.checked));return ee(Hn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(bv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(_v(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(t2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(A$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(v$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Zv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(m$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},Z$=yb({name:"gallery",initialState:U5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Oy,clearIntermediateImage:NA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:z_,selectPrevImage:B_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Ry,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});st({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});st({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});st({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});st({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});st({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});st({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});st({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});st({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});st({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});st({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});st({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});st({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});st({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});st({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});st({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});st({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});st({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});st({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});st({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});st({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});st({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});st({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});st({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});st({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});st({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});st({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});st({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});st({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});st({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});st({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});st({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});st({displayName:"SpinnerIcon",path:ee(Hn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});st({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});st({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});st({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});st({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});st({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});st({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});st({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});st({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});st({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});st({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});st({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function J5e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Hn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(m8(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(t2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(_v(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(v8(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(p8(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Hn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(m8(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(hz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(B_())},h=()=>{e(z_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),F_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Hn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Hn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(rbe,{})}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function obe(e){return lt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var abe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],$A="__resizable_base__",rH=function(e){ube(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add($A):o.className+=$A,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ep("left",o),s=i&&Ep("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Dy(n,I,O),r=Dy(r,R,D)}else n=Dy(n,h,g),r=Dy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&dbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&zy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=zy(n)?n.touches[0].clientX:n.clientX,h=zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=fbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=FA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=FA(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=BA(I,this.props.grid[0]),z=BA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(lbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Qv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pbe(i,...t)]}function pbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});wv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Qv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(wv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let HA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(HA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),WA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=HA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),WA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){lH(wbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:VA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:VA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function VA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",UA={bubbles:!1,cancelable:!0},Tbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){GA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,UA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,UA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),GA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=jA(t,e),r=jA(t.reverse(),e);return[n,r]}function uH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const GA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qA(e,t),e.unshift(t)},remove(t){var n;e=qA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function qA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function $_(e){return e==="y"?"height":"width"}function KA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=i1(t),l=$_(s),u=r[l]/2-i[l]/2,h=r1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=KA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=$_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=$_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function ZA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[ZA(e),t,ZA(t)]}const Kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function XA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Q4(r,{...n,elementContext:"reference"}),a=XA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:QA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=XA(o,i.floating);return{data:{escapedOffsets:a,escaped:QA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await Q4(t,l),g=i1(r1(i)),m=dH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=i1(i),m=dH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function H_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Jv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Jv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const JA=Math.min,Im=Math.max,e5=Math.round;function wu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(H_(e)?e.host:null)||wd(e)}function eI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(H_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=eI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=eI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function tI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function axe(e,t){const n=Pu(e),r=wd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Im(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Im(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Jv(i||n).direction==="rtl"&&(s+=Im(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&H_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function nI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Jv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=nI(t,h,i);return u.top=Im(g.top,u.top),u.right=JA(g.right,u.right),u.bottom=JA(g.bottom,u.bottom),u.left=Im(g.left,u.left),u},nI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:tI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...tI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jv(e).direction==="rtl"};function hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...cd(e)?t5(e):[],...t5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!X9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=gxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const vxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?YA({element:t.current,padding:n}).fn(i):{}:t?YA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const bH="Popper",[W_,xH]=Qv(bH),[bxe,SH]=W_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=W_(n5),[_xe,kxe]=W_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=wH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Fy(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Fy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=Fy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Fy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Fy(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},V_="RovingFocusGroup",[Q9,_H,Bxe]=aH(V_),[Fxe,kH]=Qv(V_,[Bxe]),[$xe,Hxe]=Fxe(V_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Qv(ex,[nSe,xH,kH]),U_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,j_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=U_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=U_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=j_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return qz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=tx(td,n),E=j_(td,n),P=U_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?OB:C.exports.Fragment,ie=v?{as:wv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:Kn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,t8(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),e8="MenuItem",rI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=j_(e8,e.__scopeMenu),s=AH(e8,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(rI,{bubbles:!0,cancelable:!0});g.addEventListener(rI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(e8,n),s=TH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,t8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,t8(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function t8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Qv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,$y(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,$y(u)),onPointerCancel:Kn(e.onPointerCancel,$y(u)),onPointerUp:Kn(e.onPointerUp,$y(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function $y(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(t2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(_v(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(A$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:g$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(B_())}),vt("right",()=>{e(z_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),G$(D,j,!o),x(j$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Hn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Ry("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Ry("user")),children:"User"})]}):ee(Hn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Ry("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Ry("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(H$,{}):x(W$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Hn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(f$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(M$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function iI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Qg({...a,width:Math.floor(g)})),t=="height"&&r(Qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Qg({...a,width:Math.floor(s)})),t=="height"&&r(Qg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(O$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(o$,{size:22}):x(i$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(iI,{dimension:"width",label:"Box W"}),x(iI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(TA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(TA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Hn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function n8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var W0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(oI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=r8(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(aI(P),!function(I,O){return O&&!Mm(I)}(P,l.current)&&k)){if(Mm(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(oI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},q_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},i8=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(G_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(q_,{className:"react-colorful__hue-pointer",left:t/360,color:i8({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:i8({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(G_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:i8(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=n8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;BH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},sI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!sI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,sI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(G_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(q_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const K_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(P$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(K_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(w$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(y$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(L$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(E$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(o$,{size:22}):x(i$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(k$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(O$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Xv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current)return;const{width:o,height:a}=r?.image?r.image:{width:512,height:512},{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(I$(u)),n==="inpainting"?e(LA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(LA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Wv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",lI="Konva error: ",K6e="rgb(",_6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Hy=[];const Z6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Hy.push(e),Hy.length===1&&Z6e(function(){const t=Hy;Hy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,j6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Y_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Mg+a(t),l=Og+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Mg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(uI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=cI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];cn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Vy="allEventListeners",ru="absoluteTransform",dI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",o8="listening",fI="mouseenter",hI="mouseleave",pI="set",gI="Shape",R3=" ",mI="stage",_c="transform",gwe="Stage",a8="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===_c||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===_c||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new Z_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(O3),this._clearSelfAndDescendantCache(dI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==hwe&&(r=pI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(o8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(a8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==gwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_c),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(_c);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(_c),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(O3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;cn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Pp=e=>{const t=rm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function yI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",N3=[];class lx extends aa{constructor(t){super(yI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{yI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===bwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new S0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+vI,this.content.style.height=n+vI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rwwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Pp(t.type),r=rm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(l8,{evt:t}):this._fire(l8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,X_(t)),Om(t.pointerId)}_lostpointercapture(t){Om(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Z_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let Ky;function P6(){return Ky||(Ky=fe.createCanvasElement().getContext("2d"),Ky)}const Rm={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Rm)););this.colorKey=n,Rm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Rm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Y_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new Z_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class Q_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Q_.prototype.nodeType="FastLayer";gr(Q_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=bI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=xI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===bI?this.setTime(t):this.state===xI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Nm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Bwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Nm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function u8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function wI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",c8="up",d8="right",f8="down",h8="left",Uwe=cW.length;class J_ extends V0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var CI=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,CI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),CI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Zy;function A6(){return Zy||(Zy=fe.createCanvasElement().getContext(qwe),Zy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Yy+this.fontVariant()+Yy+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==EI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Yy||te===_I;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Yy),z.lastIndexOf(_I))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==EI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+T6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),PI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function bW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(PI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(PI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new e2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function TI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new TI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,c2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Yk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Zk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:N2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=b2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,WF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&WF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},VF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?WF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),UF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=UF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),jF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=jF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),GF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),qF=De((e,t)=>{var n=Mb(),r=GF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),KF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),K2e=De((e,t)=>{var n=qF(),r=q2e(),i=GF(),o=KF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),J2e=De((e,t)=>{var n=Ob(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),eye=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),YF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=YF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=YF(),r=cye(),i=dye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),ZF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=UF(),o=ZF(),a=mye(),s=vye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Cye=De((e,t)=>{var n=Sye(),r=wye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),_ye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),XF=De((e,t)=>{var n=_u(),r=Pye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Lye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Tye=De((e,t)=>{var n=Mb(),r=QF(),i=Nb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=jF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),JF=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=XF(),a=Lye(),s=JF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),zye=De((e,t)=>{var n=qF(),r=QF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=KF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=ZF(),i=yye(),o=$ye(),a=jye(),s=__(),l=XF(),u=JF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),e$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Tm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return t$(e,["input","textarea","select"])}function t$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Jye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var e3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=VF(e$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var xA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!t$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){xA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Tm(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){xA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Tm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Tm(w,u?.combinationKey)))}},[e,l,u,h]),i}VF(e$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Tm(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Tm(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const c3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),d3e=st({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),m3e=st({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const v3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const SA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(SA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(SA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(UB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Kv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var n$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wA=re.createContext&&re.createContext(n$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function fh(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(xz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Kn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(tF,{className:"invokeai__slider_track",...Y,children:x(nF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(eF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(zB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const a$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},s$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(e2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const l$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(e2(l$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(nz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},u$=yb({name:"system",initialState:t4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:CA,setSocketId:iEe,setShouldConfirmOnDelete:c$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:d$,setModelList:_A,setIsCancelable:kA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=u$.actions,d4e=u$.reducer;function f4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function f$(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function h$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function p$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function g$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function m$(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function v$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function A4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function I4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function O4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function R4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function N4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function D4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function F4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function b$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function $4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function H4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function U4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function G4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function f6(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function I_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Ty;const e5e=new Uint8Array(16);function t5e(){if(!Ty&&(Ty=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ty))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ty(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),EA={randomUUID:r5e};function Ap(e,t,n){if(EA.randomUUID&&!t&&!e)return EA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ay=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",x$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},PA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...PA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...PA}},S$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=e[e.currentCanvas];n.boundingBoxDimensions=t.payload;const{width:r,height:i}=t.payload,{x:o,y:a}=n.boundingBoxCoordinates,{width:s,height:l}=n.stageDimensions,u=s/n.stageScale,h=l/n.stageScale,g=cs(u,64),m=cs(h,64),v=cs(r,64),b=cs(i,64),w=o+r-u,E=a+i-h,P=Ve.clamp(v,64,g),k=Ve.clamp(b,64,m),L=w>0?o-w:o,I=E>0?a-E:a,O=Ve.clamp(L,n.stageCoordinates.x,g-P),R=Ve.clamp(I,n.stageCoordinates.y,m-k);n.boundingBoxDimensions={width:P,height:k},n.boundingBoxCoordinates={x:O,y:R}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(D$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:w$,setEraserSize:u5e,addLine:C$,addPointToCurrentLine:_$,setShouldPreserveMaskedArea:k$,setIsMaskEnabled:E$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:P$,clearMask:L$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:T$,setStageDimensions:LA,setImageToInpaint:Y4,setImageToOutpaint:A$,setBoundingBoxDimensions:Xg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:I$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:M$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:TA,setShouldLockBoundingBox:O$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:AA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:Iy,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:R$,setCurrentCanvas:N$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=S$.actions,k5e=S$.reducer,D$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Zv=Qe([jt],e=>e.layerState.objects.find(x$)),z$=Qe([e=>e.options,e=>e.system,Zv,vn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),IA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),MA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function B$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(z$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(mz,{children:o.map((u,h)=>x(vz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function F$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),$$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(B$,{}),x($$,{}),x(F$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(z$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(cF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function H$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function W$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function OA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=OA(e.className,t):e.setAttribute("class",OA(e.className&&e.className.baseVal||"",t))}const RA={disabled:!1},V$=re.createContext(null);var U$=function(t){return t.scrollTop},Qg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Qg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Qg?{status:wf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ay.findDOMNode(this);a&&U$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Qg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[ay.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||RA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ay.findDOMNode(this);if(!o||RA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:ay.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Qg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(V$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=V$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Qg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},q$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);G$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(j$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(H$,{}):x(W$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),K$=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(c$(!b.target.checked));return ee(Kn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(yv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(Cv(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(e2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(A$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(v$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Kv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(m$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},Z$=yb({name:"gallery",initialState:U5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:My,clearIntermediateImage:NA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:z_,selectPrevImage:B_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Oy,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});st({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});st({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});st({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});st({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});st({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});st({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});st({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});st({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});st({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});st({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});st({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});st({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});st({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});st({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});st({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});st({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});st({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});st({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});st({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});st({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});st({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});st({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});st({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});st({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});st({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});st({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});st({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});st({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});st({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});st({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});st({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});st({displayName:"SpinnerIcon",path:ee(Kn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});st({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});st({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});st({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});st({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});st({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});st({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});st({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});st({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});st({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});st({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});st({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function J5e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Kn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(m8(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(e2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(Cv(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(v8(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(p8(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Kn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(m8(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(hz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(B_())},h=()=>{e(z_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),F_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Kn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Kn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(rbe,{})}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function obe(e){return lt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var abe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],$A="__resizable_base__",rH=function(e){ube(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add($A):o.className+=$A,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ep("left",o),s=i&&Ep("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Ny(n,I,O),r=Ny(r,R,D)}else n=Ny(n,h,g),r=Ny(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&dbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Dy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Dy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Dy(n)?n.touches[0].clientX:n.clientX,h=Dy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=fbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=FA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=FA(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=BA(I,this.props.grid[0]),z=BA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(lbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Xv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pbe(i,...t)]}function pbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const Sv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});Sv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Sv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Xv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(Sv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(Sv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let HA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(HA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),WA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=HA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),WA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){lH(wbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:VA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:VA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function VA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",UA={bubbles:!1,cancelable:!0},Tbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){GA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,UA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,UA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),GA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=jA(t,e),r=jA(t.reverse(),e);return[n,r]}function uH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const GA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qA(e,t),e.unshift(t)},remove(t){var n;e=qA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function qA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function $_(e){return e==="y"?"height":"width"}function KA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=i1(t),l=$_(s),u=r[l]/2-i[l]/2,h=r1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=KA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=$_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=$_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function ZA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[ZA(e),t,ZA(t)]}const Kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function XA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Q4(r,{...n,elementContext:"reference"}),a=XA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:QA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=XA(o,i.floating);return{data:{escapedOffsets:a,escaped:QA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await Q4(t,l),g=i1(r1(i)),m=dH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=i1(i),m=dH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function H_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Qv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Qv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const JA=Math.min,Am=Math.max,e5=Math.round;function wu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(H_(e)?e.host:null)||wd(e)}function eI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(H_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=eI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=eI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function tI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function axe(e,t){const n=Pu(e),r=wd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Am(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Am(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Qv(i||n).direction==="rtl"&&(s+=Am(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&H_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function nI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Qv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=nI(t,h,i);return u.top=Am(g.top,u.top),u.right=JA(g.right,u.right),u.bottom=JA(g.bottom,u.bottom),u.left=Am(g.left,u.left),u},nI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:tI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...tI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Qv(e).direction==="rtl"};function hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...cd(e)?t5(e):[],...t5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!X9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=gxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const vxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?YA({element:t.current,padding:n}).fn(i):{}:t?YA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const bH="Popper",[W_,xH]=Xv(bH),[bxe,SH]=W_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=W_(n5),[_xe,kxe]=W_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=wH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=By(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=By(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=By(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=By(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function By(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},V_="RovingFocusGroup",[Q9,_H,Bxe]=aH(V_),[Fxe,kH]=Xv(V_,[Bxe]),[$xe,Hxe]=Fxe(V_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:qn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Xv(ex,[nSe,xH,kH]),U_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,j_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=U_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=U_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=j_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return qz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=tx(td,n),E=j_(td,n),P=U_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?OB:C.exports.Fragment,ie=v?{as:Sv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:qn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,t8(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),e8="MenuItem",rI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=j_(e8,e.__scopeMenu),s=AH(e8,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(rI,{bubbles:!0,cancelable:!0});g.addEventListener(rI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(e8,n),s=TH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,t8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,t8(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function t8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Xv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,Fy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,Fy(u)),onPointerCancel:qn(e.onPointerCancel,Fy(u)),onPointerUp:qn(e.onPointerUp,Fy(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function Fy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(e2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(Cv(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(A$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:g$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(B_())}),vt("right",()=>{e(z_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),G$(D,j,!o),x(j$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Kn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Oy("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Oy("user")),children:"User"})]}):ee(Kn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Oy("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Oy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(H$,{}):x(W$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Kn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(f$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(M$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function iI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Xg({...a,width:Math.floor(g)})),t=="height"&&r(Xg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Xg({...a,width:Math.floor(s)})),t=="height"&&r(Xg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(O$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(o$,{size:22}):x(i$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(iI,{dimension:"width",label:"Box W"}),x(iI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(TA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(TA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Kn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function n8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var W0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(oI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=r8(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(aI(P),!function(I,O){return O&&!Im(I)}(P,l.current)&&k)){if(Im(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(oI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},q_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},i8=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(G_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(q_,{className:"react-colorful__hue-pointer",left:t/360,color:i8({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:i8({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(G_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:i8(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=n8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;BH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},sI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!sI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,sI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(G_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(q_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const K_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(P$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(K_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(w$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(y$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(L$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(E$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(o$,{size:22}):x(i$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(k$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(O$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Zv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current)return;const{width:o,height:a}=r?.image?r.image:{width:512,height:512},{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(I$(u)),n==="inpainting"?e(LA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(LA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Hv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",lI="Konva error: ",K6e="rgb(",_6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,$y=[];const Z6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){$y.push(e),$y.length===1&&Z6e(function(){const t=$y;$y=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,j6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Y_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Mg+a(t),l=Og+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Mg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(uI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=cI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];cn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Wy="allEventListeners",ru="absoluteTransform",dI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",o8="listening",fI="mouseenter",hI="mouseleave",pI="set",gI="Shape",R3=" ",mI="stage",_c="transform",gwe="Stage",a8="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===_c||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===_c||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new Z_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(O3),this._clearSelfAndDescendantCache(dI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==hwe&&(r=pI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(o8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(a8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==gwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_c),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(_c);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(_c),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(O3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;cn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Pp=e=>{const t=nm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function yI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",N3=[];class lx extends aa{constructor(t){super(yI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{yI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===bwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new S0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+vI,this.content.style.height=n+vI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rwwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Mm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Pp(t.type),r=nm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Pp(t.type),r=nm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Pp(t.type),r=nm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Pp(t.type),r=nm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(l8,{evt:t}):this._fire(l8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,X_(t)),Mm(t.pointerId)}_lostpointercapture(t){Mm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Z_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let qy;function P6(){return qy||(qy=fe.createCanvasElement().getContext("2d"),qy)}const Om={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Om)););this.colorKey=n,Om[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Om[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Mm(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Y_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new Z_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class Q_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Q_.prototype.nodeType="FastLayer";gr(Q_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=bI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=xI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===bI?this.setTime(t):this.state===xI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Rm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Bwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Rm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function u8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function wI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",c8="up",d8="right",f8="down",h8="left",Uwe=cW.length;class J_ extends V0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var CI=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,CI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),CI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Yy;function A6(){return Yy||(Yy=fe.createCanvasElement().getContext(qwe),Yy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Ky+this.fontVariant()+Ky+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==EI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Ky||te===_I;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Ky),z.lastIndexOf(_I))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==EI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+T6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),PI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function bW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(PI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(PI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Jv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function TI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new TI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||T[H]!==M[se]){var he=` -`+T[H].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=se);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Nl(d):""}var Ch=Object.prototype.hasOwnProperty,Ru=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Ru[Rs],Ru[Rs]=null,Rs--)}function bn(d,f){Rs++,Ru[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var T={},M;for(M in y)T[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function zl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var T in _)if(!(T in f))throw Error(a(108,z(d)||"Unknown",T));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ad(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=zl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Id,_h=Math.log,kh=Math.LN2;function Id(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var Ds=64,co=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Bl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,T=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~T;se!==0?_=zs(se):(M&=H,M!==0&&(_=zs(M)))}else H=y&~T,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&T)===0&&(T=_&-_,M=f&-f,T>=M||T===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,T-=H,Gi=1<<32-gi(f)+T|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var Kt=Ye(ge,kt,be[Ft],We);if(Kt===null){kt===null&&(kt=Br);break}d&&kt&&Kt.alternate===null&&f(ge,kt),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,Kt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Tt===null?Le=ns:Tt.sibling=ns,Tt=ns,kt=Br}if(Kt.done)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;!Kt.done;Ft++,Kt=be.next())Kt=Lt(ge,Kt.value,We),Kt!==null&&(ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return zn&&Bs(ge,Ft),Le}for(kt=_(ge,kt);!Kt.done;Ft++,Kt=be.next())Kt=Fn(kt,ge,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&kt.delete(Kt.key===null?Ft:Kt.key),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Le}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Le=be.key,Tt=ue;Tt!==null;){if(Tt.key===Le){if(Le=be.type,Le===h){if(Tt.tag===7){y(ge,Tt.sibling),ue=T(Tt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Tt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===L&&A1(Le)===Tt.type){y(ge,Tt.sibling),ue=T(Tt,be.props),ue.ref=ba(ge,Tt,be),ue.return=ge,ge=ue;break e}y(ge,Tt);break}else f(ge,Tt);Tt=Tt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=lf(be.type,be.key,be.props,null,ge.mode,We),We.ref=ba(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Tt=be.key;ue!==null;){if(ue.key===Tt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=T(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case L:return Tt=be._init,Ko(ge,ue,Tt(be._payload),We)}if(ie(be))return Ln(ge,ue,be,We);if(R(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=T(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var ju=d2(!0),f2=d2(!1),Ud={},go=No(Ud),xa=No(Ud),oe=No(Ud);function xe(d){if(d===Ud)throw Error(a(174));return d}function ve(d,f){bn(oe,f),bn(xa,d),bn(go,Ud),d=G(f),Pn(go),bn(go,d)}function Ke(){Pn(go),Pn(xa),Pn(oe)}function _t(d){var f=xe(oe.current),y=xe(go.current);f=W(y,d.type,f),y!==f&&(bn(xa,d),bn(go,f))}function Jt(d){xa.current===d&&(Pn(go),Pn(xa))}var Ot=No(0);function un(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Mu(y)||Ld(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var jd=[];function I1(){for(var d=0;dy?y:4,d(!0);var _=Gu.transition;Gu.transition={};try{d(!1),f()}finally{Ht=y,Gu.transition=_}}function Ju(){return yi().memoizedState}function F1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},tc(d))nc(f,y);else if(y=Uu(d,f,y,_),y!==null){var T=ai();yo(y,d,_,T),Xd(y,f,_)}}function ec(d,f,y){var _=Ar(d),T={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(tc(d))nc(f,T);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,se=M(H,y);if(T.hasEagerState=!0,T.eagerState=se,U(se,H)){var he=f.interleaved;he===null?(T.next=T,Wd(f)):(T.next=he.next,he.next=T),f.interleaved=T;return}}catch{}finally{}y=Uu(d,f,T,_),y!==null&&(T=ai(),yo(y,d,_,T),Xd(y,f,_))}}function tc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function nc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Fl(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},px={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:g2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Vl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Vl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Vl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=F1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:p2,useDebugValue:D1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=p2(!1),f=d[0];return d=B1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,T=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Wl&30)!==0||N1(_,f,y)}T.memoizedState=y;var M={value:y,getSnapshot:f};return T.queue=M,g2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Yd(9,Xu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=qu++,0")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=se);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Nl(d):""}var Ch=Object.prototype.hasOwnProperty,Ru=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Ru[Rs],Ru[Rs]=null,Rs--)}function bn(d,f){Rs++,Ru[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var T={},M;for(M in y)T[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function zl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var T in _)if(!(T in f))throw Error(a(108,z(d)||"Unknown",T));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ad(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=zl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Id,_h=Math.log,kh=Math.LN2;function Id(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var Ds=64,co=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Bl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,T=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~T;se!==0?_=zs(se):(M&=H,M!==0&&(_=zs(M)))}else H=y&~T,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&T)===0&&(T=_&-_,M=f&-f,T>=M||T===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,T-=H,Gi=1<<32-gi(f)+T|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var Kt=Ye(ge,kt,be[Ft],We);if(Kt===null){kt===null&&(kt=Br);break}d&&kt&&Kt.alternate===null&&f(ge,kt),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,Kt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Tt===null?Le=ns:Tt.sibling=ns,Tt=ns,kt=Br}if(Kt.done)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;!Kt.done;Ft++,Kt=be.next())Kt=Lt(ge,Kt.value,We),Kt!==null&&(ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return zn&&Bs(ge,Ft),Le}for(kt=_(ge,kt);!Kt.done;Ft++,Kt=be.next())Kt=Fn(kt,ge,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&kt.delete(Kt.key===null?Ft:Kt.key),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Le}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Le=be.key,Tt=ue;Tt!==null;){if(Tt.key===Le){if(Le=be.type,Le===h){if(Tt.tag===7){y(ge,Tt.sibling),ue=T(Tt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Tt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===L&&A1(Le)===Tt.type){y(ge,Tt.sibling),ue=T(Tt,be.props),ue.ref=ba(ge,Tt,be),ue.return=ge,ge=ue;break e}y(ge,Tt);break}else f(ge,Tt);Tt=Tt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=lf(be.type,be.key,be.props,null,ge.mode,We),We.ref=ba(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Tt=be.key;ue!==null;){if(ue.key===Tt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=T(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case L:return Tt=be._init,Ko(ge,ue,Tt(be._payload),We)}if(ie(be))return Ln(ge,ue,be,We);if(R(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=T(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var ju=c2(!0),d2=c2(!1),Ud={},go=No(Ud),xa=No(Ud),oe=No(Ud);function xe(d){if(d===Ud)throw Error(a(174));return d}function ve(d,f){bn(oe,f),bn(xa,d),bn(go,Ud),d=G(f),Pn(go),bn(go,d)}function Ke(){Pn(go),Pn(xa),Pn(oe)}function _t(d){var f=xe(oe.current),y=xe(go.current);f=W(y,d.type,f),y!==f&&(bn(xa,d),bn(go,f))}function Jt(d){xa.current===d&&(Pn(go),Pn(xa))}var Ot=No(0);function un(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Mu(y)||Ld(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var jd=[];function I1(){for(var d=0;dy?y:4,d(!0);var _=Gu.transition;Gu.transition={};try{d(!1),f()}finally{Ht=y,Gu.transition=_}}function Ju(){return yi().memoizedState}function F1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},tc(d))nc(f,y);else if(y=Uu(d,f,y,_),y!==null){var T=ai();yo(y,d,_,T),Xd(y,f,_)}}function ec(d,f,y){var _=Ar(d),T={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(tc(d))nc(f,T);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,se=M(H,y);if(T.hasEagerState=!0,T.eagerState=se,U(se,H)){var he=f.interleaved;he===null?(T.next=T,Wd(f)):(T.next=he.next,he.next=T),f.interleaved=T;return}}catch{}finally{}y=Uu(d,f,T,_),y!==null&&(T=ai(),yo(y,d,_,T),Xd(y,f,_))}}function tc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function nc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Fl(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},px={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:p2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Vl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Vl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Vl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=F1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:h2,useDebugValue:D1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=h2(!1),f=d[0];return d=B1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,T=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Wl&30)!==0||N1(_,f,y)}T.memoizedState=y;var M={value:y,getSnapshot:f};return T.queue=M,p2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Yd(9,Xu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=qu++,0np&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304)}else{if(!_)if(d=un(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),oc(T,!0),T.tail===null&&T.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Vn()-T.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304);T.isBackwards?(M.sibling=f.child,f.child=M):(d=T.last,d!==null?d.sibling=M:f.child=M,T.last=M)}return T.tail!==null?(f=T.tail,T.rendering=f,T.tail=f.sibling,T.renderingStartTime=Vn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return pc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),it&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function q1(d,f){switch(E1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),I1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Hu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return $d(f.type._context),null;case 22:case 23:return pc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,xx=typeof WeakSet=="function"?WeakSet:Set,Je=null;function ac(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Vh=!1;function jl(d,f){for(q(d.containerInfo),Je=f;Je!==null;)if(d=Je,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Je=f;else for(;Je!==null;){d=Je;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),T);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:it&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){jn(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Je=f;break}Je=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var T=_=_.next;do{if((T.tag&d)===d){var M=T.destroy;T.destroy=void 0,M!==void 0&&Uo(f,y,M)}T=T.next}while(T!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=le(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function K1(d){var f=d.alternate;f!==null&&(d.alternate=null,K1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function sc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||sc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Gh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Fe(y,d,f):At(y,d);else if(_!==4&&(d=d.child,d!==null))for(Gh(d,f,y),d=d.sibling;d!==null;)Gh(d,f,y),d=d.sibling}function Y1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(Y1(d,f,y),d=d.sibling;d!==null;)Y1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Lr(d,f,y),y=y.sibling}function Lr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(ln,y)}catch{}switch(y.tag){case 5:Pr||ac(y,f);case 6:if(it){var _=br,T=jo;br=null,Go(d,f,y),br=_,jo=T,br!==null&&(jo?nt(br,y.stateNode):gt(br,y.stateNode))}else Go(d,f,y);break;case 18:it&&br!==null&&(jo?S1(br,y.stateNode):x1(br,y.stateNode));break;case 4:it?(_=br,T=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=T):(It&&(_=y.stateNode.containerInfo,T=ga(_),Iu(_,T)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){T=_=_.next;do{var M=T,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),T=T.next}while(T!==_)}Go(d,f,y);break;case 1:if(!Pr&&(ac(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){jn(y,f,se)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new xx),f.forEach(function(_){var T=O2.bind(null,d,_);y.has(_)||(y.add(_),_.then(T,T))})}}function mo(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Xh:return":has("+(Q1(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case lc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function uc(d,f){var y=[];d=[d,0];for(var _=0;_T&&(T=H),_&=~M}if(_=T,_=Vn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Sx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Vn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=fc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=gc(d,f),d!==2&&(f=xi,xi=y,f!==null&&sp(f)),d}function sp(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Bt&6)!==0)throw Error(a(331));var T=Bt;for(Bt|=4,Je=d.current;Je!==null;){var M=Je,H=M.child;if((Je.flags&16)!==0){var se=M.deletions;if(se!==null){for(var he=0;heVn()-tg?Ys(d,0):eg|=y),Yr(d,f)}function ag(d,f){f===0&&((d.mode&1)===0?f=1:(f=co,co<<=1,(co&130023424)===0&&(co=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function Cx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ag(d,y)}function O2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ag(d,y)}var sg;sg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,yx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&k1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var T=Ns(f,kr.current);Vu(f,y),T=O1(null,f,_,d,T,y);var M=Ku();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,L1(f),T.updater=Ho,f.stateNode=T,T._reactInternals=f,T1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,T,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,T=_._init,_=T(_._payload),f.type=_,T=f.tag=cp(_),d=Fo(_,d),T){case 0:f=W1(null,f,_,d,y);break e;case 1:f=_2(null,f,_,d,y);break e;case 11:f=x2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),W1(d,f,_,T,y);case 1:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),_2(d,f,_,T,y);case 3:e:{if(k2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,T=M.element,s2(d,f),Rh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){T=rc(Error(a(423)),f),f=E2(d,f,_,y,T);break e}else if(_!==T){T=rc(Error(a(424)),f),f=E2(d,f,_,y,T);break e}else for(wt&&(ho=h1(f.stateNode.containerInfo),Un=f,zn=!0,Ni=null,po=!1),y=f2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Hu(),_===T){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Dd(f),_=f.type,T=f.pendingProps,M=d!==null?d.memoizedProps:null,H=T.children,He(_,T)?H=null:M!==null&&He(_,M)&&(f.flags|=32),C2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Dd(f),null;case 13:return P2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=ju(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),x2(d,f,_,T,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,T=f.pendingProps,M=f.memoizedProps,H=T.value,a2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===T.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var se=M.dependencies;if(se!==null){H=M.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var tt=Re.pending;tt===null?he.next=he:(he.next=tt.next,tt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),Hd(M.return,y,f),se.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),Hd(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,_=f.pendingProps.children,Vu(f,y),T=qi(T),_=_(T),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,T=Fo(_,f.pendingProps),T=Fo(_.type,T),Ws(d,f,_,T,y);case 15:return S2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Vu(f,y),u2(f,_,T),T1(f,_,T,y),Wo(null,f,_,!0,d,y);case 19:return T2(d,f,y);case 22:return w2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Bu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bo(d,f,y,_){return new wa(d,f,y,_)}function lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=bo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function lf(d,f,y,_,T,M){var H=2;if(_=d,typeof d=="function")lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,T,M,f);case g:H=8,T|=8;break;case m:return d=bo(12,y,f,T|2),d.elementType=m,d.lanes=M,d;case E:return d=bo(13,y,f,T),d.elementType=E,d.lanes=M,d;case P:return d=bo(19,y,f,T),d.elementType=P,d.lanes=M,d;case I:return dp(y,T,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case L:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=bo(H,y,f,T),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=bo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=bo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=bo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=bo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function uf(d,f,y,_,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zu(0),this.expirationTimes=zu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zu(0),this.identifierPrefix=_,this.onRecoverableError=T,wt&&(this.mutableSourceEagerHydrationData=null)}function R2(d,f,y,_,T,M,H,se,he){return d=new uf(d,f,y,se,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=bo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},L1(M),d}function ug(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return zl(d,y,f)}return f}function cg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function cf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Lt&&T<=tt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Lt||y.height!==he.height||tt<_||Re>T)){Re>_&&(he.width+=Re-_,he.x=_),ttM&&(he.height+=Lt-M,he.y=M),Yey&&(y=H)),Hnp&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304)}else{if(!_)if(d=un(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),oc(T,!0),T.tail===null&&T.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-T.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304);T.isBackwards?(M.sibling=f.child,f.child=M):(d=T.last,d!==null?d.sibling=M:f.child=M,T.last=M)}return T.tail!==null?(f=T.tail,T.rendering=f,T.tail=f.sibling,T.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return pc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),it&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function q1(d,f){switch(E1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),I1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Hu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return $d(f.type._context),null;case 22:case 23:return pc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,xx=typeof WeakSet=="function"?WeakSet:Set,Je=null;function ac(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Vh=!1;function jl(d,f){for(q(d.containerInfo),Je=f;Je!==null;)if(d=Je,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Je=f;else for(;Je!==null;){d=Je;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),T);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:it&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Je=f;break}Je=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var T=_=_.next;do{if((T.tag&d)===d){var M=T.destroy;T.destroy=void 0,M!==void 0&&Uo(f,y,M)}T=T.next}while(T!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=le(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function K1(d){var f=d.alternate;f!==null&&(d.alternate=null,K1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function sc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||sc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Gh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Fe(y,d,f):At(y,d);else if(_!==4&&(d=d.child,d!==null))for(Gh(d,f,y),d=d.sibling;d!==null;)Gh(d,f,y),d=d.sibling}function Y1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(Y1(d,f,y),d=d.sibling;d!==null;)Y1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Lr(d,f,y),y=y.sibling}function Lr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(ln,y)}catch{}switch(y.tag){case 5:Pr||ac(y,f);case 6:if(it){var _=br,T=jo;br=null,Go(d,f,y),br=_,jo=T,br!==null&&(jo?nt(br,y.stateNode):gt(br,y.stateNode))}else Go(d,f,y);break;case 18:it&&br!==null&&(jo?S1(br,y.stateNode):x1(br,y.stateNode));break;case 4:it?(_=br,T=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=T):(It&&(_=y.stateNode.containerInfo,T=ga(_),Iu(_,T)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){T=_=_.next;do{var M=T,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),T=T.next}while(T!==_)}Go(d,f,y);break;case 1:if(!Pr&&(ac(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new xx),f.forEach(function(_){var T=M2.bind(null,d,_);y.has(_)||(y.add(_),_.then(T,T))})}}function mo(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Xh:return":has("+(Q1(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case lc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function uc(d,f){var y=[];d=[d,0];for(var _=0;_T&&(T=H),_&=~M}if(_=T,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Sx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=fc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=gc(d,f),d!==2&&(f=xi,xi=y,f!==null&&sp(f)),d}function sp(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Bt&6)!==0)throw Error(a(331));var T=Bt;for(Bt|=4,Je=d.current;Je!==null;){var M=Je,H=M.child;if((Je.flags&16)!==0){var se=M.deletions;if(se!==null){for(var he=0;heWn()-tg?Ys(d,0):eg|=y),Yr(d,f)}function ag(d,f){f===0&&((d.mode&1)===0?f=1:(f=co,co<<=1,(co&130023424)===0&&(co=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function Cx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ag(d,y)}function M2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ag(d,y)}var sg;sg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,yx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&k1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var T=Ns(f,kr.current);Vu(f,y),T=O1(null,f,_,d,T,y);var M=Ku();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,L1(f),T.updater=Ho,f.stateNode=T,T._reactInternals=f,T1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,T,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,T=_._init,_=T(_._payload),f.type=_,T=f.tag=cp(_),d=Fo(_,d),T){case 0:f=W1(null,f,_,d,y);break e;case 1:f=C2(null,f,_,d,y);break e;case 11:f=b2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),W1(d,f,_,T,y);case 1:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),C2(d,f,_,T,y);case 3:e:{if(_2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,T=M.element,a2(d,f),Rh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){T=rc(Error(a(423)),f),f=k2(d,f,_,y,T);break e}else if(_!==T){T=rc(Error(a(424)),f),f=k2(d,f,_,y,T);break e}else for(wt&&(ho=h1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,po=!1),y=d2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Hu(),_===T){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Dd(f),_=f.type,T=f.pendingProps,M=d!==null?d.memoizedProps:null,H=T.children,He(_,T)?H=null:M!==null&&He(_,M)&&(f.flags|=32),w2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Dd(f),null;case 13:return E2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=ju(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),b2(d,f,_,T,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,T=f.pendingProps,M=f.memoizedProps,H=T.value,o2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===T.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var se=M.dependencies;if(se!==null){H=M.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var tt=Re.pending;tt===null?he.next=he:(he.next=tt.next,tt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),Hd(M.return,y,f),se.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),Hd(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,_=f.pendingProps.children,Vu(f,y),T=qi(T),_=_(T),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,T=Fo(_,f.pendingProps),T=Fo(_.type,T),Ws(d,f,_,T,y);case 15:return x2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Vu(f,y),l2(f,_,T),T1(f,_,T,y),Wo(null,f,_,!0,d,y);case 19:return L2(d,f,y);case 22:return S2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Bu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bo(d,f,y,_){return new wa(d,f,y,_)}function lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=bo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function lf(d,f,y,_,T,M){var H=2;if(_=d,typeof d=="function")lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,T,M,f);case g:H=8,T|=8;break;case m:return d=bo(12,y,f,T|2),d.elementType=m,d.lanes=M,d;case E:return d=bo(13,y,f,T),d.elementType=E,d.lanes=M,d;case P:return d=bo(19,y,f,T),d.elementType=P,d.lanes=M,d;case I:return dp(y,T,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case L:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=bo(H,y,f,T),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=bo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=bo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=bo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=bo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function uf(d,f,y,_,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zu(0),this.expirationTimes=zu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zu(0),this.identifierPrefix=_,this.onRecoverableError=T,wt&&(this.mutableSourceEagerHydrationData=null)}function O2(d,f,y,_,T,M,H,se,he){return d=new uf(d,f,y,se,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=bo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},L1(M),d}function ug(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return zl(d,y,f)}return f}function cg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function cf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Lt&&T<=tt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Lt||y.height!==he.height||tt<_||Re>T)){Re>_&&(he.width+=Re-_,he.x=_),ttM&&(he.height+=Lt-M,he.y=M),Yey&&(y=H)),H ")+` No matching component was found for: @@ -507,7 +507,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/256 `,Z9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 -`,X9e={};function ux(e,t,n=X9e){if(!II&&"zIndex"in t&&(console.warn(Z9e),II=!0),!MI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),MI=!0)}for(var o in n)if(!AI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!AI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ed(e));for(var l in v)e.on(l+tk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ed(e)}function e8e(e,t,n){let r=eh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=eh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ux(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return SW}function d8e(){return SW}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function x8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function S8e(e,t,n){wW(e,t,n)}function w8e(e,t){t.destroy(),t.off(tk),Ed(e)}function C8e(e,t){t.destroy(),t.off(tk),Ed(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){ux(e,i,r)}function P8e(e){e.hide(),Ed(e)}function L8e(e){}function T8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function I8e(e){}function M8e(){}const O8e=()=>ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:x8e,insertBefore:wW,insertInContainerBefore:S8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:L8e,unhideInstance:T8e,unhideTextInstance:A8e,clearContainer:I8e,detachDeletedInstance:M8e,getCurrentEventPriority:O8e,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,OI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,RI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&RI(e,n,t[n]);if(OI)for(var n of OI(t))F8e.call(t,n)&&RI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function nk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=nk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const rk=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(rk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(rk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:nk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],DI=new WeakMap;function U8e(){var e;const t=V8e();Bg.splice(0,Bg.length),nk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==rk&&Bg.push(CW(i))});for(const n of Bg){const r=(e=W8e.current)==null?void 0:e.readContext(n);DI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(NI({},i),{value:DI.get(r)}))),n=>x(_W,{...NI({},n)})),[])}function j8e(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const G8e=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=j8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=im.createContainer(n.current,ek.exports.LegacyRoot,!1,null),im.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),im.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),im.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Fg="Layer",dd="Group",w0="Rect",$g="Circle",i5="Line",kW="Image",q8e="Transformer",im=K9e(R8e);im.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const K8e=re.forwardRef((e,t)=>x(_W,{children:x(G8e,{...e,forwardedRef:t})})),Y8e=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=e=>{const{...t}=e,n=Ce(Y8e);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ik=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},X8e=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ik(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(X8e);return l?ee(dd,{listening:!1,...t,children:[x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=Qe(jt,qb,Xv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),eCe=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(J8e),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Iy(W,64),X=Iy(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v&&b!=="outpainting")return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,b,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Qg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Iy(W.x,O)+Q,ye=Iy(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v&&b!=="outpainting"||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[b,v,g.height,g.width]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(My(!1))},j=()=>{n(AA(!0))},te=()=>{n(g6(!1)),n(AA(!1)),n(My(!1))},ie=()=>{n(My(!0))},le=()=>{!u&&!l&&n(My(!1))};return ee(dd,{...t,children:[x(w0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(w0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(w0,{...b==="inpainting"?{dragBoundFunc:D}:{},listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(q8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},tCe=Qe([jt,vn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),nCe=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(tCe),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},rCe=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ik(t)}}),zI=e=>`data:image/svg+xml;utf8, +`,X9e={};function ux(e,t,n=X9e){if(!II&&"zIndex"in t&&(console.warn(Z9e),II=!0),!MI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),MI=!0)}for(var o in n)if(!AI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!AI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ed(e));for(var l in v)e.on(l+tk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ed(e)}function e8e(e,t,n){let r=eh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=eh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ux(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return SW}function d8e(){return SW}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function x8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function S8e(e,t,n){wW(e,t,n)}function w8e(e,t){t.destroy(),t.off(tk),Ed(e)}function C8e(e,t){t.destroy(),t.off(tk),Ed(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){ux(e,i,r)}function P8e(e){e.hide(),Ed(e)}function L8e(e){}function T8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function I8e(e){}function M8e(){}const O8e=()=>ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:x8e,insertBefore:wW,insertInContainerBefore:S8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:L8e,unhideInstance:T8e,unhideTextInstance:A8e,clearContainer:I8e,detachDeletedInstance:M8e,getCurrentEventPriority:O8e,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,OI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,RI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&RI(e,n,t[n]);if(OI)for(var n of OI(t))F8e.call(t,n)&&RI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function nk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=nk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const rk=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(rk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(rk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:nk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],DI=new WeakMap;function U8e(){var e;const t=V8e();Bg.splice(0,Bg.length),nk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==rk&&Bg.push(CW(i))});for(const n of Bg){const r=(e=W8e.current)==null?void 0:e.readContext(n);DI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(NI({},i),{value:DI.get(r)}))),n=>x(_W,{...NI({},n)})),[])}function j8e(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const G8e=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=j8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=rm.createContainer(n.current,ek.exports.LegacyRoot,!1,null),rm.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),rm.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),rm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Xy="Layer",dd="Group",w0="Rect",Fg="Circle",i5="Line",kW="Image",q8e="Transformer",rm=K9e(R8e);rm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const K8e=re.forwardRef((e,t)=>x(_W,{children:x(G8e,{...e,forwardedRef:t})})),Y8e=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=e=>{const{...t}=e,n=Ce(Y8e);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ik=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},X8e=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ik(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(X8e);return l?ee(dd,{listening:!1,...t,children:[x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=Qe(jt,qb,Zv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),eCe=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(J8e),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Ay(W,64),X=Ay(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v&&b!=="outpainting")return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,b,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Xg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Ay(W.x,O)+Q,ye=Ay(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v&&b!=="outpainting"||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[b,v,g.height,g.width]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(Iy(!1))},j=()=>{n(AA(!0))},te=()=>{n(g6(!1)),n(AA(!1)),n(Iy(!1))},ie=()=>{n(Iy(!0))},le=()=>{!u&&!l&&n(Iy(!1))};return ee(dd,{...t,children:[x(w0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(w0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(w0,{...b==="inpainting"?{dragBoundFunc:D}:{},listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(q8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},tCe=Qe([jt,vn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),nCe=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(tCe),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},rCe=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ik(t)}}),zI=e=>`data:image/svg+xml;utf8, @@ -585,9 +585,9 @@ For more info see: https://github.com/konvajs/react-konva/issues/194 -`.replaceAll("black",e),iCe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(rCe),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=zI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=zI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x&&r.y&&o&&i.width&&i.height?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},oCe=.999,aCe=.1,sCe=20,lCe=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),uCe=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(lCe);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*oCe**l,aCe,sCe),h={x:a.x-s.x*u,y:a.y-s.y*u};t(I$(u)),t(R$(h))},[i,t,n,e,r])},cx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},cCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),dCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(cCe);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},fCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),hCe=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(fCe);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(_$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},pCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),gCe=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(pCe);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(T$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(_$([s.x,s.y]))))},[t,r,i,a,n,e,o])},mCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),vCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(mCe);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},yCe=()=>{const e=$e();return C.exports.useCallback(()=>{e(T$(null)),e(Gb(!1))},[e])},bCe=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),xCe=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(bCe);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(R$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,SCe=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),vf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const EW=e=>{const{url:t,x:n,y:r}=e,[i]=SCe(t);return x(kW,{x:n,y:r,image:i,listening:!1})},wCe=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),CCe=()=>{const{objects:e}=Ce(wCe);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ik(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},_Ce=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),kCe=()=>{const{colorMode:e}=Iv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_Ce),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},ECe=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),PCe=e=>{const{...t}=e,n=Ce(ECe),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hg=e=>Math.round(e*100)/100,LCe=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),TCe=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(LCe);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Hg(n)}, ${Hg(r)}`}),x("div",{children:`Scale: ${Hg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Hg(a)}, ${Hg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var ACe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},MCe=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=ACe(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&ICe(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},OCe=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),RCe=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(OCe),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(MCe,{children:x(HR,{value:wV,children:x(pF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(g$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},NCe=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"||n?v?w="grabbing":w="grab":s?w=void 0:l?w="move":w="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h}=Ce(NCe);nCe(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const g=C.exports.useRef({x:0,y:0}),m=C.exports.useRef(!1),v=uCe(kc),b=dCe(kc),w=hCe(kc,m),E=gCe(kc,m,g),P=vCe(kc),k=yCe(),{handleDragStart:L,handleDragMove:I,handleDragEnd:O}=xCe();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(K8e,{tabIndex:-1,ref:kc,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onMouseDown:b,onMouseEnter:P,onMouseLeave:k,onMouseMove:E,onMouseOut:k,onMouseUp:w,onDragStart:L,onDragMove:I,onDragEnd:O,onWheel:v,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Fg,{id:"grid",visible:r,children:x(kCe,{})}),ee(Fg,{id:"image",ref:au,listening:!1,imageSmoothingEnabled:!1,children:[x(CCe,{}),x(PCe,{})]}),ee(Fg,{id:"mask",visible:e,listening:!1,children:[x(Z8e,{visible:!0,listening:!1}),x(iCe,{listening:!1})]}),x(Fg,{id:"tool",children:!h&&ee(Hn,{children:[x(eCe,{visible:n}),x(Q8e,{visible:l!=="move",listening:!1})]})}),x(Fg,{imageSmoothingEnabled:!1,children:h&&x(RCe,{})})]}),u&&x(TCe,{})]})})},DCe=Qe([Xv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),zCe=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(DCe);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function BCe(){const e=$e();return C.exports.useEffect(()=>{e(N$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(zCe,{})})}function FCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $Ce=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(F_,{})})});function HCe(){return x(rx,{optionsPanel:x(FCe,{}),children:x($Ce,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function WCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function VCe(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(B_())},g=()=>{e(z_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Hn,{children:[x(WCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function UCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const jCe=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),GCe=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(jCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(M$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},qCe=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),KCe=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(qCe),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(y$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},YCe=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(YCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(w$(o))})}),x(K_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},XCe=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(XCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(L$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(E$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(k$(o.target.checked))}),x(K_,{color:n,onChange:o=>e(P$(o))})]})})},JCe=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(JCe);return ee("div",{className:"inpainting-settings",children:[x(QCe,{}),ee(ro,{isAttached:!0,children:[x(ZCe,{}),x(KCe,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(D$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(v$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(GCe,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const r=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(N$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(UCe,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(HCe,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(BCe,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(uF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(sF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(aF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(lF,{className:"app-tabs-panels",children:t?x(VCe,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...IW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=dx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:t2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:p8,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:_v,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):BI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):BI(new Blob([t]),r):r(Tl[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",om=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,H7e={};let $I=0,Jy=0,HI;function WI(e){let t="";do t=QW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function JW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Jy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};O7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),hx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=ZW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,UI=!0,q7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:ZW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&rV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JW()),this.supportsBinary||(t.b64=1);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),hx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=W7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ok(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class u_e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:ak},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(d_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}s1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new s1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||c_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Wg[i]&&o in Wg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(Wg[i]||(Wg[i]=new w8(r,t)),l=Wg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:w8,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Co={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(CA(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(IA("user")):t(V9("user")),r.categories.result.latest_mtime?t(IA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(CA(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(Oy({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Oy({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(NA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Oy({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(NA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(Oy({image:a,category:"user"})),i){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(d6("Model Changed")),t(y0(!1)),t(kA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(y0(!1)),t(kA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},x_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?l$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(i==="inpainting"){const w=Xv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=xF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=$F.getPersistConfig({key:"root",storage:FF,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Wv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(WB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(bv,{}),ee(yv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(yz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(bv,{}),ee(yv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(c$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(bv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(yv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(d$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Iv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(d$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Hn,{children:[n&&x(rH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(m$,{}),onClick:l})})]})};function Q_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var J_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function n2(e,t){var n=eke(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return k8(e.target.files).map(function(t){return n2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return n2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,YI(cV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return n2(o)}))]}})})}function YI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=pV(l,n),h=kv(u,1),g=h[0],m=gV(l,r,i),v=kv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;a`.replaceAll("black",e),iCe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(rCe),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=zI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=zI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x!==void 0&&r.y!==void 0&&o!==void 0&&i.width!==void 0&&i.height!==void 0?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},oCe=.999,aCe=.1,sCe=20,lCe=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),uCe=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(lCe);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*oCe**l,aCe,sCe),h={x:a.x-s.x*u,y:a.y-s.y*u};t(I$(u)),t(R$(h))},[i,t,n,e,r])},cx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},cCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),dCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(cCe);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},fCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),hCe=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(fCe);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(_$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},pCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),gCe=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(pCe);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(T$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(_$([s.x,s.y]))))},[t,r,i,a,n,e,o])},mCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),vCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(mCe);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},yCe=()=>{const e=$e();return C.exports.useCallback(()=>{e(T$(null)),e(Gb(!1))},[e])},bCe=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),xCe=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(bCe);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(R$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,SCe=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),vf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const EW=e=>{const{url:t,x:n,y:r}=e,[i]=SCe(t);return x(kW,{x:n,y:r,image:i,listening:!1})},wCe=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),CCe=()=>{const{objects:e}=Ce(wCe);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ik(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},_Ce=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),kCe=()=>{const{colorMode:e}=Av(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_Ce),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},ECe=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),PCe=e=>{const{...t}=e,n=Ce(ECe),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},$g=e=>Math.round(e*100)/100,LCe=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),TCe=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(LCe);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${$g(n)}, ${$g(r)}`}),x("div",{children:`Scale: ${$g(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${$g(a)}, ${$g(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var ACe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},MCe=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=ACe(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&ICe(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},OCe=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),RCe=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(OCe),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(MCe,{children:x(HR,{value:wV,children:x(pF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(g$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},NCe=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v,shouldShowIntermediates:b}=e,{shouldShowGrid:w}=t;let E="";return m==="move"||n?v?E="grabbing":E="grab":s?E=void 0:l?E="move":E="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:w,stageCoordinates:g,stageCursor:E,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n,shouldShowIntermediates:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h,shouldShowIntermediates:g}=Ce(NCe);nCe(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const m=C.exports.useRef({x:0,y:0}),v=C.exports.useRef(!1),b=uCe(kc),w=dCe(kc),E=hCe(kc,v),P=gCe(kc,v,m),k=vCe(kc),L=yCe(),{handleDragStart:I,handleDragMove:O,handleDragEnd:R}=xCe();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(K8e,{tabIndex:-1,ref:kc,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onMouseDown:w,onMouseEnter:k,onMouseLeave:L,onMouseMove:P,onMouseOut:L,onMouseUp:E,onDragStart:I,onDragMove:O,onDragEnd:R,onWheel:b,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Xy,{id:"grid",visible:r,children:x(kCe,{})}),x(Xy,{id:"base",ref:au,listening:!1,imageSmoothingEnabled:!1,children:x(CCe,{})}),ee(Xy,{id:"mask",visible:e,listening:!1,children:[x(Z8e,{visible:!0,listening:!1}),x(iCe,{listening:!1})]}),ee(Xy,{id:"preview",imageSmoothingEnabled:!1,children:[!h&&x(Q8e,{visible:l!=="move",listening:!1}),h&&x(RCe,{}),g&&x(PCe,{}),!h&&x(eCe,{visible:n})]})]}),u&&x(TCe,{})]})})},DCe=Qe([Zv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),zCe=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(DCe);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function BCe(){const e=$e();return C.exports.useEffect(()=>{e(N$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(zCe,{})})}function FCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $Ce=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(F_,{})})});function HCe(){return x(rx,{optionsPanel:x(FCe,{}),children:x($Ce,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function WCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function VCe(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(B_())},g=()=>{e(z_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Kn,{children:[x(WCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function UCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const jCe=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),GCe=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(jCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(M$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},qCe=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),KCe=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(qCe),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(y$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},YCe=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(YCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(w$(o))})}),x(K_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},XCe=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(XCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(L$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(E$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(k$(o.target.checked))}),x(K_,{color:n,onChange:o=>e(P$(o))})]})})},JCe=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(JCe);return ee("div",{className:"inpainting-settings",children:[x(QCe,{}),ee(ro,{isAttached:!0,children:[x(ZCe,{}),x(KCe,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(D$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(v$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(GCe,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const r=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(N$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(UCe,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(HCe,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(BCe,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(uF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(sF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(aF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(lF,{className:"app-tabs-panels",children:t?x(VCe,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...IW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=dx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:e2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:p8,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:Cv,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):BI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):BI(new Blob([t]),r):r(Tl[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",im=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,H7e={};let $I=0,Jy=0,HI;function WI(e){let t="";do t=QW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function JW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Jy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};O7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),hx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=ZW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,UI=!0,q7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:ZW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&rV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JW()),this.supportsBinary||(t.b64=1);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),hx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=W7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ok(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class u_e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:ak},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(d_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}s1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new s1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||c_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Hg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Hg[i]&&o in Hg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(Hg[i]||(Hg[i]=new w8(r,t)),l=Hg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:w8,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Co={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(CA(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(IA("user")):t(V9("user")),r.categories.result.latest_mtime?t(IA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(CA(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(My({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(Cv(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(My({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(NA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(My({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(NA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(My({image:a,category:"user"})),i){case"img2img":{t(Cv(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(d6("Model Changed")),t(y0(!1)),t(kA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(y0(!1)),t(kA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},x_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?l$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(i==="inpainting"){const w=Zv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=xF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=$F.getPersistConfig({key:"root",storage:FF,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Hv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(WB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(yv,{}),ee(vv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(yz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(yv,{}),ee(vv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(c$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(yv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(vv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(d$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Av(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(d$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Kn,{children:[n&&x(rH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(m$,{}),onClick:l})})]})};function Q_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var J_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function t2(e,t){var n=eke(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return k8(e.target.files).map(function(t){return t2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return t2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,YI(cV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return t2(o)}))]}})})}function YI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=pV(l,n),h=_v(u,1),g=h[0],m=gV(l,r,i),v=_v(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Uke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var sk=C.exports.forwardRef(function(e,t){var n=e.children,r=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});sk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};sk.defaultProps=bV;sk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var T8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:iM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:iM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,T8),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",nM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",nM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(L8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=L8({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},T8),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},T8);default:return e}}function iM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` -`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(MA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(MA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(f$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Hn,{children:[x(B$,{iconButton:!0}),x($$,{}),x(F$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=IR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(HR,{value:wV,children:x(pF,{children:x(Jke,{})})})})})})); +`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(MA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(MA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(f$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Kn,{children:[x(B$,{iconButton:!0}),x($$,{}),x(F$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=IR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(HR,{value:wV,children:x(pF,{children:x(Jke,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 3f9aa0c552..1d5db213f0 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -10,6 +10,7 @@ <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development +<<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development @@ -28,6 +29,9 @@ ======= >>>>>>> Outpainting tab loads to empty canvas instead of upload +======= + +>>>>>>> Fixes wonky canvas layer ordering & compositing >>>>>>> Builds fresh bundle diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index a7bca897c7..4300ac32ff 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -55,6 +55,7 @@ const canvasSelector = createSelector( stageCoordinates, tool, isMovingStage, + shouldShowIntermediates, } = currentCanvas; const { shouldShowGrid } = outpaintingCanvas; @@ -87,6 +88,7 @@ const canvasSelector = createSelector( tool, isOnOutpaintingTab: activeTabName === 'outpainting', isStaging, + shouldShowIntermediates, }; }, { @@ -113,6 +115,7 @@ const IAICanvas = () => { tool, isOnOutpaintingTab, isStaging, + shouldShowIntermediates, } = useAppSelector(canvasSelector); useCanvasHotkeys(); @@ -176,31 +179,29 @@ const IAICanvas = () => { - - + {!isStaging && ( - <> - - - + )} - - {isStaging && } + {shouldShowIntermediates && } + {!isStaging && ( + + )} {isOnOutpaintingTab && } diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx index 798b6e85b1..45d2356ff6 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx @@ -151,11 +151,11 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { if ( !( fillPatternImage && - stageCoordinates.x && - stageCoordinates.y && - stageScale && - stageDimensions.width && - stageDimensions.height + stageCoordinates.x !== undefined && + stageCoordinates.y !== undefined && + stageScale !== undefined && + stageDimensions.width !== undefined && + stageDimensions.height !== undefined ) ) return null; From 0e7b735611591857e3bc2ef3f828b59fa85da632 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 10:40:06 +1100 Subject: [PATCH 049/220] Fixes error on inpainting paste back `TypeError: 'float' object cannot be interpreted as an integer` --- frontend/src/features/canvas/canvasSlice.ts | 130 ++------------------ 1 file changed, 7 insertions(+), 123 deletions(-) diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index cf4cfffd13..f179565a83 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -479,7 +479,11 @@ export const canvasSlice = createSlice({ }; }, setBoundingBoxCoordinates: (state, action: PayloadAction) => { - state[state.currentCanvas].boundingBoxCoordinates = action.payload; + const { x, y } = action.payload; + state[state.currentCanvas].boundingBoxCoordinates = { + x: Math.floor(x), + y: Math.floor(y), + }; }, setStageCoordinates: (state, action: PayloadAction) => { state[state.currentCanvas].stageCoordinates = action.payload; @@ -553,19 +557,8 @@ export const canvasSlice = createSlice({ if (!boundingBox || !image) return; - const { x, y } = boundingBox; - const { width, height } = image; - const currentCanvas = state.outpainting; - // const { - // x: stagingX, - // y: stagingY, - // width: stagingWidth, - // height: stagingHeight, - // images: stagedImages, - // } = currentCanvas.layerState.stagingArea; - currentCanvas.pastLayerStates.push(_.cloneDeep(currentCanvas.layerState)); if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { @@ -575,8 +568,8 @@ export const canvasSlice = createSlice({ currentCanvas.layerState.stagingArea.images.push({ kind: 'image', layer: 'base', - x, - y, + x: boundingBox.x, + y: boundingBox.y, image, }); @@ -584,115 +577,6 @@ export const canvasSlice = createSlice({ currentCanvas.layerState.stagingArea.images.length - 1; currentCanvas.futureLayerStates = []; - - // // If the new image is in the staging area region, push it to staging area - // if ( - // x === stagingX && - // y === stagingY && - // width === stagingWidth && - // height === stagingHeight - // ) { - // console.log('pushing new image to staging area images'); - // currentCanvas.pastLayerStates.push( - // _.cloneDeep(currentCanvas.layerState) - // ); - - // if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - // currentCanvas.pastLayerStates.shift(); - // } - - // currentCanvas.layerState.stagingArea.images.push({ - // kind: 'image', - // layer: 'base', - // x, - // y, - // image, - // }); - - // currentCanvas.layerState.stagingArea.selectedImageIndex = - // currentCanvas.layerState.stagingArea.images.length - 1; - - // currentCanvas.futureLayerStates = []; - // } - // // Else, if the staging area is empty, set it to this image - // else if (stagedImages.length === 0) { - // console.log('setting staging area image to be this one image'); - // // add new image to staging area - // currentCanvas.pastLayerStates.push( - // _.cloneDeep(currentCanvas.layerState) - // ); - - // if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - // currentCanvas.pastLayerStates.shift(); - // } - - // currentCanvas.layerState.stagingArea = { - // images: [ - // { - // kind: 'image', - // layer: 'base', - // x, - // y, - // image, - // }, - // ], - // x, - // y, - // width: image.width, - // height: image.height, - // selectedImageIndex: 0, - // }; - - // currentCanvas.futureLayerStates = []; - // } else { - // // commit the current staging area image & set the new image as the only staging area image - // currentCanvas.pastLayerStates.push( - // _.cloneDeep(currentCanvas.layerState) - // ); - - // if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - // currentCanvas.pastLayerStates.shift(); - // } - - // if (stagedImages.length === 1) { - // // commit the current staging area image - // console.log('committing current image'); - - // const { - // x: currentStagedX, - // y: currentStagedY, - // image: currentStagedImage, - // } = stagedImages[0]; - - // currentCanvas.layerState.objects.push({ - // kind: 'image', - // layer: 'base', - // x: currentStagedX, - // y: currentStagedY, - // image: currentStagedImage, - // }); - // } - - // console.log('setting staging area to this singel new image'); - // currentCanvas.layerState.stagingArea = { - // images: [ - // { - // kind: 'image', - // layer: 'base', - // x, - // y, - // image, - // }, - // ], - // x, - // y, - // width: image.width, - // height: image.height, - // selectedImageIndex: 0, - // }; - - // currentCanvas.futureLayerStates = []; - // } }, discardStagedImages: (state) => { const currentCanvas = state[state.currentCanvas]; From 82f6402d0493a4517930673107163b305dc84e28 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 12:28:59 +1100 Subject: [PATCH 050/220] Hides staging area outline on mouseover prev/next --- .../features/canvas/IAICanvasStagingArea.tsx | 64 ++++++++++++------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/IAICanvasStagingArea.tsx index fc80a26b07..55a0505204 100644 --- a/frontend/src/features/canvas/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/IAICanvasStagingArea.tsx @@ -7,7 +7,7 @@ import IAIIconButton from 'common/components/IAIIconButton'; import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; import { emotionCache } from 'main'; -import { useState } from 'react'; +import { useCallback, useState } from 'react'; import { FaArrowLeft, FaArrowRight, @@ -61,6 +61,17 @@ const IAICanvasStagingArea = (props: Props) => { const [shouldShowStagedImage, setShouldShowStagedImage] = useState(true); + const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = + useState(true); + + const handleMouseOver = useCallback(() => { + setShouldShowStagingAreaOutline(false); + }, []); + + const handleMouseOut = useCallback(() => { + setShouldShowStagingAreaOutline(true); + }, []); + if (!currentStagingAreaImage) return null; const { @@ -71,29 +82,30 @@ const IAICanvasStagingArea = (props: Props) => { return ( - - {shouldShowStagedImage && } - - - - + {shouldShowStagedImage && } + {shouldShowStagingAreaOutline && ( + + + + + )} @@ -113,6 +125,8 @@ const IAICanvasStagingArea = (props: Props) => { aria-label="Previous" icon={} onClick={() => dispatch(prevStagingAreaImage())} + onMouseOver={handleMouseOver} + onMouseOut={handleMouseOut} data-selected={true} isDisabled={isOnFirstImage} /> @@ -122,6 +136,8 @@ const IAICanvasStagingArea = (props: Props) => { aria-label="Next" icon={} onClick={() => dispatch(nextStagingAreaImage())} + onMouseOver={handleMouseOver} + onMouseOut={handleMouseOut} data-selected={true} isDisabled={isOnLastImage} /> From d7884432c9e7f24029a2168e936e6ff68ea9d33d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 12:53:45 +1100 Subject: [PATCH 051/220] Fixes inpainting not doing img2img when no mask --- backend/invoke_ai_web_server.py | 117 +++++++----------- ..._mode.py => get_canvas_generation_mode.py} | 14 +-- 2 files changed, 53 insertions(+), 78 deletions(-) rename backend/modules/{get_outpainting_generation_mode.py => get_canvas_generation_mode.py} (88%) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 36494f720c..0c29807878 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -22,8 +22,8 @@ from ldm.invoke.pngwriter import PngWriter, retrieve_metadata from ldm.invoke.prompt_parser import split_weighted_subprompts from backend.modules.parameters import parameters_to_command -from backend.modules.get_outpainting_generation_mode import ( - get_outpainting_generation_mode, +from backend.modules.get_canvas_generation_mode import ( + get_canvas_generation_mode, ) # Loading Arguments @@ -606,7 +606,10 @@ class InvokeAIWebServer: """ Prepare for generation based on generation_mode """ - if generation_parameters["generation_mode"] == "outpainting": + if generation_parameters["generation_mode"] in [ + "outpainting", + "inpainting", + ]: """ generation_parameters["init_img"] is a base64 image generation_parameters["init_mask"] is a base64 image @@ -617,46 +620,60 @@ class InvokeAIWebServer: truncated_outpaint_image_b64 = generation_parameters["init_img"][:64] truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] - outpaint_image = dataURL_to_image( - generation_parameters["init_img"] - ).convert("RGBA") + init_img_url = generation_parameters["init_img"] + + original_bounding_box = generation_parameters["bounding_box"].copy() + + if generation_parameters["generation_mode"] == "outpainting": + initial_image = dataURL_to_image( + generation_parameters["init_img"] + ).convert("RGBA") + + """ + The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass + to the generator should be: + { + "x": 0, + "y": 0, + "width": original_bounding_box["width"], + "height": original_bounding_box["height"] + } + """ + + generation_parameters["bounding_box"]["x"] = 0 + generation_parameters["bounding_box"]["y"] = 0 + elif generation_parameters["generation_mode"] == "inpainting": + init_img_path = self.get_image_path_from_url(init_img_url) + initial_image = Image.open(init_img_path) + + """ + For inpainting, only the mask is pre-cropped by the UI, so we need to crop out a copy + of the region of the image to be inpainted to match the size of the mask image. + """ + initial_image = copy_image_from_bounding_box( + initial_image, **generation_parameters["bounding_box"] + ) # Convert mask dataURL to an image and convert to greyscale - outpaint_mask = dataURL_to_image( + mask_image = dataURL_to_image( generation_parameters["init_mask"] ).convert("L") - actual_generation_mode = get_outpainting_generation_mode( - outpaint_image, outpaint_mask + actual_generation_mode = get_canvas_generation_mode( + initial_image, mask_image ) - """ - The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass - to the generator should be: - { - "x": 0, - "y": 0, - "width": original_bounding_box["width"], - "height": original_bounding_box["height"] - } - - Save the original bounding box, we need to give it back to the UI when finished, - because the UI needs to know where to put the inpainted image on the canvas. - """ - original_bounding_box = generation_parameters["bounding_box"].copy() - - generation_parameters["bounding_box"]["x"] = 0 - generation_parameters["bounding_box"]["y"] = 0 + print(initial_image, mask_image) """ Apply the mask to the init image, creating a "mask" image with transparency where inpainting should occur. This is the kind of mask that prompt2image() needs. """ - alpha_mask = outpaint_image.copy() - alpha_mask.putalpha(outpaint_mask) + alpha_mask = initial_image.copy() + alpha_mask.putalpha(mask_image) - generation_parameters["init_img"] = outpaint_image + generation_parameters["init_img"] = initial_image generation_parameters["init_mask"] = alpha_mask # Remove the unneeded parameters for whichever mode we are doing @@ -691,48 +708,6 @@ class InvokeAIWebServer: generation_parameters.pop("tile_size", None) generation_parameters.pop("force_outpaint", None) - elif generation_parameters["generation_mode"] == "inpainting": - """ - generation_parameters["init_img"] is a url - generation_parameters["init_mask"] is a base64 image - - So we need to convert each into a PIL Image. - """ - truncated_outpaint_image_b64 = generation_parameters["init_img"][:64] - truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] - - init_img_url = generation_parameters["init_img"] - init_mask_url = generation_parameters["init_mask"] - - init_img_path = self.get_image_path_from_url(init_img_url) - - original_image = Image.open(init_img_path) - - rgba_image = original_image.convert("RGBA") - # copy a region from it which we will inpaint - cropped_init_image = copy_image_from_bounding_box( - rgba_image, **generation_parameters["bounding_box"] - ) - - original_bounding_box = generation_parameters["bounding_box"].copy() - - generation_parameters["init_img"] = cropped_init_image - - # Convert mask dataURL to an image and convert to greyscale - mask_image = dataURL_to_image( - generation_parameters["init_mask"] - ).convert("L") - - """ - Apply the mask to the init image, creating a "mask" image with - transparency where inpainting should occur. This is the kind of - mask that prompt2image() needs. - """ - alpha_mask = cropped_init_image.copy() - alpha_mask.putalpha(mask_image) - - generation_parameters["init_mask"] = alpha_mask - elif generation_parameters["generation_mode"] == "img2img": init_img_url = generation_parameters["init_img"] init_img_path = self.get_image_path_from_url(init_img_url) diff --git a/backend/modules/get_outpainting_generation_mode.py b/backend/modules/get_canvas_generation_mode.py similarity index 88% rename from backend/modules/get_outpainting_generation_mode.py rename to backend/modules/get_canvas_generation_mode.py index d21e231671..764cf474ff 100644 --- a/backend/modules/get_outpainting_generation_mode.py +++ b/backend/modules/get_canvas_generation_mode.py @@ -21,7 +21,7 @@ def check_for_any_transparency(img: Union[ImageType, str]) -> bool: return False -def get_outpainting_generation_mode( +def get_canvas_generation_mode( init_img: Union[ImageType, str], init_mask: Union[ImageType, str] ) -> Literal["txt2img", "outpainting", "inpainting", "img2img",]: if type(init_img) is str: @@ -80,36 +80,36 @@ def main(): print( "OPAQUE IMAGE, NO MASK, expect img2img, got ", - get_outpainting_generation_mode(init_img_opaque, init_mask_no_mask), + get_canvas_generation_mode(init_img_opaque, init_mask_no_mask), ) print( "IMAGE WITH TRANSPARENCY, NO MASK, expect outpainting, got ", - get_outpainting_generation_mode( + get_canvas_generation_mode( init_img_partial_transparency, init_mask_no_mask ), ) print( "FULLY TRANSPARENT IMAGE NO MASK, expect txt2img, got ", - get_outpainting_generation_mode(init_img_full_transparency, init_mask_no_mask), + get_canvas_generation_mode(init_img_full_transparency, init_mask_no_mask), ) print( "OPAQUE IMAGE, WITH MASK, expect inpainting, got ", - get_outpainting_generation_mode(init_img_opaque, init_mask_has_mask), + get_canvas_generation_mode(init_img_opaque, init_mask_has_mask), ) print( "IMAGE WITH TRANSPARENCY, WITH MASK, expect outpainting, got ", - get_outpainting_generation_mode( + get_canvas_generation_mode( init_img_partial_transparency, init_mask_has_mask ), ) print( "FULLY TRANSPARENT IMAGE WITH MASK, expect txt2img, got ", - get_outpainting_generation_mode(init_img_full_transparency, init_mask_has_mask), + get_canvas_generation_mode(init_img_full_transparency, init_mask_has_mask), ) From 1bc1085542adae2933c64d6d5094a00f417e7296 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 13:09:59 +1100 Subject: [PATCH 052/220] Fixes bbox not resizing in outpainting if partially off screen --- .../features/canvas/IAICanvasBoundingBox.tsx | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx index d8f64e8e26..735ab0c0b8 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx @@ -109,8 +109,8 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { if (activeTabName === 'inpainting' || !shouldSnapToGrid) { dispatch( setBoundingBoxCoordinates({ - x: e.target.x(), - y: e.target.y(), + x: Math.floor(e.target.x()), + y: Math.floor(e.target.y()), }) ); return; @@ -238,7 +238,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { // We may not change anything, stash the old position let newCoordinate = { ...oldPos }; - console.log(oldPos, newPos); + // Set the new coords based on what snapped if (didSnapX && !didSnapY) { newCoordinate = { @@ -269,25 +269,21 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { * Unlike anchorDragBoundFunc, it does get a width and height, so * the logic to constrain the size of the bounding box is very simple. */ - if (!baseCanvasImage && activeTabName !== 'outpainting') - return oldBoundBox; + + // On the Inpainting canvas, the bounding box needs to stay in the stage if ( - newBoundBox.width + newBoundBox.x > stageDimensions.width || - newBoundBox.height + newBoundBox.y > stageDimensions.height || - newBoundBox.x < 0 || - newBoundBox.y < 0 + activeTabName === 'inpainting' && + (newBoundBox.width + newBoundBox.x > stageDimensions.width || + newBoundBox.height + newBoundBox.y > stageDimensions.height || + newBoundBox.x < 0 || + newBoundBox.y < 0) ) { return oldBoundBox; } return newBoundBox; }, - [ - activeTabName, - baseCanvasImage, - stageDimensions.height, - stageDimensions.width, - ] + [activeTabName, stageDimensions.height, stageDimensions.width] ); const handleStartedTransforming = () => { From 34395ff490494a77ad9a42125c64ebb5f8a8ccc4 Mon Sep 17 00:00:00 2001 From: Kyle Schouviller Date: Sun, 13 Nov 2022 21:47:37 -0800 Subject: [PATCH 053/220] Fixes crashes during iterative outpaint. Still doesn't work correctly though. --- ldm/invoke/generator/inpaint.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index 72601a7146..7c0c6d2574 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -123,7 +123,8 @@ class Inpaint(Img2Img): seam_blur: int, prompt,sampler,steps,cfg_scale,ddim_eta, conditioning,strength, - noise + noise, + step_callback ) -> Image.Image: hard_mask = self.pil_image.split()[-1].copy() mask = self.mask_edge(hard_mask, seam_size, seam_blur) @@ -139,7 +140,8 @@ class Inpaint(Img2Img): mask_image = mask.convert('RGB'), # Code currently requires an RGB mask strength = strength, mask_blur_radius = 0, - seam_size = 0 + seam_size = 0, + step_callback = step_callback ) result = make_image(noise) @@ -169,7 +171,7 @@ class Inpaint(Img2Img): self.enable_image_debugging = enable_image_debugging if isinstance(init_image, PIL.Image.Image): - self.pil_image = init_image + self.pil_image = init_image.copy() # Fill missing areas of original image init_filled = self.tile_fill_missing( @@ -185,7 +187,7 @@ class Inpaint(Img2Img): init_image = self._image_to_tensor(init_filled.convert('RGB')) if isinstance(mask_image, PIL.Image.Image): - self.pil_mask = mask_image + self.pil_mask = mask_image.copy() debug_image(mask_image, "mask_image BEFORE multiply with pil_image", debug_status=self.enable_image_debugging) mask_image = ImageChops.multiply(mask_image, self.pil_image.split()[-1].convert('RGB')) @@ -260,6 +262,7 @@ class Inpaint(Img2Img): # Seam paint if this is our first pass (seam_size set to 0 during seam painting) if seam_size > 0: + result = self.seam_paint( result, seam_size, @@ -271,7 +274,16 @@ class Inpaint(Img2Img): ddim_eta, conditioning, seam_strength, - x_T) + x_T, + step_callback) + + # Restore original settings + self.get_make_image(prompt,sampler,steps,cfg_scale,ddim_eta, + conditioning,init_image,mask_image,strength, + mask_blur_radius, seam_size, seam_blur, seam_strength, + seam_steps, tile_size, step_callback, + inpaint_replace, enable_image_debugging, + **kwargs) return result From b049bbc64e3a6a367c55c3d1c2a627938d78a88b Mon Sep 17 00:00:00 2001 From: Kyle Schouviller Date: Sun, 13 Nov 2022 21:56:43 -0800 Subject: [PATCH 054/220] Fix iterative outpainting by restoring original images --- ldm/invoke/generator/inpaint.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index 7c0c6d2574..e6c8dc6517 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -262,6 +262,8 @@ class Inpaint(Img2Img): # Seam paint if this is our first pass (seam_size set to 0 during seam painting) if seam_size > 0: + old_image = self.pil_image or init_image + old_mask = self.pil_mask or mask_image result = self.seam_paint( result, @@ -279,7 +281,10 @@ class Inpaint(Img2Img): # Restore original settings self.get_make_image(prompt,sampler,steps,cfg_scale,ddim_eta, - conditioning,init_image,mask_image,strength, + conditioning, + old_image, + old_mask, + strength, mask_blur_radius, seam_size, seam_blur, seam_strength, seam_steps, tile_size, step_callback, inpaint_replace, enable_image_debugging, From 4382cd0b91fca4fb533585468ce871ba39eaa01b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 22:05:49 +1100 Subject: [PATCH 055/220] Moves image uploading to HTTP - It all seems to work fine - A lot of cleanup is still needed - Logging needs to be added - May need types to be reviewed --- backend/invoke_ai_web_server.py | 137 +++++------ frontend/src/app/invokeai.d.ts | 11 +- frontend/src/app/socketio/listeners.ts | 64 ++--- frontend/src/app/socketio/middleware.ts | 8 +- .../src/common/components/ImageUploader.tsx | 28 +-- frontend/src/features/canvas/IAICanvas.tsx | 8 +- .../features/canvas/IAICanvasMaskLines.tsx | 8 +- .../canvas/IAICanvasOutpaintingControls.tsx | 18 +- .../src/features/canvas/canvasReducers.ts | 118 +++++++++ frontend/src/features/canvas/canvasSlice.ts | 224 ++++-------------- .../src/features/canvas/util/layerToBlob.ts | 26 ++ .../canvas/util/mergeAndUploadCanvas.ts | 64 +++++ frontend/src/features/gallery/gallerySlice.ts | 49 +++- .../src/features/gallery/util/uploadImage.ts | 47 ++++ frontend/src/features/options/optionsSlice.ts | 11 + 15 files changed, 496 insertions(+), 325 deletions(-) create mode 100644 frontend/src/features/canvas/canvasReducers.ts create mode 100644 frontend/src/features/canvas/util/layerToBlob.ts create mode 100644 frontend/src/features/canvas/util/mergeAndUploadCanvas.ts create mode 100644 frontend/src/features/gallery/util/uploadImage.ts diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 0c29807878..1c21cdd096 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -46,6 +46,13 @@ class InvokeAIWebServer: self.esrgan = esrgan self.canceled = Event() + self.ALLOWED_EXTENSIONS = {"png", "jpg", "jpeg"} + + def allowed_file(self, filename: str) -> bool: + return ( + "." in filename + and filename.rsplit(".", 1)[1].lower() in self.ALLOWED_EXTENSIONS + ) def run(self): self.setup_app() @@ -98,41 +105,70 @@ class InvokeAIWebServer: return send_from_directory(self.app.static_folder, "index.html") @self.app.route("/upload", methods=["POST"]) - def upload_base64_file(): + def upload(): try: - data = request.get_json() - dataURL = data["dataURL"] - name = data["name"] + # check if the post request has the file part + if "file" not in request.files: + return "No file part", 400 + file = request.files["file"] - print(f'>> Image upload requested "{name}"') + # If the user does not select a file, the browser submits an + # empty file without a filename. + if file.filename == "": + return "No selected file", 400 - if dataURL is not None: - bytes = dataURL_to_bytes(dataURL) + kind = request.form["kind"] - file_path = self.save_file_unique_uuid_name( - bytes=bytes, name=name, path=self.result_path + if kind == "init": + path = self.init_image_path + elif kind == "temp": + path = self.temp_image_path + elif kind == "result": + path = self.result_path + elif kind == "mask": + path = self.mask_image_path + else: + return f"Invalid upload kind: {kind}", 400 + + if not self.allowed_file(file.filename): + return ( + f'Invalid file type, must be one of: {", ".join(self.ALLOWED_EXTENSIONS)}', + 400, ) - mtime = os.path.getmtime(file_path) - (width, height) = Image.open(file_path).size + secured_filename = secure_filename(file.filename) - response = { + uuid = uuid4().hex + truncated_uuid = uuid[:8] + + split = os.path.splitext(secured_filename) + name = f"{split[0]}.{truncated_uuid}{split[1]}" + + file_path = os.path.join(path, name) + + file.save(file_path) + + mtime = os.path.getmtime(file_path) + (width, height) = Image.open(file_path).size + + response = { + "image": { "url": self.get_url_from_image_path(file_path), "mtime": mtime, "width": width, "height": height, - "category": "result", - "destination": "outpainting_merge", - } - return response - else: - return "No dataURL provided" + }, + } + + return response, 200 + except Exception as e: self.socketio.emit("error", {"message": (str(e))}) print("\n") traceback.print_exc() print("\n") + return "Error uploading file", 500 self.load_socketio_listeners(self.socketio) @@ -177,6 +213,7 @@ class InvokeAIWebServer: self.init_image_url = "outputs/init-images/" self.mask_image_url = "outputs/mask-images/" self.intermediate_url = "outputs/intermediates/" + self.temp_image_url = "outputs/temp-images/" # location for "finished" images self.result_path = args.outdir # temporary path for intermediates @@ -184,6 +221,8 @@ class InvokeAIWebServer: # path for user-uploaded init images and masks self.init_image_path = os.path.join(self.result_path, "init-images/") self.mask_image_path = os.path.join(self.result_path, "mask-images/") + # path for temp images e.g. gallery generations which are not committed + self.temp_image_path = os.path.join(self.result_path, "temp-images/") # txt log self.log_path = os.path.join(self.result_path, "invoke_log.txt") # make all output paths @@ -194,6 +233,7 @@ class InvokeAIWebServer: self.intermediate_path, self.init_image_path, self.mask_image_path, + self.temp_image_path, ] ] @@ -517,59 +557,6 @@ class InvokeAIWebServer: traceback.print_exc() print("\n") - # TODO: I think this needs a safety mechanism. - @socketio.on("uploadImage") - def handle_upload_image(bytes, name, destination): - try: - print(f'>> Image upload requested "{name}"') - file_path = self.save_file_unique_uuid_name( - bytes=bytes, name=name, path=self.init_image_path - ) - mtime = os.path.getmtime(file_path) - (width, height) = Image.open(file_path).size - - socketio.emit( - "imageUploaded", - { - "url": self.get_url_from_image_path(file_path), - "mtime": mtime, - "width": width, - "height": height, - "category": "user", - "destination": destination, - }, - ) - except Exception as e: - self.socketio.emit("error", {"message": (str(e))}) - print("\n") - - traceback.print_exc() - print("\n") - - # TODO: I think this needs a safety mechanism. - @socketio.on("uploadOutpaintingMergeImage") - def handle_upload_outpainting_merge_image(dataURL, name): - try: - print(f'>> Outpainting merge image upload requested "{name}"') - - image = dataURL_to_image(dataURL) - file_name = self.make_unique_init_image_filename(name) - file_path = os.path.join(self.result_path, file_name) - image.save(file_path) - - socketio.emit( - "outpaintingMergeImageUploaded", - { - "url": self.get_url_from_image_path(file_path), - }, - ) - except Exception as e: - self.socketio.emit("error", {"message": (str(e))}) - print("\n") - - traceback.print_exc() - print("\n") - # App Functions def get_system_config(self): model_list = self.generate.model_cache.list_models() @@ -621,7 +608,7 @@ class InvokeAIWebServer: truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64] init_img_url = generation_parameters["init_img"] - + original_bounding_box = generation_parameters["bounding_box"].copy() if generation_parameters["generation_mode"] == "outpainting": @@ -1247,6 +1234,10 @@ class InvokeAIWebServer: return os.path.abspath( os.path.join(self.intermediate_path, os.path.basename(url)) ) + elif "temp-images" in url: + return os.path.abspath( + os.path.join(self.temp_image_path, os.path.basename(url)) + ) else: return os.path.abspath( os.path.join(self.result_path, os.path.basename(url)) @@ -1267,6 +1258,8 @@ class InvokeAIWebServer: return os.path.join(self.mask_image_url, os.path.basename(path)) elif "intermediates" in path: return os.path.join(self.intermediate_url, os.path.basename(path)) + elif "temp-images" in path: + return os.path.join(self.temp_image_url, os.path.basename(path)) else: return os.path.join(self.result_url, os.path.basename(path)) except Exception as e: diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index 3407f68455..ac57f34c04 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -118,7 +118,7 @@ export declare type Image = { width: number; height: number; category: GalleryCategory; - isBase64: boolean; + isBase64?: boolean; }; // GalleryImages is an array of Image. @@ -178,8 +178,8 @@ export declare type ImageResultResponse = Omit & { generationMode: InvokeTabName; }; -export declare type ImageUploadResponse = Omit & { - destination: 'img2img' | 'inpainting' | 'outpainting' | 'outpainting_merge'; +export declare type ImageUploadResponse = { + image: Omit; }; export declare type ErrorResponse = { @@ -203,11 +203,6 @@ export declare type ImageUrlResponse = { url: string; }; -export declare type ImageUploadDestination = - | 'img2img' - | 'inpainting' - | 'outpainting_merge'; - export declare type UploadImagePayload = { file: File; destination?: ImageUploadDestination; diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 3d7e6fb86e..935fd9c42d 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -330,41 +330,41 @@ const makeSocketIOListeners = ( }) ); }, - onImageUploaded: (data: InvokeAI.ImageUploadResponse) => { - const { destination, ...rest } = data; - const image = { - uuid: uuidv4(), - ...rest, - }; + // onImageUploaded: (data: InvokeAI.ImageUploadResponse) => { + // const { origin, image, kind } = data; + // const newImage = { + // uuid: uuidv4(), + // ...image, + // }; - try { - dispatch(addImage({ image, category: 'user' })); + // try { + // dispatch(addImage({ image: newImage, category: 'user' })); - switch (destination) { - case 'img2img': { - dispatch(setInitialImage(image)); - break; - } - case 'inpainting': { - dispatch(setImageToInpaint(image)); - break; - } - default: { - dispatch(setCurrentImage(image)); - break; - } - } + // switch (origin) { + // case 'img2img': { + // dispatch(setInitialImage(newImage)); + // break; + // } + // case 'inpainting': { + // dispatch(setImageToInpaint(newImage)); + // break; + // } + // default: { + // dispatch(setCurrentImage(newImage)); + // break; + // } + // } - dispatch( - addLogEntry({ - timestamp: dateFormat(new Date(), 'isoDateTime'), - message: `Image uploaded: ${data.url}`, - }) - ); - } catch (e) { - console.error(e); - } - }, + // dispatch( + // addLogEntry({ + // timestamp: dateFormat(new Date(), 'isoDateTime'), + // message: `Image uploaded: ${image.url}`, + // }) + // ); + // } catch (e) { + // console.error(e); + // } + // }, /** * Callback to run when we receive a 'maskImageUploaded' event. */ diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 3f4fd1d06c..4095706e27 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -43,7 +43,7 @@ export const socketioMiddleware = () => { onGalleryImages, onProcessingCanceled, onImageDeleted, - onImageUploaded, + // onImageUploaded, onMaskImageUploaded, onSystemConfig, onModelChanged, @@ -104,9 +104,9 @@ export const socketioMiddleware = () => { onImageDeleted(data); }); - socketio.on('imageUploaded', (data: InvokeAI.ImageUploadResponse) => { - onImageUploaded(data); - }); + // socketio.on('imageUploaded', (data: InvokeAI.ImageUploadResponse) => { + // onImageUploaded(data); + // }); socketio.on('maskImageUploaded', (data: InvokeAI.ImageUrlResponse) => { onMaskImageUploaded(data); diff --git a/frontend/src/common/components/ImageUploader.tsx b/frontend/src/common/components/ImageUploader.tsx index 92a194cf38..6427736df1 100644 --- a/frontend/src/common/components/ImageUploader.tsx +++ b/frontend/src/common/components/ImageUploader.tsx @@ -8,12 +8,13 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import { FileRejection, useDropzone } from 'react-dropzone'; import { useToast } from '@chakra-ui/react'; -import { uploadImage } from 'app/socketio/actions'; -import { ImageUploadDestination, UploadImagePayload } from 'app/invokeai'; +// import { uploadImage } from 'app/socketio/actions'; +import { UploadImagePayload } from 'app/invokeai'; import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { tabDict } from 'features/tabs/InvokeTabs'; import ImageUploadOverlay from './ImageUploadOverlay'; +import { uploadImage } from 'features/gallery/util/uploadImage'; type ImageUploaderProps = { children: ReactNode; @@ -44,15 +45,12 @@ const ImageUploader = (props: ImageUploaderProps) => { ); const fileAcceptedCallback = useCallback( - (file: File) => { - setIsHandlingUpload(true); - const payload: UploadImagePayload = { file }; - if (['img2img', 'inpainting', 'outpainting'].includes(activeTabName)) { - payload.destination = activeTabName as ImageUploadDestination; - } - dispatch(uploadImage(payload)); + async (file: File) => { + // setIsHandlingUpload(true); + + dispatch(uploadImage({ imageFile: file })); }, - [dispatch, activeTabName] + [dispatch] ); const onDrop = useCallback( @@ -124,12 +122,12 @@ const ImageUploader = (props: ImageUploaderProps) => { return; } - const payload: UploadImagePayload = { file }; - if (['img2img', 'inpainting'].includes(activeTabName)) { - payload.destination = activeTabName as ImageUploadDestination; - } + // const payload: UploadImagePayload = { file }; + // if (['img2img', 'inpainting'].includes(activeTabName)) { + // payload.destination = activeTabName as ImageUploadDestination; + // } - dispatch(uploadImage(payload)); + // dispatch(uploadImage(payload)); }; document.addEventListener('paste', pasteImageListener); return () => { diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 4300ac32ff..67c7677cc1 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -197,11 +197,11 @@ const IAICanvas = () => { listening={false} /> )} - {isStaging && } + {shouldShowIntermediates && } - {!isStaging && ( - - )} + {isOnOutpaintingTab && } diff --git a/frontend/src/features/canvas/IAICanvasMaskLines.tsx b/frontend/src/features/canvas/IAICanvasMaskLines.tsx index 9394de329c..c55dcd70e5 100644 --- a/frontend/src/features/canvas/IAICanvasMaskLines.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskLines.tsx @@ -2,13 +2,7 @@ import { GroupConfig } from 'konva/lib/Group'; import { Group, Line } from 'react-konva'; import { useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; -import { - currentCanvasSelector, - GenericCanvasState, - InpaintingCanvasState, - isCanvasMaskLine, - OutpaintingCanvasState, -} from './canvasSlice'; +import { currentCanvasSelector, isCanvasMaskLine } from './canvasSlice'; import _ from 'lodash'; export const canvasLinesSelector = createSelector( diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx index 99bde3a7a0..fd277bd521 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx +++ b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx @@ -5,7 +5,6 @@ import { isStagingSelector, resetCanvas, setTool, - uploadOutpaintingMergedImage, } from './canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; @@ -26,6 +25,7 @@ import IAICanvasSettingsButtonPopover from './IAICanvasSettingsButtonPopover'; import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; +import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; export const canvasControlsSelector = createSelector( [currentCanvasSelector, isStagingSelector], @@ -68,13 +68,23 @@ const IAICanvasOutpaintingControls = () => { tooltip="Merge Visible" icon={} onClick={() => { - dispatch(uploadOutpaintingMergedImage(canvasImageLayerRef)); + dispatch( + mergeAndUploadCanvas({ + canvasImageLayerRef, + saveToGallery: false, + }) + ); }} /> } + onClick={() => { + dispatch( + mergeAndUploadCanvas({ canvasImageLayerRef, saveToGallery: true }) + ); + }} /> +) => { + const { width: canvasWidth, height: canvasHeight } = + state.inpainting.stageDimensions; + const { width, height } = state.inpainting.boundingBoxDimensions; + const { x, y } = state.inpainting.boundingBoxCoordinates; + + const maxWidth = Math.min(image.width, canvasWidth); + const maxHeight = Math.min(image.height, canvasHeight); + + const newCoordinates: Vector2d = { x, y }; + const newDimensions: Dimensions = { width, height }; + + if (width + x > maxWidth) { + // Bounding box at least needs to be translated + if (width > maxWidth) { + // Bounding box also needs to be resized + newDimensions.width = roundDownToMultiple(maxWidth, 64); + } + newCoordinates.x = maxWidth - newDimensions.width; + } + + if (height + y > maxHeight) { + // Bounding box at least needs to be translated + if (height > maxHeight) { + // Bounding box also needs to be resized + newDimensions.height = roundDownToMultiple(maxHeight, 64); + } + newCoordinates.y = maxHeight - newDimensions.height; + } + + state.inpainting.boundingBoxDimensions = newDimensions; + state.inpainting.boundingBoxCoordinates = newCoordinates; + + state.inpainting.pastLayerStates.push(state.inpainting.layerState); + + state.inpainting.layerState = { + ...initialLayerState, + objects: [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + width: image.width, + height: image.height, + image: image, + }, + ], + }; + + state.outpainting.futureLayerStates = []; + state.doesCanvasNeedScaling = true; +}; + +export const setImageToOutpaint_reducer = ( + state: CanvasState, + image: InvokeAI.Image +) => { + const { width: canvasWidth, height: canvasHeight } = + state.outpainting.stageDimensions; + const { width, height } = state.outpainting.boundingBoxDimensions; + const { x, y } = state.outpainting.boundingBoxCoordinates; + + const maxWidth = Math.min(image.width, canvasWidth); + const maxHeight = Math.min(image.height, canvasHeight); + + const newCoordinates: Vector2d = { x, y }; + const newDimensions: Dimensions = { width, height }; + + if (width + x > maxWidth) { + // Bounding box at least needs to be translated + if (width > maxWidth) { + // Bounding box also needs to be resized + newDimensions.width = roundDownToMultiple(maxWidth, 64); + } + newCoordinates.x = maxWidth - newDimensions.width; + } + + if (height + y > maxHeight) { + // Bounding box at least needs to be translated + if (height > maxHeight) { + // Bounding box also needs to be resized + newDimensions.height = roundDownToMultiple(maxHeight, 64); + } + newCoordinates.y = maxHeight - newDimensions.height; + } + + state.outpainting.boundingBoxDimensions = newDimensions; + state.outpainting.boundingBoxCoordinates = newCoordinates; + + state.outpainting.pastLayerStates.push(state.outpainting.layerState); + state.outpainting.layerState = { + ...initialLayerState, + objects: [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + width: image.width, + height: image.height, + image: image, + }, + ], + }; + state.outpainting.futureLayerStates = []; + state.doesCanvasNeedScaling = true; +}; diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index f179565a83..81477a1a82 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -13,6 +13,14 @@ import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import { RootState } from 'app/store'; import { MutableRefObject } from 'react'; import Konva from 'konva'; +import { tabMap } from 'features/tabs/InvokeTabs'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; +import { uploadImage } from 'features/gallery/util/uploadImage'; +import { + setImageToInpaint_reducer, + setImageToOutpaint_reducer, +} from './canvasReducers'; export interface GenericCanvasState { tool: CanvasTool; @@ -75,6 +83,8 @@ export type CanvasImage = { layer: 'base'; x: number; y: number; + width: number; + height: number; image: InvokeAI.Image; }; @@ -137,7 +147,7 @@ export interface CanvasState { outpainting: OutpaintingCanvasState; } -const initialLayerState: CanvasLayerState = { +export const initialLayerState: CanvasLayerState = { objects: [], stagingArea: { x: -1, @@ -283,104 +293,10 @@ export const canvasSlice = createSlice({ // state.inpainting.imageToInpaint = undefined; }, setImageToOutpaint: (state, action: PayloadAction) => { - const { width: canvasWidth, height: canvasHeight } = - state.outpainting.stageDimensions; - const { width, height } = state.outpainting.boundingBoxDimensions; - const { x, y } = state.outpainting.boundingBoxCoordinates; - - const maxWidth = Math.min(action.payload.width, canvasWidth); - const maxHeight = Math.min(action.payload.height, canvasHeight); - - const newCoordinates: Vector2d = { x, y }; - const newDimensions: Dimensions = { width, height }; - - if (width + x > maxWidth) { - // Bounding box at least needs to be translated - if (width > maxWidth) { - // Bounding box also needs to be resized - newDimensions.width = roundDownToMultiple(maxWidth, 64); - } - newCoordinates.x = maxWidth - newDimensions.width; - } - - if (height + y > maxHeight) { - // Bounding box at least needs to be translated - if (height > maxHeight) { - // Bounding box also needs to be resized - newDimensions.height = roundDownToMultiple(maxHeight, 64); - } - newCoordinates.y = maxHeight - newDimensions.height; - } - - state.outpainting.boundingBoxDimensions = newDimensions; - state.outpainting.boundingBoxCoordinates = newCoordinates; - - state.outpainting.pastLayerStates.push(state.outpainting.layerState); - state.outpainting.layerState = { - ...initialLayerState, - objects: [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - image: action.payload, - }, - ], - }; - state.outpainting.futureLayerStates = []; - state.doesCanvasNeedScaling = true; + setImageToOutpaint_reducer(state, action.payload); }, setImageToInpaint: (state, action: PayloadAction) => { - const { width: canvasWidth, height: canvasHeight } = - state.inpainting.stageDimensions; - const { width, height } = state.inpainting.boundingBoxDimensions; - const { x, y } = state.inpainting.boundingBoxCoordinates; - - const maxWidth = Math.min(action.payload.width, canvasWidth); - const maxHeight = Math.min(action.payload.height, canvasHeight); - - const newCoordinates: Vector2d = { x, y }; - const newDimensions: Dimensions = { width, height }; - - if (width + x > maxWidth) { - // Bounding box at least needs to be translated - if (width > maxWidth) { - // Bounding box also needs to be resized - newDimensions.width = roundDownToMultiple(maxWidth, 64); - } - newCoordinates.x = maxWidth - newDimensions.width; - } - - if (height + y > maxHeight) { - // Bounding box at least needs to be translated - if (height > maxHeight) { - // Bounding box also needs to be resized - newDimensions.height = roundDownToMultiple(maxHeight, 64); - } - newCoordinates.y = maxHeight - newDimensions.height; - } - - state.inpainting.boundingBoxDimensions = newDimensions; - state.inpainting.boundingBoxCoordinates = newCoordinates; - - state.inpainting.pastLayerStates.push(state.inpainting.layerState); - - state.inpainting.layerState = { - ...initialLayerState, - objects: [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - image: action.payload, - }, - ], - }; - - state.outpainting.futureLayerStates = []; - state.doesCanvasNeedScaling = true; + setImageToInpaint_reducer(state, action.payload); }, setStageDimensions: (state, action: PayloadAction) => { state[state.currentCanvas].stageDimensions = action.payload; @@ -568,8 +484,7 @@ export const canvasSlice = createSlice({ currentCanvas.layerState.stagingArea.images.push({ kind: 'image', layer: 'base', - x: boundingBox.x, - y: boundingBox.y, + ...boundingBox, image, }); @@ -705,14 +620,8 @@ export const canvasSlice = createSlice({ currentCanvas.pastLayerStates.shift(); } - const { x, y, image } = images[selectedImageIndex]; - currentCanvas.layerState.objects.push({ - kind: 'image', - layer: 'base', - x, - y, - image, + ...images[selectedImageIndex], }); currentCanvas.layerState.stagingArea = { @@ -723,20 +632,39 @@ export const canvasSlice = createSlice({ }, }, extraReducers: (builder) => { - builder.addCase(uploadOutpaintingMergedImage.fulfilled, (state, action) => { + builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { if (!action.payload) return; - state.outpainting.pastLayerStates.push({ - ...state.outpainting.layerState, - }); - state.outpainting.futureLayerStates = []; + const { image, kind, boundingBox } = action.payload; - state.outpainting.layerState.objects = [ - { - kind: 'image', - layer: 'base', - ...action.payload, - }, - ]; + if (kind === 'temp_merged_canvas') { + state.outpainting.pastLayerStates.push({ + ...state.outpainting.layerState, + }); + + state.outpainting.futureLayerStates = []; + + state.outpainting.layerState.objects = [ + { + kind: 'image', + layer: 'base', + ...boundingBox, + image, + }, + ]; + } + }); + + builder.addCase(uploadImage.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, activeTabName } = action.payload; + + if (kind !== 'init') return; + + if (activeTabName === 'inpainting') { + setImageToInpaint_reducer(state, image); + } else if (activeTabName === 'outpainting') { + setImageToOutpaint_reducer(state, image); + } }); }, }); @@ -799,66 +727,6 @@ export const { export default canvasSlice.reducer; -export const uploadOutpaintingMergedImage = createAsyncThunk( - 'canvas/uploadOutpaintingMergedImage', - async ( - canvasImageLayerRef: MutableRefObject, - thunkAPI - ) => { - const { getState } = thunkAPI; - - const state = getState() as RootState; - const stageScale = state.canvas.outpainting.stageScale; - - if (!canvasImageLayerRef.current) return; - const tempScale = canvasImageLayerRef.current.scale(); - - const { x: relativeX, y: relativeY } = - canvasImageLayerRef.current.getClientRect({ - relativeTo: canvasImageLayerRef.current.getParent(), - }); - - canvasImageLayerRef.current.scale({ - x: 1 / stageScale, - y: 1 / stageScale, - }); - - const clientRect = canvasImageLayerRef.current.getClientRect(); - - const imageDataURL = canvasImageLayerRef.current.toDataURL(clientRect); - - canvasImageLayerRef.current.scale(tempScale); - - if (!imageDataURL) return; - - const response = await fetch(window.location.origin + '/upload', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - dataURL: imageDataURL, - name: 'outpaintingmerge.png', - }), - }); - - const data = (await response.json()) as InvokeAI.ImageUploadResponse; - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { destination, ...rest } = data; - const image = { - uuid: uuidv4(), - ...rest, - }; - - return { - image, - x: relativeX, - y: relativeY, - }; - } -); - export const currentCanvasSelector = (state: RootState): BaseCanvasState => state.canvas[state.canvas.currentCanvas]; diff --git a/frontend/src/features/canvas/util/layerToBlob.ts b/frontend/src/features/canvas/util/layerToBlob.ts new file mode 100644 index 0000000000..7f8681ff27 --- /dev/null +++ b/frontend/src/features/canvas/util/layerToBlob.ts @@ -0,0 +1,26 @@ +import Konva from 'konva'; + +const layerToBlob = async (layer: Konva.Layer, stageScale: number) => { + const tempScale = layer.scale(); + + const { x: relativeX, y: relativeY } = layer.getClientRect({ + relativeTo: layer.getParent(), + }); + + // Scale the canvas before getting it as a Blob + layer.scale({ + x: 1 / stageScale, + y: 1 / stageScale, + }); + + const clientRect = layer.getClientRect(); + + const blob = await layer.toBlob(clientRect); + + // Unscale the canvas + layer.scale(tempScale); + + return { blob, relativeX, relativeY }; +}; + +export default layerToBlob; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts new file mode 100644 index 0000000000..28105b6d63 --- /dev/null +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -0,0 +1,64 @@ +import { createAsyncThunk } from '@reduxjs/toolkit'; +import { RootState } from 'app/store'; +import Konva from 'konva'; +import { MutableRefObject } from 'react'; +import * as InvokeAI from 'app/invokeai'; +import { v4 as uuidv4 } from 'uuid'; +import layerToBlob from './layerToBlob'; + +export const mergeAndUploadCanvas = createAsyncThunk( + 'canvas/mergeAndUploadCanvas', + async ( + args: { + canvasImageLayerRef: MutableRefObject; + saveToGallery: boolean; + }, + thunkAPI + ) => { + const { canvasImageLayerRef, saveToGallery } = args; + + const { getState } = thunkAPI; + + const state = getState() as RootState; + + const stageScale = state.canvas[state.canvas.currentCanvas].stageScale; + + if (!canvasImageLayerRef.current) return; + + const { blob, relativeX, relativeY } = await layerToBlob( + canvasImageLayerRef.current, + stageScale + ); + + if (!blob) return; + + const formData = new FormData(); + + formData.append('file', blob as Blob, 'merged_canvas.png'); + formData.append('kind', saveToGallery ? 'result' : 'temp'); + + const response = await fetch(window.location.origin + '/upload', { + method: 'POST', + body: formData, + }); + + const { image } = (await response.json()) as InvokeAI.ImageUploadResponse; + + const newImage: InvokeAI.Image = { + uuid: uuidv4(), + category: saveToGallery ? 'result' : 'user', + ...image, + }; + + return { + image: newImage, + kind: saveToGallery ? 'merged_canvas' : 'temp_merged_canvas', + boundingBox: { + x: relativeX, + y: relativeY, + width: image.width, + height: image.height, + }, + }; + } +); diff --git a/frontend/src/features/gallery/gallerySlice.ts b/frontend/src/features/gallery/gallerySlice.ts index 92cc48071a..821b5d76ab 100644 --- a/frontend/src/features/gallery/gallerySlice.ts +++ b/frontend/src/features/gallery/gallerySlice.ts @@ -4,6 +4,10 @@ import _, { clamp } from 'lodash'; import * as InvokeAI from 'app/invokeai'; import { IRect } from 'konva/lib/types'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; +import { uploadImage } from './util/uploadImage'; +import { setInitialImage } from 'features/options/optionsSlice'; +import { setImageToInpaint } from 'features/canvas/canvasSlice'; export type GalleryCategory = 'user' | 'result'; @@ -25,7 +29,10 @@ export type Gallery = { export interface GalleryState { currentImage?: InvokeAI.Image; currentImageUuid: string; - intermediateImage?: InvokeAI.Image & { boundingBox?: IRect; generationMode?: InvokeTabName }; + intermediateImage?: InvokeAI.Image & { + boundingBox?: IRect; + generationMode?: InvokeTabName; + }; shouldPinGallery: boolean; shouldShowGallery: boolean; galleryScrollPosition: number; @@ -261,6 +268,46 @@ export const gallerySlice = createSlice({ state.galleryWidth = action.payload; }, }, + extraReducers: (builder) => { + builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, boundingBox } = action.payload; + + if (kind === 'merged_canvas') { + const { uuid, url, mtime } = image; + + state.categories.result.images.unshift(image); + + if (state.shouldAutoSwitchToNewImages) { + state.currentImageUuid = uuid; + state.currentImage = image; + state.currentCategory = 'result'; + } + + state.intermediateImage = undefined; + state.categories.result.latest_mtime = mtime; + } + }); + builder.addCase(uploadImage.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind } = action.payload; + + if (kind === 'init') { + const { uuid, mtime } = image; + + state.categories.result.images.unshift(image); + + if (state.shouldAutoSwitchToNewImages) { + state.currentImageUuid = uuid; + state.currentImage = image; + state.currentCategory = 'user'; + } + + state.intermediateImage = undefined; + state.categories.result.latest_mtime = mtime; + } + }); + }, }); export const { diff --git a/frontend/src/features/gallery/util/uploadImage.ts b/frontend/src/features/gallery/util/uploadImage.ts new file mode 100644 index 0000000000..2729138cc7 --- /dev/null +++ b/frontend/src/features/gallery/util/uploadImage.ts @@ -0,0 +1,47 @@ +import { createAsyncThunk } from '@reduxjs/toolkit'; +import { RootState } from 'app/store'; +import * as InvokeAI from 'app/invokeai'; +import { v4 as uuidv4 } from 'uuid'; +import { activeTabNameSelector } from 'features/options/optionsSelectors'; + +export const uploadImage = createAsyncThunk( + 'gallery/uploadImage', + async ( + args: { + imageFile: File; + }, + thunkAPI + ) => { + const { imageFile } = args; + + const { getState } = thunkAPI; + + const state = getState() as RootState; + + const activeTabName = activeTabNameSelector(state); + + const formData = new FormData(); + + formData.append('file', imageFile, imageFile.name); + formData.append('kind', 'init'); + + const response = await fetch(window.location.origin + '/upload', { + method: 'POST', + body: formData, + }); + + const { image } = (await response.json()) as InvokeAI.ImageUploadResponse; + + const newImage: InvokeAI.Image = { + uuid: uuidv4(), + category: 'user', + ...image, + }; + + return { + image: newImage, + kind: 'init', + activeTabName, + }; + } +); diff --git a/frontend/src/features/options/optionsSlice.ts b/frontend/src/features/options/optionsSlice.ts index a17c754bdb..37eae5ff89 100644 --- a/frontend/src/features/options/optionsSlice.ts +++ b/frontend/src/features/options/optionsSlice.ts @@ -5,6 +5,7 @@ import promptToString from 'common/util/promptToString'; import { seedWeightsToString } from 'common/util/seedWeightPairs'; import { FACETOOL_TYPES } from 'app/constants'; import { InvokeTabName, tabMap } from 'features/tabs/InvokeTabs'; +import { uploadImage } from 'features/gallery/util/uploadImage'; export type UpscalingLevel = 2 | 4; @@ -361,6 +362,16 @@ export const optionsSlice = createSlice({ state.isLightBoxOpen = action.payload; }, }, + extraReducers: (builder) => { + builder.addCase(uploadImage.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, activeTabName } = action.payload; + + if (kind === 'init' && activeTabName === 'img2img') { + state.initialImage = image; + } + }); + }, }); export const { From c0ad1b346946905ba8f786129285b6e5997f4819 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:25:12 +1100 Subject: [PATCH 056/220] Fixes: outpainting temp images show in gallery --- backend/invoke_ai_web_server.py | 52 +++++++++++++------ frontend/src/app/socketio/actions.ts | 4 +- frontend/src/app/socketio/emitters.ts | 14 ++--- frontend/src/app/socketio/listeners.ts | 48 ++++++++++------- frontend/src/app/socketio/middleware.ts | 28 +++++----- .../{layerToBlob.ts => layerToDataURL.ts} | 8 +-- .../canvas/util/mergeAndUploadCanvas.ts | 9 ++-- 7 files changed, 96 insertions(+), 67 deletions(-) rename frontend/src/features/canvas/util/{layerToBlob.ts => layerToDataURL.ts} (67%) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 1c21cdd096..bf14133681 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -10,7 +10,7 @@ import base64 import os from werkzeug.utils import secure_filename -from flask import Flask, redirect, send_from_directory, flash, request, url_for, jsonify +from flask import Flask, redirect, send_from_directory, request, make_response from flask_socketio import SocketIO from PIL import Image, ImageOps from PIL.Image import Image as ImageType @@ -107,15 +107,22 @@ class InvokeAIWebServer: @self.app.route("/upload", methods=["POST"]) def upload(): try: + filename = "" # check if the post request has the file part - if "file" not in request.files: - return "No file part", 400 - file = request.files["file"] - - # If the user does not select a file, the browser submits an - # empty file without a filename. - if file.filename == "": - return "No selected file", 400 + if "file" in request.files: + file = request.files["file"] + # If the user does not select a file, the browser submits an + # empty file without a filename. + if file.filename == "": + return make_response("No file selected", 400) + filename = file.filename + elif "dataURL" in request.form: + file = dataURL_to_bytes(request.form["dataURL"]) + if "filename" not in request.form or request.form["filename"] == "": + return make_response("No filename provided", 400) + filename = request.form["filename"] + else: + return make_response("No file or dataURL", 400) kind = request.form["kind"] @@ -128,15 +135,15 @@ class InvokeAIWebServer: elif kind == "mask": path = self.mask_image_path else: - return f"Invalid upload kind: {kind}", 400 + return make_response(f"Invalid upload kind: {kind}", 400) - if not self.allowed_file(file.filename): - return ( + if not self.allowed_file(filename): + return make_response( f'Invalid file type, must be one of: {", ".join(self.ALLOWED_EXTENSIONS)}', 400, ) - secured_filename = secure_filename(file.filename) + secured_filename = secure_filename(filename) uuid = uuid4().hex truncated_uuid = uuid[:8] @@ -146,7 +153,11 @@ class InvokeAIWebServer: file_path = os.path.join(path, name) - file.save(file_path) + if "dataURL" in request.form: + with open(file_path, "wb") as f: + f.write(file) + else: + file.save(file_path) mtime = os.path.getmtime(file_path) (width, height) = Image.open(file_path).size @@ -160,7 +171,7 @@ class InvokeAIWebServer: }, } - return response, 200 + return make_response(response, 200) except Exception as e: self.socketio.emit("error", {"message": (str(e))}) @@ -168,7 +179,7 @@ class InvokeAIWebServer: traceback.print_exc() print("\n") - return "Error uploading file", 500 + return make_response("Error uploading file", 500) self.load_socketio_listeners(self.socketio) @@ -916,11 +927,18 @@ class InvokeAIWebServer: (width, height) = image.size + generated_image_outdir = ( + self.result_path + if generation_parameters["generation_mode"] + in ["txt2img", "img2img"] + else self.temp_image_path + ) + path = self.save_result_image( image, command, metadata, - self.result_path, + generated_image_outdir, postprocessing=postprocessing, ) diff --git a/frontend/src/app/socketio/actions.ts b/frontend/src/app/socketio/actions.ts index faad169b07..64cf705a77 100644 --- a/frontend/src/app/socketio/actions.ts +++ b/frontend/src/app/socketio/actions.ts @@ -26,8 +26,8 @@ export const requestNewImages = createAction( export const cancelProcessing = createAction( 'socketio/cancelProcessing' ); -export const uploadImage = createAction('socketio/uploadImage'); -export const uploadMaskImage = createAction('socketio/uploadMaskImage'); +// export const uploadImage = createAction('socketio/uploadImage'); +// export const uploadMaskImage = createAction('socketio/uploadMaskImage'); export const requestSystemConfig = createAction( 'socketio/requestSystemConfig' diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index d0e3abed36..9307f625fb 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -180,13 +180,13 @@ const makeSocketIOEmitters = ( emitCancelProcessing: () => { socketio.emit('cancel'); }, - emitUploadImage: (payload: InvokeAI.UploadImagePayload) => { - const { file, destination } = payload; - socketio.emit('uploadImage', file, file.name, destination); - }, - emitUploadMaskImage: (file: File) => { - socketio.emit('uploadMaskImage', file, file.name); - }, + // emitUploadImage: (payload: InvokeAI.UploadImagePayload) => { + // const { file, destination } = payload; + // socketio.emit('uploadImage', file, file.name, destination); + // }, + // emitUploadMaskImage: (file: File) => { + // socketio.emit('uploadMaskImage', file, file.name); + // }, emitRequestSystemConfig: () => { socketio.emit('requestSystemConfig'); }, diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 935fd9c42d..1ec854d61e 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -103,20 +103,28 @@ const makeSocketIOListeners = ( onGenerationResult: (data: InvokeAI.ImageResultResponse) => { try { const { shouldLoopback, activeTab } = getState().options; + const { boundingBox: _, generationMode, ...rest } = data; + const newImage = { uuid: uuidv4(), - ...data, - category: 'result', + ...rest, }; - dispatch( - addImage({ - category: 'result', - image: newImage, - }) - ); + if (['txt2img', 'img2img'].includes(generationMode)) { + newImage.category = 'result'; + dispatch( + addImage({ + category: 'result', + image: newImage, + }) + ); + } - if (data.generationMode === 'outpainting' && data.boundingBox) { + if ( + ['inpainting', 'outpainting'].includes(generationMode) && + data.boundingBox + ) { + newImage.category = 'temp'; const { boundingBox } = data; dispatch( addImageToOutpainting({ @@ -140,6 +148,8 @@ const makeSocketIOListeners = ( } } + dispatch(clearIntermediateImage()); + dispatch( addLogEntry({ timestamp: dateFormat(new Date(), 'isoDateTime'), @@ -368,16 +378,16 @@ const makeSocketIOListeners = ( /** * Callback to run when we receive a 'maskImageUploaded' event. */ - onMaskImageUploaded: (data: InvokeAI.ImageUrlResponse) => { - const { url } = data; - dispatch(setMaskPath(url)); - dispatch( - addLogEntry({ - timestamp: dateFormat(new Date(), 'isoDateTime'), - message: `Mask image uploaded: ${url}`, - }) - ); - }, + // onMaskImageUploaded: (data: InvokeAI.ImageUrlResponse) => { + // const { url } = data; + // dispatch(setMaskPath(url)); + // dispatch( + // addLogEntry({ + // timestamp: dateFormat(new Date(), 'isoDateTime'), + // message: `Mask image uploaded: ${url}`, + // }) + // ); + // }, onSystemConfig: (data: InvokeAI.SystemConfig) => { dispatch(setSystemConfig(data)); }, diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 4095706e27..ac17884128 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -44,7 +44,7 @@ export const socketioMiddleware = () => { onProcessingCanceled, onImageDeleted, // onImageUploaded, - onMaskImageUploaded, + // onMaskImageUploaded, onSystemConfig, onModelChanged, onModelChangeFailed, @@ -58,8 +58,8 @@ export const socketioMiddleware = () => { emitRequestImages, emitRequestNewImages, emitCancelProcessing, - emitUploadImage, - emitUploadMaskImage, + // emitUploadImage, + // emitUploadMaskImage, emitRequestSystemConfig, emitRequestModelChange, } = makeSocketIOEmitters(store, socketio); @@ -108,9 +108,9 @@ export const socketioMiddleware = () => { // onImageUploaded(data); // }); - socketio.on('maskImageUploaded', (data: InvokeAI.ImageUrlResponse) => { - onMaskImageUploaded(data); - }); + // socketio.on('maskImageUploaded', (data: InvokeAI.ImageUrlResponse) => { + // onMaskImageUploaded(data); + // }); socketio.on('systemConfig', (data: InvokeAI.SystemConfig) => { onSystemConfig(data); @@ -166,15 +166,15 @@ export const socketioMiddleware = () => { break; } - case 'socketio/uploadImage': { - emitUploadImage(action.payload); - break; - } + // case 'socketio/uploadImage': { + // emitUploadImage(action.payload); + // break; + // } - case 'socketio/uploadMaskImage': { - emitUploadMaskImage(action.payload); - break; - } + // case 'socketio/uploadMaskImage': { + // emitUploadMaskImage(action.payload); + // break; + // } case 'socketio/requestSystemConfig': { emitRequestSystemConfig(); diff --git a/frontend/src/features/canvas/util/layerToBlob.ts b/frontend/src/features/canvas/util/layerToDataURL.ts similarity index 67% rename from frontend/src/features/canvas/util/layerToBlob.ts rename to frontend/src/features/canvas/util/layerToDataURL.ts index 7f8681ff27..4317003025 100644 --- a/frontend/src/features/canvas/util/layerToBlob.ts +++ b/frontend/src/features/canvas/util/layerToDataURL.ts @@ -1,6 +1,6 @@ import Konva from 'konva'; -const layerToBlob = async (layer: Konva.Layer, stageScale: number) => { +const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { const tempScale = layer.scale(); const { x: relativeX, y: relativeY } = layer.getClientRect({ @@ -15,12 +15,12 @@ const layerToBlob = async (layer: Konva.Layer, stageScale: number) => { const clientRect = layer.getClientRect(); - const blob = await layer.toBlob(clientRect); + const dataURL = layer.toDataURL(clientRect); // Unscale the canvas layer.scale(tempScale); - return { blob, relativeX, relativeY }; + return { dataURL, relativeX, relativeY }; }; -export default layerToBlob; +export default layerToDataURL; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 28105b6d63..55f69394da 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -4,7 +4,7 @@ import Konva from 'konva'; import { MutableRefObject } from 'react'; import * as InvokeAI from 'app/invokeai'; import { v4 as uuidv4 } from 'uuid'; -import layerToBlob from './layerToBlob'; +import layerToDataURL from './layerToDataURL'; export const mergeAndUploadCanvas = createAsyncThunk( 'canvas/mergeAndUploadCanvas', @@ -25,16 +25,17 @@ export const mergeAndUploadCanvas = createAsyncThunk( if (!canvasImageLayerRef.current) return; - const { blob, relativeX, relativeY } = await layerToBlob( + const { dataURL, relativeX, relativeY } = layerToDataURL( canvasImageLayerRef.current, stageScale ); - if (!blob) return; + if (!dataURL) return; const formData = new FormData(); - formData.append('file', blob as Blob, 'merged_canvas.png'); + formData.append('dataURL', dataURL); + formData.append('filename', 'merged_canvas.png'); formData.append('kind', saveToGallery ? 'result' : 'temp'); const response = await fetch(window.location.origin + '/upload', { From cfb87bc116be3401ef637e758e239a3bf311dc34 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:02:08 +1100 Subject: [PATCH 057/220] WIP refactor to unified canvas --- frontend/src/app/socketio/listeners.ts | 19 +- .../features/canvas/IAICanvasMaskLines.tsx | 16 +- .../canvas/IAICanvasObjectRenderer.tsx | 13 +- .../canvas/IAICanvasOutpaintingControls.tsx | 44 ++- .../src/features/canvas/IAICanvasResizer.tsx | 91 +++++-- .../src/features/canvas/canvasReducers.ts | 168 ++++++------ frontend/src/features/canvas/canvasSlice.ts | 250 +++++++++++++----- .../canvas/util/calculateCoordinates.ts | 17 ++ .../features/canvas/util/calculateScale.ts | 14 + .../src/features/tabs/CanvasWorkarea.scss | 1 + 10 files changed, 434 insertions(+), 199 deletions(-) create mode 100644 frontend/src/features/canvas/util/calculateCoordinates.ts create mode 100644 frontend/src/features/canvas/util/calculateScale.ts diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 1ec854d61e..842129d267 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -38,7 +38,7 @@ import { requestSystemConfig, } from './actions'; import { - addImageToOutpainting, + addImageToStagingArea, setImageToInpaint, } from 'features/canvas/canvasSlice'; import { tabMap } from 'features/tabs/InvokeTabs'; @@ -126,12 +126,17 @@ const makeSocketIOListeners = ( ) { newImage.category = 'temp'; const { boundingBox } = data; - dispatch( - addImageToOutpainting({ - image: newImage, - boundingBox, - }) - ); + + if (generationMode === 'inpainting') { + dispatch(setImageToInpaint(newImage)); + } else { + dispatch( + addImageToStagingArea({ + image: newImage, + boundingBox, + }) + ); + } } if (shouldLoopback) { diff --git a/frontend/src/features/canvas/IAICanvasMaskLines.tsx b/frontend/src/features/canvas/IAICanvasMaskLines.tsx index c55dcd70e5..2782c101bb 100644 --- a/frontend/src/features/canvas/IAICanvasMaskLines.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskLines.tsx @@ -2,13 +2,17 @@ import { GroupConfig } from 'konva/lib/Group'; import { Group, Line } from 'react-konva'; import { useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; -import { currentCanvasSelector, isCanvasMaskLine } from './canvasSlice'; +import { + canvasClipSelector, + currentCanvasSelector, + isCanvasMaskLine, +} from './canvasSlice'; import _ from 'lodash'; export const canvasLinesSelector = createSelector( - currentCanvasSelector, - (currentCanvas) => { - return currentCanvas.layerState.objects; + [currentCanvasSelector, canvasClipSelector], + (currentCanvas, canvasClip) => { + return { objects: currentCanvas.layerState.objects, canvasClip }; }, { memoizeOptions: { @@ -26,10 +30,10 @@ type InpaintingCanvasLinesProps = GroupConfig; */ const IAICanvasLines = (props: InpaintingCanvasLinesProps) => { const { ...rest } = props; - const objects = useAppSelector(canvasLinesSelector); + const { objects, canvasClip } = useAppSelector(canvasLinesSelector); return ( - + {objects.filter(isCanvasMaskLine).map((line, i) => ( { + [currentCanvasSelector, canvasClipSelector], + (currentCanvas, canvasClip) => { const { objects } = currentCanvas.layerState; + return { objects, + canvasClip, }; }, { @@ -26,12 +31,12 @@ const selector = createSelector( ); const IAICanvasObjectRenderer = () => { - const { objects } = useAppSelector(selector); + const { objects, canvasClip } = useAppSelector(selector); if (!objects) return null; return ( - + {objects.map((obj, i) => { if (isCanvasBaseImage(obj)) { return ( diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx index fd277bd521..5a5ff05222 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx +++ b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx @@ -4,15 +4,18 @@ import { currentCanvasSelector, isStagingSelector, resetCanvas, + resetCanvasView, + setCanvasMode, setTool, } from './canvasSlice'; -import { useAppDispatch, useAppSelector } from 'app/store'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; -import { canvasImageLayerRef } from './IAICanvas'; +import { canvasImageLayerRef, stageRef } from './IAICanvas'; import IAIIconButton from 'common/components/IAIIconButton'; import { FaArrowsAlt, FaCopy, + FaCrosshairs, FaDownload, FaLayerGroup, FaSave, @@ -26,15 +29,21 @@ import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; +import IAICheckbox from 'common/components/IAICheckbox'; export const canvasControlsSelector = createSelector( - [currentCanvasSelector, isStagingSelector], - (currentCanvas, isStaging) => { + [ + (state: RootState) => state.canvas, + currentCanvasSelector, + isStagingSelector, + ], + (canvas, currentCanvas, isStaging) => { const { tool } = currentCanvas; - + const { mode } = canvas; return { tool, isStaging, + mode, }; }, { @@ -46,7 +55,7 @@ export const canvasControlsSelector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool, isStaging } = useAppSelector(canvasControlsSelector); + const { tool, isStaging, mode } = useAppSelector(canvasControlsSelector); return (
@@ -110,6 +119,20 @@ const IAICanvasOutpaintingControls = () => { tooltip="Upload" icon={} /> + } + onClick={() => { + if (!stageRef.current || !canvasImageLayerRef.current) return; + const clientRect = canvasImageLayerRef.current.getClientRect({skipTransform: true}); + dispatch( + resetCanvasView({ + clientRect, + }) + ); + }} + /> { onClick={() => dispatch(resetCanvas())} /> + + dispatch( + setCanvasMode(e.target.checked ? 'inpainting' : 'outpainting') + ) + } + />
); }; diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/IAICanvasResizer.tsx index 92a4375db5..ad2f651268 100644 --- a/frontend/src/features/canvas/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/IAICanvasResizer.tsx @@ -4,66 +4,107 @@ import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { baseCanvasImageSelector, - CanvasState, - setStageDimensions, - setStageScale, + currentCanvasSelector, + initializeCanvas, + resizeCanvas, + setDoesCanvasNeedScaling, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; const canvasResizerSelector = createSelector( (state: RootState) => state.canvas, + currentCanvasSelector, baseCanvasImageSelector, activeTabNameSelector, - (canvas: CanvasState, baseCanvasImage, activeTabName) => { - const { doesCanvasNeedScaling } = canvas; - + (canvas, currentCanvas, baseCanvasImage, activeTabName) => { + const { doesCanvasNeedScaling, mode, isCanvasInitialized } = canvas; return { doesCanvasNeedScaling, + mode, activeTabName, baseCanvasImage, + isCanvasInitialized, }; } ); const IAICanvasResizer = () => { const dispatch = useAppDispatch(); - const { doesCanvasNeedScaling, activeTabName, baseCanvasImage } = - useAppSelector(canvasResizerSelector); + const { + doesCanvasNeedScaling, + mode, + activeTabName, + baseCanvasImage, + isCanvasInitialized, + } = useAppSelector(canvasResizerSelector); const ref = useRef(null); useLayoutEffect(() => { window.setTimeout(() => { if (!ref.current) return; - const { width: imageWidth, height: imageHeight } = baseCanvasImage?.image - ? baseCanvasImage.image - : { width: 512, height: 512 }; + const { clientWidth, clientHeight } = ref.current; - const scale = Math.min( - 1, - Math.min(clientWidth / imageWidth, clientHeight / imageHeight) - ); + if (!baseCanvasImage?.image) return; - dispatch(setStageScale(scale)); + const { width: imageWidth, height: imageHeight } = baseCanvasImage.image; - if (activeTabName === 'inpainting') { + if (!isCanvasInitialized) { dispatch( - setStageDimensions({ - width: Math.floor(imageWidth * scale), - height: Math.floor(imageHeight * scale), + initializeCanvas({ + clientWidth, + clientHeight, + imageWidth, + imageHeight, }) ); - } else if (activeTabName === 'outpainting') { + } else { dispatch( - setStageDimensions({ - width: Math.floor(clientWidth), - height: Math.floor(clientHeight), + resizeCanvas({ + clientWidth, + clientHeight, }) ); } + + dispatch(setDoesCanvasNeedScaling(false)); + // } + // if ((activeTabName === 'inpainting') && baseCanvasImage?.image) { + // const { width: imageWidth, height: imageHeight } = + // baseCanvasImage.image; + + // const scale = Math.min( + // 1, + // Math.min(clientWidth / imageWidth, clientHeight / imageHeight) + // ); + + // dispatch(setStageScale(scale)); + + // dispatch( + // setStageDimensions({ + // width: Math.floor(imageWidth * scale), + // height: Math.floor(imageHeight * scale), + // }) + // ); + // dispatch(setDoesCanvasNeedScaling(false)); + // } else if (activeTabName === 'outpainting') { + // dispatch( + // setStageDimensions({ + // width: Math.floor(clientWidth), + // height: Math.floor(clientHeight), + // }) + // ); + // dispatch(setDoesCanvasNeedScaling(false)); + // } }, 0); - }, [dispatch, baseCanvasImage, doesCanvasNeedScaling, activeTabName]); + }, [ + dispatch, + baseCanvasImage, + doesCanvasNeedScaling, + activeTabName, + isCanvasInitialized, + ]); return (
diff --git a/frontend/src/features/canvas/canvasReducers.ts b/frontend/src/features/canvas/canvasReducers.ts index 094a1eed4f..c7aefbc55b 100644 --- a/frontend/src/features/canvas/canvasReducers.ts +++ b/frontend/src/features/canvas/canvasReducers.ts @@ -2,101 +2,93 @@ import * as InvokeAI from 'app/invokeai'; import { PayloadAction } from '@reduxjs/toolkit'; import { CanvasState, Dimensions, initialLayerState } from './canvasSlice'; import { Vector2d } from 'konva/lib/types'; -import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; +import { + roundDownToMultiple, + roundToMultiple, +} from 'common/util/roundDownToMultiple'; +import _ from 'lodash'; -export const setImageToInpaint_reducer = ( +// export const setInitialInpaintingImage = ( +// state: CanvasState, +// image: InvokeAI.Image +// // action: PayloadAction +// ) => { +// const { width: canvasWidth, height: canvasHeight } = +// state.inpainting.stageDimensions; +// const { width, height } = state.inpainting.boundingBoxDimensions; +// const { x, y } = state.inpainting.boundingBoxCoordinates; + +// const maxWidth = Math.min(image.width, canvasWidth); +// const maxHeight = Math.min(image.height, canvasHeight); + +// const newCoordinates: Vector2d = { x, y }; +// const newDimensions: Dimensions = { width, height }; + +// if (width + x > maxWidth) { +// // Bounding box at least needs to be translated +// if (width > maxWidth) { +// // Bounding box also needs to be resized +// newDimensions.width = roundDownToMultiple(maxWidth, 64); +// } +// newCoordinates.x = maxWidth - newDimensions.width; +// } + +// if (height + y > maxHeight) { +// // Bounding box at least needs to be translated +// if (height > maxHeight) { +// // Bounding box also needs to be resized +// newDimensions.height = roundDownToMultiple(maxHeight, 64); +// } +// newCoordinates.y = maxHeight - newDimensions.height; +// } + +// state.inpainting.boundingBoxDimensions = newDimensions; +// state.inpainting.boundingBoxCoordinates = newCoordinates; + +// state.inpainting.pastLayerStates.push(state.inpainting.layerState); + +// state.inpainting.layerState = { +// ...initialLayerState, +// objects: [ +// { +// kind: 'image', +// layer: 'base', +// x: 0, +// y: 0, +// width: image.width, +// height: image.height, +// image: image, +// }, +// ], +// }; + +// state.outpainting.futureLayerStates = []; +// state.doesCanvasNeedScaling = true; +// }; + +export const setInitialCanvasImage = ( state: CanvasState, image: InvokeAI.Image - // action: PayloadAction ) => { - const { width: canvasWidth, height: canvasHeight } = - state.inpainting.stageDimensions; - const { width, height } = state.inpainting.boundingBoxDimensions; - const { x, y } = state.inpainting.boundingBoxCoordinates; - - const maxWidth = Math.min(image.width, canvasWidth); - const maxHeight = Math.min(image.height, canvasHeight); - - const newCoordinates: Vector2d = { x, y }; - const newDimensions: Dimensions = { width, height }; - - if (width + x > maxWidth) { - // Bounding box at least needs to be translated - if (width > maxWidth) { - // Bounding box also needs to be resized - newDimensions.width = roundDownToMultiple(maxWidth, 64); - } - newCoordinates.x = maxWidth - newDimensions.width; - } - - if (height + y > maxHeight) { - // Bounding box at least needs to be translated - if (height > maxHeight) { - // Bounding box also needs to be resized - newDimensions.height = roundDownToMultiple(maxHeight, 64); - } - newCoordinates.y = maxHeight - newDimensions.height; - } - - state.inpainting.boundingBoxDimensions = newDimensions; - state.inpainting.boundingBoxCoordinates = newCoordinates; - - state.inpainting.pastLayerStates.push(state.inpainting.layerState); - - state.inpainting.layerState = { - ...initialLayerState, - objects: [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - width: image.width, - height: image.height, - image: image, - }, - ], + const newBoundingBoxDimensions = { + width: roundDownToMultiple(_.clamp(image.width, 64, 512), 64), + height: roundDownToMultiple(_.clamp(image.height, 64, 512), 64), }; - state.outpainting.futureLayerStates = []; - state.doesCanvasNeedScaling = true; -}; + const newBoundingBoxCoordinates = { + x: roundToMultiple( + image.width / 2 - newBoundingBoxDimensions.width / 2, + 64 + ), + y: roundToMultiple( + image.height / 2 - newBoundingBoxDimensions.height / 2, + 64 + ), + }; -export const setImageToOutpaint_reducer = ( - state: CanvasState, - image: InvokeAI.Image -) => { - const { width: canvasWidth, height: canvasHeight } = - state.outpainting.stageDimensions; - const { width, height } = state.outpainting.boundingBoxDimensions; - const { x, y } = state.outpainting.boundingBoxCoordinates; + state.outpainting.boundingBoxDimensions = newBoundingBoxDimensions; - const maxWidth = Math.min(image.width, canvasWidth); - const maxHeight = Math.min(image.height, canvasHeight); - - const newCoordinates: Vector2d = { x, y }; - const newDimensions: Dimensions = { width, height }; - - if (width + x > maxWidth) { - // Bounding box at least needs to be translated - if (width > maxWidth) { - // Bounding box also needs to be resized - newDimensions.width = roundDownToMultiple(maxWidth, 64); - } - newCoordinates.x = maxWidth - newDimensions.width; - } - - if (height + y > maxHeight) { - // Bounding box at least needs to be translated - if (height > maxHeight) { - // Bounding box also needs to be resized - newDimensions.height = roundDownToMultiple(maxHeight, 64); - } - newCoordinates.y = maxHeight - newDimensions.height; - } - - state.outpainting.boundingBoxDimensions = newDimensions; - state.outpainting.boundingBoxCoordinates = newCoordinates; + state.outpainting.boundingBoxCoordinates = newBoundingBoxCoordinates; state.outpainting.pastLayerStates.push(state.outpainting.layerState); state.outpainting.layerState = { @@ -114,5 +106,7 @@ export const setImageToOutpaint_reducer = ( ], }; state.outpainting.futureLayerStates = []; + + state.isCanvasInitialized = false; state.doesCanvasNeedScaling = true; }; diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index 81477a1a82..e5c10810cd 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -2,6 +2,7 @@ import { createAsyncThunk, createSelector, createSlice, + current, } from '@reduxjs/toolkit'; import { v4 as uuidv4 } from 'uuid'; import type { PayloadAction } from '@reduxjs/toolkit'; @@ -17,49 +18,50 @@ import { tabMap } from 'features/tabs/InvokeTabs'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; import { uploadImage } from 'features/gallery/util/uploadImage'; -import { - setImageToInpaint_reducer, - setImageToOutpaint_reducer, -} from './canvasReducers'; +import { setInitialCanvasImage } from './canvasReducers'; +import calculateScale from './util/calculateScale'; +import calculateCoordinates from './util/calculateCoordinates'; export interface GenericCanvasState { - tool: CanvasTool; - brushSize: number; - brushColor: RgbaColor; - eraserSize: number; - maskColor: RgbaColor; - cursorPosition: Vector2d | null; - stageDimensions: Dimensions; - stageCoordinates: Vector2d; - boundingBoxDimensions: Dimensions; boundingBoxCoordinates: Vector2d; + boundingBoxDimensions: Dimensions; boundingBoxPreviewFill: RgbaColor; - shouldShowBoundingBox: boolean; - shouldDarkenOutsideBoundingBox: boolean; - isMaskEnabled: boolean; - shouldPreserveMaskedArea: boolean; - shouldShowCheckboardTransparency: boolean; - shouldShowBrush: boolean; - shouldShowBrushPreview: boolean; - stageScale: number; - isDrawing: boolean; - isTransformingBoundingBox: boolean; - isMouseOverBoundingBox: boolean; - isMovingBoundingBox: boolean; - isMovingStage: boolean; - shouldUseInpaintReplace: boolean; + brushColor: RgbaColor; + brushSize: number; + cursorPosition: Vector2d | null; + eraserSize: number; + futureLayerStates: CanvasLayerState[]; inpaintReplace: number; - shouldLockBoundingBox: boolean; + intermediateImage?: InvokeAI.Image; + isDrawing: boolean; + isMaskEnabled: boolean; + isMouseOverBoundingBox: boolean; isMoveBoundingBoxKeyHeld: boolean; isMoveStageKeyHeld: boolean; - intermediateImage?: InvokeAI.Image; - shouldShowIntermediates: boolean; - maxHistory: number; + isMovingBoundingBox: boolean; + isMovingStage: boolean; + isTransformingBoundingBox: boolean; layerState: CanvasLayerState; + maskColor: RgbaColor; + maxHistory: number; pastLayerStates: CanvasLayerState[]; - futureLayerStates: CanvasLayerState[]; + shouldDarkenOutsideBoundingBox: boolean; + shouldLockBoundingBox: boolean; + shouldPreserveMaskedArea: boolean; + shouldShowBoundingBox: boolean; + shouldShowBrush: boolean; + shouldShowBrushPreview: boolean; + shouldShowCheckboardTransparency: boolean; + shouldShowIntermediates: boolean; + shouldUseInpaintReplace: boolean; + stageCoordinates: Vector2d; + stageDimensions: Dimensions; + stageScale: number; + tool: CanvasTool; } +export type CanvasMode = 'inpainting' | 'outpainting'; + export type CanvasLayer = 'base' | 'mask'; export type CanvasDrawingTool = 'brush' | 'eraser'; @@ -145,6 +147,8 @@ export interface CanvasState { currentCanvas: ValidCanvasName; inpainting: InpaintingCanvasState; outpainting: OutpaintingCanvasState; + mode: CanvasMode; + isCanvasInitialized: boolean; } export const initialLayerState: CanvasLayerState = { @@ -160,45 +164,47 @@ export const initialLayerState: CanvasLayerState = { }; const initialGenericCanvasState: GenericCanvasState = { - tool: 'brush', + boundingBoxCoordinates: { x: 0, y: 0 }, + boundingBoxDimensions: { width: 512, height: 512 }, + boundingBoxPreviewFill: { r: 0, g: 0, b: 0, a: 0.5 }, brushColor: { r: 90, g: 90, b: 255, a: 1 }, brushSize: 50, - maskColor: { r: 255, g: 90, b: 90, a: 1 }, - eraserSize: 50, - stageDimensions: { width: 0, height: 0 }, - stageCoordinates: { x: 0, y: 0 }, - boundingBoxDimensions: { width: 512, height: 512 }, - boundingBoxCoordinates: { x: 0, y: 0 }, - boundingBoxPreviewFill: { r: 0, g: 0, b: 0, a: 0.5 }, - shouldShowBoundingBox: true, - shouldDarkenOutsideBoundingBox: false, cursorPosition: null, - isMaskEnabled: true, - shouldPreserveMaskedArea: false, - shouldShowCheckboardTransparency: false, - shouldShowBrush: true, - shouldShowBrushPreview: false, - isDrawing: false, - isTransformingBoundingBox: false, - isMouseOverBoundingBox: false, - isMovingBoundingBox: false, - stageScale: 1, - shouldUseInpaintReplace: false, + eraserSize: 50, + futureLayerStates: [], inpaintReplace: 0.1, - shouldLockBoundingBox: false, + isDrawing: false, + isMaskEnabled: true, + isMouseOverBoundingBox: false, isMoveBoundingBoxKeyHeld: false, isMoveStageKeyHeld: false, - shouldShowIntermediates: true, + isMovingBoundingBox: false, isMovingStage: false, - maxHistory: 128, + isTransformingBoundingBox: false, layerState: initialLayerState, - futureLayerStates: [], + maskColor: { r: 255, g: 90, b: 90, a: 1 }, + maxHistory: 128, pastLayerStates: [], + shouldDarkenOutsideBoundingBox: false, + shouldLockBoundingBox: false, + shouldPreserveMaskedArea: false, + shouldShowBoundingBox: true, + shouldShowBrush: true, + shouldShowBrushPreview: false, + shouldShowCheckboardTransparency: false, + shouldShowIntermediates: true, + shouldUseInpaintReplace: false, + stageCoordinates: { x: 0, y: 0 }, + stageDimensions: { width: 0, height: 0 }, + stageScale: 1, + tool: 'brush', }; const initialCanvasState: CanvasState = { currentCanvas: 'inpainting', doesCanvasNeedScaling: false, + mode: 'outpainting', + isCanvasInitialized: false, inpainting: { layer: 'mask', ...initialGenericCanvasState, @@ -293,10 +299,10 @@ export const canvasSlice = createSlice({ // state.inpainting.imageToInpaint = undefined; }, setImageToOutpaint: (state, action: PayloadAction) => { - setImageToOutpaint_reducer(state, action.payload); + setInitialCanvasImage(state, action.payload); }, setImageToInpaint: (state, action: PayloadAction) => { - setImageToInpaint_reducer(state, action.payload); + setInitialCanvasImage(state, action.payload); }, setStageDimensions: (state, action: PayloadAction) => { state[state.currentCanvas].stageDimensions = action.payload; @@ -412,7 +418,6 @@ export const canvasSlice = createSlice({ }, setStageScale: (state, action: PayloadAction) => { state[state.currentCanvas].stageScale = action.payload; - state.doesCanvasNeedScaling = false; }, setShouldDarkenOutsideBoundingBox: ( state, @@ -462,7 +467,7 @@ export const canvasSlice = createSlice({ setCurrentCanvas: (state, action: PayloadAction) => { state.currentCanvas = action.payload; }, - addImageToOutpainting: ( + addImageToStagingArea: ( state, action: PayloadAction<{ boundingBox: IRect; @@ -590,6 +595,99 @@ export const canvasSlice = createSlice({ state[state.currentCanvas].layerState = initialLayerState; state[state.currentCanvas].futureLayerStates = []; }, + initializeCanvas: ( + state, + action: PayloadAction<{ + clientWidth: number; + clientHeight: number; + imageWidth: number; + imageHeight: number; + }> + ) => { + const { clientWidth, clientHeight, imageWidth, imageHeight } = + action.payload; + + const currentCanvas = state[state.currentCanvas]; + + const newScale = calculateScale( + clientWidth, + clientHeight, + imageWidth, + imageHeight + ); + + const newCoordinates = calculateCoordinates( + clientWidth, + clientHeight, + 0, + 0, + imageWidth, + imageHeight, + newScale + ); + + currentCanvas.stageScale = newScale; + currentCanvas.stageCoordinates = newCoordinates; + + currentCanvas.stageDimensions = { + width: Math.floor(clientWidth), + height: Math.floor(clientHeight), + }; + state.isCanvasInitialized = true; + }, + resizeCanvas: ( + state, + action: PayloadAction<{ + clientWidth: number; + clientHeight: number; + }> + ) => { + const { clientWidth, clientHeight } = action.payload; + + const currentCanvas = state[state.currentCanvas]; + + currentCanvas.stageDimensions = { + width: Math.floor(clientWidth), + height: Math.floor(clientHeight), + }; + }, + resetCanvasView: ( + state, + action: PayloadAction<{ + clientRect: IRect; + }> + ) => { + const { clientRect } = action.payload; + const currentCanvas = state[state.currentCanvas]; + const baseCanvasImage = + currentCanvas.layerState.objects.find(isCanvasBaseImage); + + if (!baseCanvasImage) return; + + const { + stageDimensions: { width: stageWidth, height: stageHeight }, + } = currentCanvas; + + const { x, y, width, height } = clientRect; + + const newScale = calculateScale(stageWidth, stageHeight, width, height); + const newCoordinates = calculateCoordinates( + stageWidth, + stageHeight, + x, + y, + width, + height, + newScale + ); + + currentCanvas.stageScale = newScale; + + currentCanvas.stageCoordinates = { + x: stageWidth / 2 - (x + width / 2) * newScale, + y: stageHeight / 2 - (y + height / 2) * newScale, + }; + }, nextStagingAreaImage: (state) => { const currentIndex = state.outpainting.layerState.stagingArea.selectedImageIndex; @@ -630,6 +728,9 @@ export const canvasSlice = createSlice({ currentCanvas.futureLayerStates = []; }, + setCanvasMode: (state, action: PayloadAction) => { + state.mode = action.payload; + }, }, extraReducers: (builder) => { builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { @@ -661,9 +762,9 @@ export const canvasSlice = createSlice({ if (kind !== 'init') return; if (activeTabName === 'inpainting') { - setImageToInpaint_reducer(state, image); + setInitialCanvasImage(state, image); } else if (activeTabName === 'outpainting') { - setImageToOutpaint_reducer(state, image); + setInitialCanvasImage(state, image); } }); }, @@ -712,7 +813,7 @@ export const { setIsMoveStageKeyHeld, setStageCoordinates, setCurrentCanvas, - addImageToOutpainting, + addImageToStagingArea, resetCanvas, setShouldShowGrid, setShouldSnapToGrid, @@ -723,6 +824,10 @@ export const { prevStagingAreaImage, commitStagingAreaImage, discardStagedImages, + setCanvasMode, + initializeCanvas, + resizeCanvas, + resetCanvasView, } = canvasSlice.actions; export default canvasSlice.reducer; @@ -742,9 +847,26 @@ export const inpaintingCanvasSelector = ( state: RootState ): InpaintingCanvasState => state.canvas.inpainting; +export const canvasModeSelector = (state: RootState): CanvasMode => + state.canvas.mode; + export const baseCanvasImageSelector = createSelector( [currentCanvasSelector], (currentCanvas) => { return currentCanvas.layerState.objects.find(isCanvasBaseImage); } ); + +export const canvasClipSelector = createSelector( + [canvasModeSelector, baseCanvasImageSelector], + (canvasMode, baseCanvasImage) => { + return canvasMode === 'inpainting' + ? { + clipX: 0, + clipY: 0, + clipWidth: baseCanvasImage?.width, + clipHeight: baseCanvasImage?.height, + } + : {}; + } +); diff --git a/frontend/src/features/canvas/util/calculateCoordinates.ts b/frontend/src/features/canvas/util/calculateCoordinates.ts new file mode 100644 index 0000000000..c05a750979 --- /dev/null +++ b/frontend/src/features/canvas/util/calculateCoordinates.ts @@ -0,0 +1,17 @@ +import { Vector2d } from 'konva/lib/types'; + +const calculateCoordinates = ( + containerWidth: number, + containerHeight: number, + containerX: number, + containerY: number, + contentWidth: number, + contentHeight: number, + scale: number +): Vector2d => { + const x = containerWidth / 2 - (containerX + contentWidth / 2) * scale; + const y = containerHeight / 2 - (containerY + contentHeight / 2) * scale; + return { x, y }; +}; + +export default calculateCoordinates; diff --git a/frontend/src/features/canvas/util/calculateScale.ts b/frontend/src/features/canvas/util/calculateScale.ts new file mode 100644 index 0000000000..954c36869c --- /dev/null +++ b/frontend/src/features/canvas/util/calculateScale.ts @@ -0,0 +1,14 @@ +const calculateScale = ( + containerWidth: number, + containerHeight: number, + contentWidth: number, + contentHeight: number, + padding = 0.95 +): number => { + const scaleX = (containerWidth * padding) / contentWidth; + const scaleY = (containerHeight * padding) / contentHeight; + const scaleFit = Math.min(1, Math.min(scaleX, scaleY)); + return scaleFit; +}; + +export default calculateScale; diff --git a/frontend/src/features/tabs/CanvasWorkarea.scss b/frontend/src/features/tabs/CanvasWorkarea.scss index f83d8f8441..a1a743fdeb 100644 --- a/frontend/src/features/tabs/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/CanvasWorkarea.scss @@ -44,6 +44,7 @@ display: flex; flex-direction: column; align-items: center; + justify-content: center; row-gap: 1rem; width: 100%; height: 100%; From caf8f0ae3585f1d87ac5a6b7c15ba8f4abef6a41 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:53:42 +1100 Subject: [PATCH 058/220] Removes console.log from redux-persist patch --- frontend/patches/redux-persist+6.0.0.patch | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/patches/redux-persist+6.0.0.patch b/frontend/patches/redux-persist+6.0.0.patch index f30381ddd4..9e0a8492db 100644 --- a/frontend/patches/redux-persist+6.0.0.patch +++ b/frontend/patches/redux-persist+6.0.0.patch @@ -1,14 +1,8 @@ diff --git a/node_modules/redux-persist/es/createPersistoid.js b/node_modules/redux-persist/es/createPersistoid.js -index 8b43b9a..ffe8d3f 100644 +index 8b43b9a..184faab 100644 --- a/node_modules/redux-persist/es/createPersistoid.js +++ b/node_modules/redux-persist/es/createPersistoid.js -@@ -1,11 +1,13 @@ - import { KEY_PREFIX, REHYDRATE } from './constants'; - // @TODO remove once flow < 0.63 support is no longer required. - export default function createPersistoid(config) { -+ console.log(config) - // defaults - var blacklist = config.blacklist || null; +@@ -6,6 +6,7 @@ export default function createPersistoid(config) { var whitelist = config.whitelist || null; var transforms = config.transforms || []; var throttle = config.throttle || 0; @@ -16,7 +10,7 @@ index 8b43b9a..ffe8d3f 100644 var storageKey = "".concat(config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX).concat(config.key); var storage = config.storage; var serialize; -@@ -28,30 +30,37 @@ export default function createPersistoid(config) { +@@ -28,30 +29,37 @@ export default function createPersistoid(config) { var timeIterator = null; var writePromise = null; From 15dd1339d276e61ebb01aeb636a3c8ba697de6a6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:56:48 +1100 Subject: [PATCH 059/220] Initial unification of canvas --- backend/invoke_ai_web_server.py | 38 ++- frontend/src/app/invokeai.d.ts | 7 +- frontend/src/app/store.ts | 3 +- frontend/src/features/canvas/IAICanvas.tsx | 66 ++++- .../features/canvas/IAICanvasBoundingBox.tsx | 95 +++----- .../features/canvas/IAICanvasMaskLines.tsx | 16 +- .../canvas/IAICanvasObjectRenderer.tsx | 13 +- .../canvas/IAICanvasOutpaintingControls.tsx | 35 ++- .../src/features/canvas/IAICanvasResizer.tsx | 38 +-- .../features/canvas/IAICanvasStagingArea.tsx | 4 +- .../canvas/IAICanvasStagingAreaToolbar.tsx | 140 +++++++++++ frontend/src/features/canvas/canvasSlice.ts | 228 ++++++++---------- .../canvas/hooks/useCanvasDragMove.ts | 14 +- .../features/canvas/hooks/useCanvasZoom.ts | 86 +++++-- .../features/canvas/util/floorCoordinates.ts | 10 + .../features/canvas/util/layerToDataURL.ts | 21 +- .../canvas/util/mergeAndUploadCanvas.ts | 37 ++- frontend/src/features/gallery/gallerySlice.ts | 2 +- .../src/features/gallery/util/uploadImage.ts | 23 +- 19 files changed, 580 insertions(+), 296 deletions(-) create mode 100644 frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx create mode 100644 frontend/src/features/canvas/util/floorCoordinates.ts diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index bf14133681..0a3877edf0 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -8,6 +8,7 @@ import math import io import base64 import os +import json from werkzeug.utils import secure_filename from flask import Flask, redirect, send_from_directory, request, make_response @@ -107,6 +108,7 @@ class InvokeAIWebServer: @self.app.route("/upload", methods=["POST"]) def upload(): try: + data = json.loads(request.form["data"]) filename = "" # check if the post request has the file part if "file" in request.files: @@ -116,15 +118,15 @@ class InvokeAIWebServer: if file.filename == "": return make_response("No file selected", 400) filename = file.filename - elif "dataURL" in request.form: - file = dataURL_to_bytes(request.form["dataURL"]) - if "filename" not in request.form or request.form["filename"] == "": + elif "dataURL" in data: + file = dataURL_to_bytes(data["dataURL"]) + if "filename" not in data or data["filename"] == "": return make_response("No filename provided", 400) - filename = request.form["filename"] + filename = data["filename"] else: return make_response("No file or dataURL", 400) - kind = request.form["kind"] + kind = data["kind"] if kind == "init": path = self.init_image_path @@ -153,22 +155,32 @@ class InvokeAIWebServer: file_path = os.path.join(path, name) - if "dataURL" in request.form: + if "dataURL" in data: with open(file_path, "wb") as f: f.write(file) else: file.save(file_path) mtime = os.path.getmtime(file_path) - (width, height) = Image.open(file_path).size + + pil_image = Image.open(file_path) + + # visible_image_bbox = pil_image.getbbox() + # pil_image = pil_image.crop(visible_image_bbox) + # pil_image.save(file_path) + # if "cropVisible" in data and data["cropVisible"] == True: + # visible_image_bbox = pil_image.getbbox() + # pil_image = pil_image.crop(visible_image_bbox) + # pil_image.save(file_path) + + (width, height) = pil_image.size response = { - "image": { - "url": self.get_url_from_image_path(file_path), - "mtime": mtime, - "width": width, - "height": height, - }, + "url": self.get_url_from_image_path(file_path), + "mtime": mtime, + # "bbox": visible_image_bbox, + "width": width, + "height": height, } return make_response(response, 200) diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index ac57f34c04..c8028e46f4 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -179,7 +179,12 @@ export declare type ImageResultResponse = Omit & { }; export declare type ImageUploadResponse = { - image: Omit; + // image: Omit; + url: string; + mtime: number; + width: number; + height: number; + // bbox: [number, number, number, number]; }; export declare type ErrorResponse = { diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 6b20d53982..4af37c195b 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -82,8 +82,6 @@ const rootPersistConfig = getPersistConfig({ debounce: 300, }); -// console.log(rootPersistConfig) - const persistedReducer = persistReducer(rootPersistConfig, rootReducer); // Continue with store setup @@ -95,6 +93,7 @@ export const store = configureStore({ serializableCheck: false, }).concat(socketioMiddleware()), devTools: { + // Uncommenting these very rapidly called actions makes the redux dev tools output much more readable actionsDenylist: [ // 'canvas/setCursorPosition', // 'canvas/setStageCoordinates', diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 67c7677cc1..7c7820377a 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -1,16 +1,19 @@ // lib -import { MutableRefObject, useRef } from 'react'; +import { MutableRefObject, useCallback, useRef } from 'react'; import Konva from 'konva'; import { Layer, Stage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; // app -import { useAppSelector } from 'app/store'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { baseCanvasImageSelector, currentCanvasSelector, isStagingSelector, outpaintingCanvasSelector, + setStageCoordinates, + setStageScale, + shouldLockToInitialImageSelector, } from 'features/canvas/canvasSlice'; // component @@ -35,15 +38,31 @@ import IAICanvasGrid from './IAICanvasGrid'; import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; import IAICanvasStatusText from './IAICanvasStatusText'; import IAICanvasStagingArea from './IAICanvasStagingArea'; +import IAICanvasStagingAreaToolbar from './IAICanvasStagingAreaToolbar'; +import { KonvaEventObject } from 'konva/lib/Node'; +import { + CANVAS_SCALE_BY, + MAX_CANVAS_SCALE, + MIN_CANVAS_SCALE, +} from './util/constants'; const canvasSelector = createSelector( [ + shouldLockToInitialImageSelector, currentCanvasSelector, outpaintingCanvasSelector, isStagingSelector, activeTabNameSelector, + baseCanvasImageSelector, ], - (currentCanvas, outpaintingCanvas, isStaging, activeTabName) => { + ( + shouldLockToInitialImage, + currentCanvas, + outpaintingCanvas, + isStaging, + activeTabName, + baseCanvasImage + ) => { const { isMaskEnabled, stageScale, @@ -56,6 +75,7 @@ const canvasSelector = createSelector( tool, isMovingStage, shouldShowIntermediates, + minimumStageScale, } = currentCanvas; const { shouldShowGrid } = outpaintingCanvas; @@ -89,6 +109,10 @@ const canvasSelector = createSelector( isOnOutpaintingTab: activeTabName === 'outpainting', isStaging, shouldShowIntermediates, + shouldLockToInitialImage, + activeTabName, + minimumStageScale, + baseCanvasImage, }; }, { @@ -116,8 +140,12 @@ const IAICanvas = () => { isOnOutpaintingTab, isStaging, shouldShowIntermediates, + shouldLockToInitialImage, + activeTabName, + minimumStageScale, + baseCanvasImage, } = useAppSelector(canvasSelector); - + const dispatch = useAppDispatch(); useCanvasHotkeys(); // set the closure'd refs @@ -142,6 +170,34 @@ const IAICanvas = () => { const { handleDragStart, handleDragMove, handleDragEnd } = useCanvasDragMove(); + const dragBoundFunc = useCallback( + (newCoordinates: Vector2d) => { + if (shouldLockToInitialImage && baseCanvasImage) { + newCoordinates.x = _.clamp( + newCoordinates.x, + stageDimensions.width - + Math.floor(baseCanvasImage.width * stageScale), + 0 + ); + newCoordinates.y = _.clamp( + newCoordinates.y, + stageDimensions.height - + Math.floor(baseCanvasImage.height * stageScale), + 0 + ); + } + + return newCoordinates; + }, + [ + baseCanvasImage, + shouldLockToInitialImage, + stageDimensions.height, + stageDimensions.width, + stageScale, + ] + ); + return (
@@ -157,6 +213,7 @@ const IAICanvas = () => { width={stageDimensions.width} height={stageDimensions.height} scale={{ x: stageScale, y: stageScale }} + dragBoundFunc={dragBoundFunc} onMouseDown={handleMouseDown} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseOut} @@ -205,6 +262,7 @@ const IAICanvas = () => { {isOnOutpaintingTab && } +
); diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx index 735ab0c0b8..cf1d0dab3a 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx @@ -6,8 +6,11 @@ import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; import { useCallback, useEffect, useRef } from 'react'; import { Group, Rect, Transformer } from 'react-konva'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import { roundToMultiple } from 'common/util/roundDownToMultiple'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { + roundDownToMultiple, + roundToMultiple, +} from 'common/util/roundDownToMultiple'; import { baseCanvasImageSelector, currentCanvasSelector, @@ -17,16 +20,24 @@ import { setIsMouseOverBoundingBox, setIsMovingBoundingBox, setIsTransformingBoundingBox, + shouldLockToInitialImageSelector, } from 'features/canvas/canvasSlice'; import { GroupConfig } from 'konva/lib/Group'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; const boundingBoxPreviewSelector = createSelector( + shouldLockToInitialImageSelector, currentCanvasSelector, outpaintingCanvasSelector, baseCanvasImageSelector, activeTabNameSelector, - (currentCanvas, outpaintingCanvas, baseCanvasImage, activeTabName) => { + ( + shouldLockToInitialImage, + currentCanvas, + outpaintingCanvas, + baseCanvasImage, + activeTabName + ) => { const { boundingBoxCoordinates, boundingBoxDimensions, @@ -40,6 +51,7 @@ const boundingBoxPreviewSelector = createSelector( tool, stageCoordinates, } = currentCanvas; + const { shouldSnapToGrid } = outpaintingCanvas; return { @@ -59,6 +71,7 @@ const boundingBoxPreviewSelector = createSelector( stageCoordinates, boundingBoxStrokeWidth: (isMouseOverBoundingBox ? 8 : 1) / stageScale, hitStrokeWidth: 20 / stageScale, + shouldLockToInitialImage, }; }, { @@ -91,6 +104,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { tool, boundingBoxStrokeWidth, hitStrokeWidth, + shouldLockToInitialImage, } = useAppSelector(boundingBoxPreviewSelector); const transformerRef = useRef(null); @@ -106,7 +120,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { const handleOnDragMove = useCallback( (e: KonvaEventObject) => { - if (activeTabName === 'inpainting' || !shouldSnapToGrid) { + if (!shouldSnapToGrid) { dispatch( setBoundingBoxCoordinates({ x: Math.floor(e.target.x()), @@ -132,20 +146,27 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { }) ); }, - [activeTabName, dispatch, shouldSnapToGrid] + [dispatch, shouldSnapToGrid] ); const dragBoundFunc = useCallback( (position: Vector2d) => { - if (!baseCanvasImage && activeTabName !== 'outpainting') - return boundingBoxCoordinates; + /** + * This limits the bounding box's drag coordinates. + */ + if (!shouldLockToInitialImage) return boundingBoxCoordinates; const { x, y } = position; const maxX = - stageDimensions.width - boundingBoxDimensions.width * stageScale; + stageDimensions.width - + boundingBoxDimensions.width - + (stageDimensions.width % 64); + const maxY = - stageDimensions.height - boundingBoxDimensions.height * stageScale; + stageDimensions.height - + boundingBoxDimensions.height - + (stageDimensions.height % 64); const clampedX = Math.floor(_.clamp(x, 0, maxX)); const clampedY = Math.floor(_.clamp(y, 0, maxY)); @@ -153,14 +174,12 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { return { x: clampedX, y: clampedY }; }, [ - baseCanvasImage, - activeTabName, + shouldLockToInitialImage, boundingBoxCoordinates, stageDimensions.width, stageDimensions.height, boundingBoxDimensions.width, boundingBoxDimensions.height, - stageScale, ] ); @@ -203,7 +222,6 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { rect.scaleY(1); }, [dispatch]); - // OK const anchorDragBoundFunc = useCallback( ( oldPos: Vector2d, // old absolute position of anchor point @@ -215,49 +233,14 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { * Konva does not transform with width or height. It transforms the anchor point * and scale factor. This is then sent to the shape's onTransform listeners. * - * We need to snap the new width to steps of 64 without also snapping the - * coordinates of the bounding box to steps of 64. But because the whole + * We need to snap the new dimensions to steps of 64. But because the whole * stage is scaled, our actual desired step is actually 64 * the stage scale. */ - // Difference of the old coords from the nearest multiple the scaled step - const offsetX = oldPos.x % scaledStep; - const offsetY = oldPos.y % scaledStep; - - // Round new position to the nearest multiple of the scaled step - const closestX = roundToMultiple(newPos.x, scaledStep) + offsetX; - const closestY = roundToMultiple(newPos.y, scaledStep) + offsetY; - - // the difference between the old coord and new - const diffX = Math.abs(newPos.x - closestX); - const diffY = Math.abs(newPos.y - closestY); - - // if the difference is less than the scaled step, we want to snap - const didSnapX = diffX < scaledStep; - const didSnapY = diffY < scaledStep; - - // We may not change anything, stash the old position - let newCoordinate = { ...oldPos }; - - // Set the new coords based on what snapped - if (didSnapX && !didSnapY) { - newCoordinate = { - x: closestX, - y: oldPos.y, - }; - } else if (!didSnapX && didSnapY) { - newCoordinate = { - x: oldPos.x, - y: closestY, - }; - } else if (didSnapX && didSnapY) { - newCoordinate = { - x: closestX, - y: closestY, - }; - } - - return newCoordinate; + return { + x: roundToMultiple(newPos.x, scaledStep), + y: roundToMultiple(newPos.y, scaledStep), + }; }, [scaledStep] ); @@ -272,7 +255,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { // On the Inpainting canvas, the bounding box needs to stay in the stage if ( - activeTabName === 'inpainting' && + shouldLockToInitialImage && (newBoundBox.width + newBoundBox.x > stageDimensions.width || newBoundBox.height + newBoundBox.y > stageDimensions.height || newBoundBox.x < 0 || @@ -283,7 +266,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { return newBoundBox; }, - [activeTabName, stageDimensions.height, stageDimensions.width] + [shouldLockToInitialImage, stageDimensions.height, stageDimensions.width] ); const handleStartedTransforming = () => { @@ -337,7 +320,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { globalCompositeOperation={'destination-out'} /> { - return { objects: currentCanvas.layerState.objects, canvasClip }; + [currentCanvasSelector], + (currentCanvas) => { + return { objects: currentCanvas.layerState.objects }; }, { memoizeOptions: { @@ -30,10 +26,10 @@ type InpaintingCanvasLinesProps = GroupConfig; */ const IAICanvasLines = (props: InpaintingCanvasLinesProps) => { const { ...rest } = props; - const { objects, canvasClip } = useAppSelector(canvasLinesSelector); + const { objects } = useAppSelector(canvasLinesSelector); return ( - + {objects.filter(isCanvasMaskLine).map((line, i) => ( { + [currentCanvasSelector], + (currentCanvas) => { const { objects } = currentCanvas.layerState; return { objects, - canvasClip, }; }, { @@ -31,12 +30,12 @@ const selector = createSelector( ); const IAICanvasObjectRenderer = () => { - const { objects, canvasClip } = useAppSelector(selector); + const { objects } = useAppSelector(selector); if (!objects) return null; return ( - + {objects.map((obj, i) => { if (isCanvasBaseImage(obj)) { return ( diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx index 5a5ff05222..7e6f6edeb5 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx +++ b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx @@ -2,10 +2,11 @@ import { ButtonGroup } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { currentCanvasSelector, + resizeAndScaleCanvas, isStagingSelector, resetCanvas, resetCanvasView, - setCanvasMode, + setShouldLockToInitialImage, setTool, } from './canvasSlice'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; @@ -30,6 +31,7 @@ import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; import IAICheckbox from 'common/components/IAICheckbox'; +import { ChangeEvent } from 'react'; export const canvasControlsSelector = createSelector( [ @@ -38,12 +40,12 @@ export const canvasControlsSelector = createSelector( isStagingSelector, ], (canvas, currentCanvas, isStaging) => { + const { shouldLockToInitialImage } = canvas; const { tool } = currentCanvas; - const { mode } = canvas; return { tool, isStaging, - mode, + shouldLockToInitialImage, }; }, { @@ -55,7 +57,16 @@ export const canvasControlsSelector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool, isStaging, mode } = useAppSelector(canvasControlsSelector); + const { tool, isStaging, shouldLockToInitialImage } = useAppSelector( + canvasControlsSelector + ); + + const handleToggleShouldLockToInitialImage = ( + e: ChangeEvent + ) => { + dispatch(setShouldLockToInitialImage(e.target.checked)); + dispatch(resizeAndScaleCanvas()); + }; return (
@@ -125,10 +136,12 @@ const IAICanvasOutpaintingControls = () => { icon={} onClick={() => { if (!stageRef.current || !canvasImageLayerRef.current) return; - const clientRect = canvasImageLayerRef.current.getClientRect({skipTransform: true}); + const clientRect = canvasImageLayerRef.current.getClientRect({ + skipTransform: true, + }); dispatch( resetCanvasView({ - clientRect, + contentRect: clientRect, }) ); }} @@ -141,13 +154,9 @@ const IAICanvasOutpaintingControls = () => { /> - dispatch( - setCanvasMode(e.target.checked ? 'inpainting' : 'outpainting') - ) - } + label={'Lock Canvas to Initial Image'} + isChecked={shouldLockToInitialImage} + onChange={handleToggleShouldLockToInitialImage} />
); diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/IAICanvasResizer.tsx index ad2f651268..825e96e272 100644 --- a/frontend/src/features/canvas/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/IAICanvasResizer.tsx @@ -5,8 +5,9 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { baseCanvasImageSelector, currentCanvasSelector, - initializeCanvas, + resizeAndScaleCanvas, resizeCanvas, + setCanvasContainerDimensions, setDoesCanvasNeedScaling, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; @@ -17,10 +18,14 @@ const canvasResizerSelector = createSelector( baseCanvasImageSelector, activeTabNameSelector, (canvas, currentCanvas, baseCanvasImage, activeTabName) => { - const { doesCanvasNeedScaling, mode, isCanvasInitialized } = canvas; + const { + doesCanvasNeedScaling, + shouldLockToInitialImage, + isCanvasInitialized, + } = canvas; return { doesCanvasNeedScaling, - mode, + shouldLockToInitialImage, activeTabName, baseCanvasImage, isCanvasInitialized, @@ -32,7 +37,7 @@ const IAICanvasResizer = () => { const dispatch = useAppDispatch(); const { doesCanvasNeedScaling, - mode, + shouldLockToInitialImage, activeTabName, baseCanvasImage, isCanvasInitialized, @@ -50,22 +55,17 @@ const IAICanvasResizer = () => { const { width: imageWidth, height: imageHeight } = baseCanvasImage.image; - if (!isCanvasInitialized) { - dispatch( - initializeCanvas({ - clientWidth, - clientHeight, - imageWidth, - imageHeight, - }) - ); + dispatch( + setCanvasContainerDimensions({ + width: clientWidth, + height: clientHeight, + }) + ); + + if (!isCanvasInitialized || shouldLockToInitialImage) { + dispatch(resizeAndScaleCanvas()); } else { - dispatch( - resizeCanvas({ - clientWidth, - clientHeight, - }) - ); + dispatch(resizeCanvas()); } dispatch(setDoesCanvasNeedScaling(false)); diff --git a/frontend/src/features/canvas/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/IAICanvasStagingArea.tsx index 55a0505204..312a6c3f67 100644 --- a/frontend/src/features/canvas/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/IAICanvasStagingArea.tsx @@ -106,7 +106,7 @@ const IAICanvasStagingArea = (props: Props) => { />
)} - + {/*
{
- + */}
); }; diff --git a/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx new file mode 100644 index 0000000000..4342892ff4 --- /dev/null +++ b/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx @@ -0,0 +1,140 @@ +import { + background, + ButtonGroup, + ChakraProvider, + Flex, +} from '@chakra-ui/react'; +import { CacheProvider } from '@emotion/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAIButton from 'common/components/IAIButton'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { GroupConfig } from 'konva/lib/Group'; +import _ from 'lodash'; +import { emotionCache } from 'main'; +import { useCallback, useState } from 'react'; +import { + FaArrowLeft, + FaArrowRight, + FaCheck, + FaEye, + FaEyeSlash, + FaTrash, +} from 'react-icons/fa'; +import { Group, Rect } from 'react-konva'; +import { Html } from 'react-konva-utils'; +import { + commitStagingAreaImage, + currentCanvasSelector, + discardStagedImages, + nextStagingAreaImage, + prevStagingAreaImage, +} from './canvasSlice'; +import IAICanvasImage from './IAICanvasImage'; + +const selector = createSelector( + [currentCanvasSelector], + (currentCanvas) => { + const { + layerState: { + stagingArea: { images, selectedImageIndex }, + }, + } = currentCanvas; + + return { + currentStagingAreaImage: + images.length > 0 ? images[selectedImageIndex] : undefined, + isOnFirstImage: selectedImageIndex === 0, + isOnLastImage: selectedImageIndex === images.length - 1, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasStagingAreaToolbar = () => { + const dispatch = useAppDispatch(); + const { isOnFirstImage, isOnLastImage, currentStagingAreaImage } = + useAppSelector(selector); + + const [shouldShowStagedImage, setShouldShowStagedImage] = + useState(true); + + const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = + useState(true); + + const handleMouseOver = useCallback(() => { + setShouldShowStagingAreaOutline(false); + }, []); + + const handleMouseOut = useCallback(() => { + setShouldShowStagingAreaOutline(true); + }, []); + + if (!currentStagingAreaImage) return null; + + return ( + + + } + onClick={() => dispatch(prevStagingAreaImage())} + onMouseOver={handleMouseOver} + onMouseOut={handleMouseOut} + data-selected={true} + isDisabled={isOnFirstImage} + /> + } + onClick={() => dispatch(nextStagingAreaImage())} + onMouseOver={handleMouseOver} + onMouseOut={handleMouseOut} + data-selected={true} + isDisabled={isOnLastImage} + /> + } + onClick={() => dispatch(commitStagingAreaImage())} + data-selected={true} + /> + : } + onClick={() => setShouldShowStagedImage(!shouldShowStagedImage)} + data-selected={true} + /> + } + onClick={() => dispatch(discardStagedImages())} + data-selected={true} + /> + + + ); +}; + +export default IAICanvasStagingAreaToolbar; diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index e5c10810cd..f2e289767d 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -21,6 +21,7 @@ import { uploadImage } from 'features/gallery/util/uploadImage'; import { setInitialCanvasImage } from './canvasReducers'; import calculateScale from './util/calculateScale'; import calculateCoordinates from './util/calculateCoordinates'; +import floorCoordinates from './util/floorCoordinates'; export interface GenericCanvasState { boundingBoxCoordinates: Vector2d; @@ -58,6 +59,7 @@ export interface GenericCanvasState { stageDimensions: Dimensions; stageScale: number; tool: CanvasTool; + minimumStageScale: number; } export type CanvasMode = 'inpainting' | 'outpainting'; @@ -147,8 +149,10 @@ export interface CanvasState { currentCanvas: ValidCanvasName; inpainting: InpaintingCanvasState; outpainting: OutpaintingCanvasState; - mode: CanvasMode; + // mode: CanvasMode; + shouldLockToInitialImage: boolean; isCanvasInitialized: boolean; + canvasContainerDimensions: Dimensions; } export const initialLayerState: CanvasLayerState = { @@ -197,14 +201,17 @@ const initialGenericCanvasState: GenericCanvasState = { stageCoordinates: { x: 0, y: 0 }, stageDimensions: { width: 0, height: 0 }, stageScale: 1, + minimumStageScale: 1, tool: 'brush', }; const initialCanvasState: CanvasState = { currentCanvas: 'inpainting', doesCanvasNeedScaling: false, - mode: 'outpainting', + shouldLockToInitialImage: false, + // mode: 'outpainting', isCanvasInitialized: false, + canvasContainerDimensions: { width: 0, height: 0 }, inpainting: { layer: 'mask', ...initialGenericCanvasState, @@ -335,80 +342,15 @@ export const canvasSlice = createSlice({ }; }, setBoundingBoxDimensions: (state, action: PayloadAction) => { - const currentCanvas = state[state.currentCanvas]; - currentCanvas.boundingBoxDimensions = action.payload; - - const { width: boundingBoxWidth, height: boundingBoxHeight } = - action.payload; - const { x: boundingBoxX, y: boundingBoxY } = - currentCanvas.boundingBoxCoordinates; - const { width: canvasWidth, height: canvasHeight } = - currentCanvas.stageDimensions; - - const scaledCanvasWidth = canvasWidth / currentCanvas.stageScale; - const scaledCanvasHeight = canvasHeight / currentCanvas.stageScale; - - const roundedCanvasWidth = roundDownToMultiple(scaledCanvasWidth, 64); - const roundedCanvasHeight = roundDownToMultiple(scaledCanvasHeight, 64); - - const roundedBoundingBoxWidth = roundDownToMultiple(boundingBoxWidth, 64); - const roundedBoundingBoxHeight = roundDownToMultiple( - boundingBoxHeight, - 64 - ); - - const overflowX = boundingBoxX + boundingBoxWidth - scaledCanvasWidth; - const overflowY = boundingBoxY + boundingBoxHeight - scaledCanvasHeight; - - const newBoundingBoxWidth = _.clamp( - roundedBoundingBoxWidth, - 64, - roundedCanvasWidth - ); - - const newBoundingBoxHeight = _.clamp( - roundedBoundingBoxHeight, - 64, - roundedCanvasHeight - ); - - const overflowCorrectedX = - overflowX > 0 ? boundingBoxX - overflowX : boundingBoxX; - - const overflowCorrectedY = - overflowY > 0 ? boundingBoxY - overflowY : boundingBoxY; - - const clampedX = _.clamp( - overflowCorrectedX, - currentCanvas.stageCoordinates.x, - roundedCanvasWidth - newBoundingBoxWidth - ); - - const clampedY = _.clamp( - overflowCorrectedY, - currentCanvas.stageCoordinates.y, - roundedCanvasHeight - newBoundingBoxHeight - ); - - currentCanvas.boundingBoxDimensions = { - width: newBoundingBoxWidth, - height: newBoundingBoxHeight, - }; - - currentCanvas.boundingBoxCoordinates = { - x: clampedX, - y: clampedY, - }; + state[state.currentCanvas].boundingBoxDimensions = action.payload; }, setBoundingBoxCoordinates: (state, action: PayloadAction) => { - const { x, y } = action.payload; - state[state.currentCanvas].boundingBoxCoordinates = { - x: Math.floor(x), - y: Math.floor(y), - }; + state[state.currentCanvas].boundingBoxCoordinates = floorCoordinates( + action.payload + ); }, setStageCoordinates: (state, action: PayloadAction) => { - state[state.currentCanvas].stageCoordinates = action.payload; + state.outpainting.stageCoordinates = floorCoordinates(action.payload); }, setBoundingBoxPreviewFill: (state, action: PayloadAction) => { state[state.currentCanvas].boundingBoxPreviewFill = action.payload; @@ -595,30 +537,52 @@ export const canvasSlice = createSlice({ state[state.currentCanvas].layerState = initialLayerState; state[state.currentCanvas].futureLayerStates = []; }, - initializeCanvas: ( + setCanvasContainerDimensions: ( state, - action: PayloadAction<{ - clientWidth: number; - clientHeight: number; - imageWidth: number; - imageHeight: number; - }> + action: PayloadAction ) => { - const { clientWidth, clientHeight, imageWidth, imageHeight } = - action.payload; + state.canvasContainerDimensions = action.payload; + }, + resizeAndScaleCanvas: (state) => { + const { width: containerWidth, height: containerHeight } = + state.canvasContainerDimensions; + + const initialCanvasImage = + state.outpainting.layerState.objects.find(isCanvasBaseImage); + + if (!initialCanvasImage) return; + + const { width: imageWidth, height: imageHeight } = initialCanvasImage; + + // const { clientWidth, clientHeight, imageWidth, imageHeight } = + // action.payload; + + const { shouldLockToInitialImage } = state; const currentCanvas = state[state.currentCanvas]; + const padding = shouldLockToInitialImage ? 1 : 0.95; + const newScale = calculateScale( - clientWidth, - clientHeight, + containerWidth, + containerHeight, imageWidth, - imageHeight + imageHeight, + padding ); + const newDimensions = { + width: shouldLockToInitialImage + ? Math.floor(imageWidth * newScale) + : Math.floor(containerWidth), + height: shouldLockToInitialImage + ? Math.floor(imageHeight * newScale) + : Math.floor(containerHeight), + }; + const newCoordinates = calculateCoordinates( - clientWidth, - clientHeight, + newDimensions.width, + newDimensions.height, 0, 0, imageWidth, @@ -627,50 +591,53 @@ export const canvasSlice = createSlice({ ); currentCanvas.stageScale = newScale; + currentCanvas.minimumStageScale = newScale; currentCanvas.stageCoordinates = newCoordinates; - currentCanvas.stageDimensions = { - width: Math.floor(clientWidth), - height: Math.floor(clientHeight), - }; + currentCanvas.stageDimensions = newDimensions; state.isCanvasInitialized = true; }, - resizeCanvas: ( - state, - action: PayloadAction<{ - clientWidth: number; - clientHeight: number; - }> - ) => { - const { clientWidth, clientHeight } = action.payload; + resizeCanvas: (state) => { + const { width: containerWidth, height: containerHeight } = + state.canvasContainerDimensions; const currentCanvas = state[state.currentCanvas]; currentCanvas.stageDimensions = { - width: Math.floor(clientWidth), - height: Math.floor(clientHeight), + width: Math.floor(containerWidth), + height: Math.floor(containerHeight), }; }, resetCanvasView: ( state, action: PayloadAction<{ - clientRect: IRect; + contentRect: IRect; }> ) => { - const { clientRect } = action.payload; + const { contentRect } = action.payload; + const currentCanvas = state[state.currentCanvas]; + const baseCanvasImage = currentCanvas.layerState.objects.find(isCanvasBaseImage); - + const { shouldLockToInitialImage } = state; if (!baseCanvasImage) return; const { stageDimensions: { width: stageWidth, height: stageHeight }, } = currentCanvas; - const { x, y, width, height } = clientRect; + const { x, y, width, height } = contentRect; + + const padding = shouldLockToInitialImage ? 1 : 0.95; + const newScale = calculateScale( + stageWidth, + stageHeight, + width, + height, + padding + ); - const newScale = calculateScale(stageWidth, stageHeight, width, height); const newCoordinates = calculateCoordinates( stageWidth, stageHeight, @@ -683,10 +650,7 @@ export const canvasSlice = createSlice({ currentCanvas.stageScale = newScale; - currentCanvas.stageCoordinates = { - x: stageWidth / 2 - (x + width / 2) * newScale, - y: stageHeight / 2 - (y + height / 2) * newScale, - }; + currentCanvas.stageCoordinates = newCoordinates; }, nextStagingAreaImage: (state) => { const currentIndex = @@ -728,14 +692,17 @@ export const canvasSlice = createSlice({ currentCanvas.futureLayerStates = []; }, - setCanvasMode: (state, action: PayloadAction) => { - state.mode = action.payload; + setShouldLockToInitialImage: (state, action: PayloadAction) => { + state.shouldLockToInitialImage = action.payload; }, + // setCanvasMode: (state, action: PayloadAction) => { + // state.mode = action.payload; + // }, }, extraReducers: (builder) => { builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { if (!action.payload) return; - const { image, kind, boundingBox } = action.payload; + const { image, kind, originalBoundingBox } = action.payload; if (kind === 'temp_merged_canvas') { state.outpainting.pastLayerStates.push({ @@ -748,7 +715,7 @@ export const canvasSlice = createSlice({ { kind: 'image', layer: 'base', - ...boundingBox, + ...originalBoundingBox, image, }, ]; @@ -824,10 +791,11 @@ export const { prevStagingAreaImage, commitStagingAreaImage, discardStagedImages, - setCanvasMode, - initializeCanvas, + setShouldLockToInitialImage, + resizeAndScaleCanvas, resizeCanvas, resetCanvasView, + setCanvasContainerDimensions, } = canvasSlice.actions; export default canvasSlice.reducer; @@ -847,8 +815,8 @@ export const inpaintingCanvasSelector = ( state: RootState ): InpaintingCanvasState => state.canvas.inpainting; -export const canvasModeSelector = (state: RootState): CanvasMode => - state.canvas.mode; +export const shouldLockToInitialImageSelector = (state: RootState): boolean => + state.canvas.shouldLockToInitialImage; export const baseCanvasImageSelector = createSelector( [currentCanvasSelector], @@ -857,16 +825,16 @@ export const baseCanvasImageSelector = createSelector( } ); -export const canvasClipSelector = createSelector( - [canvasModeSelector, baseCanvasImageSelector], - (canvasMode, baseCanvasImage) => { - return canvasMode === 'inpainting' - ? { - clipX: 0, - clipY: 0, - clipWidth: baseCanvasImage?.width, - clipHeight: baseCanvasImage?.height, - } - : {}; - } -); +// export const canvasClipSelector = createSelector( +// [canvasModeSelector, baseCanvasImageSelector], +// (canvasMode, baseCanvasImage) => { +// return canvasMode === 'inpainting' +// ? { +// clipX: 0, +// clipY: 0, +// clipWidth: baseCanvasImage?.width, +// clipHeight: baseCanvasImage?.height, +// } +// : {}; +// } +// ); diff --git a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts index 268bdf6e75..1331149dec 100644 --- a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts @@ -5,20 +5,21 @@ import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { useCallback } from 'react'; import { + baseCanvasImageSelector, currentCanvasSelector, isStagingSelector, setIsMovingStage, setStageCoordinates, + shouldLockToInitialImageSelector, } from '../canvasSlice'; const selector = createSelector( - [currentCanvasSelector, isStagingSelector, activeTabNameSelector], - (canvas, isStaging, activeTabName) => { + [currentCanvasSelector, isStagingSelector], + (canvas, isStaging) => { const { tool } = canvas; return { tool, isStaging, - activeTabName, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -26,7 +27,7 @@ const selector = createSelector( const useCanvasDrag = () => { const dispatch = useAppDispatch(); - const { tool, activeTabName, isStaging } = useAppSelector(selector); + const { tool, isStaging } = useAppSelector(selector); return { handleDragStart: useCallback(() => { @@ -37,7 +38,10 @@ const useCanvasDrag = () => { handleDragMove: useCallback( (e: KonvaEventObject) => { if (!(tool === 'move' || isStaging)) return; - dispatch(setStageCoordinates(e.target.getPosition())); + + const newCoordinates = { x: e.target.x(), y: e.target.y() }; + + dispatch(setStageCoordinates(newCoordinates)); }, [dispatch, isStaging, tool] ), diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts index 857b023328..63b0812466 100644 --- a/frontend/src/features/canvas/hooks/useCanvasZoom.ts +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -1,15 +1,17 @@ import { createSelector } from '@reduxjs/toolkit'; -import { useAppDispatch, useAppSelector } from 'app/store'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; import { + baseCanvasImageSelector, currentCanvasSelector, GenericCanvasState, setStageCoordinates, setStageScale, + shouldLockToInitialImageSelector, } from '../canvasSlice'; import { CANVAS_SCALE_BY, @@ -18,13 +20,34 @@ import { } from '../util/constants'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector], - (activeTabName, canvas: GenericCanvasState) => { - const { isMoveStageKeyHeld, stageScale } = canvas; + [ + (state: RootState) => state.canvas, + activeTabNameSelector, + currentCanvasSelector, + baseCanvasImageSelector, + shouldLockToInitialImageSelector, + ], + ( + canvas, + activeTabName, + currentCanvas, + baseCanvasImage, + shouldLockToInitialImage + ) => { + const { + isMoveStageKeyHeld, + stageScale, + stageDimensions, + minimumStageScale, + } = currentCanvas; return { isMoveStageKeyHeld, stageScale, activeTabName, + baseCanvasImage, + shouldLockToInitialImage, + stageDimensions, + minimumStageScale, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -32,19 +55,29 @@ const selector = createSelector( const useCanvasWheel = (stageRef: MutableRefObject) => { const dispatch = useAppDispatch(); - const { isMoveStageKeyHeld, stageScale, activeTabName } = - useAppSelector(selector); + const { + isMoveStageKeyHeld, + stageScale, + activeTabName, + baseCanvasImage, + shouldLockToInitialImage, + stageDimensions, + minimumStageScale, + } = useAppSelector(selector); return useCallback( (e: KonvaEventObject) => { // stop default scrolling - if (activeTabName !== 'outpainting') return; + if ( + activeTabName !== 'outpainting' || + !stageRef.current || + isMoveStageKeyHeld || + !baseCanvasImage + ) + return; e.evt.preventDefault(); - // const oldScale = stageRef.current.scaleX(); - if (!stageRef.current || isMoveStageKeyHeld) return; - const cursorPos = stageRef.current.getPointerPosition(); if (!cursorPos) return; @@ -64,19 +97,44 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { const newScale = _.clamp( stageScale * CANVAS_SCALE_BY ** delta, - MIN_CANVAS_SCALE, + shouldLockToInitialImage ? minimumStageScale : MIN_CANVAS_SCALE, MAX_CANVAS_SCALE ); - const newPos = { + const newCoordinates = { x: cursorPos.x - mousePointTo.x * newScale, y: cursorPos.y - mousePointTo.y * newScale, }; + if (shouldLockToInitialImage) { + newCoordinates.x = _.clamp( + newCoordinates.x, + stageDimensions.width - Math.floor(baseCanvasImage.width * newScale), + 0 + ); + newCoordinates.y = _.clamp( + newCoordinates.y, + stageDimensions.height - + Math.floor(baseCanvasImage.height * newScale), + 0 + ); + } + dispatch(setStageScale(newScale)); - dispatch(setStageCoordinates(newPos)); + dispatch(setStageCoordinates(newCoordinates)); }, - [activeTabName, dispatch, isMoveStageKeyHeld, stageRef, stageScale] + [ + activeTabName, + stageRef, + isMoveStageKeyHeld, + baseCanvasImage, + stageScale, + shouldLockToInitialImage, + minimumStageScale, + dispatch, + stageDimensions.width, + stageDimensions.height, + ] ); }; diff --git a/frontend/src/features/canvas/util/floorCoordinates.ts b/frontend/src/features/canvas/util/floorCoordinates.ts new file mode 100644 index 0000000000..aa3c96ddb1 --- /dev/null +++ b/frontend/src/features/canvas/util/floorCoordinates.ts @@ -0,0 +1,10 @@ +import { Vector2d } from 'konva/lib/types'; + +const floorCoordinates = (coord: Vector2d): Vector2d => { + return { + x: Math.floor(coord.x), + y: Math.floor(coord.y), + }; +}; + +export default floorCoordinates; diff --git a/frontend/src/features/canvas/util/layerToDataURL.ts b/frontend/src/features/canvas/util/layerToDataURL.ts index 4317003025..abdbc0a21d 100644 --- a/frontend/src/features/canvas/util/layerToDataURL.ts +++ b/frontend/src/features/canvas/util/layerToDataURL.ts @@ -3,7 +3,7 @@ import Konva from 'konva'; const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { const tempScale = layer.scale(); - const { x: relativeX, y: relativeY } = layer.getClientRect({ + const relativeClientRect = layer.getClientRect({ relativeTo: layer.getParent(), }); @@ -13,14 +13,27 @@ const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { y: 1 / stageScale, }); - const clientRect = layer.getClientRect(); + const { x, y, width, height } = layer.getClientRect(); - const dataURL = layer.toDataURL(clientRect); + const dataURL = layer.toDataURL({ + x: Math.round(x), + y: Math.round(y), + width: Math.round(width), + height: Math.round(height), + }); // Unscale the canvas layer.scale(tempScale); - return { dataURL, relativeX, relativeY }; + return { + dataURL, + boundingBox: { + x: Math.round(relativeClientRect.x), + y: Math.round(relativeClientRect.y), + width: Math.round(width), + height: Math.round(height), + }, + }; }; export default layerToDataURL; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 55f69394da..9d2cacfe23 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -25,7 +25,7 @@ export const mergeAndUploadCanvas = createAsyncThunk( if (!canvasImageLayerRef.current) return; - const { dataURL, relativeX, relativeY } = layerToDataURL( + const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( canvasImageLayerRef.current, stageScale ); @@ -34,32 +34,45 @@ export const mergeAndUploadCanvas = createAsyncThunk( const formData = new FormData(); - formData.append('dataURL', dataURL); - formData.append('filename', 'merged_canvas.png'); - formData.append('kind', saveToGallery ? 'result' : 'temp'); + formData.append( + 'data', + JSON.stringify({ + dataURL, + filename: 'merged_canvas.png', + kind: saveToGallery ? 'result' : 'temp', + cropVisible: saveToGallery, + }) + ); const response = await fetch(window.location.origin + '/upload', { method: 'POST', body: formData, }); - const { image } = (await response.json()) as InvokeAI.ImageUploadResponse; + const { url, mtime, width, height } = + (await response.json()) as InvokeAI.ImageUploadResponse; + + // const newBoundingBox = { + // x: bbox[0], + // y: bbox[1], + // width: bbox[2], + // height: bbox[3], + // }; const newImage: InvokeAI.Image = { uuid: uuidv4(), + url, + mtime, category: saveToGallery ? 'result' : 'user', - ...image, + width: width, + height: height, }; return { image: newImage, kind: saveToGallery ? 'merged_canvas' : 'temp_merged_canvas', - boundingBox: { - x: relativeX, - y: relativeY, - width: image.width, - height: image.height, - }, + originalBoundingBox, + // newBoundingBox, }; } ); diff --git a/frontend/src/features/gallery/gallerySlice.ts b/frontend/src/features/gallery/gallerySlice.ts index 821b5d76ab..0b6c487c17 100644 --- a/frontend/src/features/gallery/gallerySlice.ts +++ b/frontend/src/features/gallery/gallerySlice.ts @@ -271,7 +271,7 @@ export const gallerySlice = createSlice({ extraReducers: (builder) => { builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { if (!action.payload) return; - const { image, kind, boundingBox } = action.payload; + const { image, kind, originalBoundingBox } = action.payload; if (kind === 'merged_canvas') { const { uuid, url, mtime } = image; diff --git a/frontend/src/features/gallery/util/uploadImage.ts b/frontend/src/features/gallery/util/uploadImage.ts index 2729138cc7..5dca9a490d 100644 --- a/frontend/src/features/gallery/util/uploadImage.ts +++ b/frontend/src/features/gallery/util/uploadImage.ts @@ -23,19 +23,36 @@ export const uploadImage = createAsyncThunk( const formData = new FormData(); formData.append('file', imageFile, imageFile.name); - formData.append('kind', 'init'); + formData.append( + 'data', + JSON.stringify({ + kind: 'init', + }) + ); + // formData.append('kind', 'init'); const response = await fetch(window.location.origin + '/upload', { method: 'POST', body: formData, }); - const { image } = (await response.json()) as InvokeAI.ImageUploadResponse; + const { url, mtime, width, height } = + (await response.json()) as InvokeAI.ImageUploadResponse; + + // const newBoundingBox = { + // x: bbox[0], + // y: bbox[1], + // width: bbox[2], + // height: bbox[3], + // }; const newImage: InvokeAI.Image = { uuid: uuidv4(), + url, + mtime, category: 'user', - ...image, + width: width, + height: height, }; return { From e3efcc620c412eeeafbcb616df8f9f2b0e9ae2c6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 11:19:36 +1100 Subject: [PATCH 060/220] Removes all references to split inpainting/outpainting canvas --- .../src/app/selectors/readinessSelector.ts | 8 +- frontend/src/app/socketio/emitters.ts | 6 +- .../src/common/util/parameterTranslation.ts | 2 +- frontend/src/features/canvas/IAICanvas.tsx | 52 +- .../features/canvas/IAICanvasBoundingBox.tsx | 34 +- .../canvas/IAICanvasBrushButtonPopover.tsx | 8 +- .../features/canvas/IAICanvasBrushPreview.tsx | 8 +- .../src/features/canvas/IAICanvasControls.tsx | 19 +- .../IAICanvasBrushControl.tsx | 8 +- .../IAICanvasEraserControl.tsx | 8 +- .../IAICanvasImageEraserControl.tsx | 8 +- .../IAICanvasLockBoundingBoxControl.tsx | 9 +- .../IAICanvasBrushColorPicker.tsx | 12 +- .../IAICanvasMaskClear.tsx | 10 +- .../IAICanvasMaskColorPicker.tsx | 12 +- .../IAICanvasMaskInvertControl.tsx | 14 +- .../IAICanvasMaskVisibilityControl.tsx | 12 +- .../IAICanvasControls/IAICanvasRedoButton.tsx | 8 +- .../IAICanvasShowHideBoundingBoxControl.tsx | 9 +- .../IAICanvasControls/IAICanvasUndoButton.tsx | 4 +- .../canvas/IAICanvasEraserButtonPopover.tsx | 8 +- .../src/features/canvas/IAICanvasGrid.tsx | 19 +- .../canvas/IAICanvasMaskButtonPopover.tsx | 13 +- .../canvas/IAICanvasMaskCompositer.tsx | 13 +- .../features/canvas/IAICanvasMaskLines.tsx | 8 +- .../canvas/IAICanvasObjectRenderer.tsx | 13 +- .../canvas/IAICanvasOutpaintingControls.tsx | 22 +- .../src/features/canvas/IAICanvasResizer.tsx | 28 +- .../canvas/IAICanvasSettingsButtonPopover.tsx | 19 +- .../features/canvas/IAICanvasStagingArea.tsx | 107 +---- .../canvas/IAICanvasStagingAreaToolbar.tsx | 11 +- .../features/canvas/IAICanvasStatusText.tsx | 8 +- .../src/features/canvas/canvasReducers.ts | 72 +-- frontend/src/features/canvas/canvasSlice.ts | 453 +++++++----------- .../canvas/hooks/useCanvasDragMove.ts | 7 +- .../features/canvas/hooks/useCanvasHotkeys.ts | 8 +- .../canvas/hooks/useCanvasMouseDown.ts | 8 +- .../canvas/hooks/useCanvasMouseEnter.ts | 8 +- .../canvas/hooks/useCanvasMouseMove.ts | 9 +- .../features/canvas/hooks/useCanvasMouseUp.ts | 9 +- .../features/canvas/hooks/useCanvasZoom.ts | 35 +- .../canvas/hooks/useUnscaleCanvasValue.ts | 23 - .../canvas/util/mergeAndUploadCanvas.ts | 2 +- .../BoundingBoxDarkenOutside.tsx | 8 +- .../BoundingBoxDimensionSlider.tsx | 8 +- .../BoundingBoxSettings/BoundingBoxLock.tsx | 6 +- .../BoundingBoxVisibility.tsx | 6 +- .../Inpainting/ClearBrushHistory.tsx | 16 +- .../Inpainting/InpaintReplace.tsx | 9 +- .../tabs/Inpainting/InpaintingDisplay.tsx | 12 +- .../tabs/Inpainting/InpaintingWorkarea.tsx | 3 +- .../tabs/Outpainting/OutpaintingDisplay.tsx | 12 +- .../tabs/Outpainting/OutpaintingWorkarea.tsx | 3 +- 53 files changed, 421 insertions(+), 816 deletions(-) delete mode 100644 frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts diff --git a/frontend/src/app/selectors/readinessSelector.ts b/frontend/src/app/selectors/readinessSelector.ts index 559c71b614..1b3ca83ca8 100644 --- a/frontend/src/app/selectors/readinessSelector.ts +++ b/frontend/src/app/selectors/readinessSelector.ts @@ -4,20 +4,20 @@ import { RootState } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { OptionsState } from 'features/options/optionsSlice'; import { SystemState } from 'features/system/systemSlice'; -import { baseCanvasImageSelector } from 'features/canvas/canvasSlice'; import { validateSeedWeights } from 'common/util/seedWeightPairs'; +import { initialCanvasImageSelector } from 'features/canvas/canvasSlice'; export const readinessSelector = createSelector( [ (state: RootState) => state.options, (state: RootState) => state.system, - baseCanvasImageSelector, + initialCanvasImageSelector, activeTabNameSelector, ], ( options: OptionsState, system: SystemState, - baseCanvasImage, + initialCanvasImage, activeTabName ) => { const { @@ -44,7 +44,7 @@ export const readinessSelector = createSelector( reasonsWhyNotReady.push('No initial image selected'); } - if (activeTabName === 'inpainting' && !baseCanvasImage) { + if (activeTabName === 'inpainting' && !initialCanvasImage) { isReady = false; reasonsWhyNotReady.push('No inpainting image selected'); } diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 9307f625fb..f72e9697e8 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -20,7 +20,7 @@ import { import { InvokeTabName } from 'features/tabs/InvokeTabs'; import * as InvokeAI from 'app/invokeai'; import { RootState } from 'app/store'; -import { baseCanvasImageSelector } from 'features/canvas/canvasSlice'; +import { initialCanvasImageSelector } from 'features/canvas/canvasSlice'; /** * Returns an object containing all functions which use `socketio.emit()`. @@ -55,8 +55,8 @@ const makeSocketIOEmitters = ( }; if (generationMode === 'inpainting') { - const baseCanvasImage = baseCanvasImageSelector(getState()); - const imageUrl = baseCanvasImage?.image.url; + const initialCanvasImage = initialCanvasImageSelector(getState()); + const imageUrl = initialCanvasImage?.image.url; if (!imageUrl) { dispatch( diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index c47b8e3c56..88177e3eef 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -119,7 +119,7 @@ export const frontendToBackendParameters = ( stageScale, isMaskEnabled, shouldPreserveMaskedArea, - } = canvasState[canvasState.currentCanvas]; + } = canvasState; const boundingBox = { ...boundingBoxCoordinates, diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 7c7820377a..2fd89162b6 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -5,14 +5,11 @@ import { Layer, Stage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; // app -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { - baseCanvasImageSelector, - currentCanvasSelector, + initialCanvasImageSelector, + canvasSelector, isStagingSelector, - outpaintingCanvasSelector, - setStageCoordinates, - setStageScale, shouldLockToInitialImageSelector, } from 'features/canvas/canvasSlice'; @@ -39,29 +36,21 @@ import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; import IAICanvasStatusText from './IAICanvasStatusText'; import IAICanvasStagingArea from './IAICanvasStagingArea'; import IAICanvasStagingAreaToolbar from './IAICanvasStagingAreaToolbar'; -import { KonvaEventObject } from 'konva/lib/Node'; -import { - CANVAS_SCALE_BY, - MAX_CANVAS_SCALE, - MIN_CANVAS_SCALE, -} from './util/constants'; -const canvasSelector = createSelector( +const selector = createSelector( [ shouldLockToInitialImageSelector, - currentCanvasSelector, - outpaintingCanvasSelector, + canvasSelector, isStagingSelector, activeTabNameSelector, - baseCanvasImageSelector, + initialCanvasImageSelector, ], ( shouldLockToInitialImage, - currentCanvas, - outpaintingCanvas, + canvas, isStaging, activeTabName, - baseCanvasImage + initialCanvasImage ) => { const { isMaskEnabled, @@ -75,10 +64,8 @@ const canvasSelector = createSelector( tool, isMovingStage, shouldShowIntermediates, - minimumStageScale, - } = currentCanvas; - - const { shouldShowGrid } = outpaintingCanvas; + shouldShowGrid, + } = canvas; let stageCursor: string | undefined = ''; @@ -110,9 +97,7 @@ const canvasSelector = createSelector( isStaging, shouldShowIntermediates, shouldLockToInitialImage, - activeTabName, - minimumStageScale, - baseCanvasImage, + initialCanvasImage, }; }, { @@ -141,11 +126,8 @@ const IAICanvas = () => { isStaging, shouldShowIntermediates, shouldLockToInitialImage, - activeTabName, - minimumStageScale, - baseCanvasImage, - } = useAppSelector(canvasSelector); - const dispatch = useAppDispatch(); + initialCanvasImage, + } = useAppSelector(selector); useCanvasHotkeys(); // set the closure'd refs @@ -172,17 +154,17 @@ const IAICanvas = () => { const dragBoundFunc = useCallback( (newCoordinates: Vector2d) => { - if (shouldLockToInitialImage && baseCanvasImage) { + if (shouldLockToInitialImage && initialCanvasImage) { newCoordinates.x = _.clamp( newCoordinates.x, stageDimensions.width - - Math.floor(baseCanvasImage.width * stageScale), + Math.floor(initialCanvasImage.width * stageScale), 0 ); newCoordinates.y = _.clamp( newCoordinates.y, stageDimensions.height - - Math.floor(baseCanvasImage.height * stageScale), + Math.floor(initialCanvasImage.height * stageScale), 0 ); } @@ -190,7 +172,7 @@ const IAICanvas = () => { return newCoordinates; }, [ - baseCanvasImage, + initialCanvasImage, shouldLockToInitialImage, stageDimensions.height, stageDimensions.width, diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx index cf1d0dab3a..c0c77aa574 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx @@ -6,15 +6,11 @@ import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; import { useCallback, useEffect, useRef } from 'react'; import { Group, Rect, Transformer } from 'react-konva'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { roundToMultiple } from 'common/util/roundDownToMultiple'; import { - roundDownToMultiple, - roundToMultiple, -} from 'common/util/roundDownToMultiple'; -import { - baseCanvasImageSelector, - currentCanvasSelector, - outpaintingCanvasSelector, + initialCanvasImageSelector, + canvasSelector, setBoundingBoxCoordinates, setBoundingBoxDimensions, setIsMouseOverBoundingBox, @@ -27,17 +23,10 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; const boundingBoxPreviewSelector = createSelector( shouldLockToInitialImageSelector, - currentCanvasSelector, - outpaintingCanvasSelector, - baseCanvasImageSelector, + canvasSelector, + initialCanvasImageSelector, activeTabNameSelector, - ( - shouldLockToInitialImage, - currentCanvas, - outpaintingCanvas, - baseCanvasImage, - activeTabName - ) => { + (shouldLockToInitialImage, canvas, initialCanvasImage, activeTabName) => { const { boundingBoxCoordinates, boundingBoxDimensions, @@ -50,9 +39,8 @@ const boundingBoxPreviewSelector = createSelector( shouldDarkenOutsideBoundingBox, tool, stageCoordinates, - } = currentCanvas; - - const { shouldSnapToGrid } = outpaintingCanvas; + shouldSnapToGrid, + } = canvas; return { boundingBoxCoordinates, @@ -64,7 +52,7 @@ const boundingBoxPreviewSelector = createSelector( isTransformingBoundingBox, stageDimensions, stageScale, - baseCanvasImage, + initialCanvasImage, activeTabName, shouldSnapToGrid, tool, @@ -98,7 +86,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { stageCoordinates, stageDimensions, stageScale, - baseCanvasImage, + initialCanvasImage, activeTabName, shouldSnapToGrid, tool, diff --git a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx index bbffd98c49..beb34396d4 100644 --- a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { - currentCanvasSelector, + canvasSelector, isStagingSelector, setBrushColor, setBrushSize, @@ -16,9 +16,9 @@ import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; export const selector = createSelector( - [currentCanvasSelector, isStagingSelector], - (currentCanvas, isStaging) => { - const { brushColor, brushSize, tool } = currentCanvas; + [canvasSelector, isStagingSelector], + (canvas, isStaging) => { + const { brushColor, brushSize, tool } = canvas; return { tool, diff --git a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx b/frontend/src/features/canvas/IAICanvasBrushPreview.tsx index c4f3e0b20c..60ee69ab87 100644 --- a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx +++ b/frontend/src/features/canvas/IAICanvasBrushPreview.tsx @@ -3,12 +3,12 @@ import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; import { Circle, Group } from 'react-konva'; import { useAppSelector } from 'app/store'; -import { currentCanvasSelector } from 'features/canvas/canvasSlice'; +import { canvasSelector } from 'features/canvas/canvasSlice'; import { rgbaColorToString } from './util/colorToString'; const canvasBrushPreviewSelector = createSelector( - currentCanvasSelector, - (currentCanvas) => { + canvasSelector, + (canvas) => { const { cursorPosition, stageDimensions: { width, height }, @@ -22,7 +22,7 @@ const canvasBrushPreviewSelector = createSelector( isMovingBoundingBox, isTransformingBoundingBox, stageScale, - } = currentCanvas; + } = canvas; return { cursorPosition, diff --git a/frontend/src/features/canvas/IAICanvasControls.tsx b/frontend/src/features/canvas/IAICanvasControls.tsx index 85f42f8b5a..9be6be93cc 100644 --- a/frontend/src/features/canvas/IAICanvasControls.tsx +++ b/frontend/src/features/canvas/IAICanvasControls.tsx @@ -10,28 +10,17 @@ import IAICanvasLockBoundingBoxControl from './IAICanvasControls/IAICanvasLockBo import IAICanvasShowHideBoundingBoxControl from './IAICanvasControls/IAICanvasShowHideBoundingBoxControl'; import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; import { createSelector } from '@reduxjs/toolkit'; -import { - outpaintingCanvasSelector, - OutpaintingCanvasState, -} from './canvasSlice'; import { RootState } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { OptionsState } from 'features/options/optionsSlice'; import _ from 'lodash'; +import { canvasSelector } from './canvasSlice'; export const canvasControlsSelector = createSelector( - [ - outpaintingCanvasSelector, - (state: RootState) => state.options, - activeTabNameSelector, - ], - ( - outpaintingCanvas: OutpaintingCanvasState, - options: OptionsState, - activeTabName - ) => { + [(state: RootState) => state.options, canvasSelector, activeTabNameSelector], + (options: OptionsState, canvas, activeTabName) => { const { stageScale, boundingBoxCoordinates, boundingBoxDimensions } = - outpaintingCanvas; + canvas; return { activeTabName, stageScale, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx index 3d3f9ee9f1..dbd2609d6e 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx @@ -9,7 +9,7 @@ import IAISlider from 'common/components/IAISlider'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { - currentCanvasSelector, + canvasSelector, setBrushSize, setShouldShowBrushPreview, setTool, @@ -19,9 +19,9 @@ import _ from 'lodash'; import IAICanvasMaskColorPicker from './IAICanvasMaskControls/IAICanvasMaskColorPicker'; const inpaintingBrushSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas, activeTabName) => { - const { tool, brushSize } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { tool, brushSize } = canvas; return { tool, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx index 815709c1b4..ceeca19a96 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx @@ -3,15 +3,15 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { FaEraser } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { currentCanvasSelector, setTool } from 'features/canvas/canvasSlice'; +import { canvasSelector, setTool } from 'features/canvas/canvasSlice'; import _ from 'lodash'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; const eraserSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas, activeTabName) => { - const { tool, isMaskEnabled } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { tool, isMaskEnabled } = canvas; return { tool, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx index b0047c6b8a..66a2ed3cea 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx @@ -2,16 +2,16 @@ import { createSelector } from '@reduxjs/toolkit'; import { useHotkeys } from 'react-hotkeys-hook'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { currentCanvasSelector, setTool } from 'features/canvas/canvasSlice'; +import { canvasSelector, setTool } from 'features/canvas/canvasSlice'; import _ from 'lodash'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { BsEraser } from 'react-icons/bs'; const imageEraserSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas, activeTabName) => { - const { tool, isMaskEnabled } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { tool, isMaskEnabled } = canvas; return { tool, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx index 5779a4a627..cfca8955b6 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx @@ -2,17 +2,16 @@ import { FaLock, FaUnlock } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { - currentCanvasSelector, - GenericCanvasState, + canvasSelector, setShouldLockBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; const canvasLockBoundingBoxSelector = createSelector( - currentCanvasSelector, - (currentCanvas: GenericCanvasState) => { - const { shouldLockBoundingBox } = currentCanvas; + canvasSelector, + (canvas) => { + const { shouldLockBoundingBox } = canvas; return { shouldLockBoundingBox, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx index 15e5ab07b2..a23834cdcd 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx @@ -1,11 +1,7 @@ import { RgbaColor } from 'react-colorful'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIColorPicker from 'common/components/IAIColorPicker'; -import { - currentCanvasSelector, - GenericCanvasState, - setMaskColor, -} from 'features/canvas/canvasSlice'; +import { canvasSelector, setMaskColor } from 'features/canvas/canvasSlice'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; @@ -13,9 +9,9 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; const selector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas: GenericCanvasState, activeTabName) => { - const { brushColor } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { brushColor } = canvas; return { brushColor, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx index 325455b74c..e95563e65a 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx @@ -5,10 +5,8 @@ import IAIIconButton from 'common/components/IAIIconButton'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { clearMask, - currentCanvasSelector, - InpaintingCanvasState, + canvasSelector, isCanvasMaskLine, - OutpaintingCanvasState, } from 'features/canvas/canvasSlice'; import _ from 'lodash'; @@ -16,12 +14,12 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { useToast } from '@chakra-ui/react'; const canvasMaskClearSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas, activeTabName) => { + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { const { isMaskEnabled, layerState: { objects }, - } = currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; + } = canvas; return { isMaskEnabled, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx index 29f63484e2..158dfd0453 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx @@ -5,11 +5,7 @@ import { useAppDispatch, useAppSelector } from 'app/store'; import IAIColorPicker from 'common/components/IAIColorPicker'; import IAIIconButton from 'common/components/IAIIconButton'; import IAIPopover from 'common/components/IAIPopover'; -import { - currentCanvasSelector, - GenericCanvasState, - setMaskColor, -} from 'features/canvas/canvasSlice'; +import { canvasSelector, setMaskColor } from 'features/canvas/canvasSlice'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; @@ -17,9 +13,9 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; const maskColorPickerSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas: GenericCanvasState, activeTabName) => { - const { isMaskEnabled, maskColor } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { isMaskEnabled, maskColor } = canvas; return { isMaskEnabled, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx index bb901bf79c..edafe17806 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx @@ -3,8 +3,7 @@ import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { - currentCanvasSelector, - GenericCanvasState, + canvasSelector, setShouldPreserveMaskedArea, } from 'features/canvas/canvasSlice'; @@ -13,9 +12,9 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; const canvasMaskInvertSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas: GenericCanvasState, activeTabName) => { - const { isMaskEnabled, shouldPreserveMaskedArea } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { isMaskEnabled, shouldPreserveMaskedArea } = canvas; return { shouldPreserveMaskedArea, @@ -31,9 +30,8 @@ const canvasMaskInvertSelector = createSelector( ); export default function IAICanvasMaskInvertControl() { - const { shouldPreserveMaskedArea, isMaskEnabled, activeTabName } = useAppSelector( - canvasMaskInvertSelector - ); + const { shouldPreserveMaskedArea, isMaskEnabled, activeTabName } = + useAppSelector(canvasMaskInvertSelector); const dispatch = useAppDispatch(); const handleToggleShouldInvertMask = () => diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx index 459785e5d4..5bc2c36201 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx @@ -4,18 +4,14 @@ import { createSelector } from 'reselect'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { - currentCanvasSelector, - GenericCanvasState, - setIsMaskEnabled, -} from 'features/canvas/canvasSlice'; +import { canvasSelector, setIsMaskEnabled } from 'features/canvas/canvasSlice'; import _ from 'lodash'; const canvasMaskVisibilitySelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas: GenericCanvasState, activeTabName) => { - const { isMaskEnabled } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { isMaskEnabled } = canvas; return { isMaskEnabled, activeTabName }; }, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx index 67ba63301a..d74bf757fa 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx @@ -4,14 +4,14 @@ import { FaRedo } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { currentCanvasSelector, redo } from 'features/canvas/canvasSlice'; +import { canvasSelector, redo } from 'features/canvas/canvasSlice'; import _ from 'lodash'; const canvasRedoSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas, activeTabName) => { - const { futureLayerStates } = currentCanvas; + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { + const { futureLayerStates } = canvas; return { canRedo: futureLayerStates.length > 0, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx index ca8f70fc4a..b86cb0d452 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx @@ -2,17 +2,16 @@ import { FaVectorSquare } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { - currentCanvasSelector, - GenericCanvasState, + canvasSelector, setShouldShowBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; const canvasShowHideBoundingBoxControlSelector = createSelector( - currentCanvasSelector, - (currentCanvas: GenericCanvasState) => { - const { shouldShowBoundingBox } = currentCanvas; + canvasSelector, + (canvas) => { + const { shouldShowBoundingBox } = canvas; return { shouldShowBoundingBox, diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx index 0582d32637..c28477e84b 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx @@ -3,13 +3,13 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { FaUndo } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { currentCanvasSelector, undo } from 'features/canvas/canvasSlice'; +import { canvasSelector, undo } from 'features/canvas/canvasSlice'; import _ from 'lodash'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; const canvasUndoSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], + [canvasSelector, activeTabNameSelector], (canvas, activeTabName) => { const { pastLayerStates } = canvas; diff --git a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx index b36c757b82..9a031706dc 100644 --- a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { - currentCanvasSelector, + canvasSelector, isStagingSelector, setEraserSize, setTool, @@ -15,9 +15,9 @@ import { Flex } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; export const selector = createSelector( - [currentCanvasSelector, isStagingSelector], - (currentCanvas, isStaging) => { - const { eraserSize, tool } = currentCanvas; + [canvasSelector, isStagingSelector], + (canvas, isStaging) => { + const { eraserSize, tool } = canvas; return { tool, diff --git a/frontend/src/features/canvas/IAICanvasGrid.tsx b/frontend/src/features/canvas/IAICanvasGrid.tsx index c7d36bb04f..2e919e23bf 100644 --- a/frontend/src/features/canvas/IAICanvasGrid.tsx +++ b/frontend/src/features/canvas/IAICanvasGrid.tsx @@ -4,22 +4,14 @@ import { useColorMode } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; -import { - ReactNode, - useCallback, - useEffect, - useLayoutEffect, - useState, -} from 'react'; +import { ReactNode, useCallback, useLayoutEffect, useState } from 'react'; import { Group, Line as KonvaLine } from 'react-konva'; -import { currentCanvasSelector } from './canvasSlice'; -import useUnscaleCanvasValue from './hooks/useUnscaleCanvasValue'; -import { stageRef } from './IAICanvas'; +import { canvasSelector } from './canvasSlice'; const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { - const { stageScale, stageCoordinates, stageDimensions } = currentCanvas; + [canvasSelector], + (canvas) => { + const { stageScale, stageCoordinates, stageDimensions } = canvas; return { stageScale, stageCoordinates, stageDimensions }; }, { @@ -31,7 +23,6 @@ const selector = createSelector( const IAICanvasGrid = () => { const { colorMode } = useColorMode(); - // const unscale = useUnscaleCanvasValue(); const { stageScale, stageCoordinates, stageDimensions } = useAppSelector(selector); const [gridLines, setGridLines] = useState([]); diff --git a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx index c20abafce2..6822a40fa8 100644 --- a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx @@ -2,7 +2,7 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { clearMask, - currentCanvasSelector, + canvasSelector, setIsMaskEnabled, setLayer, setMaskColor, @@ -18,9 +18,10 @@ import IAIColorPicker from 'common/components/IAIColorPicker'; import IAIButton from 'common/components/IAIButton'; export const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { - const { maskColor, layer, isMaskEnabled, shouldPreserveMaskedArea } = currentCanvas; + [canvasSelector], + (canvas) => { + const { maskColor, layer, isMaskEnabled, shouldPreserveMaskedArea } = + canvas; return { layer, @@ -63,7 +64,9 @@ const IAICanvasMaskButtonPopover = () => { dispatch(setShouldPreserveMaskedArea(e.target.checked))} + onChange={(e) => + dispatch(setShouldPreserveMaskedArea(e.target.checked)) + } /> { - const { maskColor, stageCoordinates, stageDimensions, stageScale } = - currentCanvas as InpaintingCanvasState | OutpaintingCanvasState; + canvasSelector, + (canvas) => { + const { maskColor, stageCoordinates, stageDimensions, stageScale } = canvas; return { stageCoordinates, diff --git a/frontend/src/features/canvas/IAICanvasMaskLines.tsx b/frontend/src/features/canvas/IAICanvasMaskLines.tsx index 8c3f89c064..0671304011 100644 --- a/frontend/src/features/canvas/IAICanvasMaskLines.tsx +++ b/frontend/src/features/canvas/IAICanvasMaskLines.tsx @@ -2,13 +2,13 @@ import { GroupConfig } from 'konva/lib/Group'; import { Group, Line } from 'react-konva'; import { useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; -import { currentCanvasSelector, isCanvasMaskLine } from './canvasSlice'; +import { canvasSelector, isCanvasMaskLine } from './canvasSlice'; import _ from 'lodash'; export const canvasLinesSelector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { - return { objects: currentCanvas.layerState.objects }; + [canvasSelector], + (canvas) => { + return { objects: canvas.layerState.objects }; }, { memoizeOptions: { diff --git a/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx b/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx index 3b15e52bd0..fd0a7aefd9 100644 --- a/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx +++ b/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx @@ -1,12 +1,9 @@ -import { createSelector, current } from '@reduxjs/toolkit'; +import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { Group, Line } from 'react-konva'; import { - baseCanvasImageSelector, - // canvasClipSelector, - // canvasModeSelector, - currentCanvasSelector, + canvasSelector, isCanvasBaseImage, isCanvasBaseLine, } from './canvasSlice'; @@ -14,9 +11,9 @@ import IAICanvasImage from './IAICanvasImage'; import { rgbaColorToString } from './util/colorToString'; const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { - const { objects } = currentCanvas.layerState; + [canvasSelector], + (canvas) => { + const { objects } = canvas.layerState; return { objects, diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx index 7e6f6edeb5..0574e46ef9 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx +++ b/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx @@ -1,15 +1,15 @@ import { ButtonGroup } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { - currentCanvasSelector, resizeAndScaleCanvas, isStagingSelector, resetCanvas, resetCanvasView, setShouldLockToInitialImage, setTool, + canvasSelector, } from './canvasSlice'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import { canvasImageLayerRef, stageRef } from './IAICanvas'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -33,15 +33,10 @@ import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; import IAICheckbox from 'common/components/IAICheckbox'; import { ChangeEvent } from 'react'; -export const canvasControlsSelector = createSelector( - [ - (state: RootState) => state.canvas, - currentCanvasSelector, - isStagingSelector, - ], - (canvas, currentCanvas, isStaging) => { - const { shouldLockToInitialImage } = canvas; - const { tool } = currentCanvas; +export const selector = createSelector( + [canvasSelector, isStagingSelector], + (canvas, isStaging) => { + const { tool, shouldLockToInitialImage } = canvas; return { tool, isStaging, @@ -57,9 +52,8 @@ export const canvasControlsSelector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool, isStaging, shouldLockToInitialImage } = useAppSelector( - canvasControlsSelector - ); + const { tool, isStaging, shouldLockToInitialImage } = + useAppSelector(selector); const handleToggleShouldLockToInitialImage = ( e: ChangeEvent diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/IAICanvasResizer.tsx index 825e96e272..483bc47abc 100644 --- a/frontend/src/features/canvas/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/IAICanvasResizer.tsx @@ -1,10 +1,10 @@ import { Spinner } from '@chakra-ui/react'; import { useLayoutEffect, useRef } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { - baseCanvasImageSelector, - currentCanvasSelector, + initialCanvasImageSelector, + canvasSelector, resizeAndScaleCanvas, resizeCanvas, setCanvasContainerDimensions, @@ -13,11 +13,10 @@ import { import { createSelector } from '@reduxjs/toolkit'; const canvasResizerSelector = createSelector( - (state: RootState) => state.canvas, - currentCanvasSelector, - baseCanvasImageSelector, + canvasSelector, + initialCanvasImageSelector, activeTabNameSelector, - (canvas, currentCanvas, baseCanvasImage, activeTabName) => { + (canvas, initialCanvasImage, activeTabName) => { const { doesCanvasNeedScaling, shouldLockToInitialImage, @@ -27,7 +26,7 @@ const canvasResizerSelector = createSelector( doesCanvasNeedScaling, shouldLockToInitialImage, activeTabName, - baseCanvasImage, + initialCanvasImage, isCanvasInitialized, }; } @@ -39,7 +38,7 @@ const IAICanvasResizer = () => { doesCanvasNeedScaling, shouldLockToInitialImage, activeTabName, - baseCanvasImage, + initialCanvasImage, isCanvasInitialized, } = useAppSelector(canvasResizerSelector); @@ -51,9 +50,10 @@ const IAICanvasResizer = () => { const { clientWidth, clientHeight } = ref.current; - if (!baseCanvasImage?.image) return; + if (!initialCanvasImage?.image) return; - const { width: imageWidth, height: imageHeight } = baseCanvasImage.image; + const { width: imageWidth, height: imageHeight } = + initialCanvasImage.image; dispatch( setCanvasContainerDimensions({ @@ -70,9 +70,9 @@ const IAICanvasResizer = () => { dispatch(setDoesCanvasNeedScaling(false)); // } - // if ((activeTabName === 'inpainting') && baseCanvasImage?.image) { + // if ((activeTabName === 'inpainting') && initialCanvasImage?.image) { // const { width: imageWidth, height: imageHeight } = - // baseCanvasImage.image; + // initialCanvasImage.image; // const scale = Math.min( // 1, @@ -100,7 +100,7 @@ const IAICanvasResizer = () => { }, 0); }, [ dispatch, - baseCanvasImage, + initialCanvasImage, doesCanvasNeedScaling, activeTabName, isCanvasInitialized, diff --git a/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx index 3efbaf3fd3..5a34257b20 100644 --- a/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx @@ -1,8 +1,7 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { - currentCanvasSelector, - outpaintingCanvasSelector, + canvasSelector, setShouldAutoSave, setShouldDarkenOutsideBoundingBox, setShouldShowGrid, @@ -17,13 +16,15 @@ import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; export const canvasControlsSelector = createSelector( - [currentCanvasSelector, outpaintingCanvasSelector], - (currentCanvas, outpaintingCanvas) => { - const { shouldDarkenOutsideBoundingBox, shouldShowIntermediates } = - currentCanvas; - - const { shouldShowGrid, shouldSnapToGrid, shouldAutoSave } = - outpaintingCanvas; + [canvasSelector], + (canvas) => { + const { + shouldDarkenOutsideBoundingBox, + shouldShowIntermediates, + shouldShowGrid, + shouldSnapToGrid, + shouldAutoSave, + } = canvas; return { shouldShowGrid, diff --git a/frontend/src/features/canvas/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/IAICanvasStagingArea.tsx index 312a6c3f67..6ecc870ca2 100644 --- a/frontend/src/features/canvas/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/IAICanvasStagingArea.tsx @@ -1,40 +1,20 @@ -import { background, ButtonGroup, ChakraProvider } from '@chakra-ui/react'; -import { CacheProvider } from '@emotion/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIButton from 'common/components/IAIButton'; -import IAIIconButton from 'common/components/IAIIconButton'; import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; -import { emotionCache } from 'main'; import { useCallback, useState } from 'react'; -import { - FaArrowLeft, - FaArrowRight, - FaCheck, - FaEye, - FaEyeSlash, - FaTrash, -} from 'react-icons/fa'; import { Group, Rect } from 'react-konva'; -import { Html } from 'react-konva-utils'; -import { - commitStagingAreaImage, - currentCanvasSelector, - discardStagedImages, - nextStagingAreaImage, - prevStagingAreaImage, -} from './canvasSlice'; +import { canvasSelector } from './canvasSlice'; import IAICanvasImage from './IAICanvasImage'; const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { + [canvasSelector], + (canvas) => { const { layerState: { stagingArea: { images, selectedImageIndex }, }, - } = currentCanvas; + } = canvas; return { currentStagingAreaImage: @@ -54,9 +34,7 @@ type Props = GroupConfig; const IAICanvasStagingArea = (props: Props) => { const { ...rest } = props; - const dispatch = useAppDispatch(); - const { isOnFirstImage, isOnLastImage, currentStagingAreaImage } = - useAppSelector(selector); + const { currentStagingAreaImage } = useAppSelector(selector); const [shouldShowStagedImage, setShouldShowStagedImage] = useState(true); @@ -64,14 +42,6 @@ const IAICanvasStagingArea = (props: Props) => { const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = useState(true); - const handleMouseOver = useCallback(() => { - setShouldShowStagingAreaOutline(false); - }, []); - - const handleMouseOut = useCallback(() => { - setShouldShowStagingAreaOutline(true); - }, []); - if (!currentStagingAreaImage) return null; const { @@ -106,73 +76,6 @@ const IAICanvasStagingArea = (props: Props) => { />
)} - {/* - - -
- - } - onClick={() => dispatch(prevStagingAreaImage())} - onMouseOver={handleMouseOver} - onMouseOut={handleMouseOut} - data-selected={true} - isDisabled={isOnFirstImage} - /> - } - onClick={() => dispatch(nextStagingAreaImage())} - onMouseOver={handleMouseOver} - onMouseOut={handleMouseOut} - data-selected={true} - isDisabled={isOnLastImage} - /> - } - onClick={() => dispatch(commitStagingAreaImage())} - data-selected={true} - /> - : } - onClick={() => - setShouldShowStagedImage(!shouldShowStagedImage) - } - data-selected={true} - /> - } - onClick={() => dispatch(discardStagedImages())} - data-selected={true} - /> - -
-
-
- */}
); }; diff --git a/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx index 4342892ff4..6b684dbfe7 100644 --- a/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx +++ b/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx @@ -21,25 +21,22 @@ import { FaEyeSlash, FaTrash, } from 'react-icons/fa'; -import { Group, Rect } from 'react-konva'; -import { Html } from 'react-konva-utils'; import { commitStagingAreaImage, - currentCanvasSelector, + canvasSelector, discardStagedImages, nextStagingAreaImage, prevStagingAreaImage, } from './canvasSlice'; -import IAICanvasImage from './IAICanvasImage'; const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { + [canvasSelector], + (canvas) => { const { layerState: { stagingArea: { images, selectedImageIndex }, }, - } = currentCanvas; + } = canvas; return { currentStagingAreaImage: diff --git a/frontend/src/features/canvas/IAICanvasStatusText.tsx b/frontend/src/features/canvas/IAICanvasStatusText.tsx index 3b9694a7c5..7282818380 100644 --- a/frontend/src/features/canvas/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/IAICanvasStatusText.tsx @@ -1,15 +1,15 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; -import { currentCanvasSelector } from './canvasSlice'; +import { canvasSelector } from './canvasSlice'; const roundToHundreth = (val: number): number => { return Math.round(val * 100) / 100; }; const selector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { + [canvasSelector], + (canvas) => { const { stageDimensions: { width: stageWidth, height: stageHeight }, stageCoordinates: { x: stageX, y: stageY }, @@ -17,7 +17,7 @@ const selector = createSelector( boundingBoxCoordinates: { x: boxX, y: boxY }, cursorPosition, stageScale, - } = currentCanvas; + } = canvas; const position = cursorPosition ? { cursorX: cursorPosition.x, cursorY: cursorPosition.y } diff --git a/frontend/src/features/canvas/canvasReducers.ts b/frontend/src/features/canvas/canvasReducers.ts index c7aefbc55b..e70bfddb55 100644 --- a/frontend/src/features/canvas/canvasReducers.ts +++ b/frontend/src/features/canvas/canvasReducers.ts @@ -1,71 +1,11 @@ import * as InvokeAI from 'app/invokeai'; -import { PayloadAction } from '@reduxjs/toolkit'; -import { CanvasState, Dimensions, initialLayerState } from './canvasSlice'; -import { Vector2d } from 'konva/lib/types'; +import { CanvasState, initialLayerState } from './canvasSlice'; import { roundDownToMultiple, roundToMultiple, } from 'common/util/roundDownToMultiple'; import _ from 'lodash'; -// export const setInitialInpaintingImage = ( -// state: CanvasState, -// image: InvokeAI.Image -// // action: PayloadAction -// ) => { -// const { width: canvasWidth, height: canvasHeight } = -// state.inpainting.stageDimensions; -// const { width, height } = state.inpainting.boundingBoxDimensions; -// const { x, y } = state.inpainting.boundingBoxCoordinates; - -// const maxWidth = Math.min(image.width, canvasWidth); -// const maxHeight = Math.min(image.height, canvasHeight); - -// const newCoordinates: Vector2d = { x, y }; -// const newDimensions: Dimensions = { width, height }; - -// if (width + x > maxWidth) { -// // Bounding box at least needs to be translated -// if (width > maxWidth) { -// // Bounding box also needs to be resized -// newDimensions.width = roundDownToMultiple(maxWidth, 64); -// } -// newCoordinates.x = maxWidth - newDimensions.width; -// } - -// if (height + y > maxHeight) { -// // Bounding box at least needs to be translated -// if (height > maxHeight) { -// // Bounding box also needs to be resized -// newDimensions.height = roundDownToMultiple(maxHeight, 64); -// } -// newCoordinates.y = maxHeight - newDimensions.height; -// } - -// state.inpainting.boundingBoxDimensions = newDimensions; -// state.inpainting.boundingBoxCoordinates = newCoordinates; - -// state.inpainting.pastLayerStates.push(state.inpainting.layerState); - -// state.inpainting.layerState = { -// ...initialLayerState, -// objects: [ -// { -// kind: 'image', -// layer: 'base', -// x: 0, -// y: 0, -// width: image.width, -// height: image.height, -// image: image, -// }, -// ], -// }; - -// state.outpainting.futureLayerStates = []; -// state.doesCanvasNeedScaling = true; -// }; - export const setInitialCanvasImage = ( state: CanvasState, image: InvokeAI.Image @@ -86,12 +26,12 @@ export const setInitialCanvasImage = ( ), }; - state.outpainting.boundingBoxDimensions = newBoundingBoxDimensions; + state.boundingBoxDimensions = newBoundingBoxDimensions; - state.outpainting.boundingBoxCoordinates = newBoundingBoxCoordinates; + state.boundingBoxCoordinates = newBoundingBoxCoordinates; - state.outpainting.pastLayerStates.push(state.outpainting.layerState); - state.outpainting.layerState = { + state.pastLayerStates.push(state.layerState); + state.layerState = { ...initialLayerState, objects: [ { @@ -105,7 +45,7 @@ export const setInitialCanvasImage = ( }, ], }; - state.outpainting.futureLayerStates = []; + state.futureLayerStates = []; state.isCanvasInitialized = false; state.doesCanvasNeedScaling = true; diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index f2e289767d..13f8f5ae14 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -1,10 +1,4 @@ -import { - createAsyncThunk, - createSelector, - createSlice, - current, -} from '@reduxjs/toolkit'; -import { v4 as uuidv4 } from 'uuid'; +import { createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; import { IRect, Vector2d } from 'konva/lib/types'; import { RgbaColor } from 'react-colorful'; @@ -12,10 +6,6 @@ import * as InvokeAI from 'app/invokeai'; import _ from 'lodash'; import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import { RootState } from 'app/store'; -import { MutableRefObject } from 'react'; -import Konva from 'konva'; -import { tabMap } from 'features/tabs/InvokeTabs'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; import { uploadImage } from 'features/gallery/util/uploadImage'; import { setInitialCanvasImage } from './canvasReducers'; @@ -23,45 +13,6 @@ import calculateScale from './util/calculateScale'; import calculateCoordinates from './util/calculateCoordinates'; import floorCoordinates from './util/floorCoordinates'; -export interface GenericCanvasState { - boundingBoxCoordinates: Vector2d; - boundingBoxDimensions: Dimensions; - boundingBoxPreviewFill: RgbaColor; - brushColor: RgbaColor; - brushSize: number; - cursorPosition: Vector2d | null; - eraserSize: number; - futureLayerStates: CanvasLayerState[]; - inpaintReplace: number; - intermediateImage?: InvokeAI.Image; - isDrawing: boolean; - isMaskEnabled: boolean; - isMouseOverBoundingBox: boolean; - isMoveBoundingBoxKeyHeld: boolean; - isMoveStageKeyHeld: boolean; - isMovingBoundingBox: boolean; - isMovingStage: boolean; - isTransformingBoundingBox: boolean; - layerState: CanvasLayerState; - maskColor: RgbaColor; - maxHistory: number; - pastLayerStates: CanvasLayerState[]; - shouldDarkenOutsideBoundingBox: boolean; - shouldLockBoundingBox: boolean; - shouldPreserveMaskedArea: boolean; - shouldShowBoundingBox: boolean; - shouldShowBrush: boolean; - shouldShowBrushPreview: boolean; - shouldShowCheckboardTransparency: boolean; - shouldShowIntermediates: boolean; - shouldUseInpaintReplace: boolean; - stageCoordinates: Vector2d; - stageDimensions: Dimensions; - stageScale: number; - tool: CanvasTool; - minimumStageScale: number; -} - export type CanvasMode = 'inpainting' | 'outpainting'; export type CanvasLayer = 'base' | 'mask'; @@ -129,30 +80,51 @@ export const isCanvasAnyLine = ( obj: CanvasObject ): obj is CanvasMaskLine | CanvasLine => obj.kind === 'line'; -export type OutpaintingCanvasState = GenericCanvasState & { - layer: CanvasLayer; - shouldShowGrid: boolean; - shouldSnapToGrid: boolean; - shouldAutoSave: boolean; -}; - -export type InpaintingCanvasState = GenericCanvasState & { - layer: 'mask'; -}; - -export type BaseCanvasState = InpaintingCanvasState | OutpaintingCanvasState; - -export type ValidCanvasName = 'inpainting' | 'outpainting'; - export interface CanvasState { - doesCanvasNeedScaling: boolean; - currentCanvas: ValidCanvasName; - inpainting: InpaintingCanvasState; - outpainting: OutpaintingCanvasState; - // mode: CanvasMode; - shouldLockToInitialImage: boolean; - isCanvasInitialized: boolean; + boundingBoxCoordinates: Vector2d; + boundingBoxDimensions: Dimensions; + boundingBoxPreviewFill: RgbaColor; + brushColor: RgbaColor; + brushSize: number; canvasContainerDimensions: Dimensions; + cursorPosition: Vector2d | null; + doesCanvasNeedScaling: boolean; + eraserSize: number; + futureLayerStates: CanvasLayerState[]; + inpaintReplace: number; + intermediateImage?: InvokeAI.Image; + isCanvasInitialized: boolean; + isDrawing: boolean; + isMaskEnabled: boolean; + isMouseOverBoundingBox: boolean; + isMoveBoundingBoxKeyHeld: boolean; + isMoveStageKeyHeld: boolean; + isMovingBoundingBox: boolean; + isMovingStage: boolean; + isTransformingBoundingBox: boolean; + layer: CanvasLayer; + layerState: CanvasLayerState; + maskColor: RgbaColor; + maxHistory: number; + minimumStageScale: number; + pastLayerStates: CanvasLayerState[]; + shouldAutoSave: boolean; + shouldDarkenOutsideBoundingBox: boolean; + shouldLockBoundingBox: boolean; + shouldLockToInitialImage: boolean; + shouldPreserveMaskedArea: boolean; + shouldShowBoundingBox: boolean; + shouldShowBrush: boolean; + shouldShowBrushPreview: boolean; + shouldShowCheckboardTransparency: boolean; + shouldShowGrid: boolean; + shouldShowIntermediates: boolean; + shouldSnapToGrid: boolean; + shouldUseInpaintReplace: boolean; + stageCoordinates: Vector2d; + stageDimensions: Dimensions; + stageScale: number; + tool: CanvasTool; } export const initialLayerState: CanvasLayerState = { @@ -167,16 +139,19 @@ export const initialLayerState: CanvasLayerState = { }, }; -const initialGenericCanvasState: GenericCanvasState = { +const initialCanvasState: CanvasState = { boundingBoxCoordinates: { x: 0, y: 0 }, boundingBoxDimensions: { width: 512, height: 512 }, boundingBoxPreviewFill: { r: 0, g: 0, b: 0, a: 0.5 }, brushColor: { r: 90, g: 90, b: 255, a: 1 }, brushSize: 50, + canvasContainerDimensions: { width: 0, height: 0 }, cursorPosition: null, + doesCanvasNeedScaling: false, eraserSize: 50, futureLayerStates: [], inpaintReplace: 0.1, + isCanvasInitialized: false, isDrawing: false, isMaskEnabled: true, isMouseOverBoundingBox: false, @@ -185,121 +160,101 @@ const initialGenericCanvasState: GenericCanvasState = { isMovingBoundingBox: false, isMovingStage: false, isTransformingBoundingBox: false, + layer: 'base', layerState: initialLayerState, maskColor: { r: 255, g: 90, b: 90, a: 1 }, maxHistory: 128, + minimumStageScale: 1, pastLayerStates: [], + shouldAutoSave: false, shouldDarkenOutsideBoundingBox: false, shouldLockBoundingBox: false, + shouldLockToInitialImage: false, shouldPreserveMaskedArea: false, shouldShowBoundingBox: true, shouldShowBrush: true, shouldShowBrushPreview: false, shouldShowCheckboardTransparency: false, + shouldShowGrid: true, shouldShowIntermediates: true, + shouldSnapToGrid: true, shouldUseInpaintReplace: false, stageCoordinates: { x: 0, y: 0 }, stageDimensions: { width: 0, height: 0 }, stageScale: 1, - minimumStageScale: 1, tool: 'brush', }; -const initialCanvasState: CanvasState = { - currentCanvas: 'inpainting', - doesCanvasNeedScaling: false, - shouldLockToInitialImage: false, - // mode: 'outpainting', - isCanvasInitialized: false, - canvasContainerDimensions: { width: 0, height: 0 }, - inpainting: { - layer: 'mask', - ...initialGenericCanvasState, - }, - outpainting: { - layer: 'base', - shouldShowGrid: true, - shouldSnapToGrid: true, - shouldAutoSave: false, - ...initialGenericCanvasState, - }, -}; - export const canvasSlice = createSlice({ name: 'canvas', initialState: initialCanvasState, reducers: { setTool: (state, action: PayloadAction) => { const tool = action.payload; - state[state.currentCanvas].tool = action.payload; + state.tool = action.payload; if (tool !== 'move') { - state[state.currentCanvas].isTransformingBoundingBox = false; - state[state.currentCanvas].isMouseOverBoundingBox = false; - state[state.currentCanvas].isMovingBoundingBox = false; - state[state.currentCanvas].isMovingStage = false; + state.isTransformingBoundingBox = false; + state.isMouseOverBoundingBox = false; + state.isMovingBoundingBox = false; + state.isMovingStage = false; } }, setLayer: (state, action: PayloadAction) => { - state[state.currentCanvas].layer = action.payload; + state.layer = action.payload; }, toggleTool: (state) => { - const currentTool = state[state.currentCanvas].tool; + const currentTool = state.tool; if (currentTool !== 'move') { - state[state.currentCanvas].tool = - currentTool === 'brush' ? 'eraser' : 'brush'; + state.tool = currentTool === 'brush' ? 'eraser' : 'brush'; } }, setMaskColor: (state, action: PayloadAction) => { - state[state.currentCanvas].maskColor = action.payload; + state.maskColor = action.payload; }, setBrushColor: (state, action: PayloadAction) => { - state[state.currentCanvas].brushColor = action.payload; + state.brushColor = action.payload; }, setBrushSize: (state, action: PayloadAction) => { - state[state.currentCanvas].brushSize = action.payload; + state.brushSize = action.payload; }, setEraserSize: (state, action: PayloadAction) => { - state[state.currentCanvas].eraserSize = action.payload; + state.eraserSize = action.payload; }, clearMask: (state) => { - const currentCanvas = state[state.currentCanvas]; - currentCanvas.pastLayerStates.push(currentCanvas.layerState); - currentCanvas.layerState.objects = state[ - state.currentCanvas - ].layerState.objects.filter((obj) => !isCanvasMaskLine(obj)); - currentCanvas.futureLayerStates = []; - currentCanvas.shouldPreserveMaskedArea = false; + state.pastLayerStates.push(state.layerState); + state.layerState.objects = state.layerState.objects.filter( + (obj) => !isCanvasMaskLine(obj) + ); + state.futureLayerStates = []; + state.shouldPreserveMaskedArea = false; }, toggleShouldInvertMask: (state) => { - state[state.currentCanvas].shouldPreserveMaskedArea = - !state[state.currentCanvas].shouldPreserveMaskedArea; + state.shouldPreserveMaskedArea = !state.shouldPreserveMaskedArea; }, toggleShouldShowMask: (state) => { - state[state.currentCanvas].isMaskEnabled = - !state[state.currentCanvas].isMaskEnabled; + state.isMaskEnabled = !state.isMaskEnabled; }, setShouldPreserveMaskedArea: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldPreserveMaskedArea = action.payload; + state.shouldPreserveMaskedArea = action.payload; }, setIsMaskEnabled: (state, action: PayloadAction) => { - state[state.currentCanvas].isMaskEnabled = action.payload; - state[state.currentCanvas].layer = action.payload ? 'mask' : 'base'; + state.isMaskEnabled = action.payload; + state.layer = action.payload ? 'mask' : 'base'; }, setShouldShowCheckboardTransparency: ( state, action: PayloadAction ) => { - state[state.currentCanvas].shouldShowCheckboardTransparency = - action.payload; + state.shouldShowCheckboardTransparency = action.payload; }, setShouldShowBrushPreview: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldShowBrushPreview = action.payload; + state.shouldShowBrushPreview = action.payload; }, setShouldShowBrush: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldShowBrush = action.payload; + state.shouldShowBrush = action.payload; }, setCursorPosition: (state, action: PayloadAction) => { - state[state.currentCanvas].cursorPosition = action.payload; + state.cursorPosition = action.payload; }, clearImageToInpaint: (state) => { // TODO @@ -312,102 +267,87 @@ export const canvasSlice = createSlice({ setInitialCanvasImage(state, action.payload); }, setStageDimensions: (state, action: PayloadAction) => { - state[state.currentCanvas].stageDimensions = action.payload; + state.stageDimensions = action.payload; const { width: canvasWidth, height: canvasHeight } = action.payload; const { width: boundingBoxWidth, height: boundingBoxHeight } = - state[state.currentCanvas].boundingBoxDimensions; + state.boundingBoxDimensions; const newBoundingBoxWidth = roundDownToMultiple( - _.clamp( - boundingBoxWidth, - 64, - canvasWidth / state[state.currentCanvas].stageScale - ), + _.clamp(boundingBoxWidth, 64, canvasWidth / state.stageScale), 64 ); const newBoundingBoxHeight = roundDownToMultiple( - _.clamp( - boundingBoxHeight, - 64, - canvasHeight / state[state.currentCanvas].stageScale - ), + _.clamp(boundingBoxHeight, 64, canvasHeight / state.stageScale), 64 ); - state[state.currentCanvas].boundingBoxDimensions = { + state.boundingBoxDimensions = { width: newBoundingBoxWidth, height: newBoundingBoxHeight, }; }, setBoundingBoxDimensions: (state, action: PayloadAction) => { - state[state.currentCanvas].boundingBoxDimensions = action.payload; + state.boundingBoxDimensions = action.payload; }, setBoundingBoxCoordinates: (state, action: PayloadAction) => { - state[state.currentCanvas].boundingBoxCoordinates = floorCoordinates( - action.payload - ); + state.boundingBoxCoordinates = floorCoordinates(action.payload); }, setStageCoordinates: (state, action: PayloadAction) => { - state.outpainting.stageCoordinates = floorCoordinates(action.payload); + state.stageCoordinates = floorCoordinates(action.payload); }, setBoundingBoxPreviewFill: (state, action: PayloadAction) => { - state[state.currentCanvas].boundingBoxPreviewFill = action.payload; + state.boundingBoxPreviewFill = action.payload; }, setDoesCanvasNeedScaling: (state, action: PayloadAction) => { state.doesCanvasNeedScaling = action.payload; }, setStageScale: (state, action: PayloadAction) => { - state[state.currentCanvas].stageScale = action.payload; + state.stageScale = action.payload; }, setShouldDarkenOutsideBoundingBox: ( state, action: PayloadAction ) => { - state[state.currentCanvas].shouldDarkenOutsideBoundingBox = - action.payload; + state.shouldDarkenOutsideBoundingBox = action.payload; }, setIsDrawing: (state, action: PayloadAction) => { - state[state.currentCanvas].isDrawing = action.payload; + state.isDrawing = action.payload; }, setClearBrushHistory: (state) => { - state[state.currentCanvas].pastLayerStates = []; - state[state.currentCanvas].futureLayerStates = []; + state.pastLayerStates = []; + state.futureLayerStates = []; }, setShouldUseInpaintReplace: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldUseInpaintReplace = action.payload; + state.shouldUseInpaintReplace = action.payload; }, setInpaintReplace: (state, action: PayloadAction) => { - state[state.currentCanvas].inpaintReplace = action.payload; + state.inpaintReplace = action.payload; }, setShouldLockBoundingBox: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldLockBoundingBox = action.payload; + state.shouldLockBoundingBox = action.payload; }, toggleShouldLockBoundingBox: (state) => { - state[state.currentCanvas].shouldLockBoundingBox = - !state[state.currentCanvas].shouldLockBoundingBox; + state.shouldLockBoundingBox = !state.shouldLockBoundingBox; }, setShouldShowBoundingBox: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldShowBoundingBox = action.payload; + state.shouldShowBoundingBox = action.payload; }, setIsTransformingBoundingBox: (state, action: PayloadAction) => { - state[state.currentCanvas].isTransformingBoundingBox = action.payload; + state.isTransformingBoundingBox = action.payload; }, setIsMovingBoundingBox: (state, action: PayloadAction) => { - state[state.currentCanvas].isMovingBoundingBox = action.payload; + state.isMovingBoundingBox = action.payload; }, setIsMouseOverBoundingBox: (state, action: PayloadAction) => { - state[state.currentCanvas].isMouseOverBoundingBox = action.payload; + state.isMouseOverBoundingBox = action.payload; }, setIsMoveBoundingBoxKeyHeld: (state, action: PayloadAction) => { - state[state.currentCanvas].isMoveBoundingBoxKeyHeld = action.payload; + state.isMoveBoundingBoxKeyHeld = action.payload; }, setIsMoveStageKeyHeld: (state, action: PayloadAction) => { - state[state.currentCanvas].isMoveStageKeyHeld = action.payload; - }, - setCurrentCanvas: (state, action: PayloadAction) => { - state.currentCanvas = action.payload; + state.isMoveStageKeyHeld = action.payload; }, addImageToStagingArea: ( state, @@ -420,36 +360,31 @@ export const canvasSlice = createSlice({ if (!boundingBox || !image) return; - const currentCanvas = state.outpainting; + state.pastLayerStates.push(_.cloneDeep(state.layerState)); - currentCanvas.pastLayerStates.push(_.cloneDeep(currentCanvas.layerState)); - - if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - currentCanvas.pastLayerStates.shift(); + if (state.pastLayerStates.length > state.maxHistory) { + state.pastLayerStates.shift(); } - currentCanvas.layerState.stagingArea.images.push({ + state.layerState.stagingArea.images.push({ kind: 'image', layer: 'base', ...boundingBox, image, }); - currentCanvas.layerState.stagingArea.selectedImageIndex = - currentCanvas.layerState.stagingArea.images.length - 1; + state.layerState.stagingArea.selectedImageIndex = + state.layerState.stagingArea.images.length - 1; - currentCanvas.futureLayerStates = []; + state.futureLayerStates = []; }, discardStagedImages: (state) => { - const currentCanvas = state[state.currentCanvas]; - currentCanvas.layerState.stagingArea = { + state.layerState.stagingArea = { ...initialLayerState.stagingArea, }; }, addLine: (state, action: PayloadAction) => { - const currentCanvas = state[state.currentCanvas]; - - const { tool, layer, brushColor, brushSize, eraserSize } = currentCanvas; + const { tool, layer, brushColor, brushSize, eraserSize } = state; if (tool === 'move') return; @@ -459,13 +394,13 @@ export const canvasSlice = createSlice({ const newColor = layer === 'base' && tool === 'brush' ? { color: brushColor } : {}; - currentCanvas.pastLayerStates.push(currentCanvas.layerState); + state.pastLayerStates.push(state.layerState); - if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - currentCanvas.pastLayerStates.shift(); + if (state.pastLayerStates.length > state.maxHistory) { + state.pastLayerStates.shift(); } - currentCanvas.layerState.objects.push({ + state.layerState.objects.push({ kind: 'line', layer, tool, @@ -474,68 +409,61 @@ export const canvasSlice = createSlice({ ...newColor, }); - currentCanvas.futureLayerStates = []; + state.futureLayerStates = []; }, addPointToCurrentLine: (state, action: PayloadAction) => { - const lastLine = - state[state.currentCanvas].layerState.objects.findLast(isCanvasAnyLine); + const lastLine = state.layerState.objects.findLast(isCanvasAnyLine); if (!lastLine) return; lastLine.points.push(...action.payload); }, undo: (state) => { - const currentCanvas = state[state.currentCanvas]; - - const targetState = currentCanvas.pastLayerStates.pop(); + const targetState = state.pastLayerStates.pop(); if (!targetState) return; - currentCanvas.futureLayerStates.unshift(currentCanvas.layerState); + state.futureLayerStates.unshift(state.layerState); - if (currentCanvas.futureLayerStates.length > currentCanvas.maxHistory) { - currentCanvas.futureLayerStates.pop(); + if (state.futureLayerStates.length > state.maxHistory) { + state.futureLayerStates.pop(); } - currentCanvas.layerState = targetState; + state.layerState = targetState; }, redo: (state) => { - const currentCanvas = state[state.currentCanvas]; - - const targetState = currentCanvas.futureLayerStates.shift(); + const targetState = state.futureLayerStates.shift(); if (!targetState) return; - currentCanvas.pastLayerStates.push(currentCanvas.layerState); + state.pastLayerStates.push(state.layerState); - if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - currentCanvas.pastLayerStates.shift(); + if (state.pastLayerStates.length > state.maxHistory) { + state.pastLayerStates.shift(); } - currentCanvas.layerState = targetState; + state.layerState = targetState; }, setShouldShowGrid: (state, action: PayloadAction) => { - state.outpainting.shouldShowGrid = action.payload; + state.shouldShowGrid = action.payload; }, setIsMovingStage: (state, action: PayloadAction) => { - state[state.currentCanvas].isMovingStage = action.payload; + state.isMovingStage = action.payload; }, setShouldSnapToGrid: (state, action: PayloadAction) => { - state.outpainting.shouldSnapToGrid = action.payload; + state.shouldSnapToGrid = action.payload; }, setShouldAutoSave: (state, action: PayloadAction) => { - state.outpainting.shouldAutoSave = action.payload; + state.shouldAutoSave = action.payload; }, setShouldShowIntermediates: (state, action: PayloadAction) => { - state[state.currentCanvas].shouldShowIntermediates = action.payload; + state.shouldShowIntermediates = action.payload; }, resetCanvas: (state) => { - state[state.currentCanvas].pastLayerStates.push( - state[state.currentCanvas].layerState - ); + state.pastLayerStates.push(state.layerState); - state[state.currentCanvas].layerState = initialLayerState; - state[state.currentCanvas].futureLayerStates = []; + state.layerState = initialLayerState; + state.futureLayerStates = []; }, setCanvasContainerDimensions: ( state, @@ -548,7 +476,7 @@ export const canvasSlice = createSlice({ state.canvasContainerDimensions; const initialCanvasImage = - state.outpainting.layerState.objects.find(isCanvasBaseImage); + state.layerState.objects.find(isCanvasBaseImage); if (!initialCanvasImage) return; @@ -559,8 +487,6 @@ export const canvasSlice = createSlice({ const { shouldLockToInitialImage } = state; - const currentCanvas = state[state.currentCanvas]; - const padding = shouldLockToInitialImage ? 1 : 0.95; const newScale = calculateScale( @@ -590,20 +516,18 @@ export const canvasSlice = createSlice({ newScale ); - currentCanvas.stageScale = newScale; - currentCanvas.minimumStageScale = newScale; - currentCanvas.stageCoordinates = newCoordinates; + state.stageScale = newScale; + state.minimumStageScale = newScale; + state.stageCoordinates = newCoordinates; - currentCanvas.stageDimensions = newDimensions; + state.stageDimensions = newDimensions; state.isCanvasInitialized = true; }, resizeCanvas: (state) => { const { width: containerWidth, height: containerHeight } = state.canvasContainerDimensions; - const currentCanvas = state[state.currentCanvas]; - - currentCanvas.stageDimensions = { + state.stageDimensions = { width: Math.floor(containerWidth), height: Math.floor(containerHeight), }; @@ -616,16 +540,13 @@ export const canvasSlice = createSlice({ ) => { const { contentRect } = action.payload; - const currentCanvas = state[state.currentCanvas]; - - const baseCanvasImage = - currentCanvas.layerState.objects.find(isCanvasBaseImage); + const baseCanvasImage = state.layerState.objects.find(isCanvasBaseImage); const { shouldLockToInitialImage } = state; if (!baseCanvasImage) return; const { stageDimensions: { width: stageWidth, height: stageHeight }, - } = currentCanvas; + } = state; const { x, y, width, height } = contentRect; @@ -648,56 +569,49 @@ export const canvasSlice = createSlice({ newScale ); - currentCanvas.stageScale = newScale; + state.stageScale = newScale; - currentCanvas.stageCoordinates = newCoordinates; + state.stageCoordinates = newCoordinates; }, nextStagingAreaImage: (state) => { - const currentIndex = - state.outpainting.layerState.stagingArea.selectedImageIndex; - const length = state.outpainting.layerState.stagingArea.images.length; + const currentIndex = state.layerState.stagingArea.selectedImageIndex; + const length = state.layerState.stagingArea.images.length; - state.outpainting.layerState.stagingArea.selectedImageIndex = Math.min( + state.layerState.stagingArea.selectedImageIndex = Math.min( currentIndex + 1, length - 1 ); }, prevStagingAreaImage: (state) => { - const currentIndex = - state.outpainting.layerState.stagingArea.selectedImageIndex; + const currentIndex = state.layerState.stagingArea.selectedImageIndex; - state.outpainting.layerState.stagingArea.selectedImageIndex = Math.max( + state.layerState.stagingArea.selectedImageIndex = Math.max( currentIndex - 1, 0 ); }, commitStagingAreaImage: (state) => { - const currentCanvas = state[state.currentCanvas]; - const { images, selectedImageIndex } = - currentCanvas.layerState.stagingArea; + const { images, selectedImageIndex } = state.layerState.stagingArea; - currentCanvas.pastLayerStates.push(_.cloneDeep(currentCanvas.layerState)); + state.pastLayerStates.push(_.cloneDeep(state.layerState)); - if (currentCanvas.pastLayerStates.length > currentCanvas.maxHistory) { - currentCanvas.pastLayerStates.shift(); + if (state.pastLayerStates.length > state.maxHistory) { + state.pastLayerStates.shift(); } - currentCanvas.layerState.objects.push({ + state.layerState.objects.push({ ...images[selectedImageIndex], }); - currentCanvas.layerState.stagingArea = { + state.layerState.stagingArea = { ...initialLayerState.stagingArea, }; - currentCanvas.futureLayerStates = []; + state.futureLayerStates = []; }, setShouldLockToInitialImage: (state, action: PayloadAction) => { state.shouldLockToInitialImage = action.payload; }, - // setCanvasMode: (state, action: PayloadAction) => { - // state.mode = action.payload; - // }, }, extraReducers: (builder) => { builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { @@ -705,13 +619,13 @@ export const canvasSlice = createSlice({ const { image, kind, originalBoundingBox } = action.payload; if (kind === 'temp_merged_canvas') { - state.outpainting.pastLayerStates.push({ - ...state.outpainting.layerState, + state.pastLayerStates.push({ + ...state.layerState, }); - state.outpainting.futureLayerStates = []; + state.futureLayerStates = []; - state.outpainting.layerState.objects = [ + state.layerState.objects = [ { kind: 'image', layer: 'base', @@ -779,7 +693,6 @@ export const { setIsMoveBoundingBoxKeyHeld, setIsMoveStageKeyHeld, setStageCoordinates, - setCurrentCanvas, addImageToStagingArea, resetCanvas, setShouldShowGrid, @@ -800,41 +713,15 @@ export const { export default canvasSlice.reducer; -export const currentCanvasSelector = (state: RootState): BaseCanvasState => - state.canvas[state.canvas.currentCanvas]; +export const canvasSelector = (state: RootState): CanvasState => state.canvas; export const isStagingSelector = (state: RootState): boolean => - state.canvas[state.canvas.currentCanvas].layerState.stagingArea.images - .length > 0; - -export const outpaintingCanvasSelector = ( - state: RootState -): OutpaintingCanvasState => state.canvas.outpainting; - -export const inpaintingCanvasSelector = ( - state: RootState -): InpaintingCanvasState => state.canvas.inpainting; + state.canvas.layerState.stagingArea.images.length > 0; export const shouldLockToInitialImageSelector = (state: RootState): boolean => state.canvas.shouldLockToInitialImage; -export const baseCanvasImageSelector = createSelector( - [currentCanvasSelector], - (currentCanvas) => { - return currentCanvas.layerState.objects.find(isCanvasBaseImage); - } -); - -// export const canvasClipSelector = createSelector( -// [canvasModeSelector, baseCanvasImageSelector], -// (canvasMode, baseCanvasImage) => { -// return canvasMode === 'inpainting' -// ? { -// clipX: 0, -// clipY: 0, -// clipWidth: baseCanvasImage?.width, -// clipHeight: baseCanvasImage?.height, -// } -// : {}; -// } -// ); +export const initialCanvasImageSelector = ( + state: RootState +): CanvasImage | undefined => + state.canvas.layerState.objects.find(isCanvasBaseImage); diff --git a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts index 1331149dec..07a7a561d5 100644 --- a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts @@ -1,20 +1,17 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { useCallback } from 'react'; import { - baseCanvasImageSelector, - currentCanvasSelector, + canvasSelector, isStagingSelector, setIsMovingStage, setStageCoordinates, - shouldLockToInitialImageSelector, } from '../canvasSlice'; const selector = createSelector( - [currentCanvasSelector, isStagingSelector], + [canvasSelector, isStagingSelector], (canvas, isStaging) => { const { tool } = canvas; return { diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index 9ccef4731d..dcb7265b85 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -9,19 +9,19 @@ import { toggleShouldLockBoundingBox, } from 'features/canvas/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { currentCanvasSelector } from '../canvasSlice'; +import { canvasSelector } from '../canvasSlice'; import { useRef } from 'react'; import { stageRef } from '../IAICanvas'; const inpaintingCanvasHotkeysSelector = createSelector( - [currentCanvasSelector, activeTabNameSelector], - (currentCanvas, activeTabName) => { + [canvasSelector, activeTabNameSelector], + (canvas, activeTabName) => { const { cursorPosition, shouldLockBoundingBox, shouldShowBoundingBox, tool, - } = currentCanvas; + } = canvas; return { activeTabName, diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index ae72b1686f..8daf6d1f0f 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -7,7 +7,7 @@ import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; import { addLine, - currentCanvasSelector, + canvasSelector, isStagingSelector, setIsDrawing, setIsMovingStage, @@ -15,9 +15,9 @@ import { import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector, isStagingSelector], - (activeTabName, currentCanvas, isStaging) => { - const { tool } = currentCanvas; + [activeTabNameSelector, canvasSelector, isStagingSelector], + (activeTabName, canvas, isStaging) => { + const { tool } = canvas; return { tool, activeTabName, diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts index 997faa058b..60485d8574 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts @@ -7,16 +7,16 @@ import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; import { addLine, - currentCanvasSelector, + canvasSelector, isStagingSelector, setIsDrawing, } from '../canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector, isStagingSelector], - (activeTabName, currentCanvas, isStaging) => { - const { tool } = currentCanvas; + [activeTabNameSelector, canvasSelector, isStagingSelector], + (activeTabName, canvas, isStaging) => { + const { tool } = canvas; return { tool, activeTabName, diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts index 8519e8e9ab..211da0b78d 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts @@ -7,17 +7,16 @@ import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; import { addPointToCurrentLine, - currentCanvasSelector, - GenericCanvasState, + canvasSelector, isStagingSelector, setCursorPosition, } from '../canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector, isStagingSelector], - (activeTabName, currentCanvas, isStaging) => { - const { tool, isDrawing } = currentCanvas; + [activeTabNameSelector, canvasSelector, isStagingSelector], + (activeTabName, canvas, isStaging) => { + const { tool, isDrawing } = canvas; return { tool, isDrawing, diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts index 64c6d68da1..ebc15044c7 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts @@ -7,8 +7,7 @@ import { MutableRefObject, useCallback } from 'react'; import { // addPointToCurrentEraserLine, addPointToCurrentLine, - currentCanvasSelector, - GenericCanvasState, + canvasSelector, isStagingSelector, setIsDrawing, setIsMovingStage, @@ -16,9 +15,9 @@ import { import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( - [activeTabNameSelector, currentCanvasSelector, isStagingSelector], - (activeTabName, currentCanvas, isStaging) => { - const { tool, isDrawing } = currentCanvas; + [activeTabNameSelector, canvasSelector, isStagingSelector], + (activeTabName, canvas, isStaging) => { + const { tool, isDrawing } = canvas; return { tool, isDrawing, diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts index 63b0812466..1674b6663c 100644 --- a/frontend/src/features/canvas/hooks/useCanvasZoom.ts +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -1,14 +1,13 @@ import { createSelector } from '@reduxjs/toolkit'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; import { - baseCanvasImageSelector, - currentCanvasSelector, - GenericCanvasState, + initialCanvasImageSelector, + canvasSelector, setStageCoordinates, setStageScale, shouldLockToInitialImageSelector, @@ -21,30 +20,23 @@ import { const selector = createSelector( [ - (state: RootState) => state.canvas, activeTabNameSelector, - currentCanvasSelector, - baseCanvasImageSelector, + canvasSelector, + initialCanvasImageSelector, shouldLockToInitialImageSelector, ], - ( - canvas, - activeTabName, - currentCanvas, - baseCanvasImage, - shouldLockToInitialImage - ) => { + (activeTabName, canvas, initialCanvasImage, shouldLockToInitialImage) => { const { isMoveStageKeyHeld, stageScale, stageDimensions, minimumStageScale, - } = currentCanvas; + } = canvas; return { isMoveStageKeyHeld, stageScale, activeTabName, - baseCanvasImage, + initialCanvasImage, shouldLockToInitialImage, stageDimensions, minimumStageScale, @@ -59,7 +51,7 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { isMoveStageKeyHeld, stageScale, activeTabName, - baseCanvasImage, + initialCanvasImage, shouldLockToInitialImage, stageDimensions, minimumStageScale, @@ -72,7 +64,7 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { activeTabName !== 'outpainting' || !stageRef.current || isMoveStageKeyHeld || - !baseCanvasImage + !initialCanvasImage ) return; @@ -109,13 +101,14 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { if (shouldLockToInitialImage) { newCoordinates.x = _.clamp( newCoordinates.x, - stageDimensions.width - Math.floor(baseCanvasImage.width * newScale), + stageDimensions.width - + Math.floor(initialCanvasImage.width * newScale), 0 ); newCoordinates.y = _.clamp( newCoordinates.y, stageDimensions.height - - Math.floor(baseCanvasImage.height * newScale), + Math.floor(initialCanvasImage.height * newScale), 0 ); } @@ -127,7 +120,7 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { activeTabName, stageRef, isMoveStageKeyHeld, - baseCanvasImage, + initialCanvasImage, stageScale, shouldLockToInitialImage, minimumStageScale, diff --git a/frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts b/frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts deleted file mode 100644 index f2066c5f0b..0000000000 --- a/frontend/src/features/canvas/hooks/useUnscaleCanvasValue.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { useAppSelector } from 'app/store'; -import _ from 'lodash'; -import { currentCanvasSelector, GenericCanvasState } from '../canvasSlice'; - -const selector = createSelector( - [currentCanvasSelector], - (currentCanvas: GenericCanvasState) => { - return currentCanvas.stageScale; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -const useUnscaleCanvasValue = () => { - const stageScale = useAppSelector(selector); - return (value: number) => value / stageScale; -}; - -export default useUnscaleCanvasValue; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 9d2cacfe23..76ad6e4e41 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -21,7 +21,7 @@ export const mergeAndUploadCanvas = createAsyncThunk( const state = getState() as RootState; - const stageScale = state.canvas[state.canvas.currentCanvas].stageScale; + const stageScale = state.canvas.stageScale; if (!canvasImageLayerRef.current) return; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx index 267c82e3c1..ed61f70c2d 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx @@ -2,16 +2,14 @@ import React from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; import { - currentCanvasSelector, - GenericCanvasState, + canvasSelector, setShouldDarkenOutsideBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; const selector = createSelector( - currentCanvasSelector, - (currentCanvas: GenericCanvasState) => - currentCanvas.shouldDarkenOutsideBoundingBox + canvasSelector, + (canvas) => canvas.shouldDarkenOutsideBoundingBox ); export default function BoundingBoxDarkenOutside() { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx index f874a05860..12a6306b75 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx @@ -4,7 +4,7 @@ import IAISlider from 'common/components/IAISlider'; import { useAppDispatch, useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; import { - currentCanvasSelector, + canvasSelector, setBoundingBoxDimensions, } from 'features/canvas/canvasSlice'; @@ -12,10 +12,10 @@ import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import _ from 'lodash'; const boundingBoxDimensionsSelector = createSelector( - currentCanvasSelector, - (currentCanvas) => { + canvasSelector, + (canvas) => { const { stageDimensions, boundingBoxDimensions, shouldLockBoundingBox } = - currentCanvas; + canvas; return { stageDimensions, boundingBoxDimensions, diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx index 5bf5d77007..803353983b 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx @@ -2,14 +2,14 @@ import React from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; import { - currentCanvasSelector, + canvasSelector, setShouldLockBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; const boundingBoxLockSelector = createSelector( - currentCanvasSelector, - (currentCanvas) => currentCanvas.shouldLockBoundingBox + canvasSelector, + (canvas) => canvas.shouldLockBoundingBox ); export default function BoundingBoxLock() { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx index 622b68f1df..d2ccc12a5e 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx @@ -3,14 +3,14 @@ import { BiHide, BiShow } from 'react-icons/bi'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { - currentCanvasSelector, + canvasSelector, setShouldShowBoundingBox, } from 'features/canvas/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; const boundingBoxVisibilitySelector = createSelector( - currentCanvasSelector, - (currentCanvas) => currentCanvas.shouldShowBoundingBox + canvasSelector, + (canvas) => canvas.shouldShowBoundingBox ); export default function BoundingBoxVisibility() { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx index 993349990e..c373bc1a89 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx @@ -3,22 +3,20 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIButton from 'common/components/IAIButton'; import { - currentCanvasSelector, - InpaintingCanvasState, - OutpaintingCanvasState, + canvasSelector, setClearBrushHistory, } from 'features/canvas/canvasSlice'; import _ from 'lodash'; const clearBrushHistorySelector = createSelector( - currentCanvasSelector, - (currentCanvas) => { - const { pastLayerStates, futureLayerStates } = currentCanvas as - | InpaintingCanvasState - | OutpaintingCanvasState; + canvasSelector, + (canvas) => { + const { pastLayerStates, futureLayerStates } = canvas; return { mayClearBrushHistory: - futureLayerStates.length > 0 || pastLayerStates.length > 0 ? false : true, + futureLayerStates.length > 0 || pastLayerStates.length > 0 + ? false + : true, }; }, { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx index ac6f1b1109..dd164f7015 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx @@ -6,16 +6,15 @@ import IAISwitch from '../../../../common/components/IAISwitch'; import IAISlider from '../../../../common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; import { - currentCanvasSelector, - GenericCanvasState, + canvasSelector, setInpaintReplace, setShouldUseInpaintReplace, } from 'features/canvas/canvasSlice'; const canvasInpaintReplaceSelector = createSelector( - currentCanvasSelector, - (currentCanvas: GenericCanvasState) => { - const { inpaintReplace, shouldUseInpaintReplace } = currentCanvas; + canvasSelector, + (canvas) => { + const { inpaintReplace, shouldUseInpaintReplace } = canvas; return { inpaintReplace, shouldUseInpaintReplace, diff --git a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx index db341e350c..0e8afb8888 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx @@ -8,7 +8,7 @@ import ImageUploadButton from 'common/components/ImageUploaderButton'; import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; import { OptionsState } from 'features/options/optionsSlice'; import { - baseCanvasImageSelector, + initialCanvasImageSelector, CanvasState, setDoesCanvasNeedScaling, } from 'features/canvas/canvasSlice'; @@ -16,17 +16,17 @@ import IAICanvas from 'features/canvas/IAICanvas'; const inpaintingDisplaySelector = createSelector( [ - baseCanvasImageSelector, + initialCanvasImageSelector, (state: RootState) => state.canvas, (state: RootState) => state.options, ], - (baseCanvasImage, canvas: CanvasState, options: OptionsState) => { + (initialCanvasImage, canvas: CanvasState, options: OptionsState) => { const { doesCanvasNeedScaling } = canvas; const { showDualDisplay } = options; return { doesCanvasNeedScaling, showDualDisplay, - baseCanvasImage, + initialCanvasImage, }; }, { @@ -38,7 +38,7 @@ const inpaintingDisplaySelector = createSelector( const InpaintingDisplay = () => { const dispatch = useAppDispatch(); - const { showDualDisplay, doesCanvasNeedScaling, baseCanvasImage } = + const { showDualDisplay, doesCanvasNeedScaling, initialCanvasImage } = useAppSelector(inpaintingDisplaySelector); useLayoutEffect(() => { @@ -50,7 +50,7 @@ const InpaintingDisplay = () => { return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); - const inpaintingComponent = baseCanvasImage ? ( + const inpaintingComponent = initialCanvasImage ? (
diff --git a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx index b224d10b0a..cb9dba07d5 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx @@ -3,12 +3,11 @@ import InpaintingDisplay from './InpaintingDisplay'; import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; import { useAppDispatch } from 'app/store'; import { useEffect } from 'react'; -import { setCurrentCanvas, setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; export default function InpaintingWorkarea() { const dispatch = useAppDispatch(); useEffect(() => { - dispatch(setCurrentCanvas('inpainting')); dispatch(setDoesCanvasNeedScaling(true)); }, [dispatch]); return ( diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx index 891f3a20f3..186abe0328 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx @@ -3,23 +3,21 @@ import { createSelector } from '@reduxjs/toolkit'; import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; import _ from 'lodash'; import { useLayoutEffect } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import ImageUploadButton from 'common/components/ImageUploaderButton'; import { - CanvasState, + canvasSelector, setDoesCanvasNeedScaling, } from 'features/canvas/canvasSlice'; import IAICanvas from 'features/canvas/IAICanvas'; import IAICanvasOutpaintingControls from 'features/canvas/IAICanvasOutpaintingControls'; const outpaintingDisplaySelector = createSelector( - [(state: RootState) => state.canvas], - (canvas: CanvasState) => { + [canvasSelector], + (canvas) => { const { doesCanvasNeedScaling, - outpainting: { - layerState: { objects }, - }, + layerState: { objects }, } = canvas; return { doesCanvasNeedScaling, diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx index 692ba324ed..02d689de52 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx +++ b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx @@ -3,12 +3,11 @@ import OutpaintingDisplay from './OutpaintingDisplay'; import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; import { useAppDispatch } from 'app/store'; import { useEffect } from 'react'; -import { setCurrentCanvas, setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; export default function OutpaintingWorkarea() { const dispatch = useAppDispatch(); useEffect(() => { - dispatch(setCurrentCanvas('outpainting')); dispatch(setDoesCanvasNeedScaling(true)); }, [dispatch]); return ( From 98e3bbb3bd9c8304229c18bf3d7074df880e8a59 Mon Sep 17 00:00:00 2001 From: Kyle Schouviller Date: Wed, 16 Nov 2022 16:29:45 -0800 Subject: [PATCH 061/220] Add patchmatch and infill_method parameter to prompt2image (options are 'patchmatch' or 'tile'). --- environment-AMD.yml | 1 + ldm/generate.py | 5 ++++ ldm/invoke/generator/inpaint.py | 47 +++++++++++++++++++++++---------- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/environment-AMD.yml b/environment-AMD.yml index 8b5fb07e55..5a0e46998d 100644 --- a/environment-AMD.yml +++ b/environment-AMD.yml @@ -42,4 +42,5 @@ dependencies: - git+https://github.com/invoke-ai/Real-ESRGAN.git#egg=realesrgan - git+https://github.com/invoke-ai/GFPGAN.git#egg=gfpgan - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg + - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - -e . diff --git a/ldm/generate.py b/ldm/generate.py index 12127e69ea..bbc2cc5078 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -263,6 +263,8 @@ class Generate: ), 'call to img2img() must include the init_img argument' return self.prompt2png(prompt, outdir, **kwargs) + from ldm.invoke.generator.inpaint import infill_methods + def prompt2image( self, # these are common @@ -323,8 +325,10 @@ class Generate: seam_strength: float = 0.7, seam_steps: int = 10, tile_size: int = 32, + infill_method = infill_methods[0], # The infill method to use force_outpaint: bool = False, enable_image_debugging = False, + **args, ): # eat up additional cruft """ @@ -505,6 +509,7 @@ class Generate: seam_strength = seam_strength, seam_steps = seam_steps, tile_size = tile_size, + infill_method = infill_method, force_outpaint = force_outpaint, inpaint_height = inpaint_height, inpaint_width = inpaint_width, diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index e6c8dc6517..1443dedc09 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -17,6 +17,16 @@ from ldm.models.diffusion.ddim import DDIMSampler from ldm.models.diffusion.ksampler import KSampler from ldm.invoke.generator.base import downsampling from ldm.util import debug_image +from patchmatch import patch_match + + +infill_methods: list[str] = list() + +if patch_match.patchmatch_available: + infill_methods.append('patchmatch') + +infill_methods.append('tile') + class Inpaint(Img2Img): def __init__(self, model, precision): @@ -43,18 +53,24 @@ class Inpaint(Img2Img): writeable=False ) + def infill_patchmatch(self, im: Image.Image) -> Image: + if im.mode != 'RGBA': + return im + + # Skip patchmatch if patchmatch isn't available + if not patch_match.patchmatch_available: + return im + + # Patchmatch (note, we may want to expose patch_size? Increasing it significantly impacts performance though) + im_patched_np = patch_match.inpaint(im.convert('RGB'), ImageOps.invert(im.split()[-1]), patch_size = 3) + im_patched = Image.fromarray(im_patched_np, mode = 'RGB') + return im_patched + def tile_fill_missing(self, im: Image.Image, tile_size: int = 16, seed: int = None) -> Image: # Only fill if there's an alpha layer if im.mode != 'RGBA': return im - # # HACK PATCH MATCH - # from src.PyPatchMatch import patch_match - # im_patched_np = patch_match.inpaint(im.convert('RGB'), ImageOps.invert(im.split()[-1]), patch_size = 3) - # im_patched = Image.fromarray(im_patched_np, mode = 'RGB') - # return im_patched - # # /HACK - a = np.asarray(im, dtype=np.uint8) tile_size = (tile_size, tile_size) @@ -161,6 +177,7 @@ class Inpaint(Img2Img): tile_size: int = 32, step_callback=None, inpaint_replace=False, enable_image_debugging=False, + infill_method = infill_methods[0], # The infill method to use **kwargs): """ Returns a function returning an image derived from the prompt and @@ -173,13 +190,15 @@ class Inpaint(Img2Img): if isinstance(init_image, PIL.Image.Image): self.pil_image = init_image.copy() - # Fill missing areas of original image - init_filled = self.tile_fill_missing( - self.pil_image.copy(), - seed = self.seed if (self.seed is not None - and self.seed >= 0) else self.new_seed(), - tile_size = tile_size - ) + # Do infill + if infill_method == 'patchmatch' and patch_match.patchmatch_available: + init_filled = self.infill_patchmatch(self.pil_image.copy()) + else: # if infill_method == 'tile': # Only two methods right now, so always use 'tile' if not patchmatch + init_filled = self.tile_fill_missing( + self.pil_image.copy(), + seed = self.seed, + tile_size = tile_size + ) init_filled.paste(init_image, (0,0), init_image.split()[-1]) debug_image(init_filled, "init_filled", debug_status=self.enable_image_debugging) From 223e0529ba908d387392c3c6d400b8d437733a1b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:42:47 +1100 Subject: [PATCH 062/220] Fixes app after removing in/out-painting refs --- backend/invoke_ai_web_server.py | 49 ++++------- frontend/src/app/App.tsx | 4 +- .../src/app/selectors/readinessSelector.ts | 5 -- frontend/src/app/socketio/emitters.ts | 34 ++++---- frontend/src/app/socketio/listeners.ts | 31 ++----- frontend/src/app/store.ts | 17 +--- .../src/common/components/ImageUploader.tsx | 2 +- .../src/common/icons/UnifiedCanvas.afdesign | Bin 0 -> 39500 bytes .../src/common/icons/UnifiedCanvasIcon.tsx | 16 ++++ .../icons/design_files/UnifiedCanvas.afdesign | Bin 0 -> 39508 bytes .../icons/design_files/UnifiedCanvas.svg | 7 ++ .../src/common/util/parameterTranslation.ts | 69 +++++++-------- frontend/src/features/canvas/IAICanvas.tsx | 10 +-- .../IAICanvasBrushControl.tsx | 6 +- .../IAICanvasClearImageControl.tsx | 21 ----- .../IAICanvasMaskVisibilityControl.tsx | 2 +- .../features/canvas/IAICanvasEraserLines.tsx | 49 ----------- .../src/features/canvas/IAICanvasResizer.tsx | 32 +------ .../src/features/canvas/canvasReducers.ts | 2 +- frontend/src/features/canvas/canvasSlice.ts | 25 ++---- .../features/canvas/hooks/useCanvasHotkeys.ts | 7 +- .../features/canvas/hooks/useCanvasZoom.ts | 7 +- .../features/gallery/CurrentImageButtons.tsx | 16 ++-- .../src/features/gallery/HoverableImage.tsx | 27 ++++-- .../src/features/gallery/ImageGallery.tsx | 2 +- .../options/MainOptions/MainHeight.tsx | 2 +- .../options/MainOptions/MainWidth.tsx | 2 +- .../system/HotkeysModal/HotkeysModal.tsx | 17 +--- .../tabs/Inpainting/InpaintingDisplay.tsx | 80 ------------------ .../tabs/Inpainting/InpaintingPanel.tsx | 65 -------------- frontend/src/features/tabs/InvokeTabs.tsx | 17 ++-- .../tabs/Outpainting/OutpaintingWorkarea.tsx | 21 ----- .../UnifiedCanvasDisplay.tsx} | 23 ++--- .../UnifiedCanvasPanel.tsx} | 2 +- .../UnifiedCanvasWorkarea.tsx} | 10 +-- 35 files changed, 170 insertions(+), 509 deletions(-) create mode 100644 frontend/src/common/icons/UnifiedCanvas.afdesign create mode 100644 frontend/src/common/icons/UnifiedCanvasIcon.tsx create mode 100644 frontend/src/common/icons/design_files/UnifiedCanvas.afdesign create mode 100644 frontend/src/common/icons/design_files/UnifiedCanvas.svg delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasEraserLines.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx delete mode 100644 frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx delete mode 100644 frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx rename frontend/src/features/tabs/{Outpainting/OutpaintingDisplay.tsx => UnifiedCanvas/UnifiedCanvasDisplay.tsx} (71%) rename frontend/src/features/tabs/{Outpainting/OutpaintingPanel.tsx => UnifiedCanvas/UnifiedCanvasPanel.tsx} (98%) rename frontend/src/features/tabs/{Inpainting/InpaintingWorkarea.tsx => UnifiedCanvas/UnifiedCanvasWorkarea.tsx} (65%) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 0a3877edf0..271407381d 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -616,10 +616,7 @@ class InvokeAIWebServer: """ Prepare for generation based on generation_mode """ - if generation_parameters["generation_mode"] in [ - "outpainting", - "inpainting", - ]: + if generation_parameters["generation_mode"] == "unifiedCanvas": """ generation_parameters["init_img"] is a base64 image generation_parameters["init_mask"] is a base64 image @@ -634,35 +631,23 @@ class InvokeAIWebServer: original_bounding_box = generation_parameters["bounding_box"].copy() - if generation_parameters["generation_mode"] == "outpainting": - initial_image = dataURL_to_image( - generation_parameters["init_img"] - ).convert("RGBA") + initial_image = dataURL_to_image( + generation_parameters["init_img"] + ).convert("RGBA") - """ - The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass - to the generator should be: - { - "x": 0, - "y": 0, - "width": original_bounding_box["width"], - "height": original_bounding_box["height"] - } - """ + """ + The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass + to the generator should be: + { + "x": 0, + "y": 0, + "width": original_bounding_box["width"], + "height": original_bounding_box["height"] + } + """ - generation_parameters["bounding_box"]["x"] = 0 - generation_parameters["bounding_box"]["y"] = 0 - elif generation_parameters["generation_mode"] == "inpainting": - init_img_path = self.get_image_path_from_url(init_img_url) - initial_image = Image.open(init_img_path) - - """ - For inpainting, only the mask is pre-cropped by the UI, so we need to crop out a copy - of the region of the image to be inpainted to match the size of the mask image. - """ - initial_image = copy_image_from_bounding_box( - initial_image, **generation_parameters["bounding_box"] - ) + generation_parameters["bounding_box"]["x"] = 0 + generation_parameters["bounding_box"]["y"] = 0 # Convert mask dataURL to an image and convert to greyscale mask_image = dataURL_to_image( @@ -930,7 +915,7 @@ class InvokeAIWebServer: if "init_mask" in all_parameters: all_parameters["init_mask"] = "" # TODO: store the mask in metadata - if generation_parameters["generation_mode"] == "outpainting": + if generation_parameters["generation_mode"] == "unifiedCanvas": all_parameters["bounding_box"] = original_bounding_box metadata = self.parameters_to_generated_image_metadata(all_parameters) diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index 0e781ed972..c8b0c117a9 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -50,7 +50,7 @@ const appSelector = createSelector( const shouldShowGalleryButton = !(shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)) && - ['txt2img', 'img2img', 'inpainting', 'outpainting'].includes( + ['txt2img', 'img2img', 'unifiedCanvas'].includes( activeTabName ); @@ -59,7 +59,7 @@ const appSelector = createSelector( shouldShowOptionsPanel || (shouldHoldOptionsPanelOpen && !shouldPinOptionsPanel) ) && - ['txt2img', 'img2img', 'inpainting', 'outpainting'].includes( + ['txt2img', 'img2img', 'unifiedCanvas'].includes( activeTabName ); diff --git a/frontend/src/app/selectors/readinessSelector.ts b/frontend/src/app/selectors/readinessSelector.ts index 1b3ca83ca8..b8ca488201 100644 --- a/frontend/src/app/selectors/readinessSelector.ts +++ b/frontend/src/app/selectors/readinessSelector.ts @@ -44,11 +44,6 @@ export const readinessSelector = createSelector( reasonsWhyNotReady.push('No initial image selected'); } - if (activeTabName === 'inpainting' && !initialCanvasImage) { - isReady = false; - reasonsWhyNotReady.push('No inpainting image selected'); - } - // TODO: job queue // Cannot generate if already processing an image if (isProcessing) { diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index f72e9697e8..651180d32a 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -54,24 +54,26 @@ const makeSocketIOEmitters = ( systemState, }; - if (generationMode === 'inpainting') { - const initialCanvasImage = initialCanvasImageSelector(getState()); - const imageUrl = initialCanvasImage?.image.url; + // if (generationMode === 'inpainting') { + // const initialCanvasImage = initialCanvasImageSelector(getState()); + // const imageUrl = initialCanvasImage?.image.url; - if (!imageUrl) { - dispatch( - addLogEntry({ - timestamp: dateFormat(new Date(), 'isoDateTime'), - message: 'Inpainting image not loaded, cannot generate image.', - level: 'error', - }) - ); - dispatch(errorOccurred()); - return; - } + // if (!imageUrl) { + // dispatch( + // addLogEntry({ + // timestamp: dateFormat(new Date(), 'isoDateTime'), + // message: 'Inpainting image not loaded, cannot generate image.', + // level: 'error', + // }) + // ); + // dispatch(errorOccurred()); + // return; + // } - frontendToBackendParametersConfig.imageToProcessUrl = imageUrl; - } else if (!['txt2img', 'img2img'].includes(generationMode)) { + // frontendToBackendParametersConfig.imageToProcessUrl = imageUrl; + // } else + + if (!['txt2img', 'img2img'].includes(generationMode)) { if (!galleryState.currentImage?.url) return; frontendToBackendParametersConfig.imageToProcessUrl = diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 842129d267..1c6dc7dd1f 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -37,10 +37,7 @@ import { requestNewImages, requestSystemConfig, } from './actions'; -import { - addImageToStagingArea, - setImageToInpaint, -} from 'features/canvas/canvasSlice'; +import { addImageToStagingArea } from 'features/canvas/canvasSlice'; import { tabMap } from 'features/tabs/InvokeTabs'; /** @@ -120,23 +117,15 @@ const makeSocketIOListeners = ( ); } - if ( - ['inpainting', 'outpainting'].includes(generationMode) && - data.boundingBox - ) { + if (generationMode === 'unifiedCanvas' && data.boundingBox) { newImage.category = 'temp'; const { boundingBox } = data; - - if (generationMode === 'inpainting') { - dispatch(setImageToInpaint(newImage)); - } else { - dispatch( - addImageToStagingArea({ - image: newImage, - boundingBox, - }) - ); - } + dispatch( + addImageToStagingArea({ + image: newImage, + boundingBox, + }) + ); } if (shouldLoopback) { @@ -146,10 +135,6 @@ const makeSocketIOListeners = ( dispatch(setInitialImage(newImage)); break; } - case 'inpainting': { - dispatch(setImageToInpaint(newImage)); - break; - } } } diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 4af37c195b..836f4954f5 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -28,14 +28,8 @@ import { socketioMiddleware } from './socketio/middleware'; * The necesssary nested persistors with blacklists are configured below. */ -const genericCanvasBlacklist = ['cursorPosition']; - -const inpaintingCanvasBlacklist = genericCanvasBlacklist.map( - (blacklistItem) => `canvas.inpainting.${blacklistItem}` -); - -const outpaintingCanvasBlacklist = genericCanvasBlacklist.map( - (blacklistItem) => `canvas.outpainting.${blacklistItem}` +const canvasBlacklist = ['cursorPosition'].map( + (blacklistItem) => `canvas.${blacklistItem}` ); const systemBlacklist = [ @@ -73,12 +67,7 @@ const rootPersistConfig = getPersistConfig({ key: 'root', storage, rootReducer, - blacklist: [ - ...inpaintingCanvasBlacklist, - ...outpaintingCanvasBlacklist, - ...systemBlacklist, - ...galleryBlacklist, - ], + blacklist: [...canvasBlacklist, ...systemBlacklist, ...galleryBlacklist], debounce: 300, }); diff --git a/frontend/src/common/components/ImageUploader.tsx b/frontend/src/common/components/ImageUploader.tsx index 6427736df1..a7afda2b96 100644 --- a/frontend/src/common/components/ImageUploader.tsx +++ b/frontend/src/common/components/ImageUploader.tsx @@ -135,7 +135,7 @@ const ImageUploader = (props: ImageUploaderProps) => { }; }, [dispatch, toast, activeTabName]); - const overlaySecondaryText = ['img2img', 'inpainting'].includes(activeTabName) + const overlaySecondaryText = ['img2img', 'unifiedCanvas'].includes(activeTabName) ? ` to ${tabDict[activeTabName as keyof typeof tabDict].tooltip}` : ``; diff --git a/frontend/src/common/icons/UnifiedCanvas.afdesign b/frontend/src/common/icons/UnifiedCanvas.afdesign new file mode 100644 index 0000000000000000000000000000000000000000..d4f7b149ced668855dff9c0a35b5e119ce85080c GIT binary patch literal 39500 zcmY(r1ymeOv@JXg?(PuW-3gH3?(S~EU6SDL?h@SHEw}`Cm*5@<5FmKJ$#?(%y><6= zPt|l+mz=8VQ)i!A0|MklkwFL`M>kg$Dp^M>331SWP?P$fFhuNs!vFu9KGMVdUmO8) zVn9w6S0{HANJu4RV^810_6m}@g9Y0fx^*aEfFcQ@5CZx>k&h3;gZi3aq|mKE+`Rl= z^RbAK=h%hDK4MUMgpl7MgD|U%P6I#Xb03m>pDK+OB~r>1(o}`kO9iFJA(wor`9o@n z?1i$8?2maSB=DMEU?v%Vko7`p(KCqG8;R?O%>0NXX5_xj*}xqb92HQ&UsFkRhIXrxd<=6)Rg73lIMSq;&?1aL^F{ z!Td!Sb{VtmQ#ukf^k6*r958+W@Oyq&0mt=W{GsAv{~*^8ms{A~W>52x?SwX-{#kji zOdth_*E$e1NMvga2hcjlsDQj*0BwC(?!YeKy^fz*h?;82uz5XX`iJQ+8DjL~kn5Sp zDcD21V|xfmw81)I6ToEF_~kL+UuPxS0Q@~8|AQ<4YV8AZntX-$ICKJA7xq% zFaGJCpor}j2%Rdv_BSUi`VCM$`$MPN5|B)kR*Zwcs;a1U8)~3GY&`1FZ=;>)mwBp) zwBr9lEJz|bp^#L-IK31cMb2Vhr3l{r&1I*CR2q}EQvRxPBTgx{Ca=Sxc!d}_nf4`A z#S%o~u*&sm-(l5l&A-i5c^Ba86Dj*hzNpa&E-3aMAe||D^VFzLapF5Xm%UJ{Fu|En zQtfsDkkoW=m{z!p!hG>|yP{~j$Z0pR(_5Ue zW3In4S0Js}Z-Lqi$P|G=`1zn4tALb2foSYX4EjP(k(g8cMl2i;6@V;+q|yDk28AHW zl9>OM&rd2?Dh8ILUaL_rn}d@42{s=XnK9}-$#Qoor1;7JC83Hz|Lw`@Nrhn`giEAW zjAjZ(hT}Hkx)lGDkc3S3iNK!3R0HBTl2?ilp;#zYgjjTd04M3eHyEf&rc~vN*C56v zB?8>y^%51aZ6#E>imr-s+$bda7NS2|z*KGj<>$YX~P!IHA%f+vc^t7?G*zjkpV-F0dit4BsNS=NnP+ zQ;A?@Id?mBtws+id&a$I6;7(kI2{Vsz$+ctAQfa5%!F-c&a(=?1Fb23+wxV zT!lX6?9Nk^k)bm8s_ei#aKj|Caov5I0M(buCC7 z7>a}DUS5f&`daM$(Kx~OY~{J8D>bxm{mxr>TPYW;bm7CC!j>9kw#^^8j!q*?JzfAA zi@JK{^*)2{luZ>}KO)HZ^c~E`!!%H-^ukP3#UmA$3d-LZIvY{w*tj0sBNAgOQU+CG z-K{~v<6+g+vX!r*8Uy~QoBN87K`Nr;#4tBO8iL;#aW`MJmfND`7Tj0VLzz`7;Zv>H zKFg3(9X5h!QuZpUxx{-+Xhvza zJJ|*?3S4D`O;uRUoj6pbM^7Po%`Mpyje+v~PH|Tl3|I-?1duek46eafABJ1)Ap&|oa+Oa_;#h}^FT9*OPqyA||@N(s9a zxa4%q?ub#L!1D6e4)7ndz;&Y!+^Y&5R5P|adz4ob)#8u z3d+^3Tl#hul1T!`ETO_uW<0T;)j``H4_+D^+iC+=7OC5F<&TYym)qcm9# z4|V%I`wC)>b5%=$l$zP3^ycZ8Gk}Ywx;7UI(D#Ks!5mh@&$^(^7HQay!Dr9l5*# z)ESE(Ca2jdtbbYxZR`Xn1Ewr8766trWRLidF|G}rfTm&;b?#*pz^exvNT=t~Ih$hH z=?F}5ZruZl++D0|DTYO3Z^l6$yFZ60*cJY^)h3l=v%dCOxzbxyoF#0u-1cs)OhT3r z*!tut64=3g^(pPGqnnZEjiZ7t4#}O^D?4g`;S0>?xZ9|{cXxMpAcFDkS-V}dIT#x# zjj7RI_!@kt(z4oFBPB}SwudMh5T!{fXN$-H>&)8cUft5{J3w{{GLVM-o9wtBfsVIr z(KL_UH{nr8qG~%+TgkZGck-G7vjoHxVr1N(KMkUheoYf`H-V4fB{k`&t`sAjEZEiS z+c(fvIs{lNRT?p6;%QyP3i<%5n?y1k#A#jy&G*GuyQuJ}M4dhPW_(Y*2$*yN{f*W6 z=E~GQY;}#F)`73`E#TJ2Z9ouN_PSS-$?{ea$0=$>zF?7FD|P)Y$kzF9wwbS>vC7>= zu|~NGJHhZs8+PlQAjTlbJ%8DjCV*l>7SI**HZV*f^Z=C4*N`)eCs-w=QTMsuAu8vaUL^e(b z=H2rWyMmj$`B&iy9KU`|o=4ppYqg5XvAR16+SIIQLd!EhiJ*$p&KTOfC{bdkf__e7 zVKH6St$3AIoqZr)#bn_Wh@#SPIJyFu%UmA;2|Ar+z$kaD8u-yIkSw*6%(M=4HMOVB z-U_|LiMNT0M2s4GQZ|$9nJCj@iX3`kD?FjxraNgw9EoAorfo`Jv+(nU0;=f6a>vU6 z`WX2}tIOU9@&(PKH#Sp_?Ac9VM2sl#=xV!FU-E306Oq)F?8Nq18^>LRFv;V?{2 zy|YIs8H14WtVBMa+DZdohx_F0=|-YP^_#d=V>X^Id>@>T(;fD;g@>u0W1l7(i^Z8ZL3MqQ{WmwSTA&+ z7*y?RQ^+KY_$;8i?T61Sjy%CZ7>teC8p|m;(Z9%!d9c6Ni}M()DXwZVFB~KJ8C38PuqR29VH(LXHX_|>x(5SryrQH z<6@83G7(YuW@a60Hzd10V<*mzgauOQ=uJS&83H)y%8 z;0;=NRkLDflAfa&0?GpCP|>u)Mh>R>KL@!ha1^qQJIV%WVCd+J9If`eR#^WU(Q1gj z#JU~BYwCAfW593awkPpJLj>+2Q!zS+4NAnrQJx$wi%?_q?$3GwhtPKdOp>}&Bl08= zOb(x)Ry3v52s(kit3CyVDjBlPP79JGsiVHiy&%jcc@1L_a{gNP9IY^@|YN0h6h06Yr$%6JyRI@Ry zF_ls|G!4~CxM|A;^B4^$*FJQbl+UcQy-!+xdVWb%smMhtI@o3@0h?};iHu1H_|gmJ)%fT}18E=2?k>Y6RA80=dF30xReHsur*bffKL&T*`6{T;JHZ$q(Dh)DBUVUl2Rm{ z`TYYyV-B)ZDXTichmes4Ll`hRE}OA=pR79B5CVCBY?k5;I~#J0ISiE`@{ZoTxj0fC zbqI)?$vQ%`3#>pF_sgag&VgtqSuy-1?n5NdH}Wo1<}i*Cr-k|Rzu z+Hi%9wpS)?=&(6`&A`!1-Uu2R3oM1n&#Ng`jV=tM0(G#&M8Jr^V070Eod%1d?rb}0 z-EO1Y{z((kzp)?t6SjZ9?Uq8Xdh?Au-(xT+&E)t*==dr{s-=~dcyRMiwn$)$%Hg^W#$C)0z$SRzgrlisnhKD7KLv}y zlwmS3)x{FTzL$vS4T1t&Tnr0XhQ_=D!y-vYMP`yZp;9}$?ClK=pT-tctB4T8RO{GP{LhnJ0VO; z0Ti6jtO0Xo;?N3Dx~PlENeEtWqY^|{Ah4i%%un5^uKn(U`1D^Od@_1(LFnP%f1|w< z)^0P+hvG@-A!-JJ!&8pGGhrjA;>#CxruiAWp4)mkY?mATtEpJr`H^P_WRM=2Nj;?R zLWgYjf$H(W0eiVi)eV7rfl#Fu)Ci(KF$52;nz95$43p3~zE+57!b2zcX^D%) zJARF$&0hV(Dd(6S9J?8niEE4?CNFV%u3Zq;}8x^92p>;510%VZh|AJw&_4XE7ow3V$ z5gDitM_e1t&ZiR>`|{)SRA%k_Ug!r4{Aph%5KMU9%4*{LNOUM{hmB}1=26b<@{HZf zq;5?qMnay9Mu5QJKBS=c%zO_;){0V`VUZ&+l+IUN+2XsL6j@x{sCo$ESSI&e#JIdT zdIk20Meb7E<28f=)AkwFr6Q)Ll75<_k>JGgff;+pPdkF-lTkvY77mH)@6ewzQ8lo$ z%0c4_p21a0sM^Bc8?dOHOg%>}{0m6}i5C{rU0s9560tH-W+9{sv%objfb6}{$=8Ga z>Xp>^AJ8(mZ8gGT*CnLKGOFK_*CbY8qv#uK=Ev>lCpq@ur^EgBd0U}rV~J8v|IXo% zgYk(6OZc>)hlb%?kfZ68zXg15q@9>VtKfrMX#Owam!+4L70Flgb-#y*NAM@{llN&a z7jY`g`aGf%EA(^0LAWH{6&JA?vc0LI!l)I?fhml1tS%4;Yn0$(9S#%MkVG^a_W679 zQ|=l;ybmKe&!`qC@pLB$j;3eNKZ>tL@CXya7nt)h%Bb`YP8IfG^89cpw-8BT9xTmU ziFxlv5soV7%oHpZ!p}KPvX5H1_YYwwTy`pbQ0YUd=GDb;&AZ=-wV!_2Yb4|c!J~Rz zxuuZipN2*TzoZ3KN~!-X%*!59k#7<;Q?_P+20iYJff?7PV5~g9^W8Ss4k+lrX?^WV zx0vNfmF=)+-Nrv{1k@$Eq|mdX10{6skvz@_aI(I}N7_`JVL-T);i2Z+zupQ8@|xjq zwJDJ{r-mw!AFo;_C>1Z;5SxMV*w8>Mx0AqE;JWb|t!j9<`F8un-Ow7_p23ah5x`Dl zb34@xuWg2ym#KhshrX%YsAd`7q}4Ac(>cDZQc0l-~6_1*QGGP zGuGca$yE#}e@SEs@UV!YdG!}OvOHi|cc;x1$Wr3quvU}CB3ded2)7jbsif%CLh46P zPsaGx{GC{jDye*l`VyvZwtPcFvD*@qA#L`AwT3iKXN=?NgTJOkkEyaEyOn#zi`dbF zFzDPW^200HTvCP8<*?UyY?{4q@|*DcBWf^iXOHX%jV|^%)2C%K*r|vKD|gaXJu%ZY zE^o_w3r&_51Z|E{fn*)!8bOPq7vTh+R$D)fsetJ#NUhTSPEHzbgAHTlh23vw=ftJa zOS|^v5trtuqNwdCH4l>>hwU9-Gp;+$N9#&lwRs2Ob+At_orlLWGA_@->6a5eUeu`{ zGBPsUi{Gn}&b4*m=y%GK%9fz9mve<9lYXU5Rrm)ks|W8NIYy(T#&Y!P3u8Wc3ZFPT z4Kgz_()=d#F&!?)6Py;9JD=6WyoA1?y-SJP{+)gX3Knp?O*)WCqK-r(75w&_n0N3; zI@WmY2qcqF=(Mz@C1hOrt`dh4W_n_|jOv(Gc46^UztyYlr3n{MNJqUGTB+7I8*W`0 z6S;g+E+Tjh8#rkXx^TWmrC!jVH{2H4hTWtKxuywO<+jM5tl@ImSA1;9uP+RmyehEZ zoI2^7M&t6~&NPu{EA{$J9qE&%dH3*D6<^E67vhzXt-b@YZ!67ePCI_yFXigk8*i;y zU{>h&t~U_@y|#q$a`Dk!ZcC?P6>n{GzPU<-6Q>st)c8^+%d_1YKBeJmR1EsV*W}9~ z=$$`Gsnd41%JO~qq7f5a5gmoQO$3nP3TC~(>%#pi1?-ovaxs=wM$R!J`~u_!5a2Wy z{??EAcmUg-WAr&3kFB3f*Xk>t$pYU|;IYe>qeVKve0j^Jr`)bDL!MZ-SpUr%=?-{h zyBE3o{bl)j*4d%3ca}v+^Jo6U`}>a`fNNsi$Ob<&NevRV_9Cnr9*{eK=uF?F1ZRqCVut zh5BsYig8qHuZT66s{Spg#8ZDUF4rs`1&~|Xqh6c}wB+vrIX#`yJB91*0Zz?d0NDvJ z71gcE|KgSY1bYuyZu5j1P^7R;ey#iZe_1f>`0%jq|YaTKJ{MaQwd9Q>{Yo@ELKbw6u*~-q@RZ(~G)+Zmn3e{e6Ah`5I-B9!+mPk_o@R`J7fF&BmQVm`5M#_Ug%IvO_?Z^yDoN$5#bDD(Im zy1KY{E23RQNAdtN9C*E~%l**(nTsZb0k3V18xb0;-7)fNf>XVP>CwdwTY6BI8(aIvx zA@Kg6JCmnHmfT$5@K7W3gS?dfB+coVFpqt5_7=k$u0r#JFboUM1a4Hn0?9jSP~IP+ zCjRpaj+ljn;@Q-*w{d_*zywl6ckx_l-)0TL=3$#*&=Yw-F=$_6EG6Nr-NhshT5+bU z!B{S{GulL_r>wh)lW7sdC=yzu^y}jNU|j?YUR<3A^B{bdf6c`p;0aYiAaAN+C=}1Z zUh>~R=BBW)V@$wEU0XL;qv+R%P!2Z6cAM2AVVP5~C*Te$!k3);U*M^^Pl22F_M(zz=rrS6EWY^k0ueFV() zUyHy`8lq5=H>p%sN)dL%_wihKECg!a4H4ru*bjXY2rg)TBS|4j%|9eUa*o8&QT@z6ylyR-j8dk?I>na3}59oY=XikVqsbvaXCAU-O0*>)}RHCJ4WRrXU= z*iwiotQ|&QFdk2i&WS6*8^O4o^XAgCM>7S7Y)XH?Xi-ebJ|K$q;&XTwL3bJwYF{FW zAsZSO@ajWT5i%WYnq8A|3Lf~4g!DV-o^ApY&zRmdOFbD@lv@P+k4n%T7lAJ4GO%i+ zkEYZh(t>nf3&Ir?lUX?4S}bG*LKjr@<}w{br$UfP_+Y_@$=UP8v~TB_*~kY+QX)ab zQNFkcDX9?qH79gzcnoY8*TE8o#yU&!9(JoeV%|i?abrJOtRV3wHm`{rU!PFW&vhd! zp@x@B1!8vll+2Kk(WI=6IdJt6_W#Jldfkr+MFzt-!ijmRC+&^MP?215;R*0ydQexMm^P zDLL?kN+5*9u;VBS8G;5sSuoIg8Y@1~Lx=>uN(|FJX~cBqP`gTaNh2a*Yp8)(bwr7G zqiWUmqWe~`2v6_j;pFt4c0O4!&@)FC4A#vFT7Nc)p!mdJpzuwsXxI@W@id@8mY{6f z+ZxebhDrZbWem;adNhf04)NtBB!Hi_mT1ue9)@2uA%Q_+VT~OBQ3N)Nw3)Q=3S(R{ zg?O|+h=l*;g&Gzb z(U46MXc=K78^lvqf{s9Z-CCG1`YYct6z2Jzu;nS_7m^YsMD%4z5(~Ib>_x$tSnZ`> zxS&~4D7n-l0{^B7wfEA@{4;UsD=|Z77clZRa$icrp@~UB*Y|EI0yIJx0)3)>3+h@L z7UJGHMH*0)@`!}Iy@w429+cm9kLf=WNMo`;Q1pf-1bxFHTG5Qq8qKkh+jNoR# z+)sJHFaCJ|6jg%6aI=xyOrJu^`9L_nkVtGXGJUfFCz9`s5mK6$S8M{JB-8kCz=z`A z*UyEs&o9i;)L&jwOy8@S0E3_#OZM<63#Pg$~U)z5~vM{pj6CwTZg0nOg*e3hBB)!C|%NG=8j z8zgMC7NcpJhw%CRZt4DJcN;71es}i>wXD4acOzKTCqM;#HuO(n`$|U zmZBD_Yl^7IxEYg}i;w|hw5sZoFU{07T(B>7gm(QWjjF~S7Cps+51F8WQe>wzuT7{1 zpPeRvuFF&%?!+DNJ>0yi<_%@ zJZ0I}x%06W)hUHWLqN=%YS~d`KFj+Gv_|?2$OY-r{cN{tCxQ{090G9Jr4;O{yjYfRO=PAGoc&%R$!cC3<0mmH-JCw zl+lez!#C;E&NFAt?D11?`jaq>3p2!f({o3{>*4g{djJD1XHnmqensRQenzXr&Qou) z0IE{U@|)m_rE_J=+iy&81OmurI1wqQkXRCs$cd!rlqh;r7K<=qgqy1qDAs@}j26Ca zTFIp>@_UEpOV7&4$at@!pm9)O>`@+Z!iZL~3MDx=8(E0<3h=2;764@F^mqf*QT!1) zj6d@=s23%Pqj+wCUV?x(0N;jwT7^UdM*~G8rC_`9Z^h_B_G-^8ZS5R&UGgPX5 z^2HP2o1}IE_@jkl(%tSu3}K0k0F41m#0=%*FgpNVA$3Kz;@8-@_y?037u1Vx55A{OH-T zEZ%fmp3<(fR%JuC7G>?f=`J=Duhzk}OB`Oc`F17GjHR8OM*?XLoo>3KshvkiopOe5 zrW6I8M~y`0XIaQ6ot@YdLQ}m6e@Znpz4gVl)Zm`r1_I zDa}hh@vms@%X`i?RXQZByS;7gi$}o1DGO^$=9}c-*s~r@_w8n5_YJNWe~GydS?^z! z8PgiflvoxS)rw<>&Hez#x8q1HYPDs+idwjy^6%@`tj;zh8vW>5N{#8R_D0FA4Mjgu z58xR&D@5Sc=>$7#@>Q7o^kw|@hl+L5r%Pca0mBB8)zxQ6+1kv9D}erN)#_7f&q}HX z+wt6r6f6ro_Mu7IX{QZ((RupiqXj36XzCmu5dTKjGTB5E4cN02zX0%^iWExkhc_U| z&Nk(GT4z@m2v(3^LH_*Gt6^{4R7U-NiqnuUG+MkL#`h&mxAeSJx{iDU*u4erAvijE zbo%GeW|&jN-dJIN^~Zjw`IqM5cae6&E5Q5eFM&}RGthlWaAVi;He*RKoTd!9mp=X` zoc&f;-02A64}5RUwgKY>X*Mn93*IXJ#qMy)6E$rQ`bhWmH{pmFRySaqcFVkWjnchh z;pr)A8RN!8eT|0tZ*QPu6VqSErhpO0rYI>ReBIQgSA12AK*ch$-qFe*MHD)-a(|gv zILj}^>&-C?SqB%Tm&?^YTHTSkv+#oH(TEwY8x7;HTC=Uml+ z!IN#6Lj{zBfueq3>B^sr06*~e2C#Ii2h(^8uzI(EA?e&{1A*Vm{#9oEoLc~K@HF3F zGU8Yhr%NF5`o!nx&7A7`e2OQvE*3Dp!i=&nWn;~Dc2pO3bt(J8Kfm;r ze~Sb3JFI2^MQXhcz`qn|OSQubJ#W+8zytX3niLr5>=ddG4Q*=1@&OtB-}p-l8&2YB)rPo}VQLJB6ktT^|R?5=M_+uep;5cd; zLPc5SPPJ*bKHj|HK2oZ`{7wA|^8lDX)s2gIi9@k4-2n)DH|K^}SO*9%@$O>eVtQF9 z;}8by(!cf$10qV+-BF6tv3zz#I0_R;$f*c7^^i9(&hz!-o&GuEK~gZV`~@5cu$2PK z0*x0y+e8}!JWz87-UiSY0DJ>bMlst(3BYFanJ{v|7rEVz6^Isjnkn=xP~iLQ{a>Ra zA)0pk6V8h{)6Vmof4WgkfaE+N%ycic`<4f5h8H^MU&mZ^2N-;@T=N)8vkI1|T2!1x zs$876OZbGVFg|ZrKU!OX$lQ&$M%7gcxOsnQv|D%B_~^0KdXZT>JmAWh8|3T)f%LKS zR5$Fq@Y&_lkz?XTO;Rz=tr9?6zSy;51OJOexW~aN>+264={OywA5rh#ml`e|jQUg# zaWvpP8pX2cQ*6;D8a@cuBOdiIqC8UHQ0yWhYBs*NVjrhd6~bOF4XJF$;SHD<(Ju61 z*}e|tg{~yh%ugGDQ;8z9`6LNLTvI`e^nn8e4eMN9xLYj;2j@ut1eySA2Bi52t$|oH za|4cpXvma#MQAG5r(tv*6(Vw(NY@9sPsZGKE(l*XfDO+5vTi>c#8&lMg^9S66*r3MlRX4i<*^mw-MO2U|O2 zBQ;Hy=t7&LO5iOSZ>+)=K&2q@?}9T>q%$!wn!VS%vCDK1C_nk58#mCCymc9NP5|lo zOP;5tKzzN5jn4uAFfR8vTR&~HTveTq5qbnFOjte(S2(2il^sG@*u~a~sO54C$BSVT zdN?g=ctQ&l&gBeMb67V*5tPM7e#U~311KC2CN=`A9xD$`)Ob;VdYm~sWd1<5se_grXoS0LQy*G;T zz`JhV&hY%d3tDYp+qigL?anl{5_pc@1sh6k`(qudcNB~X_}FYox~4dYbDJg2>(T-0 z2Uv*s@?lGCP|CiF8^JE-NeKB9eLGEU=5XayM^hdz$~{X#pZQVR+h#F#paQtN?`6mSsa}eI!r;{~pr%3Y9W!TJz2U4q&q@C=YA^zB zf*q_%oWkqut8&|a+duCL<&lJ`ng48%KSFDBD80<(oD{1dd7*_ttCfIe`&}A+&{3v+ zLE1k6TWt$io-8RnDEGl8fL%Ys#>u2M3(10+{(MJ@-}FiR@y3THw%c?mnS-m z=@Q%rwsn_$QIbL`PwkCgR5RAK`a{zeEcCf<77M;C?E7Obe;VJ6qiRl_6G7=GSZ3oeDejgIrq_>1QKc&|DUB!c};_bLw^%eO%|a`c(8tzUW)mQXdmLTDOejM)DA^T#GK-89+LwOPco_cSd-v?tV zPfBG1PvyzWIy7&Hlgv)t7>+r=Hv#)Qt7DhNud0B}Frm+Mm6#*WIeX#ohaNV8xk9wG zw=AX}B}|89EG3f!_cg*ctYcuNB8l*xa&O}Co~A{1%-$Df)nQ+_1GW064M#i&t6`or ze`1F;?G#D;K>RwU#N!U8D$<2aF)C;9h99b&by$k{i_oxc(TP(x26Xt8R>dFw#(JNe ziWTKQc@^oGipHnSfvU^ueFxpRb=lZR^5Q=?yPSJsEAJS0{Kv2Np9?l?>NrUz2yBhb z8na~$U`uy5bzfKvY9?n{U7UJLB+D+*E4s zxMH2zJUlSjI+QT6;Mi_S$xpJ>9G~G#V)T`k-%Vn};#gkQnOHA4;h40%yTpTz+;8mZ zE7I8El)9tax_Ijk-)CMVKT4lwO{bp8ET?lUvf9HP)^Thcm~}iJ?&>NdiIsr8m)Oy&jW0H%h0t#wv@jf`z5 z(53IGbD4klLU-o`bubMcUUojZtGDE%&GI#iJS8H2m%#GL6F7_RJ$?_S!a9SJ zWbI0Qf5WNOVTy$@U8<>N`4Z97Sdh-H?oc&S%Vn?O1C@Apa}G;+%9{#JM0}D8@?1%gdipUIWzO%<{OwPpr{}*OEeyx;e?rj+(Q-Ij7KQ?}_ZKKSQYd_GgGJ4-sdCjx=vF0GSXgSx$ecxifrB`a) z?{Zv6it*3of+MFklqOEREyjKl%ye<=o7I+N-K!>d#%XO6(M{E+i$YuFx$!AHZl#8a)ft~Q*b!09ww&xOSdhj@SIb4wQ=?5U1jzua^4?~Wka~&w?Gz7<=g|a zWs+gGr6wgdme>kUD(rWx2=*h14R!2tURO!iFEs7G-c8II@@i3^i;zEgXR!6R%ytbd z6mzg}elj_WtMkiaV0b$7fzjB$evq-F3<_yKz$^k;%x0%pO|FjAG%m*B?{^g+iZjnZ zi)<1}o(dDx%{UtT#%ASW5+UunM4K;lMO~kEUx+yqzzzts+pIxmLZ|v=DU8X!LoxdO7>uouf(ji(8=`c3eb(sDZ>~!)Y}q{>WB_4-|&7_dPzF>D{kFi zL#$D_fVB-Th-}|nEI9VQLY_@l)n4j7@4s|^3|`P5P*}m+u1S5)w>P}M$@F%K!NIDd z@Ne$ri>%(cT{nKp(XMP+dED2JA`SZH%jz`Bv|LFiKTaxKk>s`R=e!;gPHXM6$!td? zu-<8)Hu7QKX=bjX0Hsf3R40l>@0Xrbozlk|%O%4yIX<|VrEK2c4(0|}$QRS(U+6+3F&P}TTp;_%mgs5L zuhadUs+>F=BX$f^t9PYDK9Nr|ENE!dzj<84IXse0p-o8dlI#rk;Qv0_Qg<42GeDi3l8414T8rD=zO zvn3SZ^eeFHbUhoq$r-}=a`Bav1E-GZSbO4)$I{5zi2lyL}@ zLLO%%I$xwI>_E4Mt3hBGg-ye#2^RZ_w3x_#zltBYe!W}GkunhNBxqO|^GbD7TjV{{ zdP+G=SWtxaruQmS9_sn@2Hke8R{#78Xqo{>zovF&ey0wSdPepK>0jR zhaEsEw4fA$HCe6t={8f`-awiu-(`beKAx{1?{JTt7G;2829IvQ_G*wNCJdA-pmjhzomi&bQL+TxI$faG> zKlyX+mpeR`E8$Qw~NR^2ifi zs`}GyHqbfBQ^9^taU%^>HU2ek%Yc>_XT2gC#(gTb_Vq&v;fWYk=p25azF4Ql_E&Yi zC5b6>j}k?>pt=pg!2r4^F1dr!0qdwSrZZVvDq57tpVF^d7}F*N@BQ((-rj_QE#ng6 z;Xo>L%;yhZ{-hFL&Z$-JpUY}F3P=|f>vlZ8XD+dKKBSjcjcBPf zR8luUk!n_sjXDk8Zjsy#SJuL$X;Nv+#LaKq_trg!WkLiwxmwrn7gAXLB=7Ah}l zh5X)YT~;;kg~1tm%9!D&%sWXG;!AR$lCMWS8?`U7grostkEt`+fhzB-49u3^y{7(X z#L0*ulU*@N(e#JjHtb;17}u8b3#JkvVsyp~J*Vo^?F4Mie_YRtAt6}s(+3Jh=so2A zmW!J*>C?^qrA=P;@r2{cI%s(q8_BWA$jmrBB|aUG7Df6eB?cYU_D_<6(48KlXIvW= z=jkyW3h}zXljx|QW#d6P&Q(vo^~)!`{2|EDUP-e&qJm-{P_T4 zocDqSe1QZ4!5Pm${9d}uZ4ITCIfPi5;zIHO|JzXX|NhRP1q5OTAhZzxf&pQ^1(pPJ z<+ER1WrB77cQRiPi2PqNFz6Zj%lF=8D7^oDf9d~b0}FbE{vc5fpN2LaFwi$>jbsA# zzmsOS_UGxjAes%)UHz+h+8A_Kc7+=r=(gwuv1kRt3U z)4y-@zYX2eQkBnXEUUYtc9YV{n1A2Me;caNlH9dfglkiR_jDDrkNZCvsP;*x4% zmyo}<|JPq%ZJ=LPCJ*T?y%9@E*of|`APo2hX3bc zxO5z<{th4TygWt@7pEqNxBhGRe=cV89W|A|!;N2Ubxv$nfZ?Ck#NGd4xNUE*;@{y_X6sYQ;iqWH z;kEz6@H49om;Sl-h&pX@xbHpuU*yU&;Jhp)0R6+4!8NcNZC~W`S?Fe z>_5Y)XP->{9qv+got_+Sy9NXQo&o>25hWvrfy3ET{1qt-ZD*h)MQAz!hzc3{4`9 zdi_CV<%fI}?|pk0R{F)0BAuEhClq95JEsz)Z@hWx`!429RPp|yZJ~Tx3_(Fbnudib zlw0WOBNy^1cJT1%b4w7as;WY-r~>d=U>AXpo@`+!czAf2Pf;qVsyTs;{SpXqK0sPtW;5BrAskhpCyGvK2gi>bCI1HbKg54H`0DeSB&kdGDUE z3>Q7U$zA~gfx@%hES$3EUmZItAIP%Xw6eB#9TyjutGhb`=TRdztth@$?ptXeM)Uj@ z&tF^^ij_L|ZIjsk{rHNFi8=x@Z1nWI;*2r_qoWyndU~c`F&?#g9k*}f!(+Na)1mDL zkK0h{8W>#jTl{shK8*8)>%bZwUf#&)XkHl>JmP?-Pxs%IbP4OoHX97wYN7P*zWm8E znPr?~!KaDfkPx?l>U9$zpHiRc%&AS3^-|TqdQeW3@!Wf|dhP63`^Ip^l^3Vpa_9Y~ z+94o7ZT8%`w(#_ah`V=%WHw`!SlqvV-}vQ4X{yZ}>+S9BTiu#$^J$fIbT;GlLV4$g zb@=%CZ-%L;sv4YDP*Ct52;4f|D3E0A#B1e7t7K!tXOwFZnp?5L_VMG#ltHY=ZLcvg zsp_HCUmK%mx~#)*h8+v8JwWW+x6ioDd*92YABQZ$kE*H~)pm5Sh*m6#*}YAm@%Q&{ zb>oTF)3QG8P^_vN z_JmmJo!w?%Qo|LL!@1;N1#W5eG_SaHf=%A1@L{`SpqDlIJ=K9BL28-p+SYZqB6BP& z_MAHA)F)3w@eM#tW!-BPEo5kNGHkp568+`Nms=bT*qP;i{3a$MBvk#v zZLsC3{ZZ$on?XS<0`l^l?-UkA>cY3XbVT>RDWL9ur?~nGV_YY?_8rR&#^%hI@tVAa zL7R@;J+N<~cj4~M0xy=?@Cp5`nr?a}U$+5_EWi>0s zf2D88etK0a%Amkl46}Ig=Nm~@8ISbFOXqiBd|vRyix;)!oqJyFV>{rmLoief>oR7kyQb!9QkAy0mR40LyJVivoa4or+O5h@ zG1;$^6t`<>X&IOM6iv+8_U1;!!~`n%{aOF<_u}v0{qgqq4>~wFJgN9cvVCaQ(Y4IE4XF47nO;TuRYKkh#aiR^-d90Fa zQJ!aAzqwf3sEIdR?n<`Va~^JPiW{3bt1B;477Hf@1=*ywI_!1rSK^TISdUkK{T{fn zeY$}+JWjkOj8nEH^SG!9U1oC!af?lS!@$6RdyH^wdAWR__aLo#vHQCG{Csj1JDok^ ze&A|QQ2I5*JnZJ6t}bKpW0$fSs)_I4-xN$vPrKq9w4eE?OJen({8V_lEAQl0jtfmg z-@k_*x45uQPfw5BrFX^8)X^#;dM4tV@R#egAzOKcgf`@s{n&t|a^z(nExUvj4lgjT zwKAa8H8;O?RAFJQuu;}t8O;mk=H`3dziMI|a^fd>31+((=p)A#78k8+gPC7kT9(18 zTDNuU*617;{J^-#F{U-Pi@lw2>MPrp`|?kQR_>{Hr~3N?+B1(2cI8`_t;7Ze zF{SDx%1E7`U`4E=rKYBi&QgiuyTvZKStE>N-;3)9X_XND5$z&kW9_Gdn?GQ>U%h%| z_2t#gou6ZrRaN;UakYmNr06?yEk(um#U;3(JGalaiRocl+P2w0LXt#nZ7mteQ&Lhk znV!7h_ulf@02Sb$V#_AIY#X}KUtd~eeSSWwvT}U)1P18&$KKMhRy_T z$3CignS+xv|4iqevY&5d3p#i5@Gy+_dVQ{anA%b@@B8a(sC`gS!&p~W*MsA^7Eo&3=;#NPf`s3~G-H#YD{qtvZ(H`7i+K-<w~4 z;{Cf^1Imc|_xCK)Ub=hW^p%kj2a9fOpNzqQfy?8axy_fPtlr!e*F1VOx9yy;6R~0A z#@6R9mJc63WaXT2$u=#j#y4K;F+|L5VEB#Qh;Y4r{rZS(J8kU^f9A$-R99DTNHRM~ z>H6gr4TtRc!*{F*-BfkjiLU&su?x7WvG$x3?6T)4ltS6WZ88_ST`C5Um6#QBd;VrZ zq!LM=mje|aySl8V`pVPIp67_n0Y2Tv8uRHY^~!ZRUd6n1YpP|%rH01FUGo=)BnV9R z?X#T~Mwzu^?U_ep6vc2Fh9c))wxmmcb`_eYy1d`mUzHqyD063#qx=jEt<@QZnKm?Q zh=T_YvPwF09AFD|62~27T~<%6!Xu$)V&XGZ^`ei;s^&WF3-6f}5pFW& zW1}_bhhPFsvn?yQ-rSRnP3ypJZ0_BtYe%_5ivd$$g8~Ane`u3Go*;7`?7^Rk&e&#d zWnp%63Qc z5$yAxwlaCUl&hCYg`9Dr2hk}#>Hr(-AeUE_bQk!vH&%YB#;ztwY@ z2%{WxnxjXL{{8AFWKJ>4GUh&%eeK#>44O;MRcs?BJ{29h!+d_KkMk-u-JLWbo5)XV z*R4y&z9?w>gcPV^Dcnwc9UdP1a8xnI*7m90o2WDrqL{u(kUn-tCetWe`O>9JPjX`% ziOpPcLEXupF*Wyp>`uh6RI|1S>wdJ2JFK)Mg zcVF$|#WKBGaW-0@4Ju^hfg|e=^NWh+whdmnvgV}8?Xjd|8e<+ZFZ~T~-@9iv=63QV z_vad+KlA*DuzN1jWokbD5VKU8o*p!1$;`~eblWE(HdbIlzRlsl`i&cFkW=S$#*S^9 znVFID{U!40+1bVZjqg_vC(0PEsSMos7Y*gVA8J2tx$OH?^z>zF#&sNW-dk|FHszZ+ zq;$nvlUN86zs^sdNKVErHWW_wm4{4BI1#I|)H{HVpFDY@&OA3gt%NOq>!|(1tSpfP z8PANbZh&fJrXkZgqQ9mlNB}7*ss7Q&Nh}GPCWv%yKfX3b)q9S2s9|BQ+o^vaJ9qHg zn|u7>*jeiVj4$83J&c9S-|5$xWx|LJ&4>e?drJaGMn$Umx z>C;pd3gY7As!2D>X4|0^b-?~DM{2n6Ee>h@g0)zeQAU}&8<|;HcFIJ3xwUQoqp!=E zCrY1NPg;A6}D0q^KJHQcZzwEGmZjfB-y zRfEF#fE(9QQ?r+s-w~~|QISTOF++U>?w0Ns!799WZ_5Z9o|?fv>1V~r^DTWZ+-gRY zzjr^EETO_z8XgWiJBirwAT&5wEF%c@LU?$1>q%T<`YB{I$v=6%$Q*@0Q0mOB4hPhe zB2e_H#=w!jCRE+pAhfN`z+u0bm<ZK!B#QM;2a&WAD#9g4{M2v6)-#c_?A%<@iHV6Oj#B?s1!Tue^JA&456*x8WE-Xxb?wzFRg|sAi*s(=pf*2o zqM1WjNJ#nAsZ%j$?!+<^`uh42(b30-N?;sM*GpB8w??f3AYhn7LpVD-yLx$vo)Zxj zr2}rIYTrF|F5=Fe>seV@LY;+ApI*()&Fz~Zzn_`eusEl*R2KDS6Nj*%U?n1KhB>3) zsyueN(&59KGLGkNM(FeQ@lnnk`s`}M(HO_SV~0`!-+y)?QV6*V(;hw228SP-jwa_PLR!V;B97)&AZ4Xa2MI z4YZY%0;-apR&1T5cpzqLYs)Pm!6JM-=hbmbzrYJWzi}TpVBjIb)Bb0^FKub*;;Xtk z9tnwG$-^BPh8tnCtq0!FD?NV}HHVuEh5WUo^+E{wbW`Q?Tw|TN;Sy&*_5XaQsNv?e zk7bX!Lrab~Pn3q?X3^UEdh5n0euoc_Xu14m^|H*1-(PFgd;+$H=m%&(NhS!~dX+rC zv~+RXz8^h3=1Vj6+t)BMJh{g`9E+j^mC_ef*#{2t=*vhDLR%Rbua16roNDsa4siEe zvA~b-AD`CWY781lLYP0(GLH02o+|!Bgt!&u1N{pZE*KZs(2&S|s5$odnE2<5KSK}N zzh#VcZ-Q8_UutVc<}PUT))Nd&xJ4Qcz6^ZEYkYu%^c9As;-`*5za-mEcV2rT;|K*U^B;f zZ>c2UlcVmVALtIQxFnAZ@^|Tva6Wzhyxyf^*{)^o^Pikd>Hwd)v2C+lx3S(8{*3Ux zz9*U6 zTa(O2)zm=%jHaa$#4@l30f={Gp}BuQo!hzn7N#s>?x)i+G%@=@_`tzmIlh&ndSM<$Hx{XCnw1V zsvgc2dhjY$RcmYh>tST}c$-hHC7$C=79R}iRncXCZ?Whf9q`bvjOC=>0iG(Wb?NW6TPKd z$yK&t!-g$vY{9@#A|?fE-@biYFf7nqL!}h>?Ol@P6Dq5>3DVx=Ls=3I4idq}7u|U{ zE`Ww{C!tjATdZ?m?&ffk|I4;ch2_~}JuloSOV5A*Qbr+EnUuFd+_7!_ct^JIxlTM4 zNfaPAkUD_bli2-v);%rSz35VgZ8j=@AkS;cLT+{Gr`*8tbzMYyTi(f<7KEgz`pug+ z$L+JG+GF|hmfK)mRZWeGl?;zq3{uV}4yi53Z9Yj)aqR3!>(yv~6KSmCp)X&q;6|%H ze%uC7P=nfNx>aNQ%*z2)qqmKXPkN$RSI_^RKDlX|*tH`8%+{1vfqYsSZ9_i0O$#fr zjOn?!oTH+@2Q~a~C^98yD0=6SjOk*<)usL9`q}@GhrWw2PG0yqoQm>$q&;)1^XHc* zCeN`SaL}DJsaCb|LlI2R!g5_Lgr%yk?orS1+k299mKSFN5?_ z`7WOo3LRS4ps*4@I>Mcz&%wbl{bxLPFwv`Tm)F}M6h^P_if`=9IkDebMvPj5FyaGB zAUUD;@84^`ymSA4SZk`rAjuv$I%ZUQsM?$^G~EpZ9YUw@`$13h3Q`0;D{Ii}*N68% z;ys3YReR?0IgBhWq<^7INj_O~-L_9QA*k&vDlulAZ3z((0bsoD?xK&UWG95(#yfVC z1*}Y>&eS=q$rF*E68-D&sk{@HIfHrh@^)~ovM{^pat z)m*+4`$S9&gP!`*>%}J|Ce9#;rJnxqDD9;Mg1A%93;K;LA}zAaQo9%*uX(lxaX`h` zIIhnvRQ>AQc;|8NXQK2^?uCZZ0?3Ejy}6tG-~oYWSqGTfKR5{aHlDy0V%?ff=B%P1 zPr);{JFKdzJv22H&Ma)S1Fy409vQS;Ho8R{P>slKjd}E`&os=u4l?P(t(!rbqbo1t zx0pzBZ83TgBYd1kLBV3`cXi;#RuDk@Q5o~_Bg$DxOG^(~lnjoH1c7O~w+~5c*E)7$ zT}W`S^7-@6`etG+d}zS)lIM1O@L|+-^gaKp+S;38%If{n#D-_K%`D{ttHmWHJR%~S zz^1)^64Y>)iG}4$T_}4{SXdpV+jZ%;TY}sL22ji1bM43TFD|&Z(l-JEFil*gQ>e5K zm%omZxF6dm&AIzy&I#EUB_$gUYw%eB{evO`pKt@!0U3>U?Vv(J5UlS*Bb4w3};}Fn5l>}lf4B!;TPwi+?Q(eY4 zl33Y8j)yxqIN0@T13gLfNnQBChZhk=BqoL;-;2%1p{T9IPD9WDT+pzx+ChF5;D_56 z5dtJ}M>jzdG}x!QH^m% z^U*{`Mq=)Qzh}qH{POn9!BZQ_M}t+Qf=sa2p=C$(=b;}x z#pgy^Q>k$^frz@AQ8w@AOzs8*5arfoHRb~dfZ9?92?AZDB(b;jdobL{-#H*Q zHnuMxux>0o7fJl2T3La zL4r>vtWio@`evBY&Ppn!8)h+$j@mfjhuk*Xj`30+HfE z!mJsvMpAeqXjpp*Fj^*UH&#&HrLAa7c}*s$4eeJ2h;9X4+`2F5wUDIbR#bscM?zN> z&weaeH#gQ^gVdSjEOF4+cTq@wb^f#e@g=`Cz^cc8xM)S?A&!EARI^G!Tzqfygx4*9 z!WKPD?<{chR5iGTVq2**mX??EoqJ`Z3mO3QSQvL67L=y50ulm!8qjZ0H#0ZK%z3#% zgk(X$V19h`lbIjU>e!>hRlmM>8(ugx2~o%zDJ{jC)fW6ONMmtADYexK`D}WAerv+m zYUp;wz7egsTh0VveQUOvq;+${BOo293H-E5gLR?1g|^d=di|O(0eA`y;|>7>!OPE2 zG7c%JaVJ7pcDJOcZEW3l%YF2HT9p5p18gAYUiR#Yd~+nMyWFhvNrvh}t9nQj`Gu+gdVvkVe(qU-@Vv z^p(|>`HGZO)>@FN$XZz=tbF_Luhmqowzac6)mL^Q#X9a4_)9%wV?i0JRuyt;UCB(@ z{&tr?Ks(}srN^d}8+q771D947>|5y%kKNdQX$$A&5pF1un(2rNU^>-3Hbu)|<9f&> zj}cZ194qTp<-sCSn+na&0=*(f3IdqskT7L~E3^U1CrUiDriS#L z2u&?S6=9hxCKs3II)l#=B(s6Nc1POI-u?zQ++At<#>+TBT1qM?Ov$DY01)MRP}oV9 z8+6;%_4FcnhS!p`GvfO3Z*d_Z8`+7#FVci6-(fquo!FOZ^?O5b%-5lzn_&lWYJ#37 zIwmIVF4YcM*?Y8v2@^Ij-)o$a$+xp2qp7h`@5ob?rb=kA*NVNS?vJduJ7#X4HQ&U^ zLx0;#Vgm(%r9Nx1uK(M&M-7ajntr!0b$`y#*3nT1)uLLzV-0p^J{IDfg{&Wfx7=LY zF*_Yq15cDkDZFup+SPrigN>jn%Rj0 z!Lkhj2H;N4kr<0ltNQk?W4hU<;$^e%52aW?2}Z@aw6tX4CT#^J^Q67KfXwxSg{Ikk z-vW<>l3~|S`|#mc_-^B|s79^moymX@BONf3+Ki<@199$=LMl}8V2WlJcf38ap6X2Z zv)w7Fsm&Z89E*8Pp8SsHZEtL9Qhx5->k6jj#>>76fBytUe+ykP&kdV5Kl}5OfI`t) zbmn;LzD;&6F5xnsW4DV*Ozt5k2B};>29J6z71fuf7-64!SFI*|1&)cL5H57? zHN}ec`4(?4B`;~hAwfJ80?4e6-*4aKrvpV4NdGzx->;GEvHw3_fV32dT_Iss`q;=@ z|5^W<;wW;%rd}@Q=)XIHQX9z^sq1h;FhObxMzXu}Dk>EJ%#QN@v$rDJKa6^iEFdl^ zbGGE%@Y`fy?;b`gDxmaAY$MhBy*I)6)-*P1k-KjC!EI%P8H=em0gfG6r@tMzb0~_B zL&}u^U#g4-*BDEG;FiO2dnri0MAS7bp=pRQU!(aY=pQ7y8X2f zTm63fwGiW^YfpC<_ESSBJDn(7KzOj zR+rB8kuRi%R^r$$RO?~@y^j>6^Gx_c>Zk&;bkx<`n0`w`Q@sC~)5nx9m8}mI0H=iZ?%e`*#x^YQ z#*IPHwi4%f^3PB9+(at=oHc$}N2iX&sTC`KHj-fY#BFD=w?)6t=OEYJK0ly6qlA-BcU0;a80f? z=NWO!pIE*5O+hsZaih&44~!$V#no=%Fjaru3DUvi)S2DvhT!nDJa zlyqO+Wc_!f?y?L`I3VqCy=8amo%SgESV8g(!UMP#~SD> z#rigOIKm<&1qB6()-jcU~&b?{uDT~E)AlbTpSnt$1=XE!h1GK2$#1O_D51}qkm3Cn=$ zW`#%iLxF7KjwHM3>glNlD)mLHXifA{ zg`2;Bd$;b>w8L5GA)a5y)h5R-8XD^9(PN2)V-`{o?otNR!_-qRg9??ClOu?~3PMmr z!88X^;Eh_N3X~6X(afruqodGuy6s_r{jGXILE0xNl~{H|M;Cqhn}foR<1C2x z*T6&n9RYk25)&PL6>!w7_WFKM^r%H^5vZ|^d60(#L=5!x8Du<0tPD%v=AJ0M-rsL! zV`CE(rmXrZnurk+6Vsn^oFCAJ&ioP(^m;;u0Fnz?O(~&M0>@qqtvz2*XTR}lV zB@nmq)@-5bQ~XzKKK^FcOa|X4AakXWlwVPOGjZ0~kZ=hU$6B(AC^VhC#@kGSK@SAK z*ZUwdbA8emT=~TvlKf$GukSA>va|y(yv?We8(VuC+`z`-z$&sS#@Qdaj|>ah@k32K&S?u30!YgRh6KK2oq;*mWAJ( z;llbl250YhSgIOsWucCpeD(8Li4tR53O!NnqZRz+kOl+MfG3KXjv_*fUqIk5FLdfu%7|dFAu8y`Xn~p!9~f1xZ=&bCVUUi! zj8gwdy!H9>=k0V<+_B7eMuSiyYxhCX=zZ38mA$>3D0CS(0}bjrJGY{Y*}{3%rcQ;h zVSs?Oe)DGazxmaO7u6b``3sNHD69h;%y`5EVjCoIB&^K{tvXo!sCI8;9?uO9Q;uO` zWUOhHZsb8iG=WBe&1z9%rwlUL8!*5PPqbApeNA9sAmAE15YF3Zsm3qZVkRUp{Cm2F zPOU!A2h!BY$EO0T1%*~1JRCk2@UQ$C7bT4gB!hB6TEK+q{@Qfi-Dc0)WG&0^dad{m zawM-nI$IzuD|h5d0M@C%;g;{edI_m2Bur(MBvO!BzJMxSJKe7xMw&Y!HMpuE1wLs1 z;UdZq4)~uacR}Cdnm+2Fy{BHScV2okf%2auA;8nGg-qG%wtm&0)d>X>h%Q7rpt@>I zB$Dga+i&**eIqM4#al~ANQ`_c%Dg}sDT4WG1#lycUw@-QiZ*g%JxKDrQ?(mf_0}sH z8?%yo&g&v1(mb%+AVyzrZPEnIF@j7UZ@p*Fo`kQ5l3#2OzU2;O_JCtsQ0JeG&%gte z&2^ZiSf}^lZ65o)CVSk&=dky!NjnRa%x%&1@`oua(~liPYH7_d6psJGDhlTwpcQ{O z)Yotj`x_41l-VcwvEX(XIS09M`Rg}qs0M_=VwdY;E(KL}_`Y0xecU=S*&)OQz@4Hk z|GBD)qGIXC#uAUwQ(tWAWG^jAAz&JOGdA%h`uyfkkgNM!kewKKp`efu;R`)DyOgYK z$i`VwoExV|+=QH~B)IR*-hf!63RRex-c0cCk zvVXig1moS~qe(2B70Q3>dFubao?qSi!r;qK>J*_UJ{mj+{}Da`hTQb@_28Tgmn0t!%55L@APWxr*L>W!6lfxD5Qkw=P*35#%>YgpHVM~Lj2jJgbpsH? zNsh6gM@2=opd=^77Cfr!w?#F~TrVzIQC*Ux1#Zsv&k0z+W2`y6v8d)s@o5j#6-k1Etw744j|9^adf%zTn-J zPmuLBNy`Ep9wLgOmX?;I;89X4vc(MN@UOK1;0rHs6`5v3I_8$q--T4J?*Gku+XH1p z1YTL$(%1P-_pcck3g{&Ce|KR1ipb{hsc;uqqW7eyY2P+i|OS7{=e^(?UFF z?7J|`*{a8+5yc0;$N&g0v2mYHh!&XsyPk;;xloaE=_8bagFZz9rql?UGQceGt<{M4 zLNdWT5Y-OfJ)qUqvy3|W3N(*zuj47r%=T3j6q)WuhCzKf?^$rsiAZPCikgPzGx+`a z=WjWugnxZHlba05ha_Acv^uEP=Np4TgD5PmusE?lc^kQF+Fp@*nQVA-up^L`h>`Lf zV}h#`0B#LtcoR5ea=re8CPO^H7T{GrDLrP3caK4IB$GJTUEYrf!35pTKS;@Rlb5boNezy#y6*6hKQrh1`aCtok=2@l|5u zO!u67=k_IjwXvZ=2}S&yOLhLXV1`l-#qN>2sG@F7`M`bMx^*Mn&qYCXfLpr^3HCD9 zX8NV3eu$ZJixW?S!o#<6rYXz&%vRzdf%aH82&gaz4P{*3$nvpHqIM?@5|y|23-f%< zDk$Gun3%3@zx0~|&d!vk?{D{9tXy0~Wx`C#S63E+jKMz{GHl&?1Gbcb+0hT_ zhM9L7I~bt~g3ybV{x&kw@R@f*EtOIlS>-}(3JE*N;(*xNGU`DZ3?09%?|SZ%bjn`y zR(QAuHu)AtMoKUS(OD#S2Oo^!IoO_S`NsJ^3`!G1uvhPdJfriw=#5SBrKK4Sh%)RM zzi*L&2eX!&Qqc(-0f;DM_=j#x9u!#Q+CGz^=pX90sSI2!r&zJYA2q`az^`^RwSP?r>)$U;orLr0HlAicZcj0ar$%sn`+0%wFP{Ly5N&CWhi%7U60+QZEe zL7Qan^#MUbLsR?T#K@WTZ?(L5S^C^JaC#Ek{buR!>^ad?Lt(HJ?3Tf4FhR;7@0p7a z($LY>W9mVdluGt_QzrTSiXUOMxeWGFF9sA57Z}C-7qUY!0y}q7`Tdz~_3e6n7v~55 z8vF<1i2(5OWE8+@iQKsj`cg`&fgtcNy!86B$s4VKx)DTZ5PywkuW9g!lFWVt>R%Sp zr#iwqgfvD;z4>c)&P@N<4R9s>09S}bfg~|UWrp}|;lJz|vYhD-odbf+!x2^%JlpML zQ37~_jkK|{nYh_tg#ZKRYyeoIojM8Yvpd9A9tpxoSa#tj8JR-DPPxJBwa==OAZ3T6 zaxfsDnIFZ?KSC zOTAn`)W-SslAy6OcRT52_~j{Vg02G8!QiK8NRrhi=JxGtK4qON1W|Zy2kJuL{P&+ zkgaEUyTq;1#GALs179nn#6t!H4N_56`u!YAQ@A!&H8h$N!ZiIzy8a`S%oG$* z>*?quM~Yx~A`uWx6#Wyr+%>xC;9a?4UVNR8P4xf;2T4FnBY=@EW(d(1qnRd1PJq`W z6UF$LSD#LT*idw`hRVhs;ZoxKgfZ%^R+LsV?+=L%fEROszaa44Dzq$8<=W4OBe>S= z;Nf=eE4zt=XXGtef>mUV^2|qc1~lSXzropXYm zR)rJZS^mf30c%hYQ9^BU{Q4c!JW+VK+EvU|+pBOOmVN zWGzn;5k_#jxLcaR%>a?@E)NU+E(jDwsv0{epv&Q_Ltp`Ej8tQhbm=2yu0wAr@v6kN zKJ$~irDEJ*?OJW=RQTObd3Ah7QI>xB7zn9m&I)i#P<;m`CpXj4g-4|UM#KGHgT!I( z`0kXZ=KA~oD;JK{OFTgcA}!nmESFd56qmN(@|htF;!8H-d^*Rn338wTXSeGAB}p*M*Lz9aw@ca-xS44p{cJ&_HY;M<9)sHh+v ziw7Yq>rQ%Kpbdbrw8yRCFh0|T%TdZtfS!VYW(X8t@1DfCeS5Cg>(0*OlbSX=do~!; zYehvQB$zut-%OB1CdgU)M+T}kjrV;gi#MzWhlhoA$fCJIzL+;MK93@g0Valnz<9dg zF+|K?07lzss;S<|5v$m^A}!ok5#t%dunS(6KvdXdq-lBS=L;v|m*V03HAsf= zp#`Da&fxbSaKCQKJ9uIc4! z-&QRA{`~;V;-g!dsw|U`M~?=UuKEK^qPJj#)8+lcn?3pDy$c#(T_(3W%!avqDtyw@ z*^N#BpuU7Pw>8tCR9;8n^p8~t0`H+I(vWfg;t#FjRPru$)8SU!0l(zb@0WgyLRn~_ zx(>^U)>~uMhgYc~aTY(J{~y7JIO# z{PqWU3S3cPuBWBVp1y#4#DMp*3Mj^;ts~>%K7c?_Qq}QnqFWkl)kzq?_~%ty>fgPi z`#JnhQcaGhKo@_=ZJS%XC+VW@4L zI8s=W`@3B`c!r>EkWe1pG2JJ_-5)GlE*@;02ROBR9WT$uR(N4ZCJr_^L!U$_4UX*@fh2f; zoOG$0tWcmS8H{nPDR6=U0{_BhkiaQ@GqbZE7k@Mg#AFy^<-y6+nlgFeh-zJ?+4DUl zum^9#b|MoymsQGj2iJwK^xL8$AwFbP0uZIo+b9tz(p6yjPIH8zX)|2+WaG%!U=7tZ z?df`y5~mkfh5N3U-F^(a zZXulF&wm@CUhn_itPg?%&UdR{6CYW{Y&6s6*`g4p^B8cQ$_@^K@PUF6Ah7^AldXUc z>8?30e)uWri2&BJLY6JNuq84Oo2drwR(cpqJ1u;(-`g*ad&rPeM|OfD^#ib9gZa|H zQEZ<+j4wujaBERq)uAHEzwpxz9RdydoiM`#hN*&6K)0FTp(8v|oqz(Q!~qMt(ZY{1 z{zG@HfKt+4o=1o30p}i8(7|{1?=;zhZ+r#HlUza|GKD6VT>8pPhW-Gjb`{uegxos= zxsqE@FsPG)kp|qt736cWD-w2d3^)`+hbfg2G0r2fSykNJW>f}Ysv(sTG=uOTcPiNN z=P0K@W)b{{q!|%vs+z8Di^}lk+ZvheDZo1pU3uJ)`GO$|p($nK@VlgXEGo3b1{W3{ zK=|aAl4x&vKyYD z*eV-3&NRSw9K1lj655)uZ5|y(_4e z+FJSfv*py01hCq<+TSylB}Fy7eh>ts7x`WQGcz;Dwz1N5Xx-fhPGgpfN(gzD4vvIo zj^;OS#2qYX`m1(3&b={-jEf7Jot+ix^l*0$BhU zw&BX|Zg!MkL9eV00gXs zejwWp6OboWN%zo8TE2i4Wv}~YGpEe$ML$TXu64376}gh*02rHAIFQ9gvt_}KU3EM^)~4n123pD0r?AXf zy7Ynus_HL6e(Erj6clWDa2If*)$CXl->$uTb=T}bzwIcD!!cxhn*7-g(J1Tda@&8y zL`(6)3on&22H`kGgB#gSmhH;$0Nf+#bG6e}S9Sjl)~$(ib+UA-e{3um4(5UPX@?wI zQ%Ex~KMa`qP+#Jt+;}jx`#?>Wm!7OgxA!+2Rhul7uCcO{!^1Z)-`E!&{aTfp3)ng4 z&;#=TMF8q~1qIXF@+TnP4sBT7)UGg9BbQmjIF@HiC9lekEDj5LImS~ zzT)ZWS-Z6G^TMtzk;-Zs8X;jyEMdnfba%nogBD#%TsbxD7|_icl)!gXLt5P>LuCR; zF}nrLXhYq>43QV4Wo1bniI(j^CEDRl-DBUPicZC?L6c?Xj1)H zCwwmJ!Gp?vU(L3h6J}F1>F7)YPn6^SCRl;``s;4u_9_>oO(P%YQ2(EEbM3z3I_UO9 zl+@;e84g-RO>b{v^jusQA`|&!2s-Dhm!Jp&3a{6hTP3*x+!veSRbQgP3IdFJZ@Bq( zzvygMvWzR}^uS7NY%~BR9Z~+sC{qmq!8Z4di;D|v`5!)f;JcB0IIuKn`q+i1it)Pb;WeI~nI5rsoHlf7-s(bn%uMQ#v$T3>Dk z;O}-(k&!1oC`lih10LKhAs(%$R(oDNHoYO(li7L+*zfoB0!}x^a&Z^CA9e#?~sFc}`e=i>YlClX@1%t*x_`e4r zn$pKkYFYEq+KRkQXs>CBBLN6N?b!bAGgVEN9Y2^=tl~muHT%CcYxrY z0nn3yg!sb&y@Megk@rmYOu%KY_d`ldi~;QqTeoUnhDXiVea}%>*S)B5$;l$OYn=EQ z76Nlj&Kj9FB1E9QdxPOWl(^M;J)ScRl8?Wd%Xe2$qxGZ2Ybp#A!B%ty)E3D_gOO8j z-*-DT)%r<2y8K+vpJ$0ud$Q6ezgF(I`Sfz;UH_yk_*?7oMhkQiYRjK@cmLvRthOr0 z-QCe~2TjDwi{Zu^8uhDZrdE_QUam@oRlIFYrus+v`g^v28346h!6gTO}zL=H_yzOs!w#$OCy((D7*j zws(SIvC`a45U;<1d2Pc(-1J2JQ?Z{af%i(Z2eFSnsviE?IN+L&rO|In5OG>ZkA}l+ zC@v+%>bkqMH)pGb_sLiD8f%GrZytd#ShwUvXpK!w7{K*V>4`V9MT1Q=MjsbNXTGrr z-s#d46eIp#kV45P@0hN(wss}u;_{_(K+Hdo3)keVBLcROes=(Hahpm1p{5w?$yr%P zBF`8vkrCS9ZKcJ=!C`>+x45-bLWLUmL2asr^|PPNIDh6BU&LE;W4N=RQg}5aN=}MvRP%#>R6iB(k^&;+&SP zZ5qlTTjO#-DkSz$a$o>o`NFq*rqEWnLucpaM&W!pZf%{)J%=d~Hs2Eqb4l9e%M>bO zyU7kt$W@G%KVK1ft^>-3$B)x>%Svsr$UTl2UxKEHzXyFsr(9}QmWaxoB`v!9lzJyl zWMlFb7CZ-;kpWr|1UH@5jsk9Z40WS%e2&eCkqG$cU}dG0TmI|r%JRHrjbo0Zr19i3b3v)B|$tII$s(S8Oa^nY-{`mpN;_Nr{*mB_gu^Q zE^7AdFwC8sUgT>mgSRKoi*7J$hZ6*0SCW&n2X9QUprxg~-r)y_CFo$ubqFT(%%+V#M{q>*E+uPZVVcA~K-oX04rzZXz+g+hA^b%|P!IIvYB2z;Pi=6cI^e5&18I<<6wvD46I&eH!f%P`_fq*)SKnLH~wY-M*_r@qyyNA#LqKu)+__X;}3Q z4b#wg=r`M{F*Z6%^GS*z)}}mutU*e57Cxi=?HwIdXE`$4GoqpxAOo#65@=CJfGGs8 zrqnDKSwGkcjwvP~Aq(yiYEKb@*jY0^=LjIW@NNBKB6+! z_q6*v*u|)tfxQJ2*D#5Wc;i9M9karsqQ>v%Z#>*iR89<@FU1GHrq3k3dklLX>EYrY ztw*GM@Uu(z;&Z&h_rGLKed6VJHWg-dMs$2lS#ysXlrWf>g&T#6IBQ=RBc@y z!kaeOnc%Q6BLjom)it!MQg&$?!})&}7d>%TTh8xalzTZbj6SxD*P~~D+v6oQ=^*#E zcPAYng=uGw3=_L&fnu!X2rbr{#d%i2)>HprJN_}W85O)T!37+HbI28(F?|2$`bQm~4f%4Hk zx}qOJSs4NLJM-mB3sgAQcUxkq=j45K5)u^D_46wy`S0D=#j$}&N z70`+fU`qr=bYOqD#JiRts(!$6nps?IvM2UTUBXh@Hjj1vZkQh#w=dUV8O=sTr~90e zsJw<1(1f*vb~wQOWM_MW{Sw5cQN#woQ!=h2v^EURTr1%x2z5-EDeeuCjNE*?Pm~;J z+b!REi;hr{;|gC{S#;r)^VT&qG)#7;CIW7NHJyb&XzZhXQldC}-0p0vv}cJ>6^#5!Zl5hTDmW+0eeqe>4e0h0;qmyIW|ojo=#kx#02rlX!c3`zXpr z$J3|vu%PS~{5KMNRg6Vg&}gtrT-*?b#ZNGMpibn^^sMXAP~?BAK-{YPetsMW!7&#F zRQ(YCyG%?uSh>#1%7BXsNmSI-G&F>jJ4=Y#$&)7wOtbO&w-!kCHqX1sR1IgE1LPp> zqeqXU_DnYu?@8E1g#Yv@AN&5@(9$vq8w6lPFt;;va?-gMBKtrUZwQ5zGg^|`fX$bu zgF-_MVUxkiVcNEB7a$902Uz`Yl(awCuZGuD5;booY4F<4z5IA!#Nihir*@)k?$mp+d_fg8F}!VmGb`!gOgV&zCSsk@UwRPDDH{SQqxh*QMS7B{{d~6 BI?Mn7 literal 0 HcmV?d00001 diff --git a/frontend/src/common/icons/UnifiedCanvasIcon.tsx b/frontend/src/common/icons/UnifiedCanvasIcon.tsx new file mode 100644 index 0000000000..daa8ecf8a9 --- /dev/null +++ b/frontend/src/common/icons/UnifiedCanvasIcon.tsx @@ -0,0 +1,16 @@ +import { createIcon } from '@chakra-ui/react'; + +const UnifiedCanvasIcon = createIcon({ + displayName: 'UnifiedCanvasIcon', + viewBox: '0 0 3544 3544', + path: ( + + ), +}); + +export default UnifiedCanvasIcon; diff --git a/frontend/src/common/icons/design_files/UnifiedCanvas.afdesign b/frontend/src/common/icons/design_files/UnifiedCanvas.afdesign new file mode 100644 index 0000000000000000000000000000000000000000..4248d3a41d7ff6339e35501d36c1386416936a8e GIT binary patch literal 39508 zcmaI8WmFtN*Dg9Z!QI`0ySux)26wj*2<~pdCAdp)4IVr=1Pj4~yUWmL^1bJtd*1uw z?zOtBdun$*HC4N+dOx*Sg8(H7WDp|A#nVHbTEWGJNDA~n!Xx{i)KKz2>Hl+{i1N1l zcMS_U$RLNhhpQJAB&C+MccO1)1B2wtV4-vL+uPMJKn{d(pr49(HRDUSJ6`H%WXtzL$x$cm$2ZX&a&IkRE0owPUsWy%L?5V&T&}~1pkO3 zvPhukThxGtgRUfv4rkwMPGHzZMB==wVp>#Py3@oxzV}ota-lzO@2+A{>k$#C46Uk?vudJyfC>XtXbS^x z-SIj;P2t2`G~liqOapKGw{#==77#PfgIiKs^{UX)swDFZ^N?J~b&Xit@Moy*t`n{# zcYRO-wnWqL#WhK&pb(*?h)${r`%zjjaH8MMwJZ4u7F;~+9(lFn#3FdV+%0aXv>*S< zt#0BcRkcp|WJ&#O=TxYV;Ku0~Wogi$os!>)zUAh495xRr*}Dhq#k`0L7C3XUV{7j| z`l^jLRb^Mmhqf4mebt;rlAM@^^^Ov$E)PSI5;Xxku=2W!zPp}bW*h;|+sN16PpKfV zo0xT~uKmMA*v`{ex1c|dYMXJI%G0iorAV=jpfLO&2RT-}YevgN54=w1YkJ;9MiwGDMLZNHbhmCe}aJofXDo)vdkT@3m9}iusC4M=`K}2Vgs7e%AIp2G~FV%cUwp+2?DpztD$RDOXYQoIm>H zEI-xC#LNG?Q++bDKSXzLqwV~5m+*N~lOTKWp(fCY~H`Mgbv zT=*-0pSRuA^$;hHHk}@qe%`g^b#GEuw?0FO?j=NFhD;~sl`*3%TC>4;_)H|IJc7sH z<>Uk2-9*B`fBjf{h`m^SuU}c<+EXR`;o?56x|`T#`DLTftyWFP;FdIF<0pZ6yQMrV z*ax2QY~%%+Qb1RE;Mc(^phT)1U_#%vbk(J4HxaU(z^3VnH)+vj8HQ+~`3-Gjy1lsD z*!7=GlxW4Am%%+00(1Z6W2|=}6#j$EYLP4`OD85m) zQi*Im1wL^OO+@v(?=HOI13?QoHE?qtktUS}cWg@WdGn0;FY9(+Sl!GMARw6a+%=mK z(bCew%{L{!OAmTLZ>6$TO`>6-a`}|69|F%!s2^NeE;J@Z`%}Q{*AH)PTH0_#vfpk( zZd)S-3R$WZ7eGvWX_RNks;oUCo?Pi!$6Q!KAS%B8(J(ZB<$Ghb{YJs}w?0M&B#Wq- zqGv9>x8pvORo&hd_xf;d(A>v368gvN2Q^9Bwp>g|c#540A3Xm?rP3gR$3Jw1+iTLp zSaE4HMKHpj+I8pHC$^iYSOFU!d4hl>@qgFrOSOV#0oUNdPt0m6K}RYo1%B-<%j+8u z^E|(|^i~t9B(0z8wbCd=ASfcSR=EL)A2zd`eqzdC6ow-|J6z^Sd-g{6Q^LOTu;k^* zQ^N3kVN{}O-V6WzH=$q%C3jGlUnhAc^fUj8hq*GOh39hqL@N|YhLDUzl0t^_N65I3 zr+bIy6M~3;odGkeza{B@<|C@~j0SdCNs%o9@IT2~GDn2R6TAmCGo{KHzcjsO{@aY>x-nxT>NI6vnwY0hB0b{M!4#386^V#T^6+-%l$!ctI0F8tWZrNt8gz6 zmzoHvBN%bz>Lz6O=ZJDLSpt#Kb9O>Dg@^#!UZT%fVc&4(x|>8cJv#^$6$6&yi2s{? zPC67-5wx&0K=5EqzqrruEDNI!JAheSu=;w`3JPavFSpl)rw6Hh93_}QdH1;D_We+6 zZX50^d(9PrZFY&%v{~BXjQjU;`wZC#Ht|OTWC~j>Vz>F9f7OyAgdJ{gJ@F}*Fg}od znth5(%R(nLblGbmL>0$`wTm7F!Yb>Xjcat8hHnbcsk8{zqs-q>4Jec z=r=L3m0ojJ!49f0yM_p)c%5P4`%THEr#pc8xtjG1JWsCnpjF^PUvuxGD)!Om=E$#u zSj|L(yM1A!`bl)IMro-P+}CB5E(d&LUHUs0RLdI1oWzM-ZI;^AvZm;_yOjNd@eEjI z*-9B#Bqj1}ITkcn55n#(YjivU@b0|3WDrCf_1E1P@4!H;ZgxGk^%s|Q;GNw^nI`&f z(FCw5+(~s$n7C=?84%`ZB<$xVgXD=`UpIHZl|$tmbbRYq{1iI_1R?4z=iWjrLprwg z5zl9JAEN75}UyL)(NkC`nMT6 zlZT*Yg?4aIsf`{@+)m%>o&9SN4!BP%!+YsX%v#4*qph{kTrML=7s+>Woi>c{Gp(FC zMRX>uMQ&S7_Fs0*81pG^Iv@#JxuNJxGm7UDXsd~N6&mBFYTT$;id{`yudm()$i3H> zq>F)XoawqsqtzB4OvO0ti@4~2qB z{6B`A%YH@irN&|6Xo-7pc^>+6F}UyBB7) zov!xAbKi#Bqj{GumYVJ^9vxQS3RK?O7E7~UYjqZ)X@>XO9qt1cvVkQzxKuYO1}jqkL%p^>6JGg1Mc6H zcW0M>_}v5NjLfCj0jyDz3?d8+0&&^^f_@xZYE>&IUe#MJM%QrWc#N?JZNZoh!>J1E z7bBxyfF)e@Z^{u6OL^_+d%G!}8Ohwqw)+B9Y7f?tkdLGR>YfPs zgPRWArhE2T5{c|D2z;VphPa>-G>ialsrOtty%?msw(QE1IF4>1l47CJdRkZCUwq%rJ}OvW;zEaLRXWW%}Y}VbusF%Smim-1W_P^^*6w)s%(!o*%W< z$NdI=KPe7bFezks93U@d=8MTQOH2&PTD8=Q5|B>Mx*fhtCZHvvV8G+QcT3bz&2hHD4&uE}yYau@<6D%gd zB@jcn#188uAv*~@FSZ+&O%EfFoa<-HP2CR~o{+;RCCgIOO$yAxN2|=Hu#~sumO%JX zTNsLvr7AW?>@#j>5CCVkwH-Q}xrNTIpT9a!Q8I@)M0KE?Ovq*PGmFD=B%Z^+__E|# zyc)9wMME_0F^VphEF-oed~?LYS< z(}2NJz4h_S9CSk%0iK`m5&1zAoe0z-Lx`#@F%)4WbPD37XLb&+MoU`8m>or-Jhcw& z`iwO*#?G4M-cLK?mN|*B2u|sS@ta-}tCnW;U)&vAuz~-ozt`a)%3qmU_W0!9Pe^46 z<_lzaF8rBp?mi;tpPMqYXnqK_97Q(=6m`f0FB z=AL?T&_tU|5K7M{Q4SprD|(7Km{J6TK)mQik+jrNQr{qWJu+icL(0vQWuG#dqaHjI z%w_{wVx8_2?Nib@tr>Zps9`bRM~h+z@Ov;A?=!q-UmcQKMi4A+k?FAajZLMdg>AeW zcvqN$A}&3qrQJ+};930LGn*Vq-K+4xcLGY^*AjXF%w%-=OVH|=;EVa0Qw!8hiCDx? zV>b4C-ZEI}{uvv?Ju7uk{fz+zk=>`t?aG2lXy2mbl8^!SY?i1(LFERmW3k-q9E8&XVroU=l$VW1&qwtad(h53R{SB$;F|BCm+rR?b@=L zS^qK?M+o`f!;kyU`xB8k4n@DQ%rFv>kaV5hE2I|-I{77&;HXc>Y`sdIE=m?5&v9Yz zsFS|)q$}W2Xpx%36a?=&eax^N*0O(8{kBMUTG=r1dcmJcg4>$_{)tOHdI!U#^ELrfmprIPq(LAeUs zt(>I^kO9GmV$t?#PHfu7HQ2#7`g{C64l{H%+Te^0W2uIaWJ}5%&RA2}NJa((*m7S- znNwPJNO~+-Fs(S5%qxZ#ZNHi96{J{fhTI2f2^$U!3N?JP$T7=d26ju8ONe*98vl-h z+Rkn}+ISy|T}eK2=QgQ1JDVmkR`xKp1`!E+P!Wy&ag`YjDWF;#HMtJalcm;!lUOD;OseK}p#B~J(-BzSJ zS)U2!Ns$%4Mo5_EdGx6ks_~ubV{&R8y}^zQ+62q1KV1m}L0DmwaoH?}B91}8?2N6f zlC(9)-MCIKcXVMC@sJNM46HPidRB;H{X8$CX610q+z=Q77gqdicTCW!e14%!QCf?0 z{TN&@)9{>7Fa>{SO|jYlTf~4IhtJqyK(R8^6R3?m7d2s)mfR3-g_#CLh(sDn@vs#r z#xr|h&B;NN-H@`&K}SuRLYIjC`=Xbi0m`WoY8U3_{rDtE+W6M3@2YvVu(B70x&bdV z*;-4T?vs`E~?-BMM}?a0nHF(IHf-(h3cnfOr_rVK+2z% zvxJh{fj?BGm(&A&PVk4raHy>kUJ_p- z;J(bL=c%V!qOL;h=}tp@Hth@hQ*C>2vYe&{WG^N>k7)73H=zH zMQElVDkMG&674V_n6VuarAt&n=1h9a9Pf4UX59_o14K z`_o8)@tj{Cj$^g<=dF}qNRjvZ9$zCl*v~A;)Gsor9if%#?X4~QZ7ZZ zJg6)Zw@QpPFHk+hy6z8bh*c=nHDNAXDTu9w?|LbNu^6t09 z%LV^C$lx%TnuLQdmvLVHYb6SEgGGxOyA$pIizg&bsYq6=AcT+!2ZZbV5BT%X48IG) zr+5*|&4-`y*$b%j$q%?CZM-1-8UKBhEJjz4J8Dyg!2xu1{*<{H+YiMAp_EaW*SLgH zF2NEqxewWRttKa)l+w}3O@vIi_{anUQRoF6iWAa3Vq4oyKdfUW=ZWPyDMNTMrHke_ zE#y>~BAAGTp^9Ungedsa>JA&PSk`P?i?nf^ACc|sBjhW4017(>?g+j`s zX$YA}DdW-SnhKUKX&Ru~hE&Mrmn>9M9-@47Z)AJKXSZmv8&eNs2!(7eU%(7HoWw*B z`b16@JJ4pq$Pfxj;Qbyi-7UK#75CzdW91>HgGLHf1>iGP2OJ78j^ zn2N;$haUJrY8V~|4T^KZ@blgZg`FxY_-A=V*c76&={08(CT;`B)6bSyjgjIv!DLF` zErh%Yr-VM=37XGs>$!sX8210L&yZ36$!S&s212n28`g%D4R%{;1a_VkiDJrX>D87z znE?HB!psU*292V0`KH{Lek5ZL(3d}t@noz5p++CXL!kGO(|B~Oi$A%(mW||8b838l zOXt#?uKcvn#&=$$fqe%p5tjKT)ZEygjLC}VI_0Q_Qb9!|Cana)Omff-I5V=A+x=Q;aOKa*Qie#nhN$5k^Fy&0zm(>iDplEkl?E zy9a08DZFZSC4Mx%jWTX9lignCf|8CPRp!_OOV?=-o(1?vB4mQ+4KouUCGm zW~z1}i6U%8Y1-|HhoYi_W{5g%St&W>e(?g~d+aE{A}v_p@kg@MvnpcduO=({NrSGw zq5=@5yllII3-|{zzj`xdPXwpu+=5ll?K>cW>G788z zUcuE5w^t4YRn%jS1LQ{lV`Xpx#POnUam93o77i_P_<;~ISyuwcYLC+`X?~MmwuSMy zt?8iD;f*2ziwy{-Utqm`Mpa4&3QoD780Y?U3AkfZgV4iKL5S#17Fi4}VVRi0v%d*N zO%DJdV`LjBClcL6ka3Qa=47~fOj`G1ii<(U76aneZb>W6JsWIn~*Nu@g|mW88D&Is|1+p zXj5gs`K05W2tNb&aAa|pn@kHUZ$R4Hrehp;HOKZqn*v7(z~>NvTSP^dPXE?-H!nDN zYs{H2UQVl3Wkr-5KW)3<9^;>>e4x9Kn(goB>`a@)S6ZXvU!XEZt>x_3t5iBaIcA)j zC%=oe>dz~ZKX#zA5JWM!vp(Firzn~-T1S-xz&E(0ryhy9^esLd4(cHxpDjNZKL(X# zVxwpuJQovC^<`)q+3PE%N5Z8{9w0f@1&TG;Akoy0SL;?|GMi6uCTJ_yAzPKb_9cmeF!O@qSU=#qNY;(SjS?cRRm_;BH#4+_ZUn{qg85C#kPm zJ}FW$R;5EX!6H*grLlL2b?9}?L?t(pd*6))DP#H{pn{mw)+hceH%&>w?CR8H#>q%@ z8dt4%cyQ%bB~_19=^8WEIGS<3%xjlWcz4EKitJ@OaoW7;W*TN9sgQrqe;+UZBmM_t zBi<1XOzNp*wF)Ci`T_>AXrclwG3`%=!N?@*ROG6%TdEX-I2HCPvLND#Vyt@Q$BQNT z*0;X24?5MjBEQyq+Ylno9EBWl@SIO{nId-qy&6i)BS%N?dQOw~ivU>{nJTk82-J zIlJ2M^JUA=#w)H`!58KlW5yHHfX@CrAhYUgfa4IDV%)4CdJ|IG*m(x%^2=P@i!L|~oO(a#0vfOVE40{e z-QEdKLkQi zX<@1qs=NXJ5x?77^QtDmXx9E(r&xu@zZdLNQyMjF8`tYB7}G|SGtDiBRHo!3w6XSb zmggdx_s!>~>h%0?c=`ABiJLn&Rbf*&myY;4_6pe#Yr#KG%kmFx>5MIE$9KZBTJK8< ztEnW865^BfY!j*@7fQ@r+-6Nq>m7K5+h6cdO9;|FGxJARI71ydF7wb1ED#Ng}R zdcwI(*Y9CUOSxEvCP_eF!uTIF5RZ|lTZ0hvGXgYW9^3&i{6kL*XD&Ax$@p%0OfL3q z1V6^vmE_i=ethyf*{woZ6|pFdyX0Ls0uMAxsj*4qoNOP0G-K6?nhM$ffk%`wq7SY> z!$tmm5tvP|kjtlrkyWM~s(jgx@Ebx7TdRvHC)Hq&Fe+MH8eeUj+d$>Li2VVh_;u`b zDg+~BJt!(`Fzf~j&Eij*)MALqhu>4f5J?kOn{7jR9y$6xw4c_;r?#zZg%0Y(!>qVz zguWycG@=;Jt7#3l(8QmJXG19)8tMz2v)MzilGn(gYhV}(F5*)ugVRu)%&EXs|LQOs z6PST9ult=HhH2dJcMU-x2E~8M(Yzn^qO8B%8%b4Q4clczMQ6lpfw&o584~2T9AkD) z?1Z79Ftk5UvA>}6_k(E(RWOusF3VXcnlQc(As1MFWWFG9YKhP@!2VOU^0U*aOCCYQ_9o?QUJzn@bW)!>D~zk zw~)-KHM1DM>%VXAy-lqnQ;an7yh8&9d(ranVy5;V-LK_wBt(U%Fv43TZ*S5YIn~}9 zz3y?rr`co6;vl?d*6$=pnF+>l{{oGR`Uqh(dgmiT=#3^T{r97Uk5GZrse54+F7J?^V$pH^#)kSe#cbW1 zOQR#-#W$rBdT4(#!`#bn1{Fc!lS(u+;aVe-66}g!j?7rK(de_r+IGf*R+x_{;mRSN zs(!{N2}ZR7?CY#T5{dNVus8RSoqfeb5fiRGM$1nGB=0~3fg{l2(V=tWpr&+!Xmv!5 zw0kZ*90n&kP|T`gHY@a@dG>bxw-xb7*b%%qf9on)glHQ15J-R7a&k^X%Yt02Ti&Bk zo-67=x~ug&e+Z98czpavse_iV5DkF;OHqG?BMLgJ6*o4r(@}r$z>L)ge?%2C3Yr2; zhiVILI~lPrw4MA6O@A2+&eWk1d8x}66Hwj@%3QDJld45ZkMRZ4IWlu`dOD5ST1(eY zPskrZtO<|E>GBGiAm4u^44(Osy`(rOui4CGwtq-{%uZhGH;DobY~b|u0D2JP7-{kx z!6S4jY!L-Zbw5QE0yN>-X#N4}`$Y_z-FHD0$#eCFES7%}{&5Ocf^K$2c9s#!)^RX4 zf-60cZA31@tcO`zjpWgf9lKvCel!NL)O$uPJC1b}KPwilpVll>!wO6~|#|rDa`%=anNOP+U58cU)g<_oMKAj-kSo%VN?g zSlm`1P03=NOwSG#LUfIT+s;DwDH6O}E2F56_$ke6T&v-0JpCTru5FW)OU8#RafPoI z*2qMBeC$WIoS4b=e=4`fw5%F};W2w?|76#O(qN5Pva6MdHQ1aLh56?u^Qi>8gFxGQ90A~5vwz6swg$%2yZT8$04zH)G z1&xF*WGM4&FpxqMlc4#(Cz*9l1VKsuXh&3uOvB0-GM%<8Rb2y5OxdLIvH0-wio}SXA zEFh||OHpxKfKh1Sc!UYe2&gJ>=YF7KQsD?pt7pZ)W^di5Eri-pOXuzqzM@#01f%0I zP1pzJuxFs4+;QO$s`M(ium|V;mBJq17Z@ZK6QhKVS{qi@RlV7bShNZSLsD&PndqNT zkG@K92>NIJTp4psZStKBlF9g#RxM0_-1!Y5Bpl289eRc^I(69^!vzWy=ne>Z|;%(*5gfo7lR1L5UrWlotMo_4IcdDtEFcR~u@+<&DGp)!IP5xETW&}VypQ$SEs zaQ(vG;aRnyC7bDWY^jL3nj1=}Bc)2pB2z-uF_NhFTw#+q$`TLAB>X%*cC`v=%WT}Bm#q3rxA32N!iI`pU!-a+x>}%YM*<_K|&EbdHUo^E9+Th&H=0$l&(t! zP1$q_+4oFLF!Z)qtM9DnO6H)j``oOxZUKEU`ywPQR^|b|RdfNULqrkHuRL4s($&&v7NZR3>v(f8%y>yWTR>)GJ#0nJ|wVy6X}+V zV`gb-30D_7VJ8bMfeKcgw%+<$UmE%;$qR)1OGGp&$60R=g>YuCd1Xoa?X4sl^P`o` zRt3r-&_lIRVF;j>3?(XCyhPq@vONQ)5wM@LA$Xh|U;v5th%Cv!_JXDVV7MMwmjM8x zT*%%@jh1tp-R28p-Spq*K7(5T`PWM6XW?fZ?2eY6yZP%P{w)9J=L=j?|6b7+)aPG- ziukvI%B8iSnnTWb!#Y4{I1UO)-XmlY8ZNE`_dOze(ICBy270hi)r)3G@-vI^iEW+W zAnh|Dy)uoqWVHMz`K)k^m|ks)ZA@45Xqh5hNoqt4tYe@LX}j<(C{L0e5uF0Xib_Er zHWfo1IR*o54hSm300a2&l(3SIa{8ccbV>4OxX;<~>^)&;C#PG_+<(^&sq)(%mah3< zgYXRe_iN=JOn|;9F8WXW+oRIt)S_0gi0becvw#|WiLN8CTm%H6$kzP=W{LnnhTlsF zRQ?eRh|s$n0zk@FY~I`DU%!4S?{QQYMZ*hAkwY!NvHd#(NfK}q+w@(e&9 z0`0-xNi)KFV)&6MwXZZ`sKe$W$TY7X3mKnW}@;&|xrsJ;t zsdt~Wf7vurE%7`G63SKGodbjtenR~Jm2u^3;pe0TWj)^?`**zxj~D639d`irZMAXx z>_b=6Inb=IoPKkVD;16gg&@@r*)X4j7hPsCYR=YH^dKwXc*6&?Ief8@Cjhq1_#c4_ z&rInI&NxWW2PEpFfB$9*GQ!Fg<@IXhUkhlQHrdPZDY|txn(GJhb{T3L@=)(?JoS21;CjU~0VbL9~FNu(u#8Z?Xc1ZznpxCF_Bt z>R3e@?6=&?vL*n%0-&y{f6*Qa!fsu80C?<*@oJ>I>#(4mT?=PpS`^?o@is~UwK%oC zIiOuO^V4E2lXVRM%UgiMWf1r4CW>XzMZgP?`yoOU56lMtO$(C5D3@FS8@HR) zoN&!xfZe)R4!Cj~yZc8$VP#L10G|kc`z2+J@{I;@W*suK&LO8vLY^JodkBHWiVCjO zmJTm%wdc(j>@mCzA|z2}HM#|=V%2Emz#md%xA(XD^h#5n0LN!ny$2bfua1#1n@mS4 zRt}@{?r&v(WToh@hqu0*H-L&_Z13~!rsibpcAs9w+G|kD8=Rw~qtqVPr`tZeXn(BC zKpHaOYN;D;*y}ZD0@d;D!pv;~3^c!OYPqav)op4yGrewVD>RhkF|t|b3TYBTNT7uJ zKP>d+585w+LU$hPztL&%T2p_Q0Pp{e&BqI~>!X*T=C|&E>?y$2)J6;KEmwch0qCm* z3L54GueG@xOl{|Z=J^Af}jR*ErOxC&lMdj_N-%|(YvD0vI!iw&6} zXHkAl=D6~F38KNJkN)lV<>Mvd&<}J1xZ-==5sKu^-8k{p`GSYd$^@WW*ED z3y3WQ8DXy814et@X<B_HYp#nWkwM#(MQM&aqwpor! zm{w)(Kdxflktk2m)N0m|(MoSo>6>K6SUucU`q;;H$h_9>%w*$ORhczfru~n!O&Ei% zmvaq}E>tlQTrWeFBp^hQ!S7KC|7?MrjiOp^ALs|d5YWklKa~a}V$&&Sv746$uB`o& z)E$Y6g(ELP2GP%UvygN{)ggl2d@%eSwX9LK*!fQf)2UoO@NR6sUu`cJLMwE z>_pG}klwOa6-B0XE<<)+ z9bjnj=&mnnXz>X!B6k?YL~fJiUA`t-j#YgHl=R^A7!pKPhx*R2Ql~5*T%j5 zi >ig;-TOaI*`39JZbSA4DvI9La&eVIvDHU7f8)i{!9}}|LLq|V4EFQvirYr74sbVy{;#=!ps+{^n=asku-a`^KUZ@f6CeNAW92 zvJun$Uf3<&^_zzw%}N~=tZWV+brjfXF}czVRwMTdx_$wkpT0fekd*Y7Se%FdR!W!R zx5X--jTds#ctD65oD0C4zFH1GPa*!3-%4CNd!UhV0e>A|N1yCUxNTeg5xb{+e|Ovf z)PPIgZJJJo85W;06M}4PMk}El-8Bo-NE$)U9${7;3@Z^QuUPp-fy0UeHh`vwdY`(F z8BXXvHtQ$64!Pb>yq|jPdh8Vle@}Y9F7MWbNPjWYD!~ z+69eRKn2X5X*Rd)*T;W_$Pi~{8Ez^Eh6WE!y*^EkKy$(opWU-W#ieAx6r?cI5K+j* zg3`7WpfN+=BT6DFMq#pIMOWe!4u1%o7|$S+b0g-j(kjQ&cgl~(ZE2(n?D^&?HH}Yh zUGWv!edxJyB7Bmi!^=4M5)J>~)^Y_%slVzm*?n5I{rzX_*vgfmATbujNIhm|(kk?HJ-5Ud z>*Ls%$W@>=rk@U$?&k}?%%g3A3s|S*56^>moh7vxZLhomoF(f5uNy3KoZgu7lk@o3 zsZZqJeC6EWk|-*>5*;jCy6x*e9v)HdPj+~~DC144B`iR#(VMv%Ev?%(;=`#Y4a094N>;r#eCI2afJ7=Z z<%7$UVg}C%!4;U99_rxF_K29IBKC!u-QI|Kp?7&G@WrR^-v9p9KMGw2hlGYH&+WN5 zl<@w$Um@qiU*93uwb_i$Z<3=Wb}0|v$~g54I?XCm5!kdQfi2+@e(vxGa|I$Ex#S;{D6|<=5S|uHOHcY zZ1l^FFW;dyAc5CH0;8(`v`7vnxDh34eJI*efu8a}B$X5%Cn+I-Mb zSfbsbv!WqLLRn# zevm`H=fjK=(m>S#15;vh{{5C&ybJlptvO||5dFD-Y{m8}tW>+_aRH^=>jwq}JdYO^rhjX?gk=_XGQ_ z9tv(YRb7FUBp|S2fTmzK&Qo}F_-Y-cpQ!) zhh^{A)DKT{)a)50I#seIcj<#AO_t^BDb*D+W}%V!d?{QXLj0HTC!tzH+TtobbAF~! z`v@^jw6{>XDJ!_gusRwVXWAnC!l}ZKQSxOmwjxzAeS_9ZgtxNZ$Jbzgvg|Jz>_Z}KDe0$}-T#A1`^^iKXd7K#+m3)(?@oXZQv{C=|^-E*qiX0RIY zt5}O$!kq3HBsl`VBv`q$c_cT_%{*&kzEiwNUmK@dH5E&XJscV`S}a8N#b&tdZ$Ik~ zhb?ak14y|4ePN^auV2>)lGcJT`K$Mw7Y0qK`+?Uuy$TWL`tjpTB{zxHG7YP@DvT== zfmoIqg{RIw%pWUn-r*Hvrj;DLAVzMrR@I>1w(`WYRn@MbRwc>%ogUk#;b0sofKBvGk&_( z*YjApH-pl8Ce-GaWqSAB#o^DcXrsE3Nsq1ftumSf94M+sw)BRC6xFx>Rg4s+ixT zG$PGml$^uXFF|pdtf&_{TB)gaHRLR=wRn!z?tXl))`(=m9G@kGw~rLW{ITBj{V>T#LL-}K!qs+kI&+Va)yx=Vuil;NgS2tT&3Qy;#1!A;lS5)H z2hIml!qj+U1DQ^hR%->lOld^T{yN*juwWEL&r>jUbCw)aAkPGFyMM~H6{NOH3YN7h zXO-SUCgHDrv)}1*`+A_b9LucEltj{~TvWSm{j~nYDG)z@^L)5_9=b>42UvjtC+2IB-lhQ`90Re+Hlj~tmeuH3AJ7@Xd$)+Pb@Ep}q&lWC=JK%q?~xxD3!|;#McS&I>c$*xQk5I; z)vC16XI%J-G9`~lit3YmLED52P5Qw~MMOxoM7N=&8XMv}8uR`gTvV9)BKi((VYvKt zU#58F%T{;A-oO2Mv8v97P0!i=-VUfH$vhk%fL6WA! z?JtX)vI_mrubK_RF6E zc3qH~nk3I%GF?fTSlj%%)%U>t_qo{nsn;*qQcX*pdiUkf%bhqMBVM{wvM*?0d87@T zGOPvOduAYFuc;-fYraIMBI88zyIr~Z7H~S6b+G6Vd2|6ceuBQg$7Ar>NblI{j}Z!g zo4$@$9Mfr`8`2p{%GQOQzu*4d-s((tm46mc)|vU6GffTnjp;Z=+}e#ekZt)g+?n>X z2@mTidzpxcQDhVBZtO743zNbbjU=w*{AW{*^rCvbSAwUR>ave%QoV84%HiFN7k)iT6rABHq`KKEi7un=&Z^1Q3KNNS34@}QN z*NP#HM$&uF(N02W4R$AL>R&LvPMLmo%=-Ck(vKC}Q>vG@@&MZzd*$CD9N6lexJbr6 z)*8-iUTrlf-X{0PayGwpKk7db+3SkDecK!S#*b|*67*EM6i zH>`7YO_B+CL|5%YmesRFvJ(f>;zp!h!;(66F6~Mm;p(690XP)0-j+H<8u)DNM~t`B zxEubKLW+`-&XjH+!$~e&n=2Gz%Z4y})dH_Z0I^ZTS`)u$@gDi)7hHQ^5C7H=)0A4& zHqITmMJ9+TuFJ7eB2xUh1Y>I}tX;QX71ZszwJ$lInX&9Y_IZ8JZWTr4vTeR-N}*Nq z#@;LZW?oZSFc^BzJ8j%h)@b}=W%k$3kkHX}VPR9Un+Y$UjS{{Lt2!VD6cy?_t+o2C z){tCGe*L|*6|fZAJebf0eeC}3m_)T~-*#N4H8A97NmqP|9Y4AXr*`%R&&$PTgL7oY zJ{HQ1hQ-HRBIt~-$iqY{0{N?*I#9mn(|bWa99fx)M#<*^qkJeN#7HpDSa6Gev3aXQ z9*6s`b51QoM(F**l;-kib+-ZC@FB}+bn&jtwqWLR=>=>TsDufNfbZzs4)eYi$G5lC ztm7}7SSFgvqo?{Bo7gAYyBc?@oj0+xcSBi#)jU%FNReyD2e zDZ#^KX?K6M3y70ULSI^xHkjszs`qrv%nVksdolM(nf`=#VqsP^i`Lbc5q0QQs=-G<@&4%#vCt>mU^gpWAN=33@e7Mo)FUjT#AF8CUP@_2)RK)U zk@J~Cm+I;7=tH@MB}5M}tadnrQ%XhCr(IucGTt0ib4tp zXsJ2$1@9Jvl@*bblA}UoJT?cML)iXgeiwo1fr;%m4Iw$^B1_ji40g9^duM0c%Ua5n8T=ju~f#&DPN8t{QU^3O>&73{8c8 z;ujH!@~$ip~r%<`|B-LGxY;Y1@QkIoIe9db=?hSH!7IQXu z5uC8l2*{{-(aGHOu=y^Oa5aB>VEp|M|0Id0)T>O9(CWQ+vylvOQE}4eU0xI!vDi`f z{0Ww($*wYH&1J@ZN*0{OEUfS^RV*n)GE5=U@qQFJiK`WI6!M!@#!@8))npo^iTzIR zF8k6k8dj!E{>H#H%is1ZppdB|{^n0tdtW&9NhO^E&(8hns;0RkTCRDman+-lV%Zxs z|2g#4q2YclXl%h+U6Dd&3)wBvBi4m5gCfHe1;ta}m?tm`OYa!&JUvwEhFC_vh9zmPkou9OFnD&vvr%F zQe>7Uj|tK7Lm%6|Pf)FW|7vDNmeQR(q7L(2g?wgo(gz2@q!o|e^qd6#bwD((!xtT% zn1Gz`hs;G7@2_Ug*GN$u9VJ(-Y?*9hjD}6i8u3d@zh_+o3bLB1>81^XfVf2#Cf zknd)$tA#Jda~P_I=y8ecKOmxfFC%N_ipw zIbr|p>L}didKkoctSD|!gch*<=Z*fip-i8u^LR}5>+;pCS2Bh{AgzUh{8jy*$M(|x{gp^i`qu-_w4ZY+*WqWXid9Qm z!phN7!phu*iF|TQiTqA}{p%%L{`Cv-nvQw-5c!hM(pxc9gq5T$M{U756{uv+BCH>{^_`Jq8MsmEA6f61E>Hiqd_s{sr zyP;Zt$J^K0n3CgnNwJYn-TII5|Gpkx?Q_+C$M;_L`$>-9EyYfbPy3JY|GplEyDEqO zjyHMDxs@C*EyY2O|NI~0`N#+HRrS!_`0sd%G8P7M{2nPz^6`cL82|6+kr9 z!Pgz+cp0g`PjMY0UqyaV{Qds#>&cXrboo0z;A@IMIexFyCUStv|1kc!>C3f$$BR9e z93;ofN^z0no&JaMXFEF;|BkOdu{MPqzfX#r9Do0R7=K~4-uqwIA6~0TjyIRuOpdSp zkMaEEgZSG1vb^x`_=V=2X>z=U6c73M#Q!j!b~?}nc#@iRrBuD03+Ixaf=zClA>SsxFRPZ4Wr@Xxec^8)@^=cI1x zOb`sO$^R*$#TanEe1wMbK|{Cr(N6c1hF?|{CtB7o3iI<_`+n{Cz4pC3V#4k{NG%?? zdt0+l|7qM{3jU5#l~XCU*$t5qXjis0s;cm^_r8Zn3$O(X7UI=etvyE4nkR3 zneH{EFP`%=A@J08CVGOOpP$--LP=Tqk&-xpm$3y<6L=Bj|6g7-szRG9n4o>DtgNh0 z&DvV{b5m22o0YZop-92Ti-7_4bcUkr2jt~@$HtalziMh?efsoi4I?crZR5oqsru}M zySuxr`)@&h0fCDP)8{)%F4J>`(9F-ze>x}qX=El@fQ30?gF)68Cs)^-K|%EK2?=^> z+C0x3yLox!T$Ea#p6dPiQ&cXwEnRTa>JQJwKlV$rm8&(3ic7xlVkG;&J->kWNw#EW z))N{S9SyDx;Z89vuwF|?cL*lWObfp-Naa7ci+!1SqEHn zl$8&q8;VMw|Gehm!-vCN<@@i+*o$Tv(8!!7hG#qm1_#Z@yUN|h%V)#m!tkF+r2K6SI~7v((fOAw)36hl>lIC|eki`CcHGx6LC2uRm5Gc!B)?b-J4 z@8kR(I!gjWEyF*s6UVbTJpYVVrzLscuCG@&D^gQd&VOW_)%fr*tya7&^YY^Ct(26M zVfC=QI7+^~dpQ-Cr&&{v-oF_eyRq>itnYp5#r|58;!8qiUXvY^+Gl#Lj->*y*e6larHQJH)X$j@o{DK;inUBamaqag)oX#``JxG*~z! z&4Oj@zc~$I;-?k&I&>)Am$A>adc%^HNLTol*>_;TDwumO18Ta@rc)DphKB>Hs+6S9 zeIjN?TGY;*;e!G83=FIh5fPEyzyF=>pzsBgJPYd3&HE^ciOI?87xwLIL?UDE++i#G z^X)=S1MLQ`>y!O;^jd<7BVV&$h4Spbo#fb-Prb6TLdp6@M_qmG=g*%BLf&J#YWhbL zwMhOB7zu2XnwomswrxtPsx&MtEKFOrgmLe6;M=;D;&}GgpT!=tzd~?10(^W`eeL^HCUFSesy<=k)HyopuxQSiEYb&FW;`yIGP zybd;&J8a>`(QfeZ{$56NbMtMYqWSf6W8a>?!VEhtFI?^@_vD=V{^9U*+b`nzJNWsN zZNFrica^ypdCp2aJzW`U-~Qs^sZv*tHe)?K=9`RLLg%N3PFQ(W9ZDlmruV%(@-^=2 zNgErR^}Gi*I+jh+d@FQpsGNo;`MG)XW?k(5<_rT`Dq4ouKbq3=F7~V1bysvgDSXs2 zGBelX&p6RjP385c&BmI0R?@oD|NFqe1IO+P>+bnuIc7ZA#{oe>ul9C(`D48=k(Tx{ zE%h!IyYK7QXXg#PR+nd6 zi!P?LrRMRjqe|usstoIy$=3b<~9PdS9}R?RDRbPucf-YU&mIfE1o+ZEK4=ppCsya(Tr1vpij} z1krVM_SEazTCVbkl_!dvwkj-78}RExZMzD5_~4711S4X=j1RoRKs zE914;xVBAJULa$;aEO%_s#O`Xq&;Wv-9u73E2LpN*|vn$BV6*Mq=V8 zi#~~GZDD3+HnRTn=Z{H|)5AAS{d>4JEX9vnn$(Qu}gY;KuioLOw~8j zDC=Hx67bUbOylg^*tAve-o1OYf-$cVX5M+7%Ai)Vu;9nC+k7@!wSCTo;OAFaS=o3s zFd*R0`|j>7m`$hx_i03uD<>!{e0QNlU(Kx2TOL8Dk(<`{d{gQ}gEVd786iw?$%6-c zQ867YKU`XK%@1efNSP35j6Bm{8zO8!SHpSwbze=;(Vs^!t3JoE)5sVZwcx!nKZK~f zv(+J&Fv&eb0kz{_ycrVc;M2*H8UvqPFUBw?0id^R*?Q_qMr_d(uzanw+Vtw{_08QdPz6wh2}!>>U{i zvi@){PVp4=;J`pnN3nBF1GkJ_Kw6@Q<{AF^z`($R2qi?-n>Xvm+6y`3)y?3PF8 z>l=E0p+(i7X2Tlc$Ryy5o)qmkfx(UHU-22r<&KJ{5$f_o$EzK zMSVlrCkk(tmX=m23zc3Pr2Ey4Grn4e1_yiJ$L${OEZxhe5!sxkvt^yHUf7!`ks~h< z!!`A@zSQh{_3D+1T4X|FiW+C7&z=ik*?81k0dsg4D|gv{lWvT#vibJxd|3Idb?eq8 z3%t?(aBojgcO^y#g$nHN?d`1@Pdc7`H#s?3SxvMtc+>9SE}z*SO=^*X8u~{fuVb5T zI(1pvv8!X4bZk}%xJsFl2KaMABl3Z^j*gnE>x)JzY1`)de+H1TtwhJzm;*`0!!zb#_oi&$@jqmCuAg=VlQ5ceMoWC9bFGX_A z`}gm!%kAFXl&<|ZE3_kFdn2_H?j?-O9N)x!p(8v!J^$vEGB58?^6lOorAEfd0j+G~ z!;keheG%EepWD_lhQgXmF0J+(ibntI_02G1j&8gMv+2$4i-Rv;9@@C~VmMwYO8tL2 zL$#8WBiba8%)#gaLbvXhkdPS0ewduPxq+KbOF(A>w~W`Q{J_vBH$3Cy#WU zj*Xu1cp1L+@J@@@Yn#*csNnZlVQ99^>3*yt+IXW2@Yt`4F7_+eg+E6i>;nW=KYCQ< z;6cA(Su1}N;uEWx#}A=K=798TUS3{3{r&z(n2x)!z|fF@ynN@Q z3U6<3T*9`zG3Y{t6Dkce4AT*e1MMRPx9-`)uA-u%8g}Bjtx-{FX-uoJiAexJTuPnz z4l&|@*BlelRMoH%!)Fv9sh$ zdP8IPmKe#?GO`YUL0Vi*!00`(Tp_A-aHr=xkfm{N-YX;X^^p`056_XSj<*o0YjW_7p`4AKi8Sy-lKfYV+(1vvLpNkW!Z) z`u>)Q`BKKy|0Y5RF!?MjCaXLEo2yqHs_q~et$lF*BOcjy0}6zA%Y z+M9rMLEPFW+vmbFSAq23c^y4@GG4)l6+3NF>$PMeRLfk)pA|1~OmMfcy2H1@um#HzOb@mZbq5w4`Y z{IhxciSSnuVTV<#)Ud2nFptn-yCby+zT zwoaZN<-A8?Bx-=wCdYkNxskR=ZQuKbm7ch9{_~@CKry!vC1XZr5)%{8wdD(;Kl;W& zf12vHw&K?R#wQ>^6~wWl?_-jB?daH% z6>dpvmGxp&p{NFdEt*sp^W6$;UWbrke_45E(H)RuZ#N&bQ z-z|Eo{4nEEbN9&Co+xxUxs(-Y3A1!?aAzL z|E=6}mV7H?brt?xyaY7Qb)dmywJ_cyz{iZ7Y-HmZ$JVjx4feyQPE0t7pLns})z$TJ zg)8iCt}jUP$(`UQfz(PutYBCGrXQxKuf?lXfN>{hT24=0lRfYUF(uZ@ zU=zAL$K`Ps$EA2ospx$*A3b=0!pN06_~YA^cfncdrKmo19{NafaIv8Qb|J^JYvcDh zgJX)+Pg{PRmL?!8yRogU%~(tAZY|{lmbOC2Ee>5}rWWm3uj@1$xbC=(JMrtkxYFgG z_Fl-}0PBBgP*Y5Z|H2sxT@67YA#)^wU@d7*??x=sk2xX4e-^OHZMO4DlF7zl$5Z1B8P~3@ zy1U~6{l|0wu4ikIrC;&s)Cv&Yo5*yx7#N6u-@djpi=Q7K(aSND7ZV2X z*>{G5&k|wsv3BQ0SJzr!3M%pw0tT*8`v%v%ehsp+<;>!RoN^kZJLC(5Fi`=ap{f=Z z$-~;UU36G4V^zrc#OXGKjNv)HWlS}qq zUNEWf+J|Mh(O(yqa=OwRe75OPu(F_{!r-8KL9D3j=ty4aPEO{xvaumU6^Poyc6Q=l zb54i(`VuZ<-`KI9svud|Jlla)&-erN^a9FY-fj=t3mIe|-?M(xuIoWp!uiihbB%Ts zvjW<``t&jydZS7iY`A?-+9G}^@bBJiiE18==G_AcGh1p1k3#MuB@9)o! zz4<;6<&QU^f*JuKAu0)Smv^4~#23^(_#57Q_-i)z@n`4!rl(!hBdr?8+U~*Txb6CR zR0o5|7r~tzV`5{wZj*GC1V@EGU#!mcGm?f3NKuop|H_jR`-pqe=PhzWsC~W2`id!R zsI}ti{%ijJlTA8`a1!e3p}-8AL46@De+?q(x>fEApRTPFaR3jh6`fx(#Kj@%ntIc`{%qrb0@Uyjn0peN$wE)4`!pY?U0Rm>Cz zCk!i@m}*cA3bhC~%c)b_a`igAvN?F@gqem%K8-r3cOByrBF~q)?<3x3MSSsaD9{Q^RVnS7uE+dwtHW{c~f&0!NPiCCL$t2 zrz}xjd)lLXx>0S*y46aX(ZkusM@n7CSeF09owBleR6XAI;lo&9%dML?=~hiA^g=8gJB~-`cP+|gc5iVtQkQ=knl~+pW@75$kX7~dBZs#sKi;*V z9G#XXQnCE!#QjsYG9Z}&lEf+)&Y&O5ZRX1{>a@&_@EE}QPY$IunZFKTwm$Lk*qzs} zmCFF4S_>VM_#NNKJAc;-=Gvp_5=_^Ic&4y8x*J*i-e{7U>R64>6L*I9X9@gtC|OVAdPqiJMCIWofOH2AE? zrwmrG*JQnyiiS5T>zskLzZ~lLx*dhF0y8=HOr`D9Cz=0H}F2Q4Ei zb$lM{B_X?n!$55-y45;s_B@~H8#v|lU9Fk<>hJ)Fw2i4pxf}HY@W%_nGlqxH`8Pc_ zA;ROIoUSx;S(7!lFp_ij1kq7?g^`wF^R~PX)zuUNs=>LJ_;=AFu7Layl%v$UarW%l ztqKZeF6*=ARu;$gOiZ@D+e6{dQRD~Qa;NqC_wTioN~vxe2p49fF}&7z2DSiWB=3KFwlRIS@d=9)XNwa=jl4mGGxJnuqSmRR z#wS{PfxJ$Du)xqWMu;)V0!-|d8ygY1n?}f^ zo#Gtww~G_%lc3RG?|;6ouebMMY(nz=``n06SR_&GD7LZIJj>yxG)6=?5xLv^#igZU z-zzwN{rW}DhZ6^}{VR4HLKq|XNkk)7Tw66_udv+RWH%2F(qG?>WoUhRYQLxOiT9<1DO?K*3L>{$kH+>muKli0 zs_#?GFD{}RHNej!h!`{ z0_iSQ)THS5@87?)G}RED>{RB|d#!q8V@F4aTjLY0JmP_-n5Zb-tD75kyFGfn5#h%F z)-76vrHR9+bMJnX5;;BE#_H$ir>?Hf#Pj&2oXfB;Krifr1A$0gQ&TkW1HRs#uRn>+ zX{34n{P~U2=a`TNz2B86sA2NlmK{Z@`b8R(aL}|0^8>7HpGNSoHhAIBYjO%x^lfUw zNE9%Tie~-J_R}juo8(-!1rhWp4|8>SjO=KX3QpC}VB+Ns^`oM_9eT)67$1~@{B+&w z^0?2Ak`S=PWs|ksb4VO^l<)`@6c*OO^-W@q;L`8lMHU@J7f)_Uvhw4kc-ssow?X^D z1*Dqb+n>a%i=+17v*Kmfnp-W}Uh1=|fYrHyEMn`g4;<2DRjz6mcFjlVH zZUCY<&%RxzEwO}e(42zL00vh7;lqx+9lLh1AayOg#GgkNM;I06sxsTPbad)aSPKFG zsBUOz$ZR*JLv&JBQF#c|b5^2PTz_?CIqyP?#IGd{W4HL*R^tdB8+V?mvMl`b{4PSv z^l&3pTwI)S_X~aC#lC?zQLzWy^FNH885L=tk_qVJZM%afTGV57nCWlr#=BzVMDV&>qetz6Q0fz2t7c$0$QNpnnu zwU@j^>GP4p8>73(HCJ4jqe7YICUB2Y;TXug-8LV43cI}z1Ak|i*z-HXZ{|lKeZv)P z0)}Pb8I(dP6+6fc9Egfq#xyG8WT6V>A&a*BvmBMtxs{cQGIp)L*RQW3;VO7Ij!xc) zJ=puEjY!@PxbMP52*}+&hyix*Ma+6tbV3QTT6@Ywh7H$iVb zF)Qb4$vItzGuqkqmfscKt4$?n8V5fD$%3GqY6hSnfWW6RcW0NM&4EJ!*$-eQBuhY6 zP;vZ)U02yAaQ;fRwxS^IAAGSrQm)&KIxKQRr%RU(0bcHO=#WLtJ9hul>O~h9X}9|q zFC^XEI%STV&jbCIwPV^q57aM-3!M61uUkV+9T=Lj4WWhfW~lG+Ky*W<9Do%?R~KbK znUlB$50b6|c=j;dm0p4MQ4pLdsML1+i0Qe(X{L1PQvUEpD{B}BhwIq48`yw!3BPQf zfUaD>aVN3(XY4S{S*1>IGs;mU7C}fOd{MBY*H*SV0YA`I243GBW%vAV^Q%JOEXX2z zSQsbIjeub(G8{dA^yq<3k^-PQyqoy;?dwS8j<$9v(4TS*OydK96ZsipHKDsf#AY9V z{u0TGvf5UDN;qFT!{f)fzP+$Nk-?BqS6j<3F23H>)D&KU8EB}u#A7D2`c)qV1%WR3+qv3+yd89S{yLJ}FfrMPs^;)Eznehyv}wnikAcDy20& z1QhL%Y4I^XN0M1f4S8l~($B1n-Rp`FdoAA}ujETqAb zsug!FAYg5yp50dv(~Si-Iw*ApgdS3k-iSHi!j$GzEYKm;8Nao~y9%!2VdFU% zL$c=W79#x1W(BXmqL5>iVrigrs{k-hd(S_HEg7zxTuYeNK*F`tWmxyuQV6!AFtEyp zo)8qEwQ4AR#U+G=X>ux8niMVpbRDy}@9*y)-4tF7mlE{m{d;8u)8eVUQNUcJ z$PJk!6VDB{+J**3xG7d1|M$UZL_I&|nTdnrCcILko+ufXuHU$^738D~8-L~+EM}WV zbs)_-@+cBmYs@A5%DapU9FH2$eX6+X30_sn zg-z67JMA!_*UqzV+00&R$lRhP;=aI>2BF5L>k_OvjzWst{9w#{%;OF3aM2L4IE{SW z;e`q~$)@Z}h_a(2Qvi?+n@&o0{SEdj&mc?)-n@?m#PgvSInuyCuSu^BGU8QZqn^v= z1?~`4e|YC^6TKbtC)z-L z1;7pkpdkU%nB32_vU)xjMx*d&2F{0c#UOY$0!Te@Np+tdW`@-lvb3Yt29Ch0Q^|@$ zoJfC3M^8Wb`<e7Jv$c@Yg zFzaMk?%(}8H_ULt7=91D zf#B@{dla+026a{X5d)shn?IrEa9{pbbWF^x^z`(;A(V=5K*CU^%-&M&dF4G$>U0Sf zLC&!jlAFJ2*|zJ7j5SXYPf+Z7*0!1y-R4-id=q&V_@msDIae-SdI>B3lwlx3FOpT% zl%|scsg2N!XqPn*n^4QTj>hguHq}DKn1z)!D5>yVBPFzkeU#CMa$5S4`r$|u)!FE| z+%dIt=hCe%V1^!p7NqlWoO4?;cXX5lp=AOOl&r{qI}*Z0IL%GVQ=ln7lTM>f(%^4) zU;Te)_mx#@`xJcmcA<)k)fi>v+!x`7I5ganlQg=z5Xq_$`3bdTiOr#VfN-Ip+lmUGAtW?Pc`KrEdFBeOX{dP z^&>|}3!WIssZ2%$wbl~R23~DMs?sPWdOeNMbemgP(1auYsz7Pvpr@x7iE8XeZeCsq zxk#1fr>9Q*{_{s-auOD5Vpj?>gw?zCcGz!uL@gm9Vd3MW1rJ<~XB&G!wJC@&a5pIi zRR9<0MjN}01B2zMbvNNkIeo%xpC3p4iiPLRgN}}qZ(3Sfh8s4gQM@&T-@D}Oe8f&{ zTt&TB&iVU#M>R2lE5AAprl^L5$HuNDsfvrD3D5vq0*P32gU9tGQxOTXvbEqf3qp=q z1=#b}iQET(ZMa^ z$IJR*x1AWB4%Y`xN(OO=sV*3H)lNJR2-O2pep8qIkL<9i3{fR`4gZW}bGNL^Fcb7& zZa5DG>B(9;y8Lh2?g-Yv9Jh^LsJw+5dOc3ZWdok&lcR|X1n&o_*V6oyidqDZMkEsp z%QXO7)61p6KBP0xE;*{t@R9O?2pe|OkI#==pPi2y-eyHX*6)xCP9X3Fh4RzGj&NoV z(+k&Ckt8olM@Pr^iSpck{#baQ&H7>sd1p+k_3((*A}Ya_h`dlmOk$r->0T6)0n5~! zb&N5m>^FqRXvCKx$td{XIiUR;)}+1%rf>s=fOV$VvoQ%}0nb?awi6!jQJ>fe|L|)` zY#-uKcz8Hn_L;ObP*=UazK-?!st;l~nX>_dZkMJtlE6HHnj0cjNnqO>_3G(BF_pOd zxCZbV5NZ*HLfH*?+Zc}vr!R<#ioOJf_+a2{B_mF(txBR_o*rxG#Nk8;5>K{)&>`7b zEv;Zgy+Pc}MocJjS7kMKh=h5;7hOlDr{Tgz#t0_hy2dA_yC0>dBGsWJ#g;(geJ^*f zMny;80D?1JzPn!boLZ4K;9Vb84nXtR#m+x#_`4kap=&YL%Ei9 z42Idqja)WoMG3AOFPmcUo*(3F)O$-}K+@G+8dwX<5R_wh1C@MS=CFkXyawPi4N3DS zDj9B%Kj6-SRjvX-L4}m3@#2%8{)`G$U^12Kc50#|K~5*ssid0Lq8%!kYRFfP*g3np zejjI!vq1d{n%Y{>bTCxzXO~Bep~|-FEHRS0ux7Kohv5q`L5QkSpoaz=y@fi6$_o+@ zk9Jp9zLwd$cW;nglz3PRu}v2n4(d4pFNfW2Pf;%F@4V7&^x9?s1z?p*?`5mya%<$Q zz-MK5Zw0@kRPrMu?_!8S20UvX>OWq;--slqm^6dECh2iDHnxCJeRB{IRj7f;-uHhC zwwe;hOf@pA3zO-p7s^4P-ISq~zlmb}v8bBN!mOze=btKDtDEXQ*GubvYck1a#U0en@qNrj#;7)v z_V2y$Lj-D@lP>XeAbQu*(`P+%9){`=q?pvjK4sJ|v|Tpmo1+GhiF)FHWT=_%ckSNY zh{6O4WHiv>F!R(|A?ZRf*2}y0; zkhnwc=9ecXd6c;9fggk@Gw3+cLR3vqi!i#o{|*G{Wm6ybV;(w7$18#w6jx8Wtj|9P za<6_{t;ADT?G9qREat+Gn>R;)3BizYyK@^z^$0}Sc8Q%C9oD6t}f$XP~ zL!-Ayae7`}9(gY$VJdtAkPwwchXNlXuyAY;t+DgGvc}3j0GyC@{*H}mMJ2l-JU}b8 zWhBq~1J@cF8jGd5NeKS?9Z97JqCR7Lp(7_x&391heP529t^v(30Us2TrGs1y>Q`VH z5PBarg*_n~MvMZq(_SH$AjN=X3qP}x`;{UE$vVsy@41H`c;lFMATzNy#KQT!yOf!{M@UHM;n{b0Q6WOqSc7a* z+4|uZTPbi(@rpiXCO4rh3FejO!rpwjt6l@B0#kn-={V_KNM^Ob9r95U>qGL8<+zBq z9qz7FM6P5rWB;xVI$9}kf{jw@1gK0aV?frq%GE_hc$5?N_xJ7Fhl)5gYN+R*+Zzj` z=*!OIw}zZz>zJr0e=?uP5RUGDm0kdW*DXPNYV78(>}}W$VNd_<4aV{qkaiVOn~@Ll!Z7Bh8pL-SM8X894;G!bg-Dv{)5Dq9??E$?d@A*d=;7j8wQVS9c(F@|qkCfpV zsHrQZG~Q{I0ojO#hpM-M5NDzwPL{6OfV2BE%l^ z>ofc%sbLw3@G<@>Rahp-lWO;7_L z1PR29`j;G?-s3v*1vgPJ`wLDU_&^4qSY0Y1Co5}$Ito203=}m|QX*2d6GQ<`j8&KefxG-YpQX|Vz7JIL53FhL202i!C_F@ih-<=?sw5vKL8U9y)E9lu8SA`Vp7MXFj$8yyD`}eC`)Kpa!CKoERpcbAO4+OE9o1liO#*yU& z^CzD^>GpQBZaJ&yMyKQlN>y2nkDpuru_ikLB4M^>n*o5UDhdLD_7I$kKX=3eA~~`R zG*K2j3}Po)Ae=xcl&oODR(nx%3OvB>3d9aseZicZFC0<|9P~8tqwN|h%NugPn?*T=o{BTEftwdvcM)%+z0laYuR~d4?$;` zqPhW2tN!Mlnf<+B5@^~<#lVjr=YOeNQHv97+jj2Mby>rozZFcL*z@vdlvQ5y+vE;f;+o zRg_;m!4GFw*tc+U+T>;fwtf#)HhxL@AX3(AZYQEC0X>5Fsgh^!TXYiSzR+a^)PId0 zx>DVJtY$GS(t3Nufm~Dq(SAnyANz05{Gj|N339+-&_(9R>(2ghM9T-~8h(9QM#ivR zj=xh{Mj&oB^&b-_27>-Y4RAn^@)DsfQFg#*?Aspy!e2{4&_c?&j-GoHplsC-rGCvW z#?@7%`ed3^{RiU2+KxQ(&g%_PjRDlJ{sVK@UuYN{zWLoK>9kwJ~d~4)Eto;Rgtfm5YOx zp<>tysthf7Rgi}_=A2eUnUEj=%xQp|kJJj$<8GWWWfC*0ykz?r{*F&vKhm;(s3Fd^ z=04ol&m0lrw(ukE;@pHe9_RkjfHnYZW-=8<)bby>I?eE#yItZWa{v@_2TiwIfC;5Yk+1Z>46V&WC$~y5Sdi>nJTTmdvgfOHe zVN!Jv1qI)M1DnAQ4{~LJh9RYgna6S*&}Jm4i#>Dk$7i8u4xOY>80b-yLQ+zaR570M zj21O=n*V(^rS^!Hma>US?7lwc2tM?-scUInkBK=}Y?jk9G6^LF806!!o7yNji0Id^ z16hM4Kh6h1ys&~Y6WPiI9jU)we{oS!57>)ZJm6lc!yh+^1|$4T%GP4ssC_h`Kq5Of zK^~Jd^PqyQ`tKTSH_Y2sWES-3%mh(DHouVt7w|dnPL8xQVSUN2CC-^l ziA0qh(ESFSlkL|hfr!Hlp!uKbQY0oNg(2*mSy`G#4On`v1l;Usdtq1s{!lsuoly}H ze#`=@e4y1|-D0dGTh9=+?=BvC=z|OmBmvWI5h4B~Z&1O&T0k*+;`;?P=uuI9Ke3hF zlv{^l+k0ezsE+ve4Uw7Ay}gd1Cc*iV#ri`T5iKhKnF2 zgtD@if3jioSWo<^0)zy^0lBXo=J8oHtL1k?70XHT{H%YB0 zl+gsL&k!Pi8Gd{fEtN+}^%mO7I8fKP@tHZIn2m#jAFvwrWSwVFE%aj-(bz1*Lz|P- zCL&I=?Jur7z6AtZGI)nM$fU`n$r4YJ61QWO&?7_ONfXfjiy&Cz$#Vhj&b25Zm4;~H z=v&r}8_!K}HX@0S_^ZE1rjTxs7FzuWy)$=YTZ+XYW=IG02($-*D7@ni6b($|ON6yi zRupY{_{}H3un@h(X97o*Ku|%X($#bR!RNWTIfxcYU%vojAN4hwSSeGrA4v*| zrejH=Y**uN@ZYLo>+Y=Zk|I3lBOhHHY0j{m;3!9lrvBqc32zAv7E*hdm>7zJ;G?v( zei$xvxz%6}oMwI+fk%4%`t<|&ah>26G~AJ#7d?l#+o*F76u}r|0rivcRYt+nky4DP zR&IxqKHuoSQ=lIL!@^=9vfG+rn7PZR3x!X8EiJ9UezJO<-te(|3p#gbre?;wyB|rx ztWNx#MZwkba}jnXO&tuZQp2*Os7RgM%d)?m8{}<17XdUyy2zahv`kG+)x?Ynhb&gp zZrS*L0nqmT(mogvO&t%!AR3mg!=KQ50NW9^IrZ#ZMD@ihqpjw@i-sDK_R2b_s|RRU z0{XZ1#DYmiNt}hyc&x7hn~Xuh?#R`0mK$JRE0g{onAde-Q`>aW;Z0V-pu~OlUd6Y> zb?i1&ET-ExF~_|ETdrxp3U|}<>sKf=M0|2`T&Oia*WZtpe$+t_O4fl;ivnHhZ4oiW+V^+!N!I57)Bd7I7pyV zMC<3s__*W5G{9epMj?yqrAyb)S5p0FU|`@<_RTpRQr#|j=kqyf5W>4Xv=C~*+imn> zB(F5v_`-A%b~ggAWZqHqK?n)eJi1Jf2Riij>RH@3&e}82%K{H7?M7j%s!9WLJcPI4 zNrT_^5gFofB`vB8gJviClaKAH^^0zGw_s42Klba^edhIGC4S0n1JP>EzO*;2gqCdY}4bg0w{!hWEmAR;J(jPZY@ zzS!=8Z$JO%A`jBV-@I<_?xq9McZBj`&n8wKV0|CLqgZc=S=*!H3!HQNpMyM*_$E3n z&0Um5H$3`HaVo>(L>(di_GvVdqdG}8=im$4)%(NhR+eP%5yIC^kWehxT<|UoL#*7} zLCzpPNO~)vUmJ%MXrrso6dV$cI51uE!tIcn`YPq$Q)CxET+KC*Jy3C&;>}R?J1Cd% z@ln=fw1lGK77?99aqq5V6?&Wjuw6ppSKe%R(&7HWp`j_6E<;f>Dj>A~^XH7H+k=5O zq}7N--{6ftbe=^>X|+kB(eChAZ?Cyw8glnx7rB%L@|m;v39fU~mo#V$bdP1|*Zfxp z9BPx$4C`G*4j3#+fIT%OJK@^a8iW#HE`P5jbKm$lFS@FxrvGZ2qx~m`kJ6z)I@X@9 z4c#&ji0Ta4srL?=q+K3dJq9}R)R#fdhjc*}R~P*2FqZeb&0B?HaKE}OPfVMJL(%rM ztAr6=E-q>N;s6vMhfX2cO4*N2VjgJ8RcBF#<4A|Ze;QHj8dI)HQEt?78*mGZ>#5Hoicm_dZ{QfIX=iE{3BF`mRhhr(E zq@)lXCm`sN6jBQ%kmSSkb2f9}%*KiHIWf9-~jimRn_?vUs9Kykb?Vu{ov z!Dxw<1Kk(i21^PZK?;mk-N`9TuTMt z?h0JsTWP3yyxU$(dZUa~)JoMFne+5_cW?L}ZWUnss>Zh?@@Qc|?YXmo;ztEnn7$pC zUKDUv^4}`3(ZOl*ZF#q%dc_h`>5$X>pu570hT8Iu* I#;uJXN9DO){$7qM!Bn&a{kigz;2DdJx;aYm?=+UFMLqijX^p;OMI_97wcEGiC z!;xNqCGfboV0fTHVi610b|%`;q8NP@s& zebQ2bc3Na)WUX1)@{I$(>jf?qpS(%?8&q^gK|zxfPG;Kqw4lHMEXea-xtMo*%!U20 zE=d-mHdFK}B7&K0FS|KH5WW{dD()^@&XJzkthki`ud7o$+6zj{Yr}>Oo1Rjk{g|7J z>oefz`j#8luW#G8&;6w*D<%BY>pP5dDdpv-00TpMevwv;?s<1yFiF({m`{N^03&Ap&S9)+2cp;Xw{^<_tdy!goGcy7UJ6M#)gu+z^QNcN1kqG_dF1ZxprE7n%bqxx!1HO# zZXrTlA3eq>k#5-XsI>G1$Y;x-3EX7dq(?bwX2w^p6!v~YZ32CFp0i7x@>ISbtea4g z+ptAF5>>oul$B#M@!qV@pFJA}{@H7^Sj+9G<#}Q?kwPgFp-s!4X<%ypPC~+tusX{k z98R{BRM)QuwNu8CRhEa_yQni zK6&!K`I%BqOBSXsuQMHY=2KEqa_7z+tDg@&?te(d6|Qz1oT{Ku;yNXd=4hjvw0s&@ zuU^$uSJ(CNsm$;oh$pF)m8XFce~ygoHmZa=x6*iKxq+CNc*U5Nnri)4rgX*j{CPbG zho?Ah#xj$aAhOWY6^a}C^7*qxX4emwObmPZ)Te2_f#B1C&f*KQVF%ltk%s#E$xoh$ zH_Z@)Ni}$D{BBXAASI=TF*73t-qeJ~0y50!*ym0D=y?5v%FsLhg9M?~H{%f<9eviL zqEc|jsS?8^uit^)NwfP&=b;5Lc`A)ih}qX|+qdf-JV>#XylMAxGj=w%VR((*C8x}c zjZ;wpnO}CVr1F*aIB$-Q|5R&g^^~ABgWtdZL?BM(*aQ1K*f%xrGCiz^2k$9JezTLo zTW^<=YSc}5h(&M^#W6-_pV?i*aRX%RKjM4TfN6$ z!Gv(Q!Na~j3pnq%?J?3G4gC0xN7hLR5wrvpL)Ah^ zNQlwp%a@h3SM+@`QE*i0d3k#96dMdFv#PwjJcYa}V7Tpt3(Mbn8v=Z3d`oeEmxn)XZ5#6&>l$;- z%FovyX~~IsH>i&Zg~uG2bffgZ345vilWxslzouqpiWZ-g$VS5jwgiQHiO+%3&Znfl z3x6+-Vr=$loctlTEw>oAddb4d3#3J%+a$85`RoMJjL&Hl-&J%=TaT)qI;>Y#QPWY~_`E(f#Wg z8MD&T)bKIJfOKSH;((JbDQib&@P-;bh#gN7r^h{@CA^G=J!C=DIM&58?m70+M+TJR zj~zbj58s~!;ghQjV;WH8sY>swFFkRx%`sEcxJ1ui#d#di^xS$S^_6m7x5ocLR@Q~l zA&gs|>kpffy;oziG%KPpHa3Qk_`I-C$88zjnAVOf+9+624=X*nSN08rkb8hNzb-5+ zxR7n%GV@7a-wfStiwqBcke|Oxex})=z-MRoX88UJ=%|xk^-gFcH=_S7MQhp(JN_6WI78grcmHlH({IJ9~7P#!)*d;zwHt z2b^sc5wAUTatklvOI;10h}JZ0UT5#$F^~3DQtmWEqyZ6{0^ZUu!;2t}tYu*MiqqGU zZ{MbqpC5>tk_mO+KwQ})BV&v70aj#jiR2>DPDL3cYH zj(K^NAxFFu8(Y+q8ZTKy?CiQh&*?Hy&y4N&6RLtZ^6e&)cs)m@fEhG&ryjQE{*a?-_4@W7&fX=~fpeVCFsLmplS@#J|>48ZyHbKbIkFM6n|+<3#(@Hax` zd{)W;W3#?~HRk17L%gR)WI|nM4Ek}fk$NsJ&j6r@JWae$7*d?c4-IAb($X@5Ueg7f z%{L9%(>Z)qK-=g>+_-tu7GiU9?;nvYe+2Y+9-4$HdGRKW%S5alu54yz#@5b`6lY-b z2p6_zKYX~gxYL1m+Zv)Hrqdy&>4za?a`D<}iSFMwVPnBoA$mWGtG++JmF7JaJ0U#f zc7O|~|6D*<$j`B{gwG3$i^b7ceDi{~>EV>Hp8zdMpYMvBlJdR07qJpQxM!4rW(X%o z`bB0HI0CV?_|1fg0^jNR@$JmPHTW(bfN#Fk + + + + + + diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 88177e3eef..b00157266b 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -106,10 +106,7 @@ export const frontendToBackendParameters = ( } // inpainting exclusive parameters - if ( - ['inpainting', 'outpainting'].includes(generationMode) && - canvasImageLayerRef.current - ) { + if (generationMode === 'unifiedCanvas' && canvasImageLayerRef.current) { const { layerState: { objects }, boundingBoxCoordinates, @@ -146,44 +143,42 @@ export const frontendToBackendParameters = ( generationParameters.bounding_box = boundingBox; - if (generationMode === 'outpainting') { - const tempScale = canvasImageLayerRef.current.scale(); + const tempScale = canvasImageLayerRef.current.scale(); - canvasImageLayerRef.current.scale({ - x: 1 / stageScale, - y: 1 / stageScale, - }); + canvasImageLayerRef.current.scale({ + x: 1 / stageScale, + y: 1 / stageScale, + }); - const absPos = canvasImageLayerRef.current.getAbsolutePosition(); + const absPos = canvasImageLayerRef.current.getAbsolutePosition(); - const imageDataURL = canvasImageLayerRef.current.toDataURL({ - x: boundingBox.x + absPos.x, - y: boundingBox.y + absPos.y, - width: boundingBox.width, - height: boundingBox.height, - }); + const imageDataURL = canvasImageLayerRef.current.toDataURL({ + x: boundingBox.x + absPos.x, + y: boundingBox.y + absPos.y, + width: boundingBox.width, + height: boundingBox.height, + }); - if (enableImageDebugging) { - openBase64ImageInTab([ - { base64: maskDataURL, caption: 'mask sent as init_mask' }, - { base64: imageDataURL, caption: 'image sent as init_img' }, - ]); - } - - canvasImageLayerRef.current.scale(tempScale); - - generationParameters.init_img = imageDataURL; - - // TODO: The server metadata generation needs to be changed to fix this. - generationParameters.progress_images = false; - - generationParameters.seam_size = 96; - generationParameters.seam_blur = 16; - generationParameters.seam_strength = 0.7; - generationParameters.seam_steps = 10; - generationParameters.tile_size = 32; - generationParameters.force_outpaint = false; + if (enableImageDebugging) { + openBase64ImageInTab([ + { base64: maskDataURL, caption: 'mask sent as init_mask' }, + { base64: imageDataURL, caption: 'image sent as init_img' }, + ]); } + + canvasImageLayerRef.current.scale(tempScale); + + generationParameters.init_img = imageDataURL; + + // TODO: The server metadata generation needs to be changed to fix this. + generationParameters.progress_images = false; + + generationParameters.seam_size = 96; + generationParameters.seam_blur = 16; + generationParameters.seam_strength = 0.7; + generationParameters.seam_steps = 10; + generationParameters.tile_size = 32; + generationParameters.force_outpaint = false; } if (shouldGenerateVariations) { diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/IAICanvas.tsx index 2fd89162b6..1620b132ac 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/IAICanvas.tsx @@ -93,7 +93,6 @@ const selector = createSelector( stageDimensions, stageScale, tool, - isOnOutpaintingTab: activeTabName === 'outpainting', isStaging, shouldShowIntermediates, shouldLockToInitialImage, @@ -122,7 +121,6 @@ const IAICanvas = () => { stageDimensions, stageScale, tool, - isOnOutpaintingTab, isStaging, shouldShowIntermediates, shouldLockToInitialImage, @@ -207,11 +205,7 @@ const IAICanvas = () => { onDragEnd={handleDragEnd} onWheel={handleWheel} listening={(tool === 'move' || isStaging) && !isModifyingBoundingBox} - draggable={ - (tool === 'move' || isStaging) && - !isModifyingBoundingBox && - isOnOutpaintingTab - } + draggable={(tool === 'move' || isStaging) && !isModifyingBoundingBox} > @@ -243,7 +237,7 @@ const IAICanvas = () => { /> - {isOnOutpaintingTab && } +
diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx index dbd2609d6e..d0e0d736ae 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx @@ -18,7 +18,7 @@ import { import _ from 'lodash'; import IAICanvasMaskColorPicker from './IAICanvasMaskControls/IAICanvasMaskColorPicker'; -const inpaintingBrushSelector = createSelector( +const selector = createSelector( [canvasSelector, activeTabNameSelector], (canvas, activeTabName) => { const { tool, brushSize } = canvas; @@ -38,9 +38,7 @@ const inpaintingBrushSelector = createSelector( export default function IAICanvasBrushControl() { const dispatch = useAppDispatch(); - const { tool, brushSize, activeTabName } = useAppSelector( - inpaintingBrushSelector - ); + const { tool, brushSize, activeTabName } = useAppSelector(selector); const handleSelectBrushTool = () => dispatch(setTool('brush')); diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx deleted file mode 100644 index af04cc35f7..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasClearImageControl.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { FaTrash } from 'react-icons/fa'; -import { useAppDispatch } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { clearImageToInpaint } from 'features/canvas/canvasSlice'; - -export default function IAICanvasClearImageControl() { - const dispatch = useAppDispatch(); - - const handleClearImage = () => { - dispatch(clearImageToInpaint()); - }; - - return ( - } - onClick={handleClearImage} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx index 5bc2c36201..f54b8bf08f 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx +++ b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx @@ -40,7 +40,7 @@ export default function IAICanvasMaskVisibilityControl() { handleToggleShouldShowMask(); }, { - enabled: activeTabName === 'inpainting' || activeTabName == 'outpainting', + enabled: activeTabName === 'unifiedCanvas', }, [activeTabName, isMaskEnabled] ); diff --git a/frontend/src/features/canvas/IAICanvasEraserLines.tsx b/frontend/src/features/canvas/IAICanvasEraserLines.tsx deleted file mode 100644 index 9513ac0fef..0000000000 --- a/frontend/src/features/canvas/IAICanvasEraserLines.tsx +++ /dev/null @@ -1,49 +0,0 @@ -// import { GroupConfig } from 'konva/lib/Group'; -// import { Group, Line } from 'react-konva'; -// import { RootState, useAppSelector } from 'app/store'; -// import { createSelector } from '@reduxjs/toolkit'; -// import { OutpaintingCanvasState } from './canvasSlice'; - -// export const canvasEraserLinesSelector = createSelector( -// (state: RootState) => state.canvas.outpainting, -// (outpainting: OutpaintingCanvasState) => { -// const { eraserLines } = outpainting; -// return { -// eraserLines, -// }; -// } -// ); - -// type IAICanvasEraserLinesProps = GroupConfig; - -// /** -// * Draws the lines which comprise the mask. -// * -// * Uses globalCompositeOperation to handle the brush and eraser tools. -// */ -// const IAICanvasEraserLines = (props: IAICanvasEraserLinesProps) => { -// const { ...rest } = props; -// const { eraserLines } = useAppSelector(canvasEraserLinesSelector); - -// return ( -// -// {eraserLines.map((line, i) => ( -// 0 -// strokeWidth={line.strokeWidth * 2} -// tension={0} -// lineCap="round" -// lineJoin="round" -// shadowForStrokeEnabled={false} -// listening={false} -// globalCompositeOperation={'source-over'} -// /> -// ))} -// -// ); -// }; - -// export default IAICanvasEraserLines; -export default {} \ No newline at end of file diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/IAICanvasResizer.tsx index 483bc47abc..28bc02c5b1 100644 --- a/frontend/src/features/canvas/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/IAICanvasResizer.tsx @@ -52,9 +52,6 @@ const IAICanvasResizer = () => { if (!initialCanvasImage?.image) return; - const { width: imageWidth, height: imageHeight } = - initialCanvasImage.image; - dispatch( setCanvasContainerDimensions({ width: clientWidth, @@ -69,34 +66,6 @@ const IAICanvasResizer = () => { } dispatch(setDoesCanvasNeedScaling(false)); - // } - // if ((activeTabName === 'inpainting') && initialCanvasImage?.image) { - // const { width: imageWidth, height: imageHeight } = - // initialCanvasImage.image; - - // const scale = Math.min( - // 1, - // Math.min(clientWidth / imageWidth, clientHeight / imageHeight) - // ); - - // dispatch(setStageScale(scale)); - - // dispatch( - // setStageDimensions({ - // width: Math.floor(imageWidth * scale), - // height: Math.floor(imageHeight * scale), - // }) - // ); - // dispatch(setDoesCanvasNeedScaling(false)); - // } else if (activeTabName === 'outpainting') { - // dispatch( - // setStageDimensions({ - // width: Math.floor(clientWidth), - // height: Math.floor(clientHeight), - // }) - // ); - // dispatch(setDoesCanvasNeedScaling(false)); - // } }, 0); }, [ dispatch, @@ -104,6 +73,7 @@ const IAICanvasResizer = () => { doesCanvasNeedScaling, activeTabName, isCanvasInitialized, + shouldLockToInitialImage, ]); return ( diff --git a/frontend/src/features/canvas/canvasReducers.ts b/frontend/src/features/canvas/canvasReducers.ts index e70bfddb55..bff50eebc4 100644 --- a/frontend/src/features/canvas/canvasReducers.ts +++ b/frontend/src/features/canvas/canvasReducers.ts @@ -6,7 +6,7 @@ import { } from 'common/util/roundDownToMultiple'; import _ from 'lodash'; -export const setInitialCanvasImage = ( +export const setInitialCanvasImage_reducer = ( state: CanvasState, image: InvokeAI.Image ) => { diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index 13f8f5ae14..8e86b7c8c2 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -8,13 +8,11 @@ import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import { RootState } from 'app/store'; import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; import { uploadImage } from 'features/gallery/util/uploadImage'; -import { setInitialCanvasImage } from './canvasReducers'; +import { setInitialCanvasImage_reducer } from './canvasReducers'; import calculateScale from './util/calculateScale'; import calculateCoordinates from './util/calculateCoordinates'; import floorCoordinates from './util/floorCoordinates'; -export type CanvasMode = 'inpainting' | 'outpainting'; - export type CanvasLayer = 'base' | 'mask'; export type CanvasDrawingTool = 'brush' | 'eraser'; @@ -256,15 +254,8 @@ export const canvasSlice = createSlice({ setCursorPosition: (state, action: PayloadAction) => { state.cursorPosition = action.payload; }, - clearImageToInpaint: (state) => { - // TODO - // state.inpainting.imageToInpaint = undefined; - }, - setImageToOutpaint: (state, action: PayloadAction) => { - setInitialCanvasImage(state, action.payload); - }, - setImageToInpaint: (state, action: PayloadAction) => { - setInitialCanvasImage(state, action.payload); + setInitialCanvasImage: (state, action: PayloadAction) => { + setInitialCanvasImage_reducer(state, action.payload); }, setStageDimensions: (state, action: PayloadAction) => { state.stageDimensions = action.payload; @@ -642,10 +633,8 @@ export const canvasSlice = createSlice({ if (kind !== 'init') return; - if (activeTabName === 'inpainting') { - setInitialCanvasImage(state, image); - } else if (activeTabName === 'outpainting') { - setInitialCanvasImage(state, image); + if (activeTabName === 'unifiedCanvas') { + setInitialCanvasImage_reducer(state, image); } }); }, @@ -665,13 +654,11 @@ export const { setShouldShowBrushPreview, setMaskColor, clearMask, - clearImageToInpaint, undo, redo, setCursorPosition, setStageDimensions, - setImageToInpaint, - setImageToOutpaint, + setInitialCanvasImage, setBoundingBoxDimensions, setBoundingBoxCoordinates, setBoundingBoxPreviewFill, diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index dcb7265b85..870c8b0ffb 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -13,7 +13,7 @@ import { canvasSelector } from '../canvasSlice'; import { useRef } from 'react'; import { stageRef } from '../IAICanvas'; -const inpaintingCanvasHotkeysSelector = createSelector( +const selector = createSelector( [canvasSelector, activeTabNameSelector], (canvas, activeTabName) => { const { @@ -40,9 +40,8 @@ const inpaintingCanvasHotkeysSelector = createSelector( const useInpaintingCanvasHotkeys = () => { const dispatch = useAppDispatch(); - const { activeTabName, shouldShowBoundingBox, tool } = useAppSelector( - inpaintingCanvasHotkeysSelector - ); + const { activeTabName, shouldShowBoundingBox, tool } = + useAppSelector(selector); const previousToolRef = useRef(null); // Toggle lock bounding box diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts index 1674b6663c..7f8ac5a50c 100644 --- a/frontend/src/features/canvas/hooks/useCanvasZoom.ts +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -60,12 +60,7 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { return useCallback( (e: KonvaEventObject) => { // stop default scrolling - if ( - activeTabName !== 'outpainting' || - !stageRef.current || - isMoveStageKeyHeld || - !initialCanvasImage - ) + if (!stageRef.current || isMoveStageKeyHeld || !initialCanvasImage) return; e.evt.preventDefault(); diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index 426c8674c1..c84f7252c0 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -36,9 +36,9 @@ import { FaTrash, } from 'react-icons/fa'; import { - setImageToInpaint, setDoesCanvasNeedScaling, - setImageToOutpaint, + setInitialCanvasImage, + setShouldLockToInitialImage, } from 'features/canvas/canvasSlice'; import { GalleryState } from './gallerySlice'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; @@ -320,12 +320,12 @@ const CurrentImageButtons = () => { if (!currentImage) return; if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setImageToInpaint(currentImage)); - dispatch(setActiveTab('inpainting')); + dispatch(setInitialCanvasImage(currentImage)); + dispatch(setShouldLockToInitialImage(true)); dispatch(setDoesCanvasNeedScaling(true)); toast({ - title: 'Sent to Inpainting', + title: 'Sent to Unified Canvas', status: 'success', duration: 2500, isClosable: true, @@ -336,12 +336,12 @@ const CurrentImageButtons = () => { if (!currentImage) return; if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setImageToOutpaint(currentImage)); - dispatch(setActiveTab('outpainting')); + dispatch(setInitialCanvasImage(currentImage)); + dispatch(setShouldLockToInitialImage(false)); dispatch(setDoesCanvasNeedScaling(true)); toast({ - title: 'Sent to Inpainting', + title: 'Sent to Unified Canvas', status: 'success', duration: 2500, isClosable: true, diff --git a/frontend/src/features/gallery/HoverableImage.tsx b/frontend/src/features/gallery/HoverableImage.tsx index d7896ce367..11763fb85f 100644 --- a/frontend/src/features/gallery/HoverableImage.tsx +++ b/frontend/src/features/gallery/HoverableImage.tsx @@ -23,8 +23,9 @@ import { import * as InvokeAI from 'app/invokeai'; import * as ContextMenu from '@radix-ui/react-context-menu'; import { - setImageToInpaint, - setImageToOutpaint, + setDoesCanvasNeedScaling, + setInitialCanvasImage, + setShouldLockToInitialImage, } from 'features/canvas/canvasSlice'; import { hoverableImageSelector } from './gallerySliceSelectors'; @@ -97,10 +98,15 @@ const HoverableImage = memo((props: HoverableImageProps) => { const handleSendToInpainting = () => { if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setImageToInpaint(image)); - if (activeTabName !== 'inpainting') { - dispatch(setActiveTab('inpainting')); + + dispatch(setInitialCanvasImage(image)); + dispatch(setShouldLockToInitialImage(true)); + dispatch(setDoesCanvasNeedScaling(true)); + + if (activeTabName !== 'unifiedCanvas') { + dispatch(setActiveTab('unifiedCanvas')); } + toast({ title: 'Sent to Inpainting', status: 'success', @@ -111,10 +117,15 @@ const HoverableImage = memo((props: HoverableImageProps) => { const handleSendToOutpainting = () => { if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setImageToOutpaint(image)); - if (activeTabName !== 'outpainting') { - dispatch(setActiveTab('outpainting')); + + dispatch(setInitialCanvasImage(image)); + dispatch(setShouldLockToInitialImage(true)); + dispatch(setDoesCanvasNeedScaling(true)); + + if (activeTabName !== 'unifiedCanvas') { + dispatch(setActiveTab('unifiedCanvas')); } + toast({ title: 'Sent to Outpainting', status: 'success', diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index 321f62325d..41c549132d 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -76,7 +76,7 @@ export default function ImageGallery() { return; } - if (activeTabName === 'inpainting' || activeTabName === 'outpainting') { + if (activeTabName === 'unifiedCanvas') { dispatch(setGalleryWidth(190)); setGalleryMinWidth(190); setGalleryMaxWidth(190); diff --git a/frontend/src/features/options/MainOptions/MainHeight.tsx b/frontend/src/features/options/MainOptions/MainHeight.tsx index 61ba0eb25c..c5dc0d28ac 100644 --- a/frontend/src/features/options/MainOptions/MainHeight.tsx +++ b/frontend/src/features/options/MainOptions/MainHeight.tsx @@ -15,7 +15,7 @@ export default function MainHeight() { return ( - {renderHotkeyModalItems(inpaintingHotkeys)} - - - - - -

Outpainting Hotkeys

- -
- - {renderHotkeyModalItems(outpaintingHotkeys)} + {renderHotkeyModalItems(unifiedCanvasHotkeys)}
diff --git a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx deleted file mode 100644 index 0e8afb8888..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import IAICanvasControls from 'features/canvas/IAICanvasControls'; -import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; -import _ from 'lodash'; -import { useLayoutEffect } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import ImageUploadButton from 'common/components/ImageUploaderButton'; -import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; -import { OptionsState } from 'features/options/optionsSlice'; -import { - initialCanvasImageSelector, - CanvasState, - setDoesCanvasNeedScaling, -} from 'features/canvas/canvasSlice'; -import IAICanvas from 'features/canvas/IAICanvas'; - -const inpaintingDisplaySelector = createSelector( - [ - initialCanvasImageSelector, - (state: RootState) => state.canvas, - (state: RootState) => state.options, - ], - (initialCanvasImage, canvas: CanvasState, options: OptionsState) => { - const { doesCanvasNeedScaling } = canvas; - const { showDualDisplay } = options; - return { - doesCanvasNeedScaling, - showDualDisplay, - initialCanvasImage, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -const InpaintingDisplay = () => { - const dispatch = useAppDispatch(); - const { showDualDisplay, doesCanvasNeedScaling, initialCanvasImage } = - useAppSelector(inpaintingDisplaySelector); - - useLayoutEffect(() => { - const resizeCallback = _.debounce( - () => dispatch(setDoesCanvasNeedScaling(true)), - 250 - ); - window.addEventListener('resize', resizeCallback); - return () => window.removeEventListener('resize', resizeCallback); - }, [dispatch]); - - const inpaintingComponent = initialCanvasImage ? ( -
- -
- {doesCanvasNeedScaling ? : } -
-
- ) : ( - - ); - - return ( -
-
{inpaintingComponent}
- {showDualDisplay && ( -
- -
- )} -
- ); -}; - -export default InpaintingDisplay; diff --git a/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx b/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx deleted file mode 100644 index fc2500428e..0000000000 --- a/frontend/src/features/tabs/Inpainting/InpaintingPanel.tsx +++ /dev/null @@ -1,65 +0,0 @@ -// import { Feature } from 'app/features'; -import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; -import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import ImageToImageStrength from 'features/options/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import InpaintingSettings from 'features/options/AdvancedOptions/Inpainting/InpaintingSettings'; -import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from 'features/options/MainOptions/MainOptions'; -import OptionsAccordion from 'features/options/OptionsAccordion'; -import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; -import PromptInput from 'features/options/PromptInput/PromptInput'; -import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; - -export default function InpaintingPanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - - const imageToImageAccordions = { - seed: { - header: , - feature: Feature.SEED, - options: , - }, - variations: { - header: , - feature: Feature.VARIATIONS, - options: , - }, - face_restore: { - header: , - feature: Feature.FACE_CORRECTION, - options: , - }, - upscale: { - header: , - feature: Feature.UPSCALE, - options: , - }, - }; - - return ( - - - - - - - - {showAdvancedOptions && ( - - )} - - ); -} diff --git a/frontend/src/features/tabs/InvokeTabs.tsx b/frontend/src/features/tabs/InvokeTabs.tsx index 518a542958..6b17c007e8 100644 --- a/frontend/src/features/tabs/InvokeTabs.tsx +++ b/frontend/src/features/tabs/InvokeTabs.tsx @@ -17,12 +17,12 @@ import { setShouldShowOptionsPanel, } from 'features/options/optionsSlice'; import ImageToImageWorkarea from './ImageToImage'; -import InpaintingWorkarea from './Inpainting/InpaintingWorkarea'; import TextToImageWorkarea from './TextToImage'; import Lightbox from 'features/lightbox/Lightbox'; import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; -import OutpaintingWorkarea from './Outpainting/OutpaintingWorkarea'; +import UnifiedCanvasWorkarea from './UnifiedCanvas/UnifiedCanvasWorkarea'; import { setShouldShowGallery } from 'features/gallery/gallerySlice'; +import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; export const tabDict = { txt2img: { @@ -35,15 +35,10 @@ export const tabDict = { workarea: , tooltip: 'Image To Image', }, - inpainting: { - title: , - workarea: , - tooltip: 'Inpainting', - }, - outpainting: { - title: , - workarea: , - tooltip: 'Outpainting', + unifiedCanvas: { + title: , + workarea: , + tooltip: 'Unified Canvas', }, nodes: { title: , diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx deleted file mode 100644 index 02d689de52..0000000000 --- a/frontend/src/features/tabs/Outpainting/OutpaintingWorkarea.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import OutpaintingPanel from './OutpaintingPanel'; -import OutpaintingDisplay from './OutpaintingDisplay'; -import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; -import { useAppDispatch } from 'app/store'; -import { useEffect } from 'react'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; - -export default function OutpaintingWorkarea() { - const dispatch = useAppDispatch(); - useEffect(() => { - dispatch(setDoesCanvasNeedScaling(true)); - }, [dispatch]); - return ( - } - styleClass="inpainting-workarea-overrides" - > - - - ); -} diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx similarity index 71% rename from frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx rename to frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx index 186abe0328..ad8cb8634b 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx +++ b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx @@ -12,7 +12,7 @@ import { import IAICanvas from 'features/canvas/IAICanvas'; import IAICanvasOutpaintingControls from 'features/canvas/IAICanvasOutpaintingControls'; -const outpaintingDisplaySelector = createSelector( +const selector = createSelector( [canvasSelector], (canvas) => { const { @@ -31,11 +31,10 @@ const outpaintingDisplaySelector = createSelector( } ); -const OutpaintingDisplay = () => { +const UnifiedCanvasDisplay = () => { const dispatch = useAppDispatch(); - const { doesCanvasNeedScaling, doesOutpaintingHaveObjects } = useAppSelector( - outpaintingDisplaySelector - ); + const { doesCanvasNeedScaling, doesOutpaintingHaveObjects } = + useAppSelector(selector); useLayoutEffect(() => { const resizeCallback = _.debounce( @@ -46,17 +45,6 @@ const OutpaintingDisplay = () => { return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); - const outpaintingComponent = doesOutpaintingHaveObjects ? ( -
- -
- {doesCanvasNeedScaling ? : } -
-
- ) : ( - - ); - return (
@@ -67,9 +55,8 @@ const OutpaintingDisplay = () => {
- {/*
{outpaintingComponent}
*/}
); }; -export default OutpaintingDisplay; +export default UnifiedCanvasDisplay; diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx similarity index 98% rename from frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx rename to frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx index 5428a923f2..d5ca42137f 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingPanel.tsx +++ b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -18,7 +18,7 @@ import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; import PromptInput from 'features/options/PromptInput/PromptInput'; import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; -export default function OutpaintingPanel() { +export default function UnifiedCanvasPanel() { const showAdvancedOptions = useAppSelector( (state: RootState) => state.options.showAdvancedOptions ); diff --git a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx similarity index 65% rename from frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx rename to frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx index cb9dba07d5..0e03a3b118 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingWorkarea.tsx +++ b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx @@ -1,21 +1,21 @@ -import InpaintingPanel from './InpaintingPanel'; -import InpaintingDisplay from './InpaintingDisplay'; +import UnifiedCanvasPanel from './UnifiedCanvasPanel'; +import UnifiedCanvasDisplay from './UnifiedCanvasDisplay'; import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; import { useAppDispatch } from 'app/store'; import { useEffect } from 'react'; import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; -export default function InpaintingWorkarea() { +export default function UnifiedCanvasWorkarea() { const dispatch = useAppDispatch(); useEffect(() => { dispatch(setDoesCanvasNeedScaling(true)); }, [dispatch]); return ( } + optionsPanel={} styleClass="inpainting-workarea-overrides" > - + ); } From 48ad0c289c770b95551b4bfd27da9aa4a0e22b4d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:56:18 +1100 Subject: [PATCH 063/220] Rebases on dev, updates new env files w/ patchmatch --- environment-AMD.yml | 46 ------------------- .../environment-lin-aarch64.yml | 1 + .../environment-lin-amd.yml | 1 + .../environment-lin-cuda.yml | 1 + .../environment-mac.yml | 1 + .../environment-win-cuda.yml | 1 + .../requirements-base.txt | 1 + frontend/src/features/gallery/gallerySlice.ts | 2 - 8 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 environment-AMD.yml diff --git a/environment-AMD.yml b/environment-AMD.yml deleted file mode 100644 index 5a0e46998d..0000000000 --- a/environment-AMD.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: invokeai -channels: - - pytorch - - conda-forge - - defaults -dependencies: - - python>=3.9 - - pip=22.2.2 - - numpy=1.23.3 - - pip: - - --extra-index-url https://download.pytorch.org/whl/rocm5.2/ - - albumentations==0.4.3 - - dependency_injector==4.40.0 - - diffusers==0.6.0 - - einops==0.3.0 - - eventlet - - flask==2.1.3 - - flask_cors==3.0.10 - - flask_socketio==5.3.0 - - getpass_asterisk - - imageio-ffmpeg==0.4.2 - - imageio==2.9.0 - - kornia==0.6.0 - - omegaconf==2.2.3 - - opencv-python==4.5.5.64 - - pillow==9.2.0 - - pudb==2019.2 - - pyreadline3 - - pytorch-lightning==1.7.7 - - send2trash==1.8.0 - - streamlit==1.12.0 - - taming-transformers-rom1504 - - test-tube>=0.7.5 - - torch - - torch-fidelity==0.3.0 - - torchaudio - - torchmetrics==0.7.0 - - torchvision - - transformers==4.21.3 - - git+https://github.com/openai/CLIP.git@main#egg=clip - - git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion - - git+https://github.com/invoke-ai/Real-ESRGAN.git#egg=realesrgan - - git+https://github.com/invoke-ai/GFPGAN.git#egg=gfpgan - - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg - - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - - -e . diff --git a/environments-and-requirements/environment-lin-aarch64.yml b/environments-and-requirements/environment-lin-aarch64.yml index 4472c2fff7..5500d4cb6c 100644 --- a/environments-and-requirements/environment-lin-aarch64.yml +++ b/environments-and-requirements/environment-lin-aarch64.yml @@ -42,4 +42,5 @@ dependencies: - git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg - git+https://github.com/invoke-ai/GFPGAN#egg=gfpgan + - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - -e . diff --git a/environments-and-requirements/environment-lin-amd.yml b/environments-and-requirements/environment-lin-amd.yml index 8388a84206..69de31aa19 100644 --- a/environments-and-requirements/environment-lin-amd.yml +++ b/environments-and-requirements/environment-lin-amd.yml @@ -44,4 +44,5 @@ dependencies: - git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg - git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan + - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - -e . diff --git a/environments-and-requirements/environment-lin-cuda.yml b/environments-and-requirements/environment-lin-cuda.yml index 895515d43a..d214ea519e 100644 --- a/environments-and-requirements/environment-lin-cuda.yml +++ b/environments-and-requirements/environment-lin-cuda.yml @@ -43,4 +43,5 @@ dependencies: - git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg - git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan + - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - -e . diff --git a/environments-and-requirements/environment-mac.yml b/environments-and-requirements/environment-mac.yml index 9bf8e27952..67489cbc09 100644 --- a/environments-and-requirements/environment-mac.yml +++ b/environments-and-requirements/environment-mac.yml @@ -59,6 +59,7 @@ dependencies: - git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg - git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan + - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - -e . variables: PYTORCH_ENABLE_MPS_FALLBACK: 1 diff --git a/environments-and-requirements/environment-win-cuda.yml b/environments-and-requirements/environment-win-cuda.yml index d42aa62a3d..9b43a30540 100644 --- a/environments-and-requirements/environment-win-cuda.yml +++ b/environments-and-requirements/environment-win-cuda.yml @@ -44,4 +44,5 @@ dependencies: - git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion - git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg - git+https://github.com/invoke-ai/GFPGAN#egg=gfpgan + - git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch - -e . diff --git a/environments-and-requirements/requirements-base.txt b/environments-and-requirements/requirements-base.txt index a59cdee138..19aa0ab66b 100644 --- a/environments-and-requirements/requirements-base.txt +++ b/environments-and-requirements/requirements-base.txt @@ -36,3 +36,4 @@ git+https://github.com/openai/CLIP.git@main#egg=clip git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan +git+https://github.com/invoke-ai/PyPatchMatch@0.1.1#egg=pypatchmatch \ No newline at end of file diff --git a/frontend/src/features/gallery/gallerySlice.ts b/frontend/src/features/gallery/gallerySlice.ts index 0b6c487c17..7d397401ae 100644 --- a/frontend/src/features/gallery/gallerySlice.ts +++ b/frontend/src/features/gallery/gallerySlice.ts @@ -6,8 +6,6 @@ import { IRect } from 'konva/lib/types'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; import { uploadImage } from './util/uploadImage'; -import { setInitialImage } from 'features/options/optionsSlice'; -import { setImageToInpaint } from 'features/canvas/canvasSlice'; export type GalleryCategory = 'user' | 'result'; From 827f516baf6cf936cf6d2f971c6cfd68d8c3cba7 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:25:50 +1100 Subject: [PATCH 064/220] Organises features/canvas --- .../src/app/selectors/readinessSelector.ts | 2 +- frontend/src/app/socketio/emitters.ts | 6 +- frontend/src/app/socketio/listeners.ts | 2 +- frontend/src/app/store.ts | 2 +- .../src/common/util/parameterTranslation.ts | 4 +- .../src/features/canvas/IAICanvasControls.tsx | 63 ------ .../IAICanvasBrushControl.tsx | 134 ------------- .../IAICanvasEraserControl.tsx | 61 ------ .../IAICanvasImageEraserControl.tsx | 60 ------ .../IAICanvasLockBoundingBoxControl.tsx | 46 ----- .../IAICanvasMaskControl.tsx | 38 ---- .../IAICanvasBrushColorPicker.tsx | 71 ------- .../IAICanvasMaskClear.tsx | 76 ------- .../IAICanvasMaskColorPicker.tsx | 91 --------- .../IAICanvasMaskInvertControl.tsx | 69 ------- .../IAICanvasMaskVisibilityControl.tsx | 56 ------ .../IAICanvasShowHideBoundingBoxControl.tsx | 45 ----- .../IAICanvasSplitLayoutControl.tsx | 38 ---- .../canvas/{ => components}/IAICanvas.tsx | 27 ++- .../IAICanvasBrushPreview.tsx | 4 +- .../canvas/{ => components}/IAICanvasGrid.tsx | 2 +- .../{ => components}/IAICanvasImage.tsx | 0 .../IAICanvasIntermediateImage.tsx | 0 .../IAICanvasMaskCompositer.tsx | 4 +- .../{ => components}/IAICanvasMaskLines.tsx | 3 +- .../IAICanvasObjectRenderer.tsx | 9 +- .../{ => components}/IAICanvasResizer.tsx | 5 +- .../{ => components}/IAICanvasStagingArea.tsx | 6 +- .../IAICanvasStagingAreaToolbar.tsx | 4 +- .../{ => components}/IAICanvasStatusText.tsx | 2 +- .../IAICanvasBoundingBox.tsx | 6 +- .../IAICanvasBrushButtonPopover.tsx | 9 +- .../IAICanvasEraserButtonPopover.tsx | 5 +- .../IAICanvasMaskButtonPopover.tsx | 4 +- .../IAICanvasToolbar}/IAICanvasRedoButton.tsx | 3 +- .../IAICanvasSettingsButtonPopover.tsx | 4 +- .../IAICanvasToolbar/IAICanvasToolbar.tsx} | 13 +- .../IAICanvasToolbar}/IAICanvasUndoButton.tsx | 3 +- .../canvas/hooks/useCanvasDragMove.ts | 5 +- .../features/canvas/hooks/useCanvasHotkeys.ts | 8 +- .../canvas/hooks/useCanvasMouseDown.ts | 5 +- .../canvas/hooks/useCanvasMouseEnter.ts | 5 +- .../canvas/hooks/useCanvasMouseMove.ts | 5 +- .../canvas/hooks/useCanvasMouseOut.ts | 2 +- .../features/canvas/hooks/useCanvasMouseUp.ts | 5 +- .../features/canvas/hooks/useCanvasZoom.ts | 7 +- .../canvasExtraReducers.ts} | 42 +++- .../features/canvas/store/canvasSelectors.ts | 15 ++ .../canvas/{ => store}/canvasSlice.ts | 187 ++---------------- .../src/features/canvas/store/canvasTypes.ts | 115 +++++++++++ .../src/features/canvas/util/generateMask.ts | 2 +- .../features/gallery/CurrentImageButtons.tsx | 2 +- .../src/features/gallery/HoverableImage.tsx | 2 +- .../src/features/gallery/ImageGallery.tsx | 2 +- .../BoundingBoxDarkenOutside.tsx | 6 +- .../BoundingBoxDimensionSlider.tsx | 10 +- .../BoundingBoxSettings/BoundingBoxLock.tsx | 10 +- .../BoundingBoxVisibility.tsx | 10 +- .../Inpainting/ClearBrushHistory.tsx | 10 +- .../Inpainting/InpaintReplace.tsx | 10 +- .../features/tabs/FloatingGalleryButton.tsx | 2 +- .../tabs/FloatingOptionsPanelButtons.tsx | 2 +- .../src/features/tabs/InvokeOptionsPanel.tsx | 2 +- frontend/src/features/tabs/InvokeTabs.tsx | 2 +- frontend/src/features/tabs/InvokeWorkarea.tsx | 2 +- .../{ => UnifiedCanvas}/CanvasWorkarea.scss | 2 +- .../UnifiedCanvas/UnifiedCanvasDisplay.tsx | 13 +- .../UnifiedCanvas/UnifiedCanvasWorkarea.tsx | 2 +- frontend/src/styles/index.scss | 2 +- 69 files changed, 304 insertions(+), 1167 deletions(-) delete mode 100644 frontend/src/features/canvas/IAICanvasControls.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx delete mode 100644 frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx rename frontend/src/features/canvas/{ => components}/IAICanvas.tsx (91%) rename frontend/src/features/canvas/{ => components}/IAICanvasBrushPreview.tsx (95%) rename frontend/src/features/canvas/{ => components}/IAICanvasGrid.tsx (97%) rename frontend/src/features/canvas/{ => components}/IAICanvasImage.tsx (100%) rename frontend/src/features/canvas/{ => components}/IAICanvasIntermediateImage.tsx (100%) rename frontend/src/features/canvas/{ => components}/IAICanvasMaskCompositer.tsx (97%) rename frontend/src/features/canvas/{ => components}/IAICanvasMaskLines.tsx (91%) rename frontend/src/features/canvas/{ => components}/IAICanvasObjectRenderer.tsx (87%) rename frontend/src/features/canvas/{ => components}/IAICanvasResizer.tsx (93%) rename frontend/src/features/canvas/{ => components}/IAICanvasStagingArea.tsx (92%) rename frontend/src/features/canvas/{ => components}/IAICanvasStagingAreaToolbar.tsx (97%) rename frontend/src/features/canvas/{ => components}/IAICanvasStatusText.tsx (95%) rename frontend/src/features/canvas/{ => components/IAICanvasToolbar}/IAICanvasBoundingBox.tsx (99%) rename frontend/src/features/canvas/{ => components/IAICanvasToolbar}/IAICanvasBrushButtonPopover.tsx (91%) rename frontend/src/features/canvas/{ => components/IAICanvasToolbar}/IAICanvasEraserButtonPopover.tsx (93%) rename frontend/src/features/canvas/{ => components/IAICanvasToolbar}/IAICanvasMaskButtonPopover.tsx (95%) rename frontend/src/features/canvas/{IAICanvasControls => components/IAICanvasToolbar}/IAICanvasRedoButton.tsx (90%) rename frontend/src/features/canvas/{ => components/IAICanvasToolbar}/IAICanvasSettingsButtonPopover.tsx (95%) rename frontend/src/features/canvas/{IAICanvasOutpaintingControls.tsx => components/IAICanvasToolbar/IAICanvasToolbar.tsx} (91%) rename frontend/src/features/canvas/{IAICanvasControls => components/IAICanvasToolbar}/IAICanvasUndoButton.tsx (90%) rename frontend/src/features/canvas/{canvasReducers.ts => store/canvasExtraReducers.ts} (50%) create mode 100644 frontend/src/features/canvas/store/canvasSelectors.ts rename frontend/src/features/canvas/{ => store}/canvasSlice.ts (77%) create mode 100644 frontend/src/features/canvas/store/canvasTypes.ts rename frontend/src/features/tabs/{ => UnifiedCanvas}/CanvasWorkarea.scss (98%) diff --git a/frontend/src/app/selectors/readinessSelector.ts b/frontend/src/app/selectors/readinessSelector.ts index b8ca488201..44828d29e4 100644 --- a/frontend/src/app/selectors/readinessSelector.ts +++ b/frontend/src/app/selectors/readinessSelector.ts @@ -5,7 +5,7 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { OptionsState } from 'features/options/optionsSlice'; import { SystemState } from 'features/system/systemSlice'; import { validateSeedWeights } from 'common/util/seedWeightPairs'; -import { initialCanvasImageSelector } from 'features/canvas/canvasSlice'; +import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors'; export const readinessSelector = createSelector( [ diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 651180d32a..fcae683e82 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -13,14 +13,12 @@ import { import { OptionsState } from 'features/options/optionsSlice'; import { addLogEntry, - errorOccurred, modelChangeRequested, setIsProcessing, } from 'features/system/systemSlice'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; import * as InvokeAI from 'app/invokeai'; import { RootState } from 'app/store'; -import { initialCanvasImageSelector } from 'features/canvas/canvasSlice'; /** * Returns an object containing all functions which use `socketio.emit()`. @@ -71,8 +69,8 @@ const makeSocketIOEmitters = ( // } // frontendToBackendParametersConfig.imageToProcessUrl = imageUrl; - // } else - + // } else + if (!['txt2img', 'img2img'].includes(generationMode)) { if (!galleryState.currentImage?.url) return; diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 1c6dc7dd1f..720f18d722 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -37,7 +37,7 @@ import { requestNewImages, requestSystemConfig, } from './actions'; -import { addImageToStagingArea } from 'features/canvas/canvasSlice'; +import { addImageToStagingArea } from 'features/canvas/store/canvasSlice'; import { tabMap } from 'features/tabs/InvokeTabs'; /** diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 836f4954f5..98ad1af6ae 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -10,7 +10,7 @@ import { getPersistConfig } from 'redux-deep-persist'; import optionsReducer from 'features/options/optionsSlice'; import galleryReducer from 'features/gallery/gallerySlice'; import systemReducer from 'features/system/systemSlice'; -import canvasReducer from 'features/canvas/canvasSlice'; +import canvasReducer from 'features/canvas/store/canvasSlice'; import { socketioMiddleware } from './socketio/middleware'; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index b00157266b..71300bc1b4 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -5,9 +5,9 @@ import { SystemState } from 'features/system/systemSlice'; import { stringToSeedWeightsArray } from './seedWeightPairs'; import randomInt from './randomInt'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; -import { CanvasState, isCanvasMaskLine } from 'features/canvas/canvasSlice'; +import { CanvasState, isCanvasMaskLine } from 'features/canvas/store/canvasTypes'; import generateMask from 'features/canvas/util/generateMask'; -import { canvasImageLayerRef } from 'features/canvas/IAICanvas'; +import { canvasImageLayerRef } from 'features/canvas/components/IAICanvas'; import openBase64ImageInTab from './openBase64ImageInTab'; export type FrontendToBackendParametersConfig = { diff --git a/frontend/src/features/canvas/IAICanvasControls.tsx b/frontend/src/features/canvas/IAICanvasControls.tsx deleted file mode 100644 index 9be6be93cc..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import IAICanvasBrushControl from './IAICanvasControls/IAICanvasBrushControl'; -import IAICanvasEraserControl from './IAICanvasControls/IAICanvasEraserControl'; -import IAICanvasUndoControl from './IAICanvasControls/IAICanvasUndoButton'; -import IAICanvasRedoControl from './IAICanvasControls/IAICanvasRedoButton'; -import { ButtonGroup } from '@chakra-ui/react'; -import IAICanvasMaskClear from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear'; -import IAICanvasMaskVisibilityControl from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl'; -import IAICanvasMaskInvertControl from './IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl'; -import IAICanvasLockBoundingBoxControl from './IAICanvasControls/IAICanvasLockBoundingBoxControl'; -import IAICanvasShowHideBoundingBoxControl from './IAICanvasControls/IAICanvasShowHideBoundingBoxControl'; -import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; -import { createSelector } from '@reduxjs/toolkit'; -import { RootState } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { OptionsState } from 'features/options/optionsSlice'; -import _ from 'lodash'; -import { canvasSelector } from './canvasSlice'; - -export const canvasControlsSelector = createSelector( - [(state: RootState) => state.options, canvasSelector, activeTabNameSelector], - (options: OptionsState, canvas, activeTabName) => { - const { stageScale, boundingBoxCoordinates, boundingBoxDimensions } = - canvas; - return { - activeTabName, - stageScale, - boundingBoxCoordinates, - boundingBoxDimensions, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -const IAICanvasControls = () => { - return ( -
- - - - - - - - - - - - - - - - - - -
- ); -}; - -export default IAICanvasControls; diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx deleted file mode 100644 index d0e0d736ae..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasBrushControl.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { FaPaintBrush } from 'react-icons/fa'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import IAINumberInput from 'common/components/IAINumberInput'; -import IAIPopover from 'common/components/IAIPopover'; -import IAISlider from 'common/components/IAISlider'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; - -import { - canvasSelector, - setBrushSize, - setShouldShowBrushPreview, - setTool, -} from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import IAICanvasMaskColorPicker from './IAICanvasMaskControls/IAICanvasMaskColorPicker'; - -const selector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { tool, brushSize } = canvas; - - return { - tool, - brushSize, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasBrushControl() { - const dispatch = useAppDispatch(); - const { tool, brushSize, activeTabName } = useAppSelector(selector); - - const handleSelectBrushTool = () => dispatch(setTool('brush')); - - const handleShowBrushPreview = () => { - dispatch(setShouldShowBrushPreview(true)); - }; - - const handleHideBrushPreview = () => { - dispatch(setShouldShowBrushPreview(false)); - }; - - const handleChangeBrushSize = (v: number) => { - dispatch(setShouldShowBrushPreview(true)); - dispatch(setBrushSize(v)); - }; - - useHotkeys( - '[', - (e: KeyboardEvent) => { - e.preventDefault(); - if (brushSize - 5 > 0) { - handleChangeBrushSize(brushSize - 5); - } else { - handleChangeBrushSize(1); - } - }, - { - enabled: true, - }, - [activeTabName, brushSize] - ); - - // Increase brush size - useHotkeys( - ']', - (e: KeyboardEvent) => { - e.preventDefault(); - handleChangeBrushSize(brushSize + 5); - }, - { - enabled: true, - }, - [activeTabName, brushSize] - ); - - // Set tool to brush - useHotkeys( - 'b', - (e: KeyboardEvent) => { - e.preventDefault(); - handleSelectBrushTool(); - }, - { - enabled: true, - }, - [activeTabName] - ); - - return ( - } - onClick={handleSelectBrushTool} - data-selected={tool === 'brush'} - /> - } - > -
- - - -
-
- ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx deleted file mode 100644 index ceeca19a96..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasEraserControl.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { FaEraser } from 'react-icons/fa'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { canvasSelector, setTool } from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; - -const eraserSelector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { tool, isMaskEnabled } = canvas; - - return { - tool, - isMaskEnabled, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasEraserControl() { - const { tool, isMaskEnabled, activeTabName } = useAppSelector(eraserSelector); - const dispatch = useAppDispatch(); - - const handleSelectEraserTool = () => dispatch(setTool('eraser')); - - // Hotkeys - // Set tool to maskEraser - useHotkeys( - 'e', - (e: KeyboardEvent) => { - e.preventDefault(); - handleSelectEraserTool(); - }, - { - enabled: true, - }, - [activeTabName] - ); - - return ( - } - onClick={handleSelectEraserTool} - data-selected={tool === 'eraser'} - isDisabled={!isMaskEnabled} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx deleted file mode 100644 index 66a2ed3cea..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasImageEraserControl.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { canvasSelector, setTool } from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { BsEraser } from 'react-icons/bs'; - -const imageEraserSelector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { tool, isMaskEnabled } = canvas; - - return { - tool, - isMaskEnabled, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasImageEraserControl() { - const { tool, isMaskEnabled, activeTabName } = - useAppSelector(imageEraserSelector); - const dispatch = useAppDispatch(); - - const handleSelectEraserTool = () => dispatch(setTool('eraser')); - - // Hotkeys - useHotkeys( - 'shift+e', - (e: KeyboardEvent) => { - e.preventDefault(); - handleSelectEraserTool(); - }, - { - enabled: true, - }, - [activeTabName, isMaskEnabled] - ); - - return ( - } - fontSize={18} - onClick={handleSelectEraserTool} - data-selected={tool === 'eraser'} - isDisabled={!isMaskEnabled} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx deleted file mode 100644 index cfca8955b6..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasLockBoundingBoxControl.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { FaLock, FaUnlock } from 'react-icons/fa'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { - canvasSelector, - setShouldLockBoundingBox, -} from 'features/canvas/canvasSlice'; -import { createSelector } from '@reduxjs/toolkit'; -import _ from 'lodash'; - -const canvasLockBoundingBoxSelector = createSelector( - canvasSelector, - (canvas) => { - const { shouldLockBoundingBox } = canvas; - - return { - shouldLockBoundingBox, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -const IAICanvasLockBoundingBoxControl = () => { - const dispatch = useAppDispatch(); - const { shouldLockBoundingBox } = useAppSelector( - canvasLockBoundingBoxSelector - ); - - return ( - : } - data-selected={shouldLockBoundingBox} - onClick={() => { - dispatch(setShouldLockBoundingBox(!shouldLockBoundingBox)); - }} - /> - ); -}; - -export default IAICanvasLockBoundingBoxControl; diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx deleted file mode 100644 index 9d863f9775..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControl.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useState } from 'react'; -import { FaMask } from 'react-icons/fa'; - -import IAIPopover from 'common/components/IAIPopover'; -import IAIIconButton from 'common/components/IAIIconButton'; - -import IAICanvasMaskInvertControl from './IAICanvasMaskControls/IAICanvasMaskInvertControl'; -import IAICanvasMaskVisibilityControl from './IAICanvasMaskControls/IAICanvasMaskVisibilityControl'; -import IAICanvasMaskColorPicker from './IAICanvasMaskControls/IAICanvasMaskColorPicker'; - -export default function IAICanvasMaskControl() { - const [maskOptionsOpen, setMaskOptionsOpen] = useState(false); - - return ( - <> - setMaskOptionsOpen(true)} - onClose={() => setMaskOptionsOpen(false)} - triggerComponent={ - } - cursor={'pointer'} - data-selected={maskOptionsOpen} - /> - } - > -
- - - -
-
- - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx deleted file mode 100644 index a23834cdcd..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasBrushColorPicker.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { RgbaColor } from 'react-colorful'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIColorPicker from 'common/components/IAIColorPicker'; -import { canvasSelector, setMaskColor } from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import { createSelector } from '@reduxjs/toolkit'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { useHotkeys } from 'react-hotkeys-hook'; - -const selector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { brushColor } = canvas; - - return { - brushColor, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasBrushColorPicker() { - const dispatch = useAppDispatch(); - const { brushColor, activeTabName } = useAppSelector(selector); - - const handleChangeBrushColor = (newColor: RgbaColor) => { - dispatch(setMaskColor(newColor)); - }; - - // Decrease brush opacity - useHotkeys( - 'shift+[', - (e: KeyboardEvent) => { - e.preventDefault(); - handleChangeBrushColor({ - ...brushColor, - a: Math.max(brushColor.a - 0.05, 0), - }); - }, - { - enabled: true, - }, - [activeTabName, brushColor.a] - ); - - // Increase brush opacity - useHotkeys( - 'shift+]', - (e: KeyboardEvent) => { - e.preventDefault(); - handleChangeBrushColor({ - ...brushColor, - a: Math.min(brushColor.a + 0.05, 1), - }); - }, - { - enabled: true, - }, - [activeTabName, brushColor.a] - ); - - return ( - - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx deleted file mode 100644 index e95563e65a..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskClear.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { FaPlus } from 'react-icons/fa'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { - clearMask, - canvasSelector, - isCanvasMaskLine, -} from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { useToast } from '@chakra-ui/react'; - -const canvasMaskClearSelector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { - isMaskEnabled, - layerState: { objects }, - } = canvas; - - return { - isMaskEnabled, - activeTabName, - isMaskEmpty: objects.filter(isCanvasMaskLine).length === 0, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasMaskClear() { - const { isMaskEnabled, activeTabName, isMaskEmpty } = useAppSelector( - canvasMaskClearSelector - ); - - const dispatch = useAppDispatch(); - const toast = useToast(); - - const handleClearMask = () => { - dispatch(clearMask()); - }; - - // Clear mask - useHotkeys( - 'shift+c', - (e: KeyboardEvent) => { - e.preventDefault(); - handleClearMask(); - toast({ - title: 'Mask Cleared', - status: 'success', - duration: 2500, - isClosable: true, - }); - }, - { - enabled: !isMaskEmpty, - }, - [activeTabName, isMaskEmpty, isMaskEnabled] - ); - return ( - } - onClick={handleClearMask} - isDisabled={isMaskEmpty || !isMaskEnabled} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx deleted file mode 100644 index 158dfd0453..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskColorPicker.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import React from 'react'; -import { RgbaColor } from 'react-colorful'; -import { FaPalette } from 'react-icons/fa'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIColorPicker from 'common/components/IAIColorPicker'; -import IAIIconButton from 'common/components/IAIIconButton'; -import IAIPopover from 'common/components/IAIPopover'; -import { canvasSelector, setMaskColor } from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import { createSelector } from '@reduxjs/toolkit'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { useHotkeys } from 'react-hotkeys-hook'; - -const maskColorPickerSelector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { isMaskEnabled, maskColor } = canvas; - - return { - isMaskEnabled, - maskColor, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasMaskColorPicker() { - const { isMaskEnabled, maskColor, activeTabName } = useAppSelector( - maskColorPickerSelector - ); - const dispatch = useAppDispatch(); - const handleChangeMaskColor = (newColor: RgbaColor) => { - dispatch(setMaskColor(newColor)); - }; - - // Hotkeys - // Decrease mask opacity - useHotkeys( - 'shift+[', - (e: KeyboardEvent) => { - e.preventDefault(); - handleChangeMaskColor({ - ...maskColor, - a: Math.max(maskColor.a - 0.05, 0), - }); - }, - { - enabled: true, - }, - [activeTabName, isMaskEnabled, maskColor.a] - ); - - // Increase mask opacity - useHotkeys( - 'shift+]', - (e: KeyboardEvent) => { - e.preventDefault(); - handleChangeMaskColor({ - ...maskColor, - a: Math.min(maskColor.a + 0.05, 1), - }); - }, - { - enabled: true, - }, - [activeTabName, isMaskEnabled, maskColor.a] - ); - - return ( - } - isDisabled={!isMaskEnabled} - cursor={'pointer'} - /> - } - > - - - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx deleted file mode 100644 index edafe17806..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskInvertControl.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { - canvasSelector, - setShouldPreserveMaskedArea, -} from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { useHotkeys } from 'react-hotkeys-hook'; - -const canvasMaskInvertSelector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { isMaskEnabled, shouldPreserveMaskedArea } = canvas; - - return { - shouldPreserveMaskedArea, - isMaskEnabled, - activeTabName, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasMaskInvertControl() { - const { shouldPreserveMaskedArea, isMaskEnabled, activeTabName } = - useAppSelector(canvasMaskInvertSelector); - const dispatch = useAppDispatch(); - - const handleToggleShouldInvertMask = () => - dispatch(setShouldPreserveMaskedArea(!shouldPreserveMaskedArea)); - - // Invert mask - useHotkeys( - 'shift+m', - (e: KeyboardEvent) => { - e.preventDefault(); - handleToggleShouldInvertMask(); - }, - { - enabled: true, - }, - [activeTabName, shouldPreserveMaskedArea, isMaskEnabled] - ); - - return ( - - ) : ( - - ) - } - onClick={handleToggleShouldInvertMask} - isDisabled={!isMaskEnabled} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx deleted file mode 100644 index f54b8bf08f..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasMaskControls/IAICanvasMaskVisibilityControl.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { useHotkeys } from 'react-hotkeys-hook'; -import { BiHide, BiShow } from 'react-icons/bi'; -import { createSelector } from 'reselect'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { canvasSelector, setIsMaskEnabled } from 'features/canvas/canvasSlice'; - -import _ from 'lodash'; - -const canvasMaskVisibilitySelector = createSelector( - [canvasSelector, activeTabNameSelector], - (canvas, activeTabName) => { - const { isMaskEnabled } = canvas; - - return { isMaskEnabled, activeTabName }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function IAICanvasMaskVisibilityControl() { - const dispatch = useAppDispatch(); - - const { isMaskEnabled, activeTabName } = useAppSelector( - canvasMaskVisibilitySelector - ); - - const handleToggleShouldShowMask = () => - dispatch(setIsMaskEnabled(!isMaskEnabled)); - // Hotkeys - // Show/hide mask - useHotkeys( - 'h', - (e: KeyboardEvent) => { - e.preventDefault(); - handleToggleShouldShowMask(); - }, - { - enabled: activeTabName === 'unifiedCanvas', - }, - [activeTabName, isMaskEnabled] - ); - return ( - : } - onClick={handleToggleShouldShowMask} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx deleted file mode 100644 index b86cb0d452..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasShowHideBoundingBoxControl.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { FaVectorSquare } from 'react-icons/fa'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { - canvasSelector, - setShouldShowBoundingBox, -} from 'features/canvas/canvasSlice'; -import { createSelector } from '@reduxjs/toolkit'; -import _ from 'lodash'; - -const canvasShowHideBoundingBoxControlSelector = createSelector( - canvasSelector, - (canvas) => { - const { shouldShowBoundingBox } = canvas; - - return { - shouldShowBoundingBox, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); -const IAICanvasShowHideBoundingBoxControl = () => { - const dispatch = useAppDispatch(); - const { shouldShowBoundingBox } = useAppSelector( - canvasShowHideBoundingBoxControlSelector - ); - - return ( - } - data-alert={!shouldShowBoundingBox} - onClick={() => { - dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); - }} - /> - ); -}; - -export default IAICanvasShowHideBoundingBoxControl; diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx b/frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx deleted file mode 100644 index ce84c168bd..0000000000 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasSplitLayoutControl.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useHotkeys } from 'react-hotkeys-hook'; -import { VscSplitHorizontal } from 'react-icons/vsc'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { setShowDualDisplay } from 'features/options/optionsSlice'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; - -export default function IAICanvasSplitLayoutControl() { - const dispatch = useAppDispatch(); - const showDualDisplay = useAppSelector( - (state: RootState) => state.options.showDualDisplay - ); - - const handleDualDisplay = () => { - dispatch(setShowDualDisplay(!showDualDisplay)); - dispatch(setDoesCanvasNeedScaling(true)); - }; - - // Hotkeys - // Toggle split view - useHotkeys( - 'shift+j', - () => { - handleDualDisplay(); - }, - [showDualDisplay] - ); - - return ( - } - data-selected={showDualDisplay} - onClick={handleDualDisplay} - /> - ); -} diff --git a/frontend/src/features/canvas/IAICanvas.tsx b/frontend/src/features/canvas/components/IAICanvas.tsx similarity index 91% rename from frontend/src/features/canvas/IAICanvas.tsx rename to frontend/src/features/canvas/components/IAICanvas.tsx index 1620b132ac..5106ca61b1 100644 --- a/frontend/src/features/canvas/IAICanvas.tsx +++ b/frontend/src/features/canvas/components/IAICanvas.tsx @@ -1,35 +1,30 @@ -// lib import { MutableRefObject, useCallback, useRef } from 'react'; import Konva from 'konva'; import { Layer, Stage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; - -// app -import { useAppDispatch, useAppSelector } from 'app/store'; +import { useAppSelector } from 'app/store'; import { initialCanvasImageSelector, canvasSelector, isStagingSelector, shouldLockToInitialImageSelector, -} from 'features/canvas/canvasSlice'; - -// component +} from 'features/canvas/store/canvasSelectors'; import IAICanvasMaskLines from './IAICanvasMaskLines'; import IAICanvasBrushPreview from './IAICanvasBrushPreview'; import { Vector2d } from 'konva/lib/types'; -import IAICanvasBoundingBox from './IAICanvasBoundingBox'; -import useCanvasHotkeys from './hooks/useCanvasHotkeys'; +import IAICanvasBoundingBox from './IAICanvasToolbar/IAICanvasBoundingBox'; +import useCanvasHotkeys from '../hooks/useCanvasHotkeys'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import IAICanvasMaskCompositer from './IAICanvasMaskCompositer'; -import useCanvasWheel from './hooks/useCanvasZoom'; -import useCanvasMouseDown from './hooks/useCanvasMouseDown'; -import useCanvasMouseUp from './hooks/useCanvasMouseUp'; -import useCanvasMouseMove from './hooks/useCanvasMouseMove'; -import useCanvasMouseEnter from './hooks/useCanvasMouseEnter'; -import useCanvasMouseOut from './hooks/useCanvasMouseOut'; -import useCanvasDragMove from './hooks/useCanvasDragMove'; +import useCanvasWheel from '../hooks/useCanvasZoom'; +import useCanvasMouseDown from '../hooks/useCanvasMouseDown'; +import useCanvasMouseUp from '../hooks/useCanvasMouseUp'; +import useCanvasMouseMove from '../hooks/useCanvasMouseMove'; +import useCanvasMouseEnter from '../hooks/useCanvasMouseEnter'; +import useCanvasMouseOut from '../hooks/useCanvasMouseOut'; +import useCanvasDragMove from '../hooks/useCanvasDragMove'; import IAICanvasObjectRenderer from './IAICanvasObjectRenderer'; import IAICanvasGrid from './IAICanvasGrid'; import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; diff --git a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx b/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx similarity index 95% rename from frontend/src/features/canvas/IAICanvasBrushPreview.tsx rename to frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx index 60ee69ab87..4acaa95a36 100644 --- a/frontend/src/features/canvas/IAICanvasBrushPreview.tsx +++ b/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx @@ -3,8 +3,8 @@ import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; import { Circle, Group } from 'react-konva'; import { useAppSelector } from 'app/store'; -import { canvasSelector } from 'features/canvas/canvasSlice'; -import { rgbaColorToString } from './util/colorToString'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { rgbaColorToString } from 'features/canvas/util/colorToString'; const canvasBrushPreviewSelector = createSelector( canvasSelector, diff --git a/frontend/src/features/canvas/IAICanvasGrid.tsx b/frontend/src/features/canvas/components/IAICanvasGrid.tsx similarity index 97% rename from frontend/src/features/canvas/IAICanvasGrid.tsx rename to frontend/src/features/canvas/components/IAICanvasGrid.tsx index 2e919e23bf..0b09b38868 100644 --- a/frontend/src/features/canvas/IAICanvasGrid.tsx +++ b/frontend/src/features/canvas/components/IAICanvasGrid.tsx @@ -6,7 +6,7 @@ import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { ReactNode, useCallback, useLayoutEffect, useState } from 'react'; import { Group, Line as KonvaLine } from 'react-konva'; -import { canvasSelector } from './canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/IAICanvasImage.tsx b/frontend/src/features/canvas/components/IAICanvasImage.tsx similarity index 100% rename from frontend/src/features/canvas/IAICanvasImage.tsx rename to frontend/src/features/canvas/components/IAICanvasImage.tsx diff --git a/frontend/src/features/canvas/IAICanvasIntermediateImage.tsx b/frontend/src/features/canvas/components/IAICanvasIntermediateImage.tsx similarity index 100% rename from frontend/src/features/canvas/IAICanvasIntermediateImage.tsx rename to frontend/src/features/canvas/components/IAICanvasIntermediateImage.tsx diff --git a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx similarity index 97% rename from frontend/src/features/canvas/IAICanvasMaskCompositer.tsx rename to frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx index 401f5d60ae..0d00f0a9d9 100644 --- a/frontend/src/features/canvas/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx @@ -2,9 +2,9 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import { RectConfig } from 'konva/lib/shapes/Rect'; import { Rect } from 'react-konva'; -import { canvasSelector } from './canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import { rgbaColorToString } from './util/colorToString'; +import { rgbaColorToString } from 'features/canvas/util/colorToString'; import { useCallback, useEffect, useRef, useState } from 'react'; import Konva from 'konva'; diff --git a/frontend/src/features/canvas/IAICanvasMaskLines.tsx b/frontend/src/features/canvas/components/IAICanvasMaskLines.tsx similarity index 91% rename from frontend/src/features/canvas/IAICanvasMaskLines.tsx rename to frontend/src/features/canvas/components/IAICanvasMaskLines.tsx index 0671304011..e980c1a2e3 100644 --- a/frontend/src/features/canvas/IAICanvasMaskLines.tsx +++ b/frontend/src/features/canvas/components/IAICanvasMaskLines.tsx @@ -2,7 +2,8 @@ import { GroupConfig } from 'konva/lib/Group'; import { Group, Line } from 'react-konva'; import { useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; -import { canvasSelector, isCanvasMaskLine } from './canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { isCanvasMaskLine } from '../store/canvasTypes'; import _ from 'lodash'; export const canvasLinesSelector = createSelector( diff --git a/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx b/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx similarity index 87% rename from frontend/src/features/canvas/IAICanvasObjectRenderer.tsx rename to frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx index fd0a7aefd9..e75c6b2882 100644 --- a/frontend/src/features/canvas/IAICanvasObjectRenderer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx @@ -2,13 +2,10 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { Group, Line } from 'react-konva'; -import { - canvasSelector, - isCanvasBaseImage, - isCanvasBaseLine, -} from './canvasSlice'; +import { isCanvasBaseImage, isCanvasBaseLine } from '../store/canvasTypes'; import IAICanvasImage from './IAICanvasImage'; -import { rgbaColorToString } from './util/colorToString'; +import { rgbaColorToString } from 'features/canvas/util/colorToString'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/IAICanvasResizer.tsx b/frontend/src/features/canvas/components/IAICanvasResizer.tsx similarity index 93% rename from frontend/src/features/canvas/IAICanvasResizer.tsx rename to frontend/src/features/canvas/components/IAICanvasResizer.tsx index 28bc02c5b1..302700ce45 100644 --- a/frontend/src/features/canvas/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasResizer.tsx @@ -3,14 +3,13 @@ import { useLayoutEffect, useRef } from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { - initialCanvasImageSelector, - canvasSelector, resizeAndScaleCanvas, resizeCanvas, setCanvasContainerDimensions, setDoesCanvasNeedScaling, -} from 'features/canvas/canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; +import { canvasSelector, initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors'; const canvasResizerSelector = createSelector( canvasSelector, diff --git a/frontend/src/features/canvas/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx similarity index 92% rename from frontend/src/features/canvas/IAICanvasStagingArea.tsx rename to frontend/src/features/canvas/components/IAICanvasStagingArea.tsx index 6ecc870ca2..bdf7e3edeb 100644 --- a/frontend/src/features/canvas/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx @@ -1,10 +1,10 @@ import { createSelector } from '@reduxjs/toolkit'; -import { useAppDispatch, useAppSelector } from 'app/store'; +import { useAppSelector } from 'app/store'; import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; -import { useCallback, useState } from 'react'; +import { useState } from 'react'; import { Group, Rect } from 'react-konva'; -import { canvasSelector } from './canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import IAICanvasImage from './IAICanvasImage'; const selector = createSelector( diff --git a/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx similarity index 97% rename from frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx rename to frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx index 6b684dbfe7..b093a61464 100644 --- a/frontend/src/features/canvas/IAICanvasStagingAreaToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx @@ -21,13 +21,13 @@ import { FaEyeSlash, FaTrash, } from 'react-icons/fa'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { commitStagingAreaImage, - canvasSelector, discardStagedImages, nextStagingAreaImage, prevStagingAreaImage, -} from './canvasSlice'; +} from 'features/canvas/store/canvasSlice'; const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx similarity index 95% rename from frontend/src/features/canvas/IAICanvasStatusText.tsx rename to frontend/src/features/canvas/components/IAICanvasStatusText.tsx index 7282818380..3a3bbeba40 100644 --- a/frontend/src/features/canvas/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; -import { canvasSelector } from './canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const roundToHundreth = (val: number): number => { return Math.round(val * 100) / 100; diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx similarity index 99% rename from frontend/src/features/canvas/IAICanvasBoundingBox.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx index c0c77aa574..ffb3852366 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx @@ -11,13 +11,15 @@ import { roundToMultiple } from 'common/util/roundDownToMultiple'; import { initialCanvasImageSelector, canvasSelector, + shouldLockToInitialImageSelector, +} from 'features/canvas/store/canvasSelectors'; +import { setBoundingBoxCoordinates, setBoundingBoxDimensions, setIsMouseOverBoundingBox, setIsMovingBoundingBox, setIsTransformingBoundingBox, - shouldLockToInitialImageSelector, -} from 'features/canvas/canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { GroupConfig } from 'konva/lib/Group'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; diff --git a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx similarity index 91% rename from frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx index beb34396d4..7355bbc187 100644 --- a/frontend/src/features/canvas/IAICanvasBrushButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx @@ -1,11 +1,5 @@ import { createSelector } from '@reduxjs/toolkit'; -import { - canvasSelector, - isStagingSelector, - setBrushColor, - setBrushSize, - setTool, -} from './canvasSlice'; +import { setBrushColor, setBrushSize, setTool } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -14,6 +8,7 @@ import IAIPopover from 'common/components/IAIPopover'; import IAIColorPicker from 'common/components/IAIColorPicker'; import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( [canvasSelector, isStagingSelector], diff --git a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx similarity index 93% rename from frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx index 9a031706dc..d9d029d14e 100644 --- a/frontend/src/features/canvas/IAICanvasEraserButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx @@ -1,10 +1,8 @@ import { createSelector } from '@reduxjs/toolkit'; import { - canvasSelector, - isStagingSelector, setEraserSize, setTool, -} from './canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -13,6 +11,7 @@ import IAIPopover from 'common/components/IAIPopover'; import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( [canvasSelector, isStagingSelector], diff --git a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx similarity index 95% rename from frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx index 6822a40fa8..2793ddcbd4 100644 --- a/frontend/src/features/canvas/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx @@ -2,12 +2,11 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { clearMask, - canvasSelector, setIsMaskEnabled, setLayer, setMaskColor, setShouldPreserveMaskedArea, -} from './canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -16,6 +15,7 @@ import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import IAIColorPicker from 'common/components/IAIColorPicker'; import IAIButton from 'common/components/IAIButton'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx similarity index 90% rename from frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx index d74bf757fa..f62ace16ef 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasRedoButton.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx @@ -4,9 +4,10 @@ import { FaRedo } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { canvasSelector, redo } from 'features/canvas/canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import _ from 'lodash'; +import { redo } from 'features/canvas/store/canvasSlice'; const canvasRedoSelector = createSelector( [canvasSelector, activeTabNameSelector], diff --git a/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx similarity index 95% rename from frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index 5a34257b20..4457872390 100644 --- a/frontend/src/features/canvas/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -1,19 +1,19 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { - canvasSelector, setShouldAutoSave, setShouldDarkenOutsideBoundingBox, setShouldShowGrid, setShouldShowIntermediates, setShouldSnapToGrid, -} from './canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; import { FaWrench } from 'react-icons/fa'; import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; export const canvasControlsSelector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx similarity index 91% rename from frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 0574e46ef9..efafa05d0f 100644 --- a/frontend/src/features/canvas/IAICanvasOutpaintingControls.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -2,16 +2,14 @@ import { ButtonGroup } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { resizeAndScaleCanvas, - isStagingSelector, resetCanvas, resetCanvasView, setShouldLockToInitialImage, setTool, - canvasSelector, -} from './canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; -import { canvasImageLayerRef, stageRef } from './IAICanvas'; +import { canvasImageLayerRef, stageRef } from '../IAICanvas'; import IAIIconButton from 'common/components/IAIIconButton'; import { FaArrowsAlt, @@ -23,15 +21,16 @@ import { FaTrash, FaUpload, } from 'react-icons/fa'; -import IAICanvasUndoButton from './IAICanvasControls/IAICanvasUndoButton'; -import IAICanvasRedoButton from './IAICanvasControls/IAICanvasRedoButton'; +import IAICanvasUndoButton from './IAICanvasUndoButton'; +import IAICanvasRedoButton from './IAICanvasRedoButton'; import IAICanvasSettingsButtonPopover from './IAICanvasSettingsButtonPopover'; import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; -import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; +import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; import IAICheckbox from 'common/components/IAICheckbox'; import { ChangeEvent } from 'react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( [canvasSelector, isStagingSelector], diff --git a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx similarity index 90% rename from frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx rename to frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx index c28477e84b..3c9c31a26c 100644 --- a/frontend/src/features/canvas/IAICanvasControls/IAICanvasUndoButton.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx @@ -3,10 +3,11 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { FaUndo } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { canvasSelector, undo } from 'features/canvas/canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import _ from 'lodash'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { undo } from 'features/canvas/store/canvasSlice'; const canvasUndoSelector = createSelector( [canvasSelector, activeTabNameSelector], diff --git a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts index 07a7a561d5..1325fafd89 100644 --- a/frontend/src/features/canvas/hooks/useCanvasDragMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasDragMove.ts @@ -3,12 +3,11 @@ import { useAppDispatch, useAppSelector } from 'app/store'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { useCallback } from 'react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; import { - canvasSelector, - isStagingSelector, setIsMovingStage, setStageCoordinates, -} from '../canvasSlice'; +} from 'features/canvas/store/canvasSlice'; const selector = createSelector( [canvasSelector, isStagingSelector], diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index 870c8b0ffb..1d4c2f28fd 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -3,15 +3,15 @@ import _ from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { - CanvasTool, setShouldShowBoundingBox, setTool, toggleShouldLockBoundingBox, -} from 'features/canvas/canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { canvasSelector } from '../canvasSlice'; import { useRef } from 'react'; -import { stageRef } from '../IAICanvas'; +import { stageRef } from '../components/IAICanvas'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { CanvasTool } from '../store/canvasTypes'; const selector = createSelector( [canvasSelector, activeTabNameSelector], diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index 8daf6d1f0f..1af0401779 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -5,13 +5,12 @@ import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; import { addLine, - canvasSelector, - isStagingSelector, setIsDrawing, setIsMovingStage, -} from '../canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts index 60485d8574..37a21a6eda 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts @@ -5,12 +5,11 @@ import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; import { addLine, - canvasSelector, - isStagingSelector, setIsDrawing, -} from '../canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts index 211da0b78d..e6288952cf 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts @@ -5,12 +5,11 @@ import Konva from 'konva'; import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; import { addPointToCurrentLine, - canvasSelector, - isStagingSelector, setCursorPosition, -} from '../canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts b/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts index 18fb0a337d..80e353aee1 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseOut.ts @@ -1,6 +1,6 @@ import { useAppDispatch } from 'app/store'; import { useCallback } from 'react'; -import { setCursorPosition, setIsDrawing } from '../canvasSlice'; +import { setCursorPosition, setIsDrawing } from 'features/canvas/store/canvasSlice'; const useCanvasMouseOut = () => { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts index ebc15044c7..0b77ebaa93 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts @@ -4,14 +4,13 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import Konva from 'konva'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; +import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; import { // addPointToCurrentEraserLine, addPointToCurrentLine, - canvasSelector, - isStagingSelector, setIsDrawing, setIsMovingStage, -} from '../canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; const selector = createSelector( diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts index 7f8ac5a50c..625997ade9 100644 --- a/frontend/src/features/canvas/hooks/useCanvasZoom.ts +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -6,12 +6,11 @@ import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; import { - initialCanvasImageSelector, canvasSelector, - setStageCoordinates, - setStageScale, + initialCanvasImageSelector, shouldLockToInitialImageSelector, -} from '../canvasSlice'; +} from 'features/canvas/store/canvasSelectors'; +import { setStageCoordinates, setStageScale } from 'features/canvas/store/canvasSlice'; import { CANVAS_SCALE_BY, MAX_CANVAS_SCALE, diff --git a/frontend/src/features/canvas/canvasReducers.ts b/frontend/src/features/canvas/store/canvasExtraReducers.ts similarity index 50% rename from frontend/src/features/canvas/canvasReducers.ts rename to frontend/src/features/canvas/store/canvasExtraReducers.ts index bff50eebc4..44e8a73e82 100644 --- a/frontend/src/features/canvas/canvasReducers.ts +++ b/frontend/src/features/canvas/store/canvasExtraReducers.ts @@ -1,10 +1,14 @@ import * as InvokeAI from 'app/invokeai'; -import { CanvasState, initialLayerState } from './canvasSlice'; +import { initialLayerState } from './canvasSlice'; +import { CanvasState } from './canvasTypes'; import { roundDownToMultiple, roundToMultiple, } from 'common/util/roundDownToMultiple'; import _ from 'lodash'; +import { mergeAndUploadCanvas } from '../util/mergeAndUploadCanvas'; +import { uploadImage } from 'features/gallery/util/uploadImage'; +import { ActionReducerMapBuilder } from '@reduxjs/toolkit'; export const setInitialCanvasImage_reducer = ( state: CanvasState, @@ -50,3 +54,39 @@ export const setInitialCanvasImage_reducer = ( state.isCanvasInitialized = false; state.doesCanvasNeedScaling = true; }; + +export const canvasExtraReducers = ( + builder: ActionReducerMapBuilder +) => { + builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, originalBoundingBox } = action.payload; + + if (kind === 'temp_merged_canvas') { + state.pastLayerStates.push({ + ...state.layerState, + }); + + state.futureLayerStates = []; + + state.layerState.objects = [ + { + kind: 'image', + layer: 'base', + ...originalBoundingBox, + image, + }, + ]; + } + }); + builder.addCase(uploadImage.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, activeTabName } = action.payload; + + if (kind !== 'init') return; + + if (activeTabName === 'unifiedCanvas') { + setInitialCanvasImage_reducer(state, image); + } + }); +}; diff --git a/frontend/src/features/canvas/store/canvasSelectors.ts b/frontend/src/features/canvas/store/canvasSelectors.ts new file mode 100644 index 0000000000..2914438917 --- /dev/null +++ b/frontend/src/features/canvas/store/canvasSelectors.ts @@ -0,0 +1,15 @@ +import { RootState } from 'app/store'; +import { CanvasImage, CanvasState, isCanvasBaseImage } from './canvasTypes'; + +export const canvasSelector = (state: RootState): CanvasState => state.canvas; + +export const isStagingSelector = (state: RootState): boolean => + state.canvas.layerState.stagingArea.images.length > 0; + +export const shouldLockToInitialImageSelector = (state: RootState): boolean => + state.canvas.shouldLockToInitialImage; + +export const initialCanvasImageSelector = ( + state: RootState +): CanvasImage | undefined => + state.canvas.layerState.objects.find(isCanvasBaseImage); diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts similarity index 77% rename from frontend/src/features/canvas/canvasSlice.ts rename to frontend/src/features/canvas/store/canvasSlice.ts index 8e86b7c8c2..22b7dc9334 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -5,125 +5,23 @@ import { RgbaColor } from 'react-colorful'; import * as InvokeAI from 'app/invokeai'; import _ from 'lodash'; import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; -import { RootState } from 'app/store'; -import { mergeAndUploadCanvas } from './util/mergeAndUploadCanvas'; -import { uploadImage } from 'features/gallery/util/uploadImage'; -import { setInitialCanvasImage_reducer } from './canvasReducers'; -import calculateScale from './util/calculateScale'; -import calculateCoordinates from './util/calculateCoordinates'; -import floorCoordinates from './util/floorCoordinates'; - -export type CanvasLayer = 'base' | 'mask'; - -export type CanvasDrawingTool = 'brush' | 'eraser'; - -export type CanvasTool = CanvasDrawingTool | 'move'; - -export type Dimensions = { - width: number; - height: number; -}; - -export type CanvasAnyLine = { - kind: 'line'; - tool: CanvasDrawingTool; - strokeWidth: number; - points: number[]; -}; - -export type CanvasImage = { - kind: 'image'; - layer: 'base'; - x: number; - y: number; - width: number; - height: number; - image: InvokeAI.Image; -}; - -export type CanvasMaskLine = CanvasAnyLine & { - layer: 'mask'; -}; - -export type CanvasLine = CanvasAnyLine & { - layer: 'base'; - color?: RgbaColor; -}; - -export type CanvasObject = CanvasImage | CanvasLine | CanvasMaskLine; - -export type CanvasLayerState = { - objects: CanvasObject[]; - stagingArea: { - x: number; - y: number; - width: number; - height: number; - images: CanvasImage[]; - selectedImageIndex: number; - }; -}; - -// type guards -export const isCanvasMaskLine = (obj: CanvasObject): obj is CanvasMaskLine => - obj.kind === 'line' && obj.layer === 'mask'; - -export const isCanvasBaseLine = (obj: CanvasObject): obj is CanvasLine => - obj.kind === 'line' && obj.layer === 'base'; - -export const isCanvasBaseImage = (obj: CanvasObject): obj is CanvasImage => - obj.kind === 'image' && obj.layer === 'base'; - -export const isCanvasAnyLine = ( - obj: CanvasObject -): obj is CanvasMaskLine | CanvasLine => obj.kind === 'line'; - -export interface CanvasState { - boundingBoxCoordinates: Vector2d; - boundingBoxDimensions: Dimensions; - boundingBoxPreviewFill: RgbaColor; - brushColor: RgbaColor; - brushSize: number; - canvasContainerDimensions: Dimensions; - cursorPosition: Vector2d | null; - doesCanvasNeedScaling: boolean; - eraserSize: number; - futureLayerStates: CanvasLayerState[]; - inpaintReplace: number; - intermediateImage?: InvokeAI.Image; - isCanvasInitialized: boolean; - isDrawing: boolean; - isMaskEnabled: boolean; - isMouseOverBoundingBox: boolean; - isMoveBoundingBoxKeyHeld: boolean; - isMoveStageKeyHeld: boolean; - isMovingBoundingBox: boolean; - isMovingStage: boolean; - isTransformingBoundingBox: boolean; - layer: CanvasLayer; - layerState: CanvasLayerState; - maskColor: RgbaColor; - maxHistory: number; - minimumStageScale: number; - pastLayerStates: CanvasLayerState[]; - shouldAutoSave: boolean; - shouldDarkenOutsideBoundingBox: boolean; - shouldLockBoundingBox: boolean; - shouldLockToInitialImage: boolean; - shouldPreserveMaskedArea: boolean; - shouldShowBoundingBox: boolean; - shouldShowBrush: boolean; - shouldShowBrushPreview: boolean; - shouldShowCheckboardTransparency: boolean; - shouldShowGrid: boolean; - shouldShowIntermediates: boolean; - shouldSnapToGrid: boolean; - shouldUseInpaintReplace: boolean; - stageCoordinates: Vector2d; - stageDimensions: Dimensions; - stageScale: number; - tool: CanvasTool; -} +import { + canvasExtraReducers, + setInitialCanvasImage_reducer, +} from './canvasExtraReducers'; +import calculateScale from '../util/calculateScale'; +import calculateCoordinates from '../util/calculateCoordinates'; +import floorCoordinates from '../util/floorCoordinates'; +import { + CanvasLayer, + CanvasLayerState, + CanvasState, + CanvasTool, + Dimensions, + isCanvasAnyLine, + isCanvasBaseImage, + isCanvasMaskLine, +} from './canvasTypes'; export const initialLayerState: CanvasLayerState = { objects: [], @@ -473,9 +371,6 @@ export const canvasSlice = createSlice({ const { width: imageWidth, height: imageHeight } = initialCanvasImage; - // const { clientWidth, clientHeight, imageWidth, imageHeight } = - // action.payload; - const { shouldLockToInitialImage } = state; const padding = shouldLockToInitialImage ? 1 : 0.95; @@ -604,40 +499,7 @@ export const canvasSlice = createSlice({ state.shouldLockToInitialImage = action.payload; }, }, - extraReducers: (builder) => { - builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, originalBoundingBox } = action.payload; - - if (kind === 'temp_merged_canvas') { - state.pastLayerStates.push({ - ...state.layerState, - }); - - state.futureLayerStates = []; - - state.layerState.objects = [ - { - kind: 'image', - layer: 'base', - ...originalBoundingBox, - image, - }, - ]; - } - }); - - builder.addCase(uploadImage.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, activeTabName } = action.payload; - - if (kind !== 'init') return; - - if (activeTabName === 'unifiedCanvas') { - setInitialCanvasImage_reducer(state, image); - } - }); - }, + extraReducers: canvasExtraReducers, }); export const { @@ -699,16 +561,3 @@ export const { } = canvasSlice.actions; export default canvasSlice.reducer; - -export const canvasSelector = (state: RootState): CanvasState => state.canvas; - -export const isStagingSelector = (state: RootState): boolean => - state.canvas.layerState.stagingArea.images.length > 0; - -export const shouldLockToInitialImageSelector = (state: RootState): boolean => - state.canvas.shouldLockToInitialImage; - -export const initialCanvasImageSelector = ( - state: RootState -): CanvasImage | undefined => - state.canvas.layerState.objects.find(isCanvasBaseImage); diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts new file mode 100644 index 0000000000..22e81f2677 --- /dev/null +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -0,0 +1,115 @@ +import * as InvokeAI from 'app/invokeai'; +import { Vector2d } from 'konva/lib/types'; +import { RgbaColor } from 'react-colorful'; + +export type CanvasLayer = 'base' | 'mask'; + +export type CanvasDrawingTool = 'brush' | 'eraser'; + +export type CanvasTool = CanvasDrawingTool | 'move'; + +export type Dimensions = { + width: number; + height: number; +}; + +export type CanvasAnyLine = { + kind: 'line'; + tool: CanvasDrawingTool; + strokeWidth: number; + points: number[]; +}; + +export type CanvasImage = { + kind: 'image'; + layer: 'base'; + x: number; + y: number; + width: number; + height: number; + image: InvokeAI.Image; +}; + +export type CanvasMaskLine = CanvasAnyLine & { + layer: 'mask'; +}; + +export type CanvasLine = CanvasAnyLine & { + layer: 'base'; + color?: RgbaColor; +}; + +export type CanvasObject = CanvasImage | CanvasLine | CanvasMaskLine; + +export type CanvasLayerState = { + objects: CanvasObject[]; + stagingArea: { + x: number; + y: number; + width: number; + height: number; + images: CanvasImage[]; + selectedImageIndex: number; + }; +}; + +// type guards +export const isCanvasMaskLine = (obj: CanvasObject): obj is CanvasMaskLine => + obj.kind === 'line' && obj.layer === 'mask'; + +export const isCanvasBaseLine = (obj: CanvasObject): obj is CanvasLine => + obj.kind === 'line' && obj.layer === 'base'; + +export const isCanvasBaseImage = (obj: CanvasObject): obj is CanvasImage => + obj.kind === 'image' && obj.layer === 'base'; + +export const isCanvasAnyLine = ( + obj: CanvasObject +): obj is CanvasMaskLine | CanvasLine => obj.kind === 'line'; + +export interface CanvasState { + boundingBoxCoordinates: Vector2d; + boundingBoxDimensions: Dimensions; + boundingBoxPreviewFill: RgbaColor; + brushColor: RgbaColor; + brushSize: number; + canvasContainerDimensions: Dimensions; + cursorPosition: Vector2d | null; + doesCanvasNeedScaling: boolean; + eraserSize: number; + futureLayerStates: CanvasLayerState[]; + inpaintReplace: number; + intermediateImage?: InvokeAI.Image; + isCanvasInitialized: boolean; + isDrawing: boolean; + isMaskEnabled: boolean; + isMouseOverBoundingBox: boolean; + isMoveBoundingBoxKeyHeld: boolean; + isMoveStageKeyHeld: boolean; + isMovingBoundingBox: boolean; + isMovingStage: boolean; + isTransformingBoundingBox: boolean; + layer: CanvasLayer; + layerState: CanvasLayerState; + maskColor: RgbaColor; + maxHistory: number; + minimumStageScale: number; + pastLayerStates: CanvasLayerState[]; + shouldAutoSave: boolean; + shouldDarkenOutsideBoundingBox: boolean; + shouldLockBoundingBox: boolean; + shouldLockToInitialImage: boolean; + shouldPreserveMaskedArea: boolean; + shouldShowBoundingBox: boolean; + shouldShowBrush: boolean; + shouldShowBrushPreview: boolean; + shouldShowCheckboardTransparency: boolean; + shouldShowGrid: boolean; + shouldShowIntermediates: boolean; + shouldSnapToGrid: boolean; + shouldUseInpaintReplace: boolean; + stageCoordinates: Vector2d; + stageDimensions: Dimensions; + stageScale: number; + tool: CanvasTool; +} diff --git a/frontend/src/features/canvas/util/generateMask.ts b/frontend/src/features/canvas/util/generateMask.ts index 7a924b555b..7c0c7c08fa 100644 --- a/frontend/src/features/canvas/util/generateMask.ts +++ b/frontend/src/features/canvas/util/generateMask.ts @@ -1,6 +1,6 @@ import Konva from 'konva'; import { IRect } from 'konva/lib/types'; -import { CanvasMaskLine } from 'features/canvas/canvasSlice'; +import { CanvasMaskLine } from 'features/canvas/store/canvasTypes'; /** * Generating a mask image from InpaintingCanvas.tsx is not as simple diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index c84f7252c0..1de45831a2 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -39,7 +39,7 @@ import { setDoesCanvasNeedScaling, setInitialCanvasImage, setShouldLockToInitialImage, -} from 'features/canvas/canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { GalleryState } from './gallerySlice'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; import IAIPopover from 'common/components/IAIPopover'; diff --git a/frontend/src/features/gallery/HoverableImage.tsx b/frontend/src/features/gallery/HoverableImage.tsx index 11763fb85f..dee6c19eb3 100644 --- a/frontend/src/features/gallery/HoverableImage.tsx +++ b/frontend/src/features/gallery/HoverableImage.tsx @@ -26,7 +26,7 @@ import { setDoesCanvasNeedScaling, setInitialCanvasImage, setShouldLockToInitialImage, -} from 'features/canvas/canvasSlice'; +} from 'features/canvas/store/canvasSlice'; import { hoverableImageSelector } from './gallerySliceSelectors'; interface HoverableImageProps { diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index 41c549132d..d591a5ecf0 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -31,7 +31,7 @@ import IAIPopover from 'common/components/IAIPopover'; import IAISlider from 'common/components/IAISlider'; import { BiReset } from 'react-icons/bi'; import IAICheckbox from 'common/components/IAICheckbox'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import _ from 'lodash'; import useClickOutsideWatcher from 'common/hooks/useClickOutsideWatcher'; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx index ed61f70c2d..41183192a3 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx @@ -1,11 +1,9 @@ import React from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; -import { - canvasSelector, - setShouldDarkenOutsideBoundingBox, -} from 'features/canvas/canvasSlice'; +import { setShouldDarkenOutsideBoundingBox } from 'features/canvas/store/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const selector = createSelector( canvasSelector, diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx index 12a6306b75..f2b222099d 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx @@ -3,15 +3,13 @@ import IAISlider from 'common/components/IAISlider'; import { useAppDispatch, useAppSelector } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; -import { - canvasSelector, - setBoundingBoxDimensions, -} from 'features/canvas/canvasSlice'; +import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice'; import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; import _ from 'lodash'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -const boundingBoxDimensionsSelector = createSelector( +const selector = createSelector( canvasSelector, (canvas) => { const { stageDimensions, boundingBoxDimensions, shouldLockBoundingBox } = @@ -40,7 +38,7 @@ export default function BoundingBoxDimensionSlider( const { dimension, label } = props; const dispatch = useAppDispatch(); const { shouldLockBoundingBox, stageDimensions, boundingBoxDimensions } = - useAppSelector(boundingBoxDimensionsSelector); + useAppSelector(selector); const canvasDimension = stageDimensions[dimension]; const boundingBoxDimension = boundingBoxDimensions[dimension]; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx index 803353983b..a1c87699db 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx @@ -1,19 +1,17 @@ import React from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; -import { - canvasSelector, - setShouldLockBoundingBox, -} from 'features/canvas/canvasSlice'; +import { setShouldLockBoundingBox } from 'features/canvas/store/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -const boundingBoxLockSelector = createSelector( +const selector = createSelector( canvasSelector, (canvas) => canvas.shouldLockBoundingBox ); export default function BoundingBoxLock() { - const shouldLockBoundingBox = useAppSelector(boundingBoxLockSelector); + const shouldLockBoundingBox = useAppSelector(selector); const dispatch = useAppDispatch(); const handleChangeShouldLockBoundingBox = () => { diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx index d2ccc12a5e..fd2098d06b 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx @@ -2,19 +2,17 @@ import React from 'react'; import { BiHide, BiShow } from 'react-icons/bi'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { - canvasSelector, - setShouldShowBoundingBox, -} from 'features/canvas/canvasSlice'; +import { setShouldShowBoundingBox } from 'features/canvas/store/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -const boundingBoxVisibilitySelector = createSelector( +const selector = createSelector( canvasSelector, (canvas) => canvas.shouldShowBoundingBox ); export default function BoundingBoxVisibility() { - const shouldShowBoundingBox = useAppSelector(boundingBoxVisibilitySelector); + const shouldShowBoundingBox = useAppSelector(selector); const dispatch = useAppDispatch(); const handleShowBoundingBox = () => diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx index c373bc1a89..42aa52a311 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx @@ -2,13 +2,11 @@ import { useToast } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIButton from 'common/components/IAIButton'; -import { - canvasSelector, - setClearBrushHistory, -} from 'features/canvas/canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { setClearBrushHistory } from 'features/canvas/store/canvasSlice'; import _ from 'lodash'; -const clearBrushHistorySelector = createSelector( +const selector = createSelector( canvasSelector, (canvas) => { const { pastLayerStates, futureLayerStates } = canvas; @@ -30,7 +28,7 @@ export default function ClearBrushHistory() { const dispatch = useAppDispatch(); const toast = useToast(); - const { mayClearBrushHistory } = useAppSelector(clearBrushHistorySelector); + const { mayClearBrushHistory } = useAppSelector(selector); const handleClearBrushHistory = () => { dispatch(setClearBrushHistory()); diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx index dd164f7015..d0c99f70f5 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx @@ -6,12 +6,12 @@ import IAISwitch from '../../../../common/components/IAISwitch'; import IAISlider from '../../../../common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; import { - canvasSelector, setInpaintReplace, setShouldUseInpaintReplace, -} from 'features/canvas/canvasSlice'; +} from 'features/canvas/store/canvasSlice'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -const canvasInpaintReplaceSelector = createSelector( +const selector = createSelector( canvasSelector, (canvas) => { const { inpaintReplace, shouldUseInpaintReplace } = canvas; @@ -28,9 +28,7 @@ const canvasInpaintReplaceSelector = createSelector( ); export default function InpaintReplace() { - const { inpaintReplace, shouldUseInpaintReplace } = useAppSelector( - canvasInpaintReplaceSelector - ); + const { inpaintReplace, shouldUseInpaintReplace } = useAppSelector(selector); const dispatch = useAppDispatch(); diff --git a/frontend/src/features/tabs/FloatingGalleryButton.tsx b/frontend/src/features/tabs/FloatingGalleryButton.tsx index 3c714d60d7..27c3ed178f 100644 --- a/frontend/src/features/tabs/FloatingGalleryButton.tsx +++ b/frontend/src/features/tabs/FloatingGalleryButton.tsx @@ -2,7 +2,7 @@ import { MdPhotoLibrary } from 'react-icons/md'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { setShouldShowGallery } from 'features/gallery/gallerySlice'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; const FloatingGalleryButton = () => { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx b/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx index 4834c3309b..018aebd0c6 100644 --- a/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx +++ b/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx @@ -10,7 +10,7 @@ import CancelButton from 'features/options/ProcessButtons/CancelButton'; import InvokeButton from 'features/options/ProcessButtons/InvokeButton'; import _ from 'lodash'; import LoopbackButton from 'features/options/ProcessButtons/Loopback'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; const canInvokeSelector = createSelector( (state: RootState) => state.options, diff --git a/frontend/src/features/tabs/InvokeOptionsPanel.tsx b/frontend/src/features/tabs/InvokeOptionsPanel.tsx index 9f24e377ec..6d367d9710 100644 --- a/frontend/src/features/tabs/InvokeOptionsPanel.tsx +++ b/frontend/src/features/tabs/InvokeOptionsPanel.tsx @@ -14,7 +14,7 @@ import { setShouldPinOptionsPanel, setShouldShowOptionsPanel, } from 'features/options/optionsSlice'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import InvokeAILogo from 'assets/images/logo.png'; type Props = { children: ReactNode }; diff --git a/frontend/src/features/tabs/InvokeTabs.tsx b/frontend/src/features/tabs/InvokeTabs.tsx index 6b17c007e8..8bfdd1c8ba 100644 --- a/frontend/src/features/tabs/InvokeTabs.tsx +++ b/frontend/src/features/tabs/InvokeTabs.tsx @@ -19,7 +19,7 @@ import { import ImageToImageWorkarea from './ImageToImage'; import TextToImageWorkarea from './TextToImage'; import Lightbox from 'features/lightbox/Lightbox'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import UnifiedCanvasWorkarea from './UnifiedCanvas/UnifiedCanvasWorkarea'; import { setShouldShowGallery } from 'features/gallery/gallerySlice'; import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; diff --git a/frontend/src/features/tabs/InvokeWorkarea.tsx b/frontend/src/features/tabs/InvokeWorkarea.tsx index 4f76a708ed..5305d30b4b 100644 --- a/frontend/src/features/tabs/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/InvokeWorkarea.tsx @@ -10,7 +10,7 @@ import { OptionsState, setShowDualDisplay, } from 'features/options/optionsSlice'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; const workareaSelector = createSelector( [(state: RootState) => state.options, activeTabNameSelector], diff --git a/frontend/src/features/tabs/CanvasWorkarea.scss b/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss similarity index 98% rename from frontend/src/features/tabs/CanvasWorkarea.scss rename to frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss index a1a743fdeb..16bcd3a5e0 100644 --- a/frontend/src/features/tabs/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .inpainting-main-area { display: flex; diff --git a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx index ad8cb8634b..2569326b9a 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx +++ b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx @@ -1,16 +1,13 @@ import { createSelector } from '@reduxjs/toolkit'; // import IAICanvas from 'features/canvas/IAICanvas'; -import IAICanvasResizer from 'features/canvas/IAICanvasResizer'; +import IAICanvasResizer from 'features/canvas/components/IAICanvasResizer'; import _ from 'lodash'; import { useLayoutEffect } from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; -import ImageUploadButton from 'common/components/ImageUploaderButton'; -import { - canvasSelector, - setDoesCanvasNeedScaling, -} from 'features/canvas/canvasSlice'; -import IAICanvas from 'features/canvas/IAICanvas'; -import IAICanvasOutpaintingControls from 'features/canvas/IAICanvasOutpaintingControls'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; +import IAICanvas from 'features/canvas/components/IAICanvas'; +import IAICanvasOutpaintingControls from 'features/canvas/components/IAICanvasToolbar/IAICanvasToolbar'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx index 0e03a3b118..92fc8c2158 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx +++ b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx @@ -3,7 +3,7 @@ import UnifiedCanvasDisplay from './UnifiedCanvasDisplay'; import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; import { useAppDispatch } from 'app/store'; import { useEffect } from 'react'; -import { setDoesCanvasNeedScaling } from 'features/canvas/canvasSlice'; +import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; export default function UnifiedCanvasWorkarea() { const dispatch = useAppDispatch(); diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index f6dda5a8a9..6c4f45bb93 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -46,7 +46,7 @@ @use '../features/tabs/TextToImage/TextToImage.scss'; @use '../features/tabs/ImageToImage/ImageToImage.scss'; @use '../features/tabs/FloatingButton.scss'; -@use '../features/tabs/CanvasWorkarea.scss'; +@use '../features/tabs/UnifiedCanvas/CanvasWorkarea.scss'; // Component Shared @use '../common/components/IAINumberInput.scss'; From 1d540219fae991920d815d4ce019e097808bd6ac Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:36:53 +1100 Subject: [PATCH 065/220] Fixes bounding box ending up offscreen --- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 7 ++- .../src/features/canvas/store/canvasSlice.ts | 44 ++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index efafa05d0f..2bf3ea9091 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -6,6 +6,7 @@ import { resetCanvasView, setShouldLockToInitialImage, setTool, + fitBoundingBoxToStage, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; @@ -30,7 +31,10 @@ import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; import IAICheckbox from 'common/components/IAICheckbox'; import { ChangeEvent } from 'react'; -import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; +import { + canvasSelector, + isStagingSelector, +} from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( [canvasSelector, isStagingSelector], @@ -59,6 +63,7 @@ const IAICanvasOutpaintingControls = () => { ) => { dispatch(setShouldLockToInitialImage(e.target.checked)); dispatch(resizeAndScaleCanvas()); + dispatch(fitBoundingBoxToStage()); }; return ( diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 22b7dc9334..b252a1b2e4 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -4,7 +4,10 @@ import { IRect, Vector2d } from 'konva/lib/types'; import { RgbaColor } from 'react-colorful'; import * as InvokeAI from 'app/invokeai'; import _ from 'lodash'; -import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; +import { + roundDownToMultiple, + roundToMultiple, +} from 'common/util/roundDownToMultiple'; import { canvasExtraReducers, setInitialCanvasImage_reducer, @@ -498,6 +501,44 @@ export const canvasSlice = createSlice({ setShouldLockToInitialImage: (state, action: PayloadAction) => { state.shouldLockToInitialImage = action.payload; }, + fitBoundingBoxToStage: (state) => { + const { boundingBoxDimensions, boundingBoxCoordinates, stageDimensions } = + state; + + if ( + boundingBoxCoordinates.x < 0 || + boundingBoxCoordinates.x + boundingBoxDimensions.width > + stageDimensions.width || + boundingBoxCoordinates.y < 0 || + boundingBoxCoordinates.y + boundingBoxDimensions.height > + stageDimensions.height + ) { + const newBoundingBoxDimensions = { + width: roundDownToMultiple( + _.clamp(stageDimensions.width, 64, 512), + 64 + ), + height: roundDownToMultiple( + _.clamp(stageDimensions.height, 64, 512), + 64 + ), + }; + + const newBoundingBoxCoordinates = { + x: roundToMultiple( + stageDimensions.width / 2 - newBoundingBoxDimensions.width / 2, + 64 + ), + y: roundToMultiple( + stageDimensions.height / 2 - newBoundingBoxDimensions.height / 2, + 64 + ), + }; + + state.boundingBoxDimensions = newBoundingBoxDimensions; + state.boundingBoxCoordinates = newBoundingBoxCoordinates; + } + }, }, extraReducers: canvasExtraReducers, }); @@ -558,6 +599,7 @@ export const { resizeCanvas, resetCanvasView, setCanvasContainerDimensions, + fitBoundingBoxToStage, } = canvasSlice.actions; export default canvasSlice.reducer; From 432dc704a66c4acd9b851b416ce99cc6462b10da Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:41:57 +1100 Subject: [PATCH 066/220] Organises features/canvas --- .../canvas/store/canvasExtraReducers.ts | 92 ------------------- .../src/features/canvas/store/canvasSlice.ts | 6 +- .../canvas/store/reducers/extraReducers.ts | 42 +++++++++ .../store/reducers/setInitialCanvasImage.ts | 53 +++++++++++ 4 files changed, 97 insertions(+), 96 deletions(-) delete mode 100644 frontend/src/features/canvas/store/canvasExtraReducers.ts create mode 100644 frontend/src/features/canvas/store/reducers/extraReducers.ts create mode 100644 frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts diff --git a/frontend/src/features/canvas/store/canvasExtraReducers.ts b/frontend/src/features/canvas/store/canvasExtraReducers.ts deleted file mode 100644 index 44e8a73e82..0000000000 --- a/frontend/src/features/canvas/store/canvasExtraReducers.ts +++ /dev/null @@ -1,92 +0,0 @@ -import * as InvokeAI from 'app/invokeai'; -import { initialLayerState } from './canvasSlice'; -import { CanvasState } from './canvasTypes'; -import { - roundDownToMultiple, - roundToMultiple, -} from 'common/util/roundDownToMultiple'; -import _ from 'lodash'; -import { mergeAndUploadCanvas } from '../util/mergeAndUploadCanvas'; -import { uploadImage } from 'features/gallery/util/uploadImage'; -import { ActionReducerMapBuilder } from '@reduxjs/toolkit'; - -export const setInitialCanvasImage_reducer = ( - state: CanvasState, - image: InvokeAI.Image -) => { - const newBoundingBoxDimensions = { - width: roundDownToMultiple(_.clamp(image.width, 64, 512), 64), - height: roundDownToMultiple(_.clamp(image.height, 64, 512), 64), - }; - - const newBoundingBoxCoordinates = { - x: roundToMultiple( - image.width / 2 - newBoundingBoxDimensions.width / 2, - 64 - ), - y: roundToMultiple( - image.height / 2 - newBoundingBoxDimensions.height / 2, - 64 - ), - }; - - state.boundingBoxDimensions = newBoundingBoxDimensions; - - state.boundingBoxCoordinates = newBoundingBoxCoordinates; - - state.pastLayerStates.push(state.layerState); - state.layerState = { - ...initialLayerState, - objects: [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - width: image.width, - height: image.height, - image: image, - }, - ], - }; - state.futureLayerStates = []; - - state.isCanvasInitialized = false; - state.doesCanvasNeedScaling = true; -}; - -export const canvasExtraReducers = ( - builder: ActionReducerMapBuilder -) => { - builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, originalBoundingBox } = action.payload; - - if (kind === 'temp_merged_canvas') { - state.pastLayerStates.push({ - ...state.layerState, - }); - - state.futureLayerStates = []; - - state.layerState.objects = [ - { - kind: 'image', - layer: 'base', - ...originalBoundingBox, - image, - }, - ]; - } - }); - builder.addCase(uploadImage.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, activeTabName } = action.payload; - - if (kind !== 'init') return; - - if (activeTabName === 'unifiedCanvas') { - setInitialCanvasImage_reducer(state, image); - } - }); -}; diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index b252a1b2e4..d93ea4788c 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -8,10 +8,8 @@ import { roundDownToMultiple, roundToMultiple, } from 'common/util/roundDownToMultiple'; -import { - canvasExtraReducers, - setInitialCanvasImage_reducer, -} from './canvasExtraReducers'; +import { canvasExtraReducers } from './reducers/extraReducers'; +import { setInitialCanvasImage as setInitialCanvasImage_reducer } from './reducers/setInitialCanvasImage'; import calculateScale from '../util/calculateScale'; import calculateCoordinates from '../util/calculateCoordinates'; import floorCoordinates from '../util/floorCoordinates'; diff --git a/frontend/src/features/canvas/store/reducers/extraReducers.ts b/frontend/src/features/canvas/store/reducers/extraReducers.ts new file mode 100644 index 0000000000..5c990d2867 --- /dev/null +++ b/frontend/src/features/canvas/store/reducers/extraReducers.ts @@ -0,0 +1,42 @@ +import { CanvasState } from '../canvasTypes'; +import _ from 'lodash'; +import { mergeAndUploadCanvas } from '../../util/mergeAndUploadCanvas'; +import { uploadImage } from 'features/gallery/util/uploadImage'; +import { ActionReducerMapBuilder } from '@reduxjs/toolkit'; +import { setInitialCanvasImage } from './setInitialCanvasImage'; + +export const canvasExtraReducers = ( + builder: ActionReducerMapBuilder +) => { + builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, originalBoundingBox } = action.payload; + + if (kind === 'temp_merged_canvas') { + state.pastLayerStates.push({ + ...state.layerState, + }); + + state.futureLayerStates = []; + + state.layerState.objects = [ + { + kind: 'image', + layer: 'base', + ...originalBoundingBox, + image, + }, + ]; + } + }); + builder.addCase(uploadImage.fulfilled, (state, action) => { + if (!action.payload) return; + const { image, kind, activeTabName } = action.payload; + + if (kind !== 'init') return; + + if (activeTabName === 'unifiedCanvas') { + setInitialCanvasImage(state, image); + } + }); +}; diff --git a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts new file mode 100644 index 0000000000..527f014ed3 --- /dev/null +++ b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts @@ -0,0 +1,53 @@ +import * as InvokeAI from 'app/invokeai'; +import { initialLayerState } from '../canvasSlice'; +import { CanvasState } from '../canvasTypes'; +import { + roundDownToMultiple, + roundToMultiple, +} from 'common/util/roundDownToMultiple'; +import _ from 'lodash'; + +export const setInitialCanvasImage = ( + state: CanvasState, + image: InvokeAI.Image +) => { + const newBoundingBoxDimensions = { + width: roundDownToMultiple(_.clamp(image.width, 64, 512), 64), + height: roundDownToMultiple(_.clamp(image.height, 64, 512), 64), + }; + + const newBoundingBoxCoordinates = { + x: roundToMultiple( + image.width / 2 - newBoundingBoxDimensions.width / 2, + 64 + ), + y: roundToMultiple( + image.height / 2 - newBoundingBoxDimensions.height / 2, + 64 + ), + }; + + state.boundingBoxDimensions = newBoundingBoxDimensions; + + state.boundingBoxCoordinates = newBoundingBoxCoordinates; + + state.pastLayerStates.push(state.layerState); + state.layerState = { + ...initialLayerState, + objects: [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + width: image.width, + height: image.height, + image: image, + }, + ], + }; + state.futureLayerStates = []; + + state.isCanvasInitialized = false; + state.doesCanvasNeedScaling = true; +}; From 0100a63b59993ba426fc731436c70e35bdc3b08f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:12:49 +1100 Subject: [PATCH 067/220] Stops unnecessary canvas rescales on gallery state change --- frontend/src/features/gallery/ImageGallery.tsx | 18 +++++++++--------- .../UnifiedCanvas/UnifiedCanvasDisplay.tsx | 16 +++++----------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index d591a5ecf0..cecb5d3aaf 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -1,7 +1,13 @@ import { Button } from '@chakra-ui/button'; import { NumberSize, Resizable } from 're-resizable'; -import { ChangeEvent, useEffect, useRef, useState } from 'react'; +import { + ChangeEvent, + useEffect, + useLayoutEffect, + useRef, + useState, +} from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { MdPhotoLibrary } from 'react-icons/md'; import { BsPinAngle, BsPinAngleFill } from 'react-icons/bs'; @@ -66,7 +72,7 @@ export default function ImageGallery() { galleryWidth >= GALLERY_SHOW_BUTTONS_MIN_WIDTH ); - useEffect(() => { + useLayoutEffect(() => { if (!shouldPinGallery) return; if (isLightBoxOpen) { @@ -91,10 +97,9 @@ export default function ImageGallery() { ); setGalleryMaxWidth(590); } - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, [dispatch, activeTabName, shouldPinGallery, galleryWidth, isLightBoxOpen]); - useEffect(() => { + useLayoutEffect(() => { if (!shouldPinGallery) { setGalleryMaxWidth(window.innerWidth); } @@ -119,7 +124,6 @@ export default function ImageGallery() { }; const handleCloseGallery = () => { - // if (shouldPinGallery) return; dispatch(setShouldShowGallery(false)); dispatch( setGalleryScrollPosition( @@ -127,7 +131,6 @@ export default function ImageGallery() { ) ); dispatch(setShouldHoldGalleryOpen(false)); - // dispatch(setDoesCanvasNeedScaling(true)); }; const handleClickLoadMore = () => { @@ -151,8 +154,6 @@ export default function ImageGallery() { 'g', () => { handleToggleGallery(); - shouldPinGallery && - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, [shouldShowGallery, shouldPinGallery] ); @@ -169,7 +170,6 @@ export default function ImageGallery() { 'shift+g', () => { handleSetShouldPinGallery(); - dispatch(setDoesCanvasNeedScaling(true)); }, [shouldPinGallery] ); diff --git a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx index 2569326b9a..4e21f54b0b 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx +++ b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx @@ -12,13 +12,9 @@ import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const selector = createSelector( [canvasSelector], (canvas) => { - const { - doesCanvasNeedScaling, - layerState: { objects }, - } = canvas; + const { doesCanvasNeedScaling } = canvas; return { doesCanvasNeedScaling, - doesOutpaintingHaveObjects: objects.length > 0, }; }, { @@ -30,14 +26,12 @@ const selector = createSelector( const UnifiedCanvasDisplay = () => { const dispatch = useAppDispatch(); - const { doesCanvasNeedScaling, doesOutpaintingHaveObjects } = - useAppSelector(selector); + const { doesCanvasNeedScaling } = useAppSelector(selector); useLayoutEffect(() => { - const resizeCallback = _.debounce( - () => dispatch(setDoesCanvasNeedScaling(true)), - 250 - ); + const resizeCallback = _.debounce(() => { + dispatch(setDoesCanvasNeedScaling(true)); + }, 250); window.addEventListener('resize', resizeCallback); return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); From 3994c28b77a11b1fe7e4c57a9f4046e299ae553b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:13:49 +1100 Subject: [PATCH 068/220] Fixes 2px layout shift on toggle canvas lock --- frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss b/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss index 16bcd3a5e0..6a194f4d1a 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss @@ -72,7 +72,7 @@ .inpainting-canvas-stage { outline: none; border-radius: 0.5rem; - border: 1px solid var(--border-color-light); + box-shadow: 0px 0px 0px 1px var(--border-color-light); overflow: hidden; canvas { From 425d3bc95d5fb05d16043d6a4204ab6cddb95dd6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:16:53 +1100 Subject: [PATCH 069/220] Clips lines drawn while canvas locked When drawing with the locked canvas, if a brush stroke gets too close to the edge of the canvas and its stroke would extend past the edge of the canvas, the edge of that stroke will be seen after unlocking the canvas. This could cause a problem if you unlock the canvas and now have a bunch of strokes just outside the init image area, which are far back in undo history and you cannot easily erase. With this change, lines drawn while the canvas is locked get clipped to the initial image bbox, fixing this issue. Additionally, the merge and save to gallery functions have been updated to respect the initial image bbox so they function how you'd expect. --- .../components/IAICanvasObjectRenderer.tsx | 35 ++++++++++--------- .../src/features/canvas/store/canvasSlice.ts | 23 ++++++++---- .../src/features/canvas/store/canvasTypes.ts | 11 +++++- .../store/reducers/setInitialCanvasImage.ts | 8 ++++- .../features/canvas/util/layerToDataURL.ts | 28 +++++++++++---- .../canvas/util/mergeAndUploadCanvas.ts | 14 +++++++- 6 files changed, 87 insertions(+), 32 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx b/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx index e75c6b2882..5aa4923f03 100644 --- a/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx @@ -10,8 +10,9 @@ import { canvasSelector } from 'features/canvas/store/canvasSelectors'; const selector = createSelector( [canvasSelector], (canvas) => { - const { objects } = canvas.layerState; - + const { + layerState: { objects }, + } = canvas; return { objects, }; @@ -37,20 +38,22 @@ const IAICanvasObjectRenderer = () => { ); } else if (isCanvasBaseLine(obj)) { return ( - 0 - strokeWidth={obj.strokeWidth * 2} - tension={0} - lineCap="round" - lineJoin="round" - shadowForStrokeEnabled={false} - listening={false} - globalCompositeOperation={ - obj.tool === 'brush' ? 'source-over' : 'destination-out' - } - /> + + 0 + strokeWidth={obj.strokeWidth * 2} + tension={0} + lineCap="round" + lineJoin="round" + shadowForStrokeEnabled={false} + listening={false} + globalCompositeOperation={ + obj.tool === 'brush' ? 'source-over' : 'destination-out' + } + /> + ); } })} diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index d93ea4788c..14fc6ad1eb 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -48,6 +48,7 @@ const initialCanvasState: CanvasState = { eraserSize: 50, futureLayerStates: [], inpaintReplace: 0.1, + initialCanvasImageClipRect: undefined, isCanvasInitialized: false, isDrawing: false, isMaskEnabled: true, @@ -296,6 +297,10 @@ export const canvasSlice = createSlice({ tool, strokeWidth: newStrokeWidth, points: action.payload, + clipRect: + state.shouldLockToInitialImage && state.initialCanvasImageClipRect + ? state.initialCanvasImageClipRect + : undefined, ...newColor, }); @@ -369,10 +374,14 @@ export const canvasSlice = createSlice({ state.layerState.objects.find(isCanvasBaseImage); if (!initialCanvasImage) return; + const { shouldLockToInitialImage, initialCanvasImageClipRect } = state; - const { width: imageWidth, height: imageHeight } = initialCanvasImage; + let { width: imageWidth, height: imageHeight } = initialCanvasImage; - const { shouldLockToInitialImage } = state; + if (shouldLockToInitialImage && initialCanvasImageClipRect) { + imageWidth = initialCanvasImageClipRect.clipWidth; + imageHeight = initialCanvasImageClipRect.clipHeight; + } const padding = shouldLockToInitialImage ? 1 : 0.95; @@ -403,11 +412,13 @@ export const canvasSlice = createSlice({ newScale ); - state.stageScale = newScale; - state.minimumStageScale = newScale; - state.stageCoordinates = newCoordinates; + if (!_.isEqual(state.stageDimensions, newDimensions)) { + state.minimumStageScale = newScale; + state.stageScale = newScale; + state.stageCoordinates = newCoordinates; + state.stageDimensions = newDimensions; + } - state.stageDimensions = newDimensions; state.isCanvasInitialized = true; }, resizeCanvas: (state) => { diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 22e81f2677..d3255100df 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -1,5 +1,5 @@ import * as InvokeAI from 'app/invokeai'; -import { Vector2d } from 'konva/lib/types'; +import { IRect, Vector2d } from 'konva/lib/types'; import { RgbaColor } from 'react-colorful'; export type CanvasLayer = 'base' | 'mask'; @@ -8,6 +8,13 @@ export type CanvasDrawingTool = 'brush' | 'eraser'; export type CanvasTool = CanvasDrawingTool | 'move'; +export type ClipRect = { + clipX: number; + clipY: number; + clipWidth: number; + clipHeight: number; +}; + export type Dimensions = { width: number; height: number; @@ -18,6 +25,7 @@ export type CanvasAnyLine = { tool: CanvasDrawingTool; strokeWidth: number; points: number[]; + clipRect: ClipRect | undefined; }; export type CanvasImage = { @@ -78,6 +86,7 @@ export interface CanvasState { doesCanvasNeedScaling: boolean; eraserSize: number; futureLayerStates: CanvasLayerState[]; + initialCanvasImageClipRect?: ClipRect; inpaintReplace: number; intermediateImage?: InvokeAI.Image; isCanvasInitialized: boolean; diff --git a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts index 527f014ed3..0be4274ca9 100644 --- a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts +++ b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts @@ -28,7 +28,6 @@ export const setInitialCanvasImage = ( }; state.boundingBoxDimensions = newBoundingBoxDimensions; - state.boundingBoxCoordinates = newBoundingBoxCoordinates; state.pastLayerStates.push(state.layerState); @@ -48,6 +47,13 @@ export const setInitialCanvasImage = ( }; state.futureLayerStates = []; + state.initialCanvasImageClipRect = { + clipX: 0, + clipY: 0, + clipWidth: image.width, + clipHeight: image.height, + }; + state.isCanvasInitialized = false; state.doesCanvasNeedScaling = true; }; diff --git a/frontend/src/features/canvas/util/layerToDataURL.ts b/frontend/src/features/canvas/util/layerToDataURL.ts index abdbc0a21d..701b2f53d9 100644 --- a/frontend/src/features/canvas/util/layerToDataURL.ts +++ b/frontend/src/features/canvas/util/layerToDataURL.ts @@ -1,6 +1,11 @@ import Konva from 'konva'; +import { IRect } from 'konva/lib/types'; -const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { +const layerToDataURL = ( + layer: Konva.Layer, + stageScale: number, + boundingBox?: IRect +) => { const tempScale = layer.scale(); const relativeClientRect = layer.getClientRect({ @@ -15,12 +20,21 @@ const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { const { x, y, width, height } = layer.getClientRect(); - const dataURL = layer.toDataURL({ - x: Math.round(x), - y: Math.round(y), - width: Math.round(width), - height: Math.round(height), - }); + const scaledBoundingBox = boundingBox + ? { + x: Math.round(boundingBox.x / stageScale), + y: Math.round(boundingBox.y / stageScale), + width: Math.round(boundingBox.width / stageScale), + height: Math.round(boundingBox.height / stageScale), + } + : { + x: Math.round(x), + y: Math.round(y), + width: Math.round(width), + height: Math.round(height), + }; + + const dataURL = layer.toDataURL(scaledBoundingBox); // Unscale the canvas layer.scale(tempScale); diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 76ad6e4e41..8442722747 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -22,12 +22,24 @@ export const mergeAndUploadCanvas = createAsyncThunk( const state = getState() as RootState; const stageScale = state.canvas.stageScale; + const clipRect = state.canvas.initialCanvasImageClipRect; + + const boundingBox = + state.canvas.shouldLockToInitialImage && clipRect && saveToGallery + ? { + x: clipRect.clipX, + y: clipRect.clipY, + width: clipRect.clipWidth, + height: clipRect.clipHeight, + } + : undefined; if (!canvasImageLayerRef.current) return; const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( canvasImageLayerRef.current, - stageScale + stageScale, + boundingBox ); if (!dataURL) return; From ed70fc683ca6c3b20f124dbb68dea330ea6b3f8e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:46:01 +1100 Subject: [PATCH 070/220] Fixes reset canvas view when locked --- frontend/src/features/canvas/store/canvasSlice.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 14fc6ad1eb..ccaf9df5ee 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -439,14 +439,21 @@ export const canvasSlice = createSlice({ const { contentRect } = action.payload; const baseCanvasImage = state.layerState.objects.find(isCanvasBaseImage); - const { shouldLockToInitialImage } = state; + const { shouldLockToInitialImage, initialCanvasImageClipRect } = state; if (!baseCanvasImage) return; const { stageDimensions: { width: stageWidth, height: stageHeight }, } = state; - const { x, y, width, height } = contentRect; + let { x, y, width, height } = contentRect; + + if (shouldLockToInitialImage && initialCanvasImageClipRect) { + x = initialCanvasImageClipRect.clipX; + y = initialCanvasImageClipRect.clipY; + width = initialCanvasImageClipRect.clipWidth; + height = initialCanvasImageClipRect.clipHeight; + } const padding = shouldLockToInitialImage ? 1 : 0.95; const newScale = calculateScale( From 74485411a8b9fe9e5957e47fb3e4181d86b1f188 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 20:26:27 +1100 Subject: [PATCH 071/220] Fixes send to buttons --- .../src/features/gallery/CurrentImageButtons.tsx | 13 +++++++++++-- frontend/src/features/gallery/HoverableImage.tsx | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index 1de45831a2..9d51bf3b31 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -107,6 +107,7 @@ const CurrentImageButtons = () => { shouldShowImageDetails, currentImage, isLightBoxOpen, + activeTabName, } = useAppSelector(systemSelector); const toast = useToast(); @@ -320,10 +321,14 @@ const CurrentImageButtons = () => { if (!currentImage) return; if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setInitialCanvasImage(currentImage)); dispatch(setShouldLockToInitialImage(true)); + dispatch(setInitialCanvasImage(currentImage)); dispatch(setDoesCanvasNeedScaling(true)); + if (activeTabName !== 'unifiedCanvas') { + dispatch(setActiveTab('unifiedCanvas')); + } + toast({ title: 'Sent to Unified Canvas', status: 'success', @@ -336,10 +341,14 @@ const CurrentImageButtons = () => { if (!currentImage) return; if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setInitialCanvasImage(currentImage)); dispatch(setShouldLockToInitialImage(false)); + dispatch(setInitialCanvasImage(currentImage)); dispatch(setDoesCanvasNeedScaling(true)); + if (activeTabName !== 'unifiedCanvas') { + dispatch(setActiveTab('unifiedCanvas')); + } + toast({ title: 'Sent to Unified Canvas', status: 'success', diff --git a/frontend/src/features/gallery/HoverableImage.tsx b/frontend/src/features/gallery/HoverableImage.tsx index dee6c19eb3..a517b7950a 100644 --- a/frontend/src/features/gallery/HoverableImage.tsx +++ b/frontend/src/features/gallery/HoverableImage.tsx @@ -99,8 +99,8 @@ const HoverableImage = memo((props: HoverableImageProps) => { const handleSendToInpainting = () => { if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setInitialCanvasImage(image)); dispatch(setShouldLockToInitialImage(true)); + dispatch(setInitialCanvasImage(image)); dispatch(setDoesCanvasNeedScaling(true)); if (activeTabName !== 'unifiedCanvas') { @@ -118,8 +118,8 @@ const HoverableImage = memo((props: HoverableImageProps) => { const handleSendToOutpainting = () => { if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); + dispatch(setShouldLockToInitialImage(false)); dispatch(setInitialCanvasImage(image)); - dispatch(setShouldLockToInitialImage(true)); dispatch(setDoesCanvasNeedScaling(true)); if (activeTabName !== 'unifiedCanvas') { From c0005eb0637315b65c413595013105f60607f8f1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Nov 2022 20:26:54 +1100 Subject: [PATCH 072/220] Fixes bounding box not being rounded to 64 --- frontend/src/features/canvas/store/canvasSlice.ts | 3 ++- .../src/features/canvas/util/roundDimensionsTo64.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 frontend/src/features/canvas/util/roundDimensionsTo64.ts diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index ccaf9df5ee..7a9d913444 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -23,6 +23,7 @@ import { isCanvasBaseImage, isCanvasMaskLine, } from './canvasTypes'; +import roundDimensionsTo64 from '../util/roundDimensionsTo64'; export const initialLayerState: CanvasLayerState = { objects: [], @@ -180,7 +181,7 @@ export const canvasSlice = createSlice({ }; }, setBoundingBoxDimensions: (state, action: PayloadAction) => { - state.boundingBoxDimensions = action.payload; + state.boundingBoxDimensions = roundDimensionsTo64(action.payload); }, setBoundingBoxCoordinates: (state, action: PayloadAction) => { state.boundingBoxCoordinates = floorCoordinates(action.payload); diff --git a/frontend/src/features/canvas/util/roundDimensionsTo64.ts b/frontend/src/features/canvas/util/roundDimensionsTo64.ts new file mode 100644 index 0000000000..992d343fc9 --- /dev/null +++ b/frontend/src/features/canvas/util/roundDimensionsTo64.ts @@ -0,0 +1,11 @@ +import { roundToMultiple } from 'common/util/roundDownToMultiple'; +import { Dimensions } from '../store/canvasTypes'; + +const roundDimensionsTo64 = (dimensions: Dimensions): Dimensions => { + return { + width: roundToMultiple(dimensions.width, 64), + height: roundToMultiple(dimensions.height, 64), + }; +}; + +export default roundDimensionsTo64; From 635e7da05d24728dea488ab5e94bffa4545361c5 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 13:02:47 +1100 Subject: [PATCH 073/220] Abandons "inpainting" canvas lock --- frontend/src/app/store.ts | 12 +- .../features/canvas/components/IAICanvas.tsx | 54 +-------- .../components/IAICanvasObjectRenderer.tsx | 30 +++-- .../canvas/components/IAICanvasResizer.tsx | 20 +--- .../IAICanvasToolbar/IAICanvasBoundingBox.tsx | 108 ++++-------------- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 20 +--- .../features/canvas/hooks/useCanvasZoom.ts | 47 ++------ .../features/canvas/store/canvasSelectors.ts | 3 - .../src/features/canvas/store/canvasSlice.ts | 71 ++++-------- .../src/features/canvas/store/canvasTypes.ts | 10 -- .../store/reducers/setInitialCanvasImage.ts | 7 -- .../features/canvas/util/layerToDataURL.ts | 28 ++--- .../canvas/util/mergeAndUploadCanvas.ts | 14 +-- .../features/gallery/CurrentImageButtons.tsx | 35 +----- .../src/features/gallery/HoverableImage.tsx | 32 +----- 15 files changed, 99 insertions(+), 392 deletions(-) diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 98ad1af6ae..6315d36ba8 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -84,14 +84,14 @@ export const store = configureStore({ devTools: { // Uncommenting these very rapidly called actions makes the redux dev tools output much more readable actionsDenylist: [ - // 'canvas/setCursorPosition', - // 'canvas/setStageCoordinates', - // 'canvas/setStageScale', - // 'canvas/setIsDrawing', + 'canvas/setCursorPosition', + 'canvas/setStageCoordinates', + 'canvas/setStageScale', + 'canvas/setIsDrawing', // 'canvas/setBoundingBoxCoordinates', // 'canvas/setBoundingBoxDimensions', - // 'canvas/setIsDrawing', - // 'canvas/addPointToCurrentLine', + 'canvas/setIsDrawing', + 'canvas/addPointToCurrentLine', ], }, }); diff --git a/frontend/src/features/canvas/components/IAICanvas.tsx b/frontend/src/features/canvas/components/IAICanvas.tsx index 5106ca61b1..a321267269 100644 --- a/frontend/src/features/canvas/components/IAICanvas.tsx +++ b/frontend/src/features/canvas/components/IAICanvas.tsx @@ -1,13 +1,11 @@ -import { MutableRefObject, useCallback, useRef } from 'react'; +import { MutableRefObject, useRef } from 'react'; import Konva from 'konva'; import { Layer, Stage } from 'react-konva'; import { Stage as StageType } from 'konva/lib/Stage'; import { useAppSelector } from 'app/store'; import { - initialCanvasImageSelector, canvasSelector, isStagingSelector, - shouldLockToInitialImageSelector, } from 'features/canvas/store/canvasSelectors'; import IAICanvasMaskLines from './IAICanvasMaskLines'; import IAICanvasBrushPreview from './IAICanvasBrushPreview'; @@ -16,7 +14,6 @@ import IAICanvasBoundingBox from './IAICanvasToolbar/IAICanvasBoundingBox'; import useCanvasHotkeys from '../hooks/useCanvasHotkeys'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; import IAICanvasMaskCompositer from './IAICanvasMaskCompositer'; import useCanvasWheel from '../hooks/useCanvasZoom'; import useCanvasMouseDown from '../hooks/useCanvasMouseDown'; @@ -33,20 +30,8 @@ import IAICanvasStagingArea from './IAICanvasStagingArea'; import IAICanvasStagingAreaToolbar from './IAICanvasStagingAreaToolbar'; const selector = createSelector( - [ - shouldLockToInitialImageSelector, - canvasSelector, - isStagingSelector, - activeTabNameSelector, - initialCanvasImageSelector, - ], - ( - shouldLockToInitialImage, - canvas, - isStaging, - activeTabName, - initialCanvasImage - ) => { + [canvasSelector, isStagingSelector], + (canvas, isStaging) => { const { isMaskEnabled, stageScale, @@ -90,8 +75,6 @@ const selector = createSelector( tool, isStaging, shouldShowIntermediates, - shouldLockToInitialImage, - initialCanvasImage, }; }, { @@ -118,8 +101,6 @@ const IAICanvas = () => { tool, isStaging, shouldShowIntermediates, - shouldLockToInitialImage, - initialCanvasImage, } = useAppSelector(selector); useCanvasHotkeys(); @@ -145,34 +126,6 @@ const IAICanvas = () => { const { handleDragStart, handleDragMove, handleDragEnd } = useCanvasDragMove(); - const dragBoundFunc = useCallback( - (newCoordinates: Vector2d) => { - if (shouldLockToInitialImage && initialCanvasImage) { - newCoordinates.x = _.clamp( - newCoordinates.x, - stageDimensions.width - - Math.floor(initialCanvasImage.width * stageScale), - 0 - ); - newCoordinates.y = _.clamp( - newCoordinates.y, - stageDimensions.height - - Math.floor(initialCanvasImage.height * stageScale), - 0 - ); - } - - return newCoordinates; - }, - [ - initialCanvasImage, - shouldLockToInitialImage, - stageDimensions.height, - stageDimensions.width, - stageScale, - ] - ); - return (
@@ -188,7 +141,6 @@ const IAICanvas = () => { width={stageDimensions.width} height={stageDimensions.height} scale={{ x: stageScale, y: stageScale }} - dragBoundFunc={dragBoundFunc} onMouseDown={handleMouseDown} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseOut} diff --git a/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx b/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx index 5aa4923f03..0a03cc8f28 100644 --- a/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasObjectRenderer.tsx @@ -38,22 +38,20 @@ const IAICanvasObjectRenderer = () => { ); } else if (isCanvasBaseLine(obj)) { return ( - - 0 - strokeWidth={obj.strokeWidth * 2} - tension={0} - lineCap="round" - lineJoin="round" - shadowForStrokeEnabled={false} - listening={false} - globalCompositeOperation={ - obj.tool === 'brush' ? 'source-over' : 'destination-out' - } - /> - + 0 + strokeWidth={obj.strokeWidth * 2} + tension={0} + lineCap="round" + lineJoin="round" + shadowForStrokeEnabled={false} + listening={false} + globalCompositeOperation={ + obj.tool === 'brush' ? 'source-over' : 'destination-out' + } + /> ); } })} diff --git a/frontend/src/features/canvas/components/IAICanvasResizer.tsx b/frontend/src/features/canvas/components/IAICanvasResizer.tsx index 302700ce45..b9bea759bf 100644 --- a/frontend/src/features/canvas/components/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasResizer.tsx @@ -9,21 +9,19 @@ import { setDoesCanvasNeedScaling, } from 'features/canvas/store/canvasSlice'; import { createSelector } from '@reduxjs/toolkit'; -import { canvasSelector, initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors'; +import { + canvasSelector, + initialCanvasImageSelector, +} from 'features/canvas/store/canvasSelectors'; const canvasResizerSelector = createSelector( canvasSelector, initialCanvasImageSelector, activeTabNameSelector, (canvas, initialCanvasImage, activeTabName) => { - const { - doesCanvasNeedScaling, - shouldLockToInitialImage, - isCanvasInitialized, - } = canvas; + const { doesCanvasNeedScaling, isCanvasInitialized } = canvas; return { doesCanvasNeedScaling, - shouldLockToInitialImage, activeTabName, initialCanvasImage, isCanvasInitialized, @@ -35,7 +33,6 @@ const IAICanvasResizer = () => { const dispatch = useAppDispatch(); const { doesCanvasNeedScaling, - shouldLockToInitialImage, activeTabName, initialCanvasImage, isCanvasInitialized, @@ -58,11 +55,7 @@ const IAICanvasResizer = () => { }) ); - if (!isCanvasInitialized || shouldLockToInitialImage) { - dispatch(resizeAndScaleCanvas()); - } else { - dispatch(resizeCanvas()); - } + dispatch(resizeCanvas()); dispatch(setDoesCanvasNeedScaling(false)); }, 0); @@ -72,7 +65,6 @@ const IAICanvasResizer = () => { doesCanvasNeedScaling, activeTabName, isCanvasInitialized, - shouldLockToInitialImage, ]); return ( diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx index ffb3852366..1c7718df8a 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBoundingBox.tsx @@ -1,18 +1,16 @@ import { createSelector } from '@reduxjs/toolkit'; import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; -import { Box } from 'konva/lib/shapes/Transformer'; import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; import { useCallback, useEffect, useRef } from 'react'; import { Group, Rect, Transformer } from 'react-konva'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { roundToMultiple } from 'common/util/roundDownToMultiple'; import { - initialCanvasImageSelector, - canvasSelector, - shouldLockToInitialImageSelector, -} from 'features/canvas/store/canvasSelectors'; + roundDownToMultiple, + roundToMultiple, +} from 'common/util/roundDownToMultiple'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { setBoundingBoxCoordinates, setBoundingBoxDimensions, @@ -21,14 +19,10 @@ import { setIsTransformingBoundingBox, } from 'features/canvas/store/canvasSlice'; import { GroupConfig } from 'konva/lib/Group'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; const boundingBoxPreviewSelector = createSelector( - shouldLockToInitialImageSelector, canvasSelector, - initialCanvasImageSelector, - activeTabNameSelector, - (shouldLockToInitialImage, canvas, initialCanvasImage, activeTabName) => { + (canvas) => { const { boundingBoxCoordinates, boundingBoxDimensions, @@ -54,14 +48,11 @@ const boundingBoxPreviewSelector = createSelector( isTransformingBoundingBox, stageDimensions, stageScale, - initialCanvasImage, - activeTabName, shouldSnapToGrid, tool, stageCoordinates, boundingBoxStrokeWidth: (isMouseOverBoundingBox ? 8 : 1) / stageScale, hitStrokeWidth: 20 / stageScale, - shouldLockToInitialImage, }; }, { @@ -88,13 +79,10 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { stageCoordinates, stageDimensions, stageScale, - initialCanvasImage, - activeTabName, shouldSnapToGrid, tool, boundingBoxStrokeWidth, hitStrokeWidth, - shouldLockToInitialImage, } = useAppSelector(boundingBoxPreviewSelector); const transformerRef = useRef(null); @@ -139,40 +127,6 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { [dispatch, shouldSnapToGrid] ); - const dragBoundFunc = useCallback( - (position: Vector2d) => { - /** - * This limits the bounding box's drag coordinates. - */ - if (!shouldLockToInitialImage) return boundingBoxCoordinates; - - const { x, y } = position; - - const maxX = - stageDimensions.width - - boundingBoxDimensions.width - - (stageDimensions.width % 64); - - const maxY = - stageDimensions.height - - boundingBoxDimensions.height - - (stageDimensions.height % 64); - - const clampedX = Math.floor(_.clamp(x, 0, maxX)); - const clampedY = Math.floor(_.clamp(y, 0, maxY)); - - return { x: clampedX, y: clampedY }; - }, - [ - shouldLockToInitialImage, - boundingBoxCoordinates, - stageDimensions.width, - stageDimensions.height, - boundingBoxDimensions.width, - boundingBoxDimensions.height, - ] - ); - const handleOnTransform = useCallback(() => { /** * The Konva Transformer changes the object's anchor point and scale factor, @@ -202,15 +156,15 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { dispatch( setBoundingBoxCoordinates({ - x, - y, + x: shouldSnapToGrid ? roundDownToMultiple(x, 64) : x, + y: shouldSnapToGrid ? roundDownToMultiple(y, 64) : y, }) ); // Reset the scale now that the coords/dimensions have been un-scaled rect.scaleX(1); rect.scaleY(1); - }, [dispatch]); + }, [dispatch, shouldSnapToGrid]); const anchorDragBoundFunc = useCallback( ( @@ -225,40 +179,26 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { * * We need to snap the new dimensions to steps of 64. But because the whole * stage is scaled, our actual desired step is actually 64 * the stage scale. + * + * Additionally, we need to ensure we offset the position so that we snap to a + * multiple of 64 that is aligned with the grid, and not from the absolute zero + * coordinate. */ - return { - x: roundToMultiple(newPos.x, scaledStep), - y: roundToMultiple(newPos.y, scaledStep), + // Calculate the offset of the grid. + const offsetX = oldPos.x % scaledStep; + const offsetY = oldPos.y % scaledStep; + + const newCoordinates = { + x: roundDownToMultiple(newPos.x, scaledStep) + offsetX, + y: roundDownToMultiple(newPos.y, scaledStep) + offsetY, }; + + return newCoordinates; }, [scaledStep] ); - const boundBoxFunc = useCallback( - (oldBoundBox: Box, newBoundBox: Box) => { - /** - * The transformer uses this callback to limit valid transformations. - * Unlike anchorDragBoundFunc, it does get a width and height, so - * the logic to constrain the size of the bounding box is very simple. - */ - - // On the Inpainting canvas, the bounding box needs to stay in the stage - if ( - shouldLockToInitialImage && - (newBoundBox.width + newBoundBox.x > stageDimensions.width || - newBoundBox.height + newBoundBox.y > stageDimensions.height || - newBoundBox.x < 0 || - newBoundBox.y < 0) - ) { - return oldBoundBox; - } - - return newBoundBox; - }, - [shouldLockToInitialImage, stageDimensions.height, stageDimensions.width] - ); - const handleStartedTransforming = () => { dispatch(setIsTransformingBoundingBox(true)); }; @@ -310,11 +250,11 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { globalCompositeOperation={'destination-out'} /> { width={boundingBoxDimensions.width} x={boundingBoxCoordinates.x} y={boundingBoxCoordinates.y} - hitStrokeWidth={hitStrokeWidth} /> { borderDash={[4, 4]} borderEnabled={true} borderStroke={'black'} - boundBoxFunc={boundBoxFunc} draggable={false} enabledAnchors={tool === 'move' ? undefined : []} flipEnabled={false} diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 2bf3ea9091..a020a694c7 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -4,7 +4,6 @@ import { resizeAndScaleCanvas, resetCanvas, resetCanvasView, - setShouldLockToInitialImage, setTool, fitBoundingBoxToStage, } from 'features/canvas/store/canvasSlice'; @@ -39,11 +38,10 @@ import { export const selector = createSelector( [canvasSelector, isStagingSelector], (canvas, isStaging) => { - const { tool, shouldLockToInitialImage } = canvas; + const { tool } = canvas; return { tool, isStaging, - shouldLockToInitialImage, }; }, { @@ -55,16 +53,7 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool, isStaging, shouldLockToInitialImage } = - useAppSelector(selector); - - const handleToggleShouldLockToInitialImage = ( - e: ChangeEvent - ) => { - dispatch(setShouldLockToInitialImage(e.target.checked)); - dispatch(resizeAndScaleCanvas()); - dispatch(fitBoundingBoxToStage()); - }; + const { tool, isStaging } = useAppSelector(selector); return (
@@ -151,11 +140,6 @@ const IAICanvasOutpaintingControls = () => { onClick={() => dispatch(resetCanvas())} /> -
); }; diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts index 625997ade9..c553a1f5dc 100644 --- a/frontend/src/features/canvas/hooks/useCanvasZoom.ts +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -8,9 +8,11 @@ import { MutableRefObject, useCallback } from 'react'; import { canvasSelector, initialCanvasImageSelector, - shouldLockToInitialImageSelector, } from 'features/canvas/store/canvasSelectors'; -import { setStageCoordinates, setStageScale } from 'features/canvas/store/canvasSlice'; +import { + setStageCoordinates, + setStageScale, +} from 'features/canvas/store/canvasSlice'; import { CANVAS_SCALE_BY, MAX_CANVAS_SCALE, @@ -18,13 +20,8 @@ import { } from '../util/constants'; const selector = createSelector( - [ - activeTabNameSelector, - canvasSelector, - initialCanvasImageSelector, - shouldLockToInitialImageSelector, - ], - (activeTabName, canvas, initialCanvasImage, shouldLockToInitialImage) => { + [activeTabNameSelector, canvasSelector, initialCanvasImageSelector], + (activeTabName, canvas, initialCanvasImage) => { const { isMoveStageKeyHeld, stageScale, @@ -36,7 +33,6 @@ const selector = createSelector( stageScale, activeTabName, initialCanvasImage, - shouldLockToInitialImage, stageDimensions, minimumStageScale, }; @@ -51,7 +47,6 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { stageScale, activeTabName, initialCanvasImage, - shouldLockToInitialImage, stageDimensions, minimumStageScale, } = useAppSelector(selector); @@ -83,7 +78,7 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { const newScale = _.clamp( stageScale * CANVAS_SCALE_BY ** delta, - shouldLockToInitialImage ? minimumStageScale : MIN_CANVAS_SCALE, + MIN_CANVAS_SCALE, MAX_CANVAS_SCALE ); @@ -92,36 +87,10 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { y: cursorPos.y - mousePointTo.y * newScale, }; - if (shouldLockToInitialImage) { - newCoordinates.x = _.clamp( - newCoordinates.x, - stageDimensions.width - - Math.floor(initialCanvasImage.width * newScale), - 0 - ); - newCoordinates.y = _.clamp( - newCoordinates.y, - stageDimensions.height - - Math.floor(initialCanvasImage.height * newScale), - 0 - ); - } - dispatch(setStageScale(newScale)); dispatch(setStageCoordinates(newCoordinates)); }, - [ - activeTabName, - stageRef, - isMoveStageKeyHeld, - initialCanvasImage, - stageScale, - shouldLockToInitialImage, - minimumStageScale, - dispatch, - stageDimensions.width, - stageDimensions.height, - ] + [stageRef, isMoveStageKeyHeld, initialCanvasImage, stageScale, dispatch] ); }; diff --git a/frontend/src/features/canvas/store/canvasSelectors.ts b/frontend/src/features/canvas/store/canvasSelectors.ts index 2914438917..c9c735ee29 100644 --- a/frontend/src/features/canvas/store/canvasSelectors.ts +++ b/frontend/src/features/canvas/store/canvasSelectors.ts @@ -6,9 +6,6 @@ export const canvasSelector = (state: RootState): CanvasState => state.canvas; export const isStagingSelector = (state: RootState): boolean => state.canvas.layerState.stagingArea.images.length > 0; -export const shouldLockToInitialImageSelector = (state: RootState): boolean => - state.canvas.shouldLockToInitialImage; - export const initialCanvasImageSelector = ( state: RootState ): CanvasImage | undefined => diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 7a9d913444..a1bdf5a2b5 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -49,7 +49,6 @@ const initialCanvasState: CanvasState = { eraserSize: 50, futureLayerStates: [], inpaintReplace: 0.1, - initialCanvasImageClipRect: undefined, isCanvasInitialized: false, isDrawing: false, isMaskEnabled: true, @@ -68,7 +67,6 @@ const initialCanvasState: CanvasState = { shouldAutoSave: false, shouldDarkenOutsideBoundingBox: false, shouldLockBoundingBox: false, - shouldLockToInitialImage: false, shouldPreserveMaskedArea: false, shouldShowBoundingBox: true, shouldShowBrush: true, @@ -298,10 +296,6 @@ export const canvasSlice = createSlice({ tool, strokeWidth: newStrokeWidth, points: action.payload, - clipRect: - state.shouldLockToInitialImage && state.initialCanvasImageClipRect - ? state.initialCanvasImageClipRect - : undefined, ...newColor, }); @@ -375,16 +369,10 @@ export const canvasSlice = createSlice({ state.layerState.objects.find(isCanvasBaseImage); if (!initialCanvasImage) return; - const { shouldLockToInitialImage, initialCanvasImageClipRect } = state; - let { width: imageWidth, height: imageHeight } = initialCanvasImage; + const { width: imageWidth, height: imageHeight } = initialCanvasImage; - if (shouldLockToInitialImage && initialCanvasImageClipRect) { - imageWidth = initialCanvasImageClipRect.clipWidth; - imageHeight = initialCanvasImageClipRect.clipHeight; - } - - const padding = shouldLockToInitialImage ? 1 : 0.95; + const padding = 0.95; const newScale = calculateScale( containerWidth, @@ -395,12 +383,8 @@ export const canvasSlice = createSlice({ ); const newDimensions = { - width: shouldLockToInitialImage - ? Math.floor(imageWidth * newScale) - : Math.floor(containerWidth), - height: shouldLockToInitialImage - ? Math.floor(imageHeight * newScale) - : Math.floor(containerHeight), + width: Math.floor(containerWidth), + height: Math.floor(containerHeight), }; const newCoordinates = calculateCoordinates( @@ -416,7 +400,7 @@ export const canvasSlice = createSlice({ if (!_.isEqual(state.stageDimensions, newDimensions)) { state.minimumStageScale = newScale; state.stageScale = newScale; - state.stageCoordinates = newCoordinates; + state.stageCoordinates = floorCoordinates(newCoordinates); state.stageDimensions = newDimensions; } @@ -440,23 +424,16 @@ export const canvasSlice = createSlice({ const { contentRect } = action.payload; const baseCanvasImage = state.layerState.objects.find(isCanvasBaseImage); - const { shouldLockToInitialImage, initialCanvasImageClipRect } = state; + if (!baseCanvasImage) return; const { stageDimensions: { width: stageWidth, height: stageHeight }, } = state; - let { x, y, width, height } = contentRect; + const { x, y, width, height } = contentRect; - if (shouldLockToInitialImage && initialCanvasImageClipRect) { - x = initialCanvasImageClipRect.clipX; - y = initialCanvasImageClipRect.clipY; - width = initialCanvasImageClipRect.clipWidth; - height = initialCanvasImageClipRect.clipHeight; - } - - const padding = shouldLockToInitialImage ? 1 : 0.95; + const padding = 0.95; const newScale = calculateScale( stageWidth, stageHeight, @@ -515,39 +492,36 @@ export const canvasSlice = createSlice({ state.futureLayerStates = []; }, - setShouldLockToInitialImage: (state, action: PayloadAction) => { - state.shouldLockToInitialImage = action.payload; - }, fitBoundingBoxToStage: (state) => { - const { boundingBoxDimensions, boundingBoxCoordinates, stageDimensions } = - state; + const { + boundingBoxDimensions, + boundingBoxCoordinates, + stageDimensions, + stageScale, + } = state; + const scaledStageWidth = stageDimensions.width / stageScale; + const scaledStageHeight = stageDimensions.height / stageScale; if ( boundingBoxCoordinates.x < 0 || boundingBoxCoordinates.x + boundingBoxDimensions.width > - stageDimensions.width || + scaledStageWidth || boundingBoxCoordinates.y < 0 || boundingBoxCoordinates.y + boundingBoxDimensions.height > - stageDimensions.height + scaledStageHeight ) { const newBoundingBoxDimensions = { - width: roundDownToMultiple( - _.clamp(stageDimensions.width, 64, 512), - 64 - ), - height: roundDownToMultiple( - _.clamp(stageDimensions.height, 64, 512), - 64 - ), + width: roundDownToMultiple(_.clamp(scaledStageWidth, 64, 512), 64), + height: roundDownToMultiple(_.clamp(scaledStageHeight, 64, 512), 64), }; const newBoundingBoxCoordinates = { x: roundToMultiple( - stageDimensions.width / 2 - newBoundingBoxDimensions.width / 2, + scaledStageWidth / 2 - newBoundingBoxDimensions.width / 2, 64 ), y: roundToMultiple( - stageDimensions.height / 2 - newBoundingBoxDimensions.height / 2, + scaledStageHeight / 2 - newBoundingBoxDimensions.height / 2, 64 ), }; @@ -611,7 +585,6 @@ export const { prevStagingAreaImage, commitStagingAreaImage, discardStagedImages, - setShouldLockToInitialImage, resizeAndScaleCanvas, resizeCanvas, resetCanvasView, diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index d3255100df..66887309a4 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -8,13 +8,6 @@ export type CanvasDrawingTool = 'brush' | 'eraser'; export type CanvasTool = CanvasDrawingTool | 'move'; -export type ClipRect = { - clipX: number; - clipY: number; - clipWidth: number; - clipHeight: number; -}; - export type Dimensions = { width: number; height: number; @@ -25,7 +18,6 @@ export type CanvasAnyLine = { tool: CanvasDrawingTool; strokeWidth: number; points: number[]; - clipRect: ClipRect | undefined; }; export type CanvasImage = { @@ -86,7 +78,6 @@ export interface CanvasState { doesCanvasNeedScaling: boolean; eraserSize: number; futureLayerStates: CanvasLayerState[]; - initialCanvasImageClipRect?: ClipRect; inpaintReplace: number; intermediateImage?: InvokeAI.Image; isCanvasInitialized: boolean; @@ -107,7 +98,6 @@ export interface CanvasState { shouldAutoSave: boolean; shouldDarkenOutsideBoundingBox: boolean; shouldLockBoundingBox: boolean; - shouldLockToInitialImage: boolean; shouldPreserveMaskedArea: boolean; shouldShowBoundingBox: boolean; shouldShowBrush: boolean; diff --git a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts index 0be4274ca9..fb45597406 100644 --- a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts +++ b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts @@ -47,13 +47,6 @@ export const setInitialCanvasImage = ( }; state.futureLayerStates = []; - state.initialCanvasImageClipRect = { - clipX: 0, - clipY: 0, - clipWidth: image.width, - clipHeight: image.height, - }; - state.isCanvasInitialized = false; state.doesCanvasNeedScaling = true; }; diff --git a/frontend/src/features/canvas/util/layerToDataURL.ts b/frontend/src/features/canvas/util/layerToDataURL.ts index 701b2f53d9..abdbc0a21d 100644 --- a/frontend/src/features/canvas/util/layerToDataURL.ts +++ b/frontend/src/features/canvas/util/layerToDataURL.ts @@ -1,11 +1,6 @@ import Konva from 'konva'; -import { IRect } from 'konva/lib/types'; -const layerToDataURL = ( - layer: Konva.Layer, - stageScale: number, - boundingBox?: IRect -) => { +const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { const tempScale = layer.scale(); const relativeClientRect = layer.getClientRect({ @@ -20,21 +15,12 @@ const layerToDataURL = ( const { x, y, width, height } = layer.getClientRect(); - const scaledBoundingBox = boundingBox - ? { - x: Math.round(boundingBox.x / stageScale), - y: Math.round(boundingBox.y / stageScale), - width: Math.round(boundingBox.width / stageScale), - height: Math.round(boundingBox.height / stageScale), - } - : { - x: Math.round(x), - y: Math.round(y), - width: Math.round(width), - height: Math.round(height), - }; - - const dataURL = layer.toDataURL(scaledBoundingBox); + const dataURL = layer.toDataURL({ + x: Math.round(x), + y: Math.round(y), + width: Math.round(width), + height: Math.round(height), + }); // Unscale the canvas layer.scale(tempScale); diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 8442722747..76ad6e4e41 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -22,24 +22,12 @@ export const mergeAndUploadCanvas = createAsyncThunk( const state = getState() as RootState; const stageScale = state.canvas.stageScale; - const clipRect = state.canvas.initialCanvasImageClipRect; - - const boundingBox = - state.canvas.shouldLockToInitialImage && clipRect && saveToGallery - ? { - x: clipRect.clipX, - y: clipRect.clipY, - width: clipRect.clipWidth, - height: clipRect.clipHeight, - } - : undefined; if (!canvasImageLayerRef.current) return; const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( canvasImageLayerRef.current, - stageScale, - boundingBox + stageScale ); if (!dataURL) return; diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index 9d51bf3b31..6b3f1ef375 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -38,7 +38,6 @@ import { import { setDoesCanvasNeedScaling, setInitialCanvasImage, - setShouldLockToInitialImage, } from 'features/canvas/store/canvasSlice'; import { GalleryState } from './gallerySlice'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; @@ -317,31 +316,10 @@ const CurrentImageButtons = () => { const handleClickShowImageDetails = () => dispatch(setShouldShowImageDetails(!shouldShowImageDetails)); - const handleSendToInpainting = () => { + const handleSendToCanvas = () => { if (!currentImage) return; if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setShouldLockToInitialImage(true)); - dispatch(setInitialCanvasImage(currentImage)); - dispatch(setDoesCanvasNeedScaling(true)); - - if (activeTabName !== 'unifiedCanvas') { - dispatch(setActiveTab('unifiedCanvas')); - } - - toast({ - title: 'Sent to Unified Canvas', - status: 'success', - duration: 2500, - isClosable: true, - }); - }; - - const handleSendToOutpainting = () => { - if (!currentImage) return; - if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - - dispatch(setShouldLockToInitialImage(false)); dispatch(setInitialCanvasImage(currentImage)); dispatch(setDoesCanvasNeedScaling(true)); @@ -393,17 +371,10 @@ const CurrentImageButtons = () => { } > - Send to Inpainting - - } - > - Send to Outpainting + Send to Unified Canvas { }); }; - const handleSendToInpainting = () => { + const handleSendToCanvas = () => { if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - dispatch(setShouldLockToInitialImage(true)); dispatch(setInitialCanvasImage(image)); dispatch(setDoesCanvasNeedScaling(true)); @@ -108,26 +106,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { } toast({ - title: 'Sent to Inpainting', - status: 'success', - duration: 2500, - isClosable: true, - }); - }; - - const handleSendToOutpainting = () => { - if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); - - dispatch(setShouldLockToInitialImage(false)); - dispatch(setInitialCanvasImage(image)); - dispatch(setDoesCanvasNeedScaling(true)); - - if (activeTabName !== 'unifiedCanvas') { - dispatch(setActiveTab('unifiedCanvas')); - } - - toast({ - title: 'Sent to Outpainting', + title: 'Sent to Unified Canvas', status: 'success', duration: 2500, isClosable: true, @@ -257,11 +236,8 @@ const HoverableImage = memo((props: HoverableImageProps) => { Send to Image To Image - - Send to Inpainting - - - Send to Outpainting + + Send to Unified Canvas Delete Image From 19322fc1ec84a1854862c1a517fe6be90ba534fa Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 13:35:03 +1100 Subject: [PATCH 074/220] Fixes save to gallery including empty area, adds download and copy image --- backend/invoke_ai_web_server.py | 27 +++++++-------- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 25 ++++++++++++-- .../src/features/canvas/util/copyImage.ts | 34 +++++++++++++++++++ .../src/features/canvas/util/downloadFile.ts | 14 ++++++++ .../canvas/util/mergeAndUploadCanvas.ts | 33 ++++++++++++------ .../src/features/gallery/util/uploadImage.ts | 8 ----- 6 files changed, 106 insertions(+), 35 deletions(-) create mode 100644 frontend/src/features/canvas/util/copyImage.ts create mode 100644 frontend/src/features/canvas/util/downloadFile.ts diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 271407381d..07e76e9263 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -165,20 +165,16 @@ class InvokeAIWebServer: pil_image = Image.open(file_path) - # visible_image_bbox = pil_image.getbbox() - # pil_image = pil_image.crop(visible_image_bbox) - # pil_image.save(file_path) - # if "cropVisible" in data and data["cropVisible"] == True: - # visible_image_bbox = pil_image.getbbox() - # pil_image = pil_image.crop(visible_image_bbox) - # pil_image.save(file_path) + if "cropVisible" in data and data["cropVisible"] == True: + visible_image_bbox = pil_image.getbbox() + pil_image = pil_image.crop(visible_image_bbox) + pil_image.save(file_path) (width, height) = pil_image.size response = { "url": self.get_url_from_image_path(file_path), "mtime": mtime, - # "bbox": visible_image_bbox, "width": width, "height": height, } @@ -607,6 +603,12 @@ class InvokeAIWebServer: actual_generation_mode = generation_parameters["generation_mode"] original_bounding_box = None + + progress = Progress(generation_parameters=generation_parameters) + + self.socketio.emit("progressUpdate", progress.to_formatted_dict()) + eventlet.sleep(0) + """ TODO: If a result image is used as an init image, and then deleted, we will want to be @@ -658,8 +660,6 @@ class InvokeAIWebServer: initial_image, mask_image ) - print(initial_image, mask_image) - """ Apply the mask to the init image, creating a "mask" image with transparency where inpainting should occur. This is the kind of @@ -708,11 +708,6 @@ class InvokeAIWebServer: init_img_path = self.get_image_path_from_url(init_img_url) generation_parameters["init_img"] = init_img_path - progress = Progress(generation_parameters=generation_parameters) - - self.socketio.emit("progressUpdate", progress.to_formatted_dict()) - eventlet.sleep(0) - def image_progress(sample, step): if self.canceled.is_set(): raise CanceledException @@ -967,6 +962,8 @@ class InvokeAIWebServer: eventlet.sleep(0) progress.set_current_iteration(progress.current_iteration + 1) + + print(generation_parameters) self.generate.prompt2image( **generation_parameters, diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index a020a694c7..f175fed9f5 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -78,7 +78,6 @@ const IAICanvasOutpaintingControls = () => { dispatch( mergeAndUploadCanvas({ canvasImageLayerRef, - saveToGallery: false, }) ); }} @@ -89,7 +88,11 @@ const IAICanvasOutpaintingControls = () => { icon={} onClick={() => { dispatch( - mergeAndUploadCanvas({ canvasImageLayerRef, saveToGallery: true }) + mergeAndUploadCanvas({ + canvasImageLayerRef, + cropVisible: true, + saveToGallery: true, + }) ); }} /> @@ -97,11 +100,29 @@ const IAICanvasOutpaintingControls = () => { aria-label="Copy Selection" tooltip="Copy Selection" icon={} + onClick={() => { + dispatch( + mergeAndUploadCanvas({ + canvasImageLayerRef, + cropVisible: true, + copyAfterSaving: true, + }) + ); + }} /> } + onClick={() => { + dispatch( + mergeAndUploadCanvas({ + canvasImageLayerRef, + cropVisible: true, + downloadAfterSaving: true, + }) + ); + }} /> diff --git a/frontend/src/features/canvas/util/copyImage.ts b/frontend/src/features/canvas/util/copyImage.ts new file mode 100644 index 0000000000..06abbe47fe --- /dev/null +++ b/frontend/src/features/canvas/util/copyImage.ts @@ -0,0 +1,34 @@ +/** + * Copies an image to the clipboard by drawing it to a canvas and then + * calling toBlob() on the canvas. + */ +const copyImage = (url: string, width: number, height: number) => { + const imageElement = document.createElement('img'); + + imageElement.addEventListener('load', () => { + const canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + const context = canvas.getContext('2d'); + + if (!context) return; + + context.drawImage(imageElement, 0, 0); + + canvas.toBlob((blob) => { + blob && + navigator.clipboard.write([ + new ClipboardItem({ + [blob.type]: blob, + }), + ]); + }); + + canvas.remove(); + imageElement.remove(); + }); + + imageElement.src = url; +}; + +export default copyImage; diff --git a/frontend/src/features/canvas/util/downloadFile.ts b/frontend/src/features/canvas/util/downloadFile.ts new file mode 100644 index 0000000000..abb902d019 --- /dev/null +++ b/frontend/src/features/canvas/util/downloadFile.ts @@ -0,0 +1,14 @@ +/** + * Downloads a file, given its URL. + */ +const downloadFile = (url: string) => { + const a = document.createElement('a'); + a.href = url; + a.download = ''; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + a.remove(); +}; + +export default downloadFile; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 76ad6e4e41..fa6cc1d27b 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -5,17 +5,28 @@ import { MutableRefObject } from 'react'; import * as InvokeAI from 'app/invokeai'; import { v4 as uuidv4 } from 'uuid'; import layerToDataURL from './layerToDataURL'; +import downloadFile from './downloadFile'; +import copyImage from './copyImage'; export const mergeAndUploadCanvas = createAsyncThunk( 'canvas/mergeAndUploadCanvas', async ( args: { canvasImageLayerRef: MutableRefObject; - saveToGallery: boolean; + cropVisible?: boolean; + saveToGallery?: boolean; + downloadAfterSaving?: boolean; + copyAfterSaving?: boolean; }, thunkAPI ) => { - const { canvasImageLayerRef, saveToGallery } = args; + const { + canvasImageLayerRef, + saveToGallery, + downloadAfterSaving, + cropVisible, + copyAfterSaving, + } = args; const { getState } = thunkAPI; @@ -40,7 +51,7 @@ export const mergeAndUploadCanvas = createAsyncThunk( dataURL, filename: 'merged_canvas.png', kind: saveToGallery ? 'result' : 'temp', - cropVisible: saveToGallery, + cropVisible, }) ); @@ -52,12 +63,15 @@ export const mergeAndUploadCanvas = createAsyncThunk( const { url, mtime, width, height } = (await response.json()) as InvokeAI.ImageUploadResponse; - // const newBoundingBox = { - // x: bbox[0], - // y: bbox[1], - // width: bbox[2], - // height: bbox[3], - // }; + if (downloadAfterSaving) { + downloadFile(url); + return; + } + + if (copyAfterSaving) { + copyImage(url, width, height); + return; + } const newImage: InvokeAI.Image = { uuid: uuidv4(), @@ -72,7 +86,6 @@ export const mergeAndUploadCanvas = createAsyncThunk( image: newImage, kind: saveToGallery ? 'merged_canvas' : 'temp_merged_canvas', originalBoundingBox, - // newBoundingBox, }; } ); diff --git a/frontend/src/features/gallery/util/uploadImage.ts b/frontend/src/features/gallery/util/uploadImage.ts index 5dca9a490d..95aba77f7c 100644 --- a/frontend/src/features/gallery/util/uploadImage.ts +++ b/frontend/src/features/gallery/util/uploadImage.ts @@ -29,7 +29,6 @@ export const uploadImage = createAsyncThunk( kind: 'init', }) ); - // formData.append('kind', 'init'); const response = await fetch(window.location.origin + '/upload', { method: 'POST', @@ -39,13 +38,6 @@ export const uploadImage = createAsyncThunk( const { url, mtime, width, height } = (await response.json()) as InvokeAI.ImageUploadResponse; - // const newBoundingBox = { - // x: bbox[0], - // y: bbox[1], - // width: bbox[2], - // height: bbox[3], - // }; - const newImage: InvokeAI.Image = { uuid: uuidv4(), url, From ae6dd219d99a9461464310cf79150652898a0b7c Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 15:56:47 +1300 Subject: [PATCH 075/220] Fix Current Image display background going over image bounds --- frontend/src/features/gallery/CurrentImageDisplay.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/gallery/CurrentImageDisplay.scss b/frontend/src/features/gallery/CurrentImageDisplay.scss index af02c060e9..60c01566e3 100644 --- a/frontend/src/features/gallery/CurrentImageDisplay.scss +++ b/frontend/src/features/gallery/CurrentImageDisplay.scss @@ -24,6 +24,7 @@ max-width: 100%; max-height: 100%; height: auto; + width: max-content; position: absolute; cursor: pointer; } From e28599cadb54015e820dbab21dd9d5d21287ebdb Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 14:12:44 +1100 Subject: [PATCH 076/220] Sets status immediately when clicking Invoke --- frontend/src/app/socketio/emitters.ts | 21 +++------------------ frontend/src/features/system/systemSlice.ts | 11 +++++++++++ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index fcae683e82..de097dc2ce 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -13,7 +13,9 @@ import { import { OptionsState } from 'features/options/optionsSlice'; import { addLogEntry, + generationRequested, modelChangeRequested, + setCurrentStatus, setIsProcessing, } from 'features/system/systemSlice'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; @@ -52,24 +54,7 @@ const makeSocketIOEmitters = ( systemState, }; - // if (generationMode === 'inpainting') { - // const initialCanvasImage = initialCanvasImageSelector(getState()); - // const imageUrl = initialCanvasImage?.image.url; - - // if (!imageUrl) { - // dispatch( - // addLogEntry({ - // timestamp: dateFormat(new Date(), 'isoDateTime'), - // message: 'Inpainting image not loaded, cannot generate image.', - // level: 'error', - // }) - // ); - // dispatch(errorOccurred()); - // return; - // } - - // frontendToBackendParametersConfig.imageToProcessUrl = imageUrl; - // } else + dispatch(generationRequested()); if (!['txt2img', 'img2img'].includes(generationMode)) { if (!galleryState.currentImage?.url) return; diff --git a/frontend/src/features/system/systemSlice.ts b/frontend/src/features/system/systemSlice.ts index 3b1feb9e61..1dff43ce17 100644 --- a/frontend/src/features/system/systemSlice.ts +++ b/frontend/src/features/system/systemSlice.ts @@ -175,6 +175,16 @@ export const systemSlice = createSlice({ state.currentStatusHasSteps = false; state.currentStatus = 'Processing canceled'; }, + generationRequested: (state) => { + state.isProcessing = true; + state.isCancelable = true; + state.currentStep = 0; + state.totalSteps = 0; + state.currentIteration = 0; + state.totalIterations = 0; + state.currentStatusHasSteps = false; + state.currentStatus = 'Preparing'; + }, setModelList: ( state, action: PayloadAction> @@ -220,6 +230,7 @@ export const { modelChangeRequested, setSaveIntermediatesInterval, setEnableImageDebugging, + generationRequested, } = systemSlice.actions; export default systemSlice.reducer; From aa96a457b622c99ca7bf09c1a1a5186737b1b7b3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 15:08:09 +1100 Subject: [PATCH 077/220] Adds hotkeys and refactors sharing of konva instances Adds hotkeys to canvas. As part of this change, the access to konva instance objects was refactored: Previously closure'd refs were used to indirectly get access to the konva instances outside of react components. Now, a getter and setter function are used to provide access directly to the konva objects. --- .../src/common/util/parameterTranslation.ts | 21 +- .../features/canvas/components/IAICanvas.tsx | 30 ++- .../IAICanvasBrushButtonPopover.tsx | 52 ++++- .../IAICanvasEraserButtonPopover.tsx | 42 +++- .../IAICanvasMaskButtonPopover.tsx | 19 +- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 212 +++++++++++++----- .../features/canvas/hooks/useCanvasHotkeys.ts | 7 +- .../canvas/util/konvaInstanceProvider.ts | 16 ++ .../canvas/util/mergeAndUploadCanvas.ts | 19 +- .../src/features/gallery/ImageGallery.tsx | 14 -- .../system/HotkeysModal/HotkeysModal.tsx | 5 - 11 files changed, 312 insertions(+), 125 deletions(-) create mode 100644 frontend/src/features/canvas/util/konvaInstanceProvider.ts diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 71300bc1b4..8d34337fbc 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -5,10 +5,13 @@ import { SystemState } from 'features/system/systemSlice'; import { stringToSeedWeightsArray } from './seedWeightPairs'; import randomInt from './randomInt'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; -import { CanvasState, isCanvasMaskLine } from 'features/canvas/store/canvasTypes'; +import { + CanvasState, + isCanvasMaskLine, +} from 'features/canvas/store/canvasTypes'; import generateMask from 'features/canvas/util/generateMask'; -import { canvasImageLayerRef } from 'features/canvas/components/IAICanvas'; import openBase64ImageInTab from './openBase64ImageInTab'; +import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; export type FrontendToBackendParametersConfig = { generationMode: InvokeTabName; @@ -25,6 +28,8 @@ export type FrontendToBackendParametersConfig = { export const frontendToBackendParameters = ( config: FrontendToBackendParametersConfig ): { [key: string]: any } => { + const canvasBaseLayer = getCanvasBaseLayer(); + const { generationMode, optionsState, @@ -106,7 +111,7 @@ export const frontendToBackendParameters = ( } // inpainting exclusive parameters - if (generationMode === 'unifiedCanvas' && canvasImageLayerRef.current) { + if (generationMode === 'unifiedCanvas' && canvasBaseLayer) { const { layerState: { objects }, boundingBoxCoordinates, @@ -143,16 +148,16 @@ export const frontendToBackendParameters = ( generationParameters.bounding_box = boundingBox; - const tempScale = canvasImageLayerRef.current.scale(); + const tempScale = canvasBaseLayer.scale(); - canvasImageLayerRef.current.scale({ + canvasBaseLayer.scale({ x: 1 / stageScale, y: 1 / stageScale, }); - const absPos = canvasImageLayerRef.current.getAbsolutePosition(); + const absPos = canvasBaseLayer.getAbsolutePosition(); - const imageDataURL = canvasImageLayerRef.current.toDataURL({ + const imageDataURL = canvasBaseLayer.toDataURL({ x: boundingBox.x + absPos.x, y: boundingBox.y + absPos.y, width: boundingBox.width, @@ -166,7 +171,7 @@ export const frontendToBackendParameters = ( ]); } - canvasImageLayerRef.current.scale(tempScale); + canvasBaseLayer.scale(tempScale); generationParameters.init_img = imageDataURL; diff --git a/frontend/src/features/canvas/components/IAICanvas.tsx b/frontend/src/features/canvas/components/IAICanvas.tsx index a321267269..b5fb93d0e5 100644 --- a/frontend/src/features/canvas/components/IAICanvas.tsx +++ b/frontend/src/features/canvas/components/IAICanvas.tsx @@ -1,7 +1,6 @@ -import { MutableRefObject, useRef } from 'react'; +import { useCallback, useRef } from 'react'; import Konva from 'konva'; import { Layer, Stage } from 'react-konva'; -import { Stage as StageType } from 'konva/lib/Stage'; import { useAppSelector } from 'app/store'; import { canvasSelector, @@ -28,6 +27,10 @@ import IAICanvasIntermediateImage from './IAICanvasIntermediateImage'; import IAICanvasStatusText from './IAICanvasStatusText'; import IAICanvasStagingArea from './IAICanvasStagingArea'; import IAICanvasStagingAreaToolbar from './IAICanvasStagingAreaToolbar'; +import { + setCanvasBaseLayer, + setCanvasStage, +} from '../util/konvaInstanceProvider'; const selector = createSelector( [canvasSelector, isStagingSelector], @@ -84,10 +87,6 @@ const selector = createSelector( } ); -// Use a closure allow other components to use these things... not ideal... -export let stageRef: MutableRefObject; -export let canvasImageLayerRef: MutableRefObject; - const IAICanvas = () => { const { isMaskEnabled, @@ -104,9 +103,18 @@ const IAICanvas = () => { } = useAppSelector(selector); useCanvasHotkeys(); - // set the closure'd refs - stageRef = useRef(null); - canvasImageLayerRef = useRef(null); + const stageRef = useRef(null); + const canvasBaseLayerRef = useRef(null); + + const canvasStageRefCallback = useCallback((el: Konva.Stage) => { + setCanvasStage(el as Konva.Stage); + stageRef.current = el; + }, []); + + const canvasBaseLayerRefCallback = useCallback((el: Konva.Layer) => { + setCanvasBaseLayer(el as Konva.Layer); + canvasBaseLayerRef.current = el; + }, []); const lastCursorPositionRef = useRef({ x: 0, y: 0 }); @@ -131,7 +139,7 @@ const IAICanvas = () => {
{ diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx index 7355bbc187..058283af72 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx @@ -1,5 +1,9 @@ import { createSelector } from '@reduxjs/toolkit'; -import { setBrushColor, setBrushSize, setTool } from 'features/canvas/store/canvasSlice'; +import { + setBrushColor, + setBrushSize, + setTool, +} from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -8,7 +12,11 @@ import IAIPopover from 'common/components/IAIPopover'; import IAIColorPicker from 'common/components/IAIColorPicker'; import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; -import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; +import { + canvasSelector, + isStagingSelector, +} from 'features/canvas/store/canvasSelectors'; +import { useHotkeys } from 'react-hotkeys-hook'; export const selector = createSelector( [canvasSelector, isStagingSelector], @@ -33,6 +41,44 @@ const IAICanvasBrushButtonPopover = () => { const dispatch = useAppDispatch(); const { tool, brushColor, brushSize, isStaging } = useAppSelector(selector); + useHotkeys( + ['b'], + () => { + handleSelectBrushTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + + useHotkeys( + ['['], + () => { + dispatch(setBrushSize(Math.max(brushSize - 5, 5))); + }, + { + enabled: () => true, + preventDefault: true, + }, + [brushSize] + ); + + useHotkeys( + [']'], + () => { + dispatch(setBrushSize(Math.min(brushSize + 5, 500))); + }, + { + enabled: () => true, + preventDefault: true, + }, + [brushSize] + ); + + const handleSelectBrushTool = () => dispatch(setTool('brush')); + return ( { tooltip="Brush (B)" icon={} data-selected={tool === 'brush' && !isStaging} - onClick={() => dispatch(setTool('brush'))} + onClick={handleSelectBrushTool} isDisabled={isStaging} /> } diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx index d9d029d14e..6ce48a2fb6 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx @@ -1,8 +1,5 @@ import { createSelector } from '@reduxjs/toolkit'; -import { - setEraserSize, - setTool, -} from 'features/canvas/store/canvasSlice'; +import { setEraserSize, setTool } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -11,7 +8,10 @@ import IAIPopover from 'common/components/IAIPopover'; import IAISlider from 'common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; -import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; +import { + canvasSelector, + isStagingSelector, +} from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( [canvasSelector, isStagingSelector], @@ -37,17 +37,41 @@ const IAICanvasEraserButtonPopover = () => { const handleSelectEraserTool = () => dispatch(setTool('eraser')); useHotkeys( - 'e', - (e: KeyboardEvent) => { - e.preventDefault(); + ['e'], + () => { handleSelectEraserTool(); }, { - enabled: true, + enabled: () => true, + preventDefault: true, }, [tool] ); + useHotkeys( + ['['], + () => { + dispatch(setEraserSize(Math.max(eraserSize - 5, 5))); + }, + { + enabled: () => true, + preventDefault: true, + }, + [eraserSize] + ); + + useHotkeys( + [']'], + () => { + dispatch(setEraserSize(Math.min(eraserSize + 5, 500))); + }, + { + enabled: () => true, + preventDefault: true, + }, + [eraserSize] + ); + return ( { const { layer, maskColor, isMaskEnabled, shouldPreserveMaskedArea } = useAppSelector(selector); + useHotkeys( + ['q'], + () => { + handleToggleMaskLayer(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [layer] + ); + + const handleToggleMaskLayer = () => { + dispatch(setLayer(layer === 'mask' ? 'base' : 'mask')); + }; + return ( { aria-label="Select Mask Layer" tooltip="Select Mask Layer" data-alert={layer === 'mask'} - onClick={() => dispatch(setLayer(layer === 'mask' ? 'base' : 'mask'))} + onClick={handleToggleMaskLayer} icon={} /> } diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index f175fed9f5..259cad2ed4 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -1,15 +1,12 @@ import { ButtonGroup } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { - resizeAndScaleCanvas, resetCanvas, resetCanvasView, setTool, - fitBoundingBoxToStage, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; -import { canvasImageLayerRef, stageRef } from '../IAICanvas'; import IAIIconButton from 'common/components/IAIIconButton'; import { FaArrowsAlt, @@ -28,12 +25,15 @@ import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; -import IAICheckbox from 'common/components/IAICheckbox'; -import { ChangeEvent } from 'react'; import { canvasSelector, isStagingSelector, } from 'features/canvas/store/canvasSelectors'; +import { useHotkeys } from 'react-hotkeys-hook'; +import { + getCanvasBaseLayer, + getCanvasStage, +} from 'features/canvas/util/konvaInstanceProvider'; export const selector = createSelector( [canvasSelector, isStagingSelector], @@ -54,6 +54,138 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); const { tool, isStaging } = useAppSelector(selector); + const canvasBaseLayer = getCanvasBaseLayer(); + + useHotkeys( + ['m'], + () => { + handleSelectMoveTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + + useHotkeys( + ['shift+r'], + () => { + handleResetCanvasView(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [canvasBaseLayer] + ); + + useHotkeys( + ['shift+c'], + () => { + handleResetCanvas(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [canvasBaseLayer] + ); + + useHotkeys( + ['shift+m'], + () => { + handleMergeVisible(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [canvasBaseLayer] + ); + + useHotkeys( + ['shift+s'], + () => { + handleSaveToGallery(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [canvasBaseLayer] + ); + + useHotkeys( + ['meta+c', 'ctrl+c'], + () => { + handleCopyImageToClipboard(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [canvasBaseLayer] + ); + + useHotkeys( + ['shift+d'], + () => { + handleDownloadAsImage(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [canvasBaseLayer] + ); + + const handleSelectMoveTool = () => dispatch(setTool('move')); + + const handleResetCanvasView = () => { + if (!canvasBaseLayer) return; + const clientRect = canvasBaseLayer.getClientRect({ + skipTransform: true, + }); + dispatch( + resetCanvasView({ + contentRect: clientRect, + }) + ); + }; + + const handleResetCanvas = () => dispatch(resetCanvas()); + + const handleMergeVisible = () => { + dispatch(mergeAndUploadCanvas({})); + }; + + const handleSaveToGallery = () => { + dispatch( + mergeAndUploadCanvas({ + cropVisible: true, + saveToGallery: true, + }) + ); + }; + + const handleCopyImageToClipboard = () => { + dispatch( + mergeAndUploadCanvas({ + cropVisible: true, + copyAfterSaving: true, + }) + ); + }; + + const handleDownloadAsImage = () => { + dispatch( + mergeAndUploadCanvas({ + cropVisible: true, + downloadAfterSaving: true, + }) + ); + }; return (
@@ -66,63 +198,33 @@ const IAICanvasOutpaintingControls = () => { tooltip="Move (M)" icon={} data-selected={tool === 'move' || isStaging} - onClick={() => dispatch(setTool('move'))} + onClick={handleSelectMoveTool} /> } - onClick={() => { - dispatch( - mergeAndUploadCanvas({ - canvasImageLayerRef, - }) - ); - }} + onClick={handleMergeVisible} /> } - onClick={() => { - dispatch( - mergeAndUploadCanvas({ - canvasImageLayerRef, - cropVisible: true, - saveToGallery: true, - }) - ); - }} + onClick={handleSaveToGallery} /> } - onClick={() => { - dispatch( - mergeAndUploadCanvas({ - canvasImageLayerRef, - cropVisible: true, - copyAfterSaving: true, - }) - ); - }} + onClick={handleCopyImageToClipboard} /> } - onClick={() => { - dispatch( - mergeAndUploadCanvas({ - canvasImageLayerRef, - cropVisible: true, - downloadAfterSaving: true, - }) - ); - }} + onClick={handleDownloadAsImage} /> @@ -142,23 +244,13 @@ const IAICanvasOutpaintingControls = () => { aria-label="Reset Canvas View" tooltip="Reset Canvas View" icon={} - onClick={() => { - if (!stageRef.current || !canvasImageLayerRef.current) return; - const clientRect = canvasImageLayerRef.current.getClientRect({ - skipTransform: true, - }); - dispatch( - resetCanvasView({ - contentRect: clientRect, - }) - ); - }} + onClick={handleResetCanvasView} /> } - onClick={() => dispatch(resetCanvas())} + onClick={handleResetCanvas} />
diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index 1d4c2f28fd..7bed805e63 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -9,9 +9,9 @@ import { } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import { useRef } from 'react'; -import { stageRef } from '../components/IAICanvas'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { CanvasTool } from '../store/canvasTypes'; +import { getCanvasStage } from '../util/konvaInstanceProvider'; const selector = createSelector( [canvasSelector, activeTabNameSelector], @@ -44,6 +44,9 @@ const useInpaintingCanvasHotkeys = () => { useAppSelector(selector); const previousToolRef = useRef(null); + + const canvasStage = getCanvasStage(); + // Toggle lock bounding box useHotkeys( 'shift+w', @@ -72,7 +75,7 @@ const useInpaintingCanvasHotkeys = () => { (e: KeyboardEvent) => { if (e.repeat) return; - stageRef.current?.container().focus(); + canvasStage?.container().focus(); if (tool !== 'move') { previousToolRef.current = tool; diff --git a/frontend/src/features/canvas/util/konvaInstanceProvider.ts b/frontend/src/features/canvas/util/konvaInstanceProvider.ts new file mode 100644 index 0000000000..4a36fb72ac --- /dev/null +++ b/frontend/src/features/canvas/util/konvaInstanceProvider.ts @@ -0,0 +1,16 @@ +import Konva from 'konva'; + +let canvasBaseLayer: Konva.Layer | null = null; +let canvasStage: Konva.Stage | null = null; + +export const setCanvasBaseLayer = (layer: Konva.Layer) => { + canvasBaseLayer = layer; +}; + +export const getCanvasBaseLayer = () => canvasBaseLayer; + +export const setCanvasStage = (stage: Konva.Stage) => { + canvasStage = stage; +}; + +export const getCanvasStage = () => canvasStage; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index fa6cc1d27b..1dd1387b44 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -1,18 +1,16 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; import { RootState } from 'app/store'; -import Konva from 'konva'; -import { MutableRefObject } from 'react'; import * as InvokeAI from 'app/invokeai'; import { v4 as uuidv4 } from 'uuid'; import layerToDataURL from './layerToDataURL'; import downloadFile from './downloadFile'; import copyImage from './copyImage'; +import { getCanvasBaseLayer } from './konvaInstanceProvider'; export const mergeAndUploadCanvas = createAsyncThunk( 'canvas/mergeAndUploadCanvas', async ( args: { - canvasImageLayerRef: MutableRefObject; cropVisible?: boolean; saveToGallery?: boolean; downloadAfterSaving?: boolean; @@ -20,13 +18,8 @@ export const mergeAndUploadCanvas = createAsyncThunk( }, thunkAPI ) => { - const { - canvasImageLayerRef, - saveToGallery, - downloadAfterSaving, - cropVisible, - copyAfterSaving, - } = args; + const { saveToGallery, downloadAfterSaving, cropVisible, copyAfterSaving } = + args; const { getState } = thunkAPI; @@ -34,10 +27,12 @@ export const mergeAndUploadCanvas = createAsyncThunk( const stageScale = state.canvas.stageScale; - if (!canvasImageLayerRef.current) return; + const canvasBaseLayer = getCanvasBaseLayer(); + + if (!canvasBaseLayer) return; const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( - canvasImageLayerRef.current, + canvasBaseLayer, stageScale ); diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index cecb5d3aaf..99ba673af5 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -246,20 +246,6 @@ export default function ImageGallery() { [galleryImageMinimumWidth] ); - useHotkeys( - 'shift+r', - () => { - dispatch(setGalleryImageMinimumWidth(64)); - toast({ - title: `Reset Gallery Image Size`, - status: 'success', - duration: 2500, - isClosable: true, - }); - }, - [galleryImageMinimumWidth] - ); - // set gallery scroll position useEffect(() => { if (!galleryContainerRef.current) return; diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx index f9fc98a1dd..6da8259b67 100644 --- a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx @@ -135,11 +135,6 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Decreases gallery thumbnails size', hotkey: 'Shift+Down', }, - { - title: 'Reset Gallery Image Size', - desc: 'Resets image gallery size', - hotkey: 'Shift+R', - }, ]; const unifiedCanvasHotkeys = [ From 07ca0876ecb4c96956f269e14719a19575401aef Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 15:28:01 +1100 Subject: [PATCH 078/220] Updates hotkeys --- .../IAICanvasMaskButtonPopover.tsx | 33 +++++++++++++++++-- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 18 ++-------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx index 328582b5b0..de0aa75061 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx @@ -54,10 +54,39 @@ const IAICanvasMaskButtonPopover = () => { [layer] ); + useHotkeys( + ['shift+c'], + () => { + handleClearMask(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + + useHotkeys( + ['h'], + () => { + handleToggleEnableMask(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [isMaskEnabled] + ); + const handleToggleMaskLayer = () => { dispatch(setLayer(layer === 'mask' ? 'base' : 'mask')); }; + const handleClearMask = () => dispatch(clearMask()); + + const handleToggleEnableMask = () => + dispatch(setIsMaskEnabled(!isMaskEnabled)); + return ( { } > - dispatch(clearMask())}>Clear Mask + Clear Mask dispatch(setIsMaskEnabled(e.target.checked))} + onChange={handleToggleEnableMask} /> { ); useHotkeys( - ['shift+r'], + ['r'], () => { handleResetCanvasView(); }, @@ -80,18 +80,6 @@ const IAICanvasOutpaintingControls = () => { [canvasBaseLayer] ); - useHotkeys( - ['shift+c'], - () => { - handleResetCanvas(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [canvasBaseLayer] - ); - useHotkeys( ['shift+m'], () => { @@ -241,8 +229,8 @@ const IAICanvasOutpaintingControls = () => { icon={} /> } onClick={handleResetCanvasView} /> From 70e67c45dd07b7c0d89cf1e0538b9db8821166b9 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 15:28:48 +1100 Subject: [PATCH 079/220] Fixes canvas showing spinner on first load Also adds good default canvas scale and positioning when no image is on it --- .../canvas/components/IAICanvasResizer.tsx | 2 -- .../src/features/canvas/store/canvasSlice.ts | 35 +++++++++++++++++-- .../src/features/canvas/util/constants.ts | 16 ++++----- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasResizer.tsx b/frontend/src/features/canvas/components/IAICanvasResizer.tsx index b9bea759bf..a44c9ca414 100644 --- a/frontend/src/features/canvas/components/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasResizer.tsx @@ -46,8 +46,6 @@ const IAICanvasResizer = () => { const { clientWidth, clientHeight } = ref.current; - if (!initialCanvasImage?.image) return; - dispatch( setCanvasContainerDimensions({ width: clientWidth, diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index a1bdf5a2b5..ad4496de35 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -24,6 +24,7 @@ import { isCanvasMaskLine, } from './canvasTypes'; import roundDimensionsTo64 from '../util/roundDimensionsTo64'; +import { STAGE_PADDING_PERCENTAGE } from '../util/constants'; export const initialLayerState: CanvasLayerState = { objects: [], @@ -410,10 +411,39 @@ export const canvasSlice = createSlice({ const { width: containerWidth, height: containerHeight } = state.canvasContainerDimensions; - state.stageDimensions = { + const initialCanvasImage = + state.layerState.objects.find(isCanvasBaseImage); + + const newStageDimensions = { width: Math.floor(containerWidth), height: Math.floor(containerHeight), }; + + if (!initialCanvasImage) { + const newScale = calculateScale( + newStageDimensions.width, + newStageDimensions.height, + 512, + 512, + STAGE_PADDING_PERCENTAGE + ); + + const newCoordinates = calculateCoordinates( + newStageDimensions.width, + newStageDimensions.height, + 0, + 0, + 512, + 512, + newScale + ); + + state.stageScale = newScale; + + state.stageCoordinates = newCoordinates; + } + + state.stageDimensions = newStageDimensions; }, resetCanvasView: ( state, @@ -433,13 +463,12 @@ export const canvasSlice = createSlice({ const { x, y, width, height } = contentRect; - const padding = 0.95; const newScale = calculateScale( stageWidth, stageHeight, width, height, - padding + STAGE_PADDING_PERCENTAGE ); const newCoordinates = calculateCoordinates( diff --git a/frontend/src/features/canvas/util/constants.ts b/frontend/src/features/canvas/util/constants.ts index 59a9a46d71..10b27c82d1 100644 --- a/frontend/src/features/canvas/util/constants.ts +++ b/frontend/src/features/canvas/util/constants.ts @@ -1,14 +1,14 @@ -// widths of ants-style bounding box outline -export const DASH_WIDTH = 4; - -// speed of marching ants (lower is faster) -export const MARCHING_ANTS_SPEED = 30; - // bounding box anchor size export const TRANSFORMER_ANCHOR_SIZE = 15; +// canvas wheel zoom exponential scale factor export const CANVAS_SCALE_BY = 0.999; -export const MIN_CANVAS_SCALE = 0.1 +// minimum (furthest-zoomed-out) scale +export const MIN_CANVAS_SCALE = 0.1; -export const MAX_CANVAS_SCALE = 20 \ No newline at end of file +// maximum (furthest-zoomed-in) scale +export const MAX_CANVAS_SCALE = 20; + +// padding given to initial image/bounding box when stage view is reset +export const STAGE_PADDING_PERCENTAGE = 0.95; From 425a1713ab7885f64de05b5a90bb6a75da2c4205 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 16:17:31 +1100 Subject: [PATCH 080/220] Fixes possible hang on MaskCompositer --- .../components/IAICanvasMaskCompositer.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx b/frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx index 0d00f0a9d9..5da87dc063 100644 --- a/frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasMaskCompositer.tsx @@ -7,6 +7,7 @@ import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { rgbaColorToString } from 'features/canvas/util/colorToString'; import { useCallback, useEffect, useRef, useState } from 'react'; import Konva from 'konva'; +import { isNumber } from 'lodash'; export const canvasMaskCompositerSelector = createSelector( canvasSelector, @@ -144,14 +145,12 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { }, []); if ( - !( - fillPatternImage && - stageCoordinates.x !== undefined && - stageCoordinates.y !== undefined && - stageScale !== undefined && - stageDimensions.width !== undefined && - stageDimensions.height !== undefined - ) + !fillPatternImage || + !isNumber(stageCoordinates.x) || + !isNumber(stageCoordinates.y) || + !isNumber(stageScale) || + !isNumber(stageDimensions.width) || + !isNumber(stageDimensions.height) ) return null; @@ -163,7 +162,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => { height={stageDimensions.height / stageScale} width={stageDimensions.width / stageScale} fillPatternImage={fillPatternImage} - fillPatternOffsetY={isNaN(offset) ? 0 : offset} + fillPatternOffsetY={!isNumber(offset) ? 0 : offset} fillPatternRepeat={'repeat'} fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }} listening={true} From bb70c32ad56439fdfe943cb5d2736e7e66155a5c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 16:18:07 +1100 Subject: [PATCH 081/220] Improves behaviour when setting init canvas image/reset view --- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 1 + .../features/canvas/hooks/useCanvasZoom.ts | 35 +--- .../src/features/canvas/store/canvasSlice.ts | 173 +++++++++++------- .../src/features/gallery/HoverableImage.tsx | 6 +- 4 files changed, 118 insertions(+), 97 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index f75b2236dc..1ed2195092 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -131,6 +131,7 @@ const IAICanvasOutpaintingControls = () => { const handleSelectMoveTool = () => dispatch(setTool('move')); const handleResetCanvasView = () => { + const canvasBaseLayer = getCanvasBaseLayer() if (!canvasBaseLayer) return; const clientRect = canvasBaseLayer.getClientRect({ skipTransform: true, diff --git a/frontend/src/features/canvas/hooks/useCanvasZoom.ts b/frontend/src/features/canvas/hooks/useCanvasZoom.ts index c553a1f5dc..af3284a0ab 100644 --- a/frontend/src/features/canvas/hooks/useCanvasZoom.ts +++ b/frontend/src/features/canvas/hooks/useCanvasZoom.ts @@ -1,14 +1,10 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; -import { - canvasSelector, - initialCanvasImageSelector, -} from 'features/canvas/store/canvasSelectors'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { setStageCoordinates, setStageScale, @@ -20,21 +16,12 @@ import { } from '../util/constants'; const selector = createSelector( - [activeTabNameSelector, canvasSelector, initialCanvasImageSelector], - (activeTabName, canvas, initialCanvasImage) => { - const { - isMoveStageKeyHeld, - stageScale, - stageDimensions, - minimumStageScale, - } = canvas; + [canvasSelector], + (canvas) => { + const { isMoveStageKeyHeld, stageScale } = canvas; return { isMoveStageKeyHeld, stageScale, - activeTabName, - initialCanvasImage, - stageDimensions, - minimumStageScale, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -42,20 +29,12 @@ const selector = createSelector( const useCanvasWheel = (stageRef: MutableRefObject) => { const dispatch = useAppDispatch(); - const { - isMoveStageKeyHeld, - stageScale, - activeTabName, - initialCanvasImage, - stageDimensions, - minimumStageScale, - } = useAppSelector(selector); + const { isMoveStageKeyHeld, stageScale } = useAppSelector(selector); return useCallback( (e: KonvaEventObject) => { // stop default scrolling - if (!stageRef.current || isMoveStageKeyHeld || !initialCanvasImage) - return; + if (!stageRef.current || isMoveStageKeyHeld) return; e.evt.preventDefault(); @@ -90,7 +69,7 @@ const useCanvasWheel = (stageRef: MutableRefObject) => { dispatch(setStageScale(newScale)); dispatch(setStageCoordinates(newCoordinates)); }, - [stageRef, isMoveStageKeyHeld, initialCanvasImage, stageScale, dispatch] + [stageRef, isMoveStageKeyHeld, stageScale, dispatch] ); }; diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index ad4496de35..4794c8d32a 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -369,51 +369,6 @@ export const canvasSlice = createSlice({ const initialCanvasImage = state.layerState.objects.find(isCanvasBaseImage); - if (!initialCanvasImage) return; - - const { width: imageWidth, height: imageHeight } = initialCanvasImage; - - const padding = 0.95; - - const newScale = calculateScale( - containerWidth, - containerHeight, - imageWidth, - imageHeight, - padding - ); - - const newDimensions = { - width: Math.floor(containerWidth), - height: Math.floor(containerHeight), - }; - - const newCoordinates = calculateCoordinates( - newDimensions.width, - newDimensions.height, - 0, - 0, - imageWidth, - imageHeight, - newScale - ); - - if (!_.isEqual(state.stageDimensions, newDimensions)) { - state.minimumStageScale = newScale; - state.stageScale = newScale; - state.stageCoordinates = floorCoordinates(newCoordinates); - state.stageDimensions = newDimensions; - } - - state.isCanvasInitialized = true; - }, - resizeCanvas: (state) => { - const { width: containerWidth, height: containerHeight } = - state.canvasContainerDimensions; - - const initialCanvasImage = - state.layerState.objects.find(isCanvasBaseImage); - const newStageDimensions = { width: Math.floor(containerWidth), height: Math.floor(containerHeight), @@ -441,9 +396,72 @@ export const canvasSlice = createSlice({ state.stageScale = newScale; state.stageCoordinates = newCoordinates; + return; } + const { width: imageWidth, height: imageHeight } = initialCanvasImage; + + const padding = 0.95; + + const newScale = calculateScale( + containerWidth, + containerHeight, + imageWidth, + imageHeight, + padding + ); + + const newCoordinates = calculateCoordinates( + newStageDimensions.width, + newStageDimensions.height, + 0, + 0, + imageWidth, + imageHeight, + newScale + ); + + state.minimumStageScale = newScale; + state.stageScale = newScale; + state.stageCoordinates = floorCoordinates(newCoordinates); state.stageDimensions = newStageDimensions; + + state.isCanvasInitialized = true; + }, + resizeCanvas: (state) => { + const { width: containerWidth, height: containerHeight } = + state.canvasContainerDimensions; + + const newStageDimensions = { + width: Math.floor(containerWidth), + height: Math.floor(containerHeight), + }; + + state.stageDimensions = newStageDimensions; + + if (!state.layerState.objects.find(isCanvasBaseImage)) { + const newScale = calculateScale( + newStageDimensions.width, + newStageDimensions.height, + 512, + 512, + STAGE_PADDING_PERCENTAGE + ); + + const newCoordinates = calculateCoordinates( + newStageDimensions.width, + newStageDimensions.height, + 0, + 0, + 512, + 512, + newScale + ); + + state.stageScale = newScale; + + state.stageCoordinates = newCoordinates; + } }, resetCanvasView: ( state, @@ -452,38 +470,57 @@ export const canvasSlice = createSlice({ }> ) => { const { contentRect } = action.payload; - - const baseCanvasImage = state.layerState.objects.find(isCanvasBaseImage); - - if (!baseCanvasImage) return; - const { stageDimensions: { width: stageWidth, height: stageHeight }, } = state; const { x, y, width, height } = contentRect; - const newScale = calculateScale( - stageWidth, - stageHeight, - width, - height, - STAGE_PADDING_PERCENTAGE - ); + if (width !== 0 && height !== 0) { + const newScale = calculateScale( + stageWidth, + stageHeight, + width, + height, + STAGE_PADDING_PERCENTAGE + ); - const newCoordinates = calculateCoordinates( - stageWidth, - stageHeight, - x, - y, - width, - height, - newScale - ); + const newCoordinates = calculateCoordinates( + stageWidth, + stageHeight, + x, + y, + width, + height, + newScale + ); - state.stageScale = newScale; + state.stageScale = newScale; - state.stageCoordinates = newCoordinates; + state.stageCoordinates = newCoordinates; + } else { + const newScale = calculateScale( + stageWidth, + stageHeight, + 512, + 512, + STAGE_PADDING_PERCENTAGE + ); + + const newCoordinates = calculateCoordinates( + stageWidth, + stageHeight, + 0, + 0, + 512, + 512, + newScale + ); + + state.stageScale = newScale; + + state.stageCoordinates = newCoordinates; + } }, nextStagingAreaImage: (state) => { const currentIndex = state.layerState.stagingArea.selectedImageIndex; diff --git a/frontend/src/features/gallery/HoverableImage.tsx b/frontend/src/features/gallery/HoverableImage.tsx index ddf66448a0..de09fd8f58 100644 --- a/frontend/src/features/gallery/HoverableImage.tsx +++ b/frontend/src/features/gallery/HoverableImage.tsx @@ -23,10 +23,13 @@ import { import * as InvokeAI from 'app/invokeai'; import * as ContextMenu from '@radix-ui/react-context-menu'; import { + resetCanvasView, + resizeAndScaleCanvas, setDoesCanvasNeedScaling, setInitialCanvasImage, } from 'features/canvas/store/canvasSlice'; import { hoverableImageSelector } from './gallerySliceSelectors'; +import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; interface HoverableImageProps { image: InvokeAI.Image; @@ -99,7 +102,8 @@ const HoverableImage = memo((props: HoverableImageProps) => { if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false)); dispatch(setInitialCanvasImage(image)); - dispatch(setDoesCanvasNeedScaling(true)); + + dispatch(resizeAndScaleCanvas()); if (activeTabName !== 'unifiedCanvas') { dispatch(setActiveTab('unifiedCanvas')); From 84f702b6d0bb604d3bf4163cca063255f5ee61f0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 17:23:04 +1100 Subject: [PATCH 082/220] Resets bounding box coords/dims when no image present --- .../components/IAICanvasToolbar/IAICanvasToolbar.tsx | 8 ++++++-- frontend/src/features/canvas/store/canvasSlice.ts | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 1ed2195092..ebad47cd12 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -3,6 +3,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { resetCanvas, resetCanvasView, + resizeAndScaleCanvas, setTool, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; @@ -131,7 +132,7 @@ const IAICanvasOutpaintingControls = () => { const handleSelectMoveTool = () => dispatch(setTool('move')); const handleResetCanvasView = () => { - const canvasBaseLayer = getCanvasBaseLayer() + const canvasBaseLayer = getCanvasBaseLayer(); if (!canvasBaseLayer) return; const clientRect = canvasBaseLayer.getClientRect({ skipTransform: true, @@ -143,7 +144,10 @@ const IAICanvasOutpaintingControls = () => { ); }; - const handleResetCanvas = () => dispatch(resetCanvas()); + const handleResetCanvas = () => { + dispatch(resetCanvas()); + dispatch(resizeAndScaleCanvas()); + }; const handleMergeVisible = () => { dispatch(mergeAndUploadCanvas({})); diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 4794c8d32a..4bd58d9744 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -394,8 +394,9 @@ export const canvasSlice = createSlice({ ); state.stageScale = newScale; - state.stageCoordinates = newCoordinates; + state.boundingBoxCoordinates = { x: 0, y: 0 }; + state.boundingBoxDimensions = { width: 512, height: 512 }; return; } @@ -461,6 +462,8 @@ export const canvasSlice = createSlice({ state.stageScale = newScale; state.stageCoordinates = newCoordinates; + state.boundingBoxCoordinates = { x: 0, y: 0 }; + state.boundingBoxDimensions = { width: 512, height: 512 }; } }, resetCanvasView: ( @@ -496,7 +499,6 @@ export const canvasSlice = createSlice({ ); state.stageScale = newScale; - state.stageCoordinates = newCoordinates; } else { const newScale = calculateScale( @@ -518,8 +520,9 @@ export const canvasSlice = createSlice({ ); state.stageScale = newScale; - state.stageCoordinates = newCoordinates; + state.boundingBoxCoordinates = { x: 0, y: 0 }; + state.boundingBoxDimensions = { width: 512, height: 512 }; } }, nextStagingAreaImage: (state) => { From c69573e65deb87e8409d6087eda7fd8a36c688de Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 20:02:06 +1100 Subject: [PATCH 083/220] Disables canvas actions which cannot be done during processing --- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index ebad47cd12..925a5e86d2 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -31,18 +31,19 @@ import { isStagingSelector, } from 'features/canvas/store/canvasSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; -import { - getCanvasBaseLayer, - getCanvasStage, -} from 'features/canvas/util/konvaInstanceProvider'; +import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; +import { systemSelector } from 'features/system/systemSelectors'; export const selector = createSelector( - [canvasSelector, isStagingSelector], - (canvas, isStaging) => { + [canvasSelector, isStagingSelector, systemSelector], + (canvas, isStaging, system) => { + const { isProcessing } = system; const { tool } = canvas; + return { tool, isStaging, + isProcessing, }; }, { @@ -54,7 +55,7 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool, isStaging } = useAppSelector(selector); + const { tool, isStaging, isProcessing } = useAppSelector(selector); const canvasBaseLayer = getCanvasBaseLayer(); useHotkeys( @@ -87,10 +88,10 @@ const IAICanvasOutpaintingControls = () => { handleMergeVisible(); }, { - enabled: () => true, + enabled: () => !isProcessing, preventDefault: true, }, - [canvasBaseLayer] + [canvasBaseLayer, isProcessing] ); useHotkeys( @@ -99,10 +100,10 @@ const IAICanvasOutpaintingControls = () => { handleSaveToGallery(); }, { - enabled: () => true, + enabled: () => !isProcessing, preventDefault: true, }, - [canvasBaseLayer] + [canvasBaseLayer, isProcessing] ); useHotkeys( @@ -111,10 +112,10 @@ const IAICanvasOutpaintingControls = () => { handleCopyImageToClipboard(); }, { - enabled: () => true, + enabled: () => !isProcessing, preventDefault: true, }, - [canvasBaseLayer] + [canvasBaseLayer, isProcessing] ); useHotkeys( @@ -123,10 +124,10 @@ const IAICanvasOutpaintingControls = () => { handleDownloadAsImage(); }, { - enabled: () => true, + enabled: () => !isProcessing, preventDefault: true, }, - [canvasBaseLayer] + [canvasBaseLayer, isProcessing] ); const handleSelectMoveTool = () => dispatch(setTool('move')); @@ -200,24 +201,28 @@ const IAICanvasOutpaintingControls = () => { tooltip="Merge Visible (Shift + M)" icon={} onClick={handleMergeVisible} + isDisabled={isProcessing} /> } onClick={handleSaveToGallery} + isDisabled={isProcessing} /> } onClick={handleCopyImageToClipboard} + isDisabled={isProcessing} /> } onClick={handleDownloadAsImage} + isDisabled={isProcessing} /> From 04cb2d39cbdeda02014ef7bebc1f5916cdfa4b6f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 18 Nov 2022 20:07:34 +1100 Subject: [PATCH 084/220] Adds useToastWatcher hook - Dispatch an `addToast` action with standard Chakra toast options object to add a toast to the toastQueue - The hook is called in App.tsx and just useEffect's w/ toastQueue as dependency to create the toasts - So now you can add toasts anywhere you have access to `dispatch`, which includes middleware and thunks - Adds first usage of this for the save image buttons in canvas --- frontend/src/app/App.tsx | 12 +++++----- frontend/src/app/socketio/listeners.ts | 1 - frontend/src/app/socketio/middleware.ts | 22 ------------------- .../canvas/util/mergeAndUploadCanvas.ts | 19 +++++++++++++++- .../src/features/options/optionsSelectors.ts | 3 +++ .../features/system/hooks/useToastWatcher.ts | 19 ++++++++++++++++ .../src/features/system/systemSelectors.ts | 6 +++++ frontend/src/features/system/systemSlice.ts | 12 +++++++++- 8 files changed, 62 insertions(+), 32 deletions(-) create mode 100644 frontend/src/features/system/hooks/useToastWatcher.ts create mode 100644 frontend/src/features/system/systemSelectors.ts diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index c8b0c117a9..b1340b7536 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -15,6 +15,7 @@ import { activeTabNameSelector } from 'features/options/optionsSelectors'; import { SystemState } from 'features/system/systemSlice'; import _ from 'lodash'; import { Model } from './invokeai'; +import useToastWatcher from 'features/system/hooks/useToastWatcher'; keepGUIAlive(); @@ -50,18 +51,13 @@ const appSelector = createSelector( const shouldShowGalleryButton = !(shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)) && - ['txt2img', 'img2img', 'unifiedCanvas'].includes( - activeTabName - ); + ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); const shouldShowOptionsPanelButton = !( shouldShowOptionsPanel || (shouldHoldOptionsPanelOpen && !shouldPinOptionsPanel) - ) && - ['txt2img', 'img2img', 'unifiedCanvas'].includes( - activeTabName - ); + ) && ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); return { modelStatusText, @@ -80,6 +76,8 @@ const App = () => { const { shouldShowGalleryButton, shouldShowOptionsPanelButton } = useAppSelector(appSelector); + useToastWatcher(); + return (
diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 720f18d722..d10071db95 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -23,7 +23,6 @@ import { clearIntermediateImage, GalleryState, removeImage, - setCurrentImage, setIntermediateImage, } from 'features/gallery/gallerySlice'; diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index ac17884128..6beecca64e 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -43,8 +43,6 @@ export const socketioMiddleware = () => { onGalleryImages, onProcessingCanceled, onImageDeleted, - // onImageUploaded, - // onMaskImageUploaded, onSystemConfig, onModelChanged, onModelChangeFailed, @@ -58,8 +56,6 @@ export const socketioMiddleware = () => { emitRequestImages, emitRequestNewImages, emitCancelProcessing, - // emitUploadImage, - // emitUploadMaskImage, emitRequestSystemConfig, emitRequestModelChange, } = makeSocketIOEmitters(store, socketio); @@ -104,14 +100,6 @@ export const socketioMiddleware = () => { onImageDeleted(data); }); - // socketio.on('imageUploaded', (data: InvokeAI.ImageUploadResponse) => { - // onImageUploaded(data); - // }); - - // socketio.on('maskImageUploaded', (data: InvokeAI.ImageUrlResponse) => { - // onMaskImageUploaded(data); - // }); - socketio.on('systemConfig', (data: InvokeAI.SystemConfig) => { onSystemConfig(data); }); @@ -166,16 +154,6 @@ export const socketioMiddleware = () => { break; } - // case 'socketio/uploadImage': { - // emitUploadImage(action.payload); - // break; - // } - - // case 'socketio/uploadMaskImage': { - // emitUploadMaskImage(action.payload); - // break; - // } - case 'socketio/requestSystemConfig': { emitRequestSystemConfig(); break; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts index 1dd1387b44..1c1e171fc3 100644 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts @@ -6,6 +6,7 @@ import layerToDataURL from './layerToDataURL'; import downloadFile from './downloadFile'; import copyImage from './copyImage'; import { getCanvasBaseLayer } from './konvaInstanceProvider'; +import { addToast } from 'features/system/systemSlice'; export const mergeAndUploadCanvas = createAsyncThunk( 'canvas/mergeAndUploadCanvas', @@ -21,7 +22,7 @@ export const mergeAndUploadCanvas = createAsyncThunk( const { saveToGallery, downloadAfterSaving, cropVisible, copyAfterSaving } = args; - const { getState } = thunkAPI; + const { getState, dispatch } = thunkAPI; const state = getState() as RootState; @@ -60,11 +61,27 @@ export const mergeAndUploadCanvas = createAsyncThunk( if (downloadAfterSaving) { downloadFile(url); + dispatch( + addToast({ + title: 'Image Download Started', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); return; } if (copyAfterSaving) { copyImage(url, width, height); + dispatch( + addToast({ + title: 'Image Copied', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); return; } diff --git a/frontend/src/features/options/optionsSelectors.ts b/frontend/src/features/options/optionsSelectors.ts index c02512e34f..3d513f08d3 100644 --- a/frontend/src/features/options/optionsSelectors.ts +++ b/frontend/src/features/options/optionsSelectors.ts @@ -27,3 +27,6 @@ export const mayGenerateMultipleImagesSelector = createSelector( }, } ); + +export const optionsSelector = (state: RootState): OptionsState => + state.options; diff --git a/frontend/src/features/system/hooks/useToastWatcher.ts b/frontend/src/features/system/hooks/useToastWatcher.ts new file mode 100644 index 0000000000..5aeca3289e --- /dev/null +++ b/frontend/src/features/system/hooks/useToastWatcher.ts @@ -0,0 +1,19 @@ +import { useToast } from '@chakra-ui/react'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { useEffect } from 'react'; +import { toastQueueSelector } from '../systemSelectors'; +import { clearToastQueue } from '../systemSlice'; + +const useToastWatcher = () => { + const dispatch = useAppDispatch(); + const toastQueue = useAppSelector(toastQueueSelector); + const toast = useToast(); + useEffect(() => { + toastQueue.forEach((t) => { + toast(t); + }); + toastQueue.length > 0 && dispatch(clearToastQueue()); + }, [dispatch, toast, toastQueue]); +}; + +export default useToastWatcher; diff --git a/frontend/src/features/system/systemSelectors.ts b/frontend/src/features/system/systemSelectors.ts new file mode 100644 index 0000000000..9c1322cf92 --- /dev/null +++ b/frontend/src/features/system/systemSelectors.ts @@ -0,0 +1,6 @@ +import { RootState } from 'app/store'; +import { SystemState } from './systemSlice'; + +export const systemSelector = (state: RootState): SystemState => state.system; + +export const toastQueueSelector = (state: RootState) => state.system.toastQueue; diff --git a/frontend/src/features/system/systemSlice.ts b/frontend/src/features/system/systemSlice.ts index 1dff43ce17..76a6e6d7b3 100644 --- a/frontend/src/features/system/systemSlice.ts +++ b/frontend/src/features/system/systemSlice.ts @@ -1,6 +1,6 @@ import { createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; -import { ExpandedIndex } from '@chakra-ui/react'; +import { ExpandedIndex, UseToastOptions } from '@chakra-ui/react'; import * as InvokeAI from 'app/invokeai'; export type LogLevel = 'info' | 'warning' | 'error'; @@ -45,6 +45,7 @@ export interface SystemState isCancelable: boolean; saveIntermediatesInterval: number; enableImageDebugging: boolean; + toastQueue: UseToastOptions[]; } const initialSystemState: SystemState = { @@ -76,6 +77,7 @@ const initialSystemState: SystemState = { isCancelable: true, saveIntermediatesInterval: 5, enableImageDebugging: false, + toastQueue: [], }; export const systemSlice = createSlice({ @@ -206,6 +208,12 @@ export const systemSlice = createSlice({ setEnableImageDebugging: (state, action: PayloadAction) => { state.enableImageDebugging = action.payload; }, + addToast: (state, action: PayloadAction) => { + state.toastQueue.push(action.payload); + }, + clearToastQueue: (state) => { + state.toastQueue = []; + }, }, }); @@ -231,6 +239,8 @@ export const { setSaveIntermediatesInterval, setEnableImageDebugging, generationRequested, + addToast, + clearToastQueue, } = systemSlice.actions; export default systemSlice.reducer; From 024acf42af7f9c11e6ecbab08a2258a94033785f Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:25:49 +1300 Subject: [PATCH 085/220] Update Hotkey Info Add missing tooltip hotkeys and update the hotkeys modal to reflect the new hotkeys for the Unified Canvas. --- .../IAICanvasMaskButtonPopover.tsx | 10 ++- .../IAICanvasToolbar/IAICanvasRedoButton.tsx | 4 +- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 20 ++--- .../IAICanvasToolbar/IAICanvasUndoButton.tsx | 4 +- .../system/HotkeysModal/HotkeysModal.tsx | 86 +++++++++---------- 5 files changed, 63 insertions(+), 61 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx index de0aa75061..b862908bc1 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx @@ -92,8 +92,8 @@ const IAICanvasMaskButtonPopover = () => { trigger="hover" triggerComponent={ } @@ -101,9 +101,11 @@ const IAICanvasMaskButtonPopover = () => { } > - Clear Mask + + Clear Mask + diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx index f62ace16ef..bc68e4c59d 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx @@ -48,8 +48,8 @@ export default function IAICanvasRedoButton() { return ( } onClick={handleRedo} isDisabled={!canRedo} diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 925a5e86d2..4cac2687d4 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -197,29 +197,29 @@ const IAICanvasOutpaintingControls = () => { } onClick={handleMergeVisible} isDisabled={isProcessing} /> } onClick={handleSaveToGallery} isDisabled={isProcessing} /> } onClick={handleCopyImageToClipboard} isDisabled={isProcessing} /> } onClick={handleDownloadAsImage} isDisabled={isProcessing} @@ -239,8 +239,8 @@ const IAICanvasOutpaintingControls = () => { icon={} /> } onClick={handleResetCanvasView} /> diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx index 3c9c31a26c..d9e8668f39 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx @@ -49,8 +49,8 @@ export default function IAICanvasUndoButton() { return ( } onClick={handleUndo} isDisabled={!canUndo} diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx index 6da8259b67..10d11fbd00 100644 --- a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx @@ -148,11 +148,6 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Selects the inpainting eraser', hotkey: 'E', }, - { - title: 'Quick Toggle Brush/Eraser', - desc: 'Quick toggle between brush and eraser', - hotkey: 'X', - }, { title: 'Decrease Brush Size', desc: 'Decreases the size of the inpainting brush/eraser', @@ -164,30 +159,55 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { hotkey: ']', }, { - title: 'Hide Mask', - desc: 'Hide and unhide mask', - hotkey: 'H', + title: 'Move Tool', + desc: 'Allows canvas navigation', + hotkey: 'M', }, { - title: 'Decrease Mask Opacity', - desc: 'Decreases the opacity of the mask', - hotkey: 'Shift+[', + title: 'Quick Toggle Move', + desc: 'Temporarily toggles Move mode', + hotkey: 'Hold Space', }, { - title: 'Increase Mask Opacity', - desc: 'Increases the opacity of the mask', - hotkey: 'Shift+]', - }, - { - title: 'Invert Mask', - desc: 'Invert the mask preview', - hotkey: 'Shift+M', + title: 'Select Mask Layer', + desc: 'Toggles mask layer', + hotkey: 'Q', }, { title: 'Clear Mask', desc: 'Clear the entire mask', hotkey: 'Shift+C', }, + { + title: 'Hide Mask', + desc: 'Hide and unhide mask', + hotkey: 'H', + }, + { + title: 'Show/Hide Bounding Box', + desc: 'Toggle visibility of bounding box', + hotkey: 'Shift+H', + }, + { + title: 'Merge Visible', + desc: 'Merge all visible layers of canvas', + hotkey: 'Shift+M', + }, + { + title: 'Save To Gallery', + desc: 'Save current canvas to gallery', + hotkey: 'Shift+S', + }, + { + title: 'Copy to Clipboard', + desc: 'Copy current canvas to clipboard', + hotkey: 'Ctrl+C', + }, + { + title: 'Download Image', + desc: 'Download current canvas', + hotkey: 'Shift+D', + }, { title: 'Undo Stroke', desc: 'Undo a brush stroke', @@ -199,29 +219,9 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { hotkey: 'Ctrl+Shift+Z, Ctrl+Y', }, { - title: 'Lock Bounding Box', - desc: 'Locks the bounding box', - hotkey: 'Shift+W', - }, - { - title: 'Show/Hide Bounding Box', - desc: 'Toggle visibility of bounding box', - hotkey: 'Shift+H', - }, - { - title: 'Quick Toggle Lock Bounding Box', - desc: 'Hold to toggle locking the bounding box', - hotkey: 'W', - }, - { - title: 'Expand Inpainting Area', - desc: 'Expand your inpainting work area', - hotkey: 'Shift+J', - }, - { - title: 'Erase Canvas', - desc: 'Erase the images on the canvas', - hotkey: 'Shift+E', + title: 'Reset View', + desc: 'Reset Canvas View', + hotkey: 'R', }, ]; @@ -289,7 +289,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { -

Inpainting Hotkeys

+

Unified Canvas Hotkeys

From 93192b90f49338e9348d3c1749ca14dfe63b0f52 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:28:13 +1300 Subject: [PATCH 086/220] Fix theme changer not displaying current theme on page refresh --- frontend/src/features/system/ThemeChanger.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/system/ThemeChanger.tsx b/frontend/src/features/system/ThemeChanger.tsx index b9ef706902..51aab27451 100644 --- a/frontend/src/features/system/ThemeChanger.tsx +++ b/frontend/src/features/system/ThemeChanger.tsx @@ -22,6 +22,7 @@ export default function ThemeChanger() { From a96af7a15d51134e4049102962485a12c25aaab4 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:29:15 +1300 Subject: [PATCH 087/220] Fix tab count in hotkeys panel --- frontend/src/features/system/HotkeysModal/HotkeysModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx index 10d11fbd00..4b9ff7df0d 100644 --- a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx @@ -67,7 +67,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { { title: 'Change Tabs', desc: 'Switch to another workspace', - hotkey: '1-6', + hotkey: '1-5', }, { From 2bda3d6d2fbf2d86ba3360fdf7bf5215778b5237 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:36:17 +1300 Subject: [PATCH 088/220] Unify Brush and Eraser Sizes --- .../components/IAICanvasBrushPreview.tsx | 3 +-- .../IAICanvasEraserButtonPopover.tsx | 20 +++++++++---------- .../src/features/canvas/store/canvasSlice.ts | 9 ++------- .../src/features/canvas/store/canvasTypes.ts | 1 - 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx b/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx index 4acaa95a36..05599a1ad2 100644 --- a/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx +++ b/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx @@ -13,7 +13,6 @@ const canvasBrushPreviewSelector = createSelector( cursorPosition, stageDimensions: { width, height }, brushSize, - eraserSize, maskColor, brushColor, tool, @@ -28,7 +27,7 @@ const canvasBrushPreviewSelector = createSelector( cursorPosition, width, height, - radius: tool === 'brush' ? brushSize / 2 : eraserSize / 2, + radius: brushSize / 2, brushColorString: rgbaColorToString( layer === 'mask' ? { ...maskColor, a: 0.5 } : brushColor ), diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx index 6ce48a2fb6..f4afab8ca8 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx @@ -1,5 +1,5 @@ import { createSelector } from '@reduxjs/toolkit'; -import { setEraserSize, setTool } from 'features/canvas/store/canvasSlice'; +import { setBrushSize, setTool } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -16,11 +16,11 @@ import { export const selector = createSelector( [canvasSelector, isStagingSelector], (canvas, isStaging) => { - const { eraserSize, tool } = canvas; + const { brushSize, tool } = canvas; return { tool, - eraserSize, + brushSize, isStaging, }; }, @@ -32,7 +32,7 @@ export const selector = createSelector( ); const IAICanvasEraserButtonPopover = () => { const dispatch = useAppDispatch(); - const { tool, eraserSize, isStaging } = useAppSelector(selector); + const { tool, brushSize, isStaging } = useAppSelector(selector); const handleSelectEraserTool = () => dispatch(setTool('eraser')); @@ -51,25 +51,25 @@ const IAICanvasEraserButtonPopover = () => { useHotkeys( ['['], () => { - dispatch(setEraserSize(Math.max(eraserSize - 5, 5))); + dispatch(setBrushSize(Math.max(brushSize - 5, 5))); }, { enabled: () => true, preventDefault: true, }, - [eraserSize] + [brushSize] ); useHotkeys( [']'], () => { - dispatch(setEraserSize(Math.min(eraserSize + 5, 500))); + dispatch(setBrushSize(Math.min(brushSize + 5, 500))); }, { enabled: () => true, preventDefault: true, }, - [eraserSize] + [brushSize] ); return ( @@ -89,9 +89,9 @@ const IAICanvasEraserButtonPopover = () => { dispatch(setEraserSize(newSize))} + onChange={(newSize) => dispatch(setBrushSize(newSize))} /> diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 4bd58d9744..6437dddfe7 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -47,7 +47,6 @@ const initialCanvasState: CanvasState = { canvasContainerDimensions: { width: 0, height: 0 }, cursorPosition: null, doesCanvasNeedScaling: false, - eraserSize: 50, futureLayerStates: [], inpaintReplace: 0.1, isCanvasInitialized: false, @@ -115,9 +114,6 @@ export const canvasSlice = createSlice({ setBrushSize: (state, action: PayloadAction) => { state.brushSize = action.payload; }, - setEraserSize: (state, action: PayloadAction) => { - state.eraserSize = action.payload; - }, clearMask: (state) => { state.pastLayerStates.push(state.layerState); state.layerState.objects = state.layerState.objects.filter( @@ -275,11 +271,11 @@ export const canvasSlice = createSlice({ }; }, addLine: (state, action: PayloadAction) => { - const { tool, layer, brushColor, brushSize, eraserSize } = state; + const { tool, layer, brushColor, brushSize } = state; if (tool === 'move') return; - const newStrokeWidth = tool === 'brush' ? brushSize / 2 : eraserSize / 2; + const newStrokeWidth = brushSize / 2; // set & then spread this to only conditionally add the "color" key const newColor = @@ -608,7 +604,6 @@ export const { setLayer, setBrushColor, setBrushSize, - setEraserSize, addLine, addPointToCurrentLine, setShouldPreserveMaskedArea, diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 66887309a4..15d3f70f0d 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -76,7 +76,6 @@ export interface CanvasState { canvasContainerDimensions: Dimensions; cursorPosition: Vector2d | null; doesCanvasNeedScaling: boolean; - eraserSize: number; futureLayerStates: CanvasLayerState[]; inpaintReplace: number; intermediateImage?: InvokeAI.Image; From d0ceabd372fc1df8af75f94e0940abd980d53eac Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:50:49 +1300 Subject: [PATCH 089/220] Fix staging area display toggle not working --- .../components/IAICanvasStagingArea.tsx | 10 ++++----- .../IAICanvasStagingAreaToolbar.tsx | 22 ++++++++++++------- .../src/features/canvas/store/canvasSlice.ts | 5 +++++ .../src/features/canvas/store/canvasTypes.ts | 1 + 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx index bdf7e3edeb..6648841a2d 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx @@ -14,6 +14,7 @@ const selector = createSelector( layerState: { stagingArea: { images, selectedImageIndex }, }, + shouldShowStagingImage, } = canvas; return { @@ -21,6 +22,7 @@ const selector = createSelector( images.length > 0 ? images[selectedImageIndex] : undefined, isOnFirstImage: selectedImageIndex === 0, isOnLastImage: selectedImageIndex === images.length - 1, + shouldShowStagingImage, }; }, { @@ -34,10 +36,8 @@ type Props = GroupConfig; const IAICanvasStagingArea = (props: Props) => { const { ...rest } = props; - const { currentStagingAreaImage } = useAppSelector(selector); - - const [shouldShowStagedImage, setShouldShowStagedImage] = - useState(true); + const { currentStagingAreaImage, shouldShowStagingImage } = + useAppSelector(selector); const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = useState(true); @@ -52,7 +52,7 @@ const IAICanvasStagingArea = (props: Props) => { return ( - {shouldShowStagedImage && } + {shouldShowStagingImage && } {shouldShowStagingAreaOutline && ( 0 ? images[selectedImageIndex] : undefined, isOnFirstImage: selectedImageIndex === 0, isOnLastImage: selectedImageIndex === images.length - 1, + shouldShowStagingImage, }; }, { @@ -54,11 +57,12 @@ const selector = createSelector( const IAICanvasStagingAreaToolbar = () => { const dispatch = useAppDispatch(); - const { isOnFirstImage, isOnLastImage, currentStagingAreaImage } = - useAppSelector(selector); - - const [shouldShowStagedImage, setShouldShowStagedImage] = - useState(true); + const { + isOnFirstImage, + isOnLastImage, + currentStagingAreaImage, + shouldShowStagingImage, + } = useAppSelector(selector); const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = useState(true); @@ -116,9 +120,11 @@ const IAICanvasStagingAreaToolbar = () => { tooltip="Show/Hide" tooltipProps={{ placement: 'bottom' }} aria-label="Show/Hide" - data-alert={!shouldShowStagedImage} - icon={shouldShowStagedImage ? : } - onClick={() => setShouldShowStagedImage(!shouldShowStagedImage)} + data-alert={!shouldShowStagingImage} + icon={shouldShowStagingImage ? : } + onClick={() => + dispatch(setShouldShowStagingImage(!shouldShowStagingImage)) + } data-selected={true} /> ) => { + state.shouldShowStagingImage = action.payload; + }, }, extraReducers: canvasExtraReducers, }); @@ -654,6 +658,7 @@ export const { resetCanvasView, setCanvasContainerDimensions, fitBoundingBoxToStage, + setShouldShowStagingImage, } = canvasSlice.actions; export default canvasSlice.reducer; diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 15d3f70f0d..95bb40567f 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -110,4 +110,5 @@ export interface CanvasState { stageDimensions: Dimensions; stageScale: number; tool: CanvasTool; + shouldShowStagingImage: boolean; } From 4f5168030781cf1a74f72626fdd1b0d0518840ae Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 23:00:36 +1300 Subject: [PATCH 090/220] Staging Area delete button is now red So it doesnt feel blended into to the rest of them. --- .../features/canvas/components/IAICanvasStagingAreaToolbar.tsx | 1 + frontend/src/styles/Themes/_Colors_Dark.scss | 2 +- frontend/src/styles/Themes/_Colors_Green.scss | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx index 29b2c1ed83..5739defee7 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx @@ -134,6 +134,7 @@ const IAICanvasStagingAreaToolbar = () => { icon={} onClick={() => dispatch(discardStagedImages())} data-selected={true} + style={{ backgroundColor: 'var(--btn-delete-image)' }} />
diff --git a/frontend/src/styles/Themes/_Colors_Dark.scss b/frontend/src/styles/Themes/_Colors_Dark.scss index c3d673d053..9f3e4f7671 100644 --- a/frontend/src/styles/Themes/_Colors_Dark.scss +++ b/frontend/src/styles/Themes/_Colors_Dark.scss @@ -53,7 +53,7 @@ --btn-load-more-hover: rgb(54, 56, 66); --btn-svg-color: rgb(255, 255, 255); - --btn-delete-image: rgb(238, 107, 107); + --btn-delete-image: rgb(182, 46, 46); // IAI Button Colors --btn-checkbox-border-hover: rgb(46, 48, 68); diff --git a/frontend/src/styles/Themes/_Colors_Green.scss b/frontend/src/styles/Themes/_Colors_Green.scss index a6e2110404..4f49423a66 100644 --- a/frontend/src/styles/Themes/_Colors_Green.scss +++ b/frontend/src/styles/Themes/_Colors_Green.scss @@ -54,7 +54,7 @@ --btn-svg-color: rgb(255, 255, 255); - --btn-delete-image: rgb(238, 107, 107); + --btn-delete-image: rgb(182, 46, 46); // IAI Button Colors --btn-checkbox-border-hover: rgb(46, 48, 68); From e5951ad098cd7214d24bffce23015db32023f9dc Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 18 Nov 2022 23:22:03 +1300 Subject: [PATCH 091/220] Revert "Fix theme changer not displaying current theme on page refresh" This reverts commit 903edfb803e743500242589ff093a8a8a0912726. --- frontend/src/features/system/ThemeChanger.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/features/system/ThemeChanger.tsx b/frontend/src/features/system/ThemeChanger.tsx index 51aab27451..b9ef706902 100644 --- a/frontend/src/features/system/ThemeChanger.tsx +++ b/frontend/src/features/system/ThemeChanger.tsx @@ -22,7 +22,6 @@ export default function ThemeChanger() { From 87439feeb295c823bba947f2ba1f353aeb9dd176 Mon Sep 17 00:00:00 2001 From: javl Date: Fri, 18 Nov 2022 16:33:02 +0100 Subject: [PATCH 092/220] Add arguments to use SSL to webserver --- backend/invoke_ai_web_server.py | 11 ++++++++--- docs/features/WEB.md | 2 ++ ldm/invoke/args.py | 12 ++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 07e76e9263..86fda19f2e 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -215,17 +215,22 @@ class InvokeAIWebServer: sys.exit(0) else: + useSSL = (args.certfile or args.keyfile) print(">> Started Invoke AI Web Server!") if self.host == "0.0.0.0": print( - f"Point your browser at http://localhost:{self.port} or use the host's DNS name or IP address." + f"Point your browser at http{'s' if useSSL else ''}://localhost:{self.port} or use the host's DNS name or IP address." ) else: print( ">> Default host address now 127.0.0.1 (localhost). Use --host 0.0.0.0 to bind any address." ) - print(f">> Point your browser at http://{self.host}:{self.port}") - self.socketio.run(app=self.app, host=self.host, port=self.port) + print(f">> Point your browser at http{'s' if useSSL else ''}://{self.host}:{self.port}") + if not useSSL: + self.socketio.run(app=self.app, host=self.host, port=self.port) + else: + self.socketio.run(app=self.app, host=self.host, port=self.port, + certfile=args.certfile, keyfile=args.keyfile) def setup_app(self): self.result_url = "outputs/" diff --git a/docs/features/WEB.md b/docs/features/WEB.md index 795d9cf962..c6f4d3d387 100644 --- a/docs/features/WEB.md +++ b/docs/features/WEB.md @@ -303,6 +303,8 @@ The WebGUI is only rapid development. Check back regularly for updates! | `--cors [CORS ...]` | Additional allowed origins, comma-separated | | `--host HOST` | Web server: Host or IP to listen on. Set to 0.0.0.0 to accept traffic from other devices on your network. | | `--port PORT` | Web server: Port to listen on | +| `--certfile CERTFILE` | Web server: Path to certificate file to use for SSL. Use together with --keyfile | +| `--keyfile KEYFILE` | Web server: Path to private key file to use for SSL. Use together with --certfile' | | `--gui` | Start InvokeAI GUI - This is the "desktop mode" version of the web app. It uses Flask to create a desktop app experience of the webserver. | ### Web Specific Features diff --git a/ldm/invoke/args.py b/ldm/invoke/args.py index e626b4206f..5d60153a60 100644 --- a/ldm/invoke/args.py +++ b/ldm/invoke/args.py @@ -615,6 +615,18 @@ class Args(object): default='9090', help='Web server: Port to listen on' ) + web_server_group.add_argument( + '--certfile', + type=str, + default=None, + help='Web server: Path to certificate file to use for SSL. Use together with --keyfile' + ) + web_server_group.add_argument( + '--keyfile', + type=str, + default=None, + help='Web server: Path to private key file to use for SSL. Use together with --certfile' + ) web_server_group.add_argument( '--gui', dest='gui', From d82a21cfb2bbffd45c986189eb18e922053fc778 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 08:52:29 +1100 Subject: [PATCH 093/220] Integrates #1487 - touch events Need to add: - Pinch zoom - Touch-specific handling (some things aren't quite right) --- frontend/src/features/canvas/components/IAICanvas.tsx | 3 +++ frontend/src/features/canvas/hooks/useCanvasMouseDown.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/components/IAICanvas.tsx b/frontend/src/features/canvas/components/IAICanvas.tsx index b5fb93d0e5..cf8dd6e0ff 100644 --- a/frontend/src/features/canvas/components/IAICanvas.tsx +++ b/frontend/src/features/canvas/components/IAICanvas.tsx @@ -149,6 +149,9 @@ const IAICanvas = () => { width={stageDimensions.width} height={stageDimensions.height} scale={{ x: stageScale, y: stageScale }} + onTouchStart={handleMouseDown} + onTouchMove={handleMouseMove} + onTouchEnd={handleMouseUp} onMouseDown={handleMouseDown} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseOut} diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index 1af0401779..feae250918 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -31,7 +31,7 @@ const useCanvasMouseDown = (stageRef: MutableRefObject) => { const { tool, isStaging } = useAppSelector(selector); return useCallback( - (e: KonvaEventObject) => { + (e: KonvaEventObject) => { if (!stageRef.current) return; stageRef.current.container().focus(); From bc46c46835cc9abaf3d35b5926a0d80f390812ac Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 14:04:29 +1100 Subject: [PATCH 094/220] Refactors upload-related async thunks - Now standard thunks instead of RTK createAsyncThunk() - Adds toasts for all canvas upload-related actions --- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 15 +- .../src/features/canvas/store/canvasSlice.ts | 54 ++++++- .../canvas/store/reducers/extraReducers.ts | 42 ------ .../store/reducers/setInitialCanvasImage.ts | 52 ------- .../store/thunks/mergeAndUploadCanvas.ts | 138 ++++++++++++++++++ .../canvas/util/mergeAndUploadCanvas.ts | 103 ------------- frontend/src/features/gallery/gallerySlice.ts | 42 ------ .../src/features/gallery/util/uploadImage.ts | 39 ++--- frontend/src/features/options/optionsSlice.ts | 11 -- 9 files changed, 219 insertions(+), 277 deletions(-) delete mode 100644 frontend/src/features/canvas/store/reducers/extraReducers.ts delete mode 100644 frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts create mode 100644 frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts delete mode 100644 frontend/src/features/canvas/util/mergeAndUploadCanvas.ts diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 4cac2687d4..a702f3abd1 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -25,7 +25,7 @@ import IAICanvasSettingsButtonPopover from './IAICanvasSettingsButtonPopover'; import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; -import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; +import { mergeAndUploadCanvas } from 'features/canvas/store/thunks/mergeAndUploadCanvas'; import { canvasSelector, isStagingSelector, @@ -151,14 +151,19 @@ const IAICanvasOutpaintingControls = () => { }; const handleMergeVisible = () => { - dispatch(mergeAndUploadCanvas({})); + dispatch( + mergeAndUploadCanvas({ + cropVisible: false, + shouldSetAsInitialImage: true, + }) + ); }; const handleSaveToGallery = () => { dispatch( mergeAndUploadCanvas({ cropVisible: true, - saveToGallery: true, + shouldSaveToGallery: true, }) ); }; @@ -167,7 +172,7 @@ const IAICanvasOutpaintingControls = () => { dispatch( mergeAndUploadCanvas({ cropVisible: true, - copyAfterSaving: true, + shouldCopy: true, }) ); }; @@ -176,7 +181,7 @@ const IAICanvasOutpaintingControls = () => { dispatch( mergeAndUploadCanvas({ cropVisible: true, - downloadAfterSaving: true, + shouldDownload: true, }) ); }; diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index e456cf36cd..fc14abedc6 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -8,12 +8,11 @@ import { roundDownToMultiple, roundToMultiple, } from 'common/util/roundDownToMultiple'; -import { canvasExtraReducers } from './reducers/extraReducers'; -import { setInitialCanvasImage as setInitialCanvasImage_reducer } from './reducers/setInitialCanvasImage'; import calculateScale from '../util/calculateScale'; import calculateCoordinates from '../util/calculateCoordinates'; import floorCoordinates from '../util/floorCoordinates'; import { + CanvasImage, CanvasLayer, CanvasLayerState, CanvasState, @@ -152,7 +151,45 @@ export const canvasSlice = createSlice({ state.cursorPosition = action.payload; }, setInitialCanvasImage: (state, action: PayloadAction) => { - setInitialCanvasImage_reducer(state, action.payload); + const image = action.payload; + const newBoundingBoxDimensions = { + width: roundDownToMultiple(_.clamp(image.width, 64, 512), 64), + height: roundDownToMultiple(_.clamp(image.height, 64, 512), 64), + }; + + const newBoundingBoxCoordinates = { + x: roundToMultiple( + image.width / 2 - newBoundingBoxDimensions.width / 2, + 64 + ), + y: roundToMultiple( + image.height / 2 - newBoundingBoxDimensions.height / 2, + 64 + ), + }; + + state.boundingBoxDimensions = newBoundingBoxDimensions; + state.boundingBoxCoordinates = newBoundingBoxCoordinates; + + state.pastLayerStates.push(state.layerState); + state.layerState = { + ...initialLayerState, + objects: [ + { + kind: 'image', + layer: 'base', + x: 0, + y: 0, + width: image.width, + height: image.height, + image: image, + }, + ], + }; + state.futureLayerStates = []; + + state.isCanvasInitialized = false; + state.doesCanvasNeedScaling = true; }, setStageDimensions: (state, action: PayloadAction) => { state.stageDimensions = action.payload; @@ -599,8 +636,16 @@ export const canvasSlice = createSlice({ setShouldShowStagingImage: (state, action: PayloadAction) => { state.shouldShowStagingImage = action.payload; }, + setMergedCanvas: (state, action: PayloadAction) => { + state.pastLayerStates.push({ + ...state.layerState, + }); + + state.futureLayerStates = []; + + state.layerState.objects = [action.payload]; + }, }, - extraReducers: canvasExtraReducers, }); export const { @@ -659,6 +704,7 @@ export const { setCanvasContainerDimensions, fitBoundingBoxToStage, setShouldShowStagingImage, + setMergedCanvas, } = canvasSlice.actions; export default canvasSlice.reducer; diff --git a/frontend/src/features/canvas/store/reducers/extraReducers.ts b/frontend/src/features/canvas/store/reducers/extraReducers.ts deleted file mode 100644 index 5c990d2867..0000000000 --- a/frontend/src/features/canvas/store/reducers/extraReducers.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { CanvasState } from '../canvasTypes'; -import _ from 'lodash'; -import { mergeAndUploadCanvas } from '../../util/mergeAndUploadCanvas'; -import { uploadImage } from 'features/gallery/util/uploadImage'; -import { ActionReducerMapBuilder } from '@reduxjs/toolkit'; -import { setInitialCanvasImage } from './setInitialCanvasImage'; - -export const canvasExtraReducers = ( - builder: ActionReducerMapBuilder -) => { - builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, originalBoundingBox } = action.payload; - - if (kind === 'temp_merged_canvas') { - state.pastLayerStates.push({ - ...state.layerState, - }); - - state.futureLayerStates = []; - - state.layerState.objects = [ - { - kind: 'image', - layer: 'base', - ...originalBoundingBox, - image, - }, - ]; - } - }); - builder.addCase(uploadImage.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, activeTabName } = action.payload; - - if (kind !== 'init') return; - - if (activeTabName === 'unifiedCanvas') { - setInitialCanvasImage(state, image); - } - }); -}; diff --git a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts b/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts deleted file mode 100644 index fb45597406..0000000000 --- a/frontend/src/features/canvas/store/reducers/setInitialCanvasImage.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as InvokeAI from 'app/invokeai'; -import { initialLayerState } from '../canvasSlice'; -import { CanvasState } from '../canvasTypes'; -import { - roundDownToMultiple, - roundToMultiple, -} from 'common/util/roundDownToMultiple'; -import _ from 'lodash'; - -export const setInitialCanvasImage = ( - state: CanvasState, - image: InvokeAI.Image -) => { - const newBoundingBoxDimensions = { - width: roundDownToMultiple(_.clamp(image.width, 64, 512), 64), - height: roundDownToMultiple(_.clamp(image.height, 64, 512), 64), - }; - - const newBoundingBoxCoordinates = { - x: roundToMultiple( - image.width / 2 - newBoundingBoxDimensions.width / 2, - 64 - ), - y: roundToMultiple( - image.height / 2 - newBoundingBoxDimensions.height / 2, - 64 - ), - }; - - state.boundingBoxDimensions = newBoundingBoxDimensions; - state.boundingBoxCoordinates = newBoundingBoxCoordinates; - - state.pastLayerStates.push(state.layerState); - state.layerState = { - ...initialLayerState, - objects: [ - { - kind: 'image', - layer: 'base', - x: 0, - y: 0, - width: image.width, - height: image.height, - image: image, - }, - ], - }; - state.futureLayerStates = []; - - state.isCanvasInitialized = false; - state.doesCanvasNeedScaling = true; -}; diff --git a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts new file mode 100644 index 0000000000..a483a24cb6 --- /dev/null +++ b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts @@ -0,0 +1,138 @@ +import { AnyAction, ThunkAction } from '@reduxjs/toolkit'; +import { RootState } from 'app/store'; +import * as InvokeAI from 'app/invokeai'; +import { v4 as uuidv4 } from 'uuid'; +import layerToDataURL from '../../util/layerToDataURL'; +import downloadFile from '../../util/downloadFile'; +import copyImage from '../../util/copyImage'; +import { getCanvasBaseLayer } from '../../util/konvaInstanceProvider'; +import { addToast } from 'features/system/systemSlice'; +import { addImage } from 'features/gallery/gallerySlice'; +import { setMergedCanvas } from '../canvasSlice'; + +type MergeAndUploadCanvasConfig = { + cropVisible?: boolean; + shouldSaveToGallery?: boolean; + shouldDownload?: boolean; + shouldCopy?: boolean; + shouldSetAsInitialImage?: boolean; +}; + +const defaultConfig: MergeAndUploadCanvasConfig = { + cropVisible: false, + shouldSaveToGallery: false, + shouldDownload: false, + shouldCopy: false, + shouldSetAsInitialImage: true, +}; + +export const mergeAndUploadCanvas = + (config = defaultConfig): ThunkAction => + async (dispatch, getState) => { + const { + cropVisible, + shouldSaveToGallery, + shouldDownload, + shouldCopy, + shouldSetAsInitialImage, + } = config; + + const state = getState() as RootState; + + const stageScale = state.canvas.stageScale; + + const canvasBaseLayer = getCanvasBaseLayer(); + + if (!canvasBaseLayer) return; + + const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( + canvasBaseLayer, + stageScale + ); + + if (!dataURL) return; + + const formData = new FormData(); + + formData.append( + 'data', + JSON.stringify({ + dataURL, + filename: 'merged_canvas.png', + kind: shouldSaveToGallery ? 'result' : 'temp', + cropVisible, + }) + ); + + const response = await fetch(window.location.origin + '/upload', { + method: 'POST', + body: formData, + }); + + const { url, mtime, width, height } = + (await response.json()) as InvokeAI.ImageUploadResponse; + + const newImage: InvokeAI.Image = { + uuid: uuidv4(), + url, + mtime, + category: shouldSaveToGallery ? 'result' : 'user', + width: width, + height: height, + }; + + if (shouldDownload) { + downloadFile(url); + dispatch( + addToast({ + title: 'Image Download Started', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); + } + + if (shouldCopy) { + copyImage(url, width, height); + dispatch( + addToast({ + title: 'Image Copied', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); + } + + if (shouldSaveToGallery) { + dispatch(addImage({ image: newImage, category: 'result' })); + dispatch( + addToast({ + title: 'Image Saved to Gallery', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); + } + + if (shouldSetAsInitialImage) { + dispatch( + setMergedCanvas({ + kind: 'image', + layer: 'base', + ...originalBoundingBox, + image: newImage, + }) + ); + dispatch( + addToast({ + title: 'Canvas Merged', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); + } + }; diff --git a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts deleted file mode 100644 index 1c1e171fc3..0000000000 --- a/frontend/src/features/canvas/util/mergeAndUploadCanvas.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { createAsyncThunk } from '@reduxjs/toolkit'; -import { RootState } from 'app/store'; -import * as InvokeAI from 'app/invokeai'; -import { v4 as uuidv4 } from 'uuid'; -import layerToDataURL from './layerToDataURL'; -import downloadFile from './downloadFile'; -import copyImage from './copyImage'; -import { getCanvasBaseLayer } from './konvaInstanceProvider'; -import { addToast } from 'features/system/systemSlice'; - -export const mergeAndUploadCanvas = createAsyncThunk( - 'canvas/mergeAndUploadCanvas', - async ( - args: { - cropVisible?: boolean; - saveToGallery?: boolean; - downloadAfterSaving?: boolean; - copyAfterSaving?: boolean; - }, - thunkAPI - ) => { - const { saveToGallery, downloadAfterSaving, cropVisible, copyAfterSaving } = - args; - - const { getState, dispatch } = thunkAPI; - - const state = getState() as RootState; - - const stageScale = state.canvas.stageScale; - - const canvasBaseLayer = getCanvasBaseLayer(); - - if (!canvasBaseLayer) return; - - const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( - canvasBaseLayer, - stageScale - ); - - if (!dataURL) return; - - const formData = new FormData(); - - formData.append( - 'data', - JSON.stringify({ - dataURL, - filename: 'merged_canvas.png', - kind: saveToGallery ? 'result' : 'temp', - cropVisible, - }) - ); - - const response = await fetch(window.location.origin + '/upload', { - method: 'POST', - body: formData, - }); - - const { url, mtime, width, height } = - (await response.json()) as InvokeAI.ImageUploadResponse; - - if (downloadAfterSaving) { - downloadFile(url); - dispatch( - addToast({ - title: 'Image Download Started', - status: 'success', - duration: 2500, - isClosable: true, - }) - ); - return; - } - - if (copyAfterSaving) { - copyImage(url, width, height); - dispatch( - addToast({ - title: 'Image Copied', - status: 'success', - duration: 2500, - isClosable: true, - }) - ); - return; - } - - const newImage: InvokeAI.Image = { - uuid: uuidv4(), - url, - mtime, - category: saveToGallery ? 'result' : 'user', - width: width, - height: height, - }; - - return { - image: newImage, - kind: saveToGallery ? 'merged_canvas' : 'temp_merged_canvas', - originalBoundingBox, - }; - } -); diff --git a/frontend/src/features/gallery/gallerySlice.ts b/frontend/src/features/gallery/gallerySlice.ts index 7d397401ae..d5c5f65528 100644 --- a/frontend/src/features/gallery/gallerySlice.ts +++ b/frontend/src/features/gallery/gallerySlice.ts @@ -4,8 +4,6 @@ import _, { clamp } from 'lodash'; import * as InvokeAI from 'app/invokeai'; import { IRect } from 'konva/lib/types'; import { InvokeTabName } from 'features/tabs/InvokeTabs'; -import { mergeAndUploadCanvas } from 'features/canvas/util/mergeAndUploadCanvas'; -import { uploadImage } from './util/uploadImage'; export type GalleryCategory = 'user' | 'result'; @@ -266,46 +264,6 @@ export const gallerySlice = createSlice({ state.galleryWidth = action.payload; }, }, - extraReducers: (builder) => { - builder.addCase(mergeAndUploadCanvas.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, originalBoundingBox } = action.payload; - - if (kind === 'merged_canvas') { - const { uuid, url, mtime } = image; - - state.categories.result.images.unshift(image); - - if (state.shouldAutoSwitchToNewImages) { - state.currentImageUuid = uuid; - state.currentImage = image; - state.currentCategory = 'result'; - } - - state.intermediateImage = undefined; - state.categories.result.latest_mtime = mtime; - } - }); - builder.addCase(uploadImage.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind } = action.payload; - - if (kind === 'init') { - const { uuid, mtime } = image; - - state.categories.result.images.unshift(image); - - if (state.shouldAutoSwitchToNewImages) { - state.currentImageUuid = uuid; - state.currentImage = image; - state.currentCategory = 'user'; - } - - state.intermediateImage = undefined; - state.categories.result.latest_mtime = mtime; - } - }); - }, }); export const { diff --git a/frontend/src/features/gallery/util/uploadImage.ts b/frontend/src/features/gallery/util/uploadImage.ts index 95aba77f7c..3e9f3463a8 100644 --- a/frontend/src/features/gallery/util/uploadImage.ts +++ b/frontend/src/features/gallery/util/uploadImage.ts @@ -1,20 +1,22 @@ -import { createAsyncThunk } from '@reduxjs/toolkit'; +import { AnyAction, ThunkAction } from '@reduxjs/toolkit'; import { RootState } from 'app/store'; import * as InvokeAI from 'app/invokeai'; import { v4 as uuidv4 } from 'uuid'; import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice'; +import { setInitialImage } from 'features/options/optionsSlice'; +import { addImage } from '../gallerySlice'; -export const uploadImage = createAsyncThunk( - 'gallery/uploadImage', - async ( - args: { - imageFile: File; - }, - thunkAPI - ) => { - const { imageFile } = args; +type UploadImageConfig = { + imageFile: File; +}; - const { getState } = thunkAPI; +export const uploadImage = + ( + config: UploadImageConfig + ): ThunkAction => + async (dispatch, getState) => { + const { imageFile } = config; const state = getState() as RootState; @@ -47,10 +49,11 @@ export const uploadImage = createAsyncThunk( height: height, }; - return { - image: newImage, - kind: 'init', - activeTabName, - }; - } -); + dispatch(addImage({ image: newImage, category: 'user' })); + + if (activeTabName === 'unifiedCanvas') { + dispatch(setInitialCanvasImage(newImage)); + } else if (activeTabName === 'img2img') { + dispatch(setInitialImage(newImage)); + } + }; diff --git a/frontend/src/features/options/optionsSlice.ts b/frontend/src/features/options/optionsSlice.ts index 37eae5ff89..a17c754bdb 100644 --- a/frontend/src/features/options/optionsSlice.ts +++ b/frontend/src/features/options/optionsSlice.ts @@ -5,7 +5,6 @@ import promptToString from 'common/util/promptToString'; import { seedWeightsToString } from 'common/util/seedWeightPairs'; import { FACETOOL_TYPES } from 'app/constants'; import { InvokeTabName, tabMap } from 'features/tabs/InvokeTabs'; -import { uploadImage } from 'features/gallery/util/uploadImage'; export type UpscalingLevel = 2 | 4; @@ -362,16 +361,6 @@ export const optionsSlice = createSlice({ state.isLightBoxOpen = action.payload; }, }, - extraReducers: (builder) => { - builder.addCase(uploadImage.fulfilled, (state, action) => { - if (!action.payload) return; - const { image, kind, activeTabName } = action.payload; - - if (kind === 'init' && activeTabName === 'img2img') { - state.initialImage = image; - } - }); - }, }); export const { From 2ab868314f610f7dd08d4234741640995ce32c75 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 14:23:06 +1100 Subject: [PATCH 095/220] Reorganises app file structure --- frontend/src/app/App.tsx | 20 +++--- frontend/src/app/constants.ts | 2 +- frontend/src/app/invokeai.d.ts | 4 +- .../src/app/selectors/readinessSelector.ts | 6 +- frontend/src/app/socketio/actions.ts | 4 +- frontend/src/app/socketio/emitters.ts | 8 +-- frontend/src/app/socketio/listeners.ts | 8 +-- frontend/src/app/store.ts | 6 +- .../src/common/components/GuidePopover.tsx | 2 +- .../src/common/components/ImageUploader.tsx | 6 +- .../src/common/util/parameterTranslation.ts | 6 +- .../components/IAICanvasIntermediateImage.tsx | 2 +- .../canvas/components/IAICanvasResizer.tsx | 2 +- .../IAICanvasToolbar/IAICanvasRedoButton.tsx | 2 +- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 2 +- .../IAICanvasToolbar/IAICanvasUndoButton.tsx | 2 +- .../features/canvas/hooks/useCanvasHotkeys.ts | 2 +- .../canvas/hooks/useCanvasMouseDown.ts | 2 +- .../canvas/hooks/useCanvasMouseEnter.ts | 2 +- .../canvas/hooks/useCanvasMouseMove.ts | 2 +- .../features/canvas/hooks/useCanvasMouseUp.ts | 2 +- .../store/thunks/mergeAndUploadCanvas.ts | 4 +- .../{ => components}/CurrentImageButtons.scss | 0 .../{ => components}/CurrentImageButtons.tsx | 12 ++-- .../{ => components}/CurrentImageDisplay.scss | 2 +- .../{ => components}/CurrentImageDisplay.tsx | 6 +- .../{ => components}/CurrentImagePreview.tsx | 4 +- .../{ => components}/DeleteImageModal.tsx | 2 +- .../{ => components}/HoverableImage.scss | 0 .../{ => components}/HoverableImage.tsx | 6 +- .../{ => components}/ImageGallery.scss | 2 +- .../gallery/{ => components}/ImageGallery.tsx | 6 +- .../ImageMetadataViewer.scss | 2 +- .../ImageMetadataViewer.tsx | 2 +- .../gallery/{ => store}/gallerySlice.ts | 2 +- .../{ => store}/gallerySliceSelectors.ts | 6 +- .../{util => store/thunks}/uploadImage.ts | 4 +- .../lightbox/{ => components}/Lightbox.scss | 2 +- .../lightbox/{ => components}/Lightbox.tsx | 12 ++-- .../{ => components}/ReactPanZoom.tsx | 0 .../AccordionItems/AdvancedSettings.scss | 2 +- .../AccordionItems/InvokeAccordionItem.tsx | 0 .../FaceRestore/FaceRestoreHeader.tsx | 2 +- .../FaceRestore/FaceRestoreOptions.tsx | 4 +- .../AdvancedOptions/ImageToImage/ImageFit.tsx | 2 +- .../ImageToImage/ImageToImageStrength.tsx | 2 +- .../BoundingBoxDarkenOutside.tsx | 0 .../BoundingBoxDimensionSlider.tsx | 0 .../BoundingBoxSettings/BoundingBoxLock.tsx | 0 .../BoundingBoxSettings.scss | 0 .../BoundingBoxSettings.tsx | 0 .../BoundingBoxVisibility.tsx | 0 .../Inpainting/ClearBrushHistory.tsx | 0 .../Inpainting/InpaintReplace.tsx | 6 +- .../Inpainting/InpaintingSettings.tsx | 0 .../AdvancedOptions/Output/HiresOptions.tsx | 2 +- .../AdvancedOptions/Output/OutputHeader.tsx | 0 .../AdvancedOptions/Output/OutputOptions.tsx | 0 .../Output/SeamlessOptions.tsx | 2 +- .../AdvancedOptions/Seed/Perlin.tsx | 2 +- .../AdvancedOptions/Seed/RandomizeSeed.tsx | 2 +- .../AdvancedOptions/Seed/Seed.tsx | 2 +- .../AdvancedOptions/Seed/SeedHeader.tsx | 0 .../AdvancedOptions/Seed/SeedOptions.tsx | 0 .../AdvancedOptions/Seed/ShuffleSeed.tsx | 2 +- .../AdvancedOptions/Seed/Threshold.tsx | 2 +- .../AdvancedOptions/Upscale/UpscaleHeader.tsx | 2 +- .../Upscale/UpscaleOptions.scss | 0 .../Upscale/UpscaleOptions.tsx | 4 +- .../Variations/GenerateVariations.tsx | 2 +- .../Variations/SeedWeights.tsx | 2 +- .../Variations/VariationAmount.tsx | 2 +- .../Variations/VariationsHeader.tsx | 0 .../Variations/VariationsOptions.tsx | 0 .../MainAdvancedOptionsCheckbox.tsx | 2 +- .../MainOptions/MainCFGScale.tsx | 2 +- .../MainOptions/MainHeight.tsx | 4 +- .../MainOptions/MainIterations.tsx | 4 +- .../MainOptions/MainOptions.scss | 2 +- .../MainOptions/MainOptions.tsx | 0 .../MainOptions/MainSampler.tsx | 2 +- .../MainOptions/MainSteps.tsx | 2 +- .../MainOptions/MainWidth.tsx | 4 +- .../{ => components}/OptionsAccordion.tsx | 2 +- .../ProcessButtons/CancelButton.tsx | 2 +- .../ProcessButtons/InvokeButton.tsx | 2 +- .../ProcessButtons/Loopback.tsx | 2 +- .../ProcessButtons/ProcessButtons.scss | 2 +- .../ProcessButtons/ProcessButtons.tsx | 0 .../PromptInput/PromptInput.scss | 0 .../PromptInput/PromptInput.tsx | 4 +- .../options/{ => store}/optionsSelectors.ts | 2 +- .../options/{ => store}/optionsSlice.ts | 2 +- .../system/{ => components}/Console.scss | 0 .../system/{ => components}/Console.tsx | 2 +- .../HotkeysModal/HotkeysModal.scss | 2 +- .../HotkeysModal/HotkeysModal.tsx | 0 .../HotkeysModal/HotkeysModalItem.tsx | 0 .../system/{ => components}/Modal.scss | 2 +- .../system/{ => components}/ProgressBar.scss | 2 +- .../system/{ => components}/ProgressBar.tsx | 2 +- .../SettingsModal/ModelList.scss | 0 .../SettingsModal/ModelList.tsx | 2 +- .../SettingsModal/SettingsModal.scss | 2 +- .../SettingsModal/SettingsModal.tsx | 2 +- .../system/{ => components}/SiteHeader.scss | 0 .../system/{ => components}/SiteHeader.tsx | 0 .../{ => components}/StatusIndicator.scss | 0 .../{ => components}/StatusIndicator.tsx | 2 +- .../system/{ => components}/ThemeChanger.tsx | 6 +- .../features/system/hooks/useToastWatcher.ts | 4 +- .../system/{ => store}/systemSelectors.ts | 0 .../system/{ => store}/systemSlice.ts | 0 .../tabs/ImageToImage/ImageToImagePanel.tsx | 71 ------------------- .../tabs/TextToImage/TextToImagePanel.tsx | 64 ----------------- .../tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx | 65 ----------------- .../tabs/{ => components}/FloatingButton.scss | 2 +- .../FloatingGalleryButton.tsx | 2 +- .../FloatingOptionsPanelButtons.tsx | 8 +-- .../ImageToImage/ImageToImage.scss | 2 +- .../ImageToImage/ImageToImageDisplay.tsx | 2 +- .../ImageToImage/ImageToImagePanel.tsx | 71 +++++++++++++++++++ .../ImageToImage/InitImagePreview.tsx | 2 +- .../ImageToImage/InitialImageOverlay.tsx | 0 .../{ => components}/ImageToImage/index.tsx | 2 +- .../{ => components}/InvokeOptionsPanel.scss | 2 +- .../{ => components}/InvokeOptionsPanel.tsx | 2 +- .../tabs/{ => components}/InvokeTabs.scss | 2 +- .../tabs/{ => components}/InvokeTabs.tsx | 6 +- .../tabs/{ => components}/InvokeWorkarea.scss | 2 +- .../tabs/{ => components}/InvokeWorkarea.tsx | 6 +- .../TextToImage/TextToImage.scss | 2 +- .../TextToImage/TextToImageDisplay.tsx | 2 +- .../TextToImage/TextToImagePanel.tsx | 64 +++++++++++++++++ .../{ => components}/TextToImage/index.tsx | 2 +- .../UnifiedCanvas/CanvasWorkarea.scss | 2 +- .../UnifiedCanvas/UnifiedCanvasDisplay.tsx | 2 +- .../UnifiedCanvas/UnifiedCanvasPanel.tsx | 65 +++++++++++++++++ .../UnifiedCanvas/UnifiedCanvasWorkarea.tsx | 2 +- frontend/src/styles/index.scss | 54 +++++++------- 140 files changed, 392 insertions(+), 392 deletions(-) rename frontend/src/features/gallery/{ => components}/CurrentImageButtons.scss (100%) rename frontend/src/features/gallery/{ => components}/CurrentImageButtons.tsx (96%) rename frontend/src/features/gallery/{ => components}/CurrentImageDisplay.scss (97%) rename frontend/src/features/gallery/{ => components}/CurrentImageDisplay.tsx (87%) rename frontend/src/features/gallery/{ => components}/CurrentImagePreview.tsx (98%) rename frontend/src/features/gallery/{ => components}/DeleteImageModal.tsx (99%) rename frontend/src/features/gallery/{ => components}/HoverableImage.scss (100%) rename frontend/src/features/gallery/{ => components}/HoverableImage.tsx (97%) rename frontend/src/features/gallery/{ => components}/ImageGallery.scss (99%) rename frontend/src/features/gallery/{ => components}/ImageGallery.tsx (98%) rename frontend/src/features/gallery/{ => components}/ImageMetaDataViewer/ImageMetadataViewer.scss (91%) rename frontend/src/features/gallery/{ => components}/ImageMetaDataViewer/ImageMetadataViewer.tsx (99%) rename frontend/src/features/gallery/{ => store}/gallerySlice.ts (99%) rename frontend/src/features/gallery/{ => store}/gallerySliceSelectors.ts (90%) rename frontend/src/features/gallery/{util => store/thunks}/uploadImage.ts (90%) rename frontend/src/features/lightbox/{ => components}/Lightbox.scss (97%) rename frontend/src/features/lightbox/{ => components}/Lightbox.tsx (88%) rename frontend/src/features/lightbox/{ => components}/ReactPanZoom.tsx (100%) rename frontend/src/features/options/{ => components}/AccordionItems/AdvancedSettings.scss (95%) rename frontend/src/features/options/{ => components}/AccordionItems/InvokeAccordionItem.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx (92%) rename frontend/src/features/options/{ => components}/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx (95%) rename frontend/src/features/options/{ => components}/AdvancedOptions/ImageToImage/ImageFit.tsx (88%) rename frontend/src/features/options/{ => components}/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx (94%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/ClearBrushHistory.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/InpaintReplace.tsx (88%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Inpainting/InpaintingSettings.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Output/HiresOptions.tsx (91%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Output/OutputHeader.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Output/OutputOptions.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Output/SeamlessOptions.tsx (91%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/Perlin.tsx (90%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/RandomizeSeed.tsx (89%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/Seed.tsx (94%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/SeedHeader.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/SeedOptions.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/ShuffleSeed.tsx (91%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Seed/Threshold.tsx (90%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Upscale/UpscaleHeader.tsx (92%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Upscale/UpscaleOptions.scss (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Upscale/UpscaleOptions.tsx (94%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Variations/GenerateVariations.tsx (89%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Variations/SeedWeights.tsx (93%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Variations/VariationAmount.tsx (91%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Variations/VariationsHeader.tsx (100%) rename frontend/src/features/options/{ => components}/AdvancedOptions/Variations/VariationsOptions.tsx (100%) rename frontend/src/features/options/{ => components}/MainOptions/MainAdvancedOptionsCheckbox.tsx (90%) rename frontend/src/features/options/{ => components}/MainOptions/MainCFGScale.tsx (91%) rename frontend/src/features/options/{ => components}/MainOptions/MainHeight.tsx (84%) rename frontend/src/features/options/{ => components}/MainOptions/MainIterations.tsx (92%) rename frontend/src/features/options/{ => components}/MainOptions/MainOptions.scss (94%) rename frontend/src/features/options/{ => components}/MainOptions/MainOptions.tsx (100%) rename frontend/src/features/options/{ => components}/MainOptions/MainSampler.tsx (90%) rename frontend/src/features/options/{ => components}/MainOptions/MainSteps.tsx (91%) rename frontend/src/features/options/{ => components}/MainOptions/MainWidth.tsx (84%) rename frontend/src/features/options/{ => components}/OptionsAccordion.tsx (96%) rename frontend/src/features/options/{ => components}/ProcessButtons/CancelButton.tsx (95%) rename frontend/src/features/options/{ => components}/ProcessButtons/InvokeButton.tsx (96%) rename frontend/src/features/options/{ => components}/ProcessButtons/Loopback.tsx (97%) rename frontend/src/features/options/{ => components}/ProcessButtons/ProcessButtons.scss (96%) rename frontend/src/features/options/{ => components}/ProcessButtons/ProcessButtons.tsx (100%) rename frontend/src/features/options/{ => components}/PromptInput/PromptInput.scss (100%) rename frontend/src/features/options/{ => components}/PromptInput/PromptInput.tsx (92%) rename frontend/src/features/options/{ => store}/optionsSelectors.ts (92%) rename frontend/src/features/options/{ => store}/optionsSlice.ts (99%) rename frontend/src/features/system/{ => components}/Console.scss (100%) rename frontend/src/features/system/{ => components}/Console.tsx (99%) rename frontend/src/features/system/{ => components}/HotkeysModal/HotkeysModal.scss (97%) rename frontend/src/features/system/{ => components}/HotkeysModal/HotkeysModal.tsx (100%) rename frontend/src/features/system/{ => components}/HotkeysModal/HotkeysModalItem.tsx (100%) rename frontend/src/features/system/{ => components}/Modal.scss (79%) rename frontend/src/features/system/{ => components}/ProgressBar.scss (91%) rename frontend/src/features/system/{ => components}/ProgressBar.tsx (93%) rename frontend/src/features/system/{ => components}/SettingsModal/ModelList.scss (100%) rename frontend/src/features/system/{ => components}/SettingsModal/ModelList.tsx (97%) rename frontend/src/features/system/{ => components}/SettingsModal/SettingsModal.scss (94%) rename frontend/src/features/system/{ => components}/SettingsModal/SettingsModal.tsx (99%) rename frontend/src/features/system/{ => components}/SiteHeader.scss (100%) rename frontend/src/features/system/{ => components}/SiteHeader.tsx (100%) rename frontend/src/features/system/{ => components}/StatusIndicator.scss (100%) rename frontend/src/features/system/{ => components}/StatusIndicator.tsx (96%) rename frontend/src/features/system/{ => components}/ThemeChanger.tsx (78%) rename frontend/src/features/system/{ => store}/systemSelectors.ts (100%) rename frontend/src/features/system/{ => store}/systemSlice.ts (100%) delete mode 100644 frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx delete mode 100644 frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx delete mode 100644 frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx rename frontend/src/features/tabs/{ => components}/FloatingButton.scss (96%) rename frontend/src/features/tabs/{ => components}/FloatingGalleryButton.tsx (92%) rename frontend/src/features/tabs/{ => components}/FloatingOptionsPanelButtons.tsx (85%) rename frontend/src/features/tabs/{ => components}/ImageToImage/ImageToImage.scss (95%) rename frontend/src/features/tabs/{ => components}/ImageToImage/ImageToImageDisplay.tsx (91%) create mode 100644 frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx rename frontend/src/features/tabs/{ => components}/ImageToImage/InitImagePreview.tsx (95%) rename frontend/src/features/tabs/{ => components}/ImageToImage/InitialImageOverlay.tsx (100%) rename frontend/src/features/tabs/{ => components}/ImageToImage/index.tsx (81%) rename frontend/src/features/tabs/{ => components}/InvokeOptionsPanel.scss (97%) rename frontend/src/features/tabs/{ => components}/InvokeOptionsPanel.tsx (99%) rename frontend/src/features/tabs/{ => components}/InvokeTabs.scss (95%) rename frontend/src/features/tabs/{ => components}/InvokeTabs.tsx (96%) rename frontend/src/features/tabs/{ => components}/InvokeWorkarea.scss (97%) rename frontend/src/features/tabs/{ => components}/InvokeWorkarea.tsx (92%) rename frontend/src/features/tabs/{ => components}/TextToImage/TextToImage.scss (59%) rename frontend/src/features/tabs/{ => components}/TextToImage/TextToImageDisplay.tsx (73%) create mode 100644 frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx rename frontend/src/features/tabs/{ => components}/TextToImage/index.tsx (80%) rename frontend/src/features/tabs/{ => components}/UnifiedCanvas/CanvasWorkarea.scss (97%) rename frontend/src/features/tabs/{ => components}/UnifiedCanvas/UnifiedCanvasDisplay.tsx (96%) create mode 100644 frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx rename frontend/src/features/tabs/{ => components}/UnifiedCanvas/UnifiedCanvasWorkarea.tsx (90%) diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index b1340b7536..a1e8785e2e 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -1,18 +1,18 @@ -import ProgressBar from 'features/system/ProgressBar'; -import SiteHeader from 'features/system/SiteHeader'; -import Console from 'features/system/Console'; +import ProgressBar from 'features/system/components/ProgressBar'; +import SiteHeader from 'features/system/components/SiteHeader'; +import Console from 'features/system/components/Console'; import { keepGUIAlive } from './utils'; -import InvokeTabs from 'features/tabs/InvokeTabs'; +import InvokeTabs from 'features/tabs/components/InvokeTabs'; import ImageUploader from 'common/components/ImageUploader'; import { RootState, useAppSelector } from 'app/store'; -import FloatingGalleryButton from 'features/tabs/FloatingGalleryButton'; -import FloatingOptionsPanelButtons from 'features/tabs/FloatingOptionsPanelButtons'; +import FloatingGalleryButton from 'features/tabs/components/FloatingGalleryButton'; +import FloatingOptionsPanelButtons from 'features/tabs/components/FloatingOptionsPanelButtons'; import { createSelector } from '@reduxjs/toolkit'; -import { GalleryState } from 'features/gallery/gallerySlice'; -import { OptionsState } from 'features/options/optionsSlice'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { SystemState } from 'features/system/systemSlice'; +import { GalleryState } from 'features/gallery/store/gallerySlice'; +import { OptionsState } from 'features/options/store/optionsSlice'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import { SystemState } from 'features/system/store/systemSlice'; import _ from 'lodash'; import { Model } from './invokeai'; import useToastWatcher from 'features/system/hooks/useToastWatcher'; diff --git a/frontend/src/app/constants.ts b/frontend/src/app/constants.ts index 78511c10d7..0cb591a6f4 100644 --- a/frontend/src/app/constants.ts +++ b/frontend/src/app/constants.ts @@ -1,6 +1,6 @@ // TODO: use Enums? -import { InProgressImageType } from 'features/system/systemSlice'; +import { InProgressImageType } from 'features/system/store/systemSlice'; // Valid samplers export const SAMPLERS: Array = [ diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index c8028e46f4..e411e147e6 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -12,8 +12,8 @@ * 'gfpgan'. */ -import { Category as GalleryCategory } from 'features/gallery/gallerySlice'; -import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { Category as GalleryCategory } from 'features/gallery/store/gallerySlice'; +import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; import { IRect } from 'konva/lib/types'; /** diff --git a/frontend/src/app/selectors/readinessSelector.ts b/frontend/src/app/selectors/readinessSelector.ts index 44828d29e4..06a431cd93 100644 --- a/frontend/src/app/selectors/readinessSelector.ts +++ b/frontend/src/app/selectors/readinessSelector.ts @@ -1,9 +1,9 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { RootState } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { OptionsState } from 'features/options/optionsSlice'; -import { SystemState } from 'features/system/systemSlice'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import { OptionsState } from 'features/options/store/optionsSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import { validateSeedWeights } from 'common/util/seedWeightPairs'; import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors'; diff --git a/frontend/src/app/socketio/actions.ts b/frontend/src/app/socketio/actions.ts index 64cf705a77..d21081bf5a 100644 --- a/frontend/src/app/socketio/actions.ts +++ b/frontend/src/app/socketio/actions.ts @@ -1,6 +1,6 @@ import { createAction } from '@reduxjs/toolkit'; -import { GalleryCategory } from 'features/gallery/gallerySlice'; -import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { GalleryCategory } from 'features/gallery/store/gallerySlice'; +import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; import * as InvokeAI from 'app/invokeai'; diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index de097dc2ce..4a7cdfaeb7 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -9,16 +9,16 @@ import { GalleryCategory, GalleryState, removeImage, -} from 'features/gallery/gallerySlice'; -import { OptionsState } from 'features/options/optionsSlice'; +} from 'features/gallery/store/gallerySlice'; +import { OptionsState } from 'features/options/store/optionsSlice'; import { addLogEntry, generationRequested, modelChangeRequested, setCurrentStatus, setIsProcessing, -} from 'features/system/systemSlice'; -import { InvokeTabName } from 'features/tabs/InvokeTabs'; +} from 'features/system/store/systemSlice'; +import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; import * as InvokeAI from 'app/invokeai'; import { RootState } from 'app/store'; diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index d10071db95..ec7dec1935 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -15,7 +15,7 @@ import { errorOccurred, setModelList, setIsCancelable, -} from 'features/system/systemSlice'; +} from 'features/system/store/systemSlice'; import { addGalleryImages, @@ -24,20 +24,20 @@ import { GalleryState, removeImage, setIntermediateImage, -} from 'features/gallery/gallerySlice'; +} from 'features/gallery/store/gallerySlice'; import { clearInitialImage, setInitialImage, setMaskPath, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import { requestImages, requestNewImages, requestSystemConfig, } from './actions'; import { addImageToStagingArea } from 'features/canvas/store/canvasSlice'; -import { tabMap } from 'features/tabs/InvokeTabs'; +import { tabMap } from 'features/tabs/components/InvokeTabs'; /** * Returns an object containing listener callbacks for socketio events. diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 6315d36ba8..5e8a4bc873 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -7,9 +7,9 @@ import storage from 'redux-persist/lib/storage'; // defaults to localStorage for import { getPersistConfig } from 'redux-deep-persist'; -import optionsReducer from 'features/options/optionsSlice'; -import galleryReducer from 'features/gallery/gallerySlice'; -import systemReducer from 'features/system/systemSlice'; +import optionsReducer from 'features/options/store/optionsSlice'; +import galleryReducer from 'features/gallery/store/gallerySlice'; +import systemReducer from 'features/system/store/systemSlice'; import canvasReducer from 'features/canvas/store/canvasSlice'; import { socketioMiddleware } from './socketio/middleware'; diff --git a/frontend/src/common/components/GuidePopover.tsx b/frontend/src/common/components/GuidePopover.tsx index 2fd6d082d0..f8ad81eaaa 100644 --- a/frontend/src/common/components/GuidePopover.tsx +++ b/frontend/src/common/components/GuidePopover.tsx @@ -5,7 +5,7 @@ import { PopoverTrigger, Box, } from '@chakra-ui/react'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import { useAppSelector } from 'app/store'; import { RootState } from 'app/store'; import { createSelector } from '@reduxjs/toolkit'; diff --git a/frontend/src/common/components/ImageUploader.tsx b/frontend/src/common/components/ImageUploader.tsx index a7afda2b96..0cb6660a6b 100644 --- a/frontend/src/common/components/ImageUploader.tsx +++ b/frontend/src/common/components/ImageUploader.tsx @@ -11,10 +11,10 @@ import { useToast } from '@chakra-ui/react'; // import { uploadImage } from 'app/socketio/actions'; import { UploadImagePayload } from 'app/invokeai'; import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { tabDict } from 'features/tabs/InvokeTabs'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import { tabDict } from 'features/tabs/components/InvokeTabs'; import ImageUploadOverlay from './ImageUploadOverlay'; -import { uploadImage } from 'features/gallery/util/uploadImage'; +import { uploadImage } from 'features/gallery/store/thunks/uploadImage'; type ImageUploaderProps = { children: ReactNode; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 8d34337fbc..b32764665d 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -1,10 +1,10 @@ import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; -import { OptionsState } from 'features/options/optionsSlice'; -import { SystemState } from 'features/system/systemSlice'; +import { OptionsState } from 'features/options/store/optionsSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import { stringToSeedWeightsArray } from './seedWeightPairs'; import randomInt from './randomInt'; -import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; import { CanvasState, isCanvasMaskLine, diff --git a/frontend/src/features/canvas/components/IAICanvasIntermediateImage.tsx b/frontend/src/features/canvas/components/IAICanvasIntermediateImage.tsx index 60df35c105..e6e61f4ccd 100644 --- a/frontend/src/features/canvas/components/IAICanvasIntermediateImage.tsx +++ b/frontend/src/features/canvas/components/IAICanvasIntermediateImage.tsx @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { RootState, useAppSelector } from 'app/store'; -import { GalleryState } from 'features/gallery/gallerySlice'; +import { GalleryState } from 'features/gallery/store/gallerySlice'; import { ImageConfig } from 'konva/lib/shapes/Image'; import _ from 'lodash'; import { useEffect, useState } from 'react'; diff --git a/frontend/src/features/canvas/components/IAICanvasResizer.tsx b/frontend/src/features/canvas/components/IAICanvasResizer.tsx index a44c9ca414..44b26110ff 100644 --- a/frontend/src/features/canvas/components/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasResizer.tsx @@ -1,7 +1,7 @@ import { Spinner } from '@chakra-ui/react'; import { useLayoutEffect, useRef } from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { resizeAndScaleCanvas, resizeCanvas, diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx index bc68e4c59d..7d87ce01f4 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasRedoButton.tsx @@ -3,7 +3,7 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { FaRedo } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import _ from 'lodash'; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index a702f3abd1..9e0ac65504 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -32,7 +32,7 @@ import { } from 'features/canvas/store/canvasSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; -import { systemSelector } from 'features/system/systemSelectors'; +import { systemSelector } from 'features/system/store/systemSelectors'; export const selector = createSelector( [canvasSelector, isStagingSelector, systemSelector], diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx index d9e8668f39..303f292ca9 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx @@ -6,7 +6,7 @@ import IAIIconButton from 'common/components/IAIIconButton'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import _ from 'lodash'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { undo } from 'features/canvas/store/canvasSlice'; const canvasUndoSelector = createSelector( diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index 7bed805e63..cd7b103653 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { setShouldShowBoundingBox, setTool, diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index feae250918..8edfecda3e 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts index 37a21a6eda..038249646a 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseEnter.ts @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import Konva from 'konva'; import { KonvaEventObject } from 'konva/lib/Node'; import _ from 'lodash'; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts index e6288952cf..02749cf7d3 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import Konva from 'konva'; import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts index 0b77ebaa93..7b1826b9c0 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseUp.ts @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import Konva from 'konva'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; diff --git a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts index a483a24cb6..f12a8b2548 100644 --- a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts @@ -6,8 +6,8 @@ import layerToDataURL from '../../util/layerToDataURL'; import downloadFile from '../../util/downloadFile'; import copyImage from '../../util/copyImage'; import { getCanvasBaseLayer } from '../../util/konvaInstanceProvider'; -import { addToast } from 'features/system/systemSlice'; -import { addImage } from 'features/gallery/gallerySlice'; +import { addToast } from 'features/system/store/systemSlice'; +import { addImage } from 'features/gallery/store/gallerySlice'; import { setMergedCanvas } from '../canvasSlice'; type MergeAndUploadCanvasConfig = { diff --git a/frontend/src/features/gallery/CurrentImageButtons.scss b/frontend/src/features/gallery/components/CurrentImageButtons.scss similarity index 100% rename from frontend/src/features/gallery/CurrentImageButtons.scss rename to frontend/src/features/gallery/components/CurrentImageButtons.scss diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/components/CurrentImageButtons.tsx similarity index 96% rename from frontend/src/features/gallery/CurrentImageButtons.tsx rename to frontend/src/features/gallery/components/CurrentImageButtons.tsx index 6b3f1ef375..80d768d0c0 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/components/CurrentImageButtons.tsx @@ -12,14 +12,14 @@ import { setPrompt, setSeed, setShouldShowImageDetails, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import DeleteImageModal from './DeleteImageModal'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import IAIButton from 'common/components/IAIButton'; import { runESRGAN, runFacetool } from 'app/socketio/actions'; import IAIIconButton from 'common/components/IAIIconButton'; -import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; -import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; +import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import { useHotkeys } from 'react-hotkeys-hook'; import { ButtonGroup, Link, useToast } from '@chakra-ui/react'; import { @@ -39,8 +39,8 @@ import { setDoesCanvasNeedScaling, setInitialCanvasImage, } from 'features/canvas/store/canvasSlice'; -import { GalleryState } from './gallerySlice'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { GalleryState } from 'features/gallery/store/gallerySlice'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import IAIPopover from 'common/components/IAIPopover'; const systemSelector = createSelector( diff --git a/frontend/src/features/gallery/CurrentImageDisplay.scss b/frontend/src/features/gallery/components/CurrentImageDisplay.scss similarity index 97% rename from frontend/src/features/gallery/CurrentImageDisplay.scss rename to frontend/src/features/gallery/components/CurrentImageDisplay.scss index 60c01566e3..69f60d83a4 100644 --- a/frontend/src/features/gallery/CurrentImageDisplay.scss +++ b/frontend/src/features/gallery/components/CurrentImageDisplay.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .current-image-area { display: flex; diff --git a/frontend/src/features/gallery/CurrentImageDisplay.tsx b/frontend/src/features/gallery/components/CurrentImageDisplay.tsx similarity index 87% rename from frontend/src/features/gallery/CurrentImageDisplay.tsx rename to frontend/src/features/gallery/components/CurrentImageDisplay.tsx index 3161ce4fbe..a5c7816364 100644 --- a/frontend/src/features/gallery/CurrentImageDisplay.tsx +++ b/frontend/src/features/gallery/components/CurrentImageDisplay.tsx @@ -2,11 +2,11 @@ import { RootState, useAppSelector } from 'app/store'; import CurrentImageButtons from './CurrentImageButtons'; import { MdPhoto } from 'react-icons/md'; import CurrentImagePreview from './CurrentImagePreview'; -import { GalleryState } from './gallerySlice'; -import { OptionsState } from 'features/options/optionsSlice'; +import { GalleryState } from 'features/gallery/store/gallerySlice'; +import { OptionsState } from 'features/options/store/optionsSlice'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; export const currentImageDisplaySelector = createSelector( [ diff --git a/frontend/src/features/gallery/CurrentImagePreview.tsx b/frontend/src/features/gallery/components/CurrentImagePreview.tsx similarity index 98% rename from frontend/src/features/gallery/CurrentImagePreview.tsx rename to frontend/src/features/gallery/components/CurrentImagePreview.tsx index cb39109ec1..d12c172d13 100644 --- a/frontend/src/features/gallery/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/components/CurrentImagePreview.tsx @@ -7,10 +7,10 @@ import { GalleryState, selectNextImage, selectPrevImage, -} from './gallerySlice'; +} from 'features/gallery/store/gallerySlice'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; -import { OptionsState, setIsLightBoxOpen } from 'features/options/optionsSlice'; +import { OptionsState, setIsLightBoxOpen } from 'features/options/store/optionsSlice'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; export const imagesSelector = createSelector( diff --git a/frontend/src/features/gallery/DeleteImageModal.tsx b/frontend/src/features/gallery/components/DeleteImageModal.tsx similarity index 99% rename from frontend/src/features/gallery/DeleteImageModal.tsx rename to frontend/src/features/gallery/components/DeleteImageModal.tsx index 9836930203..78af21791a 100644 --- a/frontend/src/features/gallery/DeleteImageModal.tsx +++ b/frontend/src/features/gallery/components/DeleteImageModal.tsx @@ -25,7 +25,7 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import { deleteImage } from 'app/socketio/actions'; import { RootState } from 'app/store'; -import { setShouldConfirmOnDelete, SystemState } from 'features/system/systemSlice'; +import { setShouldConfirmOnDelete, SystemState } from 'features/system/store/systemSlice'; import * as InvokeAI from 'app/invokeai'; import { useHotkeys } from 'react-hotkeys-hook'; import _ from 'lodash'; diff --git a/frontend/src/features/gallery/HoverableImage.scss b/frontend/src/features/gallery/components/HoverableImage.scss similarity index 100% rename from frontend/src/features/gallery/HoverableImage.scss rename to frontend/src/features/gallery/components/HoverableImage.scss diff --git a/frontend/src/features/gallery/HoverableImage.tsx b/frontend/src/features/gallery/components/HoverableImage.tsx similarity index 97% rename from frontend/src/features/gallery/HoverableImage.tsx rename to frontend/src/features/gallery/components/HoverableImage.tsx index de09fd8f58..63f5c0b2d7 100644 --- a/frontend/src/features/gallery/HoverableImage.tsx +++ b/frontend/src/features/gallery/components/HoverableImage.tsx @@ -7,7 +7,7 @@ import { useToast, } from '@chakra-ui/react'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { setCurrentImage } from './gallerySlice'; +import { setCurrentImage } from 'features/gallery/store/gallerySlice'; import { FaCheck, FaTrashAlt } from 'react-icons/fa'; import DeleteImageModal from './DeleteImageModal'; import { memo, useState } from 'react'; @@ -19,7 +19,7 @@ import { setIsLightBoxOpen, setPrompt, setSeed, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import * as InvokeAI from 'app/invokeai'; import * as ContextMenu from '@radix-ui/react-context-menu'; import { @@ -28,7 +28,7 @@ import { setDoesCanvasNeedScaling, setInitialCanvasImage, } from 'features/canvas/store/canvasSlice'; -import { hoverableImageSelector } from './gallerySliceSelectors'; +import { hoverableImageSelector } from 'features/gallery/store/gallerySliceSelectors'; import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; interface HoverableImageProps { diff --git a/frontend/src/features/gallery/ImageGallery.scss b/frontend/src/features/gallery/components/ImageGallery.scss similarity index 99% rename from frontend/src/features/gallery/ImageGallery.scss rename to frontend/src/features/gallery/components/ImageGallery.scss index 4321970562..e3dc5bc2f0 100644 --- a/frontend/src/features/gallery/ImageGallery.scss +++ b/frontend/src/features/gallery/components/ImageGallery.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .image-gallery-wrapper-enter { transform: translateX(150%); diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx similarity index 98% rename from frontend/src/features/gallery/ImageGallery.tsx rename to frontend/src/features/gallery/components/ImageGallery.tsx index 99ba673af5..c7ef874aed 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -25,13 +25,13 @@ import { setShouldAutoSwitchToNewImages, setShouldHoldGalleryOpen, setShouldPinGallery, -} from './gallerySlice'; +} from 'features/gallery/store/gallerySlice'; import HoverableImage from './HoverableImage'; -import { setShouldShowGallery } from 'features/gallery/gallerySlice'; +import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; import { ButtonGroup, useToast } from '@chakra-ui/react'; import { CSSTransition } from 'react-transition-group'; import { Direction } from 're-resizable/lib/resizer'; -import { imageGallerySelector } from './gallerySliceSelectors'; +import { imageGallerySelector } from 'features/gallery/store/gallerySliceSelectors'; import { FaImage, FaUser, FaWrench } from 'react-icons/fa'; import IAIPopover from 'common/components/IAIPopover'; import IAISlider from 'common/components/IAISlider'; diff --git a/frontend/src/features/gallery/ImageMetaDataViewer/ImageMetadataViewer.scss b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss similarity index 91% rename from frontend/src/features/gallery/ImageMetaDataViewer/ImageMetadataViewer.scss rename to frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss index ba5e660682..8b59a33579 100644 --- a/frontend/src/features/gallery/ImageMetaDataViewer/ImageMetadataViewer.scss +++ b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .image-metadata-viewer { position: absolute; diff --git a/frontend/src/features/gallery/ImageMetaDataViewer/ImageMetadataViewer.tsx b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx similarity index 99% rename from frontend/src/features/gallery/ImageMetaDataViewer/ImageMetadataViewer.tsx rename to frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx index e980d61a2c..c7b1d5c323 100644 --- a/frontend/src/features/gallery/ImageMetaDataViewer/ImageMetadataViewer.tsx +++ b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx @@ -33,7 +33,7 @@ import { setWidth, setInitialImage, setShouldShowImageDetails, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import promptToString from 'common/util/promptToString'; import { seedWeightsToString } from 'common/util/seedWeightPairs'; import { FaCopy } from 'react-icons/fa'; diff --git a/frontend/src/features/gallery/gallerySlice.ts b/frontend/src/features/gallery/store/gallerySlice.ts similarity index 99% rename from frontend/src/features/gallery/gallerySlice.ts rename to frontend/src/features/gallery/store/gallerySlice.ts index d5c5f65528..4501a8c543 100644 --- a/frontend/src/features/gallery/gallerySlice.ts +++ b/frontend/src/features/gallery/store/gallerySlice.ts @@ -3,7 +3,7 @@ import type { PayloadAction } from '@reduxjs/toolkit'; import _, { clamp } from 'lodash'; import * as InvokeAI from 'app/invokeai'; import { IRect } from 'konva/lib/types'; -import { InvokeTabName } from 'features/tabs/InvokeTabs'; +import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; export type GalleryCategory = 'user' | 'result'; diff --git a/frontend/src/features/gallery/gallerySliceSelectors.ts b/frontend/src/features/gallery/store/gallerySliceSelectors.ts similarity index 90% rename from frontend/src/features/gallery/gallerySliceSelectors.ts rename to frontend/src/features/gallery/store/gallerySliceSelectors.ts index 78bc6fcf58..e9a909d8c0 100644 --- a/frontend/src/features/gallery/gallerySliceSelectors.ts +++ b/frontend/src/features/gallery/store/gallerySliceSelectors.ts @@ -1,8 +1,8 @@ import { createSelector } from '@reduxjs/toolkit'; import { RootState } from 'app/store'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { OptionsState } from 'features/options/optionsSlice'; -import { SystemState } from 'features/system/systemSlice'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import { OptionsState } from 'features/options/store/optionsSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import { GalleryState } from './gallerySlice'; import _ from 'lodash'; diff --git a/frontend/src/features/gallery/util/uploadImage.ts b/frontend/src/features/gallery/store/thunks/uploadImage.ts similarity index 90% rename from frontend/src/features/gallery/util/uploadImage.ts rename to frontend/src/features/gallery/store/thunks/uploadImage.ts index 3e9f3463a8..4759bb6d09 100644 --- a/frontend/src/features/gallery/util/uploadImage.ts +++ b/frontend/src/features/gallery/store/thunks/uploadImage.ts @@ -2,9 +2,9 @@ import { AnyAction, ThunkAction } from '@reduxjs/toolkit'; import { RootState } from 'app/store'; import * as InvokeAI from 'app/invokeai'; import { v4 as uuidv4 } from 'uuid'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice'; -import { setInitialImage } from 'features/options/optionsSlice'; +import { setInitialImage } from 'features/options/store/optionsSlice'; import { addImage } from '../gallerySlice'; type UploadImageConfig = { diff --git a/frontend/src/features/lightbox/Lightbox.scss b/frontend/src/features/lightbox/components/Lightbox.scss similarity index 97% rename from frontend/src/features/lightbox/Lightbox.scss rename to frontend/src/features/lightbox/components/Lightbox.scss index e8e5ff6ee5..f746828729 100644 --- a/frontend/src/features/lightbox/Lightbox.scss +++ b/frontend/src/features/lightbox/components/Lightbox.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .lightbox-container { width: 100%; diff --git a/frontend/src/features/lightbox/Lightbox.tsx b/frontend/src/features/lightbox/components/Lightbox.tsx similarity index 88% rename from frontend/src/features/lightbox/Lightbox.tsx rename to frontend/src/features/lightbox/components/Lightbox.tsx index be44c3a1fa..afcdb06db7 100644 --- a/frontend/src/features/lightbox/Lightbox.tsx +++ b/frontend/src/features/lightbox/components/Lightbox.tsx @@ -1,15 +1,15 @@ import { IconButton } from '@chakra-ui/react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import CurrentImageButtons from 'features/gallery/CurrentImageButtons'; -import { imagesSelector } from 'features/gallery/CurrentImagePreview'; +import CurrentImageButtons from 'features/gallery/components/CurrentImageButtons'; +import { imagesSelector } from 'features/gallery/components/CurrentImagePreview'; import { selectNextImage, selectPrevImage, -} from 'features/gallery/gallerySlice'; -import ImageGallery from 'features/gallery/ImageGallery'; -import ImageMetadataViewer from 'features/gallery/ImageMetaDataViewer/ImageMetadataViewer'; -import { setIsLightBoxOpen } from 'features/options/optionsSlice'; +} from 'features/gallery/store/gallerySlice'; +import ImageGallery from 'features/gallery/components/ImageGallery'; +import ImageMetadataViewer from 'features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer'; +import { setIsLightBoxOpen } from 'features/options/store/optionsSlice'; import React, { useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { BiExit } from 'react-icons/bi'; diff --git a/frontend/src/features/lightbox/ReactPanZoom.tsx b/frontend/src/features/lightbox/components/ReactPanZoom.tsx similarity index 100% rename from frontend/src/features/lightbox/ReactPanZoom.tsx rename to frontend/src/features/lightbox/components/ReactPanZoom.tsx diff --git a/frontend/src/features/options/AccordionItems/AdvancedSettings.scss b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss similarity index 95% rename from frontend/src/features/options/AccordionItems/AdvancedSettings.scss rename to frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss index 9d0dcd9cca..2f6e43319d 100644 --- a/frontend/src/features/options/AccordionItems/AdvancedSettings.scss +++ b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .advanced-settings { display: grid; diff --git a/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx b/frontend/src/features/options/components/AccordionItems/InvokeAccordionItem.tsx similarity index 100% rename from frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx rename to frontend/src/features/options/components/AccordionItems/InvokeAccordionItem.tsx diff --git a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx similarity index 92% rename from frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx index 937a33cdab..3949ecb8e7 100644 --- a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx @@ -6,7 +6,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setShouldRunFacetool } from 'features/options/optionsSlice'; +import { setShouldRunFacetool } from 'features/options/store/optionsSlice'; export default function FaceRestoreHeader() { const isGFPGANAvailable = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx similarity index 95% rename from frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx index d0043f2f70..d3f04f3142 100644 --- a/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx @@ -9,11 +9,11 @@ import { setCodeformerFidelity, setFacetoolStrength, setFacetoolType, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import IAINumberInput from 'common/components/IAINumberInput'; import IAISelect from 'common/components/IAISelect'; import { FACETOOL_TYPES } from 'app/constants'; diff --git a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx b/frontend/src/features/options/components/AdvancedOptions/ImageToImage/ImageFit.tsx similarity index 88% rename from frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx rename to frontend/src/features/options/components/AdvancedOptions/ImageToImage/ImageFit.tsx index 738c3d2d96..25b5618251 100644 --- a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/ImageToImage/ImageFit.tsx @@ -5,7 +5,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setShouldFitToWidthHeight } from 'features/options/optionsSlice'; +import { setShouldFitToWidthHeight } from 'features/options/store/optionsSlice'; export default function ImageFit() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx b/frontend/src/features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx similarity index 94% rename from frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx rename to frontend/src/features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx index 624d958fb2..d21976c9ac 100644 --- a/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAISlider from 'common/components/IAISlider'; -import { setImg2imgStrength } from 'features/options/optionsSlice'; +import { setImg2imgStrength } from 'features/options/store/optionsSlice'; interface ImageToImageStrengthProps { label?: string; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/ClearBrushHistory.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/ClearBrushHistory.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/ClearBrushHistory.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintReplace.tsx similarity index 88% rename from frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintReplace.tsx index d0c99f70f5..8ce85a8238 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintReplace.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintReplace.tsx @@ -1,9 +1,9 @@ import React, { ChangeEvent } from 'react'; -import { useAppDispatch, useAppSelector } from '../../../../app/store'; +import { useAppDispatch, useAppSelector } from '../../../../../app/store'; import _ from 'lodash'; import { createSelector } from '@reduxjs/toolkit'; -import IAISwitch from '../../../../common/components/IAISwitch'; -import IAISlider from '../../../../common/components/IAISlider'; +import IAISwitch from '../../../../../common/components/IAISwitch'; +import IAISlider from '../../../../../common/components/IAISlider'; import { Flex } from '@chakra-ui/react'; import { setInpaintReplace, diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/InpaintingSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Inpainting/InpaintingSettings.tsx rename to frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Output/HiresOptions.tsx similarity index 91% rename from frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Output/HiresOptions.tsx index 4b65907b4d..d7b76c50dc 100644 --- a/frontend/src/features/options/AdvancedOptions/Output/HiresOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Output/HiresOptions.tsx @@ -6,7 +6,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setHiresFix } from 'features/options/optionsSlice'; +import { setHiresFix } from 'features/options/store/optionsSlice'; /** * Hires Fix Toggle diff --git a/frontend/src/features/options/AdvancedOptions/Output/OutputHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Output/OutputHeader.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Output/OutputHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/Output/OutputHeader.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Output/OutputOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Output/OutputOptions.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Output/OutputOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Output/OutputOptions.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Output/SeamlessOptions.tsx similarity index 91% rename from frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Output/SeamlessOptions.tsx index 7b477844e7..22aab225bf 100644 --- a/frontend/src/features/options/AdvancedOptions/Output/SeamlessOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Output/SeamlessOptions.tsx @@ -6,7 +6,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setSeamless } from 'features/options/optionsSlice'; +import { setSeamless } from 'features/options/store/optionsSlice'; /** * Seamless tiling toggle diff --git a/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/Perlin.tsx similarity index 90% rename from frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/Perlin.tsx index c0049335d3..45b6b605ce 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Seed/Perlin.tsx @@ -5,7 +5,7 @@ import { useAppSelector, } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { setPerlin } from 'features/options/optionsSlice'; +import { setPerlin } from 'features/options/store/optionsSlice'; export default function Perlin() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/RandomizeSeed.tsx similarity index 89% rename from frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/RandomizeSeed.tsx index d812d165d3..d334c624c2 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Seed/RandomizeSeed.tsx @@ -6,7 +6,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setShouldRandomizeSeed } from 'features/options/optionsSlice'; +import { setShouldRandomizeSeed } from 'features/options/store/optionsSlice'; export default function RandomizeSeed() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/Seed.tsx similarity index 94% rename from frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/Seed.tsx index 46599c7188..7f50e6c7b8 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Seed/Seed.tsx @@ -6,7 +6,7 @@ import { useAppSelector, } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { setSeed } from 'features/options/optionsSlice'; +import { setSeed } from 'features/options/store/optionsSlice'; export default function Seed() { const seed = useAppSelector((state: RootState) => state.options.seed); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/SeedHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/SeedHeader.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Seed/SeedHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/SeedHeader.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Seed/SeedOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/SeedOptions.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Seed/SeedOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/SeedOptions.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/ShuffleSeed.tsx similarity index 91% rename from frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/ShuffleSeed.tsx index a95562bc5c..59134398dc 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Seed/ShuffleSeed.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import randomInt from 'common/util/randomInt'; -import { setSeed } from 'features/options/optionsSlice'; +import { setSeed } from 'features/options/store/optionsSlice'; export default function ShuffleSeed() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx similarity index 90% rename from frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx rename to frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx index a80b5497da..d10d3ac131 100644 --- a/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx @@ -5,7 +5,7 @@ import { useAppSelector, } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { setThreshold } from 'features/options/optionsSlice'; +import { setThreshold } from 'features/options/store/optionsSlice'; export default function Threshold() { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleHeader.tsx similarity index 92% rename from frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleHeader.tsx index 10d37800b4..4e9e4d3629 100644 --- a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleHeader.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleHeader.tsx @@ -6,7 +6,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setShouldRunESRGAN } from 'features/options/optionsSlice'; +import { setShouldRunESRGAN } from 'features/options/store/optionsSlice'; export default function UpscaleHeader() { const isESRGANAvailable = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.scss b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleOptions.scss similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.scss rename to frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleOptions.scss diff --git a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleOptions.tsx similarity index 94% rename from frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleOptions.tsx index e95c367e95..8588a0ed39 100644 --- a/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleOptions.tsx @@ -6,12 +6,12 @@ import { setUpscalingStrength, UpscalingLevel, OptionsState, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import { UPSCALING_LEVELS } from 'app/constants'; import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import { ChangeEvent } from 'react'; import IAINumberInput from 'common/components/IAINumberInput'; import IAISelect from 'common/components/IAISelect'; diff --git a/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx similarity index 89% rename from frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx rename to frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx index 8d9d0fb522..dd8d95404a 100644 --- a/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx @@ -5,7 +5,7 @@ import { useAppSelector, } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; -import { setShouldGenerateVariations } from 'features/options/optionsSlice'; +import { setShouldGenerateVariations } from 'features/options/store/optionsSlice'; export default function GenerateVariations() { const shouldGenerateVariations = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/SeedWeights.tsx similarity index 93% rename from frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx rename to frontend/src/features/options/components/AdvancedOptions/Variations/SeedWeights.tsx index 627b5458ee..9db25d2d80 100644 --- a/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Variations/SeedWeights.tsx @@ -6,7 +6,7 @@ import { } from 'app/store'; import IAIInput from 'common/components/IAIInput'; import { validateSeedWeights } from 'common/util/seedWeightPairs'; -import { setSeedWeights } from 'features/options/optionsSlice'; +import { setSeedWeights } from 'features/options/store/optionsSlice'; export default function SeedWeights() { const seedWeights = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/VariationAmount.tsx similarity index 91% rename from frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx rename to frontend/src/features/options/components/AdvancedOptions/Variations/VariationAmount.tsx index 9114aaeb64..78500e8f95 100644 --- a/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Variations/VariationAmount.tsx @@ -5,7 +5,7 @@ import { useAppSelector, } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { setVariationAmount } from 'features/options/optionsSlice'; +import { setVariationAmount } from 'features/options/store/optionsSlice'; export default function VariationAmount() { const variationAmount = useAppSelector( diff --git a/frontend/src/features/options/AdvancedOptions/Variations/VariationsHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/VariationsHeader.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Variations/VariationsHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/Variations/VariationsHeader.tsx diff --git a/frontend/src/features/options/AdvancedOptions/Variations/VariationsOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/VariationsOptions.tsx similarity index 100% rename from frontend/src/features/options/AdvancedOptions/Variations/VariationsOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Variations/VariationsOptions.tsx diff --git a/frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx b/frontend/src/features/options/components/MainOptions/MainAdvancedOptionsCheckbox.tsx similarity index 90% rename from frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx rename to frontend/src/features/options/components/MainOptions/MainAdvancedOptionsCheckbox.tsx index aa88af0382..8e1cc0f2e7 100644 --- a/frontend/src/features/options/MainOptions/MainAdvancedOptionsCheckbox.tsx +++ b/frontend/src/features/options/components/MainOptions/MainAdvancedOptionsCheckbox.tsx @@ -1,7 +1,7 @@ import React, { ChangeEvent } from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAICheckbox from 'common/components/IAICheckbox'; -import { setShowAdvancedOptions } from 'features/options/optionsSlice'; +import { setShowAdvancedOptions } from 'features/options/store/optionsSlice'; export default function MainAdvancedOptionsCheckbox() { const showAdvancedOptions = useAppSelector( diff --git a/frontend/src/features/options/MainOptions/MainCFGScale.tsx b/frontend/src/features/options/components/MainOptions/MainCFGScale.tsx similarity index 91% rename from frontend/src/features/options/MainOptions/MainCFGScale.tsx rename to frontend/src/features/options/components/MainOptions/MainCFGScale.tsx index 0a66842d7b..7d8cc7db9e 100644 --- a/frontend/src/features/options/MainOptions/MainCFGScale.tsx +++ b/frontend/src/features/options/components/MainOptions/MainCFGScale.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { setCfgScale } from 'features/options/optionsSlice'; +import { setCfgScale } from 'features/options/store/optionsSlice'; import { inputWidth } from './MainOptions'; export default function MainCFGScale() { diff --git a/frontend/src/features/options/MainOptions/MainHeight.tsx b/frontend/src/features/options/components/MainOptions/MainHeight.tsx similarity index 84% rename from frontend/src/features/options/MainOptions/MainHeight.tsx rename to frontend/src/features/options/components/MainOptions/MainHeight.tsx index c5dc0d28ac..3e1ccbffb4 100644 --- a/frontend/src/features/options/MainOptions/MainHeight.tsx +++ b/frontend/src/features/options/components/MainOptions/MainHeight.tsx @@ -2,8 +2,8 @@ import React, { ChangeEvent } from 'react'; import { HEIGHTS } from 'app/constants'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAISelect from 'common/components/IAISelect'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { setHeight } from 'features/options/optionsSlice'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import { setHeight } from 'features/options/store/optionsSlice'; export default function MainHeight() { const height = useAppSelector((state: RootState) => state.options.height); diff --git a/frontend/src/features/options/MainOptions/MainIterations.tsx b/frontend/src/features/options/components/MainOptions/MainIterations.tsx similarity index 92% rename from frontend/src/features/options/MainOptions/MainIterations.tsx rename to frontend/src/features/options/components/MainOptions/MainIterations.tsx index 10986f994e..b87e66b635 100644 --- a/frontend/src/features/options/MainOptions/MainIterations.tsx +++ b/frontend/src/features/options/components/MainOptions/MainIterations.tsx @@ -3,8 +3,8 @@ import _ from 'lodash'; import React from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { mayGenerateMultipleImagesSelector } from 'features/options/optionsSelectors'; -import { OptionsState, setIterations } from 'features/options/optionsSlice'; +import { mayGenerateMultipleImagesSelector } from 'features/options/store/optionsSelectors'; +import { OptionsState, setIterations } from 'features/options/store/optionsSlice'; import { inputWidth } from './MainOptions'; const mainIterationsSelector = createSelector( diff --git a/frontend/src/features/options/MainOptions/MainOptions.scss b/frontend/src/features/options/components/MainOptions/MainOptions.scss similarity index 94% rename from frontend/src/features/options/MainOptions/MainOptions.scss rename to frontend/src/features/options/components/MainOptions/MainOptions.scss index 40423a112c..488d400918 100644 --- a/frontend/src/features/options/MainOptions/MainOptions.scss +++ b/frontend/src/features/options/components/MainOptions/MainOptions.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .main-options { display: grid; diff --git a/frontend/src/features/options/MainOptions/MainOptions.tsx b/frontend/src/features/options/components/MainOptions/MainOptions.tsx similarity index 100% rename from frontend/src/features/options/MainOptions/MainOptions.tsx rename to frontend/src/features/options/components/MainOptions/MainOptions.tsx diff --git a/frontend/src/features/options/MainOptions/MainSampler.tsx b/frontend/src/features/options/components/MainOptions/MainSampler.tsx similarity index 90% rename from frontend/src/features/options/MainOptions/MainSampler.tsx rename to frontend/src/features/options/components/MainOptions/MainSampler.tsx index 992207aa6e..8f45eae430 100644 --- a/frontend/src/features/options/MainOptions/MainSampler.tsx +++ b/frontend/src/features/options/components/MainOptions/MainSampler.tsx @@ -2,7 +2,7 @@ import React, { ChangeEvent } from 'react'; import { SAMPLERS } from 'app/constants'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAISelect from 'common/components/IAISelect'; -import { setSampler } from 'features/options/optionsSlice'; +import { setSampler } from 'features/options/store/optionsSlice'; export default function MainSampler() { const sampler = useAppSelector((state: RootState) => state.options.sampler); diff --git a/frontend/src/features/options/MainOptions/MainSteps.tsx b/frontend/src/features/options/components/MainOptions/MainSteps.tsx similarity index 91% rename from frontend/src/features/options/MainOptions/MainSteps.tsx rename to frontend/src/features/options/components/MainOptions/MainSteps.tsx index 16be24a087..ba9d99df4a 100644 --- a/frontend/src/features/options/MainOptions/MainSteps.tsx +++ b/frontend/src/features/options/components/MainOptions/MainSteps.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { setSteps } from 'features/options/optionsSlice'; +import { setSteps } from 'features/options/store/optionsSlice'; import { inputWidth } from './MainOptions'; export default function MainSteps() { diff --git a/frontend/src/features/options/MainOptions/MainWidth.tsx b/frontend/src/features/options/components/MainOptions/MainWidth.tsx similarity index 84% rename from frontend/src/features/options/MainOptions/MainWidth.tsx rename to frontend/src/features/options/components/MainOptions/MainWidth.tsx index de719a6a75..eeab19a1b0 100644 --- a/frontend/src/features/options/MainOptions/MainWidth.tsx +++ b/frontend/src/features/options/components/MainOptions/MainWidth.tsx @@ -2,8 +2,8 @@ import React, { ChangeEvent } from 'react'; import { WIDTHS } from 'app/constants'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAISelect from 'common/components/IAISelect'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; -import { setWidth } from 'features/options/optionsSlice'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import { setWidth } from 'features/options/store/optionsSlice'; export default function MainWidth() { const width = useAppSelector((state: RootState) => state.options.width); diff --git a/frontend/src/features/options/OptionsAccordion.tsx b/frontend/src/features/options/components/OptionsAccordion.tsx similarity index 96% rename from frontend/src/features/options/OptionsAccordion.tsx rename to frontend/src/features/options/components/OptionsAccordion.tsx index c3c1d68162..98eb96a999 100644 --- a/frontend/src/features/options/OptionsAccordion.tsx +++ b/frontend/src/features/options/components/OptionsAccordion.tsx @@ -1,6 +1,6 @@ import { Accordion, ExpandedIndex } from '@chakra-ui/react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import { setOpenAccordions } from 'features/system/systemSlice'; +import { setOpenAccordions } from 'features/system/store/systemSlice'; import InvokeAccordionItem, { InvokeAccordionItemProps, } from './AccordionItems/InvokeAccordionItem'; diff --git a/frontend/src/features/options/ProcessButtons/CancelButton.tsx b/frontend/src/features/options/components/ProcessButtons/CancelButton.tsx similarity index 95% rename from frontend/src/features/options/ProcessButtons/CancelButton.tsx rename to frontend/src/features/options/components/ProcessButtons/CancelButton.tsx index bd77ccd973..e7516454a5 100644 --- a/frontend/src/features/options/ProcessButtons/CancelButton.tsx +++ b/frontend/src/features/options/components/ProcessButtons/CancelButton.tsx @@ -6,7 +6,7 @@ import IAIIconButton, { } from 'common/components/IAIIconButton'; import { useHotkeys } from 'react-hotkeys-hook'; import { createSelector } from '@reduxjs/toolkit'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; import _ from 'lodash'; const cancelButtonSelector = createSelector( diff --git a/frontend/src/features/options/ProcessButtons/InvokeButton.tsx b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx similarity index 96% rename from frontend/src/features/options/ProcessButtons/InvokeButton.tsx rename to frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx index 793aa3fded..2d990dd41e 100644 --- a/frontend/src/features/options/ProcessButtons/InvokeButton.tsx +++ b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx @@ -9,7 +9,7 @@ import IAIIconButton, { IAIIconButtonProps, } from 'common/components/IAIIconButton'; import IAIPopover from 'common/components/IAIPopover'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; interface InvokeButton extends Omit { diff --git a/frontend/src/features/options/ProcessButtons/Loopback.tsx b/frontend/src/features/options/components/ProcessButtons/Loopback.tsx similarity index 97% rename from frontend/src/features/options/ProcessButtons/Loopback.tsx rename to frontend/src/features/options/components/ProcessButtons/Loopback.tsx index 77eb5530f6..c574c1ebfe 100644 --- a/frontend/src/features/options/ProcessButtons/Loopback.tsx +++ b/frontend/src/features/options/components/ProcessButtons/Loopback.tsx @@ -2,7 +2,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { FaRecycle } from 'react-icons/fa'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { OptionsState, setShouldLoopback } from 'features/options/optionsSlice'; +import { OptionsState, setShouldLoopback } from 'features/options/store/optionsSlice'; const loopbackSelector = createSelector( (state: RootState) => state.options, diff --git a/frontend/src/features/options/ProcessButtons/ProcessButtons.scss b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.scss similarity index 96% rename from frontend/src/features/options/ProcessButtons/ProcessButtons.scss rename to frontend/src/features/options/components/ProcessButtons/ProcessButtons.scss index 3b39cb55aa..658ee08177 100644 --- a/frontend/src/features/options/ProcessButtons/ProcessButtons.scss +++ b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .process-buttons { display: flex; diff --git a/frontend/src/features/options/ProcessButtons/ProcessButtons.tsx b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx similarity index 100% rename from frontend/src/features/options/ProcessButtons/ProcessButtons.tsx rename to frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx diff --git a/frontend/src/features/options/PromptInput/PromptInput.scss b/frontend/src/features/options/components/PromptInput/PromptInput.scss similarity index 100% rename from frontend/src/features/options/PromptInput/PromptInput.scss rename to frontend/src/features/options/components/PromptInput/PromptInput.scss diff --git a/frontend/src/features/options/PromptInput/PromptInput.tsx b/frontend/src/features/options/components/PromptInput/PromptInput.tsx similarity index 92% rename from frontend/src/features/options/PromptInput/PromptInput.tsx rename to frontend/src/features/options/components/PromptInput/PromptInput.tsx index 165a82d651..429beabe38 100644 --- a/frontend/src/features/options/PromptInput/PromptInput.tsx +++ b/frontend/src/features/options/components/PromptInput/PromptInput.tsx @@ -3,11 +3,11 @@ import { ChangeEvent, KeyboardEvent, useRef } from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { generateImage } from 'app/socketio/actions'; -import { OptionsState, setPrompt } from 'features/options/optionsSlice'; +import { OptionsState, setPrompt } from 'features/options/store/optionsSlice'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { readinessSelector } from 'app/selectors/readinessSelector'; const promptInputSelector = createSelector( diff --git a/frontend/src/features/options/optionsSelectors.ts b/frontend/src/features/options/store/optionsSelectors.ts similarity index 92% rename from frontend/src/features/options/optionsSelectors.ts rename to frontend/src/features/options/store/optionsSelectors.ts index 3d513f08d3..00ec3b0c08 100644 --- a/frontend/src/features/options/optionsSelectors.ts +++ b/frontend/src/features/options/store/optionsSelectors.ts @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { RootState } from 'app/store'; -import { tabMap } from 'features/tabs/InvokeTabs'; +import { tabMap } from 'features/tabs/components/InvokeTabs'; import { OptionsState } from './optionsSlice'; export const activeTabNameSelector = createSelector( diff --git a/frontend/src/features/options/optionsSlice.ts b/frontend/src/features/options/store/optionsSlice.ts similarity index 99% rename from frontend/src/features/options/optionsSlice.ts rename to frontend/src/features/options/store/optionsSlice.ts index a17c754bdb..6425d4968c 100644 --- a/frontend/src/features/options/optionsSlice.ts +++ b/frontend/src/features/options/store/optionsSlice.ts @@ -4,7 +4,7 @@ import * as InvokeAI from 'app/invokeai'; import promptToString from 'common/util/promptToString'; import { seedWeightsToString } from 'common/util/seedWeightPairs'; import { FACETOOL_TYPES } from 'app/constants'; -import { InvokeTabName, tabMap } from 'features/tabs/InvokeTabs'; +import { InvokeTabName, tabMap } from 'features/tabs/components/InvokeTabs'; export type UpscalingLevel = 2 | 4; diff --git a/frontend/src/features/system/Console.scss b/frontend/src/features/system/components/Console.scss similarity index 100% rename from frontend/src/features/system/Console.scss rename to frontend/src/features/system/components/Console.scss diff --git a/frontend/src/features/system/Console.tsx b/frontend/src/features/system/components/Console.tsx similarity index 99% rename from frontend/src/features/system/Console.tsx rename to frontend/src/features/system/components/Console.tsx index ed5867437d..312ac44941 100644 --- a/frontend/src/features/system/Console.tsx +++ b/frontend/src/features/system/components/Console.tsx @@ -1,7 +1,7 @@ import { IconButton, Tooltip } from '@chakra-ui/react'; import { useAppDispatch, useAppSelector } from 'app/store'; import { RootState } from 'app/store'; -import { errorSeen, setShouldShowLogViewer, SystemState } from './systemSlice'; +import { errorSeen, setShouldShowLogViewer, SystemState } from 'features/system/store/systemSlice'; import { useLayoutEffect, useRef, useState } from 'react'; import { FaAngleDoubleDown, FaCode, FaMinus } from 'react-icons/fa'; import { createSelector } from '@reduxjs/toolkit'; diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.scss b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.scss similarity index 97% rename from frontend/src/features/system/HotkeysModal/HotkeysModal.scss rename to frontend/src/features/system/components/HotkeysModal/HotkeysModal.scss index 5dd544a68e..afb2b1c61e 100644 --- a/frontend/src/features/system/HotkeysModal/HotkeysModal.scss +++ b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .hotkeys-modal { width: 36rem; diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx similarity index 100% rename from frontend/src/features/system/HotkeysModal/HotkeysModal.tsx rename to frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx diff --git a/frontend/src/features/system/HotkeysModal/HotkeysModalItem.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModalItem.tsx similarity index 100% rename from frontend/src/features/system/HotkeysModal/HotkeysModalItem.tsx rename to frontend/src/features/system/components/HotkeysModal/HotkeysModalItem.tsx diff --git a/frontend/src/features/system/Modal.scss b/frontend/src/features/system/components/Modal.scss similarity index 79% rename from frontend/src/features/system/Modal.scss rename to frontend/src/features/system/components/Modal.scss index 7ba1233fb3..2a1500d07f 100644 --- a/frontend/src/features/system/Modal.scss +++ b/frontend/src/features/system/components/Modal.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .modal { background-color: var(--background-color-secondary); diff --git a/frontend/src/features/system/ProgressBar.scss b/frontend/src/features/system/components/ProgressBar.scss similarity index 91% rename from frontend/src/features/system/ProgressBar.scss rename to frontend/src/features/system/components/ProgressBar.scss index 9f60d5b8fc..47d60764ad 100644 --- a/frontend/src/features/system/ProgressBar.scss +++ b/frontend/src/features/system/components/ProgressBar.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .progress-bar { background-color: var(--root-bg-color); diff --git a/frontend/src/features/system/ProgressBar.tsx b/frontend/src/features/system/components/ProgressBar.tsx similarity index 93% rename from frontend/src/features/system/ProgressBar.tsx rename to frontend/src/features/system/components/ProgressBar.tsx index fa1d61f81b..9aa15c43af 100644 --- a/frontend/src/features/system/ProgressBar.tsx +++ b/frontend/src/features/system/components/ProgressBar.tsx @@ -3,7 +3,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; import { useAppSelector } from 'app/store'; import { RootState } from 'app/store'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; const systemSelector = createSelector( (state: RootState) => state.system, diff --git a/frontend/src/features/system/SettingsModal/ModelList.scss b/frontend/src/features/system/components/SettingsModal/ModelList.scss similarity index 100% rename from frontend/src/features/system/SettingsModal/ModelList.scss rename to frontend/src/features/system/components/SettingsModal/ModelList.scss diff --git a/frontend/src/features/system/SettingsModal/ModelList.tsx b/frontend/src/features/system/components/SettingsModal/ModelList.tsx similarity index 97% rename from frontend/src/features/system/SettingsModal/ModelList.tsx rename to frontend/src/features/system/components/SettingsModal/ModelList.tsx index 0feab08db8..3ee5b2e0ad 100644 --- a/frontend/src/features/system/SettingsModal/ModelList.tsx +++ b/frontend/src/features/system/components/SettingsModal/ModelList.tsx @@ -13,7 +13,7 @@ import _ from 'lodash'; import { ModelStatus } from 'app/invokeai'; import { requestModelChange } from 'app/socketio/actions'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import { SystemState } from 'features/system/systemSlice'; +import { SystemState } from 'features/system/store/systemSlice'; type ModelListItemProps = { name: string; diff --git a/frontend/src/features/system/SettingsModal/SettingsModal.scss b/frontend/src/features/system/components/SettingsModal/SettingsModal.scss similarity index 94% rename from frontend/src/features/system/SettingsModal/SettingsModal.scss rename to frontend/src/features/system/components/SettingsModal/SettingsModal.scss index 689fcd22e5..53b4766c95 100644 --- a/frontend/src/features/system/SettingsModal/SettingsModal.scss +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .settings-modal { max-height: 36rem; diff --git a/frontend/src/features/system/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx similarity index 99% rename from frontend/src/features/system/SettingsModal/SettingsModal.tsx rename to frontend/src/features/system/components/SettingsModal/SettingsModal.tsx index 174a5cca1b..1608c6fec6 100644 --- a/frontend/src/features/system/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -25,7 +25,7 @@ import { setShouldDisplayGuides, setShouldDisplayInProgressType, SystemState, -} from 'features/system/systemSlice'; +} from 'features/system/store/systemSlice'; import ModelList from './ModelList'; import { IN_PROGRESS_IMAGE_TYPES } from 'app/constants'; import IAISwitch from 'common/components/IAISwitch'; diff --git a/frontend/src/features/system/SiteHeader.scss b/frontend/src/features/system/components/SiteHeader.scss similarity index 100% rename from frontend/src/features/system/SiteHeader.scss rename to frontend/src/features/system/components/SiteHeader.scss diff --git a/frontend/src/features/system/SiteHeader.tsx b/frontend/src/features/system/components/SiteHeader.tsx similarity index 100% rename from frontend/src/features/system/SiteHeader.tsx rename to frontend/src/features/system/components/SiteHeader.tsx diff --git a/frontend/src/features/system/StatusIndicator.scss b/frontend/src/features/system/components/StatusIndicator.scss similarity index 100% rename from frontend/src/features/system/StatusIndicator.scss rename to frontend/src/features/system/components/StatusIndicator.scss diff --git a/frontend/src/features/system/StatusIndicator.tsx b/frontend/src/features/system/components/StatusIndicator.tsx similarity index 96% rename from frontend/src/features/system/StatusIndicator.tsx rename to frontend/src/features/system/components/StatusIndicator.tsx index 4a01ab7920..add43c2fc1 100644 --- a/frontend/src/features/system/StatusIndicator.tsx +++ b/frontend/src/features/system/components/StatusIndicator.tsx @@ -2,7 +2,7 @@ import { Text, Tooltip } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import { errorSeen, SystemState } from './systemSlice'; +import { errorSeen, SystemState } from 'features/system/store/systemSlice'; const systemSelector = createSelector( (state: RootState) => state.system, diff --git a/frontend/src/features/system/ThemeChanger.tsx b/frontend/src/features/system/components/ThemeChanger.tsx similarity index 78% rename from frontend/src/features/system/ThemeChanger.tsx rename to frontend/src/features/system/components/ThemeChanger.tsx index b9ef706902..f37b4b57eb 100644 --- a/frontend/src/features/system/ThemeChanger.tsx +++ b/frontend/src/features/system/components/ThemeChanger.tsx @@ -1,8 +1,8 @@ import { useColorMode } from '@chakra-ui/react'; import React, { ChangeEvent } from 'react'; -import { RootState, useAppDispatch, useAppSelector } from '../../app/store'; -import IAISelect from '../../common/components/IAISelect'; -import { setCurrentTheme } from '../options/optionsSlice'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; +import { setCurrentTheme } from 'features/options/store/optionsSlice'; const THEMES = ['dark', 'light', 'green']; diff --git a/frontend/src/features/system/hooks/useToastWatcher.ts b/frontend/src/features/system/hooks/useToastWatcher.ts index 5aeca3289e..f5a36681ce 100644 --- a/frontend/src/features/system/hooks/useToastWatcher.ts +++ b/frontend/src/features/system/hooks/useToastWatcher.ts @@ -1,8 +1,8 @@ import { useToast } from '@chakra-ui/react'; import { useAppDispatch, useAppSelector } from 'app/store'; import { useEffect } from 'react'; -import { toastQueueSelector } from '../systemSelectors'; -import { clearToastQueue } from '../systemSlice'; +import { toastQueueSelector } from 'features/system/store/systemSelectors'; +import { clearToastQueue } from 'features/system/store/systemSlice'; const useToastWatcher = () => { const dispatch = useAppDispatch(); diff --git a/frontend/src/features/system/systemSelectors.ts b/frontend/src/features/system/store/systemSelectors.ts similarity index 100% rename from frontend/src/features/system/systemSelectors.ts rename to frontend/src/features/system/store/systemSelectors.ts diff --git a/frontend/src/features/system/systemSlice.ts b/frontend/src/features/system/store/systemSlice.ts similarity index 100% rename from frontend/src/features/system/systemSlice.ts rename to frontend/src/features/system/store/systemSlice.ts diff --git a/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx b/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx deleted file mode 100644 index 65117d1972..0000000000 --- a/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; -import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import ImageFit from 'features/options/AdvancedOptions/ImageToImage/ImageFit'; -import ImageToImageStrength from 'features/options/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import OutputHeader from 'features/options/AdvancedOptions/Output/OutputHeader'; -import OutputOptions from 'features/options/AdvancedOptions/Output/OutputOptions'; -import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from 'features/options/MainOptions/MainOptions'; -import OptionsAccordion from 'features/options/OptionsAccordion'; -import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; -import PromptInput from 'features/options/PromptInput/PromptInput'; -import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; - -export default function ImageToImagePanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - - const imageToImageAccordions = { - seed: { - header: , - feature: Feature.SEED, - options: , - }, - variations: { - header: , - feature: Feature.VARIATIONS, - options: , - }, - face_restore: { - header: , - feature: Feature.FACE_CORRECTION, - options: , - }, - upscale: { - header: , - feature: Feature.UPSCALE, - options: , - }, - other: { - header: , - feature: Feature.OTHER, - options: , - }, - }; - - return ( - - - - - - - - {showAdvancedOptions ? ( - - ) : null} - - ); -} diff --git a/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx b/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx deleted file mode 100644 index 0792f71d52..0000000000 --- a/frontend/src/features/tabs/TextToImage/TextToImagePanel.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; -import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import OutputHeader from 'features/options/AdvancedOptions/Output/OutputHeader'; -import OutputOptions from 'features/options/AdvancedOptions/Output/OutputOptions'; -import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from 'features/options/MainOptions/MainOptions'; -import OptionsAccordion from 'features/options/OptionsAccordion'; -import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; -import PromptInput from 'features/options/PromptInput/PromptInput'; -import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; - -export default function TextToImagePanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - - const textToImageAccordions = { - seed: { - header: , - feature: Feature.SEED, - options: , - }, - variations: { - header: , - feature: Feature.VARIATIONS, - options: , - }, - face_restore: { - header: , - feature: Feature.FACE_CORRECTION, - options: , - }, - upscale: { - header: , - feature: Feature.UPSCALE, - options: , - }, - other: { - header: , - feature: Feature.OTHER, - options: , - }, - }; - - return ( - - - - - - {showAdvancedOptions ? ( - - ) : null} - - ); -} diff --git a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx deleted file mode 100644 index d5ca42137f..0000000000 --- a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ /dev/null @@ -1,65 +0,0 @@ -// import { Feature } from 'app/features'; -import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; -import FaceRestoreHeader from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import ImageToImageStrength from 'features/options/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import InpaintingSettings from 'features/options/AdvancedOptions/Inpainting/InpaintingSettings'; -import SeedHeader from 'features/options/AdvancedOptions/Seed/SeedHeader'; -import SeedOptions from 'features/options/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from 'features/options/AdvancedOptions/Variations/VariationsHeader'; -import VariationsOptions from 'features/options/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/MainOptions/MainAdvancedOptionsCheckbox'; -import MainOptions from 'features/options/MainOptions/MainOptions'; -import OptionsAccordion from 'features/options/OptionsAccordion'; -import ProcessButtons from 'features/options/ProcessButtons/ProcessButtons'; -import PromptInput from 'features/options/PromptInput/PromptInput'; -import InvokeOptionsPanel from 'features/tabs/InvokeOptionsPanel'; - -export default function UnifiedCanvasPanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - - const imageToImageAccordions = { - seed: { - header: , - feature: Feature.SEED, - options: , - }, - variations: { - header: , - feature: Feature.VARIATIONS, - options: , - }, - face_restore: { - header: , - feature: Feature.FACE_CORRECTION, - options: , - }, - upscale: { - header: , - feature: Feature.UPSCALE, - options: , - }, - }; - - return ( - - - - - - - - {showAdvancedOptions && ( - - )} - - ); -} diff --git a/frontend/src/features/tabs/FloatingButton.scss b/frontend/src/features/tabs/components/FloatingButton.scss similarity index 96% rename from frontend/src/features/tabs/FloatingButton.scss rename to frontend/src/features/tabs/components/FloatingButton.scss index c985ead031..19a68f8718 100644 --- a/frontend/src/features/tabs/FloatingButton.scss +++ b/frontend/src/features/tabs/components/FloatingButton.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .floating-show-hide-button { position: absolute; diff --git a/frontend/src/features/tabs/FloatingGalleryButton.tsx b/frontend/src/features/tabs/components/FloatingGalleryButton.tsx similarity index 92% rename from frontend/src/features/tabs/FloatingGalleryButton.tsx rename to frontend/src/features/tabs/components/FloatingGalleryButton.tsx index 27c3ed178f..780a5d0897 100644 --- a/frontend/src/features/tabs/FloatingGalleryButton.tsx +++ b/frontend/src/features/tabs/components/FloatingGalleryButton.tsx @@ -1,7 +1,7 @@ import { MdPhotoLibrary } from 'react-icons/md'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { setShouldShowGallery } from 'features/gallery/gallerySlice'; +import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; const FloatingGalleryButton = () => { diff --git a/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx b/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx similarity index 85% rename from frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx rename to frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx index 018aebd0c6..596b63074f 100644 --- a/frontend/src/features/tabs/FloatingOptionsPanelButtons.tsx +++ b/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx @@ -5,11 +5,11 @@ import IAIIconButton from 'common/components/IAIIconButton'; import { OptionsState, setShouldShowOptionsPanel, -} from 'features/options/optionsSlice'; -import CancelButton from 'features/options/ProcessButtons/CancelButton'; -import InvokeButton from 'features/options/ProcessButtons/InvokeButton'; +} from 'features/options/store/optionsSlice'; +import CancelButton from 'features/options/components/ProcessButtons/CancelButton'; +import InvokeButton from 'features/options/components/ProcessButtons/InvokeButton'; import _ from 'lodash'; -import LoopbackButton from 'features/options/ProcessButtons/Loopback'; +import LoopbackButton from 'features/options/components/ProcessButtons/Loopback'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; const canInvokeSelector = createSelector( diff --git a/frontend/src/features/tabs/ImageToImage/ImageToImage.scss b/frontend/src/features/tabs/components/ImageToImage/ImageToImage.scss similarity index 95% rename from frontend/src/features/tabs/ImageToImage/ImageToImage.scss rename to frontend/src/features/tabs/components/ImageToImage/ImageToImage.scss index 29850f2a3c..edb307941b 100644 --- a/frontend/src/features/tabs/ImageToImage/ImageToImage.scss +++ b/frontend/src/features/tabs/components/ImageToImage/ImageToImage.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .image-to-image-area { display: flex; diff --git a/frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx b/frontend/src/features/tabs/components/ImageToImage/ImageToImageDisplay.tsx similarity index 91% rename from frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx rename to frontend/src/features/tabs/components/ImageToImage/ImageToImageDisplay.tsx index 9a986e0feb..90de5fe459 100644 --- a/frontend/src/features/tabs/ImageToImage/ImageToImageDisplay.tsx +++ b/frontend/src/features/tabs/components/ImageToImage/ImageToImageDisplay.tsx @@ -1,6 +1,6 @@ import { RootState, useAppSelector } from 'app/store'; import ImageUploadButton from 'common/components/ImageUploaderButton'; -import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; +import CurrentImageDisplay from 'features/gallery/components/CurrentImageDisplay'; import InitImagePreview from './InitImagePreview'; const ImageToImageDisplay = () => { diff --git a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx new file mode 100644 index 0000000000..ac9726acc8 --- /dev/null +++ b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx @@ -0,0 +1,71 @@ +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import ImageFit from 'features/options/components/AdvancedOptions/ImageToImage/ImageFit'; +import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; +import OutputHeader from 'features/options/components/AdvancedOptions/Output/OutputHeader'; +import OutputOptions from 'features/options/components/AdvancedOptions/Output/OutputOptions'; +import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/components/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/components/OptionsAccordion'; +import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/components/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; + +export default function ImageToImagePanel() { + const showAdvancedOptions = useAppSelector( + (state: RootState) => state.options.showAdvancedOptions + ); + + const imageToImageAccordions = { + seed: { + header: , + feature: Feature.SEED, + options: , + }, + variations: { + header: , + feature: Feature.VARIATIONS, + options: , + }, + face_restore: { + header: , + feature: Feature.FACE_CORRECTION, + options: , + }, + upscale: { + header: , + feature: Feature.UPSCALE, + options: , + }, + other: { + header: , + feature: Feature.OTHER, + options: , + }, + }; + + return ( + + + + + + + + {showAdvancedOptions ? ( + + ) : null} + + ); +} diff --git a/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx b/frontend/src/features/tabs/components/ImageToImage/InitImagePreview.tsx similarity index 95% rename from frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx rename to frontend/src/features/tabs/components/ImageToImage/InitImagePreview.tsx index 86e551537e..25cc602f7d 100644 --- a/frontend/src/features/tabs/ImageToImage/InitImagePreview.tsx +++ b/frontend/src/features/tabs/components/ImageToImage/InitImagePreview.tsx @@ -1,7 +1,7 @@ import { Image, useToast } from '@chakra-ui/react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; -import { clearInitialImage } from 'features/options/optionsSlice'; +import { clearInitialImage } from 'features/options/store/optionsSlice'; export default function InitImagePreview() { const initialImage = useAppSelector( diff --git a/frontend/src/features/tabs/ImageToImage/InitialImageOverlay.tsx b/frontend/src/features/tabs/components/ImageToImage/InitialImageOverlay.tsx similarity index 100% rename from frontend/src/features/tabs/ImageToImage/InitialImageOverlay.tsx rename to frontend/src/features/tabs/components/ImageToImage/InitialImageOverlay.tsx diff --git a/frontend/src/features/tabs/ImageToImage/index.tsx b/frontend/src/features/tabs/components/ImageToImage/index.tsx similarity index 81% rename from frontend/src/features/tabs/ImageToImage/index.tsx rename to frontend/src/features/tabs/components/ImageToImage/index.tsx index 1a6e496089..e1f4747176 100644 --- a/frontend/src/features/tabs/ImageToImage/index.tsx +++ b/frontend/src/features/tabs/components/ImageToImage/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import ImageToImagePanel from './ImageToImagePanel'; import ImageToImageDisplay from './ImageToImageDisplay'; -import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; +import InvokeWorkarea from 'features/tabs/components/InvokeWorkarea'; export default function ImageToImageWorkarea() { return ( diff --git a/frontend/src/features/tabs/InvokeOptionsPanel.scss b/frontend/src/features/tabs/components/InvokeOptionsPanel.scss similarity index 97% rename from frontend/src/features/tabs/InvokeOptionsPanel.scss rename to frontend/src/features/tabs/components/InvokeOptionsPanel.scss index c11b86511e..b5be76a96d 100644 --- a/frontend/src/features/tabs/InvokeOptionsPanel.scss +++ b/frontend/src/features/tabs/components/InvokeOptionsPanel.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .options-panel-wrapper-enter { transform: translateX(-150%); diff --git a/frontend/src/features/tabs/InvokeOptionsPanel.tsx b/frontend/src/features/tabs/components/InvokeOptionsPanel.tsx similarity index 99% rename from frontend/src/features/tabs/InvokeOptionsPanel.tsx rename to frontend/src/features/tabs/components/InvokeOptionsPanel.tsx index 6d367d9710..92cd0a55d8 100644 --- a/frontend/src/features/tabs/InvokeOptionsPanel.tsx +++ b/frontend/src/features/tabs/components/InvokeOptionsPanel.tsx @@ -13,7 +13,7 @@ import { setShouldHoldOptionsPanelOpen, setShouldPinOptionsPanel, setShouldShowOptionsPanel, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import InvokeAILogo from 'assets/images/logo.png'; diff --git a/frontend/src/features/tabs/InvokeTabs.scss b/frontend/src/features/tabs/components/InvokeTabs.scss similarity index 95% rename from frontend/src/features/tabs/InvokeTabs.scss rename to frontend/src/features/tabs/components/InvokeTabs.scss index 77bfeae581..2a0212bd1f 100644 --- a/frontend/src/features/tabs/InvokeTabs.scss +++ b/frontend/src/features/tabs/components/InvokeTabs.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .app-tabs { display: grid; diff --git a/frontend/src/features/tabs/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx similarity index 96% rename from frontend/src/features/tabs/InvokeTabs.tsx rename to frontend/src/features/tabs/components/InvokeTabs.tsx index 8bfdd1c8ba..b3d6863b7b 100644 --- a/frontend/src/features/tabs/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -15,13 +15,13 @@ import { setActiveTab, setIsLightBoxOpen, setShouldShowOptionsPanel, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import ImageToImageWorkarea from './ImageToImage'; import TextToImageWorkarea from './TextToImage'; -import Lightbox from 'features/lightbox/Lightbox'; +import Lightbox from 'features/lightbox/components/Lightbox'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import UnifiedCanvasWorkarea from './UnifiedCanvas/UnifiedCanvasWorkarea'; -import { setShouldShowGallery } from 'features/gallery/gallerySlice'; +import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; export const tabDict = { diff --git a/frontend/src/features/tabs/InvokeWorkarea.scss b/frontend/src/features/tabs/components/InvokeWorkarea.scss similarity index 97% rename from frontend/src/features/tabs/InvokeWorkarea.scss rename to frontend/src/features/tabs/components/InvokeWorkarea.scss index 83df214a1c..a3821d9a77 100644 --- a/frontend/src/features/tabs/InvokeWorkarea.scss +++ b/frontend/src/features/tabs/components/InvokeWorkarea.scss @@ -1,4 +1,4 @@ -@use '../../styles/Mixins/' as *; +@use '../../../styles/Mixins/' as *; .workarea-wrapper { position: relative; diff --git a/frontend/src/features/tabs/InvokeWorkarea.tsx b/frontend/src/features/tabs/components/InvokeWorkarea.tsx similarity index 92% rename from frontend/src/features/tabs/InvokeWorkarea.tsx rename to frontend/src/features/tabs/components/InvokeWorkarea.tsx index 5305d30b4b..69e3967d65 100644 --- a/frontend/src/features/tabs/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/components/InvokeWorkarea.tsx @@ -4,12 +4,12 @@ import { ReactNode } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { VscSplitHorizontal } from 'react-icons/vsc'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import ImageGallery from 'features/gallery/ImageGallery'; -import { activeTabNameSelector } from 'features/options/optionsSelectors'; +import ImageGallery from 'features/gallery/components/ImageGallery'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { OptionsState, setShowDualDisplay, -} from 'features/options/optionsSlice'; +} from 'features/options/store/optionsSlice'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; const workareaSelector = createSelector( diff --git a/frontend/src/features/tabs/TextToImage/TextToImage.scss b/frontend/src/features/tabs/components/TextToImage/TextToImage.scss similarity index 59% rename from frontend/src/features/tabs/TextToImage/TextToImage.scss rename to frontend/src/features/tabs/components/TextToImage/TextToImage.scss index b4100d6d91..65cfb8a2bc 100644 --- a/frontend/src/features/tabs/TextToImage/TextToImage.scss +++ b/frontend/src/features/tabs/components/TextToImage/TextToImage.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .text-to-image-area { padding: 1rem; diff --git a/frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx b/frontend/src/features/tabs/components/TextToImage/TextToImageDisplay.tsx similarity index 73% rename from frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx rename to frontend/src/features/tabs/components/TextToImage/TextToImageDisplay.tsx index 6b68f80665..36cd60fd36 100644 --- a/frontend/src/features/tabs/TextToImage/TextToImageDisplay.tsx +++ b/frontend/src/features/tabs/components/TextToImage/TextToImageDisplay.tsx @@ -1,4 +1,4 @@ -import CurrentImageDisplay from 'features/gallery/CurrentImageDisplay'; +import CurrentImageDisplay from 'features/gallery/components/CurrentImageDisplay'; const TextToImageDisplay = () => { return ( diff --git a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx new file mode 100644 index 0000000000..3451760b88 --- /dev/null +++ b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx @@ -0,0 +1,64 @@ +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import OutputHeader from 'features/options/components/AdvancedOptions/Output/OutputHeader'; +import OutputOptions from 'features/options/components/AdvancedOptions/Output/OutputOptions'; +import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/components/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/components/OptionsAccordion'; +import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/components/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; + +export default function TextToImagePanel() { + const showAdvancedOptions = useAppSelector( + (state: RootState) => state.options.showAdvancedOptions + ); + + const textToImageAccordions = { + seed: { + header: , + feature: Feature.SEED, + options: , + }, + variations: { + header: , + feature: Feature.VARIATIONS, + options: , + }, + face_restore: { + header: , + feature: Feature.FACE_CORRECTION, + options: , + }, + upscale: { + header: , + feature: Feature.UPSCALE, + options: , + }, + other: { + header: , + feature: Feature.OTHER, + options: , + }, + }; + + return ( + + + + + + {showAdvancedOptions ? ( + + ) : null} + + ); +} diff --git a/frontend/src/features/tabs/TextToImage/index.tsx b/frontend/src/features/tabs/components/TextToImage/index.tsx similarity index 80% rename from frontend/src/features/tabs/TextToImage/index.tsx rename to frontend/src/features/tabs/components/TextToImage/index.tsx index 5f88215e56..c5b599e84a 100644 --- a/frontend/src/features/tabs/TextToImage/index.tsx +++ b/frontend/src/features/tabs/components/TextToImage/index.tsx @@ -1,5 +1,5 @@ import TextToImagePanel from './TextToImagePanel'; -import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; +import InvokeWorkarea from 'features/tabs/components/InvokeWorkarea'; import TextToImageDisplay from './TextToImageDisplay'; export default function TextToImageWorkarea() { diff --git a/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss b/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss similarity index 97% rename from frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss rename to frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss index 6a194f4d1a..e93f05857a 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss @@ -1,4 +1,4 @@ -@use '../../../styles/Mixins/' as *; +@use '../../../../styles/Mixins/' as *; .inpainting-main-area { display: flex; diff --git a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx similarity index 96% rename from frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx rename to frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx index 4e21f54b0b..2842df9157 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasDisplay.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx @@ -1,5 +1,5 @@ import { createSelector } from '@reduxjs/toolkit'; -// import IAICanvas from 'features/canvas/IAICanvas'; +// import IAICanvas from 'features/canvas/components/IAICanvas'; import IAICanvasResizer from 'features/canvas/components/IAICanvasResizer'; import _ from 'lodash'; import { useLayoutEffect } from 'react'; diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx new file mode 100644 index 0000000000..41c8c598ce --- /dev/null +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -0,0 +1,65 @@ +// import { Feature } from 'app/features'; +import { Feature } from 'app/features'; +import { RootState, useAppSelector } from 'app/store'; +import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; +import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; +import InpaintingSettings from 'features/options/components/AdvancedOptions/Inpainting/InpaintingSettings'; +import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; +import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; +import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; +import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; +import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; +import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; +import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; +import MainOptions from 'features/options/components/MainOptions/MainOptions'; +import OptionsAccordion from 'features/options/components/OptionsAccordion'; +import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; +import PromptInput from 'features/options/components/PromptInput/PromptInput'; +import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; + +export default function UnifiedCanvasPanel() { + const showAdvancedOptions = useAppSelector( + (state: RootState) => state.options.showAdvancedOptions + ); + + const imageToImageAccordions = { + seed: { + header: , + feature: Feature.SEED, + options: , + }, + variations: { + header: , + feature: Feature.VARIATIONS, + options: , + }, + face_restore: { + header: , + feature: Feature.FACE_CORRECTION, + options: , + }, + upscale: { + header: , + feature: Feature.UPSCALE, + options: , + }, + }; + + return ( + + + + + + + + {showAdvancedOptions && ( + + )} + + ); +} diff --git a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx similarity index 90% rename from frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx rename to frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx index 92fc8c2158..93db982f7f 100644 --- a/frontend/src/features/tabs/UnifiedCanvas/UnifiedCanvasWorkarea.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx @@ -1,6 +1,6 @@ import UnifiedCanvasPanel from './UnifiedCanvasPanel'; import UnifiedCanvasDisplay from './UnifiedCanvasDisplay'; -import InvokeWorkarea from 'features/tabs/InvokeWorkarea'; +import InvokeWorkarea from 'features/tabs/components/InvokeWorkarea'; import { useAppDispatch } from 'app/store'; import { useEffect } from 'react'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 6c4f45bb93..44194e6041 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -13,40 +13,40 @@ @use '../app/App.scss'; //system -@use '../features/system/SiteHeader.scss'; -@use '../features/system/StatusIndicator.scss'; -@use '../features/system/SettingsModal/SettingsModal.scss'; -@use '../features/system/SettingsModal/ModelList.scss'; -@use '../features/system/HotkeysModal/HotkeysModal.scss'; -@use '../features/system/Console.scss'; +@use '../features/system/components/SiteHeader.scss'; +@use '../features/system/components/StatusIndicator.scss'; +@use '../features/system/components/SettingsModal/SettingsModal.scss'; +@use '../features/system/components/SettingsModal/ModelList.scss'; +@use '../features/system/components/HotkeysModal/HotkeysModal.scss'; +@use '../features/system/components/Console.scss'; // options -@use '../features/options/PromptInput/PromptInput.scss'; -@use '../features/options/ProcessButtons/ProcessButtons.scss'; -@use '../features/options/MainOptions/MainOptions.scss'; -@use '../features/options/AccordionItems/AdvancedSettings.scss'; -@use '../features/options/AdvancedOptions/Upscale/UpscaleOptions.scss'; -@use '../features/options/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss'; -@use '../features/system/ProgressBar.scss'; +@use '../features/options/components/PromptInput/PromptInput.scss'; +@use '../features/options/components/ProcessButtons/ProcessButtons.scss'; +@use '../features/options/components/MainOptions/MainOptions.scss'; +@use '../features/options/components/AccordionItems/AdvancedSettings.scss'; +@use '../features/options/components/AdvancedOptions/Upscale/UpscaleOptions.scss'; +@use '../features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss'; +@use '../features/system/components/ProgressBar.scss'; // gallery -@use '../features/gallery/CurrentImageDisplay.scss'; -@use '../features/gallery/CurrentImageButtons.scss'; -@use '../features/gallery/ImageGallery.scss'; -@use '../features/gallery/HoverableImage.scss'; -@use '../features/gallery/ImageMetaDataViewer/ImageMetadataViewer.scss'; +@use '../features/gallery/components/CurrentImageDisplay.scss'; +@use '../features/gallery/components/CurrentImageButtons.scss'; +@use '../features/gallery/components/ImageGallery.scss'; +@use '../features/gallery/components/HoverableImage.scss'; +@use '../features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss'; // Lightbox -@use '../features/lightbox//Lightbox.scss'; +@use '../features/lightbox/components/Lightbox.scss'; // Tabs -@use '../features/tabs/InvokeTabs.scss'; -@use '../features/tabs/InvokeWorkarea.scss'; -@use '../features/tabs/InvokeOptionsPanel.scss'; -@use '../features/tabs/TextToImage/TextToImage.scss'; -@use '../features/tabs/ImageToImage/ImageToImage.scss'; -@use '../features/tabs/FloatingButton.scss'; -@use '../features/tabs/UnifiedCanvas/CanvasWorkarea.scss'; +@use '../features/tabs/components/InvokeTabs.scss'; +@use '../features/tabs/components/InvokeWorkarea.scss'; +@use '../features/tabs/components/InvokeOptionsPanel.scss'; +@use '../features/tabs/components/TextToImage/TextToImage.scss'; +@use '../features/tabs/components/ImageToImage/ImageToImage.scss'; +@use '../features/tabs/components/FloatingButton.scss'; +@use '../features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss'; // Component Shared @use '../common/components/IAINumberInput.scss'; @@ -69,7 +69,7 @@ // Shared Styles @use './Mixins/' as *; -@use '../features/system/Modal.scss'; +@use '../features/system/components/Modal.scss'; *, *::before, From ae4a44de3e218470026f958e6ef2a9106c16c438 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 16:07:36 +1100 Subject: [PATCH 096/220] Fixes Canvas Auto Save to Gallery --- frontend/src/app/socketio/listeners.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index ec7dec1935..cebeb73ff6 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -98,7 +98,8 @@ const makeSocketIOListeners = ( */ onGenerationResult: (data: InvokeAI.ImageResultResponse) => { try { - const { shouldLoopback, activeTab } = getState().options; + const state = getState(); + const { shouldLoopback, activeTab } = state.options; const { boundingBox: _, generationMode, ...rest } = data; const newImage = { @@ -107,24 +108,31 @@ const makeSocketIOListeners = ( }; if (['txt2img', 'img2img'].includes(generationMode)) { - newImage.category = 'result'; dispatch( addImage({ category: 'result', - image: newImage, + image: { ...newImage, category: 'result' }, }) ); } if (generationMode === 'unifiedCanvas' && data.boundingBox) { - newImage.category = 'temp'; const { boundingBox } = data; dispatch( addImageToStagingArea({ - image: newImage, + image: { ...newImage, category: 'temp' }, boundingBox, }) ); + + if (state.canvas.shouldAutoSave) { + dispatch( + addImage({ + image: { ...newImage, category: 'result' }, + category: 'result', + }) + ); + } } if (shouldLoopback) { From 68aebad7ad8462b4bf88e31051e511173a2a2a1b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:01:43 +1100 Subject: [PATCH 097/220] Fixes staging area outline --- .../components/IAICanvasStagingArea.tsx | 14 +++++++------ .../IAICanvasStagingAreaToolbar.tsx | 21 +++++++++---------- .../src/features/canvas/store/canvasSlice.ts | 7 ++++++- .../src/features/canvas/store/canvasTypes.ts | 3 ++- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx index 6648841a2d..3f5c15f060 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx @@ -15,6 +15,7 @@ const selector = createSelector( stagingArea: { images, selectedImageIndex }, }, shouldShowStagingImage, + shouldShowStagingOutline, } = canvas; return { @@ -23,6 +24,7 @@ const selector = createSelector( isOnFirstImage: selectedImageIndex === 0, isOnLastImage: selectedImageIndex === images.length - 1, shouldShowStagingImage, + shouldShowStagingOutline, }; }, { @@ -36,11 +38,11 @@ type Props = GroupConfig; const IAICanvasStagingArea = (props: Props) => { const { ...rest } = props; - const { currentStagingAreaImage, shouldShowStagingImage } = - useAppSelector(selector); - - const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = - useState(true); + const { + currentStagingAreaImage, + shouldShowStagingImage, + shouldShowStagingOutline, + } = useAppSelector(selector); if (!currentStagingAreaImage) return null; @@ -53,7 +55,7 @@ const IAICanvasStagingArea = (props: Props) => { return ( {shouldShowStagingImage && } - {shouldShowStagingAreaOutline && ( + {shouldShowStagingOutline && ( { shouldShowStagingImage, } = useAppSelector(selector); - const [shouldShowStagingAreaOutline, setShouldShowStagingAreaOutline] = - useState(true); - const handleMouseOver = useCallback(() => { - setShouldShowStagingAreaOutline(false); - }, []); + dispatch(setShouldShowStagingOutline(false)); + }, [dispatch]); const handleMouseOut = useCallback(() => { - setShouldShowStagingAreaOutline(true); - }, []); + dispatch(setShouldShowStagingOutline(true)); + }, [dispatch]); if (!currentStagingAreaImage) return null; @@ -84,6 +84,9 @@ const IAICanvasStagingAreaToolbar = () => { w={'100%'} align={'center'} justify={'center'} + filter="drop-shadow(0 0.5rem 1rem rgba(0,0,0))" + onMouseOver={handleMouseOver} + onMouseOut={handleMouseOut} > { aria-label="Previous" icon={} onClick={() => dispatch(prevStagingAreaImage())} - onMouseOver={handleMouseOver} - onMouseOut={handleMouseOut} data-selected={true} isDisabled={isOnFirstImage} /> @@ -103,8 +104,6 @@ const IAICanvasStagingAreaToolbar = () => { aria-label="Next" icon={} onClick={() => dispatch(nextStagingAreaImage())} - onMouseOver={handleMouseOver} - onMouseOut={handleMouseOut} data-selected={true} isDisabled={isOnLastImage} /> diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index fc14abedc6..5c164a6080 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -73,13 +73,14 @@ const initialCanvasState: CanvasState = { shouldShowCheckboardTransparency: false, shouldShowGrid: true, shouldShowIntermediates: true, + shouldShowStagingImage: true, + shouldShowStagingOutline: true, shouldSnapToGrid: true, shouldUseInpaintReplace: false, stageCoordinates: { x: 0, y: 0 }, stageDimensions: { width: 0, height: 0 }, stageScale: 1, tool: 'brush', - shouldShowStagingImage: true, }; export const canvasSlice = createSlice({ @@ -636,6 +637,9 @@ export const canvasSlice = createSlice({ setShouldShowStagingImage: (state, action: PayloadAction) => { state.shouldShowStagingImage = action.payload; }, + setShouldShowStagingOutline: (state, action: PayloadAction) => { + state.shouldShowStagingOutline = action.payload; + }, setMergedCanvas: (state, action: PayloadAction) => { state.pastLayerStates.push({ ...state.layerState, @@ -705,6 +709,7 @@ export const { fitBoundingBoxToStage, setShouldShowStagingImage, setMergedCanvas, + setShouldShowStagingOutline, } = canvasSlice.actions; export default canvasSlice.reducer; diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 95bb40567f..82a459429e 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -104,11 +104,12 @@ export interface CanvasState { shouldShowCheckboardTransparency: boolean; shouldShowGrid: boolean; shouldShowIntermediates: boolean; + shouldShowStagingImage: boolean; + shouldShowStagingOutline: boolean; shouldSnapToGrid: boolean; shouldUseInpaintReplace: boolean; stageCoordinates: Vector2d; stageDimensions: Dimensions; stageScale: number; tool: CanvasTool; - shouldShowStagingImage: boolean; } From b8cebf29f225d803e52ddf52126bb0f71ad3e2f3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:02:05 +1100 Subject: [PATCH 098/220] Adds staging area hotkeys, disables gallery left/right when staging --- .../IAICanvasStagingAreaToolbar.tsx | 61 ++++++++++++++----- .../gallery/components/ImageGallery.tsx | 27 ++++++-- .../gallery/store/gallerySliceSelectors.ts | 5 +- .../components/HotkeysModal/HotkeysModal.tsx | 19 +++++- 4 files changed, 89 insertions(+), 23 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx index 93cd551be5..937b4e807d 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx @@ -30,6 +30,7 @@ import { setShouldShowStagingImage, setShouldShowStagingOutline, } from 'features/canvas/store/canvasSlice'; +import { useHotkeys } from 'react-hotkeys-hook'; const selector = createSelector( [canvasSelector], @@ -75,6 +76,43 @@ const IAICanvasStagingAreaToolbar = () => { dispatch(setShouldShowStagingOutline(true)); }, [dispatch]); + useHotkeys( + ['left'], + () => { + handlePrevImage(); + }, + { + enabled: () => true, + preventDefault: true, + } + ); + + useHotkeys( + ['right'], + () => { + handleNextImage(); + }, + { + enabled: () => true, + preventDefault: true, + } + ); + + useHotkeys( + ['enter'], + () => { + handleAccept(); + }, + { + enabled: () => true, + preventDefault: true, + } + ); + + const handlePrevImage = () => dispatch(prevStagingAreaImage()); + const handleNextImage = () => dispatch(nextStagingAreaImage()); + const handleAccept = () => dispatch(commitStagingAreaImage()); + if (!currentStagingAreaImage) return null; return ( @@ -90,34 +128,30 @@ const IAICanvasStagingAreaToolbar = () => { > } - onClick={() => dispatch(prevStagingAreaImage())} + onClick={handlePrevImage} data-selected={true} isDisabled={isOnFirstImage} /> } - onClick={() => dispatch(nextStagingAreaImage())} + onClick={handleNextImage} data-selected={true} isDisabled={isOnLastImage} /> } - onClick={() => dispatch(commitStagingAreaImage())} + onClick={handleAccept} data-selected={true} /> : } @@ -128,7 +162,6 @@ const IAICanvasStagingAreaToolbar = () => { /> } onClick={() => dispatch(discardStagedImages())} diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index c7ef874aed..25608b1901 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -63,6 +63,7 @@ export default function ImageGallery() { areMoreImagesAvailable, galleryWidth, isLightBoxOpen, + isStaging, } = useAppSelector(imageGallerySelector); const [galleryMinWidth, setGalleryMinWidth] = useState(300); @@ -158,13 +159,27 @@ export default function ImageGallery() { [shouldShowGallery, shouldPinGallery] ); - useHotkeys('left', () => { - dispatch(selectPrevImage()); - }); + useHotkeys( + 'left', + () => { + dispatch(selectPrevImage()); + }, + { + enabled: !isStaging, + }, + [isStaging] + ); - useHotkeys('right', () => { - dispatch(selectNextImage()); - }); + useHotkeys( + 'right', + () => { + dispatch(selectNextImage()); + }, + { + enabled: !isStaging, + }, + [isStaging] + ); useHotkeys( 'shift+g', diff --git a/frontend/src/features/gallery/store/gallerySliceSelectors.ts b/frontend/src/features/gallery/store/gallerySliceSelectors.ts index e9a909d8c0..e62c9b5e69 100644 --- a/frontend/src/features/gallery/store/gallerySliceSelectors.ts +++ b/frontend/src/features/gallery/store/gallerySliceSelectors.ts @@ -5,14 +5,16 @@ import { OptionsState } from 'features/options/store/optionsSlice'; import { SystemState } from 'features/system/store/systemSlice'; import { GalleryState } from './gallerySlice'; import _ from 'lodash'; +import { isStagingSelector } from 'features/canvas/store/canvasSelectors'; export const imageGallerySelector = createSelector( [ (state: RootState) => state.gallery, (state: RootState) => state.options, + isStagingSelector, activeTabNameSelector, ], - (gallery: GalleryState, options: OptionsState, activeTabName) => { + (gallery: GalleryState, options: OptionsState, isStaging, activeTabName) => { const { categories, currentCategory, @@ -46,6 +48,7 @@ export const imageGallerySelector = createSelector( currentCategory, galleryWidth, isLightBoxOpen, + isStaging, }; }, { diff --git a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx index 4b9ff7df0d..d6097a422f 100644 --- a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -113,12 +113,12 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { { title: 'Previous Image', desc: 'Display the previous image in gallery', - hotkey: 'Arrow left', + hotkey: 'Arrow Left', }, { title: 'Next Image', desc: 'Display the next image in gallery', - hotkey: 'Arrow right', + hotkey: 'Arrow Right', }, { title: 'Toggle Gallery Pin', @@ -223,6 +223,21 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Reset Canvas View', hotkey: 'R', }, + { + title: 'Previous Image', + desc: 'Previous Staging Area Image', + hotkey: 'Arrow Left', + }, + { + title: 'Next Image', + desc: 'Next Staging Area Image', + hotkey: 'Arrow Right', + }, + { + title: 'Accept Image', + desc: 'Accept Current Staging Area Image', + hotkey: 'Enter', + }, ]; const renderHotkeyModalItems = (hotkeys: HotkeyList[]) => { From cdc5f665929c8fa6546458b9ec37ca7687b020d6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:21:59 +1100 Subject: [PATCH 099/220] Fixes Use All Parameters --- backend/invoke_ai_web_server.py | 56 ++++++++++--------- .../components/CurrentImageButtons.tsx | 5 ++ 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 86fda19f2e..91313f4303 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -215,7 +215,7 @@ class InvokeAIWebServer: sys.exit(0) else: - useSSL = (args.certfile or args.keyfile) + useSSL = args.certfile or args.keyfile print(">> Started Invoke AI Web Server!") if self.host == "0.0.0.0": print( @@ -225,12 +225,19 @@ class InvokeAIWebServer: print( ">> Default host address now 127.0.0.1 (localhost). Use --host 0.0.0.0 to bind any address." ) - print(f">> Point your browser at http{'s' if useSSL else ''}://{self.host}:{self.port}") + print( + f">> Point your browser at http{'s' if useSSL else ''}://{self.host}:{self.port}" + ) if not useSSL: self.socketio.run(app=self.app, host=self.host, port=self.port) else: - self.socketio.run(app=self.app, host=self.host, port=self.port, - certfile=args.certfile, keyfile=args.keyfile) + self.socketio.run( + app=self.app, + host=self.host, + port=self.port, + certfile=args.certfile, + keyfile=args.keyfile, + ) def setup_app(self): self.result_url = "outputs/" @@ -909,8 +916,11 @@ class InvokeAIWebServer: eventlet.sleep(0) # restore the stashed URLS and discard the paths, we are about to send the result to client - if "init_img" in all_parameters: - all_parameters["init_img"] = "" + all_parameters["init_img"] = ( + init_img_url + if generation_parameters["generation_mode"] == "img2img" + else "" + ) if "init_mask" in all_parameters: all_parameters["init_mask"] = "" # TODO: store the mask in metadata @@ -967,7 +977,7 @@ class InvokeAIWebServer: eventlet.sleep(0) progress.set_current_iteration(progress.current_iteration + 1) - + print(generation_parameters) self.generate.prompt2image( @@ -1023,6 +1033,8 @@ class InvokeAIWebServer: postprocessing = [] + rfc_dict["type"] = parameters["generation_mode"] + # 'postprocessing' is either null or an if "facetool_strength" in parameters: facetool_parameters = { @@ -1071,25 +1083,17 @@ class InvokeAIWebServer: rfc_dict["variations"] = variations - # if "init_img" in parameters: - # rfc_dict["type"] = "img2img" - # rfc_dict["strength"] = parameters["strength"] - # rfc_dict["fit"] = parameters["fit"] # TODO: Noncompliant - # rfc_dict["orig_hash"] = calculate_init_img_hash( - # self.get_image_path_from_url(parameters["init_img"]) - # ) - # rfc_dict["init_image_path"] = parameters[ - # "init_img" - # ] # TODO: Noncompliant - # # if 'init_mask' in parameters: - # # rfc_dict['mask_hash'] = calculate_init_img_hash( - # # self.get_image_path_from_url(parameters['init_mask']) - # # ) # TODO: Noncompliant - # # rfc_dict['mask_image_path'] = parameters[ - # # 'init_mask' - # # ] # TODO: Noncompliant - # else: - # rfc_dict["type"] = "txt2img" + print(parameters) + + if rfc_dict["type"] == "img2img": + rfc_dict["strength"] = parameters["strength"] + rfc_dict["fit"] = parameters["fit"] # TODO: Noncompliant + rfc_dict["orig_hash"] = calculate_init_img_hash( + self.get_image_path_from_url(parameters["init_img"]) + ) + rfc_dict["init_image_path"] = parameters[ + "init_img" + ] # TODO: Noncompliant metadata["image"] = rfc_dict diff --git a/frontend/src/features/gallery/components/CurrentImageButtons.tsx b/frontend/src/features/gallery/components/CurrentImageButtons.tsx index 80d768d0c0..de861536ed 100644 --- a/frontend/src/features/gallery/components/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/components/CurrentImageButtons.tsx @@ -160,6 +160,11 @@ const CurrentImageButtons = () => { const handleClickUseAllParameters = () => { if (!currentImage) return; currentImage.metadata && dispatch(setAllParameters(currentImage.metadata)); + if (currentImage.metadata?.image.type === 'img2img') { + dispatch(setActiveTab('img2img')); + } else if (currentImage.metadata?.image.type === 'txt2img') { + dispatch(setActiveTab('txt2img')); + } }; useHotkeys( From e358adecddfd4cb5e3675f7a723071c671144bd6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:37:36 +1100 Subject: [PATCH 100/220] Fix metadata viewer image url length when viewing intermediate --- .../components/ImageMetaDataViewer/ImageMetadataViewer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx index c7b1d5c323..4b744865e4 100644 --- a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx +++ b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx @@ -143,8 +143,10 @@ const ImageMetadataViewer = memo( File: - - {image.url} + + {image.url.length > 64 + ? image.url.substring(0, 64).concat('...') + : image.url} From d018b2d7a7aa53649c94559793c594764bca826d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:53:31 +1100 Subject: [PATCH 101/220] Fixes intermediate images being tiny in txt2img/img2img --- .../gallery/components/CurrentImageDisplay.scss | 2 -- .../gallery/components/CurrentImagePreview.tsx | 10 +++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/gallery/components/CurrentImageDisplay.scss b/frontend/src/features/gallery/components/CurrentImageDisplay.scss index 69f60d83a4..10dd52525d 100644 --- a/frontend/src/features/gallery/components/CurrentImageDisplay.scss +++ b/frontend/src/features/gallery/components/CurrentImageDisplay.scss @@ -18,13 +18,11 @@ height: 100%; img { - background-color: var(--img2img-img-bg-color); border-radius: 0.5rem; object-fit: contain; max-width: 100%; max-height: 100%; height: auto; - width: max-content; position: absolute; cursor: pointer; } diff --git a/frontend/src/features/gallery/components/CurrentImagePreview.tsx b/frontend/src/features/gallery/components/CurrentImagePreview.tsx index d12c172d13..d000a81e82 100644 --- a/frontend/src/features/gallery/components/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/components/CurrentImagePreview.tsx @@ -10,7 +10,10 @@ import { } from 'features/gallery/store/gallerySlice'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; -import { OptionsState, setIsLightBoxOpen } from 'features/options/store/optionsSlice'; +import { + OptionsState, + setIsLightBoxOpen, +} from 'features/options/store/optionsSlice'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; export const imagesSelector = createSelector( @@ -30,6 +33,7 @@ export const imagesSelector = createSelector( return { imageToDisplay: intermediateImage ? intermediateImage : currentImage, + isIntermediate: Boolean(intermediateImage), viewerImageToDisplay: currentImage, currentCategory, isOnFirstImage: currentImageIndex === 0, @@ -56,6 +60,7 @@ export default function CurrentImagePreview() { isOnLastImage, shouldShowImageDetails, imageToDisplay, + isIntermediate, } = useAppSelector(imagesSelector); const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = @@ -89,6 +94,9 @@ export default function CurrentImagePreview() { width={imageToDisplay.width} height={imageToDisplay.height} onClick={handleLightBox} + style={{ + imageRendering: isIntermediate ? 'pixelated' : 'initial', + }} /> )} {!shouldShowImageDetails && ( From cccbfb12aaa54aaee8dd71696b85d1d615fc6ebe Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:53:48 +1100 Subject: [PATCH 102/220] Removes stale code --- frontend/src/app/socketio/listeners.ts | 48 -------------------------- 1 file changed, 48 deletions(-) diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index cebeb73ff6..82ace4b53e 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -337,54 +337,6 @@ const makeSocketIOListeners = ( }) ); }, - // onImageUploaded: (data: InvokeAI.ImageUploadResponse) => { - // const { origin, image, kind } = data; - // const newImage = { - // uuid: uuidv4(), - // ...image, - // }; - - // try { - // dispatch(addImage({ image: newImage, category: 'user' })); - - // switch (origin) { - // case 'img2img': { - // dispatch(setInitialImage(newImage)); - // break; - // } - // case 'inpainting': { - // dispatch(setImageToInpaint(newImage)); - // break; - // } - // default: { - // dispatch(setCurrentImage(newImage)); - // break; - // } - // } - - // dispatch( - // addLogEntry({ - // timestamp: dateFormat(new Date(), 'isoDateTime'), - // message: `Image uploaded: ${image.url}`, - // }) - // ); - // } catch (e) { - // console.error(e); - // } - // }, - /** - * Callback to run when we receive a 'maskImageUploaded' event. - */ - // onMaskImageUploaded: (data: InvokeAI.ImageUrlResponse) => { - // const { url } = data; - // dispatch(setMaskPath(url)); - // dispatch( - // addLogEntry({ - // timestamp: dateFormat(new Date(), 'isoDateTime'), - // message: `Mask image uploaded: ${url}`, - // }) - // ); - // }, onSystemConfig: (data: InvokeAI.SystemConfig) => { dispatch(setSystemConfig(data)); }, From 37a356d377bdd6771639db17ba26fe5fca32c47a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 18:13:12 +1100 Subject: [PATCH 103/220] Improves canvas status text and adds option to toggle debug info --- .../canvas/components/IAICanvasStatusText.tsx | 41 +++++++-- .../IAICanvasSettingsButtonPopover.tsx | 11 +++ .../src/features/canvas/store/canvasSlice.ts | 91 ++++++++++--------- .../src/features/canvas/store/canvasTypes.ts | 1 + .../UnifiedCanvas/CanvasWorkarea.scss | 2 +- 5 files changed, 94 insertions(+), 52 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index 3a3bbeba40..4fb208b750 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -17,6 +17,8 @@ const selector = createSelector( boundingBoxCoordinates: { x: boxX, y: boxY }, cursorPosition, stageScale, + shouldShowCanvasDebugInfo, + layer, } = canvas; const position = cursorPosition @@ -33,6 +35,9 @@ const selector = createSelector( boxX, boxY, stageScale, + shouldShowCanvasDebugInfo, + layerFormatted: layer.charAt(0).toUpperCase() + layer.slice(1), + layer, ...position, }; }, @@ -56,17 +61,37 @@ const IAICanvasStatusText = () => { cursorX, cursorY, stageScale, + shouldShowCanvasDebugInfo, + layer, + layerFormatted, } = useAppSelector(selector); + return (
-
{`Stage: ${stageWidth} x ${stageHeight}`}
-
{`Stage: ${roundToHundreth(stageX)}, ${roundToHundreth( - stageY - )}`}
-
{`Scale: ${roundToHundreth(stageScale)}`}
-
{`Box: ${boxWidth} x ${boxHeight}`}
-
{`Box: ${roundToHundreth(boxX)}, ${roundToHundreth(boxY)}`}
-
{`Cursor: ${cursorX}, ${cursorY}`}
+
{`Active Layer: ${layerFormatted}`}
+
{`Canvas Scale: ${Math.round(stageScale * 100)}%`}
+
{`Bounding Box: ${boxWidth}×${boxHeight}`}
+ {shouldShowCanvasDebugInfo && ( + <> +
{`Bounding Box Position: (${roundToHundreth( + boxX + )}, ${roundToHundreth(boxY)})`}
+
{`Canvas Dimensions: ${stageWidth}×${stageHeight}`}
+
{`Canvas Position: ${stageX}×${stageY}`}
+
{`Cursor Position: (${cursorX}, ${cursorY})`}
+ + )}
); }; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index 4457872390..0c6624ec29 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -3,6 +3,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { setShouldAutoSave, setShouldDarkenOutsideBoundingBox, + setShouldShowCanvasDebugInfo, setShouldShowGrid, setShouldShowIntermediates, setShouldSnapToGrid, @@ -24,6 +25,7 @@ export const canvasControlsSelector = createSelector( shouldShowGrid, shouldSnapToGrid, shouldAutoSave, + shouldShowCanvasDebugInfo, } = canvas; return { @@ -32,6 +34,7 @@ export const canvasControlsSelector = createSelector( shouldAutoSave, shouldDarkenOutsideBoundingBox, shouldShowIntermediates, + shouldShowCanvasDebugInfo, }; }, { @@ -49,6 +52,7 @@ const IAICanvasSettingsButtonPopover = () => { shouldSnapToGrid, shouldAutoSave, shouldDarkenOutsideBoundingBox, + shouldShowCanvasDebugInfo, } = useAppSelector(canvasControlsSelector); return ( @@ -94,6 +98,13 @@ const IAICanvasSettingsButtonPopover = () => { isChecked={shouldAutoSave} onChange={(e) => dispatch(setShouldAutoSave(e.target.checked))} /> + + dispatch(setShouldShowCanvasDebugInfo(e.target.checked)) + } + />
); diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 5c164a6080..d68e03e2b1 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -70,6 +70,7 @@ const initialCanvasState: CanvasState = { shouldShowBoundingBox: true, shouldShowBrush: true, shouldShowBrushPreview: false, + shouldShowCanvasDebugInfo: false, shouldShowCheckboardTransparency: false, shouldShowGrid: true, shouldShowIntermediates: true, @@ -640,6 +641,9 @@ export const canvasSlice = createSlice({ setShouldShowStagingOutline: (state, action: PayloadAction) => { state.shouldShowStagingOutline = action.payload; }, + setShouldShowCanvasDebugInfo: (state, action: PayloadAction) => { + state.shouldShowCanvasDebugInfo = action.payload; + }, setMergedCanvas: (state, action: PayloadAction) => { state.pastLayerStates.push({ ...state.layerState, @@ -653,63 +657,64 @@ export const canvasSlice = createSlice({ }); export const { - setTool, - setLayer, - setBrushColor, - setBrushSize, + addImageToStagingArea, addLine, addPointToCurrentLine, - setShouldPreserveMaskedArea, - setIsMaskEnabled, - setShouldShowCheckboardTransparency, - setShouldShowBrushPreview, - setMaskColor, clearMask, - undo, + commitStagingAreaImage, + discardStagedImages, + fitBoundingBoxToStage, + nextStagingAreaImage, + prevStagingAreaImage, redo, - setCursorPosition, - setStageDimensions, - setInitialCanvasImage, - setBoundingBoxDimensions, + resetCanvas, + resetCanvasView, + resizeAndScaleCanvas, + resizeCanvas, setBoundingBoxCoordinates, + setBoundingBoxDimensions, setBoundingBoxPreviewFill, - setDoesCanvasNeedScaling, - setStageScale, - toggleTool, - setShouldShowBoundingBox, - setShouldDarkenOutsideBoundingBox, - setIsDrawing, - setShouldShowBrush, + setBrushColor, + setBrushSize, + setCanvasContainerDimensions, setClearBrushHistory, - setShouldUseInpaintReplace, + setCursorPosition, + setDoesCanvasNeedScaling, + setInitialCanvasImage, setInpaintReplace, - setShouldLockBoundingBox, - toggleShouldLockBoundingBox, - setIsMovingBoundingBox, - setIsTransformingBoundingBox, + setIsDrawing, + setIsMaskEnabled, setIsMouseOverBoundingBox, setIsMoveBoundingBoxKeyHeld, setIsMoveStageKeyHeld, - setStageCoordinates, - addImageToStagingArea, - resetCanvas, - setShouldShowGrid, - setShouldSnapToGrid, - setShouldAutoSave, - setShouldShowIntermediates, + setIsMovingBoundingBox, setIsMovingStage, - nextStagingAreaImage, - prevStagingAreaImage, - commitStagingAreaImage, - discardStagedImages, - resizeAndScaleCanvas, - resizeCanvas, - resetCanvasView, - setCanvasContainerDimensions, - fitBoundingBoxToStage, - setShouldShowStagingImage, + setIsTransformingBoundingBox, + setLayer, + setMaskColor, setMergedCanvas, + setShouldAutoSave, + setShouldDarkenOutsideBoundingBox, + setShouldLockBoundingBox, + setShouldPreserveMaskedArea, + setShouldShowBoundingBox, + setShouldShowBrush, + setShouldShowBrushPreview, + setShouldShowCanvasDebugInfo, + setShouldShowCheckboardTransparency, + setShouldShowGrid, + setShouldShowIntermediates, + setShouldShowStagingImage, setShouldShowStagingOutline, + setShouldSnapToGrid, + setShouldUseInpaintReplace, + setStageCoordinates, + setStageDimensions, + setStageScale, + setTool, + toggleShouldLockBoundingBox, + toggleTool, + undo, } = canvasSlice.actions; export default canvasSlice.reducer; diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 82a459429e..48d51a5f49 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -101,6 +101,7 @@ export interface CanvasState { shouldShowBoundingBox: boolean; shouldShowBrush: boolean; shouldShowBrushPreview: boolean; + shouldShowCanvasDebugInfo: boolean; shouldShowCheckboardTransparency: boolean; shouldShowGrid: boolean; shouldShowIntermediates: boolean; diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss b/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss index e93f05857a..eb0c60ea2b 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss @@ -97,7 +97,7 @@ flex-direction: column; font-size: 0.8rem; padding: 0.25rem; - width: 12rem; + min-width: 12rem; border-radius: 0.25rem; margin: 0.25rem; pointer-events: none; From 5fd43fca13c5ea7c8256d4bd69482a91415f438a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 18:20:40 +1100 Subject: [PATCH 104/220] Fixes paste image to upload --- .../src/common/components/ImageUploader.tsx | 15 ++++--------- .../src/features/canvas/store/canvasSlice.ts | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/frontend/src/common/components/ImageUploader.tsx b/frontend/src/common/components/ImageUploader.tsx index 0cb6660a6b..c6d9418ea3 100644 --- a/frontend/src/common/components/ImageUploader.tsx +++ b/frontend/src/common/components/ImageUploader.tsx @@ -8,8 +8,6 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import { FileRejection, useDropzone } from 'react-dropzone'; import { useToast } from '@chakra-ui/react'; -// import { uploadImage } from 'app/socketio/actions'; -import { UploadImagePayload } from 'app/invokeai'; import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { tabDict } from 'features/tabs/components/InvokeTabs'; @@ -46,8 +44,6 @@ const ImageUploader = (props: ImageUploaderProps) => { const fileAcceptedCallback = useCallback( async (file: File) => { - // setIsHandlingUpload(true); - dispatch(uploadImage({ imageFile: file })); }, [dispatch] @@ -122,12 +118,7 @@ const ImageUploader = (props: ImageUploaderProps) => { return; } - // const payload: UploadImagePayload = { file }; - // if (['img2img', 'inpainting'].includes(activeTabName)) { - // payload.destination = activeTabName as ImageUploadDestination; - // } - - // dispatch(uploadImage(payload)); + dispatch(uploadImage({ imageFile: file })); }; document.addEventListener('paste', pasteImageListener); return () => { @@ -135,7 +126,9 @@ const ImageUploader = (props: ImageUploaderProps) => { }; }, [dispatch, toast, activeTabName]); - const overlaySecondaryText = ['img2img', 'unifiedCanvas'].includes(activeTabName) + const overlaySecondaryText = ['img2img', 'unifiedCanvas'].includes( + activeTabName + ) ? ` to ${tabDict[activeTabName as keyof typeof tabDict].tooltip}` : ``; diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index d68e03e2b1..773a9ed7a6 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -154,6 +154,8 @@ export const canvasSlice = createSlice({ }, setInitialCanvasImage: (state, action: PayloadAction) => { const image = action.payload; + const { stageDimensions } = state; + const newBoundingBoxDimensions = { width: roundDownToMultiple(_.clamp(image.width, 64, 512), 64), height: roundDownToMultiple(_.clamp(image.height, 64, 512), 64), @@ -174,6 +176,7 @@ export const canvasSlice = createSlice({ state.boundingBoxCoordinates = newBoundingBoxCoordinates; state.pastLayerStates.push(state.layerState); + state.layerState = { ...initialLayerState, objects: [ @@ -191,6 +194,25 @@ export const canvasSlice = createSlice({ state.futureLayerStates = []; state.isCanvasInitialized = false; + const newScale = calculateScale( + stageDimensions.width, + stageDimensions.height, + image.width, + image.height, + STAGE_PADDING_PERCENTAGE + ); + + const newCoordinates = calculateCoordinates( + stageDimensions.width, + stageDimensions.height, + 0, + 0, + image.width, + image.height, + newScale + ); + state.stageScale = newScale; + state.stageCoordinates = newCoordinates; state.doesCanvasNeedScaling = true; }, setStageDimensions: (state, action: PayloadAction) => { From 548bcaceb287c93655ef286bc2984e9213e860f4 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 18:58:28 +1100 Subject: [PATCH 105/220] Adds model drop-down to site header --- .../system/components/ModelSelect.tsx | 52 +++++++++++++++++++ .../features/system/components/SiteHeader.tsx | 3 ++ 2 files changed, 55 insertions(+) create mode 100644 frontend/src/features/system/components/ModelSelect.tsx diff --git a/frontend/src/features/system/components/ModelSelect.tsx b/frontend/src/features/system/components/ModelSelect.tsx new file mode 100644 index 0000000000..586bdeefd5 --- /dev/null +++ b/frontend/src/features/system/components/ModelSelect.tsx @@ -0,0 +1,52 @@ +import { Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { requestModelChange } from 'app/socketio/actions'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; +import _ from 'lodash'; +import { ChangeEvent } from 'react'; +import { systemSelector } from '../store/systemSelectors'; + +const selector = createSelector([systemSelector], (system) => { + const { isProcessing, model_list } = system; + const models = _.map(model_list, (model, key) => key); + const activeModel = _.reduce( + model_list, + (acc, model, key) => { + if (model.status === 'active') { + acc = key; + } + + return acc; + }, + '' + ); + + return { models, activeModel, isProcessing }; +}); + +const ModelSelect = () => { + const dispatch = useAppDispatch(); + const { models, activeModel, isProcessing } = useAppSelector(selector); + const handleChangeModel = (e: ChangeEvent) => { + dispatch(requestModelChange(e.target.value)); + }; + + return ( + + + + ); +}; + +export default ModelSelect; diff --git a/frontend/src/features/system/components/SiteHeader.tsx b/frontend/src/features/system/components/SiteHeader.tsx index b93306fd49..863182b593 100644 --- a/frontend/src/features/system/components/SiteHeader.tsx +++ b/frontend/src/features/system/components/SiteHeader.tsx @@ -16,6 +16,7 @@ import HotkeysModal from './HotkeysModal/HotkeysModal'; import SettingsModal from './SettingsModal/SettingsModal'; import StatusIndicator from './StatusIndicator'; import ThemeChanger from './ThemeChanger'; +import ModelSelect from './ModelSelect'; /** * Header, includes color mode toggle, settings button, status message. @@ -33,6 +34,8 @@ const SiteHeader = () => {
+ + Date: Sat, 19 Nov 2022 19:01:35 +1100 Subject: [PATCH 106/220] Adds theme changer popover --- .../system/components/SiteHeader.scss | 11 ----- .../system/components/StatusIndicator.tsx | 3 -- .../system/components/ThemeChanger.tsx | 48 ++++++++++++++----- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/frontend/src/features/system/components/SiteHeader.scss b/frontend/src/features/system/components/SiteHeader.scss index 3c4d267ae5..f9b40912c0 100644 --- a/frontend/src/features/system/components/SiteHeader.scss +++ b/frontend/src/features/system/components/SiteHeader.scss @@ -24,14 +24,3 @@ align-items: center; column-gap: 0.5rem; } - -.theme-changer-dropdown { - .invokeai__select-picker { - background-color: var(--background-color-light) !important; - font-size: 0.9rem; - &:focus { - border: none !important; - box-shadow: none !important; - } - } -} diff --git a/frontend/src/features/system/components/StatusIndicator.tsx b/frontend/src/features/system/components/StatusIndicator.tsx index add43c2fc1..1da6c2a892 100644 --- a/frontend/src/features/system/components/StatusIndicator.tsx +++ b/frontend/src/features/system/components/StatusIndicator.tsx @@ -33,8 +33,6 @@ const StatusIndicator = () => { wasErrorSeen, } = useAppSelector(systemSelector); const dispatch = useAppDispatch(); - // const statusMessageTextColor = - // isConnected && !hasError ? 'green.500' : 'red.500'; let statusStyle; if (isConnected && !hasError) { @@ -84,7 +82,6 @@ const StatusIndicator = () => { cursor={statusIndicatorCursor} onClick={handleClickStatusIndicator} className={`status ${statusStyle}`} - // textColor={statusMessageTextColor} > {statusMessage} diff --git a/frontend/src/features/system/components/ThemeChanger.tsx b/frontend/src/features/system/components/ThemeChanger.tsx index f37b4b57eb..138b310633 100644 --- a/frontend/src/features/system/components/ThemeChanger.tsx +++ b/frontend/src/features/system/components/ThemeChanger.tsx @@ -1,8 +1,10 @@ -import { useColorMode } from '@chakra-ui/react'; -import React, { ChangeEvent } from 'react'; +import { useColorMode, VStack } from '@chakra-ui/react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; -import IAISelect from 'common/components/IAISelect'; import { setCurrentTheme } from 'features/options/store/optionsSlice'; +import IAIPopover from 'common/components/IAIPopover'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaCheck, FaPalette } from 'react-icons/fa'; +import IAIButton from 'common/components/IAIButton'; const THEMES = ['dark', 'light', 'green']; @@ -13,17 +15,39 @@ export default function ThemeChanger() { (state: RootState) => state.options.currentTheme ); - const themeChangeHandler = (e: ChangeEvent) => { - setColorMode(e.target.value); - dispatch(setCurrentTheme(e.target.value)); + const handleChangeTheme = (theme: string) => { + setColorMode(theme); + dispatch(setCurrentTheme(theme)); }; return ( - + } + /> + } + > + + {THEMES.map((theme) => ( + : undefined} + size={'sm'} + onClick={() => handleChangeTheme(theme)} + > + {theme.charAt(0).toUpperCase() + theme.slice(1)} + + ))} + + ); } From 917c576ddb75fa2b0fe3749df061ab02559d57fe Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 19 Nov 2022 22:07:59 +1300 Subject: [PATCH 107/220] Fix missing key on ThemeChanger map --- frontend/src/features/system/components/ThemeChanger.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/system/components/ThemeChanger.tsx b/frontend/src/features/system/components/ThemeChanger.tsx index 138b310633..6e2d9fcab4 100644 --- a/frontend/src/features/system/components/ThemeChanger.tsx +++ b/frontend/src/features/system/components/ThemeChanger.tsx @@ -43,6 +43,7 @@ export default function ThemeChanger() { leftIcon={currentTheme === theme ? : undefined} size={'sm'} onClick={() => handleChangeTheme(theme)} + key={theme} > {theme.charAt(0).toUpperCase() + theme.slice(1)} From e7f670a5b6ab80924ecccce8f412b0b90952c99a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 19 Nov 2022 20:12:26 +1100 Subject: [PATCH 108/220] Fixes stage position changing on zoom --- .../src/features/canvas/components/IAICanvasStatusText.tsx | 4 +++- frontend/src/features/canvas/store/canvasSlice.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index 4fb208b750..de0e1b54fb 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -88,7 +88,9 @@ const IAICanvasStatusText = () => { boxX )}, ${roundToHundreth(boxY)})`}
{`Canvas Dimensions: ${stageWidth}×${stageHeight}`}
-
{`Canvas Position: ${stageX}×${stageY}`}
+
{`Canvas Position: ${roundToHundreth(stageX)}×${roundToHundreth( + stageY + )}`}
{`Cursor Position: (${cursorX}, ${cursorY})`}
)} diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 773a9ed7a6..833d095dc6 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -244,7 +244,7 @@ export const canvasSlice = createSlice({ state.boundingBoxCoordinates = floorCoordinates(action.payload); }, setStageCoordinates: (state, action: PayloadAction) => { - state.stageCoordinates = floorCoordinates(action.payload); + state.stageCoordinates = action.payload; }, setBoundingBoxPreviewFill: (state, action: PayloadAction) => { state.boundingBoxPreviewFill = action.payload; From cde395e02f570d20590142f6194b3a74e2fde3d5 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 19 Nov 2022 22:33:39 +1300 Subject: [PATCH 109/220] Hotkey Cleanup - Viewer is now Z - Canvas Move tool is V - sync with PS - Removed some unused hotkeys --- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 6 +++--- .../features/canvas/hooks/useCanvasHotkeys.ts | 13 ------------ .../components/HotkeysModal/HotkeysModal.tsx | 4 ++-- .../features/tabs/components/InvokeTabs.tsx | 6 +----- .../tabs/components/InvokeWorkarea.tsx | 21 ++----------------- 5 files changed, 8 insertions(+), 42 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 9e0ac65504..7f154faadb 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -59,7 +59,7 @@ const IAICanvasOutpaintingControls = () => { const canvasBaseLayer = getCanvasBaseLayer(); useHotkeys( - ['m'], + ['v'], () => { handleSelectMoveTool(); }, @@ -193,8 +193,8 @@ const IAICanvasOutpaintingControls = () => { } data-selected={tool === 'move' || isStaging} onClick={handleSelectMoveTool} diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index cd7b103653..b9d251057b 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -5,7 +5,6 @@ import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { setShouldShowBoundingBox, setTool, - toggleShouldLockBoundingBox, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import { useRef } from 'react'; @@ -47,18 +46,6 @@ const useInpaintingCanvasHotkeys = () => { const canvasStage = getCanvasStage(); - // Toggle lock bounding box - useHotkeys( - 'shift+w', - () => { - dispatch(toggleShouldLockBoundingBox()); - }, - { - preventDefault: true, - }, - [activeTabName] - ); - useHotkeys( 'shift+h', () => { diff --git a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx index d6097a422f..a9858427f6 100644 --- a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -52,7 +52,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { { title: 'Toggle Viewer', desc: 'Open and close Image Viewer', - hotkey: 'V', + hotkey: 'Z', }, { title: 'Toggle Gallery', @@ -161,7 +161,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { { title: 'Move Tool', desc: 'Allows canvas navigation', - hotkey: 'M', + hotkey: 'V', }, { title: 'Quick Toggle Move', diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index b3d6863b7b..80797f942f 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -94,13 +94,9 @@ export default function InvokeTabs() { dispatch(setActiveTab(4)); }); - useHotkeys('6', () => { - dispatch(setActiveTab(5)); - }); - // Lightbox Hotkey useHotkeys( - 'v', + 'z', () => { dispatch(setIsLightBoxOpen(!isLightBoxOpen)); }, diff --git a/frontend/src/features/tabs/components/InvokeWorkarea.tsx b/frontend/src/features/tabs/components/InvokeWorkarea.tsx index 69e3967d65..1ca3da314a 100644 --- a/frontend/src/features/tabs/components/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/components/InvokeWorkarea.tsx @@ -1,7 +1,6 @@ import { Tooltip } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { ReactNode } from 'react'; -import { useHotkeys } from 'react-hotkeys-hook'; import { VscSplitHorizontal } from 'react-icons/vsc'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import ImageGallery from 'features/gallery/components/ImageGallery'; @@ -34,30 +33,14 @@ type InvokeWorkareaProps = { const InvokeWorkarea = (props: InvokeWorkareaProps) => { const dispatch = useAppDispatch(); const { optionsPanel, children, styleClass } = props; - const { - showDualDisplay, - isLightBoxOpen, - shouldShowDualDisplayButton, - } = useAppSelector(workareaSelector); + const { showDualDisplay, isLightBoxOpen, shouldShowDualDisplayButton } = + useAppSelector(workareaSelector); const handleDualDisplay = () => { dispatch(setShowDualDisplay(!showDualDisplay)); dispatch(setDoesCanvasNeedScaling(true)); }; - // Hotkeys - // Toggle split view - useHotkeys( - 'shift+j', - () => { - handleDualDisplay(); - }, - { - enabled: shouldShowDualDisplayButton, - }, - [showDualDisplay] - ); - return (
Date: Sat, 19 Nov 2022 22:40:30 +1300 Subject: [PATCH 110/220] Fix canvas resizing when both options and gallery are unpinned --- frontend/src/features/tabs/components/InvokeTabs.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index 80797f942f..30cc390cb9 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -72,6 +72,13 @@ export default function InvokeTabs() { const shouldShowOptionsPanel = useAppSelector( (state: RootState) => state.options.shouldShowOptionsPanel ); + const shouldPinGallery = useAppSelector( + (state: RootState) => state.gallery.shouldPinGallery + ); + const shouldPinOptionsPanel = useAppSelector( + (state: RootState) => state.options.shouldPinOptionsPanel + ); + const dispatch = useAppDispatch(); useHotkeys('1', () => { @@ -113,7 +120,8 @@ export default function InvokeTabs() { dispatch(setShouldShowOptionsPanel(true)); dispatch(setShouldShowGallery(true)); } - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); + if (shouldPinGallery || shouldPinOptionsPanel) + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, [shouldShowGallery, shouldShowOptionsPanel] ); From 50a67a7172bf1a189cd1254deea266bf7ab0aae1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 00:04:06 +1100 Subject: [PATCH 111/220] Implements thumbnails for gallery - Thumbnails are saved whenever an image is saved, and when gallery requests images from server - Thumbnails saved at original image aspect ratio with width of 128px as WEBP - If the thumbnail property of an image is unavailable for whatever reason, the image's full size URL is used instead --- backend/invoke_ai_web_server.py | 53 ++++++++++++++++++- frontend/src/app/invokeai.d.ts | 2 + .../store/thunks/mergeAndUploadCanvas.ts | 10 ++-- .../gallery/components/HoverableImage.tsx | 7 +-- .../gallery/store/thunks/uploadImage.ts | 10 ++-- 5 files changed, 62 insertions(+), 20 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 91313f4303..b52aaa0136 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -172,8 +172,11 @@ class InvokeAIWebServer: (width, height) = pil_image.size + thumbnail_path = save_thumbnail(pil_image, file_path) + response = { "url": self.get_url_from_image_path(file_path), + "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": mtime, "width": width, "height": height, @@ -306,6 +309,7 @@ class InvokeAIWebServer: ) paths = [] + for ext in ("*.png", "*.jpg", "*.jpeg"): paths.extend(glob.glob(os.path.join(base_path, ext))) @@ -329,11 +333,15 @@ class InvokeAIWebServer: else: sd_metadata = {} - (width, height) = Image.open(path).size + pil_image = Image.open(path) + (width, height) = pil_image.size + + thumbnail_path = save_thumbnail(pil_image, path) image_array.append( { "url": self.get_url_from_image_path(path), + "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), "metadata": sd_metadata, "width": width, @@ -389,11 +397,15 @@ class InvokeAIWebServer: else: sd_metadata = {} - (width, height) = Image.open(path).size + pil_image = Image.open(path) + (width, height) = pil_image.size + + thumbnail_path = save_thumbnail(pil_image, path) image_array.append( { "url": self.get_url_from_image_path(path), + "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), "metadata": sd_metadata, "width": width, @@ -537,6 +549,8 @@ class InvokeAIWebServer: postprocessing=postprocessing_parameters["type"], ) + thumbnail_path = save_thumbnail(image, path) + self.write_log_message( f'[Postprocessed] "{original_image_path}" > "{path}": {postprocessing_parameters}' ) @@ -549,6 +563,7 @@ class InvokeAIWebServer: "postprocessingResult", { "url": self.get_url_from_image_path(path), + "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), "metadata": metadata, "width": width, @@ -575,8 +590,12 @@ class InvokeAIWebServer: from send2trash import send2trash path = self.get_image_path_from_url(url) + base = os.path.splitext(path)[0] + thumbnail_path = base + ".webp" send2trash(path) + send2trash(thumbnail_path) + socketio.emit( "imageDeleted", {"url": url, "uuid": uuid, "category": category}, @@ -949,6 +968,8 @@ class InvokeAIWebServer: postprocessing=postprocessing, ) + thumbnail_path = save_thumbnail(image, path) + print(f'>> Image generated: "{path}"') self.write_log_message(f'[Generated] "{path}": {command}') @@ -966,6 +987,7 @@ class InvokeAIWebServer: "generationResult", { "url": self.get_url_from_image_path(path), + "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), "metadata": metadata, "width": width, @@ -1457,3 +1479,30 @@ def paste_image_into_bounding_box( bounds = (x, y, x + width, y + height) im.paste(donor_image, bounds) return recipient_image + + +""" +Saves a thumbnail of an image, returning its path. +""" + + +def save_thumbnail( + image: ImageType, + path: str, + size: int = 128, +) -> str: + base = os.path.splitext(path)[0] + thumbnail_path = base + ".webp" + + if os.path.exists(thumbnail_path): + return thumbnail_path + + thumbnail_width = size + thumbnail_height = round(size * (image.height / image.width)) + + image_copy = image.copy() + image_copy.thumbnail(size=(thumbnail_width, thumbnail_height)) + + image_copy.save(thumbnail_path, "WEBP") + + return thumbnail_path diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index e411e147e6..c26f9e4d7f 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -113,6 +113,7 @@ export declare type Metadata = SystemConfig & { export declare type Image = { uuid: string; url: string; + thumbnail: string; mtime: number; metadata?: Metadata; width: number; @@ -184,6 +185,7 @@ export declare type ImageUploadResponse = { mtime: number; width: number; height: number; + thumbnail: string; // bbox: [number, number, number, number]; }; diff --git a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts index f12a8b2548..d06994aee9 100644 --- a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts @@ -69,16 +69,14 @@ export const mergeAndUploadCanvas = body: formData, }); - const { url, mtime, width, height } = - (await response.json()) as InvokeAI.ImageUploadResponse; + const image = (await response.json()) as InvokeAI.ImageUploadResponse; + + const { url, width, height } = image; const newImage: InvokeAI.Image = { uuid: uuidv4(), - url, - mtime, category: shouldSaveToGallery ? 'result' : 'user', - width: width, - height: height, + ...image, }; if (shouldDownload) { diff --git a/frontend/src/features/gallery/components/HoverableImage.tsx b/frontend/src/features/gallery/components/HoverableImage.tsx index 63f5c0b2d7..91fe2f20df 100644 --- a/frontend/src/features/gallery/components/HoverableImage.tsx +++ b/frontend/src/features/gallery/components/HoverableImage.tsx @@ -23,13 +23,10 @@ import { import * as InvokeAI from 'app/invokeai'; import * as ContextMenu from '@radix-ui/react-context-menu'; import { - resetCanvasView, resizeAndScaleCanvas, - setDoesCanvasNeedScaling, setInitialCanvasImage, } from 'features/canvas/store/canvasSlice'; import { hoverableImageSelector } from 'features/gallery/store/gallerySliceSelectors'; -import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; interface HoverableImageProps { image: InvokeAI.Image; @@ -54,7 +51,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { isLightBoxOpen, } = useAppSelector(hoverableImageSelector); const { image, isSelected } = props; - const { url, uuid, metadata } = image; + const { url, thumbnail, uuid, metadata } = image; const [isHovered, setIsHovered] = useState(false); @@ -173,7 +170,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { className="hoverable-image-image" objectFit={galleryImageObjectFit} rounded={'md'} - src={url} + src={thumbnail || url} loading={'lazy'} />
diff --git a/frontend/src/features/gallery/store/thunks/uploadImage.ts b/frontend/src/features/gallery/store/thunks/uploadImage.ts index 4759bb6d09..01595d7da3 100644 --- a/frontend/src/features/gallery/store/thunks/uploadImage.ts +++ b/frontend/src/features/gallery/store/thunks/uploadImage.ts @@ -37,16 +37,12 @@ export const uploadImage = body: formData, }); - const { url, mtime, width, height } = - (await response.json()) as InvokeAI.ImageUploadResponse; - + const image = (await response.json()) as InvokeAI.ImageUploadResponse; + console.log(image) const newImage: InvokeAI.Image = { uuid: uuidv4(), - url, - mtime, category: 'user', - width: width, - height: height, + ...image, }; dispatch(addImage({ image: newImage, category: 'user' })); From d987d0a336725547eb397ca0577d1adf7c62b9e0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 00:21:39 +1100 Subject: [PATCH 112/220] Saves thumbnails to separate thumbnails directory --- backend/invoke_ai_web_server.py | 40 ++++++++++++++++++++------- frontend/src/app/socketio/emitters.ts | 12 ++------ 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index b52aaa0136..9427490c38 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -172,7 +172,9 @@ class InvokeAIWebServer: (width, height) = pil_image.size - thumbnail_path = save_thumbnail(pil_image, file_path) + thumbnail_path = save_thumbnail( + pil_image, os.path.basename(file_path), self.thumbnail_image_path + ) response = { "url": self.get_url_from_image_path(file_path), @@ -248,6 +250,7 @@ class InvokeAIWebServer: self.mask_image_url = "outputs/mask-images/" self.intermediate_url = "outputs/intermediates/" self.temp_image_url = "outputs/temp-images/" + self.thumbnail_image_url = "outputs/thumbnails/" # location for "finished" images self.result_path = args.outdir # temporary path for intermediates @@ -257,6 +260,8 @@ class InvokeAIWebServer: self.mask_image_path = os.path.join(self.result_path, "mask-images/") # path for temp images e.g. gallery generations which are not committed self.temp_image_path = os.path.join(self.result_path, "temp-images/") + # path for thumbnail images + self.thumbnail_image_path = os.path.join(self.result_path, "thumbnails/") # txt log self.log_path = os.path.join(self.result_path, "invoke_log.txt") # make all output paths @@ -268,6 +273,7 @@ class InvokeAIWebServer: self.init_image_path, self.mask_image_path, self.temp_image_path, + self.thumbnail_image_path, ] ] @@ -336,7 +342,9 @@ class InvokeAIWebServer: pil_image = Image.open(path) (width, height) = pil_image.size - thumbnail_path = save_thumbnail(pil_image, path) + thumbnail_path = save_thumbnail( + pil_image, os.path.basename(path), self.thumbnail_image_path + ) image_array.append( { @@ -400,7 +408,9 @@ class InvokeAIWebServer: pil_image = Image.open(path) (width, height) = pil_image.size - thumbnail_path = save_thumbnail(pil_image, path) + thumbnail_path = save_thumbnail( + pil_image, os.path.basename(path), self.thumbnail_image_path + ) image_array.append( { @@ -549,7 +559,9 @@ class InvokeAIWebServer: postprocessing=postprocessing_parameters["type"], ) - thumbnail_path = save_thumbnail(image, path) + thumbnail_path = save_thumbnail( + image, os.path.basename(path), self.thumbnail_image_path + ) self.write_log_message( f'[Postprocessed] "{original_image_path}" > "{path}": {postprocessing_parameters}' @@ -584,14 +596,13 @@ class InvokeAIWebServer: # TODO: I think this needs a safety mechanism. @socketio.on("deleteImage") - def handle_delete_image(url, uuid, category): + def handle_delete_image(url, thumbnail, uuid, category): try: print(f'>> Delete requested "{url}"') from send2trash import send2trash path = self.get_image_path_from_url(url) - base = os.path.splitext(path)[0] - thumbnail_path = base + ".webp" + thumbnail_path = self.get_image_path_from_url(thumbnail) send2trash(path) send2trash(thumbnail_path) @@ -968,7 +979,9 @@ class InvokeAIWebServer: postprocessing=postprocessing, ) - thumbnail_path = save_thumbnail(image, path) + thumbnail_path = save_thumbnail( + image, os.path.basename(path), self.thumbnail_image_path + ) print(f'>> Image generated: "{path}"') self.write_log_message(f'[Generated] "{path}": {command}') @@ -1281,6 +1294,10 @@ class InvokeAIWebServer: return os.path.abspath( os.path.join(self.temp_image_path, os.path.basename(url)) ) + elif "thumbnails" in url: + return os.path.abspath( + os.path.join(self.thumbnail_image_path, os.path.basename(url)) + ) else: return os.path.abspath( os.path.join(self.result_path, os.path.basename(url)) @@ -1303,6 +1320,8 @@ class InvokeAIWebServer: return os.path.join(self.intermediate_url, os.path.basename(path)) elif "temp-images" in path: return os.path.join(self.temp_image_url, os.path.basename(path)) + elif "thumbnails" in path: + return os.path.join(self.thumbnail_image_url, os.path.basename(path)) else: return os.path.join(self.result_url, os.path.basename(path)) except Exception as e: @@ -1488,11 +1507,12 @@ Saves a thumbnail of an image, returning its path. def save_thumbnail( image: ImageType, + filename: str, path: str, size: int = 128, ) -> str: - base = os.path.splitext(path)[0] - thumbnail_path = base + ".webp" + base_filename = os.path.splitext(filename)[0] + thumbnail_path = os.path.join(path, base_filename + ".webp") if os.path.exists(thumbnail_path): return thumbnail_path diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 4a7cdfaeb7..4302bd8e67 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -15,7 +15,6 @@ import { addLogEntry, generationRequested, modelChangeRequested, - setCurrentStatus, setIsProcessing, } from 'features/system/store/systemSlice'; import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; @@ -148,9 +147,9 @@ const makeSocketIOEmitters = ( ); }, emitDeleteImage: (imageToDelete: InvokeAI.Image) => { - const { url, uuid, category } = imageToDelete; + const { url, uuid, category, thumbnail } = imageToDelete; dispatch(removeImage(imageToDelete)); - socketio.emit('deleteImage', url, uuid, category); + socketio.emit('deleteImage', url, thumbnail, uuid, category); }, emitRequestImages: (category: GalleryCategory) => { const gallery: GalleryState = getState().gallery; @@ -165,13 +164,6 @@ const makeSocketIOEmitters = ( emitCancelProcessing: () => { socketio.emit('cancel'); }, - // emitUploadImage: (payload: InvokeAI.UploadImagePayload) => { - // const { file, destination } = payload; - // socketio.emit('uploadImage', file, file.name, destination); - // }, - // emitUploadMaskImage: (file: File) => { - // socketio.emit('uploadMaskImage', file, file.name); - // }, emitRequestSystemConfig: () => { socketio.emit('requestSystemConfig'); }, From 1071a127772b273e79b330b9778cc25a03b86ee9 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 00:27:05 +1100 Subject: [PATCH 113/220] Thumbnail size = 256px --- backend/invoke_ai_web_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 9427490c38..ea9d6a6806 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -1509,7 +1509,7 @@ def save_thumbnail( image: ImageType, filename: str, path: str, - size: int = 128, + size: int = 256, ) -> str: base_filename = os.path.splitext(filename)[0] thumbnail_path = os.path.join(path, base_filename + ".webp") From d55b1e169cb618a1a6457a68ba7c218c8de1a389 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 20 Nov 2022 03:19:15 +1300 Subject: [PATCH 114/220] Fix Lightbox Issues --- frontend/package.json | 2 +- .../lightbox/components/ReactPanZoom.tsx | 188 ++++++++---------- frontend/yarn.lock | 10 +- 3 files changed, 90 insertions(+), 110 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 5b4ca2c587..1e08961a3e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -33,11 +33,11 @@ "react-dropzone": "^14.2.2", "react-hotkeys-hook": "4.0.2", "react-icons": "^4.4.0", - "react-image-pan-zoom-rotate": "^1.6.0", "react-konva": "^18.2.3", "react-konva-utils": "^0.3.0", "react-redux": "^8.0.2", "react-transition-group": "^4.4.5", + "react-zoom-pan-pinch": "^2.1.3", "redux-deep-persist": "^1.0.6", "redux-persist": "^6.0.0", "socket.io": "^4.5.2", diff --git a/frontend/src/features/lightbox/components/ReactPanZoom.tsx b/frontend/src/features/lightbox/components/ReactPanZoom.tsx index 0c84d8a0e8..bd66fdf555 100644 --- a/frontend/src/features/lightbox/components/ReactPanZoom.tsx +++ b/frontend/src/features/lightbox/components/ReactPanZoom.tsx @@ -8,7 +8,7 @@ import { BiZoomOut, } from 'react-icons/bi'; import { MdFlip } from 'react-icons/md'; -import { PanViewer } from 'react-image-pan-zoom-rotate'; +import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch'; type ReactPanZoomProps = { image: string; @@ -23,29 +23,9 @@ export default function ReactPanZoom({ ref, styleClass, }: ReactPanZoomProps) { - const [dx, setDx] = React.useState(0); - const [dy, setDy] = React.useState(0); - const [zoom, setZoom] = React.useState(1); const [rotation, setRotation] = React.useState(0); const [flip, setFlip] = React.useState(false); - const resetAll = () => { - setDx(0); - setDy(0); - setZoom(1); - setRotation(0); - setFlip(false); - }; - const zoomIn = () => { - setZoom(zoom + 0.2); - }; - - const zoomOut = () => { - if (zoom >= 0.5) { - setZoom(zoom - 0.2); - } - }; - const rotateLeft = () => { if (rotation === -3) { setRotation(0); @@ -66,90 +46,90 @@ export default function ReactPanZoom({ setFlip(!flip); }; - const onPan = (dx: number, dy: number) => { - setDx(dx); - setDy(dy); - }; - return ( -
-
- } - aria-label="Zoom In" - tooltip="Zoom In" - onClick={zoomIn} - fontSize={20} - /> - - } - aria-label="Zoom Out" - tooltip="Zoom Out" - onClick={zoomOut} - fontSize={20} - /> - - } - aria-label="Rotate Left" - tooltip="Rotate Left" - onClick={rotateLeft} - fontSize={20} - /> - - } - aria-label="Rotate Right" - tooltip="Rotate Right" - onClick={rotateRight} - fontSize={20} - /> - - } - aria-label="Flip Image" - tooltip="Flip Image" - onClick={flipImage} - fontSize={20} - /> - - } - aria-label="Reset" - tooltip="Reset" - onClick={resetAll} - fontSize={20} - /> -
- + - {alt} - -
+ {({ zoomIn, zoomOut, resetTransform }) => ( + <> +
+ } + aria-label="Zoom In" + tooltip="Zoom In" + onClick={() => zoomIn()} + fontSize={20} + /> + + } + aria-label="Zoom Out" + tooltip="Zoom Out" + onClick={() => zoomOut()} + fontSize={20} + /> + + } + aria-label="Rotate Left" + tooltip="Rotate Left" + onClick={rotateLeft} + fontSize={20} + /> + + } + aria-label="Rotate Right" + tooltip="Rotate Right" + onClick={rotateRight} + fontSize={20} + /> + + } + aria-label="Flip Image" + tooltip="Flip Image" + onClick={flipImage} + fontSize={20} + /> + + } + aria-label="Reset" + tooltip="Reset" + onClick={() => { + resetTransform(); + setRotation(0); + setFlip(false); + }} + fontSize={20} + /> +
+ + +
+ {alt} +
+
+ + )} + + ); } diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 8477d67ffb..8609bf3ccf 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3405,11 +3405,6 @@ react-icons@^4.4.0: resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.6.0.tgz#f83eda179af5d02c047449a20b702c858653d397" integrity sha512-rR/L9m9340yO8yv1QT1QurxWQvWpbNHqVX0fzMln2HEb9TEIrQRGsqiNFQfiv9/JEUbyHmHPlNTB2LWm2Ttz0g== -react-image-pan-zoom-rotate@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/react-image-pan-zoom-rotate/-/react-image-pan-zoom-rotate-1.6.0.tgz#4b79dd5a160e61e1ec8d5481541e37ade4c28c6f" - integrity sha512-YpuMjhA9TlcyuC1vcKeTGnECAial0uEsjXUHcCk3GTeznwtnfpgLfMDhejCrilUud/hxueXrr9SJiQiycWjYVA== - react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -3500,6 +3495,11 @@ react-transition-group@^4.4.5: loose-envify "^1.4.0" prop-types "^15.6.2" +react-zoom-pan-pinch@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/react-zoom-pan-pinch/-/react-zoom-pan-pinch-2.1.3.tgz#3b84594200343136c0d4397c33fec38dc0ee06ad" + integrity sha512-a5AChOWhjo0RmxsNZXGQIlNh3e3nLU6m4V6M+6dlbPNk5d+MtMxgKWyA5zpR06Lp3OZkZVF9nR8JeWSvKwck9g== + react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" From b50a1eb63fddb427a935936bc29abc07bfd5263e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 01:22:28 +1100 Subject: [PATCH 115/220] Disables canvas image saving functions when processing --- .../store/thunks/mergeAndUploadCanvas.ts | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts index d06994aee9..e857c412e4 100644 --- a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts @@ -6,7 +6,12 @@ import layerToDataURL from '../../util/layerToDataURL'; import downloadFile from '../../util/downloadFile'; import copyImage from '../../util/copyImage'; import { getCanvasBaseLayer } from '../../util/konvaInstanceProvider'; -import { addToast } from 'features/system/store/systemSlice'; +import { + addToast, + setCurrentStatus, + setIsCancelable, + setIsProcessing, +} from 'features/system/store/systemSlice'; import { addImage } from 'features/gallery/store/gallerySlice'; import { setMergedCanvas } from '../canvasSlice'; @@ -37,20 +42,33 @@ export const mergeAndUploadCanvas = shouldSetAsInitialImage, } = config; + dispatch(setCurrentStatus('Exporting Image')); + dispatch(setIsProcessing(true)); + dispatch(setIsCancelable(false)); + const state = getState() as RootState; const stageScale = state.canvas.stageScale; const canvasBaseLayer = getCanvasBaseLayer(); - if (!canvasBaseLayer) return; + if (!canvasBaseLayer) { + dispatch(setIsProcessing(false)); + dispatch(setIsCancelable(true)); + + return; + } const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( canvasBaseLayer, stageScale ); - if (!dataURL) return; + if (!dataURL) { + dispatch(setIsProcessing(false)); + dispatch(setIsCancelable(true)); + return; + } const formData = new FormData(); @@ -133,4 +151,8 @@ export const mergeAndUploadCanvas = }) ); } + + dispatch(setIsProcessing(false)); + dispatch(setCurrentStatus('Connected')); + dispatch(setIsCancelable(true)); }; From 9950790f4cd6c70b88672b96a58d2ff2d02db777 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 20 Nov 2022 03:57:58 +1300 Subject: [PATCH 116/220] Fix index error on going past last image in Gallery --- frontend/src/features/gallery/store/gallerySlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/gallery/store/gallerySlice.ts b/frontend/src/features/gallery/store/gallerySlice.ts index 4501a8c543..c3632bedd8 100644 --- a/frontend/src/features/gallery/store/gallerySlice.ts +++ b/frontend/src/features/gallery/store/gallerySlice.ts @@ -174,7 +174,7 @@ export const gallerySlice = createSlice({ const currentImageIndex = tempImages.findIndex( (i) => i.uuid === currentImage.uuid ); - if (_.inRange(currentImageIndex, 0, tempImages.length)) { + if (_.inRange(currentImageIndex, 0, tempImages.length - 1)) { const newCurrentImage = tempImages[currentImageIndex + 1]; state.currentImage = newCurrentImage; state.currentImageUuid = newCurrentImage.uuid; From 0c3ae232af4477d0358d0f28c3c410bc43ba5c87 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 20 Nov 2022 04:11:57 +1300 Subject: [PATCH 117/220] WIP - Lightbox Fixes Still need to fix the images not being centered on load when the image res changes --- .../lightbox/components/Lightbox.scss | 2 - .../lightbox/components/ReactPanZoom.tsx | 146 ++++++++---------- 2 files changed, 68 insertions(+), 80 deletions(-) diff --git a/frontend/src/features/lightbox/components/Lightbox.scss b/frontend/src/features/lightbox/components/Lightbox.scss index f746828729..634d50fd39 100644 --- a/frontend/src/features/lightbox/components/Lightbox.scss +++ b/frontend/src/features/lightbox/components/Lightbox.scss @@ -46,11 +46,9 @@ .lightbox-preview-wrapper { overflow: hidden; - background-color: red; background-color: var(--background-color-secondary); display: grid; grid-template-columns: auto max-content; - place-items: center; width: 100vw; height: 100vh; diff --git a/frontend/src/features/lightbox/components/ReactPanZoom.tsx b/frontend/src/features/lightbox/components/ReactPanZoom.tsx index bd66fdf555..9369087fbb 100644 --- a/frontend/src/features/lightbox/components/ReactPanZoom.tsx +++ b/frontend/src/features/lightbox/components/ReactPanZoom.tsx @@ -47,89 +47,79 @@ export default function ReactPanZoom({ }; return ( - <> - - {({ zoomIn, zoomOut, resetTransform }) => ( - <> -
- } - aria-label="Zoom In" - tooltip="Zoom In" - onClick={() => zoomIn()} - fontSize={20} - /> + + {({ zoomIn, zoomOut, resetTransform, centerView }) => ( + <> +
+ } + aria-label="Zoom In" + tooltip="Zoom In" + onClick={() => zoomIn()} + fontSize={20} + /> - } - aria-label="Zoom Out" - tooltip="Zoom Out" - onClick={() => zoomOut()} - fontSize={20} - /> + } + aria-label="Zoom Out" + tooltip="Zoom Out" + onClick={() => zoomOut()} + fontSize={20} + /> - } - aria-label="Rotate Left" - tooltip="Rotate Left" - onClick={rotateLeft} - fontSize={20} - /> + } + aria-label="Rotate Left" + tooltip="Rotate Left" + onClick={rotateLeft} + fontSize={20} + /> - } - aria-label="Rotate Right" - tooltip="Rotate Right" - onClick={rotateRight} - fontSize={20} - /> + } + aria-label="Rotate Right" + tooltip="Rotate Right" + onClick={rotateRight} + fontSize={20} + /> - } - aria-label="Flip Image" - tooltip="Flip Image" - onClick={flipImage} - fontSize={20} - /> + } + aria-label="Flip Image" + tooltip="Flip Image" + onClick={flipImage} + fontSize={20} + /> - } - aria-label="Reset" - tooltip="Reset" - onClick={() => { - resetTransform(); - setRotation(0); - setFlip(false); - }} - fontSize={20} - /> -
+ } + aria-label="Reset" + tooltip="Reset" + onClick={() => { + resetTransform(); + setRotation(0); + setFlip(false); + }} + fontSize={20} + /> +
- -
- {alt} -
-
- - )} -
- + + {alt} + + + )} + ); } From 7f999e9dfc50ea093f7d8ea3229b70279ea14166 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 07:28:25 +1100 Subject: [PATCH 118/220] Fixes another similar index error, simplifies logic --- frontend/src/features/gallery/store/gallerySlice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/gallery/store/gallerySlice.ts b/frontend/src/features/gallery/store/gallerySlice.ts index c3632bedd8..901a58e124 100644 --- a/frontend/src/features/gallery/store/gallerySlice.ts +++ b/frontend/src/features/gallery/store/gallerySlice.ts @@ -174,7 +174,7 @@ export const gallerySlice = createSlice({ const currentImageIndex = tempImages.findIndex( (i) => i.uuid === currentImage.uuid ); - if (_.inRange(currentImageIndex, 0, tempImages.length - 1)) { + if (currentImageIndex < tempImages.length - 1) { const newCurrentImage = tempImages[currentImageIndex + 1]; state.currentImage = newCurrentImage; state.currentImageUuid = newCurrentImage.uuid; @@ -191,7 +191,7 @@ export const gallerySlice = createSlice({ const currentImageIndex = tempImages.findIndex( (i) => i.uuid === currentImage.uuid ); - if (_.inRange(currentImageIndex, 1, tempImages.length + 1)) { + if (currentImageIndex > 0) { const newCurrentImage = tempImages[currentImageIndex - 1]; state.currentImage = newCurrentImage; state.currentImageUuid = newCurrentImage.uuid; From 83d8e69219d78a4b2d666962c2e5ac0bb0934722 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 09:35:22 +1100 Subject: [PATCH 119/220] Reworks canvas toolbar --- frontend/src/common/components/IAISelect.tsx | 103 +++++----- frontend/src/common/components/IAISlider.tsx | 12 +- .../IAICanvasBrushButtonPopover.tsx | 4 +- .../IAICanvasEraserButtonPopover.tsx | 4 +- .../IAICanvasMaskButtonPopover.tsx | 128 ------------ .../IAICanvasToolbar/IAICanvasMaskOptions.tsx | 153 ++++++++++++++ .../IAICanvasSettingsButtonPopover.tsx | 2 - .../IAICanvasToolChooserOptions.tsx | 191 ++++++++++++++++++ .../IAICanvasToolbar/IAICanvasToolbar.tsx | 45 ++--- .../src/features/canvas/store/canvasTypes.ts | 11 +- .../components/CurrentImageButtons.tsx | 2 +- 11 files changed, 438 insertions(+), 217 deletions(-) delete mode 100644 frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx create mode 100644 frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx create mode 100644 frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx diff --git a/frontend/src/common/components/IAISelect.tsx b/frontend/src/common/components/IAISelect.tsx index 138ba2da30..f4f74f5c83 100644 --- a/frontend/src/common/components/IAISelect.tsx +++ b/frontend/src/common/components/IAISelect.tsx @@ -1,9 +1,18 @@ -import { FormControl, FormLabel, Select, SelectProps } from '@chakra-ui/react'; +import { + FormControl, + FormLabel, + Select, + SelectProps, + Tooltip, + TooltipProps, +} from '@chakra-ui/react'; import { MouseEvent } from 'react'; type IAISelectProps = SelectProps & { label?: string; styleClass?: string; + tooltip?: string; + tooltipProps?: Omit; validValues: | Array | Array<{ key: string; value: string | number }>; @@ -16,57 +25,61 @@ const IAISelect = (props: IAISelectProps) => { label, isDisabled, validValues, + tooltip, + tooltipProps, size = 'sm', fontSize = 'md', styleClass, ...rest } = props; return ( - ) => { - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - e.nativeEvent.stopPropagation(); - e.nativeEvent.cancelBubble = true; - }} - > - {label && ( - - {label} - - )} - - - + {label && ( + + {label} + + )} + + + + ); }; diff --git a/frontend/src/common/components/IAISlider.tsx b/frontend/src/common/components/IAISlider.tsx index 6d9a0cb8e1..7dbbdea68f 100644 --- a/frontend/src/common/components/IAISlider.tsx +++ b/frontend/src/common/components/IAISlider.tsx @@ -23,7 +23,7 @@ import { Tooltip, TooltipProps, } from '@chakra-ui/react'; -import React, { FocusEvent, useEffect, useState } from 'react'; +import React, { FocusEvent, useEffect, useMemo, useState } from 'react'; import { BiReset } from 'react-icons/bi'; import IAIIconButton, { IAIIconButtonProps } from './IAIIconButton'; import _ from 'lodash'; @@ -101,6 +101,11 @@ export default function IAISlider(props: IAIFullSliderProps) { const [localInputValue, setLocalInputValue] = useState(String(value)); + const numberInputMax = useMemo( + () => (sliderNumberInputProps?.max ? sliderNumberInputProps.max : max), + [max, sliderNumberInputProps?.max] + ); + useEffect(() => { if (String(value) !== localInputValue && localInputValue !== '') { setLocalInputValue(String(value)); @@ -108,10 +113,11 @@ export default function IAISlider(props: IAIFullSliderProps) { }, [value, localInputValue, setLocalInputValue]); const handleInputBlur = (e: FocusEvent) => { + console.log(numberInputMax); const clamped = _.clamp( isInteger ? Math.floor(Number(e.target.value)) : Number(e.target.value), min, - max + numberInputMax ); setLocalInputValue(String(clamped)); onChange(clamped); @@ -202,7 +208,7 @@ export default function IAISlider(props: IAIFullSliderProps) { {withInput && ( { trigger="hover" triggerComponent={ } data-selected={tool === 'brush' && !isStaging} onClick={handleSelectBrushTool} diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx index f4afab8ca8..643c2afb26 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx @@ -77,8 +77,8 @@ const IAICanvasEraserButtonPopover = () => { trigger="hover" triggerComponent={ } data-selected={tool === 'eraser' && !isStaging} isDisabled={isStaging} diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx deleted file mode 100644 index b862908bc1..0000000000 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskButtonPopover.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import { Flex } from '@chakra-ui/react'; -import { createSelector } from '@reduxjs/toolkit'; -import { - clearMask, - setIsMaskEnabled, - setLayer, - setMaskColor, - setShouldPreserveMaskedArea, -} from 'features/canvas/store/canvasSlice'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import _ from 'lodash'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { FaMask } from 'react-icons/fa'; -import IAIPopover from 'common/components/IAIPopover'; -import IAICheckbox from 'common/components/IAICheckbox'; -import IAIColorPicker from 'common/components/IAIColorPicker'; -import IAIButton from 'common/components/IAIButton'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import { useHotkeys } from 'react-hotkeys-hook'; - -export const selector = createSelector( - [canvasSelector], - (canvas) => { - const { maskColor, layer, isMaskEnabled, shouldPreserveMaskedArea } = - canvas; - - return { - layer, - maskColor, - isMaskEnabled, - shouldPreserveMaskedArea, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); -const IAICanvasMaskButtonPopover = () => { - const dispatch = useAppDispatch(); - const { layer, maskColor, isMaskEnabled, shouldPreserveMaskedArea } = - useAppSelector(selector); - - useHotkeys( - ['q'], - () => { - handleToggleMaskLayer(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [layer] - ); - - useHotkeys( - ['shift+c'], - () => { - handleClearMask(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [] - ); - - useHotkeys( - ['h'], - () => { - handleToggleEnableMask(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [isMaskEnabled] - ); - - const handleToggleMaskLayer = () => { - dispatch(setLayer(layer === 'mask' ? 'base' : 'mask')); - }; - - const handleClearMask = () => dispatch(clearMask()); - - const handleToggleEnableMask = () => - dispatch(setIsMaskEnabled(!isMaskEnabled)); - - return ( - } - /> - } - > - - - Clear Mask - - - - dispatch(setShouldPreserveMaskedArea(e.target.checked)) - } - /> - dispatch(setMaskColor(newColor))} - /> - - - ); -}; - -export default IAICanvasMaskButtonPopover; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx new file mode 100644 index 0000000000..b0090b4fb1 --- /dev/null +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -0,0 +1,153 @@ +import { Box, ButtonGroup, Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { + clearMask, + setIsMaskEnabled, + setLayer, + setMaskColor, + setShouldPreserveMaskedArea, +} from 'features/canvas/store/canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaMask } from 'react-icons/fa'; +import IAIPopover from 'common/components/IAIPopover'; +import IAICheckbox from 'common/components/IAICheckbox'; +import IAIColorPicker from 'common/components/IAIColorPicker'; +import IAIButton from 'common/components/IAIButton'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { useHotkeys } from 'react-hotkeys-hook'; +import IAISelect from 'common/components/IAISelect'; +import { + CanvasLayer, + LAYER_NAMES_DICT, +} from 'features/canvas/store/canvasTypes'; +import { ChangeEvent } from 'react'; +import { + rgbaColorToRgbString, + rgbaColorToString, +} from 'features/canvas/util/colorToString'; + +export const selector = createSelector( + [canvasSelector], + (canvas) => { + const { maskColor, layer, isMaskEnabled, shouldPreserveMaskedArea } = + canvas; + + return { + layer, + maskColor, + maskColorString: rgbaColorToString(maskColor), + isMaskEnabled, + shouldPreserveMaskedArea, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); +const IAICanvasMaskOptions = () => { + const dispatch = useAppDispatch(); + const { layer, maskColor, isMaskEnabled, shouldPreserveMaskedArea } = + useAppSelector(selector); + + useHotkeys( + ['q'], + () => { + handleToggleMaskLayer(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [layer] + ); + + useHotkeys( + ['shift+c'], + () => { + handleClearMask(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + + useHotkeys( + ['h'], + () => { + handleToggleEnableMask(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [isMaskEnabled] + ); + + const handleToggleMaskLayer = () => { + dispatch(setLayer(layer === 'mask' ? 'base' : 'mask')); + }; + + const handleClearMask = () => dispatch(clearMask()); + + const handleToggleEnableMask = () => + dispatch(setIsMaskEnabled(!isMaskEnabled)); + + return ( + <> + ) => + dispatch(setLayer(e.target.value as CanvasLayer)) + } + /> + + } + /> + + } + > + + + + dispatch(setShouldPreserveMaskedArea(e.target.checked)) + } + /> + dispatch(setMaskColor(newColor))} + /> + + Clear Mask + + + + + ); +}; + +export default IAICanvasMaskOptions; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index 0c6624ec29..cf78acfe4e 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -60,8 +60,6 @@ const IAICanvasSettingsButtonPopover = () => { trigger="hover" triggerComponent={ } diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx new file mode 100644 index 0000000000..df1f35e51b --- /dev/null +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx @@ -0,0 +1,191 @@ +import { ButtonGroup, Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { + resetCanvas, + resetCanvasView, + resizeAndScaleCanvas, + setBrushColor, + setBrushSize, + setTool, +} from 'features/canvas/store/canvasSlice'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import _ from 'lodash'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { + FaArrowsAlt, + FaEraser, + FaPaintBrush, + FaSlidersH, +} from 'react-icons/fa'; +import { + canvasSelector, + isStagingSelector, +} from 'features/canvas/store/canvasSelectors'; +import { systemSelector } from 'features/system/store/systemSelectors'; +import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; +import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; +import { useHotkeys } from 'react-hotkeys-hook'; +import IAIPopover from 'common/components/IAIPopover'; +import IAISlider from 'common/components/IAISlider'; +import IAIColorPicker from 'common/components/IAIColorPicker'; +import { rgbaColorToString } from 'features/canvas/util/colorToString'; + +export const selector = createSelector( + [canvasSelector, isStagingSelector, systemSelector], + (canvas, isStaging, system) => { + const { isProcessing } = system; + const { tool, brushColor, brushSize } = canvas; + + return { + tool, + isStaging, + isProcessing, + brushColor, + brushColorString: rgbaColorToString(brushColor), + brushSize, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const IAICanvasToolChooserOptions = () => { + const dispatch = useAppDispatch(); + const { tool, brushColor, brushSize, brushColorString, isStaging } = + useAppSelector(selector); + + useHotkeys( + ['v'], + () => { + handleSelectMoveTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + + useHotkeys( + ['b'], + () => { + handleSelectBrushTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + + useHotkeys( + ['e'], + () => { + handleSelectEraserTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [tool] + ); + + useHotkeys( + ['['], + () => { + dispatch(setBrushSize(Math.max(brushSize - 5, 5))); + }, + { + enabled: () => true, + preventDefault: true, + }, + [brushSize] + ); + + useHotkeys( + [']'], + () => { + dispatch(setBrushSize(Math.min(brushSize + 5, 500))); + }, + { + enabled: () => true, + preventDefault: true, + }, + [brushSize] + ); + + const handleSelectBrushTool = () => dispatch(setTool('brush')); + const handleSelectEraserTool = () => dispatch(setTool('eraser')); + const handleSelectMoveTool = () => dispatch(setTool('move')); + + return ( + + } + data-selected={tool === 'brush' && !isStaging} + onClick={handleSelectBrushTool} + isDisabled={isStaging} + /> + } + data-selected={tool === 'eraser' && !isStaging} + isDisabled={isStaging} + onClick={() => dispatch(setTool('eraser'))} + /> + } + data-selected={tool === 'move' || isStaging} + onClick={handleSelectMoveTool} + /> + + } + /> + } + > + + + dispatch(setBrushSize(newSize))} + sliderNumberInputProps={{ max: 500 }} + inputReadOnly={false} + /> + + dispatch(setBrushColor(newColor))} + /> + + + + ); +}; + +export default IAICanvasToolChooserOptions; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 7f154faadb..19e88263ac 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -16,6 +16,7 @@ import { FaDownload, FaLayerGroup, FaSave, + FaSlidersH, FaTrash, FaUpload, } from 'react-icons/fa'; @@ -24,7 +25,7 @@ import IAICanvasRedoButton from './IAICanvasRedoButton'; import IAICanvasSettingsButtonPopover from './IAICanvasSettingsButtonPopover'; import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; -import IAICanvasMaskButtonPopover from './IAICanvasMaskButtonPopover'; +import IAICanvasMaskOptions from './IAICanvasMaskOptions'; import { mergeAndUploadCanvas } from 'features/canvas/store/thunks/mergeAndUploadCanvas'; import { canvasSelector, @@ -33,6 +34,7 @@ import { import { useHotkeys } from 'react-hotkeys-hook'; import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; import { systemSelector } from 'features/system/store/systemSelectors'; +import IAICanvasToolChooserOptions from './IAICanvasToolChooserOptions'; export const selector = createSelector( [canvasSelector, isStagingSelector, systemSelector], @@ -58,18 +60,6 @@ const IAICanvasOutpaintingControls = () => { const { tool, isStaging, isProcessing } = useAppSelector(selector); const canvasBaseLayer = getCanvasBaseLayer(); - useHotkeys( - ['v'], - () => { - handleSelectMoveTool(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [] - ); - useHotkeys( ['r'], () => { @@ -130,8 +120,6 @@ const IAICanvasOutpaintingControls = () => { [canvasBaseLayer, isProcessing] ); - const handleSelectMoveTool = () => dispatch(setTool('move')); - const handleResetCanvasView = () => { const canvasBaseLayer = getCanvasBaseLayer(); if (!canvasBaseLayer) return; @@ -188,18 +176,9 @@ const IAICanvasOutpaintingControls = () => { return (
- - - - - } - data-selected={tool === 'move' || isStaging} - onClick={handleSelectMoveTool} - /> - + + + { - - - + { onClick={handleResetCanvasView} /> } onClick={handleResetCanvas} + style={{ backgroundColor: 'var(--btn-delete-image)' }} /> + + +
); }; diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 48d51a5f49..47ef56414c 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -1,8 +1,15 @@ import * as InvokeAI from 'app/invokeai'; -import { IRect, Vector2d } from 'konva/lib/types'; +import { Vector2d } from 'konva/lib/types'; import { RgbaColor } from 'react-colorful'; -export type CanvasLayer = 'base' | 'mask'; +export const LAYER_NAMES_DICT = [ + { key: 'Base', value: 'base' }, + { key: 'Mask', value: 'mask' }, +]; + +export const LAYER_NAMES = ['base', 'mask'] as const; + +export type CanvasLayer = typeof LAYER_NAMES[number]; export type CanvasDrawingTool = 'brush' | 'eraser'; diff --git a/frontend/src/features/gallery/components/CurrentImageButtons.tsx b/frontend/src/features/gallery/components/CurrentImageButtons.tsx index de861536ed..a7c6c410ed 100644 --- a/frontend/src/features/gallery/components/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/components/CurrentImageButtons.tsx @@ -488,7 +488,7 @@ const CurrentImageButtons = () => { tooltip="Delete Image" aria-label="Delete Image" isDisabled={!currentImage || !isConnected || isProcessing} - className="delete-image-btn" + style={{ backgroundColor: 'var(--btn-delete-image)' }} />
From 0f6856b71951775fc4f6dde4de7f29856070277c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 10:34:47 +1100 Subject: [PATCH 120/220] Fixes canvas toolbar upload button --- .../src/common/components/ImageUploader.tsx | 4 + frontend/src/common/hooks/useImageUploader.ts | 14 +++ .../IAICanvasBrushButtonPopover.tsx | 115 ------------------ .../IAICanvasEraserButtonPopover.tsx | 101 --------------- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 22 ++-- 5 files changed, 25 insertions(+), 231 deletions(-) create mode 100644 frontend/src/common/hooks/useImageUploader.ts delete mode 100644 frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx delete mode 100644 frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx diff --git a/frontend/src/common/components/ImageUploader.tsx b/frontend/src/common/components/ImageUploader.tsx index c6d9418ea3..04cce48b5d 100644 --- a/frontend/src/common/components/ImageUploader.tsx +++ b/frontend/src/common/components/ImageUploader.tsx @@ -13,6 +13,7 @@ import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { tabDict } from 'features/tabs/components/InvokeTabs'; import ImageUploadOverlay from './ImageUploadOverlay'; import { uploadImage } from 'features/gallery/store/thunks/uploadImage'; +import useImageUploader from 'common/hooks/useImageUploader'; type ImageUploaderProps = { children: ReactNode; @@ -24,6 +25,7 @@ const ImageUploader = (props: ImageUploaderProps) => { const activeTabName = useAppSelector(activeTabNameSelector); const toast = useToast({}); const [isHandlingUpload, setIsHandlingUpload] = useState(false); + const { setOpenUploader } = useImageUploader(); const fileRejectionCallback = useCallback( (rejection: FileRejection) => { @@ -77,6 +79,8 @@ const ImageUploader = (props: ImageUploaderProps) => { maxFiles: 1, }); + setOpenUploader(open); + useEffect(() => { const pasteImageListener = (e: ClipboardEvent) => { const dataTransferItemList = e.clipboardData?.items; diff --git a/frontend/src/common/hooks/useImageUploader.ts b/frontend/src/common/hooks/useImageUploader.ts new file mode 100644 index 0000000000..10c81c4dfd --- /dev/null +++ b/frontend/src/common/hooks/useImageUploader.ts @@ -0,0 +1,14 @@ +let openFunction: () => void; + +const useImageUploader = () => { + return { + setOpenUploader: (open?: () => void) => { + if (open) { + openFunction = open; + } + }, + openUploader: openFunction, + }; +}; + +export default useImageUploader; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx deleted file mode 100644 index 7f2332a4dc..0000000000 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasBrushButtonPopover.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { - setBrushColor, - setBrushSize, - setTool, -} from 'features/canvas/store/canvasSlice'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import _ from 'lodash'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { FaPaintBrush } from 'react-icons/fa'; -import IAIPopover from 'common/components/IAIPopover'; -import IAIColorPicker from 'common/components/IAIColorPicker'; -import IAISlider from 'common/components/IAISlider'; -import { Flex } from '@chakra-ui/react'; -import { - canvasSelector, - isStagingSelector, -} from 'features/canvas/store/canvasSelectors'; -import { useHotkeys } from 'react-hotkeys-hook'; - -export const selector = createSelector( - [canvasSelector, isStagingSelector], - (canvas, isStaging) => { - const { brushColor, brushSize, tool } = canvas; - - return { - tool, - brushColor, - brushSize, - isStaging, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -const IAICanvasBrushButtonPopover = () => { - const dispatch = useAppDispatch(); - const { tool, brushColor, brushSize, isStaging } = useAppSelector(selector); - - useHotkeys( - ['b'], - () => { - handleSelectBrushTool(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [] - ); - - useHotkeys( - ['['], - () => { - dispatch(setBrushSize(Math.max(brushSize - 5, 5))); - }, - { - enabled: () => true, - preventDefault: true, - }, - [brushSize] - ); - - useHotkeys( - [']'], - () => { - dispatch(setBrushSize(Math.min(brushSize + 5, 500))); - }, - { - enabled: () => true, - preventDefault: true, - }, - [brushSize] - ); - - const handleSelectBrushTool = () => dispatch(setTool('brush')); - - return ( - } - data-selected={tool === 'brush' && !isStaging} - onClick={handleSelectBrushTool} - isDisabled={isStaging} - /> - } - > - - - dispatch(setBrushSize(newSize))} - /> - - dispatch(setBrushColor(newColor))} - /> - - - ); -}; - -export default IAICanvasBrushButtonPopover; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx deleted file mode 100644 index 643c2afb26..0000000000 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasEraserButtonPopover.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { setBrushSize, setTool } from 'features/canvas/store/canvasSlice'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import _ from 'lodash'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { FaEraser } from 'react-icons/fa'; -import IAIPopover from 'common/components/IAIPopover'; -import IAISlider from 'common/components/IAISlider'; -import { Flex } from '@chakra-ui/react'; -import { useHotkeys } from 'react-hotkeys-hook'; -import { - canvasSelector, - isStagingSelector, -} from 'features/canvas/store/canvasSelectors'; - -export const selector = createSelector( - [canvasSelector, isStagingSelector], - (canvas, isStaging) => { - const { brushSize, tool } = canvas; - - return { - tool, - brushSize, - isStaging, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); -const IAICanvasEraserButtonPopover = () => { - const dispatch = useAppDispatch(); - const { tool, brushSize, isStaging } = useAppSelector(selector); - - const handleSelectEraserTool = () => dispatch(setTool('eraser')); - - useHotkeys( - ['e'], - () => { - handleSelectEraserTool(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [tool] - ); - - useHotkeys( - ['['], - () => { - dispatch(setBrushSize(Math.max(brushSize - 5, 5))); - }, - { - enabled: () => true, - preventDefault: true, - }, - [brushSize] - ); - - useHotkeys( - [']'], - () => { - dispatch(setBrushSize(Math.min(brushSize + 5, 500))); - }, - { - enabled: () => true, - preventDefault: true, - }, - [brushSize] - ); - - return ( - } - data-selected={tool === 'eraser' && !isStaging} - isDisabled={isStaging} - onClick={() => dispatch(setTool('eraser'))} - /> - } - > - - dispatch(setBrushSize(newSize))} - /> - - - ); -}; - -export default IAICanvasEraserButtonPopover; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 19e88263ac..7b94a1e7b0 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -4,47 +4,36 @@ import { resetCanvas, resetCanvasView, resizeAndScaleCanvas, - setTool, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; import { - FaArrowsAlt, FaCopy, FaCrosshairs, FaDownload, FaLayerGroup, FaSave, - FaSlidersH, FaTrash, FaUpload, } from 'react-icons/fa'; import IAICanvasUndoButton from './IAICanvasUndoButton'; import IAICanvasRedoButton from './IAICanvasRedoButton'; import IAICanvasSettingsButtonPopover from './IAICanvasSettingsButtonPopover'; -import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; -import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; import IAICanvasMaskOptions from './IAICanvasMaskOptions'; import { mergeAndUploadCanvas } from 'features/canvas/store/thunks/mergeAndUploadCanvas'; -import { - canvasSelector, - isStagingSelector, -} from 'features/canvas/store/canvasSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; import { systemSelector } from 'features/system/store/systemSelectors'; import IAICanvasToolChooserOptions from './IAICanvasToolChooserOptions'; +import useImageUploader from 'common/hooks/useImageUploader'; export const selector = createSelector( - [canvasSelector, isStagingSelector, systemSelector], - (canvas, isStaging, system) => { + [systemSelector], + (system) => { const { isProcessing } = system; - const { tool } = canvas; return { - tool, - isStaging, isProcessing, }; }, @@ -57,9 +46,11 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { tool, isStaging, isProcessing } = useAppSelector(selector); + const { isProcessing } = useAppSelector(selector); const canvasBaseLayer = getCanvasBaseLayer(); + const { openUploader } = useImageUploader(); + useHotkeys( ['r'], () => { @@ -219,6 +210,7 @@ const IAICanvasOutpaintingControls = () => { aria-label="Upload" tooltip="Upload" icon={} + onClick={openUploader} /> Date: Sun, 20 Nov 2022 10:35:39 +1100 Subject: [PATCH 121/220] Cleans up IAICanvasStatusText --- .../canvas/components/IAICanvasStatusText.tsx | 79 +++++++++---------- .../UnifiedCanvas/CanvasWorkarea.scss | 2 +- 2 files changed, 37 insertions(+), 44 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index de0e1b54fb..9ad9539463 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -21,27 +21,31 @@ const selector = createSelector( layer, } = canvas; - const position = cursorPosition + const { cursorX, cursorY } = cursorPosition ? { cursorX: cursorPosition.x, cursorY: cursorPosition.y } : { cursorX: -1, cursorY: -1 }; return { - stageWidth, - stageHeight, - stageX, - stageY, - boxWidth, - boxHeight, - boxX, - boxY, - stageScale, + activeLayerColor: + layer === 'mask' ? 'var(--status-working-color)' : 'inherit', + activeLayerString: layer.charAt(0).toUpperCase() + layer.slice(1), + boundingBoxColor: + boxWidth < 512 || boxHeight < 512 + ? 'var(--status-working-color)' + : 'inherit', + boundingBoxCoordinatesString: `(${roundToHundreth( + boxX + )}, ${roundToHundreth(boxY)})`, + boundingBoxDimensionsString: `${boxWidth}×${boxHeight}`, + canvasCoordinatesString: `${roundToHundreth(stageX)}×${roundToHundreth( + stageY + )}`, + canvasDimensionsString: `${stageWidth}×${stageHeight}`, + canvasScaleString: Math.round(stageScale * 100), + cursorCoordinatesString: `(${cursorX}, ${cursorY})`, shouldShowCanvasDebugInfo, - layerFormatted: layer.charAt(0).toUpperCase() + layer.slice(1), - layer, - ...position, }; }, - { memoizeOptions: { resultEqualityCheck: _.isEqual, @@ -50,48 +54,37 @@ const selector = createSelector( ); const IAICanvasStatusText = () => { const { - stageWidth, - stageHeight, - stageX, - stageY, - boxWidth, - boxHeight, - boxX, - boxY, - cursorX, - cursorY, - stageScale, + activeLayerColor, + activeLayerString, + boundingBoxColor, + boundingBoxCoordinatesString, + boundingBoxDimensionsString, + canvasCoordinatesString, + canvasDimensionsString, + canvasScaleString, + cursorCoordinatesString, shouldShowCanvasDebugInfo, - layer, - layerFormatted, } = useAppSelector(selector); return (
{`Active Layer: ${layerFormatted}`}
-
{`Canvas Scale: ${Math.round(stageScale * 100)}%`}
+ >{`Active Layer: ${activeLayerString}`}
+
{`Canvas Scale: ${canvasScaleString}%`}
{`Bounding Box: ${boxWidth}×${boxHeight}`}
+ >{`Bounding Box: ${boundingBoxDimensionsString}`}
{shouldShowCanvasDebugInfo && ( <> -
{`Bounding Box Position: (${roundToHundreth( - boxX - )}, ${roundToHundreth(boxY)})`}
-
{`Canvas Dimensions: ${stageWidth}×${stageHeight}`}
-
{`Canvas Position: ${roundToHundreth(stageX)}×${roundToHundreth( - stageY - )}`}
-
{`Cursor Position: (${cursorX}, ${cursorY})`}
+
{`Bounding Box Position: ${boundingBoxCoordinatesString}`}
+
{`Canvas Dimensions: ${canvasDimensionsString}`}
+
{`Canvas Position: ${canvasCoordinatesString}`}
+
{`Cursor Position: ${cursorCoordinatesString}`}
)}
diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss b/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss index eb0c60ea2b..dbeced2f02 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss +++ b/frontend/src/features/tabs/components/UnifiedCanvas/CanvasWorkarea.scss @@ -92,7 +92,7 @@ top: 0; left: 0; background-color: var(--background-color); - opacity: 0.5; + opacity: 0.65; display: flex; flex-direction: column; font-size: 0.8rem; From b908f2b4bc3426cb15897407f0c4c848ce342b98 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 11:08:23 +1100 Subject: [PATCH 122/220] Improves metadata handling, fixes #1450 - Removes model list from metadata - Adds generation's specific model to metadata - Displays full metadata in JSON viewer --- backend/invoke_ai_web_server.py | 38 +++++++++++-------- frontend/src/app/invokeai.d.ts | 10 +++-- .../ImageMetadataViewer.tsx | 8 +++- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index ea9d6a6806..a523f53c0f 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -282,6 +282,7 @@ class InvokeAIWebServer: def handle_request_capabilities(): print(f">> System config requested") config = self.get_system_config() + config["model_list"] = self.generate.model_cache.list_models() socketio.emit("systemConfig", config) @socketio.on("requestModelChange") @@ -335,9 +336,10 @@ class InvokeAIWebServer: for path in image_paths: if os.path.splitext(path)[1] == ".png": metadata = retrieve_metadata(path) - sd_metadata = metadata["sd-metadata"] + # sd_metadata = metadata["sd-metadata"] else: - sd_metadata = {} + # sd_metadata = {} + metadata = {} pil_image = Image.open(path) (width, height) = pil_image.size @@ -351,7 +353,8 @@ class InvokeAIWebServer: "url": self.get_url_from_image_path(path), "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), - "metadata": sd_metadata, + "metadata": metadata, + # "metadata": sd_metadata, "width": width, "height": height, "category": category, @@ -401,9 +404,10 @@ class InvokeAIWebServer: for path in image_paths: if os.path.splitext(path)[1] == ".png": metadata = retrieve_metadata(path) - sd_metadata = metadata["sd-metadata"] + # sd_metadata = metadata["sd-metadata"] else: - sd_metadata = {} + # sd_metadata = {} + metadata = {} pil_image = Image.open(path) (width, height) = pil_image.size @@ -417,7 +421,8 @@ class InvokeAIWebServer: "url": self.get_url_from_image_path(path), "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), - "metadata": sd_metadata, + # "metadata": sd_metadata, + "metadata": metadata, "width": width, "height": height, "category": category, @@ -492,12 +497,10 @@ class InvokeAIWebServer: image = Image.open(original_image_path) - seed = ( - original_image["metadata"]["seed"] - if "metadata" in original_image - and "seed" in original_image["metadata"] - else "unknown_seed" - ) + try: + seed = original_image["metadata"]["image"]["seed"] + except (NameError, AttributeError) as e: + seed = "unknown_seed" if postprocessing_parameters["type"] == "esrgan": progress.set_current_status("Upscaling (ESRGAN)") @@ -620,14 +623,19 @@ class InvokeAIWebServer: # App Functions def get_system_config(self): - model_list = self.generate.model_cache.list_models() + model_list: dict = self.generate.model_cache.list_models() + active_model_name = None + + for model_name, model_dict in model_list.items(): + if model_dict["status"] == "active": + active_model_name = model_name + return { "model": "stable diffusion", - "model_id": args.model, + "model_weights": active_model_name, "model_hash": self.generate.model_hash, "app_id": APP_ID, "app_version": APP_VERSION, - "model_list": model_list, } def generate_images( diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index c26f9e4d7f..02e0b365dc 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -105,7 +105,7 @@ export declare type PostProcessedImageMetadata = | FacetoolMetadata; // Metadata includes the system config and image metadata. -export declare type Metadata = SystemConfig & { +export declare type Metadata = SystemGenerationMetadata & { image: GeneratedImageMetadata | PostProcessedImageMetadata; }; @@ -143,12 +143,16 @@ export declare type SystemStatus = { hasError: boolean; }; -export declare type SystemConfig = { +export declare type SystemGenerationMetadata = { model: string; - model_id: string; + model_weights?: string; + model_id?: string; model_hash: string; app_id: string; app_version: string; +}; + +export declare type SystemConfig = SystemGenerationMetadata & { model_list: ModelList; }; diff --git a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx index 4b744865e4..695a9da7f2 100644 --- a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx +++ b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx @@ -136,7 +136,7 @@ const ImageMetadataViewer = memo( scale, } = metadata; - const metadataJSON = JSON.stringify(metadata, null, 2); + const metadataJSON = JSON.stringify(image.metadata, null, 2); return (
@@ -153,6 +153,12 @@ const ImageMetadataViewer = memo( {Object.keys(metadata).length > 0 ? ( <> {type && } + {image.metadata?.model_weights && ( + + )} {['esrgan', 'gfpgan'].includes(type) && ( )} From 9d34213b4ccee16e0dc296148c2f831a6479ca83 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 11:16:41 +1100 Subject: [PATCH 123/220] Gracefully handles corrupted images; fixes #1486 - App does not crash if corrupted image loaded - Error is displayed in the UI console and CLI output if an image cannot be loaded --- backend/invoke_ai_web_server.py | 97 +++++++++++++++++---------------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index a523f53c0f..65a2c60fed 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -334,32 +334,34 @@ class InvokeAIWebServer: image_array = [] for path in image_paths: - if os.path.splitext(path)[1] == ".png": - metadata = retrieve_metadata(path) - # sd_metadata = metadata["sd-metadata"] - else: - # sd_metadata = {} - metadata = {} + try: + if os.path.splitext(path)[1] == ".png": + metadata = retrieve_metadata(path) + else: + metadata = {} - pil_image = Image.open(path) - (width, height) = pil_image.size + pil_image = Image.open(path) + (width, height) = pil_image.size - thumbnail_path = save_thumbnail( - pil_image, os.path.basename(path), self.thumbnail_image_path - ) + thumbnail_path = save_thumbnail( + pil_image, os.path.basename(path), self.thumbnail_image_path + ) - image_array.append( - { - "url": self.get_url_from_image_path(path), - "thumbnail": self.get_url_from_image_path(thumbnail_path), - "mtime": os.path.getmtime(path), - "metadata": metadata, - # "metadata": sd_metadata, - "width": width, - "height": height, - "category": category, - } - ) + image_array.append( + { + "url": self.get_url_from_image_path(path), + "thumbnail": self.get_url_from_image_path( + thumbnail_path + ), + "mtime": os.path.getmtime(path), + "metadata": metadata, + "width": width, + "height": height, + "category": category, + } + ) + except: + socketio.emit("error", {"message": f"Unable to load {path}"}) socketio.emit( "galleryImages", @@ -402,32 +404,35 @@ class InvokeAIWebServer: image_array = [] for path in image_paths: - if os.path.splitext(path)[1] == ".png": - metadata = retrieve_metadata(path) - # sd_metadata = metadata["sd-metadata"] - else: - # sd_metadata = {} - metadata = {} + try: + if os.path.splitext(path)[1] == ".png": + metadata = retrieve_metadata(path) + else: + metadata = {} - pil_image = Image.open(path) - (width, height) = pil_image.size + pil_image = Image.open(path) + (width, height) = pil_image.size - thumbnail_path = save_thumbnail( - pil_image, os.path.basename(path), self.thumbnail_image_path - ) + thumbnail_path = save_thumbnail( + pil_image, os.path.basename(path), self.thumbnail_image_path + ) - image_array.append( - { - "url": self.get_url_from_image_path(path), - "thumbnail": self.get_url_from_image_path(thumbnail_path), - "mtime": os.path.getmtime(path), - # "metadata": sd_metadata, - "metadata": metadata, - "width": width, - "height": height, - "category": category, - } - ) + image_array.append( + { + "url": self.get_url_from_image_path(path), + "thumbnail": self.get_url_from_image_path( + thumbnail_path + ), + "mtime": os.path.getmtime(path), + "metadata": metadata, + "width": width, + "height": height, + "category": category, + } + ) + except: + print(f'>> Unable to load {path}') + socketio.emit("error", {"message": f"Unable to load {path}"}) socketio.emit( "galleryImages", From d4376ed2407eed36065d40721e0203f04d448482 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 11:26:40 +1100 Subject: [PATCH 124/220] Adds hotkey to reset canvas interaction state If the canvas' interaction state (e.g. isMovingBoundingBox, isDrawing, etc) get stuck somehow, user can press Escape to reset the state. --- .../src/features/canvas/hooks/useCanvasHotkeys.ts | 12 ++++++++++++ frontend/src/features/canvas/store/canvasSlice.ts | 11 +++++++++++ .../src/features/gallery/components/ImageGallery.tsx | 6 ++++-- .../features/tabs/components/InvokeOptionsPanel.tsx | 6 ++++-- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts index b9d251057b..0215eab1a8 100644 --- a/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts +++ b/frontend/src/features/canvas/hooks/useCanvasHotkeys.ts @@ -3,6 +3,7 @@ import _ from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { + resetCanvasInteractionState, setShouldShowBoundingBox, setTool, } from 'features/canvas/store/canvasSlice'; @@ -46,6 +47,17 @@ const useInpaintingCanvasHotkeys = () => { const canvasStage = getCanvasStage(); + useHotkeys( + 'esc', + () => { + dispatch(resetCanvasInteractionState()); + }, + { + enabled: () => true, + preventDefault: true, + } + ); + useHotkeys( 'shift+h', () => { diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 833d095dc6..1a640d147b 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -675,6 +675,16 @@ export const canvasSlice = createSlice({ state.layerState.objects = [action.payload]; }, + resetCanvasInteractionState: (state) => { + state.cursorPosition = null; + state.isDrawing = false; + state.isMouseOverBoundingBox = false; + state.isMoveBoundingBoxKeyHeld = false; + state.isMoveStageKeyHeld = false; + state.isMovingBoundingBox = false; + state.isMovingStage = false; + state.isTransformingBoundingBox = false; + }, }, }); @@ -690,6 +700,7 @@ export const { prevStagingAreaImage, redo, resetCanvas, + resetCanvasInteractionState, resetCanvasView, resizeAndScaleCanvas, resizeCanvas, diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 25608b1901..2e51025529 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -192,9 +192,11 @@ export default function ImageGallery() { useHotkeys( 'esc', () => { - if (shouldPinGallery) return; dispatch(setShouldShowGallery(false)); - dispatch(setDoesCanvasNeedScaling(true)); + }, + { + enabled: () => !shouldPinGallery, + preventDefault: true, }, [shouldPinGallery] ); diff --git a/frontend/src/features/tabs/components/InvokeOptionsPanel.tsx b/frontend/src/features/tabs/components/InvokeOptionsPanel.tsx index 92cd0a55d8..4473a7f4c7 100644 --- a/frontend/src/features/tabs/components/InvokeOptionsPanel.tsx +++ b/frontend/src/features/tabs/components/InvokeOptionsPanel.tsx @@ -72,9 +72,11 @@ const InvokeOptionsPanel = (props: Props) => { useHotkeys( 'esc', () => { - if (shouldPinOptionsPanel) return; dispatch(setShouldShowOptionsPanel(false)); - dispatch(setDoesCanvasNeedScaling(true)); + }, + { + enabled: () => !shouldPinOptionsPanel, + preventDefault: true, }, [shouldPinOptionsPanel] ); From 76e7e82f5e839aab3858b147f2c800323ebfc7a8 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 11:26:53 +1100 Subject: [PATCH 125/220] Removes stray console.log() --- frontend/src/common/components/IAISlider.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/common/components/IAISlider.tsx b/frontend/src/common/components/IAISlider.tsx index 7dbbdea68f..375cd55a0a 100644 --- a/frontend/src/common/components/IAISlider.tsx +++ b/frontend/src/common/components/IAISlider.tsx @@ -113,7 +113,6 @@ export default function IAISlider(props: IAIFullSliderProps) { }, [value, localInputValue, setLocalInputValue]); const handleInputBlur = (e: FocusEvent) => { - console.log(numberInputMax); const clamped = _.clamp( isInteger ? Math.floor(Number(e.target.value)) : Number(e.target.value), min, From b6dd5b664c710310988716bec291b29a8917967d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 13:00:03 +1100 Subject: [PATCH 126/220] Fixes bug causing gallery to close on context menu open --- .../common/hooks/useClickOutsideWatcher.ts | 44 ++++++++++++------- .../gallery/components/HoverableImage.tsx | 15 ++++--- .../gallery/components/ImageGallery.tsx | 27 +++++++++--- .../tabs/components/InvokeOptionsPanel.tsx | 27 +++++++----- .../features/tabs/components/InvokeTabs.tsx | 2 - 5 files changed, 76 insertions(+), 39 deletions(-) diff --git a/frontend/src/common/hooks/useClickOutsideWatcher.ts b/frontend/src/common/hooks/useClickOutsideWatcher.ts index 88a5a23585..14252927fe 100644 --- a/frontend/src/common/hooks/useClickOutsideWatcher.ts +++ b/frontend/src/common/hooks/useClickOutsideWatcher.ts @@ -1,25 +1,37 @@ -import { RefObject, useEffect } from 'react'; +import { RefObject, useEffect, useRef } from 'react'; +import { Rect } from 'react-konva'; -const useClickOutsideWatcher = ( - ref: RefObject, - callback: () => void, - req = true -) => { +const watchers: { + ref: RefObject; + enable: boolean; + callback: () => void; +}[] = []; + +const useClickOutsideWatcher = () => { useEffect(() => { function handleClickOutside(e: MouseEvent) { - if (ref.current && !ref.current.contains(e.target as Node)) { - callback(); - } - } - if (req) { - document.addEventListener('mousedown', handleClickOutside); + watchers.forEach(({ ref, enable, callback }) => { + if (enable && ref.current && !ref.current.contains(e.target as Node)) { + console.log('callback'); + callback(); + } + }); } + document.addEventListener('mousedown', handleClickOutside); return () => { - if (req) { - document.removeEventListener('mousedown', handleClickOutside); - } + document.removeEventListener('mousedown', handleClickOutside); }; - }, [ref, req, callback]); + }, []); + + return { + addWatcher: (watcher: { + ref: RefObject; + callback: () => void; + enable: boolean; + }) => { + watchers.push(watcher); + }, + }; }; export default useClickOutsideWatcher; diff --git a/frontend/src/features/gallery/components/HoverableImage.tsx b/frontend/src/features/gallery/components/HoverableImage.tsx index 91fe2f20df..a93965ace0 100644 --- a/frontend/src/features/gallery/components/HoverableImage.tsx +++ b/frontend/src/features/gallery/components/HoverableImage.tsx @@ -7,7 +7,10 @@ import { useToast, } from '@chakra-ui/react'; import { useAppDispatch, useAppSelector } from 'app/store'; -import { setCurrentImage } from 'features/gallery/store/gallerySlice'; +import { + setCurrentImage, + setShouldHoldGalleryOpen, +} from 'features/gallery/store/gallerySlice'; import { FaCheck, FaTrashAlt } from 'react-icons/fa'; import DeleteImageModal from './DeleteImageModal'; import { memo, useState } from 'react'; @@ -153,10 +156,9 @@ const HoverableImage = memo((props: HoverableImageProps) => { return ( { - // dispatch(setShouldHoldGalleryOpen(open)); - // dispatch(setShouldShowGallery(true)); - // }} + onOpenChange={(open: boolean) => { + dispatch(setShouldHoldGalleryOpen(open)); + }} > { { + e.detail.originalEvent.preventDefault(); + }} > { + const handleCloseGallery = useCallback(() => { dispatch(setShouldShowGallery(false)); + dispatch(setShouldHoldGalleryOpen(false)); dispatch( setGalleryScrollPosition( galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0 ) ); - dispatch(setShouldHoldGalleryOpen(false)); - }; + }, [dispatch]); const handleClickLoadMore = () => { dispatch(requestImages(currentCategory)); @@ -144,6 +144,7 @@ export default function ImageGallery() { }; const setCloseGalleryTimer = () => { + if (shouldHoldGalleryOpen) return; timeoutIdRef.current = window.setTimeout(() => handleCloseGallery(), 500); }; @@ -273,12 +274,25 @@ export default function ImageGallery() { setShouldShowButtons(galleryWidth >= 280); }, [galleryWidth]); - useClickOutsideWatcher(galleryRef, handleCloseGallery, !shouldPinGallery); + useEffect(() => { + function handleClickOutside(e: MouseEvent) { + if ( + galleryRef.current && + !galleryRef.current.contains(e.target as Node) + ) { + handleCloseGallery(); + } + } + document.addEventListener('mousedown', handleClickOutside); + return () => { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [handleCloseGallery]); return ( { ); dispatch(setShouldShowOptionsPanel(false)); dispatch(setShouldHoldOptionsPanelOpen(false)); - // dispatch(setDoesCanvasNeedScaling(true)); }, [dispatch, shouldPinOptionsPanel]); - useClickOutsideWatcher( - optionsPanelRef, - handleCloseOptionsPanel, - !shouldPinOptionsPanel - ); - const setCloseOptionsPanelTimer = () => { timeoutIdRef.current = window.setTimeout( () => handleCloseOptionsPanel(), @@ -126,6 +118,21 @@ const InvokeOptionsPanel = (props: Props) => { dispatch(setDoesCanvasNeedScaling(true)); }; + useEffect(() => { + function handleClickOutside(e: MouseEvent) { + if ( + optionsPanelRef.current && + !optionsPanelRef.current.contains(e.target as Node) + ) { + handleCloseOptionsPanel(); + } + } + document.addEventListener('mousedown', handleClickOutside); + return () => { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [handleCloseOptionsPanel]); + return ( {
) => { + onMouseLeave={(e: React.MouseEvent) => { if (e.target !== optionsPanelContainerRef.current) { cancelCloseOptionsPanelTimer(); } else { diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index 30cc390cb9..3dcfe12710 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -6,9 +6,7 @@ import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import NodesWIP from 'common/components/WorkInProgress/NodesWIP'; import { PostProcessingWIP } from 'common/components/WorkInProgress/PostProcessingWIP'; import ImageToImageIcon from 'common/icons/ImageToImageIcon'; -import InpaintIcon from 'common/icons/InpaintIcon'; import NodesIcon from 'common/icons/NodesIcon'; -import OutpaintIcon from 'common/icons/OutpaintIcon'; import PostprocessingIcon from 'common/icons/PostprocessingIcon'; import TextToImageIcon from 'common/icons/TextToImageIcon'; import { From f08c78a043e37e19ee1a9e25cdf5bbf60d99d924 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 13:45:29 +1100 Subject: [PATCH 127/220] Minor bugfixes - When doing long-running canvas image exporting actions, display indeterminate progress bar - Fix staging area image outline not displaying after committing/discarding results --- frontend/src/features/canvas/store/canvasSlice.ts | 2 ++ .../features/canvas/store/thunks/mergeAndUploadCanvas.ts | 4 ++-- frontend/src/features/system/store/systemSlice.ts | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 1a640d147b..56925db57f 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -331,6 +331,7 @@ export const canvasSlice = createSlice({ state.layerState.stagingArea = { ...initialLayerState.stagingArea, }; + state.shouldShowStagingOutline = true; }, addLine: (state, action: PayloadAction) => { const { tool, layer, brushColor, brushSize } = state; @@ -618,6 +619,7 @@ export const canvasSlice = createSlice({ }; state.futureLayerStates = []; + state.shouldShowStagingOutline = true; }, fitBoundingBoxToStage: (state) => { const { diff --git a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts index e857c412e4..99f457b260 100644 --- a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts @@ -11,6 +11,7 @@ import { setCurrentStatus, setIsCancelable, setIsProcessing, + setProcessingIndeterminateTask, } from 'features/system/store/systemSlice'; import { addImage } from 'features/gallery/store/gallerySlice'; import { setMergedCanvas } from '../canvasSlice'; @@ -42,8 +43,7 @@ export const mergeAndUploadCanvas = shouldSetAsInitialImage, } = config; - dispatch(setCurrentStatus('Exporting Image')); - dispatch(setIsProcessing(true)); + dispatch(setProcessingIndeterminateTask('Exporting Image')); dispatch(setIsCancelable(false)); const state = getState() as RootState; diff --git a/frontend/src/features/system/store/systemSlice.ts b/frontend/src/features/system/store/systemSlice.ts index 76a6e6d7b3..bdcd267c2f 100644 --- a/frontend/src/features/system/store/systemSlice.ts +++ b/frontend/src/features/system/store/systemSlice.ts @@ -214,6 +214,11 @@ export const systemSlice = createSlice({ clearToastQueue: (state) => { state.toastQueue = []; }, + setProcessingIndeterminateTask: (state, action: PayloadAction) => { + state.isProcessing = true; + state.currentStatus = action.payload; + state.currentStatusHasSteps = false; + }, }, }); @@ -241,6 +246,7 @@ export const { generationRequested, addToast, clearToastQueue, + setProcessingIndeterminateTask, } = systemSlice.actions; export default systemSlice.reducer; From 6c33d1356d1745ae8cf445a3f23c25c56bdf00ad Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 13:52:22 +1100 Subject: [PATCH 128/220] Removes unused imports --- .../components/IAICanvasStagingAreaToolbar.tsx | 13 ++----------- .../IAICanvasToolChooserOptions.tsx | 5 ----- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx index 937b4e807d..a547f8b4ab 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx @@ -1,18 +1,9 @@ -import { - background, - ButtonGroup, - ChakraProvider, - Flex, -} from '@chakra-ui/react'; -import { CacheProvider } from '@emotion/react'; +import { ButtonGroup, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIButton from 'common/components/IAIButton'; import IAIIconButton from 'common/components/IAIIconButton'; -import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; -import { emotionCache } from 'main'; -import { useCallback, useState } from 'react'; +import { useCallback } from 'react'; import { FaArrowLeft, FaArrowRight, diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx index df1f35e51b..0e566f4a7b 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx @@ -1,9 +1,6 @@ import { ButtonGroup, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { - resetCanvas, - resetCanvasView, - resizeAndScaleCanvas, setBrushColor, setBrushSize, setTool, @@ -22,8 +19,6 @@ import { isStagingSelector, } from 'features/canvas/store/canvasSelectors'; import { systemSelector } from 'features/system/store/systemSelectors'; -import IAICanvasBrushButtonPopover from './IAICanvasBrushButtonPopover'; -import IAICanvasEraserButtonPopover from './IAICanvasEraserButtonPopover'; import { useHotkeys } from 'react-hotkeys-hook'; import IAIPopover from 'common/components/IAIPopover'; import IAISlider from 'common/components/IAISlider'; From c7c6940e1af706acfc65dc40f6803404a7fbb2c0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 13:55:06 +1100 Subject: [PATCH 129/220] Fixes repo root .gitignore ignoring frontend things --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index b274423c95..669b165eba 100644 --- a/.gitignore +++ b/.gitignore @@ -194,10 +194,6 @@ checkpoints # Let the frontend manage its own gitignore !frontend/* -frontend/apt-get -frontend/dist -frontend/sudo -frontend/update # Scratch folder .scratch/ From b81231823e5990c6ce0806f3722c0d86ce45cd9f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 13:55:19 +1100 Subject: [PATCH 130/220] Builds fresh bundle --- frontend/dist/assets/index.07a20ff8.css | 1 + frontend/dist/assets/index.978b75a1.css | 1 - frontend/dist/assets/index.a8ba2a6c.js | 501 ------------------- frontend/dist/assets/index.c26f71e8.js | 593 ---------------------- frontend/dist/assets/index.c60403ea.js | 623 ++++++++++++++++++++++++ frontend/dist/index.html | 30 +- 6 files changed, 626 insertions(+), 1123 deletions(-) create mode 100644 frontend/dist/assets/index.07a20ff8.css delete mode 100644 frontend/dist/assets/index.978b75a1.css delete mode 100644 frontend/dist/assets/index.a8ba2a6c.js delete mode 100644 frontend/dist/assets/index.c26f71e8.js create mode 100644 frontend/dist/assets/index.c60403ea.js diff --git a/frontend/dist/assets/index.07a20ff8.css b/frontend/dist/assets/index.07a20ff8.css new file mode 100644 index 0000000000..fe254c1328 --- /dev/null +++ b/frontend/dist/assets/index.07a20ff8.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.978b75a1.css b/frontend/dist/assets/index.978b75a1.css deleted file mode 100644 index cbe58f696c..0000000000 --- a/frontend/dist/assets/index.978b75a1.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(238, 107, 107);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.theme-changer-dropdown .invokeai__select-picker{background-color:var(--background-color-light)!important;font-size:.9rem}.theme-changer-dropdown .invokeai__select-picker:focus{border:none!important;box-shadow:none!important}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{background-color:var(--img2img-img-bg-color);border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:red;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;border:1px solid var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.5;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.a8ba2a6c.js b/frontend/dist/assets/index.a8ba2a6c.js deleted file mode 100644 index 73db287b6e..0000000000 --- a/frontend/dist/assets/index.a8ba2a6c.js +++ /dev/null @@ -1,501 +0,0 @@ -function Rj(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var tu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sv=Symbol.for("react.element"),Oj=Symbol.for("react.portal"),Nj=Symbol.for("react.fragment"),Dj=Symbol.for("react.strict_mode"),zj=Symbol.for("react.profiler"),Fj=Symbol.for("react.provider"),Bj=Symbol.for("react.context"),$j=Symbol.for("react.forward_ref"),Hj=Symbol.for("react.suspense"),Wj=Symbol.for("react.memo"),Vj=Symbol.for("react.lazy"),dk=Symbol.iterator;function Uj(e){return e===null||typeof e!="object"?null:(e=dk&&e[dk]||e["@@iterator"],typeof e=="function"?e:null)}var CI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_I=Object.assign,kI={};function E0(e,t,n){this.props=e,this.context=t,this.refs=kI,this.updater=n||CI}E0.prototype.isReactComponent={};E0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};E0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function EI(){}EI.prototype=E0.prototype;function j8(e,t,n){this.props=e,this.context=t,this.refs=kI,this.updater=n||CI}var q8=j8.prototype=new EI;q8.constructor=j8;_I(q8,E0.prototype);q8.isPureReactComponent=!0;var fk=Array.isArray,PI=Object.prototype.hasOwnProperty,K8={current:null},TI={key:!0,ref:!0,__self:!0,__source:!0};function LI(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)PI.call(t,r)&&!TI.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=U[X];if(0>>1;Xi(He,ae))jei(ut,He)?(U[X]=ut,U[je]=ae,X=je):(U[X]=He,U[Se]=ae,X=Se);else if(jei(ut,ae))U[X]=ut,U[je]=ae,X=je;else break e}}return ee}function i(U,ee){var ae=U.sortIndex-ee.sortIndex;return ae!==0?ae:U.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],p=1,g=null,m=3,y=!1,b=!1,S=!1,T=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(U){for(var ee=n(c);ee!==null;){if(ee.callback===null)r(c);else if(ee.startTime<=U)r(c),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=n(c)}}function I(U){if(S=!1,L(U),!b)if(n(l)!==null)b=!0,xe(O);else{var ee=n(c);ee!==null&&Z(I,ee.startTime-U)}}function O(U,ee){b=!1,S&&(S=!1,E(z),z=-1),y=!0;var ae=m;try{for(L(ee),g=n(l);g!==null&&(!(g.expirationTime>ee)||U&&!q());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=ee);ee=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(ee)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(c);Se!==null&&Z(I,Se.startTime-ee),ye=!1}return ye}finally{g=null,m=ae,y=!1}}var D=!1,N=null,z=-1,W=5,V=-1;function q(){return!(e.unstable_now()-VU||125X?(U.sortIndex=ae,t(c,U),n(l)===null&&U===n(c)&&(S?(E(z),z=-1):S=!0,Z(I,ae-X))):(U.sortIndex=me,t(l,U),b||y||(b=!0,xe(O))),U},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(U){var ee=m;return function(){var ae=m;m=ee;try{return U.apply(this,arguments)}finally{m=ae}}}})(AI);(function(e){e.exports=AI})(Dp);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var II=C.exports,oa=Dp.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YS=Object.prototype.hasOwnProperty,Zj=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pk={},gk={};function Yj(e){return YS.call(gk,e)?!0:YS.call(pk,e)?!1:Zj.test(e)?gk[e]=!0:(pk[e]=!0,!1)}function Xj(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Qj(e,t,n,r){if(t===null||typeof t>"u"||Xj(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function io(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Li={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Li[e]=new io(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Li[t]=new io(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Li[e]=new io(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Li[e]=new io(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Li[e]=new io(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Li[e]=new io(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Li[e]=new io(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Li[e]=new io(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Li[e]=new io(e,5,!1,e.toLowerCase(),null,!1,!1)});var Y8=/[\-:]([a-z])/g;function X8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Y8,X8);Li[t]=new io(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Y8,X8);Li[t]=new io(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Y8,X8);Li[t]=new io(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Li[e]=new io(e,1,!1,e.toLowerCase(),null,!1,!1)});Li.xlinkHref=new io("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Li[e]=new io(e,1,!1,e.toLowerCase(),null,!0,!0)});function Q8(e,t,n,r){var i=Li.hasOwnProperty(t)?Li[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{ab=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?bg(e):""}function Jj(e){switch(e.tag){case 5:return bg(e.type);case 16:return bg("Lazy");case 13:return bg("Suspense");case 19:return bg("SuspenseList");case 0:case 2:case 15:return e=sb(e.type,!1),e;case 11:return e=sb(e.type.render,!1),e;case 1:return e=sb(e.type,!0),e;default:return""}}function ew(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sp:return"Fragment";case bp:return"Portal";case XS:return"Profiler";case J8:return"StrictMode";case QS:return"Suspense";case JS:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case OI:return(e.displayName||"Context")+".Consumer";case RI:return(e._context.displayName||"Context")+".Provider";case e9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case t9:return t=e.displayName||null,t!==null?t:ew(e.type)||"Memo";case Sc:t=e._payload,e=e._init;try{return ew(e(t))}catch{}}return null}function eq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ew(t);case 8:return t===J8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Gc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function DI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tq(e){var t=DI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function k2(e){e._valueTracker||(e._valueTracker=tq(e))}function zI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=DI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function E3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tw(e,t){var n=t.checked;return dr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function FI(e,t){t=t.checked,t!=null&&Q8(e,"checked",t,!1)}function nw(e,t){FI(e,t);var n=Gc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?rw(e,t.type,n):t.hasOwnProperty("defaultValue")&&rw(e,t.type,Gc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function rw(e,t,n){(t!=="number"||E3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Sg=Array.isArray;function zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=E2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nq=["Webkit","ms","Moz","O"];Object.keys(Fg).forEach(function(e){nq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fg[t]=Fg[e]})});function WI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fg.hasOwnProperty(e)&&Fg[e]?(""+t).trim():t+"px"}function VI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=WI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var rq=dr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function aw(e,t){if(t){if(rq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function sw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lw=null;function n9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uw=null,Fp=null,Bp=null;function Sk(e){if(e=cv(e)){if(typeof uw!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=j4(t),uw(e.stateNode,e.type,t))}}function UI(e){Fp?Bp?Bp.push(e):Bp=[e]:Fp=e}function GI(){if(Fp){var e=Fp,t=Bp;if(Bp=Fp=null,Sk(e),t)for(e=0;e>>=0,e===0?32:31-(pq(e)/gq|0)|0}var P2=64,T2=4194304;function wg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function A3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=wg(s):(o&=a,o!==0&&(r=wg(o)))}else a=n&~i,a!==0?r=wg(a):o!==0&&(r=wg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function lv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gs(t),e[t]=n}function xq(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$g),Ak=String.fromCharCode(32),Ik=!1;function dM(e,t){switch(e){case"keyup":return qq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wp=!1;function Zq(e,t){switch(e){case"compositionend":return fM(t);case"keypress":return t.which!==32?null:(Ik=!0,Ak);case"textInput":return e=t.data,e===Ak&&Ik?null:e;default:return null}}function Yq(e,t){if(wp)return e==="compositionend"||!c9&&dM(e,t)?(e=uM(),zy=s9=Lc=null,wp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Nk(n)}}function mM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vM(){for(var e=window,t=E3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=E3(e.document)}return t}function d9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function oK(e){var t=vM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mM(n.ownerDocument.documentElement,n)){if(r!==null&&d9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Dk(n,o);var a=Dk(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cp=null,gw=null,Wg=null,mw=!1;function zk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mw||Cp==null||Cp!==E3(r)||(r=Cp,"selectionStart"in r&&d9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Wg&&Sm(Wg,r)||(Wg=r,r=R3(gw,"onSelect"),0Ep||(e.current=ww[Ep],ww[Ep]=null,Ep--)}function Un(e,t){Ep++,ww[Ep]=e.current,e.current=t}var jc={},Bi=td(jc),_o=td(!1),zf=jc;function s0(e,t){var n=e.type.contextTypes;if(!n)return jc;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ko(e){return e=e.childContextTypes,e!=null}function N3(){Kn(_o),Kn(Bi)}function Uk(e,t,n){if(Bi.current!==jc)throw Error(Oe(168));Un(Bi,t),Un(_o,n)}function EM(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,eq(e)||"Unknown",i));return dr({},n,r)}function D3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jc,zf=Bi.current,Un(Bi,e),Un(_o,_o.current),!0}function Gk(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=EM(e,t,zf),r.__reactInternalMemoizedMergedChildContext=e,Kn(_o),Kn(Bi),Un(Bi,e)):Kn(_o),Un(_o,n)}var eu=null,q4=!1,Sb=!1;function PM(e){eu===null?eu=[e]:eu.push(e)}function vK(e){q4=!0,PM(e)}function nd(){if(!Sb&&eu!==null){Sb=!0;var e=0,t=kn;try{var n=eu;for(kn=1;e>=a,i-=a,ru=1<<32-gs(t)+i|n<z?(W=N,N=null):W=N.sibling;var V=m(E,N,L[z],I);if(V===null){N===null&&(N=W);break}e&&N&&V.alternate===null&&t(E,N),k=o(V,k,z),D===null?O=V:D.sibling=V,D=V,N=W}if(z===L.length)return n(E,N),tr&&of(E,z),O;if(N===null){for(;zz?(W=N,N=null):W=N.sibling;var q=m(E,N,V.value,I);if(q===null){N===null&&(N=W);break}e&&N&&q.alternate===null&&t(E,N),k=o(q,k,z),D===null?O=q:D.sibling=q,D=q,N=W}if(V.done)return n(E,N),tr&&of(E,z),O;if(N===null){for(;!V.done;z++,V=L.next())V=g(E,V.value,I),V!==null&&(k=o(V,k,z),D===null?O=V:D.sibling=V,D=V);return tr&&of(E,z),O}for(N=r(E,N);!V.done;z++,V=L.next())V=y(N,E,z,V.value,I),V!==null&&(e&&V.alternate!==null&&N.delete(V.key===null?z:V.key),k=o(V,k,z),D===null?O=V:D.sibling=V,D=V);return e&&N.forEach(function(he){return t(E,he)}),tr&&of(E,z),O}function T(E,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Sp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case _2:e:{for(var O=L.key,D=k;D!==null;){if(D.key===O){if(O=L.type,O===Sp){if(D.tag===7){n(E,D.sibling),k=i(D,L.props.children),k.return=E,E=k;break e}}else if(D.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Sc&&Qk(O)===D.type){n(E,D.sibling),k=i(D,L.props),k.ref=rg(E,D,L),k.return=E,E=k;break e}n(E,D);break}else t(E,D);D=D.sibling}L.type===Sp?(k=Tf(L.props.children,E.mode,I,L.key),k.return=E,E=k):(I=Gy(L.type,L.key,L.props,null,E.mode,I),I.ref=rg(E,k,L),I.return=E,E=I)}return a(E);case bp:e:{for(D=L.key;k!==null;){if(k.key===D)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(E,k.sibling),k=i(k,L.children||[]),k.return=E,E=k;break e}else{n(E,k);break}else t(E,k);k=k.sibling}k=Lb(L,E.mode,I),k.return=E,E=k}return a(E);case Sc:return D=L._init,T(E,k,D(L._payload),I)}if(Sg(L))return b(E,k,L,I);if(Q1(L))return S(E,k,L,I);N2(E,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(E,k.sibling),k=i(k,L),k.return=E,E=k):(n(E,k),k=Tb(L,E.mode,I),k.return=E,E=k),a(E)):n(E,k)}return T}var u0=NM(!0),DM=NM(!1),dv={},hl=td(dv),km=td(dv),Em=td(dv);function yf(e){if(e===dv)throw Error(Oe(174));return e}function b9(e,t){switch(Un(Em,t),Un(km,e),Un(hl,dv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ow(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ow(t,e)}Kn(hl),Un(hl,t)}function c0(){Kn(hl),Kn(km),Kn(Em)}function zM(e){yf(Em.current);var t=yf(hl.current),n=ow(t,e.type);t!==n&&(Un(km,e),Un(hl,n))}function S9(e){km.current===e&&(Kn(hl),Kn(km))}var lr=td(0);function W3(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wb=[];function w9(){for(var e=0;en?n:4,e(!0);var r=Cb.transition;Cb.transition={};try{e(!1),t()}finally{kn=n,Cb.transition=r}}function JM(){return za().memoizedState}function SK(e,t,n){var r=Hc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eR(e))tR(t,n);else if(n=IM(e,t,n,r),n!==null){var i=to();ms(n,e,r,i),nR(n,t,r)}}function wK(e,t,n){var r=Hc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eR(e))tR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ss(s,a)){var l=t.interleaved;l===null?(i.next=i,y9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=IM(e,t,i,r),n!==null&&(i=to(),ms(n,e,r,i),nR(n,t,r))}}function eR(e){var t=e.alternate;return e===cr||t!==null&&t===cr}function tR(e,t){Vg=V3=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,i9(e,n)}}var U3={readContext:Da,useCallback:Oi,useContext:Oi,useEffect:Oi,useImperativeHandle:Oi,useInsertionEffect:Oi,useLayoutEffect:Oi,useMemo:Oi,useReducer:Oi,useRef:Oi,useState:Oi,useDebugValue:Oi,useDeferredValue:Oi,useTransition:Oi,useMutableSource:Oi,useSyncExternalStore:Oi,useId:Oi,unstable_isNewReconciler:!1},CK={readContext:Da,useCallback:function(e,t){return tl().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:eE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hy(4194308,4,KM.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hy(4,2,e,t)},useMemo:function(e,t){var n=tl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=SK.bind(null,cr,e),[r.memoizedState,e]},useRef:function(e){var t=tl();return e={current:e},t.memoizedState=e},useState:Jk,useDebugValue:P9,useDeferredValue:function(e){return tl().memoizedState=e},useTransition:function(){var e=Jk(!1),t=e[0];return e=bK.bind(null,e[1]),tl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=cr,i=tl();if(tr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),si===null)throw Error(Oe(349));(Bf&30)!==0||$M(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,eE(WM.bind(null,r,o,e),[e]),r.flags|=2048,Lm(9,HM.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=tl(),t=si.identifierPrefix;if(tr){var n=iu,r=ru;n=(r&~(1<<32-gs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ll]=t,e[_m]=r,dR(e,t,!1,!1),t.stateNode=e;e:{switch(a=sw(n,r),n){case"dialog":jn("cancel",e),jn("close",e),i=r;break;case"iframe":case"object":case"embed":jn("load",e),i=r;break;case"video":case"audio":for(i=0;if0&&(t.flags|=128,r=!0,ig(o,!1),t.lanes=4194304)}else{if(!r)if(e=W3(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ig(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!tr)return Ni(t),null}else 2*Rr()-o.renderingStartTime>f0&&n!==1073741824&&(t.flags|=128,r=!0,ig(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=lr.current,Un(lr,r?n&1|2:n&1),t):(Ni(t),null);case 22:case 23:return R9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Xo&1073741824)!==0&&(Ni(t),t.subtreeFlags&6&&(t.flags|=8192)):Ni(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function IK(e,t){switch(h9(t),t.tag){case 1:return ko(t.type)&&N3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return c0(),Kn(_o),Kn(Bi),w9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return S9(t),null;case 13:if(Kn(lr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));l0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Kn(lr),null;case 4:return c0(),null;case 10:return v9(t.type._context),null;case 22:case 23:return R9(),null;case 24:return null;default:return null}}var z2=!1,Fi=!1,MK=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Ap(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){br(e,t,r)}else n.current=null}function Ow(e,t,n){try{n()}catch(r){br(e,t,r)}}var uE=!1;function RK(e,t){if(vw=I3,e=vM(),d9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,p=0,g=e,m=null;t:for(;;){for(var y;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(y=g.firstChild)!==null;)m=g,g=y;for(;;){if(g===e)break t;if(m===n&&++c===i&&(s=a),m===o&&++p===r&&(l=a),(y=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=y}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(yw={focusedElem:e,selectionRange:n},I3=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){t=Je;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var S=b.memoizedProps,T=b.memoizedState,E=t.stateNode,k=E.getSnapshotBeforeUpdate(t.elementType===t.type?S:cs(t.type,S),T);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){br(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,Je=e;break}Je=t.return}return b=uE,uE=!1,b}function Ug(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ow(t,n,o)}i=i.next}while(i!==r)}}function Y4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pR(e){var t=e.alternate;t!==null&&(e.alternate=null,pR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ll],delete t[_m],delete t[Sw],delete t[gK],delete t[mK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gR(e){return e.tag===5||e.tag===3||e.tag===4}function cE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=O3));else if(r!==4&&(e=e.child,e!==null))for(Dw(e,t,n),e=e.sibling;e!==null;)Dw(e,t,n),e=e.sibling}function zw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zw(e,t,n),e=e.sibling;e!==null;)zw(e,t,n),e=e.sibling}var Ci=null,ds=!1;function pc(e,t,n){for(n=n.child;n!==null;)mR(e,t,n),n=n.sibling}function mR(e,t,n){if(fl&&typeof fl.onCommitFiberUnmount=="function")try{fl.onCommitFiberUnmount(W4,n)}catch{}switch(n.tag){case 5:Fi||Ap(n,t);case 6:var r=Ci,i=ds;Ci=null,pc(e,t,n),Ci=r,ds=i,Ci!==null&&(ds?(e=Ci,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ci.removeChild(n.stateNode));break;case 18:Ci!==null&&(ds?(e=Ci,n=n.stateNode,e.nodeType===8?bb(e.parentNode,n):e.nodeType===1&&bb(e,n),xm(e)):bb(Ci,n.stateNode));break;case 4:r=Ci,i=ds,Ci=n.stateNode.containerInfo,ds=!0,pc(e,t,n),Ci=r,ds=i;break;case 0:case 11:case 14:case 15:if(!Fi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&Ow(n,t,a),i=i.next}while(i!==r)}pc(e,t,n);break;case 1:if(!Fi&&(Ap(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){br(n,t,s)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:n.mode&1?(Fi=(r=Fi)||n.memoizedState!==null,pc(e,t,n),Fi=r):pc(e,t,n);break;default:pc(e,t,n)}}function dE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new MK),t.forEach(function(r){var i=WK.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NK(r/1960))-r,10e?16:e,Ac===null)var r=!1;else{if(e=Ac,Ac=null,q3=0,(nn&6)!==0)throw Error(Oe(331));var i=nn;for(nn|=4,Je=e.current;Je!==null;){var o=Je,a=o.child;if((Je.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-I9?Pf(e,0):A9|=n),Eo(e,t)}function _R(e,t){t===0&&((e.mode&1)===0?t=1:(t=T2,T2<<=1,(T2&130023424)===0&&(T2=4194304)));var n=to();e=du(e,t),e!==null&&(lv(e,t,n),Eo(e,n))}function HK(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_R(e,n)}function WK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),_R(e,n)}var kR;kR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_o.current)Co=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Co=!1,LK(e,t,n);Co=(e.flags&131072)!==0}else Co=!1,tr&&(t.flags&1048576)!==0&&TM(t,F3,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wy(e,t),e=t.pendingProps;var i=s0(t,Bi.current);Hp(t,n),i=_9(null,t,r,e,i,n);var o=k9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ko(r)?(o=!0,D3(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,x9(t),i.updater=K4,t.stateNode=i,i._reactInternals=t,Pw(t,r,e,n),t=Aw(null,t,r,!0,o,n)):(t.tag=0,tr&&o&&f9(t),Qi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=UK(r),e=cs(r,e),i){case 0:t=Lw(null,t,r,e,n);break e;case 1:t=aE(null,t,r,e,n);break e;case 11:t=iE(null,t,r,e,n);break e;case 14:t=oE(null,t,r,cs(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cs(r,i),Lw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cs(r,i),aE(e,t,r,i,n);case 3:e:{if(lR(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,MM(e,t),H3(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=d0(Error(Oe(423)),t),t=sE(e,t,r,n,i);break e}else if(r!==i){i=d0(Error(Oe(424)),t),t=sE(e,t,r,n,i);break e}else for(Jo=Fc(t.stateNode.containerInfo.firstChild),ta=t,tr=!0,hs=null,n=DM(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(l0(),r===i){t=fu(e,t,n);break e}Qi(e,t,r,n)}t=t.child}return t;case 5:return zM(t),e===null&&_w(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,xw(r,i)?a=null:o!==null&&xw(r,o)&&(t.flags|=32),sR(e,t),Qi(e,t,a,n),t.child;case 6:return e===null&&_w(t),null;case 13:return uR(e,t,n);case 4:return b9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=u0(t,null,r,n):Qi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cs(r,i),iE(e,t,r,i,n);case 7:return Qi(e,t,t.pendingProps,n),t.child;case 8:return Qi(e,t,t.pendingProps.children,n),t.child;case 12:return Qi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Un(B3,r._currentValue),r._currentValue=a,o!==null)if(Ss(o.value,a)){if(o.children===i.children&&!_o.current){t=fu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=lu(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var p=c.pending;p===null?l.next=l:(l.next=p.next,p.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),kw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),kw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Qi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hp(t,n),i=Da(i),r=r(i),t.flags|=1,Qi(e,t,r,n),t.child;case 14:return r=t.type,i=cs(r,t.pendingProps),i=cs(r.type,i),oE(e,t,r,i,n);case 15:return oR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cs(r,i),Wy(e,t),t.tag=1,ko(r)?(e=!0,D3(t)):e=!1,Hp(t,n),OM(t,r,i),Pw(t,r,i,n),Aw(null,t,r,!0,e,n);case 19:return cR(e,t,n);case 22:return aR(e,t,n)}throw Error(Oe(156,t.tag))};function ER(e,t){return QI(e,t)}function VK(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(e,t,n,r){return new VK(e,t,n,r)}function N9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function UK(e){if(typeof e=="function")return N9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===e9)return 11;if(e===t9)return 14}return 2}function Wc(e,t){var n=e.alternate;return n===null?(n=Ia(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")N9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Sp:return Tf(n.children,i,o,t);case J8:a=8,i|=8;break;case XS:return e=Ia(12,n,t,i|2),e.elementType=XS,e.lanes=o,e;case QS:return e=Ia(13,n,t,i),e.elementType=QS,e.lanes=o,e;case JS:return e=Ia(19,n,t,i),e.elementType=JS,e.lanes=o,e;case NI:return Q4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case RI:a=10;break e;case OI:a=9;break e;case e9:a=11;break e;case t9:a=14;break e;case Sc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Tf(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function Q4(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=NI,e.lanes=n,e.stateNode={isHidden:!1},e}function Tb(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function Lb(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GK(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ub(0),this.expirationTimes=ub(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ub(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function D9(e,t,n,r,i,o,a,s,l){return e=new GK(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},x9(o),e}function jK(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ua})(El);const $2=G8(El.exports);var xE=El.exports;ZS.createRoot=xE.createRoot,ZS.hydrateRoot=xE.hydrateRoot;var pl=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,r5={exports:{}},i5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var XK=C.exports,QK=Symbol.for("react.element"),JK=Symbol.for("react.fragment"),eZ=Object.prototype.hasOwnProperty,tZ=XK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nZ={key:!0,ref:!0,__self:!0,__source:!0};function AR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)eZ.call(t,r)&&!nZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:QK,type:e,key:o,ref:a,props:i,_owner:tZ.current}}i5.Fragment=JK;i5.jsx=AR;i5.jsxs=AR;(function(e){e.exports=i5})(r5);const Fn=r5.exports.Fragment,w=r5.exports.jsx,ne=r5.exports.jsxs;var $9=C.exports.createContext({});$9.displayName="ColorModeContext";function o5(){const e=C.exports.useContext($9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var H2={light:"chakra-ui-light",dark:"chakra-ui-dark"};function rZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?H2.dark:H2.light),document.body.classList.remove(r?H2.light:H2.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var iZ="chakra-ui-color-mode";function oZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var aZ=oZ(iZ),bE=()=>{};function SE(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function IR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=aZ}=e,s=i==="dark"?"dark":"light",[l,c]=C.exports.useState(()=>SE(a,s)),[p,g]=C.exports.useState(()=>SE(a)),{getSystemTheme:m,setClassName:y,setDataset:b,addListener:S}=C.exports.useMemo(()=>rZ({preventTransition:o}),[o]),T=i==="system"&&!l?p:l,E=C.exports.useCallback(I=>{const O=I==="system"?m():I;c(O),y(O==="dark"),b(O),a.set(O)},[a,m,y,b]);pl(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){E(I);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const k=C.exports.useCallback(()=>{E(T==="dark"?"light":"dark")},[T,E]);C.exports.useEffect(()=>{if(!!r)return S(E)},[r,S,E]);const L=C.exports.useMemo(()=>({colorMode:t??T,toggleColorMode:t?bE:k,setColorMode:t?bE:E,forced:t!==void 0}),[T,k,E,t]);return w($9.Provider,{value:L,children:n})}IR.displayName="ColorModeProvider";var sZ=new Set(["dark","light","system"]);function lZ(e){let t=e;return sZ.has(t)||(t="light"),t}function uZ(e={}){const{initialColorMode:t="light",type:n="localStorage",storageKey:r="chakra-ui-color-mode"}=e,i=lZ(t),o=n==="cookie",a=`(function(){try{var a=function(o){var l="(prefers-color-scheme: dark)",v=window.matchMedia(l).matches?"dark":"light",e=o==="system"?v:o,d=document.documentElement,m=document.body,i="chakra-ui-light",n="chakra-ui-dark",s=e==="dark";return m.classList.add(s?n:i),m.classList.remove(s?i:n),d.style.colorScheme=e,d.dataset.theme=e,e},u=a,h="${i}",r="${r}",t=document.cookie.match(new RegExp("(^| )".concat(r,"=([^;]+)"))),c=t?t[2]:null;c?a(c):document.cookie="".concat(r,"=").concat(a(h),"; max-age=31536000; path=/")}catch(a){}})(); - `,s=`(function(){try{var a=function(c){var v="(prefers-color-scheme: dark)",h=window.matchMedia(v).matches?"dark":"light",r=c==="system"?h:c,o=document.documentElement,s=document.body,l="chakra-ui-light",d="chakra-ui-dark",i=r==="dark";return s.classList.add(i?d:l),s.classList.remove(i?l:d),o.style.colorScheme=r,o.dataset.theme=r,r},n=a,m="${i}",e="${r}",t=localStorage.getItem(e);t?a(t):localStorage.setItem(e,a(m))}catch(a){}})(); - `;return`!${o?a:s}`.trim()}function cZ(e={}){const{nonce:t}=e;return w("script",{id:"chakra-script",nonce:t,dangerouslySetInnerHTML:{__html:uZ(e)}})}var Ww={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",p="[object Boolean]",g="[object Date]",m="[object Error]",y="[object Function]",b="[object GeneratorFunction]",S="[object Map]",T="[object Number]",E="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",D="[object String]",N="[object Undefined]",z="[object WeakMap]",W="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",he="[object Float64Array]",de="[object Int8Array]",ve="[object Int16Array]",Ee="[object Int32Array]",xe="[object Uint8Array]",Z="[object Uint8ClampedArray]",U="[object Uint16Array]",ee="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[q]=ye[he]=ye[de]=ye[ve]=ye[Ee]=ye[xe]=ye[Z]=ye[U]=ye[ee]=!0,ye[s]=ye[l]=ye[W]=ye[p]=ye[V]=ye[g]=ye[m]=ye[y]=ye[S]=ye[T]=ye[k]=ye[I]=ye[O]=ye[D]=ye[z]=!1;var Se=typeof tu=="object"&&tu&&tu.Object===Object&&tu,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ut=t&&!t.nodeType&&t,qe=ut&&!0&&e&&!e.nodeType&&e,ot=qe&&qe.exports===ut,tt=ot&&Se.process,at=function(){try{var H=qe&&qe.require&&qe.require("util").types;return H||tt&&tt.binding&&tt.binding("util")}catch{}}(),Rt=at&&at.isTypedArray;function kt(H,Y,ue){switch(ue.length){case 0:return H.call(Y);case 1:return H.call(Y,ue[0]);case 2:return H.call(Y,ue[0],ue[1]);case 3:return H.call(Y,ue[0],ue[1],ue[2])}return H.apply(Y,ue)}function Le(H,Y){for(var ue=-1,Ge=Array(H);++ue-1}function K0(H,Y){var ue=this.__data__,Ge=Ga(ue,H);return Ge<0?(++this.size,ue.push([H,Y])):ue[Ge][1]=Y,this}Io.prototype.clear=pd,Io.prototype.delete=q0,Io.prototype.get=Lu,Io.prototype.has=gd,Io.prototype.set=K0;function ks(H){var Y=-1,ue=H==null?0:H.length;for(this.clear();++Y1?ue[Nt-1]:void 0,dt=Nt>2?ue[2]:void 0;for(ln=H.length>3&&typeof ln=="function"?(Nt--,ln):void 0,dt&&hh(ue[0],ue[1],dt)&&(ln=Nt<3?void 0:ln,Nt=1),Y=Object(Y);++Ge-1&&H%1==0&&H0){if(++Y>=i)return arguments[0]}else Y=0;return H.apply(void 0,arguments)}}function Ou(H){if(H!=null){try{return wn.call(H)}catch{}try{return H+""}catch{}}return""}function ga(H,Y){return H===Y||H!==H&&Y!==Y}var bd=Il(function(){return arguments}())?Il:function(H){return $n(H)&&pn.call(H,"callee")&&!Be.call(H,"callee")},Ol=Array.isArray;function Bt(H){return H!=null&&gh(H.length)&&!Du(H)}function ph(H){return $n(H)&&Bt(H)}var Nu=Yt||s1;function Du(H){if(!No(H))return!1;var Y=Ps(H);return Y==y||Y==b||Y==c||Y==L}function gh(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=a}function No(H){var Y=typeof H;return H!=null&&(Y=="object"||Y=="function")}function $n(H){return H!=null&&typeof H=="object"}function Sd(H){if(!$n(H)||Ps(H)!=k)return!1;var Y=rn(H);if(Y===null)return!0;var ue=pn.call(Y,"constructor")&&Y.constructor;return typeof ue=="function"&&ue instanceof ue&&wn.call(ue)==Zt}var mh=Rt?st(Rt):Iu;function wd(H){return Gr(H,vh(H))}function vh(H){return Bt(H)?i1(H,!0):Ts(H)}var on=ja(function(H,Y,ue,Ge){Mo(H,Y,ue,Ge)});function $t(H){return function(){return H}}function yh(H){return H}function s1(){return!1}e.exports=on})(Ww,Ww.exports);const Ma=Ww.exports;function vs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function xf(e,...t){return dZ(e)?e(...t):e}var dZ=e=>typeof e=="function",fZ=e=>/!(important)?$/.test(e),wE=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Vw=(e,t)=>n=>{const r=String(t),i=fZ(r),o=wE(r),a=e?`${e}.${o}`:o;let s=vs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=wE(s),i?`${s} !important`:s};function Im(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Vw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var W2=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Im({scale:e,transform:t}),r}}var hZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function pZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:hZ(t),transform:n?Im({scale:n,compose:r}):r}}var MR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function gZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...MR].join(" ")}function mZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...MR].join(" ")}var vZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},yZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function xZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var bZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},RR="& > :not(style) ~ :not(style)",SZ={[RR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},wZ={[RR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Uw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},CZ=new Set(Object.values(Uw)),OR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),_Z=e=>e.trim();function kZ(e,t){var n;if(e==null||OR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(_Z).filter(Boolean);if(l?.length===0)return e;const c=s in Uw?Uw[s]:s;l.unshift(c);const p=l.map(g=>{if(CZ.has(g))return g;const m=g.indexOf(" "),[y,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],S=NR(b)?b:b&&b.split(" "),T=`colors.${y}`,E=T in t.__cssMap?t.__cssMap[T].varRef:y;return S?[E,...Array.isArray(S)?S:[S]].join(" "):E});return`${a}(${p.join(", ")})`}var NR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),EZ=(e,t)=>kZ(e,t??{});function PZ(e){return/^var\(--.+\)$/.test(e)}var TZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ys=e=>t=>`${e}(${t})`,tn={filter(e){return e!=="auto"?e:vZ},backdropFilter(e){return e!=="auto"?e:yZ},ring(e){return xZ(tn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?gZ():e==="auto-gpu"?mZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=TZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(PZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:EZ,blur:Ys("blur"),opacity:Ys("opacity"),brightness:Ys("brightness"),contrast:Ys("contrast"),dropShadow:Ys("drop-shadow"),grayscale:Ys("grayscale"),hueRotate:Ys("hue-rotate"),invert:Ys("invert"),saturate:Ys("saturate"),sepia:Ys("sepia"),bgImage(e){return e==null||NR(e)||OR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=bZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},J={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",tn.px),space:as("space",W2(tn.vh,tn.px)),spaceT:as("space",W2(tn.vh,tn.px)),degreeT(e){return{property:e,transform:tn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Im({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",W2(tn.vh,tn.px)),sizesT:as("sizes",W2(tn.vh,tn.fraction)),shadows:as("shadows"),logical:pZ,blur:as("blur",tn.blur)},jy={background:J.colors("background"),backgroundColor:J.colors("backgroundColor"),backgroundImage:J.propT("backgroundImage",tn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:tn.bgClip},bgSize:J.prop("backgroundSize"),bgPosition:J.prop("backgroundPosition"),bg:J.colors("background"),bgColor:J.colors("backgroundColor"),bgPos:J.prop("backgroundPosition"),bgRepeat:J.prop("backgroundRepeat"),bgAttachment:J.prop("backgroundAttachment"),bgGradient:J.propT("backgroundImage",tn.gradient),bgClip:{transform:tn.bgClip}};Object.assign(jy,{bgImage:jy.backgroundImage,bgImg:jy.backgroundImage});var cn={border:J.borders("border"),borderWidth:J.borderWidths("borderWidth"),borderStyle:J.borderStyles("borderStyle"),borderColor:J.colors("borderColor"),borderRadius:J.radii("borderRadius"),borderTop:J.borders("borderTop"),borderBlockStart:J.borders("borderBlockStart"),borderTopLeftRadius:J.radii("borderTopLeftRadius"),borderStartStartRadius:J.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:J.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:J.radii("borderTopRightRadius"),borderStartEndRadius:J.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:J.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:J.borders("borderRight"),borderInlineEnd:J.borders("borderInlineEnd"),borderBottom:J.borders("borderBottom"),borderBlockEnd:J.borders("borderBlockEnd"),borderBottomLeftRadius:J.radii("borderBottomLeftRadius"),borderBottomRightRadius:J.radii("borderBottomRightRadius"),borderLeft:J.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:J.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:J.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:J.borders(["borderLeft","borderRight"]),borderInline:J.borders("borderInline"),borderY:J.borders(["borderTop","borderBottom"]),borderBlock:J.borders("borderBlock"),borderTopWidth:J.borderWidths("borderTopWidth"),borderBlockStartWidth:J.borderWidths("borderBlockStartWidth"),borderTopColor:J.colors("borderTopColor"),borderBlockStartColor:J.colors("borderBlockStartColor"),borderTopStyle:J.borderStyles("borderTopStyle"),borderBlockStartStyle:J.borderStyles("borderBlockStartStyle"),borderBottomWidth:J.borderWidths("borderBottomWidth"),borderBlockEndWidth:J.borderWidths("borderBlockEndWidth"),borderBottomColor:J.colors("borderBottomColor"),borderBlockEndColor:J.colors("borderBlockEndColor"),borderBottomStyle:J.borderStyles("borderBottomStyle"),borderBlockEndStyle:J.borderStyles("borderBlockEndStyle"),borderLeftWidth:J.borderWidths("borderLeftWidth"),borderInlineStartWidth:J.borderWidths("borderInlineStartWidth"),borderLeftColor:J.colors("borderLeftColor"),borderInlineStartColor:J.colors("borderInlineStartColor"),borderLeftStyle:J.borderStyles("borderLeftStyle"),borderInlineStartStyle:J.borderStyles("borderInlineStartStyle"),borderRightWidth:J.borderWidths("borderRightWidth"),borderInlineEndWidth:J.borderWidths("borderInlineEndWidth"),borderRightColor:J.colors("borderRightColor"),borderInlineEndColor:J.colors("borderInlineEndColor"),borderRightStyle:J.borderStyles("borderRightStyle"),borderInlineEndStyle:J.borderStyles("borderInlineEndStyle"),borderTopRadius:J.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:J.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:J.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:J.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(cn,{rounded:cn.borderRadius,roundedTop:cn.borderTopRadius,roundedTopLeft:cn.borderTopLeftRadius,roundedTopRight:cn.borderTopRightRadius,roundedTopStart:cn.borderStartStartRadius,roundedTopEnd:cn.borderStartEndRadius,roundedBottom:cn.borderBottomRadius,roundedBottomLeft:cn.borderBottomLeftRadius,roundedBottomRight:cn.borderBottomRightRadius,roundedBottomStart:cn.borderEndStartRadius,roundedBottomEnd:cn.borderEndEndRadius,roundedLeft:cn.borderLeftRadius,roundedRight:cn.borderRightRadius,roundedStart:cn.borderInlineStartRadius,roundedEnd:cn.borderInlineEndRadius,borderStart:cn.borderInlineStart,borderEnd:cn.borderInlineEnd,borderTopStartRadius:cn.borderStartStartRadius,borderTopEndRadius:cn.borderStartEndRadius,borderBottomStartRadius:cn.borderEndStartRadius,borderBottomEndRadius:cn.borderEndEndRadius,borderStartRadius:cn.borderInlineStartRadius,borderEndRadius:cn.borderInlineEndRadius,borderStartWidth:cn.borderInlineStartWidth,borderEndWidth:cn.borderInlineEndWidth,borderStartColor:cn.borderInlineStartColor,borderEndColor:cn.borderInlineEndColor,borderStartStyle:cn.borderInlineStartStyle,borderEndStyle:cn.borderInlineEndStyle});var LZ={color:J.colors("color"),textColor:J.colors("color"),fill:J.colors("fill"),stroke:J.colors("stroke")},Gw={boxShadow:J.shadows("boxShadow"),mixBlendMode:!0,blendMode:J.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:J.prop("backgroundBlendMode"),opacity:!0};Object.assign(Gw,{shadow:Gw.boxShadow});var AZ={filter:{transform:tn.filter},blur:J.blur("--chakra-blur"),brightness:J.propT("--chakra-brightness",tn.brightness),contrast:J.propT("--chakra-contrast",tn.contrast),hueRotate:J.degreeT("--chakra-hue-rotate"),invert:J.propT("--chakra-invert",tn.invert),saturate:J.propT("--chakra-saturate",tn.saturate),dropShadow:J.propT("--chakra-drop-shadow",tn.dropShadow),backdropFilter:{transform:tn.backdropFilter},backdropBlur:J.blur("--chakra-backdrop-blur"),backdropBrightness:J.propT("--chakra-backdrop-brightness",tn.brightness),backdropContrast:J.propT("--chakra-backdrop-contrast",tn.contrast),backdropHueRotate:J.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:J.propT("--chakra-backdrop-invert",tn.invert),backdropSaturate:J.propT("--chakra-backdrop-saturate",tn.saturate)},Y3={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:tn.flexDirection},experimental_spaceX:{static:SZ,transform:Im({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:wZ,transform:Im({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:J.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:J.space("gap"),rowGap:J.space("rowGap"),columnGap:J.space("columnGap")};Object.assign(Y3,{flexDir:Y3.flexDirection});var DR={gridGap:J.space("gridGap"),gridColumnGap:J.space("gridColumnGap"),gridRowGap:J.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},IZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:tn.outline},outlineOffset:!0,outlineColor:J.colors("outlineColor")},ka={width:J.sizesT("width"),inlineSize:J.sizesT("inlineSize"),height:J.sizes("height"),blockSize:J.sizes("blockSize"),boxSize:J.sizes(["width","height"]),minWidth:J.sizes("minWidth"),minInlineSize:J.sizes("minInlineSize"),minHeight:J.sizes("minHeight"),minBlockSize:J.sizes("minBlockSize"),maxWidth:J.sizes("maxWidth"),maxInlineSize:J.sizes("maxInlineSize"),maxHeight:J.sizes("maxHeight"),maxBlockSize:J.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:J.propT("float",tn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(ka,{w:ka.width,h:ka.height,minW:ka.minWidth,maxW:ka.maxWidth,minH:ka.minHeight,maxH:ka.maxHeight,overscroll:ka.overscrollBehavior,overscrollX:ka.overscrollBehaviorX,overscrollY:ka.overscrollBehaviorY});var MZ={listStyleType:!0,listStylePosition:!0,listStylePos:J.prop("listStylePosition"),listStyleImage:!0,listStyleImg:J.prop("listStyleImage")};function RZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},NZ=OZ(RZ),DZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},zZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ab=(e,t,n)=>{const r={},i=NZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},FZ={srOnly:{transform(e){return e===!0?DZ:e==="focusable"?zZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Ab(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Ab(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Ab(t,e,n)}},qg={position:!0,pos:J.prop("position"),zIndex:J.prop("zIndex","zIndices"),inset:J.spaceT("inset"),insetX:J.spaceT(["left","right"]),insetInline:J.spaceT("insetInline"),insetY:J.spaceT(["top","bottom"]),insetBlock:J.spaceT("insetBlock"),top:J.spaceT("top"),insetBlockStart:J.spaceT("insetBlockStart"),bottom:J.spaceT("bottom"),insetBlockEnd:J.spaceT("insetBlockEnd"),left:J.spaceT("left"),insetInlineStart:J.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:J.spaceT("right"),insetInlineEnd:J.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(qg,{insetStart:qg.insetInlineStart,insetEnd:qg.insetInlineEnd});var BZ={ring:{transform:tn.ring},ringColor:J.colors("--chakra-ring-color"),ringOffset:J.prop("--chakra-ring-offset-width"),ringOffsetColor:J.colors("--chakra-ring-offset-color"),ringInset:J.prop("--chakra-ring-inset")},qn={margin:J.spaceT("margin"),marginTop:J.spaceT("marginTop"),marginBlockStart:J.spaceT("marginBlockStart"),marginRight:J.spaceT("marginRight"),marginInlineEnd:J.spaceT("marginInlineEnd"),marginBottom:J.spaceT("marginBottom"),marginBlockEnd:J.spaceT("marginBlockEnd"),marginLeft:J.spaceT("marginLeft"),marginInlineStart:J.spaceT("marginInlineStart"),marginX:J.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:J.spaceT("marginInline"),marginY:J.spaceT(["marginTop","marginBottom"]),marginBlock:J.spaceT("marginBlock"),padding:J.space("padding"),paddingTop:J.space("paddingTop"),paddingBlockStart:J.space("paddingBlockStart"),paddingRight:J.space("paddingRight"),paddingBottom:J.space("paddingBottom"),paddingBlockEnd:J.space("paddingBlockEnd"),paddingLeft:J.space("paddingLeft"),paddingInlineStart:J.space("paddingInlineStart"),paddingInlineEnd:J.space("paddingInlineEnd"),paddingX:J.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:J.space("paddingInline"),paddingY:J.space(["paddingTop","paddingBottom"]),paddingBlock:J.space("paddingBlock")};Object.assign(qn,{m:qn.margin,mt:qn.marginTop,mr:qn.marginRight,me:qn.marginInlineEnd,marginEnd:qn.marginInlineEnd,mb:qn.marginBottom,ml:qn.marginLeft,ms:qn.marginInlineStart,marginStart:qn.marginInlineStart,mx:qn.marginX,my:qn.marginY,p:qn.padding,pt:qn.paddingTop,py:qn.paddingY,px:qn.paddingX,pb:qn.paddingBottom,pl:qn.paddingLeft,ps:qn.paddingInlineStart,paddingStart:qn.paddingInlineStart,pr:qn.paddingRight,pe:qn.paddingInlineEnd,paddingEnd:qn.paddingInlineEnd});var $Z={textDecorationColor:J.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:J.shadows("textShadow")},HZ={clipPath:!0,transform:J.propT("transform",tn.transform),transformOrigin:!0,translateX:J.spaceT("--chakra-translate-x"),translateY:J.spaceT("--chakra-translate-y"),skewX:J.degreeT("--chakra-skew-x"),skewY:J.degreeT("--chakra-skew-y"),scaleX:J.prop("--chakra-scale-x"),scaleY:J.prop("--chakra-scale-y"),scale:J.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:J.degreeT("--chakra-rotate")},WZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:J.prop("transitionDuration","transition.duration"),transitionProperty:J.prop("transitionProperty","transition.property"),transitionTimingFunction:J.prop("transitionTimingFunction","transition.easing")},VZ={fontFamily:J.prop("fontFamily","fonts"),fontSize:J.prop("fontSize","fontSizes",tn.px),fontWeight:J.prop("fontWeight","fontWeights"),lineHeight:J.prop("lineHeight","lineHeights"),letterSpacing:J.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},UZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:J.spaceT("scrollMargin"),scrollMarginTop:J.spaceT("scrollMarginTop"),scrollMarginBottom:J.spaceT("scrollMarginBottom"),scrollMarginLeft:J.spaceT("scrollMarginLeft"),scrollMarginRight:J.spaceT("scrollMarginRight"),scrollMarginX:J.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:J.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:J.spaceT("scrollPadding"),scrollPaddingTop:J.spaceT("scrollPaddingTop"),scrollPaddingBottom:J.spaceT("scrollPaddingBottom"),scrollPaddingLeft:J.spaceT("scrollPaddingLeft"),scrollPaddingRight:J.spaceT("scrollPaddingRight"),scrollPaddingX:J.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:J.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function zR(e){return vs(e)&&e.reference?e.reference:String(e)}var a5=(e,...t)=>t.map(zR).join(` ${e} `).replace(/calc/g,""),CE=(...e)=>`calc(${a5("+",...e)})`,_E=(...e)=>`calc(${a5("-",...e)})`,jw=(...e)=>`calc(${a5("*",...e)})`,kE=(...e)=>`calc(${a5("/",...e)})`,EE=e=>{const t=zR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:jw(t,-1)},ff=Object.assign(e=>({add:(...t)=>ff(CE(e,...t)),subtract:(...t)=>ff(_E(e,...t)),multiply:(...t)=>ff(jw(e,...t)),divide:(...t)=>ff(kE(e,...t)),negate:()=>ff(EE(e)),toString:()=>e.toString()}),{add:CE,subtract:_E,multiply:jw,divide:kE,negate:EE});function GZ(e,t="-"){return e.replace(/\s+/g,t)}function jZ(e){const t=GZ(e.toString());return KZ(qZ(t))}function qZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function KZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function ZZ(e,t=""){return[t,e].filter(Boolean).join("-")}function YZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function XZ(e,t=""){return jZ(`--${ZZ(e,t)}`)}function da(e,t,n){const r=XZ(e,n);return{variable:r,reference:YZ(r,t)}}function QZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function JZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function qw(e){if(e==null)return e;const{unitless:t}=JZ(e);return t||typeof e=="number"?`${e}px`:e}var FR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,H9=e=>Object.fromEntries(Object.entries(e).sort(FR));function PE(e){const t=H9(e);return Object.assign(Object.values(t),t)}function eY(e){const t=Object.keys(H9(e));return new Set(t)}function TE(e){if(!e)return e;e=qw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function _g(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${qw(e)})`),t&&n.push("and",`(max-width: ${qw(t)})`),n.join(" ")}function tY(e){if(!e)return null;e.base=e.base??"0px";const t=PE(e),n=Object.entries(e).sort(FR).map(([o,a],s,l)=>{let[,c]=l[s+1]??[];return c=parseFloat(c)>0?TE(c):void 0,{_minW:TE(a),breakpoint:o,minW:a,maxW:c,maxWQuery:_g(null,c),minWQuery:_g(a),minMaxQuery:_g(a,c)}}),r=eY(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:H9(e),asArray:PE(e),details:n,media:[null,...t.map(o=>_g(o)).slice(1)],toArrayValue(o){if(!vs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;QZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const c=i[l];return c!=null&&s!=null&&(a[c]=s),a},{})}}}var yi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},gc=e=>BR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Kl=e=>BR(t=>e(t,"~ &"),"[data-peer]",".peer"),BR=(e,...t)=>t.map(e).join(", "),s5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:gc(yi.hover),_peerHover:Kl(yi.hover),_groupFocus:gc(yi.focus),_peerFocus:Kl(yi.focus),_groupFocusVisible:gc(yi.focusVisible),_peerFocusVisible:Kl(yi.focusVisible),_groupActive:gc(yi.active),_peerActive:Kl(yi.active),_groupDisabled:gc(yi.disabled),_peerDisabled:Kl(yi.disabled),_groupInvalid:gc(yi.invalid),_peerInvalid:Kl(yi.invalid),_groupChecked:gc(yi.checked),_peerChecked:Kl(yi.checked),_groupFocusWithin:gc(yi.focusWithin),_peerFocusWithin:Kl(yi.focusWithin),_peerPlaceholderShown:Kl(yi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},nY=Object.keys(s5);function LE(e,t){return da(String(e).replace(/\./g,"-"),void 0,t)}function rY(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:c}=LE(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[y,...b]=m,S=`${y}.-${b.join(".")}`,T=ff.negate(s),E=ff.negate(c);r[S]={value:T,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:c};continue}const p=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:T}=LE(b,t?.cssVarPrefix);return T},g=vs(s)?s:{default:s};n=Ma(n,Object.entries(g).reduce((m,[y,b])=>{var S;const T=p(b);if(y==="default")return m[l]=T,m;const E=((S=s5)==null?void 0:S[y])??y;return m[E]={[l]:T},m},{})),r[i]={value:c,var:l,varRef:c}}return{cssVars:n,cssMap:r}}function iY(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function oY(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var aY=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function sY(e){return oY(e,aY)}function lY(e){return e.semanticTokens}function uY(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function cY({tokens:e,semanticTokens:t}){const n=Object.entries(Kw(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Kw(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Kw(e,t=1/0){return!vs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(vs(i)||Array.isArray(i)?Object.entries(Kw(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function dY(e){var t;const n=uY(e),r=sY(n),i=lY(n),o=cY({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=rY(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:tY(n.breakpoints)}),n}var W9=Ma({},jy,cn,LZ,Y3,ka,AZ,BZ,IZ,DR,FZ,qg,Gw,qn,UZ,VZ,$Z,HZ,MZ,WZ),fY=Object.assign({},qn,ka,Y3,DR,qg),hY=Object.keys(fY),pY=[...Object.keys(W9),...nY],gY={...W9,...s5},mY=e=>e in gY,vY=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=xf(e[a],t);if(s==null)continue;if(s=vs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let c=0;ce.startsWith("--")&&typeof t=="string"&&!xY(t),SY=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=yY(t);return t=n(i)??r(o)??r(t),t};function wY(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=xf(o,r),c=vY(l)(r);let p={};for(let g in c){const m=c[g];let y=xf(m,r);g in n&&(g=n[g]),bY(g,y)&&(y=SY(r,y));let b=t[g];if(b===!0&&(b={property:g}),vs(y)){p[g]=p[g]??{},p[g]=Ma({},p[g],i(y,!0));continue}let S=((s=b?.transform)==null?void 0:s.call(b,y,r,l))??y;S=b?.processResult?i(S,!0):S;const T=xf(b?.property,r);if(!a&&b?.static){const E=xf(b.static,r);p=Ma({},p,E)}if(T&&Array.isArray(T)){for(const E of T)p[E]=S;continue}if(T){T==="&"&&vs(S)?p=Ma({},p,S):p[T]=S;continue}if(vs(S)){p=Ma({},p,S);continue}p[g]=S}return p};return i}var $R=e=>t=>wY({theme:t,pseudos:s5,configs:W9})(e);function nr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function CY(e,t){if(Array.isArray(e))return e;if(vs(e))return t(e);if(e!=null)return[e]}function _Y(e,t){for(let n=t+1;n{Ma(c,{[L]:m?k[L]:{[E]:k[L]}})});continue}if(!y){m?Ma(c,k):c[E]=k;continue}c[E]=k}}return c}}function EY(e){return t=>{const{variant:n,size:r,theme:i}=t,o=kY(i);return Ma({},xf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function PY(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function hn(e){return iY(e,["styleConfig","size","variant","colorScheme"])}function TY(e){if(e.sheet)return e.sheet;for(var t=0;t0?ki(L0,--Lo):0,h0--,$r===10&&(h0=1,u5--),$r}function na(){return $r=Lo2||Rm($r)>3?"":" "}function $Y(e,t){for(;--t&&na()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return fv(e,qy()+(t<6&&gl()==32&&na()==32))}function Yw(e){for(;na();)switch($r){case e:return Lo;case 34:case 39:e!==34&&e!==39&&Yw($r);break;case 40:e===41&&Yw(e);break;case 92:na();break}return Lo}function HY(e,t){for(;na()&&e+$r!==47+10;)if(e+$r===42+42&&gl()===47)break;return"/*"+fv(t,Lo-1)+"*"+l5(e===47?e:na())}function WY(e){for(;!Rm(gl());)na();return fv(e,Lo)}function VY(e){return jR(Zy("",null,null,null,[""],e=GR(e),0,[0],e))}function Zy(e,t,n,r,i,o,a,s,l){for(var c=0,p=0,g=a,m=0,y=0,b=0,S=1,T=1,E=1,k=0,L="",I=i,O=o,D=r,N=L;T;)switch(b=k,k=na()){case 40:if(b!=108&&ki(N,g-1)==58){Zw(N+=yn(Ky(k),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=Ky(k);break;case 9:case 10:case 13:case 32:N+=BY(b);break;case 92:N+=$Y(qy()-1,7);continue;case 47:switch(gl()){case 42:case 47:V2(UY(HY(na(),qy()),t,n),l);break;default:N+="/"}break;case 123*S:s[c++]=ol(N)*E;case 125*S:case 59:case 0:switch(k){case 0:case 125:T=0;case 59+p:y>0&&ol(N)-g&&V2(y>32?IE(N+";",r,n,g-1):IE(yn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(V2(D=AE(N,t,n,c,p,i,s,L,I=[],O=[],g),o),k===123)if(p===0)Zy(N,t,D,D,I,o,g,s,O);else switch(m===99&&ki(N,3)===110?100:m){case 100:case 109:case 115:Zy(e,D,D,r&&V2(AE(e,D,D,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:Zy(N,D,D,D,[""],O,0,s,O)}}c=p=y=0,S=E=1,L=N="",g=a;break;case 58:g=1+ol(N),y=b;default:if(S<1){if(k==123)--S;else if(k==125&&S++==0&&FY()==125)continue}switch(N+=l5(k),k*S){case 38:E=p>0?1:(N+="\f",-1);break;case 44:s[c++]=(ol(N)-1)*E,E=1;break;case 64:gl()===45&&(N+=Ky(na())),m=gl(),p=g=ol(L=N+=WY(qy())),k++;break;case 45:b===45&&ol(N)==2&&(S=0)}}return o}function AE(e,t,n,r,i,o,a,s,l,c,p){for(var g=i-1,m=i===0?o:[""],y=G9(m),b=0,S=0,T=0;b0?m[E]+" "+k:yn(k,/&\f/g,m[E])))&&(l[T++]=L);return c5(e,t,n,i===0?V9:s,l,c,p)}function UY(e,t,n){return c5(e,t,n,HR,l5(zY()),Mm(e,2,-2),0)}function IE(e,t,n,r){return c5(e,t,n,U9,Mm(e,0,r),Mm(e,r+1,-1),r)}function Vp(e,t){for(var n="",r=G9(e),i=0;i6)switch(ki(e,t+1)){case 109:if(ki(e,t+4)!==45)break;case 102:return yn(e,/(.+:)(.+)-([^]+)/,"$1"+dn+"$2-$3$1"+X3+(ki(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Zw(e,"stretch")?KR(yn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ki(e,t+1)!==115)break;case 6444:switch(ki(e,ol(e)-3-(~Zw(e,"!important")&&10))){case 107:return yn(e,":",":"+dn)+e;case 101:return yn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dn+(ki(e,14)===45?"inline-":"")+"box$3$1"+dn+"$2$3$1"+Di+"$2box$3")+e}break;case 5936:switch(ki(e,t+11)){case 114:return dn+e+Di+yn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dn+e+Di+yn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dn+e+Di+yn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dn+e+Di+e+e}return e}var JY=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case U9:t.return=KR(t.value,t.length);break;case WR:return Vp([ag(t,{value:yn(t.value,"@","@"+dn)})],i);case V9:if(t.length)return DY(t.props,function(o){switch(NY(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Vp([ag(t,{props:[yn(o,/:(read-\w+)/,":"+X3+"$1")]})],i);case"::placeholder":return Vp([ag(t,{props:[yn(o,/:(plac\w+)/,":"+dn+"input-$1")]}),ag(t,{props:[yn(o,/:(plac\w+)/,":"+X3+"$1")]}),ag(t,{props:[yn(o,/:(plac\w+)/,Di+"input-$1")]})],i)}return""})}},eX=[JY],tX=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var T=S.getAttribute("data-emotion");T.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=t.stylisPlugins||eX,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var T=S.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var fX={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hX=/[A-Z]|^ms/g,pX=/_EMO_([^_]+?)_([^]*?)_EMO_/g,tO=function(t){return t.charCodeAt(1)===45},OE=function(t){return t!=null&&typeof t!="boolean"},Ib=qR(function(e){return tO(e)?e:e.replace(hX,"-$&").toLowerCase()}),NE=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(pX,function(r,i,o){return al={name:i,styles:o,next:al},i})}return fX[t]!==1&&!tO(t)&&typeof n=="number"&&n!==0?n+"px":n};function Om(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return al={name:n.name,styles:n.styles,next:al},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)al={name:r.name,styles:r.styles,next:al},r=r.next;var i=n.styles+";";return i}return gX(e,t,n)}case"function":{if(e!==void 0){var o=al,a=n(e);return al=o,Om(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function gX(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function IX(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},lO=MX(IX);function uO(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var cO=e=>uO(e,t=>t!=null);function RX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var OX=RX();function dO(e,...t){return LX(e)?e(...t):e}function NX(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function DX(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var zX=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,FX=qR(function(e){return zX.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),BX=FX,$X=function(t){return t!=="theme"},BE=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?BX:$X},$E=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},HX=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return JR(n,r,i),vX(function(){return eO(n,r,i)}),null},WX=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=$E(t,n,r),l=s||BE(i),c=!l("as");return function(){var p=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),p[0]==null||p[0].raw===void 0)g.push.apply(g,p);else{g.push(p[0][0]);for(var m=p.length,y=1;y[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(p){const y=`chakra-${(["container","root"].includes(p??"")?[e]:[e,p]).filter(Boolean).join("__")}`;return{className:y,selector:`.${y}`,toString:()=>p}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var UX=Pn("accordion").parts("root","container","button","panel").extend("icon"),GX=Pn("alert").parts("title","description","container").extend("icon","spinner"),jX=Pn("avatar").parts("label","badge","container").extend("excessLabel","group"),qX=Pn("breadcrumb").parts("link","item","container").extend("separator");Pn("button").parts();var KX=Pn("checkbox").parts("control","icon","container").extend("label");Pn("progress").parts("track","filledTrack").extend("label");var ZX=Pn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),YX=Pn("editable").parts("preview","input","textarea"),XX=Pn("form").parts("container","requiredIndicator","helperText"),QX=Pn("formError").parts("text","icon"),JX=Pn("input").parts("addon","field","element"),eQ=Pn("list").parts("container","item","icon"),tQ=Pn("menu").parts("button","list","item").extend("groupTitle","command","divider"),nQ=Pn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),rQ=Pn("numberinput").parts("root","field","stepperGroup","stepper");Pn("pininput").parts("field");var iQ=Pn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),oQ=Pn("progress").parts("label","filledTrack","track"),aQ=Pn("radio").parts("container","control","label"),sQ=Pn("select").parts("field","icon"),lQ=Pn("slider").parts("container","track","thumb","filledTrack","mark"),uQ=Pn("stat").parts("container","label","helpText","number","icon"),cQ=Pn("switch").parts("container","track","thumb"),dQ=Pn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),fQ=Pn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),hQ=Pn("tag").parts("container","label","closeButton");function Ti(e,t){pQ(e)&&(e="100%");var n=gQ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function U2(e){return Math.min(1,Math.max(0,e))}function pQ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function gQ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function fO(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function G2(e){return e<=1?"".concat(Number(e)*100,"%"):e}function bf(e){return e.length===1?"0"+e:String(e)}function mQ(e,t,n){return{r:Ti(e,255)*255,g:Ti(t,255)*255,b:Ti(n,255)*255}}function HE(e,t,n){e=Ti(e,255),t=Ti(t,255),n=Ti(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vQ(e,t,n){var r,i,o;if(e=Ti(e,360),t=Ti(t,100),n=Ti(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Mb(s,a,e+1/3),i=Mb(s,a,e),o=Mb(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function WE(e,t,n){e=Ti(e,255),t=Ti(t,255),n=Ti(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var e6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function wQ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=kQ(e)),typeof e=="object"&&(Zl(e.r)&&Zl(e.g)&&Zl(e.b)?(t=mQ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zl(e.h)&&Zl(e.s)&&Zl(e.v)?(r=G2(e.s),i=G2(e.v),t=yQ(e.h,r,i),a=!0,s="hsv"):Zl(e.h)&&Zl(e.s)&&Zl(e.l)&&(r=G2(e.s),o=G2(e.l),t=vQ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=fO(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var CQ="[-\\+]?\\d+%?",_Q="[-\\+]?\\d*\\.\\d+%?",Ic="(?:".concat(_Q,")|(?:").concat(CQ,")"),Rb="[\\s|\\(]+(".concat(Ic,")[,|\\s]+(").concat(Ic,")[,|\\s]+(").concat(Ic,")\\s*\\)?"),Ob="[\\s|\\(]+(".concat(Ic,")[,|\\s]+(").concat(Ic,")[,|\\s]+(").concat(Ic,")[,|\\s]+(").concat(Ic,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Ic),rgb:new RegExp("rgb"+Rb),rgba:new RegExp("rgba"+Ob),hsl:new RegExp("hsl"+Rb),hsla:new RegExp("hsla"+Ob),hsv:new RegExp("hsv"+Rb),hsva:new RegExp("hsva"+Ob),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function kQ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(e6[e])e=e6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Yo(n[1]),g:Yo(n[2]),b:Yo(n[3]),a:UE(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Yo(n[1]),g:Yo(n[2]),b:Yo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Yo(n[1]+n[1]),g:Yo(n[2]+n[2]),b:Yo(n[3]+n[3]),a:UE(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Yo(n[1]+n[1]),g:Yo(n[2]+n[2]),b:Yo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Zl(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var pv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=SQ(t)),this.originalInput=t;var i=wQ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=fO(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=WE(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=WE(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=HE(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=HE(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),VE(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),xQ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ti(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ti(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+VE(this.r,this.g,this.b,!1),n=0,r=Object.entries(e6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=U2(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=U2(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=U2(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=U2(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(hO(e));return e.count=t,n}var r=EQ(e.hue,e.seed),i=PQ(r,e),o=TQ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new pv(a)}function EQ(e,t){var n=AQ(e),r=Q3(n,t);return r<0&&(r=360+r),r}function PQ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return Q3([0,100],t.seed);var n=pO(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return Q3([r,i],t.seed)}function TQ(e,t,n){var r=LQ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return Q3([r,i],n.seed)}function LQ(e,t){for(var n=pO(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),c=o-l*i;return l*t+c}}return 0}function AQ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=mO.find(function(a){return a.name===e});if(n){var r=gO(n);if(r.hueRange)return r.hueRange}var i=new pv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function pO(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=mO;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function Q3(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function gO(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var mO=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function IQ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ei=(e,t,n)=>{const r=IQ(e,`colors.${t}`,t),{isValid:i}=new pv(r);return i?r:n},RQ=e=>t=>{const n=Ei(t,e);return new pv(n).isDark()?"dark":"light"},OQ=e=>t=>RQ(e)(t)==="dark",p0=(e,t)=>n=>{const r=Ei(n,e);return new pv(r).setAlpha(t).toRgbString()};function GE(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function NQ(e){const t=hO().toHexString();return!e||MQ(e)?t:e.string&&e.colors?zQ(e.string,e.colors):e.string&&!e.colors?DQ(e.string):e.colors&&!e.string?FQ(e.colors):t}function DQ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function zQ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function X9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function BQ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function vO(e){return BQ(e)&&e.reference?e.reference:String(e)}var C5=(e,...t)=>t.map(vO).join(` ${e} `).replace(/calc/g,""),jE=(...e)=>`calc(${C5("+",...e)})`,qE=(...e)=>`calc(${C5("-",...e)})`,t6=(...e)=>`calc(${C5("*",...e)})`,KE=(...e)=>`calc(${C5("/",...e)})`,ZE=e=>{const t=vO(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:t6(t,-1)},nu=Object.assign(e=>({add:(...t)=>nu(jE(e,...t)),subtract:(...t)=>nu(qE(e,...t)),multiply:(...t)=>nu(t6(e,...t)),divide:(...t)=>nu(KE(e,...t)),negate:()=>nu(ZE(e)),toString:()=>e.toString()}),{add:jE,subtract:qE,multiply:t6,divide:KE,negate:ZE});function $Q(e){return!Number.isInteger(parseFloat(e.toString()))}function HQ(e,t="-"){return e.replace(/\s+/g,t)}function yO(e){const t=HQ(e.toString());return t.includes("\\.")?e:$Q(e)?t.replace(".","\\."):e}function WQ(e,t=""){return[t,yO(e)].filter(Boolean).join("-")}function VQ(e,t){return`var(${yO(e)}${t?`, ${t}`:""})`}function UQ(e,t=""){return`--${WQ(e,t)}`}function Ao(e,t){const n=UQ(e,t?.prefix);return{variable:n,reference:VQ(n,GQ(t?.fallback))}}function GQ(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:jQ,defineMultiStyleConfig:qQ}=nr(UX.keys),KQ={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},ZQ={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},YQ={pt:"2",px:"4",pb:"5"},XQ={fontSize:"1.25em"},QQ=jQ({container:KQ,button:ZQ,panel:YQ,icon:XQ}),JQ=qQ({baseStyle:QQ}),{definePartsStyle:gv,defineMultiStyleConfig:eJ}=nr(GX.keys),ra=da("alert-fg"),hu=da("alert-bg"),tJ=gv({container:{bg:hu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ra.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ra.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function Q9(e){const{theme:t,colorScheme:n}=e,r=p0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var nJ=gv(e=>{const{colorScheme:t}=e,n=Q9(e);return{container:{[ra.variable]:`colors.${t}.500`,[hu.variable]:n.light,_dark:{[ra.variable]:`colors.${t}.200`,[hu.variable]:n.dark}}}}),rJ=gv(e=>{const{colorScheme:t}=e,n=Q9(e);return{container:{[ra.variable]:`colors.${t}.500`,[hu.variable]:n.light,_dark:{[ra.variable]:`colors.${t}.200`,[hu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ra.reference}}}),iJ=gv(e=>{const{colorScheme:t}=e,n=Q9(e);return{container:{[ra.variable]:`colors.${t}.500`,[hu.variable]:n.light,_dark:{[ra.variable]:`colors.${t}.200`,[hu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ra.reference}}}),oJ=gv(e=>{const{colorScheme:t}=e;return{container:{[ra.variable]:"colors.white",[hu.variable]:`colors.${t}.500`,_dark:{[ra.variable]:"colors.gray.900",[hu.variable]:`colors.${t}.200`},color:ra.reference}}}),aJ={subtle:nJ,"left-accent":rJ,"top-accent":iJ,solid:oJ},sJ=eJ({baseStyle:tJ,variants:aJ,defaultProps:{variant:"subtle",colorScheme:"blue"}}),xO={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},lJ={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},uJ={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},cJ={...xO,...lJ,container:uJ},bO=cJ,dJ=e=>typeof e=="function";function wr(e,...t){return dJ(e)?e(...t):e}var{definePartsStyle:SO,defineMultiStyleConfig:fJ}=nr(jX.keys),Up=da("avatar-border-color"),Nb=da("avatar-bg"),hJ={borderRadius:"full",border:"0.2em solid",[Up.variable]:"white",_dark:{[Up.variable]:"colors.gray.800"},borderColor:Up.reference},pJ={[Nb.variable]:"colors.gray.200",_dark:{[Nb.variable]:"colors.whiteAlpha.400"},bgColor:Nb.reference},YE=da("avatar-background"),gJ=e=>{const{name:t,theme:n}=e,r=t?NQ({string:t}):"colors.gray.400",i=OQ(r)(n);let o="white";return i||(o="gray.800"),{bg:YE.reference,"&:not([data-loaded])":{[YE.variable]:r},color:o,[Up.variable]:"colors.white",_dark:{[Up.variable]:"colors.gray.800"},borderColor:Up.reference,verticalAlign:"top"}},mJ=SO(e=>({badge:wr(hJ,e),excessLabel:wr(pJ,e),container:wr(gJ,e)}));function mc(e){const t=e!=="100%"?bO[e]:void 0;return SO({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var vJ={"2xs":mc(4),xs:mc(6),sm:mc(8),md:mc(12),lg:mc(16),xl:mc(24),"2xl":mc(32),full:mc("100%")},yJ=fJ({baseStyle:mJ,sizes:vJ,defaultProps:{size:"md"}}),xJ={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},Gp=da("badge-bg"),dl=da("badge-color"),bJ=e=>{const{colorScheme:t,theme:n}=e,r=p0(`${t}.500`,.6)(n);return{[Gp.variable]:`colors.${t}.500`,[dl.variable]:"colors.white",_dark:{[Gp.variable]:r,[dl.variable]:"colors.whiteAlpha.800"},bg:Gp.reference,color:dl.reference}},SJ=e=>{const{colorScheme:t,theme:n}=e,r=p0(`${t}.200`,.16)(n);return{[Gp.variable]:`colors.${t}.100`,[dl.variable]:`colors.${t}.800`,_dark:{[Gp.variable]:r,[dl.variable]:`colors.${t}.200`},bg:Gp.reference,color:dl.reference}},wJ=e=>{const{colorScheme:t,theme:n}=e,r=p0(`${t}.200`,.8)(n);return{[dl.variable]:`colors.${t}.500`,_dark:{[dl.variable]:r},color:dl.reference,boxShadow:`inset 0 0 0px 1px ${dl.reference}`}},CJ={solid:bJ,subtle:SJ,outline:wJ},Zg={baseStyle:xJ,variants:CJ,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:_J,definePartsStyle:kJ}=nr(qX.keys),EJ={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},PJ=kJ({link:EJ}),TJ=_J({baseStyle:PJ}),LJ={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},wO=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ie("inherit","whiteAlpha.900")(e),_hover:{bg:Ie("gray.100","whiteAlpha.200")(e)},_active:{bg:Ie("gray.200","whiteAlpha.300")(e)}};const r=p0(`${t}.200`,.12)(n),i=p0(`${t}.200`,.24)(n);return{color:Ie(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ie(`${t}.50`,r)(e)},_active:{bg:Ie(`${t}.100`,i)(e)}}},AJ=e=>{const{colorScheme:t}=e,n=Ie("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...wr(wO,e)}},IJ={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},MJ=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ie("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ie("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ie("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=IJ[t]??{},a=Ie(n,`${t}.200`)(e);return{bg:a,color:Ie(r,"gray.800")(e),_hover:{bg:Ie(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ie(o,`${t}.400`)(e)}}},RJ=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ie(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ie(`${t}.700`,`${t}.500`)(e)}}},OJ={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},NJ={ghost:wO,outline:AJ,solid:MJ,link:RJ,unstyled:OJ},DJ={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},zJ={baseStyle:LJ,variants:NJ,sizes:DJ,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yy,defineMultiStyleConfig:FJ}=nr(KX.keys),Yg=da("checkbox-size"),BJ=e=>{const{colorScheme:t}=e;return{w:Yg.reference,h:Yg.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ie(`${t}.500`,`${t}.200`)(e),borderColor:Ie(`${t}.500`,`${t}.200`)(e),color:Ie("white","gray.900")(e),_hover:{bg:Ie(`${t}.600`,`${t}.300`)(e),borderColor:Ie(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ie("gray.200","transparent")(e),bg:Ie("gray.200","whiteAlpha.300")(e),color:Ie("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ie(`${t}.500`,`${t}.200`)(e),borderColor:Ie(`${t}.500`,`${t}.200`)(e),color:Ie("white","gray.900")(e)},_disabled:{bg:Ie("gray.100","whiteAlpha.100")(e),borderColor:Ie("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ie("red.500","red.300")(e)}}},$J={_disabled:{cursor:"not-allowed"}},HJ={userSelect:"none",_disabled:{opacity:.4}},WJ={transitionProperty:"transform",transitionDuration:"normal"},VJ=Yy(e=>({icon:WJ,container:$J,control:wr(BJ,e),label:HJ})),UJ={sm:Yy({control:{[Yg.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Yy({control:{[Yg.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Yy({control:{[Yg.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},J3=FJ({baseStyle:VJ,sizes:UJ,defaultProps:{size:"md",colorScheme:"blue"}}),Xg=Ao("close-button-size"),GJ=e=>{const t=Ie("blackAlpha.100","whiteAlpha.100")(e),n=Ie("blackAlpha.200","whiteAlpha.200")(e);return{w:[Xg.reference],h:[Xg.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{bg:t},_active:{bg:n},_focusVisible:{boxShadow:"outline"}}},jJ={lg:{[Xg.variable]:"sizes.10",fontSize:"md"},md:{[Xg.variable]:"sizes.8",fontSize:"xs"},sm:{[Xg.variable]:"sizes.6",fontSize:"2xs"}},qJ={baseStyle:GJ,sizes:jJ,defaultProps:{size:"md"}},{variants:KJ,defaultProps:ZJ}=Zg,YJ={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},XJ={baseStyle:YJ,variants:KJ,defaultProps:ZJ},QJ={w:"100%",mx:"auto",maxW:"prose",px:"4"},JJ={baseStyle:QJ},eee={opacity:.6,borderColor:"inherit"},tee={borderStyle:"solid"},nee={borderStyle:"dashed"},ree={solid:tee,dashed:nee},iee={baseStyle:eee,variants:ree,defaultProps:{variant:"solid"}},{definePartsStyle:n6,defineMultiStyleConfig:oee}=nr(ZX.keys);function op(e){return n6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var aee={bg:"blackAlpha.600",zIndex:"overlay"},see={display:"flex",zIndex:"modal",justifyContent:"center"},lee=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",bg:Ie("white","gray.700")(e),color:"inherit",boxShadow:Ie("lg","dark-lg")(e)}},uee={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},cee={position:"absolute",top:"2",insetEnd:"3"},dee={px:"6",py:"2",flex:"1",overflow:"auto"},fee={px:"6",py:"4"},hee=n6(e=>({overlay:aee,dialogContainer:see,dialog:wr(lee,e),header:uee,closeButton:cee,body:dee,footer:fee})),pee={xs:op("xs"),sm:op("md"),md:op("lg"),lg:op("2xl"),xl:op("4xl"),full:op("full")},gee=oee({baseStyle:hee,sizes:pee,defaultProps:{size:"xs"}}),{definePartsStyle:mee,defineMultiStyleConfig:vee}=nr(YX.keys),yee={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},xee={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},bee={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},See=mee({preview:yee,input:xee,textarea:bee}),wee=vee({baseStyle:See}),{definePartsStyle:Cee,defineMultiStyleConfig:_ee}=nr(XX.keys),kee=e=>({marginStart:"1",color:Ie("red.500","red.300")(e)}),Eee=e=>({mt:"2",color:Ie("gray.600","whiteAlpha.600")(e),lineHeight:"normal",fontSize:"sm"}),Pee=Cee(e=>({container:{width:"100%",position:"relative"},requiredIndicator:wr(kee,e),helperText:wr(Eee,e)})),Tee=_ee({baseStyle:Pee}),{definePartsStyle:Lee,defineMultiStyleConfig:Aee}=nr(QX.keys),Iee=e=>({color:Ie("red.500","red.300")(e),mt:"2",fontSize:"sm",lineHeight:"normal"}),Mee=e=>({marginEnd:"0.5em",color:Ie("red.500","red.300")(e)}),Ree=Lee(e=>({text:wr(Iee,e),icon:wr(Mee,e)})),Oee=Aee({baseStyle:Ree}),Nee={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Dee={baseStyle:Nee},zee={fontFamily:"heading",fontWeight:"bold"},Fee={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Bee={baseStyle:zee,sizes:Fee,defaultProps:{size:"xl"}},{definePartsStyle:ou,defineMultiStyleConfig:$ee}=nr(JX.keys),Hee=ou({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),vc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Wee={lg:ou({field:vc.lg,addon:vc.lg}),md:ou({field:vc.md,addon:vc.md}),sm:ou({field:vc.sm,addon:vc.sm}),xs:ou({field:vc.xs,addon:vc.xs})};function J9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ie("blue.500","blue.300")(e),errorBorderColor:n||Ie("red.500","red.300")(e)}}var Vee=ou(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=J9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ie("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ei(t,r),boxShadow:`0 0 0 1px ${Ei(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ei(t,n),boxShadow:`0 0 0 1px ${Ei(t,n)}`}},addon:{border:"1px solid",borderColor:Ie("inherit","whiteAlpha.50")(e),bg:Ie("gray.100","whiteAlpha.300")(e)}}}),Uee=ou(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=J9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ie("gray.100","whiteAlpha.50")(e),_hover:{bg:Ie("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ei(t,r)},_focusVisible:{bg:"transparent",borderColor:Ei(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ie("gray.100","whiteAlpha.50")(e)}}}),Gee=ou(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=J9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ei(t,r),boxShadow:`0px 1px 0px 0px ${Ei(t,r)}`},_focusVisible:{borderColor:Ei(t,n),boxShadow:`0px 1px 0px 0px ${Ei(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),jee=ou({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),qee={outline:Vee,filled:Uee,flushed:Gee,unstyled:jee},fn=$ee({baseStyle:Hee,sizes:Wee,variants:qee,defaultProps:{size:"md",variant:"outline"}}),Kee=e=>({bg:Ie("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Zee={baseStyle:Kee},Yee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Xee={baseStyle:Yee},{defineMultiStyleConfig:Qee,definePartsStyle:Jee}=nr(eQ.keys),ete={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},tte=Jee({icon:ete}),nte=Qee({baseStyle:tte}),{defineMultiStyleConfig:rte,definePartsStyle:ite}=nr(tQ.keys),ote=e=>({bg:Ie("#fff","gray.700")(e),boxShadow:Ie("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),ate=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ie("gray.100","whiteAlpha.100")(e)},_active:{bg:Ie("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ie("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),ste={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},lte={opacity:.6},ute={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},cte={transitionProperty:"common",transitionDuration:"normal"},dte=ite(e=>({button:cte,list:wr(ote,e),item:wr(ate,e),groupTitle:ste,command:lte,divider:ute})),fte=rte({baseStyle:dte}),{defineMultiStyleConfig:hte,definePartsStyle:r6}=nr(nQ.keys),pte={bg:"blackAlpha.600",zIndex:"modal"},gte=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},mte=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ie("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ie("lg","dark-lg")(e)}},vte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},yte={position:"absolute",top:"2",insetEnd:"3"},xte=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},bte={px:"6",py:"4"},Ste=r6(e=>({overlay:pte,dialogContainer:wr(gte,e),dialog:wr(mte,e),header:vte,closeButton:yte,body:wr(xte,e),footer:bte}));function ss(e){return r6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var wte={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},Cte=hte({baseStyle:Ste,sizes:wte,defaultProps:{size:"md"}}),_te={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},CO=_te,{defineMultiStyleConfig:kte,definePartsStyle:_O}=nr(rQ.keys),eC=Ao("number-input-stepper-width"),kO=Ao("number-input-input-padding"),Ete=nu(eC).add("0.5rem").toString(),Pte={[eC.variable]:"sizes.6",[kO.variable]:Ete},Tte=e=>{var t;return((t=wr(fn.baseStyle,e))==null?void 0:t.field)??{}},Lte={width:[eC.reference]},Ate=e=>({borderStart:"1px solid",borderStartColor:Ie("inherit","whiteAlpha.300")(e),color:Ie("inherit","whiteAlpha.800")(e),_active:{bg:Ie("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Ite=_O(e=>({root:Pte,field:wr(Tte,e)??{},stepperGroup:Lte,stepper:wr(Ate,e)??{}}));function j2(e){var t,n;const r=(t=fn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=CO.fontSizes[o];return _O({field:{...r.field,paddingInlineEnd:kO.reference,verticalAlign:"top"},stepper:{fontSize:nu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Mte={xs:j2("xs"),sm:j2("sm"),md:j2("md"),lg:j2("lg")},Rte=kte({baseStyle:Ite,sizes:Mte,variants:fn.variants,defaultProps:fn.defaultProps}),XE,Ote={...(XE=fn.baseStyle)==null?void 0:XE.field,textAlign:"center"},Nte={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},QE,Dte={outline:e=>{var t,n;return((n=wr((t=fn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=wr((t=fn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=wr((t=fn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((QE=fn.variants)==null?void 0:QE.unstyled.field)??{}},zte={baseStyle:Ote,sizes:Nte,variants:Dte,defaultProps:fn.defaultProps},{defineMultiStyleConfig:Fte,definePartsStyle:Bte}=nr(iQ.keys),Db=Ao("popper-bg"),$te=Ao("popper-arrow-bg"),Hte=Ao("popper-arrow-shadow-color"),Wte={zIndex:10},Vte=e=>{const t=Ie("white","gray.700")(e),n=Ie("gray.200","whiteAlpha.300")(e);return{[Db.variable]:`colors.${t}`,bg:Db.reference,[$te.variable]:Db.reference,[Hte.variable]:`colors.${n}`,width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}},Ute={px:3,py:2,borderBottomWidth:"1px"},Gte={px:3,py:2},jte={px:3,py:2,borderTopWidth:"1px"},qte={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Kte=Bte(e=>({popper:Wte,content:Vte(e),header:Ute,body:Gte,footer:jte,closeButton:qte})),Zte=Fte({baseStyle:Kte}),{defineMultiStyleConfig:Yte,definePartsStyle:kg}=nr(oQ.keys),Xte=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ie(GE(),GE("1rem","rgba(0,0,0,0.1)"))(e),a=Ie(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ei(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Qte={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Jte=e=>({bg:Ie("gray.100","whiteAlpha.300")(e)}),ene=e=>({transitionProperty:"common",transitionDuration:"slow",...Xte(e)}),tne=kg(e=>({label:Qte,filledTrack:ene(e),track:Jte(e)})),nne={xs:kg({track:{h:"1"}}),sm:kg({track:{h:"2"}}),md:kg({track:{h:"3"}}),lg:kg({track:{h:"4"}})},rne=Yte({sizes:nne,baseStyle:tne,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ine,definePartsStyle:Xy}=nr(aQ.keys),one=e=>{var t;const n=(t=wr(J3.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},ane=Xy(e=>{var t,n,r,i;return{label:(n=(t=J3).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=J3).baseStyle)==null?void 0:i.call(r,e).container,control:one(e)}}),sne={md:Xy({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Xy({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Xy({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},lne=ine({baseStyle:ane,sizes:sne,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:une,definePartsStyle:cne}=nr(sQ.keys),dne=e=>{var t;return{...(t=fn.baseStyle)==null?void 0:t.field,bg:Ie("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ie("white","gray.700")(e)}}},fne={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},hne=cne(e=>({field:dne(e),icon:fne})),q2={paddingInlineEnd:"8"},JE,eP,tP,nP,rP,iP,oP,aP,pne={lg:{...(JE=fn.sizes)==null?void 0:JE.lg,field:{...(eP=fn.sizes)==null?void 0:eP.lg.field,...q2}},md:{...(tP=fn.sizes)==null?void 0:tP.md,field:{...(nP=fn.sizes)==null?void 0:nP.md.field,...q2}},sm:{...(rP=fn.sizes)==null?void 0:rP.sm,field:{...(iP=fn.sizes)==null?void 0:iP.sm.field,...q2}},xs:{...(oP=fn.sizes)==null?void 0:oP.xs,field:{...(aP=fn.sizes)==null?void 0:aP.xs.field,...q2},icon:{insetEnd:"1"}}},gne=une({baseStyle:hne,sizes:pne,variants:fn.variants,defaultProps:fn.defaultProps}),mne=da("skeleton-start-color"),vne=da("skeleton-end-color"),yne=e=>{const t=Ie("gray.100","gray.800")(e),n=Ie("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ei(o,r),s=Ei(o,i);return{[mne.variable]:a,[vne.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},xne={baseStyle:yne},bne=e=>({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",bg:Ie("white","gray.700")(e)}}),Sne={baseStyle:bne},{defineMultiStyleConfig:wne,definePartsStyle:_5}=nr(lQ.keys),zm=da("slider-thumb-size"),Fm=da("slider-track-size"),Cne=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...X9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},_ne=e=>({...X9({orientation:e.orientation,horizontal:{h:Fm.reference},vertical:{w:Fm.reference}}),overflow:"hidden",borderRadius:"sm",bg:Ie("gray.200","whiteAlpha.200")(e),_disabled:{bg:Ie("gray.300","whiteAlpha.300")(e)}}),kne=e=>{const{orientation:t}=e;return{...X9({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:zm.reference,h:zm.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Ene=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",bg:Ie(`${t}.500`,`${t}.200`)(e)}},Pne=_5(e=>({container:Cne(e),track:_ne(e),thumb:kne(e),filledTrack:Ene(e)})),Tne=_5({container:{[zm.variable]:"sizes.4",[Fm.variable]:"sizes.1"}}),Lne=_5({container:{[zm.variable]:"sizes.3.5",[Fm.variable]:"sizes.1"}}),Ane=_5({container:{[zm.variable]:"sizes.2.5",[Fm.variable]:"sizes.0.5"}}),Ine={lg:Tne,md:Lne,sm:Ane},Mne=wne({baseStyle:Pne,sizes:Ine,defaultProps:{size:"md",colorScheme:"blue"}}),hf=Ao("spinner-size"),Rne={width:[hf.reference],height:[hf.reference]},One={xs:{[hf.variable]:"sizes.3"},sm:{[hf.variable]:"sizes.4"},md:{[hf.variable]:"sizes.6"},lg:{[hf.variable]:"sizes.8"},xl:{[hf.variable]:"sizes.12"}},Nne={baseStyle:Rne,sizes:One,defaultProps:{size:"md"}},{defineMultiStyleConfig:Dne,definePartsStyle:EO}=nr(uQ.keys),zne={fontWeight:"medium"},Fne={opacity:.8,marginBottom:"2"},Bne={verticalAlign:"baseline",fontWeight:"semibold"},$ne={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Hne=EO({container:{},label:zne,helpText:Fne,number:Bne,icon:$ne}),Wne={md:EO({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Vne=Dne({baseStyle:Hne,sizes:Wne,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Une,definePartsStyle:Qy}=nr(cQ.keys),Qg=Ao("switch-track-width"),Lf=Ao("switch-track-height"),zb=Ao("switch-track-diff"),Gne=nu.subtract(Qg,Lf),i6=Ao("switch-thumb-x"),jne=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Qg.reference],height:[Lf.reference],transitionProperty:"common",transitionDuration:"fast",bg:Ie("gray.300","whiteAlpha.400")(e),_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{bg:Ie(`${t}.500`,`${t}.200`)(e)}}},qne={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Lf.reference],height:[Lf.reference],_checked:{transform:`translateX(${i6.reference})`}},Kne=Qy(e=>({container:{[zb.variable]:Gne,[i6.variable]:zb.reference,_rtl:{[i6.variable]:nu(zb).negate().toString()}},track:jne(e),thumb:qne})),Zne={sm:Qy({container:{[Qg.variable]:"1.375rem",[Lf.variable]:"sizes.3"}}),md:Qy({container:{[Qg.variable]:"1.875rem",[Lf.variable]:"sizes.4"}}),lg:Qy({container:{[Qg.variable]:"2.875rem",[Lf.variable]:"sizes.6"}})},Yne=Une({baseStyle:Kne,sizes:Zne,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Xne,definePartsStyle:jp}=nr(dQ.keys),Qne=jp({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),e4={"&[data-is-numeric=true]":{textAlign:"end"}},Jne=jp(e=>{const{colorScheme:t}=e;return{th:{color:Ie("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ie(`${t}.100`,`${t}.700`)(e),...e4},td:{borderBottom:"1px",borderColor:Ie(`${t}.100`,`${t}.700`)(e),...e4},caption:{color:Ie("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),ere=jp(e=>{const{colorScheme:t}=e;return{th:{color:Ie("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ie(`${t}.100`,`${t}.700`)(e),...e4},td:{borderBottom:"1px",borderColor:Ie(`${t}.100`,`${t}.700`)(e),...e4},caption:{color:Ie("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ie(`${t}.100`,`${t}.700`)(e)},td:{background:Ie(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),tre={simple:Jne,striped:ere,unstyled:{}},nre={sm:jp({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:jp({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:jp({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},rre=Xne({baseStyle:Qne,variants:tre,sizes:nre,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:ire,definePartsStyle:ml}=nr(fQ.keys),ore=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},are=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},sre=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},lre={p:4},ure=ml(e=>({root:ore(e),tab:are(e),tablist:sre(e),tabpanel:lre})),cre={sm:ml({tab:{py:1,px:4,fontSize:"sm"}}),md:ml({tab:{fontSize:"md",py:2,px:4}}),lg:ml({tab:{fontSize:"lg",py:3,px:4}})},dre=ml(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ie(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ie("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),fre=ml(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ie(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ie("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),hre=ml(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ie("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ie("#fff","gray.800")(e),color:Ie(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),pre=ml(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ei(n,`${t}.700`),bg:Ei(n,`${t}.100`)}}}}),gre=ml(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ie("gray.600","inherit")(e),_selected:{color:Ie("#fff","gray.800")(e),bg:Ie(`${t}.600`,`${t}.300`)(e)}}}}),mre=ml({}),vre={line:dre,enclosed:fre,"enclosed-colored":hre,"soft-rounded":pre,"solid-rounded":gre,unstyled:mre},yre=ire({baseStyle:ure,sizes:cre,variants:vre,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:xre,definePartsStyle:Af}=nr(hQ.keys),bre={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Sre={lineHeight:1.2,overflow:"visible"},wre={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Cre=Af({container:bre,label:Sre,closeButton:wre}),_re={sm:Af({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Af({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Af({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},kre={subtle:Af(e=>{var t;return{container:(t=Zg.variants)==null?void 0:t.subtle(e)}}),solid:Af(e=>{var t;return{container:(t=Zg.variants)==null?void 0:t.solid(e)}}),outline:Af(e=>{var t;return{container:(t=Zg.variants)==null?void 0:t.outline(e)}})},Ere=xre({variants:kre,baseStyle:Cre,sizes:_re,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),sP,Pre={...(sP=fn.baseStyle)==null?void 0:sP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},lP,Tre={outline:e=>{var t;return((t=fn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=fn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=fn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((lP=fn.variants)==null?void 0:lP.unstyled.field)??{}},uP,cP,dP,fP,Lre={xs:((uP=fn.sizes)==null?void 0:uP.xs.field)??{},sm:((cP=fn.sizes)==null?void 0:cP.sm.field)??{},md:((dP=fn.sizes)==null?void 0:dP.md.field)??{},lg:((fP=fn.sizes)==null?void 0:fP.lg.field)??{}},Are={baseStyle:Pre,sizes:Lre,variants:Tre,defaultProps:{size:"md",variant:"outline"}},Fb=Ao("tooltip-bg"),hP=Ao("tooltip-fg"),Ire=Ao("popper-arrow-bg"),Mre=e=>{const t=Ie("gray.700","gray.300")(e),n=Ie("whiteAlpha.900","gray.900")(e);return{bg:Fb.reference,color:hP.reference,[Fb.variable]:`colors.${t}`,[hP.variable]:`colors.${n}`,[Ire.variable]:Fb.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}},Rre={baseStyle:Mre},Ore={Accordion:JQ,Alert:sJ,Avatar:yJ,Badge:Zg,Breadcrumb:TJ,Button:zJ,Checkbox:J3,CloseButton:qJ,Code:XJ,Container:JJ,Divider:iee,Drawer:gee,Editable:wee,Form:Tee,FormError:Oee,FormLabel:Dee,Heading:Bee,Input:fn,Kbd:Zee,Link:Xee,List:nte,Menu:fte,Modal:Cte,NumberInput:Rte,PinInput:zte,Popover:Zte,Progress:rne,Radio:lne,Select:gne,Skeleton:xne,SkipLink:Sne,Slider:Mne,Spinner:Nne,Stat:Vne,Switch:Yne,Table:rre,Tabs:yre,Tag:Ere,Textarea:Are,Tooltip:Rre},Nre={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Dre=Nre,zre={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Fre=zre,Bre={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},$re=Bre,Hre={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Wre=Hre,Vre={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Ure=Vre,Gre={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},jre={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},qre={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Kre={property:Gre,easing:jre,duration:qre},Zre=Kre,Yre={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Xre=Yre,Qre={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Jre=Qre,eie={breakpoints:Fre,zIndices:Xre,radii:Wre,blur:Jre,colors:$re,...CO,sizes:bO,shadows:Ure,space:xO,borders:Dre,transition:Zre},tie={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},nie={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}};function rie(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var iie=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function oie(e){return rie(e)?iie.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var aie="ltr",sie={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},PO={semanticTokens:tie,direction:aie,...eie,components:Ore,styles:nie,config:sie};function Eg(e){return typeof e=="function"}function lie(...e){return t=>e.reduce((n,r)=>r(n),t)}function uie(...e){let t=[...e],n=e[e.length-1];return oie(n)&&t.length>1?t=t.slice(0,t.length-1):n=PO,lie(...t.map(r=>i=>Eg(r)?r(i):cie(i,r)))(n)}function cie(...e){return Ma({},...e,TO)}function TO(e,t,n,r){if((Eg(e)||Eg(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=Eg(e)?e(...i):e,a=Eg(t)?t(...i):t;return Ma({},o,a,TO)}}var die=typeof Element<"u",fie=typeof Map=="function",hie=typeof Set=="function",pie=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Jy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Jy(e[r],t[r]))return!1;return!0}var o;if(fie&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Jy(r.value[1],t.get(r.value[0])))return!1;return!0}if(hie&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(pie&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(die&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!Jy(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var gie=function(t,n){try{return Jy(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function A0(){const e=C.exports.useContext(Nm);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function LO(){const e=o5(),t=A0();return{...e,theme:t}}function mie(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function vie(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function yie(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,c)=>{if(e==="breakpoints")return mie(o,l,a[c]??l);const p=`${e}.${l}`;return vie(o,p,a[c]??l)});return Array.isArray(t)?s:s[0]}}function xie(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>dY(n),[n]);return ne(bX,{theme:i,children:[w(bie,{root:t}),r]})}function bie({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return w(S5,{styles:n=>({[t]:n.__cssVars})})}DX({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Sie(){const{colorMode:e}=o5();return w(S5,{styles:t=>{const n=lO(t,"styles.global"),r=dO(n,{theme:t,colorMode:e});return r?$R(r)(t):void 0}})}var wie=new Set([...pY,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Cie=new Set(["htmlWidth","htmlHeight","htmlSize"]);function _ie(e){return Cie.has(e)||!wie.has(e)}var kie=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=uO(a,(g,m)=>mY(m)),l=dO(e,t),c=Object.assign({},i,l,cO(s),o),p=$R(c)(t.theme);return r?[p,r]:p};function Bb(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=_ie);const i=kie({baseStyle:n}),o=Jw(e,r)(i);return re.forwardRef(function(l,c){const{colorMode:p,forced:g}=o5();return re.createElement(o,{ref:c,"data-theme":g?p:void 0,...l})})}function ke(e){return C.exports.forwardRef(e)}function AO(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=LO(),a=e?lO(i,`components.${e}`):void 0,s=n||a,l=Ma({theme:i,colorMode:o},s?.defaultProps??{},cO(AX(r,["children"]))),c=C.exports.useRef({});if(s){const g=EY(s)(l);gie(c.current,g)||(c.current=g)}return c.current}function oo(e,t={}){return AO(e,t)}function Ai(e,t={}){return AO(e,t)}function Eie(){const e=new Map;return new Proxy(Bb,{apply(t,n,r){return Bb(...r)},get(t,n){return e.has(n)||e.set(n,Bb(n)),e.get(n)}})}var be=Eie();function Pie(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const c=C.exports.useContext(a);if(!c&&n){const p=new Error(o??Pie(r,i));throw p.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,p,s),p}return c}return[a.Provider,s,a]}function Tie(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function zn(...e){return t=>{e.forEach(n=>{Tie(n,t)})}}function Lie(...e){return C.exports.useMemo(()=>zn(...e),e)}function pP(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Aie=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function gP(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function mP(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var o6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,t4=e=>e,Iie=class{descendants=new Map;register=e=>{if(e!=null)return Aie(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=pP(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=gP(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=gP(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=mP(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=mP(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=pP(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Mie(){const e=C.exports.useRef(new Iie);return o6(()=>()=>e.current.destroy()),e.current}var[Rie,IO]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Oie(e){const t=IO(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);o6(()=>()=>{!i.current||t.unregister(i.current)},[]),o6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=t4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:zn(o,i)}}function MO(){return[t4(Rie),()=>t4(IO()),()=>Mie(),i=>Oie(i)]}var Or=(...e)=>e.filter(Boolean).join(" "),vP={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[w("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),w("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),w("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ha=ke((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...c}=e,p=Or("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:p,__css:g},y=r??vP.viewBox;if(n&&typeof n!="string")return re.createElement(be.svg,{as:n,...m,...c});const b=a??vP.path;return re.createElement(be.svg,{verticalAlign:"middle",viewBox:y,...m,...c},b)});ha.displayName="Icon";function rt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=ke((s,l)=>w(ha,{ref:l,viewBox:t,...i,...s,children:o.length?o:w("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function ur(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function k5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,y)=>m!==y}=e,o=ur(r),a=ur(i),[s,l]=C.exports.useState(n),c=t!==void 0,p=c?t:s,g=ur(m=>{const b=typeof m=="function"?m(p):m;!a(p,b)||(c||l(b),o(b))},[c,o,p,a]);return[p,g]}const tC=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),E5=C.exports.createContext({});function Nie(){return C.exports.useContext(E5).visualElement}const I0=C.exports.createContext(null),Kf=typeof document<"u",n4=Kf?C.exports.useLayoutEffect:C.exports.useEffect,RO=C.exports.createContext({strict:!1});function Die(e,t,n,r){const i=Nie(),o=C.exports.useContext(RO),a=C.exports.useContext(I0),s=C.exports.useContext(tC).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const c=l.current;return n4(()=>{c&&c.syncRender()}),C.exports.useEffect(()=>{c&&c.animationState&&c.animationState.animateChanges()}),n4(()=>()=>c&&c.notifyUnmount(),[]),c}function Mp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zie(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Mp(n)&&(n.current=r))},[t])}function Bm(e){return typeof e=="string"||Array.isArray(e)}function P5(e){return typeof e=="object"&&typeof e.start=="function"}const Fie=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function T5(e){return P5(e.animate)||Fie.some(t=>Bm(e[t]))}function OO(e){return Boolean(T5(e)||e.variants)}function Bie(e,t){if(T5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Bm(n)?n:void 0,animate:Bm(r)?r:void 0}}return e.inherit!==!1?t:{}}function $ie(e){const{initial:t,animate:n}=Bie(e,C.exports.useContext(E5));return C.exports.useMemo(()=>({initial:t,animate:n}),[yP(t),yP(n)])}function yP(e){return Array.isArray(e)?e.join(" "):e}const Yl=e=>({isEnabled:t=>e.some(n=>!!t[n])}),$m={measureLayout:Yl(["layout","layoutId","drag"]),animation:Yl(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Yl(["exit"]),drag:Yl(["drag","dragControls"]),focus:Yl(["whileFocus"]),hover:Yl(["whileHover","onHoverStart","onHoverEnd"]),tap:Yl(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Yl(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Yl(["whileInView","onViewportEnter","onViewportLeave"])};function Hie(e){for(const t in e)t==="projectionNodeConstructor"?$m.projectionNodeConstructor=e[t]:$m[t].Component=e[t]}function L5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Jg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Wie=1;function Vie(){return L5(()=>{if(Jg.hasEverUpdated)return Wie++})}const nC=C.exports.createContext({});class Uie extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const NO=C.exports.createContext({}),Gie=Symbol.for("motionComponentSymbol");function jie({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Hie(e);function a(l,c){const p={...C.exports.useContext(tC),...l,layoutId:qie(l)},{isStatic:g}=p;let m=null;const y=$ie(l),b=g?void 0:Vie(),S=i(l,g);if(!g&&Kf){y.visualElement=Die(o,S,p,t);const T=C.exports.useContext(RO).strict,E=C.exports.useContext(NO);y.visualElement&&(m=y.visualElement.loadFeatures(p,T,e,b,n||$m.projectionNodeConstructor,E))}return ne(Uie,{visualElement:y.visualElement,props:p,children:[m,w(E5.Provider,{value:y,children:r(o,l,b,zie(S,y.visualElement,c),S,g,y.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Gie]=o,s}function qie({layoutId:e}){const t=C.exports.useContext(nC).id;return t&&e!==void 0?t+"-"+e:e}function Kie(e){function t(r,i={}){return jie(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Zie=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function rC(e){return typeof e!="string"||e.includes("-")?!1:!!(Zie.indexOf(e)>-1||/[A-Z]/.test(e))}const r4={};function Yie(e){Object.assign(r4,e)}const i4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mv=new Set(i4);function DO(e,{layout:t,layoutId:n}){return mv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!r4[e]||e==="opacity")}const ys=e=>!!e?.getVelocity,Xie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qie=(e,t)=>i4.indexOf(e)-i4.indexOf(t);function Jie({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Qie);for(const s of t)a+=`${Xie[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function zO(e){return e.startsWith("--")}const eoe=(e,t)=>t&&typeof e=="number"?t.transform(e):e,FO=(e,t)=>n=>Math.max(Math.min(n,t),e),em=e=>e%1?Number(e.toFixed(5)):e,Hm=/(-)?([\d]*\.?[\d])+/g,a6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,toe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vv(e){return typeof e=="string"}const Zf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},tm=Object.assign(Object.assign({},Zf),{transform:FO(0,1)}),K2=Object.assign(Object.assign({},Zf),{default:1}),yv=e=>({test:t=>vv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yc=yv("deg"),vl=yv("%"),vt=yv("px"),noe=yv("vh"),roe=yv("vw"),xP=Object.assign(Object.assign({},vl),{parse:e=>vl.parse(e)/100,transform:e=>vl.transform(e*100)}),iC=(e,t)=>n=>Boolean(vv(n)&&toe.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),BO=(e,t,n)=>r=>{if(!vv(r))return r;const[i,o,a,s]=r.match(Hm);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Sf={test:iC("hsl","hue"),parse:BO("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vl.transform(em(t))+", "+vl.transform(em(n))+", "+em(tm.transform(r))+")"},ioe=FO(0,255),$b=Object.assign(Object.assign({},Zf),{transform:e=>Math.round(ioe(e))}),Mc={test:iC("rgb","red"),parse:BO("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$b.transform(e)+", "+$b.transform(t)+", "+$b.transform(n)+", "+em(tm.transform(r))+")"};function ooe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const s6={test:iC("#"),parse:ooe,transform:Mc.transform},Xi={test:e=>Mc.test(e)||s6.test(e)||Sf.test(e),parse:e=>Mc.test(e)?Mc.parse(e):Sf.test(e)?Sf.parse(e):s6.parse(e),transform:e=>vv(e)?e:e.hasOwnProperty("red")?Mc.transform(e):Sf.transform(e)},$O="${c}",HO="${n}";function aoe(e){var t,n,r,i;return isNaN(e)&&vv(e)&&((n=(t=e.match(Hm))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(a6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function WO(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(a6);r&&(n=r.length,e=e.replace(a6,$O),t.push(...r.map(Xi.parse)));const i=e.match(Hm);return i&&(e=e.replace(Hm,HO),t.push(...i.map(Zf.parse))),{values:t,numColors:n,tokenised:e}}function VO(e){return WO(e).values}function UO(e){const{values:t,numColors:n,tokenised:r}=WO(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function loe(e){const t=VO(e);return UO(e)(t.map(soe))}const pu={test:aoe,parse:VO,createTransformer:UO,getAnimatableNone:loe},uoe=new Set(["brightness","contrast","saturate","opacity"]);function coe(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Hm)||[];if(!r)return e;const i=n.replace(r,"");let o=uoe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const doe=/([a-z-]*)\(.*?\)/g,l6=Object.assign(Object.assign({},pu),{getAnimatableNone:e=>{const t=e.match(doe);return t?t.map(coe).join(" "):e}}),bP={...Zf,transform:Math.round},GO={borderWidth:vt,borderTopWidth:vt,borderRightWidth:vt,borderBottomWidth:vt,borderLeftWidth:vt,borderRadius:vt,radius:vt,borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomRightRadius:vt,borderBottomLeftRadius:vt,width:vt,maxWidth:vt,height:vt,maxHeight:vt,size:vt,top:vt,right:vt,bottom:vt,left:vt,padding:vt,paddingTop:vt,paddingRight:vt,paddingBottom:vt,paddingLeft:vt,margin:vt,marginTop:vt,marginRight:vt,marginBottom:vt,marginLeft:vt,rotate:yc,rotateX:yc,rotateY:yc,rotateZ:yc,scale:K2,scaleX:K2,scaleY:K2,scaleZ:K2,skew:yc,skewX:yc,skewY:yc,distance:vt,translateX:vt,translateY:vt,translateZ:vt,x:vt,y:vt,z:vt,perspective:vt,transformPerspective:vt,opacity:tm,originX:xP,originY:xP,originZ:vt,zIndex:bP,fillOpacity:tm,strokeOpacity:tm,numOctaves:bP};function oC(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let c=!1,p=!1,g=!0;for(const m in t){const y=t[m];if(zO(m)){o[m]=y;continue}const b=GO[m],S=eoe(y,b);if(mv.has(m)){if(c=!0,a[m]=S,s.push(m),!g)continue;y!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(p=!0,l[m]=S):i[m]=S}if(t.transform||(c||r?i.transform=Jie(e,n,g,r):i.transform&&(i.transform="none")),p){const{originX:m="50%",originY:y="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${y} ${b}`}}const aC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function jO(e,t,n){for(const r in t)!ys(t[r])&&!DO(r,n)&&(e[r]=t[r])}function foe({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=aC();return oC(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hoe(e,t,n){const r=e.style||{},i={};return jO(i,r,e),Object.assign(i,foe(e,t,n)),e.transformValues?e.transformValues(i):i}function poe(e,t,n){const r={},i=hoe(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const goe=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],moe=["whileTap","onTap","onTapStart","onTapCancel"],voe=["onPan","onPanStart","onPanSessionStart","onPanEnd"],yoe=["whileInView","onViewportEnter","onViewportLeave","viewport"],xoe=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...yoe,...moe,...goe,...voe]);function o4(e){return xoe.has(e)}let qO=e=>!o4(e);function boe(e){!e||(qO=t=>t.startsWith("on")?!o4(t):e(t))}try{boe(require("@emotion/is-prop-valid").default)}catch{}function Soe(e,t,n){const r={};for(const i in e)(qO(i)||n===!0&&o4(i)||!t&&!o4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function SP(e,t,n){return typeof e=="string"?e:vt.transform(t+n*e)}function woe(e,t,n){const r=SP(t,e.x,e.width),i=SP(n,e.y,e.height);return`${r} ${i}`}const Coe={offset:"stroke-dashoffset",array:"stroke-dasharray"},_oe={offset:"strokeDashoffset",array:"strokeDasharray"};function koe(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Coe:_oe;e[o.offset]=vt.transform(-r);const a=vt.transform(t),s=vt.transform(n);e[o.array]=`${a} ${s}`}function sC(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},c,p){oC(e,l,c,p),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:y}=e;g.transform&&(y&&(m.transform=g.transform),delete g.transform),y&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=woe(y,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&koe(g,o,a,s,!1)}const KO=()=>({...aC(),attrs:{}});function Eoe(e,t){const n=C.exports.useMemo(()=>{const r=KO();return sC(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};jO(r,e.style,e),n.style={...r,...n.style}}return n}function Poe(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const c=(rC(n)?Eoe:poe)(r,a,s),g={...Soe(r,typeof n=="string",e),...c,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const ZO=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function YO(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const XO=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function QO(e,t,n,r){YO(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(XO.has(i)?i:ZO(i),t.attrs[i])}function lC(e){const{style:t}=e,n={};for(const r in t)(ys(t[r])||DO(r,e))&&(n[r]=t[r]);return n}function JO(e){const t=lC(e);for(const n in e)if(ys(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function uC(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Wm=e=>Array.isArray(e),Toe=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),eN=e=>Wm(e)?e[e.length-1]||0:e;function e3(e){const t=ys(e)?e.get():e;return Toe(t)?t.toValue():t}function Loe({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Aoe(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const tN=e=>(t,n)=>{const r=C.exports.useContext(E5),i=C.exports.useContext(I0),o=()=>Loe(e,t,r,i);return n?o():L5(o)};function Aoe(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=e3(o[m]);let{initial:a,animate:s}=e;const l=T5(e),c=OO(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let p=n?n.initial===!1:!1;p=p||a===!1;const g=p?s:a;return g&&typeof g!="boolean"&&!P5(g)&&(Array.isArray(g)?g:[g]).forEach(y=>{const b=uC(e,y);if(!b)return;const{transitionEnd:S,transition:T,...E}=b;for(const k in E){let L=E[k];if(Array.isArray(L)){const I=p?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in S)i[k]=S[k]}),i}const Ioe={useVisualState:tN({scrapeMotionValuesFromProps:JO,createRenderState:KO,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}sC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),QO(t,n)}})},Moe={useVisualState:tN({scrapeMotionValuesFromProps:lC,createRenderState:aC})};function Roe(e,{forwardMotionProps:t=!1},n,r,i){return{...rC(e)?Ioe:Moe,preloadedFeatures:n,useRender:Poe(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Vn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Vn||(Vn={}));function A5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function u6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return A5(i,t,n,r)},[e,t,n,r])}function Ooe({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Vn.Focus,!0)},i=()=>{n&&n.setActive(Vn.Focus,!1)};u6(t,"focus",e?r:void 0),u6(t,"blur",e?i:void 0)}function nN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function rN(e){return!!e.touches}function Noe(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Doe={pageX:0,pageY:0};function zoe(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Doe;return{x:r[t+"X"],y:r[t+"Y"]}}function Foe(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function cC(e,t="page"){return{point:rN(e)?zoe(e,t):Foe(e,t)}}const iN=(e,t=!1)=>{const n=r=>e(r,cC(r));return t?Noe(n):n},Boe=()=>Kf&&window.onpointerdown===null,$oe=()=>Kf&&window.ontouchstart===null,Hoe=()=>Kf&&window.onmousedown===null,Woe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Voe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function oN(e){return Boe()?e:$oe()?Voe[e]:Hoe()?Woe[e]:e}function qp(e,t,n,r){return A5(e,oN(t),iN(n,t==="pointerdown"),r)}function a4(e,t,n,r){return u6(e,oN(t),n&&iN(n,t==="pointerdown"),r)}function aN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const wP=aN("dragHorizontal"),CP=aN("dragVertical");function sN(e){let t=!1;if(e==="y")t=CP();else if(e==="x")t=wP();else{const n=wP(),r=CP();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function lN(){const e=sN(!0);return e?(e(),!1):!0}function _P(e,t,n){return(r,i)=>{!nN(r)||lN()||(e.animationState&&e.animationState.setActive(Vn.Hover,t),n&&n(r,i))}}function Uoe({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){a4(r,"pointerenter",e||n?_P(r,!0,e):void 0,{passive:!e}),a4(r,"pointerleave",t||n?_P(r,!1,t):void 0,{passive:!t})}const uN=(e,t)=>t?e===t?!0:uN(e,t.parentElement):!1;function dC(e){return C.exports.useEffect(()=>()=>e(),[])}function cN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Hb=.001,joe=.01,kP=10,qoe=.05,Koe=1;function Zoe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Goe(e<=kP*1e3);let a=1-t;a=l4(qoe,Koe,a),e=l4(joe,kP,e/1e3),a<1?(i=c=>{const p=c*a,g=p*e,m=p-n,y=c6(c,a),b=Math.exp(-g);return Hb-m/y*b},o=c=>{const g=c*a*e,m=g*n+n,y=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-g),S=c6(Math.pow(c,2),a);return(-i(c)+Hb>0?-1:1)*((m-y)*b)/S}):(i=c=>{const p=Math.exp(-c*e),g=(c-n)*e+1;return-Hb+p*g},o=c=>{const p=Math.exp(-c*e),g=(n-c)*(e*e);return p*g});const s=5/e,l=Xoe(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Yoe=12;function Xoe(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function eae(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!EP(e,Joe)&&EP(e,Qoe)){const n=Zoe(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function fC(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=cN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:p,duration:g,isResolvedFromDuration:m}=eae(o),y=PP,b=PP;function S(){const T=p?-(p/1e3):0,E=n-t,k=l/(2*Math.sqrt(s*c)),L=Math.sqrt(s/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=c6(L,k);y=O=>{const D=Math.exp(-k*L*O);return n-D*((T+k*L*E)/I*Math.sin(I*O)+E*Math.cos(I*O))},b=O=>{const D=Math.exp(-k*L*O);return k*L*D*(Math.sin(I*O)*(T+k*L*E)/I+E*Math.cos(I*O))-D*(Math.cos(I*O)*(T+k*L*E)-I*E*Math.sin(I*O))}}else if(k===1)y=I=>n-Math.exp(-L*I)*(E+(T+L*E)*I);else{const I=L*Math.sqrt(k*k-1);y=O=>{const D=Math.exp(-k*L*O),N=Math.min(I*O,300);return n-D*((T+k*L*E)*Math.sinh(N)+I*E*Math.cosh(N))/I}}}return S(),{next:T=>{const E=y(T);if(m)a.done=T>=g;else{const k=b(T)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-E)<=i;a.done=L&&I}return a.value=a.done?n:E,a},flipTarget:()=>{p=-p,[t,n]=[n,t],S()}}}fC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const PP=e=>0,Vm=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Sr=(e,t,n)=>-n*e+n*t+e;function Wb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TP({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Wb(l,s,e+1/3),o=Wb(l,s,e),a=Wb(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const tae=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},nae=[s6,Mc,Sf],LP=e=>nae.find(t=>t.test(e)),dN=(e,t)=>{let n=LP(e),r=LP(t),i=n.parse(e),o=r.parse(t);n===Sf&&(i=TP(i),n=Mc),r===Sf&&(o=TP(o),r=Mc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=tae(i[l],o[l],s));return a.alpha=Sr(i.alpha,o.alpha,s),n.transform(a)}},d6=e=>typeof e=="number",rae=(e,t)=>n=>t(e(n)),I5=(...e)=>e.reduce(rae);function fN(e,t){return d6(e)?n=>Sr(e,t,n):Xi.test(e)?dN(e,t):pN(e,t)}const hN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>fN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=fN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function AP(e){const t=pu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=pu.createTransformer(t),r=AP(e),i=AP(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?I5(hN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},oae=(e,t)=>n=>Sr(e,t,n);function aae(e){if(typeof e=="number")return oae;if(typeof e=="string")return Xi.test(e)?dN:pN;if(Array.isArray(e))return hN;if(typeof e=="object")return iae}function sae(e,t,n){const r=[],i=n||aae(e[0]),o=e.length-1;for(let a=0;an(Vm(e,t,r))}function uae(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Vm(e[o],e[o+1],i);return t[o](s)}}function gN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;s4(o===t.length),s4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=sae(t,r,i),s=o===2?lae(e,a):uae(e,a);return n?l=>s(l4(e[0],e[o-1],l)):s}const M5=e=>t=>1-e(1-t),hC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cae=e=>t=>Math.pow(t,e),mN=e=>t=>t*t*((e+1)*t-e),dae=e=>{const t=mN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},vN=1.525,fae=4/11,hae=8/11,pae=9/10,pC=e=>e,gC=cae(2),gae=M5(gC),yN=hC(gC),xN=e=>1-Math.sin(Math.acos(e)),mC=M5(xN),mae=hC(mC),vC=mN(vN),vae=M5(vC),yae=hC(vC),xae=dae(vN),bae=4356/361,Sae=35442/1805,wae=16061/1805,u4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-u4(1-e*2)):.5*u4(e*2-1)+.5;function kae(e,t){return e.map(()=>t||yN).splice(0,e.length-1)}function Eae(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Pae(e,t){return e.map(n=>n*t)}function t3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Pae(r&&r.length===a.length?r:Eae(a),i);function l(){return gN(s,a,{ease:Array.isArray(n)?n:kae(a,n)})}let c=l();return{next:p=>(o.value=c(p),o.done=p>=i,o),flipTarget:()=>{a.reverse(),c=l()}}}function Tae({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,c=o===void 0?l:o(l);return c!==l&&(s=c-t),{next:p=>{const g=-s*Math.exp(-p/r);return a.done=!(g>i||g<-i),a.value=a.done?c:c+g,a},flipTarget:()=>{}}}const IP={keyframes:t3,spring:fC,decay:Tae};function Lae(e){if(Array.isArray(e.to))return t3;if(IP[e.type])return IP[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?t3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?fC:t3}const bN=1/60*1e3,Aae=typeof performance<"u"?()=>performance.now():()=>Date.now(),SN=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Aae()),bN);function Iae(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,c=!1,p=!1)=>{const g=p&&i,m=g?t:n;return c&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c(e[t]=Iae(()=>Um=!0),e),{}),Rae=xv.reduce((e,t)=>{const n=R5[t];return e[t]=(r,i=!1,o=!1)=>(Um||Dae(),n.schedule(r,i,o)),e},{}),Oae=xv.reduce((e,t)=>(e[t]=R5[t].cancel,e),{});xv.reduce((e,t)=>(e[t]=()=>R5[t].process(Kp),e),{});const Nae=e=>R5[e].process(Kp),wN=e=>{Um=!1,Kp.delta=f6?bN:Math.max(Math.min(e-Kp.timestamp,Mae),1),Kp.timestamp=e,h6=!0,xv.forEach(Nae),h6=!1,Um&&(f6=!1,SN(wN))},Dae=()=>{Um=!0,f6=!0,h6||SN(wN)},zae=()=>Kp;function CN(e,t,n=0){return e-t-n}function Fae(e,t,n=0,r=!0){return r?CN(t+-e,t,n):t-(e-t)+n}function Bae(e,t,n,r){return r?e>=t+n:e<=-n}const $ae=e=>{const t=({delta:n})=>e(n);return{start:()=>Rae.update(t,!0),stop:()=>Oae.update(t)}};function _N(e){var t,n,{from:r,autoplay:i=!0,driver:o=$ae,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:g,onComplete:m,onRepeat:y,onUpdate:b}=e,S=cN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:T}=S,E,k=0,L=S.duration,I,O=!1,D=!0,N;const z=Lae(S);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,T)&&(N=gN([0,100],[r,T],{clamp:!1}),r=0,T=100);const W=z(Object.assign(Object.assign({},S),{from:r,to:T}));function V(){k++,l==="reverse"?(D=k%2===0,a=Fae(a,L,c,D)):(a=CN(a,L,c),l==="mirror"&&W.flipTarget()),O=!1,y&&y()}function q(){E.stop(),m&&m()}function he(ve){if(D||(ve=-ve),a+=ve,!O){const Ee=W.next(Math.max(0,a));I=Ee.value,N&&(I=N(I)),O=D?Ee.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),E.stop()}}}function kN(e,t){return t?e*(1e3/t):0}function Hae({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:p,onUpdate:g,onComplete:m,onStop:y}){let b;function S(L){return n!==void 0&&Lr}function T(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:y}))}function k(L){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(S(e))k({from:e,velocity:t,to:T(e)});else{let L=i*t+e;typeof c<"u"&&(L=c(L));const I=T(L),O=I===n?-1:1;let D,N;const z=W=>{D=N,N=W,t=kN(W-D,zae().delta),(O===1&&W>I||O===-1&&Wb?.stop()}}const p6=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),MP=e=>p6(e)&&e.hasOwnProperty("z"),Z2=(e,t)=>Math.abs(e-t);function yC(e,t){if(d6(e)&&d6(t))return Z2(e,t);if(p6(e)&&p6(t)){const n=Z2(e.x,t.x),r=Z2(e.y,t.y),i=MP(e)&&MP(t)?Z2(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const EN=(e,t)=>1-3*t+3*e,PN=(e,t)=>3*t-6*e,TN=e=>3*e,c4=(e,t,n)=>((EN(t,n)*e+PN(t,n))*e+TN(t))*e,LN=(e,t,n)=>3*EN(t,n)*e*e+2*PN(t,n)*e+TN(t),Wae=1e-7,Vae=10;function Uae(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=c4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Wae&&++s=jae?qae(a,g,e,n):m===0?g:Uae(a,s,s+Y2,e,n)}return a=>a===0||a===1?a:c4(o(a),t,r)}function Zae({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||y)};function c(){s.current&&s.current(),s.current=null}function p(){return c(),a.current=!1,i.animationState&&i.animationState.setActive(Vn.Tap,!1),!lN()}function g(b,S){!p()||(uN(i.getInstance(),b.target)?e&&e(b,S):n&&n(b,S))}function m(b,S){!p()||n&&n(b,S)}function y(b,S){c(),!a.current&&(a.current=!0,s.current=I5(qp(window,"pointerup",g,l),qp(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Vn.Tap,!0),t&&t(b,S))}a4(i,"pointerdown",o?y:void 0,l),dC(c)}const Yae="production",AN=typeof process>"u"||process.env===void 0?Yae:"production",RP=new Set;function IN(e,t,n){e||RP.has(t)||(console.warn(t),n&&console.warn(n),RP.add(t))}const g6=new WeakMap,Vb=new WeakMap,Xae=e=>{const t=g6.get(e.target);t&&t(e)},Qae=e=>{e.forEach(Xae)};function Jae({root:e,...t}){const n=e||document;Vb.has(n)||Vb.set(n,{});const r=Vb.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Qae,{root:e,...t})),r[i]}function ese(e,t,n){const r=Jae(t);return g6.set(e,n),r.observe(e),()=>{g6.delete(e),r.unobserve(e)}}function tse({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ise:rse)(a,o.current,e,i)}const nse={some:0,all:1};function rse(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:nse[o]},l=c=>{const{isIntersecting:p}=c;if(t.isInView===p||(t.isInView=p,a&&!p&&t.hasEnteredView))return;p&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Vn.InView,p);const g=n.getProps(),m=p?g.onViewportEnter:g.onViewportLeave;m&&m(c)};return ese(n.getInstance(),s,l)},[e,r,i,o])}function ise(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(AN!=="production"&&IN(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Vn.InView,!0)}))},[e])}const Rc=e=>t=>(e(t),null),ose={inView:Rc(tse),tap:Rc(Zae),focus:Rc(Ooe),hover:Rc(Uoe)};function xC(){const e=C.exports.useContext(I0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ase(){return sse(C.exports.useContext(I0))}function sse(e){return e===null?!0:e.isPresent}function MN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,lse={linear:pC,easeIn:gC,easeInOut:yN,easeOut:gae,circIn:xN,circInOut:mae,circOut:mC,backIn:vC,backInOut:yae,backOut:vae,anticipate:xae,bounceIn:Cae,bounceInOut:_ae,bounceOut:u4},OP=e=>{if(Array.isArray(e)){s4(e.length===4);const[t,n,r,i]=e;return Kae(t,n,r,i)}else if(typeof e=="string")return lse[e];return e},use=e=>Array.isArray(e)&&typeof e[0]!="number",NP=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&pu.test(t)&&!t.startsWith("url(")),ef=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),X2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ub=()=>({type:"keyframes",ease:"linear",duration:.3}),cse=e=>({type:"keyframes",duration:.8,values:e}),DP={x:ef,y:ef,z:ef,rotate:ef,rotateX:ef,rotateY:ef,rotateZ:ef,scaleX:X2,scaleY:X2,scale:X2,opacity:Ub,backgroundColor:Ub,color:Ub,default:X2},dse=(e,t)=>{let n;return Wm(t)?n=cse:n=DP[e]||DP.default,{to:t,...n(t)}},fse={...GO,color:Xi,backgroundColor:Xi,outlineColor:Xi,fill:Xi,stroke:Xi,borderColor:Xi,borderTopColor:Xi,borderRightColor:Xi,borderBottomColor:Xi,borderLeftColor:Xi,filter:l6,WebkitFilter:l6},bC=e=>fse[e];function SC(e,t){var n;let r=bC(e);return r!==l6&&(r=pu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const hse={current:!1},RN=1/60*1e3,pse=typeof performance<"u"?()=>performance.now():()=>Date.now(),ON=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(pse()),RN);function gse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,c=!1,p=!1)=>{const g=p&&i,m=g?t:n;return c&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c(e[t]=gse(()=>Gm=!0),e),{}),xs=bv.reduce((e,t)=>{const n=O5[t];return e[t]=(r,i=!1,o=!1)=>(Gm||yse(),n.schedule(r,i,o)),e},{}),Wf=bv.reduce((e,t)=>(e[t]=O5[t].cancel,e),{}),Gb=bv.reduce((e,t)=>(e[t]=()=>O5[t].process(Zp),e),{}),vse=e=>O5[e].process(Zp),NN=e=>{Gm=!1,Zp.delta=m6?RN:Math.max(Math.min(e-Zp.timestamp,mse),1),Zp.timestamp=e,v6=!0,bv.forEach(vse),v6=!1,Gm&&(m6=!1,ON(NN))},yse=()=>{Gm=!0,m6=!0,v6||ON(NN)},y6=()=>Zp;function DN(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Wf.read(r),e(o-t))};return xs.read(r,!0),()=>Wf.read(r)}function xse({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...c}){return!!Object.keys(c).length}function bse({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=d4(o.duration)),o.repeatDelay&&(a.repeatDelay=d4(o.repeatDelay)),e&&(a.ease=use(e)?e.map(OP):OP(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Sse(e,t){var n,r;return(r=(n=(wC(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function wse(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Cse(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),wse(t),xse(e)||(e={...e,...dse(n,t.to)}),{...t,...bse(e)}}function _se(e,t,n,r,i){const o=wC(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=NP(e,n);a==="none"&&s&&typeof n=="string"?a=SC(e,n):zP(a)&&typeof n=="string"?a=FP(n):!Array.isArray(n)&&zP(n)&&typeof a=="string"&&(n=FP(a));const l=NP(e,a);function c(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Hae({...g,...o}):_N({...Cse(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function p(){const g=eN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?p:c}function zP(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function FP(e){return typeof e=="number"?0:SC("",e)}function wC(e,t){return e[t]||e.default||e}function CC(e,t,n,r={}){return hse.current&&(r={type:!1}),t.start(i=>{let o;const a=_se(e,t,n,r,i),s=Sse(r,e),l=()=>o=a();let c;return s?c=DN(l,d4(s)):l(),()=>{c&&c(),o&&o.stop()}})}const kse=e=>/^\-?\d*\.?\d+$/.test(e),Ese=e=>/^0[^.\s]+$/.test(e);function _C(e,t){e.indexOf(t)===-1&&e.push(t)}function kC(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class nm{constructor(){this.subscriptions=[]}add(t){return _C(this.subscriptions,t),()=>kC(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Tse{constructor(t){this.version="7.6.2",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new nm,this.velocityUpdateSubscribers=new nm,this.renderSubscribers=new nm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=y6();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,xs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>xs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Pse(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?kN(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function g0(e){return new Tse(e)}const zN=e=>t=>t.test(e),Lse={test:e=>e==="auto",parse:e=>e},FN=[Zf,vt,vl,yc,roe,noe,Lse],sg=e=>FN.find(zN(e)),Ase=[...FN,Xi,pu],Ise=e=>Ase.find(zN(e));function Mse(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Rse(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function N5(e,t,n){const r=e.getProps();return uC(r,t,n!==void 0?n:r.custom,Mse(e),Rse(e))}function Ose(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,g0(n))}function Nse(e,t){const n=N5(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=eN(o[a]);Ose(e,a,s)}}function Dse(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;sx6(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=x6(e,t,n);else{const i=typeof t=="function"?N5(e,t,n.custom):t;r=BN(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function x6(e,t,n={}){var r;const i=N5(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>BN(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(c=0)=>{const{delayChildren:p=0,staggerChildren:g,staggerDirection:m}=o;return $se(e,t,p+c,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,p]=l==="beforeChildren"?[a,s]:[s,a];return c().then(p)}else return Promise.all([a(),s(n.delay)])}function BN(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(a=r);const p=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const y=e.getValue(m),b=l[m];if(!y||b===void 0||g&&Wse(g,m))continue;let S={delay:n,...a};e.shouldReduceMotion&&mv.has(m)&&(S={...S,type:!1,delay:0});let T=CC(m,y,b,S);f4(c)&&(c.add(m),T=T.then(()=>c.remove(m))),p.push(T)}return Promise.all(p).then(()=>{s&&Nse(e,s)})}function $se(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(Hse).forEach((c,p)=>{a.push(x6(c,t,{...o,delay:n+l(p)}).then(()=>c.notifyAnimationComplete(t)))}),Promise.all(a)}function Hse(e,t){return e.sortNodePosition(t)}function Wse({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const EC=[Vn.Animate,Vn.InView,Vn.Focus,Vn.Hover,Vn.Tap,Vn.Drag,Vn.Exit],Vse=[...EC].reverse(),Use=EC.length;function Gse(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Bse(e,n,r)))}function jse(e){let t=Gse(e);const n=Kse();let r=!0;const i=(l,c)=>{const p=N5(e,c);if(p){const{transition:g,transitionEnd:m,...y}=p;l={...l,...y,...m}}return l};function o(l){t=l(e)}function a(l,c){var p;const g=e.getProps(),m=e.getVariantContext(!0)||{},y=[],b=new Set;let S={},T=1/0;for(let k=0;kT&&D;const q=Array.isArray(O)?O:[O];let he=q.reduce(i,{});N===!1&&(he={});const{prevResolvedValues:de={}}=I,ve={...de,...he},Ee=xe=>{V=!0,b.delete(xe),I.needsAnimating[xe]=!0};for(const xe in ve){const Z=he[xe],U=de[xe];S.hasOwnProperty(xe)||(Z!==U?Wm(Z)&&Wm(U)?!MN(Z,U)||W?Ee(xe):I.protectedKeys[xe]=!0:Z!==void 0?Ee(xe):b.add(xe):Z!==void 0&&b.has(xe)?Ee(xe):I.protectedKeys[xe]=!0)}I.prevProp=O,I.prevResolvedValues=he,I.isActive&&(S={...S,...he}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&y.push(...q.map(xe=>({animation:xe,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),y.push({animation:k})}let E=Boolean(y.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(y):Promise.resolve()}function s(l,c,p){var g;if(n[l].isActive===c)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(y=>{var b;return(b=y.animationState)===null||b===void 0?void 0:b.setActive(l,c)}),n[l].isActive=c;const m=a(p,l);for(const y in n)n[y].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function qse(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!MN(t,e):!1}function tf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kse(){return{[Vn.Animate]:tf(!0),[Vn.InView]:tf(),[Vn.Hover]:tf(),[Vn.Tap]:tf(),[Vn.Drag]:tf(),[Vn.Focus]:tf(),[Vn.Exit]:tf()}}const Zse={animation:Rc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=jse(e)),P5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Rc(e=>{const{custom:t,visualElement:n}=e,[r,i]=xC(),o=C.exports.useContext(I0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Vn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class $N{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=qb(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=yC(c.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:m}=c,{timestamp:y}=y6();this.history.push({...m,timestamp:y});const{onStart:b,onMove:S}=this.handlers;p||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,c)},this.handlePointerMove=(c,p)=>{if(this.lastMoveEvent=c,this.lastMoveEventInfo=jb(p,this.transformPagePoint),nN(c)&&c.buttons===0){this.handlePointerUp(c,p);return}xs.update(this.updatePoint,!0)},this.handlePointerUp=(c,p)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,y=qb(jb(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(c,y),m&&m(c,y)},rN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=cC(t),o=jb(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=y6();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,qb(o,this.history)),this.removeListeners=I5(qp(window,"pointermove",this.handlePointerMove),qp(window,"pointerup",this.handlePointerUp),qp(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wf.update(this.updatePoint)}}function jb(e,t){return t?{point:t(e.point)}:e}function BP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qb({point:e},t){return{point:e,delta:BP(e,HN(t)),offset:BP(e,Yse(t)),velocity:Xse(t,.1)}}function Yse(e){return e[0]}function HN(e){return e[e.length-1]}function Xse(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=HN(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>d4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function aa(e){return e.max-e.min}function $P(e,t=0,n=.01){return yC(e,t)n&&(e=r?Sr(n,e,r.max):Math.min(e,n)),e}function UP(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ele(e,{top:t,left:n,bottom:r,right:i}){return{x:UP(e.x,n,i),y:UP(e.y,t,r)}}function GP(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Vm(t.min,t.max-r,e.min):r>i&&(n=Vm(e.min,e.max-i,t.min)),l4(0,1,n)}function rle(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const b6=.35;function ile(e=b6){return e===!1?e=0:e===!0&&(e=b6),{x:jP(e,"left","right"),y:jP(e,"top","bottom")}}function jP(e,t,n){return{min:qP(e,t),max:qP(e,n)}}function qP(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const KP=()=>({translate:0,scale:1,origin:0,originPoint:0}),om=()=>({x:KP(),y:KP()}),ZP=()=>({min:0,max:0}),bi=()=>({x:ZP(),y:ZP()});function nl(e){return[e("x"),e("y")]}function WN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ole({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ale(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kb(e){return e===void 0||e===1}function S6({scale:e,scaleX:t,scaleY:n}){return!Kb(e)||!Kb(t)||!Kb(n)}function sf(e){return S6(e)||VN(e)||e.z||e.rotate||e.rotateX||e.rotateY}function VN(e){return YP(e.x)||YP(e.y)}function YP(e){return e&&e!=="0%"}function h4(e,t,n){const r=e-n,i=t*r;return n+i}function XP(e,t,n,r,i){return i!==void 0&&(e=h4(e,i,r)),h4(e,n,r)+t}function w6(e,t=0,n=1,r,i){e.min=XP(e.min,t,n,r,i),e.max=XP(e.max,t,n,r,i)}function UN(e,{x:t,y:n}){w6(e.x,t.translate,t.scale,t.originPoint),w6(e.y,n.translate,n.scale,n.originPoint)}function sle(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let c=0;c{this.stopAnimation(),n&&this.snapToCursor(cC(s,"page").point)},i=(s,l)=>{var c;const{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();p&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=sN(p),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nl(y=>{var b,S;let T=this.getAxisMotionValue(y).get()||0;if(vl.test(T)){const E=(S=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||S===void 0?void 0:S.actual[y];E&&(T=aa(E)*(parseFloat(T)/100))}this.originPoint[y]=T}),m?.(s,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(Vn.Drag,!0))},o=(s,l)=>{const{dragPropagation:c,dragDirectionLock:p,onDirectionLock:g,onDrag:m}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:y}=l;if(p&&this.currentDirection===null){this.currentDirection=hle(y),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new $N(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Vn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Q2(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Jse(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Mp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ele(r.actual,t):this.constraints=!1,this.elastic=ile(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&nl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=rle(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Mp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cle(r,i.root,this.visualElement.getTransformPagePoint());let a=tle(i.layout.actual,o);if(n){const s=n(ole(a));this.hasMutatedConstraints=!!s,s&&(a=WN(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=nl(p=>{var g;if(!Q2(p,n,this.currentDirection))return;let m=(g=l?.[p])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const y=i?200:1e6,b=i?40:1e7,S={type:"inertia",velocity:r?t[p]:0,bounceStiffness:y,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(p,S)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return CC(t,r,0,n)}stopAnimation(){nl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){nl(n=>{const{drag:r}=this.getProps();if(!Q2(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-Sr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Mp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};nl(s=>{const l=this.getAxisMotionValue(s);if(l){const c=l.get();o[s]=nle({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),nl(s=>{if(!Q2(s,n,null))return;const l=this.getAxisMotionValue(s),{min:c,max:p}=this.constraints[s];l.set(Sr(c,p,o[s]))})}addListeners(){var t;dle.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=qp(n,"pointerdown",c=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();Mp(c)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=A5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:p})=>{this.isDragging&&p&&(nl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=c[g].translate,m.set(m.get()+c[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=b6,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Q2(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hle(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function ple(e){const{dragControls:t,visualElement:n}=e,r=L5(()=>new fle(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function gle({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(tC),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(p,g)=>{a.current=null,n&&n(p,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function c(p){a.current=new $N(p,l,{transformPagePoint:s})}a4(i,"pointerdown",o&&c),dC(()=>a.current&&a.current.end())}const mle={pan:Rc(gle),drag:Rc(ple)},C6={current:null},jN={current:!1};function vle(){if(jN.current=!0,!!Kf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>C6.current=e.matches;e.addListener(t),t()}else C6.current=!1}const J2=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function yle(){const e=J2.map(()=>new nm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{J2.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+J2[i]]=o=>r.add(o),n["notify"+J2[i]]=(...o)=>r.notify(...o)}),n}function xle(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ys(o))e.addValue(i,o),f4(r)&&r.add(i);else if(ys(a))e.addValue(i,g0(o)),f4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,g0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const qN=Object.keys($m),ble=qN.length,KN=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:c})=>({parent:p,props:g,presenceId:m,blockInitialAnimation:y,visualState:b,reducedMotionConfig:S},T={})=>{let E=!1;const{latestValues:k,renderState:L}=b;let I;const O=yle(),D=new Map,N=new Map;let z={};const W={...k},V=g.initial?{...k}:{};let q;function he(){!I||!E||(de(),o(I,L,g.style,ae.projection))}function de(){t(ae,L,k,T,g)}function ve(){O.notifyUpdate(k)}function Ee(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&xs.update(ve,!1,!0)}),Se=me.onRenderRequest(ae.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:xe,...Z}=c(g);for(const X in Z){const me=Z[X];k[X]!==void 0&&ys(me)&&(me.set(k[X],!1),f4(xe)&&xe.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&ys(me)&&me.set(k[X])}const U=T5(g),ee=OO(g),ae={treeType:e,current:null,depth:p?p.depth+1:0,parent:p,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:ee?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(p?.isMounted()),blockInitialAnimation:y,isMounted:()=>Boolean(I),mount(X){E=!0,I=ae.current=X,ae.projection&&ae.projection.mount(X),ee&&p&&!U&&(q=p?.addVariantChild(ae)),D.forEach((me,ye)=>Ee(ye,me)),jN.current||vle(),ae.shouldReduceMotion=S==="never"?!1:S==="always"?!0:C6.current,p?.children.add(ae),ae.setProps(g)},unmount(){var X;(X=ae.projection)===null||X===void 0||X.unmount(),Wf.update(ve),Wf.render(he),N.forEach(me=>me()),q?.(),p?.children.delete(ae),O.clearAllListeners(),I=void 0,E=!1},loadFeatures(X,me,ye,Se,He,je){const ut=[];for(let qe=0;qeae.scheduleRender(),animationType:typeof ot=="string"?ot:"both",initialPromotionConfig:je,layoutScroll:Rt})}return ut},addVariantChild(X){var me;const ye=ae.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(ae.getInstance(),X.getInstance())},getClosestVariantNode:()=>ee?ae:p?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){ae.isVisible!==X&&(ae.isVisible=X,ae.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(ae,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){ae.hasValue(X)&&ae.removeValue(X),D.set(X,me),k[X]=me.get(),Ee(X,me)},removeValue(X){var me;D.delete(X),(me=N.get(X))===null||me===void 0||me(),N.delete(X),delete k[X],s(X,L)},hasValue:X=>D.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=D.get(X);return ye===void 0&&me!==void 0&&(ye=g0(me),ae.addValue(X,ye)),ye},forEachValue:X=>D.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,T),setBaseTarget(X,me){W[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=uC(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!ys(He))return He}return V[X]!==void 0&&Se===void 0?void 0:W[X]},...O,build(){return de(),L},scheduleRender(){xs.render(he,!1,!0)},syncRender:he,setProps(X){(X.transformTemplate||g.transformTemplate)&&ae.scheduleRender(),g=X,O.updatePropListeners(X),z=xle(ae,c(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return p?.getVariantContext();if(!U){const ye=p?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!_6(o))return;const a=k6(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!_6(o))continue;const a=k6(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _le=new Set(["width","height","top","left","right","bottom","x","y"]),XN=e=>_le.has(e),kle=e=>Object.keys(e).some(XN),QN=(e,t)=>{e.set(t,!1),e.set(t)},JP=e=>e===Zf||e===vt;var eT;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(eT||(eT={}));const tT=(e,t)=>parseFloat(e.split(", ")[t]),nT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return tT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?tT(o[1],e):0}},Ele=new Set(["x","y","z"]),Ple=i4.filter(e=>!Ele.has(e));function Tle(e){const t=[];return Ple.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const rT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nT(4,13),y:nT(5,14)},Lle=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{s[c]=rT[c](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(c=>{const p=t.getValue(c);QN(p,s[c]),e[c]=rT[c](l,o)}),e},Ale=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(XN);let o=[],a=!1;const s=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let p=n[l],g=sg(p);const m=t[l];let y;if(Wm(m)){const b=m.length,S=m[0]===null?1:0;p=m[S],g=sg(p);for(let T=S;T=0?window.pageYOffset:null,c=Lle(t,e,s);return o.length&&o.forEach(([p,g])=>{e.getValue(p).set(g)}),e.syncRender(),Kf&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Ile(e,t,n,r){return kle(t)?Ale(e,t,n,r):{target:t,transitionEnd:r}}const Mle=(e,t,n,r)=>{const i=Cle(e,t,r);return t=i.target,r=i.transitionEnd,Ile(e,t,n,r)};function Rle(e){return window.getComputedStyle(e)}const JN={treeType:"dom",readValueFromInstance(e,t){if(mv.has(t)){const n=bC(t);return n&&n.default||0}else{const n=Rle(e),r=(zO(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return GN(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Fse(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Dse(e,r,a);const s=Mle(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:lC,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),oC(t,n,r,i.transformTemplate)},render:YO},Ole=KN(JN),Nle=KN({...JN,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return mv.has(t)?((n=bC(t))===null||n===void 0?void 0:n.default)||0:(t=XO.has(t)?t:ZO(t),e.getAttribute(t))},scrapeMotionValuesFromProps:JO,build(e,t,n,r,i){sC(t,n,r,i.transformTemplate)},render:QO}),Dle=(e,t)=>rC(e)?Nle(t,{enableHardwareAcceleration:!1}):Ole(t,{enableHardwareAcceleration:!0});function iT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(vt.test(e))e=parseFloat(e);else return e;const n=iT(e,t.target.x),r=iT(e,t.target.y);return`${n}% ${r}%`}},oT="_$css",zle={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(YN,y=>(o.push(y),oT)));const a=pu.parse(e);if(a.length>5)return r;const s=pu.createTransformer(e),l=typeof a[0]!="number"?1:0,c=n.x.scale*t.x,p=n.y.scale*t.y;a[0+l]/=c,a[1+l]/=p;const g=Sr(c,p,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let y=0;m=m.replace(oT,()=>{const b=o[y];return y++,b})}return m}};class Fle extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Yie($le),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Jg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||xs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Ble(e){const[t,n]=xC(),r=C.exports.useContext(nC);return w(Fle,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(NO),isPresent:t,safeToRemove:n})}const $le={borderRadius:{...lg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lg,borderTopRightRadius:lg,borderBottomLeftRadius:lg,borderBottomRightRadius:lg,boxShadow:zle},Hle={measureLayout:Ble};function Wle(e,t,n={}){const r=ys(e)?e:g0(e);return CC("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const eD=["TopLeft","TopRight","BottomLeft","BottomRight"],Vle=eD.length,aT=e=>typeof e=="string"?parseFloat(e):e,sT=e=>typeof e=="number"||vt.test(e);function Ule(e,t,n,r,i,o){var a,s,l,c;i?(e.opacity=Sr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Gle(r)),e.opacityExit=Sr((s=t.opacity)!==null&&s!==void 0?s:1,0,jle(r))):o&&(e.opacity=Sr((l=t.opacity)!==null&&l!==void 0?l:1,(c=n.opacity)!==null&&c!==void 0?c:1,r));for(let p=0;prt?1:n(Vm(e,t,r))}function uT(e,t){e.min=t.min,e.max=t.max}function ls(e,t){uT(e.x,t.x),uT(e.y,t.y)}function cT(e,t,n,r,i){return e-=t,e=h4(e,1/n,r),i!==void 0&&(e=h4(e,1/i,r)),e}function qle(e,t=0,n=1,r=.5,i,o=e,a=e){if(vl.test(t)&&(t=parseFloat(t),t=Sr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Sr(o.min,o.max,r);e===o&&(s-=t),e.min=cT(e.min,t,n,s,i),e.max=cT(e.max,t,n,s,i)}function dT(e,t,[n,r,i],o,a){qle(e,t[n],t[r],t[i],t.scale,o,a)}const Kle=["x","scaleX","originX"],Zle=["y","scaleY","originY"];function fT(e,t,n,r){dT(e.x,t,Kle,n?.x,r?.x),dT(e.y,t,Zle,n?.y,r?.y)}function hT(e){return e.translate===0&&e.scale===1}function nD(e){return hT(e.x)&&hT(e.y)}function rD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function pT(e){return aa(e.x)/aa(e.y)}function Yle(e,t,n=.1){return yC(e,t)<=n}class Xle{constructor(){this.members=[]}add(t){_C(this.members,t),t.scheduleRender()}remove(t){if(kC(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Qle="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function gT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:c,rotateY:p}=n;l&&(o+=`rotate(${l}deg) `),c&&(o+=`rotateX(${c}deg) `),p&&(o+=`rotateY(${p}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Qle?"none":o}const Jle=(e,t)=>e.depth-t.depth;class eue{constructor(){this.children=[],this.isDirty=!1}add(t){_C(this.children,t),this.isDirty=!0}remove(t){kC(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jle),this.isDirty=!1,this.children.forEach(t)}}const mT=["","X","Y","Z"],vT=1e3;function iD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(oue),this.nodes.forEach(aue)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let c=0;cthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=DN(y,250),Jg.hasAnimatedSinceResize&&(Jg.hasAnimatedSinceResize=!1,this.nodes.forEach(xT))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&g&&(c||p)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeTargetChanged:b,layout:S})=>{var T,E,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(E=(T=this.options.transition)!==null&&T!==void 0?T:g.getDefaultTransition())!==null&&E!==void 0?E:due,{onLayoutAnimationStart:D,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!rD(this.targetLayout,S)||b,W=!y&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||W||y&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,W);const V={...wC(O,"layout"),onPlay:D,onComplete:N};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!y&&this.animationProgress===0&&xT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=S})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Wf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(sue))}willUpdate(a=!0){var s,l,c;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));CT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{var k;const L=E/1e3;bT(m.x,a.x,L),bT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(im(y,this.layout.actual,this.relativeParent.layout.actual),uue(this.relativeTarget,this.relativeTargetOrigin,y,L)),b&&(this.animationValues=g,Ule(g,p,this.latestValues,L,T,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Wf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xs.update(()=>{Jg.hasAnimatedSinceResize=!0,this.currentAnimation=Wle(0,vT,{...a,onUpdate:c=>{var p;this.mixTargetDelta(c),(p=a.onUpdate)===null||p===void 0||p.call(a,c)},onComplete:()=>{var c;(c=a.onComplete)===null||c===void 0||c.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,vT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:p}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&oD(this.options.animationType,this.layout.actual,c.actual)){l=this.target||bi();const g=aa(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=aa(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Rp(s,p),rm(this.projectionDeltaWithTransform,this.layoutCorrected,s,p)}}registerSharedNode(a,s){var l,c,p;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Xle),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(p=(c=s.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||p===void 0?void 0:p.call(c,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let c=0;c{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(yT),this.root.sharedNodes.clear()}}}function tue(e){e.updateLayout()}function nue(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?nl(m=>{const y=i.isShared?i.measured[m]:i.layout[m],b=aa(y);y.min=o[m].min,y.max=y.min+b}):oD(s,i.layout,o)&&nl(m=>{const y=i.isShared?i.measured[m]:i.layout[m],b=aa(o[m]);y.max=y.min+b});const l=om();rm(l,o,i.layout);const c=om();i.isShared?rm(c,e.applyTransform(a,!0),i.measured):rm(c,o,i.layout);const p=!nD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:y}=e.relativeParent;if(m&&y){const b=bi();im(b,i.layout,m.layout);const S=bi();im(S,o,y.actual),rD(b,S)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:c,layoutDelta:l,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function rue(e){e.clearSnapshot()}function yT(e){e.clearMeasurements()}function iue(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function xT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function oue(e){e.resolveTargetDelta()}function aue(e){e.calcProjection()}function sue(e){e.resetRotation()}function lue(e){e.removeLeadSnapshot()}function bT(e,t,n){e.translate=Sr(t.translate,0,n),e.scale=Sr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ST(e,t,n,r){e.min=Sr(t.min,n.min,r),e.max=Sr(t.max,n.max,r)}function uue(e,t,n,r){ST(e.x,t.x,n.x,r),ST(e.y,t.y,n.y,r)}function cue(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const due={duration:.45,ease:[.4,0,.1,1]};function fue(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function wT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function CT(e){wT(e.x),wT(e.y)}function oD(e,t,n){return e==="position"||e==="preserve-aspect"&&!Yle(pT(t),pT(n),.2)}const hue=iD({attachResizeListener:(e,t)=>A5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zb={current:void 0},pue=iD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zb.current){const e=new hue(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Zb.current=e}return Zb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),gue={...Zse,...ose,...mle,...Hle},Ha=Kie((e,t)=>Roe(e,t,gue,Dle,pue));function aD(){const e=C.exports.useRef(!1);return n4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mue(){const e=aD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>xs.postRender(r),[r]),t]}class vue extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yue({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(c)}},[t]),w(vue,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const Yb=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=L5(xue),l=C.exports.useId(),c=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:p=>{s.set(p,!0);for(const g of s.values())if(!g)return;r&&r()},register:p=>(s.set(p,!1),()=>s.delete(p))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((p,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=w(yue,{isPresent:n,children:e})),w(I0.Provider,{value:c,children:e})};function xue(){return new Map}const yp=e=>e.key||"";function bue(e,t){e.forEach(n=>{const r=yp(n);t.set(r,n)})}function Sue(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const wu=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",IN(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=mue();const l=C.exports.useContext(nC).forceRender;l&&(s=l);const c=aD(),p=Sue(e);let g=p;const m=new Set,y=C.exports.useRef(g),b=C.exports.useRef(new Map).current,S=C.exports.useRef(!0);if(n4(()=>{S.current=!1,bue(p,b),y.current=g}),dC(()=>{S.current=!0,b.clear(),m.clear()}),S.current)return w(Fn,{children:g.map(L=>w(Yb,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},yp(L)))});g=[...g];const T=y.current.map(yp),E=p.map(yp),k=T.length;for(let L=0;L{if(E.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=T.indexOf(L),D=()=>{b.delete(L),m.delete(L);const N=y.current.findIndex(z=>z.key===L);if(y.current.splice(N,1),!m.size){if(y.current=p,c.current===!1)return;s(),r&&r()}};g.splice(O,0,w(Yb,{isPresent:!1,onExitComplete:D,custom:t,presenceAffectsLayout:o,mode:a,children:I},yp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:w(Yb,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},yp(L))}),AN!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),w(Fn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var ul=function(){return ul=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function E6(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function wue(){return!1}var Cue=e=>{const{condition:t,message:n}=e;t&&wue()&&console.warn(n)},wf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},ug={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function P6(e){switch(e?.direction??"right"){case"right":return ug.slideRight;case"left":return ug.slideLeft;case"bottom":return ug.slideDown;case"top":return ug.slideUp;default:return ug.slideRight}}var If={enter:{duration:.2,ease:wf.easeOut},exit:{duration:.1,ease:wf.easeIn}},bs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},_ue=e=>e!=null&&parseInt(e.toString(),10)>0,kT={exit:{height:{duration:.2,ease:wf.ease},opacity:{duration:.3,ease:wf.ease}},enter:{height:{duration:.3,ease:wf.ease},opacity:{duration:.4,ease:wf.ease}}},kue={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:_ue(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??bs.exit(kT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??bs.enter(kT.enter,i)})},lD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:c,transitionEnd:p,...g}=e,[m,y]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{y(!0)});return()=>clearTimeout(k)},[]),Cue({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,S={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?c:{enter:{duration:0}},transitionEnd:{enter:p?.enter,exit:r?p?.exit:{...p?.exit,display:b?"block":"none"}}},T=r?n:!0,E=n||r?"enter":"exit";return w(wu,{initial:!1,custom:S,children:T&&re.createElement(Ha.div,{ref:t,...g,className:Sv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:S,variants:kue,initial:r?"exit":!1,animate:E,exit:"exit"})})});lD.displayName="Collapse";var Eue={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??bs.enter(If.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??bs.exit(If.exit,n),transitionEnd:t?.exit})},uD={initial:"exit",animate:"enter",exit:"exit",variants:Eue},Pue=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...c}=t,p=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return w(wu,{custom:m,children:g&&re.createElement(Ha.div,{ref:n,className:Sv("chakra-fade",o),custom:m,...uD,animate:p,...c})})});Pue.displayName="Fade";var Tue={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??bs.exit(If.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??bs.enter(If.enter,n),transitionEnd:e?.enter})},cD={initial:"exit",animate:"enter",exit:"exit",variants:Tue},Lue=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:c,delay:p,...g}=t,m=r?i&&r:!0,y=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:c,delay:p};return w(wu,{custom:b,children:m&&re.createElement(Ha.div,{ref:n,className:Sv("chakra-offset-slide",s),...cD,animate:y,custom:b,...g})})});Lue.displayName="ScaleFade";var ET={exit:{duration:.15,ease:wf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Aue={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=P6({direction:e});return{...i,transition:t?.exit??bs.exit(ET.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=P6({direction:e});return{...i,transition:n?.enter??bs.enter(ET.enter,r),transitionEnd:t?.enter}}},dD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:c,delay:p,motionProps:g,...m}=t,y=P6({direction:r}),b=Object.assign({position:"fixed"},y.position,i),S=o?a&&o:!0,T=a||o?"enter":"exit",E={transitionEnd:c,transition:l,direction:r,delay:p};return w(wu,{custom:E,children:S&&re.createElement(Ha.div,{...m,ref:n,initial:"exit",className:Sv("chakra-slide",s),animate:T,exit:"exit",custom:E,variants:Aue,style:b,...g})})});dD.displayName="Slide";var Iue={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??bs.exit(If.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??bs.enter(If.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??bs.exit(If.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},T6={initial:"initial",animate:"enter",exit:"exit",variants:Iue},Mue=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:c,transitionEnd:p,delay:g,...m}=t,y=r?i&&r:!0,b=i||r?"enter":"exit",S={offsetX:s,offsetY:l,reverse:o,transition:c,transitionEnd:p,delay:g};return w(wu,{custom:S,children:y&&re.createElement(Ha.div,{ref:n,className:Sv("chakra-offset-slide",a),custom:S,...T6,animate:b,...m})})});Mue.displayName="SlideFade";var wv=(...e)=>e.filter(Boolean).join(" ");function Rue(){return!1}var D5=e=>{const{condition:t,message:n}=e;t&&Rue()&&console.warn(n)};function Xb(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Oue,z5]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Nue,PC]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Due,LCe,zue,Fue]=MO(),Cf=ke(function(t,n){const{getButtonProps:r}=PC(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...z5().button};return re.createElement(be.button,{...i,className:wv("chakra-accordion__button",t.className),__css:a})});Cf.displayName="AccordionButton";function Bue(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Wue(e),Vue(e);const s=zue(),[l,c]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{c(-1)},[]);const[p,g]=k5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:p,setIndex:g,htmlProps:a,getAccordionItemProps:y=>{let b=!1;return y!==null&&(b=Array.isArray(p)?p.includes(y):p===y),{isOpen:b,onChange:T=>{if(y!==null)if(i&&Array.isArray(p)){const E=T?p.concat(y):p.filter(k=>k!==y);g(E)}else T?g(y):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:c,descendants:s}}var[$ue,TC]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Hue(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=TC(),s=C.exports.useRef(null),l=C.exports.useId(),c=r??l,p=`accordion-button-${c}`,g=`accordion-panel-${c}`;Uue(e);const{register:m,index:y,descendants:b}=Fue({disabled:t&&!n}),{isOpen:S,onChange:T}=o(y===-1?null:y);Gue({isOpen:S,isDisabled:t});const E=()=>{T?.(!0)},k=()=>{T?.(!1)},L=C.exports.useCallback(()=>{T?.(!S),a(y)},[y,a,S,T]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const q=b.nextEnabled(y);q?.node.focus()},ArrowUp:()=>{const q=b.prevEnabled(y);q?.node.focus()},Home:()=>{const q=b.firstEnabled();q?.node.focus()},End:()=>{const q=b.lastEnabled();q?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,y]),O=C.exports.useCallback(()=>{a(y)},[a,y]),D=C.exports.useCallback(function(W={},V=null){return{...W,type:"button",ref:zn(m,s,V),id:p,disabled:!!t,"aria-expanded":!!S,"aria-controls":g,onClick:Xb(W.onClick,L),onFocus:Xb(W.onFocus,O),onKeyDown:Xb(W.onKeyDown,I)}},[p,t,S,L,O,I,g,m]),N=C.exports.useCallback(function(W={},V=null){return{...W,ref:V,role:"region",id:g,"aria-labelledby":p,hidden:!S}},[p,S,g]);return{isOpen:S,isDisabled:t,isFocusable:n,onOpen:E,onClose:k,getButtonProps:D,getPanelProps:N,htmlProps:i}}function Wue(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;D5({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Vue(e){D5({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Uue(e){D5({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Gue(e){D5({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function _f(e){const{isOpen:t,isDisabled:n}=PC(),{reduceMotion:r}=TC(),i=wv("chakra-accordion__icon",e.className),o=z5(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return w(ha,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:w("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}_f.displayName="AccordionIcon";var kf=ke(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Hue(t),l={...z5().container,overflowAnchor:"none"},c=C.exports.useMemo(()=>a,[a]);return re.createElement(Nue,{value:c},re.createElement(be.div,{ref:n,...o,className:wv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});kf.displayName="AccordionItem";var Ef=ke(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=TC(),{getPanelProps:s,isOpen:l}=PC(),c=s(o,n),p=wv("chakra-accordion__panel",r),g=z5();a||delete c.hidden;const m=re.createElement(be.div,{...c,__css:g.panel,className:p});return a?m:w(lD,{in:l,...i,children:m})});Ef.displayName="AccordionPanel";var F5=ke(function({children:t,reduceMotion:n,...r},i){const o=Ai("Accordion",r),a=hn(r),{htmlProps:s,descendants:l,...c}=Bue(a),p=C.exports.useMemo(()=>({...c,reduceMotion:!!n}),[c,n]);return re.createElement(Due,{value:l},re.createElement($ue,{value:p},re.createElement(Oue,{value:o},re.createElement(be.div,{ref:i,...s,className:wv("chakra-accordion",r.className),__css:o.root},t))))});F5.displayName="Accordion";var jue=(...e)=>e.filter(Boolean).join(" "),que=hv({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Cv=ke((e,t)=>{const n=oo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=hn(e),c=jue("chakra-spinner",s),p={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${que} ${o} linear infinite`,...n};return re.createElement(be.div,{ref:t,__css:p,className:c,...l},r&&re.createElement(be.span,{srOnly:!0},r))});Cv.displayName="Spinner";var B5=(...e)=>e.filter(Boolean).join(" ");function Kue(e){return w(ha,{viewBox:"0 0 24 24",...e,children:w("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Zue(e){return w(ha,{viewBox:"0 0 24 24",...e,children:w("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function PT(e){return w(ha,{viewBox:"0 0 24 24",...e,children:w("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Yue,Xue]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Que,LC]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),fD={info:{icon:Zue,colorScheme:"blue"},warning:{icon:PT,colorScheme:"orange"},success:{icon:Kue,colorScheme:"green"},error:{icon:PT,colorScheme:"red"},loading:{icon:Cv,colorScheme:"blue"}};function Jue(e){return fD[e].colorScheme}function ece(e){return fD[e].icon}var hD=ke(function(t,n){const{status:r="info",addRole:i=!0,...o}=hn(t),a=t.colorScheme??Jue(r),s=Ai("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(Yue,{value:{status:r}},re.createElement(Que,{value:s},re.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:B5("chakra-alert",t.className),__css:l})))});hD.displayName="Alert";var pD=ke(function(t,n){const i={display:"inline",...LC().description};return re.createElement(be.div,{ref:n,...t,className:B5("chakra-alert__desc",t.className),__css:i})});pD.displayName="AlertDescription";function gD(e){const{status:t}=Xue(),n=ece(t),r=LC(),i=t==="loading"?r.spinner:r.icon;return re.createElement(be.span,{display:"inherit",...e,className:B5("chakra-alert__icon",e.className),__css:i},e.children||w(n,{h:"100%",w:"100%"}))}gD.displayName="AlertIcon";var mD=ke(function(t,n){const r=LC();return re.createElement(be.div,{ref:n,...t,className:B5("chakra-alert__title",t.className),__css:r.title})});mD.displayName="AlertTitle";function tce(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nce(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[c,p]=C.exports.useState("pending");C.exports.useEffect(()=>{p(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;y();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=S=>{y(),p("loaded"),i?.(S)},b.onerror=S=>{y(),p("failed"),o?.(S)},g.current=b},[n,a,r,s,i,o,t]),y=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return pl(()=>{if(!l)return c==="loading"&&m(),()=>{y()}},[c,m,l]),l?"loaded":c}var rce=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",p4=ke(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return w("img",{width:r,height:i,ref:n,alt:o,...a})});p4.displayName="NativeImage";var $5=ke(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:c,ignoreFallback:p,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:y,...b}=t,S=r!==void 0||i!==void 0,T=c!=null||p||!S,E=nce({...t,ignoreFallback:T}),k=rce(E,m),L={ref:n,objectFit:l,objectPosition:s,...T?b:tce(b,["onError","onLoad"])};return k?i||re.createElement(be.img,{as:p4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(be.img,{as:p4,src:o,srcSet:a,crossOrigin:g,loading:c,referrerPolicy:y,className:"chakra-image",...L})});$5.displayName="Image";ke((e,t)=>re.createElement(be.img,{ref:t,as:p4,className:"chakra-image",...e}));function H5(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var W5=(...e)=>e.filter(Boolean).join(" "),TT=e=>e?"":void 0,[ice,oce]=xn({strict:!1,name:"ButtonGroupContext"});function L6(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=W5("chakra-button__icon",n);return re.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}L6.displayName="ButtonIcon";function A6(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=w(Cv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=W5("chakra-button__spinner",o),c=n==="start"?"marginEnd":"marginStart",p=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[c]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,c,r]);return re.createElement(be.div,{className:l,...s,__css:p},i)}A6.displayName="ButtonSpinner";function ace(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Oa=ke((e,t)=>{const n=oce(),r=oo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:c,loadingText:p,iconSpacing:g="0.5rem",type:m,spinner:y,spinnerPlacement:b="start",className:S,as:T,...E}=hn(e),k=C.exports.useMemo(()=>{const D={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:D}}},[r,n]),{ref:L,type:I}=ace(T),O={rightIcon:c,leftIcon:l,iconSpacing:g,children:s};return re.createElement(be.button,{disabled:i||o,ref:Lie(t,L),as:T,type:m??I,"data-active":TT(a),"data-loading":TT(o),__css:k,className:W5("chakra-button",S),...E},o&&b==="start"&&w(A6,{className:"chakra-button__spinner--start",label:p,placement:"start",spacing:g,children:y}),o?p||re.createElement(be.span,{opacity:0},w(LT,{...O})):w(LT,{...O}),o&&b==="end"&&w(A6,{className:"chakra-button__spinner--end",label:p,placement:"end",spacing:g,children:y}))});Oa.displayName="Button";function LT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Fn,{children:[t&&w(L6,{marginEnd:i,children:t}),r,n&&w(L6,{marginStart:i,children:n})]})}var au=ke(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:c,...p}=t,g=W5("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:c}),[r,i,o,c]);let y={display:"inline-flex"};return l?y={...y,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:y={...y,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(ice,{value:m},re.createElement(be.div,{ref:n,role:"group",__css:y,className:g,"data-attached":l?"":void 0,...p}))});au.displayName="ButtonGroup";var gu=ke((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return w(Oa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});gu.displayName="IconButton";var O0=(...e)=>e.filter(Boolean).join(" "),ey=e=>e?"":void 0,Qb=e=>e?!0:void 0;function AT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sce,vD]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[lce,N0]=xn({strict:!1,name:"FormControlContext"});function uce(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,c=`${l}-label`,p=`${l}-feedback`,g=`${l}-helptext`,[m,y]=C.exports.useState(!1),[b,S]=C.exports.useState(!1),[T,E]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:zn(z,W=>{!W||S(!0)})}),[g]),L=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":ey(T),"data-disabled":ey(i),"data-invalid":ey(r),"data-readonly":ey(o),id:N.id??c,htmlFor:N.htmlFor??l}),[l,i,T,r,o,c]),I=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:zn(z,W=>{!W||y(!0)}),"aria-live":"polite"}),[p]),O=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),D=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!T,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:y,hasHelpText:b,setHasHelpText:S,id:l,labelId:c,feedbackId:p,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:D}}var rd=ke(function(t,n){const r=Ai("Form",t),i=hn(t),{getRootProps:o,htmlProps:a,...s}=uce(i),l=O0("chakra-form-control",t.className);return re.createElement(lce,{value:s},re.createElement(sce,{value:r},re.createElement(be.div,{...o({},n),className:l,__css:r.container})))});rd.displayName="FormControl";var cce=ke(function(t,n){const r=N0(),i=vD(),o=O0("chakra-form__helper-text",t.className);return re.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});cce.displayName="FormHelperText";function AC(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=IC(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Qb(n),"aria-required":Qb(i),"aria-readonly":Qb(r)}}function IC(e){const t=N0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:c,onFocus:p,onBlur:g,...m}=e,y=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&y.push(t.feedbackId),t?.hasHelpText&&y.push(t.helpTextId),{...m,"aria-describedby":y.join(" ")||void 0,id:n??t?.id,isDisabled:r??c??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:AT(t?.onFocus,p),onBlur:AT(t?.onBlur,g)}}var[dce,fce]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hce=ke((e,t)=>{const n=Ai("FormError",e),r=hn(e),i=N0();return i?.isInvalid?re.createElement(dce,{value:n},re.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:O0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});hce.displayName="FormErrorMessage";var pce=ke((e,t)=>{const n=fce(),r=N0();if(!r?.isInvalid)return null;const i=O0("chakra-form__error-icon",e.className);return w(ha,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:w("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});pce.displayName="FormErrorIcon";var Yf=ke(function(t,n){const r=oo("FormLabel",t),i=hn(t),{className:o,children:a,requiredIndicator:s=w(yD,{}),optionalIndicator:l=null,...c}=i,p=N0(),g=p?.getLabelProps(c,n)??{ref:n,...c};return re.createElement(be.label,{...g,className:O0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,p?.isRequired?s:l)});Yf.displayName="FormLabel";var yD=ke(function(t,n){const r=N0(),i=vD();if(!r?.isRequired)return null;const o=O0("chakra-form__required-indicator",t.className);return re.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});yD.displayName="RequiredIndicator";function qc(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var MC={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},gce=be("span",{baseStyle:MC});gce.displayName="VisuallyHidden";var mce=be("input",{baseStyle:MC});mce.displayName="VisuallyHiddenInput";var IT=!1,V5=null,m0=!1,I6=new Set,vce=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function yce(e){return!(e.metaKey||!vce&&e.altKey||e.ctrlKey)}function RC(e,t){I6.forEach(n=>n(e,t))}function MT(e){m0=!0,yce(e)&&(V5="keyboard",RC("keyboard",e))}function ap(e){V5="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(m0=!0,RC("pointer",e))}function xce(e){e.target===window||e.target===document||(m0||(V5="keyboard",RC("keyboard",e)),m0=!1)}function bce(){m0=!1}function RT(){return V5!=="pointer"}function Sce(){if(typeof window>"u"||IT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){m0=!0,e.apply(this,n)},document.addEventListener("keydown",MT,!0),document.addEventListener("keyup",MT,!0),window.addEventListener("focus",xce,!0),window.addEventListener("blur",bce,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",ap,!0),document.addEventListener("pointermove",ap,!0),document.addEventListener("pointerup",ap,!0)):(document.addEventListener("mousedown",ap,!0),document.addEventListener("mousemove",ap,!0),document.addEventListener("mouseup",ap,!0)),IT=!0}function wce(e){Sce(),e(RT());const t=()=>e(RT());return I6.add(t),()=>{I6.delete(t)}}var[ACe,Cce]=xn({name:"CheckboxGroupContext",strict:!1}),_ce=(...e)=>e.filter(Boolean).join(" "),Yi=e=>e?"":void 0;function _a(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function kce(...e){return function(n){e.forEach(r=>{r?.(n)})}}var xD=be(Ha.svg);function Ece(e){return w(xD,{width:"1.2em",viewBox:"0 0 12 10",variants:{unchecked:{opacity:0,strokeDashoffset:16},checked:{opacity:1,strokeDashoffset:0,transition:{duration:.2}}},style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:w("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function Pce(e){return w(xD,{width:"1.2em",viewBox:"0 0 24 24",variants:{unchecked:{scaleX:.65,opacity:0},checked:{scaleX:1,opacity:1,transition:{scaleX:{duration:0},opacity:{duration:.02}}}},style:{stroke:"currentColor",strokeWidth:4},...e,children:w("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Tce({open:e,children:t}){return w(wu,{initial:!1,children:e&&re.createElement(Ha.div,{variants:{unchecked:{scale:.5},checked:{scale:1}},initial:"unchecked",animate:"checked",exit:"unchecked",style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},t)})}function Lce(e){const{isIndeterminate:t,isChecked:n,...r}=e;return w(Tce,{open:n||t,children:w(t?Pce:Ece,{...r})})}function Ace(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bD(e={}){const t=IC(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":c}=t,{defaultChecked:p,isChecked:g,isFocusable:m,onChange:y,isIndeterminate:b,name:S,value:T,tabIndex:E=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,D=Ace(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=ur(y),z=ur(s),W=ur(l),[V,q]=C.exports.useState(!1),[he,de]=C.exports.useState(!1),[ve,Ee]=C.exports.useState(!1),[xe,Z]=C.exports.useState(!1);C.exports.useEffect(()=>wce(q),[]);const U=C.exports.useRef(null),[ee,ae]=C.exports.useState(!0),[X,me]=C.exports.useState(!!p),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||me(Se?Le.target.checked:b?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,b,N]);pl(()=>{U.current&&(U.current.indeterminate=Boolean(b))},[b]),qc(()=>{n&&de(!1)},[n,de]),pl(()=>{const Le=U.current;!Le?.form||(Le.form.onreset=()=>{me(!!p)})},[]);const je=n&&!m,ut=C.exports.useCallback(Le=>{Le.key===" "&&Z(!0)},[Z]),qe=C.exports.useCallback(Le=>{Le.key===" "&&Z(!1)},[Z]);pl(()=>{if(!U.current)return;U.current.checked!==Se&&me(U.current.checked)},[U.current]);const ot=C.exports.useCallback((Le={},st=null)=>{const Lt=it=>{he&&it.preventDefault(),Z(!0)};return{...Le,ref:st,"data-active":Yi(xe),"data-hover":Yi(ve),"data-checked":Yi(Se),"data-focus":Yi(he),"data-focus-visible":Yi(he&&V),"data-indeterminate":Yi(b),"data-disabled":Yi(n),"data-invalid":Yi(o),"data-readonly":Yi(r),"aria-hidden":!0,onMouseDown:_a(Le.onMouseDown,Lt),onMouseUp:_a(Le.onMouseUp,()=>Z(!1)),onMouseEnter:_a(Le.onMouseEnter,()=>Ee(!0)),onMouseLeave:_a(Le.onMouseLeave,()=>Ee(!1))}},[xe,Se,n,he,V,ve,b,o,r]),tt=C.exports.useCallback((Le={},st=null)=>({...D,...Le,ref:zn(st,Lt=>{!Lt||ae(Lt.tagName==="LABEL")}),onClick:_a(Le.onClick,()=>{var Lt;ee||((Lt=U.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=U.current)==null||it.focus()}))}),"data-disabled":Yi(n),"data-checked":Yi(Se),"data-invalid":Yi(o)}),[D,n,Se,o,ee]),at=C.exports.useCallback((Le={},st=null)=>({...Le,ref:zn(U,st),type:"checkbox",name:S,value:T,id:a,tabIndex:E,onChange:_a(Le.onChange,He),onBlur:_a(Le.onBlur,z,()=>de(!1)),onFocus:_a(Le.onFocus,W,()=>de(!0)),onKeyDown:_a(Le.onKeyDown,ut),onKeyUp:_a(Le.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":c,"aria-disabled":n,style:MC}),[S,T,a,He,z,W,ut,qe,i,Se,je,r,k,L,I,o,c,n,E]),Rt=C.exports.useCallback((Le={},st=null)=>({...Le,ref:st,onMouseDown:_a(Le.onMouseDown,OT),onTouchStart:_a(Le.onTouchStart,OT),"data-disabled":Yi(n),"data-checked":Yi(Se),"data-invalid":Yi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:he,isChecked:Se,isActive:xe,isHovered:ve,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:tt,getCheckboxProps:ot,getInputProps:at,getLabelProps:Rt,htmlProps:D}}function OT(e){e.preventDefault(),e.stopPropagation()}var Ice={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Mce={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},SD=ke(function(t,n){const r=Cce(),i={...r,...t},o=Ai("Checkbox",i),a=hn(t),{spacing:s="0.5rem",className:l,children:c,iconColor:p,iconSize:g,icon:m=w(Lce,{}),isChecked:y,isDisabled:b=r?.isDisabled,onChange:S,inputProps:T,...E}=a;let k=y;r?.value&&a.value&&(k=r.value.includes(a.value));let L=S;r?.onChange&&a.value&&(L=kce(r.onChange,S));const{state:I,getInputProps:O,getCheckboxProps:D,getLabelProps:N,getRootProps:z}=bD({...E,isDisabled:b,isChecked:k,onChange:L}),W=C.exports.useMemo(()=>({opacity:I.isChecked||I.isIndeterminate?1:0,transform:I.isChecked||I.isIndeterminate?"scale(1)":"scale(0.95)",fontSize:g,color:p,...o.icon}),[p,g,I.isChecked,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:W,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(be.label,{__css:{...Mce,...o.container},className:_ce("chakra-checkbox",l),...z()},w("input",{className:"chakra-checkbox__input",...O(T,n)}),re.createElement(be.span,{__css:{...Ice,...o.control},className:"chakra-checkbox__control",...D()},V),c&&re.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},c))});SD.displayName="Checkbox";function Rce(e){return w(ha,{focusable:"false","aria-hidden":!0,...e,children:w("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var U5=ke(function(t,n){const r=oo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=hn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||w(Rce,{width:"1em",height:"1em"}))});U5.displayName="CloseButton";function Oce(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function OC(e,t){let n=Oce(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function M6(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function g4(e,t,n){return(e-t)*100/(n-t)}function wD(e,t,n){return(n-t)*e+t}function R6(e,t,n){const r=Math.round((e-t)/n)*n+t,i=M6(n);return OC(r,i)}function Yp(e,t,n){return e==null?e:(nr==null?"":Jb(r,o,n)??""),m=typeof i<"u",y=m?i:p,b=CD(xc(y),o),S=n??b,T=C.exports.useCallback(V=>{V!==y&&(m||g(V.toString()),c?.(V.toString(),xc(V)))},[c,m,y]),E=C.exports.useCallback(V=>{let q=V;return l&&(q=Yp(q,a,s)),OC(q,S)},[S,l,s,a]),k=C.exports.useCallback((V=o)=>{let q;y===""?q=xc(V):q=xc(y)+V,q=E(q),T(q)},[E,o,T,y]),L=C.exports.useCallback((V=o)=>{let q;y===""?q=xc(-V):q=xc(y)-V,q=E(q),T(q)},[E,o,T,y]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=Jb(r,o,n)??a,T(V)},[r,n,o,T,a]),O=C.exports.useCallback(V=>{const q=Jb(V,o,S)??a;T(q)},[S,o,T,a]),D=xc(y);return{isOutOfRange:D>s||Dw(S5,{styles:_D}),zce=()=>w(S5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${_D} - `});function Mf(e,t,n,r){const i=ur(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Fce(e){return"current"in e}var kD=()=>typeof window<"u";function Bce(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var $ce=e=>kD()&&e.test(navigator.vendor),Hce=e=>kD()&&e.test(Bce()),Wce=()=>Hce(/mac|iphone|ipad|ipod/i),Vce=()=>Wce()&&$ce(/apple/i);function Uce(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Mf(i,"pointerdown",o=>{if(!Vce()||!r)return;const a=o.target,l=(n??[t]).some(c=>{const p=Fce(c)?c.current:c;return p?.contains(a)||p===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Gce=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=NT[t.format]||NT.default;window.clipboardData.setData(g,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(g){n&&console.error("unable to copy using clipboardData: ",g),n&&console.error("falling back to prompt"),r=Kce("message"in t?t.message:qce),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var Yce=Zce,Xce=OX?C.exports.useLayoutEffect:C.exports.useEffect;function DT(e,t=[]){const n=C.exports.useRef(e);return Xce(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Qce(e,t={}){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(e),{timeout:a=1500,...s}=typeof t=="number"?{timeout:t}:t,l=C.exports.useCallback(()=>{const c=Yce(i,s);r(c)},[i,s]);return C.exports.useEffect(()=>{let c=null;return n&&(c=window.setTimeout(()=>{r(!1)},a)),()=>{c&&window.clearTimeout(c)}},[a,n]),{value:i,setValue:o,onCopy:l,hasCopied:n}}function Jce(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ede(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function m4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=DT(n),a=DT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[c,p]=Jce(r,s),g=ede(i,"disclosure"),m=C.exports.useCallback(()=>{c||l(!1),a?.()},[c,a]),y=C.exports.useCallback(()=>{c||l(!0),o?.()},[c,o]),b=C.exports.useCallback(()=>{(p?m:y)()},[p,y,m]);return{isOpen:!!p,onOpen:y,onClose:m,onToggle:b,isControlled:c,getButtonProps:(S={})=>({...S,"aria-expanded":p,"aria-controls":g,onClick:NX(S.onClick,b)}),getDisclosureProps:(S={})=>({...S,hidden:!p,id:g})}}function NC(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var DC=ke(function(t,n){const{htmlSize:r,...i}=t,o=Ai("Input",i),a=hn(i),s=AC(a),l=Or("chakra-input",t.className);return re.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});DC.displayName="Input";DC.id="Input";var[tde,ED]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),nde=ke(function(t,n){const r=Ai("Input",t),{children:i,className:o,...a}=hn(t),s=Or("chakra-input__group",o),l={},c=H5(i),p=r.field;c.forEach(m=>{!r||(p&&m.type.id==="InputLeftElement"&&(l.paddingStart=p.height??p.h),p&&m.type.id==="InputRightElement"&&(l.paddingEnd=p.height??p.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=c.map(m=>{var y,b;const S=NC({size:((y=m.props)==null?void 0:y.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,S):C.exports.cloneElement(m,Object.assign(S,l,m.props))});return re.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},w(tde,{value:r,children:g}))});nde.displayName="InputGroup";var rde={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},ide=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),zC=ke(function(t,n){const{placement:r="left",...i}=t,o=rde[r]??{},a=ED();return w(ide,{ref:n,...i,__css:{...a.addon,...o}})});zC.displayName="InputAddon";var PD=ke(function(t,n){return w(zC,{ref:n,placement:"left",...t,className:Or("chakra-input__left-addon",t.className)})});PD.displayName="InputLeftAddon";PD.id="InputLeftAddon";var TD=ke(function(t,n){return w(zC,{ref:n,placement:"right",...t,className:Or("chakra-input__right-addon",t.className)})});TD.displayName="InputRightAddon";TD.id="InputRightAddon";var ode=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),G5=ke(function(t,n){const{placement:r="left",...i}=t,o=ED(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return w(ode,{ref:n,__css:l,...i})});G5.id="InputElement";G5.displayName="InputElement";var LD=ke(function(t,n){const{className:r,...i}=t,o=Or("chakra-input__left-element",r);return w(G5,{ref:n,placement:"left",className:o,...i})});LD.id="InputLeftElement";LD.displayName="InputLeftElement";var AD=ke(function(t,n){const{className:r,...i}=t,o=Or("chakra-input__right-element",r);return w(G5,{ref:n,placement:"right",className:o,...i})});AD.id="InputRightElement";AD.displayName="InputRightElement";function ade(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function Kc(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ade(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var sde=ke(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Or("chakra-aspect-ratio",i);return re.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Kc(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});sde.displayName="AspectRatio";var lde=ke(function(t,n){const r=oo("Badge",t),{className:i,...o}=hn(t);return re.createElement(be.span,{ref:n,className:Or("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});lde.displayName="Badge";var id=be("div");id.displayName="Box";var ID=ke(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return w(id,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});ID.displayName="Square";var ude=ke(function(t,n){const{size:r,...i}=t;return w(ID,{size:r,ref:n,borderRadius:"9999px",...i})});ude.displayName="Circle";var MD=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});MD.displayName="Center";var cde={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ke(function(t,n){const{axis:r="both",...i}=t;return re.createElement(be.div,{ref:n,__css:cde[r],...i,position:"absolute"})});var dde=ke(function(t,n){const r=oo("Code",t),{className:i,...o}=hn(t);return re.createElement(be.code,{ref:n,className:Or("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});dde.displayName="Code";var fde=ke(function(t,n){const{className:r,centerContent:i,...o}=hn(t),a=oo("Container",t);return re.createElement(be.div,{ref:n,className:Or("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});fde.displayName="Container";var hde=ke(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:c,...p}=oo("Divider",t),{className:g,orientation:m="horizontal",__css:y,...b}=hn(t),S={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(be.hr,{ref:n,"aria-orientation":m,...b,__css:{...p,border:"0",borderColor:c,borderStyle:l,...S[m],...y},className:Or("chakra-divider",g)})});hde.displayName="Divider";var Dn=ke(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:c,...p}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:c};return re.createElement(be.div,{ref:n,__css:g,...p})});Dn.displayName="Flex";var RD=ke(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:c,autoRows:p,templateRows:g,autoColumns:m,templateColumns:y,...b}=t,S={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:c,gridAutoRows:p,gridTemplateRows:g,gridTemplateColumns:y};return re.createElement(be.div,{ref:n,__css:S,...b})});RD.displayName="Grid";function zT(e){return Kc(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var pde=ke(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:c,...p}=t,g=NC({gridArea:r,gridColumn:zT(i),gridRow:zT(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:c,gridRowEnd:s});return re.createElement(be.div,{ref:n,__css:g,...p})});pde.displayName="GridItem";var Rf=ke(function(t,n){const r=oo("Heading",t),{className:i,...o}=hn(t);return re.createElement(be.h2,{ref:n,className:Or("chakra-heading",t.className),...o,__css:r})});Rf.displayName="Heading";ke(function(t,n){const r=oo("Mark",t),i=hn(t);return w(id,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var gde=ke(function(t,n){const r=oo("Kbd",t),{className:i,...o}=hn(t);return re.createElement(be.kbd,{ref:n,className:Or("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});gde.displayName="Kbd";var Of=ke(function(t,n){const r=oo("Link",t),{className:i,isExternal:o,...a}=hn(t);return re.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Or("chakra-link",i),...a,__css:r})});Of.displayName="Link";ke(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(be.a,{...s,ref:n,className:Or("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});ke(function(t,n){const{className:r,...i}=t;return re.createElement(be.div,{ref:n,position:"relative",...i,className:Or("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[mde,OD]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),FC=ke(function(t,n){const r=Ai("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=hn(t),c=H5(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(mde,{value:r},re.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},c))});FC.displayName="List";var vde=ke((e,t)=>{const{as:n,...r}=e;return w(FC,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});vde.displayName="OrderedList";var ND=ke(function(t,n){const{as:r,...i}=t;return w(FC,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});ND.displayName="UnorderedList";var DD=ke(function(t,n){const r=OD();return re.createElement(be.li,{ref:n,...t,__css:r.item})});DD.displayName="ListItem";var yde=ke(function(t,n){const r=OD();return w(ha,{ref:n,role:"presentation",...t,__css:r.icon})});yde.displayName="ListIcon";var xde=ke(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,c=A0(),p=s?Sde(s,c):wde(r);return w(RD,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:p,...l})});xde.displayName="SimpleGrid";function bde(e){return typeof e=="number"?`${e}px`:e}function Sde(e,t){return Kc(e,n=>{const r=yie("sizes",n,bde(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function wde(e){return Kc(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var zD=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});zD.displayName="Spacer";var O6="& > *:not(style) ~ *:not(style)";function Cde(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[O6]:Kc(n,i=>r[i])}}function _de(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Kc(n,i=>r[i])}}var FD=e=>re.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});FD.displayName="StackItem";var BC=ke((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:c,className:p,shouldWrapChildren:g,...m}=e,y=n?"row":r??"column",b=C.exports.useMemo(()=>Cde({direction:y,spacing:a}),[y,a]),S=C.exports.useMemo(()=>_de({spacing:a,direction:y}),[a,y]),T=!!c,E=!g&&!T,k=C.exports.useMemo(()=>{const I=H5(l);return E?I:I.map((O,D)=>{const N=typeof O.key<"u"?O.key:D,z=D+1===I.length,V=g?w(FD,{children:O},N):O;if(!T)return V;const q=C.exports.cloneElement(c,{__css:S}),he=z?null:q;return ne(C.exports.Fragment,{children:[V,he]},N)})},[c,S,T,E,g,l]),L=Or("chakra-stack",p);return re.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:T?{}:{[O6]:b[O6]},...m},k)});BC.displayName="Stack";var kde=ke((e,t)=>w(BC,{align:"center",...e,direction:"row",ref:t}));kde.displayName="HStack";var Ede=ke((e,t)=>w(BC,{align:"center",...e,direction:"column",ref:t}));Ede.displayName="VStack";var wo=ke(function(t,n){const r=oo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=hn(t),c=NC({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(be.p,{ref:n,className:Or("chakra-text",t.className),...c,...l,__css:r})});wo.displayName="Text";function FT(e){return typeof e=="number"?`${e}px`:e}var Pde=ke(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:c,className:p,shouldWrapChildren:g,...m}=t,y=C.exports.useMemo(()=>{const{spacingX:S=r,spacingY:T=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>Kc(S,k=>FT(Vw("space",k)(E))),"--chakra-wrap-y-spacing":E=>Kc(T,k=>FT(Vw("space",k)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:c,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,c,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(S,T)=>w(BD,{children:S},T)):a,[a,g]);return re.createElement(be.div,{ref:n,className:Or("chakra-wrap",p),overflow:"hidden",...m},re.createElement(be.ul,{className:"chakra-wrap__list",__css:y},b))});Pde.displayName="Wrap";var BD=ke(function(t,n){const{className:r,...i}=t;return re.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Or("chakra-wrap__listitem",r),...i})});BD.displayName="WrapItem";var Tde={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},$D=Tde,sp=()=>{},Lde={document:$D,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:sp,removeEventListener:sp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:sp,removeListener:sp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:sp,setInterval:()=>0,clearInterval:sp},Ade=Lde,Ide={window:Ade,document:$D},HD=typeof window<"u"?{window,document}:Ide,WD=C.exports.createContext(HD);WD.displayName="EnvironmentContext";function VD(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,c=r?.ownerDocument.defaultView;return l?{document:l,window:c}:HD},[r,n]);return ne(WD.Provider,{value:s,children:[t,!n&&o&&w("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}VD.displayName="EnvironmentProvider";var Mde=e=>e?"":void 0;function Rde(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function eS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Ode(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:c,onKeyUp:p,tabIndex:g,onMouseOver:m,onMouseLeave:y,...b}=e,[S,T]=C.exports.useState(!0),[E,k]=C.exports.useState(!1),L=Rde(),I=Z=>{!Z||Z.tagName!=="BUTTON"&&T(!1)},O=S?g:g||0,D=n&&!r,N=C.exports.useCallback(Z=>{if(n){Z.stopPropagation(),Z.preventDefault();return}Z.currentTarget.focus(),l?.(Z)},[n,l]),z=C.exports.useCallback(Z=>{E&&eS(Z)&&(Z.preventDefault(),Z.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[E,L]),W=C.exports.useCallback(Z=>{if(c?.(Z),n||Z.defaultPrevented||Z.metaKey||!eS(Z.nativeEvent)||S)return;const U=i&&Z.key==="Enter";o&&Z.key===" "&&(Z.preventDefault(),k(!0)),U&&(Z.preventDefault(),Z.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,S,c,i,o,L,z]),V=C.exports.useCallback(Z=>{if(p?.(Z),n||Z.defaultPrevented||Z.metaKey||!eS(Z.nativeEvent)||S)return;o&&Z.key===" "&&(Z.preventDefault(),k(!1),Z.currentTarget.click())},[o,S,n,p]),q=C.exports.useCallback(Z=>{Z.button===0&&(k(!1),L.remove(document,"mouseup",q,!1))},[L]),he=C.exports.useCallback(Z=>{if(Z.button!==0)return;if(n){Z.stopPropagation(),Z.preventDefault();return}S||k(!0),Z.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",q,!1),a?.(Z)},[n,S,a,L,q]),de=C.exports.useCallback(Z=>{Z.button===0&&(S||k(!1),s?.(Z))},[s,S]),ve=C.exports.useCallback(Z=>{if(n){Z.preventDefault();return}m?.(Z)},[n,m]),Ee=C.exports.useCallback(Z=>{E&&(Z.preventDefault(),k(!1)),y?.(Z)},[E,y]),xe=zn(t,I);return S?{...b,ref:xe,type:"button","aria-disabled":D?void 0:n,disabled:D,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:p,onKeyDown:c,onMouseOver:m,onMouseLeave:y}:{...b,ref:xe,role:"button","data-active":Mde(E),"aria-disabled":n?"true":void 0,tabIndex:D?void 0:O,onClick:N,onMouseDown:he,onMouseUp:de,onKeyUp:V,onKeyDown:W,onMouseOver:ve,onMouseLeave:Ee}}function UD(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function GD(e){if(!UD(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Nde(e){var t;return((t=jD(e))==null?void 0:t.defaultView)??window}function jD(e){return UD(e)?e.ownerDocument:document}function Dde(e){return jD(e).activeElement}var qD=e=>e.hasAttribute("tabindex"),zde=e=>qD(e)&&e.tabIndex===-1;function Fde(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function KD(e){return e.parentElement&&KD(e.parentElement)?!0:e.hidden}function Bde(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function ZD(e){if(!GD(e)||KD(e)||Fde(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Bde(e)?!0:qD(e)}function $de(e){return e?GD(e)&&ZD(e)&&!zde(e):!1}var Hde=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Wde=Hde.join(),Vde=e=>e.offsetWidth>0&&e.offsetHeight>0;function YD(e){const t=Array.from(e.querySelectorAll(Wde));return t.unshift(e),t.filter(n=>ZD(n)&&Vde(n))}function Ude(e){const t=e.current;if(!t)return!1;const n=Dde(t);return!n||t.contains(n)?!1:!!$de(n)}function Gde(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;qc(()=>{if(!o||Ude(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var jde={preventScroll:!0,shouldFocus:!1};function qde(e,t=jde){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Kde(e)?e.current:e,s=i&&o,l=C.exports.useCallback(()=>{if(!(!a||!s)&&!a.contains(document.activeElement))if(n?.current)requestAnimationFrame(()=>{var c;(c=n.current)==null||c.focus({preventScroll:r})});else{const c=YD(a);c.length>0&&requestAnimationFrame(()=>{c[0].focus({preventScroll:r})})}},[s,r,a,n]);qc(()=>{l()},[l]),Mf(a,"transitionend",l)}function Kde(e){return"current"in e}var Po="top",Fa="bottom",Ba="right",To="left",$C="auto",_v=[Po,Fa,Ba,To],v0="start",jm="end",Zde="clippingParents",XD="viewport",cg="popper",Yde="reference",BT=_v.reduce(function(e,t){return e.concat([t+"-"+v0,t+"-"+jm])},[]),QD=[].concat(_v,[$C]).reduce(function(e,t){return e.concat([t,t+"-"+v0,t+"-"+jm])},[]),Xde="beforeRead",Qde="read",Jde="afterRead",efe="beforeMain",tfe="main",nfe="afterMain",rfe="beforeWrite",ife="write",ofe="afterWrite",afe=[Xde,Qde,Jde,efe,tfe,nfe,rfe,ife,ofe];function Sl(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Vf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function HC(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sfe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!Sl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function lfe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Na(i)||!Sl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const ufe={name:"applyStyles",enabled:!0,phase:"write",fn:sfe,effect:lfe,requires:["computeStyles"]};function yl(e){return e.split("-")[0]}var Nf=Math.max,v4=Math.min,y0=Math.round;function N6(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function JD(){return!/^((?!chrome|android).)*safari/i.test(N6())}function x0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&y0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&y0(r.height)/e.offsetHeight||1);var a=Vf(e)?Wa(e):window,s=a.visualViewport,l=!JD()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,p=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:p,right:c+g,bottom:p+m,left:c,x:c,y:p}}function WC(e){var t=x0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ez(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&HC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mu(e){return Wa(e).getComputedStyle(e)}function cfe(e){return["table","td","th"].indexOf(Sl(e))>=0}function od(e){return((Vf(e)?e.ownerDocument:e.document)||window.document).documentElement}function j5(e){return Sl(e)==="html"?e:e.assignedSlot||e.parentNode||(HC(e)?e.host:null)||od(e)}function $T(e){return!Na(e)||mu(e).position==="fixed"?null:e.offsetParent}function dfe(e){var t=/firefox/i.test(N6()),n=/Trident/i.test(N6());if(n&&Na(e)){var r=mu(e);if(r.position==="fixed")return null}var i=j5(e);for(HC(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(Sl(i))<0;){var o=mu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function kv(e){for(var t=Wa(e),n=$T(e);n&&cfe(n)&&mu(n).position==="static";)n=$T(n);return n&&(Sl(n)==="html"||Sl(n)==="body"&&mu(n).position==="static")?t:n||dfe(e)||t}function VC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function am(e,t,n){return Nf(e,v4(t,n))}function ffe(e,t,n){var r=am(e,t,n);return r>n?n:r}function tz(){return{top:0,right:0,bottom:0,left:0}}function nz(e){return Object.assign({},tz(),e)}function rz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var hfe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,nz(typeof t!="number"?t:rz(t,_v))};function pfe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=yl(n.placement),l=VC(s),c=[To,Ba].indexOf(s)>=0,p=c?"height":"width";if(!(!o||!a)){var g=hfe(i.padding,n),m=WC(o),y=l==="y"?Po:To,b=l==="y"?Fa:Ba,S=n.rects.reference[p]+n.rects.reference[l]-a[l]-n.rects.popper[p],T=a[l]-n.rects.reference[l],E=kv(o),k=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,L=S/2-T/2,I=g[y],O=k-m[p]-g[b],D=k/2-m[p]/2+L,N=am(I,D,O),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-D,t)}}function gfe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!ez(t.elements.popper,i)||(t.elements.arrow=i))}const mfe={name:"arrow",enabled:!0,phase:"main",fn:pfe,effect:gfe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function b0(e){return e.split("-")[1]}var vfe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yfe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:y0(t*i)/i||0,y:y0(n*i)/i||0}}function HT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,p=e.roundOffsets,g=e.isFixed,m=a.x,y=m===void 0?0:m,b=a.y,S=b===void 0?0:b,T=typeof p=="function"?p({x:y,y:S}):{x:y,y:S};y=T.x,S=T.y;var E=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=To,I=Po,O=window;if(c){var D=kv(n),N="clientHeight",z="clientWidth";if(D===Wa(n)&&(D=od(n),mu(D).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),D=D,i===Po||(i===To||i===Ba)&&o===jm){I=Fa;var W=g&&D===O&&O.visualViewport?O.visualViewport.height:D[N];S-=W-r.height,S*=l?1:-1}if(i===To||(i===Po||i===Fa)&&o===jm){L=Ba;var V=g&&D===O&&O.visualViewport?O.visualViewport.width:D[z];y-=V-r.width,y*=l?1:-1}}var q=Object.assign({position:s},c&&vfe),he=p===!0?yfe({x:y,y:S}):{x:y,y:S};if(y=he.x,S=he.y,l){var de;return Object.assign({},q,(de={},de[I]=k?"0":"",de[L]=E?"0":"",de.transform=(O.devicePixelRatio||1)<=1?"translate("+y+"px, "+S+"px)":"translate3d("+y+"px, "+S+"px, 0)",de))}return Object.assign({},q,(t={},t[I]=k?S+"px":"",t[L]=E?y+"px":"",t.transform="",t))}function xfe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:yl(t.placement),variation:b0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,HT(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,HT(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const bfe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xfe,data:{}};var ty={passive:!0};function Sfe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(p){p.addEventListener("scroll",n.update,ty)}),s&&l.addEventListener("resize",n.update,ty),function(){o&&c.forEach(function(p){p.removeEventListener("scroll",n.update,ty)}),s&&l.removeEventListener("resize",n.update,ty)}}const wfe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Sfe,data:{}};var Cfe={left:"right",right:"left",bottom:"top",top:"bottom"};function r3(e){return e.replace(/left|right|bottom|top/g,function(t){return Cfe[t]})}var _fe={start:"end",end:"start"};function WT(e){return e.replace(/start|end/g,function(t){return _fe[t]})}function UC(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function GC(e){return x0(od(e)).left+UC(e).scrollLeft}function kfe(e,t){var n=Wa(e),r=od(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=JD();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+GC(e),y:l}}function Efe(e){var t,n=od(e),r=UC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Nf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Nf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+GC(e),l=-r.scrollTop;return mu(i||n).direction==="rtl"&&(s+=Nf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function jC(e){var t=mu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function iz(e){return["html","body","#document"].indexOf(Sl(e))>=0?e.ownerDocument.body:Na(e)&&jC(e)?e:iz(j5(e))}function sm(e,t){var n;t===void 0&&(t=[]);var r=iz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],jC(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(sm(j5(a)))}function D6(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Pfe(e,t){var n=x0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function VT(e,t,n){return t===XD?D6(kfe(e,n)):Vf(t)?Pfe(t,n):D6(Efe(od(e)))}function Tfe(e){var t=sm(j5(e)),n=["absolute","fixed"].indexOf(mu(e).position)>=0,r=n&&Na(e)?kv(e):e;return Vf(r)?t.filter(function(i){return Vf(i)&&ez(i,r)&&Sl(i)!=="body"}):[]}function Lfe(e,t,n,r){var i=t==="clippingParents"?Tfe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var p=VT(e,c,r);return l.top=Nf(p.top,l.top),l.right=v4(p.right,l.right),l.bottom=v4(p.bottom,l.bottom),l.left=Nf(p.left,l.left),l},VT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function oz(e){var t=e.reference,n=e.element,r=e.placement,i=r?yl(r):null,o=r?b0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Po:l={x:a,y:t.y-n.height};break;case Fa:l={x:a,y:t.y+t.height};break;case Ba:l={x:t.x+t.width,y:s};break;case To:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?VC(i):null;if(c!=null){var p=c==="y"?"height":"width";switch(o){case v0:l[c]=l[c]-(t[p]/2-n[p]/2);break;case jm:l[c]=l[c]+(t[p]/2-n[p]/2);break}}return l}function qm(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Zde:s,c=n.rootBoundary,p=c===void 0?XD:c,g=n.elementContext,m=g===void 0?cg:g,y=n.altBoundary,b=y===void 0?!1:y,S=n.padding,T=S===void 0?0:S,E=nz(typeof T!="number"?T:rz(T,_v)),k=m===cg?Yde:cg,L=e.rects.popper,I=e.elements[b?k:m],O=Lfe(Vf(I)?I:I.contextElement||od(e.elements.popper),l,p,a),D=x0(e.elements.reference),N=oz({reference:D,element:L,strategy:"absolute",placement:i}),z=D6(Object.assign({},L,N)),W=m===cg?z:D,V={top:O.top-W.top+E.top,bottom:W.bottom-O.bottom+E.bottom,left:O.left-W.left+E.left,right:W.right-O.right+E.right},q=e.modifiersData.offset;if(m===cg&&q){var he=q[i];Object.keys(V).forEach(function(de){var ve=[Ba,Fa].indexOf(de)>=0?1:-1,Ee=[Po,Fa].indexOf(de)>=0?"y":"x";V[de]+=he[Ee]*ve})}return V}function Afe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?QD:l,p=b0(r),g=p?s?BT:BT.filter(function(b){return b0(b)===p}):_v,m=g.filter(function(b){return c.indexOf(b)>=0});m.length===0&&(m=g);var y=m.reduce(function(b,S){return b[S]=qm(e,{placement:S,boundary:i,rootBoundary:o,padding:a})[yl(S)],b},{});return Object.keys(y).sort(function(b,S){return y[b]-y[S]})}function Ife(e){if(yl(e)===$C)return[];var t=r3(e);return[WT(e),t,WT(t)]}function Mfe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,p=n.boundary,g=n.rootBoundary,m=n.altBoundary,y=n.flipVariations,b=y===void 0?!0:y,S=n.allowedAutoPlacements,T=t.options.placement,E=yl(T),k=E===T,L=l||(k||!b?[r3(T)]:Ife(T)),I=[T].concat(L).reduce(function(Se,He){return Se.concat(yl(He)===$C?Afe(t,{placement:He,boundary:p,rootBoundary:g,padding:c,flipVariations:b,allowedAutoPlacements:S}):He)},[]),O=t.rects.reference,D=t.rects.popper,N=new Map,z=!0,W=I[0],V=0;V=0,Ee=ve?"width":"height",xe=qm(t,{placement:q,boundary:p,rootBoundary:g,altBoundary:m,padding:c}),Z=ve?de?Ba:To:de?Fa:Po;O[Ee]>D[Ee]&&(Z=r3(Z));var U=r3(Z),ee=[];if(o&&ee.push(xe[he]<=0),s&&ee.push(xe[Z]<=0,xe[U]<=0),ee.every(function(Se){return Se})){W=q,z=!1;break}N.set(q,ee)}if(z)for(var ae=b?3:1,X=function(He){var je=I.find(function(ut){var qe=N.get(ut);if(qe)return qe.slice(0,He).every(function(ot){return ot})});if(je)return W=je,"break"},me=ae;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==W&&(t.modifiersData[r]._skip=!0,t.placement=W,t.reset=!0)}}const Rfe={name:"flip",enabled:!0,phase:"main",fn:Mfe,requiresIfExists:["offset"],data:{_skip:!1}};function UT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function GT(e){return[Po,Ba,Fa,To].some(function(t){return e[t]>=0})}function Ofe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=qm(t,{elementContext:"reference"}),s=qm(t,{altBoundary:!0}),l=UT(a,r),c=UT(s,i,o),p=GT(l),g=GT(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":g})}const Nfe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ofe};function Dfe(e,t,n){var r=yl(e),i=[To,Po].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[To,Ba].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function zfe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=QD.reduce(function(p,g){return p[g]=Dfe(g,t.rects,o),p},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const Ffe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zfe};function Bfe(e){var t=e.state,n=e.name;t.modifiersData[n]=oz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const $fe={name:"popperOffsets",enabled:!0,phase:"read",fn:Bfe,data:{}};function Hfe(e){return e==="x"?"y":"x"}function Wfe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,g=n.padding,m=n.tether,y=m===void 0?!0:m,b=n.tetherOffset,S=b===void 0?0:b,T=qm(t,{boundary:l,rootBoundary:c,padding:g,altBoundary:p}),E=yl(t.placement),k=b0(t.placement),L=!k,I=VC(E),O=Hfe(I),D=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,W=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,V=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,he={x:0,y:0};if(!!D){if(o){var de,ve=I==="y"?Po:To,Ee=I==="y"?Fa:Ba,xe=I==="y"?"height":"width",Z=D[I],U=Z+T[ve],ee=Z-T[Ee],ae=y?-z[xe]/2:0,X=k===v0?N[xe]:z[xe],me=k===v0?-z[xe]:-N[xe],ye=t.elements.arrow,Se=y&&ye?WC(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:tz(),je=He[ve],ut=He[Ee],qe=am(0,N[xe],Se[xe]),ot=L?N[xe]/2-ae-qe-je-V.mainAxis:X-qe-je-V.mainAxis,tt=L?-N[xe]/2+ae+qe+ut+V.mainAxis:me+qe+ut+V.mainAxis,at=t.elements.arrow&&kv(t.elements.arrow),Rt=at?I==="y"?at.clientTop||0:at.clientLeft||0:0,kt=(de=q?.[I])!=null?de:0,Le=Z+ot-kt-Rt,st=Z+tt-kt,Lt=am(y?v4(U,Le):U,Z,y?Nf(ee,st):ee);D[I]=Lt,he[I]=Lt-Z}if(s){var it,mt=I==="x"?Po:To,Sn=I==="x"?Fa:Ba,wt=D[O],Kt=O==="y"?"height":"width",wn=wt+T[mt],pn=wt-T[Sn],Re=[Po,To].indexOf(E)!==-1,Ze=(it=q?.[O])!=null?it:0,Zt=Re?wn:wt-N[Kt]-z[Kt]-Ze+V.altAxis,Gt=Re?wt+N[Kt]+z[Kt]-Ze-V.altAxis:pn,_e=y&&Re?ffe(Zt,wt,Gt):am(y?Zt:wn,wt,y?Gt:pn);D[O]=_e,he[O]=_e-wt}t.modifiersData[r]=he}}const Vfe={name:"preventOverflow",enabled:!0,phase:"main",fn:Wfe,requiresIfExists:["offset"]};function Ufe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Gfe(e){return e===Wa(e)||!Na(e)?UC(e):Ufe(e)}function jfe(e){var t=e.getBoundingClientRect(),n=y0(t.width)/e.offsetWidth||1,r=y0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qfe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&jfe(t),o=od(t),a=x0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Sl(t)!=="body"||jC(o))&&(s=Gfe(t)),Na(t)?(l=x0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=GC(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Kfe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Zfe(e){var t=Kfe(e);return afe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Yfe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Xfe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var jT={placement:"bottom",modifiers:[],strategy:"absolute"};function qT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:lp("--popper-arrow-shadow-color"),arrowSize:lp("--popper-arrow-size","8px"),arrowSizeHalf:lp("--popper-arrow-size-half"),arrowBg:lp("--popper-arrow-bg"),transformOrigin:lp("--popper-transform-origin"),arrowOffset:lp("--popper-arrow-offset")};function the(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var nhe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},rhe=e=>nhe[e],KT={scroll:!0,resize:!0};function ihe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...KT,...e}}:t={enabled:e,options:KT},t}var ohe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},ahe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZT(e)},effect:({state:e})=>()=>{ZT(e)}},ZT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,rhe(e.placement))},she={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{lhe(e)}},lhe=e=>{var t;if(!e.placement)return;const n=uhe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},uhe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},che={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{YT(e)},effect:({state:e})=>()=>{YT(e)}},YT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:the(e.placement)})},dhe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},fhe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function hhe(e,t="ltr"){var n;const r=((n=dhe[e])==null?void 0:n[t])||e;return t==="ltr"?r:fhe[e]??r}function az(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:c=!0,boundary:p="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:y="ltr"}=e,b=C.exports.useRef(null),S=C.exports.useRef(null),T=C.exports.useRef(null),E=hhe(r,y),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!S.current||((V=k.current)==null||V.call(k),T.current=ehe(b.current,S.current,{placement:E,modifiers:[che,she,ahe,{...ohe,enabled:!!m},{name:"eventListeners",...ihe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!c,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:p}},...n??[]],strategy:i}),T.current.forceUpdate(),k.current=T.current.destroy)},[E,t,n,m,a,o,s,l,c,g,p,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!S.current&&((V=T.current)==null||V.destroy(),T.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},q=null)=>({...V,ref:zn(I,q)}),[I]),D=C.exports.useCallback(V=>{S.current=V,L()},[L]),N=C.exports.useCallback((V={},q=null)=>({...V,ref:zn(D,q),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,D,m]),z=C.exports.useCallback((V={},q=null)=>{const{size:he,shadowColor:de,bg:ve,style:Ee,...xe}=V;return{...xe,ref:q,"data-popper-arrow":"",style:phe(V)}},[]),W=C.exports.useCallback((V={},q=null)=>({...V,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=T.current)==null||V.update()},forceUpdate(){var V;(V=T.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:D,getPopperProps:N,getArrowProps:z,getArrowInnerProps:W,getReferenceProps:O}}function phe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function sz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=ur(n),a=ur(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),c=r!==void 0?r:s,p=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,y=C.exports.useCallback(()=>{p||l(!1),a?.()},[p,a]),b=C.exports.useCallback(()=>{p||l(!0),o?.()},[p,o]),S=C.exports.useCallback(()=>{c?y():b()},[c,b,y]);function T(k={}){return{...k,"aria-expanded":c,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),S()}}}function E(k={}){return{...k,hidden:!c,id:m}}return{isOpen:c,onOpen:b,onClose:y,onToggle:S,isControlled:p,getButtonProps:T,getDisclosureProps:E}}function ghe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Mf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const c=Nde(n.current),p=new c.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(p)}}}function lz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[mhe,vhe]=xn({strict:!1,name:"PortalManagerContext"});function uz(e){const{children:t,zIndex:n}=e;return w(mhe,{value:{zIndex:n},children:t})}uz.displayName="PortalManager";var[cz,yhe]=xn({strict:!1,name:"PortalContext"}),qC="chakra-portal",xhe=".chakra-portal",bhe=e=>w("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),She=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=yhe(),l=vhe();pl(()=>{if(!r)return;const p=r.ownerDocument,g=t?s??p.body:p.body;if(!g)return;o.current=p.createElement("div"),o.current.className=qC,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const c=l?.zIndex?w(bhe,{zIndex:l?.zIndex,children:n}):n;return o.current?El.exports.createPortal(w(cz,{value:o.current,children:c}),o.current):w("span",{ref:p=>{p&&i(p)}})},whe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=qC),l},[i]),[,s]=C.exports.useState({});return pl(()=>s({}),[]),pl(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?El.exports.createPortal(w(cz,{value:r?a:null,children:t}),a):null};function Xf(e){const{containerRef:t,...n}=e;return t?w(whe,{containerRef:t,...n}):w(She,{...n})}Xf.defaultProps={appendToParentPortal:!0};Xf.className=qC;Xf.selector=xhe;Xf.displayName="Portal";var Che=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},up=new WeakMap,ny=new WeakMap,ry={},tS=0,_he=function(e,t,n,r){var i=Array.isArray(e)?e:[e];ry[n]||(ry[n]=new WeakMap);var o=ry[n],a=[],s=new Set,l=new Set(i),c=function(g){!g||s.has(g)||(s.add(g),c(g.parentNode))};i.forEach(c);var p=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))p(m);else{var y=m.getAttribute(r),b=y!==null&&y!=="false",S=(up.get(m)||0)+1,T=(o.get(m)||0)+1;up.set(m,S),o.set(m,T),a.push(m),S===1&&b&&ny.set(m,!0),T===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return p(t),s.clear(),tS++,function(){a.forEach(function(g){var m=up.get(g)-1,y=o.get(g)-1;up.set(g,m),o.set(g,y),m||(ny.has(g)||g.removeAttribute(r),ny.delete(g)),y||g.removeAttribute(n)}),tS--,tS||(up=new WeakMap,up=new WeakMap,ny=new WeakMap,ry={})}},dz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Che(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),_he(r,i,n,"aria-hidden")):function(){return null}};function KC(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var An={exports:{}},khe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ehe=khe,Phe=Ehe;function fz(){}function hz(){}hz.resetWarningCache=fz;var The=function(){function e(r,i,o,a,s,l){if(l!==Phe){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:hz,resetWarningCache:fz};return n.PropTypes=n,n};An.exports=The();var z6="data-focus-lock",pz="data-focus-lock-disabled",Lhe="data-no-focus-lock",Ahe="data-autofocus-inside",Ihe="data-no-autofocus";function Mhe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rhe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function gz(e,t){return Rhe(t||null,function(n){return e.forEach(function(r){return Mhe(r,n)})})}var nS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function mz(e){return e}function vz(e,t){t===void 0&&(t=mz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var p=a;a=[],p.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(p){a.push(p),c()},filter:function(p){return a=a.filter(p),n}}}};return i}function ZC(e,t){return t===void 0&&(t=mz),vz(e,t)}function yz(e){e===void 0&&(e={});var t=vz(null);return t.options=ul({async:!0,ssr:!1},e),t}var xz=function(e){var t=e.sideCar,n=sD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w(r,{...ul({},n)})};xz.isSideCarExport=!0;function Ohe(e,t){return e.useMedium(t),xz}var bz=ZC({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),Sz=ZC(),Nhe=ZC(),Dhe=yz({async:!0}),zhe=[],YC=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),c=C.exports.useRef(null),p=t.children,g=t.disabled,m=t.noFocusGuards,y=t.persistentFocus,b=t.crossFrame,S=t.autoFocus;t.allowTextSelection;var T=t.group,E=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?zhe:I,D=t.as,N=D===void 0?"div":D,z=t.lockProps,W=z===void 0?{}:z,V=t.sideCar,q=t.returnFocus,he=t.focusOptions,de=t.onActivation,ve=t.onDeactivation,Ee=C.exports.useState({}),xe=Ee[0],Z=C.exports.useCallback(function(){c.current=c.current||document&&document.activeElement,s.current&&de&&de(s.current),l.current=!0},[de]),U=C.exports.useCallback(function(){l.current=!1,ve&&ve(s.current)},[ve]);C.exports.useEffect(function(){g||(c.current=null)},[]);var ee=C.exports.useCallback(function(ut){var qe=c.current;if(qe&&qe.focus){var ot=typeof q=="function"?q(qe):q;if(ot){var tt=typeof ot=="object"?ot:void 0;c.current=null,ut?Promise.resolve().then(function(){return qe.focus(tt)}):qe.focus(tt)}}},[q]),ae=C.exports.useCallback(function(ut){l.current&&bz.useMedium(ut)},[]),X=Sz.useMedium,me=C.exports.useCallback(function(ut){s.current!==ut&&(s.current=ut,a(ut))},[]),ye=En((r={},r[pz]=g&&"disabled",r[z6]=T,r),W),Se=m!==!0,He=Se&&m!=="tail",je=gz([n,me]);return ne(Fn,{children:[Se&&[w("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:nS},"guard-first"),L?w("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:nS},"guard-nearest"):null],!g&&w(V,{id:xe,sideCar:Dhe,observed:o,disabled:g,persistentFocus:y,crossFrame:b,autoFocus:S,whiteList:k,shards:O,onActivation:Z,onDeactivation:U,returnFocus:ee,focusOptions:he}),w(N,{ref:je,...ye,className:E,onBlur:X,onFocus:ae,children:p}),He&&w("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:nS})]})});YC.propTypes={};YC.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const wz=YC;function F6(e,t){return F6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},F6(e,t)}function XC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,F6(e,t)}function Cz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fhe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(c){return c.props})),t(a)}var l=function(c){XC(p,c);function p(){return c.apply(this,arguments)||this}p.peek=function(){return a};var g=p.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var y=o.indexOf(this);o.splice(y,1),s()},g.render=function(){return w(i,{...this.props})},p}(C.exports.PureComponent);return Cz(l,"displayName","SideEffect("+n(i)+")"),l}}var Pl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(jhe)},qhe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],JC=qhe.join(","),Khe="".concat(JC,", [data-focus-guard]"),Mz=function(e,t){var n;return Pl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Khe:JC)?[i]:[],Mz(i))},[])},e7=function(e,t){return e.reduce(function(n,r){return n.concat(Mz(r,t),r.parentNode?Pl(r.parentNode.querySelectorAll(JC)).filter(function(i){return i===r}):[])},[])},Zhe=function(e){var t=e.querySelectorAll("[".concat(Ahe,"]"));return Pl(t).map(function(n){return e7([n])}).reduce(function(n,r){return n.concat(r)},[])},t7=function(e,t){return Pl(e).filter(function(n){return Ez(t,n)}).filter(function(n){return Vhe(n)})},XT=function(e,t){return t===void 0&&(t=new Map),Pl(e).filter(function(n){return Pz(t,n)})},$6=function(e,t,n){return Iz(t7(e7(e,n),t),!0,n)},QT=function(e,t){return Iz(t7(e7(e),t),!1)},Yhe=function(e,t){return t7(Zhe(e),t)},Km=function(e,t){return e.shadowRoot?Km(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Pl(e.children).some(function(n){return Km(n,t)})},Xhe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},Rz=function(e){return e.parentNode?Rz(e.parentNode):e},n7=function(e){var t=B6(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(z6);return n.push.apply(n,i?Xhe(Pl(Rz(r).querySelectorAll("[".concat(z6,'="').concat(i,'"]:not([').concat(pz,'="disabled"])')))):[r]),n},[])},Oz=function(e){return e.activeElement?e.activeElement.shadowRoot?Oz(e.activeElement.shadowRoot):e.activeElement:void 0},r7=function(){return document.activeElement?document.activeElement.shadowRoot?Oz(document.activeElement.shadowRoot):document.activeElement:void 0},Qhe=function(e){return e===document.activeElement},Jhe=function(e){return Boolean(Pl(e.querySelectorAll("iframe")).some(function(t){return Qhe(t)}))},Nz=function(e){var t=document&&r7();return!t||t.dataset&&t.dataset.focusGuard?!1:n7(e).some(function(n){return Km(n,t)||Jhe(n)})},epe=function(){var e=document&&r7();return e?Pl(document.querySelectorAll("[".concat(Lhe,"]"))).some(function(t){return Km(t,e)}):!1},tpe=function(e,t){return t.filter(Az).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},i7=function(e,t){return Az(e)&&e.name?tpe(e,t):e},npe=function(e){var t=new Set;return e.forEach(function(n){return t.add(i7(n,e))}),e.filter(function(n){return t.has(n)})},JT=function(e){return e[0]&&e.length>1?i7(e[0],e):e[0]},eL=function(e,t){return e.length>1?e.indexOf(i7(e[t],e)):t},Dz="NEW_FOCUS",rpe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=QC(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,c=r?t.indexOf(r):l,p=r?e.indexOf(r):-1,g=l-c,m=t.indexOf(o),y=t.indexOf(a),b=npe(t),S=n!==void 0?b.indexOf(n):-1,T=S-(r?b.indexOf(r):l),E=eL(e,0),k=eL(e,i-1);if(l===-1||p===-1)return Dz;if(!g&&p>=0)return p;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=y&&s&&Math.abs(g)>1)return E;if(g&&Math.abs(T)>1)return p;if(l<=m)return k;if(l>y)return E;if(g)return Math.abs(g)>1?p:(i+p+g)%i}},ipe=function(e){return function(t){var n,r=(n=Tz(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},ope=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=XT(r.filter(ipe(n)));return i&&i.length?JT(i):JT(XT(t))},H6=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&H6(e.parentNode.host||e.parentNode,t),t},rS=function(e,t){for(var n=H6(e),r=H6(t),i=0;i=0)return o}return!1},zz=function(e,t,n){var r=B6(e),i=B6(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=rS(a||s,s)||a,n.filter(Boolean).forEach(function(l){var c=rS(o,l);c&&(!a||Km(c,a)?a=c:a=rS(c,a))})}),a},ape=function(e,t){return e.reduce(function(n,r){return n.concat(Yhe(r,t))},[])},spe=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Ghe)},lpe=function(e,t){var n=document&&r7(),r=n7(e).filter(y4),i=zz(n||e,e,r),o=new Map,a=QT(r,o),s=$6(r,o).filter(function(m){var y=m.node;return y4(y)});if(!(!s[0]&&(s=a,!s[0]))){var l=QT([i],o).map(function(m){var y=m.node;return y}),c=spe(l,s),p=c.map(function(m){var y=m.node;return y}),g=rpe(p,l,n,t);return g===Dz?{node:ope(a,p,ape(r,o))}:g===void 0?g:c[g]}},upe=function(e){var t=n7(e).filter(y4),n=zz(e,e,t),r=new Map,i=$6([n],r,!0),o=$6(t,r).filter(function(a){var s=a.node;return y4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:QC(s)}})},cpe=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},iS=0,oS=!1,dpe=function(e,t,n){n===void 0&&(n={});var r=lpe(e,t);if(!oS&&r){if(iS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),oS=!0,setTimeout(function(){oS=!1},1);return}iS++,cpe(r.node,n.focusOptions),iS--}};const Fz=dpe;function Bz(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var fpe=function(){return document&&document.activeElement===document.body},hpe=function(){return fpe()||epe()},Xp=null,Op=null,Qp=null,Zm=!1,ppe=function(){return!0},gpe=function(t){return(Xp.whiteList||ppe)(t)},mpe=function(t,n){Qp={observerNode:t,portaledElement:n}},vpe=function(t){return Qp&&Qp.portaledElement===t};function tL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var ype=function(t){return t&&"current"in t?t.current:t},xpe=function(t){return t?Boolean(Zm):Zm==="meanwhile"},bpe=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},Spe=function(t,n){return n.some(function(r){return bpe(t,r,r)})},x4=function(){var t=!1;if(Xp){var n=Xp,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,c=r||Qp&&Qp.portaledElement,p=document&&document.activeElement;if(c){var g=[c].concat(a.map(ype).filter(Boolean));if((!p||gpe(p))&&(i||xpe(s)||!hpe()||!Op&&o)&&(c&&!(Nz(g)||p&&Spe(p,g)||vpe(p))&&(document&&!Op&&p&&!o?(p.blur&&p.blur(),document.body.focus()):(t=Fz(g,Op,{focusOptions:l}),Qp={})),Zm=!1,Op=document&&document.activeElement),document){var m=document&&document.activeElement,y=upe(g),b=y.map(function(S){var T=S.node;return T}).indexOf(m);b>-1&&(y.filter(function(S){var T=S.guard,E=S.node;return T&&E.dataset.focusAutoGuard}).forEach(function(S){var T=S.node;return T.removeAttribute("tabIndex")}),tL(b,y.length,1,y),tL(b,-1,-1,y))}}}return t},$z=function(t){x4()&&t&&(t.stopPropagation(),t.preventDefault())},o7=function(){return Bz(x4)},wpe=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||mpe(r,n)},Cpe=function(){return null},Hz=function(){Zm="just",setTimeout(function(){Zm="meanwhile"},0)},_pe=function(){document.addEventListener("focusin",$z),document.addEventListener("focusout",o7),window.addEventListener("blur",Hz)},kpe=function(){document.removeEventListener("focusin",$z),document.removeEventListener("focusout",o7),window.removeEventListener("blur",Hz)};function Epe(e){return e.filter(function(t){var n=t.disabled;return!n})}function Ppe(e){var t=e.slice(-1)[0];t&&!Xp&&_pe();var n=Xp,r=n&&t&&t.id===n.id;Xp=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Op=null,(!r||n.observed!==t.observed)&&t.onActivation(),x4(),Bz(x4)):(kpe(),Op=null)}bz.assignSyncMedium(wpe);Sz.assignMedium(o7);Nhe.assignMedium(function(e){return e({moveFocusInside:Fz,focusInside:Nz})});const Tpe=Fhe(Epe,Ppe)(Cpe);var Wz=C.exports.forwardRef(function(t,n){return w(wz,{sideCar:Tpe,ref:n,...t})}),Vz=wz.propTypes||{};Vz.sideCar;KC(Vz,["sideCar"]);Wz.propTypes={};const Lpe=Wz;var Uz=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:c}=e,p=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&YD(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var y;(y=n?.current)==null||y.focus()},[n]);return w(Lpe,{crossFrame:c,persistentFocus:l,autoFocus:s,disabled:a,onActivation:p,onDeactivation:g,returnFocus:i&&!n,children:o})};Uz.displayName="FocusLock";var i3="right-scroll-bar-position",o3="width-before-scroll-bar",Ape="with-scroll-bars-hidden",Ipe="--removed-body-scroll-bar-size",Gz=yz(),aS=function(){},q5=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:aS,onWheelCapture:aS,onTouchMoveCapture:aS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,p=e.enabled,g=e.shards,m=e.sideCar,y=e.noIsolation,b=e.inert,S=e.allowPinchZoom,T=e.as,E=T===void 0?"div":T,k=sD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=gz([n,t]),O=ul(ul({},k),i);return ne(Fn,{children:[p&&w(L,{sideCar:Gz,removeScrollBar:c,shards:g,noIsolation:y,inert:b,setCallbacks:o,allowPinchZoom:!!S,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),ul(ul({},O),{ref:I})):w(E,{...ul({},O,{className:l,ref:I}),children:s})]})});q5.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};q5.classNames={fullWidth:o3,zeroRight:i3};var Mpe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rpe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Mpe();return t&&e.setAttribute("nonce",t),e}function Ope(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Npe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dpe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rpe())&&(Ope(t,n),Npe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zpe=function(){var e=Dpe();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},jz=function(){var e=zpe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Fpe={left:0,top:0,right:0,gap:0},sS=function(e){return parseInt(e||"",10)||0},Bpe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[sS(n),sS(r),sS(i)]},$pe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fpe;var t=Bpe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hpe=jz(),Wpe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Ape,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(i3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(o3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(i3," .").concat(i3,` { - right: 0 `).concat(r,`; - } - - .`).concat(o3," .").concat(o3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(Ipe,": ").concat(s,`px; - } -`)},Vpe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return $pe(i)},[i]);return w(Hpe,{styles:Wpe(o,!t,i,n?"":"!important")})},W6=!1;if(typeof window<"u")try{var iy=Object.defineProperty({},"passive",{get:function(){return W6=!0,!0}});window.addEventListener("test",iy,iy),window.removeEventListener("test",iy,iy)}catch{W6=!1}var cp=W6?{passive:!1}:!1,Upe=function(e){return e.tagName==="TEXTAREA"},qz=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Upe(e)&&n[t]==="visible")},Gpe=function(e){return qz(e,"overflowY")},jpe=function(e){return qz(e,"overflowX")},nL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Kz(e,n);if(r){var i=Zz(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},qpe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Kpe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Kz=function(e,t){return e==="v"?Gpe(t):jpe(t)},Zz=function(e,t){return e==="v"?qpe(t):Kpe(t)},Zpe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ype=function(e,t,n,r,i){var o=Zpe(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,p=a>0,g=0,m=0;do{var y=Zz(e,s),b=y[0],S=y[1],T=y[2],E=S-T-o*b;(b||E)&&Kz(e,s)&&(g+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(p&&(i&&g===0||!i&&a>g)||!p&&(i&&m===0||!i&&-a>m))&&(c=!0),c},oy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rL=function(e){return[e.deltaX,e.deltaY]},iL=function(e){return e&&"current"in e?e.current:e},Xpe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qpe=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Jpe=0,dp=[];function e0e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(Jpe++)[0],o=C.exports.useState(function(){return jz()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=E6([e.lockRef.current],(e.shards||[]).map(iL),!0).filter(Boolean);return S.forEach(function(T){return T.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(S,T){if("touches"in S&&S.touches.length===2)return!a.current.allowPinchZoom;var E=oy(S),k=n.current,L="deltaX"in S?S.deltaX:k[0]-E[0],I="deltaY"in S?S.deltaY:k[1]-E[1],O,D=S.target,N=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in S&&N==="h"&&D.type==="range")return!1;var z=nL(N,D);if(!z)return!0;if(z?O=N:(O=N==="v"?"h":"v",z=nL(N,D)),!z)return!1;if(!r.current&&"changedTouches"in S&&(L||I)&&(r.current=O),!O)return!0;var W=r.current||O;return Ype(W,T,S,W==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(S){var T=S;if(!(!dp.length||dp[dp.length-1]!==o)){var E="deltaY"in T?rL(T):oy(T),k=t.current.filter(function(O){return O.name===T.type&&O.target===T.target&&Xpe(O.delta,E)})[0];if(k&&k.should){T.cancelable&&T.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(iL).filter(Boolean).filter(function(O){return O.contains(T.target)}),I=L.length>0?s(T,L[0]):!a.current.noIsolation;I&&T.cancelable&&T.preventDefault()}}},[]),c=C.exports.useCallback(function(S,T,E,k){var L={name:S,delta:T,target:E,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),p=C.exports.useCallback(function(S){n.current=oy(S),r.current=void 0},[]),g=C.exports.useCallback(function(S){c(S.type,rL(S),S.target,s(S,e.lockRef.current))},[]),m=C.exports.useCallback(function(S){c(S.type,oy(S),S.target,s(S,e.lockRef.current))},[]);C.exports.useEffect(function(){return dp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,cp),document.addEventListener("touchmove",l,cp),document.addEventListener("touchstart",p,cp),function(){dp=dp.filter(function(S){return S!==o}),document.removeEventListener("wheel",l,cp),document.removeEventListener("touchmove",l,cp),document.removeEventListener("touchstart",p,cp)}},[]);var y=e.removeScrollBar,b=e.inert;return ne(Fn,{children:[b?w(o,{styles:Qpe(i)}):null,y?w(Vpe,{gapMode:"margin"}):null]})}const t0e=Ohe(Gz,e0e);var Yz=C.exports.forwardRef(function(e,t){return w(q5,{...ul({},e,{ref:t,sideCar:t0e})})});Yz.classNames=q5.classNames;const Xz=Yz;var Qf=(...e)=>e.filter(Boolean).join(" ");function Pg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var n0e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},V6=new n0e;function r0e(e,t){C.exports.useEffect(()=>(t&&V6.add(e),()=>{V6.remove(e)}),[t,e])}function i0e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,c=C.exports.useRef(null),p=C.exports.useRef(null),[g,m,y]=a0e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");o0e(c,t&&a),r0e(c,t);const b=C.exports.useRef(null),S=C.exports.useCallback(z=>{b.current=z.target},[]),T=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},W=null)=>({role:"dialog",...z,ref:zn(W,c),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":L?y:void 0,onClick:Pg(z.onClick,V=>V.stopPropagation())}),[y,L,g,m,E]),D=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!V6.isTopModal(c)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},W=null)=>({...z,ref:zn(W,p),onClick:Pg(z.onClick,D),onKeyDown:Pg(z.onKeyDown,T),onMouseDown:Pg(z.onMouseDown,S)}),[T,S,D]);return{isOpen:t,onClose:n,headerId:m,bodyId:y,setBodyMounted:I,setHeaderMounted:k,dialogRef:c,overlayRef:p,getDialogProps:O,getDialogContainerProps:N}}function o0e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return dz(e.current)},[t,e,n])}function a0e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[s0e,Jf]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[l0e,Zc]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),S0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:p,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:y}=e,b=Ai("Modal",e),T={...i0e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:p,motionPreset:g,lockFocusAcrossFrames:m};return w(l0e,{value:T,children:w(s0e,{value:b,children:w(wu,{onExitComplete:y,children:T.isOpen&&w(Xf,{...t,children:n})})})})};S0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};S0.displayName="Modal";var b4=ke((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=Zc();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Qf("chakra-modal__body",n),s=Jf();return re.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});b4.displayName="ModalBody";var a7=ke((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=Zc(),a=Qf("chakra-modal__close-btn",r),s=Jf();return w(U5,{ref:t,__css:s.closeButton,className:a,onClick:Pg(n,l=>{l.stopPropagation(),o()}),...i})});a7.displayName="ModalCloseButton";function Qz(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:c,lockFocusAcrossFrames:p}=Zc(),[g,m]=xC();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),w(Uz,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:p,children:w(Xz,{removeScrollBar:!c,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var u0e={slideInBottom:{...T6,custom:{offsetY:16,reverse:!0}},slideInRight:{...T6,custom:{offsetX:16,reverse:!0}},scale:{...cD,custom:{initialScale:.95,reverse:!0}},none:{}},c0e=be(Ha.section),d0e=e=>u0e[e||"none"],Jz=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=d0e(n),...i}=e;return w(c0e,{ref:t,...r,...i})});Jz.displayName="ModalTransition";var Ym=ke((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=Zc(),c=s(a,t),p=l(i),g=Qf("chakra-modal__content",n),m=Jf(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:S}=Zc();return re.createElement(Qz,null,re.createElement(be.div,{...p,className:"chakra-modal__content-container",tabIndex:-1,__css:b},w(Jz,{preset:S,motionProps:o,className:g,...c,__css:y,children:r})))});Ym.displayName="ModalContent";var s7=ke((e,t)=>{const{className:n,...r}=e,i=Qf("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...Jf().footer};return re.createElement(be.footer,{ref:t,...r,__css:a,className:i})});s7.displayName="ModalFooter";var l7=ke((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=Zc();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Qf("chakra-modal__header",n),l={flex:0,...Jf().header};return re.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});l7.displayName="ModalHeader";var f0e=be(Ha.div),Xm=ke((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Qf("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Jf().overlay},{motionPreset:c}=Zc();return w(f0e,{...i||(c==="none"?{}:uD),__css:l,ref:t,className:a,...o})});Xm.displayName="ModalOverlay";function h0e(e){const{leastDestructiveRef:t,...n}=e;return w(S0,{...n,initialFocusRef:t})}var p0e=ke((e,t)=>w(Ym,{ref:t,role:"alertdialog",...e})),[ICe,g0e]=xn(),m0e=be(dD),v0e=ke((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:c}=Zc(),p=s(a,t),g=l(o),m=Qf("chakra-modal__content",n),y=Jf(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...y.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...y.dialogContainer},{placement:T}=g0e();return re.createElement(Qz,null,re.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:S},w(m0e,{motionProps:i,direction:T,in:c,className:m,...p,__css:b,children:r})))});v0e.displayName="DrawerContent";function y0e(e,t){const n=ur(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var eF=(...e)=>e.filter(Boolean).join(" "),lS=e=>e?!0:void 0;function Xs(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var x0e=e=>w(ha,{viewBox:"0 0 24 24",...e,children:w("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),b0e=e=>w(ha,{viewBox:"0 0 24 24",...e,children:w("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function oL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var S0e=50,aL=300;function w0e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),c=()=>clearTimeout(l.current);y0e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?S0e:null);const p=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},aL)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},aL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),c()},[]);return C.exports.useEffect(()=>()=>c(),[]),{up:p,down:g,stop:m,isSpinning:n}}var C0e=/^[Ee0-9+\-.]$/;function _0e(e){return C0e.test(e)}function k0e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function E0e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:c,isInvalid:p,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:y,id:b,onChange:S,precision:T,name:E,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:D,onInvalid:N,getAriaValueText:z,isValidCharacter:W,format:V,parse:q,...he}=e,de=ur(O),ve=ur(D),Ee=ur(N),xe=ur(W??_0e),Z=ur(z),U=Nce(e),{update:ee,increment:ae,decrement:X}=U,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ut=C.exports.useRef(null),qe=C.exports.useRef(null),ot=C.exports.useCallback(_e=>_e.split("").filter(xe).join(""),[xe]),tt=C.exports.useCallback(_e=>q?.(_e)??_e,[q]),at=C.exports.useCallback(_e=>(V?.(_e)??_e).toString(),[V]);qc(()=>{(U.valueAsNumber>o||U.valueAsNumber{if(!He.current)return;if(He.current.value!=U.value){const Tt=tt(He.current.value);U.setValue(ot(Tt))}},[tt,ot]);const Rt=C.exports.useCallback((_e=a)=>{Se&&ae(_e)},[ae,Se,a]),kt=C.exports.useCallback((_e=a)=>{Se&&X(_e)},[X,Se,a]),Le=w0e(Rt,kt);oL(ut,"disabled",Le.stop,Le.isSpinning),oL(qe,"disabled",Le.stop,Le.isSpinning);const st=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;const De=tt(_e.currentTarget.value);ee(ot(De)),je.current={start:_e.currentTarget.selectionStart,end:_e.currentTarget.selectionEnd}},[ee,ot,tt]),Lt=C.exports.useCallback(_e=>{var Tt;de?.(_e),je.current&&(_e.target.selectionStart=je.current.start??((Tt=_e.currentTarget.value)==null?void 0:Tt.length),_e.currentTarget.selectionEnd=je.current.end??_e.currentTarget.selectionStart)},[de]),it=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;k0e(_e,xe)||_e.preventDefault();const Tt=mt(_e)*a,De=_e.key,rn={ArrowUp:()=>Rt(Tt),ArrowDown:()=>kt(Tt),Home:()=>ee(i),End:()=>ee(o)}[De];rn&&(_e.preventDefault(),rn(_e))},[xe,a,Rt,kt,ee,i,o]),mt=_e=>{let Tt=1;return(_e.metaKey||_e.ctrlKey)&&(Tt=.1),_e.shiftKey&&(Tt=10),Tt},Sn=C.exports.useMemo(()=>{const _e=Z?.(U.value);if(_e!=null)return _e;const Tt=U.value.toString();return Tt||void 0},[U.value,Z]),wt=C.exports.useCallback(()=>{let _e=U.value;if(U.value==="")return;/^[eE]/.test(U.value.toString())?U.setValue(""):(U.valueAsNumbero&&(_e=o),U.cast(_e))},[U,o,i]),Kt=C.exports.useCallback(()=>{ye(!1),n&&wt()},[n,ye,wt]),wn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var _e;(_e=He.current)==null||_e.focus()})},[t]),pn=C.exports.useCallback(_e=>{_e.preventDefault(),Le.up(),wn()},[wn,Le]),Re=C.exports.useCallback(_e=>{_e.preventDefault(),Le.down(),wn()},[wn,Le]);Mf(()=>He.current,"wheel",_e=>{var Tt;const nt=(((Tt=He.current)==null?void 0:Tt.ownerDocument)??document).activeElement===He.current;if(!y||!nt)return;_e.preventDefault();const rn=mt(_e)*a,Mn=Math.sign(_e.deltaY);Mn===-1?Rt(rn):Mn===1&&kt(rn)},{passive:!1});const Ze=C.exports.useCallback((_e={},Tt=null)=>{const De=l||r&&U.isAtMax;return{..._e,ref:zn(Tt,ut),role:"button",tabIndex:-1,onPointerDown:Xs(_e.onPointerDown,nt=>{nt.button!==0||De||pn(nt)}),onPointerLeave:Xs(_e.onPointerLeave,Le.stop),onPointerUp:Xs(_e.onPointerUp,Le.stop),disabled:De,"aria-disabled":lS(De)}},[U.isAtMax,r,pn,Le.stop,l]),Zt=C.exports.useCallback((_e={},Tt=null)=>{const De=l||r&&U.isAtMin;return{..._e,ref:zn(Tt,qe),role:"button",tabIndex:-1,onPointerDown:Xs(_e.onPointerDown,nt=>{nt.button!==0||De||Re(nt)}),onPointerLeave:Xs(_e.onPointerLeave,Le.stop),onPointerUp:Xs(_e.onPointerUp,Le.stop),disabled:De,"aria-disabled":lS(De)}},[U.isAtMin,r,Re,Le.stop,l]),Gt=C.exports.useCallback((_e={},Tt=null)=>({name:E,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,..._e,readOnly:_e.readOnly??s,"aria-readonly":_e.readOnly??s,"aria-required":_e.required??c,required:_e.required??c,ref:zn(He,Tt),value:at(U.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(U.valueAsNumber)?void 0:U.valueAsNumber,"aria-invalid":lS(p??U.isOutOfRange),"aria-valuetext":Sn,autoComplete:"off",autoCorrect:"off",onChange:Xs(_e.onChange,st),onKeyDown:Xs(_e.onKeyDown,it),onFocus:Xs(_e.onFocus,Lt,()=>ye(!0)),onBlur:Xs(_e.onBlur,ve,Kt)}),[E,m,g,I,L,at,k,b,l,c,s,p,U.value,U.valueAsNumber,U.isOutOfRange,i,o,Sn,st,it,Lt,ve,Kt]);return{value:at(U.value),valueAsNumber:U.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:Gt,htmlProps:he}}var[P0e,K5]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[T0e,u7]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),tF=ke(function(t,n){const r=Ai("NumberInput",t),i=hn(t),o=IC(i),{htmlProps:a,...s}=E0e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(T0e,{value:l},re.createElement(P0e,{value:r},re.createElement(be.div,{...a,ref:n,className:eF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});tF.displayName="NumberInput";var L0e=ke(function(t,n){const r=K5();return re.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});L0e.displayName="NumberInputStepper";var nF=ke(function(t,n){const{getInputProps:r}=u7(),i=r(t,n),o=K5();return re.createElement(be.input,{...i,className:eF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});nF.displayName="NumberInputField";var rF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),iF=ke(function(t,n){const r=K5(),{getDecrementButtonProps:i}=u7(),o=i(t,n);return w(rF,{...o,__css:r.stepper,children:t.children??w(x0e,{})})});iF.displayName="NumberDecrementStepper";var oF=ke(function(t,n){const{getIncrementButtonProps:r}=u7(),i=r(t,n),o=K5();return w(rF,{...i,__css:o.stepper,children:t.children??w(b0e,{})})});oF.displayName="NumberIncrementStepper";var Ev=(...e)=>e.filter(Boolean).join(" ");function A0e(e,...t){return I0e(e)?e(...t):e}var I0e=e=>typeof e=="function";function Qs(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function M0e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R0e,eh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[O0e,Pv]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),fp={click:"click",hover:"hover"};function N0e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:c=fp.click,openDelay:p=200,closeDelay:g=200,isLazy:m,lazyBehavior:y="unmount",computePositionOnMount:b,...S}=e,{isOpen:T,onClose:E,onOpen:k,onToggle:L}=sz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),D=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);T&&(z.current=!0);const[W,V]=C.exports.useState(!1),[q,he]=C.exports.useState(!1),de=C.exports.useId(),ve=i??de,[Ee,xe,Z,U]=["popover-trigger","popover-content","popover-header","popover-body"].map(st=>`${st}-${ve}`),{referenceRef:ee,getArrowProps:ae,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=az({...S,enabled:T||!!b}),Se=ghe({isOpen:T,ref:D});Uce({enabled:T,ref:O}),Gde(D,{focusRef:O,visible:T,shouldFocus:o&&c===fp.click}),qde(D,{focusRef:r,visible:T,shouldFocus:a&&c===fp.click});const He=lz({wasSelected:z.current,enabled:m,mode:y,isSelected:Se.present}),je=C.exports.useCallback((st={},Lt=null)=>{const it={...st,style:{...st.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:zn(D,Lt),children:He?st.children:null,id:xe,tabIndex:-1,role:"dialog",onKeyDown:Qs(st.onKeyDown,mt=>{n&&mt.key==="Escape"&&E()}),onBlur:Qs(st.onBlur,mt=>{const Sn=sL(mt),wt=uS(D.current,Sn),Kt=uS(O.current,Sn);T&&t&&(!wt&&!Kt)&&E()}),"aria-labelledby":W?Z:void 0,"aria-describedby":q?U:void 0};return c===fp.hover&&(it.role="tooltip",it.onMouseEnter=Qs(st.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=Qs(st.onMouseLeave,mt=>{mt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),g))})),it},[He,xe,W,Z,q,U,c,n,E,T,t,g,l,s]),ut=C.exports.useCallback((st={},Lt=null)=>X({...st,style:{visibility:T?"visible":"hidden",...st.style}},Lt),[T,X]),qe=C.exports.useCallback((st,Lt=null)=>({...st,ref:zn(Lt,I,ee)}),[I,ee]),ot=C.exports.useRef(),tt=C.exports.useRef(),at=C.exports.useCallback(st=>{I.current==null&&ee(st)},[ee]),Rt=C.exports.useCallback((st={},Lt=null)=>{const it={...st,ref:zn(O,Lt,at),id:Ee,"aria-haspopup":"dialog","aria-expanded":T,"aria-controls":xe};return c===fp.click&&(it.onClick=Qs(st.onClick,L)),c===fp.hover&&(it.onFocus=Qs(st.onFocus,()=>{ot.current===void 0&&k()}),it.onBlur=Qs(st.onBlur,mt=>{const Sn=sL(mt),wt=!uS(D.current,Sn);T&&t&&wt&&E()}),it.onKeyDown=Qs(st.onKeyDown,mt=>{mt.key==="Escape"&&E()}),it.onMouseEnter=Qs(st.onMouseEnter,()=>{N.current=!0,ot.current=window.setTimeout(()=>k(),p)}),it.onMouseLeave=Qs(st.onMouseLeave,()=>{N.current=!1,ot.current&&(clearTimeout(ot.current),ot.current=void 0),tt.current=window.setTimeout(()=>{N.current===!1&&E()},g)})),it},[Ee,T,xe,c,at,L,k,t,E,p,g]);C.exports.useEffect(()=>()=>{ot.current&&clearTimeout(ot.current),tt.current&&clearTimeout(tt.current)},[]);const kt=C.exports.useCallback((st={},Lt=null)=>({...st,id:Z,ref:zn(Lt,it=>{V(!!it)})}),[Z]),Le=C.exports.useCallback((st={},Lt=null)=>({...st,id:U,ref:zn(Lt,it=>{he(!!it)})}),[U]);return{forceUpdate:ye,isOpen:T,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:ae,getArrowInnerProps:me,getPopoverPositionerProps:ut,getPopoverProps:je,getTriggerProps:Rt,getHeaderProps:kt,getBodyProps:Le}}function uS(e,t){return e===t||e?.contains(t)}function sL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function c7(e){const t=Ai("Popover",e),{children:n,...r}=hn(e),i=A0(),o=N0e({...r,direction:i.direction});return w(R0e,{value:o,children:w(O0e,{value:t,children:A0e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}c7.displayName="Popover";function d7(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=eh(),a=Pv(),s=t??n??r;return re.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(be.div,{className:Ev("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}d7.displayName="PopoverArrow";var D0e=ke(function(t,n){const{getBodyProps:r}=eh(),i=Pv();return re.createElement(be.div,{...r(t,n),className:Ev("chakra-popover__body",t.className),__css:i.body})});D0e.displayName="PopoverBody";var z0e=ke(function(t,n){const{onClose:r}=eh(),i=Pv();return w(U5,{size:"sm",onClick:r,className:Ev("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});z0e.displayName="PopoverCloseButton";function F0e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var B0e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},$0e=be(Ha.section),aF=ke(function(t,n){const{variants:r=B0e,...i}=t,{isOpen:o}=eh();return re.createElement($0e,{ref:n,variants:F0e(r),initial:!1,animate:o?"enter":"exit",...i})});aF.displayName="PopoverTransition";var f7=ke(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=eh(),c=Pv(),p={position:"relative",display:"flex",flexDirection:"column",...c.content};return re.createElement(be.div,{...s(r),__css:c.popper,className:"chakra-popover__popper"},w(aF,{...i,...a(o,n),onAnimationComplete:M0e(l,o.onAnimationComplete),className:Ev("chakra-popover__content",t.className),__css:p}))});f7.displayName="PopoverContent";var H0e=ke(function(t,n){const{getHeaderProps:r}=eh(),i=Pv();return re.createElement(be.header,{...r(t,n),className:Ev("chakra-popover__header",t.className),__css:i.header})});H0e.displayName="PopoverHeader";function h7(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=eh();return C.exports.cloneElement(t,n(t.props,t.ref))}h7.displayName="PopoverTrigger";function W0e(e,t,n){return(e-t)*100/(n-t)}var V0e=hv({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),U0e=hv({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G0e=hv({"0%":{left:"-40%"},"100%":{left:"100%"}}),j0e=hv({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function sF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a}=e,s=W0e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,s):i})(),role:"progressbar"},percent:s,value:t}}var lF=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${U0e} 2s linear infinite`:void 0},...r})};lF.displayName="Shape";var U6=e=>re.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});U6.displayName="Circle";var q0e=ke((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:c,thickness:p="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:y,...b}=e,S=sF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:y}),T=y?void 0:(S.percent??0)*2.64,E=T==null?void 0:`${T} ${264-T}`,k=y?{css:{animation:`${V0e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(be.div,{ref:t,className:"chakra-progress",...S.bind,...b,__css:L},ne(lF,{size:n,isIndeterminate:y,children:[w(U6,{stroke:m,strokeWidth:p,className:"chakra-progress__track"}),w(U6,{stroke:g,strokeWidth:p,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:S.value===0&&!y?0:void 0,...k})]}),c)});q0e.displayName="CircularProgress";var[K0e,Z0e]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Y0e=ke((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,...a}=e,s=sF({value:i,min:n,max:r,isIndeterminate:o}),c={height:"100%",...Z0e().filledTrack};return re.createElement(be.div,{ref:t,style:{width:`${s.percent}%`,...a.style},...s.bind,...a,__css:c})}),uF=ke((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:c,isIndeterminate:p,"aria-label":g,"aria-labelledby":m,...y}=hn(e),b=Ai("Progress",e),S=c??((n=b.track)==null?void 0:n.borderRadius),T={animation:`${j0e} 1s linear infinite`},L={...!p&&a&&s&&T,...p&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G0e} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",...b.track};return re.createElement(be.div,{ref:t,borderRadius:S,__css:I,...y},ne(K0e,{value:b,children:[w(Y0e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:p,css:L,borderRadius:S}),l]}))});uF.displayName="Progress";var X0e=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});X0e.displayName="CircularProgressLabel";var Q0e=(...e)=>e.filter(Boolean).join(" "),J0e=e=>e?"":void 0;function e1e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var cF=ke(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(be.select,{...a,ref:n,className:Q0e("chakra-select",o)},i&&w("option",{value:"",children:i}),r)});cF.displayName="SelectField";var dF=ke((e,t)=>{var n;const r=Ai("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:c,minH:p,minHeight:g,iconColor:m,iconSize:y,...b}=hn(e),[S,T]=e1e(b,hY),E=AC(T),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...S,...i},w(cF,{ref:t,height:c??l,minH:p??g,placeholder:o,...E,__css:L,children:e.children}),w(fF,{"data-disabled":J0e(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...y&&{fontSize:y},children:a}))});dF.displayName="Select";var t1e=e=>w("svg",{viewBox:"0 0 24 24",...e,children:w("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),n1e=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),fF=e=>{const{children:t=w(t1e,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return w(n1e,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};fF.displayName="SelectIcon";function r1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function i1e(e){const t=a1e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function hF(e){return!!e.touches}function o1e(e){return hF(e)&&e.touches.length>1}function a1e(e){return e.view??window}function s1e(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function l1e(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function pF(e,t="page"){return hF(e)?s1e(e,t):l1e(e,t)}function u1e(e){return t=>{const n=i1e(t);(!n||n&&t.button===0)&&e(t)}}function c1e(e,t=!1){function n(i){e(i,{point:pF(i)})}return t?u1e(n):n}function a3(e,t,n,r){return r1e(e,t,c1e(n,t==="pointerdown"),r)}function gF(e){const t=C.exports.useRef(null);return t.current=e,t}var d1e=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,o1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:pF(e)},{timestamp:i}=FE();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,cS(r,this.history)),this.removeListeners=p1e(a3(this.win,"pointermove",this.onPointerMove),a3(this.win,"pointerup",this.onPointerUp),a3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=cS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=g1e(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=FE();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,kX.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=cS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),EX.update(this.updatePoint)}};function lL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cS(e,t){return{point:e.point,delta:lL(e.point,t[t.length-1]),offset:lL(e.point,t[0]),velocity:h1e(t,.1)}}var f1e=e=>e*1e3;function h1e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>f1e(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function p1e(...e){return t=>e.reduce((n,r)=>r(n),t)}function dS(e,t){return Math.abs(e-t)}function uL(e){return"x"in e&&"y"in e}function g1e(e,t){if(typeof e=="number"&&typeof t=="number")return dS(e,t);if(uL(e)&&uL(t)){const n=dS(e.x,t.x),r=dS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function mF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),c=C.exports.useRef(null),p=gF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){c.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=c.current)==null||g.updateHandlers(p.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(y){c.current=new d1e(y,p.current,s)}return a3(g,"pointerdown",m)},[e,l,p,s]),C.exports.useEffect(()=>()=>{var g;(g=c.current)==null||g.end(),c.current=null},[])}function m1e(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var v1e=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function y1e(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function vF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return v1e(()=>{const a=e(),s=a.map((l,c)=>m1e(l,p=>{r(g=>[...g.slice(0,c),p,...g.slice(c+1)])}));if(t){const l=a[0];s.push(y1e(l,()=>{o(c=>c+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function x1e(e){return typeof e=="object"&&e!==null&&"current"in e}function b1e(e){const[t]=vF({observeMutation:!1,getNodes(){return[x1e(e)?e.current:e]}});return t}var S1e=Object.getOwnPropertyNames,w1e=(e,t)=>function(){return e&&(t=(0,e[S1e(e)[0]])(e=0)),t},ad=w1e({"../../../react-shim.js"(){}});ad();ad();ad();var La=e=>e?"":void 0,Jp=e=>e?!0:void 0,sd=(...e)=>e.filter(Boolean).join(" ");ad();function e0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}ad();ad();function C1e(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Tg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var s3={width:0,height:0},ay=e=>e||s3;function yF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=S=>{const T=r[S]??s3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Tg({orientation:t,vertical:{bottom:`calc(${n[S]}% - ${T.height/2}px)`},horizontal:{left:`calc(${n[S]}% - ${T.width/2}px)`}})}},a=t==="vertical"?r.reduce((S,T)=>ay(S).height>ay(T).height?S:T,s3):r.reduce((S,T)=>ay(S).width>ay(T).width?S:T,s3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Tg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Tg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},c=n.length===1,p=[0,i?100-n[0]:n[0]],g=c?p:n;let m=g[0];!c&&i&&(m=100-m);const y=Math.abs(g[g.length-1]-g[0]),b={...l,...Tg({orientation:t,vertical:i?{height:`${y}%`,top:`${m}%`}:{height:`${y}%`,bottom:`${m}%`},horizontal:i?{width:`${y}%`,right:`${m}%`}:{width:`${y}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function xF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function _1e(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:c,isDisabled:p,isReadOnly:g,onChangeStart:m,onChangeEnd:y,step:b=1,getAriaValueText:S,"aria-valuetext":T,"aria-label":E,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...D}=e,N=ur(m),z=ur(y),W=ur(S),V=xF({isReversed:a,direction:s,orientation:l}),[q,he]=k5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[de,ve]=C.exports.useState(!1),[Ee,xe]=C.exports.useState(!1),[Z,U]=C.exports.useState(-1),ee=!(p||g),ae=C.exports.useRef(q),X=q.map(Be=>Yp(Be,t,n)),me=O*b,ye=k1e(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Be=>n-Be+t),ut=(V?He:X).map(Be=>g4(Be,t,n)),qe=l==="vertical",ot=C.exports.useRef(null),tt=C.exports.useRef(null),at=vF({getNodes(){const Be=tt.current,ct=Be?.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),Rt=C.exports.useId(),Le=C1e(c??Rt),st=C.exports.useCallback(Be=>{var ct;if(!ot.current)return;Se.current.eventSource="pointer";const Qe=ot.current.getBoundingClientRect(),{clientX:Mt,clientY:Yt}=((ct=Be.touches)==null?void 0:ct[0])??Be,Zn=qe?Qe.bottom-Yt:Mt-Qe.left,ao=qe?Qe.height:Qe.width;let ui=Zn/ao;return V&&(ui=1-ui),wD(ui,t,n)},[qe,V,n,t]),Lt=(n-t)/10,it=b||(n-t)/100,mt=C.exports.useMemo(()=>({setValueAtIndex(Be,ct){if(!ee)return;const Qe=Se.current.valueBounds[Be];ct=parseFloat(R6(ct,Qe.min,it)),ct=Yp(ct,Qe.min,Qe.max);const Mt=[...Se.current.value];Mt[Be]=ct,he(Mt)},setActiveIndex:U,stepUp(Be,ct=it){const Qe=Se.current.value[Be],Mt=V?Qe-ct:Qe+ct;mt.setValueAtIndex(Be,Mt)},stepDown(Be,ct=it){const Qe=Se.current.value[Be],Mt=V?Qe+ct:Qe-ct;mt.setValueAtIndex(Be,Mt)},reset(){he(ae.current)}}),[it,V,he,ee]),Sn=C.exports.useCallback(Be=>{const ct=Be.key,Mt={ArrowRight:()=>mt.stepUp(Z),ArrowUp:()=>mt.stepUp(Z),ArrowLeft:()=>mt.stepDown(Z),ArrowDown:()=>mt.stepDown(Z),PageUp:()=>mt.stepUp(Z,Lt),PageDown:()=>mt.stepDown(Z,Lt),Home:()=>{const{min:Yt}=ye[Z];mt.setValueAtIndex(Z,Yt)},End:()=>{const{max:Yt}=ye[Z];mt.setValueAtIndex(Z,Yt)}}[ct];Mt&&(Be.preventDefault(),Be.stopPropagation(),Mt(Be),Se.current.eventSource="keyboard")},[mt,Z,Lt,ye]),{getThumbStyle:wt,rootStyle:Kt,trackStyle:wn,innerTrackStyle:pn}=C.exports.useMemo(()=>yF({isReversed:V,orientation:l,thumbRects:at,thumbPercents:ut}),[V,l,ut,at]),Re=C.exports.useCallback(Be=>{var ct;const Qe=Be??Z;if(Qe!==-1&&I){const Mt=Le.getThumb(Qe),Yt=(ct=tt.current)==null?void 0:ct.ownerDocument.getElementById(Mt);Yt&&setTimeout(()=>Yt.focus())}},[I,Z,Le]);qc(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Ze=Be=>{const ct=st(Be)||0,Qe=Se.current.value.map(ui=>Math.abs(ui-ct)),Mt=Math.min(...Qe);let Yt=Qe.indexOf(Mt);const Zn=Qe.filter(ui=>ui===Mt);Zn.length>1&&ct>Se.current.value[Yt]&&(Yt=Yt+Zn.length-1),U(Yt),mt.setValueAtIndex(Yt,ct),Re(Yt)},Zt=Be=>{if(Z==-1)return;const ct=st(Be)||0;U(Z),mt.setValueAtIndex(Z,ct),Re(Z)};mF(tt,{onPanSessionStart(Be){!ee||(ve(!0),Ze(Be),N?.(Se.current.value))},onPanSessionEnd(){!ee||(ve(!1),z?.(Se.current.value))},onPan(Be){!ee||Zt(Be)}});const Gt=C.exports.useCallback((Be={},ct=null)=>({...Be,...D,id:Le.root,ref:zn(ct,tt),tabIndex:-1,"aria-disabled":Jp(p),"data-focused":La(Ee),style:{...Be.style,...Kt}}),[D,p,Ee,Kt,Le]),_e=C.exports.useCallback((Be={},ct=null)=>({...Be,ref:zn(ct,ot),id:Le.track,"data-disabled":La(p),style:{...Be.style,...wn}}),[p,wn,Le]),Tt=C.exports.useCallback((Be={},ct=null)=>({...Be,ref:ct,id:Le.innerTrack,style:{...Be.style,...pn}}),[pn,Le]),De=C.exports.useCallback((Be,ct=null)=>{const{index:Qe,...Mt}=Be,Yt=X[Qe];if(Yt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${Qe}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Zn=ye[Qe];return{...Mt,ref:ct,role:"slider",tabIndex:ee?0:void 0,id:Le.getThumb(Qe),"data-active":La(de&&Z===Qe),"aria-valuetext":W?.(Yt)??T?.[Qe],"aria-valuemin":Zn.min,"aria-valuemax":Zn.max,"aria-valuenow":Yt,"aria-orientation":l,"aria-disabled":Jp(p),"aria-readonly":Jp(g),"aria-label":E?.[Qe],"aria-labelledby":E?.[Qe]?void 0:k?.[Qe],style:{...Be.style,...wt(Qe)},onKeyDown:e0(Be.onKeyDown,Sn),onFocus:e0(Be.onFocus,()=>{xe(!0),U(Qe)}),onBlur:e0(Be.onBlur,()=>{xe(!1),U(-1)})}},[Le,X,ye,ee,de,Z,W,T,l,p,g,E,k,wt,Sn,xe]),nt=C.exports.useCallback((Be={},ct=null)=>({...Be,ref:ct,id:Le.output,htmlFor:X.map((Qe,Mt)=>Le.getThumb(Mt)).join(" "),"aria-live":"off"}),[Le,X]),rn=C.exports.useCallback((Be,ct=null)=>{const{value:Qe,...Mt}=Be,Yt=!(Qen),Zn=Qe>=X[0]&&Qe<=X[X.length-1];let ao=g4(Qe,t,n);ao=V?100-ao:ao;const ui={position:"absolute",pointerEvents:"none",...Tg({orientation:l,vertical:{bottom:`${ao}%`},horizontal:{left:`${ao}%`}})};return{...Mt,ref:ct,id:Le.getMarker(Be.value),role:"presentation","aria-hidden":!0,"data-disabled":La(p),"data-invalid":La(!Yt),"data-highlighted":La(Zn),style:{...Be.style,...ui}}},[p,V,n,t,l,X,Le]),Mn=C.exports.useCallback((Be,ct=null)=>{const{index:Qe,...Mt}=Be;return{...Mt,ref:ct,id:Le.getInput(Qe),type:"hidden",value:X[Qe],name:Array.isArray(L)?L[Qe]:`${L}-${Qe}`}},[L,X,Le]);return{state:{value:X,isFocused:Ee,isDragging:de,getThumbPercent:Be=>ut[Be],getThumbMinValue:Be=>ye[Be].min,getThumbMaxValue:Be=>ye[Be].max},actions:mt,getRootProps:Gt,getTrackProps:_e,getInnerTrackProps:Tt,getThumbProps:De,getMarkerProps:rn,getInputProps:Mn,getOutputProps:nt}}function k1e(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[E1e,Z5]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[P1e,p7]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),bF=ke(function(t,n){const r=Ai("Slider",t),i=hn(t),{direction:o}=A0();i.direction=o;const{getRootProps:a,...s}=_1e(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(E1e,{value:l},re.createElement(P1e,{value:r},re.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});bF.defaultProps={orientation:"horizontal"};bF.displayName="RangeSlider";var T1e=ke(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Z5(),a=p7(),s=r(t,n);return re.createElement(be.div,{...s,className:sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&w("input",{...i({index:t.index})}))});T1e.displayName="RangeSliderThumb";var L1e=ke(function(t,n){const{getTrackProps:r}=Z5(),i=p7(),o=r(t,n);return re.createElement(be.div,{...o,className:sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});L1e.displayName="RangeSliderTrack";var A1e=ke(function(t,n){const{getInnerTrackProps:r}=Z5(),i=p7(),o=r(t,n);return re.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});A1e.displayName="RangeSliderFilledTrack";var I1e=ke(function(t,n){const{getMarkerProps:r}=Z5(),i=r(t,n);return re.createElement(be.div,{...i,className:sd("chakra-slider__marker",t.className)})});I1e.displayName="RangeSliderMark";ad();ad();function M1e(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:c,isDisabled:p,isReadOnly:g,onChangeStart:m,onChangeEnd:y,step:b=1,getAriaValueText:S,"aria-valuetext":T,"aria-label":E,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,D=ur(m),N=ur(y),z=ur(S),W=xF({isReversed:a,direction:s,orientation:l}),[V,q]=k5({value:i,defaultValue:o??O1e(t,n),onChange:r}),[he,de]=C.exports.useState(!1),[ve,Ee]=C.exports.useState(!1),xe=!(p||g),Z=(n-t)/10,U=b||(n-t)/100,ee=Yp(V,t,n),ae=n-ee+t,me=g4(W?ae:ee,t,n),ye=l==="vertical",Se=gF({min:t,max:n,step:b,isDisabled:p,value:ee,isInteractive:xe,isReversed:W,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ut=C.exports.useRef(null),qe=C.exports.useId(),ot=c??qe,[tt,at]=[`slider-thumb-${ot}`,`slider-track-${ot}`],Rt=C.exports.useCallback(De=>{var nt;if(!He.current)return;const rn=Se.current;rn.eventSource="pointer";const Mn=He.current.getBoundingClientRect(),{clientX:Be,clientY:ct}=((nt=De.touches)==null?void 0:nt[0])??De,Qe=ye?Mn.bottom-ct:Be-Mn.left,Mt=ye?Mn.height:Mn.width;let Yt=Qe/Mt;W&&(Yt=1-Yt);let Zn=wD(Yt,rn.min,rn.max);return rn.step&&(Zn=parseFloat(R6(Zn,rn.min,rn.step))),Zn=Yp(Zn,rn.min,rn.max),Zn},[ye,W,Se]),kt=C.exports.useCallback(De=>{const nt=Se.current;!nt.isInteractive||(De=parseFloat(R6(De,nt.min,U)),De=Yp(De,nt.min,nt.max),q(De))},[U,q,Se]),Le=C.exports.useMemo(()=>({stepUp(De=U){const nt=W?ee-De:ee+De;kt(nt)},stepDown(De=U){const nt=W?ee+De:ee-De;kt(nt)},reset(){kt(o||0)},stepTo(De){kt(De)}}),[kt,W,ee,U,o]),st=C.exports.useCallback(De=>{const nt=Se.current,Mn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(Z),PageDown:()=>Le.stepDown(Z),Home:()=>kt(nt.min),End:()=>kt(nt.max)}[De.key];Mn&&(De.preventDefault(),De.stopPropagation(),Mn(De),nt.eventSource="keyboard")},[Le,kt,Z,Se]),Lt=z?.(ee)??T,it=b1e(je),{getThumbStyle:mt,rootStyle:Sn,trackStyle:wt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const De=Se.current,nt=it??{width:0,height:0};return yF({isReversed:W,orientation:De.orientation,thumbRects:[nt],thumbPercents:[me]})},[W,it,me,Se]),wn=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var nt;return(nt=je.current)==null?void 0:nt.focus()})},[Se]);qc(()=>{const De=Se.current;wn(),De.eventSource==="keyboard"&&N?.(De.value)},[ee,N]);function pn(De){const nt=Rt(De);nt!=null&&nt!==Se.current.value&&q(nt)}mF(ut,{onPanSessionStart(De){const nt=Se.current;!nt.isInteractive||(de(!0),wn(),pn(De),D?.(nt.value))},onPanSessionEnd(){const De=Se.current;!De.isInteractive||(de(!1),N?.(De.value))},onPan(De){!Se.current.isInteractive||pn(De)}});const Re=C.exports.useCallback((De={},nt=null)=>({...De,...O,ref:zn(nt,ut),tabIndex:-1,"aria-disabled":Jp(p),"data-focused":La(ve),style:{...De.style,...Sn}}),[O,p,ve,Sn]),Ze=C.exports.useCallback((De={},nt=null)=>({...De,ref:zn(nt,He),id:at,"data-disabled":La(p),style:{...De.style,...wt}}),[p,at,wt]),Zt=C.exports.useCallback((De={},nt=null)=>({...De,ref:nt,style:{...De.style,...Kt}}),[Kt]),Gt=C.exports.useCallback((De={},nt=null)=>({...De,ref:zn(nt,je),role:"slider",tabIndex:xe?0:void 0,id:tt,"data-active":La(he),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":ee,"aria-orientation":l,"aria-disabled":Jp(p),"aria-readonly":Jp(g),"aria-label":E,"aria-labelledby":E?void 0:k,style:{...De.style,...mt(0)},onKeyDown:e0(De.onKeyDown,st),onFocus:e0(De.onFocus,()=>Ee(!0)),onBlur:e0(De.onBlur,()=>Ee(!1))}),[xe,tt,he,Lt,t,n,ee,l,p,g,E,k,mt,st]),_e=C.exports.useCallback((De,nt=null)=>{const rn=!(De.valuen),Mn=ee>=De.value,Be=g4(De.value,t,n),ct={position:"absolute",pointerEvents:"none",...R1e({orientation:l,vertical:{bottom:W?`${100-Be}%`:`${Be}%`},horizontal:{left:W?`${100-Be}%`:`${Be}%`}})};return{...De,ref:nt,role:"presentation","aria-hidden":!0,"data-disabled":La(p),"data-invalid":La(!rn),"data-highlighted":La(Mn),style:{...De.style,...ct}}},[p,W,n,t,l,ee]),Tt=C.exports.useCallback((De={},nt=null)=>({...De,ref:nt,type:"hidden",value:ee,name:L}),[L,ee]);return{state:{value:ee,isFocused:ve,isDragging:he},actions:Le,getRootProps:Re,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:Gt,getMarkerProps:_e,getInputProps:Tt}}function R1e(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function O1e(e,t){return t"}),[D1e,X5]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),g7=ke((e,t)=>{const n=Ai("Slider",e),r=hn(e),{direction:i}=A0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=M1e(r),l=a(),c=o({},t);return re.createElement(N1e,{value:s},re.createElement(D1e,{value:n},re.createElement(be.div,{...l,className:sd("chakra-slider",e.className),__css:n.container},e.children,w("input",{...c}))))});g7.defaultProps={orientation:"horizontal"};g7.displayName="Slider";var SF=ke((e,t)=>{const{getThumbProps:n}=Y5(),r=X5(),i=n(e,t);return re.createElement(be.div,{...i,className:sd("chakra-slider__thumb",e.className),__css:r.thumb})});SF.displayName="SliderThumb";var wF=ke((e,t)=>{const{getTrackProps:n}=Y5(),r=X5(),i=n(e,t);return re.createElement(be.div,{...i,className:sd("chakra-slider__track",e.className),__css:r.track})});wF.displayName="SliderTrack";var CF=ke((e,t)=>{const{getInnerTrackProps:n}=Y5(),r=X5(),i=n(e,t);return re.createElement(be.div,{...i,className:sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});CF.displayName="SliderFilledTrack";var z1e=ke((e,t)=>{const{getMarkerProps:n}=Y5(),r=X5(),i=n(e,t);return re.createElement(be.div,{...i,className:sd("chakra-slider__marker",e.className),__css:r.mark})});z1e.displayName="SliderMark";var F1e=(...e)=>e.filter(Boolean).join(" "),cL=e=>e?"":void 0,m7=ke(function(t,n){const r=Ai("Switch",t),{spacing:i="0.5rem",children:o,...a}=hn(t),{state:s,getInputProps:l,getCheckboxProps:c,getRootProps:p,getLabelProps:g}=bD(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),y=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(be.label,{...p(),className:F1e("chakra-switch",t.className),__css:m},w("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(be.span,{...c(),className:"chakra-switch__track",__css:y},re.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":cL(s.isChecked),"data-hover":cL(s.isHovered)})),o&&re.createElement(be.span,{className:"chakra-switch__label",...g(),__css:b},o))});m7.displayName="Switch";var D0=(...e)=>e.filter(Boolean).join(" ");function G6(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[B1e,_F,$1e,H1e]=MO();function W1e(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...c}=e,[p,g]=C.exports.useState(t??0),[m,y]=k5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$1e(),S=C.exports.useId();return{id:`tabs-${e.id??S}`,selectedIndex:m,focusedIndex:p,setSelectedIndex:y,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:c}}var[V1e,Tv]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function U1e(e){const{focusedIndex:t,orientation:n,direction:r}=Tv(),i=_F(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},c=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},p=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",y=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",S=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>g&&l(),[S]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:c,End:p}[y];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:G6(e.onKeyDown,o)}}function G1e(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Tv(),{index:c,register:p}=H1e({disabled:t&&!n}),g=c===l,m=()=>{i(c)},y=()=>{s(c),!o&&!(t&&n)&&i(c)},b=Ode({...r,ref:zn(p,e.ref),isDisabled:t,isFocusable:n,onClick:G6(e.onClick,m)}),S="button";return{...b,id:kF(a,c),role:"tab",tabIndex:g?0:-1,type:S,"aria-selected":g,"aria-controls":EF(a,c),onFocus:t?void 0:G6(e.onFocus,y)}}var[j1e,q1e]=xn({});function K1e(e){const t=Tv(),{id:n,selectedIndex:r}=t,o=H5(e.children).map((a,s)=>C.exports.createElement(j1e,{key:s,value:{isSelected:s===r,id:EF(n,s),tabId:kF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Z1e(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Tv(),{isSelected:o,id:a,tabId:s}=q1e(),l=C.exports.useRef(!1);o&&(l.current=!0);const c=lz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:c?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Y1e(){const e=Tv(),t=_F(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,c]=C.exports.useState(!1);return pl(()=>{if(n==null)return;const p=t.item(n);if(p==null)return;i&&s({left:p.node.offsetLeft,width:p.node.offsetWidth}),o&&s({top:p.node.offsetTop,height:p.node.offsetHeight});const g=requestAnimationFrame(()=>{c(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function kF(e,t){return`${e}--tab-${t}`}function EF(e,t){return`${e}--tabpanel-${t}`}var[X1e,Lv]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),PF=ke(function(t,n){const r=Ai("Tabs",t),{children:i,className:o,...a}=hn(t),{htmlProps:s,descendants:l,...c}=W1e(a),p=C.exports.useMemo(()=>c,[c]),{isFitted:g,...m}=s;return re.createElement(B1e,{value:l},re.createElement(V1e,{value:p},re.createElement(X1e,{value:r},re.createElement(be.div,{className:D0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});PF.displayName="Tabs";var Q1e=ke(function(t,n){const r=Y1e(),i={...t.style,...r},o=Lv();return re.createElement(be.div,{ref:n,...t,className:D0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Q1e.displayName="TabIndicator";var J1e=ke(function(t,n){const r=U1e({...t,ref:n}),o={display:"flex",...Lv().tablist};return re.createElement(be.div,{...r,className:D0("chakra-tabs__tablist",t.className),__css:o})});J1e.displayName="TabList";var TF=ke(function(t,n){const r=Z1e({...t,ref:n}),i=Lv();return re.createElement(be.div,{outline:"0",...r,className:D0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});TF.displayName="TabPanel";var LF=ke(function(t,n){const r=K1e(t),i=Lv();return re.createElement(be.div,{...r,width:"100%",ref:n,className:D0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});LF.displayName="TabPanels";var AF=ke(function(t,n){const r=Lv(),i=G1e({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(be.button,{...i,className:D0("chakra-tabs__tab",t.className),__css:o})});AF.displayName="Tab";var ege=(...e)=>e.filter(Boolean).join(" ");function tge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nge=["h","minH","height","minHeight"],IF=ke((e,t)=>{const n=oo("Textarea",e),{className:r,rows:i,...o}=hn(e),a=AC(o),s=i?tge(n,nge):n;return re.createElement(be.textarea,{ref:t,rows:i,...a,className:ege("chakra-textarea",r),__css:s})});IF.displayName="Textarea";function rge(e,t){const n=ur(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function j6(e,...t){return ige(e)?e(...t):e}var ige=e=>typeof e=="function";function oge(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var age=(e,t)=>e.find(n=>n.id===t);function dL(e,t){const n=MF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function MF(e,t){for(const[n,r]of Object.entries(e))if(age(r,t))return n}function sge(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lge(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var uge={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},cl=cge(uge);function cge(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dge(i,o),{position:s,id:l}=a;return r(c=>{const g=s.includes("top")?[a,...c[s]??[]]:[...c[s]??[],a];return{...c,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:c}=dL(s,i);return l&&c!==-1&&(s[l][c]={...s[l][c],...o,message:RF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,c)=>(l[c]=o[c].map(p=>({...p,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=MF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(dL(cl.getState(),i).position)}}var fL=0;function dge(e,t={}){fL+=1;const n=t.id??fL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>cl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fge=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(hD,{addRole:!1,status:t,variant:n,id:c?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},w(gD,{children:l}),re.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&w(mD,{id:c?.title,children:i}),s&&w(pD,{id:c?.description,display:"block",children:s})),o&&w(U5,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function RF(e={}){const{render:t,toastComponent:n=fge}=e;return i=>typeof t=="function"?t({...i,...e}):w(n,{...i,...e})}function hge(e,t){const n=i=>({...t,...i,position:oge(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=RF(o);return cl.notify(a,o)};return r.update=(i,o)=>{cl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...j6(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...j6(o.error,s)}))},r.closeAll=cl.closeAll,r.close=cl.close,r.isActive=cl.isActive,r}function ld(e){const{theme:t}=LO();return C.exports.useMemo(()=>hge(t.direction,e),[e,t.direction])}var pge={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},OF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:c=pge,toastSpacing:p="0.5rem"}=e,[g,m]=C.exports.useState(s),y=ase();qc(()=>{y||r?.()},[y]),qc(()=>{m(s)},[s]);const b=()=>m(null),S=()=>m(s),T=()=>{y&&i()};C.exports.useEffect(()=>{y&&o&&i()},[y,o,i]),rge(T,g);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:p,...l}),[l,p]),k=C.exports.useMemo(()=>sge(a),[a]);return re.createElement(Ha.li,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:S,custom:{position:a},style:k},re.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},j6(n,{id:t,onClose:T})))});OF.displayName="ToastComponent";var gge=e=>{const t=C.exports.useSyncExternalStore(cl.subscribe,cl.getState,cl.getState),{children:n,motionVariants:r,component:i=OF,portalProps:o}=e,s=Object.keys(t).map(l=>{const c=t[l];return w("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lge(l),children:w(wu,{initial:!1,children:c.map(p=>w(i,{motionVariants:r,...p},p.id))})},l)});return ne(Fn,{children:[n,w(Xf,{...o,children:s})]})};function mge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vge(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yge={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function dg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},q6=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function xge(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:c,placement:p,id:g,isOpen:m,defaultIsOpen:y,arrowSize:b=10,arrowShadowColor:S,arrowPadding:T,modifiers:E,isDisabled:k,gutter:L,offset:I,direction:O,...D}=e,{isOpen:N,onOpen:z,onClose:W}=sz({isOpen:m,defaultIsOpen:y,onOpen:l,onClose:c}),{referenceRef:V,getPopperProps:q,getArrowInnerProps:he,getArrowProps:de}=az({enabled:N,placement:p,arrowPadding:T,modifiers:E,gutter:L,offset:I,direction:O}),ve=C.exports.useId(),xe=`tooltip-${g??ve}`,Z=C.exports.useRef(null),U=C.exports.useRef(),ee=C.exports.useRef(),ae=C.exports.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=void 0),W()},[W]),X=bge(Z,ae),me=C.exports.useCallback(()=>{if(!k&&!U.current){X();const tt=q6(Z);U.current=tt.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=void 0);const tt=q6(Z);ee.current=tt.setTimeout(ae,n)},[n,ae]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),He=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),je=C.exports.useCallback(tt=>{N&&tt.key==="Escape"&&ye()},[N,ye]);Mf(()=>S4(Z),"keydown",s?je:void 0),Mf(()=>S4(Z),"scroll",()=>{N&&o&&ae()}),C.exports.useEffect(()=>()=>{clearTimeout(U.current),clearTimeout(ee.current)},[]),Mf(()=>Z.current,"pointerleave",ye);const ut=C.exports.useCallback((tt={},at=null)=>({...tt,ref:zn(Z,at,V),onPointerEnter:dg(tt.onPointerEnter,kt=>{kt.pointerType!=="touch"&&me()}),onClick:dg(tt.onClick,Se),onPointerDown:dg(tt.onPointerDown,He),onFocus:dg(tt.onFocus,me),onBlur:dg(tt.onBlur,ye),"aria-describedby":N?xe:void 0}),[me,ye,He,N,xe,Se,V]),qe=C.exports.useCallback((tt={},at=null)=>q({...tt,style:{...tt.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:S}},at),[q,b,S]),ot=C.exports.useCallback((tt={},at=null)=>{const Rt={...tt.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:at,...D,...tt,id:xe,role:"tooltip",style:Rt}},[D,xe]);return{isOpen:N,show:me,hide:ye,getTriggerProps:ut,getTooltipProps:ot,getTooltipPositionerProps:qe,getArrowProps:de,getArrowInnerProps:he}}var fS="chakra-ui:close-tooltip";function bge(e,t){return C.exports.useEffect(()=>{const n=S4(e);return n.addEventListener(fS,t),()=>n.removeEventListener(fS,t)},[t,e]),()=>{const n=S4(e),r=q6(e);n.dispatchEvent(new r.CustomEvent(fS))}}var Sge=be(Ha.div),$i=ke((e,t)=>{const n=oo("Tooltip",e),r=hn(e),i=A0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:c,bg:p,portalProps:g,background:m,backgroundColor:y,bgColor:b,motionProps:S,...T}=r,E=m??y??p??b;if(E){n.bg=E;const W=PY(i,"colors",E);n[Hr.arrowBg.var]=W}const k=xge({...T,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const W=C.exports.Children.only(o);I=C.exports.cloneElement(W,k.getTriggerProps(W.props,W.ref))}const O=!!l,D=k.getTooltipProps({},t),N=O?mge(D,["role","id"]):D,z=vge(D,["role","id"]);return a?ne(Fn,{children:[I,w(wu,{children:k.isOpen&&re.createElement(Xf,{...g},re.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Sge,{variants:yge,initial:"exit",animate:"enter",exit:"exit",...S,...N,__css:n,children:[a,O&&re.createElement(be.span,{srOnly:!0,...z},l),c&&re.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):w(Fn,{children:o})});$i.displayName="Tooltip";var wge=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=w(VD,{environment:a,children:t});return w(xie,{theme:o,cssVarsRoot:s,children:ne(IR,{colorModeManager:n,options:o.config,children:[i?w(zce,{}):w(Dce,{}),w(Sie,{}),r?w(uz,{zIndex:r,children:l}):l]})})};function Cge({children:e,theme:t=PO,toastOptions:n,...r}){return ne(wge,{theme:t,...r,children:[e,w(gge,{...n})]})}function ps(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:v7(e)?2:y7(e)?3:0}function t0(e,t){return z0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _ge(e,t){return z0(e)===2?e.get(t):e[t]}function NF(e,t,n){var r=z0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function DF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function v7(e){return Age&&e instanceof Map}function y7(e){return Ige&&e instanceof Set}function lf(e){return e.o||e.t}function x7(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=FF(e);delete t[er];for(var n=n0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=kge),Object.freeze(e),t&&Uf(e,function(n,r){return b7(r,!0)},!0)),e}function kge(){ps(2)}function S7(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function xl(e){var t=X6[e];return t||ps(18,e),t}function Ege(e,t){X6[e]||(X6[e]=t)}function K6(){return Qm}function hS(e,t){t&&(xl("Patches"),e.u=[],e.s=[],e.v=t)}function w4(e){Z6(e),e.p.forEach(Pge),e.p=null}function Z6(e){e===Qm&&(Qm=e.l)}function hL(e){return Qm={p:[],l:Qm,h:e,m:!0,_:0}}function Pge(e){var t=e[er];t.i===0||t.i===1?t.j():t.O=!0}function pS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||xl("ES5").S(t,e,r),r?(n[er].P&&(w4(t),ps(4)),vu(e)&&(e=C4(t,e),t.l||_4(t,e)),t.u&&xl("Patches").M(n[er].t,e,t.u,t.s)):e=C4(t,n,[]),w4(t),t.u&&t.v(t.u,t.s),e!==zF?e:void 0}function C4(e,t,n){if(S7(t))return t;var r=t[er];if(!r)return Uf(t,function(o,a){return pL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return _4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=x7(r.k):r.o;Uf(r.i===3?new Set(i):i,function(o,a){return pL(e,r,i,o,a,n)}),_4(e,i,!1),n&&e.u&&xl("Patches").R(r,n,e.u,e.s)}return r.o}function pL(e,t,n,r,i,o){if(Yc(i)){var a=C4(e,i,o&&t&&t.i!==3&&!t0(t.D,r)?o.concat(r):void 0);if(NF(n,r,a),!Yc(a))return;e.m=!1}if(vu(i)&&!S7(i)){if(!e.h.F&&e._<1)return;C4(e,i),t&&t.A.l||_4(e,i)}}function _4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&b7(t,n)}function gS(e,t){var n=e[er];return(n?lf(n):e)[t]}function gL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Pc(e){e.P||(e.P=!0,e.l&&Pc(e.l))}function mS(e){e.o||(e.o=x7(e.t))}function Y6(e,t,n){var r=v7(t)?xl("MapSet").N(t,n):y7(t)?xl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:K6(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=Jm;a&&(l=[s],c=Lg);var p=Proxy.revocable(l,c),g=p.revoke,m=p.proxy;return s.k=m,s.j=g,m}(t,n):xl("ES5").J(t,n);return(n?n.A:K6()).p.push(r),r}function Tge(e){return Yc(e)||ps(22,e),function t(n){if(!vu(n))return n;var r,i=n[er],o=z0(n);if(i){if(!i.P&&(i.i<4||!xl("ES5").K(i)))return i.t;i.I=!0,r=mL(n,o),i.I=!1}else r=mL(n,o);return Uf(r,function(a,s){i&&_ge(i.t,a)===s||NF(r,a,t(s))}),o===3?new Set(r):r}(e)}function mL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return x7(e)}function Lge(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[er];return Jm.get(l,o)},set:function(l){var c=this[er];Jm.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][er];if(!s.P)switch(s.i){case 5:r(s)&&Pc(s);break;case 4:n(s)&&Pc(s)}}}function n(o){for(var a=o.t,s=o.k,l=n0(s),c=l.length-1;c>=0;c--){var p=l[c];if(p!==er){var g=a[p];if(g===void 0&&!t0(a,p))return!0;var m=s[p],y=m&&m[er];if(y?y.t!==g:!DF(m,g))return!0}}var b=!!a[er];return l.length!==n0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),L=1;L1?p-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=xl("Patches").$;return Yc(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),sa=new Rge,BF=sa.produce;sa.produceWithPatches.bind(sa);sa.setAutoFreeze.bind(sa);sa.setUseProxies.bind(sa);sa.applyPatches.bind(sa);sa.createDraft.bind(sa);sa.finishDraft.bind(sa);function bL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(zi(1));return n(C7)(e,t)}if(typeof e!="function")throw new Error(zi(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function p(){if(l)throw new Error(zi(3));return o}function g(S){if(typeof S!="function")throw new Error(zi(4));if(l)throw new Error(zi(5));var T=!0;return c(),s.push(S),function(){if(!!T){if(l)throw new Error(zi(6));T=!1,c();var k=s.indexOf(S);s.splice(k,1),a=null}}}function m(S){if(!Oge(S))throw new Error(zi(7));if(typeof S.type>"u")throw new Error(zi(8));if(l)throw new Error(zi(9));try{l=!0,o=i(o,S)}finally{l=!1}for(var T=a=s,E=0;E"u")throw new Error(zi(12));if(typeof n(void 0,{type:k4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(zi(13))})}function $F(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(zi(14));g[y]=T,p=p||T!==S}return p=p||o.length!==Object.keys(l).length,p?g:l}}function E4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return P4}function i(s,l){r(s)===P4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bge=function(t,n){return t===n};function $ge(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fme:dme;GF.useSyncExternalStore=w0.useSyncExternalStore!==void 0?w0.useSyncExternalStore:hme;(function(e){e.exports=GF})(UF);var jF={exports:{}},qF={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var J5=C.exports,pme=UF.exports;function gme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mme=typeof Object.is=="function"?Object.is:gme,vme=pme.useSyncExternalStore,yme=J5.useRef,xme=J5.useEffect,bme=J5.useMemo,Sme=J5.useDebugValue;qF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=yme(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=bme(function(){function l(y){if(!c){if(c=!0,p=y,y=r(y),i!==void 0&&a.hasValue){var b=a.value;if(i(b,y))return g=b}return g=y}if(b=g,mme(p,y))return b;var S=r(y);return i!==void 0&&i(b,S)?b:(p=y,g=S)}var c=!1,p,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=vme(e,o[0],o[1]);return xme(function(){a.hasValue=!0,a.value=s},[s]),Sme(s),s};(function(e){e.exports=qF})(jF);function wme(e){e()}let KF=wme;const Cme=e=>KF=e,_me=()=>KF,Xc=C.exports.createContext(null);function ZF(){return C.exports.useContext(Xc)}const kme=()=>{throw new Error("uSES not initialized!")};let YF=kme;const Eme=e=>{YF=e},Pme=(e,t)=>e===t;function Tme(e=Xc){const t=e===Xc?ZF:()=>C.exports.useContext(e);return function(r,i=Pme){const{store:o,subscription:a,getServerState:s}=t(),l=YF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Lme=Tme();var Ame={exports:{}},Ln={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var k7=Symbol.for("react.element"),E7=Symbol.for("react.portal"),ex=Symbol.for("react.fragment"),tx=Symbol.for("react.strict_mode"),nx=Symbol.for("react.profiler"),rx=Symbol.for("react.provider"),ix=Symbol.for("react.context"),Ime=Symbol.for("react.server_context"),ox=Symbol.for("react.forward_ref"),ax=Symbol.for("react.suspense"),sx=Symbol.for("react.suspense_list"),lx=Symbol.for("react.memo"),ux=Symbol.for("react.lazy"),Mme=Symbol.for("react.offscreen"),XF;XF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case k7:switch(e=e.type,e){case ex:case nx:case tx:case ax:case sx:return e;default:switch(e=e&&e.$$typeof,e){case Ime:case ix:case ox:case ux:case lx:case rx:return e;default:return t}}case E7:return t}}}Ln.ContextConsumer=ix;Ln.ContextProvider=rx;Ln.Element=k7;Ln.ForwardRef=ox;Ln.Fragment=ex;Ln.Lazy=ux;Ln.Memo=lx;Ln.Portal=E7;Ln.Profiler=nx;Ln.StrictMode=tx;Ln.Suspense=ax;Ln.SuspenseList=sx;Ln.isAsyncMode=function(){return!1};Ln.isConcurrentMode=function(){return!1};Ln.isContextConsumer=function(e){return Va(e)===ix};Ln.isContextProvider=function(e){return Va(e)===rx};Ln.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===k7};Ln.isForwardRef=function(e){return Va(e)===ox};Ln.isFragment=function(e){return Va(e)===ex};Ln.isLazy=function(e){return Va(e)===ux};Ln.isMemo=function(e){return Va(e)===lx};Ln.isPortal=function(e){return Va(e)===E7};Ln.isProfiler=function(e){return Va(e)===nx};Ln.isStrictMode=function(e){return Va(e)===tx};Ln.isSuspense=function(e){return Va(e)===ax};Ln.isSuspenseList=function(e){return Va(e)===sx};Ln.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ex||e===nx||e===tx||e===ax||e===sx||e===Mme||typeof e=="object"&&e!==null&&(e.$$typeof===ux||e.$$typeof===lx||e.$$typeof===rx||e.$$typeof===ix||e.$$typeof===ox||e.$$typeof===XF||e.getModuleId!==void 0)};Ln.typeOf=Va;(function(e){e.exports=Ln})(Ame);function Rme(){const e=_me();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const EL={notify(){},get:()=>[]};function Ome(e,t){let n,r=EL;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){p.onStateChange&&p.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Rme())}function c(){n&&(n(),n=void 0,r.clear(),r=EL)}const p={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return p}const Nme=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Dme=Nme?C.exports.useLayoutEffect:C.exports.useEffect;function zme({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Ome(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Dme(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),w((t||Xc).Provider,{value:i,children:n})}function QF(e=Xc){const t=e===Xc?ZF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Fme=QF();function Bme(e=Xc){const t=e===Xc?Fme:QF(e);return function(){return t().dispatch}}const $me=Bme();Eme(jF.exports.useSyncExternalStoreWithSelector);Cme(El.exports.unstable_batchedUpdates);var P7="persist:",JF="persist/FLUSH",T7="persist/REHYDRATE",eB="persist/PAUSE",tB="persist/PERSIST",nB="persist/PURGE",rB="persist/REGISTER",Hme=-1;function l3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l3=function(n){return typeof n}:l3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l3(e)}function PL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wme(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Jme(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var eve=5e3;function u3(e,t){var n=e.version!==void 0?e.version:Hme;e.debug;var r=e.stateReconciler===void 0?Ume:e.stateReconciler,i=e.getStoredState||qme,o=e.timeout!==void 0?e.timeout:eve,a=null,s=!1,l=!0,c=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(p,g){var m=p||{},y=m._persist,b=Qme(m,["_persist"]),S=b;if(g.type===tB){var T=!1,E=function(z,W){T||(g.rehydrate(e.key,z,W),T=!0)};if(o&&setTimeout(function(){!T&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=Gme(e)),y)return Xl({},t(S,g),{_persist:y});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(W,V){return Promise.resolve(W)};z(N,n).then(function(W){E(W)},function(W){E(void 0,W)})},function(N){E(void 0,N)}),Xl({},t(S,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===nB)return s=!0,g.result(Zme(e)),Xl({},t(S,g),{_persist:y});if(g.type===JF)return g.result(a&&a.flush()),Xl({},t(S,g),{_persist:y});if(g.type===eB)l=!0;else if(g.type===T7){if(s)return Xl({},S,{_persist:Xl({},y,{rehydrated:!0})});if(g.key===e.key){var k=t(S,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,p,k,e):k,O=Xl({},I,{_persist:Xl({},y,{rehydrated:!0})});return c(O)}}}if(!y)return t(p,g);var D=t(S,g);return D===S?p:c(Xl({},D,{_persist:y}))}}function lm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lm=function(n){return typeof n}:lm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}function LL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function AL(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:iB,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case rB:return J6({},t,{registry:[].concat(IL(t.registry),[n.key])});case T7:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),J6({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function lve(e,t,n){var r=n||!1,i=C7(sve,iB,t&&t.enhancer?t.enhancer:void 0),o=function(c){i.dispatch({type:rB,key:c})},a=function(c,p,g){var m={type:T7,payload:p,err:g,key:c};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=J6({},i,{purge:function(){var c=[];return e.dispatch({type:nB,result:function(g){c.push(g)}}),Promise.all(c)},flush:function(){var c=[];return e.dispatch({type:JF,result:function(g){c.push(g)}}),Promise.all(c)},pause:function(){e.dispatch({type:eB})},persist:function(){e.dispatch({type:tB,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var L7={},A7={};A7.__esModule=!0;A7.default=dve;function c3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c3=function(n){return typeof n}:c3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},c3(e)}function xS(){}var uve={getItem:xS,setItem:xS,removeItem:xS};function cve(e){if((typeof self>"u"?"undefined":c3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function dve(e){var t="".concat(e,"Storage");return cve(t)?self[t]:uve}L7.__esModule=!0;L7.default=pve;var fve=hve(A7);function hve(e){return e&&e.__esModule?e:{default:e}}function pve(e){var t=(0,fve.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var Av=void 0,gve=mve(L7);function mve(e){return e&&e.__esModule?e:{default:e}}var vve=(0,gve.default)("local");Av=vve;const d3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),yve=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return I7(r)?r:!1},I7=e=>Boolean(typeof e=="string"?yve(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),L4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),xve=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var la={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,p="__lodash_placeholder__",g=1,m=2,y=4,b=1,S=2,T=1,E=2,k=4,L=8,I=16,O=32,D=64,N=128,z=256,W=512,V=30,q="...",he=800,de=16,ve=1,Ee=2,xe=3,Z=1/0,U=9007199254740991,ee=17976931348623157e292,ae=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",N],["bind",T],["bindKey",E],["curry",L],["curryRight",I],["flip",W],["partial",O],["partialRight",D],["rearg",z]],He="[object Arguments]",je="[object Array]",ut="[object AsyncFunction]",qe="[object Boolean]",ot="[object Date]",tt="[object DOMException]",at="[object Error]",Rt="[object Function]",kt="[object GeneratorFunction]",Le="[object Map]",st="[object Number]",Lt="[object Null]",it="[object Object]",mt="[object Promise]",Sn="[object Proxy]",wt="[object RegExp]",Kt="[object Set]",wn="[object String]",pn="[object Symbol]",Re="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",Gt="[object ArrayBuffer]",_e="[object DataView]",Tt="[object Float32Array]",De="[object Float64Array]",nt="[object Int8Array]",rn="[object Int16Array]",Mn="[object Int32Array]",Be="[object Uint8Array]",ct="[object Uint8ClampedArray]",Qe="[object Uint16Array]",Mt="[object Uint32Array]",Yt=/\b__p \+= '';/g,Zn=/\b(__p \+=) '' \+/g,ao=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ui=/&(?:amp|lt|gt|quot|#39);/g,_s=/[&<>"']/g,G0=RegExp(ui.source),pa=RegExp(_s.source),lh=/<%-([\s\S]+?)%>/g,j0=/<%([\s\S]+?)%>/g,Tu=/<%=([\s\S]+?)%>/g,uh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ch=/^\w*$/,Io=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pd=/[\\^$.*+?()[\]{}|]/g,q0=RegExp(pd.source),Lu=/^\s+/,gd=/\s/,K0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ks=/\{\n\/\* \[wrapped with (.+)\] \*/,Au=/,? & /,Z0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Y0=/[()=,{}\[\]\/\s]/,X0=/\\(\\)?/g,Q0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,J0=/^[-+]0x[0-9a-f]+$/i,e1=/^0b[01]+$/i,t1=/^\[object .+?Constructor\]$/,n1=/^0o[0-7]+$/i,r1=/^(?:0|[1-9]\d*)$/,i1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Es=/($^)/,o1=/['\n\r\u2028\u2029\\]/g,Ga="\\ud800-\\udfff",Ll="\\u0300-\\u036f",Al="\\ufe20-\\ufe2f",Ps="\\u20d0-\\u20ff",Il=Ll+Al+Ps,dh="\\u2700-\\u27bf",Iu="a-z\\xdf-\\xf6\\xf8-\\xff",Ts="\\xac\\xb1\\xd7\\xf7",Mo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cn="\\u2000-\\u206f",gn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ro="A-Z\\xc0-\\xd6\\xd8-\\xde",_r="\\ufe0e\\ufe0f",Ur=Ts+Mo+Cn+gn,Oo="['\u2019]",Ls="["+Ga+"]",Gr="["+Ur+"]",ja="["+Il+"]",md="\\d+",Ml="["+dh+"]",qa="["+Iu+"]",vd="[^"+Ga+Ur+md+dh+Iu+Ro+"]",ci="\\ud83c[\\udffb-\\udfff]",fh="(?:"+ja+"|"+ci+")",hh="[^"+Ga+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",As="[\\ud800-\\udbff][\\udc00-\\udfff]",so="["+Ro+"]",Is="\\u200d",Rl="(?:"+qa+"|"+vd+")",a1="(?:"+so+"|"+vd+")",Mu="(?:"+Oo+"(?:d|ll|m|re|s|t|ve))?",Ru="(?:"+Oo+"(?:D|LL|M|RE|S|T|VE))?",xd=fh+"?",Ou="["+_r+"]?",ga="(?:"+Is+"(?:"+[hh,yd,As].join("|")+")"+Ou+xd+")*",bd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ol="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bt=Ou+xd+ga,ph="(?:"+[Ml,yd,As].join("|")+")"+Bt,Nu="(?:"+[hh+ja+"?",ja,yd,As,Ls].join("|")+")",Du=RegExp(Oo,"g"),gh=RegExp(ja,"g"),No=RegExp(ci+"(?="+ci+")|"+Nu+Bt,"g"),$n=RegExp([so+"?"+qa+"+"+Mu+"(?="+[Gr,so,"$"].join("|")+")",a1+"+"+Ru+"(?="+[Gr,so+Rl,"$"].join("|")+")",so+"?"+Rl+"+"+Mu,so+"+"+Ru,Ol,bd,md,ph].join("|"),"g"),Sd=RegExp("["+Is+Ga+Il+_r+"]"),mh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vh=-1,on={};on[Tt]=on[De]=on[nt]=on[rn]=on[Mn]=on[Be]=on[ct]=on[Qe]=on[Mt]=!0,on[He]=on[je]=on[Gt]=on[qe]=on[_e]=on[ot]=on[at]=on[Rt]=on[Le]=on[st]=on[it]=on[wt]=on[Kt]=on[wn]=on[Ze]=!1;var $t={};$t[He]=$t[je]=$t[Gt]=$t[_e]=$t[qe]=$t[ot]=$t[Tt]=$t[De]=$t[nt]=$t[rn]=$t[Mn]=$t[Le]=$t[st]=$t[it]=$t[wt]=$t[Kt]=$t[wn]=$t[pn]=$t[Be]=$t[ct]=$t[Qe]=$t[Mt]=!0,$t[at]=$t[Rt]=$t[Ze]=!1;var yh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},s1={"&":"&","<":"<",">":">",'"':""","'":"'"},H={"&":"&","<":"<",">":">",""":'"',"'":"'"},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ue=parseFloat,Ge=parseInt,Nt=typeof tu=="object"&&tu&&tu.Object===Object&&tu,ln=typeof self=="object"&&self&&self.Object===Object&&self,dt=Nt||ln||Function("return this")(),Ct=t&&!t.nodeType&&t,Ht=Ct&&!0&&e&&!e.nodeType&&e,Nr=Ht&&Ht.exports===Ct,pr=Nr&&Nt.process,un=function(){try{var Q=Ht&&Ht.require&&Ht.require("util").types;return Q||pr&&pr.binding&&pr.binding("util")}catch{}}(),jr=un&&un.isArrayBuffer,lo=un&&un.isDate,Wi=un&&un.isMap,ma=un&&un.isRegExp,Ms=un&&un.isSet,l1=un&&un.isTypedArray;function di(Q,ge,fe){switch(fe.length){case 0:return Q.call(ge);case 1:return Q.call(ge,fe[0]);case 2:return Q.call(ge,fe[0],fe[1]);case 3:return Q.call(ge,fe[0],fe[1],fe[2])}return Q.apply(ge,fe)}function u1(Q,ge,fe,Ve){for(var xt=-1,Xt=Q==null?0:Q.length;++xt-1}function xh(Q,ge,fe){for(var Ve=-1,xt=Q==null?0:Q.length;++Ve-1;);return fe}function Ka(Q,ge){for(var fe=Q.length;fe--&&Bu(ge,Q[fe],0)>-1;);return fe}function d1(Q,ge){for(var fe=Q.length,Ve=0;fe--;)Q[fe]===ge&&++Ve;return Ve}var $v=Ed(yh),Za=Ed(s1);function Os(Q){return"\\"+Y[Q]}function Sh(Q,ge){return Q==null?n:Q[ge]}function Dl(Q){return Sd.test(Q)}function wh(Q){return mh.test(Q)}function Hv(Q){for(var ge,fe=[];!(ge=Q.next()).done;)fe.push(ge.value);return fe}function Ch(Q){var ge=-1,fe=Array(Q.size);return Q.forEach(function(Ve,xt){fe[++ge]=[xt,Ve]}),fe}function _h(Q,ge){return function(fe){return Q(ge(fe))}}function Fo(Q,ge){for(var fe=-1,Ve=Q.length,xt=0,Xt=[];++fe-1}function a2(u,h){var x=this.__data__,A=Er(x,u);return A<0?(++this.size,x.push([u,h])):x[A][1]=h,this}Bo.prototype.clear=i2,Bo.prototype.delete=o2,Bo.prototype.get=E1,Bo.prototype.has=P1,Bo.prototype.set=a2;function $o(u){var h=-1,x=u==null?0:u.length;for(this.clear();++h=h?u:h)),u}function ti(u,h,x,A,R,B){var G,K=h&g,oe=h&m,we=h&y;if(x&&(G=R?x(u,A,R,B):x(u)),G!==n)return G;if(!ar(u))return u;var Ce=It(u);if(Ce){if(G=lW(u),!K)return vi(u,G)}else{var Te=ii(u),We=Te==Rt||Te==kt;if(hc(u))return Gs(u,K);if(Te==it||Te==He||We&&!R){if(G=oe||We?{}:S_(u),!K)return oe?G1(u,rc(G,u)):mo(u,Ke(G,u))}else{if(!$t[Te])return R?u:{};G=uW(u,Te,K)}}B||(B=new mr);var lt=B.get(u);if(lt)return lt;B.set(u,G),Y_(u)?u.forEach(function(gt){G.add(ti(gt,h,x,gt,u,B))}):K_(u)&&u.forEach(function(gt,Vt){G.set(Vt,ti(gt,h,x,Vt,u,B))});var pt=we?oe?ce:Go:oe?yo:oi,Ft=Ce?n:pt(u);return Hn(Ft||u,function(gt,Vt){Ft&&(Vt=gt,gt=u[Vt]),zs(G,Vt,ti(gt,h,x,Vt,u,B))}),G}function Mh(u){var h=oi(u);return function(x){return Rh(x,u,h)}}function Rh(u,h,x){var A=x.length;if(u==null)return!A;for(u=an(u);A--;){var R=x[A],B=h[R],G=u[R];if(G===n&&!(R in u)||!B(G))return!1}return!0}function I1(u,h,x){if(typeof u!="function")throw new fi(a);return Y1(function(){u.apply(n,x)},h)}function ic(u,h,x,A){var R=-1,B=Ii,G=!0,K=u.length,oe=[],we=h.length;if(!K)return oe;x&&(h=On(h,kr(x))),A?(B=xh,G=!1):h.length>=i&&(B=Hu,G=!1,h=new ba(h));e:for(;++RR?0:R+x),A=A===n||A>R?R:Ot(A),A<0&&(A+=R),A=x>A?0:Q_(A);x0&&x(K)?h>1?Pr(K,h-1,x,A,R):va(R,K):A||(R[R.length]=K)}return R}var Nh=js(),ho=js(!0);function Uo(u,h){return u&&Nh(u,h,oi)}function po(u,h){return u&&ho(u,h,oi)}function Dh(u,h){return co(h,function(x){return Gl(u[x])})}function Fs(u,h){h=Us(h,u);for(var x=0,A=h.length;u!=null&&xh}function Fh(u,h){return u!=null&&Jt.call(u,h)}function Bh(u,h){return u!=null&&h in an(u)}function $h(u,h,x){return u>=Kr(h,x)&&u=120&&Ce.length>=120)?new ba(G&&Ce):n}Ce=u[0];var Te=-1,We=K[0];e:for(;++Te-1;)K!==u&&Od.call(K,oe,1),Od.call(u,oe,1);return u}function Vd(u,h){for(var x=u?h.length:0,A=x-1;x--;){var R=h[x];if(x==A||R!==B){var B=R;Ul(R)?Od.call(u,R,1):Yh(u,R)}}return u}function Ud(u,h){return u+Fl(b1()*(h-u+1))}function Ws(u,h,x,A){for(var R=-1,B=gr(zd((h-u)/(x||1)),0),G=fe(B);B--;)G[A?B:++R]=u,u+=x;return G}function cc(u,h){var x="";if(!u||h<1||h>U)return x;do h%2&&(x+=u),h=Fl(h/2),h&&(u+=u);while(h);return x}function yt(u,h){return Wx(__(u,h,xo),u+"")}function Gh(u){return nc(rp(u))}function Gd(u,h){var x=rp(u);return p2(x,$l(h,0,x.length))}function Wl(u,h,x,A){if(!ar(u))return u;h=Us(h,u);for(var R=-1,B=h.length,G=B-1,K=u;K!=null&&++RR?0:R+h),x=x>R?R:x,x<0&&(x+=R),R=h>x?0:x-h>>>0,h>>>=0;for(var B=fe(R);++A>>1,G=u[B];G!==null&&!jo(G)&&(x?G<=h:G=i){var we=h?null:$(u);if(we)return Ad(we);G=!1,R=Hu,oe=new ba}else oe=h?[]:K;e:for(;++A=A?u:Lr(u,h,x)}var H1=jv||function(u){return dt.clearTimeout(u)};function Gs(u,h){if(h)return u.slice();var x=u.length,A=ju?ju(x):new u.constructor(x);return u.copy(A),A}function W1(u){var h=new u.constructor(u.byteLength);return new hi(h).set(new hi(u)),h}function Vl(u,h){var x=h?W1(u.buffer):u.buffer;return new u.constructor(x,u.byteOffset,u.byteLength)}function c2(u){var h=new u.constructor(u.source,Ua.exec(u));return h.lastIndex=u.lastIndex,h}function Wn(u){return Bd?an(Bd.call(u)):{}}function d2(u,h){var x=h?W1(u.buffer):u.buffer;return new u.constructor(x,u.byteOffset,u.length)}function V1(u,h){if(u!==h){var x=u!==n,A=u===null,R=u===u,B=jo(u),G=h!==n,K=h===null,oe=h===h,we=jo(h);if(!K&&!we&&!B&&u>h||B&&G&&oe&&!K&&!we||A&&G&&oe||!x&&oe||!R)return 1;if(!A&&!B&&!we&&u=K)return oe;var we=x[A];return oe*(we=="desc"?-1:1)}}return u.index-h.index}function f2(u,h,x,A){for(var R=-1,B=u.length,G=x.length,K=-1,oe=h.length,we=gr(B-G,0),Ce=fe(oe+we),Te=!A;++K1?x[R-1]:n,G=R>2?x[2]:n;for(B=u.length>3&&typeof B=="function"?(R--,B):n,G&&Ki(x[0],x[1],G)&&(B=R<3?n:B,R=1),h=an(h);++A-1?R[B?h[G]:G]:n}}function q1(u){return Xn(function(h){var x=h.length,A=x,R=Ui.prototype.thru;for(u&&h.reverse();A--;){var B=h[A];if(typeof B!="function")throw new fi(a);if(R&&!G&&pe(B)=="wrapper")var G=new Ui([],!0)}for(A=G?A:x;++A1&&Qt.reverse(),Ce&&oeK))return!1;var we=B.get(u),Ce=B.get(h);if(we&&Ce)return we==h&&Ce==u;var Te=-1,We=!0,lt=x&S?new ba:n;for(B.set(u,h),B.set(h,u);++Te1?"& ":"")+h[A],h=h.join(x>2?", ":" "),u.replace(K0,`{ -/* [wrapped with `+h+`] */ -`)}function dW(u){return It(u)||Jd(u)||!!(y1&&u&&u[y1])}function Ul(u,h){var x=typeof u;return h=h??U,!!h&&(x=="number"||x!="symbol"&&r1.test(u))&&u>-1&&u%1==0&&u0){if(++h>=he)return arguments[0]}else h=0;return u.apply(n,arguments)}}function p2(u,h){var x=-1,A=u.length,R=A-1;for(h=h===n?A:h;++x1?u[h-1]:n;return x=typeof x=="function"?(u.pop(),x):n,D_(u,x)});function z_(u){var h=F(u);return h.__chain__=!0,h}function wV(u,h){return h(u),u}function g2(u,h){return h(u)}var CV=Xn(function(u){var h=u.length,x=h?u[0]:0,A=this.__wrapped__,R=function(B){return Ih(B,u)};return h>1||this.__actions__.length||!(A instanceof Wt)||!Ul(x)?this.thru(R):(A=A.slice(x,+x+(h?1:0)),A.__actions__.push({func:g2,args:[R],thisArg:n}),new Ui(A,this.__chain__).thru(function(B){return h&&!B.length&&B.push(n),B}))});function _V(){return z_(this)}function kV(){return new Ui(this.value(),this.__chain__)}function EV(){this.__values__===n&&(this.__values__=X_(this.value()));var u=this.__index__>=this.__values__.length,h=u?n:this.__values__[this.__index__++];return{done:u,value:h}}function PV(){return this}function TV(u){for(var h,x=this;x instanceof $d;){var A=A_(x);A.__index__=0,A.__values__=n,h?R.__wrapped__=A:h=A;var R=A;x=x.__wrapped__}return R.__wrapped__=u,h}function LV(){var u=this.__wrapped__;if(u instanceof Wt){var h=u;return this.__actions__.length&&(h=new Wt(this)),h=h.reverse(),h.__actions__.push({func:g2,args:[Vx],thisArg:n}),new Ui(h,this.__chain__)}return this.thru(Vx)}function AV(){return Vs(this.__wrapped__,this.__actions__)}var IV=Qh(function(u,h,x){Jt.call(u,x)?++u[x]:Ho(u,x,1)});function MV(u,h,x){var A=It(u)?Rn:M1;return x&&Ki(u,h,x)&&(h=n),A(u,Pe(h,3))}function RV(u,h){var x=It(u)?co:Vo;return x(u,Pe(h,3))}var OV=j1(I_),NV=j1(M_);function DV(u,h){return Pr(m2(u,h),1)}function zV(u,h){return Pr(m2(u,h),Z)}function FV(u,h,x){return x=x===n?1:Ot(x),Pr(m2(u,h),x)}function F_(u,h){var x=It(u)?Hn:Qa;return x(u,Pe(h,3))}function B_(u,h){var x=It(u)?uo:Oh;return x(u,Pe(h,3))}var BV=Qh(function(u,h,x){Jt.call(u,x)?u[x].push(h):Ho(u,x,[h])});function $V(u,h,x,A){u=vo(u)?u:rp(u),x=x&&!A?Ot(x):0;var R=u.length;return x<0&&(x=gr(R+x,0)),S2(u)?x<=R&&u.indexOf(h,x)>-1:!!R&&Bu(u,h,x)>-1}var HV=yt(function(u,h,x){var A=-1,R=typeof h=="function",B=vo(u)?fe(u.length):[];return Qa(u,function(G){B[++A]=R?di(h,G,x):Ja(G,h,x)}),B}),WV=Qh(function(u,h,x){Ho(u,x,h)});function m2(u,h){var x=It(u)?On:yr;return x(u,Pe(h,3))}function VV(u,h,x,A){return u==null?[]:(It(h)||(h=h==null?[]:[h]),x=A?n:x,It(x)||(x=x==null?[]:[x]),gi(u,h,x))}var UV=Qh(function(u,h,x){u[x?0:1].push(h)},function(){return[[],[]]});function GV(u,h,x){var A=It(u)?Cd:bh,R=arguments.length<3;return A(u,Pe(h,4),x,R,Qa)}function jV(u,h,x){var A=It(u)?Dv:bh,R=arguments.length<3;return A(u,Pe(h,4),x,R,Oh)}function qV(u,h){var x=It(u)?co:Vo;return x(u,x2(Pe(h,3)))}function KV(u){var h=It(u)?nc:Gh;return h(u)}function ZV(u,h,x){(x?Ki(u,h,x):h===n)?h=1:h=Ot(h);var A=It(u)?ei:Gd;return A(u,h)}function YV(u){var h=It(u)?Ox:ri;return h(u)}function XV(u){if(u==null)return 0;if(vo(u))return S2(u)?ya(u):u.length;var h=ii(u);return h==Le||h==Kt?u.size:Tr(u).length}function QV(u,h,x){var A=It(u)?zu:go;return x&&Ki(u,h,x)&&(h=n),A(u,Pe(h,3))}var JV=yt(function(u,h){if(u==null)return[];var x=h.length;return x>1&&Ki(u,h[0],h[1])?h=[]:x>2&&Ki(h[0],h[1],h[2])&&(h=[h[0]]),gi(u,Pr(h,1),[])}),v2=qv||function(){return dt.Date.now()};function eU(u,h){if(typeof h!="function")throw new fi(a);return u=Ot(u),function(){if(--u<1)return h.apply(this,arguments)}}function $_(u,h,x){return h=x?n:h,h=u&&h==null?u.length:h,le(u,N,n,n,n,n,h)}function H_(u,h){var x;if(typeof h!="function")throw new fi(a);return u=Ot(u),function(){return--u>0&&(x=h.apply(this,arguments)),u<=1&&(h=n),x}}var Gx=yt(function(u,h,x){var A=T;if(x.length){var R=Fo(x,$e(Gx));A|=O}return le(u,A,h,x,R)}),W_=yt(function(u,h,x){var A=T|E;if(x.length){var R=Fo(x,$e(W_));A|=O}return le(h,A,u,x,R)});function V_(u,h,x){h=x?n:h;var A=le(u,L,n,n,n,n,n,h);return A.placeholder=V_.placeholder,A}function U_(u,h,x){h=x?n:h;var A=le(u,I,n,n,n,n,n,h);return A.placeholder=U_.placeholder,A}function G_(u,h,x){var A,R,B,G,K,oe,we=0,Ce=!1,Te=!1,We=!0;if(typeof u!="function")throw new fi(a);h=Ca(h)||0,ar(x)&&(Ce=!!x.leading,Te="maxWait"in x,B=Te?gr(Ca(x.maxWait)||0,h):B,We="trailing"in x?!!x.trailing:We);function lt(Ir){var is=A,ql=R;return A=R=n,we=Ir,G=u.apply(ql,is),G}function pt(Ir){return we=Ir,K=Y1(Vt,h),Ce?lt(Ir):G}function Ft(Ir){var is=Ir-oe,ql=Ir-we,ck=h-is;return Te?Kr(ck,B-ql):ck}function gt(Ir){var is=Ir-oe,ql=Ir-we;return oe===n||is>=h||is<0||Te&&ql>=B}function Vt(){var Ir=v2();if(gt(Ir))return Qt(Ir);K=Y1(Vt,Ft(Ir))}function Qt(Ir){return K=n,We&&A?lt(Ir):(A=R=n,G)}function qo(){K!==n&&H1(K),we=0,A=oe=R=K=n}function Zi(){return K===n?G:Qt(v2())}function Ko(){var Ir=v2(),is=gt(Ir);if(A=arguments,R=this,oe=Ir,is){if(K===n)return pt(oe);if(Te)return H1(K),K=Y1(Vt,h),lt(oe)}return K===n&&(K=Y1(Vt,h)),G}return Ko.cancel=qo,Ko.flush=Zi,Ko}var tU=yt(function(u,h){return I1(u,1,h)}),nU=yt(function(u,h,x){return I1(u,Ca(h)||0,x)});function rU(u){return le(u,W)}function y2(u,h){if(typeof u!="function"||h!=null&&typeof h!="function")throw new fi(a);var x=function(){var A=arguments,R=h?h.apply(this,A):A[0],B=x.cache;if(B.has(R))return B.get(R);var G=u.apply(this,A);return x.cache=B.set(R,G)||B,G};return x.cache=new(y2.Cache||$o),x}y2.Cache=$o;function x2(u){if(typeof u!="function")throw new fi(a);return function(){var h=arguments;switch(h.length){case 0:return!u.call(this);case 1:return!u.call(this,h[0]);case 2:return!u.call(this,h[0],h[1]);case 3:return!u.call(this,h[0],h[1],h[2])}return!u.apply(this,h)}}function iU(u){return H_(2,u)}var oU=zx(function(u,h){h=h.length==1&&It(h[0])?On(h[0],kr(Pe())):On(Pr(h,1),kr(Pe()));var x=h.length;return yt(function(A){for(var R=-1,B=Kr(A.length,x);++R=h}),Jd=Wh(function(){return arguments}())?Wh:function(u){return xr(u)&&Jt.call(u,"callee")&&!v1.call(u,"callee")},It=fe.isArray,bU=jr?kr(jr):O1;function vo(u){return u!=null&&b2(u.length)&&!Gl(u)}function Ar(u){return xr(u)&&vo(u)}function SU(u){return u===!0||u===!1||xr(u)&&ni(u)==qe}var hc=Kv||rb,wU=lo?kr(lo):N1;function CU(u){return xr(u)&&u.nodeType===1&&!X1(u)}function _U(u){if(u==null)return!0;if(vo(u)&&(It(u)||typeof u=="string"||typeof u.splice=="function"||hc(u)||np(u)||Jd(u)))return!u.length;var h=ii(u);if(h==Le||h==Kt)return!u.size;if(Z1(u))return!Tr(u).length;for(var x in u)if(Jt.call(u,x))return!1;return!0}function kU(u,h){return ac(u,h)}function EU(u,h,x){x=typeof x=="function"?x:n;var A=x?x(u,h):n;return A===n?ac(u,h,n,x):!!A}function qx(u){if(!xr(u))return!1;var h=ni(u);return h==at||h==tt||typeof u.message=="string"&&typeof u.name=="string"&&!X1(u)}function PU(u){return typeof u=="number"&&Ph(u)}function Gl(u){if(!ar(u))return!1;var h=ni(u);return h==Rt||h==kt||h==ut||h==Sn}function q_(u){return typeof u=="number"&&u==Ot(u)}function b2(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=U}function ar(u){var h=typeof u;return u!=null&&(h=="object"||h=="function")}function xr(u){return u!=null&&typeof u=="object"}var K_=Wi?kr(Wi):Dx;function TU(u,h){return u===h||sc(u,h,bt(h))}function LU(u,h,x){return x=typeof x=="function"?x:n,sc(u,h,bt(h),x)}function AU(u){return Z_(u)&&u!=+u}function IU(u){if(pW(u))throw new xt(o);return Vh(u)}function MU(u){return u===null}function RU(u){return u==null}function Z_(u){return typeof u=="number"||xr(u)&&ni(u)==st}function X1(u){if(!xr(u)||ni(u)!=it)return!1;var h=qu(u);if(h===null)return!0;var x=Jt.call(h,"constructor")&&h.constructor;return typeof x=="function"&&x instanceof x&&rr.call(x)==Jr}var Kx=ma?kr(ma):ir;function OU(u){return q_(u)&&u>=-U&&u<=U}var Y_=Ms?kr(Ms):Dt;function S2(u){return typeof u=="string"||!It(u)&&xr(u)&&ni(u)==wn}function jo(u){return typeof u=="symbol"||xr(u)&&ni(u)==pn}var np=l1?kr(l1):Dr;function NU(u){return u===n}function DU(u){return xr(u)&&ii(u)==Ze}function zU(u){return xr(u)&&ni(u)==Zt}var FU=_(Bs),BU=_(function(u,h){return u<=h});function X_(u){if(!u)return[];if(vo(u))return S2(u)?Mi(u):vi(u);if(Ku&&u[Ku])return Hv(u[Ku]());var h=ii(u),x=h==Le?Ch:h==Kt?Ad:rp;return x(u)}function jl(u){if(!u)return u===0?u:0;if(u=Ca(u),u===Z||u===-Z){var h=u<0?-1:1;return h*ee}return u===u?u:0}function Ot(u){var h=jl(u),x=h%1;return h===h?x?h-x:h:0}function Q_(u){return u?$l(Ot(u),0,X):0}function Ca(u){if(typeof u=="number")return u;if(jo(u))return ae;if(ar(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=ar(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=Vi(u);var x=e1.test(u);return x||n1.test(u)?Ge(u.slice(2),x?2:8):J0.test(u)?ae:+u}function J_(u){return Sa(u,yo(u))}function $U(u){return u?$l(Ot(u),-U,U):u===0?u:0}function vn(u){return u==null?"":ji(u)}var HU=qi(function(u,h){if(Z1(h)||vo(h)){Sa(h,oi(h),u);return}for(var x in h)Jt.call(h,x)&&zs(u,x,h[x])}),ek=qi(function(u,h){Sa(h,yo(h),u)}),w2=qi(function(u,h,x,A){Sa(h,yo(h),u,A)}),WU=qi(function(u,h,x,A){Sa(h,oi(h),u,A)}),VU=Xn(Ih);function UU(u,h){var x=Bl(u);return h==null?x:Ke(x,h)}var GU=yt(function(u,h){u=an(u);var x=-1,A=h.length,R=A>2?h[2]:n;for(R&&Ki(h[0],h[1],R)&&(A=1);++x1),B}),Sa(u,ce(u),x),A&&(x=ti(x,g|m|y,Et));for(var R=h.length;R--;)Yh(x,h[R]);return x});function uG(u,h){return nk(u,x2(Pe(h)))}var cG=Xn(function(u,h){return u==null?{}:F1(u,h)});function nk(u,h){if(u==null)return{};var x=On(ce(u),function(A){return[A]});return h=Pe(h),Uh(u,x,function(A,R){return h(A,R[0])})}function dG(u,h,x){h=Us(h,u);var A=-1,R=h.length;for(R||(R=1,u=n);++Ah){var A=u;u=h,h=A}if(x||u%1||h%1){var R=b1();return Kr(u+R*(h-u+ue("1e-"+((R+"").length-1))),h)}return Ud(u,h)}var wG=qs(function(u,h,x){return h=h.toLowerCase(),u+(x?ok(h):h)});function ok(u){return Xx(vn(u).toLowerCase())}function ak(u){return u=vn(u),u&&u.replace(i1,$v).replace(gh,"")}function CG(u,h,x){u=vn(u),h=ji(h);var A=u.length;x=x===n?A:$l(Ot(x),0,A);var R=x;return x-=h.length,x>=0&&u.slice(x,R)==h}function _G(u){return u=vn(u),u&&pa.test(u)?u.replace(_s,Za):u}function kG(u){return u=vn(u),u&&q0.test(u)?u.replace(pd,"\\$&"):u}var EG=qs(function(u,h,x){return u+(x?"-":"")+h.toLowerCase()}),PG=qs(function(u,h,x){return u+(x?" ":"")+h.toLowerCase()}),TG=ep("toLowerCase");function LG(u,h,x){u=vn(u),h=Ot(h);var A=h?ya(u):0;if(!h||A>=h)return u;var R=(h-A)/2;return d(Fl(R),x)+u+d(zd(R),x)}function AG(u,h,x){u=vn(u),h=Ot(h);var A=h?ya(u):0;return h&&A>>0,x?(u=vn(u),u&&(typeof h=="string"||h!=null&&!Kx(h))&&(h=ji(h),!h&&Dl(u))?ts(Mi(u),0,x):u.split(h,x)):[]}var zG=qs(function(u,h,x){return u+(x?" ":"")+Xx(h)});function FG(u,h,x){return u=vn(u),x=x==null?0:$l(Ot(x),0,u.length),h=ji(h),u.slice(x,x+h.length)==h}function BG(u,h,x){var A=F.templateSettings;x&&Ki(u,h,x)&&(h=n),u=vn(u),h=w2({},h,A,Ne);var R=w2({},h.imports,A.imports,Ne),B=oi(R),G=Ld(R,B),K,oe,we=0,Ce=h.interpolate||Es,Te="__p += '",We=Md((h.escape||Es).source+"|"+Ce.source+"|"+(Ce===Tu?Q0:Es).source+"|"+(h.evaluate||Es).source+"|$","g"),lt="//# sourceURL="+(Jt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vh+"]")+` -`;u.replace(We,function(gt,Vt,Qt,qo,Zi,Ko){return Qt||(Qt=qo),Te+=u.slice(we,Ko).replace(o1,Os),Vt&&(K=!0,Te+=`' + -__e(`+Vt+`) + -'`),Zi&&(oe=!0,Te+=`'; -`+Zi+`; -__p += '`),Qt&&(Te+=`' + -((__t = (`+Qt+`)) == null ? '' : __t) + -'`),we=Ko+gt.length,gt}),Te+=`'; -`;var pt=Jt.call(h,"variable")&&h.variable;if(!pt)Te=`with (obj) { -`+Te+` -} -`;else if(Y0.test(pt))throw new xt(s);Te=(oe?Te.replace(Yt,""):Te).replace(Zn,"$1").replace(ao,"$1;"),Te="function("+(pt||"obj")+`) { -`+(pt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(K?", __e = _.escape":"")+(oe?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Te+`return __p -}`;var Ft=lk(function(){return Xt(B,lt+"return "+Te).apply(n,G)});if(Ft.source=Te,qx(Ft))throw Ft;return Ft}function $G(u){return vn(u).toLowerCase()}function HG(u){return vn(u).toUpperCase()}function WG(u,h,x){if(u=vn(u),u&&(x||h===n))return Vi(u);if(!u||!(h=ji(h)))return u;var A=Mi(u),R=Mi(h),B=zo(A,R),G=Ka(A,R)+1;return ts(A,B,G).join("")}function VG(u,h,x){if(u=vn(u),u&&(x||h===n))return u.slice(0,h1(u)+1);if(!u||!(h=ji(h)))return u;var A=Mi(u),R=Ka(A,Mi(h))+1;return ts(A,0,R).join("")}function UG(u,h,x){if(u=vn(u),u&&(x||h===n))return u.replace(Lu,"");if(!u||!(h=ji(h)))return u;var A=Mi(u),R=zo(A,Mi(h));return ts(A,R).join("")}function GG(u,h){var x=V,A=q;if(ar(h)){var R="separator"in h?h.separator:R;x="length"in h?Ot(h.length):x,A="omission"in h?ji(h.omission):A}u=vn(u);var B=u.length;if(Dl(u)){var G=Mi(u);B=G.length}if(x>=B)return u;var K=x-ya(A);if(K<1)return A;var oe=G?ts(G,0,K).join(""):u.slice(0,K);if(R===n)return oe+A;if(G&&(K+=oe.length-K),Kx(R)){if(u.slice(K).search(R)){var we,Ce=oe;for(R.global||(R=Md(R.source,vn(Ua.exec(R))+"g")),R.lastIndex=0;we=R.exec(Ce);)var Te=we.index;oe=oe.slice(0,Te===n?K:Te)}}else if(u.indexOf(ji(R),K)!=K){var We=oe.lastIndexOf(R);We>-1&&(oe=oe.slice(0,We))}return oe+A}function jG(u){return u=vn(u),u&&G0.test(u)?u.replace(ui,Uv):u}var qG=qs(function(u,h,x){return u+(x?" ":"")+h.toUpperCase()}),Xx=ep("toUpperCase");function sk(u,h,x){return u=vn(u),h=x?n:h,h===n?wh(u)?Id(u):c1(u):u.match(h)||[]}var lk=yt(function(u,h){try{return di(u,n,h)}catch(x){return qx(x)?x:new xt(x)}}),KG=Xn(function(u,h){return Hn(h,function(x){x=Ks(x),Ho(u,x,Gx(u[x],u))}),u});function ZG(u){var h=u==null?0:u.length,x=Pe();return u=h?On(u,function(A){if(typeof A[1]!="function")throw new fi(a);return[x(A[0]),A[1]]}):[],yt(function(A){for(var R=-1;++RU)return[];var x=X,A=Kr(u,X);h=Pe(h),u-=X;for(var R=Td(A,h);++x0||h<0)?new Wt(x):(u<0?x=x.takeRight(-u):u&&(x=x.drop(u)),h!==n&&(h=Ot(h),x=h<0?x.dropRight(-h):x.take(h-u)),x)},Wt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Wt.prototype.toArray=function(){return this.take(X)},Uo(Wt.prototype,function(u,h){var x=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),R=F[A?"take"+(h=="last"?"Right":""):h],B=A||/^find/.test(h);!R||(F.prototype[h]=function(){var G=this.__wrapped__,K=A?[1]:arguments,oe=G instanceof Wt,we=K[0],Ce=oe||It(G),Te=function(Vt){var Qt=R.apply(F,va([Vt],K));return A&&We?Qt[0]:Qt};Ce&&x&&typeof we=="function"&&we.length!=1&&(oe=Ce=!1);var We=this.__chain__,lt=!!this.__actions__.length,pt=B&&!We,Ft=oe&&!lt;if(!B&&Ce){G=Ft?G:new Wt(this);var gt=u.apply(G,K);return gt.__actions__.push({func:g2,args:[Te],thisArg:n}),new Ui(gt,We)}return pt&&Ft?u.apply(this,K):(gt=this.thru(Te),pt?A?gt.value()[0]:gt.value():gt)})}),Hn(["pop","push","shift","sort","splice","unshift"],function(u){var h=Vu[u],x=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",A=/^(?:pop|shift)$/.test(u);F.prototype[u]=function(){var R=arguments;if(A&&!this.__chain__){var B=this.value();return h.apply(It(B)?B:[],R)}return this[x](function(G){return h.apply(It(G)?G:[],R)})}}),Uo(Wt.prototype,function(u,h){var x=F[h];if(x){var A=x.name+"";Jt.call(Ya,A)||(Ya[A]=[]),Ya[A].push({name:h,func:x})}}),Ya[Yd(n,E).name]=[{name:"wrapper",func:n}],Wt.prototype.clone=Ri,Wt.prototype.reverse=pi,Wt.prototype.value=Jv,F.prototype.at=CV,F.prototype.chain=_V,F.prototype.commit=kV,F.prototype.next=EV,F.prototype.plant=TV,F.prototype.reverse=LV,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=AV,F.prototype.first=F.prototype.head,Ku&&(F.prototype[Ku]=PV),F},xa=fo();Ht?((Ht.exports=xa)._=xa,Ct._=xa):dt._=xa}).call(tu)})(la,la.exports);const ht=la.exports;var bS=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function SS(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function oB(e,t){for(var n=t.slice(0,t.length-1),r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function bve(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,o=0;o=0&&Jn.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Jn.splice(0,Jn.length),(t===93||t===224)&&(t=91),t in _i){_i[t]=!1;for(var r in Qc)Qc[r]===t&&(ea[r]=!1)}}function Eve(e){if(typeof e>"u")Object.keys(Br).forEach(function(a){return delete Br[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&wS(a)});else if(typeof e=="object")e.key&&wS(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?oB(Qc,c):[];Br[m]=Br[m].filter(function(b){var S=i?b.method===i:!0;return!(S&&b.scope===r&&bve(b.mods,y))})}})};function OL(e,t,n,r){if(t.element===r){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var o in _i)Object.prototype.hasOwnProperty.call(_i,o)&&(!_i[o]&&t.mods.indexOf(+o)>-1||_i[o]&&t.mods.indexOf(+o)===-1)&&(i=!1);(t.mods.length===0&&!_i[16]&&!_i[18]&&!_i[17]&&!_i[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function NL(e,t){var n=Br["*"],r=e.keyCode||e.which||e.charCode;if(!!ea.filter.call(this,e)){if((r===93||r===224)&&(r=91),Jn.indexOf(r)===-1&&r!==229&&Jn.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(b){var S=e8[b];e[b]&&Jn.indexOf(S)===-1?Jn.push(S):!e[b]&&Jn.indexOf(S)>-1?Jn.splice(Jn.indexOf(S),1):b==="metaKey"&&e[b]&&Jn.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Jn=Jn.slice(Jn.indexOf(S))))}),r in _i){_i[r]=!0;for(var i in Qc)Qc[i]===r&&(ea[i]=!0);if(!n)return}for(var o in _i)Object.prototype.hasOwnProperty.call(_i,o)&&(_i[o]=e[e8[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Jn.indexOf(17)===-1&&Jn.push(17),Jn.indexOf(18)===-1&&Jn.push(18),_i[17]=!0,_i[18]=!0);var a=tv();if(n)for(var s=0;s-1}function ea(e,t,n){Jn=[];var r=aB(e),i=[],o="all",a=document,s=0,l=!1,c=!0,p="+",g=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(a=t.element),t.keyup&&(l=t.keyup),t.keydown!==void 0&&(c=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(p=t.splitKey)),typeof t=="string"&&(o=t);s1&&(i=oB(Qc,e)),e=e[e.length-1],e=e==="*"?"*":dx(e),e in Br||(Br[e]=[]),Br[e].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:r[s],method:n,key:r[s],splitKey:p,element:a});typeof a<"u"&&!Pve(a)&&window&&(lB.push(a),SS(a,"keydown",function(m){NL(m,a)},g),RL||(RL=!0,SS(window,"focus",function(){Jn=[]},g)),SS(a,"keyup",function(m){NL(m,a),kve(m)},g))}function Tve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Br).forEach(function(n){var r=Br[n].find(function(i){return i.scope===t&&i.shortcut===e});r&&r.method&&r.method()})}var CS={setScope:uB,getScope:tv,deleteScope:_ve,getPressedKeyCodes:Sve,isPressed:Cve,filter:wve,trigger:Tve,unbind:Eve,keyMap:M7,modifier:Qc,modifierMap:e8};for(var _S in CS)Object.prototype.hasOwnProperty.call(CS,_S)&&(ea[_S]=CS[_S]);if(typeof window<"u"){var Lve=window.hotkeys;ea.noConflict=function(e){return e&&window.hotkeys===ea&&(window.hotkeys=Lve),ea},window.hotkeys=ea}ea.filter=function(){return!0};var cB=function(t,n){var r=t.target,i=r&&r.tagName;return Boolean(i&&n&&n.includes(i))},Ave=function(t){return cB(t,["INPUT","TEXTAREA","SELECT"])};function _t(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},o=i.enableOnTags,a=i.filter,s=i.keyup,l=i.keydown,c=i.filterPreventDefault,p=c===void 0?!0:c,g=i.enabled,m=g===void 0?!0:g,y=i.enableOnContentEditable,b=y===void 0?!1:y,S=C.exports.useRef(null),T=C.exports.useCallback(function(E,k){var L,I;return a&&!a(E)?!p:Ave(E)&&!cB(E,o)||(L=E.target)!=null&&L.isContentEditable&&!b?!0:S.current===null||document.activeElement===S.current||(I=S.current)!=null&&I.contains(document.activeElement)?(t(E,k),!0):!1},r?[S,o,a].concat(r):[S,o,a]);return C.exports.useEffect(function(){if(!m){ea.unbind(e,T);return}return s&&l!==!0&&(n.keydown=!1),ea(e,n||{},T),function(){return ea.unbind(e,T)}},[T,e,m]),S}ea.isPressed;function Ive(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[w("h1",{children:"Nodes"}),w("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}function Mve(){return ne("div",{className:"work-in-progress outpainting-work-in-progress",children:[w("h1",{children:"Outpainting"}),w("p",{children:"Outpainting is available as a part of the Invoke AI Command Line Interface. A dedicated WebUI interface will be released in the near future."})]})}const Rve=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[w("h1",{children:"Post Processing"}),w("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),w("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),w("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),Ove=rt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:w("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:w("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),Nve=rt({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:w("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),Dve=rt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:w("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),zve=rt({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:w("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),Fve=rt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:w("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),Bve=rt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:w("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:w("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Ji=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Ji||{});const $ve={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},wl=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return w(rd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(Yf,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,w(m7,{className:"invokeai__switch-root",...s})]})})};function R7(){const e=Me(i=>i.system.isGFPGANAvailable),t=Me(i=>i.options.shouldRunFacetool),n=Xe();return ne(Dn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[w("p",{children:"Restore Face"}),w(wl,{isDisabled:!e,isChecked:t,onChange:i=>n(F6e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,no=e=>{const{label:t,styleClass:n,isDisabled:r=!1,showStepper:i=!0,width:o,textAlign:a,isInvalid:s,value:l,onChange:c,min:p,max:g,isInteger:m=!0,formControlProps:y,formLabelProps:b,numberInputFieldProps:S,numberInputStepperProps:T,tooltipProps:E,...k}=e,[L,I]=C.exports.useState(String(l));C.exports.useEffect(()=>{!L.match(DL)&&l!==Number(L)&&I(String(l))},[l,L]);const O=N=>{I(N),N.match(DL)||c(m?Math.floor(Number(N)):Number(N))},D=N=>{const z=ht.clamp(m?Math.floor(Number(N.target.value)):Number(N.target.value),p,g);I(String(z)),c(z)};return w($i,{...E,children:ne(rd,{isDisabled:r,isInvalid:s,className:n?`invokeai__number-input-form-control ${n}`:"invokeai__number-input-form-control",...y,children:[t&&w(Yf,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},...b,children:t}),ne(tF,{className:"invokeai__number-input-root",value:L,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:D,width:o,...k,children:[w(nF,{className:"invokeai__number-input-field",textAlign:a,...S}),i&&ne("div",{className:"invokeai__number-input-stepper",children:[w(oF,{...T,className:"invokeai__number-input-stepper-button"}),w(iF,{...T,className:"invokeai__number-input-stepper-button"})]})]})]})})},F0=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ne(rd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[w(Yf,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),w(dF,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?w("option",{value:l,className:"invokeai__select-option",children:l},l):w("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},Hve=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],Wve=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],Vve=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],Uve=[{key:"2x",value:2},{key:"4x",value:4}],O7=0,N7=4294967295,Gve=["gfpgan","codeformer"],jve=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],qve=St(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),Kve=St(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),fx=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Me(qve),{isGFPGANAvailable:i}=Me(Kve),o=l=>e(v3(l)),a=l=>e(EH(l)),s=l=>e(y3(l.target.value));return ne(Dn,{direction:"column",gap:2,children:[w(F0,{label:"Type",validValues:Gve.concat(),value:n,onChange:s}),w(no,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&w(no,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Zve(){const e=Xe(),t=Me(r=>r.options.shouldFitToWidthHeight);return w(wl,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(PH(r.target.checked))})}function dB(e){const{label:t="Strength",styleClass:n}=e,r=Me(a=>a.options.img2imgStrength),i=Xe();return w(no,{label:t,step:.01,min:.01,max:.99,onChange:a=>i(kH(a)),value:r,width:"100%",isInteger:!1,styleClass:n})}const fB=()=>w(id,{flex:"1",textAlign:"left",children:"Other Options"}),Yve=()=>{const e=Xe(),t=Me(r=>r.options.hiresFix);return w(Dn,{gap:2,direction:"column",children:w(wl,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(_H(r.target.checked))})})},Xve=()=>{const e=Xe(),t=Me(r=>r.options.seamless);return w(Dn,{gap:2,direction:"column",children:w(wl,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(CH(r.target.checked))})})},hB=()=>ne(Dn,{gap:2,direction:"column",children:[w(Xve,{}),w(Yve,{})]}),D7=()=>w(id,{flex:"1",textAlign:"left",children:"Seed"});function Qve(){const e=Xe(),t=Me(r=>r.options.shouldRandomizeSeed);return w(wl,{label:"Randomize Seed",isChecked:t,onChange:r=>e($6e(r.target.checked))})}function Jve(){const e=Me(o=>o.options.seed),t=Me(o=>o.options.shouldRandomizeSeed),n=Me(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(Ov(o));return w(no,{label:"Seed",step:1,precision:0,flexGrow:1,min:O7,max:N7,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const pB=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function e2e(){const e=Xe(),t=Me(r=>r.options.shouldRandomizeSeed);return w(Oa,{size:"sm",isDisabled:t,onClick:()=>e(Ov(pB(O7,N7))),children:w("p",{children:"Shuffle"})})}function t2e(){const e=Xe(),t=Me(r=>r.options.threshold);return w(no,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(R6e(r)),value:t,isInteger:!1})}function n2e(){const e=Xe(),t=Me(r=>r.options.perlin);return w(no,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(O6e(r)),value:t,isInteger:!1})}const z7=()=>ne(Dn,{gap:2,direction:"column",children:[w(Qve,{}),ne(Dn,{gap:2,children:[w(Jve,{}),w(e2e,{})]}),w(Dn,{gap:2,children:w(t2e,{})}),w(Dn,{gap:2,children:w(n2e,{})})]});function F7(){const e=Me(i=>i.system.isESRGANAvailable),t=Me(i=>i.options.shouldRunESRGAN),n=Xe();return ne(Dn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[w("p",{children:"Upscale"}),w(wl,{isDisabled:!e,isChecked:t,onChange:i=>n(B6e(i.target.checked))})]})}const r2e=St(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),i2e=St(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),hx=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Me(r2e),{isESRGANAvailable:r}=Me(i2e);return ne("div",{className:"upscale-options",children:[w(F0,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(A8(Number(a.target.value))),validValues:Uve}),w(no,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(I8(a)),value:n,isInteger:!1})]})};function o2e(){const e=Me(r=>r.options.shouldGenerateVariations),t=Xe();return w(wl,{isChecked:e,width:"auto",onChange:r=>t(N6e(r.target.checked))})}function B7(){return ne(Dn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[w("p",{children:"Variations"}),w(o2e,{})]})}function a2e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(rd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[w(Yf,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),w(DC,{...s,className:"input-entry",size:"sm",width:o})]})}function s2e(){const e=Me(i=>i.options.seedWeights),t=Me(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(TH(i.target.value));return w(a2e,{label:"Seed Weights",value:e,isInvalid:t&&!(I7(e)||e===""),isDisabled:!t,onChange:r})}function l2e(){const e=Me(i=>i.options.variationAmount),t=Me(i=>i.options.shouldGenerateVariations),n=Xe();return w(no,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(D6e(i)),isInteger:!1})}const $7=()=>ne(Dn,{gap:2,direction:"column",children:[w(l2e,{}),w(s2e,{})]}),nv=e=>{const{label:t,styleClass:n,...r}=e;return w(SD,{className:`invokeai__checkbox ${n}`,...r,children:t})};function H7(){const e=Me(r=>r.options.showAdvancedOptions),t=Xe();return w(nv,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(H6e(r.target.checked)),isChecked:e})}function u2e(){const e=Xe(),t=Me(r=>r.options.cfgScale);return w(no,{label:"CFG Scale",step:.5,min:1.01,max:30,onChange:r=>e(xH(r)),value:t,width:W7,fontSize:B0,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Cr=St(e=>e.options,e=>Ex[e.activeTab],{memoizeOptions:{equalityCheck:ht.isEqual}}),c2e=St(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function d2e(){const e=Me(i=>i.options.height),t=Me(Cr),n=Xe();return w(F0,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(bH(Number(i.target.value))),validValues:Vve,fontSize:B0,styleClass:"main-option-block"})}const f2e=St([e=>e.options,c2e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function h2e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Me(f2e);return w(no,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(M6e(i)),value:t,width:W7,fontSize:B0,styleClass:"main-option-block",textAlign:"center"})}function p2e(){const e=Me(r=>r.options.sampler),t=Xe();return w(F0,{label:"Sampler",value:e,onChange:r=>t(wH(r.target.value)),validValues:Hve,fontSize:B0,styleClass:"main-option-block"})}function g2e(){const e=Xe(),t=Me(r=>r.options.steps);return w(no,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(yH(r)),value:t,width:W7,fontSize:B0,styleClass:"main-option-block",textAlign:"center"})}function m2e(){const e=Me(i=>i.options.width),t=Me(Cr),n=Xe();return w(F0,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(SH(Number(i.target.value))),validValues:Wve,fontSize:B0,styleClass:"main-option-block"})}const B0="0.9rem",W7="auto";function V7(){return w("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[w(h2e,{}),w(g2e,{}),w(u2e,{})]}),ne("div",{className:"main-options-row",children:[w(m2e,{}),w(d2e,{}),w(p2e,{})]})]})})}const v2e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5},gB=Q5({name:"system",initialState:v2e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload}}}),{setShouldDisplayInProgressType:y2e,setIsProcessing:r0,addLogEntry:Si,setShouldShowLogViewer:kS,setIsConnected:zL,setSocketId:MCe,setShouldConfirmOnDelete:mB,setOpenAccordions:x2e,setSystemStatus:b2e,setCurrentStatus:ES,setSystemConfig:S2e,setShouldDisplayGuides:w2e,processingCanceled:C2e,errorOccurred:t8,errorSeen:vB,setModelList:FL,setIsCancelable:BL,modelChangeRequested:_2e,setSaveIntermediatesInterval:k2e}=gB.actions,E2e=gB.reducer;var yB={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$L=re.createContext&&re.createContext(yB),Vc=globalThis&&globalThis.__assign||function(){return Vc=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne.system,e=>e.shouldDisplayGuides),N2e=({children:e,feature:t})=>{const n=Me(O2e),{text:r}=$ve[t];return n?ne(c7,{trigger:"hover",children:[w(h7,{children:w(id,{children:e})}),ne(f7,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[w(d7,{className:"guide-popover-arrow"}),w("div",{className:"guide-popover-guide-content",children:r})]})]}):null},D2e=ke(({feature:e,icon:t=L2e},n)=>w(N2e,{feature:e,children:w(id,{ref:n,children:w(ha,{as:t})})}));function z2e(e){const{header:t,feature:n,options:r}=e;return ne(kf,{className:"advanced-settings-item",children:[w("h2",{children:ne(Cf,{className:"advanced-settings-header",children:[t,w(D2e,{feature:n}),w(_f,{})]})}),w(Ef,{className:"advanced-settings-panel",children:r})]})}const U7=e=>{const{accordionInfo:t}=e,n=Me(a=>a.system.openAccordions),r=Xe();return w(F5,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(x2e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(w(z2e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function F2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function B2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function $2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function H2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function W2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function V2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function U2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function G2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function SB(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function wB(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function j2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function q2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function K2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function Z2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function Y2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function X2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function Q2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function J2e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function eye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"}}]})(e)}function tye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function nye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function rye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function iye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function oye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function aye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function sye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function lye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function uye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function cye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"}}]})(e)}function dye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function fye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function hye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function pye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function CB(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function gye(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function mye(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function _B(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const kB=St([e=>e.options,e=>e.system,e=>e.inpainting,Cr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:c,isConnected:p}=t,{imageToInpaint:g}=n;let m=!0;const y=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(m=!1,y.push("Missing prompt")),r==="img2img"&&!s&&(m=!1,y.push("No initial image selected")),r==="inpainting"&&!g&&(m=!1,y.push("No inpainting image selected")),c&&(m=!1,y.push("System Busy")),p||(m=!1,y.push("System Disconnected")),o&&(!(I7(a)||a==="")||l===-1)&&(m=!1,y.push("Seed-Weights badly formatted.")),{isReady:m,reasonsWhyNotReady:y}},{memoizeOptions:{equalityCheck:ht.isEqual,resultEqualityCheck:ht.isEqual}}),n8=Hi("socketio/generateImage"),vye=Hi("socketio/runESRGAN"),yye=Hi("socketio/runFacetool"),xye=Hi("socketio/deleteImage"),r8=Hi("socketio/requestImages"),WL=Hi("socketio/requestNewImages"),bye=Hi("socketio/cancelProcessing"),VL=Hi("socketio/uploadImage");Hi("socketio/uploadMaskImage");const Sye=Hi("socketio/requestSystemConfig"),wye=Hi("socketio/requestModelChange"),_c=ke((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return w($i,{label:r,...i,children:w(Oa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),Ut=ke((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return w($i,{label:n,hasArrow:!0,...i,children:w(gu,{ref:t,className:`invokeai__icon-button ${r}`,"data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,style:e.onClick?{cursor:"pointer"}:{},...s})})}),Df=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(c7,{...o,children:[w(h7,{children:t}),ne(f7,{className:`invokeai__popover-content ${r}`,children:[i&&w(d7,{className:"invokeai__popover-arrow"}),n]})]})};function EB(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i,reasonsWhyNotReady:o}=Me(kB),a=Me(Cr),s=()=>{r(n8(a))};_t("ctrl+enter, cmd+enter",()=>{i&&r(n8(a))},[i,a]);const l=w("div",{style:{flexGrow:4},children:t?w(Ut,{"aria-label":"Invoke",type:"submit",icon:w(rye,{}),isDisabled:!i,onClick:s,className:"invoke-btn invoke",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):w(_c,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:w(Df,{trigger:"hover",triggerComponent:l,children:o&&w(ND,{children:o.map((c,p)=>w(DD,{children:c},p))})})}const Cye=St(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function PB(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Me(Cye),a=()=>n(bye());return _t("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),w(Ut,{icon:w(R2e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const _ye=St(e=>e.options,e=>e.shouldLoopback),TB=()=>{const e=Xe(),t=Me(_ye);return w(Ut,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:w(aye,{}),onClick:()=>{e(K6e(!t))}})},G7=()=>ne("div",{className:"process-buttons",children:[w(EB,{}),w(TB,{}),w(PB,{})]}),kye=St([e=>e.options,Cr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),j7=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Me(kye),{isReady:r}=Me(kB),i=C.exports.useRef(null),o=s=>{e(Px(s.target.value))};_t("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(n8(n)))};return w("div",{className:"prompt-bar",children:w(rd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:w(IF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function LB(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function AB(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function Eye(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Pye(e,t){e.classList?e.classList.add(t):Eye(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function UL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Tye(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=UL(e.className,t):e.setAttribute("class",UL(e.className&&e.className.baseVal||"",t))}const GL={disabled:!1},IB=re.createContext(null);var MB=function(t){return t.scrollTop},Ag="unmounted",uf="exited",cf="entering",xp="entered",i8="exiting",Cu=function(e){XC(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=uf,o.appearStatus=cf):l=xp:r.unmountOnExit||r.mountOnEnter?l=Ag:l=uf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Ag?{status:uf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==cf&&a!==xp&&(o=cf):(a===cf||a===xp)&&(o=i8)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:$2.findDOMNode(this);a&&MB(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===uf&&this.setState({status:Ag})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[$2.findDOMNode(this),s],c=l[0],p=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||GL.disabled){this.safeSetState({status:xp},function(){o.props.onEntered(c)});return}this.props.onEnter(c,p),this.safeSetState({status:cf},function(){o.props.onEntering(c,p),o.onTransitionEnd(m,function(){o.safeSetState({status:xp},function(){o.props.onEntered(c,p)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:$2.findDOMNode(this);if(!o||GL.disabled){this.safeSetState({status:uf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:i8},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:uf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:$2.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],p=l[1];this.props.addEndListener(c,p)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ag)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=KC(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return w(IB.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Cu.contextType=IB;Cu.propTypes={};function hp(){}Cu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hp,onEntering:hp,onEntered:hp,onExit:hp,onExiting:hp,onExited:hp};Cu.UNMOUNTED=Ag;Cu.EXITED=uf;Cu.ENTERING=cf;Cu.ENTERED=xp;Cu.EXITING=i8;const Lye=Cu;var Aye=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Pye(t,r)})},PS=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Tye(t,r)})},q7=function(e){XC(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},rl=(e,t)=>Math.floor(e/t)*t,jL=(e,t)=>Math.round(e/t)*t,Iye={tool:"brush",brushSize:50,maskColor:{r:255,g:90,b:90,a:.5},canvasDimensions:{width:0,height:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinate:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldShowBoundingBoxFill:!0,cursorPosition:null,lines:[],pastLines:[],futureLines:[],shouldShowMask:!0,shouldInvertMask:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,needsCache:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!0,isSpacebarHeld:!1},Mye=Iye,NB=Q5({name:"inpainting",initialState:Mye,reducers:{setTool:(e,t)=>{e.tool=t.payload},toggleTool:e=>{e.tool=e.tool==="brush"?"eraser":"brush"},setBrushSize:(e,t)=>{e.brushSize=t.payload},addLine:(e,t)=>{e.pastLines.push(e.lines),e.lines.push(t.payload),e.futureLines=[]},addPointToCurrentLine:(e,t)=>{e.lines[e.lines.length-1].points.push(...t.payload)},undo:e=>{if(e.pastLines.length===0)return;const t=e.pastLines.pop();!t||(e.futureLines.unshift(e.lines),e.lines=t)},redo:e=>{if(e.futureLines.length===0)return;const t=e.futureLines.shift();!t||(e.pastLines.push(e.lines),e.lines=t)},clearMask:e=>{e.pastLines.push(e.lines),e.lines=[],e.futureLines=[],e.shouldInvertMask=!1},toggleShouldInvertMask:e=>{e.shouldInvertMask=!e.shouldInvertMask},toggleShouldShowMask:e=>{e.shouldShowMask=!e.shouldShowMask},setShouldInvertMask:(e,t)=>{e.shouldInvertMask=t.payload},setShouldShowMask:(e,t)=>{e.shouldShowMask=t.payload,t.payload||(e.shouldInvertMask=!1)},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setMaskColor:(e,t)=>{e.maskColor=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},clearImageToInpaint:e=>{e.imageToInpaint=void 0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,{x:a,y:s}=e.boundingBoxCoordinate,l={x:a,y:s},c={width:i,height:o};i+a>n&&(i>n&&(c.width=rl(n,64)),l.x=n-c.width),o+s>r&&(o>r&&(c.height=rl(r,64)),l.y=r-c.height),e.boundingBoxDimensions=c,e.boundingBoxCoordinate=l,e.canvasDimensions={width:n,height:r},e.imageToInpaint=t.payload,e.needsCache=!0},setCanvasDimensions:(e,t)=>{e.canvasDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=rl(ht.clamp(i,64,n),64),s=rl(ht.clamp(o,64,r),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e.boundingBoxCoordinate,{width:a,height:s}=e.canvasDimensions,l=rl(a,64),c=rl(s,64),p=rl(n,64),g=rl(r,64),m=i+n-a,y=o+r-s,b=ht.clamp(p,64,l),S=ht.clamp(g,64,c),T=m>0?i-m:i,E=y>0?o-y:o,k=ht.clamp(T,0,l-b),L=ht.clamp(E,0,c-S);e.boundingBoxDimensions={width:b,height:S},e.boundingBoxCoordinate={x:k,y:L}},setBoundingBoxCoordinate:(e,t)=>{e.boundingBoxCoordinate=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setNeedsCache:(e,t)=>{e.needsCache=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload,e.needsCache=!1},setShouldShowBoundingBoxFill:(e,t)=>{e.shouldShowBoundingBoxFill=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},setClearBrushHistory:e=>{e.pastLines=[],e.futureLines=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsSpacebarHeld:(e,t)=>{e.isSpacebarHeld=t.payload}}}),{setTool:DB,setBrushSize:Rye,addLine:qL,addPointToCurrentLine:KL,setShouldInvertMask:Oye,setShouldShowMask:Nye,setShouldShowCheckboardTransparency:RCe,setShouldShowBrushPreview:TS,setMaskColor:Dye,clearMask:zye,clearImageToInpaint:zB,undo:Fye,redo:Bye,setCursorPosition:ZL,setCanvasDimensions:OCe,setImageToInpaint:A4,setBoundingBoxDimensions:Ig,setBoundingBoxCoordinate:YL,setBoundingBoxPreviewFill:NCe,setNeedsCache:su,setStageScale:$ye,toggleTool:Hye,setShouldShowBoundingBox:FB,setShouldShowBoundingBoxFill:Wye,setIsDrawing:ly,setShouldShowBrush:DCe,setClearBrushHistory:Vye,setShouldUseInpaintReplace:Uye,setInpaintReplace:Gye,setShouldLockBoundingBox:K7,toggleShouldLockBoundingBox:jye,setIsMovingBoundingBox:XL,setIsTransformingBoundingBox:LS,setIsMouseOverBoundingBox:pp,setIsSpacebarHeld:qye}=NB.actions,Kye=NB.reducer,BB=""+new URL("logo.13003d72.png",import.meta.url).href,Zye=St(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),Z7=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Me(Zye),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;_t("o",()=>{t(x3(!n))},[n]),_t("esc",()=>{i||t(x3(!1))},[i]),_t("shift+o",()=>{m()},[i]);const c=C.exports.useCallback(()=>{i||(t(j6e(a.current?a.current.scrollTop:0)),t(x3(!1)),t(q6e(!1)))},[t,i]);OB(o,c,!i);const p=()=>{s.current=window.setTimeout(()=>c(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(G6e(!i)),t(su(!0))};return w(RB,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:w("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:w("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:y=>{y.target!==a.current?g():!i&&p()},children:[w($i,{label:"Pin Options Panel",children:w("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?w(LB,{}):w(AB,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[w("img",{src:BB,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",w("strong",{children:"ai"})]})]}),l]})})})})};function Yye(){const e=Me(n=>n.options.showAdvancedOptions),t={seed:{header:w(D7,{}),feature:Ji.SEED,options:w(z7,{})},variations:{header:w(B7,{}),feature:Ji.VARIATIONS,options:w($7,{})},face_restore:{header:w(R7,{}),feature:Ji.FACE_CORRECTION,options:w(fx,{})},upscale:{header:w(F7,{}),feature:Ji.UPSCALE,options:w(hx,{})},other:{header:w(fB,{}),feature:Ji.OTHER,options:w(hB,{})}};return ne(Z7,{children:[w(j7,{}),w(G7,{}),w(V7,{}),w(dB,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),w(Zve,{}),w(H7,{}),e?w(U7,{accordionInfo:t}):null]})}const Y7=C.exports.createContext(null),$B=e=>{const{styleClass:t}=e,n=C.exports.useContext(Y7),r=()=>{n&&n()};return w("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[w(CB,{}),w(Rf,{size:"lg",children:"Click or Drag and Drop"})]})})},Xye=St(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),o8=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=m4(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:c}=Me(Xye),p=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!c&&e&&a(xye(e)),o()};_t("del",()=>{s?i():m()},[e,s]);const y=b=>a(mB(!b.target.checked));return ne(Fn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),w(h0e,{isOpen:r,leastDestructiveRef:p,onClose:o,children:w(Xm,{children:ne(p0e,{children:[w(l7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),w(b4,{children:ne(Dn,{direction:"column",gap:5,children:[w(wo,{children:"Are you sure? You can't undo this action afterwards."}),w(rd,{children:ne(Dn,{alignItems:"center",children:[w(Yf,{mb:0,children:"Don't ask me again"}),w(m7,{checked:!s,onChange:y})]})})]})}),ne(s7,{children:[w(Oa,{ref:p,onClick:o,children:"Cancel"}),w(Oa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Qye=St([e=>e.system,e=>e.options,e=>e.gallery,Cr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:c,shouldShowImageDetails:p}=t,{intermediateImage:g,currentImage:m}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:c,shouldDisableToolbarButtons:Boolean(g)||!m,currentImage:m,shouldShowImageDetails:p,activeTabName:r}},{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),Jye=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:c}=Me(Qye),{onCopy:p}=Qce(c?window.location.toString()+c.url:""),g=ld(),m=()=>{!c||(e(ov(c)),e(Ea("img2img")))},y=()=>{p(),g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})};_t("shift+i",()=>{c?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[c]);const b=()=>{!c||c.metadata&&e(z6e(c.metadata))};_t("a",()=>{["txt2img","img2img"].includes(c?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[c]);const S=()=>{c?.metadata&&e(Ov(c.metadata.image.seed))};_t("s",()=>{c?.metadata?.image?.seed?(S(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[c]);const T=()=>c?.metadata?.image?.prompt&&e(Px(c.metadata.image.prompt));_t("p",()=>{c?.metadata?.image?.prompt?(T(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[c]);const E=()=>{c&&e(vye(c))};_t("u",()=>{i&&!s&&n&&!t&&o?E():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[c,i,s,n,t,o]);const k=()=>{c&&e(yye(c))};_t("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[c,r,s,n,t,a]);const L=()=>e(LH(!l)),I=()=>{!c||(e(A4(c)),e(Ea("inpainting")),e(su(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return _t("i",()=>{c?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[c,l]),ne("div",{className:"current-image-options",children:[w(au,{isAttached:!0,children:w(Df,{trigger:"hover",triggerComponent:w(Ut,{"aria-label":"Send to...",icon:w(uye,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[w(_c,{size:"sm",onClick:m,leftIcon:w(HL,{}),children:"Send to Image to Image"}),w(_c,{size:"sm",onClick:I,leftIcon:w(HL,{}),children:"Send to Inpainting"}),w(_c,{size:"sm",onClick:y,leftIcon:w(wB,{}),children:"Copy Link to Image"}),w(_c,{leftIcon:w(j2e,{}),size:"sm",children:w(Of,{download:!0,href:c?.url,children:"Download Image"})})]})})}),ne(au,{isAttached:!0,children:[w(Ut,{icon:w(oye,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!c?.metadata?.image?.prompt,onClick:T}),w(Ut,{icon:w(lye,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!c?.metadata?.image?.seed,onClick:S}),w(Ut,{icon:w(V2e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(c?.metadata?.image?.type),onClick:b})]}),ne(au,{isAttached:!0,children:[w(Df,{trigger:"hover",triggerComponent:w(Ut,{icon:w(Z2e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[w(fx,{}),w(_c,{isDisabled:!r||!c||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),w(Df,{trigger:"hover",triggerComponent:w(Ut,{icon:w(K2e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[w(hx,{}),w(_c,{isDisabled:!i||!c||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),w(Ut,{icon:w(SB,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),w(o8,{image:c,children:w(Ut,{icon:w(fye,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!c||!n||t,className:"delete-image-btn"})})]})},e3e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},HB=Q5({name:"gallery",initialState:e3e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=la.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(ht.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(ht.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:uy,clearIntermediateImage:QL,removeImage:WB,setCurrentImage:VB,addGalleryImages:t3e,setIntermediateImage:n3e,selectNextImage:UB,selectPrevImage:GB,setShouldPinGallery:r3e,setShouldShowGallery:f3,setGalleryScrollPosition:i3e,setGalleryImageMinimumWidth:nf,setGalleryImageObjectFit:o3e,setShouldHoldGalleryOpen:a3e,setShouldAutoSwitchToNewImages:s3e,setCurrentCategory:cy,setGalleryWidth:dy}=HB.actions,l3e=HB.reducer;rt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});rt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});rt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});rt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});rt({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[w("circle",{cx:"12",cy:"12",r:"5"}),w("path",{d:"M12 1v2"}),w("path",{d:"M12 21v2"}),w("path",{d:"M4.22 4.22l1.42 1.42"}),w("path",{d:"M18.36 18.36l1.42 1.42"}),w("path",{d:"M1 12h2"}),w("path",{d:"M21 12h2"}),w("path",{d:"M4.22 19.78l1.42-1.42"}),w("path",{d:"M18.36 5.64l1.42-1.42"})]})});rt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});rt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:w("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});rt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});rt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});rt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});rt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});rt({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),w("circle",{cx:"12",cy:"12",r:"2"})]})});rt({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),w("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});rt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});rt({displayName:"DeleteIcon",path:w("g",{fill:"currentColor",children:w("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});rt({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),w("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});rt({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),w("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});rt({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[w("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),w("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});rt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});rt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});rt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});rt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});rt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});rt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});rt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});rt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});rt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var jB=rt({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[w("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),w("path",{d:"M15 3h6v6"}),w("path",{d:"M10 14L21 3"})]})});rt({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),w("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});rt({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[w("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),w("path",{d:"M12 8v8"}),w("path",{d:"M8 12h8"})]})});rt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});rt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});rt({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),w("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});rt({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),w("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});rt({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),w("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});rt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});rt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});rt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});rt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});rt({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[w("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),w("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});rt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});rt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});rt({displayName:"SpinnerIcon",path:ne(Fn,{children:[w("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[w("stop",{stopColor:"currentColor",offset:"0%"}),w("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[w("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),w("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),w("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});rt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});rt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:w("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});rt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});rt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});rt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});rt({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[w("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),w("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),w("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});rt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});rt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});rt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});rt({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[w("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),w("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),w("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});rt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});rt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});rt({viewBox:"0 0 14 14",path:w("g",{fill:"currentColor",children:w("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});rt({displayName:"MinusIcon",path:w("g",{fill:"currentColor",children:w("rect",{height:"4",width:"20",x:"2",y:"10"})})});rt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function u3e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ne(Dn,{gap:2,children:[n&&w($i,{label:`Recall ${e}`,children:w(gu,{"aria-label":"Use this parameter",icon:w(u3e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ne(Dn,{direction:i?"column":"row",children:[ne(wo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(Of,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",w(jB,{mx:"2px"})]}):w(wo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),c3e=(e,t)=>e.image.uuid===t.image.uuid,d3e=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();_t("esc",()=>{n(LH(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:c,steps:p,cfg_scale:g,seamless:m,hires_fix:y,width:b,height:S,strength:T,fit:E,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,D=JSON.stringify(r,null,2);return w("div",{className:`image-metadata-viewer ${t}`,children:ne(Dn,{gap:1,direction:"column",width:"100%",children:[ne(Dn,{gap:2,children:[w(wo,{fontWeight:"semibold",children:"File:"}),ne(Of,{href:e.url,isExternal:!0,children:[e.url,w(jB,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Fn,{children:[i&&w(Qn,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&w(Qn,{label:"Original image",value:I}),i==="gfpgan"&&T!==void 0&&w(Qn,{label:"Fix faces strength",value:T,onClick:()=>n(v3(T))}),i==="esrgan"&&O!==void 0&&w(Qn,{label:"Upscaling scale",value:O,onClick:()=>n(A8(O))}),i==="esrgan"&&T!==void 0&&w(Qn,{label:"Upscaling strength",value:T,onClick:()=>n(I8(T))}),s&&w(Qn,{label:"Prompt",labelPosition:"top",value:d3(s),onClick:()=>n(Px(s))}),l!==void 0&&w(Qn,{label:"Seed",value:l,onClick:()=>n(Ov(l))}),a&&w(Qn,{label:"Sampler",value:a,onClick:()=>n(wH(a))}),p&&w(Qn,{label:"Steps",value:p,onClick:()=>n(yH(p))}),g!==void 0&&w(Qn,{label:"CFG scale",value:g,onClick:()=>n(xH(g))}),c&&c.length>0&&w(Qn,{label:"Seed-weight pairs",value:L4(c),onClick:()=>n(TH(L4(c)))}),m&&w(Qn,{label:"Seamless",value:m,onClick:()=>n(CH(m))}),y&&w(Qn,{label:"High Resolution Optimization",value:y,onClick:()=>n(_H(y))}),b&&w(Qn,{label:"Width",value:b,onClick:()=>n(SH(b))}),S&&w(Qn,{label:"Height",value:S,onClick:()=>n(bH(S))}),k&&w(Qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(ov(k))}),L&&w(Qn,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(M8(L))}),i==="img2img"&&T&&w(Qn,{label:"Image to image strength",value:T,onClick:()=>n(kH(T))}),E&&w(Qn,{label:"Image to image fit",value:E,onClick:()=>n(PH(E))}),o&&o.length>0&&ne(Fn,{children:[w(Rf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:W,strength:V}=N;return ne(Dn,{pl:"2rem",gap:1,direction:"column",children:[w(wo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),w(Qn,{label:"Scale",value:W,onClick:()=>n(A8(W))}),w(Qn,{label:"Strength",value:V,onClick:()=>n(I8(V))})]},z)}else if(N.type==="gfpgan"){const{strength:W}=N;return ne(Dn,{pl:"2rem",gap:1,direction:"column",children:[w(wo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),w(Qn,{label:"Strength",value:W,onClick:()=>{n(v3(W)),n(y3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:W,fidelity:V}=N;return ne(Dn,{pl:"2rem",gap:1,direction:"column",children:[w(wo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),w(Qn,{label:"Strength",value:W,onClick:()=>{n(v3(W)),n(y3("codeformer"))}}),V&&w(Qn,{label:"Fidelity",value:V,onClick:()=>{n(EH(V)),n(y3("codeformer"))}})]},z)}})]}),ne(Dn,{gap:2,direction:"column",children:[ne(Dn,{gap:2,children:[w($i,{label:"Copy metadata JSON",children:w(gu,{"aria-label":"Copy metadata JSON",icon:w(wB,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(D)})}),w(wo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),w("div",{className:"image-json-viewer",children:w("pre",{children:D})})]})]}):w(MD,{width:"100%",pt:10,children:w(wo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},c3e),f3e=St([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(c=>c.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function h3e(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Me(f3e),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},c=()=>{e(GB())},p=()=>{e(UB())};return ne("div",{className:"current-image-preview",children:[i&&w($5,{src:i.url,width:i.width,height:i.height}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[w("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&w(gu,{"aria-label":"Previous image",icon:w(H2e,{className:"next-prev-button"}),variant:"unstyled",onClick:c})}),w("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&w(gu,{"aria-label":"Next image",icon:w(W2e,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&w(d3e,{image:i,styleClass:"current-image-metadata"})]})}const p3e=St([e=>e.gallery,e=>e.options,Cr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),X7=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Me(p3e);return w("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Fn,{children:[w(Jye,{}),w(h3e,{})]}):w("div",{className:"current-image-display-placeholder",children:w(M2e,{})})})},qB=()=>{const e=C.exports.useContext(Y7);return w(Ut,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:w(CB,{}),onClick:e||void 0})};function g3e(){const e=Me(i=>i.options.initialImage),t=Xe(),n=ld(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(AH())};return ne(Fn,{children:[ne("div",{className:"init-image-preview-header",children:[w("h2",{children:"Initial Image"}),w(qB,{})]}),e&&w("div",{className:"init-image-preview",children:w($5,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const m3e=()=>{const e=Me(r=>r.options.initialImage),{currentImage:t}=Me(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[w("div",{className:"workarea-split-view-left",children:e?w("div",{className:"image-to-image-area",children:w(g3e,{})}):w($B,{})}),t&&w("div",{className:"workarea-split-view-right",children:w(X7,{})})]})};function v3e(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var y3e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},k3e=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],rA="__resizable_base__",KB=function(e){S3e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(rA):o.className+=rA,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||w3e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),p=c/l[s]*100;return p+"%"}return AS(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?AS(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?AS(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&gp("left",o),s=i&&gp("top",o),l,c;if(this.props.bounds==="parent"){var p=this.parentNode;p&&(l=a?this.resizableRight-this.parentLeft:p.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:p.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,y=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,S=c||0;if(s){var T=(m-b)*this.ratio+S,E=(y-b)*this.ratio+S,k=(p-S)/this.ratio+b,L=(g-S)/this.ratio+b,I=Math.max(p,T),O=Math.min(g,E),D=Math.max(m,k),N=Math.min(y,L);n=hy(n,I,O),r=hy(r,D,N)}else n=hy(n,p,g),r=hy(r,m,y);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,c=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&C3e(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&py(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var p=this.window.getComputedStyle(c).flexDirection;this.flexDir=p.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:il(il({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&py(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,c=py(n)?n.touches[0].clientX:n.clientX,p=py(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,y=g.original,b=g.width,S=g.height,T=this.getParentSize(),E=_3e(T,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var k=this.calculateNewSizeFromDirection(c,p),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=nA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=nA(L,this.props.snap.y,this.props.snapGap));var D=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=D.newWidth,L=D.newHeight,this.props.grid){var N=tA(I,this.props.grid[0]),z=tA(L,this.props.grid[1]),W=this.props.snapGap||0;I=W===0||Math.abs(N-I)<=W?N:I,L=W===0||Math.abs(z-L)<=W?z:L}var V={width:I-y.width,height:L-y.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var q=I/T.width*100;I=q+"%"}else if(b.endsWith("vw")){var he=I/this.window.innerWidth*100;I=he+"vw"}else if(b.endsWith("vh")){var de=I/this.window.innerHeight*100;I=de+"vh"}}if(S&&typeof S=="string"){if(S.endsWith("%")){var q=L/T.height*100;L=q+"%"}else if(S.endsWith("vw")){var he=L/this.window.innerWidth*100;L=he+"vw"}else if(S.endsWith("vh")){var de=L/this.window.innerHeight*100;L=de+"vh"}}var ve={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?ve.flexBasis=ve.width:this.flexDir==="column"&&(ve.flexBasis=ve.height),El.exports.flushSync(function(){r.setState(ve)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:il(il({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!i)return null;var p=Object.keys(i).map(function(g){return i[g]!==!1?w(b3e,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:c&&c[g]?c[g]:null},g):null});return w("div",{className:l,style:s,children:p})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return k3e.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=il(il(il({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ne(o,{...il({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&w("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Gn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Iv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function c(g){const{scope:m,children:y,...b}=g,S=m?.[e][l]||s,T=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(S.Provider,{value:T},y)}function p(g,m){const y=m?.[e][l]||s,b=C.exports.useContext(y);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,p]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,E3e(i,...t)]}function E3e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const g=l(o)[`__scope${c}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function P3e(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ZB(...e){return t=>e.forEach(n=>P3e(n,t))}function $a(...e){return C.exports.useCallback(ZB(...e),e)}const rv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(L3e);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(a8,En({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(a8,En({},r,{ref:t}),n)});rv.displayName="Slot";const a8=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...A3e(r,n.props),ref:ZB(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});a8.displayName="SlotClone";const T3e=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function L3e(e){return C.exports.isValidElement(e)&&e.type===T3e}function A3e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const I3e=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],yu=I3e.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?rv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,En({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function YB(e,t){e&&El.exports.flushSync(()=>e.dispatchEvent(t))}function XB(e){const t=e+"CollectionProvider",[n,r]=Iv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:b,children:S}=y,T=re.useRef(null),E=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:E,collectionRef:T},S)},s=e+"CollectionSlot",l=re.forwardRef((y,b)=>{const{scope:S,children:T}=y,E=o(s,S),k=$a(b,E.collectionRef);return re.createElement(rv,{ref:k},T)}),c=e+"CollectionItemSlot",p="data-radix-collection-item",g=re.forwardRef((y,b)=>{const{scope:S,children:T,...E}=y,k=re.useRef(null),L=$a(b,k),I=o(c,S);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...E}),()=>void I.itemMap.delete(k))),re.createElement(rv,{[p]:"",ref:L},T)});function m(y){const b=o(e+"CollectionConsumer",y);return re.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const E=Array.from(T.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((I,O)=>E.indexOf(I.ref.current)-E.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const M3e=C.exports.createContext(void 0);function QB(e){const t=C.exports.useContext(M3e);return e||t||"ltr"}function Cl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function R3e(e,t=globalThis?.document){const n=Cl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const s8="dismissableLayer.update",O3e="dismissableLayer.pointerDownOutside",N3e="dismissableLayer.focusOutside";let iA;const D3e=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),z3e=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,p=C.exports.useContext(D3e),[g,m]=C.exports.useState(null),y=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),S=$a(t,z=>m(z)),T=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=T.indexOf(E),L=g?T.indexOf(g):-1,I=p.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,D=F3e(z=>{const W=z.target,V=[...p.branches].some(q=>q.contains(W));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},y),N=B3e(z=>{const W=z.target;[...p.branches].some(q=>q.contains(W))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},y);return R3e(z=>{L===p.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},y),C.exports.useEffect(()=>{if(!!g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(iA=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),oA(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=iA)}},[g,y,r,p]),C.exports.useEffect(()=>()=>{!g||(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),oA())},[g,p]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(s8,z),()=>document.removeEventListener(s8,z)},[]),C.exports.createElement(yu.div,En({},c,{ref:S,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Gn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Gn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Gn(e.onPointerDownCapture,D.onPointerDownCapture)}))});function F3e(e,t=globalThis?.document){const n=Cl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){JB(O3e,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function B3e(e,t=globalThis?.document){const n=Cl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&JB(N3e,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function oA(){const e=new CustomEvent(s8);document.dispatchEvent(e)}function JB(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?YB(i,o):i.dispatchEvent(o)}let IS=0;function $3e(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:aA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:aA()),IS++,()=>{IS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),IS--}},[])}function aA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const MS="focusScope.autoFocusOnMount",RS="focusScope.autoFocusOnUnmount",sA={bubbles:!1,cancelable:!0},H3e=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),c=Cl(i),p=Cl(o),g=C.exports.useRef(null),m=$a(t,S=>l(S)),y=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let S=function(E){if(y.paused||!s)return;const k=E.target;s.contains(k)?g.current=k:df(g.current,{select:!0})},T=function(E){y.paused||!s||s.contains(E.relatedTarget)||df(g.current,{select:!0})};return document.addEventListener("focusin",S),document.addEventListener("focusout",T),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",T)}}},[r,s,y.paused]),C.exports.useEffect(()=>{if(s){uA.add(y);const S=document.activeElement;if(!s.contains(S)){const E=new CustomEvent(MS,sA);s.addEventListener(MS,c),s.dispatchEvent(E),E.defaultPrevented||(W3e(q3e(e$(s)),{select:!0}),document.activeElement===S&&df(s))}return()=>{s.removeEventListener(MS,c),setTimeout(()=>{const E=new CustomEvent(RS,sA);s.addEventListener(RS,p),s.dispatchEvent(E),E.defaultPrevented||df(S??document.body,{select:!0}),s.removeEventListener(RS,p),uA.remove(y)},0)}}},[s,c,p,y]);const b=C.exports.useCallback(S=>{if(!n&&!r||y.paused)return;const T=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(T&&E){const k=S.currentTarget,[L,I]=V3e(k);L&&I?!S.shiftKey&&E===I?(S.preventDefault(),n&&df(L,{select:!0})):S.shiftKey&&E===L&&(S.preventDefault(),n&&df(I,{select:!0})):E===k&&S.preventDefault()}},[n,r,y.paused]);return C.exports.createElement(yu.div,En({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function W3e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(df(r,{select:t}),document.activeElement!==n)return}function V3e(e){const t=e$(e),n=lA(t,e),r=lA(t.reverse(),e);return[n,r]}function e$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lA(e,t){for(const n of e)if(!U3e(n,{upTo:t}))return n}function U3e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function G3e(e){return e instanceof HTMLInputElement&&"select"in e}function df(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&G3e(e)&&t&&e.select()}}const uA=j3e();function j3e(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=cA(e,t),e.unshift(t)},remove(t){var n;e=cA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function cA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function q3e(e){return e.filter(t=>t.tagName!=="A")}const C0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},K3e=KS["useId".toString()]||(()=>{});let Z3e=0;function Y3e(e){const[t,n]=C.exports.useState(K3e());return C0(()=>{e||n(r=>r??String(Z3e++))},[e]),e||(t?`radix-${t}`:"")}function $0(e){return e.split("-")[0]}function px(e){return e.split("-")[1]}function H0(e){return["top","bottom"].includes($0(e))?"x":"y"}function Q7(e){return e==="y"?"height":"width"}function dA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=H0(t),l=Q7(s),c=r[l]/2-i[l]/2,p=$0(t),g=s==="x";let m;switch(p){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(px(t)){case"start":m[s]-=c*(n&&g?-1:1);break;case"end":m[s]+=c*(n&&g?-1:1);break}return m}const X3e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:p}=dA(l,r,s),g=r,m={},y=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const c=t$(r),p={x:i,y:o},g=H0(a),m=px(a),y=Q7(g),b=await l.getDimensions(n),S=g==="y"?"top":"left",T=g==="y"?"bottom":"right",E=s.reference[y]+s.reference[g]-p[g]-s.floating[y],k=p[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[y]);const O=E/2-k/2,D=c[S],N=I-b[y]-c[T],z=I/2-b[y]/2+O,W=l8(D,z,N),he=(m==="start"?c[S]:c[T])>0&&z!==W&&s.reference[y]<=s.floating[y]?zt4e[t])}function n4e(e,t,n){n===void 0&&(n=!1);const r=px(e),i=H0(e),o=Q7(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=R4(a)),{main:a,cross:R4(a)}}const r4e={start:"end",end:"start"};function hA(e){return e.replace(/start|end/g,t=>r4e[t])}const i4e=["top","right","bottom","left"];function o4e(e){const t=R4(e);return[hA(e),t,hA(t)]}const a4e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:y=!0,...b}=e,S=$0(r),E=g||(S===a||!y?[R4(a)]:o4e(a)),k=[a,...E],L=await M4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&I.push(L[S]),p){const{main:W,cross:V}=n4e(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[W],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every(W=>W<=0)){var D,N;const W=((D=(N=i.flip)==null?void 0:N.index)!=null?D:0)+1,V=k[W];if(V)return{data:{index:W,overflows:O},reset:{placement:V}};let q="bottom";switch(m){case"bestFit":{var z;const he=(z=O.map(de=>[de,de.overflows.filter(ve=>ve>0).reduce((ve,Ee)=>ve+Ee,0)]).sort((de,ve)=>de[1]-ve[1])[0])==null?void 0:z[0].placement;he&&(q=he);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function pA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gA(e){return i4e.some(t=>e[t]>=0)}const s4e=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await M4(r,{...n,elementContext:"reference"}),a=pA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:gA(a)}}}case"escaped":{const o=await M4(r,{...n,altBoundary:!0}),a=pA(o,i.floating);return{data:{escapedOffsets:a,escaped:gA(a)}}}default:return{}}}}};async function l4e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=$0(n),s=px(n),l=H0(n)==="x",c=["left","top"].includes(a)?-1:1,p=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:y,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(y=s==="end"?b*-1:b),l?{x:y*p,y:m*c}:{x:m*c,y:y*p}}const u4e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await l4e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function n$(e){return e==="x"?"y":"x"}const c4e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:T=>{let{x:E,y:k}=T;return{x:E,y:k}}},...l}=e,c={x:n,y:r},p=await M4(t,l),g=H0($0(i)),m=n$(g);let y=c[g],b=c[m];if(o){const T=g==="y"?"top":"left",E=g==="y"?"bottom":"right",k=y+p[T],L=y-p[E];y=l8(k,y,L)}if(a){const T=m==="y"?"top":"left",E=m==="y"?"bottom":"right",k=b+p[T],L=b-p[E];b=l8(k,b,L)}const S=s.fn({...t,[g]:y,[m]:b});return{...S,data:{x:S.x-n,y:S.y-r}}}}},d4e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=e,p={x:n,y:r},g=H0(i),m=n$(g);let y=p[g],b=p[m];const S=typeof s=="function"?s({...o,placement:i}):s,T=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(l){const O=g==="y"?"height":"width",D=o.reference[g]-o.floating[O]+T.mainAxis,N=o.reference[g]+o.reference[O]-T.mainAxis;yN&&(y=N)}if(c){var E,k,L,I;const O=g==="y"?"width":"height",D=["top","left"].includes($0(i)),N=o.reference[m]-o.floating[O]+(D&&(E=(k=a.offset)==null?void 0:k[m])!=null?E:0)+(D?0:T.crossAxis),z=o.reference[m]+o.reference[O]+(D?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(D?T.crossAxis:0);bz&&(b=z)}return{[g]:y,[m]:b}}}};function r$(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function _u(e){if(e==null)return window;if(!r$(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Mv(e){return _u(e).getComputedStyle(e)}function xu(e){return r$(e)?"":e?(e.nodeName||"").toLowerCase():""}function i$(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function _l(e){return e instanceof _u(e).HTMLElement}function Jc(e){return e instanceof _u(e).Element}function f4e(e){return e instanceof _u(e).Node}function J7(e){if(typeof ShadowRoot>"u")return!1;const t=_u(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function gx(e){const{overflow:t,overflowX:n,overflowY:r}=Mv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function h4e(e){return["table","td","th"].includes(xu(e))}function o$(e){const t=/firefox/i.test(i$()),n=Mv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function a$(){return!/^((?!chrome|android).)*safari/i.test(i$())}const mA=Math.min,um=Math.max,O4=Math.round;function bu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,c=1;t&&_l(e)&&(l=e.offsetWidth>0&&O4(s.width)/e.offsetWidth||1,c=e.offsetHeight>0&&O4(s.height)/e.offsetHeight||1);const p=Jc(e)?_u(e):window,g=!a$()&&n,m=(s.left+(g&&(r=(i=p.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,y=(s.top+(g&&(o=(a=p.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/c,b=s.width/l,S=s.height/c;return{width:b,height:S,top:y,right:m+b,bottom:y+S,left:m,x:m,y}}function ud(e){return((f4e(e)?e.ownerDocument:e.document)||window.document).documentElement}function mx(e){return Jc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s$(e){return bu(ud(e)).left+mx(e).scrollLeft}function p4e(e){const t=bu(e);return O4(t.width)!==e.offsetWidth||O4(t.height)!==e.offsetHeight}function g4e(e,t,n){const r=_l(t),i=ud(t),o=bu(e,r&&p4e(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((xu(t)!=="body"||gx(i))&&(a=mx(t)),_l(t)){const l=bu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=s$(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function l$(e){return xu(e)==="html"?e:e.assignedSlot||e.parentNode||(J7(e)?e.host:null)||ud(e)}function vA(e){return!_l(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function m4e(e){let t=l$(e);for(J7(t)&&(t=t.host);_l(t)&&!["html","body"].includes(xu(t));){if(o$(t))return t;t=t.parentNode}return null}function u8(e){const t=_u(e);let n=vA(e);for(;n&&h4e(n)&&getComputedStyle(n).position==="static";)n=vA(n);return n&&(xu(n)==="html"||xu(n)==="body"&&getComputedStyle(n).position==="static"&&!o$(n))?t:n||m4e(e)||t}function yA(e){if(_l(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=bu(e);return{width:t.width,height:t.height}}function v4e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=_l(n),o=ud(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((xu(n)!=="body"||gx(o))&&(a=mx(n)),_l(n))){const l=bu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function y4e(e,t){const n=_u(e),r=ud(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=a$();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function x4e(e){var t;const n=ud(e),r=mx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=um(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=um(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+s$(e);const l=-r.scrollTop;return Mv(i||n).direction==="rtl"&&(s+=um(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function u$(e){const t=l$(e);return["html","body","#document"].includes(xu(t))?e.ownerDocument.body:_l(t)&&gx(t)?t:u$(t)}function N4(e,t){var n;t===void 0&&(t=[]);const r=u$(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=_u(r),a=i?[o].concat(o.visualViewport||[],gx(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(N4(a))}function b4e(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&J7(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function S4e(e,t){const n=bu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function xA(e,t,n){return t==="viewport"?I4(y4e(e,n)):Jc(t)?S4e(t,n):I4(x4e(ud(e)))}function w4e(e){const t=N4(e),r=["absolute","fixed"].includes(Mv(e).position)&&_l(e)?u8(e):e;return Jc(r)?t.filter(i=>Jc(i)&&b4e(i,r)&&xu(i)!=="body"):[]}function C4e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?w4e(t):[].concat(n),r],s=a[0],l=a.reduce((c,p)=>{const g=xA(t,p,i);return c.top=um(g.top,c.top),c.right=mA(g.right,c.right),c.bottom=mA(g.bottom,c.bottom),c.left=um(g.left,c.left),c},xA(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const _4e={getClippingRect:C4e,convertOffsetParentRelativeRectToViewportRelativeRect:v4e,isElement:Jc,getDimensions:yA,getOffsetParent:u8,getDocumentElement:ud,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:g4e(t,u8(n),r),floating:{...yA(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Mv(e).direction==="rtl"};function k4e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,c=o&&!s,p=l||c?[...Jc(e)?N4(e):[],...N4(t)]:[];p.forEach(S=>{l&&S.addEventListener("scroll",n,{passive:!0}),c&&S.addEventListener("resize",n)});let g=null;if(a){let S=!0;g=new ResizeObserver(()=>{S||n(),S=!1}),Jc(e)&&!s&&g.observe(e),g.observe(t)}let m,y=s?bu(e):null;s&&b();function b(){const S=bu(e);y&&(S.x!==y.x||S.y!==y.y||S.width!==y.width||S.height!==y.height)&&n(),y=S,m=requestAnimationFrame(b)}return n(),()=>{var S;p.forEach(T=>{l&&T.removeEventListener("scroll",n),c&&T.removeEventListener("resize",n)}),(S=g)==null||S.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const E4e=(e,t,n)=>X3e(e,t,{platform:_4e,...n});var c8=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function d8(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!d8(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!d8(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function P4e(e){const t=C.exports.useRef(e);return c8(()=>{t.current=e}),t}function T4e(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=P4e(i),l=C.exports.useRef(null),[c,p]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);d8(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const y=C.exports.useCallback(()=>{!o.current||!a.current||E4e(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&El.exports.flushSync(()=>{p(L)})})},[g,n,r]);c8(()=>{b.current&&y()},[y]);const b=C.exports.useRef(!1);c8(()=>(b.current=!0,()=>{b.current=!1}),[]);const S=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,y);l.current=L}else y()},[y,s]),T=C.exports.useCallback(L=>{o.current=L,S()},[S]),E=C.exports.useCallback(L=>{a.current=L,S()},[S]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...c,update:y,refs:k,reference:T,floating:E}),[c,y,k,T,E])}const L4e=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?fA({element:t.current,padding:n}).fn(i):{}:t?fA({element:t,padding:n}).fn(i):{}}}};function A4e(e){const[t,n]=C.exports.useState(void 0);return C0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const c$="Popper",[e_,d$]=Iv(c$),[I4e,f$]=e_(c$),M4e=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(I4e,{scope:t,anchor:r,onAnchorChange:i},n)},R4e="PopperAnchor",O4e=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=f$(R4e,n),a=C.exports.useRef(null),s=$a(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(yu.div,En({},i,{ref:s}))}),D4="PopperContent",[N4e,zCe]=e_(D4),[D4e,z4e]=e_(D4,{hasParent:!1,positionUpdateFns:new Set}),F4e=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,c;const{__scopePopper:p,side:g="bottom",sideOffset:m=0,align:y="center",alignOffset:b=0,arrowPadding:S=0,collisionBoundary:T=[],collisionPadding:E=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,D=f$(D4,p),[N,z]=C.exports.useState(null),W=$a(t,wt=>z(wt)),[V,q]=C.exports.useState(null),he=A4e(V),de=(n=he?.width)!==null&&n!==void 0?n:0,ve=(r=he?.height)!==null&&r!==void 0?r:0,Ee=g+(y!=="center"?"-"+y:""),xe=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},Z=Array.isArray(T)?T:[T],U=Z.length>0,ee={padding:xe,boundary:Z.filter($4e),altBoundary:U},{reference:ae,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ut}=T4e({strategy:"fixed",placement:Ee,whileElementsMounted:k4e,middleware:[u4e({mainAxis:m+ve,alignmentAxis:b}),I?c4e({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?d4e():void 0,...ee}):void 0,V?L4e({element:V,padding:S}):void 0,I?a4e({...ee}):void 0,H4e({arrowWidth:de,arrowHeight:ve}),L?s4e({strategy:"referenceHidden"}):void 0].filter(B4e)});C0(()=>{ae(D.anchor)},[ae,D.anchor]);const qe=ye!==null&&Se!==null,[ot,tt]=h$(He),at=(i=je.arrow)===null||i===void 0?void 0:i.x,Rt=(o=je.arrow)===null||o===void 0?void 0:o.y,kt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,st]=C.exports.useState();C0(()=>{N&&st(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=z4e(D4,p),mt=!Lt;C.exports.useLayoutEffect(()=>{if(!mt)return it.add(ut),()=>{it.delete(ut)}},[mt,it,ut]),C.exports.useLayoutEffect(()=>{mt&&qe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[mt,qe,it]);const Sn={"data-side":ot,"data-align":tt,...O,ref:W,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(c=je.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")}},C.exports.createElement(N4e,{scope:p,placedSide:ot,onArrowChange:q,arrowX:at,arrowY:Rt,shouldHideArrow:kt},mt?C.exports.createElement(D4e,{scope:p,hasParent:!0,positionUpdateFns:it},C.exports.createElement(yu.div,Sn)):C.exports.createElement(yu.div,Sn)))});function B4e(e){return e!==void 0}function $4e(e){return e!==null}const H4e=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:c}=t,g=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,y=g?0:e.arrowHeight,[b,S]=h$(s),T={start:"0%",center:"50%",end:"100%"}[S],E=((r=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+y/2;let L="",I="";return b==="bottom"?(L=g?T:`${E}px`,I=`${-y}px`):b==="top"?(L=g?T:`${E}px`,I=`${l.floating.height+y}px`):b==="right"?(L=`${-y}px`,I=g?T:`${k}px`):b==="left"&&(L=`${l.floating.width+y}px`,I=g?T:`${k}px`),{data:{x:L,y:I}}}});function h$(e){const[t,n="center"]=e.split("-");return[t,n]}const W4e=M4e,V4e=O4e,U4e=F4e;function G4e(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const p$=e=>{const{present:t,children:n}=e,r=j4e(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=$a(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};p$.displayName="Presence";function j4e(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=G4e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const c=my(r.current);o.current=s==="mounted"?c:"none"},[s]),C0(()=>{const c=r.current,p=i.current;if(p!==e){const m=o.current,y=my(c);e?l("MOUNT"):y==="none"||c?.display==="none"?l("UNMOUNT"):l(p&&m!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),C0(()=>{if(t){const c=g=>{const y=my(r.current).includes(g.animationName);g.target===t&&y&&El.exports.flushSync(()=>l("ANIMATION_END"))},p=g=>{g.target===t&&(o.current=my(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function my(e){return e?.animationName||"none"}function q4e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=K4e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Cl(n),l=C.exports.useCallback(c=>{if(o){const g=typeof c=="function"?c(e):c;g!==e&&s(g)}else i(c)},[o,e,i,s]);return[a,l]}function K4e({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Cl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const OS="rovingFocusGroup.onEntryFocus",Z4e={bubbles:!1,cancelable:!0},t_="RovingFocusGroup",[f8,g$,Y4e]=XB(t_),[X4e,m$]=Iv(t_,[Y4e]),[Q4e,J4e]=X4e(t_),e5e=C.exports.forwardRef((e,t)=>C.exports.createElement(f8.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(f8.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t5e,En({},e,{ref:t}))))),t5e=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,...p}=e,g=C.exports.useRef(null),m=$a(t,g),y=QB(o),[b=null,S]=q4e({prop:a,defaultProp:s,onChange:l}),[T,E]=C.exports.useState(!1),k=Cl(c),L=g$(n),I=C.exports.useRef(!1),[O,D]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(OS,k),()=>N.removeEventListener(OS,k)},[k]),C.exports.createElement(Q4e,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(N=>S(N),[S]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>D(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>D(N=>N-1),[])},C.exports.createElement(yu.div,En({tabIndex:T||O===0?-1:0,"data-orientation":r},p,{ref:m,style:{outline:"none",...e.style},onMouseDown:Gn(e.onMouseDown,()=>{I.current=!0}),onFocus:Gn(e.onFocus,N=>{const z=!I.current;if(N.target===N.currentTarget&&z&&!T){const W=new CustomEvent(OS,Z4e);if(N.currentTarget.dispatchEvent(W),!W.defaultPrevented){const V=L().filter(Ee=>Ee.focusable),q=V.find(Ee=>Ee.active),he=V.find(Ee=>Ee.id===b),ve=[q,he,...V].filter(Boolean).map(Ee=>Ee.ref.current);v$(ve)}}I.current=!1}),onBlur:Gn(e.onBlur,()=>E(!1))})))}),n5e="RovingFocusGroupItem",r5e=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Y3e(),s=J4e(n5e,n),l=s.currentTabStopId===a,c=g$(n),{onFocusableItemAdd:p,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),C.exports.createElement(f8.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(yu.span,En({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Gn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Gn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Gn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=a5e(m,s.orientation,s.dir);if(y!==void 0){m.preventDefault();let S=c().filter(T=>T.focusable).map(T=>T.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const T=S.indexOf(m.currentTarget);S=s.loop?s5e(S,T+1):S.slice(T+1)}setTimeout(()=>v$(S))}})})))}),i5e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function o5e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function a5e(e,t,n){const r=o5e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return i5e[r]}function v$(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function s5e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const l5e=e5e,u5e=r5e,c5e=["Enter"," "],d5e=["ArrowDown","PageUp","Home"],y$=["ArrowUp","PageDown","End"],f5e=[...d5e,...y$],vx="Menu",[h8,h5e,p5e]=XB(vx),[th,x$]=Iv(vx,[p5e,d$,m$]),n_=d$(),b$=m$(),[g5e,yx]=th(vx),[m5e,r_]=th(vx),v5e=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=n_(t),[l,c]=C.exports.useState(null),p=C.exports.useRef(!1),g=Cl(o),m=QB(i);return C.exports.useEffect(()=>{const y=()=>{p.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>p.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(W4e,s,C.exports.createElement(g5e,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:c},C.exports.createElement(m5e,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:p,dir:m,modal:a},r)))},y5e=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=n_(n);return C.exports.createElement(V4e,En({},i,r,{ref:t}))}),x5e="MenuPortal",[FCe,b5e]=th(x5e,{forceMount:void 0}),Uc="MenuContent",[S5e,S$]=th(Uc),w5e=C.exports.forwardRef((e,t)=>{const n=b5e(Uc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=yx(Uc,e.__scopeMenu),a=r_(Uc,e.__scopeMenu);return C.exports.createElement(h8.Provider,{scope:e.__scopeMenu},C.exports.createElement(p$,{present:r||o.open},C.exports.createElement(h8.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(C5e,En({},i,{ref:t})):C.exports.createElement(_5e,En({},i,{ref:t})))))}),C5e=C.exports.forwardRef((e,t)=>{const n=yx(Uc,e.__scopeMenu),r=C.exports.useRef(null),i=$a(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return dz(o)},[]),C.exports.createElement(w$,En({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Gn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),_5e=C.exports.forwardRef((e,t)=>{const n=yx(Uc,e.__scopeMenu);return C.exports.createElement(w$,En({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),w$=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:y,...b}=e,S=yx(Uc,n),T=r_(Uc,n),E=n_(n),k=b$(n),L=h5e(n),[I,O]=C.exports.useState(null),D=C.exports.useRef(null),N=$a(t,D,S.onContentChange),z=C.exports.useRef(0),W=C.exports.useRef(""),V=C.exports.useRef(0),q=C.exports.useRef(null),he=C.exports.useRef("right"),de=C.exports.useRef(0),ve=y?Xz:C.exports.Fragment,Ee=y?{as:rv,allowPinchZoom:!0}:void 0,xe=U=>{var ee,ae;const X=W.current+U,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(ee=me.find(qe=>qe.ref.current===ye))===null||ee===void 0?void 0:ee.textValue,He=me.map(qe=>qe.textValue),je=R5e(He,X,Se),ut=(ae=me.find(qe=>qe.textValue===je))===null||ae===void 0?void 0:ae.ref.current;(function qe(ot){W.current=ot,window.clearTimeout(z.current),ot!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ut&&setTimeout(()=>ut.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),$3e();const Z=C.exports.useCallback(U=>{var ee,ae;return he.current===((ee=q.current)===null||ee===void 0?void 0:ee.side)&&N5e(U,(ae=q.current)===null||ae===void 0?void 0:ae.area)},[]);return C.exports.createElement(S5e,{scope:n,searchRef:W,onItemEnter:C.exports.useCallback(U=>{Z(U)&&U.preventDefault()},[Z]),onItemLeave:C.exports.useCallback(U=>{var ee;Z(U)||((ee=D.current)===null||ee===void 0||ee.focus(),O(null))},[Z]),onTriggerLeave:C.exports.useCallback(U=>{Z(U)&&U.preventDefault()},[Z]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(U=>{q.current=U},[])},C.exports.createElement(ve,Ee,C.exports.createElement(H3e,{asChild:!0,trapped:i,onMountAutoFocus:Gn(o,U=>{var ee;U.preventDefault(),(ee=D.current)===null||ee===void 0||ee.focus()}),onUnmountAutoFocus:a},C.exports.createElement(z3e,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:g,onDismiss:m},C.exports.createElement(l5e,En({asChild:!0},k,{dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:U=>{T.isUsingKeyboardRef.current||U.preventDefault()}}),C.exports.createElement(U4e,En({role:"menu","aria-orientation":"vertical","data-state":A5e(S.open),"data-radix-menu-content":"",dir:T.dir},E,b,{ref:N,style:{outline:"none",...b.style},onKeyDown:Gn(b.onKeyDown,U=>{const ae=U.target.closest("[data-radix-menu-content]")===U.currentTarget,X=U.ctrlKey||U.altKey||U.metaKey,me=U.key.length===1;ae&&(U.key==="Tab"&&U.preventDefault(),!X&&me&&xe(U.key));const ye=D.current;if(U.target!==ye||!f5e.includes(U.key))return;U.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);y$.includes(U.key)&&He.reverse(),I5e(He)}),onBlur:Gn(e.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(z.current),W.current="")}),onPointerMove:Gn(e.onPointerMove,g8(U=>{const ee=U.target,ae=de.current!==U.clientX;if(U.currentTarget.contains(ee)&&ae){const X=U.clientX>de.current?"right":"left";he.current=X,de.current=U.clientX}}))})))))))}),p8="MenuItem",bA="menu.itemSelect",k5e=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=r_(p8,e.__scopeMenu),s=S$(p8,e.__scopeMenu),l=$a(t,o),c=C.exports.useRef(!1),p=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(bA,{bubbles:!0,cancelable:!0});g.addEventListener(bA,y=>r?.(y),{once:!0}),YB(g,m),m.defaultPrevented?c.current=!1:a.onClose()}};return C.exports.createElement(E5e,En({},i,{ref:l,disabled:n,onClick:Gn(e.onClick,p),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),c.current=!0},onPointerUp:Gn(e.onPointerUp,g=>{var m;c.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Gn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||c5e.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),E5e=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=S$(p8,n),s=b$(n),l=C.exports.useRef(null),c=$a(t,l),[p,g]=C.exports.useState(!1),[m,y]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var S;y(((S=b.textContent)!==null&&S!==void 0?S:"").trim())}},[o.children]),C.exports.createElement(h8.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(u5e,En({asChild:!0},s,{focusable:!r}),C.exports.createElement(yu.div,En({role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:c,onPointerMove:Gn(e.onPointerMove,g8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Gn(e.onPointerLeave,g8(b=>a.onItemLeave(b))),onFocus:Gn(e.onFocus,()=>g(!0)),onBlur:Gn(e.onBlur,()=>g(!1))}))))}),P5e="MenuRadioGroup";th(P5e,{value:void 0,onValueChange:()=>{}});const T5e="MenuItemIndicator";th(T5e,{checked:!1});const L5e="MenuSub";th(L5e);function A5e(e){return e?"open":"closed"}function I5e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function M5e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function R5e(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=M5e(e,Math.max(o,0));i.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function O5e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=p>r&&n<(c-s)*(r-l)/(p-l)+s&&(i=!i)}return i}function N5e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return O5e(n,t)}function g8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const D5e=v5e,z5e=y5e,F5e=w5e,B5e=k5e,C$="ContextMenu",[$5e,BCe]=Iv(C$,[x$]),xx=x$(),[H5e,_$]=$5e(C$),W5e=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=xx(t),c=Cl(r),p=C.exports.useCallback(g=>{s(g),c(g)},[c]);return C.exports.createElement(H5e,{scope:t,open:a,onOpenChange:p,modal:o},C.exports.createElement(D5e,En({},l,{dir:i,open:a,onOpenChange:p,modal:o}),n))},V5e="ContextMenuTrigger",U5e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=_$(V5e,n),o=xx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),c=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),p=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>c,[c]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(z5e,En({},o,{virtualRef:s})),C.exports.createElement(yu.span,En({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Gn(e.onContextMenu,g=>{c(),p(g),g.preventDefault()}),onPointerDown:Gn(e.onPointerDown,vy(g=>{c(),l.current=window.setTimeout(()=>p(g),700)})),onPointerMove:Gn(e.onPointerMove,vy(c)),onPointerCancel:Gn(e.onPointerCancel,vy(c)),onPointerUp:Gn(e.onPointerUp,vy(c))})))}),G5e="ContextMenuContent",j5e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=_$(G5e,n),o=xx(n),a=C.exports.useRef(!1);return C.exports.createElement(F5e,En({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),q5e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=xx(n);return C.exports.createElement(B5e,En({},i,r,{ref:t}))});function vy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const K5e=W5e,Z5e=U5e,Y5e=j5e,rf=q5e,X5e=St([e=>e.gallery,e=>e.options,Cr],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:c,galleryImageObjectFit:p,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:y}=e;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:c,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${c}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:y}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),Q5e=St([e=>e.options,e=>e.gallery,e=>e.system,Cr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r}),{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),J5e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,exe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o}=Me(Q5e),{image:a,isSelected:s}=e,{url:l,uuid:c,metadata:p}=a,[g,m]=C.exports.useState(!1),y=ld(),b=()=>m(!0),S=()=>m(!1),T=()=>{a.metadata&&t(Px(a.metadata.image.prompt)),y({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},E=()=>{a.metadata&&t(Ov(a.metadata.image.seed)),y({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},k=()=>{t(ov(a)),n!=="img2img"&&t(Ea("img2img")),y({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},L=()=>{t(A4(a)),n!=="inpainting"&&t(Ea("inpainting")),y({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},I=()=>{p&&t(W6e(p)),y({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},O=async()=>{if(p?.image?.init_image_path&&(await fetch(p.image.init_image_path)).ok){t(Ea("img2img")),t(V6e(p)),y({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}y({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(K5e,{children:[w(Z5e,{children:ne(id,{position:"relative",className:"hoverable-image",onMouseOver:b,onMouseOut:S,children:[w($5,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:l,loading:"lazy"}),w("div",{className:"hoverable-image-content",onClick:()=>t(VB(a)),children:s&&w(ha,{width:"50%",height:"50%",as:G2e,className:"hoverable-image-check"})}),g&&i>=64&&w("div",{className:"hoverable-image-delete-button",children:w($i,{label:"Delete image",hasArrow:!0,children:w(o8,{image:a,children:w(gu,{"aria-label":"Delete image",icon:w(dye,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},c)}),ne(Y5e,{className:"hoverable-image-context-menu",sticky:"always",children:[w(rf,{onClickCapture:T,disabled:a?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),w(rf,{onClickCapture:E,disabled:a?.metadata?.image?.seed===void 0,children:"Use Seed"}),w(rf,{onClickCapture:I,disabled:!["txt2img","img2img"].includes(a?.metadata?.image?.type),children:"Use All Parameters"}),w($i,{label:"Load initial image used for this generation",children:w(rf,{onClickCapture:O,disabled:a?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),w(rf,{onClickCapture:k,children:"Send to Image To Image"}),w(rf,{onClickCapture:L,children:"Send to Inpainting"}),w(o8,{image:a,children:w(rf,{"data-warning":!0,children:"Delete Image"})})]})]})},J5e),i_=e=>{const{label:t,styleClass:n,formControlProps:r,formLabelProps:i,sliderTrackProps:o,sliderInnerTrackProps:a,sliderThumbProps:s,sliderThumbTooltipProps:l,...c}=e;return w(rd,{className:`invokeai__slider-form-control ${n}`,...r,children:ne("div",{className:"invokeai__slider-inner-container",children:[w(Yf,{className:"invokeai__slider-form-label",whiteSpace:"nowrap",...i,children:t}),ne(g7,{className:"invokeai__slider-root","aria-label":t,...c,children:[w(wF,{className:"invokeai__slider-track",...o,children:w(CF,{className:"invokeai__slider-filled-track",...a})}),w($i,{className:"invokeai__slider-thumb-tooltip",placement:"top",hasArrow:!0,...l,children:w(SF,{className:"invokeai__slider-thumb",...s})})]})]})})};function k$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 19c.946 0 1.81-.103 2.598-.281l-1.757-1.757c-.273.021-.55.038-.841.038-5.351 0-7.424-3.846-7.926-5a8.642 8.642 0 0 1 1.508-2.297L4.184 8.305c-1.538 1.667-2.121 3.346-2.132 3.379a.994.994 0 0 0 0 .633C2.073 12.383 4.367 19 12 19zm0-14c-1.837 0-3.346.396-4.604.981L3.707 2.293 2.293 3.707l18 18 1.414-1.414-3.319-3.319c2.614-1.951 3.547-4.615 3.561-4.657a.994.994 0 0 0 0-.633C21.927 11.617 19.633 5 12 5zm4.972 10.558-2.28-2.28c.19-.39.308-.819.308-1.278 0-1.641-1.359-3-3-3-.459 0-.888.118-1.277.309L8.915 7.501A9.26 9.26 0 0 1 12 7c5.351 0 7.424 3.846 7.926 5-.302.692-1.166 2.342-2.954 3.558z"}}]})(e)}function E$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function P$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 9a3.02 3.02 0 0 0-3 3c0 1.642 1.358 3 3 3 1.641 0 3-1.358 3-3 0-1.641-1.359-3-3-3z"}},{tag:"path",attr:{d:"M12 5c-7.633 0-9.927 6.617-9.948 6.684L1.946 12l.105.316C2.073 12.383 4.367 19 12 19s9.927-6.617 9.948-6.684l.106-.316-.105-.316C21.927 11.617 19.633 5 12 5zm0 12c-5.351 0-7.424-3.846-7.926-5C4.578 10.842 6.652 7 12 7c5.351 0 7.424 3.846 7.926 5-.504 1.158-2.578 5-7.926 5z"}}]})(e)}const txe=320;function nxe(){const e=Xe(),t=ld(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:c,activeTabName:p,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,areMoreImagesAvailable:b,galleryWidth:S}=Me(X5e),[T,E]=C.exports.useState(300),[k,L]=C.exports.useState(590),[I,O]=C.exports.useState(S>=txe);C.exports.useEffect(()=>{!o||(p==="inpainting"?(e(dy(190)),E(190),L(190)):p==="img2img"?(e(dy(Math.min(Math.max(Number(S),0),490))),L(490)):(e(dy(Math.min(Math.max(Number(S),0),590))),L(590)),e(su(!0)))},[e,p,o,S]),C.exports.useEffect(()=>{o||L(window.innerWidth)},[o]);const D=C.exports.useRef(null),N=C.exports.useRef(null),z=C.exports.useRef(null),W=()=>{e(r3e(!o)),e(su(!0))},V=()=>{a?he():q()},q=()=>{e(f3(!0)),o&&e(su(!0))},he=()=>{e(f3(!1)),e(i3e(N.current?N.current.scrollTop:0)),e(a3e(!1))},de=()=>{e(r8(r))},ve=U=>{e(nf(U)),e(su(!0))},Ee=()=>{z.current=window.setTimeout(()=>he(),500)},xe=()=>{z.current&&window.clearTimeout(z.current)};_t("g",()=>{V()},[a]),_t("left",()=>{e(GB())}),_t("right",()=>{e(UB())}),_t("shift+g",()=>{W()},[o]),_t("esc",()=>{o||e(f3(!1))},[o]);const Z=32;return _t("shift+up",()=>{if(!(l>=256)&&l<256){const U=l+Z;U<=256?(e(nf(U)),t({title:`Gallery Thumbnail Size set to ${U}`,status:"success",duration:1e3,isClosable:!0})):(e(nf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),_t("shift+down",()=>{if(!(l<=32)&&l>32){const U=l-Z;U>32?(e(nf(U)),t({title:`Gallery Thumbnail Size set to ${U}`,status:"success",duration:1e3,isClosable:!0})):(e(nf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),_t("shift+r",()=>{e(nf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!N.current||(N.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{O(S>=280)},[S]),OB(D,he,!o),w(RB,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:w("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:Ee,onMouseEnter:o?void 0:xe,onMouseOver:o?void 0:xe,children:ne(KB,{minWidth:T,maxWidth:k,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:S,height:o?"100%":"100vh"},onResizeStop:(U,ee,ae,X)=>{e(dy(ht.clamp(Number(S)+X.width,0,Number(k)))),ae.removeAttribute("data-resize-alert")},onResize:(U,ee,ae,X)=>{const me=ht.clamp(Number(S)+X.width,0,Number(k));me>=280&&!I?O(!0):me<280&&I&&O(!1),me>=k?ae.setAttribute("data-resize-alert","true"):ae.removeAttribute("data-resize-alert")},children:[ne("div",{className:"image-gallery-header",children:[w("div",{children:w(au,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?ne(Fn,{children:[w(Oa,{"data-selected":r==="result",onClick:()=>e(cy("result")),children:"Invocations"}),w(Oa,{"data-selected":r==="user",onClick:()=>e(cy("user")),children:"User"})]}):ne(Fn,{children:[w(Ut,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:w(Y2e,{}),onClick:()=>e(cy("result"))}),w(Ut,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:w(gye,{}),onClick:()=>e(cy("user"))})]})})}),ne("div",{children:[w(Df,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:w(Ut,{size:"sm","aria-label":"Gallery Settings",icon:w(_B,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[w(i_,{value:l,onChange:ve,min:32,max:256,width:100,label:"Image Size",formLabelProps:{style:{fontSize:"0.9rem"}},sliderThumbTooltipProps:{label:`${l}px`}}),w(Ut,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(nf(64)),icon:w(E$,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),w("div",{children:w(nv,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(o3e(g==="contain"?"cover":"contain"))})}),w("div",{children:w(nv,{label:"Auto-Switch to New Images",isChecked:y,onChange:U=>e(s3e(U.target.checked))})})]})}),w(Ut,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:W,icon:o?w(LB,{}):w(AB,{})})]})]}),w("div",{className:"image-gallery-container",ref:N,children:n.length||b?ne(Fn,{children:[w("div",{className:"image-gallery",style:{gridTemplateColumns:c},children:n.map(U=>{const{uuid:ee}=U;return w(exe,{image:U,isSelected:i===ee},ee)})}),w(Oa,{onClick:de,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[w(bB,{}),w("p",{children:"No Images In Gallery"})]})})]})})})}const rxe=St([e=>e.options,Cr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,activeTabName:t}}),o_=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,activeTabName:a}=Me(rxe),s=()=>{t(U6e(!o))};return _t("shift+j",()=>{s()},{enabled:a==="inpainting"},[o]),w("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,a==="inpainting"&&w($i,{label:"Toggle Split View",children:w("div",{className:"workarea-split-button","data-selected":o,onClick:s,children:w(v3e,{})})})]}),w(nxe,{})]})})};function ixe(){return w(o_,{optionsPanel:w(Yye,{}),children:w(m3e,{})})}function oxe(){const e=Xe(),t=Me(r=>r.inpainting.shouldShowBoundingBoxFill);return w(nv,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(Wye(!t))},styleClass:"inpainting-bounding-box-darken"})}const axe=St(e=>e.inpainting,e=>{const{canvasDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{canvasDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function SA(e){const{dimension:t}=e,n=Xe(),{shouldLockBoundingBox:r,canvasDimensions:i,boundingBoxDimensions:o}=Me(axe),a=i[t],s=o[t],l=p=>{t=="width"&&n(Ig({...o,width:Math.floor(p)})),t=="height"&&n(Ig({...o,height:Math.floor(p)}))},c=()=>{t=="width"&&n(Ig({...o,width:Math.floor(a)})),t=="height"&&n(Ig({...o,height:Math.floor(a)}))};return ne("div",{className:"inpainting-bounding-box-dimensions-slider-numberinput",children:[w(i_,{isDisabled:r,label:"Box H",min:64,max:rl(a,64),step:64,value:s,onChange:l,width:"5rem"}),w(no,{isDisabled:r,value:s,onChange:l,min:64,max:rl(a,64),step:64,padding:"0",width:"5rem"}),w(Ut,{size:"sm","aria-label":"Reset Height",tooltip:"Reset Height",onClick:c,icon:w(E$,{}),styleClass:"inpainting-bounding-box-reset-icon-btn",isDisabled:r||a===s})]})}function sxe(){const e=Me(r=>r.inpainting.shouldLockBoundingBox),t=Xe();return w(nv,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(K7(!e))},styleClass:"inpainting-bounding-box-darken"})}function lxe(){const e=Me(r=>r.inpainting.shouldShowBoundingBox),t=Xe();return w(Ut,{"aria-label":"Toggle Bounding Box Visibility",icon:e?w(P$,{size:22}):w(k$,{size:22}),onClick:()=>t(FB(!e)),background:"none",padding:0})}const uxe=()=>ne("div",{className:"inpainting-bounding-box-settings",children:[ne("div",{className:"inpainting-bounding-box-header",children:[w("p",{children:"Inpaint Box"}),w(lxe,{})]}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[w(SA,{dimension:"width"}),w(SA,{dimension:"height"}),ne(Dn,{alignItems:"center",justifyContent:"space-between",children:[w(oxe,{}),w(sxe,{})]})]})]}),cxe=St(e=>e.inpainting,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function dxe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Me(cxe),n=Xe();return ne("div",{style:{display:"flex",alignItems:"center",padding:"0 1rem 0 0.2rem"},children:[w(no,{label:"Inpaint Replace",value:e,min:0,max:1,step:.05,width:"auto",formControlProps:{style:{paddingRight:"1rem"}},isInteger:!1,isDisabled:!t,onChange:r=>{n(Gye(r))}}),w(wl,{isChecked:t,onChange:r=>n(Uye(r.target.checked))})]})}const fxe=St(e=>e.inpainting,e=>{const{pastLines:t,futureLines:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function hxe(){const e=Xe(),t=ld(),{mayClearBrushHistory:n}=Me(fxe);return w(_c,{onClick:()=>{e(Vye()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function pxe(){return ne(Fn,{children:[w(dxe,{}),w(uxe,{}),w(hxe,{})]})}function gxe(){const e=Me(n=>n.options.showAdvancedOptions),t={seed:{header:w(D7,{}),feature:Ji.SEED,options:w(z7,{})},variations:{header:w(B7,{}),feature:Ji.VARIATIONS,options:w($7,{})},face_restore:{header:w(R7,{}),feature:Ji.FACE_CORRECTION,options:w(fx,{})},upscale:{header:w(F7,{}),feature:Ji.UPSCALE,options:w(hx,{})}};return ne(Z7,{children:[w(j7,{}),w(G7,{}),w(V7,{}),w(dB,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),w(pxe,{}),w(H7,{}),e?w(U7,{accordionInfo:t}):null]})}var mxe=Math.PI/180;function vxe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const i0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},et={_global:i0,version:"8.3.13",isBrowser:vxe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return et.angleDeg?e*mxe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return et.DD.isDragging},isDragReady(){return!!et.DD.node},document:i0.document,_injectGlobal(e){i0.Konva=e}},hr=e=>{et[e.prototype.getClassName()]=e};et._injectGlobal(et);class Qo{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Qo(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var c=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/c):-Math.acos(t/c),l.scaleX=c,l.scaleY=s/c,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var p=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/p):-Math.acos(r/p)),l.scaleX=s/p,l.scaleY=p,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=se._getRotation(l.rotation),l}}var yxe="[object Array]",xxe="[object Number]",bxe="[object String]",Sxe="[object Boolean]",wxe=Math.PI/180,Cxe=180/Math.PI,NS="#",_xe="",kxe="0",Exe="Konva warning: ",wA="Konva error: ",Pxe="rgb(",DS={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Txe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,yy=[];const Lxe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},se={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===yxe},_isNumber(e){return Object.prototype.toString.call(e)===xxe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===bxe},_isBoolean(e){return Object.prototype.toString.call(e)===Sxe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){yy.push(e),yy.length===1&&Lxe(function(){const t=yy;yy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=se.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(NS,_xe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=kxe+e;return NS+e},getRGB(e){var t;return e in DS?(t=DS[e],{r:t[0],g:t[1],b:t[2]}):e[0]===NS?this._hexToRgb(e.substring(1)):e.substr(0,4)===Pxe?(t=Txe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",se._namedColorToRBA(e)||se._hex3ColorToRGBA(e)||se._hex6ColorToRGBA(e)||se._rgbColorToRGBA(e)||se._rgbaColorToRGBA(e)||se._hslColorToRGBA(e)},_namedColorToRBA(e){var t=DS[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const c=2*o-a,p=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=c+(a-c)*6*s:2*s<1?l=a:3*s<2?l=c+(a-c)*(2/3-s)*6:l=c,p[g]=l*255;return{r:Math.round(p[0]),g:Math.round(p[1]),b:Math.round(p[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+p*(n-e),s=t+p*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=se.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=se._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),c=l[0],p=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(et.isUnminified)return function(e,t){return se._isNumber(e)||se.warn(cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function L$(e){if(et.isUnminified)return function(t,n){let r=se._isNumber(t),i=se._isArray(t)&&t.length==e;return!r&&!i&&se.warn(cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function a_(){if(et.isUnminified)return function(e,t){var n=se._isNumber(e),r=e==="auto";return n||r||se.warn(cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function W0(){if(et.isUnminified)return function(e,t){return se._isString(e)||se.warn(cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function A$(){if(et.isUnminified)return function(e,t){const n=se._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||se.warn(cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Axe(){if(et.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(se._isArray(e)?e.forEach(function(r){se._isNumber(r)||se.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):se.warn(cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function ws(){if(et.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||se.warn(cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Ixe(e){if(et.isUnminified)return function(t,n){return t==null||se.isObject(t)||se.warn(cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var fg="get",hg="set";const j={addGetterSetter(e,t,n,r,i){j.addGetter(e,t,n),j.addSetter(e,t,r,i),j.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=fg+se._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=hg+se._capitalize(t);e.prototype[i]||j.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=hg+se._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=se._capitalize,s=fg+a(t),l=hg+a(t),c,p;e.prototype[s]=function(){var m={};for(c=0;c{this._setAttr(t+a(S),void 0)}),this._fireChangeEvent(t,y,m),i&&i.call(this),this},j.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=se._capitalize(t),r=hg+n,i=fg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){se.error("Adding deprecated "+t);var i=fg+se._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){se.error(o);var a=this.attrs[t];return a===void 0?n:a},j.addSetter(e,t,r,function(){se.error(o)}),j.addOverloadedGetterSetter(e,t)},backCompat(e,t){se.each(t,function(n,r){var i=e.prototype[r],o=fg+se._capitalize(n),a=hg+se._capitalize(n);function s(){i.apply(this,arguments),se.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function Mxe(e){var t=[],n=e.length,r=se,i,o;for(i=0;itypeof p=="number"?Math.floor(p):p)),o+=Rxe+c.join(CA)+Oxe)):(o+=s.property,t||(o+=Bxe+s.val)),o+=zxe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Hxe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,c){var p=arguments,g=this._context;p.length===3?g.drawImage(t,n,r):p.length===5?g.drawImage(t,n,r,i,o):p.length===9&&g.drawImage(t,n,r,i,o,a,s,l,c)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=_A.length,r=this.setAttr,i,o,a=function(s){var l=t[s],c;t[s]=function(){return o=Mxe(Array.prototype.slice.call(arguments,0)),c=l.apply(t,arguments),t._trace({method:s,args:o}),c}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return sn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];sn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=se._getFirstPointerId(e));const a=o._changedPointerPositions.find(c=>c.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];sn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(sn.justDragged=!0,et._mouseListenClick=!1,et._touchListenClick=!1,et._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof et.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){sn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&sn._dragElements.delete(n)})}};et.isBrowser&&(window.addEventListener("mouseup",sn._endDragBefore,!0),window.addEventListener("touchend",sn._endDragBefore,!0),window.addEventListener("mousemove",sn._drag),window.addEventListener("touchmove",sn._drag),window.addEventListener("mouseup",sn._endDragAfter,!1),window.addEventListener("touchend",sn._endDragAfter,!1));var h3="absoluteOpacity",by="allEventListeners",Ql="absoluteTransform",kA="absoluteScale",pg="canvas",Gxe="Change",jxe="children",qxe="konva",m8="listening",EA="mouseenter",PA="mouseleave",TA="set",LA="Shape",p3=" ",AA="stage",bc="transform",Kxe="Stage",v8="visible",Zxe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(p3);let Yxe=1;class Fe{constructor(t){this._id=Yxe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===bc||t===Ql)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===bc||t===Ql,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(p3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(pg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Ql&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(pg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,c=n.offset||0,p=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){se.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=c*2+1,o+=c*2+1,s-=c,l-=c;var m=new o0({pixelRatio:a,width:i,height:o}),y=new o0({pixelRatio:a,width:0,height:0}),b=new s_({pixelRatio:g,width:i,height:o}),S=m.getContext(),T=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(pg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,y.getContext()._context.imageSmoothingEnabled=!1),S.save(),T.save(),S.translate(-s,-l),T.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(h3),this._clearSelfAndDescendantCache(kA),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,S.restore(),T.restore(),p&&(S.save(),S.beginPath(),S.rect(0,0,i,o),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(pg,{scene:m,filter:y,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(pg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(c){var p=l.point(c);i===void 0&&(i=a=p.x,o=s=p.y),i=Math.min(i,p.x),o=Math.min(o,p.y),a=Math.max(a,p.x),s=Math.max(s,p.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,c;if(t){if(!this._filterUpToDate){var p=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/p,r.getHeight()/p),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==jxe&&(r=TA+se._capitalize(n),se._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(m8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(v8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;sn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!et.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(c){for(i=[],o=c.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==Kxe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(bc),this._clearSelfAndDescendantCache(Ql)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new Qo,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(bc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(bc),this._clearSelfAndDescendantCache(Ql),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return se.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return se.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&se.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(h3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=se.isObject(i)&&!se._isPlainObject(i)&&!se._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),se._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,se._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():et.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;sn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=sn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&sn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return se.haveIntersection(r,this.getClientRect())}static create(t,n){return se._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),et[r]||(se.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=et[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Fe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var c=this.getAbsoluteTransform(n).getMatrix();o.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),c=a&&s||l;const p=r===this;if(c){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var y=this.clipX(),b=this.clipY();o.rect(y,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var S=!p&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";S&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(T){T[t](n,r)}),S&&o.restore(),c&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,c={x:1/0,y:1/0,width:0,height:0},p=this;(n=this.children)===null||n===void 0||n.forEach(function(S){if(!!S.visible()){var T=S.getClientRect({relativeTo:p,skipShadow:t.skipShadow,skipStroke:t.skipStroke});T.width===0&&T.height===0||(o===void 0?(o=T.x,a=T.y,s=T.x+T.width,l=T.y+T.height):(o=Math.min(o,T.x),a=Math.min(a,T.y),s=Math.max(s,T.x+T.width),l=Math.max(l,T.y+T.height)))}});for(var g=this.find("Shape"),m=!1,y=0;ye.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",mp=e=>{const t=Ng(e);if(t==="pointer")return et.pointerEventsEnabled&&FS.pointer;if(t==="touch")return FS.touch;if(t==="mouse")return FS.mouse};function MA(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&se.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const rbe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",g3=[];class wx extends ia{constructor(t){super(MA(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),g3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{MA(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||se.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===Qxe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&g3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(se.warn(rbe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new o0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+IA,this.content.style.height=n+IA),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rtbe&&se.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),et.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return M$(t,this)}setPointerCapture(t){R$(t,this)}releaseCapture(t){cm(t)}getLayers(){return this.children}_bindContentEvents(){!et.isBrowser||nbe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=mp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=mp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=mp(t.type),r=Ng(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!sn.isDragging||et.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=mp(t.type),r=Ng(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(sn.justDragged=!1,et["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;et.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=mp(t.type),r=Ng(t.type);if(!n)return;sn.isDragging&&sn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!sn.isDragging||et.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const c=zS(l.id)||this.getIntersection(l),p=l.id,g={evt:t,pointerId:p};var m=s!==c;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),c),s._fireAndBubble(n.pointerleave,Object.assign({},g),c)),c){if(o[c._id])return;o[c._id]=!0}c&&c.isListening()?(a=!0,m&&(c._fireAndBubble(n.pointerover,Object.assign({},g),s),c._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=c),c._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:p}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=mp(t.type),r=Ng(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const c=zS(l.id)||this.getIntersection(l);if(c){if(c.releaseCapture(l.id),a[c._id])return;a[c._id]=!0}const p=l.id,g={evt:t,pointerId:p};let m=!1;et["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):sn.justDragged||(et["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){et["_"+r+"InDblClickWindow"]=!1},et.dblClickWindow),c&&c.isListening()?(s=!0,this[r+"ClickEndShape"]=c,c._fireAndBubble(n.pointerup,Object.assign({},g)),et["_"+r+"ListenClick"]&&i&&i===c&&(c._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===c&&c._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,et["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:p}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:p}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),et["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(y8,{evt:t}):this._fire(y8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(x8,{evt:t}):this._fire(x8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=zS(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Np,l_(t)),cm(t.pointerId)}_lostpointercapture(t){cm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:se._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:se._getFirstPointerId(t)}])}_setPointerPosition(t){se.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s_({pixelRatio:1,width:this.width(),height:this.height()}),!!et.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return se.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}wx.prototype.nodeType=Xxe;hr(wx);j.addGetterSetter(wx,"container");var U$="hasShadow",G$="shadowRGBA",j$="patternImage",q$="linearGradient",K$="radialGradient";let ky;function BS(){return ky||(ky=se.createCanvasElement().getContext("2d"),ky)}const dm={};function ibe(e){e.fill()}function obe(e){e.stroke()}function abe(e){e.fill()}function sbe(e){e.stroke()}function lbe(){this._clearCache(U$)}function ube(){this._clearCache(G$)}function cbe(){this._clearCache(j$)}function dbe(){this._clearCache(q$)}function fbe(){this._clearCache(K$)}class Ae extends Fe{constructor(t){super(t);let n;for(;n=se.getRandomColor(),!(n&&!(n in dm)););this.colorKey=n,dm[n]=this}getContext(){return se.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return se.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(U$,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(j$,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=BS();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Qo;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(et.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(q$,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=BS(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete dm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){se.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,c=!t.skipShadow&&this.hasShadow(),p=c?this.shadowOffsetX():0,g=c?this.shadowOffsetY():0,m=s+Math.abs(p),y=l+Math.abs(g),b=c&&this.shadowBlur()||0,S=m+b*2,T=y+b*2,E={width:S,height:T,x:-(a/2+b)+Math.min(p,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),c,p,g,m=i.isCache,y=n===this;if(!this.isVisible()&&!y)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){c=this.getStage(),p=c.bufferCanvas,g=p.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var S=this.getAbsoluteTransform(n).getMatrix();g.transform(S[0],S[1],S[2],S[3],S[4],S[5]),s.call(this,g,this),g.restore();var T=p.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(p._canvas,0,0,p.width/T,p.height/T)}else{if(o._applyLineJoin(this),!y){var S=this.getAbsoluteTransform(n).getMatrix();o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),c=l&&l.hit;if(this.colorKey||se.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),c){a.save();var p=this.getAbsoluteTransform(n).getMatrix();return a.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,c,p,g,m,y;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),c=l.data,p=c.length,g=se._hexToRgb(this.colorKey),m=0;mt?(c[m]=g.r,c[m+1]=g.g,c[m+2]=g.b,c[m+3]=255):c[m+3]=0;o.putImageData(l,0,0)}catch(b){se.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return M$(t,this)}setPointerCapture(t){R$(t,this)}releaseCapture(t){cm(t)}}Ae.prototype._fillFunc=ibe;Ae.prototype._strokeFunc=obe;Ae.prototype._fillFuncHit=abe;Ae.prototype._strokeFuncHit=sbe;Ae.prototype._centroid=!1;Ae.prototype.nodeType="Shape";hr(Ae);Ae.prototype.eventListeners={};Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",lbe);Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",ube);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",cbe);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",dbe);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",fbe);j.addGetterSetter(Ae,"stroke",void 0,A$());j.addGetterSetter(Ae,"strokeWidth",2,ze());j.addGetterSetter(Ae,"fillAfterStrokeEnabled",!1);j.addGetterSetter(Ae,"hitStrokeWidth","auto",a_());j.addGetterSetter(Ae,"strokeHitEnabled",!0,ws());j.addGetterSetter(Ae,"perfectDrawEnabled",!0,ws());j.addGetterSetter(Ae,"shadowForStrokeEnabled",!0,ws());j.addGetterSetter(Ae,"lineJoin");j.addGetterSetter(Ae,"lineCap");j.addGetterSetter(Ae,"sceneFunc");j.addGetterSetter(Ae,"hitFunc");j.addGetterSetter(Ae,"dash");j.addGetterSetter(Ae,"dashOffset",0,ze());j.addGetterSetter(Ae,"shadowColor",void 0,W0());j.addGetterSetter(Ae,"shadowBlur",0,ze());j.addGetterSetter(Ae,"shadowOpacity",1,ze());j.addComponentsGetterSetter(Ae,"shadowOffset",["x","y"]);j.addGetterSetter(Ae,"shadowOffsetX",0,ze());j.addGetterSetter(Ae,"shadowOffsetY",0,ze());j.addGetterSetter(Ae,"fillPatternImage");j.addGetterSetter(Ae,"fill",void 0,A$());j.addGetterSetter(Ae,"fillPatternX",0,ze());j.addGetterSetter(Ae,"fillPatternY",0,ze());j.addGetterSetter(Ae,"fillLinearGradientColorStops");j.addGetterSetter(Ae,"strokeLinearGradientColorStops");j.addGetterSetter(Ae,"fillRadialGradientStartRadius",0);j.addGetterSetter(Ae,"fillRadialGradientEndRadius",0);j.addGetterSetter(Ae,"fillRadialGradientColorStops");j.addGetterSetter(Ae,"fillPatternRepeat","repeat");j.addGetterSetter(Ae,"fillEnabled",!0);j.addGetterSetter(Ae,"strokeEnabled",!0);j.addGetterSetter(Ae,"shadowEnabled",!0);j.addGetterSetter(Ae,"dashEnabled",!0);j.addGetterSetter(Ae,"strokeScaleEnabled",!0);j.addGetterSetter(Ae,"fillPriority","color");j.addComponentsGetterSetter(Ae,"fillPatternOffset",["x","y"]);j.addGetterSetter(Ae,"fillPatternOffsetX",0,ze());j.addGetterSetter(Ae,"fillPatternOffsetY",0,ze());j.addComponentsGetterSetter(Ae,"fillPatternScale",["x","y"]);j.addGetterSetter(Ae,"fillPatternScaleX",1,ze());j.addGetterSetter(Ae,"fillPatternScaleY",1,ze());j.addComponentsGetterSetter(Ae,"fillLinearGradientStartPoint",["x","y"]);j.addComponentsGetterSetter(Ae,"strokeLinearGradientStartPoint",["x","y"]);j.addGetterSetter(Ae,"fillLinearGradientStartPointX",0);j.addGetterSetter(Ae,"strokeLinearGradientStartPointX",0);j.addGetterSetter(Ae,"fillLinearGradientStartPointY",0);j.addGetterSetter(Ae,"strokeLinearGradientStartPointY",0);j.addComponentsGetterSetter(Ae,"fillLinearGradientEndPoint",["x","y"]);j.addComponentsGetterSetter(Ae,"strokeLinearGradientEndPoint",["x","y"]);j.addGetterSetter(Ae,"fillLinearGradientEndPointX",0);j.addGetterSetter(Ae,"strokeLinearGradientEndPointX",0);j.addGetterSetter(Ae,"fillLinearGradientEndPointY",0);j.addGetterSetter(Ae,"strokeLinearGradientEndPointY",0);j.addComponentsGetterSetter(Ae,"fillRadialGradientStartPoint",["x","y"]);j.addGetterSetter(Ae,"fillRadialGradientStartPointX",0);j.addGetterSetter(Ae,"fillRadialGradientStartPointY",0);j.addComponentsGetterSetter(Ae,"fillRadialGradientEndPoint",["x","y"]);j.addGetterSetter(Ae,"fillRadialGradientEndPointX",0);j.addGetterSetter(Ae,"fillRadialGradientEndPointY",0);j.addGetterSetter(Ae,"fillPatternRotation",0);j.backCompat(Ae,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var hbe="#",pbe="beforeDraw",gbe="draw",Z$=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],mbe=Z$.length;class nh extends ia{constructor(t){super(t),this.canvas=new o0,this.hitCanvas=new s_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(pbe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ia.prototype.drawScene.call(this,i,n),this._fire(gbe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ia.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){se.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return se.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}nh.prototype.nodeType="Layer";hr(nh);j.addGetterSetter(nh,"imageSmoothingEnabled",!0);j.addGetterSetter(nh,"clearBeforeDraw",!0);j.addGetterSetter(nh,"hitGraphEnabled",!0,ws());class u_ extends nh{constructor(t){super(t),this.listening(!1),se.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}u_.prototype.nodeType="FastLayer";hr(u_);class _0 extends ia{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&se.throw("You may only add groups and shapes to groups.")}}_0.prototype.nodeType="Group";hr(_0);var $S=function(){return i0.performance&&i0.performance.now?function(){return i0.performance.now()}:function(){return new Date().getTime()}}();class Aa{constructor(t,n){this.id=Aa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:$S(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=RA,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=OA,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===RA?this.setTime(t):this.state===OA&&this.setTime(this.duration-t)}pause(){this.state=ybe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||fm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=xbe++;var c=r.getLayer()||(r instanceof et.Stage?r.getLayers():null);c||se.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Aa(function(){n.tween.onEnterFrame()},c),this.tween=new bbe(l,function(p){n._tweenFunc(p)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)vbe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,c,p,g,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),se._isArray(n))if(a=[],c=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=se._prepareArrayForTween(o,n,r.closed())):(p=n,n=se._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const fm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),p=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:c,y:r?-1*m:g,width:p-c,height:m-g}}}ku.prototype._centroid=!0;ku.prototype.className="Arc";ku.prototype._attrsAffectingSize=["innerRadius","outerRadius"];hr(ku);j.addGetterSetter(ku,"innerRadius",0,ze());j.addGetterSetter(ku,"outerRadius",0,ze());j.addGetterSetter(ku,"angle",0,ze());j.addGetterSetter(ku,"clockwise",!1,ws());function b8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),c=a*s/(s+l),p=a*l/(s+l),g=n-c*(i-e),m=r-c*(o-t),y=n+p*(i-e),b=r+p*(o-t);return[g,m,y,b]}function DA(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,c=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);cp?c:p,T=c>p?1:c/p,E=c>p?p/c:1;t.translate(s,l),t.rotate(y),t.scale(T,E),t.arc(0,0,S,g,g+m,1-b),t.scale(1/T,1/E),t.rotate(-y),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(c){if(c.command==="A"){var p=c.points[4],g=c.points[5],m=c.points[4]+g,y=Math.PI/180;if(Math.abs(p-m)m;b-=y){const S=In.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],b,0);t.push(S.x,S.y)}else for(let b=p+y;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],c=a[2],p=a[3],g=a[4],m=a[5],y=a[6];return g+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,c,p,g,y)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),c=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=c,D,N,z,W,V,q,he,de,ve,Ee;switch(y){case"l":l+=b.shift(),c+=b.shift(),k="L",L.push(l,c);break;case"L":l=b.shift(),c=b.shift(),L.push(l,c);break;case"m":var xe=b.shift(),Z=b.shift();if(l+=xe,c+=Z,k="M",a.length>2&&a[a.length-1].command==="z"){for(var U=a.length-2;U>=0;U--)if(a[U].command==="M"){l=a[U].points[0]+xe,c=a[U].points[1]+Z;break}}L.push(l,c),y="l";break;case"M":l=b.shift(),c=b.shift(),k="M",L.push(l,c),y="L";break;case"h":l+=b.shift(),k="L",L.push(l,c);break;case"H":l=b.shift(),k="L",L.push(l,c);break;case"v":c+=b.shift(),k="L",L.push(l,c);break;case"V":c=b.shift(),k="L",L.push(l,c);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),c=b.shift(),L.push(l,c);break;case"c":L.push(l+b.shift(),c+b.shift(),l+b.shift(),c+b.shift()),l+=b.shift(),c+=b.shift(),k="C",L.push(l,c);break;case"S":N=l,z=c,D=a[a.length-1],D.command==="C"&&(N=l+(l-D.points[2]),z=c+(c-D.points[3])),L.push(N,z,b.shift(),b.shift()),l=b.shift(),c=b.shift(),k="C",L.push(l,c);break;case"s":N=l,z=c,D=a[a.length-1],D.command==="C"&&(N=l+(l-D.points[2]),z=c+(c-D.points[3])),L.push(N,z,l+b.shift(),c+b.shift()),l+=b.shift(),c+=b.shift(),k="C",L.push(l,c);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),c=b.shift(),L.push(l,c);break;case"q":L.push(l+b.shift(),c+b.shift()),l+=b.shift(),c+=b.shift(),k="Q",L.push(l,c);break;case"T":N=l,z=c,D=a[a.length-1],D.command==="Q"&&(N=l+(l-D.points[0]),z=c+(c-D.points[1])),l=b.shift(),c=b.shift(),k="Q",L.push(N,z,l,c);break;case"t":N=l,z=c,D=a[a.length-1],D.command==="Q"&&(N=l+(l-D.points[0]),z=c+(c-D.points[1])),l+=b.shift(),c+=b.shift(),k="Q",L.push(N,z,l,c);break;case"A":W=b.shift(),V=b.shift(),q=b.shift(),he=b.shift(),de=b.shift(),ve=l,Ee=c,l=b.shift(),c=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(ve,Ee,l,c,he,de,W,V,q);break;case"a":W=b.shift(),V=b.shift(),q=b.shift(),he=b.shift(),de=b.shift(),ve=l,Ee=c,l+=b.shift(),c+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(ve,Ee,l,c,he,de,W,V,q);break}a.push({command:k||y,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||y,L)})}(y==="z"||y==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,c=In;switch(r){case"L":return c.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=c.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=c.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=c.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=c.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=c.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=c.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var p=i[4],g=i[5],m=i[4]+g,y=Math.PI/180;if(Math.abs(p-m)m;l-=y)s=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=c.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=p+y;l1&&(s*=Math.sqrt(y),l*=Math.sqrt(y));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var S=b*s*m/l,T=b*-l*g/s,E=(t+r)/2+Math.cos(p)*S-Math.sin(p)*T,k=(n+i)/2+Math.sin(p)*S+Math.cos(p)*T,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,q){return(V[0]*q[0]+V[1]*q[1])/(L(V)*L(q))},O=function(V,q){return(V[0]*q[1]=1&&(W=0),a===0&&W>0&&(W=W-2*Math.PI),a===1&&W<0&&(W=W+2*Math.PI),[E,k,s,l,D,W,p,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];hr(In);j.addGetterSetter(In,"data");class rh extends Eu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,c;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],y=In.calcLength(i[i.length-4],i[i.length-3],"C",m),b=In.getPointOnQuadraticBezier(Math.min(1,1-a/y),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,c=r[s-1]-b.y}else l=r[s-2]-r[s-4],c=r[s-1]-r[s-3];var p=(Math.atan2(c,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(p),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],c=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],c=r[3]-r[1]),t.rotate((Math.atan2(-c,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}rh.prototype.className="Arrow";hr(rh);j.addGetterSetter(rh,"pointerLength",10,ze());j.addGetterSetter(rh,"pointerWidth",10,ze());j.addGetterSetter(rh,"pointerAtBeginning",!1);j.addGetterSetter(rh,"pointerAtEnding",!0);class V0 extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}V0.prototype._centroid=!0;V0.prototype.className="Circle";V0.prototype._attrsAffectingSize=["radius"];hr(V0);j.addGetterSetter(V0,"radius",0,ze());class dd extends Ae{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}dd.prototype.className="Ellipse";dd.prototype._centroid=!0;dd.prototype._attrsAffectingSize=["radiusX","radiusY"];hr(dd);j.addComponentsGetterSetter(dd,"radius",["x","y"]);j.addGetterSetter(dd,"radiusX",0,ze());j.addGetterSetter(dd,"radiusY",0,ze());class Cs extends Ae{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=se.createImageElement();i.onload=function(){var o=new Cs({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Cs.prototype.className="Image";hr(Cs);j.addGetterSetter(Cs,"image");j.addComponentsGetterSetter(Cs,"crop",["x","y","width","height"]);j.addGetterSetter(Cs,"cropX",0,ze());j.addGetterSetter(Cs,"cropY",0,ze());j.addGetterSetter(Cs,"cropWidth",0,ze());j.addGetterSetter(Cs,"cropHeight",0,ze());var Y$=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Sbe="Change.konva",wbe="none",S8="up",w8="right",C8="down",_8="left",Cbe=Y$.length;class c_ extends _0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}oh.prototype.className="RegularPolygon";oh.prototype._centroid=!0;oh.prototype._attrsAffectingSize=["radius"];hr(oh);j.addGetterSetter(oh,"radius",0,ze());j.addGetterSetter(oh,"sides",0,ze());var zA=Math.PI*2;class ah extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,zA,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),zA,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}ah.prototype.className="Ring";ah.prototype._centroid=!0;ah.prototype._attrsAffectingSize=["innerRadius","outerRadius"];hr(ah);j.addGetterSetter(ah,"innerRadius",0,ze());j.addGetterSetter(ah,"outerRadius",0,ze());class Tl extends Ae{constructor(t){super(t),this._updated=!0,this.anim=new Aa(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],c=o[i+2],p=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,p),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],y=r*2;t.drawImage(g,s,l,c,p,m[y+0],m[y+1],c,p)}else t.drawImage(g,s,l,c,p,0,0,c,p)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var c=a[n],p=r*2;t.rect(c[p+0],c[p+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Py;function WS(){return Py||(Py=se.createCanvasElement().getContext(Ebe),Py)}function zbe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Fbe(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Bbe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class fr extends Ae{constructor(t){super(Bbe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=se._isString(t)?t:t==null?"":t+"";return this._setAttr(Pbe,n),this}getWidth(){var t=this.attrs.width===vp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===vp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return se.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=WS(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Ey+this.fontVariant()+Ey+(this.fontSize()+Ibe)+Dbe(this.fontFamily())}_addTextLine(t){this.align()===gg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return WS().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==vp&&o!==void 0,l=a!==vp&&a!==void 0,c=this.padding(),p=o-c*2,g=a-c*2,m=0,y=this.wrap(),b=y!==$A,S=y!==Obe&&b,T=this.ellipsis();this.textArr=[],WS().font=this._getContextFont();for(var E=T?this._getTextWidth(HS):0,k=0,L=t.length;kp)for(;I.length>0;){for(var D=0,N=I.length,z="",W=0;D>>1,q=I.slice(0,V+1),he=this._getTextWidth(q)+E;he<=p?(D=V+1,z=q,W=he):N=V}if(z){if(S){var de,ve=I[z.length],Ee=ve===Ey||ve===FA;Ee&&W<=p?de=z.length:de=Math.max(z.lastIndexOf(Ey),z.lastIndexOf(FA))+1,de>0&&(D=de,z=z.slice(0,D),W=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,W),m+=i;var xe=this._shouldHandleEllipsis(m);if(xe){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(D),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=p)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==vp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),c=l!==$A;return!c||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==vp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+HS)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var c=0;i==="center"&&(c=Math.max(0,s/2-a/2)),i==="right"&&(c=Math.max(0,s-a));for(var p=X$(this.text()),g=this.text().split(" ").length-1,m,y,b,S=-1,T=0,E=function(){T=0;for(var he=t.dataArray,de=S+1;de0)return S=de,he[de];he[de].command==="M"&&(m={x:he[de].points[0],y:he[de].points[1]})}return{}},k=function(he){var de=t._getTextSize(he).width+r;he===" "&&i==="justify"&&(de+=(s-a)/g);var ve=0,Ee=0;for(y=void 0;Math.abs(de-ve)/de>.01&&Ee<20;){Ee++;for(var xe=ve;b===void 0;)b=E(),b&&xe+b.pathLengthde?y=In.getPointOnLine(de,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var U=b.points[4],ee=b.points[5],ae=b.points[4]+ee;T===0?T=U+1e-8:de>ve?T+=Math.PI/180*ee/Math.abs(ee):T-=Math.PI/360*ee/Math.abs(ee),(ee<0&&T=0&&T>ae)&&(T=ae,Z=!0),y=In.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],T,b.points[6]);break;case"C":T===0?de>b.pathLength?T=1e-8:T=de/b.pathLength:de>ve?T+=(de-ve)/b.pathLength/2:T=Math.max(T-(ve-de)/b.pathLength/2,0),T>1&&(T=1,Z=!0),y=In.getPointOnCubicBezier(T,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":T===0?T=de/b.pathLength:de>ve?T+=(de-ve)/b.pathLength:T-=(ve-de)/b.pathLength,T>1&&(T=1,Z=!0),y=In.getPointOnQuadraticBezier(T,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}y!==void 0&&(ve=In.getLineLength(m.x,m.y,y.x,y.y)),Z&&(Z=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=c/I-1,D=0;De+`.${iH}`).join(" "),HA="nodesRect",Wbe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],Vbe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const Ube="ontouchstart"in et._global;function Gbe(e,t){if(e==="rotater")return"crosshair";t+=se.degToRad(Vbe[e]||0);var n=(se.radToDeg(t)%360+360)%360;return se._inRange(n,315+22.5,360)||se._inRange(n,0,22.5)?"ns-resize":se._inRange(n,45-22.5,45+22.5)?"nesw-resize":se._inRange(n,90-22.5,90+22.5)?"ew-resize":se._inRange(n,135-22.5,135+22.5)?"nwse-resize":se._inRange(n,180-22.5,180+22.5)?"ns-resize":se._inRange(n,225-22.5,225+22.5)?"nesw-resize":se._inRange(n,270-22.5,270+22.5)?"ew-resize":se._inRange(n,315-22.5,315+22.5)?"nwse-resize":(se.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var z4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],WA=1e8;function jbe(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function oH(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function qbe(e,t){const n=jbe(e);return oH(e,t,n)}function Kbe(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(Wbe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(HA),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(HA,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const c=(et.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),p={x:a.x+s*Math.cos(c)+l*Math.sin(-c),y:a.y+l*Math.cos(c)+s*Math.sin(c),width:i.width*o.x,height:i.height*o.y,rotation:c};return oH(p,-et.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-WA,y:-WA,width:0,height:0,rotation:0};const n=[];this.nodes().map(c=>{const p=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:p.x,y:p.y},{x:p.x+p.width,y:p.y},{x:p.x+p.width,y:p.y+p.height},{x:p.x,y:p.y+p.height}],m=c.getAbsoluteTransform();g.forEach(function(y){var b=m.point(y);n.push(b)})});const r=new Qo;r.rotate(-et.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(c){var p=r.point(c);i===void 0&&(i=a=p.x,o=s=p.y),i=Math.min(i,p.x),o=Math.min(o,p.y),a=Math.max(a,p.x),s=Math.max(s,p.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:et.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),z4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Rv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:Ube?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=et.getAngle(this.rotation()),o=Gbe(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ae({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*se._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const c=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(c,l,t)),o.setAbsolutePosition(l);const p=o.getAbsolutePosition();if(!(c.x===p.x&&c.y===p.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let he=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(he-=Math.PI);var m=et.getAngle(this.rotation());const de=m+he,ve=et.getAngle(this.rotationSnapTolerance()),xe=Kbe(this.rotationSnaps(),de,ve)-g.rotation,Z=qbe(g,xe);this._fitNodesInto(Z,t);return}var y=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(y){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var S=this.findOne(".top-left").x()>b.x?-1:1,T=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*S,r=i*this.sin*T,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(y){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var S=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*S,r=i*this.sin*T,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(y){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var S=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(se._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(se._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new Qo;if(a.rotate(et.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:se.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new Qo;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const c=new Qo;c.translate(t.x,t.y),c.rotate(t.rotation),c.scale(t.width/s,t.height/s);const p=c.multiply(l.invert());this._nodes.forEach(g=>{var m;const y=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const S=new Qo;S.multiply(y.copy().invert()).multiply(p).multiply(y).multiply(b);const T=S.decompose();g.setAttrs(T),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(se._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(se._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(c=>{c.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*se._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),_0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function Zbe(e){return e instanceof Array||se.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){z4.indexOf(t)===-1&&se.warn("Unknown anchor name: "+t+". Available names are: "+z4.join(", "))}),e||[]}bn.prototype.className="Transformer";hr(bn);j.addGetterSetter(bn,"enabledAnchors",z4,Zbe);j.addGetterSetter(bn,"flipEnabled",!0,ws());j.addGetterSetter(bn,"resizeEnabled",!0);j.addGetterSetter(bn,"anchorSize",10,ze());j.addGetterSetter(bn,"rotateEnabled",!0);j.addGetterSetter(bn,"rotationSnaps",[]);j.addGetterSetter(bn,"rotateAnchorOffset",50,ze());j.addGetterSetter(bn,"rotationSnapTolerance",5,ze());j.addGetterSetter(bn,"borderEnabled",!0);j.addGetterSetter(bn,"anchorStroke","rgb(0, 161, 255)");j.addGetterSetter(bn,"anchorStrokeWidth",1,ze());j.addGetterSetter(bn,"anchorFill","white");j.addGetterSetter(bn,"anchorCornerRadius",0,ze());j.addGetterSetter(bn,"borderStroke","rgb(0, 161, 255)");j.addGetterSetter(bn,"borderStrokeWidth",1,ze());j.addGetterSetter(bn,"borderDash");j.addGetterSetter(bn,"keepRatio",!0);j.addGetterSetter(bn,"centeredScaling",!1);j.addGetterSetter(bn,"ignoreStroke",!1);j.addGetterSetter(bn,"padding",0,ze());j.addGetterSetter(bn,"node");j.addGetterSetter(bn,"nodes");j.addGetterSetter(bn,"boundBoxFunc");j.addGetterSetter(bn,"anchorDragBoundFunc");j.addGetterSetter(bn,"shouldOverdrawWholeArea",!1);j.addGetterSetter(bn,"useSingleNodeRotation",!0);j.backCompat(bn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Pu extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,et.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Pu.prototype.className="Wedge";Pu.prototype._centroid=!0;Pu.prototype._attrsAffectingSize=["radius"];hr(Pu);j.addGetterSetter(Pu,"radius",0,ze());j.addGetterSetter(Pu,"angle",0,ze());j.addGetterSetter(Pu,"clockwise",!1);j.backCompat(Pu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function VA(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var Ybe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Xbe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Qbe(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,c,p,g,m,y,b,S,T,E,k,L,I,O,D,N,z,W,V,q,he,de=t+t+1,ve=r-1,Ee=i-1,xe=t+1,Z=xe*(xe+1)/2,U=new VA,ee=null,ae=U,X=null,me=null,ye=Ybe[t],Se=Xbe[t];for(s=1;s>Se,q!==0?(q=255/q,n[p]=(m*ye>>Se)*q,n[p+1]=(y*ye>>Se)*q,n[p+2]=(b*ye>>Se)*q):n[p]=n[p+1]=n[p+2]=0,m-=T,y-=E,b-=k,S-=L,T-=X.r,E-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,q>0?(q=255/q,n[l]=(m*ye>>Se)*q,n[l+1]=(y*ye>>Se)*q,n[l+2]=(b*ye>>Se)*q):n[l]=n[l+1]=n[l+2]=0,m-=T,y-=E,b-=k,S-=L,T-=X.r,E-=X.g,k-=X.b,L-=X.a,l=o+((l=a+xe)0&&Qbe(t,n)};j.addGetterSetter(Fe,"blurRadius",0,ze(),j.afterSetFilter);const eSe=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};j.addGetterSetter(Fe,"contrast",0,ze(),j.afterSetFilter);const nSe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,c=e.height,p=l*4,g=c;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:se.error("Unknown emboss direction: "+r)}do{var m=(g-1)*p,y=o;g+y<1&&(y=0),g+y>c&&(y=0);var b=(g-1+y)*l*4,S=l;do{var T=m+(S-1)*4,E=a;S+E<1&&(E=0),S+E>l&&(E=0);var k=b+(S-1+E)*4,L=s[T]-s[k],I=s[T+1]-s[k+1],O=s[T+2]-s[k+2],D=L,N=D>0?D:-D,z=I>0?I:-I,W=O>0?O:-O;if(z>N&&(D=I),W>N&&(D=O),D*=t,i){var V=s[T]+D,q=s[T+1]+D,he=s[T+2]+D;s[T]=V>255?255:V<0?0:V,s[T+1]=q>255?255:q<0?0:q,s[T+2]=he>255?255:he<0?0:he}else{var de=n-D;de<0?de=0:de>255&&(de=255),s[T]=s[T+1]=s[T+2]=de}}while(--S)}while(--g)};j.addGetterSetter(Fe,"embossStrength",.5,ze(),j.afterSetFilter);j.addGetterSetter(Fe,"embossWhiteLevel",.5,ze(),j.afterSetFilter);j.addGetterSetter(Fe,"embossDirection","top-left",null,j.afterSetFilter);j.addGetterSetter(Fe,"embossBlend",!1,null,j.afterSetFilter);function VS(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const rSe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,c=t[2],p=c,g,m,y=this.enhance();if(y!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gp&&(p=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),p===c&&(p=255,c=0);var b,S,T,E,k,L,I,O,D;for(y>0?(S=i+y*(255-i),T=r-y*(r-0),k=s+y*(255-s),L=a-y*(a-0),O=p+y*(255-p),D=c-y*(c-0)):(b=(i+r)*.5,S=i+y*(i-b),T=r+y*(r-b),E=(s+a)*.5,k=s+y*(s-E),L=a+y*(a-E),I=(p+c)*.5,O=p+y*(p-I),D=c+y*(c-I)),m=0;mE?T:E;var k=a,L=o,I,O,D=360/L*Math.PI/180,N,z;for(O=0;OL?k:L;var I=a,O=o,D,N,z=n.polarRotation||0,W,V;for(p=0;pt&&(I=L,O=0,D=-1),i=0;i=0&&y=0&&b=0&&y=0&&b=255*4?255:0}return a}function mSe(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&y=0&&b=n))for(o=S;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],c+=I[a+2],p+=I[a+3],L+=1);for(s=s/L,l=l/L,c=c/L,p=p/L,i=y;i=n))for(o=S;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=c,I[a+3]=p)}};j.addGetterSetter(Fe,"pixelSize",8,ze(),j.afterSetFilter);const bSe=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});j.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});j.addGetterSetter(Fe,"blue",0,T$,j.afterSetFilter);const wSe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});j.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});j.addGetterSetter(Fe,"blue",0,T$,j.afterSetFilter);j.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const CSe=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(c=255-c),p>127&&(p=255-p),g>127&&(g=255-g),t[l]=c,t[l+1]=p,t[l+2]=g}while(--s)}while(--o)},kSe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ite||P[$]!==M[te]){var le=` -`+P[$].replace(" at new "," at ");return d.displayName&&le.includes("")&&(le=le.replace("",d.displayName)),le}while(1<=$&&0<=te);break}}}finally{Ps=!1,Error.prepareStackTrace=v}return(d=d?d.displayName||d.name:"")?Al(d):""}var dh=Object.prototype.hasOwnProperty,Iu=[],Ts=-1;function Mo(d){return{current:d}}function Cn(d){0>Ts||(d.current=Iu[Ts],Iu[Ts]=null,Ts--)}function gn(d,f){Ts++,Iu[Ts]=d.current,d.current=f}var Ro={},_r=Mo(Ro),Ur=Mo(!1),Oo=Ro;function Ls(d,f){var v=d.type.contextTypes;if(!v)return Ro;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var P={},M;for(M in v)P[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=P),P}function Gr(d){return d=d.childContextTypes,d!=null}function ja(){Cn(Ur),Cn(_r)}function md(d,f,v){if(_r.current!==Ro)throw Error(a(168));gn(_r,f),gn(Ur,v)}function Ml(d,f,v){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return v;_=_.getChildContext();for(var P in _)if(!(P in f))throw Error(a(108,z(d)||"Unknown",P));return o({},v,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ro,Oo=_r.current,gn(_r,d),gn(Ur,Ur.current),!0}function vd(d,f,v){var _=d.stateNode;if(!_)throw Error(a(169));v?(d=Ml(d,f,Oo),_.__reactInternalMemoizedMergedChildContext=d,Cn(Ur),Cn(_r),gn(_r,d)):Cn(Ur),gn(Ur,v)}var ci=Math.clz32?Math.clz32:yd,fh=Math.log,hh=Math.LN2;function yd(d){return d>>>=0,d===0?32:31-(fh(d)/hh|0)|0}var As=64,so=4194304;function Is(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Rl(d,f){var v=d.pendingLanes;if(v===0)return 0;var _=0,P=d.suspendedLanes,M=d.pingedLanes,$=v&268435455;if($!==0){var te=$&~P;te!==0?_=Is(te):(M&=$,M!==0&&(_=Is(M)))}else $=v&~P,$!==0?_=Is($):M!==0&&(_=Is(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&P)===0&&(P=_&-_,M=f&-f,P>=M||P===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=v&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0v;v++)f.push(d);return f}function ga(d,f,v){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-ci(f),d[f]=v}function bd(d,f){var v=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=$,P-=$,Wi=1<<32-ci(f)+P|v<zt?(zr=bt,bt=null):zr=bt.sibling;var jt=Ue(ce,bt,pe[zt],$e);if(jt===null){bt===null&&(bt=zr);break}d&&bt&&jt.alternate===null&&f(ce,bt),ie=M(jt,ie,zt),Pt===null?Pe=jt:Pt.sibling=jt,Pt=jt,bt=zr}if(zt===pe.length)return v(ce,bt),Rn&&Ms(ce,zt),Pe;if(bt===null){for(;ztzt?(zr=bt,bt=null):zr=bt.sibling;var ns=Ue(ce,bt,jt.value,$e);if(ns===null){bt===null&&(bt=zr);break}d&&bt&&ns.alternate===null&&f(ce,bt),ie=M(ns,ie,zt),Pt===null?Pe=ns:Pt.sibling=ns,Pt=ns,bt=zr}if(jt.done)return v(ce,bt),Rn&&Ms(ce,zt),Pe;if(bt===null){for(;!jt.done;zt++,jt=pe.next())jt=Et(ce,jt.value,$e),jt!==null&&(ie=M(jt,ie,zt),Pt===null?Pe=jt:Pt.sibling=jt,Pt=jt);return Rn&&Ms(ce,zt),Pe}for(bt=_(ce,bt);!jt.done;zt++,jt=pe.next())jt=Nn(bt,ce,zt,jt.value,$e),jt!==null&&(d&&jt.alternate!==null&&bt.delete(jt.key===null?zt:jt.key),ie=M(jt,ie,zt),Pt===null?Pe=jt:Pt.sibling=jt,Pt=jt);return d&&bt.forEach(function(ii){return f(ce,ii)}),Rn&&Ms(ce,zt),Pe}function Go(ce,ie,pe,$e){if(typeof pe=="object"&&pe!==null&&pe.type===p&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case l:e:{for(var Pe=pe.key,Pt=ie;Pt!==null;){if(Pt.key===Pe){if(Pe=pe.type,Pe===p){if(Pt.tag===7){v(ce,Pt.sibling),ie=P(Pt,pe.props.children),ie.return=ce,ce=ie;break e}}else if(Pt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===L&&h1(Pe)===Pt.type){v(ce,Pt.sibling),ie=P(Pt,pe.props),ie.ref=ya(ce,Pt,pe),ie.return=ce,ce=ie;break e}v(ce,Pt);break}else f(ce,Pt);Pt=Pt.sibling}pe.type===p?(ie=js(pe.props.children,ce.mode,$e,pe.key),ie.return=ce,ce=ie):($e=Kd(pe.type,pe.key,pe.props,null,ce.mode,$e),$e.ref=ya(ce,ie,pe),$e.return=ce,ce=$e)}return $(ce);case c:e:{for(Pt=pe.key;ie!==null;){if(ie.key===Pt)if(ie.tag===4&&ie.stateNode.containerInfo===pe.containerInfo&&ie.stateNode.implementation===pe.implementation){v(ce,ie.sibling),ie=P(ie,pe.children||[]),ie.return=ce,ce=ie;break e}else{v(ce,ie);break}else f(ce,ie);ie=ie.sibling}ie=qs(pe,ce.mode,$e),ie.return=ce,ce=ie}return $(ce);case L:return Pt=pe._init,Go(ce,ie,Pt(pe._payload),$e)}if(Ee(pe))return _n(ce,ie,pe,$e);if(D(pe))return Xn(ce,ie,pe,$e);Mi(ce,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"?(pe=""+pe,ie!==null&&ie.tag===6?(v(ce,ie.sibling),ie=P(ie,pe),ie.return=ce,ce=ie):(v(ce,ie),ie=ep(pe,ce.mode,$e),ie.return=ce,ce=ie),$(ce)):v(ce,ie)}return Go}var Wu=Uv(!0),Gv=Uv(!1),Id={},fo=Mo(Id),xa=Mo(Id),Q=Mo(Id);function ge(d){if(d===Id)throw Error(a(174));return d}function fe(d,f){gn(Q,f),gn(xa,d),gn(fo,Id),d=Z(f),Cn(fo),gn(fo,d)}function Ve(){Cn(fo),Cn(xa),Cn(Q)}function xt(d){var f=ge(Q.current),v=ge(fo.current);f=U(v,d.type,f),v!==f&&(gn(xa,d),gn(fo,f))}function Xt(d){xa.current===d&&(Cn(fo),Cn(xa))}var At=Mo(0);function an(d){for(var f=d;f!==null;){if(f.tag===13){var v=f.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||Lu(v)||gd(v)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Md=[];function p1(){for(var d=0;dv?v:4,d(!0);var _=Vu.transition;Vu.transition={};try{d(!1),f()}finally{Bt=v,Vu.transition=_}}function Yu(){return hi().memoizedState}function w1(d,f,v){var _=Lr(d);if(v={lane:_,action:v,hasEagerState:!1,eagerState:null,next:null},Qu(d))Ju(f,v);else if(v=Hu(d,f,v,_),v!==null){var P=ri();go(v,d,_,P),Fd(v,f,_)}}function Xu(d,f,v){var _=Lr(d),P={lane:_,action:v,hasEagerState:!1,eagerState:null,next:null};if(Qu(d))Ju(f,P);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var $=f.lastRenderedState,te=M($,v);if(P.hasEagerState=!0,P.eagerState=te,H(te,$)){var le=f.interleaved;le===null?(P.next=P,Ld(f)):(P.next=le.next,le.next=P),f.interleaved=P;return}}catch{}finally{}v=Hu(d,f,P,_),v!==null&&(P=ri(),go(v,d,_,P),Fd(v,f,_))}}function Qu(d){var f=d.alternate;return d===mn||f!==null&&f===mn}function Ju(d,f){Rd=Jt=!0;var v=d.pending;v===null?f.next=f:(f.next=v.next,v.next=f),d.pending=f}function Fd(d,f,v){if((v&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,v|=_,f.lanes=v,Ol(d,v)}}var Ya={readContext:Vi,useCallback:Jr,useContext:Jr,useEffect:Jr,useImperativeHandle:Jr,useInsertionEffect:Jr,useLayoutEffect:Jr,useMemo:Jr,useReducer:Jr,useRef:Jr,useState:Jr,useDebugValue:Jr,useDeferredValue:Jr,useTransition:Jr,useMutableSource:Jr,useSyncExternalStore:Jr,useId:Jr,unstable_isNewReconciler:!1},Lx={readContext:Vi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Vi,useEffect:Kv,useImperativeHandle:function(d,f,v){return v=v!=null?v.concat([d]):null,Fl(4194308,4,gr.bind(null,f,d),v)},useLayoutEffect:function(d,f){return Fl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Fl(4,2,d,f)},useMemo:function(d,f){var v=qr();return f=f===void 0?null:f,d=d(),v.memoizedState=[d,f],d},useReducer:function(d,f,v){var _=qr();return f=v!==void 0?v(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=w1.bind(null,mn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:qv,useDebugValue:x1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=qv(!1),f=d[0];return d=S1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,v){var _=mn,P=qr();if(Rn){if(v===void 0)throw Error(a(407));v=v()}else{if(v=f(),Dr===null)throw Error(a(349));(zl&30)!==0||y1(_,f,v)}P.memoizedState=v;var M={value:v,getSnapshot:f};return P.queue=M,Kv(Ns.bind(null,_,M,d),[d]),_.flags|=2048,Dd(9,Ku.bind(null,_,M,v,f),void 0,null),v},useId:function(){var d=qr(),f=Dr.identifierPrefix;if(Rn){var v=ma,_=Wi;v=(_&~(1<<32-ci(_)-1)).toString(32)+v,f=":"+f+"R"+v,v=Uu++,0Uh&&(f.flags|=128,_=!0,nc(P,!1),f.lanes=4194304)}else{if(!_)if(d=an(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),nc(P,!0),P.tail===null&&P.tailMode==="hidden"&&!M.alternate&&!Rn)return ei(f),null}else 2*$n()-P.renderingStartTime>Uh&&v!==1073741824&&(f.flags|=128,_=!0,nc(P,!1),f.lanes=4194304);P.isBackwards?(M.sibling=f.child,f.child=M):(d=P.last,d!==null?d.sibling=M:f.child=M,P.last=M)}return P.tail!==null?(f=P.tail,P.rendering=f,P.tail=f.sibling,P.renderingStartTime=$n(),f.sibling=null,d=At.current,gn(At,_?d&1|2:d&1),f):(ei(f),null);case 22:case 23:return dc(),v=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==v&&(f.flags|=8192),v&&(f.mode&1)!==0?(Gi&1073741824)!==0&&(ei(f),at&&f.subtreeFlags&6&&(f.flags|=8192)):ei(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function A1(d,f){switch(u1(f),f.tag){case 1:return Gr(f.type)&&ja(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ve(),Cn(Ur),Cn(_r),p1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Xt(f),null;case 13:if(Cn(At),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Fu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Cn(At),null;case 4:return Ve(),null;case 10:return Pd(f.type._context),null;case 22:case 23:return dc(),null;case 24:return null;default:return null}}var zs=!1,Er=!1,Nx=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function rc(d,f){var v=d.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(_){Wn(d,f,_)}else v.current=null}function Ho(d,f,v){try{v()}catch(_){Wn(d,f,_)}}var Ih=!1;function $l(d,f){for(ee(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var v=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var _=v.memoizedProps,P=v.memoizedState,M=d.stateNode,$=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Do(d.type,_),P);M.__reactInternalSnapshotBeforeUpdate=$}break;case 3:at&&_s(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(te){Wn(d,d.return,te)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return v=Ih,Ih=!1,v}function ti(d,f,v){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var P=_=_.next;do{if((P.tag&d)===d){var M=P.destroy;P.destroy=void 0,M!==void 0&&Ho(f,v,M)}P=P.next}while(P!==_)}}function Mh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var v=f=f.next;do{if((v.tag&d)===d){var _=v.create;v.destroy=_()}v=v.next}while(v!==f)}}function Rh(d){var f=d.ref;if(f!==null){var v=d.stateNode;switch(d.tag){case 5:d=xe(v);break;default:d=v}typeof f=="function"?f(d):f.current=d}}function I1(d){var f=d.alternate;f!==null&&(d.alternate=null,I1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function ic(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||ic(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Oh(d,f,v){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Be(v,d,f):Tt(v,d);else if(_!==4&&(d=d.child,d!==null))for(Oh(d,f,v),d=d.sibling;d!==null;)Oh(d,f,v),d=d.sibling}function M1(d,f,v){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Mn(v,d,f):_e(v,d);else if(_!==4&&(d=d.child,d!==null))for(M1(d,f,v),d=d.sibling;d!==null;)M1(d,f,v),d=d.sibling}var vr=null,Wo=!1;function Vo(d,f,v){for(v=v.child;v!==null;)Pr(d,f,v),v=v.sibling}function Pr(d,f,v){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(on,v)}catch{}switch(v.tag){case 5:Er||rc(v,f);case 6:if(at){var _=vr,P=Wo;vr=null,Vo(d,f,v),vr=_,Wo=P,vr!==null&&(Wo?Qe(vr,v.stateNode):ct(vr,v.stateNode))}else Vo(d,f,v);break;case 18:at&&vr!==null&&(Wo?i1(vr,v.stateNode):r1(vr,v.stateNode));break;case 4:at?(_=vr,P=Wo,vr=v.stateNode.containerInfo,Wo=!0,Vo(d,f,v),vr=_,Wo=P):(Rt&&(_=v.stateNode.containerInfo,P=pa(_),Tu(_,P)),Vo(d,f,v));break;case 0:case 11:case 14:case 15:if(!Er&&(_=v.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){P=_=_.next;do{var M=P,$=M.destroy;M=M.tag,$!==void 0&&((M&2)!==0||(M&4)!==0)&&Ho(v,f,$),P=P.next}while(P!==_)}Vo(d,f,v);break;case 1:if(!Er&&(rc(v,f),_=v.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=v.memoizedProps,_.state=v.memoizedState,_.componentWillUnmount()}catch(te){Wn(v,f,te)}Vo(d,f,v);break;case 21:Vo(d,f,v);break;case 22:v.mode&1?(Er=(_=Er)||v.memoizedState!==null,Vo(d,f,v),Er=_):Vo(d,f,v);break;default:Vo(d,f,v)}}function Nh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var v=d.stateNode;v===null&&(v=d.stateNode=new Nx),f.forEach(function(_){var P=f2.bind(null,d,_);v.has(_)||(v.add(_),_.then(P,P))})}}function ho(d,f){var v=f.deletions;if(v!==null)for(var _=0;_";case Bh:return":has("+(N1(d)||"")+")";case $h:return'[role="'+d.value+'"]';case Hh:return'"'+d.value+'"';case oc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function ac(d,f){var v=[];d=[d,0];for(var _=0;_P&&(P=$),_&=~M}if(_=P,_=$n()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Dx(_/1960))-_,10<_){d.timeoutHandle=ut(Gs.bind(null,d,gi,es),_);break}Gs(d,gi,es);break;case 5:Gs(d,gi,es);break;default:throw Error(a(329))}}}return Zr(d,$n()),d.callbackNode===v?qh.bind(null,d):null}function Kh(d,f){var v=uc;return d.current.memoizedState.isDehydrated&&(Vs(d,f).flags|=256),d=fc(d,f),d!==2&&(f=gi,gi=v,f!==null&&Zh(f)),d}function Zh(d){gi===null?gi=d:gi.push.apply(gi,d)}function ji(d){for(var f=d;;){if(f.flags&16384){var v=f.updateQueue;if(v!==null&&(v=v.stores,v!==null))for(var _=0;_d?16:d,yt===null)var _=!1;else{if(d=yt,yt=null,Gh=0,(Dt&6)!==0)throw Error(a(331));var P=Dt;for(Dt|=4,Ke=d.current;Ke!==null;){var M=Ke,$=M.child;if((Ke.flags&16)!==0){var te=M.deletions;if(te!==null){for(var le=0;le$n()-F1?Vs(d,0):z1|=v),Zr(d,f)}function V1(d,f){f===0&&((d.mode&1)===0?f=1:(f=so,so<<=1,(so&130023424)===0&&(so=4194304)));var v=ri();d=zo(d,f),d!==null&&(ga(d,f,v),Zr(d,v))}function Fx(d){var f=d.memoizedState,v=0;f!==null&&(v=f.retryLane),V1(d,v)}function f2(d,f){var v=0;switch(d.tag){case 13:var _=d.stateNode,P=d.memoizedState;P!==null&&(v=P.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),V1(d,v)}var U1;U1=function(d,f,v){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Ri=!0;else{if((d.lanes&v)===0&&(f.flags&128)===0)return Ri=!1,Rx(d,f,v);Ri=(d.flags&131072)!==0}else Ri=!1,Rn&&(f.flags&1048576)!==0&&l1(f,pr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;ba(d,f),d=f.pendingProps;var P=Ls(f,_r.current);$u(f,v),P=m1(null,f,_,d,P,v);var M=Gu();return f.flags|=1,typeof P=="object"&&P!==null&&typeof P.render=="function"&&P.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,d1(f),P.updater=Fo,f.stateNode=P,P._reactInternals=f,f1(f,_,d,v),f=Bo(null,f,_,!0,M,v)):(f.tag=0,Rn&&M&&di(f),pi(null,f,P,v),f=f.child),f;case 16:_=f.elementType;e:{switch(ba(d,f),d=f.pendingProps,P=_._init,_=P(_._payload),f.type=_,P=f.tag=Qh(_),d=Do(_,d),P){case 0:f=k1(null,f,_,d,v);break e;case 1:f=r2(null,f,_,d,v);break e;case 11:f=Jv(null,f,_,d,v);break e;case 14:f=Ds(null,f,_,Do(_.type,d),v);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,P=f.pendingProps,P=f.elementType===_?P:Do(_,P),k1(d,f,_,P,v);case 1:return _=f.type,P=f.pendingProps,P=f.elementType===_?P:Do(_,P),r2(d,f,_,P,v);case 3:e:{if(i2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,P=M.element,$v(d,f),wh(f,_,null,v);var $=f.memoizedState;if(_=$.element,kt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){P=ec(Error(a(423)),f),f=o2(d,f,_,v,P);break e}else if(_!==P){P=ec(Error(a(424)),f),f=o2(d,f,_,v,P);break e}else for(kt&&(uo=Y0(f.stateNode.containerInfo),Hn=f,Rn=!0,Ii=null,co=!1),v=Gv(f,null,_,v),f.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(Fu(),_===P){f=Xa(d,f,v);break e}pi(d,f,_,v)}f=f.child}return f;case 5:return xt(f),d===null&&Cd(f),_=f.type,P=f.pendingProps,M=d!==null?d.memoizedProps:null,$=P.children,He(_,P)?$=null:M!==null&&He(_,M)&&(f.flags|=32),n2(d,f),pi(d,f,$,v),f.child;case 6:return d===null&&Cd(f),null;case 13:return a2(d,f,v);case 4:return fe(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Wu(f,null,_,v):pi(d,f,_,v),f.child;case 11:return _=f.type,P=f.pendingProps,P=f.elementType===_?P:Do(_,P),Jv(d,f,_,P,v);case 7:return pi(d,f,f.pendingProps,v),f.child;case 8:return pi(d,f,f.pendingProps.children,v),f.child;case 12:return pi(d,f,f.pendingProps.children,v),f.child;case 10:e:{if(_=f.type._context,P=f.pendingProps,M=f.memoizedProps,$=P.value,Bv(f,_,$),M!==null)if(H(M.value,$)){if(M.children===P.children&&!Ur.current){f=Xa(d,f,v);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var te=M.dependencies;if(te!==null){$=M.child;for(var le=te.firstContext;le!==null;){if(le.context===_){if(M.tag===1){le=Za(-1,v&-v),le.tag=2;var Ne=M.updateQueue;if(Ne!==null){Ne=Ne.shared;var Ye=Ne.pending;Ye===null?le.next=le:(le.next=Ye.next,Ye.next=le),Ne.pending=le}}M.lanes|=v,le=M.alternate,le!==null&&(le.lanes|=v),Td(M.return,v,f),te.lanes|=v;break}le=le.next}}else if(M.tag===10)$=M.type===f.type?null:M.child;else if(M.tag===18){if($=M.return,$===null)throw Error(a(341));$.lanes|=v,te=$.alternate,te!==null&&(te.lanes|=v),Td($,v,f),$=M.sibling}else $=M.child;if($!==null)$.return=M;else for($=M;$!==null;){if($===f){$=null;break}if(M=$.sibling,M!==null){M.return=$.return,$=M;break}$=$.return}M=$}pi(d,f,P.children,v),f=f.child}return f;case 9:return P=f.type,_=f.pendingProps.children,$u(f,v),P=Vi(P),_=_(P),f.flags|=1,pi(d,f,_,v),f.child;case 14:return _=f.type,P=Do(_,f.pendingProps),P=Do(_.type,P),Ds(d,f,_,P,v);case 15:return e2(d,f,f.type,f.pendingProps,v);case 17:return _=f.type,P=f.pendingProps,P=f.elementType===_?P:Do(_,P),ba(d,f),f.tag=1,Gr(_)?(d=!0,qa(f)):d=!1,$u(f,v),Wv(f,_,P),f1(f,_,P,v),Bo(null,f,_,!0,d,v);case 19:return l2(d,f,v);case 22:return t2(d,f,v)}throw Error(a(156,f.tag))};function vi(d,f){return Nu(d,f)}function Sa(d,f,v,_){this.tag=d,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mo(d,f,v,_){return new Sa(d,f,v,_)}function G1(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Qh(d){if(typeof d=="function")return G1(d)?1:0;if(d!=null){if(d=d.$$typeof,d===S)return 11;if(d===k)return 14}return 2}function qi(d,f){var v=d.alternate;return v===null?(v=mo(d.tag,f,d.key,d.mode),v.elementType=d.elementType,v.type=d.type,v.stateNode=d.stateNode,v.alternate=d,d.alternate=v):(v.pendingProps=f,v.type=d.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=d.flags&14680064,v.childLanes=d.childLanes,v.lanes=d.lanes,v.child=d.child,v.memoizedProps=d.memoizedProps,v.memoizedState=d.memoizedState,v.updateQueue=d.updateQueue,f=d.dependencies,v.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},v.sibling=d.sibling,v.index=d.index,v.ref=d.ref,v}function Kd(d,f,v,_,P,M){var $=2;if(_=d,typeof d=="function")G1(d)&&($=1);else if(typeof d=="string")$=5;else e:switch(d){case p:return js(v.children,P,M,f);case g:$=8,P|=8;break;case m:return d=mo(12,v,f,P|2),d.elementType=m,d.lanes=M,d;case T:return d=mo(13,v,f,P),d.elementType=T,d.lanes=M,d;case E:return d=mo(19,v,f,P),d.elementType=E,d.lanes=M,d;case I:return Jh(v,P,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case y:$=10;break e;case b:$=9;break e;case S:$=11;break e;case k:$=14;break e;case L:$=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=mo($,v,f,P),f.elementType=d,f.type=_,f.lanes=M,f}function js(d,f,v,_){return d=mo(7,d,_,f),d.lanes=v,d}function Jh(d,f,v,_){return d=mo(22,d,_,f),d.elementType=I,d.lanes=v,d.stateNode={isHidden:!1},d}function ep(d,f,v){return d=mo(6,d,null,f),d.lanes=v,d}function qs(d,f,v){return f=mo(4,d.children!==null?d.children:[],d.key,f),f.lanes=v,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function Zd(d,f,v,_,P){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ot,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ou(0),this.expirationTimes=Ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ou(0),this.identifierPrefix=_,this.onRecoverableError=P,kt&&(this.mutableSourceEagerHydrationData=null)}function h2(d,f,v,_,P,M,$,te,le){return d=new Zd(d,f,v,te,le),f===1?(f=1,M===!0&&(f|=8)):f=0,M=mo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},d1(M),d}function j1(d){if(!d)return Ro;d=d._reactInternals;e:{if(W(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var v=d.type;if(Gr(v))return Ml(d,v,f)}return f}function q1(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=he(f),d===null?null:d.stateNode}function Yd(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var v=d.retryLane;d.retryLane=v!==0&&v=Ne&&M>=Et&&P<=Ye&&$<=Ue){d.splice(f,1);break}else if(_!==Ne||v.width!==le.width||Ue$){if(!(M!==Et||v.height!==le.height||Ye<_||Ne>P)){Ne>_&&(le.width+=Ne-_,le.x=_),YeM&&(le.height+=Et-M,le.y=M),Ue<$&&(le.height=$-Et),d.splice(f,1);break}}}return d},n.findHostInstance=q1,n.findHostInstanceWithNoPortals=function(d){return d=q(d),d=d!==null?ve(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return q1(d)},n.flushControlled=function(d){var f=Dt;Dt|=1;var v=ir.transition,_=Bt;try{ir.transition=null,Bt=1,d()}finally{Bt=_,ir.transition=v,Dt=f,Dt===0&&(Hs(),dt())}},n.flushPassiveEffects=Vl,n.flushSync=B1,n.focusWithin=function(d,f){if(!wt)throw Error(a(363));for(d=Wh(d),f=ac(d,f),f=Array.from(f),d=0;dv&&(v=$)),$ ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return xe(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:tp,findFiberByHostInstance:d.findFiberByHostInstance||K1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{on=f.inject(d),$t=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,v,_){if(!wt)throw Error(a(363));d=D1(d,f);var P=Gt(d,v,_).disconnect;return{disconnect:function(){P()}}},n.registerMutableSourceForHydration=function(d,f){var v=f._getVersion;v=v(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,v]:d.mutableSourceEagerHydrationData.push(f,v)},n.runWithPriority=function(d,f){var v=Bt;try{return Bt=d,f()}finally{Bt=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,v,_){var P=f.current,M=ri(),$=Lr(P);return v=j1(v),f.context===null?f.context=v:f.pendingContext=v,f=Za(M,$),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Os(P,f,$),d!==null&&(go(d,P,$,M),Sh(d,P,$)),$},n};(function(e){e.exports=ESe})(aH);const PSe=G8(aH.exports);var d_={exports:{}},sh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */sh.ConcurrentRoot=1;sh.ContinuousEventPriority=4;sh.DefaultEventPriority=16;sh.DiscreteEventPriority=1;sh.IdleEventPriority=536870912;sh.LegacyRoot=0;(function(e){e.exports=sh})(d_);const UA={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let GA=!1,jA=!1;const f_=".react-konva-event",TSe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,LSe=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,ASe={};function Cx(e,t,n=ASe){if(!GA&&"zIndex"in t&&(console.warn(LSe),GA=!0),!jA&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(TSe),jA=!0)}for(var o in n)if(!UA[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var c=!t.hasOwnProperty(o);c&&e.setAttr(o,void 0)}var p=t._useStrictMode,g={},m=!1;const y={};for(var o in t)if(!UA[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(y[l]=t[o])}!a&&(t[o]!==n[o]||p&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),hd(e));for(var l in y)e.on(l+f_,y[l])}function hd(e){if(!et.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const sH={},ISe={};Gf.Node.prototype._applyProps=Cx;function MSe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),hd(e)}function RSe(e,t,n){let r=Gf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Gf.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return Cx(l,o),l}function OSe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function NSe(e,t,n){return!1}function DSe(e){return e}function zSe(){return null}function FSe(){return null}function BSe(e,t,n,r){return ISe}function $Se(){}function HSe(e){}function WSe(e,t){return!1}function VSe(){return sH}function USe(){return sH}const GSe=setTimeout,jSe=clearTimeout,qSe=-1;function KSe(e,t){return!1}const ZSe=!1,YSe=!0,XSe=!0;function QSe(e,t){t.parent===e?t.moveToTop():e.add(t),hd(e)}function JSe(e,t){t.parent===e?t.moveToTop():e.add(t),hd(e)}function lH(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),hd(e)}function ewe(e,t,n){lH(e,t,n)}function twe(e,t){t.destroy(),t.off(f_),hd(e)}function nwe(e,t){t.destroy(),t.off(f_),hd(e)}function rwe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function iwe(e,t,n){}function owe(e,t,n,r,i){Cx(e,i,r)}function awe(e){e.hide(),hd(e)}function swe(e){}function lwe(e,t){(t.visible==null||t.visible)&&e.show()}function uwe(e,t){}function cwe(e){}function dwe(){}const fwe=()=>d_.exports.DefaultEventPriority,hwe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:MSe,createInstance:RSe,createTextInstance:OSe,finalizeInitialChildren:NSe,getPublicInstance:DSe,prepareForCommit:zSe,preparePortalMount:FSe,prepareUpdate:BSe,resetAfterCommit:$Se,resetTextContent:HSe,shouldDeprioritizeSubtree:WSe,getRootHostContext:VSe,getChildHostContext:USe,scheduleTimeout:GSe,cancelTimeout:jSe,noTimeout:qSe,shouldSetTextContent:KSe,isPrimaryRenderer:ZSe,warnsIfNotActing:YSe,supportsMutation:XSe,appendChild:QSe,appendChildToContainer:JSe,insertBefore:lH,insertInContainerBefore:ewe,removeChild:twe,removeChildFromContainer:nwe,commitTextUpdate:rwe,commitMount:iwe,commitUpdate:owe,hideInstance:awe,hideTextInstance:swe,unhideInstance:lwe,unhideTextInstance:uwe,clearContainer:cwe,detachDeletedInstance:dwe,getCurrentEventPriority:fwe,now:Dp.exports.unstable_now,idlePriority:Dp.exports.unstable_IdlePriority,run:Dp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var pwe=Object.defineProperty,gwe=Object.defineProperties,mwe=Object.getOwnPropertyDescriptors,qA=Object.getOwnPropertySymbols,vwe=Object.prototype.hasOwnProperty,ywe=Object.prototype.propertyIsEnumerable,KA=(e,t,n)=>t in e?pwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZA=(e,t)=>{for(var n in t||(t={}))vwe.call(t,n)&&KA(e,n,t[n]);if(qA)for(var n of qA(t))ywe.call(t,n)&&KA(e,n,t[n]);return e},xwe=(e,t)=>gwe(e,mwe(t));function h_(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=h_(r,t,n);if(i)return i;r=t?null:r.sibling}}function uH(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const p_=uH(C.exports.createContext(null));class cH extends C.exports.Component{render(){return w(p_.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:bwe,ReactCurrentDispatcher:Swe}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function wwe(){const e=C.exports.useContext(p_);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=bwe.current)!=null?r:h_(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const vg=[],YA=new WeakMap;function Cwe(){var e;const t=wwe();vg.splice(0,vg.length),h_(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==p_&&vg.push(uH(i))});for(const n of vg){const r=(e=Swe.current)==null?void 0:e.readContext(n);YA.set(n,r)}return C.exports.useMemo(()=>vg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,xwe(ZA({},i),{value:YA.get(r)}))),n=>w(cH,{...ZA({},n)})),[])}function _we(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const kwe=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=_we(e),o=Cwe(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new Gf.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Dg.createContainer(n.current,d_.exports.LegacyRoot,!1,null),Dg.updateContainer(w(o,{children:e.children}),r.current),()=>{!Gf.isBrowser||(a(null),Dg.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),Cx(n.current,e,i),Dg.updateContainer(w(o,{children:e.children}),r.current,null)}),w("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},US="Layer",Ewe="Group",k8="Rect",E8="Circle",Pwe="Line",GS="Image",Twe="Transformer",Dg=PSe(hwe);Dg.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const Lwe=re.forwardRef((e,t)=>w(cH,{children:w(kwe,{...e,forwardedRef:t})})),Awe=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},dH=e=>{const{r:t,g:n,b:r}=e;return`rgba(${t}, ${n}, ${r})`},Iwe=St(e=>e.inpainting,e=>{const{lines:t,maskColor:n}=e;return{lines:t,maskColorString:dH(n)}});St([e=>e.inpainting,e=>e.options,Cr],(e,t,n)=>{const{tool:r,brushSize:i,maskColor:o,shouldInvertMask:a,shouldShowMask:s,shouldShowCheckboardTransparency:l,lines:c,pastLines:p,futureLines:g,shouldShowBoundingBoxFill:m}=e,{showDualDisplay:y}=t;return{tool:r,brushSize:i,maskColor:o,shouldInvertMask:a,shouldShowMask:s,shouldShowCheckboardTransparency:l,canUndo:p.length>0,canRedo:g.length>0,isMaskEmpty:c.length===0,activeTabName:n,showDualDisplay:y,shouldShowBoundingBoxFill:m}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});const Mwe=St(e=>e.inpainting,e=>{const{tool:t,brushSize:n,maskColor:r,shouldInvertMask:i,shouldShowMask:o,shouldShowCheckboardTransparency:a,imageToInpaint:s,stageScale:l,shouldShowBoundingBox:c,shouldShowBoundingBoxFill:p,isDrawing:g,shouldLockBoundingBox:m,boundingBoxDimensions:y,isTransformingBoundingBox:b,isMouseOverBoundingBox:S,isMovingBoundingBox:T}=e;let E="";return b?E=void 0:T||S?E="move":o?E="none":E="default",{tool:t,brushSize:n,shouldInvertMask:i,shouldShowMask:o,shouldShowCheckboardTransparency:a,maskColor:r,imageToInpaint:s,stageScale:l,shouldShowBoundingBox:c,shouldShowBoundingBoxFill:p,isDrawing:g,shouldLockBoundingBox:m,boundingBoxDimensions:y,isTransformingBoundingBox:b,isModifyingBoundingBox:b||T,stageCursor:E,isMouseOverBoundingBox:S}},{memoizeOptions:{resultEqualityCheck:(e,t)=>{const{imageToInpaint:n,...r}=e,{imageToInpaint:i,...o}=t;return ht.isEqual(r,o)&&n==i}}}),Rwe=()=>{const{lines:e,maskColorString:t}=Me(Iwe);return w(Fn,{children:e.map((n,r)=>w(Pwe,{points:n.points,stroke:t,strokeWidth:n.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:n.tool==="brush"?"source-over":"destination-out"},r))})},Owe=St(e=>e.inpainting,e=>{const{cursorPosition:t,canvasDimensions:{width:n,height:r},brushSize:i,maskColor:o,tool:a,shouldShowBrush:s,isMovingBoundingBox:l,isTransformingBoundingBox:c}=e;return{cursorPosition:t,width:n,height:r,brushSize:i,maskColorString:dH(o),tool:a,shouldShowBrush:s,shouldDrawBrushPreview:!(l||c||!t)&&s}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),Nwe=()=>{const{cursorPosition:e,width:t,height:n,brushSize:r,maskColorString:i,tool:o,shouldDrawBrushPreview:a}=Me(Owe);return a?w(E8,{x:e?e.x:t/2,y:e?e.y:n/2,radius:r/2,fill:i,listening:!1,globalCompositeOperation:o==="eraser"?"destination-out":"source-over"}):null},Dwe=St(e=>e.inpainting,e=>{const{cursorPosition:t,canvasDimensions:{width:n,height:r},brushSize:i,tool:o,shouldShowBrush:a,isMovingBoundingBox:s,isTransformingBoundingBox:l,stageScale:c}=e;return{cursorPosition:t,width:n,height:r,brushSize:i,tool:o,strokeWidth:1/c,radius:1/c,shouldDrawBrushPreview:!(s||l||!t)&&a}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),zwe=()=>{const{cursorPosition:e,width:t,height:n,brushSize:r,shouldDrawBrushPreview:i,strokeWidth:o,radius:a}=Me(Dwe);return i?ne(Fn,{children:[w(E8,{x:e?e.x:t/2,y:e?e.y:n/2,radius:r/2,stroke:"rgba(0,0,0,1)",strokeWidth:o,strokeEnabled:!0,listening:!1}),w(E8,{x:e?e.x:t/2,y:e?e.y:n/2,radius:a,fill:"rgba(0,0,0,1)",listening:!1})]}):null},Fwe=()=>{const{tool:e,lines:t,cursorPosition:n,brushSize:r,canvasDimensions:{width:i,height:o},maskColor:a,shouldInvertMask:s,shouldShowMask:l,shouldShowBrushPreview:c,shouldShowCheckboardTransparency:p,imageToInpaint:g,shouldShowBrush:m,shouldShowBoundingBoxFill:y,shouldLockBoundingBox:b,stageScale:S,pastLines:T,futureLines:E,needsCache:k,isDrawing:L,isTransformingBoundingBox:I,isMovingBoundingBox:O,shouldShowBoundingBox:D}=Me(N=>N.inpainting);return C.exports.useLayoutEffect(()=>{!sl.current||sl.current.cache({x:0,y:0,width:i,height:o})},[t,n,i,o,e,r,a,s,l,c,p,g,m,y,D,b,S,T,E,k,L,I,O]),C.exports.useEffect(()=>{const N=window.setTimeout(()=>{!sl.current||sl.current.cache({x:0,y:0,width:i,height:o})},0);return()=>{window.clearTimeout(N)}}),null},Ly=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},Bwe=4,fH=St(e=>e.inpainting,e=>{const{boundingBoxCoordinate:t,boundingBoxDimensions:n,boundingBoxPreviewFill:r,canvasDimensions:i,stageScale:o,imageToInpaint:a,shouldLockBoundingBox:s,isDrawing:l,isTransformingBoundingBox:c,isMovingBoundingBox:p,isMouseOverBoundingBox:g,isSpacebarHeld:m}=e;return{boundingBoxCoordinate:t,boundingBoxDimensions:n,boundingBoxPreviewFillString:Awe(r),canvasDimensions:i,stageScale:o,imageToInpaint:a,dash:Bwe/o,strokeWidth:1/o,shouldLockBoundingBox:s,isDrawing:l,isTransformingBoundingBox:c,isMouseOverBoundingBox:g,isMovingBoundingBox:p,isSpacebarHeld:m}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),$we=()=>{const{boundingBoxCoordinate:e,boundingBoxDimensions:t,boundingBoxPreviewFillString:n,canvasDimensions:r}=Me(fH);return ne(Ewe,{children:[w(k8,{x:0,y:0,height:r.height,width:r.width,fill:n}),w(k8,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,globalCompositeOperation:"destination-out"})]})},Hwe=()=>{const e=Xe(),{boundingBoxCoordinate:t,boundingBoxDimensions:n,stageScale:r,imageToInpaint:i,shouldLockBoundingBox:o,isDrawing:a,isTransformingBoundingBox:s,isMovingBoundingBox:l,isMouseOverBoundingBox:c,isSpacebarHeld:p}=Me(fH),g=C.exports.useRef(null),m=C.exports.useRef(null);C.exports.useEffect(()=>{!g.current||!m.current||(g.current.nodes([m.current]),g.current.getLayer()?.batchDraw())},[o]);const y=64*r,b=C.exports.useCallback(z=>{e(YL({x:Math.floor(z.target.x()),y:Math.floor(z.target.y())}))},[e]),S=C.exports.useCallback(z=>{if(!i)return t;const{x:W,y:V}=z,q=i.width-n.width,he=i.height-n.height,de=Math.floor(ht.clamp(W,0,q*r)),ve=Math.floor(ht.clamp(V,0,he*r));return{x:de,y:ve}},[t,n,i,r]),T=C.exports.useCallback(()=>{if(!m.current)return;const z=m.current,W=z.scaleX(),V=z.scaleY(),q=Math.round(z.width()*W),he=Math.round(z.height()*V),de=Math.round(z.x()),ve=Math.round(z.y());e(Ig({width:q,height:he})),e(YL({x:de,y:ve})),z.scaleX(1),z.scaleY(1)},[e]),E=C.exports.useCallback((z,W,V)=>{const q=z.x%y,he=z.y%y,de=jL(W.x,y)+q,ve=jL(W.y,y)+he,Ee=Math.abs(W.x-de),xe=Math.abs(W.y-ve),Z=Ee!i||W.width+W.x>i.width*r||W.height+W.y>i.height*r||W.x<0||W.y<0?z:W,[i,r]),L=z=>{z.cancelBubble=!0,z.evt.stopImmediatePropagation(),console.log("Started transform"),e(LS(!0))},I=z=>{e(LS(!1)),e(pp(!1))},O=z=>{z.cancelBubble=!0,z.evt.stopImmediatePropagation(),e(XL(!0))},D=z=>{e(LS(!1)),e(XL(!1)),e(pp(!1))},N=(z,W)=>{z.rect(0,0,i?.width,i?.height),z.fillShape(W)};return ne(Fn,{children:[w(k8,{x:t.x,y:t.y,width:n.width,height:n.height,ref:m,stroke:c?"rgba(255,255,255,0.3)":"white",strokeWidth:Math.floor((c?8:1)/r),fillEnabled:p,hitFunc:p?N:void 0,hitStrokeWidth:Math.floor(13/r),listening:!a&&!o,onMouseOver:()=>{e(pp(!0))},onMouseOut:()=>{!s&&!l&&e(pp(!1))},onMouseDown:O,onMouseUp:D,draggable:!0,onDragMove:b,dragBoundFunc:S,onTransform:T,onDragEnd:D,onTransformEnd:I}),w(Twe,{ref:g,anchorCornerRadius:3,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderStroke:"black",rotateEnabled:!1,borderEnabled:!0,flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!a&&!o,onMouseDown:L,onMouseUp:I,enabledAnchors:o?[]:void 0,boundBoxFunc:k,anchorDragBoundFunc:E,onDragEnd:D,onTransformEnd:I,onMouseOver:()=>{e(pp(!0))},onMouseOut:()=>{!s&&!l&&e(pp(!1))}})]})},Wwe=St([e=>e.options,e=>e.inpainting,Cr],(e,t,n)=>{const{shouldShowMask:r,cursorPosition:i,shouldLockBoundingBox:o,shouldShowBoundingBox:a}=t;return{activeTabName:n,shouldShowMask:r,isCursorOnCanvas:Boolean(i),shouldLockBoundingBox:o,shouldShowBoundingBox:a}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),Vwe=()=>{const e=Xe(),{shouldShowMask:t,activeTabName:n,isCursorOnCanvas:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o}=Me(Wwe),a=C.exports.useRef(!1),s=C.exports.useRef(null);return _t("shift+q",l=>{l.preventDefault(),e(jye())},{enabled:n==="inpainting"&&t},[n,t]),C.exports.useEffect(()=>{const l=c=>{if(!(!["x","q"].includes(c.key)||n!=="inpainting"||!t)){if(!r){s.current||(s.current=c),a.current=!1;return}if(c.stopPropagation(),c.preventDefault(),!c.repeat){if(s.current||(a.current=!0,s.current=c),!a.current&&c.type==="keyup"){a.current=!0,s.current=c;return}switch(c.key){case"x":{e(Hye());break}case"q":{if(!t||!o)break;e(qye(c.type==="keydown")),e(K7(c.type!=="keydown"));break}}s.current=c,a.current=!0}}};return document.addEventListener("keydown",l),document.addEventListener("keyup",l),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",l)}},[e,n,t,r,i,o]),null};let Js,sl,F4;const Uwe=()=>{const e=Xe(),{tool:t,brushSize:n,shouldInvertMask:r,shouldShowMask:i,shouldShowCheckboardTransparency:o,maskColor:a,imageToInpaint:s,stageScale:l,shouldShowBoundingBox:c,shouldShowBoundingBoxFill:p,isDrawing:g,isModifyingBoundingBox:m,stageCursor:y}=Me(Mwe),b=ld();Js=C.exports.useRef(null),sl=C.exports.useRef(null),F4=C.exports.useRef(null);const S=C.exports.useRef({x:0,y:0}),T=C.exports.useRef(!1),[E,k]=C.exports.useState(null);C.exports.useEffect(()=>{if(s){const z=new Image;z.onload=()=>{F4.current=z,k(z)},z.onerror=()=>{b({title:"Unable to Load Image",description:`Image ${s.url} failed to load`,status:"error",isClosable:!0}),e(zB())},z.src=s.url}else k(null)},[s,e,l,b]);const L=C.exports.useCallback(()=>{if(!Js.current)return;const z=Ly(Js.current);!z||!sl.current||m||(e(ly(!0)),e(qL({tool:t,strokeWidth:n/2,points:[z.x,z.y]})))},[e,n,t,m]),I=C.exports.useCallback(()=>{if(!Js.current)return;const z=Ly(Js.current);!z||(e(ZL(z)),sl.current&&(S.current=z,!(!g||m)&&(T.current=!0,e(KL([z.x,z.y])))))},[e,g,m]),O=C.exports.useCallback(()=>{if(!T.current&&g&&Js.current){const z=Ly(Js.current);if(!z||!sl.current||m)return;e(KL([z.x,z.y]))}else T.current=!1;e(ly(!1))},[e,g,m]),D=C.exports.useCallback(()=>{e(ZL(null)),e(ly(!1))},[e]),N=C.exports.useCallback(z=>{if(z.evt.buttons===1){if(!Js.current)return;const W=Ly(Js.current);if(!W||!sl.current||m)return;e(ly(!0)),e(qL({tool:t,strokeWidth:n/2,points:[W.x,W.y]}))}},[e,n,t,m]);return w("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[E&&ne(Lwe,{width:Math.floor(E.width*l),height:Math.floor(E.height*l),scale:{x:l,y:l},onMouseDown:L,onMouseMove:I,onMouseEnter:N,onMouseUp:O,onMouseOut:D,onMouseLeave:D,style:{...y?{cursor:y}:{}},className:"inpainting-canvas-stage checkerboard",ref:Js,children:[!r&&!o&&w(US,{name:"image-layer",listening:!1,children:w(GS,{listening:!1,image:E})}),i&&ne(Fn,{children:[ne(US,{name:"mask-layer",listening:!1,opacity:o||r?1:a.a,ref:sl,children:[w(Rwe,{}),w(Nwe,{}),r&&w(GS,{image:E,listening:!1,globalCompositeOperation:"source-in"}),!r&&o&&w(GS,{image:E,listening:!1,globalCompositeOperation:"source-out"})]}),ne(US,{children:[p&&c&&w($we,{}),c&&w(Hwe,{}),w(zwe,{})]})]})]}),w(Fwe,{}),w(Vwe,{})]})})},Gwe=()=>{const e=Xe(),{needsCache:t,imageToInpaint:n}=Me(i=>i.inpainting),r=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!r.current||!n)return;const i=r.current.clientWidth,o=r.current.clientHeight,a=Math.min(1,Math.min(i/n.width,o/n.height));e($ye(a))},0)},[e,n,t]),w("div",{ref:r,className:"inpainting-canvas-area",children:w(Cv,{thickness:"2px",speed:"1s",size:"xl"})})};function _x(){return(_x=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function P8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var k0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:T.buttons>0)&&i.current?o(XA(i.current,T,s.current)):S(!1)},b=function(){return S(!1)};function S(T){var E=l.current,k=T8(i.current),L=T?k.addEventListener:k.removeEventListener;L(E?"touchmove":"mousemove",y),L(E?"touchend":"mouseup",b)}return[function(T){var E=T.nativeEvent,k=i.current;if(k&&(QA(E),!function(I,O){return O&&!hm(I)}(E,l.current)&&k)){if(hm(E)){l.current=!0;var L=E.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(XA(k,E,s.current)),S(!0)}},function(T){var E=T.which||T.keyCode;E<37||E>40||(T.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},S]},[a,o]),p=c[0],g=c[1],m=c[2];return C.exports.useEffect(function(){return m},[m]),w("div",{..._x({},r,{onTouchStart:p,onMouseDown:p,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),kx=function(e){return e.filter(Boolean).join(" ")},m_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=kx(["react-colorful__pointer",e.className]);return w("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:w("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},eo=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},pH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:eo(e.h),s:eo(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:eo(i/2),a:eo(r,2)}},L8=function(e){var t=pH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},jS=function(e){var t=pH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},jwe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:eo(255*[r,s,a,a,l,r][c]),g:eo(255*[l,r,r,s,a,a][c]),b:eo(255*[a,a,l,r,r,s][c]),a:eo(i,2)}},qwe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:eo(60*(s<0?s+6:s)),s:eo(o?a/o*100:0),v:eo(o/255*100),a:i}},Kwe=re.memo(function(e){var t=e.hue,n=e.onChange,r=kx(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(g_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:k0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":eo(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(m_,{className:"react-colorful__hue-pointer",left:t/360,color:L8({h:t,s:100,v:100,a:1})})))}),Zwe=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:L8({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(g_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:k0(t.s+100*i.left,0,100),v:k0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+eo(t.s)+"%, Brightness "+eo(t.v)+"%"},re.createElement(m_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:L8(t)})))}),gH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Ywe(e,t,n){var r=P8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},a(c)}},[t,e]),C.exports.useEffect(function(){var c;gH(o,s.current.hsva)||e.equal(c=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:c},r(c))},[o,e,r]);var l=C.exports.useCallback(function(c){a(function(p){return Object.assign({},p,c)})},[]);return[o,l]}var Xwe=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Qwe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},JA=new Map,Jwe=function(e){Xwe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!JA.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,JA.set(t,n);var r=Qwe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},e6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+jS(Object.assign({},n,{a:0}))+", "+jS(Object.assign({},n,{a:1}))+")"},o=kx(["react-colorful__alpha",t]),a=eo(100*n.a);return re.createElement("div",{className:o},w("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(g_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:k0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(m_,{className:"react-colorful__alpha-pointer",left:n.a,color:jS(n)})))},t6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=hH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);Jwe(s);var l=Ywe(n,i,o),c=l[0],p=l[1],g=kx(["react-colorful",t]);return re.createElement("div",_x({},a,{ref:s,className:g}),w(Zwe,{hsva:c,onChange:p}),w(Kwe,{hue:c.h,onChange:p}),re.createElement(e6e,{hsva:c,onChange:p,className:"react-colorful__last-control"}))},n6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:qwe,fromHsva:jwe,equal:gH},r6e=function(e){return re.createElement(t6e,_x({},e,{colorModel:n6e}))};const i6e=e=>{const{styleClass:t,...n}=e;return w(r6e,{className:`invokeai__color-picker ${t}`,...n})},o6e=St([e=>e.inpainting,Cr],(e,t)=>{const{shouldShowMask:n,maskColor:r}=e;return{shouldShowMask:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function a6e(){const{shouldShowMask:e,maskColor:t,activeTabName:n}=Me(o6e),r=Xe(),i=o=>{r(Dye(o))};return _t("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:n==="inpainting"&&e},[n,e,t.a]),_t("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,100)})},{enabled:n==="inpainting"&&e},[n,e,t.a]),w(Df,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:w(Ut,{"aria-label":"Mask Color",icon:w(nye,{}),isDisabled:!e,cursor:"pointer"}),children:w(i6e,{color:t,onChange:i})})}const s6e=St([e=>e.inpainting,Cr],(e,t)=>{const{tool:n,brushSize:r,shouldShowMask:i}=e;return{tool:n,brushSize:r,shouldShowMask:i,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function l6e(){const e=Xe(),{tool:t,brushSize:n,shouldShowMask:r,activeTabName:i}=Me(s6e),o=()=>e(DB("brush")),a=()=>{e(TS(!0))},s=()=>{e(TS(!1))},l=c=>{e(TS(!0)),e(Rye(c))};return _t("[",c=>{c.preventDefault(),n-5>0?l(n-5):l(1)},{enabled:i==="inpainting"&&r},[i,r,n]),_t("]",c=>{c.preventDefault(),l(n+5)},{enabled:i==="inpainting"&&r},[i,r,n]),_t("b",c=>{c.preventDefault(),o()},{enabled:i==="inpainting"&&r},[i,r]),w(Df,{trigger:"hover",onOpen:a,onClose:s,triggerComponent:w(Ut,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:w(tye,{}),onClick:o,"data-selected":t==="brush",isDisabled:!r}),children:ne("div",{className:"inpainting-brush-options",children:[w(i_,{label:"Brush Size",value:n,onChange:l,min:1,max:200,width:"100px",focusThumbOnChange:!1,isDisabled:!r}),w(no,{value:n,onChange:l,width:"80px",min:1,max:999,isDisabled:!r}),w(a6e,{})]})})}const u6e=St([e=>e.inpainting,Cr],(e,t)=>{const{tool:n,shouldShowMask:r}=e;return{tool:n,shouldShowMask:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function c6e(){const{tool:e,shouldShowMask:t,activeTabName:n}=Me(u6e),r=Xe(),i=()=>r(DB("eraser"));return _t("e",o=>{o.preventDefault(),!(n!=="inpainting"||!t)&&i()},{enabled:n==="inpainting"&&t},[n,t]),w(Ut,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:w(q2e,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const d6e=St([e=>e.inpainting,Cr],(e,t)=>{const{pastLines:n,shouldShowMask:r}=e;return{canUndo:n.length>0,shouldShowMask:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function f6e(){const e=Xe(),{canUndo:t,shouldShowMask:n,activeTabName:r}=Me(d6e),i=()=>e(Fye());return _t("cmd+z, control+z",o=>{o.preventDefault(),i()},{enabled:r==="inpainting"&&n&&t},[r,n,t]),w(Ut,{"aria-label":"Undo",tooltip:"Undo",icon:w(hye,{}),onClick:i,isDisabled:!t||!n})}const h6e=St([e=>e.inpainting,Cr],(e,t)=>{const{futureLines:n,shouldShowMask:r}=e;return{canRedo:n.length>0,shouldShowMask:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function p6e(){const e=Xe(),{canRedo:t,shouldShowMask:n,activeTabName:r}=Me(h6e),i=()=>e(Bye());return _t("cmd+shift+z, control+shift+z, control+y, cmd+y",o=>{o.preventDefault(),i()},{enabled:r==="inpainting"&&n&&t},[r,n,t]),w(Ut,{"aria-label":"Redo",tooltip:"Redo",icon:w(sye,{}),onClick:i,isDisabled:!t||!n})}const g6e=St([e=>e.inpainting,Cr],(e,t)=>{const{shouldShowMask:n,lines:r}=e;return{shouldShowMask:n,activeTabName:t,isMaskEmpty:r.length===0}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function m6e(){const{shouldShowMask:e,activeTabName:t,isMaskEmpty:n}=Me(g6e),r=Xe(),i=ld(),o=()=>{r(zye())};return _t("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:t==="inpainting"&&e&&!n},[t,n,e]),w(Ut,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:w(iye,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const v6e=St([e=>e.inpainting,Cr],(e,t)=>{const{shouldShowMask:n}=e;return{shouldShowMask:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function y6e(){const e=Xe(),{shouldShowMask:t,activeTabName:n}=Me(v6e),r=()=>e(Nye(!t));return _t("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"},[n,t]),w(Ut,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?w(P$,{size:22}):w(k$,{size:22}),onClick:r})}const x6e=St([e=>e.inpainting,Cr],(e,t)=>{const{shouldShowMask:n,shouldInvertMask:r}=e;return{shouldInvertMask:r,shouldShowMask:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}});function b6e(){const{shouldInvertMask:e,shouldShowMask:t,activeTabName:n}=Me(x6e),r=Xe(),i=()=>r(Oye(!e));return _t("shift+m",o=>{o.preventDefault(),i()},{enabled:n==="inpainting"&&t},[n,e,t]),w(Ut,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?w(A2e,{size:22}):w(I2e,{size:22}),onClick:i,isDisabled:!t})}const S6e=()=>{const e=Xe(),t=Me(n=>n.inpainting.shouldLockBoundingBox);return w(Ut,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?w(Q2e,{}):w(pye,{}),"data-selected":t,onClick:()=>{e(K7(!t))}})},w6e=()=>{const e=Xe(),t=Me(n=>n.inpainting.shouldShowBoundingBox);return w(Ut,{"aria-label":"Hide Inpainting Box",tooltip:"Hide Inpainting Box",icon:w(mye,{}),"data-alert":!t,onClick:()=>{e(FB(!t))}})},C6e=()=>ne("div",{className:"inpainting-settings",children:[ne(au,{isAttached:!0,children:[w(l6e,{}),w(c6e,{})]}),ne(au,{isAttached:!0,children:[w(y6e,{}),w(b6e,{}),w(S6e,{}),w(w6e,{}),w(m6e,{})]}),ne(au,{isAttached:!0,children:[w(f6e,{}),w(p6e,{})]}),w(au,{isAttached:!0,children:w(qB,{})})]}),_6e=St([e=>e.inpainting,e=>e.options],(e,t)=>{const{needsCache:n,imageToInpaint:r}=e,{showDualDisplay:i}=t;return{needsCache:n,showDualDisplay:i,imageToInpaint:r}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),k6e=()=>{const e=Xe(),{showDualDisplay:t,needsCache:n,imageToInpaint:r}=Me(_6e);return C.exports.useLayoutEffect(()=>{const o=ht.debounce(()=>e(su(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ne("div",{className:t?"workarea-split-view":"workarea-single-view",children:[ne("div",{className:"workarea-split-view-left",children:[r?ne("div",{className:"inpainting-main-area",children:[w(C6e,{}),w("div",{className:"inpainting-canvas-area",children:n?w(Gwe,{}):w(Uwe,{})})]}):w($B,{})," "]}),t&&w("div",{className:"workarea-split-view-right",children:w(X7,{})})]})};function E6e(){return w(o_,{optionsPanel:w(gxe,{}),styleClass:"inpainting-workarea-overrides",children:w(k6e,{})})}function P6e(){const e=Me(n=>n.options.showAdvancedOptions),t={seed:{header:w(D7,{}),feature:Ji.SEED,options:w(z7,{})},variations:{header:w(B7,{}),feature:Ji.VARIATIONS,options:w($7,{})},face_restore:{header:w(R7,{}),feature:Ji.FACE_CORRECTION,options:w(fx,{})},upscale:{header:w(F7,{}),feature:Ji.UPSCALE,options:w(hx,{})},other:{header:w(fB,{}),feature:Ji.OTHER,options:w(hB,{})}};return ne(Z7,{children:[w(j7,{}),w(G7,{}),w(V7,{}),w(H7,{}),e?w(U7,{accordionInfo:t}):null]})}const T6e=()=>w("div",{className:"workarea-single-view",children:w("div",{className:"text-to-image-area",children:w(X7,{})})});function L6e(){return w(o_,{optionsPanel:w(P6e,{}),children:w(T6e,{})})}const pf={txt2img:{title:w(Bve,{fill:"black",boxSize:"2.5rem"}),workarea:w(L6e,{}),tooltip:"Text To Image"},img2img:{title:w(Ove,{fill:"black",boxSize:"2.5rem"}),workarea:w(ixe,{}),tooltip:"Image To Image"},inpainting:{title:w(Nve,{fill:"black",boxSize:"2.5rem"}),workarea:w(E6e,{}),tooltip:"Inpainting"},outpainting:{title:w(zve,{fill:"black",boxSize:"2.5rem"}),workarea:w(Mve,{}),tooltip:"Outpainting"},nodes:{title:w(Dve,{fill:"black",boxSize:"2.5rem"}),workarea:w(Ive,{}),tooltip:"Nodes"},postprocess:{title:w(Fve,{fill:"black",boxSize:"2.5rem"}),workarea:w(Rve,{}),tooltip:"Post Processing"}},Ex=ht.map(pf,(e,t)=>t);[...Ex];function A6e(){const e=Me(i=>i.options.activeTab),t=Xe();_t("1",()=>{t(Ea(0))}),_t("2",()=>{t(Ea(1))}),_t("3",()=>{t(Ea(2)),t(su(!0))}),_t("4",()=>{t(Ea(3))}),_t("5",()=>{t(Ea(4))}),_t("6",()=>{t(Ea(5))});const n=()=>{const i=[];return Object.keys(pf).forEach(o=>{i.push(w($i,{hasArrow:!0,label:pf[o].tooltip,placement:"right",children:w(AF,{children:pf[o].title})},o))}),i},r=()=>{const i=[];return Object.keys(pf).forEach(o=>{i.push(w(TF,{className:"app-tabs-panel",children:pf[o].workarea},o))}),i};return ne(PF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:i=>{t(Ea(i)),t(su(!0))},children:[w("div",{className:"app-tabs-list",children:n()}),w(LF,{className:"app-tabs-panels",children:r()})]})}const mH={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1},I6e=mH,vH=Q5({name:"options",initialState:I6e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=d3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:c,seamless:p,hires_fix:g,width:m,height:y}=t.payload.image;o&&o.length>0?(e.seedWeights=L4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=d3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),c&&(e.perlin=c),typeof c>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),y&&(e.height=y)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:c,perlin:p,seamless:g,hires_fix:m,width:y,height:b,strength:S,fit:T,init_image_path:E,mask_image_path:k}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),k&&(e.maskPath=k),S&&(e.img2imgStrength=S),typeof T=="boolean"&&(e.shouldFitToWidthHeight=T)),a&&a.length>0?(e.seedWeights=L4(a),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=d3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),c&&(e.threshold=c),typeof c>"u"&&(e.threshold=0),p&&(e.perlin=p),typeof p>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),y&&(e.width=y),b&&(e.height=b)},resetOptionsState:e=>({...e,...mH}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=Ex.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload}}}),{setPrompt:Px,setIterations:M6e,setSteps:yH,setCfgScale:xH,setThreshold:R6e,setPerlin:O6e,setHeight:bH,setWidth:SH,setSampler:wH,setSeed:Ov,setSeamless:CH,setHiresFix:_H,setImg2imgStrength:kH,setFacetoolStrength:v3,setFacetoolType:y3,setCodeformerFidelity:EH,setUpscalingLevel:A8,setUpscalingStrength:I8,setMaskPath:M8,resetSeed:$Ce,resetOptionsState:HCe,setShouldFitToWidthHeight:PH,setParameter:WCe,setShouldGenerateVariations:N6e,setSeedWeights:TH,setVariationAmount:D6e,setAllParameters:z6e,setShouldRunFacetool:F6e,setShouldRunESRGAN:B6e,setShouldRandomizeSeed:$6e,setShowAdvancedOptions:H6e,setActiveTab:Ea,setShouldShowImageDetails:LH,setAllTextToImageParameters:W6e,setAllImageToImageParameters:V6e,setShowDualDisplay:U6e,setInitialImage:ov,clearInitialImage:AH,setShouldShowOptionsPanel:x3,setShouldPinOptionsPanel:G6e,setOptionsPanelScrollPosition:j6e,setShouldHoldOptionsPanelOpen:q6e,setShouldLoopback:K6e}=vH.actions,Z6e=vH.reducer,kl=Object.create(null);kl.open="0";kl.close="1";kl.ping="2";kl.pong="3";kl.message="4";kl.upgrade="5";kl.noop="6";const b3=Object.create(null);Object.keys(kl).forEach(e=>{b3[kl[e]]=e});const Y6e={type:"error",data:"parser error"},X6e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Q6e=typeof ArrayBuffer=="function",J6e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,IH=({type:e,data:t},n,r)=>X6e&&t instanceof Blob?n?r(t):eI(t,r):Q6e&&(t instanceof ArrayBuffer||J6e(t))?n?r(t):eI(new Blob([t]),r):r(kl[e]+(t||"")),eI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},tI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zg=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),p=new Uint8Array(c);for(r=0;r>4,p[i++]=(a&15)<<4|s>>2,p[i++]=(s&3)<<6|l&63;return c},t8e=typeof ArrayBuffer=="function",MH=(e,t)=>{if(typeof e!="string")return{type:"message",data:RH(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:n8e(e.substring(1),t)}:b3[n]?e.length>1?{type:b3[n],data:e.substring(1)}:{type:b3[n]}:Y6e},n8e=(e,t)=>{if(t8e){const n=e8e(e);return RH(n,t)}else return{base64:!0,data:e}},RH=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},OH=String.fromCharCode(30),r8e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{IH(o,!1,s=>{r[a]=s,++i===n&&t(r.join(OH))})})},i8e=(e,t)=>{const n=e.split(OH),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function DH(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const a8e=setTimeout,s8e=clearTimeout;function Tx(e,t){t.useNativeTimers?(e.setTimeoutFn=a8e.bind(Oc),e.clearTimeoutFn=s8e.bind(Oc)):(e.setTimeoutFn=setTimeout.bind(Oc),e.clearTimeoutFn=clearTimeout.bind(Oc))}const l8e=1.33;function u8e(e){return typeof e=="string"?c8e(e):Math.ceil((e.byteLength||e.size)*l8e)}function c8e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class d8e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class zH extends Vr{constructor(t){super(),this.writable=!1,Tx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new d8e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=MH(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const FH="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),R8=64,f8e={};let nI=0,Ay=0,rI;function iI(e){let t="";do t=FH[e%R8]+t,e=Math.floor(e/R8);while(e>0);return t}function BH(){const e=iI(+new Date);return e!==rI?(nI=0,rI=e):e+"."+iI(nI++)}for(;Ay{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};i8e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,r8e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=BH()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=$H(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new bl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class bl extends Vr{constructor(t,n){super(),Tx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=DH(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new WH(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=bl.requestsCount++,bl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=g8e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete bl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}bl.requestsCount=0;bl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",oI);else if(typeof addEventListener=="function"){const e="onpagehide"in Oc?"pagehide":"unload";addEventListener(e,oI,!1)}}function oI(){for(let e in bl.requests)bl.requests.hasOwnProperty(e)&&bl.requests[e].abort()}const VH=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Iy=Oc.WebSocket||Oc.MozWebSocket,aI=!0,y8e="arraybuffer",sI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class x8e extends zH{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=sI?{}:DH(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=aI&&!sI?n?new Iy(t,n):new Iy(t):new Iy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||y8e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{aI&&this.ws.send(o)}catch{}i&&VH(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=BH()),this.supportsBinary||(t.b64=1);const i=$H(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Iy}}const b8e={websocket:x8e,polling:v8e},S8e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,w8e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function O8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=S8e.exec(e||""),o={},a=14;for(;a--;)o[w8e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=C8e(o,o.path),o.queryKey=_8e(o,o.query),o}function C8e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function _8e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Tc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=O8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=O8(n.host).host),Tx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=h8e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=NH,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new b8e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Tc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Tc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Tc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,p(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function c(g){n&&g.name!==n.name&&o()}const p=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",Tc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Tc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,UH=Object.prototype.toString,T8e=typeof Blob=="function"||typeof Blob<"u"&&UH.call(Blob)==="[object BlobConstructor]",L8e=typeof File=="function"||typeof File<"u"&&UH.call(File)==="[object FileConstructor]";function v_(e){return E8e&&(e instanceof ArrayBuffer||P8e(e))||T8e&&e instanceof Blob||L8e&&e instanceof File}function S3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case en.ACK:case en.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class O8e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=I8e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const N8e=Object.freeze(Object.defineProperty({__proto__:null,protocol:M8e,get PacketType(){return en},Encoder:R8e,Decoder:y_},Symbol.toStringTag,{value:"Module"}));function fs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const D8e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class GH extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fs(t,"open",this.onopen.bind(this)),fs(t,"packet",this.onpacket.bind(this)),fs(t,"error",this.onerror.bind(this)),fs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(D8e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:en.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:en.CONNECT,data:t})}):this.packet({type:en.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case en.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case en.EVENT:case en.BINARY_EVENT:this.onevent(t);break;case en.ACK:case en.BINARY_ACK:this.onack(t);break;case en.DISCONNECT:this.ondisconnect();break;case en.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:en.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:en.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}U0.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};U0.prototype.reset=function(){this.attempts=0};U0.prototype.setMin=function(e){this.ms=e};U0.prototype.setMax=function(e){this.max=e};U0.prototype.setJitter=function(e){this.jitter=e};class z8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Tx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new U0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||N8e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Tc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=fs(n,"open",function(){r.onopen(),t&&t()}),o=fs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fs(t,"ping",this.onping.bind(this)),fs(t,"data",this.ondata.bind(this)),fs(t,"error",this.onerror.bind(this)),fs(t,"close",this.onclose.bind(this)),fs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){VH(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new GH(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const yg={};function w3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=k8e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=yg[i]&&o in yg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new z8(r,t):(yg[i]||(yg[i]=new z8(r,t)),l=yg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(w3,{Manager:z8,Socket:GH,io:w3,connect:w3});let My;const z8e=new Uint8Array(16);function F8e(){if(!My&&(My=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!My))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return My(z8e)}const xi=[];for(let e=0;e<256;++e)xi.push((e+256).toString(16).slice(1));function B8e(e,t=0){return(xi[e[t+0]]+xi[e[t+1]]+xi[e[t+2]]+xi[e[t+3]]+"-"+xi[e[t+4]]+xi[e[t+5]]+"-"+xi[e[t+6]]+xi[e[t+7]]+"-"+xi[e[t+8]]+xi[e[t+9]]+"-"+xi[e[t+10]]+xi[e[t+11]]+xi[e[t+12]]+xi[e[t+13]]+xi[e[t+14]]+xi[e[t+15]]).toLowerCase()}const $8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lI={randomUUID:$8e};function xg(e,t,n){if(lI.randomUUID&&!t&&!e)return lI.randomUUID();e=e||{};const r=e.random||(e.rng||F8e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return B8e(r)}var H8e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,W8e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,V8e=/[^-+\dA-Z]/g;function wi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(uI[t]||t||uI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},c=function(){return e[o()+"FullYear"]()},p=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},y=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},S=function(){return U8e(e)},T=function(){return G8e(e)},E={d:function(){return a()},dd:function(){return Zo(a())},ddd:function(){return bo.dayNames[s()]},DDD:function(){return cI({y:c(),m:l(),d:a(),_:o(),dayName:bo.dayNames[s()],short:!0})},dddd:function(){return bo.dayNames[s()+7]},DDDD:function(){return cI({y:c(),m:l(),d:a(),_:o(),dayName:bo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Zo(l()+1)},mmm:function(){return bo.monthNames[l()]},mmmm:function(){return bo.monthNames[l()+12]},yy:function(){return String(c()).slice(2)},yyyy:function(){return Zo(c(),4)},h:function(){return p()%12||12},hh:function(){return Zo(p()%12||12)},H:function(){return p()},HH:function(){return Zo(p())},M:function(){return g()},MM:function(){return Zo(g())},s:function(){return m()},ss:function(){return Zo(m())},l:function(){return Zo(y(),3)},L:function(){return Zo(Math.floor(y()/10))},t:function(){return p()<12?bo.timeNames[0]:bo.timeNames[1]},tt:function(){return p()<12?bo.timeNames[2]:bo.timeNames[3]},T:function(){return p()<12?bo.timeNames[4]:bo.timeNames[5]},TT:function(){return p()<12?bo.timeNames[6]:bo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":j8e(e)},o:function(){return(b()>0?"-":"+")+Zo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Zo(Math.floor(Math.abs(b())/60),2)+":"+Zo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return S()},WW:function(){return Zo(S())},N:function(){return T()}};return t.replace(H8e,function(k){return k in E?E[k]():k.slice(1,k.length-1)})}var uI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},bo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Zo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},cI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,c=new Date,p=new Date;p.setDate(p[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return c[o+"Date"]()},y=function(){return c[o+"Month"]()},b=function(){return c[o+"FullYear"]()},S=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},E=function(){return p[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&y()===r&&m()===i?l?"Tdy":"Today":E()===n&&T()===r&&S()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},U8e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},G8e=function(t){var n=t.getDay();return n===0&&(n=7),n},j8e=function(t){return(String(t).match(W8e)||[""]).pop().replace(V8e,"").replace(/GMT\+0000/g,"UTC")};const q8e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(zL(!0)),t(ES("Connected"));const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(r8("user")),r.categories.result.latest_mtime?t(WL("result")):t(r8("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(zL(!1)),t(ES("Disconnected")),t(Si({timestamp:wi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:xg(),...r,category:"result"};if(t(uy({category:"result",image:a})),i)switch(Ex[o]){case"img2img":{t(ov(a));break}case"inpainting":{t(A4(a));break}}t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(n3e({uuid:xg(),...r})),r.isBase64||t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(uy({category:"result",image:{uuid:xg(),...r,category:"result"}})),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(r0(!0)),t(b2e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(t8()),t(QL())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:xg(),...l}));t(t3e({images:s,areMoreImagesAvailable:o,category:a})),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(C2e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(uy({category:"result",image:r})),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(QL())),t(Si({timestamp:wi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(WB(r));const{initialImage:o,maskPath:a}=n().options,{imageToInpaint:s}=n().inpainting;(o?.url===i||o===i)&&t(AH()),s?.url===i&&t(zB()),a===i&&t(M8("")),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:xg(),...o};try{switch(t(uy({image:a,category:"user"})),i){case"img2img":{t(ov(a));break}case"inpainting":{t(A4(a));break}default:{t(VB(a));break}}t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(M8(i)),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(S2e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(FL(o)),t(ES("Model Changed")),t(r0(!1)),t(BL(!0)),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(FL(o)),t(r0(!1)),t(BL(!0)),t(t8()),t(Si({timestamp:wi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},K8e=(e,t)=>{const{width:n,height:r}=e,i=document.createElement("div"),o=new m3.Stage({container:i,width:n,height:r}),a=new m3.Layer;return o.add(a),t.forEach(s=>a.add(new m3.Line({points:s.points,stroke:"rgb(0,0,0)",strokeWidth:s.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:s.tool==="brush"?"source-over":"destination-out"}))),a.draw(),i.remove(),{stage:o,layer:a}},Z8e=(e,t)=>{const n=e.toCanvas().getContext("2d")?.getImageData(t.x,t.y,t.width,t.height);if(!n)throw new Error("Unable to get image data from generated canvas");return!new Uint32Array(n.data.buffer).some(i=>i!==0)},Y8e=(e,t,n)=>{const{stage:r,layer:i}=K8e(e,t),o=Z8e(r,n);return i.add(new m3.Image({image:e,globalCompositeOperation:"source-out"})),{maskDataURL:r.toDataURL({...n}),isMaskEmpty:o}},X8e=e=>{const{generationMode:t,optionsState:n,inpaintingState:r,systemState:i,imageToProcessUrl:o,maskImageElement:a}=e,{prompt:s,iterations:l,steps:c,cfgScale:p,threshold:g,perlin:m,height:y,width:b,sampler:S,seed:T,seamless:E,hiresFix:k,img2imgStrength:L,initialImage:I,shouldFitToWidthHeight:O,shouldGenerateVariations:D,variationAmount:N,seedWeights:z,shouldRunESRGAN:W,upscalingLevel:V,upscalingStrength:q,shouldRunFacetool:he,facetoolStrength:de,codeformerFidelity:ve,facetoolType:Ee,shouldRandomizeSeed:xe}=n,{shouldDisplayInProgressType:Z,saveIntermediatesInterval:U}=i,ee={prompt:s,iterations:xe||D?l:1,steps:c,cfg_scale:p,threshold:g,perlin:m,height:y,width:b,sampler_name:S,seed:T,progress_images:Z==="full-res",progress_latents:Z==="latents",save_intermediates:U};if(ee.seed=xe?pB(O7,N7):T,["txt2img","img2img"].includes(t)&&(ee.seamless=E,ee.hires_fix=k),t==="img2img"&&I&&(ee.init_img=typeof I=="string"?I:I.url,ee.strength=L,ee.fit=O),t==="inpainting"&&a){const{lines:me,boundingBoxCoordinate:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je}=r,ut={...ye,...Se};ee.init_img=o,ee.strength=L,ee.fit=!1;const{maskDataURL:qe,isMaskEmpty:ot}=Y8e(a,me,ut);ee.is_mask_empty=ot,ee.init_mask=qe.split("data:image/png;base64,")[1],je&&(ee.inpaint_replace=He),ee.bounding_box=ut,ee.progress_images=!1}D?(ee.variation_amount=N,z&&(ee.with_variations=xve(z))):ee.variation_amount=0;let ae=!1,X=!1;return W&&(ae={level:V,strength:q}),he&&(X={type:Ee,strength:de},Ee==="codeformer"&&(X.codeformer_fidelity=ve)),{generationParameters:ee,esrganParameters:ae,facetoolParameters:X}},Q8e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(r0(!0));const o=r(),{options:a,system:s,inpainting:l,gallery:c}=o,p={generationMode:i,optionsState:a,inpaintingState:l,systemState:s};if(i==="inpainting"){if(!F4.current||!l.imageToInpaint?.url){n(Si({timestamp:wi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(t8());return}p.imageToProcessUrl=l.imageToInpaint.url,p.maskImageElement=F4.current}else if(!["txt2img","img2img"].includes(i)){if(!c.currentImage?.url)return;p.imageToProcessUrl=c.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:y}=X8e(p);t.emit("generateImage",g,m,y),g.init_mask&&(g.init_mask=g.init_mask.substr(0,20).concat("...")),n(Si({timestamp:wi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...y})}`}))},emitRunESRGAN:i=>{n(r0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Si({timestamp:wi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(r0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,c={facetool_strength:s};a==="codeformer"&&(c.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...c}),n(Si({timestamp:wi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...c})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(WB(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(_2e()),t.emit("requestModelChange",i)}}},J8e=()=>{const{origin:e}=new URL(window.location.href),t=w3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:c,onPostprocessingResult:p,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:y,onGalleryImages:b,onProcessingCanceled:S,onImageDeleted:T,onImageUploaded:E,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=q8e(i),{emitGenerateImage:D,emitRunESRGAN:N,emitRunFacetool:z,emitDeleteImage:W,emitRequestImages:V,emitRequestNewImages:q,emitCancelProcessing:he,emitUploadImage:de,emitUploadMaskImage:ve,emitRequestSystemConfig:Ee,emitRequestModelChange:xe}=Q8e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Z=>c(Z)),t.on("generationResult",Z=>g(Z)),t.on("postprocessingResult",Z=>p(Z)),t.on("intermediateResult",Z=>m(Z)),t.on("progressUpdate",Z=>y(Z)),t.on("galleryImages",Z=>b(Z)),t.on("processingCanceled",()=>{S()}),t.on("imageDeleted",Z=>{T(Z)}),t.on("imageUploaded",Z=>{E(Z)}),t.on("maskImageUploaded",Z=>{k(Z)}),t.on("systemConfig",Z=>{L(Z)}),t.on("modelChanged",Z=>{I(Z)}),t.on("modelChangeFailed",Z=>{O(Z)}),n=!0),a.type){case"socketio/generateImage":{D(a.payload);break}case"socketio/runESRGAN":{N(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{W(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{q(a.payload);break}case"socketio/cancelProcessing":{he();break}case"socketio/uploadImage":{de(a.payload);break}case"socketio/uploadMaskImage":{ve(a.payload);break}case"socketio/requestSystemConfig":{Ee();break}case"socketio/requestModelChange":{xe(a.payload);break}}o(a)}},e9e={key:"root",storage:Av,stateReconciler:cx,blacklist:["gallery","system","inpainting"]},t9e={key:"system",storage:Av,stateReconciler:cx,blacklist:["isCancelable","isConnected","isProcessing","currentStep","socketId","isESRGANAvailable","isGFPGANAvailable","currentStep","totalSteps","currentIteration","totalIterations","currentStatus"]},n9e={key:"gallery",storage:Av,stateReconciler:cx,whitelist:["galleryWidth","shouldPinGallery","shouldShowGallery","galleryScrollPosition","galleryImageMinimumWidth","galleryImageObjectFit"]},r9e={key:"inpainting",storage:Av,stateReconciler:cx,blacklist:["pastLines","futuresLines","cursorPosition"]},i9e=$F({options:Z6e,gallery:u3(n9e,l3e),system:u3(t9e,E2e),inpainting:u3(r9e,Kye)}),o9e=u3(e9e,i9e),jH=tme({reducer:o9e,middleware:e=>e({serializableCheck:!1}).concat(J8e())}),Xe=$me,Me=Lme;function C3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C3=function(n){return typeof n}:C3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},C3(e)}function a9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dI(e,t){for(var n=0;n({textColor:e.colorMode==="dark"?"gray.800":"gray.100"})},Accordion:{baseStyle:e=>({button:{fontWeight:"bold",_hover:{bgColor:e.colorMode==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}},panel:{paddingBottom:2}})},FormLabel:{baseStyle:{fontWeight:"light"}},Button:{variants:{imageHoverIconButton:e=>({bg:e.colorMode==="dark"?"blackAlpha.700":"whiteAlpha.800",color:e.colorMode==="dark"?"whiteAlpha.700":"blackAlpha.700",_hover:{bg:e.colorMode==="dark"?"blackAlpha.800":"whiteAlpha.800",color:e.colorMode==="dark"?"whiteAlpha.900":"blackAlpha.900"}})}}}}),c9e=()=>w(Dn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:w(Cv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),d9e=St(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),f9e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Me(d9e),i=t?Math.round(t*100/n):0;return w(uF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function h9e(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[w("p",{className:"hotkey-title",children:t}),r&&w("p",{className:"hotkey-description",children:r})]}),w("div",{className:"hotkey-key",children:n})]})}function p9e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=m4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Theme Toggle",desc:"Switch between dark and light modes",hotkey:"Shift+D"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+Q"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"Q"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=c=>{const p=[];return c.forEach((g,m)=>{p.push(w(h9e,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),w("div",{className:"hotkey-modal-category",children:p})};return ne(Fn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(S0,{isOpen:t,onClose:r,children:[w(Xm,{}),ne(Ym,{className:"hotkeys-modal",children:[w(a7,{}),w("h1",{children:"Keyboard Shorcuts"}),w("div",{className:"hotkeys-modal-items",children:ne(F5,{allowMultiple:!0,children:[ne(kf,{children:[ne(Cf,{className:"hotkeys-modal-button",children:[w("h2",{children:"App Hotkeys"}),w(_f,{})]}),w(Ef,{children:l(i)})]}),ne(kf,{children:[ne(Cf,{className:"hotkeys-modal-button",children:[w("h2",{children:"General Hotkeys"}),w(_f,{})]}),w(Ef,{children:l(o)})]}),ne(kf,{children:[ne(Cf,{className:"hotkeys-modal-button",children:[w("h2",{children:"Gallery Hotkeys"}),w(_f,{})]}),w(Ef,{children:l(a)})]}),ne(kf,{children:[ne(Cf,{className:"hotkeys-modal-button",children:[w("h2",{children:"Inpainting Hotkeys"}),w(_f,{})]}),w(Ef,{children:l(s)})]})]})})]})]})]})}const g9e=e=>{const{isProcessing:t,isConnected:n}=Me(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(wye(i))};return ne("div",{className:"model-list-item",children:[w($i,{label:a,hasArrow:!0,placement:"bottom",children:w("div",{className:"model-list-item-name",children:i})}),w(zD,{}),w("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),w("div",{className:"model-list-item-load-btn",children:w(Oa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},m9e=St(e=>e.system,e=>{const t=ht.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),v9e=()=>{const{models:e}=Me(m9e);return w(F5,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(kf,{children:[w(Cf,{children:ne("div",{className:"model-list-button",children:[w("h2",{children:"Models"}),w(_f,{})]})}),w(Ef,{children:w("div",{className:"model-list-list",children:e.map((t,n)=>w(g9e,{name:t.name,status:t.status,description:t.description},n))})})]})})},y9e=St(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:ht.map(i,(o,a)=>a)}},{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),x9e=({children:e})=>{const t=Xe(),n=Me(S=>S.system.saveIntermediatesInterval),r=Me(S=>S.options.steps),{isOpen:i,onOpen:o,onClose:a}=m4(),{isOpen:s,onOpen:l,onClose:c}=m4(),{shouldDisplayInProgressType:p,shouldConfirmOnDelete:g,shouldDisplayGuides:m}=Me(y9e),y=()=>{oW.purge().then(()=>{a(),l()})},b=S=>{S>r&&(S=r),S<1&&(S=1),t(k2e(S))};return ne(Fn,{children:[C.exports.cloneElement(e,{onClick:o}),ne(S0,{isOpen:i,onClose:a,children:[w(Xm,{}),ne(Ym,{className:"settings-modal",children:[w(l7,{className:"settings-modal-header",children:"Settings"}),w(a7,{}),ne(b4,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[w("div",{className:"settings-modal-item",children:w(v9e,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[w(F0,{label:"Display In-Progress Images",validValues:jve,value:p,onChange:S=>t(y2e(S.target.value))}),p==="full-res"&&w(no,{label:"Save images every n steps",min:1,max:r,step:1,onChange:b,value:n,width:"auto",textAlign:"center"})]}),w(wl,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:g,onChange:S=>t(mB(S.target.checked))}),w(wl,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:m,onChange:S=>t(w2e(S.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[w(Rf,{size:"md",children:"Reset Web UI"}),w(Oa,{colorScheme:"red",onClick:y,children:"Reset Web UI"}),w(wo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),w(wo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),w(s7,{children:w(Oa,{onClick:a,children:"Close"})})]})]}),ne(S0,{closeOnOverlayClick:!1,isOpen:s,onClose:c,isCentered:!0,children:[w(Xm,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),w(Ym,{children:w(b4,{pb:6,pt:6,children:w(Dn,{justifyContent:"center",children:w(wo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},b9e=St(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),S9e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Me(b9e),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let c=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(c.toLowerCase())&&(l="status-working"),c&&t&&r>1&&(c+=` (${n}/${r})`),w($i,{label:o&&!a?"Click to clear, check logs for details":void 0,children:w(wo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(vB())},className:`status ${l}`,children:c})})},w9e=()=>{const{colorMode:e,toggleColorMode:t}=o5();return _t("shift+d",()=>{t()},[e,t]),ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[w("img",{src:BB,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",w("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[w(S9e,{}),w(p9e,{children:w(Ut,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:w(X2e,{})})}),w(Ut,{"aria-label":"Toggle Dark Mode",tooltip:"Dark Mode",onClick:t,variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:e==="light"?w(eye,{}):w(cye,{})}),w(Ut,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:w(Of,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:w(U2e,{})})}),w(Ut,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:w(Of,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:w(B2e,{})})}),w(Ut,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:w(Of,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:w(F2e,{})})}),w(x9e,{children:w(Ut,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:w(_B,{})})})]})]})},C9e=St(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),_9e=St(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:la.exports.isEqual}}),k9e=()=>{const e=Xe(),t=Me(C9e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Me(_9e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(vB()),e(kS(!n))};return _t("`",()=>{e(kS(!n))},[n]),_t("esc",()=>{e(kS(!1))}),ne(Fn,{children:[n&&w(KB,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:w("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:y,level:b}=p;return ne("div",{className:`console-entry console-${b}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),w("p",{className:"console-message",children:y})]},g)})})}),n&&w($i,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:w(gu,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:w($2e,{}),onClick:()=>a(!o)})}),w($i,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:w(gu,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?w(J2e,{}):w(SB,{}),onClick:l})})]})};function E9e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var P9e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Nv(e,t){var n=T9e(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function T9e(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=P9e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var L9e=[".DS_Store","Thumbs.db"];function A9e(e){return M0(this,void 0,void 0,function(){return R0(this,function(t){return B4(e)&&I9e(e.dataTransfer)?[2,N9e(e.dataTransfer,e.type)]:M9e(e)?[2,R9e(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,O9e(e)]:[2,[]]})})}function I9e(e){return B4(e)}function M9e(e){return B4(e)&&B4(e.target)}function B4(e){return typeof e=="object"&&e!==null}function R9e(e){return $8(e.target.files).map(function(t){return Nv(t)})}function O9e(e){return M0(this,void 0,void 0,function(){var t;return R0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Nv(r)})]}})})}function N9e(e,t){return M0(this,void 0,void 0,function(){var n,r;return R0(this,function(i){switch(i.label){case 0:return e.items?(n=$8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(D9e))]):[3,2];case 1:return r=i.sent(),[2,hI(KH(r))];case 2:return[2,hI($8(e.files).map(function(o){return Nv(o)}))]}})})}function hI(e){return e.filter(function(t){return L9e.indexOf(t.name)===-1})}function $8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,yI(n)];if(e.sizen)return[!1,yI(n)]}return[!0,null]}function gf(e){return e!=null}function Q9e(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var c=QH(l,n),p=av(c,1),g=p[0],m=JH(l,r,i),y=av(m,1),b=y[0],S=s?s(l):null;return g&&b&&!S})}function $4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ry(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function bI(e){e.preventDefault()}function J9e(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function eCe(e){return e.indexOf("Edge/")!==-1}function tCe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return J9e(e)||eCe(e)}function el(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function yCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var x_=C.exports.forwardRef(function(e,t){var n=e.children,r=H4(e,sCe),i=iW(r),o=i.open,a=H4(i,lCe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),w(C.exports.Fragment,{children:n(sr(sr({},a),{},{open:o}))})});x_.displayName="Dropzone";var rW={disabled:!1,getFilesFromEvent:A9e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};x_.defaultProps=rW;x_.propTypes={children:An.exports.func,accept:An.exports.objectOf(An.exports.arrayOf(An.exports.string)),multiple:An.exports.bool,preventDropOnDocument:An.exports.bool,noClick:An.exports.bool,noKeyboard:An.exports.bool,noDrag:An.exports.bool,noDragEventsBubbling:An.exports.bool,minSize:An.exports.number,maxSize:An.exports.number,maxFiles:An.exports.number,disabled:An.exports.bool,getFilesFromEvent:An.exports.func,onFileDialogCancel:An.exports.func,onFileDialogOpen:An.exports.func,useFsAccessApi:An.exports.bool,autoFocus:An.exports.bool,onDragEnter:An.exports.func,onDragLeave:An.exports.func,onDragOver:An.exports.func,onDrop:An.exports.func,onDropAccepted:An.exports.func,onDropRejected:An.exports.func,onError:An.exports.func,validator:An.exports.func};var U8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function iW(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=sr(sr({},rW),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,p=t.onDragLeave,g=t.onDragOver,m=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,S=t.onFileDialogCancel,T=t.onFileDialogOpen,E=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,D=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,W=t.validator,V=C.exports.useMemo(function(){return iCe(n)},[n]),q=C.exports.useMemo(function(){return rCe(n)},[n]),he=C.exports.useMemo(function(){return typeof T=="function"?T:wI},[T]),de=C.exports.useMemo(function(){return typeof S=="function"?S:wI},[S]),ve=C.exports.useRef(null),Ee=C.exports.useRef(null),xe=C.exports.useReducer(xCe,U8),Z=qS(xe,2),U=Z[0],ee=Z[1],ae=U.isFocused,X=U.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&nCe()),ye=function(){!me.current&&X&&setTimeout(function(){if(Ee.current){var Ze=Ee.current.files;Ze.length||(ee({type:"closeDialog"}),de())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[Ee,X,de,me]);var Se=C.exports.useRef([]),He=function(Ze){ve.current&&ve.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",bI,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",bI),document.removeEventListener("drop",He))}},[ve,L]),C.exports.useEffect(function(){return!r&&k&&ve.current&&ve.current.focus(),function(){}},[ve,k,r]);var je=C.exports.useCallback(function(Re){z?z(Re):console.error(Re)},[z]),ut=C.exports.useCallback(function(Re){Re.preventDefault(),Re.persist(),wt(Re),Se.current=[].concat(dCe(Se.current),[Re.target]),Ry(Re)&&Promise.resolve(i(Re)).then(function(Ze){if(!($4(Re)&&!N)){var Zt=Ze.length,Gt=Zt>0&&Q9e({files:Ze,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:W}),_e=Zt>0&&!Gt;ee({isDragAccept:Gt,isDragReject:_e,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Re)}}).catch(function(Ze){return je(Ze)})},[i,c,je,N,V,a,o,s,l,W]),qe=C.exports.useCallback(function(Re){Re.preventDefault(),Re.persist(),wt(Re);var Ze=Ry(Re);if(Ze&&Re.dataTransfer)try{Re.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Re),!1},[g,N]),ot=C.exports.useCallback(function(Re){Re.preventDefault(),Re.persist(),wt(Re);var Ze=Se.current.filter(function(Gt){return ve.current&&ve.current.contains(Gt)}),Zt=Ze.indexOf(Re.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ry(Re)&&p&&p(Re))},[ve,p,N]),tt=C.exports.useCallback(function(Re,Ze){var Zt=[],Gt=[];Re.forEach(function(_e){var Tt=QH(_e,V),De=qS(Tt,2),nt=De[0],rn=De[1],Mn=JH(_e,a,o),Be=qS(Mn,2),ct=Be[0],Qe=Be[1],Mt=W?W(_e):null;if(nt&&ct&&!Mt)Zt.push(_e);else{var Yt=[rn,Qe];Mt&&(Yt=Yt.concat(Mt)),Gt.push({file:_e,errors:Yt.filter(function(Zn){return Zn})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(_e){Gt.push({file:_e,errors:[X9e]})}),Zt.splice(0)),ee({acceptedFiles:Zt,fileRejections:Gt,type:"setFiles"}),m&&m(Zt,Gt,Ze),Gt.length>0&&b&&b(Gt,Ze),Zt.length>0&&y&&y(Zt,Ze)},[ee,s,V,a,o,l,m,y,b,W]),at=C.exports.useCallback(function(Re){Re.preventDefault(),Re.persist(),wt(Re),Se.current=[],Ry(Re)&&Promise.resolve(i(Re)).then(function(Ze){$4(Re)&&!N||tt(Ze,Re)}).catch(function(Ze){return je(Ze)}),ee({type:"reset"})},[i,tt,je,N]),Rt=C.exports.useCallback(function(){if(me.current){ee({type:"openDialog"}),he();var Re={multiple:s,types:q};window.showOpenFilePicker(Re).then(function(Ze){return i(Ze)}).then(function(Ze){tt(Ze,null),ee({type:"closeDialog"})}).catch(function(Ze){oCe(Ze)?(de(Ze),ee({type:"closeDialog"})):aCe(Ze)?(me.current=!1,Ee.current?(Ee.current.value=null,Ee.current.click()):je(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):je(Ze)});return}Ee.current&&(ee({type:"openDialog"}),he(),Ee.current.value=null,Ee.current.click())},[ee,he,de,E,tt,je,q,s]),kt=C.exports.useCallback(function(Re){!ve.current||!ve.current.isEqualNode(Re.target)||(Re.key===" "||Re.key==="Enter"||Re.keyCode===32||Re.keyCode===13)&&(Re.preventDefault(),Rt())},[ve,Rt]),Le=C.exports.useCallback(function(){ee({type:"focus"})},[]),st=C.exports.useCallback(function(){ee({type:"blur"})},[]),Lt=C.exports.useCallback(function(){I||(tCe()?setTimeout(Rt,0):Rt())},[I,Rt]),it=function(Ze){return r?null:Ze},mt=function(Ze){return O?null:it(Ze)},Sn=function(Ze){return D?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Re.refKey,Zt=Ze===void 0?"ref":Ze,Gt=Re.role,_e=Re.onKeyDown,Tt=Re.onFocus,De=Re.onBlur,nt=Re.onClick,rn=Re.onDragEnter,Mn=Re.onDragOver,Be=Re.onDragLeave,ct=Re.onDrop,Qe=H4(Re,uCe);return sr(sr(V8({onKeyDown:mt(el(_e,kt)),onFocus:mt(el(Tt,Le)),onBlur:mt(el(De,st)),onClick:it(el(nt,Lt)),onDragEnter:Sn(el(rn,ut)),onDragOver:Sn(el(Mn,qe)),onDragLeave:Sn(el(Be,ot)),onDrop:Sn(el(ct,at)),role:typeof Gt=="string"&&Gt!==""?Gt:"presentation"},Zt,ve),!r&&!O?{tabIndex:0}:{}),Qe)}},[ve,kt,Le,st,Lt,ut,qe,ot,at,O,D,r]),wn=C.exports.useCallback(function(Re){Re.stopPropagation()},[]),pn=C.exports.useMemo(function(){return function(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Re.refKey,Zt=Ze===void 0?"ref":Ze,Gt=Re.onChange,_e=Re.onClick,Tt=H4(Re,cCe),De=V8({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:it(el(Gt,at)),onClick:it(el(_e,wn)),tabIndex:-1},Zt,Ee);return sr(sr({},De),Tt)}},[Ee,n,s,at,r]);return sr(sr({},U),{},{isFocused:ae&&!r,getRootProps:Kt,getInputProps:pn,rootRef:ve,inputRef:Ee,open:it(Rt)})}function xCe(e,t){switch(t.type){case"focus":return sr(sr({},e),{},{isFocused:!0});case"blur":return sr(sr({},e),{},{isFocused:!1});case"openDialog":return sr(sr({},U8),{},{isFileDialogActive:!0});case"closeDialog":return sr(sr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return sr(sr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return sr(sr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return sr({},U8);default:return e}}function wI(){}const bCe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return _t("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&w("div",{className:"dropzone-overlay is-drag-accept",children:ne(Rf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[w(Rf,{size:"lg",children:"Invalid Upload"}),w(Rf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},SCe=e=>{const{children:t}=e,n=Xe(),r=Me(Cr),i=ld({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(E=>{a(!0);const k=E.errors.reduce((L,I)=>L+` -`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(E=>{a(!0);const k={file:E};["img2img","inpainting"].includes(r)&&(k.destination=r),n(VL(k))},[n,r]),c=C.exports.useCallback((E,k)=>{k.forEach(L=>{s(L)}),E.forEach(L=>{l(L)})},[l,s]),{getRootProps:p,getInputProps:g,isDragAccept:m,isDragReject:y,isDragActive:b,open:S}=iW({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:c,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const E=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const N of L)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const D={file:O};["img2img","inpainting"].includes(r)&&(D.destination=r),n(VL(D))};return document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E)}},[n,i,r]);const T=["img2img","inpainting"].includes(r)?` to ${pf[r].tooltip}`:"";return w(Y7.Provider,{value:S,children:ne("div",{...p({style:{}}),children:[w("input",{...g()}),t,b&&o&&w(bCe,{isDragAccept:m,isDragReject:y,overlaySecondaryText:T,setIsHandlingUpload:a})]})})},wCe=()=>{const e=Xe();return w(Ut,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right",onMouseOver:()=>{e(f3(!0))},children:w(bB,{})})};function CCe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const _Ce=St(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),kCe=()=>{const e=Xe(),{shouldShowProcessButtons:t}=Me(_Ce);return ne("div",{className:"show-hide-button-options",children:[w(Ut,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(x3(!0))},children:w(CCe,{})}),t&&ne(Fn,{children:[w(EB,{iconButton:!0}),w(TB,{}),w(PB,{})]})]})};E9e();const ECe=St([e=>e.gallery,e=>e.options,e=>e.system,Cr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:c}=t,p=ht.reduce(n.model_list,(y,b,S)=>(b.status==="active"&&(y=S),y),""),g=!(i||o&&!a),m=!(s||l&&!c)&&["txt2img","img2img","inpainting"].includes(r);return{modelStatusText:p,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:ht.isEqual}}),PCe=()=>{const e=Xe(),{shouldShowGalleryButton:t,shouldShowOptionsPanelButton:n}=Me(ECe);return C.exports.useEffect(()=>{e(Sye())},[e]),w("div",{className:"App",children:ne(SCe,{children:[w(f9e,{}),ne("div",{className:"app-content",children:[w(w9e,{}),w(A6e,{})]}),w("div",{className:"app-console",children:w(k9e,{})}),t&&w(wCe,{}),n&&w(kCe,{})]})})};const oW=lve(jH);ZS.createRoot(document.getElementById("root")).render(w(re.StrictMode,{children:w(zme,{store:jH,children:w(qH,{loading:w(c9e,{}),persistor:oW,children:ne(Cge,{theme:fI,children:[w(cZ,{initialColorMode:fI.config.initialColorMode}),w(PCe,{})]})})})})); diff --git a/frontend/dist/assets/index.c26f71e8.js b/frontend/dist/assets/index.c26f71e8.js deleted file mode 100644 index b94d8d6b16..0000000000 --- a/frontend/dist/assets/index.c26f71e8.js +++ /dev/null @@ -1,593 +0,0 @@ -function Zq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var kv=Symbol.for("react.element"),Qq=Symbol.for("react.portal"),Jq=Symbol.for("react.fragment"),eK=Symbol.for("react.strict_mode"),tK=Symbol.for("react.profiler"),nK=Symbol.for("react.provider"),rK=Symbol.for("react.context"),iK=Symbol.for("react.forward_ref"),oK=Symbol.for("react.suspense"),aK=Symbol.for("react.memo"),sK=Symbol.for("react.lazy"),Jk=Symbol.iterator;function lK(e){return e===null||typeof e!="object"?null:(e=Jk&&e[Jk]||e["@@iterator"],typeof e=="function"?e:null)}var oM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aM=Object.assign,sM={};function U0(e,t,n){this.props=e,this.context=t,this.refs=sM,this.updater=n||oM}U0.prototype.isReactComponent={};U0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};U0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lM(){}lM.prototype=U0.prototype;function I8(e,t,n){this.props=e,this.context=t,this.refs=sM,this.updater=n||oM}var M8=I8.prototype=new lM;M8.constructor=I8;aM(M8,U0.prototype);M8.isPureReactComponent=!0;var eE=Array.isArray,uM=Object.prototype.hasOwnProperty,O8={current:null},cM={key:!0,ref:!0,__self:!0,__source:!0};function dM(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)uM.call(t,r)&&!cM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=W[X];if(0>>1;Xi(He,Q))jei(ct,He)?(W[X]=ct,W[je]=Q,X=je):(W[X]=He,W[Se]=Q,X=Se);else if(jei(ct,Q))W[X]=ct,W[je]=Q,X=je;else break e}}return q}function i(W,q){var Q=W.sortIndex-q.sortIndex;return Q!==0?Q:W.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(W){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=W)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(W){if(w=!1,L(W),!b)if(n(l)!==null)b=!0,le(O);else{var q=n(u);q!==null&&G(I,q.startTime-W)}}function O(W,q){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var Q=m;try{for(L(q),g=n(l);g!==null&&(!(g.expirationTime>q)||W&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var R=!1,D=null,z=-1,$=5,V=-1;function Y(){return!(e.unstable_now()-V<$)}function de(){if(D!==null){var W=e.unstable_now();V=W;var q=!0;try{q=D(!0,W)}finally{q?j():(R=!1,D=null)}}else R=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=de,j=function(){ie.postMessage(null)}}else j=function(){E(de,0)};function le(W){D=W,R||(R=!0,j())}function G(W,q){z=E(function(){W(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,le(O))},e.unstable_forceFrameRate=function(W){0>W||125X?(W.sortIndex=Q,t(u,W),n(l)===null&&W===n(u)&&(w?(P(z),z=-1):w=!0,G(I,Q-X))):(W.sortIndex=me,t(l,W),b||v||(b=!0,le(O))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var q=m;return function(){var Q=m;m=q;try{return W.apply(this,arguments)}finally{m=Q}}}})(fM);(function(e){e.exports=fM})(Yp);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hM=C.exports,sa=Yp.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nE={},rE={};function pK(e){return N6.call(rE,e)?!0:N6.call(nE,e)?!1:hK.test(e)?rE[e]=!0:(nE[e]=!0,!1)}function gK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mK(e,t,n,r){if(t===null||typeof t>"u"||gK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function so(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new so(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wg(e):""}function vK(e){switch(e.tag){case 5:return Wg(e.type);case 16:return Wg("Lazy");case 13:return Wg("Suspense");case 19:return Wg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case B8:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F6(t);case 8:return t===B8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=yM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function j2(e){e._valueTracker||(e._valueTracker=bK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function H6(e,t){xM(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vg=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=G2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var om={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xK=["Webkit","ms","Moz","O"];Object.keys(om).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),om[t]=om[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||om.hasOwnProperty(e)&&om[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function uE(e){if(e=Lv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function EM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function PM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,uE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var q2=64,K2=4194304;function Ug(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Ug(s):(o&=a,o!==0&&(r=Ug(o)))}else a=n&~i,a!==0?r=Ug(a):o!==0&&(r=Ug(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ev(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=sm),yE=String.fromCharCode(32),bE=!1;function qM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(bE=!0,yE);case"textInput":return e=t.data,e===yE&&bE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),o3=G8=Fc=null,Np=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CE(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function Z8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_E(n,o);var a=_E(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dp=null,ew=null,um=null,tw=!1;function kE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&Z8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),um&&Wm(um,r)||(um=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function Gn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function ME(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));Gn(Vi,t),Gn(Lo,n)}function lO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,Gn(Vi,e),Gn(Lo,Lo.current),!0}function OE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),Gn(Vi,e)):Xn(Lo),Gn(Lo,n)}var ou=null,p5=!1,aS=!1;function uO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,uO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case U2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&$E(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Vg(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ty(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=vO(!0),yO=vO(!1),Tv={},yl=hd(Tv),Gm=hd(Tv),qm=hd(Tv);function If(e){if(e===Tv)throw Error(Oe(174));return e}function oC(e,t){switch(Gn(qm,t),Gn(Gm,e),Gn(yl,Tv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),Gn(yl,t)}function L0(){Xn(yl),Xn(Gm),Xn(qm)}function bO(e){If(qm.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(Gn(Gm,e),Gn(yl,n))}function aC(e){Gm.current===e&&(Xn(yl),Xn(Gm))}var cr=hd(0);function s4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sS=[];function sC(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function NO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),BO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,rC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){cm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:WE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:HE,useDebugValue:fC,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=HE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,WE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Zm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Km++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fl]=t,e[jm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304)}else{if(!r)if(e=s4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,Gn(cr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return yC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(Q8(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),sC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return aC(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return nC(t.type._context),null;case 22:case 23:return yC(),null;case 24:return null;default:return null}}var ry=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var XE=!1;function XY(e,t){if(nw=Z3,e=JM(),Z8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=XE,XE=!1,b}function dm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[jm],delete t[aw],delete t[OY],delete t[RY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XO(e){return e.tag===5||e.tag===3||e.tag===4}function QE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),$m(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function JE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-mC?Df(e,0):gC|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=K2,K2<<=1,(K2&130023424)===0&&(K2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Ev(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function aZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=uC(null,t,r,e,i,n);var o=cC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iC(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=KE(null,t,r,e,n);break e;case 11:t=GE(null,t,r,e,n);break e;case 14:t=qE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),KE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),a4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=T0(Error(Oe(423)),t),t=YE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=YE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return jO(e,t,n);case 4:return oC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),GE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Gn(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=du(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cw(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),qE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),mO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function sZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new sZ(e,t,n,r)}function xC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return xC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")xC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case B8:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case vM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function SC(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iC(o),e}function cZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=da})(Al);const ay=A8(Al.exports);var sP=Al.exports;U3.createRoot=sP.createRoot,U3.hydrateRoot=sP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gZ=C.exports,mZ=Symbol.for("react.element"),vZ=Symbol.for("react.fragment"),yZ=Object.prototype.hasOwnProperty,bZ=gZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xZ={key:!0,ref:!0,__self:!0,__source:!0};function fR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)yZ.call(t,r)&&!xZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:mZ,type:e,key:o,ref:a,props:i,_owner:bZ.current}}k5.Fragment=vZ;k5.jsx=fR;k5.jsxs=fR;(function(e){e.exports=k5})(_5);const Kn=_5.exports.Fragment,x=_5.exports.jsx,ee=_5.exports.jsxs,SZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Kn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var kC=C.exports.createContext({});kC.displayName="ColorModeContext";function Av(){const e=C.exports.useContext(kC);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function wZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?sy.dark:sy.light),document.body.classList.remove(r?sy.light:sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var CZ="chakra-ui-color-mode";function _Z(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var kZ=_Z(CZ),lP=()=>{};function uP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function hR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>uP(a,s)),[h,g]=C.exports.useState(()=>uP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?lP:k,setColorMode:t?lP:P,forced:t!==void 0}),[E,k,P,t]);return x(kC.Provider,{value:L,children:n})}hR.displayName="ColorModeProvider";var Pw={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Wn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Wn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Wn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return EZ(e)?e(...t):e}var EZ=e=>typeof e=="function",PZ=e=>/!(important)?$/.test(e),cP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=cP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=cP(s),i?`${s} !important`:s};function Qm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ly=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Qm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Qm({scale:n,compose:r}):r}}var pR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var MZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},OZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function RZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",DZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},BZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||mR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(e){return/^var\(--.+\)$/.test(e)}var VZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=VZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",ly(rn.vh,rn.px)),spaceT:as("space",ly(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Qm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",ly(rn.vh,rn.px)),sizesT:as("sizes",ly(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Qm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Qm({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(g4,{flexDir:g4.flexDirection});var yR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},pm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(pm,{insetStart:pm.insetInlineStart,insetEnd:pm.insetInlineEnd});var eX={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Zn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},rX={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},iX={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},oX={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),dP=(...e)=>`calc(${E5("+",...e)})`,fP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,hP=(...e)=>`calc(${E5("/",...e)})`,pP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(dP(e,...t)),subtract:(...t)=>kf(fP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(hP(e,...t)),negate:()=>kf(pP(e)),toString:()=>e.toString()}),{add:dP,subtract:fP,multiply:Iw,divide:hP,negate:pP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,EC=e=>Object.fromEntries(Object.entries(e).sort(xR));function gP(e){const t=EC(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(EC(e));return new Set(t)}function mP(e){if(!e)return e;e=Mw(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Gg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=gP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?mP(u):void 0,{_minW:mP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Gg(null,u),minWQuery:Gg(a),minMaxQuery:Gg(a,u)}}),r=gX(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:EC(e),asArray:gP(e),details:n,media:[null,...t.map(o=>Gg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},yc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),P5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},vX=Object.keys(P5);function vP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=vP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=vP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=P5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:mX(n.breakpoints)}),n}var PC=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,yR,JZ,pm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,yR,pm),LX=Object.keys(PX),TX=[...Object.keys(PC),...vX],AX={...PC,...P5},IX=e=>e in AX,MX=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!RX(t),DX=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>zX({theme:t,pseudos:P5,configs:PC})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||ev($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Iv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Iv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!ev(bl());)ia();return Iv(e,Oo)}function iQ(e){return LR(v3("",null,null,null,[""],e=PR(e),0,[0],e))}function v3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:uy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&uy(v>32?bP(D+";",r,n,g-1):bP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(uy(R=yP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&uy(yP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function yP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=AC(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?LC:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,CR,L5(QX()),Jm(e,2,-2),0)}function bP(e,t,n,r){return A5(e,t,n,TC,Jm(e,0,r),Jm(e,r+1,-1),r)}function n0(e,t){for(var n="",r=AC(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case TC:t.return=AR(t.value,t.length);break;case _R:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case LC:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],IR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||gQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},wP=function(t){return t!=null&&typeof t!="boolean"},mS=TR(function(e){return BR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),CP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function tv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,tv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},GR=GQ(jQ);function qR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var KR=e=>qR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function YR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var XQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=TR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},PP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},LP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),IQ(function(){return zR(n,r,i)}),null},nJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=LP(t,n,r),l=s||PP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function cy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function dy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function TP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IJ(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function AP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var Fw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function DJ(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=dy(e.s),i=dy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=dy(e.s),o=dy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZR(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:MP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:MP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Mv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=NJ(t)),this.originalInput=t;var i=DJ(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ZR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=AP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=AP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=TP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=TP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),IP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),OJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+IP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=cy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=cy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=cy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=cy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(XR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Mv(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=QR(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return v4([r,i],n.seed)}function VJ(e,t){for(var n=QR(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=eN.find(function(a){return a.name===e});if(n){var r=JR(n);if(r.hueRange)return r.hueRange}var i=new Mv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function QR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=eN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function JR(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var eN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function jJ(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=jJ(e,`colors.${t}`,t),{isValid:i}=new Mv(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Mv(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Mv(r).setAlpha(t).toRgbString()};function OP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=XR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function DC(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function tN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(tN).join(` ${e} `).replace(/calc/g,""),RP=(...e)=>`calc(${V5("+",...e)})`,NP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,DP=(...e)=>`calc(${V5("/",...e)})`,zP=e=>{const t=tN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(RP(e,...t)),subtract:(...t)=>su(NP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(DP(e,...t)),negate:()=>su(zP(e)),toString:()=>e.toString()}),{add:RP,subtract:NP,multiply:$w,divide:DP,negate:zP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function nN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,nN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${nN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Ov,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Ov({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function zC(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Ov(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Ov(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Ov(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Ov(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),rN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},wee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...rN,...wee,container:Cee},iN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:oN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},BP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:BP.reference,"&:not([data-loaded])":{[BP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=oN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?iN[e]:void 0;return oN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},mm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},aN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=M0(`${t}.200`,.12)(n),i=M0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Uee=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(aN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=jee[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},qee=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:aN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),vm=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:vm.reference,h:vm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[vm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[vm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[vm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),ym=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[ym.reference],h:[ym.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[ym.variable]:"sizes.10",fontSize:"md"},md:{[ym.variable]:"sizes.8",fontSize:"xs"},sm:{[ym.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=mm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function BC(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),ine=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),xne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},sN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:lN}=ir(vJ.keys),FC=ji("number-input-stepper-width"),uN=ji("number-input-input-padding"),$ne=su(FC).add("0.5rem").toString(),Hne={[FC.variable]:"sizes.6",[uN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[FC.reference]},Une=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),jne=lN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function fy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=sN.fontSizes[o];return lN({field:{...r.field,paddingInlineEnd:uN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:fy("xs"),sm:fy("sm"),md:fy("md"),lg:fy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),FP,Kne={...(FP=gn.baseStyle)==null?void 0:FP.field,textAlign:"center"},Yne={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},$P,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:(($P=gn.variants)==null?void 0:$P.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),hy=ji("popper-bg"),ere=ji("popper-arrow-bg"),HP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[hy.variable]:"colors.white",bg:hy.reference,[ere.variable]:hy.reference,[HP.variable]:"colors.gray.200",_dark:{[hy.variable]:"colors.gray.700",[HP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:qg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(OP(),OP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ai(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=qg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:qg({track:{h:"1"}}),sm:qg({track:{h:"2"}}),md:qg({track:{h:"3"}}),lg:qg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),py={paddingInlineEnd:"8"},WP,VP,UP,jP,GP,qP,KP,YP,Pre={lg:{...(WP=gn.sizes)==null?void 0:WP.lg,field:{...(VP=gn.sizes)==null?void 0:VP.lg.field,...py}},md:{...(UP=gn.sizes)==null?void 0:UP.md,field:{...(jP=gn.sizes)==null?void 0:jP.md.field,...py}},sm:{...(GP=gn.sizes)==null?void 0:GP.sm,field:{...(qP=gn.sizes)==null?void 0:qP.sm.field,...py}},xs:{...(KP=gn.sizes)==null?void 0:KP.xs,field:{...(YP=gn.sizes)==null?void 0:YP.xs.field,...py},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),iv=ei("slider-thumb-size"),ov=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...DC({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...DC({orientation:e.orientation,horizontal:{h:ov.reference},vertical:{w:ov.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...DC({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:iv.reference,h:iv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[iv.variable]:"sizes.4",[ov.variable]:"sizes.1"}}),Wre=U5({container:{[iv.variable]:"sizes.3.5",[ov.variable]:"sizes.1"}}),Vre=U5({container:{[iv.variable]:"sizes.2.5",[ov.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:cN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=cN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:cN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),bm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(bm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[bm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[bm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[bm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[bm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=s0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={sm:s0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:s0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:s0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),kie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eie=xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pie=xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),Lie=xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=mm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=mm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=mm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ZP,$ie={...(ZP=gn.baseStyle)==null?void 0:ZP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},XP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((XP=gn.variants)==null?void 0:XP.unstyled.field)??{}},QP,JP,eL,tL,Wie={xs:((QP=gn.sizes)==null?void 0:QP.xs.field)??{},sm:((JP=gn.sizes)==null?void 0:JP.sm.field)??{},md:((eL=gn.sizes)==null?void 0:eL.md.field)??{},lg:((tL=gn.sizes)==null?void 0:tL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},gy=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:gy.reference,color:kS.reference,[gy.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[gy.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:gy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:mm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},roe=noe,ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ooe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...sN,sizes:iN,shadows:roe,space:rN,borders:Yie,transition:loe},poe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},goe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(woe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function K0(){const e=C.exports.useContext(nv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function dN(){const e=Av(),t=K0();return{...e,theme:t}}function _oe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function koe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eoe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Av();return x(H5,{styles:t=>{const n=GR(t,"styles.global"),r=YR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=qR(a,(g,m)=>IX(m)),l=YR(e,t),u=Object.assign({},i,l,KR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Av();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function fN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=dN(),a=e?GR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},KR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return fN(e,t)}function Ri(e,t={}){return fN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function nL(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function rL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function iL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=nL(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=rL(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=rL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=iL(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=iL(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=nL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,hN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=hN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function pN(){return[x4(Hoe),()=>x4(hN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),oL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},pa=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??oL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??oL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(pa,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function j5(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const $C=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,gN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(gN),a=C.exports.useContext(Y0),s=C.exports.useContext($C).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function av(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>av(e[t]))}function mN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||av(n)?n:void 0,animate:av(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[aL(t),aL(n)])}function aL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),sv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?sv.projectionNodeConstructor=e[t]:sv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const xm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(xm.hasEverUpdated)return Zoe++})}const HC=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const vN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($C),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(gN).strict,P=C.exports.useContext(vN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||sv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(HC).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function WC(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rv=new Set(C4);function yN(e,{layout:t,layoutId:n}){return Rv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function bN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xN=(e,t)=>n=>Math.max(Math.min(n,t),e),Sm=e=>e%1?Number(e.toFixed(5)):e,lv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Nv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wm=Object.assign(Object.assign({},ih),{transform:xN(0,1)}),my=Object.assign(Object.assign({},ih),{default:1}),Dv=e=>({test:t=>Nv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=Dv("deg"),Sl=Dv("%"),St=Dv("px"),cae=Dv("vh"),dae=Dv("vw"),sL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),VC=(e,t)=>n=>Boolean(Nv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!Nv(r))return r;const[i,o,a,s]=r.match(lv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:VC("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(Sm(t))+", "+Sl.transform(Sm(n))+", "+Sm(wm.transform(r))+")"},fae=xN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:VC("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+Sm(wm.transform(r))+")"};function hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gw={test:VC("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Nv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},wN="${c}",CN="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Nv(e)&&((n=(t=e.match(lv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function _N(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,wN),t.push(...r.map(to.parse)));const i=e.match(lv);return i&&(e=e.replace(lv,CN),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function kN(e){return _N(e).values}function EN(e){const{values:t,numColors:n,tokenised:r}=_N(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=kN(e);return EN(e)(t.map(gae))}const vu={test:pae,parse:kN,createTransformer:EN,getAnimatableNone:mae},vae=new Set(["brightness","contrast","saturate","opacity"]);function yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(lv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),lL={...ih,transform:Math.round},PN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:my,scaleX:my,scaleY:my,scaleZ:my,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:wm,originX:sL,originY:sL,originZ:St,zIndex:lL,fillOpacity:wm,strokeOpacity:wm,numOctaves:lL};function UC(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(bN(m)){o[m]=v;continue}const b=PN[m],w=lae(v,b);if(Rv.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sae(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const jC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function LN(e,t,n){for(const r in t)!Ss(t[r])&&!yN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=jC();return UC(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return LN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let TN=e=>!_4(e);function Lae(e){!e||(TN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function uL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=uL(t,e.x,e.width),i=uL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function GC(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){UC(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Aae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Oae(g,o,a,s,!1)}const AN=()=>({...jC(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=AN();return GC(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};LN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(WC(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const IN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function MN(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ON=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function RN(e,t,n,r){MN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ON.has(i)?i:IN(i),t.attrs[i])}function qC(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||yN(r,e))&&(n[r]=t[r]);return n}function NN(e){const t=qC(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function KC(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const uv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),DN=e=>uv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const zN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=mN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=KC(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:zN({scrapeMotionValuesFromProps:NN,createRenderState:AN,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}GC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),RN(t,n)}})},$ae={useVisualState:zN({scrapeMotionValuesFromProps:qC,createRenderState:jC})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...WC(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function BN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function FN(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function YC(e,t="page"){return{point:FN(e)?jae(e,t):Gae(e,t)}}const $N=(e,t=!1)=>{const n=r=>e(r,YC(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function HN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,HN(t),$N(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,HN(t),n&&$N(n,t==="pointerdown"),r)}function WN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const cL=WN("dragHorizontal"),dL=WN("dragVertical");function VN(e){let t=!1;if(e==="y")t=dL();else if(e==="x")t=cL();else{const n=cL(),r=dL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function UN(){const e=VN(!0);return e?(e(),!1):!0}function fL(e,t,n){return(r,i)=>{!BN(r)||UN()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?fL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?fL(r,!1,t):void 0,{passive:!t})}const jN=(e,t)=>t?e===t?!0:jN(e,t.parentElement):!1;function ZC(e){return C.exports.useEffect(()=>()=>e(),[])}function GN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),LS=.001,ese=.01,hL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=hL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,hL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ise=12;function ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!pL(e,sse)&&pL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=GN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=gL,b=gL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const gL=e=>0,cv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],vL=e=>cse.find(t=>t.test(e)),qN=(e,t)=>{let n=vL(e),r=vL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=mL(i),n=Wc),r===Rf&&(o=mL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function KN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?qN(e,t):ZN(e,t)}const YN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>KN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=KN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function yL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=yL(e),i=yL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(YN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?qN:ZN;if(Array.isArray(e))return YN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(cv(e,t,r))}function vse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=cv(e[o],e[o+1],i);return t[o](s)}}function XN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),QC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),QN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=QN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},JN=1.525,xse=4/11,Sse=8/11,wse=9/10,JC=e=>e,e7=yse(2),Cse=Q5(e7),eD=QC(e7),tD=e=>1-Math.sin(Math.acos(e)),t7=Q5(tD),_se=QC(t7),n7=QN(JN),kse=Q5(n7),Ese=QC(n7),Pse=bse(JN),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||eD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return XN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const bL={keyframes:C3,spring:XC,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(bL[e.type])return bL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:C3}const nD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),rD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),nD);function Fse(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fse(()=>dv=!0),e),{}),Hse=zv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(dv||Use(),n.schedule(r,i,o)),e},{}),Wse=zv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});zv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),iD=e=>{dv=!1,u0.delta=Xw?nD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,zv.forEach(Vse),Qw=!1,dv&&(Xw=!1,rD(iD))},Use=()=>{dv=!0,Xw=!0,Qw||rD(iD)},jse=()=>u0;function oD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?oD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function aD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=GN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=XN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=oD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function sD(e,t){return t?e*(1e3/t):0}function Yse({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=sD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),xL=e=>Jw(e)&&e.hasOwnProperty("z"),vy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return vy(e,t);if(Jw(e)&&Jw(t)){const n=vy(e.x,t.x),r=vy(e.y,t.y),i=xL(e)&&xL(t)?vy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const lD=(e,t)=>1-3*t+3*e,uD=(e,t)=>3*t-6*e,cD=e=>3*e,T4=(e,t,n)=>((lD(t,n)*e+uD(t,n))*e+cD(t))*e,dD=(e,t,n)=>3*lD(t,n)*e*e+2*uD(t,n)*e+cD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+yy,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!UN()}function g(b,w){!h()||(jN(i.getInstance(),b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),ZC(u)}const ile="production",fD=typeof process>"u"||process.env===void 0?ile:"production",SL=new Set;function hD(e,t,n){e||SL.has(t)||(console.warn(t),n&&console.warn(n),SL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(fD!=="production"&&hD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function pD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:JC,easeIn:e7,easeInOut:eD,easeOut:Cse,circIn:tD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},wL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",CL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),by=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),_L={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:by,scaleY:by,scale:by,opacity:IS,backgroundColor:IS,color:IS,default:by},ble=(e,t)=>{let n;return uv(t)?n=yle:n=_L[e]||_L.default,{to:t,...n(t)}},xle={...PN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},gD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),mD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),gD);function Cle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cle(()=>fv=!0),e),{}),ws=Bv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(fv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Bv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Bv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),vD=e=>{fv=!1,c0.delta=t9?gD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Bv.forEach(kle),n9=!1,fv&&(t9=!1,mD(vD))},Ele=()=>{fv=!0,t9=!0,n9||mD(vD)},r9=()=>c0;function yD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(wL):wL(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=CL(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):kL(a)&&typeof n=="string"?a=EL(n):!Array.isArray(n)&&kL(n)&&typeof a=="string"&&(n=EL(a));const l=CL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Yse({...g,...o}):aD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=DN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function kL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function EL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=yD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Cm{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Dle{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Cm,this.velocityUpdateSubscribers=new Cm,this.renderSubscribers=new Cm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>ws.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nle(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?sD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function O0(e){return new Dle(e)}const bD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},xD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>xD.find(bD(e)),Ble=[...xD,to,vu],Fle=e=>Ble.find(bD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return KC(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=DN(o[a]);Wle(e,a,s)}}function Ule(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=SD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>SD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Kle(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function SD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Rv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?uv(G)&&uv(W)?!pD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[jn.Animate]:gf(!0),[jn.InView]:gf(),[jn.Hover]:gf(),[jn.Tap]:gf(),[jn.Drag]:gf(),[jn.Focus]:gf(),[jn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class wD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=OS(h,this.transformPagePoint),BN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},FN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=YC(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function PL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:PL(e,CD(t)),offset:PL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function CD(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=CD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function la(e){return e.max-e.min}function LL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function ML(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lue(e,{top:t,left:n,bottom:r,right:i}){return{x:ML(e.x,n,i),y:ML(e.y,t,r)}}function OL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=cv(t.min,t.max-r,e.min):r>i&&(n=cv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:RL(e,"left","right"),y:RL(e,"top","bottom")}}function RL(e,t,n){return{min:NL(e,t),max:NL(e,n)}}function NL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const DL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Em=()=>({x:DL(),y:DL()}),zL=()=>({min:0,max:0}),ki=()=>({x:zL(),y:zL()});function sl(e){return[e("x"),e("y")]}function _D({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||kD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function kD(e){return BL(e.x)||BL(e.y)}function BL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function FL(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=FL(e.min,t,n,r,i),e.max=FL(e.max,t,n,r,i)}function ED(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(YC(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Sue(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new wD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!xy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yue(r,i.root,this.visualElement.getTransformPagePoint());let a=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=_D(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!xy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return l7(t,r,0,n)}stopAnimation(){sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){sl(n=>{const{drag:r}=this.getProps();if(!xy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-_r(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(s=>{if(!xy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function xy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext($C),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new wD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),ZC(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},LD={current:!1};function kue(){if(LD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const Sy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=Sy.map(()=>new Cm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Sy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Sy[i]]=o=>r.add(o),n["notify"+Sy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(sv),Lue=TD.length,AD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=mN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),LD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=KC(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),OD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(OD),RD=(e,t)=>{e.set(t,!1),e.set(t)},HL=e=>e===ih||e===St;var WL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(WL||(WL={}));const VL=(e,t)=>parseFloat(e.split(", ")[t]),UL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return VL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?VL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const jL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:UL(4,13),y:UL(5,14)},zue=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=jL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);RD(h,s[u]),e[u]=jL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(OD);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Eg(h);const m=t[l];let v;if(uv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const ND={treeType:"dom",readValueFromInstance(e,t){if(Rv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(bN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return PD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:qC,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),UC(t,n,r,i.transformTemplate)},render:MN},Wue=AD(ND),Vue=AD({...ND,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Rv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=ON.has(t)?t:IN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:NN,build(e,t,n,r,i){GC(t,n,r,i.transformTemplate)},render:RN}),Uue=(e,t)=>WC(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function GL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=GL(e,t.target.x),r=GL(e,t.target.y);return`${n}% ${r}%`}},qL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(MD,v=>(o.push(v),qL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=_r(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(qL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),xm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ws.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function que(e){const[t,n]=i7(),r=C.exports.useContext(HC);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(vN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const DD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=DD.length,KL=e=>typeof e=="string"?parseFloat(e):e,YL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(cv(e,t,r))}function XL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){XL(e.x,t.x),XL(e.y,t.y)}function QL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=QL(e.min,t,n,s,i),e.max=QL(e.max,t,n,s,i)}function JL(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function eT(e,t,n,r){JL(e.x,t,nce,n?.x,r?.x),JL(e.y,t,rce,n?.y,r?.y)}function tT(e){return e.translate===0&&e.scale===1}function BD(e){return tT(e.x)&&tT(e.y)}function FD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function nT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function rT(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const iT=["","X","Y","Z"],oT=1e3;function $D({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hce),this.nodes.forEach(pce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=yD(v,250),xm.hasAnimatedSinceResize&&(xm.hasAnimatedSinceResize=!1,this.nodes.forEach(sT))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,L,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!FD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&sT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));dT(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const L=P/1e3;lT(m.x,a.x,L),lT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(km(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{xm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,oT,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,oT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&HD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),_m(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(aT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):HD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Em();_m(l,o,i.layout);const u=Em();i.isShared?_m(u,e.applyTransform(a,!0),i.measured):_m(u,o,i.layout);const h=!BD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();km(b,i.layout,m.layout);const w=ki();km(w,o,v.actual),FD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function aT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function sT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function lT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){uT(e.x,t.x,n.x,r),uT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function cT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function dT(e){cT(e.x),cT(e.y)}function HD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(nT(t),nT(n),.2)}const Sce=$D({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=$D({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function WD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=WD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ece({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",hD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(HC).forceRender;l&&(s=l);const u=WD(),h=Tce(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),ZC(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Kn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),fD!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Kn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,hT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(hT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(hT.enter,i)})},UD=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ice({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:Fv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});UD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:Fv("chakra-fade",o),custom:m,...jD,animate:h,...u})})});Nce.displayName="Fade";var Dce={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:Fv("chakra-offset-slide",s),...GD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var pT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(pT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(pT.enter,r),transitionEnd:t?.enter}}},qD=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=f9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:Fv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});qD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:Fv("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var $v=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=pN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:$v("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Qce(e){nb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=$v("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:$v("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=$v("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(UD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:$v("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Hv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Hv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function rde(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function gT(e){return x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ide,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),KD={info:{icon:rde,colorScheme:"blue"},warning:{icon:gT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:gT,colorScheme:"red"},loading:{icon:Hv,colorScheme:"blue"}};function sde(e){return KD[e].colorScheme}function lde(e){return KD[e].icon}var YD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});YD.displayName="Alert";var ZD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});ZD.displayName="AlertDescription";function XD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}XD.displayName="AlertIcon";var QD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});QD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});O4.displayName="NativeImage";var ab=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),mT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Hv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ra=Pe((e,t)=>{const n=hde(),r=lo("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=mn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":mT(a),"data-loading":mT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(vT,{...O})):x(vT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function vT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Kn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),wy=e=>e?"":void 0,FS=e=>e?!0:void 0;function yT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,JD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":wy(E),"data-disabled":wy(i),"data-invalid":wy(r),"data-readonly":wy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=JD(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:yT(t?.onFocus,h),onBlur:yT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(ez,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var ez=Pe(function(t,n){const r=J0(),i=JD();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});ez.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var bT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function xT(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function ST(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||bT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",xT,!0),document.addEventListener("keyup",xT,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),bT=!0}function Ade(e){Tde(),e(ST());const t=()=>e(ST());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Nde(e){return re.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function tz(e={}){const t=m7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,wT),onTouchStart:ka(Te.onTouchStart,wT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function wT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),nz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=tz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});nz.displayName="Checkbox";function Vde(e){return x(pa,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function R4(e,t,n){return(e-t)*100/(n-t)}function rz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=iz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||Rx(H5,{styles:oz}),qde=()=>x(H5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${oz} - `});function Hf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kde(e){return"current"in e}var az=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>az()&&e.test(navigator.vendor),Xde=e=>az()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function CT(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=CT(n),a=CT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,sz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=x7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=sz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});lz.displayName="InputLeftAddon";lz.id="InputLeftAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});uz.displayName="InputRightAddon";uz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=sz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});cz.id="InputLeftElement";cz.displayName="InputLeftElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});dz.id="InputRightElement";dz.displayName="InputRightElement";function ufe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return re.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});fz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(fz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var hz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});hz.displayName="Center";var hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var pz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return re.createElement(we.div,{ref:n,__css:w,...b})});pz.displayName="Grid";function _T(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:_T(i),gridRow:_T(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[bfe,gz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var mz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});mz.displayName="UnorderedList";var vz=Pe(function(t,n){const r=gz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});vz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=gz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(pz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var yz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});yz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[b9]:od(n,i=>r[i])}}function Pfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var bz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});bz.displayName="StackItem";var _7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(bz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var xz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));xz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function kT(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>od(w,k=>kT(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>kT(Lw("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(Sz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var Sz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});Sz.displayName="WrapItem";var Afe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},wz=Afe,bp=()=>{},Ife={document:wz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Mfe=Ife,Ofe={window:Mfe,document:wz},Cz=typeof window<"u"?{window,document}:Ofe,_z=C.exports.createContext(Cz);_z.displayName="EnvironmentContext";function kz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Cz},[r,n]);return ee(_z.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}kz.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Ez(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Pz(e){if(!Ez(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Lz(e))==null?void 0:t.defaultView)??window}function Lz(e){return Ez(e)?e.ownerDocument:document}function Bfe(e){return Lz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ffe=e=>Tz(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Az(e){return e.parentElement&&Az(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Iz(e){if(!Pz(e)||Az(e)||$fe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Hfe(e)?!0:Tz(e)}function Wfe(e){return e?Pz(e)&&Iz(e)&&!Ffe(e):!1}var Vfe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Mz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Iz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Mz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Wv=[Io,Ba,Fa,Mo],N0="start",hv="end",Xfe="clippingParents",Oz="viewport",Tg="popper",Qfe="reference",ET=Wv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+hv])},[]),Rz=[].concat(Wv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+hv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Na(o)||!El(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function che(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Nz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function P7(e){var t=z0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Dz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function PT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Vv(e){for(var t=Wa(e),n=PT(e);n&&fhe(n)&&yu(n).position==="static";)n=PT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Pm(e,t,n);return r>n?n:r}function zz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign({},zz(),e)}function Fz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Bz(typeof t!="number"?t:Fz(t,Wv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Vv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Pm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Dz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:D0(t*i)/i||0,y:D0(n*i)/i||0}}function LT(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),L=Mo,I=Io,O=window;if(u){var R=Vv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===hv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===hv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:wl(t.placement),variation:B0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var Cy={passive:!0};function Che(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Cy)}),s&&l.addEventListener("resize",n.update,Cy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Cy)}),s&&l.removeEventListener("resize",n.update,Cy)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function TT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Nz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $z(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:$z(fb(e))}function Lm(e,t){var n;t===void 0&&(t=[]);var r=$z(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Lm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function AT(e,t,n){return t===Oz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Lm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Vv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&Dz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=AT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},AT(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Hz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case hv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function pv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xfe:s,u=n.rootBoundary,h=u===void 0?Oz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Bz(typeof E!="number"?E:Fz(E,Wv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Hz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Rz:l,h=B0(r),g=h?s?ET:ET.filter(function(b){return B0(b)===h}):Wv,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=pv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[TT(e),t,TT(t)]}function Rhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=pv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function IT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function MT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=pv(t,{elementContext:"reference"}),s=pv(t,{altBoundary:!0}),l=IT(a,r),u=IT(s,i,o),h=MT(l),g=MT(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Rz.reduce(function(h,g){return h[g]=Bhe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Hz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=pv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zz(),je=He[te],ct=He[ie],qe=Pm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Vv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Pm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Pm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var OT={placement:"bottom",modifiers:[],strategy:"absolute"};function RT(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function rpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var ipe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ope=e=>ipe[e],NT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...NT,...e}}:t={enabled:e,options:NT},t}var spe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},dpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:rpe(e.placement)})},hpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ppe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gpe(e,t="ltr"){var n;const r=((n=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Wz(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function Vz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(L){var I;(I=k.onClick)==null||I.call(k,L),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function vpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Uz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function jz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}jz.displayName="PortalManager";var[Gz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=xpe(),l=bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(Gz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(Gz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,_y=new WeakMap,ky={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];ky[n]||(ky[n]=new WeakMap);var o=ky[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&_y.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(_y.has(g)||g.removeAttribute(r),_y.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,_y=new WeakMap,ky={})}},qz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Kz(){}function Yz(){}Yz.resetWarningCache=Kz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Yz,resetWarningCache:Kz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Zz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Xz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Qz(e){return e}function Jz(e,t){t===void 0&&(t=Qz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function R7(e,t){return t===void 0&&(t=Qz),Jz(e,t)}function eB(e){e===void 0&&(e={});var t=Jz(null);return t.options=hl({async:!0,ssr:!1},e),t}var tB=function(e){var t=e.sideCar,n=VD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...hl({},n)})};tB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),tB}var nB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),rB=R7(),zpe=R7(),Bpe=eB({async:!0}),Fpe=[],N7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&nB.useMedium(ct)},[]),X=rB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Zz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Xz([n,me]);return ee(Kn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const iB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function oB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){D7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return oB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),pB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],pB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(pB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return lB(t,n)}).filter(function(n){return jpe(n)})},BT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return uB(t,n)})},k9=function(e,t,n){return hB($7(F7(e,n),t),!0,n)},FT=function(e,t){return hB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},gv=function(e,t){return e.shadowRoot?gv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return gv(n,t)})},Jpe=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},gB=function(e){return e.parentNode?gB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(gB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Zz,'="disabled"])')))):[r]),n},[])},mB=function(e){return e.activeElement?e.activeElement.shadowRoot?mB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?mB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},vB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return gv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return gv(t,e)}):!1},r0e=function(e,t){return t.filter(fB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return fB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},$T=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},HT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},yB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=HT(e,0),k=HT(e,i-1);if(l===-1||h===-1)return yB;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a0e=function(e){return function(t){var n,r=(n=cB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=BT(r.filter(a0e(n)));return i&&i.length?$T(i):$T(BT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},bB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||gv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=bB(n||e,e,r),o=new Map,a=FT(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=FT([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===yB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=bB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const xB=h0e;function SB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,mv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function WT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var x0e=function(t){return t&&"current"in t?t.current:t},S0e=function(t){return t?Boolean(mv):mv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(vB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=xB(g,qp,{focusOptions:l}),h0={})),mv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),WT(b,v.length,1,v),WT(b,-1,-1,v))}}}return t},wB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return SB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},CB=function(){mv="just",setTimeout(function(){mv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",wB),document.addEventListener("focusout",U7),window.addEventListener("blur",CB)},P0e=function(){document.removeEventListener("focusin",wB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",CB)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),B4(),SB(B4)):(P0e(),qp=null)}nB.assignSyncMedium(_0e);rB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:xB,focusInside:vB})});const A0e=$pe(L0e,T0e)(k0e);var _B=C.exports.forwardRef(function(t,n){return x(iB,{sideCar:A0e,ref:n,...t})}),kB=iB.propTypes||{};kB.sideCar;O7(kB,["sideCar"]);_B.propTypes={};const I0e=_B;var EB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&Mz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};EB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",PB=eB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=VD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Xz([n,t]),O=hl(hl({},k),i);return ee(Kn,{children:[h&&x(L,{sideCar:PB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V0e=LB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(M0e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(E3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(P3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(E3," .").concat(E3,` { - right: 0 `).concat(r,`; - } - - .`).concat(P3," .").concat(P3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(O0e,": ").concat(s,`px; - } -`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Ey=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Ey,Ey),window.removeEventListener("test",Ey,Ey)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return TB(e,"overflowY")},K0e=function(e){return TB(e,"overflowX")},VT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=AB(e,n);if(r){var i=IB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},AB=function(e,t){return e==="v"?q0e(t):K0e(t)},IB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=IB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&AB(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Py=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UT=function(e){return[e.deltaX,e.deltaY]},jT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},t1e=0,Cp=[];function n1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(t1e++)[0],o=C.exports.useState(function(){return LB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=d9([e.lockRef.current],(e.shards||[]).map(jT),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Py(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-P[0],I="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=VT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=VT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?UT(E):Py(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(jT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Py(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,UT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Py(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Kn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(PB,n1e);var MB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});MB.classNames=hb.classNames;const OB=MB;var sh=(...e)=>e.filter(Boolean).join(" ");function Kg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Kg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Kg(z.onClick,R),onKeyDown:Kg(z.onKeyDown,E),onMouseDown:Kg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return qz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Kg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function RB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(EB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(OB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...GD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],NB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});NB.displayName="ModalTransition";var vv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),g=sh("chakra-modal__content",n),m=lh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return re.createElement(RB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(NB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});vv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),yv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:jD),__css:l,ref:t,className:a,...o})});yv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(vv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(qD),b1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),g=l(o),m=sh("chakra-modal__content",n),v=lh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=v1e();return re.createElement(RB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var DB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),w1e=e=>x(pa,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function GT(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var C1e=50,qT=300;function _1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},qT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},qT)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);GT(ct,"disabled",Te.stop,Te.isSpinning),GT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:DB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var zB=Pe(function(t,n){const r=pb();return re.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});zB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:DB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var BB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(BB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(BB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var Uv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,jv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Vz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Wz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=Uz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=KT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=KT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function KT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=jv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:Uv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=jv();return re.createElement(we.div,{...r(t,n),className:Uv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=jv();return x(cb,{size:"sm",onClick:r,className:Uv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H1e=we(Il.section),FB=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});FB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=jv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(FB,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:Uv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=jv();return re.createElement(we.header,{...r(t,n),className:Uv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function $B(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var HB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};HB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=$B({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(HB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=$B({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),WB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});WB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var VB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});VB.displayName="SelectField";var UB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(VB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(jB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});UB.displayName="Select";var nge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),jB=e=>{const{children:t=x(nge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};jB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function GB(e){return!!e.touches}function age(e){return GB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function qB(e,t="page"){return GB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:qB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function KB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:qB(e)},{timestamp:i}=EP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=EP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$Q.update(this.updatePoint)}};function YT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:YT(e.point,t[t.length-1]),offset:YT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function ZT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(ZT(e)&&ZT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function YB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=KB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function ZB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=ZB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Yg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ly=e=>e||T3;function XB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Yg({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ly(w).height>Ly(E).height?w:E,T3):r.reduce((w,E)=>Ly(w).width>Ly(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Yg({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Yg({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...Yg({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function QB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=QB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=ZB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),rz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>XB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};YB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Yg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),JB=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});JB.defaultProps={orientation:"horizontal"};JB.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=QB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=KB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=rz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return XB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}YB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var eF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});eF.displayName="SliderThumb";var tF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});tF.displayName="SliderTrack";var nF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});nF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),XT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=tz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":XT(s.isChecked),"data-hover":XT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,rF,$ge,Hge]=pN();function Wge(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Vge,Gv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=Gv(),i=rF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Gv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:iF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":oF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=Gv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:oF(n,s),tabId:iF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Gv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Uz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zge(){const e=Gv(),t=rF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function iF(e,t){return`${e}--tab-${t}`}function oF(e,t){return`${e}--tabpanel-${t}`}var[Xge,qv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),aF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});aF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=qv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...qv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var sF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=qv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});sF.displayName="TabPanel";var lF=Pe(function(t,n){const r=Kge(t),i=qv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});lF.displayName="TabPanels";var uF=Pe(function(t,n){const r=qv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});uF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],cF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});cF.displayName="Textarea";function rme(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ame=(e,t)=>e.find(n=>n.id===t);function QT(e,t){const n=dF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function dF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function lme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dme(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=QT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:fF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=dF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(QT(pl.getState(),i).position)}}var JT=0;function dme(e,t={}){JT+=1;const n=t.id??JT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return re.createElement(YD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(XD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(QD,{id:u?.title,children:i}),s&&x(ZD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function fF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=fF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=dN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},hF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});hF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=hF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Kn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Vz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Wz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Kn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Kn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(kz,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(jz,{zIndex:r,children:l}):l]})})};function pF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function gF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function mF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return bv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===bv&&(bv=e.l)}function eA(e){return bv={p:[],l:bv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==vF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return tA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return tA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function tA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(gF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function nA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=xv;a&&(l=[s],u=Zg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=rA(n,o),i.I=!1}else r=rA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||gF(r,a,t(s))}),o===3?new Set(r):r}(e)}function rA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[nr];return xv.get(l,o)},set:function(l){var u=this[nr];xv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!mF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),L=1;L1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,bF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function xF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G4}function i(s,l){r(s)===G4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Bme=function(t,n){return t===n};function Fme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wve:Sve;kF.useSyncExternalStore=$0.useSyncExternalStore!==void 0?$0.useSyncExternalStore:Cve;(function(e){e.exports=kF})(_F);var EF={exports:{}},PF={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var bb=C.exports,_ve=_F.exports;function kve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eve=typeof Object.is=="function"?Object.is:kve,Pve=_ve.useSyncExternalStore,Lve=bb.useRef,Tve=bb.useEffect,Ave=bb.useMemo,Ive=bb.useDebugValue;PF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ave(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,Eve(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Pve(e,o[0],o[1]);return Tve(function(){a.hasValue=!0,a.value=s},[s]),Ive(s),s};(function(e){e.exports=PF})(EF);function Mve(e){e()}let LF=Mve;const Ove=e=>LF=e,Rve=()=>LF,ld=C.exports.createContext(null);function TF(){return C.exports.useContext(ld)}const Nve=()=>{throw new Error("uSES not initialized!")};let AF=Nve;const Dve=e=>{AF=e},zve=(e,t)=>e===t;function Bve(e=ld){const t=e===ld?TF:()=>C.exports.useContext(e);return function(r,i=zve){const{store:o,subscription:a,getServerState:s}=t(),l=AF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Fve=Bve();var $ve={exports:{}},On={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),xb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),wb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),_b=Symbol.for("react.context"),Hve=Symbol.for("react.server_context"),kb=Symbol.for("react.forward_ref"),Eb=Symbol.for("react.suspense"),Pb=Symbol.for("react.suspense_list"),Lb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Wve=Symbol.for("react.offscreen"),IF;IF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case xb:case wb:case Sb:case Eb:case Pb:return e;default:switch(e=e&&e.$$typeof,e){case Hve:case _b:case kb:case Tb:case Lb:case Cb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=_b;On.ContextProvider=Cb;On.Element=p_;On.ForwardRef=kb;On.Fragment=xb;On.Lazy=Tb;On.Memo=Lb;On.Portal=g_;On.Profiler=wb;On.StrictMode=Sb;On.Suspense=Eb;On.SuspenseList=Pb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===_b};On.isContextProvider=function(e){return Va(e)===Cb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===kb};On.isFragment=function(e){return Va(e)===xb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Lb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===wb};On.isStrictMode=function(e){return Va(e)===Sb};On.isSuspense=function(e){return Va(e)===Eb};On.isSuspenseList=function(e){return Va(e)===Pb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xb||e===wb||e===Sb||e===Eb||e===Pb||e===Wve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Lb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===kb||e.$$typeof===IF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})($ve);function Vve(){const e=Rve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const gA={notify(){},get:()=>[]};function Uve(e,t){let n,r=gA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Vve())}function u(){n&&(n(),n=void 0,r.clear(),r=gA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const jve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gve=jve?C.exports.useLayoutEffect:C.exports.useEffect;function qve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Uve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Gve(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function MF(e=ld){const t=e===ld?TF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Kve=MF();function Yve(e=ld){const t=e===ld?Kve:MF(e);return function(){return t().dispatch}}const Zve=Yve();Dve(EF.exports.useSyncExternalStoreWithSelector);Ove(Al.exports.unstable_batchedUpdates);var m_="persist:",OF="persist/FLUSH",v_="persist/REHYDRATE",RF="persist/PAUSE",NF="persist/PERSIST",DF="persist/PURGE",zF="persist/REGISTER",Xve=-1;function A3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A3=function(n){return typeof n}:A3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A3(e)}function mA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qve(e){for(var t=1;t{Object.keys(R).forEach(function(D){!L(D)||h[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){R[D]===void 0&&L(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),D=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(D!==void 0)try{g[R]=l(D)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(I)}function L(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function I(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function n2e(e){return JSON.stringify(e)}function r2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=i2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function i2e(e){return JSON.parse(e)}function o2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key);return t.removeItem(n,a2e)}function a2e(e){}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function u2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var c2e=5e3;function d2e(e,t){var n=e.version!==void 0?e.version:Xve;e.debug;var r=e.stateReconciler===void 0?e2e:e.stateReconciler,i=e.getStoredState||r2e,o=e.timeout!==void 0?e.timeout:c2e,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=l2e(m,["_persist"]),w=b;if(g.type===NF){var E=!1,P=function(z,$){E||(g.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=t2e(e)),v)return nu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(D){var z=e.migrate||function($,V){return Promise.resolve($)};z(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===DF)return s=!0,g.result(o2e(e)),nu({},t(w,g),{_persist:v});if(g.type===OF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===RF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(nu({},R,{_persist:v}))}}function yA(e){return p2e(e)||h2e(e)||f2e()}function f2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function h2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function p2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:BF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case zF:return F9({},t,{registry:[].concat(yA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=yA(t.registry);return i.splice(r,1),F9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function v2e(e,t,n){var r=n||!1,i=f_(m2e,BF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:zF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=F9({},i,{purge:function(){var u=[];return e.dispatch({type:DF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:OF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:RF})},persist:function(){e.dispatch({type:NF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=x2e;function I3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I3=function(n){return typeof n}:I3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I3(e)}function l6(){}var y2e={getItem:l6,setItem:l6,removeItem:l6};function b2e(e){if((typeof self>"u"?"undefined":I3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function x2e(e){var t="".concat(e,"Storage");return b2e(t)?self[t]:y2e}y_.__esModule=!0;y_.default=C2e;var S2e=w2e(b_);function w2e(e){return e&&e.__esModule?e:{default:e}}function C2e(e){var t=(0,S2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var FF=void 0,_2e=k2e(y_);function k2e(e){return e&&e.__esModule?e:{default:e}}var E2e=(0,_2e.default)("local");FF=E2e;var $F={},HF={},Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.PLACEHOLDER_UNDEFINED=Jf.PACKAGE_NAME=void 0;Jf.PACKAGE_NAME="redux-deep-persist";Jf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Jf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,ie){ie||(ie=new Set([j])),te||(te="");for(const le in j){const G=te?`${te}.${le}`:le,W=j[le];if((0,e.isObjectLike)(W))return ie.has(W)?`${te}.${le}:`:(ie.add(W),(0,e.getCircularPath)(W,G,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const ie in j){const le=j[ie];te[ie]=(0,e._cloneDeep)(le)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const ie=(0,e.cloneDeep)(j),le=(0,e.cloneDeep)(te),G=Object.keys(ie).reduce((q,Q)=>(h.call(le,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(ie)||(0,e.isDate)(le))return ie.valueOf()===le.valueOf()?{}:le;const W=Object.keys(le).reduce((q,Q)=>{if(!h.call(ie,Q))return q[Q]=le[Q],q;const X=(0,e.difference)(ie[Q],le[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(le)||!(0,e.isArray)(ie)&&(0,e.isArray)(le)?le:q:(q[Q]=X,q)},G);return delete W._persist,W};e.difference=b;const w=function(j,te){return te.reduce((ie,le)=>{if(ie){const G=parseInt(le,10),W=(0,e.isIntegerString)(le)&&G<0?ie.length+G:le;return(0,e.isString)(ie)?ie.charAt(W):ie[W]}},j)};e.path=w;const E=function(j,te){return[...j].reverse().reduce((G,W,q)=>{const Q=(0,e.isIntegerString)(W)?[]:{};return Q[W]=q===0?te:G,Q},{})};e.assocPath=E;const P=function(j,te){const ie=(0,e.cloneDeep)(j);return te.reduce((le,G,W)=>(W===te.length-1&&le&&(0,e.isObjectLike)(le)&&delete le[G],le&&le[G]),ie),ie};e.dissocPath=P;const k=function(j,te,...ie){if(!ie||!ie.length)return te;const le=ie.shift(),{preservePlaceholder:G,preserveUndefined:W}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(le))for(const q in le)if((0,e.isObjectLike)(le[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],le[q]);else if((0,e.isArray)(te)){let Q=le[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=le[q]!==t.PLACEHOLDER_UNDEFINED?le[q]:void 0;te[q]=Q}return k(j,te,...ie)},L=function(j,te,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=L;const I=function(j,te=[],ie,le,G){if(!(0,e.isObjectLike)(j))return j;for(const W in j){const q=j[W],Q=(0,e.isArray)(j),X=le?le+"."+W:W;q===null&&(ie===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),q===void 0&&G&&ie===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,ie,X,G)}},O=function(j,te,ie,le){const G=(0,e.cloneDeep)(j);return I(G,te,ie,"",le),G};e.preserveUndefined=O;const R=function(j,te,ie){return ie.indexOf(j)===te};e.unique=R;const D=function(j){return j.reduce((te,ie)=>{const le=j.filter(me=>me===ie),G=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:W,subsets:q}=te,Q=le.length>1&&W.indexOf(ie)===-1,X=G.length>1;return{duplicates:[...W,...Q?le:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,ie){const le=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${le} configuration.`,W=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${W}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. - - ${JSON.stringify(q)} - - ${W}`);if(Q.length>1)throw new Error(`${G} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(Q)} - - ${W}`)};e.singleTransformValidator=z;const $=function(j){if(!(0,e.isArray)(j))return;const te=j?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(te.length){const ie=te.filter((le,G)=>te.indexOf(le)!==G);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const V=function({whitelist:j,blacklist:te}){if(j&&j.length&&te&&te.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:ie,subsets:le}=(0,e.findDuplicatesAndSubsets)(j);(0,e.throwError)({duplicates:ie,subsets:le},"whitelist")}if(te){const{duplicates:ie,subsets:le}=(0,e.findDuplicatesAndSubsets)(te);(0,e.throwError)({duplicates:ie,subsets:le},"blacklist")}};e.configValidator=V;const Y=function({duplicates:j,subsets:te},ie){if(j.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. - - ${JSON.stringify(j)}`);if(te.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,ie)=>{const le=ie.split("."),G=le[0],W=le.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:W?[W]:void 0}),q&&!Q&&W&&(q[G]=[W]),q&&Q&&W&&Q.push(W),te},[]):[]};e.getRootKeysGroup=de})(HF);(function(e){var t=gs&&gs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,L):P,out:(P,k,L)=>!E(k)&&m?m(P,k,L):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>R.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...V,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})($F);const M3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),P2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?P2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),K4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),L2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Wn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var a2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function s2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function E2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=_2,Wo.prototype.delete=k2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=E2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:uk(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Bk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Dk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Vn($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(c);return function(S){return jh(S,c,p)}}function jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:$k(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(fk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return R2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=f2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function A2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function Un(c){return Qd?un(Qd.call(c)):{}}function I2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function M2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ -/* [wrapped with `+p+`] */ -`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function R2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,_k(c,S)});function kk(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function N2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:N2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return kk(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=Fk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=yk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:N2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(bk),QU=ug(xk);function JU(c,p){return Lr(D2(c,p),1)}function ej(c,p){return Lr(D2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(D2(c,p),S)}function Ek(c,p){var S=Rt(c)?Vn:Qa;return S(c,Le(p,3))}function Pk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),H2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function D2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?n2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,F2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return H2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),z2=h2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Tk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ak=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ak));A|=O}return he(p,A,c,S,N)});function Ik(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Qk=p-is;return Ae?Kr(Qk,F-Ql):Qk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=z2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(z2())}function Xo(){var Mr=z2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function B2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(B2.Cache||Vo),S}B2.Cache=Vo;function F2(c){if(typeof c!="function")throw new vi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Sj(c){return Tk(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&$2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=p2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Nk(c){return typeof c=="number"&&c==Dt(c)}function $2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Dk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return zk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function zk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Nk(c)&&c>=-W&&c<=W}var Bk=Bs?Er(Bs):Bt;function H2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function Fk(c){if(!c)return[];if(xo(c))return H2(c)?Di(c):wi(c);if(Xu&&c[Xu])return s2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function $k(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Hk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Wk=Xi(function(c,p){wa(p,So(p),c)}),W2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return Uk(c,F2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function Uk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?qk(p):p)});function qk(c){return Dx(Sn(c).toLowerCase())}function Kk(c){return c=Sn(c),c&&c.replace(S1,a2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=W2({},p,A,Re);var N=W2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` -`;c.replace(Ge,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Ae+=c.slice(_e,Xo).replace(w1,$s),Gt&&(J=!0,Ae+=`' + -__e(`+Gt+`) + -'`),Ji&&(ce=!0,Ae+=`'; -`+Ji+`; -__p += '`),en&&(Ae+=`' + -((__t = (`+en+`)) == null ? '' : __t) + -'`),_e=Xo+bt.length,bt}),Ae+=`'; -`;var yt=tn.call(p,"variable")&&p.variable;if(!yt)Ae=`with (obj) { -`+Ae+` -} -`;else if(h1.test(yt))throw new _t(s);Ae=(ce?Ae.replace(Qt,""):Ae).replace(Qn,"$1").replace(uo,"$1;"),Ae="function("+(yt||"obj")+`) { -`+(yt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(J?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Ae+`return __p -}`;var $t=Zk(function(){return Jt(F,ht+"return "+Ae).apply(n,K)});if($t.source=Ae,Mx($t))throw $t;return $t}function rq(c){return Sn(c).toLowerCase()}function iq(c){return Sn(c).toUpperCase()}function oq(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Di(p),F=$o(A,N),K=Ka(A,N)+1;return ts(A,F,K).join("")}function aq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,A1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Ka(A,Di(p))+1;return ts(A,0,N).join("")}function sq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Mu,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),N=$o(A,Di(p));return ts(A,N).join("")}function lq(c,p){var S=V,A=Y;if(lr(p)){var N="separator"in p?p.separator:N;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,c2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Yk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Zk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Vn(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:N2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=b2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,WF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&WF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},VF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?WF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),UF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=UF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),jF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=jF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),GF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),qF=De((e,t)=>{var n=Mb(),r=GF(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),KF=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),K2e=De((e,t)=>{var n=qF(),r=q2e(),i=GF(),o=KF(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),J2e=De((e,t)=>{var n=Ob(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),eye=De((e,t)=>{var n=Ob(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),YF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=YF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=YF(),r=cye(),i=dye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),ZF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=UF(),o=ZF(),a=mye(),s=vye(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Cye=De((e,t)=>{var n=Sye(),r=wye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),_ye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),XF=De((e,t)=>{var n=_u(),r=Pye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),Lye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Tye=De((e,t)=>{var n=Mb(),r=QF(),i=Nb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=jF(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),JF=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=XF(),a=Lye(),s=JF(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),zye=De((e,t)=>{var n=qF(),r=QF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=KF(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=ZF(),i=yye(),o=$ye(),a=jye(),s=__(),l=XF(),u=JF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),e$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Tm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return t$(e,["input","textarea","select"])}function t$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Jye(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var e3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=VF(e$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var xA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!t$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){xA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Tm(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){xA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Tm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Tm(w,u?.combinationKey)))}},[e,l,u,h]),i}VF(e$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Tm(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Tm(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const c3e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),d3e=st({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),m3e=st({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Xr=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(Xr||{});const v3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const SA=/^-?(0\.)?\.?$/,$a=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(SA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(SA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(UB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Kv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var n$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wA=re.createContext&&re.createContext(n$),ed=globalThis&&globalThis.__assign||function(){return ed=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function fh(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(xz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Kn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(tF,{className:"invokeai__slider_track",...Y,children:x(nF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(eF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(zB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const a$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},s$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(e2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const l$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(e2(l$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(nz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},u$=yb({name:"system",initialState:t4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:CA,setSocketId:iEe,setShouldConfirmOnDelete:c$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:d$,setModelList:_A,setIsCancelable:kA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=u$.actions,d4e=u$.reducer;function f4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function f$(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function h$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function p$(e){return lt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function g$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function m$(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function A_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function v$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function A4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function I4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function O4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function R4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function N4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function D4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function F4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function b$(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function $4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function H4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function U4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function G4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function f6(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function I_(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}let Ty;const e5e=new Uint8Array(16);function t5e(){if(!Ty&&(Ty=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ty))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ty(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),EA={randomUUID:r5e};function Ap(e,t,n){if(EA.randomUUID&&!t&&!e)return EA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Ay=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",x$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},PA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...PA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...PA}},S$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=e[e.currentCanvas];n.boundingBoxDimensions=t.payload;const{width:r,height:i}=t.payload,{x:o,y:a}=n.boundingBoxCoordinates,{width:s,height:l}=n.stageDimensions,u=s/n.stageScale,h=l/n.stageScale,g=cs(u,64),m=cs(h,64),v=cs(r,64),b=cs(i,64),w=o+r-u,E=a+i-h,P=Ve.clamp(v,64,g),k=Ve.clamp(b,64,m),L=w>0?o-w:o,I=E>0?a-E:a,O=Ve.clamp(L,n.stageCoordinates.x,g-P),R=Ve.clamp(I,n.stageCoordinates.y,m-k);n.boundingBoxDimensions={width:P,height:k},n.boundingBoxCoordinates={x:O,y:R}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(D$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:w$,setEraserSize:u5e,addLine:C$,addPointToCurrentLine:_$,setShouldPreserveMaskedArea:k$,setIsMaskEnabled:E$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:P$,clearMask:L$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:T$,setStageDimensions:LA,setImageToInpaint:Y4,setImageToOutpaint:A$,setBoundingBoxDimensions:Xg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:I$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:M$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:TA,setShouldLockBoundingBox:O$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:AA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:Iy,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:R$,setCurrentCanvas:N$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=S$.actions,k5e=S$.reducer,D$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Zv=Qe([jt],e=>e.layerState.objects.find(x$)),z$=Qe([e=>e.options,e=>e.system,Zv,vn],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),IA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),MA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function B$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(z$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(mz,{children:o.map((u,h)=>x(vz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function F$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),$$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(B$,{}),x($$,{}),x(F$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(z$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(cF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function H$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function W$(e){return lt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function OA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=OA(e.className,t):e.setAttribute("class",OA(e.className&&e.className.baseVal||"",t))}const RA={disabled:!1},V$=re.createContext(null);var U$=function(t){return t.scrollTop},Qg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Qg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Qg?{status:wf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ay.findDOMNode(this);a&&U$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Qg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[ay.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||RA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ay.findDOMNode(this);if(!o||RA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:ay.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Qg)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(V$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=V$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Qg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},q$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);G$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(j$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(H$,{}):x(W$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),K$=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(c$(!b.target.checked));return ee(Kn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(yv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(Cv(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(e2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(A$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(v$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Kv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(m$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},Z$=yb({name:"gallery",initialState:U5e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ca.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:My,clearIntermediateImage:NA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:z_,selectPrevImage:B_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Oy,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});st({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});st({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});st({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});st({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});st({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});st({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});st({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});st({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});st({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});st({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});st({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});st({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});st({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});st({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});st({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});st({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});st({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});st({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});st({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});st({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});st({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});st({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});st({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});st({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});st({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});st({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});st({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});st({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});st({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});st({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});st({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});st({displayName:"SpinnerIcon",path:ee(Kn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});st({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});st({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});st({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});st({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});st({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});st({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});st({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});st({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});st({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});st({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});st({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});st({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function J5e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Kn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(m8(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(e2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(Cv(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(v8(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(p8(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Kn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(m8(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(hz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(B_())},h=()=>{e(z_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),F_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Kn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Kn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(rbe,{})}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function obe(e){return lt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var abe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],$A="__resizable_base__",rH=function(e){ube(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add($A):o.className+=$A,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ep("left",o),s=i&&Ep("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Ny(n,I,O),r=Ny(r,R,D)}else n=Ny(n,h,g),r=Ny(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&dbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Dy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Dy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Dy(n)?n.touches[0].clientX:n.clientX,h=Dy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=fbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=FA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=FA(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=BA(I,this.props.grid[0]),z=BA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ll(ll({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(lbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...ll({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Xv(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pbe(i,...t)]}function pbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const Sv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});Sv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Sv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Xv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(Sv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(Sv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sbe(e,t=globalThis?.document){const n=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let HA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(HA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),WA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=HA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),WA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){lH(wbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:VA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:VA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function VA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",UA={bubbles:!1,cancelable:!0},Tbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){GA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,UA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,UA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),GA.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=jA(t,e),r=jA(t.reverse(),e);return[n,r]}function uH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const GA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qA(e,t),e.unshift(t)},remove(t){var n;e=qA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function qA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function $_(e){return e==="y"?"height":"width"}function KA(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=i1(t),l=$_(s),u=r[l]/2-i[l]/2,h=r1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=KA(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=$_(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=$_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function ZA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[ZA(e),t,ZA(t)]}const Kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function XA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await Q4(r,{...n,elementContext:"reference"}),a=XA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:QA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=XA(o,i.floating);return{data:{escapedOffsets:a,escaped:QA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await Q4(t,l),g=i1(r1(i)),m=dH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=i1(i),m=dH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function H_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Qv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Qv(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const JA=Math.min,Am=Math.max,e5=Math.round;function wu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(H_(e)?e.host:null)||wd(e)}function eI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(H_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=eI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=eI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function tI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function axe(e,t){const n=Pu(e),r=wd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Am(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Am(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Qv(i||n).direction==="rtl"&&(s+=Am(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&H_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function nI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Qv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=nI(t,h,i);return u.top=Am(g.top,u.top),u.right=JA(g.right,u.right),u.bottom=JA(g.bottom,u.bottom),u.left=Am(g.left,u.left),u},nI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:tI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...tI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Qv(e).direction==="rtl"};function hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...cd(e)?t5(e):[],...t5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!X9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=gxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const vxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?YA({element:t.current,padding:n}).fn(i):{}:t?YA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const bH="Popper",[W_,xH]=Xv(bH),[bxe,SH]=W_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=W_(n5),[_xe,kxe]=W_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=wH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=By(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=By(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=By(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=By(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function By(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},V_="RovingFocusGroup",[Q9,_H,Bxe]=aH(V_),[Fxe,kH]=Xv(V_,[Bxe]),[$xe,Hxe]=Fxe(V_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{I.current=!0}),onFocus:qn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:qn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Xv(ex,[nSe,xH,kH]),U_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,j_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=U_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=U_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=j_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return qz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=tx(td,n),E=j_(td,n),P=U_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?OB:C.exports.Fragment,ie=v?{as:Sv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:qn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:qn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,t8(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),e8="MenuItem",rI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=j_(e8,e.__scopeMenu),s=AH(e8,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(rI,{bubbles:!0,cancelable:!0});g.addEventListener(rI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:qn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(e8,n),s=TH(n),l=C.exports.useRef(null),u=Ha(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,t8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,t8(b=>a.onItemLeave(b))),onFocus:qn(e.onFocus,()=>g(!0)),onBlur:qn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xSe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function t8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Xv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:qn(e.onPointerDown,Fy(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:qn(e.onPointerMove,Fy(u)),onPointerCancel:qn(e.onPointerCancel,Fy(u)),onPointerUp:qn(e.onPointerUp,Fy(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function Fy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(e2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(Cv(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(A$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:g$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(B_())}),vt("right",()=>{e(z_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),G$(D,j,!o),x(j$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Kn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Oy("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Oy("user")),children:"User"})]}):ee(Kn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Oy("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Oy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(H$,{}):x(W$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Kn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(f$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(M$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function iI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Xg({...a,width:Math.floor(g)})),t=="height"&&r(Xg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Xg({...a,width:Math.floor(s)})),t=="height"&&r(Xg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(O$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(o$,{size:22}):x(i$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(iI,{dimension:"width",label:"Box W"}),x(iI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(TA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(TA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Kn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function n8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var W0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(oI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=r8(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(aI(P),!function(I,O){return O&&!Im(I)}(P,l.current)&&k)){if(Im(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(oI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},q_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},i8=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(G_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(q_,{className:"react-colorful__hue-pointer",left:t/360,color:i8({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:i8({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(G_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:i8(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=n8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;BH(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},sI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!sI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,sI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(G_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(q_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const K_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(P$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(K_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(w$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(y$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(L$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(E$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(o$,{size:22}):x(i$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(k$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(O$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Zv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current)return;const{width:o,height:a}=r?.image?r.image:{width:512,height:512},{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(I$(u)),n==="inpainting"?e(LA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(LA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Hv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",lI="Konva error: ",K6e="rgb(",_6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,$y=[];const Z6e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){$y.push(e),$y.length===1&&Z6e(function(){const t=$y;$y=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,j6e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Y_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Mg+a(t),l=Og+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Mg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(uI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=cI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];cn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Wy="allEventListeners",ru="absoluteTransform",dI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",o8="listening",fI="mouseenter",hI="mouseleave",pI="set",gI="Shape",R3=" ",mI="stage",_c="transform",gwe="Stage",a8="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===_c||t===ru)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===_c||t===ru,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new Z_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(O3),this._clearSelfAndDescendantCache(dI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==hwe&&(r=pI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(o8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(a8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==gwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_c),this._clearSelfAndDescendantCache(ru)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(_c);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(_c),this._clearSelfAndDescendantCache(ru),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(O3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;cn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Pp=e=>{const t=nm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function yI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",N3=[];class lx extends aa{constructor(t){super(yI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{yI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===bwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new S0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+vI,this.content.style.height=n+vI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rwwe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Mm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Pp(t.type),r=nm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Pp(t.type),r=nm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Pp(t.type),r=nm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Pp(t.type),r=nm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(l8,{evt:t}):this._fire(l8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,X_(t)),Mm(t.pointerId)}_lostpointercapture(t){Mm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Z_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let qy;function P6(){return qy||(qy=fe.createCanvasElement().getContext("2d"),qy)}const Om={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Om)););this.colorKey=n,Om[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Om[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Mm(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Y_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new Z_({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class Q_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Q_.prototype.nodeType="FastLayer";gr(Q_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=bI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=xI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===bI?this.setTime(t):this.state===xI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Rm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)Bwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Rm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function u8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function wI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",c8="up",d8="right",f8="down",h8="left",Uwe=cW.length;class J_ extends V0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var CI=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,CI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),CI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Yy;function A6(){return Yy||(Yy=fe.createCanvasElement().getContext(qwe),Yy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Ky+this.fontVariant()+Ky+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==EI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Ky||te===_I;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Ky),z.lastIndexOf(_I))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==EI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+T6)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),PI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function bW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(PI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(PI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new ta;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Jv({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ta;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new ta;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function TI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new TI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||T[H]!==M[se]){var he=` -`+T[H].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=H&&0<=se);break}}}finally{Os=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Nl(d):""}var Ch=Object.prototype.hasOwnProperty,Ru=[],Rs=-1;function No(d){return{current:d}}function Pn(d){0>Rs||(d.current=Ru[Rs],Ru[Rs]=null,Rs--)}function bn(d,f){Rs++,Ru[Rs]=d.current,d.current=f}var Do={},kr=No(Do),Ur=No(!1),zo=Do;function Ns(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var T={},M;for(M in y)T[M]=f[M];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function jr(d){return d=d.childContextTypes,d!=null}function Ga(){Pn(Ur),Pn(kr)}function Td(d,f,y){if(kr.current!==Do)throw Error(a(168));bn(kr,f),bn(Ur,y)}function zl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var T in _)if(!(T in f))throw Error(a(108,z(d)||"Unknown",T));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=kr.current,bn(kr,d),bn(Ur,Ur.current),!0}function Ad(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=zl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,Pn(Ur),Pn(kr),bn(kr,d)):Pn(Ur),bn(Ur,y)}var gi=Math.clz32?Math.clz32:Id,_h=Math.log,kh=Math.LN2;function Id(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var Ds=64,co=4194304;function zs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Bl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,T=d.suspendedLanes,M=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~T;se!==0?_=zs(se):(M&=H,M!==0&&(_=zs(M)))}else H=y&~T,H!==0?_=zs(H):M!==0&&(_=zs(M));if(_===0)return 0;if(f!==0&&f!==_&&(f&T)===0&&(T=_&-_,M=f&-f,T>=M||T===16&&(M&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ma(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,T-=H,Gi=1<<32-gi(f)+T|y<Ft?(Br=kt,kt=null):Br=kt.sibling;var Kt=Ye(ge,kt,be[Ft],We);if(Kt===null){kt===null&&(kt=Br);break}d&&kt&&Kt.alternate===null&&f(ge,kt),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt,kt=Br}if(Ft===be.length)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;FtFt?(Br=kt,kt=null):Br=kt.sibling;var ns=Ye(ge,kt,Kt.value,We);if(ns===null){kt===null&&(kt=Br);break}d&&kt&&ns.alternate===null&&f(ge,kt),ue=M(ns,ue,Ft),Tt===null?Le=ns:Tt.sibling=ns,Tt=ns,kt=Br}if(Kt.done)return y(ge,kt),zn&&Bs(ge,Ft),Le;if(kt===null){for(;!Kt.done;Ft++,Kt=be.next())Kt=Lt(ge,Kt.value,We),Kt!==null&&(ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return zn&&Bs(ge,Ft),Le}for(kt=_(ge,kt);!Kt.done;Ft++,Kt=be.next())Kt=Fn(kt,ge,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&kt.delete(Kt.key===null?Ft:Kt.key),ue=M(Kt,ue,Ft),Tt===null?Le=Kt:Tt.sibling=Kt,Tt=Kt);return d&&kt.forEach(function(si){return f(ge,si)}),zn&&Bs(ge,Ft),Le}function Ko(ge,ue,be,We){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Le=be.key,Tt=ue;Tt!==null;){if(Tt.key===Le){if(Le=be.type,Le===h){if(Tt.tag===7){y(ge,Tt.sibling),ue=T(Tt,be.props.children),ue.return=ge,ge=ue;break e}}else if(Tt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===L&&A1(Le)===Tt.type){y(ge,Tt.sibling),ue=T(Tt,be.props),ue.ref=ba(ge,Tt,be),ue.return=ge,ge=ue;break e}y(ge,Tt);break}else f(ge,Tt);Tt=Tt.sibling}be.type===h?(ue=Qs(be.props.children,ge.mode,We,be.key),ue.return=ge,ge=ue):(We=lf(be.type,be.key,be.props,null,ge.mode,We),We.ref=ba(ge,ue,be),We.return=ge,ge=We)}return H(ge);case u:e:{for(Tt=be.key;ue!==null;){if(ue.key===Tt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(ge,ue.sibling),ue=T(ue,be.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=Js(be,ge.mode,We),ue.return=ge,ge=ue}return H(ge);case L:return Tt=be._init,Ko(ge,ue,Tt(be._payload),We)}if(ie(be))return Ln(ge,ue,be,We);if(R(be))return er(ge,ue,be,We);Di(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=T(ue,be),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(be,ge.mode,We),ue.return=ge,ge=ue),H(ge)):y(ge,ue)}return Ko}var ju=c2(!0),d2=c2(!1),Ud={},go=No(Ud),xa=No(Ud),oe=No(Ud);function xe(d){if(d===Ud)throw Error(a(174));return d}function ve(d,f){bn(oe,f),bn(xa,d),bn(go,Ud),d=G(f),Pn(go),bn(go,d)}function Ke(){Pn(go),Pn(xa),Pn(oe)}function _t(d){var f=xe(oe.current),y=xe(go.current);f=W(y,d.type,f),y!==f&&(bn(xa,d),bn(go,f))}function Jt(d){xa.current===d&&(Pn(go),Pn(xa))}var Ot=No(0);function un(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Mu(y)||Ld(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var jd=[];function I1(){for(var d=0;dy?y:4,d(!0);var _=Gu.transition;Gu.transition={};try{d(!1),f()}finally{Ht=y,Gu.transition=_}}function Ju(){return yi().memoizedState}function F1(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},tc(d))nc(f,y);else if(y=Uu(d,f,y,_),y!==null){var T=ai();yo(y,d,_,T),Xd(y,f,_)}}function ec(d,f,y){var _=Ar(d),T={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(tc(d))nc(f,T);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var H=f.lastRenderedState,se=M(H,y);if(T.hasEagerState=!0,T.eagerState=se,U(se,H)){var he=f.interleaved;he===null?(T.next=T,Wd(f)):(T.next=he.next,he.next=T),f.interleaved=T;return}}catch{}finally{}y=Uu(d,f,T,_),y!==null&&(T=ai(),yo(y,d,_,T),Xd(y,f,_))}}function tc(d){var f=d.alternate;return d===xn||f!==null&&f===xn}function nc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Fl(d,y)}}var Za={readContext:qi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},px={readContext:qi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:qi,useEffect:p2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Vl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Vl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Vl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=F1.bind(null,xn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:h2,useDebugValue:D1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=h2(!1),f=d[0];return d=B1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=xn,T=qr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Wl&30)!==0||N1(_,f,y)}T.memoizedState=y;var M={value:y,getSnapshot:f};return T.queue=M,p2(Hs.bind(null,_,M,d),[d]),_.flags|=2048,Yd(9,Xu.bind(null,_,M,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(zn){var y=va,_=Gi;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=qu++,0np&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304)}else{if(!_)if(d=un(M),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),oc(T,!0),T.tail===null&&T.tailMode==="hidden"&&!M.alternate&&!zn)return ri(f),null}else 2*Wn()-T.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,oc(T,!1),f.lanes=4194304);T.isBackwards?(M.sibling=f.child,f.child=M):(d=T.last,d!==null?d.sibling=M:f.child=M,T.last=M)}return T.tail!==null?(f=T.tail,T.rendering=f,T.tail=f.sibling,T.renderingStartTime=Wn(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return pc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),it&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function q1(d,f){switch(E1(f),f.tag){case 1:return jr(f.type)&&Ga(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ke(),Pn(Ur),Pn(kr),I1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(Pn(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Hu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Pn(Ot),null;case 4:return Ke(),null;case 10:return $d(f.type._context),null;case 22:case 23:return pc(),null;case 24:return null;default:return null}}var Vs=!1,Pr=!1,xx=typeof WeakSet=="function"?WeakSet:Set,Je=null;function ac(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Vh=!1;function jl(d,f){for(q(d.containerInfo),Je=f;Je!==null;)if(d=Je,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Je=f;else for(;Je!==null;){d=Je;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,M=d.stateNode,H=M.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),T);M.__reactInternalSnapshotBeforeUpdate=H}break;case 3:it&&As(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Je=f;break}Je=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var T=_=_.next;do{if((T.tag&d)===d){var M=T.destroy;T.destroy=void 0,M!==void 0&&Uo(f,y,M)}T=T.next}while(T!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=le(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function K1(d){var f=d.alternate;f!==null&&(d.alternate=null,K1(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&ut(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function sc(d){return d.tag===5||d.tag===3||d.tag===4}function Qa(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||sc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Gh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Fe(y,d,f):At(y,d);else if(_!==4&&(d=d.child,d!==null))for(Gh(d,f,y),d=d.sibling;d!==null;)Gh(d,f,y),d=d.sibling}function Y1(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(Y1(d,f,y),d=d.sibling;d!==null;)Y1(d,f,y),d=d.sibling}var br=null,jo=!1;function Go(d,f,y){for(y=y.child;y!==null;)Lr(d,f,y),y=y.sibling}function Lr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(ln,y)}catch{}switch(y.tag){case 5:Pr||ac(y,f);case 6:if(it){var _=br,T=jo;br=null,Go(d,f,y),br=_,jo=T,br!==null&&(jo?nt(br,y.stateNode):gt(br,y.stateNode))}else Go(d,f,y);break;case 18:it&&br!==null&&(jo?S1(br,y.stateNode):x1(br,y.stateNode));break;case 4:it?(_=br,T=jo,br=y.stateNode.containerInfo,jo=!0,Go(d,f,y),br=_,jo=T):(It&&(_=y.stateNode.containerInfo,T=ga(_),Iu(_,T)),Go(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){T=_=_.next;do{var M=T,H=M.destroy;M=M.tag,H!==void 0&&((M&2)!==0||(M&4)!==0)&&Uo(y,f,H),T=T.next}while(T!==_)}Go(d,f,y);break;case 1:if(!Pr&&(ac(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}Go(d,f,y);break;case 21:Go(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,Go(d,f,y),Pr=_):Go(d,f,y);break;default:Go(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new xx),f.forEach(function(_){var T=M2.bind(null,d,_);y.has(_)||(y.add(_),_.then(T,T))})}}function mo(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Xh:return":has("+(Q1(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case lc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function uc(d,f){var y=[];d=[d,0];for(var _=0;_T&&(T=H),_&=~M}if(_=T,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Sx(_/1960))-_,10<_){d.timeoutHandle=ct(Xs.bind(null,d,xi,es),_);break}Xs(d,xi,es);break;case 5:Xs(d,xi,es);break;default:throw Error(a(329))}}}return Yr(d,Wn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=fc;return d.current.memoizedState.isDehydrated&&(Ys(d,f).flags|=256),d=gc(d,f),d!==2&&(f=xi,xi=y,f!==null&&sp(f)),d}function sp(d){xi===null?xi=d:xi.push.apply(xi,d)}function Zi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Bt&6)!==0)throw Error(a(331));var T=Bt;for(Bt|=4,Je=d.current;Je!==null;){var M=Je,H=M.child;if((Je.flags&16)!==0){var se=M.deletions;if(se!==null){for(var he=0;heWn()-tg?Ys(d,0):eg|=y),Yr(d,f)}function ag(d,f){f===0&&((d.mode&1)===0?f=1:(f=co,co<<=1,(co&130023424)===0&&(co=4194304)));var y=ai();d=$o(d,f),d!==null&&(ma(d,f,y),Yr(d,y))}function Cx(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),ag(d,y)}function M2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),ag(d,y)}var sg;sg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)zi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return zi=!1,yx(d,f,y);zi=(d.flags&131072)!==0}else zi=!1,zn&&(f.flags&1048576)!==0&&k1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Sa(d,f),d=f.pendingProps;var T=Ns(f,kr.current);Vu(f,y),T=O1(null,f,_,d,T,y);var M=Ku();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(M=!0,qa(f)):M=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,L1(f),T.updater=Ho,f.stateNode=T,T._reactInternals=f,T1(f,_,d,y),f=Wo(null,f,_,!0,M,y)):(f.tag=0,zn&&M&&mi(f),bi(null,f,T,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Sa(d,f),d=f.pendingProps,T=_._init,_=T(_._payload),f.type=_,T=f.tag=cp(_),d=Fo(_,d),T){case 0:f=W1(null,f,_,d,y);break e;case 1:f=C2(null,f,_,d,y);break e;case 11:f=b2(null,f,_,d,y);break e;case 14:f=Ws(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),W1(d,f,_,T,y);case 1:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),C2(d,f,_,T,y);case 3:e:{if(_2(f),d===null)throw Error(a(387));_=f.pendingProps,M=f.memoizedState,T=M.element,a2(d,f),Rh(f,_,null,y);var H=f.memoizedState;if(_=H.element,wt&&M.isDehydrated)if(M={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){T=rc(Error(a(423)),f),f=k2(d,f,_,y,T);break e}else if(_!==T){T=rc(Error(a(424)),f),f=k2(d,f,_,y,T);break e}else for(wt&&(ho=h1(f.stateNode.containerInfo),Vn=f,zn=!0,Ni=null,po=!1),y=d2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Hu(),_===T){f=Xa(d,f,y);break e}bi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Dd(f),_=f.type,T=f.pendingProps,M=d!==null?d.memoizedProps:null,H=T.children,He(_,T)?H=null:M!==null&&He(_,M)&&(f.flags|=32),w2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Dd(f),null;case 13:return E2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=ju(f,null,_,y):bi(d,f,_,y),f.child;case 11:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),b2(d,f,_,T,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,T=f.pendingProps,M=f.memoizedProps,H=T.value,o2(f,_,H),M!==null)if(U(M.value,H)){if(M.children===T.children&&!Ur.current){f=Xa(d,f,y);break e}}else for(M=f.child,M!==null&&(M.return=f);M!==null;){var se=M.dependencies;if(se!==null){H=M.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(M.tag===1){he=Ya(-1,y&-y),he.tag=2;var Re=M.updateQueue;if(Re!==null){Re=Re.shared;var tt=Re.pending;tt===null?he.next=he:(he.next=tt.next,tt.next=he),Re.pending=he}}M.lanes|=y,he=M.alternate,he!==null&&(he.lanes|=y),Hd(M.return,y,f),se.lanes|=y;break}he=he.next}}else if(M.tag===10)H=M.type===f.type?null:M.child;else if(M.tag===18){if(H=M.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),Hd(H,y,f),H=M.sibling}else H=M.child;if(H!==null)H.return=M;else for(H=M;H!==null;){if(H===f){H=null;break}if(M=H.sibling,M!==null){M.return=H.return,H=M;break}H=H.return}M=H}bi(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,_=f.pendingProps.children,Vu(f,y),T=qi(T),_=_(T),f.flags|=1,bi(d,f,_,y),f.child;case 14:return _=f.type,T=Fo(_,f.pendingProps),T=Fo(_.type,T),Ws(d,f,_,T,y);case 15:return x2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,T=f.pendingProps,T=f.elementType===_?T:Fo(_,T),Sa(d,f),f.tag=1,jr(_)?(d=!0,qa(f)):d=!1,Vu(f,y),l2(f,_,T),T1(f,_,T,y),Wo(null,f,_,!0,d,y);case 19:return L2(d,f,y);case 22:return S2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return Bu(d,f)}function wa(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bo(d,f,y,_){return new wa(d,f,y,_)}function lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=bo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function lf(d,f,y,_,T,M){var H=2;if(_=d,typeof d=="function")lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return Qs(y.children,T,M,f);case g:H=8,T|=8;break;case m:return d=bo(12,y,f,T|2),d.elementType=m,d.lanes=M,d;case E:return d=bo(13,y,f,T),d.elementType=E,d.lanes=M,d;case P:return d=bo(19,y,f,T),d.elementType=P,d.lanes=M,d;case I:return dp(y,T,M,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case L:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=bo(H,y,f,T),f.elementType=d,f.type=_,f.lanes=M,f}function Qs(d,f,y,_){return d=bo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=bo(22,d,_,f),d.elementType=I,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=bo(6,d,null,f),d.lanes=y,d}function Js(d,f,y){return f=bo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function uf(d,f,y,_,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zu(0),this.expirationTimes=zu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zu(0),this.identifierPrefix=_,this.onRecoverableError=T,wt&&(this.mutableSourceEagerHydrationData=null)}function O2(d,f,y,_,T,M,H,se,he){return d=new uf(d,f,y,se,he),f===1?(f=1,M===!0&&(f|=8)):f=0,M=bo(3,null,null,f),d.current=M,M.stateNode=d,M.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},L1(M),d}function ug(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return zl(d,y,f)}return f}function cg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function cf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&M>=Lt&&T<=tt&&H<=Ye){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||YeH){if(!(M!==Lt||y.height!==he.height||tt<_||Re>T)){Re>_&&(he.width+=Re-_,he.x=_),ttM&&(he.height+=Lt-M,he.y=M),Yey&&(y=H)),H ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return le(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||dg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{ln=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=J1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var T=f.current,M=ai(),H=Ar(T);return y=ug(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,H),d!==null&&(yo(d,T,H,M),Oh(d,T,H)),H},n};(function(e){e.exports=q9e})(xW);const K9e=A8(xW.exports);var ek={exports:{}},bh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(ek);const AI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let II=!1,MI=!1;const tk=".react-konva-event",Y9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,Z9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,X9e={};function ux(e,t,n=X9e){if(!II&&"zIndex"in t&&(console.warn(Z9e),II=!0),!MI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),MI=!0)}for(var o in n)if(!AI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!AI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ed(e));for(var l in v)e.on(l+tk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ed(e)}function e8e(e,t,n){let r=eh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=eh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ux(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return SW}function d8e(){return SW}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function x8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function S8e(e,t,n){wW(e,t,n)}function w8e(e,t){t.destroy(),t.off(tk),Ed(e)}function C8e(e,t){t.destroy(),t.off(tk),Ed(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){ux(e,i,r)}function P8e(e){e.hide(),Ed(e)}function L8e(e){}function T8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function I8e(e){}function M8e(){}const O8e=()=>ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:x8e,insertBefore:wW,insertInContainerBefore:S8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:L8e,unhideInstance:T8e,unhideTextInstance:A8e,clearContainer:I8e,detachDeletedInstance:M8e,getCurrentEventPriority:O8e,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,OI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,RI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&RI(e,n,t[n]);if(OI)for(var n of OI(t))F8e.call(t,n)&&RI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function nk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=nk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const rk=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(rk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(rk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:nk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],DI=new WeakMap;function U8e(){var e;const t=V8e();Bg.splice(0,Bg.length),nk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==rk&&Bg.push(CW(i))});for(const n of Bg){const r=(e=W8e.current)==null?void 0:e.readContext(n);DI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(NI({},i),{value:DI.get(r)}))),n=>x(_W,{...NI({},n)})),[])}function j8e(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const G8e=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=j8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=rm.createContainer(n.current,ek.exports.LegacyRoot,!1,null),rm.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),rm.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),rm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Xy="Layer",dd="Group",w0="Rect",Fg="Circle",i5="Line",kW="Image",q8e="Transformer",rm=K9e(R8e);rm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const K8e=re.forwardRef((e,t)=>x(_W,{children:x(G8e,{...e,forwardedRef:t})})),Y8e=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=e=>{const{...t}=e,n=Ce(Y8e);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},ik=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},X8e=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ik(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(X8e);return l?ee(dd,{listening:!1,...t,children:[x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Fg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=Qe(jt,qb,Zv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),eCe=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(J8e),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Ay(W,64),X=Ay(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v&&b!=="outpainting")return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,b,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Xg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Ay(W.x,O)+Q,ye=Ay(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v&&b!=="outpainting"||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[b,v,g.height,g.width]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(Iy(!1))},j=()=>{n(AA(!0))},te=()=>{n(g6(!1)),n(AA(!1)),n(Iy(!1))},ie=()=>{n(Iy(!0))},le=()=>{!u&&!l&&n(Iy(!1))};return ee(dd,{...t,children:[x(w0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(w0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(w0,{...b==="inpainting"?{dragBoundFunc:D}:{},listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(q8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},tCe=Qe([jt,vn],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),nCe=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(tCe),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},rCe=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ik(t)}}),zI=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),iCe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(rCe),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=zI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=zI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x!==void 0&&r.y!==void 0&&o!==void 0&&i.width!==void 0&&i.height!==void 0?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},oCe=.999,aCe=.1,sCe=20,lCe=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),uCe=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(lCe);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*oCe**l,aCe,sCe),h={x:a.x-s.x*u,y:a.y-s.y*u};t(I$(u)),t(R$(h))},[i,t,n,e,r])},cx=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},cCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),dCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(cCe);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},fCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),hCe=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(fCe);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(_$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},pCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),gCe=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(pCe);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(T$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(_$([s.x,s.y]))))},[t,r,i,a,n,e,o])},mCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),vCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(mCe);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},yCe=()=>{const e=$e();return C.exports.useCallback(()=>{e(T$(null)),e(Gb(!1))},[e])},bCe=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),xCe=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(bCe);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(R$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,SCe=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),vf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const EW=e=>{const{url:t,x:n,y:r}=e,[i]=SCe(t);return x(kW,{x:n,y:r,image:i,listening:!1})},wCe=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),CCe=()=>{const{objects:e}=Ce(wCe);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ik(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},_Ce=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),kCe=()=>{const{colorMode:e}=Av(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_Ce),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},ECe=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),PCe=e=>{const{...t}=e,n=Ce(ECe),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},$g=e=>Math.round(e*100)/100,LCe=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),TCe=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(LCe);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${$g(n)}, ${$g(r)}`}),x("div",{children:`Scale: ${$g(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${$g(a)}, ${$g(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var ACe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},MCe=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=ACe(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&ICe(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},OCe=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),RCe=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(OCe),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(MCe,{children:x(HR,{value:wV,children:x(pF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(g$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},NCe=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v,shouldShowIntermediates:b}=e,{shouldShowGrid:w}=t;let E="";return m==="move"||n?v?E="grabbing":E="grab":s?E=void 0:l?E="move":E="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:w,stageCoordinates:g,stageCursor:E,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n,shouldShowIntermediates:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h,shouldShowIntermediates:g}=Ce(NCe);nCe(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const m=C.exports.useRef({x:0,y:0}),v=C.exports.useRef(!1),b=uCe(kc),w=dCe(kc),E=hCe(kc,v),P=gCe(kc,v,m),k=vCe(kc),L=yCe(),{handleDragStart:I,handleDragMove:O,handleDragEnd:R}=xCe();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(K8e,{tabIndex:-1,ref:kc,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onMouseDown:w,onMouseEnter:k,onMouseLeave:L,onMouseMove:P,onMouseOut:L,onMouseUp:E,onDragStart:I,onDragMove:O,onDragEnd:R,onWheel:b,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Xy,{id:"grid",visible:r,children:x(kCe,{})}),x(Xy,{id:"base",ref:au,listening:!1,imageSmoothingEnabled:!1,children:x(CCe,{})}),ee(Xy,{id:"mask",visible:e,listening:!1,children:[x(Z8e,{visible:!0,listening:!1}),x(iCe,{listening:!1})]}),ee(Xy,{id:"preview",imageSmoothingEnabled:!1,children:[!h&&x(Q8e,{visible:l!=="move",listening:!1}),h&&x(RCe,{}),g&&x(PCe,{}),!h&&x(eCe,{visible:n})]})]}),u&&x(TCe,{})]})})},DCe=Qe([Zv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),zCe=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(DCe);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function BCe(){const e=$e();return C.exports.useEffect(()=>{e(N$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(zCe,{})})}function FCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $Ce=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(F_,{})})});function HCe(){return x(rx,{optionsPanel:x(FCe,{}),children:x($Ce,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function WCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function VCe(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(B_())},g=()=>{e(z_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Kn,{children:[x(WCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function UCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Kv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Yv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const jCe=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),GCe=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(jCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(M$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},qCe=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),KCe=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(qCe),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(y$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},YCe=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(YCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(w$(o))})}),x(K_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},XCe=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(XCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(L$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(E$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(k$(o.target.checked))}),x(K_,{color:n,onChange:o=>e(P$(o))})]})})},JCe=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(JCe);return ee("div",{className:"inpainting-settings",children:[x(QCe,{}),ee(ro,{isAttached:!0,children:[x(ZCe,{}),x(KCe,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(D$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(v$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(GCe,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const r=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(N$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(UCe,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(HCe,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(BCe,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(uF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(sF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(aF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(lF,{className:"app-tabs-panels",children:t?x(VCe,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b)},resetOptionsState:e=>({...e,...IW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=dx.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:e2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:p8,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:Cv,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):BI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):BI(new Blob([t]),r):r(Tl[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",im=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,H7e={};let $I=0,Jy=0,HI;function WI(e){let t="";do t=QW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function JW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Jy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};O7e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M7e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new kl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kl extends Vr{constructor(t,n){super(),hx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=ZW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=kl.requestsCount++,kl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,UI=!0,q7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jI?{}:ZW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UI&&!jI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UI&&this.ws.send(o)}catch{}i&&rV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JW()),this.supportsBinary||(t.b64=1);const i=eV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),hx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=W7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Bc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Bc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Bc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ok(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class u_e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:ak},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(d_e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}s1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class w8 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new s1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||c_e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Hg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Hg[i]&&o in Hg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(Hg[i]||(Hg[i]=new w8(r,t)),l=Hg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:w8,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(GI[t]||t||GI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return g()},MM:function(){return Qo(g())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var GI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Co={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},qI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(CA(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(IA("user")):t(V9("user")),r.categories.result.latest_mtime?t(IA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(CA(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(My({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(Cv(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(My({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(NA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(My({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(NA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(My({image:a,category:"user"})),i){case"img2img":{t(Cv(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(d6("Model Changed")),t(y0(!1)),t(kA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(y0(!1)),t(kA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},x_e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?l$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(i==="inpainting"){const w=Zv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=xF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=$F.getPersistConfig({key:"root",storage:FF,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Hv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(WB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"V"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-6"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(yv,{}),ee(vv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(yz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Kn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(yv,{}),ee(vv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(c$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(yv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(vv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(d$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Av(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(d$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Kn,{children:[n&&x(rH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(m$,{}),onClick:l})})]})};function Q_e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var J_e=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function t2(e,t){var n=eke(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return k8(e.target.files).map(function(t){return t2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return t2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,YI(cV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return t2(o)}))]}})})}function YI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function k8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=pV(l,n),h=_v(u,1),g=h[0],m=gV(l,r,i),v=_v(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Uke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var sk=C.exports.forwardRef(function(e,t){var n=e.children,r=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});sk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};sk.defaultProps=bV;sk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var T8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:iM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:iM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,T8),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",nM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",nM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(L8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=L8({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},T8),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},T8);default:return e}}function iM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` -`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(MA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(MA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(f$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Kn,{children:[x(B$,{iconButton:!0}),x($$,{}),x(F$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=IR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(HR,{value:wV,children:x(pF,{children:x(Jke,{})})})})})})); diff --git a/frontend/dist/assets/index.c60403ea.js b/frontend/dist/assets/index.c60403ea.js new file mode 100644 index 0000000000..54d755096f --- /dev/null +++ b/frontend/dist/assets/index.c60403ea.js @@ -0,0 +1,623 @@ +function mq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Iv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var MO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OO=Object.assign,IO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RO(){}RO.prototype=Z0.prototype;function O9(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}var I9=O9.prototype=new RO;I9.constructor=O9;OO(I9,Z0.prototype);I9.isPureReactComponent=!0;var gE=Array.isArray,NO=Object.prototype.hasOwnProperty,R9={current:null},DO={key:!0,ref:!0,__self:!0,__source:!0};function zO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)NO.call(t,r)&&!DO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=G[Z];if(0>>1;Zi(Fe,j))Wei(ht,Fe)?(G[Z]=ht,G[We]=j,Z=We):(G[Z]=Fe,G[xe]=j,Z=xe);else if(Wei(ht,j))G[Z]=ht,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,oe(I);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function I(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function q(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Q=!0;try{Q=N(!0,G)}finally{Q?H():(R=!1,N=null)}}else R=!1}var H;if(typeof k=="function")H=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,re=J.port2;J.port1.onmessage=de,H=function(){re.postMessage(null)}}else H=function(){E(de,0)};function oe(G){N=G,R||(R=!0,H())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,oe(I))},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,oe(I))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(BO);(function(e){e.exports=BO})(n0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var FO=C.exports,ua=n0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dw=Object.prototype.hasOwnProperty,Oq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Iq(e){return Dw.call(yE,e)?!0:Dw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Rq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nq(e,t,n,r){if(t===null||typeof t>"u"||Rq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var D9=/[\-:]([a-z])/g;function z9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function B9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Gb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xg(e):""}function Dq(e){switch(e.tag){case 5:return Xg(e.type);case 16:return Xg("Lazy");case 13:return Xg("Suspense");case 19:return Xg("SuspenseList");case 0:case 2:case 15:return e=jb(e.type,!1),e;case 11:return e=jb(e.type.render,!1),e;case 1:return e=jb(e.type,!0),e;default:return""}}function $w(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dp:return"Fragment";case Np:return"Portal";case zw:return"Profiler";case F9:return"StrictMode";case Bw:return"Suspense";case Fw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case WO:return(e.displayName||"Context")+".Consumer";case HO:return(e._context.displayName||"Context")+".Provider";case $9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H9:return t=e.displayName||null,t!==null?t:$w(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return $w(e(t))}catch{}}return null}function zq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $w(t);case 8:return t===F9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Qc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bq(e){var t=UO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ey(e){e._valueTracker||(e._valueTracker=Bq(e))}function GO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function e4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jO(e,t){t=t.checked,t!=null&&B9(e,"checked",t,!1)}function Ww(e,t){jO(e,t);var n=Qc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vw(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vw(e,t.type,Qc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vw(e,t,n){(t!=="number"||e4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zg=Array.isArray;function r0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ty.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fq=["Webkit","ms","Moz","O"];Object.keys(pm).forEach(function(e){Fq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pm[t]=pm[e]})});function XO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pm.hasOwnProperty(e)&&pm[e]?(""+t).trim():t+"px"}function ZO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=XO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Yw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qw=null;function W9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kw=null,i0=null,o0=null;function _E(e){if(e=Dv(e)){if(typeof Kw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=C5(t),Kw(e.stateNode,e.type,t))}}function QO(e){i0?o0?o0.push(e):o0=[e]:i0=e}function JO(){if(i0){var e=i0,t=o0;if(o0=i0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var ny=64,ry=4194304;function Qg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function i4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Qg(s):(o&=a,o!==0&&(r=Qg(o)))}else a=n&~i,a!==0?r=Qg(a):o!==0&&(r=Qg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Rv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mm),IE=String.fromCharCode(32),RE=!1;function SI(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zp=!1;function OK(e,t){switch(e){case"compositionend":return bI(t);case"keypress":return t.which!==32?null:(RE=!0,IE);case"textInput":return e=t.data,e===IE&&RE?null:e;default:return null}}function IK(e,t){if(zp)return e==="compositionend"||!X9&&SI(e,t)?(e=vI(),p3=Y9=Rc=null,zp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=BE(n)}}function _I(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_I(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kI(){for(var e=window,t=e4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=e4(e.document)}return t}function Z9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WK(e){var t=kI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_I(n.ownerDocument.documentElement,n)){if(r!==null&&Z9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=FE(n,o);var a=FE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bp=null,t6=null,ym=null,n6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;n6||Bp==null||Bp!==e4(r)||(r=Bp,"selectionStart"in r&&Z9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ym&&Zm(ym,r)||(ym=r,r=s4(t6,"onSelect"),0Hp||(e.current=l6[Hp],l6[Hp]=null,Hp--)}function jn(e,t){Hp++,l6[Hp]=e.current,e.current=t}var Jc={},Wi=ld(Jc),To=ld(!1),Yf=Jc;function M0(e,t){var n=e.type.contextTypes;if(!n)return Jc;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function u4(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==Jc)throw Error(Ie(168));jn(Wi,t),jn(To,n)}function RI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ie(108,zq(e)||"Unknown",i));return fr({},n,r)}function c4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jc,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=RI(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,_5=!1,ax=!1;function NI(e){su===null?su=[e]:su.push(e)}function eX(e){_5=!0,NI(e)}function ud(){if(!ax&&su!==null){ax=!0;var e=0,t=Tn;try{var n=su;for(Tn=1;e>=a,i-=a,uu=1<<32-ys(t)+i|n<z?($=N,N=null):$=N.sibling;var W=m(P,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(P,N),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var q=m(P,N,W.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),R===null?I=q:R.sibling=q,R=q,N=$}if(W.done)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(P,W.value,M),W!==null&&(k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return nr&&mf(P,z),I}for(N=r(P,N);!W.done;z++,W=T.next())W=v(N,P,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),I}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Dp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case J2:e:{for(var I=T.key,R=k;R!==null;){if(R.key===I){if(I=T.type,I===Dp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ec&&tP(I)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Pg(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Dp?(k=Ff(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=w3(T.type,T.key,T.props,null,P.mode,M),M.ref=Pg(P,k,T),M.return=P,P=M)}return a(P);case Np:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=px(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return R=T._init,E(P,k,R(T._payload),M)}if(Zg(T))return S(P,k,T,M);if(wg(T))return w(P,k,T,M);cy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=hx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var I0=VI(!0),UI=VI(!1),zv={},bl=ld(zv),tv=ld(zv),nv=ld(zv);function Af(e){if(e===zv)throw Error(Ie(174));return e}function a7(e,t){switch(jn(nv,t),jn(tv,e),jn(bl,zv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(tv),Zn(nv)}function GI(e){Af(nv.current);var t=Af(bl.current),n=Gw(t,e.type);t!==n&&(jn(tv,e),jn(bl,n))}function s7(e){tv.current===e&&(Zn(bl),Zn(tv))}var ur=ld(0);function m4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sx=[];function l7(){for(var e=0;en?n:4,e(!0);var r=lx.transition;lx.transition={};try{e(!1),t()}finally{Tn=n,lx.transition=r}}function sR(){return Fa().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lR(e))uR(t,n);else if(n=FI(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),cR(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lR(e))uR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,i7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FI(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),cR(n,t,r))}}function lR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function uR(e,t){Sm=v4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,U9(e,n)}}var y4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},aX={readContext:Ba,useCallback:function(e,t){return sl().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,y3(4194308,4,nR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return y3(4194308,4,e,t)},useInsertionEffect:function(e,t){return y3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:h7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),ci===null)throw Error(Ie(349));(Kf&30)!==0||qI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(XI.bind(null,r,o,e),[e]),r.flags|=2048,ov(9,KI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=ci.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[ev]=r,SR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Yw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iD0&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304)}else{if(!r)if(e=m4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Or()-o.renderingStartTime>D0&&n!==1073741824&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,jn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return S7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function pX(e,t){switch(J9(t),t.tag){case 1:return Ao(t.type)&&u4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),l7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return s7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));O0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return r7(t.type._context),null;case 22:case 23:return S7(),null;case 24:return null;default:return null}}var fy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Gp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function b6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(r6=o4,e=kI(),Z9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(i6={focusedElem:e,selectionRange:n},o4=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function bm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&b6(t,n,o)}i=i.next}while(i!==r)}}function P5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function x6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wR(e){var t=e.alternate;t!==null&&(e.alternate=null,wR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[ev],delete t[s6],delete t[QK],delete t[JK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=l4));else if(r!==4&&(e=e.child,e!==null))for(w6(e,t,n),e=e.sibling;e!==null;)w6(e,t,n),e=e.sibling}function C6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(C6(e,t,n),e=e.sibling;e!==null;)C6(e,t,n),e=e.sibling}var ki=null,fs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)_R(e,t,n),n=n.sibling}function _R(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Hi||Gp(n,t);case 6:var r=ki,i=fs;ki=null,Sc(e,t,n),ki=r,fs=i,ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ki.removeChild(n.stateNode));break;case 18:ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?ox(e.parentNode,n):e.nodeType===1&&ox(e,n),Km(e)):ox(ki,n.stateNode));break;case 4:r=ki,i=fs,ki=n.stateNode.containerInfo,fs=!0,Sc(e,t,n),ki=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&b6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Gp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function as(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,x4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-v7?Bf(e,0):m7|=n),Lo(e,t)}function OR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ry,ry<<=1,(ry&130023424)===0&&(ry=4194304)));var n=ro();e=vu(e,t),e!==null&&(Rv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),OR(e,n)}function kX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ie(314))}r!==null&&r.delete(t),OR(e,n)}var IR;IR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&DI(t,f4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;S3(e,t),e=t.pendingProps;var i=M0(t,Wi.current);s0(t,n),i=c7(null,t,r,e,i,n);var o=d7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,c4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,o7(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,h6(t,r,e,n),t=m6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&Q9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(S3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=ds(r,e),i){case 0:t=g6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,ds(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),g6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),uP(e,t,r,i,n);case 3:e:{if(mR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$I(e,t),g4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=N0(Error(Ie(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=N0(Error(Ie(424)),t),t=cP(e,t,r,n,i);break e}else for(ia=Uc(t.stateNode.containerInfo.firstChild),oa=t,nr=!0,ps=null,n=UI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(O0(),r===i){t=yu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return GI(t),e===null&&c6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,o6(r,i)?a=null:o!==null&&o6(r,o)&&(t.flags|=32),gR(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&c6(t),null;case 13:return vR(e,t,n);case 4:return a7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=I0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,jn(h4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=yu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),d6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),d6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,s0(t,n),i=Ba(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),lP(e,t,r,i,n);case 15:return hR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),S3(e,t),t.tag=1,Ao(r)?(e=!0,c4(t)):e=!1,s0(t,n),WI(t,r,i),h6(t,r,i,n),m6(null,t,r,!0,e,n);case 19:return yR(e,t,n);case 22:return pR(e,t,n)}throw Error(Ie(156,t.tag))};function RR(e,t){return aI(e,t)}function EX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oa(e,t,n,r){return new EX(e,t,n,r)}function x7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return x7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$9)return 11;if(e===H9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Oa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function w3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Dp:return Ff(n.children,i,o,t);case F9:a=8,i|=8;break;case zw:return e=Oa(12,n,t,i|2),e.elementType=zw,e.lanes=o,e;case Bw:return e=Oa(13,n,t,i),e.elementType=Bw,e.lanes=o,e;case Fw:return e=Oa(19,n,t,i),e.elementType=Fw,e.lanes=o,e;case VO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case HO:a=10;break e;case WO:a=9;break e;case $9:a=11;break e;case H9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Oa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ff(e,t,n,r){return e=Oa(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Oa(22,e,r,t),e.elementType=VO,e.lanes=n,e.stateNode={isHidden:!1},e}function hx(e,t,n){return e=Oa(6,e,null,t),e.lanes=n,e}function px(e,t,n){return t=Oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qb(0),this.expirationTimes=qb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function w7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},o7(o),e}function AX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=fa})(Ol);const gy=M9(Ol.exports);var wP=Ol.exports;Nw.createRoot=wP.createRoot,Nw.hydrateRoot=wP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,R5={exports:{}},N5={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var RX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,BX=RX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FX={key:!0,ref:!0,__self:!0,__source:!0};function BR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zX.call(t,r)&&!FX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NX,type:e,key:o,ref:a,props:i,_owner:BX.current}}N5.Fragment=DX;N5.jsx=BR;N5.jsxs=BR;(function(e){e.exports=N5})(R5);const Nn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var E7=C.exports.createContext({});E7.displayName="ColorModeContext";function Bv(){const e=C.exports.useContext(E7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var my={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?my.dark:my.light),document.body.classList.remove(r?my.light:my.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var HX="chakra-ui-color-mode";function WX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(E7.Provider,{value:T,children:n})}FR.displayName="ColorModeProvider";var T6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",q="[object Float32Array]",de="[object Float64Array]",H="[object Int8Array]",J="[object Int16Array]",re="[object Int32Array]",oe="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[H]=Se[J]=Se[re]=Se[oe]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[W]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[I]=Se[R]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Fe=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Fe||Function("return this")(),ht=t&&!t.nodeType&&t,qe=ht&&!0&&e&&!e.nodeType&&e,rt=qe&&qe.exports===ht,Ze=rt&&xe.process,Xe=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Xe&&Xe.isTypedArray;function bt(U,te,pe){switch(pe.length){case 0:return U.call(te);case 1:return U.call(te,pe[0]);case 2:return U.call(te,pe[0],pe[1]);case 3:return U.call(te,pe[0],pe[1],pe[2])}return U.apply(te,pe)}function Ae(U,te){for(var pe=-1,Ke=Array(U);++pe-1}function y1(U,te){var pe=this.__data__,Ke=ja(pe,U);return Ke<0?(++this.size,pe.push([U,te])):pe[Ke][1]=te,this}Ro.prototype.clear=kd,Ro.prototype.delete=v1,Ro.prototype.get=Ru,Ro.prototype.has=Ed,Ro.prototype.set=y1;function Os(U){var te=-1,pe=U==null?0:U.length;for(this.clear();++te1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&Eh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),te=Object(te);++Ke-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Fu(U){if(U!=null){try{return kn.call(U)}catch{}try{return U+""}catch{}}return""}function va(U,te){return U===te||U!==U&&te!==te}var Md=Bl(function(){return arguments}())?Bl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Hu(U)}function Ph(U){return Wn(U)&&Ht(U)}var $u=Zt||M1;function Hu(U){if(!Bo(U))return!1;var te=Rs(U);return te==v||te==S||te==u||te==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Rs(U)!=k)return!1;var te=an(U);if(te===null)return!0;var pe=mn.call(te,"constructor")&&te.constructor;return typeof pe=="function"&&pe instanceof pe&&kn.call(pe)==Xt}var Ah=Et?it(Et):Du;function Id(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?T1(U,!0):Ns(U)}var sn=Ya(function(U,te,pe,Ke){No(U,te,pe,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function M1(){return!1}e.exports=sn})(T6,T6.exports);const vl=T6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,A6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function sv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=A6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var vy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ss(e,t){return n=>{const r={property:n,scale:e};return r.transform=sv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?sv({scale:n,compose:r}):r}}var $R=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...$R].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...$R].join(" ")}var XX={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ZX={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function QX(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},HR="& > :not(style) ~ :not(style)",eZ={[HR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[HR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},L6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nZ=new Set(Object.values(L6)),WR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||WR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in L6?L6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=VR(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var VR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||VR(e)||WR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ss("borderWidths"),borderStyles:ss("borderStyles"),colors:ss("colors"),borders:ss("borders"),radii:ss("radii",rn.px),space:ss("space",vy(rn.vh,rn.px)),spaceT:ss("space",vy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:sv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ss("sizes",vy(rn.vh,rn.px)),sizesT:ss("sizes",vy(rn.vh,rn.fraction)),shadows:ss("shadows"),logical:YX,blur:ss("blur",rn.blur)},C3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(C3,{bgImage:C3.backgroundImage,bgImg:C3.backgroundImage});var fn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},M6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(M6,{shadow:M6.boxShadow});var uZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},_4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:eZ,transform:sv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:sv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(_4,{flexDir:_4.flexDirection});var UR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Pa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Pa,{w:Pa.width,h:Pa.height,minW:Pa.minWidth,maxW:Pa.maxWidth,minH:Pa.minHeight,maxH:Pa.maxHeight,overscroll:Pa.overscrollBehavior,overscrollX:Pa.overscrollBehaviorX,overscrollY:Pa.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gx(t,e,n)}},Cm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Cm,{insetStart:Cm.insetInlineStart,insetEnd:Cm.insetInlineEnd});var yZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},wZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function GR(e){return xs(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(GR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,O6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=GR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:O6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(O6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:O6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function Jr(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function I6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var jR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,P7=e=>Object.fromEntries(Object.entries(e).sort(jR));function LP(e){const t=P7(e);return Object.assign(Object.values(t),t)}function IZ(e){const t=Object.keys(P7(e));return new Set(t)}function MP(e){if(!e)return e;e=I6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function em(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${I6(e)})`),t&&n.push("and",`(max-width: ${I6(t)})`),n.join(" ")}function RZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(jR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:em(null,u),minWQuery:em(a),minMaxQuery:em(a,u)}}),r=IZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:P7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>em(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var wi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>YR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>YR(t=>e(t,"~ &"),"[data-peer]",".peer"),YR=(e,...t)=>t.map(e).join(", "),z5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(wi.hover),_peerHover:tu(wi.hover),_groupFocus:bc(wi.focus),_peerFocus:tu(wi.focus),_groupFocusVisible:bc(wi.focusVisible),_peerFocusVisible:tu(wi.focusVisible),_groupActive:bc(wi.active),_peerActive:tu(wi.active),_groupDisabled:bc(wi.disabled),_peerDisabled:tu(wi.disabled),_groupInvalid:bc(wi.invalid),_peerInvalid:tu(wi.invalid),_groupChecked:bc(wi.checked),_peerChecked:tu(wi.checked),_groupFocusWithin:bc(wi.focusWithin),_peerFocusWithin:tu(wi.focusWithin),_peerPlaceholderShown:tu(wi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(z5);function OP(e,t){return Jr(String(e).replace(/\./g,"-"),void 0,t)}function DZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=z5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function BZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var FZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return BZ(e,FZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(R6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(R6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function R6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(R6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:RZ(n.breakpoints)}),n}var T7=vl({},C3,fn,lZ,_4,Pa,uZ,yZ,cZ,UR,vZ,Cm,M6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Pa,_4,UR,Cm),jZ=Object.keys(GZ),YZ=[...Object.keys(T7),...NZ],qZ={...T7,...z5},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var qR=e=>t=>tQ({theme:t,pseudos:z5,configs:T7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ei(e1,--Io):0,z0--,$r===10&&(z0=1,F5--),$r}function aa(){return $r=Io2||uv($r)>3?"":" "}function SQ(e,t){for(;--t&&aa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Fv(e,_3()+(t<6&&xl()==32&&aa()==32))}function D6(e){for(;aa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&D6($r);break;case 40:e===41&&D6(e);break;case 92:aa();break}return Io}function bQ(e,t){for(;aa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Fv(t,Io-1)+"*"+B5(e===47?e:aa())}function xQ(e){for(;!uv(xl());)aa();return Fv(e,Io)}function wQ(e){return eN(E3("",null,null,null,[""],e=JR(e),0,[0],e))}function E3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,I=o,R=r,N=T;E;)switch(S=k,k=aa()){case 40:if(S!=108&&Ei(N,p-1)==58){N6(N+=bn(k3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=k3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(_3()-1,7);continue;case 47:switch(xl()){case 42:case 47:yy(CQ(bQ(aa(),_3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&yy(v>32?RP(N+";",r,n,p-1):RP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(yy(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),k===123)if(h===0)E3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ei(N,3)===110?100:m){case 100:case 109:case 115:E3(e,R,R,r&&yy(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:E3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B5(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=k3(aa())),m=xl(),h=p=cl(T=N+=xQ(_3())),k++;break;case 45:S===45&&cl(N)==2&&(w=0)}}return o}function IP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=M7(m),S=0,w=0,E=0;S0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return $5(e,t,n,i===0?A7:s,l,u,h)}function CQ(e,t,n){return $5(e,t,n,KR,B5(mQ()),lv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,L7,lv(e,0,r),lv(e,r+1,-1),r)}function u0(e,t){for(var n="",r=M7(e),i=0;i6)switch(Ei(e,t+1)){case 109:if(Ei(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+k4+(Ei(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~N6(e,"stretch")?nN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ei(e,t+1)!==115)break;case 6444:switch(Ei(e,cl(e)-3-(~N6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Ei(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ei(e,t+11)){case 114:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Fi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L7:t.return=nN(t.value,t.length);break;case XR:return u0([Lg(t,{value:bn(t.value,"@","@"+hn)})],i);case A7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return u0([Lg(t,{props:[bn(o,/:(read-\w+)/,":"+k4+"$1")]})],i);case"::placeholder":return u0([Lg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,":"+k4+"$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},IQ=[OQ],rN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||IQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},mx=tN(function(e){return cN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),BP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!cN(t)&&typeof n=="number"&&n!==0?n+"px":n};function cv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,cv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function cJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},vN=dJ(cJ);function yN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var SN=e=>yN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function bN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var mJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vJ=tN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return lN(n,r,i),KQ(function(){return uN(n,r,i)}),null},xJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||WP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),IJ=Ln("list").parts("container","item","icon"),RJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),BJ=Ln("progress").parts("label","filledTrack","track"),FJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Ai(e,t){YJ(e)&&(e="100%");var n=qJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Sy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function xN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function by(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Ai(e,255)*255,g:Ai(t,255)*255,b:Ai(n,255)*255}}function UP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XJ(e,t,n){var r,i,o;if(e=Ai(e,360),t=Ai(t,100),n=Ai(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vx(s,a,e+1/3),i=vx(s,a,e),o=vx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var $6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=by(e.s),i=by(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=by(e.s),o=by(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=xN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),yx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),Sx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),cs={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+yx),rgba:new RegExp("rgba"+Sx),hsl:new RegExp("hsl"+yx),hsla:new RegExp("hsla"+Sx),hsv:new RegExp("hsv"+yx),hsva:new RegExp("hsva"+Sx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if($6[e])e=$6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=cs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=cs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=cs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=cs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=cs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=cs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=cs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=cs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=cs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=cs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function nu(e){return Boolean(cs.CSS_UNIT.exec(String(e)))}var $v=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=eee(t)),this.originalInput=t;var i=tee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=xN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),QJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ai(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ai(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries($6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Sy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Sy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Sy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Sy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(wN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new $v(a)}function oee(e,t){var n=uee(e),r=E4(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return E4([0,100],t.seed);var n=CN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return E4([r,i],t.seed)}function see(e,t,n){var r=lee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return E4([r,i],n.seed)}function lee(e,t){for(var n=CN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=kN.find(function(a){return a.name===e});if(n){var r=_N(n);if(r.hueRange)return r.hueRange}var i=new $v(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function CN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=kN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function E4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function _N(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var kN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function cee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Pi=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new $v(r);return i?r:n},fee=e=>t=>{const n=Pi(t,e);return new $v(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",B0=(e,t)=>n=>{const r=Pi(n,e);return new $v(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function pee(e){const t=wN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function mee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function z7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function EN(e){return yee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(EN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,H6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=EN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:H6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(H6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:H6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function PN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,PN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${PN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Hv,defineMultiStyleConfig:Iee}=rr(_J.keys),sa=Jr("alert-fg"),Su=Jr("alert-bg"),Ree=Hv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function B7(e){const{theme:t,colorScheme:n}=e,r=B0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),Dee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:sa.reference}}}),zee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:sa.reference}}}),Bee=Hv(e=>{const{colorScheme:t}=e;return{container:{[sa.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[sa.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:sa.reference}}}),Fee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Bee},$ee=Iee({baseStyle:Ree,variants:Fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),TN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Hee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...TN,...Hee,container:Wee},AN=Vee,Uee=e=>typeof e=="function";function di(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:LN,defineMultiStyleConfig:Gee}=rr(kJ.keys),c0=Jr("avatar-border-color"),bx=Jr("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[c0.variable]:"white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference},Yee={[bx.variable]:"colors.gray.200",_dark:{[bx.variable]:"colors.whiteAlpha.400"},bgColor:bx.reference},JP=Jr("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[c0.variable]:"colors.white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference,verticalAlign:"top"}},Kee=LN(e=>({badge:di(jee,e),excessLabel:di(Yee,e),container:di(qee,e)}));function xc(e){const t=e!=="100%"?AN[e]:void 0;return LN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},d0=Jr("badge-bg"),yl=Jr("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.500`,.6)(n);return{[d0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[d0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:d0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.16)(n);return{[d0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[d0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:d0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},km={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},MN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=B0(`${t}.200`,.12)(n),i=B0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},ute=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...di(MN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=cte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},fte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:MN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:P3,defineMultiStyleConfig:vte}=rr(PJ.keys),Em=Jr("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Em.reference,h:Em.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=P3(e=>({icon:xte,container:Ste,control:di(yte,e),label:bte})),Cte={sm:P3({control:{[Em.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:P3({control:{[Em.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:P3({control:{[Em.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},P4=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Pm=Vi("close-button-size"),Mg=Vi("close-button-bg"),_te={w:[Pm.reference],h:[Pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Mg.variable]:"colors.blackAlpha.100",_dark:{[Mg.variable]:"colors.whiteAlpha.100"}},_active:{[Mg.variable]:"colors.blackAlpha.200",_dark:{[Mg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Mg.reference},kte={lg:{[Pm.variable]:"sizes.10",fontSize:"md"},md:{[Pm.variable]:"sizes.8",fontSize:"xs"},sm:{[Pm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=km,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Ite={opacity:.6,borderColor:"inherit"},Rte={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Rte,dashed:Nte},zte={baseStyle:Ite,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:W6,defineMultiStyleConfig:Bte}=rr(TJ.keys),xx=Jr("drawer-bg"),wx=Jr("drawer-box-shadow");function yp(e){return W6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Fte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[xx.variable]:"colors.white",[wx.variable]:"shadows.lg",_dark:{[xx.variable]:"colors.gray.700",[wx.variable]:"shadows.dark-lg"},bg:xx.reference,boxShadow:wx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=W6(e=>({overlay:Fte,dialogContainer:$te,dialog:di(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},qte=Bte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),f0=Jr("form-control-color"),ine={marginStart:"1",[f0.variable]:"colors.red.500",_dark:{[f0.variable]:"colors.red.300"},color:f0.reference},one={mt:"2",[f0.variable]:"colors.gray.600",_dark:{[f0.variable]:"colors.whiteAlpha.600"},color:f0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),h0=Jr("form-error-color"),cne={[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function F7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0 0 0 1px ${Pi(t,r)}`},_focusVisible:{zIndex:1,borderColor:Pi(t,n),boxShadow:`0 0 0 1px ${Pi(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r)},_focusVisible:{bg:"transparent",borderColor:Pi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0px 1px 0px 0px ${Pi(t,r)}`},_focusVisible:{borderColor:Pi(t,n),boxShadow:`0px 1px 0px 0px ${Pi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(IJ.keys),Ine={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Rne=One({icon:Ine}),Nne=Mne({baseStyle:Rne}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(RJ.keys),Bne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:di(Bne,e),item:di(Fne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:V6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=V6(e=>({overlay:Yne,dialogContainer:di(qne,e),dialog:di(Kne,e),header:Xne,closeButton:Zne,body:di(Qne,e),footer:Jne}));function ls(e){return V6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:ls("xs"),sm:ls("sm"),md:ls("md"),lg:ls("lg"),xl:ls("xl"),"2xl":ls("2xl"),"3xl":ls("3xl"),"4xl":ls("4xl"),"5xl":ls("5xl"),"6xl":ls("6xl"),full:ls("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},ON=rre,{defineMultiStyleConfig:ire,definePartsStyle:IN}=rr(DJ.keys),$7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu($7).add("0.5rem").toString(),are={[$7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=di(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[$7.reference]},ure=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),cre=IN(e=>({root:are,field:di(sre,e)??{},stepperGroup:lre,stepper:di(ure,e)??{}}));function xy(e){var t,n;const r=(t=pn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=ON.fontSizes[o];return IN({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:xy("xs"),sm:xy("sm"),md:xy("md"),lg:xy("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,gre={outline:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),wy=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[wy.variable]:"colors.white",bg:wy.reference,[Sre.variable]:wy.reference,[nT.variable]:"colors.gray.200",_dark:{[wy.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:tm}=rr(BJ.keys),Are=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Pi(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Ire=tm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Rre={xs:tm({track:{h:"1"}}),sm:tm({track:{h:"2"}}),md:tm({track:{h:"3"}}),lg:tm({track:{h:"4"}})},Nre=Tre({sizes:Rre,baseStyle:Ire,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:T3}=rr(FJ.keys),zre=e=>{var t;const n=(t=di(P4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Bre=T3(e=>{var t,n,r,i;return{label:(n=(t=P4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=P4).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Fre={md:T3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:T3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:T3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Bre,sizes:Fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Cy={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Cy}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Cy}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Cy}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Cy},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=Jr("skeleton-start-color"),Kre=Jr("skeleton-end-color"),Xre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Pi(o,r),s=Pi(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Cx=Jr("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Cx.variable]:"colors.white",_dark:{[Cx.variable]:"colors.gray.700"},bg:Cx.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:eS}=rr(HJ.keys),hv=Jr("slider-thumb-size"),pv=Jr("slider-track-size"),Mc=Jr("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...z7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...z7({orientation:e.orientation,horizontal:{h:pv.reference},vertical:{w:pv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...z7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:hv.reference,h:hv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=eS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=eS({container:{[hv.variable]:"sizes.4",[pv.variable]:"sizes.1"}}),sie=eS({container:{[hv.variable]:"sizes.3.5",[pv.variable]:"sizes.1"}}),lie=eS({container:{[hv.variable]:"sizes.2.5",[pv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:NN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=NN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:NN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:A3}=rr(VJ.keys),Tm=Vi("switch-track-width"),$f=Vi("switch-track-height"),_x=Vi("switch-track-diff"),Cie=lu.subtract(Tm,$f),U6=Vi("switch-thumb-x"),Og=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Tm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Og.variable]:"colors.gray.300",_dark:{[Og.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Og.variable]:`colors.${t}.500`,_dark:{[Og.variable]:`colors.${t}.200`}},bg:Og.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${U6.reference})`}},Eie=A3(e=>({container:{[_x.variable]:Cie,[U6.variable]:_x.reference,_rtl:{[U6.variable]:lu(_x).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:A3({container:{[Tm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:A3({container:{[Tm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:A3({container:{[Tm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:p0}=rr(UJ.keys),Lie=p0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),T4={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Iie={simple:Mie,striped:Oie,unstyled:{}},Rie={sm:p0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:p0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:p0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Iie,sizes:Rie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Bie(e),tablist:Fie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Uie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gie=wl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Pi(n,`${t}.700`),bg:Pi(n,`${t}.100`)}}}}),Yie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},roe={subtle:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},_y=Vi("tooltip-bg"),kx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:_y.reference,color:kx.reference,[_y.variable]:"colors.gray.700",[kx.variable]:"colors.whiteAlpha.900",_dark:{[_y.variable]:"colors.gray.300",[kx.variable]:"colors.gray.900"},[uoe.variable]:_y.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:km,Breadcrumb:ste,Button:mte,Checkbox:P4,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},woe=xoe,Coe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_oe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...ON,sizes:AN,shadows:woe,space:TN,borders:poe,transition:Poe},Ioe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Roe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Ioe,direction:Noe,...Ooe,components:foe,styles:Roe,config:Doe},Boe=typeof Element<"u",Foe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function L3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!L3(e[r],t[r]))return!1;return!0}var o;if(Foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!L3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Hoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!L3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return L3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(dv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function DN(){const e=Bv(),t=t1();return{...e,theme:t}}function Voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Uoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Goe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return ne(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function qoe(){const{colorMode:e}=Bv();return x(Z5,{styles:t=>{const n=vN(t,"styles.global"),r=bN(n,{theme:t,colorMode:e});return r?qR(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=yN(a,(p,m)=>KZ(m)),l=bN(e,t),u=Object.assign({},i,l,SN(s),o),h=qR(u)(t.theme);return r?[h,r]:h};function Ex(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=F6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Bv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function zN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=DN(),a=e?vN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},SN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return zN(e,t)}function Ii(e,t={}){return zN(e,t)}function Joe(){const e=new Map;return new Proxy(Ex,{apply(t,n,r){return Ex(...r)},get(t,n){return e.has(n)||e.set(n,Ex(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>$n(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var G6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,A4=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function oae(){const e=C.exports.useRef(new iae);return G6(()=>()=>e.current.destroy()),e.current}var[aae,BN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=BN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);G6(()=>()=>{!i.current||t.unregister(i.current)},[]),G6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=A4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function FN(){return[A4(aae),()=>A4(BN()),()=>oae(),i=>sae(i)]}var Ir=(...e)=>e.filter(Boolean).join(" "),bT={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ga=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Ir("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ga.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ga,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function tS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const H7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function lae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),ah=typeof document<"u",L4=ah?C.exports.useLayoutEffect:C.exports.useEffect,$N=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext($N),a=C.exports.useContext(n1),s=C.exports.useContext(H7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return L4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),L4(()=>()=>u&&u.notifyUnmount(),[]),u}function Yp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Yp(n)&&(n.current=r))},[t])}function gv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||dae.some(t=>gv(e[t]))}function HN(e){return Boolean(iS(e)||e.variants)}function fae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gv(n)?n:void 0,animate:gv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(e,C.exports.useContext(nS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),mv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?mv.projectionNodeConstructor=e[t]:mv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Am={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return oS(()=>{if(Am.hasEverUpdated)return gae++})}const W7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const WN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(H7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext($N).strict,P=C.exports.useContext(WN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||mv.projectionNodeConstructor,P))}return ne(vae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(W7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function V7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const M4={};function Cae(e){Object.assign(M4,e)}const O4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wv=new Set(O4);function VN(e,{layout:t,layoutId:n}){return Wv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!M4[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>O4.indexOf(e)-O4.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function UN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,GN=(e,t)=>n=>Math.max(Math.min(n,t),e),Lm=e=>e%1?Number(e.toFixed(5)):e,vv=/(-)?([\d]*\.?[\d])+/g,j6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Vv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mm=Object.assign(Object.assign({},sh),{transform:GN(0,1)}),ky=Object.assign(Object.assign({},sh),{default:1}),Uv=e=>({test:t=>Vv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Uv("deg"),Cl=Uv("%"),wt=Uv("px"),Aae=Uv("vh"),Lae=Uv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),U7=(e,t)=>n=>Boolean(Vv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),jN=(e,t,n)=>r=>{if(!Vv(r))return r;const[i,o,a,s]=r.match(vv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:U7("hsl","hue"),parse:jN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Lm(t))+", "+Cl.transform(Lm(n))+", "+Lm(Mm.transform(r))+")"},Mae=GN(0,255),Px=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:U7("rgb","red"),parse:jN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Px.transform(e)+", "+Px.transform(t)+", "+Px.transform(n)+", "+Lm(Mm.transform(r))+")"};function Oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Y6={test:U7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||Y6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):Y6.parse(e),transform:e=>Vv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},YN="${c}",qN="${n}";function Iae(e){var t,n,r,i;return isNaN(e)&&Vv(e)&&((n=(t=e.match(vv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(j6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function KN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(j6);r&&(n=r.length,e=e.replace(j6,YN),t.push(...r.map(Ji.parse)));const i=e.match(vv);return i&&(e=e.replace(vv,qN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function XN(e){return KN(e).values}function ZN(e){const{values:t,numColors:n,tokenised:r}=KN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Nae(e){const t=XN(e);return ZN(e)(t.map(Rae))}const bu={test:Iae,parse:XN,createTransformer:ZN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Bae=/([a-z-]*)\(.*?\)/g,q6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(Bae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},QN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:ky,scaleX:ky,scaleY:ky,scaleZ:ky,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Mm,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Mm,strokeOpacity:Mm,numOctaves:CT};function G7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(UN(m)){o[m]=v;continue}const S=QN[m],w=Pae(v,S);if(Wv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Eae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const j7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function JN(e,t,n){for(const r in t)!ws(t[r])&&!VN(r,n)&&(e[r]=t[r])}function Fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j7();return G7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return JN(i,r,e),Object.assign(i,Fae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Gae,...Vae,...Wae,...Uae]);function I4(e){return jae.has(e)}let eD=e=>!I4(e);function Yae(e){!e||(eD=t=>t.startsWith("on")?!I4(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(eD(i)||n===!0&&I4(i)||!t&&!I4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function Y7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){G7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Qae(p,o,a,s,!1)}const tD=()=>({...j7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=tD();return Y7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};JN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(V7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const nD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const iD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function oD(e,t,n,r){rD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(iD.has(i)?i:nD(i),t.attrs[i])}function q7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||VN(r,e))&&(n[r]=t[r]);return n}function aD(e){const t=q7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const yv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),sD=e=>yv(e)?e[e.length-1]||0:e;function M3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const lD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>nse(e,t,r,i);return n?o():oS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=M3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=HN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!rS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=K7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:lD({scrapeMotionValuesFromProps:aD,createRenderState:tD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Y7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),oD(t,n)}})},ose={useVisualState:lD({scrapeMotionValuesFromProps:q7,createRenderState:j7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...V7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function K6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return aS(i,t,n,r)},[e,t,n,r])}function sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};K6(t,"focus",e?r:void 0),K6(t,"blur",e?i:void 0)}function uD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function cD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function X7(e,t="page"){return{point:cD(e)?cse(e,t):dse(e,t)}}const dD=(e,t=!1)=>{const n=r=>e(r,X7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function fD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function g0(e,t,n,r){return aS(e,fD(t),dD(n,t==="pointerdown"),r)}function R4(e,t,n,r){return K6(e,fD(t),n&&dD(n,t==="pointerdown"),r)}function hD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=hD("dragHorizontal"),ET=hD("dragVertical");function pD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function gD(){const e=pD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!uD(r)||gD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){R4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),R4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const mD=(e,t)=>t?e===t?!0:mD(e,t.parentElement):!1;function Z7(e){return C.exports.useEffect(()=>()=>e(),[])}function vD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Tx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=D4(bse,xse,a),e=D4(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=X6(u,a),S=Math.exp(-p);return Tx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=X6(Math.pow(u,2),a);return(-i(u)+Tx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Tx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cse=12;function _se(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Q7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=vD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=X6(T,k);v=I=>{const R=Math.exp(-k*T*I);return n-R*((E+k*T*P)/M*Math.sin(M*I)+P*Math.cos(M*I))},S=I=>{const R=Math.exp(-k*T*I);return k*T*R*(Math.sin(M*I)*(E+k*T*P)/M+P*Math.cos(M*I))-R*(Math.cos(M*I)*(E+k*T*P)-M*P*Math.sin(M*I))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=I=>{const R=Math.exp(-k*T*I),N=Math.min(M*I,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}Q7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,Sv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ax(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ax(l,s,e+1/3),o=Ax(l,s,e),a=Ax(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[Y6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),yD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},Z6=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce(Lse);function SD(e,t){return Z6(e)?n=>wr(e,t,n):Ji.test(e)?yD(e,t):xD(e,t)}const bD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>SD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=SD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function IT(e){const t=bu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=bu.createTransformer(t),r=IT(e),i=IT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?sS(bD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Ise(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?yD:xD;if(Array.isArray(e))return bD;if(typeof e=="object")return Mse}function Rse(e,t,n){const r=[],i=n||Ise(e[0]),o=e.length-1;for(let a=0;an(Sv(e,t,r))}function Dse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Sv(e[o],e[o+1],i);return t[o](s)}}function wD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;N4(o===t.length),N4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Rse(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(D4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),J7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),CD=e=>t=>t*t*((e+1)*t-e),Bse=e=>{const t=CD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},_D=1.525,Fse=4/11,$se=8/11,Hse=9/10,e8=e=>e,t8=zse(2),Wse=lS(t8),kD=J7(t8),ED=e=>1-Math.sin(Math.acos(e)),n8=lS(ED),Vse=J7(n8),r8=CD(_D),Use=lS(r8),Gse=J7(r8),jse=Bse(_D),Yse=4356/361,qse=35442/1805,Kse=16061/1805,z4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-z4(1-e*2)):.5*z4(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||kD).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function O3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return wD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const RT={keyframes:O3,spring:Q7,decay:tle};function nle(e){if(Array.isArray(e.to))return O3;if(RT[e.type])return RT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?O3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Q7:O3}const PD=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),TD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),PD);function ile(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ile(()=>bv=!0),e),{}),ale=Gv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(bv||ule(),n.schedule(r,i,o)),e},{}),sle=Gv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});Gv.reduce((e,t)=>(e[t]=()=>uS[t].process(m0),e),{});const lle=e=>uS[e].process(m0),AD=e=>{bv=!1,m0.delta=Q6?PD:Math.max(Math.min(e-m0.timestamp,ole),1),m0.timestamp=e,J6=!0,Gv.forEach(lle),J6=!1,bv&&(Q6=!1,TD(AD))},ule=()=>{bv=!0,Q6=!0,J6||TD(AD)},cle=()=>m0;function LD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?LD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function MD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=vD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,I=!1,R=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=wD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function W(){k++,l==="reverse"?(R=k%2===0,a=dle(a,T,u,R)):(a=LD(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const re=$.next(Math.max(0,a));M=re.value,N&&(M=N(M)),I=R?re.done:a<=0}S?.(M),I&&(k===0&&(T??(T=a)),k{p?.(),P.stop()}}}function OD(e,t){return t?e*(1e3/t):0}function ple({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=OD($-R,cle().delta),(I===1&&$>M||I===-1&&$S?.stop()}}const eC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>eC(e)&&e.hasOwnProperty("z"),Ey=(e,t)=>Math.abs(e-t);function i8(e,t){if(Z6(e)&&Z6(t))return Ey(e,t);if(eC(e)&&eC(t)){const n=Ey(e.x,t.x),r=Ey(e.y,t.y),i=NT(e)&&NT(t)?Ey(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ID=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ND=e=>3*e,B4=(e,t,n)=>((ID(t,n)*e+RD(t,n))*e+ND(t))*e,DD=(e,t,n)=>3*ID(t,n)*e*e+2*RD(t,n)*e+ND(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=B4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Py,e,n)}return a=>a===0||a===1?a:B4(o(a),t,r)}function wle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!gD()}function p(S,w){!h()||(mD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=sS(g0(window,"pointerup",p,l),g0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}R4(i,"pointerdown",o?v:void 0,l),Z7(u)}const Cle="production",zD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function BD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const tC=new WeakMap,Lx=new WeakMap,_le=e=>{const t=tC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Lx.has(n)||Lx.set(n,{});const r=Lx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return tC.set(e,n),r.observe(e),()=>{tC.delete(e),r.unobserve(e)}}function Tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ale[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(zD!=="production"&&BD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Bc=e=>t=>(e(t),null),Ole={inView:Bc(Tle),tap:Bc(wle),focus:Bc(sse),hover:Bc(vse)};function o8(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Ile(){return Rle(C.exports.useContext(n1))}function Rle(e){return e===null?!0:e.isPresent}function FD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Nle={linear:e8,easeIn:t8,easeInOut:kD,easeOut:Wse,circIn:ED,circInOut:Vse,circOut:n8,backIn:r8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:z4},zT=e=>{if(Array.isArray(e)){N4(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",BT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ty=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mx=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),FT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:Ty,scaleY:Ty,scale:Ty,opacity:Mx,backgroundColor:Mx,color:Mx,default:Ty},Ble=(e,t)=>{let n;return yv(t)?n=zle:n=FT[e]||FT.default,{to:t,...n(t)}},Fle={...QN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:q6,WebkitFilter:q6},a8=e=>Fle[e];function s8(e,t){var n;let r=a8(e);return r!==q6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},$D=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),HD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),$D);function Wle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Wle(()=>xv=!0),e),{}),Cs=jv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(xv||Gle(),n.schedule(r,i,o)),e},{}),Qf=jv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),Ox=jv.reduce((e,t)=>(e[t]=()=>cS[t].process(v0),e),{}),Ule=e=>cS[e].process(v0),WD=e=>{xv=!1,v0.delta=nC?$D:Math.max(Math.min(e-v0.timestamp,Vle),1),v0.timestamp=e,rC=!0,jv.forEach(Ule),rC=!1,xv&&(nC=!1,HD(WD))},Gle=()=>{xv=!0,nC=!0,rC||HD(WD)},iC=()=>v0;function VD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=F4(o.duration)),o.repeatDelay&&(a.repeatDelay=F4(o.repeatDelay)),e&&(a.ease=Dle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function qle(e,t){var n,r;return(r=(n=(l8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Ble(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=l8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=BT(e,n);a==="none"&&s&&typeof n=="string"?a=s8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=BT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?ple({...p,...o}):MD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=sD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function HT(e){return typeof e=="number"?0:s8("",e)}function l8(e,t){return e[t]||e.default||e}function u8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=VD(l,F4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function c8(e,t){e.indexOf(t)===-1&&e.push(t)}function d8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Om{constructor(){this.subscriptions=[]}add(t){return c8(this.subscriptions,t),()=>d8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Om,this.velocityUpdateSubscribers=new Om,this.renderSubscribers=new Om,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=iC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Cs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?OD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new tue(e)}const UD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},GD=[sh,wt,Cl,Cc,Lae,Aae,nue],Ig=e=>GD.find(UD(e)),rue=[...GD,Ji,bu],iue=e=>rue.find(UD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return K7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(e,t){const n=dS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=sD(o[a]);sue(e,a,s)}}function uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;soC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=oC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=jD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function oC(e,t,n={}){var r;const i=dS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>jD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return hue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function jD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Wv.has(m)&&(w={...w,type:!1,delay:0});let E=u8(m,v,S,w);$4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(pue).forEach((u,h)=>{a.push(oC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const f8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...f8].reverse(),vue=f8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();let r=!0;const i=(l,u)=>{const h=dS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&R;const q=Array.isArray(I)?I:[I];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:H={}}=M,J={...H,...de},re=oe=>{W=!0,S.delete(oe),M.needsAnimating[oe]=!0};for(const oe in J){const X=de[oe],G=H[oe];w.hasOwnProperty(oe)||(X!==G?yv(X)&&yv(G)?!FD(X,G)||$?re(oe):M.protectedKeys[oe]=!0:X!==void 0?re(oe):S.add(oe):X!==void 0&&S.has(oe)?re(oe):M.protectedKeys[oe]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...q.map(oe=>({animation:oe,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Bc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Bc(e=>{const{custom:t,visualElement:n}=e,[r,i]=o8(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class YD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Rx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=i8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=iC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Ix(h,this.transformPagePoint),uD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Rx(Ix(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},cD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=X7(t),o=Ix(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=iC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Rx(o,this.history)),this.removeListeners=sS(g0(window,"pointermove",this.handlePointerMove),g0(window,"pointerup",this.handlePointerUp),g0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Ix(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rx({point:e},t){return{point:e,delta:WT(e,qD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function qD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ca(e){return e.max-e.min}function VT(e,t=0,n=.01){return i8(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Pue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Sv(t.min,t.max-r,e.min):r>i&&(n=Sv(e.min,e.max-i,t.min)),D4(0,1,n)}function Lue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const aC=.35;function Mue(e=aC){return e===!1?e=0:e===!0&&(e=aC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),_i=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function KD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Nx(e){return e===void 0||e===1}function sC({scale:e,scaleX:t,scaleY:n}){return!Nx(e)||!Nx(t)||!Nx(n)}function yf(e){return sC(e)||XD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function XD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function H4(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=H4(e,i,r)),H4(e,n,r)+t}function lC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function ZD(e,{x:t,y:n}){lC(e.x,t.translate,t.scale,t.originPoint),lC(e.y,n.translate,n.scale,n.originPoint)}function Rue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(X7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=ca(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=$ue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new YD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ay(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Yp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=KD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Ay(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return u8(t,r,0,n)}stopAnimation(){ll(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ll(n=>{const{drag:r}=this.getProps();if(!Ay(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Yp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ll(s=>{if(!Ay(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;Bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=g0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Yp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=aS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ll(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=aC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Ay(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(H7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new YD(h,l,{transformPagePoint:s})}R4(i,"pointerdown",o&&u),Z7(()=>a.current&&a.current.end())}const Vue={pan:Bc(Wue),drag:Bc(Hue)},uC={current:null},JD={current:!1};function Uue(){if(JD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uC.current=e.matches;e.addListener(t),t()}else uC.current=!1}const Ly=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ly.map(()=>new Om),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ly.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Ly[i]]=o=>r.add(o),n["notify"+Ly[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),$4(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),$4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ez=Object.keys(mv),Yue=ez.length,tz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const I=Gue(),R=new Map,N=new Map;let z={};const $={...k},W=p.initial?{...k}:{};let q;function de(){!M||!P||(H(),o(M,T,p.style,j.projection))}function H(){t(j,T,k,E,p)}function J(){I.notifyUpdate(k)}function re(Z,me){const Se=me.onChange(Fe=>{k[Z]=Fe,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:oe,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),$4(oe)&&oe.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=iS(p),Q=HN(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),R.forEach((me,Se)=>re(Se,me)),JD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:uC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),I.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Fe,We){const ht=[];for(let qe=0;qej.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return ht},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),R.set(Z,me),k[Z]=me.get(),re(Z,me)},removeValue(Z){var me;R.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>R.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=R.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>R.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=K7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Fe=n(p,Z);if(Fe!==void 0&&!ws(Fe))return Fe}return W[Z]!==void 0&&xe===void 0?void 0:$[Z]},...I,build(){return H(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,I.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se{const o=i.get();if(!cC(o))return;const a=dC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!cC(o))continue;const a=dC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),iz=e=>Zue.has(e),Que=e=>Object.keys(e).some(iz),oz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},Jue=new Set(["x","y","z"]),ece=O4.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},nce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);oz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(iz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Ig(h);const m=t[l];let v;if(yv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Ig(h);for(let E=w;E=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const az={treeType:"dom",readValueFromInstance(e,t){if(Wv.has(t)){const n=a8(t);return n&&n.default||0}else{const n=ace(e),r=(UN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return QD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),G7(t,n,r,i.transformTemplate)},render:rD},sce=tz(az),lce=tz({...az,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Wv.has(t)?((n=a8(t))===null||n===void 0?void 0:n.default)||0:(t=iD.has(t)?t:nD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:aD,build(e,t,n,r,i){Y7(t,n,r,i.transformTemplate)},render:oD}),uce=(e,t)=>V7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(rz,v=>(o.push(v),lA)));const a=bu.parse(e);if(a.length>5)return r;const s=bu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Am.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Cs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function fce(e){const[t,n]=o8(),r=C.exports.useContext(W7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(WN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...Rg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rg,borderTopRightRadius:Rg,borderBottomLeftRadius:Rg,borderBottomRightRadius:Rg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return u8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const sz=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=sz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Sv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function us(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=H4(e,1/n,r),i!==void 0&&(e=H4(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function uz(e){return mA(e.x)&&mA(e.y)}function cz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return ca(e.x)/ca(e.y)}function Cce(e,t,n=.1){return i8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){c8(this.members,t),t.scheduleRender()}remove(t){if(d8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){c8(this.children,t),this.isDirty=!0}remove(t){d8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function dz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Oce),this.nodes.forEach(Ice)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=VD(v,250),Am.hasAnimatedSinceResize&&(Am.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!cz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...l8(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Qf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Rce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Rm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Am.hasAnimatedSinceResize=!0,this.currentAnimation=gce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&fz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||_i();const p=ca(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=ca(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}us(s,l),qp(s,h),Im(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Tce(e){e.updateLayout()}function Ace(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(v);v.min=o[m].min,v.max=v.min+S}):fz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(o[m]);v.max=v.min+S});const l=Nm();Im(l,o,i.layout);const u=Nm();i.isShared?Im(u,e.applyTransform(a,!0),i.measured):Im(u,o,i.layout);const h=!uz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=_i();Rm(S,i.layout,m.layout);const w=_i();Rm(w,o,v.actual),cz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Oce(e){e.resolveTargetDelta()}function Ice(e){e.calcProjection()}function Rce(e){e.resetRotation()}function Nce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Bce={duration:.45,ease:[.4,0,.1,1]};function Fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function fz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=dz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dx={current:void 0},Hce=dz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Dx.current=e}return Dx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Il=xae((e,t)=>ase(e,t,Wce,uce,Hce));function hz(){const e=C.exports.useRef(!1);return L4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=hz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(jce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Gce,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function jce(){return new Map}const Ip=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Ip(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const dd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",BD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(W7).forceRender;l&&(s=l);const u=hz(),h=qce(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(L4(()=>{w.current=!1,Yce(h,S),v.current=p}),Z7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Nn,{children:p.map(T=>x(zx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Ip(T)))});p=[...p];const E=v.current.map(Ip),P=h.map(Ip),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=E.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x(zx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Ip(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(zx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Ip(T))}),zD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Nn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function fC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},If={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Ng={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function hC(e){switch(e?.direction??"right"){case"right":return Ng.slideRight;case"left":return Ng.slideLeft;case"bottom":return Ng.slideDown;case"top":return Ng.slideUp;default:return Ng.slideRight}}var Wf={enter:{duration:.2,ease:If.easeOut},exit:{duration:.1,ease:If.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:If.ease},opacity:{duration:.3,ease:If.ease}},enter:{height:{duration:.3,ease:If.ease},opacity:{duration:.4,ease:If.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??_s.enter(TA.enter,i)})},gz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(dd,{initial:!1,custom:w,children:E&&le.createElement(Il.div,{ref:t,...p,className:Yv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});gz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},mz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(dd,{custom:m,children:p&&le.createElement(Il.div,{ref:n,className:Yv("chakra-fade",o),custom:m,...mz,animate:h,...u})})});ede.displayName="Fade";var tde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},vz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(dd,{custom:S,children:m&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",s),...vz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:If.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=hC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=hC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},yz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=hC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(dd,{custom:P,children:w&&le.createElement(Il.div,{...m,ref:n,initial:"exit",className:Yv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});yz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},pC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(dd,{custom:w,children:v&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",a),custom:w,...pC,animate:S,...m})})});ode.displayName="SlideFade";var qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Bx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,hS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[lde,h8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ude,zPe,cde,dde]=FN(),Rf=Pe(function(t,n){const{getButtonProps:r}=h8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:qv("chakra-accordion__button",t.className),__css:a})});Rf.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=tS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,p8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=p8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Bx($.onClick,T),onFocus:Bx($.onFocus,I),onKeyDown:Bx($.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function gde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;fS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function mde(e){fS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function vde(e){fS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function yde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=h8(),{reduceMotion:r}=p8(),i=qv("chakra-accordion__icon",e.className),o=hS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ga,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=p8(),{getPanelProps:s,isOpen:l}=h8(),u=s(o,n),h=qv("chakra-accordion__panel",r),p=hS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(gz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:qv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Kv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function wde(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[kde,g8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Sz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Kv,colorScheme:"blue"}};function Ede(e){return Sz[e].colorScheme}function Pde(e){return Sz[e].icon}var bz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});bz.displayName="Alert";var xz=Pe(function(t,n){const i={display:"inline",...g8().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});xz.displayName="AlertDescription";function wz(e){const{status:t}=_de(),n=Pde(t),r=g8(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:gS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}wz.displayName="AlertIcon";var Cz=Pe(function(t,n){const r=g8();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Cz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",W4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});W4.displayName="NativeImage";var mS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:W4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:W4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});mS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:W4,className:"chakra-image",...e}));function vS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var yS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function gC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=yS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}gC.displayName="ButtonIcon";function mC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Kv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=yS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}mC.displayName="ButtonSpinner";function Ide(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Da=Pe((e,t)=>{const n=Ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=gn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Ide(E),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:yS("chakra-button",w),...P},o&&S==="start"&&x(mC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...I})):x(OA,{...I}),o&&S==="end"&&x(mC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Da.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Nn,{children:[t&&x(gC,{marginEnd:i,children:t}),r,n&&x(gC,{marginStart:i,children:n})]})}var Ia=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=yS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});Ia.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Da,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),My=e=>e?"":void 0,Fx=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rde,_z]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nde,a1]=xn({strict:!1,name:"FormControlContext"});function Dde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:$n(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":My(E),"data-disabled":My(i),"data-invalid":My(r),"data-readonly":My(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var fd=Pe(function(t,n){const r=Ii("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=o1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Rde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});fd.displayName="FormControl";var zde=Pe(function(t,n){const r=a1(),i=_z(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function m8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=v8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Fx(n),"aria-required":Fx(i),"aria-readonly":Fx(r)}}function v8(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:IA(t?.onFocus,h),onBlur:IA(t?.onBlur,p)}}var[Bde,Fde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$de=Pe((e,t)=>{const n=Ii("FormError",e),r=gn(e),i=a1();return i?.isInvalid?le.createElement(Bde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Fde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ga,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(kz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});lh.displayName="FormLabel";var kz=Pe(function(t,n){const r=a1(),i=_z();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});kz.displayName="RequiredIndicator";function ed(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var y8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:y8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:y8});Vde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,$0=!1,vC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function S8(e,t){vC.forEach(n=>n(e,t))}function NA(e){$0=!0,Gde(e)&&(SS="keyboard",S8("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&($0=!0,S8("pointer",e))}function jde(e){e.target===window||e.target===document||($0||(SS="keyboard",S8("keyboard",e)),$0=!1)}function Yde(){$0=!1}function DA(){return SS!=="pointer"}function qde(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){$0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),RA=!0}function Kde(e){qde(),e(DA());const t=()=>e(DA());return vC.add(t),()=>{vC.delete(t)}}var[BPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Ea(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function efe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ez(e={}){const t=v8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=nfe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,q]=C.exports.useState(!1),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),[oe,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Fe=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ed(()=>{n&&H(!1)},[n,H]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,ht=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&<.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(oe),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&W),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Ea(Ae.onMouseDown,Ot),onMouseUp:Ea(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Ea(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:Ea(Ae.onMouseLeave,()=>re(!1))}},[oe,xe,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...R,...Ae,ref:$n(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Ea(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[R,n,xe,o,Q]),Xe=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:$n(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ea(Ae.onChange,Fe),onBlur:Ea(Ae.onBlur,z,()=>H(!1)),onFocus:Ea(Ae.onFocus,$,()=>H(!0)),onKeyDown:Ea(Ae.onKeyDown,ht),onKeyUp:Ea(Ae.onKeyUp,qe),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:y8}),[w,E,a,Fe,z,$,ht,qe,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Ea(Ae.onMouseDown,zA),onTouchStart:Ea(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:oe,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Xe,getLabelProps:Et,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=cd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=cd({from:{opacity:0},to:{opacity:1}}),sfe=cd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Pz=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ii("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Ez({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Pz.displayName="Checkbox";function lfe(e){return x(ga,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var bS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=gn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(lfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function yC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function V4(e,t,n){return(e-t)*100/(n-t)}function Tz(e,t,n){return(n-t)*e+t}function SC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=yC(n);return b8(r,i)}function y0(e,t,n){return e==null?e:(nr==null?"":$x(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Az(_c(v),o),w=n??S,E=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),P=C.exports.useCallback(W=>{let q=W;return l&&(q=y0(q,a,s)),b8(q,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(W):q=_c(v)+W,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(-W):q=_c(v)-W,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=$x(r,o,n)??a,E(W)},[r,n,o,E,a]),I=C.exports.useCallback(W=>{const q=$x(W,o,w)??a;E(q)},[w,o,E,a]),R=_c(v);return{isOutOfRange:R>s||Rx(Z5,{styles:Lz}),ffe=()=>x(Z5,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Lz} + `});function Vf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function hfe(e){return"current"in e}var Mz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Mz()&&e.test(navigator.vendor),mfe=e=>Mz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function BA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function U4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=BA(n),a=BA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function x8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var w8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=gn(i),s=m8(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});w8.displayName="Input";w8.id="Input";var[Cfe,Oz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=gn(t),s=Ir("chakra-input__group",o),l={},u=vS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=x8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),C8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Oz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});C8.displayName="InputAddon";var Iz=Pe(function(t,n){return x(C8,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Iz.displayName="InputLeftAddon";Iz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(C8,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),xS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Oz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(Pfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var Nz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__left-element",r);return x(xS,{ref:n,placement:"left",className:o,...i})});Nz.id="InputLeftElement";Nz.displayName="InputLeftElement";var Dz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__right-element",r);return x(xS,{ref:n,placement:"right",className:o,...i})});Dz.id="InputRightElement";Dz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function td(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Ir("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:td(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var hd=we("div");hd.displayName="Box";var zz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(hd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});zz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(zz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var Bz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Bz.displayName="Center";var Ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Ofe[r],...i,position:"absolute"})});var Ife=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Ife.displayName="Code";var Rfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Ir("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Rfe.displayName="Container";var Nfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=gn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Ir("chakra-divider",p)})});Nfe.displayName="Divider";var nn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});nn.displayName="Flex";var Fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Fz.displayName="Grid";function FA(e){return td(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=x8({gridArea:r,gridColumn:FA(i),gridRow:FA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(hd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Ir("chakra-link",i),...a,__css:r})});Gf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Ir("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Ir("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Bfe,$z]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_8=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Bfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});_8.displayName="List";var Ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(_8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Ffe.displayName="OrderedList";var Hz=Pe(function(t,n){const{as:r,...i}=t;return x(_8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Hz.displayName="UnorderedList";var Wz=Pe(function(t,n){const r=$z();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Wz.displayName="ListItem";var $fe=Pe(function(t,n){const r=$z();return x(ga,{ref:n,role:"presentation",...t,__css:r.icon})});$fe.displayName="ListIcon";var Hfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?Vfe(s,u):Ufe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Hfe.displayName="SimpleGrid";function Wfe(e){return typeof e=="number"?`${e}px`:e}function Vfe(e,t){return td(e,n=>{const r=Goe("sizes",n,Wfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ufe(e){return td(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var bC="& > *:not(style) ~ *:not(style)";function Gfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[bC]:td(n,i=>r[i])}}function jfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":td(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var k8=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Gfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>jfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=vS(l);return P?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Uz,{children:I},N):I;if(!E)return W;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,E,P,p,l]),T=Ir("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[bC]:S[bC]},...m},k)});k8.displayName="Stack";var Gz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=x8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Ir("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var Yfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>td(w,k=>$A(A6("space",k)(P))),"--chakra-wrap-y-spacing":P=>td(E,k=>$A(A6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,E)=>x(Yz,{children:w},E)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Ir("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});Yfe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Ir("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var qfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},qz=qfe,bp=()=>{},Kfe={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Xfe=Kfe,Zfe={window:Xfe,document:qz},Kz=typeof window<"u"?{window,document}:Zfe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return ne(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var Qfe=e=>e?"":void 0;function Jfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Hx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function ehe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Jfe(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Hx(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),H=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),re=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),oe=$n(t,M);return w?{...S,ref:oe,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:oe,role:"button","data-active":Qfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:H,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:re}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function the(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function nhe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),rhe=e=>tB(e)&&e.tabIndex===-1;function ihe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function ohe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||ihe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():ohe(e)?!0:tB(e)}function ahe(e){return e?Jz(e)&&rB(e)&&!rhe(e):!1}var she=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],lhe=she.join(),uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(lhe));return t.unshift(e),t.filter(n=>rB(n)&&uhe(n))}function che(e){const t=e.current;if(!t)return!1;const n=nhe(t);return!n||t.contains(n)?!1:!!ahe(n)}function dhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ed(()=>{if(!o||che(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var fhe={preventScroll:!0,shouldFocus:!1};function hhe(e,t=fhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=phe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);ed(()=>{h()},[h]),Vf(a,"transitionend",h)}function phe(e){return"current"in e}var Mo="top",$a="bottom",Ha="right",Oo="left",E8="auto",Xv=[Mo,$a,Ha,Oo],H0="start",wv="end",ghe="clippingParents",oB="viewport",Dg="popper",mhe="reference",HA=Xv.reduce(function(e,t){return e.concat([t+"-"+H0,t+"-"+wv])},[]),aB=[].concat(Xv,[E8]).reduce(function(e,t){return e.concat([t,t+"-"+H0,t+"-"+wv])},[]),vhe="beforeRead",yhe="read",She="afterRead",bhe="beforeMain",xhe="main",whe="afterMain",Che="beforeWrite",_he="write",khe="afterWrite",Ehe=[vhe,yhe,She,bhe,xhe,whe,Che,_he,khe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Va(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Va(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Va(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function P8(e){if(typeof ShadowRoot>"u")return!1;var t=Va(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Phe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!za(o)||!Tl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function The(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Ahe={name:"applyStyles",enabled:!0,phase:"write",fn:Phe,effect:The,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,G4=Math.min,W0=Math.round;function xC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(xC())}function V0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=Jf(e)?Va(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function T8(e){var t=V0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&P8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xu(e){return Va(e).getComputedStyle(e)}function Lhe(e){return["table","td","th"].indexOf(Tl(e))>=0}function pd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(P8(e)?e.host:null)||pd(e)}function WA(e){return!za(e)||xu(e).position==="fixed"?null:e.offsetParent}function Mhe(e){var t=/firefox/i.test(xC()),n=/Trident/i.test(xC());if(n&&za(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(P8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(i))<0;){var o=xu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Zv(e){for(var t=Va(e),n=WA(e);n&&Lhe(n)&&xu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&xu(n).position==="static")?t:n||Mhe(e)||t}function A8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dm(e,t,n){return jf(e,G4(t,n))}function Ohe(e,t,n){var r=Dm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ihe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Xv))};function Rhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=A8(s),u=[Oo,Ha].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ihe(i.padding,n),m=T8(o),v=l==="y"?Mo:Oo,S=l==="y"?$a:Ha,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Zv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],I=k-m[h]-p[S],R=k/2-m[h]/2+T,N=Dm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Nhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const Dhe={name:"arrow",enabled:!0,phase:"main",fn:Rhe,effect:Nhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function U0(e){return e.split("-")[1]}var zhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:W0(t*i)/i||0,y:W0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=Zv(n),N="clientHeight",z="clientWidth";if(R===Va(n)&&(R=pd(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ha)&&o===wv){M=$a;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===$a)&&o===wv){T=Ha;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&zhe),de=h===!0?Bhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var H;return Object.assign({},q,(H={},H[M]=k?"0":"",H[T]=P?"0":"",H.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",H))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Fhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:_l(t.placement),variation:U0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const $he={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fhe,data:{}};var Oy={passive:!0};function Hhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Va(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Oy)}),s&&l.addEventListener("resize",n.update,Oy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Oy)}),s&&l.removeEventListener("resize",n.update,Oy)}}const Whe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Hhe,data:{}};var Vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function R3(e){return e.replace(/left|right|bottom|top/g,function(t){return Vhe[t]})}var Uhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return Uhe[t]})}function L8(e){var t=Va(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function M8(e){return V0(pd(e)).left+L8(e).scrollLeft}function Ghe(e,t){var n=Va(e),r=pd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+M8(e),y:l}}function jhe(e){var t,n=pd(e),r=L8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+M8(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function O8(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&O8(e)?e:fB(wS(e))}function zm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Va(r),a=i?[o].concat(o.visualViewport||[],O8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(zm(wS(a)))}function wC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yhe(e,t){var n=V0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===oB?wC(Ghe(e,n)):Jf(t)?Yhe(t,n):wC(jhe(pd(e)))}function qhe(e){var t=zm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&za(e)?Zv(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&lB(i,r)&&Tl(i)!=="body"}):[]}function Khe(e,t,n,r){var i=t==="clippingParents"?qhe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=jf(h.top,l.top),l.right=G4(h.right,l.right),l.bottom=G4(h.bottom,l.bottom),l.left=jf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?U0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case $a:l={x:a,y:t.y+t.height};break;case Ha:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?A8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case H0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case wv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?ghe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?Dg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=cB(typeof E!="number"?E:dB(E,Xv)),k=m===Dg?mhe:Dg,T=e.rects.popper,M=e.elements[S?k:m],I=Khe(Jf(M)?M:M.contextElement||pd(e.elements.popper),l,h,a),R=V0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=wC(Object.assign({},T,N)),$=m===Dg?z:R,W={top:I.top-$.top+P.top,bottom:$.bottom-I.bottom+P.bottom,left:I.left-$.left+P.left,right:$.right-I.right+P.right},q=e.modifiersData.offset;if(m===Dg&&q){var de=q[i];Object.keys(W).forEach(function(H){var J=[Ha,$a].indexOf(H)>=0?1:-1,re=[Mo,$a].indexOf(H)>=0?"y":"x";W[H]+=de[re]*J})}return W}function Xhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?aB:l,h=U0(r),p=h?s?HA:HA.filter(function(S){return U0(S)===h}):Xv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Zhe(e){if(_l(e)===E8)return[];var t=R3(e);return[UA(e),t,UA(t)]}function Qhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[R3(E)]:Zhe(E)),M=[E].concat(T).reduce(function(xe,Fe){return xe.concat(_l(Fe)===E8?Xhe(t,{placement:Fe,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Fe)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W=0,re=J?"width":"height",oe=Cv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?H?Ha:Oo:H?$a:Mo;I[re]>R[re]&&(X=R3(X));var G=R3(X),Q=[];if(o&&Q.push(oe[de]<=0),s&&Q.push(oe[X]<=0,oe[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Fe){var We=M.find(function(ht){var qe=N.get(ht);if(qe)return qe.slice(0,Fe).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Jhe={name:"flip",enabled:!0,phase:"main",fn:Qhe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Ha,$a,Oo].some(function(t){return e[t]>=0})}function epe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Cv(t,{elementContext:"reference"}),s=Cv(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const tpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:epe};function npe(e,t,n){var r=_l(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ha].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function rpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=npe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const ipe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rpe};function ope(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ape={name:"popperOffsets",enabled:!0,phase:"read",fn:ope,data:{}};function spe(e){return e==="x"?"y":"x"}function lpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Cv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=U0(t.placement),T=!k,M=A8(P),I=spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var H,J=M==="y"?Mo:Oo,re=M==="y"?$a:Ha,oe=M==="y"?"height":"width",X=R[M],G=X+E[J],Q=X-E[re],j=v?-z[oe]/2:0,Z=k===H0?N[oe]:z[oe],me=k===H0?-z[oe]:-N[oe],Se=t.elements.arrow,xe=v&&Se?T8(Se):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),We=Fe[J],ht=Fe[re],qe=Dm(0,N[oe],xe[oe]),rt=T?N[oe]/2-j-qe-We-W.mainAxis:Z-qe-We-W.mainAxis,Ze=T?-N[oe]/2+j+qe+ht+W.mainAxis:me+qe+ht+W.mainAxis,Xe=t.elements.arrow&&Zv(t.elements.arrow),Et=Xe?M==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,bt=(H=q?.[M])!=null?H:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Dm(v?G4(G,Ae):G,X,v?jf(Q,it):Q);R[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,_n=M==="x"?$a:Ha,Pt=R[I],Kt=I==="y"?"height":"width",kn=Pt+E[xt],mn=Pt-E[_n],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[I])!=null?lt:0,Xt=Oe?kn:Pt-N[Kt]-z[Kt]-Je+W.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-W.altAxis:mn,Ee=v&&Oe?Ohe(Xt,Pt,jt):Dm(v?Xt:kn,Pt,v?jt:mn);R[I]=Ee,de[I]=Ee-Pt}t.modifiersData[r]=de}}const upe={name:"preventOverflow",enabled:!0,phase:"main",fn:lpe,requiresIfExists:["offset"]};function cpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dpe(e){return e===Va(e)||!za(e)?L8(e):cpe(e)}function fpe(e){var t=e.getBoundingClientRect(),n=W0(t.width)/e.offsetWidth||1,r=W0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&fpe(t),o=pd(t),a=V0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||O8(o))&&(s=dpe(t)),za(t)?(l=V0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=M8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ppe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function gpe(e){var t=ppe(e);return Ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function mpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function vpe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function xpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var wpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Cpe=e=>wpe[e],XA={scroll:!0,resize:!0};function _pe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var kpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Cpe(e.placement))},Ppe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Tpe(e)}},Tpe=e=>{var t;if(!e.placement)return;const n=Ape(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Ape=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Lpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:xpe(e.placement)})},Mpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ope={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Ipe(e,t="ltr"){var n;const r=((n=Mpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ope[e]??r}function pB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=Ipe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=k.current)==null||W.call(k),E.current=bpe(S.current,w.current,{placement:P,modifiers:[Lpe,Ppe,Epe,{...kpe,enabled:!!m},{name:"eventListeners",..._pe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=E.current)==null||W.destroy(),E.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(M,q)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(R,q),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},q=null)=>{const{size:de,shadowColor:H,bg:J,style:re,...oe}=W;return{...oe,ref:q,"data-popper-arrow":"",style:Rpe(W)}},[]),$=C.exports.useCallback((W={},q=null)=>({...W,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=E.current)==null||W.update()},forceUpdate(){var W;(W=E.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function Rpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function Npe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=the(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Dpe,zpe]=xn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(Dpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Bpe]=xn({strict:!1,name:"PortalContext"}),I8="chakra-portal",Fpe=".chakra-portal",$pe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Hpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Bpe(),l=zpe();bs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=I8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x($pe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Wpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=I8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Wpe,{containerRef:t,...n}):x(Hpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=I8;uh.selector=Fpe;uh.displayName="Portal";var Vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Iy=new WeakMap,Ry={},Wx=0,Upe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ry[n]||(Ry[n]=new WeakMap);var o=Ry[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,E=(o.get(m)||0)+1;wp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Iy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Wx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Iy.has(p)||p.removeAttribute(r),Iy.delete(p)),v||p.removeAttribute(n)}),Wx--,Wx||(wp=new WeakMap,wp=new WeakMap,Iy=new WeakMap,Ry={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Upe(r,i,n,"aria-hidden")):function(){return null}};function R8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var In={exports:{}},Gpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jpe=Gpe,Ype=jpe;function bB(){}function xB(){}xB.resetWarningCache=bB;var qpe=function(){function e(r,i,o,a,s,l){if(l!==Ype){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:xB,resetWarningCache:bB};return n.PropTypes=n,n};In.exports=qpe();var CC="data-focus-lock",wB="data-focus-lock-disabled",Kpe="data-no-focus-lock",Xpe="data-autofocus-inside",Zpe="data-no-autofocus";function Qpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jpe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function CB(e,t){return Jpe(t||null,function(n){return e.forEach(function(r){return Qpe(r,n)})})}var Vx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function N8(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=pl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=pz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};PB.isSideCarExport=!0;function e0e(e,t){return e.useMedium(t),PB}var TB=N8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=N8(),t0e=N8(),n0e=EB({async:!0}),r0e=[],D8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?r0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,q=t.returnFocus,de=t.focusOptions,H=t.onActivation,J=t.onDeactivation,re=C.exports.useState({}),oe=re[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&H&&H(s.current),l.current=!0},[H]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(ht){var qe=u.current;if(qe&&qe.focus){var rt=typeof q=="function"?q(qe):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,ht?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[q]),j=C.exports.useCallback(function(ht){l.current&&TB.useMedium(ht)},[]),Z=AB.useMedium,me=C.exports.useCallback(function(ht){s.current!==ht&&(s.current=ht,a(ht))},[]),Se=An((r={},r[wB]=p&&"disabled",r[CC]=E,r),$),xe=m!==!0,Fe=xe&&m!=="tail",We=CB([n,me]);return ne(Nn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:Vx},"guard-nearest"):null],!p&&x(W,{id:oe,sideCar:n0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:I,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Fe&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx})]})});D8.propTypes={};D8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const LB=D8;function _C(e,t){return _C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_C(e,t)}function z8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_C(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){z8(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Rl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(f0e)},h0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],F8=h0e.join(","),p0e="".concat(F8,", [data-focus-guard]"),$B=function(e,t){var n;return Rl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?p0e:F8)?[i]:[],$B(i))},[])},$8=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Rl(r.parentNode.querySelectorAll(F8)).filter(function(i){return i===r}):[])},[])},g0e=function(e){var t=e.querySelectorAll("[".concat(Xpe,"]"));return Rl(t).map(function(n){return $8([n])}).reduce(function(n,r){return n.concat(r)},[])},H8=function(e,t){return Rl(e).filter(function(n){return RB(t,n)}).filter(function(n){return u0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Rl(e).filter(function(n){return NB(t,n)})},EC=function(e,t,n){return FB(H8($8(e,n),t),!0,n)},eL=function(e,t){return FB(H8($8(e),t),!1)},m0e=function(e,t){return H8(g0e(e),t)},_v=function(e,t){return e.shadowRoot?_v(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Rl(e.children).some(function(n){return _v(n,t)})},v0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},W8=function(e){var t=kC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(CC);return n.push.apply(n,i?v0e(Rl(HB(r).querySelectorAll("[".concat(CC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},V8=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},y0e=function(e){return e===document.activeElement},S0e=function(e){return Boolean(Rl(e.querySelectorAll("iframe")).some(function(t){return y0e(t)}))},VB=function(e){var t=document&&V8();return!t||t.dataset&&t.dataset.focusGuard?!1:W8(e).some(function(n){return _v(n,t)||S0e(n)})},b0e=function(){var e=document&&V8();return e?Rl(document.querySelectorAll("[".concat(Kpe,"]"))).some(function(t){return _v(t,e)}):!1},x0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},U8=function(e,t){return BB(e)&&e.name?x0e(e,t):e},w0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(U8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?U8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(U8(e[t],e)):t},UB="NEW_FOCUS",C0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=B8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=w0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},_0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},k0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(_0e(n)));return i&&i.length?tL(i):tL(JA(t))},PC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&PC(e.parentNode.host||e.parentNode,t),t},Ux=function(e,t){for(var n=PC(e),r=PC(t),i=0;i=0)return o}return!1},GB=function(e,t,n){var r=kC(e),i=kC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Ux(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Ux(o,l);u&&(!a||_v(u,a)?a=u:a=Ux(u,a))})}),a},E0e=function(e,t){return e.reduce(function(n,r){return n.concat(m0e(r,t))},[])},P0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(d0e)},T0e=function(e,t){var n=document&&V8(),r=W8(e).filter(j4),i=GB(n||e,e,r),o=new Map,a=eL(r,o),s=EC(r,o).filter(function(m){var v=m.node;return j4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=P0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=C0e(h,l,n,t);return p===UB?{node:k0e(a,h,E0e(r,o))}:p===void 0?p:u[p]}},A0e=function(e){var t=W8(e).filter(j4),n=GB(e,e,t),r=new Map,i=EC([n],r,!0),o=EC(t,r).filter(function(a){var s=a.node;return j4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:B8(s)}})},L0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Gx=0,jx=!1,M0e=function(e,t,n){n===void 0&&(n={});var r=T0e(e,t);if(!jx&&r){if(Gx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),jx=!0,setTimeout(function(){jx=!1},1);return}Gx++,L0e(r.node,n.focusOptions),Gx--}};const jB=M0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var O0e=function(){return document&&document.activeElement===document.body},I0e=function(){return O0e()||b0e()},S0=null,Kp=null,b0=null,kv=!1,R0e=function(){return!0},N0e=function(t){return(S0.whiteList||R0e)(t)},D0e=function(t,n){b0={observerNode:t,portaledElement:n}},z0e=function(t){return b0&&b0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var B0e=function(t){return t&&"current"in t?t.current:t},F0e=function(t){return t?Boolean(kv):kv==="meanwhile"},$0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},H0e=function(t,n){return n.some(function(r){return $0e(t,r,r)})},Y4=function(){var t=!1;if(S0){var n=S0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||b0&&b0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(B0e).filter(Boolean));if((!h||N0e(h))&&(i||F0e(s)||!I0e()||!Kp&&o)&&(u&&!(VB(p)||h&&H0e(h,p)||z0e(h))&&(document&&!Kp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,Kp,{focusOptions:l}),b0={})),kv=!1,Kp=document&&document.activeElement),document){var m=document&&document.activeElement,v=A0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},qB=function(t){Y4()&&t&&(t.stopPropagation(),t.preventDefault())},G8=function(){return YB(Y4)},W0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||D0e(r,n)},V0e=function(){return null},KB=function(){kv="just",setTimeout(function(){kv="meanwhile"},0)},U0e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",G8),window.addEventListener("blur",KB)},G0e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",G8),window.removeEventListener("blur",KB)};function j0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function Y0e(e){var t=e.slice(-1)[0];t&&!S0&&U0e();var n=S0,r=n&&t&&t.id===n.id;S0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Kp=null,(!r||n.observed!==t.observed)&&t.onActivation(),Y4(),YB(Y4)):(G0e(),Kp=null)}TB.assignSyncMedium(W0e);AB.assignMedium(G8);t0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const q0e=i0e(j0e,Y0e)(V0e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:q0e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;R8(ZB,["sideCar"]);XB.propTypes={};const K0e=XB;var QB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(K0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var N3="right-scroll-bar-position",D3="width-before-scroll-bar",X0e="with-scroll-bars-hidden",Z0e="--removed-body-scroll-bar-size",JB=EB(),Yx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Yx,onWheelCapture:Yx,onTouchMoveCapture:Yx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=pz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=pl(pl({},k),i);return ne(Nn,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},I),{ref:M})):x(P,{...pl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:D3,zeroRight:N3};var Q0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function J0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q0e();return t&&e.setAttribute("nonce",t),e}function e1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var n1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=J0e())&&(e1e(t,n),t1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},r1e=function(){var e=n1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=r1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},i1e={left:0,top:0,right:0,gap:0},qx=function(e){return parseInt(e||"",10)||0},o1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[qx(n),qx(r),qx(i)]},a1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return i1e;var t=o1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},s1e=eF(),l1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(X0e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(N3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(D3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(N3," .").concat(N3,` { + right: 0 `).concat(r,`; + } + + .`).concat(D3," .").concat(D3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(Z0e,": ").concat(s,`px; + } +`)},u1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return a1e(i)},[i]);return x(s1e,{styles:l1e(o,!t,i,n?"":"!important")})},TC=!1;if(typeof window<"u")try{var Ny=Object.defineProperty({},"passive",{get:function(){return TC=!0,!0}});window.addEventListener("test",Ny,Ny),window.removeEventListener("test",Ny,Ny)}catch{TC=!1}var Cp=TC?{passive:!1}:!1,c1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!c1e(e)&&n[t]==="visible")},d1e=function(e){return tF(e,"overflowY")},f1e=function(e){return tF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},h1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},p1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?d1e(t):f1e(t)},rF=function(e,t){return e==="v"?h1e(t):p1e(t)},g1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},m1e=function(e,t,n,r,i){var o=g1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&nF(e,s)&&(p+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Dy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},v1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},y1e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},S1e=0,_p=[];function b1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(S1e++)[0],o=C.exports.useState(function(){return eF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=fC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Dy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=iL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=iL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return m1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!_p.length||_p[_p.length-1]!==o)){var P="deltaY"in E?oL(E):Dy(E),k=t.current.filter(function(I){return I.name===E.type&&I.target===E.target&&v1e(I.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Dy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Dy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return ne(Nn,{children:[S?x(o,{styles:y1e(i)}):null,v?x(u1e,{gapMode:"margin"}):null]})}const x1e=e0e(JB,b1e);var iF=C.exports.forwardRef(function(e,t){return x(CS,{...pl({},e,{ref:t,sideCar:x1e})})});iF.classNames=CS.classNames;const oF=iF;var ch=(...e)=>e.filter(Boolean).join(" ");function nm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var w1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},AC=new w1e;function C1e(e,t){C.exports.useEffect(()=>(t&&AC.add(e),()=>{AC.remove(e)}),[t,e])}function _1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=E1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");k1e(u,t&&a),C1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:nm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!AC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:nm(z.onClick,R),onKeyDown:nm(z.onKeyDown,E),onMouseDown:nm(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function k1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function E1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[P1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[T1e,nd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),G0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),E={..._1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(T1e,{value:E,children:x(P1e,{value:S,children:x(dd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};G0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};G0.displayName="Modal";var q4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});q4.displayName="ModalBody";var j8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=nd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:nm(n,l=>{l.stopPropagation(),o()}),...i})});j8.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=nd(),[p,m]=o8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var A1e={slideInBottom:{...pC,custom:{offsetY:16,reverse:!0}},slideInRight:{...pC,custom:{offsetX:16,reverse:!0}},scale:{...vz,custom:{initialScale:.95,reverse:!0}},none:{}},L1e=we(Il.section),M1e=e=>A1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=M1e(n),...i}=e;return x(L1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Ev=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=nd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=nd();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Ev.displayName="ModalContent";var Y8=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});Y8.displayName="ModalFooter";var q8=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q8.displayName="ModalHeader";var O1e=we(Il.div),Pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=nd();return x(O1e,{...i||(u==="none"?{}:mz),__css:l,ref:t,className:a,...o})});Pv.displayName="ModalOverlay";function I1e(e){const{leastDestructiveRef:t,...n}=e;return x(G0,{...n,initialFocusRef:t})}var R1e=Pe((e,t)=>x(Ev,{ref:t,role:"alertdialog",...e})),[FPe,N1e]=xn(),D1e=we(yz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=nd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=N1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function B1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var lF=(...e)=>e.filter(Boolean).join(" "),Kx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var F1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),$1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var H1e=50,lL=300;function W1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);B1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function j1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:q,...de}=e,H=cr(I),J=cr(R),re=cr(N),oe=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useRef(null),rt=C.exports.useCallback(Ee=>Ee.split("").filter(oe).join(""),[oe]),Ze=C.exports.useCallback(Ee=>q?.(Ee)??Ee,[q]),Xe=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);ed(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Fe.current)return;if(Fe.current.value!=G.value){const Mt=Ze(Fe.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((Ee=a)=>{xe&&j(Ee)},[j,xe,a]),bt=C.exports.useCallback((Ee=a)=>{xe&&Z(Ee)},[Z,xe,a]),Ae=W1e(Et,bt);sL(ht,"disabled",Ae.stop,Ae.isSpinning),sL(qe,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Ze(Ee.currentTarget.value);Q(rt(Ne)),We.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(Ee=>{var Mt;H?.(Ee),We.current&&(Ee.target.selectionStart=We.current.start??((Mt=Ee.currentTarget.value)==null?void 0:Mt.length),Ee.currentTarget.selectionEnd=We.current.end??Ee.currentTarget.selectionStart)},[H]),lt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;G1e(Ee,oe)||Ee.preventDefault();const Mt=xt(Ee)*a,Ne=Ee.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(Ee.preventDefault(),an(Ee))},[oe,a,Et,bt,Q,i,o]),xt=Ee=>{let Mt=1;return(Ee.metaKey||Ee.ctrlKey)&&(Mt=.1),Ee.shiftKey&&(Mt=10),Mt},_n=C.exports.useMemo(()=>{const Ee=X?.(G.value);if(Ee!=null)return Ee;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=C.exports.useCallback(()=>{let Ee=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(Ee=o),G.cast(Ee))},[G,o,i]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),kn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=Fe.current)==null||Ee.focus()})},[t]),mn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),kn()},[kn,Ae]),Oe=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),kn()},[kn,Ae]);Vf(()=>Fe.current,"wheel",Ee=>{var Mt;const at=(((Mt=Fe.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Fe.current;if(!v||!at)return;Ee.preventDefault();const an=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?Et(an):Dn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...Ee,ref:$n(Mt,ht),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...Ee,ref:$n(Mt,qe),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((Ee={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(Fe,Mt),value:Xe(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Kx(h??G.isOutOfRange),"aria-valuetext":_n,autoComplete:"off",autoCorrect:"off",onChange:il(Ee.onChange,it),onKeyDown:il(Ee.onKeyDown,lt),onFocus:il(Ee.onFocus,Ot,()=>Se(!0)),onBlur:il(Ee.onBlur,J,Kt)}),[P,m,p,M,T,Xe,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,_n,it,lt,Ot,J,Kt]);return{value:Xe(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,_S]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[q1e,K8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),X8=Pe(function(t,n){const r=Ii("NumberInput",t),i=gn(t),o=v8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:lF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});X8.displayName="NumberInput";var uF=Pe(function(t,n){const r=_S();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});uF.displayName="NumberInputStepper";var Z8=Pe(function(t,n){const{getInputProps:r}=K8(),i=r(t,n),o=_S();return le.createElement(we.input,{...i,className:lF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z8.displayName="NumberInputField";var cF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Q8=Pe(function(t,n){const r=_S(),{getDecrementButtonProps:i}=K8(),o=i(t,n);return x(cF,{...o,__css:r.stepper,children:t.children??x(F1e,{})})});Q8.displayName="NumberDecrementStepper";var J8=Pe(function(t,n){const{getIncrementButtonProps:r}=K8(),i=r(t,n),o=_S();return x(cF,{...i,__css:o.stepper,children:t.children??x($1e,{})})});J8.displayName="NumberIncrementStepper";var Qv=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[J1e,Jv]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function ege(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,W]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),H=C.exports.useId(),J=i??H,[re,oe,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=pB({...w,enabled:E||!!S}),xe=Npe({isOpen:E,ref:R});Sfe({enabled:E,ref:I}),dhe(R,{focusRef:I,visible:E,shouldFocus:o&&u===kp.click}),hhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===kp.click});const Fe=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Ot),children:Fe?it.children:null,id:oe,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const _n=uL(xt),Pt=Xx(R.current,_n),Kt=Xx(I.current,_n);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===kp.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Fe,oe,$,X,q,G,u,n,P,E,t,p,l,s]),ht=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),qe=C.exports.useCallback((it,Ot=null)=>({...it,ref:$n(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Xe=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:$n(I,Ot,Xe),id:re,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":oe};return u===kp.click&&(lt.onClick=ol(it.onClick,T)),u===kp.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const _n=uL(xt),Pt=!Xx(R.current,_n);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[re,E,oe,u,Xe,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:$n(Ot,lt=>{W(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:$n(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:ht,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Xx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function e_(e){const t=Ii("Popover",e),{children:n,...r}=gn(e),i=t1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}e_.displayName="Popover";function t_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=Jv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:Qv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}t_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=Jv();return le.createElement(we.div,{...r(t,n),className:Qv("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=Jv();return x(bS,{size:"sm",onClick:r,className:Qv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},oge=we(Il.section),dF=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});dF.displayName="PopoverTransition";var n_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=Jv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(dF,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:Qv("chakra-popover__content",t.className),__css:h}))});n_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=Jv();return le.createElement(we.header,{...r(t,n),className:Qv("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function r_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}r_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=cd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=cd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=cd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function fF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var hF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${uge} 2s linear infinite`:void 0},...r})};hF.displayName="Shape";var LC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});LC.displayName="Circle";var fge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=fF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ne(hF,{size:n,isIndeterminate:v,children:[x(LC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(LC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=fF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),pF=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=gn(e),E=Ii("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},I={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ne(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:P,title:v,role:S}),l]}))});pF.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var gF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});gF.displayName="SelectField";var mF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=gn(e),[w,E]=Sge(S,jZ),P=m8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(gF,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(vF,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});mF.displayName="Select";var bge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),vF=e=>{const{children:t=x(bge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};vF.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function yF(e){return!!e.touches}function _ge(e){return yF(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function SF(e,t="page"){return yF(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:SF(i)})}return t?Tge(n):n}function z3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function bF(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:SF(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,Zx(r,this.history)),this.removeListeners=Ige(z3(this.win,"pointermove",this.onPointerMove),z3(this.win,"pointerup",this.onPointerUp),z3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=Zx(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Rge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=Zx(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ige(...e){return t=>e.reduce((n,r)=>r(n),t)}function Qx(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Rge(e,t){if(typeof e=="number"&&typeof t=="number")return Qx(e,t);if(dL(e)&&dL(t)){const n=Qx(e.x,t.x),r=Qx(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function xF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=bF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new Lge(v,h.current,s)}return z3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function wF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Bge(e){return typeof e=="object"&&e!==null&&"current"in e}function Fge(e){const[t]=wF({observeMutation:!1,getNodes(){return[Bge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},gd=Hge({"../../../react-shim.js"(){}});gd();gd();gd();var La=e=>e?"":void 0,x0=e=>e?!0:void 0,md=(...e)=>e.filter(Boolean).join(" ");gd();function w0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}gd();gd();function Wge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function rm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var B3={width:0,height:0},zy=e=>e||B3;function CF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??B3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...rm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>zy(w).height>zy(E).height?w:E,B3):r.reduce((w,E)=>zy(w).width>zy(E).width?w:E,B3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...rm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...rm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...rm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function _F(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=_F({isReversed:a,direction:s,orientation:l}),[q,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[H,J]=C.exports.useState(!1),[re,oe]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>y0($e,t,n)),me=I*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Fe=Z.map($e=>n-$e+t),ht=(W?Fe:Z).map($e=>V4($e,t,n)),qe=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Xe=wF({getNodes(){const $e=Ze.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var pt;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?tt.bottom-Zt:Nt-tt.left,lo=qe?tt.height:tt.width;let hi=Qn/lo;return W&&(hi=1-hi),Tz(hi,t,n)},[qe,W,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!Q)return;const tt=xe.current.valueBounds[$e];pt=parseFloat(SC(pt,tt.min,lt)),pt=y0(pt,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:G,stepUp($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt-pt:tt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt+pt:tt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,W,de,Q]),_n=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:kn,innerTrackStyle:mn}=C.exports.useMemo(()=>CF({isReversed:W,orientation:l,thumbRects:Xe,thumbPercents:ht}),[W,l,ht,Xe]),Oe=C.exports.useCallback($e=>{var pt;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(pt=Ze.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);ed(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const pt=it($e)||0,tt=xe.current.value.map(hi=>Math.abs(hi-pt)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(hi=>hi===Nt);Qn.length>1&&pt>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,pt),Oe(Zt)},Xt=$e=>{if(X==-1)return;const pt=it($e)||0;G(X),xt.setValueAtIndex(X,pt),Oe(X)};xF(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},pt=null)=>({...$e,...R,id:Ae.root,ref:$n(pt,Ze),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(re),style:{...$e.style,...Kt}}),[R,h,re,Kt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,rt),id:Ae.track,"data-disabled":La(h),style:{...$e.style,...kn}}),[h,kn,Ae]),Mt=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:pt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":La(H&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:w0($e.onKeyDown,_n),onFocus:w0($e.onFocus,()=>{oe(!0),G(tt)}),onBlur:w0($e.onBlur,()=>{oe(!1),G(-1)})}},[Ae,Z,Se,Q,H,X,$,E,l,h,p,P,k,Pt,_n,oe]),at=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,pt=null)=>{const{value:tt,...Nt}=$e,Zt=!(ttn),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=V4(tt,t,n);lo=W?100-lo:lo;const hi={position:"absolute",pointerEvents:"none",...rm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!Zt),"data-highlighted":La(Qn),style:{...$e.style,...hi}}},[h,W,n,t,l,Z,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:re,isDragging:H,getThumbPercent:$e=>ht[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:Ee,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Dn,getOutputProps:at}}function Uge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Gge,kS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[jge,i_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kF=Pe(function(t,n){const r=Ii("Slider",t),i=gn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});kF.defaultProps={orientation:"horizontal"};kF.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=kS(),a=i_(),s=r(t,n);return le.createElement(we.div,{...s,className:md("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:md("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=kS(),i=r(t,n);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";gd();gd();function Zge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=_F({isReversed:a,direction:s,orientation:l}),[W,q]=tS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),oe=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=y0(W,t,n),j=n-Q+t,me=V4($?j:Q,t,n),Se=l==="vertical",xe=bF({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:oe,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useId(),rt=u??qe,[Ze,Xe]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Fe.current)return;const an=xe.current;an.eventSource="pointer";const Dn=Fe.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Dn.bottom-pt:$e-Dn.left,Nt=Se?Dn.height:Dn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Tz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(SC(Qn,an.min,an.step))),Qn=y0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(SC(Ne,at.min,G)),Ne=y0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Fge(We),{getThumbStyle:xt,rootStyle:_n,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return CF({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),kn=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);ed(()=>{const Ne=xe.current;kn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}xF(ht,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(H(!0),kn(),mn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(H(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...I,ref:$n(at,ht),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(J),style:{...Ne.style,..._n}}),[I,h,J,_n]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,Fe),id:Xe,"data-disabled":La(h),style:{...Ne.style,...Pt}}),[h,Xe,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,We),role:"slider",tabIndex:oe?0:void 0,id:Ze,"data-active":La(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:w0(Ne.onKeyDown,it),onFocus:w0(Ne.onFocus,()=>re(!0)),onBlur:w0(Ne.onBlur,()=>re(!1))}),[oe,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),Ee=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.valuen),Dn=Q>=Ne.value,$e=V4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!an),"data-highlighted":La(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:Ee,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t"}),[tme,PS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),o_=Pe((e,t)=>{const n=Ii("Slider",e),r=gn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:md("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});o_.defaultProps={orientation:"horizontal"};o_.displayName="Slider";var EF=Pe((e,t)=>{const{getThumbProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__thumb",e.className),__css:r.thumb})});EF.displayName="SliderThumb";var PF=Pe((e,t)=>{const{getTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__track",e.className),__css:r.track})});PF.displayName="SliderTrack";var TF=Pe((e,t)=>{const{getInnerTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__filled-track",e.className),__css:r.filledTrack})});TF.displayName="SliderFilledTrack";var MC=Pe((e,t)=>{const{getMarkerProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",e.className),__css:r.mark})});MC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,a_=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:nme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});a_.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function OC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,AF,ime,ome]=FN();function ame(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=tS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=ime(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[sme,e2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=e2(),i=AF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:OC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=e2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=ehe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:OC(e.onClick,m)}),w="button";return{...S,id:LF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":MF(a,u),onFocus:t?void 0:OC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=e2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:MF(n,s),tabId:LF(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=e2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function pme(){const e=e2(),t=AF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function LF(e,t){return`${e}--tab-${t}`}function MF(e,t){return`${e}--tabpanel-${t}`}var[gme,t2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),OF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});OF.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=t2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...t2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var IF=Pe(function(t,n){const r=hme({...t,ref:n}),i=t2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});IF.displayName="TabPanel";var RF=Pe(function(t,n){const r=fme(t),i=t2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RF.displayName="TabPanels";var NF=Pe(function(t,n){const r=t2(),i=ume({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});NF.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],DF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=m8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});DF.displayName="Textarea";function xme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=zF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function zF(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Ame(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:BF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=zF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(bz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(wz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Cz,{id:u?.title,children:i}),s&&x(xz,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function BF(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=BF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function hh(e){const{theme:t}=DN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},FF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Ile();ed(()=>{v||r?.()},[v]),ed(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},IC(n,{id:t,onClose:E})))});FF.displayName="ToastComponent";var Ime=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Eme(l),children:x(dd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Nn,{children:[n,x(uh,{...o,children:s})]})};function Rme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function zg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},RC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:q,getArrowInnerProps:de,getArrowProps:H}=pB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:I}),J=C.exports.useId(),oe=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Bme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=RC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=RC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Fe=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>K4(X),"keydown",s?We:void 0),Vf(()=>K4(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const ht=C.exports.useCallback((Ze={},Xe=null)=>({...Ze,ref:$n(X,Xe,W),onPointerEnter:zg(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:zg(Ze.onClick,xe),onPointerDown:zg(Ze.onPointerDown,Fe),onFocus:zg(Ze.onFocus,me),onBlur:zg(Ze.onBlur,Se),"aria-describedby":N?oe:void 0}),[me,Se,Fe,N,oe,xe,W]),qe=C.exports.useCallback((Ze={},Xe=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Xe),[q,S,w]),rt=C.exports.useCallback((Ze={},Xe=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Xe,...R,...Ze,id:oe,role:"tooltip",style:Et}},[R,oe]);return{isOpen:N,show:me,hide:Se,getTriggerProps:ht,getTooltipProps:rt,getTooltipPositionerProps:qe,getArrowProps:H,getArrowInnerProps:de}}var Jx="chakra-ui:close-tooltip";function Bme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(Jx,t),()=>n.removeEventListener(Jx,t)},[t,e]),()=>{const n=K4(e),r=RC(e);n.dispatchEvent(new r.CustomEvent(Jx))}}var Fme=we(Il.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const I=!!l,R=k.getTooltipProps({},t),N=I?Rme(R,["role","id"]):R,z=Nme(R,["role","id"]);return a?ne(Nn,{children:[M,x(dd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Fme,{variants:Dme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Nn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:ne(FR,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return ne($me,{theme:t,...r,children:[e,x(Ime,{...n})]})}function vs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:s_(e)?2:l_(e)?3:0}function C0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return l1(e)===2?e.get(t):e[t]}function $F(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function HF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function s_(e){return qme&&e instanceof Map}function l_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function u_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=VF(e);delete t[tr];for(var n=_0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return c_(r,!0)},!0)),e}function Vme(){vs(2)}function d_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=BC[e];return t||vs(18,e),t}function Ume(e,t){BC[e]||(BC[e]=t)}function NC(){return Tv}function ew(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){DC(e),e.p.forEach(Gme),e.p=null}function DC(e){e===Tv&&(Tv=e.l)}function gL(e){return Tv={p:[],l:Tv,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function tw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),vs(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&kl("Patches").M(n[tr].t,e,t.u,t.s)):e=Z4(t,n,[]),X4(t),t.u&&t.v(t.u,t.s),e!==WF?e:void 0}function Z4(e,t,n){if(d_(t))return t;var r=t[tr];if(!r)return eh(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Q4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=u_(r.k):r.o;eh(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),Q4(e,i,!1),n&&e.u&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(rd(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!C0(t.D,r)?o.concat(r):void 0);if($F(n,r,a),!rd(a))return;e.m=!1}if(wu(i)&&!d_(i)){if(!e.h.F&&e._<1)return;Z4(e,i),t&&t.A.l||Q4(e,i)}}function Q4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&c_(t,n)}function nw(e,t){var n=e[tr];return(n?Sf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function rw(e){e.o||(e.o=u_(e.t))}function zC(e,t,n){var r=s_(t)?kl("MapSet").N(t,n):l_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:NC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Av;a&&(l=[s],u=im);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:NC()).p.push(r),r}function jme(e){return rd(e)||vs(22,e),function t(n){if(!wu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||$F(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return u_(e)}function Yme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Av.get(l,o)},set:function(l){var u=this[tr];Av.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=_0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!C0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!HF(m,p))return!0}}var S=!!a[tr];return l.length!==_0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=kl("Patches").$;return rd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),da=new Zme,UF=da.produce;da.produceWithPatches.bind(da);da.setAutoFreeze.bind(da);da.setUseProxies.bind(da);da.applyPatches.bind(da);da.createDraft.bind(da);da.finishDraft.bind(da);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(h_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:J4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function GF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function e5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return t5}function i(s,l){r(s)===t5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rve=function(t,n){return t===n};function ive(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Fve;XF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=XF})(KF);var ZF={exports:{}},QF={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var AS=C.exports,Wve=KF.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=Wve.useSyncExternalStore,jve=AS.useRef,Yve=AS.useEffect,qve=AS.useMemo,Kve=AS.useDebugValue;QF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,Uve(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=QF})(ZF);function Xve(e){e()}let JF=Xve;const Zve=e=>JF=e,Qve=()=>JF,id=C.exports.createContext(null);function e$(){return C.exports.useContext(id)}const Jve=()=>{throw new Error("uSES not initialized!")};let t$=Jve;const e2e=e=>{t$=e},t2e=(e,t)=>e===t;function n2e(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=t$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var g_=Symbol.for("react.element"),m_=Symbol.for("react.portal"),LS=Symbol.for("react.fragment"),MS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),IS=Symbol.for("react.provider"),RS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),NS=Symbol.for("react.forward_ref"),DS=Symbol.for("react.suspense"),zS=Symbol.for("react.suspense_list"),BS=Symbol.for("react.memo"),FS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),n$;n$=Symbol.for("react.module.reference");function Ua(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case g_:switch(e=e.type,e){case LS:case OS:case MS:case DS:case zS:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case RS:case NS:case FS:case BS:case IS:return e;default:return t}}case m_:return t}}}On.ContextConsumer=RS;On.ContextProvider=IS;On.Element=g_;On.ForwardRef=NS;On.Fragment=LS;On.Lazy=FS;On.Memo=BS;On.Portal=m_;On.Profiler=OS;On.StrictMode=MS;On.Suspense=DS;On.SuspenseList=zS;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ua(e)===RS};On.isContextProvider=function(e){return Ua(e)===IS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===g_};On.isForwardRef=function(e){return Ua(e)===NS};On.isFragment=function(e){return Ua(e)===LS};On.isLazy=function(e){return Ua(e)===FS};On.isMemo=function(e){return Ua(e)===BS};On.isPortal=function(e){return Ua(e)===m_};On.isProfiler=function(e){return Ua(e)===OS};On.isStrictMode=function(e){return Ua(e)===MS};On.isSuspense=function(e){return Ua(e)===DS};On.isSuspenseList=function(e){return Ua(e)===zS};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===LS||e===OS||e===MS||e===DS||e===zS||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===FS||e.$$typeof===BS||e.$$typeof===IS||e.$$typeof===RS||e.$$typeof===NS||e.$$typeof===n$||e.getModuleId!==void 0)};On.typeOf=Ua;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function l2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=s2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||id).Provider,{value:i,children:n})}function r$(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=r$();function h2e(e=id){const t=e===id?f2e:r$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(ZF.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var v_="persist:",i$="persist/FLUSH",y_="persist/REHYDRATE",o$="persist/PAUSE",a$="persist/PERSIST",s$="persist/PURGE",l$="persist/REGISTER",g2e=-1;function F3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F3=function(n){return typeof n}:F3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},F3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&k()}function k(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:I}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=w2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key);return t.removeItem(n,_2e)}function _2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function P2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=E2e(m,["_persist"]),w=S;if(p.type===a$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,W){return Promise.resolve($)};z(N,n).then(function($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===s$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===i$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===o$)l=!0;else if(p.type===y_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,I=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(iu({},R,{_persist:v}))}}function IL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:u$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case l$:return $C({},t,{registry:[].concat(IL(t.registry),[n.key])});case y_:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),$C({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=h_(R2e,u$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:l$,key:u})},a=function(u,h,p){var m={type:y_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=$C({},i,{purge:function(){var u=[];return e.dispatch({type:s$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:i$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:o$})},persist:function(){e.dispatch({type:a$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var S_={},b_={};b_.__esModule=!0;b_.default=B2e;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function lw(){}var D2e={getItem:lw,setItem:lw,removeItem:lw};function z2e(e){if((typeof self>"u"?"undefined":$3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function B2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}S_.__esModule=!0;S_.default=H2e;var F2e=$2e(b_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,F2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var c$=void 0,W2e=V2e(S_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");c$=U2e;var d$={},f$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=th,n=x_,r=function(H){return typeof H=="object"&&H!==null};e.isObjectLike=r;const i=function(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(H){return(0,e.isLength)(H&&H.length)&&Object.prototype.toString.call(H)==="[object Array]"};const o=function(H){return!!H&&typeof H=="object"&&!(0,e.isArray)(H)};e.isPlainObject=o;const a=function(H){return String(~~H)===H&&Number(H)>=0};e.isIntegerString=a;const s=function(H){return Object.prototype.toString.call(H)==="[object String]"};e.isString=s;const l=function(H){return Object.prototype.toString.call(H)==="[object Date]"};e.isDate=l;const u=function(H){return Object.keys(H).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(H,J,re){re||(re=new Set([H])),J||(J="");for(const oe in H){const X=J?`${J}.${oe}`:oe,G=H[oe];if((0,e.isObjectLike)(G))return re.has(G)?`${J}.${oe}:`:(re.add(G),(0,e.getCircularPath)(G,X,re))}return null};e.getCircularPath=p;const m=function(H){if(!(0,e.isObjectLike)(H))return H;if((0,e.isDate)(H))return new Date(+H);const J=(0,e.isArray)(H)?[]:{};for(const re in H){const oe=H[re];J[re]=(0,e._cloneDeep)(oe)}return J};e._cloneDeep=m;const v=function(H){const J=(0,e.getCircularPath)(H);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${H}`);return(0,e._cloneDeep)(H)};e.cloneDeep=v;const S=function(H,J){if(H===J)return{};if(!(0,e.isObjectLike)(H)||!(0,e.isObjectLike)(J))return J;const re=(0,e.cloneDeep)(H),oe=(0,e.cloneDeep)(J),X=Object.keys(re).reduce((Q,j)=>(h.call(oe,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(re)||(0,e.isDate)(oe))return re.valueOf()===oe.valueOf()?{}:oe;const G=Object.keys(oe).reduce((Q,j)=>{if(!h.call(re,j))return Q[j]=oe[j],Q;const Z=(0,e.difference)(re[j],oe[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(re)&&!(0,e.isArray)(oe)||!(0,e.isArray)(re)&&(0,e.isArray)(oe)?oe:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(H,J){return J.reduce((re,oe)=>{if(re){const X=parseInt(oe,10),G=(0,e.isIntegerString)(oe)&&X<0?re.length+X:oe;return(0,e.isString)(re)?re.charAt(G):re[G]}},H)};e.path=w;const E=function(H,J){return[...H].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(H,J){const re=(0,e.cloneDeep)(H);return J.reduce((oe,X,G)=>(G===J.length-1&&oe&&(0,e.isObjectLike)(oe)&&delete oe[X],oe&&oe[X]),re),re};e.dissocPath=P;const k=function(H,J,...re){if(!re||!re.length)return J;const oe=re.shift(),{preservePlaceholder:X,preserveUndefined:G}=H;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(oe))for(const Q in oe)if((0,e.isObjectLike)(oe[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(H,J[Q],oe[Q]);else if((0,e.isArray)(J)){let j=oe[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=oe[Q]!==t.PLACEHOLDER_UNDEFINED?oe[Q]:void 0;J[Q]=j}return k(H,J,...re)},T=function(H,J,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(H),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(H,J=[],re,oe,X){if(!(0,e.isObjectLike)(H))return H;for(const G in H){const Q=H[G],j=(0,e.isArray)(H),Z=oe?oe+"."+G:G;Q===null&&(re===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||re===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(H[parseInt(G,10)]=void 0),Q===void 0&&X&&re===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(H[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,re,Z,X)}},I=function(H,J,re,oe){const X=(0,e.cloneDeep)(H);return M(X,J,re,"",oe),X};e.preserveUndefined=I;const R=function(H,J,re){return re.indexOf(H)===J};e.unique=R;const N=function(H){return H.reduce((J,re)=>{const oe=H.filter(me=>me===re),X=H.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=oe.length>1&&G.indexOf(re)===-1,Z=X.length>1;return{duplicates:[...G,...j?oe:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(H,J,re){const oe=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${oe} configuration.`,G=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!H||!H.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(H);if(Q.length>1)throw new Error(`${X} Duplicated paths. + + ${JSON.stringify(Q)} + + ${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(j)} + + ${G}`)};e.singleTransformValidator=z;const $=function(H){if(!(0,e.isArray)(H))return;const J=H?.map(re=>re.deepPersistKey).filter(re=>re)||[];if(J.length){const re=J.filter((oe,X)=>J.indexOf(oe)!==X);if(re.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(re)}`)}};e.transformsValidator=$;const W=function({whitelist:H,blacklist:J}){if(H&&H.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(H){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(H);(0,e.throwError)({duplicates:re,subsets:oe},"whitelist")}if(J){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:re,subsets:oe},"blacklist")}};e.configValidator=W;const q=function({duplicates:H,subsets:J},re){if(H.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${re}. + + ${JSON.stringify(H)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(J)}`)};e.throwError=q;const de=function(H){return(0,e.isArray)(H)?H.filter(e.unique).reduce((J,re)=>{const oe=re.split("."),X=oe[0],G=oe.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(f$);(function(e){var t=ms&&ms.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(k[I])){k[I]=(0,n.mergeDeep)(k[I],T[I]);return}k[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=p,k=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(P(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(d$);const H3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return w_(r)?r:!1},w_=e=>Boolean(typeof e=="string"?G2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),r5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),j2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,q="...",de=800,H=16,J=1,re=2,oe=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],Fe="[object Arguments]",We="[object Array]",ht="[object AsyncFunction]",qe="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Xe="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",_n="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",kn="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",Ee="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,g1=RegExp(hi.source),ma=RegExp(Ms.source),xh=/<%-([\s\S]+?)%>/g,m1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,v1=RegExp(kd.source),Ru=/^\s+/,Ed=/\s/,y1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,S1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,b1=/[()=,{}\[\]\/\s]/,x1=/\\(\\)?/g,w1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ga=/\w*$/,C1=/^[-+]0x[0-9a-f]+$/i,_1=/^0b[01]+$/i,k1=/^\[object .+?Constructor\]$/,E1=/^0o[0-7]+$/i,P1=/^(?:0|[1-9]\d*)$/,T1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Is=/($^)/,A1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Rs="\\u20d0-\\u20ff",Bl=Dl+zl+Rs,_h="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",vn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ns+No+En+vn,zo="['\u2019]",Ds="["+ja+"]",Gr="["+Ur+"]",Ya="["+Bl+"]",Pd="\\d+",Fl="["+_h+"]",qa="["+Du+"]",Td="[^"+ja+Ur+Pd+_h+Du+Do+"]",pi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ya+"|"+pi+")",Eh="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",$l="(?:"+qa+"|"+Td+")",L1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Bu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=kh+"?",Fu="["+Cr+"]?",va="(?:"+Bs+"(?:"+[Eh,Ad,zs].join("|")+")"+Fu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Fu+Ld+va,Ph="(?:"+[Fl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[Eh+Ya+"?",Ya,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Th=RegExp(Ya,"g"),Bo=RegExp(pi+"(?="+pi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",L1+"+"+Bu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Bu,Hl,Md,Pd,Ph].join("|"),"g"),Od=RegExp("["+Bs+ja+Bl+Cr+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Id=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lh=-1,sn={};sn[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Dn]=sn[$e]=sn[pt]=sn[tt]=sn[Nt]=!0,sn[Fe]=sn[We]=sn[jt]=sn[qe]=sn[Ee]=sn[rt]=sn[Xe]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[kn]=sn[Je]=!1;var Wt={};Wt[Fe]=Wt[We]=Wt[jt]=Wt[Ee]=Wt[qe]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Dn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[kn]=Wt[mn]=Wt[$e]=Wt[pt]=Wt[tt]=Wt[Nt]=!0,Wt[Xe]=Wt[Et]=Wt[Je]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},M1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ke=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,ya=dn&&dn.isRegExp,Fs=dn&&dn.isSet,O1=dn&&dn.isTypedArray;function gi(ie,be,ve){switch(ve.length){case 0:return ie.call(be);case 1:return ie.call(be,ve[0]);case 2:return ie.call(be,ve[0],ve[1]);case 3:return ie.call(be,ve[0],ve[1],ve[2])}return ie.apply(be,ve)}function I1(ie,be,ve,Ge){for(var _t=-1,Qt=ie==null?0:ie.length;++_t-1}function Oh(ie,be,ve){for(var Ge=-1,_t=ie==null?0:ie.length;++Ge<_t;)if(ve(be,ie[Ge]))return!0;return!1}function Bn(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length,_t=Array(Ge);++ve-1;);return ve}function Ka(ie,be){for(var ve=ie.length;ve--&&Uu(be,ie[ve],0)>-1;);return ve}function N1(ie,be){for(var ve=ie.length,Ge=0;ve--;)ie[ve]===be&&++Ge;return Ge}var g2=zd(Mh),Xa=zd(M1);function Hs(ie){return"\\"+te[ie]}function Rh(ie,be){return ie==null?n:ie[be]}function Vl(ie){return Od.test(ie)}function Nh(ie){return Ah.test(ie)}function m2(ie){for(var be,ve=[];!(be=ie.next()).done;)ve.push(be.value);return ve}function Dh(ie){var be=-1,ve=Array(ie.size);return ie.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function zh(ie,be){return function(ve){return ie(be(ve))}}function Ho(ie,be){for(var ve=-1,Ge=ie.length,_t=0,Qt=[];++ve-1}function N2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=I2,Wo.prototype.delete=R2,Wo.prototype.get=X1,Wo.prototype.has=Z1,Wo.prototype.set=N2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ri(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=GV(c),!ee)return xi(c,Y)}else{var Le=ai(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,ee);if(Le==lt||Le==Fe||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?gg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ri(St,g,b,St,c,F))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ri(St,g,b,Gt,c,F))});var yt=Ce?ce?ge:qo:ce?bo:si,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ri(St,g,b,Gt,c,F))}),Y}function Gh(c){var g=si(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function tg(c,g,b){if(typeof c!="function")throw new mi(a);return bg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=Bn(g,_r(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=ju,Y=!1,g=new wa(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(ee)?g>1?Er(ee,g-1,b,L,D):Sa(D,ee):L||(D[D.length]=ee)}return D}var qh=Js(),go=Js(!0);function Yo(c,g){return c&&qh(c,g,si)}function mo(c,g){return c&&go(c,g,si)}function Kh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&en.call(c,g)}function Qh(c,g){return c!=null&&g in ln(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new wa(Y&&_e):n}_e=c[0];var Le=-1,Ue=ee[0];e:for(;++Le-1;)ee!==c&&Gd.call(ee,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Zl(D)?Gd.call(c,D,1):up(c,D)}}return c}function tf(c,g){return c+Gl(U1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,F=mr(qd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Pb(Pk(c,g,xo),c+"")}function ip(c){return sc(mp(c))}function nf(c,g){var b=mp(c);return V2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:V(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new wa}else ce=g?[]:ee;e:for(;++L=L?c:Tr(c,g,b)}var dg=x2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function fg(c){var g=new c.constructor(c.byteLength);return new vi(g).set(new vi(c)),g}function Xl(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function F2(c){var g=new c.constructor(c.source,Ga.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function $2(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function hg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function H2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Le=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=ln(g);++L-1?D[F?g[Y]:Y]:n}}function vg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new mi(a);if(D&&!Y&&ye(F)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,dt=b&w?new wa:n;for(F.set(c,g),F.set(g,c);++Le1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(y1,`{ +/* [wrapped with `+g+`] */ +`)}function qV(c){return Rt(c)||df(c)||!!(W1&&c&&c[W1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&P1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function V2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Fk(c,b)});function $k(c){var g=B(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function U2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:U2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){var L=Ik(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:U2,args:[Tb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Tb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=Rt(c)?zn:ng;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var vG=mg(Rk),yG=mg(Nk);function SG(c,g){return Er(G2(c,g),1)}function bG(c,g){return Er(G2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(G2(c,g),b)}function Hk(c,g){var b=Rt(c)?Vn:Ja;return b(c,Te(g,3))}function Wk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var wG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),X2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return Ja(c,function(Y){F[++L]=D?gi(g,Y,b):es(Y,g,b)}),F}),kG=dp(function(c,g,b){Uo(c,b,g)});function G2(c,g){var b=Rt(c)?Bn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),Si(c,g,b))}var PG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=Rt(c)?Rd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Ja)}function AG(c,g,b){var L=Rt(c)?d2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function LG(c,g){var b=Rt(c)?ho:jo;return b(c,q2(Te(g,3)))}function MG(c){var g=Rt(c)?sc:ip;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ni:nf;return L(c,g)}function IG(c){var g=Rt(c)?Sb:oi;return g(c)}function RG(c){if(c==null)return 0;if(So(c))return X2(c)?ba(c):c.length;var g=ai(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=Rt(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),Si(c,Er(g,1),[])}),j2=w2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Lb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Lb));L|=I}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=I}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new mi(a);g=ka(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,F=Le?mr(ka(b.maxWait)||0,g):F,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var os=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,os),Y}function yt(Lr){return Ce=Lr,ee=bg(Gt,g),_e?dt(Lr):Y}function $t(Lr){var os=Lr-ce,eu=Lr-Ce,hE=g-os;return Le?qr(hE,F-eu):hE}function St(Lr){var os=Lr-ce,eu=Lr-Ce;return ce===n||os>=g||os<0||Le&&eu>=F}function Gt(){var Lr=j2();if(St(Lr))return Jt(Lr);ee=bg(Gt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&dg(ee),Ce=0,L=ce=D=ee=n}function Zi(){return ee===n?Y:Jt(j2())}function Zo(){var Lr=j2(),os=St(Lr);if(L=arguments,D=this,ce=Lr,os){if(ee===n)return yt(ce);if(Le)return dg(ee),ee=bg(Gt,g),dt(ce)}return ee===n&&(ee=bg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var BG=Ct(function(c,g){return tg(c,1,g)}),FG=Ct(function(c,g,b){return tg(c,ka(g)||0,b)});function $G(c){return he(c,$)}function Y2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new mi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(Y2.Cache||Vo),b}Y2.Cache=Vo;function q2(c){if(typeof c!="function")throw new mi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function HG(c){return Uk(2,c)}var WG=wb(function(c,g){g=g.length==1&&Rt(g[0])?Bn(g[0],_r(Te())):Bn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,F=qr(L.length,b);++D=g}),df=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,rj=jr?_r(jr):ig;function So(c){return c!=null&&K2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&ii(c)==qe}var yc=C2||Wb,oj=co?_r(co):og;function aj(c){return br(c)&&c.nodeType===1&&!xg(c)}function sj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||gp(c)||df(c)))return!c.length;var g=ai(c);if(g==Ae||g==Kt)return!c.size;if(Sg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Ob(c){if(!br(c))return!1;var g=ii(c);return g==Xe||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!xg(c)}function cj(c){return typeof c=="number"&&$h(c)}function Ql(c){if(!sr(c))return!1;var g=ii(c);return g==Et||g==bt||g==ht||g==_n}function Xk(c){return typeof c=="number"&&c==Dt(c)}function K2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Ui?_r(Ui):xb;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return np(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&ii(c)==it}function xg(c){if(!br(c)||ii(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ti}var Ib=ya?_r(ya):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Fs?_r(Fs):Bt;function X2(c){return typeof c=="string"||!Rt(c)&&br(c)&&ii(c)==kn}function Ko(c){return typeof c=="symbol"||br(c)&&ii(c)==mn}var gp=O1?_r(O1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&ai(c)==Je}function bj(c){return br(c)&&ii(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return X2(c)?Ni(c):xi(c);if(Ju&&c[Ju])return m2(c[Ju]());var g=ai(c),b=g==Ae?Dh:g==Kt?Hd:mp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=ka(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function ka(c){if(typeof c=="number")return c;if(Ko(c))return j;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=_1.test(c);return b||E1.test(c)?Ke(c.slice(2),b?2:8):C1.test(c)?j:+c}function nE(c){return Ca(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(Sg(g)||So(g)){Ca(g,si(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){Ca(g,bo(g),c)}),Z2=Ki(function(c,g,b,L){Ca(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){Ca(g,si(g),c,L)}),Ej=er(Uh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b1),F}),Ca(c,ge(c),b),L&&(b=ri(b,p|m|v,At));for(var D=g.length;D--;)up(b,g[D]);return b});function jj(c,g){return oE(c,q2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:lg(c,g)});function oE(c,g){if(c==null)return{};var b=Bn(ge(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=U1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Db(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(T1,g2).replace(Th,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&ma.test(c)?c.replace(Ms,Xa):c}function lY(c){return c=Sn(c),c&&v1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=hp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;return g&&L>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Ib(g))&&(g=qi(g),!g&&Vl(c))?ns(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Db(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=B.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=Z2({},g,L,Re);var D=Z2({},g.imports,L.imports,Re),F=si(D),Y=$d(D,F),ee,ce,Ce=0,_e=g.interpolate||Is,Le="__p += '",Ue=Vd((g.escape||Is).source+"|"+_e.source+"|"+(_e===Iu?w1:Is).source+"|"+(g.evaluate||Is).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` +`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(A1,Hs),Gt&&(ee=!0,Le+=`' + +__e(`+Gt+`) + +'`),Zi&&(ce=!0,Le+=`'; +`+Zi+`; +__p += '`),Jt&&(Le+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),Ce=Zo+St.length,St}),Le+=`'; +`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) { +`+Le+` +} +`;else if(b1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { +`+(yt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Le+`return __p +}`;var $t=dE(function(){return Qt(F,dt+"return "+Le).apply(n,Y)});if($t.source=Le,Ob($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Ka(L,D)+1;return ns(L,F,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,z1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ka(L,Ni(g))+1;return ns(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Ru,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return ns(L,D).join("")}function TY(c,g){var b=W,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var F=c.length;if(Vl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-ba(L);if(ee<1)return L;var ce=Y?ns(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Ib(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(Ga.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?ee:Le)}}else if(c.indexOf(qi(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&g1.test(c)?c.replace(hi,S2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Db=hp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Nh(c)?Wd(c):R1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return gi(c,n,g)}catch(b){return Ob(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Lb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?Bn(c,function(L){if(typeof L[1]!="function")throw new mi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++DG)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Fd(L,g);++b0||g<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Ut,Ce=ee[0],_e=ce||Rt(Y),Le=function(Gt){var Jt=D.apply(B,Sa([Gt],ee));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,yt=F&&!Ue,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,ee);return St.__actions__.push({func:U2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,ee):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";en.call(Za,L)||(Za[L]=[]),Za[L].push({name:g,func:b})}}),Za[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=yi,Ut.prototype.value=T2,B.prototype.at=aG,B.prototype.chain=sG,B.prototype.commit=lG,B.prototype.next=uG,B.prototype.plant=dG,B.prototype.reverse=fG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=hG,B.prototype.first=B.prototype.head,Ju&&(B.prototype[Ju]=cG),B},xa=po();Vt?((Vt.exports=xa)._=xa,Tt._=xa):vt._=xa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,h$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&h$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},p$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?h$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),g$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),$S=De((e,t)=>{var n=g$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=$S(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),tye=De((e,t)=>{var n=$S();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=$S();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=$S();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),HS=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=HS();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),m$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Pu=De((e,t)=>{var n=m$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),C_=De((e,t)=>{var n=Pu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=C_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),WS=De((e,t)=>{var n=C_(),r=lye(),i=uye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),v$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),y$=De((e,t)=>{var n=WS(),r=v$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),cye=De((e,t)=>{var n=Pu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),S$=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),fye=De((e,t)=>{var n=y$(),r=dye(),i=v$(),o=S$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),__=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Map");t.exports=i}),VS=De((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=VS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=VS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),vye=De((e,t)=>{var n=VS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),yye=De((e,t)=>{var n=VS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Sye(),r=HS(),i=__();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),US=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=US();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=US();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=US();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=US();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),b$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=HS(),r=__(),i=b$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=HS(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=b$(),r=Tye(),i=Aye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),x$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Pu(),r=n.Uint8Array;t.exports=r}),Rye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=C_(),r=Iye(),i=g$(),o=x$(),a=Rye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,q,de,H,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!H(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var re=a;case E:var oe=q&l;if(re||(re=s),z.size!=$.size&&!oe)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(re(z),re($),q,de,H,J);return J.delete(z),G;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),zye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),Bye=De((e,t)=>{var n=zye(),r=k_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Fye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Fye(),r=$ye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=WS(),r=GS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=GS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),w$=De((e,t)=>{var n=Pu(),r=Gye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),jye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=WS(),r=C$(),i=GS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",q="[object Uint16Array]",de="[object Uint32Array]",H={};H[M]=H[I]=H[R]=H[N]=H[z]=H[$]=H[W]=H[q]=H[de]=!0,H[o]=H[a]=H[k]=H[s]=H[T]=H[l]=H[u]=H[h]=H[p]=H[m]=H[v]=H[S]=H[w]=H[E]=H[P]=!1;function J(re){return i(re)&&r(re.length)&&!!H[n(re)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=m$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),_$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=k_(),o=w$(),a=jye(),s=_$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),t3e=De((e,t)=>{var n=y$(),r=C$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Bye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=u1(),r=Pu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=__(),i=a3e(),o=s3e(),a=l3e(),s=WS(),l=S$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return p;case k:return m;case T:return v}return R}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=x$(),i=Dye(),o=i3e(),a=u3e(),s=k_(),l=w$(),u=_$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,I,R){var N=s(P),z=s(k),$=N?m:a(P),W=z?m:a(k);$=$==p?v:$,W=W==p?v:W;var q=$==v,de=W==v,H=$==W;if(H&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(H&&!q)return R||(R=new n),N||u(P)?r(P,k,T,M,I,R):i(P,k,$,T,M,I,R);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(J||re){var oe=J?P.value():P,X=re?k.value():k;return R||(R=new n),I(oe,X,T,M,R)}}return H?(R||(R=new n),o(P,k,T,M,I,R)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=GS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),k$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function uw(e,t=","){return typeof e=="string"?e.split(t):e}function Bm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return E$(e,["input","textarea","select"])}function E$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function v3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var y3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=p$(k$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!E$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||uw(e,u?.splitKey).forEach(E=>{let P=Bm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.addHotkey(Bm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.removeHotkey(Bm(w,u?.combinationKey)))}},[e,l,u,h]),i}p$(k$());var HC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>HC.add(Bm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Bm(t);for(let r of HC)r.keys?.every(i=>n.keys?.includes(i))&&HC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const T3e=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),A3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),L3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),M3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),O3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var to=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(to||{});const I3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(fd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(a_,{className:"invokeai__switch-root",...s})]})})};function E_(){const e=ke(i=>i.system.isGFPGANAvailable),t=ke(i=>i.options.shouldRunFacetool),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(G_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(Oi,{...k,children:ne(fd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(X8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Z8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(J8,{...P,className:"invokeai__number-input-stepper-button"}),x(Q8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},vd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:ne(fd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(mF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})]})})},R3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],D3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],z3e=[{key:"2x",value:2},{key:"4x",value:4}],P_=0,T_=4294967295,B3e=["gfpgan","codeformer"],F3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),jS=()=>{const e=Ye(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=ke($3e),{isGFPGANAvailable:i}=ke(H3e),o=l=>e(j3(l)),a=l=>e(sV(l)),s=l=>e(Y3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(vd,{label:"Type",validValues:B3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Ye(),t=ke(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var P$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(P$),Xc=globalThis&&globalThis.__assign||function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function n2(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:H,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:re,sliderTooltipProps:oe,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>H?.max?H.max:a,[a,H?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Fe=>{const We=st.clamp(S?Math.floor(Number(Fe.target.value)):Number(Fe.target.value),o,Z);j(String(We)),l(We)},Se=Fe=>{j(Fe),l(Number(Fe))},xe=()=>{!T||T()};return ne(fd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),ne(Gz,{w:"100%",gap:2,children:[ne(o_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Nn,{children:[x(MC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(MC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(PF,{className:"invokeai__slider_track",...q,children:x(TF,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...oe,children:x(EF,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(X8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:R,...H,children:[x(Z8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),ne(uF,{...re,children:[x(J8,{className:"invokeai__slider-number-stepper"}),x(Q8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(A_,{}),onClick:xe,isDisabled:M,...X})]})]})}function A$(e){const{label:t="Strength",styleClass:n}=e,r=ke(s=>s.options.img2imgStrength),i=Ye();return x(n2,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(m9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(m9(.5))}})}const L$=()=>x(hd,{flex:"1",textAlign:"left",children:"Other Options"}),Q3e=()=>{const e=Ye(),t=ke(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},J3e=()=>{const e=Ye(),t=ke(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},M$=()=>ne(nn,{gap:2,direction:"column",children:[x(J3e,{}),x(Q3e,{})]}),L_=()=>x(hd,{flex:"1",textAlign:"left",children:"Seed"});function e4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Y_e(r.target.checked))})}function t4e(){const e=ke(o=>o.options.seed),t=ke(o=>o.options.shouldRandomizeSeed),n=ke(o=>o.options.shouldGenerateVariations),r=Ye(),i=o=>r(l2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:P_,max:T_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const O$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function n4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(Da,{size:"sm",isDisabled:t,onClick:()=>e(l2(O$(P_,T_))),children:x("p",{children:"Shuffle"})})}function r4e(){const e=Ye(),t=ke(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e($_e(r)),value:t,isInteger:!1})}function i4e(){const e=Ye(),t=ke(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(H_e(r)),value:t,isInteger:!1})}const M_=()=>ne(nn,{gap:2,direction:"column",children:[x(e4e,{}),ne(nn,{gap:2,children:[x(t4e,{}),x(n4e,{})]}),x(nn,{gap:2,children:x(r4e,{})}),x(nn,{gap:2,children:x(i4e,{})})]});function O_(){const e=ke(i=>i.system.isESRGANAvailable),t=ke(i=>i.options.shouldRunESRGAN),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(j_e(i.target.checked))})]})}const o4e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),a4e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),YS=()=>{const e=Ye(),{upscalingLevel:t,upscalingStrength:n}=ke(o4e),{isESRGANAvailable:r}=ke(a4e);return ne("div",{className:"upscale-options",children:[x(vd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(v9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(y9(a)),value:n,isInteger:!1})]})};function s4e(){const e=ke(r=>r.options.shouldGenerateVariations),t=Ye();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(W_e(r.target.checked))})}function I_(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(s4e,{})]})}function l4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(fd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(w8,{...s,className:"input-entry",size:"sm",width:o})]})}function u4e(){const e=ke(i=>i.options.seedWeights),t=ke(i=>i.options.shouldGenerateVariations),n=Ye(),r=i=>n(cV(i.target.value));return x(l4e,{label:"Seed Weights",value:e,isInvalid:t&&!(w_(e)||e===""),isDisabled:!t,onChange:r})}function c4e(){const e=ke(i=>i.options.variationAmount),t=ke(i=>i.options.shouldGenerateVariations),n=Ye();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(V_e(i)),isInteger:!1})}const R_=()=>ne(nn,{gap:2,direction:"column",children:[x(c4e,{}),x(u4e,{})]}),ta=e=>{const{label:t,styleClass:n,...r}=e;return x(Pz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function N_(){const e=ke(r=>r.options.showAdvancedOptions),t=Ye();return x(ta,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(q_e(r.target.checked)),isChecked:e})}function d4e(){const e=Ye(),t=ke(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ct(e=>e.options,e=>db[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),f4e=ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h4e(){const e=ke(i=>i.options.height),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const p4e=ct([e=>e.options,f4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function g4e(){const e=Ye(),{iterations:t,mayGenerateMultipleImages:n}=ke(p4e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(F_e(i)),value:t,width:D_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function m4e(){const e=ke(r=>r.options.sampler),t=Ye();return x(vd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:R3e,styleClass:"main-option-block"})}function v4e(){const e=Ye(),t=ke(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center"})}function y4e(){const e=ke(i=>i.options.width),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const D_="auto";function z_(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(g4e,{}),x(v4e,{}),x(d4e,{})]}),ne("div",{className:"main-options-row",children:[x(y4e,{}),x(h4e,{}),x(m4e,{})]})]})})}const S4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},I$=TS({name:"system",initialState:S4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:b4e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:cw,setIsConnected:BL,setSocketId:$Pe,setShouldConfirmOnDelete:R$,setOpenAccordions:x4e,setSystemStatus:w4e,setCurrentStatus:W3,setSystemConfig:C4e,setShouldDisplayGuides:_4e,processingCanceled:k4e,errorOccurred:FL,errorSeen:N$,setModelList:$L,setIsCancelable:Xp,modelChangeRequested:E4e,setSaveIntermediatesInterval:P4e,setEnableImageDebugging:T4e,generationRequested:A4e,addToast:By,clearToastQueue:L4e,setProcessingIndeterminateTask:M4e}=I$.actions,O4e=I$.reducer;function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function D$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const z4e=ct(e=>e.system,e=>e.shouldDisplayGuides),B4e=({children:e,feature:t})=>{const n=ke(z4e),{text:r}=I3e[t];return n?ne(e_,{trigger:"hover",children:[x(r_,{children:x(hd,{children:e})}),ne(n_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(t_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},F4e=Pe(({feature:e,icon:t=I4e},n)=>x(B4e,{feature:e,children:x(hd,{ref:n,children:x(ga,{as:t})})}));function $4e(e){const{header:t,feature:n,options:r}=e;return ne(Df,{className:"advanced-settings-item",children:[x("h2",{children:ne(Rf,{className:"advanced-settings-header",children:[t,x(F4e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=ke(a=>a.system.openAccordions),r=Ye();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(x4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x($4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function V4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function U4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function G4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function j4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function Y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function F_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function F$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function $_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function $$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function X4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function Z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function Q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function J4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function e5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function t5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function n5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function r5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function i5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function o5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function a5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function s5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function l5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function u5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function c5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function d5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function f5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function h5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function p5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function g5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function m5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function H_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function v5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function W_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const S5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",b5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",x5e=e=>e.kind==="line",wn=e=>e.canvas,yd=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(i5),W$=ct([e=>e.options,e=>e.system,H$,Rr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(w_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),WC=Li("socketio/generateImage"),w5e=Li("socketio/runESRGAN"),C5e=Li("socketio/runFacetool"),_5e=Li("socketio/deleteImage"),VC=Li("socketio/requestImages"),WL=Li("socketio/requestNewImages"),k5e=Li("socketio/cancelProcessing"),E5e=Li("socketio/requestSystemConfig"),V$=Li("socketio/requestModelChange"),fl=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x(Da,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),pu=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(e_,{...o,children:[x(r_,{children:t}),ne(n_,{className:`invokeai__popover-content ${r}`,children:[i&&x(t_,{className:"invokeai__popover-arrow"}),n]})]})};function U$(e){const{iconButton:t=!1,...n}=e,r=Ye(),{isReady:i,reasonsWhyNotReady:o}=ke(W$),a=ke(Rr),s=()=>{r(WC(a))};mt(["ctrl+enter","meta+enter"],()=>{i&&r(WC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(l5e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(fl,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(pu,{trigger:"hover",triggerComponent:l,children:o&&x(Hz,{children:o.map((u,h)=>x(Wz,{children:u},h))})})}const P5e=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Ye(),{isProcessing:r,isConnected:i,isCancelable:o}=ke(P5e),a=()=>n(k5e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(D4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const T5e=ct(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Ye(),t=ke(T5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(c5e,{}),onClick:()=>{e(tke(!t))}})},G_=()=>ne("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),A5e=ct([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Ye(),{prompt:t,activeTabName:n}=ke(A5e),{isReady:r}=ke(W$),i=C.exports.useRef(null),o=s=>{e(fb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(WC(n)))};return x("div",{className:"prompt-bar",children:x(fd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(DF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function q$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function L5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function M5e(e,t){e.classList?e.classList.add(t):L5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function O5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},K$=le.createContext(null);var X$=function(t){return t.scrollTop},om="unmounted",bf="exited",xf="entering",Rp="entered",UC="exiting",Tu=function(e){z8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=om:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===om?{status:bf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=UC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:om})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[gy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:gy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:UC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===om)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=R8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function Ep(){}Tu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Tu.UNMOUNTED=om;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=UC;const I5e=Tu;var R5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M5e(t,r)})},dw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return O5e(t,r)})},Y_=function(e){z8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Fc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),N5e=e=>({width:Fc(e.width,64),height:Fc(e.height,64)}),D5e=.999,z5e=.1,B5e=20,Bg=.95,am={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:am,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},Q$=TS({name:"canvas",initialState:F5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!U_(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gs(st.clamp(n.width,64,512),64),height:gs(st.clamp(n.height,64,512),64)},o={x:Fc(n.width/2-i.width/2,64),y:Fc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...am,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Bg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gs(st.clamp(i,64,n/e.stageScale),64),s=gs(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=N5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},setClearBrushHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.layerState.stagingArea={...am.stagingArea},e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(x5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=am,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(i5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Bg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(i5)){const i=Pp(r.width,r.height,512,512,Bg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Bg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Bg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...am.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gs(st.clamp(o,64,512),64),height:gs(st.clamp(a,64,512),64)},l={x:Fc(o/2-s.width/2,64),y:Fc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:$5e,addLine:J$,addPointToCurrentLine:eH,clearMask:H5e,commitStagingAreaImage:W5e,discardStagedImages:V5e,fitBoundingBoxToStage:HPe,nextStagingAreaImage:U5e,prevStagingAreaImage:G5e,redo:j5e,resetCanvas:Y5e,resetCanvasInteractionState:q5e,resetCanvasView:K5e,resizeAndScaleCanvas:tH,resizeCanvas:X5e,setBoundingBoxCoordinates:fw,setBoundingBoxDimensions:sm,setBoundingBoxPreviewFill:WPe,setBrushColor:Z5e,setBrushSize:hw,setCanvasContainerDimensions:Q5e,setClearBrushHistory:J5e,setCursorPosition:nH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:qS,setIsMaskEnabled:eSe,setIsMouseOverBoundingBox:Fy,setIsMoveBoundingBoxKeyHeld:VPe,setIsMoveStageKeyHeld:UPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:pw,setLayer:qL,setMaskColor:tSe,setMergedCanvas:nSe,setShouldAutoSave:rSe,setShouldDarkenOutsideBoundingBox:rH,setShouldLockBoundingBox:iSe,setShouldPreserveMaskedArea:oSe,setShouldShowBoundingBox:iH,setShouldShowBrush:GPe,setShouldShowBrushPreview:jPe,setShouldShowCanvasDebugInfo:aSe,setShouldShowCheckboardTransparency:YPe,setShouldShowGrid:sSe,setShouldShowIntermediates:lSe,setShouldShowStagingImage:uSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:cSe,setShouldUseInpaintReplace:dSe,setStageCoordinates:oH,setStageDimensions:qPe,setStageScale:fSe,setTool:Zp,toggleShouldLockBoundingBox:KPe,toggleTool:XPe,undo:hSe}=Q$.actions,pSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,gSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K_=e=>{const t=Ye(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=ke(gSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(A0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(A0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J_e(a.current?a.current.scrollTop:0)),t(A0(!1)),t(eke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Q_e(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(Z$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,children:x("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function mSe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),vSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},ySe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),GC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=U4(),a=Ye(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ke(ySe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(_5e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return ne(Nn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(I1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Pv,{children:ne(R1e,{children:[x(q8,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(q4,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(fd,{children:ne(nn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(a_,{checked:!s,onChange:v})]})})]})}),ne(Y8,{children:[x(Da,{ref:h,onClick:o,children:"Cancel"}),x(Da,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),SSe=ct([e=>e.system,e=>e.options,e=>e.gallery,Rr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sH=()=>{const e=Ye(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=ke(SSe),m=hh(),v=()=>{!u||(h&&e(ad(!1)),e(u2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};mt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(U_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(l2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(fb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(w5e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(C5e(u))};mt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(dV(!l)),I=()=>{!u||(h&&e(ad(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ne("div",{className:"current-image-options",children:[x(Ia,{isAttached:!0,children:x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(p5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(fl,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(fl,{size:"sm",onClick:I,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(fl,{size:"sm",onClick:S,leftIcon:x($_,{}),children:"Copy Link to Image"}),x(fl,{leftIcon:x($$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(Ia,{isAttached:!0,children:[x(gt,{icon:x(u5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(h5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(Y4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(Ia,{isAttached:!0,children:[x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(e5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(jS,{}),x(fl,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(Z4e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(YS,{}),x(fl,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(GC,{image:u,children:x(gt,{icon:x(H_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},bSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},lH=TS({name:"gallery",initialState:bSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Qp,clearIntermediateImage:gw,removeImage:uH,setCurrentImage:xSe,addGalleryImages:wSe,setIntermediateImage:CSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:_Se,setShouldShowGallery:k0,setGalleryScrollPosition:kSe,setGalleryImageMinimumWidth:Ap,setGalleryImageObjectFit:ESe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:PSe,setCurrentCategory:$y,setGalleryWidth:Fg}=lH.actions,TSe=lH.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var dH=ut({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:ne(Nn,{children:[x("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function ASe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ne(nn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(ASe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),LSe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Ye();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:I}=r,R=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ne(nn,{gap:1,direction:"column",width:"100%",children:[ne(nn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ne(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Nn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(j3(E))}),i==="esrgan"&&I!==void 0&&x(qn,{label:"Upscaling scale",value:I,onClick:()=>n(v9(I))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(y9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:H3(s),onClick:()=>n(fb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(l2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:r5(u),onClick:()=>n(cV(r5(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(u2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(m9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&ne(Nn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(v9($))}),x(qn,{label:"Strength",value:W,onClick:()=>n(y9(W))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("codeformer"))}}),W&&x(qn,{label:"Fidelity",value:W,onClick:()=>{n(sV(W)),n(Y3("codeformer"))}})]},z)}})]}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x($_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(Bz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},LSe),hH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function MSe(){const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(ad(!0))};return ne("div",{className:"current-image-preview",children:[i&&x(mS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const OSe=ct([e=>e.gallery,e=>e.options,Rr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ke(OSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Nn,{children:[x(sH,{}),x(MSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(N4e,{})})})},ISe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=ke(i=>i.options.initialImage),t=Ye(),n=hh(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return ne(Nn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(ISe,{})]}),e&&x("div",{className:"init-image-preview",children:x(mS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const NSe=()=>{const e=ke(r=>r.options.initialImage),{currentImage:t}=ke(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(RSe,{})}):x(vSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function DSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var zSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},USe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],eM="__resizable_base__",gH=function(e){$Se(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(eM):o.className+=eM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||HSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return mw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?mw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?mw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Lp("left",o),s=i&&Lp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),I=Math.min(p,P),R=Math.max(m,k),N=Math.min(v,T);n=Wy(n,M,I),r=Wy(r,R,N)}else n=Wy(n,h,p),r=Wy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&WSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Vy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Vy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Vy(n)?n.touches[0].clientX:n.clientX,h=Vy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=VSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=QL(M,this.props.grid[0]),z=QL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var H=M/this.window.innerHeight*100;M=H+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var H=T/this.window.innerHeight*100;T=H+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Ol.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(FSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return USe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ne(o,{...ul({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function r2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,GSe(i,...t)]}function GSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function jSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>jSe(n,t))}function Wa(...e){return C.exports.useCallback(mH(...e),e)}const Lv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(qSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});Lv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...KSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const YSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function qSe(e){return C.exports.isValidElement(e)&&e.type===YSe}function KSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const XSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=XSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Lv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=r2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Wa(S,P.collectionRef);return le.createElement(Lv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Wa(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Lv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>P.indexOf(M.ref.current)-P.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const ZSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(ZSe);return e||t||"ltr"}function Al(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function QSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const YC="dismissableLayer.update",JSe="dismissableLayer.pointerDownOutside",ebe="dismissableLayer.focusOutside";let tM;const tbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(tbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Wa(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=k,R=rbe(z=>{const $=z.target,W=[...h.branches].some(q=>q.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=ibe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return QSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(YC,z),()=>document.removeEventListener(YC,z)},[]),C.exports.createElement(Cu.div,An({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function rbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){bH(JSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ibe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(ebe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nM(){const e=new CustomEvent(YC);document.dispatchEvent(e)}function bH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vH(i,o):i.dispatchEvent(o)}let vw=0;function obe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),vw++,()=>{vw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vw--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const yw="focusScope.autoFocusOnMount",Sw="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},abe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Al(i),h=Al(o),p=C.exports.useRef(null),m=Wa(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(yw,iM);s.addEventListener(yw,u),s.dispatchEvent(P),P.defaultPrevented||(sbe(fbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(yw,u),setTimeout(()=>{const P=new CustomEvent(Sw,iM);s.addEventListener(Sw,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(Sw,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=lbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function sbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function lbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oM(e,t){for(const n of e)if(!ube(n,{upTo:t}))return n}function ube(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cbe(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cbe(e)&&t&&e.select()}}const aM=dbe();function dbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},hbe=Rw["useId".toString()]||(()=>{});let pbe=0;function gbe(e){const[t,n]=C.exports.useState(hbe());return Y0(()=>{e||n(r=>r??String(pbe++))},[e]),e||(t?`radix-${t}`:"")}function c1(e){return e.split("-")[0]}function KS(e){return e.split("-")[1]}function d1(e){return["top","bottom"].includes(c1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=d1(t),l=J_(s),u=r[l]/2-i[l]/2,h=c1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(KS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const mbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=wH(r),h={x:i,y:o},p=d1(a),m=KS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=P/2-k/2,R=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+I,$=qC(R,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zbbe[t])}function xbe(e,t,n){n===void 0&&(n=!1);const r=KS(e),i=d1(e),o=J_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=l5(a)),{main:a,cross:l5(a)}}const wbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>wbe[t])}const Cbe=["top","right","bottom","left"];function _be(e){const t=l5(e);return[cM(e),t,cM(t)]}const kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=c1(r),P=p||(w===a||!v?[l5(a)]:_be(a)),k=[a,...P],T=await s5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=xbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var R,N;const $=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,W=k[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(H=>[H,H.overflows.filter(J=>J>0).reduce((J,re)=>J+re,0)]).sort((H,J)=>H[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return Cbe.some(t=>e[t]>=0)}const Ebe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await s5(r,{...n,elementContext:"reference"}),a=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Pbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=c1(n),s=KS(n),l=d1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Tbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Pbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Abe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=d1(c1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=qC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=qC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Lbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=d1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+E.mainAxis,N=o.reference[p]+o.reference[I]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(c1(i)),N=o.reference[m]-o.floating[I]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i2(e){return Au(e).getComputedStyle(e)}function _u(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function od(e){return e instanceof Au(e).Element}function Mbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function XS(e){const{overflow:t,overflowX:n,overflowY:r}=i2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Obe(e){return["table","td","th"].includes(_u(e))}function EH(e){const t=/firefox/i.test(kH()),n=i2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Fm=Math.max,u5=Math.round;function ku(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=od(e)?Au(e):window,p=!PH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Mbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZS(e){return od(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return ku(Sd(e)).left+ZS(e).scrollLeft}function Ibe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=ku(e,r&&Ibe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||XS(i))&&(a=ZS(t)),Ll(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Nbe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(_u(t));){if(EH(t))return t;t=t.parentNode}return null}function KC(e){const t=Au(e);let n=pM(e);for(;n&&Obe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Nbe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Dbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((_u(n)!=="body"||XS(o))&&(a=ZS(n)),Ll(n))){const l=ku(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function zbe(e,t){const n=Au(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Bbe(e){var t;const n=Sd(e),r=ZS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Fm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Fm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return i2(i||n).direction==="rtl"&&(s+=Fm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ll(t)&&XS(t)?t:LH(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],XS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function $be(e,t){const n=ku(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mM(e,t,n){return t==="viewport"?a5(zbe(e,n)):od(t)?$be(t,n):a5(Bbe(Sd(e)))}function Hbe(e){const t=c5(e),r=["absolute","fixed"].includes(i2(e).position)&&Ll(e)?KC(e):e;return od(r)?t.filter(i=>od(i)&&Fbe(i,r)&&_u(i)!=="body"):[]}function Wbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Hbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Fm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Fm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Vbe={getClippingRect:Wbe,convertOffsetParentRelativeRectToViewportRelativeRect:Dbe,isElement:od,getDimensions:gM,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,KC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>i2(e).direction==="rtl"};function Ube(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...od(e)?c5(e):[],...c5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),od(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?ku(e):null;s&&S();function S(){const w=ku(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Gbe=(e,t,n)=>mbe(e,t,{platform:Vbe,...n});var XC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jbe(e){const t=C.exports.useRef(e);return XC(()=>{t.current=e}),t}function Ybe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=jbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);ZC(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Gbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);XC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);XC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const qbe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function Kbe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const MH="Popper",[tk,OH]=r2(MH),[Xbe,IH]=tk(MH),Zbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Xbe,{scope:t,anchor:r,onAnchorChange:i},n)},Qbe="PopperAnchor",Jbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=IH(Qbe,n),a=C.exports.useRef(null),s=Wa(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,An({},i,{ref:s}))}),d5="PopperContent",[exe,ZPe]=tk(d5),[txe,nxe]=tk(d5,{hasParent:!1,positionUpdateFns:new Set}),rxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=IH(d5,h),[N,z]=C.exports.useState(null),$=Wa(t,Pt=>z(Pt)),[W,q]=C.exports.useState(null),de=Kbe(W),H=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,re=p+(v!=="center"?"-"+v:""),oe=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:oe,boundary:X.filter(oxe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Fe,middlewareData:We,update:ht}=Ybe({strategy:"fixed",placement:re,whileElementsMounted:Ube,middleware:[Tbe({mainAxis:m+J,alignmentAxis:S}),M?Abe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Lbe():void 0,...Q}):void 0,W?qbe({element:W,padding:w}):void 0,M?kbe({...Q}):void 0,axe({arrowWidth:H,arrowHeight:J}),T?Ebe({strategy:"referenceHidden"}):void 0].filter(ixe)});Y0(()=>{j(R.anchor)},[j,R.anchor]);const qe=Se!==null&&xe!==null,[rt,Ze]=RH(Fe),Xe=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();Y0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=nxe(d5,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(ht),()=>{lt.delete(ht)}},[xt,lt,ht]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,qe,lt]);const _n={"data-side":rt,"data-align":Ze,...I,ref:$,style:{...I.style,animation:qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(exe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Xe,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(txe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(Cu.div,_n)):C.exports.createElement(Cu.div,_n)))});function ixe(e){return e!==void 0}function oxe(e){return e!==null}const axe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=RH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function RH(e){const[t,n="center"]=e.split("-");return[t,n]}const sxe=Zbe,lxe=Jbe,uxe=rxe;function cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=dxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Wa(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function dxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Gy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Gy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Gy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Gy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Gy(e){return e?.animationName||"none"}function fxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=hxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function hxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const bw="rovingFocusGroup.onEntryFocus",pxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[QC,DH,gxe]=yH(nk),[mxe,zH]=r2(nk,[gxe]),[vxe,yxe]=mxe(nk),Sxe=C.exports.forwardRef((e,t)=>C.exports.createElement(QC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(QC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(bxe,An({},e,{ref:t}))))),bxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Wa(t,p),v=SH(o),[S=null,w]=fxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(bw,k),()=>N.removeEventListener(bw,k)},[k]),C.exports.createElement(vxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,An({tabIndex:E||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(bw,pxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),q=W.find(re=>re.active),de=W.find(re=>re.id===S),J=[q,de,...W].filter(Boolean).map(re=>re.ref.current);BH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),xxe="RovingFocusGroupItem",wxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=gbe(),s=yxe(xxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(QC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Exe(w,E+1):w.slice(E+1)}setTimeout(()=>BH(w))}})})))}),Cxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _xe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kxe(e,t,n){const r=_xe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Cxe[r]}function BH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Exe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Pxe=Sxe,Txe=wxe,Axe=["Enter"," "],Lxe=["ArrowDown","PageUp","Home"],FH=["ArrowUp","PageDown","End"],Mxe=[...Lxe,...FH],QS="Menu",[JC,Oxe,Ixe]=yH(QS),[ph,$H]=r2(QS,[Ixe,OH,zH]),rk=OH(),HH=zH(),[Rxe,JS]=ph(QS),[Nxe,ik]=ph(QS),Dxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(sxe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Nxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(lxe,An({},i,r,{ref:t}))}),Bxe="MenuPortal",[QPe,Fxe]=ph(Bxe,{forceMount:void 0}),Zc="MenuContent",[$xe,WH]=ph(Zc),Hxe=C.exports.forwardRef((e,t)=>{const n=Fxe(Zc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=JS(Zc,e.__scopeMenu),a=ik(Zc,e.__scopeMenu);return C.exports.createElement(JC.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(JC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Wxe,An({},i,{ref:t})):C.exports.createElement(Vxe,An({},i,{ref:t})))))}),Wxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu),r=C.exports.useRef(null),i=Wa(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Vxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=JS(Zc,n),E=ik(Zc,n),P=rk(n),k=HH(n),T=Oxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Wa(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),H=C.exports.useRef(0),J=v?oF:C.exports.Fragment,re=v?{as:Lv,allowPinchZoom:!0}:void 0,oe=G=>{var Q,j;const Z=$.current+G,me=T().filter(qe=>!qe.disabled),Se=document.activeElement,xe=(Q=me.find(qe=>qe.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Fe=me.map(qe=>qe.textValue),We=Qxe(Fe,Z,xe),ht=(j=me.find(qe=>qe.textValue===We))===null||j===void 0?void 0:j.ref.current;(function qe(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(Z),ht&&setTimeout(()=>ht.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),obe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&ewe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement($xe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=R.current)===null||Q===void 0||Q.focus(),I(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,re,C.exports.createElement(abe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=R.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(nbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Pxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(uxe,An({role:"menu","aria-orientation":"vertical","data-state":Kxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&oe(G.key));const Se=R.current;if(G.target!==Se||!Mxe.includes(G.key))return;G.preventDefault();const Fe=T().filter(We=>!We.disabled).map(We=>We.ref.current);FH.includes(G.key)&&Fe.reverse(),Xxe(Fe)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,t9(G=>{const Q=G.target,j=H.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>H.current?"right":"left";de.current=Z,H.current=G.clientX}}))})))))))}),e9="MenuItem",vM="menu.itemSelect",Uxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(e9,e.__scopeMenu),s=WH(e9,e.__scopeMenu),l=Wa(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Gxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Axe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Gxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(e9,n),s=HH(n),l=C.exports.useRef(null),u=Wa(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(JC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Txe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,t9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,t9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),jxe="MenuRadioGroup";ph(jxe,{value:void 0,onValueChange:()=>{}});const Yxe="MenuItemIndicator";ph(Yxe,{checked:!1});const qxe="MenuSub";ph(qxe);function Kxe(e){return e?"open":"closed"}function Xxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qxe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Zxe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Jxe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function ewe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jxe(n,t)}function t9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const twe=Dxe,nwe=zxe,rwe=Hxe,iwe=Uxe,UH="ContextMenu",[owe,JPe]=r2(UH,[$H]),eb=$H(),[awe,GH]=owe(UH),swe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=eb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(awe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(twe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},lwe="ContextMenuTrigger",uwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(lwe,n),o=eb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(nwe,An({},o,{virtualRef:s})),C.exports.createElement(Cu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,jy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,jy(u)),onPointerCancel:Yn(e.onPointerCancel,jy(u)),onPointerUp:Yn(e.onPointerUp,jy(u))})))}),cwe="ContextMenuContent",dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(cwe,n),o=eb(n),a=C.exports.useRef(!1);return C.exports.createElement(rwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),fwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eb(n);return C.exports.createElement(iwe,An({},i,r,{ref:t}))});function jy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const hwe=swe,pwe=uwe,gwe=dwe,pf=fwe,mwe=ct([e=>e.gallery,e=>e.options,yd,Rr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=ct([e=>e.options,e=>e.gallery,e=>e.system,Rr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),ywe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Swe=C.exports.memo(e=>{const t=Ye(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=ke(vwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=hh(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(fb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(l2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ad(!1)),t(u2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ad(!1)),t(q_(s)),t(tH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(K_e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(X_e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(hwe,{onOpenChange:$=>{t(cH($))},children:[x(pwe,{children:ne(hd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(xSe(s)),children:l&&x(ga,{width:"50%",height:"50%",as:F_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(GC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(m5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(gwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(GC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},ywe),bwe=320;function jH(){const e=Ye(),t=hh(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=ke(mwe),[k,T]=C.exports.useState(300),[M,I]=C.exports.useState(590),[R,N]=C.exports.useState(w>=bwe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Fg(400)),T(400),I(400);return}h==="unifiedCanvas"?(e(Fg(190)),T(190),I(190)):h==="img2img"?(e(Fg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Fg(Math.min(Math.max(Number(w),0),590))),I(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||I(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),W=C.exports.useRef(null),q=()=>{e(_Se(!o)),e(io(!0))},de=()=>{a?J():H()},H=()=>{e(k0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(k0(!1)),e(cH(!1)),e(kSe($.current?$.current.scrollTop:0))},[e]),re=()=>{e(VC(r))},oe=j=>{e(Ap(j)),e(io(!0))},X=()=>{m||(W.current=window.setTimeout(()=>J(),500))},G=()=>{W.current&&window.clearTimeout(W.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(k0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ne(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Fg(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=280&&!R?N(!0):xe<280&&R&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[ne("div",{className:"image-gallery-header",children:[x(Ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ne(Nn,{children:[x(Da,{"data-selected":r==="result",onClick:()=>e($y("result")),children:"Invocations"}),x(Da,{"data-selected":r==="user",onClick:()=>e($y("user")),children:"User"})]}):ne(Nn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(t5e,{}),onClick:()=>e($y("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(y5e,{}),onClick:()=>e($y("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(pu,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(n2,{value:l,onChange:oe,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Ap(64)),icon:x(A_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(ta,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(ESe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(ta,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(PSe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?ne(Nn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(Swe,{image:j,isSelected:i===Z},Z)})}),x(Da,{onClick:re,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(D$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const xwe=ct([e=>e.options,Rr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ok=e=>{const t=Ye(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=ke(xwe),l=()=>{t(Z_e(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,s&&x(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(DSe,{})})})]}),!a&&x(jH,{})]})})};function wwe(){return x(ok,{optionsPanel:x(mSe,{}),children:x(NSe,{})})}function Cwe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const _we=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function kwe(){return x(ok,{optionsPanel:x(Cwe,{}),children:x(_we,{})})}var n9=function(e,t){return n9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},n9(e,t)};function Ewe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Wwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Wwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Vwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Uwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ak=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Vwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Uwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function tb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=r9(e,s-p,u+p,r),S=r9(t,l-m,h+m,r);return{x:v,y:S}}var r9=function(e,t,n,r){return r?en?Ra(n,2):Ra(e,2):Ra(e,2)};function nb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=tb(p,m,i,o,0,0,null);return v}function o2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var SM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=rb(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Gwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},jwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Ywe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=nb(e,P,k,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:E?I:r}}}function qwe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=tb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var Kwe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},f5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},Xwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Zwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Qwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:r9(e,o,a,i)}function Jwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function e6e(e,t){var n=Xwe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=Jwe(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function t6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Zwe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=Qwe(e,l),$=Math.max(z,N),W=f5(e,M),q=f5(e,I),de=W*i.offsetWidth/100,H=q*i.offsetHeight/100,J=u+de,re=h-de,oe=p+H,X=m-H,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Fe=new Date().getTime()-Q,We=Fe/N,ht=YH[S.animationType],qe=1-ht(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Xe=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,re,J,qe),bt=xM(Xe,G.positionY,xe,P,v,m,p,X,oe,qe);(Se!==Ze||xe!==Xe)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),q0(e,n),t.touches?jwe(e,t):Gwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=Kwe(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);e6e(e,{x:u,y:h}),qwe(e,u,h,p,m)}}function n6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?t6e(e):XH(e)}}function XH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=o2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=nb(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Jp={previousScale:1,scale:1,positionX:0,positionY:0},r6e=El(El({},Jp),{setComponents:function(){},contextInstance:null}),$g={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Jp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Jp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Jp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Jp.positionY}},_M=function(e){var t=El({},$g);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof $g[n]<"u";if(i&&r){var o=Object.prototype.toString.call($g[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},$g[n]),e[n]):s?t[n]=yM(yM([],$g[n]),e[n]):t[n]=e[n]}}),t},JH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=o2(Ra(h,3),s,a,u,!1);return p};function eW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=tb(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||bd(e,v,t,n)}}function i6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Jp;var l=r.getBoundingClientRect(),u=o6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=o2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,I=ak(e,E),R=tb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function o6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function a6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},l6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},u6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};bd(e,v,i,o)}}},c6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},d6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=nW(t||i.scale,o,a);bd(e,s,n,r)}}},f6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&a6e(a)&&a&&o.contains(a)){var s=i6e(e,a,n);bd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:s6e(e),zoomOut:l6e(e),setTransform:u6e(e),resetTransform:c6e(e),centerView:d6e(e),zoomToElement:f6e(e)}},xw=!1;function ww(){try{var e={get passive(){return xw=!0,!1}};return e}catch{return xw=!1,xw}}var rb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},kM=function(e){e&&clearTimeout(e)},h6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},p6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=rb(u,a);return!p};function g6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Pwe(t,n);return r}function rW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var m6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=o2(Ra(v,3),u,l,p,S);return w},v6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},y6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=rb(a,i);return!l},S6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},b6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},x6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return o2(Ra(p,2),a,o,l,!u)},w6e=160,C6e=100,_6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),li(Fr(e),t,r),li(Fr(e),t,i))},k6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=g6e(t,null),P=m6e(e,E,w,!t.ctrlKey);if(l!==P){var k=q0(e,P),T=rW(t,o,l),M=S||v===0||h,I=u&&M,R=nb(e,T.x,T.y,P,k,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),li(Fr(e),t,r),li(Fr(e),t,i)}},E6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},C6e);var o=v6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,li(Fr(e),t,r),li(Fr(e),t,i))},w6e))},P6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},T6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=b6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=x6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,E=a&&w,P=nb(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},A6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function L6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var M6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=rb(l,s);return!(p||!h)},oW=le.createContext(r6e),O6e=function(e){Ewe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=p6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(_6e(n,r),k6e(n,r),E6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),li(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),li(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(n6e(n),li(Fr(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=y6e(n,r);!l||(P6e(n,r),ml(n),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=S6e(n);!l||(r.preventDefault(),r.stopPropagation(),T6e(n,r),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(A6e(n),li(Fr(n),r,o),li(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),li(Fr(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),li(Fr(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=M6e(n,r);!o||L6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,li(Fr(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=nW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=h6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),I6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(O6e,{...El({},e,{setRef:i})})});function R6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var N6e=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(N6e);var D6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(oW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function z6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(I6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Nn,{children:[ne("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(X3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(Z3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(q3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(R4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(A_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(D6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function B6e(){const e=Ye(),t=ke(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(ad(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ad(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Nn,{children:[x(z6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=ct(wn,e=>e.shouldDarkenOutsideBoundingBox);function $6e(){const e=Ye(),t=ke(F6e);return x(ta,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(rH(!t))},styleClass:"inpainting-bounding-box-darken"})}const H6e=ct(wn,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function PM(e){const{dimension:t,label:n}=e,r=Ye(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=ke(H6e),s=o[t],l=a[t],u=p=>{t=="width"&&r(sm({...a,width:Math.floor(p)})),t=="height"&&r(sm({...a,height:Math.floor(p)}))},h=()=>{t=="width"&&r(sm({...a,width:Math.floor(s)})),t=="height"&&r(sm({...a,height:Math.floor(s)}))};return x(n2,{label:n,min:64,max:gs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const W6e=ct(wn,e=>e.shouldLockBoundingBox);function V6e(){const e=ke(W6e),t=Ye();return x(ta,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(iSe(!e))},styleClass:"inpainting-bounding-box-darken"})}const U6e=ct(wn,e=>e.shouldShowBoundingBox);function G6e(){const e=ke(U6e),t=Ye();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(K3e,{size:22}):x(j3e,{size:22}),onClick:()=>t(iH(!e)),background:"none",padding:0})}const j6e=()=>ne("div",{className:"inpainting-bounding-box-settings",children:[ne("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(G6e,{})]}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(PM,{dimension:"width",label:"Box W"}),x(PM,{dimension:"height",label:"Box H"}),ne(nn,{alignItems:"center",justifyContent:"space-between",children:[x($6e,{}),x(V6e,{})]})]})]}),Y6e=ct(wn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=ke(Y6e),n=Ye();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(n2,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(ks,{isChecked:t,onChange:r=>n(dSe(r.target.checked))})]})}const K6e=ct(wn,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function X6e(){const e=Ye(),t=hh(),{mayClearBrushHistory:n}=ke(K6e);return x(fl,{onClick:()=>{e(J5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function Z6e(){return ne(Nn,{children:[x(q6e,{}),x(j6e,{}),x(X6e,{})]})}function Q6e(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Z6e,{}),x(N_,{}),e&&x(B_,{accordionInfo:t})]})}const J6e=ct(wn,H$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),eCe=()=>{const e=Ye(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ke(J6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Q5e({width:a,height:s})),e(X5e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Kv,{thickness:"2px",speed:"1s",size:"xl"})})};var tCe=Math.PI/180;function nCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const E0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:E0,version:"8.3.13",isBrowser:nCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*tCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:E0.document,_injectGlobal(e){E0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ra{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ra(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var rCe="[object Array]",iCe="[object Number]",oCe="[object String]",aCe="[object Boolean]",sCe=Math.PI/180,lCe=180/Math.PI,Cw="#",uCe="",cCe="0",dCe="Konva warning: ",TM="Konva error: ",fCe="rgb(",_w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},hCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Yy=[];const pCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===rCe},_isNumber(e){return Object.prototype.toString.call(e)===iCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===oCe},_isBoolean(e){return Object.prototype.toString.call(e)===aCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Yy.push(e),Yy.length===1&&pCe(function(){const t=Yy;Yy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Cw,uCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=cCe+e;return Cw+e},getRGB(e){var t;return e in _w?(t=_w[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Cw?this._hexToRgb(e.substring(1)):e.substr(0,4)===fCe?(t=hCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_w[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function f1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function gCe(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function mCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Wg="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Hg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Wg+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Wg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Hg+a(t),l=Wg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Wg+n,i=Hg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Hg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Wg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function vCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=yCe+u.join(AM)+SCe)):(o+=s.property,t||(o+=_Ce+s.val)),o+=wCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=ECe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=LM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=vCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var V3="absoluteOpacity",Ky="allEventListeners",ou="absoluteTransform",MM="absoluteScale",Vg="canvas",LCe="Change",MCe="children",OCe="konva",i9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",U3=" ",DM="stage",kc="transform",ICe="Stage",o9="visible",RCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(U3);let NCe=1;class Be{constructor(t){this._id=NCe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ou)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ou,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(U3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Vg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Vg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new P0({pixelRatio:a,width:i,height:o}),v=new P0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Vg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(V3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Vg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Vg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==MCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==ICe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ou)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ra,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ou),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(V3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Mp=e=>{const t=dm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Ew.pointer;if(t==="touch")return Ew.touch;if(t==="mouse")return Ew.mouse};function BM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const WCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",G3=[];class ab extends la{constructor(t){super(BM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),G3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{BM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===zCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&G3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(WCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new P0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+zM,this.content.style.height=n+zM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r$Ce&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Mp(t.type),r=dm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=kw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Mp(t.type),r=dm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=kw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a9,{evt:t}):this._fire(a9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s9,{evt:t}):this._fire(s9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=kw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(e0,ck(t)),$m(t.pointerId)}_lostpointercapture(t){$m(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new P0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ab.prototype.nodeType=DCe;pr(ab);K.addGetterSetter(ab,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let e3;function Pw(){return e3||(e3=fe.createCanvasElement().getContext("2d"),e3)}const Hm={};function VCe(e){e.fill()}function UCe(e){e.stroke()}function GCe(e){e.fill()}function jCe(e){e.stroke()}function YCe(){this._clearCache(wW)}function qCe(){this._clearCache(CW)}function KCe(){this._clearCache(_W)}function XCe(){this._clearCache(kW)}function ZCe(){this._clearCache(EW)}class Me extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Hm)););this.colorKey=n,Hm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Pw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ra;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Pw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Hm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}}Me.prototype._fillFunc=VCe;Me.prototype._strokeFunc=UCe;Me.prototype._fillFuncHit=GCe;Me.prototype._strokeFuncHit=jCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",YCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",KCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",XCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",ZCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,f1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var QCe="#",JCe="beforeDraw",e9e="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],t9e=PW.length;class gh extends la{constructor(t){super(t),this.canvas=new P0,this.hitCanvas=new uk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(JCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),la.prototype.drawScene.call(this,i,n),this._fire(e9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),la.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);K.addGetterSetter(gh,"imageSmoothingEnabled",!0);K.addGetterSetter(gh,"clearBeforeDraw",!0);K.addGetterSetter(gh,"hitGraphEnabled",!0,As());class dk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class K0 extends la{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Tw=function(){return E0.performance&&E0.performance.now?function(){return E0.performance.now()}:function(){return new Date().getTime()}}();class Ma{constructor(t,n){this.id=Ma.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Tw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=FM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$M,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===FM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=r9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Wm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=i9e++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ma(function(){n.tween.onEnterFrame()},u),this.tween=new o9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)n9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Wm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function l9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function WM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Rn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Rn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,Rn.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,I=u,R,N,z,$,W,q,de,H,J,re;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var oe=S.shift(),X=S.shift();if(l+=oe,u+=X,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+oe,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break;case"a":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break}a.push({command:k||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Rn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,q){return(W[0]*q[0]+W[1]*q[1])/(T(W)*T(q))},I=function(W,q){return(W[0]*q[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];pr(Rn);K.addGetterSetter(Rn,"data");class mh extends Mu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Rn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);K.addGetterSetter(mh,"pointerLength",10,ze());K.addGetterSetter(mh,"pointerWidth",10,ze());K.addGetterSetter(mh,"pointerAtBeginning",!1);K.addGetterSetter(mh,"pointerAtEnding",!0);class h1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}h1.prototype._centroid=!0;h1.prototype.className="Circle";h1.prototype._attrsAffectingSize=["radius"];pr(h1);K.addGetterSetter(h1,"radius",0,ze());class wd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],a9e="Change.konva",s9e="none",u9="up",c9="right",d9="down",f9="left",l9e=TW.length;class fk extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);K.addGetterSetter(yh,"radius",0,ze());K.addGetterSetter(yh,"sides",0,ze());var VM=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,VM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),VM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);K.addGetterSetter(Sh,"innerRadius",0,ze());K.addGetterSetter(Sh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ma(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var n3;function Lw(){return n3||(n3=fe.createCanvasElement().getContext(d9e),n3)}function w9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function C9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(_9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(f9e,n),this}getWidth(){var t=this.attrs.width===Op||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Op||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Lw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+t3+this.fontVariant()+t3+(this.fontSize()+m9e)+x9e(this.fontFamily())}_addTextLine(t){this.align()===Ug&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Lw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Op&&o!==void 0,l=a!==Op&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==S9e&&S,E=this.ellipsis();this.textArr=[],Lw().font=this._getContextFont();for(var P=E?this._getTextWidth(Aw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",$=0;R>>1,q=M.slice(0,W+1),de=this._getTextWidth(q)+P;de<=h?(R=W+1,z=q,$=de):N=W}if(z){if(w){var H,J=M[z.length],re=J===t3||J===UM;re&&$<=h?H=z.length:H=Math.max(z.lastIndexOf(t3),z.lastIndexOf(UM))+1,H>0&&(R=H,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var oe=this._shouldHandleEllipsis(m);if(oe){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&kp)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Op&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==jM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Op&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Aw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,H=w+1;H0)return w=H,de[H];de[H].command==="M"&&(m={x:de[H].points[0],y:de[H].points[1]})}return{}},k=function(de){var H=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(H+=(s-a)/p);var J=0,re=0;for(v=void 0;Math.abs(H-J)/H>.01&&re<20;){re++;for(var oe=J;S===void 0;)S=P(),S&&oe+S.pathLengthH?v=Rn.getPointOnLine(H,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:H>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E=0&&E>j)&&(E=j,X=!0),v=Rn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?H>S.pathLength?E=1e-8:E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength/2:E=Math.max(E-(J-H)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=Rn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength:E-=(J-H)/S.pathLength,E>1&&(E=1,X=!0),v=Rn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=Rn.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${DW}`).join(" "),YM="nodesRect",P9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],T9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const A9e="ontouchstart"in ot._global;function L9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(T9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var h5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],qM=1e8;function M9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function zW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function O9e(e,t){const n=M9e(e);return zW(e,t,n)}function I9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(P9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(YM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(YM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return zW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-qM,y:-qM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ra;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),h5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new a2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:A9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=L9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const H=m+de,J=ot.getAngle(this.rotationSnapTolerance()),oe=I9e(this.rotationSnaps(),H,J)-p.rotation,X=O9e(p,oe);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ra;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ra;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ra;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ra;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function R9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){h5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+h5.join(", "))}),e||[]}Cn.prototype.className="Transformer";pr(Cn);K.addGetterSetter(Cn,"enabledAnchors",h5,R9e);K.addGetterSetter(Cn,"flipEnabled",!0,As());K.addGetterSetter(Cn,"resizeEnabled",!0);K.addGetterSetter(Cn,"anchorSize",10,ze());K.addGetterSetter(Cn,"rotateEnabled",!0);K.addGetterSetter(Cn,"rotationSnaps",[]);K.addGetterSetter(Cn,"rotateAnchorOffset",50,ze());K.addGetterSetter(Cn,"rotationSnapTolerance",5,ze());K.addGetterSetter(Cn,"borderEnabled",!0);K.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"anchorStrokeWidth",1,ze());K.addGetterSetter(Cn,"anchorFill","white");K.addGetterSetter(Cn,"anchorCornerRadius",0,ze());K.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"borderStrokeWidth",1,ze());K.addGetterSetter(Cn,"borderDash");K.addGetterSetter(Cn,"keepRatio",!0);K.addGetterSetter(Cn,"centeredScaling",!1);K.addGetterSetter(Cn,"ignoreStroke",!1);K.addGetterSetter(Cn,"padding",0,ze());K.addGetterSetter(Cn,"node");K.addGetterSetter(Cn,"nodes");K.addGetterSetter(Cn,"boundBoxFunc");K.addGetterSetter(Cn,"anchorDragBoundFunc");K.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(Cn,"useSingleNodeRotation",!0);K.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var N9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],D9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function z9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,I,R,N,z,$,W,q,de,H=t+t+1,J=r-1,re=i-1,oe=t+1,X=oe*(oe+1)/2,G=new KM,Q=null,j=G,Z=null,me=null,Se=N9e[t],xe=D9e[t];for(s=1;s>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+oe)0&&z9e(t,n)};K.addGetterSetter(Be,"blurRadius",0,ze(),K.afterSetFilter);const F9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};K.addGetterSetter(Be,"contrast",0,ze(),K.afterSetFilter);const H9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],I=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,$=I>0?I:-I;if(z>N&&(R=M),$>N&&(R=I),R*=t,i){var W=s[E]+R,q=s[E+1]+R,de=s[E+2]+R;s[E]=W>255?255:W<0?0:W,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var H=n-R;H<0?H=0:H>255&&(H=255),s[E]=s[E+1]=s[E+2]=H}}while(--w)}while(--p)};K.addGetterSetter(Be,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Be,"embossBlend",!1,null,K.afterSetFilter);function Mw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const W9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,I,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?k:T;var M=a,I=o,R,N,z=n.polarRotation||0,$,W;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function t7e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};K.addGetterSetter(Be,"pixelSize",8,ze(),K.afterSetFilter);const o7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);const s7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const l7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},c7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[V]!==O[se]){var he=` +`+A[V].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=V&&0<=se);break}}}finally{Rs=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var _h=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function En(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ya(){En(Ur),En(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Fl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Fl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,En(Ur),En(Cr),vn(Cr,d)):En(Ur),vn(Ur,y)}var pi=Math.clz32?Math.clz32:Ad,kh=Math.log,Eh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var zs=64,uo=4194304;function Bs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,V=y&268435455;if(V!==0){var se=V&~A;se!==0?_=Bs(se):(O&=V,O!==0&&(_=Bs(O)))}else V=y&~A,V!==0?_=Bs(V):O!==0&&(_=Bs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function va(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-pi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=V,A-=V,Ui=1<<32-pi(f)+A|y<Ft?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Ft],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Ft===ye.length)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;FtFt?(zr=kt,kt=null):zr=kt.sibling;var rs=je(ge,kt,Yt.value,He);if(rs===null){kt===null&&(kt=zr);break}d&&kt&&rs.alternate===null&&f(ge,kt),ue=O(rs,ue,Ft),Lt===null?Te=rs:Lt.sibling=rs,Lt=rs,kt=zr}if(Yt.done)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;!Yt.done;Ft++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return zn&&Fs(ge,Ft),Te}for(kt=_(ge,kt);!Yt.done;Ft++,Yt=ye.next())Yt=Fn(kt,ge,Ft,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Ft:Yt.key),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(ai){return f(ge,ai)}),zn&&Fs(ge,Ft),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&z1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=ba(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=ba(ge,ue,ye),He.return=ge,ge=He)}return V(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return V(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(re(ye))return Pn(ge,ue,ye,He);if(R(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=hp(ye,ge.mode,He),ue.return=ge,ge=ue),V(ge)):y(ge,ue)}return qo}var Yu=S2(!0),b2=S2(!1),Wd={},po=No(Wd),xa=No(Wd),ie=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(ie,f),vn(xa,d),vn(po,Wd),d=X(f),En(po),vn(po,d)}function Ge(){En(po),En(xa),En(ie)}function _t(d){var f=be(ie.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(xa,d),vn(po,f))}function Qt(d){xa.current===d&&(En(po),En(xa))}var It=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ru(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function B1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return vi().memoizedState}function j1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=oi();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var V=f.lastRenderedState,se=O(V,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,V)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=oi(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Za={readContext:Gi,useCallback:ti,useContext:ti,useEffect:ti,useImperativeHandle:ti,useInsertionEffect:ti,useLayoutEffect:ti,useMemo:ti,useReducer:ti,useRef:ti,useState:ti,useDebugValue:ti,useDeferredValue:ti,useTransition:ti,useMutableSource:ti,useSyncExternalStore:ti,useId:ti,unstable_isNewReconciler:!1},pb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:C2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=j1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:w2,useDebugValue:V1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=w2(!1),f=d[0];return d=G1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||W1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,C2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(zn){var y=ya,_=Ui;y=(_&~(1<<32-pi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0rp&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!zn)return ni(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,vn(It,_?d&1|2:d&1),f):(ni(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ni(f),Xe&&f.subtreeFlags&6&&(f.flags|=8192)):ni(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function eg(d,f){switch(I1(f),f.tag){case 1:return Gr(f.type)&&Ya(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Ur),En(Cr),B1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(It),null;case 4:return Ge(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,bb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Uh=!1;function Yl(d,f){for(Q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,V=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=V}break;case 3:Xe&&Ms(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ri(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==_)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=oe(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function tg(d){var f=d.alternate;f!==null&&(d.alternate=null,tg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&<(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function uc(d){return d.tag===5||d.tag===3||d.tag===4}function Ja(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function ng(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(ng(d,f,y),d=d.sibling;d!==null;)ng(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Xe){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):pt(yr,y.stateNode))}else jo(d,f,y);break;case 18:Xe&&yr!==null&&(Go?T1(yr,y.stateNode):P1(yr,y.stateNode));break;case 4:Xe?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=ma(_),Iu(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,V=O.destroy;O=O.tag,V!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,V),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new bb),f.forEach(function(_){var A=H2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Qh:return":has("+(og(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_A&&(A=V),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*xb(_/1960))-_,10<_){d.timeoutHandle=ht(Qs.bind(null,d,Si,ts),_);break}Qs(d,Si,ts);break;case 5:Qs(d,Si,ts);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?ap.bind(null,d):null}function sp(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=Si,Si=y,f!==null&&lp(f)),d}function lp(d){Si===null?Si=d:Si.push.apply(Si,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,V=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;heWn()-lg?Xs(d,0):sg|=y),Kr(d,f)}function hg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=oi();d=$o(d,f),d!==null&&(va(d,f,y),Kr(d,y))}function Cb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),hg(d,y)}function H2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),hg(d,y)}var pg;pg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,yb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,zn&&(f.flags&1048576)!==0&&O1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;wa(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=$1(null,f,_,d,A,y);var O=Xu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(O=!0,qa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,N1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,D1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,zn&&O&&gi(f),yi(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(wa(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=dp(_),d=Fo(_,d),A){case 0:f=K1(null,f,_,d,y);break e;case 1:f=O2(null,f,_,d,y);break e;case 11:f=T2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),K1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),O2(d,f,_,A,y);case 3:e:{if(I2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,g2(d,f),Nh(f,_,null,y);var V=f.memoizedState;if(_=V.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=R2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=R2(d,f,_,y,A);break e}else for(bt&&(fo=b1(f.stateNode.containerInfo),Vn=f,zn=!0,Ri=null,ho=!1),y=b2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Qa(d,f,y);break e}yi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Rd(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,V=A.children,Fe(_,A)?V=null:O!==null&&Fe(_,O)&&(f.flags|=32),M2(d,f),yi(d,f,V,y),f.child;case 6:return d===null&&Rd(f),null;case 13:return N2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):yi(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),T2(d,f,_,A,y);case 7:return yi(d,f,f.pendingProps,y),f.child;case 8:return yi(d,f,f.pendingProps.children,y),f.child;case 12:return yi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,V=A.value,p2(f,_,V),O!==null)if(U(O.value,V)){if(O.children===A.children&&!Ur.current){f=Qa(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){V=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Xa(-1,y&-y),he.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var et=Re.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Re.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Fd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)V=O.type===f.type?null:O.child;else if(O.tag===18){if(V=O.return,V===null)throw Error(a(341));V.lanes|=y,se=V.alternate,se!==null&&(se.lanes|=y),Fd(V,y,f),V=O.sibling}else V=O.child;if(V!==null)V.return=O;else for(V=O;V!==null;){if(V===f){V=null;break}if(O=V.sibling,O!==null){O.return=V.return,V=O;break}V=V.return}O=V}yi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,yi(d,f,_,y),f.child;case 14:return _=f.type,A=Fo(_,f.pendingProps),A=Fo(_.type,A),Vs(d,f,_,A,y);case 15:return A2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),wa(d,f),f.tag=1,Gr(_)?(d=!0,qa(f)):d=!1,Gu(f,y),v2(f,_,A),D1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return z2(d,f,y);case 22:return L2(d,f,y)}throw Error(a(156,f.tag))};function xi(d,f){return $u(d,f)}function Ca(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ca(d,f,y,_)}function gg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return gg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,A,O){var V=2;if(_=d,typeof d=="function")gg(d)&&(V=1);else if(typeof d=="string")V=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:V=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:V=10;break e;case S:V=9;break e;case w:V=11;break e;case k:V=14;break e;case T:V=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(V,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function fp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function el(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fu(0),this.expirationTimes=Fu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function W2(d,f,y,_,A,O,V,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},N1(O),d}function mg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Fl(d,y,f)}return f}function vg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&O>=At&&A<=et&&V<=je){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||jeV){if(!(O!==At||y.height!==he.height||et<_||Re>A)){Re>_&&(he.width+=Re-_,he.x=_),etO&&(he.height+=At-O,he.y=O),jey&&(y=V)),V ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return oe(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||yg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ag(d,f);var A=jt(d,y,_).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=oi(),V=Tr(A);return y=mg(y),f.context===null?f.context=y:f.pendingContext=y,f=Xa(O,V),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,V),d!==null&&(vo(d,A,V,O),Rh(d,A,V)),V},n};(function(e){e.exports=d7e})(BW);const f7e=M9(BW.exports);var hk={exports:{}},bh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(hk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const pk=".react-konva-event",h7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,p7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,g7e={};function sb(e,t,n=g7e){if(!ZM&&"zIndex"in t&&(console.warn(p7e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(h7e),QM=!0)}for(var o in n)if(!XM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!XM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const FW={},m7e={};nh.Node.prototype._applyProps=sb;function v7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function y7e(e,t,n){let r=nh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=nh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return sb(l,o),l}function S7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function b7e(e,t,n){return!1}function x7e(e){return e}function w7e(){return null}function C7e(){return null}function _7e(e,t,n,r){return m7e}function k7e(){}function E7e(e){}function P7e(e,t){return!1}function T7e(){return FW}function A7e(){return FW}const L7e=setTimeout,M7e=clearTimeout,O7e=-1;function I7e(e,t){return!1}const R7e=!1,N7e=!0,D7e=!0;function z7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function B7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function F7e(e,t,n){$W(e,t,n)}function $7e(e,t){t.destroy(),t.off(pk),_d(e)}function H7e(e,t){t.destroy(),t.off(pk),_d(e)}function W7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function V7e(e,t,n){}function U7e(e,t,n,r,i){sb(e,i,r)}function G7e(e){e.hide(),_d(e)}function j7e(e){}function Y7e(e,t){(t.visible==null||t.visible)&&e.show()}function q7e(e,t){}function K7e(e){}function X7e(){}const Z7e=()=>hk.exports.DefaultEventPriority,Q7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:v7e,createInstance:y7e,createTextInstance:S7e,finalizeInitialChildren:b7e,getPublicInstance:x7e,prepareForCommit:w7e,preparePortalMount:C7e,prepareUpdate:_7e,resetAfterCommit:k7e,resetTextContent:E7e,shouldDeprioritizeSubtree:P7e,getRootHostContext:T7e,getChildHostContext:A7e,scheduleTimeout:L7e,cancelTimeout:M7e,noTimeout:O7e,shouldSetTextContent:I7e,isPrimaryRenderer:R7e,warnsIfNotActing:N7e,supportsMutation:D7e,appendChild:z7e,appendChildToContainer:B7e,insertBefore:$W,insertInContainerBefore:F7e,removeChild:$7e,removeChildFromContainer:H7e,commitTextUpdate:W7e,commitMount:V7e,commitUpdate:U7e,hideInstance:G7e,hideTextInstance:j7e,unhideInstance:Y7e,unhideTextInstance:q7e,clearContainer:K7e,detachDeletedInstance:X7e,getCurrentEventPriority:Z7e,now:n0.exports.unstable_now,idlePriority:n0.exports.unstable_IdlePriority,run:n0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var J7e=Object.defineProperty,e8e=Object.defineProperties,t8e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,n8e=Object.prototype.hasOwnProperty,r8e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?J7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))n8e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))r8e.call(t,n)&&eO(e,n,t[n]);return e},i8e=(e,t)=>e8e(e,t8e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:o8e,ReactCurrentDispatcher:a8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s8e(){const e=C.exports.useContext(mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=o8e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Yg=[],nO=new WeakMap;function l8e(){var e;const t=s8e();Yg.splice(0,Yg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Yg.push(HW(i))});for(const n of Yg){const r=(e=a8e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>Yg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,i8e(tO({},i),{value:nO.get(r)}))),n=>x(WW,{...tO({},n)})),[])}function u8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const c8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=u8e(e),o=l8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=fm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),fm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),fm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sb(n.current,e,i),fm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},i3="Layer",rh="Group",T0="Rect",qg="Circle",p5="Line",VW="Image",d8e="Transformer",fm=f7e(Q7e);fm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const f8e=le.forwardRef((e,t)=>x(WW,{children:x(c8e,{...e,forwardedRef:t})})),h8e=ct([wn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=e=>{const{...t}=e,{objects:n}=ke(h8e);return x(rh,{listening:!1,...t,children:n.filter(U_).map((r,i)=>x(p5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},s2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},g8e=ct(wn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:s2(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),m8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=ke(g8e);return l?ne(rh,{listening:!1,...t,children:[x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},v8e=ct(wn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),y8e=e=>{const{...t}=e,n=Ye(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=ke(v8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(H=>{if(!v){n(fw({x:Math.floor(H.target.x()),y:Math.floor(H.target.y())}));return}const J=H.target.x(),re=H.target.y(),oe=Fc(J,64),X=Fc(re,64);H.target.x(oe),H.target.y(X),n(fw({x:oe,y:X}))},[n,v]),I=C.exports.useCallback(()=>{if(!k.current)return;const H=k.current,J=H.scaleX(),re=H.scaleY(),oe=Math.round(H.width()*J),X=Math.round(H.height()*re),G=Math.round(H.x()),Q=Math.round(H.y());n(sm({width:oe,height:X})),n(fw({x:v?gs(G,64):G,y:v?gs(Q,64):Q})),H.scaleX(1),H.scaleY(1)},[n,v]),R=C.exports.useCallback((H,J,re)=>{const oe=H.x%T,X=H.y%T;return{x:gs(J.x,T)+oe,y:gs(J.y,T)+X}},[T]),N=()=>{n(pw(!0))},z=()=>{n(pw(!1)),n(Fy(!1))},$=()=>{n(YL(!0))},W=()=>{n(pw(!1)),n(YL(!1)),n(Fy(!1))},q=()=>{n(Fy(!0))},de=()=>{!u&&!l&&n(Fy(!1))};return ne(rh,{...t,children:[x(T0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(T0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(T0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(d8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:W,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let UW=null,GW=null;const S8e=e=>{UW=e},g5=()=>UW,b8e=e=>{GW=e},x8e=()=>GW,w8e=ct([wn,Rr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),C8e=()=>{const e=Ye(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=ke(w8e),i=C.exports.useRef(null),o=x8e();mt("esc",()=>{e(q5e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iH(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(Zp("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(Zp(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},_8e=ct(wn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:s2(t)}}),rO=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),k8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ke(_8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=rO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=rO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(T0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},E8e=ct([wn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P8e=e=>{const t=Ye(),{isMoveStageKeyHeld:n,stageScale:r}=ke(E8e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=st.clamp(r*D5e**s,z5e,B5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(fSe(l)),t(oH(u))},[e,n,r,t])},lb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},T8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(T8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=lb(e.current);!o||(i.evt.preventDefault(),t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},L8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),M8e=(e,t)=>{const n=Ye(),{tool:r,isDrawing:i,isStaging:o}=ke(L8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=lb(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(qS(!1))},[t,n,i,o,e,r])},O8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e=(e,t,n)=>{const r=Ye(),{isDrawing:i,tool:o,isStaging:a}=ke(O8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=lb(e.current);!s||(r(nH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},R8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),N8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(R8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=lb(e.current);!o||n==="move"||r||(t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},D8e=()=>{const e=Ye();return C.exports.useCallback(()=>{e(nH(null)),e(qS(!1))},[e])},z8e=ct([wn,yd],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const e=Ye(),{tool:t,isStaging:n}=ke(z8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var gf=C.exports,F8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const jW=e=>{const{url:t,x:n,y:r}=e,[i]=F8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},$8e=ct([wn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=()=>{const{objects:e}=ke($8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(b5e(t))return x(p5,{points:t.points,stroke:t.color?s2(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},W8e=ct([wn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const{colorMode:e}=Bv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ke(W8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,I=st.range(0,T).map(N=>x(p5,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=st.range(0,M).map(N=>x(p5,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(rh,{children:i})},U8e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=e=>{const{...t}=e,n=ke(U8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},o3=e=>Math.round(e*100)/100,j8e=ct([wn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${o3(s)}, ${o3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${o3(r)}\xD7${o3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Y8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=ke(j8e);return ne("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&ne(Nn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},q8e=ct([wn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=ke(q8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&ne(rh,{children:[x(T0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(T0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},X8e=ct([wn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Z8e=()=>{const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ke(X8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(G5e()),l=()=>e(U5e()),u=()=>e(W5e());return r?x(nn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ne(Ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(U4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(G4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(J4e,{}):x(Q4e,{}),onClick:()=>e(uSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(H_,{}),onClick:()=>e(V5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},Q8e=ct([wn,yd],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),J8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=ke(Q8e);C8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{b8e(W),p.current=W},[]),S=C.exports.useCallback(W=>{S8e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=P8e(p),k=A8e(p),T=M8e(p,E),M=I8e(p,E,w),I=N8e(p),R=D8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B8e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(f8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(i3,{id:"grid",visible:r,children:x(V8e,{})}),x(i3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H8e,{})}),ne(i3,{id:"mask",visible:e,listening:!1,children:[x(p8e,{visible:!0,listening:!1}),x(k8e,{listening:!1})]}),ne(i3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(m8e,{visible:l!=="move",listening:!1}),x(K8e,{visible:u}),h&&x(G8e,{}),x(y8e,{visible:n&&!u})]})]}),x(Y8e,{}),x(Z8e,{})]})})},e_e=ct([wn,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function t_e(){const e=Ye(),{canUndo:t,activeTabName:n}=ke(e_e),r=()=>{e(hSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(v5e,{}),onClick:r,isDisabled:!t})}const n_e=ct([wn,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function r_e(){const e=Ye(),{canRedo:t,activeTabName:n}=ke(n_e),r=()=>{e(j5e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(d5e,{}),onClick:r,isDisabled:!t})}const i_e=ct([wn],e=>{const{shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldShowCanvasDebugInfo:a}=e;return{shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowCanvasDebugInfo:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o_e=()=>{const e=Ye(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:a}=ke(i_e);return x(pu,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Show Intermediates",isChecked:t,onChange:s=>e(lSe(s.target.checked))}),x(ta,{label:"Show Grid",isChecked:n,onChange:s=>e(sSe(s.target.checked))}),x(ta,{label:"Snap to Grid",isChecked:r,onChange:s=>e(cSe(s.target.checked))}),x(ta,{label:"Darken Outside Selection",isChecked:o,onChange:s=>e(rH(s.target.checked))}),x(ta,{label:"Auto Save to Gallery",isChecked:i,onChange:s=>e(rSe(s.target.checked))}),x(ta,{label:"Show Canvas Debug Info",isChecked:a,onChange:s=>e(aSe(s.target.checked))})]})})};function ub(){return(ub=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function h9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(iO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=p9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(oO(P),!function(M,I){return I&&!Vm(M)}(P,l.current)&&k)){if(Vm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(iO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ub({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),cb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=cb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},qW=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},g9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ow=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},a_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},s_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},l_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=cb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(yk,{className:"react-colorful__hue-pointer",left:t/360,color:g9({h:t,s:100,v:100,a:1})})))}),u_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:g9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:g9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function c_e(e,t,n){var r=h9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;KW(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var d_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,f_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,h_e=function(e){d_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aO.set(t,n);var r=f_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},p_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Ow(Object.assign({},n,{a:0}))+", "+Ow(Object.assign({},n,{a:1}))+")"},o=cb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(vk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Ow(n)})))},g_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);h_e(s);var l=c_e(n,i,o),u=l[0],h=l[1],p=cb(["react-colorful",t]);return le.createElement("div",ub({},a,{ref:s,className:p}),x(u_e,{hsva:u,onChange:h}),x(l_e,{hue:u.h,onChange:h}),le.createElement(p_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},m_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:s_e,fromHsva:a_e,equal:KW},v_e=function(e){return le.createElement(g_e,ub({},e,{colorModel:m_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(v_e,{className:`invokeai__color-picker ${t}`,...n})},y_e=ct([wn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:s2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),S_e=()=>{const e=Ye(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=ke(y_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e(H5e()),s=()=>e(eSe(!r));return ne(Nn,{children:[x(vd,{label:"Layer",tooltipProps:{hasArrow:!0,placement:"top"},value:r?t:"base",isDisabled:!r,validValues:S5e,onChange:l=>e(qL(l.target.value))}),x(pu,{trigger:"hover",triggerComponent:x(Ia,{children:x(gt,{"aria-label":"Inpainting Mask Options",tooltip:"Inpainting Mask Options","data-alert":t==="mask",icon:x(i5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(ta,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(tSe(l))}),x(fl,{onClick:a,tooltip:"Clear Mask (Shift+C)",children:"Clear Mask"})]})})]})};let a3;const b_e=new Uint8Array(16);function x_e(){if(!a3&&(a3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a3(b_e)}const Ci=[];for(let e=0;e<256;++e)Ci.push((e+256).toString(16).slice(1));function w_e(e,t=0){return(Ci[e[t+0]]+Ci[e[t+1]]+Ci[e[t+2]]+Ci[e[t+3]]+"-"+Ci[e[t+4]]+Ci[e[t+5]]+"-"+Ci[e[t+6]]+Ci[e[t+7]]+"-"+Ci[e[t+8]]+Ci[e[t+9]]+"-"+Ci[e[t+10]]+Ci[e[t+11]]+Ci[e[t+12]]+Ci[e[t+13]]+Ci[e[t+14]]+Ci[e[t+15]]).toLowerCase()}const C_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:C_e};function t0(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||x_e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return w_e(r)}const __e=(e,t)=>{const n=e.scale(),r=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:i,y:o,width:a,height:s}=e.getClientRect(),l=e.toDataURL({x:Math.round(i),y:Math.round(o),width:Math.round(a),height:Math.round(s)});return e.scale(n),{dataURL:l,boundingBox:{x:Math.round(r.x),y:Math.round(r.y),width:Math.round(a),height:Math.round(s)}}},k_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},E_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},P_e={cropVisible:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},s3=(e=P_e)=>async(t,n)=>{const{cropVisible:r,shouldSaveToGallery:i,shouldDownload:o,shouldCopy:a,shouldSetAsInitialImage:s}=e;t(M4e("Exporting Image")),t(Xp(!1));const u=n().canvas.stageScale,h=g5();if(!h){t(hu(!1)),t(Xp(!0));return}const{dataURL:p,boundingBox:m}=__e(h,u);if(!p){t(hu(!1)),t(Xp(!0));return}const v=new FormData;v.append("data",JSON.stringify({dataURL:p,filename:"merged_canvas.png",kind:i?"result":"temp",cropVisible:r}));const w=await(await fetch(window.location.origin+"/upload",{method:"POST",body:v})).json(),{url:E,width:P,height:k}=w,T={uuid:t0(),category:i?"result":"user",...w};o&&(k_e(E),t(By({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),a&&(E_e(E,P,k),t(By({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),i&&(t(Qp({image:T,category:"result"})),t(By({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),s&&(t(nSe({kind:"image",layer:"base",...m,image:T})),t(By({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(W3("Connected")),t(Xp(!0))},Sk=e=>e.system,T_e=e=>e.system.toastQueue,A_e=ct([wn,yd,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:s2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),L_e=()=>{const e=Ye(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=ke(A_e);mt(["v"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[]),mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(hw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(hw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(Zp("brush")),s=()=>e(Zp("eraser")),l=()=>e(Zp("move"));return ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(a5e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(X4e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(Zp("eraser"))}),x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(j4e,{}),"data-selected":t==="move"||o,onClick:l}),x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Tool Options",tooltip:"Tool Options",icon:x(g5e,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(n2,{label:"Size",value:r,withInput:!0,onChange:u=>e(hw(u)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:u=>e(Z5e(u))})]})})]})};let lO;const ZW=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),M_e=ct([Sk],e=>{const{isProcessing:t}=e;return{isProcessing:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O_e=()=>{const e=Ye(),{isProcessing:t}=ke(M_e),n=g5(),{openUploader:r}=ZW();mt(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[n]),mt(["shift+m"],()=>{a()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+s"],()=>{s()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["meta+c","ctrl+c"],()=>{l()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+d"],()=>{u()},{enabled:()=>!t,preventDefault:!0},[n,t]);const i=()=>{const h=g5();if(!h)return;const p=h.getClientRect({skipTransform:!0});e(K5e({contentRect:p}))},o=()=>{e(Y5e()),e(tH())},a=()=>{e(s3({cropVisible:!1,shouldSetAsInitialImage:!0}))},s=()=>{e(s3({cropVisible:!0,shouldSaveToGallery:!0}))},l=()=>{e(s3({cropVisible:!0,shouldCopy:!0}))},u=()=>{e(s3({cropVisible:!0,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(S_e,{}),x(L_e,{}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(r5e,{}),onClick:a,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(f5e,{}),onClick:s,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x($_,{}),onClick:l,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x($$,{}),onClick:u,isDisabled:t})]}),ne(Ia,{isAttached:!0,children:[x(t_e,{}),x(r_e,{})]}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:r}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(K4e,{}),onClick:i}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(H_,{}),onClick:o,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(Ia,{isAttached:!0,children:x(o_e,{})})]})},I_e=ct([wn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),R_e=()=>{const e=Ye(),{doesCanvasNeedScaling:t}=ke(I_e);return C.exports.useLayoutEffect(()=>{const n=st.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ne("div",{className:"inpainting-main-area",children:[x(O_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(eCe,{}):x(J8e,{})})]})})})};function N_e(){const e=Ye();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(Q6e,{}),styleClass:"inpainting-workarea-overrides",children:x(R_e,{})})}const D_e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(kwe,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(wwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(D_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(N_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},db=st.map(kf,(e,t)=>t);[...db];function z_e(){const e=ke(u=>u.options.activeTab),t=ke(u=>u.options.isLightBoxOpen),n=ke(u=>u.gallery.shouldShowGallery),r=ke(u=>u.options.shouldShowOptionsPanel),i=ke(u=>u.gallery.shouldPinGallery),o=ke(u=>u.options.shouldPinOptionsPanel),a=Ye();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(ad(!t))},[t]),mt("f",()=>{n||r?(a(A0(!1)),a(k0(!1))):(a(A0(!0)),a(k0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(NF,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(IF,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return ne(OF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(RF,{className:"app-tabs-panels",children:t?x(B6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},B_e=QW,JW=TS({name:"options",initialState:B_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=H3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=r5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=H3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=r5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=H3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...QW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=db.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fb,setIterations:F_e,setSteps:eV,setCfgScale:tV,setThreshold:$_e,setPerlin:H_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:l2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:m9,setFacetoolStrength:j3,setFacetoolType:Y3,setCodeformerFidelity:sV,setUpscalingLevel:v9,setUpscalingStrength:y9,setMaskPath:lV,resetSeed:eTe,resetOptionsState:tTe,setShouldFitToWidthHeight:uV,setParameter:nTe,setShouldGenerateVariations:W_e,setSeedWeights:cV,setVariationAmount:V_e,setAllParameters:U_e,setShouldRunFacetool:G_e,setShouldRunESRGAN:j_e,setShouldRandomizeSeed:Y_e,setShowAdvancedOptions:q_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:K_e,setAllImageToImageParameters:X_e,setShowDualDisplay:Z_e,setInitialImage:u2,clearInitialImage:fV,setShouldShowOptionsPanel:A0,setShouldPinOptionsPanel:Q_e,setOptionsPanelScrollPosition:J_e,setShouldHoldOptionsPanelOpen:eke,setShouldLoopback:tke,setCurrentTheme:nke,setIsLightBoxOpen:ad}=JW.actions,rke=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const q3=Object.create(null);Object.keys(Ml).forEach(e=>{q3[Ml[e]]=e});const ike={type:"error",data:"parser error"},oke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ake=typeof ArrayBuffer=="function",ske=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>oke&&t instanceof Blob?n?r(t):uO(t,r):ake&&(t instanceof ArrayBuffer||ske(t))?n?r(t):uO(new Blob([t]),r):r(Ml[e]+(t||"")),uO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},cO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},uke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:cke(e.substring(1),t)}:q3[n]?e.length>1?{type:q3[n],data:e.substring(1)}:{type:q3[n]}:ike},cke=(e,t)=>{if(uke){const n=lke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),dke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},fke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const pke=setTimeout,gke=clearTimeout;function hb(e,t){t.useNativeTimers?(e.setTimeoutFn=pke.bind($c),e.clearTimeoutFn=gke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const mke=1.33;function vke(e){return typeof e=="string"?yke(e):Math.ceil((e.byteLength||e.size)*mke)}function yke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Ske extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,hb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Ske(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),S9=64,bke={};let dO=0,l3=0,fO;function hO(e){let t="";do t=bV[e%S9]+t,e=Math.floor(e/S9);while(e>0);return t}function xV(){const e=hO(+new Date);return e!==fO?(dO=0,fO=e):e+"."+hO(dO++)}for(;l3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};fke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,dke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=xV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pl extends Vr{constructor(t,n){super(),hb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=yV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new _V(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Pl.requestsCount++,Pl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Cke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,pO,!1)}}function pO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),u3=$c.WebSocket||$c.MozWebSocket,gO=!0,Eke="arraybuffer",mO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Pke extends SV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=mO?{}:yV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=gO&&!mO?n?new u3(t,n):new u3(t):new u3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Eke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{gO&&this.ws.send(o)}catch{}i&&kV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=xV()),this.supportsBinary||(t.b64=1);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!u3}}const Tke={websocket:Pke,polling:kke},Ake=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Lke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Ake.exec(e||""),o={},a=14;for(;a--;)o[Lke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Mke(o,o.path),o.queryKey=Oke(o,o.query),o}function Mke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Oke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Ic extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b9(n.host).host),hb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=xke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Tke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ic.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Ic.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ic.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Ic.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Ic.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Dke=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",zke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Rke&&(e instanceof ArrayBuffer||Nke(e))||Dke&&e instanceof Blob||zke&&e instanceof File}function K3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Wke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Fke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Vke=Object.freeze(Object.defineProperty({__proto__:null,protocol:$ke,get PacketType(){return tn},Encoder:Hke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Uke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Uke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}p1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};p1.prototype.reset=function(){this.attempts=0};p1.prototype.setMin=function(e){this.ms=e};p1.prototype.setMax=function(e){this.max=e};p1.prototype.setJitter=function(e){this.jitter=e};class C9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new p1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Vke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ic(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Kg={};function X3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ike(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Kg[i]&&o in Kg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new C9(r,t):(Kg[i]||(Kg[i]=new C9(r,t)),l=Kg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(X3,{Manager:C9,Socket:PV,io:X3,connect:X3});var Gke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,jke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Yke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(vO[t]||t||vO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return qke(e)},E=function(){return Kke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Xke(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(Gke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var vO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},yO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},qke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Kke=function(t){var n=t.getDay();return n===0&&(n=7),n},Xke=function(t){return(String(t).match(jke)||[""]).pop().replace(Yke,"").replace(/GMT\+0000/g,"UTC")};const Zke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(BL(!0)),t(W3("Connected")),t(E5e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(VC("user")),r.categories.result.latest_mtime?t(WL("result")):t(VC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(BL(!1)),t(W3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:t0(),...u};if(["txt2img","img2img"].includes(l)&&t(Qp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t($5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Qp({image:{...h,category:"result"},category:"result"}))}if(o)switch(db[a]){case"img2img":{t(u2(h));break}}t(gw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(CSe({uuid:t0(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Qp({category:"result",image:{uuid:t0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(w4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(FL()),t(gw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:t0(),...l}));t(wSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(k4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Qp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(gw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(C4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(W3("Model Changed")),t(hu(!1)),t(Xp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(hu(!1)),t(Xp(!0)),t(FL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},Qke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new jg.Stage({container:i,width:n,height:r}),a=new jg.Layer,s=new jg.Layer;a.add(new jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new jg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},Jke=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},eEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:I,shouldGenerateVariations:R,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:W,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:H,codeformerFidelity:J,facetoolType:re,shouldRandomizeSeed:oe}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:oe||R?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=oe?O$(P_,T_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=I),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Fe,inpaintReplace:We,shouldUseInpaintReplace:ht,stageScale:qe,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Xe={...xe,...Fe},Et=Qke(rt?Se.filter(U_):[],Xe);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,ht&&(j.inpaint_replace=We),j.bounding_box=Xe;const bt=t.scale();t.scale({x:1/qe,y:1/qe});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Xe.x+Ae.x,y:Xe.y+Ae.y,width:Xe.width,height:Xe.height});Q&&Jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}R?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:W,strength:q}),de&&(me={type:re,strength:H},re==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},tEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(A4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=eEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(hu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(hu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(uH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(E4e()),t.emit("requestModelChange",i)}}},nEe=()=>{const{origin:e}=new URL(window.location.href),t=X3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T}=Zke(i),{emitGenerateImage:M,emitRunESRGAN:I,emitRunFacetool:R,emitDeleteImage:N,emitRequestImages:z,emitRequestNewImages:$,emitCancelProcessing:W,emitRequestSystemConfig:q,emitRequestModelChange:de}=tEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",H=>u(H)),t.on("generationResult",H=>p(H)),t.on("postprocessingResult",H=>h(H)),t.on("intermediateResult",H=>m(H)),t.on("progressUpdate",H=>v(H)),t.on("galleryImages",H=>S(H)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",H=>{E(H)}),t.on("systemConfig",H=>{P(H)}),t.on("modelChanged",H=>{k(H)}),t.on("modelChangeFailed",H=>{T(H)}),n=!0),a.type){case"socketio/generateImage":{M(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{R(a.payload);break}case"socketio/deleteImage":{N(a.payload);break}case"socketio/requestImages":{z(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{W();break}case"socketio/requestSystemConfig":{q();break}case"socketio/requestModelChange":{de(a.payload);break}}o(a)}},rEe=["cursorPosition"].map(e=>`canvas.${e}`),iEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),oEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=GF({options:rke,gallery:TSe,system:O4e,canvas:pSe}),aEe=d$.getPersistConfig({key:"root",storage:c$,rootReducer:TV,blacklist:[...rEe,...iEe,...oEe],debounce:300}),sEe=A2e(aEe,TV),AV=Cve({reducer:sEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(nEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ye=p2e,ke=r2e;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function lEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SO(e,t){for(var n=0;nx(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Kv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),hEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ke(hEe),i=t?Math.round(t*100/n):0;return x(pF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function gEe(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function mEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=U4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(gEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(G0,{isOpen:t,onClose:r,children:[x(Pv,{}),ne(Ev,{className:" modal hotkeys-modal",children:[x(j8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const vEe=e=>{const{isProcessing:t,isConnected:n}=ke(l=>l.system),r=Ye(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return ne("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Da,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},yEe=ct(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),SEe=()=>{const{models:e}=ke(yEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(Df,{children:[x(Rf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(vEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},bEe=ct(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),xEe=({children:e})=>{const t=Ye(),n=ke(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=U4(),{isOpen:a,onOpen:s,onClose:l}=U4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=ke(bEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(P4e(E))};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(G0,{isOpen:r,onClose:o,children:[x(Pv,{}),ne(Ev,{className:"modal settings-modal",children:[x(q8,{className:"settings-modal-header",children:"Settings"}),x(j8,{className:"modal-close-btn"}),ne(q4,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(SEe,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(vd,{label:"Display In-Progress Images",validValues:F3e,value:u,onChange:E=>t(b4e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(_4e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(T4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x(Da,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Y8,{children:x(Da,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(G0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Ev,{children:x(q4,{pb:6,pt:6,children:x(nn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},wEe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ke(wEe),s=Ye();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(N$())},className:`status ${l}`,children:u})})},_Ee=["dark","light","green"];function kEe(){const{setColorMode:e}=Bv(),t=Ye(),n=ke(i=>i.options.currentTheme),r=i=>{e(i),t(nke(i))};return x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(s5e,{})}),children:x(jz,{align:"stretch",children:_Ee.map(i=>x(fl,{style:{width:"6rem"},leftIcon:n===i?x(F_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const EEe=ct([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),PEe=()=>{const e=Ye(),{models:t,activeModel:n,isProcessing:r}=ke(EEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(vd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},TEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(CEe,{}),x(PEe,{}),x(mEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(n5e,{})})}),x(kEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(q4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(W4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(H4e,{})})}),x(xEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),AEe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),LEe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),MEe=()=>{const e=Ye(),t=ke(AEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ke(LEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(N$()),e(cw(!n))};return mt("`",()=>{e(cw(!n))},[n]),mt("esc",()=>{e(cw(!1))}),ne(Nn,{children:[n&&x(gH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ne("div",{className:`console-entry console-${S}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(V4e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(o5e,{}):x(F$,{}),onClick:l})})]})};function OEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var IEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function c2(e,t){var n=REe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function REe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=IEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var NEe=[".DS_Store","Thumbs.db"];function DEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&zEe(e.dataTransfer)?[2,HEe(e.dataTransfer,e.type)]:BEe(e)?[2,FEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,$Ee(e)]:[2,[]]})})}function zEe(e){return m5(e)}function BEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function FEe(e){return E9(e.target.files).map(function(t){return c2(t)})}function $Ee(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return c2(r)})]}})})}function HEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=E9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(WEe))]):[3,2];case 1:return r=i.sent(),[2,bO(MV(r))];case 2:return[2,bO(E9(e.files).map(function(o){return c2(o)}))]}})})}function bO(e){return e.filter(function(t){return NEe.indexOf(t.name)===-1})}function E9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,kO(n)];if(e.sizen)return[!1,kO(n)]}return[!0,null]}function Ef(e){return e!=null}function iPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=NV(l,n),h=Ov(u,1),p=h[0],m=DV(l,r,i),v=Ov(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function v5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function c3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function PO(e){e.preventDefault()}function oPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function aPe(e){return e.indexOf("Edge/")!==-1}function sPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oPe(e)||aPe(e)}function al(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function _Pe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=y5(e,hPe),i=HV(r),o=i.open,a=y5(i,pPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var $V={disabled:!1,getFilesFromEvent:DEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=$V;wk.propTypes={children:In.exports.func,accept:In.exports.objectOf(In.exports.arrayOf(In.exports.string)),multiple:In.exports.bool,preventDropOnDocument:In.exports.bool,noClick:In.exports.bool,noKeyboard:In.exports.bool,noDrag:In.exports.bool,noDragEventsBubbling:In.exports.bool,minSize:In.exports.number,maxSize:In.exports.number,maxFiles:In.exports.number,disabled:In.exports.bool,getFilesFromEvent:In.exports.func,onFileDialogCancel:In.exports.func,onFileDialogOpen:In.exports.func,useFsAccessApi:In.exports.bool,autoFocus:In.exports.bool,onDragEnter:In.exports.func,onDragLeave:In.exports.func,onDragOver:In.exports.func,onDrop:In.exports.func,onDropAccepted:In.exports.func,onDropRejected:In.exports.func,onError:In.exports.func,validator:In.exports.func};var L9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return cPe(n)},[n]),q=C.exports.useMemo(function(){return uPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:AO},[E]),H=C.exports.useMemo(function(){return typeof w=="function"?w:AO},[w]),J=C.exports.useRef(null),re=C.exports.useRef(null),oe=C.exports.useReducer(kPe,L9),X=Iw(oe,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&lPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(re.current){var Je=re.current.files;Je.length||(Q({type:"closeDialog"}),H())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[re,Z,H,me]);var xe=C.exports.useRef([]),Fe=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",PO,!1),document.addEventListener("drop",Fe,!1)),function(){T&&(document.removeEventListener("dragover",PO),document.removeEventListener("drop",Fe))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),ht=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(vPe(xe.current),[Oe.target]),c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(v5(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&iPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,W,a,o,s,l,$]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=c3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),c3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(Ee){var Mt=NV(Ee,W),Ne=Iw(Mt,2),at=Ne[0],an=Ne[1],Dn=DV(Ee,a,o),$e=Iw(Dn,2),pt=$e[0],tt=$e[1],Nt=$?$(Ee):null;if(at&&pt&&!Nt)Xt.push(Ee);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){jt.push({file:Ee,errors:[rPe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,W,a,o,l,m,v,S,$]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){v5(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){dPe(Je)?(H(Je),Q({type:"closeDialog"})):fPe(Je)?(me.current=!1,re.current?(re.current.value=null,re.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Je)});return}re.current&&(Q({type:"openDialog"}),de(),re.current.value=null,re.current.click())},[Q,de,H,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(sPe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return I?null:lt(Je)},_n=function(Je){return R?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,Ee=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Dn=Oe.onDragOver,$e=Oe.onDragLeave,pt=Oe.onDrop,tt=y5(Oe,gPe);return lr(lr(A9({onKeyDown:xt(al(Ee,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:_n(al(an,ht)),onDragOver:_n(al(Dn,qe)),onDragLeave:_n(al($e,rt)),onDrop:_n(al(pt,Xe)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,ht,qe,rt,Xe,I,R,r]),kn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,Ee=Oe.onClick,Mt=y5(Oe,mPe),Ne=A9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Xe)),onClick:lt(al(Ee,kn)),tabIndex:-1},Xt,re);return lr(lr({},Ne),Mt)}},[re,n,s,Xe,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:re,open:lt(Et)})}function kPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},L9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},L9);default:return e}}function AO(){}const EPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Uf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},LO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Rr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:t0(),category:"user",...l};t(Qp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(u2(u))},PPe=e=>{const{children:t}=e,n=Ye(),r=ke(Rr),i=hh({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,I)=>M+` +`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(LO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(LO({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:ne("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(EPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},TPe=()=>{const e=Ye(),t=ke(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(k0(!0)),t&&e(io(!0))},children:x(D$,{})})};function APe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const LPe=ct(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),MPe=()=>{const e=Ye(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=ke(LPe);return ne("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(A0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(APe,{})}),t&&ne(Nn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},OPe=()=>{const e=Ye(),t=ke(T_e),n=hh();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(L4e())},[e,n,t])};OEe();const IPe=ct([e=>e.gallery,e=>e.options,e=>e.system,Rr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=st.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),RPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=ke(IPe);return OPe(),x("div",{className:"App",children:ne(PPe,{children:[x(pEe,{}),ne("div",{className:"app-content",children:[x(TEe,{}),x(z_e,{})]}),x("div",{className:"app-console",children:x(MEe,{})}),e&&x(TPe,{}),t&&x(MPe,{})]})})};const WV=N2e(AV),NPe=rN({key:"invokeai-style-cache",prepend:!0});Nw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(fEe,{}),persistor:WV,children:x(XQ,{value:NPe,children:x(Hme,{children:x(RPe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 1d5db213f0..9a2ef6268b 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,34 +6,8 @@ InvokeAI - A Stable Diffusion Toolkit -<<<<<<< refs/remotes/upstream/development -<<<<<<< refs/remotes/upstream/development -<<<<<<< refs/remotes/upstream/development -<<<<<<< refs/remotes/upstream/development -<<<<<<< refs/remotes/upstream/development -<<<<<<< refs/remotes/upstream/development - - -======= - -======= - ->>>>>>> Builds fresh bundle -======= - ->>>>>>> Fixes inpainting + code cleanup - ->>>>>>> Builds fresh bundle -======= - -======= - ->>>>>>> Outpainting tab loads to empty canvas instead of upload -======= - ->>>>>>> Fixes wonky canvas layer ordering & compositing - ->>>>>>> Builds fresh bundle + + From b72b61b790815fb3bda1c02b6cf3ca8ce2380e3a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 19:35:32 +1100 Subject: [PATCH 131/220] Styling updates --- .../src/features/canvas/components/IAICanvasGrid.tsx | 9 +++++++-- .../src/features/gallery/components/HoverableImage.tsx | 1 + .../src/features/tabs/components/FloatingButton.scss | 3 +++ .../src/features/tabs/components/InvokeOptionsPanel.tsx | 5 +++++ frontend/src/styles/Themes/_Colors_Dark.scss | 2 +- frontend/src/styles/Themes/_Colors_Green.scss | 2 +- frontend/src/styles/Themes/_Colors_Light.scss | 2 +- 7 files changed, 19 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasGrid.tsx b/frontend/src/features/canvas/components/IAICanvasGrid.tsx index 0b09b38868..7495f0ee7d 100644 --- a/frontend/src/features/canvas/components/IAICanvasGrid.tsx +++ b/frontend/src/features/canvas/components/IAICanvasGrid.tsx @@ -21,6 +21,12 @@ const selector = createSelector( } ); +const gridLinesColor = { + dark: 'rgba(255, 255, 255, 0.2)', + green: 'rgba(255, 255, 255, 0.2)', + light: 'rgba(0, 0, 0, 0.2)', +}; + const IAICanvasGrid = () => { const { colorMode } = useColorMode(); const { stageScale, stageCoordinates, stageDimensions } = @@ -35,8 +41,7 @@ const IAICanvasGrid = () => { ); useLayoutEffect(() => { - const gridLineColor = - colorMode === 'light' ? 'rgba(136, 136, 136, 1)' : 'rgba(84, 84, 84, 1)'; + const gridLineColor = gridLinesColor[colorMode]; const { width, height } = stageDimensions; const { x, y } = stageCoordinates; diff --git a/frontend/src/features/gallery/components/HoverableImage.tsx b/frontend/src/features/gallery/components/HoverableImage.tsx index a93965ace0..5748b51aab 100644 --- a/frontend/src/features/gallery/components/HoverableImage.tsx +++ b/frontend/src/features/gallery/components/HoverableImage.tsx @@ -167,6 +167,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { className="hoverable-image" onMouseOver={handleMouseOver} onMouseOut={handleMouseOut} + userSelect={'none'} > { onMouseOver={ !shouldPinOptionsPanel ? cancelCloseOptionsPanelTimer : undefined } + style={{ + borderRight: !shouldPinOptionsPanel + ? '0.3rem solid var(--tab-list-text-inactive)' + : '', + }} >
Date: Sun, 20 Nov 2022 19:36:12 +1100 Subject: [PATCH 132/220] Removes reasonsWhyNotReady The popover doesn't play well with the button being disabled, and I don't think adds any value. --- .../components/ProcessButtons/InvokeButton.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx index 2d990dd41e..3b3c013511 100644 --- a/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx +++ b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx @@ -1,4 +1,4 @@ -import { ListItem, UnorderedList } from '@chakra-ui/react'; +import { Flex, ListItem, Tooltip, UnorderedList } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; import { FaPlay } from 'react-icons/fa'; import { readinessSelector } from 'app/selectors/readinessSelector'; @@ -36,7 +36,7 @@ export default function InvokeButton(props: InvokeButton) { [isReady, activeTabName] ); - const buttonComponent = ( + return (
{iconButton ? ( ); - - return isReady ? ( - buttonComponent - ) : ( - - {reasonsWhyNotReady && ( - - {reasonsWhyNotReady.map((reason, i) => ( - {reason} - ))} - - )} - - ); } From 3f6b275becfeccb2521c677e064d72aa3309f011 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 19:37:00 +1100 Subject: [PATCH 133/220] Image gallery resize/style tweaks --- .../gallery/components/ImageGallery.tsx | 50 ++++++++----------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index fe13751c14..89613bc4e9 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -40,6 +40,7 @@ import { BiReset } from 'react-icons/bi'; import IAICheckbox from 'common/components/IAICheckbox'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import _ from 'lodash'; +import IAIButton from 'common/components/IAIButton'; const GALLERY_SHOW_BUTTONS_MIN_WIDTH = 320; @@ -84,9 +85,9 @@ export default function ImageGallery() { } if (activeTabName === 'unifiedCanvas') { - dispatch(setGalleryWidth(190)); setGalleryMinWidth(190); - setGalleryMaxWidth(190); + setGalleryMaxWidth(450); + dispatch(setDoesCanvasNeedScaling(true)); } else if (activeTabName === 'img2img') { dispatch( setGalleryWidth(Math.min(Math.max(Number(galleryWidth), 0), 490)) @@ -140,7 +141,7 @@ export default function ImageGallery() { const handleChangeGalleryImageMinimumWidth = (v: number) => { dispatch(setGalleryImageMinimumWidth(v)); - dispatch(setDoesCanvasNeedScaling(true)); + // dispatch(setDoesCanvasNeedScaling(true)); }; const setCloseGalleryTimer = () => { @@ -277,6 +278,7 @@ export default function ImageGallery() { useEffect(() => { function handleClickOutside(e: MouseEvent) { if ( + !shouldPinGallery && galleryRef.current && !galleryRef.current.contains(e.target as Node) ) { @@ -287,7 +289,7 @@ export default function ImageGallery() { return () => { document.removeEventListener('mousedown', handleClickOutside); }; - }, [handleCloseGallery]); + }, [handleCloseGallery, shouldPinGallery]); return ( = 280 && !shouldShowButtons) { + if (newWidth >= 315 && !shouldShowButtons) { setShouldShowButtons(true); - } else if (newWidth < 280 && shouldShowButtons) { + } else if (newWidth < 315 && shouldShowButtons) { setShouldShowButtons(false); } @@ -377,24 +369,26 @@ export default function ImageGallery() { > {shouldShowButtons ? ( <> - - + Uploads + ) : ( <> } onClick={() => dispatch(setCurrentCategory('result'))} @@ -432,12 +426,8 @@ export default function ImageGallery() { onChange={handleChangeGalleryImageMinimumWidth} min={32} max={256} - // width={100} + hideTooltip={true} label={'Image Size'} - // formLabelProps={{ style: { fontSize: '0.9rem' } }} - // sliderThumbTooltipProps={{ - // label: `${galleryImageMinimumWidth}px`, - // }} /> Date: Sun, 20 Nov 2022 19:38:43 +1100 Subject: [PATCH 134/220] Styles buttons for clearing canvas history and mask --- .../IAICanvasToolbar/IAICanvasMaskOptions.tsx | 10 +++++++--- .../IAICanvasSettingsButtonPopover.tsx | 11 ++++++++++- frontend/src/features/canvas/store/canvasSlice.ts | 4 ++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index b0090b4fb1..a06a032e0a 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -10,7 +10,7 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; -import { FaMask } from 'react-icons/fa'; +import { FaMask, FaTrash } from 'react-icons/fa'; import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import IAIColorPicker from 'common/components/IAIColorPicker'; @@ -141,8 +141,12 @@ const IAICanvasMaskOptions = () => { color={maskColor} onChange={(newColor) => dispatch(setMaskColor(newColor))} /> - - Clear Mask + } + onClick={handleClearMask} + > + Clear Mask (Shift+C) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index cf78acfe4e..998114da22 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -1,6 +1,7 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { + clearCanvasHistory, setShouldAutoSave, setShouldDarkenOutsideBoundingBox, setShouldShowCanvasDebugInfo, @@ -11,10 +12,11 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; -import { FaWrench } from 'react-icons/fa'; +import { FaTrash, FaWrench } from 'react-icons/fa'; import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import IAIButton from 'common/components/IAIButton'; export const canvasControlsSelector = createSelector( [canvasSelector], @@ -103,6 +105,13 @@ const IAICanvasSettingsButtonPopover = () => { dispatch(setShouldShowCanvasDebugInfo(e.target.checked)) } /> + } + onClick={() => dispatch(clearCanvasHistory())} + > + Clear Canvas History + ); diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 56925db57f..879539265e 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -264,7 +264,7 @@ export const canvasSlice = createSlice({ setIsDrawing: (state, action: PayloadAction) => { state.isDrawing = action.payload; }, - setClearBrushHistory: (state) => { + clearCanvasHistory: (state) => { state.pastLayerStates = []; state.futureLayerStates = []; }, @@ -712,7 +712,7 @@ export const { setBrushColor, setBrushSize, setCanvasContainerDimensions, - setClearBrushHistory, + clearCanvasHistory, setCursorPosition, setDoesCanvasNeedScaling, setInitialCanvasImage, From 80f6f9a9315f3de55754cea1987685bcfd93043d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 19:58:47 +1100 Subject: [PATCH 135/220] First pass on Canvas options panel --- .../BoundingBoxDarkenOutside.tsx | 31 ------ .../BoundingBoxDimensionSlider.tsx | 104 ------------------ .../BoundingBoxSettings/BoundingBoxLock.tsx | 28 ----- .../BoundingBoxSettings.scss | 2 +- .../BoundingBoxSettings.tsx | 100 ++++++++++++++--- .../BoundingBoxVisibility.tsx | 29 ----- .../Inpainting/ClearBrushHistory.tsx | 52 --------- .../Inpainting/InpaintingSettings.tsx | 2 - 8 files changed, 88 insertions(+), 260 deletions(-) delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/ClearBrushHistory.tsx diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx deleted file mode 100644 index 41183192a3..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDarkenOutside.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAICheckbox from 'common/components/IAICheckbox'; -import { setShouldDarkenOutsideBoundingBox } from 'features/canvas/store/canvasSlice'; -import { createSelector } from '@reduxjs/toolkit'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; - -const selector = createSelector( - canvasSelector, - (canvas) => canvas.shouldDarkenOutsideBoundingBox -); - -export default function BoundingBoxDarkenOutside() { - const dispatch = useAppDispatch(); - const shouldDarkenOutsideBoundingBox = useAppSelector(selector); - - const handleChangeShouldShowBoundingBoxFill = () => { - dispatch( - setShouldDarkenOutsideBoundingBox(!shouldDarkenOutsideBoundingBox) - ); - }; - - return ( - - ); -} diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx deleted file mode 100644 index f2b222099d..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxDimensionSlider.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import React from 'react'; -import IAISlider from 'common/components/IAISlider'; - -import { useAppDispatch, useAppSelector } from 'app/store'; -import { createSelector } from '@reduxjs/toolkit'; -import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice'; - -import { roundDownToMultiple } from 'common/util/roundDownToMultiple'; -import _ from 'lodash'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; - -const selector = createSelector( - canvasSelector, - (canvas) => { - const { stageDimensions, boundingBoxDimensions, shouldLockBoundingBox } = - canvas; - return { - stageDimensions, - boundingBoxDimensions, - shouldLockBoundingBox, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -type BoundingBoxDimensionSlidersType = { - dimension: 'width' | 'height'; - label: string; -}; - -export default function BoundingBoxDimensionSlider( - props: BoundingBoxDimensionSlidersType -) { - const { dimension, label } = props; - const dispatch = useAppDispatch(); - const { shouldLockBoundingBox, stageDimensions, boundingBoxDimensions } = - useAppSelector(selector); - - const canvasDimension = stageDimensions[dimension]; - const boundingBoxDimension = boundingBoxDimensions[dimension]; - - const handleBoundingBoxDimension = (v: number) => { - if (dimension == 'width') { - dispatch( - setBoundingBoxDimensions({ - ...boundingBoxDimensions, - width: Math.floor(v), - }) - ); - } - - if (dimension == 'height') { - dispatch( - setBoundingBoxDimensions({ - ...boundingBoxDimensions, - height: Math.floor(v), - }) - ); - } - }; - - const handleResetDimension = () => { - if (dimension == 'width') { - dispatch( - setBoundingBoxDimensions({ - ...boundingBoxDimensions, - width: Math.floor(canvasDimension), - }) - ); - } - if (dimension == 'height') { - dispatch( - setBoundingBoxDimensions({ - ...boundingBoxDimensions, - height: Math.floor(canvasDimension), - }) - ); - } - }; - - return ( - - ); -} diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx deleted file mode 100644 index a1c87699db..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxLock.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAICheckbox from 'common/components/IAICheckbox'; -import { setShouldLockBoundingBox } from 'features/canvas/store/canvasSlice'; -import { createSelector } from '@reduxjs/toolkit'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; - -const selector = createSelector( - canvasSelector, - (canvas) => canvas.shouldLockBoundingBox -); - -export default function BoundingBoxLock() { - const shouldLockBoundingBox = useAppSelector(selector); - const dispatch = useAppDispatch(); - - const handleChangeShouldLockBoundingBox = () => { - dispatch(setShouldLockBoundingBox(!shouldLockBoundingBox)); - }; - return ( - - ); -} diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss index b9fd319458..b7df91c843 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss @@ -24,7 +24,7 @@ } p { - font-weight: bold; + // font-weight: bold; } } diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx index 018d16cca1..1bc0bb3260 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx @@ -1,23 +1,97 @@ -import { Flex } from '@chakra-ui/react'; -import BoundingBoxDarkenOutside from './BoundingBoxDarkenOutside'; -import BoundingBoxDimensionSlider from './BoundingBoxDimensionSlider'; -import BoundingBoxLock from './BoundingBoxLock'; -import BoundingBoxVisibility from './BoundingBoxVisibility'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAISlider from 'common/components/IAISlider'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice'; +import _ from 'lodash'; + +const selector = createSelector( + canvasSelector, + (canvas) => { + const { boundingBoxDimensions } = canvas; + return { + boundingBoxDimensions, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); const BoundingBoxSettings = () => { + const dispatch = useAppDispatch(); + const { boundingBoxDimensions } = useAppSelector(selector); + + const handleChangeWidth = (v: number) => { + dispatch( + setBoundingBoxDimensions({ + ...boundingBoxDimensions, + width: Math.floor(v), + }) + ); + }; + + const handleChangeHeight = (v: number) => { + dispatch( + setBoundingBoxDimensions({ + ...boundingBoxDimensions, + height: Math.floor(v), + }) + ); + }; + + const handleResetWidth = () => { + dispatch( + setBoundingBoxDimensions({ + ...boundingBoxDimensions, + width: Math.floor(512), + }) + ); + }; + + const handleResetHeight = () => { + dispatch( + setBoundingBoxDimensions({ + ...boundingBoxDimensions, + height: Math.floor(512), + }) + ); + }; + return (
-

Inpaint Box

- +

Canvas Bounding Box

- - - - - - + +
); diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx deleted file mode 100644 index fd2098d06b..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxVisibility.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { BiHide, BiShow } from 'react-icons/bi'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIIconButton from 'common/components/IAIIconButton'; -import { setShouldShowBoundingBox } from 'features/canvas/store/canvasSlice'; -import { createSelector } from '@reduxjs/toolkit'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; - -const selector = createSelector( - canvasSelector, - (canvas) => canvas.shouldShowBoundingBox -); - -export default function BoundingBoxVisibility() { - const shouldShowBoundingBox = useAppSelector(selector); - const dispatch = useAppDispatch(); - - const handleShowBoundingBox = () => - dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); - return ( - : } - onClick={handleShowBoundingBox} - background={'none'} - padding={0} - /> - ); -} diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/ClearBrushHistory.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/ClearBrushHistory.tsx deleted file mode 100644 index 42aa52a311..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/ClearBrushHistory.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { useToast } from '@chakra-ui/react'; -import { createSelector } from '@reduxjs/toolkit'; -import { useAppDispatch, useAppSelector } from 'app/store'; -import IAIButton from 'common/components/IAIButton'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import { setClearBrushHistory } from 'features/canvas/store/canvasSlice'; -import _ from 'lodash'; - -const selector = createSelector( - canvasSelector, - (canvas) => { - const { pastLayerStates, futureLayerStates } = canvas; - return { - mayClearBrushHistory: - futureLayerStates.length > 0 || pastLayerStates.length > 0 - ? false - : true, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -export default function ClearBrushHistory() { - const dispatch = useAppDispatch(); - const toast = useToast(); - - const { mayClearBrushHistory } = useAppSelector(selector); - - const handleClearBrushHistory = () => { - dispatch(setClearBrushHistory()); - toast({ - title: 'Brush Stroke History Cleared', - status: 'success', - duration: 2500, - isClosable: true, - }); - }; - return ( - - Clear Brush History - - ); -} diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx index 2c9181dfa1..33f97c1edd 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx @@ -1,13 +1,11 @@ import BoundingBoxSettings from './BoundingBoxSettings/BoundingBoxSettings'; import InpaintReplace from './InpaintReplace'; -import ClearBrushHistory from './ClearBrushHistory'; export default function InpaintingSettings() { return ( <> - ); } From d27d92325d0883d17123fe1111f2de750a22ddd0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 19:59:06 +1100 Subject: [PATCH 136/220] Fixes bug where discarding staged images results in loss of history --- frontend/src/features/canvas/store/canvasSlice.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 879539265e..0e0576c1c0 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -328,9 +328,17 @@ export const canvasSlice = createSlice({ state.futureLayerStates = []; }, discardStagedImages: (state) => { + state.pastLayerStates.push(_.cloneDeep(state.layerState)); + + if (state.pastLayerStates.length > state.maxHistory) { + state.pastLayerStates.shift(); + } + state.layerState.stagingArea = { ...initialLayerState.stagingArea, }; + + state.futureLayerStates = []; state.shouldShowStagingOutline = true; }, addLine: (state, action: PayloadAction) => { From e1e978b423b4ed5a4ea8a6531e499a3c43131d34 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 20:23:35 +1100 Subject: [PATCH 137/220] Adds Save to Gallery button to staging toolbar --- backend/invoke_ai_web_server.py | 55 +++++++++++++++++-- frontend/src/app/socketio/actions.ts | 7 ++- frontend/src/app/socketio/emitters.ts | 3 + frontend/src/app/socketio/middleware.ts | 6 ++ .../IAICanvasStagingAreaToolbar.tsx | 13 +++++ 5 files changed, 77 insertions(+), 7 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 65a2c60fed..e54f485619 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -32,9 +32,10 @@ opt = Args() args = opt.parse_args() # Set the root directory for static files and relative paths -args.root_dir = os.path.expanduser(args.root_dir or '..') +args.root_dir = os.path.expanduser(args.root_dir or "..") if not os.path.isabs(args.outdir): - args.outdir=os.path.join(args.root_dir,args.outdir) + args.outdir = os.path.join(args.root_dir, args.outdir) + class InvokeAIWebServer: def __init__(self, generate, gfpgan, codeformer, esrgan) -> None: @@ -80,7 +81,9 @@ class InvokeAIWebServer: socketio_args["cors_allowed_origins"] = opt.cors self.app = Flask( - __name__, static_url_path="", static_folder=os.path.join(args.root_dir,"frontend/dist") + __name__, + static_url_path="", + static_folder=os.path.join(args.root_dir, "frontend/dist"), ) self.socketio = SocketIO(self.app, **socketio_args) @@ -308,6 +311,50 @@ class InvokeAIWebServer: traceback.print_exc() print("\n") + @socketio.on("requestSaveStagingAreaImageToGallery") + def save_temp_image_to_gallery(url): + try: + image_path = self.get_image_path_from_url(url) + new_path = os.path.join(self.result_path, os.path.basename(image_path)) + shutil.copy2(image_path, new_path) + + if os.path.splitext(new_path)[1] == ".png": + metadata = retrieve_metadata(new_path) + else: + metadata = {} + + pil_image = Image.open(new_path) + + (width, height) = pil_image.size + + thumbnail_path = save_thumbnail( + pil_image, os.path.basename(new_path), self.thumbnail_image_path + ) + + image_array = [ + { + "url": self.get_url_from_image_path(new_path), + "thumbnail": self.get_url_from_image_path(thumbnail_path), + "mtime": os.path.getmtime(new_path), + "metadata": metadata, + "width": width, + "height": height, + "category": "result", + } + ] + + socketio.emit( + "galleryImages", + {"images": image_array, "category": "result"}, + ) + + except Exception as e: + self.socketio.emit("error", {"message": (str(e))}) + print("\n") + + traceback.print_exc() + print("\n") + @socketio.on("requestLatestImages") def handle_request_latest_images(category, latest_mtime): try: @@ -431,7 +478,7 @@ class InvokeAIWebServer: } ) except: - print(f'>> Unable to load {path}') + print(f">> Unable to load {path}") socketio.emit("error", {"message": f"Unable to load {path}"}) socketio.emit( diff --git a/frontend/src/app/socketio/actions.ts b/frontend/src/app/socketio/actions.ts index d21081bf5a..1699f1b751 100644 --- a/frontend/src/app/socketio/actions.ts +++ b/frontend/src/app/socketio/actions.ts @@ -3,7 +3,6 @@ import { GalleryCategory } from 'features/gallery/store/gallerySlice'; import { InvokeTabName } from 'features/tabs/components/InvokeTabs'; import * as InvokeAI from 'app/invokeai'; - /** * We can't use redux-toolkit's createSlice() to make these actions, * because they have no associated reducer. They only exist to dispatch @@ -26,8 +25,6 @@ export const requestNewImages = createAction( export const cancelProcessing = createAction( 'socketio/cancelProcessing' ); -// export const uploadImage = createAction('socketio/uploadImage'); -// export const uploadMaskImage = createAction('socketio/uploadMaskImage'); export const requestSystemConfig = createAction( 'socketio/requestSystemConfig' @@ -36,3 +33,7 @@ export const requestSystemConfig = createAction( export const requestModelChange = createAction( 'socketio/requestModelChange' ); + +export const saveStagingAreaImageToGallery = createAction( + 'socketio/saveStagingAreaImageToGallery' +); diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 4302bd8e67..6b4dde2825 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -171,6 +171,9 @@ const makeSocketIOEmitters = ( dispatch(modelChangeRequested()); socketio.emit('requestModelChange', modelName); }, + emitSaveStagingAreaImageToGallery: (url: string) => { + socketio.emit('requestSaveStagingAreaImageToGallery', url) + } }; }; diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 6beecca64e..84bbde12d4 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -58,6 +58,7 @@ export const socketioMiddleware = () => { emitCancelProcessing, emitRequestSystemConfig, emitRequestModelChange, + emitSaveStagingAreaImageToGallery, } = makeSocketIOEmitters(store, socketio); /** @@ -163,6 +164,11 @@ export const socketioMiddleware = () => { emitRequestModelChange(action.payload); break; } + + case 'socketio/saveStagingAreaImageToGallery': { + emitSaveStagingAreaImageToGallery(action.payload); + break; + } } next(action); diff --git a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx index a547f8b4ab..fc76c89a3f 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx @@ -10,6 +10,7 @@ import { FaCheck, FaEye, FaEyeSlash, + FaSave, FaTrash, } from 'react-icons/fa'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; @@ -22,6 +23,7 @@ import { setShouldShowStagingOutline, } from 'features/canvas/store/canvasSlice'; import { useHotkeys } from 'react-hotkeys-hook'; +import { saveStagingAreaImageToGallery } from 'app/socketio/actions'; const selector = createSelector( [canvasSelector], @@ -151,6 +153,17 @@ const IAICanvasStagingAreaToolbar = () => { } data-selected={true} /> + } + onClick={() => + dispatch( + saveStagingAreaImageToGallery(currentStagingAreaImage.image.url) + ) + } + data-selected={true} + /> Date: Sun, 20 Nov 2022 23:03:31 +1300 Subject: [PATCH 138/220] Rearrange some canvas toolbar icons Put brush stuff together and canvas movement stuff together --- .../IAICanvasToolChooserOptions.tsx | 32 ++---------- .../IAICanvasToolbar/IAICanvasToolbar.tsx | 51 +++++++++++++++---- 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx index 0e566f4a7b..fc32b7a5b6 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx @@ -8,12 +8,7 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; -import { - FaArrowsAlt, - FaEraser, - FaPaintBrush, - FaSlidersH, -} from 'react-icons/fa'; +import { FaEraser, FaPaintBrush, FaSlidersH } from 'react-icons/fa'; import { canvasSelector, isStagingSelector, @@ -52,18 +47,6 @@ const IAICanvasToolChooserOptions = () => { const { tool, brushColor, brushSize, brushColorString, isStaging } = useAppSelector(selector); - useHotkeys( - ['v'], - () => { - handleSelectMoveTool(); - }, - { - enabled: () => true, - preventDefault: true, - }, - [] - ); - useHotkeys( ['b'], () => { @@ -114,7 +97,6 @@ const IAICanvasToolChooserOptions = () => { const handleSelectBrushTool = () => dispatch(setTool('brush')); const handleSelectEraserTool = () => dispatch(setTool('eraser')); - const handleSelectMoveTool = () => dispatch(setTool('move')); return ( @@ -134,20 +116,12 @@ const IAICanvasToolChooserOptions = () => { isDisabled={isStaging} onClick={() => dispatch(setTool('eraser'))} /> - } - data-selected={tool === 'move' || isStaging} - onClick={handleSelectMoveTool} - /> - } /> } diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 7b94a1e7b0..878e1a3a14 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -4,11 +4,13 @@ import { resetCanvas, resetCanvasView, resizeAndScaleCanvas, + setTool, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; import { + FaArrowsAlt, FaCopy, FaCrosshairs, FaDownload, @@ -27,14 +29,21 @@ import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider'; import { systemSelector } from 'features/system/store/systemSelectors'; import IAICanvasToolChooserOptions from './IAICanvasToolChooserOptions'; import useImageUploader from 'common/hooks/useImageUploader'; +import { + canvasSelector, + isStagingSelector, +} from 'features/canvas/store/canvasSelectors'; export const selector = createSelector( - [systemSelector], - (system) => { + [systemSelector, canvasSelector, isStagingSelector], + (system, canvas, isStaging) => { const { isProcessing } = system; + const { tool } = canvas; return { isProcessing, + isStaging, + tool, }; }, { @@ -46,11 +55,23 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { isProcessing } = useAppSelector(selector); + const { isProcessing, isStaging, tool } = useAppSelector(selector); const canvasBaseLayer = getCanvasBaseLayer(); const { openUploader } = useImageUploader(); + useHotkeys( + ['v'], + () => { + handleSelectMoveTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [] + ); + useHotkeys( ['r'], () => { @@ -111,6 +132,8 @@ const IAICanvasOutpaintingControls = () => { [canvasBaseLayer, isProcessing] ); + const handleSelectMoveTool = () => dispatch(setTool('move')); + const handleResetCanvasView = () => { const canvasBaseLayer = getCanvasBaseLayer(); if (!canvasBaseLayer) return; @@ -170,6 +193,22 @@ const IAICanvasOutpaintingControls = () => { + + } + data-selected={tool === 'move' || isStaging} + onClick={handleSelectMoveTool} + /> + } + onClick={handleResetCanvasView} + /> + + { icon={} onClick={openUploader} /> - } - onClick={handleResetCanvasView} - /> Date: Sun, 20 Nov 2022 23:30:18 +1300 Subject: [PATCH 139/220] Fix gallery maxwidth on unified canvas --- frontend/src/features/gallery/components/ImageGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 89613bc4e9..09397eb2e2 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -86,7 +86,7 @@ export default function ImageGallery() { if (activeTabName === 'unifiedCanvas') { setGalleryMinWidth(190); - setGalleryMaxWidth(450); + setGalleryMaxWidth(190); dispatch(setDoesCanvasNeedScaling(true)); } else if (activeTabName === 'img2img') { dispatch( From f68702520bec69355eb97481d052f7b749673837 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 20 Nov 2022 23:41:10 +1300 Subject: [PATCH 140/220] Update Layer hotkey display to UI --- .../canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index a06a032e0a..bca6b53382 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -101,7 +101,7 @@ const IAICanvasMaskOptions = () => { return ( <> Date: Sun, 20 Nov 2022 21:39:02 +1100 Subject: [PATCH 141/220] Adds option to crop to bounding box on save --- .../IAICanvasSettingsButtonPopover.tsx | 31 +++++++++++++------ .../IAICanvasToolbar/IAICanvasToolbar.tsx | 15 ++++++--- .../src/features/canvas/store/canvasSlice.ts | 8 +++++ .../src/features/canvas/store/canvasTypes.ts | 1 + .../store/thunks/mergeAndUploadCanvas.ts | 17 ++++++++-- .../features/canvas/util/layerToDataURL.ts | 28 ++++++++++++----- 6 files changed, 76 insertions(+), 24 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index 998114da22..f0e1e196fd 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -3,6 +3,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { clearCanvasHistory, setShouldAutoSave, + setShouldCropToBoundingBoxOnSave, setShouldDarkenOutsideBoundingBox, setShouldShowCanvasDebugInfo, setShouldShowGrid, @@ -22,21 +23,23 @@ export const canvasControlsSelector = createSelector( [canvasSelector], (canvas) => { const { - shouldDarkenOutsideBoundingBox, - shouldShowIntermediates, - shouldShowGrid, - shouldSnapToGrid, shouldAutoSave, + shouldCropToBoundingBoxOnSave, + shouldDarkenOutsideBoundingBox, shouldShowCanvasDebugInfo, + shouldShowGrid, + shouldShowIntermediates, + shouldSnapToGrid, } = canvas; return { - shouldShowGrid, - shouldSnapToGrid, shouldAutoSave, + shouldCropToBoundingBoxOnSave, shouldDarkenOutsideBoundingBox, - shouldShowIntermediates, shouldShowCanvasDebugInfo, + shouldShowGrid, + shouldShowIntermediates, + shouldSnapToGrid, }; }, { @@ -49,12 +52,13 @@ export const canvasControlsSelector = createSelector( const IAICanvasSettingsButtonPopover = () => { const dispatch = useAppDispatch(); const { - shouldShowIntermediates, - shouldShowGrid, - shouldSnapToGrid, shouldAutoSave, + shouldCropToBoundingBoxOnSave, shouldDarkenOutsideBoundingBox, shouldShowCanvasDebugInfo, + shouldShowGrid, + shouldShowIntermediates, + shouldSnapToGrid, } = useAppSelector(canvasControlsSelector); return ( @@ -98,6 +102,13 @@ const IAICanvasSettingsButtonPopover = () => { isChecked={shouldAutoSave} onChange={(e) => dispatch(setShouldAutoSave(e.target.checked))} /> + + dispatch(setShouldCropToBoundingBoxOnSave(e.target.checked)) + } + /> { const { isProcessing } = system; - const { tool } = canvas; + const { tool, shouldCropToBoundingBoxOnSave } = canvas; return { isProcessing, isStaging, tool, + shouldCropToBoundingBoxOnSave, }; }, { @@ -55,7 +56,8 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { isProcessing, isStaging, tool } = useAppSelector(selector); + const { isProcessing, isStaging, tool, shouldCropToBoundingBoxOnSave } = + useAppSelector(selector); const canvasBaseLayer = getCanvasBaseLayer(); const { openUploader } = useImageUploader(); @@ -164,7 +166,8 @@ const IAICanvasOutpaintingControls = () => { const handleSaveToGallery = () => { dispatch( mergeAndUploadCanvas({ - cropVisible: true, + cropVisible: shouldCropToBoundingBoxOnSave ? false : true, + cropToBoundingBox: shouldCropToBoundingBoxOnSave, shouldSaveToGallery: true, }) ); @@ -173,7 +176,8 @@ const IAICanvasOutpaintingControls = () => { const handleCopyImageToClipboard = () => { dispatch( mergeAndUploadCanvas({ - cropVisible: true, + cropVisible: shouldCropToBoundingBoxOnSave ? false : true, + cropToBoundingBox: shouldCropToBoundingBoxOnSave, shouldCopy: true, }) ); @@ -182,7 +186,8 @@ const IAICanvasOutpaintingControls = () => { const handleDownloadAsImage = () => { dispatch( mergeAndUploadCanvas({ - cropVisible: true, + cropVisible: shouldCropToBoundingBoxOnSave ? false : true, + cropToBoundingBox: shouldCropToBoundingBoxOnSave, shouldDownload: true, }) ); diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 0e0576c1c0..c668aa12cf 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -64,6 +64,7 @@ const initialCanvasState: CanvasState = { minimumStageScale: 1, pastLayerStates: [], shouldAutoSave: false, + shouldCropToBoundingBoxOnSave: true, shouldDarkenOutsideBoundingBox: false, shouldLockBoundingBox: false, shouldPreserveMaskedArea: false, @@ -676,6 +677,12 @@ export const canvasSlice = createSlice({ setShouldShowCanvasDebugInfo: (state, action: PayloadAction) => { state.shouldShowCanvasDebugInfo = action.payload; }, + setShouldCropToBoundingBoxOnSave: ( + state, + action: PayloadAction + ) => { + state.shouldCropToBoundingBoxOnSave = action.payload; + }, setMergedCanvas: (state, action: PayloadAction) => { state.pastLayerStates.push({ ...state.layerState, @@ -737,6 +744,7 @@ export const { setMaskColor, setMergedCanvas, setShouldAutoSave, + setShouldCropToBoundingBoxOnSave, setShouldDarkenOutsideBoundingBox, setShouldLockBoundingBox, setShouldPreserveMaskedArea, diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 47ef56414c..ef28101d75 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -102,6 +102,7 @@ export interface CanvasState { minimumStageScale: number; pastLayerStates: CanvasLayerState[]; shouldAutoSave: boolean; + shouldCropToBoundingBoxOnSave: boolean; shouldDarkenOutsideBoundingBox: boolean; shouldLockBoundingBox: boolean; shouldPreserveMaskedArea: boolean; diff --git a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts index 99f457b260..d04c56fb24 100644 --- a/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts +++ b/frontend/src/features/canvas/store/thunks/mergeAndUploadCanvas.ts @@ -15,9 +15,11 @@ import { } from 'features/system/store/systemSlice'; import { addImage } from 'features/gallery/store/gallerySlice'; import { setMergedCanvas } from '../canvasSlice'; +import { CanvasState } from '../canvasTypes'; type MergeAndUploadCanvasConfig = { cropVisible?: boolean; + cropToBoundingBox?: boolean; shouldSaveToGallery?: boolean; shouldDownload?: boolean; shouldCopy?: boolean; @@ -26,6 +28,7 @@ type MergeAndUploadCanvasConfig = { const defaultConfig: MergeAndUploadCanvasConfig = { cropVisible: false, + cropToBoundingBox: false, shouldSaveToGallery: false, shouldDownload: false, shouldCopy: false, @@ -37,6 +40,7 @@ export const mergeAndUploadCanvas = async (dispatch, getState) => { const { cropVisible, + cropToBoundingBox, shouldSaveToGallery, shouldDownload, shouldCopy, @@ -48,7 +52,12 @@ export const mergeAndUploadCanvas = const state = getState() as RootState; - const stageScale = state.canvas.stageScale; + const { + stageScale, + boundingBoxCoordinates, + boundingBoxDimensions, + stageCoordinates, + } = state.canvas as CanvasState; const canvasBaseLayer = getCanvasBaseLayer(); @@ -61,7 +70,11 @@ export const mergeAndUploadCanvas = const { dataURL, boundingBox: originalBoundingBox } = layerToDataURL( canvasBaseLayer, - stageScale + stageScale, + stageCoordinates, + cropToBoundingBox + ? { ...boundingBoxCoordinates, ...boundingBoxDimensions } + : undefined ); if (!dataURL) { diff --git a/frontend/src/features/canvas/util/layerToDataURL.ts b/frontend/src/features/canvas/util/layerToDataURL.ts index abdbc0a21d..5e92eba5bc 100644 --- a/frontend/src/features/canvas/util/layerToDataURL.ts +++ b/frontend/src/features/canvas/util/layerToDataURL.ts @@ -1,6 +1,12 @@ import Konva from 'konva'; +import { IRect, Vector2d } from 'konva/lib/types'; -const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { +const layerToDataURL = ( + layer: Konva.Layer, + stageScale: number, + stageCoordinates: Vector2d, + boundingBox?: IRect +) => { const tempScale = layer.scale(); const relativeClientRect = layer.getClientRect({ @@ -14,13 +20,21 @@ const layerToDataURL = (layer: Konva.Layer, stageScale: number) => { }); const { x, y, width, height } = layer.getClientRect(); + const dataURLBoundingBox = boundingBox + ? { + x: Math.round(boundingBox.x + stageCoordinates.x), + y: Math.round(boundingBox.y + stageCoordinates.y), + width: Math.round(boundingBox.width), + height: Math.round(boundingBox.height), + } + : { + x: Math.round(x), + y: Math.round(y), + width: Math.round(width), + height: Math.round(height), + }; - const dataURL = layer.toDataURL({ - x: Math.round(x), - y: Math.round(y), - width: Math.round(width), - height: Math.round(height), - }); + const dataURL = layer.toDataURL(dataURLBoundingBox); // Unscale the canvas layer.scale(tempScale); From 90eaac51340d36ff50353329614d96262b96b91d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 21:39:15 +1100 Subject: [PATCH 142/220] Masking option tweaks --- .../components/IAICanvasToolbar/IAICanvasMaskOptions.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index bca6b53382..51bebb09a6 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -115,9 +115,8 @@ const IAICanvasMaskOptions = () => { triggerComponent={ } /> From 8a16c8a196bc6b4a6e262e4375ad5b4dc47b212f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 21:49:09 +1100 Subject: [PATCH 143/220] Crop to Bounding Box > Save Box Region Only --- .../IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx | 2 +- frontend/src/features/canvas/store/canvasSlice.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index f0e1e196fd..7388e751e7 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -103,7 +103,7 @@ const IAICanvasSettingsButtonPopover = () => { onChange={(e) => dispatch(setShouldAutoSave(e.target.checked))} /> dispatch(setShouldCropToBoundingBoxOnSave(e.target.checked)) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index c668aa12cf..de7c0b911a 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -64,7 +64,7 @@ const initialCanvasState: CanvasState = { minimumStageScale: 1, pastLayerStates: [], shouldAutoSave: false, - shouldCropToBoundingBoxOnSave: true, + shouldCropToBoundingBoxOnSave: false, shouldDarkenOutsideBoundingBox: false, shouldLockBoundingBox: false, shouldPreserveMaskedArea: false, From 6a3d725dbb56affed9ac17c79654bf7b9ba3f94d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 22:26:15 +1100 Subject: [PATCH 144/220] Adds clear temp folder --- backend/invoke_ai_web_server.py | 23 ++++++ frontend/src/app/socketio/actions.ts | 4 + frontend/src/app/socketio/emitters.ts | 7 +- frontend/src/app/socketio/listeners.ts | 11 +++ frontend/src/app/socketio/middleware.ts | 11 +++ .../IAICanvasSettingsButtonPopover.tsx | 2 + .../components/ClearTempFolderButtonModal.tsx | 74 +++++++++++++++++++ .../SettingsModal/SettingsModal.tsx | 1 + 8 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 frontend/src/features/system/components/ClearTempFolderButtonModal.tsx diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index e54f485619..81e2ee6013 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -311,6 +311,29 @@ class InvokeAIWebServer: traceback.print_exc() print("\n") + @socketio.on("requestEmptyTempFolder") + def empty_temp_folder(): + try: + temp_files = glob.glob(os.path.join(self.temp_image_path, "*")) + for f in temp_files: + try: + os.remove(f) + thumbnail_path = os.path.join( + self.thumbnail_image_path, + os.path.splitext(os.path.basename(f))[0] + ".webp", + ) + os.remove(thumbnail_path) + except Exception as e: + traceback.print_exc() + socketio.emit("error", {"message": f"Unable to delete {f}"}) + socketio.emit("tempFolderEmptied") + except Exception as e: + self.socketio.emit("error", {"message": (str(e))}) + print("\n") + + traceback.print_exc() + print("\n") + @socketio.on("requestSaveStagingAreaImageToGallery") def save_temp_image_to_gallery(url): try: diff --git a/frontend/src/app/socketio/actions.ts b/frontend/src/app/socketio/actions.ts index 1699f1b751..31894213b4 100644 --- a/frontend/src/app/socketio/actions.ts +++ b/frontend/src/app/socketio/actions.ts @@ -37,3 +37,7 @@ export const requestModelChange = createAction( export const saveStagingAreaImageToGallery = createAction( 'socketio/saveStagingAreaImageToGallery' ); + +export const emptyTempFolder = createAction( + 'socketio/requestEmptyTempFolder' +); diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index 6b4dde2825..a9eade2a14 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -172,8 +172,11 @@ const makeSocketIOEmitters = ( socketio.emit('requestModelChange', modelName); }, emitSaveStagingAreaImageToGallery: (url: string) => { - socketio.emit('requestSaveStagingAreaImageToGallery', url) - } + socketio.emit('requestSaveStagingAreaImageToGallery', url); + }, + emitRequestEmptyTempFolder: () => { + socketio.emit('requestEmptyTempFolder'); + }, }; }; diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index 82ace4b53e..f7189766da 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -15,6 +15,7 @@ import { errorOccurred, setModelList, setIsCancelable, + addToast, } from 'features/system/store/systemSlice'; import { @@ -368,6 +369,16 @@ const makeSocketIOListeners = ( }) ); }, + onTempFolderEmptied: () => { + dispatch( + addToast({ + title: 'Temp Folder Emptied', + status: 'success', + duration: 2500, + isClosable: true, + }) + ); + }, }; }; diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 84bbde12d4..308209d8bb 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -46,6 +46,7 @@ export const socketioMiddleware = () => { onSystemConfig, onModelChanged, onModelChangeFailed, + onTempFolderEmptied, } = makeSocketIOListeners(store); const { @@ -59,6 +60,7 @@ export const socketioMiddleware = () => { emitRequestSystemConfig, emitRequestModelChange, emitSaveStagingAreaImageToGallery, + emitRequestEmptyTempFolder, } = makeSocketIOEmitters(store, socketio); /** @@ -113,6 +115,10 @@ export const socketioMiddleware = () => { onModelChangeFailed(data); }); + socketio.on('tempFolderEmptied', () => { + onTempFolderEmptied(); + }); + areListenersSet = true; } @@ -169,6 +175,11 @@ export const socketioMiddleware = () => { emitSaveStagingAreaImageToGallery(action.payload); break; } + + case 'socketio/requestEmptyTempFolder': { + emitRequestEmptyTempFolder(); + break; + } } next(action); diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index 7388e751e7..bfe424e8cd 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -18,6 +18,7 @@ import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import IAIButton from 'common/components/IAIButton'; +import ClearTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal'; export const canvasControlsSelector = createSelector( [canvasSelector], @@ -123,6 +124,7 @@ const IAICanvasSettingsButtonPopover = () => { > Clear Canvas History
+ ); diff --git a/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx b/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx new file mode 100644 index 0000000000..84aed210b4 --- /dev/null +++ b/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx @@ -0,0 +1,74 @@ +import { + AlertDialog, + AlertDialogBody, + AlertDialogContent, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogOverlay, + Button, + useDisclosure, +} from '@chakra-ui/react'; +import { emptyTempFolder } from 'app/socketio/actions'; +import { useAppDispatch } from 'app/store'; +import IAIButton from 'common/components/IAIButton'; +import { + clearCanvasHistory, + resetCanvas, +} from 'features/canvas/store/canvasSlice'; +import { useRef } from 'react'; +import { FaTrash } from 'react-icons/fa'; + +const ClearTempFolderButtonModal = () => { + const dispatch = useAppDispatch(); + const { isOpen, onOpen, onClose } = useDisclosure(); + const cancelRef = useRef(null); + + const handleClear = () => { + dispatch(emptyTempFolder()); + dispatch(clearCanvasHistory()); + dispatch(resetCanvas()); + onClose(); + }; + + return ( + <> + } size={'sm'} onClick={onOpen}> + Clear Temp Image Folder + + + + + + + Clear Temp Image Folder + + + +

+ Clearing the temp image folder also fully resets the Unified + Canvas. This includes all undo/redo history, images in the + staging area, and the canvas base layer. +

+
+

Are you sure you want to clear the temp folder?

+
+ + + + + +
+
+
+ + ); +}; +export default ClearTempFolderButtonModal; diff --git a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx index 1608c6fec6..5bf25988cc 100644 --- a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -31,6 +31,7 @@ import { IN_PROGRESS_IMAGE_TYPES } from 'app/constants'; import IAISwitch from 'common/components/IAISwitch'; import IAISelect from 'common/components/IAISelect'; import IAINumberInput from 'common/components/IAINumberInput'; +import ClearTempFolderButtonModal from '../ClearTempFolderButtonModal'; const systemSelector = createSelector( (state: RootState) => state.system, From 3e221604624a4105842902bad085ec16a3270904 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 22:34:07 +1100 Subject: [PATCH 145/220] Updates mask options popover behavior --- .../components/IAICanvasToolbar/IAICanvasMaskOptions.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index 51bebb09a6..5036dfbc44 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -103,14 +103,14 @@ const IAICanvasMaskOptions = () => { ) => dispatch(setLayer(e.target.value as CanvasLayer)) } /> @@ -118,6 +118,7 @@ const IAICanvasMaskOptions = () => { aria-label="Masking Options" tooltip="Masking Options" icon={} + isDisabled={layer !== 'mask'} /> } From ef482b4d3e0a47f2e3d33681a0def12220f1da2c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 20 Nov 2022 22:42:47 +1100 Subject: [PATCH 146/220] Builds fresh bundle --- frontend/dist/assets/index.07a20ff8.css | 1 - frontend/dist/assets/index.5a2fccba.js | 623 ++++++++++++++++++++++++ frontend/dist/assets/index.c60403ea.js | 623 ------------------------ frontend/dist/assets/index.fc40251f.css | 1 + frontend/dist/index.html | 4 +- 5 files changed, 626 insertions(+), 626 deletions(-) delete mode 100644 frontend/dist/assets/index.07a20ff8.css create mode 100644 frontend/dist/assets/index.5a2fccba.js delete mode 100644 frontend/dist/assets/index.c60403ea.js create mode 100644 frontend/dist/assets/index.fc40251f.css diff --git a/frontend/dist/assets/index.07a20ff8.css b/frontend/dist/assets/index.07a20ff8.css deleted file mode 100644 index fe254c1328..0000000000 --- a/frontend/dist/assets/index.07a20ff8.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.5a2fccba.js b/frontend/dist/assets/index.5a2fccba.js new file mode 100644 index 0000000000..df91c5f0b0 --- /dev/null +++ b/frontend/dist/assets/index.5a2fccba.js @@ -0,0 +1,623 @@ +function mq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function I9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var zv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var LO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MO=Object.assign,OO={};function Q0(e,t,n){this.props=e,this.context=t,this.refs=OO,this.updater=n||LO}Q0.prototype.isReactComponent={};Q0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Q0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RO(){}RO.prototype=Q0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=OO,this.updater=n||LO}var D9=N9.prototype=new RO;D9.constructor=N9;MO(D9,Q0.prototype);D9.isPureReactComponent=!0;var gE=Array.isArray,IO=Object.prototype.hasOwnProperty,z9={current:null},NO={key:!0,ref:!0,__self:!0,__source:!0};function DO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)IO.call(t,r)&&!NO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=G[Z];if(0>>1;Zi(Be,j))Wei(dt,Be)?(G[Z]=dt,G[We]=j,Z=We):(G[Z]=Be,G[xe]=j,Z=xe);else if(Wei(dt,j))G[Z]=dt,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,ee(R);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function R(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var I=!1,N=null,z=-1,$=5,H=-1;function q(){return!(e.unstable_now()-H<$)}function de(){if(N!==null){var G=e.unstable_now();H=G;var Q=!0;try{Q=N(!0,G)}finally{Q?V():(I=!1,N=null)}}else I=!1}var V;if(typeof k=="function")V=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){E(de,0)};function ee(G){N=G,I||(I=!0,V())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,ee(R))},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,ee(R))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(zO);(function(e){e.exports=zO})(e0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var FO=C.exports,ca=e0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bw=Object.prototype.hasOwnProperty,Oq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Rq(e){return Bw.call(yE,e)?!0:Bw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Iq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nq(e,t,n,r){if(t===null||typeof t>"u"||Iq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var B9=/[\-:]([a-z])/g;function $9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qg(e):""}function Dq(e){switch(e.tag){case 5:return Qg(e.type);case 16:return Qg("Lazy");case 13:return Qg("Suspense");case 19:return Qg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Ip:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HO:return(e.displayName||"Context")+".Consumer";case $O:return(e._context.displayName||"Context")+".Provider";case V9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U9:return t=e.displayName||null,t!==null?t:Vw(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function zq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vw(t);case 8:return t===W9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function VO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fq(e){var t=VO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ry(e){e._valueTracker||(e._valueTracker=Fq(e))}function UO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=VO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){GO(e,t);var n=Jc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,Jc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jw(e,t,n){(t!=="number"||r5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Bq=["Webkit","ms","Moz","O"];Object.keys(vm).forEach(function(e){Bq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vm[t]=vm[e]})});function KO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vm.hasOwnProperty(e)&&vm[e]?(""+t).trim():t+"px"}function XO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=KO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function Xw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function _E(e){if(e=$v(e)){if(typeof Qw!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=_4(t),Qw(e.stateNode,e.type,t))}}function ZO(e){n0?r0?r0.push(e):r0=[e]:n0=e}function QO(){if(n0){var e=n0,t=r0;if(r0=n0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var oy=64,ay=4194304;function em(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function s5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=em(s):(o&=a,o!==0&&(r=em(o)))}else a=n&~i,a!==0?r=em(a):o!==0&&(r=em(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Sm),RE=String.fromCharCode(32),IE=!1;function yR(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function OK(e,t){switch(e){case"compositionend":return SR(t);case"keypress":return t.which!==32?null:(IE=!0,RE);case"textInput":return e=t.data,e===RE&&IE?null:e;default:return null}}function RK(e,t){if(Dp)return e==="compositionend"||!J9&&yR(e,t)?(e=mR(),v3=X9=Ic=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=FE(n)}}function CR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _R(){for(var e=window,t=r5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r5(e.document)}return t}function e7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WK(e){var t=_R(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&CR(n.ownerDocument.documentElement,n)){if(r!==null&&e7(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BE(n,o);var a=BE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,i6=null,xm=null,o6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r5(r)||(r=zp,"selectionStart"in r&&e7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xm&&ev(xm,r)||(xm=r,r=c5(i6,"onSelect"),0$p||(e.current=d6[$p],d6[$p]=null,$p--)}function jn(e,t){$p++,d6[$p]=e.current,e.current=t}var ed={},Wi=ud(ed),To=ud(!1),Yf=ed;function L0(e,t){var n=e.type.contextTypes;if(!n)return ed;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function f5(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==ed)throw Error(Re(168));jn(Wi,t),jn(To,n)}function RR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,zq(e)||"Unknown",i));return fr({},n,r)}function h5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ed,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=RR(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,k4=!1,ux=!1;function IR(e){su===null?su=[e]:su.push(e)}function eX(e){k4=!0,IR(e)}function cd(){if(!ux&&su!==null){ux=!0;var e=0,t=Pn;try{var n=su;for(Pn=1;e>=a,i-=a,uu=1<<32-ys(t)+i|n<z?($=N,N=null):$=N.sibling;var H=m(P,N,T[z],M);if(H===null){N===null&&(N=$);break}e&&N&&H.alternate===null&&t(P,N),k=o(H,k,z),I===null?R=H:I.sibling=H,I=H,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),R;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var q=m(P,N,H.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),I===null?R=q:I.sibling=q,I=q,N=$}if(H.done)return n(P,N),nr&&mf(P,z),R;if(N===null){for(;!H.done;z++,H=T.next())H=p(P,H.value,M),H!==null&&(k=o(H,k,z),I===null?R=H:I.sibling=H,I=H);return nr&&mf(P,z),R}for(N=r(P,N);!H.done;z++,H=T.next())H=v(N,P,z,H.value,M),H!==null&&(e&&H.alternate!==null&&N.delete(H.key===null?z:H.key),k=o(H,k,z),I===null?R=H:I.sibling=H,I=H);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var R=T.key,I=k;I!==null;){if(I.key===R){if(R=T.type,R===Np){if(I.tag===7){n(P,I.sibling),k=i(I,T.props.children),k.return=P,P=k;break e}}else if(I.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ec&&tP(R)===I.type){n(P,I.sibling),k=i(I,T.props),k.ref=Lg(P,I,T),k.return=P,P=k;break e}n(P,I);break}else t(P,I);I=I.sibling}T.type===Np?(k=Bf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=k3(T.type,T.key,T.props,null,P.mode,M),M.ref=Lg(P,k,T),M.return=P,P=M)}return a(P);case Ip:e:{for(I=T.key;k!==null;){if(k.key===I)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=vx(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return I=T._init,E(P,k,I(T._payload),M)}if(Jg(T))return S(P,k,T,M);if(kg(T))return w(P,k,T,M);hy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=mx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var O0=WR(!0),VR=WR(!1),Hv={},bl=ud(Hv),iv=ud(Hv),ov=ud(Hv);function Af(e){if(e===Hv)throw Error(Re(174));return e}function u7(e,t){switch(jn(ov,t),jn(iv,e),jn(bl,Hv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(iv),Zn(ov)}function UR(e){Af(ov.current);var t=Af(bl.current),n=qw(t,e.type);t!==n&&(jn(iv,e),jn(bl,n))}function c7(e){iv.current===e&&(Zn(bl),Zn(iv))}var ur=ud(0);function S5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cx=[];function d7(){for(var e=0;en?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function aI(){return Ba().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sI(e))lI(t,n);else if(n=FR(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),uI(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sI(e))lI(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FR(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),uI(n,t,r))}}function sI(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function lI(e,t){wm=b5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uI(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x5={readContext:Fa,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},aX={readContext:Fa,useCallback:function(e,t){return sl().memoizedState=[e,t===void 0?null:t],e},useContext:Fa,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,tI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:m7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),di===null)throw Error(Re(349));(Kf&30)!==0||YR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(KR.bind(null,r,o,e),[e]),r.flags|=2048,lv(9,qR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=di.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=av++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[rv]=r,yI(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Mg(o,!1),t.lanes=4194304)}else{if(!r)if(e=S5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Fi(t),null}else 2*Or()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Mg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,jn(ur,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function pX(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(a6=l5,e=_R(),e7(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s6={focusedElem:e,selectionRange:n},l5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:fs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function Cm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&C6(t,n,o)}i=i.next}while(i!==r)}}function T4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function _6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xI(e){var t=e.alternate;t!==null&&(e.alternate=null,xI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[rv],delete t[c6],delete t[QK],delete t[JK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wI(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wI(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function k6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=d5));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Ei=null,hs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)CI(e,t,n),n=n.sibling}function CI(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(b4,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Ei,i=hs;Ei=null,Sc(e,t,n),Ei=r,hs=i,Ei!==null&&(hs?(e=Ei,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ei.removeChild(n.stateNode));break;case 18:Ei!==null&&(hs?(e=Ei,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Qm(e)):lx(Ei,n.stateNode));break;case 4:r=Ei,i=hs,Ei=n.stateNode.containerInfo,hs=!0,Sc(e,t,n),Ei=r,hs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&C6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ss(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,_5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-b7?Ff(e,0):S7|=n),Lo(e,t)}function MI(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=ro();e=mu(e,t),e!==null&&(Fv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),MI(e,n)}function kX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),MI(e,n)}var OI;OI=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&NR(t,g5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Wi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,h5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E4,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=fs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,fs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),uP(e,t,r,i,n);case 3:e:{if(gI(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,BR(e,t),y5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=I0(Error(Re(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=I0(Error(Re(424)),t),t=cP(e,t,r,n,i);break e}else for(oa=Uc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,gs=null,n=VR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=vu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return UR(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),pI(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return mI(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,jn(m5,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=vu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Fa(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=fs(r,t.pendingProps),i=fs(r.type,i),lP(e,t,r,i,n);case 15:return fI(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h5(t)):e=!1,o0(t,n),HR(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return vI(e,t,n);case 22:return hI(e,t,n)}throw Error(Re(156,t.tag))};function RI(e,t){return oR(e,t)}function EX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(e,t,n,r){return new EX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Ia(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return Bf(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case WO:return L4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $O:a=10;break e;case HO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Bf(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L4(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=WO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function AX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Ol);const yy=I9(Ol.exports);var wP=Ol.exports;Fw.createRoot=wP.createRoot,Fw.hydrateRoot=wP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N4={exports:{}},D4={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,FX=IX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,BX={key:!0,ref:!0,__self:!0,__source:!0};function zI(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zX.call(t,r)&&!BX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NX,type:e,key:o,ref:a,props:i,_owner:FX.current}}D4.Fragment=DX;D4.jsx=zI;D4.jsxs=zI;(function(e){e.exports=D4})(N4);const Tn=N4.exports.Fragment,x=N4.exports.jsx,re=N4.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Wv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var HX="chakra-ui-color-mode";function WX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FI(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(A7.Provider,{value:T,children:n})}FI.displayName="ColorModeProvider";var M6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",I="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",q="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",ee="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[V]=Se[J]=Se[ie]=Se[ee]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[H]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[R]=Se[I]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Be=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Be||Function("return this")(),dt=t&&!t.nodeType&&t,Ye=dt&&!0&&e&&!e.nodeType&&e,rt=Ye&&Ye.exports===dt,Ze=rt&&xe.process,Ke=function(){try{var U=Ye&&Ye.require&&Ye.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Ke&&Ke.isTypedArray;function bt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,qe=Array(U);++pe-1}function x1(U,ne){var pe=this.__data__,qe=Ya(pe,U);return qe<0?(++this.size,pe.push([U,ne])):pe[qe][1]=ne,this}Io.prototype.clear=kd,Io.prototype.delete=b1,Io.prototype.get=Iu,Io.prototype.has=Ed,Io.prototype.set=x1;function Os(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&kh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),ne=Object(ne);++qe-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return _n.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Md=Fl(function(){return arguments}())?Fl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Hu(U)}function Eh(U){return Wn(U)&&Ht(U)}var $u=Zt||I1;function Hu(U){if(!Fo(U))return!1;var ne=Is(U);return ne==v||ne==S||ne==u||ne==T}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Fo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Is(U)!=k)return!1;var ne=an(U);if(ne===null)return!0;var pe=mn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&_n.call(pe)==Xt}var Th=Et?it(Et):Du;function Rd(U){return Gr(U,Ah(U))}function Ah(U){return Ht(U)?M1(U,!0):Ns(U)}var sn=qa(function(U,ne,pe,qe){No(U,ne,pe,qe)});function Wt(U){return function(){return U}}function Lh(U){return U}function I1(){return!1}e.exports=sn})(M6,M6.exports);const vl=M6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function cv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ls(e,t){return n=>{const r={property:n,scale:e};return r.transform=cv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?cv({scale:n,compose:r}):r}}var BI=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...BI].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...BI].join(" ")}var XX={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ZX={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function QX(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},$I="& > :not(style) ~ :not(style)",eZ={[$I]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[$I]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},R6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nZ=new Set(Object.values(R6)),HI=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||HI.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in R6?R6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=WI(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var WI=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,nn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(nn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||WI(e)||HI.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ls("borderWidths"),borderStyles:ls("borderStyles"),colors:ls("colors"),borders:ls("borders"),radii:ls("radii",nn.px),space:ls("space",by(nn.vh,nn.px)),spaceT:ls("space",by(nn.vh,nn.px)),degreeT(e){return{property:e,transform:nn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:cv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ls("sizes",by(nn.vh,nn.px)),sizesT:ls("sizes",by(nn.vh,nn.fraction)),shadows:ls("shadows"),logical:YX,blur:ls("blur",nn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",nn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:nn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",nn.gradient),bgClip:{transform:nn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var fn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},I6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(I6,{shadow:I6.boxShadow});var uZ={filter:{transform:nn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",nn.brightness),contrast:ae.propT("--chakra-contrast",nn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",nn.invert),saturate:ae.propT("--chakra-saturate",nn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",nn.dropShadow),backdropFilter:{transform:nn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",nn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",nn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",nn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",nn.saturate)},P5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:nn.flexDirection},experimental_spaceX:{static:eZ,transform:cv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:cv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(P5,{flexDir:P5.flexDirection});var VI={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:nn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",nn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},Em={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Em,{insetStart:Em.insetInlineStart,insetEnd:Em.insetInlineEnd});var yZ={ring:{transform:nn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={clipPath:!0,transform:ae.propT("transform",nn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},wZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",nn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function UI(e){return xs(e)&&e.reference?e.reference:String(e)}var z4=(e,...t)=>t.map(UI).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${z4("+",...e)})`,PP=(...e)=>`calc(${z4("-",...e)})`,N6=(...e)=>`calc(${z4("*",...e)})`,TP=(...e)=>`calc(${z4("/",...e)})`,AP=e=>{const t=UI(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(N6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:N6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function ei(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var GI=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(GI));function LP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function RZ(e){const t=Object.keys(L7(e));return new Set(t)}function MP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function nm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function IZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(GI).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:nm(null,u),minWQuery:nm(a),minMaxQuery:nm(a,u)}}),r=RZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>nm(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>jI(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>jI(t=>e(t,"~ &"),"[data-peer]",".peer"),jI=(e,...t)=>t.map(e).join(", "),F4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:tu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:tu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:tu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:tu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:tu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:tu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:tu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:tu(Ci.focusWithin),_peerPlaceholderShown:tu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(F4);function OP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function DZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=F4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function FZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var BZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return FZ(e,BZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:IZ(n.breakpoints)}),n}var M7=vl({},E3,fn,lZ,P5,Ta,uZ,yZ,cZ,VI,vZ,Em,I6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Ta,P5,VI,Em),jZ=Object.keys(GZ),YZ=[...Object.keys(M7),...NZ],qZ={...M7,...F4},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var YI=e=>t=>tQ({theme:t,pseudos:F4,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Pi(t1,--Ro):0,D0--,$r===10&&(D0=1,$4--),$r}function sa(){return $r=Ro2||fv($r)>3?"":" "}function SQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Vv(e,P3()+(t<6&&xl()==32&&sa()==32))}function B6(e){for(;sa();)switch($r){case e:return Ro;case 34:case 39:e!==34&&e!==39&&B6($r);break;case 40:e===41&&B6(e);break;case 92:sa();break}return Ro}function bQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Vv(t,Ro-1)+"*"+B4(e===47?e:sa())}function xQ(e){for(;!fv(xl());)sa();return Vv(e,Ro)}function wQ(e){return JI(A3("",null,null,null,[""],e=QI(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,I=r,N=T;E;)switch(S=k,k=sa()){case 40:if(S!=108&&Pi(N,p-1)==58){F6(N+=bn(T3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=T3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(P3()-1,7);continue;case 47:switch(xl()){case 42:case 47:xy(CQ(bQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&xy(v>32?IP(N+";",r,n,p-1):IP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(I=RP(N,t,n,u,h,i,s,T,M=[],R=[],p),o),k===123)if(h===0)A3(N,t,I,I,M,o,p,s,R);else switch(m===99&&Pi(N,3)===110?100:m){case 100:case 109:case 115:A3(e,I,I,r&&xy(RP(e,I,I,0,0,i,s,T,i,M=[],p),R),i,R,p,s,r?M:R);break;default:A3(N,I,I,I,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=T3(sa())),m=xl(),h=p=cl(T=N+=xQ(P3())),k++;break;case 45:S===45&&cl(N)==2&&(w=0)}}return o}function RP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=I7(m),S=0,w=0,E=0;S0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return H4(e,t,n,i===0?O7:s,l,u,h)}function CQ(e,t,n){return H4(e,t,n,qI,B4(mQ()),dv(e,2,-2),0)}function IP(e,t,n,r){return H4(e,t,n,R7,dv(e,0,r),dv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=I7(e),i=0;i6)switch(Pi(e,t+1)){case 109:if(Pi(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+T5+(Pi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~F6(e,"stretch")?tN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pi(e,t+1)!==115)break;case 6444:switch(Pi(e,cl(e)-3-(~F6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Pi(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Pi(e,t+11)){case 114:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Bi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case R7:t.return=tN(t.value,t.length);break;case KI:return s0([Rg(t,{value:bn(t.value,"@","@"+hn)})],i);case O7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Rg(t,{props:[bn(o,/:(read-\w+)/,":"+T5+"$1")]})],i);case"::placeholder":return s0([Rg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Rg(t,{props:[bn(o,/:(plac\w+)/,":"+T5+"$1")]}),Rg(t,{props:[bn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},RQ=[OQ],nN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||RQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},Sx=eN(function(e){return uN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),FP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!uN(t)&&typeof n=="number"&&n!==0?n+"px":n};function hv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,hv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function cJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},mN=dJ(cJ);function vN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var yN=e=>vN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function SN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var mJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vJ=eN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return sN(n,r,i),KQ(function(){return lN(n,r,i)}),null},xJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||WP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),RJ=Ln("list").parts("container","item","icon"),IJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),FJ=Ln("progress").parts("label","filledTrack","track"),BJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Li(e,t){YJ(e)&&(e="100%");var n=qJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function wy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function bN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Li(e,255)*255,g:Li(t,255)*255,b:Li(n,255)*255}}function UP(e,t,n){e=Li(e,255),t=Li(t,255),n=Li(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XJ(e,t,n){var r,i,o;if(e=Li(e,360),t=Li(t,100),n=Li(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Li(e,255),t=Li(t,255),n=Li(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var V6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=bN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),xx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),ds={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ds.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ds.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ds.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ds.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ds.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ds.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ds.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=ds.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=ds.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=ds.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function nu(e){return Boolean(ds.CSS_UNIT.exec(String(e)))}var Uv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=eee(t)),this.originalInput=t;var i=tee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=bN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),QJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Li(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Li(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=wy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=wy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=wy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=wy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(xN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Uv(a)}function oee(e,t){var n=uee(e),r=A5(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A5([0,100],t.seed);var n=wN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return A5([r,i],t.seed)}function see(e,t,n){var r=lee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return A5([r,i],n.seed)}function lee(e,t){for(var n=wN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=_N.find(function(a){return a.name===e});if(n){var r=CN(n);if(r.hueRange)return r.hueRange}var i=new Uv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function wN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=_N;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function CN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var _N=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function cee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ti=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new Uv(r);return i?r:n},fee=e=>t=>{const n=Ti(t,e);return new Uv(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ti(n,e);return new Uv(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function pee(e){const t=xN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function mee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function kN(e){return yee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(kN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${eS("+",...e)})`,XP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,ZP=(...e)=>`calc(${eS("/",...e)})`,QP=e=>{const t=kN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(U6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:U6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function EN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,EN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${EN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Gv,defineMultiStyleConfig:Ree}=rr(_J.keys),la=ei("alert-fg"),yu=ei("alert-bg"),Iee=Gv({container:{bg:yu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark}}}}),Dee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),zee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),Fee=Gv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[yu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[yu.variable]:`colors.${t}.200`},color:la.reference}}}),Bee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Fee},$ee=Ree({baseStyle:Iee,variants:Bee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),PN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Hee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...PN,...Hee,container:Wee},TN=Vee,Uee=e=>typeof e=="function";function fi(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:AN,defineMultiStyleConfig:Gee}=rr(kJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},Yee={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},JP=ei("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},Kee=AN(e=>({badge:fi(jee,e),excessLabel:fi(Yee,e),container:fi(qee,e)}));function xc(e){const t=e!=="100%"?TN[e]:void 0;return AN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),yl=ei("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[u0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:u0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},Tm={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},LN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},ute=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(LN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=cte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},fte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:LN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:vte}=rr(PJ.keys),Am=ei("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Am.reference,h:Am.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=L3(e=>({icon:xte,container:Ste,control:fi(yte,e),label:bte})),Cte={sm:L3({control:{[Am.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Am.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Am.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L5=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Lm=Vi("close-button-size"),Ig=Vi("close-button-bg"),_te={w:[Lm.reference],h:[Lm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ig.variable]:"colors.blackAlpha.100",_dark:{[Ig.variable]:"colors.whiteAlpha.100"}},_active:{[Ig.variable]:"colors.blackAlpha.200",_dark:{[Ig.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ig.reference},kte={lg:{[Lm.variable]:"sizes.10",fontSize:"md"},md:{[Lm.variable]:"sizes.8",fontSize:"xs"},sm:{[Lm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=Tm,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Rte={opacity:.6,borderColor:"inherit"},Ite={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Ite,dashed:Nte},zte={baseStyle:Rte,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:Fte}=rr(TJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function vp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Bte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=G6(e=>({overlay:Bte,dialogContainer:$te,dialog:fi(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},qte=Fte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),c0=ei("form-control-color"),ine={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},one={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),d0=ei("form-error-color"),cne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r),boxShadow:`0 0 0 1px ${Ti(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ti(t,n),boxShadow:`0 0 0 1px ${Ti(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r)},_focusVisible:{bg:"transparent",borderColor:Ti(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r),boxShadow:`0px 1px 0px 0px ${Ti(t,r)}`},_focusVisible:{borderColor:Ti(t,n),boxShadow:`0px 1px 0px 0px ${Ti(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(RJ.keys),Rne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Ine=One({icon:Rne}),Nne=Mne({baseStyle:Ine}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(IJ.keys),Fne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Bne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:fi(Fne,e),item:fi(Bne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:j6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=j6(e=>({overlay:Yne,dialogContainer:fi(qne,e),dialog:fi(Kne,e),header:Xne,closeButton:Zne,body:fi(Qne,e),footer:Jne}));function us(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:us("xs"),sm:us("sm"),md:us("md"),lg:us("lg"),xl:us("xl"),"2xl":us("2xl"),"3xl":us("3xl"),"4xl":us("4xl"),"5xl":us("5xl"),"6xl":us("6xl"),full:us("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},MN=rre,{defineMultiStyleConfig:ire,definePartsStyle:ON}=rr(DJ.keys),V7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu(V7).add("0.5rem").toString(),are={[V7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=fi(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[V7.reference]},ure=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),cre=ON(e=>({root:are,field:fi(sre,e)??{},stepperGroup:lre,stepper:fi(ure,e)??{}}));function _y(e){var t,n;const r=(t=pn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=MN.fontSizes[o];return ON({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,gre={outline:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),ky=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[ky.variable]:"colors.white",bg:ky.reference,[Sre.variable]:ky.reference,[nT.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:rm}=rr(FJ.keys),Are=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ti(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Rre=rm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Ire={xs:rm({track:{h:"1"}}),sm:rm({track:{h:"2"}}),md:rm({track:{h:"3"}}),lg:rm({track:{h:"4"}})},Nre=Tre({sizes:Ire,baseStyle:Rre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:M3}=rr(BJ.keys),zre=e=>{var t;const n=(t=fi(L5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Fre=M3(e=>{var t,n,r,i;return{label:(n=(t=L5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L5).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Bre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Fre,sizes:Bre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Ey={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Ey}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Ey}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Ey}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Ey},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=ei("skeleton-start-color"),Kre=ei("skeleton-end-color"),Xre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ti(o,r),s=Ti(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Ex=ei("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:tS}=rr(HJ.keys),mv=ei("slider-thumb-size"),vv=ei("slider-track-size"),Mc=ei("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...$7({orientation:e.orientation,horizontal:{h:vv.reference},vertical:{w:vv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...$7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:mv.reference,h:mv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=tS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=tS({container:{[mv.variable]:"sizes.4",[vv.variable]:"sizes.1"}}),sie=tS({container:{[mv.variable]:"sizes.3.5",[vv.variable]:"sizes.1"}}),lie=tS({container:{[mv.variable]:"sizes.2.5",[vv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:IN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=IN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:IN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:O3}=rr(VJ.keys),Mm=Vi("switch-track-width"),$f=Vi("switch-track-height"),Px=Vi("switch-track-diff"),Cie=lu.subtract(Mm,$f),Y6=Vi("switch-thumb-x"),Ng=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Mm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Ng.variable]:"colors.gray.300",_dark:{[Ng.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ng.variable]:`colors.${t}.500`,_dark:{[Ng.variable]:`colors.${t}.200`}},bg:Ng.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${Y6.reference})`}},Eie=O3(e=>({container:{[Px.variable]:Cie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:lu(Px).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:O3({container:{[Mm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:O3({container:{[Mm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:O3({container:{[Mm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:f0}=rr(UJ.keys),Lie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),M5={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Rie={simple:Mie,striped:Oie,unstyled:{}},Iie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Rie,sizes:Iie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Fie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Bie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Fie(e),tablist:Bie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Uie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gie=wl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ti(n,`${t}.700`),bg:Ti(n,`${t}.100`)}}}}),Yie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},roe={subtle:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},Py=Vi("tooltip-bg"),Tx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[uoe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:Tm,Breadcrumb:ste,Button:mte,Checkbox:L5,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},woe=xoe,Coe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_oe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...MN,sizes:TN,shadows:woe,space:PN,borders:poe,transition:Poe},Roe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Ioe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Roe,direction:Noe,...Ooe,components:foe,styles:Ioe,config:Doe},Foe=typeof Element<"u",Boe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function R3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!R3(e[r],t[r]))return!1;return!0}var o;if(Boe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!R3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Hoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Foe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!R3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return R3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function n1(){const e=C.exports.useContext(pv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function NN(){const e=Wv(),t=n1();return{...e,theme:t}}function Voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Uoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Goe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return re(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q4,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function qoe(){const{colorMode:e}=Wv();return x(Q4,{styles:t=>{const n=mN(t,"styles.global"),r=SN(n,{theme:t,colorMode:e});return r?YI(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=vN(a,(p,m)=>KZ(m)),l=SN(e,t),u=Object.assign({},i,l,yN(s),o),h=YI(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Wv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function DN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=NN(),a=e?mN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},yN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return DN(e,t)}function Ri(e,t={}){return DN(e,t)}function Joe(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bn(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>Bn(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O5=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function oae(){const e=C.exports.useRef(new iae);return q6(()=>()=>e.current.destroy()),e.current}var[aae,zN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=zN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function FN(){return[O5(aae),()=>O5(zN()),()=>oae(),i=>sae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),bT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function lae(){return C.exports.useContext(rS).visualElement}const r1=C.exports.createContext(null),ah=typeof document<"u",R5=ah?C.exports.useLayoutEffect:C.exports.useEffect,BN=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext(BN),a=C.exports.useContext(r1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return R5(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),R5(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function yv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||dae.some(t=>yv(e[t]))}function $N(e){return Boolean(oS(e)||e.variants)}function fae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||yv(n)?n:void 0,animate:yv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Sv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?Sv.projectionNodeConstructor=e[t]:Sv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Om={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return aS(()=>{if(Om.hasEverUpdated)return gae++})}const G7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const HN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext(BN).strict,P=C.exports.useContext(HN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Sv.projectionNodeConstructor,P))}return re(vae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function j7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const I5={};function Cae(e){Object.assign(I5,e)}const N5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jv=new Set(N5);function WN(e,{layout:t,layoutId:n}){return jv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!I5[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>N5.indexOf(e)-N5.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function VN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,UN=(e,t)=>n=>Math.max(Math.min(n,t),e),Rm=e=>e%1?Number(e.toFixed(5)):e,bv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Yv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},sh),{transform:UN(0,1)}),Ty=Object.assign(Object.assign({},sh),{default:1}),qv=e=>({test:t=>Yv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=qv("deg"),Cl=qv("%"),wt=qv("px"),Aae=qv("vh"),Lae=qv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),Y7=(e,t)=>n=>Boolean(Yv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),GN=(e,t,n)=>r=>{if(!Yv(r))return r;const[i,o,a,s]=r.match(bv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:Y7("hsl","hue"),parse:GN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Rm(t))+", "+Cl.transform(Rm(n))+", "+Rm(Im.transform(r))+")"},Mae=UN(0,255),Lx=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:Y7("rgb","red"),parse:GN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Rm(Im.transform(r))+")"};function Oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const X6={test:Y7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||X6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):X6.parse(e),transform:e=>Yv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},jN="${c}",YN="${n}";function Rae(e){var t,n,r,i;return isNaN(e)&&Yv(e)&&((n=(t=e.match(bv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function qN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,jN),t.push(...r.map(Ji.parse)));const i=e.match(bv);return i&&(e=e.replace(bv,YN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function KN(e){return qN(e).values}function XN(e){const{values:t,numColors:n,tokenised:r}=qN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Nae(e){const t=KN(e);return XN(e)(t.map(Iae))}const Su={test:Rae,parse:KN,createTransformer:XN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Fae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},Su),{getAnimatableNone:e=>{const t=e.match(Fae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},ZN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Im,strokeOpacity:Im,numOctaves:CT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(VN(m)){o[m]=v;continue}const S=ZN[m],w=Pae(v,S);if(jv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Eae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function QN(e,t,n){for(const r in t)!ws(t[r])&&!WN(r,n)&&(e[r]=t[r])}function Bae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return QN(i,r,e),Object.assign(i,Bae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Gae,...Vae,...Wae,...Uae]);function D5(e){return jae.has(e)}let JN=e=>!D5(e);function Yae(e){!e||(JN=t=>t.startsWith("on")?!D5(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(JN(i)||n===!0&&D5(i)||!t&&!D5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Qae(p,o,a,s,!1)}const eD=()=>({...K7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=eD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};QN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const tD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function nD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const rD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function iD(e,t,n,r){nD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(rD.has(i)?i:tD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||WN(r,e))&&(n[r]=t[r]);return n}function oD(e){const t=Z7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const xv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),aD=e=>xv(e)?e[e.length-1]||0:e;function I3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const sD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(r1),o=()=>nse(e,t,r,i);return n?o():aS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=I3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=$N(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:sD({scrapeMotionValuesFromProps:oD,createRenderState:eD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),iD(t,n)}})},ose={useVisualState:sD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function lD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function uD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:uD(e)?cse(e,t):dse(e,t)}}const cD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function dD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function h0(e,t,n,r){return sS(e,dD(t),cD(n,t==="pointerdown"),r)}function z5(e,t,n,r){return Q6(e,dD(t),n&&cD(n,t==="pointerdown"),r)}function fD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=fD("dragHorizontal"),ET=fD("dragVertical");function hD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function pD(){const e=hD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!lD(r)||pD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z5(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),z5(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const gD=(e,t)=>t?e===t?!0:gD(e,t.parentElement):!1;function e8(e){return C.exports.useEffect(()=>()=>e(),[])}function mD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Mx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=B5(bse,xse,a),e=B5(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cse=12;function _se(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=mD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=J6(T,k);v=R=>{const I=Math.exp(-k*T*R);return n-I*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const I=Math.exp(-k*T*R);return k*T*I*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-I*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const I=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-I*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,wv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[X6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),vD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce(Lse);function yD(e,t){return eC(e)?n=>wr(e,t,n):Ji.test(e)?vD(e,t):bD(e,t)}const SD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>yD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=yD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function RT(e){const t=Su.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=Su.createTransformer(t),r=RT(e),i=RT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(SD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Rse(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?vD:bD;if(Array.isArray(e))return SD;if(typeof e=="object")return Mse}function Ise(e,t,n){const r=[],i=n||Rse(e[0]),o=e.length-1;for(let a=0;an(wv(e,t,r))}function Dse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=wv(e[o],e[o+1],i);return t[o](s)}}function xD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;F5(o===t.length),F5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Ise(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(B5(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),wD=e=>t=>t*t*((e+1)*t-e),Fse=e=>{const t=wD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},CD=1.525,Bse=4/11,$se=8/11,Hse=9/10,r8=e=>e,i8=zse(2),Wse=uS(i8),_D=n8(i8),kD=e=>1-Math.sin(Math.acos(e)),o8=uS(kD),Vse=n8(o8),a8=wD(CD),Use=uS(a8),Gse=n8(a8),jse=Fse(CD),Yse=4356/361,qse=35442/1805,Kse=16061/1805,$5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-$5(1-e*2)):.5*$5(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||_D).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function N3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return xD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const IT={keyframes:N3,spring:t8,decay:tle};function nle(e){if(Array.isArray(e.to))return N3;if(IT[e.type])return IT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t8:N3}const ED=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),PD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),ED);function ile(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ile(()=>Cv=!0),e),{}),ale=Kv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||ule(),n.schedule(r,i,o)),e},{}),sle=Kv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});Kv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const lle=e=>cS[e].process(p0),TD=e=>{Cv=!1,p0.delta=tC?ED:Math.max(Math.min(e-p0.timestamp,ole),1),p0.timestamp=e,nC=!0,Kv.forEach(lle),nC=!1,Cv&&(tC=!1,PD(TD))},ule=()=>{Cv=!0,tC=!0,nC||PD(TD)},cle=()=>p0;function AD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?AD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function LD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=mD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,I=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=xD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function H(){k++,l==="reverse"?(I=k%2===0,a=dle(a,T,u,I)):(a=AD(a,T,u),l==="mirror"&&$.flipTarget()),R=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(I||(J=-J),a+=J,!R){const ie=$.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),R=I?ie.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{p?.(),P.stop()}}}function MD(e,t){return t?e*(1e3/t):0}function ple({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;p?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let I,N;const z=$=>{I=N,N=$,t=MD($-I,cle().delta),(R===1&&$>M||R===-1&&$S?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s8(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=NT(e)&&NT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const OD=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ID=e=>3*e,H5=(e,t,n)=>((OD(t,n)*e+RD(t,n))*e+ID(t))*e,ND=(e,t,n)=>3*OD(t,n)*e*e+2*RD(t,n)*e+ID(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H5(o(a),t,r)}function wle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!pD()}function p(S,w){!h()||(gD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}z5(i,"pointerdown",o?v:void 0,l),e8(u)}const Cle="production",DD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function zD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const iC=new WeakMap,Rx=new WeakMap,_le=e=>{const t=iC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Rx.has(n)||Rx.set(n,{});const r=Rx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ale[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(DD!=="production"&&zD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Fc=e=>t=>(e(t),null),Ole={inView:Fc(Tle),tap:Fc(wle),focus:Fc(sse),hover:Fc(vse)};function l8(){const e=C.exports.useContext(r1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Rle(){return Ile(C.exports.useContext(r1))}function Ile(e){return e===null?!0:e.isPresent}function FD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Nle={linear:r8,easeIn:i8,easeInOut:_D,easeOut:Wse,circIn:kD,circInOut:Vse,circOut:o8,backIn:a8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:$5},zT=e=>{if(Array.isArray(e)){F5(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",FT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Su.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ix=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),BT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:My,scaleY:My,scale:My,opacity:Ix,backgroundColor:Ix,color:Ix,default:My},Fle=(e,t)=>{let n;return xv(t)?n=zle:n=BT[e]||BT.default,{to:t,...n(t)}},Ble={...ZN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:Z6,WebkitFilter:Z6},u8=e=>Ble[e];function c8(e,t){var n;let r=u8(e);return r!==Z6&&(r=Su),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},BD=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),$D=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),BD);function Wle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Wle(()=>_v=!0),e),{}),Cs=Xv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(_v||Gle(),n.schedule(r,i,o)),e},{}),Qf=Xv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Xv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),Ule=e=>dS[e].process(g0),HD=e=>{_v=!1,g0.delta=oC?BD:Math.max(Math.min(e-g0.timestamp,Vle),1),g0.timestamp=e,aC=!0,Xv.forEach(Ule),aC=!1,_v&&(oC=!1,$D(HD))},Gle=()=>{_v=!0,oC=!0,aC||$D(HD)},sC=()=>g0;function WD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W5(o.duration)),o.repeatDelay&&(a.repeatDelay=W5(o.repeatDelay)),e&&(a.ease=Dle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function qle(e,t){var n,r;return(r=(n=(d8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Fle(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=d8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=FT(e,n);a==="none"&&s&&typeof n=="string"?a=c8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=FT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?ple({...p,...o}):LD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=aD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function HT(e){return typeof e=="number"?0:c8("",e)}function d8(e,t){return e[t]||e.default||e}function f8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=WD(l,W5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function h8(e,t){e.indexOf(t)===-1&&e.push(t)}function p8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nm{constructor(){this.subscriptions=[]}add(t){return h8(this.subscriptions,t),()=>p8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Nm,this.velocityUpdateSubscribers=new Nm,this.renderSubscribers=new Nm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Cs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?MD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new tue(e)}const VD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},UD=[sh,wt,Cl,Cc,Lae,Aae,nue],Dg=e=>UD.find(VD(e)),rue=[...UD,Ji,Su],iue=e=>rue.find(VD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=aD(o[a]);sue(e,a,s)}}function uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;slC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=GD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>GD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return hue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function GD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&jv.has(m)&&(w={...w,type:!1,delay:0});let E=f8(m,v,S,w);V5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(pue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...g8].reverse(),vue=g8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&I;const q=Array.isArray(R)?R:[R];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=ee=>{H=!0,S.delete(ee),M.needsAnimating[ee]=!0};for(const ee in J){const X=de[ee],G=V[ee];w.hasOwnProperty(ee)||(X!==G?xv(X)&&xv(G)?!FD(X,G)||$?ie(ee):M.protectedKeys[ee]=!0:X!==void 0?ie(ee):S.add(ee):X!==void 0&&S.has(ee)?ie(ee):M.protectedKeys[ee]=!0)}M.prevProp=R,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(H=!1),H&&!z&&v.push(...q.map(ee=>({animation:ee,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Fc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Fc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l8(),o=C.exports.useContext(r1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class jD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Dx(h,this.transformPagePoint),lD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},uD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:WT(e,YD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function YD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=YD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function da(e){return e.max-e.min}function VT(e,t=0,n=.01){return s8(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Pue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=wv(t.min,t.max-r,e.min):r>i&&(n=wv(e.min,e.max-i,t.min)),B5(0,1,n)}function Lue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uC=.35;function Mue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),ki=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function qD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Rue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Fx(e)||!Fx(t)||!Fx(n)}function yf(e){return cC(e)||KD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function KD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function U5(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=U5(e,i,r)),U5(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function XD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Iue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=hD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=da(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=$ue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new jD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=qD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f8(t,r,0,n)}stopAnimation(){ll(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ll(n=>{const{drag:r}=this.getProps();if(!Oy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ll(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;Fue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ll(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Bue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new jD(h,l,{transformPagePoint:s})}z5(i,"pointerdown",o&&u),e8(()=>a.current&&a.current.end())}const Vue={pan:Fc(Wue),drag:Fc(Hue)},fC={current:null},QD={current:!1};function Uue(){if(QD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Ry=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ry.map(()=>new Nm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ry.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Ry[i]]=o=>r.add(o),n["notify"+Ry[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),V5(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),V5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const JD=Object.keys(Sv),Yue=JD.length,ez=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const R=Gue(),I=new Map,N=new Map;let z={};const $={...k},H=p.initial?{...k}:{};let q;function de(){!M||!P||(V(),o(M,T,p.style,j.projection))}function V(){t(j,T,k,E,p)}function J(){R.notifyUpdate(k)}function ie(Z,me){const Se=me.onChange(Be=>{k[Z]=Be,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:ee,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),V5(ee)&&ee.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=oS(p),Q=$N(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),I.forEach((me,Se)=>ie(Se,me)),QD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),R.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Be,We){const dt=[];for(let Ye=0;Yej.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return dt},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),I.set(Z,me),k[Z]=me.get(),ie(Z,me)},removeValue(Z){var me;I.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>I.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=I.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>I.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=Q7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Be=n(p,Z);if(Be!==void 0&&!ws(Be))return Be}return H[Z]!==void 0&&xe===void 0?void 0:$[Z]},...R,build(){return V(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,R.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),rz=e=>Zue.has(e),Que=e=>Object.keys(e).some(rz),iz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},Jue=new Set(["x","y","z"]),ece=N5.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},nce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);iz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(rz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Dg(h);const m=t[l];let v;if(xv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Dg(h);for(let E=w;E=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const oz={treeType:"dom",readValueFromInstance(e,t){if(jv.has(t)){const n=u8(t);return n&&n.default||0}else{const n=ace(e),r=(VN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ZD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:nD},sce=ez(oz),lce=ez({...oz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return jv.has(t)?((n=u8(t))===null||n===void 0?void 0:n.default)||0:(t=rD.has(t)?t:tD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:oD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:iD}),uce=(e,t)=>j7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(nz,v=>(o.push(v),lA)));const a=Su.parse(e);if(a.length>5)return r;const s=Su.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Om.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Cs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function fce(e){const[t,n]=l8(),r=C.exports.useContext(G7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(HN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...zg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zg,borderTopRightRadius:zg,borderBottomLeftRadius:zg,borderBottomRightRadius:zg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return f8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const az=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=az.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(wv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function cs(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=U5(e,1/n,r),i!==void 0&&(e=U5(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function lz(e){return mA(e.x)&&mA(e.y)}function uz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return da(e.x)/da(e.y)}function Cce(e,t,n=.1){return s8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){h8(this.members,t),t.scheduleRender()}remove(t){if(p8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){h8(this.children,t),this.isDirty=!0}remove(t){p8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function cz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Oce),this.nodes.forEach(Rce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=WD(v,250),Om.hasAnimatedSinceResize&&(Om.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Fce,{onLayoutAnimationStart:I,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!uz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const H={...d8(R,"layout"),onPlay:I,onComplete:N};p.shouldReduceMotion&&(H.delay=0,H.type=!1),this.startAnimation(H)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Qf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Ice))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(zm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Om.hasAnimatedSinceResize=!0,this.currentAnimation=gce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&dz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}cs(s,l),Yp(s,h),Dm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Tce(e){e.updateLayout()}function Ace(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):dz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=Fm();Dm(l,o,i.layout);const u=Fm();i.isShared?Dm(u,e.applyTransform(a,!0),i.measured):Dm(u,o,i.layout);const h=!lz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=ki();zm(S,i.layout,m.layout);const w=ki();zm(w,o,v.actual),uz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Oce(e){e.resolveTargetDelta()}function Rce(e){e.calcProjection()}function Ice(e){e.resetRotation()}function Nce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Fce={duration:.45,ease:[.4,0,.1,1]};function Bce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function dz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=cz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bx={current:void 0},Hce=cz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Bx.current=e}return Bx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Rl=xae((e,t)=>ase(e,t,Wce,uce,Hce));function fz(){const e=C.exports.useRef(!1);return R5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=fz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(jce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Gce,{isPresent:n,children:e})),x(r1.Provider,{value:u,children:e})};function jce(){return new Map}const Op=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const fd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",zD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=fz(),h=qce(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(R5(()=>{w.current=!1,Yce(h,S),v.current=p}),e8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Tn,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const E=v.current.map(Op),P=h.map(Op),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),I=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(R,0,x($x,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),DD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Tn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Fg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function mC(e){switch(e?.direction??"right"){case"right":return Fg.slideRight;case"left":return Fg.slideLeft;case"bottom":return Fg.slideDown;case"top":return Fg.slideUp;default:return Fg.slideRight}}var Wf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??_s.enter(TA.enter,i)})},pz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(fd,{initial:!1,custom:w,children:E&&le.createElement(Rl.div,{ref:t,...p,className:Zv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});pz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},gz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(fd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-fade",o),custom:m,...gz,animate:h,...u})})});ede.displayName="Fade";var tde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},mz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(fd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-offset-slide",s),...mz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},vz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(fd,{custom:P,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Zv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});vz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(fd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});ode.displayName="SlideFade";var Qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,pS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[lde,m8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ude,LPe,cde,dde]=FN(),If=Pe(function(t,n){const{getButtonProps:r}=m8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Qv("chakra-accordion__button",t.className),__css:a})});If.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,v8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const H={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.node.focus()}}[z.key];H&&(z.preventDefault(),H(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),I=C.exports.useCallback(function($={},H=null){return{...$,type:"button",ref:Bn(m,s,H),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx($.onClick,T),onFocus:Hx($.onFocus,R),onKeyDown:Hx($.onKeyDown,M)}},[h,t,w,T,R,M,p,m]),N=C.exports.useCallback(function($={},H=null){return{...$,ref:H,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:I,getPanelProps:N,htmlProps:i}}function gde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function mde(e){hS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function vde(e){hS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function yde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=m8(),{reduceMotion:r}=v8(),i=Qv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:Qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v8(),{getPanelProps:s,isOpen:l}=m8(),u=s(o,n),h=Qv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(pz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:Qv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=dd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Jv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Jv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function wde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[kde,y8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),yz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Jv,colorScheme:"blue"}};function Ede(e){return yz[e].colorScheme}function Pde(e){return yz[e].icon}var Sz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});Sz.displayName="Alert";var bz=Pe(function(t,n){const i={display:"inline",...y8().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});bz.displayName="AlertDescription";function xz(e){const{status:t}=_de(),n=Pde(t),r=y8(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}xz.displayName="AlertIcon";var wz=Pe(function(t,n){const r=y8();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});wz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G5=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G5.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:G5,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G5,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G5,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Jv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Rde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var $a=Pe((e,t)=>{const n=Ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=gn(e),k=C.exports.useMemo(()=>{const I={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:I}}},[r,n]),{ref:T,type:M}=Rde(E),R={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:SS("chakra-button",w),...P},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...R})):x(OA,{...R}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re(Tn,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var a1=(...e)=>e.filter(Boolean).join(" "),Iy=e=>e?"":void 0,Wx=e=>e?!0:void 0;function RA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ide,Cz]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nde,s1]=xn({strict:!1,name:"FormControlContext"});function Dde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Bn(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Iy(E),"data-disabled":Iy(i),"data-invalid":Iy(r),"data-readonly":Iy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Bn(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),I=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:I}}var hd=Pe(function(t,n){const r=Ri("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=a1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Ide,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});hd.displayName="FormControl";var zde=Pe(function(t,n){const r=s1(),i=Cz(),o=a1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function S8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b8(e){const t=s1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:RA(t?.onFocus,h),onBlur:RA(t?.onBlur,p)}}var[Fde,Bde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$de=Pe((e,t)=>{const n=Ri("FormError",e),r=gn(e),i=s1();return i?.isInvalid?le.createElement(Fde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:a1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Bde(),r=s1();if(!r?.isInvalid)return null;const i=a1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(_z,{}),optionalIndicator:l=null,...u}=i,h=s1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:a1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});lh.displayName="FormLabel";var _z=Pe(function(t,n){const r=s1(),i=Cz();if(!r?.isRequired)return null;const o=a1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});_z.displayName="RequiredIndicator";function td(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var x8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:x8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:x8});Vde.displayName="VisuallyHiddenInput";var IA=!1,bS=null,B0=!1,bC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function w8(e,t){bC.forEach(n=>n(e,t))}function NA(e){B0=!0,Gde(e)&&(bS="keyboard",w8("keyboard",e))}function yp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(B0=!0,w8("pointer",e))}function jde(e){e.target===window||e.target===document||(B0||(bS="keyboard",w8("keyboard",e)),B0=!1)}function Yde(){B0=!1}function DA(){return bS!=="pointer"}function qde(){if(typeof window>"u"||IA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){B0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),IA=!0}function Kde(e){qde(),e(DA());const t=()=>e(DA());return bC.add(t),()=>{bC.delete(t)}}var[MPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function efe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function kz(e={}){const t=b8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,I=nfe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[H,q]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[ee,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Be=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),td(()=>{n&&V(!1)},[n,V]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,dt=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),Ye=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&<.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(ee),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&H),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Pa(Ae.onMouseDown,Ot),onMouseUp:Pa(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Pa(Ae.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Ae.onMouseLeave,()=>ie(!1))}},[ee,xe,n,de,H,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...I,...Ae,ref:Bn(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Pa(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[I,n,xe,o,Q]),Ke=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:Bn(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Pa(Ae.onChange,Be),onBlur:Pa(Ae.onBlur,z,()=>V(!1)),onFocus:Pa(Ae.onFocus,$,()=>V(!0)),onKeyDown:Pa(Ae.onKeyDown,dt),onKeyUp:Pa(Ae.onKeyUp,Ye),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x8}),[w,E,a,Be,z,$,dt,Ye,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Pa(Ae.onMouseDown,zA),onTouchStart:Pa(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:ee,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Ke,getLabelProps:Et,htmlProps:I}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=dd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=dd({from:{opacity:0},to:{opacity:1}}),sfe=dd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Ez=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ri("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:I,getLabelProps:N,getRootProps:z}=kz({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),H=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...I()},H),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Ez.displayName="Checkbox";function lfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=gn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(lfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function j5(e,t,n){return(e-t)*100/(n-t)}function Pz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C8(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Tz(_c(v),o),w=n??S,E=C.exports.useCallback(H=>{H!==v&&(m||p(H.toString()),u?.(H.toString(),_c(H)))},[u,m,v]),P=C.exports.useCallback(H=>{let q=H;return l&&(q=m0(q,a,s)),C8(q,w)},[w,l,s,a]),k=C.exports.useCallback((H=o)=>{let q;v===""?q=_c(H):q=_c(v)+H,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((H=o)=>{let q;v===""?q=_c(-H):q=_c(v)-H,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let H;r==null?H="":H=Vx(r,o,n)??a,E(H)},[r,n,o,E,a]),R=C.exports.useCallback(H=>{const q=Vx(H,o,w)??a;E(q)},[w,o,E,a]),I=_c(v);return{isOutOfRange:I>s||Ix(Q4,{styles:Az}),ffe=()=>x(Q4,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Az} + `});function Vf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function hfe(e){return"current"in e}var Lz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Lz()&&e.test(navigator.vendor),mfe=e=>Lz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function FA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function kv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=FA(n),a=FA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function _8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=gn(i),s=S8(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k8.displayName="Input";k8.id="Input";var[Cfe,Mz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=gn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=_8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Mz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});E8.displayName="InputAddon";var Oz=Pe(function(t,n){return x(E8,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Oz.displayName="InputLeftAddon";Oz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(E8,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Mz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(Pfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var Iz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});Iz.id="InputLeftElement";Iz.displayName="InputLeftElement";var Nz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Nz.id="InputRightElement";Nz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function nd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:nd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var pd=we("div");pd.displayName="Box";var Dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(pd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Dz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(Dz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var zz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});zz.displayName="Center";var Ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Ofe[r],...i,position:"absolute"})});var Rfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Rfe.displayName="Code";var Ife=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ife.displayName="Container";var Nfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=gn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Nfe.displayName="Divider";var rn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});rn.displayName="Flex";var Fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Fz.displayName="Grid";function BA(e){return nd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=_8({gridArea:r,gridColumn:BA(i),gridRow:BA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(pd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});Gf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Ffe,Bz]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P8=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Ffe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P8.displayName="List";var Bfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Bfe.displayName="OrderedList";var $fe=Pe(function(t,n){const{as:r,...i}=t;return x(P8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});$fe.displayName="UnorderedList";var Hfe=Pe(function(t,n){const r=Bz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Hfe.displayName="ListItem";var Wfe=Pe(function(t,n){const r=Bz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Wfe.displayName="ListIcon";var Vfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=n1(),h=s?Gfe(s,u):jfe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Vfe.displayName="SimpleGrid";function Ufe(e){return typeof e=="number"?`${e}px`:e}function Gfe(e,t){return nd(e,n=>{const r=Goe("sizes",n,Ufe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function jfe(e){return nd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var $z=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});$z.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function Yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[CC]:nd(n,i=>r[i])}}function qfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":nd(n,i=>r[i])}}var Hz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Hz.displayName="StackItem";var T8=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>qfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=yS(l);return P?M:M.map((R,I)=>{const N=typeof R.key<"u"?R.key:I,z=I+1===M.length,H=p?x(Hz,{children:R},N):R;if(!E)return H;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return re(C.exports.Fragment,{children:[H,de]},N)})},[u,w,E,P,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[CC]:S[CC]},...m},k)});T8.displayName="Stack";var Wz=Pe((e,t)=>x(T8,{align:"center",...e,direction:"row",ref:t}));Wz.displayName="HStack";var Vz=Pe((e,t)=>x(T8,{align:"center",...e,direction:"column",ref:t}));Vz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=_8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var Kfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>nd(w,k=>$A(O6("space",k)(P))),"--chakra-wrap-y-spacing":P=>nd(E,k=>$A(O6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,E)=>x(Uz,{children:w},E)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});Kfe.displayName="Wrap";var Uz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Uz.displayName="WrapItem";var Xfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Gz=Xfe,Sp=()=>{},Zfe={document:Gz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Sp,removeEventListener:Sp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Sp,removeListener:Sp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Sp,setInterval:()=>0,clearInterval:Sp},Qfe=Zfe,Jfe={window:Qfe,document:Gz},jz=typeof window<"u"?{window,document}:Jfe,Yz=C.exports.createContext(jz);Yz.displayName="EnvironmentContext";function qz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:jz},[r,n]);return re(Yz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}qz.displayName="EnvironmentProvider";var ehe=e=>e?"":void 0;function the(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function nhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=the(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},R=w?p:p||0,I=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Ux(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Ux(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),H=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Ux(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),V=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),ie=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),ee=Bn(t,M);return w?{...S,ref:ee,type:"button","aria-disabled":I?void 0:n,disabled:I,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:ee,role:"button","data-active":ehe(P),"aria-disabled":n?"true":void 0,tabIndex:I?void 0:R,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:H,onKeyDown:$,onMouseOver:J,onMouseLeave:ie}}function Kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Xz(e){if(!Kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function rhe(e){var t;return((t=Zz(e))==null?void 0:t.defaultView)??window}function Zz(e){return Kz(e)?e.ownerDocument:document}function ihe(e){return Zz(e).activeElement}var Qz=e=>e.hasAttribute("tabindex"),ohe=e=>Qz(e)&&e.tabIndex===-1;function ahe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Jz(e){return e.parentElement&&Jz(e.parentElement)?!0:e.hidden}function she(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function eF(e){if(!Xz(e)||Jz(e)||ahe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():she(e)?!0:Qz(e)}function lhe(e){return e?Xz(e)&&eF(e)&&!ohe(e):!1}var uhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],che=uhe.join(),dhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function tF(e){const t=Array.from(e.querySelectorAll(che));return t.unshift(e),t.filter(n=>eF(n)&&dhe(n))}function fhe(e){const t=e.current;if(!t)return!1;const n=ihe(t);return!n||t.contains(n)?!1:!!lhe(n)}function hhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;td(()=>{if(!o||fhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var phe={preventScroll:!0,shouldFocus:!1};function ghe(e,t=phe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=mhe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=tF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);td(()=>{h()},[h]),Vf(a,"transitionend",h)}function mhe(e){return"current"in e}var Mo="top",Ha="bottom",Wa="right",Oo="left",A8="auto",e2=[Mo,Ha,Wa,Oo],$0="start",Ev="end",vhe="clippingParents",nF="viewport",Bg="popper",yhe="reference",HA=e2.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+Ev])},[]),rF=[].concat(e2,[A8]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+Ev])},[]),She="beforeRead",bhe="read",xhe="afterRead",whe="beforeMain",Che="main",_he="afterMain",khe="beforeWrite",Ehe="write",Phe="afterWrite",The=[She,bhe,xhe,whe,Che,_he,khe,Ehe,Phe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Ua(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Ua(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Ua(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L8(e){if(typeof ShadowRoot>"u")return!1;var t=Ua(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ahe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!za(o)||!Tl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Lhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Mhe={name:"applyStyles",enabled:!0,phase:"write",fn:Ahe,effect:Lhe,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,Y5=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function iF(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=Jf(e)?Ua(e):window,s=a.visualViewport,l=!iF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M8(e){var t=W0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function oF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Ua(e).getComputedStyle(e)}function Ohe(e){return["table","td","th"].indexOf(Tl(e))>=0}function gd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(L8(e)?e.host:null)||gd(e)}function WA(e){return!za(e)||bu(e).position==="fixed"?null:e.offsetParent}function Rhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&za(e)){var r=bu(e);if(r.position==="fixed")return null}var i=CS(e);for(L8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function t2(e){for(var t=Ua(e),n=WA(e);n&&Ohe(n)&&bu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&bu(n).position==="static")?t:n||Rhe(e)||t}function O8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return jf(e,Y5(t,n))}function Ihe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function aF(){return{top:0,right:0,bottom:0,left:0}}function sF(e){return Object.assign({},aF(),e)}function lF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Nhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,sF(typeof t!="number"?t:lF(t,e2))};function Dhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=O8(s),u=[Oo,Wa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Nhe(i.padding,n),m=M8(o),v=l==="y"?Mo:Oo,S=l==="y"?Ha:Wa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=t2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],R=k-m[h]-p[S],I=k/2-m[h]/2+T,N=Bm(M,I,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-I,t)}}function zhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!oF(t.elements.popper,i)||(t.elements.arrow=i))}const Fhe={name:"arrow",enabled:!0,phase:"main",fn:Dhe,effect:zhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $he(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,R=window;if(u){var I=t2(n),N="clientHeight",z="clientWidth";if(I===Ua(n)&&(I=gd(n),bu(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),I=I,i===Mo||(i===Oo||i===Wa)&&o===Ev){M=Ha;var $=p&&I===R&&R.visualViewport?R.visualViewport.height:I[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Ha)&&o===Ev){T=Wa;var H=p&&I===R&&R.visualViewport?R.visualViewport.width:I[z];v-=H-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&Bhe),de=h===!0?$he({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},q,(V={},V[M]=k?"0":"",V[T]=P?"0":"",V.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:_l(t.placement),variation:V0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hhe,data:{}};var Ny={passive:!0};function Vhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ua(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const Uhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vhe,data:{}};var Ghe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return Ghe[t]})}var jhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return jhe[t]})}function R8(e){var t=Ua(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function I8(e){return W0(gd(e)).left+R8(e).scrollLeft}function Yhe(e,t){var n=Ua(e),r=gd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=iF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+I8(e),y:l}}function qhe(e){var t,n=gd(e),r=R8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+I8(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N8(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function uF(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&N8(e)?e:uF(CS(e))}function $m(e,t){var n;t===void 0&&(t=[]);var r=uF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ua(r),a=i?[o].concat(o.visualViewport||[],N8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat($m(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Khe(e,t){var n=W0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===nF?kC(Yhe(e,n)):Jf(t)?Khe(t,n):kC(qhe(gd(e)))}function Xhe(e){var t=$m(CS(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&za(e)?t2(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&oF(i,r)&&Tl(i)!=="body"}):[]}function Zhe(e,t,n,r){var i=t==="clippingParents"?Xhe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=jf(h.top,l.top),l.right=Y5(h.right,l.right),l.bottom=Y5(h.bottom,l.bottom),l.left=jf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function cF(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Ha:l={x:a,y:t.y+t.height};break;case Wa:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Ev:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Pv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?vhe:s,u=n.rootBoundary,h=u===void 0?nF:u,p=n.elementContext,m=p===void 0?Bg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=sF(typeof E!="number"?E:lF(E,e2)),k=m===Bg?yhe:Bg,T=e.rects.popper,M=e.elements[S?k:m],R=Zhe(Jf(M)?M:M.contextElement||gd(e.elements.popper),l,h,a),I=W0(e.elements.reference),N=cF({reference:I,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),$=m===Bg?z:I,H={top:R.top-$.top+P.top,bottom:$.bottom-R.bottom+P.bottom,left:R.left-$.left+P.left,right:$.right-R.right+P.right},q=e.modifiersData.offset;if(m===Bg&&q){var de=q[i];Object.keys(H).forEach(function(V){var J=[Wa,Ha].indexOf(V)>=0?1:-1,ie=[Mo,Ha].indexOf(V)>=0?"y":"x";H[V]+=de[ie]*J})}return H}function Qhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?rF:l,h=V0(r),p=h?s?HA:HA.filter(function(S){return V0(S)===h}):e2,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Pv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Jhe(e){if(_l(e)===A8)return[];var t=z3(e);return[UA(e),t,UA(t)]}function epe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[z3(E)]:Jhe(E)),M=[E].concat(T).reduce(function(xe,Be){return xe.concat(_l(Be)===A8?Qhe(t,{placement:Be,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Be)},[]),R=t.rects.reference,I=t.rects.popper,N=new Map,z=!0,$=M[0],H=0;H=0,ie=J?"width":"height",ee=Pv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?V?Wa:Oo:V?Ha:Mo;R[ie]>I[ie]&&(X=z3(X));var G=z3(X),Q=[];if(o&&Q.push(ee[de]<=0),s&&Q.push(ee[X]<=0,ee[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Be){var We=M.find(function(dt){var Ye=N.get(dt);if(Ye)return Ye.slice(0,Be).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const tpe={name:"flip",enabled:!0,phase:"main",fn:epe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Wa,Ha,Oo].some(function(t){return e[t]>=0})}function npe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Pv(t,{elementContext:"reference"}),s=Pv(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const rpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:npe};function ipe(e,t,n){var r=_l(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Wa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function ope(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=rF.reduce(function(h,p){return h[p]=ipe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const ape={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ope};function spe(e){var t=e.state,n=e.name;t.modifiersData[n]=cF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lpe={name:"popperOffsets",enabled:!0,phase:"read",fn:spe,data:{}};function upe(e){return e==="x"?"y":"x"}function cpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Pv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=V0(t.placement),T=!k,M=O8(P),R=upe(M),I=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,H=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!I){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Ha:Wa,ee=M==="y"?"height":"width",X=I[M],G=X+E[J],Q=X-E[ie],j=v?-z[ee]/2:0,Z=k===$0?N[ee]:z[ee],me=k===$0?-z[ee]:-N[ee],Se=t.elements.arrow,xe=v&&Se?M8(Se):{width:0,height:0},Be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aF(),We=Be[J],dt=Be[ie],Ye=Bm(0,N[ee],xe[ee]),rt=T?N[ee]/2-j-Ye-We-H.mainAxis:Z-Ye-We-H.mainAxis,Ze=T?-N[ee]/2+j+Ye+dt+H.mainAxis:me+Ye+dt+H.mainAxis,Ke=t.elements.arrow&&t2(t.elements.arrow),Et=Ke?M==="y"?Ke.clientTop||0:Ke.clientLeft||0:0,bt=(V=q?.[M])!=null?V:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Bm(v?Y5(G,Ae):G,X,v?jf(Q,it):Q);I[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,Cn=M==="x"?Ha:Wa,Pt=I[R],Kt=R==="y"?"height":"width",_n=Pt+E[xt],mn=Pt-E[Cn],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[R])!=null?lt:0,Xt=Oe?_n:Pt-N[Kt]-z[Kt]-Je+H.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-H.altAxis:mn,ke=v&&Oe?Ihe(Xt,Pt,jt):Bm(v?Xt:_n,Pt,v?jt:mn);I[R]=ke,de[R]=ke-Pt}t.modifiersData[r]=de}}const dpe={name:"preventOverflow",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"]};function fpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function hpe(e){return e===Ua(e)||!za(e)?R8(e):fpe(e)}function ppe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&ppe(t),o=gd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||N8(o))&&(s=hpe(t)),za(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=I8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function mpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function vpe(e){var t=mpe(e);return The.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ype(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Spe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:bp("--popper-arrow-shadow-color"),arrowSize:bp("--popper-arrow-size","8px"),arrowSizeHalf:bp("--popper-arrow-size-half"),arrowBg:bp("--popper-arrow-bg"),transformOrigin:bp("--popper-transform-origin"),arrowOffset:bp("--popper-arrow-offset")};function Cpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var _pe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},kpe=e=>_pe[e],XA={scroll:!0,resize:!0};function Epe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var Ppe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Tpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,kpe(e.placement))},Ape={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Lpe(e)}},Lpe=e=>{var t;if(!e.placement)return;const n=Mpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Mpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Ope={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Cpe(e.placement)})},Rpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ipe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Npe(e,t="ltr"){var n;const r=((n=Rpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ipe[e]??r}function dF(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=Npe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var H;!t||!S.current||!w.current||((H=k.current)==null||H.call(k),E.current=wpe(S.current,w.current,{placement:P,modifiers:[Ope,Ape,Tpe,{...Ppe,enabled:!!m},{name:"eventListeners",...Epe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var H;!S.current&&!w.current&&((H=E.current)==null||H.destroy(),E.current=null)},[]);const M=C.exports.useCallback(H=>{S.current=H,T()},[T]),R=C.exports.useCallback((H={},q=null)=>({...H,ref:Bn(M,q)}),[M]),I=C.exports.useCallback(H=>{w.current=H,T()},[T]),N=C.exports.useCallback((H={},q=null)=>({...H,ref:Bn(I,q),style:{...H.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,I,m]),z=C.exports.useCallback((H={},q=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...ee}=H;return{...ee,ref:q,"data-popper-arrow":"",style:Dpe(H)}},[]),$=C.exports.useCallback((H={},q=null)=>({...H,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var H;(H=E.current)==null||H.update()},forceUpdate(){var H;(H=E.current)==null||H.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:I,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:R}}function Dpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function fF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function zpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=rhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function hF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Fpe,Bpe]=xn({strict:!1,name:"PortalManagerContext"});function pF(e){const{children:t,zIndex:n}=e;return x(Fpe,{value:{zIndex:n},children:t})}pF.displayName="PortalManager";var[gF,$pe]=xn({strict:!1,name:"PortalContext"}),D8="chakra-portal",Hpe=".chakra-portal",Wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Vpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=$pe(),l=Bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(gF,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Upe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(gF,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Upe,{containerRef:t,...n}):x(Vpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=D8;uh.selector=Hpe;uh.displayName="Portal";var Gpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,jpe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(xp.get(m)||0)+1,E=(o.get(m)||0)+1;xp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Dy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=xp.get(p)-1,v=o.get(p)-1;xp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(xp=new WeakMap,xp=new WeakMap,Dy=new WeakMap,zy={})}},mF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Gpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),jpe(r,i,n,"aria-hidden")):function(){return null}};function z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ype="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",qpe=Ype,Kpe=qpe;function vF(){}function yF(){}yF.resetWarningCache=vF;var Xpe=function(){function e(r,i,o,a,s,l){if(l!==Kpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:yF,resetWarningCache:vF};return n.PropTypes=n,n};Rn.exports=Xpe();var EC="data-focus-lock",SF="data-focus-lock-disabled",Zpe="data-no-focus-lock",Qpe="data-autofocus-inside",Jpe="data-no-autofocus";function e0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function t0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function bF(e,t){return t0e(t||null,function(n){return e.forEach(function(r){return e0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function xF(e){return e}function wF(e,t){t===void 0&&(t=xF);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function F8(e,t){return t===void 0&&(t=xF),wF(e,t)}function CF(e){e===void 0&&(e={});var t=wF(null);return t.options=pl({async:!0,ssr:!1},e),t}var _F=function(e){var t=e.sideCar,n=hz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};_F.isSideCarExport=!0;function n0e(e,t){return e.useMedium(t),_F}var kF=F8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),EF=F8(),r0e=F8(),i0e=CF({async:!0}),o0e=[],B8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?o0e:M,I=t.as,N=I===void 0?"div":I,z=t.lockProps,$=z===void 0?{}:z,H=t.sideCar,q=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),ee=ie[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(dt){var Ye=u.current;if(Ye&&Ye.focus){var rt=typeof q=="function"?q(Ye):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,dt?Promise.resolve().then(function(){return Ye.focus(Ze)}):Ye.focus(Ze)}}},[q]),j=C.exports.useCallback(function(dt){l.current&&kF.useMedium(dt)},[]),Z=EF.useMedium,me=C.exports.useCallback(function(dt){s.current!==dt&&(s.current=dt,a(dt))},[]),Se=An((r={},r[SF]=p&&"disabled",r[EC]=E,r),$),xe=m!==!0,Be=xe&&m!=="tail",We=bF([n,me]);return re(Tn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x(H,{id:ee,sideCar:i0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Be&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});B8.propTypes={};B8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const PF=B8;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function TF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){$8(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return TF(l,"displayName","SideEffect("+n(i)+")"),l}}var Il=function(e){for(var t=Array(e.length),n=0;n=0}).sort(p0e)},g0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W8=g0e.join(","),m0e="".concat(W8,", [data-focus-guard]"),zF=function(e,t){var n;return Il(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?m0e:W8)?[i]:[],zF(i))},[])},V8=function(e,t){return e.reduce(function(n,r){return n.concat(zF(r,t),r.parentNode?Il(r.parentNode.querySelectorAll(W8)).filter(function(i){return i===r}):[])},[])},v0e=function(e){var t=e.querySelectorAll("[".concat(Qpe,"]"));return Il(t).map(function(n){return V8([n])}).reduce(function(n,r){return n.concat(r)},[])},U8=function(e,t){return Il(e).filter(function(n){return MF(t,n)}).filter(function(n){return d0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Il(e).filter(function(n){return OF(t,n)})},AC=function(e,t,n){return DF(U8(V8(e,n),t),!0,n)},eL=function(e,t){return DF(U8(V8(e),t),!1)},y0e=function(e,t){return U8(v0e(e),t)},Tv=function(e,t){return e.shadowRoot?Tv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Il(e.children).some(function(n){return Tv(n,t)})},S0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},FF=function(e){return e.parentNode?FF(e.parentNode):e},G8=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?S0e(Il(FF(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(SF,'="disabled"])')))):[r]),n},[])},BF=function(e){return e.activeElement?e.activeElement.shadowRoot?BF(e.activeElement.shadowRoot):e.activeElement:void 0},j8=function(){return document.activeElement?document.activeElement.shadowRoot?BF(document.activeElement.shadowRoot):document.activeElement:void 0},b0e=function(e){return e===document.activeElement},x0e=function(e){return Boolean(Il(e.querySelectorAll("iframe")).some(function(t){return b0e(t)}))},$F=function(e){var t=document&&j8();return!t||t.dataset&&t.dataset.focusGuard?!1:G8(e).some(function(n){return Tv(n,t)||x0e(n)})},w0e=function(){var e=document&&j8();return e?Il(document.querySelectorAll("[".concat(Zpe,"]"))).some(function(t){return Tv(t,e)}):!1},C0e=function(e,t){return t.filter(NF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y8=function(e,t){return NF(e)&&e.name?C0e(e,t):e},_0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?Y8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(Y8(e[t],e)):t},HF="NEW_FOCUS",k0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=_0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return HF;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},E0e=function(e){return function(t){var n,r=(n=RF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},P0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(E0e(n)));return i&&i.length?tL(i):tL(JA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i=0)return o}return!1},WF=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Tv(u,a)?a=u:a=Yx(u,a))})}),a},T0e=function(e,t){return e.reduce(function(n,r){return n.concat(y0e(r,t))},[])},A0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(h0e)},L0e=function(e,t){var n=document&&j8(),r=G8(e).filter(q5),i=WF(n||e,e,r),o=new Map,a=eL(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=A0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=k0e(h,l,n,t);return p===HF?{node:P0e(a,h,T0e(r,o))}:p===void 0?p:u[p]}},M0e=function(e){var t=G8(e).filter(q5),n=WF(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:H8(s)}})},O0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,R0e=function(e,t,n){n===void 0&&(n={});var r=L0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,O0e(r.node,n.focusOptions),qx--}};const VF=R0e;function UF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var I0e=function(){return document&&document.activeElement===document.body},N0e=function(){return I0e()||w0e()},v0=null,qp=null,y0=null,Av=!1,D0e=function(){return!0},z0e=function(t){return(v0.whiteList||D0e)(t)},F0e=function(t,n){y0={observerNode:t,portaledElement:n}},B0e=function(t){return y0&&y0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var $0e=function(t){return t&&"current"in t?t.current:t},H0e=function(t){return t?Boolean(Av):Av==="meanwhile"},W0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},V0e=function(t,n){return n.some(function(r){return W0e(t,r,r)})},K5=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map($0e).filter(Boolean));if((!h||z0e(h))&&(i||H0e(s)||!N0e()||!qp&&o)&&(u&&!($F(p)||h&&V0e(h,p)||B0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=VF(p,qp,{focusOptions:l}),y0={})),Av=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=M0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},GF=function(t){K5()&&t&&(t.stopPropagation(),t.preventDefault())},q8=function(){return UF(K5)},U0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||F0e(r,n)},G0e=function(){return null},jF=function(){Av="just",setTimeout(function(){Av="meanwhile"},0)},j0e=function(){document.addEventListener("focusin",GF),document.addEventListener("focusout",q8),window.addEventListener("blur",jF)},Y0e=function(){document.removeEventListener("focusin",GF),document.removeEventListener("focusout",q8),window.removeEventListener("blur",jF)};function q0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function K0e(e){var t=e.slice(-1)[0];t&&!v0&&j0e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K5(),UF(K5)):(Y0e(),qp=null)}kF.assignSyncMedium(U0e);EF.assignMedium(q8);r0e.assignMedium(function(e){return e({moveFocusInside:VF,focusInside:$F})});const X0e=a0e(q0e,K0e)(G0e);var YF=C.exports.forwardRef(function(t,n){return x(PF,{sideCar:X0e,ref:n,...t})}),qF=PF.propTypes||{};qF.sideCar;z8(qF,["sideCar"]);YF.propTypes={};const Z0e=YF;var KF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&tF(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(Z0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};KF.displayName="FocusLock";var F3="right-scroll-bar-position",B3="width-before-scroll-bar",Q0e="with-scroll-bars-hidden",J0e="--removed-body-scroll-bar-size",XF=CF(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=hz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=bF([n,t]),R=pl(pl({},k),i);return re(Tn,{children:[h&&x(T,{sideCar:XF,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},R),{ref:M})):x(P,{...pl({},R,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:B3,zeroRight:F3};var e1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e1e();return t&&e.setAttribute("nonce",t),e}function n1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var i1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t1e())&&(n1e(t,n),r1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o1e=function(){var e=i1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ZF=function(){var e=o1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},a1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},s1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zx(n),Zx(r),Zx(i)]},l1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return a1e;var t=s1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u1e=ZF(),c1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(Q0e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(F3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(B3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(F3," .").concat(F3,` { + right: 0 `).concat(r,`; + } + + .`).concat(B3," .").concat(B3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(J0e,": ").concat(s,`px; + } +`)},d1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return l1e(i)},[i]);return x(u1e,{styles:c1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var Fy=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",Fy,Fy),window.removeEventListener("test",Fy,Fy)}catch{MC=!1}var wp=MC?{passive:!1}:!1,f1e=function(e){return e.tagName==="TEXTAREA"},QF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!f1e(e)&&n[t]==="visible")},h1e=function(e){return QF(e,"overflowY")},p1e=function(e){return QF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=JF(e,n);if(r){var i=eB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},g1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},m1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},JF=function(e,t){return e==="v"?h1e(t):p1e(t)},eB=function(e,t){return e==="v"?g1e(t):m1e(t)},v1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},y1e=function(e,t,n,r,i){var o=v1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=eB(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&JF(e,s)&&(p+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},By=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},S1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b1e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},x1e=0,Cp=[];function w1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(x1e++)[0],o=C.exports.useState(function(){return ZF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=gC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=By(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,I=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&I.type==="range")return!1;var z=iL(N,I);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=iL(N,I)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var $=r.current||R;return y1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?oL(E):By(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&S1e(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=By(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,By(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,S=e.inert;return re(Tn,{children:[S?x(o,{styles:b1e(i)}):null,v?x(d1e,{gapMode:"margin"}):null]})}const C1e=n0e(XF,w1e);var tB=C.exports.forwardRef(function(e,t){return x(_S,{...pl({},e,{ref:t,sideCar:C1e})})});tB.classNames=_S.classNames;const nB=tB;var ch=(...e)=>e.filter(Boolean).join(" ");function im(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},OC=new _1e;function k1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function E1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=T1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");P1e(u,t&&a),k1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:Bn($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:im(z.onClick,H=>H.stopPropagation())}),[v,T,p,m,P]),I=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:Bn($,h),onClick:im(z.onClick,I),onKeyDown:im(z.onKeyDown,E),onMouseDown:im(z.onMouseDown,w)}),[E,w,I]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function P1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return mF(e.current)},[t,e,n])}function T1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[A1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[L1e,rd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...E1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(L1e,{value:E,children:x(A1e,{value:S,children:x(fd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Lv=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=rd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Lv.displayName="ModalBody";var K8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=rd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:im(n,l=>{l.stopPropagation(),o()}),...i})});K8.displayName="ModalCloseButton";function rB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=rd(),[p,m]=l8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(KF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(nB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var M1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...mz,custom:{initialScale:.95,reverse:!0}},none:{}},O1e=we(Rl.section),R1e=e=>M1e[e||"none"],iB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=R1e(n),...i}=e;return x(O1e,{ref:t,...r,...i})});iB.displayName="ModalTransition";var Mv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=rd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=rd();return le.createElement(rB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(iB,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Mv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=rd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var I1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=rd();return x(I1e,{...i||(u==="none"?{}:gz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function oB(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var aB=Pe((e,t)=>x(Mv,{ref:t,role:"alertdialog",...e})),[OPe,N1e]=xn(),D1e=we(vz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=rd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=N1e();return le.createElement(rB,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function F1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var sB=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),$1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var H1e=50,lL=300;function W1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);F1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function j1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:I,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:H,parse:q,...de}=e,V=cr(R),J=cr(I),ie=cr(N),ee=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Be=C.exports.useRef(null),We=C.exports.useRef(null),dt=C.exports.useRef(null),Ye=C.exports.useRef(null),rt=C.exports.useCallback(ke=>ke.split("").filter(ee).join(""),[ee]),Ze=C.exports.useCallback(ke=>q?.(ke)??ke,[q]),Ke=C.exports.useCallback(ke=>(H?.(ke)??ke).toString(),[H]);td(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Be.current)return;if(Be.current.value!=G.value){const Mt=Ze(Be.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((ke=a)=>{xe&&j(ke)},[j,xe,a]),bt=C.exports.useCallback((ke=a)=>{xe&&Z(ke)},[Z,xe,a]),Ae=W1e(Et,bt);sL(dt,"disabled",Ae.stop,Ae.isSpinning),sL(Ye,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Q(rt(Ne)),We.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(ke=>{var Mt;V?.(ke),We.current&&(ke.target.selectionStart=We.current.start??((Mt=ke.currentTarget.value)==null?void 0:Mt.length),ke.currentTarget.selectionEnd=We.current.end??ke.currentTarget.selectionStart)},[V]),lt=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;G1e(ke,ee)||ke.preventDefault();const Mt=xt(ke)*a,Ne=ke.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(ke.preventDefault(),an(ke))},[ee,a,Et,bt,Q,i,o]),xt=ke=>{let Mt=1;return(ke.metaKey||ke.ctrlKey)&&(Mt=.1),ke.shiftKey&&(Mt=10),Mt},Cn=C.exports.useMemo(()=>{const ke=X?.(G.value);if(ke!=null)return ke;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),_n=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Be.current)==null||ke.focus()})},[t]),mn=C.exports.useCallback(ke=>{ke.preventDefault(),Ae.up(),_n()},[_n,Ae]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Ae.down(),_n()},[_n,Ae]);Vf(()=>Be.current,"wheel",ke=>{var Mt;const at=(((Mt=Be.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Be.current;if(!v||!at)return;ke.preventDefault();const an=xt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Et(an):Nn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((ke={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Bn(Mt,dt),role:"button",tabIndex:-1,onPointerDown:il(ke.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(ke.onPointerLeave,Ae.stop),onPointerUp:il(ke.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((ke={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Bn(Mt,Ye),role:"button",tabIndex:-1,onPointerDown:il(ke.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(ke.onPointerLeave,Ae.stop),onPointerUp:il(ke.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((ke={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Bn(Be,Mt),value:Ke(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":Cn,autoComplete:"off",autoCorrect:"off",onChange:il(ke.onChange,it),onKeyDown:il(ke.onKeyDown,lt),onFocus:il(ke.onFocus,Ot,()=>Se(!0)),onBlur:il(ke.onBlur,J,Kt)}),[P,m,p,M,T,Ke,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Cn,it,lt,Ot,J,Kt]);return{value:Ke(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,PS]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[q1e,X8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Z8=Pe(function(t,n){const r=Ri("NumberInput",t),i=gn(t),o=b8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:sB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z8.displayName="NumberInput";var lB=Pe(function(t,n){const r=PS();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});lB.displayName="NumberInputStepper";var Q8=Pe(function(t,n){const{getInputProps:r}=X8(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:sB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q8.displayName="NumberInputField";var uB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J8=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X8(),o=i(t,n);return x(uB,{...o,__css:r.stepper,children:t.children??x(B1e,{})})});J8.displayName="NumberDecrementStepper";var e_=Pe(function(t,n){const{getIncrementButtonProps:r}=X8(),i=r(t,n),o=PS();return x(uB,{...i,__css:o.stepper,children:t.children??x($1e,{})})});e_.displayName="NumberIncrementStepper";var n2=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[J1e,r2]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function ege(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=fF(e),M=C.exports.useRef(null),R=C.exports.useRef(null),I=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,H]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,ee,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=dF({...w,enabled:E||!!S}),xe=zpe({isOpen:E,ref:I});Sfe({enabled:E,ref:R}),hhe(I,{focusRef:R,visible:E,shouldFocus:o&&u===_p.click}),ghe(I,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const Be=hF({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Bn(I,Ot),children:Be?it.children:null,id:ee,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const Cn=uL(xt),Pt=Jx(I.current,Cn),Kt=Jx(R.current,Cn);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===_p.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Be,ee,$,X,q,G,u,n,P,E,t,p,l,s]),dt=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),Ye=C.exports.useCallback((it,Ot=null)=>({...it,ref:Bn(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Ke=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:Bn(R,Ot,Ke),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":ee};return u===_p.click&&(lt.onClick=ol(it.onClick,T)),u===_p.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const Cn=uL(xt),Pt=!Jx(I.current,Cn);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[ie,E,ee,u,Ke,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:Bn(Ot,lt=>{H(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:Bn(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:Ye,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:dt,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Jx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t_(e){const t=Ri("Popover",e),{children:n,...r}=gn(e),i=n1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t_.displayName="Popover";function n_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=r2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:n2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=r2();return le.createElement(we.div,{...r(t,n),className:n2("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=r2();return x(xS,{size:"sm",onClick:r,className:n2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},oge=we(Rl.section),cB=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});cB.displayName="PopoverTransition";var r_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=r2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(cB,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:n2("chakra-popover__content",t.className),__css:h}))});r_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=r2();return le.createElement(we.header,{...r(t,n),className:n2("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function i_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}i_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=dd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=dd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=dd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=dd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function dB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var fB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${uge} 2s linear infinite`:void 0},...r})};fB.displayName="Shape";var RC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});RC.displayName="Circle";var fge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=dB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(fB,{size:n,isIndeterminate:v,children:[x(RC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(RC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=dB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),hB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=gn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:I,...w},re(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});hB.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var pB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});pB.displayName="SelectField";var gB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=gn(e),[w,E]=Sge(S,jZ),P=S8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(pB,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(mB,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});gB.displayName="Select";var bge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),mB=e=>{const{children:t=x(bge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};mB.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function vB(e){return!!e.touches}function _ge(e){return vB(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function yB(e,t="page"){return vB(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:yB(i)})}return t?Tge(n):n}function $3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function SB(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:yB(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Rge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Ige(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Rge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Ige(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(dL(e)&&dL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function bB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=SB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new Lge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function xB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Fge(e){return typeof e=="object"&&e!==null&&"current"in e}function Bge(e){const[t]=xB({observeMutation:!1,getNodes(){return[Fge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},md=Hge({"../../../react-shim.js"(){}});md();md();md();var Oa=e=>e?"":void 0,S0=e=>e?!0:void 0,vd=(...e)=>e.filter(Boolean).join(" ");md();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}md();md();function Wge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function om(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function wB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...om({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>$y(w).height>$y(E).height?w:E,H3):r.reduce((w,E)=>$y(w).width>$y(E).width?w:E,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...om({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...om({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...om({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function CB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...I}=e,N=cr(m),z=cr(v),$=cr(w),H=CB({isReversed:a,direction:s,orientation:l}),[q,de]=nS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[V,J]=C.exports.useState(!1),[ie,ee]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>m0($e,t,n)),me=R*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Be=Z.map($e=>n-$e+t),dt=(H?Be:Z).map($e=>j5($e,t,n)),Ye=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Ke=xB({getNodes(){const $e=Ze.current,ft=$e?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var ft;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ft=$e.touches)==null?void 0:ft[0])??$e,Qn=Ye?tt.bottom-Zt:Nt-tt.left,lo=Ye?tt.height:tt.width;let pi=Qn/lo;return H&&(pi=1-pi),Pz(pi,t,n)},[Ye,H,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,ft){if(!Q)return;const tt=xe.current.valueBounds[$e];ft=parseFloat(wC(ft,tt.min,lt)),ft=m0(ft,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=ft,de(Nt)},setActiveIndex:G,stepUp($e,ft=lt){const tt=xe.current.value[$e],Nt=H?tt-ft:tt+ft;xt.setValueAtIndex($e,Nt)},stepDown($e,ft=lt){const tt=xe.current.value[$e],Nt=H?tt+ft:tt-ft;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,H,de,Q]),Cn=C.exports.useCallback($e=>{const ft=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[ft];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:_n,innerTrackStyle:mn}=C.exports.useMemo(()=>wB({isReversed:H,orientation:l,thumbRects:Ke,thumbPercents:dt}),[H,l,dt,Ke]),Oe=C.exports.useCallback($e=>{var ft;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(ft=Ze.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);td(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const ft=it($e)||0,tt=xe.current.value.map(pi=>Math.abs(pi-ft)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(pi=>pi===Nt);Qn.length>1&&ft>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,ft),Oe(Zt)},Xt=$e=>{if(X==-1)return;const ft=it($e)||0;G(X),xt.setValueAtIndex(X,ft),Oe(X)};bB(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},ft=null)=>({...$e,...I,id:Ae.root,ref:Bn(ft,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Oa(ie),style:{...$e.style,...Kt}}),[I,h,ie,Kt,Ae]),ke=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:Bn(ft,rt),id:Ae.track,"data-disabled":Oa(h),style:{...$e.style,..._n}}),[h,_n,Ae]),Mt=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:ft,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,ft=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:ft,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":Oa(V&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:b0($e.onKeyDown,Cn),onFocus:b0($e.onFocus,()=>{ee(!0),G(tt)}),onBlur:b0($e.onBlur,()=>{ee(!1),G(-1)})}},[Ae,Z,Se,Q,V,X,$,E,l,h,p,P,k,Pt,Cn,ee]),at=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:ft,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,ft=null)=>{const{value:tt,...Nt}=$e,Zt=!(ttn),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=j5(tt,t,n);lo=H?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...om({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(Qn),style:{...$e.style,...pi}}},[h,H,n,t,l,Z,Ae]),Nn=C.exports.useCallback(($e,ft=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:ft,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:ie,isDragging:V,getThumbPercent:$e=>dt[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:ke,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Nn,getOutputProps:at}}function Uge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Gge,TS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[jge,o_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_B=Pe(function(t,n){const r=Ri("Slider",t),i=gn(t),{direction:o}=n1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});_B.defaultProps={orientation:"horizontal"};_B.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o_(),s=r(t,n);return le.createElement(we.div,{...s,className:vd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o_(),o=r(t,n);return le.createElement(we.div,{...o,className:vd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:vd("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";md();md();function Zge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,I=cr(m),N=cr(v),z=cr(w),$=CB({isReversed:a,direction:s,orientation:l}),[H,q]=nS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),ee=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=m0(H,t,n),j=n-Q+t,me=j5($?j:Q,t,n),Se=l==="vertical",xe=SB({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:ee,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Be=C.exports.useRef(null),We=C.exports.useRef(null),dt=C.exports.useRef(null),Ye=C.exports.useId(),rt=u??Ye,[Ze,Ke]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Be.current)return;const an=xe.current;an.eventSource="pointer";const Nn=Be.current.getBoundingClientRect(),{clientX:$e,clientY:ft}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Nn.bottom-ft:$e-Nn.left,Nt=Se?Nn.height:Nn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Pz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(wC(Qn,an.min,an.step))),Qn=m0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(wC(Ne,at.min,G)),Ne=m0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Nn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Bge(We),{getThumbStyle:xt,rootStyle:Cn,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return wB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),_n=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);td(()=>{const Ne=xe.current;_n(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}bB(dt,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(V(!0),_n(),mn(Ne),I?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...R,ref:Bn(at,dt),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Oa(J),style:{...Ne.style,...Cn}}),[R,h,J,Cn]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:Bn(at,Be),id:Ke,"data-disabled":Oa(h),style:{...Ne.style,...Pt}}),[h,Ke,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:Bn(at,We),role:"slider",tabIndex:ee?0:void 0,id:Ze,"data-active":Oa(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:b0(Ne.onKeyDown,it),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[ee,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),ke=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.valuen),Nn=Q>=Ne.value,$e=j5(Ne.value,t,n),ft={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!an),"data-highlighted":Oa(Nn),style:{...Ne.style,...ft}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:ke,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t"}),[tme,LS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),a_=Pe((e,t)=>{const n=Ri("Slider",e),r=gn(e),{direction:i}=n1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:vd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a_.defaultProps={orientation:"horizontal"};a_.displayName="Slider";var kB=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__thumb",e.className),__css:r.thumb})});kB.displayName="SliderThumb";var EB=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__track",e.className),__css:r.track})});EB.displayName="SliderTrack";var PB=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});PB.displayName="SliderFilledTrack";var IC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__marker",e.className),__css:r.mark})});IC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,s_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=kz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:nme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s_.displayName="Switch";var l1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,TB,ime,ome]=FN();function ame(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=ime(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[sme,i2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=i2(),i=TB(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=i2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=nhe({...r,ref:Bn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:AB(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":LB(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=i2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:LB(n,s),tabId:AB(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=i2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=hF({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function pme(){const e=i2(),t=TB(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function AB(e,t){return`${e}--tab-${t}`}function LB(e,t){return`${e}--tabpanel-${t}`}var[gme,o2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),MB=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:l1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});MB.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=o2();return le.createElement(we.div,{ref:n,...t,className:l1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...o2().tablist};return le.createElement(we.div,{...r,className:l1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var OB=Pe(function(t,n){const r=hme({...t,ref:n}),i=o2();return le.createElement(we.div,{outline:"0",...r,className:l1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});OB.displayName="TabPanel";var RB=Pe(function(t,n){const r=fme(t),i=o2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:l1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RB.displayName="TabPanels";var IB=Pe(function(t,n){const r=o2(),i=ume({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:l1("chakra-tabs__tab",t.className),__css:o})});IB.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],NB=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=S8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});NB.displayName="Textarea";function xme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=DB(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function DB(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Ame(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:zB(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=DB(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(Sz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(xz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(wz,{id:u?.title,children:i}),s&&x(bz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function zB(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=zB(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function u1(e){const{theme:t}=NN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},FB=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Rle();td(()=>{v||r?.()},[v]),td(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},DC(n,{id:t,onClose:E})))});FB.displayName="ToastComponent";var Rme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FB,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Eme(l),children:x(fd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re(Tn,{children:[n,x(uh,{...o,children:s})]})};function Ime(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function $g(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...I}=e,{isOpen:N,onOpen:z,onClose:$}=fF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:H,getPopperProps:q,getArrowInnerProps:de,getArrowProps:V}=dF({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),J=C.exports.useId(),ee=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Fme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=zC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Be=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>X5(X),"keydown",s?We:void 0),Vf(()=>X5(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const dt=C.exports.useCallback((Ze={},Ke=null)=>({...Ze,ref:Bn(X,Ke,H),onPointerEnter:$g(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:$g(Ze.onClick,xe),onPointerDown:$g(Ze.onPointerDown,Be),onFocus:$g(Ze.onFocus,me),onBlur:$g(Ze.onBlur,Se),"aria-describedby":N?ee:void 0}),[me,Se,Be,N,ee,xe,H]),Ye=C.exports.useCallback((Ze={},Ke=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Ke),[q,S,w]),rt=C.exports.useCallback((Ze={},Ke=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Ke,...I,...Ze,id:ee,role:"tooltip",style:Et}},[I,ee]);return{isOpen:N,show:me,hide:Se,getTriggerProps:dt,getTooltipProps:rt,getTooltipPositionerProps:Ye,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function Fme(e,t){return C.exports.useEffect(()=>{const n=X5(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X5(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Bme=we(Rl.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(e),i=n1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const R=!!l,I=k.getTooltipProps({},t),N=R?Ime(I,["role","id"]):I,z=Nme(I,["role","id"]);return a?re(Tn,{children:[M,x(fd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Bme,{variants:Dme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Tn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(qz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:re(FI,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(pF,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return re($me,{theme:t,...r,children:[e,x(Rme,{...n})]})}function vs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:l_(e)?2:u_(e)?3:0}function x0(e,t){return c1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return c1(e)===2?e.get(t):e[t]}function BB(e,t,n){var r=c1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function $B(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l_(e){return qme&&e instanceof Map}function u_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function c_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=WB(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return d_(r,!0)},!0)),e}function Vme(){vs(2)}function f_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=HC[e];return t||vs(18,e),t}function Ume(e,t){HC[e]||(HC[e]=t)}function FC(){return Ov}function rw(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function Z5(e){BC(e),e.p.forEach(Gme),e.p=null}function BC(e){e===Ov&&(Ov=e.l)}function gL(e){return Ov={p:[],l:Ov,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(Z5(t),vs(4)),xu(e)&&(e=Q5(t,e),t.l||J5(t,e)),t.u&&kl("Patches").M(n[tr].t,e,t.u,t.s)):e=Q5(t,n,[]),Z5(t),t.u&&t.v(t.u,t.s),e!==HB?e:void 0}function Q5(e,t,n){if(f_(t))return t;var r=t[tr];if(!r)return eh(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c_(r.k):r.o;eh(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),J5(e,i,!1),n&&e.u&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(id(i)){var a=Q5(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(BB(n,r,a),!id(a))return;e.m=!1}if(xu(i)&&!f_(i)){if(!e.h.F&&e._<1)return;Q5(e,i),t&&t.A.l||J5(e,i)}}function J5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d_(t,n)}function ow(e,t){var n=e[tr];return(n?Sf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function aw(e){e.o||(e.o=c_(e.t))}function $C(e,t,n){var r=l_(t)?kl("MapSet").N(t,n):u_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:FC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Rv;a&&(l=[s],u=am);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:FC()).p.push(r),r}function jme(e){return id(e)||vs(22,e),function t(n){if(!xu(n))return n;var r,i=n[tr],o=c1(n);if(i){if(!i.P&&(i.i<4||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||BB(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c_(e)}function Yme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Rv.get(l,o)},set:function(l){var u=this[tr];Rv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!$B(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=kl("Patches").$;return id(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new Zme,VB=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:e4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function UB(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n4}function i(s,l){r(s)===n4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rve=function(t,n){return t===n};function ive(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Bve;KB.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=KB})(qB);var XB={exports:{}},ZB={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var OS=C.exports,Wve=qB.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=Wve.useSyncExternalStore,jve=OS.useRef,Yve=OS.useEffect,qve=OS.useMemo,Kve=OS.useDebugValue;ZB.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,Uve(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=ZB})(XB);function Xve(e){e()}let QB=Xve;const Zve=e=>QB=e,Qve=()=>QB,od=C.exports.createContext(null);function JB(){return C.exports.useContext(od)}const Jve=()=>{throw new Error("uSES not initialized!")};let e$=Jve;const e2e=e=>{e$=e},t2e=(e,t)=>e===t;function n2e(e=od){const t=e===od?JB:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=e$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var m_=Symbol.for("react.element"),v_=Symbol.for("react.portal"),RS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),FS=Symbol.for("react.forward_ref"),BS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),t$;t$=Symbol.for("react.module.reference");function Ga(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m_:switch(e=e.type,e){case RS:case NS:case IS:case BS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case zS:case FS:case WS:case HS:case DS:return e;default:return t}}case v_:return t}}}On.ContextConsumer=zS;On.ContextProvider=DS;On.Element=m_;On.ForwardRef=FS;On.Fragment=RS;On.Lazy=WS;On.Memo=HS;On.Portal=v_;On.Profiler=NS;On.StrictMode=IS;On.Suspense=BS;On.SuspenseList=$S;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ga(e)===zS};On.isContextProvider=function(e){return Ga(e)===DS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m_};On.isForwardRef=function(e){return Ga(e)===FS};On.isFragment=function(e){return Ga(e)===RS};On.isLazy=function(e){return Ga(e)===WS};On.isMemo=function(e){return Ga(e)===HS};On.isPortal=function(e){return Ga(e)===v_};On.isProfiler=function(e){return Ga(e)===NS};On.isStrictMode=function(e){return Ga(e)===IS};On.isSuspense=function(e){return Ga(e)===BS};On.isSuspenseList=function(e){return Ga(e)===$S};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===RS||e===NS||e===IS||e===BS||e===$S||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===FS||e.$$typeof===t$||e.getModuleId!==void 0)};On.typeOf=Ga;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function l2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=s2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||od).Provider,{value:i,children:n})}function n$(e=od){const t=e===od?JB:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=n$();function h2e(e=od){const t=e===od?f2e:n$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(XB.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var y_="persist:",r$="persist/FLUSH",S_="persist/REHYDRATE",i$="persist/PAUSE",o$="persist/PERSIST",a$="persist/PURGE",s$="persist/REGISTER",g2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t{Object.keys(I).forEach(function(N){!T(N)||h[N]!==I[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){I[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=I},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var I=m.shift(),N=r.reduce(function(z,$){return $.in(z,I,h)},h[I]);if(N!==void 0)try{p[I]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[I];m.length===0&&k()}function k(){Object.keys(p).forEach(function(I){h[I]===void 0&&delete p[I]}),S=s.setItem(a,l(p)).catch(M)}function T(I){return!(n&&n.indexOf(I)===-1&&I!=="_persist"||t&&t.indexOf(I)!==-1)}function M(I){u&&u(I)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=w2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y_).concat(e.key);return t.removeItem(n,_2e)}function _2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function P2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=E2e(m,["_persist"]),w=S;if(p.type===o$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,H){return Promise.resolve($)};z(N,n).then(function($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===a$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===r$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===i$)l=!0;else if(p.type===S_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,p);var I=t(w,p);return I===w?h:u(iu({},I,{_persist:v}))}}function RL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:l$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case s$:return VC({},t,{registry:[].concat(RL(t.registry),[n.key])});case S_:var r=t.registry.indexOf(n.key),i=RL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=p_(I2e,l$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:s$,key:u})},a=function(u,h,p){var m={type:S_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:r$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:i$})},persist:function(){e.dispatch({type:o$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b_={},x_={};x_.__esModule=!0;x_.default=F2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var D2e={getItem:dw,setItem:dw,removeItem:dw};function z2e(e){if((typeof self>"u"?"undefined":V3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function F2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}b_.__esModule=!0;b_.default=H2e;var B2e=$2e(x_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,B2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var u$=void 0,W2e=V2e(b_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");u$=U2e;var c$={},d$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(w_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=th,n=w_,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const ee in V){const X=J?`${J}.${ee}`:ee,G=V[ee];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${ee}:`:(ie.add(G),(0,e.getCircularPath)(G,X,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const ee=V[ie];J[ie]=(0,e._cloneDeep)(ee)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),ee=(0,e.cloneDeep)(J),X=Object.keys(ie).reduce((Q,j)=>(h.call(ee,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(ie)||(0,e.isDate)(ee))return ie.valueOf()===ee.valueOf()?{}:ee;const G=Object.keys(ee).reduce((Q,j)=>{if(!h.call(ie,j))return Q[j]=ee[j],Q;const Z=(0,e.difference)(ie[j],ee[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(ie)&&!(0,e.isArray)(ee)||!(0,e.isArray)(ie)&&(0,e.isArray)(ee)?ee:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,ee)=>{if(ie){const X=parseInt(ee,10),G=(0,e.isIntegerString)(ee)&&X<0?ie.length+X:ee;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const E=function(V,J){return[...V].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((ee,X,G)=>(G===J.length-1&&ee&&(0,e.isObjectLike)(ee)&&delete ee[X],ee&&ee[X]),ie),ie};e.dissocPath=P;const k=function(V,J,...ie){if(!ie||!ie.length)return J;const ee=ie.shift(),{preservePlaceholder:X,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(ee))for(const Q in ee)if((0,e.isObjectLike)(ee[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(V,J[Q],ee[Q]);else if((0,e.isArray)(J)){let j=ee[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=ee[Q]!==t.PLACEHOLDER_UNDEFINED?ee[Q]:void 0;J[Q]=j}return k(V,J,...ie)},T=function(V,J,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,ee,X){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Q=V[G],j=(0,e.isArray)(V),Z=ee?ee+"."+G:G;Q===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(V[parseInt(G,10)]=void 0),Q===void 0&&X&&ie===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,ie,Z,X)}},R=function(V,J,ie,ee){const X=(0,e.cloneDeep)(V);return M(X,J,ie,"",ee),X};e.preserveUndefined=R;const I=function(V,J,ie){return ie.indexOf(V)===J};e.unique=I;const N=function(V){return V.reduce((J,ie)=>{const ee=V.filter(me=>me===ie),X=V.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=ee.length>1&&G.indexOf(ie)===-1,Z=X.length>1;return{duplicates:[...G,...j?ee:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const ee=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${ee} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(V);if(Q.length>1)throw new Error(`${X} Duplicated paths. + + ${JSON.stringify(Q)} + + ${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(j)} + + ${G}`)};e.singleTransformValidator=z;const $=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((ee,X)=>J.indexOf(ee)!==X);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const H=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:ee}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:ee},"whitelist")}if(J){const{duplicates:ie,subsets:ee}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:ee},"blacklist")}};e.configValidator=H;const q=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. + + ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(J)}`)};e.throwError=q;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const ee=ie.split("."),X=ee[0],G=ee.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(d$);(function(e){var t=ms&&ms.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=p,k=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),I=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=R.filter(de=>I.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),H=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...H,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(c$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C_(r)?r:!1},C_=e=>Boolean(typeof e=="string"?G2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),i4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),j2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,I=64,N=128,z=256,$=512,H=30,q="...",de=800,V=16,J=1,ie=2,ee=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",R],["partialRight",I],["rearg",z]],Be="[object Arguments]",We="[object Array]",dt="[object AsyncFunction]",Ye="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Ke="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",Cn="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",_n="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",ke="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Nn="[object Int32Array]",$e="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,y1=RegExp(pi.source),va=RegExp(Ms.source),bh=/<%-([\s\S]+?)%>/g,S1=/<%([\s\S]+?)%>/g,Ru=/<%=([\s\S]+?)%>/g,xh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Io=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,b1=RegExp(kd.source),Iu=/^\s+/,Ed=/\s/,x1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,w1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,C1=/[()=,{}\[\]\/\s]/,_1=/\\(\\)?/g,k1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ja=/\w*$/,E1=/^[-+]0x[0-9a-f]+$/i,P1=/^0b[01]+$/i,T1=/^\[object .+?Constructor\]$/,A1=/^0o[0-7]+$/i,L1=/^(?:0|[1-9]\d*)$/,M1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,O1=/['\n\r\u2028\u2029\\]/g,Ya="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Is="\\u20d0-\\u20ff",Fl=Dl+zl+Is,Ch="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",vn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ns+No+kn+vn,zo="['\u2019]",Ds="["+Ya+"]",Gr="["+Ur+"]",qa="["+Fl+"]",Pd="\\d+",Bl="["+Ch+"]",Ka="["+Du+"]",Td="[^"+Ya+Ur+Pd+Ch+Du+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+qa+"|"+gi+")",kh="[^"+Ya+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",$l="(?:"+Ka+"|"+Td+")",R1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=_h+"?",Bu="["+Cr+"]?",ya="(?:"+Fs+"(?:"+[kh,Ad,zs].join("|")+")"+Bu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Ld+ya,Eh="(?:"+[Bl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[kh+qa+"?",qa,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Ph=RegExp(qa,"g"),Fo=RegExp(gi+"(?="+gi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+Ka+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",R1+"+"+Fu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Fu,Hl,Md,Pd,Eh].join("|"),"g"),Od=RegExp("["+Fs+Ya+Fl+Cr+"]"),Th=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ah=-1,sn={};sn[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Nn]=sn[$e]=sn[ft]=sn[tt]=sn[Nt]=!0,sn[Be]=sn[We]=sn[jt]=sn[Ye]=sn[ke]=sn[rt]=sn[Ke]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[_n]=sn[Je]=!1;var Wt={};Wt[Be]=Wt[We]=Wt[jt]=Wt[ke]=Wt[Ye]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Nn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[_n]=Wt[mn]=Wt[$e]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[Ke]=Wt[Et]=Wt[Je]=!1;var Lh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},I1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,qe=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,Sa=dn&&dn.isRegExp,Bs=dn&&dn.isSet,N1=dn&&dn.isTypedArray;function mi(oe,be,ve){switch(ve.length){case 0:return oe.call(be);case 1:return oe.call(be,ve[0]);case 2:return oe.call(be,ve[0],ve[1]);case 3:return oe.call(be,ve[0],ve[1],ve[2])}return oe.apply(be,ve)}function D1(oe,be,ve,Ge){for(var _t=-1,Qt=oe==null?0:oe.length;++_t-1}function Mh(oe,be,ve){for(var Ge=-1,_t=oe==null?0:oe.length;++Ge<_t;)if(ve(be,oe[Ge]))return!0;return!1}function zn(oe,be){for(var ve=-1,Ge=oe==null?0:oe.length,_t=Array(Ge);++ve-1;);return ve}function Xa(oe,be){for(var ve=oe.length;ve--&&Uu(be,oe[ve],0)>-1;);return ve}function F1(oe,be){for(var ve=oe.length,Ge=0;ve--;)oe[ve]===be&&++Ge;return Ge}var y2=zd(Lh),Za=zd(I1);function Hs(oe){return"\\"+ne[oe]}function Rh(oe,be){return oe==null?n:oe[be]}function Vl(oe){return Od.test(oe)}function Ih(oe){return Th.test(oe)}function S2(oe){for(var be,ve=[];!(be=oe.next()).done;)ve.push(be.value);return ve}function Nh(oe){var be=-1,ve=Array(oe.size);return oe.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function Dh(oe,be){return function(ve){return oe(be(ve))}}function Ho(oe,be){for(var ve=-1,Ge=oe.length,_t=0,Qt=[];++ve-1}function F2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=J1,Wo.prototype.has=eg,Wo.prototype.set=F2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,B){var Y,te=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,B):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=It(c);if(_e){if(Y=GV(c),!te)return wi(c,Y)}else{var Le=si(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,te);if(Le==lt||Le==Be||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!te)return ce?yg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,te)}}B||(B=new vr);var ct=B.get(c);if(ct)return ct;B.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ii(St,g,b,St,c,B))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ii(St,g,b,Gt,c,B))});var yt=Ce?ce?ge:qo:ce?bo:li,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ii(St,g,b,Gt,c,B))}),Y}function Uh(c){var g=li(c);return function(b){return Gh(b,c,g)}}function Gh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],B=g[D],Y=c[D];if(Y===n&&!(D in c)||!B(Y))return!1}return!0}function ig(c,g,b){if(typeof c!="function")throw new vi(a);return Cg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,B=Ii,Y=!0,te=c.length,ce=[],Ce=g.length;if(!te)return ce;b&&(g=zn(g,_r(b))),L?(B=Mh,Y=!1):g.length>=i&&(B=ju,Y=!1,g=new Ca(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(te)?g>1?Er(te,g-1,b,L,D):ba(D,te):L||(D[D.length]=te)}return D}var Yh=Js(),go=Js(!0);function Yo(c,g){return c&&Yh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function qh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Xh(c,g){return c!=null&&en.call(c,g)}function Zh(c,g){return c!=null&&g in ln(c)}function Qh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Le=-1,Ue=te[0];e:for(;++Le-1;)te!==c&&Gd.call(te,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==B){var B=D;Zl(D)?Gd.call(c,D,1):lp(c,D)}}return c}function tf(c,g){return c+Gl(Y1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,B=mr(qd((g-c)/(b||1)),0),Y=ve(B);B--;)Y[L?B:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Lb(Pk(c,g,xo),c+"")}function rp(c){return sc(gp(c))}function nf(c,g){var b=gp(c);return j2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,B=g.length,Y=B-1,te=c;te!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var B=ve(D);++L>>1,Y=c[B];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:W(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new Ca}else ce=g?[]:te;e:for(;++L=L?c:Tr(c,g,b)}var pg=_2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function gg(c){var g=new c.constructor(c.byteLength);return new yi(g).set(new yi(c)),g}function Xl(c,g){var b=g?gg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,ja.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function V2(c,g){var b=g?gg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function mg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,B=Ko(c),Y=g!==n,te=g===null,ce=g===g,Ce=Ko(g);if(!te&&!Ce&&!B&&c>g||B&&Y&&ce&&!te&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!B&&!Ce&&c=te)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,B=c.length,Y=b.length,te=-1,ce=g.length,Ce=mr(B-Y,0),_e=ve(ce+Ce),Le=!L;++te1?b[D-1]:n,Y=D>2?b[2]:n;for(B=c.length>3&&typeof B=="function"?(D--,B):n,Y&&Xi(b[0],b[1],Y)&&(B=D<3?n:B,D=1),g=ln(g);++L-1?D[B?g[Y]:Y]:n}}function bg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var B=g[L];if(typeof B!="function")throw new vi(a);if(D&&!Y&&ye(B)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&cete))return!1;var Ce=B.get(c),_e=B.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,ct=b&w?new Ca:n;for(B.set(c,g),B.set(g,c);++Le1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(x1,`{ +/* [wrapped with `+g+`] */ +`)}function qV(c){return It(c)||df(c)||!!(G1&&c&&c[G1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&L1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Bk(c,b)});function $k(c){var g=F(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function Y2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(B){return Vh(B,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(B){return g&&!B.length&&B.push(n),B}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){var L=Rk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Mb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=cp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=It(c)?Dn:og;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=It(c)?ho:jo;return b(c,Te(g,3))}var vG=Sg(Ik),yG=Sg(Nk);function SG(c,g){return Er(q2(c,g),1)}function bG(c,g){return Er(q2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(q2(c,g),b)}function Hk(c,g){var b=It(c)?Vn:es;return b(c,Te(g,3))}function Wk(c,g){var b=It(c)?fo:jh;return b(c,Te(g,3))}var wG=cp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(c,g,b,L){c=So(c)?c:gp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",B=So(c)?ve(c.length):[];return es(c,function(Y){B[++L]=D?mi(g,Y,b):ts(Y,g,b)}),B}),kG=cp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=It(c)?zn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(It(g)||(g=g==null?[]:[g]),b=L?n:b,It(b)||(b=b==null?[]:[b]),bi(c,g,b))}var PG=cp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=It(c)?Id:Oh,D=arguments.length<3;return L(c,Te(g,4),b,D,es)}function AG(c,g,b){var L=It(c)?p2:Oh,D=arguments.length<3;return L(c,Te(g,4),b,D,jh)}function LG(c,g){var b=It(c)?ho:jo;return b(c,Z2(Te(g,3)))}function MG(c){var g=It(c)?sc:rp;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=It(c)?ri:nf;return L(c,g)}function RG(c){var g=It(c)?wb:ai;return g(c)}function IG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=It(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),bi(c,Er(g,1),[])}),K2=k2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Rb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Rb));L|=R}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=R}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,B,Y,te,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new vi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,B=Le?mr(Ea(b.maxWait)||0,g):B,Ue="trailing"in b?!!b.trailing:Ue);function ct(Lr){var as=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,as),Y}function yt(Lr){return Ce=Lr,te=Cg(Gt,g),_e?ct(Lr):Y}function $t(Lr){var as=Lr-ce,eu=Lr-Ce,hE=g-as;return Le?qr(hE,B-eu):hE}function St(Lr){var as=Lr-ce,eu=Lr-Ce;return ce===n||as>=g||as<0||Le&&eu>=B}function Gt(){var Lr=K2();if(St(Lr))return Jt(Lr);te=Cg(Gt,$t(Lr))}function Jt(Lr){return te=n,Ue&&L?ct(Lr):(L=D=n,Y)}function Xo(){te!==n&&pg(te),Ce=0,L=ce=D=te=n}function Zi(){return te===n?Y:Jt(K2())}function Zo(){var Lr=K2(),as=St(Lr);if(L=arguments,D=this,ce=Lr,as){if(te===n)return yt(ce);if(Le)return pg(te),te=Cg(Gt,g),ct(ce)}return te===n&&(te=Cg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var FG=Ct(function(c,g){return ig(c,1,g)}),BG=Ct(function(c,g,b){return ig(c,Ea(g)||0,b)});function $G(c){return he(c,$)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new vi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],B=b.cache;if(B.has(D))return B.get(D);var Y=c.apply(this,L);return b.cache=B.set(D,Y)||B,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new vi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function HG(c){return Uk(2,c)}var WG=kb(function(c,g){g=g.length==1&&It(g[0])?zn(g[0],_r(Te())):zn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,B=qr(L.length,b);++D=g}),df=ep(function(){return arguments}())?ep:function(c){return br(c)&&en.call(c,"callee")&&!U1.call(c,"callee")},It=ve.isArray,rj=jr?_r(jr):sg;function So(c){return c!=null&&Q2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&oi(c)==Ye}var yc=E2||Gb,oj=co?_r(co):lg;function aj(c){return br(c)&&c.nodeType===1&&!_g(c)}function sj(c){if(c==null)return!0;if(So(c)&&(It(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||pp(c)||df(c)))return!c.length;var g=si(c);if(g==Ae||g==Kt)return!c.size;if(wg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==Ke||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!_g(c)}function cj(c){return typeof c=="number"&&Bh(c)}function Ql(c){if(!sr(c))return!1;var g=oi(c);return g==Et||g==bt||g==dt||g==Cn}function Xk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Ui?_r(Ui):_b;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return tp(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&oi(c)==it}function _g(c){if(!br(c)||oi(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?_r(Sa):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Bs?_r(Bs):Ft;function J2(c){return typeof c=="string"||!It(c)&&br(c)&&oi(c)==_n}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==mn}var pp=N1?_r(N1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&si(c)==Je}function bj(c){return br(c)&&oi(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):wi(c);if(Ju&&c[Ju])return S2(c[Ju]());var g=si(c),b=g==Ae?Nh:g==Kt?Hd:gp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=Ea(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return j;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=P1.test(c);return b||A1.test(c)?qe(c.slice(2),b?2:8):E1.test(c)?j:+c}function nE(c){return _a(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(wg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){_a(g,bo(g),c)}),ey=Ki(function(c,g,b,L){_a(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){_a(g,li(g),c,L)}),Ej=er(Vh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b1),B}),_a(c,ge(c),b),L&&(b=ii(b,p|m|v,At));for(var D=g.length;D--;)lp(b,g[D]);return b});function jj(c,g){return oE(c,Z2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:dg(c,g)});function oE(c,g){if(c==null)return{};var b=zn(ge(c),function(L){return[L]});return g=Te(g),np(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=Y1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Bb(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(M1,y2).replace(Ph,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&va.test(c)?c.replace(Ms,Za):c}function lY(c){return c=Sn(c),c&&b1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=fp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?xa(c):0;return g&&L>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=qi(g),!g&&Vl(c))?rs(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Bb(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=F.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=ey({},g,L,Ie);var D=ey({},g.imports,L.imports,Ie),B=li(D),Y=$d(D,B),te,ce,Ce=0,_e=g.interpolate||Rs,Le="__p += '",Ue=Vd((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Ru?k1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),ct="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ah+"]")+` +`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(O1,Hs),Gt&&(te=!0,Le+=`' + +__e(`+Gt+`) + +'`),Zi&&(ce=!0,Le+=`'; +`+Zi+`; +__p += '`),Jt&&(Le+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),Ce=Zo+St.length,St}),Le+=`'; +`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) { +`+Le+` +} +`;else if(C1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { +`+(yt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Le+`return __p +}`;var $t=dE(function(){return Qt(B,ct+"return "+Le).apply(n,Y)});if($t.source=Le,Nb($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),B=$o(L,D),Y=Xa(L,D)+1;return rs(L,B,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,$1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Xa(L,Ni(g))+1;return rs(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Iu,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return rs(L,D).join("")}function TY(c,g){var b=H,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var B=c.length;if(Vl(c)){var Y=Ni(c);B=Y.length}if(b>=B)return c;var te=b-xa(L);if(te<1)return L;var ce=Y?rs(Y,0,te).join(""):c.slice(0,te);if(D===n)return ce+L;if(Y&&(te+=ce.length-te),Db(D)){if(c.slice(te).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(ja.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?te:Le)}}else if(c.indexOf(qi(D),te)!=te){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&y1.test(c)?c.replace(pi,w2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Bb=fp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Ih(c)?Wd(c):z1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return mi(c,n,g)}catch(b){return Nb(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Rb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new vi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++DG)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Bd(L,g);++b0||g<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=F[L?"take"+(g=="last"?"Right":""):g],B=L||/^find/.test(g);!D||(F.prototype[g]=function(){var Y=this.__wrapped__,te=L?[1]:arguments,ce=Y instanceof Ut,Ce=te[0],_e=ce||It(Y),Le=function(Gt){var Jt=D.apply(F,ba([Gt],te));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,ct=!!this.__actions__.length,yt=B&&!Ue,$t=ce&&!ct;if(!B&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,te);return St.__actions__.push({func:Y2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,te):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var B=this.value();return g.apply(It(B)?B:[],D)}return this[b](function(Y){return g.apply(It(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=F[g];if(b){var L=b.name+"";en.call(Qa,L)||(Qa[L]=[]),Qa[L].push({name:g,func:b})}}),Qa[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=Si,Ut.prototype.value=M2,F.prototype.at=aG,F.prototype.chain=sG,F.prototype.commit=lG,F.prototype.next=uG,F.prototype.plant=dG,F.prototype.reverse=fG,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=hG,F.prototype.first=F.prototype.head,Ju&&(F.prototype[Ju]=cG),F},wa=po();Vt?((Vt.exports=wa)._=wa,Tt._=wa):vt._=wa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,f$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&f$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},h$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?f$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),p$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=De((e,t)=>{var n=p$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=VS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),tye=De((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=VS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),US=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=g$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),__=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=__(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=De((e,t)=>{var n=__(),r=lye(),i=uye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),m$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),v$=De((e,t)=>{var n=GS(),r=m$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),cye=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),y$=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),fye=De((e,t)=>{var n=v$(),r=dye(),i=m$(),o=y$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),d1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k_=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Map");t.exports=i}),jS=De((e,t)=>{var n=d1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=jS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),vye=De((e,t)=>{var n=jS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),yye=De((e,t)=>{var n=jS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Sye(),r=US(),i=k_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),YS=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=YS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),S$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US(),r=k_(),i=S$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=US(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=S$(),r=Tye(),i=Aye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),b$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),Iye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=__(),r=Rye(),i=p$(),o=b$(),a=Iye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,I=R?R.valueOf:void 0;function N(z,$,H,q,de,V,J){switch(H){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!V(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var ee=q&l;if(ie||(ie=s),z.size!=$.size&&!ee)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(ie(z),ie($),q,de,V,J);return J.delete(z),G;case k:if(I)return I.call(z)==I.call($)}return!1}t.exports=N}),zye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),Fye=De((e,t)=>{var n=zye(),r=E_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Bye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Bye(),r=$ye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=qS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),x$=De((e,t)=>{var n=Eu(),r=Gye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),jye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=GS(),r=w$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",I="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",H="[object Uint8ClampedArray]",q="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[R]=V[I]=V[N]=V[z]=V[$]=V[H]=V[q]=V[de]=!0,V[o]=V[a]=V[k]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[E]=V[P]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=g$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),C$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=E_(),o=x$(),a=jye(),s=C$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),t3e=De((e,t)=>{var n=v$(),r=w$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Fye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var I=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=d1(),r=Eu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=k_(),i=a3e(),o=s3e(),a=l3e(),s=GS(),l=y$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var I=s(R),N=I==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return p;case k:return m;case T:return v}return I}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=b$(),i=Dye(),o=i3e(),a=u3e(),s=E_(),l=x$(),u=C$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,I){var N=s(P),z=s(k),$=N?m:a(P),H=z?m:a(k);$=$==p?v:$,H=H==p?v:H;var q=$==v,de=H==v,V=$==H;if(V&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(V&&!q)return I||(I=new n),N||u(P)?r(P,k,T,M,R,I):i(P,k,$,T,M,R,I);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(J||ie){var ee=J?P.value():P,X=ie?k.value():k;return I||(I=new n),R(ee,X,T,M,I)}}return V?(I||(I=new n),o(P,k,T,M,R,I)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=qS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),_$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function Hm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return k$(e,["input","textarea","select"])}function k$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function v3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var y3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=h$(_$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!k$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(E=>{let P=Hm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey(Hm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey(Hm(w,u?.combinationKey)))}},[e,l,u,h]),i}h$(_$());var UC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add(Hm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Hm(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const T3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),A3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),L3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),M3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),O3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var to=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(to||{});const R3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(hd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s_,{className:"invokeai__switch-root",...s})]})})};function P_(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(F_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&R(String(u))},[u,M]);const I=z=>{R(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);R(String($)),h($)};return x(Oi,{...k,children:re(hd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:N,width:a,...T,children:[x(Q8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e_,{...P,className:"invokeai__number-input-stepper-button"}),x(J8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},yd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:re(hd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(gB,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})]})})},I3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],D3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],z3e=[{key:"2x",value:2},{key:"4x",value:4}],T_=0,A_=4294967295,F3e=["gfpgan","codeformer"],B3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=pt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=pt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),KS=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee($3e),{isGFPGANAvailable:i}=Ee(H3e),o=l=>e(K3(l)),a=l=>e(sV(l)),s=l=>e(X3(l.target.value));return re(rn,{direction:"column",gap:2,children:[x(yd,{label:"Type",validValues:F3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var E$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(E$),Xc=globalThis&&globalThis.__assign||function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function Y0(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:I,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:H,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:ee,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Be=>{const We=st.clamp(S?Math.floor(Number(Be.target.value)):Number(Be.target.value),o,Z);j(String(We)),l(We)},Se=Be=>{j(Be),l(Number(Be))},xe=()=>{!T||T()};return re(hd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),re(Wz,{w:"100%",gap:2,children:[re(a_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&re(Tn,{children:[x(IC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...H,children:o}),x(IC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...H,children:a})]}),x(EB,{className:"invokeai__slider_track",...q,children:x(PB,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...ee,children:x(kB,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:I,...V,children:[x(Q8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),re(lB,{...ie,children:[x(e_,{className:"invokeai__slider-number-stepper"}),x(J8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L_,{}),onClick:xe,isDisabled:M,...X})]})]})}function T$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(Y0,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const A$=()=>x(pd,{flex:"1",textAlign:"left",children:"Other Options"}),X3e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},Z3e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},L$=()=>re(rn,{gap:2,direction:"column",children:[x(Z3e,{}),x(X3e,{})]}),M_=()=>x(pd,{flex:"1",textAlign:"left",children:"Seed"});function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e($_e(r.target.checked))})}function J3e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(d2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:T_,max:A_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const M$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function e5e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(d2(M$(T_,A_))),children:x("p",{children:"Shuffle"})})}function t5e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(R_e(r)),value:t,isInteger:!1})}function n5e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(I_e(r)),value:t,isInteger:!1})}const O_=()=>re(rn,{gap:2,direction:"column",children:[x(Q3e,{}),re(rn,{gap:2,children:[x(J3e,{}),x(e5e,{})]}),x(rn,{gap:2,children:x(t5e,{})}),x(rn,{gap:2,children:x(n5e,{})})]});function R_(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(B_e(i.target.checked))})]})}const r5e=pt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),i5e=pt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),XS=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(r5e),{isESRGANAvailable:r}=Ee(i5e);return re("div",{className:"upscale-options",children:[x(yd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function o5e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(N_e(r.target.checked))})}function I_(){return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(o5e,{})]})}function a5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(hd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k8,{...s,className:"input-entry",size:"sm",width:o})]})}function s5e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(cV(i.target.value));return x(a5e,{label:"Seed Weights",value:e,isInvalid:t&&!(C_(e)||e===""),isDisabled:!t,onChange:r})}function l5e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(D_e(i)),isInteger:!1})}const N_=()=>re(rn,{gap:2,direction:"column",children:[x(l5e,{}),x(s5e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Ez,{className:`invokeai__checkbox ${n}`,...r,children:t})};function D_(){const e=Ee(r=>r.options.showAdvancedOptions),t=Xe();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(H_e(r.target.checked)),isChecked:e})}function u5e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:z_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Ir=pt(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),c5e=pt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function d5e(){const e=Ee(i=>i.options.height),t=Ee(Ir),n=Xe();return x(yd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const f5e=pt([e=>e.options,c5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h5e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(f5e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(O_e(i)),value:t,width:z_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function p5e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(yd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:I3e,styleClass:"main-option-block"})}function g5e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:z_,styleClass:"main-option-block",textAlign:"center"})}function m5e(){const e=Ee(i=>i.options.width),t=Ee(Ir),n=Xe();return x(yd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const z_="auto";function F_(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(h5e,{}),x(g5e,{}),x(u5e,{})]}),re("div",{className:"main-options-row",children:[x(m5e,{}),x(d5e,{}),x(p5e,{})]})]})})}const v5e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},O$=MS({name:"system",initialState:v5e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:y5e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:FL,setSocketId:RPe,setShouldConfirmOnDelete:R$,setOpenAccordions:S5e,setSystemStatus:b5e,setCurrentStatus:G3,setSystemConfig:x5e,setShouldDisplayGuides:w5e,processingCanceled:C5e,errorOccurred:BL,errorSeen:I$,setModelList:$L,setIsCancelable:Kp,modelChangeRequested:_5e,setSaveIntermediatesInterval:k5e,setEnableImageDebugging:E5e,generationRequested:P5e,addToast:sm,clearToastQueue:T5e,setProcessingIndeterminateTask:A5e}=O$.actions,L5e=O$.reducer;function M5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function O5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function N$(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function R5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function I5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const N5e=pt(e=>e.system,e=>e.shouldDisplayGuides),D5e=({children:e,feature:t})=>{const n=Ee(N5e),{text:r}=R3e[t];return n?re(t_,{trigger:"hover",children:[x(i_,{children:x(pd,{children:e})}),re(r_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},z5e=Pe(({feature:e,icon:t=M5e},n)=>x(D5e,{feature:e,children:x(pd,{ref:n,children:x(ma,{as:t})})}));function F5e(e){const{header:t,feature:n,options:r}=e;return re(Df,{className:"advanced-settings-item",children:[x("h2",{children:re(If,{className:"advanced-settings-header",children:[t,x(z5e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(S5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(F5e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function B5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function $5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function H5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function D$(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function z$(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function W5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function V5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function U5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function G5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function j5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function $_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function F$(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function H_(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function Y5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function B$(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function q5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function K5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function X5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function Z5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function Q5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function J5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function e4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function t4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function n4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function r4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function i4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function o4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function a4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function s4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function l4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function u4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function $$(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function c4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function d4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function f4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function h4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function f1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function W_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const m4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",v4e=e=>e.kind==="line"&&e.layer==="base",o4=e=>e.kind==="image"&&e.layer==="base",y4e=e=>e.kind==="line",$n=e=>e.canvas,Pu=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(o4),W$=pt([e=>e.options,e=>e.system,H$,Ir],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(C_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),GC=Jr("socketio/generateImage"),S4e=Jr("socketio/runESRGAN"),b4e=Jr("socketio/runFacetool"),x4e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),WL=Jr("socketio/requestNewImages"),w4e=Jr("socketio/cancelProcessing"),C4e=Jr("socketio/requestSystemConfig"),V$=Jr("socketio/requestModelChange"),_4e=Jr("socketio/saveStagingAreaImageToGallery"),k4e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function U$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i,reasonsWhyNotReady:o}=Ee(W$),a=Ee(Ir),s=()=>{r(GC(a))};return mt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(a))},[i,a]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(a4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})})}const E4e=pt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(E4e),a=()=>n(w4e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(I5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const P4e=pt(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Xe(),t=Ee(P4e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(l4e,{}),onClick:()=>{e(q_e(!t))}})},G_=()=>re("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),T4e=pt([e=>e.options,Ir],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(T4e),{isReady:r}=Ee(W$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(hd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(NB,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function q$(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function A4e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function L4e(e,t){e.classList?e.classList.add(t):A4e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function M4e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},K$=le.createContext(null);var X$=function(t){return t.scrollTop},lm="unmounted",bf="exited",xf="entering",Rp="entered",YC="exiting",Tu=function(e){$8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=lm:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===lm?{status:bf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=YC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:lm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:yy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===lm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=z8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function kp(){}Tu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Tu.UNMOUNTED=lm;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=YC;const O4e=Tu;var R4e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return L4e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M4e(t,r)})},Y_=function(e){$8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Bc=(e,t)=>Math.round(e/t)*t,Ep=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Pp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),I4e=e=>({width:Bc(e.width,64),height:Bc(e.height,64)}),N4e=.999,D4e=.1,z4e=20,Hg=.95,um={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F4e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:um,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},Q$=MS({name:"canvas",initialState:F4e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!U_(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:fl(st.clamp(n.width,64,512),64),height:fl(st.clamp(n.height,64,512),64)},o={x:Bc(n.width/2-i.width/2,64),y:Bc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...um,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Ep(r.width,r.height,n.width,n.height,Hg),s=Pp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=fl(st.clamp(i,64,n/e.stageScale),64),s=fl(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=I4e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(y4e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=um,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Ep(i.width,i.height,512,512,Hg),p=Pp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Ep(t,n,o,a,.95),u=Pp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(o4)){const i=Ep(r.width,r.height,512,512,Hg),o=Pp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Ep(r,i,s,l,Hg),h=Pp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Ep(r,i,512,512,Hg),h=Pp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:fl(st.clamp(o,64,512),64),height:fl(st.clamp(a,64,512),64)},l={x:Bc(o/2-s.width/2,64),y:Bc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:B4e,addLine:J$,addPointToCurrentLine:eH,clearMask:$4e,commitStagingAreaImage:H4e,discardStagedImages:W4e,fitBoundingBoxToStage:IPe,nextStagingAreaImage:V4e,prevStagingAreaImage:U4e,redo:G4e,resetCanvas:tH,resetCanvasInteractionState:j4e,resetCanvasView:Y4e,resizeAndScaleCanvas:nH,resizeCanvas:q4e,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:cm,setBoundingBoxPreviewFill:NPe,setBrushColor:K4e,setBrushSize:mw,setCanvasContainerDimensions:X4e,clearCanvasHistory:rH,setCursorPosition:iH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:ZS,setIsMaskEnabled:Z4e,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:DPe,setIsMoveStageKeyHeld:zPe,setIsMovingBoundingBox:YL,setIsMovingStage:a4,setIsTransformingBoundingBox:vw,setLayer:qL,setMaskColor:Q4e,setMergedCanvas:J4e,setShouldAutoSave:eSe,setShouldCropToBoundingBoxOnSave:tSe,setShouldDarkenOutsideBoundingBox:nSe,setShouldLockBoundingBox:FPe,setShouldPreserveMaskedArea:rSe,setShouldShowBoundingBox:iSe,setShouldShowBrush:BPe,setShouldShowBrushPreview:$Pe,setShouldShowCanvasDebugInfo:oSe,setShouldShowCheckboardTransparency:HPe,setShouldShowGrid:aSe,setShouldShowIntermediates:sSe,setShouldShowStagingImage:lSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:uSe,setShouldUseInpaintReplace:cSe,setStageCoordinates:oH,setStageDimensions:WPe,setStageScale:dSe,setTool:C0,toggleShouldLockBoundingBox:VPe,toggleTool:UPe,undo:fSe}=Q$.actions,hSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,pSe=pt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K_=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(pSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(j_e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(Y_e(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(G_e(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(Z$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function gSe(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})},other:{header:x(A$,{}),feature:to.OTHER,options:x(L$,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(T$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(D_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),mSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},vSe=pt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=kv(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(vSe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(x4e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return re(Tn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(oB,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(aB,{children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Lv,{children:re(rn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(hd,{children:re(rn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(s_,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Zc=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t_,{...o,children:[x(i_,{children:t}),re(r_,{className:`invokeai__popover-content ${r}`,children:[i&&x(n_,{className:"invokeai__popover-arrow"}),n]})]})},ySe=pt([e=>e.system,e=>e.options,e=>e.gallery,Ir],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(ySe),m=u1(),v=()=>{!u||(h&&e(sd(!1)),e(f2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};mt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(z_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(d2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(S4e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(b4e(u))};mt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(dV(!l)),R=()=>{!u||(h&&e(sd(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(d4e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:R,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(H_,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(B$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(gt,{icon:x(s4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(c4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(G5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(Zc,{trigger:"hover",triggerComponent:x(gt,{icon:x(Q5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(KS,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(Zc,{trigger:"hover",triggerComponent:x(gt,{icon:x(K5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(XS,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(gt,{icon:x(f1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},SSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},lH=MS({name:"gallery",initialState:SSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:uH,setCurrentImage:bSe,addGalleryImages:xSe,setIntermediateImage:wSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:CSe,setShouldShowGallery:_0,setGalleryScrollPosition:_Se,setGalleryImageMinimumWidth:Tp,setGalleryImageObjectFit:kSe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:ESe,setCurrentCategory:Wy,setGalleryWidth:Vy}=lH.actions,PSe=lH.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var dH=ut({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:re(Tn,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function TSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>re(rn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(TSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),re(rn,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ASe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:R}=r,I=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(rn,{gap:1,direction:"column",width:"100%",children:[re(rn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?re(Tn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),i==="esrgan"&&R!==void 0&&x(qn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:U3(s),onClick:()=>n(gb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(d2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:i4(u),onClick:()=>n(cV(i4(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(f2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&re(Tn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:H}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(qn,{label:"Strength",value:H,onClick:()=>n(x9(H))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:H}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),H&&x(qn,{label:"Fidelity",value:H,onClick:()=>{n(sV(H)),n(X3("codeformer"))}})]},z)}})]}),re(rn,{gap:2,direction:"column",children:[re(rn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(H_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(I)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:I})})]})]}):x(zz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ASe),hH=pt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function LSe(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(sd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(D$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const MSe=pt([e=>e.gallery,e=>e.options,Ir],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(MSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re(Tn,{children:[x(sH,{}),x(LSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(R5e,{})})})},OSe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=u1(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return re(Tn,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(OSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ISe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(RSe,{})}):x(mSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function NSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var DSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},VSe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],eM="__resizable_base__",gH=function(e){BSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(eM):o.className+=eM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||$Se},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(p,P),I=Math.max(m,k),N=Math.min(v,T);n=Gy(n,M,R),r=Gy(r,I,N)}else n=Gy(n,h,p),r=Gy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&HSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&jy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&jy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=jy(n)?n.touches[0].clientX:n.clientX,h=jy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=WSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(T,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=I.newWidth,T=I.newHeight,this.props.grid){var N=QL(M,this.props.grid[0]),z=QL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var H={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Ol.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,H)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(FSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return VSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return re(o,{...ul({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,USe(i,...t)]}function USe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function GSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>GSe(n,t))}function Va(...e){return C.exports.useCallback(mH(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(YSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(KC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,An({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...qSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const jSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function YSe(e){return C.exports.isValidElement(e)&&e.type===jSe}function qSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const KSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=KSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Va(S,P.collectionRef);return le.createElement(Iv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Va(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Iv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const XSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(XSe);return e||t||"ltr"}function Al(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ZSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",QSe="dismissableLayer.pointerDownOutside",JSe="dismissableLayer.focusOutside";let tM;const ebe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(ebe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Va(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,I=nbe(z=>{const $=z.target,H=[...h.branches].some(q=>q.contains($));!R||H||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=rbe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ZSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,I.onPointerDownCapture)}))});function nbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){bH(QSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(JSe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nM(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function bH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vH(i,o):i.dispatchEvent(o)}let bw=0;function ibe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},obe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Al(i),h=Al(o),p=C.exports.useRef(null),m=Va(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(xw,iM);s.addEventListener(xw,u),s.dispatchEvent(P),P.defaultPrevented||(abe(dbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const P=new CustomEvent(ww,iM);s.addEventListener(ww,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(ww,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=sbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function sbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oM(e,t){for(const n of e)if(!lbe(n,{upTo:t}))return n}function lbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ube(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ube(e)&&t&&e.select()}}const aM=cbe();function cbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dbe(e){return e.filter(t=>t.tagName!=="A")}const q0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},fbe=zw["useId".toString()]||(()=>{});let hbe=0;function pbe(e){const[t,n]=C.exports.useState(fbe());return q0(()=>{e||n(r=>r??String(hbe++))},[e]),e||(t?`radix-${t}`:"")}function h1(e){return e.split("-")[0]}function QS(e){return e.split("-")[1]}function p1(e){return["top","bottom"].includes(h1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=p1(t),l=J_(s),u=r[l]/2-i[l]/2,h=h1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(QS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const gbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=wH(r),h={x:i,y:o},p=p1(a),m=QS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,I=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,$=ZC(I,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zSbe[t])}function bbe(e,t,n){n===void 0&&(n=!1);const r=QS(e),i=p1(e),o=J_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u4(a)),{main:a,cross:u4(a)}}const xbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>xbe[t])}const wbe=["top","right","bottom","left"];function Cbe(e){const t=u4(e);return[cM(e),t,cM(t)]}const _be=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=h1(r),P=p||(w===a||!v?[u4(a)]:Cbe(a)),k=[a,...P],T=await l4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:H}=bbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[H])}if(R=[...R,{placement:r,overflows:M}],!M.every($=>$<=0)){var I,N;const $=((I=(N=i.flip)==null?void 0:N.index)!=null?I:0)+1,H=k[$];if(H)return{data:{index:$,overflows:R},reset:{placement:H}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=R.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return wbe.some(t=>e[t]>=0)}const kbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await l4(r,{...n,elementContext:"reference"}),a=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await l4(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Ebe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=h1(n),s=QS(n),l=p1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Pbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ebe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Tbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await l4(t,l),p=p1(h1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=ZC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=ZC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Abe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=p1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=p==="y"?"height":"width",I=o.reference[p]-o.floating[R]+E.mainAxis,N=o.reference[p]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=p==="y"?"width":"height",I=["top","left"].includes(h1(i)),N=o.reference[m]-o.floating[R]+(I&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(I?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(I?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(I?E.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Au(e).getComputedStyle(e)}function Cu(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function ad(e){return e instanceof Au(e).Element}function Lbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Mbe(e){return["table","td","th"].includes(Cu(e))}function EH(e){const t=/firefox/i.test(kH()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Wm=Math.max,c4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&c4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c4(s.height)/e.offsetHeight||1);const h=ad(e)?Au(e):window,p=!PH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Lbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function eb(e){return ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return _u(Sd(e)).left+eb(e).scrollLeft}function Obe(e){const t=_u(e);return c4(t.width)!==e.offsetWidth||c4(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=_u(e,r&&Obe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||JS(i))&&(a=eb(t)),Ll(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ibe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Cu(t));){if(EH(t))return t;t=t.parentNode}return null}function QC(e){const t=Au(e);let n=pM(e);for(;n&&Mbe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Ibe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Nbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||JS(o))&&(a=eb(n)),Ll(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Dbe(e,t){const n=Au(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function zbe(e){var t;const n=Sd(e),r=eb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Wm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Ll(t)&&JS(t)?t:LH(t)}function d4(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],JS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d4(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Bbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mM(e,t,n){return t==="viewport"?s4(Dbe(e,n)):ad(t)?Bbe(t,n):s4(zbe(Sd(e)))}function $be(e){const t=d4(e),r=["absolute","fixed"].includes(s2(e).position)&&Ll(e)?QC(e):e;return ad(r)?t.filter(i=>ad(i)&&Fbe(i,r)&&Cu(i)!=="body"):[]}function Hbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?$be(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Wm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Wm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Wbe={getClippingRect:Hbe,convertOffsetParentRelativeRectToViewportRelativeRect:Nbe,isElement:ad,getDimensions:gM,getOffsetParent:QC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,QC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Vbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ad(e)?d4(e):[],...d4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ad(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?_u(e):null;s&&S();function S(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Ube=(e,t,n)=>gbe(e,t,{platform:Wbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!e9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Gbe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function jbe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Gbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Ube(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Ybe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function qbe(e){const[t,n]=C.exports.useState(void 0);return q0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const MH="Popper",[tk,OH]=a2(MH),[Kbe,RH]=tk(MH),Xbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Kbe,{scope:t,anchor:r,onAnchorChange:i},n)},Zbe="PopperAnchor",Qbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=RH(Zbe,n),a=C.exports.useRef(null),s=Va(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),f4="PopperContent",[Jbe,GPe]=tk(f4),[exe,txe]=tk(f4,{hasParent:!1,positionUpdateFns:new Set}),nxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,I=RH(f4,h),[N,z]=C.exports.useState(null),$=Va(t,Pt=>z(Pt)),[H,q]=C.exports.useState(null),de=qbe(H),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),ee=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:ee,boundary:X.filter(ixe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Be,middlewareData:We,update:dt}=jbe({strategy:"fixed",placement:ie,whileElementsMounted:Vbe,middleware:[Pbe({mainAxis:m+J,alignmentAxis:S}),M?Tbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Abe():void 0,...Q}):void 0,H?Ybe({element:H,padding:w}):void 0,M?_be({...Q}):void 0,oxe({arrowWidth:V,arrowHeight:J}),T?kbe({strategy:"referenceHidden"}):void 0].filter(rxe)});q0(()=>{j(I.anchor)},[j,I.anchor]);const Ye=Se!==null&&xe!==null,[rt,Ze]=IH(Be),Ke=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();q0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=txe(f4,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(dt),()=>{lt.delete(dt)}},[xt,lt,dt]),C.exports.useLayoutEffect(()=>{xt&&Ye&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,Ye,lt]);const Cn={"data-side":rt,"data-align":Ze,...R,ref:$,style:{...R.style,animation:Ye?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:Ye?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Jbe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Ke,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(exe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(wu.div,Cn)):C.exports.createElement(wu.div,Cn)))});function rxe(e){return e!==void 0}function ixe(e){return e!==null}const oxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=IH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function IH(e){const[t,n="center"]=e.split("-");return[t,n]}const axe=Xbe,sxe=Qbe,lxe=nxe;function uxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=cxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Va(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function cxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=uxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=qy(r.current);o.current=s==="mounted"?u:"none"},[s]),q0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=qy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),q0(()=>{if(t){const u=p=>{const v=qy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=qy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qy(e){return e?.animationName||"none"}function dxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=fxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function fxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",hxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[t9,DH,pxe]=yH(nk),[gxe,zH]=a2(nk,[pxe]),[mxe,vxe]=gxe(nk),yxe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Sxe,An({},e,{ref:t}))))),Sxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Va(t,p),v=SH(o),[S=null,w]=dxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(n),M=C.exports.useRef(!1),[R,I]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,k),()=>N.removeEventListener(Cw,k)},[k]),C.exports.createElement(mxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>I(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>I(N=>N-1),[])},C.exports.createElement(wu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(Cw,hxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const H=T().filter(ie=>ie.focusable),q=H.find(ie=>ie.active),de=H.find(ie=>ie.id===S),J=[q,de,...H].filter(Boolean).map(ie=>ie.ref.current);FH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),bxe="RovingFocusGroupItem",xxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=pbe(),s=vxe(bxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=_xe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?kxe(w,E+1):w.slice(E+1)}setTimeout(()=>FH(w))}})})))}),wxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _xe(e,t,n){const r=Cxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wxe[r]}function FH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Exe=yxe,Pxe=xxe,Txe=["Enter"," "],Axe=["ArrowDown","PageUp","Home"],BH=["ArrowUp","PageDown","End"],Lxe=[...Axe,...BH],tb="Menu",[n9,Mxe,Oxe]=yH(tb),[hh,$H]=a2(tb,[Oxe,OH,zH]),rk=OH(),HH=zH(),[Rxe,nb]=hh(tb),[Ixe,ik]=hh(tb),Nxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(axe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Ixe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Dxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(sxe,An({},i,r,{ref:t}))}),zxe="MenuPortal",[jPe,Fxe]=hh(zxe,{forceMount:void 0}),Qc="MenuContent",[Bxe,WH]=hh(Qc),$xe=C.exports.forwardRef((e,t)=>{const n=Fxe(Qc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=nb(Qc,e.__scopeMenu),a=ik(Qc,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Hxe,An({},i,{ref:t})):C.exports.createElement(Wxe,An({},i,{ref:t})))))}),Hxe=C.exports.forwardRef((e,t)=>{const n=nb(Qc,e.__scopeMenu),r=C.exports.useRef(null),i=Va(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return mF(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Wxe=C.exports.forwardRef((e,t)=>{const n=nb(Qc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=nb(Qc,n),E=ik(Qc,n),P=rk(n),k=HH(n),T=Mxe(n),[M,R]=C.exports.useState(null),I=C.exports.useRef(null),N=Va(t,I,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),H=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?nB:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,ee=G=>{var Q,j;const Z=$.current+G,me=T().filter(Ye=>!Ye.disabled),Se=document.activeElement,xe=(Q=me.find(Ye=>Ye.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Be=me.map(Ye=>Ye.textValue),We=Zxe(Be,Z,xe),dt=(j=me.find(Ye=>Ye.textValue===We))===null||j===void 0?void 0:j.ref.current;(function Ye(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>Ye(""),1e3))})(Z),dt&&setTimeout(()=>dt.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ibe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&Jxe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement(Bxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=I.current)===null||Q===void 0||Q.focus(),R(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:H,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(obe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=I.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(tbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Exe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(lxe,An({role:"menu","aria-orientation":"vertical","data-state":qxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&ee(G.key));const Se=I.current;if(G.target!==Se||!Lxe.includes(G.key))return;G.preventDefault();const Be=T().filter(We=>!We.disabled).map(We=>We.ref.current);BH.includes(G.key)&&Be.reverse(),Kxe(Be)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,i9(G=>{const Q=G.target,j=V.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>V.current?"right":"left";de.current=Z,V.current=G.clientX}}))})))))))}),r9="MenuItem",vM="menu.itemSelect",Vxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(r9,e.__scopeMenu),s=WH(r9,e.__scopeMenu),l=Va(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Uxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Txe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Uxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(r9,n),s=HH(n),l=C.exports.useRef(null),u=Va(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Pxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),Gxe="MenuRadioGroup";hh(Gxe,{value:void 0,onValueChange:()=>{}});const jxe="MenuItemIndicator";hh(jxe,{checked:!1});const Yxe="MenuSub";hh(Yxe);function qxe(e){return e?"open":"closed"}function Kxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zxe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Xxe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Qxe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Jxe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Qxe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ewe=Nxe,twe=Dxe,nwe=$xe,rwe=Vxe,UH="ContextMenu",[iwe,YPe]=a2(UH,[$H]),rb=$H(),[owe,GH]=iwe(UH),awe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=rb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(owe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(ewe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},swe="ContextMenuTrigger",lwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(swe,n),o=rb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(twe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,Ky(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,Ky(u)),onPointerCancel:Yn(e.onPointerCancel,Ky(u)),onPointerUp:Yn(e.onPointerUp,Ky(u))})))}),uwe="ContextMenuContent",cwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(uwe,n),o=rb(n),a=C.exports.useRef(!1);return C.exports.createElement(nwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=rb(n);return C.exports.createElement(rwe,An({},i,r,{ref:t}))});function Ky(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const fwe=awe,hwe=lwe,pwe=cwe,pf=dwe,gwe=pt([e=>e.gallery,e=>e.options,Pu,Ir],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),mwe=pt([e=>e.options,e=>e.gallery,e=>e.system,Ir],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,ywe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(mwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=u1(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(d2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(sd(!1)),t(f2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(sd(!1)),t(q_(s)),t(nH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},I=()=>{m&&t(W_e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(V_e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(fwe,{onOpenChange:$=>{t(cH($))},children:[x(hwe,{children:re(pd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(bSe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:$_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(h4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(pwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:I,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},vwe),Swe=320;function jH(){const e=Xe(),t=u1(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=Ee(gwe),[k,T]=C.exports.useState(300),[M,R]=C.exports.useState(590),[I,N]=C.exports.useState(w>=Swe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Vy(400)),T(400),R(400);return}h==="unifiedCanvas"?(T(190),R(190),e(io(!0))):h==="img2img"?(e(Vy(Math.min(Math.max(Number(w),0),490))),R(490)):(e(Vy(Math.min(Math.max(Number(w),0),590))),R(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||R(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),H=C.exports.useRef(null),q=()=>{e(CSe(!o)),e(io(!0))},de=()=>{a?J():V()},V=()=>{e(_0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(_0(!1)),e(cH(!1)),e(_Se($.current?$.current.scrollTop:0))},[e]),ie=()=>{e(jC(r))},ee=j=>{e(Tp(j))},X=()=>{m||(H.current=window.setTimeout(()=>J(),500))},G=()=>{H.current&&window.clearTimeout(H.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(_0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Tp(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Tp(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Tp(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Tp(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){!o&&z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J,o]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:re(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:!0},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Vy(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=315&&!I?N(!0):xe<315&&I&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?re(Tn,{children:[x(ta,{size:"sm","data-selected":r==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":r==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re(Tn,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":r==="result",icon:x(J5e,{}),onClick:()=>e(Wy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(g4e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(Zc,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(Y0,{value:l,onChange:ee,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Tp(64)),icon:x(L_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(kSe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(ESe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?re(Tn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(ywe,{image:j,isSelected:i===Z},Z)})}),x($a,{onClick:ie,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(N$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const bwe=pt([e=>e.options,Ir],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ok=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(bwe),l=()=>{t(U_e(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(NSe,{})})})]}),!a&&x(jH,{})]})})};function xwe(){return x(ok,{optionsPanel:x(gSe,{}),children:x(ISe,{})})}function wwe(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})},other:{header:x(A$,{}),feature:to.OTHER,options:x(L$,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(D_,{}),e?x(B_,{accordionInfo:t}):null]})}const Cwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function _we(){return x(ok,{optionsPanel:x(wwe,{}),children:x(Cwe,{})})}var o9=function(e,t){return o9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},o9(e,t)};function kwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Hwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Hwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Wwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Vwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ak=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Wwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Vwe(a,l,u,s,h,p,Boolean(i));return m},K0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function ib(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?en?Na(n,2):Na(e,2):Na(e,2)};function ob(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=ib(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var SM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ab(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Uwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},Gwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function jwe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ob(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function Ywe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=ib(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var qwe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},Kwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Xwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Zwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:a9(e,o,a,i)}function Qwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function Jwe(e,t){var n=Kwe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=Qwe(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function e6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Xwe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,I=S.velocityAlignmentTime,N=I,z=Zwe(e,l),$=Math.max(z,N),H=h4(e,M),q=h4(e,R),de=H*i.offsetWidth/100,V=q*i.offsetHeight/100,J=u+de,ie=h-de,ee=p+V,X=m-V,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Be=new Date().getTime()-Q,We=Be/N,dt=YH[S.animationType],Ye=1-dt(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Ke=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,ie,J,Ye),bt=xM(Ke,G.positionY,xe,P,v,m,p,X,ee,Ye);(Se!==Ze||xe!==Ke)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),K0(e,n),t.touches?Gwe(e,t):Uwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=qwe(e,t,n),u=l.x,h=l.y,p=h4(e,a),m=h4(e,s);Jwe(e,{x:u,y:h}),Ywe(e,u,h,p,m)}}function t6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?e6e(e):XH(e)}}function XH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Na(t,2),o,a,0,!1),u=K0(e,l),h=ob(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},n6e=El(El({},Zp),{setComponents:function(){},contextInstance:null}),Wg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},_M=function(e){var t=El({},Wg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Wg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Wg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},Wg[n]),e[n]):s?t[n]=yM(yM([],Wg[n]),e[n]):t[n]=e[n]}}),t},JH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Na(h,3),s,a,u,!1);return p};function eW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=ib(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||bd(e,v,t,n)}}function r6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=i6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=l2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,R=ak(e,E),I=ib(T,M,R,o,0,0,r),N=I.x,z=I.y;return{positionX:N,positionY:z,scale:E}}function i6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function o6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var a6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},l6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};bd(e,v,i,o)}}},u6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},c6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=nW(t||i.scale,o,a);bd(e,s,n,r)}}},d6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&o6e(a)&&a&&o.contains(a)){var s=r6e(e,a,n);bd(e,s,r,i)}}},Br=function(e){return{instance:e,state:e.transformState,zoomIn:a6e(e),zoomOut:s6e(e),setTransform:l6e(e),resetTransform:u6e(e),centerView:c6e(e),zoomToElement:d6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ab=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},kM=function(e){e&&clearTimeout(e)},f6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},h6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ab(u,a);return!p};function p6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Ewe(t,n);return r}function rW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var g6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Na(v,3),u,l,p,S);return w},m6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},v6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ab(a,i);return!l},y6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},S6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Na(i[0].clientX-r.left,5),a=Na(i[0].clientY-r.top,5),s=Na(i[1].clientX-r.left,5),l=Na(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},b6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Na(p,2),a,o,l,!u)},x6e=160,w6e=100,C6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),ui(Br(e),t,r),ui(Br(e),t,i))},_6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=p6e(t,null),P=g6e(e,E,w,!t.ctrlKey);if(l!==P){var k=K0(e,P),T=rW(t,o,l),M=S||v===0||h,R=u&&M,I=ob(e,T.x,T.y,P,k,R),N=I.x,z=I.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),ui(Br(e),t,r),ui(Br(e),t,i)}},k6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},w6e);var o=m6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Br(e),t,r),ui(Br(e),t,i))},x6e))},E6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},P6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=S6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=b6e(e,m);if(v!==i){var S=K0(e,v),w=u||h===0||s,E=a&&w,P=ob(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},T6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function A6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var L6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ab(l,s);return!(p||!h)},oW=le.createContext(n6e),M6e=function(e){kwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=kw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=h6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(C6e(n,r),_6e(n,r),k6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),ui(Br(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),ui(Br(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(t6e(n),ui(Br(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=v6e(n,r);!l||(E6e(n,r),ml(n),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=y6e(n);!l||(r.preventDefault(),r.stopPropagation(),P6e(n,r),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(T6e(n),ui(Br(n),r,o),ui(Br(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),ui(Br(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),ui(Br(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=L6e(n,r);!o||A6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,K0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Br(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=nW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=f6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Br(n))},n}return t.prototype.componentDidMount=function(){var n=kw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=kw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(K0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Br(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),O6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(M6e,{...El({},e,{setRef:i})})});function R6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var I6e=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(I6e);var N6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(oW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function D6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(O6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re(Tn,{children:[re("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(q3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(K3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(j3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(L_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(N6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function z6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(sd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(sd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(D$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re(Tn,{children:[x(D6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=pt($n,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(F6e),n=a=>{e(cm({...t,width:Math.floor(a)}))},r=a=>{e(cm({...t,height:Math.floor(a)}))},i=()=>{e(cm({...t,width:Math.floor(512)}))},o=()=>{e(cm({...t,height:Math.floor(512)}))};return re("div",{className:"inpainting-bounding-box-settings",children:[x("div",{className:"inpainting-bounding-box-header",children:x("p",{children:"Canvas Bounding Box"})}),re("div",{className:"inpainting-bounding-box-settings-items",children:[x(Y0,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(Y0,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})]})},$6e=pt($n,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function H6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee($6e),n=Xe();return re(rn,{alignItems:"center",columnGap:"1rem",children:[x(Y0,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(ks,{isChecked:t,onChange:r=>n(cSe(r.target.checked))})]})}function W6e(){return re(Tn,{children:[x(H6e,{}),x(B6e,{})]})}function V6e(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(T$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W6e,{}),x(D_,{}),e&&x(B_,{accordionInfo:t})]})}const U6e=pt($n,H$,Ir,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),G6e=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(U6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(X4e({width:a,height:s})),e(q4e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Jv,{thickness:"2px",speed:"1s",size:"xl"})})};var j6e=Math.PI/180;function Y6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:k0,version:"8.3.13",isBrowser:Y6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*j6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var q6e="[object Array]",K6e="[object Number]",X6e="[object String]",Z6e="[object Boolean]",Q6e=Math.PI/180,J6e=180/Math.PI,Ew="#",eCe="",tCe="0",nCe="Konva warning: ",PM="Konva error: ",rCe="rgb(",Pw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},iCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const oCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===q6e},_isNumber(e){return Object.prototype.toString.call(e)===K6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===X6e},_isBoolean(e){return Object.prototype.toString.call(e)===Z6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Xy.push(e),Xy.length===1&&oCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ew,eCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=tCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===rCe?(t=iCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function g1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function aCe(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function sCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Vg="get",Ug="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Vg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Ug+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Ug+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Vg+a(t),l=Ug+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Ug+n,i=Vg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Vg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Vg+fe._capitalize(n),a=Ug+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function lCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=uCe+u.join(TM)+cCe)):(o+=s.property,t||(o+=gCe+s.val)),o+=hCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=vCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=AM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=lCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",ou="absoluteTransform",LM="absoluteScale",Gg="canvas",xCe="Change",wCe="children",CCe="konva",s9="listening",MM="mouseenter",OM="mouseleave",RM="set",IM="Shape",Y3=" ",NM="stage",kc="transform",_Ce="Stage",l9="visible",kCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let ECe=1;class Fe{constructor(t){this._id=ECe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ou)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ou,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Gg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Gg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Gg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(LM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Gg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Gg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==wCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(l9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==_Ce&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ou)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ou),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(j3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Fe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=pm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function zM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const RCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",q3=[];class ub extends ua{constructor(t){super(zM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{zM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===TCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(RCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+DM,this.content.style.height=n+DM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rMCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){Vm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||OCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=pm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=pm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=pm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=pm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,ck(t)),Vm(t.pointerId)}_lostpointercapture(t){Vm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ub.prototype.nodeType=PCe;pr(ub);K.addGetterSetter(ub,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Um={};function ICe(e){e.fill()}function NCe(e){e.stroke()}function DCe(e){e.fill()}function zCe(e){e.stroke()}function FCe(){this._clearCache(wW)}function BCe(){this._clearCache(CW)}function $Ce(){this._clearCache(_W)}function HCe(){this._clearCache(kW)}function WCe(){this._clearCache(EW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Um)););this.colorKey=n,Um[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete Um[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){Vm(t)}}Me.prototype._fillFunc=ICe;Me.prototype._strokeFunc=NCe;Me.prototype._fillFuncHit=DCe;Me.prototype._strokeFuncHit=zCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",FCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",BCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",$Ce);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",HCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",WCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,g1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var VCe="#",UCe="beforeDraw",GCe="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],jCe=PW.length;class ph extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new uk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(UCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(GCe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";pr(ph);K.addGetterSetter(ph,"imageSmoothingEnabled",!0);K.addGetterSetter(ph,"clearBeforeDraw",!0);K.addGetterSetter(ph,"hitGraphEnabled",!0,As());class dk extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class X0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}X0.prototype.nodeType="Group";pr(X0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=FM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=BM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===FM?this.setTime(t):this.state===BM&&this.setTime(this.duration-t)}pause(){this.state=qCe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Gm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=KCe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new XCe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)YCe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Gm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function d9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function HM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,I,N,z,$,H,q,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var ee=S.shift(),X=S.shift();if(l+=ee,u+=X,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+ee,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,I=a[a.length-1],I.command==="C"&&(N=l+(l-I.points[2]),z=u+(u-I.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,I=a[a.length-1],I.command==="C"&&(N=l+(l-I.points[2]),z=u+(u-I.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,I=a[a.length-1],I.command==="Q"&&(N=l+(l-I.points[0]),z=u+(u-I.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,I=a[a.length-1],I.command==="Q"&&(N=l+(l-I.points[0]),z=u+(u-I.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),H=S.shift(),q=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,H,q);break;case"a":$=S.shift(),H=S.shift(),q=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,H,q);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])},M=function(H,q){return(H[0]*q[0]+H[1]*q[1])/(T(H)*T(q))},R=function(H,q){return(H[0]*q[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,I,$,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);K.addGetterSetter(In,"data");class gh extends Mu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";pr(gh);K.addGetterSetter(gh,"pointerLength",10,ze());K.addGetterSetter(gh,"pointerWidth",10,ze());K.addGetterSetter(gh,"pointerAtBeginning",!1);K.addGetterSetter(gh,"pointerAtEnding",!0);class m1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}m1.prototype._centroid=!0;m1.prototype.className="Circle";m1.prototype._attrsAffectingSize=["radius"];pr(m1);K.addGetterSetter(m1,"radius",0,ze());class wd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],ZCe="Change.konva",QCe="none",f9="up",h9="right",p9="down",g9="left",JCe=TW.length;class fk extends X0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];pr(vh);K.addGetterSetter(vh,"radius",0,ze());K.addGetterSetter(vh,"sides",0,ze());var WM=Math.PI*2;class yh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,WM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),WM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(yh);K.addGetterSetter(yh,"innerRadius",0,ze());K.addGetterSetter(yh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Rw(){return o3||(o3=fe.createCanvasElement().getContext(n9e),o3)}function h9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function p9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function g9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(g9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(r9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Rw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+i3+this.fontVariant()+i3+(this.fontSize()+s9e)+f9e(this.fontFamily())}_addTextLine(t){this.align()===jg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Rw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==GM,w=v!==c9e&&S,E=this.ellipsis();this.textArr=[],Rw().font=this._getContextFont();for(var P=E?this._getTextWidth(Ow):0,k=0,T=t.length;kh)for(;M.length>0;){for(var I=0,N=M.length,z="",$=0;I>>1,q=M.slice(0,H+1),de=this._getTextWidth(q)+P;de<=h?(I=H+1,z=q,$=de):N=H}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===VM;ie&&$<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(VM))+1,V>0&&(I=V,z=z.slice(0,I),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var ee=this._shouldHandleEllipsis(m);if(ee){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(I),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kp)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==GM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Ow)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},k=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var ee=J;S===void 0;)S=P(),S&&ee+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:V>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E=0&&E>j)&&(E=j,X=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?V>S.pathLength?E=1e-8:E=V/S.pathLength:V>J?E+=(V-J)/S.pathLength/2:E=Math.max(E-(J-V)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=In.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=V/S.pathLength:V>J?E+=(V-J)/S.pathLength:E-=(J-V)/S.pathLength,E>1&&(E=1,X=!0),v=In.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,I=0;Ie+`.${DW}`).join(" "),jM="nodesRect",y9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],S9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const b9e="ontouchstart"in ot._global;function x9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(S9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],YM=1e8;function w9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function zW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function C9e(e,t){const n=w9e(e);return zW(e,t,n)}function _9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(y9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(jM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(jM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return zW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-YM,y:-YM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new u2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:b9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=x9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const V=m+de,J=ot.getAngle(this.rotationSnapTolerance()),ee=_9e(this.rotationSnaps(),V,J)-p.rotation,X=C9e(p,ee);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),X0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function k9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p4.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p4.join(", "))}),e||[]}wn.prototype.className="Transformer";pr(wn);K.addGetterSetter(wn,"enabledAnchors",p4,k9e);K.addGetterSetter(wn,"flipEnabled",!0,As());K.addGetterSetter(wn,"resizeEnabled",!0);K.addGetterSetter(wn,"anchorSize",10,ze());K.addGetterSetter(wn,"rotateEnabled",!0);K.addGetterSetter(wn,"rotationSnaps",[]);K.addGetterSetter(wn,"rotateAnchorOffset",50,ze());K.addGetterSetter(wn,"rotationSnapTolerance",5,ze());K.addGetterSetter(wn,"borderEnabled",!0);K.addGetterSetter(wn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(wn,"anchorStrokeWidth",1,ze());K.addGetterSetter(wn,"anchorFill","white");K.addGetterSetter(wn,"anchorCornerRadius",0,ze());K.addGetterSetter(wn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(wn,"borderStrokeWidth",1,ze());K.addGetterSetter(wn,"borderDash");K.addGetterSetter(wn,"keepRatio",!0);K.addGetterSetter(wn,"centeredScaling",!1);K.addGetterSetter(wn,"ignoreStroke",!1);K.addGetterSetter(wn,"padding",0,ze());K.addGetterSetter(wn,"node");K.addGetterSetter(wn,"nodes");K.addGetterSetter(wn,"boundBoxFunc");K.addGetterSetter(wn,"anchorDragBoundFunc");K.addGetterSetter(wn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(wn,"useSingleNodeRotation",!0);K.backCompat(wn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function qM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var E9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],P9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function T9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,R,I,N,z,$,H,q,de,V=t+t+1,J=r-1,ie=i-1,ee=t+1,X=ee*(ee+1)/2,G=new qM,Q=null,j=G,Z=null,me=null,Se=E9e[t],xe=P9e[t];for(s=1;s>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+ee)0&&T9e(t,n)};K.addGetterSetter(Fe,"blurRadius",0,ze(),K.afterSetFilter);const L9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};K.addGetterSetter(Fe,"contrast",0,ze(),K.afterSetFilter);const O9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],I=T,N=I>0?I:-I,z=M>0?M:-M,$=R>0?R:-R;if(z>N&&(I=M),$>N&&(I=R),I*=t,i){var H=s[E]+I,q=s[E+1]+I,de=s[E+2]+I;s[E]=H>255?255:H<0?0:H,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var V=n-I;V<0?V=0:V>255&&(V=255),s[E]=s[E+1]=s[E+2]=V}}while(--w)}while(--p)};K.addGetterSetter(Fe,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Fe,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Fe,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Fe,"embossBlend",!1,null,K.afterSetFilter);function Iw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const R9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,I;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),I=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),I=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,I=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,I,N,z=n.polarRotation||0,$,H;for(h=0;ht&&(M=T,R=0,I=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function j9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};K.addGetterSetter(Fe,"pixelSize",8,ze(),K.afterSetFilter);const X9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"blue",0,aW,K.afterSetFilter);const Q9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const J9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},t7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[W]!==O[se]){var he=` +`+A[W].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=W&&0<=se);break}}}finally{Is=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var Ch=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function kn(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function qa(){kn(Ur),kn(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function Ka(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(Cr),vn(Cr,d)):kn(Ur),vn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,_h=Math.log,kh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var zs=64,uo=4194304;function Fs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?_=Fs(se):(O&=W,O!==0&&(_=Fs(O)))}else W=y&~A,W!==0?_=Fs(W):O!==0&&(_=Fs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=W,A-=W,Ui=1<<32-gi(f)+A|y<Bt?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Bt],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Bt===ye.length)return y(ge,kt),Dn&&Bs(ge,Bt),Te;if(kt===null){for(;BtBt?(zr=kt,kt=null):zr=kt.sibling;var is=je(ge,kt,Yt.value,He);if(is===null){kt===null&&(kt=zr);break}d&&kt&&is.alternate===null&&f(ge,kt),ue=O(is,ue,Bt),Lt===null?Te=is:Lt.sibling=is,Lt=is,kt=zr}if(Yt.done)return y(ge,kt),Dn&&Bs(ge,Bt),Te;if(kt===null){for(;!Yt.done;Bt++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return Dn&&Bs(ge,Bt),Te}for(kt=_(ge,kt);!Yt.done;Bt++,Yt=ye.next())Yt=Fn(kt,ge,Bt,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Bt:Yt.key),ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(si){return f(ge,si)}),Dn&&Bs(ge,Bt),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&$1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=xa(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=xa(ge,ue,ye),He.return=ge,ge=He)}return W(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return W(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(ie(ye))return En(ge,ue,ye,He);if(I(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(ye,ge.mode,He),ue.return=ge,ge=ue),W(ge)):y(ge,ue)}return qo}var Yu=w2(!0),C2=w2(!1),Wd={},po=No(Wd),wa=No(Wd),oe=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(oe,f),vn(wa,d),vn(po,Wd),d=X(f),kn(po),vn(po,d)}function Ge(){kn(po),kn(wa),kn(oe)}function _t(d){var f=be(oe.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(wa,d),vn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var Rt=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Iu(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function H1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return yi().memoizedState}function K1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=ai();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=ai(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Qa={readContext:Gi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=K1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:j1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=q1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||G1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,_=Ui;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0np&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=Rt.current,vn(Rt,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),Ke&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function rg(d,f){switch(D1(f),f.tag){case 1:return Gr(f.type)&&qa(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),kn(Ur),kn(Cr),H1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(Rt),null;case 4:return Ge(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Vh=!1;function Yl(d,f){for(Q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Bo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:Ke&&Ms(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Gh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=ee(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ig(d){var f=d.alternate;f!==null&&(d.alternate=null,ig(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&<(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function uc(d){return d.tag===5||d.tag===3||d.tag===4}function es(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function jh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(jh(d,f,y),d=d.sibling;d!==null;)jh(d,f,y),d=d.sibling}function og(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(_!==4&&(d=d.child,d!==null))for(og(d,f,y),d=d.sibling;d!==null;)og(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Ke){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):ft(yr,y.stateNode))}else jo(d,f,y);break;case 18:Ke&&yr!==null&&(Go?M1(yr,y.stateNode):L1(yr,y.stateNode));break;case 4:Ke?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=va(_),Ru(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):jo(d,f,y);break;default:jo(d,f,y)}}function Yh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(_){var A=U2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Zh:return":has("+(lg(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_A&&(A=W),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*_b(_/1960))-_,10<_){d.timeoutHandle=dt(Qs.bind(null,d,bi,ns),_);break}Qs(d,bi,ns);break;case 5:Qs(d,bi,ns);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=bi,bi=y,f!==null&&sp(f)),d}function sp(d){bi===null?bi=d:bi.push.apply(bi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Ft&6)!==0)throw Error(a(331));var A=Ft;for(Ft|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;heWn()-dg?Xs(d,0):cg|=y),Kr(d,f)}function mg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),mg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),mg(d,y)}var vg;vg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&N1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Ca(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=V1(null,f,_,d,A,y);var O=Xu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(O=!0,Ka(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,F1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,B1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,Dn&&O&&mi(f),Si(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=cp(_),d=Bo(_,d),A){case 0:f=Q1(null,f,_,d,y);break e;case 1:f=N2(null,f,_,d,y);break e;case 11:f=M2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Bo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),Q1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),N2(d,f,_,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Ih(f,_,null,y);var W=f.memoizedState;if(_=W.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=z2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=z2(d,f,_,y,A);break e}else for(bt&&(fo=C1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ii=null,ho=!1),y=C2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Ja(d,f,y);break e}Si(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Id(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,Be(_,A)?W=null:O!==null&&Be(_,O)&&(f.flags|=32),I2(d,f),Si(d,f,W,y),f.child;case 6:return d===null&&Id(f),null;case 13:return F2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):Si(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),M2(d,f,_,A,y);case 7:return Si(d,f,f.pendingProps,y),f.child;case 8:return Si(d,f,f.pendingProps.children,y),f.child;case 12:return Si(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,_,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=Ja(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Za(-1,y&-y),he.tag=2;var Ie=O.updateQueue;if(Ie!==null){Ie=Ie.shared;var et=Ie.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Ie.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Bd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),Bd(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}Si(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,Si(d,f,_,y),f.child;case 14:return _=f.type,A=Bo(_,f.pendingProps),A=Bo(_.type,A),Vs(d,f,_,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),Ca(d,f),f.tag=1,Gr(_)?(d=!0,Ka(f)):d=!1,Gu(f,y),b2(f,_,A),B1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return $2(d,f,y);case 22:return R2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return $u(d,f)}function _a(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new _a(d,f,y,_)}function yg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return yg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,A,O){var W=2;if(_=d,typeof d=="function")yg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return dp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case k:W=14;break e;case T:W=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function el(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,_,A,O,W,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},F1(O),d}function Sg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Bl(d,y,f)}return f}function bg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ie&&O>=At&&A<=et&&W<=je){d.splice(f,1);break}else if(_!==Ie||y.width!==he.width||jeW){if(!(O!==At||y.height!==he.height||et<_||Ie>A)){Ie>_&&(he.width+=Ie-_,he.x=_),etO&&(he.height+=At-O,he.y=O),jey&&(y=W)),W ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||xg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ug(d,f);var A=jt(d,y,_).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=ai(),W=Tr(A);return y=Sg(y),f.context===null?f.context=y:f.pendingContext=y,f=Za(O,W),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=n7e})(FW);const r7e=I9(FW.exports);var hk={exports:{}},Sh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */Sh.ConcurrentRoot=1;Sh.ContinuousEventPriority=4;Sh.DefaultEventPriority=16;Sh.DiscreteEventPriority=1;Sh.IdleEventPriority=536870912;Sh.LegacyRoot=0;(function(e){e.exports=Sh})(hk);const KM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let XM=!1,ZM=!1;const pk=".react-konva-event",i7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,o7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,a7e={};function cb(e,t,n=a7e){if(!XM&&"zIndex"in t&&(console.warn(o7e),XM=!0),!ZM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(i7e),ZM=!0)}for(var o in n)if(!KM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!KM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const BW={},s7e={};nh.Node.prototype._applyProps=cb;function l7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function u7e(e,t,n){let r=nh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=nh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return cb(l,o),l}function c7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function d7e(e,t,n){return!1}function f7e(e){return e}function h7e(){return null}function p7e(){return null}function g7e(e,t,n,r){return s7e}function m7e(){}function v7e(e){}function y7e(e,t){return!1}function S7e(){return BW}function b7e(){return BW}const x7e=setTimeout,w7e=clearTimeout,C7e=-1;function _7e(e,t){return!1}const k7e=!1,E7e=!0,P7e=!0;function T7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function A7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function L7e(e,t,n){$W(e,t,n)}function M7e(e,t){t.destroy(),t.off(pk),_d(e)}function O7e(e,t){t.destroy(),t.off(pk),_d(e)}function R7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function I7e(e,t,n){}function N7e(e,t,n,r,i){cb(e,i,r)}function D7e(e){e.hide(),_d(e)}function z7e(e){}function F7e(e,t){(t.visible==null||t.visible)&&e.show()}function B7e(e,t){}function $7e(e){}function H7e(){}const W7e=()=>hk.exports.DefaultEventPriority,V7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:l7e,createInstance:u7e,createTextInstance:c7e,finalizeInitialChildren:d7e,getPublicInstance:f7e,prepareForCommit:h7e,preparePortalMount:p7e,prepareUpdate:g7e,resetAfterCommit:m7e,resetTextContent:v7e,shouldDeprioritizeSubtree:y7e,getRootHostContext:S7e,getChildHostContext:b7e,scheduleTimeout:x7e,cancelTimeout:w7e,noTimeout:C7e,shouldSetTextContent:_7e,isPrimaryRenderer:k7e,warnsIfNotActing:E7e,supportsMutation:P7e,appendChild:T7e,appendChildToContainer:A7e,insertBefore:$W,insertInContainerBefore:L7e,removeChild:M7e,removeChildFromContainer:O7e,commitTextUpdate:R7e,commitMount:I7e,commitUpdate:N7e,hideInstance:D7e,hideTextInstance:z7e,unhideInstance:F7e,unhideTextInstance:B7e,clearContainer:$7e,detachDeletedInstance:H7e,getCurrentEventPriority:W7e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var U7e=Object.defineProperty,G7e=Object.defineProperties,j7e=Object.getOwnPropertyDescriptors,QM=Object.getOwnPropertySymbols,Y7e=Object.prototype.hasOwnProperty,q7e=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?U7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eO=(e,t)=>{for(var n in t||(t={}))Y7e.call(t,n)&&JM(e,n,t[n]);if(QM)for(var n of QM(t))q7e.call(t,n)&&JM(e,n,t[n]);return e},K7e=(e,t)=>G7e(e,j7e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:X7e,ReactCurrentDispatcher:Z7e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q7e(){const e=C.exports.useContext(mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=X7e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Kg=[],tO=new WeakMap;function J7e(){var e;const t=Q7e();Kg.splice(0,Kg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Kg.push(HW(i))});for(const n of Kg){const r=(e=Z7e.current)==null?void 0:e.readContext(n);tO.set(n,r)}return C.exports.useMemo(()=>Kg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,K7e(eO({},i),{value:tO.get(r)}))),n=>x(WW,{...eO({},n)})),[])}function e8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const t8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=e8e(e),o=J7e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=gm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),gm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),gm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),cb(n.current,e,i),gm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",rh="Group",P0="Rect",Xg="Circle",g4="Line",VW="Image",n8e="Transformer",gm=r7e(V7e);gm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const r8e=le.forwardRef((e,t)=>x(WW,{children:x(t8e,{...e,forwardedRef:t})})),i8e=pt([$n],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o8e=e=>{const{...t}=e,{objects:n}=Ee(i8e);return x(rh,{listening:!1,...t,children:n.filter(U_).map((r,i)=>x(g4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},c2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},a8e=pt($n,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:c2(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),s8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(a8e);return l?re(rh,{listening:!1,...t,children:[x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},l8e=pt($n,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),u8e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ee(l8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),ee=Bc(J,64),X=Bc(ie,64);V.target.x(ee),V.target.y(X),n(gw({x:ee,y:X}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const V=k.current,J=V.scaleX(),ie=V.scaleY(),ee=Math.round(V.width()*J),X=Math.round(V.height()*ie),G=Math.round(V.x()),Q=Math.round(V.y());n(cm({width:ee,height:X})),n(gw({x:v?fl(G,64):G,y:v?fl(Q,64):Q})),V.scaleX(1),V.scaleY(1)},[n,v]),I=C.exports.useCallback((V,J,ie)=>{const ee=V.x%T,X=V.y%T;return{x:fl(J.x,T)+ee,y:fl(J.y,T)+X}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},$=()=>{n(YL(!0))},H=()=>{n(vw(!1)),n(YL(!1)),n(Hy(!1))},q=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(rh,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:H,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:H,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(n8e,{anchorCornerRadius:3,anchorDragBoundFunc:I,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:H,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let UW=null,GW=null;const c8e=e=>{UW=e},m4=()=>UW,d8e=e=>{GW=e},f8e=()=>GW,h8e=pt([$n,Ir],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(h8e),i=C.exports.useRef(null),o=f8e();mt("esc",()=>{e(j4e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iSe(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},g8e=pt($n,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:c2(t)}}),nO=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),m8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(g8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=nO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=nO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},v8e=pt([$n],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),y8e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(v8e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=st.clamp(r*N4e**s,D4e,z4e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(dSe(l)),t(oH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},S8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),b8e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(S8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a4(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(ZS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},x8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),w8e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(x8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a4(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(ZS(!1))},[t,n,i,o,e,r])},C8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),_8e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(C8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(iH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},k8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),E8e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(k8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(ZS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},P8e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(iH(null)),e(ZS(!1))},[e])},T8e=pt([$n,Pu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(T8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a4(!1))},[e,n,t])}};var gf=C.exports,L8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const jW=e=>{const{url:t,x:n,y:r}=e,[i]=L8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},M8e=pt([$n],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O8e=()=>{const{objects:e}=Ee(M8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o4(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(v4e(t))return x(g4,{points:t.points,stroke:t.color?c2(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},R8e=pt([$n],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},N8e=()=>{const{colorMode:e}=Wv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(R8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=I8e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=st.range(0,T).map(N=>x(g4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),I=st.range(0,M).map(N=>x(g4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(I))},[t,n,r,e,a]),x(rh,{children:i})},D8e=pt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),z8e=e=>{const{...t}=e,n=Ee(D8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},l3=e=>Math.round(e*100)/100,F8e=pt([$n],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=Ee(F8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&re(Tn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},$8e=pt([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee($8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&re(rh,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},W8e=pt([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(W8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(U4e()),l=()=>e(V4e()),u=()=>e(H4e());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:re(ra,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(W5e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(V5e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x($_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(Z5e,{}):x(X5e,{}),onClick:()=>e(lSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x($$,{}),onClick:()=>e(_4e(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(f1,{}),onClick:()=>e(W4e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},U8e=pt([$n,Pu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(U8e);p8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(H=>{d8e(H),p.current=H},[]),S=C.exports.useCallback(H=>{c8e(H),m.current=H},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=y8e(p),k=b8e(p),T=w8e(p,E),M=_8e(p,E,w),R=E8e(p),I=P8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=A8e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(r8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:I,onMouseMove:M,onMouseOut:I,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(N8e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(O8e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(o8e,{visible:!0,listening:!1}),x(m8e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(s8e,{visible:l!=="move",listening:!1}),x(H8e,{visible:u}),h&&x(z8e,{}),x(u8e,{visible:n&&!u})]})]}),x(B8e,{}),x(V8e,{})]})})},j8e=pt([$n,Ir],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function Y8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(j8e),r=()=>{e(fSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(p4e,{}),onClick:r,isDisabled:!t})}const q8e=pt([$n,Ir],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function K8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(q8e),r=()=>{e(G4e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(u4e,{}),onClick:r,isDisabled:!t})}const X8e=()=>{const e=Xe(),{isOpen:t,onOpen:n,onClose:r}=kv(),i=C.exports.useRef(null);return re(Tn,{children:[x(ta,{leftIcon:x(f1,{}),size:"sm",onClick:n,children:"Clear Temp Image Folder"}),x(oB,{isOpen:t,leastDestructiveRef:i,onClose:r,children:x(G0,{children:re(aB,{children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Clear Temp Image Folder"}),re(Lv,{children:[x("p",{children:"Clearing the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to clear the temp folder?"})]}),re(kS,{children:[x($a,{ref:i,onClick:r,children:"Cancel"}),x($a,{colorScheme:"red",onClick:()=>{e(k4e()),e(rH()),e(tH()),r()},ml:3,children:"Clear"})]})]})})})]})},Z8e=pt([$n],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Q8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(Z8e);return x(Zc,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:re(rn,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e(sSe(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(aSe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(uSe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(nSe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(eSe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(tSe(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(ta,{size:"sm",leftIcon:x(f1,{}),onClick:()=>e(rH()),children:"Clear Canvas History"}),x(X8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function m9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Z0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(rO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=v9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(iO(P),!function(M,R){return R&&!jm(M)}(P,l.current)&&k)){if(jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(rO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},qW=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},y9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},J8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},e_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},t_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Z0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(yk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),n_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Z0(t.s+100*i.left,0,100),v:Z0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function r_e(e,t,n){var r=m9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;KW(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var i_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,o_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oO=new Map,a_e=function(e){i_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oO.set(t,n);var r=o_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},s_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(vk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:Z0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},l_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);a_e(s);var l=r_e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(n_e,{hsva:u,onChange:h}),x(t_e,{hue:u.h,onChange:h}),le.createElement(s_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},u_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:e_e,fromHsva:J8e,equal:KW},c_e=function(e){return le.createElement(l_e,fb({},e,{colorModel:u_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(c_e,{className:`invokeai__color-picker ${t}`,...n})},d_e=pt([$n],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:c2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),f_e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(d_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e($4e()),s=()=>e(Z4e(!r));return re(Tn,{children:[x(yd,{label:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:t,validValues:m4e,onChange:l=>e(qL(l.target.value))}),x(Zc,{isOpen:t!=="mask"?!1:void 0,trigger:"hover",triggerComponent:x(ra,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(n4e,{}),isDisabled:t!=="mask"})}),children:re(rn,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(rSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Q4e(l))}),x(ta,{size:"sm",leftIcon:x(f1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})]})};let u3;const h_e=new Uint8Array(16);function p_e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(h_e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function g_e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const m_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aO={randomUUID:m_e};function Jp(e,t,n){if(aO.randomUUID&&!t&&!e)return aO.randomUUID();e=e||{};const r=e.random||(e.rng||p_e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return g_e(r)}const v_e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},y_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},S_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},b_e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=b_e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(A5e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m4();if(!S){t(hu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:E}=v_e(S,h,v,i?{...p,...m}:void 0);if(!w){t(hu(!1)),t(Kp(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:I}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(y_e(M),t(sm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(S_e(M,R,I),t(sm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(sm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(J4e({kind:"image",layer:"base",...E,image:N})),t(sm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(G3("Connected")),t(Kp(!0))},Sk=e=>e.system,x_e=e=>e.system.toastQueue,w_e=pt([$n,Pu,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:c2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),C_e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=Ee(w_e);mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(C0("brush")),s=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(i4e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(q5e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(C0("eraser"))}),x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(f4e,{})}),children:re(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(Y0,{label:"Size",value:r,withInput:!0,onChange:l=>e(mw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(K4e(l))})]})})]})};let sO;const ZW=()=>({setOpenUploader:e=>{e&&(sO=e)},openUploader:sO}),__e=pt([Sk,$n,Pu],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o}=t;return{isProcessing:r,isStaging:n,tool:i,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),k_e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,tool:r,shouldCropToBoundingBoxOnSave:i}=Ee(__e),o=m4(),{openUploader:a}=ZW();mt(["v"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[]),mt(["r"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[o]),mt(["shift+m"],()=>{h()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["shift+s"],()=>{p()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["meta+c","ctrl+c"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["shift+d"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[o,t]);const s=()=>e(C0("move")),l=()=>{const S=m4();if(!S)return;const w=S.getClientRect({skipTransform:!0});e(Y4e({contentRect:w}))},u=()=>{e(tH()),e(nH())},h=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},p=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldSaveToGallery:!0}))},m=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldCopy:!0}))},v=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(f_e,{}),x(C_e,{}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(U5e,{}),"data-selected":r==="move"||n,onClick:s}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(Y5e,{}),onClick:l})]}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(t4e,{}),onClick:h,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x($$,{}),onClick:p,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(H_,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(B$,{}),onClick:v,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(Y8e,{}),x(K8e,{})]}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:a}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(f1,{}),onClick:u,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(Q8e,{})})]})},E_e=pt([$n],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P_e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(E_e);return C.exports.useLayoutEffect(()=>{const n=st.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(k_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(G6e,{}):x(G8e,{})})]})})})};function T_e(){const e=Xe();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(V6e,{}),styleClass:"inpainting-workarea-overrides",children:x(P_e,{})})}const A_e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(_we,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(xwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(A_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},pb=st.map(kf,(e,t)=>t);[...pb];function L_e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(sd(!t))},[t]),mt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(IB,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(OB,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return re(MB,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(RB,{className:"app-tabs-panels",children:t?x(z6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},M_e=QW,JW=MS({name:"options",initialState:M_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=i4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...QW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=pb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:gb,setIterations:O_e,setSteps:eV,setCfgScale:tV,setThreshold:R_e,setPerlin:I_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:d2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:S9,setFacetoolStrength:K3,setFacetoolType:X3,setCodeformerFidelity:sV,setUpscalingLevel:b9,setUpscalingStrength:x9,setMaskPath:lV,resetSeed:qPe,resetOptionsState:KPe,setShouldFitToWidthHeight:uV,setParameter:XPe,setShouldGenerateVariations:N_e,setSeedWeights:cV,setVariationAmount:D_e,setAllParameters:z_e,setShouldRunFacetool:F_e,setShouldRunESRGAN:B_e,setShouldRandomizeSeed:$_e,setShowAdvancedOptions:H_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:W_e,setAllImageToImageParameters:V_e,setShowDualDisplay:U_e,setInitialImage:f2,clearInitialImage:fV,setShouldShowOptionsPanel:T0,setShouldPinOptionsPanel:G_e,setOptionsPanelScrollPosition:j_e,setShouldHoldOptionsPanelOpen:Y_e,setShouldLoopback:q_e,setCurrentTheme:K_e,setIsLightBoxOpen:sd}=JW.actions,X_e=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const Z3=Object.create(null);Object.keys(Ml).forEach(e=>{Z3[Ml[e]]=e});const Z_e={type:"error",data:"parser error"},Q_e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",J_e=typeof ArrayBuffer=="function",eke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>Q_e&&t instanceof Blob?n?r(t):lO(t,r):J_e&&(t instanceof ArrayBuffer||eke(t))?n?r(t):lO(new Blob([t]),r):r(Ml[e]+(t||"")),lO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},uO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},nke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rke(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:Z_e},rke=(e,t)=>{if(nke){const n=tke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),ike=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},oke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ske=setTimeout,lke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=ske.bind($c),e.clearTimeoutFn=lke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const uke=1.33;function cke(e){return typeof e=="string"?dke(e):Math.ceil((e.byteLength||e.size)*uke)}function dke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class fke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new fke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,hke={};let cO=0,d3=0,dO;function fO(e){let t="";do t=bV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function xV(){const e=fO(+new Date);return e!==dO?(cO=0,dO=e):e+"."+fO(cO++)}for(;d3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};oke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ike(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=xV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pl extends Vr{constructor(t,n){super(),mb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=yV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new _V(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Pl.requestsCount++,Pl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=mke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,hO,!1)}}function hO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=$c.WebSocket||$c.MozWebSocket,pO=!0,Ske="arraybuffer",gO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bke extends SV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=gO?{}:yV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=pO&&!gO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Ske,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{pO&&this.ws.send(o)}catch{}i&&kV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=xV()),this.supportsBinary||(t.b64=1);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!f3}}const xke={websocket:bke,polling:yke},wke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Cke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=wke.exec(e||""),o={},a=14;for(;a--;)o[Cke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=_ke(o,o.path),o.queryKey=kke(o,o.query),o}function _ke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function kke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Rc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=C9(n.host).host),mb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=pke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new xke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Rc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Rc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Rc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Rc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Rc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Ake=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",Lke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Pke&&(e instanceof ArrayBuffer||Tke(e))||Ake&&e instanceof Blob||Lke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Nke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Oke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Dke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Rke,get PacketType(){return tn},Encoder:Ike,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function ps(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ps(t,"open",this.onopen.bind(this)),ps(t,"packet",this.onpacket.bind(this)),ps(t,"error",this.onerror.bind(this)),ps(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(zke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}v1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};v1.prototype.reset=function(){this.attempts=0};v1.prototype.setMin=function(e){this.ms=e};v1.prototype.setMax=function(e){this.max=e};v1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,mb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new v1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Dke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Rc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ps(n,"open",function(){r.onopen(),t&&t()}),o=ps(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ps(t,"ping",this.onping.bind(this)),ps(t,"data",this.ondata.bind(this)),ps(t,"error",this.onerror.bind(this)),ps(t,"close",this.onclose.bind(this)),ps(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Zg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Eke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Zg[i]&&o in Zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Zg[i]||(Zg[i]=new E9(r,t)),l=Zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:PV,io:J3,connect:J3});var Fke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Bke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,$ke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(mO[t]||t||mO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return Hke(e)},E=function(){return Wke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return vO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return vO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Vke(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(Fke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var mO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},vO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},Hke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Wke=function(t){var n=t.getDay();return n===0&&(n=7),n},Vke=function(t){return(String(t).match(Bke)||[""]).pop().replace($ke,"").replace(/GMT\+0000/g,"UTC")};const Uke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(FL(!0)),t(G3("Connected")),t(C4e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(jC("user")),r.categories.result.latest_mtime?t(WL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(FL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(B4e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(f2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(wSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(b5e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(BL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(xSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(C5e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(x5e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(G3("Model Changed")),t(hu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(hu(!1)),t(Kp(!0)),t(BL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(sm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},Gke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new qg.Stage({container:i,width:n,height:r}),a=new qg.Layer,s=new qg.Layer;a.add(new qg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new qg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},jke=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},Yke=e=>{const t=m4(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:R,shouldGenerateVariations:I,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:H,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:V,codeformerFidelity:J,facetoolType:ie,shouldRandomizeSeed:ee}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:ee||I?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=ee?M$(T_,A_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=R),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Be,inpaintReplace:We,shouldUseInpaintReplace:dt,stageScale:Ye,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Ke={...xe,...Be},Et=Gke(rt?Se.filter(U_):[],Ke);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,dt&&(j.inpaint_replace=We),j.bounding_box=Ke;const bt=t.scale();t.scale({x:1/Ye,y:1/Ye});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Ke.x+Ae.x,y:Ke.y+Ae.y,width:Ke.width,height:Ke.height});Q&&jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}I?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:H,strength:q}),de&&(me={type:ie,strength:V},ie==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},qke=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(P5e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=Yke(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(hu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(hu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(uH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(_5e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},Kke=()=>{const{origin:e}=new URL(window.location.href),t=J3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=Uke(i),{emitGenerateImage:R,emitRunESRGAN:I,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:H,emitCancelProcessing:q,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=qke(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",ee=>u(ee)),t.on("generationResult",ee=>p(ee)),t.on("postprocessingResult",ee=>h(ee)),t.on("intermediateResult",ee=>m(ee)),t.on("progressUpdate",ee=>v(ee)),t.on("galleryImages",ee=>S(ee)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",ee=>{E(ee)}),t.on("systemConfig",ee=>{P(ee)}),t.on("modelChanged",ee=>{k(ee)}),t.on("modelChangeFailed",ee=>{T(ee)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{H(a.payload);break}case"socketio/cancelProcessing":{q();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},Xke=["cursorPosition"].map(e=>`canvas.${e}`),Zke=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),Qke=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=UB({options:X_e,gallery:PSe,system:L5e,canvas:hSe}),Jke=c$.getPersistConfig({key:"root",storage:u$,rootReducer:TV,blacklist:[...Xke,...Zke,...Qke],debounce:300}),eEe=A2e(Jke,TV),AV=Cve({reducer:eEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(Kke()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=p2e,Ee=r2e;function e5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e5=function(n){return typeof n}:e5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e5(e)}function tEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yO(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Jv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),aEe=pt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(aEe),i=t?Math.round(t*100/n):0;return x(hB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function lEe(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function uEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=kv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(lEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re(Tn,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Mv,{className:" modal hotkeys-modal",children:[x(K8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const cEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return re("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x($z,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},dEe=pt(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),fEe=()=>{const{models:e}=Ee(dEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(Df,{children:[x(If,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(cEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},hEe=pt(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=({children:e})=>{const t=Xe(),n=Ee(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=kv(),{isOpen:a,onOpen:s,onClose:l}=kv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(hEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(k5e(E))};return re(Tn,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Mv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K8,{className:"modal-close-btn"}),re(Lv,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(fEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(yd,{label:"Display In-Progress Images",validValues:B3e,value:u,onChange:E=>t(y5e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(w5e(E.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(E5e(E.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Mv,{children:x(Lv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},gEe=pt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),mEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(gEe),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(I$())},className:`status ${l}`,children:u})})},vEe=["dark","light","green"];function yEe(){const{setColorMode:e}=Wv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(K_e(i))};return x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(o4e,{})}),children:x(Vz,{align:"stretch",children:vEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x($_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const SEe=pt([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),bEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(SEe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(yd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},xEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(mEe,{}),x(bEe,{}),x(uEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(e4e,{})})}),x(yEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(j5e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x($5e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(B5e,{})})}),x(pEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),wEe=pt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),CEe=pt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),_Ee=()=>{const e=Xe(),t=Ee(wEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(CEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(I$()),e(hw(!n))};return mt("`",()=>{e(hw(!n))},[n]),mt("esc",()=>{e(hw(!1))}),re(Tn,{children:[n&&x(gH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(H5e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(r4e,{}):x(F$,{}),onClick:l})})]})};function kEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var EEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function h2(e,t){var n=PEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function PEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=EEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var TEe=[".DS_Store","Thumbs.db"];function AEe(e){return i1(this,void 0,void 0,function(){return o1(this,function(t){return v4(e)&&LEe(e.dataTransfer)?[2,IEe(e.dataTransfer,e.type)]:MEe(e)?[2,OEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,REe(e)]:[2,[]]})})}function LEe(e){return v4(e)}function MEe(e){return v4(e)&&v4(e.target)}function v4(e){return typeof e=="object"&&e!==null}function OEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function REe(e){return i1(this,void 0,void 0,function(){var t;return o1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return h2(r)})]}})})}function IEe(e,t){return i1(this,void 0,void 0,function(){var n,r;return o1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(NEe))]):[3,2];case 1:return r=i.sent(),[2,SO(MV(r))];case 2:return[2,SO(A9(e.files).map(function(o){return h2(o)}))]}})})}function SO(e){return e.filter(function(t){return TEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,_O(n)];if(e.sizen)return[!1,_O(n)]}return[!0,null]}function Ef(e){return e!=null}function ZEe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=NV(l,n),h=Dv(u,1),p=h[0],m=DV(l,r,i),v=Dv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function EO(e){e.preventDefault()}function QEe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function JEe(e){return e.indexOf("Edge/")!==-1}function ePe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QEe(e)||JEe(e)}function al(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function vPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=S4(e,aPe),i=HV(r),o=i.open,a=S4(i,sPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var $V={disabled:!1,getFilesFromEvent:AEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=$V;wk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var R9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,I=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,H=C.exports.useMemo(function(){return rPe(n)},[n]),q=C.exports.useMemo(function(){return nPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:TO},[E]),V=C.exports.useMemo(function(){return typeof w=="function"?w:TO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),ee=C.exports.useReducer(yPe,R9),X=Dw(ee,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&tPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(Q({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[ie,Z,V,me]);var xe=C.exports.useRef([]),Be=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",EO,!1),document.addEventListener("drop",Be,!1)),function(){T&&(document.removeEventListener("dragover",EO),document.removeEventListener("drop",Be))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(cPe(xe.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(y4(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&ZEe({files:Je,accept:H,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),ke=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,H,a,o,s,l,$]),Ye=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=h3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(ke){var Mt=NV(ke,H),Ne=Dw(Mt,2),at=Ne[0],an=Ne[1],Nn=DV(ke,a,o),$e=Dw(Nn,2),ft=$e[0],tt=$e[1],Nt=$?$(ke):null;if(at&&ft&&!Nt)Xt.push(ke);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){jt.push({file:ke,errors:[XEe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,H,a,o,l,m,v,S,$]),Ke=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){y4(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){iPe(Je)?(V(Je),Q({type:"closeDialog"})):oPe(Je)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Je)});return}ie.current&&(Q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Q,de,V,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(ePe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return R?null:lt(Je)},Cn=function(Je){return I?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,ke=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Nn=Oe.onDragOver,$e=Oe.onDragLeave,ft=Oe.onDrop,tt=S4(Oe,lPe);return lr(lr(O9({onKeyDown:xt(al(ke,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:Cn(al(an,dt)),onDragOver:Cn(al(Nn,Ye)),onDragLeave:Cn(al($e,rt)),onDrop:Cn(al(ft,Ke)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!R?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,dt,Ye,rt,Ke,R,I,r]),_n=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,ke=Oe.onClick,Mt=S4(Oe,uPe),Ne=O9({accept:H,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Ke)),onClick:lt(al(ke,_n)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Mt)}},[ie,n,s,Ke,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:ie,open:lt(Et)})}function yPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},R9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},R9);default:return e}}function TO(){}const SPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Uf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},AO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Ir(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(f2(u))},bPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Ir),i=u1({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` +`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(AO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const I=R[0].getAsFile();if(!I){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(AO({imageFile:I}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:re("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(SPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},xPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(io(!0))},children:x(N$,{})})};function wPe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const CPe=pt(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),_Pe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(CPe);return re("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(wPe,{})}),t&&re(Tn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},kPe=()=>{const e=Xe(),t=Ee(x_e),n=u1();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(T5e())},[e,n,t])};kEe();const EPe=pt([e=>e.gallery,e=>e.options,e=>e.system,Ir],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=st.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),PPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(EPe);return kPe(),x("div",{className:"App",children:re(bPe,{children:[x(sEe,{}),re("div",{className:"app-content",children:[x(xEe,{}),x(L_e,{})]}),x("div",{className:"app-console",children:x(_Ee,{})}),e&&x(xPe,{}),t&&x(_Pe,{})]})})};const WV=N2e(AV),TPe=nN({key:"invokeai-style-cache",prepend:!0});Fw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(oEe,{}),persistor:WV,children:x(XQ,{value:TPe,children:x(Hme,{children:x(PPe,{})})})})})})); diff --git a/frontend/dist/assets/index.c60403ea.js b/frontend/dist/assets/index.c60403ea.js deleted file mode 100644 index 54d755096f..0000000000 --- a/frontend/dist/assets/index.c60403ea.js +++ /dev/null @@ -1,623 +0,0 @@ -function mq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Iv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var MO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OO=Object.assign,IO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RO(){}RO.prototype=Z0.prototype;function O9(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}var I9=O9.prototype=new RO;I9.constructor=O9;OO(I9,Z0.prototype);I9.isPureReactComponent=!0;var gE=Array.isArray,NO=Object.prototype.hasOwnProperty,R9={current:null},DO={key:!0,ref:!0,__self:!0,__source:!0};function zO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)NO.call(t,r)&&!DO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=G[Z];if(0>>1;Zi(Fe,j))Wei(ht,Fe)?(G[Z]=ht,G[We]=j,Z=We):(G[Z]=Fe,G[xe]=j,Z=xe);else if(Wei(ht,j))G[Z]=ht,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,oe(I);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function I(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function q(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Q=!0;try{Q=N(!0,G)}finally{Q?H():(R=!1,N=null)}}else R=!1}var H;if(typeof k=="function")H=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,re=J.port2;J.port1.onmessage=de,H=function(){re.postMessage(null)}}else H=function(){E(de,0)};function oe(G){N=G,R||(R=!0,H())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,oe(I))},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,oe(I))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(BO);(function(e){e.exports=BO})(n0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var FO=C.exports,ua=n0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dw=Object.prototype.hasOwnProperty,Oq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Iq(e){return Dw.call(yE,e)?!0:Dw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Rq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nq(e,t,n,r){if(t===null||typeof t>"u"||Rq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var D9=/[\-:]([a-z])/g;function z9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function B9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Gb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xg(e):""}function Dq(e){switch(e.tag){case 5:return Xg(e.type);case 16:return Xg("Lazy");case 13:return Xg("Suspense");case 19:return Xg("SuspenseList");case 0:case 2:case 15:return e=jb(e.type,!1),e;case 11:return e=jb(e.type.render,!1),e;case 1:return e=jb(e.type,!0),e;default:return""}}function $w(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dp:return"Fragment";case Np:return"Portal";case zw:return"Profiler";case F9:return"StrictMode";case Bw:return"Suspense";case Fw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case WO:return(e.displayName||"Context")+".Consumer";case HO:return(e._context.displayName||"Context")+".Provider";case $9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H9:return t=e.displayName||null,t!==null?t:$w(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return $w(e(t))}catch{}}return null}function zq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $w(t);case 8:return t===F9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Qc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bq(e){var t=UO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ey(e){e._valueTracker||(e._valueTracker=Bq(e))}function GO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function e4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jO(e,t){t=t.checked,t!=null&&B9(e,"checked",t,!1)}function Ww(e,t){jO(e,t);var n=Qc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vw(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vw(e,t.type,Qc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vw(e,t,n){(t!=="number"||e4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zg=Array.isArray;function r0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ty.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fq=["Webkit","ms","Moz","O"];Object.keys(pm).forEach(function(e){Fq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pm[t]=pm[e]})});function XO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pm.hasOwnProperty(e)&&pm[e]?(""+t).trim():t+"px"}function ZO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=XO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Yw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qw=null;function W9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kw=null,i0=null,o0=null;function _E(e){if(e=Dv(e)){if(typeof Kw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=C5(t),Kw(e.stateNode,e.type,t))}}function QO(e){i0?o0?o0.push(e):o0=[e]:i0=e}function JO(){if(i0){var e=i0,t=o0;if(o0=i0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var ny=64,ry=4194304;function Qg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function i4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Qg(s):(o&=a,o!==0&&(r=Qg(o)))}else a=n&~i,a!==0?r=Qg(a):o!==0&&(r=Qg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Rv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mm),IE=String.fromCharCode(32),RE=!1;function SI(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zp=!1;function OK(e,t){switch(e){case"compositionend":return bI(t);case"keypress":return t.which!==32?null:(RE=!0,IE);case"textInput":return e=t.data,e===IE&&RE?null:e;default:return null}}function IK(e,t){if(zp)return e==="compositionend"||!X9&&SI(e,t)?(e=vI(),p3=Y9=Rc=null,zp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=BE(n)}}function _I(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_I(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kI(){for(var e=window,t=e4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=e4(e.document)}return t}function Z9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WK(e){var t=kI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_I(n.ownerDocument.documentElement,n)){if(r!==null&&Z9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=FE(n,o);var a=FE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bp=null,t6=null,ym=null,n6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;n6||Bp==null||Bp!==e4(r)||(r=Bp,"selectionStart"in r&&Z9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ym&&Zm(ym,r)||(ym=r,r=s4(t6,"onSelect"),0Hp||(e.current=l6[Hp],l6[Hp]=null,Hp--)}function jn(e,t){Hp++,l6[Hp]=e.current,e.current=t}var Jc={},Wi=ld(Jc),To=ld(!1),Yf=Jc;function M0(e,t){var n=e.type.contextTypes;if(!n)return Jc;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function u4(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==Jc)throw Error(Ie(168));jn(Wi,t),jn(To,n)}function RI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ie(108,zq(e)||"Unknown",i));return fr({},n,r)}function c4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jc,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=RI(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,_5=!1,ax=!1;function NI(e){su===null?su=[e]:su.push(e)}function eX(e){_5=!0,NI(e)}function ud(){if(!ax&&su!==null){ax=!0;var e=0,t=Tn;try{var n=su;for(Tn=1;e>=a,i-=a,uu=1<<32-ys(t)+i|n<z?($=N,N=null):$=N.sibling;var W=m(P,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(P,N),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var q=m(P,N,W.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),R===null?I=q:R.sibling=q,R=q,N=$}if(W.done)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(P,W.value,M),W!==null&&(k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return nr&&mf(P,z),I}for(N=r(P,N);!W.done;z++,W=T.next())W=v(N,P,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),I}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Dp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case J2:e:{for(var I=T.key,R=k;R!==null;){if(R.key===I){if(I=T.type,I===Dp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ec&&tP(I)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Pg(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Dp?(k=Ff(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=w3(T.type,T.key,T.props,null,P.mode,M),M.ref=Pg(P,k,T),M.return=P,P=M)}return a(P);case Np:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=px(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return R=T._init,E(P,k,R(T._payload),M)}if(Zg(T))return S(P,k,T,M);if(wg(T))return w(P,k,T,M);cy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=hx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var I0=VI(!0),UI=VI(!1),zv={},bl=ld(zv),tv=ld(zv),nv=ld(zv);function Af(e){if(e===zv)throw Error(Ie(174));return e}function a7(e,t){switch(jn(nv,t),jn(tv,e),jn(bl,zv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(tv),Zn(nv)}function GI(e){Af(nv.current);var t=Af(bl.current),n=Gw(t,e.type);t!==n&&(jn(tv,e),jn(bl,n))}function s7(e){tv.current===e&&(Zn(bl),Zn(tv))}var ur=ld(0);function m4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sx=[];function l7(){for(var e=0;en?n:4,e(!0);var r=lx.transition;lx.transition={};try{e(!1),t()}finally{Tn=n,lx.transition=r}}function sR(){return Fa().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lR(e))uR(t,n);else if(n=FI(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),cR(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lR(e))uR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,i7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FI(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),cR(n,t,r))}}function lR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function uR(e,t){Sm=v4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,U9(e,n)}}var y4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},aX={readContext:Ba,useCallback:function(e,t){return sl().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,y3(4194308,4,nR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return y3(4194308,4,e,t)},useInsertionEffect:function(e,t){return y3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:h7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),ci===null)throw Error(Ie(349));(Kf&30)!==0||qI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(XI.bind(null,r,o,e),[e]),r.flags|=2048,ov(9,KI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=ci.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[ev]=r,SR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Yw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iD0&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304)}else{if(!r)if(e=m4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Or()-o.renderingStartTime>D0&&n!==1073741824&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,jn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return S7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function pX(e,t){switch(J9(t),t.tag){case 1:return Ao(t.type)&&u4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),l7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return s7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));O0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return r7(t.type._context),null;case 22:case 23:return S7(),null;case 24:return null;default:return null}}var fy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Gp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function b6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(r6=o4,e=kI(),Z9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(i6={focusedElem:e,selectionRange:n},o4=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function bm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&b6(t,n,o)}i=i.next}while(i!==r)}}function P5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function x6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wR(e){var t=e.alternate;t!==null&&(e.alternate=null,wR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[ev],delete t[s6],delete t[QK],delete t[JK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=l4));else if(r!==4&&(e=e.child,e!==null))for(w6(e,t,n),e=e.sibling;e!==null;)w6(e,t,n),e=e.sibling}function C6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(C6(e,t,n),e=e.sibling;e!==null;)C6(e,t,n),e=e.sibling}var ki=null,fs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)_R(e,t,n),n=n.sibling}function _R(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Hi||Gp(n,t);case 6:var r=ki,i=fs;ki=null,Sc(e,t,n),ki=r,fs=i,ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ki.removeChild(n.stateNode));break;case 18:ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?ox(e.parentNode,n):e.nodeType===1&&ox(e,n),Km(e)):ox(ki,n.stateNode));break;case 4:r=ki,i=fs,ki=n.stateNode.containerInfo,fs=!0,Sc(e,t,n),ki=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&b6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Gp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function as(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,x4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-v7?Bf(e,0):m7|=n),Lo(e,t)}function OR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ry,ry<<=1,(ry&130023424)===0&&(ry=4194304)));var n=ro();e=vu(e,t),e!==null&&(Rv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),OR(e,n)}function kX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ie(314))}r!==null&&r.delete(t),OR(e,n)}var IR;IR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&DI(t,f4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;S3(e,t),e=t.pendingProps;var i=M0(t,Wi.current);s0(t,n),i=c7(null,t,r,e,i,n);var o=d7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,c4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,o7(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,h6(t,r,e,n),t=m6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&Q9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(S3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=ds(r,e),i){case 0:t=g6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,ds(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),g6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),uP(e,t,r,i,n);case 3:e:{if(mR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$I(e,t),g4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=N0(Error(Ie(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=N0(Error(Ie(424)),t),t=cP(e,t,r,n,i);break e}else for(ia=Uc(t.stateNode.containerInfo.firstChild),oa=t,nr=!0,ps=null,n=UI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(O0(),r===i){t=yu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return GI(t),e===null&&c6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,o6(r,i)?a=null:o!==null&&o6(r,o)&&(t.flags|=32),gR(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&c6(t),null;case 13:return vR(e,t,n);case 4:return a7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=I0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,jn(h4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=yu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),d6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),d6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,s0(t,n),i=Ba(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),lP(e,t,r,i,n);case 15:return hR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),S3(e,t),t.tag=1,Ao(r)?(e=!0,c4(t)):e=!1,s0(t,n),WI(t,r,i),h6(t,r,i,n),m6(null,t,r,!0,e,n);case 19:return yR(e,t,n);case 22:return pR(e,t,n)}throw Error(Ie(156,t.tag))};function RR(e,t){return aI(e,t)}function EX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oa(e,t,n,r){return new EX(e,t,n,r)}function x7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return x7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$9)return 11;if(e===H9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Oa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function w3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Dp:return Ff(n.children,i,o,t);case F9:a=8,i|=8;break;case zw:return e=Oa(12,n,t,i|2),e.elementType=zw,e.lanes=o,e;case Bw:return e=Oa(13,n,t,i),e.elementType=Bw,e.lanes=o,e;case Fw:return e=Oa(19,n,t,i),e.elementType=Fw,e.lanes=o,e;case VO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case HO:a=10;break e;case WO:a=9;break e;case $9:a=11;break e;case H9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Oa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ff(e,t,n,r){return e=Oa(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Oa(22,e,r,t),e.elementType=VO,e.lanes=n,e.stateNode={isHidden:!1},e}function hx(e,t,n){return e=Oa(6,e,null,t),e.lanes=n,e}function px(e,t,n){return t=Oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qb(0),this.expirationTimes=qb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function w7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},o7(o),e}function AX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=fa})(Ol);const gy=M9(Ol.exports);var wP=Ol.exports;Nw.createRoot=wP.createRoot,Nw.hydrateRoot=wP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,R5={exports:{}},N5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var RX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,BX=RX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FX={key:!0,ref:!0,__self:!0,__source:!0};function BR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zX.call(t,r)&&!FX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NX,type:e,key:o,ref:a,props:i,_owner:BX.current}}N5.Fragment=DX;N5.jsx=BR;N5.jsxs=BR;(function(e){e.exports=N5})(R5);const Nn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var E7=C.exports.createContext({});E7.displayName="ColorModeContext";function Bv(){const e=C.exports.useContext(E7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var my={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?my.dark:my.light),document.body.classList.remove(r?my.light:my.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var HX="chakra-ui-color-mode";function WX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(E7.Provider,{value:T,children:n})}FR.displayName="ColorModeProvider";var T6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",q="[object Float32Array]",de="[object Float64Array]",H="[object Int8Array]",J="[object Int16Array]",re="[object Int32Array]",oe="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[H]=Se[J]=Se[re]=Se[oe]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[W]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[I]=Se[R]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Fe=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Fe||Function("return this")(),ht=t&&!t.nodeType&&t,qe=ht&&!0&&e&&!e.nodeType&&e,rt=qe&&qe.exports===ht,Ze=rt&&xe.process,Xe=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Xe&&Xe.isTypedArray;function bt(U,te,pe){switch(pe.length){case 0:return U.call(te);case 1:return U.call(te,pe[0]);case 2:return U.call(te,pe[0],pe[1]);case 3:return U.call(te,pe[0],pe[1],pe[2])}return U.apply(te,pe)}function Ae(U,te){for(var pe=-1,Ke=Array(U);++pe-1}function y1(U,te){var pe=this.__data__,Ke=ja(pe,U);return Ke<0?(++this.size,pe.push([U,te])):pe[Ke][1]=te,this}Ro.prototype.clear=kd,Ro.prototype.delete=v1,Ro.prototype.get=Ru,Ro.prototype.has=Ed,Ro.prototype.set=y1;function Os(U){var te=-1,pe=U==null?0:U.length;for(this.clear();++te1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&Eh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),te=Object(te);++Ke-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Fu(U){if(U!=null){try{return kn.call(U)}catch{}try{return U+""}catch{}}return""}function va(U,te){return U===te||U!==U&&te!==te}var Md=Bl(function(){return arguments}())?Bl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Hu(U)}function Ph(U){return Wn(U)&&Ht(U)}var $u=Zt||M1;function Hu(U){if(!Bo(U))return!1;var te=Rs(U);return te==v||te==S||te==u||te==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Rs(U)!=k)return!1;var te=an(U);if(te===null)return!0;var pe=mn.call(te,"constructor")&&te.constructor;return typeof pe=="function"&&pe instanceof pe&&kn.call(pe)==Xt}var Ah=Et?it(Et):Du;function Id(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?T1(U,!0):Ns(U)}var sn=Ya(function(U,te,pe,Ke){No(U,te,pe,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function M1(){return!1}e.exports=sn})(T6,T6.exports);const vl=T6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,A6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function sv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=A6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var vy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ss(e,t){return n=>{const r={property:n,scale:e};return r.transform=sv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?sv({scale:n,compose:r}):r}}var $R=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...$R].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...$R].join(" ")}var XX={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ZX={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function QX(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},HR="& > :not(style) ~ :not(style)",eZ={[HR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[HR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},L6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nZ=new Set(Object.values(L6)),WR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||WR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in L6?L6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=VR(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var VR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||VR(e)||WR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ss("borderWidths"),borderStyles:ss("borderStyles"),colors:ss("colors"),borders:ss("borders"),radii:ss("radii",rn.px),space:ss("space",vy(rn.vh,rn.px)),spaceT:ss("space",vy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:sv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ss("sizes",vy(rn.vh,rn.px)),sizesT:ss("sizes",vy(rn.vh,rn.fraction)),shadows:ss("shadows"),logical:YX,blur:ss("blur",rn.blur)},C3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(C3,{bgImage:C3.backgroundImage,bgImg:C3.backgroundImage});var fn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},M6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(M6,{shadow:M6.boxShadow});var uZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},_4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:eZ,transform:sv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:sv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(_4,{flexDir:_4.flexDirection});var UR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Pa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Pa,{w:Pa.width,h:Pa.height,minW:Pa.minWidth,maxW:Pa.maxWidth,minH:Pa.minHeight,maxH:Pa.maxHeight,overscroll:Pa.overscrollBehavior,overscrollX:Pa.overscrollBehaviorX,overscrollY:Pa.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gx(t,e,n)}},Cm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Cm,{insetStart:Cm.insetInlineStart,insetEnd:Cm.insetInlineEnd});var yZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},wZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function GR(e){return xs(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(GR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,O6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=GR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:O6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(O6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:O6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function Jr(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function I6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var jR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,P7=e=>Object.fromEntries(Object.entries(e).sort(jR));function LP(e){const t=P7(e);return Object.assign(Object.values(t),t)}function IZ(e){const t=Object.keys(P7(e));return new Set(t)}function MP(e){if(!e)return e;e=I6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function em(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${I6(e)})`),t&&n.push("and",`(max-width: ${I6(t)})`),n.join(" ")}function RZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(jR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:em(null,u),minWQuery:em(a),minMaxQuery:em(a,u)}}),r=IZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:P7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>em(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var wi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>YR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>YR(t=>e(t,"~ &"),"[data-peer]",".peer"),YR=(e,...t)=>t.map(e).join(", "),z5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(wi.hover),_peerHover:tu(wi.hover),_groupFocus:bc(wi.focus),_peerFocus:tu(wi.focus),_groupFocusVisible:bc(wi.focusVisible),_peerFocusVisible:tu(wi.focusVisible),_groupActive:bc(wi.active),_peerActive:tu(wi.active),_groupDisabled:bc(wi.disabled),_peerDisabled:tu(wi.disabled),_groupInvalid:bc(wi.invalid),_peerInvalid:tu(wi.invalid),_groupChecked:bc(wi.checked),_peerChecked:tu(wi.checked),_groupFocusWithin:bc(wi.focusWithin),_peerFocusWithin:tu(wi.focusWithin),_peerPlaceholderShown:tu(wi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(z5);function OP(e,t){return Jr(String(e).replace(/\./g,"-"),void 0,t)}function DZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=z5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function BZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var FZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return BZ(e,FZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(R6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(R6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function R6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(R6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:RZ(n.breakpoints)}),n}var T7=vl({},C3,fn,lZ,_4,Pa,uZ,yZ,cZ,UR,vZ,Cm,M6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Pa,_4,UR,Cm),jZ=Object.keys(GZ),YZ=[...Object.keys(T7),...NZ],qZ={...T7,...z5},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var qR=e=>t=>tQ({theme:t,pseudos:z5,configs:T7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ei(e1,--Io):0,z0--,$r===10&&(z0=1,F5--),$r}function aa(){return $r=Io2||uv($r)>3?"":" "}function SQ(e,t){for(;--t&&aa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Fv(e,_3()+(t<6&&xl()==32&&aa()==32))}function D6(e){for(;aa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&D6($r);break;case 40:e===41&&D6(e);break;case 92:aa();break}return Io}function bQ(e,t){for(;aa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Fv(t,Io-1)+"*"+B5(e===47?e:aa())}function xQ(e){for(;!uv(xl());)aa();return Fv(e,Io)}function wQ(e){return eN(E3("",null,null,null,[""],e=JR(e),0,[0],e))}function E3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,I=o,R=r,N=T;E;)switch(S=k,k=aa()){case 40:if(S!=108&&Ei(N,p-1)==58){N6(N+=bn(k3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=k3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(_3()-1,7);continue;case 47:switch(xl()){case 42:case 47:yy(CQ(bQ(aa(),_3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&yy(v>32?RP(N+";",r,n,p-1):RP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(yy(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),k===123)if(h===0)E3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ei(N,3)===110?100:m){case 100:case 109:case 115:E3(e,R,R,r&&yy(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:E3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B5(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=k3(aa())),m=xl(),h=p=cl(T=N+=xQ(_3())),k++;break;case 45:S===45&&cl(N)==2&&(w=0)}}return o}function IP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=M7(m),S=0,w=0,E=0;S0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return $5(e,t,n,i===0?A7:s,l,u,h)}function CQ(e,t,n){return $5(e,t,n,KR,B5(mQ()),lv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,L7,lv(e,0,r),lv(e,r+1,-1),r)}function u0(e,t){for(var n="",r=M7(e),i=0;i6)switch(Ei(e,t+1)){case 109:if(Ei(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+k4+(Ei(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~N6(e,"stretch")?nN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ei(e,t+1)!==115)break;case 6444:switch(Ei(e,cl(e)-3-(~N6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Ei(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ei(e,t+11)){case 114:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Fi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L7:t.return=nN(t.value,t.length);break;case XR:return u0([Lg(t,{value:bn(t.value,"@","@"+hn)})],i);case A7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return u0([Lg(t,{props:[bn(o,/:(read-\w+)/,":"+k4+"$1")]})],i);case"::placeholder":return u0([Lg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,":"+k4+"$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},IQ=[OQ],rN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||IQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},mx=tN(function(e){return cN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),BP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!cN(t)&&typeof n=="number"&&n!==0?n+"px":n};function cv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,cv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function cJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},vN=dJ(cJ);function yN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var SN=e=>yN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function bN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var mJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vJ=tN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return lN(n,r,i),KQ(function(){return uN(n,r,i)}),null},xJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||WP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),IJ=Ln("list").parts("container","item","icon"),RJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),BJ=Ln("progress").parts("label","filledTrack","track"),FJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Ai(e,t){YJ(e)&&(e="100%");var n=qJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Sy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function xN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function by(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Ai(e,255)*255,g:Ai(t,255)*255,b:Ai(n,255)*255}}function UP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XJ(e,t,n){var r,i,o;if(e=Ai(e,360),t=Ai(t,100),n=Ai(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vx(s,a,e+1/3),i=vx(s,a,e),o=vx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var $6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=by(e.s),i=by(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=by(e.s),o=by(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=xN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),yx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),Sx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),cs={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+yx),rgba:new RegExp("rgba"+Sx),hsl:new RegExp("hsl"+yx),hsla:new RegExp("hsla"+Sx),hsv:new RegExp("hsv"+yx),hsva:new RegExp("hsva"+Sx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if($6[e])e=$6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=cs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=cs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=cs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=cs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=cs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=cs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=cs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=cs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=cs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=cs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function nu(e){return Boolean(cs.CSS_UNIT.exec(String(e)))}var $v=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=eee(t)),this.originalInput=t;var i=tee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=xN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),QJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ai(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ai(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries($6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Sy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Sy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Sy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Sy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(wN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new $v(a)}function oee(e,t){var n=uee(e),r=E4(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return E4([0,100],t.seed);var n=CN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return E4([r,i],t.seed)}function see(e,t,n){var r=lee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return E4([r,i],n.seed)}function lee(e,t){for(var n=CN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=kN.find(function(a){return a.name===e});if(n){var r=_N(n);if(r.hueRange)return r.hueRange}var i=new $v(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function CN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=kN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function E4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function _N(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var kN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function cee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Pi=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new $v(r);return i?r:n},fee=e=>t=>{const n=Pi(t,e);return new $v(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",B0=(e,t)=>n=>{const r=Pi(n,e);return new $v(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function pee(e){const t=wN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function mee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function z7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function EN(e){return yee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(EN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,H6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=EN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:H6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(H6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:H6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function PN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,PN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${PN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Hv,defineMultiStyleConfig:Iee}=rr(_J.keys),sa=Jr("alert-fg"),Su=Jr("alert-bg"),Ree=Hv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function B7(e){const{theme:t,colorScheme:n}=e,r=B0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),Dee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:sa.reference}}}),zee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:sa.reference}}}),Bee=Hv(e=>{const{colorScheme:t}=e;return{container:{[sa.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[sa.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:sa.reference}}}),Fee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Bee},$ee=Iee({baseStyle:Ree,variants:Fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),TN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Hee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...TN,...Hee,container:Wee},AN=Vee,Uee=e=>typeof e=="function";function di(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:LN,defineMultiStyleConfig:Gee}=rr(kJ.keys),c0=Jr("avatar-border-color"),bx=Jr("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[c0.variable]:"white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference},Yee={[bx.variable]:"colors.gray.200",_dark:{[bx.variable]:"colors.whiteAlpha.400"},bgColor:bx.reference},JP=Jr("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[c0.variable]:"colors.white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference,verticalAlign:"top"}},Kee=LN(e=>({badge:di(jee,e),excessLabel:di(Yee,e),container:di(qee,e)}));function xc(e){const t=e!=="100%"?AN[e]:void 0;return LN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},d0=Jr("badge-bg"),yl=Jr("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.500`,.6)(n);return{[d0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[d0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:d0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.16)(n);return{[d0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[d0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:d0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},km={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},MN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=B0(`${t}.200`,.12)(n),i=B0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},ute=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...di(MN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=cte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},fte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:MN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:P3,defineMultiStyleConfig:vte}=rr(PJ.keys),Em=Jr("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Em.reference,h:Em.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=P3(e=>({icon:xte,container:Ste,control:di(yte,e),label:bte})),Cte={sm:P3({control:{[Em.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:P3({control:{[Em.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:P3({control:{[Em.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},P4=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Pm=Vi("close-button-size"),Mg=Vi("close-button-bg"),_te={w:[Pm.reference],h:[Pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Mg.variable]:"colors.blackAlpha.100",_dark:{[Mg.variable]:"colors.whiteAlpha.100"}},_active:{[Mg.variable]:"colors.blackAlpha.200",_dark:{[Mg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Mg.reference},kte={lg:{[Pm.variable]:"sizes.10",fontSize:"md"},md:{[Pm.variable]:"sizes.8",fontSize:"xs"},sm:{[Pm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=km,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Ite={opacity:.6,borderColor:"inherit"},Rte={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Rte,dashed:Nte},zte={baseStyle:Ite,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:W6,defineMultiStyleConfig:Bte}=rr(TJ.keys),xx=Jr("drawer-bg"),wx=Jr("drawer-box-shadow");function yp(e){return W6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Fte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[xx.variable]:"colors.white",[wx.variable]:"shadows.lg",_dark:{[xx.variable]:"colors.gray.700",[wx.variable]:"shadows.dark-lg"},bg:xx.reference,boxShadow:wx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=W6(e=>({overlay:Fte,dialogContainer:$te,dialog:di(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},qte=Bte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),f0=Jr("form-control-color"),ine={marginStart:"1",[f0.variable]:"colors.red.500",_dark:{[f0.variable]:"colors.red.300"},color:f0.reference},one={mt:"2",[f0.variable]:"colors.gray.600",_dark:{[f0.variable]:"colors.whiteAlpha.600"},color:f0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),h0=Jr("form-error-color"),cne={[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function F7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0 0 0 1px ${Pi(t,r)}`},_focusVisible:{zIndex:1,borderColor:Pi(t,n),boxShadow:`0 0 0 1px ${Pi(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r)},_focusVisible:{bg:"transparent",borderColor:Pi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0px 1px 0px 0px ${Pi(t,r)}`},_focusVisible:{borderColor:Pi(t,n),boxShadow:`0px 1px 0px 0px ${Pi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(IJ.keys),Ine={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Rne=One({icon:Ine}),Nne=Mne({baseStyle:Rne}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(RJ.keys),Bne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:di(Bne,e),item:di(Fne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:V6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=V6(e=>({overlay:Yne,dialogContainer:di(qne,e),dialog:di(Kne,e),header:Xne,closeButton:Zne,body:di(Qne,e),footer:Jne}));function ls(e){return V6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:ls("xs"),sm:ls("sm"),md:ls("md"),lg:ls("lg"),xl:ls("xl"),"2xl":ls("2xl"),"3xl":ls("3xl"),"4xl":ls("4xl"),"5xl":ls("5xl"),"6xl":ls("6xl"),full:ls("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},ON=rre,{defineMultiStyleConfig:ire,definePartsStyle:IN}=rr(DJ.keys),$7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu($7).add("0.5rem").toString(),are={[$7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=di(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[$7.reference]},ure=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),cre=IN(e=>({root:are,field:di(sre,e)??{},stepperGroup:lre,stepper:di(ure,e)??{}}));function xy(e){var t,n;const r=(t=pn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=ON.fontSizes[o];return IN({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:xy("xs"),sm:xy("sm"),md:xy("md"),lg:xy("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,gre={outline:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),wy=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[wy.variable]:"colors.white",bg:wy.reference,[Sre.variable]:wy.reference,[nT.variable]:"colors.gray.200",_dark:{[wy.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:tm}=rr(BJ.keys),Are=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Pi(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Ire=tm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Rre={xs:tm({track:{h:"1"}}),sm:tm({track:{h:"2"}}),md:tm({track:{h:"3"}}),lg:tm({track:{h:"4"}})},Nre=Tre({sizes:Rre,baseStyle:Ire,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:T3}=rr(FJ.keys),zre=e=>{var t;const n=(t=di(P4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Bre=T3(e=>{var t,n,r,i;return{label:(n=(t=P4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=P4).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Fre={md:T3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:T3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:T3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Bre,sizes:Fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Cy={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Cy}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Cy}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Cy}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Cy},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=Jr("skeleton-start-color"),Kre=Jr("skeleton-end-color"),Xre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Pi(o,r),s=Pi(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Cx=Jr("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Cx.variable]:"colors.white",_dark:{[Cx.variable]:"colors.gray.700"},bg:Cx.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:eS}=rr(HJ.keys),hv=Jr("slider-thumb-size"),pv=Jr("slider-track-size"),Mc=Jr("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...z7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...z7({orientation:e.orientation,horizontal:{h:pv.reference},vertical:{w:pv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...z7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:hv.reference,h:hv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=eS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=eS({container:{[hv.variable]:"sizes.4",[pv.variable]:"sizes.1"}}),sie=eS({container:{[hv.variable]:"sizes.3.5",[pv.variable]:"sizes.1"}}),lie=eS({container:{[hv.variable]:"sizes.2.5",[pv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:NN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=NN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:NN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:A3}=rr(VJ.keys),Tm=Vi("switch-track-width"),$f=Vi("switch-track-height"),_x=Vi("switch-track-diff"),Cie=lu.subtract(Tm,$f),U6=Vi("switch-thumb-x"),Og=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Tm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Og.variable]:"colors.gray.300",_dark:{[Og.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Og.variable]:`colors.${t}.500`,_dark:{[Og.variable]:`colors.${t}.200`}},bg:Og.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${U6.reference})`}},Eie=A3(e=>({container:{[_x.variable]:Cie,[U6.variable]:_x.reference,_rtl:{[U6.variable]:lu(_x).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:A3({container:{[Tm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:A3({container:{[Tm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:A3({container:{[Tm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:p0}=rr(UJ.keys),Lie=p0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),T4={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Iie={simple:Mie,striped:Oie,unstyled:{}},Rie={sm:p0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:p0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:p0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Iie,sizes:Rie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Bie(e),tablist:Fie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Uie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gie=wl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Pi(n,`${t}.700`),bg:Pi(n,`${t}.100`)}}}}),Yie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},roe={subtle:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},_y=Vi("tooltip-bg"),kx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:_y.reference,color:kx.reference,[_y.variable]:"colors.gray.700",[kx.variable]:"colors.whiteAlpha.900",_dark:{[_y.variable]:"colors.gray.300",[kx.variable]:"colors.gray.900"},[uoe.variable]:_y.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:km,Breadcrumb:ste,Button:mte,Checkbox:P4,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},woe=xoe,Coe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_oe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...ON,sizes:AN,shadows:woe,space:TN,borders:poe,transition:Poe},Ioe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Roe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Ioe,direction:Noe,...Ooe,components:foe,styles:Roe,config:Doe},Boe=typeof Element<"u",Foe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function L3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!L3(e[r],t[r]))return!1;return!0}var o;if(Foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!L3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Hoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!L3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return L3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(dv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function DN(){const e=Bv(),t=t1();return{...e,theme:t}}function Voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Uoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Goe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return ne(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function qoe(){const{colorMode:e}=Bv();return x(Z5,{styles:t=>{const n=vN(t,"styles.global"),r=bN(n,{theme:t,colorMode:e});return r?qR(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=yN(a,(p,m)=>KZ(m)),l=bN(e,t),u=Object.assign({},i,l,SN(s),o),h=qR(u)(t.theme);return r?[h,r]:h};function Ex(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=F6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Bv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function zN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=DN(),a=e?vN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},SN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return zN(e,t)}function Ii(e,t={}){return zN(e,t)}function Joe(){const e=new Map;return new Proxy(Ex,{apply(t,n,r){return Ex(...r)},get(t,n){return e.has(n)||e.set(n,Ex(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>$n(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var G6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,A4=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function oae(){const e=C.exports.useRef(new iae);return G6(()=>()=>e.current.destroy()),e.current}var[aae,BN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=BN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);G6(()=>()=>{!i.current||t.unregister(i.current)},[]),G6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=A4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function FN(){return[A4(aae),()=>A4(BN()),()=>oae(),i=>sae(i)]}var Ir=(...e)=>e.filter(Boolean).join(" "),bT={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ga=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Ir("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ga.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ga,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function tS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const H7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function lae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),ah=typeof document<"u",L4=ah?C.exports.useLayoutEffect:C.exports.useEffect,$N=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext($N),a=C.exports.useContext(n1),s=C.exports.useContext(H7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return L4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),L4(()=>()=>u&&u.notifyUnmount(),[]),u}function Yp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Yp(n)&&(n.current=r))},[t])}function gv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||dae.some(t=>gv(e[t]))}function HN(e){return Boolean(iS(e)||e.variants)}function fae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gv(n)?n:void 0,animate:gv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(e,C.exports.useContext(nS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),mv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?mv.projectionNodeConstructor=e[t]:mv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Am={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return oS(()=>{if(Am.hasEverUpdated)return gae++})}const W7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const WN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(H7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext($N).strict,P=C.exports.useContext(WN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||mv.projectionNodeConstructor,P))}return ne(vae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(W7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function V7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const M4={};function Cae(e){Object.assign(M4,e)}const O4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wv=new Set(O4);function VN(e,{layout:t,layoutId:n}){return Wv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!M4[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>O4.indexOf(e)-O4.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function UN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,GN=(e,t)=>n=>Math.max(Math.min(n,t),e),Lm=e=>e%1?Number(e.toFixed(5)):e,vv=/(-)?([\d]*\.?[\d])+/g,j6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Vv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mm=Object.assign(Object.assign({},sh),{transform:GN(0,1)}),ky=Object.assign(Object.assign({},sh),{default:1}),Uv=e=>({test:t=>Vv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Uv("deg"),Cl=Uv("%"),wt=Uv("px"),Aae=Uv("vh"),Lae=Uv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),U7=(e,t)=>n=>Boolean(Vv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),jN=(e,t,n)=>r=>{if(!Vv(r))return r;const[i,o,a,s]=r.match(vv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:U7("hsl","hue"),parse:jN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Lm(t))+", "+Cl.transform(Lm(n))+", "+Lm(Mm.transform(r))+")"},Mae=GN(0,255),Px=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:U7("rgb","red"),parse:jN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Px.transform(e)+", "+Px.transform(t)+", "+Px.transform(n)+", "+Lm(Mm.transform(r))+")"};function Oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Y6={test:U7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||Y6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):Y6.parse(e),transform:e=>Vv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},YN="${c}",qN="${n}";function Iae(e){var t,n,r,i;return isNaN(e)&&Vv(e)&&((n=(t=e.match(vv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(j6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function KN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(j6);r&&(n=r.length,e=e.replace(j6,YN),t.push(...r.map(Ji.parse)));const i=e.match(vv);return i&&(e=e.replace(vv,qN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function XN(e){return KN(e).values}function ZN(e){const{values:t,numColors:n,tokenised:r}=KN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Nae(e){const t=XN(e);return ZN(e)(t.map(Rae))}const bu={test:Iae,parse:XN,createTransformer:ZN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Bae=/([a-z-]*)\(.*?\)/g,q6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(Bae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},QN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:ky,scaleX:ky,scaleY:ky,scaleZ:ky,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Mm,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Mm,strokeOpacity:Mm,numOctaves:CT};function G7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(UN(m)){o[m]=v;continue}const S=QN[m],w=Pae(v,S);if(Wv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Eae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const j7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function JN(e,t,n){for(const r in t)!ws(t[r])&&!VN(r,n)&&(e[r]=t[r])}function Fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j7();return G7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return JN(i,r,e),Object.assign(i,Fae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Gae,...Vae,...Wae,...Uae]);function I4(e){return jae.has(e)}let eD=e=>!I4(e);function Yae(e){!e||(eD=t=>t.startsWith("on")?!I4(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(eD(i)||n===!0&&I4(i)||!t&&!I4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function Y7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){G7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Qae(p,o,a,s,!1)}const tD=()=>({...j7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=tD();return Y7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};JN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(V7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const nD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const iD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function oD(e,t,n,r){rD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(iD.has(i)?i:nD(i),t.attrs[i])}function q7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||VN(r,e))&&(n[r]=t[r]);return n}function aD(e){const t=q7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const yv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),sD=e=>yv(e)?e[e.length-1]||0:e;function M3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const lD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>nse(e,t,r,i);return n?o():oS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=M3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=HN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!rS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=K7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:lD({scrapeMotionValuesFromProps:aD,createRenderState:tD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Y7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),oD(t,n)}})},ose={useVisualState:lD({scrapeMotionValuesFromProps:q7,createRenderState:j7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...V7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function K6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return aS(i,t,n,r)},[e,t,n,r])}function sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};K6(t,"focus",e?r:void 0),K6(t,"blur",e?i:void 0)}function uD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function cD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function X7(e,t="page"){return{point:cD(e)?cse(e,t):dse(e,t)}}const dD=(e,t=!1)=>{const n=r=>e(r,X7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function fD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function g0(e,t,n,r){return aS(e,fD(t),dD(n,t==="pointerdown"),r)}function R4(e,t,n,r){return K6(e,fD(t),n&&dD(n,t==="pointerdown"),r)}function hD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=hD("dragHorizontal"),ET=hD("dragVertical");function pD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function gD(){const e=pD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!uD(r)||gD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){R4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),R4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const mD=(e,t)=>t?e===t?!0:mD(e,t.parentElement):!1;function Z7(e){return C.exports.useEffect(()=>()=>e(),[])}function vD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Tx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=D4(bse,xse,a),e=D4(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=X6(u,a),S=Math.exp(-p);return Tx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=X6(Math.pow(u,2),a);return(-i(u)+Tx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Tx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cse=12;function _se(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Q7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=vD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=X6(T,k);v=I=>{const R=Math.exp(-k*T*I);return n-R*((E+k*T*P)/M*Math.sin(M*I)+P*Math.cos(M*I))},S=I=>{const R=Math.exp(-k*T*I);return k*T*R*(Math.sin(M*I)*(E+k*T*P)/M+P*Math.cos(M*I))-R*(Math.cos(M*I)*(E+k*T*P)-M*P*Math.sin(M*I))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=I=>{const R=Math.exp(-k*T*I),N=Math.min(M*I,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}Q7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,Sv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ax(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ax(l,s,e+1/3),o=Ax(l,s,e),a=Ax(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[Y6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),yD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},Z6=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce(Lse);function SD(e,t){return Z6(e)?n=>wr(e,t,n):Ji.test(e)?yD(e,t):xD(e,t)}const bD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>SD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=SD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function IT(e){const t=bu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=bu.createTransformer(t),r=IT(e),i=IT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?sS(bD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Ise(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?yD:xD;if(Array.isArray(e))return bD;if(typeof e=="object")return Mse}function Rse(e,t,n){const r=[],i=n||Ise(e[0]),o=e.length-1;for(let a=0;an(Sv(e,t,r))}function Dse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Sv(e[o],e[o+1],i);return t[o](s)}}function wD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;N4(o===t.length),N4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Rse(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(D4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),J7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),CD=e=>t=>t*t*((e+1)*t-e),Bse=e=>{const t=CD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},_D=1.525,Fse=4/11,$se=8/11,Hse=9/10,e8=e=>e,t8=zse(2),Wse=lS(t8),kD=J7(t8),ED=e=>1-Math.sin(Math.acos(e)),n8=lS(ED),Vse=J7(n8),r8=CD(_D),Use=lS(r8),Gse=J7(r8),jse=Bse(_D),Yse=4356/361,qse=35442/1805,Kse=16061/1805,z4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-z4(1-e*2)):.5*z4(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||kD).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function O3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return wD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const RT={keyframes:O3,spring:Q7,decay:tle};function nle(e){if(Array.isArray(e.to))return O3;if(RT[e.type])return RT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?O3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Q7:O3}const PD=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),TD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),PD);function ile(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ile(()=>bv=!0),e),{}),ale=Gv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(bv||ule(),n.schedule(r,i,o)),e},{}),sle=Gv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});Gv.reduce((e,t)=>(e[t]=()=>uS[t].process(m0),e),{});const lle=e=>uS[e].process(m0),AD=e=>{bv=!1,m0.delta=Q6?PD:Math.max(Math.min(e-m0.timestamp,ole),1),m0.timestamp=e,J6=!0,Gv.forEach(lle),J6=!1,bv&&(Q6=!1,TD(AD))},ule=()=>{bv=!0,Q6=!0,J6||TD(AD)},cle=()=>m0;function LD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?LD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function MD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=vD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,I=!1,R=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=wD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function W(){k++,l==="reverse"?(R=k%2===0,a=dle(a,T,u,R)):(a=LD(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const re=$.next(Math.max(0,a));M=re.value,N&&(M=N(M)),I=R?re.done:a<=0}S?.(M),I&&(k===0&&(T??(T=a)),k{p?.(),P.stop()}}}function OD(e,t){return t?e*(1e3/t):0}function ple({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=OD($-R,cle().delta),(I===1&&$>M||I===-1&&$S?.stop()}}const eC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>eC(e)&&e.hasOwnProperty("z"),Ey=(e,t)=>Math.abs(e-t);function i8(e,t){if(Z6(e)&&Z6(t))return Ey(e,t);if(eC(e)&&eC(t)){const n=Ey(e.x,t.x),r=Ey(e.y,t.y),i=NT(e)&&NT(t)?Ey(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ID=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ND=e=>3*e,B4=(e,t,n)=>((ID(t,n)*e+RD(t,n))*e+ND(t))*e,DD=(e,t,n)=>3*ID(t,n)*e*e+2*RD(t,n)*e+ND(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=B4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Py,e,n)}return a=>a===0||a===1?a:B4(o(a),t,r)}function wle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!gD()}function p(S,w){!h()||(mD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=sS(g0(window,"pointerup",p,l),g0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}R4(i,"pointerdown",o?v:void 0,l),Z7(u)}const Cle="production",zD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function BD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const tC=new WeakMap,Lx=new WeakMap,_le=e=>{const t=tC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Lx.has(n)||Lx.set(n,{});const r=Lx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return tC.set(e,n),r.observe(e),()=>{tC.delete(e),r.unobserve(e)}}function Tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ale[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(zD!=="production"&&BD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Bc=e=>t=>(e(t),null),Ole={inView:Bc(Tle),tap:Bc(wle),focus:Bc(sse),hover:Bc(vse)};function o8(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Ile(){return Rle(C.exports.useContext(n1))}function Rle(e){return e===null?!0:e.isPresent}function FD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Nle={linear:e8,easeIn:t8,easeInOut:kD,easeOut:Wse,circIn:ED,circInOut:Vse,circOut:n8,backIn:r8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:z4},zT=e=>{if(Array.isArray(e)){N4(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",BT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ty=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mx=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),FT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:Ty,scaleY:Ty,scale:Ty,opacity:Mx,backgroundColor:Mx,color:Mx,default:Ty},Ble=(e,t)=>{let n;return yv(t)?n=zle:n=FT[e]||FT.default,{to:t,...n(t)}},Fle={...QN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:q6,WebkitFilter:q6},a8=e=>Fle[e];function s8(e,t){var n;let r=a8(e);return r!==q6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},$D=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),HD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),$D);function Wle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Wle(()=>xv=!0),e),{}),Cs=jv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(xv||Gle(),n.schedule(r,i,o)),e},{}),Qf=jv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),Ox=jv.reduce((e,t)=>(e[t]=()=>cS[t].process(v0),e),{}),Ule=e=>cS[e].process(v0),WD=e=>{xv=!1,v0.delta=nC?$D:Math.max(Math.min(e-v0.timestamp,Vle),1),v0.timestamp=e,rC=!0,jv.forEach(Ule),rC=!1,xv&&(nC=!1,HD(WD))},Gle=()=>{xv=!0,nC=!0,rC||HD(WD)},iC=()=>v0;function VD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=F4(o.duration)),o.repeatDelay&&(a.repeatDelay=F4(o.repeatDelay)),e&&(a.ease=Dle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function qle(e,t){var n,r;return(r=(n=(l8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Ble(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=l8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=BT(e,n);a==="none"&&s&&typeof n=="string"?a=s8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=BT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?ple({...p,...o}):MD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=sD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function HT(e){return typeof e=="number"?0:s8("",e)}function l8(e,t){return e[t]||e.default||e}function u8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=VD(l,F4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function c8(e,t){e.indexOf(t)===-1&&e.push(t)}function d8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Om{constructor(){this.subscriptions=[]}add(t){return c8(this.subscriptions,t),()=>d8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Om,this.velocityUpdateSubscribers=new Om,this.renderSubscribers=new Om,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=iC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Cs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?OD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new tue(e)}const UD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},GD=[sh,wt,Cl,Cc,Lae,Aae,nue],Ig=e=>GD.find(UD(e)),rue=[...GD,Ji,bu],iue=e=>rue.find(UD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return K7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(e,t){const n=dS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=sD(o[a]);sue(e,a,s)}}function uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;soC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=oC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=jD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function oC(e,t,n={}){var r;const i=dS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>jD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return hue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function jD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Wv.has(m)&&(w={...w,type:!1,delay:0});let E=u8(m,v,S,w);$4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(pue).forEach((u,h)=>{a.push(oC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const f8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...f8].reverse(),vue=f8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();let r=!0;const i=(l,u)=>{const h=dS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&R;const q=Array.isArray(I)?I:[I];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:H={}}=M,J={...H,...de},re=oe=>{W=!0,S.delete(oe),M.needsAnimating[oe]=!0};for(const oe in J){const X=de[oe],G=H[oe];w.hasOwnProperty(oe)||(X!==G?yv(X)&&yv(G)?!FD(X,G)||$?re(oe):M.protectedKeys[oe]=!0:X!==void 0?re(oe):S.add(oe):X!==void 0&&S.has(oe)?re(oe):M.protectedKeys[oe]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...q.map(oe=>({animation:oe,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Bc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Bc(e=>{const{custom:t,visualElement:n}=e,[r,i]=o8(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class YD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Rx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=i8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=iC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Ix(h,this.transformPagePoint),uD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Rx(Ix(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},cD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=X7(t),o=Ix(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=iC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Rx(o,this.history)),this.removeListeners=sS(g0(window,"pointermove",this.handlePointerMove),g0(window,"pointerup",this.handlePointerUp),g0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Ix(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rx({point:e},t){return{point:e,delta:WT(e,qD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function qD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ca(e){return e.max-e.min}function VT(e,t=0,n=.01){return i8(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Pue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Sv(t.min,t.max-r,e.min):r>i&&(n=Sv(e.min,e.max-i,t.min)),D4(0,1,n)}function Lue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const aC=.35;function Mue(e=aC){return e===!1?e=0:e===!0&&(e=aC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),_i=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function KD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Nx(e){return e===void 0||e===1}function sC({scale:e,scaleX:t,scaleY:n}){return!Nx(e)||!Nx(t)||!Nx(n)}function yf(e){return sC(e)||XD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function XD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function H4(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=H4(e,i,r)),H4(e,n,r)+t}function lC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function ZD(e,{x:t,y:n}){lC(e.x,t.translate,t.scale,t.originPoint),lC(e.y,n.translate,n.scale,n.originPoint)}function Rue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(X7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=ca(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=$ue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new YD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ay(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Yp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=KD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Ay(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return u8(t,r,0,n)}stopAnimation(){ll(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ll(n=>{const{drag:r}=this.getProps();if(!Ay(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Yp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ll(s=>{if(!Ay(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;Bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=g0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Yp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=aS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ll(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=aC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Ay(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(H7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new YD(h,l,{transformPagePoint:s})}R4(i,"pointerdown",o&&u),Z7(()=>a.current&&a.current.end())}const Vue={pan:Bc(Wue),drag:Bc(Hue)},uC={current:null},JD={current:!1};function Uue(){if(JD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uC.current=e.matches;e.addListener(t),t()}else uC.current=!1}const Ly=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ly.map(()=>new Om),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ly.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Ly[i]]=o=>r.add(o),n["notify"+Ly[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),$4(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),$4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ez=Object.keys(mv),Yue=ez.length,tz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const I=Gue(),R=new Map,N=new Map;let z={};const $={...k},W=p.initial?{...k}:{};let q;function de(){!M||!P||(H(),o(M,T,p.style,j.projection))}function H(){t(j,T,k,E,p)}function J(){I.notifyUpdate(k)}function re(Z,me){const Se=me.onChange(Fe=>{k[Z]=Fe,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:oe,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),$4(oe)&&oe.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=iS(p),Q=HN(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),R.forEach((me,Se)=>re(Se,me)),JD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:uC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),I.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Fe,We){const ht=[];for(let qe=0;qej.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return ht},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),R.set(Z,me),k[Z]=me.get(),re(Z,me)},removeValue(Z){var me;R.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>R.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=R.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>R.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=K7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Fe=n(p,Z);if(Fe!==void 0&&!ws(Fe))return Fe}return W[Z]!==void 0&&xe===void 0?void 0:$[Z]},...I,build(){return H(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,I.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se{const o=i.get();if(!cC(o))return;const a=dC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!cC(o))continue;const a=dC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),iz=e=>Zue.has(e),Que=e=>Object.keys(e).some(iz),oz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},Jue=new Set(["x","y","z"]),ece=O4.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},nce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);oz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(iz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Ig(h);const m=t[l];let v;if(yv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Ig(h);for(let E=w;E=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const az={treeType:"dom",readValueFromInstance(e,t){if(Wv.has(t)){const n=a8(t);return n&&n.default||0}else{const n=ace(e),r=(UN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return QD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),G7(t,n,r,i.transformTemplate)},render:rD},sce=tz(az),lce=tz({...az,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Wv.has(t)?((n=a8(t))===null||n===void 0?void 0:n.default)||0:(t=iD.has(t)?t:nD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:aD,build(e,t,n,r,i){Y7(t,n,r,i.transformTemplate)},render:oD}),uce=(e,t)=>V7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(rz,v=>(o.push(v),lA)));const a=bu.parse(e);if(a.length>5)return r;const s=bu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Am.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Cs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function fce(e){const[t,n]=o8(),r=C.exports.useContext(W7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(WN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...Rg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rg,borderTopRightRadius:Rg,borderBottomLeftRadius:Rg,borderBottomRightRadius:Rg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return u8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const sz=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=sz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Sv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function us(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=H4(e,1/n,r),i!==void 0&&(e=H4(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function uz(e){return mA(e.x)&&mA(e.y)}function cz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return ca(e.x)/ca(e.y)}function Cce(e,t,n=.1){return i8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){c8(this.members,t),t.scheduleRender()}remove(t){if(d8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){c8(this.children,t),this.isDirty=!0}remove(t){d8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function dz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Oce),this.nodes.forEach(Ice)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=VD(v,250),Am.hasAnimatedSinceResize&&(Am.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!cz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...l8(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Qf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Rce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Rm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Am.hasAnimatedSinceResize=!0,this.currentAnimation=gce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&fz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||_i();const p=ca(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=ca(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}us(s,l),qp(s,h),Im(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Tce(e){e.updateLayout()}function Ace(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(v);v.min=o[m].min,v.max=v.min+S}):fz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(o[m]);v.max=v.min+S});const l=Nm();Im(l,o,i.layout);const u=Nm();i.isShared?Im(u,e.applyTransform(a,!0),i.measured):Im(u,o,i.layout);const h=!uz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=_i();Rm(S,i.layout,m.layout);const w=_i();Rm(w,o,v.actual),cz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Oce(e){e.resolveTargetDelta()}function Ice(e){e.calcProjection()}function Rce(e){e.resetRotation()}function Nce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Bce={duration:.45,ease:[.4,0,.1,1]};function Fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function fz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=dz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dx={current:void 0},Hce=dz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Dx.current=e}return Dx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Il=xae((e,t)=>ase(e,t,Wce,uce,Hce));function hz(){const e=C.exports.useRef(!1);return L4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=hz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(jce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Gce,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function jce(){return new Map}const Ip=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Ip(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const dd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",BD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(W7).forceRender;l&&(s=l);const u=hz(),h=qce(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(L4(()=>{w.current=!1,Yce(h,S),v.current=p}),Z7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Nn,{children:p.map(T=>x(zx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Ip(T)))});p=[...p];const E=v.current.map(Ip),P=h.map(Ip),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=E.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x(zx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Ip(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(zx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Ip(T))}),zD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Nn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function fC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},If={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Ng={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function hC(e){switch(e?.direction??"right"){case"right":return Ng.slideRight;case"left":return Ng.slideLeft;case"bottom":return Ng.slideDown;case"top":return Ng.slideUp;default:return Ng.slideRight}}var Wf={enter:{duration:.2,ease:If.easeOut},exit:{duration:.1,ease:If.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:If.ease},opacity:{duration:.3,ease:If.ease}},enter:{height:{duration:.3,ease:If.ease},opacity:{duration:.4,ease:If.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??_s.enter(TA.enter,i)})},gz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(dd,{initial:!1,custom:w,children:E&&le.createElement(Il.div,{ref:t,...p,className:Yv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});gz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},mz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(dd,{custom:m,children:p&&le.createElement(Il.div,{ref:n,className:Yv("chakra-fade",o),custom:m,...mz,animate:h,...u})})});ede.displayName="Fade";var tde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},vz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(dd,{custom:S,children:m&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",s),...vz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:If.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=hC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=hC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},yz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=hC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(dd,{custom:P,children:w&&le.createElement(Il.div,{...m,ref:n,initial:"exit",className:Yv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});yz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},pC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(dd,{custom:w,children:v&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",a),custom:w,...pC,animate:S,...m})})});ode.displayName="SlideFade";var qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Bx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,hS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[lde,h8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ude,zPe,cde,dde]=FN(),Rf=Pe(function(t,n){const{getButtonProps:r}=h8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:qv("chakra-accordion__button",t.className),__css:a})});Rf.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=tS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,p8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=p8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Bx($.onClick,T),onFocus:Bx($.onFocus,I),onKeyDown:Bx($.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function gde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;fS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function mde(e){fS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function vde(e){fS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function yde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=h8(),{reduceMotion:r}=p8(),i=qv("chakra-accordion__icon",e.className),o=hS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ga,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=p8(),{getPanelProps:s,isOpen:l}=h8(),u=s(o,n),h=qv("chakra-accordion__panel",r),p=hS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(gz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:qv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Kv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function wde(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[kde,g8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Sz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Kv,colorScheme:"blue"}};function Ede(e){return Sz[e].colorScheme}function Pde(e){return Sz[e].icon}var bz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});bz.displayName="Alert";var xz=Pe(function(t,n){const i={display:"inline",...g8().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});xz.displayName="AlertDescription";function wz(e){const{status:t}=_de(),n=Pde(t),r=g8(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:gS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}wz.displayName="AlertIcon";var Cz=Pe(function(t,n){const r=g8();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Cz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",W4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});W4.displayName="NativeImage";var mS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:W4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:W4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});mS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:W4,className:"chakra-image",...e}));function vS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var yS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function gC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=yS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}gC.displayName="ButtonIcon";function mC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Kv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=yS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}mC.displayName="ButtonSpinner";function Ide(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Da=Pe((e,t)=>{const n=Ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=gn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Ide(E),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:yS("chakra-button",w),...P},o&&S==="start"&&x(mC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...I})):x(OA,{...I}),o&&S==="end"&&x(mC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Da.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Nn,{children:[t&&x(gC,{marginEnd:i,children:t}),r,n&&x(gC,{marginStart:i,children:n})]})}var Ia=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=yS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});Ia.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Da,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),My=e=>e?"":void 0,Fx=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rde,_z]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nde,a1]=xn({strict:!1,name:"FormControlContext"});function Dde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:$n(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":My(E),"data-disabled":My(i),"data-invalid":My(r),"data-readonly":My(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var fd=Pe(function(t,n){const r=Ii("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=o1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Rde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});fd.displayName="FormControl";var zde=Pe(function(t,n){const r=a1(),i=_z(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function m8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=v8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Fx(n),"aria-required":Fx(i),"aria-readonly":Fx(r)}}function v8(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:IA(t?.onFocus,h),onBlur:IA(t?.onBlur,p)}}var[Bde,Fde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$de=Pe((e,t)=>{const n=Ii("FormError",e),r=gn(e),i=a1();return i?.isInvalid?le.createElement(Bde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Fde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ga,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(kz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});lh.displayName="FormLabel";var kz=Pe(function(t,n){const r=a1(),i=_z();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});kz.displayName="RequiredIndicator";function ed(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var y8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:y8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:y8});Vde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,$0=!1,vC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function S8(e,t){vC.forEach(n=>n(e,t))}function NA(e){$0=!0,Gde(e)&&(SS="keyboard",S8("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&($0=!0,S8("pointer",e))}function jde(e){e.target===window||e.target===document||($0||(SS="keyboard",S8("keyboard",e)),$0=!1)}function Yde(){$0=!1}function DA(){return SS!=="pointer"}function qde(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){$0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),RA=!0}function Kde(e){qde(),e(DA());const t=()=>e(DA());return vC.add(t),()=>{vC.delete(t)}}var[BPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Ea(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function efe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ez(e={}){const t=v8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=nfe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,q]=C.exports.useState(!1),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),[oe,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Fe=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ed(()=>{n&&H(!1)},[n,H]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,ht=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&<.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(oe),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&W),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Ea(Ae.onMouseDown,Ot),onMouseUp:Ea(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Ea(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:Ea(Ae.onMouseLeave,()=>re(!1))}},[oe,xe,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...R,...Ae,ref:$n(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Ea(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[R,n,xe,o,Q]),Xe=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:$n(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ea(Ae.onChange,Fe),onBlur:Ea(Ae.onBlur,z,()=>H(!1)),onFocus:Ea(Ae.onFocus,$,()=>H(!0)),onKeyDown:Ea(Ae.onKeyDown,ht),onKeyUp:Ea(Ae.onKeyUp,qe),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:y8}),[w,E,a,Fe,z,$,ht,qe,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Ea(Ae.onMouseDown,zA),onTouchStart:Ea(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:oe,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Xe,getLabelProps:Et,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=cd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=cd({from:{opacity:0},to:{opacity:1}}),sfe=cd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Pz=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ii("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Ez({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Pz.displayName="Checkbox";function lfe(e){return x(ga,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var bS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=gn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(lfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function yC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function V4(e,t,n){return(e-t)*100/(n-t)}function Tz(e,t,n){return(n-t)*e+t}function SC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=yC(n);return b8(r,i)}function y0(e,t,n){return e==null?e:(nr==null?"":$x(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Az(_c(v),o),w=n??S,E=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),P=C.exports.useCallback(W=>{let q=W;return l&&(q=y0(q,a,s)),b8(q,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(W):q=_c(v)+W,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(-W):q=_c(v)-W,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=$x(r,o,n)??a,E(W)},[r,n,o,E,a]),I=C.exports.useCallback(W=>{const q=$x(W,o,w)??a;E(q)},[w,o,E,a]),R=_c(v);return{isOutOfRange:R>s||Rx(Z5,{styles:Lz}),ffe=()=>x(Z5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${Lz} - `});function Vf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function hfe(e){return"current"in e}var Mz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Mz()&&e.test(navigator.vendor),mfe=e=>Mz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function BA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function U4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=BA(n),a=BA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function x8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var w8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=gn(i),s=m8(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});w8.displayName="Input";w8.id="Input";var[Cfe,Oz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=gn(t),s=Ir("chakra-input__group",o),l={},u=vS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=x8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),C8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Oz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});C8.displayName="InputAddon";var Iz=Pe(function(t,n){return x(C8,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Iz.displayName="InputLeftAddon";Iz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(C8,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),xS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Oz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(Pfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var Nz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__left-element",r);return x(xS,{ref:n,placement:"left",className:o,...i})});Nz.id="InputLeftElement";Nz.displayName="InputLeftElement";var Dz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__right-element",r);return x(xS,{ref:n,placement:"right",className:o,...i})});Dz.id="InputRightElement";Dz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function td(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Ir("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:td(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var hd=we("div");hd.displayName="Box";var zz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(hd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});zz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(zz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var Bz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Bz.displayName="Center";var Ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Ofe[r],...i,position:"absolute"})});var Ife=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Ife.displayName="Code";var Rfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Ir("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Rfe.displayName="Container";var Nfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=gn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Ir("chakra-divider",p)})});Nfe.displayName="Divider";var nn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});nn.displayName="Flex";var Fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Fz.displayName="Grid";function FA(e){return td(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=x8({gridArea:r,gridColumn:FA(i),gridRow:FA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(hd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Ir("chakra-link",i),...a,__css:r})});Gf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Ir("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Ir("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Bfe,$z]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_8=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Bfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});_8.displayName="List";var Ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(_8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Ffe.displayName="OrderedList";var Hz=Pe(function(t,n){const{as:r,...i}=t;return x(_8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Hz.displayName="UnorderedList";var Wz=Pe(function(t,n){const r=$z();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Wz.displayName="ListItem";var $fe=Pe(function(t,n){const r=$z();return x(ga,{ref:n,role:"presentation",...t,__css:r.icon})});$fe.displayName="ListIcon";var Hfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?Vfe(s,u):Ufe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Hfe.displayName="SimpleGrid";function Wfe(e){return typeof e=="number"?`${e}px`:e}function Vfe(e,t){return td(e,n=>{const r=Goe("sizes",n,Wfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ufe(e){return td(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var bC="& > *:not(style) ~ *:not(style)";function Gfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[bC]:td(n,i=>r[i])}}function jfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":td(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var k8=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Gfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>jfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=vS(l);return P?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Uz,{children:I},N):I;if(!E)return W;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,E,P,p,l]),T=Ir("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[bC]:S[bC]},...m},k)});k8.displayName="Stack";var Gz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=x8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Ir("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var Yfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>td(w,k=>$A(A6("space",k)(P))),"--chakra-wrap-y-spacing":P=>td(E,k=>$A(A6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,E)=>x(Yz,{children:w},E)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Ir("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});Yfe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Ir("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var qfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},qz=qfe,bp=()=>{},Kfe={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Xfe=Kfe,Zfe={window:Xfe,document:qz},Kz=typeof window<"u"?{window,document}:Zfe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return ne(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var Qfe=e=>e?"":void 0;function Jfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Hx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function ehe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Jfe(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Hx(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),H=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),re=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),oe=$n(t,M);return w?{...S,ref:oe,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:oe,role:"button","data-active":Qfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:H,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:re}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function the(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function nhe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),rhe=e=>tB(e)&&e.tabIndex===-1;function ihe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function ohe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||ihe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():ohe(e)?!0:tB(e)}function ahe(e){return e?Jz(e)&&rB(e)&&!rhe(e):!1}var she=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],lhe=she.join(),uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(lhe));return t.unshift(e),t.filter(n=>rB(n)&&uhe(n))}function che(e){const t=e.current;if(!t)return!1;const n=nhe(t);return!n||t.contains(n)?!1:!!ahe(n)}function dhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ed(()=>{if(!o||che(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var fhe={preventScroll:!0,shouldFocus:!1};function hhe(e,t=fhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=phe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);ed(()=>{h()},[h]),Vf(a,"transitionend",h)}function phe(e){return"current"in e}var Mo="top",$a="bottom",Ha="right",Oo="left",E8="auto",Xv=[Mo,$a,Ha,Oo],H0="start",wv="end",ghe="clippingParents",oB="viewport",Dg="popper",mhe="reference",HA=Xv.reduce(function(e,t){return e.concat([t+"-"+H0,t+"-"+wv])},[]),aB=[].concat(Xv,[E8]).reduce(function(e,t){return e.concat([t,t+"-"+H0,t+"-"+wv])},[]),vhe="beforeRead",yhe="read",She="afterRead",bhe="beforeMain",xhe="main",whe="afterMain",Che="beforeWrite",_he="write",khe="afterWrite",Ehe=[vhe,yhe,She,bhe,xhe,whe,Che,_he,khe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Va(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Va(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Va(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function P8(e){if(typeof ShadowRoot>"u")return!1;var t=Va(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Phe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!za(o)||!Tl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function The(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Ahe={name:"applyStyles",enabled:!0,phase:"write",fn:Phe,effect:The,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,G4=Math.min,W0=Math.round;function xC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(xC())}function V0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=Jf(e)?Va(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function T8(e){var t=V0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&P8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xu(e){return Va(e).getComputedStyle(e)}function Lhe(e){return["table","td","th"].indexOf(Tl(e))>=0}function pd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(P8(e)?e.host:null)||pd(e)}function WA(e){return!za(e)||xu(e).position==="fixed"?null:e.offsetParent}function Mhe(e){var t=/firefox/i.test(xC()),n=/Trident/i.test(xC());if(n&&za(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(P8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(i))<0;){var o=xu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Zv(e){for(var t=Va(e),n=WA(e);n&&Lhe(n)&&xu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&xu(n).position==="static")?t:n||Mhe(e)||t}function A8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dm(e,t,n){return jf(e,G4(t,n))}function Ohe(e,t,n){var r=Dm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ihe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Xv))};function Rhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=A8(s),u=[Oo,Ha].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ihe(i.padding,n),m=T8(o),v=l==="y"?Mo:Oo,S=l==="y"?$a:Ha,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Zv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],I=k-m[h]-p[S],R=k/2-m[h]/2+T,N=Dm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Nhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const Dhe={name:"arrow",enabled:!0,phase:"main",fn:Rhe,effect:Nhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function U0(e){return e.split("-")[1]}var zhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:W0(t*i)/i||0,y:W0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=Zv(n),N="clientHeight",z="clientWidth";if(R===Va(n)&&(R=pd(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ha)&&o===wv){M=$a;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===$a)&&o===wv){T=Ha;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&zhe),de=h===!0?Bhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var H;return Object.assign({},q,(H={},H[M]=k?"0":"",H[T]=P?"0":"",H.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",H))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Fhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:_l(t.placement),variation:U0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const $he={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fhe,data:{}};var Oy={passive:!0};function Hhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Va(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Oy)}),s&&l.addEventListener("resize",n.update,Oy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Oy)}),s&&l.removeEventListener("resize",n.update,Oy)}}const Whe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Hhe,data:{}};var Vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function R3(e){return e.replace(/left|right|bottom|top/g,function(t){return Vhe[t]})}var Uhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return Uhe[t]})}function L8(e){var t=Va(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function M8(e){return V0(pd(e)).left+L8(e).scrollLeft}function Ghe(e,t){var n=Va(e),r=pd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+M8(e),y:l}}function jhe(e){var t,n=pd(e),r=L8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+M8(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function O8(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&O8(e)?e:fB(wS(e))}function zm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Va(r),a=i?[o].concat(o.visualViewport||[],O8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(zm(wS(a)))}function wC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yhe(e,t){var n=V0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===oB?wC(Ghe(e,n)):Jf(t)?Yhe(t,n):wC(jhe(pd(e)))}function qhe(e){var t=zm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&za(e)?Zv(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&lB(i,r)&&Tl(i)!=="body"}):[]}function Khe(e,t,n,r){var i=t==="clippingParents"?qhe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=jf(h.top,l.top),l.right=G4(h.right,l.right),l.bottom=G4(h.bottom,l.bottom),l.left=jf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?U0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case $a:l={x:a,y:t.y+t.height};break;case Ha:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?A8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case H0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case wv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?ghe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?Dg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=cB(typeof E!="number"?E:dB(E,Xv)),k=m===Dg?mhe:Dg,T=e.rects.popper,M=e.elements[S?k:m],I=Khe(Jf(M)?M:M.contextElement||pd(e.elements.popper),l,h,a),R=V0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=wC(Object.assign({},T,N)),$=m===Dg?z:R,W={top:I.top-$.top+P.top,bottom:$.bottom-I.bottom+P.bottom,left:I.left-$.left+P.left,right:$.right-I.right+P.right},q=e.modifiersData.offset;if(m===Dg&&q){var de=q[i];Object.keys(W).forEach(function(H){var J=[Ha,$a].indexOf(H)>=0?1:-1,re=[Mo,$a].indexOf(H)>=0?"y":"x";W[H]+=de[re]*J})}return W}function Xhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?aB:l,h=U0(r),p=h?s?HA:HA.filter(function(S){return U0(S)===h}):Xv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Zhe(e){if(_l(e)===E8)return[];var t=R3(e);return[UA(e),t,UA(t)]}function Qhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[R3(E)]:Zhe(E)),M=[E].concat(T).reduce(function(xe,Fe){return xe.concat(_l(Fe)===E8?Xhe(t,{placement:Fe,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Fe)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W=0,re=J?"width":"height",oe=Cv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?H?Ha:Oo:H?$a:Mo;I[re]>R[re]&&(X=R3(X));var G=R3(X),Q=[];if(o&&Q.push(oe[de]<=0),s&&Q.push(oe[X]<=0,oe[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Fe){var We=M.find(function(ht){var qe=N.get(ht);if(qe)return qe.slice(0,Fe).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Jhe={name:"flip",enabled:!0,phase:"main",fn:Qhe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Ha,$a,Oo].some(function(t){return e[t]>=0})}function epe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Cv(t,{elementContext:"reference"}),s=Cv(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const tpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:epe};function npe(e,t,n){var r=_l(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ha].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function rpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=npe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const ipe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rpe};function ope(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ape={name:"popperOffsets",enabled:!0,phase:"read",fn:ope,data:{}};function spe(e){return e==="x"?"y":"x"}function lpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Cv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=U0(t.placement),T=!k,M=A8(P),I=spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var H,J=M==="y"?Mo:Oo,re=M==="y"?$a:Ha,oe=M==="y"?"height":"width",X=R[M],G=X+E[J],Q=X-E[re],j=v?-z[oe]/2:0,Z=k===H0?N[oe]:z[oe],me=k===H0?-z[oe]:-N[oe],Se=t.elements.arrow,xe=v&&Se?T8(Se):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),We=Fe[J],ht=Fe[re],qe=Dm(0,N[oe],xe[oe]),rt=T?N[oe]/2-j-qe-We-W.mainAxis:Z-qe-We-W.mainAxis,Ze=T?-N[oe]/2+j+qe+ht+W.mainAxis:me+qe+ht+W.mainAxis,Xe=t.elements.arrow&&Zv(t.elements.arrow),Et=Xe?M==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,bt=(H=q?.[M])!=null?H:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Dm(v?G4(G,Ae):G,X,v?jf(Q,it):Q);R[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,_n=M==="x"?$a:Ha,Pt=R[I],Kt=I==="y"?"height":"width",kn=Pt+E[xt],mn=Pt-E[_n],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[I])!=null?lt:0,Xt=Oe?kn:Pt-N[Kt]-z[Kt]-Je+W.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-W.altAxis:mn,Ee=v&&Oe?Ohe(Xt,Pt,jt):Dm(v?Xt:kn,Pt,v?jt:mn);R[I]=Ee,de[I]=Ee-Pt}t.modifiersData[r]=de}}const upe={name:"preventOverflow",enabled:!0,phase:"main",fn:lpe,requiresIfExists:["offset"]};function cpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dpe(e){return e===Va(e)||!za(e)?L8(e):cpe(e)}function fpe(e){var t=e.getBoundingClientRect(),n=W0(t.width)/e.offsetWidth||1,r=W0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&fpe(t),o=pd(t),a=V0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||O8(o))&&(s=dpe(t)),za(t)?(l=V0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=M8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ppe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function gpe(e){var t=ppe(e);return Ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function mpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function vpe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function xpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var wpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Cpe=e=>wpe[e],XA={scroll:!0,resize:!0};function _pe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var kpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Cpe(e.placement))},Ppe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Tpe(e)}},Tpe=e=>{var t;if(!e.placement)return;const n=Ape(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Ape=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Lpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:xpe(e.placement)})},Mpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ope={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Ipe(e,t="ltr"){var n;const r=((n=Mpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ope[e]??r}function pB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=Ipe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=k.current)==null||W.call(k),E.current=bpe(S.current,w.current,{placement:P,modifiers:[Lpe,Ppe,Epe,{...kpe,enabled:!!m},{name:"eventListeners",..._pe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=E.current)==null||W.destroy(),E.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(M,q)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(R,q),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},q=null)=>{const{size:de,shadowColor:H,bg:J,style:re,...oe}=W;return{...oe,ref:q,"data-popper-arrow":"",style:Rpe(W)}},[]),$=C.exports.useCallback((W={},q=null)=>({...W,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=E.current)==null||W.update()},forceUpdate(){var W;(W=E.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function Rpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function Npe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=the(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Dpe,zpe]=xn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(Dpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Bpe]=xn({strict:!1,name:"PortalContext"}),I8="chakra-portal",Fpe=".chakra-portal",$pe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Hpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Bpe(),l=zpe();bs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=I8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x($pe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Wpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=I8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Wpe,{containerRef:t,...n}):x(Hpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=I8;uh.selector=Fpe;uh.displayName="Portal";var Vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Iy=new WeakMap,Ry={},Wx=0,Upe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ry[n]||(Ry[n]=new WeakMap);var o=Ry[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,E=(o.get(m)||0)+1;wp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Iy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Wx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Iy.has(p)||p.removeAttribute(r),Iy.delete(p)),v||p.removeAttribute(n)}),Wx--,Wx||(wp=new WeakMap,wp=new WeakMap,Iy=new WeakMap,Ry={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Upe(r,i,n,"aria-hidden")):function(){return null}};function R8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var In={exports:{}},Gpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jpe=Gpe,Ype=jpe;function bB(){}function xB(){}xB.resetWarningCache=bB;var qpe=function(){function e(r,i,o,a,s,l){if(l!==Ype){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:xB,resetWarningCache:bB};return n.PropTypes=n,n};In.exports=qpe();var CC="data-focus-lock",wB="data-focus-lock-disabled",Kpe="data-no-focus-lock",Xpe="data-autofocus-inside",Zpe="data-no-autofocus";function Qpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jpe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function CB(e,t){return Jpe(t||null,function(n){return e.forEach(function(r){return Qpe(r,n)})})}var Vx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function N8(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=pl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=pz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};PB.isSideCarExport=!0;function e0e(e,t){return e.useMedium(t),PB}var TB=N8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=N8(),t0e=N8(),n0e=EB({async:!0}),r0e=[],D8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?r0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,q=t.returnFocus,de=t.focusOptions,H=t.onActivation,J=t.onDeactivation,re=C.exports.useState({}),oe=re[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&H&&H(s.current),l.current=!0},[H]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(ht){var qe=u.current;if(qe&&qe.focus){var rt=typeof q=="function"?q(qe):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,ht?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[q]),j=C.exports.useCallback(function(ht){l.current&&TB.useMedium(ht)},[]),Z=AB.useMedium,me=C.exports.useCallback(function(ht){s.current!==ht&&(s.current=ht,a(ht))},[]),Se=An((r={},r[wB]=p&&"disabled",r[CC]=E,r),$),xe=m!==!0,Fe=xe&&m!=="tail",We=CB([n,me]);return ne(Nn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:Vx},"guard-nearest"):null],!p&&x(W,{id:oe,sideCar:n0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:I,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Fe&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx})]})});D8.propTypes={};D8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const LB=D8;function _C(e,t){return _C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_C(e,t)}function z8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_C(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){z8(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Rl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(f0e)},h0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],F8=h0e.join(","),p0e="".concat(F8,", [data-focus-guard]"),$B=function(e,t){var n;return Rl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?p0e:F8)?[i]:[],$B(i))},[])},$8=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Rl(r.parentNode.querySelectorAll(F8)).filter(function(i){return i===r}):[])},[])},g0e=function(e){var t=e.querySelectorAll("[".concat(Xpe,"]"));return Rl(t).map(function(n){return $8([n])}).reduce(function(n,r){return n.concat(r)},[])},H8=function(e,t){return Rl(e).filter(function(n){return RB(t,n)}).filter(function(n){return u0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Rl(e).filter(function(n){return NB(t,n)})},EC=function(e,t,n){return FB(H8($8(e,n),t),!0,n)},eL=function(e,t){return FB(H8($8(e),t),!1)},m0e=function(e,t){return H8(g0e(e),t)},_v=function(e,t){return e.shadowRoot?_v(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Rl(e.children).some(function(n){return _v(n,t)})},v0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},W8=function(e){var t=kC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(CC);return n.push.apply(n,i?v0e(Rl(HB(r).querySelectorAll("[".concat(CC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},V8=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},y0e=function(e){return e===document.activeElement},S0e=function(e){return Boolean(Rl(e.querySelectorAll("iframe")).some(function(t){return y0e(t)}))},VB=function(e){var t=document&&V8();return!t||t.dataset&&t.dataset.focusGuard?!1:W8(e).some(function(n){return _v(n,t)||S0e(n)})},b0e=function(){var e=document&&V8();return e?Rl(document.querySelectorAll("[".concat(Kpe,"]"))).some(function(t){return _v(t,e)}):!1},x0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},U8=function(e,t){return BB(e)&&e.name?x0e(e,t):e},w0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(U8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?U8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(U8(e[t],e)):t},UB="NEW_FOCUS",C0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=B8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=w0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},_0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},k0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(_0e(n)));return i&&i.length?tL(i):tL(JA(t))},PC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&PC(e.parentNode.host||e.parentNode,t),t},Ux=function(e,t){for(var n=PC(e),r=PC(t),i=0;i=0)return o}return!1},GB=function(e,t,n){var r=kC(e),i=kC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Ux(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Ux(o,l);u&&(!a||_v(u,a)?a=u:a=Ux(u,a))})}),a},E0e=function(e,t){return e.reduce(function(n,r){return n.concat(m0e(r,t))},[])},P0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(d0e)},T0e=function(e,t){var n=document&&V8(),r=W8(e).filter(j4),i=GB(n||e,e,r),o=new Map,a=eL(r,o),s=EC(r,o).filter(function(m){var v=m.node;return j4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=P0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=C0e(h,l,n,t);return p===UB?{node:k0e(a,h,E0e(r,o))}:p===void 0?p:u[p]}},A0e=function(e){var t=W8(e).filter(j4),n=GB(e,e,t),r=new Map,i=EC([n],r,!0),o=EC(t,r).filter(function(a){var s=a.node;return j4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:B8(s)}})},L0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Gx=0,jx=!1,M0e=function(e,t,n){n===void 0&&(n={});var r=T0e(e,t);if(!jx&&r){if(Gx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),jx=!0,setTimeout(function(){jx=!1},1);return}Gx++,L0e(r.node,n.focusOptions),Gx--}};const jB=M0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var O0e=function(){return document&&document.activeElement===document.body},I0e=function(){return O0e()||b0e()},S0=null,Kp=null,b0=null,kv=!1,R0e=function(){return!0},N0e=function(t){return(S0.whiteList||R0e)(t)},D0e=function(t,n){b0={observerNode:t,portaledElement:n}},z0e=function(t){return b0&&b0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var B0e=function(t){return t&&"current"in t?t.current:t},F0e=function(t){return t?Boolean(kv):kv==="meanwhile"},$0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},H0e=function(t,n){return n.some(function(r){return $0e(t,r,r)})},Y4=function(){var t=!1;if(S0){var n=S0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||b0&&b0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(B0e).filter(Boolean));if((!h||N0e(h))&&(i||F0e(s)||!I0e()||!Kp&&o)&&(u&&!(VB(p)||h&&H0e(h,p)||z0e(h))&&(document&&!Kp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,Kp,{focusOptions:l}),b0={})),kv=!1,Kp=document&&document.activeElement),document){var m=document&&document.activeElement,v=A0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},qB=function(t){Y4()&&t&&(t.stopPropagation(),t.preventDefault())},G8=function(){return YB(Y4)},W0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||D0e(r,n)},V0e=function(){return null},KB=function(){kv="just",setTimeout(function(){kv="meanwhile"},0)},U0e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",G8),window.addEventListener("blur",KB)},G0e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",G8),window.removeEventListener("blur",KB)};function j0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function Y0e(e){var t=e.slice(-1)[0];t&&!S0&&U0e();var n=S0,r=n&&t&&t.id===n.id;S0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Kp=null,(!r||n.observed!==t.observed)&&t.onActivation(),Y4(),YB(Y4)):(G0e(),Kp=null)}TB.assignSyncMedium(W0e);AB.assignMedium(G8);t0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const q0e=i0e(j0e,Y0e)(V0e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:q0e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;R8(ZB,["sideCar"]);XB.propTypes={};const K0e=XB;var QB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(K0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var N3="right-scroll-bar-position",D3="width-before-scroll-bar",X0e="with-scroll-bars-hidden",Z0e="--removed-body-scroll-bar-size",JB=EB(),Yx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Yx,onWheelCapture:Yx,onTouchMoveCapture:Yx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=pz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=pl(pl({},k),i);return ne(Nn,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},I),{ref:M})):x(P,{...pl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:D3,zeroRight:N3};var Q0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function J0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q0e();return t&&e.setAttribute("nonce",t),e}function e1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var n1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=J0e())&&(e1e(t,n),t1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},r1e=function(){var e=n1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=r1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},i1e={left:0,top:0,right:0,gap:0},qx=function(e){return parseInt(e||"",10)||0},o1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[qx(n),qx(r),qx(i)]},a1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return i1e;var t=o1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},s1e=eF(),l1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(X0e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(N3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(D3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(N3," .").concat(N3,` { - right: 0 `).concat(r,`; - } - - .`).concat(D3," .").concat(D3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(Z0e,": ").concat(s,`px; - } -`)},u1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return a1e(i)},[i]);return x(s1e,{styles:l1e(o,!t,i,n?"":"!important")})},TC=!1;if(typeof window<"u")try{var Ny=Object.defineProperty({},"passive",{get:function(){return TC=!0,!0}});window.addEventListener("test",Ny,Ny),window.removeEventListener("test",Ny,Ny)}catch{TC=!1}var Cp=TC?{passive:!1}:!1,c1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!c1e(e)&&n[t]==="visible")},d1e=function(e){return tF(e,"overflowY")},f1e=function(e){return tF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},h1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},p1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?d1e(t):f1e(t)},rF=function(e,t){return e==="v"?h1e(t):p1e(t)},g1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},m1e=function(e,t,n,r,i){var o=g1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&nF(e,s)&&(p+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Dy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},v1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},y1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},S1e=0,_p=[];function b1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(S1e++)[0],o=C.exports.useState(function(){return eF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=fC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Dy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=iL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=iL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return m1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!_p.length||_p[_p.length-1]!==o)){var P="deltaY"in E?oL(E):Dy(E),k=t.current.filter(function(I){return I.name===E.type&&I.target===E.target&&v1e(I.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Dy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Dy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return ne(Nn,{children:[S?x(o,{styles:y1e(i)}):null,v?x(u1e,{gapMode:"margin"}):null]})}const x1e=e0e(JB,b1e);var iF=C.exports.forwardRef(function(e,t){return x(CS,{...pl({},e,{ref:t,sideCar:x1e})})});iF.classNames=CS.classNames;const oF=iF;var ch=(...e)=>e.filter(Boolean).join(" ");function nm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var w1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},AC=new w1e;function C1e(e,t){C.exports.useEffect(()=>(t&&AC.add(e),()=>{AC.remove(e)}),[t,e])}function _1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=E1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");k1e(u,t&&a),C1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:nm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!AC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:nm(z.onClick,R),onKeyDown:nm(z.onKeyDown,E),onMouseDown:nm(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function k1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function E1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[P1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[T1e,nd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),G0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),E={..._1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(T1e,{value:E,children:x(P1e,{value:S,children:x(dd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};G0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};G0.displayName="Modal";var q4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});q4.displayName="ModalBody";var j8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=nd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:nm(n,l=>{l.stopPropagation(),o()}),...i})});j8.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=nd(),[p,m]=o8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var A1e={slideInBottom:{...pC,custom:{offsetY:16,reverse:!0}},slideInRight:{...pC,custom:{offsetX:16,reverse:!0}},scale:{...vz,custom:{initialScale:.95,reverse:!0}},none:{}},L1e=we(Il.section),M1e=e=>A1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=M1e(n),...i}=e;return x(L1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Ev=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=nd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=nd();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Ev.displayName="ModalContent";var Y8=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});Y8.displayName="ModalFooter";var q8=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q8.displayName="ModalHeader";var O1e=we(Il.div),Pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=nd();return x(O1e,{...i||(u==="none"?{}:mz),__css:l,ref:t,className:a,...o})});Pv.displayName="ModalOverlay";function I1e(e){const{leastDestructiveRef:t,...n}=e;return x(G0,{...n,initialFocusRef:t})}var R1e=Pe((e,t)=>x(Ev,{ref:t,role:"alertdialog",...e})),[FPe,N1e]=xn(),D1e=we(yz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=nd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=N1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function B1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var lF=(...e)=>e.filter(Boolean).join(" "),Kx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var F1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),$1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var H1e=50,lL=300;function W1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);B1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function j1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:q,...de}=e,H=cr(I),J=cr(R),re=cr(N),oe=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useRef(null),rt=C.exports.useCallback(Ee=>Ee.split("").filter(oe).join(""),[oe]),Ze=C.exports.useCallback(Ee=>q?.(Ee)??Ee,[q]),Xe=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);ed(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Fe.current)return;if(Fe.current.value!=G.value){const Mt=Ze(Fe.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((Ee=a)=>{xe&&j(Ee)},[j,xe,a]),bt=C.exports.useCallback((Ee=a)=>{xe&&Z(Ee)},[Z,xe,a]),Ae=W1e(Et,bt);sL(ht,"disabled",Ae.stop,Ae.isSpinning),sL(qe,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Ze(Ee.currentTarget.value);Q(rt(Ne)),We.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(Ee=>{var Mt;H?.(Ee),We.current&&(Ee.target.selectionStart=We.current.start??((Mt=Ee.currentTarget.value)==null?void 0:Mt.length),Ee.currentTarget.selectionEnd=We.current.end??Ee.currentTarget.selectionStart)},[H]),lt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;G1e(Ee,oe)||Ee.preventDefault();const Mt=xt(Ee)*a,Ne=Ee.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(Ee.preventDefault(),an(Ee))},[oe,a,Et,bt,Q,i,o]),xt=Ee=>{let Mt=1;return(Ee.metaKey||Ee.ctrlKey)&&(Mt=.1),Ee.shiftKey&&(Mt=10),Mt},_n=C.exports.useMemo(()=>{const Ee=X?.(G.value);if(Ee!=null)return Ee;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=C.exports.useCallback(()=>{let Ee=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(Ee=o),G.cast(Ee))},[G,o,i]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),kn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=Fe.current)==null||Ee.focus()})},[t]),mn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),kn()},[kn,Ae]),Oe=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),kn()},[kn,Ae]);Vf(()=>Fe.current,"wheel",Ee=>{var Mt;const at=(((Mt=Fe.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Fe.current;if(!v||!at)return;Ee.preventDefault();const an=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?Et(an):Dn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...Ee,ref:$n(Mt,ht),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...Ee,ref:$n(Mt,qe),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((Ee={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(Fe,Mt),value:Xe(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Kx(h??G.isOutOfRange),"aria-valuetext":_n,autoComplete:"off",autoCorrect:"off",onChange:il(Ee.onChange,it),onKeyDown:il(Ee.onKeyDown,lt),onFocus:il(Ee.onFocus,Ot,()=>Se(!0)),onBlur:il(Ee.onBlur,J,Kt)}),[P,m,p,M,T,Xe,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,_n,it,lt,Ot,J,Kt]);return{value:Xe(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,_S]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[q1e,K8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),X8=Pe(function(t,n){const r=Ii("NumberInput",t),i=gn(t),o=v8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:lF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});X8.displayName="NumberInput";var uF=Pe(function(t,n){const r=_S();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});uF.displayName="NumberInputStepper";var Z8=Pe(function(t,n){const{getInputProps:r}=K8(),i=r(t,n),o=_S();return le.createElement(we.input,{...i,className:lF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z8.displayName="NumberInputField";var cF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Q8=Pe(function(t,n){const r=_S(),{getDecrementButtonProps:i}=K8(),o=i(t,n);return x(cF,{...o,__css:r.stepper,children:t.children??x(F1e,{})})});Q8.displayName="NumberDecrementStepper";var J8=Pe(function(t,n){const{getIncrementButtonProps:r}=K8(),i=r(t,n),o=_S();return x(cF,{...i,__css:o.stepper,children:t.children??x($1e,{})})});J8.displayName="NumberIncrementStepper";var Qv=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[J1e,Jv]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function ege(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,W]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),H=C.exports.useId(),J=i??H,[re,oe,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=pB({...w,enabled:E||!!S}),xe=Npe({isOpen:E,ref:R});Sfe({enabled:E,ref:I}),dhe(R,{focusRef:I,visible:E,shouldFocus:o&&u===kp.click}),hhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===kp.click});const Fe=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Ot),children:Fe?it.children:null,id:oe,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const _n=uL(xt),Pt=Xx(R.current,_n),Kt=Xx(I.current,_n);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===kp.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Fe,oe,$,X,q,G,u,n,P,E,t,p,l,s]),ht=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),qe=C.exports.useCallback((it,Ot=null)=>({...it,ref:$n(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Xe=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:$n(I,Ot,Xe),id:re,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":oe};return u===kp.click&&(lt.onClick=ol(it.onClick,T)),u===kp.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const _n=uL(xt),Pt=!Xx(R.current,_n);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[re,E,oe,u,Xe,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:$n(Ot,lt=>{W(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:$n(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:ht,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Xx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function e_(e){const t=Ii("Popover",e),{children:n,...r}=gn(e),i=t1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}e_.displayName="Popover";function t_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=Jv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:Qv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}t_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=Jv();return le.createElement(we.div,{...r(t,n),className:Qv("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=Jv();return x(bS,{size:"sm",onClick:r,className:Qv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},oge=we(Il.section),dF=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});dF.displayName="PopoverTransition";var n_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=Jv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(dF,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:Qv("chakra-popover__content",t.className),__css:h}))});n_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=Jv();return le.createElement(we.header,{...r(t,n),className:Qv("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function r_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}r_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=cd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=cd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=cd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function fF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var hF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${uge} 2s linear infinite`:void 0},...r})};hF.displayName="Shape";var LC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});LC.displayName="Circle";var fge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=fF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ne(hF,{size:n,isIndeterminate:v,children:[x(LC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(LC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=fF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),pF=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=gn(e),E=Ii("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},I={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ne(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:P,title:v,role:S}),l]}))});pF.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var gF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});gF.displayName="SelectField";var mF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=gn(e),[w,E]=Sge(S,jZ),P=m8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(gF,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(vF,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});mF.displayName="Select";var bge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),vF=e=>{const{children:t=x(bge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};vF.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function yF(e){return!!e.touches}function _ge(e){return yF(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function SF(e,t="page"){return yF(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:SF(i)})}return t?Tge(n):n}function z3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function bF(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:SF(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,Zx(r,this.history)),this.removeListeners=Ige(z3(this.win,"pointermove",this.onPointerMove),z3(this.win,"pointerup",this.onPointerUp),z3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=Zx(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Rge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=Zx(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ige(...e){return t=>e.reduce((n,r)=>r(n),t)}function Qx(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Rge(e,t){if(typeof e=="number"&&typeof t=="number")return Qx(e,t);if(dL(e)&&dL(t)){const n=Qx(e.x,t.x),r=Qx(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function xF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=bF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new Lge(v,h.current,s)}return z3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function wF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Bge(e){return typeof e=="object"&&e!==null&&"current"in e}function Fge(e){const[t]=wF({observeMutation:!1,getNodes(){return[Bge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},gd=Hge({"../../../react-shim.js"(){}});gd();gd();gd();var La=e=>e?"":void 0,x0=e=>e?!0:void 0,md=(...e)=>e.filter(Boolean).join(" ");gd();function w0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}gd();gd();function Wge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function rm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var B3={width:0,height:0},zy=e=>e||B3;function CF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??B3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...rm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>zy(w).height>zy(E).height?w:E,B3):r.reduce((w,E)=>zy(w).width>zy(E).width?w:E,B3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...rm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...rm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...rm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function _F(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=_F({isReversed:a,direction:s,orientation:l}),[q,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[H,J]=C.exports.useState(!1),[re,oe]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>y0($e,t,n)),me=I*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Fe=Z.map($e=>n-$e+t),ht=(W?Fe:Z).map($e=>V4($e,t,n)),qe=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Xe=wF({getNodes(){const $e=Ze.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var pt;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?tt.bottom-Zt:Nt-tt.left,lo=qe?tt.height:tt.width;let hi=Qn/lo;return W&&(hi=1-hi),Tz(hi,t,n)},[qe,W,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!Q)return;const tt=xe.current.valueBounds[$e];pt=parseFloat(SC(pt,tt.min,lt)),pt=y0(pt,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:G,stepUp($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt-pt:tt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt+pt:tt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,W,de,Q]),_n=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:kn,innerTrackStyle:mn}=C.exports.useMemo(()=>CF({isReversed:W,orientation:l,thumbRects:Xe,thumbPercents:ht}),[W,l,ht,Xe]),Oe=C.exports.useCallback($e=>{var pt;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(pt=Ze.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);ed(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const pt=it($e)||0,tt=xe.current.value.map(hi=>Math.abs(hi-pt)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(hi=>hi===Nt);Qn.length>1&&pt>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,pt),Oe(Zt)},Xt=$e=>{if(X==-1)return;const pt=it($e)||0;G(X),xt.setValueAtIndex(X,pt),Oe(X)};xF(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},pt=null)=>({...$e,...R,id:Ae.root,ref:$n(pt,Ze),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(re),style:{...$e.style,...Kt}}),[R,h,re,Kt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,rt),id:Ae.track,"data-disabled":La(h),style:{...$e.style,...kn}}),[h,kn,Ae]),Mt=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:pt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":La(H&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:w0($e.onKeyDown,_n),onFocus:w0($e.onFocus,()=>{oe(!0),G(tt)}),onBlur:w0($e.onBlur,()=>{oe(!1),G(-1)})}},[Ae,Z,Se,Q,H,X,$,E,l,h,p,P,k,Pt,_n,oe]),at=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,pt=null)=>{const{value:tt,...Nt}=$e,Zt=!(ttn),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=V4(tt,t,n);lo=W?100-lo:lo;const hi={position:"absolute",pointerEvents:"none",...rm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!Zt),"data-highlighted":La(Qn),style:{...$e.style,...hi}}},[h,W,n,t,l,Z,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:re,isDragging:H,getThumbPercent:$e=>ht[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:Ee,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Dn,getOutputProps:at}}function Uge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Gge,kS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[jge,i_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kF=Pe(function(t,n){const r=Ii("Slider",t),i=gn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});kF.defaultProps={orientation:"horizontal"};kF.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=kS(),a=i_(),s=r(t,n);return le.createElement(we.div,{...s,className:md("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:md("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=kS(),i=r(t,n);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";gd();gd();function Zge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=_F({isReversed:a,direction:s,orientation:l}),[W,q]=tS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),oe=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=y0(W,t,n),j=n-Q+t,me=V4($?j:Q,t,n),Se=l==="vertical",xe=bF({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:oe,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useId(),rt=u??qe,[Ze,Xe]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Fe.current)return;const an=xe.current;an.eventSource="pointer";const Dn=Fe.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Dn.bottom-pt:$e-Dn.left,Nt=Se?Dn.height:Dn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Tz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(SC(Qn,an.min,an.step))),Qn=y0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(SC(Ne,at.min,G)),Ne=y0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Fge(We),{getThumbStyle:xt,rootStyle:_n,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return CF({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),kn=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);ed(()=>{const Ne=xe.current;kn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}xF(ht,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(H(!0),kn(),mn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(H(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...I,ref:$n(at,ht),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(J),style:{...Ne.style,..._n}}),[I,h,J,_n]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,Fe),id:Xe,"data-disabled":La(h),style:{...Ne.style,...Pt}}),[h,Xe,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,We),role:"slider",tabIndex:oe?0:void 0,id:Ze,"data-active":La(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:w0(Ne.onKeyDown,it),onFocus:w0(Ne.onFocus,()=>re(!0)),onBlur:w0(Ne.onBlur,()=>re(!1))}),[oe,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),Ee=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.valuen),Dn=Q>=Ne.value,$e=V4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!an),"data-highlighted":La(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:Ee,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t"}),[tme,PS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),o_=Pe((e,t)=>{const n=Ii("Slider",e),r=gn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:md("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});o_.defaultProps={orientation:"horizontal"};o_.displayName="Slider";var EF=Pe((e,t)=>{const{getThumbProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__thumb",e.className),__css:r.thumb})});EF.displayName="SliderThumb";var PF=Pe((e,t)=>{const{getTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__track",e.className),__css:r.track})});PF.displayName="SliderTrack";var TF=Pe((e,t)=>{const{getInnerTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__filled-track",e.className),__css:r.filledTrack})});TF.displayName="SliderFilledTrack";var MC=Pe((e,t)=>{const{getMarkerProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",e.className),__css:r.mark})});MC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,a_=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:nme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});a_.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function OC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,AF,ime,ome]=FN();function ame(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=tS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=ime(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[sme,e2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=e2(),i=AF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:OC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=e2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=ehe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:OC(e.onClick,m)}),w="button";return{...S,id:LF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":MF(a,u),onFocus:t?void 0:OC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=e2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:MF(n,s),tabId:LF(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=e2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function pme(){const e=e2(),t=AF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function LF(e,t){return`${e}--tab-${t}`}function MF(e,t){return`${e}--tabpanel-${t}`}var[gme,t2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),OF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});OF.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=t2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...t2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var IF=Pe(function(t,n){const r=hme({...t,ref:n}),i=t2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});IF.displayName="TabPanel";var RF=Pe(function(t,n){const r=fme(t),i=t2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RF.displayName="TabPanels";var NF=Pe(function(t,n){const r=t2(),i=ume({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});NF.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],DF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=m8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});DF.displayName="Textarea";function xme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=zF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function zF(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Ame(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:BF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=zF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(bz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(wz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Cz,{id:u?.title,children:i}),s&&x(xz,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function BF(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=BF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function hh(e){const{theme:t}=DN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},FF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Ile();ed(()=>{v||r?.()},[v]),ed(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},IC(n,{id:t,onClose:E})))});FF.displayName="ToastComponent";var Ime=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Eme(l),children:x(dd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Nn,{children:[n,x(uh,{...o,children:s})]})};function Rme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function zg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},RC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:q,getArrowInnerProps:de,getArrowProps:H}=pB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:I}),J=C.exports.useId(),oe=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Bme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=RC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=RC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Fe=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>K4(X),"keydown",s?We:void 0),Vf(()=>K4(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const ht=C.exports.useCallback((Ze={},Xe=null)=>({...Ze,ref:$n(X,Xe,W),onPointerEnter:zg(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:zg(Ze.onClick,xe),onPointerDown:zg(Ze.onPointerDown,Fe),onFocus:zg(Ze.onFocus,me),onBlur:zg(Ze.onBlur,Se),"aria-describedby":N?oe:void 0}),[me,Se,Fe,N,oe,xe,W]),qe=C.exports.useCallback((Ze={},Xe=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Xe),[q,S,w]),rt=C.exports.useCallback((Ze={},Xe=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Xe,...R,...Ze,id:oe,role:"tooltip",style:Et}},[R,oe]);return{isOpen:N,show:me,hide:Se,getTriggerProps:ht,getTooltipProps:rt,getTooltipPositionerProps:qe,getArrowProps:H,getArrowInnerProps:de}}var Jx="chakra-ui:close-tooltip";function Bme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(Jx,t),()=>n.removeEventListener(Jx,t)},[t,e]),()=>{const n=K4(e),r=RC(e);n.dispatchEvent(new r.CustomEvent(Jx))}}var Fme=we(Il.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const I=!!l,R=k.getTooltipProps({},t),N=I?Rme(R,["role","id"]):R,z=Nme(R,["role","id"]);return a?ne(Nn,{children:[M,x(dd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Fme,{variants:Dme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Nn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:ne(FR,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return ne($me,{theme:t,...r,children:[e,x(Ime,{...n})]})}function vs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:s_(e)?2:l_(e)?3:0}function C0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return l1(e)===2?e.get(t):e[t]}function $F(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function HF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function s_(e){return qme&&e instanceof Map}function l_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function u_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=VF(e);delete t[tr];for(var n=_0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return c_(r,!0)},!0)),e}function Vme(){vs(2)}function d_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=BC[e];return t||vs(18,e),t}function Ume(e,t){BC[e]||(BC[e]=t)}function NC(){return Tv}function ew(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){DC(e),e.p.forEach(Gme),e.p=null}function DC(e){e===Tv&&(Tv=e.l)}function gL(e){return Tv={p:[],l:Tv,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function tw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),vs(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&kl("Patches").M(n[tr].t,e,t.u,t.s)):e=Z4(t,n,[]),X4(t),t.u&&t.v(t.u,t.s),e!==WF?e:void 0}function Z4(e,t,n){if(d_(t))return t;var r=t[tr];if(!r)return eh(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Q4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=u_(r.k):r.o;eh(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),Q4(e,i,!1),n&&e.u&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(rd(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!C0(t.D,r)?o.concat(r):void 0);if($F(n,r,a),!rd(a))return;e.m=!1}if(wu(i)&&!d_(i)){if(!e.h.F&&e._<1)return;Z4(e,i),t&&t.A.l||Q4(e,i)}}function Q4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&c_(t,n)}function nw(e,t){var n=e[tr];return(n?Sf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function rw(e){e.o||(e.o=u_(e.t))}function zC(e,t,n){var r=s_(t)?kl("MapSet").N(t,n):l_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:NC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Av;a&&(l=[s],u=im);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:NC()).p.push(r),r}function jme(e){return rd(e)||vs(22,e),function t(n){if(!wu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||$F(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return u_(e)}function Yme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Av.get(l,o)},set:function(l){var u=this[tr];Av.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=_0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!C0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!HF(m,p))return!0}}var S=!!a[tr];return l.length!==_0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=kl("Patches").$;return rd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),da=new Zme,UF=da.produce;da.produceWithPatches.bind(da);da.setAutoFreeze.bind(da);da.setUseProxies.bind(da);da.applyPatches.bind(da);da.createDraft.bind(da);da.finishDraft.bind(da);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(h_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:J4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function GF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function e5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return t5}function i(s,l){r(s)===t5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rve=function(t,n){return t===n};function ive(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Fve;XF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=XF})(KF);var ZF={exports:{}},QF={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var AS=C.exports,Wve=KF.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=Wve.useSyncExternalStore,jve=AS.useRef,Yve=AS.useEffect,qve=AS.useMemo,Kve=AS.useDebugValue;QF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,Uve(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=QF})(ZF);function Xve(e){e()}let JF=Xve;const Zve=e=>JF=e,Qve=()=>JF,id=C.exports.createContext(null);function e$(){return C.exports.useContext(id)}const Jve=()=>{throw new Error("uSES not initialized!")};let t$=Jve;const e2e=e=>{t$=e},t2e=(e,t)=>e===t;function n2e(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=t$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var g_=Symbol.for("react.element"),m_=Symbol.for("react.portal"),LS=Symbol.for("react.fragment"),MS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),IS=Symbol.for("react.provider"),RS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),NS=Symbol.for("react.forward_ref"),DS=Symbol.for("react.suspense"),zS=Symbol.for("react.suspense_list"),BS=Symbol.for("react.memo"),FS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),n$;n$=Symbol.for("react.module.reference");function Ua(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case g_:switch(e=e.type,e){case LS:case OS:case MS:case DS:case zS:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case RS:case NS:case FS:case BS:case IS:return e;default:return t}}case m_:return t}}}On.ContextConsumer=RS;On.ContextProvider=IS;On.Element=g_;On.ForwardRef=NS;On.Fragment=LS;On.Lazy=FS;On.Memo=BS;On.Portal=m_;On.Profiler=OS;On.StrictMode=MS;On.Suspense=DS;On.SuspenseList=zS;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ua(e)===RS};On.isContextProvider=function(e){return Ua(e)===IS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===g_};On.isForwardRef=function(e){return Ua(e)===NS};On.isFragment=function(e){return Ua(e)===LS};On.isLazy=function(e){return Ua(e)===FS};On.isMemo=function(e){return Ua(e)===BS};On.isPortal=function(e){return Ua(e)===m_};On.isProfiler=function(e){return Ua(e)===OS};On.isStrictMode=function(e){return Ua(e)===MS};On.isSuspense=function(e){return Ua(e)===DS};On.isSuspenseList=function(e){return Ua(e)===zS};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===LS||e===OS||e===MS||e===DS||e===zS||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===FS||e.$$typeof===BS||e.$$typeof===IS||e.$$typeof===RS||e.$$typeof===NS||e.$$typeof===n$||e.getModuleId!==void 0)};On.typeOf=Ua;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function l2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=s2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||id).Provider,{value:i,children:n})}function r$(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=r$();function h2e(e=id){const t=e===id?f2e:r$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(ZF.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var v_="persist:",i$="persist/FLUSH",y_="persist/REHYDRATE",o$="persist/PAUSE",a$="persist/PERSIST",s$="persist/PURGE",l$="persist/REGISTER",g2e=-1;function F3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F3=function(n){return typeof n}:F3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},F3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&k()}function k(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:I}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=w2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key);return t.removeItem(n,_2e)}function _2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function P2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=E2e(m,["_persist"]),w=S;if(p.type===a$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,W){return Promise.resolve($)};z(N,n).then(function($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===s$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===i$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===o$)l=!0;else if(p.type===y_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,I=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(iu({},R,{_persist:v}))}}function IL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:u$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case l$:return $C({},t,{registry:[].concat(IL(t.registry),[n.key])});case y_:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),$C({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=h_(R2e,u$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:l$,key:u})},a=function(u,h,p){var m={type:y_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=$C({},i,{purge:function(){var u=[];return e.dispatch({type:s$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:i$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:o$})},persist:function(){e.dispatch({type:a$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var S_={},b_={};b_.__esModule=!0;b_.default=B2e;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function lw(){}var D2e={getItem:lw,setItem:lw,removeItem:lw};function z2e(e){if((typeof self>"u"?"undefined":$3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function B2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}S_.__esModule=!0;S_.default=H2e;var F2e=$2e(b_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,F2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var c$=void 0,W2e=V2e(S_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");c$=U2e;var d$={},f$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=th,n=x_,r=function(H){return typeof H=="object"&&H!==null};e.isObjectLike=r;const i=function(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(H){return(0,e.isLength)(H&&H.length)&&Object.prototype.toString.call(H)==="[object Array]"};const o=function(H){return!!H&&typeof H=="object"&&!(0,e.isArray)(H)};e.isPlainObject=o;const a=function(H){return String(~~H)===H&&Number(H)>=0};e.isIntegerString=a;const s=function(H){return Object.prototype.toString.call(H)==="[object String]"};e.isString=s;const l=function(H){return Object.prototype.toString.call(H)==="[object Date]"};e.isDate=l;const u=function(H){return Object.keys(H).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(H,J,re){re||(re=new Set([H])),J||(J="");for(const oe in H){const X=J?`${J}.${oe}`:oe,G=H[oe];if((0,e.isObjectLike)(G))return re.has(G)?`${J}.${oe}:`:(re.add(G),(0,e.getCircularPath)(G,X,re))}return null};e.getCircularPath=p;const m=function(H){if(!(0,e.isObjectLike)(H))return H;if((0,e.isDate)(H))return new Date(+H);const J=(0,e.isArray)(H)?[]:{};for(const re in H){const oe=H[re];J[re]=(0,e._cloneDeep)(oe)}return J};e._cloneDeep=m;const v=function(H){const J=(0,e.getCircularPath)(H);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${H}`);return(0,e._cloneDeep)(H)};e.cloneDeep=v;const S=function(H,J){if(H===J)return{};if(!(0,e.isObjectLike)(H)||!(0,e.isObjectLike)(J))return J;const re=(0,e.cloneDeep)(H),oe=(0,e.cloneDeep)(J),X=Object.keys(re).reduce((Q,j)=>(h.call(oe,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(re)||(0,e.isDate)(oe))return re.valueOf()===oe.valueOf()?{}:oe;const G=Object.keys(oe).reduce((Q,j)=>{if(!h.call(re,j))return Q[j]=oe[j],Q;const Z=(0,e.difference)(re[j],oe[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(re)&&!(0,e.isArray)(oe)||!(0,e.isArray)(re)&&(0,e.isArray)(oe)?oe:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(H,J){return J.reduce((re,oe)=>{if(re){const X=parseInt(oe,10),G=(0,e.isIntegerString)(oe)&&X<0?re.length+X:oe;return(0,e.isString)(re)?re.charAt(G):re[G]}},H)};e.path=w;const E=function(H,J){return[...H].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(H,J){const re=(0,e.cloneDeep)(H);return J.reduce((oe,X,G)=>(G===J.length-1&&oe&&(0,e.isObjectLike)(oe)&&delete oe[X],oe&&oe[X]),re),re};e.dissocPath=P;const k=function(H,J,...re){if(!re||!re.length)return J;const oe=re.shift(),{preservePlaceholder:X,preserveUndefined:G}=H;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(oe))for(const Q in oe)if((0,e.isObjectLike)(oe[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(H,J[Q],oe[Q]);else if((0,e.isArray)(J)){let j=oe[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=oe[Q]!==t.PLACEHOLDER_UNDEFINED?oe[Q]:void 0;J[Q]=j}return k(H,J,...re)},T=function(H,J,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(H),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(H,J=[],re,oe,X){if(!(0,e.isObjectLike)(H))return H;for(const G in H){const Q=H[G],j=(0,e.isArray)(H),Z=oe?oe+"."+G:G;Q===null&&(re===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||re===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(H[parseInt(G,10)]=void 0),Q===void 0&&X&&re===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(H[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,re,Z,X)}},I=function(H,J,re,oe){const X=(0,e.cloneDeep)(H);return M(X,J,re,"",oe),X};e.preserveUndefined=I;const R=function(H,J,re){return re.indexOf(H)===J};e.unique=R;const N=function(H){return H.reduce((J,re)=>{const oe=H.filter(me=>me===re),X=H.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=oe.length>1&&G.indexOf(re)===-1,Z=X.length>1;return{duplicates:[...G,...j?oe:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(H,J,re){const oe=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${oe} configuration.`,G=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!H||!H.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(H);if(Q.length>1)throw new Error(`${X} Duplicated paths. - - ${JSON.stringify(Q)} - - ${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(j)} - - ${G}`)};e.singleTransformValidator=z;const $=function(H){if(!(0,e.isArray)(H))return;const J=H?.map(re=>re.deepPersistKey).filter(re=>re)||[];if(J.length){const re=J.filter((oe,X)=>J.indexOf(oe)!==X);if(re.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(re)}`)}};e.transformsValidator=$;const W=function({whitelist:H,blacklist:J}){if(H&&H.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(H){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(H);(0,e.throwError)({duplicates:re,subsets:oe},"whitelist")}if(J){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:re,subsets:oe},"blacklist")}};e.configValidator=W;const q=function({duplicates:H,subsets:J},re){if(H.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${re}. - - ${JSON.stringify(H)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(J)}`)};e.throwError=q;const de=function(H){return(0,e.isArray)(H)?H.filter(e.unique).reduce((J,re)=>{const oe=re.split("."),X=oe[0],G=oe.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(f$);(function(e){var t=ms&&ms.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(k[I])){k[I]=(0,n.mergeDeep)(k[I],T[I]);return}k[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=p,k=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(P(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(d$);const H3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return w_(r)?r:!1},w_=e=>Boolean(typeof e=="string"?G2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),r5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),j2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,q="...",de=800,H=16,J=1,re=2,oe=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],Fe="[object Arguments]",We="[object Array]",ht="[object AsyncFunction]",qe="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Xe="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",_n="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",kn="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",Ee="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,g1=RegExp(hi.source),ma=RegExp(Ms.source),xh=/<%-([\s\S]+?)%>/g,m1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,v1=RegExp(kd.source),Ru=/^\s+/,Ed=/\s/,y1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,S1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,b1=/[()=,{}\[\]\/\s]/,x1=/\\(\\)?/g,w1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ga=/\w*$/,C1=/^[-+]0x[0-9a-f]+$/i,_1=/^0b[01]+$/i,k1=/^\[object .+?Constructor\]$/,E1=/^0o[0-7]+$/i,P1=/^(?:0|[1-9]\d*)$/,T1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Is=/($^)/,A1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Rs="\\u20d0-\\u20ff",Bl=Dl+zl+Rs,_h="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",vn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ns+No+En+vn,zo="['\u2019]",Ds="["+ja+"]",Gr="["+Ur+"]",Ya="["+Bl+"]",Pd="\\d+",Fl="["+_h+"]",qa="["+Du+"]",Td="[^"+ja+Ur+Pd+_h+Du+Do+"]",pi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ya+"|"+pi+")",Eh="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",$l="(?:"+qa+"|"+Td+")",L1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Bu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=kh+"?",Fu="["+Cr+"]?",va="(?:"+Bs+"(?:"+[Eh,Ad,zs].join("|")+")"+Fu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Fu+Ld+va,Ph="(?:"+[Fl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[Eh+Ya+"?",Ya,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Th=RegExp(Ya,"g"),Bo=RegExp(pi+"(?="+pi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",L1+"+"+Bu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Bu,Hl,Md,Pd,Ph].join("|"),"g"),Od=RegExp("["+Bs+ja+Bl+Cr+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Id=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lh=-1,sn={};sn[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Dn]=sn[$e]=sn[pt]=sn[tt]=sn[Nt]=!0,sn[Fe]=sn[We]=sn[jt]=sn[qe]=sn[Ee]=sn[rt]=sn[Xe]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[kn]=sn[Je]=!1;var Wt={};Wt[Fe]=Wt[We]=Wt[jt]=Wt[Ee]=Wt[qe]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Dn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[kn]=Wt[mn]=Wt[$e]=Wt[pt]=Wt[tt]=Wt[Nt]=!0,Wt[Xe]=Wt[Et]=Wt[Je]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},M1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ke=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,ya=dn&&dn.isRegExp,Fs=dn&&dn.isSet,O1=dn&&dn.isTypedArray;function gi(ie,be,ve){switch(ve.length){case 0:return ie.call(be);case 1:return ie.call(be,ve[0]);case 2:return ie.call(be,ve[0],ve[1]);case 3:return ie.call(be,ve[0],ve[1],ve[2])}return ie.apply(be,ve)}function I1(ie,be,ve,Ge){for(var _t=-1,Qt=ie==null?0:ie.length;++_t-1}function Oh(ie,be,ve){for(var Ge=-1,_t=ie==null?0:ie.length;++Ge<_t;)if(ve(be,ie[Ge]))return!0;return!1}function Bn(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length,_t=Array(Ge);++ve-1;);return ve}function Ka(ie,be){for(var ve=ie.length;ve--&&Uu(be,ie[ve],0)>-1;);return ve}function N1(ie,be){for(var ve=ie.length,Ge=0;ve--;)ie[ve]===be&&++Ge;return Ge}var g2=zd(Mh),Xa=zd(M1);function Hs(ie){return"\\"+te[ie]}function Rh(ie,be){return ie==null?n:ie[be]}function Vl(ie){return Od.test(ie)}function Nh(ie){return Ah.test(ie)}function m2(ie){for(var be,ve=[];!(be=ie.next()).done;)ve.push(be.value);return ve}function Dh(ie){var be=-1,ve=Array(ie.size);return ie.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function zh(ie,be){return function(ve){return ie(be(ve))}}function Ho(ie,be){for(var ve=-1,Ge=ie.length,_t=0,Qt=[];++ve-1}function N2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=I2,Wo.prototype.delete=R2,Wo.prototype.get=X1,Wo.prototype.has=Z1,Wo.prototype.set=N2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ri(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=GV(c),!ee)return xi(c,Y)}else{var Le=ai(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,ee);if(Le==lt||Le==Fe||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?gg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ri(St,g,b,St,c,F))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ri(St,g,b,Gt,c,F))});var yt=Ce?ce?ge:qo:ce?bo:si,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ri(St,g,b,Gt,c,F))}),Y}function Gh(c){var g=si(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function tg(c,g,b){if(typeof c!="function")throw new mi(a);return bg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=Bn(g,_r(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=ju,Y=!1,g=new wa(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(ee)?g>1?Er(ee,g-1,b,L,D):Sa(D,ee):L||(D[D.length]=ee)}return D}var qh=Js(),go=Js(!0);function Yo(c,g){return c&&qh(c,g,si)}function mo(c,g){return c&&go(c,g,si)}function Kh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&en.call(c,g)}function Qh(c,g){return c!=null&&g in ln(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new wa(Y&&_e):n}_e=c[0];var Le=-1,Ue=ee[0];e:for(;++Le-1;)ee!==c&&Gd.call(ee,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Zl(D)?Gd.call(c,D,1):up(c,D)}}return c}function tf(c,g){return c+Gl(U1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,F=mr(qd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Pb(Pk(c,g,xo),c+"")}function ip(c){return sc(mp(c))}function nf(c,g){var b=mp(c);return V2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:V(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new wa}else ce=g?[]:ee;e:for(;++L=L?c:Tr(c,g,b)}var dg=x2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function fg(c){var g=new c.constructor(c.byteLength);return new vi(g).set(new vi(c)),g}function Xl(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function F2(c){var g=new c.constructor(c.source,Ga.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function $2(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function hg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function H2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Le=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=ln(g);++L-1?D[F?g[Y]:Y]:n}}function vg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new mi(a);if(D&&!Y&&ye(F)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,dt=b&w?new wa:n;for(F.set(c,g),F.set(g,c);++Le1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(y1,`{ -/* [wrapped with `+g+`] */ -`)}function qV(c){return Rt(c)||df(c)||!!(W1&&c&&c[W1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&P1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function V2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Fk(c,b)});function $k(c){var g=B(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function U2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:U2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){var L=Ik(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:U2,args:[Tb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Tb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=Rt(c)?zn:ng;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var vG=mg(Rk),yG=mg(Nk);function SG(c,g){return Er(G2(c,g),1)}function bG(c,g){return Er(G2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(G2(c,g),b)}function Hk(c,g){var b=Rt(c)?Vn:Ja;return b(c,Te(g,3))}function Wk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var wG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),X2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return Ja(c,function(Y){F[++L]=D?gi(g,Y,b):es(Y,g,b)}),F}),kG=dp(function(c,g,b){Uo(c,b,g)});function G2(c,g){var b=Rt(c)?Bn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),Si(c,g,b))}var PG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=Rt(c)?Rd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Ja)}function AG(c,g,b){var L=Rt(c)?d2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function LG(c,g){var b=Rt(c)?ho:jo;return b(c,q2(Te(g,3)))}function MG(c){var g=Rt(c)?sc:ip;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ni:nf;return L(c,g)}function IG(c){var g=Rt(c)?Sb:oi;return g(c)}function RG(c){if(c==null)return 0;if(So(c))return X2(c)?ba(c):c.length;var g=ai(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=Rt(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),Si(c,Er(g,1),[])}),j2=w2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Lb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Lb));L|=I}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=I}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new mi(a);g=ka(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,F=Le?mr(ka(b.maxWait)||0,g):F,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var os=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,os),Y}function yt(Lr){return Ce=Lr,ee=bg(Gt,g),_e?dt(Lr):Y}function $t(Lr){var os=Lr-ce,eu=Lr-Ce,hE=g-os;return Le?qr(hE,F-eu):hE}function St(Lr){var os=Lr-ce,eu=Lr-Ce;return ce===n||os>=g||os<0||Le&&eu>=F}function Gt(){var Lr=j2();if(St(Lr))return Jt(Lr);ee=bg(Gt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&dg(ee),Ce=0,L=ce=D=ee=n}function Zi(){return ee===n?Y:Jt(j2())}function Zo(){var Lr=j2(),os=St(Lr);if(L=arguments,D=this,ce=Lr,os){if(ee===n)return yt(ce);if(Le)return dg(ee),ee=bg(Gt,g),dt(ce)}return ee===n&&(ee=bg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var BG=Ct(function(c,g){return tg(c,1,g)}),FG=Ct(function(c,g,b){return tg(c,ka(g)||0,b)});function $G(c){return he(c,$)}function Y2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new mi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(Y2.Cache||Vo),b}Y2.Cache=Vo;function q2(c){if(typeof c!="function")throw new mi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function HG(c){return Uk(2,c)}var WG=wb(function(c,g){g=g.length==1&&Rt(g[0])?Bn(g[0],_r(Te())):Bn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,F=qr(L.length,b);++D=g}),df=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,rj=jr?_r(jr):ig;function So(c){return c!=null&&K2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&ii(c)==qe}var yc=C2||Wb,oj=co?_r(co):og;function aj(c){return br(c)&&c.nodeType===1&&!xg(c)}function sj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||gp(c)||df(c)))return!c.length;var g=ai(c);if(g==Ae||g==Kt)return!c.size;if(Sg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Ob(c){if(!br(c))return!1;var g=ii(c);return g==Xe||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!xg(c)}function cj(c){return typeof c=="number"&&$h(c)}function Ql(c){if(!sr(c))return!1;var g=ii(c);return g==Et||g==bt||g==ht||g==_n}function Xk(c){return typeof c=="number"&&c==Dt(c)}function K2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Ui?_r(Ui):xb;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return np(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&ii(c)==it}function xg(c){if(!br(c)||ii(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ti}var Ib=ya?_r(ya):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Fs?_r(Fs):Bt;function X2(c){return typeof c=="string"||!Rt(c)&&br(c)&&ii(c)==kn}function Ko(c){return typeof c=="symbol"||br(c)&&ii(c)==mn}var gp=O1?_r(O1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&ai(c)==Je}function bj(c){return br(c)&&ii(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return X2(c)?Ni(c):xi(c);if(Ju&&c[Ju])return m2(c[Ju]());var g=ai(c),b=g==Ae?Dh:g==Kt?Hd:mp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=ka(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function ka(c){if(typeof c=="number")return c;if(Ko(c))return j;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=_1.test(c);return b||E1.test(c)?Ke(c.slice(2),b?2:8):C1.test(c)?j:+c}function nE(c){return Ca(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(Sg(g)||So(g)){Ca(g,si(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){Ca(g,bo(g),c)}),Z2=Ki(function(c,g,b,L){Ca(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){Ca(g,si(g),c,L)}),Ej=er(Uh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b1),F}),Ca(c,ge(c),b),L&&(b=ri(b,p|m|v,At));for(var D=g.length;D--;)up(b,g[D]);return b});function jj(c,g){return oE(c,q2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:lg(c,g)});function oE(c,g){if(c==null)return{};var b=Bn(ge(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=U1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Db(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(T1,g2).replace(Th,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&ma.test(c)?c.replace(Ms,Xa):c}function lY(c){return c=Sn(c),c&&v1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=hp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;return g&&L>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Ib(g))&&(g=qi(g),!g&&Vl(c))?ns(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Db(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=B.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=Z2({},g,L,Re);var D=Z2({},g.imports,L.imports,Re),F=si(D),Y=$d(D,F),ee,ce,Ce=0,_e=g.interpolate||Is,Le="__p += '",Ue=Vd((g.escape||Is).source+"|"+_e.source+"|"+(_e===Iu?w1:Is).source+"|"+(g.evaluate||Is).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` -`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(A1,Hs),Gt&&(ee=!0,Le+=`' + -__e(`+Gt+`) + -'`),Zi&&(ce=!0,Le+=`'; -`+Zi+`; -__p += '`),Jt&&(Le+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),Ce=Zo+St.length,St}),Le+=`'; -`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) { -`+Le+` -} -`;else if(b1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { -`+(yt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Le+`return __p -}`;var $t=dE(function(){return Qt(F,dt+"return "+Le).apply(n,Y)});if($t.source=Le,Ob($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Ka(L,D)+1;return ns(L,F,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,z1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ka(L,Ni(g))+1;return ns(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Ru,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return ns(L,D).join("")}function TY(c,g){var b=W,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var F=c.length;if(Vl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-ba(L);if(ee<1)return L;var ce=Y?ns(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Ib(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(Ga.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?ee:Le)}}else if(c.indexOf(qi(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&g1.test(c)?c.replace(hi,S2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Db=hp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Nh(c)?Wd(c):R1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return gi(c,n,g)}catch(b){return Ob(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Lb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?Bn(c,function(L){if(typeof L[1]!="function")throw new mi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++DG)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Fd(L,g);++b0||g<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Ut,Ce=ee[0],_e=ce||Rt(Y),Le=function(Gt){var Jt=D.apply(B,Sa([Gt],ee));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,yt=F&&!Ue,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,ee);return St.__actions__.push({func:U2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,ee):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";en.call(Za,L)||(Za[L]=[]),Za[L].push({name:g,func:b})}}),Za[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=yi,Ut.prototype.value=T2,B.prototype.at=aG,B.prototype.chain=sG,B.prototype.commit=lG,B.prototype.next=uG,B.prototype.plant=dG,B.prototype.reverse=fG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=hG,B.prototype.first=B.prototype.head,Ju&&(B.prototype[Ju]=cG),B},xa=po();Vt?((Vt.exports=xa)._=xa,Tt._=xa):vt._=xa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,h$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&h$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},p$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?h$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),g$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),$S=De((e,t)=>{var n=g$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=$S(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),tye=De((e,t)=>{var n=$S();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=$S();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=$S();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),HS=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=HS();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),m$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Pu=De((e,t)=>{var n=m$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),C_=De((e,t)=>{var n=Pu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=C_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),WS=De((e,t)=>{var n=C_(),r=lye(),i=uye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),v$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),y$=De((e,t)=>{var n=WS(),r=v$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),cye=De((e,t)=>{var n=Pu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),S$=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),fye=De((e,t)=>{var n=y$(),r=dye(),i=v$(),o=S$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),__=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Map");t.exports=i}),VS=De((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=VS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=VS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),vye=De((e,t)=>{var n=VS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),yye=De((e,t)=>{var n=VS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Sye(),r=HS(),i=__();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),US=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=US();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=US();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=US();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=US();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),b$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=HS(),r=__(),i=b$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=HS(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=b$(),r=Tye(),i=Aye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),x$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Pu(),r=n.Uint8Array;t.exports=r}),Rye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=C_(),r=Iye(),i=g$(),o=x$(),a=Rye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,q,de,H,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!H(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var re=a;case E:var oe=q&l;if(re||(re=s),z.size!=$.size&&!oe)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(re(z),re($),q,de,H,J);return J.delete(z),G;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),zye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),Bye=De((e,t)=>{var n=zye(),r=k_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Fye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Fye(),r=$ye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=WS(),r=GS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=GS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),w$=De((e,t)=>{var n=Pu(),r=Gye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),jye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=WS(),r=C$(),i=GS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",q="[object Uint16Array]",de="[object Uint32Array]",H={};H[M]=H[I]=H[R]=H[N]=H[z]=H[$]=H[W]=H[q]=H[de]=!0,H[o]=H[a]=H[k]=H[s]=H[T]=H[l]=H[u]=H[h]=H[p]=H[m]=H[v]=H[S]=H[w]=H[E]=H[P]=!1;function J(re){return i(re)&&r(re.length)&&!!H[n(re)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=m$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),_$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=k_(),o=w$(),a=jye(),s=_$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),t3e=De((e,t)=>{var n=y$(),r=C$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Bye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=u1(),r=Pu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=__(),i=a3e(),o=s3e(),a=l3e(),s=WS(),l=S$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return p;case k:return m;case T:return v}return R}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=x$(),i=Dye(),o=i3e(),a=u3e(),s=k_(),l=w$(),u=_$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,I,R){var N=s(P),z=s(k),$=N?m:a(P),W=z?m:a(k);$=$==p?v:$,W=W==p?v:W;var q=$==v,de=W==v,H=$==W;if(H&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(H&&!q)return R||(R=new n),N||u(P)?r(P,k,T,M,I,R):i(P,k,$,T,M,I,R);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(J||re){var oe=J?P.value():P,X=re?k.value():k;return R||(R=new n),I(oe,X,T,M,R)}}return H?(R||(R=new n),o(P,k,T,M,I,R)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=GS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),k$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function uw(e,t=","){return typeof e=="string"?e.split(t):e}function Bm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return E$(e,["input","textarea","select"])}function E$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function v3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var y3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=p$(k$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!E$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||uw(e,u?.splitKey).forEach(E=>{let P=Bm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.addHotkey(Bm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.removeHotkey(Bm(w,u?.combinationKey)))}},[e,l,u,h]),i}p$(k$());var HC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>HC.add(Bm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Bm(t);for(let r of HC)r.keys?.every(i=>n.keys?.includes(i))&&HC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const T3e=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),A3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),L3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),M3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),O3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var to=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(to||{});const I3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(fd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(a_,{className:"invokeai__switch-root",...s})]})})};function E_(){const e=ke(i=>i.system.isGFPGANAvailable),t=ke(i=>i.options.shouldRunFacetool),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(G_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(Oi,{...k,children:ne(fd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(X8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Z8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(J8,{...P,className:"invokeai__number-input-stepper-button"}),x(Q8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},vd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:ne(fd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(mF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})]})})},R3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],D3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],z3e=[{key:"2x",value:2},{key:"4x",value:4}],P_=0,T_=4294967295,B3e=["gfpgan","codeformer"],F3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),jS=()=>{const e=Ye(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=ke($3e),{isGFPGANAvailable:i}=ke(H3e),o=l=>e(j3(l)),a=l=>e(sV(l)),s=l=>e(Y3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(vd,{label:"Type",validValues:B3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Ye(),t=ke(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var P$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(P$),Xc=globalThis&&globalThis.__assign||function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function n2(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:H,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:re,sliderTooltipProps:oe,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>H?.max?H.max:a,[a,H?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Fe=>{const We=st.clamp(S?Math.floor(Number(Fe.target.value)):Number(Fe.target.value),o,Z);j(String(We)),l(We)},Se=Fe=>{j(Fe),l(Number(Fe))},xe=()=>{!T||T()};return ne(fd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),ne(Gz,{w:"100%",gap:2,children:[ne(o_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Nn,{children:[x(MC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(MC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(PF,{className:"invokeai__slider_track",...q,children:x(TF,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...oe,children:x(EF,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(X8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:R,...H,children:[x(Z8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),ne(uF,{...re,children:[x(J8,{className:"invokeai__slider-number-stepper"}),x(Q8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(A_,{}),onClick:xe,isDisabled:M,...X})]})]})}function A$(e){const{label:t="Strength",styleClass:n}=e,r=ke(s=>s.options.img2imgStrength),i=Ye();return x(n2,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(m9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(m9(.5))}})}const L$=()=>x(hd,{flex:"1",textAlign:"left",children:"Other Options"}),Q3e=()=>{const e=Ye(),t=ke(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},J3e=()=>{const e=Ye(),t=ke(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},M$=()=>ne(nn,{gap:2,direction:"column",children:[x(J3e,{}),x(Q3e,{})]}),L_=()=>x(hd,{flex:"1",textAlign:"left",children:"Seed"});function e4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Y_e(r.target.checked))})}function t4e(){const e=ke(o=>o.options.seed),t=ke(o=>o.options.shouldRandomizeSeed),n=ke(o=>o.options.shouldGenerateVariations),r=Ye(),i=o=>r(l2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:P_,max:T_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const O$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function n4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(Da,{size:"sm",isDisabled:t,onClick:()=>e(l2(O$(P_,T_))),children:x("p",{children:"Shuffle"})})}function r4e(){const e=Ye(),t=ke(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e($_e(r)),value:t,isInteger:!1})}function i4e(){const e=Ye(),t=ke(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(H_e(r)),value:t,isInteger:!1})}const M_=()=>ne(nn,{gap:2,direction:"column",children:[x(e4e,{}),ne(nn,{gap:2,children:[x(t4e,{}),x(n4e,{})]}),x(nn,{gap:2,children:x(r4e,{})}),x(nn,{gap:2,children:x(i4e,{})})]});function O_(){const e=ke(i=>i.system.isESRGANAvailable),t=ke(i=>i.options.shouldRunESRGAN),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(j_e(i.target.checked))})]})}const o4e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),a4e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),YS=()=>{const e=Ye(),{upscalingLevel:t,upscalingStrength:n}=ke(o4e),{isESRGANAvailable:r}=ke(a4e);return ne("div",{className:"upscale-options",children:[x(vd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(v9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(y9(a)),value:n,isInteger:!1})]})};function s4e(){const e=ke(r=>r.options.shouldGenerateVariations),t=Ye();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(W_e(r.target.checked))})}function I_(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(s4e,{})]})}function l4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(fd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(w8,{...s,className:"input-entry",size:"sm",width:o})]})}function u4e(){const e=ke(i=>i.options.seedWeights),t=ke(i=>i.options.shouldGenerateVariations),n=Ye(),r=i=>n(cV(i.target.value));return x(l4e,{label:"Seed Weights",value:e,isInvalid:t&&!(w_(e)||e===""),isDisabled:!t,onChange:r})}function c4e(){const e=ke(i=>i.options.variationAmount),t=ke(i=>i.options.shouldGenerateVariations),n=Ye();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(V_e(i)),isInteger:!1})}const R_=()=>ne(nn,{gap:2,direction:"column",children:[x(c4e,{}),x(u4e,{})]}),ta=e=>{const{label:t,styleClass:n,...r}=e;return x(Pz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function N_(){const e=ke(r=>r.options.showAdvancedOptions),t=Ye();return x(ta,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(q_e(r.target.checked)),isChecked:e})}function d4e(){const e=Ye(),t=ke(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ct(e=>e.options,e=>db[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),f4e=ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h4e(){const e=ke(i=>i.options.height),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const p4e=ct([e=>e.options,f4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function g4e(){const e=Ye(),{iterations:t,mayGenerateMultipleImages:n}=ke(p4e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(F_e(i)),value:t,width:D_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function m4e(){const e=ke(r=>r.options.sampler),t=Ye();return x(vd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:R3e,styleClass:"main-option-block"})}function v4e(){const e=Ye(),t=ke(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center"})}function y4e(){const e=ke(i=>i.options.width),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const D_="auto";function z_(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(g4e,{}),x(v4e,{}),x(d4e,{})]}),ne("div",{className:"main-options-row",children:[x(y4e,{}),x(h4e,{}),x(m4e,{})]})]})})}const S4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},I$=TS({name:"system",initialState:S4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:b4e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:cw,setIsConnected:BL,setSocketId:$Pe,setShouldConfirmOnDelete:R$,setOpenAccordions:x4e,setSystemStatus:w4e,setCurrentStatus:W3,setSystemConfig:C4e,setShouldDisplayGuides:_4e,processingCanceled:k4e,errorOccurred:FL,errorSeen:N$,setModelList:$L,setIsCancelable:Xp,modelChangeRequested:E4e,setSaveIntermediatesInterval:P4e,setEnableImageDebugging:T4e,generationRequested:A4e,addToast:By,clearToastQueue:L4e,setProcessingIndeterminateTask:M4e}=I$.actions,O4e=I$.reducer;function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function D$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const z4e=ct(e=>e.system,e=>e.shouldDisplayGuides),B4e=({children:e,feature:t})=>{const n=ke(z4e),{text:r}=I3e[t];return n?ne(e_,{trigger:"hover",children:[x(r_,{children:x(hd,{children:e})}),ne(n_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(t_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},F4e=Pe(({feature:e,icon:t=I4e},n)=>x(B4e,{feature:e,children:x(hd,{ref:n,children:x(ga,{as:t})})}));function $4e(e){const{header:t,feature:n,options:r}=e;return ne(Df,{className:"advanced-settings-item",children:[x("h2",{children:ne(Rf,{className:"advanced-settings-header",children:[t,x(F4e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=ke(a=>a.system.openAccordions),r=Ye();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(x4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x($4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function V4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function U4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function G4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function j4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function Y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function F_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function F$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function $_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function $$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function X4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function Z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function Q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function J4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function e5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function t5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function n5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function r5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function i5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function o5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function a5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function s5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function l5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function u5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function c5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function d5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function f5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function h5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function p5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function g5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function m5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function H_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function v5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function W_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const S5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",b5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",x5e=e=>e.kind==="line",wn=e=>e.canvas,yd=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(i5),W$=ct([e=>e.options,e=>e.system,H$,Rr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(w_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),WC=Li("socketio/generateImage"),w5e=Li("socketio/runESRGAN"),C5e=Li("socketio/runFacetool"),_5e=Li("socketio/deleteImage"),VC=Li("socketio/requestImages"),WL=Li("socketio/requestNewImages"),k5e=Li("socketio/cancelProcessing"),E5e=Li("socketio/requestSystemConfig"),V$=Li("socketio/requestModelChange"),fl=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x(Da,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),pu=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(e_,{...o,children:[x(r_,{children:t}),ne(n_,{className:`invokeai__popover-content ${r}`,children:[i&&x(t_,{className:"invokeai__popover-arrow"}),n]})]})};function U$(e){const{iconButton:t=!1,...n}=e,r=Ye(),{isReady:i,reasonsWhyNotReady:o}=ke(W$),a=ke(Rr),s=()=>{r(WC(a))};mt(["ctrl+enter","meta+enter"],()=>{i&&r(WC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(l5e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(fl,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(pu,{trigger:"hover",triggerComponent:l,children:o&&x(Hz,{children:o.map((u,h)=>x(Wz,{children:u},h))})})}const P5e=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Ye(),{isProcessing:r,isConnected:i,isCancelable:o}=ke(P5e),a=()=>n(k5e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(D4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const T5e=ct(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Ye(),t=ke(T5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(c5e,{}),onClick:()=>{e(tke(!t))}})},G_=()=>ne("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),A5e=ct([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Ye(),{prompt:t,activeTabName:n}=ke(A5e),{isReady:r}=ke(W$),i=C.exports.useRef(null),o=s=>{e(fb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(WC(n)))};return x("div",{className:"prompt-bar",children:x(fd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(DF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function q$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function L5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function M5e(e,t){e.classList?e.classList.add(t):L5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function O5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},K$=le.createContext(null);var X$=function(t){return t.scrollTop},om="unmounted",bf="exited",xf="entering",Rp="entered",UC="exiting",Tu=function(e){z8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=om:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===om?{status:bf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=UC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:om})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[gy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:gy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:UC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===om)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=R8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function Ep(){}Tu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Tu.UNMOUNTED=om;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=UC;const I5e=Tu;var R5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M5e(t,r)})},dw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return O5e(t,r)})},Y_=function(e){z8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Fc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),N5e=e=>({width:Fc(e.width,64),height:Fc(e.height,64)}),D5e=.999,z5e=.1,B5e=20,Bg=.95,am={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:am,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},Q$=TS({name:"canvas",initialState:F5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!U_(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gs(st.clamp(n.width,64,512),64),height:gs(st.clamp(n.height,64,512),64)},o={x:Fc(n.width/2-i.width/2,64),y:Fc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...am,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Bg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gs(st.clamp(i,64,n/e.stageScale),64),s=gs(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=N5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},setClearBrushHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.layerState.stagingArea={...am.stagingArea},e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(x5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=am,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(i5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Bg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(i5)){const i=Pp(r.width,r.height,512,512,Bg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Bg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Bg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...am.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gs(st.clamp(o,64,512),64),height:gs(st.clamp(a,64,512),64)},l={x:Fc(o/2-s.width/2,64),y:Fc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:$5e,addLine:J$,addPointToCurrentLine:eH,clearMask:H5e,commitStagingAreaImage:W5e,discardStagedImages:V5e,fitBoundingBoxToStage:HPe,nextStagingAreaImage:U5e,prevStagingAreaImage:G5e,redo:j5e,resetCanvas:Y5e,resetCanvasInteractionState:q5e,resetCanvasView:K5e,resizeAndScaleCanvas:tH,resizeCanvas:X5e,setBoundingBoxCoordinates:fw,setBoundingBoxDimensions:sm,setBoundingBoxPreviewFill:WPe,setBrushColor:Z5e,setBrushSize:hw,setCanvasContainerDimensions:Q5e,setClearBrushHistory:J5e,setCursorPosition:nH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:qS,setIsMaskEnabled:eSe,setIsMouseOverBoundingBox:Fy,setIsMoveBoundingBoxKeyHeld:VPe,setIsMoveStageKeyHeld:UPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:pw,setLayer:qL,setMaskColor:tSe,setMergedCanvas:nSe,setShouldAutoSave:rSe,setShouldDarkenOutsideBoundingBox:rH,setShouldLockBoundingBox:iSe,setShouldPreserveMaskedArea:oSe,setShouldShowBoundingBox:iH,setShouldShowBrush:GPe,setShouldShowBrushPreview:jPe,setShouldShowCanvasDebugInfo:aSe,setShouldShowCheckboardTransparency:YPe,setShouldShowGrid:sSe,setShouldShowIntermediates:lSe,setShouldShowStagingImage:uSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:cSe,setShouldUseInpaintReplace:dSe,setStageCoordinates:oH,setStageDimensions:qPe,setStageScale:fSe,setTool:Zp,toggleShouldLockBoundingBox:KPe,toggleTool:XPe,undo:hSe}=Q$.actions,pSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,gSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K_=e=>{const t=Ye(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=ke(gSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(A0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(A0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J_e(a.current?a.current.scrollTop:0)),t(A0(!1)),t(eke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Q_e(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(Z$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,children:x("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function mSe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),vSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},ySe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),GC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=U4(),a=Ye(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ke(ySe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(_5e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return ne(Nn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(I1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Pv,{children:ne(R1e,{children:[x(q8,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(q4,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(fd,{children:ne(nn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(a_,{checked:!s,onChange:v})]})})]})}),ne(Y8,{children:[x(Da,{ref:h,onClick:o,children:"Cancel"}),x(Da,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),SSe=ct([e=>e.system,e=>e.options,e=>e.gallery,Rr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sH=()=>{const e=Ye(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=ke(SSe),m=hh(),v=()=>{!u||(h&&e(ad(!1)),e(u2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};mt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(U_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(l2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(fb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(w5e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(C5e(u))};mt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(dV(!l)),I=()=>{!u||(h&&e(ad(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ne("div",{className:"current-image-options",children:[x(Ia,{isAttached:!0,children:x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(p5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(fl,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(fl,{size:"sm",onClick:I,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(fl,{size:"sm",onClick:S,leftIcon:x($_,{}),children:"Copy Link to Image"}),x(fl,{leftIcon:x($$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(Ia,{isAttached:!0,children:[x(gt,{icon:x(u5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(h5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(Y4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(Ia,{isAttached:!0,children:[x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(e5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(jS,{}),x(fl,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(Z4e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(YS,{}),x(fl,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(GC,{image:u,children:x(gt,{icon:x(H_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},bSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},lH=TS({name:"gallery",initialState:bSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Qp,clearIntermediateImage:gw,removeImage:uH,setCurrentImage:xSe,addGalleryImages:wSe,setIntermediateImage:CSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:_Se,setShouldShowGallery:k0,setGalleryScrollPosition:kSe,setGalleryImageMinimumWidth:Ap,setGalleryImageObjectFit:ESe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:PSe,setCurrentCategory:$y,setGalleryWidth:Fg}=lH.actions,TSe=lH.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var dH=ut({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:ne(Nn,{children:[x("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function ASe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ne(nn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(ASe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),LSe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Ye();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:I}=r,R=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ne(nn,{gap:1,direction:"column",width:"100%",children:[ne(nn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ne(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Nn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(j3(E))}),i==="esrgan"&&I!==void 0&&x(qn,{label:"Upscaling scale",value:I,onClick:()=>n(v9(I))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(y9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:H3(s),onClick:()=>n(fb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(l2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:r5(u),onClick:()=>n(cV(r5(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(u2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(m9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&ne(Nn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(v9($))}),x(qn,{label:"Strength",value:W,onClick:()=>n(y9(W))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("codeformer"))}}),W&&x(qn,{label:"Fidelity",value:W,onClick:()=>{n(sV(W)),n(Y3("codeformer"))}})]},z)}})]}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x($_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(Bz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},LSe),hH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function MSe(){const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(ad(!0))};return ne("div",{className:"current-image-preview",children:[i&&x(mS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const OSe=ct([e=>e.gallery,e=>e.options,Rr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ke(OSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Nn,{children:[x(sH,{}),x(MSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(N4e,{})})})},ISe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=ke(i=>i.options.initialImage),t=Ye(),n=hh(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return ne(Nn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(ISe,{})]}),e&&x("div",{className:"init-image-preview",children:x(mS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const NSe=()=>{const e=ke(r=>r.options.initialImage),{currentImage:t}=ke(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(RSe,{})}):x(vSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function DSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var zSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},USe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],eM="__resizable_base__",gH=function(e){$Se(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(eM):o.className+=eM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||HSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return mw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?mw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?mw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Lp("left",o),s=i&&Lp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),I=Math.min(p,P),R=Math.max(m,k),N=Math.min(v,T);n=Wy(n,M,I),r=Wy(r,R,N)}else n=Wy(n,h,p),r=Wy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&WSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Vy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Vy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Vy(n)?n.touches[0].clientX:n.clientX,h=Vy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=VSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=QL(M,this.props.grid[0]),z=QL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var H=M/this.window.innerHeight*100;M=H+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var H=T/this.window.innerHeight*100;T=H+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Ol.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(FSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return USe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ne(o,{...ul({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function r2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,GSe(i,...t)]}function GSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function jSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>jSe(n,t))}function Wa(...e){return C.exports.useCallback(mH(...e),e)}const Lv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(qSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});Lv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...KSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const YSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function qSe(e){return C.exports.isValidElement(e)&&e.type===YSe}function KSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const XSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=XSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Lv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=r2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Wa(S,P.collectionRef);return le.createElement(Lv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Wa(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Lv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>P.indexOf(M.ref.current)-P.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const ZSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(ZSe);return e||t||"ltr"}function Al(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function QSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const YC="dismissableLayer.update",JSe="dismissableLayer.pointerDownOutside",ebe="dismissableLayer.focusOutside";let tM;const tbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(tbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Wa(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=k,R=rbe(z=>{const $=z.target,W=[...h.branches].some(q=>q.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=ibe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return QSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(YC,z),()=>document.removeEventListener(YC,z)},[]),C.exports.createElement(Cu.div,An({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function rbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){bH(JSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ibe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(ebe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nM(){const e=new CustomEvent(YC);document.dispatchEvent(e)}function bH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vH(i,o):i.dispatchEvent(o)}let vw=0;function obe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),vw++,()=>{vw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vw--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const yw="focusScope.autoFocusOnMount",Sw="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},abe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Al(i),h=Al(o),p=C.exports.useRef(null),m=Wa(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(yw,iM);s.addEventListener(yw,u),s.dispatchEvent(P),P.defaultPrevented||(sbe(fbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(yw,u),setTimeout(()=>{const P=new CustomEvent(Sw,iM);s.addEventListener(Sw,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(Sw,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=lbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function sbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function lbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oM(e,t){for(const n of e)if(!ube(n,{upTo:t}))return n}function ube(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cbe(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cbe(e)&&t&&e.select()}}const aM=dbe();function dbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},hbe=Rw["useId".toString()]||(()=>{});let pbe=0;function gbe(e){const[t,n]=C.exports.useState(hbe());return Y0(()=>{e||n(r=>r??String(pbe++))},[e]),e||(t?`radix-${t}`:"")}function c1(e){return e.split("-")[0]}function KS(e){return e.split("-")[1]}function d1(e){return["top","bottom"].includes(c1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=d1(t),l=J_(s),u=r[l]/2-i[l]/2,h=c1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(KS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const mbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=wH(r),h={x:i,y:o},p=d1(a),m=KS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=P/2-k/2,R=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+I,$=qC(R,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zbbe[t])}function xbe(e,t,n){n===void 0&&(n=!1);const r=KS(e),i=d1(e),o=J_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=l5(a)),{main:a,cross:l5(a)}}const wbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>wbe[t])}const Cbe=["top","right","bottom","left"];function _be(e){const t=l5(e);return[cM(e),t,cM(t)]}const kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=c1(r),P=p||(w===a||!v?[l5(a)]:_be(a)),k=[a,...P],T=await s5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=xbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var R,N;const $=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,W=k[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(H=>[H,H.overflows.filter(J=>J>0).reduce((J,re)=>J+re,0)]).sort((H,J)=>H[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return Cbe.some(t=>e[t]>=0)}const Ebe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await s5(r,{...n,elementContext:"reference"}),a=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Pbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=c1(n),s=KS(n),l=d1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Tbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Pbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Abe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=d1(c1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=qC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=qC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Lbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=d1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+E.mainAxis,N=o.reference[p]+o.reference[I]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(c1(i)),N=o.reference[m]-o.floating[I]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i2(e){return Au(e).getComputedStyle(e)}function _u(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function od(e){return e instanceof Au(e).Element}function Mbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function XS(e){const{overflow:t,overflowX:n,overflowY:r}=i2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Obe(e){return["table","td","th"].includes(_u(e))}function EH(e){const t=/firefox/i.test(kH()),n=i2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Fm=Math.max,u5=Math.round;function ku(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=od(e)?Au(e):window,p=!PH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Mbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZS(e){return od(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return ku(Sd(e)).left+ZS(e).scrollLeft}function Ibe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=ku(e,r&&Ibe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||XS(i))&&(a=ZS(t)),Ll(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Nbe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(_u(t));){if(EH(t))return t;t=t.parentNode}return null}function KC(e){const t=Au(e);let n=pM(e);for(;n&&Obe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Nbe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Dbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((_u(n)!=="body"||XS(o))&&(a=ZS(n)),Ll(n))){const l=ku(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function zbe(e,t){const n=Au(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Bbe(e){var t;const n=Sd(e),r=ZS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Fm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Fm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return i2(i||n).direction==="rtl"&&(s+=Fm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ll(t)&&XS(t)?t:LH(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],XS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function $be(e,t){const n=ku(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mM(e,t,n){return t==="viewport"?a5(zbe(e,n)):od(t)?$be(t,n):a5(Bbe(Sd(e)))}function Hbe(e){const t=c5(e),r=["absolute","fixed"].includes(i2(e).position)&&Ll(e)?KC(e):e;return od(r)?t.filter(i=>od(i)&&Fbe(i,r)&&_u(i)!=="body"):[]}function Wbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Hbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Fm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Fm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Vbe={getClippingRect:Wbe,convertOffsetParentRelativeRectToViewportRelativeRect:Dbe,isElement:od,getDimensions:gM,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,KC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>i2(e).direction==="rtl"};function Ube(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...od(e)?c5(e):[],...c5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),od(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?ku(e):null;s&&S();function S(){const w=ku(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Gbe=(e,t,n)=>mbe(e,t,{platform:Vbe,...n});var XC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jbe(e){const t=C.exports.useRef(e);return XC(()=>{t.current=e}),t}function Ybe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=jbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);ZC(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Gbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);XC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);XC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const qbe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function Kbe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const MH="Popper",[tk,OH]=r2(MH),[Xbe,IH]=tk(MH),Zbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Xbe,{scope:t,anchor:r,onAnchorChange:i},n)},Qbe="PopperAnchor",Jbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=IH(Qbe,n),a=C.exports.useRef(null),s=Wa(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,An({},i,{ref:s}))}),d5="PopperContent",[exe,ZPe]=tk(d5),[txe,nxe]=tk(d5,{hasParent:!1,positionUpdateFns:new Set}),rxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=IH(d5,h),[N,z]=C.exports.useState(null),$=Wa(t,Pt=>z(Pt)),[W,q]=C.exports.useState(null),de=Kbe(W),H=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,re=p+(v!=="center"?"-"+v:""),oe=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:oe,boundary:X.filter(oxe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Fe,middlewareData:We,update:ht}=Ybe({strategy:"fixed",placement:re,whileElementsMounted:Ube,middleware:[Tbe({mainAxis:m+J,alignmentAxis:S}),M?Abe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Lbe():void 0,...Q}):void 0,W?qbe({element:W,padding:w}):void 0,M?kbe({...Q}):void 0,axe({arrowWidth:H,arrowHeight:J}),T?Ebe({strategy:"referenceHidden"}):void 0].filter(ixe)});Y0(()=>{j(R.anchor)},[j,R.anchor]);const qe=Se!==null&&xe!==null,[rt,Ze]=RH(Fe),Xe=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();Y0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=nxe(d5,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(ht),()=>{lt.delete(ht)}},[xt,lt,ht]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,qe,lt]);const _n={"data-side":rt,"data-align":Ze,...I,ref:$,style:{...I.style,animation:qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(exe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Xe,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(txe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(Cu.div,_n)):C.exports.createElement(Cu.div,_n)))});function ixe(e){return e!==void 0}function oxe(e){return e!==null}const axe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=RH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function RH(e){const[t,n="center"]=e.split("-");return[t,n]}const sxe=Zbe,lxe=Jbe,uxe=rxe;function cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=dxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Wa(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function dxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Gy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Gy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Gy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Gy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Gy(e){return e?.animationName||"none"}function fxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=hxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function hxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const bw="rovingFocusGroup.onEntryFocus",pxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[QC,DH,gxe]=yH(nk),[mxe,zH]=r2(nk,[gxe]),[vxe,yxe]=mxe(nk),Sxe=C.exports.forwardRef((e,t)=>C.exports.createElement(QC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(QC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(bxe,An({},e,{ref:t}))))),bxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Wa(t,p),v=SH(o),[S=null,w]=fxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(bw,k),()=>N.removeEventListener(bw,k)},[k]),C.exports.createElement(vxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,An({tabIndex:E||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(bw,pxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),q=W.find(re=>re.active),de=W.find(re=>re.id===S),J=[q,de,...W].filter(Boolean).map(re=>re.ref.current);BH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),xxe="RovingFocusGroupItem",wxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=gbe(),s=yxe(xxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(QC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Exe(w,E+1):w.slice(E+1)}setTimeout(()=>BH(w))}})})))}),Cxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _xe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kxe(e,t,n){const r=_xe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Cxe[r]}function BH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Exe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Pxe=Sxe,Txe=wxe,Axe=["Enter"," "],Lxe=["ArrowDown","PageUp","Home"],FH=["ArrowUp","PageDown","End"],Mxe=[...Lxe,...FH],QS="Menu",[JC,Oxe,Ixe]=yH(QS),[ph,$H]=r2(QS,[Ixe,OH,zH]),rk=OH(),HH=zH(),[Rxe,JS]=ph(QS),[Nxe,ik]=ph(QS),Dxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(sxe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Nxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(lxe,An({},i,r,{ref:t}))}),Bxe="MenuPortal",[QPe,Fxe]=ph(Bxe,{forceMount:void 0}),Zc="MenuContent",[$xe,WH]=ph(Zc),Hxe=C.exports.forwardRef((e,t)=>{const n=Fxe(Zc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=JS(Zc,e.__scopeMenu),a=ik(Zc,e.__scopeMenu);return C.exports.createElement(JC.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(JC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Wxe,An({},i,{ref:t})):C.exports.createElement(Vxe,An({},i,{ref:t})))))}),Wxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu),r=C.exports.useRef(null),i=Wa(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Vxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=JS(Zc,n),E=ik(Zc,n),P=rk(n),k=HH(n),T=Oxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Wa(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),H=C.exports.useRef(0),J=v?oF:C.exports.Fragment,re=v?{as:Lv,allowPinchZoom:!0}:void 0,oe=G=>{var Q,j;const Z=$.current+G,me=T().filter(qe=>!qe.disabled),Se=document.activeElement,xe=(Q=me.find(qe=>qe.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Fe=me.map(qe=>qe.textValue),We=Qxe(Fe,Z,xe),ht=(j=me.find(qe=>qe.textValue===We))===null||j===void 0?void 0:j.ref.current;(function qe(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(Z),ht&&setTimeout(()=>ht.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),obe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&ewe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement($xe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=R.current)===null||Q===void 0||Q.focus(),I(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,re,C.exports.createElement(abe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=R.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(nbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Pxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(uxe,An({role:"menu","aria-orientation":"vertical","data-state":Kxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&oe(G.key));const Se=R.current;if(G.target!==Se||!Mxe.includes(G.key))return;G.preventDefault();const Fe=T().filter(We=>!We.disabled).map(We=>We.ref.current);FH.includes(G.key)&&Fe.reverse(),Xxe(Fe)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,t9(G=>{const Q=G.target,j=H.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>H.current?"right":"left";de.current=Z,H.current=G.clientX}}))})))))))}),e9="MenuItem",vM="menu.itemSelect",Uxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(e9,e.__scopeMenu),s=WH(e9,e.__scopeMenu),l=Wa(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Gxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Axe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Gxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(e9,n),s=HH(n),l=C.exports.useRef(null),u=Wa(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(JC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Txe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,t9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,t9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),jxe="MenuRadioGroup";ph(jxe,{value:void 0,onValueChange:()=>{}});const Yxe="MenuItemIndicator";ph(Yxe,{checked:!1});const qxe="MenuSub";ph(qxe);function Kxe(e){return e?"open":"closed"}function Xxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qxe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Zxe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Jxe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function ewe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jxe(n,t)}function t9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const twe=Dxe,nwe=zxe,rwe=Hxe,iwe=Uxe,UH="ContextMenu",[owe,JPe]=r2(UH,[$H]),eb=$H(),[awe,GH]=owe(UH),swe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=eb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(awe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(twe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},lwe="ContextMenuTrigger",uwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(lwe,n),o=eb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(nwe,An({},o,{virtualRef:s})),C.exports.createElement(Cu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,jy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,jy(u)),onPointerCancel:Yn(e.onPointerCancel,jy(u)),onPointerUp:Yn(e.onPointerUp,jy(u))})))}),cwe="ContextMenuContent",dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(cwe,n),o=eb(n),a=C.exports.useRef(!1);return C.exports.createElement(rwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),fwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eb(n);return C.exports.createElement(iwe,An({},i,r,{ref:t}))});function jy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const hwe=swe,pwe=uwe,gwe=dwe,pf=fwe,mwe=ct([e=>e.gallery,e=>e.options,yd,Rr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=ct([e=>e.options,e=>e.gallery,e=>e.system,Rr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),ywe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Swe=C.exports.memo(e=>{const t=Ye(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=ke(vwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=hh(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(fb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(l2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ad(!1)),t(u2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ad(!1)),t(q_(s)),t(tH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(K_e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(X_e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(hwe,{onOpenChange:$=>{t(cH($))},children:[x(pwe,{children:ne(hd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(xSe(s)),children:l&&x(ga,{width:"50%",height:"50%",as:F_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(GC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(m5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(gwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(GC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},ywe),bwe=320;function jH(){const e=Ye(),t=hh(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=ke(mwe),[k,T]=C.exports.useState(300),[M,I]=C.exports.useState(590),[R,N]=C.exports.useState(w>=bwe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Fg(400)),T(400),I(400);return}h==="unifiedCanvas"?(e(Fg(190)),T(190),I(190)):h==="img2img"?(e(Fg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Fg(Math.min(Math.max(Number(w),0),590))),I(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||I(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),W=C.exports.useRef(null),q=()=>{e(_Se(!o)),e(io(!0))},de=()=>{a?J():H()},H=()=>{e(k0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(k0(!1)),e(cH(!1)),e(kSe($.current?$.current.scrollTop:0))},[e]),re=()=>{e(VC(r))},oe=j=>{e(Ap(j)),e(io(!0))},X=()=>{m||(W.current=window.setTimeout(()=>J(),500))},G=()=>{W.current&&window.clearTimeout(W.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(k0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ne(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Fg(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=280&&!R?N(!0):xe<280&&R&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[ne("div",{className:"image-gallery-header",children:[x(Ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ne(Nn,{children:[x(Da,{"data-selected":r==="result",onClick:()=>e($y("result")),children:"Invocations"}),x(Da,{"data-selected":r==="user",onClick:()=>e($y("user")),children:"User"})]}):ne(Nn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(t5e,{}),onClick:()=>e($y("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(y5e,{}),onClick:()=>e($y("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(pu,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(n2,{value:l,onChange:oe,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Ap(64)),icon:x(A_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(ta,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(ESe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(ta,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(PSe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?ne(Nn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(Swe,{image:j,isSelected:i===Z},Z)})}),x(Da,{onClick:re,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(D$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const xwe=ct([e=>e.options,Rr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ok=e=>{const t=Ye(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=ke(xwe),l=()=>{t(Z_e(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,s&&x(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(DSe,{})})})]}),!a&&x(jH,{})]})})};function wwe(){return x(ok,{optionsPanel:x(mSe,{}),children:x(NSe,{})})}function Cwe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const _we=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function kwe(){return x(ok,{optionsPanel:x(Cwe,{}),children:x(_we,{})})}var n9=function(e,t){return n9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},n9(e,t)};function Ewe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Wwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Wwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Vwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Uwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ak=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Vwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Uwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function tb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=r9(e,s-p,u+p,r),S=r9(t,l-m,h+m,r);return{x:v,y:S}}var r9=function(e,t,n,r){return r?en?Ra(n,2):Ra(e,2):Ra(e,2)};function nb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=tb(p,m,i,o,0,0,null);return v}function o2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var SM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=rb(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Gwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},jwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Ywe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=nb(e,P,k,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:E?I:r}}}function qwe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=tb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var Kwe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},f5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},Xwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Zwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Qwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:r9(e,o,a,i)}function Jwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function e6e(e,t){var n=Xwe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=Jwe(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function t6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Zwe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=Qwe(e,l),$=Math.max(z,N),W=f5(e,M),q=f5(e,I),de=W*i.offsetWidth/100,H=q*i.offsetHeight/100,J=u+de,re=h-de,oe=p+H,X=m-H,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Fe=new Date().getTime()-Q,We=Fe/N,ht=YH[S.animationType],qe=1-ht(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Xe=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,re,J,qe),bt=xM(Xe,G.positionY,xe,P,v,m,p,X,oe,qe);(Se!==Ze||xe!==Xe)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),q0(e,n),t.touches?jwe(e,t):Gwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=Kwe(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);e6e(e,{x:u,y:h}),qwe(e,u,h,p,m)}}function n6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?t6e(e):XH(e)}}function XH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=o2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=nb(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Jp={previousScale:1,scale:1,positionX:0,positionY:0},r6e=El(El({},Jp),{setComponents:function(){},contextInstance:null}),$g={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Jp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Jp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Jp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Jp.positionY}},_M=function(e){var t=El({},$g);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof $g[n]<"u";if(i&&r){var o=Object.prototype.toString.call($g[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},$g[n]),e[n]):s?t[n]=yM(yM([],$g[n]),e[n]):t[n]=e[n]}}),t},JH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=o2(Ra(h,3),s,a,u,!1);return p};function eW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=tb(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||bd(e,v,t,n)}}function i6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Jp;var l=r.getBoundingClientRect(),u=o6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=o2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,I=ak(e,E),R=tb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function o6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function a6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},l6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},u6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};bd(e,v,i,o)}}},c6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},d6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=nW(t||i.scale,o,a);bd(e,s,n,r)}}},f6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&a6e(a)&&a&&o.contains(a)){var s=i6e(e,a,n);bd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:s6e(e),zoomOut:l6e(e),setTransform:u6e(e),resetTransform:c6e(e),centerView:d6e(e),zoomToElement:f6e(e)}},xw=!1;function ww(){try{var e={get passive(){return xw=!0,!1}};return e}catch{return xw=!1,xw}}var rb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},kM=function(e){e&&clearTimeout(e)},h6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},p6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=rb(u,a);return!p};function g6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Pwe(t,n);return r}function rW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var m6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=o2(Ra(v,3),u,l,p,S);return w},v6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},y6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=rb(a,i);return!l},S6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},b6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},x6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return o2(Ra(p,2),a,o,l,!u)},w6e=160,C6e=100,_6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),li(Fr(e),t,r),li(Fr(e),t,i))},k6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=g6e(t,null),P=m6e(e,E,w,!t.ctrlKey);if(l!==P){var k=q0(e,P),T=rW(t,o,l),M=S||v===0||h,I=u&&M,R=nb(e,T.x,T.y,P,k,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),li(Fr(e),t,r),li(Fr(e),t,i)}},E6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},C6e);var o=v6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,li(Fr(e),t,r),li(Fr(e),t,i))},w6e))},P6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},T6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=b6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=x6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,E=a&&w,P=nb(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},A6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function L6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var M6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=rb(l,s);return!(p||!h)},oW=le.createContext(r6e),O6e=function(e){Ewe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=p6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(_6e(n,r),k6e(n,r),E6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),li(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),li(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(n6e(n),li(Fr(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=y6e(n,r);!l||(P6e(n,r),ml(n),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=S6e(n);!l||(r.preventDefault(),r.stopPropagation(),T6e(n,r),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(A6e(n),li(Fr(n),r,o),li(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),li(Fr(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),li(Fr(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=M6e(n,r);!o||L6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,li(Fr(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=nW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=h6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),I6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(O6e,{...El({},e,{setRef:i})})});function R6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var N6e=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(N6e);var D6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(oW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function z6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(I6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Nn,{children:[ne("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(X3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(Z3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(q3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(R4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(A_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(D6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function B6e(){const e=Ye(),t=ke(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(ad(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ad(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Nn,{children:[x(z6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=ct(wn,e=>e.shouldDarkenOutsideBoundingBox);function $6e(){const e=Ye(),t=ke(F6e);return x(ta,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(rH(!t))},styleClass:"inpainting-bounding-box-darken"})}const H6e=ct(wn,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function PM(e){const{dimension:t,label:n}=e,r=Ye(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=ke(H6e),s=o[t],l=a[t],u=p=>{t=="width"&&r(sm({...a,width:Math.floor(p)})),t=="height"&&r(sm({...a,height:Math.floor(p)}))},h=()=>{t=="width"&&r(sm({...a,width:Math.floor(s)})),t=="height"&&r(sm({...a,height:Math.floor(s)}))};return x(n2,{label:n,min:64,max:gs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const W6e=ct(wn,e=>e.shouldLockBoundingBox);function V6e(){const e=ke(W6e),t=Ye();return x(ta,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(iSe(!e))},styleClass:"inpainting-bounding-box-darken"})}const U6e=ct(wn,e=>e.shouldShowBoundingBox);function G6e(){const e=ke(U6e),t=Ye();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(K3e,{size:22}):x(j3e,{size:22}),onClick:()=>t(iH(!e)),background:"none",padding:0})}const j6e=()=>ne("div",{className:"inpainting-bounding-box-settings",children:[ne("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(G6e,{})]}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(PM,{dimension:"width",label:"Box W"}),x(PM,{dimension:"height",label:"Box H"}),ne(nn,{alignItems:"center",justifyContent:"space-between",children:[x($6e,{}),x(V6e,{})]})]})]}),Y6e=ct(wn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=ke(Y6e),n=Ye();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(n2,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(ks,{isChecked:t,onChange:r=>n(dSe(r.target.checked))})]})}const K6e=ct(wn,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function X6e(){const e=Ye(),t=hh(),{mayClearBrushHistory:n}=ke(K6e);return x(fl,{onClick:()=>{e(J5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function Z6e(){return ne(Nn,{children:[x(q6e,{}),x(j6e,{}),x(X6e,{})]})}function Q6e(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Z6e,{}),x(N_,{}),e&&x(B_,{accordionInfo:t})]})}const J6e=ct(wn,H$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),eCe=()=>{const e=Ye(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ke(J6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Q5e({width:a,height:s})),e(X5e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Kv,{thickness:"2px",speed:"1s",size:"xl"})})};var tCe=Math.PI/180;function nCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const E0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:E0,version:"8.3.13",isBrowser:nCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*tCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:E0.document,_injectGlobal(e){E0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ra{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ra(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var rCe="[object Array]",iCe="[object Number]",oCe="[object String]",aCe="[object Boolean]",sCe=Math.PI/180,lCe=180/Math.PI,Cw="#",uCe="",cCe="0",dCe="Konva warning: ",TM="Konva error: ",fCe="rgb(",_w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},hCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Yy=[];const pCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===rCe},_isNumber(e){return Object.prototype.toString.call(e)===iCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===oCe},_isBoolean(e){return Object.prototype.toString.call(e)===aCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Yy.push(e),Yy.length===1&&pCe(function(){const t=Yy;Yy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Cw,uCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=cCe+e;return Cw+e},getRGB(e){var t;return e in _w?(t=_w[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Cw?this._hexToRgb(e.substring(1)):e.substr(0,4)===fCe?(t=hCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_w[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function f1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function gCe(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function mCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Wg="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Hg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Wg+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Wg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Hg+a(t),l=Wg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Wg+n,i=Hg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Hg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Wg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function vCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=yCe+u.join(AM)+SCe)):(o+=s.property,t||(o+=_Ce+s.val)),o+=wCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=ECe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=LM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=vCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var V3="absoluteOpacity",Ky="allEventListeners",ou="absoluteTransform",MM="absoluteScale",Vg="canvas",LCe="Change",MCe="children",OCe="konva",i9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",U3=" ",DM="stage",kc="transform",ICe="Stage",o9="visible",RCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(U3);let NCe=1;class Be{constructor(t){this._id=NCe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ou)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ou,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(U3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Vg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Vg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new P0({pixelRatio:a,width:i,height:o}),v=new P0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Vg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(V3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Vg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Vg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==MCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==ICe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ou)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ra,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ou),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(V3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Mp=e=>{const t=dm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Ew.pointer;if(t==="touch")return Ew.touch;if(t==="mouse")return Ew.mouse};function BM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const WCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",G3=[];class ab extends la{constructor(t){super(BM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),G3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{BM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===zCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&G3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(WCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new P0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+zM,this.content.style.height=n+zM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r$Ce&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Mp(t.type),r=dm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=kw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Mp(t.type),r=dm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=kw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a9,{evt:t}):this._fire(a9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s9,{evt:t}):this._fire(s9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=kw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(e0,ck(t)),$m(t.pointerId)}_lostpointercapture(t){$m(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new P0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ab.prototype.nodeType=DCe;pr(ab);K.addGetterSetter(ab,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let e3;function Pw(){return e3||(e3=fe.createCanvasElement().getContext("2d"),e3)}const Hm={};function VCe(e){e.fill()}function UCe(e){e.stroke()}function GCe(e){e.fill()}function jCe(e){e.stroke()}function YCe(){this._clearCache(wW)}function qCe(){this._clearCache(CW)}function KCe(){this._clearCache(_W)}function XCe(){this._clearCache(kW)}function ZCe(){this._clearCache(EW)}class Me extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Hm)););this.colorKey=n,Hm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Pw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ra;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Pw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Hm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}}Me.prototype._fillFunc=VCe;Me.prototype._strokeFunc=UCe;Me.prototype._fillFuncHit=GCe;Me.prototype._strokeFuncHit=jCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",YCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",KCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",XCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",ZCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,f1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var QCe="#",JCe="beforeDraw",e9e="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],t9e=PW.length;class gh extends la{constructor(t){super(t),this.canvas=new P0,this.hitCanvas=new uk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(JCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),la.prototype.drawScene.call(this,i,n),this._fire(e9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),la.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);K.addGetterSetter(gh,"imageSmoothingEnabled",!0);K.addGetterSetter(gh,"clearBeforeDraw",!0);K.addGetterSetter(gh,"hitGraphEnabled",!0,As());class dk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class K0 extends la{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Tw=function(){return E0.performance&&E0.performance.now?function(){return E0.performance.now()}:function(){return new Date().getTime()}}();class Ma{constructor(t,n){this.id=Ma.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Tw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=FM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$M,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===FM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=r9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Wm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=i9e++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ma(function(){n.tween.onEnterFrame()},u),this.tween=new o9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)n9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Wm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function l9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function WM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Rn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Rn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,Rn.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,I=u,R,N,z,$,W,q,de,H,J,re;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var oe=S.shift(),X=S.shift();if(l+=oe,u+=X,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+oe,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break;case"a":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break}a.push({command:k||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Rn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,q){return(W[0]*q[0]+W[1]*q[1])/(T(W)*T(q))},I=function(W,q){return(W[0]*q[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];pr(Rn);K.addGetterSetter(Rn,"data");class mh extends Mu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Rn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);K.addGetterSetter(mh,"pointerLength",10,ze());K.addGetterSetter(mh,"pointerWidth",10,ze());K.addGetterSetter(mh,"pointerAtBeginning",!1);K.addGetterSetter(mh,"pointerAtEnding",!0);class h1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}h1.prototype._centroid=!0;h1.prototype.className="Circle";h1.prototype._attrsAffectingSize=["radius"];pr(h1);K.addGetterSetter(h1,"radius",0,ze());class wd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],a9e="Change.konva",s9e="none",u9="up",c9="right",d9="down",f9="left",l9e=TW.length;class fk extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);K.addGetterSetter(yh,"radius",0,ze());K.addGetterSetter(yh,"sides",0,ze());var VM=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,VM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),VM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);K.addGetterSetter(Sh,"innerRadius",0,ze());K.addGetterSetter(Sh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ma(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var n3;function Lw(){return n3||(n3=fe.createCanvasElement().getContext(d9e),n3)}function w9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function C9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(_9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(f9e,n),this}getWidth(){var t=this.attrs.width===Op||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Op||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Lw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+t3+this.fontVariant()+t3+(this.fontSize()+m9e)+x9e(this.fontFamily())}_addTextLine(t){this.align()===Ug&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Lw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Op&&o!==void 0,l=a!==Op&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==S9e&&S,E=this.ellipsis();this.textArr=[],Lw().font=this._getContextFont();for(var P=E?this._getTextWidth(Aw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",$=0;R>>1,q=M.slice(0,W+1),de=this._getTextWidth(q)+P;de<=h?(R=W+1,z=q,$=de):N=W}if(z){if(w){var H,J=M[z.length],re=J===t3||J===UM;re&&$<=h?H=z.length:H=Math.max(z.lastIndexOf(t3),z.lastIndexOf(UM))+1,H>0&&(R=H,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var oe=this._shouldHandleEllipsis(m);if(oe){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&kp)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Op&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==jM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Op&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Aw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,H=w+1;H0)return w=H,de[H];de[H].command==="M"&&(m={x:de[H].points[0],y:de[H].points[1]})}return{}},k=function(de){var H=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(H+=(s-a)/p);var J=0,re=0;for(v=void 0;Math.abs(H-J)/H>.01&&re<20;){re++;for(var oe=J;S===void 0;)S=P(),S&&oe+S.pathLengthH?v=Rn.getPointOnLine(H,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:H>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E=0&&E>j)&&(E=j,X=!0),v=Rn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?H>S.pathLength?E=1e-8:E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength/2:E=Math.max(E-(J-H)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=Rn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength:E-=(J-H)/S.pathLength,E>1&&(E=1,X=!0),v=Rn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=Rn.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${DW}`).join(" "),YM="nodesRect",P9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],T9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const A9e="ontouchstart"in ot._global;function L9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(T9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var h5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],qM=1e8;function M9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function zW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function O9e(e,t){const n=M9e(e);return zW(e,t,n)}function I9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(P9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(YM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(YM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return zW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-qM,y:-qM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ra;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),h5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new a2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:A9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=L9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const H=m+de,J=ot.getAngle(this.rotationSnapTolerance()),oe=I9e(this.rotationSnaps(),H,J)-p.rotation,X=O9e(p,oe);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ra;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ra;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ra;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ra;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function R9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){h5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+h5.join(", "))}),e||[]}Cn.prototype.className="Transformer";pr(Cn);K.addGetterSetter(Cn,"enabledAnchors",h5,R9e);K.addGetterSetter(Cn,"flipEnabled",!0,As());K.addGetterSetter(Cn,"resizeEnabled",!0);K.addGetterSetter(Cn,"anchorSize",10,ze());K.addGetterSetter(Cn,"rotateEnabled",!0);K.addGetterSetter(Cn,"rotationSnaps",[]);K.addGetterSetter(Cn,"rotateAnchorOffset",50,ze());K.addGetterSetter(Cn,"rotationSnapTolerance",5,ze());K.addGetterSetter(Cn,"borderEnabled",!0);K.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"anchorStrokeWidth",1,ze());K.addGetterSetter(Cn,"anchorFill","white");K.addGetterSetter(Cn,"anchorCornerRadius",0,ze());K.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"borderStrokeWidth",1,ze());K.addGetterSetter(Cn,"borderDash");K.addGetterSetter(Cn,"keepRatio",!0);K.addGetterSetter(Cn,"centeredScaling",!1);K.addGetterSetter(Cn,"ignoreStroke",!1);K.addGetterSetter(Cn,"padding",0,ze());K.addGetterSetter(Cn,"node");K.addGetterSetter(Cn,"nodes");K.addGetterSetter(Cn,"boundBoxFunc");K.addGetterSetter(Cn,"anchorDragBoundFunc");K.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(Cn,"useSingleNodeRotation",!0);K.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var N9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],D9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function z9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,I,R,N,z,$,W,q,de,H=t+t+1,J=r-1,re=i-1,oe=t+1,X=oe*(oe+1)/2,G=new KM,Q=null,j=G,Z=null,me=null,Se=N9e[t],xe=D9e[t];for(s=1;s>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+oe)0&&z9e(t,n)};K.addGetterSetter(Be,"blurRadius",0,ze(),K.afterSetFilter);const F9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};K.addGetterSetter(Be,"contrast",0,ze(),K.afterSetFilter);const H9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],I=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,$=I>0?I:-I;if(z>N&&(R=M),$>N&&(R=I),R*=t,i){var W=s[E]+R,q=s[E+1]+R,de=s[E+2]+R;s[E]=W>255?255:W<0?0:W,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var H=n-R;H<0?H=0:H>255&&(H=255),s[E]=s[E+1]=s[E+2]=H}}while(--w)}while(--p)};K.addGetterSetter(Be,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Be,"embossBlend",!1,null,K.afterSetFilter);function Mw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const W9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,I,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?k:T;var M=a,I=o,R,N,z=n.polarRotation||0,$,W;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function t7e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};K.addGetterSetter(Be,"pixelSize",8,ze(),K.afterSetFilter);const o7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);const s7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const l7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},c7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[V]!==O[se]){var he=` -`+A[V].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=V&&0<=se);break}}}finally{Rs=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var _h=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function En(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ya(){En(Ur),En(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Fl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Fl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,En(Ur),En(Cr),vn(Cr,d)):En(Ur),vn(Ur,y)}var pi=Math.clz32?Math.clz32:Ad,kh=Math.log,Eh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var zs=64,uo=4194304;function Bs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,V=y&268435455;if(V!==0){var se=V&~A;se!==0?_=Bs(se):(O&=V,O!==0&&(_=Bs(O)))}else V=y&~A,V!==0?_=Bs(V):O!==0&&(_=Bs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function va(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-pi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=V,A-=V,Ui=1<<32-pi(f)+A|y<Ft?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Ft],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Ft===ye.length)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;FtFt?(zr=kt,kt=null):zr=kt.sibling;var rs=je(ge,kt,Yt.value,He);if(rs===null){kt===null&&(kt=zr);break}d&&kt&&rs.alternate===null&&f(ge,kt),ue=O(rs,ue,Ft),Lt===null?Te=rs:Lt.sibling=rs,Lt=rs,kt=zr}if(Yt.done)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;!Yt.done;Ft++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return zn&&Fs(ge,Ft),Te}for(kt=_(ge,kt);!Yt.done;Ft++,Yt=ye.next())Yt=Fn(kt,ge,Ft,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Ft:Yt.key),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(ai){return f(ge,ai)}),zn&&Fs(ge,Ft),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&z1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=ba(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=ba(ge,ue,ye),He.return=ge,ge=He)}return V(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return V(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(re(ye))return Pn(ge,ue,ye,He);if(R(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=hp(ye,ge.mode,He),ue.return=ge,ge=ue),V(ge)):y(ge,ue)}return qo}var Yu=S2(!0),b2=S2(!1),Wd={},po=No(Wd),xa=No(Wd),ie=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(ie,f),vn(xa,d),vn(po,Wd),d=X(f),En(po),vn(po,d)}function Ge(){En(po),En(xa),En(ie)}function _t(d){var f=be(ie.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(xa,d),vn(po,f))}function Qt(d){xa.current===d&&(En(po),En(xa))}var It=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ru(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function B1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return vi().memoizedState}function j1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=oi();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var V=f.lastRenderedState,se=O(V,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,V)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=oi(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Za={readContext:Gi,useCallback:ti,useContext:ti,useEffect:ti,useImperativeHandle:ti,useInsertionEffect:ti,useLayoutEffect:ti,useMemo:ti,useReducer:ti,useRef:ti,useState:ti,useDebugValue:ti,useDeferredValue:ti,useTransition:ti,useMutableSource:ti,useSyncExternalStore:ti,useId:ti,unstable_isNewReconciler:!1},pb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:C2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=j1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:w2,useDebugValue:V1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=w2(!1),f=d[0];return d=G1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||W1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,C2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(zn){var y=ya,_=Ui;y=(_&~(1<<32-pi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0rp&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!zn)return ni(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,vn(It,_?d&1|2:d&1),f):(ni(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ni(f),Xe&&f.subtreeFlags&6&&(f.flags|=8192)):ni(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function eg(d,f){switch(I1(f),f.tag){case 1:return Gr(f.type)&&Ya(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Ur),En(Cr),B1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(It),null;case 4:return Ge(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,bb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Uh=!1;function Yl(d,f){for(Q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,V=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=V}break;case 3:Xe&&Ms(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ri(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==_)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=oe(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function tg(d){var f=d.alternate;f!==null&&(d.alternate=null,tg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&<(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function uc(d){return d.tag===5||d.tag===3||d.tag===4}function Ja(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function ng(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(ng(d,f,y),d=d.sibling;d!==null;)ng(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Xe){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):pt(yr,y.stateNode))}else jo(d,f,y);break;case 18:Xe&&yr!==null&&(Go?T1(yr,y.stateNode):P1(yr,y.stateNode));break;case 4:Xe?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=ma(_),Iu(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,V=O.destroy;O=O.tag,V!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,V),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new bb),f.forEach(function(_){var A=H2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Qh:return":has("+(og(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_A&&(A=V),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*xb(_/1960))-_,10<_){d.timeoutHandle=ht(Qs.bind(null,d,Si,ts),_);break}Qs(d,Si,ts);break;case 5:Qs(d,Si,ts);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?ap.bind(null,d):null}function sp(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=Si,Si=y,f!==null&&lp(f)),d}function lp(d){Si===null?Si=d:Si.push.apply(Si,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,V=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;heWn()-lg?Xs(d,0):sg|=y),Kr(d,f)}function hg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=oi();d=$o(d,f),d!==null&&(va(d,f,y),Kr(d,y))}function Cb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),hg(d,y)}function H2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),hg(d,y)}var pg;pg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,yb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,zn&&(f.flags&1048576)!==0&&O1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;wa(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=$1(null,f,_,d,A,y);var O=Xu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(O=!0,qa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,N1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,D1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,zn&&O&&gi(f),yi(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(wa(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=dp(_),d=Fo(_,d),A){case 0:f=K1(null,f,_,d,y);break e;case 1:f=O2(null,f,_,d,y);break e;case 11:f=T2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),K1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),O2(d,f,_,A,y);case 3:e:{if(I2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,g2(d,f),Nh(f,_,null,y);var V=f.memoizedState;if(_=V.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=R2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=R2(d,f,_,y,A);break e}else for(bt&&(fo=b1(f.stateNode.containerInfo),Vn=f,zn=!0,Ri=null,ho=!1),y=b2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Qa(d,f,y);break e}yi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Rd(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,V=A.children,Fe(_,A)?V=null:O!==null&&Fe(_,O)&&(f.flags|=32),M2(d,f),yi(d,f,V,y),f.child;case 6:return d===null&&Rd(f),null;case 13:return N2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):yi(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),T2(d,f,_,A,y);case 7:return yi(d,f,f.pendingProps,y),f.child;case 8:return yi(d,f,f.pendingProps.children,y),f.child;case 12:return yi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,V=A.value,p2(f,_,V),O!==null)if(U(O.value,V)){if(O.children===A.children&&!Ur.current){f=Qa(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){V=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Xa(-1,y&-y),he.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var et=Re.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Re.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Fd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)V=O.type===f.type?null:O.child;else if(O.tag===18){if(V=O.return,V===null)throw Error(a(341));V.lanes|=y,se=V.alternate,se!==null&&(se.lanes|=y),Fd(V,y,f),V=O.sibling}else V=O.child;if(V!==null)V.return=O;else for(V=O;V!==null;){if(V===f){V=null;break}if(O=V.sibling,O!==null){O.return=V.return,V=O;break}V=V.return}O=V}yi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,yi(d,f,_,y),f.child;case 14:return _=f.type,A=Fo(_,f.pendingProps),A=Fo(_.type,A),Vs(d,f,_,A,y);case 15:return A2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),wa(d,f),f.tag=1,Gr(_)?(d=!0,qa(f)):d=!1,Gu(f,y),v2(f,_,A),D1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return z2(d,f,y);case 22:return L2(d,f,y)}throw Error(a(156,f.tag))};function xi(d,f){return $u(d,f)}function Ca(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ca(d,f,y,_)}function gg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return gg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,A,O){var V=2;if(_=d,typeof d=="function")gg(d)&&(V=1);else if(typeof d=="string")V=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:V=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:V=10;break e;case S:V=9;break e;case w:V=11;break e;case k:V=14;break e;case T:V=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(V,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function fp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function el(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fu(0),this.expirationTimes=Fu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function W2(d,f,y,_,A,O,V,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},N1(O),d}function mg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Fl(d,y,f)}return f}function vg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&O>=At&&A<=et&&V<=je){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||jeV){if(!(O!==At||y.height!==he.height||et<_||Re>A)){Re>_&&(he.width+=Re-_,he.x=_),etO&&(he.height+=At-O,he.y=O),jey&&(y=V)),V ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return oe(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||yg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ag(d,f);var A=jt(d,y,_).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=oi(),V=Tr(A);return y=mg(y),f.context===null?f.context=y:f.pendingContext=y,f=Xa(O,V),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,V),d!==null&&(vo(d,A,V,O),Rh(d,A,V)),V},n};(function(e){e.exports=d7e})(BW);const f7e=M9(BW.exports);var hk={exports:{}},bh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(hk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const pk=".react-konva-event",h7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,p7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,g7e={};function sb(e,t,n=g7e){if(!ZM&&"zIndex"in t&&(console.warn(p7e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(h7e),QM=!0)}for(var o in n)if(!XM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!XM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const FW={},m7e={};nh.Node.prototype._applyProps=sb;function v7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function y7e(e,t,n){let r=nh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=nh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return sb(l,o),l}function S7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function b7e(e,t,n){return!1}function x7e(e){return e}function w7e(){return null}function C7e(){return null}function _7e(e,t,n,r){return m7e}function k7e(){}function E7e(e){}function P7e(e,t){return!1}function T7e(){return FW}function A7e(){return FW}const L7e=setTimeout,M7e=clearTimeout,O7e=-1;function I7e(e,t){return!1}const R7e=!1,N7e=!0,D7e=!0;function z7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function B7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function F7e(e,t,n){$W(e,t,n)}function $7e(e,t){t.destroy(),t.off(pk),_d(e)}function H7e(e,t){t.destroy(),t.off(pk),_d(e)}function W7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function V7e(e,t,n){}function U7e(e,t,n,r,i){sb(e,i,r)}function G7e(e){e.hide(),_d(e)}function j7e(e){}function Y7e(e,t){(t.visible==null||t.visible)&&e.show()}function q7e(e,t){}function K7e(e){}function X7e(){}const Z7e=()=>hk.exports.DefaultEventPriority,Q7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:v7e,createInstance:y7e,createTextInstance:S7e,finalizeInitialChildren:b7e,getPublicInstance:x7e,prepareForCommit:w7e,preparePortalMount:C7e,prepareUpdate:_7e,resetAfterCommit:k7e,resetTextContent:E7e,shouldDeprioritizeSubtree:P7e,getRootHostContext:T7e,getChildHostContext:A7e,scheduleTimeout:L7e,cancelTimeout:M7e,noTimeout:O7e,shouldSetTextContent:I7e,isPrimaryRenderer:R7e,warnsIfNotActing:N7e,supportsMutation:D7e,appendChild:z7e,appendChildToContainer:B7e,insertBefore:$W,insertInContainerBefore:F7e,removeChild:$7e,removeChildFromContainer:H7e,commitTextUpdate:W7e,commitMount:V7e,commitUpdate:U7e,hideInstance:G7e,hideTextInstance:j7e,unhideInstance:Y7e,unhideTextInstance:q7e,clearContainer:K7e,detachDeletedInstance:X7e,getCurrentEventPriority:Z7e,now:n0.exports.unstable_now,idlePriority:n0.exports.unstable_IdlePriority,run:n0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var J7e=Object.defineProperty,e8e=Object.defineProperties,t8e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,n8e=Object.prototype.hasOwnProperty,r8e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?J7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))n8e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))r8e.call(t,n)&&eO(e,n,t[n]);return e},i8e=(e,t)=>e8e(e,t8e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:o8e,ReactCurrentDispatcher:a8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s8e(){const e=C.exports.useContext(mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=o8e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Yg=[],nO=new WeakMap;function l8e(){var e;const t=s8e();Yg.splice(0,Yg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Yg.push(HW(i))});for(const n of Yg){const r=(e=a8e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>Yg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,i8e(tO({},i),{value:nO.get(r)}))),n=>x(WW,{...tO({},n)})),[])}function u8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const c8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=u8e(e),o=l8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=fm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),fm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),fm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sb(n.current,e,i),fm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},i3="Layer",rh="Group",T0="Rect",qg="Circle",p5="Line",VW="Image",d8e="Transformer",fm=f7e(Q7e);fm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const f8e=le.forwardRef((e,t)=>x(WW,{children:x(c8e,{...e,forwardedRef:t})})),h8e=ct([wn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=e=>{const{...t}=e,{objects:n}=ke(h8e);return x(rh,{listening:!1,...t,children:n.filter(U_).map((r,i)=>x(p5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},s2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},g8e=ct(wn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:s2(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),m8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=ke(g8e);return l?ne(rh,{listening:!1,...t,children:[x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},v8e=ct(wn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),y8e=e=>{const{...t}=e,n=Ye(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=ke(v8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(H=>{if(!v){n(fw({x:Math.floor(H.target.x()),y:Math.floor(H.target.y())}));return}const J=H.target.x(),re=H.target.y(),oe=Fc(J,64),X=Fc(re,64);H.target.x(oe),H.target.y(X),n(fw({x:oe,y:X}))},[n,v]),I=C.exports.useCallback(()=>{if(!k.current)return;const H=k.current,J=H.scaleX(),re=H.scaleY(),oe=Math.round(H.width()*J),X=Math.round(H.height()*re),G=Math.round(H.x()),Q=Math.round(H.y());n(sm({width:oe,height:X})),n(fw({x:v?gs(G,64):G,y:v?gs(Q,64):Q})),H.scaleX(1),H.scaleY(1)},[n,v]),R=C.exports.useCallback((H,J,re)=>{const oe=H.x%T,X=H.y%T;return{x:gs(J.x,T)+oe,y:gs(J.y,T)+X}},[T]),N=()=>{n(pw(!0))},z=()=>{n(pw(!1)),n(Fy(!1))},$=()=>{n(YL(!0))},W=()=>{n(pw(!1)),n(YL(!1)),n(Fy(!1))},q=()=>{n(Fy(!0))},de=()=>{!u&&!l&&n(Fy(!1))};return ne(rh,{...t,children:[x(T0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(T0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(T0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(d8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:W,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let UW=null,GW=null;const S8e=e=>{UW=e},g5=()=>UW,b8e=e=>{GW=e},x8e=()=>GW,w8e=ct([wn,Rr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),C8e=()=>{const e=Ye(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=ke(w8e),i=C.exports.useRef(null),o=x8e();mt("esc",()=>{e(q5e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iH(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(Zp("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(Zp(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},_8e=ct(wn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:s2(t)}}),rO=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),k8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ke(_8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=rO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=rO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(T0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},E8e=ct([wn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P8e=e=>{const t=Ye(),{isMoveStageKeyHeld:n,stageScale:r}=ke(E8e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=st.clamp(r*D5e**s,z5e,B5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(fSe(l)),t(oH(u))},[e,n,r,t])},lb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},T8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(T8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=lb(e.current);!o||(i.evt.preventDefault(),t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},L8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),M8e=(e,t)=>{const n=Ye(),{tool:r,isDrawing:i,isStaging:o}=ke(L8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=lb(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(qS(!1))},[t,n,i,o,e,r])},O8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e=(e,t,n)=>{const r=Ye(),{isDrawing:i,tool:o,isStaging:a}=ke(O8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=lb(e.current);!s||(r(nH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},R8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),N8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(R8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=lb(e.current);!o||n==="move"||r||(t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},D8e=()=>{const e=Ye();return C.exports.useCallback(()=>{e(nH(null)),e(qS(!1))},[e])},z8e=ct([wn,yd],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const e=Ye(),{tool:t,isStaging:n}=ke(z8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var gf=C.exports,F8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const jW=e=>{const{url:t,x:n,y:r}=e,[i]=F8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},$8e=ct([wn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=()=>{const{objects:e}=ke($8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(b5e(t))return x(p5,{points:t.points,stroke:t.color?s2(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},W8e=ct([wn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const{colorMode:e}=Bv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ke(W8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,I=st.range(0,T).map(N=>x(p5,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=st.range(0,M).map(N=>x(p5,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(rh,{children:i})},U8e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=e=>{const{...t}=e,n=ke(U8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},o3=e=>Math.round(e*100)/100,j8e=ct([wn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${o3(s)}, ${o3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${o3(r)}\xD7${o3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Y8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=ke(j8e);return ne("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&ne(Nn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},q8e=ct([wn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=ke(q8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&ne(rh,{children:[x(T0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(T0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},X8e=ct([wn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Z8e=()=>{const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ke(X8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(G5e()),l=()=>e(U5e()),u=()=>e(W5e());return r?x(nn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ne(Ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(U4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(G4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(J4e,{}):x(Q4e,{}),onClick:()=>e(uSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(H_,{}),onClick:()=>e(V5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},Q8e=ct([wn,yd],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),J8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=ke(Q8e);C8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{b8e(W),p.current=W},[]),S=C.exports.useCallback(W=>{S8e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=P8e(p),k=A8e(p),T=M8e(p,E),M=I8e(p,E,w),I=N8e(p),R=D8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B8e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(f8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(i3,{id:"grid",visible:r,children:x(V8e,{})}),x(i3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H8e,{})}),ne(i3,{id:"mask",visible:e,listening:!1,children:[x(p8e,{visible:!0,listening:!1}),x(k8e,{listening:!1})]}),ne(i3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(m8e,{visible:l!=="move",listening:!1}),x(K8e,{visible:u}),h&&x(G8e,{}),x(y8e,{visible:n&&!u})]})]}),x(Y8e,{}),x(Z8e,{})]})})},e_e=ct([wn,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function t_e(){const e=Ye(),{canUndo:t,activeTabName:n}=ke(e_e),r=()=>{e(hSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(v5e,{}),onClick:r,isDisabled:!t})}const n_e=ct([wn,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function r_e(){const e=Ye(),{canRedo:t,activeTabName:n}=ke(n_e),r=()=>{e(j5e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(d5e,{}),onClick:r,isDisabled:!t})}const i_e=ct([wn],e=>{const{shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldShowCanvasDebugInfo:a}=e;return{shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowCanvasDebugInfo:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o_e=()=>{const e=Ye(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:a}=ke(i_e);return x(pu,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Show Intermediates",isChecked:t,onChange:s=>e(lSe(s.target.checked))}),x(ta,{label:"Show Grid",isChecked:n,onChange:s=>e(sSe(s.target.checked))}),x(ta,{label:"Snap to Grid",isChecked:r,onChange:s=>e(cSe(s.target.checked))}),x(ta,{label:"Darken Outside Selection",isChecked:o,onChange:s=>e(rH(s.target.checked))}),x(ta,{label:"Auto Save to Gallery",isChecked:i,onChange:s=>e(rSe(s.target.checked))}),x(ta,{label:"Show Canvas Debug Info",isChecked:a,onChange:s=>e(aSe(s.target.checked))})]})})};function ub(){return(ub=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function h9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(iO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=p9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(oO(P),!function(M,I){return I&&!Vm(M)}(P,l.current)&&k)){if(Vm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(iO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ub({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),cb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=cb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},qW=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},g9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ow=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},a_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},s_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},l_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=cb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(yk,{className:"react-colorful__hue-pointer",left:t/360,color:g9({h:t,s:100,v:100,a:1})})))}),u_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:g9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:g9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function c_e(e,t,n){var r=h9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;KW(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var d_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,f_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,h_e=function(e){d_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aO.set(t,n);var r=f_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},p_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Ow(Object.assign({},n,{a:0}))+", "+Ow(Object.assign({},n,{a:1}))+")"},o=cb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(vk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Ow(n)})))},g_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);h_e(s);var l=c_e(n,i,o),u=l[0],h=l[1],p=cb(["react-colorful",t]);return le.createElement("div",ub({},a,{ref:s,className:p}),x(u_e,{hsva:u,onChange:h}),x(l_e,{hue:u.h,onChange:h}),le.createElement(p_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},m_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:s_e,fromHsva:a_e,equal:KW},v_e=function(e){return le.createElement(g_e,ub({},e,{colorModel:m_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(v_e,{className:`invokeai__color-picker ${t}`,...n})},y_e=ct([wn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:s2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),S_e=()=>{const e=Ye(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=ke(y_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e(H5e()),s=()=>e(eSe(!r));return ne(Nn,{children:[x(vd,{label:"Layer",tooltipProps:{hasArrow:!0,placement:"top"},value:r?t:"base",isDisabled:!r,validValues:S5e,onChange:l=>e(qL(l.target.value))}),x(pu,{trigger:"hover",triggerComponent:x(Ia,{children:x(gt,{"aria-label":"Inpainting Mask Options",tooltip:"Inpainting Mask Options","data-alert":t==="mask",icon:x(i5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(ta,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(tSe(l))}),x(fl,{onClick:a,tooltip:"Clear Mask (Shift+C)",children:"Clear Mask"})]})})]})};let a3;const b_e=new Uint8Array(16);function x_e(){if(!a3&&(a3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a3(b_e)}const Ci=[];for(let e=0;e<256;++e)Ci.push((e+256).toString(16).slice(1));function w_e(e,t=0){return(Ci[e[t+0]]+Ci[e[t+1]]+Ci[e[t+2]]+Ci[e[t+3]]+"-"+Ci[e[t+4]]+Ci[e[t+5]]+"-"+Ci[e[t+6]]+Ci[e[t+7]]+"-"+Ci[e[t+8]]+Ci[e[t+9]]+"-"+Ci[e[t+10]]+Ci[e[t+11]]+Ci[e[t+12]]+Ci[e[t+13]]+Ci[e[t+14]]+Ci[e[t+15]]).toLowerCase()}const C_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:C_e};function t0(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||x_e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return w_e(r)}const __e=(e,t)=>{const n=e.scale(),r=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:i,y:o,width:a,height:s}=e.getClientRect(),l=e.toDataURL({x:Math.round(i),y:Math.round(o),width:Math.round(a),height:Math.round(s)});return e.scale(n),{dataURL:l,boundingBox:{x:Math.round(r.x),y:Math.round(r.y),width:Math.round(a),height:Math.round(s)}}},k_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},E_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},P_e={cropVisible:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},s3=(e=P_e)=>async(t,n)=>{const{cropVisible:r,shouldSaveToGallery:i,shouldDownload:o,shouldCopy:a,shouldSetAsInitialImage:s}=e;t(M4e("Exporting Image")),t(Xp(!1));const u=n().canvas.stageScale,h=g5();if(!h){t(hu(!1)),t(Xp(!0));return}const{dataURL:p,boundingBox:m}=__e(h,u);if(!p){t(hu(!1)),t(Xp(!0));return}const v=new FormData;v.append("data",JSON.stringify({dataURL:p,filename:"merged_canvas.png",kind:i?"result":"temp",cropVisible:r}));const w=await(await fetch(window.location.origin+"/upload",{method:"POST",body:v})).json(),{url:E,width:P,height:k}=w,T={uuid:t0(),category:i?"result":"user",...w};o&&(k_e(E),t(By({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),a&&(E_e(E,P,k),t(By({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),i&&(t(Qp({image:T,category:"result"})),t(By({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),s&&(t(nSe({kind:"image",layer:"base",...m,image:T})),t(By({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(W3("Connected")),t(Xp(!0))},Sk=e=>e.system,T_e=e=>e.system.toastQueue,A_e=ct([wn,yd,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:s2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),L_e=()=>{const e=Ye(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=ke(A_e);mt(["v"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[]),mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(hw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(hw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(Zp("brush")),s=()=>e(Zp("eraser")),l=()=>e(Zp("move"));return ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(a5e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(X4e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(Zp("eraser"))}),x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(j4e,{}),"data-selected":t==="move"||o,onClick:l}),x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Tool Options",tooltip:"Tool Options",icon:x(g5e,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(n2,{label:"Size",value:r,withInput:!0,onChange:u=>e(hw(u)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:u=>e(Z5e(u))})]})})]})};let lO;const ZW=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),M_e=ct([Sk],e=>{const{isProcessing:t}=e;return{isProcessing:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O_e=()=>{const e=Ye(),{isProcessing:t}=ke(M_e),n=g5(),{openUploader:r}=ZW();mt(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[n]),mt(["shift+m"],()=>{a()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+s"],()=>{s()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["meta+c","ctrl+c"],()=>{l()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+d"],()=>{u()},{enabled:()=>!t,preventDefault:!0},[n,t]);const i=()=>{const h=g5();if(!h)return;const p=h.getClientRect({skipTransform:!0});e(K5e({contentRect:p}))},o=()=>{e(Y5e()),e(tH())},a=()=>{e(s3({cropVisible:!1,shouldSetAsInitialImage:!0}))},s=()=>{e(s3({cropVisible:!0,shouldSaveToGallery:!0}))},l=()=>{e(s3({cropVisible:!0,shouldCopy:!0}))},u=()=>{e(s3({cropVisible:!0,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(S_e,{}),x(L_e,{}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(r5e,{}),onClick:a,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(f5e,{}),onClick:s,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x($_,{}),onClick:l,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x($$,{}),onClick:u,isDisabled:t})]}),ne(Ia,{isAttached:!0,children:[x(t_e,{}),x(r_e,{})]}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:r}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(K4e,{}),onClick:i}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(H_,{}),onClick:o,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(Ia,{isAttached:!0,children:x(o_e,{})})]})},I_e=ct([wn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),R_e=()=>{const e=Ye(),{doesCanvasNeedScaling:t}=ke(I_e);return C.exports.useLayoutEffect(()=>{const n=st.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ne("div",{className:"inpainting-main-area",children:[x(O_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(eCe,{}):x(J8e,{})})]})})})};function N_e(){const e=Ye();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(Q6e,{}),styleClass:"inpainting-workarea-overrides",children:x(R_e,{})})}const D_e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(kwe,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(wwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(D_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(N_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},db=st.map(kf,(e,t)=>t);[...db];function z_e(){const e=ke(u=>u.options.activeTab),t=ke(u=>u.options.isLightBoxOpen),n=ke(u=>u.gallery.shouldShowGallery),r=ke(u=>u.options.shouldShowOptionsPanel),i=ke(u=>u.gallery.shouldPinGallery),o=ke(u=>u.options.shouldPinOptionsPanel),a=Ye();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(ad(!t))},[t]),mt("f",()=>{n||r?(a(A0(!1)),a(k0(!1))):(a(A0(!0)),a(k0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(NF,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(IF,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return ne(OF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(RF,{className:"app-tabs-panels",children:t?x(B6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},B_e=QW,JW=TS({name:"options",initialState:B_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=H3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=r5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=H3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=r5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=H3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...QW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=db.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fb,setIterations:F_e,setSteps:eV,setCfgScale:tV,setThreshold:$_e,setPerlin:H_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:l2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:m9,setFacetoolStrength:j3,setFacetoolType:Y3,setCodeformerFidelity:sV,setUpscalingLevel:v9,setUpscalingStrength:y9,setMaskPath:lV,resetSeed:eTe,resetOptionsState:tTe,setShouldFitToWidthHeight:uV,setParameter:nTe,setShouldGenerateVariations:W_e,setSeedWeights:cV,setVariationAmount:V_e,setAllParameters:U_e,setShouldRunFacetool:G_e,setShouldRunESRGAN:j_e,setShouldRandomizeSeed:Y_e,setShowAdvancedOptions:q_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:K_e,setAllImageToImageParameters:X_e,setShowDualDisplay:Z_e,setInitialImage:u2,clearInitialImage:fV,setShouldShowOptionsPanel:A0,setShouldPinOptionsPanel:Q_e,setOptionsPanelScrollPosition:J_e,setShouldHoldOptionsPanelOpen:eke,setShouldLoopback:tke,setCurrentTheme:nke,setIsLightBoxOpen:ad}=JW.actions,rke=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const q3=Object.create(null);Object.keys(Ml).forEach(e=>{q3[Ml[e]]=e});const ike={type:"error",data:"parser error"},oke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ake=typeof ArrayBuffer=="function",ske=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>oke&&t instanceof Blob?n?r(t):uO(t,r):ake&&(t instanceof ArrayBuffer||ske(t))?n?r(t):uO(new Blob([t]),r):r(Ml[e]+(t||"")),uO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},cO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},uke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:cke(e.substring(1),t)}:q3[n]?e.length>1?{type:q3[n],data:e.substring(1)}:{type:q3[n]}:ike},cke=(e,t)=>{if(uke){const n=lke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),dke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},fke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const pke=setTimeout,gke=clearTimeout;function hb(e,t){t.useNativeTimers?(e.setTimeoutFn=pke.bind($c),e.clearTimeoutFn=gke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const mke=1.33;function vke(e){return typeof e=="string"?yke(e):Math.ceil((e.byteLength||e.size)*mke)}function yke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Ske extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,hb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Ske(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),S9=64,bke={};let dO=0,l3=0,fO;function hO(e){let t="";do t=bV[e%S9]+t,e=Math.floor(e/S9);while(e>0);return t}function xV(){const e=hO(+new Date);return e!==fO?(dO=0,fO=e):e+"."+hO(dO++)}for(;l3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};fke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,dke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=xV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pl extends Vr{constructor(t,n){super(),hb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=yV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new _V(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Pl.requestsCount++,Pl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Cke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,pO,!1)}}function pO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),u3=$c.WebSocket||$c.MozWebSocket,gO=!0,Eke="arraybuffer",mO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Pke extends SV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=mO?{}:yV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=gO&&!mO?n?new u3(t,n):new u3(t):new u3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Eke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{gO&&this.ws.send(o)}catch{}i&&kV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=xV()),this.supportsBinary||(t.b64=1);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!u3}}const Tke={websocket:Pke,polling:kke},Ake=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Lke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Ake.exec(e||""),o={},a=14;for(;a--;)o[Lke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Mke(o,o.path),o.queryKey=Oke(o,o.query),o}function Mke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Oke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Ic extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b9(n.host).host),hb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=xke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Tke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ic.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Ic.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ic.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Ic.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Ic.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Dke=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",zke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Rke&&(e instanceof ArrayBuffer||Nke(e))||Dke&&e instanceof Blob||zke&&e instanceof File}function K3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Wke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Fke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Vke=Object.freeze(Object.defineProperty({__proto__:null,protocol:$ke,get PacketType(){return tn},Encoder:Hke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Uke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Uke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}p1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};p1.prototype.reset=function(){this.attempts=0};p1.prototype.setMin=function(e){this.ms=e};p1.prototype.setMax=function(e){this.max=e};p1.prototype.setJitter=function(e){this.jitter=e};class C9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new p1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Vke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ic(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Kg={};function X3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ike(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Kg[i]&&o in Kg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new C9(r,t):(Kg[i]||(Kg[i]=new C9(r,t)),l=Kg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(X3,{Manager:C9,Socket:PV,io:X3,connect:X3});var Gke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,jke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Yke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(vO[t]||t||vO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return qke(e)},E=function(){return Kke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Xke(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(Gke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var vO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},yO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},qke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Kke=function(t){var n=t.getDay();return n===0&&(n=7),n},Xke=function(t){return(String(t).match(jke)||[""]).pop().replace(Yke,"").replace(/GMT\+0000/g,"UTC")};const Zke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(BL(!0)),t(W3("Connected")),t(E5e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(VC("user")),r.categories.result.latest_mtime?t(WL("result")):t(VC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(BL(!1)),t(W3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:t0(),...u};if(["txt2img","img2img"].includes(l)&&t(Qp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t($5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Qp({image:{...h,category:"result"},category:"result"}))}if(o)switch(db[a]){case"img2img":{t(u2(h));break}}t(gw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(CSe({uuid:t0(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Qp({category:"result",image:{uuid:t0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(w4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(FL()),t(gw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:t0(),...l}));t(wSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(k4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Qp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(gw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(C4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(W3("Model Changed")),t(hu(!1)),t(Xp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(hu(!1)),t(Xp(!0)),t(FL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},Qke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new jg.Stage({container:i,width:n,height:r}),a=new jg.Layer,s=new jg.Layer;a.add(new jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new jg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},Jke=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},eEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:I,shouldGenerateVariations:R,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:W,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:H,codeformerFidelity:J,facetoolType:re,shouldRandomizeSeed:oe}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:oe||R?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=oe?O$(P_,T_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=I),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Fe,inpaintReplace:We,shouldUseInpaintReplace:ht,stageScale:qe,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Xe={...xe,...Fe},Et=Qke(rt?Se.filter(U_):[],Xe);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,ht&&(j.inpaint_replace=We),j.bounding_box=Xe;const bt=t.scale();t.scale({x:1/qe,y:1/qe});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Xe.x+Ae.x,y:Xe.y+Ae.y,width:Xe.width,height:Xe.height});Q&&Jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}R?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:W,strength:q}),de&&(me={type:re,strength:H},re==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},tEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(A4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=eEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(hu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(hu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(uH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(E4e()),t.emit("requestModelChange",i)}}},nEe=()=>{const{origin:e}=new URL(window.location.href),t=X3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T}=Zke(i),{emitGenerateImage:M,emitRunESRGAN:I,emitRunFacetool:R,emitDeleteImage:N,emitRequestImages:z,emitRequestNewImages:$,emitCancelProcessing:W,emitRequestSystemConfig:q,emitRequestModelChange:de}=tEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",H=>u(H)),t.on("generationResult",H=>p(H)),t.on("postprocessingResult",H=>h(H)),t.on("intermediateResult",H=>m(H)),t.on("progressUpdate",H=>v(H)),t.on("galleryImages",H=>S(H)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",H=>{E(H)}),t.on("systemConfig",H=>{P(H)}),t.on("modelChanged",H=>{k(H)}),t.on("modelChangeFailed",H=>{T(H)}),n=!0),a.type){case"socketio/generateImage":{M(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{R(a.payload);break}case"socketio/deleteImage":{N(a.payload);break}case"socketio/requestImages":{z(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{W();break}case"socketio/requestSystemConfig":{q();break}case"socketio/requestModelChange":{de(a.payload);break}}o(a)}},rEe=["cursorPosition"].map(e=>`canvas.${e}`),iEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),oEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=GF({options:rke,gallery:TSe,system:O4e,canvas:pSe}),aEe=d$.getPersistConfig({key:"root",storage:c$,rootReducer:TV,blacklist:[...rEe,...iEe,...oEe],debounce:300}),sEe=A2e(aEe,TV),AV=Cve({reducer:sEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(nEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ye=p2e,ke=r2e;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function lEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SO(e,t){for(var n=0;nx(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Kv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),hEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ke(hEe),i=t?Math.round(t*100/n):0;return x(pF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function gEe(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function mEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=U4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(gEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(G0,{isOpen:t,onClose:r,children:[x(Pv,{}),ne(Ev,{className:" modal hotkeys-modal",children:[x(j8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const vEe=e=>{const{isProcessing:t,isConnected:n}=ke(l=>l.system),r=Ye(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return ne("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Da,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},yEe=ct(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),SEe=()=>{const{models:e}=ke(yEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(Df,{children:[x(Rf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(vEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},bEe=ct(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),xEe=({children:e})=>{const t=Ye(),n=ke(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=U4(),{isOpen:a,onOpen:s,onClose:l}=U4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=ke(bEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(P4e(E))};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(G0,{isOpen:r,onClose:o,children:[x(Pv,{}),ne(Ev,{className:"modal settings-modal",children:[x(q8,{className:"settings-modal-header",children:"Settings"}),x(j8,{className:"modal-close-btn"}),ne(q4,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(SEe,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(vd,{label:"Display In-Progress Images",validValues:F3e,value:u,onChange:E=>t(b4e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(_4e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(T4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x(Da,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Y8,{children:x(Da,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(G0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Ev,{children:x(q4,{pb:6,pt:6,children:x(nn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},wEe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ke(wEe),s=Ye();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(N$())},className:`status ${l}`,children:u})})},_Ee=["dark","light","green"];function kEe(){const{setColorMode:e}=Bv(),t=Ye(),n=ke(i=>i.options.currentTheme),r=i=>{e(i),t(nke(i))};return x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(s5e,{})}),children:x(jz,{align:"stretch",children:_Ee.map(i=>x(fl,{style:{width:"6rem"},leftIcon:n===i?x(F_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const EEe=ct([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),PEe=()=>{const e=Ye(),{models:t,activeModel:n,isProcessing:r}=ke(EEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(vd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},TEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(CEe,{}),x(PEe,{}),x(mEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(n5e,{})})}),x(kEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(q4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(W4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(H4e,{})})}),x(xEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),AEe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),LEe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),MEe=()=>{const e=Ye(),t=ke(AEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ke(LEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(N$()),e(cw(!n))};return mt("`",()=>{e(cw(!n))},[n]),mt("esc",()=>{e(cw(!1))}),ne(Nn,{children:[n&&x(gH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ne("div",{className:`console-entry console-${S}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(V4e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(o5e,{}):x(F$,{}),onClick:l})})]})};function OEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var IEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function c2(e,t){var n=REe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function REe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=IEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var NEe=[".DS_Store","Thumbs.db"];function DEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&zEe(e.dataTransfer)?[2,HEe(e.dataTransfer,e.type)]:BEe(e)?[2,FEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,$Ee(e)]:[2,[]]})})}function zEe(e){return m5(e)}function BEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function FEe(e){return E9(e.target.files).map(function(t){return c2(t)})}function $Ee(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return c2(r)})]}})})}function HEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=E9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(WEe))]):[3,2];case 1:return r=i.sent(),[2,bO(MV(r))];case 2:return[2,bO(E9(e.files).map(function(o){return c2(o)}))]}})})}function bO(e){return e.filter(function(t){return NEe.indexOf(t.name)===-1})}function E9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,kO(n)];if(e.sizen)return[!1,kO(n)]}return[!0,null]}function Ef(e){return e!=null}function iPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=NV(l,n),h=Ov(u,1),p=h[0],m=DV(l,r,i),v=Ov(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function v5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function c3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function PO(e){e.preventDefault()}function oPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function aPe(e){return e.indexOf("Edge/")!==-1}function sPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oPe(e)||aPe(e)}function al(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function _Pe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=y5(e,hPe),i=HV(r),o=i.open,a=y5(i,pPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var $V={disabled:!1,getFilesFromEvent:DEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=$V;wk.propTypes={children:In.exports.func,accept:In.exports.objectOf(In.exports.arrayOf(In.exports.string)),multiple:In.exports.bool,preventDropOnDocument:In.exports.bool,noClick:In.exports.bool,noKeyboard:In.exports.bool,noDrag:In.exports.bool,noDragEventsBubbling:In.exports.bool,minSize:In.exports.number,maxSize:In.exports.number,maxFiles:In.exports.number,disabled:In.exports.bool,getFilesFromEvent:In.exports.func,onFileDialogCancel:In.exports.func,onFileDialogOpen:In.exports.func,useFsAccessApi:In.exports.bool,autoFocus:In.exports.bool,onDragEnter:In.exports.func,onDragLeave:In.exports.func,onDragOver:In.exports.func,onDrop:In.exports.func,onDropAccepted:In.exports.func,onDropRejected:In.exports.func,onError:In.exports.func,validator:In.exports.func};var L9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return cPe(n)},[n]),q=C.exports.useMemo(function(){return uPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:AO},[E]),H=C.exports.useMemo(function(){return typeof w=="function"?w:AO},[w]),J=C.exports.useRef(null),re=C.exports.useRef(null),oe=C.exports.useReducer(kPe,L9),X=Iw(oe,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&lPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(re.current){var Je=re.current.files;Je.length||(Q({type:"closeDialog"}),H())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[re,Z,H,me]);var xe=C.exports.useRef([]),Fe=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",PO,!1),document.addEventListener("drop",Fe,!1)),function(){T&&(document.removeEventListener("dragover",PO),document.removeEventListener("drop",Fe))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),ht=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(vPe(xe.current),[Oe.target]),c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(v5(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&iPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,W,a,o,s,l,$]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=c3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),c3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(Ee){var Mt=NV(Ee,W),Ne=Iw(Mt,2),at=Ne[0],an=Ne[1],Dn=DV(Ee,a,o),$e=Iw(Dn,2),pt=$e[0],tt=$e[1],Nt=$?$(Ee):null;if(at&&pt&&!Nt)Xt.push(Ee);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){jt.push({file:Ee,errors:[rPe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,W,a,o,l,m,v,S,$]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){v5(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){dPe(Je)?(H(Je),Q({type:"closeDialog"})):fPe(Je)?(me.current=!1,re.current?(re.current.value=null,re.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Je)});return}re.current&&(Q({type:"openDialog"}),de(),re.current.value=null,re.current.click())},[Q,de,H,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(sPe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return I?null:lt(Je)},_n=function(Je){return R?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,Ee=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Dn=Oe.onDragOver,$e=Oe.onDragLeave,pt=Oe.onDrop,tt=y5(Oe,gPe);return lr(lr(A9({onKeyDown:xt(al(Ee,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:_n(al(an,ht)),onDragOver:_n(al(Dn,qe)),onDragLeave:_n(al($e,rt)),onDrop:_n(al(pt,Xe)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,ht,qe,rt,Xe,I,R,r]),kn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,Ee=Oe.onClick,Mt=y5(Oe,mPe),Ne=A9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Xe)),onClick:lt(al(Ee,kn)),tabIndex:-1},Xt,re);return lr(lr({},Ne),Mt)}},[re,n,s,Xe,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:re,open:lt(Et)})}function kPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},L9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},L9);default:return e}}function AO(){}const EPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Uf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},LO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Rr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:t0(),category:"user",...l};t(Qp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(u2(u))},PPe=e=>{const{children:t}=e,n=Ye(),r=ke(Rr),i=hh({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,I)=>M+` -`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(LO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(LO({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:ne("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(EPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},TPe=()=>{const e=Ye(),t=ke(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(k0(!0)),t&&e(io(!0))},children:x(D$,{})})};function APe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const LPe=ct(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),MPe=()=>{const e=Ye(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=ke(LPe);return ne("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(A0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(APe,{})}),t&&ne(Nn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},OPe=()=>{const e=Ye(),t=ke(T_e),n=hh();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(L4e())},[e,n,t])};OEe();const IPe=ct([e=>e.gallery,e=>e.options,e=>e.system,Rr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=st.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),RPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=ke(IPe);return OPe(),x("div",{className:"App",children:ne(PPe,{children:[x(pEe,{}),ne("div",{className:"app-content",children:[x(TEe,{}),x(z_e,{})]}),x("div",{className:"app-console",children:x(MEe,{})}),e&&x(TPe,{}),t&&x(MPe,{})]})})};const WV=N2e(AV),NPe=rN({key:"invokeai-style-cache",prepend:!0});Nw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(fEe,{}),persistor:WV,children:x(XQ,{value:NPe,children:x(Hme,{children:x(RPe,{})})})})})})); diff --git a/frontend/dist/assets/index.fc40251f.css b/frontend/dist/assets/index.fc40251f.css new file mode 100644 index 0000000000..21806c4796 --- /dev/null +++ b/frontend/dist/assets/index.fc40251f.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important;filter:drop-shadow(.5rem 0px 1rem var(--floating-button-drop-shadow-color))}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 9a2ef6268b..633ebe4a16 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,8 @@ InvokeAI - A Stable Diffusion Toolkit - - + + From cb7458db771b72baac7a3383175cd0b16408db43 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Mon, 21 Nov 2022 12:25:09 +1300 Subject: [PATCH 147/220] Fix styling on alert modals --- .../gallery/components/DeleteImageModal.tsx | 13 ++++++++++--- .../components/ClearTempFolderButtonModal.tsx | 9 +++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/gallery/components/DeleteImageModal.tsx b/frontend/src/features/gallery/components/DeleteImageModal.tsx index 78af21791a..8e0f110b70 100644 --- a/frontend/src/features/gallery/components/DeleteImageModal.tsx +++ b/frontend/src/features/gallery/components/DeleteImageModal.tsx @@ -25,7 +25,10 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import { deleteImage } from 'app/socketio/actions'; import { RootState } from 'app/store'; -import { setShouldConfirmOnDelete, SystemState } from 'features/system/store/systemSlice'; +import { + setShouldConfirmOnDelete, + SystemState, +} from 'features/system/store/systemSlice'; import * as InvokeAI from 'app/invokeai'; import { useHotkeys } from 'react-hotkeys-hook'; import _ from 'lodash'; @@ -105,7 +108,7 @@ const DeleteImageModal = forwardRef( onClose={onClose} > - + Delete image @@ -127,7 +130,11 @@ const DeleteImageModal = forwardRef( - + + + + + + + ); +}); +export default IAIAlertDialog; diff --git a/frontend/src/common/components/IAISelect.tsx b/frontend/src/common/components/IAISelect.tsx index f4f74f5c83..c21135db00 100644 --- a/frontend/src/common/components/IAISelect.tsx +++ b/frontend/src/common/components/IAISelect.tsx @@ -33,29 +33,28 @@ const IAISelect = (props: IAISelectProps) => { ...rest } = props; return ( - - ) => { - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - e.nativeEvent.stopPropagation(); - e.nativeEvent.cancelBubble = true; - }} - > - {label && ( - - {label} - - )} - + ) => { + e.stopPropagation(); + e.nativeEvent.stopImmediatePropagation(); + e.nativeEvent.stopPropagation(); + e.nativeEvent.cancelBubble = true; + }} + > + {label && ( + + {label} + + )} + - - + +
); }; diff --git a/frontend/src/features/canvas/components/ClearCanvasHistoryButtonModal.tsx b/frontend/src/features/canvas/components/ClearCanvasHistoryButtonModal.tsx new file mode 100644 index 0000000000..81e220718e --- /dev/null +++ b/frontend/src/features/canvas/components/ClearCanvasHistoryButtonModal.tsx @@ -0,0 +1,30 @@ +import { useAppDispatch } from 'app/store'; +import IAIAlertDialog from 'common/components/IAIAlertDialog'; +import IAIButton from 'common/components/IAIButton'; +import { clearCanvasHistory } from 'features/canvas/store/canvasSlice'; +import { FaTrash } from 'react-icons/fa'; + +const ClearCanvasHistoryButtonModal = () => { + const dispatch = useAppDispatch(); + + return ( + dispatch(clearCanvasHistory())} + acceptButtonText={'Clear History'} + triggerComponent={ + }> + Clear Canvas History + + } + > +

+ Clearing the canvas history leaves your current canvas intact, but + irreversibly clears the undo and redo history. +

+
+

Are you sure you want to clear the canvas history?

+
+ ); +}; +export default ClearCanvasHistoryButtonModal; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index 5036dfbc44..6bccd20d3b 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -99,58 +99,41 @@ const IAICanvasMaskOptions = () => { dispatch(setIsMaskEnabled(!isMaskEnabled)); return ( - <> - ) => - dispatch(setLayer(e.target.value as CanvasLayer)) - } - /> - - } - isDisabled={layer !== 'mask'} - /> - - } - > - - + } /> - - dispatch(setShouldPreserveMaskedArea(e.target.checked)) - } - /> - dispatch(setMaskColor(newColor))} - /> - } - onClick={handleClearMask} - > - Clear Mask (Shift+C) - - - - + + } + > + + + + dispatch(setShouldPreserveMaskedArea(e.target.checked)) + } + /> + dispatch(setMaskColor(newColor))} + /> + } onClick={handleClearMask}> + Clear Mask (Shift+C) + + +
); }; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index bfe424e8cd..fbd844b53d 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -18,7 +18,8 @@ import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import IAIButton from 'common/components/IAIButton'; -import ClearTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal'; +import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal'; +import ClearCanvasHistoryButtonModal from '../ClearCanvasHistoryButtonModal'; export const canvasControlsSelector = createSelector( [canvasSelector], @@ -117,14 +118,8 @@ const IAICanvasSettingsButtonPopover = () => { dispatch(setShouldShowCanvasDebugInfo(e.target.checked)) } /> - } - onClick={() => dispatch(clearCanvasHistory())} - > - Clear Canvas History - - + + ); diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index e974eb0e7d..5cd18e691f 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -4,6 +4,8 @@ import { resetCanvas, resetCanvasView, resizeAndScaleCanvas, + setIsMaskEnabled, + setLayer, setTool, } from 'features/canvas/store/canvasSlice'; import { useAppDispatch, useAppSelector } from 'app/store'; @@ -33,17 +35,26 @@ import { canvasSelector, isStagingSelector, } from 'features/canvas/store/canvasSelectors'; +import IAISelect from 'common/components/IAISelect'; +import { + CanvasLayer, + LAYER_NAMES_DICT, +} from 'features/canvas/store/canvasTypes'; +import { ChangeEvent } from 'react'; export const selector = createSelector( [systemSelector, canvasSelector, isStagingSelector], (system, canvas, isStaging) => { const { isProcessing } = system; - const { tool, shouldCropToBoundingBoxOnSave } = canvas; + const { tool, shouldCropToBoundingBoxOnSave, layer, isMaskEnabled } = + canvas; return { isProcessing, isStaging, + isMaskEnabled, tool, + layer, shouldCropToBoundingBoxOnSave, }; }, @@ -56,8 +67,14 @@ export const selector = createSelector( const IAICanvasOutpaintingControls = () => { const dispatch = useAppDispatch(); - const { isProcessing, isStaging, tool, shouldCropToBoundingBoxOnSave } = - useAppSelector(selector); + const { + isProcessing, + isStaging, + isMaskEnabled, + layer, + tool, + shouldCropToBoundingBoxOnSave, + } = useAppSelector(selector); const canvasBaseLayer = getCanvasBaseLayer(); const { openUploader } = useImageUploader(); @@ -193,8 +210,24 @@ const IAICanvasOutpaintingControls = () => { ); }; + const handleChangeLayer = (e: ChangeEvent) => { + const newLayer = e.target.value as CanvasLayer; + dispatch(setLayer(newLayer)); + if (newLayer === 'mask' && !isMaskEnabled) { + dispatch(setIsMaskEnabled(true)); + } + }; + return (
+ + diff --git a/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx b/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx index a8ff929dc1..0021af4bf0 100644 --- a/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx +++ b/frontend/src/features/system/components/ClearTempFolderButtonModal.tsx @@ -1,79 +1,41 @@ -import { - AlertDialog, - AlertDialogBody, - AlertDialogContent, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogOverlay, - Button, - Flex, - useDisclosure, -} from '@chakra-ui/react'; import { emptyTempFolder } from 'app/socketio/actions'; import { useAppDispatch } from 'app/store'; +import IAIAlertDialog from 'common/components/IAIAlertDialog'; import IAIButton from 'common/components/IAIButton'; import { clearCanvasHistory, resetCanvas, } from 'features/canvas/store/canvasSlice'; -import { useRef } from 'react'; import { FaTrash } from 'react-icons/fa'; -const ClearTempFolderButtonModal = () => { +const EmptyTempFolderButtonModal = () => { const dispatch = useAppDispatch(); - const { isOpen, onOpen, onClose } = useDisclosure(); - const cancelRef = useRef(null); - const handleClear = () => { + const acceptCallback = () => { dispatch(emptyTempFolder()); - dispatch(clearCanvasHistory()); dispatch(resetCanvas()); - onClose(); + dispatch(clearCanvasHistory()); }; return ( - <> - } size={'sm'} onClick={onOpen}> - Clear Temp Image Folder - - - - - - - Clear Temp Image Folder - - - -

- Clearing the temp image folder also fully resets the Unified - Canvas. This includes all undo/redo history, images in the - staging area, and the canvas base layer. -

-
-

Are you sure you want to clear the temp folder?

-
- - - - - -
-
-
- + } size={'sm'}> + Empty Temp Image Folder + + } + > +

+ Emptying the temp image folder also fully resets the Unified Canvas. + This includes all undo/redo history, images in the staging area, and the + canvas base layer. +

+
+

Are you sure you want to empty the temp folder?

+
); }; -export default ClearTempFolderButtonModal; +export default EmptyTempFolderButtonModal; diff --git a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx index 5bf25988cc..6cb3bda431 100644 --- a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -31,7 +31,7 @@ import { IN_PROGRESS_IMAGE_TYPES } from 'app/constants'; import IAISwitch from 'common/components/IAISwitch'; import IAISelect from 'common/components/IAISelect'; import IAINumberInput from 'common/components/IAINumberInput'; -import ClearTempFolderButtonModal from '../ClearTempFolderButtonModal'; +import EmptyTempFolderButtonModal from '../ClearTempFolderButtonModal'; const systemSelector = createSelector( (state: RootState) => state.system, From 306ed44e19156ff23a2838fdff8bc78d70e3f561 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 21 Nov 2022 19:13:46 +1100 Subject: [PATCH 154/220] Moves Loopback to app settings --- .../ProcessButtons/ProcessButtons.tsx | 2 -- .../SettingsModal/SettingsModal.tsx | 24 +++++++++++++++---- .../FloatingOptionsPanelButtons.tsx | 6 ++--- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx index b27e8fe7bb..e4d07a0224 100644 --- a/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx +++ b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx @@ -1,6 +1,5 @@ import InvokeButton from './InvokeButton'; import CancelButton from './CancelButton'; -import LoopbackButton from './Loopback'; /** * Buttons to start and cancel image generation. @@ -9,7 +8,6 @@ const ProcessButtons = () => { return (
-
); diff --git a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx index 6cb3bda431..800ebf221d 100644 --- a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -32,10 +32,13 @@ import IAISwitch from 'common/components/IAISwitch'; import IAISelect from 'common/components/IAISelect'; import IAINumberInput from 'common/components/IAINumberInput'; import EmptyTempFolderButtonModal from '../ClearTempFolderButtonModal'; +import { systemSelector } from 'features/system/store/systemSelectors'; +import { optionsSelector } from 'features/options/store/optionsSelectors'; +import { setShouldLoopback } from 'features/options/store/optionsSlice'; -const systemSelector = createSelector( - (state: RootState) => state.system, - (system: SystemState) => { +const selector = createSelector( + [systemSelector, optionsSelector], + (system, options) => { const { shouldDisplayInProgressType, shouldConfirmOnDelete, @@ -44,6 +47,9 @@ const systemSelector = createSelector( saveIntermediatesInterval, enableImageDebugging, } = system; + + const { shouldLoopback } = options; + return { shouldDisplayInProgressType, shouldConfirmOnDelete, @@ -51,6 +57,7 @@ const systemSelector = createSelector( models: _.map(model_list, (_model, key) => key), saveIntermediatesInterval, enableImageDebugging, + shouldLoopback, }; }, { @@ -92,7 +99,8 @@ const SettingsModal = ({ children }: SettingsModalProps) => { shouldDisplayGuides, saveIntermediatesInterval, enableImageDebugging, - } = useAppSelector(systemSelector); + shouldLoopback, + } = useAppSelector(selector); /** * Resets localstorage, then opens a secondary modal informing user to @@ -172,6 +180,14 @@ const SettingsModal = ({ children }: SettingsModalProps) => { dispatch(setShouldDisplayGuides(e.target.checked)) } /> + ) => + dispatch(setShouldLoopback(e.target.checked)) + } + />
diff --git a/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx b/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx index 596b63074f..5473284da1 100644 --- a/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx +++ b/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx @@ -1,5 +1,4 @@ import { createSelector } from '@reduxjs/toolkit'; -import { IoMdOptions } from 'react-icons/io'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; import { @@ -9,8 +8,8 @@ import { import CancelButton from 'features/options/components/ProcessButtons/CancelButton'; import InvokeButton from 'features/options/components/ProcessButtons/InvokeButton'; import _ from 'lodash'; -import LoopbackButton from 'features/options/components/ProcessButtons/Loopback'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; +import { FaSlidersH } from 'react-icons/fa'; const canInvokeSelector = createSelector( (state: RootState) => state.options, @@ -46,12 +45,11 @@ const FloatingOptionsPanelButtons = () => { aria-label="Show Options Panel" onClick={handleShowOptionsPanel} > - + {shouldShowProcessButtons && ( <> - )} From 0cdb7bb0cd92cb0f4437176985aabb5beb62dac0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 21 Nov 2022 20:31:52 +1100 Subject: [PATCH 155/220] Fixes metadata viewer not showing metadata after refresh Also adds Dream-style prompt to metadata --- backend/invoke_ai_web_server.py | 10 +++++--- frontend/src/app/invokeai.d.ts | 1 + .../ImageMetadataViewer.tsx | 23 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 66fda884ea..212f014f5a 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -425,7 +425,8 @@ class InvokeAIWebServer: thumbnail_path ), "mtime": os.path.getmtime(path), - "metadata": metadata, + "metadata": metadata.get("sd-metadata"), + "dreamPrompt": metadata.get("Dream"), "width": width, "height": height, "category": category, @@ -496,7 +497,8 @@ class InvokeAIWebServer: thumbnail_path ), "mtime": os.path.getmtime(path), - "metadata": metadata, + "metadata": metadata.get("sd-metadata"), + "dreamPrompt": metadata.get("Dream"), "width": width, "height": height, "category": category, @@ -659,7 +661,8 @@ class InvokeAIWebServer: "url": self.get_url_from_image_path(path), "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), - "metadata": metadata, + "metadata": metadata.get("sd-metadata"), + "dreamPrompt": metadata.get("Dream"), "width": width, "height": height, }, @@ -1090,6 +1093,7 @@ class InvokeAIWebServer: "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), "metadata": metadata, + "dreamPrompt": command, "width": width, "height": height, "boundingBox": original_bounding_box, diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index 02e0b365dc..6c528c36e1 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -120,6 +120,7 @@ export declare type Image = { height: number; category: GalleryCategory; isBase64?: boolean; + dreamPrompt?: 'string'; }; // GalleryImages is an array of Image. diff --git a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx index 695a9da7f2..810458c8cc 100644 --- a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx +++ b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx @@ -45,6 +45,7 @@ type MetadataItemProps = { onClick?: () => void; value: number | string | boolean; labelPosition?: string; + withCopy?: boolean; }; /** @@ -56,6 +57,7 @@ const MetadataItem = ({ onClick, isLink, labelPosition, + withCopy = false, }: MetadataItemProps) => { return ( @@ -71,6 +73,18 @@ const MetadataItem = ({ /> )} + {withCopy && ( + + } + size={'xs'} + variant={'ghost'} + fontSize={14} + onClick={() => navigator.clipboard.writeText(value.toString())} + /> + + )} {label}: @@ -115,6 +129,8 @@ const ImageMetadataViewer = memo( }); const metadata = image?.metadata?.image || {}; + const dreamPrompt = image?.dreamPrompt; + const { type, postprocessing, @@ -381,6 +397,13 @@ const ImageMetadataViewer = memo( )} )} + {dreamPrompt && ( + + )} From ef1dbdb33d999f29b1c89c1e5960baef61291647 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 21 Nov 2022 20:32:05 +1100 Subject: [PATCH 156/220] Adds outpainting specific options --- frontend/src/app/features.ts | 6 + .../src/common/util/parameterTranslation.ts | 52 ++-- .../Inpainting/OutpaintingOptions.tsx | 143 +++++++++++ .../Inpainting/OutpaintingOptionsHeader.tsx | 11 + .../features/options/store/optionsSlice.ts | 242 ++++++++++-------- .../src/features/system/store/systemSlice.ts | 2 +- .../UnifiedCanvas/UnifiedCanvasPanel.tsx | 7 + 7 files changed, 336 insertions(+), 127 deletions(-) create mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx create mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx diff --git a/frontend/src/app/features.ts b/frontend/src/app/features.ts index 361c8356dc..ade41a515f 100644 --- a/frontend/src/app/features.ts +++ b/frontend/src/app/features.ts @@ -13,6 +13,7 @@ export enum Feature { UPSCALE, FACE_CORRECTION, IMAGE_TO_IMAGE, + OUTPAINTING, } /** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip. * @@ -59,4 +60,9 @@ export const FEATURES: Record = { href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, + [Feature.OUTPAINTING]: { + text: '', // TODO + href: 'link/to/docs/feature3.html', + guideImage: 'asset/path.gif', + }, }; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index b32764665d..24a94b0850 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -39,32 +39,38 @@ export const frontendToBackendParameters = ( } = config; const { - prompt, - iterations, - steps, cfgScale, - threshold, - perlin, + codeformerFidelity, + facetoolStrength, + facetoolType, height, - width, - sampler, - seed, - seamless, hiresFix, img2imgStrength, initialImage, - shouldFitToWidthHeight, - shouldGenerateVariations, - variationAmount, + iterations, + perlin, + prompt, + sampler, + seamBlur, + seamless, + seamSize, + seamSteps, + seamStrength, + seed, seedWeights, + shouldFitToWidthHeight, + shouldForceOutpaint, + shouldGenerateVariations, + shouldRandomizeSeed, shouldRunESRGAN, + shouldRunFacetool, + steps, + threshold, + tileSize, upscalingLevel, upscalingStrength, - shouldRunFacetool, - facetoolStrength, - codeformerFidelity, - facetoolType, - shouldRandomizeSeed, + variationAmount, + width, } = optionsState; const { @@ -178,12 +184,12 @@ export const frontendToBackendParameters = ( // TODO: The server metadata generation needs to be changed to fix this. generationParameters.progress_images = false; - generationParameters.seam_size = 96; - generationParameters.seam_blur = 16; - generationParameters.seam_strength = 0.7; - generationParameters.seam_steps = 10; - generationParameters.tile_size = 32; - generationParameters.force_outpaint = false; + generationParameters.seam_size = seamSize; + generationParameters.seam_blur = seamBlur; + generationParameters.seam_strength = seamStrength; + generationParameters.seam_steps = seamSteps; + generationParameters.tile_size = tileSize; + generationParameters.force_outpaint = shouldForceOutpaint; } if (shouldGenerateVariations) { diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx new file mode 100644 index 0000000000..88c0e1117d --- /dev/null +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx @@ -0,0 +1,143 @@ +import { Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAISlider from 'common/components/IAISlider'; +import IAISwitch from 'common/components/IAISwitch'; +import { optionsSelector } from 'features/options/store/optionsSelectors'; +import { + setSeamSize, + setSeamBlur, + setSeamStrength, + setSeamSteps, + setTileSize, + setShouldForceOutpaint, +} from 'features/options/store/optionsSlice'; + +const selector = createSelector([optionsSelector], (options) => { + const { + seamSize, + seamBlur, + seamStrength, + seamSteps, + tileSize, + shouldForceOutpaint, + } = options; + + return { + seamSize, + seamBlur, + seamStrength, + seamSteps, + tileSize, + shouldForceOutpaint, + }; +}); + +const OutpaintingOptions = () => { + const dispatch = useAppDispatch(); + const { + seamSize, + seamBlur, + seamStrength, + seamSteps, + tileSize, + shouldForceOutpaint, + } = useAppSelector(selector); + + return ( + + { + dispatch(setSeamSize(v)); + }} + handleReset={() => dispatch(setSeamSize(96))} + withInput + withSliderMarks + withReset + /> + { + dispatch(setSeamBlur(v)); + }} + handleReset={() => { + dispatch(setSeamBlur(16)); + }} + withInput + withSliderMarks + withReset + /> + { + dispatch(setSeamStrength(v)); + }} + handleReset={() => { + dispatch(setSeamStrength(0.7)); + }} + withInput + withSliderMarks + withReset + /> + { + dispatch(setSeamSteps(v)); + }} + handleReset={() => { + dispatch(setSeamSteps(10)); + }} + withInput + withSliderMarks + withReset + /> + { + dispatch(setTileSize(v)); + }} + handleReset={() => { + dispatch(setTileSize(32)); + }} + withInput + withSliderMarks + withReset + /> + { + dispatch(setShouldForceOutpaint(e.target.checked)); + }} + /> + + ); +}; + +export default OutpaintingOptions; diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx new file mode 100644 index 0000000000..b2df8b13fb --- /dev/null +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx @@ -0,0 +1,11 @@ +import { Box } from '@chakra-ui/react'; + +const OutpaintingHeader = () => { + return ( + + Outpainting + + ); +}; + +export default OutpaintingHeader; diff --git a/frontend/src/features/options/store/optionsSlice.ts b/frontend/src/features/options/store/optionsSlice.ts index 6425d4968c..ac7bcd5388 100644 --- a/frontend/src/features/options/store/optionsSlice.ts +++ b/frontend/src/features/options/store/optionsSlice.ts @@ -11,84 +11,96 @@ export type UpscalingLevel = 2 | 4; export type FacetoolType = typeof FACETOOL_TYPES[number]; export interface OptionsState { - prompt: string; - iterations: number; - steps: number; - cfgScale: number; - height: number; - width: number; - sampler: string; - threshold: number; - perlin: number; - seed: number; - img2imgStrength: number; - facetoolType: FacetoolType; - facetoolStrength: number; - codeformerFidelity: number; - upscalingLevel: UpscalingLevel; - upscalingStrength: number; - initialImage?: InvokeAI.Image | string; // can be an Image or url - maskPath: string; - seamless: boolean; - hiresFix: boolean; - shouldFitToWidthHeight: boolean; - shouldGenerateVariations: boolean; - variationAmount: number; - seedWeights: string; - shouldRunESRGAN: boolean; - shouldRunFacetool: boolean; - shouldRandomizeSeed: boolean; - showAdvancedOptions: boolean; activeTab: number; - shouldShowImageDetails: boolean; - showDualDisplay: boolean; - shouldShowOptionsPanel: boolean; - shouldPinOptionsPanel: boolean; + cfgScale: number; + codeformerFidelity: number; + currentTheme: string; + facetoolStrength: number; + facetoolType: FacetoolType; + height: number; + hiresFix: boolean; + img2imgStrength: number; + initialImage?: InvokeAI.Image | string; // can be an Image or url + isLightBoxOpen: boolean; + iterations: number; + maskPath: string; optionsPanelScrollPosition: number; + perlin: number; + prompt: string; + sampler: string; + seamBlur: number; + seamless: boolean; + seamSize: number; + seamSteps: number; + seamStrength: number; + seed: number; + seedWeights: string; + shouldFitToWidthHeight: boolean; + shouldForceOutpaint: boolean; + shouldGenerateVariations: boolean; shouldHoldOptionsPanelOpen: boolean; shouldLoopback: boolean; - currentTheme: string; - isLightBoxOpen: boolean; + shouldPinOptionsPanel: boolean; + shouldRandomizeSeed: boolean; + shouldRunESRGAN: boolean; + shouldRunFacetool: boolean; + shouldShowImageDetails: boolean; + shouldShowOptionsPanel: boolean; + showAdvancedOptions: boolean; + showDualDisplay: boolean; + steps: number; + threshold: number; + tileSize: number; + upscalingLevel: UpscalingLevel; + upscalingStrength: number; + variationAmount: number; + width: number; } const initialOptionsState: OptionsState = { - prompt: '', - iterations: 1, - steps: 50, + activeTab: 0, cfgScale: 7.5, - height: 512, - width: 512, - sampler: 'k_lms', - threshold: 0, - perlin: 0, - seed: 0, - seamless: false, - hiresFix: false, - img2imgStrength: 0.75, - maskPath: '', - shouldFitToWidthHeight: true, - shouldGenerateVariations: false, - variationAmount: 0.1, - seedWeights: '', - shouldRunESRGAN: false, - upscalingLevel: 4, - upscalingStrength: 0.75, - shouldRunFacetool: false, + codeformerFidelity: 0.75, + currentTheme: 'dark', facetoolStrength: 0.8, facetoolType: 'gfpgan', - codeformerFidelity: 0.75, - shouldRandomizeSeed: true, - showAdvancedOptions: true, - activeTab: 0, - shouldShowImageDetails: false, - showDualDisplay: true, - shouldShowOptionsPanel: true, - shouldPinOptionsPanel: true, + height: 512, + hiresFix: false, + img2imgStrength: 0.75, + isLightBoxOpen: false, + iterations: 1, + maskPath: '', optionsPanelScrollPosition: 0, + perlin: 0, + prompt: '', + sampler: 'k_lms', + seamBlur: 16, + seamless: false, + seamSize: 96, + seamSteps: 10, + seamStrength: 0.7, + seed: 0, + seedWeights: '', + shouldFitToWidthHeight: true, + shouldForceOutpaint: false, + shouldGenerateVariations: false, shouldHoldOptionsPanelOpen: false, shouldLoopback: false, - currentTheme: 'dark', - isLightBoxOpen: false, + shouldPinOptionsPanel: true, + shouldRandomizeSeed: true, + shouldRunESRGAN: false, + shouldRunFacetool: false, + shouldShowImageDetails: false, + shouldShowOptionsPanel: true, + showAdvancedOptions: true, + showDualDisplay: true, + steps: 50, + threshold: 0, + tileSize: 32, + upscalingLevel: 4, + upscalingStrength: 0.75, + variationAmount: 0.1, + width: 512, }; const initialState: OptionsState = initialOptionsState; @@ -360,55 +372,79 @@ export const optionsSlice = createSlice({ setIsLightBoxOpen: (state, action: PayloadAction) => { state.isLightBoxOpen = action.payload; }, + setSeamSize: (state, action: PayloadAction) => { + state.seamSize = action.payload; + }, + setSeamBlur: (state, action: PayloadAction) => { + state.seamBlur = action.payload; + }, + setSeamStrength: (state, action: PayloadAction) => { + state.seamStrength = action.payload; + }, + setSeamSteps: (state, action: PayloadAction) => { + state.seamSteps = action.payload; + }, + setTileSize: (state, action: PayloadAction) => { + state.tileSize = action.payload; + }, + setShouldForceOutpaint: (state, action: PayloadAction) => { + state.shouldForceOutpaint = action.payload; + }, }, }); export const { - setPrompt, - setIterations, - setSteps, + clearInitialImage, + resetOptionsState, + resetSeed, + setActiveTab, + setAllImageToImageParameters, + setAllParameters, + setAllTextToImageParameters, setCfgScale, - setThreshold, - setPerlin, - setHeight, - setWidth, - setSampler, - setSeed, - setSeamless, - setHiresFix, - setImg2imgStrength, + setCodeformerFidelity, + setCurrentTheme, setFacetoolStrength, setFacetoolType, - setCodeformerFidelity, - setUpscalingLevel, - setUpscalingStrength, - setMaskPath, - resetSeed, - resetOptionsState, - setShouldFitToWidthHeight, - setParameter, - setShouldGenerateVariations, - setSeedWeights, - setVariationAmount, - setAllParameters, - setShouldRunFacetool, - setShouldRunESRGAN, - setShouldRandomizeSeed, - setShowAdvancedOptions, - setActiveTab, - setShouldShowImageDetails, - setAllTextToImageParameters, - setAllImageToImageParameters, - setShowDualDisplay, + setHeight, + setHiresFix, + setImg2imgStrength, setInitialImage, - clearInitialImage, - setShouldShowOptionsPanel, - setShouldPinOptionsPanel, + setIsLightBoxOpen, + setIterations, + setMaskPath, setOptionsPanelScrollPosition, + setParameter, + setPerlin, + setPrompt, + setSampler, + setSeamBlur, + setSeamless, + setSeamSize, + setSeamSteps, + setSeamStrength, + setSeed, + setSeedWeights, + setShouldFitToWidthHeight, + setShouldForceOutpaint, + setShouldGenerateVariations, setShouldHoldOptionsPanelOpen, setShouldLoopback, - setCurrentTheme, - setIsLightBoxOpen, + setShouldPinOptionsPanel, + setShouldRandomizeSeed, + setShouldRunESRGAN, + setShouldRunFacetool, + setShouldShowImageDetails, + setShouldShowOptionsPanel, + setShowAdvancedOptions, + setShowDualDisplay, + setSteps, + setThreshold, + setTileSize, + setUpscalingLevel, + setUpscalingStrength, + setVariationAmount, + setWidth, } = optionsSlice.actions; export default optionsSlice.reducer; diff --git a/frontend/src/features/system/store/systemSlice.ts b/frontend/src/features/system/store/systemSlice.ts index bdcd267c2f..13ba7c459e 100644 --- a/frontend/src/features/system/store/systemSlice.ts +++ b/frontend/src/features/system/store/systemSlice.ts @@ -59,7 +59,7 @@ const initialSystemState: SystemState = { isESRGANAvailable: true, socketId: '', shouldConfirmOnDelete: true, - openAccordions: [0], + openAccordions: [], currentStep: 0, totalSteps: 0, currentIteration: 0, diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx index 41c8c598ce..7ab57687a0 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -5,6 +5,8 @@ import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceR import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; import InpaintingSettings from 'features/options/components/AdvancedOptions/Inpainting/InpaintingSettings'; +import OutpaintingOptions from 'features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions'; +import OutpaintingHeader from 'features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader'; import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; @@ -24,6 +26,11 @@ export default function UnifiedCanvasPanel() { ); const imageToImageAccordions = { + outpainting: { + header: , + feature: Feature.OUTPAINTING, + options: , + }, seed: { header: , feature: Feature.SEED, From e821b97cfc27ceb2690ab25201de6e8b012f5f46 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 21 Nov 2022 20:34:35 +1100 Subject: [PATCH 157/220] Linting --- .../features/canvas/components/IAICanvasResizer.tsx | 1 - .../canvas/components/IAICanvasStagingArea.tsx | 1 - .../IAICanvasToolbar/IAICanvasMaskOptions.tsx | 13 ++----------- .../IAICanvasSettingsButtonPopover.tsx | 4 +--- .../IAICanvasToolChooserOptions.tsx | 5 +---- .../components/ProcessButtons/InvokeButton.tsx | 4 +--- .../components/SettingsModal/SettingsModal.tsx | 2 -- 7 files changed, 5 insertions(+), 25 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasResizer.tsx b/frontend/src/features/canvas/components/IAICanvasResizer.tsx index 44b26110ff..cc59ce1cec 100644 --- a/frontend/src/features/canvas/components/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasResizer.tsx @@ -3,7 +3,6 @@ import { useLayoutEffect, useRef } from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { - resizeAndScaleCanvas, resizeCanvas, setCanvasContainerDimensions, setDoesCanvasNeedScaling, diff --git a/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx index 3f5c15f060..31513b2cf7 100644 --- a/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStagingArea.tsx @@ -2,7 +2,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; -import { useState } from 'react'; import { Group, Rect } from 'react-konva'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import IAICanvasImage from './IAICanvasImage'; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index 6bccd20d3b..197aee78b7 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -1,4 +1,4 @@ -import { Box, ButtonGroup, Flex } from '@chakra-ui/react'; +import { ButtonGroup, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { clearMask, @@ -17,16 +17,7 @@ import IAIColorPicker from 'common/components/IAIColorPicker'; import IAIButton from 'common/components/IAIButton'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; -import IAISelect from 'common/components/IAISelect'; -import { - CanvasLayer, - LAYER_NAMES_DICT, -} from 'features/canvas/store/canvasTypes'; -import { ChangeEvent } from 'react'; -import { - rgbaColorToRgbString, - rgbaColorToString, -} from 'features/canvas/util/colorToString'; +import { rgbaColorToString } from 'features/canvas/util/colorToString'; export const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index fbd844b53d..d88071ebfc 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -1,7 +1,6 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { - clearCanvasHistory, setShouldAutoSave, setShouldCropToBoundingBoxOnSave, setShouldDarkenOutsideBoundingBox, @@ -13,11 +12,10 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; -import { FaTrash, FaWrench } from 'react-icons/fa'; +import { FaWrench } from 'react-icons/fa'; import IAIPopover from 'common/components/IAIPopover'; import IAICheckbox from 'common/components/IAICheckbox'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import IAIButton from 'common/components/IAIButton'; import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal'; import ClearCanvasHistoryButtonModal from '../ClearCanvasHistoryButtonModal'; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx index fc32b7a5b6..cd53ebb5a8 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx @@ -18,7 +18,6 @@ import { useHotkeys } from 'react-hotkeys-hook'; import IAIPopover from 'common/components/IAIPopover'; import IAISlider from 'common/components/IAISlider'; import IAIColorPicker from 'common/components/IAIColorPicker'; -import { rgbaColorToString } from 'features/canvas/util/colorToString'; export const selector = createSelector( [canvasSelector, isStagingSelector, systemSelector], @@ -31,7 +30,6 @@ export const selector = createSelector( isStaging, isProcessing, brushColor, - brushColorString: rgbaColorToString(brushColor), brushSize, }; }, @@ -44,8 +42,7 @@ export const selector = createSelector( const IAICanvasToolChooserOptions = () => { const dispatch = useAppDispatch(); - const { tool, brushColor, brushSize, brushColorString, isStaging } = - useAppSelector(selector); + const { tool, brushColor, brushSize, isStaging } = useAppSelector(selector); useHotkeys( ['b'], diff --git a/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx index 3b3c013511..97b11323df 100644 --- a/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx +++ b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx @@ -1,4 +1,3 @@ -import { Flex, ListItem, Tooltip, UnorderedList } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; import { FaPlay } from 'react-icons/fa'; import { readinessSelector } from 'app/selectors/readinessSelector'; @@ -8,7 +7,6 @@ import IAIButton, { IAIButtonProps } from 'common/components/IAIButton'; import IAIIconButton, { IAIIconButtonProps, } from 'common/components/IAIIconButton'; -import IAIPopover from 'common/components/IAIPopover'; import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; interface InvokeButton @@ -19,7 +17,7 @@ interface InvokeButton export default function InvokeButton(props: InvokeButton) { const { iconButton = false, ...rest } = props; const dispatch = useAppDispatch(); - const { isReady, reasonsWhyNotReady } = useAppSelector(readinessSelector); + const { isReady } = useAppSelector(readinessSelector); const activeTabName = useAppSelector(activeTabNameSelector); const handleClickGenerate = () => { diff --git a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx index 800ebf221d..706a40eb60 100644 --- a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -24,14 +24,12 @@ import { setShouldConfirmOnDelete, setShouldDisplayGuides, setShouldDisplayInProgressType, - SystemState, } from 'features/system/store/systemSlice'; import ModelList from './ModelList'; import { IN_PROGRESS_IMAGE_TYPES } from 'app/constants'; import IAISwitch from 'common/components/IAISwitch'; import IAISelect from 'common/components/IAISelect'; import IAINumberInput from 'common/components/IAINumberInput'; -import EmptyTempFolderButtonModal from '../ClearTempFolderButtonModal'; import { systemSelector } from 'features/system/store/systemSelectors'; import { optionsSelector } from 'features/options/store/optionsSelectors'; import { setShouldLoopback } from 'features/options/store/optionsSlice'; From 11969c2e2ebbbced0b72eb940f8ea99643b41683 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 21 Nov 2022 20:56:48 +1100 Subject: [PATCH 158/220] Fixes gallery width on lightbox, fixes gallery button expansion --- .../gallery/components/ImageGallery.scss | 2 +- .../gallery/components/ImageGallery.tsx | 34 +++++++++++++++---- .../gallery/store/gallerySliceSelectors.ts | 5 +++ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.scss b/frontend/src/features/gallery/components/ImageGallery.scss index e3dc5bc2f0..f12fcd418a 100644 --- a/frontend/src/features/gallery/components/ImageGallery.scss +++ b/frontend/src/features/gallery/components/ImageGallery.scss @@ -43,7 +43,7 @@ border-radius: 0.5rem; border-left-width: 0.3rem; - border-color: var(--resizeable-handle-border-color); + border-color: var(--tab-list-text-inactive); &[data-resize-alert='true'] { border-color: var(--status-bad-color); diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 123d151565..9e6934d79b 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -56,6 +56,8 @@ const GALLERY_TAB_WIDTHS: Record< postprocess: { galleryMinWidth: 200, galleryMaxWidth: 500 }, }; +const LIGHTBOX_GALLERY_WIDTH = 400; + export default function ImageGallery() { const dispatch = useAppDispatch(); @@ -76,10 +78,16 @@ export default function ImageGallery() { galleryWidth, isLightBoxOpen, isStaging, + shouldEnableResize, } = useAppSelector(imageGallerySelector); - const { galleryMinWidth, galleryMaxWidth } = - GALLERY_TAB_WIDTHS[activeTabName]; + console.log(isLightBoxOpen); + const { galleryMinWidth, galleryMaxWidth } = isLightBoxOpen + ? { + galleryMinWidth: LIGHTBOX_GALLERY_WIDTH, + galleryMaxWidth: LIGHTBOX_GALLERY_WIDTH, + } + : GALLERY_TAB_WIDTHS[activeTabName]; const [shouldShowButtons, setShouldShowButtons] = useState( galleryWidth >= GALLERY_SHOW_BUTTONS_MIN_WIDTH @@ -92,6 +100,12 @@ export default function ImageGallery() { const galleryContainerRef = useRef(null); const timeoutIdRef = useRef(null); + useEffect(() => { + if (galleryWidth >= GALLERY_SHOW_BUTTONS_MIN_WIDTH) { + setShouldShowButtons(false); + } + }, [galleryWidth]); + const handleSetShouldPinGallery = () => { dispatch(setShouldPinGallery(!shouldPinGallery)); dispatch(setDoesCanvasNeedScaling(true)); @@ -256,10 +270,16 @@ export default function ImageGallery() { > Date: Mon, 21 Nov 2022 20:57:20 +1100 Subject: [PATCH 159/220] Builds fresh bundle --- frontend/dist/assets/index.347ca347.css | 1 + frontend/dist/assets/index.5a2fccba.js | 623 ------------------------ frontend/dist/assets/index.cc411ac7.js | 623 ++++++++++++++++++++++++ frontend/dist/assets/index.fc40251f.css | 1 - frontend/dist/index.html | 4 +- 5 files changed, 626 insertions(+), 626 deletions(-) create mode 100644 frontend/dist/assets/index.347ca347.css delete mode 100644 frontend/dist/assets/index.5a2fccba.js create mode 100644 frontend/dist/assets/index.cc411ac7.js delete mode 100644 frontend/dist/assets/index.fc40251f.css diff --git a/frontend/dist/assets/index.347ca347.css b/frontend/dist/assets/index.347ca347.css new file mode 100644 index 0000000000..d69f2e8630 --- /dev/null +++ b/frontend/dist/assets/index.347ca347.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.5a2fccba.js b/frontend/dist/assets/index.5a2fccba.js deleted file mode 100644 index df91c5f0b0..0000000000 --- a/frontend/dist/assets/index.5a2fccba.js +++ /dev/null @@ -1,623 +0,0 @@ -function mq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function I9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var zv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var LO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MO=Object.assign,OO={};function Q0(e,t,n){this.props=e,this.context=t,this.refs=OO,this.updater=n||LO}Q0.prototype.isReactComponent={};Q0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Q0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RO(){}RO.prototype=Q0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=OO,this.updater=n||LO}var D9=N9.prototype=new RO;D9.constructor=N9;MO(D9,Q0.prototype);D9.isPureReactComponent=!0;var gE=Array.isArray,IO=Object.prototype.hasOwnProperty,z9={current:null},NO={key:!0,ref:!0,__self:!0,__source:!0};function DO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)IO.call(t,r)&&!NO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=G[Z];if(0>>1;Zi(Be,j))Wei(dt,Be)?(G[Z]=dt,G[We]=j,Z=We):(G[Z]=Be,G[xe]=j,Z=xe);else if(Wei(dt,j))G[Z]=dt,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,ee(R);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function R(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var I=!1,N=null,z=-1,$=5,H=-1;function q(){return!(e.unstable_now()-H<$)}function de(){if(N!==null){var G=e.unstable_now();H=G;var Q=!0;try{Q=N(!0,G)}finally{Q?V():(I=!1,N=null)}}else I=!1}var V;if(typeof k=="function")V=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){E(de,0)};function ee(G){N=G,I||(I=!0,V())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,ee(R))},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,ee(R))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(zO);(function(e){e.exports=zO})(e0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var FO=C.exports,ca=e0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bw=Object.prototype.hasOwnProperty,Oq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Rq(e){return Bw.call(yE,e)?!0:Bw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Iq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nq(e,t,n,r){if(t===null||typeof t>"u"||Iq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var B9=/[\-:]([a-z])/g;function $9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qg(e):""}function Dq(e){switch(e.tag){case 5:return Qg(e.type);case 16:return Qg("Lazy");case 13:return Qg("Suspense");case 19:return Qg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Ip:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HO:return(e.displayName||"Context")+".Consumer";case $O:return(e._context.displayName||"Context")+".Provider";case V9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U9:return t=e.displayName||null,t!==null?t:Vw(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function zq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vw(t);case 8:return t===W9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function VO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fq(e){var t=VO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ry(e){e._valueTracker||(e._valueTracker=Fq(e))}function UO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=VO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){GO(e,t);var n=Jc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,Jc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jw(e,t,n){(t!=="number"||r5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Bq=["Webkit","ms","Moz","O"];Object.keys(vm).forEach(function(e){Bq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vm[t]=vm[e]})});function KO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vm.hasOwnProperty(e)&&vm[e]?(""+t).trim():t+"px"}function XO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=KO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function Xw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function _E(e){if(e=$v(e)){if(typeof Qw!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=_4(t),Qw(e.stateNode,e.type,t))}}function ZO(e){n0?r0?r0.push(e):r0=[e]:n0=e}function QO(){if(n0){var e=n0,t=r0;if(r0=n0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var oy=64,ay=4194304;function em(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function s5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=em(s):(o&=a,o!==0&&(r=em(o)))}else a=n&~i,a!==0?r=em(a):o!==0&&(r=em(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Sm),RE=String.fromCharCode(32),IE=!1;function yR(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function OK(e,t){switch(e){case"compositionend":return SR(t);case"keypress":return t.which!==32?null:(IE=!0,RE);case"textInput":return e=t.data,e===RE&&IE?null:e;default:return null}}function RK(e,t){if(Dp)return e==="compositionend"||!J9&&yR(e,t)?(e=mR(),v3=X9=Ic=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=FE(n)}}function CR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _R(){for(var e=window,t=r5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r5(e.document)}return t}function e7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WK(e){var t=_R(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&CR(n.ownerDocument.documentElement,n)){if(r!==null&&e7(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BE(n,o);var a=BE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,i6=null,xm=null,o6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r5(r)||(r=zp,"selectionStart"in r&&e7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xm&&ev(xm,r)||(xm=r,r=c5(i6,"onSelect"),0$p||(e.current=d6[$p],d6[$p]=null,$p--)}function jn(e,t){$p++,d6[$p]=e.current,e.current=t}var ed={},Wi=ud(ed),To=ud(!1),Yf=ed;function L0(e,t){var n=e.type.contextTypes;if(!n)return ed;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function f5(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==ed)throw Error(Re(168));jn(Wi,t),jn(To,n)}function RR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,zq(e)||"Unknown",i));return fr({},n,r)}function h5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ed,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=RR(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,k4=!1,ux=!1;function IR(e){su===null?su=[e]:su.push(e)}function eX(e){k4=!0,IR(e)}function cd(){if(!ux&&su!==null){ux=!0;var e=0,t=Pn;try{var n=su;for(Pn=1;e>=a,i-=a,uu=1<<32-ys(t)+i|n<z?($=N,N=null):$=N.sibling;var H=m(P,N,T[z],M);if(H===null){N===null&&(N=$);break}e&&N&&H.alternate===null&&t(P,N),k=o(H,k,z),I===null?R=H:I.sibling=H,I=H,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),R;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var q=m(P,N,H.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),I===null?R=q:I.sibling=q,I=q,N=$}if(H.done)return n(P,N),nr&&mf(P,z),R;if(N===null){for(;!H.done;z++,H=T.next())H=p(P,H.value,M),H!==null&&(k=o(H,k,z),I===null?R=H:I.sibling=H,I=H);return nr&&mf(P,z),R}for(N=r(P,N);!H.done;z++,H=T.next())H=v(N,P,z,H.value,M),H!==null&&(e&&H.alternate!==null&&N.delete(H.key===null?z:H.key),k=o(H,k,z),I===null?R=H:I.sibling=H,I=H);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var R=T.key,I=k;I!==null;){if(I.key===R){if(R=T.type,R===Np){if(I.tag===7){n(P,I.sibling),k=i(I,T.props.children),k.return=P,P=k;break e}}else if(I.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ec&&tP(R)===I.type){n(P,I.sibling),k=i(I,T.props),k.ref=Lg(P,I,T),k.return=P,P=k;break e}n(P,I);break}else t(P,I);I=I.sibling}T.type===Np?(k=Bf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=k3(T.type,T.key,T.props,null,P.mode,M),M.ref=Lg(P,k,T),M.return=P,P=M)}return a(P);case Ip:e:{for(I=T.key;k!==null;){if(k.key===I)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=vx(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return I=T._init,E(P,k,I(T._payload),M)}if(Jg(T))return S(P,k,T,M);if(kg(T))return w(P,k,T,M);hy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=mx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var O0=WR(!0),VR=WR(!1),Hv={},bl=ud(Hv),iv=ud(Hv),ov=ud(Hv);function Af(e){if(e===Hv)throw Error(Re(174));return e}function u7(e,t){switch(jn(ov,t),jn(iv,e),jn(bl,Hv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(iv),Zn(ov)}function UR(e){Af(ov.current);var t=Af(bl.current),n=qw(t,e.type);t!==n&&(jn(iv,e),jn(bl,n))}function c7(e){iv.current===e&&(Zn(bl),Zn(iv))}var ur=ud(0);function S5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cx=[];function d7(){for(var e=0;en?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function aI(){return Ba().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sI(e))lI(t,n);else if(n=FR(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),uI(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sI(e))lI(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FR(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),uI(n,t,r))}}function sI(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function lI(e,t){wm=b5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uI(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x5={readContext:Fa,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},aX={readContext:Fa,useCallback:function(e,t){return sl().memoizedState=[e,t===void 0?null:t],e},useContext:Fa,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,tI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:m7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),di===null)throw Error(Re(349));(Kf&30)!==0||YR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(KR.bind(null,r,o,e),[e]),r.flags|=2048,lv(9,qR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=di.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=av++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[rv]=r,yI(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Mg(o,!1),t.lanes=4194304)}else{if(!r)if(e=S5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Fi(t),null}else 2*Or()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Mg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,jn(ur,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function pX(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(a6=l5,e=_R(),e7(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s6={focusedElem:e,selectionRange:n},l5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:fs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function Cm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&C6(t,n,o)}i=i.next}while(i!==r)}}function T4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function _6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xI(e){var t=e.alternate;t!==null&&(e.alternate=null,xI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[rv],delete t[c6],delete t[QK],delete t[JK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wI(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wI(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function k6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=d5));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Ei=null,hs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)CI(e,t,n),n=n.sibling}function CI(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(b4,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Ei,i=hs;Ei=null,Sc(e,t,n),Ei=r,hs=i,Ei!==null&&(hs?(e=Ei,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ei.removeChild(n.stateNode));break;case 18:Ei!==null&&(hs?(e=Ei,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Qm(e)):lx(Ei,n.stateNode));break;case 4:r=Ei,i=hs,Ei=n.stateNode.containerInfo,hs=!0,Sc(e,t,n),Ei=r,hs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&C6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ss(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,_5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-b7?Ff(e,0):S7|=n),Lo(e,t)}function MI(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=ro();e=mu(e,t),e!==null&&(Fv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),MI(e,n)}function kX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),MI(e,n)}var OI;OI=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&NR(t,g5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Wi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,h5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E4,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=fs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,fs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),uP(e,t,r,i,n);case 3:e:{if(gI(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,BR(e,t),y5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=I0(Error(Re(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=I0(Error(Re(424)),t),t=cP(e,t,r,n,i);break e}else for(oa=Uc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,gs=null,n=VR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=vu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return UR(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),pI(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return mI(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,jn(m5,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=vu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Fa(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=fs(r,t.pendingProps),i=fs(r.type,i),lP(e,t,r,i,n);case 15:return fI(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h5(t)):e=!1,o0(t,n),HR(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return vI(e,t,n);case 22:return hI(e,t,n)}throw Error(Re(156,t.tag))};function RI(e,t){return oR(e,t)}function EX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(e,t,n,r){return new EX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Ia(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return Bf(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case WO:return L4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $O:a=10;break e;case HO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Bf(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L4(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=WO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function AX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Ol);const yy=I9(Ol.exports);var wP=Ol.exports;Fw.createRoot=wP.createRoot,Fw.hydrateRoot=wP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N4={exports:{}},D4={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var IX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,FX=IX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,BX={key:!0,ref:!0,__self:!0,__source:!0};function zI(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zX.call(t,r)&&!BX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NX,type:e,key:o,ref:a,props:i,_owner:FX.current}}D4.Fragment=DX;D4.jsx=zI;D4.jsxs=zI;(function(e){e.exports=D4})(N4);const Tn=N4.exports.Fragment,x=N4.exports.jsx,re=N4.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Wv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var HX="chakra-ui-color-mode";function WX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FI(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(A7.Provider,{value:T,children:n})}FI.displayName="ColorModeProvider";var M6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",I="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",q="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",ee="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[V]=Se[J]=Se[ie]=Se[ee]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[H]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[R]=Se[I]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Be=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Be||Function("return this")(),dt=t&&!t.nodeType&&t,Ye=dt&&!0&&e&&!e.nodeType&&e,rt=Ye&&Ye.exports===dt,Ze=rt&&xe.process,Ke=function(){try{var U=Ye&&Ye.require&&Ye.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Ke&&Ke.isTypedArray;function bt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,qe=Array(U);++pe-1}function x1(U,ne){var pe=this.__data__,qe=Ya(pe,U);return qe<0?(++this.size,pe.push([U,ne])):pe[qe][1]=ne,this}Io.prototype.clear=kd,Io.prototype.delete=b1,Io.prototype.get=Iu,Io.prototype.has=Ed,Io.prototype.set=x1;function Os(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&kh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),ne=Object(ne);++qe-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return _n.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Md=Fl(function(){return arguments}())?Fl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Hu(U)}function Eh(U){return Wn(U)&&Ht(U)}var $u=Zt||I1;function Hu(U){if(!Fo(U))return!1;var ne=Is(U);return ne==v||ne==S||ne==u||ne==T}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Fo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Is(U)!=k)return!1;var ne=an(U);if(ne===null)return!0;var pe=mn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&_n.call(pe)==Xt}var Th=Et?it(Et):Du;function Rd(U){return Gr(U,Ah(U))}function Ah(U){return Ht(U)?M1(U,!0):Ns(U)}var sn=qa(function(U,ne,pe,qe){No(U,ne,pe,qe)});function Wt(U){return function(){return U}}function Lh(U){return U}function I1(){return!1}e.exports=sn})(M6,M6.exports);const vl=M6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function cv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ls(e,t){return n=>{const r={property:n,scale:e};return r.transform=cv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?cv({scale:n,compose:r}):r}}var BI=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...BI].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...BI].join(" ")}var XX={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ZX={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function QX(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},$I="& > :not(style) ~ :not(style)",eZ={[$I]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[$I]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},R6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nZ=new Set(Object.values(R6)),HI=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||HI.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in R6?R6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=WI(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var WI=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,nn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(nn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||WI(e)||HI.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ls("borderWidths"),borderStyles:ls("borderStyles"),colors:ls("colors"),borders:ls("borders"),radii:ls("radii",nn.px),space:ls("space",by(nn.vh,nn.px)),spaceT:ls("space",by(nn.vh,nn.px)),degreeT(e){return{property:e,transform:nn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:cv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ls("sizes",by(nn.vh,nn.px)),sizesT:ls("sizes",by(nn.vh,nn.fraction)),shadows:ls("shadows"),logical:YX,blur:ls("blur",nn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",nn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:nn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",nn.gradient),bgClip:{transform:nn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var fn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},I6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(I6,{shadow:I6.boxShadow});var uZ={filter:{transform:nn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",nn.brightness),contrast:ae.propT("--chakra-contrast",nn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",nn.invert),saturate:ae.propT("--chakra-saturate",nn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",nn.dropShadow),backdropFilter:{transform:nn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",nn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",nn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",nn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",nn.saturate)},P5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:nn.flexDirection},experimental_spaceX:{static:eZ,transform:cv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:cv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(P5,{flexDir:P5.flexDirection});var VI={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:nn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",nn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},Em={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Em,{insetStart:Em.insetInlineStart,insetEnd:Em.insetInlineEnd});var yZ={ring:{transform:nn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={clipPath:!0,transform:ae.propT("transform",nn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},wZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",nn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function UI(e){return xs(e)&&e.reference?e.reference:String(e)}var z4=(e,...t)=>t.map(UI).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${z4("+",...e)})`,PP=(...e)=>`calc(${z4("-",...e)})`,N6=(...e)=>`calc(${z4("*",...e)})`,TP=(...e)=>`calc(${z4("/",...e)})`,AP=e=>{const t=UI(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(N6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:N6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function ei(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var GI=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(GI));function LP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function RZ(e){const t=Object.keys(L7(e));return new Set(t)}function MP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function nm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function IZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(GI).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:nm(null,u),minWQuery:nm(a),minMaxQuery:nm(a,u)}}),r=RZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>nm(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>jI(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>jI(t=>e(t,"~ &"),"[data-peer]",".peer"),jI=(e,...t)=>t.map(e).join(", "),F4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:tu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:tu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:tu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:tu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:tu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:tu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:tu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:tu(Ci.focusWithin),_peerPlaceholderShown:tu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(F4);function OP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function DZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=F4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function FZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var BZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return FZ(e,BZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:IZ(n.breakpoints)}),n}var M7=vl({},E3,fn,lZ,P5,Ta,uZ,yZ,cZ,VI,vZ,Em,I6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Ta,P5,VI,Em),jZ=Object.keys(GZ),YZ=[...Object.keys(M7),...NZ],qZ={...M7,...F4},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var YI=e=>t=>tQ({theme:t,pseudos:F4,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Pi(t1,--Ro):0,D0--,$r===10&&(D0=1,$4--),$r}function sa(){return $r=Ro2||fv($r)>3?"":" "}function SQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Vv(e,P3()+(t<6&&xl()==32&&sa()==32))}function B6(e){for(;sa();)switch($r){case e:return Ro;case 34:case 39:e!==34&&e!==39&&B6($r);break;case 40:e===41&&B6(e);break;case 92:sa();break}return Ro}function bQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Vv(t,Ro-1)+"*"+B4(e===47?e:sa())}function xQ(e){for(;!fv(xl());)sa();return Vv(e,Ro)}function wQ(e){return JI(A3("",null,null,null,[""],e=QI(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,I=r,N=T;E;)switch(S=k,k=sa()){case 40:if(S!=108&&Pi(N,p-1)==58){F6(N+=bn(T3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=T3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(P3()-1,7);continue;case 47:switch(xl()){case 42:case 47:xy(CQ(bQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&xy(v>32?IP(N+";",r,n,p-1):IP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(I=RP(N,t,n,u,h,i,s,T,M=[],R=[],p),o),k===123)if(h===0)A3(N,t,I,I,M,o,p,s,R);else switch(m===99&&Pi(N,3)===110?100:m){case 100:case 109:case 115:A3(e,I,I,r&&xy(RP(e,I,I,0,0,i,s,T,i,M=[],p),R),i,R,p,s,r?M:R);break;default:A3(N,I,I,I,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=T3(sa())),m=xl(),h=p=cl(T=N+=xQ(P3())),k++;break;case 45:S===45&&cl(N)==2&&(w=0)}}return o}function RP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=I7(m),S=0,w=0,E=0;S0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return H4(e,t,n,i===0?O7:s,l,u,h)}function CQ(e,t,n){return H4(e,t,n,qI,B4(mQ()),dv(e,2,-2),0)}function IP(e,t,n,r){return H4(e,t,n,R7,dv(e,0,r),dv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=I7(e),i=0;i6)switch(Pi(e,t+1)){case 109:if(Pi(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+T5+(Pi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~F6(e,"stretch")?tN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pi(e,t+1)!==115)break;case 6444:switch(Pi(e,cl(e)-3-(~F6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Pi(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Pi(e,t+11)){case 114:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Bi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case R7:t.return=tN(t.value,t.length);break;case KI:return s0([Rg(t,{value:bn(t.value,"@","@"+hn)})],i);case O7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Rg(t,{props:[bn(o,/:(read-\w+)/,":"+T5+"$1")]})],i);case"::placeholder":return s0([Rg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Rg(t,{props:[bn(o,/:(plac\w+)/,":"+T5+"$1")]}),Rg(t,{props:[bn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},RQ=[OQ],nN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||RQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},Sx=eN(function(e){return uN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),FP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!uN(t)&&typeof n=="number"&&n!==0?n+"px":n};function hv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,hv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function cJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},mN=dJ(cJ);function vN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var yN=e=>vN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function SN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var mJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vJ=eN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return sN(n,r,i),KQ(function(){return lN(n,r,i)}),null},xJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||WP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),RJ=Ln("list").parts("container","item","icon"),IJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),FJ=Ln("progress").parts("label","filledTrack","track"),BJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Li(e,t){YJ(e)&&(e="100%");var n=qJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function wy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function bN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Li(e,255)*255,g:Li(t,255)*255,b:Li(n,255)*255}}function UP(e,t,n){e=Li(e,255),t=Li(t,255),n=Li(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XJ(e,t,n){var r,i,o;if(e=Li(e,360),t=Li(t,100),n=Li(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Li(e,255),t=Li(t,255),n=Li(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var V6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=bN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),xx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),ds={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ds.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ds.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ds.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ds.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ds.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ds.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ds.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=ds.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=ds.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=ds.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function nu(e){return Boolean(ds.CSS_UNIT.exec(String(e)))}var Uv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=eee(t)),this.originalInput=t;var i=tee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=bN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),QJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Li(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Li(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=wy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=wy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=wy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=wy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(xN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Uv(a)}function oee(e,t){var n=uee(e),r=A5(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A5([0,100],t.seed);var n=wN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return A5([r,i],t.seed)}function see(e,t,n){var r=lee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return A5([r,i],n.seed)}function lee(e,t){for(var n=wN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=_N.find(function(a){return a.name===e});if(n){var r=CN(n);if(r.hueRange)return r.hueRange}var i=new Uv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function wN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=_N;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function CN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var _N=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function cee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ti=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new Uv(r);return i?r:n},fee=e=>t=>{const n=Ti(t,e);return new Uv(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ti(n,e);return new Uv(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function pee(e){const t=xN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function mee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function kN(e){return yee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(kN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${eS("+",...e)})`,XP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,ZP=(...e)=>`calc(${eS("/",...e)})`,QP=e=>{const t=kN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(U6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:U6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function EN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,EN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${EN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Gv,defineMultiStyleConfig:Ree}=rr(_J.keys),la=ei("alert-fg"),yu=ei("alert-bg"),Iee=Gv({container:{bg:yu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark}}}}),Dee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),zee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),Fee=Gv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[yu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[yu.variable]:`colors.${t}.200`},color:la.reference}}}),Bee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Fee},$ee=Ree({baseStyle:Iee,variants:Bee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),PN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Hee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...PN,...Hee,container:Wee},TN=Vee,Uee=e=>typeof e=="function";function fi(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:AN,defineMultiStyleConfig:Gee}=rr(kJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},Yee={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},JP=ei("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},Kee=AN(e=>({badge:fi(jee,e),excessLabel:fi(Yee,e),container:fi(qee,e)}));function xc(e){const t=e!=="100%"?TN[e]:void 0;return AN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),yl=ei("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[u0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:u0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},Tm={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},LN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},ute=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(LN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=cte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},fte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:LN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:vte}=rr(PJ.keys),Am=ei("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Am.reference,h:Am.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=L3(e=>({icon:xte,container:Ste,control:fi(yte,e),label:bte})),Cte={sm:L3({control:{[Am.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Am.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Am.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L5=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Lm=Vi("close-button-size"),Ig=Vi("close-button-bg"),_te={w:[Lm.reference],h:[Lm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ig.variable]:"colors.blackAlpha.100",_dark:{[Ig.variable]:"colors.whiteAlpha.100"}},_active:{[Ig.variable]:"colors.blackAlpha.200",_dark:{[Ig.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ig.reference},kte={lg:{[Lm.variable]:"sizes.10",fontSize:"md"},md:{[Lm.variable]:"sizes.8",fontSize:"xs"},sm:{[Lm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=Tm,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Rte={opacity:.6,borderColor:"inherit"},Ite={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Ite,dashed:Nte},zte={baseStyle:Rte,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:Fte}=rr(TJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function vp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Bte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=G6(e=>({overlay:Bte,dialogContainer:$te,dialog:fi(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},qte=Fte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),c0=ei("form-control-color"),ine={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},one={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),d0=ei("form-error-color"),cne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r),boxShadow:`0 0 0 1px ${Ti(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ti(t,n),boxShadow:`0 0 0 1px ${Ti(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r)},_focusVisible:{bg:"transparent",borderColor:Ti(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r),boxShadow:`0px 1px 0px 0px ${Ti(t,r)}`},_focusVisible:{borderColor:Ti(t,n),boxShadow:`0px 1px 0px 0px ${Ti(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(RJ.keys),Rne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Ine=One({icon:Rne}),Nne=Mne({baseStyle:Ine}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(IJ.keys),Fne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Bne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:fi(Fne,e),item:fi(Bne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:j6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=j6(e=>({overlay:Yne,dialogContainer:fi(qne,e),dialog:fi(Kne,e),header:Xne,closeButton:Zne,body:fi(Qne,e),footer:Jne}));function us(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:us("xs"),sm:us("sm"),md:us("md"),lg:us("lg"),xl:us("xl"),"2xl":us("2xl"),"3xl":us("3xl"),"4xl":us("4xl"),"5xl":us("5xl"),"6xl":us("6xl"),full:us("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},MN=rre,{defineMultiStyleConfig:ire,definePartsStyle:ON}=rr(DJ.keys),V7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu(V7).add("0.5rem").toString(),are={[V7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=fi(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[V7.reference]},ure=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),cre=ON(e=>({root:are,field:fi(sre,e)??{},stepperGroup:lre,stepper:fi(ure,e)??{}}));function _y(e){var t,n;const r=(t=pn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=MN.fontSizes[o];return ON({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,gre={outline:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),ky=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[ky.variable]:"colors.white",bg:ky.reference,[Sre.variable]:ky.reference,[nT.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:rm}=rr(FJ.keys),Are=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ti(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Rre=rm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Ire={xs:rm({track:{h:"1"}}),sm:rm({track:{h:"2"}}),md:rm({track:{h:"3"}}),lg:rm({track:{h:"4"}})},Nre=Tre({sizes:Ire,baseStyle:Rre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:M3}=rr(BJ.keys),zre=e=>{var t;const n=(t=fi(L5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Fre=M3(e=>{var t,n,r,i;return{label:(n=(t=L5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L5).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Bre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Fre,sizes:Bre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Ey={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Ey}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Ey}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Ey}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Ey},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=ei("skeleton-start-color"),Kre=ei("skeleton-end-color"),Xre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ti(o,r),s=Ti(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Ex=ei("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:tS}=rr(HJ.keys),mv=ei("slider-thumb-size"),vv=ei("slider-track-size"),Mc=ei("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...$7({orientation:e.orientation,horizontal:{h:vv.reference},vertical:{w:vv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...$7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:mv.reference,h:mv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=tS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=tS({container:{[mv.variable]:"sizes.4",[vv.variable]:"sizes.1"}}),sie=tS({container:{[mv.variable]:"sizes.3.5",[vv.variable]:"sizes.1"}}),lie=tS({container:{[mv.variable]:"sizes.2.5",[vv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:IN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=IN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:IN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:O3}=rr(VJ.keys),Mm=Vi("switch-track-width"),$f=Vi("switch-track-height"),Px=Vi("switch-track-diff"),Cie=lu.subtract(Mm,$f),Y6=Vi("switch-thumb-x"),Ng=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Mm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Ng.variable]:"colors.gray.300",_dark:{[Ng.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ng.variable]:`colors.${t}.500`,_dark:{[Ng.variable]:`colors.${t}.200`}},bg:Ng.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${Y6.reference})`}},Eie=O3(e=>({container:{[Px.variable]:Cie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:lu(Px).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:O3({container:{[Mm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:O3({container:{[Mm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:O3({container:{[Mm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:f0}=rr(UJ.keys),Lie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),M5={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Rie={simple:Mie,striped:Oie,unstyled:{}},Iie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Rie,sizes:Iie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Fie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Bie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Fie(e),tablist:Bie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Uie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gie=wl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ti(n,`${t}.700`),bg:Ti(n,`${t}.100`)}}}}),Yie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},roe={subtle:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},Py=Vi("tooltip-bg"),Tx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[uoe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:Tm,Breadcrumb:ste,Button:mte,Checkbox:L5,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},woe=xoe,Coe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_oe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...MN,sizes:TN,shadows:woe,space:PN,borders:poe,transition:Poe},Roe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Ioe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Roe,direction:Noe,...Ooe,components:foe,styles:Ioe,config:Doe},Foe=typeof Element<"u",Boe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function R3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!R3(e[r],t[r]))return!1;return!0}var o;if(Boe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!R3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Hoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Foe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!R3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return R3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function n1(){const e=C.exports.useContext(pv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function NN(){const e=Wv(),t=n1();return{...e,theme:t}}function Voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Uoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Goe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return re(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q4,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function qoe(){const{colorMode:e}=Wv();return x(Q4,{styles:t=>{const n=mN(t,"styles.global"),r=SN(n,{theme:t,colorMode:e});return r?YI(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=vN(a,(p,m)=>KZ(m)),l=SN(e,t),u=Object.assign({},i,l,yN(s),o),h=YI(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Wv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function DN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=NN(),a=e?mN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},yN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return DN(e,t)}function Ri(e,t={}){return DN(e,t)}function Joe(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bn(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>Bn(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O5=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function oae(){const e=C.exports.useRef(new iae);return q6(()=>()=>e.current.destroy()),e.current}var[aae,zN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=zN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function FN(){return[O5(aae),()=>O5(zN()),()=>oae(),i=>sae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),bT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function lae(){return C.exports.useContext(rS).visualElement}const r1=C.exports.createContext(null),ah=typeof document<"u",R5=ah?C.exports.useLayoutEffect:C.exports.useEffect,BN=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext(BN),a=C.exports.useContext(r1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return R5(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),R5(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function yv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||dae.some(t=>yv(e[t]))}function $N(e){return Boolean(oS(e)||e.variants)}function fae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||yv(n)?n:void 0,animate:yv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Sv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?Sv.projectionNodeConstructor=e[t]:Sv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Om={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return aS(()=>{if(Om.hasEverUpdated)return gae++})}const G7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const HN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext(BN).strict,P=C.exports.useContext(HN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Sv.projectionNodeConstructor,P))}return re(vae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function j7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const I5={};function Cae(e){Object.assign(I5,e)}const N5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jv=new Set(N5);function WN(e,{layout:t,layoutId:n}){return jv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!I5[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>N5.indexOf(e)-N5.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function VN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,UN=(e,t)=>n=>Math.max(Math.min(n,t),e),Rm=e=>e%1?Number(e.toFixed(5)):e,bv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Yv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},sh),{transform:UN(0,1)}),Ty=Object.assign(Object.assign({},sh),{default:1}),qv=e=>({test:t=>Yv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=qv("deg"),Cl=qv("%"),wt=qv("px"),Aae=qv("vh"),Lae=qv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),Y7=(e,t)=>n=>Boolean(Yv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),GN=(e,t,n)=>r=>{if(!Yv(r))return r;const[i,o,a,s]=r.match(bv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:Y7("hsl","hue"),parse:GN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Rm(t))+", "+Cl.transform(Rm(n))+", "+Rm(Im.transform(r))+")"},Mae=UN(0,255),Lx=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:Y7("rgb","red"),parse:GN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Rm(Im.transform(r))+")"};function Oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const X6={test:Y7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||X6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):X6.parse(e),transform:e=>Yv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},jN="${c}",YN="${n}";function Rae(e){var t,n,r,i;return isNaN(e)&&Yv(e)&&((n=(t=e.match(bv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function qN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,jN),t.push(...r.map(Ji.parse)));const i=e.match(bv);return i&&(e=e.replace(bv,YN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function KN(e){return qN(e).values}function XN(e){const{values:t,numColors:n,tokenised:r}=qN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Nae(e){const t=KN(e);return XN(e)(t.map(Iae))}const Su={test:Rae,parse:KN,createTransformer:XN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Fae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},Su),{getAnimatableNone:e=>{const t=e.match(Fae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},ZN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Im,strokeOpacity:Im,numOctaves:CT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(VN(m)){o[m]=v;continue}const S=ZN[m],w=Pae(v,S);if(jv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Eae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function QN(e,t,n){for(const r in t)!ws(t[r])&&!WN(r,n)&&(e[r]=t[r])}function Bae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return QN(i,r,e),Object.assign(i,Bae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Gae,...Vae,...Wae,...Uae]);function D5(e){return jae.has(e)}let JN=e=>!D5(e);function Yae(e){!e||(JN=t=>t.startsWith("on")?!D5(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(JN(i)||n===!0&&D5(i)||!t&&!D5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Qae(p,o,a,s,!1)}const eD=()=>({...K7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=eD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};QN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const tD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function nD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const rD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function iD(e,t,n,r){nD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(rD.has(i)?i:tD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||WN(r,e))&&(n[r]=t[r]);return n}function oD(e){const t=Z7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const xv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),aD=e=>xv(e)?e[e.length-1]||0:e;function I3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const sD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(r1),o=()=>nse(e,t,r,i);return n?o():aS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=I3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=$N(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:sD({scrapeMotionValuesFromProps:oD,createRenderState:eD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),iD(t,n)}})},ose={useVisualState:sD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function lD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function uD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:uD(e)?cse(e,t):dse(e,t)}}const cD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function dD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function h0(e,t,n,r){return sS(e,dD(t),cD(n,t==="pointerdown"),r)}function z5(e,t,n,r){return Q6(e,dD(t),n&&cD(n,t==="pointerdown"),r)}function fD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=fD("dragHorizontal"),ET=fD("dragVertical");function hD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function pD(){const e=hD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!lD(r)||pD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z5(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),z5(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const gD=(e,t)=>t?e===t?!0:gD(e,t.parentElement):!1;function e8(e){return C.exports.useEffect(()=>()=>e(),[])}function mD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Mx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=B5(bse,xse,a),e=B5(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cse=12;function _se(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=mD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=J6(T,k);v=R=>{const I=Math.exp(-k*T*R);return n-I*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const I=Math.exp(-k*T*R);return k*T*I*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-I*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const I=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-I*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,wv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[X6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),vD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce(Lse);function yD(e,t){return eC(e)?n=>wr(e,t,n):Ji.test(e)?vD(e,t):bD(e,t)}const SD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>yD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=yD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function RT(e){const t=Su.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=Su.createTransformer(t),r=RT(e),i=RT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(SD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Rse(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?vD:bD;if(Array.isArray(e))return SD;if(typeof e=="object")return Mse}function Ise(e,t,n){const r=[],i=n||Rse(e[0]),o=e.length-1;for(let a=0;an(wv(e,t,r))}function Dse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=wv(e[o],e[o+1],i);return t[o](s)}}function xD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;F5(o===t.length),F5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Ise(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(B5(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),wD=e=>t=>t*t*((e+1)*t-e),Fse=e=>{const t=wD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},CD=1.525,Bse=4/11,$se=8/11,Hse=9/10,r8=e=>e,i8=zse(2),Wse=uS(i8),_D=n8(i8),kD=e=>1-Math.sin(Math.acos(e)),o8=uS(kD),Vse=n8(o8),a8=wD(CD),Use=uS(a8),Gse=n8(a8),jse=Fse(CD),Yse=4356/361,qse=35442/1805,Kse=16061/1805,$5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-$5(1-e*2)):.5*$5(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||_D).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function N3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return xD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const IT={keyframes:N3,spring:t8,decay:tle};function nle(e){if(Array.isArray(e.to))return N3;if(IT[e.type])return IT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t8:N3}const ED=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),PD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),ED);function ile(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ile(()=>Cv=!0),e),{}),ale=Kv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||ule(),n.schedule(r,i,o)),e},{}),sle=Kv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});Kv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const lle=e=>cS[e].process(p0),TD=e=>{Cv=!1,p0.delta=tC?ED:Math.max(Math.min(e-p0.timestamp,ole),1),p0.timestamp=e,nC=!0,Kv.forEach(lle),nC=!1,Cv&&(tC=!1,PD(TD))},ule=()=>{Cv=!0,tC=!0,nC||PD(TD)},cle=()=>p0;function AD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?AD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function LD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=mD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,I=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=xD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function H(){k++,l==="reverse"?(I=k%2===0,a=dle(a,T,u,I)):(a=AD(a,T,u),l==="mirror"&&$.flipTarget()),R=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(I||(J=-J),a+=J,!R){const ie=$.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),R=I?ie.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{p?.(),P.stop()}}}function MD(e,t){return t?e*(1e3/t):0}function ple({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;p?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let I,N;const z=$=>{I=N,N=$,t=MD($-I,cle().delta),(R===1&&$>M||R===-1&&$S?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s8(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=NT(e)&&NT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const OD=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ID=e=>3*e,H5=(e,t,n)=>((OD(t,n)*e+RD(t,n))*e+ID(t))*e,ND=(e,t,n)=>3*OD(t,n)*e*e+2*RD(t,n)*e+ID(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H5(o(a),t,r)}function wle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!pD()}function p(S,w){!h()||(gD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}z5(i,"pointerdown",o?v:void 0,l),e8(u)}const Cle="production",DD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function zD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const iC=new WeakMap,Rx=new WeakMap,_le=e=>{const t=iC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Rx.has(n)||Rx.set(n,{});const r=Rx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ale[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(DD!=="production"&&zD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Fc=e=>t=>(e(t),null),Ole={inView:Fc(Tle),tap:Fc(wle),focus:Fc(sse),hover:Fc(vse)};function l8(){const e=C.exports.useContext(r1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Rle(){return Ile(C.exports.useContext(r1))}function Ile(e){return e===null?!0:e.isPresent}function FD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Nle={linear:r8,easeIn:i8,easeInOut:_D,easeOut:Wse,circIn:kD,circInOut:Vse,circOut:o8,backIn:a8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:$5},zT=e=>{if(Array.isArray(e)){F5(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",FT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Su.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ix=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),BT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:My,scaleY:My,scale:My,opacity:Ix,backgroundColor:Ix,color:Ix,default:My},Fle=(e,t)=>{let n;return xv(t)?n=zle:n=BT[e]||BT.default,{to:t,...n(t)}},Ble={...ZN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:Z6,WebkitFilter:Z6},u8=e=>Ble[e];function c8(e,t){var n;let r=u8(e);return r!==Z6&&(r=Su),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},BD=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),$D=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),BD);function Wle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Wle(()=>_v=!0),e),{}),Cs=Xv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(_v||Gle(),n.schedule(r,i,o)),e},{}),Qf=Xv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Xv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),Ule=e=>dS[e].process(g0),HD=e=>{_v=!1,g0.delta=oC?BD:Math.max(Math.min(e-g0.timestamp,Vle),1),g0.timestamp=e,aC=!0,Xv.forEach(Ule),aC=!1,_v&&(oC=!1,$D(HD))},Gle=()=>{_v=!0,oC=!0,aC||$D(HD)},sC=()=>g0;function WD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W5(o.duration)),o.repeatDelay&&(a.repeatDelay=W5(o.repeatDelay)),e&&(a.ease=Dle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function qle(e,t){var n,r;return(r=(n=(d8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Fle(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=d8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=FT(e,n);a==="none"&&s&&typeof n=="string"?a=c8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=FT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?ple({...p,...o}):LD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=aD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function HT(e){return typeof e=="number"?0:c8("",e)}function d8(e,t){return e[t]||e.default||e}function f8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=WD(l,W5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function h8(e,t){e.indexOf(t)===-1&&e.push(t)}function p8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nm{constructor(){this.subscriptions=[]}add(t){return h8(this.subscriptions,t),()=>p8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Nm,this.velocityUpdateSubscribers=new Nm,this.renderSubscribers=new Nm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Cs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?MD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new tue(e)}const VD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},UD=[sh,wt,Cl,Cc,Lae,Aae,nue],Dg=e=>UD.find(VD(e)),rue=[...UD,Ji,Su],iue=e=>rue.find(VD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=aD(o[a]);sue(e,a,s)}}function uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;slC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=GD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>GD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return hue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function GD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&jv.has(m)&&(w={...w,type:!1,delay:0});let E=f8(m,v,S,w);V5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(pue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...g8].reverse(),vue=g8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&I;const q=Array.isArray(R)?R:[R];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=ee=>{H=!0,S.delete(ee),M.needsAnimating[ee]=!0};for(const ee in J){const X=de[ee],G=V[ee];w.hasOwnProperty(ee)||(X!==G?xv(X)&&xv(G)?!FD(X,G)||$?ie(ee):M.protectedKeys[ee]=!0:X!==void 0?ie(ee):S.add(ee):X!==void 0&&S.has(ee)?ie(ee):M.protectedKeys[ee]=!0)}M.prevProp=R,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(H=!1),H&&!z&&v.push(...q.map(ee=>({animation:ee,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Fc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Fc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l8(),o=C.exports.useContext(r1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class jD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Dx(h,this.transformPagePoint),lD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},uD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:WT(e,YD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function YD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=YD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function da(e){return e.max-e.min}function VT(e,t=0,n=.01){return s8(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Pue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=wv(t.min,t.max-r,e.min):r>i&&(n=wv(e.min,e.max-i,t.min)),B5(0,1,n)}function Lue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uC=.35;function Mue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),ki=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function qD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Rue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Fx(e)||!Fx(t)||!Fx(n)}function yf(e){return cC(e)||KD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function KD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function U5(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=U5(e,i,r)),U5(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function XD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Iue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=hD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=da(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=$ue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new jD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=qD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f8(t,r,0,n)}stopAnimation(){ll(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ll(n=>{const{drag:r}=this.getProps();if(!Oy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ll(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;Fue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ll(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Bue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new jD(h,l,{transformPagePoint:s})}z5(i,"pointerdown",o&&u),e8(()=>a.current&&a.current.end())}const Vue={pan:Fc(Wue),drag:Fc(Hue)},fC={current:null},QD={current:!1};function Uue(){if(QD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Ry=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ry.map(()=>new Nm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ry.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Ry[i]]=o=>r.add(o),n["notify"+Ry[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),V5(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),V5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const JD=Object.keys(Sv),Yue=JD.length,ez=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const R=Gue(),I=new Map,N=new Map;let z={};const $={...k},H=p.initial?{...k}:{};let q;function de(){!M||!P||(V(),o(M,T,p.style,j.projection))}function V(){t(j,T,k,E,p)}function J(){R.notifyUpdate(k)}function ie(Z,me){const Se=me.onChange(Be=>{k[Z]=Be,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:ee,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),V5(ee)&&ee.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=oS(p),Q=$N(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),I.forEach((me,Se)=>ie(Se,me)),QD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),R.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Be,We){const dt=[];for(let Ye=0;Yej.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return dt},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),I.set(Z,me),k[Z]=me.get(),ie(Z,me)},removeValue(Z){var me;I.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>I.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=I.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>I.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=Q7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Be=n(p,Z);if(Be!==void 0&&!ws(Be))return Be}return H[Z]!==void 0&&xe===void 0?void 0:$[Z]},...R,build(){return V(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,R.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),rz=e=>Zue.has(e),Que=e=>Object.keys(e).some(rz),iz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},Jue=new Set(["x","y","z"]),ece=N5.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},nce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);iz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(rz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Dg(h);const m=t[l];let v;if(xv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Dg(h);for(let E=w;E=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const oz={treeType:"dom",readValueFromInstance(e,t){if(jv.has(t)){const n=u8(t);return n&&n.default||0}else{const n=ace(e),r=(VN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ZD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:nD},sce=ez(oz),lce=ez({...oz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return jv.has(t)?((n=u8(t))===null||n===void 0?void 0:n.default)||0:(t=rD.has(t)?t:tD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:oD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:iD}),uce=(e,t)=>j7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(nz,v=>(o.push(v),lA)));const a=Su.parse(e);if(a.length>5)return r;const s=Su.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Om.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Cs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function fce(e){const[t,n]=l8(),r=C.exports.useContext(G7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(HN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...zg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zg,borderTopRightRadius:zg,borderBottomLeftRadius:zg,borderBottomRightRadius:zg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return f8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const az=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=az.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(wv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function cs(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=U5(e,1/n,r),i!==void 0&&(e=U5(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function lz(e){return mA(e.x)&&mA(e.y)}function uz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return da(e.x)/da(e.y)}function Cce(e,t,n=.1){return s8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){h8(this.members,t),t.scheduleRender()}remove(t){if(p8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){h8(this.children,t),this.isDirty=!0}remove(t){p8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function cz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Oce),this.nodes.forEach(Rce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=WD(v,250),Om.hasAnimatedSinceResize&&(Om.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Fce,{onLayoutAnimationStart:I,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!uz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const H={...d8(R,"layout"),onPlay:I,onComplete:N};p.shouldReduceMotion&&(H.delay=0,H.type=!1),this.startAnimation(H)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Qf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Ice))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(zm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Om.hasAnimatedSinceResize=!0,this.currentAnimation=gce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&dz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}cs(s,l),Yp(s,h),Dm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Tce(e){e.updateLayout()}function Ace(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):dz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=Fm();Dm(l,o,i.layout);const u=Fm();i.isShared?Dm(u,e.applyTransform(a,!0),i.measured):Dm(u,o,i.layout);const h=!lz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=ki();zm(S,i.layout,m.layout);const w=ki();zm(w,o,v.actual),uz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Oce(e){e.resolveTargetDelta()}function Rce(e){e.calcProjection()}function Ice(e){e.resetRotation()}function Nce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Fce={duration:.45,ease:[.4,0,.1,1]};function Bce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function dz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=cz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bx={current:void 0},Hce=cz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Bx.current=e}return Bx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Rl=xae((e,t)=>ase(e,t,Wce,uce,Hce));function fz(){const e=C.exports.useRef(!1);return R5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=fz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(jce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Gce,{isPresent:n,children:e})),x(r1.Provider,{value:u,children:e})};function jce(){return new Map}const Op=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const fd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",zD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=fz(),h=qce(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(R5(()=>{w.current=!1,Yce(h,S),v.current=p}),e8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Tn,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const E=v.current.map(Op),P=h.map(Op),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),I=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(R,0,x($x,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),DD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Tn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Fg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function mC(e){switch(e?.direction??"right"){case"right":return Fg.slideRight;case"left":return Fg.slideLeft;case"bottom":return Fg.slideDown;case"top":return Fg.slideUp;default:return Fg.slideRight}}var Wf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??_s.enter(TA.enter,i)})},pz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(fd,{initial:!1,custom:w,children:E&&le.createElement(Rl.div,{ref:t,...p,className:Zv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});pz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},gz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(fd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-fade",o),custom:m,...gz,animate:h,...u})})});ede.displayName="Fade";var tde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},mz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(fd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-offset-slide",s),...mz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},vz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(fd,{custom:P,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Zv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});vz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(fd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});ode.displayName="SlideFade";var Qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,pS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[lde,m8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ude,LPe,cde,dde]=FN(),If=Pe(function(t,n){const{getButtonProps:r}=m8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Qv("chakra-accordion__button",t.className),__css:a})});If.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,v8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const H={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.node.focus()}}[z.key];H&&(z.preventDefault(),H(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),I=C.exports.useCallback(function($={},H=null){return{...$,type:"button",ref:Bn(m,s,H),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx($.onClick,T),onFocus:Hx($.onFocus,R),onKeyDown:Hx($.onKeyDown,M)}},[h,t,w,T,R,M,p,m]),N=C.exports.useCallback(function($={},H=null){return{...$,ref:H,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:I,getPanelProps:N,htmlProps:i}}function gde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function mde(e){hS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function vde(e){hS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function yde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=m8(),{reduceMotion:r}=v8(),i=Qv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:Qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v8(),{getPanelProps:s,isOpen:l}=m8(),u=s(o,n),h=Qv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(pz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:Qv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=dd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Jv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Jv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function wde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[kde,y8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),yz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Jv,colorScheme:"blue"}};function Ede(e){return yz[e].colorScheme}function Pde(e){return yz[e].icon}var Sz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});Sz.displayName="Alert";var bz=Pe(function(t,n){const i={display:"inline",...y8().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});bz.displayName="AlertDescription";function xz(e){const{status:t}=_de(),n=Pde(t),r=y8(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}xz.displayName="AlertIcon";var wz=Pe(function(t,n){const r=y8();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});wz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G5=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G5.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:G5,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G5,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G5,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Jv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Rde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var $a=Pe((e,t)=>{const n=Ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=gn(e),k=C.exports.useMemo(()=>{const I={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:I}}},[r,n]),{ref:T,type:M}=Rde(E),R={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:SS("chakra-button",w),...P},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...R})):x(OA,{...R}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re(Tn,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var a1=(...e)=>e.filter(Boolean).join(" "),Iy=e=>e?"":void 0,Wx=e=>e?!0:void 0;function RA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ide,Cz]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nde,s1]=xn({strict:!1,name:"FormControlContext"});function Dde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Bn(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Iy(E),"data-disabled":Iy(i),"data-invalid":Iy(r),"data-readonly":Iy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Bn(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),I=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:I}}var hd=Pe(function(t,n){const r=Ri("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=a1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Ide,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});hd.displayName="FormControl";var zde=Pe(function(t,n){const r=s1(),i=Cz(),o=a1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function S8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b8(e){const t=s1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:RA(t?.onFocus,h),onBlur:RA(t?.onBlur,p)}}var[Fde,Bde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$de=Pe((e,t)=>{const n=Ri("FormError",e),r=gn(e),i=s1();return i?.isInvalid?le.createElement(Fde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:a1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Bde(),r=s1();if(!r?.isInvalid)return null;const i=a1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(_z,{}),optionalIndicator:l=null,...u}=i,h=s1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:a1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});lh.displayName="FormLabel";var _z=Pe(function(t,n){const r=s1(),i=Cz();if(!r?.isRequired)return null;const o=a1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});_z.displayName="RequiredIndicator";function td(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var x8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:x8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:x8});Vde.displayName="VisuallyHiddenInput";var IA=!1,bS=null,B0=!1,bC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function w8(e,t){bC.forEach(n=>n(e,t))}function NA(e){B0=!0,Gde(e)&&(bS="keyboard",w8("keyboard",e))}function yp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(B0=!0,w8("pointer",e))}function jde(e){e.target===window||e.target===document||(B0||(bS="keyboard",w8("keyboard",e)),B0=!1)}function Yde(){B0=!1}function DA(){return bS!=="pointer"}function qde(){if(typeof window>"u"||IA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){B0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),IA=!0}function Kde(e){qde(),e(DA());const t=()=>e(DA());return bC.add(t),()=>{bC.delete(t)}}var[MPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function efe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function kz(e={}){const t=b8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,I=nfe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[H,q]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[ee,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Be=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),td(()=>{n&&V(!1)},[n,V]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,dt=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),Ye=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&<.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(ee),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&H),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Pa(Ae.onMouseDown,Ot),onMouseUp:Pa(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Pa(Ae.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Ae.onMouseLeave,()=>ie(!1))}},[ee,xe,n,de,H,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...I,...Ae,ref:Bn(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Pa(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[I,n,xe,o,Q]),Ke=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:Bn(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Pa(Ae.onChange,Be),onBlur:Pa(Ae.onBlur,z,()=>V(!1)),onFocus:Pa(Ae.onFocus,$,()=>V(!0)),onKeyDown:Pa(Ae.onKeyDown,dt),onKeyUp:Pa(Ae.onKeyUp,Ye),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x8}),[w,E,a,Be,z,$,dt,Ye,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Pa(Ae.onMouseDown,zA),onTouchStart:Pa(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:ee,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Ke,getLabelProps:Et,htmlProps:I}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=dd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=dd({from:{opacity:0},to:{opacity:1}}),sfe=dd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Ez=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ri("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:I,getLabelProps:N,getRootProps:z}=kz({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),H=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...I()},H),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Ez.displayName="Checkbox";function lfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=gn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(lfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function j5(e,t,n){return(e-t)*100/(n-t)}function Pz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C8(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Tz(_c(v),o),w=n??S,E=C.exports.useCallback(H=>{H!==v&&(m||p(H.toString()),u?.(H.toString(),_c(H)))},[u,m,v]),P=C.exports.useCallback(H=>{let q=H;return l&&(q=m0(q,a,s)),C8(q,w)},[w,l,s,a]),k=C.exports.useCallback((H=o)=>{let q;v===""?q=_c(H):q=_c(v)+H,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((H=o)=>{let q;v===""?q=_c(-H):q=_c(v)-H,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let H;r==null?H="":H=Vx(r,o,n)??a,E(H)},[r,n,o,E,a]),R=C.exports.useCallback(H=>{const q=Vx(H,o,w)??a;E(q)},[w,o,E,a]),I=_c(v);return{isOutOfRange:I>s||Ix(Q4,{styles:Az}),ffe=()=>x(Q4,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${Az} - `});function Vf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function hfe(e){return"current"in e}var Lz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Lz()&&e.test(navigator.vendor),mfe=e=>Lz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function FA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function kv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=FA(n),a=FA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function _8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=gn(i),s=S8(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k8.displayName="Input";k8.id="Input";var[Cfe,Mz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=gn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=_8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Mz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});E8.displayName="InputAddon";var Oz=Pe(function(t,n){return x(E8,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Oz.displayName="InputLeftAddon";Oz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(E8,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Mz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(Pfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var Iz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});Iz.id="InputLeftElement";Iz.displayName="InputLeftElement";var Nz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Nz.id="InputRightElement";Nz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function nd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:nd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var pd=we("div");pd.displayName="Box";var Dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(pd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Dz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(Dz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var zz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});zz.displayName="Center";var Ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Ofe[r],...i,position:"absolute"})});var Rfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Rfe.displayName="Code";var Ife=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ife.displayName="Container";var Nfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=gn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Nfe.displayName="Divider";var rn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});rn.displayName="Flex";var Fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Fz.displayName="Grid";function BA(e){return nd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=_8({gridArea:r,gridColumn:BA(i),gridRow:BA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(pd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});Gf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Ffe,Bz]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P8=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Ffe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P8.displayName="List";var Bfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Bfe.displayName="OrderedList";var $fe=Pe(function(t,n){const{as:r,...i}=t;return x(P8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});$fe.displayName="UnorderedList";var Hfe=Pe(function(t,n){const r=Bz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Hfe.displayName="ListItem";var Wfe=Pe(function(t,n){const r=Bz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Wfe.displayName="ListIcon";var Vfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=n1(),h=s?Gfe(s,u):jfe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Vfe.displayName="SimpleGrid";function Ufe(e){return typeof e=="number"?`${e}px`:e}function Gfe(e,t){return nd(e,n=>{const r=Goe("sizes",n,Ufe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function jfe(e){return nd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var $z=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});$z.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function Yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[CC]:nd(n,i=>r[i])}}function qfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":nd(n,i=>r[i])}}var Hz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Hz.displayName="StackItem";var T8=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>qfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=yS(l);return P?M:M.map((R,I)=>{const N=typeof R.key<"u"?R.key:I,z=I+1===M.length,H=p?x(Hz,{children:R},N):R;if(!E)return H;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return re(C.exports.Fragment,{children:[H,de]},N)})},[u,w,E,P,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[CC]:S[CC]},...m},k)});T8.displayName="Stack";var Wz=Pe((e,t)=>x(T8,{align:"center",...e,direction:"row",ref:t}));Wz.displayName="HStack";var Vz=Pe((e,t)=>x(T8,{align:"center",...e,direction:"column",ref:t}));Vz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=_8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var Kfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>nd(w,k=>$A(O6("space",k)(P))),"--chakra-wrap-y-spacing":P=>nd(E,k=>$A(O6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,E)=>x(Uz,{children:w},E)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});Kfe.displayName="Wrap";var Uz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Uz.displayName="WrapItem";var Xfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Gz=Xfe,Sp=()=>{},Zfe={document:Gz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Sp,removeEventListener:Sp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Sp,removeListener:Sp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Sp,setInterval:()=>0,clearInterval:Sp},Qfe=Zfe,Jfe={window:Qfe,document:Gz},jz=typeof window<"u"?{window,document}:Jfe,Yz=C.exports.createContext(jz);Yz.displayName="EnvironmentContext";function qz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:jz},[r,n]);return re(Yz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}qz.displayName="EnvironmentProvider";var ehe=e=>e?"":void 0;function the(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function nhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=the(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},R=w?p:p||0,I=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Ux(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Ux(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),H=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Ux(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),V=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),ie=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),ee=Bn(t,M);return w?{...S,ref:ee,type:"button","aria-disabled":I?void 0:n,disabled:I,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:ee,role:"button","data-active":ehe(P),"aria-disabled":n?"true":void 0,tabIndex:I?void 0:R,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:H,onKeyDown:$,onMouseOver:J,onMouseLeave:ie}}function Kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Xz(e){if(!Kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function rhe(e){var t;return((t=Zz(e))==null?void 0:t.defaultView)??window}function Zz(e){return Kz(e)?e.ownerDocument:document}function ihe(e){return Zz(e).activeElement}var Qz=e=>e.hasAttribute("tabindex"),ohe=e=>Qz(e)&&e.tabIndex===-1;function ahe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Jz(e){return e.parentElement&&Jz(e.parentElement)?!0:e.hidden}function she(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function eF(e){if(!Xz(e)||Jz(e)||ahe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():she(e)?!0:Qz(e)}function lhe(e){return e?Xz(e)&&eF(e)&&!ohe(e):!1}var uhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],che=uhe.join(),dhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function tF(e){const t=Array.from(e.querySelectorAll(che));return t.unshift(e),t.filter(n=>eF(n)&&dhe(n))}function fhe(e){const t=e.current;if(!t)return!1;const n=ihe(t);return!n||t.contains(n)?!1:!!lhe(n)}function hhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;td(()=>{if(!o||fhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var phe={preventScroll:!0,shouldFocus:!1};function ghe(e,t=phe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=mhe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=tF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);td(()=>{h()},[h]),Vf(a,"transitionend",h)}function mhe(e){return"current"in e}var Mo="top",Ha="bottom",Wa="right",Oo="left",A8="auto",e2=[Mo,Ha,Wa,Oo],$0="start",Ev="end",vhe="clippingParents",nF="viewport",Bg="popper",yhe="reference",HA=e2.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+Ev])},[]),rF=[].concat(e2,[A8]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+Ev])},[]),She="beforeRead",bhe="read",xhe="afterRead",whe="beforeMain",Che="main",_he="afterMain",khe="beforeWrite",Ehe="write",Phe="afterWrite",The=[She,bhe,xhe,whe,Che,_he,khe,Ehe,Phe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Ua(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Ua(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Ua(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L8(e){if(typeof ShadowRoot>"u")return!1;var t=Ua(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ahe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!za(o)||!Tl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Lhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Mhe={name:"applyStyles",enabled:!0,phase:"write",fn:Ahe,effect:Lhe,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,Y5=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function iF(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=Jf(e)?Ua(e):window,s=a.visualViewport,l=!iF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M8(e){var t=W0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function oF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Ua(e).getComputedStyle(e)}function Ohe(e){return["table","td","th"].indexOf(Tl(e))>=0}function gd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(L8(e)?e.host:null)||gd(e)}function WA(e){return!za(e)||bu(e).position==="fixed"?null:e.offsetParent}function Rhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&za(e)){var r=bu(e);if(r.position==="fixed")return null}var i=CS(e);for(L8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(i))<0;){var o=bu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function t2(e){for(var t=Ua(e),n=WA(e);n&&Ohe(n)&&bu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&bu(n).position==="static")?t:n||Rhe(e)||t}function O8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return jf(e,Y5(t,n))}function Ihe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function aF(){return{top:0,right:0,bottom:0,left:0}}function sF(e){return Object.assign({},aF(),e)}function lF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Nhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,sF(typeof t!="number"?t:lF(t,e2))};function Dhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=O8(s),u=[Oo,Wa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Nhe(i.padding,n),m=M8(o),v=l==="y"?Mo:Oo,S=l==="y"?Ha:Wa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=t2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],R=k-m[h]-p[S],I=k/2-m[h]/2+T,N=Bm(M,I,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-I,t)}}function zhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!oF(t.elements.popper,i)||(t.elements.arrow=i))}const Fhe={name:"arrow",enabled:!0,phase:"main",fn:Dhe,effect:zhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $he(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,R=window;if(u){var I=t2(n),N="clientHeight",z="clientWidth";if(I===Ua(n)&&(I=gd(n),bu(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),I=I,i===Mo||(i===Oo||i===Wa)&&o===Ev){M=Ha;var $=p&&I===R&&R.visualViewport?R.visualViewport.height:I[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Ha)&&o===Ev){T=Wa;var H=p&&I===R&&R.visualViewport?R.visualViewport.width:I[z];v-=H-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&Bhe),de=h===!0?$he({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},q,(V={},V[M]=k?"0":"",V[T]=P?"0":"",V.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:_l(t.placement),variation:V0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hhe,data:{}};var Ny={passive:!0};function Vhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ua(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const Uhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vhe,data:{}};var Ghe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return Ghe[t]})}var jhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return jhe[t]})}function R8(e){var t=Ua(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function I8(e){return W0(gd(e)).left+R8(e).scrollLeft}function Yhe(e,t){var n=Ua(e),r=gd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=iF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+I8(e),y:l}}function qhe(e){var t,n=gd(e),r=R8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+I8(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N8(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function uF(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&N8(e)?e:uF(CS(e))}function $m(e,t){var n;t===void 0&&(t=[]);var r=uF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ua(r),a=i?[o].concat(o.visualViewport||[],N8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat($m(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Khe(e,t){var n=W0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===nF?kC(Yhe(e,n)):Jf(t)?Khe(t,n):kC(qhe(gd(e)))}function Xhe(e){var t=$m(CS(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&za(e)?t2(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&oF(i,r)&&Tl(i)!=="body"}):[]}function Zhe(e,t,n,r){var i=t==="clippingParents"?Xhe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=jf(h.top,l.top),l.right=Y5(h.right,l.right),l.bottom=Y5(h.bottom,l.bottom),l.left=jf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function cF(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Ha:l={x:a,y:t.y+t.height};break;case Wa:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Ev:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Pv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?vhe:s,u=n.rootBoundary,h=u===void 0?nF:u,p=n.elementContext,m=p===void 0?Bg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=sF(typeof E!="number"?E:lF(E,e2)),k=m===Bg?yhe:Bg,T=e.rects.popper,M=e.elements[S?k:m],R=Zhe(Jf(M)?M:M.contextElement||gd(e.elements.popper),l,h,a),I=W0(e.elements.reference),N=cF({reference:I,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),$=m===Bg?z:I,H={top:R.top-$.top+P.top,bottom:$.bottom-R.bottom+P.bottom,left:R.left-$.left+P.left,right:$.right-R.right+P.right},q=e.modifiersData.offset;if(m===Bg&&q){var de=q[i];Object.keys(H).forEach(function(V){var J=[Wa,Ha].indexOf(V)>=0?1:-1,ie=[Mo,Ha].indexOf(V)>=0?"y":"x";H[V]+=de[ie]*J})}return H}function Qhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?rF:l,h=V0(r),p=h?s?HA:HA.filter(function(S){return V0(S)===h}):e2,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Pv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Jhe(e){if(_l(e)===A8)return[];var t=z3(e);return[UA(e),t,UA(t)]}function epe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[z3(E)]:Jhe(E)),M=[E].concat(T).reduce(function(xe,Be){return xe.concat(_l(Be)===A8?Qhe(t,{placement:Be,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Be)},[]),R=t.rects.reference,I=t.rects.popper,N=new Map,z=!0,$=M[0],H=0;H=0,ie=J?"width":"height",ee=Pv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?V?Wa:Oo:V?Ha:Mo;R[ie]>I[ie]&&(X=z3(X));var G=z3(X),Q=[];if(o&&Q.push(ee[de]<=0),s&&Q.push(ee[X]<=0,ee[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Be){var We=M.find(function(dt){var Ye=N.get(dt);if(Ye)return Ye.slice(0,Be).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const tpe={name:"flip",enabled:!0,phase:"main",fn:epe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Wa,Ha,Oo].some(function(t){return e[t]>=0})}function npe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Pv(t,{elementContext:"reference"}),s=Pv(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const rpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:npe};function ipe(e,t,n){var r=_l(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Wa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function ope(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=rF.reduce(function(h,p){return h[p]=ipe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const ape={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ope};function spe(e){var t=e.state,n=e.name;t.modifiersData[n]=cF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lpe={name:"popperOffsets",enabled:!0,phase:"read",fn:spe,data:{}};function upe(e){return e==="x"?"y":"x"}function cpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Pv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=V0(t.placement),T=!k,M=O8(P),R=upe(M),I=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,H=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!I){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Ha:Wa,ee=M==="y"?"height":"width",X=I[M],G=X+E[J],Q=X-E[ie],j=v?-z[ee]/2:0,Z=k===$0?N[ee]:z[ee],me=k===$0?-z[ee]:-N[ee],Se=t.elements.arrow,xe=v&&Se?M8(Se):{width:0,height:0},Be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aF(),We=Be[J],dt=Be[ie],Ye=Bm(0,N[ee],xe[ee]),rt=T?N[ee]/2-j-Ye-We-H.mainAxis:Z-Ye-We-H.mainAxis,Ze=T?-N[ee]/2+j+Ye+dt+H.mainAxis:me+Ye+dt+H.mainAxis,Ke=t.elements.arrow&&t2(t.elements.arrow),Et=Ke?M==="y"?Ke.clientTop||0:Ke.clientLeft||0:0,bt=(V=q?.[M])!=null?V:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Bm(v?Y5(G,Ae):G,X,v?jf(Q,it):Q);I[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,Cn=M==="x"?Ha:Wa,Pt=I[R],Kt=R==="y"?"height":"width",_n=Pt+E[xt],mn=Pt-E[Cn],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[R])!=null?lt:0,Xt=Oe?_n:Pt-N[Kt]-z[Kt]-Je+H.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-H.altAxis:mn,ke=v&&Oe?Ihe(Xt,Pt,jt):Bm(v?Xt:_n,Pt,v?jt:mn);I[R]=ke,de[R]=ke-Pt}t.modifiersData[r]=de}}const dpe={name:"preventOverflow",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"]};function fpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function hpe(e){return e===Ua(e)||!za(e)?R8(e):fpe(e)}function ppe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&ppe(t),o=gd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||N8(o))&&(s=hpe(t)),za(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=I8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function mpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function vpe(e){var t=mpe(e);return The.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ype(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Spe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:bp("--popper-arrow-shadow-color"),arrowSize:bp("--popper-arrow-size","8px"),arrowSizeHalf:bp("--popper-arrow-size-half"),arrowBg:bp("--popper-arrow-bg"),transformOrigin:bp("--popper-transform-origin"),arrowOffset:bp("--popper-arrow-offset")};function Cpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var _pe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},kpe=e=>_pe[e],XA={scroll:!0,resize:!0};function Epe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var Ppe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Tpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,kpe(e.placement))},Ape={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Lpe(e)}},Lpe=e=>{var t;if(!e.placement)return;const n=Mpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Mpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Ope={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Cpe(e.placement)})},Rpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ipe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Npe(e,t="ltr"){var n;const r=((n=Rpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ipe[e]??r}function dF(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=Npe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var H;!t||!S.current||!w.current||((H=k.current)==null||H.call(k),E.current=wpe(S.current,w.current,{placement:P,modifiers:[Ope,Ape,Tpe,{...Ppe,enabled:!!m},{name:"eventListeners",...Epe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var H;!S.current&&!w.current&&((H=E.current)==null||H.destroy(),E.current=null)},[]);const M=C.exports.useCallback(H=>{S.current=H,T()},[T]),R=C.exports.useCallback((H={},q=null)=>({...H,ref:Bn(M,q)}),[M]),I=C.exports.useCallback(H=>{w.current=H,T()},[T]),N=C.exports.useCallback((H={},q=null)=>({...H,ref:Bn(I,q),style:{...H.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,I,m]),z=C.exports.useCallback((H={},q=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...ee}=H;return{...ee,ref:q,"data-popper-arrow":"",style:Dpe(H)}},[]),$=C.exports.useCallback((H={},q=null)=>({...H,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var H;(H=E.current)==null||H.update()},forceUpdate(){var H;(H=E.current)==null||H.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:I,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:R}}function Dpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function fF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function zpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=rhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function hF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Fpe,Bpe]=xn({strict:!1,name:"PortalManagerContext"});function pF(e){const{children:t,zIndex:n}=e;return x(Fpe,{value:{zIndex:n},children:t})}pF.displayName="PortalManager";var[gF,$pe]=xn({strict:!1,name:"PortalContext"}),D8="chakra-portal",Hpe=".chakra-portal",Wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Vpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=$pe(),l=Bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(gF,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Upe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(gF,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Upe,{containerRef:t,...n}):x(Vpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=D8;uh.selector=Hpe;uh.displayName="Portal";var Gpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,jpe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(xp.get(m)||0)+1,E=(o.get(m)||0)+1;xp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Dy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=xp.get(p)-1,v=o.get(p)-1;xp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(xp=new WeakMap,xp=new WeakMap,Dy=new WeakMap,zy={})}},mF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Gpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),jpe(r,i,n,"aria-hidden")):function(){return null}};function z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ype="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",qpe=Ype,Kpe=qpe;function vF(){}function yF(){}yF.resetWarningCache=vF;var Xpe=function(){function e(r,i,o,a,s,l){if(l!==Kpe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:yF,resetWarningCache:vF};return n.PropTypes=n,n};Rn.exports=Xpe();var EC="data-focus-lock",SF="data-focus-lock-disabled",Zpe="data-no-focus-lock",Qpe="data-autofocus-inside",Jpe="data-no-autofocus";function e0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function t0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function bF(e,t){return t0e(t||null,function(n){return e.forEach(function(r){return e0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function xF(e){return e}function wF(e,t){t===void 0&&(t=xF);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function F8(e,t){return t===void 0&&(t=xF),wF(e,t)}function CF(e){e===void 0&&(e={});var t=wF(null);return t.options=pl({async:!0,ssr:!1},e),t}var _F=function(e){var t=e.sideCar,n=hz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};_F.isSideCarExport=!0;function n0e(e,t){return e.useMedium(t),_F}var kF=F8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),EF=F8(),r0e=F8(),i0e=CF({async:!0}),o0e=[],B8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?o0e:M,I=t.as,N=I===void 0?"div":I,z=t.lockProps,$=z===void 0?{}:z,H=t.sideCar,q=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),ee=ie[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(dt){var Ye=u.current;if(Ye&&Ye.focus){var rt=typeof q=="function"?q(Ye):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,dt?Promise.resolve().then(function(){return Ye.focus(Ze)}):Ye.focus(Ze)}}},[q]),j=C.exports.useCallback(function(dt){l.current&&kF.useMedium(dt)},[]),Z=EF.useMedium,me=C.exports.useCallback(function(dt){s.current!==dt&&(s.current=dt,a(dt))},[]),Se=An((r={},r[SF]=p&&"disabled",r[EC]=E,r),$),xe=m!==!0,Be=xe&&m!=="tail",We=bF([n,me]);return re(Tn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x(H,{id:ee,sideCar:i0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Be&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});B8.propTypes={};B8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const PF=B8;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function TF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){$8(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return TF(l,"displayName","SideEffect("+n(i)+")"),l}}var Il=function(e){for(var t=Array(e.length),n=0;n=0}).sort(p0e)},g0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W8=g0e.join(","),m0e="".concat(W8,", [data-focus-guard]"),zF=function(e,t){var n;return Il(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?m0e:W8)?[i]:[],zF(i))},[])},V8=function(e,t){return e.reduce(function(n,r){return n.concat(zF(r,t),r.parentNode?Il(r.parentNode.querySelectorAll(W8)).filter(function(i){return i===r}):[])},[])},v0e=function(e){var t=e.querySelectorAll("[".concat(Qpe,"]"));return Il(t).map(function(n){return V8([n])}).reduce(function(n,r){return n.concat(r)},[])},U8=function(e,t){return Il(e).filter(function(n){return MF(t,n)}).filter(function(n){return d0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Il(e).filter(function(n){return OF(t,n)})},AC=function(e,t,n){return DF(U8(V8(e,n),t),!0,n)},eL=function(e,t){return DF(U8(V8(e),t),!1)},y0e=function(e,t){return U8(v0e(e),t)},Tv=function(e,t){return e.shadowRoot?Tv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Il(e.children).some(function(n){return Tv(n,t)})},S0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},FF=function(e){return e.parentNode?FF(e.parentNode):e},G8=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?S0e(Il(FF(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(SF,'="disabled"])')))):[r]),n},[])},BF=function(e){return e.activeElement?e.activeElement.shadowRoot?BF(e.activeElement.shadowRoot):e.activeElement:void 0},j8=function(){return document.activeElement?document.activeElement.shadowRoot?BF(document.activeElement.shadowRoot):document.activeElement:void 0},b0e=function(e){return e===document.activeElement},x0e=function(e){return Boolean(Il(e.querySelectorAll("iframe")).some(function(t){return b0e(t)}))},$F=function(e){var t=document&&j8();return!t||t.dataset&&t.dataset.focusGuard?!1:G8(e).some(function(n){return Tv(n,t)||x0e(n)})},w0e=function(){var e=document&&j8();return e?Il(document.querySelectorAll("[".concat(Zpe,"]"))).some(function(t){return Tv(t,e)}):!1},C0e=function(e,t){return t.filter(NF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y8=function(e,t){return NF(e)&&e.name?C0e(e,t):e},_0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?Y8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(Y8(e[t],e)):t},HF="NEW_FOCUS",k0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=_0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return HF;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},E0e=function(e){return function(t){var n,r=(n=RF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},P0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(E0e(n)));return i&&i.length?tL(i):tL(JA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i=0)return o}return!1},WF=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Tv(u,a)?a=u:a=Yx(u,a))})}),a},T0e=function(e,t){return e.reduce(function(n,r){return n.concat(y0e(r,t))},[])},A0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(h0e)},L0e=function(e,t){var n=document&&j8(),r=G8(e).filter(q5),i=WF(n||e,e,r),o=new Map,a=eL(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=A0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=k0e(h,l,n,t);return p===HF?{node:P0e(a,h,T0e(r,o))}:p===void 0?p:u[p]}},M0e=function(e){var t=G8(e).filter(q5),n=WF(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:H8(s)}})},O0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,R0e=function(e,t,n){n===void 0&&(n={});var r=L0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,O0e(r.node,n.focusOptions),qx--}};const VF=R0e;function UF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var I0e=function(){return document&&document.activeElement===document.body},N0e=function(){return I0e()||w0e()},v0=null,qp=null,y0=null,Av=!1,D0e=function(){return!0},z0e=function(t){return(v0.whiteList||D0e)(t)},F0e=function(t,n){y0={observerNode:t,portaledElement:n}},B0e=function(t){return y0&&y0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var $0e=function(t){return t&&"current"in t?t.current:t},H0e=function(t){return t?Boolean(Av):Av==="meanwhile"},W0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},V0e=function(t,n){return n.some(function(r){return W0e(t,r,r)})},K5=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map($0e).filter(Boolean));if((!h||z0e(h))&&(i||H0e(s)||!N0e()||!qp&&o)&&(u&&!($F(p)||h&&V0e(h,p)||B0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=VF(p,qp,{focusOptions:l}),y0={})),Av=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=M0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},GF=function(t){K5()&&t&&(t.stopPropagation(),t.preventDefault())},q8=function(){return UF(K5)},U0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||F0e(r,n)},G0e=function(){return null},jF=function(){Av="just",setTimeout(function(){Av="meanwhile"},0)},j0e=function(){document.addEventListener("focusin",GF),document.addEventListener("focusout",q8),window.addEventListener("blur",jF)},Y0e=function(){document.removeEventListener("focusin",GF),document.removeEventListener("focusout",q8),window.removeEventListener("blur",jF)};function q0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function K0e(e){var t=e.slice(-1)[0];t&&!v0&&j0e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K5(),UF(K5)):(Y0e(),qp=null)}kF.assignSyncMedium(U0e);EF.assignMedium(q8);r0e.assignMedium(function(e){return e({moveFocusInside:VF,focusInside:$F})});const X0e=a0e(q0e,K0e)(G0e);var YF=C.exports.forwardRef(function(t,n){return x(PF,{sideCar:X0e,ref:n,...t})}),qF=PF.propTypes||{};qF.sideCar;z8(qF,["sideCar"]);YF.propTypes={};const Z0e=YF;var KF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&tF(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(Z0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};KF.displayName="FocusLock";var F3="right-scroll-bar-position",B3="width-before-scroll-bar",Q0e="with-scroll-bars-hidden",J0e="--removed-body-scroll-bar-size",XF=CF(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=hz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=bF([n,t]),R=pl(pl({},k),i);return re(Tn,{children:[h&&x(T,{sideCar:XF,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},R),{ref:M})):x(P,{...pl({},R,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:B3,zeroRight:F3};var e1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e1e();return t&&e.setAttribute("nonce",t),e}function n1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var i1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t1e())&&(n1e(t,n),r1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o1e=function(){var e=i1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ZF=function(){var e=o1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},a1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},s1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zx(n),Zx(r),Zx(i)]},l1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return a1e;var t=s1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u1e=ZF(),c1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Q0e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(F3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(B3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(F3," .").concat(F3,` { - right: 0 `).concat(r,`; - } - - .`).concat(B3," .").concat(B3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(J0e,": ").concat(s,`px; - } -`)},d1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return l1e(i)},[i]);return x(u1e,{styles:c1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var Fy=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",Fy,Fy),window.removeEventListener("test",Fy,Fy)}catch{MC=!1}var wp=MC?{passive:!1}:!1,f1e=function(e){return e.tagName==="TEXTAREA"},QF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!f1e(e)&&n[t]==="visible")},h1e=function(e){return QF(e,"overflowY")},p1e=function(e){return QF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=JF(e,n);if(r){var i=eB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},g1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},m1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},JF=function(e,t){return e==="v"?h1e(t):p1e(t)},eB=function(e,t){return e==="v"?g1e(t):m1e(t)},v1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},y1e=function(e,t,n,r,i){var o=v1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=eB(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&JF(e,s)&&(p+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},By=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},S1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},x1e=0,Cp=[];function w1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(x1e++)[0],o=C.exports.useState(function(){return ZF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=gC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=By(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,I=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&I.type==="range")return!1;var z=iL(N,I);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=iL(N,I)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var $=r.current||R;return y1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?oL(E):By(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&S1e(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=By(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,By(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,S=e.inert;return re(Tn,{children:[S?x(o,{styles:b1e(i)}):null,v?x(d1e,{gapMode:"margin"}):null]})}const C1e=n0e(XF,w1e);var tB=C.exports.forwardRef(function(e,t){return x(_S,{...pl({},e,{ref:t,sideCar:C1e})})});tB.classNames=_S.classNames;const nB=tB;var ch=(...e)=>e.filter(Boolean).join(" ");function im(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},OC=new _1e;function k1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function E1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=T1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");P1e(u,t&&a),k1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:Bn($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:im(z.onClick,H=>H.stopPropagation())}),[v,T,p,m,P]),I=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:Bn($,h),onClick:im(z.onClick,I),onKeyDown:im(z.onKeyDown,E),onMouseDown:im(z.onMouseDown,w)}),[E,w,I]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function P1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return mF(e.current)},[t,e,n])}function T1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[A1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[L1e,rd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...E1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(L1e,{value:E,children:x(A1e,{value:S,children:x(fd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Lv=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=rd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Lv.displayName="ModalBody";var K8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=rd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:im(n,l=>{l.stopPropagation(),o()}),...i})});K8.displayName="ModalCloseButton";function rB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=rd(),[p,m]=l8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(KF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(nB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var M1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...mz,custom:{initialScale:.95,reverse:!0}},none:{}},O1e=we(Rl.section),R1e=e=>M1e[e||"none"],iB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=R1e(n),...i}=e;return x(O1e,{ref:t,...r,...i})});iB.displayName="ModalTransition";var Mv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=rd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=rd();return le.createElement(rB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(iB,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Mv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=rd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var I1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=rd();return x(I1e,{...i||(u==="none"?{}:gz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function oB(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var aB=Pe((e,t)=>x(Mv,{ref:t,role:"alertdialog",...e})),[OPe,N1e]=xn(),D1e=we(vz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=rd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=N1e();return le.createElement(rB,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function F1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var sB=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),$1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var H1e=50,lL=300;function W1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);F1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function j1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:I,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:H,parse:q,...de}=e,V=cr(R),J=cr(I),ie=cr(N),ee=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Be=C.exports.useRef(null),We=C.exports.useRef(null),dt=C.exports.useRef(null),Ye=C.exports.useRef(null),rt=C.exports.useCallback(ke=>ke.split("").filter(ee).join(""),[ee]),Ze=C.exports.useCallback(ke=>q?.(ke)??ke,[q]),Ke=C.exports.useCallback(ke=>(H?.(ke)??ke).toString(),[H]);td(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Be.current)return;if(Be.current.value!=G.value){const Mt=Ze(Be.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((ke=a)=>{xe&&j(ke)},[j,xe,a]),bt=C.exports.useCallback((ke=a)=>{xe&&Z(ke)},[Z,xe,a]),Ae=W1e(Et,bt);sL(dt,"disabled",Ae.stop,Ae.isSpinning),sL(Ye,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Q(rt(Ne)),We.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(ke=>{var Mt;V?.(ke),We.current&&(ke.target.selectionStart=We.current.start??((Mt=ke.currentTarget.value)==null?void 0:Mt.length),ke.currentTarget.selectionEnd=We.current.end??ke.currentTarget.selectionStart)},[V]),lt=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;G1e(ke,ee)||ke.preventDefault();const Mt=xt(ke)*a,Ne=ke.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(ke.preventDefault(),an(ke))},[ee,a,Et,bt,Q,i,o]),xt=ke=>{let Mt=1;return(ke.metaKey||ke.ctrlKey)&&(Mt=.1),ke.shiftKey&&(Mt=10),Mt},Cn=C.exports.useMemo(()=>{const ke=X?.(G.value);if(ke!=null)return ke;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),_n=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Be.current)==null||ke.focus()})},[t]),mn=C.exports.useCallback(ke=>{ke.preventDefault(),Ae.up(),_n()},[_n,Ae]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Ae.down(),_n()},[_n,Ae]);Vf(()=>Be.current,"wheel",ke=>{var Mt;const at=(((Mt=Be.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Be.current;if(!v||!at)return;ke.preventDefault();const an=xt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Et(an):Nn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((ke={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Bn(Mt,dt),role:"button",tabIndex:-1,onPointerDown:il(ke.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(ke.onPointerLeave,Ae.stop),onPointerUp:il(ke.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((ke={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Bn(Mt,Ye),role:"button",tabIndex:-1,onPointerDown:il(ke.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(ke.onPointerLeave,Ae.stop),onPointerUp:il(ke.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((ke={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Bn(Be,Mt),value:Ke(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":Cn,autoComplete:"off",autoCorrect:"off",onChange:il(ke.onChange,it),onKeyDown:il(ke.onKeyDown,lt),onFocus:il(ke.onFocus,Ot,()=>Se(!0)),onBlur:il(ke.onBlur,J,Kt)}),[P,m,p,M,T,Ke,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Cn,it,lt,Ot,J,Kt]);return{value:Ke(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,PS]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[q1e,X8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Z8=Pe(function(t,n){const r=Ri("NumberInput",t),i=gn(t),o=b8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:sB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z8.displayName="NumberInput";var lB=Pe(function(t,n){const r=PS();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});lB.displayName="NumberInputStepper";var Q8=Pe(function(t,n){const{getInputProps:r}=X8(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:sB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q8.displayName="NumberInputField";var uB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J8=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X8(),o=i(t,n);return x(uB,{...o,__css:r.stepper,children:t.children??x(B1e,{})})});J8.displayName="NumberDecrementStepper";var e_=Pe(function(t,n){const{getIncrementButtonProps:r}=X8(),i=r(t,n),o=PS();return x(uB,{...i,__css:o.stepper,children:t.children??x($1e,{})})});e_.displayName="NumberIncrementStepper";var n2=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[J1e,r2]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function ege(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=fF(e),M=C.exports.useRef(null),R=C.exports.useRef(null),I=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,H]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,ee,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=dF({...w,enabled:E||!!S}),xe=zpe({isOpen:E,ref:I});Sfe({enabled:E,ref:R}),hhe(I,{focusRef:R,visible:E,shouldFocus:o&&u===_p.click}),ghe(I,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const Be=hF({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Bn(I,Ot),children:Be?it.children:null,id:ee,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const Cn=uL(xt),Pt=Jx(I.current,Cn),Kt=Jx(R.current,Cn);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===_p.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Be,ee,$,X,q,G,u,n,P,E,t,p,l,s]),dt=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),Ye=C.exports.useCallback((it,Ot=null)=>({...it,ref:Bn(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Ke=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:Bn(R,Ot,Ke),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":ee};return u===_p.click&&(lt.onClick=ol(it.onClick,T)),u===_p.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const Cn=uL(xt),Pt=!Jx(I.current,Cn);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[ie,E,ee,u,Ke,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:Bn(Ot,lt=>{H(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:Bn(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:Ye,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:dt,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Jx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t_(e){const t=Ri("Popover",e),{children:n,...r}=gn(e),i=n1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t_.displayName="Popover";function n_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=r2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:n2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=r2();return le.createElement(we.div,{...r(t,n),className:n2("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=r2();return x(xS,{size:"sm",onClick:r,className:n2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},oge=we(Rl.section),cB=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});cB.displayName="PopoverTransition";var r_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=r2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(cB,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:n2("chakra-popover__content",t.className),__css:h}))});r_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=r2();return le.createElement(we.header,{...r(t,n),className:n2("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function i_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}i_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=dd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=dd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=dd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=dd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function dB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var fB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${uge} 2s linear infinite`:void 0},...r})};fB.displayName="Shape";var RC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});RC.displayName="Circle";var fge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=dB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(fB,{size:n,isIndeterminate:v,children:[x(RC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(RC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=dB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),hB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=gn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:I,...w},re(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});hB.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var pB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});pB.displayName="SelectField";var gB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=gn(e),[w,E]=Sge(S,jZ),P=S8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(pB,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(mB,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});gB.displayName="Select";var bge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),mB=e=>{const{children:t=x(bge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};mB.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function vB(e){return!!e.touches}function _ge(e){return vB(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function yB(e,t="page"){return vB(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:yB(i)})}return t?Tge(n):n}function $3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function SB(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:yB(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Rge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Ige(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Rge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Ige(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(dL(e)&&dL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function bB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=SB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new Lge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function xB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Fge(e){return typeof e=="object"&&e!==null&&"current"in e}function Bge(e){const[t]=xB({observeMutation:!1,getNodes(){return[Fge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},md=Hge({"../../../react-shim.js"(){}});md();md();md();var Oa=e=>e?"":void 0,S0=e=>e?!0:void 0,vd=(...e)=>e.filter(Boolean).join(" ");md();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}md();md();function Wge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function om(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function wB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...om({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>$y(w).height>$y(E).height?w:E,H3):r.reduce((w,E)=>$y(w).width>$y(E).width?w:E,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...om({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...om({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...om({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function CB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...I}=e,N=cr(m),z=cr(v),$=cr(w),H=CB({isReversed:a,direction:s,orientation:l}),[q,de]=nS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[V,J]=C.exports.useState(!1),[ie,ee]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>m0($e,t,n)),me=R*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Be=Z.map($e=>n-$e+t),dt=(H?Be:Z).map($e=>j5($e,t,n)),Ye=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Ke=xB({getNodes(){const $e=Ze.current,ft=$e?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var ft;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ft=$e.touches)==null?void 0:ft[0])??$e,Qn=Ye?tt.bottom-Zt:Nt-tt.left,lo=Ye?tt.height:tt.width;let pi=Qn/lo;return H&&(pi=1-pi),Pz(pi,t,n)},[Ye,H,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,ft){if(!Q)return;const tt=xe.current.valueBounds[$e];ft=parseFloat(wC(ft,tt.min,lt)),ft=m0(ft,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=ft,de(Nt)},setActiveIndex:G,stepUp($e,ft=lt){const tt=xe.current.value[$e],Nt=H?tt-ft:tt+ft;xt.setValueAtIndex($e,Nt)},stepDown($e,ft=lt){const tt=xe.current.value[$e],Nt=H?tt+ft:tt-ft;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,H,de,Q]),Cn=C.exports.useCallback($e=>{const ft=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[ft];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:_n,innerTrackStyle:mn}=C.exports.useMemo(()=>wB({isReversed:H,orientation:l,thumbRects:Ke,thumbPercents:dt}),[H,l,dt,Ke]),Oe=C.exports.useCallback($e=>{var ft;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(ft=Ze.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);td(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const ft=it($e)||0,tt=xe.current.value.map(pi=>Math.abs(pi-ft)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(pi=>pi===Nt);Qn.length>1&&ft>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,ft),Oe(Zt)},Xt=$e=>{if(X==-1)return;const ft=it($e)||0;G(X),xt.setValueAtIndex(X,ft),Oe(X)};bB(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},ft=null)=>({...$e,...I,id:Ae.root,ref:Bn(ft,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Oa(ie),style:{...$e.style,...Kt}}),[I,h,ie,Kt,Ae]),ke=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:Bn(ft,rt),id:Ae.track,"data-disabled":Oa(h),style:{...$e.style,..._n}}),[h,_n,Ae]),Mt=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:ft,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,ft=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:ft,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":Oa(V&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:b0($e.onKeyDown,Cn),onFocus:b0($e.onFocus,()=>{ee(!0),G(tt)}),onBlur:b0($e.onBlur,()=>{ee(!1),G(-1)})}},[Ae,Z,Se,Q,V,X,$,E,l,h,p,P,k,Pt,Cn,ee]),at=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:ft,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,ft=null)=>{const{value:tt,...Nt}=$e,Zt=!(ttn),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=j5(tt,t,n);lo=H?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...om({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(Qn),style:{...$e.style,...pi}}},[h,H,n,t,l,Z,Ae]),Nn=C.exports.useCallback(($e,ft=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:ft,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:ie,isDragging:V,getThumbPercent:$e=>dt[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:ke,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Nn,getOutputProps:at}}function Uge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Gge,TS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[jge,o_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_B=Pe(function(t,n){const r=Ri("Slider",t),i=gn(t),{direction:o}=n1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});_B.defaultProps={orientation:"horizontal"};_B.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o_(),s=r(t,n);return le.createElement(we.div,{...s,className:vd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o_(),o=r(t,n);return le.createElement(we.div,{...o,className:vd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:vd("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";md();md();function Zge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,I=cr(m),N=cr(v),z=cr(w),$=CB({isReversed:a,direction:s,orientation:l}),[H,q]=nS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),ee=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=m0(H,t,n),j=n-Q+t,me=j5($?j:Q,t,n),Se=l==="vertical",xe=SB({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:ee,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Be=C.exports.useRef(null),We=C.exports.useRef(null),dt=C.exports.useRef(null),Ye=C.exports.useId(),rt=u??Ye,[Ze,Ke]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Be.current)return;const an=xe.current;an.eventSource="pointer";const Nn=Be.current.getBoundingClientRect(),{clientX:$e,clientY:ft}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Nn.bottom-ft:$e-Nn.left,Nt=Se?Nn.height:Nn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Pz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(wC(Qn,an.min,an.step))),Qn=m0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(wC(Ne,at.min,G)),Ne=m0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Nn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Bge(We),{getThumbStyle:xt,rootStyle:Cn,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return wB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),_n=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);td(()=>{const Ne=xe.current;_n(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}bB(dt,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(V(!0),_n(),mn(Ne),I?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...R,ref:Bn(at,dt),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Oa(J),style:{...Ne.style,...Cn}}),[R,h,J,Cn]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:Bn(at,Be),id:Ke,"data-disabled":Oa(h),style:{...Ne.style,...Pt}}),[h,Ke,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:Bn(at,We),role:"slider",tabIndex:ee?0:void 0,id:Ze,"data-active":Oa(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:b0(Ne.onKeyDown,it),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[ee,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),ke=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.valuen),Nn=Q>=Ne.value,$e=j5(Ne.value,t,n),ft={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!an),"data-highlighted":Oa(Nn),style:{...Ne.style,...ft}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:ke,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t"}),[tme,LS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),a_=Pe((e,t)=>{const n=Ri("Slider",e),r=gn(e),{direction:i}=n1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:vd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a_.defaultProps={orientation:"horizontal"};a_.displayName="Slider";var kB=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__thumb",e.className),__css:r.thumb})});kB.displayName="SliderThumb";var EB=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__track",e.className),__css:r.track})});EB.displayName="SliderTrack";var PB=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});PB.displayName="SliderFilledTrack";var IC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__marker",e.className),__css:r.mark})});IC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,s_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=kz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:nme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s_.displayName="Switch";var l1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,TB,ime,ome]=FN();function ame(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=ime(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[sme,i2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=i2(),i=TB(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=i2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=nhe({...r,ref:Bn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:AB(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":LB(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=i2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:LB(n,s),tabId:AB(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=i2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=hF({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function pme(){const e=i2(),t=TB(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function AB(e,t){return`${e}--tab-${t}`}function LB(e,t){return`${e}--tabpanel-${t}`}var[gme,o2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),MB=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:l1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});MB.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=o2();return le.createElement(we.div,{ref:n,...t,className:l1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...o2().tablist};return le.createElement(we.div,{...r,className:l1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var OB=Pe(function(t,n){const r=hme({...t,ref:n}),i=o2();return le.createElement(we.div,{outline:"0",...r,className:l1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});OB.displayName="TabPanel";var RB=Pe(function(t,n){const r=fme(t),i=o2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:l1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RB.displayName="TabPanels";var IB=Pe(function(t,n){const r=o2(),i=ume({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:l1("chakra-tabs__tab",t.className),__css:o})});IB.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],NB=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=S8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});NB.displayName="Textarea";function xme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=DB(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function DB(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Ame(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:zB(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=DB(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(Sz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(xz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(wz,{id:u?.title,children:i}),s&&x(bz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function zB(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=zB(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function u1(e){const{theme:t}=NN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},FB=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Rle();td(()=>{v||r?.()},[v]),td(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},DC(n,{id:t,onClose:E})))});FB.displayName="ToastComponent";var Rme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FB,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Eme(l),children:x(fd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re(Tn,{children:[n,x(uh,{...o,children:s})]})};function Ime(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function $g(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...I}=e,{isOpen:N,onOpen:z,onClose:$}=fF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:H,getPopperProps:q,getArrowInnerProps:de,getArrowProps:V}=dF({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),J=C.exports.useId(),ee=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Fme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=zC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Be=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>X5(X),"keydown",s?We:void 0),Vf(()=>X5(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const dt=C.exports.useCallback((Ze={},Ke=null)=>({...Ze,ref:Bn(X,Ke,H),onPointerEnter:$g(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:$g(Ze.onClick,xe),onPointerDown:$g(Ze.onPointerDown,Be),onFocus:$g(Ze.onFocus,me),onBlur:$g(Ze.onBlur,Se),"aria-describedby":N?ee:void 0}),[me,Se,Be,N,ee,xe,H]),Ye=C.exports.useCallback((Ze={},Ke=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Ke),[q,S,w]),rt=C.exports.useCallback((Ze={},Ke=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Ke,...I,...Ze,id:ee,role:"tooltip",style:Et}},[I,ee]);return{isOpen:N,show:me,hide:Se,getTriggerProps:dt,getTooltipProps:rt,getTooltipPositionerProps:Ye,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function Fme(e,t){return C.exports.useEffect(()=>{const n=X5(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X5(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Bme=we(Rl.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(e),i=n1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const R=!!l,I=k.getTooltipProps({},t),N=R?Ime(I,["role","id"]):I,z=Nme(I,["role","id"]);return a?re(Tn,{children:[M,x(fd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Bme,{variants:Dme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Tn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(qz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:re(FI,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(pF,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return re($me,{theme:t,...r,children:[e,x(Rme,{...n})]})}function vs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:l_(e)?2:u_(e)?3:0}function x0(e,t){return c1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return c1(e)===2?e.get(t):e[t]}function BB(e,t,n){var r=c1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function $B(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l_(e){return qme&&e instanceof Map}function u_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function c_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=WB(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return d_(r,!0)},!0)),e}function Vme(){vs(2)}function f_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=HC[e];return t||vs(18,e),t}function Ume(e,t){HC[e]||(HC[e]=t)}function FC(){return Ov}function rw(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function Z5(e){BC(e),e.p.forEach(Gme),e.p=null}function BC(e){e===Ov&&(Ov=e.l)}function gL(e){return Ov={p:[],l:Ov,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(Z5(t),vs(4)),xu(e)&&(e=Q5(t,e),t.l||J5(t,e)),t.u&&kl("Patches").M(n[tr].t,e,t.u,t.s)):e=Q5(t,n,[]),Z5(t),t.u&&t.v(t.u,t.s),e!==HB?e:void 0}function Q5(e,t,n){if(f_(t))return t;var r=t[tr];if(!r)return eh(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c_(r.k):r.o;eh(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),J5(e,i,!1),n&&e.u&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(id(i)){var a=Q5(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(BB(n,r,a),!id(a))return;e.m=!1}if(xu(i)&&!f_(i)){if(!e.h.F&&e._<1)return;Q5(e,i),t&&t.A.l||J5(e,i)}}function J5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d_(t,n)}function ow(e,t){var n=e[tr];return(n?Sf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function aw(e){e.o||(e.o=c_(e.t))}function $C(e,t,n){var r=l_(t)?kl("MapSet").N(t,n):u_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:FC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Rv;a&&(l=[s],u=am);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:FC()).p.push(r),r}function jme(e){return id(e)||vs(22,e),function t(n){if(!xu(n))return n;var r,i=n[tr],o=c1(n);if(i){if(!i.P&&(i.i<4||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||BB(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c_(e)}function Yme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Rv.get(l,o)},set:function(l){var u=this[tr];Rv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!$B(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=kl("Patches").$;return id(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new Zme,VB=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:e4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function UB(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n4}function i(s,l){r(s)===n4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rve=function(t,n){return t===n};function ive(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Bve;KB.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=KB})(qB);var XB={exports:{}},ZB={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var OS=C.exports,Wve=qB.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=Wve.useSyncExternalStore,jve=OS.useRef,Yve=OS.useEffect,qve=OS.useMemo,Kve=OS.useDebugValue;ZB.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,Uve(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=ZB})(XB);function Xve(e){e()}let QB=Xve;const Zve=e=>QB=e,Qve=()=>QB,od=C.exports.createContext(null);function JB(){return C.exports.useContext(od)}const Jve=()=>{throw new Error("uSES not initialized!")};let e$=Jve;const e2e=e=>{e$=e},t2e=(e,t)=>e===t;function n2e(e=od){const t=e===od?JB:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=e$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var m_=Symbol.for("react.element"),v_=Symbol.for("react.portal"),RS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),FS=Symbol.for("react.forward_ref"),BS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),t$;t$=Symbol.for("react.module.reference");function Ga(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m_:switch(e=e.type,e){case RS:case NS:case IS:case BS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case zS:case FS:case WS:case HS:case DS:return e;default:return t}}case v_:return t}}}On.ContextConsumer=zS;On.ContextProvider=DS;On.Element=m_;On.ForwardRef=FS;On.Fragment=RS;On.Lazy=WS;On.Memo=HS;On.Portal=v_;On.Profiler=NS;On.StrictMode=IS;On.Suspense=BS;On.SuspenseList=$S;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ga(e)===zS};On.isContextProvider=function(e){return Ga(e)===DS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m_};On.isForwardRef=function(e){return Ga(e)===FS};On.isFragment=function(e){return Ga(e)===RS};On.isLazy=function(e){return Ga(e)===WS};On.isMemo=function(e){return Ga(e)===HS};On.isPortal=function(e){return Ga(e)===v_};On.isProfiler=function(e){return Ga(e)===NS};On.isStrictMode=function(e){return Ga(e)===IS};On.isSuspense=function(e){return Ga(e)===BS};On.isSuspenseList=function(e){return Ga(e)===$S};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===RS||e===NS||e===IS||e===BS||e===$S||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===FS||e.$$typeof===t$||e.getModuleId!==void 0)};On.typeOf=Ga;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function l2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=s2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||od).Provider,{value:i,children:n})}function n$(e=od){const t=e===od?JB:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=n$();function h2e(e=od){const t=e===od?f2e:n$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(XB.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var y_="persist:",r$="persist/FLUSH",S_="persist/REHYDRATE",i$="persist/PAUSE",o$="persist/PERSIST",a$="persist/PURGE",s$="persist/REGISTER",g2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t{Object.keys(I).forEach(function(N){!T(N)||h[N]!==I[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){I[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=I},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var I=m.shift(),N=r.reduce(function(z,$){return $.in(z,I,h)},h[I]);if(N!==void 0)try{p[I]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[I];m.length===0&&k()}function k(){Object.keys(p).forEach(function(I){h[I]===void 0&&delete p[I]}),S=s.setItem(a,l(p)).catch(M)}function T(I){return!(n&&n.indexOf(I)===-1&&I!=="_persist"||t&&t.indexOf(I)!==-1)}function M(I){u&&u(I)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=w2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y_).concat(e.key);return t.removeItem(n,_2e)}function _2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function P2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=E2e(m,["_persist"]),w=S;if(p.type===o$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,H){return Promise.resolve($)};z(N,n).then(function($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===a$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===r$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===i$)l=!0;else if(p.type===S_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,p);var I=t(w,p);return I===w?h:u(iu({},I,{_persist:v}))}}function RL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:l$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case s$:return VC({},t,{registry:[].concat(RL(t.registry),[n.key])});case S_:var r=t.registry.indexOf(n.key),i=RL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=p_(I2e,l$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:s$,key:u})},a=function(u,h,p){var m={type:S_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:r$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:i$})},persist:function(){e.dispatch({type:o$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b_={},x_={};x_.__esModule=!0;x_.default=F2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var D2e={getItem:dw,setItem:dw,removeItem:dw};function z2e(e){if((typeof self>"u"?"undefined":V3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function F2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}b_.__esModule=!0;b_.default=H2e;var B2e=$2e(x_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,B2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var u$=void 0,W2e=V2e(b_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");u$=U2e;var c$={},d$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(w_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=th,n=w_,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const ee in V){const X=J?`${J}.${ee}`:ee,G=V[ee];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${ee}:`:(ie.add(G),(0,e.getCircularPath)(G,X,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const ee=V[ie];J[ie]=(0,e._cloneDeep)(ee)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),ee=(0,e.cloneDeep)(J),X=Object.keys(ie).reduce((Q,j)=>(h.call(ee,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(ie)||(0,e.isDate)(ee))return ie.valueOf()===ee.valueOf()?{}:ee;const G=Object.keys(ee).reduce((Q,j)=>{if(!h.call(ie,j))return Q[j]=ee[j],Q;const Z=(0,e.difference)(ie[j],ee[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(ie)&&!(0,e.isArray)(ee)||!(0,e.isArray)(ie)&&(0,e.isArray)(ee)?ee:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,ee)=>{if(ie){const X=parseInt(ee,10),G=(0,e.isIntegerString)(ee)&&X<0?ie.length+X:ee;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const E=function(V,J){return[...V].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((ee,X,G)=>(G===J.length-1&&ee&&(0,e.isObjectLike)(ee)&&delete ee[X],ee&&ee[X]),ie),ie};e.dissocPath=P;const k=function(V,J,...ie){if(!ie||!ie.length)return J;const ee=ie.shift(),{preservePlaceholder:X,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(ee))for(const Q in ee)if((0,e.isObjectLike)(ee[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(V,J[Q],ee[Q]);else if((0,e.isArray)(J)){let j=ee[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=ee[Q]!==t.PLACEHOLDER_UNDEFINED?ee[Q]:void 0;J[Q]=j}return k(V,J,...ie)},T=function(V,J,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,ee,X){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Q=V[G],j=(0,e.isArray)(V),Z=ee?ee+"."+G:G;Q===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(V[parseInt(G,10)]=void 0),Q===void 0&&X&&ie===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,ie,Z,X)}},R=function(V,J,ie,ee){const X=(0,e.cloneDeep)(V);return M(X,J,ie,"",ee),X};e.preserveUndefined=R;const I=function(V,J,ie){return ie.indexOf(V)===J};e.unique=I;const N=function(V){return V.reduce((J,ie)=>{const ee=V.filter(me=>me===ie),X=V.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=ee.length>1&&G.indexOf(ie)===-1,Z=X.length>1;return{duplicates:[...G,...j?ee:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const ee=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${ee} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(V);if(Q.length>1)throw new Error(`${X} Duplicated paths. - - ${JSON.stringify(Q)} - - ${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(j)} - - ${G}`)};e.singleTransformValidator=z;const $=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((ee,X)=>J.indexOf(ee)!==X);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const H=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:ee}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:ee},"whitelist")}if(J){const{duplicates:ie,subsets:ee}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:ee},"blacklist")}};e.configValidator=H;const q=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. - - ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(J)}`)};e.throwError=q;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const ee=ie.split("."),X=ee[0],G=ee.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(d$);(function(e){var t=ms&&ms.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=p,k=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),I=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=R.filter(de=>I.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),H=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...H,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(c$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C_(r)?r:!1},C_=e=>Boolean(typeof e=="string"?G2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),i4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),j2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,I=64,N=128,z=256,$=512,H=30,q="...",de=800,V=16,J=1,ie=2,ee=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",R],["partialRight",I],["rearg",z]],Be="[object Arguments]",We="[object Array]",dt="[object AsyncFunction]",Ye="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Ke="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",Cn="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",_n="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",ke="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Nn="[object Int32Array]",$e="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,y1=RegExp(pi.source),va=RegExp(Ms.source),bh=/<%-([\s\S]+?)%>/g,S1=/<%([\s\S]+?)%>/g,Ru=/<%=([\s\S]+?)%>/g,xh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Io=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,b1=RegExp(kd.source),Iu=/^\s+/,Ed=/\s/,x1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,w1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,C1=/[()=,{}\[\]\/\s]/,_1=/\\(\\)?/g,k1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ja=/\w*$/,E1=/^[-+]0x[0-9a-f]+$/i,P1=/^0b[01]+$/i,T1=/^\[object .+?Constructor\]$/,A1=/^0o[0-7]+$/i,L1=/^(?:0|[1-9]\d*)$/,M1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,O1=/['\n\r\u2028\u2029\\]/g,Ya="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Is="\\u20d0-\\u20ff",Fl=Dl+zl+Is,Ch="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",vn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ns+No+kn+vn,zo="['\u2019]",Ds="["+Ya+"]",Gr="["+Ur+"]",qa="["+Fl+"]",Pd="\\d+",Bl="["+Ch+"]",Ka="["+Du+"]",Td="[^"+Ya+Ur+Pd+Ch+Du+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+qa+"|"+gi+")",kh="[^"+Ya+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",$l="(?:"+Ka+"|"+Td+")",R1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=_h+"?",Bu="["+Cr+"]?",ya="(?:"+Fs+"(?:"+[kh,Ad,zs].join("|")+")"+Bu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Ld+ya,Eh="(?:"+[Bl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[kh+qa+"?",qa,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Ph=RegExp(qa,"g"),Fo=RegExp(gi+"(?="+gi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+Ka+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",R1+"+"+Fu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Fu,Hl,Md,Pd,Eh].join("|"),"g"),Od=RegExp("["+Fs+Ya+Fl+Cr+"]"),Th=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ah=-1,sn={};sn[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Nn]=sn[$e]=sn[ft]=sn[tt]=sn[Nt]=!0,sn[Be]=sn[We]=sn[jt]=sn[Ye]=sn[ke]=sn[rt]=sn[Ke]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[_n]=sn[Je]=!1;var Wt={};Wt[Be]=Wt[We]=Wt[jt]=Wt[ke]=Wt[Ye]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Nn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[_n]=Wt[mn]=Wt[$e]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[Ke]=Wt[Et]=Wt[Je]=!1;var Lh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},I1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,qe=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,Sa=dn&&dn.isRegExp,Bs=dn&&dn.isSet,N1=dn&&dn.isTypedArray;function mi(oe,be,ve){switch(ve.length){case 0:return oe.call(be);case 1:return oe.call(be,ve[0]);case 2:return oe.call(be,ve[0],ve[1]);case 3:return oe.call(be,ve[0],ve[1],ve[2])}return oe.apply(be,ve)}function D1(oe,be,ve,Ge){for(var _t=-1,Qt=oe==null?0:oe.length;++_t-1}function Mh(oe,be,ve){for(var Ge=-1,_t=oe==null?0:oe.length;++Ge<_t;)if(ve(be,oe[Ge]))return!0;return!1}function zn(oe,be){for(var ve=-1,Ge=oe==null?0:oe.length,_t=Array(Ge);++ve-1;);return ve}function Xa(oe,be){for(var ve=oe.length;ve--&&Uu(be,oe[ve],0)>-1;);return ve}function F1(oe,be){for(var ve=oe.length,Ge=0;ve--;)oe[ve]===be&&++Ge;return Ge}var y2=zd(Lh),Za=zd(I1);function Hs(oe){return"\\"+ne[oe]}function Rh(oe,be){return oe==null?n:oe[be]}function Vl(oe){return Od.test(oe)}function Ih(oe){return Th.test(oe)}function S2(oe){for(var be,ve=[];!(be=oe.next()).done;)ve.push(be.value);return ve}function Nh(oe){var be=-1,ve=Array(oe.size);return oe.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function Dh(oe,be){return function(ve){return oe(be(ve))}}function Ho(oe,be){for(var ve=-1,Ge=oe.length,_t=0,Qt=[];++ve-1}function F2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=J1,Wo.prototype.has=eg,Wo.prototype.set=F2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,B){var Y,te=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,B):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=It(c);if(_e){if(Y=GV(c),!te)return wi(c,Y)}else{var Le=si(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,te);if(Le==lt||Le==Be||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!te)return ce?yg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,te)}}B||(B=new vr);var ct=B.get(c);if(ct)return ct;B.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ii(St,g,b,St,c,B))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ii(St,g,b,Gt,c,B))});var yt=Ce?ce?ge:qo:ce?bo:li,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ii(St,g,b,Gt,c,B))}),Y}function Uh(c){var g=li(c);return function(b){return Gh(b,c,g)}}function Gh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],B=g[D],Y=c[D];if(Y===n&&!(D in c)||!B(Y))return!1}return!0}function ig(c,g,b){if(typeof c!="function")throw new vi(a);return Cg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,B=Ii,Y=!0,te=c.length,ce=[],Ce=g.length;if(!te)return ce;b&&(g=zn(g,_r(b))),L?(B=Mh,Y=!1):g.length>=i&&(B=ju,Y=!1,g=new Ca(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(te)?g>1?Er(te,g-1,b,L,D):ba(D,te):L||(D[D.length]=te)}return D}var Yh=Js(),go=Js(!0);function Yo(c,g){return c&&Yh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function qh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Xh(c,g){return c!=null&&en.call(c,g)}function Zh(c,g){return c!=null&&g in ln(c)}function Qh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Le=-1,Ue=te[0];e:for(;++Le-1;)te!==c&&Gd.call(te,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==B){var B=D;Zl(D)?Gd.call(c,D,1):lp(c,D)}}return c}function tf(c,g){return c+Gl(Y1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,B=mr(qd((g-c)/(b||1)),0),Y=ve(B);B--;)Y[L?B:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Lb(Pk(c,g,xo),c+"")}function rp(c){return sc(gp(c))}function nf(c,g){var b=gp(c);return j2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,B=g.length,Y=B-1,te=c;te!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var B=ve(D);++L>>1,Y=c[B];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:W(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new Ca}else ce=g?[]:te;e:for(;++L=L?c:Tr(c,g,b)}var pg=_2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function gg(c){var g=new c.constructor(c.byteLength);return new yi(g).set(new yi(c)),g}function Xl(c,g){var b=g?gg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,ja.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function V2(c,g){var b=g?gg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function mg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,B=Ko(c),Y=g!==n,te=g===null,ce=g===g,Ce=Ko(g);if(!te&&!Ce&&!B&&c>g||B&&Y&&ce&&!te&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!B&&!Ce&&c=te)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,B=c.length,Y=b.length,te=-1,ce=g.length,Ce=mr(B-Y,0),_e=ve(ce+Ce),Le=!L;++te1?b[D-1]:n,Y=D>2?b[2]:n;for(B=c.length>3&&typeof B=="function"?(D--,B):n,Y&&Xi(b[0],b[1],Y)&&(B=D<3?n:B,D=1),g=ln(g);++L-1?D[B?g[Y]:Y]:n}}function bg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var B=g[L];if(typeof B!="function")throw new vi(a);if(D&&!Y&&ye(B)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&cete))return!1;var Ce=B.get(c),_e=B.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,ct=b&w?new Ca:n;for(B.set(c,g),B.set(g,c);++Le1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(x1,`{ -/* [wrapped with `+g+`] */ -`)}function qV(c){return It(c)||df(c)||!!(G1&&c&&c[G1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&L1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Bk(c,b)});function $k(c){var g=F(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function Y2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(B){return Vh(B,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(B){return g&&!B.length&&B.push(n),B}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){var L=Rk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Mb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=cp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=It(c)?Dn:og;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=It(c)?ho:jo;return b(c,Te(g,3))}var vG=Sg(Ik),yG=Sg(Nk);function SG(c,g){return Er(q2(c,g),1)}function bG(c,g){return Er(q2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(q2(c,g),b)}function Hk(c,g){var b=It(c)?Vn:es;return b(c,Te(g,3))}function Wk(c,g){var b=It(c)?fo:jh;return b(c,Te(g,3))}var wG=cp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(c,g,b,L){c=So(c)?c:gp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",B=So(c)?ve(c.length):[];return es(c,function(Y){B[++L]=D?mi(g,Y,b):ts(Y,g,b)}),B}),kG=cp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=It(c)?zn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(It(g)||(g=g==null?[]:[g]),b=L?n:b,It(b)||(b=b==null?[]:[b]),bi(c,g,b))}var PG=cp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=It(c)?Id:Oh,D=arguments.length<3;return L(c,Te(g,4),b,D,es)}function AG(c,g,b){var L=It(c)?p2:Oh,D=arguments.length<3;return L(c,Te(g,4),b,D,jh)}function LG(c,g){var b=It(c)?ho:jo;return b(c,Z2(Te(g,3)))}function MG(c){var g=It(c)?sc:rp;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=It(c)?ri:nf;return L(c,g)}function RG(c){var g=It(c)?wb:ai;return g(c)}function IG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=It(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),bi(c,Er(g,1),[])}),K2=k2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Rb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Rb));L|=R}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=R}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,B,Y,te,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new vi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,B=Le?mr(Ea(b.maxWait)||0,g):B,Ue="trailing"in b?!!b.trailing:Ue);function ct(Lr){var as=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,as),Y}function yt(Lr){return Ce=Lr,te=Cg(Gt,g),_e?ct(Lr):Y}function $t(Lr){var as=Lr-ce,eu=Lr-Ce,hE=g-as;return Le?qr(hE,B-eu):hE}function St(Lr){var as=Lr-ce,eu=Lr-Ce;return ce===n||as>=g||as<0||Le&&eu>=B}function Gt(){var Lr=K2();if(St(Lr))return Jt(Lr);te=Cg(Gt,$t(Lr))}function Jt(Lr){return te=n,Ue&&L?ct(Lr):(L=D=n,Y)}function Xo(){te!==n&&pg(te),Ce=0,L=ce=D=te=n}function Zi(){return te===n?Y:Jt(K2())}function Zo(){var Lr=K2(),as=St(Lr);if(L=arguments,D=this,ce=Lr,as){if(te===n)return yt(ce);if(Le)return pg(te),te=Cg(Gt,g),ct(ce)}return te===n&&(te=Cg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var FG=Ct(function(c,g){return ig(c,1,g)}),BG=Ct(function(c,g,b){return ig(c,Ea(g)||0,b)});function $G(c){return he(c,$)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new vi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],B=b.cache;if(B.has(D))return B.get(D);var Y=c.apply(this,L);return b.cache=B.set(D,Y)||B,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new vi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function HG(c){return Uk(2,c)}var WG=kb(function(c,g){g=g.length==1&&It(g[0])?zn(g[0],_r(Te())):zn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,B=qr(L.length,b);++D=g}),df=ep(function(){return arguments}())?ep:function(c){return br(c)&&en.call(c,"callee")&&!U1.call(c,"callee")},It=ve.isArray,rj=jr?_r(jr):sg;function So(c){return c!=null&&Q2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&oi(c)==Ye}var yc=E2||Gb,oj=co?_r(co):lg;function aj(c){return br(c)&&c.nodeType===1&&!_g(c)}function sj(c){if(c==null)return!0;if(So(c)&&(It(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||pp(c)||df(c)))return!c.length;var g=si(c);if(g==Ae||g==Kt)return!c.size;if(wg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==Ke||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!_g(c)}function cj(c){return typeof c=="number"&&Bh(c)}function Ql(c){if(!sr(c))return!1;var g=oi(c);return g==Et||g==bt||g==dt||g==Cn}function Xk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Ui?_r(Ui):_b;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return tp(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&oi(c)==it}function _g(c){if(!br(c)||oi(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?_r(Sa):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Bs?_r(Bs):Ft;function J2(c){return typeof c=="string"||!It(c)&&br(c)&&oi(c)==_n}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==mn}var pp=N1?_r(N1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&si(c)==Je}function bj(c){return br(c)&&oi(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):wi(c);if(Ju&&c[Ju])return S2(c[Ju]());var g=si(c),b=g==Ae?Nh:g==Kt?Hd:gp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=Ea(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return j;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=P1.test(c);return b||A1.test(c)?qe(c.slice(2),b?2:8):E1.test(c)?j:+c}function nE(c){return _a(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(wg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){_a(g,bo(g),c)}),ey=Ki(function(c,g,b,L){_a(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){_a(g,li(g),c,L)}),Ej=er(Vh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b1),B}),_a(c,ge(c),b),L&&(b=ii(b,p|m|v,At));for(var D=g.length;D--;)lp(b,g[D]);return b});function jj(c,g){return oE(c,Z2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:dg(c,g)});function oE(c,g){if(c==null)return{};var b=zn(ge(c),function(L){return[L]});return g=Te(g),np(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=Y1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Bb(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(M1,y2).replace(Ph,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&va.test(c)?c.replace(Ms,Za):c}function lY(c){return c=Sn(c),c&&b1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=fp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?xa(c):0;return g&&L>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=qi(g),!g&&Vl(c))?rs(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Bb(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=F.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=ey({},g,L,Ie);var D=ey({},g.imports,L.imports,Ie),B=li(D),Y=$d(D,B),te,ce,Ce=0,_e=g.interpolate||Rs,Le="__p += '",Ue=Vd((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Ru?k1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),ct="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ah+"]")+` -`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(O1,Hs),Gt&&(te=!0,Le+=`' + -__e(`+Gt+`) + -'`),Zi&&(ce=!0,Le+=`'; -`+Zi+`; -__p += '`),Jt&&(Le+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),Ce=Zo+St.length,St}),Le+=`'; -`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) { -`+Le+` -} -`;else if(C1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { -`+(yt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Le+`return __p -}`;var $t=dE(function(){return Qt(B,ct+"return "+Le).apply(n,Y)});if($t.source=Le,Nb($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),B=$o(L,D),Y=Xa(L,D)+1;return rs(L,B,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,$1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Xa(L,Ni(g))+1;return rs(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Iu,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return rs(L,D).join("")}function TY(c,g){var b=H,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var B=c.length;if(Vl(c)){var Y=Ni(c);B=Y.length}if(b>=B)return c;var te=b-xa(L);if(te<1)return L;var ce=Y?rs(Y,0,te).join(""):c.slice(0,te);if(D===n)return ce+L;if(Y&&(te+=ce.length-te),Db(D)){if(c.slice(te).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(ja.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?te:Le)}}else if(c.indexOf(qi(D),te)!=te){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&y1.test(c)?c.replace(pi,w2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Bb=fp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Ih(c)?Wd(c):z1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return mi(c,n,g)}catch(b){return Nb(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Rb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new vi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++DG)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Bd(L,g);++b0||g<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=F[L?"take"+(g=="last"?"Right":""):g],B=L||/^find/.test(g);!D||(F.prototype[g]=function(){var Y=this.__wrapped__,te=L?[1]:arguments,ce=Y instanceof Ut,Ce=te[0],_e=ce||It(Y),Le=function(Gt){var Jt=D.apply(F,ba([Gt],te));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,ct=!!this.__actions__.length,yt=B&&!Ue,$t=ce&&!ct;if(!B&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,te);return St.__actions__.push({func:Y2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,te):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var B=this.value();return g.apply(It(B)?B:[],D)}return this[b](function(Y){return g.apply(It(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=F[g];if(b){var L=b.name+"";en.call(Qa,L)||(Qa[L]=[]),Qa[L].push({name:g,func:b})}}),Qa[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=Si,Ut.prototype.value=M2,F.prototype.at=aG,F.prototype.chain=sG,F.prototype.commit=lG,F.prototype.next=uG,F.prototype.plant=dG,F.prototype.reverse=fG,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=hG,F.prototype.first=F.prototype.head,Ju&&(F.prototype[Ju]=cG),F},wa=po();Vt?((Vt.exports=wa)._=wa,Tt._=wa):vt._=wa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,f$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&f$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},h$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?f$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),p$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=De((e,t)=>{var n=p$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=VS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),tye=De((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=VS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),US=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=g$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),__=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=__(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=De((e,t)=>{var n=__(),r=lye(),i=uye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),m$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),v$=De((e,t)=>{var n=GS(),r=m$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),cye=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),y$=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),fye=De((e,t)=>{var n=v$(),r=dye(),i=m$(),o=y$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),d1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k_=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Map");t.exports=i}),jS=De((e,t)=>{var n=d1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=jS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),vye=De((e,t)=>{var n=jS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),yye=De((e,t)=>{var n=jS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Sye(),r=US(),i=k_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),YS=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=YS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),S$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US(),r=k_(),i=S$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=US(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=S$(),r=Tye(),i=Aye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),b$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),Iye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=__(),r=Rye(),i=p$(),o=b$(),a=Iye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,I=R?R.valueOf:void 0;function N(z,$,H,q,de,V,J){switch(H){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!V(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var ee=q&l;if(ie||(ie=s),z.size!=$.size&&!ee)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(ie(z),ie($),q,de,V,J);return J.delete(z),G;case k:if(I)return I.call(z)==I.call($)}return!1}t.exports=N}),zye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),Fye=De((e,t)=>{var n=zye(),r=E_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Bye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Bye(),r=$ye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=qS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),x$=De((e,t)=>{var n=Eu(),r=Gye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),jye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=GS(),r=w$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",I="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",H="[object Uint8ClampedArray]",q="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[R]=V[I]=V[N]=V[z]=V[$]=V[H]=V[q]=V[de]=!0,V[o]=V[a]=V[k]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[E]=V[P]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=g$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),C$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=E_(),o=x$(),a=jye(),s=C$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),t3e=De((e,t)=>{var n=v$(),r=w$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Fye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var I=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=d1(),r=Eu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=k_(),i=a3e(),o=s3e(),a=l3e(),s=GS(),l=y$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var I=s(R),N=I==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return p;case k:return m;case T:return v}return I}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=b$(),i=Dye(),o=i3e(),a=u3e(),s=E_(),l=x$(),u=C$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,I){var N=s(P),z=s(k),$=N?m:a(P),H=z?m:a(k);$=$==p?v:$,H=H==p?v:H;var q=$==v,de=H==v,V=$==H;if(V&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(V&&!q)return I||(I=new n),N||u(P)?r(P,k,T,M,R,I):i(P,k,$,T,M,R,I);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(J||ie){var ee=J?P.value():P,X=ie?k.value():k;return I||(I=new n),R(ee,X,T,M,I)}}return V?(I||(I=new n),o(P,k,T,M,R,I)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=qS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),_$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function Hm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return k$(e,["input","textarea","select"])}function k$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function v3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var y3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=h$(_$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!k$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(E=>{let P=Hm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey(Hm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey(Hm(w,u?.combinationKey)))}},[e,l,u,h]),i}h$(_$());var UC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add(Hm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Hm(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const T3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),A3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),L3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),M3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),O3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var to=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(to||{});const R3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(hd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s_,{className:"invokeai__switch-root",...s})]})})};function P_(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(F_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&R(String(u))},[u,M]);const I=z=>{R(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);R(String($)),h($)};return x(Oi,{...k,children:re(hd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:N,width:a,...T,children:[x(Q8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e_,{...P,className:"invokeai__number-input-stepper-button"}),x(J8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},yd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:re(hd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(gB,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})]})})},I3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],D3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],z3e=[{key:"2x",value:2},{key:"4x",value:4}],T_=0,A_=4294967295,F3e=["gfpgan","codeformer"],B3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=pt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=pt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),KS=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee($3e),{isGFPGANAvailable:i}=Ee(H3e),o=l=>e(K3(l)),a=l=>e(sV(l)),s=l=>e(X3(l.target.value));return re(rn,{direction:"column",gap:2,children:[x(yd,{label:"Type",validValues:F3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var E$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(E$),Xc=globalThis&&globalThis.__assign||function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function Y0(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:I,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:H,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:ee,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Be=>{const We=st.clamp(S?Math.floor(Number(Be.target.value)):Number(Be.target.value),o,Z);j(String(We)),l(We)},Se=Be=>{j(Be),l(Number(Be))},xe=()=>{!T||T()};return re(hd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),re(Wz,{w:"100%",gap:2,children:[re(a_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&re(Tn,{children:[x(IC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...H,children:o}),x(IC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...H,children:a})]}),x(EB,{className:"invokeai__slider_track",...q,children:x(PB,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...ee,children:x(kB,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:I,...V,children:[x(Q8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),re(lB,{...ie,children:[x(e_,{className:"invokeai__slider-number-stepper"}),x(J8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L_,{}),onClick:xe,isDisabled:M,...X})]})]})}function T$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(Y0,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const A$=()=>x(pd,{flex:"1",textAlign:"left",children:"Other Options"}),X3e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},Z3e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},L$=()=>re(rn,{gap:2,direction:"column",children:[x(Z3e,{}),x(X3e,{})]}),M_=()=>x(pd,{flex:"1",textAlign:"left",children:"Seed"});function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e($_e(r.target.checked))})}function J3e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(d2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:T_,max:A_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const M$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function e5e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(d2(M$(T_,A_))),children:x("p",{children:"Shuffle"})})}function t5e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(R_e(r)),value:t,isInteger:!1})}function n5e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(I_e(r)),value:t,isInteger:!1})}const O_=()=>re(rn,{gap:2,direction:"column",children:[x(Q3e,{}),re(rn,{gap:2,children:[x(J3e,{}),x(e5e,{})]}),x(rn,{gap:2,children:x(t5e,{})}),x(rn,{gap:2,children:x(n5e,{})})]});function R_(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(B_e(i.target.checked))})]})}const r5e=pt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),i5e=pt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),XS=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(r5e),{isESRGANAvailable:r}=Ee(i5e);return re("div",{className:"upscale-options",children:[x(yd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function o5e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(N_e(r.target.checked))})}function I_(){return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(o5e,{})]})}function a5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(hd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k8,{...s,className:"input-entry",size:"sm",width:o})]})}function s5e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(cV(i.target.value));return x(a5e,{label:"Seed Weights",value:e,isInvalid:t&&!(C_(e)||e===""),isDisabled:!t,onChange:r})}function l5e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(D_e(i)),isInteger:!1})}const N_=()=>re(rn,{gap:2,direction:"column",children:[x(l5e,{}),x(s5e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Ez,{className:`invokeai__checkbox ${n}`,...r,children:t})};function D_(){const e=Ee(r=>r.options.showAdvancedOptions),t=Xe();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(H_e(r.target.checked)),isChecked:e})}function u5e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:z_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Ir=pt(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),c5e=pt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function d5e(){const e=Ee(i=>i.options.height),t=Ee(Ir),n=Xe();return x(yd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const f5e=pt([e=>e.options,c5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h5e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(f5e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(O_e(i)),value:t,width:z_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function p5e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(yd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:I3e,styleClass:"main-option-block"})}function g5e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:z_,styleClass:"main-option-block",textAlign:"center"})}function m5e(){const e=Ee(i=>i.options.width),t=Ee(Ir),n=Xe();return x(yd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const z_="auto";function F_(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(h5e,{}),x(g5e,{}),x(u5e,{})]}),re("div",{className:"main-options-row",children:[x(m5e,{}),x(d5e,{}),x(p5e,{})]})]})})}const v5e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},O$=MS({name:"system",initialState:v5e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:y5e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:FL,setSocketId:RPe,setShouldConfirmOnDelete:R$,setOpenAccordions:S5e,setSystemStatus:b5e,setCurrentStatus:G3,setSystemConfig:x5e,setShouldDisplayGuides:w5e,processingCanceled:C5e,errorOccurred:BL,errorSeen:I$,setModelList:$L,setIsCancelable:Kp,modelChangeRequested:_5e,setSaveIntermediatesInterval:k5e,setEnableImageDebugging:E5e,generationRequested:P5e,addToast:sm,clearToastQueue:T5e,setProcessingIndeterminateTask:A5e}=O$.actions,L5e=O$.reducer;function M5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function O5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function N$(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function R5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function I5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const N5e=pt(e=>e.system,e=>e.shouldDisplayGuides),D5e=({children:e,feature:t})=>{const n=Ee(N5e),{text:r}=R3e[t];return n?re(t_,{trigger:"hover",children:[x(i_,{children:x(pd,{children:e})}),re(r_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},z5e=Pe(({feature:e,icon:t=M5e},n)=>x(D5e,{feature:e,children:x(pd,{ref:n,children:x(ma,{as:t})})}));function F5e(e){const{header:t,feature:n,options:r}=e;return re(Df,{className:"advanced-settings-item",children:[x("h2",{children:re(If,{className:"advanced-settings-header",children:[t,x(z5e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(S5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(F5e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function B5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function $5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function H5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function D$(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function z$(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function W5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function V5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function U5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function G5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function j5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function $_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function F$(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function H_(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function Y5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function B$(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function q5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function K5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function X5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function Z5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function Q5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function J5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function e4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function t4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function n4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function r4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function i4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function o4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function a4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function s4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function l4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function u4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function $$(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function c4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function d4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function f4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function h4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function f1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function W_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const m4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",v4e=e=>e.kind==="line"&&e.layer==="base",o4=e=>e.kind==="image"&&e.layer==="base",y4e=e=>e.kind==="line",$n=e=>e.canvas,Pu=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(o4),W$=pt([e=>e.options,e=>e.system,H$,Ir],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(C_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),GC=Jr("socketio/generateImage"),S4e=Jr("socketio/runESRGAN"),b4e=Jr("socketio/runFacetool"),x4e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),WL=Jr("socketio/requestNewImages"),w4e=Jr("socketio/cancelProcessing"),C4e=Jr("socketio/requestSystemConfig"),V$=Jr("socketio/requestModelChange"),_4e=Jr("socketio/saveStagingAreaImageToGallery"),k4e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function U$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i,reasonsWhyNotReady:o}=Ee(W$),a=Ee(Ir),s=()=>{r(GC(a))};return mt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(a))},[i,a]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(a4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})})}const E4e=pt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(E4e),a=()=>n(w4e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(I5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const P4e=pt(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Xe(),t=Ee(P4e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(l4e,{}),onClick:()=>{e(q_e(!t))}})},G_=()=>re("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),T4e=pt([e=>e.options,Ir],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(T4e),{isReady:r}=Ee(W$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(hd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(NB,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function q$(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function A4e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function L4e(e,t){e.classList?e.classList.add(t):A4e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function M4e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},K$=le.createContext(null);var X$=function(t){return t.scrollTop},lm="unmounted",bf="exited",xf="entering",Rp="entered",YC="exiting",Tu=function(e){$8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=lm:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===lm?{status:bf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=YC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:lm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:yy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===lm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=z8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function kp(){}Tu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Tu.UNMOUNTED=lm;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=YC;const O4e=Tu;var R4e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return L4e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M4e(t,r)})},Y_=function(e){$8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Bc=(e,t)=>Math.round(e/t)*t,Ep=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Pp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),I4e=e=>({width:Bc(e.width,64),height:Bc(e.height,64)}),N4e=.999,D4e=.1,z4e=20,Hg=.95,um={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F4e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:um,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},Q$=MS({name:"canvas",initialState:F4e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!U_(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:fl(st.clamp(n.width,64,512),64),height:fl(st.clamp(n.height,64,512),64)},o={x:Bc(n.width/2-i.width/2,64),y:Bc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...um,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Ep(r.width,r.height,n.width,n.height,Hg),s=Pp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=fl(st.clamp(i,64,n/e.stageScale),64),s=fl(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=I4e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(y4e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=um,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Ep(i.width,i.height,512,512,Hg),p=Pp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Ep(t,n,o,a,.95),u=Pp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(o4)){const i=Ep(r.width,r.height,512,512,Hg),o=Pp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Ep(r,i,s,l,Hg),h=Pp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Ep(r,i,512,512,Hg),h=Pp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:fl(st.clamp(o,64,512),64),height:fl(st.clamp(a,64,512),64)},l={x:Bc(o/2-s.width/2,64),y:Bc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:B4e,addLine:J$,addPointToCurrentLine:eH,clearMask:$4e,commitStagingAreaImage:H4e,discardStagedImages:W4e,fitBoundingBoxToStage:IPe,nextStagingAreaImage:V4e,prevStagingAreaImage:U4e,redo:G4e,resetCanvas:tH,resetCanvasInteractionState:j4e,resetCanvasView:Y4e,resizeAndScaleCanvas:nH,resizeCanvas:q4e,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:cm,setBoundingBoxPreviewFill:NPe,setBrushColor:K4e,setBrushSize:mw,setCanvasContainerDimensions:X4e,clearCanvasHistory:rH,setCursorPosition:iH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:ZS,setIsMaskEnabled:Z4e,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:DPe,setIsMoveStageKeyHeld:zPe,setIsMovingBoundingBox:YL,setIsMovingStage:a4,setIsTransformingBoundingBox:vw,setLayer:qL,setMaskColor:Q4e,setMergedCanvas:J4e,setShouldAutoSave:eSe,setShouldCropToBoundingBoxOnSave:tSe,setShouldDarkenOutsideBoundingBox:nSe,setShouldLockBoundingBox:FPe,setShouldPreserveMaskedArea:rSe,setShouldShowBoundingBox:iSe,setShouldShowBrush:BPe,setShouldShowBrushPreview:$Pe,setShouldShowCanvasDebugInfo:oSe,setShouldShowCheckboardTransparency:HPe,setShouldShowGrid:aSe,setShouldShowIntermediates:sSe,setShouldShowStagingImage:lSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:uSe,setShouldUseInpaintReplace:cSe,setStageCoordinates:oH,setStageDimensions:WPe,setStageScale:dSe,setTool:C0,toggleShouldLockBoundingBox:VPe,toggleTool:UPe,undo:fSe}=Q$.actions,hSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,pSe=pt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K_=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(pSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(j_e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(Y_e(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(G_e(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(Z$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function gSe(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})},other:{header:x(A$,{}),feature:to.OTHER,options:x(L$,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(T$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(D_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),mSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},vSe=pt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=kv(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(vSe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(x4e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return re(Tn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(oB,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(aB,{children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Lv,{children:re(rn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(hd,{children:re(rn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(s_,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Zc=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t_,{...o,children:[x(i_,{children:t}),re(r_,{className:`invokeai__popover-content ${r}`,children:[i&&x(n_,{className:"invokeai__popover-arrow"}),n]})]})},ySe=pt([e=>e.system,e=>e.options,e=>e.gallery,Ir],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(ySe),m=u1(),v=()=>{!u||(h&&e(sd(!1)),e(f2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};mt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(z_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(d2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(S4e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(b4e(u))};mt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(dV(!l)),R=()=>{!u||(h&&e(sd(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(d4e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:R,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(H_,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(B$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(gt,{icon:x(s4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(c4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(G5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(Zc,{trigger:"hover",triggerComponent:x(gt,{icon:x(Q5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(KS,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(Zc,{trigger:"hover",triggerComponent:x(gt,{icon:x(K5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(XS,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(gt,{icon:x(f1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},SSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},lH=MS({name:"gallery",initialState:SSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:uH,setCurrentImage:bSe,addGalleryImages:xSe,setIntermediateImage:wSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:CSe,setShouldShowGallery:_0,setGalleryScrollPosition:_Se,setGalleryImageMinimumWidth:Tp,setGalleryImageObjectFit:kSe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:ESe,setCurrentCategory:Wy,setGalleryWidth:Vy}=lH.actions,PSe=lH.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var dH=ut({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:re(Tn,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function TSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>re(rn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(TSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),re(rn,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ASe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:R}=r,I=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(rn,{gap:1,direction:"column",width:"100%",children:[re(rn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?re(Tn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),i==="esrgan"&&R!==void 0&&x(qn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:U3(s),onClick:()=>n(gb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(d2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:i4(u),onClick:()=>n(cV(i4(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(f2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&re(Tn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:H}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(qn,{label:"Strength",value:H,onClick:()=>n(x9(H))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:H}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),H&&x(qn,{label:"Fidelity",value:H,onClick:()=>{n(sV(H)),n(X3("codeformer"))}})]},z)}})]}),re(rn,{gap:2,direction:"column",children:[re(rn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(H_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(I)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:I})})]})]}):x(zz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ASe),hH=pt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function LSe(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(sd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(D$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const MSe=pt([e=>e.gallery,e=>e.options,Ir],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(MSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re(Tn,{children:[x(sH,{}),x(LSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(R5e,{})})})},OSe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=u1(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return re(Tn,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(OSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ISe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(RSe,{})}):x(mSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function NSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var DSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},VSe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],eM="__resizable_base__",gH=function(e){BSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(eM):o.className+=eM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||$Se},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(p,P),I=Math.max(m,k),N=Math.min(v,T);n=Gy(n,M,R),r=Gy(r,I,N)}else n=Gy(n,h,p),r=Gy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&HSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&jy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&jy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=jy(n)?n.touches[0].clientX:n.clientX,h=jy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=WSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(T,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=I.newWidth,T=I.newHeight,this.props.grid){var N=QL(M,this.props.grid[0]),z=QL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var H={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Ol.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,H)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(FSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return VSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return re(o,{...ul({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,USe(i,...t)]}function USe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function GSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>GSe(n,t))}function Va(...e){return C.exports.useCallback(mH(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(YSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(KC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,An({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...qSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const jSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function YSe(e){return C.exports.isValidElement(e)&&e.type===jSe}function qSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const KSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=KSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Va(S,P.collectionRef);return le.createElement(Iv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Va(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Iv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const XSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(XSe);return e||t||"ltr"}function Al(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ZSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",QSe="dismissableLayer.pointerDownOutside",JSe="dismissableLayer.focusOutside";let tM;const ebe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(ebe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Va(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,I=nbe(z=>{const $=z.target,H=[...h.branches].some(q=>q.contains($));!R||H||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=rbe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ZSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,I.onPointerDownCapture)}))});function nbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){bH(QSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(JSe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nM(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function bH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vH(i,o):i.dispatchEvent(o)}let bw=0;function ibe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},obe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Al(i),h=Al(o),p=C.exports.useRef(null),m=Va(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(xw,iM);s.addEventListener(xw,u),s.dispatchEvent(P),P.defaultPrevented||(abe(dbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const P=new CustomEvent(ww,iM);s.addEventListener(ww,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(ww,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=sbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function sbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oM(e,t){for(const n of e)if(!lbe(n,{upTo:t}))return n}function lbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ube(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ube(e)&&t&&e.select()}}const aM=cbe();function cbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dbe(e){return e.filter(t=>t.tagName!=="A")}const q0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},fbe=zw["useId".toString()]||(()=>{});let hbe=0;function pbe(e){const[t,n]=C.exports.useState(fbe());return q0(()=>{e||n(r=>r??String(hbe++))},[e]),e||(t?`radix-${t}`:"")}function h1(e){return e.split("-")[0]}function QS(e){return e.split("-")[1]}function p1(e){return["top","bottom"].includes(h1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=p1(t),l=J_(s),u=r[l]/2-i[l]/2,h=h1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(QS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const gbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=wH(r),h={x:i,y:o},p=p1(a),m=QS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,I=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,$=ZC(I,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zSbe[t])}function bbe(e,t,n){n===void 0&&(n=!1);const r=QS(e),i=p1(e),o=J_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u4(a)),{main:a,cross:u4(a)}}const xbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>xbe[t])}const wbe=["top","right","bottom","left"];function Cbe(e){const t=u4(e);return[cM(e),t,cM(t)]}const _be=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=h1(r),P=p||(w===a||!v?[u4(a)]:Cbe(a)),k=[a,...P],T=await l4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:H}=bbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[H])}if(R=[...R,{placement:r,overflows:M}],!M.every($=>$<=0)){var I,N;const $=((I=(N=i.flip)==null?void 0:N.index)!=null?I:0)+1,H=k[$];if(H)return{data:{index:$,overflows:R},reset:{placement:H}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=R.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return wbe.some(t=>e[t]>=0)}const kbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await l4(r,{...n,elementContext:"reference"}),a=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await l4(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Ebe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=h1(n),s=QS(n),l=p1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Pbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ebe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Tbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await l4(t,l),p=p1(h1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=ZC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=ZC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Abe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=p1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=p==="y"?"height":"width",I=o.reference[p]-o.floating[R]+E.mainAxis,N=o.reference[p]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=p==="y"?"width":"height",I=["top","left"].includes(h1(i)),N=o.reference[m]-o.floating[R]+(I&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(I?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(I?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(I?E.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Au(e).getComputedStyle(e)}function Cu(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function ad(e){return e instanceof Au(e).Element}function Lbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Mbe(e){return["table","td","th"].includes(Cu(e))}function EH(e){const t=/firefox/i.test(kH()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Wm=Math.max,c4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&c4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c4(s.height)/e.offsetHeight||1);const h=ad(e)?Au(e):window,p=!PH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Lbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function eb(e){return ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return _u(Sd(e)).left+eb(e).scrollLeft}function Obe(e){const t=_u(e);return c4(t.width)!==e.offsetWidth||c4(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=_u(e,r&&Obe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||JS(i))&&(a=eb(t)),Ll(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ibe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Cu(t));){if(EH(t))return t;t=t.parentNode}return null}function QC(e){const t=Au(e);let n=pM(e);for(;n&&Mbe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Ibe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Nbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||JS(o))&&(a=eb(n)),Ll(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Dbe(e,t){const n=Au(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function zbe(e){var t;const n=Sd(e),r=eb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Wm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Ll(t)&&JS(t)?t:LH(t)}function d4(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],JS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d4(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Bbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mM(e,t,n){return t==="viewport"?s4(Dbe(e,n)):ad(t)?Bbe(t,n):s4(zbe(Sd(e)))}function $be(e){const t=d4(e),r=["absolute","fixed"].includes(s2(e).position)&&Ll(e)?QC(e):e;return ad(r)?t.filter(i=>ad(i)&&Fbe(i,r)&&Cu(i)!=="body"):[]}function Hbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?$be(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Wm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Wm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Wbe={getClippingRect:Hbe,convertOffsetParentRelativeRectToViewportRelativeRect:Nbe,isElement:ad,getDimensions:gM,getOffsetParent:QC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,QC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Vbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ad(e)?d4(e):[],...d4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ad(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?_u(e):null;s&&S();function S(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Ube=(e,t,n)=>gbe(e,t,{platform:Wbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!e9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Gbe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function jbe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Gbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Ube(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Ybe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function qbe(e){const[t,n]=C.exports.useState(void 0);return q0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const MH="Popper",[tk,OH]=a2(MH),[Kbe,RH]=tk(MH),Xbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Kbe,{scope:t,anchor:r,onAnchorChange:i},n)},Zbe="PopperAnchor",Qbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=RH(Zbe,n),a=C.exports.useRef(null),s=Va(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),f4="PopperContent",[Jbe,GPe]=tk(f4),[exe,txe]=tk(f4,{hasParent:!1,positionUpdateFns:new Set}),nxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,I=RH(f4,h),[N,z]=C.exports.useState(null),$=Va(t,Pt=>z(Pt)),[H,q]=C.exports.useState(null),de=qbe(H),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),ee=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:ee,boundary:X.filter(ixe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Be,middlewareData:We,update:dt}=jbe({strategy:"fixed",placement:ie,whileElementsMounted:Vbe,middleware:[Pbe({mainAxis:m+J,alignmentAxis:S}),M?Tbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Abe():void 0,...Q}):void 0,H?Ybe({element:H,padding:w}):void 0,M?_be({...Q}):void 0,oxe({arrowWidth:V,arrowHeight:J}),T?kbe({strategy:"referenceHidden"}):void 0].filter(rxe)});q0(()=>{j(I.anchor)},[j,I.anchor]);const Ye=Se!==null&&xe!==null,[rt,Ze]=IH(Be),Ke=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();q0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=txe(f4,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(dt),()=>{lt.delete(dt)}},[xt,lt,dt]),C.exports.useLayoutEffect(()=>{xt&&Ye&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,Ye,lt]);const Cn={"data-side":rt,"data-align":Ze,...R,ref:$,style:{...R.style,animation:Ye?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:Ye?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Jbe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Ke,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(exe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(wu.div,Cn)):C.exports.createElement(wu.div,Cn)))});function rxe(e){return e!==void 0}function ixe(e){return e!==null}const oxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=IH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function IH(e){const[t,n="center"]=e.split("-");return[t,n]}const axe=Xbe,sxe=Qbe,lxe=nxe;function uxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=cxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Va(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function cxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=uxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=qy(r.current);o.current=s==="mounted"?u:"none"},[s]),q0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=qy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),q0(()=>{if(t){const u=p=>{const v=qy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=qy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qy(e){return e?.animationName||"none"}function dxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=fxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function fxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",hxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[t9,DH,pxe]=yH(nk),[gxe,zH]=a2(nk,[pxe]),[mxe,vxe]=gxe(nk),yxe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Sxe,An({},e,{ref:t}))))),Sxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Va(t,p),v=SH(o),[S=null,w]=dxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(n),M=C.exports.useRef(!1),[R,I]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,k),()=>N.removeEventListener(Cw,k)},[k]),C.exports.createElement(mxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>I(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>I(N=>N-1),[])},C.exports.createElement(wu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(Cw,hxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const H=T().filter(ie=>ie.focusable),q=H.find(ie=>ie.active),de=H.find(ie=>ie.id===S),J=[q,de,...H].filter(Boolean).map(ie=>ie.ref.current);FH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),bxe="RovingFocusGroupItem",xxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=pbe(),s=vxe(bxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=_xe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?kxe(w,E+1):w.slice(E+1)}setTimeout(()=>FH(w))}})})))}),wxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _xe(e,t,n){const r=Cxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wxe[r]}function FH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Exe=yxe,Pxe=xxe,Txe=["Enter"," "],Axe=["ArrowDown","PageUp","Home"],BH=["ArrowUp","PageDown","End"],Lxe=[...Axe,...BH],tb="Menu",[n9,Mxe,Oxe]=yH(tb),[hh,$H]=a2(tb,[Oxe,OH,zH]),rk=OH(),HH=zH(),[Rxe,nb]=hh(tb),[Ixe,ik]=hh(tb),Nxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(axe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Ixe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Dxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(sxe,An({},i,r,{ref:t}))}),zxe="MenuPortal",[jPe,Fxe]=hh(zxe,{forceMount:void 0}),Qc="MenuContent",[Bxe,WH]=hh(Qc),$xe=C.exports.forwardRef((e,t)=>{const n=Fxe(Qc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=nb(Qc,e.__scopeMenu),a=ik(Qc,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Hxe,An({},i,{ref:t})):C.exports.createElement(Wxe,An({},i,{ref:t})))))}),Hxe=C.exports.forwardRef((e,t)=>{const n=nb(Qc,e.__scopeMenu),r=C.exports.useRef(null),i=Va(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return mF(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Wxe=C.exports.forwardRef((e,t)=>{const n=nb(Qc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=nb(Qc,n),E=ik(Qc,n),P=rk(n),k=HH(n),T=Mxe(n),[M,R]=C.exports.useState(null),I=C.exports.useRef(null),N=Va(t,I,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),H=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?nB:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,ee=G=>{var Q,j;const Z=$.current+G,me=T().filter(Ye=>!Ye.disabled),Se=document.activeElement,xe=(Q=me.find(Ye=>Ye.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Be=me.map(Ye=>Ye.textValue),We=Zxe(Be,Z,xe),dt=(j=me.find(Ye=>Ye.textValue===We))===null||j===void 0?void 0:j.ref.current;(function Ye(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>Ye(""),1e3))})(Z),dt&&setTimeout(()=>dt.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ibe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&Jxe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement(Bxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=I.current)===null||Q===void 0||Q.focus(),R(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:H,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(obe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=I.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(tbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Exe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(lxe,An({role:"menu","aria-orientation":"vertical","data-state":qxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&ee(G.key));const Se=I.current;if(G.target!==Se||!Lxe.includes(G.key))return;G.preventDefault();const Be=T().filter(We=>!We.disabled).map(We=>We.ref.current);BH.includes(G.key)&&Be.reverse(),Kxe(Be)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,i9(G=>{const Q=G.target,j=V.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>V.current?"right":"left";de.current=Z,V.current=G.clientX}}))})))))))}),r9="MenuItem",vM="menu.itemSelect",Vxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(r9,e.__scopeMenu),s=WH(r9,e.__scopeMenu),l=Va(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Uxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Txe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Uxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(r9,n),s=HH(n),l=C.exports.useRef(null),u=Va(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Pxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),Gxe="MenuRadioGroup";hh(Gxe,{value:void 0,onValueChange:()=>{}});const jxe="MenuItemIndicator";hh(jxe,{checked:!1});const Yxe="MenuSub";hh(Yxe);function qxe(e){return e?"open":"closed"}function Kxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zxe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Xxe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Qxe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Jxe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Qxe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ewe=Nxe,twe=Dxe,nwe=$xe,rwe=Vxe,UH="ContextMenu",[iwe,YPe]=a2(UH,[$H]),rb=$H(),[owe,GH]=iwe(UH),awe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=rb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(owe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(ewe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},swe="ContextMenuTrigger",lwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(swe,n),o=rb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(twe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,Ky(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,Ky(u)),onPointerCancel:Yn(e.onPointerCancel,Ky(u)),onPointerUp:Yn(e.onPointerUp,Ky(u))})))}),uwe="ContextMenuContent",cwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(uwe,n),o=rb(n),a=C.exports.useRef(!1);return C.exports.createElement(nwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=rb(n);return C.exports.createElement(rwe,An({},i,r,{ref:t}))});function Ky(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const fwe=awe,hwe=lwe,pwe=cwe,pf=dwe,gwe=pt([e=>e.gallery,e=>e.options,Pu,Ir],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),mwe=pt([e=>e.options,e=>e.gallery,e=>e.system,Ir],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,ywe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(mwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=u1(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(d2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(sd(!1)),t(f2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(sd(!1)),t(q_(s)),t(nH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},I=()=>{m&&t(W_e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(V_e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(fwe,{onOpenChange:$=>{t(cH($))},children:[x(hwe,{children:re(pd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(bSe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:$_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(h4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(pwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:I,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},vwe),Swe=320;function jH(){const e=Xe(),t=u1(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=Ee(gwe),[k,T]=C.exports.useState(300),[M,R]=C.exports.useState(590),[I,N]=C.exports.useState(w>=Swe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Vy(400)),T(400),R(400);return}h==="unifiedCanvas"?(T(190),R(190),e(io(!0))):h==="img2img"?(e(Vy(Math.min(Math.max(Number(w),0),490))),R(490)):(e(Vy(Math.min(Math.max(Number(w),0),590))),R(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||R(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),H=C.exports.useRef(null),q=()=>{e(CSe(!o)),e(io(!0))},de=()=>{a?J():V()},V=()=>{e(_0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(_0(!1)),e(cH(!1)),e(_Se($.current?$.current.scrollTop:0))},[e]),ie=()=>{e(jC(r))},ee=j=>{e(Tp(j))},X=()=>{m||(H.current=window.setTimeout(()=>J(),500))},G=()=>{H.current&&window.clearTimeout(H.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(_0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Tp(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Tp(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Tp(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Tp(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){!o&&z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J,o]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:re(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:!0},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Vy(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=315&&!I?N(!0):xe<315&&I&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?re(Tn,{children:[x(ta,{size:"sm","data-selected":r==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":r==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re(Tn,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":r==="result",icon:x(J5e,{}),onClick:()=>e(Wy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(g4e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(Zc,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(Y0,{value:l,onChange:ee,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Tp(64)),icon:x(L_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(kSe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(ESe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?re(Tn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(ywe,{image:j,isSelected:i===Z},Z)})}),x($a,{onClick:ie,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(N$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const bwe=pt([e=>e.options,Ir],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ok=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(bwe),l=()=>{t(U_e(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(NSe,{})})})]}),!a&&x(jH,{})]})})};function xwe(){return x(ok,{optionsPanel:x(gSe,{}),children:x(ISe,{})})}function wwe(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})},other:{header:x(A$,{}),feature:to.OTHER,options:x(L$,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(D_,{}),e?x(B_,{accordionInfo:t}):null]})}const Cwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function _we(){return x(ok,{optionsPanel:x(wwe,{}),children:x(Cwe,{})})}var o9=function(e,t){return o9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},o9(e,t)};function kwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Hwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Hwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Wwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Vwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ak=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Wwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Vwe(a,l,u,s,h,p,Boolean(i));return m},K0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function ib(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?en?Na(n,2):Na(e,2):Na(e,2)};function ob(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=ib(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var SM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ab(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Uwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},Gwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function jwe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ob(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function Ywe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=ib(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var qwe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},Kwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Xwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Zwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:a9(e,o,a,i)}function Qwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function Jwe(e,t){var n=Kwe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=Qwe(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function e6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Xwe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,I=S.velocityAlignmentTime,N=I,z=Zwe(e,l),$=Math.max(z,N),H=h4(e,M),q=h4(e,R),de=H*i.offsetWidth/100,V=q*i.offsetHeight/100,J=u+de,ie=h-de,ee=p+V,X=m-V,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Be=new Date().getTime()-Q,We=Be/N,dt=YH[S.animationType],Ye=1-dt(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Ke=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,ie,J,Ye),bt=xM(Ke,G.positionY,xe,P,v,m,p,X,ee,Ye);(Se!==Ze||xe!==Ke)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),K0(e,n),t.touches?Gwe(e,t):Uwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=qwe(e,t,n),u=l.x,h=l.y,p=h4(e,a),m=h4(e,s);Jwe(e,{x:u,y:h}),Ywe(e,u,h,p,m)}}function t6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?e6e(e):XH(e)}}function XH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Na(t,2),o,a,0,!1),u=K0(e,l),h=ob(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},n6e=El(El({},Zp),{setComponents:function(){},contextInstance:null}),Wg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},_M=function(e){var t=El({},Wg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Wg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Wg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},Wg[n]),e[n]):s?t[n]=yM(yM([],Wg[n]),e[n]):t[n]=e[n]}}),t},JH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Na(h,3),s,a,u,!1);return p};function eW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=ib(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||bd(e,v,t,n)}}function r6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=i6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=l2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,R=ak(e,E),I=ib(T,M,R,o,0,0,r),N=I.x,z=I.y;return{positionX:N,positionY:z,scale:E}}function i6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function o6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var a6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},l6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};bd(e,v,i,o)}}},u6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},c6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=nW(t||i.scale,o,a);bd(e,s,n,r)}}},d6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&o6e(a)&&a&&o.contains(a)){var s=r6e(e,a,n);bd(e,s,r,i)}}},Br=function(e){return{instance:e,state:e.transformState,zoomIn:a6e(e),zoomOut:s6e(e),setTransform:l6e(e),resetTransform:u6e(e),centerView:c6e(e),zoomToElement:d6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ab=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},kM=function(e){e&&clearTimeout(e)},f6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},h6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ab(u,a);return!p};function p6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Ewe(t,n);return r}function rW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var g6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Na(v,3),u,l,p,S);return w},m6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},v6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ab(a,i);return!l},y6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},S6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Na(i[0].clientX-r.left,5),a=Na(i[0].clientY-r.top,5),s=Na(i[1].clientX-r.left,5),l=Na(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},b6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Na(p,2),a,o,l,!u)},x6e=160,w6e=100,C6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),ui(Br(e),t,r),ui(Br(e),t,i))},_6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=p6e(t,null),P=g6e(e,E,w,!t.ctrlKey);if(l!==P){var k=K0(e,P),T=rW(t,o,l),M=S||v===0||h,R=u&&M,I=ob(e,T.x,T.y,P,k,R),N=I.x,z=I.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),ui(Br(e),t,r),ui(Br(e),t,i)}},k6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},w6e);var o=m6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Br(e),t,r),ui(Br(e),t,i))},x6e))},E6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},P6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=S6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=b6e(e,m);if(v!==i){var S=K0(e,v),w=u||h===0||s,E=a&&w,P=ob(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},T6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function A6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var L6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ab(l,s);return!(p||!h)},oW=le.createContext(n6e),M6e=function(e){kwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=kw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=h6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(C6e(n,r),_6e(n,r),k6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),ui(Br(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),ui(Br(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(t6e(n),ui(Br(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=v6e(n,r);!l||(E6e(n,r),ml(n),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=y6e(n);!l||(r.preventDefault(),r.stopPropagation(),P6e(n,r),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(T6e(n),ui(Br(n),r,o),ui(Br(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),ui(Br(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),ui(Br(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=L6e(n,r);!o||A6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,K0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Br(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=nW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=f6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Br(n))},n}return t.prototype.componentDidMount=function(){var n=kw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=kw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(K0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Br(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),O6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(M6e,{...El({},e,{setRef:i})})});function R6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var I6e=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(I6e);var N6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(oW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function D6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(O6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re(Tn,{children:[re("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(q3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(K3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(j3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(L_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(N6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function z6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(sd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(sd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(D$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re(Tn,{children:[x(D6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=pt($n,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(F6e),n=a=>{e(cm({...t,width:Math.floor(a)}))},r=a=>{e(cm({...t,height:Math.floor(a)}))},i=()=>{e(cm({...t,width:Math.floor(512)}))},o=()=>{e(cm({...t,height:Math.floor(512)}))};return re("div",{className:"inpainting-bounding-box-settings",children:[x("div",{className:"inpainting-bounding-box-header",children:x("p",{children:"Canvas Bounding Box"})}),re("div",{className:"inpainting-bounding-box-settings-items",children:[x(Y0,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(Y0,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})]})},$6e=pt($n,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function H6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee($6e),n=Xe();return re(rn,{alignItems:"center",columnGap:"1rem",children:[x(Y0,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(ks,{isChecked:t,onChange:r=>n(cSe(r.target.checked))})]})}function W6e(){return re(Tn,{children:[x(H6e,{}),x(B6e,{})]})}function V6e(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(T$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W6e,{}),x(D_,{}),e&&x(B_,{accordionInfo:t})]})}const U6e=pt($n,H$,Ir,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),G6e=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(U6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(X4e({width:a,height:s})),e(q4e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Jv,{thickness:"2px",speed:"1s",size:"xl"})})};var j6e=Math.PI/180;function Y6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:k0,version:"8.3.13",isBrowser:Y6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*j6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var q6e="[object Array]",K6e="[object Number]",X6e="[object String]",Z6e="[object Boolean]",Q6e=Math.PI/180,J6e=180/Math.PI,Ew="#",eCe="",tCe="0",nCe="Konva warning: ",PM="Konva error: ",rCe="rgb(",Pw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},iCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const oCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===q6e},_isNumber(e){return Object.prototype.toString.call(e)===K6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===X6e},_isBoolean(e){return Object.prototype.toString.call(e)===Z6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Xy.push(e),Xy.length===1&&oCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ew,eCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=tCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===rCe?(t=iCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function g1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function aCe(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function sCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Vg="get",Ug="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Vg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Ug+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Ug+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Vg+a(t),l=Ug+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Ug+n,i=Vg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Vg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Vg+fe._capitalize(n),a=Ug+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function lCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=uCe+u.join(TM)+cCe)):(o+=s.property,t||(o+=gCe+s.val)),o+=hCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=vCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=AM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=lCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",ou="absoluteTransform",LM="absoluteScale",Gg="canvas",xCe="Change",wCe="children",CCe="konva",s9="listening",MM="mouseenter",OM="mouseleave",RM="set",IM="Shape",Y3=" ",NM="stage",kc="transform",_Ce="Stage",l9="visible",kCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let ECe=1;class Fe{constructor(t){this._id=ECe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ou)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ou,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Gg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Gg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Gg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(LM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Gg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Gg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==wCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(l9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==_Ce&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ou)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ou),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(j3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Fe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=pm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function zM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const RCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",q3=[];class ub extends ua{constructor(t){super(zM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{zM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===TCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(RCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+DM,this.content.style.height=n+DM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rMCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){Vm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||OCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=pm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=pm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=pm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=pm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,ck(t)),Vm(t.pointerId)}_lostpointercapture(t){Vm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ub.prototype.nodeType=PCe;pr(ub);K.addGetterSetter(ub,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Um={};function ICe(e){e.fill()}function NCe(e){e.stroke()}function DCe(e){e.fill()}function zCe(e){e.stroke()}function FCe(){this._clearCache(wW)}function BCe(){this._clearCache(CW)}function $Ce(){this._clearCache(_W)}function HCe(){this._clearCache(kW)}function WCe(){this._clearCache(EW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Um)););this.colorKey=n,Um[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete Um[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){Vm(t)}}Me.prototype._fillFunc=ICe;Me.prototype._strokeFunc=NCe;Me.prototype._fillFuncHit=DCe;Me.prototype._strokeFuncHit=zCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",FCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",BCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",$Ce);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",HCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",WCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,g1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var VCe="#",UCe="beforeDraw",GCe="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],jCe=PW.length;class ph extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new uk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(UCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(GCe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";pr(ph);K.addGetterSetter(ph,"imageSmoothingEnabled",!0);K.addGetterSetter(ph,"clearBeforeDraw",!0);K.addGetterSetter(ph,"hitGraphEnabled",!0,As());class dk extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class X0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}X0.prototype.nodeType="Group";pr(X0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=FM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=BM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===FM?this.setTime(t):this.state===BM&&this.setTime(this.duration-t)}pause(){this.state=qCe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Gm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=KCe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new XCe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)YCe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Gm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function d9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function HM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,I,N,z,$,H,q,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var ee=S.shift(),X=S.shift();if(l+=ee,u+=X,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+ee,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,I=a[a.length-1],I.command==="C"&&(N=l+(l-I.points[2]),z=u+(u-I.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,I=a[a.length-1],I.command==="C"&&(N=l+(l-I.points[2]),z=u+(u-I.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,I=a[a.length-1],I.command==="Q"&&(N=l+(l-I.points[0]),z=u+(u-I.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,I=a[a.length-1],I.command==="Q"&&(N=l+(l-I.points[0]),z=u+(u-I.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),H=S.shift(),q=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,H,q);break;case"a":$=S.shift(),H=S.shift(),q=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,H,q);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])},M=function(H,q){return(H[0]*q[0]+H[1]*q[1])/(T(H)*T(q))},R=function(H,q){return(H[0]*q[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,I,$,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);K.addGetterSetter(In,"data");class gh extends Mu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";pr(gh);K.addGetterSetter(gh,"pointerLength",10,ze());K.addGetterSetter(gh,"pointerWidth",10,ze());K.addGetterSetter(gh,"pointerAtBeginning",!1);K.addGetterSetter(gh,"pointerAtEnding",!0);class m1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}m1.prototype._centroid=!0;m1.prototype.className="Circle";m1.prototype._attrsAffectingSize=["radius"];pr(m1);K.addGetterSetter(m1,"radius",0,ze());class wd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],ZCe="Change.konva",QCe="none",f9="up",h9="right",p9="down",g9="left",JCe=TW.length;class fk extends X0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];pr(vh);K.addGetterSetter(vh,"radius",0,ze());K.addGetterSetter(vh,"sides",0,ze());var WM=Math.PI*2;class yh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,WM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),WM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(yh);K.addGetterSetter(yh,"innerRadius",0,ze());K.addGetterSetter(yh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Rw(){return o3||(o3=fe.createCanvasElement().getContext(n9e),o3)}function h9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function p9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function g9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(g9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(r9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Rw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+i3+this.fontVariant()+i3+(this.fontSize()+s9e)+f9e(this.fontFamily())}_addTextLine(t){this.align()===jg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Rw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==GM,w=v!==c9e&&S,E=this.ellipsis();this.textArr=[],Rw().font=this._getContextFont();for(var P=E?this._getTextWidth(Ow):0,k=0,T=t.length;kh)for(;M.length>0;){for(var I=0,N=M.length,z="",$=0;I>>1,q=M.slice(0,H+1),de=this._getTextWidth(q)+P;de<=h?(I=H+1,z=q,$=de):N=H}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===VM;ie&&$<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(VM))+1,V>0&&(I=V,z=z.slice(0,I),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var ee=this._shouldHandleEllipsis(m);if(ee){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(I),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kp)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==GM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Ow)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},k=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var ee=J;S===void 0;)S=P(),S&&ee+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:V>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E=0&&E>j)&&(E=j,X=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?V>S.pathLength?E=1e-8:E=V/S.pathLength:V>J?E+=(V-J)/S.pathLength/2:E=Math.max(E-(J-V)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=In.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=V/S.pathLength:V>J?E+=(V-J)/S.pathLength:E-=(J-V)/S.pathLength,E>1&&(E=1,X=!0),v=In.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,I=0;Ie+`.${DW}`).join(" "),jM="nodesRect",y9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],S9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const b9e="ontouchstart"in ot._global;function x9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(S9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],YM=1e8;function w9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function zW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function C9e(e,t){const n=w9e(e);return zW(e,t,n)}function _9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(y9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(jM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(jM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return zW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-YM,y:-YM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new u2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:b9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=x9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const V=m+de,J=ot.getAngle(this.rotationSnapTolerance()),ee=_9e(this.rotationSnaps(),V,J)-p.rotation,X=C9e(p,ee);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),X0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function k9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p4.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p4.join(", "))}),e||[]}wn.prototype.className="Transformer";pr(wn);K.addGetterSetter(wn,"enabledAnchors",p4,k9e);K.addGetterSetter(wn,"flipEnabled",!0,As());K.addGetterSetter(wn,"resizeEnabled",!0);K.addGetterSetter(wn,"anchorSize",10,ze());K.addGetterSetter(wn,"rotateEnabled",!0);K.addGetterSetter(wn,"rotationSnaps",[]);K.addGetterSetter(wn,"rotateAnchorOffset",50,ze());K.addGetterSetter(wn,"rotationSnapTolerance",5,ze());K.addGetterSetter(wn,"borderEnabled",!0);K.addGetterSetter(wn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(wn,"anchorStrokeWidth",1,ze());K.addGetterSetter(wn,"anchorFill","white");K.addGetterSetter(wn,"anchorCornerRadius",0,ze());K.addGetterSetter(wn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(wn,"borderStrokeWidth",1,ze());K.addGetterSetter(wn,"borderDash");K.addGetterSetter(wn,"keepRatio",!0);K.addGetterSetter(wn,"centeredScaling",!1);K.addGetterSetter(wn,"ignoreStroke",!1);K.addGetterSetter(wn,"padding",0,ze());K.addGetterSetter(wn,"node");K.addGetterSetter(wn,"nodes");K.addGetterSetter(wn,"boundBoxFunc");K.addGetterSetter(wn,"anchorDragBoundFunc");K.addGetterSetter(wn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(wn,"useSingleNodeRotation",!0);K.backCompat(wn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function qM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var E9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],P9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function T9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,R,I,N,z,$,H,q,de,V=t+t+1,J=r-1,ie=i-1,ee=t+1,X=ee*(ee+1)/2,G=new qM,Q=null,j=G,Z=null,me=null,Se=E9e[t],xe=P9e[t];for(s=1;s>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+ee)0&&T9e(t,n)};K.addGetterSetter(Fe,"blurRadius",0,ze(),K.afterSetFilter);const L9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};K.addGetterSetter(Fe,"contrast",0,ze(),K.afterSetFilter);const O9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],I=T,N=I>0?I:-I,z=M>0?M:-M,$=R>0?R:-R;if(z>N&&(I=M),$>N&&(I=R),I*=t,i){var H=s[E]+I,q=s[E+1]+I,de=s[E+2]+I;s[E]=H>255?255:H<0?0:H,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var V=n-I;V<0?V=0:V>255&&(V=255),s[E]=s[E+1]=s[E+2]=V}}while(--w)}while(--p)};K.addGetterSetter(Fe,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Fe,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Fe,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Fe,"embossBlend",!1,null,K.afterSetFilter);function Iw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const R9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,I;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),I=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),I=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,I=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,I,N,z=n.polarRotation||0,$,H;for(h=0;ht&&(M=T,R=0,I=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function j9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};K.addGetterSetter(Fe,"pixelSize",8,ze(),K.afterSetFilter);const X9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"blue",0,aW,K.afterSetFilter);const Q9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const J9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},t7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[W]!==O[se]){var he=` -`+A[W].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=W&&0<=se);break}}}finally{Is=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var Ch=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function kn(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function qa(){kn(Ur),kn(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function Ka(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(Cr),vn(Cr,d)):kn(Ur),vn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,_h=Math.log,kh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var zs=64,uo=4194304;function Fs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?_=Fs(se):(O&=W,O!==0&&(_=Fs(O)))}else W=y&~A,W!==0?_=Fs(W):O!==0&&(_=Fs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=W,A-=W,Ui=1<<32-gi(f)+A|y<Bt?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Bt],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Bt===ye.length)return y(ge,kt),Dn&&Bs(ge,Bt),Te;if(kt===null){for(;BtBt?(zr=kt,kt=null):zr=kt.sibling;var is=je(ge,kt,Yt.value,He);if(is===null){kt===null&&(kt=zr);break}d&&kt&&is.alternate===null&&f(ge,kt),ue=O(is,ue,Bt),Lt===null?Te=is:Lt.sibling=is,Lt=is,kt=zr}if(Yt.done)return y(ge,kt),Dn&&Bs(ge,Bt),Te;if(kt===null){for(;!Yt.done;Bt++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return Dn&&Bs(ge,Bt),Te}for(kt=_(ge,kt);!Yt.done;Bt++,Yt=ye.next())Yt=Fn(kt,ge,Bt,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Bt:Yt.key),ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(si){return f(ge,si)}),Dn&&Bs(ge,Bt),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&$1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=xa(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=xa(ge,ue,ye),He.return=ge,ge=He)}return W(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return W(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(ie(ye))return En(ge,ue,ye,He);if(I(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(ye,ge.mode,He),ue.return=ge,ge=ue),W(ge)):y(ge,ue)}return qo}var Yu=w2(!0),C2=w2(!1),Wd={},po=No(Wd),wa=No(Wd),oe=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(oe,f),vn(wa,d),vn(po,Wd),d=X(f),kn(po),vn(po,d)}function Ge(){kn(po),kn(wa),kn(oe)}function _t(d){var f=be(oe.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(wa,d),vn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var Rt=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Iu(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function H1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return yi().memoizedState}function K1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=ai();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=ai(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Qa={readContext:Gi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=K1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:j1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=q1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||G1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,_=Ui;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0np&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=Rt.current,vn(Rt,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),Ke&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function rg(d,f){switch(D1(f),f.tag){case 1:return Gr(f.type)&&qa(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),kn(Ur),kn(Cr),H1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(Rt),null;case 4:return Ge(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Vh=!1;function Yl(d,f){for(Q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Bo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:Ke&&Ms(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Gh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=ee(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ig(d){var f=d.alternate;f!==null&&(d.alternate=null,ig(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&<(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function uc(d){return d.tag===5||d.tag===3||d.tag===4}function es(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function jh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(jh(d,f,y),d=d.sibling;d!==null;)jh(d,f,y),d=d.sibling}function og(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(_!==4&&(d=d.child,d!==null))for(og(d,f,y),d=d.sibling;d!==null;)og(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Ke){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):ft(yr,y.stateNode))}else jo(d,f,y);break;case 18:Ke&&yr!==null&&(Go?M1(yr,y.stateNode):L1(yr,y.stateNode));break;case 4:Ke?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=va(_),Ru(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):jo(d,f,y);break;default:jo(d,f,y)}}function Yh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(_){var A=U2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Zh:return":has("+(lg(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_A&&(A=W),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*_b(_/1960))-_,10<_){d.timeoutHandle=dt(Qs.bind(null,d,bi,ns),_);break}Qs(d,bi,ns);break;case 5:Qs(d,bi,ns);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=bi,bi=y,f!==null&&sp(f)),d}function sp(d){bi===null?bi=d:bi.push.apply(bi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Ft&6)!==0)throw Error(a(331));var A=Ft;for(Ft|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;heWn()-dg?Xs(d,0):cg|=y),Kr(d,f)}function mg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),mg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),mg(d,y)}var vg;vg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&N1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Ca(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=V1(null,f,_,d,A,y);var O=Xu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(O=!0,Ka(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,F1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,B1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,Dn&&O&&mi(f),Si(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=cp(_),d=Bo(_,d),A){case 0:f=Q1(null,f,_,d,y);break e;case 1:f=N2(null,f,_,d,y);break e;case 11:f=M2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Bo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),Q1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),N2(d,f,_,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Ih(f,_,null,y);var W=f.memoizedState;if(_=W.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=z2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=z2(d,f,_,y,A);break e}else for(bt&&(fo=C1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ii=null,ho=!1),y=C2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Ja(d,f,y);break e}Si(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Id(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,Be(_,A)?W=null:O!==null&&Be(_,O)&&(f.flags|=32),I2(d,f),Si(d,f,W,y),f.child;case 6:return d===null&&Id(f),null;case 13:return F2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):Si(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),M2(d,f,_,A,y);case 7:return Si(d,f,f.pendingProps,y),f.child;case 8:return Si(d,f,f.pendingProps.children,y),f.child;case 12:return Si(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,_,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=Ja(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Za(-1,y&-y),he.tag=2;var Ie=O.updateQueue;if(Ie!==null){Ie=Ie.shared;var et=Ie.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Ie.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Bd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),Bd(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}Si(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,Si(d,f,_,y),f.child;case 14:return _=f.type,A=Bo(_,f.pendingProps),A=Bo(_.type,A),Vs(d,f,_,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),Ca(d,f),f.tag=1,Gr(_)?(d=!0,Ka(f)):d=!1,Gu(f,y),b2(f,_,A),B1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return $2(d,f,y);case 22:return R2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return $u(d,f)}function _a(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new _a(d,f,y,_)}function yg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return yg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,A,O){var W=2;if(_=d,typeof d=="function")yg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return dp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case k:W=14;break e;case T:W=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function el(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,_,A,O,W,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},F1(O),d}function Sg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Bl(d,y,f)}return f}function bg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ie&&O>=At&&A<=et&&W<=je){d.splice(f,1);break}else if(_!==Ie||y.width!==he.width||jeW){if(!(O!==At||y.height!==he.height||et<_||Ie>A)){Ie>_&&(he.width+=Ie-_,he.x=_),etO&&(he.height+=At-O,he.y=O),jey&&(y=W)),W ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||xg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ug(d,f);var A=jt(d,y,_).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=ai(),W=Tr(A);return y=Sg(y),f.context===null?f.context=y:f.pendingContext=y,f=Za(O,W),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=n7e})(FW);const r7e=I9(FW.exports);var hk={exports:{}},Sh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */Sh.ConcurrentRoot=1;Sh.ContinuousEventPriority=4;Sh.DefaultEventPriority=16;Sh.DiscreteEventPriority=1;Sh.IdleEventPriority=536870912;Sh.LegacyRoot=0;(function(e){e.exports=Sh})(hk);const KM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let XM=!1,ZM=!1;const pk=".react-konva-event",i7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,o7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,a7e={};function cb(e,t,n=a7e){if(!XM&&"zIndex"in t&&(console.warn(o7e),XM=!0),!ZM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(i7e),ZM=!0)}for(var o in n)if(!KM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!KM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const BW={},s7e={};nh.Node.prototype._applyProps=cb;function l7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function u7e(e,t,n){let r=nh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=nh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return cb(l,o),l}function c7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function d7e(e,t,n){return!1}function f7e(e){return e}function h7e(){return null}function p7e(){return null}function g7e(e,t,n,r){return s7e}function m7e(){}function v7e(e){}function y7e(e,t){return!1}function S7e(){return BW}function b7e(){return BW}const x7e=setTimeout,w7e=clearTimeout,C7e=-1;function _7e(e,t){return!1}const k7e=!1,E7e=!0,P7e=!0;function T7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function A7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function L7e(e,t,n){$W(e,t,n)}function M7e(e,t){t.destroy(),t.off(pk),_d(e)}function O7e(e,t){t.destroy(),t.off(pk),_d(e)}function R7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function I7e(e,t,n){}function N7e(e,t,n,r,i){cb(e,i,r)}function D7e(e){e.hide(),_d(e)}function z7e(e){}function F7e(e,t){(t.visible==null||t.visible)&&e.show()}function B7e(e,t){}function $7e(e){}function H7e(){}const W7e=()=>hk.exports.DefaultEventPriority,V7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:l7e,createInstance:u7e,createTextInstance:c7e,finalizeInitialChildren:d7e,getPublicInstance:f7e,prepareForCommit:h7e,preparePortalMount:p7e,prepareUpdate:g7e,resetAfterCommit:m7e,resetTextContent:v7e,shouldDeprioritizeSubtree:y7e,getRootHostContext:S7e,getChildHostContext:b7e,scheduleTimeout:x7e,cancelTimeout:w7e,noTimeout:C7e,shouldSetTextContent:_7e,isPrimaryRenderer:k7e,warnsIfNotActing:E7e,supportsMutation:P7e,appendChild:T7e,appendChildToContainer:A7e,insertBefore:$W,insertInContainerBefore:L7e,removeChild:M7e,removeChildFromContainer:O7e,commitTextUpdate:R7e,commitMount:I7e,commitUpdate:N7e,hideInstance:D7e,hideTextInstance:z7e,unhideInstance:F7e,unhideTextInstance:B7e,clearContainer:$7e,detachDeletedInstance:H7e,getCurrentEventPriority:W7e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var U7e=Object.defineProperty,G7e=Object.defineProperties,j7e=Object.getOwnPropertyDescriptors,QM=Object.getOwnPropertySymbols,Y7e=Object.prototype.hasOwnProperty,q7e=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?U7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eO=(e,t)=>{for(var n in t||(t={}))Y7e.call(t,n)&&JM(e,n,t[n]);if(QM)for(var n of QM(t))q7e.call(t,n)&&JM(e,n,t[n]);return e},K7e=(e,t)=>G7e(e,j7e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:X7e,ReactCurrentDispatcher:Z7e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q7e(){const e=C.exports.useContext(mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=X7e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Kg=[],tO=new WeakMap;function J7e(){var e;const t=Q7e();Kg.splice(0,Kg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Kg.push(HW(i))});for(const n of Kg){const r=(e=Z7e.current)==null?void 0:e.readContext(n);tO.set(n,r)}return C.exports.useMemo(()=>Kg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,K7e(eO({},i),{value:tO.get(r)}))),n=>x(WW,{...eO({},n)})),[])}function e8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const t8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=e8e(e),o=J7e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=gm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),gm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),gm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),cb(n.current,e,i),gm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",rh="Group",P0="Rect",Xg="Circle",g4="Line",VW="Image",n8e="Transformer",gm=r7e(V7e);gm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const r8e=le.forwardRef((e,t)=>x(WW,{children:x(t8e,{...e,forwardedRef:t})})),i8e=pt([$n],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o8e=e=>{const{...t}=e,{objects:n}=Ee(i8e);return x(rh,{listening:!1,...t,children:n.filter(U_).map((r,i)=>x(g4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},c2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},a8e=pt($n,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:c2(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),s8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(a8e);return l?re(rh,{listening:!1,...t,children:[x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},l8e=pt($n,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),u8e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ee(l8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),ee=Bc(J,64),X=Bc(ie,64);V.target.x(ee),V.target.y(X),n(gw({x:ee,y:X}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const V=k.current,J=V.scaleX(),ie=V.scaleY(),ee=Math.round(V.width()*J),X=Math.round(V.height()*ie),G=Math.round(V.x()),Q=Math.round(V.y());n(cm({width:ee,height:X})),n(gw({x:v?fl(G,64):G,y:v?fl(Q,64):Q})),V.scaleX(1),V.scaleY(1)},[n,v]),I=C.exports.useCallback((V,J,ie)=>{const ee=V.x%T,X=V.y%T;return{x:fl(J.x,T)+ee,y:fl(J.y,T)+X}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},$=()=>{n(YL(!0))},H=()=>{n(vw(!1)),n(YL(!1)),n(Hy(!1))},q=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(rh,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:H,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:H,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(n8e,{anchorCornerRadius:3,anchorDragBoundFunc:I,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:H,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let UW=null,GW=null;const c8e=e=>{UW=e},m4=()=>UW,d8e=e=>{GW=e},f8e=()=>GW,h8e=pt([$n,Ir],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(h8e),i=C.exports.useRef(null),o=f8e();mt("esc",()=>{e(j4e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iSe(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},g8e=pt($n,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:c2(t)}}),nO=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),m8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(g8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=nO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=nO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},v8e=pt([$n],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),y8e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(v8e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=st.clamp(r*N4e**s,D4e,z4e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(dSe(l)),t(oH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},S8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),b8e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(S8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a4(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(ZS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},x8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),w8e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(x8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a4(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(ZS(!1))},[t,n,i,o,e,r])},C8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),_8e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(C8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(iH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},k8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),E8e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(k8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(ZS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},P8e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(iH(null)),e(ZS(!1))},[e])},T8e=pt([$n,Pu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(T8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a4(!1))},[e,n,t])}};var gf=C.exports,L8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const jW=e=>{const{url:t,x:n,y:r}=e,[i]=L8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},M8e=pt([$n],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O8e=()=>{const{objects:e}=Ee(M8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o4(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(v4e(t))return x(g4,{points:t.points,stroke:t.color?c2(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},R8e=pt([$n],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},N8e=()=>{const{colorMode:e}=Wv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(R8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=I8e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=st.range(0,T).map(N=>x(g4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),I=st.range(0,M).map(N=>x(g4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(I))},[t,n,r,e,a]),x(rh,{children:i})},D8e=pt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),z8e=e=>{const{...t}=e,n=Ee(D8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},l3=e=>Math.round(e*100)/100,F8e=pt([$n],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=Ee(F8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&re(Tn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},$8e=pt([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee($8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&re(rh,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},W8e=pt([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(W8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(U4e()),l=()=>e(V4e()),u=()=>e(H4e());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:re(ra,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(W5e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(V5e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x($_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(Z5e,{}):x(X5e,{}),onClick:()=>e(lSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x($$,{}),onClick:()=>e(_4e(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(f1,{}),onClick:()=>e(W4e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},U8e=pt([$n,Pu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(U8e);p8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(H=>{d8e(H),p.current=H},[]),S=C.exports.useCallback(H=>{c8e(H),m.current=H},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=y8e(p),k=b8e(p),T=w8e(p,E),M=_8e(p,E,w),R=E8e(p),I=P8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=A8e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(r8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:I,onMouseMove:M,onMouseOut:I,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(N8e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(O8e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(o8e,{visible:!0,listening:!1}),x(m8e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(s8e,{visible:l!=="move",listening:!1}),x(H8e,{visible:u}),h&&x(z8e,{}),x(u8e,{visible:n&&!u})]})]}),x(B8e,{}),x(V8e,{})]})})},j8e=pt([$n,Ir],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function Y8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(j8e),r=()=>{e(fSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(p4e,{}),onClick:r,isDisabled:!t})}const q8e=pt([$n,Ir],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function K8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(q8e),r=()=>{e(G4e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(u4e,{}),onClick:r,isDisabled:!t})}const X8e=()=>{const e=Xe(),{isOpen:t,onOpen:n,onClose:r}=kv(),i=C.exports.useRef(null);return re(Tn,{children:[x(ta,{leftIcon:x(f1,{}),size:"sm",onClick:n,children:"Clear Temp Image Folder"}),x(oB,{isOpen:t,leastDestructiveRef:i,onClose:r,children:x(G0,{children:re(aB,{children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Clear Temp Image Folder"}),re(Lv,{children:[x("p",{children:"Clearing the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to clear the temp folder?"})]}),re(kS,{children:[x($a,{ref:i,onClick:r,children:"Cancel"}),x($a,{colorScheme:"red",onClick:()=>{e(k4e()),e(rH()),e(tH()),r()},ml:3,children:"Clear"})]})]})})})]})},Z8e=pt([$n],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Q8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(Z8e);return x(Zc,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:re(rn,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e(sSe(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(aSe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(uSe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(nSe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(eSe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(tSe(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(ta,{size:"sm",leftIcon:x(f1,{}),onClick:()=>e(rH()),children:"Clear Canvas History"}),x(X8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function m9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Z0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(rO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=v9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(iO(P),!function(M,R){return R&&!jm(M)}(P,l.current)&&k)){if(jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(rO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},qW=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},y9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},J8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},e_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},t_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Z0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(yk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),n_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Z0(t.s+100*i.left,0,100),v:Z0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function r_e(e,t,n){var r=m9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;KW(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var i_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,o_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oO=new Map,a_e=function(e){i_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oO.set(t,n);var r=o_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},s_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(vk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:Z0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},l_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);a_e(s);var l=r_e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(n_e,{hsva:u,onChange:h}),x(t_e,{hue:u.h,onChange:h}),le.createElement(s_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},u_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:e_e,fromHsva:J8e,equal:KW},c_e=function(e){return le.createElement(l_e,fb({},e,{colorModel:u_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(c_e,{className:`invokeai__color-picker ${t}`,...n})},d_e=pt([$n],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:c2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),f_e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(d_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e($4e()),s=()=>e(Z4e(!r));return re(Tn,{children:[x(yd,{label:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:t,validValues:m4e,onChange:l=>e(qL(l.target.value))}),x(Zc,{isOpen:t!=="mask"?!1:void 0,trigger:"hover",triggerComponent:x(ra,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(n4e,{}),isDisabled:t!=="mask"})}),children:re(rn,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(rSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Q4e(l))}),x(ta,{size:"sm",leftIcon:x(f1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})]})};let u3;const h_e=new Uint8Array(16);function p_e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(h_e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function g_e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const m_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aO={randomUUID:m_e};function Jp(e,t,n){if(aO.randomUUID&&!t&&!e)return aO.randomUUID();e=e||{};const r=e.random||(e.rng||p_e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return g_e(r)}const v_e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},y_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},S_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},b_e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=b_e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(A5e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m4();if(!S){t(hu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:E}=v_e(S,h,v,i?{...p,...m}:void 0);if(!w){t(hu(!1)),t(Kp(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:I}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(y_e(M),t(sm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(S_e(M,R,I),t(sm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(sm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(J4e({kind:"image",layer:"base",...E,image:N})),t(sm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(G3("Connected")),t(Kp(!0))},Sk=e=>e.system,x_e=e=>e.system.toastQueue,w_e=pt([$n,Pu,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:c2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),C_e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=Ee(w_e);mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(C0("brush")),s=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(i4e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(q5e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(C0("eraser"))}),x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(f4e,{})}),children:re(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(Y0,{label:"Size",value:r,withInput:!0,onChange:l=>e(mw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(K4e(l))})]})})]})};let sO;const ZW=()=>({setOpenUploader:e=>{e&&(sO=e)},openUploader:sO}),__e=pt([Sk,$n,Pu],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o}=t;return{isProcessing:r,isStaging:n,tool:i,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),k_e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,tool:r,shouldCropToBoundingBoxOnSave:i}=Ee(__e),o=m4(),{openUploader:a}=ZW();mt(["v"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[]),mt(["r"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[o]),mt(["shift+m"],()=>{h()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["shift+s"],()=>{p()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["meta+c","ctrl+c"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["shift+d"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[o,t]);const s=()=>e(C0("move")),l=()=>{const S=m4();if(!S)return;const w=S.getClientRect({skipTransform:!0});e(Y4e({contentRect:w}))},u=()=>{e(tH()),e(nH())},h=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},p=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldSaveToGallery:!0}))},m=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldCopy:!0}))},v=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(f_e,{}),x(C_e,{}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(U5e,{}),"data-selected":r==="move"||n,onClick:s}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(Y5e,{}),onClick:l})]}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(t4e,{}),onClick:h,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x($$,{}),onClick:p,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(H_,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(B$,{}),onClick:v,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(Y8e,{}),x(K8e,{})]}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:a}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(f1,{}),onClick:u,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(Q8e,{})})]})},E_e=pt([$n],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P_e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(E_e);return C.exports.useLayoutEffect(()=>{const n=st.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(k_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(G6e,{}):x(G8e,{})})]})})})};function T_e(){const e=Xe();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(V6e,{}),styleClass:"inpainting-workarea-overrides",children:x(P_e,{})})}const A_e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(_we,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(xwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(A_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},pb=st.map(kf,(e,t)=>t);[...pb];function L_e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(sd(!t))},[t]),mt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(IB,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(OB,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return re(MB,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(RB,{className:"app-tabs-panels",children:t?x(z6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},M_e=QW,JW=MS({name:"options",initialState:M_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=i4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...QW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=pb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:gb,setIterations:O_e,setSteps:eV,setCfgScale:tV,setThreshold:R_e,setPerlin:I_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:d2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:S9,setFacetoolStrength:K3,setFacetoolType:X3,setCodeformerFidelity:sV,setUpscalingLevel:b9,setUpscalingStrength:x9,setMaskPath:lV,resetSeed:qPe,resetOptionsState:KPe,setShouldFitToWidthHeight:uV,setParameter:XPe,setShouldGenerateVariations:N_e,setSeedWeights:cV,setVariationAmount:D_e,setAllParameters:z_e,setShouldRunFacetool:F_e,setShouldRunESRGAN:B_e,setShouldRandomizeSeed:$_e,setShowAdvancedOptions:H_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:W_e,setAllImageToImageParameters:V_e,setShowDualDisplay:U_e,setInitialImage:f2,clearInitialImage:fV,setShouldShowOptionsPanel:T0,setShouldPinOptionsPanel:G_e,setOptionsPanelScrollPosition:j_e,setShouldHoldOptionsPanelOpen:Y_e,setShouldLoopback:q_e,setCurrentTheme:K_e,setIsLightBoxOpen:sd}=JW.actions,X_e=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const Z3=Object.create(null);Object.keys(Ml).forEach(e=>{Z3[Ml[e]]=e});const Z_e={type:"error",data:"parser error"},Q_e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",J_e=typeof ArrayBuffer=="function",eke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>Q_e&&t instanceof Blob?n?r(t):lO(t,r):J_e&&(t instanceof ArrayBuffer||eke(t))?n?r(t):lO(new Blob([t]),r):r(Ml[e]+(t||"")),lO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},uO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},nke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rke(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:Z_e},rke=(e,t)=>{if(nke){const n=tke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),ike=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},oke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ske=setTimeout,lke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=ske.bind($c),e.clearTimeoutFn=lke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const uke=1.33;function cke(e){return typeof e=="string"?dke(e):Math.ceil((e.byteLength||e.size)*uke)}function dke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class fke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new fke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,hke={};let cO=0,d3=0,dO;function fO(e){let t="";do t=bV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function xV(){const e=fO(+new Date);return e!==dO?(cO=0,dO=e):e+"."+fO(cO++)}for(;d3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};oke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ike(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=xV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pl extends Vr{constructor(t,n){super(),mb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=yV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new _V(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Pl.requestsCount++,Pl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=mke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,hO,!1)}}function hO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=$c.WebSocket||$c.MozWebSocket,pO=!0,Ske="arraybuffer",gO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bke extends SV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=gO?{}:yV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=pO&&!gO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Ske,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{pO&&this.ws.send(o)}catch{}i&&kV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=xV()),this.supportsBinary||(t.b64=1);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!f3}}const xke={websocket:bke,polling:yke},wke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Cke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=wke.exec(e||""),o={},a=14;for(;a--;)o[Cke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=_ke(o,o.path),o.queryKey=kke(o,o.query),o}function _ke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function kke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Rc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=C9(n.host).host),mb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=pke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new xke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Rc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Rc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Rc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Rc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Rc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Ake=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",Lke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Pke&&(e instanceof ArrayBuffer||Tke(e))||Ake&&e instanceof Blob||Lke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Nke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Oke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Dke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Rke,get PacketType(){return tn},Encoder:Ike,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function ps(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ps(t,"open",this.onopen.bind(this)),ps(t,"packet",this.onpacket.bind(this)),ps(t,"error",this.onerror.bind(this)),ps(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(zke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}v1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};v1.prototype.reset=function(){this.attempts=0};v1.prototype.setMin=function(e){this.ms=e};v1.prototype.setMax=function(e){this.max=e};v1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,mb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new v1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Dke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Rc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ps(n,"open",function(){r.onopen(),t&&t()}),o=ps(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ps(t,"ping",this.onping.bind(this)),ps(t,"data",this.ondata.bind(this)),ps(t,"error",this.onerror.bind(this)),ps(t,"close",this.onclose.bind(this)),ps(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Zg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Eke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Zg[i]&&o in Zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Zg[i]||(Zg[i]=new E9(r,t)),l=Zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:PV,io:J3,connect:J3});var Fke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Bke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,$ke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(mO[t]||t||mO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return Hke(e)},E=function(){return Wke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return vO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return vO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Vke(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(Fke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var mO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},vO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},Hke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Wke=function(t){var n=t.getDay();return n===0&&(n=7),n},Vke=function(t){return(String(t).match(Bke)||[""]).pop().replace($ke,"").replace(/GMT\+0000/g,"UTC")};const Uke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(FL(!0)),t(G3("Connected")),t(C4e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(jC("user")),r.categories.result.latest_mtime?t(WL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(FL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(B4e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(f2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(wSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(b5e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(BL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(xSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(C5e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(x5e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(G3("Model Changed")),t(hu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(hu(!1)),t(Kp(!0)),t(BL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(sm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},Gke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new qg.Stage({container:i,width:n,height:r}),a=new qg.Layer,s=new qg.Layer;a.add(new qg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new qg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},jke=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},Yke=e=>{const t=m4(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:R,shouldGenerateVariations:I,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:H,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:V,codeformerFidelity:J,facetoolType:ie,shouldRandomizeSeed:ee}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:ee||I?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=ee?M$(T_,A_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=R),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Be,inpaintReplace:We,shouldUseInpaintReplace:dt,stageScale:Ye,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Ke={...xe,...Be},Et=Gke(rt?Se.filter(U_):[],Ke);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,dt&&(j.inpaint_replace=We),j.bounding_box=Ke;const bt=t.scale();t.scale({x:1/Ye,y:1/Ye});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Ke.x+Ae.x,y:Ke.y+Ae.y,width:Ke.width,height:Ke.height});Q&&jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}I?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:H,strength:q}),de&&(me={type:ie,strength:V},ie==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},qke=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(P5e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=Yke(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(hu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(hu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(uH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(_5e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},Kke=()=>{const{origin:e}=new URL(window.location.href),t=J3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=Uke(i),{emitGenerateImage:R,emitRunESRGAN:I,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:H,emitCancelProcessing:q,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=qke(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",ee=>u(ee)),t.on("generationResult",ee=>p(ee)),t.on("postprocessingResult",ee=>h(ee)),t.on("intermediateResult",ee=>m(ee)),t.on("progressUpdate",ee=>v(ee)),t.on("galleryImages",ee=>S(ee)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",ee=>{E(ee)}),t.on("systemConfig",ee=>{P(ee)}),t.on("modelChanged",ee=>{k(ee)}),t.on("modelChangeFailed",ee=>{T(ee)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{H(a.payload);break}case"socketio/cancelProcessing":{q();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},Xke=["cursorPosition"].map(e=>`canvas.${e}`),Zke=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),Qke=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=UB({options:X_e,gallery:PSe,system:L5e,canvas:hSe}),Jke=c$.getPersistConfig({key:"root",storage:u$,rootReducer:TV,blacklist:[...Xke,...Zke,...Qke],debounce:300}),eEe=A2e(Jke,TV),AV=Cve({reducer:eEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(Kke()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=p2e,Ee=r2e;function e5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e5=function(n){return typeof n}:e5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e5(e)}function tEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yO(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Jv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),aEe=pt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(aEe),i=t?Math.round(t*100/n):0;return x(hB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function lEe(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function uEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=kv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(lEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re(Tn,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Mv,{className:" modal hotkeys-modal",children:[x(K8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const cEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return re("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x($z,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},dEe=pt(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),fEe=()=>{const{models:e}=Ee(dEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(Df,{children:[x(If,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(cEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},hEe=pt(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=({children:e})=>{const t=Xe(),n=Ee(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=kv(),{isOpen:a,onOpen:s,onClose:l}=kv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(hEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(k5e(E))};return re(Tn,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Mv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K8,{className:"modal-close-btn"}),re(Lv,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(fEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(yd,{label:"Display In-Progress Images",validValues:B3e,value:u,onChange:E=>t(y5e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(w5e(E.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(E5e(E.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Mv,{children:x(Lv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},gEe=pt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),mEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(gEe),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(I$())},className:`status ${l}`,children:u})})},vEe=["dark","light","green"];function yEe(){const{setColorMode:e}=Wv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(K_e(i))};return x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(o4e,{})}),children:x(Vz,{align:"stretch",children:vEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x($_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const SEe=pt([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),bEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(SEe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(yd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},xEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(mEe,{}),x(bEe,{}),x(uEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(e4e,{})})}),x(yEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(j5e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x($5e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(B5e,{})})}),x(pEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),wEe=pt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),CEe=pt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),_Ee=()=>{const e=Xe(),t=Ee(wEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(CEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(I$()),e(hw(!n))};return mt("`",()=>{e(hw(!n))},[n]),mt("esc",()=>{e(hw(!1))}),re(Tn,{children:[n&&x(gH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(H5e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(r4e,{}):x(F$,{}),onClick:l})})]})};function kEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var EEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function h2(e,t){var n=PEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function PEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=EEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var TEe=[".DS_Store","Thumbs.db"];function AEe(e){return i1(this,void 0,void 0,function(){return o1(this,function(t){return v4(e)&&LEe(e.dataTransfer)?[2,IEe(e.dataTransfer,e.type)]:MEe(e)?[2,OEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,REe(e)]:[2,[]]})})}function LEe(e){return v4(e)}function MEe(e){return v4(e)&&v4(e.target)}function v4(e){return typeof e=="object"&&e!==null}function OEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function REe(e){return i1(this,void 0,void 0,function(){var t;return o1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return h2(r)})]}})})}function IEe(e,t){return i1(this,void 0,void 0,function(){var n,r;return o1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(NEe))]):[3,2];case 1:return r=i.sent(),[2,SO(MV(r))];case 2:return[2,SO(A9(e.files).map(function(o){return h2(o)}))]}})})}function SO(e){return e.filter(function(t){return TEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,_O(n)];if(e.sizen)return[!1,_O(n)]}return[!0,null]}function Ef(e){return e!=null}function ZEe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=NV(l,n),h=Dv(u,1),p=h[0],m=DV(l,r,i),v=Dv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function EO(e){e.preventDefault()}function QEe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function JEe(e){return e.indexOf("Edge/")!==-1}function ePe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QEe(e)||JEe(e)}function al(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function vPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=S4(e,aPe),i=HV(r),o=i.open,a=S4(i,sPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var $V={disabled:!1,getFilesFromEvent:AEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=$V;wk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var R9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,I=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,H=C.exports.useMemo(function(){return rPe(n)},[n]),q=C.exports.useMemo(function(){return nPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:TO},[E]),V=C.exports.useMemo(function(){return typeof w=="function"?w:TO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),ee=C.exports.useReducer(yPe,R9),X=Dw(ee,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&tPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(Q({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[ie,Z,V,me]);var xe=C.exports.useRef([]),Be=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",EO,!1),document.addEventListener("drop",Be,!1)),function(){T&&(document.removeEventListener("dragover",EO),document.removeEventListener("drop",Be))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(cPe(xe.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(y4(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&ZEe({files:Je,accept:H,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),ke=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,H,a,o,s,l,$]),Ye=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=h3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(ke){var Mt=NV(ke,H),Ne=Dw(Mt,2),at=Ne[0],an=Ne[1],Nn=DV(ke,a,o),$e=Dw(Nn,2),ft=$e[0],tt=$e[1],Nt=$?$(ke):null;if(at&&ft&&!Nt)Xt.push(ke);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){jt.push({file:ke,errors:[XEe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,H,a,o,l,m,v,S,$]),Ke=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){y4(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){iPe(Je)?(V(Je),Q({type:"closeDialog"})):oPe(Je)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Je)});return}ie.current&&(Q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Q,de,V,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(ePe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return R?null:lt(Je)},Cn=function(Je){return I?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,ke=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Nn=Oe.onDragOver,$e=Oe.onDragLeave,ft=Oe.onDrop,tt=S4(Oe,lPe);return lr(lr(O9({onKeyDown:xt(al(ke,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:Cn(al(an,dt)),onDragOver:Cn(al(Nn,Ye)),onDragLeave:Cn(al($e,rt)),onDrop:Cn(al(ft,Ke)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!R?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,dt,Ye,rt,Ke,R,I,r]),_n=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,ke=Oe.onClick,Mt=S4(Oe,uPe),Ne=O9({accept:H,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Ke)),onClick:lt(al(ke,_n)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Mt)}},[ie,n,s,Ke,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:ie,open:lt(Et)})}function yPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},R9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},R9);default:return e}}function TO(){}const SPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Uf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},AO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Ir(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(f2(u))},bPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Ir),i=u1({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` -`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(AO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const I=R[0].getAsFile();if(!I){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(AO({imageFile:I}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:re("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(SPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},xPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(io(!0))},children:x(N$,{})})};function wPe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const CPe=pt(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),_Pe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(CPe);return re("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(wPe,{})}),t&&re(Tn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},kPe=()=>{const e=Xe(),t=Ee(x_e),n=u1();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(T5e())},[e,n,t])};kEe();const EPe=pt([e=>e.gallery,e=>e.options,e=>e.system,Ir],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=st.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),PPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(EPe);return kPe(),x("div",{className:"App",children:re(bPe,{children:[x(sEe,{}),re("div",{className:"app-content",children:[x(xEe,{}),x(L_e,{})]}),x("div",{className:"app-console",children:x(_Ee,{})}),e&&x(xPe,{}),t&&x(_Pe,{})]})})};const WV=N2e(AV),TPe=nN({key:"invokeai-style-cache",prepend:!0});Fw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(oEe,{}),persistor:WV,children:x(XQ,{value:TPe,children:x(Hme,{children:x(PPe,{})})})})})})); diff --git a/frontend/dist/assets/index.cc411ac7.js b/frontend/dist/assets/index.cc411ac7.js new file mode 100644 index 0000000000..c78ecf6e92 --- /dev/null +++ b/frontend/dist/assets/index.cc411ac7.js @@ -0,0 +1,623 @@ +function Eq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),pE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var DO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zO=Object.assign,FO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=FO,this.updater=n||DO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function BO(){}BO.prototype=Z0.prototype;function z9(e,t,n){this.props=e,this.context=t,this.refs=FO,this.updater=n||DO}var F9=z9.prototype=new BO;F9.constructor=z9;zO(F9,Z0.prototype);F9.isPureReactComponent=!0;var gE=Array.isArray,$O=Object.prototype.hasOwnProperty,B9={current:null},WO={key:!0,ref:!0,__self:!0,__source:!0};function HO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)$O.call(t,r)&&!WO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,he=G[X];if(0>>1;Xi(De,te))kei(ct,De)?(G[X]=ct,G[ke]=te,X=ke):(G[X]=De,G[Se]=te,X=Se);else if(kei(ct,te))G[X]=ct,G[ke]=te,X=ke;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function j(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Z=!0;try{Z=N(!0,G)}finally{Z?V():(R=!1,N=null)}}else R=!1}var V;if(typeof _=="function")V=function(){_(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){P(de,0)};function Q(G){N=G,R||(R=!0,V())}function K(G,Z){z=P(function(){G(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,Q(I))},e.unstable_forceFrameRate=function(G){0>G||125X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})(VO);(function(e){e.exports=VO})(e0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var UO=C.exports,da=e0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ww=Object.prototype.hasOwnProperty,Hq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Vq(e){return Ww.call(yE,e)?!0:Ww.call(vE,e)?!1:Hq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Uq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var W9=/[\-:]([a-z])/g;function H9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(W9,H9);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(W9,H9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(W9,H9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function V9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Xb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Zb(e.type,!1),e;case 11:return e=Zb(e.type.render,!1),e;case 1:return e=Zb(e.type,!0),e;default:return""}}function Gw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Rp:return"Portal";case Hw:return"Profiler";case U9:return"StrictMode";case Vw:return"Suspense";case Uw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case YO:return(e.displayName||"Context")+".Consumer";case jO:return(e._context.displayName||"Context")+".Provider";case G9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j9:return t=e.displayName||null,t!==null?t:Gw(e.type)||"Memo";case Tc:t=e._payload,e=e._init;try{return Gw(e(t))}catch{}}return null}function Yq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gw(t);case 8:return t===U9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function td(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=KO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ny(e){e._valueTracker||(e._valueTracker=qq(e))}function XO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=KO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function n4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function jw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=td(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ZO(e,t){t=t.checked,t!=null&&V9(e,"checked",t,!1)}function Yw(e,t){ZO(e,t);var n=td(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?qw(e,t.type,n):t.hasOwnProperty("defaultValue")&&qw(e,t.type,td(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function qw(e,t,n){(t!=="number"||n4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ry.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function tI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function nI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function Qw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jw=null;function Y9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var e6=null,n0=null,r0=null;function _E(e){if(e=Bv(e)){if(typeof e6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=C5(t),e6(e.stateNode,e.type,t))}}function rI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function iI(){if(n0){var e=n0,t=r0;if(r0=n0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(sK(e)/lK|0)|0}var iy=64,oy=4194304;function Jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function a4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ym),IE=String.fromCharCode(32),RE=!1;function _I(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function HK(e,t){switch(e){case"compositionend":return kI(t);case"keypress":return t.which!==32?null:(RE=!0,IE);case"textInput":return e=t.data,e===IE&&RE?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!t_&&_I(e,t)?(e=wI(),m3=Q9=Dc=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=FE(n)}}function AI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?AI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function LI(){for(var e=window,t=n4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=n4(e.document)}return t}function n_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QK(e){var t=LI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&AI(n.ownerDocument.documentElement,n)){if(r!==null&&n_(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BE(n,o);var a=BE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,a6=null,bm=null,s6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;s6||zp==null||zp!==n4(r)||(r=zp,"selectionStart"in r&&n_(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bm&&Jm(bm,r)||(bm=r,r=u4(a6,"onSelect"),0$p||(e.current=h6[$p],h6[$p]=null,$p--)}function Yn(e,t){$p++,h6[$p]=e.current,e.current=t}var nd={},Vi=dd(nd),To=dd(!1),qf=nd;function L0(e,t){var n=e.type.contextTypes;if(!n)return nd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function d4(){Zn(To),Zn(Vi)}function YE(e,t,n){if(Vi.current!==nd)throw Error(Re(168));Yn(Vi,t),Yn(To,n)}function BI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,Yq(e)||"Unknown",i));return fr({},n,r)}function f4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=BI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var lu=null,_5=!1,dx=!1;function $I(e){lu===null?lu=[e]:lu.push(e)}function cX(e){_5=!0,$I(e)}function fd(){if(!dx&&lu!==null){dx=!0;var e=0,t=Pn;try{var n=lu;for(Pn=1;e>=a,i-=a,cu=1<<32-xs(t)+i|n<z?($=N,N=null):$=N.sibling;var W=m(E,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(E,N),_=o(W,_,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var j=m(E,N,W.value,M);if(j===null){N===null&&(N=$);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=$}if(W.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(E,W.value,M),W!==null&&(_=o(W,_,z),R===null?I=W:R.sibling=W,R=W);return nr&&vf(E,z),I}for(N=r(E,N);!W.done;z++,W=T.next())W=v(N,E,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),_=o(W,_,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ty:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Tc&&tP(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=_3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=Sx(T,E.mode,M),_.return=E,E=_}return a(E);case Tc:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);fy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=yx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=qI(!0),KI=qI(!1),$v={},xl=dd($v),rv=dd($v),iv=dd($v);function Lf(e){if(e===$v)throw Error(Re(174));return e}function d_(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function XI(e){Lf(iv.current);var t=Lf(xl.current),n=Xw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function f_(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=dd(0);function y4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fx=[];function h_(){for(var e=0;en?n:4,e(!0);var r=hx.transition;hx.transition={};try{e(!1),t()}finally{Pn=n,hx.transition=r}}function fR(){return $a().memoizedState}function pX(e,t,n){var r=Kc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hR(e))pR(t,n);else if(n=UI(e,t,n,r),n!==null){var i=ro();ws(n,e,r,i),gR(n,t,r)}}function gX(e,t,n){var r=Kc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hR(e))pR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,u_(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=UI(e,t,i,r),n!==null&&(i=ro(),ws(n,e,r,i),gR(n,t,r))}}function hR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function pR(e,t){xm=S4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K9(e,n)}}var b4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,b3(4194308,4,sR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return b3(4194308,4,e,t)},useInsertionEffect:function(e,t){return b3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:y_,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),di===null)throw Error(Re(349));(Xf&30)!==0||JI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(tR.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,eR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=du,r=cu;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[pl]=t,e[nv]=r,_R(e,t,!1,!1),t.stateNode=e;e:{switch(a=Qw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=y4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Fi(t),null}else 2*Or()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return __(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function _X(e,t){switch(i_(t),t.tag){case 1:return Ao(t.type)&&d4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),h_(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return f_(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return l_(t.type._context),null;case 22:case 23:return __(),null;case 24:return null;default:return null}}var py=!1,Wi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function k6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function EX(e,t){if(l6=s4,e=LI(),n_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(u6={focusedElem:e,selectionRange:n},s4=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ps(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return S=fP,fP=!1,S}function wm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&k6(t,n,o)}i=i.next}while(i!==r)}}function P5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function E6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function PR(e){var t=e.alternate;t!==null&&(e.alternate=null,PR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[f6],delete t[lX],delete t[uX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function TR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||TR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function P6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=c4));else if(r!==4&&(e=e.child,e!==null))for(P6(e,t,n),e=e.sibling;e!==null;)P6(e,t,n),e=e.sibling}function T6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(T6(e,t,n),e=e.sibling;e!==null;)T6(e,t,n),e=e.sibling}var Pi=null,gs=!1;function xc(e,t,n){for(n=n.child;n!==null;)AR(e,t,n),n=n.sibling}function AR(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Wi||Up(n,t);case 6:var r=Pi,i=gs;Pi=null,xc(e,t,n),Pi=r,gs=i,Pi!==null&&(gs?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(gs?(e=Pi,n=n.stateNode,e.nodeType===8?cx(e.parentNode,n):e.nodeType===1&&cx(e,n),Zm(e)):cx(Pi,n.stateNode));break;case 4:r=Pi,i=gs,Pi=n.stateNode.containerInfo,gs=!0,xc(e,t,n),Pi=r,gs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&k6(n,t,a),i=i.next}while(i!==r)}xc(e,t,n);break;case 1:if(!Wi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}xc(e,t,n);break;case 21:xc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,xc(e,t,n),Wi=r):xc(e,t,n);break;default:xc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function us(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10e?16:e,zc===null)var r=!1;else{if(e=zc,zc=null,C4=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-w_?Bf(e,0):x_|=n),Lo(e,t)}function zR(e,t){t===0&&((e.mode&1)===0?t=1:(t=oy,oy<<=1,(oy&130023424)===0&&(oy=4194304)));var n=ro();e=vu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zR(e,n)}function NX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),zR(e,n)}var FR;FR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&WI(t,p4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;x3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=g_(null,t,r,e,i,n);var o=m_();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,f4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,c_(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,y6(t,r,e,n),t=x6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&r_(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(x3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=ps(r,e),i){case 0:t=b6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,ps(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),b6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),uP(e,t,r,i,n);case 3:e:{if(xR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,GI(e,t),v4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=R0(Error(Re(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Re(424)),t),t=cP(e,t,r,n,i);break e}else for(oa=jc(t.stateNode.containerInfo.firstChild),sa=t,nr=!0,vs=null,n=KI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=yu(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return XI(t),e===null&&g6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,c6(r,i)?a=null:o!==null&&c6(r,o)&&(t.flags|=32),bR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&g6(t),null;case 13:return wR(e,t,n);case 4:return d_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),sP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Yn(g4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=yu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=hu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),m6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),m6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=ps(r,t.pendingProps),i=ps(r.type,i),lP(e,t,r,i,n);case 15:return yR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),x3(e,t),t.tag=1,Ao(r)?(e=!0,f4(t)):e=!1,o0(t,n),YI(t,r,i),y6(t,r,i,n),x6(null,t,r,!0,e,n);case 19:return CR(e,t,n);case 22:return SR(e,t,n)}throw Error(Re(156,t.tag))};function BR(e,t){return dI(e,t)}function DX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new DX(e,t,n,r)}function E_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return E_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G9)return 11;if(e===j9)return 14}return 2}function Xc(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")E_(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case U9:a=8,i|=8;break;case Hw:return e=Na(12,n,t,i|2),e.elementType=Hw,e.lanes=o,e;case Vw:return e=Na(13,n,t,i),e.elementType=Vw,e.lanes=o,e;case Uw:return e=Na(19,n,t,i),e.elementType=Uw,e.lanes=o,e;case qO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jO:a=10;break e;case YO:a=9;break e;case G9:a=11;break e;case j9:a=14;break e;case Tc:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Na(22,e,r,t),e.elementType=qO,e.lanes=n,e.stateNode={isHidden:!1},e}function yx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function Sx(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jb(0),this.expirationTimes=Jb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function P_(e,t,n,r,i,o,a,s,l){return e=new FX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},c_(o),e}function BX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Il);const vy=D9(Il.exports);var wP=Il.exports;$w.createRoot=wP.createRoot,$w.hydrateRoot=wP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,R5={exports:{}},N5={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function VR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)YX.call(t,r)&&!KX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}N5.Fragment=jX;N5.jsx=VR;N5.jsxs=VR;(function(e){e.exports=N5})(R5);const Rn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var M_=C.exports.createContext({});M_.displayName="ColorModeContext";function Wv(){const e=C.exports.useContext(M_);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var yy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?yy.dark:yy.light),document.body.classList.remove(r?yy.light:yy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var JX=QX(ZX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function UR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?CP:_,setColorMode:t?CP:E,forced:t!==void 0}),[P,_,E,t]);return x(M_.Provider,{value:T,children:n})}UR.displayName="ColorModeProvider";var I6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,ke=Se||De||Function("return this")(),ct=t&&!t.nodeType&&t,Ge=ct&&!0&&e&&!e.nodeType&&e,ot=Ge&&Ge.exports===ct,Ze=ot&&Se.process,et=function(){try{var U=Ge&&Ge.require&&Ge.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=et&&et.isTypedArray;function xt(U,re,ge){switch(ge.length){case 0:return U.call(re);case 1:return U.call(re,ge[0]);case 2:return U.call(re,ge[0],ge[1]);case 3:return U.call(re,ge[0],ge[1],ge[2])}return U.apply(re,ge)}function Le(U,re){for(var ge=-1,qe=Array(U);++ge-1}function S1(U,re){var ge=this.__data__,qe=Ka(ge,U);return qe<0?(++this.size,ge.push([U,re])):ge[qe][1]=re,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=Du,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var re=-1,ge=U==null?0:U.length;for(this.clear();++re1?ge[zt-1]:void 0,mt=zt>2?ge[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&Eh(ge[0],ge[1],mt)&&(dn=zt<3?void 0:dn,zt=1),re=Object(re);++qe-1&&U%1==0&&U0){if(++re>=i)return arguments[0]}else re=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return _n.call(U)}catch{}try{return U+""}catch{}}return""}function Sa(U,re){return U===re||U!==U&&re!==re}var Od=Bl(function(){return arguments}())?Bl:function(U){return Hn(U)&&vn.call(U,"callee")&&!We.call(U,"callee")},Hl=Array.isArray;function Wt(U){return U!=null&&Th(U.length)&&!Vu(U)}function Ph(U){return Hn(U)&&Wt(U)}var Hu=Zt||O1;function Vu(U){if(!Fo(U))return!1;var re=Ns(U);return re==v||re==S||re==u||re==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Fo(U){var re=typeof U;return U!=null&&(re=="object"||re=="function")}function Hn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Hn(U)||Ns(U)!=_)return!1;var re=an(U);if(re===null)return!0;var ge=vn.call(re,"constructor")&&re.constructor;return typeof ge=="function"&&ge instanceof ge&&_n.call(ge)==Xt}var Ah=Tt?st(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Wt(U)?A1(U,!0):Ds(U)}var sn=Xa(function(U,re,ge,qe){No(U,re,ge,qe)});function Ht(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=sn})(I6,I6.exports);const yl=I6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,R6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=kP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=R6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Sy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function cs(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var GR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...GR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...GR].join(" ")}var aZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},sZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function lZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},jR="& > :not(style) ~ :not(style)",cZ={[jR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[jR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},N6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},fZ=new Set(Object.values(N6)),YR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||YR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in N6?N6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=qR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var qR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||qR(e)||YR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:cs("borderWidths"),borderStyles:cs("borderStyles"),colors:cs("colors"),borders:cs("borders"),radii:cs("radii",rn.px),space:cs("space",Sy(rn.vh,rn.px)),spaceT:cs("space",Sy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:cs("sizes",Sy(rn.vh,rn.px)),sizesT:cs("sizes",Sy(rn.vh,rn.fraction)),shadows:cs("shadows"),logical:rZ,blur:cs("blur",rn.blur)},k3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(k3,{bgImage:k3.backgroundImage,bgImg:k3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},D6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(D6,{shadow:D6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},E4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(E4,{flexDir:E4.flexDirection});var KR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Aa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},bx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>bx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>bx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>bx(t,e,n)}},km={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},IZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function XR(e){return _s(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(XR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,z6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=XR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:z6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(EP(e,...t)),subtract:(...t)=>_f(PP(e,...t)),multiply:(...t)=>_f(z6(e,...t)),divide:(...t)=>_f(TP(e,...t)),negate:()=>_f(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:z6,divide:TP,negate:AP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function FZ(e,t=""){return[t,e].filter(Boolean).join("-")}function BZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${FZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:BZ(r,t)}}function WZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function HZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function F6(e){if(e==null)return e;const{unitless:t}=HZ(e);return t||typeof e=="number"?`${e}px`:e}var ZR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,O_=e=>Object.fromEntries(Object.entries(e).sort(ZR));function LP(e){const t=O_(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(O_(e));return new Set(t)}function MP(e){if(!e)return e;e=F6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${F6(e)})`),t&&n.push("and",`(max-width: ${F6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(ZR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:O_(e),asArray:LP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;WZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var _i={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},wc=e=>QR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),nu=e=>QR(t=>e(t,"~ &"),"[data-peer]",".peer"),QR=(e,...t)=>t.map(e).join(", "),z5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:wc(_i.hover),_peerHover:nu(_i.hover),_groupFocus:wc(_i.focus),_peerFocus:nu(_i.focus),_groupFocusVisible:wc(_i.focusVisible),_peerFocusVisible:nu(_i.focusVisible),_groupActive:wc(_i.active),_peerActive:nu(_i.active),_groupDisabled:wc(_i.disabled),_peerDisabled:nu(_i.disabled),_groupInvalid:wc(_i.invalid),_peerInvalid:nu(_i.invalid),_groupChecked:wc(_i.checked),_peerChecked:nu(_i.checked),_groupFocusWithin:wc(_i.focusWithin),_peerFocusWithin:nu(_i.focusWithin),_peerPlaceholderShown:nu(_i.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},GZ=Object.keys(z5);function OP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:P}=OP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=z5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(B6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(B6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function B6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(B6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:UZ(n.breakpoints)}),n}var I_=yl({},k3,hn,yZ,E4,Aa,SZ,TZ,bZ,KR,PZ,km,D6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Aa,E4,KR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(I_),...GZ],iQ={...I_,...z5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var JR=e=>t=>dQ({theme:t,pseudos:z5,configs:I_})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,B5--),$r}function la(){return $r=Io2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&la()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Hv(e,E3()+(t<6&&wl()==32&&la()==32))}function W6(e){for(;la();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&W6($r);break;case 40:e===41&&W6(e);break;case 92:la();break}return Io}function LQ(e,t){for(;la()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Hv(t,Io-1)+"*"+F5(e===47?e:la())}function MQ(e){for(;!dv(wl());)la();return Hv(e,Io)}function OQ(e){return oN(T3("",null,null,null,[""],e=iN(e),0,[0],e))}function T3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=la()){case 40:if(S!=108&&Ti(N,p-1)==58){$6(N+=xn(P3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=P3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(E3()-1,7);continue;case 47:switch(wl()){case 42:case 47:by(IQ(LQ(la(),E3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&by(v>32?RP(N+";",r,n,p-1):RP(xn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(by(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)T3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:T3(e,R,R,r&&by(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:T3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=P3(la())),m=wl(),h=p=dl(T=N+=MQ(E3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function IP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=D_(m),S=0,w=0,P=0;S0?m[E]+" "+_:xn(_,/&\f/g,m[E])))&&(l[P++]=T);return $5(e,t,n,i===0?R_:s,l,u,h)}function IQ(e,t,n){return $5(e,t,n,eN,F5(EQ()),cv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,N_,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=D_(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return xn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+P4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~$6(e,"stretch")?sN(xn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~$6(e,"!important")&&10))){case 107:return xn(e,":",":"+pn)+e;case 101:return xn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+Bi+e+e}return e}var HQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case N_:t.return=sN(t.value,t.length);break;case tN:return s0([Mg(t,{value:xn(t.value,"@","@"+pn)})],i);case R_:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[xn(o,/:(read-\w+)/,":"+P4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[xn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Mg(t,{props:[xn(o,/:(plac\w+)/,":"+P4+"$1")]}),Mg(t,{props:[xn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},VQ=[HQ],lN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},xx=aN(function(e){return gN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),FP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!gN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function bJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},wN=xJ(bJ);function CN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var _N=e=>CN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function kN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var EJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,PJ=aN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},HP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return hN(n,r,i),oJ(function(){return pN(n,r,i)}),null},MJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||HP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var FJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),BJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),WJ=An("formError").parts("text","icon"),HJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function EN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function wy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function UP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=wx(s,a,e+1/3),i=wx(s,a,e),o=wx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var G6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function dee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=pee(e)),typeof e=="object"&&(ru(e.r)&&ru(e.g)&&ru(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ru(e.h)&&ru(e.s)&&ru(e.v)?(r=wy(e.s),i=wy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):ru(e.h)&&ru(e.s)&&ru(e.l)&&(r=wy(e.s),o=wy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=EN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),Cx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),_x="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),hs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+Cx),rgba:new RegExp("rgba"+_x),hsl:new RegExp("hsl"+Cx),hsla:new RegExp("hsla"+_x),hsv:new RegExp("hsv"+Cx),hsva:new RegExp("hsva"+_x),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(G6[e])e=G6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=hs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=hs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=hs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=hs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=hs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=hs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=hs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=hs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=hs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=hs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ru(e){return Boolean(hs.CSS_UNIT.exec(String(e)))}var Vv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=cee(t)),this.originalInput=t;var i=dee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=EN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),lee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries(G6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=xy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=xy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=xy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=xy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(PN(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=T4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return T4([0,100],t.seed);var n=TN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return T4([r,i],t.seed)}function vee(e,t,n){var r=yee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return T4([r,i],n.seed)}function yee(e,t){for(var n=TN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=LN.find(function(a){return a.name===e});if(n){var r=AN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function TN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=LN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function T4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function AN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var LN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function bee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function _ee(e){const t=PN().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Eee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function H_(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function MN(e){return Tee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(MN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,j6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=MN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:j6(t,-1)},uu=Object.assign(e=>({add:(...t)=>uu(KP(e,...t)),subtract:(...t)=>uu(XP(e,...t)),multiply:(...t)=>uu(j6(e,...t)),divide:(...t)=>uu(ZP(e,...t)),negate:()=>uu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:j6,divide:ZP,negate:QP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function ON(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,ON(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${ON(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Fee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Bee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Wee=Nee({container:zee,button:Fee,panel:Bee,icon:$ee}),Hee=Dee({baseStyle:Wee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),ua=ei("alert-fg"),Su=ei("alert-bg"),Uee=Uv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function V_(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:ua.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),IN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Zee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...IN,...Zee,container:Qee},RN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:NN,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),kx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[kx.variable]:"colors.gray.200",_dark:{[kx.variable]:"colors.whiteAlpha.400"},bgColor:kx.reference},JP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=NN(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function Cc(e){const t=e!=="100%"?RN[e]:void 0;return NN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ate={"2xs":Cc(4),xs:Cc(6),sm:Cc(8),md:Cc(12),lg:Cc(16),xl:Cc(24),"2xl":Cc(32),full:Cc("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},DN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(DN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:DN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:A3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=A3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:A3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:A3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:A3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},A4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Fte}=Pm,Bte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Bte,variants:zte,defaultProps:Fte},Wte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Hte={baseStyle:Wte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:Y6,defineMultiStyleConfig:qte}=rr(FJ.keys),Ex=ei("drawer-bg"),Px=ei("drawer-box-shadow");function yp(e){return Y6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ex.variable]:"colors.white",[Px.variable]:"shadows.lg",_dark:{[Ex.variable]:"colors.gray.700",[Px.variable]:"shadows.dark-lg"},bg:Ex.reference,boxShadow:Px.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=Y6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(BJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(WJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:fu,defineMultiStyleConfig:Ane}=rr(HJ.keys),Lne=fu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),_c={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Mne={lg:fu({field:_c.lg,addon:_c.lg}),md:fu({field:_c.md,addon:_c.md}),sm:fu({field:_c.sm,addon:_c.sm}),xs:fu({field:_c.xs,addon:_c.xs})};function U_(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var One=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Ine=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Rne=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=fu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},gn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Fne={baseStyle:zne},Bne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Bne},{defineMultiStyleConfig:Wne,definePartsStyle:Hne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Hne({icon:Vne}),Gne=Wne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:q6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=q6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function ds(e){return q6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={xs:ds("xs"),sm:ds("sm"),md:ds("md"),lg:ds("lg"),xl:ds("xl"),"2xl":ds("2xl"),"3xl":ds("3xl"),"4xl":ds("4xl"),"5xl":ds("5xl"),"6xl":ds("6xl"),full:ds("full")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},zN=hre,{defineMultiStyleConfig:pre,definePartsStyle:FN}=rr(jJ.keys),G_=Ui("number-input-stepper-width"),BN=Ui("number-input-input-padding"),gre=uu(G_).add("0.5rem").toString(),mre={[G_.variable]:"sizes.6",[BN.variable]:gre},vre=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[G_.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=FN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function Cy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=zN.fontSizes[o];return FN({field:{...r.field,paddingInlineEnd:BN.reference,verticalAlign:"top"},stepper:{fontSize:uu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:Cy("xs"),sm:Cy("sm"),md:Cy("md"),lg:Cy("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:gn.variants,defaultProps:gn.defaultProps}),eT,Cre={...(eT=gn.baseStyle)==null?void 0:eT.field,textAlign:"center"},_re={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,kre={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=gn.variants)==null?void 0:tT.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),_y=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),nT=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[_y.variable]:"colors.white",bg:_y.reference,[Are.variable]:_y.reference,[nT.variable]:"colors.gray.200",_dark:{[_y.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Fre,definePartsStyle:nm}=rr(qJ.keys),Bre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ai(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Wre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Hre=e=>({transitionProperty:"common",transitionDuration:"slow",...Bre(e)}),Vre=nm(e=>({label:$re,filledTrack:Hre(e),track:Wre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Fre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:L3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(A4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=L3(e=>{var t,n,r,i;return{label:(n=(t=A4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=A4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:L3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:L3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:L3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),ky={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,nie={lg:{...(rT=gn.sizes)==null?void 0:rT.lg,field:{...(iT=gn.sizes)==null?void 0:iT.lg.field,...ky}},md:{...(oT=gn.sizes)==null?void 0:oT.md,field:{...(aT=gn.sizes)==null?void 0:aT.md.field,...ky}},sm:{...(sT=gn.sizes)==null?void 0:sT.sm,field:{...(lT=gn.sizes)==null?void 0:lT.sm.field,...ky}},xs:{...(uT=gn.sizes)==null?void 0:uT.xs,field:{...(cT=gn.sizes)==null?void 0:cT.xs.field,...ky},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:gn.variants,defaultProps:gn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Tx=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Tx.variable]:"colors.white",_dark:{[Tx.variable]:"colors.gray.700"},bg:Tx.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:eS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Ic=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...H_({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...H_({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Ic.variable]:"colors.gray.200",_dark:{[Ic.variable]:"colors.whiteAlpha.200"},_disabled:{[Ic.variable]:"colors.gray.300",_dark:{[Ic.variable]:"colors.whiteAlpha.300"}},bg:Ic.reference}),hie=e=>{const{orientation:t}=e;return{...H_({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:gv.reference,h:gv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Ic.variable]:`colors.${t}.500`,_dark:{[Ic.variable]:`colors.${t}.200`},bg:Ic.reference}},gie=eS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=eS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=eS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=eS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:$N}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=$N({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:$N({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:M3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Wf=Ui("switch-track-height"),Ax=Ui("switch-track-diff"),Iie=uu.subtract(Lm,Wf),K6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Wf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Wf.reference],height:[Wf.reference],_checked:{transform:`translateX(${K6.reference})`}},Die=M3(e=>({container:{[Ax.variable]:Iie,[K6.variable]:Ax.reference,_rtl:{[K6.variable]:uu(Ax).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:M3({container:{[Lm.variable]:"1.375rem",[Wf.variable]:"sizes.3"}}),md:M3({container:{[Lm.variable]:"1.875rem",[Wf.variable]:"sizes.4"}}),lg:M3({container:{[Lm.variable]:"2.875rem",[Wf.variable]:"sizes.6"}})},Fie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Bie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),L4={"&[data-is-numeric=true]":{textAlign:"end"}},Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Wie,striped:Hie,unstyled:{}},Uie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Bie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Hf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},doe=Hf({container:loe,label:uoe,closeButton:coe}),foe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,goe={...(dT=gn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,moe={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=gn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,voe={xs:((hT=gn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=gn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=gn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=gn.sizes)==null?void 0:mT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Ey=Ui("tooltip-bg"),Lx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Ey.reference,color:Lx.reference,[Ey.variable]:"colors.gray.700",[Lx.variable]:"colors.whiteAlpha.900",_dark:{[Ey.variable]:"colors.gray.300",[Lx.variable]:"colors.gray.900"},[Soe.variable]:Ey.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Hee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:A4,CloseButton:Dte,Code:$te,Container:Hte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:gn,Kbd:Fne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Fie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Ooe=Moe,Ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Roe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Foe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Boe=Foe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Woe=$oe,Hoe={breakpoints:Eoe,zIndices:Boe,radii:Loe,blur:Woe,colors:Toe,...zN,sizes:RN,shadows:Ooe,space:IN,borders:_oe,transition:zoe},Voe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Hoe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function O3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!O3(e[r],t[r]))return!1;return!0}var o;if(Koe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!O3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Zoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!O3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return O3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function WN(){const e=Wv(),t=t1();return{...e,theme:t}}function Joe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return ne(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function iae(){const{colorMode:e}=Wv();return x(Z5,{styles:t=>{const n=wN(t,"styles.global"),r=kN(n,{theme:t,colorMode:e});return r?JR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=CN(a,(p,m)=>oQ(m)),l=kN(e,t),u=Object.assign({},i,l,_N(s),o),h=JR(u)(t.theme);return r?[h,r]:h};function Mx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=U6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Wv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function HN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=WN(),a=e?wN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},_N(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return HN(e,t)}function Ii(e,t={}){return HN(e,t)}function uae(){const e=new Map;return new Proxy(Mx,{apply(t,n,r){return Mx(...r)},get(t,n){return e.has(n)||e.set(n,Mx(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function wn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Bn(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var X6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,M4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return X6(()=>()=>e.current.destroy()),e.current}var[mae,VN]=wn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=VN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);X6(()=>()=>{!i.current||t.unregister(i.current)},[]),X6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=M4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function UN(){return[M4(mae),()=>M4(VN()),()=>gae(),i=>vae(i)]}var Ir=(...e)=>e.filter(Boolean).join(" "),bT={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Ir("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});va.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function tS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const j_=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function yae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",O4=sh?C.exports.useLayoutEffect:C.exports.useEffect,GN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(GN),a=C.exports.useContext(n1),s=C.exports.useContext(j_).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return O4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),O4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||xae.some(t=>vv(e[t]))}function jN(e){return Boolean(iS(e)||e.variants)}function wae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(nS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const iu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:iu(["layout","layoutId","drag"]),animation:iu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:iu(["exit"]),drag:iu(["drag","dragControls"]),focus:iu(["whileFocus"]),hover:iu(["whileHover","onHoverStart","onHoverEnd"]),tap:iu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:iu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:iu(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return oS(()=>{if(Mm.hasEverUpdated)return kae++})}const Y_=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const YN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(j_),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(GN).strict,E=C.exports.useContext(YN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return ne(Pae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(Y_).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Oae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function q_(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const I4={};function Iae(e){Object.assign(I4,e)}const R4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(R4);function qN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!I4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>R4.indexOf(e)-R4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function KN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,XN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,Z6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Fae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:XN(0,1)}),Py=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kc=Yv("deg"),_l=Yv("%"),Ct=Yv("px"),Bae=Yv("vh"),$ae=Yv("vw"),wT=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),K_=(e,t)=>n=>Boolean(jv(n)&&Fae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ZN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:K_("hsl","hue"),parse:ZN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Wae=XN(0,255),Ox=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Wae(e))}),Bc={test:K_("rgb","red"),parse:ZN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ox.transform(e)+", "+Ox.transform(t)+", "+Ox.transform(n)+", "+Om(Im.transform(r))+")"};function Hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Q6={test:K_("#"),parse:Hae,transform:Bc.transform},eo={test:e=>Bc.test(e)||Q6.test(e)||If.test(e),parse:e=>Bc.test(e)?Bc.parse(e):If.test(e)?If.parse(e):Q6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?Bc.transform(e):If.transform(e)},QN="${c}",JN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Z6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function eD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Z6);r&&(n=r.length,e=e.replace(Z6,QN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,JN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function tD(e){return eD(e).values}function nD(e){const{values:t,numColors:n,tokenised:r}=eD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Gae(e){const t=tD(e);return nD(e)(t.map(Uae))}const bu={test:Vae,parse:tD,createTransformer:nD,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,J6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),CT={...lh,transform:Math.round},rD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:kc,rotateX:kc,rotateY:kc,rotateZ:kc,scale:Py,scaleX:Py,scaleY:Py,scaleZ:Py,skew:kc,skewX:kc,skewY:kc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Im,originX:wT,originY:wT,originZ:Ct,zIndex:CT,fillOpacity:Im,strokeOpacity:Im,numOctaves:CT};function X_(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(KN(m)){o[m]=v;continue}const S=rD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const Z_=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function iD(e,t,n){for(const r in t)!ks(t[r])&&!qN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=Z_();return X_(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return iD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...tse,...Jae,...Qae,...ese]);function N4(e){return nse.has(e)}let oD=e=>!N4(e);function rse(e){!e||(oD=t=>t.startsWith("on")?!N4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(oD(i)||n===!0&&N4(i)||!t&&!N4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function ose(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function Q_(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){X_(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=ose(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&lse(p,o,a,s,!1)}const aD=()=>({...Z_(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=aD();return Q_(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};iD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(q_(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const sD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function lD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const uD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function cD(e,t,n,r){lD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(uD.has(i)?i:sD(i),t.attrs[i])}function J_(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||qN(r,e))&&(n[r]=t[r]);return n}function dD(e){const t=J_(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function e7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),fD=e=>bv(e)?e[e.length-1]||0:e;function I3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const hD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():oS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=I3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=jN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!rS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=e7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const pse={useVisualState:hD({scrapeMotionValuesFromProps:dD,createRenderState:aD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Q_(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),cD(t,n)}})},gse={useVisualState:hD({scrapeMotionValuesFromProps:J_,createRenderState:Z_})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...q_(e)?pse:gse,preloadedFeatures:n,useRender:cse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function eC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return aS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};eC(t,"focus",e?r:void 0),eC(t,"blur",e?i:void 0)}function pD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function gD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function t7(e,t="page"){return{point:gD(e)?bse(e,t):xse(e,t)}}const mD=(e,t=!1)=>{const n=r=>e(r,t7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function vD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return aS(e,vD(t),mD(n,t==="pointerdown"),r)}function D4(e,t,n,r){return eC(e,vD(t),n&&mD(n,t==="pointerdown"),r)}function yD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=yD("dragHorizontal"),ET=yD("dragVertical");function SD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function bD(){const e=SD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!pD(r)||bD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){D4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),D4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const xD=(e,t)=>t?e===t?!0:xD(e,t.parentElement):!1;function n7(e){return C.exports.useEffect(()=>()=>e(),[])}function wD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Ix=.001,Ase=.01,TT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=TT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=tC(u,a),S=Math.exp(-p);return Ix-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=tC(Math.pow(u,2),a);return(-i(u)+Ix>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Ix+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Ise=12;function Rse(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Dse)&&AT(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function r7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=wD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=LT,S=LT;function w(){const P=h?-(h/1e3):0,E=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const M=tC(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}r7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Rx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Rx(l,s,e+1/3),o=Rx(l,s,e),a=Rx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Fse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Bse=[Q6,Bc,If],OT=e=>Bse.find(t=>t.test(e)),CD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=MT(i),n=Bc),r===If&&(o=MT(o),r=Bc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Fse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},nC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce($se);function _D(e,t){return nC(e)?n=>wr(e,t,n):eo.test(e)?CD(e,t):ED(e,t)}const kD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>_D(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=_D(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function IT(e){const t=bu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=bu.createTransformer(t),r=IT(e),i=IT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?sS(kD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Hse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Hse;if(typeof e=="string")return eo.test(e)?CD:ED;if(Array.isArray(e))return kD;if(typeof e=="object")return Wse}function Use(e,t,n){const r=[],i=n||Vse(e[0]),o=e.length-1;for(let a=0;an(xv(e,t,r))}function jse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=xv(e[o],e[o+1],i);return t[o](s)}}function PD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;z4(o===t.length),z4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),i7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),TD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=TD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},AD=1.525,Kse=4/11,Xse=8/11,Zse=9/10,o7=e=>e,a7=Yse(2),Qse=lS(a7),LD=i7(a7),MD=e=>1-Math.sin(Math.acos(e)),s7=lS(MD),Jse=i7(s7),l7=TD(AD),ele=lS(l7),tle=i7(l7),nle=qse(AD),rle=4356/361,ile=35442/1805,ole=16061/1805,B4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-B4(1-e*2)):.5*B4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||LD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function R3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=cle(r&&r.length===a.length?r:ule(a),i);function l(){return PD(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const RT={keyframes:R3,spring:r7,decay:dle};function fle(e){if(Array.isArray(e.to))return R3;if(RT[e.type])return RT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?R3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?r7:R3}const OD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),ID=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),OD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>uS[t].process(p0),e),{});const yle=e=>uS[e].process(p0),RD=e=>{wv=!1,p0.delta=rC?OD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,iC=!0,qv.forEach(yle),iC=!1,wv&&(rC=!1,ID(RD))},Sle=()=>{wv=!0,rC=!0,iC||ID(RD)},ble=()=>p0;function ND(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?ND(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function DD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=wD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=PD([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=ND(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=$.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_{p?.(),E.stop()}}}function zD(e,t){return t?e*(1e3/t):0}function _le({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=zD($-R,ble().delta),(I===1&&$>M||I===-1&&$S?.stop()}}const oC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>oC(e)&&e.hasOwnProperty("z"),Ty=(e,t)=>Math.abs(e-t);function u7(e,t){if(nC(e)&&nC(t))return Ty(e,t);if(oC(e)&&oC(t)){const n=Ty(e.x,t.x),r=Ty(e.y,t.y),i=NT(e)&&NT(t)?Ty(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const FD=(e,t)=>1-3*t+3*e,BD=(e,t)=>3*t-6*e,$D=e=>3*e,$4=(e,t,n)=>((FD(t,n)*e+BD(t,n))*e+$D(t))*e,WD=(e,t,n)=>3*FD(t,n)*e*e+2*BD(t,n)*e+$D(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=$4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ay,e,n)}return a=>a===0||a===1?a:$4(o(a),t,r)}function Ole({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!bD()}function p(S,w){!h()||(xD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=sS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}D4(i,"pointerdown",o?v:void 0,l),n7(u)}const Ile="production",HD=typeof process>"u"||process.env===void 0?Ile:"production",DT=new Set;function VD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const aC=new WeakMap,Nx=new WeakMap,Rle=e=>{const t=aC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Nx.has(n)||Nx.set(n,{});const r=Nx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return aC.set(e,n),r.observe(e),()=>{aC.delete(e),r.unobserve(e)}}function Fle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Wle:$le)(a,o.current,e,i)}const Ble={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ble[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Wle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(HD!=="production"&&VD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const $c=e=>t=>(e(t),null),Hle={inView:$c(Fle),tap:$c(Ole),focus:$c(vse),hover:$c(Pse)};function c7(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function UD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gle={linear:o7,easeIn:a7,easeInOut:LD,easeOut:Qse,circIn:MD,circInOut:Jse,circOut:s7,backIn:l7,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:B4},zT=e=>{if(Array.isArray(e)){z4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",FT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ly=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),BT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:Ly,scaleY:Ly,scale:Ly,opacity:Dx,backgroundColor:Dx,color:Dx,default:Ly},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=BT[e]||BT.default,{to:t,...n(t)}},Kle={...rD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:J6,WebkitFilter:J6},d7=e=>Kle[e];function f7(e,t){var n;let r=d7(e);return r!==J6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},GD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),jD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),GD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),zx=Kv.reduce((e,t)=>(e[t]=()=>cS[t].process(g0),e),{}),eue=e=>cS[e].process(g0),YD=e=>{Cv=!1,g0.delta=sC?GD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,lC=!0,Kv.forEach(eue),lC=!1,Cv&&(sC=!1,jD(YD))},tue=()=>{Cv=!0,sC=!0,lC||jD(YD)},uC=()=>g0;function qD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function iue(e,t){var n,r;return(r=(n=(h7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=h7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=FT(e,n);a==="none"&&s&&typeof n=="string"?a=f7(e,n):$T(a)&&typeof n=="string"?a=WT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=WT(a));const l=FT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?_le({...p,...o}):DD({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=fD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function WT(e){return typeof e=="number"?0:f7("",e)}function h7(e,t){return e[t]||e.default||e}function p7(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=qD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function g7(e,t){e.indexOf(t)===-1&&e.push(t)}function m7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return g7(this.subscriptions,t),()=>m7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=uC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=cue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?zD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new due(e)}const KD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},XD=[lh,Ct,_l,kc,$ae,Bae,fue],Rg=e=>XD.find(KD(e)),hue=[...XD,eo,bu],pue=e=>hue.find(KD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return e7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function yue(e,t){const n=dS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=fD(o[a]);vue(e,a,s)}}function Sue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;scC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=cC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=ZD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function cC(e,t,n={}){var r;const i=dS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>ZD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function ZD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=p7(m,v,S,w);H4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(_ue).forEach((u,h)=>{a.push(cC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const v7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...v7].reverse(),Pue=v7.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=dS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{W=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!UD(K,G)||$?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...j.map(Q=>({animation:Q,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!UD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:$c(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:$c(e=>{const{custom:t,visualElement:n}=e,[r,i]=c7(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class QD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Bx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=u7(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=uC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Fx(h,this.transformPagePoint),pD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Bx(Fx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},gD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=t7(t),o=Fx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=uC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Bx(o,this.history)),this.removeListeners=sS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Fx(e,t){return t?{point:t(e.point)}:e}function HT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bx({point:e},t){return{point:e,delta:HT(e,JD(t)),offset:HT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function JD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=JD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fa(e){return e.max-e.min}function VT(e,t=0,n=.01){return u7(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const dC=.35;function Wue(e=dC){return e===!1?e=0:e===!0&&(e=dC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),Ei=()=>({x:QT(),y:QT()});function ul(e){return[e("x"),e("y")]}function ez({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function $x(e){return e===void 0||e===1}function fC({scale:e,scaleX:t,scaleY:n}){return!$x(e)||!$x(t)||!$x(n)}function Sf(e){return fC(e)||tz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function tz(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function V4(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=V4(e,i,r)),V4(e,n,r)+t}function hC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function nz(e,{x:t,y:n}){hC(e.x,t.translate,t.scale,t.originPoint),hC(e.y,n.translate,n.scale,n.originPoint)}function Uue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(t7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=SD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=fa(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new QD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!My(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Wue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Fue(i.layout.actual,o);if(n){const s=n(Hue(a));this.hasMutatedConstraints=!!s,s&&(a=ez(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!My(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return p7(t,r,0,n)}stopAnimation(){ul(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ul(n=>{const{drag:r}=this.getProps();if(!My(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Bue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!My(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=aS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=dC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function My(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(j_),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new QD(h,l,{transformPagePoint:s})}D4(i,"pointerdown",o&&u),n7(()=>a.current&&a.current.end())}const Jue={pan:$c(Que),drag:$c(Zue)},pC={current:null},iz={current:!1};function ece(){if(iz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>pC.current=e.matches;e.addListener(t),t()}else pC.current=!1}const Oy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Oy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Oy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Oy[i]]=o=>r.add(o),n["notify"+Oy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),H4(r)&&r.add(i);else if(ks(a))e.addValue(i,F0(o)),H4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const oz=Object.keys(yv),rce=oz.length,az=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const $={..._},W=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),H4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=iS(p),Z=jN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),iz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:pC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,ke){const ct=[];for(let Ge=0;Gete.scheduleRender(),animationType:typeof ot=="string"?ot:"both",initialPromotionConfig:ke,layoutScroll:Tt})}return ct},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=F0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){$[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=e7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye{const o=i.get();if(!gC(o))return;const a=mC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!gC(o))continue;const a=mC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),uz=e=>sce.has(e),lce=e=>Object.keys(e).some(uz),cz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===lh||e===Ct;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=R4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);cz(h,s[u]),e[u]=aA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(uz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const dz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=d7(t);return n&&n.default||0}else{const n=mce(e),r=(KN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return rz(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:J_,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),X_(t,n,r,i.transformTemplate)},render:lD},vce=az(dz),yce=az({...dz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=d7(t))===null||n===void 0?void 0:n.default)||0:(t=uD.has(t)?t:sD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:dD,build(e,t,n,r,i){Q_(t,n,r,i.transformTemplate)},render:cD}),Sce=(e,t)=>q_(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(lz,v=>(o.push(v),lA)));const a=bu.parse(e);if(a.length>5)return r;const s=bu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=c7(),r=C.exports.useContext(Y_);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(YN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:F0(e);return p7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const fz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=fz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||Ct.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(xv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function fs(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=V4(e,1/n,r),i!==void 0&&(e=V4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,Mce,n?.x,r?.x),pA(e.y,t,Oce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function pz(e){return mA(e.x)&&mA(e.y)}function gz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return fa(e.x)/fa(e.y)}function Ice(e,t,n=.1){return u7(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){g7(this.members,t),t.scheduleRender()}remove(t){if(m7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){g7(this.children,t),this.isDirty=!0}remove(t){m7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function mz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Hce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=qD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!gz(this.targetLayout,w)||S,$=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...h7(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Jf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Uce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var _;const T=E/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&vz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=fa(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=fa(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}fs(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Fce(e){e.updateLayout()}function Bce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=fa(v);v.min=o[m].min,v.max=v.min+S}):vz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=fa(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!pz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),gz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Wce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Hce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function vz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(vA(t),vA(n),.2)}const Xce=mz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wx={current:void 0},Zce=mz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Wx.current=e}return Wx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Hle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function yz(){const e=C.exports.useRef(!1);return O4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=yz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const Hx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",VD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(Y_).forceRender;l&&(s=l);const u=yz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(O4(()=>{w.current=!1,rde(h,S),v.current=p}),n7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Rn,{children:p.map(T=>x(Hx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x(Hx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(Hx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),HD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Rn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function vC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function yC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(TA.enter,i)})},bz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});bz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},xz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...xz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},wz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...wz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=yC({direction:e});return{...i,transition:t?.exit??Ps.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=yC({direction:e});return{...i,transition:n?.enter??Ps.enter(AA.enter,r),transitionEnd:t?.enter}}},Cz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=yC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});Cz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},SC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(pd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...SC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Vx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,hS]=wn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[yde,y7]=wn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Sde,WPe,bde,xde]=UN(),Nf=Pe(function(t,n){const{getButtonProps:r}=y7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=tS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,S7]=wn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=S7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:Bn(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Vx($.onClick,T),onFocus:Vx($.onFocus,I),onKeyDown:Vx($.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;fS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){fS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Pde(e){fS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Tde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=y7(),{reduceMotion:r}=S7(),i=Zv("chakra-accordion__icon",e.className),o=hS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Ff=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=S7(),{getPanelProps:s,isOpen:l}=y7(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=hS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(bz,{in:l,...i,children:m})});Ff.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Ode(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Ide,Rde]=wn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Nde,b7]=wn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),_z={info:{icon:Ode,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return _z[e].colorScheme}function zde(e){return _z[e].icon}var kz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});kz.displayName="Alert";var Ez=Pe(function(t,n){const i={display:"inline",...b7().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});Ez.displayName="AlertDescription";function Pz(e){const{status:t}=Rde(),n=zde(t),r=b7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:gS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Pz.displayName="AlertIcon";var Tz=Pe(function(t,n){const r=b7();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Tz.displayName="AlertTitle";function Fde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Bde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",U4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});U4.displayName="NativeImage";var mS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Bde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Fde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:U4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:U4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});mS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:U4,className:"chakra-image",...e}));function vS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var yS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Wde,Hde]=wn({strict:!1,name:"ButtonGroupContext"});function bC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=yS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}bC.displayName="ButtonIcon";function xC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=yS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}xC.displayName="ButtonSpinner";function Vde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Pe((e,t)=>{const n=Hde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=mn(e),_=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:_,className:yS("chakra-button",w),...E},o&&S==="start"&&x(xC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...I})):x(OA,{...I}),o&&S==="end"&&x(xC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Wa.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Rn,{children:[t&&x(bC,{marginEnd:i,children:t}),r,n&&x(bC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=yS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Wde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Iy=e=>e?"":void 0,Ux=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Az]=wn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Gde,a1]=wn({strict:!1,name:"FormControlContext"});function jde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Bn(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Iy(P),"data-disabled":Iy(i),"data-invalid":Iy(r),"data-readonly":Iy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Bn(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var gd=Pe(function(t,n){const r=Ii("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Az(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function x7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=w7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Ux(n),"aria-required":Ux(i),"aria-readonly":Ux(r)}}function w7(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:IA(t?.onFocus,h),onBlur:IA(t?.onBlur,p)}}var[qde,Kde]=wn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=mn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(Lz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Lz=Pe(function(t,n){const r=a1(),i=Az();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Lz.displayName="RequiredIndicator";function rd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var C7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:C7});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:C7});Jde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,B0=!1,wC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function _7(e,t){wC.forEach(n=>n(e,t))}function NA(e){B0=!0,tfe(e)&&(SS="keyboard",_7("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(B0=!0,_7("pointer",e))}function nfe(e){e.target===window||e.target===document||(B0||(SS="keyboard",_7("keyboard",e)),B0=!1)}function rfe(){B0=!1}function DA(){return SS!=="pointer"}function ife(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){B0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),RA=!0}function ofe(e){ife(),e(DA());const t=()=>e(DA());return wC.add(t),()=>{wC.delete(t)}}var[HPe,afe]=wn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Mz(e={}){const t=w7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),rd(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const ke=n&&!m,ct=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),Ge=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const ot=C.exports.useCallback((Le={},st=null)=>{const At=Xe=>{de&&Xe.preventDefault(),K(!0)};return{...Le,ref:st,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&W),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Ta(Le.onMouseDown,At),onMouseUp:Ta(Le.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Ta(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Le={},st=null)=>({...R,...Le,ref:Bn(st,At=>{!At||te(At.tagName==="LABEL")}),onClick:Ta(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var Xe;(Xe=G.current)==null||Xe.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),et=C.exports.useCallback((Le={},st=null)=>({...Le,ref:Bn(G,st),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Ta(Le.onChange,De),onBlur:Ta(Le.onBlur,z,()=>V(!1)),onFocus:Ta(Le.onFocus,$,()=>V(!0)),onKeyDown:Ta(Le.onKeyDown,ct),onKeyUp:Ta(Le.onKeyUp,Ge),required:i,checked:Se,disabled:ke,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:C7}),[w,P,a,De,z,$,ct,Ge,i,Se,ke,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},st=null)=>({...Le,ref:st,onMouseDown:Ta(Le.onMouseDown,zA),onTouchStart:Ta(Le.onTouchStart,zA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:ot,getInputProps:et,getLabelProps:Tt,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=hd({from:{opacity:0},to:{opacity:1}}),vfe=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Oz=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Mz({...E,isDisabled:S,isChecked:_,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Oz.displayName="Checkbox";function yfe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var bS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function k7(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function CC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function G4(e,t,n){return(e-t)*100/(n-t)}function Iz(e,t,n){return(n-t)*e+t}function _C(e,t,n){const r=Math.round((e-t)/n)*n+t,i=CC(n);return k7(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Gx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Rz(Ec(v),o),w=n??S,P=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),Ec(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let j=W;return l&&(j=m0(j,a,s)),k7(j,w)},[w,l,s,a]),_=C.exports.useCallback((W=o)=>{let j;v===""?j=Ec(W):j=Ec(v)+W,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let j;v===""?j=Ec(-W):j=Ec(v)-W,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=Gx(r,o,n)??a,P(W)},[r,n,o,P,a]),I=C.exports.useCallback(W=>{const j=Gx(W,o,w)??a;P(j)},[w,o,P,a]),R=Ec(v);return{isOutOfRange:R>s||Rx(Z5,{styles:Nz}),wfe=()=>x(Z5,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Nz} + `});function Uf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Dz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Dz()&&e.test(navigator.vendor),Efe=e=>Dz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function FA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=FA(n),a=FA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function E7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var P7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=mn(i),s=x7(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});P7.displayName="Input";P7.id="Input";var[Ife,zz]=wn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=mn(t),s=Ir("chakra-input__group",o),l={},u=vS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=E7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),T7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=zz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});T7.displayName="InputAddon";var Fz=Pe(function(t,n){return x(T7,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Fz.displayName="InputLeftAddon";Fz.id="InputLeftAddon";var Bz=Pe(function(t,n){return x(T7,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Bz.displayName="InputRightAddon";Bz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),xS=Pe(function(t,n){const{placement:r="left",...i}=t,o=zz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var $z=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__left-element",r);return x(xS,{ref:n,placement:"left",className:o,...i})});$z.id="InputLeftElement";$z.displayName="InputLeftElement";var Wz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__right-element",r);return x(xS,{ref:n,placement:"right",className:o,...i})});Wz.id="InputRightElement";Wz.displayName="InputRightElement";function Ffe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function id(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Ffe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Bfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Ir("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:id(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Bfe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=mn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Pu=we("div");Pu.displayName="Box";var Hz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Pu,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Hz.displayName="Square";var Wfe=Pe(function(t,n){const{size:r,...i}=t;return x(Hz,{size:r,ref:n,borderRadius:"9999px",...i})});Wfe.displayName="Circle";var Vz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Vz.displayName="Center";var Hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Hfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=mn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Ir("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Ir("chakra-divider",p)})});Gfe.displayName="Divider";var nn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});nn.displayName="Flex";var Uz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Uz.displayName="Grid";function BA(e){return id(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=E7({gridArea:r,gridColumn:BA(i),gridRow:BA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=mn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=mn(t);return x(Pu,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=mn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=mn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Ir("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Ir("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Ir("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Gz]=wn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),A7=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});A7.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(A7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(A7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Gz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Gz();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Uz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return id(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return id(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var jz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});jz.displayName="Spacer";var kC="& > *:not(style) ~ *:not(style)";function rhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[kC]:id(n,i=>r[i])}}function ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":id(n,i=>r[i])}}var Yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Yz.displayName="StackItem";var L7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=vS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Yz,{children:I},N):I;if(!P)return W;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,P,E,p,l]),T=Ir("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[kC]:S[kC]},...m},_)});L7.displayName="Stack";var qz=Pe((e,t)=>x(L7,{align:"center",...e,direction:"row",ref:t}));qz.displayName="HStack";var Kz=Pe((e,t)=>x(L7,{align:"center",...e,direction:"column",ref:t}));Kz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=E7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Ir("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>id(w,_=>$A(R6("space",_)(E))),"--chakra-wrap-y-spacing":E=>id(P,_=>$A(R6("space",_)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Xz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Ir("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Ir("chakra-wrap__listitem",r),...i})});Xz.displayName="WrapItem";var ahe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Zz=ahe,bp=()=>{},she={document:Zz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:Zz},Qz=typeof window<"u"?{window,document}:uhe,Jz=C.exports.createContext(Qz);Jz.displayName="EnvironmentContext";function eF(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Qz},[r,n]);return ne(Jz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}eF.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function jx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&jx(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!jx(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!jx(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Bn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:ie}}function tF(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function nF(e){if(!tF(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=rF(e))==null?void 0:t.defaultView)??window}function rF(e){return tF(e)?e.ownerDocument:document}function phe(e){return rF(e).activeElement}var iF=e=>e.hasAttribute("tabindex"),ghe=e=>iF(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function oF(e){return e.parentElement&&oF(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function aF(e){if(!nF(e)||oF(e)||mhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():vhe(e)?!0:iF(e)}function yhe(e){return e?nF(e)&&aF(e)&&!ghe(e):!1}var She=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function sF(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>aF(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;rd(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=sF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);rd(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Va="bottom",Ua="right",Oo="left",M7="auto",Jv=[Mo,Va,Ua,Oo],$0="start",kv="end",Phe="clippingParents",lF="viewport",zg="popper",The="reference",WA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),uF=[].concat(Jv,[M7]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Fhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function ja(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=ja(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=ja(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function O7(e){if(typeof ShadowRoot>"u")return!1;var t=ja(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Bhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Al(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function $he(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Whe={name:"applyStyles",enabled:!0,phase:"write",fn:Bhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,j4=Math.min,W0=Math.round;function EC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function cF(){return!/^((?!chrome|android).)*safari/i.test(EC())}function H0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=eh(e)?ja(e):window,s=a.visualViewport,l=!cF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function I7(e){var t=H0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&O7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xu(e){return ja(e).getComputedStyle(e)}function Hhe(e){return["table","td","th"].indexOf(Al(e))>=0}function md(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(O7(e)?e.host:null)||md(e)}function HA(e){return!Fa(e)||xu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(EC()),n=/Trident/i.test(EC());if(n&&Fa(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(O7(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Al(i))<0;){var o=xu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function e2(e){for(var t=ja(e),n=HA(e);n&&Hhe(n)&&xu(n).position==="static";)n=HA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&xu(n).position==="static")?t:n||Vhe(e)||t}function R7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Fm(e,t,n){return Yf(e,j4(t,n))}function Uhe(e,t,n){var r=Fm(e,t,n);return r>n?n:r}function fF(){return{top:0,right:0,bottom:0,left:0}}function hF(e){return Object.assign({},fF(),e)}function pF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hF(typeof t!="number"?t:pF(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=R7(s),u=[Oo,Ua].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=I7(o),v=l==="y"?Mo:Oo,S=l==="y"?Va:Ua,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Fm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!dF(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:W0(t*i)/i||0,y:W0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===ja(n)&&(R=md(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ua)&&o===kv){M=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Va)&&o===kv){T=Ua;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:kl(t.placement),variation:V0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ry={passive:!0};function Jhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=ja(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ry)}),s&&l.addEventListener("resize",n.update,Ry),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ry)}),s&&l.removeEventListener("resize",n.update,Ry)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function D3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function N7(e){var t=ja(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function D7(e){return H0(md(e)).left+N7(e).scrollLeft}function rpe(e,t){var n=ja(e),r=md(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=cF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+D7(e),y:l}}function ipe(e){var t,n=md(e),r=N7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+D7(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function z7(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function gF(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Fa(e)&&z7(e)?e:gF(wS(e))}function Bm(e,t){var n;t===void 0&&(t=[]);var r=gF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ja(r),a=i?[o].concat(o.visualViewport||[],z7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bm(wS(a)))}function PC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=H0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===lF?PC(rpe(e,n)):eh(t)?ope(t,n):PC(ipe(md(e)))}function ape(e){var t=Bm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&Fa(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&dF(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=Yf(h.top,l.top),l.right=j4(h.right,l.right),l.bottom=j4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function mF(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Va:l={x:a,y:t.y+t.height};break;case Ua:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?R7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Phe:s,u=n.rootBoundary,h=u===void 0?lF:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=hF(typeof P!="number"?P:pF(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||md(e.elements.popper),l,h,a),R=H0(e.elements.reference),N=mF({reference:R,element:T,strategy:"absolute",placement:i}),z=PC(Object.assign({},T,N)),$=m===zg?z:R,W={top:I.top-$.top+E.top,bottom:$.bottom-I.bottom+E.bottom,left:I.left-$.left+E.left,right:$.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys(W).forEach(function(V){var J=[Ua,Va].indexOf(V)>=0?1:-1,ie=[Mo,Va].indexOf(V)>=0?"y":"x";W[V]+=de[ie]*J})}return W}function lpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?uF:l,h=V0(r),p=h?s?WA:WA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===M7)return[];var t=D3(e);return[UA(e),t,UA(t)]}function cpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[D3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===M7?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Ua:Oo:V?Va:Mo;I[ie]>R[ie]&&(K=D3(K));var G=D3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){$=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var ke=M.find(function(ct){var Ge=N.get(ct);if(Ge)return Ge.slice(0,De).every(function(ot){return ot})});if(ke)return $=ke,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Ua,Va,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ua].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=uF.reduce(function(h,p){return h[p]=ppe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=mF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=R7(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Va:Ua,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?I7(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:fF(),ke=De[J],ct=De[ie],Ge=Fm(0,N[Q],Se[Q]),ot=T?N[Q]/2-te-Ge-ke-W.mainAxis:X-Ge-ke-W.mainAxis,Ze=T?-N[Q]/2+te+Ge+ct+W.mainAxis:he+Ge+ct+W.mainAxis,et=t.elements.arrow&&e2(t.elements.arrow),Tt=et?M==="y"?et.clientTop||0:et.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+ot-xt-Tt,st=K+Ze-xt,At=Fm(v?j4(G,Le):G,K,v?Yf(Z,st):Z);R[M]=At,de[M]=At-K}if(s){var Xe,yt=M==="x"?Mo:Oo,cn=M==="x"?Va:Ua,wt=R[I],Ut=I==="y"?"height":"width",_n=wt+P[yt],vn=wt-P[cn],Ie=[Mo,Oo].indexOf(E)!==-1,Je=(Xe=j?.[I])!=null?Xe:0,Xt=Ie?_n:wt-N[Ut]-z[Ut]-Je+W.altAxis,Yt=Ie?wt+N[Ut]+z[Ut]-Je-W.altAxis:vn,Ee=v&&Ie?Uhe(Xt,wt,Yt):Fm(v?Xt:_n,wt,v?Yt:vn);R[I]=Ee,de[I]=Ee-wt}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===ja(e)||!Fa(e)?N7(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=W0(t.width)/e.offsetWidth||1,r=W0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&_pe(t),o=md(t),a=H0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||z7(o))&&(s=Cpe(t)),Fa(t)?(l=H0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=D7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ppe(e){var t=Epe(e);return Fhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Rpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Npe=e=>Rpe[e],XA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var zpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Fpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,Npe(e.placement))},Bpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Wpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Wpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},Hpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Upe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function vF(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=_.current)==null||W.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Hpe,Bpe,Fpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},j=null)=>({...W,ref:Bn(M,j)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},j=null)=>({...W,ref:Bn(R,j),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=W;return{...Q,ref:j,"data-popper-arrow":"",style:jpe(W)}},[]),$=C.exports.useCallback((W={},j=null)=>({...W,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function jpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function yF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function SF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=wn({strict:!1,name:"PortalManagerContext"});function bF(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}bF.displayName="PortalManager";var[xF,Xpe]=wn({strict:!1,name:"PortalContext"}),F7="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=F7,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(xF,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=F7),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(xF,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=F7;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Ny=new WeakMap,Dy={},Yx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Dy[n]||(Dy[n]=new WeakMap);var o=Dy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Ny.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Yx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Ny.has(p)||p.removeAttribute(r),Ny.delete(p)),v||p.removeAttribute(n)}),Yx--,Yx||(wp=new WeakMap,wp=new WeakMap,Ny=new WeakMap,Dy={})}},wF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function B7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function CF(){}function _F(){}_F.resetWarningCache=CF;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_F,resetWarningCache:CF};return n.PropTypes=n,n};On.exports=a0e();var TC="data-focus-lock",kF="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function EF(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var qx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function PF(e){return e}function TF(e,t){t===void 0&&(t=PF);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function $7(e,t){return t===void 0&&(t=PF),TF(e,t)}function AF(e){e===void 0&&(e={});var t=TF(null);return t.options=gl({async:!0,ssr:!1},e),t}var LF=function(e){var t=e.sideCar,n=Sz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...gl({},n)})};LF.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),LF}var MF=$7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),OF=$7(),h0e=$7(),p0e=AF({async:!0}),g0e=[],W7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(ct){var Ge=u.current;if(Ge&&Ge.focus){var ot=typeof j=="function"?j(Ge):j;if(ot){var Ze=typeof ot=="object"?ot:void 0;u.current=null,ct?Promise.resolve().then(function(){return Ge.focus(Ze)}):Ge.focus(Ze)}}},[j]),te=C.exports.useCallback(function(ct){l.current&&MF.useMedium(ct)},[]),X=OF.useMedium,he=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=Tn((r={},r[kF]=p&&"disabled",r[TC]=P,r),$),Se=m!==!0,De=Se&&m!=="tail",ke=EF([n,he]);return ne(Rn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:qx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:qx},"guard-nearest"):null],!p&&x(W,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:ke,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:qx})]})});W7.propTypes={};W7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const IF=W7;function AC(e,t){return AC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AC(e,t)}function H7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,AC(e,t)}function RF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){H7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return RF(l,"displayName","SideEffect("+n(i)+")"),l}}var Nl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],U7=k0e.join(","),E0e="".concat(U7,", [data-focus-guard]"),VF=function(e,t){var n;return Nl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:U7)?[i]:[],VF(i))},[])},G7=function(e,t){return e.reduce(function(n,r){return n.concat(VF(r,t),r.parentNode?Nl(r.parentNode.querySelectorAll(U7)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Nl(t).map(function(n){return G7([n])}).reduce(function(n,r){return n.concat(r)},[])},j7=function(e,t){return Nl(e).filter(function(n){return zF(t,n)}).filter(function(n){return x0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Nl(e).filter(function(n){return FF(t,n)})},MC=function(e,t,n){return HF(j7(G7(e,n),t),!0,n)},eL=function(e,t){return HF(j7(G7(e),t),!1)},T0e=function(e,t){return j7(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Nl(e.children).some(function(n){return Pv(n,t)})},A0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},UF=function(e){return e.parentNode?UF(e.parentNode):e},Y7=function(e){var t=LC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(TC);return n.push.apply(n,i?A0e(Nl(UF(r).querySelectorAll("[".concat(TC,'="').concat(i,'"]:not([').concat(kF,'="disabled"])')))):[r]),n},[])},GF=function(e){return e.activeElement?e.activeElement.shadowRoot?GF(e.activeElement.shadowRoot):e.activeElement:void 0},q7=function(){return document.activeElement?document.activeElement.shadowRoot?GF(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Nl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},jF=function(e){var t=document&&q7();return!t||t.dataset&&t.dataset.focusGuard?!1:Y7(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&q7();return e?Nl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(WF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},K7=function(e,t){return WF(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(K7(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?K7(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(K7(e[t],e)):t},YF="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=V7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=nL(e,0),_=nL(e,i-1);if(l===-1||h===-1)return YF;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=BF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(D0e(n)));return i&&i.length?tL(i):tL(JA(t))},OC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&OC(e.parentNode.host||e.parentNode,t),t},Kx=function(e,t){for(var n=OC(e),r=OC(t),i=0;i=0)return o}return!1},qF=function(e,t,n){var r=LC(e),i=LC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Kx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Kx(o,l);u&&(!a||Pv(u,a)?a=u:a=Kx(u,a))})}),a},F0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},B0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(C0e)},$0e=function(e,t){var n=document&&q7(),r=Y7(e).filter(Y4),i=qF(n||e,e,r),o=new Map,a=eL(r,o),s=MC(r,o).filter(function(m){var v=m.node;return Y4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=B0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===YF?{node:z0e(a,h,F0e(r,o))}:p===void 0?p:u[p]}},W0e=function(e){var t=Y7(e).filter(Y4),n=qF(e,e,t),r=new Map,i=MC([n],r,!0),o=MC(t,r).filter(function(a){var s=a.node;return Y4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:V7(s)}})},H0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Xx=0,Zx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Zx&&r){if(Xx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Zx=!0,setTimeout(function(){Zx=!1},1);return}Xx++,H0e(r.node,n.focusOptions),Xx--}};const KF=V0e;function XF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},q4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(jF(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=KF(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=W0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},ZF=function(t){q4()&&t&&(t.stopPropagation(),t.preventDefault())},X7=function(){return XF(q4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},QF=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",ZF),document.addEventListener("focusout",X7),window.addEventListener("blur",QF)},r1e=function(){document.removeEventListener("focusin",ZF),document.removeEventListener("focusout",X7),window.removeEventListener("blur",QF)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),q4(),XF(q4)):(r1e(),qp=null)}MF.assignSyncMedium(e1e);OF.assignMedium(X7);h0e.assignMedium(function(e){return e({moveFocusInside:KF,focusInside:jF})});const a1e=m0e(i1e,o1e)(t1e);var JF=C.exports.forwardRef(function(t,n){return x(IF,{sideCar:a1e,ref:n,...t})}),eB=IF.propTypes||{};eB.sideCar;B7(eB,["sideCar"]);JF.propTypes={};const s1e=JF;var tB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&sF(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};tB.displayName="FocusLock";var z3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",nB=AF(),Qx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Qx,onWheelCapture:Qx,onTouchMoveCapture:Qx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=Sz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=EF([n,t]),I=gl(gl({},_),i);return ne(Rn,{children:[h&&x(T,{sideCar:nB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:F3,zeroRight:z3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rB=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Jx=function(e){return parseInt(e||"",10)||0},v1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Jx(n),Jx(r),Jx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S1e=rB(),b1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(l1e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(z3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(F3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(z3," .").concat(z3,` { + right: 0 `).concat(r,`; + } + + .`).concat(F3," .").concat(F3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(u1e,": ").concat(s,`px; + } +`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},IC=!1;if(typeof window<"u")try{var zy=Object.defineProperty({},"passive",{get:function(){return IC=!0,!0}});window.addEventListener("test",zy,zy),window.removeEventListener("test",zy,zy)}catch{IC=!1}var Cp=IC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},iB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return iB(e,"overflowY")},_1e=function(e){return iB(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=oB(e,n);if(r){var i=aB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oB=function(e,t){return e==="v"?C1e(t):_1e(t)},aB=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=aB(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&oB(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return rB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=vC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=iL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=iL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return T1e($,P,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?oL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return ne(Rn,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(nB,O1e);var sB=C.exports.forwardRef(function(e,t){return x(CS,{...gl({},e,{ref:t,sideCar:I1e})})});sB.classNames=CS.classNames;const lB=sB;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},RC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&RC.add(e),()=>{RC.remove(e)}),[t,e])}function D1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=F1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:Bn($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!RC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:Bn($,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return wF(e.current)},[t,e,n])}function F1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[B1e,fh]=wn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[$1e,od]=wn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(B1e,{value:S,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=od();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var Z7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=od(),a=dh("chakra-modal__close-btn",r),s=fh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});Z7.displayName="ModalCloseButton";function uB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=od(),[p,m]=c7();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(tB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(lB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var W1e={slideInBottom:{...SC,custom:{offsetY:16,reverse:!0}},slideInRight:{...SC,custom:{offsetX:16,reverse:!0}},scale:{...wz,custom:{initialScale:.95,reverse:!0}},none:{}},H1e=we(Rl.section),V1e=e=>W1e[e||"none"],cB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(H1e,{ref:t,...r,...i})});cB.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=od(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=od();return le.createElement(uB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(cB,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var _S=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});_S.displayName="ModalFooter";var kS=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=od();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});kS.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=od();return x(U1e,{...i||(u==="none"?{}:xz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function dB(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var fB=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[VPe,G1e]=wn(),j1e=we(Cz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=od(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=G1e();return le.createElement(uB,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var hB=(...e)=>e.filter(Boolean).join(" "),ew=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),X1e=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Z1e=50,lL=300;function Q1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function nge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr($??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),ke=C.exports.useRef(null),ct=C.exports.useRef(null),Ge=C.exports.useRef(null),ot=C.exports.useCallback(Ee=>Ee.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(Ee=>j?.(Ee)??Ee,[j]),et=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);rd(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(ot(Ot))}},[Ze,ot]);const Tt=C.exports.useCallback((Ee=a)=>{Se&&te(Ee)},[te,Se,a]),xt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Le=Q1e(Tt,xt);sL(ct,"disabled",Le.stop,Le.isSpinning),sL(Ge,"disabled",Le.stop,Le.isSpinning);const st=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const ze=Ze(Ee.currentTarget.value);Z(ot(ze)),ke.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Z,ot,Ze]),At=C.exports.useCallback(Ee=>{var Ot;V?.(Ee),ke.current&&(Ee.target.selectionStart=ke.current.start??((Ot=Ee.currentTarget.value)==null?void 0:Ot.length),Ee.currentTarget.selectionEnd=ke.current.end??Ee.currentTarget.selectionStart)},[V]),Xe=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;tge(Ee,Q)||Ee.preventDefault();const Ot=yt(Ee)*a,ze=Ee.key,an={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[ze];an&&(Ee.preventDefault(),an(Ee))},[Q,a,Tt,xt,Z,i,o]),yt=Ee=>{let Ot=1;return(Ee.metaKey||Ee.ctrlKey)&&(Ot=.1),Ee.shiftKey&&(Ot=10),Ot},cn=C.exports.useMemo(()=>{const Ee=K?.(G.value);if(Ee!=null)return Ee;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let Ee=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(Ee=o),G.cast(Ee))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&wt()},[n,ye,wt]),_n=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=De.current)==null||Ee.focus()})},[t]),vn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Le.up(),_n()},[_n,Le]),Ie=C.exports.useCallback(Ee=>{Ee.preventDefault(),Le.down(),_n()},[_n,Le]);Uf(()=>De.current,"wheel",Ee=>{var Ot;const lt=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!lt)return;Ee.preventDefault();const an=yt(Ee)*a,Nn=Math.sign(Ee.deltaY);Nn===-1?Tt(an):Nn===1&&xt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Ot=null)=>{const ze=l||r&&G.isAtMax;return{...Ee,ref:Bn(Ot,ct),role:"button",tabIndex:-1,onPointerDown:ol(Ee.onPointerDown,lt=>{lt.button!==0||ze||vn(lt)}),onPointerLeave:ol(Ee.onPointerLeave,Le.stop),onPointerUp:ol(Ee.onPointerUp,Le.stop),disabled:ze,"aria-disabled":ew(ze)}},[G.isAtMax,r,vn,Le.stop,l]),Xt=C.exports.useCallback((Ee={},Ot=null)=>{const ze=l||r&&G.isAtMin;return{...Ee,ref:Bn(Ot,Ge),role:"button",tabIndex:-1,onPointerDown:ol(Ee.onPointerDown,lt=>{lt.button!==0||ze||Ie(lt)}),onPointerLeave:ol(Ee.onPointerLeave,Le.stop),onPointerUp:ol(Ee.onPointerUp,Le.stop),disabled:ze,"aria-disabled":ew(ze)}},[G.isAtMin,r,Ie,Le.stop,l]),Yt=C.exports.useCallback((Ee={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:Bn(De,Ot),value:et(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":ew(h??G.isOutOfRange),"aria-valuetext":cn,autoComplete:"off",autoCorrect:"off",onChange:ol(Ee.onChange,st),onKeyDown:ol(Ee.onKeyDown,Xe),onFocus:ol(Ee.onFocus,At,()=>ye(!0)),onBlur:ol(Ee.onBlur,J,Ut)}),[E,m,p,M,T,et,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,cn,st,Xe,At,J,Ut]);return{value:et(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,ES]=wn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ige,Q7]=wn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),J7=Pe(function(t,n){const r=Ii("NumberInput",t),i=mn(t),o=w7(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:hB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});J7.displayName="NumberInput";var pB=Pe(function(t,n){const r=ES();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});pB.displayName="NumberInputStepper";var e8=Pe(function(t,n){const{getInputProps:r}=Q7(),i=r(t,n),o=ES();return le.createElement(we.input,{...i,className:hB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});e8.displayName="NumberInputField";var gB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),t8=Pe(function(t,n){const r=ES(),{getDecrementButtonProps:i}=Q7(),o=i(t,n);return x(gB,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});t8.displayName="NumberDecrementStepper";var n8=Pe(function(t,n){const{getIncrementButtonProps:r}=Q7(),i=r(t,n),o=ES();return x(gB,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});n8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=wn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[uge,n2]=wn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=yF(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(st=>`${st}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=vF({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=SF({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),ke=C.exports.useCallback((st={},At=null)=>{const Xe={...st,style:{...st.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Bn(R,At),children:De?st.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(st.onKeyDown,yt=>{n&&yt.key==="Escape"&&E()}),onBlur:al(st.onBlur,yt=>{const cn=uL(yt),wt=tw(R.current,cn),Ut=tw(I.current,cn);P&&t&&(!wt&&!Ut)&&E()}),"aria-labelledby":$?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(Xe.role="tooltip",Xe.onMouseEnter=al(st.onMouseEnter,()=>{N.current=!0}),Xe.onMouseLeave=al(st.onMouseLeave,yt=>{yt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),Xe},[De,Q,$,K,j,G,u,n,E,P,t,p,l,s]),ct=C.exports.useCallback((st={},At=null)=>X({...st,style:{visibility:P?"visible":"hidden",...st.style}},At),[P,X]),Ge=C.exports.useCallback((st,At=null)=>({...st,ref:Bn(At,M,Z)}),[M,Z]),ot=C.exports.useRef(),Ze=C.exports.useRef(),et=C.exports.useCallback(st=>{M.current==null&&Z(st)},[Z]),Tt=C.exports.useCallback((st={},At=null)=>{const Xe={...st,ref:Bn(I,At,et),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(Xe.onClick=al(st.onClick,T)),u===kp.hover&&(Xe.onFocus=al(st.onFocus,()=>{ot.current===void 0&&_()}),Xe.onBlur=al(st.onBlur,yt=>{const cn=uL(yt),wt=!tw(R.current,cn);P&&t&&wt&&E()}),Xe.onKeyDown=al(st.onKeyDown,yt=>{yt.key==="Escape"&&E()}),Xe.onMouseEnter=al(st.onMouseEnter,()=>{N.current=!0,ot.current=window.setTimeout(()=>_(),h)}),Xe.onMouseLeave=al(st.onMouseLeave,()=>{N.current=!1,ot.current&&(clearTimeout(ot.current),ot.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),Xe},[ie,P,Q,u,et,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{ot.current&&clearTimeout(ot.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((st={},At=null)=>({...st,id:K,ref:Bn(At,Xe=>{W(!!Xe)})}),[K]),Le=C.exports.useCallback((st={},At=null)=>({...st,id:G,ref:Bn(At,Xe=>{de(!!Xe)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:Ge,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:ct,getPopoverProps:ke,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function tw(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function r8(e){const t=Ii("Popover",e),{children:n,...r}=mn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}r8.displayName="Popover";function i8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}i8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(bS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},gge=we(Rl.section),mB=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});mB.displayName="PopoverTransition";var o8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(mB,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});o8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function a8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}a8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function vB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var yB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};yB.displayName="Shape";var NC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});NC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=vB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ne(yB,{size:n,isIndeterminate:v,children:[x(NC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(NC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=wn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=vB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),SB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=mn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},ne(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});SB.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var bB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});bB.displayName="SelectField";var xB=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=mn(e),[w,P]=Age(S,nQ),E=x7(P),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(bB,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(wB,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});xB.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),wB=e=>{const{children:t=x(Lge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};wB.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function CB(e){return!!e.touches}function Rge(e){return CB(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function _B(e,t="page"){return CB(e)?Dge(e,t):zge(e,t)}function Fge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Bge(e,t=!1){function n(i){e(i,{point:_B(i)})}return t?Fge(n):n}function B3(e,t,n,r){return Oge(e,t,Bge(n,t==="pointerdown"),r)}function kB(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:_B(e)},{timestamp:i}=WP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,nw(r,this.history)),this.removeListeners=Vge(B3(this.win,"pointermove",this.onPointerMove),B3(this.win,"pointerup",this.onPointerUp),B3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=nw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=WP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=nw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nw(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Hge(t,.1)}}var Wge=e=>e*1e3;function Hge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Wge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function rw(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return rw(e,t);if(dL(e)&&dL(t)){const n=rw(e.x,t.x),r=rw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function EB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=kB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return B3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function PB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=PB({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},vd=Zge({"../../../react-shim.js"(){}});vd();vd();vd();var Ia=e=>e?"":void 0,S0=e=>e?!0:void 0,yd=(...e)=>e.filter(Boolean).join(" ");vd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}vd();vd();function Qge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var $3={width:0,height:0},By=e=>e||$3;function TB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??$3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>By(w).height>By(P).height?w:P,$3):r.reduce((w,P)=>By(w).width>By(P).width?w:P,$3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...im({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function AB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=AB({isReversed:a,direction:s,orientation:l}),[j,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),ct=(W?De:X).map(We=>G4(We,t,n)),Ge=l==="vertical",ot=C.exports.useRef(null),Ze=C.exports.useRef(null),et=PB({getNodes(){const We=Ze.current,ft=We?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),st=C.exports.useCallback(We=>{var ft;if(!ot.current)return;Se.current.eventSource="pointer";const nt=ot.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ft=We.touches)==null?void 0:ft[0])??We,Qn=Ge?nt.bottom-Zt:Nt-nt.left,lo=Ge?nt.height:nt.width;let gi=Qn/lo;return W&&(gi=1-gi),Iz(gi,t,n)},[Ge,W,n,t]),At=(n-t)/10,Xe=S||(n-t)/100,yt=C.exports.useMemo(()=>({setValueAtIndex(We,ft){if(!Z)return;const nt=Se.current.valueBounds[We];ft=parseFloat(_C(ft,nt.min,Xe)),ft=m0(ft,nt.min,nt.max);const Nt=[...Se.current.value];Nt[We]=ft,de(Nt)},setActiveIndex:G,stepUp(We,ft=Xe){const nt=Se.current.value[We],Nt=W?nt-ft:nt+ft;yt.setValueAtIndex(We,Nt)},stepDown(We,ft=Xe){const nt=Se.current.value[We],Nt=W?nt+ft:nt-ft;yt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[Xe,W,de,Z]),cn=C.exports.useCallback(We=>{const ft=We.key,Nt={ArrowRight:()=>yt.stepUp(K),ArrowUp:()=>yt.stepUp(K),ArrowLeft:()=>yt.stepDown(K),ArrowDown:()=>yt.stepDown(K),PageUp:()=>yt.stepUp(K,At),PageDown:()=>yt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];yt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];yt.setValueAtIndex(K,Zt)}}[ft];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[yt,K,At,ye]),{getThumbStyle:wt,rootStyle:Ut,trackStyle:_n,innerTrackStyle:vn}=C.exports.useMemo(()=>TB({isReversed:W,orientation:l,thumbRects:et,thumbPercents:ct}),[W,l,ct,et]),Ie=C.exports.useCallback(We=>{var ft;const nt=We??K;if(nt!==-1&&M){const Nt=Le.getThumb(nt),Zt=(ft=Ze.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);rd(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=We=>{const ft=st(We)||0,nt=Se.current.value.map(gi=>Math.abs(gi-ft)),Nt=Math.min(...nt);let Zt=nt.indexOf(Nt);const Qn=nt.filter(gi=>gi===Nt);Qn.length>1&&ft>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),yt.setValueAtIndex(Zt,ft),Ie(Zt)},Xt=We=>{if(K==-1)return;const ft=st(We)||0;G(K),yt.setValueAtIndex(K,ft),Ie(K)};EB(Ze,{onPanSessionStart(We){!Z||(J(!0),Je(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ft=null)=>({...We,...R,id:Le.root,ref:Bn(ft,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ia(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),Ee=C.exports.useCallback((We={},ft=null)=>({...We,ref:Bn(ft,ot),id:Le.track,"data-disabled":Ia(h),style:{...We.style,..._n}}),[h,_n,Le]),Ot=C.exports.useCallback((We={},ft=null)=>({...We,ref:ft,id:Le.innerTrack,style:{...We.style,...vn}}),[vn,Le]),ze=C.exports.useCallback((We,ft=null)=>{const{index:nt,...Nt}=We,Zt=X[nt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:ft,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(nt),"data-active":Ia(V&&K===nt),"aria-valuetext":$?.(Zt)??P?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[nt],"aria-labelledby":E?.[nt]?void 0:_?.[nt],style:{...We.style,...wt(nt)},onKeyDown:b0(We.onKeyDown,cn),onFocus:b0(We.onFocus,()=>{Q(!0),G(nt)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,$,P,l,h,p,E,_,wt,cn,Q]),lt=C.exports.useCallback((We={},ft=null)=>({...We,ref:ft,id:Le.output,htmlFor:X.map((nt,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),an=C.exports.useCallback((We,ft=null)=>{const{value:nt,...Nt}=We,Zt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let lo=G4(nt,t,n);lo=W?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ia(h),"data-invalid":Ia(!Zt),"data-highlighted":Ia(Qn),style:{...We.style,...gi}}},[h,W,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ft=null)=>{const{index:nt,...Nt}=We;return{...Nt,ref:ft,id:Le.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(T)?T[nt]:`${T}-${nt}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>ct[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:yt,getRootProps:Yt,getTrackProps:Ee,getInnerTrackProps:Ot,getThumbProps:ze,getMarkerProps:an,getInputProps:Nn,getOutputProps:lt}}function eme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[tme,PS]=wn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[nme,s8]=wn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),LB=Pe(function(t,n){const r=Ii("Slider",t),i=mn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});LB.defaultProps={orientation:"horizontal"};LB.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=PS(),a=s8(),s=r(t,n);return le.createElement(we.div,{...s,className:yd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=PS(),i=s8(),o=r(t,n);return le.createElement(we.div,{...o,className:yd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=PS(),i=s8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=PS(),i=r(t,n);return le.createElement(we.div,{...i,className:yd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";vd();vd();function sme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=AB({isReversed:a,direction:s,orientation:l}),[W,j]=tS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0(W,t,n),te=n-Z+t,he=G4($?te:Z,t,n),ye=l==="vertical",Se=kB({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),ke=C.exports.useRef(null),ct=C.exports.useRef(null),Ge=C.exports.useId(),ot=u??Ge,[Ze,et]=[`slider-thumb-${ot}`,`slider-track-${ot}`],Tt=C.exports.useCallback(ze=>{var lt;if(!De.current)return;const an=Se.current;an.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ft}=((lt=ze.touches)==null?void 0:lt[0])??ze,nt=ye?Nn.bottom-ft:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=nt/Nt;$&&(Zt=1-Zt);let Qn=Iz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(_C(Qn,an.min,an.step))),Qn=m0(Qn,an.min,an.max),Qn},[ye,$,Se]),xt=C.exports.useCallback(ze=>{const lt=Se.current;!lt.isInteractive||(ze=parseFloat(_C(ze,lt.min,G)),ze=m0(ze,lt.min,lt.max),j(ze))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(ze=G){const lt=$?Z-ze:Z+ze;xt(lt)},stepDown(ze=G){const lt=$?Z+ze:Z-ze;xt(lt)},reset(){xt(o||0)},stepTo(ze){xt(ze)}}),[xt,$,Z,G,o]),st=C.exports.useCallback(ze=>{const lt=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(lt.min),End:()=>xt(lt.max)}[ze.key];Nn&&(ze.preventDefault(),ze.stopPropagation(),Nn(ze),lt.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,Xe=Kge(ke),{getThumbStyle:yt,rootStyle:cn,trackStyle:wt,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=Se.current,lt=Xe??{width:0,height:0};return TB({isReversed:$,orientation:ze.orientation,thumbRects:[lt],thumbPercents:[he]})},[$,Xe,he,Se]),_n=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var lt;return(lt=ke.current)==null?void 0:lt.focus()})},[Se]);rd(()=>{const ze=Se.current;_n(),ze.eventSource==="keyboard"&&N?.(ze.value)},[Z,N]);function vn(ze){const lt=Tt(ze);lt!=null&<!==Se.current.value&&j(lt)}EB(ct,{onPanSessionStart(ze){const lt=Se.current;!lt.isInteractive||(V(!0),_n(),vn(ze),R?.(lt.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(V(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||vn(ze)}});const Ie=C.exports.useCallback((ze={},lt=null)=>({...ze,...I,ref:Bn(lt,ct),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ia(J),style:{...ze.style,...cn}}),[I,h,J,cn]),Je=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:Bn(lt,De),id:et,"data-disabled":Ia(h),style:{...ze.style,...wt}}),[h,et,wt]),Xt=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:lt,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:Bn(lt,ke),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ia(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...ze.style,...yt(0)},onKeyDown:b0(ze.onKeyDown,st),onFocus:b0(ze.onFocus,()=>ie(!0)),onBlur:b0(ze.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,yt,st]),Ee=C.exports.useCallback((ze,lt=null)=>{const an=!(ze.valuen),Nn=Z>=ze.value,We=G4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:$?`${100-We}%`:`${We}%`},horizontal:{left:$?`${100-We}%`:`${We}%`}})};return{...ze,ref:lt,role:"presentation","aria-hidden":!0,"data-disabled":Ia(h),"data-invalid":Ia(!an),"data-highlighted":Ia(Nn),style:{...ze.style,...ft}}},[h,$,n,t,l,Z]),Ot=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:lt,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Ie,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:Ee,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t"}),[dme,AS]=wn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),l8=Pe((e,t)=>{const n=Ii("Slider",e),r=mn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:yd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});l8.defaultProps={orientation:"horizontal"};l8.displayName="Slider";var MB=Pe((e,t)=>{const{getThumbProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__thumb",e.className),__css:r.thumb})});MB.displayName="SliderThumb";var OB=Pe((e,t)=>{const{getTrackProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__track",e.className),__css:r.track})});OB.displayName="SliderTrack";var IB=Pe((e,t)=>{const{getInnerTrackProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});IB.displayName="SliderFilledTrack";var DC=Pe((e,t)=>{const{getMarkerProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__marker",e.className),__css:r.mark})});DC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,u8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Mz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});u8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function zC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,RB,pme,gme]=UN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=tS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=wn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=RB(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:zC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Bn(h,e.ref),isDisabled:t,isFocusable:n,onClick:zC(e.onClick,m)}),w="button";return{...S,id:NB(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":DB(a,u),onFocus:t?void 0:zC(e.onFocus,v)}}var[bme,xme]=wn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:DB(n,s),tabId:NB(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=SF({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function _me(){const e=r2(),t=RB(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Cs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function NB(e,t){return`${e}--tab-${t}`}function DB(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=wn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),zB=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});zB.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var FB=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});FB.displayName="TabPanel";var BB=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});BB.displayName="TabPanels";var $B=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});$B.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],WB=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=mn(e),a=x7(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});WB.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function FC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=HB(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function HB(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Dme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Fme(zme);function Fme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Bme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:VB(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=HB(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(ml.getState(),i).position)}}var pL=0;function Bme(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(kz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Pz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Tz,{id:u?.title,children:i}),s&&x(Ez,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function VB(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Wme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=VB(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...FC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...FC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=WN();return C.exports.useMemo(()=>Wme(t.direction,e),[e,t.direction])}var Hme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},UB=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Hme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();rd(()=>{v||r?.()},[v]),rd(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},FC(n,{id:t,onClose:P})))});UB.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=UB,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Rn,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Fg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},BC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=yF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=vF({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),$()},[$]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=BC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=BC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),ke=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>K4(K),"keydown",s?ke:void 0),Uf(()=>K4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const ct=C.exports.useCallback((Ze={},et=null)=>({...Ze,ref:Bn(K,et,W),onPointerEnter:Fg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Fg(Ze.onClick,Se),onPointerDown:Fg(Ze.onPointerDown,De),onFocus:Fg(Ze.onFocus,he),onBlur:Fg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,W]),Ge=C.exports.useCallback((Ze={},et=null)=>j({...Ze,style:{...Ze.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},et),[j,S,w]),ot=C.exports.useCallback((Ze={},et=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:et,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:ct,getTooltipProps:ot,getTooltipPositionerProps:Ge,getArrowProps:V,getArrowInnerProps:de}}var iw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(iw,t),()=>n.removeEventListener(iw,t)},[t,e]),()=>{const n=K4(e),r=BC(e);n.dispatchEvent(new r.CustomEvent(iw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=mn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const $=mQ(i,"colors",E);n[Wr.arrowBg.var]=$}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,_.getTriggerProps($.props,$.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?ne(Rn,{children:[M,x(pd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Rn,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(eF,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:ne(UR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(bF,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return ne(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:c8(e)?2:d8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function GB(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function jB(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function c8(e){return ive&&e instanceof Map}function d8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function f8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qB(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return h8(r,!0)},!0)),e}function Jme(){Ss(2)}function p8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=VC[e];return t||Ss(18,e),t}function eve(e,t){VC[e]||(VC[e]=t)}function $C(){return Mv}function ow(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){WC(e),e.p.forEach(tve),e.p=null}function WC(e){e===Mv&&(Mv=e.l)}function gL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function aw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),Ss(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Z4(t,n,[]),X4(t),t.u&&t.v(t.u,t.s),e!==YB?e:void 0}function Z4(e,t,n){if(p8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Q4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=f8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),Q4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(ad(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(GB(n,r,a),!ad(a))return;e.m=!1}if(wu(i)&&!p8(i)){if(!e.h.F&&e._<1)return;Z4(e,i),t&&t.A.l||Q4(e,i)}}function Q4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&h8(t,n)}function sw(e,t){var n=e[tr];return(n?bf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Rc(e){e.P||(e.P=!0,e.l&&Rc(e.l))}function lw(e){e.o||(e.o=f8(e.t))}function HC(e,t,n){var r=c8(t)?El("MapSet").N(t,n):d8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:$C(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:$C()).p.push(r),r}function nve(e){return ad(e)||Ss(22,e),function t(n){if(!wu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||GB(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f8(e)}function rve(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Rc(s);break;case 4:n(s)&&Rc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!jB(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=El("Patches").$;return ad(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new sve,KB=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(m8)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error($i(12));if(typeof n(void 0,{type:J4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function XB(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function e5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return t5}function i(s,l){r(s)===t5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var hve=function(t,n){return t===n};function pve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;t$.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=t$})(e$);var n$={exports:{}},r$={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var MS=C.exports,Qve=e$.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=MS.useRef,r2e=MS.useEffect,i2e=MS.useMemo,o2e=MS.useDebugValue;r$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=r$})(n$);function a2e(e){e()}let i$=a2e;const s2e=e=>i$=e,l2e=()=>i$,sd=C.exports.createContext(null);function o$(){return C.exports.useContext(sd)}const u2e=()=>{throw new Error("uSES not initialized!")};let a$=u2e;const c2e=e=>{a$=e},d2e=(e,t)=>e===t;function f2e(e=sd){const t=e===sd?o$:()=>C.exports.useContext(e);return function(r,i=d2e){const{store:o,subscription:a,getServerState:s}=t(),l=a$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const h2e=f2e();var p2e={exports:{}},Mn={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var y8=Symbol.for("react.element"),S8=Symbol.for("react.portal"),OS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),RS=Symbol.for("react.profiler"),NS=Symbol.for("react.provider"),DS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),zS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),BS=Symbol.for("react.suspense_list"),$S=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),s$;s$=Symbol.for("react.module.reference");function Ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case y8:switch(e=e.type,e){case OS:case RS:case IS:case FS:case BS:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case DS:case zS:case WS:case $S:case NS:return e;default:return t}}case S8:return t}}}Mn.ContextConsumer=DS;Mn.ContextProvider=NS;Mn.Element=y8;Mn.ForwardRef=zS;Mn.Fragment=OS;Mn.Lazy=WS;Mn.Memo=$S;Mn.Portal=S8;Mn.Profiler=RS;Mn.StrictMode=IS;Mn.Suspense=FS;Mn.SuspenseList=BS;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return Ya(e)===DS};Mn.isContextProvider=function(e){return Ya(e)===NS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===y8};Mn.isForwardRef=function(e){return Ya(e)===zS};Mn.isFragment=function(e){return Ya(e)===OS};Mn.isLazy=function(e){return Ya(e)===WS};Mn.isMemo=function(e){return Ya(e)===$S};Mn.isPortal=function(e){return Ya(e)===S8};Mn.isProfiler=function(e){return Ya(e)===RS};Mn.isStrictMode=function(e){return Ya(e)===IS};Mn.isSuspense=function(e){return Ya(e)===FS};Mn.isSuspenseList=function(e){return Ya(e)===BS};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===OS||e===RS||e===IS||e===FS||e===BS||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===$S||e.$$typeof===NS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===s$||e.getModuleId!==void 0)};Mn.typeOf=Ya;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function y2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||sd).Provider,{value:i,children:n})}function l$(e=sd){const t=e===sd?o$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=l$();function C2e(e=sd){const t=e===sd?w2e:l$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(n$.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var b8="persist:",u$="persist/FLUSH",x8="persist/REHYDRATE",c$="persist/PAUSE",d$="persist/PERSIST",f$="persist/PURGE",h$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:b8).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=O2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:b8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ou(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function z2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var F2e=5e3;function B2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:F2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===d$){var P=!1,E=function(z,$){P||(p.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return ou({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,W){return Promise.resolve($)};z(N,n).then(function($){E($)},function($){E(void 0,$)})},function(N){E(void 0,N)}),ou({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===f$)return s=!0,p.result(I2e(e)),ou({},t(w,p),{_persist:v});if(p.type===u$)return p.result(a&&a.flush()),ou({},t(w,p),{_persist:v});if(p.type===c$)l=!0;else if(p.type===x8){if(s)return ou({},w,{_persist:ou({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=ou({},M,{_persist:ou({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(ou({},R,{_persist:v}))}}function IL(e){return H2e(e)||W2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function W2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function H2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:p$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case h$:return GC({},t,{registry:[].concat(IL(t.registry),[n.key])});case x8:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),GC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=m8(U2e,p$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:h$,key:u})},a=function(u,h,p){var m={type:x8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=GC({},i,{purge:function(){var u=[];return e.dispatch({type:f$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:c$})},persist:function(){e.dispatch({type:d$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var w8={},C8={};C8.__esModule=!0;C8.default=q2e;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function hw(){}var j2e={getItem:hw,setItem:hw,removeItem:hw};function Y2e(e){if((typeof self>"u"?"undefined":H3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}w8.__esModule=!0;w8.default=Z2e;var K2e=X2e(C8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var g$=void 0,Q2e=J2e(w8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");g$=eye;var m$={},v$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var _8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(_8);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=nh,n=_8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths. + + ${JSON.stringify(Z)} + + ${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(te)} + + ${G}`)};e.singleTransformValidator=z;const $=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const W=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=W;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. + + ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(v$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...$,...W,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(m$);const V3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return k8(r)?r:!1},k8=e=>Boolean(typeof e=="string"?tye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),r5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",ke="[object Array]",ct="[object AsyncFunction]",Ge="[object Boolean]",ot="[object Date]",Ze="[object DOMException]",et="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",st="[object Number]",At="[object Null]",Xe="[object Object]",yt="[object Promise]",cn="[object Proxy]",wt="[object RegExp]",Ut="[object Set]",_n="[object String]",vn="[object Symbol]",Ie="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",Ee="[object DataView]",Ot="[object Float32Array]",ze="[object Float64Array]",lt="[object Int8Array]",an="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ft="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),ya=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Nu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),Du=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,zu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qa=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,Ka="\\ud800-\\udfff",zl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",Bl=zl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",yn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ds+No+kn+yn,zo="['\u2019]",zs="["+Ka+"]",Gr="["+Ur+"]",Xa="["+Bl+"]",Td="\\d+",$l="["+_h+"]",Za="["+Fu+"]",Ad="[^"+Ka+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Xa+"|"+mi+")",Eh="[^"+Ka+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",Wl="(?:"+Za+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",Bu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",$u="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+Cr+"]?",Sa="(?:"+Bs+"(?:"+[Eh,Ld,Fs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wt=Wu+Md+Sa,Ph="(?:"+[$l,Ld,Fs].join("|")+")"+Wt,Hu="(?:"+[Eh+Xa+"?",Xa,Ld,Fs,zs].join("|")+")",Vu=RegExp(zo,"g"),Th=RegExp(Xa,"g"),Fo=RegExp(mi+"(?="+mi+")|"+Hu+Wt,"g"),Hn=RegExp([uo+"?"+Za+"+"+Bu+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+$u+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+Bu,uo+"+"+$u,Hl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Bs+Ka+Bl+Cr+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lh=-1,sn={};sn[Ot]=sn[ze]=sn[lt]=sn[an]=sn[Nn]=sn[We]=sn[ft]=sn[nt]=sn[Nt]=!0,sn[De]=sn[ke]=sn[Yt]=sn[Ge]=sn[Ee]=sn[ot]=sn[et]=sn[Tt]=sn[Le]=sn[st]=sn[Xe]=sn[wt]=sn[Ut]=sn[_n]=sn[Je]=!1;var Ht={};Ht[De]=Ht[ke]=Ht[Yt]=Ht[Ee]=Ht[Ge]=Ht[ot]=Ht[Ot]=Ht[ze]=Ht[lt]=Ht[an]=Ht[Nn]=Ht[Le]=Ht[st]=Ht[Xe]=Ht[wt]=Ht[Ut]=Ht[_n]=Ht[vn]=Ht[We]=Ht[ft]=Ht[nt]=Ht[Nt]=!0,Ht[et]=Ht[Tt]=Ht[Je]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,qe=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=fn&&fn.isArrayBuffer,co=fn&&fn.isDate,Gi=fn&&fn.isMap,ba=fn&&fn.isRegExp,$s=fn&&fn.isSet,I1=fn&&fn.isTypedArray;function vi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je-1;);return ve}function Qa(oe,xe){for(var ve=oe.length;ve--&&ju(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var v2=Fd(Mh),Ja=Fd(O1);function Hs(oe){return"\\"+re[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Ul(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function y2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Wo(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve-1}function z2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Ho.prototype.clear=N2,Ho.prototype.delete=D2,Ho.prototype.get=Z1,Ho.prototype.has=Q1,Ho.prototype.set=z2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,B){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,B):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Me=si(c),Ue=Me==Tt||Me==xt;if(bc(c))return Js(c,ee);if(Me==Xe||Me==De||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?mg(c,cc(Y,c)):yo(c,Qe(Y,c))}else{if(!Ht[Me])return D?c:{};Y=nU(c,Me,ee)}}B||(B=new vr);var dt=B.get(c);if(dt)return dt;B.set(c,Y),Jk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,B))}):Zk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,B))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,B))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],B=g[D],Y=c[D];if(Y===n&&!(D in c)||!B(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function dc(c,g,b,L){var D=-1,B=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,_r(b))),L?(B=Oh,Y=!1):g.length>=i&&(B=qu,Y=!1,g=new _a(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(ee)?g>1?Er(ee,g-1,b,L,D):xa(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return Jl(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&en.call(c,g)}function Qh(c,g){return c!=null&&g in ln(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new _a(Y&&_e):n}_e=c[0];var Me=-1,Ue=ee[0];e:for(;++Me-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==B){var B=D;Ql(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+jl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,B=mr(Kd((g-c)/(b||1)),0),Y=ve(B);B--;)Y[L?B:++D]=c,c+=b;return Y}function vc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=jl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Ob(Pk(c,g,xo),c+"")}function ip(c){return uc(mp(c))}function rf(c,g){var b=mp(c);return G2(b,ql(g,0,b.length))}function Xl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,B=g.length,Y=B-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var B=ve(D);++L>>1,Y=c[B];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:H(c);if(Ce)return Hd(Ce);Y=!1,D=qu,ce=new _a}else ce=g?[]:ee;e:for(;++L=L?c:Tr(c,g,b)}var fg=C2||function(c){return mt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=Ju?Ju(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Zl(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,qa.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?ln(Zd.call(c)):{}}function H2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,B=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!B&&c>g||B&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!B&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function V2(c,g,b,L){for(var D=-1,B=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(B-Y,0),_e=ve(ce+Ce),Me=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(B=c.length>3&&typeof B=="function"?(D--,B):n,Y&&Zi(b[0],b[1],Y)&&(B=D<3?n:B,D=1),g=ln(g);++L-1?D[B?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var B=g[L];if(typeof B!="function")throw new yi(a);if(D&&!Y&&be(B)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=B.get(c),_e=B.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Me=-1,Ue=!0,dt=b&w?new _a:n;for(B.set(c,g),B.set(g,c);++Me1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{ +/* [wrapped with `+g+`] */ +`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Ql(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function G2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Bk(c,b)});function $k(c){var g=F(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function j2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(B){return Uh(B,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Ql(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:j2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(B){return g&&!B.length&&B.push(n),B}))});function vG(){return $k(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Ik(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:j2,args:[Ib],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Ib)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Ae(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Ae(g,3))}var PG=vg(Rk),TG=vg(Nk);function AG(c,g){return Er(Y2(c,g),1)}function LG(c,g){return Er(Y2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Er(Y2(c,g),b)}function Wk(c,g){var b=Rt(c)?Vn:ns;return b(c,Ae(g,3))}function Hk(c,g){var b=Rt(c)?fo:Yh;return b(c,Ae(g,3))}var OG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),Q2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&ju(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",B=So(c)?ve(c.length):[];return ns(c,function(Y){B[++L]=D?vi(g,Y,b):rs(Y,g,b)}),B}),NG=dp(function(c,g,b){Uo(c,b,g)});function Y2(c,g){var b=Rt(c)?zn:Sr;return b(c,Ae(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function FG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Ae(g,4),b,D,ns)}function BG(c,g,b){var L=Rt(c)?h2:Ih,D=arguments.length<3;return L(c,Ae(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,X2(Ae(g,3)))}function WG(c){var g=Rt(c)?uc:ip;return g(c)}function HG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?_b:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return Q2(c)?wa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Pr(c).length}function GG(c,g,b){var L=Rt(c)?Uu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Ae(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Er(g,1),[])}),q2=_2||function(){return mt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Nb=_t(function(c,g,b){var L=P;if(b.length){var D=Wo(b,He(Nb));L|=I}return pe(c,L,g,b,D)}),Gk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Wo(b,He(Gk));L|=I}return pe(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,B,Y,ee,ce,Ce=0,_e=!1,Me=!1,Ue=!0;if(typeof c!="function")throw new yi(a);g=Pa(g)||0,sr(b)&&(_e=!!b.leading,Me="maxWait"in b,B=Me?mr(Pa(b.maxWait)||0,g):B,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var ls=L,tu=D;return L=D=n,Ce=Lr,Y=c.apply(tu,ls),Y}function St(Lr){return Ce=Lr,ee=xg(jt,g),_e?dt(Lr):Y}function $t(Lr){var ls=Lr-ce,tu=Lr-Ce,hE=g-ls;return Me?qr(hE,B-tu):hE}function bt(Lr){var ls=Lr-ce,tu=Lr-Ce;return ce===n||ls>=g||ls<0||Me&&tu>=B}function jt(){var Lr=q2();if(bt(Lr))return Jt(Lr);ee=xg(jt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(q2())}function Zo(){var Lr=q2(),ls=bt(Lr);if(L=arguments,D=this,ce=Lr,ls){if(ee===n)return St(ce);if(Me)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Pa(g)||0,b)});function XG(c){return pe(c,$)}function K2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],B=b.cache;if(B.has(D))return B.get(D);var Y=c.apply(this,L);return b.cache=B.set(D,Y)||B,Y};return b.cache=new(K2.Cache||Vo),b}K2.Cache=Vo;function X2(c){if(typeof c!="function")throw new yi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function ZG(c){return Uk(2,c)}var QG=Pb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],_r(Ae())):zn(Er(g,1),_r(Ae()));var b=g.length;return _t(function(L){for(var D=-1,B=qr(L.length,b);++D=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,hj=jr?_r(jr):og;function So(c){return c!=null&&Z2(c.length)&&!Jl(c)}function Ar(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==Ge}var bc=k2||Yb,gj=co?_r(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||bc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function yj(c,g){return hc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?hc(c,g,n,b):!!L}function zb(c){if(!br(c))return!1;var g=oi(c);return g==et||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function Jl(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==ct||g==cn}function Xk(c){return typeof c=="number"&&c==Dt(c)}function Z2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Gi?_r(Gi):Eb;function xj(c,g){return c===g||pc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,pc(c,g,Et(g),b)}function Cj(c){return Qk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&oi(c)==st}function wg(c){if(!br(c)||oi(c)!=Xe)return!1;var g=ec(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Fb=ba?_r(ba):or;function Pj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=$s?_r($s):Ft;function Q2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==_n}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==vn}var gp=I1?_r(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==Je}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return Q2(c)?Ni(c):Ci(c);if(tc&&c[tc])return y2(c[tc]());var g=si(c),b=g==Le?Dh:g==Ut?Hd:mp;return b(c)}function eu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=eu(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?ql(Dt(c),0,X):0}function Pa(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?qe(c.slice(2),b?2:8):_1.test(c)?te:+c}function nE(c){return ka(c,bo(c))}function Ij(c){return c?ql(Dt(c),-G,G):c===0?c:0}function bn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){ka(g,li(g),c);return}for(var b in g)en.call(g,b)&&Gs(c,b,g[b])}),rE=Xi(function(c,g){ka(g,bo(g),c)}),J2=Xi(function(c,g,b,L){ka(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){ka(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=Yl(c);return g==null?b:Qe(b,g)}var Fj=_t(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b1),B}),ka(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return oE(c,X2(Ae(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function oE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Ae(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Wb(bn(c).toLowerCase())}function uE(c){return c=bn(c),c&&c.replace(A1,v2).replace(Th,"")}function mY(c,g,b){c=bn(c),g=Ki(g);var L=c.length;b=b===n?L:ql(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=bn(c),c&&ya.test(c)?c.replace(Os,Ja):c}function yY(c){return c=bn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(jl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;return g&&L>>0,b?(c=bn(c),c&&(typeof g=="string"||g!=null&&!Fb(g))&&(g=Ki(g),!g&&Ul(c))?os(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Wb(g)});function MY(c,g,b){return c=bn(c),b=b==null?0:ql(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=F.templateSettings;b&&Zi(c,g,b)&&(g=n),c=bn(c),g=J2({},g,L,Ne);var D=J2({},g.imports,L.imports,Ne),B=li(D),Y=Wd(D,B),ee,ce,Ce=0,_e=g.interpolate||Rs,Me="__p += '",Ue=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Nu?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` +`;c.replace(Ue,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Me+=c.slice(Ce,Zo).replace(L1,Hs),jt&&(ee=!0,Me+=`' + +__e(`+jt+`) + +'`),Qi&&(ce=!0,Me+=`'; +`+Qi+`; +__p += '`),Jt&&(Me+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),Ce=Zo+bt.length,bt}),Me+=`'; +`;var St=en.call(g,"variable")&&g.variable;if(!St)Me=`with (obj) { +`+Me+` +} +`;else if(x1.test(St))throw new kt(s);Me=(ce?Me.replace(Zt,""):Me).replace(Qn,"$1").replace(lo,"$1;"),Me="function("+(St||"obj")+`) { +`+(St?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Me+`return __p +}`;var $t=dE(function(){return Qt(B,dt+"return "+Me).apply(n,Y)});if($t.source=Me,zb($t))throw $t;return $t}function IY(c){return bn(c).toLowerCase()}function RY(c){return bn(c).toUpperCase()}function NY(c,g,b){if(c=bn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),B=$o(L,D),Y=Qa(L,D)+1;return os(L,B,Y).join("")}function DY(c,g,b){if(c=bn(c),c&&(b||g===n))return c.slice(0,F1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Qa(L,Ni(g))+1;return os(L,0,D).join("")}function zY(c,g,b){if(c=bn(c),c&&(b||g===n))return c.replace(Du,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return os(L,D).join("")}function FY(c,g){var b=W,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=bn(c);var B=c.length;if(Ul(c)){var Y=Ni(c);B=Y.length}if(b>=B)return c;var ee=b-wa(L);if(ee<1)return L;var ce=Y?os(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Fb(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,bn(qa.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Me=Ce.index;ce=ce.slice(0,Me===n?ee:Me)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function BY(c){return c=bn(c),c&&m1.test(c)?c.replace(gi,x2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Wb=hp("toUpperCase");function cE(c,g,b){return c=bn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var dE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return zb(b)?b:new kt(b)}}),WY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Nb(c[b],c))}),c});function HY(c){var g=c==null?0:c.length,b=Ae();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++DG)return[];var b=X,L=qr(c,X);g=Ae(g),c-=X;for(var D=$d(L,g);++b0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=F[L?"take"+(g=="last"?"Right":""):g],B=L||/^find/.test(g);!D||(F.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Me=function(jt){var Jt=D.apply(F,xa([jt],ee));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,St=B&&!Ue,$t=ce&&!dt;if(!B&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:j2,args:[Me],thisArg:n}),new Yi(bt,Ue)}return St&&$t?c.apply(this,ee):(bt=this.thru(Me),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Xu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var B=this.value();return g.apply(Rt(B)?B:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=F[g];if(b){var L=b.name+"";en.call(es,L)||(es[L]=[]),es[L].push({name:g,func:b})}}),es[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=L2,F.prototype.at=mG,F.prototype.chain=vG,F.prototype.commit=yG,F.prototype.next=SG,F.prototype.plant=xG,F.prototype.reverse=wG,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=CG,F.prototype.first=F.prototype.head,tc&&(F.prototype[tc]=bG),F},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Pt._=Ca):mt._=Ca}).call(ys)})(Zr,Zr.exports);const it=Zr.exports;var rye=Object.create,y$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&y$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},S$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?y$(n,"default",{value:e,enumerable:!0}):n,e)),uye=Fe((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),b$=Fe((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),HS=Fe((e,t)=>{var n=b$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=Fe((e,t)=>{var n=HS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),dye=Fe((e,t)=>{var n=HS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=Fe((e,t)=>{var n=HS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=Fe((e,t)=>{var n=HS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),VS=Fe((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=VS();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=Fe((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=Fe((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),x$=Fe((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Tu=Fe((e,t)=>{var n=x$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),E8=Fe((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=Fe((e,t)=>{var n=E8(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=Fe((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),US=Fe((e,t)=>{var n=E8(),r=yye(),i=Sye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),w$=Fe((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),C$=Fe((e,t)=>{var n=US(),r=w$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),bye=Fe((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=Fe((e,t)=>{var n=bye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),_$=Fe((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),wye=Fe((e,t)=>{var n=C$(),r=xye(),i=w$(),o=_$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Cye=Fe((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=Fe((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),P8=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),GS=Fe((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=Fe((e,t)=>{var n=GS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=Fe((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Eye=Fe((e,t)=>{var n=GS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),Pye=Fe((e,t)=>{var n=GS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),Tye=Fe((e,t)=>{var n=GS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Aye=Fe((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Aye(),r=VS(),i=P8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=Fe((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),jS=Fe((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=Fe((e,t)=>{var n=jS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=Fe((e,t)=>{var n=jS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=Fe((e,t)=>{var n=jS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=Fe((e,t)=>{var n=jS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),k$=Fe((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=VS(),r=P8(),i=k$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=VS(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Fye=Fe((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Bye=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=Fe((e,t)=>{var n=k$(),r=Fye(),i=Bye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),E$=Fe((e,t)=>{var n=$ye(),r=Wye(),i=Hye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Gye=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jye=Fe((e,t)=>{var n=E8(),r=Vye(),i=b$(),o=E$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,j,de,V,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!V(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=$.size&&!Q)return!1;var K=J.get(z);if(K)return K==$;j|=u,J.set(z,$);var G=o(ie(z),ie($),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),Yye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),qye=Fe((e,t)=>{var n=Yye(),r=T8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Zye=Fe((e,t)=>{var n=Kye(),r=Xye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Qye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=Fe((e,t)=>{var n=US(),r=YS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=Fe((e,t)=>{var n=Jye(),r=YS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),t3e=Fe((e,t)=>{function n(){return!1}t.exports=n}),P$=Fe((e,t)=>{var n=Tu(),r=t3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),n3e=Fe((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=Fe((e,t)=>{var n=US(),r=T$(),i=YS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[$]=V[W]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=Fe((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=Fe((e,t)=>{var n=x$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),A$=Fe((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=Fe((e,t)=>{var n=Qye(),r=e3e(),i=T8(),o=P$(),a=n3e(),s=A$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=Fe((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),l3e=Fe((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=Fe((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=Fe((e,t)=>{var n=s3e(),r=u3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),d3e=Fe((e,t)=>{var n=C$(),r=T$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=Fe((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=Fe((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=Fe((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=Fe((e,t)=>{var n=g3e(),r=P8(),i=m3e(),o=v3e(),a=y3e(),s=US(),l=_$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=Fe((e,t)=>{var n=zye(),r=E$(),i=jye(),o=p3e(),a=S3e(),s=T8(),l=P$(),u=A$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),$=N?m:a(E),W=z?m:a(_);$=$==p?v:$,W=W==p?v:W;var j=$==v,de=W==v,V=$==W;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,$,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=Fe((e,t)=>{var n=b3e(),r=YS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),L$=Fe((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function pw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return M$(e,["input","textarea","select"])}function M$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function P3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=S$(L$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function gt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!M$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||pw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){NL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&pw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&pw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}S$(L$());var jC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>jC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of jC)r.keys?.every(i=>n.keys?.includes(i))&&jC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const F3e=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),B3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),$3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),W3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),H3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Hi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e))(Hi||{});const V3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},aa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(u8,{className:"invokeai__switch-root",...s})]})})};function A8(){const e=Te(i=>i.system.isGFPGANAvailable),t=Te(i=>i.options.shouldRunFacetool),n=Ke();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(aa,{isDisabled:!e,isChecked:t,onChange:i=>n(rke(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=it.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(hi,{..._,children:ne(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(J7,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(e8,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(n8,{...E,className:"invokeai__number-input-stepper-button"}),x(t8,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Sd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ne(gd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(xB,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],j3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],L8=0,M8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ht(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ht(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),qS=()=>{const e=Ke(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Te(X3e),{isGFPGANAvailable:i}=Te(Z3e),o=l=>e(q3(l)),a=l=>e(fV(l)),s=l=>e(K3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(Sd,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Ke(),t=Te(r=>r.options.shouldFitToWidthHeight);return x(aa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var O$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(O$),Qc=globalThis&&globalThis.__assign||function(){return Qc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function bs(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const ke=it.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String(ke)),l(ke)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return ne(gd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...$,children:r}),ne(qz,{w:"100%",gap:2,children:[ne(l8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Rn,{children:[x(DC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(DC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(OB,{className:"invokeai__slider_track",...j,children:x(IB,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(MB,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(J7,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(e8,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),ne(pB,{...ie,children:[x(n8,{className:"invokeai__slider-number-stepper"}),x(t8,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(vt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(O8,{}),onClick:Se,isDisabled:M,...K})]})]})}function R$(e){const{label:t="Strength",styleClass:n}=e,r=Te(s=>s.options.img2imgStrength),i=Ke();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(x9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(x9(.5))}})}const N$=()=>x(Pu,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Ke(),t=Te(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(aa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(pV(r.target.checked))})})},s4e=()=>{const e=Ke(),t=Te(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(aa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},D$=()=>ne(nn,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),I8=()=>x(Pu,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Ke(),t=Te(r=>r.options.shouldRandomizeSeed);return x(aa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(tke(r.target.checked))})}function u4e(){const e=Te(o=>o.options.seed),t=Te(o=>o.options.shouldRandomizeSeed),n=Te(o=>o.options.shouldGenerateVariations),r=Ke(),i=o=>r(d2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:L8,max:M8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const z$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Ke(),t=Te(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(d2(z$(L8,M8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Ke(),t=Te(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(ake(r)),value:t,isInteger:!1})}function f4e(){const e=Ke(),t=Te(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(K8e(r)),value:t,isInteger:!1})}const R8=()=>ne(nn,{gap:2,direction:"column",children:[x(l4e,{}),ne(nn,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(nn,{gap:2,children:x(d4e,{})}),x(nn,{gap:2,children:x(f4e,{})})]});function N8(){const e=Te(i=>i.system.isESRGANAvailable),t=Te(i=>i.options.shouldRunESRGAN),n=Ke();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(aa,{isDisabled:!e,isChecked:t,onChange:i=>n(nke(i.target.checked))})]})}const h4e=ht(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ht(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),KS=()=>{const e=Ke(),{upscalingLevel:t,upscalingStrength:n}=Te(h4e),{isESRGANAvailable:r}=Te(p4e);return ne("div",{className:"upscale-options",children:[x(Sd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(w9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(C9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Te(r=>r.options.shouldGenerateVariations),t=Ke();return x(aa,{isChecked:e,width:"auto",onChange:r=>t(Z8e(r.target.checked))})}function D8(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(P7,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Te(i=>i.options.seedWeights),t=Te(i=>i.options.shouldGenerateVariations),n=Ke(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(k8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Te(i=>i.options.variationAmount),t=Te(i=>i.options.shouldGenerateVariations),n=Ke();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(ske(i)),isInteger:!1})}const z8=()=>ne(nn,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]}),La=e=>{const{label:t,styleClass:n,...r}=e;return x(Oz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function F8(){const e=Te(r=>r.options.showAdvancedOptions),t=Ke();return x(La,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(ike(r.target.checked)),isChecked:e})}function S4e(){const e=Ke(),t=Te(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(dV(r)),value:t,width:B8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ht(e=>e.options,e=>mb[e.activeTab],{memoizeOptions:{equalityCheck:it.isEqual}}),b4e=ht(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),F$=e=>e.options;function x4e(){const e=Te(i=>i.options.height),t=Te(Rr),n=Ke();return x(Sd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(hV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ht([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function C4e(){const e=Ke(),{iterations:t,mayGenerateMultipleImages:n}=Te(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Y8e(i)),value:t,width:B8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Te(r=>r.options.sampler),t=Ke();return x(Sd,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Ke(),t=Te(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:B8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Te(i=>i.options.width),t=Te(Rr),n=Ke();return x(Sd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const B8="auto";function $8(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),ne("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},B$=LS({name:"system",initialState:P4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:T4e,setIsProcessing:pu,addLogEntry:Co,setShouldShowLogViewer:gw,setIsConnected:FL,setSocketId:UPe,setShouldConfirmOnDelete:$$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:U3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:BL,errorSeen:W$,setModelList:$L,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:F4e,setProcessingIndeterminateTask:B4e}=B$.actions,$4e=B$.reducer;function W4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function H4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function H$(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function V4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function U4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const G4e=ht(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Te(G4e),{text:r}=V3e[t];return n?ne(r8,{trigger:"hover",children:[x(a8,{children:x(Pu,{children:e})}),ne(o8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(i8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=W4e},n)=>x(j4e,{feature:e,children:x(Pu,{ref:n,children:x(va,{as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return ne(zf,{className:"advanced-settings-item",children:[x("h2",{children:ne(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Ff,{className:"advanced-settings-panel",children:r})]})}const W8=e=>{const{accordionInfo:t}=e,n=Te(a=>a.system.openAccordions),r=Ke();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function X4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function Z4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function V$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function U$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function Q4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function J4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function e5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function t5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function n5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function H8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function G$(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function XS(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function r5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function j$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function i5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function o5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function a5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function s5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function l5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function u5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function c5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function d5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function f5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function h5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function p5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function g5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function m5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function v5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function y5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function Y$(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function S5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function b5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function WL(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function q$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function x5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function c1(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function w5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function V8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function C5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function U8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const _5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],G8=e=>e.kind==="line"&&e.layer==="mask",k5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",E5e=e=>e.kind==="line",$n=e=>e.canvas,Au=e=>e.canvas.layerState.stagingArea.images.length>0,K$=e=>e.canvas.layerState.objects.find(i5),X$=ht([e=>e.options,e=>e.system,K$,Rr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(k8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:it.isEqual,resultEqualityCheck:it.isEqual}}),YC=Jr("socketio/generateImage"),P5e=Jr("socketio/runESRGAN"),T5e=Jr("socketio/runFacetool"),A5e=Jr("socketio/deleteImage"),qC=Jr("socketio/requestImages"),HL=Jr("socketio/requestNewImages"),L5e=Jr("socketio/cancelProcessing"),M5e=Jr("socketio/requestSystemConfig"),Z$=Jr("socketio/requestModelChange"),O5e=Jr("socketio/saveStagingAreaImageToGallery"),I5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Q$(e){const{iconButton:t=!1,...n}=e,r=Ke(),{isReady:i}=Te(X$),o=Te(Rr),a=()=>{r(YC(o))};return gt(["ctrl+enter","meta+enter"],()=>{i&&r(YC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(vt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const R5e=ht(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:it.isEqual}});function J$(e){const{...t}=e,n=Ke(),{isProcessing:r,isConnected:i,isCancelable:o}=Te(R5e),a=()=>n(L5e());return gt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(vt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const j8=()=>ne("div",{className:"process-buttons",children:[x(Q$,{}),x(J$,{})]}),N5e=ht([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Y8=()=>{const e=Ke(),{prompt:t,activeTabName:n}=Te(N5e),{isReady:r}=Te(X$),i=C.exports.useRef(null),o=s=>{e(vb(s.target.value))};gt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(YC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(WB,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function eW(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function tW(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function D5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function z5e(e,t){e.classList?e.classList.add(t):D5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function F5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},nW=le.createContext(null);var rW=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",KC="exiting",Lu=function(e){H7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=KC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this);a&&rW(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[vy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:vy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:KC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=B7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(nW.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Lu.contextType=nW;Lu.propTypes={};function Ep(){}Lu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Lu.UNMOUNTED=sm;Lu.EXITED=xf;Lu.ENTERING=wf;Lu.ENTERED=Ip;Lu.EXITING=KC;const B5e=Lu;var $5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},mw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return F5e(t,r)})},q8=function(e){H7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),W5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),H5e=.999,V5e=.1,U5e=20,Bg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},G5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},oW=LS({name:"canvas",initialState:G5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!G8(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:hl(it.clamp(n.width,64,512),64),height:hl(it.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Bg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(it.clamp(i,64,n/e.stageScale),64),s=hl(it.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=W5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(E5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(i5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Bg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(i5)){const i=Pp(r.width,r.height,512,512,Bg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Bg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Bg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:hl(it.clamp(o,64,512),64),height:hl(it.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:j5e,addLine:aW,addPointToCurrentLine:sW,clearMask:Y5e,commitStagingAreaImage:q5e,discardStagedImages:K5e,fitBoundingBoxToStage:GPe,nextStagingAreaImage:X5e,prevStagingAreaImage:Z5e,redo:Q5e,resetCanvas:lW,resetCanvasInteractionState:J5e,resetCanvasView:eSe,resizeAndScaleCanvas:uW,resizeCanvas:tSe,setBoundingBoxCoordinates:vw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:jPe,setBrushColor:nSe,setBrushSize:yw,setCanvasContainerDimensions:rSe,clearCanvasHistory:cW,setCursorPosition:dW,setDoesCanvasNeedScaling:io,setInitialCanvasImage:K8,setInpaintReplace:jL,setIsDrawing:ZS,setIsMaskEnabled:fW,setIsMouseOverBoundingBox:$y,setIsMoveBoundingBoxKeyHeld:YPe,setIsMoveStageKeyHeld:qPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:Sw,setLayer:hW,setMaskColor:iSe,setMergedCanvas:oSe,setShouldAutoSave:aSe,setShouldCropToBoundingBoxOnSave:sSe,setShouldDarkenOutsideBoundingBox:lSe,setShouldLockBoundingBox:KPe,setShouldPreserveMaskedArea:uSe,setShouldShowBoundingBox:cSe,setShouldShowBrush:XPe,setShouldShowBrushPreview:ZPe,setShouldShowCanvasDebugInfo:dSe,setShouldShowCheckboardTransparency:QPe,setShouldShowGrid:fSe,setShouldShowIntermediates:hSe,setShouldShowStagingImage:pSe,setShouldShowStagingOutline:qL,setShouldSnapToGrid:gSe,setShouldUseInpaintReplace:mSe,setStageCoordinates:pW,setStageDimensions:JPe,setStageScale:vSe,setTool:C0,toggleShouldLockBoundingBox:eTe,toggleTool:tTe,undo:ySe}=oW.actions,SSe=oW.reducer,gW=""+new URL("logo.13003d72.png",import.meta.url).href,bSe=ht(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),X8=e=>{const t=Ke(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Te(bSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;gt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),gt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),gt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(q8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(Q8e(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(eke(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(iW,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(eW,{}):x(tW,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:gW,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function xSe(){const e=Te(n=>n.options.showAdvancedOptions),t={seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})},other:{header:x(N$,{}),feature:Hi.OTHER,options:x(D$,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(R$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(F8,{}),e?x(W8,{accordionInfo:t}):null]})}const Z8=C.exports.createContext(null),wSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(Z8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(V8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},CSe=ht(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),XC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Ke(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Te(CSe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(A5e(e)),o()};gt("delete",()=>{s?i():m()},[e,s]);const v=S=>a($$(!S.target.checked));return ne(Rn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(dB,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:ne(fB,{className:"modal",children:[x(kS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ne(nn,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(u8,{checked:!s,onChange:v})]})})]})}),ne(_S,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Jc=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(r8,{...o,children:[x(a8,{children:t}),ne(o8,{className:`invokeai__popover-content ${r}`,children:[i&&x(i8,{className:"invokeai__popover-arrow"}),n]})]})},_Se=ht([e=>e.system,e=>e.options,e=>e.gallery,Rr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),mW=()=>{const e=Ke(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Te(_Se),m=o2(),v=()=>{!u||(h&&e(ud(!1)),e(c2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};gt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(U8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};gt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u?.metadata&&e(d2(u.metadata.image.seed))};gt("s",()=>{u?.metadata?.image?.seed?(P(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(vb(u.metadata.image.prompt));gt("p",()=>{u?.metadata?.image?.prompt?(E(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(P5e(u))};gt("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(T5e(u))};gt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(bV(!l)),I=()=>{!u||(h&&e(ud(!1)),e(K8(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return gt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ne("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Send to...",icon:x(b5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(WL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(WL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(XS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(j$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(ra,{isAttached:!0,children:[x(vt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(vt,{icon:x(S5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(vt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(ra,{isAttached:!0,children:[x(Jc,{trigger:"hover",triggerComponent:x(vt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(qS,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(Jc,{trigger:"hover",triggerComponent:x(vt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(KS,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(vt,{icon:x(G$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(XC,{image:u,children:x(vt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},kSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},vW=LS({name:"gallery",initialState:kSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:bw,removeImage:yW,setCurrentImage:ESe,addGalleryImages:PSe,setIntermediateImage:TSe,selectNextImage:Q8,selectPrevImage:J8,setShouldPinGallery:ASe,setShouldShowGallery:_0,setGalleryScrollPosition:LSe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:MSe,setShouldHoldGalleryOpen:SW,setShouldAutoSwitchToNewImages:OSe,setCurrentCategory:Wy,setGalleryWidth:ISe}=vW.actions,RSe=vW.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var bW=ut({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:ne(Rn,{children:[x("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function NSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ne(nn,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(NSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(XS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(bW,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),DSe=(e,t)=>e.image.uuid===t.image.uuid,xW=C.exports.memo(({image:e,styleClass:t})=>{const n=Ke();gt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ne(nn,{gap:1,direction:"column",width:"100%",children:[ne(nn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ne(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(bW,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Rn,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(q3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(w9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(C9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:V3(l),onClick:()=>n(vb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(d2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(dV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:r5(h),onClick:()=>n(yV(r5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(pV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(hV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(c2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(x9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&ne(Rn,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,$)=>{if(z.type==="esrgan"){const{scale:W,strength:j}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:W,onClick:()=>n(w9(W))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(C9(j))})]},$)}else if(z.type==="gfpgan"){const{strength:W}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:W,onClick:()=>{n(q3(W)),n(K3("gfpgan"))}})]},$)}else if(z.type==="codeformer"){const{strength:W,fidelity:j}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:W,onClick:()=>{n(q3(W)),n(K3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(fV(j)),n(K3("codeformer"))}})]},$)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(XS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(Vz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},DSe),wW=ht([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function zSe(){const e=Ke(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Te(wW),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(J8())},p=()=>{e(Q8())},m=()=>{e(ud(!0))};return ne("div",{className:"current-image-preview",children:[i&&x(mS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(U$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(xW,{image:i,styleClass:"current-image-metadata"})]})}const FSe=ht([e=>e.gallery,e=>e.options,Rr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),CW=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Te(FSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Rn,{children:[x(mW,{}),x(zSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},BSe=()=>{const e=C.exports.useContext(Z8);return x(vt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(V8,{}),onClick:e||void 0})};function $Se(){const e=Te(i=>i.options.initialImage),t=Ke(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(cV())};return ne(Rn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(BSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(mS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const WSe=()=>{const e=Te(r=>r.options.initialImage),{currentImage:t}=Te(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x($Se,{})}):x(wSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(CW,{})})]})};function HSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var VSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},XSe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],JL="__resizable_base__",_W=function(e){jSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(JL):o.className+=JL,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||YSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return xw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?xw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?xw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Vy(n,M,I),r=Vy(r,R,N)}else n=Vy(n,h,p),r=Vy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&qSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Uy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Uy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Uy(n)?n.touches[0].clientX:n.clientX,h=Uy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=KSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=QL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=QL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=ZL(M,this.props.grid[0]),z=ZL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(GSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return XSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ne(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ZSe(i,...t)]}function ZSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function QSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kW(...e){return t=>e.forEach(n=>QSe(n,t))}function Ga(...e){return C.exports.useCallback(kW(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(ebe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(ZC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(ZC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const ZC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...tbe(r,n.props),ref:kW(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});ZC.displayName="SlotClone";const JSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function ebe(e){return C.exports.isValidElement(e)&&e.type===JSe}function tbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const nbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=nbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function EW(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function PW(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ga(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ga(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const rbe=C.exports.createContext(void 0);function TW(e){const t=C.exports.useContext(rbe);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ibe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const QC="dismissableLayer.update",obe="dismissableLayer.pointerDownOutside",abe="dismissableLayer.focusOutside";let eM;const sbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(sbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ga(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=ube(z=>{const $=z.target,W=[...h.branches].some(j=>j.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=cbe(z=>{const $=z.target;[...h.branches].some(j=>j.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ibe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(eM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),tM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=eM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),tM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(QC,z),()=>document.removeEventListener(QC,z)},[]),C.exports.createElement(Cu.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function ube(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){AW(obe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&AW(abe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tM(){const e=new CustomEvent(QC);document.dispatchEvent(e)}function AW(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?EW(i,o):i.dispatchEvent(o)}let ww=0;function dbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:nM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:nM()),ww++,()=>{ww===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ww--}},[])}function nM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Cw="focusScope.autoFocusOnMount",_w="focusScope.autoFocusOnUnmount",rM={bubbles:!1,cancelable:!0},fbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ga(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){oM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(Cw,rM);s.addEventListener(Cw,u),s.dispatchEvent(E),E.defaultPrevented||(hbe(ybe(LW(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(Cw,u),setTimeout(()=>{const E=new CustomEvent(_w,rM);s.addEventListener(_w,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(_w,h),oM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=pbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function hbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function pbe(e){const t=LW(e),n=iM(t,e),r=iM(t.reverse(),e);return[n,r]}function LW(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iM(e,t){for(const n of e)if(!gbe(n,{upTo:t}))return n}function gbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mbe(e)&&t&&e.select()}}const oM=vbe();function vbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=aM(e,t),e.unshift(t)},remove(t){var n;e=aM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function aM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ybe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Sbe=Bw["useId".toString()]||(()=>{});let bbe=0;function xbe(e){const[t,n]=C.exports.useState(Sbe());return Y0(()=>{e||n(r=>r??String(bbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function QS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function ek(e){return e==="y"?"height":"width"}function sM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=f1(t),l=ek(s),u=r[l]/2-i[l]/2,h=d1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(QS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const wbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=sM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=MW(r),h={x:i,y:o},p=f1(a),m=QS(a),v=ek(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,$=JC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?zEbe[t])}function Pbe(e,t,n){n===void 0&&(n=!1);const r=QS(e),i=f1(e),o=ek(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=l5(a)),{main:a,cross:l5(a)}}const Tbe={start:"end",end:"start"};function uM(e){return e.replace(/start|end/g,t=>Tbe[t])}const Abe=["top","right","bottom","left"];function Lbe(e){const t=l5(e);return[uM(e),t,uM(t)]}const Mbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[l5(a)]:Lbe(a)),_=[a,...E],T=await s5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=Pbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var R,N;const $=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,W=_[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function cM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dM(e){return Abe.some(t=>e[t]>=0)}const Obe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await s5(r,{...n,elementContext:"reference"}),a=cM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=cM(o,i.floating);return{data:{escapedOffsets:a,escaped:dM(a)}}}default:return{}}}}};async function Ibe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=QS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Rbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ibe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function OW(e){return e==="x"?"y":"x"}const Nbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=f1(d1(i)),m=OW(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=JC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=JC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Dbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=f1(i),m=OW(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;vN&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function IW(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Mu(e){if(e==null)return window;if(!IW(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Mu(e).getComputedStyle(e)}function _u(e){return IW(e)?"":e?(e.nodeName||"").toLowerCase():""}function RW(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Mu(e).HTMLElement}function ld(e){return e instanceof Mu(e).Element}function zbe(e){return e instanceof Mu(e).Node}function tk(e){if(typeof ShadowRoot>"u")return!1;const t=Mu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Fbe(e){return["table","td","th"].includes(_u(e))}function NW(e){const t=/firefox/i.test(RW()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function DW(){return!/^((?!chrome|android).)*safari/i.test(RW())}const fM=Math.min,Wm=Math.max,u5=Math.round;function ku(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ml(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=ld(e)?Mu(e):window,p=!DW()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function bd(e){return((zbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function eb(e){return ld(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function zW(e){return ku(bd(e)).left+eb(e).scrollLeft}function Bbe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function $be(e,t,n){const r=Ml(t),i=bd(t),o=ku(e,r&&Bbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||JS(i))&&(a=eb(t)),Ml(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=zW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function FW(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(tk(e)?e.host:null)||bd(e)}function hM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Wbe(e){let t=FW(e);for(tk(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(_u(t));){if(NW(t))return t;t=t.parentNode}return null}function e9(e){const t=Mu(e);let n=hM(e);for(;n&&Fbe(n)&&getComputedStyle(n).position==="static";)n=hM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!NW(n))?t:n||Wbe(e)||t}function pM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Hbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((_u(n)!=="body"||JS(o))&&(a=eb(n)),Ml(n))){const l=ku(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Vbe(e,t){const n=Mu(e),r=bd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=DW();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ube(e){var t;const n=bd(e),r=eb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+zW(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Wm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BW(e){const t=FW(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ml(t)&&JS(t)?t:BW(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=BW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Mu(r),a=i?[o].concat(o.visualViewport||[],JS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Gbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&tk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function jbe(e,t){const n=ku(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function gM(e,t,n){return t==="viewport"?a5(Vbe(e,n)):ld(t)?jbe(t,n):a5(Ube(bd(e)))}function Ybe(e){const t=c5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?e9(e):e;return ld(r)?t.filter(i=>ld(i)&&Gbe(i,r)&&_u(i)!=="body"):[]}function qbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Ybe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=gM(t,h,i);return u.top=Wm(p.top,u.top),u.right=fM(p.right,u.right),u.bottom=fM(p.bottom,u.bottom),u.left=Wm(p.left,u.left),u},gM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Kbe={getClippingRect:qbe,convertOffsetParentRelativeRectToViewportRelativeRect:Hbe,isElement:ld,getDimensions:pM,getOffsetParent:e9,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:$be(t,e9(n),r),floating:{...pM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Xbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ld(e)?c5(e):[],...c5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ld(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?ku(e):null;s&&S();function S(){const w=ku(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Zbe=(e,t,n)=>wbe(e,t,{platform:Kbe,...n});var t9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function n9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!n9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!n9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Qbe(e){const t=C.exports.useRef(e);return t9(()=>{t.current=e}),t}function Jbe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Qbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);n9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Zbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);t9(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);t9(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:P,floating:E}),[u,v,_,P,E])}const exe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?lM({element:t.current,padding:n}).fn(i):{}:t?lM({element:t,padding:n}).fn(i):{}}}};function txe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const $W="Popper",[nk,WW]=a2($W),[nxe,HW]=nk($W),rxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(nxe,{scope:t,anchor:r,onAnchorChange:i},n)},ixe="PopperAnchor",oxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HW(ixe,n),a=C.exports.useRef(null),s=Ga(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,Tn({},i,{ref:s}))}),d5="PopperContent",[axe,nTe]=nk(d5),[sxe,lxe]=nk(d5,{hasParent:!1,positionUpdateFns:new Set}),uxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HW(d5,h),[N,z]=C.exports.useState(null),$=Ga(t,wt=>z(wt)),[W,j]=C.exports.useState(null),de=txe(W),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(dxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:ke,update:ct}=Jbe({strategy:"fixed",placement:ie,whileElementsMounted:Xbe,middleware:[Rbe({mainAxis:m+J,alignmentAxis:S}),M?Nbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Dbe():void 0,...Z}):void 0,W?exe({element:W,padding:w}):void 0,M?Mbe({...Z}):void 0,fxe({arrowWidth:V,arrowHeight:J}),T?Obe({strategy:"referenceHidden"}):void 0].filter(cxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const Ge=ye!==null&&Se!==null,[ot,Ze]=VW(De),et=(i=ke.arrow)===null||i===void 0?void 0:i.x,Tt=(o=ke.arrow)===null||o===void 0?void 0:o.y,xt=((a=ke.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,st]=C.exports.useState();Y0(()=>{N&&st(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:Xe}=lxe(d5,h),yt=!At;C.exports.useLayoutEffect(()=>{if(!yt)return Xe.add(ct),()=>{Xe.delete(ct)}},[yt,Xe,ct]),C.exports.useLayoutEffect(()=>{yt&&Ge&&Array.from(Xe).reverse().forEach(wt=>requestAnimationFrame(wt))},[yt,Ge,Xe]);const cn={"data-side":ot,"data-align":Ze,...I,ref:$,style:{...I.style,animation:Ge?void 0:"none",opacity:(s=ke.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:Ge?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=ke.transformOrigin)===null||l===void 0?void 0:l.x,(u=ke.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(axe,{scope:h,placedSide:ot,onArrowChange:j,arrowX:et,arrowY:Tt,shouldHideArrow:xt},yt?C.exports.createElement(sxe,{scope:h,hasParent:!0,positionUpdateFns:Xe},C.exports.createElement(Cu.div,cn)):C.exports.createElement(Cu.div,cn)))});function cxe(e){return e!==void 0}function dxe(e){return e!==null}const fxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=VW(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function VW(e){const[t,n="center"]=e.split("-");return[t,n]}const hxe=rxe,pxe=oxe,gxe=uxe;function mxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const UW=e=>{const{present:t,children:n}=e,r=vxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ga(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};UW.displayName="Presence";function vxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=mxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=jy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=jy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=jy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=jy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function jy(e){return e?.animationName||"none"}function yxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Sxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function Sxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const kw="rovingFocusGroup.onEntryFocus",bxe={bubbles:!1,cancelable:!0},rk="RovingFocusGroup",[r9,GW,xxe]=PW(rk),[wxe,jW]=a2(rk,[xxe]),[Cxe,_xe]=wxe(rk),kxe=C.exports.forwardRef((e,t)=>C.exports.createElement(r9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(r9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Exe,Tn({},e,{ref:t}))))),Exe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Ga(t,p),v=TW(o),[S=null,w]=yxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=GW(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(kw,_),()=>N.removeEventListener(kw,_)},[_]),C.exports.createElement(Cxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const $=new CustomEvent(kw,bxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(ie=>ie.focusable),j=W.find(ie=>ie.active),de=W.find(ie=>ie.id===S),J=[j,de,...W].filter(Boolean).map(ie=>ie.ref.current);YW(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Pxe="RovingFocusGroupItem",Txe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=xbe(),s=_xe(Pxe,n),l=s.currentTabStopId===a,u=GW(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(r9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Mxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Oxe(w,P+1):w.slice(P+1)}setTimeout(()=>YW(w))}})})))}),Axe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mxe(e,t,n){const r=Lxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Axe[r]}function YW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Oxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Ixe=kxe,Rxe=Txe,Nxe=["Enter"," "],Dxe=["ArrowDown","PageUp","Home"],qW=["ArrowUp","PageDown","End"],zxe=[...Dxe,...qW],tb="Menu",[i9,Fxe,Bxe]=PW(tb),[ph,KW]=a2(tb,[Bxe,WW,jW]),ik=WW(),XW=jW(),[$xe,nb]=ph(tb),[Wxe,ok]=ph(tb),Hxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=ik(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=TW(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(hxe,s,C.exports.createElement($xe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Wxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Vxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ik(n);return C.exports.createElement(pxe,Tn({},i,r,{ref:t}))}),Uxe="MenuPortal",[rTe,Gxe]=ph(Uxe,{forceMount:void 0}),ed="MenuContent",[jxe,ZW]=ph(ed),Yxe=C.exports.forwardRef((e,t)=>{const n=Gxe(ed,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=nb(ed,e.__scopeMenu),a=ok(ed,e.__scopeMenu);return C.exports.createElement(i9.Provider,{scope:e.__scopeMenu},C.exports.createElement(UW,{present:r||o.open},C.exports.createElement(i9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(qxe,Tn({},i,{ref:t})):C.exports.createElement(Kxe,Tn({},i,{ref:t})))))}),qxe=C.exports.forwardRef((e,t)=>{const n=nb(ed,e.__scopeMenu),r=C.exports.useRef(null),i=Ga(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return wF(o)},[]),C.exports.createElement(QW,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Kxe=C.exports.forwardRef((e,t)=>{const n=nb(ed,e.__scopeMenu);return C.exports.createElement(QW,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),QW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=nb(ed,n),P=ok(ed,n),E=ik(n),_=XW(n),T=Fxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ga(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?lB:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=$.current+G,he=T().filter(Ge=>!Ge.disabled),ye=document.activeElement,Se=(Z=he.find(Ge=>Ge.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(Ge=>Ge.textValue),ke=iwe(De,X,Se),ct=(te=he.find(Ge=>Ge.textValue===ke))===null||te===void 0?void 0:te.ref.current;(function Ge(ot){$.current=ot,window.clearTimeout(z.current),ot!==""&&(z.current=window.setTimeout(()=>Ge(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),dbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&awe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(fbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(lbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Ixe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(gxe,Tn({role:"menu","aria-orientation":"vertical","data-state":twe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!zxe.includes(G.key))return;G.preventDefault();const De=T().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);qW.includes(G.key)&&De.reverse(),nwe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,a9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),o9="MenuItem",mM="menu.itemSelect",Xxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ok(o9,e.__scopeMenu),s=ZW(o9,e.__scopeMenu),l=Ga(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(mM,{bubbles:!0,cancelable:!0});p.addEventListener(mM,v=>r?.(v),{once:!0}),EW(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Zxe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Nxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=ZW(o9,n),s=XW(n),l=C.exports.useRef(null),u=Ga(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(i9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Rxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,a9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,a9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),Qxe="MenuRadioGroup";ph(Qxe,{value:void 0,onValueChange:()=>{}});const Jxe="MenuItemIndicator";ph(Jxe,{checked:!1});const ewe="MenuSub";ph(ewe);function twe(e){return e?"open":"closed"}function nwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function iwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=rwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function owe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function awe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return owe(n,t)}function a9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const swe=Hxe,lwe=Vxe,uwe=Yxe,cwe=Xxe,JW="ContextMenu",[dwe,iTe]=a2(JW,[KW]),rb=KW(),[fwe,eH]=dwe(JW),hwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=rb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(fwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(swe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},pwe="ContextMenuTrigger",gwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eH(pwe,n),o=rb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(lwe,Tn({},o,{virtualRef:s})),C.exports.createElement(Cu.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,Yy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,Yy(u)),onPointerCancel:qn(e.onPointerCancel,Yy(u)),onPointerUp:qn(e.onPointerUp,Yy(u))})))}),mwe="ContextMenuContent",vwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eH(mwe,n),o=rb(n),a=C.exports.useRef(!1);return C.exports.createElement(uwe,Tn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=rb(n);return C.exports.createElement(cwe,Tn({},i,r,{ref:t}))});function Yy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Swe=hwe,bwe=gwe,xwe=vwe,gf=ywe,wwe=ht([e=>e.gallery,e=>e.options,Au,Rr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Cwe=ht([e=>e.options,e=>e.gallery,e=>e.system,Rr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),_we=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,kwe=C.exports.memo(e=>{const t=Ke(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Te(Cwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(vb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(d2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ud(!1)),t(c2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ud(!1)),t(K8(s)),t(uW()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(G8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(V8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(Swe,{onOpenChange:$=>{t(SW($))},children:[x(bwe,{children:ne(Pu,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ESe(s)),children:l&&x(va,{width:"50%",height:"50%",as:H8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(XC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(x5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(xwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(XC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},_we),qy=320,vM=40,Ewe={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},yM=400;function tH(){const e=Ke(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Te(wwe);console.log(w);const{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:yM,galleryMaxWidth:yM}:Ewe[u],[M,I]=C.exports.useState(S>=qy),[R,N]=C.exports.useState(!1),[z,$]=C.exports.useState(0),W=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=qy&&I(!1)},[S]);const V=()=>{e(ASe(!i)),e(io(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(io(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(SW(!1)),e(LSe(j.current?j.current.scrollTop:0))},[e]),K=()=>{e(qC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};gt("g",()=>{J()},[o,i]),gt("left",()=>{e(J8())},{enabled:!P},[P]),gt("right",()=>{e(Q8())},{enabled:!P},[P]),gt("shift+g",()=>{V()},[i]),gt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return gt("shift+up",()=>{if(s<256){const he=it.clamp(s+X,32,256);e($g(he))}},[s]),gt("shift+down",()=>{if(s>32){const he=it.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&W.current&&!W.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(iW,{nodeRef:W,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ne("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:W,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[ne(_W,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{$(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const ke=i?it.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(ISe(ke)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(io(!0)))},onResize:(he,ye,Se,De)=>{const ke=it.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));ke>=qy&&!M?I(!0):keke-vM&&e($g(ke-vM)),i&&(ke>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[ne("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?ne(Rn,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):ne(Rn,{children:[x(vt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(vt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(C5e,{}),onClick:()=>e(Wy("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(Jc,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(vt,{size:"sm","aria-label":"Gallery Settings",icon:x(U8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(vt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(O8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(La,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(MSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(La,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(OSe(he.target.checked))})})]})}),x(vt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(eW,{}):x(tW,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?ne(Rn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(kwe,{image:he,isSelected:r===ye},ye)})}),x(Wa,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Pwe=ht([e=>e.options,Rr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ak=e=>{const t=Ke(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Te(Pwe),l=()=>{t(oke(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(HSe,{})})})]}),!a&&x(tH,{})]})})};function Twe(){return x(ak,{optionsPanel:x(xSe,{}),children:x(WSe,{})})}function Awe(){const e=Te(n=>n.options.showAdvancedOptions),t={seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})},other:{header:x(N$,{}),feature:Hi.OTHER,options:x(D$,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(F8,{}),e?x(W8,{accordionInfo:t}):null]})}const Lwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(CW,{})})});function Mwe(){return x(ak,{optionsPanel:x(Awe,{}),children:x(Lwe,{})})}var s9=function(e,t){return s9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},s9(e,t)};function Owe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");s9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=qwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):iH(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function qwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Kwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Xwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},sk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Kwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Xwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=sk(e,t);return e.bounds=n,n};function ib(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=l9(e,s-p,u+p,r),S=l9(t,l-m,h+m,r);return{x:v,y:S}}var l9=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function ob(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=ib(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var bM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ab(o,n);return!l},xM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Zwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},Qwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Jwe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ob(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function e6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=ib(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var t6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},f5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},n6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},r6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function i6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function wM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:l9(e,o,a,i)}function o6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function a6e(e,t){var n=n6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=o6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function s6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=r6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=i6e(e,l),$=Math.max(z,N),W=f5(e,M),j=f5(e,I),de=W*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();iH(e,T,$,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,ke=De/N,ct=nH[S.animationType],Ge=1-ct(Math.min(1,ke)),ot=1-te,Ze=ye+a*ot,et=Se+s*ot,Tt=wM(Ze,G.positionX,ye,_,v,h,u,ie,J,Ge),xt=wM(et,G.positionY,Se,E,v,m,p,K,Q,Ge);(ye!==Ze||Se!==et)&&e.setTransformState(he,Tt,xt)})}}function CM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?Qwe(e,t):Zwe(e,t)}function _M(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=t6e(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);a6e(e,{x:u,y:h}),e6e(e,u,h,p,m)}}function l6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?s6e(e):oH(e)}}function oH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&oH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=lk(e,a,v,S);w&&xd(e,w,h,p)}}function lk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Da(t,2),o,a,0,!1),u=q0(e,l),h=ob(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},u6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Wg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},sH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},kM=function(e){var t=Pl({},Wg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Wg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Wg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Wg[n]),e[n]):s?t[n]=SM(SM([],Wg[n]),e[n]):t[n]=e[n]}}),t},lH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Da(h,3),s,a,u,!1);return p};function uH(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=lH(e,t,n),w=lk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function cH(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=sH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=sk(e,a.scale),m=ib(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||xd(e,v,t,n)}}function c6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=d6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=sk(e,P),R=ib(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function d6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function f6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var h6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uH(e,1,t,n,r)}},p6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uH(e,-1,t,n,r)}},g6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},m6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),cH(e,t,n)}},v6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=dH(t||i.scale,o,a);xd(e,s,n,r)}}},y6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&f6e(a)&&a&&o.contains(a)){var s=c6e(e,a,n);xd(e,s,r,i)}}},Br=function(e){return{instance:e,state:e.transformState,zoomIn:h6e(e),zoomOut:p6e(e),setTransform:g6e(e),resetTransform:m6e(e),centerView:v6e(e),zoomToElement:y6e(e)}},Ew=!1;function Pw(){try{var e={get passive(){return Ew=!0,!1}};return e}catch{return Ew=!1,Ew}}var ab=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},EM=function(e){e&&clearTimeout(e)},S6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},dH=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},b6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ab(u,a);return!p};function x6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Iwe(t,n);return r}function fH(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var w6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Da(v,3),u,l,p,S);return w},C6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},_6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ab(a,i);return!l},k6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},E6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},hH=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},P6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Da(p,2),a,o,l,!u)},T6e=160,A6e=100,L6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Br(e),t,r),ui(Br(e),t,i))},M6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=x6e(t,null),E=w6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=fH(t,o,l),M=S||v===0||h,I=u&&M,R=ob(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Br(e),t,r),ui(Br(e),t,i)}},O6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;EM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(aH(e,t.x,t.y),e.wheelAnimationTimer=null)},A6e);var o=C6e(e,t);o&&(EM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Br(e),t,r),ui(Br(e),t,i))},T6e))},I6e=function(e,t){var n=hH(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},R6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=E6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=hH(t),v=P6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ob(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},N6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,aH(e,t?.x,t?.y)};function D6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return cH(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=lH(e,h,o),m=fH(t,u,l),v=lk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var z6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ab(l,s);return!(p||!h)},pH=le.createContext(u6e),F6e=function(e){Owe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=sH(n.props),n.setup=kM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Pw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=b6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(L6e(n,r),M6e(n,r),O6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=bM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),CM(n,r),ui(Br(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=xM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),_M(n,r.clientX,r.clientY),ui(Br(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(l6e(n),ui(Br(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=_6e(n,r);!l||(I6e(n,r),vl(n),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=k6e(n);!l||(r.preventDefault(),r.stopPropagation(),R6e(n,r),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(N6e(n),ui(Br(n),r,o),ui(Br(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=bM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),CM(n,r),ui(Br(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=xM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];_M(n,s.clientX,s.clientY),ui(Br(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=z6e(n,r);!o||D6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Br(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=dH(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=S6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Br(n))},n}return t.prototype.componentDidMount=function(){var n=Pw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Pw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=kM(this.props))},t.prototype.render=function(){var n=Br(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(pH.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),B6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(F6e,{...Pl({},e,{setRef:i})})});function $6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var W6e=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,PM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};$6e(W6e);var H6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(pH).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+PM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+PM.content+" "+o,style:s,children:t})})};function V6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(B6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Rn,{children:[ne("div",{className:"lightbox-image-options",children:[x(vt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(vt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(vt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(vt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(vt,{icon:x(H4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(vt,{icon:x(O8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(H6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function U6e(){const e=Ke(),t=Te(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Te(wW),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(J8())},p=()=>{e(Q8())};return gt("Esc",()=>{t&&e(ud(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(vt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ud(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(mW,{}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(U$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Rn,{children:[x(V6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(xW,{image:n})]})]}),x(tH,{})]})]})}const G6e=ht($n,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),j6e=()=>{const e=Ke(),{boundingBoxDimensions:t}=Te(G6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return ne("div",{className:"inpainting-bounding-box-settings",children:[x("div",{className:"inpainting-bounding-box-header",children:x("p",{children:"Canvas Bounding Box"})}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})]})},Y6e=ht($n,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Te(Y6e),n=Ke();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(aa,{isChecked:t,onChange:r=>n(mSe(r.target.checked))})]})}function K6e(){return ne(Rn,{children:[x(q6e,{}),x(j6e,{})]})}const X6e=ht([F$],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}}),Z6e=()=>{const e=Ke(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}=Te(X6e);return ne(nn,{direction:"column",gap:"1rem",children:[x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:s=>{e(cO(s))},handleReset:()=>e(cO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:s=>{e(uO(s))},handleReset:()=>{e(uO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:s=>{e(fO(s))},handleReset:()=>{e(fO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:s=>{e(dO(s))},handleReset:()=>{e(dO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:s=>{e(hO(s))},handleReset:()=>{e(hO(32))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(aa,{label:"Force Outpaint",isChecked:a,onChange:s=>{e(X8e(s.target.checked))}})]})},Q6e=()=>x(Pu,{flex:"1",textAlign:"left",children:"Outpainting"});function J6e(){const e=Te(n=>n.options.showAdvancedOptions),t={outpainting:{header:x(Q6e,{}),feature:Hi.OUTPAINTING,options:x(Z6e,{})},seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(R$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(K6e,{}),x(F8,{}),e&&x(W8,{accordionInfo:t})]})}const eCe=ht($n,K$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),tCe=()=>{const e=Ke(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Te(eCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(rSe({width:a,height:s})),e(tSe()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var nCe=Math.PI/180;function rCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},at={_global:k0,version:"8.3.13",isBrowser:rCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return at.angleDeg?e*nCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return at.DD.isDragging},isDragReady(){return!!at.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{at[e.prototype.getClassName()]=e};at._injectGlobal(at);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var iCe="[object Array]",oCe="[object Number]",aCe="[object String]",sCe="[object Boolean]",lCe=Math.PI/180,uCe=180/Math.PI,Tw="#",cCe="",dCe="0",fCe="Konva warning: ",TM="Konva error: ",hCe="rgb(",Aw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},pCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Ky=[];const gCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===iCe},_isNumber(e){return Object.prototype.toString.call(e)===oCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===aCe},_isBoolean(e){return Object.prototype.toString.call(e)===sCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Ky.push(e),Ky.length===1&&gCe(function(){const t=Ky;Ky=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Tw,cCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=dCe+e;return Tw+e},getRGB(e){var t;return e in Aw?(t=Aw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Tw?this._hexToRgb(e.substring(1)):e.substr(0,4)===hCe?(t=pCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Aw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function Be(){if(at.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function mH(e){if(at.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function uk(){if(at.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(at.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function vH(){if(at.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function mCe(){if(at.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(at.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function vCe(e){if(at.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Vg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Hg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Hg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Vg+n,i=Hg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Hg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Vg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function yCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=SCe+u.join(AM)+bCe)):(o+=s.property,t||(o+=kCe+s.val)),o+=CCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=PCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=LM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=yCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,at._mouseListenClick=!1,at._touchListenClick=!1,at._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof at.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};at.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var G3="absoluteOpacity",Zy="allEventListeners",au="absoluteTransform",MM="absoluteScale",Ug="canvas",MCe="Change",OCe="children",ICe="konva",u9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",j3=" ",DM="stage",Pc="transform",RCe="Stage",c9="visible",NCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(j3);let DCe=1;class $e{constructor(t){this._id=DCe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Pc||t===au)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Pc||t===au,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(j3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===au&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new ck({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(G3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==OCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(u9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(c9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!at.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==RCe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Pc),this._clearSelfAndDescendantCache(au)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Pc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Pc),this._clearSelfAndDescendantCache(au),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(G3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():at.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),at[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=at[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return at.pointerEventsEnabled&&Mw.pointer;if(t==="touch")return Mw.touch;if(t==="mouse")return Mw.mouse};function FM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const VCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Y3=[];class ub extends ca{constructor(t){super(FM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Y3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{FM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===FCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&Y3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(VCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+zM,this.content.style.height=n+zM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rWCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),at.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return SH(t,this)}setPointerCapture(t){bH(t,this)}releaseCapture(t){Hm(t)}getLayers(){return this.children}_bindContentEvents(){!at.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||at.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,at["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;at.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||at.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Lw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Lw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;at["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(at["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){at["_"+r+"InDblClickWindow"]=!1},at.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),at["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,at["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),at["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(d9,{evt:t}):this._fire(d9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(f9,{evt:t}):this._fire(f9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Lw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,dk(t)),Hm(t.pointerId)}_lostpointercapture(t){Hm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new ck({pixelRatio:1,width:this.width(),height:this.height()}),!!at.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ub.prototype.nodeType=zCe;pr(ub);q.addGetterSetter(ub,"container");var MH="hasShadow",OH="shadowRGBA",IH="patternImage",RH="linearGradient",NH="radialGradient";let n3;function Ow(){return n3||(n3=fe.createCanvasElement().getContext("2d"),n3)}const Vm={};function UCe(e){e.fill()}function GCe(e){e.stroke()}function jCe(e){e.fill()}function YCe(e){e.stroke()}function qCe(){this._clearCache(MH)}function KCe(){this._clearCache(OH)}function XCe(){this._clearCache(IH)}function ZCe(){this._clearCache(RH)}function QCe(){this._clearCache(NH)}class Oe extends $e{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(MH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(IH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Ow();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(at.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(RH,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Ow(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Vm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return SH(t,this)}setPointerCapture(t){bH(t,this)}releaseCapture(t){Hm(t)}}Oe.prototype._fillFunc=UCe;Oe.prototype._strokeFunc=GCe;Oe.prototype._fillFuncHit=jCe;Oe.prototype._strokeFuncHit=YCe;Oe.prototype._centroid=!1;Oe.prototype.nodeType="Shape";pr(Oe);Oe.prototype.eventListeners={};Oe.prototype.on.call(Oe.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Oe.prototype.on.call(Oe.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",KCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",XCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",ZCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",QCe);q.addGetterSetter(Oe,"stroke",void 0,vH());q.addGetterSetter(Oe,"strokeWidth",2,Be());q.addGetterSetter(Oe,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Oe,"hitStrokeWidth","auto",uk());q.addGetterSetter(Oe,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Oe,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Oe,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Oe,"lineJoin");q.addGetterSetter(Oe,"lineCap");q.addGetterSetter(Oe,"sceneFunc");q.addGetterSetter(Oe,"hitFunc");q.addGetterSetter(Oe,"dash");q.addGetterSetter(Oe,"dashOffset",0,Be());q.addGetterSetter(Oe,"shadowColor",void 0,h1());q.addGetterSetter(Oe,"shadowBlur",0,Be());q.addGetterSetter(Oe,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Oe,"shadowOffset",["x","y"]);q.addGetterSetter(Oe,"shadowOffsetX",0,Be());q.addGetterSetter(Oe,"shadowOffsetY",0,Be());q.addGetterSetter(Oe,"fillPatternImage");q.addGetterSetter(Oe,"fill",void 0,vH());q.addGetterSetter(Oe,"fillPatternX",0,Be());q.addGetterSetter(Oe,"fillPatternY",0,Be());q.addGetterSetter(Oe,"fillLinearGradientColorStops");q.addGetterSetter(Oe,"strokeLinearGradientColorStops");q.addGetterSetter(Oe,"fillRadialGradientStartRadius",0);q.addGetterSetter(Oe,"fillRadialGradientEndRadius",0);q.addGetterSetter(Oe,"fillRadialGradientColorStops");q.addGetterSetter(Oe,"fillPatternRepeat","repeat");q.addGetterSetter(Oe,"fillEnabled",!0);q.addGetterSetter(Oe,"strokeEnabled",!0);q.addGetterSetter(Oe,"shadowEnabled",!0);q.addGetterSetter(Oe,"dashEnabled",!0);q.addGetterSetter(Oe,"strokeScaleEnabled",!0);q.addGetterSetter(Oe,"fillPriority","color");q.addComponentsGetterSetter(Oe,"fillPatternOffset",["x","y"]);q.addGetterSetter(Oe,"fillPatternOffsetX",0,Be());q.addGetterSetter(Oe,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Oe,"fillPatternScale",["x","y"]);q.addGetterSetter(Oe,"fillPatternScaleX",1,Be());q.addGetterSetter(Oe,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Oe,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Oe,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Oe,"fillLinearGradientStartPointX",0);q.addGetterSetter(Oe,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Oe,"fillLinearGradientStartPointY",0);q.addGetterSetter(Oe,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Oe,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Oe,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Oe,"fillLinearGradientEndPointX",0);q.addGetterSetter(Oe,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Oe,"fillLinearGradientEndPointY",0);q.addGetterSetter(Oe,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Oe,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Oe,"fillRadialGradientStartPointX",0);q.addGetterSetter(Oe,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Oe,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Oe,"fillRadialGradientEndPointX",0);q.addGetterSetter(Oe,"fillRadialGradientEndPointY",0);q.addGetterSetter(Oe,"fillPatternRotation",0);q.backCompat(Oe,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var JCe="#",e9e="beforeDraw",t9e="draw",DH=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],n9e=DH.length;class gh extends ca{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new ck({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(e9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(t9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class fk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}fk.prototype.nodeType="FastLayer";pr(fk);class K0 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Iw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Iw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=BM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$M,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===BM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=i9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=o9e++;var u=r.getLayer()||(r instanceof at.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new a9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)r9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Um={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Ou.prototype._centroid=!0;Ou.prototype.className="Arc";Ou.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Ou);q.addGetterSetter(Ou,"innerRadius",0,Be());q.addGetterSetter(Ou,"outerRadius",0,Be());q.addGetterSetter(Ou,"angle",0,Be());q.addGetterSetter(Ou,"clockwise",!1,Ls());function h9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function HM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,$,W,j,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+Q,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,W,j);break;case"a":$=S.shift(),W=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,W,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,j){return(W[0]*j[0]+W[1]*j[1])/(T(W)*T(j))},I=function(W,j){return(W[0]*j[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,_,s,l,R,$,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Iu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Oe{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Oe{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var zH=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],s9e="Change.konva",l9e="none",p9="up",g9="right",m9="down",v9="left",u9e=zH.length;class hk extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var VM=Math.PI*2;class Sh extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,VM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),VM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class Dl extends Oe{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var i3;function Nw(){return i3||(i3=fe.createCanvasElement().getContext(f9e),i3)}function C9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function k9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Oe{constructor(t){super(k9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(h9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Nw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+r3+this.fontVariant()+r3+(this.fontSize()+v9e)+w9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Nw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==b9e&&S,P=this.ellipsis();this.textArr=[],Nw().font=this._getContextFont();for(var E=P?this._getTextWidth(Rw):0,_=0,T=t.length;_h)for(;M.length>0;){for(var R=0,N=M.length,z="",$=0;R>>1,j=M.slice(0,W+1),de=this._getTextWidth(j)+E;de<=h?(R=W+1,z=j,$=de):N=W}if(z){if(w){var V,J=M[z.length],ie=J===r3||J===UM;ie&&$<=h?V=z.length:V=Math.max(z.lastIndexOf(r3),z.lastIndexOf(UM))+1,V>0&&(R=V,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==jM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Rw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=FH(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${GH}`).join(" "),YM="nodesRect",T9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],A9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const L9e="ontouchstart"in at._global;function M9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(A9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var h5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],qM=1e8;function O9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function jH(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function I9e(e,t){const n=O9e(e);return jH(e,t,n)}function R9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(T9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(YM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(YM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(at.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return jH(h,-at.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-qM,y:-qM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-at.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:at.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),h5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new u2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:L9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=at.getAngle(this.rotation()),o=M9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Oe({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=at.getAngle(this.rotation());const V=m+de,J=at.getAngle(this.rotationSnapTolerance()),Q=R9e(this.rotationSnaps(),V,J)-p.rotation,K=I9e(p,Q);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(at.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function N9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){h5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+h5.join(", "))}),e||[]}Cn.prototype.className="Transformer";pr(Cn);q.addGetterSetter(Cn,"enabledAnchors",h5,N9e);q.addGetterSetter(Cn,"flipEnabled",!0,Ls());q.addGetterSetter(Cn,"resizeEnabled",!0);q.addGetterSetter(Cn,"anchorSize",10,Be());q.addGetterSetter(Cn,"rotateEnabled",!0);q.addGetterSetter(Cn,"rotationSnaps",[]);q.addGetterSetter(Cn,"rotateAnchorOffset",50,Be());q.addGetterSetter(Cn,"rotationSnapTolerance",5,Be());q.addGetterSetter(Cn,"borderEnabled",!0);q.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(Cn,"anchorStrokeWidth",1,Be());q.addGetterSetter(Cn,"anchorFill","white");q.addGetterSetter(Cn,"anchorCornerRadius",0,Be());q.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(Cn,"borderStrokeWidth",1,Be());q.addGetterSetter(Cn,"borderDash");q.addGetterSetter(Cn,"keepRatio",!0);q.addGetterSetter(Cn,"centeredScaling",!1);q.addGetterSetter(Cn,"ignoreStroke",!1);q.addGetterSetter(Cn,"padding",0,Be());q.addGetterSetter(Cn,"node");q.addGetterSetter(Cn,"nodes");q.addGetterSetter(Cn,"boundBoxFunc");q.addGetterSetter(Cn,"anchorDragBoundFunc");q.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(Cn,"useSingleNodeRotation",!0);q.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ru extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,at.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ru.prototype.className="Wedge";Ru.prototype._centroid=!0;Ru.prototype._attrsAffectingSize=["radius"];pr(Ru);q.addGetterSetter(Ru,"radius",0,Be());q.addGetterSetter(Ru,"angle",0,Be());q.addGetterSetter(Ru,"clockwise",!1);q.backCompat(Ru,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var D9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],z9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function F9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,$,W,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new KM,Z=null,te=G,X=null,he=null,ye=D9e[t],Se=z9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)0&&F9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Be(),q.afterSetFilter);const $9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Be(),q.afterSetFilter);const H9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,$=I>0?I:-I;if(z>N&&(R=M),$>N&&(R=I),R*=t,i){var W=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=W>255?255:W<0?0:W,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter($e,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Dw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const V9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mE?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,$,W;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function n_e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Be(),q.afterSetFilter);const a_e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,gH,q.afterSetFilter);const l_e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,gH,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const u_e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},d_e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[H]!==O[se]){var pe=` +`+A[H].replace(" at new "," at ");return d.displayName&&pe.includes("")&&(pe=pe.replace("",d.displayName)),pe}while(1<=H&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function yn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Xa(){kn(Ur),kn(Cr)}function Td(d,f,y){if(Cr.current!==Do)throw Error(a(168));yn(Cr,f),yn(Ur,y)}function $l(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Za(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,yn(Cr,d),yn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=$l(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(Cr),yn(Cr,d)):kn(Ur),yn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Fs=64,uo=4194304;function Bs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~A;se!==0?k=Bs(se):(O&=H,O!==0&&(k=Bs(O)))}else H=y&~A,H!==0?k=Bs(H):O!==0&&(k=Bs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0y;y++)f.push(d);return f}function Sa(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0>=H,A-=H,Gi=1<<32-mi(f)+A|y<Bt?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Bt],He);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Bt===be.length)return y(me,Et),Dn&&$s(me,Bt),Ae;if(Et===null){for(;BtBt?(zr=Et,Et=null):zr=Et.sibling;var as=Ye(me,Et,qt.value,He);if(as===null){Et===null&&(Et=zr);break}d&&Et&&as.alternate===null&&f(me,Et),ue=O(as,ue,Bt),Mt===null?Ae=as:Mt.sibling=as,Mt=as,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Bt),Ae;if(Et===null){for(;!qt.done;Bt++,qt=be.next())qt=Lt(me,qt.value,He),qt!==null&&(ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Bt),Ae}for(Et=k(me,Et);!qt.done;Bt++,qt=be.next())qt=Fn(Et,me,Bt,qt.value,He),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Bt:qt.key),ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Bt),Ae}function qo(me,ue,be,He){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Ae=be.key,Mt=ue;Mt!==null;){if(Mt.key===Ae){if(Ae=be.type,Ae===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===T&&F1(Ae)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=wa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,He,be.key),ue.return=me,me=ue):(He=sf(be.type,be.key,be.props,null,me.mode,He),He.ref=wa(me,ue,be),He.return=me,me=He)}return H(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,He),ue.return=me,me=ue}return H(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),He)}if(ie(be))return En(me,ue,be,He);if(R(be))return er(me,ue,be,He);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,He),ue.return=me,me=ue),H(me)):y(me,ue)}return qo}var Ku=x2(!0),w2=x2(!1),Vd={},po=No(Vd),Ca=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){yn(oe,f),yn(Ca,d),yn(po,Vd),d=K(f),kn(po),yn(po,d)}function je(){kn(po),kn(Ca),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(yn(Ca,d),yn(po,f))}function Qt(d){Ca.current===d&&(kn(po),kn(Ca))}var It=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Du(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function B1(){for(var d=0;dy?y:4,d(!0);var k=Xu.transition;Xu.transition={};try{d(!1),f()}finally{Wt=y,Xu.transition=k}}function rc(){return Si().memoizedState}function Y1(d,f,y){var k=Tr(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},oc(d))ac(f,y);else if(y=qu(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function ic(d,f,y){var k=Tr(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(oc(d))ac(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var H=f.lastRenderedState,se=O(H,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,H)){var pe=f.interleaved;pe===null?(A.next=A,Wd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=qu(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function oc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function ac(d,f){Gd=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Hl(d,y)}}var es={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},Sb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:k2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,jl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return jl(4194308,4,d,f)},useInsertionEffect:function(d,f){return jl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=Y1.bind(null,Sn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:_2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=_2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=Sn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Gl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,k2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,tc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=ba,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Zu++,0rp&&(f.flags|=128,k=!0,uc(A,!1),f.lanes=4194304)}else{if(!k)if(d=ln(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),uc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Hn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,uc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Hn(),f.sibling=null,d=It.current,yn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return yc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),et&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Xa(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(Cr),B1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Gu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return yc(),null;case 24:return null;default:return null}}var Gs=!1,kr=!1,kb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function cc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function ql(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,A=y.memoizedState,O=d.stateNode,H=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Bo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=H}break;case 3:et&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&Xe(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function dc(d){return d.tag===5||d.tag===3||d.tag===4}function ns(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||dc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):Ee(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||cc(y,f);case 6:if(et){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?nt(yr,y.stateNode):ft(yr,y.stateNode))}else jo(d,f,y);break;case 18:et&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:et?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=ya(k),Nu(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,H=O.destroy;O=O.tag,H!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,H),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!kr&&(cc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(k=kr)||y.memoizedState!==null,jo(d,f,y),kr=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new kb),f.forEach(function(k){var A=V2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case fc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function hc(d,f){var y=[];d=[d,0];for(var k=0;kA&&(A=H),k&=~O}if(k=A,k=Hn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*Eb(k/1960))-k,10d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Ft&6)!==0)throw Error(a(331));var A=Ft;for(Ft|=4,Qe=d.current;Qe!==null;){var O=Qe,H=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;peHn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(Sa(d,f,y),Kr(d,y))}function Tb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function V2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,Cb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;_a(d,f),d=f.pendingProps;var A=zs(f,Cr.current);Yu(f,y),A=W1(null,f,k,d,A,y);var O=Qu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Za(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Wo,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Ho(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Bo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=R2(null,f,k,d,y);break e;case 11:f=L2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Bo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),R2(d,f,k,A,y);case 3:e:{if(N2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,v2(d,f),Nh(f,k,null,y);var H=f.memoizedState;if(k=H.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=sc(Error(a(423)),f),f=D2(d,f,k,y,A);break e}else if(k!==A){A=sc(Error(a(424)),f),f=D2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=w2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Gu(),k===A){f=ts(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,H=A.children,De(k,A)?H=null:O!==null&&De(k,O)&&(f.flags|=32),I2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return z2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Ku(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),L2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,H=A.value,m2(f,k,H),O!==null)if(U(O.value,H)){if(O.children===A.children&&!Ur.current){f=ts(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){H=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Ja(-1,y&-y),pe.tag=2;var Ne=O.updateQueue;if(Ne!==null){Ne=Ne.shared;var tt=Ne.pending;tt===null?pe.next=pe:(pe.next=tt.next,tt.next=pe),Ne.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)H=O.type===f.type?null:O.child;else if(O.tag===18){if(H=O.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),$d(H,y,f),H=O.sibling}else H=O.child;if(H!==null)H.return=O;else for(H=O;H!==null;){if(H===f){H=null;break}if(O=H.sibling,O!==null){O.return=H.return,H=O;break}H=H.return}O=H}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,Yu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Bo(k,f.pendingProps),A=Bo(k.type,A),Us(d,f,k,A,y);case 15:return M2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),_a(d,f),f.tag=1,Gr(k)?(d=!0,Za(f)):d=!1,Yu(f,y),S2(f,k,A),z1(f,k,A,y),Ho(null,f,k,!0,d,y);case 19:return B2(d,f,y);case 22:return O2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Hu(d,f)}function ka(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,k){return new ka(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,k,A,O){var H=2;if(k=d,typeof d=="function")mg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:H=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case S:H=9;break e;case w:H=11;break e;case _:H=14;break e;case T:H=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ot,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function U2(d,f,y,k,A,O,H,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return $l(d,y,f)}return f}function yg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&O>=Lt&&A<=tt&&H<=Ye){d.splice(f,1);break}else if(k!==Ne||y.width!==pe.width||YeH){if(!(O!==Lt||y.height!==pe.height||ttA)){Ne>k&&(pe.width+=Ne-k,pe.x=k),ttO&&(pe.height+=Lt-O,pe.y=O),Yey&&(y=H)),H ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return Q(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||Sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Ht=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!wt)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Wt;try{return Wt=d,f()}finally{Wt=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),H=Tr(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Ja(O,H),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Hs(A,f,H),d!==null&&(vo(d,A,H,O),Rh(d,A,H)),H},n};(function(e){e.exports=f_e})(YH);const h_e=D9(YH.exports);var pk={exports:{}},bh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(pk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const gk=".react-konva-event",p_e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,g_e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,m_e={};function cb(e,t,n=m_e){if(!ZM&&"zIndex"in t&&(console.warn(g_e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(p_e),QM=!0)}for(var o in n)if(!XM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!XM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+gk,v[l])}function kd(e){if(!at.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const qH={},v_e={};rh.Node.prototype._applyProps=cb;function y_e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function S_e(e,t,n){let r=rh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=rh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return cb(l,o),l}function b_e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function x_e(e,t,n){return!1}function w_e(e){return e}function C_e(){return null}function __e(){return null}function k_e(e,t,n,r){return v_e}function E_e(){}function P_e(e){}function T_e(e,t){return!1}function A_e(){return qH}function L_e(){return qH}const M_e=setTimeout,O_e=clearTimeout,I_e=-1;function R_e(e,t){return!1}const N_e=!1,D_e=!0,z_e=!0;function F_e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function B_e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function KH(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function $_e(e,t,n){KH(e,t,n)}function W_e(e,t){t.destroy(),t.off(gk),kd(e)}function H_e(e,t){t.destroy(),t.off(gk),kd(e)}function V_e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function U_e(e,t,n){}function G_e(e,t,n,r,i){cb(e,i,r)}function j_e(e){e.hide(),kd(e)}function Y_e(e){}function q_e(e,t){(t.visible==null||t.visible)&&e.show()}function K_e(e,t){}function X_e(e){}function Z_e(){}const Q_e=()=>pk.exports.DefaultEventPriority,J_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:y_e,createInstance:S_e,createTextInstance:b_e,finalizeInitialChildren:x_e,getPublicInstance:w_e,prepareForCommit:C_e,preparePortalMount:__e,prepareUpdate:k_e,resetAfterCommit:E_e,resetTextContent:P_e,shouldDeprioritizeSubtree:T_e,getRootHostContext:A_e,getChildHostContext:L_e,scheduleTimeout:M_e,cancelTimeout:O_e,noTimeout:I_e,shouldSetTextContent:R_e,isPrimaryRenderer:N_e,warnsIfNotActing:D_e,supportsMutation:z_e,appendChild:F_e,appendChildToContainer:B_e,insertBefore:KH,insertInContainerBefore:$_e,removeChild:W_e,removeChildFromContainer:H_e,commitTextUpdate:V_e,commitMount:U_e,commitUpdate:G_e,hideInstance:j_e,hideTextInstance:Y_e,unhideInstance:q_e,unhideTextInstance:K_e,clearContainer:X_e,detachDeletedInstance:Z_e,getCurrentEventPriority:Q_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var e7e=Object.defineProperty,t7e=Object.defineProperties,n7e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,r7e=Object.prototype.hasOwnProperty,i7e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?e7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))r7e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))i7e.call(t,n)&&eO(e,n,t[n]);return e},o7e=(e,t)=>t7e(e,n7e(t));function mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function XH(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const vk=XH(C.exports.createContext(null));class ZH extends C.exports.Component{render(){return x(vk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:a7e,ReactCurrentDispatcher:s7e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function l7e(){const e=C.exports.useContext(vk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=a7e.current)!=null?r:mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],nO=new WeakMap;function u7e(){var e;const t=l7e();qg.splice(0,qg.length),mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==vk&&qg.push(XH(i))});for(const n of qg){const r=(e=s7e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,o7e(tO({},i),{value:nO.get(r)}))),n=>x(ZH,{...tO({},n)})),[])}function c7e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const d7e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=c7e(e),o=u7e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,pk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),cb(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},a3="Layer",ih="Group",P0="Rect",Kg="Circle",p5="Line",QH="Image",f7e="Transformer",pm=h_e(J_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const h7e=le.forwardRef((e,t)=>x(ZH,{children:x(d7e,{...e,forwardedRef:t})})),p7e=ht([$n],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),g7e=e=>{const{...t}=e,{objects:n}=Te(p7e);return x(ih,{listening:!1,...t,children:n.filter(G8).map((r,i)=>x(p5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},db=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},m7e=ht($n,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:db(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),v7e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Te(m7e);return l?ne(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},y7e=ht($n,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),S7e=e=>{const{...t}=e,n=Ke(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Te(y7e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(vw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(vw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(vw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(Sw(!0))},z=()=>{n(Sw(!1)),n($y(!1))},$=()=>{n(YL(!0))},W=()=>{n(Sw(!1)),n(YL(!1)),n($y(!1))},j=()=>{n($y(!0))},de=()=>{!u&&!l&&n($y(!1))};return ne(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:j,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(f7e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:W,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let JH=null,eV=null;const b7e=e=>{JH=e},g5=()=>JH,x7e=e=>{eV=e},w7e=()=>eV,C7e=ht([$n,Rr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),_7e=()=>{const e=Ke(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Te(C7e),i=C.exports.useRef(null),o=w7e();gt("esc",()=>{e(J5e())},{enabled:()=>!0,preventDefault:!0}),gt("shift+h",()=>{e(cSe(!n))},{preventDefault:!0},[t,n]),gt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},k7e=ht($n,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:db(t)}}),rO=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),E7e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Te(k7e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=rO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=rO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},P7e=ht([$n],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),T7e=e=>{const t=Ke(),{isMoveStageKeyHeld:n,stageScale:r}=Te(P7e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=it.clamp(r*H5e**s,V5e,U5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(vSe(l)),t(pW(u))},[e,n,r,t])},fb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},A7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),L7e=e=>{const t=Ke(),{tool:n,isStaging:r}=Te(A7e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=fb(e.current);!o||(i.evt.preventDefault(),t(ZS(!0)),t(aW([o.x,o.y])))},[e,n,r,t])},M7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),O7e=(e,t)=>{const n=Ke(),{tool:r,isDrawing:i,isStaging:o}=Te(M7e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=fb(e.current);if(!a)return;n(sW([a.x,a.y]))}else t.current=!1;n(ZS(!1))},[t,n,i,o,e,r])},I7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),R7e=(e,t,n)=>{const r=Ke(),{isDrawing:i,tool:o,isStaging:a}=Te(I7e);return C.exports.useCallback(()=>{if(!e.current)return;const s=fb(e.current);!s||(r(dW(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(sW([s.x,s.y]))))},[t,r,i,a,n,e,o])},N7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),D7e=e=>{const t=Ke(),{tool:n,isStaging:r}=Te(N7e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=fb(e.current);!o||n==="move"||r||(t(ZS(!0)),t(aW([o.x,o.y])))},[e,n,r,t])},z7e=()=>{const e=Ke();return C.exports.useCallback(()=>{e(dW(null)),e(ZS(!1))},[e])},F7e=ht([$n,Au],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),B7e=()=>{const e=Ke(),{tool:t,isStaging:n}=Te(F7e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(pW(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var mf=C.exports,$7e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const tV=e=>{const{url:t,x:n,y:r}=e,[i]=$7e(t);return x(QH,{x:n,y:r,image:i,listening:!1})},W7e=ht([$n],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),H7e=()=>{const{objects:e}=Te(W7e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(tV,{x:t.x,y:t.y,url:t.image.url},n);if(k5e(t))return x(p5,{points:t.points,stroke:t.color?db(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},V7e=ht([$n],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),U7e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},G7e=()=>{const{colorMode:e}=Wv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Te(V7e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=U7e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=it.range(0,T).map(N=>x(p5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=it.range(0,M).map(N=>x(p5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},j7e=ht([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Y7e=e=>{const{...t}=e,n=Te(j7e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(QH,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},s3=e=>Math.round(e*100)/100,q7e=ht([$n],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${s3(s)}, ${s3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${s3(r)}\xD7${s3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),K7e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=Te(q7e);return ne("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&ne(Rn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},X7e=ht([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Z7e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Te(X7e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(ih,{...t,children:[r&&x(tV,{url:u,x:o,y:a}),i&&ne(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},Q7e=ht([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),J7e=()=>{const e=Ke(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Te(Q7e),o=C.exports.useCallback(()=>{e(qL(!1))},[e]),a=C.exports.useCallback(()=>{e(qL(!0))},[e]);gt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),gt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),gt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(Z5e()),l=()=>e(X5e()),u=()=>e(q5e());return r?x(nn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ne(ra,{isAttached:!0,children:[x(vt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(vt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(vt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(H8,{}),onClick:u,"data-selected":!0}),x(vt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(pSe(!i)),"data-selected":!0}),x(vt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(Y$,{}),onClick:()=>e(O5e(r.image.url)),"data-selected":!0}),x(vt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(K5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},e8e=ht([$n,Au],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),t8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Te(e8e);_7e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{x7e(W),p.current=W},[]),S=C.exports.useCallback(W=>{b7e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=T7e(p),_=L7e(p),T=O7e(p,P),M=R7e(p,P,w),I=D7e(p),R=z7e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B7e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(h7e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:_,onTouchMove:M,onTouchEnd:T,onMouseDown:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(a3,{id:"grid",visible:r,children:x(G7e,{})}),x(a3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H7e,{})}),ne(a3,{id:"mask",visible:e,listening:!1,children:[x(g7e,{visible:!0,listening:!1}),x(E7e,{listening:!1})]}),ne(a3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(v7e,{visible:l!=="move",listening:!1}),x(Z7e,{visible:u}),h&&x(Y7e,{}),x(S7e,{visible:n&&!u})]})]}),x(K7e,{}),x(J7e,{})]})})},n8e=ht([$n,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function r8e(){const e=Ke(),{canUndo:t,activeTabName:n}=Te(n8e),r=()=>{e(ySe())};return gt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(vt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(w5e,{}),onClick:r,isDisabled:!t})}const i8e=ht([$n,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function o8e(){const e=Ke(),{canRedo:t,activeTabName:n}=Te(i8e),r=()=>{e(Q5e())};return gt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(vt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(y5e,{}),onClick:r,isDisabled:!t})}const nV=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return ne(Rn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(dB,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:ne(fB,{className:"modal",children:[x(kS,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),ne(_S,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),a8e=()=>{const e=Ke();return ne(nV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(I5e()),e(lW()),e(cW())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},s8e=()=>{const e=Ke();return ne(nV,{title:"Clear Canvas History",acceptCallback:()=>e(cW()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},l8e=ht([$n],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),u8e=()=>{const e=Ke(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Te(l8e);return x(Jc,{trigger:"hover",triggerComponent:x(vt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(U8,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(La,{label:"Show Intermediates",isChecked:a,onChange:l=>e(hSe(l.target.checked))}),x(La,{label:"Show Grid",isChecked:o,onChange:l=>e(fSe(l.target.checked))}),x(La,{label:"Snap to Grid",isChecked:s,onChange:l=>e(gSe(l.target.checked))}),x(La,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(lSe(l.target.checked))}),x(La,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(aSe(l.target.checked))}),x(La,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(sSe(l.target.checked))}),x(La,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(dSe(l.target.checked))}),x(s8e,{}),x(a8e,{})]})})};function hb(){return(hb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function y9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(iO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=S9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(oO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(iO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...hb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),pb=function(e){return e.filter(Boolean).join(" ")},Sk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=pb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},iV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},b9=function(e){var t=iV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},zw=function(e){var t=iV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},c8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},d8e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},f8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=pb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(yk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(Sk,{className:"react-colorful__hue-pointer",left:t/360,color:b9({h:t,s:100,v:100,a:1})})))}),h8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:b9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(yk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(Sk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:b9(t)})))}),oV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function p8e(e,t,n){var r=y9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;oV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var g8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,m8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,v8e=function(e){g8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aO.set(t,n);var r=m8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},y8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+zw(Object.assign({},n,{a:0}))+", "+zw(Object.assign({},n,{a:1}))+")"},o=pb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(yk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(Sk,{className:"react-colorful__alpha-pointer",left:n.a,color:zw(n)})))},S8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=rV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);v8e(s);var l=p8e(n,i,o),u=l[0],h=l[1],p=pb(["react-colorful",t]);return le.createElement("div",hb({},a,{ref:s,className:p}),x(h8e,{hsva:u,onChange:h}),x(f8e,{hue:u.h,onChange:h}),le.createElement(y8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},b8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:d8e,fromHsva:c8e,equal:oV},x8e=function(e){return le.createElement(S8e,hb({},e,{colorModel:b8e}))};const aV=e=>{const{styleClass:t,...n}=e;return x(x8e,{className:`invokeai__color-picker ${t}`,...n})},w8e=ht([$n],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:db(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),C8e=()=>{const e=Ke(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Te(w8e);gt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),gt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(hW(t==="mask"?"base":"mask"))},a=()=>e(Y5e()),s=()=>e(fW(!r));return x(Jc,{trigger:"hover",triggerComponent:x(ra,{children:x(vt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(La,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(La,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(uSe(l.target.checked))}),x(aV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(iSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let l3;const _8e=new Uint8Array(16);function k8e(){if(!l3&&(l3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!l3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l3(_8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function E8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const P8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:P8e};function Jp(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||k8e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return E8e(r)}const T8e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},A8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},L8e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},M8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},u3=(e=M8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(B4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=g5();if(!S){t(pu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=T8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(pu(!1)),t(Kp(!0));return}const E=new FormData;E.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(A8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(L8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(oSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(pu(!1)),t(U3("Connected")),t(Kp(!0))},gb=e=>e.system,O8e=e=>e.system.toastQueue,I8e=ht([$n,Au,gb],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),R8e=()=>{const e=Ke(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Te(I8e);gt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),gt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["["],()=>{e(yw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),gt(["]"],()=>{e(yw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(vt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(q$,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(yw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(aV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(nSe(s))})]})})]})};let lO;const sV=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),N8e=ht([gb,$n,Au],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),D8e=()=>{const e=Ke(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Te(N8e),s=g5(),{openUploader:l}=sV();gt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),gt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),gt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=g5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(eSe({contentRect:_}))},p=()=>{e(lW()),e(uW())},m=()=>{e(u3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(Sd,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:_5e,onChange:E=>{const _=E.target.value;e(hW(_)),_==="mask"&&!r&&e(fW(!0))}}),x(C8e,{}),x(R8e,{}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(vt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(vt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(Y$,{}),onClick:v,isDisabled:t}),x(vt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(XS,{}),onClick:S,isDisabled:t}),x(vt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(j$,{}),onClick:w,isDisabled:t})]}),ne(ra,{isAttached:!0,children:[x(r8e,{}),x(o8e,{})]}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Upload",tooltip:"Upload",icon:x(V8,{}),onClick:l}),x(vt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(u8e,{})})]})},z8e=ht([$n],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),F8e=()=>{const e=Ke(),{doesCanvasNeedScaling:t}=Te(z8e);return C.exports.useLayoutEffect(()=>{const n=it.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ne("div",{className:"inpainting-main-area",children:[x(D8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(tCe,{}):x(t8e,{})})]})})})};function B8e(){const e=Ke();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ak,{optionsPanel:x(J6e,{}),styleClass:"inpainting-workarea-overrides",children:x(F8e,{})})}const $8e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Ef={txt2img:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Text To Image"},img2img:{title:x(B3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Twe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x($8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(F3e,{}),tooltip:"Post Processing"}},mb=it.map(Ef,(e,t)=>t);[...mb];function W8e(){const e=Te(u=>u.options.activeTab),t=Te(u=>u.options.isLightBoxOpen),n=Te(u=>u.gallery.shouldShowGallery),r=Te(u=>u.options.shouldShowOptionsPanel),i=Te(u=>u.gallery.shouldPinGallery),o=Te(u=>u.options.shouldPinOptionsPanel),a=Ke();gt("1",()=>{a(na(0))}),gt("2",()=>{a(na(1))}),gt("3",()=>{a(na(2))}),gt("4",()=>{a(na(3))}),gt("5",()=>{a(na(4))}),gt("z",()=>{a(ud(!t))},[t]),gt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x($B,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(FB,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return ne(zB,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(BB,{className:"app-tabs-panels",children:t?x(U6e,{}):l()})]})}const lV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},H8e=lV,uV=LS({name:"options",initialState:H8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=V3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=r5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=V3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=r5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=V3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...lV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=mb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload}}}),{clearInitialImage:cV,resetOptionsState:oTe,resetSeed:aTe,setActiveTab:na,setAllImageToImageParameters:V8e,setAllParameters:U8e,setAllTextToImageParameters:G8e,setCfgScale:dV,setCodeformerFidelity:fV,setCurrentTheme:j8e,setFacetoolStrength:q3,setFacetoolType:K3,setHeight:hV,setHiresFix:pV,setImg2imgStrength:x9,setInitialImage:c2,setIsLightBoxOpen:ud,setIterations:Y8e,setMaskPath:gV,setOptionsPanelScrollPosition:q8e,setParameter:sTe,setPerlin:K8e,setPrompt:vb,setSampler:mV,setSeamBlur:uO,setSeamless:vV,setSeamSize:cO,setSeamSteps:dO,setSeamStrength:fO,setSeed:d2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:X8e,setShouldGenerateVariations:Z8e,setShouldHoldOptionsPanelOpen:Q8e,setShouldLoopback:J8e,setShouldPinOptionsPanel:eke,setShouldRandomizeSeed:tke,setShouldRunESRGAN:nke,setShouldRunFacetool:rke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:ike,setShowDualDisplay:oke,setSteps:xV,setThreshold:ake,setTileSize:hO,setUpscalingLevel:w9,setUpscalingStrength:C9,setVariationAmount:ske,setWidth:wV}=uV.actions,lke=uV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const X3=Object.create(null);Object.keys(Ol).forEach(e=>{X3[Ol[e]]=e});const uke={type:"error",data:"parser error"},cke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dke=typeof ArrayBuffer=="function",fke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>cke&&t instanceof Blob?n?r(t):pO(t,r):dke&&(t instanceof ArrayBuffer||fke(t))?n?r(t):pO(new Blob([t]),r):r(Ol[e]+(t||"")),pO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},gO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},pke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:gke(e.substring(1),t)}:X3[n]?e.length>1?{type:X3[n],data:e.substring(1)}:{type:X3[n]}:uke},gke=(e,t)=>{if(pke){const n=hke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),mke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},vke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Ske=setTimeout,bke=clearTimeout;function yb(e,t){t.useNativeTimers?(e.setTimeoutFn=Ske.bind(Hc),e.clearTimeoutFn=bke.bind(Hc)):(e.setTimeoutFn=setTimeout.bind(Hc),e.clearTimeoutFn=clearTimeout.bind(Hc))}const xke=1.33;function wke(e){return typeof e=="string"?Cke(e):Math.ceil((e.byteLength||e.size)*xke)}function Cke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class _ke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,yb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new _ke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),_9=64,kke={};let mO=0,c3=0,vO;function yO(e){let t="";do t=LV[e%_9]+t,e=Math.floor(e/_9);while(e>0);return t}function MV(){const e=yO(+new Date);return e!==vO?(mO=0,vO=e):e+"."+yO(mO++)}for(;c3<_9;c3++)kke[LV[c3]]=c3;function OV(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Eke(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};vke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,mke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=MV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Tl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Tl extends Vr{constructor(t,n){super(),yb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=TV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new RV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Tl.requestsCount++,Tl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Tke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",SO);else if(typeof addEventListener=="function"){const e="onpagehide"in Hc?"pagehide":"unload";addEventListener(e,SO,!1)}}function SO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),d3=Hc.WebSocket||Hc.MozWebSocket,bO=!0,Mke="arraybuffer",xO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Oke extends AV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=xO?{}:TV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=bO&&!xO?n?new d3(t,n):new d3(t):new d3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Mke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{bO&&this.ws.send(o)}catch{}i&&NV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=MV()),this.supportsBinary||(t.b64=1);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!d3}}const Ike={websocket:Oke,polling:Lke},Rke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function k9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Rke.exec(e||""),o={},a=14;for(;a--;)o[Nke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Dke(o,o.path),o.queryKey=zke(o,o.query),o}function Dke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function zke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Nc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=k9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=k9(n.host).host),yb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Eke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=PV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Ike[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Nc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Nc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Nc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Nc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Nc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Wke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",Hke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function bk(e){return Bke&&(e instanceof ArrayBuffer||$ke(e))||Wke&&e instanceof Blob||Hke&&e instanceof File}function Z3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Yke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Uke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Gke,get PacketType(){return tn},Encoder:jke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Kke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Kke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}g1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class T9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,yb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new g1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||qke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Nc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xg={};function Q3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Fke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new T9(r,t):(Xg[i]||(Xg[i]=new T9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Q3,{Manager:T9,Socket:zV,io:Q3,connect:Q3});var Xke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Zke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Qke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(wO[t]||t||wO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return Jke(e)},P=function(){return eEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return CO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return CO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":tEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(Xke,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var wO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},CO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},Jke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},eEe=function(t){var n=t.getDay();return n===0&&(n=7),n},tEe=function(t){return(String(t).match(Zke)||[""]).pop().replace(Qke,"").replace(/GMT\+0000/g,"UTC")};const nEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(FL(!0)),t(U3("Connected")),t(M5e());const r=n().gallery;r.categories.user.latest_mtime?t(HL("user")):t(qC("user")),r.categories.result.latest_mtime?t(HL("result")):t(qC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(FL(!1)),t(U3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(j5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(mb[a]){case"img2img":{t(c2(h));break}}t(bw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(TSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(pu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(BL()),t(bw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(PSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(bw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(yW(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(cV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(U3("Model Changed")),t(pu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(pu(!1)),t(Kp(!0)),t(BL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},rEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},iEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},oEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,initialImage:S,iterations:w,perlin:P,prompt:E,sampler:_,seamBlur:T,seamless:M,seamSize:I,seamSteps:R,seamStrength:N,seed:z,seedWeights:$,shouldFitToWidthHeight:W,shouldForceOutpaint:j,shouldGenerateVariations:de,shouldRandomizeSeed:V,shouldRunESRGAN:J,shouldRunFacetool:ie,steps:Q,threshold:K,tileSize:G,upscalingLevel:Z,upscalingStrength:te,variationAmount:X,width:he}=r,{shouldDisplayInProgressType:ye,saveIntermediatesInterval:Se,enableImageDebugging:De}=o,ke={prompt:E,iterations:V||de?w:1,steps:Q,cfg_scale:s,threshold:K,perlin:P,height:p,width:he,sampler_name:_,seed:z,progress_images:ye==="full-res",progress_latents:ye==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(ke.seed=V?z$(L8,M8):z,["txt2img","img2img"].includes(n)&&(ke.seamless=M,ke.hires_fix=m),n==="img2img"&&S&&(ke.init_img=typeof S=="string"?S:S.url,ke.strength=v,ke.fit=W),n==="unifiedCanvas"&&t){const{layerState:{objects:ot},boundingBoxCoordinates:Ze,boundingBoxDimensions:et,inpaintReplace:Tt,shouldUseInpaintReplace:xt,stageScale:Le,isMaskEnabled:st,shouldPreserveMaskedArea:At}=i,Xe={...Ze,...et},yt=rEe(st?ot.filter(G8):[],Xe);ke.init_mask=yt,ke.fit=!1,ke.init_img=a,ke.strength=v,ke.invert_mask=At,xt&&(ke.inpaint_replace=Tt),ke.bounding_box=Xe;const cn=t.scale();t.scale({x:1/Le,y:1/Le});const wt=t.getAbsolutePosition(),Ut=t.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});De&&iEe([{base64:yt,caption:"mask sent as init_mask"},{base64:Ut,caption:"image sent as init_img"}]),t.scale(cn),ke.init_img=Ut,ke.progress_images=!1,ke.seam_size=I,ke.seam_blur=T,ke.seam_strength=N,ke.seam_steps=R,ke.tile_size=G,ke.force_outpaint=j}de?(ke.variation_amount=X,$&&(ke.with_variations=nye($))):ke.variation_amount=0;let ct=!1,Ge=!1;return J&&(ct={level:Z,strength:te}),ie&&(Ge={type:h,strength:u},h==="codeformer"&&(Ge.codeformer_fidelity=l)),De&&(ke.enable_image_debugging=De),{generationParameters:ke,esrganParameters:ct,facetoolParameters:Ge}},aEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(pu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=oEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(pu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(pu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(yW(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},sEe=()=>{const{origin:e}=new URL(window.location.href),t=Q3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=nEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:W,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=aEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{W(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},lEe=["cursorPosition"].map(e=>`canvas.${e}`),uEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),cEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),FV=XB({options:lke,gallery:RSe,system:$4e,canvas:SSe}),dEe=m$.getPersistConfig({key:"root",storage:g$,rootReducer:FV,blacklist:[...lEe,...uEe,...cEe],debounce:300}),fEe=B2e(dEe,FV),BV=Ive({reducer:fEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(sEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ke=_2e,Te=h2e;function J3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J3=function(n){return typeof n}:J3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},J3(e)}function hEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _O(e,t){for(var n=0;nx(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),yEe=ht(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),SEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Te(yEe),i=t?Math.round(t*100/n):0;return x(SB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function bEe(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function xEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(bEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Rn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(U0,{isOpen:t,onClose:r,children:[x(G0,{}),ne(Lv,{className:" modal hotkeys-modal",children:[x(Z7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(i)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(o)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(a)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(s)})]})]})})]})]})]})}const wEe=e=>{const{isProcessing:t,isConnected:n}=Te(l=>l.system),r=Ke(),{name:i,status:o,description:a}=e,s=()=>{r(Z$(i))};return ne("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(jz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},CEe=ht(e=>e.system,e=>{const t=it.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),_Ee=()=>{const{models:e}=Te(CEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(zf,{children:[x(Nf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Ff,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(wEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},kEe=ht([gb,F$],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldLoopback:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:it.map(o,(u,h)=>h),saveIntermediatesInterval:a,enableImageDebugging:s,shouldLoopback:l}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),EEe=({children:e})=>{const t=Ke(),n=Te(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v,shouldLoopback:S}=Te(kEe),w=()=>{QV.purge().then(()=>{o(),s()})},P=E=>{E>n&&(E=n),E<1&&(E=1),t(N4e(E))};return ne(Rn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(U0,{isOpen:r,onClose:o,children:[x(G0,{}),ne(Lv,{className:"modal settings-modal",children:[x(kS,{className:"settings-modal-header",children:"Settings"}),x(Z7,{className:"modal-close-btn"}),ne(Av,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(_Ee,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Sd,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:E=>t(T4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:P,value:m,width:"auto",textAlign:"center"})]}),x(aa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t($$(E.target.checked))}),x(aa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(O4e(E.target.checked))}),x(aa,{styleClass:"settings-modal-item",label:"Image to Image Loopback",isChecked:S,onChange:E=>t(J8e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(aa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(D4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:w,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(_S,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(nn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},PEe=ht(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),TEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Te(PEe),s=Ke();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(W$())},className:`status ${l}`,children:u})})},AEe=["dark","light","green"];function LEe(){const{setColorMode:e}=Wv(),t=Ke(),n=Te(i=>i.options.currentTheme),r=i=>{e(i),t(j8e(i))};return x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(Kz,{align:"stretch",children:AEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(H8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const MEe=ht([gb],e=>{const{isProcessing:t,model_list:n}=e,r=it.map(n,(o,a)=>a),i=it.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),OEe=()=>{const e=Ke(),{models:t,activeModel:n,isProcessing:r}=Te(MEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(Sd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(Z$(o.target.value))}})})},IEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:gW,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(TEe,{}),x(OEe,{}),x(xEe,{children:x(vt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(LEe,{}),x(vt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(vt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(vt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(EEe,{children:x(vt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(U8,{})})})]})]}),REe=ht(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),NEe=ht(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),DEe=()=>{const e=Ke(),t=Te(REe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Te(NEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(W$()),e(gw(!n))};return gt("`",()=>{e(gw(!n))},[n]),gt("esc",()=>{e(gw(!1))}),ne(Rn,{children:[n&&x(_W,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ne("div",{className:`console-entry console-${S}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(G$,{}),onClick:l})})]})};function zEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var FEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function f2(e,t){var n=BEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function BEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=FEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var $Ee=[".DS_Store","Thumbs.db"];function WEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&HEe(e.dataTransfer)?[2,jEe(e.dataTransfer,e.type)]:VEe(e)?[2,UEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,GEe(e)]:[2,[]]})})}function HEe(e){return m5(e)}function VEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function UEe(e){return M9(e.target.files).map(function(t){return f2(t)})}function GEe(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return f2(r)})]}})})}function jEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=M9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(YEe))]):[3,2];case 1:return r=i.sent(),[2,kO(WV(r))];case 2:return[2,kO(M9(e.files).map(function(o){return f2(o)}))]}})})}function kO(e){return e.filter(function(t){return $Ee.indexOf(t.name)===-1})}function M9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,LO(n)];if(e.sizen)return[!1,LO(n)]}return[!0,null]}function Pf(e){return e!=null}function uPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function v5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function f3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function OO(e){e.preventDefault()}function cPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function dPe(e){return e.indexOf("Edge/")!==-1}function fPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return cPe(e)||dPe(e)}function sl(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function APe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=y5(e,yPe),i=ZV(r),o=i.open,a=y5(i,SPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:WEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=XV;wk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var N9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return gPe(n)},[n]),j=C.exports.useMemo(function(){return pPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:RO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:RO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(LPe,N9),K=Fw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&hPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",OO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",OO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var ke=C.exports.useCallback(function(Ie){z?z(Ie):console.error(Ie)},[z]),ct=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie),Se.current=[].concat(wPe(Se.current),[Ie.target]),f3(Ie)&&Promise.resolve(i(Ie)).then(function(Je){if(!(v5(Ie)&&!N)){var Xt=Je.length,Yt=Xt>0&&uPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Ie)}}).catch(function(Je){return ke(Je)})},[i,u,ke,N,W,a,o,s,l,$]),Ge=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie);var Je=f3(Ie);if(Je&&Ie.dataTransfer)try{Ie.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Ie),!1},[p,N]),ot=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie);var Je=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=Je.indexOf(Ie.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),f3(Ie)&&h&&h(Ie))},[J,h,N]),Ze=C.exports.useCallback(function(Ie,Je){var Xt=[],Yt=[];Ie.forEach(function(Ee){var Ot=GV(Ee,W),ze=Fw(Ot,2),lt=ze[0],an=ze[1],Nn=jV(Ee,a,o),We=Fw(Nn,2),ft=We[0],nt=We[1],Nt=$?$(Ee):null;if(lt&&ft&&!Nt)Xt.push(Ee);else{var Zt=[an,nt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){Yt.push({file:Ee,errors:[lPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Je),Yt.length>0&&S&&S(Yt,Je),Xt.length>0&&v&&v(Xt,Je)},[Z,s,W,a,o,l,m,v,S,$]),et=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie),Se.current=[],f3(Ie)&&Promise.resolve(i(Ie)).then(function(Je){v5(Ie)&&!N||Ze(Je,Ie)}).catch(function(Je){return ke(Je)}),Z({type:"reset"})},[i,Ze,ke,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Ie={multiple:s,types:j};window.showOpenFilePicker(Ie).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Z({type:"closeDialog"})}).catch(function(Je){mPe(Je)?(V(Je),Z({type:"closeDialog"})):vPe(Je)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):ke(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):ke(Je)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,ke,j,s]),xt=C.exports.useCallback(function(Ie){!J.current||!J.current.isEqualNode(Ie.target)||(Ie.key===" "||Ie.key==="Enter"||Ie.keyCode===32||Ie.keyCode===13)&&(Ie.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),st=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(fPe()?setTimeout(Tt,0):Tt())},[M,Tt]),Xe=function(Je){return r?null:Je},yt=function(Je){return I?null:Xe(Je)},cn=function(Je){return R?null:Xe(Je)},wt=function(Je){N&&Je.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Ie.refKey,Xt=Je===void 0?"ref":Je,Yt=Ie.role,Ee=Ie.onKeyDown,Ot=Ie.onFocus,ze=Ie.onBlur,lt=Ie.onClick,an=Ie.onDragEnter,Nn=Ie.onDragOver,We=Ie.onDragLeave,ft=Ie.onDrop,nt=y5(Ie,bPe);return lr(lr(R9({onKeyDown:yt(sl(Ee,xt)),onFocus:yt(sl(Ot,Le)),onBlur:yt(sl(ze,st)),onClick:Xe(sl(lt,At)),onDragEnter:cn(sl(an,ct)),onDragOver:cn(sl(Nn,Ge)),onDragLeave:cn(sl(We,ot)),onDrop:cn(sl(ft,et)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),nt)}},[J,xt,Le,st,At,ct,Ge,ot,et,I,R,r]),_n=C.exports.useCallback(function(Ie){Ie.stopPropagation()},[]),vn=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Ie.refKey,Xt=Je===void 0?"ref":Je,Yt=Ie.onChange,Ee=Ie.onClick,Ot=y5(Ie,xPe),ze=R9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:Xe(sl(Yt,et)),onClick:Xe(sl(Ee,_n)),tabIndex:-1},Xt,ie);return lr(lr({},ze),Ot)}},[ie,n,s,et,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:vn,rootRef:J,inputRef:ie,open:Xe(Tt)})}function LPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},N9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},N9);default:return e}}function RO(){}const MPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return gt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Gf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},NO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Rr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(K8(u)):o==="img2img"&&t(c2(u))},OPe=e=>{const{children:t}=e,n=Ke(),r=Te(Rr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=sV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+` +`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(NO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(NO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(Z8.Provider,{value:P,children:ne("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(MPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},IPe=()=>{const e=Ke(),t=Te(r=>r.gallery.shouldPinGallery);return x(vt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(io(!0))},children:x(H$,{})})},RPe=ht(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),NPe=()=>{const e=Ke(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Te(RPe);return ne("div",{className:"show-hide-button-options",children:[x(vt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(q$,{})}),t&&ne(Rn,{children:[x(Q$,{iconButton:!0}),x(J$,{})]})]})},DPe=()=>{const e=Ke(),t=Te(O8e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(F4e())},[e,n,t])};zEe();const zPe=ht([e=>e.gallery,e=>e.options,e=>e.system,Rr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=it.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),FPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Te(zPe);return DPe(),x("div",{className:"App",children:ne(OPe,{children:[x(SEe,{}),ne("div",{className:"app-content",children:[x(IEe,{}),x(W8e,{})]}),x("div",{className:"app-console",children:x(DEe,{})}),e&&x(IPe,{}),t&&x(NPe,{})]})})};const QV=G2e(BV),BPe=lN({key:"invokeai-style-cache",prepend:!0});$w.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:BV,children:x($V,{loading:x(vEe,{}),persistor:QV,children:x(aJ,{value:BPe,children:x(Zme,{children:x(FPe,{})})})})})})); diff --git a/frontend/dist/assets/index.fc40251f.css b/frontend/dist/assets/index.fc40251f.css deleted file mode 100644 index 21806c4796..0000000000 --- a/frontend/dist/assets/index.fc40251f.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important;filter:drop-shadow(.5rem 0px 1rem var(--floating-button-drop-shadow-color))}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 633ebe4a16..bb40380432 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,8 @@ InvokeAI - A Stable Diffusion Toolkit - - + + From 6445e802f68c104b2622d80cdfdf77681641d42d Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:23:11 +1300 Subject: [PATCH 160/220] Fix Lightbox images of different res not centering --- frontend/src/features/lightbox/components/ReactPanZoom.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/lightbox/components/ReactPanZoom.tsx b/frontend/src/features/lightbox/components/ReactPanZoom.tsx index 9369087fbb..684c2f3b38 100644 --- a/frontend/src/features/lightbox/components/ReactPanZoom.tsx +++ b/frontend/src/features/lightbox/components/ReactPanZoom.tsx @@ -116,6 +116,7 @@ export default function ReactPanZoom({ alt={alt} ref={ref} className={styleClass ? styleClass : ''} + onLoad={() => centerView()} /> From 00da042dabe398a468d477efbca4e7464fcf1ebc Mon Sep 17 00:00:00 2001 From: Kent Keirsey <31807370+hipsterusername@users.noreply.github.com> Date: Mon, 21 Nov 2022 21:41:09 -0500 Subject: [PATCH 161/220] Update feature tooltip text --- frontend/src/app/features.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/features.ts b/frontend/src/app/features.ts index ade41a515f..57bde3efee 100644 --- a/frontend/src/app/features.ts +++ b/frontend/src/app/features.ts @@ -17,7 +17,7 @@ export enum Feature { } /** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip. * - * To-do: href & GuideImages are placeholders, and are not currently utilized, but will be updated (along with the tooltip UI) as feature and UI development and we get a better idea on where things "forever homes" will be . + * To-do: href & GuideImages are placeholders, and are not currently utilized, but will be updated (along with the tooltip UI) as feature and UI develop and we get a better idea on where things "forever homes" will be . */ export const FEATURES: Record = { [Feature.PROMPT]: { @@ -61,7 +61,7 @@ export const FEATURES: Record = { guideImage: 'asset/path.gif', }, [Feature.OUTPAINTING]: { - text: '', // TODO + text: 'Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, From 93de78b6e86c17a06821581bb2c867c15a96e062 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:54:57 +1300 Subject: [PATCH 162/220] Highlight mask icon when on mask layer --- .../components/IAICanvasToolbar/IAICanvasMaskOptions.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index 197aee78b7..f573bb3725 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -98,6 +98,11 @@ const IAICanvasMaskOptions = () => { aria-label="Masking Options" tooltip="Masking Options" icon={} + style={ + layer === 'mask' + ? { backgroundColor: 'var(--accent-color)' } + : { backgroundColor: 'var(--btn-base-color)' } + } /> } From 9a6a970771d5741d5e87e72e12a74f88f24d90a2 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:00:58 +1300 Subject: [PATCH 163/220] Fix gallery not resizing correctly on open and close --- frontend/src/features/gallery/components/ImageGallery.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 9e6934d79b..6e96178038 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -117,7 +117,8 @@ export default function ImageGallery() { const handleOpenGallery = () => { dispatch(setShouldShowGallery(true)); - shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)); + shouldPinGallery && + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }; const handleCloseGallery = useCallback(() => { @@ -128,6 +129,7 @@ export default function ImageGallery() { galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0 ) ); + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); }, [dispatch]); const handleClickLoadMore = () => { From 25b19b9ab830290c30bb2d86831ce210ae765164 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:10:52 +1300 Subject: [PATCH 164/220] Add loopback to just img2img. Remove from settings. --- .../components/ProcessButtons/ProcessButtons.tsx | 6 ++++++ .../components/SettingsModal/SettingsModal.tsx | 15 +-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx index e4d07a0224..2cf11a8a60 100644 --- a/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx +++ b/frontend/src/features/options/components/ProcessButtons/ProcessButtons.tsx @@ -1,13 +1,19 @@ import InvokeButton from './InvokeButton'; import CancelButton from './CancelButton'; +import LoopbackButton from './Loopback'; +import { useAppSelector } from 'app/store'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; /** * Buttons to start and cancel image generation. */ const ProcessButtons = () => { + const activeTabName = useAppSelector(activeTabNameSelector); + return (
+ {activeTabName === 'img2img' && }
); diff --git a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx index 706a40eb60..289bedfbe4 100644 --- a/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/frontend/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -32,11 +32,10 @@ import IAISelect from 'common/components/IAISelect'; import IAINumberInput from 'common/components/IAINumberInput'; import { systemSelector } from 'features/system/store/systemSelectors'; import { optionsSelector } from 'features/options/store/optionsSelectors'; -import { setShouldLoopback } from 'features/options/store/optionsSlice'; const selector = createSelector( [systemSelector, optionsSelector], - (system, options) => { + (system) => { const { shouldDisplayInProgressType, shouldConfirmOnDelete, @@ -46,8 +45,6 @@ const selector = createSelector( enableImageDebugging, } = system; - const { shouldLoopback } = options; - return { shouldDisplayInProgressType, shouldConfirmOnDelete, @@ -55,7 +52,6 @@ const selector = createSelector( models: _.map(model_list, (_model, key) => key), saveIntermediatesInterval, enableImageDebugging, - shouldLoopback, }; }, { @@ -97,7 +93,6 @@ const SettingsModal = ({ children }: SettingsModalProps) => { shouldDisplayGuides, saveIntermediatesInterval, enableImageDebugging, - shouldLoopback, } = useAppSelector(selector); /** @@ -178,14 +173,6 @@ const SettingsModal = ({ children }: SettingsModalProps) => { dispatch(setShouldDisplayGuides(e.target.checked)) } /> - ) => - dispatch(setShouldLoopback(e.target.checked)) - } - />
From f3b731668384661bac2674b99406e14f9a32df1f Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:22:40 +1300 Subject: [PATCH 165/220] Fix to gallery resizing --- frontend/src/features/gallery/components/ImageGallery.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 6e96178038..a120ab4749 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -117,8 +117,7 @@ export default function ImageGallery() { const handleOpenGallery = () => { dispatch(setShouldShowGallery(true)); - shouldPinGallery && - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); + shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)); }; const handleCloseGallery = useCallback(() => { From 7e4e51b224a14a3238d95cc9b701565905dc149a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:28:12 +1100 Subject: [PATCH 166/220] Removes Advanced checkbox, cleans up options panel for unified canvas --- frontend/src/app/features.ts | 8 ++- frontend/src/common/components/GuideIcon.tsx | 2 +- frontend/src/common/components/IAISelect.scss | 1 - .../BoundingBoxSettings.tsx | 70 ++++++++++--------- .../Inpainting/InpaintingSettings.tsx | 11 --- .../Inpainting/OutpaintingOptions.tsx | 13 +++- .../Inpainting/OutpaintingOptionsHeader.tsx | 11 --- .../ImageToImage/ImageToImagePanel.tsx | 5 +- .../TextToImage/TextToImagePanel.tsx | 5 +- .../UnifiedCanvas/UnifiedCanvasPanel.tsx | 34 ++++----- 10 files changed, 71 insertions(+), 89 deletions(-) delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx diff --git a/frontend/src/app/features.ts b/frontend/src/app/features.ts index 57bde3efee..f31b0dad98 100644 --- a/frontend/src/app/features.ts +++ b/frontend/src/app/features.ts @@ -14,6 +14,7 @@ export enum Feature { FACE_CORRECTION, IMAGE_TO_IMAGE, OUTPAINTING, + BOUNDING_BOX, } /** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip. * @@ -61,7 +62,12 @@ export const FEATURES: Record = { guideImage: 'asset/path.gif', }, [Feature.OUTPAINTING]: { - text: 'Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.', + text: 'Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.', + href: 'link/to/docs/feature3.html', + guideImage: 'asset/path.gif', + }, + [Feature.BOUNDING_BOX]: { + text: 'The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, diff --git a/frontend/src/common/components/GuideIcon.tsx b/frontend/src/common/components/GuideIcon.tsx index e3e32ea32e..c446024452 100644 --- a/frontend/src/common/components/GuideIcon.tsx +++ b/frontend/src/common/components/GuideIcon.tsx @@ -13,7 +13,7 @@ const GuideIcon = forwardRef( ({ feature, icon = MdHelp }: GuideIconProps, ref) => ( - + ) diff --git a/frontend/src/common/components/IAISelect.scss b/frontend/src/common/components/IAISelect.scss index 83df2d41bf..d4db363062 100644 --- a/frontend/src/common/components/IAISelect.scss +++ b/frontend/src/common/components/IAISelect.scss @@ -4,7 +4,6 @@ display: flex; column-gap: 1rem; align-items: center; - width: max-content; .invokeai__select-label { color: var(--text-color-secondary); diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx index 1bc0bb3260..b43b7c1223 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx @@ -1,3 +1,4 @@ +import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAISlider from 'common/components/IAISlider'; @@ -61,40 +62,43 @@ const BoundingBoxSettings = () => { }; return ( -
-
-

Canvas Bounding Box

-
-
- - -
-
+ + + + ); }; export default BoundingBoxSettings; + +export const BoundingBoxSettingsHeader = () => { + return ( + + Bounding Box + + ); +}; diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx deleted file mode 100644 index 33f97c1edd..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintingSettings.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import BoundingBoxSettings from './BoundingBoxSettings/BoundingBoxSettings'; -import InpaintReplace from './InpaintReplace'; - -export default function InpaintingSettings() { - return ( - <> - - - - ); -} diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx index 88c0e1117d..2c0263399a 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx @@ -1,4 +1,4 @@ -import { Flex } from '@chakra-ui/react'; +import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAISlider from 'common/components/IAISlider'; @@ -12,6 +12,7 @@ import { setTileSize, setShouldForceOutpaint, } from 'features/options/store/optionsSlice'; +import InpaintReplace from './InpaintReplace'; const selector = createSelector([optionsSelector], (options) => { const { @@ -46,6 +47,8 @@ const OutpaintingOptions = () => { return ( + + { }; export default OutpaintingOptions; + +export const OutpaintingHeader = () => { + return ( + + Outpainting Composition + + ); +}; diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx deleted file mode 100644 index b2df8b13fb..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Box } from '@chakra-ui/react'; - -const OutpaintingHeader = () => { - return ( - - Outpainting - - ); -}; - -export default OutpaintingHeader; diff --git a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx index ac9726acc8..64cc3d0893 100644 --- a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx +++ b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx @@ -62,10 +62,7 @@ export default function ImageToImagePanel() { styleClass="main-option-block image-to-image-strength-main-option" /> - - {showAdvancedOptions ? ( - - ) : null} + ); } diff --git a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx index 3451760b88..8e2fcb37d9 100644 --- a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx +++ b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx @@ -55,10 +55,7 @@ export default function TextToImagePanel() { - - {showAdvancedOptions ? ( - - ) : null} + ); } diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx index 7ab57687a0..6561898092 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -1,16 +1,15 @@ // import { Feature } from 'app/features'; import { Feature } from 'app/features'; import { RootState, useAppSelector } from 'app/store'; -import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; -import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import InpaintingSettings from 'features/options/components/AdvancedOptions/Inpainting/InpaintingSettings'; -import OutpaintingOptions from 'features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions'; -import OutpaintingHeader from 'features/options/components/AdvancedOptions/Inpainting/OutpaintingOptionsHeader'; +import BoundingBoxSettings, { + BoundingBoxSettingsHeader, +} from 'features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings'; +import OutpaintingOptions, { + OutpaintingHeader, +} from 'features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions'; import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; -import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; @@ -26,6 +25,11 @@ export default function UnifiedCanvasPanel() { ); const imageToImageAccordions = { + boundingBox: { + header: , + feature: Feature.BOUNDING_BOX, + options: , + }, outpainting: { header: , feature: Feature.OUTPAINTING, @@ -41,16 +45,6 @@ export default function UnifiedCanvasPanel() { feature: Feature.VARIATIONS, options: , }, - face_restore: { - header: , - feature: Feature.FACE_CORRECTION, - options: , - }, - upscale: { - header: , - feature: Feature.UPSCALE, - options: , - }, }; return ( @@ -62,11 +56,7 @@ export default function UnifiedCanvasPanel() { label="Image To Image Strength" styleClass="main-option-block image-to-image-strength-main-option" /> - - - {showAdvancedOptions && ( - - )} + ); } From 8488575e5c62b702d335ad78570faf584e20ce5c Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:39:08 +1300 Subject: [PATCH 167/220] Minor styling fixes to new options panel layout --- .../options/components/AccordionItems/AdvancedSettings.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss index 2f6e43319d..744a926851 100644 --- a/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss +++ b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss @@ -1,6 +1,7 @@ @use '../../../../styles/Mixins/' as *; .advanced-settings { + padding-top: 0.5rem; display: grid; row-gap: 0.5rem; } @@ -11,6 +12,7 @@ border: none; border-top: 0px; border-radius: 0.4rem; + background-color: var(--background-color-secondary); &[aria-expanded='true'] { background-color: var(--tab-hover-color); @@ -39,6 +41,7 @@ .advanced-settings-header { border-radius: 0.4rem; + font-weight: bold; &[aria-expanded='true'] { background-color: var(--tab-color); From ddfd82559f59affc9f6b9dc232b7ada2b976f703 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:46:39 +1300 Subject: [PATCH 168/220] Styling Updates --- .../options/components/AccordionItems/AdvancedSettings.scss | 2 +- frontend/src/styles/Themes/_Colors_Dark.scss | 4 ++-- frontend/src/styles/Themes/_Colors_Light.scss | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss index 744a926851..f2fd120454 100644 --- a/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss +++ b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss @@ -12,7 +12,7 @@ border: none; border-top: 0px; border-radius: 0.4rem; - background-color: var(--background-color-secondary); + background-color: var(--tab-panel-bg); &[aria-expanded='true'] { background-color: var(--tab-hover-color); diff --git a/frontend/src/styles/Themes/_Colors_Dark.scss b/frontend/src/styles/Themes/_Colors_Dark.scss index 64186bd260..0b6514fe0c 100644 --- a/frontend/src/styles/Themes/_Colors_Dark.scss +++ b/frontend/src/styles/Themes/_Colors_Dark.scss @@ -10,7 +10,7 @@ // App Colors --root-bg-color: rgb(10, 10, 10); - --background-color: rgb(20, 20, 26); + --background-color: rgb(26, 26, 32); --background-color-light: rgb(40, 44, 48); --background-color-secondary: rgb(16, 16, 22); @@ -40,7 +40,7 @@ // Tabs --tab-color: rgb(30, 32, 42); --tab-hover-color: rgb(36, 38, 48); - --tab-panel-bg: rgb(20, 22, 28); + --tab-panel-bg: var(--background-color-secondary); --tab-list-bg: var(--accent-color); --tab-list-text: rgb(202, 204, 216); --tab-list-text-inactive: rgb(92, 94, 114); diff --git a/frontend/src/styles/Themes/_Colors_Light.scss b/frontend/src/styles/Themes/_Colors_Light.scss index 3447a31068..27832e86f4 100644 --- a/frontend/src/styles/Themes/_Colors_Light.scss +++ b/frontend/src/styles/Themes/_Colors_Light.scss @@ -12,7 +12,7 @@ --root-bg-color: rgb(255, 255, 255); --background-color: rgb(220, 222, 224); --background-color-light: rgb(250, 252, 254); - --background-color-secondary: rgb(204, 206, 208); + --background-color-secondary: rgb(208, 210, 212); --text-color: rgb(0, 0, 0); --text-color-secondary: rgb(40, 40, 40); @@ -40,7 +40,7 @@ // Tabs --tab-color: rgb(202, 204, 206); --tab-hover-color: rgb(196, 198, 200); - --tab-panel-bg: rgb(214, 216, 218); + --tab-panel-bg: var(--background-color-secondary); --tab-list-bg: rgb(235, 185, 5); --tab-list-text: rgb(0, 0, 0); --tab-list-text-inactive: rgb(106, 108, 110); From 723dcf4236a094c98b3909bf6e0ffca488d1bbf1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:52:54 +1100 Subject: [PATCH 169/220] Adds infill method --- backend/invoke_ai_web_server.py | 4 + frontend/src/app/invokeai.d.ts | 1 + frontend/src/app/socketio/listeners.ts | 4 + .../src/common/util/parameterTranslation.ts | 2 + .../Inpainting/OutpaintingOptions.tsx | 73 ++++++++++++------- .../features/options/store/optionsSlice.ts | 6 ++ .../src/features/system/store/systemSlice.ts | 1 + 7 files changed, 66 insertions(+), 25 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 212f014f5a..76977f1fb6 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -21,6 +21,7 @@ from threading import Event from ldm.invoke.args import Args, APP_ID, APP_VERSION, calculate_init_img_hash from ldm.invoke.pngwriter import PngWriter, retrieve_metadata from ldm.invoke.prompt_parser import split_weighted_subprompts +from ldm.invoke.generator.inpaint import infill_methods from backend.modules.parameters import parameters_to_command from backend.modules.get_canvas_generation_mode import ( @@ -286,6 +287,7 @@ class InvokeAIWebServer: print(f">> System config requested") config = self.get_system_config() config["model_list"] = self.generate.model_cache.list_models() + config["infill_methods"] = infill_methods socketio.emit("systemConfig", config) @socketio.on("requestModelChange") @@ -821,6 +823,7 @@ class InvokeAIWebServer: generation_parameters.pop("seam_steps", None) generation_parameters.pop("tile_size", None) generation_parameters.pop("force_outpaint", None) + generation_parameters.pop("infill_method", None) elif actual_generation_mode == "txt2img": generation_parameters["height"] = original_bounding_box["height"] generation_parameters["width"] = original_bounding_box["width"] @@ -834,6 +837,7 @@ class InvokeAIWebServer: generation_parameters.pop("seam_steps", None) generation_parameters.pop("tile_size", None) generation_parameters.pop("force_outpaint", None) + generation_parameters.pop("infill_method", None) elif generation_parameters["generation_mode"] == "img2img": init_img_url = generation_parameters["init_img"] diff --git a/frontend/src/app/invokeai.d.ts b/frontend/src/app/invokeai.d.ts index 6c528c36e1..1cec582892 100644 --- a/frontend/src/app/invokeai.d.ts +++ b/frontend/src/app/invokeai.d.ts @@ -155,6 +155,7 @@ export declare type SystemGenerationMetadata = { export declare type SystemConfig = SystemGenerationMetadata & { model_list: ModelList; + infill_methods: string[]; }; export declare type ModelStatus = 'active' | 'cached' | 'not loaded'; diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index f7189766da..c67fb512fa 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -29,6 +29,7 @@ import { import { clearInitialImage, + setInfillMethod, setInitialImage, setMaskPath, } from 'features/options/store/optionsSlice'; @@ -340,6 +341,9 @@ const makeSocketIOListeners = ( }, onSystemConfig: (data: InvokeAI.SystemConfig) => { dispatch(setSystemConfig(data)); + if (!data.infill_methods.includes('patchmatch')) { + dispatch(setInfillMethod(data.infill_methods[0])); + } }, onModelChanged: (data: InvokeAI.ModelChangeResponse) => { const { model_name, model_list } = data; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 24a94b0850..e5d9ee7dad 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -46,6 +46,7 @@ export const frontendToBackendParameters = ( height, hiresFix, img2imgStrength, + infillMethod, initialImage, iterations, perlin, @@ -190,6 +191,7 @@ export const frontendToBackendParameters = ( generationParameters.seam_steps = seamSteps; generationParameters.tile_size = tileSize; generationParameters.force_outpaint = shouldForceOutpaint; + generationParameters.infill_method = infillMethod; } if (shouldGenerateVariations) { diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx index 2c0263399a..b856ef5974 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx @@ -1,6 +1,7 @@ import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; import IAISlider from 'common/components/IAISlider'; import IAISwitch from 'common/components/IAISwitch'; import { optionsSelector } from 'features/options/store/optionsSelectors'; @@ -11,28 +12,39 @@ import { setSeamSteps, setTileSize, setShouldForceOutpaint, + setInfillMethod, } from 'features/options/store/optionsSlice'; +import { systemSelector } from 'features/system/store/systemSelectors'; +import { ChangeEvent } from 'react'; import InpaintReplace from './InpaintReplace'; -const selector = createSelector([optionsSelector], (options) => { - const { - seamSize, - seamBlur, - seamStrength, - seamSteps, - tileSize, - shouldForceOutpaint, - } = options; +const selector = createSelector( + [optionsSelector, systemSelector], + (options, system) => { + const { + seamSize, + seamBlur, + seamStrength, + seamSteps, + tileSize, + shouldForceOutpaint, + infillMethod, + } = options; - return { - seamSize, - seamBlur, - seamStrength, - seamSteps, - tileSize, - shouldForceOutpaint, - }; -}); + const { infill_methods: availableInfillMethods } = system; + + return { + seamSize, + seamBlur, + seamStrength, + seamSteps, + tileSize, + shouldForceOutpaint, + infillMethod, + availableInfillMethods, + }; + } +); const OutpaintingOptions = () => { const dispatch = useAppDispatch(); @@ -43,6 +55,8 @@ const OutpaintingOptions = () => { seamSteps, tileSize, shouldForceOutpaint, + infillMethod, + availableInfillMethods, } = useAppSelector(selector); return ( @@ -115,7 +129,23 @@ const OutpaintingOptions = () => { withSliderMarks withReset /> + { + dispatch(setShouldForceOutpaint(e.target.checked)); + }} + /> + dispatch(setInfillMethod(e.target.value))} + /> { withSliderMarks withReset /> - { - dispatch(setShouldForceOutpaint(e.target.checked)); - }} - /> ); }; diff --git a/frontend/src/features/options/store/optionsSlice.ts b/frontend/src/features/options/store/optionsSlice.ts index ac7bcd5388..63ed8c2c1e 100644 --- a/frontend/src/features/options/store/optionsSlice.ts +++ b/frontend/src/features/options/store/optionsSlice.ts @@ -20,6 +20,7 @@ export interface OptionsState { height: number; hiresFix: boolean; img2imgStrength: number; + infillMethod: string; initialImage?: InvokeAI.Image | string; // can be an Image or url isLightBoxOpen: boolean; iterations: number; @@ -67,6 +68,7 @@ const initialOptionsState: OptionsState = { height: 512, hiresFix: false, img2imgStrength: 0.75, + infillMethod: 'patchmatch', isLightBoxOpen: false, iterations: 1, maskPath: '', @@ -390,6 +392,9 @@ export const optionsSlice = createSlice({ setShouldForceOutpaint: (state, action: PayloadAction) => { state.shouldForceOutpaint = action.payload; }, + setInfillMethod: (state, action: PayloadAction) => { + state.infillMethod = action.payload; + }, }, }); @@ -409,6 +414,7 @@ export const { setHeight, setHiresFix, setImg2imgStrength, + setInfillMethod, setInitialImage, setIsLightBoxOpen, setIterations, diff --git a/frontend/src/features/system/store/systemSlice.ts b/frontend/src/features/system/store/systemSlice.ts index 13ba7c459e..8eecb4efea 100644 --- a/frontend/src/features/system/store/systemSlice.ts +++ b/frontend/src/features/system/store/systemSlice.ts @@ -72,6 +72,7 @@ const initialSystemState: SystemState = { app_id: '', app_version: '', model_list: {}, + infill_methods: [], hasError: false, wasErrorSeen: true, isCancelable: true, From 8b08af714d6d5c9b2cd16c86e51e5c7758403d78 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:01:22 +1300 Subject: [PATCH 170/220] Tab Styling Fixes --- .../options/components/AccordionItems/AdvancedSettings.scss | 2 +- frontend/src/styles/Themes/_Colors_Dark.scss | 4 ++-- frontend/src/styles/Themes/_Colors_Green.scss | 2 +- frontend/src/styles/Themes/_Colors_Light.scss | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss index f2fd120454..59d1535d12 100644 --- a/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss +++ b/frontend/src/features/options/components/AccordionItems/AdvancedSettings.scss @@ -44,7 +44,7 @@ font-weight: bold; &[aria-expanded='true'] { - background-color: var(--tab-color); + background-color: var(--tab-hover-color); border-radius: 0.4rem 0.4rem 0 0; } diff --git a/frontend/src/styles/Themes/_Colors_Dark.scss b/frontend/src/styles/Themes/_Colors_Dark.scss index 0b6514fe0c..32ee0e963c 100644 --- a/frontend/src/styles/Themes/_Colors_Dark.scss +++ b/frontend/src/styles/Themes/_Colors_Dark.scss @@ -39,8 +39,8 @@ // Tabs --tab-color: rgb(30, 32, 42); - --tab-hover-color: rgb(36, 38, 48); - --tab-panel-bg: var(--background-color-secondary); + --tab-hover-color: rgb(46, 48, 58); + --tab-panel-bg: rgb(36, 38, 48); --tab-list-bg: var(--accent-color); --tab-list-text: rgb(202, 204, 216); --tab-list-text-inactive: rgb(92, 94, 114); diff --git a/frontend/src/styles/Themes/_Colors_Green.scss b/frontend/src/styles/Themes/_Colors_Green.scss index 0e2ffa7ed4..3fc4bfbcea 100644 --- a/frontend/src/styles/Themes/_Colors_Green.scss +++ b/frontend/src/styles/Themes/_Colors_Green.scss @@ -40,7 +40,7 @@ // Tabs --tab-color: rgb(40, 44, 48); --tab-hover-color: rgb(48, 52, 56); //done - --tab-panel-bg: var(--background-color-secondary); + --tab-panel-bg: rgb(36, 40, 44); --tab-list-bg: var(--accent-color); --tab-list-text: rgb(202, 204, 206); --tab-list-text-inactive: rgb(92, 94, 96); //done diff --git a/frontend/src/styles/Themes/_Colors_Light.scss b/frontend/src/styles/Themes/_Colors_Light.scss index 27832e86f4..1849cd5540 100644 --- a/frontend/src/styles/Themes/_Colors_Light.scss +++ b/frontend/src/styles/Themes/_Colors_Light.scss @@ -40,7 +40,7 @@ // Tabs --tab-color: rgb(202, 204, 206); --tab-hover-color: rgb(196, 198, 200); - --tab-panel-bg: var(--background-color-secondary); + --tab-panel-bg: rgb(206, 208, 210); --tab-list-bg: rgb(235, 185, 5); --tab-list-text: rgb(0, 0, 0); --tab-list-text-inactive: rgb(106, 108, 110); From c6112e329541ebd2b8cafd7850360f06d245addd Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:31:59 +1300 Subject: [PATCH 171/220] memoize outpainting options --- .../AdvancedOptions/Inpainting/OutpaintingOptions.tsx | 7 ++++++- .../components/UnifiedCanvas/UnifiedCanvasPanel.tsx | 10 ++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx index b856ef5974..29c8e2c0ab 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx @@ -15,8 +15,8 @@ import { setInfillMethod, } from 'features/options/store/optionsSlice'; import { systemSelector } from 'features/system/store/systemSelectors'; -import { ChangeEvent } from 'react'; import InpaintReplace from './InpaintReplace'; +import _ from 'lodash'; const selector = createSelector( [optionsSelector, systemSelector], @@ -43,6 +43,11 @@ const selector = createSelector( infillMethod, availableInfillMethods, }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, } ); diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx index 6561898092..f2645560cb 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -1,6 +1,5 @@ // import { Feature } from 'app/features'; import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; import BoundingBoxSettings, { BoundingBoxSettingsHeader, @@ -12,7 +11,6 @@ import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHea import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; import MainOptions from 'features/options/components/MainOptions/MainOptions'; import OptionsAccordion from 'features/options/components/OptionsAccordion'; import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; @@ -20,11 +18,7 @@ import PromptInput from 'features/options/components/PromptInput/PromptInput'; import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; export default function UnifiedCanvasPanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - - const imageToImageAccordions = { + const unifiedCanvasAccordions = { boundingBox: { header: , feature: Feature.BOUNDING_BOX, @@ -56,7 +50,7 @@ export default function UnifiedCanvasPanel() { label="Image To Image Strength" styleClass="main-option-block image-to-image-strength-main-option" /> - + ); } From 78217f5ef96ef159fdf4710af2a153aee18f9e8d Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:35:22 +1300 Subject: [PATCH 172/220] Fix unnecessary gallery re-renders --- frontend/src/features/gallery/components/ImageGallery.tsx | 1 - frontend/src/features/tabs/components/InvokeWorkarea.tsx | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index a120ab4749..76f4abdc20 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -81,7 +81,6 @@ export default function ImageGallery() { shouldEnableResize, } = useAppSelector(imageGallerySelector); - console.log(isLightBoxOpen); const { galleryMinWidth, galleryMaxWidth } = isLightBoxOpen ? { galleryMinWidth: LIGHTBOX_GALLERY_WIDTH, diff --git a/frontend/src/features/tabs/components/InvokeWorkarea.tsx b/frontend/src/features/tabs/components/InvokeWorkarea.tsx index 1ca3da314a..ec6637cc61 100644 --- a/frontend/src/features/tabs/components/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/components/InvokeWorkarea.tsx @@ -10,6 +10,7 @@ import { setShowDualDisplay, } from 'features/options/store/optionsSlice'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; +import _ from 'lodash'; const workareaSelector = createSelector( [(state: RootState) => state.options, activeTabNameSelector], @@ -21,6 +22,11 @@ const workareaSelector = createSelector( isLightBoxOpen, shouldShowDualDisplayButton: ['inpainting'].includes(activeTabName), }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, } ); From 2fcc7d9b369fe9c8b3d1b1e5017faf3aa45796c4 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:46:33 +1300 Subject: [PATCH 173/220] Isolate Cursor Pos debug text on canvas to prevent rerenders --- .../canvas/components/IAICanvasStatusText.tsx | 11 ++----- .../IAICanvasStatusTextCursorPos.tsx | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index 9ad9539463..baaee49a85 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -2,6 +2,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import IAICanvasStatusTextCursorPos from './IAICanvasStatusText/IAICanvasStatusTextCursorPos'; const roundToHundreth = (val: number): number => { return Math.round(val * 100) / 100; @@ -15,16 +16,11 @@ const selector = createSelector( stageCoordinates: { x: stageX, y: stageY }, boundingBoxDimensions: { width: boxWidth, height: boxHeight }, boundingBoxCoordinates: { x: boxX, y: boxY }, - cursorPosition, stageScale, shouldShowCanvasDebugInfo, layer, } = canvas; - const { cursorX, cursorY } = cursorPosition - ? { cursorX: cursorPosition.x, cursorY: cursorPosition.y } - : { cursorX: -1, cursorY: -1 }; - return { activeLayerColor: layer === 'mask' ? 'var(--status-working-color)' : 'inherit', @@ -42,7 +38,6 @@ const selector = createSelector( )}`, canvasDimensionsString: `${stageWidth}×${stageHeight}`, canvasScaleString: Math.round(stageScale * 100), - cursorCoordinatesString: `(${cursorX}, ${cursorY})`, shouldShowCanvasDebugInfo, }; }, @@ -52,6 +47,7 @@ const selector = createSelector( }, } ); + const IAICanvasStatusText = () => { const { activeLayerColor, @@ -62,7 +58,6 @@ const IAICanvasStatusText = () => { canvasCoordinatesString, canvasDimensionsString, canvasScaleString, - cursorCoordinatesString, shouldShowCanvasDebugInfo, } = useAppSelector(selector); @@ -84,7 +79,7 @@ const IAICanvasStatusText = () => {
{`Bounding Box Position: ${boundingBoxCoordinatesString}`}
{`Canvas Dimensions: ${canvasDimensionsString}`}
{`Canvas Position: ${canvasCoordinatesString}`}
-
{`Cursor Position: ${cursorCoordinatesString}`}
+ )}
diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx new file mode 100644 index 0000000000..5d383cf38d --- /dev/null +++ b/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx @@ -0,0 +1,31 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { useAppSelector } from 'app/store'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import React from 'react'; +import _ from 'lodash'; + +const cursorPositionSelector = createSelector( + [canvasSelector], + (canvas) => { + const { cursorPosition } = canvas; + + const { cursorX, cursorY } = cursorPosition + ? { cursorX: cursorPosition.x, cursorY: cursorPosition.y } + : { cursorX: -1, cursorY: -1 }; + + return { + cursorCoordinatesString: `(${cursorX}, ${cursorY})`, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +export default function IAICanvasStatusTextCursorPos() { + const { cursorCoordinatesString } = useAppSelector(cursorPositionSelector); + + return
{`Cursor Position: ${cursorCoordinatesString}`}
; +} From 006055149000b6cf85e3015163b7b848f38d0613 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:11:22 +1100 Subject: [PATCH 174/220] Fixes missing postprocessed image metadata before refresh --- backend/invoke_ai_web_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 76977f1fb6..0c62a48a92 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -663,8 +663,8 @@ class InvokeAIWebServer: "url": self.get_url_from_image_path(path), "thumbnail": self.get_url_from_image_path(thumbnail_path), "mtime": os.path.getmtime(path), - "metadata": metadata.get("sd-metadata"), - "dreamPrompt": metadata.get("Dream"), + "metadata": metadata, + "dreamPrompt": command, "width": width, "height": height, }, From dc5d696ed200d9481d8caa081d21dd55f87ac9c6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:12:42 +1100 Subject: [PATCH 175/220] Builds fresh bundle --- frontend/dist/assets/index.347ca347.css | 1 - frontend/dist/assets/index.499bc932.css | 1 + frontend/dist/assets/index.99dfa618.js | 623 ++++++++++++++++++++++++ frontend/dist/assets/index.cc411ac7.js | 623 ------------------------ frontend/dist/index.html | 4 +- 5 files changed, 626 insertions(+), 626 deletions(-) delete mode 100644 frontend/dist/assets/index.347ca347.css create mode 100644 frontend/dist/assets/index.499bc932.css create mode 100644 frontend/dist/assets/index.99dfa618.js delete mode 100644 frontend/dist/assets/index.cc411ac7.js diff --git a/frontend/dist/assets/index.347ca347.css b/frontend/dist/assets/index.347ca347.css deleted file mode 100644 index d69f2e8630..0000000000 --- a/frontend/dist/assets/index.347ca347.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.499bc932.css b/frontend/dist/assets/index.499bc932.css new file mode 100644 index 0000000000..6aec9ecf68 --- /dev/null +++ b/frontend/dist/assets/index.499bc932.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(26, 26, 32);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(46, 48, 58);--tab-panel-bg: rgb(36, 38, 48);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(208, 210, 212);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(206, 208, 210);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: rgb(36, 40, 44);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{padding-top:.5rem;display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem;background-color:var(--tab-panel-bg)}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem;font-weight:700}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.99dfa618.js b/frontend/dist/assets/index.99dfa618.js new file mode 100644 index 0000000000..b3cb25e5a5 --- /dev/null +++ b/frontend/dist/assets/index.99dfa618.js @@ -0,0 +1,623 @@ +function Eq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function R9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),dE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=dE&&e[dE]||e["@@iterator"],typeof e=="function"?e:null)}var IO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RO=Object.assign,NO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function DO(){}DO.prototype=Z0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}var D9=N9.prototype=new DO;D9.constructor=N9;RO(D9,Z0.prototype);D9.isPureReactComponent=!0;var fE=Array.isArray,zO=Object.prototype.hasOwnProperty,z9={current:null},BO={key:!0,ref:!0,__self:!0,__source:!0};function FO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)zO.call(t,r)&&!BO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,he=G[X];if(0>>1;Xi(De,te))$ei(He,De)?(G[X]=He,G[$e]=te,X=$e):(G[X]=De,G[Se]=te,X=Se);else if($ei(He,te))G[X]=He,G[$e]=te,X=$e;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,H=5,$=-1;function j(){return!(e.unstable_now()-$G||125X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})($O);(function(e){e.exports=$O})(e0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var HO=C.exports,ca=e0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fw=Object.prototype.hasOwnProperty,Wq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pE={},gE={};function Vq(e){return Fw.call(gE,e)?!0:Fw.call(pE,e)?!1:Wq.test(e)?gE[e]=!0:(pE[e]=!0,!1)}function Uq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var F9=/[\-:]([a-z])/g;function $9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(F9,$9);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(F9,$9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(F9,$9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Rp:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UO:return(e.displayName||"Context")+".Consumer";case VO:return(e._context.displayName||"Context")+".Provider";case V9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U9:return t=e.displayName||null,t!==null?t:Vw(e.type)||"Memo";case Ac:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function Yq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vw(t);case 8:return t===W9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=jO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ry(e){e._valueTracker||(e._valueTracker=qq(e))}function YO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){qO(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jw(e,t,n){(t!=="number"||r4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function QO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function JO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Xw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function xE(e){if(e=Fv(e)){if(typeof Qw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=_5(t),Qw(e.stateNode,e.type,t))}}function eI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function tI(){if(n0){var e=n0,t=r0;if(r0=n0=null,xE(e),t)for(e=0;e>>=0,e===0?32:31-(sK(e)/lK|0)|0}var oy=64,ay=4194304;function Jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function s4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ym),LE=String.fromCharCode(32),ME=!1;function xI(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function WK(e,t){switch(e){case"compositionend":return wI(t);case"keypress":return t.which!==32?null:(ME=!0,LE);case"textInput":return e=t.data,e===LE&&ME?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!J9&&xI(e,t)?(e=SI(),v3=X9=zc=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=NE(n)}}function EI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PI(){for(var e=window,t=r4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r4(e.document)}return t}function e7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QK(e){var t=PI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&EI(n.ownerDocument.documentElement,n)){if(r!==null&&e7(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=DE(n,o);var a=DE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,i6=null,bm=null,o6=!1;function zE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r4(r)||(r=zp,"selectionStart"in r&&e7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bm&&Jm(bm,r)||(bm=r,r=c4(i6,"onSelect"),0$p||(e.current=d6[$p],d6[$p]=null,$p--)}function Yn(e,t){$p++,d6[$p]=e.current,e.current=t}var rd={},Vi=fd(rd),To=fd(!1),qf=rd;function L0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function f4(){Zn(To),Zn(Vi)}function UE(e,t,n){if(Vi.current!==rd)throw Error(Ie(168));Yn(Vi,t),Yn(To,n)}function DI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ie(108,Yq(e)||"Unknown",i));return fr({},n,r)}function h4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function GE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=DI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var uu=null,k5=!1,ux=!1;function zI(e){uu===null?uu=[e]:uu.push(e)}function cX(e){k5=!0,zI(e)}function hd(){if(!ux&&uu!==null){ux=!0;var e=0,t=Pn;try{var n=uu;for(Pn=1;e>=a,i-=a,du=1<<32-xs(t)+i|n<z?(H=N,N=null):H=N.sibling;var $=m(E,N,T[z],M);if($===null){N===null&&(N=H);break}e&&N&&$.alternate===null&&t(E,N),_=o($,_,z),R===null?I=$:R.sibling=$,R=$,N=H}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;zz?(H=N,N=null):H=N.sibling;var j=m(E,N,$.value,M);if(j===null){N===null&&(N=H);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=H}if($.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!$.done;z++,$=T.next())$=p(E,$.value,M),$!==null&&(_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return nr&&vf(E,z),I}for(N=r(E,N);!$.done;z++,$=T.next())$=v(N,E,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ac&&QE(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=k3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=vx(T,E.mode,M),_.return=E,E=_}return a(E);case Ac:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);hy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=mx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=GI(!0),jI=GI(!1),$v={},xl=fd($v),rv=fd($v),iv=fd($v);function Lf(e){if(e===$v)throw Error(Ie(174));return e}function u7(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function YI(e){Lf(iv.current);var t=Lf(xl.current),n=qw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function c7(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=fd(0);function S4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cx=[];function d7(){for(var e=0;en?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function uR(){return Fa().memoizedState}function pX(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cR(e))dR(t,n);else if(n=HI(e,t,n,r),n!==null){var i=io();ws(n,e,r,i),fR(n,t,r)}}function gX(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cR(e))dR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=HI(e,t,i,r),n!==null&&(i=io(),ws(n,e,r,i),fR(n,t,r))}}function cR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function dR(e,t){xm=b4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:eP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,iR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:JE,useDebugValue:m7,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=JE(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),di===null)throw Error(Ie(349));(Xf&30)!==0||XI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,eP(QI.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,ZI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=fu,r=du;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[pl]=t,e[nv]=r,xR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=S4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Ir()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ir(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function _X(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var uP=!1;function EX(e,t){if(a6=l4,e=PI(),e7(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s6={focusedElem:e,selectionRange:n},l4=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:hs(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return S=uP,uP=!1,S}function wm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&C6(t,n,o)}i=i.next}while(i!==r)}}function T5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function _6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _R(e){var t=e.alternate;t!==null&&(e.alternate=null,_R(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[c6],delete t[lX],delete t[uX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kR(e){return e.tag===5||e.tag===3||e.tag===4}function cP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function k6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=d4));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Pi=null,ps=!1;function wc(e,t,n){for(n=n.child;n!==null;)ER(e,t,n),n=n.sibling}function ER(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(b5,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Pi,i=ps;Pi=null,wc(e,t,n),Pi=r,ps=i,Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Zm(e)):lx(Pi,n.stateNode));break;case 4:r=Pi,i=ps,Pi=n.stateNode.containerInfo,ps=!0,wc(e,t,n),Pi=r,ps=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&C6(n,t,a),i=i.next}while(i!==r)}wc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}wc(e,t,n);break;case 21:wc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,wc(e,t,n),Hi=r):wc(e,t,n);break;default:wc(e,t,n)}}function dP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ls(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Ir()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10e?16:e,Bc===null)var r=!1;else{if(e=Bc,Bc=null,_4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,ot=e.current;ot!==null;){var o=ot,a=o.child;if((ot.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lIr()-b7?Ff(e,0):S7|=n),Lo(e,t)}function RR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=io();e=yu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RR(e,n)}function NX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ie(314))}r!==null&&r.delete(t),RR(e,n)}var NR;NR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&BI(t,g4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,h4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E5,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=hs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=aP(null,t,r,e,n);break e;case 11:t=iP(null,t,r,e,n);break e;case 14:t=oP(null,t,r,hs(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),aP(e,t,r,i,n);case 3:e:{if(yR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,WI(e,t),y4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=R0(Error(Ie(423)),t),t=sP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Ie(424)),t),t=sP(e,t,r,n,i);break e}else for(oa=Yc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,vs=null,n=jI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=Su(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return YI(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),vR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return SR(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),iP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Yn(m4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=Su(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=pu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=hs(r,t.pendingProps),i=hs(r.type,i),oP(e,t,r,i,n);case 15:return gR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h4(t)):e=!1,o0(t,n),UI(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return bR(e,t,n);case 22:return mR(e,t,n)}throw Error(Ie(156,t.tag))};function DR(e,t){return lI(e,t)}function DX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(e,t,n,r){return new DX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function Zc(e,t){var n=e.alternate;return n===null?(n=Ia(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case GO:return L5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VO:a=10;break e;case UO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ac:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L5(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=GO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new BX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function FX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Il);const yy=R9(Il.exports);var SP=Il.exports;Bw.createRoot=SP.createRoot,Bw.hydrateRoot=SP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N5={exports:{}},D5={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function $R(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)YX.call(t,r)&&!KX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}D5.Fragment=jX;D5.jsx=$R;D5.jsxs=$R;(function(e){e.exports=D5})(N5);const $n=N5.exports.Fragment,x=N5.exports.jsx,re=N5.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Hv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var JX=QX(ZX),bP=()=>{};function xP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function HR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>xP(a,s)),[h,p]=C.exports.useState(()=>xP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?bP:_,setColorMode:t?bP:E,forced:t!==void 0}),[P,_,E,t]);return x(A7.Provider,{value:T,children:n})}HR.displayName="ColorModeProvider";var M6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",H="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[H]=ye[h]=ye[$]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,$e=Se||De||Function("return this")(),He=t&&!t.nodeType&&t,qe=He&&!0&&e&&!e.nodeType&&e,tt=qe&&qe.exports===He,Ze=tt&&Se.process,nt=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=nt&&nt.isTypedArray;function xt(U,ne,ge){switch(ge.length){case 0:return U.call(ne);case 1:return U.call(ne,ge[0]);case 2:return U.call(ne,ge[0],ge[1]);case 3:return U.call(ne,ge[0],ge[1],ge[2])}return U.apply(ne,ge)}function Le(U,ne){for(var ge=-1,Ke=Array(U);++ge-1}function S1(U,ne){var ge=this.__data__,Ke=qa(ge,U);return Ke<0?(++this.size,ge.push([U,ne])):ge[Ke][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=zu,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var ne=-1,ge=U==null?0:U.length;for(this.clear();++ne1?ge[zt-1]:void 0,yt=zt>2?ge[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Eh(ge[0],ge[1],yt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ke-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Od=$l(function(){return arguments}())?$l:function(U){return Wn(U)&&yn.call(U,"callee")&&!We.call(U,"callee")},Vl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Uu(U)}function Ph(U){return Wn(U)&&Ht(U)}var Vu=Zt||O1;function Uu(U){if(!Bo(U))return!1;var ne=Ns(U);return ne==v||ne==S||ne==u||ne==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Wn(U)||Ns(U)!=_)return!1;var ne=ln(U);if(ne===null)return!0;var ge=yn.call(ne,"constructor")&&ne.constructor;return typeof ge=="function"&&ge instanceof ge&&sn.call(ge)==Xt}var Ah=Tt?at(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?A1(U,!0):Ds(U)}var un=Ka(function(U,ne,ge,Ke){No(U,ne,ge,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=un})(M6,M6.exports);const yl=M6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),wP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=wP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=wP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function us(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var WR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...WR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...WR].join(" ")}var aZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},sZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function lZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},VR="& > :not(style) ~ :not(style)",cZ={[VR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[VR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},I6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},fZ=new Set(Object.values(I6)),UR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||UR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in I6?I6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=GR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var GR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||GR(e)||UR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:us("borderWidths"),borderStyles:us("borderStyles"),colors:us("colors"),borders:us("borders"),radii:us("radii",rn.px),space:us("space",by(rn.vh,rn.px)),spaceT:us("space",by(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:us("sizes",by(rn.vh,rn.px)),sizesT:us("sizes",by(rn.vh,rn.fraction)),shadows:us("shadows"),logical:rZ,blur:us("blur",rn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var pn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},R6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(R6,{shadow:R6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},P4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(P4,{flexDir:P4.flexDirection});var jR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},km={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},IZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function YR(e){return _s(e)&&e.reference?e.reference:String(e)}var z5=(e,...t)=>t.map(YR).join(` ${e} `).replace(/calc/g,""),CP=(...e)=>`calc(${z5("+",...e)})`,_P=(...e)=>`calc(${z5("-",...e)})`,N6=(...e)=>`calc(${z5("*",...e)})`,kP=(...e)=>`calc(${z5("/",...e)})`,EP=e=>{const t=YR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(CP(e,...t)),subtract:(...t)=>_f(_P(e,...t)),multiply:(...t)=>_f(N6(e,...t)),divide:(...t)=>_f(kP(e,...t)),negate:()=>_f(EP(e)),toString:()=>e.toString()}),{add:CP,subtract:_P,multiply:N6,divide:kP,negate:EP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function BZ(e,t=""){return[t,e].filter(Boolean).join("-")}function FZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${BZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:FZ(r,t)}}function HZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function WZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=WZ(e);return t||typeof e=="number"?`${e}px`:e}var qR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(qR));function PP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(L7(e));return new Set(t)}function TP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=PP(e),n=Object.entries(e).sort(qR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?TP(u):void 0,{_minW:TP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:PP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;HZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var _i={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Cc=e=>KR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ru=e=>KR(t=>e(t,"~ &"),"[data-peer]",".peer"),KR=(e,...t)=>t.map(e).join(", "),B5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Cc(_i.hover),_peerHover:ru(_i.hover),_groupFocus:Cc(_i.focus),_peerFocus:ru(_i.focus),_groupFocusVisible:Cc(_i.focusVisible),_peerFocusVisible:ru(_i.focusVisible),_groupActive:Cc(_i.active),_peerActive:ru(_i.active),_groupDisabled:Cc(_i.disabled),_peerDisabled:ru(_i.disabled),_groupInvalid:Cc(_i.invalid),_peerInvalid:ru(_i.invalid),_groupChecked:Cc(_i.checked),_peerChecked:ru(_i.checked),_groupFocusWithin:Cc(_i.focusWithin),_peerFocusWithin:ru(_i.focusWithin),_peerPlaceholderShown:ru(_i.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},GZ=Object.keys(B5);function AP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=AP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:P}=AP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=B5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:UZ(n.breakpoints)}),n}var M7=yl({},E3,pn,yZ,P4,Ta,SZ,TZ,bZ,jR,PZ,km,R6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Ta,P4,jR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(M7),...GZ],iQ={...M7,...B5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var XR=e=>t=>dQ({theme:t,pseudos:B5,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,$5--),$r}function sa(){return $r=Io2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Wv(e,P3()+(t<6&&wl()==32&&sa()==32))}function F6(e){for(;sa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&F6($r);break;case 40:e===41&&F6(e);break;case 92:sa();break}return Io}function LQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Wv(t,Io-1)+"*"+F5(e===47?e:sa())}function MQ(e){for(;!dv(wl());)sa();return Wv(e,Io)}function OQ(e){return nN(A3("",null,null,null,[""],e=tN(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=sa()){case 40:if(S!=108&&Ti(N,p-1)==58){B6(N+=wn(T3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=T3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(P3()-1,7);continue;case 47:switch(wl()){case 42:case 47:xy(IQ(LQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&xy(v>32?MP(N+";",r,n,p-1):MP(wn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(R=LP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)A3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:A3(e,R,R,r&&xy(LP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:A3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=T3(sa())),m=wl(),h=p=dl(T=N+=MQ(P3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function LP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=R7(m),S=0,w=0,P=0;S0?m[E]+" "+_:wn(_,/&\f/g,m[E])))&&(l[P++]=T);return H5(e,t,n,i===0?O7:s,l,u,h)}function IQ(e,t,n){return H5(e,t,n,ZR,F5(EQ()),cv(e,2,-2),0)}function MP(e,t,n,r){return H5(e,t,n,I7,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=R7(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+T4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~B6(e,"stretch")?iN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~B6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var WQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case I7:t.return=iN(t.value,t.length);break;case QR:return s0([Mg(t,{value:wn(t.value,"@","@"+gn)})],i);case O7:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[wn(o,/:(read-\w+)/,":"+T4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,":"+T4+"$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},VQ=[WQ],oN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fN=function(t){return t.charCodeAt(1)===45},RP=function(t){return t!=null&&typeof t!="boolean"},Sx=rN(function(e){return fN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),NP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!fN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function bJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},SN=xJ(bJ);function bN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var xN=e=>bN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function wN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var EJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,PJ=rN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},FP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},$P=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return cN(n,r,i),oJ(function(){return dN(n,r,i)}),null},MJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=$P(t,n,r),l=s||FP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var BJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),FJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),HJ=An("formError").parts("text","icon"),WJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function wy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function CN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function HP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function WP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var V6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function dee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=pee(e)),typeof e=="object"&&(iu(e.r)&&iu(e.g)&&iu(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):iu(e.h)&&iu(e.s)&&iu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):iu(e.h)&&iu(e.s)&&iu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=CN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),xx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),fs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=fs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=fs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=fs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:UP(n[4]),format:t?"name":"hex8"}:(n=fs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=fs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:UP(n[4]+n[4]),format:t?"name":"hex8"}:(n=fs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function iu(e){return Boolean(fs.CSS_UNIT.exec(String(e)))}var Vv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=cee(t)),this.originalInput=t;var i=dee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=CN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=WP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=WP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=HP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=HP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),VP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),lee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+VP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=wy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=wy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=wy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=wy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(_N(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=A4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A4([0,100],t.seed);var n=kN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return A4([r,i],t.seed)}function vee(e,t,n){var r=yee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return A4([r,i],n.seed)}function yee(e,t){for(var n=kN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=PN.find(function(a){return a.name===e});if(n){var r=EN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function kN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=PN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function EN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var PN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function bee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function GP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function _ee(e){const t=_N().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Eee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function TN(e){return Tee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(TN).join(` ${e} `).replace(/calc/g,""),jP=(...e)=>`calc(${eS("+",...e)})`,YP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,qP=(...e)=>`calc(${eS("/",...e)})`,KP=e=>{const t=TN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},cu=Object.assign(e=>({add:(...t)=>cu(jP(e,...t)),subtract:(...t)=>cu(YP(e,...t)),multiply:(...t)=>cu(U6(e,...t)),divide:(...t)=>cu(qP(e,...t)),negate:()=>cu(KP(e)),toString:()=>e.toString()}),{add:jP,subtract:YP,multiply:U6,divide:qP,negate:KP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function AN(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,AN(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${AN(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Bee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Fee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Hee=Nee({container:zee,button:Bee,panel:Fee,icon:$ee}),Wee=Dee({baseStyle:Hee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),la=ei("alert-fg"),bu=ei("alert-bg"),Uee=Uv({container:{bg:bu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[bu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[bu.variable]:`colors.${t}.200`},color:la.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),LN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Zee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...LN,...Zee,container:Qee},MN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:ON,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},XP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:XP.reference,"&:not([data-loaded])":{[XP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=ON(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function _c(e){const t=e!=="100%"?MN[e]:void 0;return ON({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ate={"2xs":_c(4),xs:_c(6),sm:_c(8),md:_c(12),lg:_c(16),xl:_c(24),"2xl":_c(32),full:_c("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},IN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(IN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:IN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=L3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:L3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Bte}=Pm,Fte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Fte,variants:zte,defaultProps:Bte},Hte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Wte={baseStyle:Hte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:qte}=rr(BJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function yp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=G6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(FJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(HJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:hu,defineMultiStyleConfig:Ane}=rr(WJ.keys),Lne=hu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),kc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Mne={lg:hu({field:kc.lg,addon:kc.lg}),md:hu({field:kc.md,addon:kc.md}),sm:hu({field:kc.sm,addon:kc.sm}),xs:hu({field:kc.xs,addon:kc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var One=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),Ine=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),Rne=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=hu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},mn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Bne={baseStyle:zne},Fne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Fne},{defineMultiStyleConfig:Hne,definePartsStyle:Wne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Wne({icon:Vne}),Gne=Hne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:j6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=j6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function cs(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={xs:cs("xs"),sm:cs("sm"),md:cs("md"),lg:cs("lg"),xl:cs("xl"),"2xl":cs("2xl"),"3xl":cs("3xl"),"4xl":cs("4xl"),"5xl":cs("5xl"),"6xl":cs("6xl"),full:cs("full")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},RN=hre,{defineMultiStyleConfig:pre,definePartsStyle:NN}=rr(jJ.keys),V7=Ui("number-input-stepper-width"),DN=Ui("number-input-input-padding"),gre=cu(V7).add("0.5rem").toString(),mre={[V7.variable]:"sizes.6",[DN.variable]:gre},vre=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[V7.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=NN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function _y(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=RN.fontSizes[o];return NN({field:{...r.field,paddingInlineEnd:DN.reference,verticalAlign:"top"},stepper:{fontSize:cu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:mn.variants,defaultProps:mn.defaultProps}),ZP,Cre={...(ZP=mn.baseStyle)==null?void 0:ZP.field,textAlign:"center"},_re={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},QP,kre={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),ky=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),JP=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[ky.variable]:"colors.white",bg:ky.reference,[Are.variable]:ky.reference,[JP.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[JP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Bre,definePartsStyle:nm}=rr(qJ.keys),Fre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(GP(),GP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ai(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Hre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),Wre=e=>({transitionProperty:"common",transitionDuration:"slow",...Fre(e)}),Vre=nm(e=>({label:$re,filledTrack:Wre(e),track:Hre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Bre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:M3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(L4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=M3(e=>{var t,n,r,i;return{label:(n=(t=L4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),Ey={paddingInlineEnd:"8"},eT,tT,nT,rT,iT,oT,aT,sT,nie={lg:{...(eT=mn.sizes)==null?void 0:eT.lg,field:{...(tT=mn.sizes)==null?void 0:tT.lg.field,...Ey}},md:{...(nT=mn.sizes)==null?void 0:nT.md,field:{...(rT=mn.sizes)==null?void 0:rT.md.field,...Ey}},sm:{...(iT=mn.sizes)==null?void 0:iT.sm,field:{...(oT=mn.sizes)==null?void 0:oT.sm.field,...Ey}},xs:{...(aT=mn.sizes)==null?void 0:aT.xs,field:{...(sT=mn.sizes)==null?void 0:sT.xs.field,...Ey},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:mn.variants,defaultProps:mn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Ex=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:tS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Rc=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...$7({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Rc.variable]:"colors.gray.200",_dark:{[Rc.variable]:"colors.whiteAlpha.200"},_disabled:{[Rc.variable]:"colors.gray.300",_dark:{[Rc.variable]:"colors.whiteAlpha.300"}},bg:Rc.reference}),hie=e=>{const{orientation:t}=e;return{...$7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:gv.reference,h:gv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Rc.variable]:`colors.${t}.500`,_dark:{[Rc.variable]:`colors.${t}.200`},bg:Rc.reference}},gie=tS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=tS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=tS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=tS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:zN}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=zN({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:zN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:O3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Hf=Ui("switch-track-height"),Px=Ui("switch-track-diff"),Iie=cu.subtract(Lm,Hf),Y6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Hf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Hf.reference],height:[Hf.reference],_checked:{transform:`translateX(${Y6.reference})`}},Die=O3(e=>({container:{[Px.variable]:Iie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:cu(Px).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:O3({container:{[Lm.variable]:"1.375rem",[Hf.variable]:"sizes.3"}}),md:O3({container:{[Lm.variable]:"1.875rem",[Hf.variable]:"sizes.4"}}),lg:O3({container:{[Lm.variable]:"2.875rem",[Hf.variable]:"sizes.6"}})},Bie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Fie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),M4={"&[data-is-numeric=true]":{textAlign:"end"}},Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Hie,striped:Wie,unstyled:{}},Uie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Fie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Wf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},doe=Wf({container:loe,label:uoe,closeButton:coe}),foe={sm:Wf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Wf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Wf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),lT,goe={...(lT=mn.baseStyle)==null?void 0:lT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},uT,moe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((uT=mn.variants)==null?void 0:uT.unstyled.field)??{}},cT,dT,fT,hT,voe={xs:((cT=mn.sizes)==null?void 0:cT.xs.field)??{},sm:((dT=mn.sizes)==null?void 0:dT.sm.field)??{},md:((fT=mn.sizes)==null?void 0:fT.md.field)??{},lg:((hT=mn.sizes)==null?void 0:hT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Py=Ui("tooltip-bg"),Tx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[Soe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Wee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:L4,CloseButton:Dte,Code:$te,Container:Wte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:mn,Kbd:Bne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Bie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Ooe=Moe,Ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Roe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Boe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Foe=Boe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Hoe=$oe,Woe={breakpoints:Eoe,zIndices:Foe,radii:Loe,blur:Hoe,colors:Toe,...RN,sizes:MN,shadows:Ooe,space:LN,borders:_oe,transition:zoe},Voe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Woe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function I3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!I3(e[r],t[r]))return!1;return!0}var o;if(Koe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!I3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Zoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!I3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return I3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function BN(){const e=Hv(),t=t1();return{...e,theme:t}}function Joe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return re(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function iae(){const{colorMode:e}=Hv();return x(Q5,{styles:t=>{const n=SN(t,"styles.global"),r=wN(n,{theme:t,colorMode:e});return r?XR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=bN(a,(p,m)=>oQ(m)),l=wN(e,t),u=Object.assign({},i,l,xN(s),o),h=XR(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Hv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function FN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=BN(),a=e?SN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},xN(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return FN(e,t)}function Ii(e,t={}){return FN(e,t)}function uae(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Fn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Fn(...e),e)}function pT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function gT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function mT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=pT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=gT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=gT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=mT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=mT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=pT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return q6(()=>()=>e.current.destroy()),e.current}var[mae,$N]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=$N(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Fn(o,i)}}function HN(){return[O4(mae),()=>O4($N()),()=>gae(),i=>vae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),vT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??vT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??vT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ct(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function yae(){return C.exports.useContext(rS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",I4=sh?C.exports.useLayoutEffect:C.exports.useEffect,WN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(WN),a=C.exports.useContext(n1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return I4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),I4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||xae.some(t=>vv(e[t]))}function VN(e){return Boolean(oS(e)||e.variants)}function wae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[yT(t),yT(n)])}function yT(e){return Array.isArray(e)?e.join(" "):e}const ou=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:ou(["layout","layoutId","drag"]),animation:ou(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ou(["exit"]),drag:ou(["drag","dragControls"]),focus:ou(["whileFocus"]),hover:ou(["whileHover","onHoverStart","onHoverEnd"]),tap:ou(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ou(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ou(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return aS(()=>{if(Mm.hasEverUpdated)return kae++})}const G7=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const UN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(WN).strict,E=C.exports.useContext(UN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return re(Pae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Oae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function j7(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const R4={};function Iae(e){Object.assign(R4,e)}const N4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(N4);function GN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!R4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>N4.indexOf(e)-N4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function jN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,YN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Bae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:YN(0,1)}),Ty=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ec=Yv("deg"),_l=Yv("%"),wt=Yv("px"),Fae=Yv("vh"),$ae=Yv("vw"),ST=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),Y7=(e,t)=>n=>Boolean(jv(n)&&Bae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),qN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:Y7("hsl","hue"),parse:qN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Hae=YN(0,255),Lx=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Hae(e))}),$c={test:Y7("rgb","red"),parse:qN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Om(Im.transform(r))+")"};function Wae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const X6={test:Y7("#"),parse:Wae,transform:$c.transform},eo={test:e=>$c.test(e)||X6.test(e)||If.test(e),parse:e=>$c.test(e)?$c.parse(e):If.test(e)?If.parse(e):X6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?$c.transform(e):If.transform(e)},KN="${c}",XN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function ZN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,KN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,XN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function QN(e){return ZN(e).values}function JN(e){const{values:t,numColors:n,tokenised:r}=ZN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Gae(e){const t=QN(e);return JN(e)(t.map(Uae))}const xu={test:Vae,parse:QN,createTransformer:JN,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},xu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),bT={...lh,transform:Math.round},eD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Ec,rotateX:Ec,rotateY:Ec,rotateZ:Ec,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Ec,skewX:Ec,skewY:Ec,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:ST,originY:ST,originZ:wt,zIndex:bT,fillOpacity:Im,strokeOpacity:Im,numOctaves:bT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(jN(m)){o[m]=v;continue}const S=eD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function tD(e,t,n){for(const r in t)!ks(t[r])&&!GN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return tD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...tse,...Jae,...Qae,...ese]);function D4(e){return nse.has(e)}let nD=e=>!D4(e);function rse(e){!e||(nD=t=>t.startsWith("on")?!D4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(nD(i)||n===!0&&D4(i)||!t&&!D4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function xT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function ose(e,t,n){const r=xT(t,e.x,e.width),i=xT(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=ose(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&lse(p,o,a,s,!1)}const rD=()=>({...K7(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=rD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};tD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const iD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function oD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const aD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function sD(e,t,n,r){oD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(aD.has(i)?i:iD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||GN(r,e))&&(n[r]=t[r]);return n}function lD(e){const t=Z7(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),uD=e=>bv(e)?e[e.length-1]||0:e;function R3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const cD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():aS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=R3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=VN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const pse={useVisualState:cD({scrapeMotionValuesFromProps:lD,createRenderState:rD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),sD(t,n)}})},gse={useVisualState:cD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?pse:gse,preloadedFeatures:n,useRender:cse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function dD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function fD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:fD(e)?bse(e,t):xse(e,t)}}const hD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function pD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return sS(e,pD(t),hD(n,t==="pointerdown"),r)}function z4(e,t,n,r){return Q6(e,pD(t),n&&hD(n,t==="pointerdown"),r)}function gD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const wT=gD("dragHorizontal"),CT=gD("dragVertical");function mD(e){let t=!1;if(e==="y")t=CT();else if(e==="x")t=wT();else{const n=wT(),r=CT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function vD(){const e=mD(!0);return e?(e(),!1):!0}function _T(e,t,n){return(r,i)=>{!dD(r)||vD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z4(r,"pointerenter",e||n?_T(r,!0,e):void 0,{passive:!e}),z4(r,"pointerleave",t||n?_T(r,!1,t):void 0,{passive:!t})}const yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1;function e_(e){return C.exports.useEffect(()=>()=>e(),[])}function SD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Mx=.001,Ase=.01,kT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=kT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,kT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Ise=12;function Rse(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ET(e,Dse)&&ET(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=SD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=PT,S=PT;function w(){const P=h?-(h/1e3):0,E=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const M=J6(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const PT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Bse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Fse=[X6,$c,If],AT=e=>Fse.find(t=>t.test(e)),bD=(e,t)=>{let n=AT(e),r=AT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=TT(i),n=$c),r===If&&(o=TT(o),r=$c);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Bse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce($se);function xD(e,t){return eC(e)?n=>wr(e,t,n):eo.test(e)?bD(e,t):CD(e,t)}const wD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>xD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function LT(e){const t=xu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=xu.createTransformer(t),r=LT(e),i=LT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(wD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Wse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Wse;if(typeof e=="string")return eo.test(e)?bD:CD;if(Array.isArray(e))return wD;if(typeof e=="object")return Hse}function Use(e,t,n){const r=[],i=n||Vse(e[0]),o=e.length-1;for(let a=0;an(xv(e,t,r))}function jse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=xv(e[o],e[o+1],i);return t[o](s)}}function _D(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;B4(o===t.length),B4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),kD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=kD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},ED=1.525,Kse=4/11,Xse=8/11,Zse=9/10,r_=e=>e,i_=Yse(2),Qse=uS(i_),PD=n_(i_),TD=e=>1-Math.sin(Math.acos(e)),o_=uS(TD),Jse=n_(o_),a_=kD(ED),ele=uS(a_),tle=n_(a_),nle=qse(ED),rle=4356/361,ile=35442/1805,ole=16061/1805,$4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-$4(1-e*2)):.5*$4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||PD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function N3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=cle(r&&r.length===a.length?r:ule(a),i);function l(){return _D(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const MT={keyframes:N3,spring:t_,decay:dle};function fle(e){if(Array.isArray(e.to))return N3;if(MT[e.type])return MT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t_:N3}const AD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),LD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),AD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const yle=e=>cS[e].process(p0),MD=e=>{wv=!1,p0.delta=tC?AD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,nC=!0,qv.forEach(yle),nC=!1,wv&&(tC=!1,LD(MD))},Sle=()=>{wv=!0,tC=!0,nC||LD(MD)},ble=()=>p0;function OD(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?OD(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function ID(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=SD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=_D([0,100],[r,P],{clamp:!1}),r=0,P=100);const H=z(Object.assign(Object.assign({},w),{from:r,to:P}));function $(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=OD(a,T,u),l==="mirror"&&H.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=H.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_{p?.(),E.stop()}}}function RD(e,t){return t?e*(1e3/t):0}function _le({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=H=>{R=N,N=H,t=RD(H-R,ble().delta),(I===1&&H>M||I===-1&&HS?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),OT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s_(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=OT(e)&&OT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ND=(e,t)=>1-3*t+3*e,DD=(e,t)=>3*t-6*e,zD=e=>3*e,H4=(e,t,n)=>((ND(t,n)*e+DD(t,n))*e+zD(t))*e,BD=(e,t,n)=>3*ND(t,n)*e*e+2*DD(t,n)*e+zD(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H4(o(a),t,r)}function Ole({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!vD()}function p(S,w){!h()||(yD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}z4(i,"pointerdown",o?v:void 0,l),e_(u)}const Ile="production",FD=typeof process>"u"||process.env===void 0?Ile:"production",IT=new Set;function $D(e,t,n){e||IT.has(t)||(console.warn(t),n&&console.warn(n),IT.add(t))}const iC=new WeakMap,Ix=new WeakMap,Rle=e=>{const t=iC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Ix.has(n)||Ix.set(n,{});const r=Ix.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Ble({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Hle:$le)(a,o.current,e,i)}const Fle={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Fle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Hle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(FD!=="production"&&$D(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Hc=e=>t=>(e(t),null),Wle={inView:Hc(Ble),tap:Hc(Ole),focus:Hc(vse),hover:Hc(Pse)};function l_(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function HD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gle={linear:r_,easeIn:i_,easeInOut:PD,easeOut:Qse,circIn:TD,circInOut:Jse,circOut:o_,backIn:a_,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:$4},RT=e=>{if(Array.isArray(e)){B4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",NT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&xu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Rx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),DT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:My,scaleY:My,scale:My,opacity:Rx,backgroundColor:Rx,color:Rx,default:My},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=DT[e]||DT.default,{to:t,...n(t)}},Kle={...eD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:Z6,WebkitFilter:Z6},u_=e=>Kle[e];function c_(e,t){var n;let r=u_(e);return r!==Z6&&(r=xu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},WD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),VD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),WD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Kv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),eue=e=>dS[e].process(g0),UD=e=>{Cv=!1,g0.delta=oC?WD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,aC=!0,Kv.forEach(eue),aC=!1,Cv&&(oC=!1,VD(UD))},tue=()=>{Cv=!0,oC=!0,aC||VD(UD)},sC=()=>g0;function GD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(RT):RT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function iue(e,t){var n,r;return(r=(n=(d_(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=d_(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=NT(e,n);a==="none"&&s&&typeof n=="string"?a=c_(e,n):zT(a)&&typeof n=="string"?a=BT(n):!Array.isArray(n)&&zT(n)&&typeof a=="string"&&(n=BT(a));const l=NT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?_le({...p,...o}):ID({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=uD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function zT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function BT(e){return typeof e=="number"?0:c_("",e)}function d_(e,t){return e[t]||e.default||e}function f_(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=GD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function h_(e,t){e.indexOf(t)===-1&&e.push(t)}function p_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return h_(this.subscriptions,t),()=>p_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=cue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?RD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function B0(e){return new due(e)}const jD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},YD=[lh,wt,_l,Ec,$ae,Fae,fue],Rg=e=>YD.find(jD(e)),hue=[...YD,eo,xu],pue=e=>hue.find(jD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,B0(n))}function yue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=uD(o[a]);vue(e,a,s)}}function Sue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;slC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=qD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>qD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function qD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=f_(m,v,S,w);V4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(_ue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g_=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...g_].reverse(),Pue=g_.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{$=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!HD(K,G)||H?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(Q=>({animation:Q,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:Hc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Hc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l_(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class KD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s_(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Dx(h,this.transformPagePoint),dD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},fD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function FT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:FT(e,XD(t)),offset:FT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function XD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=XD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function da(e){return e.max-e.min}function $T(e,t=0,n=.01){return s_(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function UT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zue(e,{top:t,left:n,bottom:r,right:i}){return{x:UT(e.x,n,i),y:UT(e.y,t,r)}}function GT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uC=.35;function Hue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:jT(e,"left","right"),y:jT(e,"top","bottom")}}function jT(e,t,n){return{min:YT(e,t),max:YT(e,n)}}function YT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const qT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:qT(),y:qT()}),KT=()=>({min:0,max:0}),Ei=()=>({x:KT(),y:KT()});function ul(e){return[e("x"),e("y")]}function ZD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Bx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Bx(e)||!Bx(t)||!Bx(n)}function Sf(e){return cC(e)||QD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function QD(e){return XT(e.x)||XT(e.y)}function XT(e){return e&&e!=="0%"}function U4(e,t,n){const r=e-n,i=t*r;return n+i}function ZT(e,t,n,r,i){return i!==void 0&&(e=U4(e,i,r)),U4(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=ZT(e.min,t,n,r,i),e.max=ZT(e.max,t,n,r,i)}function JD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Uue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=da(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new KD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Hue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Bue(i.layout.actual,o);if(n){const s=n(Wue(a));this.hasMutatedConstraints=!!s,s&&(a=ZD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f_(t,r,0,n)}stopAnimation(){ul(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ul(n=>{const{drag:r}=this.getProps();if(!Oy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Fue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new KD(h,l,{transformPagePoint:s})}z4(i,"pointerdown",o&&u),e_(()=>a.current&&a.current.end())}const Jue={pan:Hc(Que),drag:Hc(Zue)},fC={current:null},tz={current:!1};function ece(){if(tz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Iy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Iy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Iy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Iy[i]]=o=>r.add(o),n["notify"+Iy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),V4(r)&&r.add(i);else if(ks(a))e.addValue(i,B0(o)),V4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,B0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const nz=Object.keys(yv),rce=nz.length,rz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const H={..._},$=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),V4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=oS(p),Z=VN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),tz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,$e){const He=[];for(let qe=0;qete.scheduleRender(),animationType:typeof tt=="string"?tt:"both",initialPromotionConfig:$e,layoutScroll:Tt})}return He},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=B0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){H[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=Q7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return $[X]!==void 0&&Se===void 0?void 0:H[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),az=e=>sce.has(e),lce=e=>Object.keys(e).some(az),sz=(e,t)=>{e.set(t,!1),e.set(t)},JT=e=>e===lh||e===wt;var eA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(eA||(eA={}));const tA=(e,t)=>parseFloat(e.split(", ")[t]),nA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return tA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?tA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=N4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const rA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nA(4,13),y:nA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=rA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);sz(h,s[u]),e[u]=rA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(az);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const lz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=u_(t);return n&&n.default||0}else{const n=mce(e),r=(jN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ez(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:oD},vce=rz(lz),yce=rz({...lz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=u_(t))===null||n===void 0?void 0:n.default)||0:(t=aD.has(t)?t:iD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:lD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:sD}),Sce=(e,t)=>j7(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function iA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=iA(e,t.target.x),r=iA(e,t.target.y);return`${n}% ${r}%`}},oA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(oz,v=>(o.push(v),oA)));const a=xu.parse(e);if(a.length>5)return r;const s=xu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(oA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=l_(),r=C.exports.useContext(G7);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(UN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:B0(e);return f_("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const uz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=uz.length,aA=e=>typeof e=="string"?parseFloat(e):e,sA=e=>typeof e=="number"||wt.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(xv(e,t,r))}function uA(e,t){e.min=t.min,e.max=t.max}function ds(e,t){uA(e.x,t.x),uA(e.y,t.y)}function cA(e,t,n,r,i){return e-=t,e=U4(e,1/n,r),i!==void 0&&(e=U4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=cA(e.min,t,n,s,i),e.max=cA(e.max,t,n,s,i)}function dA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function fA(e,t,n,r){dA(e.x,t,Mce,n?.x,r?.x),dA(e.y,t,Oce,n?.y,r?.y)}function hA(e){return e.translate===0&&e.scale===1}function dz(e){return hA(e.x)&&hA(e.y)}function fz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function pA(e){return da(e.x)/da(e.y)}function Ice(e,t,n=.1){return s_(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){h_(this.members,t),t.scheduleRender()}remove(t){if(p_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function gA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){h_(this.children,t),this.isDirty=!0}remove(t){p_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const mA=["","X","Y","Z"],vA=1e3;function hz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Wce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=GD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(SA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!fz(this.targetLayout,w)||S,H=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,H);const $={...d_(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&SA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Jf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Uce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));CA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var _;const T=E/1e3;bA(m.x,a.x,T),bA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,vA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,vA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&pz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ds(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(yA),this.root.sharedNodes.clear()}}}function Bce(e){e.updateLayout()}function Fce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):pz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!dz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),fz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function yA(e){e.clearMeasurements()}function Hce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function SA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Wce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function bA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xA(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){xA(e.x,t.x,n.x,r),xA(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function wA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function CA(e){wA(e.x),wA(e.y)}function pz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(pA(t),pA(n),.2)}const Xce=hz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fx={current:void 0},Zce=hz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fx.current=e}return Fx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Wle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function gz(){const e=C.exports.useRef(!1);return I4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=gz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const gd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",$D(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=gz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(I4(()=>{w.current=!1,rde(h,S),v.current=p}),e_(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x($n,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x($x,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),FD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x($n,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function mC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,kA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(kA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(kA.enter,i)})},vz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(gd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});vz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},yz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(gd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...yz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},Sz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(gd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...Sz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var EA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??Ps.exit(EA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??Ps.enter(EA.enter,r),transitionEnd:t?.enter}}},bz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(gd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});bz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(gd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,pS]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[yde,m_]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Sde,GPe,bde,xde]=HN(),Nf=Pe(function(t,n){const{getButtonProps:r}=m_(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,v_]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v_(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(H={},$=null){return{...H,type:"button",ref:Fn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx(H.onClick,T),onFocus:Hx(H.onFocus,I),onKeyDown:Hx(H.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function(H={},$=null){return{...H,ref:$,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){hS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Pde(e){hS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Tde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=m_(),{reduceMotion:r}=v_(),i=Zv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Bf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v_(),{getPanelProps:s,isOpen:l}=m_(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(vz,{in:l,...i,children:m})});Bf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Ode(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function PA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Ide,Rde]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Nde,y_]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),xz={info:{icon:Ode,colorScheme:"blue"},warning:{icon:PA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:PA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return xz[e].colorScheme}function zde(e){return xz[e].icon}var wz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});wz.displayName="Alert";var Cz=Pe(function(t,n){const i={display:"inline",...y_().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});Cz.displayName="AlertDescription";function _z(e){const{status:t}=Rde(),n=zde(t),r=y_(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}_z.displayName="AlertIcon";var kz=Pe(function(t,n){const r=y_();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});kz.displayName="AlertTitle";function Bde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Fde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G4.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Fde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Bde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:G4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G4,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,[Hde,Wde]=Cn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Vde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var $a=Pe((e,t)=>{const n=Wde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=vn(e),_=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":TA(a),"data-loading":TA(o),__css:_,className:SS("chakra-button",w),...E},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(AA,{...I})):x(AA,{...I}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function AA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re($n,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Hde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Ry=e=>e?"":void 0,Wx=e=>e?!0:void 0;function LA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Gde,a1]=Cn({strict:!1,name:"FormControlContext"});function jde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Fn(z,H=>{!H||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Ry(P),"data-disabled":Ry(i),"data-invalid":Ry(r),"data-readonly":Ry(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Fn(z,H=>{!H||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var md=Pe(function(t,n){const r=Ii("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});md.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Ez(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function S_(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b_(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b_(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:LA(t?.onFocus,h),onBlur:LA(t?.onBlur,p)}}var[qde,Kde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=vn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Pz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Pz=Pe(function(t,n){const r=a1(),i=Ez();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Pz.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var x_={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:x_});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:x_});Jde.displayName="VisuallyHiddenInput";var MA=!1,bS=null,F0=!1,bC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function w_(e,t){bC.forEach(n=>n(e,t))}function OA(e){F0=!0,tfe(e)&&(bS="keyboard",w_("keyboard",e))}function Sp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(F0=!0,w_("pointer",e))}function nfe(e){e.target===window||e.target===document||(F0||(bS="keyboard",w_("keyboard",e)),F0=!1)}function rfe(){F0=!1}function IA(){return bS!=="pointer"}function ife(){if(typeof window>"u"||MA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){F0=!0,e.apply(this,n)},document.addEventListener("keydown",OA,!0),document.addEventListener("keyup",OA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),MA=!0}function ofe(e){ife(),e(IA());const t=()=>e(IA());return bC.add(t),()=>{bC.delete(t)}}var[jPe,afe]=Cn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Tz(e={}){const t=b_(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),H=cr(l),[$,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),id(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const $e=n&&!m,He=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),qe=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const tt=C.exports.useCallback((Le={},at=null)=>{const At=st=>{de&&st.preventDefault(),K(!0)};return{...Le,ref:at,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&$),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Pa(Le.onMouseDown,At),onMouseUp:Pa(Le.onMouseUp,()=>K(!1)),onMouseEnter:Pa(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,$,J,S,o,r]),Ze=C.exports.useCallback((Le={},at=null)=>({...R,...Le,ref:Fn(at,At=>{!At||te(At.tagName==="LABEL")}),onClick:Pa(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var st;(st=G.current)==null||st.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),nt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:Fn(G,at),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Pa(Le.onChange,De),onBlur:Pa(Le.onBlur,z,()=>V(!1)),onFocus:Pa(Le.onFocus,H,()=>V(!0)),onKeyDown:Pa(Le.onKeyDown,He),onKeyUp:Pa(Le.onKeyUp,qe),required:i,checked:Se,disabled:$e,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x_}),[w,P,a,De,z,H,He,qe,i,Se,$e,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:at,onMouseDown:Pa(Le.onMouseDown,RA),onTouchStart:Pa(Le.onTouchStart,RA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:tt,getInputProps:nt,getLabelProps:Tt,htmlProps:R}}function RA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=pd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=pd({from:{opacity:0},to:{opacity:1}}),vfe=pd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Az=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Tz({...E,isDisabled:S,isChecked:_,onChange:T}),H=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:H,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Az.displayName="Checkbox";function yfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C_(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function j4(e,t,n){return(e-t)*100/(n-t)}function Lz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C_(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Mz(Pc(v),o),w=n??S,P=C.exports.useCallback($=>{$!==v&&(m||p($.toString()),u?.($.toString(),Pc($)))},[u,m,v]),E=C.exports.useCallback($=>{let j=$;return l&&(j=m0(j,a,s)),C_(j,w)},[w,l,s,a]),_=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc($):j=Pc(v)+$,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc(-$):j=Pc(v)-$,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=Vx(r,o,n)??a,P($)},[r,n,o,P,a]),I=C.exports.useCallback($=>{const j=Vx($,o,w)??a;P(j)},[w,o,P,a]),R=Pc(v);return{isOutOfRange:R>s||Rx(Q5,{styles:Oz}),wfe=()=>x(Q5,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Oz} + `});function Uf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Iz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Iz()&&e.test(navigator.vendor),Efe=e=>Iz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function NA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=NA(n),a=NA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function __(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k_=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=vn(i),s=S_(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k_.displayName="Input";k_.id="Input";var[Ife,Rz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=vn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=__({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E_=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=Rz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});E_.displayName="InputAddon";var Nz=Pe(function(t,n){return x(E_,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Nz.displayName="InputLeftAddon";Nz.id="InputLeftAddon";var Dz=Pe(function(t,n){return x(E_,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Dz.displayName="InputRightAddon";Dz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Rz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var zz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});zz.id="InputLeftElement";zz.displayName="InputLeftElement";var Bz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Bz.id="InputRightElement";Bz.displayName="InputRightElement";function Bfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Bfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Ffe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Ffe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Nl=we("div");Nl.displayName="Box";var Fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Nl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Fz.displayName="Square";var Hfe=Pe(function(t,n){const{size:r,...i}=t;return x(Fz,{size:r,ref:n,borderRadius:"9999px",...i})});Hfe.displayName="Circle";var $z=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});$z.displayName="Center";var Wfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Wfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Gfe.displayName="Divider";var en=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});en.displayName="Flex";var Hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Hz.displayName="Grid";function DA(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=__({gridArea:r,gridColumn:DA(i),gridRow:DA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(Nl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Wz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P_=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P_.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P_,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(P_,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Wz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Wz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return od(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function rhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[CC]:od(n,i=>r[i])}}function ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var T_=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=yS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,$=p?x(Uz,{children:I},N):I;if(!P)return $;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return re(C.exports.Fragment,{children:[$,de]},N)})},[u,w,P,E,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[CC]:S[CC]},...m},_)});T_.displayName="Stack";var Gz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=__({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function zA(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,_=>zA(O6("space",_)(E))),"--chakra-wrap-y-spacing":E=>od(P,_=>zA(O6("space",_)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Yz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var ahe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},qz=ahe,bp=()=>{},she={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:qz},Kz=typeof window<"u"?{window,document}:uhe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return re(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&Ux(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),H=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Fn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:$,onKeyDown:H,onMouseOver:J,onMouseLeave:ie}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function phe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),ghe=e=>tB(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||mhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():vhe(e)?!0:tB(e)}function yhe(e){return e?Jz(e)&&rB(e)&&!ghe(e):!1}var She=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>rB(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Wa="bottom",Va="right",Oo="left",A_="auto",Jv=[Mo,Wa,Va,Oo],$0="start",kv="end",Phe="clippingParents",oB="viewport",zg="popper",The="reference",BA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),aB=[].concat(Jv,[A_]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Bhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function Ga(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=Ga(e).Element;return e instanceof t||e instanceof Element}function Da(e){var t=Ga(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L_(e){if(typeof ShadowRoot>"u")return!1;var t=Ga(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Fhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Da(o)||!Al(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function $he(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Da(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Hhe={name:"applyStyles",enabled:!0,phase:"write",fn:Fhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,Y4=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Da(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=eh(e)?Ga(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M_(e){var t=W0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wu(e){return Ga(e).getComputedStyle(e)}function Whe(e){return["table","td","th"].indexOf(Al(e))>=0}function vd(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(L_(e)?e.host:null)||vd(e)}function FA(e){return!Da(e)||wu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&Da(e)){var r=wu(e);if(r.position==="fixed")return null}var i=CS(e);for(L_(i)&&(i=i.host);Da(i)&&["html","body"].indexOf(Al(i))<0;){var o=wu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function e2(e){for(var t=Ga(e),n=FA(e);n&&Whe(n)&&wu(n).position==="static";)n=FA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&wu(n).position==="static")?t:n||Vhe(e)||t}function O_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return Yf(e,Y4(t,n))}function Uhe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=O_(s),u=[Oo,Va].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=M_(o),v=l==="y"?Mo:Oo,S=l==="y"?Wa:Va,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Bm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function $A(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===Ga(n)&&(R=vd(n),wu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Va)&&o===kv){M=Wa;var H=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=H-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Wa)&&o===kv){T=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:kl(t.placement),variation:V0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$A(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$A(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ny={passive:!0};function Jhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ga(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function HA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function I_(e){var t=Ga(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function R_(e){return W0(vd(e)).left+I_(e).scrollLeft}function rpe(e,t){var n=Ga(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+R_(e),y:l}}function ipe(e){var t,n=vd(e),r=I_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+R_(e),l=-r.scrollTop;return wu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N_(e){var t=wu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Da(e)&&N_(e)?e:fB(CS(e))}function Fm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ga(r),a=i?[o].concat(o.visualViewport||[],N_(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Fm(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=W0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function WA(e,t,n){return t===oB?kC(rpe(e,n)):eh(t)?ope(t,n):kC(ipe(vd(e)))}function ape(e){var t=Fm(CS(e)),n=["absolute","fixed"].indexOf(wu(e).position)>=0,r=n&&Da(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&lB(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=WA(e,u,r);return l.top=Yf(h.top,l.top),l.right=Y4(h.right,l.right),l.bottom=Y4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},WA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Wa:l={x:a,y:t.y+t.height};break;case Va:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O_(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Phe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=cB(typeof P!="number"?P:dB(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||vd(e.elements.popper),l,h,a),R=W0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),H=m===zg?z:R,$={top:I.top-H.top+E.top,bottom:H.bottom-I.bottom+E.bottom,left:I.left-H.left+E.left,right:H.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys($).forEach(function(V){var J=[Va,Wa].indexOf(V)>=0?1:-1,ie=[Mo,Wa].indexOf(V)>=0?"y":"x";$[V]+=de[ie]*J})}return $}function lpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?aB:l,h=V0(r),p=h?s?BA:BA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===A_)return[];var t=z3(e);return[HA(e),t,HA(t)]}function cpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[z3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===A_?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,H=M[0],$=0;$=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Va:Oo:V?Wa:Mo;I[ie]>R[ie]&&(K=z3(K));var G=z3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){H=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var $e=M.find(function(He){var qe=N.get(He);if(qe)return qe.slice(0,De).every(function(tt){return tt})});if($e)return H=$e,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function VA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function UA(e){return[Mo,Va,Wa,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=VA(a,r),u=VA(s,i,o),h=UA(l),p=UA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Va].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=ppe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=O_(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,H=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Wa:Va,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?M_(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),$e=De[J],He=De[ie],qe=Bm(0,N[Q],Se[Q]),tt=T?N[Q]/2-te-qe-$e-$.mainAxis:X-qe-$e-$.mainAxis,Ze=T?-N[Q]/2+te+qe+He+$.mainAxis:he+qe+He+$.mainAxis,nt=t.elements.arrow&&e2(t.elements.arrow),Tt=nt?M==="y"?nt.clientTop||0:nt.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+tt-xt-Tt,at=K+Ze-xt,At=Bm(v?Y4(G,Le):G,K,v?Yf(Z,at):Z);R[M]=At,de[M]=At-K}if(s){var st,gt=M==="x"?Mo:Oo,an=M==="x"?Wa:Va,Ct=R[I],Ut=I==="y"?"height":"width",sn=Ct+P[gt],yn=Ct-P[an],Oe=[Mo,Oo].indexOf(E)!==-1,et=(st=j?.[I])!=null?st:0,Xt=Oe?sn:Ct-N[Ut]-z[Ut]-et+$.altAxis,Yt=Oe?Ct+N[Ut]+z[Ut]-et-$.altAxis:yn,ke=v&&Oe?Uhe(Xt,Ct,Yt):Bm(v?Xt:sn,Ct,v?Yt:yn);R[I]=ke,de[I]=ke-Ct}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===Ga(e)||!Da(e)?I_(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Da(t),i=Da(t)&&_pe(t),o=vd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||N_(o))&&(s=Cpe(t)),Da(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=R_(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ppe(e){var t=Epe(e);return Bhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var GA={placement:"bottom",modifiers:[],strategy:"absolute"};function jA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Rpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Npe=e=>Rpe[e],YA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...YA,...e}}:t={enabled:e,options:YA},t}var zpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Bpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{qA(e)},effect:({state:e})=>()=>{qA(e)}},qA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Npe(e.placement))},Fpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Hpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Hpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Wpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{KA(e)},effect:({state:e})=>()=>{KA(e)}},KA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Upe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function pB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=_.current)==null||$.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Wpe,Fpe,Bpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=P.current)==null||$.destroy(),P.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),I=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=$;return{...Q,ref:j,"data-popper-arrow":"",style:jpe($)}},[]),H=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=P.current)==null||$.update()},forceUpdate(){var $;($=P.current)==null||$.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:H,getReferenceProps:I}}function jpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=Cn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Xpe]=Cn({strict:!1,name:"PortalContext"}),D_="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D_,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D_),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=D_;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Dy.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(wp=new WeakMap,wp=new WeakMap,Dy=new WeakMap,zy={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function z_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function bB(){}function xB(){}xB.resetWarningCache=bB;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:xB,resetWarningCache:bB};return n.PropTypes=n,n};On.exports=a0e();var EC="data-focus-lock",wB="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function CB(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function B_(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=gl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=mz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...gl({},n)})};PB.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),PB}var TB=B_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=B_(),h0e=B_(),p0e=EB({async:!0}),g0e=[],F_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,H=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(He){var qe=u.current;if(qe&&qe.focus){var tt=typeof j=="function"?j(qe):j;if(tt){var Ze=typeof tt=="object"?tt:void 0;u.current=null,He?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[j]),te=C.exports.useCallback(function(He){l.current&&TB.useMedium(He)},[]),X=AB.useMedium,he=C.exports.useCallback(function(He){s.current!==He&&(s.current=He,a(He))},[]),ye=Tn((r={},r[wB]=p&&"disabled",r[EC]=P,r),H),Se=m!==!0,De=Se&&m!=="tail",$e=CB([n,he]);return re($n,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x($,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:$e,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});F_.propTypes={};F_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const LB=F_;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){$_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Dl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W_=k0e.join(","),E0e="".concat(W_,", [data-focus-guard]"),$B=function(e,t){var n;return Dl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:W_)?[i]:[],$B(i))},[])},V_=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Dl(r.parentNode.querySelectorAll(W_)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Dl(t).map(function(n){return V_([n])}).reduce(function(n,r){return n.concat(r)},[])},U_=function(e,t){return Dl(e).filter(function(n){return RB(t,n)}).filter(function(n){return x0e(n)})},XA=function(e,t){return t===void 0&&(t=new Map),Dl(e).filter(function(n){return NB(t,n)})},AC=function(e,t,n){return FB(U_(V_(e,n),t),!0,n)},ZA=function(e,t){return FB(U_(V_(e),t),!1)},T0e=function(e,t){return U_(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Dl(e.children).some(function(n){return Pv(n,t)})},A0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},G_=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?A0e(Dl(HB(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},j_=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Dl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},VB=function(e){var t=document&&j_();return!t||t.dataset&&t.dataset.focusGuard?!1:G_(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&j_();return e?Dl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y_=function(e,t){return BB(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y_(n,e))}),e.filter(function(n){return t.has(n)})},QA=function(e){return e[0]&&e.length>1?Y_(e[0],e):e[0]},JA=function(e,t){return e.length>1?e.indexOf(Y_(e[t],e)):t},UB="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=JA(e,0),_=JA(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=XA(r.filter(D0e(n)));return i&&i.length?QA(i):QA(XA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i=0)return o}return!1},GB=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Pv(u,a)?a=u:a=Yx(u,a))})}),a},B0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},F0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(C0e)},$0e=function(e,t){var n=document&&j_(),r=G_(e).filter(q4),i=GB(n||e,e,r),o=new Map,a=ZA(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=ZA([i],o).map(function(m){var v=m.node;return v}),u=F0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===UB?{node:z0e(a,h,B0e(r,o))}:p===void 0?p:u[p]}},H0e=function(e){var t=G_(e).filter(q4),n=GB(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:H_(s)}})},W0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,W0e(r.node,n.focusOptions),qx--}};const jB=V0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function eL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},K4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(VB(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=H0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),eL(S,v.length,1,v),eL(S,-1,-1,v))}}}return t},qB=function(t){K4()&&t&&(t.stopPropagation(),t.preventDefault())},q_=function(){return YB(K4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},KB=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",q_),window.addEventListener("blur",KB)},r1e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",q_),window.removeEventListener("blur",KB)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K4(),YB(K4)):(r1e(),qp=null)}TB.assignSyncMedium(e1e);AB.assignMedium(q_);h0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const a1e=m0e(i1e,o1e)(t1e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:a1e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;z_(ZB,["sideCar"]);XB.propTypes={};const s1e=XB;var QB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var B3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",JB=EB(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=mz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=gl(gl({},_),i);return re($n,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:F3,zeroRight:B3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},v1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zx(n),Zx(r),Zx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S1e=eF(),b1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(l1e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(B3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(F3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(B3," .").concat(B3,` { + right: 0 `).concat(r,`; + } + + .`).concat(F3," .").concat(F3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(u1e,": ").concat(s,`px; + } +`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var By=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",By,By),window.removeEventListener("test",By,By)}catch{MC=!1}var Cp=MC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return tF(e,"overflowY")},_1e=function(e){return tF(e,"overflowX")},tL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?C1e(t):_1e(t)},rF=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&nF(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nL=function(e){return[e.deltaX,e.deltaY]},rL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return eF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=gC([e.lockRef.current],(e.shards||[]).map(rL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=tL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=tL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var H=r.current||I;return T1e(H,P,w,H==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?nL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(rL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,nL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return re($n,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(JB,O1e);var iF=C.exports.forwardRef(function(e,t){return x(_S,{...gl({},e,{ref:t,sideCar:I1e})})});iF.classNames=_S.classNames;const oF=iF;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},OC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function D1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=B1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},H=null)=>({role:"dialog",...z,ref:Fn(H,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,$=>$.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},H=null)=>({...z,ref:Fn(H,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function B1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[F1e,fh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[$1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(F1e,{value:S,children:x(gd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var K_=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=dh("chakra-modal__close-btn",r),s=fh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});K_.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[p,m]=l_();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var H1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...Sz,custom:{initialScale:.95,reverse:!0}},none:{}},W1e=we(Rl.section),V1e=e=>H1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(W1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=ad();return x(U1e,{...i||(u==="none"?{}:yz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function lF(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var uF=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[YPe,G1e]=Cn(),j1e=we(bz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=G1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var cF=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),X1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function iL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Z1e=50,oL=300;function Q1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},oL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},oL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function nge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:H,format:$,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr(H??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useRef(null),tt=C.exports.useCallback(ke=>ke.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),nt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);id(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(tt(Ot))}},[Ze,tt]);const Tt=C.exports.useCallback((ke=a)=>{Se&&te(ke)},[te,Se,a]),xt=C.exports.useCallback((ke=a)=>{Se&&X(ke)},[X,Se,a]),Le=Q1e(Tt,xt);iL(He,"disabled",Le.stop,Le.isSpinning),iL(qe,"disabled",Le.stop,Le.isSpinning);const at=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Z(tt(Ne)),$e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Z,tt,Ze]),At=C.exports.useCallback(ke=>{var Ot;V?.(ke),$e.current&&(ke.target.selectionStart=$e.current.start??((Ot=ke.currentTarget.value)==null?void 0:Ot.length),ke.currentTarget.selectionEnd=$e.current.end??ke.currentTarget.selectionStart)},[V]),st=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;tge(ke,Q)||ke.preventDefault();const Ot=gt(ke)*a,Ne=ke.key,ln={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[Ne];ln&&(ke.preventDefault(),ln(ke))},[Q,a,Tt,xt,Z,i,o]),gt=ke=>{let Ot=1;return(ke.metaKey||ke.ctrlKey)&&(Ot=.1),ke.shiftKey&&(Ot=10),Ot},an=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),Ct=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&Ct()},[n,ye,Ct]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=De.current)==null||ke.focus()})},[t]),yn=C.exports.useCallback(ke=>{ke.preventDefault(),Le.up(),sn()},[sn,Le]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Le.down(),sn()},[sn,Le]);Uf(()=>De.current,"wheel",ke=>{var Ot;const ut=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!ut)return;ke.preventDefault();const ln=gt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Tt(ln):Nn===1&&xt(ln)},{passive:!1});const et=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Fn(Ot,He),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||yn(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,yn,Le.stop,l]),Xt=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Fn(Ot,qe),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||Oe(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Le.stop,l]),Yt=C.exports.useCallback((ke={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Fn(De,Ot),value:nt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:ol(ke.onChange,at),onKeyDown:ol(ke.onKeyDown,st),onFocus:ol(ke.onFocus,At,()=>ye(!0)),onBlur:ol(ke.onBlur,J,Ut)}),[E,m,p,M,T,nt,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,at,st,At,J,Ut]);return{value:nt(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,PS]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ige,X_]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Z_=Pe(function(t,n){const r=Ii("NumberInput",t),i=vn(t),o=b_(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:cF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z_.displayName="NumberInput";var dF=Pe(function(t,n){const r=PS();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});dF.displayName="NumberInputStepper";var Q_=Pe(function(t,n){const{getInputProps:r}=X_(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:cF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q_.displayName="NumberInputField";var fF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J_=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X_(),o=i(t,n);return x(fF,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});J_.displayName="NumberDecrementStepper";var e8=Pe(function(t,n){const{getIncrementButtonProps:r}=X_(),i=r(t,n),o=PS();return x(fF,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});e8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[uge,n2]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[H,$]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(at=>`${at}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=pB({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),$e=C.exports.useCallback((at={},At=null)=>{const st={...at,style:{...at.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Fn(R,At),children:De?at.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(at.onKeyDown,gt=>{n&>.key==="Escape"&&E()}),onBlur:al(at.onBlur,gt=>{const an=aL(gt),Ct=Jx(R.current,an),Ut=Jx(I.current,an);P&&t&&(!Ct&&!Ut)&&E()}),"aria-labelledby":H?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(st.role="tooltip",st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0}),st.onMouseLeave=al(at.onMouseLeave,gt=>{gt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),st},[De,Q,H,K,j,G,u,n,E,P,t,p,l,s]),He=C.exports.useCallback((at={},At=null)=>X({...at,style:{visibility:P?"visible":"hidden",...at.style}},At),[P,X]),qe=C.exports.useCallback((at,At=null)=>({...at,ref:Fn(At,M,Z)}),[M,Z]),tt=C.exports.useRef(),Ze=C.exports.useRef(),nt=C.exports.useCallback(at=>{M.current==null&&Z(at)},[Z]),Tt=C.exports.useCallback((at={},At=null)=>{const st={...at,ref:Fn(I,At,nt),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(st.onClick=al(at.onClick,T)),u===kp.hover&&(st.onFocus=al(at.onFocus,()=>{tt.current===void 0&&_()}),st.onBlur=al(at.onBlur,gt=>{const an=aL(gt),Ct=!Jx(R.current,an);P&&t&&Ct&&E()}),st.onKeyDown=al(at.onKeyDown,gt=>{gt.key==="Escape"&&E()}),st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0,tt.current=window.setTimeout(()=>_(),h)}),st.onMouseLeave=al(at.onMouseLeave,()=>{N.current=!1,tt.current&&(clearTimeout(tt.current),tt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),st},[ie,P,Q,u,nt,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{tt.current&&clearTimeout(tt.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((at={},At=null)=>({...at,id:K,ref:Fn(At,st=>{$(!!st)})}),[K]),Le=C.exports.useCallback((at={},At=null)=>({...at,id:G,ref:Fn(At,st=>{de(!!st)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:He,getPopoverProps:$e,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function Jx(e,t){return e===t||e?.contains(t)}function aL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t8(e){const t=Ii("Popover",e),{children:n,...r}=vn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t8.displayName="Popover";function n8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(xS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},gge=we(Rl.section),hF=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});hF.displayName="PopoverTransition";var r8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(hF,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});r8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function i8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}i8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=pd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=pd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=pd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function pF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var gF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};gF.displayName="Shape";var IC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});IC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=pF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(gF,{size:n,isIndeterminate:v,children:[x(IC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(IC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=pF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),mF=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=vn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},re(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});mF.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var vF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});vF.displayName="SelectField";var yF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=vn(e),[w,P]=Age(S,nQ),E=S_(P),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(vF,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(SF,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});yF.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),SF=e=>{const{children:t=x(Lge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};SF.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function bF(e){return!!e.touches}function Rge(e){return bF(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function xF(e,t="page"){return bF(e)?Dge(e,t):zge(e,t)}function Bge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Fge(e,t=!1){function n(i){e(i,{point:xF(i)})}return t?Bge(n):n}function $3(e,t,n,r){return Oge(e,t,Fge(n,t==="pointerdown"),r)}function wF(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:xF(e)},{timestamp:i}=BP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Vge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=BP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function sL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:sL(e.point,t[t.length-1]),offset:sL(e.point,t[0]),velocity:Wge(t,.1)}}var Hge=e=>e*1e3;function Wge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function lL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(lL(e)&&lL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function CF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=wF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function _F({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=_F({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},yd=Zge({"../../../react-shim.js"(){}});yd();yd();yd();var Ma=e=>e?"":void 0,S0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");yd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function Qge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function kF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>$y(w).height>$y(P).height?w:P,H3):r.reduce((w,P)=>$y(w).width>$y(P).width?w:P,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...im({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function EF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),H=cr(w),$=EF({isReversed:a,direction:s,orientation:l}),[j,de]=nS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),He=($?De:X).map(We=>j4(We,t,n)),qe=l==="vertical",tt=C.exports.useRef(null),Ze=C.exports.useRef(null),nt=_F({getNodes(){const We=Ze.current,ht=We?.querySelectorAll("[role=slider]");return ht?Array.from(ht):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),at=C.exports.useCallback(We=>{var ht;if(!tt.current)return;Se.current.eventSource="pointer";const it=tt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ht=We.touches)==null?void 0:ht[0])??We,Qn=qe?it.bottom-Zt:Nt-it.left,lo=qe?it.height:it.width;let gi=Qn/lo;return $&&(gi=1-gi),Lz(gi,t,n)},[qe,$,n,t]),At=(n-t)/10,st=S||(n-t)/100,gt=C.exports.useMemo(()=>({setValueAtIndex(We,ht){if(!Z)return;const it=Se.current.valueBounds[We];ht=parseFloat(wC(ht,it.min,st)),ht=m0(ht,it.min,it.max);const Nt=[...Se.current.value];Nt[We]=ht,de(Nt)},setActiveIndex:G,stepUp(We,ht=st){const it=Se.current.value[We],Nt=$?it-ht:it+ht;gt.setValueAtIndex(We,Nt)},stepDown(We,ht=st){const it=Se.current.value[We],Nt=$?it+ht:it-ht;gt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[st,$,de,Z]),an=C.exports.useCallback(We=>{const ht=We.key,Nt={ArrowRight:()=>gt.stepUp(K),ArrowUp:()=>gt.stepUp(K),ArrowLeft:()=>gt.stepDown(K),ArrowDown:()=>gt.stepDown(K),PageUp:()=>gt.stepUp(K,At),PageDown:()=>gt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];gt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];gt.setValueAtIndex(K,Zt)}}[ht];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[gt,K,At,ye]),{getThumbStyle:Ct,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>kF({isReversed:$,orientation:l,thumbRects:nt,thumbPercents:He}),[$,l,He,nt]),Oe=C.exports.useCallback(We=>{var ht;const it=We??K;if(it!==-1&&M){const Nt=Le.getThumb(it),Zt=(ht=Ze.current)==null?void 0:ht.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=We=>{const ht=at(We)||0,it=Se.current.value.map(gi=>Math.abs(gi-ht)),Nt=Math.min(...it);let Zt=it.indexOf(Nt);const Qn=it.filter(gi=>gi===Nt);Qn.length>1&&ht>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),gt.setValueAtIndex(Zt,ht),Oe(Zt)},Xt=We=>{if(K==-1)return;const ht=at(We)||0;G(K),gt.setValueAtIndex(K,ht),Oe(K)};CF(Ze,{onPanSessionStart(We){!Z||(J(!0),et(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ht=null)=>({...We,...R,id:Le.root,ref:Fn(ht,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),ke=C.exports.useCallback((We={},ht=null)=>({...We,ref:Fn(ht,tt),id:Le.track,"data-disabled":Ma(h),style:{...We.style,...sn}}),[h,sn,Le]),Ot=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.innerTrack,style:{...We.style,...yn}}),[yn,Le]),Ne=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We,Zt=X[it];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${it}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[it];return{...Nt,ref:ht,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(it),"data-active":Ma(V&&K===it),"aria-valuetext":H?.(Zt)??P?.[it],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[it],"aria-labelledby":E?.[it]?void 0:_?.[it],style:{...We.style,...Ct(it)},onKeyDown:b0(We.onKeyDown,an),onFocus:b0(We.onFocus,()=>{Q(!0),G(it)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,H,P,l,h,p,E,_,Ct,an,Q]),ut=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.output,htmlFor:X.map((it,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),ln=C.exports.useCallback((We,ht=null)=>{const{value:it,...Nt}=We,Zt=!(itn),Qn=it>=X[0]&&it<=X[X.length-1];let lo=j4(it,t,n);lo=$?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ht,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!Zt),"data-highlighted":Ma(Qn),style:{...We.style,...gi}}},[h,$,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We;return{...Nt,ref:ht,id:Le.getInput(it),type:"hidden",value:X[it],name:Array.isArray(T)?T[it]:`${T}-${it}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>He[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:gt,getRootProps:Yt,getTrackProps:ke,getInnerTrackProps:Ot,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Nn,getOutputProps:ut}}function eme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[tme,TS]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[nme,o8]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),PF=Pe(function(t,n){const r=Ii("Slider",t),i=vn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});PF.defaultProps={orientation:"horizontal"};PF.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o8(),s=r(t,n);return le.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";yd();yd();function sme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),H=EF({isReversed:a,direction:s,orientation:l}),[$,j]=nS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0($,t,n),te=n-Z+t,he=j4(H?te:Z,t,n),ye=l==="vertical",Se=wF({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:H,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useId(),tt=u??qe,[Ze,nt]=[`slider-thumb-${tt}`,`slider-track-${tt}`],Tt=C.exports.useCallback(Ne=>{var ut;if(!De.current)return;const ln=Se.current;ln.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ht}=((ut=Ne.touches)==null?void 0:ut[0])??Ne,it=ye?Nn.bottom-ht:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=it/Nt;H&&(Zt=1-Zt);let Qn=Lz(Zt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(wC(Qn,ln.min,ln.step))),Qn=m0(Qn,ln.min,ln.max),Qn},[ye,H,Se]),xt=C.exports.useCallback(Ne=>{const ut=Se.current;!ut.isInteractive||(Ne=parseFloat(wC(Ne,ut.min,G)),Ne=m0(Ne,ut.min,ut.max),j(Ne))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(Ne=G){const ut=H?Z-Ne:Z+Ne;xt(ut)},stepDown(Ne=G){const ut=H?Z+Ne:Z-Ne;xt(ut)},reset(){xt(o||0)},stepTo(Ne){xt(Ne)}}),[xt,H,Z,G,o]),at=C.exports.useCallback(Ne=>{const ut=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(ut.min),End:()=>xt(ut.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),ut.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,st=Kge($e),{getThumbStyle:gt,rootStyle:an,trackStyle:Ct,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const Ne=Se.current,ut=st??{width:0,height:0};return kF({isReversed:H,orientation:Ne.orientation,thumbRects:[ut],thumbPercents:[he]})},[H,st,he,Se]),sn=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ut;return(ut=$e.current)==null?void 0:ut.focus()})},[Se]);id(()=>{const Ne=Se.current;sn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Z,N]);function yn(Ne){const ut=Tt(Ne);ut!=null&&ut!==Se.current.value&&j(ut)}CF(He,{onPanSessionStart(Ne){const ut=Se.current;!ut.isInteractive||(V(!0),sn(),yn(Ne),R?.(ut.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Oe=C.exports.useCallback((Ne={},ut=null)=>({...Ne,...I,ref:Fn(ut,He),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(J),style:{...Ne.style,...an}}),[I,h,J,an]),et=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,De),id:nt,"data-disabled":Ma(h),style:{...Ne.style,...Ct}}),[h,nt,Ct]),Xt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,style:{...Ne.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,$e),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ma(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...Ne.style,...gt(0)},onKeyDown:b0(Ne.onKeyDown,at),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,gt,at]),ke=C.exports.useCallback((Ne,ut=null)=>{const ln=!(Ne.valuen),Nn=Z>=Ne.value,We=j4(Ne.value,t,n),ht={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:H?`${100-We}%`:`${We}%`},horizontal:{left:H?`${100-We}%`:`${We}%`}})};return{...Ne,ref:ut,role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!ln),"data-highlighted":Ma(Nn),style:{...Ne.style,...ht}}},[h,H,n,t,l,Z]),Ot=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Oe,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:ke,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t"}),[dme,LS]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),a8=Pe((e,t)=>{const n=Ii("Slider",e),r=vn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a8.defaultProps={orientation:"horizontal"};a8.displayName="Slider";var TF=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});TF.displayName="SliderThumb";var AF=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});AF.displayName="SliderTrack";var LF=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});LF.displayName="SliderFilledTrack";var RC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});RC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),uL=e=>e?"":void 0,s8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Tz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":uL(s.isChecked),"data-hover":uL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,MF,pme,gme]=HN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=MF(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Fn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:OF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":IF(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[bme,xme]=Cn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:IF(n,s),tabId:OF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function _me(){const e=r2(),t=MF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Cs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function OF(e,t){return`${e}--tab-${t}`}function IF(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),RF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});RF.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var NF=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});NF.displayName="TabPanel";var DF=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});DF.displayName="TabPanels";var zF=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});zF.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],BF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=S_(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});BF.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function cL(e,t){const n=FF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function FF(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Dme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Bme(zme);function Bme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Fme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=cL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:$F(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=FF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(cL(ml.getState(),i).position)}}var dL=0;function Fme(e,t={}){dL+=1;const n=t.id??dL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(_z,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(kz,{id:u?.title,children:i}),s&&x(Cz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function $F(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Hme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=$F(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=BN();return C.exports.useMemo(()=>Hme(t.direction,e),[e,t.direction])}var Wme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},HF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Wme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},DC(n,{id:t,onClose:P})))});HF.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=HF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(gd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re($n,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Bg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:H}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=pB({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),H()},[H]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=zC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),$e=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>X4(K),"keydown",s?$e:void 0),Uf(()=>X4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const He=C.exports.useCallback((Ze={},nt=null)=>({...Ze,ref:Fn(K,nt,$),onPointerEnter:Bg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Bg(Ze.onClick,Se),onPointerDown:Bg(Ze.onPointerDown,De),onFocus:Bg(Ze.onFocus,he),onBlur:Bg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,$]),qe=C.exports.useCallback((Ze={},nt=null)=>j({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},nt),[j,S,w]),tt=C.exports.useCallback((Ze={},nt=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:nt,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:He,getTooltipProps:tt,getTooltipPositionerProps:qe,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=X4(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X4(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const H=mQ(i,"colors",E);n[Hr.arrowBg.var]=H}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const H=C.exports.Children.only(o);M=C.exports.cloneElement(H,_.getTriggerProps(H.props,H.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?re($n,{children:[M,x(gd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x($n,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:re(HR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return re(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:l8(e)?2:u8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function WF(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function VF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l8(e){return ive&&e instanceof Map}function u8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function c8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=GF(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return d8(r,!0)},!0)),e}function Jme(){Ss(2)}function f8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=HC[e];return t||Ss(18,e),t}function eve(e,t){HC[e]||(HC[e]=t)}function BC(){return Mv}function rw(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function Z4(e){FC(e),e.p.forEach(tve),e.p=null}function FC(e){e===Mv&&(Mv=e.l)}function fL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(Z4(t),Ss(4)),Cu(e)&&(e=Q4(t,e),t.l||J4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Q4(t,n,[]),Z4(t),t.u&&t.v(t.u,t.s),e!==UF?e:void 0}function Q4(e,t,n){if(f8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return hL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return hL(e,r,i,o,a,n)}),J4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function hL(e,t,n,r,i,o){if(sd(i)){var a=Q4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(WF(n,r,a),!sd(a))return;e.m=!1}if(Cu(i)&&!f8(i)){if(!e.h.F&&e._<1)return;Q4(e,i),t&&t.A.l||J4(e,i)}}function J4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d8(t,n)}function ow(e,t){var n=e[tr];return(n?bf(n):e)[t]}function pL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Nc(e){e.P||(e.P=!0,e.l&&Nc(e.l))}function aw(e){e.o||(e.o=c8(e.t))}function $C(e,t,n){var r=l8(t)?El("MapSet").N(t,n):u8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:BC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:BC()).p.push(r),r}function nve(e){return sd(e)||Ss(22,e),function t(n){if(!Cu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=gL(n,o),i.I=!1}else r=gL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||WF(r,a,t(s))}),o===3?new Set(r):r}(e)}function gL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c8(e)}function rve(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Nc(s);break;case 4:n(s)&&Nc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!VF(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=El("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new sve,jF=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p8)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error($i(12));if(typeof n(void 0,{type:e5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function YF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n5}function i(s,l){r(s)===n5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var hve=function(t,n){return t===n};function pve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;QF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=QF})(ZF);var JF={exports:{}},e$={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var OS=C.exports,Qve=ZF.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=OS.useRef,r2e=OS.useEffect,i2e=OS.useMemo,o2e=OS.useDebugValue;e$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=e$})(JF);function a2e(e){e()}let t$=a2e;const s2e=e=>t$=e,l2e=()=>t$,ld=C.exports.createContext(null);function n$(){return C.exports.useContext(ld)}const u2e=()=>{throw new Error("uSES not initialized!")};let r$=u2e;const c2e=e=>{r$=e},d2e=(e,t)=>e===t;function f2e(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(r,i=d2e){const{store:o,subscription:a,getServerState:s}=t(),l=r$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const h2e=f2e();var p2e={exports:{}},Mn={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var m8=Symbol.for("react.element"),v8=Symbol.for("react.portal"),IS=Symbol.for("react.fragment"),RS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),BS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),i$;i$=Symbol.for("react.module.reference");function ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m8:switch(e=e.type,e){case IS:case NS:case RS:case FS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case zS:case BS:case WS:case HS:case DS:return e;default:return t}}case v8:return t}}}Mn.ContextConsumer=zS;Mn.ContextProvider=DS;Mn.Element=m8;Mn.ForwardRef=BS;Mn.Fragment=IS;Mn.Lazy=WS;Mn.Memo=HS;Mn.Portal=v8;Mn.Profiler=NS;Mn.StrictMode=RS;Mn.Suspense=FS;Mn.SuspenseList=$S;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return ja(e)===zS};Mn.isContextProvider=function(e){return ja(e)===DS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m8};Mn.isForwardRef=function(e){return ja(e)===BS};Mn.isFragment=function(e){return ja(e)===IS};Mn.isLazy=function(e){return ja(e)===WS};Mn.isMemo=function(e){return ja(e)===HS};Mn.isPortal=function(e){return ja(e)===v8};Mn.isProfiler=function(e){return ja(e)===NS};Mn.isStrictMode=function(e){return ja(e)===RS};Mn.isSuspense=function(e){return ja(e)===FS};Mn.isSuspenseList=function(e){return ja(e)===$S};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===IS||e===NS||e===RS||e===FS||e===$S||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===BS||e.$$typeof===i$||e.getModuleId!==void 0)};Mn.typeOf=ja;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const PL={notify(){},get:()=>[]};function y2e(e,t){let n,r=PL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=PL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function o$(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=o$();function C2e(e=ld){const t=e===ld?w2e:o$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(JF.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var y8="persist:",a$="persist/FLUSH",S8="persist/REHYDRATE",s$="persist/PAUSE",l$="persist/PERSIST",u$="persist/PURGE",c$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function TL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,H){return H.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=O2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function AL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function au(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function z2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var B2e=5e3;function F2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:B2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===l$){var P=!1,E=function(z,H){P||(p.rehydrate(e.key,z,H),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return au({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function(H,$){return Promise.resolve(H)};z(N,n).then(function(H){E(H)},function(H){E(void 0,H)})},function(N){E(void 0,N)}),au({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===u$)return s=!0,p.result(I2e(e)),au({},t(w,p),{_persist:v});if(p.type===a$)return p.result(a&&a.flush()),au({},t(w,p),{_persist:v});if(p.type===s$)l=!0;else if(p.type===S8){if(s)return au({},w,{_persist:au({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=au({},M,{_persist:au({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(au({},R,{_persist:v}))}}function LL(e){return W2e(e)||H2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function H2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function W2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:d$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case c$:return VC({},t,{registry:[].concat(LL(t.registry),[n.key])});case S8:var r=t.registry.indexOf(n.key),i=LL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=p8(U2e,d$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:c$,key:u})},a=function(u,h,p){var m={type:S8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:s$})},persist:function(){e.dispatch({type:l$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b8={},x8={};x8.__esModule=!0;x8.default=q2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var j2e={getItem:dw,setItem:dw,removeItem:dw};function Y2e(e){if((typeof self>"u"?"undefined":V3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}b8.__esModule=!0;b8.default=Z2e;var K2e=X2e(x8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var f$=void 0,Q2e=J2e(b8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");f$=eye;var h$={},p$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(w8);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=nh,n=w8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths. + + ${JSON.stringify(Z)} + + ${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(te)} + + ${G}`)};e.singleTransformValidator=z;const H=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=H;const $=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=$;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. + + ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(p$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),H=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...H,...$,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(h$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C8(r)?r:!1},C8=e=>Boolean(typeof e=="string"?tye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),i5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,H=512,$=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",H],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",$e="[object Array]",He="[object AsyncFunction]",qe="[object Boolean]",tt="[object Date]",Ze="[object DOMException]",nt="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",at="[object Number]",At="[object Null]",st="[object Object]",gt="[object Promise]",an="[object Proxy]",Ct="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",ke="[object DataView]",Ot="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",ln="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ht="[object Uint8ClampedArray]",it="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),va=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Du=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),zu=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Bu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ya=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,qa="\\ud800-\\udfff",Bl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",$l=Bl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",_r="\\ufe0e\\ufe0f",Ur=Ds+No+kn+Sn,zo="['\u2019]",zs="["+qa+"]",Gr="["+Ur+"]",Ka="["+$l+"]",Td="\\d+",Hl="["+_h+"]",Xa="["+Fu+"]",Ad="[^"+qa+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ka+"|"+mi+")",Eh="[^"+qa+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Bs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",Wl="(?:"+Xa+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",$u="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+_r+"]?",ya="(?:"+Fs+"(?:"+[Eh,Ld,Bs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Wu+Md+ya,Ph="(?:"+[Hl,Ld,Bs].join("|")+")"+Ht,Vu="(?:"+[Eh+Ka+"?",Ka,Ld,Bs,zs].join("|")+")",Uu=RegExp(zo,"g"),Th=RegExp(Ka,"g"),Bo=RegExp(mi+"(?="+mi+")|"+Vu+Ht,"g"),Wn=RegExp([uo+"?"+Xa+"+"+$u+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+Hu+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+$u,uo+"+"+Hu,Vl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Fs+qa+$l+_r+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lh=-1,un={};un[Ot]=un[Ne]=un[ut]=un[ln]=un[Nn]=un[We]=un[ht]=un[it]=un[Nt]=!0,un[De]=un[$e]=un[Yt]=un[qe]=un[ke]=un[tt]=un[nt]=un[Tt]=un[Le]=un[at]=un[st]=un[Ct]=un[Ut]=un[sn]=un[et]=!1;var Wt={};Wt[De]=Wt[$e]=Wt[Yt]=Wt[ke]=Wt[qe]=Wt[tt]=Wt[Ot]=Wt[Ne]=Wt[ut]=Wt[ln]=Wt[Nn]=Wt[Le]=Wt[at]=Wt[st]=Wt[Ct]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[We]=Wt[ht]=Wt[it]=Wt[Nt]=!0,Wt[nt]=Wt[Tt]=Wt[et]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,Ke=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,hn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,$s=hn&&hn.isSet,I1=hn&&hn.isTypedArray;function vi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je-1;);return ve}function Za(oe,xe){for(var ve=oe.length;ve--&&Yu(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var y2=Bd(Mh),Qa=Bd(O1);function Ws(oe){return"\\"+ne[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Gl(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function S2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve-1}function B2(c,g){var b=this.__data__,L=Er(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=Z1,Wo.prototype.has=Q1,Wo.prototype.set=B2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Ae=si(c),Ge=Ae==Tt||Ae==xt;if(xc(c))return Js(c,ee);if(Ae==st||Ae==De||Ge&&!D){if(Y=ce||Ge?{}:xk(c),!ee)return ce?mg(c,dc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Ae])return D?c:{};Y=nU(c,Ae,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Xk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,F))}):qk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,F))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,F))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=cn(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function fc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,kr(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=Ku,Y=!1,g=new Ca(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:Qk(L);b0&&b(ee)?g>1?Pr(ee,g-1,b,L,D):ba(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return eu(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&tn.call(c,g)}function Qh(c,g){return c!=null&&g in cn(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Ae=-1,Ge=ee[0];e:for(;++Ae-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Jl(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+Yl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,F=mr(Kd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function yc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Yl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Lb(_k(c,g,xo),c+"")}function ip(c){return cc(mp(c))}function rf(c,g){var b=mp(c);return j2(b,Kl(g,0,b.length))}function Zl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:W(c);if(Ce)return Wd(Ce);Y=!1,D=Ku,ce=new Ca}else ce=g?[]:ee;e:for(;++L=L?c:Ar(c,g,b)}var fg=_2||function(c){return yt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=ec?ec(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Ql(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,Ya.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?cn(Zd.call(c)):{}}function V2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Ae=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Zi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=cn(g);++L-1?D[F?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new yi(a);if(D&&!Y&&be(F)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Ae=-1,Ge=!0,dt=b&w?new Ca:n;for(F.set(c,g),F.set(g,c);++Ae1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{ +/* [wrapped with `+g+`] */ +`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Jl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Dk(c,b)});function zk(c){var g=B(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function Y2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Jl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function vG(){return zk(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=Zk(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Lk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Mb)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){tn.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var PG=vg(Mk),TG=vg(Ok);function AG(c,g){return Pr(q2(c,g),1)}function LG(c,g){return Pr(q2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Pr(q2(c,g),b)}function Bk(c,g){var b=Rt(c)?Vn:ts;return b(c,Te(g,3))}function Fk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var OG=dp(function(c,g,b){tn.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Yu(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return ts(c,function(Y){F[++L]=D?vi(g,Y,b):ns(Y,g,b)}),F}),NG=dp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=Rt(c)?zn:Sr;return b(c,Te(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function BG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,ts)}function FG(c,g,b){var L=Rt(c)?p2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,Z2(Te(g,3)))}function HG(c){var g=Rt(c)?cc:ip;return g(c)}function WG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?wb:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Tr(c).length}function GG(c,g,b){var L=Rt(c)?Gu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Pr(g,1),[])}),K2=k2||function(){return yt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function $k(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Hk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Ib=_t(function(c,g,b){var L=P;if(b.length){var D=Ho(b,Ve(Ib));L|=I}return pe(c,L,g,b,D)}),Wk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Ho(b,Ve(Wk));L|=I}return pe(g,L,c,b,D)});function Vk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=Vk.placeholder,L}function Uk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Uk.placeholder,L}function Gk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new yi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Ae="maxWait"in b,F=Ae?mr(Ea(b.maxWait)||0,g):F,Ge="trailing"in b?!!b.trailing:Ge);function dt(Mr){var ss=L,nu=D;return L=D=n,Ce=Mr,Y=c.apply(nu,ss),Y}function St(Mr){return Ce=Mr,ee=xg(jt,g),_e?dt(Mr):Y}function $t(Mr){var ss=Mr-ce,nu=Mr-Ce,cE=g-ss;return Ae?qr(cE,F-nu):cE}function bt(Mr){var ss=Mr-ce,nu=Mr-Ce;return ce===n||ss>=g||ss<0||Ae&&nu>=F}function jt(){var Mr=K2();if(bt(Mr))return Jt(Mr);ee=xg(jt,$t(Mr))}function Jt(Mr){return ee=n,Ge&&L?dt(Mr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(K2())}function Zo(){var Mr=K2(),ss=bt(Mr);if(L=arguments,D=this,ce=Mr,ss){if(ee===n)return St(ce);if(Ae)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Ea(g)||0,b)});function XG(c){return pe(c,H)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new yi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function ZG(c){return Hk(2,c)}var QG=kb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],kr(Te())):zn(Pr(g,1),kr(Te()));var b=g.length;return _t(function(L){for(var D=-1,F=qr(L.length,b);++D=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&tn.call(c,"callee")&&!W1.call(c,"callee")},Rt=ve.isArray,hj=jr?kr(jr):og;function So(c){return c!=null&&Q2(c.length)&&!eu(c)}function Lr(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==qe}var xc=E2||Gb,gj=co?kr(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||xc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Tr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function yj(c,g){return pc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?pc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==nt||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function eu(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==He||g==an}function Yk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var qk=Gi?kr(Gi):_b;function xj(c,g){return c===g||gc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,gc(c,g,Et(g),b)}function Cj(c){return Kk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Kk(c){return typeof c=="number"||br(c)&&oi(c)==at}function wg(c){if(!br(c)||oi(c)!=st)return!1;var g=tc(c);if(g===null)return!0;var b=tn.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?kr(Sa):or;function Pj(c){return Yk(c)&&c>=-G&&c<=G}var Xk=$s?kr($s):Bt;function J2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==sn}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==yn}var gp=I1?kr(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==et}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function Zk(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):Ci(c);if(nc&&c[nc])return S2(c[nc]());var g=si(c),b=g==Le?Dh:g==Ut?Wd:mp;return b(c)}function tu(c){if(!c)return c===0?c:0;if(c=Ea(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=tu(c),b=g%1;return g===g?b?g-b:g:0}function Qk(c){return c?Kl(Dt(c),0,X):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?Ke(c.slice(2),b?2:8):_1.test(c)?te:+c}function Jk(c){return _a(c,bo(c))}function Ij(c){return c?Kl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)tn.call(g,b)&&Gs(c,b,g[b])}),eE=Xi(function(c,g){_a(g,bo(g),c)}),ey=Xi(function(c,g,b,L){_a(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){_a(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=ql(c);return g==null?b:Qe(b,g)}var Bj=_t(function(c,g){c=cn(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b1),F}),_a(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return nE(c,Z2(Te(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function nE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?oE(g):g)});function oE(c){return Fb(xn(c).toLowerCase())}function aE(c){return c=xn(c),c&&c.replace(A1,y2).replace(Th,"")}function mY(c,g,b){c=xn(c),g=Ki(g);var L=c.length;b=b===n?L:Kl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=xn(c),c&&va.test(c)?c.replace(Os,Qa):c}function yY(c){return c=xn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Yl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;return g&&L>>0,b?(c=xn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=Ki(g),!g&&Gl(c))?is(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Fb(g)});function MY(c,g,b){return c=xn(c),b=b==null?0:Kl(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=B.templateSettings;b&&Zi(c,g,b)&&(g=n),c=xn(c),g=ey({},g,L,Re);var D=ey({},g.imports,L.imports,Re),F=li(D),Y=Hd(D,F),ee,ce,Ce=0,_e=g.interpolate||Rs,Ae="__p += '",Ge=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Du?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` +`;c.replace(Ge,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Ae+=c.slice(Ce,Zo).replace(L1,Ws),jt&&(ee=!0,Ae+=`' + +__e(`+jt+`) + +'`),Qi&&(ce=!0,Ae+=`'; +`+Qi+`; +__p += '`),Jt&&(Ae+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),Ce=Zo+bt.length,bt}),Ae+=`'; +`;var St=tn.call(g,"variable")&&g.variable;if(!St)Ae=`with (obj) { +`+Ae+` +} +`;else if(x1.test(St))throw new kt(s);Ae=(ce?Ae.replace(Zt,""):Ae).replace(Qn,"$1").replace(lo,"$1;"),Ae="function("+(St||"obj")+`) { +`+(St?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Ae+`return __p +}`;var $t=lE(function(){return Qt(F,dt+"return "+Ae).apply(n,Y)});if($t.source=Ae,Nb($t))throw $t;return $t}function IY(c){return xn(c).toLowerCase()}function RY(c){return xn(c).toUpperCase()}function NY(c,g,b){if(c=xn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Za(L,D)+1;return is(L,F,Y).join("")}function DY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.slice(0,B1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Za(L,Ni(g))+1;return is(L,0,D).join("")}function zY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.replace(zu,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return is(L,D).join("")}function BY(c,g){var b=$,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=xn(c);var F=c.length;if(Gl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-xa(L);if(ee<1)return L;var ce=Y?is(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Db(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,xn(Ya.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Ae=Ce.index;ce=ce.slice(0,Ae===n?ee:Ae)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ge=ce.lastIndexOf(D);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+L}function FY(c){return c=xn(c),c&&m1.test(c)?c.replace(gi,w2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Fb=hp("toUpperCase");function sE(c,g,b){return c=xn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var lE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return Nb(b)?b:new kt(b)}}),HY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Ib(c[b],c))}),c});function WY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++DG)return[];var b=X,L=qr(c,X);g=Te(g),c-=X;for(var D=$d(L,g);++b0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Ae=function(jt){var Jt=D.apply(B,ba([jt],ee));return L&&Ge?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ge=this.__chain__,dt=!!this.__actions__.length,St=F&&!Ge,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:Y2,args:[Ae],thisArg:n}),new Yi(bt,Ge)}return St&&$t?c.apply(this,ee):(bt=this.thru(Ae),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Zu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";tn.call(Ja,L)||(Ja[L]=[]),Ja[L].push({name:g,func:b})}}),Ja[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=M2,B.prototype.at=mG,B.prototype.chain=vG,B.prototype.commit=yG,B.prototype.next=SG,B.prototype.plant=xG,B.prototype.reverse=wG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=CG,B.prototype.first=B.prototype.head,nc&&(B.prototype[nc]=bG),B},wa=po();Vt?((Vt.exports=wa)._=wa,Pt._=wa):yt._=wa}).call(ys)})(Zr,Zr.exports);const Je=Zr.exports;var rye=Object.create,g$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&g$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},m$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?g$(n,"default",{value:e,enumerable:!0}):n,e)),uye=ze((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),v$=ze((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=ze((e,t)=>{var n=v$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=ze((e,t)=>{var n=VS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),dye=ze((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=ze((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=ze((e,t)=>{var n=VS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),US=ze((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=ze((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=ze((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),y$=ze((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Tu=ze((e,t)=>{var n=y$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),_8=ze((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=ze((e,t)=>{var n=_8(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=ze((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=ze((e,t)=>{var n=_8(),r=yye(),i=Sye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),S$=ze((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),b$=ze((e,t)=>{var n=GS(),r=S$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),bye=ze((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=ze((e,t)=>{var n=bye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),x$=ze((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),wye=ze((e,t)=>{var n=b$(),r=xye(),i=S$(),o=x$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Cye=ze((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=ze((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k8=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),jS=ze((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=ze((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=ze((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Eye=ze((e,t)=>{var n=jS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),Pye=ze((e,t)=>{var n=jS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),Tye=ze((e,t)=>{var n=jS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Aye=ze((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Aye(),r=US(),i=k8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=ze((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),YS=ze((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=ze((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=ze((e,t)=>{var n=YS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),w$=ze((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US(),r=k8(),i=w$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=US(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Bye=ze((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Fye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=ze((e,t)=>{var n=w$(),r=Bye(),i=Fye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),C$=ze((e,t)=>{var n=$ye(),r=Hye(),i=Wye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Gye=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jye=ze((e,t)=>{var n=_8(),r=Vye(),i=v$(),o=C$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,H,$,j,de,V,J){switch($){case M:if(z.byteLength!=H.byteLength||z.byteOffset!=H.byteOffset)return!1;z=z.buffer,H=H.buffer;case T:return!(z.byteLength!=H.byteLength||!V(new r(z),new r(H)));case h:case p:case S:return i(+z,+H);case m:return z.name==H.name&&z.message==H.message;case w:case E:return z==H+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=H.size&&!Q)return!1;var K=J.get(z);if(K)return K==H;j|=u,J.set(z,H);var G=o(ie(z),ie(H),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call(H)}return!1}t.exports=N}),Yye=ze((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),qye=ze((e,t)=>{var n=Yye(),r=E8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Zye=ze((e,t)=>{var n=Kye(),r=Xye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Qye=ze((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=ze((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=ze((e,t)=>{var n=Jye(),r=qS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),t3e=ze((e,t)=>{function n(){return!1}t.exports=n}),_$=ze((e,t)=>{var n=Tu(),r=t3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),n3e=ze((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=ze((e,t)=>{var n=GS(),r=k$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[H]=V[$]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=ze((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=ze((e,t)=>{var n=y$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),E$=ze((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=ze((e,t)=>{var n=Qye(),r=e3e(),i=E8(),o=_$(),a=n3e(),s=E$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=ze((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),l3e=ze((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=ze((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=ze((e,t)=>{var n=s3e(),r=u3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),d3e=ze((e,t)=>{var n=b$(),r=k$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=ze((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=ze((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=ze((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=ze((e,t)=>{var n=g3e(),r=k8(),i=m3e(),o=v3e(),a=y3e(),s=GS(),l=x$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=ze((e,t)=>{var n=zye(),r=C$(),i=jye(),o=p3e(),a=S3e(),s=E8(),l=_$(),u=E$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),H=N?m:a(E),$=z?m:a(_);H=H==p?v:H,$=$==p?v:$;var j=H==v,de=$==v,V=H==$;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,H,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=ze((e,t)=>{var n=b3e(),r=qS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),P$=ze((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return T$(e,["input","textarea","select"])}function T$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function P3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=m$(P$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var OL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!T$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){OL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){OL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}m$(P$());var UC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const B3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),F3e=ct({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),$3e=ct({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),H3e=ct({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),W3e=ct({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var no=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(no||{});const V3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},za=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(md,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s8,{className:"invokeai__switch-root",...s})]})})};function A$(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(lke(i.target.checked))})]})}const IL=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(IL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(IL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const H=Je.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String(H)),h(H)};return x(hi,{..._,children:re(md,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Q_,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e8,{...E,className:"invokeai__number-input-stepper-button"}),x(J_,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Au=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return re(md,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(yF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],j3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],P8=0,T8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ft(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ft(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),A8=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee(X3e),{isGFPGANAvailable:i}=Ee(Z3e),o=l=>e(K3(l)),a=l=>e(dV(l)),s=l=>e(X3(l.target.value));return re(en,{direction:"column",gap:2,children:[x(Au,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(za,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var L$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},RL=le.createContext&&le.createContext(L$),Jc=globalThis&&globalThis.__assign||function(){return Jc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function bs(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:H,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const $e=Je.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String($e)),l($e)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return re(md,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...H,children:r}),re(Gz,{w:"100%",gap:2,children:[re(a8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&re($n,{children:[x(RC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...$,children:o}),x(RC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(AF,{className:"invokeai__slider_track",...j,children:x(LF,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(TF,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z_,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(Q_,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),re(dF,{...ie,children:[x(e8,{className:"invokeai__slider-number-stepper"}),x(J_,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L8,{}),onClick:Se,isDisabled:M,...K})]})]})}function O$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const I$=()=>x(Nl,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(za,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(hV(r.target.checked))})})},s4e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(za,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},R$=()=>re(en,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),M8=()=>x(Nl,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(za,{label:"Randomize Seed",isChecked:t,onChange:r=>e(ake(r.target.checked))})}function u4e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(f2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:P8,max:T8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const N$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(f2(N$(P8,T8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(cke(r)),value:t,isInteger:!1})}function f4e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(eke(r)),value:t,isInteger:!1})}const O8=()=>re(en,{gap:2,direction:"column",children:[x(l4e,{}),re(en,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(en,{gap:2,children:x(d4e,{})}),x(en,{gap:2,children:x(f4e,{})})]});function D$(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(ske(i.target.checked))})]})}const h4e=ft(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ft(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),I8=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(h4e),{isESRGANAvailable:r}=Ee(p4e);return re("div",{className:"upscale-options",children:[x(Au,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(za,{isChecked:e,width:"auto",onChange:r=>t(nke(r.target.checked))})}function R8(){return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(md,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k_,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(C8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(dke(i)),isInteger:!1})}const N8=()=>re(en,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]});function S4e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(cV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Cr=ft(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:Je.isEqual}}),b4e=ft(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),z$=e=>e.options;function x4e(){const e=Ee(i=>i.options.height),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(fV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ft([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function C4e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Q8e(i)),value:t,width:D8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(Au,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Ee(i=>i.options.width),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const D8="auto";function z8(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),re("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},B$=MS({name:"system",initialState:P4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:T4e,setIsProcessing:gu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:NL,setSocketId:qPe,setShouldConfirmOnDelete:F$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:G3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:DL,errorSeen:$$,setModelList:zL,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:B4e,setProcessingIndeterminateTask:F4e}=B$.actions,$4e=B$.reducer;function H4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function W4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function H$(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function V4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function U4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const G4e=ft(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Ee(G4e),{text:r}=V3e[t];return n?re(t8,{trigger:"hover",children:[x(i8,{children:x(Nl,{children:e})}),re(r8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=H4e},n)=>x(j4e,{feature:e,children:x(Nl,{ref:n,children:x(ma,{marginBottom:"-.15rem",as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return re(zf,{className:"advanced-settings-item",children:[x("h2",{children:re(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Bf,{className:"advanced-settings-panel",children:r})]})}const B8=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function X4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function Z4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function W$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function V$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function Q4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function J4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function e5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function t5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function n5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function F8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function U$(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function KS(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function r5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function G$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function i5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function o5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function a5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function s5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function l5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function u5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function c5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function d5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function f5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function h5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function p5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function g5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function m5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function v5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function y5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function S5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function j$(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function b5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function x5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function BL(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function w5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function c1(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function C5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function $8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function _5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function H8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const k5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],W8=e=>e.kind==="line"&&e.layer==="mask",E5e=e=>e.kind==="line"&&e.layer==="base",o5=e=>e.kind==="image"&&e.layer==="base",P5e=e=>e.kind==="line",Rn=e=>e.canvas,Lu=e=>e.canvas.layerState.stagingArea.images.length>0,q$=e=>e.canvas.layerState.objects.find(o5),K$=ft([e=>e.options,e=>e.system,q$,Cr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(C8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Je.isEqual,resultEqualityCheck:Je.isEqual}}),GC=Jr("socketio/generateImage"),T5e=Jr("socketio/runESRGAN"),A5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),FL=Jr("socketio/requestNewImages"),M5e=Jr("socketio/cancelProcessing"),O5e=Jr("socketio/requestSystemConfig"),X$=Jr("socketio/requestModelChange"),I5e=Jr("socketio/saveStagingAreaImageToGallery"),R5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Z$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i}=Ee(K$),o=Ee(Cr),a=()=>{r(GC(o))};return vt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const N5e=ft(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function Q$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(N5e),a=()=>n(M5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const D5e=ft(e=>e.options,e=>e.shouldLoopback),z5e=()=>{const e=Xe(),t=Ee(D5e);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(y5e,{}),onClick:()=>{e(ike(!t))}})},V8=()=>{const e=Ee(Cr);return re("div",{className:"process-buttons",children:[x(Z$,{}),e==="img2img"&&x(z5e,{}),x(Q$,{})]})},B5e=ft([e=>e.options,Cr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),U8=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(B5e),{isReady:r}=Ee(K$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(md,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(BF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function J$(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function eH(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function F5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function $5e(e,t){e.classList?e.classList.add(t):F5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $L(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function H5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$L(e.className,t):e.setAttribute("class",$L(e.className&&e.className.baseVal||"",t))}const HL={disabled:!1},tH=le.createContext(null);var nH=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",YC="exiting",Mu=function(e){$_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=YC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&nH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||HL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:yy.findDOMNode(this);if(!o||HL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=z_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(tH.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Mu.contextType=tH;Mu.propTypes={};function Ep(){}Mu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Mu.UNMOUNTED=sm;Mu.EXITED=xf;Mu.ENTERING=wf;Mu.ENTERED=Ip;Mu.EXITING=YC;const W5e=Mu;var V5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return $5e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return H5e(t,r)})},G8=function(e){$_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},WL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),U5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),G5e=.999,j5e=.1,Y5e=20,Fg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},q5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},iH=MS({name:"canvas",initialState:q5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!W8(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:hl(Je.clamp(n.width,64,512),64),height:hl(Je.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Fg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(Je.clamp(i,64,n/e.stageScale),64),s=hl(Je.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=U5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=WL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(P5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Fg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=WL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(o5)){const i=Pp(r.width,r.height,512,512,Fg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Fg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Fg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:hl(Je.clamp(o,64,512),64),height:hl(Je.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:K5e,addLine:oH,addPointToCurrentLine:aH,clearMask:X5e,commitStagingAreaImage:Z5e,discardStagedImages:Q5e,fitBoundingBoxToStage:KPe,nextStagingAreaImage:J5e,prevStagingAreaImage:eSe,redo:tSe,resetCanvas:sH,resetCanvasInteractionState:nSe,resetCanvasView:rSe,resizeAndScaleCanvas:lH,resizeCanvas:iSe,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:XPe,setBrushColor:oSe,setBrushSize:mw,setCanvasContainerDimensions:aSe,clearCanvasHistory:uH,setCursorPosition:cH,setDoesCanvasNeedScaling:Wi,setInitialCanvasImage:j8,setInpaintReplace:VL,setIsDrawing:XS,setIsMaskEnabled:dH,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:ZPe,setIsMoveStageKeyHeld:QPe,setIsMovingBoundingBox:UL,setIsMovingStage:a5,setIsTransformingBoundingBox:vw,setLayer:fH,setMaskColor:sSe,setMergedCanvas:lSe,setShouldAutoSave:uSe,setShouldCropToBoundingBoxOnSave:cSe,setShouldDarkenOutsideBoundingBox:dSe,setShouldLockBoundingBox:JPe,setShouldPreserveMaskedArea:fSe,setShouldShowBoundingBox:hSe,setShouldShowBrush:eTe,setShouldShowBrushPreview:tTe,setShouldShowCanvasDebugInfo:pSe,setShouldShowCheckboardTransparency:nTe,setShouldShowGrid:gSe,setShouldShowIntermediates:mSe,setShouldShowStagingImage:vSe,setShouldShowStagingOutline:GL,setShouldSnapToGrid:ySe,setShouldUseInpaintReplace:SSe,setStageCoordinates:hH,setStageDimensions:rTe,setStageScale:bSe,setTool:C0,toggleShouldLockBoundingBox:iTe,toggleTool:oTe,undo:xSe}=iH.actions,wSe=iH.reducer,pH=""+new URL("logo.13003d72.png",import.meta.url).href,CSe=ft(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Y8=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(CSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(Wi(!0)),400)},[n,i]),vt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),vt("shift+o",()=>{m(),t(Wi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(oke(!i)),t(Wi(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(rH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(J$,{}):x(eH,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function _Se(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(B8,{accordionInfo:e})]})}const q8=C.exports.createContext(null),kSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(q8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x($8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},ESe=ft(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(ESe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(F$(!S.target.checked));return re($n,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(lF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:re(en,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(md,{children:re(en,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(s8,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),ed=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t8,{...o,children:[x(i8,{children:t}),re(r8,{className:`invokeai__popover-content ${r}`,children:[i&&x(n8,{className:"invokeai__popover-arrow"}),n]})]})},PSe=ft([e=>e.system,e=>e.options,e=>e.gallery,Cr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),gH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(PSe),m=o2(),v=()=>{!u||(h&&e(cd(!1)),e(d2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(K8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u?.metadata&&e(f2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(P(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(T5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(A5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(bV(!l)),I=()=>{!u||(h&&e(cd(!1)),e(j8(u)),e(Wi(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(x5e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(BL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(BL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(KS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(G$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(mt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(mt,{icon:x(b5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(mt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(A8,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(I8,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(mt,{icon:x(U$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(mt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},TSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},mH=MS({name:"gallery",initialState:TSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:vH,setCurrentImage:ASe,addGalleryImages:LSe,setIntermediateImage:MSe,selectNextImage:K8,selectPrevImage:X8,setShouldPinGallery:OSe,setShouldShowGallery:_0,setGalleryScrollPosition:ISe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:RSe,setShouldHoldGalleryOpen:yH,setShouldAutoSwitchToNewImages:NSe,setCurrentCategory:Wy,setGalleryWidth:DSe}=mH.actions,zSe=mH.reducer;ct({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ct({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ct({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ct({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ct({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ct({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ct({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ct({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ct({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ct({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ct({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ct({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ct({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ct({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ct({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ct({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ct({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ct({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ct({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ct({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ct({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ct({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ct({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ct({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ct({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ct({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ct({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var SH=ct({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ct({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ct({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ct({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ct({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ct({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ct({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ct({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ct({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ct({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ct({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ct({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ct({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ct({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ct({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ct({displayName:"SpinnerIcon",path:re($n,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ct({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ct({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ct({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ct({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ct({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ct({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ct({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ct({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ct({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ct({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ct({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ct({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ct({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ct({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ct({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function BSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>re(en,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(BSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),re(en,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(SH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),FSe=(e,t)=>e.image.uuid===t.image.uuid,bH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();vt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(en,{gap:1,direction:"column",width:"100%",children:[re(en,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(SH,{mx:"2px"})]})]}),Object.keys(r).length>0?re($n,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:U3(l),onClick:()=>n(gb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(f2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(cV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:i5(h),onClick:()=>n(yV(i5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(hV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(fV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(d2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&re($n,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,H)=>{if(z.type==="esrgan"){const{scale:$,strength:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(x9(j))})]},H)}else if(z.type==="gfpgan"){const{strength:$}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},H)}else if(z.type==="codeformer"){const{strength:$,fidelity:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(dV(j)),n(X3("codeformer"))}})]},H)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),re(en,{gap:2,direction:"column",children:[re(en,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x($z,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},FSe),xH=ft([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function $Se(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())},m=()=>{e(cd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(bH,{image:i,styleClass:"current-image-metadata"})]})}const HSe=ft([e=>e.gallery,e=>e.options,Cr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),wH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(HSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re($n,{children:[x(gH,{}),x($Se,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},WSe=()=>{const e=C.exports.useContext(q8);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x($8,{}),onClick:e||void 0})};function VSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(uV())};return re($n,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(WSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const USe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(VSe,{})}):x(kSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(wH,{})})]})};function GSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var jSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},JSe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],XL="__resizable_base__",CH=function(e){KSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(XL):o.className+=XL,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||XSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Uy(n,M,I),r=Uy(r,R,N)}else n=Uy(n,h,p),r=Uy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&ZSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Gy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Gy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Gy(n)?n.touches[0].clientX:n.clientX,h=Gy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=QSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=KL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=KL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=qL(M,this.props.grid[0]),z=qL(T,this.props.grid[1]),H=this.props.snapGap||0;M=H===0||Math.abs(N-M)<=H?N:M,T=H===0||Math.abs(z-T)<=H?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(qSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return JSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return re(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ebe(i,...t)]}function ebe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function tbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _H(...e){return t=>e.forEach(n=>tbe(n,t))}function Ua(...e){return C.exports.useCallback(_H(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(rbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(KC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ibe(r,n.props),ref:_H(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const nbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function rbe(e){return C.exports.isValidElement(e)&&e.type===nbe}function ibe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const obe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],_u=obe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kH(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function EH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ua(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ua(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const abe=C.exports.createContext(void 0);function PH(e){const t=C.exports.useContext(abe);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function sbe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",lbe="dismissableLayer.pointerDownOutside",ube="dismissableLayer.focusOutside";let ZL;const cbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(cbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ua(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=fbe(z=>{const H=z.target,$=[...h.branches].some(j=>j.contains(H));!I||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=hbe(z=>{const H=z.target;[...h.branches].some(j=>j.contains(H))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return sbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ZL=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),QL(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ZL)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),QL())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(_u.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function fbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){TH(lbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&TH(ube,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function QL(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function TH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kH(i,o):i.dispatchEvent(o)}let bw=0;function pbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:JL()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:JL()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function JL(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},gbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ua(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){nM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(xw,eM);s.addEventListener(xw,u),s.dispatchEvent(E),E.defaultPrevented||(mbe(xbe(AH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const E=new CustomEvent(ww,eM);s.addEventListener(ww,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(ww,h),nM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=vbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(_u.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function mbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function vbe(e){const t=AH(e),n=tM(t,e),r=tM(t.reverse(),e);return[n,r]}function AH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tM(e,t){for(const n of e)if(!ybe(n,{upTo:t}))return n}function ybe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sbe(e)&&t&&e.select()}}const nM=bbe();function bbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rM(e,t),e.unshift(t)},remove(t){var n;e=rM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function rM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},wbe=zw["useId".toString()]||(()=>{});let Cbe=0;function _be(e){const[t,n]=C.exports.useState(wbe());return Y0(()=>{e||n(r=>r??String(Cbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function ZS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function Z8(e){return e==="y"?"height":"width"}function iM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=f1(t),l=Z8(s),u=r[l]/2-i[l]/2,h=d1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(ZS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const kbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=iM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=LH(r),h={x:i,y:o},p=f1(a),m=ZS(a),v=Z8(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,H=ZC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==H&&s.reference[v]<=s.floating[v]?zAbe[t])}function Lbe(e,t,n){n===void 0&&(n=!1);const r=ZS(e),i=f1(e),o=Z8(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u5(a)),{main:a,cross:u5(a)}}const Mbe={start:"end",end:"start"};function aM(e){return e.replace(/start|end/g,t=>Mbe[t])}const Obe=["top","right","bottom","left"];function Ibe(e){const t=u5(e);return[aM(e),t,aM(t)]}const Rbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[u5(a)]:Ibe(a)),_=[a,...E],T=await l5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:H,cross:$}=Lbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[H],T[$])}if(I=[...I,{placement:r,overflows:M}],!M.every(H=>H<=0)){var R,N;const H=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=_[H];if($)return{data:{index:H,overflows:I},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function sM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lM(e){return Obe.some(t=>e[t]>=0)}const Nbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await l5(r,{...n,elementContext:"reference"}),a=sM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:lM(a)}}}case"escaped":{const o=await l5(r,{...n,altBoundary:!0}),a=sM(o,i.floating);return{data:{escapedOffsets:a,escaped:lM(a)}}}default:return{}}}}};async function Dbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=ZS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const zbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Dbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function MH(e){return e==="x"?"y":"x"}const Bbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await l5(t,l),p=f1(d1(i)),m=MH(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=ZC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=ZC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Fbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=f1(i),m=MH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;vN&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function OH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ou(e){if(e==null)return window;if(!OH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Ou(e).getComputedStyle(e)}function ku(e){return OH(e)?"":e?(e.nodeName||"").toLowerCase():""}function IH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Ou(e).HTMLElement}function ud(e){return e instanceof Ou(e).Element}function $be(e){return e instanceof Ou(e).Node}function Q8(e){if(typeof ShadowRoot>"u")return!1;const t=Ou(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function QS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Hbe(e){return["table","td","th"].includes(ku(e))}function RH(e){const t=/firefox/i.test(IH()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function NH(){return!/^((?!chrome|android).)*safari/i.test(IH())}const uM=Math.min,Hm=Math.max,c5=Math.round;function Eu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ml(e)&&(l=e.offsetWidth>0&&c5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c5(s.height)/e.offsetHeight||1);const h=ud(e)?Ou(e):window,p=!NH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function bd(e){return(($be(e)?e.ownerDocument:e.document)||window.document).documentElement}function JS(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function DH(e){return Eu(bd(e)).left+JS(e).scrollLeft}function Wbe(e){const t=Eu(e);return c5(t.width)!==e.offsetWidth||c5(t.height)!==e.offsetHeight}function Vbe(e,t,n){const r=Ml(t),i=bd(t),o=Eu(e,r&&Wbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((ku(t)!=="body"||QS(i))&&(a=JS(t)),Ml(t)){const l=Eu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=DH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function zH(e){return ku(e)==="html"?e:e.assignedSlot||e.parentNode||(Q8(e)?e.host:null)||bd(e)}function cM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ube(e){let t=zH(e);for(Q8(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(ku(t));){if(RH(t))return t;t=t.parentNode}return null}function QC(e){const t=Ou(e);let n=cM(e);for(;n&&Hbe(n)&&getComputedStyle(n).position==="static";)n=cM(n);return n&&(ku(n)==="html"||ku(n)==="body"&&getComputedStyle(n).position==="static"&&!RH(n))?t:n||Ube(e)||t}function dM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Eu(e);return{width:t.width,height:t.height}}function Gbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((ku(n)!=="body"||QS(o))&&(a=JS(n)),Ml(n))){const l=Eu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function jbe(e,t){const n=Ou(e),r=bd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=NH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ybe(e){var t;const n=bd(e),r=JS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Hm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Hm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+DH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Hm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BH(e){const t=zH(e);return["html","body","#document"].includes(ku(t))?e.ownerDocument.body:Ml(t)&&QS(t)?t:BH(t)}function d5(e,t){var n;t===void 0&&(t=[]);const r=BH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ou(r),a=i?[o].concat(o.visualViewport||[],QS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d5(a))}function qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Q8(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Kbe(e,t){const n=Eu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function fM(e,t,n){return t==="viewport"?s5(jbe(e,n)):ud(t)?Kbe(t,n):s5(Ybe(bd(e)))}function Xbe(e){const t=d5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?QC(e):e;return ud(r)?t.filter(i=>ud(i)&&qbe(i,r)&&ku(i)!=="body"):[]}function Zbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=fM(t,h,i);return u.top=Hm(p.top,u.top),u.right=uM(p.right,u.right),u.bottom=uM(p.bottom,u.bottom),u.left=Hm(p.left,u.left),u},fM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Qbe={getClippingRect:Zbe,convertOffsetParentRelativeRectToViewportRelativeRect:Gbe,isElement:ud,getDimensions:dM,getOffsetParent:QC,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Vbe(t,QC(n),r),floating:{...dM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Jbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?d5(e):[],...d5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?Eu(e):null;s&&S();function S(){const w=Eu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const exe=(e,t,n)=>kbe(e,t,{platform:Qbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!e9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function txe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function nxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=txe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||exe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:P,floating:E}),[u,v,_,P,E])}const rxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?oM({element:t.current,padding:n}).fn(i):{}:t?oM({element:t,padding:n}).fn(i):{}}}};function ixe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const FH="Popper",[J8,$H]=a2(FH),[oxe,HH]=J8(FH),axe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(oxe,{scope:t,anchor:r,onAnchorChange:i},n)},sxe="PopperAnchor",lxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HH(sxe,n),a=C.exports.useRef(null),s=Ua(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(_u.div,Tn({},i,{ref:s}))}),f5="PopperContent",[uxe,aTe]=J8(f5),[cxe,dxe]=J8(f5,{hasParent:!1,positionUpdateFns:new Set}),fxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HH(f5,h),[N,z]=C.exports.useState(null),H=Ua(t,Ct=>z(Ct)),[$,j]=C.exports.useState(null),de=ixe($),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(pxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:$e,update:He}=nxe({strategy:"fixed",placement:ie,whileElementsMounted:Jbe,middleware:[zbe({mainAxis:m+J,alignmentAxis:S}),M?Bbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Fbe():void 0,...Z}):void 0,$?rxe({element:$,padding:w}):void 0,M?Rbe({...Z}):void 0,gxe({arrowWidth:V,arrowHeight:J}),T?Nbe({strategy:"referenceHidden"}):void 0].filter(hxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const qe=ye!==null&&Se!==null,[tt,Ze]=WH(De),nt=(i=$e.arrow)===null||i===void 0?void 0:i.x,Tt=(o=$e.arrow)===null||o===void 0?void 0:o.y,xt=((a=$e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,at]=C.exports.useState();Y0(()=>{N&&at(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:st}=dxe(f5,h),gt=!At;C.exports.useLayoutEffect(()=>{if(!gt)return st.add(He),()=>{st.delete(He)}},[gt,st,He]),C.exports.useLayoutEffect(()=>{gt&&qe&&Array.from(st).reverse().forEach(Ct=>requestAnimationFrame(Ct))},[gt,qe,st]);const an={"data-side":tt,"data-align":Ze,...I,ref:H,style:{...I.style,animation:qe?void 0:"none",opacity:(s=$e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=$e.transformOrigin)===null||l===void 0?void 0:l.x,(u=$e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(uxe,{scope:h,placedSide:tt,onArrowChange:j,arrowX:nt,arrowY:Tt,shouldHideArrow:xt},gt?C.exports.createElement(cxe,{scope:h,hasParent:!0,positionUpdateFns:st},C.exports.createElement(_u.div,an)):C.exports.createElement(_u.div,an)))});function hxe(e){return e!==void 0}function pxe(e){return e!==null}const gxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=WH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function WH(e){const[t,n="center"]=e.split("-");return[t,n]}const mxe=axe,vxe=lxe,yxe=fxe;function Sxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const VH=e=>{const{present:t,children:n}=e,r=bxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ua(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};VH.displayName="Presence";function bxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Sxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Yy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Yy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Yy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Yy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Yy(e){return e?.animationName||"none"}function xxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=wxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function wxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",Cxe={bubbles:!1,cancelable:!0},ek="RovingFocusGroup",[t9,UH,_xe]=EH(ek),[kxe,GH]=a2(ek,[_xe]),[Exe,Pxe]=kxe(ek),Txe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Axe,Tn({},e,{ref:t}))))),Axe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Ua(t,p),v=PH(o),[S=null,w]=xxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=UH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,_),()=>N.removeEventListener(Cw,_)},[_]),C.exports.createElement(Exe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(_u.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const H=new CustomEvent(Cw,Cxe);if(N.currentTarget.dispatchEvent(H),!H.defaultPrevented){const $=T().filter(ie=>ie.focusable),j=$.find(ie=>ie.active),de=$.find(ie=>ie.id===S),J=[j,de,...$].filter(Boolean).map(ie=>ie.ref.current);jH(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Lxe="RovingFocusGroupItem",Mxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=_be(),s=Pxe(Lxe,n),l=s.currentTabStopId===a,u=UH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(_u.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Rxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Nxe(w,P+1):w.slice(P+1)}setTimeout(()=>jH(w))}})})))}),Oxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ixe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Rxe(e,t,n){const r=Ixe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Oxe[r]}function jH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Dxe=Txe,zxe=Mxe,Bxe=["Enter"," "],Fxe=["ArrowDown","PageUp","Home"],YH=["ArrowUp","PageDown","End"],$xe=[...Fxe,...YH],eb="Menu",[n9,Hxe,Wxe]=EH(eb),[ph,qH]=a2(eb,[Wxe,$H,GH]),tk=$H(),KH=GH(),[Vxe,tb]=ph(eb),[Uxe,nk]=ph(eb),Gxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=tk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=PH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(mxe,s,C.exports.createElement(Vxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Uxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},jxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=tk(n);return C.exports.createElement(vxe,Tn({},i,r,{ref:t}))}),Yxe="MenuPortal",[sTe,qxe]=ph(Yxe,{forceMount:void 0}),td="MenuContent",[Kxe,XH]=ph(td),Xxe=C.exports.forwardRef((e,t)=>{const n=qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tb(td,e.__scopeMenu),a=nk(td,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(VH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Zxe,Tn({},i,{ref:t})):C.exports.createElement(Qxe,Tn({},i,{ref:t})))))}),Zxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ua(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(ZH,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Qxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu);return C.exports.createElement(ZH,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),ZH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=tb(td,n),P=nk(td,n),E=tk(n),_=KH(n),T=Hxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ua(t,R,w.onContentChange),z=C.exports.useRef(0),H=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?oF:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=H.current+G,he=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(Z=he.find(qe=>qe.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(qe=>qe.textValue),$e=swe(De,X,Se),He=(te=he.find(qe=>qe.textValue===$e))===null||te===void 0?void 0:te.ref.current;(function qe(tt){H.current=tt,window.clearTimeout(z.current),tt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),He&&setTimeout(()=>He.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),pbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&uwe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(Kxe,{scope:n,searchRef:H,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(gbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(dbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Dxe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(yxe,Tn({role:"menu","aria-orientation":"vertical","data-state":iwe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!$xe.includes(G.key))return;G.preventDefault();const De=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);YH.includes(G.key)&&De.reverse(),owe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:qn(e.onPointerMove,i9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),r9="MenuItem",hM="menu.itemSelect",Jxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=nk(r9,e.__scopeMenu),s=XH(r9,e.__scopeMenu),l=Ua(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(hM,{bubbles:!0,cancelable:!0});p.addEventListener(hM,v=>r?.(v),{once:!0}),kH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(ewe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Bxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),ewe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=XH(r9,n),s=KH(n),l=C.exports.useRef(null),u=Ua(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(zxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(_u.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),twe="MenuRadioGroup";ph(twe,{value:void 0,onValueChange:()=>{}});const nwe="MenuItemIndicator";ph(nwe,{checked:!1});const rwe="MenuSub";ph(rwe);function iwe(e){return e?"open":"closed"}function owe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function swe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=awe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function lwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function uwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lwe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const cwe=Gxe,dwe=jxe,fwe=Xxe,hwe=Jxe,QH="ContextMenu",[pwe,lTe]=a2(QH,[qH]),nb=qH(),[gwe,JH]=pwe(QH),mwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(gwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(cwe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},vwe="ContextMenuTrigger",ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(vwe,n),o=nb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(dwe,Tn({},o,{virtualRef:s})),C.exports.createElement(_u.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,qy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,qy(u)),onPointerCancel:qn(e.onPointerCancel,qy(u)),onPointerUp:qn(e.onPointerUp,qy(u))})))}),Swe="ContextMenuContent",bwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(Swe,n),o=nb(n),a=C.exports.useRef(!1);return C.exports.createElement(fwe,Tn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),xwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nb(n);return C.exports.createElement(hwe,Tn({},i,r,{ref:t}))});function qy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const wwe=mwe,Cwe=ywe,_we=bwe,gf=xwe,kwe=ft([e=>e.gallery,e=>e.options,Lu,Cr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Ewe=ft([e=>e.options,e=>e.gallery,e=>e.system,Cr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Pwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Twe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(Ewe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(f2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(cd(!1)),t(d2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(cd(!1)),t(j8(s)),t(lH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(X8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(q8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(wwe,{onOpenChange:H=>{t(yH(H))},children:[x(Cwe,{children:re(Nl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ASe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:F8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(w5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(_we,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:H=>{H.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},Pwe),gs=e=>{const{label:t,styleClass:n,...r}=e;return x(Az,{className:`invokeai__checkbox ${n}`,...r,children:t})},Ky=320,pM=40,Awe={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},gM=400;function eW(){const e=Xe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Ee(kwe),{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:gM,galleryMaxWidth:gM}:Awe[u],[M,I]=C.exports.useState(S>=Ky),[R,N]=C.exports.useState(!1),[z,H]=C.exports.useState(0),$=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=Ky&&I(!1)},[S]);const V=()=>{e(OSe(!i)),e(Wi(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(Wi(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(yH(!1)),e(ISe(j.current?j.current.scrollTop:0)),setTimeout(()=>e(Wi(!0)),400)},[e]),K=()=>{e(jC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};vt("g",()=>{J()},[o,i]),vt("left",()=>{e(X8())},{enabled:!P},[P]),vt("right",()=>{e(K8())},{enabled:!P},[P]),vt("shift+g",()=>{V()},[i]),vt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return vt("shift+up",()=>{if(s<256){const he=Je.clamp(s+X,32,256);e($g(he))}},[s]),vt("shift+down",()=>{if(s>32){const he=Je.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&$.current&&!$.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(rH,{nodeRef:$,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:re("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:$,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[re(CH,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{H(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const $e=i?Je.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(DSe($e)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(Wi(!0)))},onResize:(he,ye,Se,De)=>{const $e=Je.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));$e>=Ky&&!M?I(!0):$e$e-pM&&e($g($e-pM)),i&&($e>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?re($n,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re($n,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(_5e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(ed,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(H8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(L8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(gs,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(RSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(gs,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(NSe(he.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(J$,{}):x(eH,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?re($n,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(Twe,{image:he,isSelected:r===ye},ye)})}),x($a,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Lwe=ft([e=>e.options,Cr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),rk=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(Lwe),l=()=>{t(uke(!o)),t(Wi(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(GSe,{})})})]}),!a&&x(eW,{})]})})};function Mwe(){return x(rk,{optionsPanel:x(_Se,{}),children:x(USe,{})})}function Owe(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(B8,{accordionInfo:e})]})}const Iwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(wH,{})})});function Rwe(){return x(rk,{optionsPanel:x(Owe,{}),children:x(Iwe,{})})}var o9=function(e,t){return o9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},o9(e,t)};function Nwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=Zwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):rW(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function Zwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Qwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Jwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ik=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Qwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Jwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ik(e,t);return e.bounds=n,n};function rb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?en?Ra(n,2):Ra(e,2):Ra(e,2)};function ib(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=rb(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var vM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ob(o,n);return!l},yM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},e6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},t6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function n6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ib(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function r6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=rb(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var i6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},o6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},a6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function s6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function SM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:a9(e,o,a,i)}function l6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function u6e(e,t){var n=o6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=l6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function c6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=a6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=s6e(e,l),H=Math.max(z,N),$=h5(e,M),j=h5(e,I),de=$*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();rW(e,T,H,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,$e=De/N,He=tW[S.animationType],qe=1-He(Math.min(1,$e)),tt=1-te,Ze=ye+a*tt,nt=Se+s*tt,Tt=SM(Ze,G.positionX,ye,_,v,h,u,ie,J,qe),xt=SM(nt,G.positionY,Se,E,v,m,p,K,Q,qe);(ye!==Ze||Se!==nt)&&e.setTransformState(he,Tt,xt)})}}function bM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?t6e(e,t):e6e(e,t)}function xM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=i6e(e,t,n),u=l.x,h=l.y,p=h5(e,a),m=h5(e,s);u6e(e,{x:u,y:h}),r6e(e,u,h,p,m)}}function d6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?c6e(e):iW(e)}}function iW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&iW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=ok(e,a,v,S);w&&xd(e,w,h,p)}}function ok(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=ib(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},f6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Hg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},aW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},wM=function(e){var t=Pl({},Hg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Hg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Hg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Hg[n]),e[n]):s?t[n]=mM(mM([],Hg[n]),e[n]):t[n]=e[n]}}),t},sW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Ra(h,3),s,a,u,!1);return p};function lW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=sW(e,t,n),w=ok(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function uW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=aW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ik(e,a.scale),m=rb(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||xd(e,v,t,n)}}function h6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=p6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=ik(e,P),R=rb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function p6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function g6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var m6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,1,t,n,r)}},v6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,-1,t,n,r)}},y6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},S6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),uW(e,t,n)}},b6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=cW(t||i.scale,o,a);xd(e,s,n,r)}}},x6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&g6e(a)&&a&&o.contains(a)){var s=h6e(e,a,n);xd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:m6e(e),zoomOut:v6e(e),setTransform:y6e(e),resetTransform:S6e(e),centerView:b6e(e),zoomToElement:x6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ob=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},CM=function(e){e&&clearTimeout(e)},w6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},cW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},C6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ob(u,a);return!p};function _6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Dwe(t,n);return r}function dW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var k6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Ra(v,3),u,l,p,S);return w},E6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},P6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ob(a,i);return!l},T6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},A6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},fW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},L6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Ra(p,2),a,o,l,!u)},M6e=160,O6e=100,I6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Fr(e),t,r),ui(Fr(e),t,i))},R6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=_6e(t,null),E=k6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=dW(t,o,l),M=S||v===0||h,I=u&&M,R=ib(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Fr(e),t,r),ui(Fr(e),t,i)}},N6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;CM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(oW(e,t.x,t.y),e.wheelAnimationTimer=null)},O6e);var o=E6e(e,t);o&&(CM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Fr(e),t,r),ui(Fr(e),t,i))},M6e))},D6e=function(e,t){var n=fW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},z6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=A6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=fW(t),v=L6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ib(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},B6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,oW(e,t?.x,t?.y)};function F6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return uW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=sW(e,h,o),m=dW(t,u,l),v=ok(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var $6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ob(l,s);return!(p||!h)},hW=le.createContext(f6e),H6e=function(e){Nwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=aW(n.props),n.setup=wM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=kw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=C6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(I6e(n,r),R6e(n,r),N6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),bM(n,r),ui(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=yM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),xM(n,r.clientX,r.clientY),ui(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(d6e(n),ui(Fr(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=P6e(n,r);!l||(D6e(n,r),vl(n),ui(Fr(n),r,a),ui(Fr(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=T6e(n);!l||(r.preventDefault(),r.stopPropagation(),z6e(n,r),ui(Fr(n),r,a),ui(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(B6e(n),ui(Fr(n),r,o),ui(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),bM(n,r),ui(Fr(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=yM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];xM(n,s.clientX,s.clientY),ui(Fr(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=$6e(n,r);!o||F6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Fr(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=cW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=w6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=kw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=kw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=wM(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(hW.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),W6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(H6e,{...Pl({},e,{setRef:i})})});function V6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var U6e=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,_M={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};V6e(U6e);var G6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(hW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+_M.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+_M.content+" "+o,style:s,children:t})})};function j6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(W6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re($n,{children:[re("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(mt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(W4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(L8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(G6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function Y6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())};return vt("Esc",()=>{t&&e(cd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(mt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(cd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(gH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re($n,{children:[x(j6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(bH,{image:n})]})]}),x(eW,{})]})]})}const q6e=ft(Rn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),K6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(q6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return re(en,{direction:"column",gap:"1rem",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},X6e=()=>x(Nl,{flex:"1",textAlign:"left",children:"Bounding Box"}),u2=e=>e.system,Z6e=e=>e.system.toastQueue,Q6e=ft(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee(Q6e),n=Xe();return re(en,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(VL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(VL(1)),isResetDisabled:!t}),x(za,{isChecked:t,onChange:r=>n(SSe(r.target.checked))})]})}const eCe=ft([z$,u2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),tCe=()=>{const e=Xe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Ee(eCe);return re(en,{direction:"column",gap:"1rem",children:[x(J6e,{}),x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(sO(u))},handleReset:()=>e(sO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(aO(u))},handleReset:()=>{e(aO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(uO(u))},handleReset:()=>{e(uO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(lO(u))},handleReset:()=>{e(lO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(za,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(tke(u.target.checked))}}),x(Au,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(pV(u.target.value))}),x(bs,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(cO(u))},handleReset:()=>{e(cO(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},nCe=()=>x(Nl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function rCe(){const e={boundingBox:{header:x(X6e,{}),feature:no.BOUNDING_BOX,options:x(K6e,{})},outpainting:{header:x(nCe,{}),feature:no.OUTPAINTING,options:x(tCe,{})},seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(B8,{accordionInfo:e})]})}const iCe=ft(Rn,q$,Cr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),oCe=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(iCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(aSe({width:a,height:s})),e(iSe()),e(Wi(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var aCe=Math.PI/180;function sCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},lt={_global:k0,version:"8.3.13",isBrowser:sCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return lt.angleDeg?e*aCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return lt.DD.isDragging},isDragReady(){return!!lt.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{lt[e.prototype.getClassName()]=e};lt._injectGlobal(lt);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var lCe="[object Array]",uCe="[object Number]",cCe="[object String]",dCe="[object Boolean]",fCe=Math.PI/180,hCe=180/Math.PI,Ew="#",pCe="",gCe="0",mCe="Konva warning: ",kM="Konva error: ",vCe="rgb(",Pw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},yCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const SCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===lCe},_isNumber(e){return Object.prototype.toString.call(e)===uCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===cCe},_isBoolean(e){return Object.prototype.toString.call(e)===dCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Xy.push(e),Xy.length===1&&SCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ew,pCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=gCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===vCe?(t=yCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function Be(){if(lt.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function gW(e){if(lt.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function ak(){if(lt.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(lt.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function mW(){if(lt.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function bCe(){if(lt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(lt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function xCe(e){if(lt.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Wg="get",Vg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Wg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Wg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Vg+n,i=Wg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Wg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Wg+fe._capitalize(n),a=Vg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function wCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=CCe+u.join(EM)+_Ce)):(o+=s.property,t||(o+=ACe+s.val)),o+=PCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=MCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=PM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=wCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,lt._mouseListenClick=!1,lt._touchListenClick=!1,lt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof lt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};lt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",su="absoluteTransform",TM="absoluteScale",Ug="canvas",NCe="Change",DCe="children",zCe="konva",s9="listening",AM="mouseenter",LM="mouseleave",MM="set",OM="Shape",Y3=" ",IM="stage",Tc="transform",BCe="Stage",l9="visible",FCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let $Ce=1;class Fe{constructor(t){this._id=$Ce++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Tc||t===su)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Tc||t===su,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===su&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new sk({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(TM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==DCe&&(r=MM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(l9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!lt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==BCe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Tc),this._clearSelfAndDescendantCache(su)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Tc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Tc),this._clearSelfAndDescendantCache(su),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(j3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():lt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),lt[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=lt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Fe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return lt.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function NM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const YCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",q3=[];class lb extends ua{constructor(t){super(NM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{NM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===WCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(YCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+RM,this.content.style.height=n+RM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rGCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),lt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}getLayers(){return this.children}_bindContentEvents(){!lt.isBrowser||jCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||lt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,lt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;lt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||lt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;lt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(lt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){lt["_"+r+"InDblClickWindow"]=!1},lt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),lt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,lt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),lt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,lk(t)),Wm(t.pointerId)}_lostpointercapture(t){Wm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new sk({pixelRatio:1,width:this.width(),height:this.height()}),!!lt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lb.prototype.nodeType=HCe;pr(lb);q.addGetterSetter(lb,"container");var LW="hasShadow",MW="shadowRGBA",OW="patternImage",IW="linearGradient",RW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Vm={};function qCe(e){e.fill()}function KCe(e){e.stroke()}function XCe(e){e.fill()}function ZCe(e){e.stroke()}function QCe(){this._clearCache(LW)}function JCe(){this._clearCache(MW)}function e9e(){this._clearCache(OW)}function t9e(){this._clearCache(IW)}function n9e(){this._clearCache(RW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(LW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(OW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(lt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(IW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete Vm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}}Me.prototype._fillFunc=qCe;Me.prototype._strokeFunc=KCe;Me.prototype._fillFuncHit=XCe;Me.prototype._strokeFuncHit=ZCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",QCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",JCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",e9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",t9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",n9e);q.addGetterSetter(Me,"stroke",void 0,mW());q.addGetterSetter(Me,"strokeWidth",2,Be());q.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Me,"hitStrokeWidth","auto",ak());q.addGetterSetter(Me,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Me,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Me,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Me,"lineJoin");q.addGetterSetter(Me,"lineCap");q.addGetterSetter(Me,"sceneFunc");q.addGetterSetter(Me,"hitFunc");q.addGetterSetter(Me,"dash");q.addGetterSetter(Me,"dashOffset",0,Be());q.addGetterSetter(Me,"shadowColor",void 0,h1());q.addGetterSetter(Me,"shadowBlur",0,Be());q.addGetterSetter(Me,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);q.addGetterSetter(Me,"shadowOffsetX",0,Be());q.addGetterSetter(Me,"shadowOffsetY",0,Be());q.addGetterSetter(Me,"fillPatternImage");q.addGetterSetter(Me,"fill",void 0,mW());q.addGetterSetter(Me,"fillPatternX",0,Be());q.addGetterSetter(Me,"fillPatternY",0,Be());q.addGetterSetter(Me,"fillLinearGradientColorStops");q.addGetterSetter(Me,"strokeLinearGradientColorStops");q.addGetterSetter(Me,"fillRadialGradientStartRadius",0);q.addGetterSetter(Me,"fillRadialGradientEndRadius",0);q.addGetterSetter(Me,"fillRadialGradientColorStops");q.addGetterSetter(Me,"fillPatternRepeat","repeat");q.addGetterSetter(Me,"fillEnabled",!0);q.addGetterSetter(Me,"strokeEnabled",!0);q.addGetterSetter(Me,"shadowEnabled",!0);q.addGetterSetter(Me,"dashEnabled",!0);q.addGetterSetter(Me,"strokeScaleEnabled",!0);q.addGetterSetter(Me,"fillPriority","color");q.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);q.addGetterSetter(Me,"fillPatternOffsetX",0,Be());q.addGetterSetter(Me,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);q.addGetterSetter(Me,"fillPatternScaleX",1,Be());q.addGetterSetter(Me,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientStartPointX",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Me,"fillLinearGradientStartPointY",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientEndPointX",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Me,"fillLinearGradientEndPointY",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientStartPointX",0);q.addGetterSetter(Me,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientEndPointX",0);q.addGetterSetter(Me,"fillRadialGradientEndPointY",0);q.addGetterSetter(Me,"fillPatternRotation",0);q.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var r9e="#",i9e="beforeDraw",o9e="draw",NW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],a9e=NW.length;class gh extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new sk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(i9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(o9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class uk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}uk.prototype.nodeType="FastLayer";pr(uk);class K0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Oa{constructor(t,n){this.id=Oa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=DM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=zM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===DM?this.setTime(t):this.state===zM&&this.setTime(this.duration-t)}pause(){this.state=l9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=u9e++;var u=r.getLayer()||(r instanceof lt.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Oa(function(){n.tween.onEnterFrame()},u),this.tween=new c9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)s9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Um={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Iu.prototype._centroid=!0;Iu.prototype.className="Arc";Iu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Iu);q.addGetterSetter(Iu,"innerRadius",0,Be());q.addGetterSetter(Iu,"outerRadius",0,Be());q.addGetterSetter(Iu,"angle",0,Be());q.addGetterSetter(Iu,"clockwise",!1,Ls());function d9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function FM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,H,$,j,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+Q,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break;case"a":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},I=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=I([1,0],[(p-w)/s,(m-P)/l]),N=[(p-w)/s,(m-P)/l],z=[(-1*p-w)/s,(-1*m-P)/l],H=I(N,z);return M(N,z)<=-1&&(H=Math.PI),M(N,z)>=1&&(H=0),a===0&&H>0&&(H=H-2*Math.PI),a===1&&H<0&&(H=H+2*Math.PI),[E,_,s,l,R,H,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Ru{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var DW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],d9e="Change.konva",f9e="none",f9="up",h9="right",p9="down",g9="left",h9e=DW.length;class ck extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var $M=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,$M,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),$M,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class zl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Oa(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Iw(){return o3||(o3=fe.createCanvasElement().getContext(m9e),o3)}function P9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function T9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(A9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(v9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Iw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+i3+this.fontVariant()+i3+(this.fontSize()+x9e)+E9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Iw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==VM,w=v!==_9e&&S,P=this.ellipsis();this.textArr=[],Iw().font=this._getContextFont();for(var E=P?this._getTextWidth(Ow):0,_=0,T=t.length;_h)for(;M.length>0;){for(var R=0,N=M.length,z="",H=0;R>>1,j=M.slice(0,$+1),de=this._getTextWidth(j)+E;de<=h?(R=$+1,z=j,H=de):N=$}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===HM;ie&&H<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(HM))+1,V>0&&(R=V,z=z.slice(0,R),H=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,H),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==VM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Ow)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=zW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${UW}`).join(" "),UM="nodesRect",O9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],I9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const R9e="ontouchstart"in lt._global;function N9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(I9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],GM=1e8;function D9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function GW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function z9e(e,t){const n=D9e(e);return GW(e,t,n)}function B9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(O9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(UM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(UM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(lt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return GW(h,-lt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-GM,y:-GM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-lt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:lt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new c2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:R9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=lt.getAngle(this.rotation()),o=N9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=lt.getAngle(this.rotation());const V=m+de,J=lt.getAngle(this.rotationSnapTolerance()),Q=B9e(this.rotationSnaps(),V,J)-p.rotation,K=z9e(p,Q);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(lt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function F9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p5.join(", "))}),e||[]}_n.prototype.className="Transformer";pr(_n);q.addGetterSetter(_n,"enabledAnchors",p5,F9e);q.addGetterSetter(_n,"flipEnabled",!0,Ls());q.addGetterSetter(_n,"resizeEnabled",!0);q.addGetterSetter(_n,"anchorSize",10,Be());q.addGetterSetter(_n,"rotateEnabled",!0);q.addGetterSetter(_n,"rotationSnaps",[]);q.addGetterSetter(_n,"rotateAnchorOffset",50,Be());q.addGetterSetter(_n,"rotationSnapTolerance",5,Be());q.addGetterSetter(_n,"borderEnabled",!0);q.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"anchorStrokeWidth",1,Be());q.addGetterSetter(_n,"anchorFill","white");q.addGetterSetter(_n,"anchorCornerRadius",0,Be());q.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"borderStrokeWidth",1,Be());q.addGetterSetter(_n,"borderDash");q.addGetterSetter(_n,"keepRatio",!0);q.addGetterSetter(_n,"centeredScaling",!1);q.addGetterSetter(_n,"ignoreStroke",!1);q.addGetterSetter(_n,"padding",0,Be());q.addGetterSetter(_n,"node");q.addGetterSetter(_n,"nodes");q.addGetterSetter(_n,"boundBoxFunc");q.addGetterSetter(_n,"anchorDragBoundFunc");q.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);q.addGetterSetter(_n,"useSingleNodeRotation",!0);q.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Nu extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,lt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Nu.prototype.className="Wedge";Nu.prototype._centroid=!0;Nu.prototype._attrsAffectingSize=["radius"];pr(Nu);q.addGetterSetter(Nu,"radius",0,Be());q.addGetterSetter(Nu,"angle",0,Be());q.addGetterSetter(Nu,"clockwise",!1);q.backCompat(Nu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function jM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var $9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],H9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function W9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,H,$,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new jM,Z=null,te=G,X=null,he=null,ye=$9e[t],Se=H9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)0&&W9e(t,n)};q.addGetterSetter(Fe,"blurRadius",0,Be(),q.afterSetFilter);const U9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter(Fe,"contrast",0,Be(),q.afterSetFilter);const j9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,H=I>0?I:-I;if(z>N&&(R=M),H>N&&(R=I),R*=t,i){var $=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=$>255?255:$<0?0:$,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter(Fe,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter(Fe,"embossBlend",!1,null,q.afterSetFilter);function Rw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const Y9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mE?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,H,$;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function a7e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter(Fe,"pixelSize",8,Be(),q.afterSetFilter);const c7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);const f7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);q.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const h7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},g7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[W]!==O[se]){var pe=` +`+A[W].replace(" at new "," at ");return d.displayName&&pe.includes("")&&(pe=pe.replace("",d.displayName)),pe}while(1<=W&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function Sn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},_r=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ka(){kn(Ur),kn(_r)}function Td(d,f,y){if(_r.current!==Do)throw Error(a(168));Sn(_r,f),Sn(Ur,y)}function Hl(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Xa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=_r.current,Sn(_r,d),Sn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=Hl(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(_r),Sn(_r,d)):kn(Ur),Sn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Bs=64,uo=4194304;function Fs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?k=Fs(se):(O&=W,O!==0&&(k=Fs(O)))}else W=y&~A,W!==0?k=Fs(W):O!==0&&(k=Fs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0>=W,A-=W,Gi=1<<32-mi(f)+A|y<Ft?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Ft],Ve);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Ft===be.length)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;FtFt?(zr=Et,Et=null):zr=Et.sibling;var os=Ye(me,Et,qt.value,Ve);if(os===null){Et===null&&(Et=zr);break}d&&Et&&os.alternate===null&&f(me,Et),ue=O(os,ue,Ft),Mt===null?Te=os:Mt.sibling=os,Mt=os,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;!qt.done;Ft++,qt=be.next())qt=Lt(me,qt.value,Ve),qt!==null&&(ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Ft),Te}for(Et=k(me,Et);!qt.done;Ft++,qt=be.next())qt=Bn(Et,me,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Ft:qt.key),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Ft),Te}function qo(me,ue,be,Ve){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Mt=ue;Mt!==null;){if(Mt.key===Te){if(Te=be.type,Te===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&B1(Te)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=xa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,Ve,be.key),ue.return=me,me=ue):(Ve=sf(be.type,be.key,be.props,null,me.mode,Ve),Ve.ref=xa(me,ue,be),Ve.return=me,me=Ve)}return W(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,Ve),ue.return=me,me=ue}return W(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),Ve)}if(ie(be))return En(me,ue,be,Ve);if(R(be))return er(me,ue,be,Ve);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,Ve),ue.return=me,me=ue),W(me)):y(me,ue)}return qo}var Xu=w2(!0),C2=w2(!1),Vd={},po=No(Vd),wa=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){Sn(oe,f),Sn(wa,d),Sn(po,Vd),d=K(f),kn(po),Sn(po,d)}function je(){kn(po),kn(wa),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(Sn(wa,d),Sn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var It=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||zu(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function F1(){for(var d=0;dy?y:4,d(!0);var k=Zu.transition;Zu.transition={};try{d(!1),f()}finally{Ht=y,Zu.transition=k}}function ic(){return Si().memoizedState}function Y1(d,f,y){var k=Ar(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},ac(d))sc(f,y);else if(y=Ku(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function oc(d,f,y){var k=Ar(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(ac(d))sc(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var pe=f.interleaved;pe===null?(A.next=A,Hd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=Ku(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function ac(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function sc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Vl(d,y)}}var Ja={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Yl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Yl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Yl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=Y1.bind(null,bn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=bn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(jl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,nc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Qu++,0rp&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304)}else{if(!k)if(d=cn(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),cc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,Sn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return Sc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),nt&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Ka(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(_r),F1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));ju()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var Gs=!1,Er=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function dc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function Kl(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Fo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:nt&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&st(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function fc(d){return d.tag===5||d.tag===3||d.tag===4}function ts(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||fc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Pr(d,f,y),y=y.sibling}function Pr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Er||dc(y,f);case 6:if(nt){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?it(yr,y.stateNode):ht(yr,y.stateNode))}else jo(d,f,y);break;case 18:nt&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:nt?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=va(k),Du(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Er&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!Er&&(dc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(Er=(k=Er)||y.memoizedState!==null,jo(d,f,y),Er=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(k){var A=U2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case hc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function pc(d,f){var y=[];d=[d,0];for(var k=0;kA&&(A=W),k&=~O}if(k=A,k=Wn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*_b(k/1960))-k,10d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;peWn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;Ca(d,f),d=f.pendingProps;var A=zs(f,_r.current);qu(f,y),A=H1(null,f,k,d,A,y);var O=Ju();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Xa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Wo(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Fo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=N2(null,f,k,d,y);break e;case 11:f=M2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Fo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),N2(d,f,k,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Nh(f,k,null,y);var W=f.memoizedState;if(k=W.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=lc(Error(a(423)),f),f=z2(d,f,k,y,A);break e}else if(k!==A){A=lc(Error(a(424)),f),f=z2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=C2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(ju(),k===A){f=es(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,De(k,A)?W=null:O!==null&&De(k,O)&&(f.flags|=32),R2(d,f),bi(d,f,W,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return B2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Xu(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),M2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,k,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=es(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Qa(-1,y&-y),pe.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var rt=Re.pending;rt===null?pe.next=pe:(pe.next=rt.next,rt.next=pe),Re.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),$d(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,qu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Fo(k,f.pendingProps),A=Fo(k.type,A),Us(d,f,k,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),Ca(d,f),f.tag=1,Gr(k)?(d=!0,Xa(f)):d=!1,qu(f,y),b2(f,k,A),z1(f,k,A,y),Wo(null,f,k,!0,d,y);case 19:return $2(d,f,y);case 22:return I2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Vu(d,f)}function _a(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,k){return new _a(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,k,A,O){var W=2;if(k=d,typeof d=="function")mg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case _:W=14;break e;case T:W=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=tt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,k,A,O,W,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if(H(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Hl(d,y,f)}return f}function yg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&O>=Lt&&A<=rt&&W<=Ye){d.splice(f,1);break}else if(k!==Re||y.width!==pe.width||YeW){if(!(O!==Lt||y.height!==pe.height||rtA)){Re>k&&(pe.width+=Re-k,pe.x=k),rtO&&(pe.height+=Lt-O,pe.y=O),Yey&&(y=W)),W ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return Q(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||Sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!Ct)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),W=Ar(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Qa(O,W),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Ws(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=m7e})(jW);const v7e=R9(jW.exports);var dk={exports:{}},bh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(dk);const YM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let qM=!1,KM=!1;const fk=".react-konva-event",y7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,S7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,b7e={};function ub(e,t,n=b7e){if(!qM&&"zIndex"in t&&(console.warn(S7e),qM=!0),!KM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(y7e),KM=!0)}for(var o in n)if(!YM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!YM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+fk,v[l])}function kd(e){if(!lt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const YW={},x7e={};rh.Node.prototype._applyProps=ub;function w7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function C7e(e,t,n){let r=rh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=rh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ub(l,o),l}function _7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function k7e(e,t,n){return!1}function E7e(e){return e}function P7e(){return null}function T7e(){return null}function A7e(e,t,n,r){return x7e}function L7e(){}function M7e(e){}function O7e(e,t){return!1}function I7e(){return YW}function R7e(){return YW}const N7e=setTimeout,D7e=clearTimeout,z7e=-1;function B7e(e,t){return!1}const F7e=!1,$7e=!0,H7e=!0;function W7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function V7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function qW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function U7e(e,t,n){qW(e,t,n)}function G7e(e,t){t.destroy(),t.off(fk),kd(e)}function j7e(e,t){t.destroy(),t.off(fk),kd(e)}function Y7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function q7e(e,t,n){}function K7e(e,t,n,r,i){ub(e,i,r)}function X7e(e){e.hide(),kd(e)}function Z7e(e){}function Q7e(e,t){(t.visible==null||t.visible)&&e.show()}function J7e(e,t){}function e_e(e){}function t_e(){}const n_e=()=>dk.exports.DefaultEventPriority,r_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:w7e,createInstance:C7e,createTextInstance:_7e,finalizeInitialChildren:k7e,getPublicInstance:E7e,prepareForCommit:P7e,preparePortalMount:T7e,prepareUpdate:A7e,resetAfterCommit:L7e,resetTextContent:M7e,shouldDeprioritizeSubtree:O7e,getRootHostContext:I7e,getChildHostContext:R7e,scheduleTimeout:N7e,cancelTimeout:D7e,noTimeout:z7e,shouldSetTextContent:B7e,isPrimaryRenderer:F7e,warnsIfNotActing:$7e,supportsMutation:H7e,appendChild:W7e,appendChildToContainer:V7e,insertBefore:qW,insertInContainerBefore:U7e,removeChild:G7e,removeChildFromContainer:j7e,commitTextUpdate:Y7e,commitMount:q7e,commitUpdate:K7e,hideInstance:X7e,hideTextInstance:Z7e,unhideInstance:Q7e,unhideTextInstance:J7e,clearContainer:e_e,detachDeletedInstance:t_e,getCurrentEventPriority:n_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var i_e=Object.defineProperty,o_e=Object.defineProperties,a_e=Object.getOwnPropertyDescriptors,XM=Object.getOwnPropertySymbols,s_e=Object.prototype.hasOwnProperty,l_e=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?i_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QM=(e,t)=>{for(var n in t||(t={}))s_e.call(t,n)&&ZM(e,n,t[n]);if(XM)for(var n of XM(t))l_e.call(t,n)&&ZM(e,n,t[n]);return e},u_e=(e,t)=>o_e(e,a_e(t));function hk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=hk(r,t,n);if(i)return i;r=t?null:r.sibling}}function KW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const pk=KW(C.exports.createContext(null));class XW extends C.exports.Component{render(){return x(pk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:c_e,ReactCurrentDispatcher:d_e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f_e(){const e=C.exports.useContext(pk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=c_e.current)!=null?r:hk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],JM=new WeakMap;function h_e(){var e;const t=f_e();qg.splice(0,qg.length),hk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==pk&&qg.push(KW(i))});for(const n of qg){const r=(e=d_e.current)==null?void 0:e.readContext(n);JM.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,u_e(QM({},i),{value:JM.get(r)}))),n=>x(XW,{...QM({},n)})),[])}function p_e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const g_e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=p_e(e),o=h_e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,dk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),ub(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",ih="Group",P0="Rect",Kg="Circle",g5="Line",ZW="Image",m_e="Transformer",pm=v7e(r_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const v_e=le.forwardRef((e,t)=>x(XW,{children:x(g_e,{...e,forwardedRef:t})})),y_e=ft([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),S_e=e=>{const{...t}=e,{objects:n}=Ee(y_e);return x(ih,{listening:!1,...t,children:n.filter(W8).map((r,i)=>x(g5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},cb=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},b_e=ft(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:cb(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),x_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(b_e);return l?re(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},w_e=ft(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),C_e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Ee(w_e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(gw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(gw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},H=()=>{n(UL(!0))},$=()=>{n(vw(!1)),n(UL(!1)),n(Hy(!1))},j=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:H,onMouseOut:de,onMouseOver:j,onMouseUp:$,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(m_e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let QW=null,JW=null;const __e=e=>{QW=e},m5=()=>QW,k_e=e=>{JW=e},E_e=()=>JW,P_e=ft([Rn,Cr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),T_e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(P_e),i=C.exports.useRef(null),o=E_e();vt("esc",()=>{e(nSe())},{enabled:()=>!0,preventDefault:!0}),vt("shift+h",()=>{e(hSe(!n))},{preventDefault:!0},[t,n]),vt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},A_e=ft(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:cb(t)}}),eO=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),L_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(A_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=eO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=eO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},M_e=ft([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),O_e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(M_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Je.clamp(r*G5e**s,j5e,Y5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(bSe(l)),t(hH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},I_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),R_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(I_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a5(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},N_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),D_e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(N_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a5(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(aH([a.x,a.y]))}else t.current=!1;n(XS(!1))},[t,n,i,o,e,r])},z_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),B_e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(z_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(cH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(aH([s.x,s.y]))))},[t,r,i,a,n,e,o])},F_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),$_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(F_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},H_e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(cH(null)),e(XS(!1))},[e])},W_e=ft([Rn,Lu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V_e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(W_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(hH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!1))},[e,n,t])}};var mf=C.exports,U_e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const eV=e=>{const{url:t,x:n,y:r}=e,[i]=U_e(t);return x(ZW,{x:n,y:r,image:i,listening:!1})},G_e=ft([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),j_e=()=>{const{objects:e}=Ee(G_e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o5(t))return x(eV,{x:t.x,y:t.y,url:t.image.url},n);if(E5e(t))return x(g5,{points:t.points,stroke:t.color?cb(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},Y_e=ft([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),q_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},K_e=()=>{const{colorMode:e}=Hv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(Y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=q_e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=Je.range(0,T).map(N=>x(g5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=Je.range(0,M).map(N=>x(g5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},X_e=ft([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Z_e=e=>{const{...t}=e,n=Ee(X_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(ZW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Q_e=ft([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J_e(){const{cursorCoordinatesString:e}=Ee(Q_e);return x("div",{children:`Cursor Position: ${e}`})}const l3=e=>Math.round(e*100)/100,e8e=ft([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:p}=e;return{activeLayerColor:p==="mask"?"var(--status-working-color)":"inherit",activeLayerString:p.charAt(0).toUpperCase()+p.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),t8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Ee(e8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&re($n,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(J_e,{})]})]})},n8e=ft([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),r8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee(n8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(ih,{...t,children:[r&&x(eV,{url:u,x:o,y:a}),i&&re(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},i8e=ft([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),o8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(i8e),o=C.exports.useCallback(()=>{e(GL(!1))},[e]),a=C.exports.useCallback(()=>{e(GL(!0))},[e]);vt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),vt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),vt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(eSe()),l=()=>e(J5e()),u=()=>e(Z5e());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:re(ra,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F8,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(vSe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(j$,{}),onClick:()=>e(I5e(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(Q5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},a8e=ft([Rn,Lu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),s8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(a8e);T_e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{k_e($),p.current=$},[]),S=C.exports.useCallback($=>{__e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=O_e(p),_=R_e(p),T=D_e(p,P),M=B_e(p,P,w),I=$_e(p),R=H_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:H}=V_e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(v_e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:_,onTouchMove:M,onTouchEnd:T,onMouseDown:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:H,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(K_e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(j_e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(S_e,{visible:!0,listening:!1}),x(L_e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(x_e,{visible:l!=="move",listening:!1}),x(r8e,{visible:u}),h&&x(Z_e,{}),x(C_e,{visible:n&&!u})]})]}),x(t8e,{}),x(o8e,{})]})})},l8e=ft([Rn,Cr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function u8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(l8e),r=()=>{e(xSe())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(C5e,{}),onClick:r,isDisabled:!t})}const c8e=ft([Rn,Cr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function d8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(c8e),r=()=>{e(tSe())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(S5e,{}),onClick:r,isDisabled:!t})}const tV=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return re($n,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(lF,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),re(kS,{children:[x($a,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x($a,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),f8e=()=>{const e=Xe();return re(tV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(R5e()),e(sH()),e(uH())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},h8e=()=>{const e=Xe();return re(tV,{title:"Clear Canvas History",acceptCallback:()=>e(uH()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},p8e=ft([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),g8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(p8e);return x(ed,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(H8,{})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Show Intermediates",isChecked:a,onChange:l=>e(mSe(l.target.checked))}),x(gs,{label:"Show Grid",isChecked:o,onChange:l=>e(gSe(l.target.checked))}),x(gs,{label:"Snap to Grid",isChecked:s,onChange:l=>e(ySe(l.target.checked))}),x(gs,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(dSe(l.target.checked))}),x(gs,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(uSe(l.target.checked))}),x(gs,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(cSe(l.target.checked))}),x(gs,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(pSe(l.target.checked))}),x(h8e,{}),x(f8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function m9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(tO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=v9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(nO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(tO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},mk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},rV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},y9=function(e){var t=rV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=rV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},m8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},v8e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},y8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(gk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(mk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),S8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(gk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(mk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),iV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function b8e(e,t,n){var r=m9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;iV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var x8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,w8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},rO=new Map,C8e=function(e){x8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!rO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,rO.set(t,n);var r=w8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},_8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(gk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(mk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},k8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=nV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);C8e(s);var l=b8e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(S8e,{hsva:u,onChange:h}),x(y8e,{hue:u.h,onChange:h}),le.createElement(_8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},E8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:v8e,fromHsva:m8e,equal:iV},P8e=function(e){return le.createElement(k8e,fb({},e,{colorModel:E8e}))};const oV=e=>{const{styleClass:t,...n}=e;return x(P8e,{className:`invokeai__color-picker ${t}`,...n})},T8e=ft([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:cb(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),A8e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(T8e);vt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),vt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(fH(t==="mask"?"base":"mask"))},a=()=>e(X5e()),s=()=>e(dH(!r));return x(ed,{trigger:"hover",triggerComponent:x(ra,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(gs,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(fSe(l.target.checked))}),x(oV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(sSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let u3;const L8e=new Uint8Array(16);function M8e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(L8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function O8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const I8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iO={randomUUID:I8e};function Jp(e,t,n){if(iO.randomUUID&&!t&&!e)return iO.randomUUID();e=e||{};const r=e.random||(e.rng||M8e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return O8e(r)}const R8e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},N8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},D8e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},z8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=z8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(F4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m5();if(!S){t(gu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=R8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(gu(!1)),t(Kp(!0));return}const E=new FormData;E.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(N8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(D8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(lSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(gu(!1)),t(G3("Connected")),t(Kp(!0))},B8e=ft([Rn,Lu,u2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),F8e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ee(B8e);vt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),vt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),vt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(Y$,{})}),children:re(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(mw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(oV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(oSe(s))})]})})]})};let oO;const aV=()=>({setOpenUploader:e=>{e&&(oO=e)},openUploader:oO}),$8e=ft([u2,Rn,Lu],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),H8e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ee($8e),s=m5(),{openUploader:l}=aV();vt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),vt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),vt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=m5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(rSe({contentRect:_}))},p=()=>{e(sH()),e(lH())},m=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(Au,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:k5e,onChange:E=>{const _=E.target.value;e(fH(_)),_==="mask"&&!r&&e(dH(!0))}}),x(A8e,{}),x(F8e,{}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(j$,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(KS,{}),onClick:S,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(G$,{}),onClick:w,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(u8e,{}),x(d8e,{})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x($8,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(g8e,{})})]})},W8e=ft([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V8e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(W8e);return C.exports.useLayoutEffect(()=>{const n=Je.debounce(()=>{e(Wi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(H8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(oCe,{}):x(s8e,{})})]})})})};function U8e(){const e=Xe();return C.exports.useEffect(()=>{e(Wi(!0))},[e]),x(rk,{optionsPanel:x(rCe,{}),styleClass:"inpainting-workarea-overrides",children:x(V8e,{})})}const G8e=ct({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Ef={txt2img:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Rwe,{}),tooltip:"Text To Image"},img2img:{title:x(F3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(G8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(U8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B3e,{}),tooltip:"Post Processing"}},pb=Je.map(Ef,(e,t)=>t);[...pb];function j8e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();vt("1",()=>{a(na(0))}),vt("2",()=>{a(na(1))}),vt("3",()=>{a(na(2))}),vt("4",()=>{a(na(3))}),vt("5",()=>{a(na(4))}),vt("z",()=>{a(cd(!t))},[t]),vt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(Wi(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x(zF,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(NF,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return re(RF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(Wi(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(DF,{className:"app-tabs-panels",children:t?x(Y6e,{}):l()})]})}const sV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Y8e=sV,lV=MS({name:"options",initialState:Y8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=i5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...sV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=pb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:uV,resetOptionsState:uTe,resetSeed:cTe,setActiveTab:na,setAllImageToImageParameters:q8e,setAllParameters:K8e,setAllTextToImageParameters:X8e,setCfgScale:cV,setCodeformerFidelity:dV,setCurrentTheme:Z8e,setFacetoolStrength:K3,setFacetoolType:X3,setHeight:fV,setHiresFix:hV,setImg2imgStrength:S9,setInfillMethod:pV,setInitialImage:d2,setIsLightBoxOpen:cd,setIterations:Q8e,setMaskPath:gV,setOptionsPanelScrollPosition:J8e,setParameter:dTe,setPerlin:eke,setPrompt:gb,setSampler:mV,setSeamBlur:aO,setSeamless:vV,setSeamSize:sO,setSeamSteps:lO,setSeamStrength:uO,setSeed:f2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:tke,setShouldGenerateVariations:nke,setShouldHoldOptionsPanelOpen:rke,setShouldLoopback:ike,setShouldPinOptionsPanel:oke,setShouldRandomizeSeed:ake,setShouldRunESRGAN:ske,setShouldRunFacetool:lke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:fTe,setShowDualDisplay:uke,setSteps:xV,setThreshold:cke,setTileSize:cO,setUpscalingLevel:b9,setUpscalingStrength:x9,setVariationAmount:dke,setWidth:wV}=lV.actions,fke=lV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const Z3=Object.create(null);Object.keys(Ol).forEach(e=>{Z3[Ol[e]]=e});const hke={type:"error",data:"parser error"},pke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",gke=typeof ArrayBuffer=="function",mke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>pke&&t instanceof Blob?n?r(t):dO(t,r):gke&&(t instanceof ArrayBuffer||mke(t))?n?r(t):dO(new Blob([t]),r):r(Ol[e]+(t||"")),dO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},fO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},yke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ske(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:hke},Ske=(e,t)=>{if(yke){const n=vke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),bke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},xke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Cke=setTimeout,_ke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=Cke.bind(Vc),e.clearTimeoutFn=_ke.bind(Vc)):(e.setTimeoutFn=setTimeout.bind(Vc),e.clearTimeoutFn=clearTimeout.bind(Vc))}const kke=1.33;function Eke(e){return typeof e=="string"?Pke(e):Math.ceil((e.byteLength||e.size)*kke)}function Pke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Tke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Tke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,Ake={};let hO=0,d3=0,pO;function gO(e){let t="";do t=LV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function MV(){const e=gO(+new Date);return e!==pO?(hO=0,pO=e):e+"."+gO(hO++)}for(;d3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};xke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,bke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=MV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Tl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Tl extends Vr{constructor(t,n){super(),mb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=TV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new RV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Tl.requestsCount++,Tl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Oke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mO);else if(typeof addEventListener=="function"){const e="onpagehide"in Vc?"pagehide":"unload";addEventListener(e,mO,!1)}}function mO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=Vc.WebSocket||Vc.MozWebSocket,vO=!0,Nke="arraybuffer",yO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dke extends AV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=yO?{}:TV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=vO&&!yO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Nke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{vO&&this.ws.send(o)}catch{}i&&NV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=MV()),this.supportsBinary||(t.b64=1);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!f3}}const zke={websocket:Dke,polling:Rke},Bke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Bke.exec(e||""),o={},a=14;for(;a--;)o[Fke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=$ke(o,o.path),o.queryKey=Hke(o,o.query),o}function $ke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Hke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Dc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=C9(n.host).host),mb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Lke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=PV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new zke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Dc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Dc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Dc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Dc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Dc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Gke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",jke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function vk(e){return Vke&&(e instanceof ArrayBuffer||Uke(e))||Gke&&e instanceof Blob||jke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Zke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=qke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Kke,get PacketType(){return nn},Encoder:Xke,Decoder:yk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Jke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Jke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}g1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,mb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new g1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Qke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Dc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Wke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Xg[i]||(Xg[i]=new E9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:zV,io:J3,connect:J3});var eEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,tEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,nEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(SO[t]||t||SO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return rEe(e)},P=function(){return iEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":oEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(eEe,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var SO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},bO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},rEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},iEe=function(t){var n=t.getDay();return n===0&&(n=7),n},oEe=function(t){return(String(t).match(tEe)||[""]).pop().replace(nEe,"").replace(/GMT\+0000/g,"UTC")};const aEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(NL(!0)),t(G3("Connected")),t(O5e());const r=n().gallery;r.categories.user.latest_mtime?t(FL("user")):t(jC("user")),r.categories.result.latest_mtime?t(FL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(NL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(K5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(d2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(MSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(gu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(DL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(LSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(vH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(uV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r)),r.infill_methods.includes("patchmatch")||t(pV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(G3("Model Changed")),t(gu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(gu(!1)),t(Kp(!0)),t(DL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},sEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},lEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},uEe=e=>{const t=m5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:P,perlin:E,prompt:_,sampler:T,seamBlur:M,seamless:I,seamSize:R,seamSteps:N,seamStrength:z,seed:H,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:de,shouldGenerateVariations:V,shouldRandomizeSeed:J,shouldRunESRGAN:ie,shouldRunFacetool:Q,steps:K,threshold:G,tileSize:Z,upscalingLevel:te,upscalingStrength:X,variationAmount:he,width:ye}=r,{shouldDisplayInProgressType:Se,saveIntermediatesInterval:De,enableImageDebugging:$e}=o,He={prompt:_,iterations:J||V?P:1,steps:K,cfg_scale:s,threshold:G,perlin:E,height:p,width:ye,sampler_name:T,seed:H,progress_images:Se==="full-res",progress_latents:Se==="latents",save_intermediates:De,generation_mode:n,init_mask:""};if(He.seed=J?N$(P8,T8):H,["txt2img","img2img"].includes(n)&&(He.seamless=I,He.hires_fix=m),n==="img2img"&&w&&(He.init_img=typeof w=="string"?w:w.url,He.strength=v,He.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ze},boundingBoxCoordinates:nt,boundingBoxDimensions:Tt,inpaintReplace:xt,shouldUseInpaintReplace:Le,stageScale:at,isMaskEnabled:At,shouldPreserveMaskedArea:st}=i,gt={...nt,...Tt},an=sEe(At?Ze.filter(W8):[],gt);He.init_mask=an,He.fit=!1,He.init_img=a,He.strength=v,He.invert_mask=st,Le&&(He.inpaint_replace=xt),He.bounding_box=gt;const Ct=t.scale();t.scale({x:1/at,y:1/at});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:gt.x+Ut.x,y:gt.y+Ut.y,width:gt.width,height:gt.height});$e&&lEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(Ct),He.init_img=sn,He.progress_images=!1,He.seam_size=R,He.seam_blur=M,He.seam_strength=z,He.seam_steps=N,He.tile_size=Z,He.force_outpaint=de,He.infill_method=S}V?(He.variation_amount=he,$&&(He.with_variations=nye($))):He.variation_amount=0;let qe=!1,tt=!1;return ie&&(qe={level:te,strength:X}),Q&&(tt={type:h,strength:u},h==="codeformer"&&(tt.codeformer_fidelity=l)),$e&&(He.enable_image_debugging=$e),{generationParameters:He,esrganParameters:qe,facetoolParameters:tt}},cEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(gu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=uEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(gu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(gu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(vH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},dEe=()=>{const{origin:e}=new URL(window.location.href),t=J3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=aEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:H,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=cEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{H(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},fEe=["cursorPosition"].map(e=>`canvas.${e}`),hEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),pEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),BV=YF({options:fke,gallery:zSe,system:$4e,canvas:wSe}),gEe=h$.getPersistConfig({key:"root",storage:f$,rootReducer:BV,blacklist:[...fEe,...hEe,...pEe],debounce:300}),mEe=F2e(gEe,BV),FV=Ive({reducer:mEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(dEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=_2e,Ee=h2e;function e4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e4=function(n){return typeof n}:e4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e4(e)}function vEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xO(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),wEe=ft(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(wEe),i=t?Math.round(t*100/n):0;return x(mF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function _Ee(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function kEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(_Ee,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re($n,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Lv,{className:" modal hotkeys-modal",children:[x(K_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(i)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(o)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(a)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(s)})]})]})})]})]})]})}const EEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(X$(i))};return re("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},PEe=ft(e=>e.system,e=>{const t=Je.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),TEe=()=>{const{models:e}=Ee(PEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(zf,{children:[x(Nf,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Bf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(EEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},AEe=ft([u2,z$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Je.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),LEe=({children:e})=>{const t=Xe(),n=Ee(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(AEe),S=()=>{QV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(N4e(P))};return re($n,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Lv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K_,{className:"modal-close-btn"}),re(Av,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(TEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Au,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:P=>t(T4e(P.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(za,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(F$(P.target.checked))}),x(za,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:P=>t(O4e(P.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(za,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(D4e(P.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},MEe=ft(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),OEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(MEe),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s($$())},className:`status ${l}`,children:u})})},IEe=["dark","light","green"];function REe(){const{setColorMode:e}=Hv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(Z8e(i))};return x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(jz,{align:"stretch",children:IEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(F8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const NEe=ft([u2],e=>{const{isProcessing:t,model_list:n}=e,r=Je.map(n,(o,a)=>a),i=Je.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),DEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(NEe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Au,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(X$(o.target.value))}})})},zEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(OEe,{}),x(DEe,{}),x(kEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(REe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(LEe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(H8,{})})})]})]}),BEe=ft(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),FEe=ft(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),$Ee=()=>{const e=Xe(),t=Ee(BEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(FEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e($$()),e(hw(!n))};return vt("`",()=>{e(hw(!n))},[n]),vt("esc",()=>{e(hw(!1))}),re($n,{children:[n&&x(CH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(U$,{}),onClick:l})})]})};function HEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var WEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function h2(e,t){var n=VEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function VEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=WEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var UEe=[".DS_Store","Thumbs.db"];function GEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return v5(e)&&jEe(e.dataTransfer)?[2,XEe(e.dataTransfer,e.type)]:YEe(e)?[2,qEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,KEe(e)]:[2,[]]})})}function jEe(e){return v5(e)}function YEe(e){return v5(e)&&v5(e.target)}function v5(e){return typeof e=="object"&&e!==null}function qEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function KEe(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return h2(r)})]}})})}function XEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ZEe))]):[3,2];case 1:return r=i.sent(),[2,wO(HV(r))];case 2:return[2,wO(A9(e.files).map(function(o){return h2(o)}))]}})})}function wO(e){return e.filter(function(t){return UEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,PO(n)];if(e.sizen)return[!1,PO(n)]}return[!0,null]}function Pf(e){return e!=null}function hPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function AO(e){e.preventDefault()}function pPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gPe(e){return e.indexOf("Edge/")!==-1}function mPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pPe(e)||gPe(e)}function sl(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function IPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Sk=C.exports.forwardRef(function(e,t){var n=e.children,r=S5(e,wPe),i=ZV(r),o=i.open,a=S5(i,CPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});Sk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:GEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Sk.defaultProps=XV;Sk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var I9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,H=t.validator,$=C.exports.useMemo(function(){return SPe(n)},[n]),j=C.exports.useMemo(function(){return yPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:MO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:MO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(RPe,I9),K=Dw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&vPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(et){J.current&&J.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",AO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",AO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var $e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),He=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[].concat(EPe(Se.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){if(!(y5(Oe)&&!N)){var Xt=et.length,Yt=Xt>0&&hPe({files:et,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:H}),ke=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(et){return $e(et)})},[i,u,$e,N,$,a,o,s,l,H]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=h3(Oe);if(et&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return et&&p&&p(Oe),!1},[p,N]),tt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=et.indexOf(Oe.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,et){var Xt=[],Yt=[];Oe.forEach(function(ke){var Ot=GV(ke,$),Ne=Dw(Ot,2),ut=Ne[0],ln=Ne[1],Nn=jV(ke,a,o),We=Dw(Nn,2),ht=We[0],it=We[1],Nt=H?H(ke):null;if(ut&&ht&&!Nt)Xt.push(ke);else{var Zt=[ln,it];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){Yt.push({file:ke,errors:[fPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,et),Yt.length>0&&S&&S(Yt,et),Xt.length>0&&v&&v(Xt,et)},[Z,s,$,a,o,l,m,v,S,H]),nt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){y5(Oe)&&!N||Ze(et,Oe)}).catch(function(et){return $e(et)}),Z({type:"reset"})},[i,Ze,$e,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(et){return i(et)}).then(function(et){Ze(et,null),Z({type:"closeDialog"})}).catch(function(et){bPe(et)?(V(et),Z({type:"closeDialog"})):xPe(et)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):$e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):$e(et)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,$e,j,s]),xt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),at=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(mPe()?setTimeout(Tt,0):Tt())},[M,Tt]),st=function(et){return r?null:et},gt=function(et){return I?null:st(et)},an=function(et){return R?null:st(et)},Ct=function(et){N&&et.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.role,ke=Oe.onKeyDown,Ot=Oe.onFocus,Ne=Oe.onBlur,ut=Oe.onClick,ln=Oe.onDragEnter,Nn=Oe.onDragOver,We=Oe.onDragLeave,ht=Oe.onDrop,it=S5(Oe,_Pe);return lr(lr(O9({onKeyDown:gt(sl(ke,xt)),onFocus:gt(sl(Ot,Le)),onBlur:gt(sl(Ne,at)),onClick:st(sl(ut,At)),onDragEnter:an(sl(ln,He)),onDragOver:an(sl(Nn,qe)),onDragLeave:an(sl(We,tt)),onDrop:an(sl(ht,nt)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),it)}},[J,xt,Le,at,At,He,qe,tt,nt,I,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.onChange,ke=Oe.onClick,Ot=S5(Oe,kPe),Ne=O9({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:st(sl(Yt,nt)),onClick:st(sl(ke,sn)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Ot)}},[ie,n,s,nt,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:yn,rootRef:J,inputRef:ie,open:st(Tt)})}function RPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},I9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},I9);default:return e}}function MO(){}const NPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Gf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},OO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Cr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(j8(u)):o==="img2img"&&t(d2(u))},DPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Cr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=aV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+` +`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(OO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(OO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(q8.Provider,{value:P,children:re("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(NPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},zPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(Wi(!0))},children:x(H$,{})})},BPe=ft(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FPe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(BPe);return re("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(Wi(!0)),400)},children:x(Y$,{})}),t&&re($n,{children:[x(Z$,{iconButton:!0}),x(Q$,{})]})]})},$Pe=()=>{const e=Xe(),t=Ee(Z6e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(B4e())},[e,n,t])};HEe();const HPe=ft([e=>e.gallery,e=>e.options,e=>e.system,Cr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Je.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),WPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(HPe);return $Pe(),x("div",{className:"App",children:re(DPe,{children:[x(CEe,{}),re("div",{className:"app-content",children:[x(zEe,{}),x(j8e,{})]}),x("div",{className:"app-console",children:x($Ee,{})}),e&&x(zPe,{}),t&&x(FPe,{})]})})};const QV=G2e(FV),VPe=oN({key:"invokeai-style-cache",prepend:!0});Bw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:FV,children:x($V,{loading:x(xEe,{}),persistor:QV,children:x(aJ,{value:VPe,children:x(Zme,{children:x(WPe,{})})})})})})); diff --git a/frontend/dist/assets/index.cc411ac7.js b/frontend/dist/assets/index.cc411ac7.js deleted file mode 100644 index c78ecf6e92..0000000000 --- a/frontend/dist/assets/index.cc411ac7.js +++ /dev/null @@ -1,623 +0,0 @@ -function Eq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),pE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var DO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zO=Object.assign,FO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=FO,this.updater=n||DO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function BO(){}BO.prototype=Z0.prototype;function z9(e,t,n){this.props=e,this.context=t,this.refs=FO,this.updater=n||DO}var F9=z9.prototype=new BO;F9.constructor=z9;zO(F9,Z0.prototype);F9.isPureReactComponent=!0;var gE=Array.isArray,$O=Object.prototype.hasOwnProperty,B9={current:null},WO={key:!0,ref:!0,__self:!0,__source:!0};function HO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)$O.call(t,r)&&!WO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,he=G[X];if(0>>1;Xi(De,te))kei(ct,De)?(G[X]=ct,G[ke]=te,X=ke):(G[X]=De,G[Se]=te,X=Se);else if(kei(ct,te))G[X]=ct,G[ke]=te,X=ke;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function j(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Z=!0;try{Z=N(!0,G)}finally{Z?V():(R=!1,N=null)}}else R=!1}var V;if(typeof _=="function")V=function(){_(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){P(de,0)};function Q(G){N=G,R||(R=!0,V())}function K(G,Z){z=P(function(){G(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,Q(I))},e.unstable_forceFrameRate=function(G){0>G||125X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})(VO);(function(e){e.exports=VO})(e0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var UO=C.exports,da=e0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ww=Object.prototype.hasOwnProperty,Hq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Vq(e){return Ww.call(yE,e)?!0:Ww.call(vE,e)?!1:Hq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Uq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var W9=/[\-:]([a-z])/g;function H9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(W9,H9);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(W9,H9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(W9,H9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function V9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Xb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Zb(e.type,!1),e;case 11:return e=Zb(e.type.render,!1),e;case 1:return e=Zb(e.type,!0),e;default:return""}}function Gw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Rp:return"Portal";case Hw:return"Profiler";case U9:return"StrictMode";case Vw:return"Suspense";case Uw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case YO:return(e.displayName||"Context")+".Consumer";case jO:return(e._context.displayName||"Context")+".Provider";case G9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j9:return t=e.displayName||null,t!==null?t:Gw(e.type)||"Memo";case Tc:t=e._payload,e=e._init;try{return Gw(e(t))}catch{}}return null}function Yq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gw(t);case 8:return t===U9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function td(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=KO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ny(e){e._valueTracker||(e._valueTracker=qq(e))}function XO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=KO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function n4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function jw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=td(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ZO(e,t){t=t.checked,t!=null&&V9(e,"checked",t,!1)}function Yw(e,t){ZO(e,t);var n=td(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?qw(e,t.type,n):t.hasOwnProperty("defaultValue")&&qw(e,t.type,td(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function qw(e,t,n){(t!=="number"||n4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ry.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function tI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function nI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function Qw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jw=null;function Y9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var e6=null,n0=null,r0=null;function _E(e){if(e=Bv(e)){if(typeof e6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=C5(t),e6(e.stateNode,e.type,t))}}function rI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function iI(){if(n0){var e=n0,t=r0;if(r0=n0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(sK(e)/lK|0)|0}var iy=64,oy=4194304;function Jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function a4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ym),IE=String.fromCharCode(32),RE=!1;function _I(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function HK(e,t){switch(e){case"compositionend":return kI(t);case"keypress":return t.which!==32?null:(RE=!0,IE);case"textInput":return e=t.data,e===IE&&RE?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!t_&&_I(e,t)?(e=wI(),m3=Q9=Dc=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=FE(n)}}function AI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?AI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function LI(){for(var e=window,t=n4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=n4(e.document)}return t}function n_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QK(e){var t=LI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&AI(n.ownerDocument.documentElement,n)){if(r!==null&&n_(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BE(n,o);var a=BE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,a6=null,bm=null,s6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;s6||zp==null||zp!==n4(r)||(r=zp,"selectionStart"in r&&n_(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bm&&Jm(bm,r)||(bm=r,r=u4(a6,"onSelect"),0$p||(e.current=h6[$p],h6[$p]=null,$p--)}function Yn(e,t){$p++,h6[$p]=e.current,e.current=t}var nd={},Vi=dd(nd),To=dd(!1),qf=nd;function L0(e,t){var n=e.type.contextTypes;if(!n)return nd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function d4(){Zn(To),Zn(Vi)}function YE(e,t,n){if(Vi.current!==nd)throw Error(Re(168));Yn(Vi,t),Yn(To,n)}function BI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,Yq(e)||"Unknown",i));return fr({},n,r)}function f4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=BI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var lu=null,_5=!1,dx=!1;function $I(e){lu===null?lu=[e]:lu.push(e)}function cX(e){_5=!0,$I(e)}function fd(){if(!dx&&lu!==null){dx=!0;var e=0,t=Pn;try{var n=lu;for(Pn=1;e>=a,i-=a,cu=1<<32-xs(t)+i|n<z?($=N,N=null):$=N.sibling;var W=m(E,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(E,N),_=o(W,_,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var j=m(E,N,W.value,M);if(j===null){N===null&&(N=$);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=$}if(W.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(E,W.value,M),W!==null&&(_=o(W,_,z),R===null?I=W:R.sibling=W,R=W);return nr&&vf(E,z),I}for(N=r(E,N);!W.done;z++,W=T.next())W=v(N,E,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),_=o(W,_,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ty:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Tc&&tP(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=_3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=Sx(T,E.mode,M),_.return=E,E=_}return a(E);case Tc:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);fy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=yx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=qI(!0),KI=qI(!1),$v={},xl=dd($v),rv=dd($v),iv=dd($v);function Lf(e){if(e===$v)throw Error(Re(174));return e}function d_(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function XI(e){Lf(iv.current);var t=Lf(xl.current),n=Xw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function f_(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=dd(0);function y4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fx=[];function h_(){for(var e=0;en?n:4,e(!0);var r=hx.transition;hx.transition={};try{e(!1),t()}finally{Pn=n,hx.transition=r}}function fR(){return $a().memoizedState}function pX(e,t,n){var r=Kc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hR(e))pR(t,n);else if(n=UI(e,t,n,r),n!==null){var i=ro();ws(n,e,r,i),gR(n,t,r)}}function gX(e,t,n){var r=Kc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hR(e))pR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,u_(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=UI(e,t,i,r),n!==null&&(i=ro(),ws(n,e,r,i),gR(n,t,r))}}function hR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function pR(e,t){xm=S4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K9(e,n)}}var b4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,b3(4194308,4,sR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return b3(4194308,4,e,t)},useInsertionEffect:function(e,t){return b3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:y_,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),di===null)throw Error(Re(349));(Xf&30)!==0||JI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(tR.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,eR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=du,r=cu;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[pl]=t,e[nv]=r,_R(e,t,!1,!1),t.stateNode=e;e:{switch(a=Qw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=y4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Fi(t),null}else 2*Or()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return __(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function _X(e,t){switch(i_(t),t.tag){case 1:return Ao(t.type)&&d4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),h_(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return f_(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return l_(t.type._context),null;case 22:case 23:return __(),null;case 24:return null;default:return null}}var py=!1,Wi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function k6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function EX(e,t){if(l6=s4,e=LI(),n_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(u6={focusedElem:e,selectionRange:n},s4=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ps(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return S=fP,fP=!1,S}function wm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&k6(t,n,o)}i=i.next}while(i!==r)}}function P5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function E6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function PR(e){var t=e.alternate;t!==null&&(e.alternate=null,PR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[f6],delete t[lX],delete t[uX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function TR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||TR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function P6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=c4));else if(r!==4&&(e=e.child,e!==null))for(P6(e,t,n),e=e.sibling;e!==null;)P6(e,t,n),e=e.sibling}function T6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(T6(e,t,n),e=e.sibling;e!==null;)T6(e,t,n),e=e.sibling}var Pi=null,gs=!1;function xc(e,t,n){for(n=n.child;n!==null;)AR(e,t,n),n=n.sibling}function AR(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Wi||Up(n,t);case 6:var r=Pi,i=gs;Pi=null,xc(e,t,n),Pi=r,gs=i,Pi!==null&&(gs?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(gs?(e=Pi,n=n.stateNode,e.nodeType===8?cx(e.parentNode,n):e.nodeType===1&&cx(e,n),Zm(e)):cx(Pi,n.stateNode));break;case 4:r=Pi,i=gs,Pi=n.stateNode.containerInfo,gs=!0,xc(e,t,n),Pi=r,gs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&k6(n,t,a),i=i.next}while(i!==r)}xc(e,t,n);break;case 1:if(!Wi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}xc(e,t,n);break;case 21:xc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,xc(e,t,n),Wi=r):xc(e,t,n);break;default:xc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function us(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10e?16:e,zc===null)var r=!1;else{if(e=zc,zc=null,C4=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-w_?Bf(e,0):x_|=n),Lo(e,t)}function zR(e,t){t===0&&((e.mode&1)===0?t=1:(t=oy,oy<<=1,(oy&130023424)===0&&(oy=4194304)));var n=ro();e=vu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zR(e,n)}function NX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),zR(e,n)}var FR;FR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&WI(t,p4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;x3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=g_(null,t,r,e,i,n);var o=m_();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,f4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,c_(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,y6(t,r,e,n),t=x6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&r_(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(x3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=ps(r,e),i){case 0:t=b6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,ps(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),b6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),uP(e,t,r,i,n);case 3:e:{if(xR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,GI(e,t),v4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=R0(Error(Re(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Re(424)),t),t=cP(e,t,r,n,i);break e}else for(oa=jc(t.stateNode.containerInfo.firstChild),sa=t,nr=!0,vs=null,n=KI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=yu(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return XI(t),e===null&&g6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,c6(r,i)?a=null:o!==null&&c6(r,o)&&(t.flags|=32),bR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&g6(t),null;case 13:return wR(e,t,n);case 4:return d_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),sP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Yn(g4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=yu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=hu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),m6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),m6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=ps(r,t.pendingProps),i=ps(r.type,i),lP(e,t,r,i,n);case 15:return yR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),x3(e,t),t.tag=1,Ao(r)?(e=!0,f4(t)):e=!1,o0(t,n),YI(t,r,i),y6(t,r,i,n),x6(null,t,r,!0,e,n);case 19:return CR(e,t,n);case 22:return SR(e,t,n)}throw Error(Re(156,t.tag))};function BR(e,t){return dI(e,t)}function DX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new DX(e,t,n,r)}function E_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return E_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G9)return 11;if(e===j9)return 14}return 2}function Xc(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")E_(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case U9:a=8,i|=8;break;case Hw:return e=Na(12,n,t,i|2),e.elementType=Hw,e.lanes=o,e;case Vw:return e=Na(13,n,t,i),e.elementType=Vw,e.lanes=o,e;case Uw:return e=Na(19,n,t,i),e.elementType=Uw,e.lanes=o,e;case qO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jO:a=10;break e;case YO:a=9;break e;case G9:a=11;break e;case j9:a=14;break e;case Tc:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Na(22,e,r,t),e.elementType=qO,e.lanes=n,e.stateNode={isHidden:!1},e}function yx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function Sx(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jb(0),this.expirationTimes=Jb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function P_(e,t,n,r,i,o,a,s,l){return e=new FX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},c_(o),e}function BX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Il);const vy=D9(Il.exports);var wP=Il.exports;$w.createRoot=wP.createRoot,$w.hydrateRoot=wP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,R5={exports:{}},N5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function VR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)YX.call(t,r)&&!KX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}N5.Fragment=jX;N5.jsx=VR;N5.jsxs=VR;(function(e){e.exports=N5})(R5);const Rn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var M_=C.exports.createContext({});M_.displayName="ColorModeContext";function Wv(){const e=C.exports.useContext(M_);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var yy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?yy.dark:yy.light),document.body.classList.remove(r?yy.light:yy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var JX=QX(ZX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function UR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?CP:_,setColorMode:t?CP:E,forced:t!==void 0}),[P,_,E,t]);return x(M_.Provider,{value:T,children:n})}UR.displayName="ColorModeProvider";var I6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,ke=Se||De||Function("return this")(),ct=t&&!t.nodeType&&t,Ge=ct&&!0&&e&&!e.nodeType&&e,ot=Ge&&Ge.exports===ct,Ze=ot&&Se.process,et=function(){try{var U=Ge&&Ge.require&&Ge.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=et&&et.isTypedArray;function xt(U,re,ge){switch(ge.length){case 0:return U.call(re);case 1:return U.call(re,ge[0]);case 2:return U.call(re,ge[0],ge[1]);case 3:return U.call(re,ge[0],ge[1],ge[2])}return U.apply(re,ge)}function Le(U,re){for(var ge=-1,qe=Array(U);++ge-1}function S1(U,re){var ge=this.__data__,qe=Ka(ge,U);return qe<0?(++this.size,ge.push([U,re])):ge[qe][1]=re,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=Du,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var re=-1,ge=U==null?0:U.length;for(this.clear();++re1?ge[zt-1]:void 0,mt=zt>2?ge[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&Eh(ge[0],ge[1],mt)&&(dn=zt<3?void 0:dn,zt=1),re=Object(re);++qe-1&&U%1==0&&U0){if(++re>=i)return arguments[0]}else re=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return _n.call(U)}catch{}try{return U+""}catch{}}return""}function Sa(U,re){return U===re||U!==U&&re!==re}var Od=Bl(function(){return arguments}())?Bl:function(U){return Hn(U)&&vn.call(U,"callee")&&!We.call(U,"callee")},Hl=Array.isArray;function Wt(U){return U!=null&&Th(U.length)&&!Vu(U)}function Ph(U){return Hn(U)&&Wt(U)}var Hu=Zt||O1;function Vu(U){if(!Fo(U))return!1;var re=Ns(U);return re==v||re==S||re==u||re==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Fo(U){var re=typeof U;return U!=null&&(re=="object"||re=="function")}function Hn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Hn(U)||Ns(U)!=_)return!1;var re=an(U);if(re===null)return!0;var ge=vn.call(re,"constructor")&&re.constructor;return typeof ge=="function"&&ge instanceof ge&&_n.call(ge)==Xt}var Ah=Tt?st(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Wt(U)?A1(U,!0):Ds(U)}var sn=Xa(function(U,re,ge,qe){No(U,re,ge,qe)});function Ht(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=sn})(I6,I6.exports);const yl=I6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,R6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=kP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=R6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Sy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function cs(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var GR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...GR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...GR].join(" ")}var aZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},sZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function lZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},jR="& > :not(style) ~ :not(style)",cZ={[jR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[jR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},N6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},fZ=new Set(Object.values(N6)),YR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||YR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in N6?N6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=qR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var qR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||qR(e)||YR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:cs("borderWidths"),borderStyles:cs("borderStyles"),colors:cs("colors"),borders:cs("borders"),radii:cs("radii",rn.px),space:cs("space",Sy(rn.vh,rn.px)),spaceT:cs("space",Sy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:cs("sizes",Sy(rn.vh,rn.px)),sizesT:cs("sizes",Sy(rn.vh,rn.fraction)),shadows:cs("shadows"),logical:rZ,blur:cs("blur",rn.blur)},k3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(k3,{bgImage:k3.backgroundImage,bgImg:k3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},D6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(D6,{shadow:D6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},E4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(E4,{flexDir:E4.flexDirection});var KR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Aa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},bx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>bx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>bx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>bx(t,e,n)}},km={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},IZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function XR(e){return _s(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(XR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,z6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=XR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:z6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(EP(e,...t)),subtract:(...t)=>_f(PP(e,...t)),multiply:(...t)=>_f(z6(e,...t)),divide:(...t)=>_f(TP(e,...t)),negate:()=>_f(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:z6,divide:TP,negate:AP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function FZ(e,t=""){return[t,e].filter(Boolean).join("-")}function BZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${FZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:BZ(r,t)}}function WZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function HZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function F6(e){if(e==null)return e;const{unitless:t}=HZ(e);return t||typeof e=="number"?`${e}px`:e}var ZR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,O_=e=>Object.fromEntries(Object.entries(e).sort(ZR));function LP(e){const t=O_(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(O_(e));return new Set(t)}function MP(e){if(!e)return e;e=F6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${F6(e)})`),t&&n.push("and",`(max-width: ${F6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(ZR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:O_(e),asArray:LP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;WZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var _i={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},wc=e=>QR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),nu=e=>QR(t=>e(t,"~ &"),"[data-peer]",".peer"),QR=(e,...t)=>t.map(e).join(", "),z5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:wc(_i.hover),_peerHover:nu(_i.hover),_groupFocus:wc(_i.focus),_peerFocus:nu(_i.focus),_groupFocusVisible:wc(_i.focusVisible),_peerFocusVisible:nu(_i.focusVisible),_groupActive:wc(_i.active),_peerActive:nu(_i.active),_groupDisabled:wc(_i.disabled),_peerDisabled:nu(_i.disabled),_groupInvalid:wc(_i.invalid),_peerInvalid:nu(_i.invalid),_groupChecked:wc(_i.checked),_peerChecked:nu(_i.checked),_groupFocusWithin:wc(_i.focusWithin),_peerFocusWithin:nu(_i.focusWithin),_peerPlaceholderShown:nu(_i.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},GZ=Object.keys(z5);function OP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:P}=OP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=z5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(B6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(B6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function B6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(B6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:UZ(n.breakpoints)}),n}var I_=yl({},k3,hn,yZ,E4,Aa,SZ,TZ,bZ,KR,PZ,km,D6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Aa,E4,KR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(I_),...GZ],iQ={...I_,...z5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var JR=e=>t=>dQ({theme:t,pseudos:z5,configs:I_})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,B5--),$r}function la(){return $r=Io2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&la()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Hv(e,E3()+(t<6&&wl()==32&&la()==32))}function W6(e){for(;la();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&W6($r);break;case 40:e===41&&W6(e);break;case 92:la();break}return Io}function LQ(e,t){for(;la()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Hv(t,Io-1)+"*"+F5(e===47?e:la())}function MQ(e){for(;!dv(wl());)la();return Hv(e,Io)}function OQ(e){return oN(T3("",null,null,null,[""],e=iN(e),0,[0],e))}function T3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=la()){case 40:if(S!=108&&Ti(N,p-1)==58){$6(N+=xn(P3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=P3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(E3()-1,7);continue;case 47:switch(wl()){case 42:case 47:by(IQ(LQ(la(),E3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&by(v>32?RP(N+";",r,n,p-1):RP(xn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(by(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)T3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:T3(e,R,R,r&&by(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:T3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=P3(la())),m=wl(),h=p=dl(T=N+=MQ(E3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function IP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=D_(m),S=0,w=0,P=0;S0?m[E]+" "+_:xn(_,/&\f/g,m[E])))&&(l[P++]=T);return $5(e,t,n,i===0?R_:s,l,u,h)}function IQ(e,t,n){return $5(e,t,n,eN,F5(EQ()),cv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,N_,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=D_(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return xn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+P4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~$6(e,"stretch")?sN(xn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~$6(e,"!important")&&10))){case 107:return xn(e,":",":"+pn)+e;case 101:return xn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+Bi+e+e}return e}var HQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case N_:t.return=sN(t.value,t.length);break;case tN:return s0([Mg(t,{value:xn(t.value,"@","@"+pn)})],i);case R_:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[xn(o,/:(read-\w+)/,":"+P4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[xn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Mg(t,{props:[xn(o,/:(plac\w+)/,":"+P4+"$1")]}),Mg(t,{props:[xn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},VQ=[HQ],lN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},xx=aN(function(e){return gN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),FP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!gN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function bJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},wN=xJ(bJ);function CN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var _N=e=>CN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function kN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var EJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,PJ=aN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},HP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return hN(n,r,i),oJ(function(){return pN(n,r,i)}),null},MJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||HP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var FJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),BJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),WJ=An("formError").parts("text","icon"),HJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function EN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function wy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function UP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=wx(s,a,e+1/3),i=wx(s,a,e),o=wx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var G6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function dee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=pee(e)),typeof e=="object"&&(ru(e.r)&&ru(e.g)&&ru(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ru(e.h)&&ru(e.s)&&ru(e.v)?(r=wy(e.s),i=wy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):ru(e.h)&&ru(e.s)&&ru(e.l)&&(r=wy(e.s),o=wy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=EN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),Cx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),_x="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),hs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+Cx),rgba:new RegExp("rgba"+_x),hsl:new RegExp("hsl"+Cx),hsla:new RegExp("hsla"+_x),hsv:new RegExp("hsv"+Cx),hsva:new RegExp("hsva"+_x),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(G6[e])e=G6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=hs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=hs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=hs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=hs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=hs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=hs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=hs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=hs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=hs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=hs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ru(e){return Boolean(hs.CSS_UNIT.exec(String(e)))}var Vv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=cee(t)),this.originalInput=t;var i=dee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=EN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),lee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries(G6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=xy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=xy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=xy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=xy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(PN(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=T4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return T4([0,100],t.seed);var n=TN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return T4([r,i],t.seed)}function vee(e,t,n){var r=yee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return T4([r,i],n.seed)}function yee(e,t){for(var n=TN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=LN.find(function(a){return a.name===e});if(n){var r=AN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function TN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=LN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function T4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function AN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var LN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function bee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function _ee(e){const t=PN().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Eee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function H_(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function MN(e){return Tee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(MN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,j6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=MN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:j6(t,-1)},uu=Object.assign(e=>({add:(...t)=>uu(KP(e,...t)),subtract:(...t)=>uu(XP(e,...t)),multiply:(...t)=>uu(j6(e,...t)),divide:(...t)=>uu(ZP(e,...t)),negate:()=>uu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:j6,divide:ZP,negate:QP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function ON(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,ON(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${ON(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Fee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Bee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Wee=Nee({container:zee,button:Fee,panel:Bee,icon:$ee}),Hee=Dee({baseStyle:Wee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),ua=ei("alert-fg"),Su=ei("alert-bg"),Uee=Uv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function V_(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:ua.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),IN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Zee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...IN,...Zee,container:Qee},RN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:NN,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),kx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[kx.variable]:"colors.gray.200",_dark:{[kx.variable]:"colors.whiteAlpha.400"},bgColor:kx.reference},JP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=NN(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function Cc(e){const t=e!=="100%"?RN[e]:void 0;return NN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ate={"2xs":Cc(4),xs:Cc(6),sm:Cc(8),md:Cc(12),lg:Cc(16),xl:Cc(24),"2xl":Cc(32),full:Cc("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},DN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(DN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:DN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:A3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=A3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:A3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:A3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:A3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},A4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Fte}=Pm,Bte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Bte,variants:zte,defaultProps:Fte},Wte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Hte={baseStyle:Wte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:Y6,defineMultiStyleConfig:qte}=rr(FJ.keys),Ex=ei("drawer-bg"),Px=ei("drawer-box-shadow");function yp(e){return Y6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ex.variable]:"colors.white",[Px.variable]:"shadows.lg",_dark:{[Ex.variable]:"colors.gray.700",[Px.variable]:"shadows.dark-lg"},bg:Ex.reference,boxShadow:Px.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=Y6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(BJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(WJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:fu,defineMultiStyleConfig:Ane}=rr(HJ.keys),Lne=fu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),_c={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Mne={lg:fu({field:_c.lg,addon:_c.lg}),md:fu({field:_c.md,addon:_c.md}),sm:fu({field:_c.sm,addon:_c.sm}),xs:fu({field:_c.xs,addon:_c.xs})};function U_(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var One=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Ine=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Rne=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=fu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},gn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Fne={baseStyle:zne},Bne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Bne},{defineMultiStyleConfig:Wne,definePartsStyle:Hne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Hne({icon:Vne}),Gne=Wne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:q6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=q6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function ds(e){return q6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={xs:ds("xs"),sm:ds("sm"),md:ds("md"),lg:ds("lg"),xl:ds("xl"),"2xl":ds("2xl"),"3xl":ds("3xl"),"4xl":ds("4xl"),"5xl":ds("5xl"),"6xl":ds("6xl"),full:ds("full")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},zN=hre,{defineMultiStyleConfig:pre,definePartsStyle:FN}=rr(jJ.keys),G_=Ui("number-input-stepper-width"),BN=Ui("number-input-input-padding"),gre=uu(G_).add("0.5rem").toString(),mre={[G_.variable]:"sizes.6",[BN.variable]:gre},vre=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[G_.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=FN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function Cy(e){var t,n;const r=(t=gn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=zN.fontSizes[o];return FN({field:{...r.field,paddingInlineEnd:BN.reference,verticalAlign:"top"},stepper:{fontSize:uu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:Cy("xs"),sm:Cy("sm"),md:Cy("md"),lg:Cy("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:gn.variants,defaultProps:gn.defaultProps}),eT,Cre={...(eT=gn.baseStyle)==null?void 0:eT.field,textAlign:"center"},_re={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,kre={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=gn.variants)==null?void 0:tT.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),_y=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),nT=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[_y.variable]:"colors.white",bg:_y.reference,[Are.variable]:_y.reference,[nT.variable]:"colors.gray.200",_dark:{[_y.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Fre,definePartsStyle:nm}=rr(qJ.keys),Bre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ai(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Wre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Hre=e=>({transitionProperty:"common",transitionDuration:"slow",...Bre(e)}),Vre=nm(e=>({label:$re,filledTrack:Hre(e),track:Wre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Fre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:L3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(A4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=L3(e=>{var t,n,r,i;return{label:(n=(t=A4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=A4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:L3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:L3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:L3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),ky={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,nie={lg:{...(rT=gn.sizes)==null?void 0:rT.lg,field:{...(iT=gn.sizes)==null?void 0:iT.lg.field,...ky}},md:{...(oT=gn.sizes)==null?void 0:oT.md,field:{...(aT=gn.sizes)==null?void 0:aT.md.field,...ky}},sm:{...(sT=gn.sizes)==null?void 0:sT.sm,field:{...(lT=gn.sizes)==null?void 0:lT.sm.field,...ky}},xs:{...(uT=gn.sizes)==null?void 0:uT.xs,field:{...(cT=gn.sizes)==null?void 0:cT.xs.field,...ky},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:gn.variants,defaultProps:gn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Tx=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Tx.variable]:"colors.white",_dark:{[Tx.variable]:"colors.gray.700"},bg:Tx.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:eS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Ic=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...H_({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...H_({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Ic.variable]:"colors.gray.200",_dark:{[Ic.variable]:"colors.whiteAlpha.200"},_disabled:{[Ic.variable]:"colors.gray.300",_dark:{[Ic.variable]:"colors.whiteAlpha.300"}},bg:Ic.reference}),hie=e=>{const{orientation:t}=e;return{...H_({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:gv.reference,h:gv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Ic.variable]:`colors.${t}.500`,_dark:{[Ic.variable]:`colors.${t}.200`},bg:Ic.reference}},gie=eS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=eS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=eS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=eS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:$N}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=$N({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:$N({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:M3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Wf=Ui("switch-track-height"),Ax=Ui("switch-track-diff"),Iie=uu.subtract(Lm,Wf),K6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Wf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Wf.reference],height:[Wf.reference],_checked:{transform:`translateX(${K6.reference})`}},Die=M3(e=>({container:{[Ax.variable]:Iie,[K6.variable]:Ax.reference,_rtl:{[K6.variable]:uu(Ax).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:M3({container:{[Lm.variable]:"1.375rem",[Wf.variable]:"sizes.3"}}),md:M3({container:{[Lm.variable]:"1.875rem",[Wf.variable]:"sizes.4"}}),lg:M3({container:{[Lm.variable]:"2.875rem",[Wf.variable]:"sizes.6"}})},Fie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Bie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),L4={"&[data-is-numeric=true]":{textAlign:"end"}},Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Wie,striped:Hie,unstyled:{}},Uie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Bie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Hf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},doe=Hf({container:loe,label:uoe,closeButton:coe}),foe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,goe={...(dT=gn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,moe={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=gn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,voe={xs:((hT=gn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=gn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=gn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=gn.sizes)==null?void 0:mT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Ey=Ui("tooltip-bg"),Lx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Ey.reference,color:Lx.reference,[Ey.variable]:"colors.gray.700",[Lx.variable]:"colors.whiteAlpha.900",_dark:{[Ey.variable]:"colors.gray.300",[Lx.variable]:"colors.gray.900"},[Soe.variable]:Ey.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Hee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:A4,CloseButton:Dte,Code:$te,Container:Hte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:gn,Kbd:Fne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Fie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Ooe=Moe,Ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Roe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Foe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Boe=Foe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Woe=$oe,Hoe={breakpoints:Eoe,zIndices:Boe,radii:Loe,blur:Woe,colors:Toe,...zN,sizes:RN,shadows:Ooe,space:IN,borders:_oe,transition:zoe},Voe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Hoe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function O3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!O3(e[r],t[r]))return!1;return!0}var o;if(Koe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!O3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Zoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!O3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return O3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function WN(){const e=Wv(),t=t1();return{...e,theme:t}}function Joe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return ne(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function iae(){const{colorMode:e}=Wv();return x(Z5,{styles:t=>{const n=wN(t,"styles.global"),r=kN(n,{theme:t,colorMode:e});return r?JR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=CN(a,(p,m)=>oQ(m)),l=kN(e,t),u=Object.assign({},i,l,_N(s),o),h=JR(u)(t.theme);return r?[h,r]:h};function Mx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=U6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Wv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function HN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=WN(),a=e?wN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},_N(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return HN(e,t)}function Ii(e,t={}){return HN(e,t)}function uae(){const e=new Map;return new Proxy(Mx,{apply(t,n,r){return Mx(...r)},get(t,n){return e.has(n)||e.set(n,Mx(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function wn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Bn(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var X6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,M4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return X6(()=>()=>e.current.destroy()),e.current}var[mae,VN]=wn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=VN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);X6(()=>()=>{!i.current||t.unregister(i.current)},[]),X6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=M4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function UN(){return[M4(mae),()=>M4(VN()),()=>gae(),i=>vae(i)]}var Ir=(...e)=>e.filter(Boolean).join(" "),bT={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Ir("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});va.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function tS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const j_=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function yae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",O4=sh?C.exports.useLayoutEffect:C.exports.useEffect,GN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(GN),a=C.exports.useContext(n1),s=C.exports.useContext(j_).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return O4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),O4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||xae.some(t=>vv(e[t]))}function jN(e){return Boolean(iS(e)||e.variants)}function wae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(nS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const iu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:iu(["layout","layoutId","drag"]),animation:iu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:iu(["exit"]),drag:iu(["drag","dragControls"]),focus:iu(["whileFocus"]),hover:iu(["whileHover","onHoverStart","onHoverEnd"]),tap:iu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:iu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:iu(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return oS(()=>{if(Mm.hasEverUpdated)return kae++})}const Y_=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const YN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(j_),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(GN).strict,E=C.exports.useContext(YN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return ne(Pae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(Y_).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Oae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function q_(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const I4={};function Iae(e){Object.assign(I4,e)}const R4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(R4);function qN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!I4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>R4.indexOf(e)-R4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function KN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,XN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,Z6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Fae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:XN(0,1)}),Py=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kc=Yv("deg"),_l=Yv("%"),Ct=Yv("px"),Bae=Yv("vh"),$ae=Yv("vw"),wT=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),K_=(e,t)=>n=>Boolean(jv(n)&&Fae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ZN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:K_("hsl","hue"),parse:ZN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Wae=XN(0,255),Ox=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Wae(e))}),Bc={test:K_("rgb","red"),parse:ZN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ox.transform(e)+", "+Ox.transform(t)+", "+Ox.transform(n)+", "+Om(Im.transform(r))+")"};function Hae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Q6={test:K_("#"),parse:Hae,transform:Bc.transform},eo={test:e=>Bc.test(e)||Q6.test(e)||If.test(e),parse:e=>Bc.test(e)?Bc.parse(e):If.test(e)?If.parse(e):Q6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?Bc.transform(e):If.transform(e)},QN="${c}",JN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Z6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function eD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Z6);r&&(n=r.length,e=e.replace(Z6,QN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,JN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function tD(e){return eD(e).values}function nD(e){const{values:t,numColors:n,tokenised:r}=eD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Gae(e){const t=tD(e);return nD(e)(t.map(Uae))}const bu={test:Vae,parse:tD,createTransformer:nD,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,J6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),CT={...lh,transform:Math.round},rD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:kc,rotateX:kc,rotateY:kc,rotateZ:kc,scale:Py,scaleX:Py,scaleY:Py,scaleZ:Py,skew:kc,skewX:kc,skewY:kc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Im,originX:wT,originY:wT,originZ:Ct,zIndex:CT,fillOpacity:Im,strokeOpacity:Im,numOctaves:CT};function X_(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(KN(m)){o[m]=v;continue}const S=rD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const Z_=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function iD(e,t,n){for(const r in t)!ks(t[r])&&!qN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=Z_();return X_(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return iD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...tse,...Jae,...Qae,...ese]);function N4(e){return nse.has(e)}let oD=e=>!N4(e);function rse(e){!e||(oD=t=>t.startsWith("on")?!N4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(oD(i)||n===!0&&N4(i)||!t&&!N4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function ose(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function Q_(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){X_(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=ose(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&lse(p,o,a,s,!1)}const aD=()=>({...Z_(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=aD();return Q_(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};iD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(q_(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const sD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function lD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const uD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function cD(e,t,n,r){lD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(uD.has(i)?i:sD(i),t.attrs[i])}function J_(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||qN(r,e))&&(n[r]=t[r]);return n}function dD(e){const t=J_(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function e7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),fD=e=>bv(e)?e[e.length-1]||0:e;function I3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const hD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():oS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=I3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=jN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!rS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=e7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const pse={useVisualState:hD({scrapeMotionValuesFromProps:dD,createRenderState:aD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Q_(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),cD(t,n)}})},gse={useVisualState:hD({scrapeMotionValuesFromProps:J_,createRenderState:Z_})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...q_(e)?pse:gse,preloadedFeatures:n,useRender:cse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function eC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return aS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};eC(t,"focus",e?r:void 0),eC(t,"blur",e?i:void 0)}function pD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function gD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function t7(e,t="page"){return{point:gD(e)?bse(e,t):xse(e,t)}}const mD=(e,t=!1)=>{const n=r=>e(r,t7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function vD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return aS(e,vD(t),mD(n,t==="pointerdown"),r)}function D4(e,t,n,r){return eC(e,vD(t),n&&mD(n,t==="pointerdown"),r)}function yD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=yD("dragHorizontal"),ET=yD("dragVertical");function SD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function bD(){const e=SD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!pD(r)||bD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){D4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),D4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const xD=(e,t)=>t?e===t?!0:xD(e,t.parentElement):!1;function n7(e){return C.exports.useEffect(()=>()=>e(),[])}function wD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Ix=.001,Ase=.01,TT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=TT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=tC(u,a),S=Math.exp(-p);return Ix-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=tC(Math.pow(u,2),a);return(-i(u)+Ix>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Ix+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Ise=12;function Rse(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Dse)&&AT(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function r7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=wD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=LT,S=LT;function w(){const P=h?-(h/1e3):0,E=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const M=tC(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}r7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Rx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Rx(l,s,e+1/3),o=Rx(l,s,e),a=Rx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Fse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Bse=[Q6,Bc,If],OT=e=>Bse.find(t=>t.test(e)),CD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=MT(i),n=Bc),r===If&&(o=MT(o),r=Bc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Fse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},nC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce($se);function _D(e,t){return nC(e)?n=>wr(e,t,n):eo.test(e)?CD(e,t):ED(e,t)}const kD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>_D(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=_D(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function IT(e){const t=bu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=bu.createTransformer(t),r=IT(e),i=IT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?sS(kD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Hse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Hse;if(typeof e=="string")return eo.test(e)?CD:ED;if(Array.isArray(e))return kD;if(typeof e=="object")return Wse}function Use(e,t,n){const r=[],i=n||Vse(e[0]),o=e.length-1;for(let a=0;an(xv(e,t,r))}function jse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=xv(e[o],e[o+1],i);return t[o](s)}}function PD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;z4(o===t.length),z4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),i7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),TD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=TD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},AD=1.525,Kse=4/11,Xse=8/11,Zse=9/10,o7=e=>e,a7=Yse(2),Qse=lS(a7),LD=i7(a7),MD=e=>1-Math.sin(Math.acos(e)),s7=lS(MD),Jse=i7(s7),l7=TD(AD),ele=lS(l7),tle=i7(l7),nle=qse(AD),rle=4356/361,ile=35442/1805,ole=16061/1805,B4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-B4(1-e*2)):.5*B4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||LD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function R3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=cle(r&&r.length===a.length?r:ule(a),i);function l(){return PD(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const RT={keyframes:R3,spring:r7,decay:dle};function fle(e){if(Array.isArray(e.to))return R3;if(RT[e.type])return RT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?R3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?r7:R3}const OD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),ID=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),OD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>uS[t].process(p0),e),{});const yle=e=>uS[e].process(p0),RD=e=>{wv=!1,p0.delta=rC?OD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,iC=!0,qv.forEach(yle),iC=!1,wv&&(rC=!1,ID(RD))},Sle=()=>{wv=!0,rC=!0,iC||ID(RD)},ble=()=>p0;function ND(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?ND(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function DD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=wD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=PD([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=ND(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=$.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_{p?.(),E.stop()}}}function zD(e,t){return t?e*(1e3/t):0}function _le({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=zD($-R,ble().delta),(I===1&&$>M||I===-1&&$S?.stop()}}const oC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>oC(e)&&e.hasOwnProperty("z"),Ty=(e,t)=>Math.abs(e-t);function u7(e,t){if(nC(e)&&nC(t))return Ty(e,t);if(oC(e)&&oC(t)){const n=Ty(e.x,t.x),r=Ty(e.y,t.y),i=NT(e)&&NT(t)?Ty(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const FD=(e,t)=>1-3*t+3*e,BD=(e,t)=>3*t-6*e,$D=e=>3*e,$4=(e,t,n)=>((FD(t,n)*e+BD(t,n))*e+$D(t))*e,WD=(e,t,n)=>3*FD(t,n)*e*e+2*BD(t,n)*e+$D(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=$4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ay,e,n)}return a=>a===0||a===1?a:$4(o(a),t,r)}function Ole({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!bD()}function p(S,w){!h()||(xD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=sS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}D4(i,"pointerdown",o?v:void 0,l),n7(u)}const Ile="production",HD=typeof process>"u"||process.env===void 0?Ile:"production",DT=new Set;function VD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const aC=new WeakMap,Nx=new WeakMap,Rle=e=>{const t=aC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Nx.has(n)||Nx.set(n,{});const r=Nx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return aC.set(e,n),r.observe(e),()=>{aC.delete(e),r.unobserve(e)}}function Fle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Wle:$le)(a,o.current,e,i)}const Ble={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ble[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Wle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(HD!=="production"&&VD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const $c=e=>t=>(e(t),null),Hle={inView:$c(Fle),tap:$c(Ole),focus:$c(vse),hover:$c(Pse)};function c7(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function UD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gle={linear:o7,easeIn:a7,easeInOut:LD,easeOut:Qse,circIn:MD,circInOut:Jse,circOut:s7,backIn:l7,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:B4},zT=e=>{if(Array.isArray(e)){z4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",FT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ly=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),BT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:Ly,scaleY:Ly,scale:Ly,opacity:Dx,backgroundColor:Dx,color:Dx,default:Ly},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=BT[e]||BT.default,{to:t,...n(t)}},Kle={...rD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:J6,WebkitFilter:J6},d7=e=>Kle[e];function f7(e,t){var n;let r=d7(e);return r!==J6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},GD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),jD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),GD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),zx=Kv.reduce((e,t)=>(e[t]=()=>cS[t].process(g0),e),{}),eue=e=>cS[e].process(g0),YD=e=>{Cv=!1,g0.delta=sC?GD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,lC=!0,Kv.forEach(eue),lC=!1,Cv&&(sC=!1,jD(YD))},tue=()=>{Cv=!0,sC=!0,lC||jD(YD)},uC=()=>g0;function qD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function iue(e,t){var n,r;return(r=(n=(h7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=h7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=FT(e,n);a==="none"&&s&&typeof n=="string"?a=f7(e,n):$T(a)&&typeof n=="string"?a=WT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=WT(a));const l=FT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?_le({...p,...o}):DD({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=fD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function WT(e){return typeof e=="number"?0:f7("",e)}function h7(e,t){return e[t]||e.default||e}function p7(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=qD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function g7(e,t){e.indexOf(t)===-1&&e.push(t)}function m7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return g7(this.subscriptions,t),()=>m7(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=uC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=cue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?zD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new due(e)}const KD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},XD=[lh,Ct,_l,kc,$ae,Bae,fue],Rg=e=>XD.find(KD(e)),hue=[...XD,eo,bu],pue=e=>hue.find(KD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return e7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function yue(e,t){const n=dS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=fD(o[a]);vue(e,a,s)}}function Sue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;scC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=cC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=ZD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function cC(e,t,n={}){var r;const i=dS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>ZD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function ZD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=p7(m,v,S,w);H4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(_ue).forEach((u,h)=>{a.push(cC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const v7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...v7].reverse(),Pue=v7.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=dS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{W=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!UD(K,G)||$?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...j.map(Q=>({animation:Q,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!UD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:$c(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:$c(e=>{const{custom:t,visualElement:n}=e,[r,i]=c7(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class QD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Bx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=u7(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=uC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Fx(h,this.transformPagePoint),pD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Bx(Fx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},gD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=t7(t),o=Fx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=uC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Bx(o,this.history)),this.removeListeners=sS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Fx(e,t){return t?{point:t(e.point)}:e}function HT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bx({point:e},t){return{point:e,delta:HT(e,JD(t)),offset:HT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function JD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=JD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fa(e){return e.max-e.min}function VT(e,t=0,n=.01){return u7(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const dC=.35;function Wue(e=dC){return e===!1?e=0:e===!0&&(e=dC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),Ei=()=>({x:QT(),y:QT()});function ul(e){return[e("x"),e("y")]}function ez({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function $x(e){return e===void 0||e===1}function fC({scale:e,scaleX:t,scaleY:n}){return!$x(e)||!$x(t)||!$x(n)}function Sf(e){return fC(e)||tz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function tz(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function V4(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=V4(e,i,r)),V4(e,n,r)+t}function hC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function nz(e,{x:t,y:n}){hC(e.x,t.translate,t.scale,t.originPoint),hC(e.y,n.translate,n.scale,n.originPoint)}function Uue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(t7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=SD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=fa(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new QD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!My(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Wue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Fue(i.layout.actual,o);if(n){const s=n(Hue(a));this.hasMutatedConstraints=!!s,s&&(a=ez(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!My(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return p7(t,r,0,n)}stopAnimation(){ul(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ul(n=>{const{drag:r}=this.getProps();if(!My(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Bue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!My(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=aS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=dC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function My(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(j_),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new QD(h,l,{transformPagePoint:s})}D4(i,"pointerdown",o&&u),n7(()=>a.current&&a.current.end())}const Jue={pan:$c(Que),drag:$c(Zue)},pC={current:null},iz={current:!1};function ece(){if(iz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>pC.current=e.matches;e.addListener(t),t()}else pC.current=!1}const Oy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Oy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Oy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Oy[i]]=o=>r.add(o),n["notify"+Oy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),H4(r)&&r.add(i);else if(ks(a))e.addValue(i,F0(o)),H4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const oz=Object.keys(yv),rce=oz.length,az=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const $={..._},W=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),H4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=iS(p),Z=jN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),iz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:pC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,ke){const ct=[];for(let Ge=0;Gete.scheduleRender(),animationType:typeof ot=="string"?ot:"both",initialPromotionConfig:ke,layoutScroll:Tt})}return ct},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=F0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){$[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=e7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye{const o=i.get();if(!gC(o))return;const a=mC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!gC(o))continue;const a=mC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),uz=e=>sce.has(e),lce=e=>Object.keys(e).some(uz),cz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===lh||e===Ct;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=R4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);cz(h,s[u]),e[u]=aA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(uz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const dz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=d7(t);return n&&n.default||0}else{const n=mce(e),r=(KN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return rz(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:J_,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),X_(t,n,r,i.transformTemplate)},render:lD},vce=az(dz),yce=az({...dz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=d7(t))===null||n===void 0?void 0:n.default)||0:(t=uD.has(t)?t:sD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:dD,build(e,t,n,r,i){Q_(t,n,r,i.transformTemplate)},render:cD}),Sce=(e,t)=>q_(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(lz,v=>(o.push(v),lA)));const a=bu.parse(e);if(a.length>5)return r;const s=bu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=c7(),r=C.exports.useContext(Y_);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(YN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:F0(e);return p7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const fz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=fz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||Ct.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(xv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function fs(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=V4(e,1/n,r),i!==void 0&&(e=V4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,Mce,n?.x,r?.x),pA(e.y,t,Oce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function pz(e){return mA(e.x)&&mA(e.y)}function gz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return fa(e.x)/fa(e.y)}function Ice(e,t,n=.1){return u7(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){g7(this.members,t),t.scheduleRender()}remove(t){if(m7(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){g7(this.children,t),this.isDirty=!0}remove(t){m7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function mz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Hce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=qD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!gz(this.targetLayout,w)||S,$=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...h7(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Jf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Uce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var _;const T=E/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&vz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=fa(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=fa(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}fs(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Fce(e){e.updateLayout()}function Bce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=fa(v);v.min=o[m].min,v.max=v.min+S}):vz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=fa(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!pz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),gz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Wce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Hce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function vz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(vA(t),vA(n),.2)}const Xce=mz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wx={current:void 0},Zce=mz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Wx.current=e}return Wx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Hle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function yz(){const e=C.exports.useRef(!1);return O4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=yz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const Hx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",VD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(Y_).forceRender;l&&(s=l);const u=yz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(O4(()=>{w.current=!1,rde(h,S),v.current=p}),n7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Rn,{children:p.map(T=>x(Hx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x(Hx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(Hx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),HD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Rn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function vC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function yC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(TA.enter,i)})},bz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});bz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},xz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...xz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},wz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...wz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=yC({direction:e});return{...i,transition:t?.exit??Ps.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=yC({direction:e});return{...i,transition:n?.enter??Ps.enter(AA.enter,r),transitionEnd:t?.enter}}},Cz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=yC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});Cz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},SC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(pd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...SC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Vx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,hS]=wn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[yde,y7]=wn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Sde,WPe,bde,xde]=UN(),Nf=Pe(function(t,n){const{getButtonProps:r}=y7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=tS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,S7]=wn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=S7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:Bn(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Vx($.onClick,T),onFocus:Vx($.onFocus,I),onKeyDown:Vx($.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;fS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){fS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Pde(e){fS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Tde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=y7(),{reduceMotion:r}=S7(),i=Zv("chakra-accordion__icon",e.className),o=hS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Ff=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=S7(),{getPanelProps:s,isOpen:l}=y7(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=hS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(bz,{in:l,...i,children:m})});Ff.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Ode(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Ide,Rde]=wn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Nde,b7]=wn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),_z={info:{icon:Ode,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return _z[e].colorScheme}function zde(e){return _z[e].icon}var kz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});kz.displayName="Alert";var Ez=Pe(function(t,n){const i={display:"inline",...b7().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});Ez.displayName="AlertDescription";function Pz(e){const{status:t}=Rde(),n=zde(t),r=b7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:gS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Pz.displayName="AlertIcon";var Tz=Pe(function(t,n){const r=b7();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Tz.displayName="AlertTitle";function Fde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Bde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",U4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});U4.displayName="NativeImage";var mS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Bde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Fde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:U4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:U4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});mS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:U4,className:"chakra-image",...e}));function vS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var yS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Wde,Hde]=wn({strict:!1,name:"ButtonGroupContext"});function bC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=yS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}bC.displayName="ButtonIcon";function xC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=yS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}xC.displayName="ButtonSpinner";function Vde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Pe((e,t)=>{const n=Hde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=mn(e),_=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:_,className:yS("chakra-button",w),...E},o&&S==="start"&&x(xC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...I})):x(OA,{...I}),o&&S==="end"&&x(xC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Wa.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Rn,{children:[t&&x(bC,{marginEnd:i,children:t}),r,n&&x(bC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=yS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Wde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Iy=e=>e?"":void 0,Ux=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Az]=wn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Gde,a1]=wn({strict:!1,name:"FormControlContext"});function jde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Bn(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Iy(P),"data-disabled":Iy(i),"data-invalid":Iy(r),"data-readonly":Iy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Bn(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var gd=Pe(function(t,n){const r=Ii("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Az(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function x7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=w7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Ux(n),"aria-required":Ux(i),"aria-readonly":Ux(r)}}function w7(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:IA(t?.onFocus,h),onBlur:IA(t?.onBlur,p)}}var[qde,Kde]=wn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=mn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(Lz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Lz=Pe(function(t,n){const r=a1(),i=Az();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Lz.displayName="RequiredIndicator";function rd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var C7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:C7});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:C7});Jde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,B0=!1,wC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function _7(e,t){wC.forEach(n=>n(e,t))}function NA(e){B0=!0,tfe(e)&&(SS="keyboard",_7("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(B0=!0,_7("pointer",e))}function nfe(e){e.target===window||e.target===document||(B0||(SS="keyboard",_7("keyboard",e)),B0=!1)}function rfe(){B0=!1}function DA(){return SS!=="pointer"}function ife(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){B0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),RA=!0}function ofe(e){ife(),e(DA());const t=()=>e(DA());return wC.add(t),()=>{wC.delete(t)}}var[HPe,afe]=wn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Mz(e={}){const t=w7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),rd(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const ke=n&&!m,ct=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),Ge=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const ot=C.exports.useCallback((Le={},st=null)=>{const At=Xe=>{de&&Xe.preventDefault(),K(!0)};return{...Le,ref:st,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&W),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Ta(Le.onMouseDown,At),onMouseUp:Ta(Le.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Ta(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Le={},st=null)=>({...R,...Le,ref:Bn(st,At=>{!At||te(At.tagName==="LABEL")}),onClick:Ta(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var Xe;(Xe=G.current)==null||Xe.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),et=C.exports.useCallback((Le={},st=null)=>({...Le,ref:Bn(G,st),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Ta(Le.onChange,De),onBlur:Ta(Le.onBlur,z,()=>V(!1)),onFocus:Ta(Le.onFocus,$,()=>V(!0)),onKeyDown:Ta(Le.onKeyDown,ct),onKeyUp:Ta(Le.onKeyUp,Ge),required:i,checked:Se,disabled:ke,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:C7}),[w,P,a,De,z,$,ct,Ge,i,Se,ke,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},st=null)=>({...Le,ref:st,onMouseDown:Ta(Le.onMouseDown,zA),onTouchStart:Ta(Le.onTouchStart,zA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:ot,getInputProps:et,getLabelProps:Tt,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=hd({from:{opacity:0},to:{opacity:1}}),vfe=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Oz=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Mz({...E,isDisabled:S,isChecked:_,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Oz.displayName="Checkbox";function yfe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var bS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function k7(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function CC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function G4(e,t,n){return(e-t)*100/(n-t)}function Iz(e,t,n){return(n-t)*e+t}function _C(e,t,n){const r=Math.round((e-t)/n)*n+t,i=CC(n);return k7(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Gx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Rz(Ec(v),o),w=n??S,P=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),Ec(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let j=W;return l&&(j=m0(j,a,s)),k7(j,w)},[w,l,s,a]),_=C.exports.useCallback((W=o)=>{let j;v===""?j=Ec(W):j=Ec(v)+W,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let j;v===""?j=Ec(-W):j=Ec(v)-W,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=Gx(r,o,n)??a,P(W)},[r,n,o,P,a]),I=C.exports.useCallback(W=>{const j=Gx(W,o,w)??a;P(j)},[w,o,P,a]),R=Ec(v);return{isOutOfRange:R>s||Rx(Z5,{styles:Nz}),wfe=()=>x(Z5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${Nz} - `});function Uf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Dz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Dz()&&e.test(navigator.vendor),Efe=e=>Dz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function FA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=FA(n),a=FA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function E7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var P7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=mn(i),s=x7(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});P7.displayName="Input";P7.id="Input";var[Ife,zz]=wn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=mn(t),s=Ir("chakra-input__group",o),l={},u=vS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=E7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),T7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=zz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});T7.displayName="InputAddon";var Fz=Pe(function(t,n){return x(T7,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Fz.displayName="InputLeftAddon";Fz.id="InputLeftAddon";var Bz=Pe(function(t,n){return x(T7,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Bz.displayName="InputRightAddon";Bz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),xS=Pe(function(t,n){const{placement:r="left",...i}=t,o=zz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var $z=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__left-element",r);return x(xS,{ref:n,placement:"left",className:o,...i})});$z.id="InputLeftElement";$z.displayName="InputLeftElement";var Wz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__right-element",r);return x(xS,{ref:n,placement:"right",className:o,...i})});Wz.id="InputRightElement";Wz.displayName="InputRightElement";function Ffe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function id(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Ffe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Bfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Ir("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:id(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Bfe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=mn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Pu=we("div");Pu.displayName="Box";var Hz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Pu,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Hz.displayName="Square";var Wfe=Pe(function(t,n){const{size:r,...i}=t;return x(Hz,{size:r,ref:n,borderRadius:"9999px",...i})});Wfe.displayName="Circle";var Vz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Vz.displayName="Center";var Hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Hfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=mn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Ir("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Ir("chakra-divider",p)})});Gfe.displayName="Divider";var nn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});nn.displayName="Flex";var Uz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Uz.displayName="Grid";function BA(e){return id(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=E7({gridArea:r,gridColumn:BA(i),gridRow:BA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=mn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=mn(t);return x(Pu,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=mn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=mn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Ir("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Ir("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Ir("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Gz]=wn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),A7=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});A7.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(A7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(A7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Gz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Gz();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Uz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return id(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return id(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var jz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});jz.displayName="Spacer";var kC="& > *:not(style) ~ *:not(style)";function rhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[kC]:id(n,i=>r[i])}}function ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":id(n,i=>r[i])}}var Yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Yz.displayName="StackItem";var L7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=vS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Yz,{children:I},N):I;if(!P)return W;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,P,E,p,l]),T=Ir("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[kC]:S[kC]},...m},_)});L7.displayName="Stack";var qz=Pe((e,t)=>x(L7,{align:"center",...e,direction:"row",ref:t}));qz.displayName="HStack";var Kz=Pe((e,t)=>x(L7,{align:"center",...e,direction:"column",ref:t}));Kz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=E7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Ir("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>id(w,_=>$A(R6("space",_)(E))),"--chakra-wrap-y-spacing":E=>id(P,_=>$A(R6("space",_)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Xz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Ir("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Ir("chakra-wrap__listitem",r),...i})});Xz.displayName="WrapItem";var ahe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Zz=ahe,bp=()=>{},she={document:Zz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:Zz},Qz=typeof window<"u"?{window,document}:uhe,Jz=C.exports.createContext(Qz);Jz.displayName="EnvironmentContext";function eF(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Qz},[r,n]);return ne(Jz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}eF.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function jx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&jx(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!jx(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!jx(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Bn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:ie}}function tF(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function nF(e){if(!tF(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=rF(e))==null?void 0:t.defaultView)??window}function rF(e){return tF(e)?e.ownerDocument:document}function phe(e){return rF(e).activeElement}var iF=e=>e.hasAttribute("tabindex"),ghe=e=>iF(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function oF(e){return e.parentElement&&oF(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function aF(e){if(!nF(e)||oF(e)||mhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():vhe(e)?!0:iF(e)}function yhe(e){return e?nF(e)&&aF(e)&&!ghe(e):!1}var She=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function sF(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>aF(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;rd(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=sF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);rd(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Va="bottom",Ua="right",Oo="left",M7="auto",Jv=[Mo,Va,Ua,Oo],$0="start",kv="end",Phe="clippingParents",lF="viewport",zg="popper",The="reference",WA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),uF=[].concat(Jv,[M7]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Fhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function ja(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=ja(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=ja(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function O7(e){if(typeof ShadowRoot>"u")return!1;var t=ja(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Bhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Al(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function $he(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Whe={name:"applyStyles",enabled:!0,phase:"write",fn:Bhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,j4=Math.min,W0=Math.round;function EC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function cF(){return!/^((?!chrome|android).)*safari/i.test(EC())}function H0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=eh(e)?ja(e):window,s=a.visualViewport,l=!cF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function I7(e){var t=H0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&O7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xu(e){return ja(e).getComputedStyle(e)}function Hhe(e){return["table","td","th"].indexOf(Al(e))>=0}function md(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(O7(e)?e.host:null)||md(e)}function HA(e){return!Fa(e)||xu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(EC()),n=/Trident/i.test(EC());if(n&&Fa(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(O7(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Al(i))<0;){var o=xu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function e2(e){for(var t=ja(e),n=HA(e);n&&Hhe(n)&&xu(n).position==="static";)n=HA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&xu(n).position==="static")?t:n||Vhe(e)||t}function R7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Fm(e,t,n){return Yf(e,j4(t,n))}function Uhe(e,t,n){var r=Fm(e,t,n);return r>n?n:r}function fF(){return{top:0,right:0,bottom:0,left:0}}function hF(e){return Object.assign({},fF(),e)}function pF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hF(typeof t!="number"?t:pF(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=R7(s),u=[Oo,Ua].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=I7(o),v=l==="y"?Mo:Oo,S=l==="y"?Va:Ua,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Fm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!dF(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:W0(t*i)/i||0,y:W0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===ja(n)&&(R=md(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ua)&&o===kv){M=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Va)&&o===kv){T=Ua;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:kl(t.placement),variation:V0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ry={passive:!0};function Jhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=ja(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ry)}),s&&l.addEventListener("resize",n.update,Ry),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ry)}),s&&l.removeEventListener("resize",n.update,Ry)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function D3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function N7(e){var t=ja(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function D7(e){return H0(md(e)).left+N7(e).scrollLeft}function rpe(e,t){var n=ja(e),r=md(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=cF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+D7(e),y:l}}function ipe(e){var t,n=md(e),r=N7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+D7(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function z7(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function gF(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Fa(e)&&z7(e)?e:gF(wS(e))}function Bm(e,t){var n;t===void 0&&(t=[]);var r=gF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ja(r),a=i?[o].concat(o.visualViewport||[],z7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bm(wS(a)))}function PC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=H0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===lF?PC(rpe(e,n)):eh(t)?ope(t,n):PC(ipe(md(e)))}function ape(e){var t=Bm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&Fa(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&dF(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=Yf(h.top,l.top),l.right=j4(h.right,l.right),l.bottom=j4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function mF(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Va:l={x:a,y:t.y+t.height};break;case Ua:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?R7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Phe:s,u=n.rootBoundary,h=u===void 0?lF:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=hF(typeof P!="number"?P:pF(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||md(e.elements.popper),l,h,a),R=H0(e.elements.reference),N=mF({reference:R,element:T,strategy:"absolute",placement:i}),z=PC(Object.assign({},T,N)),$=m===zg?z:R,W={top:I.top-$.top+E.top,bottom:$.bottom-I.bottom+E.bottom,left:I.left-$.left+E.left,right:$.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys(W).forEach(function(V){var J=[Ua,Va].indexOf(V)>=0?1:-1,ie=[Mo,Va].indexOf(V)>=0?"y":"x";W[V]+=de[ie]*J})}return W}function lpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?uF:l,h=V0(r),p=h?s?WA:WA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===M7)return[];var t=D3(e);return[UA(e),t,UA(t)]}function cpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[D3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===M7?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Ua:Oo:V?Va:Mo;I[ie]>R[ie]&&(K=D3(K));var G=D3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){$=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var ke=M.find(function(ct){var Ge=N.get(ct);if(Ge)return Ge.slice(0,De).every(function(ot){return ot})});if(ke)return $=ke,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Ua,Va,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ua].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=uF.reduce(function(h,p){return h[p]=ppe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=mF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=R7(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Va:Ua,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?I7(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:fF(),ke=De[J],ct=De[ie],Ge=Fm(0,N[Q],Se[Q]),ot=T?N[Q]/2-te-Ge-ke-W.mainAxis:X-Ge-ke-W.mainAxis,Ze=T?-N[Q]/2+te+Ge+ct+W.mainAxis:he+Ge+ct+W.mainAxis,et=t.elements.arrow&&e2(t.elements.arrow),Tt=et?M==="y"?et.clientTop||0:et.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+ot-xt-Tt,st=K+Ze-xt,At=Fm(v?j4(G,Le):G,K,v?Yf(Z,st):Z);R[M]=At,de[M]=At-K}if(s){var Xe,yt=M==="x"?Mo:Oo,cn=M==="x"?Va:Ua,wt=R[I],Ut=I==="y"?"height":"width",_n=wt+P[yt],vn=wt-P[cn],Ie=[Mo,Oo].indexOf(E)!==-1,Je=(Xe=j?.[I])!=null?Xe:0,Xt=Ie?_n:wt-N[Ut]-z[Ut]-Je+W.altAxis,Yt=Ie?wt+N[Ut]+z[Ut]-Je-W.altAxis:vn,Ee=v&&Ie?Uhe(Xt,wt,Yt):Fm(v?Xt:_n,wt,v?Yt:vn);R[I]=Ee,de[I]=Ee-wt}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===ja(e)||!Fa(e)?N7(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=W0(t.width)/e.offsetWidth||1,r=W0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&_pe(t),o=md(t),a=H0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||z7(o))&&(s=Cpe(t)),Fa(t)?(l=H0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=D7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ppe(e){var t=Epe(e);return Fhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Rpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Npe=e=>Rpe[e],XA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var zpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Fpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,Npe(e.placement))},Bpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Wpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Wpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},Hpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Upe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function vF(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=_.current)==null||W.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Hpe,Bpe,Fpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},j=null)=>({...W,ref:Bn(M,j)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},j=null)=>({...W,ref:Bn(R,j),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=W;return{...Q,ref:j,"data-popper-arrow":"",style:jpe(W)}},[]),$=C.exports.useCallback((W={},j=null)=>({...W,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function jpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function yF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function SF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=wn({strict:!1,name:"PortalManagerContext"});function bF(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}bF.displayName="PortalManager";var[xF,Xpe]=wn({strict:!1,name:"PortalContext"}),F7="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=F7,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(xF,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=F7),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(xF,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=F7;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Ny=new WeakMap,Dy={},Yx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Dy[n]||(Dy[n]=new WeakMap);var o=Dy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Ny.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Yx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Ny.has(p)||p.removeAttribute(r),Ny.delete(p)),v||p.removeAttribute(n)}),Yx--,Yx||(wp=new WeakMap,wp=new WeakMap,Ny=new WeakMap,Dy={})}},wF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function B7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function CF(){}function _F(){}_F.resetWarningCache=CF;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_F,resetWarningCache:CF};return n.PropTypes=n,n};On.exports=a0e();var TC="data-focus-lock",kF="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function EF(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var qx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function PF(e){return e}function TF(e,t){t===void 0&&(t=PF);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function $7(e,t){return t===void 0&&(t=PF),TF(e,t)}function AF(e){e===void 0&&(e={});var t=TF(null);return t.options=gl({async:!0,ssr:!1},e),t}var LF=function(e){var t=e.sideCar,n=Sz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...gl({},n)})};LF.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),LF}var MF=$7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),OF=$7(),h0e=$7(),p0e=AF({async:!0}),g0e=[],W7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(ct){var Ge=u.current;if(Ge&&Ge.focus){var ot=typeof j=="function"?j(Ge):j;if(ot){var Ze=typeof ot=="object"?ot:void 0;u.current=null,ct?Promise.resolve().then(function(){return Ge.focus(Ze)}):Ge.focus(Ze)}}},[j]),te=C.exports.useCallback(function(ct){l.current&&MF.useMedium(ct)},[]),X=OF.useMedium,he=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=Tn((r={},r[kF]=p&&"disabled",r[TC]=P,r),$),Se=m!==!0,De=Se&&m!=="tail",ke=EF([n,he]);return ne(Rn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:qx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:qx},"guard-nearest"):null],!p&&x(W,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:ke,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:qx})]})});W7.propTypes={};W7.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const IF=W7;function AC(e,t){return AC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AC(e,t)}function H7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,AC(e,t)}function RF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){H7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return RF(l,"displayName","SideEffect("+n(i)+")"),l}}var Nl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],U7=k0e.join(","),E0e="".concat(U7,", [data-focus-guard]"),VF=function(e,t){var n;return Nl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:U7)?[i]:[],VF(i))},[])},G7=function(e,t){return e.reduce(function(n,r){return n.concat(VF(r,t),r.parentNode?Nl(r.parentNode.querySelectorAll(U7)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Nl(t).map(function(n){return G7([n])}).reduce(function(n,r){return n.concat(r)},[])},j7=function(e,t){return Nl(e).filter(function(n){return zF(t,n)}).filter(function(n){return x0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Nl(e).filter(function(n){return FF(t,n)})},MC=function(e,t,n){return HF(j7(G7(e,n),t),!0,n)},eL=function(e,t){return HF(j7(G7(e),t),!1)},T0e=function(e,t){return j7(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Nl(e.children).some(function(n){return Pv(n,t)})},A0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},UF=function(e){return e.parentNode?UF(e.parentNode):e},Y7=function(e){var t=LC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(TC);return n.push.apply(n,i?A0e(Nl(UF(r).querySelectorAll("[".concat(TC,'="').concat(i,'"]:not([').concat(kF,'="disabled"])')))):[r]),n},[])},GF=function(e){return e.activeElement?e.activeElement.shadowRoot?GF(e.activeElement.shadowRoot):e.activeElement:void 0},q7=function(){return document.activeElement?document.activeElement.shadowRoot?GF(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Nl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},jF=function(e){var t=document&&q7();return!t||t.dataset&&t.dataset.focusGuard?!1:Y7(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&q7();return e?Nl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(WF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},K7=function(e,t){return WF(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(K7(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?K7(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(K7(e[t],e)):t},YF="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=V7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=nL(e,0),_=nL(e,i-1);if(l===-1||h===-1)return YF;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=BF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(D0e(n)));return i&&i.length?tL(i):tL(JA(t))},OC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&OC(e.parentNode.host||e.parentNode,t),t},Kx=function(e,t){for(var n=OC(e),r=OC(t),i=0;i=0)return o}return!1},qF=function(e,t,n){var r=LC(e),i=LC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Kx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Kx(o,l);u&&(!a||Pv(u,a)?a=u:a=Kx(u,a))})}),a},F0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},B0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(C0e)},$0e=function(e,t){var n=document&&q7(),r=Y7(e).filter(Y4),i=qF(n||e,e,r),o=new Map,a=eL(r,o),s=MC(r,o).filter(function(m){var v=m.node;return Y4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=B0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===YF?{node:z0e(a,h,F0e(r,o))}:p===void 0?p:u[p]}},W0e=function(e){var t=Y7(e).filter(Y4),n=qF(e,e,t),r=new Map,i=MC([n],r,!0),o=MC(t,r).filter(function(a){var s=a.node;return Y4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:V7(s)}})},H0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Xx=0,Zx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Zx&&r){if(Xx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Zx=!0,setTimeout(function(){Zx=!1},1);return}Xx++,H0e(r.node,n.focusOptions),Xx--}};const KF=V0e;function XF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},q4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(jF(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=KF(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=W0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},ZF=function(t){q4()&&t&&(t.stopPropagation(),t.preventDefault())},X7=function(){return XF(q4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},QF=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",ZF),document.addEventListener("focusout",X7),window.addEventListener("blur",QF)},r1e=function(){document.removeEventListener("focusin",ZF),document.removeEventListener("focusout",X7),window.removeEventListener("blur",QF)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),q4(),XF(q4)):(r1e(),qp=null)}MF.assignSyncMedium(e1e);OF.assignMedium(X7);h0e.assignMedium(function(e){return e({moveFocusInside:KF,focusInside:jF})});const a1e=m0e(i1e,o1e)(t1e);var JF=C.exports.forwardRef(function(t,n){return x(IF,{sideCar:a1e,ref:n,...t})}),eB=IF.propTypes||{};eB.sideCar;B7(eB,["sideCar"]);JF.propTypes={};const s1e=JF;var tB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&sF(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};tB.displayName="FocusLock";var z3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",nB=AF(),Qx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Qx,onWheelCapture:Qx,onTouchMoveCapture:Qx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=Sz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=EF([n,t]),I=gl(gl({},_),i);return ne(Rn,{children:[h&&x(T,{sideCar:nB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:F3,zeroRight:z3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rB=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Jx=function(e){return parseInt(e||"",10)||0},v1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Jx(n),Jx(r),Jx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S1e=rB(),b1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(l1e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(z3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(F3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(z3," .").concat(z3,` { - right: 0 `).concat(r,`; - } - - .`).concat(F3," .").concat(F3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(u1e,": ").concat(s,`px; - } -`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},IC=!1;if(typeof window<"u")try{var zy=Object.defineProperty({},"passive",{get:function(){return IC=!0,!0}});window.addEventListener("test",zy,zy),window.removeEventListener("test",zy,zy)}catch{IC=!1}var Cp=IC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},iB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return iB(e,"overflowY")},_1e=function(e){return iB(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=oB(e,n);if(r){var i=aB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oB=function(e,t){return e==="v"?C1e(t):_1e(t)},aB=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=aB(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&oB(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return rB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=vC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=iL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=iL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return T1e($,P,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?oL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return ne(Rn,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(nB,O1e);var sB=C.exports.forwardRef(function(e,t){return x(CS,{...gl({},e,{ref:t,sideCar:I1e})})});sB.classNames=CS.classNames;const lB=sB;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},RC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&RC.add(e),()=>{RC.remove(e)}),[t,e])}function D1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=F1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:Bn($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!RC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:Bn($,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return wF(e.current)},[t,e,n])}function F1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[B1e,fh]=wn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[$1e,od]=wn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(B1e,{value:S,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=od();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var Z7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=od(),a=dh("chakra-modal__close-btn",r),s=fh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});Z7.displayName="ModalCloseButton";function uB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=od(),[p,m]=c7();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(tB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(lB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var W1e={slideInBottom:{...SC,custom:{offsetY:16,reverse:!0}},slideInRight:{...SC,custom:{offsetX:16,reverse:!0}},scale:{...wz,custom:{initialScale:.95,reverse:!0}},none:{}},H1e=we(Rl.section),V1e=e=>W1e[e||"none"],cB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(H1e,{ref:t,...r,...i})});cB.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=od(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=od();return le.createElement(uB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(cB,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var _S=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});_S.displayName="ModalFooter";var kS=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=od();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});kS.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=od();return x(U1e,{...i||(u==="none"?{}:xz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function dB(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var fB=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[VPe,G1e]=wn(),j1e=we(Cz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=od(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=G1e();return le.createElement(uB,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var hB=(...e)=>e.filter(Boolean).join(" "),ew=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),X1e=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Z1e=50,lL=300;function Q1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function nge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr($??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),ke=C.exports.useRef(null),ct=C.exports.useRef(null),Ge=C.exports.useRef(null),ot=C.exports.useCallback(Ee=>Ee.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(Ee=>j?.(Ee)??Ee,[j]),et=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);rd(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(ot(Ot))}},[Ze,ot]);const Tt=C.exports.useCallback((Ee=a)=>{Se&&te(Ee)},[te,Se,a]),xt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Le=Q1e(Tt,xt);sL(ct,"disabled",Le.stop,Le.isSpinning),sL(Ge,"disabled",Le.stop,Le.isSpinning);const st=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const ze=Ze(Ee.currentTarget.value);Z(ot(ze)),ke.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Z,ot,Ze]),At=C.exports.useCallback(Ee=>{var Ot;V?.(Ee),ke.current&&(Ee.target.selectionStart=ke.current.start??((Ot=Ee.currentTarget.value)==null?void 0:Ot.length),Ee.currentTarget.selectionEnd=ke.current.end??Ee.currentTarget.selectionStart)},[V]),Xe=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;tge(Ee,Q)||Ee.preventDefault();const Ot=yt(Ee)*a,ze=Ee.key,an={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[ze];an&&(Ee.preventDefault(),an(Ee))},[Q,a,Tt,xt,Z,i,o]),yt=Ee=>{let Ot=1;return(Ee.metaKey||Ee.ctrlKey)&&(Ot=.1),Ee.shiftKey&&(Ot=10),Ot},cn=C.exports.useMemo(()=>{const Ee=K?.(G.value);if(Ee!=null)return Ee;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let Ee=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(Ee=o),G.cast(Ee))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&wt()},[n,ye,wt]),_n=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=De.current)==null||Ee.focus()})},[t]),vn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Le.up(),_n()},[_n,Le]),Ie=C.exports.useCallback(Ee=>{Ee.preventDefault(),Le.down(),_n()},[_n,Le]);Uf(()=>De.current,"wheel",Ee=>{var Ot;const lt=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!lt)return;Ee.preventDefault();const an=yt(Ee)*a,Nn=Math.sign(Ee.deltaY);Nn===-1?Tt(an):Nn===1&&xt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Ot=null)=>{const ze=l||r&&G.isAtMax;return{...Ee,ref:Bn(Ot,ct),role:"button",tabIndex:-1,onPointerDown:ol(Ee.onPointerDown,lt=>{lt.button!==0||ze||vn(lt)}),onPointerLeave:ol(Ee.onPointerLeave,Le.stop),onPointerUp:ol(Ee.onPointerUp,Le.stop),disabled:ze,"aria-disabled":ew(ze)}},[G.isAtMax,r,vn,Le.stop,l]),Xt=C.exports.useCallback((Ee={},Ot=null)=>{const ze=l||r&&G.isAtMin;return{...Ee,ref:Bn(Ot,Ge),role:"button",tabIndex:-1,onPointerDown:ol(Ee.onPointerDown,lt=>{lt.button!==0||ze||Ie(lt)}),onPointerLeave:ol(Ee.onPointerLeave,Le.stop),onPointerUp:ol(Ee.onPointerUp,Le.stop),disabled:ze,"aria-disabled":ew(ze)}},[G.isAtMin,r,Ie,Le.stop,l]),Yt=C.exports.useCallback((Ee={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:Bn(De,Ot),value:et(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":ew(h??G.isOutOfRange),"aria-valuetext":cn,autoComplete:"off",autoCorrect:"off",onChange:ol(Ee.onChange,st),onKeyDown:ol(Ee.onKeyDown,Xe),onFocus:ol(Ee.onFocus,At,()=>ye(!0)),onBlur:ol(Ee.onBlur,J,Ut)}),[E,m,p,M,T,et,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,cn,st,Xe,At,J,Ut]);return{value:et(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,ES]=wn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ige,Q7]=wn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),J7=Pe(function(t,n){const r=Ii("NumberInput",t),i=mn(t),o=w7(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:hB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});J7.displayName="NumberInput";var pB=Pe(function(t,n){const r=ES();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});pB.displayName="NumberInputStepper";var e8=Pe(function(t,n){const{getInputProps:r}=Q7(),i=r(t,n),o=ES();return le.createElement(we.input,{...i,className:hB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});e8.displayName="NumberInputField";var gB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),t8=Pe(function(t,n){const r=ES(),{getDecrementButtonProps:i}=Q7(),o=i(t,n);return x(gB,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});t8.displayName="NumberDecrementStepper";var n8=Pe(function(t,n){const{getIncrementButtonProps:r}=Q7(),i=r(t,n),o=ES();return x(gB,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});n8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=wn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[uge,n2]=wn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=yF(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(st=>`${st}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=vF({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=SF({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),ke=C.exports.useCallback((st={},At=null)=>{const Xe={...st,style:{...st.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Bn(R,At),children:De?st.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(st.onKeyDown,yt=>{n&&yt.key==="Escape"&&E()}),onBlur:al(st.onBlur,yt=>{const cn=uL(yt),wt=tw(R.current,cn),Ut=tw(I.current,cn);P&&t&&(!wt&&!Ut)&&E()}),"aria-labelledby":$?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(Xe.role="tooltip",Xe.onMouseEnter=al(st.onMouseEnter,()=>{N.current=!0}),Xe.onMouseLeave=al(st.onMouseLeave,yt=>{yt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),Xe},[De,Q,$,K,j,G,u,n,E,P,t,p,l,s]),ct=C.exports.useCallback((st={},At=null)=>X({...st,style:{visibility:P?"visible":"hidden",...st.style}},At),[P,X]),Ge=C.exports.useCallback((st,At=null)=>({...st,ref:Bn(At,M,Z)}),[M,Z]),ot=C.exports.useRef(),Ze=C.exports.useRef(),et=C.exports.useCallback(st=>{M.current==null&&Z(st)},[Z]),Tt=C.exports.useCallback((st={},At=null)=>{const Xe={...st,ref:Bn(I,At,et),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(Xe.onClick=al(st.onClick,T)),u===kp.hover&&(Xe.onFocus=al(st.onFocus,()=>{ot.current===void 0&&_()}),Xe.onBlur=al(st.onBlur,yt=>{const cn=uL(yt),wt=!tw(R.current,cn);P&&t&&wt&&E()}),Xe.onKeyDown=al(st.onKeyDown,yt=>{yt.key==="Escape"&&E()}),Xe.onMouseEnter=al(st.onMouseEnter,()=>{N.current=!0,ot.current=window.setTimeout(()=>_(),h)}),Xe.onMouseLeave=al(st.onMouseLeave,()=>{N.current=!1,ot.current&&(clearTimeout(ot.current),ot.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),Xe},[ie,P,Q,u,et,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{ot.current&&clearTimeout(ot.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((st={},At=null)=>({...st,id:K,ref:Bn(At,Xe=>{W(!!Xe)})}),[K]),Le=C.exports.useCallback((st={},At=null)=>({...st,id:G,ref:Bn(At,Xe=>{de(!!Xe)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:Ge,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:ct,getPopoverProps:ke,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function tw(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function r8(e){const t=Ii("Popover",e),{children:n,...r}=mn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}r8.displayName="Popover";function i8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}i8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(bS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},gge=we(Rl.section),mB=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});mB.displayName="PopoverTransition";var o8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(mB,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});o8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function a8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}a8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function vB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var yB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};yB.displayName="Shape";var NC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});NC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=vB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ne(yB,{size:n,isIndeterminate:v,children:[x(NC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(NC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=wn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=vB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),SB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=mn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},ne(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});SB.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var bB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});bB.displayName="SelectField";var xB=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=mn(e),[w,P]=Age(S,nQ),E=x7(P),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(bB,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(wB,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});xB.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),wB=e=>{const{children:t=x(Lge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};wB.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function CB(e){return!!e.touches}function Rge(e){return CB(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function _B(e,t="page"){return CB(e)?Dge(e,t):zge(e,t)}function Fge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Bge(e,t=!1){function n(i){e(i,{point:_B(i)})}return t?Fge(n):n}function B3(e,t,n,r){return Oge(e,t,Bge(n,t==="pointerdown"),r)}function kB(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:_B(e)},{timestamp:i}=WP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,nw(r,this.history)),this.removeListeners=Vge(B3(this.win,"pointermove",this.onPointerMove),B3(this.win,"pointerup",this.onPointerUp),B3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=nw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=WP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=nw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nw(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Hge(t,.1)}}var Wge=e=>e*1e3;function Hge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Wge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function rw(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return rw(e,t);if(dL(e)&&dL(t)){const n=rw(e.x,t.x),r=rw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function EB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=kB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return B3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function PB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=PB({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},vd=Zge({"../../../react-shim.js"(){}});vd();vd();vd();var Ia=e=>e?"":void 0,S0=e=>e?!0:void 0,yd=(...e)=>e.filter(Boolean).join(" ");vd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}vd();vd();function Qge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var $3={width:0,height:0},By=e=>e||$3;function TB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??$3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>By(w).height>By(P).height?w:P,$3):r.reduce((w,P)=>By(w).width>By(P).width?w:P,$3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...im({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function AB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=AB({isReversed:a,direction:s,orientation:l}),[j,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),ct=(W?De:X).map(We=>G4(We,t,n)),Ge=l==="vertical",ot=C.exports.useRef(null),Ze=C.exports.useRef(null),et=PB({getNodes(){const We=Ze.current,ft=We?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),st=C.exports.useCallback(We=>{var ft;if(!ot.current)return;Se.current.eventSource="pointer";const nt=ot.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ft=We.touches)==null?void 0:ft[0])??We,Qn=Ge?nt.bottom-Zt:Nt-nt.left,lo=Ge?nt.height:nt.width;let gi=Qn/lo;return W&&(gi=1-gi),Iz(gi,t,n)},[Ge,W,n,t]),At=(n-t)/10,Xe=S||(n-t)/100,yt=C.exports.useMemo(()=>({setValueAtIndex(We,ft){if(!Z)return;const nt=Se.current.valueBounds[We];ft=parseFloat(_C(ft,nt.min,Xe)),ft=m0(ft,nt.min,nt.max);const Nt=[...Se.current.value];Nt[We]=ft,de(Nt)},setActiveIndex:G,stepUp(We,ft=Xe){const nt=Se.current.value[We],Nt=W?nt-ft:nt+ft;yt.setValueAtIndex(We,Nt)},stepDown(We,ft=Xe){const nt=Se.current.value[We],Nt=W?nt+ft:nt-ft;yt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[Xe,W,de,Z]),cn=C.exports.useCallback(We=>{const ft=We.key,Nt={ArrowRight:()=>yt.stepUp(K),ArrowUp:()=>yt.stepUp(K),ArrowLeft:()=>yt.stepDown(K),ArrowDown:()=>yt.stepDown(K),PageUp:()=>yt.stepUp(K,At),PageDown:()=>yt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];yt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];yt.setValueAtIndex(K,Zt)}}[ft];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[yt,K,At,ye]),{getThumbStyle:wt,rootStyle:Ut,trackStyle:_n,innerTrackStyle:vn}=C.exports.useMemo(()=>TB({isReversed:W,orientation:l,thumbRects:et,thumbPercents:ct}),[W,l,ct,et]),Ie=C.exports.useCallback(We=>{var ft;const nt=We??K;if(nt!==-1&&M){const Nt=Le.getThumb(nt),Zt=(ft=Ze.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);rd(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=We=>{const ft=st(We)||0,nt=Se.current.value.map(gi=>Math.abs(gi-ft)),Nt=Math.min(...nt);let Zt=nt.indexOf(Nt);const Qn=nt.filter(gi=>gi===Nt);Qn.length>1&&ft>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),yt.setValueAtIndex(Zt,ft),Ie(Zt)},Xt=We=>{if(K==-1)return;const ft=st(We)||0;G(K),yt.setValueAtIndex(K,ft),Ie(K)};EB(Ze,{onPanSessionStart(We){!Z||(J(!0),Je(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ft=null)=>({...We,...R,id:Le.root,ref:Bn(ft,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ia(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),Ee=C.exports.useCallback((We={},ft=null)=>({...We,ref:Bn(ft,ot),id:Le.track,"data-disabled":Ia(h),style:{...We.style,..._n}}),[h,_n,Le]),Ot=C.exports.useCallback((We={},ft=null)=>({...We,ref:ft,id:Le.innerTrack,style:{...We.style,...vn}}),[vn,Le]),ze=C.exports.useCallback((We,ft=null)=>{const{index:nt,...Nt}=We,Zt=X[nt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:ft,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(nt),"data-active":Ia(V&&K===nt),"aria-valuetext":$?.(Zt)??P?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[nt],"aria-labelledby":E?.[nt]?void 0:_?.[nt],style:{...We.style,...wt(nt)},onKeyDown:b0(We.onKeyDown,cn),onFocus:b0(We.onFocus,()=>{Q(!0),G(nt)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,$,P,l,h,p,E,_,wt,cn,Q]),lt=C.exports.useCallback((We={},ft=null)=>({...We,ref:ft,id:Le.output,htmlFor:X.map((nt,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),an=C.exports.useCallback((We,ft=null)=>{const{value:nt,...Nt}=We,Zt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let lo=G4(nt,t,n);lo=W?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ia(h),"data-invalid":Ia(!Zt),"data-highlighted":Ia(Qn),style:{...We.style,...gi}}},[h,W,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ft=null)=>{const{index:nt,...Nt}=We;return{...Nt,ref:ft,id:Le.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(T)?T[nt]:`${T}-${nt}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>ct[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:yt,getRootProps:Yt,getTrackProps:Ee,getInnerTrackProps:Ot,getThumbProps:ze,getMarkerProps:an,getInputProps:Nn,getOutputProps:lt}}function eme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[tme,PS]=wn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[nme,s8]=wn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),LB=Pe(function(t,n){const r=Ii("Slider",t),i=mn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});LB.defaultProps={orientation:"horizontal"};LB.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=PS(),a=s8(),s=r(t,n);return le.createElement(we.div,{...s,className:yd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=PS(),i=s8(),o=r(t,n);return le.createElement(we.div,{...o,className:yd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=PS(),i=s8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=PS(),i=r(t,n);return le.createElement(we.div,{...i,className:yd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";vd();vd();function sme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=AB({isReversed:a,direction:s,orientation:l}),[W,j]=tS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0(W,t,n),te=n-Z+t,he=G4($?te:Z,t,n),ye=l==="vertical",Se=kB({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),ke=C.exports.useRef(null),ct=C.exports.useRef(null),Ge=C.exports.useId(),ot=u??Ge,[Ze,et]=[`slider-thumb-${ot}`,`slider-track-${ot}`],Tt=C.exports.useCallback(ze=>{var lt;if(!De.current)return;const an=Se.current;an.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ft}=((lt=ze.touches)==null?void 0:lt[0])??ze,nt=ye?Nn.bottom-ft:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=nt/Nt;$&&(Zt=1-Zt);let Qn=Iz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(_C(Qn,an.min,an.step))),Qn=m0(Qn,an.min,an.max),Qn},[ye,$,Se]),xt=C.exports.useCallback(ze=>{const lt=Se.current;!lt.isInteractive||(ze=parseFloat(_C(ze,lt.min,G)),ze=m0(ze,lt.min,lt.max),j(ze))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(ze=G){const lt=$?Z-ze:Z+ze;xt(lt)},stepDown(ze=G){const lt=$?Z+ze:Z-ze;xt(lt)},reset(){xt(o||0)},stepTo(ze){xt(ze)}}),[xt,$,Z,G,o]),st=C.exports.useCallback(ze=>{const lt=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(lt.min),End:()=>xt(lt.max)}[ze.key];Nn&&(ze.preventDefault(),ze.stopPropagation(),Nn(ze),lt.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,Xe=Kge(ke),{getThumbStyle:yt,rootStyle:cn,trackStyle:wt,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=Se.current,lt=Xe??{width:0,height:0};return TB({isReversed:$,orientation:ze.orientation,thumbRects:[lt],thumbPercents:[he]})},[$,Xe,he,Se]),_n=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var lt;return(lt=ke.current)==null?void 0:lt.focus()})},[Se]);rd(()=>{const ze=Se.current;_n(),ze.eventSource==="keyboard"&&N?.(ze.value)},[Z,N]);function vn(ze){const lt=Tt(ze);lt!=null&<!==Se.current.value&&j(lt)}EB(ct,{onPanSessionStart(ze){const lt=Se.current;!lt.isInteractive||(V(!0),_n(),vn(ze),R?.(lt.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(V(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||vn(ze)}});const Ie=C.exports.useCallback((ze={},lt=null)=>({...ze,...I,ref:Bn(lt,ct),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ia(J),style:{...ze.style,...cn}}),[I,h,J,cn]),Je=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:Bn(lt,De),id:et,"data-disabled":Ia(h),style:{...ze.style,...wt}}),[h,et,wt]),Xt=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:lt,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:Bn(lt,ke),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ia(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...ze.style,...yt(0)},onKeyDown:b0(ze.onKeyDown,st),onFocus:b0(ze.onFocus,()=>ie(!0)),onBlur:b0(ze.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,yt,st]),Ee=C.exports.useCallback((ze,lt=null)=>{const an=!(ze.valuen),Nn=Z>=ze.value,We=G4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:$?`${100-We}%`:`${We}%`},horizontal:{left:$?`${100-We}%`:`${We}%`}})};return{...ze,ref:lt,role:"presentation","aria-hidden":!0,"data-disabled":Ia(h),"data-invalid":Ia(!an),"data-highlighted":Ia(Nn),style:{...ze.style,...ft}}},[h,$,n,t,l,Z]),Ot=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:lt,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Ie,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:Ee,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t"}),[dme,AS]=wn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),l8=Pe((e,t)=>{const n=Ii("Slider",e),r=mn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:yd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});l8.defaultProps={orientation:"horizontal"};l8.displayName="Slider";var MB=Pe((e,t)=>{const{getThumbProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__thumb",e.className),__css:r.thumb})});MB.displayName="SliderThumb";var OB=Pe((e,t)=>{const{getTrackProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__track",e.className),__css:r.track})});OB.displayName="SliderTrack";var IB=Pe((e,t)=>{const{getInnerTrackProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});IB.displayName="SliderFilledTrack";var DC=Pe((e,t)=>{const{getMarkerProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__marker",e.className),__css:r.mark})});DC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,u8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Mz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});u8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function zC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,RB,pme,gme]=UN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=tS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=wn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=RB(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:zC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Bn(h,e.ref),isDisabled:t,isFocusable:n,onClick:zC(e.onClick,m)}),w="button";return{...S,id:NB(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":DB(a,u),onFocus:t?void 0:zC(e.onFocus,v)}}var[bme,xme]=wn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:DB(n,s),tabId:NB(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=SF({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function _me(){const e=r2(),t=RB(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Cs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function NB(e,t){return`${e}--tab-${t}`}function DB(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=wn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),zB=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});zB.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var FB=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});FB.displayName="TabPanel";var BB=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});BB.displayName="TabPanels";var $B=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});$B.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],WB=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=mn(e),a=x7(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});WB.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function FC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=HB(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function HB(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Dme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Fme(zme);function Fme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Bme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:VB(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=HB(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(ml.getState(),i).position)}}var pL=0;function Bme(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(kz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Pz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Tz,{id:u?.title,children:i}),s&&x(Ez,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function VB(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Wme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=VB(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...FC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...FC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=WN();return C.exports.useMemo(()=>Wme(t.direction,e),[e,t.direction])}var Hme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},UB=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Hme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();rd(()=>{v||r?.()},[v]),rd(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},FC(n,{id:t,onClose:P})))});UB.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=UB,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Rn,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Fg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},BC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=yF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=vF({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),$()},[$]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=BC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=BC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),ke=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>K4(K),"keydown",s?ke:void 0),Uf(()=>K4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const ct=C.exports.useCallback((Ze={},et=null)=>({...Ze,ref:Bn(K,et,W),onPointerEnter:Fg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Fg(Ze.onClick,Se),onPointerDown:Fg(Ze.onPointerDown,De),onFocus:Fg(Ze.onFocus,he),onBlur:Fg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,W]),Ge=C.exports.useCallback((Ze={},et=null)=>j({...Ze,style:{...Ze.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},et),[j,S,w]),ot=C.exports.useCallback((Ze={},et=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:et,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:ct,getTooltipProps:ot,getTooltipPositionerProps:Ge,getArrowProps:V,getArrowInnerProps:de}}var iw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(iw,t),()=>n.removeEventListener(iw,t)},[t,e]),()=>{const n=K4(e),r=BC(e);n.dispatchEvent(new r.CustomEvent(iw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=mn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const $=mQ(i,"colors",E);n[Wr.arrowBg.var]=$}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,_.getTriggerProps($.props,$.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?ne(Rn,{children:[M,x(pd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Rn,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(eF,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:ne(UR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(bF,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return ne(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:c8(e)?2:d8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function GB(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function jB(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function c8(e){return ive&&e instanceof Map}function d8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function f8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qB(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return h8(r,!0)},!0)),e}function Jme(){Ss(2)}function p8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=VC[e];return t||Ss(18,e),t}function eve(e,t){VC[e]||(VC[e]=t)}function $C(){return Mv}function ow(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){WC(e),e.p.forEach(tve),e.p=null}function WC(e){e===Mv&&(Mv=e.l)}function gL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function aw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),Ss(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Z4(t,n,[]),X4(t),t.u&&t.v(t.u,t.s),e!==YB?e:void 0}function Z4(e,t,n){if(p8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Q4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=f8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),Q4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(ad(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(GB(n,r,a),!ad(a))return;e.m=!1}if(wu(i)&&!p8(i)){if(!e.h.F&&e._<1)return;Z4(e,i),t&&t.A.l||Q4(e,i)}}function Q4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&h8(t,n)}function sw(e,t){var n=e[tr];return(n?bf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Rc(e){e.P||(e.P=!0,e.l&&Rc(e.l))}function lw(e){e.o||(e.o=f8(e.t))}function HC(e,t,n){var r=c8(t)?El("MapSet").N(t,n):d8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:$C(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:$C()).p.push(r),r}function nve(e){return ad(e)||Ss(22,e),function t(n){if(!wu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||GB(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f8(e)}function rve(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Rc(s);break;case 4:n(s)&&Rc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!jB(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=El("Patches").$;return ad(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new sve,KB=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(m8)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error($i(12));if(typeof n(void 0,{type:J4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function XB(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function e5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return t5}function i(s,l){r(s)===t5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var hve=function(t,n){return t===n};function pve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;t$.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=t$})(e$);var n$={exports:{}},r$={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var MS=C.exports,Qve=e$.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=MS.useRef,r2e=MS.useEffect,i2e=MS.useMemo,o2e=MS.useDebugValue;r$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=r$})(n$);function a2e(e){e()}let i$=a2e;const s2e=e=>i$=e,l2e=()=>i$,sd=C.exports.createContext(null);function o$(){return C.exports.useContext(sd)}const u2e=()=>{throw new Error("uSES not initialized!")};let a$=u2e;const c2e=e=>{a$=e},d2e=(e,t)=>e===t;function f2e(e=sd){const t=e===sd?o$:()=>C.exports.useContext(e);return function(r,i=d2e){const{store:o,subscription:a,getServerState:s}=t(),l=a$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const h2e=f2e();var p2e={exports:{}},Mn={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var y8=Symbol.for("react.element"),S8=Symbol.for("react.portal"),OS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),RS=Symbol.for("react.profiler"),NS=Symbol.for("react.provider"),DS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),zS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),BS=Symbol.for("react.suspense_list"),$S=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),s$;s$=Symbol.for("react.module.reference");function Ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case y8:switch(e=e.type,e){case OS:case RS:case IS:case FS:case BS:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case DS:case zS:case WS:case $S:case NS:return e;default:return t}}case S8:return t}}}Mn.ContextConsumer=DS;Mn.ContextProvider=NS;Mn.Element=y8;Mn.ForwardRef=zS;Mn.Fragment=OS;Mn.Lazy=WS;Mn.Memo=$S;Mn.Portal=S8;Mn.Profiler=RS;Mn.StrictMode=IS;Mn.Suspense=FS;Mn.SuspenseList=BS;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return Ya(e)===DS};Mn.isContextProvider=function(e){return Ya(e)===NS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===y8};Mn.isForwardRef=function(e){return Ya(e)===zS};Mn.isFragment=function(e){return Ya(e)===OS};Mn.isLazy=function(e){return Ya(e)===WS};Mn.isMemo=function(e){return Ya(e)===$S};Mn.isPortal=function(e){return Ya(e)===S8};Mn.isProfiler=function(e){return Ya(e)===RS};Mn.isStrictMode=function(e){return Ya(e)===IS};Mn.isSuspense=function(e){return Ya(e)===FS};Mn.isSuspenseList=function(e){return Ya(e)===BS};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===OS||e===RS||e===IS||e===FS||e===BS||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===$S||e.$$typeof===NS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===s$||e.getModuleId!==void 0)};Mn.typeOf=Ya;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function y2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||sd).Provider,{value:i,children:n})}function l$(e=sd){const t=e===sd?o$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=l$();function C2e(e=sd){const t=e===sd?w2e:l$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(n$.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var b8="persist:",u$="persist/FLUSH",x8="persist/REHYDRATE",c$="persist/PAUSE",d$="persist/PERSIST",f$="persist/PURGE",h$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:b8).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=O2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:b8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ou(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function z2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var F2e=5e3;function B2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:F2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===d$){var P=!1,E=function(z,$){P||(p.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return ou({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,W){return Promise.resolve($)};z(N,n).then(function($){E($)},function($){E(void 0,$)})},function(N){E(void 0,N)}),ou({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===f$)return s=!0,p.result(I2e(e)),ou({},t(w,p),{_persist:v});if(p.type===u$)return p.result(a&&a.flush()),ou({},t(w,p),{_persist:v});if(p.type===c$)l=!0;else if(p.type===x8){if(s)return ou({},w,{_persist:ou({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=ou({},M,{_persist:ou({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(ou({},R,{_persist:v}))}}function IL(e){return H2e(e)||W2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function W2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function H2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:p$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case h$:return GC({},t,{registry:[].concat(IL(t.registry),[n.key])});case x8:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),GC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=m8(U2e,p$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:h$,key:u})},a=function(u,h,p){var m={type:x8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=GC({},i,{purge:function(){var u=[];return e.dispatch({type:f$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:c$})},persist:function(){e.dispatch({type:d$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var w8={},C8={};C8.__esModule=!0;C8.default=q2e;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function hw(){}var j2e={getItem:hw,setItem:hw,removeItem:hw};function Y2e(e){if((typeof self>"u"?"undefined":H3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}w8.__esModule=!0;w8.default=Z2e;var K2e=X2e(C8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var g$=void 0,Q2e=J2e(w8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");g$=eye;var m$={},v$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var _8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(_8);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=nh,n=_8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths. - - ${JSON.stringify(Z)} - - ${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(te)} - - ${G}`)};e.singleTransformValidator=z;const $=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const W=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=W;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. - - ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(v$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...$,...W,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(m$);const V3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return k8(r)?r:!1},k8=e=>Boolean(typeof e=="string"?tye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),r5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",ke="[object Array]",ct="[object AsyncFunction]",Ge="[object Boolean]",ot="[object Date]",Ze="[object DOMException]",et="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",st="[object Number]",At="[object Null]",Xe="[object Object]",yt="[object Promise]",cn="[object Proxy]",wt="[object RegExp]",Ut="[object Set]",_n="[object String]",vn="[object Symbol]",Ie="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",Ee="[object DataView]",Ot="[object Float32Array]",ze="[object Float64Array]",lt="[object Int8Array]",an="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ft="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),ya=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Nu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),Du=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,zu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qa=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,Ka="\\ud800-\\udfff",zl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",Bl=zl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",yn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ds+No+kn+yn,zo="['\u2019]",zs="["+Ka+"]",Gr="["+Ur+"]",Xa="["+Bl+"]",Td="\\d+",$l="["+_h+"]",Za="["+Fu+"]",Ad="[^"+Ka+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Xa+"|"+mi+")",Eh="[^"+Ka+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",Wl="(?:"+Za+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",Bu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",$u="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+Cr+"]?",Sa="(?:"+Bs+"(?:"+[Eh,Ld,Fs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wt=Wu+Md+Sa,Ph="(?:"+[$l,Ld,Fs].join("|")+")"+Wt,Hu="(?:"+[Eh+Xa+"?",Xa,Ld,Fs,zs].join("|")+")",Vu=RegExp(zo,"g"),Th=RegExp(Xa,"g"),Fo=RegExp(mi+"(?="+mi+")|"+Hu+Wt,"g"),Hn=RegExp([uo+"?"+Za+"+"+Bu+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+$u+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+Bu,uo+"+"+$u,Hl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Bs+Ka+Bl+Cr+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lh=-1,sn={};sn[Ot]=sn[ze]=sn[lt]=sn[an]=sn[Nn]=sn[We]=sn[ft]=sn[nt]=sn[Nt]=!0,sn[De]=sn[ke]=sn[Yt]=sn[Ge]=sn[Ee]=sn[ot]=sn[et]=sn[Tt]=sn[Le]=sn[st]=sn[Xe]=sn[wt]=sn[Ut]=sn[_n]=sn[Je]=!1;var Ht={};Ht[De]=Ht[ke]=Ht[Yt]=Ht[Ee]=Ht[Ge]=Ht[ot]=Ht[Ot]=Ht[ze]=Ht[lt]=Ht[an]=Ht[Nn]=Ht[Le]=Ht[st]=Ht[Xe]=Ht[wt]=Ht[Ut]=Ht[_n]=Ht[vn]=Ht[We]=Ht[ft]=Ht[nt]=Ht[Nt]=!0,Ht[et]=Ht[Tt]=Ht[Je]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,qe=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=fn&&fn.isArrayBuffer,co=fn&&fn.isDate,Gi=fn&&fn.isMap,ba=fn&&fn.isRegExp,$s=fn&&fn.isSet,I1=fn&&fn.isTypedArray;function vi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je-1;);return ve}function Qa(oe,xe){for(var ve=oe.length;ve--&&ju(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var v2=Fd(Mh),Ja=Fd(O1);function Hs(oe){return"\\"+re[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Ul(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function y2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Wo(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve-1}function z2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Ho.prototype.clear=N2,Ho.prototype.delete=D2,Ho.prototype.get=Z1,Ho.prototype.has=Q1,Ho.prototype.set=z2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,B){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,B):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Me=si(c),Ue=Me==Tt||Me==xt;if(bc(c))return Js(c,ee);if(Me==Xe||Me==De||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?mg(c,cc(Y,c)):yo(c,Qe(Y,c))}else{if(!Ht[Me])return D?c:{};Y=nU(c,Me,ee)}}B||(B=new vr);var dt=B.get(c);if(dt)return dt;B.set(c,Y),Jk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,B))}):Zk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,B))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,B))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],B=g[D],Y=c[D];if(Y===n&&!(D in c)||!B(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function dc(c,g,b,L){var D=-1,B=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,_r(b))),L?(B=Oh,Y=!1):g.length>=i&&(B=qu,Y=!1,g=new _a(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(ee)?g>1?Er(ee,g-1,b,L,D):xa(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return Jl(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&en.call(c,g)}function Qh(c,g){return c!=null&&g in ln(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new _a(Y&&_e):n}_e=c[0];var Me=-1,Ue=ee[0];e:for(;++Me-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==B){var B=D;Ql(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+jl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,B=mr(Kd((g-c)/(b||1)),0),Y=ve(B);B--;)Y[L?B:++D]=c,c+=b;return Y}function vc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=jl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Ob(Pk(c,g,xo),c+"")}function ip(c){return uc(mp(c))}function rf(c,g){var b=mp(c);return G2(b,ql(g,0,b.length))}function Xl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,B=g.length,Y=B-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var B=ve(D);++L>>1,Y=c[B];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:H(c);if(Ce)return Hd(Ce);Y=!1,D=qu,ce=new _a}else ce=g?[]:ee;e:for(;++L=L?c:Tr(c,g,b)}var fg=C2||function(c){return mt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=Ju?Ju(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Zl(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,qa.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?ln(Zd.call(c)):{}}function H2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,B=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!B&&c>g||B&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!B&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function V2(c,g,b,L){for(var D=-1,B=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(B-Y,0),_e=ve(ce+Ce),Me=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(B=c.length>3&&typeof B=="function"?(D--,B):n,Y&&Zi(b[0],b[1],Y)&&(B=D<3?n:B,D=1),g=ln(g);++L-1?D[B?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var B=g[L];if(typeof B!="function")throw new yi(a);if(D&&!Y&&be(B)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=B.get(c),_e=B.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Me=-1,Ue=!0,dt=b&w?new _a:n;for(B.set(c,g),B.set(g,c);++Me1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{ -/* [wrapped with `+g+`] */ -`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Ql(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function G2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Bk(c,b)});function $k(c){var g=F(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function j2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(B){return Uh(B,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Ql(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:j2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(B){return g&&!B.length&&B.push(n),B}))});function vG(){return $k(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Ik(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:j2,args:[Ib],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Ib)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Ae(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Ae(g,3))}var PG=vg(Rk),TG=vg(Nk);function AG(c,g){return Er(Y2(c,g),1)}function LG(c,g){return Er(Y2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Er(Y2(c,g),b)}function Wk(c,g){var b=Rt(c)?Vn:ns;return b(c,Ae(g,3))}function Hk(c,g){var b=Rt(c)?fo:Yh;return b(c,Ae(g,3))}var OG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),Q2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&ju(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",B=So(c)?ve(c.length):[];return ns(c,function(Y){B[++L]=D?vi(g,Y,b):rs(Y,g,b)}),B}),NG=dp(function(c,g,b){Uo(c,b,g)});function Y2(c,g){var b=Rt(c)?zn:Sr;return b(c,Ae(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function FG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Ae(g,4),b,D,ns)}function BG(c,g,b){var L=Rt(c)?h2:Ih,D=arguments.length<3;return L(c,Ae(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,X2(Ae(g,3)))}function WG(c){var g=Rt(c)?uc:ip;return g(c)}function HG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?_b:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return Q2(c)?wa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Pr(c).length}function GG(c,g,b){var L=Rt(c)?Uu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Ae(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Er(g,1),[])}),q2=_2||function(){return mt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Nb=_t(function(c,g,b){var L=P;if(b.length){var D=Wo(b,He(Nb));L|=I}return pe(c,L,g,b,D)}),Gk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Wo(b,He(Gk));L|=I}return pe(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,B,Y,ee,ce,Ce=0,_e=!1,Me=!1,Ue=!0;if(typeof c!="function")throw new yi(a);g=Pa(g)||0,sr(b)&&(_e=!!b.leading,Me="maxWait"in b,B=Me?mr(Pa(b.maxWait)||0,g):B,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var ls=L,tu=D;return L=D=n,Ce=Lr,Y=c.apply(tu,ls),Y}function St(Lr){return Ce=Lr,ee=xg(jt,g),_e?dt(Lr):Y}function $t(Lr){var ls=Lr-ce,tu=Lr-Ce,hE=g-ls;return Me?qr(hE,B-tu):hE}function bt(Lr){var ls=Lr-ce,tu=Lr-Ce;return ce===n||ls>=g||ls<0||Me&&tu>=B}function jt(){var Lr=q2();if(bt(Lr))return Jt(Lr);ee=xg(jt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(q2())}function Zo(){var Lr=q2(),ls=bt(Lr);if(L=arguments,D=this,ce=Lr,ls){if(ee===n)return St(ce);if(Me)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Pa(g)||0,b)});function XG(c){return pe(c,$)}function K2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],B=b.cache;if(B.has(D))return B.get(D);var Y=c.apply(this,L);return b.cache=B.set(D,Y)||B,Y};return b.cache=new(K2.Cache||Vo),b}K2.Cache=Vo;function X2(c){if(typeof c!="function")throw new yi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function ZG(c){return Uk(2,c)}var QG=Pb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],_r(Ae())):zn(Er(g,1),_r(Ae()));var b=g.length;return _t(function(L){for(var D=-1,B=qr(L.length,b);++D=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,hj=jr?_r(jr):og;function So(c){return c!=null&&Z2(c.length)&&!Jl(c)}function Ar(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==Ge}var bc=k2||Yb,gj=co?_r(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||bc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function yj(c,g){return hc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?hc(c,g,n,b):!!L}function zb(c){if(!br(c))return!1;var g=oi(c);return g==et||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function Jl(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==ct||g==cn}function Xk(c){return typeof c=="number"&&c==Dt(c)}function Z2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Gi?_r(Gi):Eb;function xj(c,g){return c===g||pc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,pc(c,g,Et(g),b)}function Cj(c){return Qk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&oi(c)==st}function wg(c){if(!br(c)||oi(c)!=Xe)return!1;var g=ec(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Fb=ba?_r(ba):or;function Pj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=$s?_r($s):Ft;function Q2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==_n}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==vn}var gp=I1?_r(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==Je}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return Q2(c)?Ni(c):Ci(c);if(tc&&c[tc])return y2(c[tc]());var g=si(c),b=g==Le?Dh:g==Ut?Hd:mp;return b(c)}function eu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=eu(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?ql(Dt(c),0,X):0}function Pa(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?qe(c.slice(2),b?2:8):_1.test(c)?te:+c}function nE(c){return ka(c,bo(c))}function Ij(c){return c?ql(Dt(c),-G,G):c===0?c:0}function bn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){ka(g,li(g),c);return}for(var b in g)en.call(g,b)&&Gs(c,b,g[b])}),rE=Xi(function(c,g){ka(g,bo(g),c)}),J2=Xi(function(c,g,b,L){ka(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){ka(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=Yl(c);return g==null?b:Qe(b,g)}var Fj=_t(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b1),B}),ka(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return oE(c,X2(Ae(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function oE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Ae(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Wb(bn(c).toLowerCase())}function uE(c){return c=bn(c),c&&c.replace(A1,v2).replace(Th,"")}function mY(c,g,b){c=bn(c),g=Ki(g);var L=c.length;b=b===n?L:ql(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=bn(c),c&&ya.test(c)?c.replace(Os,Ja):c}function yY(c){return c=bn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(jl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;return g&&L>>0,b?(c=bn(c),c&&(typeof g=="string"||g!=null&&!Fb(g))&&(g=Ki(g),!g&&Ul(c))?os(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Wb(g)});function MY(c,g,b){return c=bn(c),b=b==null?0:ql(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=F.templateSettings;b&&Zi(c,g,b)&&(g=n),c=bn(c),g=J2({},g,L,Ne);var D=J2({},g.imports,L.imports,Ne),B=li(D),Y=Wd(D,B),ee,ce,Ce=0,_e=g.interpolate||Rs,Me="__p += '",Ue=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Nu?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` -`;c.replace(Ue,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Me+=c.slice(Ce,Zo).replace(L1,Hs),jt&&(ee=!0,Me+=`' + -__e(`+jt+`) + -'`),Qi&&(ce=!0,Me+=`'; -`+Qi+`; -__p += '`),Jt&&(Me+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),Ce=Zo+bt.length,bt}),Me+=`'; -`;var St=en.call(g,"variable")&&g.variable;if(!St)Me=`with (obj) { -`+Me+` -} -`;else if(x1.test(St))throw new kt(s);Me=(ce?Me.replace(Zt,""):Me).replace(Qn,"$1").replace(lo,"$1;"),Me="function("+(St||"obj")+`) { -`+(St?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Me+`return __p -}`;var $t=dE(function(){return Qt(B,dt+"return "+Me).apply(n,Y)});if($t.source=Me,zb($t))throw $t;return $t}function IY(c){return bn(c).toLowerCase()}function RY(c){return bn(c).toUpperCase()}function NY(c,g,b){if(c=bn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),B=$o(L,D),Y=Qa(L,D)+1;return os(L,B,Y).join("")}function DY(c,g,b){if(c=bn(c),c&&(b||g===n))return c.slice(0,F1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Qa(L,Ni(g))+1;return os(L,0,D).join("")}function zY(c,g,b){if(c=bn(c),c&&(b||g===n))return c.replace(Du,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return os(L,D).join("")}function FY(c,g){var b=W,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=bn(c);var B=c.length;if(Ul(c)){var Y=Ni(c);B=Y.length}if(b>=B)return c;var ee=b-wa(L);if(ee<1)return L;var ce=Y?os(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Fb(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,bn(qa.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Me=Ce.index;ce=ce.slice(0,Me===n?ee:Me)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function BY(c){return c=bn(c),c&&m1.test(c)?c.replace(gi,x2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Wb=hp("toUpperCase");function cE(c,g,b){return c=bn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var dE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return zb(b)?b:new kt(b)}}),WY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Nb(c[b],c))}),c});function HY(c){var g=c==null?0:c.length,b=Ae();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++DG)return[];var b=X,L=qr(c,X);g=Ae(g),c-=X;for(var D=$d(L,g);++b0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=F[L?"take"+(g=="last"?"Right":""):g],B=L||/^find/.test(g);!D||(F.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Me=function(jt){var Jt=D.apply(F,xa([jt],ee));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,St=B&&!Ue,$t=ce&&!dt;if(!B&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:j2,args:[Me],thisArg:n}),new Yi(bt,Ue)}return St&&$t?c.apply(this,ee):(bt=this.thru(Me),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Xu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var B=this.value();return g.apply(Rt(B)?B:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=F[g];if(b){var L=b.name+"";en.call(es,L)||(es[L]=[]),es[L].push({name:g,func:b})}}),es[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=L2,F.prototype.at=mG,F.prototype.chain=vG,F.prototype.commit=yG,F.prototype.next=SG,F.prototype.plant=xG,F.prototype.reverse=wG,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=CG,F.prototype.first=F.prototype.head,tc&&(F.prototype[tc]=bG),F},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Pt._=Ca):mt._=Ca}).call(ys)})(Zr,Zr.exports);const it=Zr.exports;var rye=Object.create,y$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&y$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},S$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?y$(n,"default",{value:e,enumerable:!0}):n,e)),uye=Fe((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),b$=Fe((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),HS=Fe((e,t)=>{var n=b$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=Fe((e,t)=>{var n=HS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),dye=Fe((e,t)=>{var n=HS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=Fe((e,t)=>{var n=HS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=Fe((e,t)=>{var n=HS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),VS=Fe((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=VS();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=Fe((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=Fe((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),x$=Fe((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Tu=Fe((e,t)=>{var n=x$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),E8=Fe((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=Fe((e,t)=>{var n=E8(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=Fe((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),US=Fe((e,t)=>{var n=E8(),r=yye(),i=Sye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),w$=Fe((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),C$=Fe((e,t)=>{var n=US(),r=w$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),bye=Fe((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=Fe((e,t)=>{var n=bye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),_$=Fe((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),wye=Fe((e,t)=>{var n=C$(),r=xye(),i=w$(),o=_$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Cye=Fe((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=Fe((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),P8=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),GS=Fe((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=Fe((e,t)=>{var n=GS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=Fe((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Eye=Fe((e,t)=>{var n=GS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),Pye=Fe((e,t)=>{var n=GS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),Tye=Fe((e,t)=>{var n=GS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Aye=Fe((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Aye(),r=VS(),i=P8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=Fe((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),jS=Fe((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=Fe((e,t)=>{var n=jS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=Fe((e,t)=>{var n=jS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=Fe((e,t)=>{var n=jS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=Fe((e,t)=>{var n=jS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),k$=Fe((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=VS(),r=P8(),i=k$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=VS(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Fye=Fe((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Bye=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=Fe((e,t)=>{var n=k$(),r=Fye(),i=Bye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),E$=Fe((e,t)=>{var n=$ye(),r=Wye(),i=Hye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Gye=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jye=Fe((e,t)=>{var n=E8(),r=Vye(),i=b$(),o=E$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,j,de,V,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!V(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=$.size&&!Q)return!1;var K=J.get(z);if(K)return K==$;j|=u,J.set(z,$);var G=o(ie(z),ie($),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),Yye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),qye=Fe((e,t)=>{var n=Yye(),r=T8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Zye=Fe((e,t)=>{var n=Kye(),r=Xye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Qye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=Fe((e,t)=>{var n=US(),r=YS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=Fe((e,t)=>{var n=Jye(),r=YS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),t3e=Fe((e,t)=>{function n(){return!1}t.exports=n}),P$=Fe((e,t)=>{var n=Tu(),r=t3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),n3e=Fe((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=Fe((e,t)=>{var n=US(),r=T$(),i=YS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[$]=V[W]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=Fe((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=Fe((e,t)=>{var n=x$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),A$=Fe((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=Fe((e,t)=>{var n=Qye(),r=e3e(),i=T8(),o=P$(),a=n3e(),s=A$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=Fe((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),l3e=Fe((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=Fe((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=Fe((e,t)=>{var n=s3e(),r=u3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),d3e=Fe((e,t)=>{var n=C$(),r=T$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=Fe((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=Fe((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=Fe((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=Fe((e,t)=>{var n=g3e(),r=P8(),i=m3e(),o=v3e(),a=y3e(),s=US(),l=_$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=Fe((e,t)=>{var n=zye(),r=E$(),i=jye(),o=p3e(),a=S3e(),s=T8(),l=P$(),u=A$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),$=N?m:a(E),W=z?m:a(_);$=$==p?v:$,W=W==p?v:W;var j=$==v,de=W==v,V=$==W;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,$,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=Fe((e,t)=>{var n=b3e(),r=YS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),L$=Fe((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function pw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return M$(e,["input","textarea","select"])}function M$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function P3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=S$(L$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function gt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!M$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||pw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){NL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&pw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&pw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}S$(L$());var jC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>jC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of jC)r.keys?.every(i=>n.keys?.includes(i))&&jC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const F3e=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),B3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),$3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),W3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),H3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Hi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e))(Hi||{});const V3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},aa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(u8,{className:"invokeai__switch-root",...s})]})})};function A8(){const e=Te(i=>i.system.isGFPGANAvailable),t=Te(i=>i.options.shouldRunFacetool),n=Ke();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(aa,{isDisabled:!e,isChecked:t,onChange:i=>n(rke(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=it.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(hi,{..._,children:ne(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(J7,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(e8,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(n8,{...E,className:"invokeai__number-input-stepper-button"}),x(t8,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Sd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ne(gd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(xB,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],j3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],L8=0,M8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ht(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ht(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),qS=()=>{const e=Ke(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Te(X3e),{isGFPGANAvailable:i}=Te(Z3e),o=l=>e(q3(l)),a=l=>e(fV(l)),s=l=>e(K3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(Sd,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Ke(),t=Te(r=>r.options.shouldFitToWidthHeight);return x(aa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var O$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(O$),Qc=globalThis&&globalThis.__assign||function(){return Qc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function bs(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const ke=it.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String(ke)),l(ke)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return ne(gd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...$,children:r}),ne(qz,{w:"100%",gap:2,children:[ne(l8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Rn,{children:[x(DC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(DC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(OB,{className:"invokeai__slider_track",...j,children:x(IB,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(MB,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(J7,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(e8,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),ne(pB,{...ie,children:[x(n8,{className:"invokeai__slider-number-stepper"}),x(t8,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(vt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(O8,{}),onClick:Se,isDisabled:M,...K})]})]})}function R$(e){const{label:t="Strength",styleClass:n}=e,r=Te(s=>s.options.img2imgStrength),i=Ke();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(x9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(x9(.5))}})}const N$=()=>x(Pu,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Ke(),t=Te(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(aa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(pV(r.target.checked))})})},s4e=()=>{const e=Ke(),t=Te(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(aa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},D$=()=>ne(nn,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),I8=()=>x(Pu,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Ke(),t=Te(r=>r.options.shouldRandomizeSeed);return x(aa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(tke(r.target.checked))})}function u4e(){const e=Te(o=>o.options.seed),t=Te(o=>o.options.shouldRandomizeSeed),n=Te(o=>o.options.shouldGenerateVariations),r=Ke(),i=o=>r(d2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:L8,max:M8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const z$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Ke(),t=Te(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(d2(z$(L8,M8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Ke(),t=Te(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(ake(r)),value:t,isInteger:!1})}function f4e(){const e=Ke(),t=Te(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(K8e(r)),value:t,isInteger:!1})}const R8=()=>ne(nn,{gap:2,direction:"column",children:[x(l4e,{}),ne(nn,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(nn,{gap:2,children:x(d4e,{})}),x(nn,{gap:2,children:x(f4e,{})})]});function N8(){const e=Te(i=>i.system.isESRGANAvailable),t=Te(i=>i.options.shouldRunESRGAN),n=Ke();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(aa,{isDisabled:!e,isChecked:t,onChange:i=>n(nke(i.target.checked))})]})}const h4e=ht(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ht(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),KS=()=>{const e=Ke(),{upscalingLevel:t,upscalingStrength:n}=Te(h4e),{isESRGANAvailable:r}=Te(p4e);return ne("div",{className:"upscale-options",children:[x(Sd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(w9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(C9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Te(r=>r.options.shouldGenerateVariations),t=Ke();return x(aa,{isChecked:e,width:"auto",onChange:r=>t(Z8e(r.target.checked))})}function D8(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(P7,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Te(i=>i.options.seedWeights),t=Te(i=>i.options.shouldGenerateVariations),n=Ke(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(k8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Te(i=>i.options.variationAmount),t=Te(i=>i.options.shouldGenerateVariations),n=Ke();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(ske(i)),isInteger:!1})}const z8=()=>ne(nn,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]}),La=e=>{const{label:t,styleClass:n,...r}=e;return x(Oz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function F8(){const e=Te(r=>r.options.showAdvancedOptions),t=Ke();return x(La,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(ike(r.target.checked)),isChecked:e})}function S4e(){const e=Ke(),t=Te(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(dV(r)),value:t,width:B8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ht(e=>e.options,e=>mb[e.activeTab],{memoizeOptions:{equalityCheck:it.isEqual}}),b4e=ht(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),F$=e=>e.options;function x4e(){const e=Te(i=>i.options.height),t=Te(Rr),n=Ke();return x(Sd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(hV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ht([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function C4e(){const e=Ke(),{iterations:t,mayGenerateMultipleImages:n}=Te(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Y8e(i)),value:t,width:B8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Te(r=>r.options.sampler),t=Ke();return x(Sd,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Ke(),t=Te(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:B8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Te(i=>i.options.width),t=Te(Rr),n=Ke();return x(Sd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const B8="auto";function $8(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),ne("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},B$=LS({name:"system",initialState:P4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:T4e,setIsProcessing:pu,addLogEntry:Co,setShouldShowLogViewer:gw,setIsConnected:FL,setSocketId:UPe,setShouldConfirmOnDelete:$$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:U3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:BL,errorSeen:W$,setModelList:$L,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:F4e,setProcessingIndeterminateTask:B4e}=B$.actions,$4e=B$.reducer;function W4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function H4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function H$(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function V4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function U4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const G4e=ht(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Te(G4e),{text:r}=V3e[t];return n?ne(r8,{trigger:"hover",children:[x(a8,{children:x(Pu,{children:e})}),ne(o8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(i8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=W4e},n)=>x(j4e,{feature:e,children:x(Pu,{ref:n,children:x(va,{as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return ne(zf,{className:"advanced-settings-item",children:[x("h2",{children:ne(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Ff,{className:"advanced-settings-panel",children:r})]})}const W8=e=>{const{accordionInfo:t}=e,n=Te(a=>a.system.openAccordions),r=Ke();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function X4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function Z4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function V$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function U$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function Q4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function J4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function e5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function t5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function n5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function H8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function G$(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function XS(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function r5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function j$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function i5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function o5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function a5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function s5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function l5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function u5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function c5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function d5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function f5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function h5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function p5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function g5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function m5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function v5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function y5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function Y$(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function S5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function b5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function WL(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function q$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function x5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function c1(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function w5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function V8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function C5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function U8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const _5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],G8=e=>e.kind==="line"&&e.layer==="mask",k5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",E5e=e=>e.kind==="line",$n=e=>e.canvas,Au=e=>e.canvas.layerState.stagingArea.images.length>0,K$=e=>e.canvas.layerState.objects.find(i5),X$=ht([e=>e.options,e=>e.system,K$,Rr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(k8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:it.isEqual,resultEqualityCheck:it.isEqual}}),YC=Jr("socketio/generateImage"),P5e=Jr("socketio/runESRGAN"),T5e=Jr("socketio/runFacetool"),A5e=Jr("socketio/deleteImage"),qC=Jr("socketio/requestImages"),HL=Jr("socketio/requestNewImages"),L5e=Jr("socketio/cancelProcessing"),M5e=Jr("socketio/requestSystemConfig"),Z$=Jr("socketio/requestModelChange"),O5e=Jr("socketio/saveStagingAreaImageToGallery"),I5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Q$(e){const{iconButton:t=!1,...n}=e,r=Ke(),{isReady:i}=Te(X$),o=Te(Rr),a=()=>{r(YC(o))};return gt(["ctrl+enter","meta+enter"],()=>{i&&r(YC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(vt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const R5e=ht(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:it.isEqual}});function J$(e){const{...t}=e,n=Ke(),{isProcessing:r,isConnected:i,isCancelable:o}=Te(R5e),a=()=>n(L5e());return gt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(vt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const j8=()=>ne("div",{className:"process-buttons",children:[x(Q$,{}),x(J$,{})]}),N5e=ht([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Y8=()=>{const e=Ke(),{prompt:t,activeTabName:n}=Te(N5e),{isReady:r}=Te(X$),i=C.exports.useRef(null),o=s=>{e(vb(s.target.value))};gt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(YC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(WB,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function eW(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function tW(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function D5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function z5e(e,t){e.classList?e.classList.add(t):D5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function F5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},nW=le.createContext(null);var rW=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",KC="exiting",Lu=function(e){H7(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=KC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this);a&&rW(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[vy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:vy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:KC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=B7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(nW.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Lu.contextType=nW;Lu.propTypes={};function Ep(){}Lu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Lu.UNMOUNTED=sm;Lu.EXITED=xf;Lu.ENTERING=wf;Lu.ENTERED=Ip;Lu.EXITING=KC;const B5e=Lu;var $5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},mw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return F5e(t,r)})},q8=function(e){H7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),W5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),H5e=.999,V5e=.1,U5e=20,Bg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},G5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},oW=LS({name:"canvas",initialState:G5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!G8(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:hl(it.clamp(n.width,64,512),64),height:hl(it.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Bg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(it.clamp(i,64,n/e.stageScale),64),s=hl(it.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=W5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(E5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(i5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Bg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(i5)){const i=Pp(r.width,r.height,512,512,Bg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Bg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Bg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:hl(it.clamp(o,64,512),64),height:hl(it.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:j5e,addLine:aW,addPointToCurrentLine:sW,clearMask:Y5e,commitStagingAreaImage:q5e,discardStagedImages:K5e,fitBoundingBoxToStage:GPe,nextStagingAreaImage:X5e,prevStagingAreaImage:Z5e,redo:Q5e,resetCanvas:lW,resetCanvasInteractionState:J5e,resetCanvasView:eSe,resizeAndScaleCanvas:uW,resizeCanvas:tSe,setBoundingBoxCoordinates:vw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:jPe,setBrushColor:nSe,setBrushSize:yw,setCanvasContainerDimensions:rSe,clearCanvasHistory:cW,setCursorPosition:dW,setDoesCanvasNeedScaling:io,setInitialCanvasImage:K8,setInpaintReplace:jL,setIsDrawing:ZS,setIsMaskEnabled:fW,setIsMouseOverBoundingBox:$y,setIsMoveBoundingBoxKeyHeld:YPe,setIsMoveStageKeyHeld:qPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:Sw,setLayer:hW,setMaskColor:iSe,setMergedCanvas:oSe,setShouldAutoSave:aSe,setShouldCropToBoundingBoxOnSave:sSe,setShouldDarkenOutsideBoundingBox:lSe,setShouldLockBoundingBox:KPe,setShouldPreserveMaskedArea:uSe,setShouldShowBoundingBox:cSe,setShouldShowBrush:XPe,setShouldShowBrushPreview:ZPe,setShouldShowCanvasDebugInfo:dSe,setShouldShowCheckboardTransparency:QPe,setShouldShowGrid:fSe,setShouldShowIntermediates:hSe,setShouldShowStagingImage:pSe,setShouldShowStagingOutline:qL,setShouldSnapToGrid:gSe,setShouldUseInpaintReplace:mSe,setStageCoordinates:pW,setStageDimensions:JPe,setStageScale:vSe,setTool:C0,toggleShouldLockBoundingBox:eTe,toggleTool:tTe,undo:ySe}=oW.actions,SSe=oW.reducer,gW=""+new URL("logo.13003d72.png",import.meta.url).href,bSe=ht(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),X8=e=>{const t=Ke(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Te(bSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;gt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),gt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),gt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(q8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(Q8e(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(eke(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(iW,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(eW,{}):x(tW,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:gW,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function xSe(){const e=Te(n=>n.options.showAdvancedOptions),t={seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})},other:{header:x(N$,{}),feature:Hi.OTHER,options:x(D$,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(R$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(F8,{}),e?x(W8,{accordionInfo:t}):null]})}const Z8=C.exports.createContext(null),wSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(Z8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(V8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},CSe=ht(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),XC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Ke(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Te(CSe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(A5e(e)),o()};gt("delete",()=>{s?i():m()},[e,s]);const v=S=>a($$(!S.target.checked));return ne(Rn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(dB,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:ne(fB,{className:"modal",children:[x(kS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ne(nn,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(u8,{checked:!s,onChange:v})]})})]})}),ne(_S,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Jc=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(r8,{...o,children:[x(a8,{children:t}),ne(o8,{className:`invokeai__popover-content ${r}`,children:[i&&x(i8,{className:"invokeai__popover-arrow"}),n]})]})},_Se=ht([e=>e.system,e=>e.options,e=>e.gallery,Rr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),mW=()=>{const e=Ke(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Te(_Se),m=o2(),v=()=>{!u||(h&&e(ud(!1)),e(c2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};gt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(U8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};gt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u?.metadata&&e(d2(u.metadata.image.seed))};gt("s",()=>{u?.metadata?.image?.seed?(P(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(vb(u.metadata.image.prompt));gt("p",()=>{u?.metadata?.image?.prompt?(E(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(P5e(u))};gt("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(T5e(u))};gt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(bV(!l)),I=()=>{!u||(h&&e(ud(!1)),e(K8(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return gt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ne("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Send to...",icon:x(b5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(WL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(WL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(XS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(j$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(ra,{isAttached:!0,children:[x(vt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(vt,{icon:x(S5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(vt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(ra,{isAttached:!0,children:[x(Jc,{trigger:"hover",triggerComponent:x(vt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(qS,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(Jc,{trigger:"hover",triggerComponent:x(vt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(KS,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(vt,{icon:x(G$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(XC,{image:u,children:x(vt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},kSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},vW=LS({name:"gallery",initialState:kSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:bw,removeImage:yW,setCurrentImage:ESe,addGalleryImages:PSe,setIntermediateImage:TSe,selectNextImage:Q8,selectPrevImage:J8,setShouldPinGallery:ASe,setShouldShowGallery:_0,setGalleryScrollPosition:LSe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:MSe,setShouldHoldGalleryOpen:SW,setShouldAutoSwitchToNewImages:OSe,setCurrentCategory:Wy,setGalleryWidth:ISe}=vW.actions,RSe=vW.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var bW=ut({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:ne(Rn,{children:[x("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function NSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ne(nn,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(NSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(XS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(bW,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),DSe=(e,t)=>e.image.uuid===t.image.uuid,xW=C.exports.memo(({image:e,styleClass:t})=>{const n=Ke();gt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ne(nn,{gap:1,direction:"column",width:"100%",children:[ne(nn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ne(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(bW,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Rn,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(q3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(w9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(C9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:V3(l),onClick:()=>n(vb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(d2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(dV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:r5(h),onClick:()=>n(yV(r5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(pV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(hV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(c2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(x9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&ne(Rn,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,$)=>{if(z.type==="esrgan"){const{scale:W,strength:j}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:W,onClick:()=>n(w9(W))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(C9(j))})]},$)}else if(z.type==="gfpgan"){const{strength:W}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:W,onClick:()=>{n(q3(W)),n(K3("gfpgan"))}})]},$)}else if(z.type==="codeformer"){const{strength:W,fidelity:j}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:W,onClick:()=>{n(q3(W)),n(K3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(fV(j)),n(K3("codeformer"))}})]},$)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(XS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(Vz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},DSe),wW=ht([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function zSe(){const e=Ke(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Te(wW),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(J8())},p=()=>{e(Q8())},m=()=>{e(ud(!0))};return ne("div",{className:"current-image-preview",children:[i&&x(mS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(U$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(xW,{image:i,styleClass:"current-image-metadata"})]})}const FSe=ht([e=>e.gallery,e=>e.options,Rr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),CW=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Te(FSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Rn,{children:[x(mW,{}),x(zSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},BSe=()=>{const e=C.exports.useContext(Z8);return x(vt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(V8,{}),onClick:e||void 0})};function $Se(){const e=Te(i=>i.options.initialImage),t=Ke(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(cV())};return ne(Rn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(BSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(mS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const WSe=()=>{const e=Te(r=>r.options.initialImage),{currentImage:t}=Te(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x($Se,{})}):x(wSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(CW,{})})]})};function HSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var VSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},XSe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],JL="__resizable_base__",_W=function(e){jSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(JL):o.className+=JL,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||YSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return xw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?xw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?xw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Vy(n,M,I),r=Vy(r,R,N)}else n=Vy(n,h,p),r=Vy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&qSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Uy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Uy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Uy(n)?n.touches[0].clientX:n.clientX,h=Uy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=KSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=QL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=QL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=ZL(M,this.props.grid[0]),z=ZL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(GSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return XSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ne(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ZSe(i,...t)]}function ZSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function QSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kW(...e){return t=>e.forEach(n=>QSe(n,t))}function Ga(...e){return C.exports.useCallback(kW(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(ebe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(ZC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(ZC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const ZC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...tbe(r,n.props),ref:kW(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});ZC.displayName="SlotClone";const JSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function ebe(e){return C.exports.isValidElement(e)&&e.type===JSe}function tbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const nbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=nbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function EW(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function PW(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ga(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ga(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const rbe=C.exports.createContext(void 0);function TW(e){const t=C.exports.useContext(rbe);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ibe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const QC="dismissableLayer.update",obe="dismissableLayer.pointerDownOutside",abe="dismissableLayer.focusOutside";let eM;const sbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(sbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ga(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=ube(z=>{const $=z.target,W=[...h.branches].some(j=>j.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=cbe(z=>{const $=z.target;[...h.branches].some(j=>j.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ibe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(eM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),tM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=eM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),tM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(QC,z),()=>document.removeEventListener(QC,z)},[]),C.exports.createElement(Cu.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function ube(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){AW(obe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&AW(abe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tM(){const e=new CustomEvent(QC);document.dispatchEvent(e)}function AW(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?EW(i,o):i.dispatchEvent(o)}let ww=0;function dbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:nM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:nM()),ww++,()=>{ww===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ww--}},[])}function nM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Cw="focusScope.autoFocusOnMount",_w="focusScope.autoFocusOnUnmount",rM={bubbles:!1,cancelable:!0},fbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ga(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){oM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(Cw,rM);s.addEventListener(Cw,u),s.dispatchEvent(E),E.defaultPrevented||(hbe(ybe(LW(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(Cw,u),setTimeout(()=>{const E=new CustomEvent(_w,rM);s.addEventListener(_w,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(_w,h),oM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=pbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function hbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function pbe(e){const t=LW(e),n=iM(t,e),r=iM(t.reverse(),e);return[n,r]}function LW(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iM(e,t){for(const n of e)if(!gbe(n,{upTo:t}))return n}function gbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mbe(e)&&t&&e.select()}}const oM=vbe();function vbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=aM(e,t),e.unshift(t)},remove(t){var n;e=aM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function aM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ybe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Sbe=Bw["useId".toString()]||(()=>{});let bbe=0;function xbe(e){const[t,n]=C.exports.useState(Sbe());return Y0(()=>{e||n(r=>r??String(bbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function QS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function ek(e){return e==="y"?"height":"width"}function sM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=f1(t),l=ek(s),u=r[l]/2-i[l]/2,h=d1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(QS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const wbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=sM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=MW(r),h={x:i,y:o},p=f1(a),m=QS(a),v=ek(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,$=JC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?zEbe[t])}function Pbe(e,t,n){n===void 0&&(n=!1);const r=QS(e),i=f1(e),o=ek(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=l5(a)),{main:a,cross:l5(a)}}const Tbe={start:"end",end:"start"};function uM(e){return e.replace(/start|end/g,t=>Tbe[t])}const Abe=["top","right","bottom","left"];function Lbe(e){const t=l5(e);return[uM(e),t,uM(t)]}const Mbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[l5(a)]:Lbe(a)),_=[a,...E],T=await s5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=Pbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var R,N;const $=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,W=_[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function cM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dM(e){return Abe.some(t=>e[t]>=0)}const Obe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await s5(r,{...n,elementContext:"reference"}),a=cM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=cM(o,i.floating);return{data:{escapedOffsets:a,escaped:dM(a)}}}default:return{}}}}};async function Ibe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=QS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Rbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ibe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function OW(e){return e==="x"?"y":"x"}const Nbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=f1(d1(i)),m=OW(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=JC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=JC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Dbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=f1(i),m=OW(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;vN&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function IW(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Mu(e){if(e==null)return window;if(!IW(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Mu(e).getComputedStyle(e)}function _u(e){return IW(e)?"":e?(e.nodeName||"").toLowerCase():""}function RW(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Mu(e).HTMLElement}function ld(e){return e instanceof Mu(e).Element}function zbe(e){return e instanceof Mu(e).Node}function tk(e){if(typeof ShadowRoot>"u")return!1;const t=Mu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Fbe(e){return["table","td","th"].includes(_u(e))}function NW(e){const t=/firefox/i.test(RW()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function DW(){return!/^((?!chrome|android).)*safari/i.test(RW())}const fM=Math.min,Wm=Math.max,u5=Math.round;function ku(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ml(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=ld(e)?Mu(e):window,p=!DW()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function bd(e){return((zbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function eb(e){return ld(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function zW(e){return ku(bd(e)).left+eb(e).scrollLeft}function Bbe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function $be(e,t,n){const r=Ml(t),i=bd(t),o=ku(e,r&&Bbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||JS(i))&&(a=eb(t)),Ml(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=zW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function FW(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(tk(e)?e.host:null)||bd(e)}function hM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Wbe(e){let t=FW(e);for(tk(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(_u(t));){if(NW(t))return t;t=t.parentNode}return null}function e9(e){const t=Mu(e);let n=hM(e);for(;n&&Fbe(n)&&getComputedStyle(n).position==="static";)n=hM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!NW(n))?t:n||Wbe(e)||t}function pM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Hbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((_u(n)!=="body"||JS(o))&&(a=eb(n)),Ml(n))){const l=ku(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Vbe(e,t){const n=Mu(e),r=bd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=DW();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ube(e){var t;const n=bd(e),r=eb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+zW(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Wm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BW(e){const t=FW(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ml(t)&&JS(t)?t:BW(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=BW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Mu(r),a=i?[o].concat(o.visualViewport||[],JS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Gbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&tk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function jbe(e,t){const n=ku(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function gM(e,t,n){return t==="viewport"?a5(Vbe(e,n)):ld(t)?jbe(t,n):a5(Ube(bd(e)))}function Ybe(e){const t=c5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?e9(e):e;return ld(r)?t.filter(i=>ld(i)&&Gbe(i,r)&&_u(i)!=="body"):[]}function qbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Ybe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=gM(t,h,i);return u.top=Wm(p.top,u.top),u.right=fM(p.right,u.right),u.bottom=fM(p.bottom,u.bottom),u.left=Wm(p.left,u.left),u},gM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Kbe={getClippingRect:qbe,convertOffsetParentRelativeRectToViewportRelativeRect:Hbe,isElement:ld,getDimensions:pM,getOffsetParent:e9,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:$be(t,e9(n),r),floating:{...pM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Xbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ld(e)?c5(e):[],...c5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ld(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?ku(e):null;s&&S();function S(){const w=ku(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Zbe=(e,t,n)=>wbe(e,t,{platform:Kbe,...n});var t9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function n9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!n9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!n9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Qbe(e){const t=C.exports.useRef(e);return t9(()=>{t.current=e}),t}function Jbe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Qbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);n9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Zbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);t9(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);t9(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:P,floating:E}),[u,v,_,P,E])}const exe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?lM({element:t.current,padding:n}).fn(i):{}:t?lM({element:t,padding:n}).fn(i):{}}}};function txe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const $W="Popper",[nk,WW]=a2($W),[nxe,HW]=nk($W),rxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(nxe,{scope:t,anchor:r,onAnchorChange:i},n)},ixe="PopperAnchor",oxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HW(ixe,n),a=C.exports.useRef(null),s=Ga(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,Tn({},i,{ref:s}))}),d5="PopperContent",[axe,nTe]=nk(d5),[sxe,lxe]=nk(d5,{hasParent:!1,positionUpdateFns:new Set}),uxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HW(d5,h),[N,z]=C.exports.useState(null),$=Ga(t,wt=>z(wt)),[W,j]=C.exports.useState(null),de=txe(W),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(dxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:ke,update:ct}=Jbe({strategy:"fixed",placement:ie,whileElementsMounted:Xbe,middleware:[Rbe({mainAxis:m+J,alignmentAxis:S}),M?Nbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Dbe():void 0,...Z}):void 0,W?exe({element:W,padding:w}):void 0,M?Mbe({...Z}):void 0,fxe({arrowWidth:V,arrowHeight:J}),T?Obe({strategy:"referenceHidden"}):void 0].filter(cxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const Ge=ye!==null&&Se!==null,[ot,Ze]=VW(De),et=(i=ke.arrow)===null||i===void 0?void 0:i.x,Tt=(o=ke.arrow)===null||o===void 0?void 0:o.y,xt=((a=ke.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,st]=C.exports.useState();Y0(()=>{N&&st(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:Xe}=lxe(d5,h),yt=!At;C.exports.useLayoutEffect(()=>{if(!yt)return Xe.add(ct),()=>{Xe.delete(ct)}},[yt,Xe,ct]),C.exports.useLayoutEffect(()=>{yt&&Ge&&Array.from(Xe).reverse().forEach(wt=>requestAnimationFrame(wt))},[yt,Ge,Xe]);const cn={"data-side":ot,"data-align":Ze,...I,ref:$,style:{...I.style,animation:Ge?void 0:"none",opacity:(s=ke.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:Ge?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=ke.transformOrigin)===null||l===void 0?void 0:l.x,(u=ke.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(axe,{scope:h,placedSide:ot,onArrowChange:j,arrowX:et,arrowY:Tt,shouldHideArrow:xt},yt?C.exports.createElement(sxe,{scope:h,hasParent:!0,positionUpdateFns:Xe},C.exports.createElement(Cu.div,cn)):C.exports.createElement(Cu.div,cn)))});function cxe(e){return e!==void 0}function dxe(e){return e!==null}const fxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=VW(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function VW(e){const[t,n="center"]=e.split("-");return[t,n]}const hxe=rxe,pxe=oxe,gxe=uxe;function mxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const UW=e=>{const{present:t,children:n}=e,r=vxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ga(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};UW.displayName="Presence";function vxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=mxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=jy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=jy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=jy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=jy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function jy(e){return e?.animationName||"none"}function yxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Sxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function Sxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const kw="rovingFocusGroup.onEntryFocus",bxe={bubbles:!1,cancelable:!0},rk="RovingFocusGroup",[r9,GW,xxe]=PW(rk),[wxe,jW]=a2(rk,[xxe]),[Cxe,_xe]=wxe(rk),kxe=C.exports.forwardRef((e,t)=>C.exports.createElement(r9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(r9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Exe,Tn({},e,{ref:t}))))),Exe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Ga(t,p),v=TW(o),[S=null,w]=yxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=GW(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(kw,_),()=>N.removeEventListener(kw,_)},[_]),C.exports.createElement(Cxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const $=new CustomEvent(kw,bxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(ie=>ie.focusable),j=W.find(ie=>ie.active),de=W.find(ie=>ie.id===S),J=[j,de,...W].filter(Boolean).map(ie=>ie.ref.current);YW(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Pxe="RovingFocusGroupItem",Txe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=xbe(),s=_xe(Pxe,n),l=s.currentTabStopId===a,u=GW(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(r9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Mxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Oxe(w,P+1):w.slice(P+1)}setTimeout(()=>YW(w))}})})))}),Axe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mxe(e,t,n){const r=Lxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Axe[r]}function YW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Oxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Ixe=kxe,Rxe=Txe,Nxe=["Enter"," "],Dxe=["ArrowDown","PageUp","Home"],qW=["ArrowUp","PageDown","End"],zxe=[...Dxe,...qW],tb="Menu",[i9,Fxe,Bxe]=PW(tb),[ph,KW]=a2(tb,[Bxe,WW,jW]),ik=WW(),XW=jW(),[$xe,nb]=ph(tb),[Wxe,ok]=ph(tb),Hxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=ik(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=TW(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(hxe,s,C.exports.createElement($xe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Wxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Vxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ik(n);return C.exports.createElement(pxe,Tn({},i,r,{ref:t}))}),Uxe="MenuPortal",[rTe,Gxe]=ph(Uxe,{forceMount:void 0}),ed="MenuContent",[jxe,ZW]=ph(ed),Yxe=C.exports.forwardRef((e,t)=>{const n=Gxe(ed,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=nb(ed,e.__scopeMenu),a=ok(ed,e.__scopeMenu);return C.exports.createElement(i9.Provider,{scope:e.__scopeMenu},C.exports.createElement(UW,{present:r||o.open},C.exports.createElement(i9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(qxe,Tn({},i,{ref:t})):C.exports.createElement(Kxe,Tn({},i,{ref:t})))))}),qxe=C.exports.forwardRef((e,t)=>{const n=nb(ed,e.__scopeMenu),r=C.exports.useRef(null),i=Ga(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return wF(o)},[]),C.exports.createElement(QW,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Kxe=C.exports.forwardRef((e,t)=>{const n=nb(ed,e.__scopeMenu);return C.exports.createElement(QW,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),QW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=nb(ed,n),P=ok(ed,n),E=ik(n),_=XW(n),T=Fxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ga(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?lB:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=$.current+G,he=T().filter(Ge=>!Ge.disabled),ye=document.activeElement,Se=(Z=he.find(Ge=>Ge.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(Ge=>Ge.textValue),ke=iwe(De,X,Se),ct=(te=he.find(Ge=>Ge.textValue===ke))===null||te===void 0?void 0:te.ref.current;(function Ge(ot){$.current=ot,window.clearTimeout(z.current),ot!==""&&(z.current=window.setTimeout(()=>Ge(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),dbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&awe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(fbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(lbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Ixe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(gxe,Tn({role:"menu","aria-orientation":"vertical","data-state":twe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!zxe.includes(G.key))return;G.preventDefault();const De=T().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);qW.includes(G.key)&&De.reverse(),nwe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,a9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),o9="MenuItem",mM="menu.itemSelect",Xxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ok(o9,e.__scopeMenu),s=ZW(o9,e.__scopeMenu),l=Ga(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(mM,{bubbles:!0,cancelable:!0});p.addEventListener(mM,v=>r?.(v),{once:!0}),EW(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Zxe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Nxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=ZW(o9,n),s=XW(n),l=C.exports.useRef(null),u=Ga(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(i9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Rxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,a9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,a9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),Qxe="MenuRadioGroup";ph(Qxe,{value:void 0,onValueChange:()=>{}});const Jxe="MenuItemIndicator";ph(Jxe,{checked:!1});const ewe="MenuSub";ph(ewe);function twe(e){return e?"open":"closed"}function nwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function iwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=rwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function owe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function awe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return owe(n,t)}function a9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const swe=Hxe,lwe=Vxe,uwe=Yxe,cwe=Xxe,JW="ContextMenu",[dwe,iTe]=a2(JW,[KW]),rb=KW(),[fwe,eH]=dwe(JW),hwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=rb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(fwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(swe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},pwe="ContextMenuTrigger",gwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eH(pwe,n),o=rb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(lwe,Tn({},o,{virtualRef:s})),C.exports.createElement(Cu.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,Yy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,Yy(u)),onPointerCancel:qn(e.onPointerCancel,Yy(u)),onPointerUp:qn(e.onPointerUp,Yy(u))})))}),mwe="ContextMenuContent",vwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eH(mwe,n),o=rb(n),a=C.exports.useRef(!1);return C.exports.createElement(uwe,Tn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=rb(n);return C.exports.createElement(cwe,Tn({},i,r,{ref:t}))});function Yy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Swe=hwe,bwe=gwe,xwe=vwe,gf=ywe,wwe=ht([e=>e.gallery,e=>e.options,Au,Rr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Cwe=ht([e=>e.options,e=>e.gallery,e=>e.system,Rr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),_we=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,kwe=C.exports.memo(e=>{const t=Ke(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Te(Cwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(vb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(d2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ud(!1)),t(c2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ud(!1)),t(K8(s)),t(uW()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(G8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(V8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(Swe,{onOpenChange:$=>{t(SW($))},children:[x(bwe,{children:ne(Pu,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ESe(s)),children:l&&x(va,{width:"50%",height:"50%",as:H8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(XC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(x5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(xwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(XC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},_we),qy=320,vM=40,Ewe={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},yM=400;function tH(){const e=Ke(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Te(wwe);console.log(w);const{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:yM,galleryMaxWidth:yM}:Ewe[u],[M,I]=C.exports.useState(S>=qy),[R,N]=C.exports.useState(!1),[z,$]=C.exports.useState(0),W=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=qy&&I(!1)},[S]);const V=()=>{e(ASe(!i)),e(io(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(io(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(SW(!1)),e(LSe(j.current?j.current.scrollTop:0))},[e]),K=()=>{e(qC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};gt("g",()=>{J()},[o,i]),gt("left",()=>{e(J8())},{enabled:!P},[P]),gt("right",()=>{e(Q8())},{enabled:!P},[P]),gt("shift+g",()=>{V()},[i]),gt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return gt("shift+up",()=>{if(s<256){const he=it.clamp(s+X,32,256);e($g(he))}},[s]),gt("shift+down",()=>{if(s>32){const he=it.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&W.current&&!W.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(iW,{nodeRef:W,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ne("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:W,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[ne(_W,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{$(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const ke=i?it.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(ISe(ke)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(io(!0)))},onResize:(he,ye,Se,De)=>{const ke=it.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));ke>=qy&&!M?I(!0):keke-vM&&e($g(ke-vM)),i&&(ke>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[ne("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?ne(Rn,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):ne(Rn,{children:[x(vt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(vt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(C5e,{}),onClick:()=>e(Wy("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(Jc,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(vt,{size:"sm","aria-label":"Gallery Settings",icon:x(U8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(vt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(O8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(La,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(MSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(La,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(OSe(he.target.checked))})})]})}),x(vt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(eW,{}):x(tW,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?ne(Rn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(kwe,{image:he,isSelected:r===ye},ye)})}),x(Wa,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Pwe=ht([e=>e.options,Rr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ak=e=>{const t=Ke(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Te(Pwe),l=()=>{t(oke(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(HSe,{})})})]}),!a&&x(tH,{})]})})};function Twe(){return x(ak,{optionsPanel:x(xSe,{}),children:x(WSe,{})})}function Awe(){const e=Te(n=>n.options.showAdvancedOptions),t={seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})},other:{header:x(N$,{}),feature:Hi.OTHER,options:x(D$,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(F8,{}),e?x(W8,{accordionInfo:t}):null]})}const Lwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(CW,{})})});function Mwe(){return x(ak,{optionsPanel:x(Awe,{}),children:x(Lwe,{})})}var s9=function(e,t){return s9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},s9(e,t)};function Owe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");s9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=qwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):iH(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function qwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Kwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Xwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},sk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Kwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Xwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=sk(e,t);return e.bounds=n,n};function ib(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=l9(e,s-p,u+p,r),S=l9(t,l-m,h+m,r);return{x:v,y:S}}var l9=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function ob(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=ib(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var bM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ab(o,n);return!l},xM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Zwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},Qwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Jwe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ob(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function e6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=ib(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var t6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},f5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},n6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},r6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function i6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function wM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:l9(e,o,a,i)}function o6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function a6e(e,t){var n=n6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=o6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function s6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=r6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=i6e(e,l),$=Math.max(z,N),W=f5(e,M),j=f5(e,I),de=W*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();iH(e,T,$,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,ke=De/N,ct=nH[S.animationType],Ge=1-ct(Math.min(1,ke)),ot=1-te,Ze=ye+a*ot,et=Se+s*ot,Tt=wM(Ze,G.positionX,ye,_,v,h,u,ie,J,Ge),xt=wM(et,G.positionY,Se,E,v,m,p,K,Q,Ge);(ye!==Ze||Se!==et)&&e.setTransformState(he,Tt,xt)})}}function CM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?Qwe(e,t):Zwe(e,t)}function _M(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=t6e(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);a6e(e,{x:u,y:h}),e6e(e,u,h,p,m)}}function l6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?s6e(e):oH(e)}}function oH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&oH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=lk(e,a,v,S);w&&xd(e,w,h,p)}}function lk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Da(t,2),o,a,0,!1),u=q0(e,l),h=ob(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},u6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Wg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},sH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},kM=function(e){var t=Pl({},Wg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Wg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Wg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Wg[n]),e[n]):s?t[n]=SM(SM([],Wg[n]),e[n]):t[n]=e[n]}}),t},lH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Da(h,3),s,a,u,!1);return p};function uH(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=lH(e,t,n),w=lk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function cH(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=sH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=sk(e,a.scale),m=ib(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||xd(e,v,t,n)}}function c6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=d6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=sk(e,P),R=ib(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function d6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function f6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var h6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uH(e,1,t,n,r)}},p6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uH(e,-1,t,n,r)}},g6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},m6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),cH(e,t,n)}},v6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=dH(t||i.scale,o,a);xd(e,s,n,r)}}},y6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&f6e(a)&&a&&o.contains(a)){var s=c6e(e,a,n);xd(e,s,r,i)}}},Br=function(e){return{instance:e,state:e.transformState,zoomIn:h6e(e),zoomOut:p6e(e),setTransform:g6e(e),resetTransform:m6e(e),centerView:v6e(e),zoomToElement:y6e(e)}},Ew=!1;function Pw(){try{var e={get passive(){return Ew=!0,!1}};return e}catch{return Ew=!1,Ew}}var ab=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},EM=function(e){e&&clearTimeout(e)},S6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},dH=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},b6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ab(u,a);return!p};function x6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Iwe(t,n);return r}function fH(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var w6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Da(v,3),u,l,p,S);return w},C6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},_6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ab(a,i);return!l},k6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},E6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},hH=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},P6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Da(p,2),a,o,l,!u)},T6e=160,A6e=100,L6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Br(e),t,r),ui(Br(e),t,i))},M6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=x6e(t,null),E=w6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=fH(t,o,l),M=S||v===0||h,I=u&&M,R=ob(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Br(e),t,r),ui(Br(e),t,i)}},O6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;EM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(aH(e,t.x,t.y),e.wheelAnimationTimer=null)},A6e);var o=C6e(e,t);o&&(EM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Br(e),t,r),ui(Br(e),t,i))},T6e))},I6e=function(e,t){var n=hH(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},R6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=E6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=hH(t),v=P6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ob(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},N6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,aH(e,t?.x,t?.y)};function D6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return cH(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=lH(e,h,o),m=fH(t,u,l),v=lk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var z6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ab(l,s);return!(p||!h)},pH=le.createContext(u6e),F6e=function(e){Owe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=sH(n.props),n.setup=kM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Pw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=b6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(L6e(n,r),M6e(n,r),O6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=bM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),CM(n,r),ui(Br(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=xM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),_M(n,r.clientX,r.clientY),ui(Br(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(l6e(n),ui(Br(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=_6e(n,r);!l||(I6e(n,r),vl(n),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=k6e(n);!l||(r.preventDefault(),r.stopPropagation(),R6e(n,r),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(N6e(n),ui(Br(n),r,o),ui(Br(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=bM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),CM(n,r),ui(Br(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=xM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];_M(n,s.clientX,s.clientY),ui(Br(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=z6e(n,r);!o||D6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Br(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=dH(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=S6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Br(n))},n}return t.prototype.componentDidMount=function(){var n=Pw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Pw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=kM(this.props))},t.prototype.render=function(){var n=Br(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(pH.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),B6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(F6e,{...Pl({},e,{setRef:i})})});function $6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var W6e=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,PM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};$6e(W6e);var H6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(pH).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+PM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+PM.content+" "+o,style:s,children:t})})};function V6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(B6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Rn,{children:[ne("div",{className:"lightbox-image-options",children:[x(vt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(vt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(vt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(vt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(vt,{icon:x(H4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(vt,{icon:x(O8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(H6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function U6e(){const e=Ke(),t=Te(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Te(wW),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(J8())},p=()=>{e(Q8())};return gt("Esc",()=>{t&&e(ud(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(vt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ud(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(mW,{}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(U$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Rn,{children:[x(V6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(xW,{image:n})]})]}),x(tH,{})]})]})}const G6e=ht($n,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),j6e=()=>{const e=Ke(),{boundingBoxDimensions:t}=Te(G6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return ne("div",{className:"inpainting-bounding-box-settings",children:[x("div",{className:"inpainting-bounding-box-header",children:x("p",{children:"Canvas Bounding Box"})}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})]})},Y6e=ht($n,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Te(Y6e),n=Ke();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(aa,{isChecked:t,onChange:r=>n(mSe(r.target.checked))})]})}function K6e(){return ne(Rn,{children:[x(q6e,{}),x(j6e,{})]})}const X6e=ht([F$],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}}),Z6e=()=>{const e=Ke(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}=Te(X6e);return ne(nn,{direction:"column",gap:"1rem",children:[x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:s=>{e(cO(s))},handleReset:()=>e(cO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:s=>{e(uO(s))},handleReset:()=>{e(uO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:s=>{e(fO(s))},handleReset:()=>{e(fO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:s=>{e(dO(s))},handleReset:()=>{e(dO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:s=>{e(hO(s))},handleReset:()=>{e(hO(32))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(aa,{label:"Force Outpaint",isChecked:a,onChange:s=>{e(X8e(s.target.checked))}})]})},Q6e=()=>x(Pu,{flex:"1",textAlign:"left",children:"Outpainting"});function J6e(){const e=Te(n=>n.options.showAdvancedOptions),t={outpainting:{header:x(Q6e,{}),feature:Hi.OUTPAINTING,options:x(Z6e,{})},seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(R$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(K6e,{}),x(F8,{}),e&&x(W8,{accordionInfo:t})]})}const eCe=ht($n,K$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),tCe=()=>{const e=Ke(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Te(eCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(rSe({width:a,height:s})),e(tSe()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var nCe=Math.PI/180;function rCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},at={_global:k0,version:"8.3.13",isBrowser:rCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return at.angleDeg?e*nCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return at.DD.isDragging},isDragReady(){return!!at.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{at[e.prototype.getClassName()]=e};at._injectGlobal(at);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var iCe="[object Array]",oCe="[object Number]",aCe="[object String]",sCe="[object Boolean]",lCe=Math.PI/180,uCe=180/Math.PI,Tw="#",cCe="",dCe="0",fCe="Konva warning: ",TM="Konva error: ",hCe="rgb(",Aw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},pCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Ky=[];const gCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===iCe},_isNumber(e){return Object.prototype.toString.call(e)===oCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===aCe},_isBoolean(e){return Object.prototype.toString.call(e)===sCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Ky.push(e),Ky.length===1&&gCe(function(){const t=Ky;Ky=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Tw,cCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=dCe+e;return Tw+e},getRGB(e){var t;return e in Aw?(t=Aw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Tw?this._hexToRgb(e.substring(1)):e.substr(0,4)===hCe?(t=pCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Aw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function Be(){if(at.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function mH(e){if(at.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function uk(){if(at.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(at.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function vH(){if(at.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function mCe(){if(at.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(at.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function vCe(e){if(at.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Vg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Hg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Hg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Vg+n,i=Hg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Hg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Vg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function yCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=SCe+u.join(AM)+bCe)):(o+=s.property,t||(o+=kCe+s.val)),o+=CCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=PCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=LM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=yCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,at._mouseListenClick=!1,at._touchListenClick=!1,at._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof at.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};at.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var G3="absoluteOpacity",Zy="allEventListeners",au="absoluteTransform",MM="absoluteScale",Ug="canvas",MCe="Change",OCe="children",ICe="konva",u9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",j3=" ",DM="stage",Pc="transform",RCe="Stage",c9="visible",NCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(j3);let DCe=1;class $e{constructor(t){this._id=DCe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Pc||t===au)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Pc||t===au,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(j3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===au&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new ck({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(G3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==OCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(u9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(c9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!at.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==RCe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Pc),this._clearSelfAndDescendantCache(au)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Pc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Pc),this._clearSelfAndDescendantCache(au),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(G3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():at.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),at[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=at[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return at.pointerEventsEnabled&&Mw.pointer;if(t==="touch")return Mw.touch;if(t==="mouse")return Mw.mouse};function FM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const VCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Y3=[];class ub extends ca{constructor(t){super(FM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Y3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{FM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===FCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&Y3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(VCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+zM,this.content.style.height=n+zM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rWCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),at.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return SH(t,this)}setPointerCapture(t){bH(t,this)}releaseCapture(t){Hm(t)}getLayers(){return this.children}_bindContentEvents(){!at.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||at.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,at["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;at.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||at.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Lw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Lw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;at["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(at["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){at["_"+r+"InDblClickWindow"]=!1},at.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),at["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,at["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),at["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(d9,{evt:t}):this._fire(d9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(f9,{evt:t}):this._fire(f9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Lw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,dk(t)),Hm(t.pointerId)}_lostpointercapture(t){Hm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new ck({pixelRatio:1,width:this.width(),height:this.height()}),!!at.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ub.prototype.nodeType=zCe;pr(ub);q.addGetterSetter(ub,"container");var MH="hasShadow",OH="shadowRGBA",IH="patternImage",RH="linearGradient",NH="radialGradient";let n3;function Ow(){return n3||(n3=fe.createCanvasElement().getContext("2d"),n3)}const Vm={};function UCe(e){e.fill()}function GCe(e){e.stroke()}function jCe(e){e.fill()}function YCe(e){e.stroke()}function qCe(){this._clearCache(MH)}function KCe(){this._clearCache(OH)}function XCe(){this._clearCache(IH)}function ZCe(){this._clearCache(RH)}function QCe(){this._clearCache(NH)}class Oe extends $e{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(MH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(IH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Ow();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(at.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(RH,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Ow(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Vm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return SH(t,this)}setPointerCapture(t){bH(t,this)}releaseCapture(t){Hm(t)}}Oe.prototype._fillFunc=UCe;Oe.prototype._strokeFunc=GCe;Oe.prototype._fillFuncHit=jCe;Oe.prototype._strokeFuncHit=YCe;Oe.prototype._centroid=!1;Oe.prototype.nodeType="Shape";pr(Oe);Oe.prototype.eventListeners={};Oe.prototype.on.call(Oe.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Oe.prototype.on.call(Oe.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",KCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",XCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",ZCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",QCe);q.addGetterSetter(Oe,"stroke",void 0,vH());q.addGetterSetter(Oe,"strokeWidth",2,Be());q.addGetterSetter(Oe,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Oe,"hitStrokeWidth","auto",uk());q.addGetterSetter(Oe,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Oe,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Oe,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Oe,"lineJoin");q.addGetterSetter(Oe,"lineCap");q.addGetterSetter(Oe,"sceneFunc");q.addGetterSetter(Oe,"hitFunc");q.addGetterSetter(Oe,"dash");q.addGetterSetter(Oe,"dashOffset",0,Be());q.addGetterSetter(Oe,"shadowColor",void 0,h1());q.addGetterSetter(Oe,"shadowBlur",0,Be());q.addGetterSetter(Oe,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Oe,"shadowOffset",["x","y"]);q.addGetterSetter(Oe,"shadowOffsetX",0,Be());q.addGetterSetter(Oe,"shadowOffsetY",0,Be());q.addGetterSetter(Oe,"fillPatternImage");q.addGetterSetter(Oe,"fill",void 0,vH());q.addGetterSetter(Oe,"fillPatternX",0,Be());q.addGetterSetter(Oe,"fillPatternY",0,Be());q.addGetterSetter(Oe,"fillLinearGradientColorStops");q.addGetterSetter(Oe,"strokeLinearGradientColorStops");q.addGetterSetter(Oe,"fillRadialGradientStartRadius",0);q.addGetterSetter(Oe,"fillRadialGradientEndRadius",0);q.addGetterSetter(Oe,"fillRadialGradientColorStops");q.addGetterSetter(Oe,"fillPatternRepeat","repeat");q.addGetterSetter(Oe,"fillEnabled",!0);q.addGetterSetter(Oe,"strokeEnabled",!0);q.addGetterSetter(Oe,"shadowEnabled",!0);q.addGetterSetter(Oe,"dashEnabled",!0);q.addGetterSetter(Oe,"strokeScaleEnabled",!0);q.addGetterSetter(Oe,"fillPriority","color");q.addComponentsGetterSetter(Oe,"fillPatternOffset",["x","y"]);q.addGetterSetter(Oe,"fillPatternOffsetX",0,Be());q.addGetterSetter(Oe,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Oe,"fillPatternScale",["x","y"]);q.addGetterSetter(Oe,"fillPatternScaleX",1,Be());q.addGetterSetter(Oe,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Oe,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Oe,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Oe,"fillLinearGradientStartPointX",0);q.addGetterSetter(Oe,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Oe,"fillLinearGradientStartPointY",0);q.addGetterSetter(Oe,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Oe,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Oe,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Oe,"fillLinearGradientEndPointX",0);q.addGetterSetter(Oe,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Oe,"fillLinearGradientEndPointY",0);q.addGetterSetter(Oe,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Oe,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Oe,"fillRadialGradientStartPointX",0);q.addGetterSetter(Oe,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Oe,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Oe,"fillRadialGradientEndPointX",0);q.addGetterSetter(Oe,"fillRadialGradientEndPointY",0);q.addGetterSetter(Oe,"fillPatternRotation",0);q.backCompat(Oe,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var JCe="#",e9e="beforeDraw",t9e="draw",DH=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],n9e=DH.length;class gh extends ca{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new ck({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(e9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(t9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class fk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}fk.prototype.nodeType="FastLayer";pr(fk);class K0 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Iw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Iw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=BM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$M,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===BM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=i9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=o9e++;var u=r.getLayer()||(r instanceof at.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new a9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)r9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Um={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Ou.prototype._centroid=!0;Ou.prototype.className="Arc";Ou.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Ou);q.addGetterSetter(Ou,"innerRadius",0,Be());q.addGetterSetter(Ou,"outerRadius",0,Be());q.addGetterSetter(Ou,"angle",0,Be());q.addGetterSetter(Ou,"clockwise",!1,Ls());function h9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function HM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,$,W,j,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+Q,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,W,j);break;case"a":$=S.shift(),W=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,W,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,j){return(W[0]*j[0]+W[1]*j[1])/(T(W)*T(j))},I=function(W,j){return(W[0]*j[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,_,s,l,R,$,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Iu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Oe{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Oe{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var zH=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],s9e="Change.konva",l9e="none",p9="up",g9="right",m9="down",v9="left",u9e=zH.length;class hk extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var VM=Math.PI*2;class Sh extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,VM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),VM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class Dl extends Oe{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var i3;function Nw(){return i3||(i3=fe.createCanvasElement().getContext(f9e),i3)}function C9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function k9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Oe{constructor(t){super(k9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(h9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Nw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+r3+this.fontVariant()+r3+(this.fontSize()+v9e)+w9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Nw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==b9e&&S,P=this.ellipsis();this.textArr=[],Nw().font=this._getContextFont();for(var E=P?this._getTextWidth(Rw):0,_=0,T=t.length;_h)for(;M.length>0;){for(var R=0,N=M.length,z="",$=0;R>>1,j=M.slice(0,W+1),de=this._getTextWidth(j)+E;de<=h?(R=W+1,z=j,$=de):N=W}if(z){if(w){var V,J=M[z.length],ie=J===r3||J===UM;ie&&$<=h?V=z.length:V=Math.max(z.lastIndexOf(r3),z.lastIndexOf(UM))+1,V>0&&(R=V,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==jM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Rw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=FH(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${GH}`).join(" "),YM="nodesRect",T9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],A9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const L9e="ontouchstart"in at._global;function M9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(A9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var h5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],qM=1e8;function O9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function jH(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function I9e(e,t){const n=O9e(e);return jH(e,t,n)}function R9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(T9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(YM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(YM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(at.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return jH(h,-at.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-qM,y:-qM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-at.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:at.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),h5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new u2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:L9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=at.getAngle(this.rotation()),o=M9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Oe({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=at.getAngle(this.rotation());const V=m+de,J=at.getAngle(this.rotationSnapTolerance()),Q=R9e(this.rotationSnaps(),V,J)-p.rotation,K=I9e(p,Q);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(at.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function N9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){h5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+h5.join(", "))}),e||[]}Cn.prototype.className="Transformer";pr(Cn);q.addGetterSetter(Cn,"enabledAnchors",h5,N9e);q.addGetterSetter(Cn,"flipEnabled",!0,Ls());q.addGetterSetter(Cn,"resizeEnabled",!0);q.addGetterSetter(Cn,"anchorSize",10,Be());q.addGetterSetter(Cn,"rotateEnabled",!0);q.addGetterSetter(Cn,"rotationSnaps",[]);q.addGetterSetter(Cn,"rotateAnchorOffset",50,Be());q.addGetterSetter(Cn,"rotationSnapTolerance",5,Be());q.addGetterSetter(Cn,"borderEnabled",!0);q.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(Cn,"anchorStrokeWidth",1,Be());q.addGetterSetter(Cn,"anchorFill","white");q.addGetterSetter(Cn,"anchorCornerRadius",0,Be());q.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(Cn,"borderStrokeWidth",1,Be());q.addGetterSetter(Cn,"borderDash");q.addGetterSetter(Cn,"keepRatio",!0);q.addGetterSetter(Cn,"centeredScaling",!1);q.addGetterSetter(Cn,"ignoreStroke",!1);q.addGetterSetter(Cn,"padding",0,Be());q.addGetterSetter(Cn,"node");q.addGetterSetter(Cn,"nodes");q.addGetterSetter(Cn,"boundBoxFunc");q.addGetterSetter(Cn,"anchorDragBoundFunc");q.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(Cn,"useSingleNodeRotation",!0);q.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ru extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,at.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ru.prototype.className="Wedge";Ru.prototype._centroid=!0;Ru.prototype._attrsAffectingSize=["radius"];pr(Ru);q.addGetterSetter(Ru,"radius",0,Be());q.addGetterSetter(Ru,"angle",0,Be());q.addGetterSetter(Ru,"clockwise",!1);q.backCompat(Ru,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var D9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],z9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function F9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,$,W,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new KM,Z=null,te=G,X=null,he=null,ye=D9e[t],Se=z9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)0&&F9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Be(),q.afterSetFilter);const $9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Be(),q.afterSetFilter);const H9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,$=I>0?I:-I;if(z>N&&(R=M),$>N&&(R=I),R*=t,i){var W=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=W>255?255:W<0?0:W,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter($e,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Dw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const V9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mE?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,$,W;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function n_e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Be(),q.afterSetFilter);const a_e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,gH,q.afterSetFilter);const l_e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,gH,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const u_e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},d_e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[H]!==O[se]){var pe=` -`+A[H].replace(" at new "," at ");return d.displayName&&pe.includes("")&&(pe=pe.replace("",d.displayName)),pe}while(1<=H&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function yn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Xa(){kn(Ur),kn(Cr)}function Td(d,f,y){if(Cr.current!==Do)throw Error(a(168));yn(Cr,f),yn(Ur,y)}function $l(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Za(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,yn(Cr,d),yn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=$l(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(Cr),yn(Cr,d)):kn(Ur),yn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Fs=64,uo=4194304;function Bs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~A;se!==0?k=Bs(se):(O&=H,O!==0&&(k=Bs(O)))}else H=y&~A,H!==0?k=Bs(H):O!==0&&(k=Bs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0y;y++)f.push(d);return f}function Sa(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0>=H,A-=H,Gi=1<<32-mi(f)+A|y<Bt?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Bt],He);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Bt===be.length)return y(me,Et),Dn&&$s(me,Bt),Ae;if(Et===null){for(;BtBt?(zr=Et,Et=null):zr=Et.sibling;var as=Ye(me,Et,qt.value,He);if(as===null){Et===null&&(Et=zr);break}d&&Et&&as.alternate===null&&f(me,Et),ue=O(as,ue,Bt),Mt===null?Ae=as:Mt.sibling=as,Mt=as,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Bt),Ae;if(Et===null){for(;!qt.done;Bt++,qt=be.next())qt=Lt(me,qt.value,He),qt!==null&&(ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Bt),Ae}for(Et=k(me,Et);!qt.done;Bt++,qt=be.next())qt=Fn(Et,me,Bt,qt.value,He),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Bt:qt.key),ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Bt),Ae}function qo(me,ue,be,He){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Ae=be.key,Mt=ue;Mt!==null;){if(Mt.key===Ae){if(Ae=be.type,Ae===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===T&&F1(Ae)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=wa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,He,be.key),ue.return=me,me=ue):(He=sf(be.type,be.key,be.props,null,me.mode,He),He.ref=wa(me,ue,be),He.return=me,me=He)}return H(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,He),ue.return=me,me=ue}return H(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),He)}if(ie(be))return En(me,ue,be,He);if(R(be))return er(me,ue,be,He);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,He),ue.return=me,me=ue),H(me)):y(me,ue)}return qo}var Ku=x2(!0),w2=x2(!1),Vd={},po=No(Vd),Ca=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){yn(oe,f),yn(Ca,d),yn(po,Vd),d=K(f),kn(po),yn(po,d)}function je(){kn(po),kn(Ca),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(yn(Ca,d),yn(po,f))}function Qt(d){Ca.current===d&&(kn(po),kn(Ca))}var It=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Du(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function B1(){for(var d=0;dy?y:4,d(!0);var k=Xu.transition;Xu.transition={};try{d(!1),f()}finally{Wt=y,Xu.transition=k}}function rc(){return Si().memoizedState}function Y1(d,f,y){var k=Tr(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},oc(d))ac(f,y);else if(y=qu(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function ic(d,f,y){var k=Tr(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(oc(d))ac(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var H=f.lastRenderedState,se=O(H,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,H)){var pe=f.interleaved;pe===null?(A.next=A,Wd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=qu(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function oc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function ac(d,f){Gd=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Hl(d,y)}}var es={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},Sb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:k2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,jl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return jl(4194308,4,d,f)},useInsertionEffect:function(d,f){return jl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=Y1.bind(null,Sn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:_2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=_2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=Sn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Gl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,k2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,tc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=ba,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Zu++,0rp&&(f.flags|=128,k=!0,uc(A,!1),f.lanes=4194304)}else{if(!k)if(d=ln(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),uc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Hn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,uc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Hn(),f.sibling=null,d=It.current,yn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return yc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),et&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Xa(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(Cr),B1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Gu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return yc(),null;case 24:return null;default:return null}}var Gs=!1,kr=!1,kb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function cc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function ql(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,A=y.memoizedState,O=d.stateNode,H=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Bo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=H}break;case 3:et&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&Xe(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function dc(d){return d.tag===5||d.tag===3||d.tag===4}function ns(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||dc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):Ee(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||cc(y,f);case 6:if(et){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?nt(yr,y.stateNode):ft(yr,y.stateNode))}else jo(d,f,y);break;case 18:et&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:et?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=ya(k),Nu(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,H=O.destroy;O=O.tag,H!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,H),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!kr&&(cc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(k=kr)||y.memoizedState!==null,jo(d,f,y),kr=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new kb),f.forEach(function(k){var A=V2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case fc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function hc(d,f){var y=[];d=[d,0];for(var k=0;kA&&(A=H),k&=~O}if(k=A,k=Hn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*Eb(k/1960))-k,10d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Ft&6)!==0)throw Error(a(331));var A=Ft;for(Ft|=4,Qe=d.current;Qe!==null;){var O=Qe,H=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;peHn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(Sa(d,f,y),Kr(d,y))}function Tb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function V2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,Cb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;_a(d,f),d=f.pendingProps;var A=zs(f,Cr.current);Yu(f,y),A=W1(null,f,k,d,A,y);var O=Qu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Za(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Wo,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Ho(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Bo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=R2(null,f,k,d,y);break e;case 11:f=L2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Bo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),R2(d,f,k,A,y);case 3:e:{if(N2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,v2(d,f),Nh(f,k,null,y);var H=f.memoizedState;if(k=H.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=sc(Error(a(423)),f),f=D2(d,f,k,y,A);break e}else if(k!==A){A=sc(Error(a(424)),f),f=D2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=w2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Gu(),k===A){f=ts(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,H=A.children,De(k,A)?H=null:O!==null&&De(k,O)&&(f.flags|=32),I2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return z2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Ku(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),L2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,H=A.value,m2(f,k,H),O!==null)if(U(O.value,H)){if(O.children===A.children&&!Ur.current){f=ts(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){H=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Ja(-1,y&-y),pe.tag=2;var Ne=O.updateQueue;if(Ne!==null){Ne=Ne.shared;var tt=Ne.pending;tt===null?pe.next=pe:(pe.next=tt.next,tt.next=pe),Ne.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)H=O.type===f.type?null:O.child;else if(O.tag===18){if(H=O.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),$d(H,y,f),H=O.sibling}else H=O.child;if(H!==null)H.return=O;else for(H=O;H!==null;){if(H===f){H=null;break}if(O=H.sibling,O!==null){O.return=H.return,H=O;break}H=H.return}O=H}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,Yu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Bo(k,f.pendingProps),A=Bo(k.type,A),Us(d,f,k,A,y);case 15:return M2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),_a(d,f),f.tag=1,Gr(k)?(d=!0,Za(f)):d=!1,Yu(f,y),S2(f,k,A),z1(f,k,A,y),Ho(null,f,k,!0,d,y);case 19:return B2(d,f,y);case 22:return O2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Hu(d,f)}function ka(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,k){return new ka(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,k,A,O){var H=2;if(k=d,typeof d=="function")mg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:H=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case S:H=9;break e;case w:H=11;break e;case _:H=14;break e;case T:H=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ot,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function U2(d,f,y,k,A,O,H,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return $l(d,y,f)}return f}function yg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&O>=Lt&&A<=tt&&H<=Ye){d.splice(f,1);break}else if(k!==Ne||y.width!==pe.width||YeH){if(!(O!==Lt||y.height!==pe.height||ttA)){Ne>k&&(pe.width+=Ne-k,pe.x=k),ttO&&(pe.height+=Lt-O,pe.y=O),Yey&&(y=H)),H ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return Q(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||Sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Ht=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!wt)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Wt;try{return Wt=d,f()}finally{Wt=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),H=Tr(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Ja(O,H),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Hs(A,f,H),d!==null&&(vo(d,A,H,O),Rh(d,A,H)),H},n};(function(e){e.exports=f_e})(YH);const h_e=D9(YH.exports);var pk={exports:{}},bh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(pk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const gk=".react-konva-event",p_e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,g_e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,m_e={};function cb(e,t,n=m_e){if(!ZM&&"zIndex"in t&&(console.warn(g_e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(p_e),QM=!0)}for(var o in n)if(!XM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!XM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+gk,v[l])}function kd(e){if(!at.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const qH={},v_e={};rh.Node.prototype._applyProps=cb;function y_e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function S_e(e,t,n){let r=rh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=rh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return cb(l,o),l}function b_e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function x_e(e,t,n){return!1}function w_e(e){return e}function C_e(){return null}function __e(){return null}function k_e(e,t,n,r){return v_e}function E_e(){}function P_e(e){}function T_e(e,t){return!1}function A_e(){return qH}function L_e(){return qH}const M_e=setTimeout,O_e=clearTimeout,I_e=-1;function R_e(e,t){return!1}const N_e=!1,D_e=!0,z_e=!0;function F_e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function B_e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function KH(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function $_e(e,t,n){KH(e,t,n)}function W_e(e,t){t.destroy(),t.off(gk),kd(e)}function H_e(e,t){t.destroy(),t.off(gk),kd(e)}function V_e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function U_e(e,t,n){}function G_e(e,t,n,r,i){cb(e,i,r)}function j_e(e){e.hide(),kd(e)}function Y_e(e){}function q_e(e,t){(t.visible==null||t.visible)&&e.show()}function K_e(e,t){}function X_e(e){}function Z_e(){}const Q_e=()=>pk.exports.DefaultEventPriority,J_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:y_e,createInstance:S_e,createTextInstance:b_e,finalizeInitialChildren:x_e,getPublicInstance:w_e,prepareForCommit:C_e,preparePortalMount:__e,prepareUpdate:k_e,resetAfterCommit:E_e,resetTextContent:P_e,shouldDeprioritizeSubtree:T_e,getRootHostContext:A_e,getChildHostContext:L_e,scheduleTimeout:M_e,cancelTimeout:O_e,noTimeout:I_e,shouldSetTextContent:R_e,isPrimaryRenderer:N_e,warnsIfNotActing:D_e,supportsMutation:z_e,appendChild:F_e,appendChildToContainer:B_e,insertBefore:KH,insertInContainerBefore:$_e,removeChild:W_e,removeChildFromContainer:H_e,commitTextUpdate:V_e,commitMount:U_e,commitUpdate:G_e,hideInstance:j_e,hideTextInstance:Y_e,unhideInstance:q_e,unhideTextInstance:K_e,clearContainer:X_e,detachDeletedInstance:Z_e,getCurrentEventPriority:Q_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var e7e=Object.defineProperty,t7e=Object.defineProperties,n7e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,r7e=Object.prototype.hasOwnProperty,i7e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?e7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))r7e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))i7e.call(t,n)&&eO(e,n,t[n]);return e},o7e=(e,t)=>t7e(e,n7e(t));function mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function XH(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const vk=XH(C.exports.createContext(null));class ZH extends C.exports.Component{render(){return x(vk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:a7e,ReactCurrentDispatcher:s7e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function l7e(){const e=C.exports.useContext(vk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=a7e.current)!=null?r:mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],nO=new WeakMap;function u7e(){var e;const t=l7e();qg.splice(0,qg.length),mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==vk&&qg.push(XH(i))});for(const n of qg){const r=(e=s7e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,o7e(tO({},i),{value:nO.get(r)}))),n=>x(ZH,{...tO({},n)})),[])}function c7e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const d7e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=c7e(e),o=u7e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,pk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),cb(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},a3="Layer",ih="Group",P0="Rect",Kg="Circle",p5="Line",QH="Image",f7e="Transformer",pm=h_e(J_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const h7e=le.forwardRef((e,t)=>x(ZH,{children:x(d7e,{...e,forwardedRef:t})})),p7e=ht([$n],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),g7e=e=>{const{...t}=e,{objects:n}=Te(p7e);return x(ih,{listening:!1,...t,children:n.filter(G8).map((r,i)=>x(p5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},db=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},m7e=ht($n,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:db(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),v7e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Te(m7e);return l?ne(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},y7e=ht($n,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),S7e=e=>{const{...t}=e,n=Ke(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Te(y7e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(vw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(vw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(vw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(Sw(!0))},z=()=>{n(Sw(!1)),n($y(!1))},$=()=>{n(YL(!0))},W=()=>{n(Sw(!1)),n(YL(!1)),n($y(!1))},j=()=>{n($y(!0))},de=()=>{!u&&!l&&n($y(!1))};return ne(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:j,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(f7e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:W,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let JH=null,eV=null;const b7e=e=>{JH=e},g5=()=>JH,x7e=e=>{eV=e},w7e=()=>eV,C7e=ht([$n,Rr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),_7e=()=>{const e=Ke(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Te(C7e),i=C.exports.useRef(null),o=w7e();gt("esc",()=>{e(J5e())},{enabled:()=>!0,preventDefault:!0}),gt("shift+h",()=>{e(cSe(!n))},{preventDefault:!0},[t,n]),gt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},k7e=ht($n,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:db(t)}}),rO=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),E7e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Te(k7e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=rO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=rO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},P7e=ht([$n],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),T7e=e=>{const t=Ke(),{isMoveStageKeyHeld:n,stageScale:r}=Te(P7e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=it.clamp(r*H5e**s,V5e,U5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(vSe(l)),t(pW(u))},[e,n,r,t])},fb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},A7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),L7e=e=>{const t=Ke(),{tool:n,isStaging:r}=Te(A7e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=fb(e.current);!o||(i.evt.preventDefault(),t(ZS(!0)),t(aW([o.x,o.y])))},[e,n,r,t])},M7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),O7e=(e,t)=>{const n=Ke(),{tool:r,isDrawing:i,isStaging:o}=Te(M7e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=fb(e.current);if(!a)return;n(sW([a.x,a.y]))}else t.current=!1;n(ZS(!1))},[t,n,i,o,e,r])},I7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),R7e=(e,t,n)=>{const r=Ke(),{isDrawing:i,tool:o,isStaging:a}=Te(I7e);return C.exports.useCallback(()=>{if(!e.current)return;const s=fb(e.current);!s||(r(dW(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(sW([s.x,s.y]))))},[t,r,i,a,n,e,o])},N7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),D7e=e=>{const t=Ke(),{tool:n,isStaging:r}=Te(N7e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=fb(e.current);!o||n==="move"||r||(t(ZS(!0)),t(aW([o.x,o.y])))},[e,n,r,t])},z7e=()=>{const e=Ke();return C.exports.useCallback(()=>{e(dW(null)),e(ZS(!1))},[e])},F7e=ht([$n,Au],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),B7e=()=>{const e=Ke(),{tool:t,isStaging:n}=Te(F7e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(pW(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var mf=C.exports,$7e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const tV=e=>{const{url:t,x:n,y:r}=e,[i]=$7e(t);return x(QH,{x:n,y:r,image:i,listening:!1})},W7e=ht([$n],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),H7e=()=>{const{objects:e}=Te(W7e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(tV,{x:t.x,y:t.y,url:t.image.url},n);if(k5e(t))return x(p5,{points:t.points,stroke:t.color?db(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},V7e=ht([$n],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),U7e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},G7e=()=>{const{colorMode:e}=Wv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Te(V7e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=U7e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=it.range(0,T).map(N=>x(p5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=it.range(0,M).map(N=>x(p5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},j7e=ht([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Y7e=e=>{const{...t}=e,n=Te(j7e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(QH,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},s3=e=>Math.round(e*100)/100,q7e=ht([$n],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${s3(s)}, ${s3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${s3(r)}\xD7${s3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),K7e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=Te(q7e);return ne("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&ne(Rn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},X7e=ht([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Z7e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Te(X7e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(ih,{...t,children:[r&&x(tV,{url:u,x:o,y:a}),i&&ne(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},Q7e=ht([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),J7e=()=>{const e=Ke(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Te(Q7e),o=C.exports.useCallback(()=>{e(qL(!1))},[e]),a=C.exports.useCallback(()=>{e(qL(!0))},[e]);gt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),gt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),gt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(Z5e()),l=()=>e(X5e()),u=()=>e(q5e());return r?x(nn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ne(ra,{isAttached:!0,children:[x(vt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(vt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(vt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(H8,{}),onClick:u,"data-selected":!0}),x(vt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(pSe(!i)),"data-selected":!0}),x(vt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(Y$,{}),onClick:()=>e(O5e(r.image.url)),"data-selected":!0}),x(vt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(K5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},e8e=ht([$n,Au],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),t8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Te(e8e);_7e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{x7e(W),p.current=W},[]),S=C.exports.useCallback(W=>{b7e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=T7e(p),_=L7e(p),T=O7e(p,P),M=R7e(p,P,w),I=D7e(p),R=z7e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B7e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(h7e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:_,onTouchMove:M,onTouchEnd:T,onMouseDown:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(a3,{id:"grid",visible:r,children:x(G7e,{})}),x(a3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H7e,{})}),ne(a3,{id:"mask",visible:e,listening:!1,children:[x(g7e,{visible:!0,listening:!1}),x(E7e,{listening:!1})]}),ne(a3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(v7e,{visible:l!=="move",listening:!1}),x(Z7e,{visible:u}),h&&x(Y7e,{}),x(S7e,{visible:n&&!u})]})]}),x(K7e,{}),x(J7e,{})]})})},n8e=ht([$n,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function r8e(){const e=Ke(),{canUndo:t,activeTabName:n}=Te(n8e),r=()=>{e(ySe())};return gt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(vt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(w5e,{}),onClick:r,isDisabled:!t})}const i8e=ht([$n,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function o8e(){const e=Ke(),{canRedo:t,activeTabName:n}=Te(i8e),r=()=>{e(Q5e())};return gt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(vt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(y5e,{}),onClick:r,isDisabled:!t})}const nV=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return ne(Rn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(dB,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:ne(fB,{className:"modal",children:[x(kS,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),ne(_S,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),a8e=()=>{const e=Ke();return ne(nV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(I5e()),e(lW()),e(cW())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},s8e=()=>{const e=Ke();return ne(nV,{title:"Clear Canvas History",acceptCallback:()=>e(cW()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},l8e=ht([$n],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),u8e=()=>{const e=Ke(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Te(l8e);return x(Jc,{trigger:"hover",triggerComponent:x(vt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(U8,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(La,{label:"Show Intermediates",isChecked:a,onChange:l=>e(hSe(l.target.checked))}),x(La,{label:"Show Grid",isChecked:o,onChange:l=>e(fSe(l.target.checked))}),x(La,{label:"Snap to Grid",isChecked:s,onChange:l=>e(gSe(l.target.checked))}),x(La,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(lSe(l.target.checked))}),x(La,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(aSe(l.target.checked))}),x(La,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(sSe(l.target.checked))}),x(La,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(dSe(l.target.checked))}),x(s8e,{}),x(a8e,{})]})})};function hb(){return(hb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function y9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(iO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=S9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(oO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(iO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...hb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),pb=function(e){return e.filter(Boolean).join(" ")},Sk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=pb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},iV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},b9=function(e){var t=iV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},zw=function(e){var t=iV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},c8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},d8e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},f8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=pb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(yk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(Sk,{className:"react-colorful__hue-pointer",left:t/360,color:b9({h:t,s:100,v:100,a:1})})))}),h8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:b9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(yk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(Sk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:b9(t)})))}),oV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function p8e(e,t,n){var r=y9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;oV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var g8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,m8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,v8e=function(e){g8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aO.set(t,n);var r=m8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},y8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+zw(Object.assign({},n,{a:0}))+", "+zw(Object.assign({},n,{a:1}))+")"},o=pb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(yk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(Sk,{className:"react-colorful__alpha-pointer",left:n.a,color:zw(n)})))},S8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=rV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);v8e(s);var l=p8e(n,i,o),u=l[0],h=l[1],p=pb(["react-colorful",t]);return le.createElement("div",hb({},a,{ref:s,className:p}),x(h8e,{hsva:u,onChange:h}),x(f8e,{hue:u.h,onChange:h}),le.createElement(y8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},b8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:d8e,fromHsva:c8e,equal:oV},x8e=function(e){return le.createElement(S8e,hb({},e,{colorModel:b8e}))};const aV=e=>{const{styleClass:t,...n}=e;return x(x8e,{className:`invokeai__color-picker ${t}`,...n})},w8e=ht([$n],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:db(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),C8e=()=>{const e=Ke(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Te(w8e);gt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),gt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(hW(t==="mask"?"base":"mask"))},a=()=>e(Y5e()),s=()=>e(fW(!r));return x(Jc,{trigger:"hover",triggerComponent:x(ra,{children:x(vt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(La,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(La,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(uSe(l.target.checked))}),x(aV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(iSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let l3;const _8e=new Uint8Array(16);function k8e(){if(!l3&&(l3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!l3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l3(_8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function E8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const P8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:P8e};function Jp(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||k8e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return E8e(r)}const T8e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},A8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},L8e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},M8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},u3=(e=M8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(B4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=g5();if(!S){t(pu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=T8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(pu(!1)),t(Kp(!0));return}const E=new FormData;E.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(A8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(L8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(oSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(pu(!1)),t(U3("Connected")),t(Kp(!0))},gb=e=>e.system,O8e=e=>e.system.toastQueue,I8e=ht([$n,Au,gb],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),R8e=()=>{const e=Ke(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Te(I8e);gt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),gt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["["],()=>{e(yw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),gt(["]"],()=>{e(yw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(vt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(q$,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(yw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(aV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(nSe(s))})]})})]})};let lO;const sV=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),N8e=ht([gb,$n,Au],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),D8e=()=>{const e=Ke(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Te(N8e),s=g5(),{openUploader:l}=sV();gt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),gt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),gt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=g5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(eSe({contentRect:_}))},p=()=>{e(lW()),e(uW())},m=()=>{e(u3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(Sd,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:_5e,onChange:E=>{const _=E.target.value;e(hW(_)),_==="mask"&&!r&&e(fW(!0))}}),x(C8e,{}),x(R8e,{}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(vt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(vt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(Y$,{}),onClick:v,isDisabled:t}),x(vt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(XS,{}),onClick:S,isDisabled:t}),x(vt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(j$,{}),onClick:w,isDisabled:t})]}),ne(ra,{isAttached:!0,children:[x(r8e,{}),x(o8e,{})]}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Upload",tooltip:"Upload",icon:x(V8,{}),onClick:l}),x(vt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(u8e,{})})]})},z8e=ht([$n],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),F8e=()=>{const e=Ke(),{doesCanvasNeedScaling:t}=Te(z8e);return C.exports.useLayoutEffect(()=>{const n=it.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ne("div",{className:"inpainting-main-area",children:[x(D8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(tCe,{}):x(t8e,{})})]})})})};function B8e(){const e=Ke();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ak,{optionsPanel:x(J6e,{}),styleClass:"inpainting-workarea-overrides",children:x(F8e,{})})}const $8e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Ef={txt2img:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Text To Image"},img2img:{title:x(B3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Twe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x($8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(F3e,{}),tooltip:"Post Processing"}},mb=it.map(Ef,(e,t)=>t);[...mb];function W8e(){const e=Te(u=>u.options.activeTab),t=Te(u=>u.options.isLightBoxOpen),n=Te(u=>u.gallery.shouldShowGallery),r=Te(u=>u.options.shouldShowOptionsPanel),i=Te(u=>u.gallery.shouldPinGallery),o=Te(u=>u.options.shouldPinOptionsPanel),a=Ke();gt("1",()=>{a(na(0))}),gt("2",()=>{a(na(1))}),gt("3",()=>{a(na(2))}),gt("4",()=>{a(na(3))}),gt("5",()=>{a(na(4))}),gt("z",()=>{a(ud(!t))},[t]),gt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x($B,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(FB,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return ne(zB,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(BB,{className:"app-tabs-panels",children:t?x(U6e,{}):l()})]})}const lV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},H8e=lV,uV=LS({name:"options",initialState:H8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=V3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=r5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=V3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=r5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=V3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...lV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=mb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload}}}),{clearInitialImage:cV,resetOptionsState:oTe,resetSeed:aTe,setActiveTab:na,setAllImageToImageParameters:V8e,setAllParameters:U8e,setAllTextToImageParameters:G8e,setCfgScale:dV,setCodeformerFidelity:fV,setCurrentTheme:j8e,setFacetoolStrength:q3,setFacetoolType:K3,setHeight:hV,setHiresFix:pV,setImg2imgStrength:x9,setInitialImage:c2,setIsLightBoxOpen:ud,setIterations:Y8e,setMaskPath:gV,setOptionsPanelScrollPosition:q8e,setParameter:sTe,setPerlin:K8e,setPrompt:vb,setSampler:mV,setSeamBlur:uO,setSeamless:vV,setSeamSize:cO,setSeamSteps:dO,setSeamStrength:fO,setSeed:d2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:X8e,setShouldGenerateVariations:Z8e,setShouldHoldOptionsPanelOpen:Q8e,setShouldLoopback:J8e,setShouldPinOptionsPanel:eke,setShouldRandomizeSeed:tke,setShouldRunESRGAN:nke,setShouldRunFacetool:rke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:ike,setShowDualDisplay:oke,setSteps:xV,setThreshold:ake,setTileSize:hO,setUpscalingLevel:w9,setUpscalingStrength:C9,setVariationAmount:ske,setWidth:wV}=uV.actions,lke=uV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const X3=Object.create(null);Object.keys(Ol).forEach(e=>{X3[Ol[e]]=e});const uke={type:"error",data:"parser error"},cke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dke=typeof ArrayBuffer=="function",fke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>cke&&t instanceof Blob?n?r(t):pO(t,r):dke&&(t instanceof ArrayBuffer||fke(t))?n?r(t):pO(new Blob([t]),r):r(Ol[e]+(t||"")),pO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},gO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},pke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:gke(e.substring(1),t)}:X3[n]?e.length>1?{type:X3[n],data:e.substring(1)}:{type:X3[n]}:uke},gke=(e,t)=>{if(pke){const n=hke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),mke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},vke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Ske=setTimeout,bke=clearTimeout;function yb(e,t){t.useNativeTimers?(e.setTimeoutFn=Ske.bind(Hc),e.clearTimeoutFn=bke.bind(Hc)):(e.setTimeoutFn=setTimeout.bind(Hc),e.clearTimeoutFn=clearTimeout.bind(Hc))}const xke=1.33;function wke(e){return typeof e=="string"?Cke(e):Math.ceil((e.byteLength||e.size)*xke)}function Cke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class _ke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,yb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new _ke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),_9=64,kke={};let mO=0,c3=0,vO;function yO(e){let t="";do t=LV[e%_9]+t,e=Math.floor(e/_9);while(e>0);return t}function MV(){const e=yO(+new Date);return e!==vO?(mO=0,vO=e):e+"."+yO(mO++)}for(;c3<_9;c3++)kke[LV[c3]]=c3;function OV(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Eke(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};vke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,mke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=MV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Tl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Tl extends Vr{constructor(t,n){super(),yb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=TV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new RV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Tl.requestsCount++,Tl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Tke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",SO);else if(typeof addEventListener=="function"){const e="onpagehide"in Hc?"pagehide":"unload";addEventListener(e,SO,!1)}}function SO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),d3=Hc.WebSocket||Hc.MozWebSocket,bO=!0,Mke="arraybuffer",xO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Oke extends AV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=xO?{}:TV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=bO&&!xO?n?new d3(t,n):new d3(t):new d3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Mke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{bO&&this.ws.send(o)}catch{}i&&NV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=MV()),this.supportsBinary||(t.b64=1);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!d3}}const Ike={websocket:Oke,polling:Lke},Rke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function k9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Rke.exec(e||""),o={},a=14;for(;a--;)o[Nke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Dke(o,o.path),o.queryKey=zke(o,o.query),o}function Dke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function zke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Nc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=k9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=k9(n.host).host),yb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Eke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=PV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Ike[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Nc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Nc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Nc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Nc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Nc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Wke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",Hke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function bk(e){return Bke&&(e instanceof ArrayBuffer||$ke(e))||Wke&&e instanceof Blob||Hke&&e instanceof File}function Z3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Yke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Uke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Gke,get PacketType(){return tn},Encoder:jke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Kke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Kke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}g1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class T9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,yb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new g1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||qke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Nc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xg={};function Q3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Fke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new T9(r,t):(Xg[i]||(Xg[i]=new T9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Q3,{Manager:T9,Socket:zV,io:Q3,connect:Q3});var Xke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Zke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Qke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(wO[t]||t||wO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return Jke(e)},P=function(){return eEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return CO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return CO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":tEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(Xke,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var wO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},CO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},Jke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},eEe=function(t){var n=t.getDay();return n===0&&(n=7),n},tEe=function(t){return(String(t).match(Zke)||[""]).pop().replace(Qke,"").replace(/GMT\+0000/g,"UTC")};const nEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(FL(!0)),t(U3("Connected")),t(M5e());const r=n().gallery;r.categories.user.latest_mtime?t(HL("user")):t(qC("user")),r.categories.result.latest_mtime?t(HL("result")):t(qC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(FL(!1)),t(U3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(j5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(mb[a]){case"img2img":{t(c2(h));break}}t(bw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(TSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(pu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(BL()),t(bw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(PSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(bw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(yW(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(cV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(U3("Model Changed")),t(pu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(pu(!1)),t(Kp(!0)),t(BL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},rEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},iEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},oEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,initialImage:S,iterations:w,perlin:P,prompt:E,sampler:_,seamBlur:T,seamless:M,seamSize:I,seamSteps:R,seamStrength:N,seed:z,seedWeights:$,shouldFitToWidthHeight:W,shouldForceOutpaint:j,shouldGenerateVariations:de,shouldRandomizeSeed:V,shouldRunESRGAN:J,shouldRunFacetool:ie,steps:Q,threshold:K,tileSize:G,upscalingLevel:Z,upscalingStrength:te,variationAmount:X,width:he}=r,{shouldDisplayInProgressType:ye,saveIntermediatesInterval:Se,enableImageDebugging:De}=o,ke={prompt:E,iterations:V||de?w:1,steps:Q,cfg_scale:s,threshold:K,perlin:P,height:p,width:he,sampler_name:_,seed:z,progress_images:ye==="full-res",progress_latents:ye==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(ke.seed=V?z$(L8,M8):z,["txt2img","img2img"].includes(n)&&(ke.seamless=M,ke.hires_fix=m),n==="img2img"&&S&&(ke.init_img=typeof S=="string"?S:S.url,ke.strength=v,ke.fit=W),n==="unifiedCanvas"&&t){const{layerState:{objects:ot},boundingBoxCoordinates:Ze,boundingBoxDimensions:et,inpaintReplace:Tt,shouldUseInpaintReplace:xt,stageScale:Le,isMaskEnabled:st,shouldPreserveMaskedArea:At}=i,Xe={...Ze,...et},yt=rEe(st?ot.filter(G8):[],Xe);ke.init_mask=yt,ke.fit=!1,ke.init_img=a,ke.strength=v,ke.invert_mask=At,xt&&(ke.inpaint_replace=Tt),ke.bounding_box=Xe;const cn=t.scale();t.scale({x:1/Le,y:1/Le});const wt=t.getAbsolutePosition(),Ut=t.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});De&&iEe([{base64:yt,caption:"mask sent as init_mask"},{base64:Ut,caption:"image sent as init_img"}]),t.scale(cn),ke.init_img=Ut,ke.progress_images=!1,ke.seam_size=I,ke.seam_blur=T,ke.seam_strength=N,ke.seam_steps=R,ke.tile_size=G,ke.force_outpaint=j}de?(ke.variation_amount=X,$&&(ke.with_variations=nye($))):ke.variation_amount=0;let ct=!1,Ge=!1;return J&&(ct={level:Z,strength:te}),ie&&(Ge={type:h,strength:u},h==="codeformer"&&(Ge.codeformer_fidelity=l)),De&&(ke.enable_image_debugging=De),{generationParameters:ke,esrganParameters:ct,facetoolParameters:Ge}},aEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(pu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=oEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(pu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(pu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(yW(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},sEe=()=>{const{origin:e}=new URL(window.location.href),t=Q3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=nEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:W,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=aEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{W(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},lEe=["cursorPosition"].map(e=>`canvas.${e}`),uEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),cEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),FV=XB({options:lke,gallery:RSe,system:$4e,canvas:SSe}),dEe=m$.getPersistConfig({key:"root",storage:g$,rootReducer:FV,blacklist:[...lEe,...uEe,...cEe],debounce:300}),fEe=B2e(dEe,FV),BV=Ive({reducer:fEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(sEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ke=_2e,Te=h2e;function J3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J3=function(n){return typeof n}:J3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},J3(e)}function hEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _O(e,t){for(var n=0;nx(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),yEe=ht(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),SEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Te(yEe),i=t?Math.round(t*100/n):0;return x(SB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function bEe(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function xEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(bEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Rn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(U0,{isOpen:t,onClose:r,children:[x(G0,{}),ne(Lv,{className:" modal hotkeys-modal",children:[x(Z7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(i)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(o)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(a)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(s)})]})]})})]})]})]})}const wEe=e=>{const{isProcessing:t,isConnected:n}=Te(l=>l.system),r=Ke(),{name:i,status:o,description:a}=e,s=()=>{r(Z$(i))};return ne("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(jz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},CEe=ht(e=>e.system,e=>{const t=it.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),_Ee=()=>{const{models:e}=Te(CEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(zf,{children:[x(Nf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Ff,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(wEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},kEe=ht([gb,F$],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldLoopback:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:it.map(o,(u,h)=>h),saveIntermediatesInterval:a,enableImageDebugging:s,shouldLoopback:l}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),EEe=({children:e})=>{const t=Ke(),n=Te(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v,shouldLoopback:S}=Te(kEe),w=()=>{QV.purge().then(()=>{o(),s()})},P=E=>{E>n&&(E=n),E<1&&(E=1),t(N4e(E))};return ne(Rn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(U0,{isOpen:r,onClose:o,children:[x(G0,{}),ne(Lv,{className:"modal settings-modal",children:[x(kS,{className:"settings-modal-header",children:"Settings"}),x(Z7,{className:"modal-close-btn"}),ne(Av,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(_Ee,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Sd,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:E=>t(T4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:P,value:m,width:"auto",textAlign:"center"})]}),x(aa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t($$(E.target.checked))}),x(aa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(O4e(E.target.checked))}),x(aa,{styleClass:"settings-modal-item",label:"Image to Image Loopback",isChecked:S,onChange:E=>t(J8e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(aa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(D4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:w,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(_S,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(nn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},PEe=ht(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),TEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Te(PEe),s=Ke();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(W$())},className:`status ${l}`,children:u})})},AEe=["dark","light","green"];function LEe(){const{setColorMode:e}=Wv(),t=Ke(),n=Te(i=>i.options.currentTheme),r=i=>{e(i),t(j8e(i))};return x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(Kz,{align:"stretch",children:AEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(H8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const MEe=ht([gb],e=>{const{isProcessing:t,model_list:n}=e,r=it.map(n,(o,a)=>a),i=it.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),OEe=()=>{const e=Ke(),{models:t,activeModel:n,isProcessing:r}=Te(MEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(Sd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(Z$(o.target.value))}})})},IEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:gW,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(TEe,{}),x(OEe,{}),x(xEe,{children:x(vt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(LEe,{}),x(vt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(vt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(vt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(EEe,{children:x(vt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(U8,{})})})]})]}),REe=ht(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),NEe=ht(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),DEe=()=>{const e=Ke(),t=Te(REe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Te(NEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(W$()),e(gw(!n))};return gt("`",()=>{e(gw(!n))},[n]),gt("esc",()=>{e(gw(!1))}),ne(Rn,{children:[n&&x(_W,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ne("div",{className:`console-entry console-${S}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(G$,{}),onClick:l})})]})};function zEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var FEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function f2(e,t){var n=BEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function BEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=FEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var $Ee=[".DS_Store","Thumbs.db"];function WEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&HEe(e.dataTransfer)?[2,jEe(e.dataTransfer,e.type)]:VEe(e)?[2,UEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,GEe(e)]:[2,[]]})})}function HEe(e){return m5(e)}function VEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function UEe(e){return M9(e.target.files).map(function(t){return f2(t)})}function GEe(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return f2(r)})]}})})}function jEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=M9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(YEe))]):[3,2];case 1:return r=i.sent(),[2,kO(WV(r))];case 2:return[2,kO(M9(e.files).map(function(o){return f2(o)}))]}})})}function kO(e){return e.filter(function(t){return $Ee.indexOf(t.name)===-1})}function M9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,LO(n)];if(e.sizen)return[!1,LO(n)]}return[!0,null]}function Pf(e){return e!=null}function uPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function v5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function f3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function OO(e){e.preventDefault()}function cPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function dPe(e){return e.indexOf("Edge/")!==-1}function fPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return cPe(e)||dPe(e)}function sl(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function APe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=y5(e,yPe),i=ZV(r),o=i.open,a=y5(i,SPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:WEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=XV;wk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var N9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return gPe(n)},[n]),j=C.exports.useMemo(function(){return pPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:RO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:RO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(LPe,N9),K=Fw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&hPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",OO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",OO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var ke=C.exports.useCallback(function(Ie){z?z(Ie):console.error(Ie)},[z]),ct=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie),Se.current=[].concat(wPe(Se.current),[Ie.target]),f3(Ie)&&Promise.resolve(i(Ie)).then(function(Je){if(!(v5(Ie)&&!N)){var Xt=Je.length,Yt=Xt>0&&uPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Ie)}}).catch(function(Je){return ke(Je)})},[i,u,ke,N,W,a,o,s,l,$]),Ge=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie);var Je=f3(Ie);if(Je&&Ie.dataTransfer)try{Ie.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Ie),!1},[p,N]),ot=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie);var Je=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=Je.indexOf(Ie.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),f3(Ie)&&h&&h(Ie))},[J,h,N]),Ze=C.exports.useCallback(function(Ie,Je){var Xt=[],Yt=[];Ie.forEach(function(Ee){var Ot=GV(Ee,W),ze=Fw(Ot,2),lt=ze[0],an=ze[1],Nn=jV(Ee,a,o),We=Fw(Nn,2),ft=We[0],nt=We[1],Nt=$?$(Ee):null;if(lt&&ft&&!Nt)Xt.push(Ee);else{var Zt=[an,nt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){Yt.push({file:Ee,errors:[lPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Je),Yt.length>0&&S&&S(Yt,Je),Xt.length>0&&v&&v(Xt,Je)},[Z,s,W,a,o,l,m,v,S,$]),et=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie),Se.current=[],f3(Ie)&&Promise.resolve(i(Ie)).then(function(Je){v5(Ie)&&!N||Ze(Je,Ie)}).catch(function(Je){return ke(Je)}),Z({type:"reset"})},[i,Ze,ke,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Ie={multiple:s,types:j};window.showOpenFilePicker(Ie).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Z({type:"closeDialog"})}).catch(function(Je){mPe(Je)?(V(Je),Z({type:"closeDialog"})):vPe(Je)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):ke(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):ke(Je)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,ke,j,s]),xt=C.exports.useCallback(function(Ie){!J.current||!J.current.isEqualNode(Ie.target)||(Ie.key===" "||Ie.key==="Enter"||Ie.keyCode===32||Ie.keyCode===13)&&(Ie.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),st=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(fPe()?setTimeout(Tt,0):Tt())},[M,Tt]),Xe=function(Je){return r?null:Je},yt=function(Je){return I?null:Xe(Je)},cn=function(Je){return R?null:Xe(Je)},wt=function(Je){N&&Je.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Ie.refKey,Xt=Je===void 0?"ref":Je,Yt=Ie.role,Ee=Ie.onKeyDown,Ot=Ie.onFocus,ze=Ie.onBlur,lt=Ie.onClick,an=Ie.onDragEnter,Nn=Ie.onDragOver,We=Ie.onDragLeave,ft=Ie.onDrop,nt=y5(Ie,bPe);return lr(lr(R9({onKeyDown:yt(sl(Ee,xt)),onFocus:yt(sl(Ot,Le)),onBlur:yt(sl(ze,st)),onClick:Xe(sl(lt,At)),onDragEnter:cn(sl(an,ct)),onDragOver:cn(sl(Nn,Ge)),onDragLeave:cn(sl(We,ot)),onDrop:cn(sl(ft,et)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),nt)}},[J,xt,Le,st,At,ct,Ge,ot,et,I,R,r]),_n=C.exports.useCallback(function(Ie){Ie.stopPropagation()},[]),vn=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Ie.refKey,Xt=Je===void 0?"ref":Je,Yt=Ie.onChange,Ee=Ie.onClick,Ot=y5(Ie,xPe),ze=R9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:Xe(sl(Yt,et)),onClick:Xe(sl(Ee,_n)),tabIndex:-1},Xt,ie);return lr(lr({},ze),Ot)}},[ie,n,s,et,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:vn,rootRef:J,inputRef:ie,open:Xe(Tt)})}function LPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},N9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},N9);default:return e}}function RO(){}const MPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return gt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Gf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},NO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Rr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(K8(u)):o==="img2img"&&t(c2(u))},OPe=e=>{const{children:t}=e,n=Ke(),r=Te(Rr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=sV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+` -`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(NO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(NO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(Z8.Provider,{value:P,children:ne("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(MPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},IPe=()=>{const e=Ke(),t=Te(r=>r.gallery.shouldPinGallery);return x(vt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(io(!0))},children:x(H$,{})})},RPe=ht(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),NPe=()=>{const e=Ke(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Te(RPe);return ne("div",{className:"show-hide-button-options",children:[x(vt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(q$,{})}),t&&ne(Rn,{children:[x(Q$,{iconButton:!0}),x(J$,{})]})]})},DPe=()=>{const e=Ke(),t=Te(O8e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(F4e())},[e,n,t])};zEe();const zPe=ht([e=>e.gallery,e=>e.options,e=>e.system,Rr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=it.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),FPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Te(zPe);return DPe(),x("div",{className:"App",children:ne(OPe,{children:[x(SEe,{}),ne("div",{className:"app-content",children:[x(IEe,{}),x(W8e,{})]}),x("div",{className:"app-console",children:x(DEe,{})}),e&&x(IPe,{}),t&&x(NPe,{})]})})};const QV=G2e(BV),BPe=lN({key:"invokeai-style-cache",prepend:!0});$w.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:BV,children:x($V,{loading:x(vEe,{}),persistor:QV,children:x(aJ,{value:BPe,children:x(Zme,{children:x(FPe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index bb40380432..fcc162c748 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,8 @@ InvokeAI - A Stable Diffusion Toolkit - - + + From 3ea732365cfb3267bf25ae046b1a7500fe484a08 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:25:22 +1300 Subject: [PATCH 176/220] Fix rerenders on model select --- .../system/components/ModelSelect.tsx | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/frontend/src/features/system/components/ModelSelect.tsx b/frontend/src/features/system/components/ModelSelect.tsx index 586bdeefd5..17974277eb 100644 --- a/frontend/src/features/system/components/ModelSelect.tsx +++ b/frontend/src/features/system/components/ModelSelect.tsx @@ -7,23 +7,31 @@ import _ from 'lodash'; import { ChangeEvent } from 'react'; import { systemSelector } from '../store/systemSelectors'; -const selector = createSelector([systemSelector], (system) => { - const { isProcessing, model_list } = system; - const models = _.map(model_list, (model, key) => key); - const activeModel = _.reduce( - model_list, - (acc, model, key) => { - if (model.status === 'active') { - acc = key; - } +const selector = createSelector( + [systemSelector], + (system) => { + const { isProcessing, model_list } = system; + const models = _.map(model_list, (model, key) => key); + const activeModel = _.reduce( + model_list, + (acc, model, key) => { + if (model.status === 'active') { + acc = key; + } - return acc; + return acc; + }, + '' + ); + + return { models, activeModel, isProcessing }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, }, - '' - ); - - return { models, activeModel, isProcessing }; -}); + } +); const ModelSelect = () => { const dispatch = useAppDispatch(); From 7b76b798871faff708b8f122ad5284e83dba0c02 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 19:26:32 +1300 Subject: [PATCH 177/220] Floating panel re-render fix --- frontend/src/app/App.tsx | 73 ++----------------- .../tabs/components/FloatingGalleryButton.tsx | 38 ++++++++-- .../FloatingOptionsPanelButtons.tsx | 31 ++++++-- 3 files changed, 61 insertions(+), 81 deletions(-) diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index a1e8785e2e..f7ce52dff1 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -4,78 +4,15 @@ import Console from 'features/system/components/Console'; import { keepGUIAlive } from './utils'; import InvokeTabs from 'features/tabs/components/InvokeTabs'; import ImageUploader from 'common/components/ImageUploader'; -import { RootState, useAppSelector } from 'app/store'; -import FloatingGalleryButton from 'features/tabs/components/FloatingGalleryButton'; -import FloatingOptionsPanelButtons from 'features/tabs/components/FloatingOptionsPanelButtons'; -import { createSelector } from '@reduxjs/toolkit'; -import { GalleryState } from 'features/gallery/store/gallerySlice'; -import { OptionsState } from 'features/options/store/optionsSlice'; -import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; -import { SystemState } from 'features/system/store/systemSlice'; -import _ from 'lodash'; -import { Model } from './invokeai'; import useToastWatcher from 'features/system/hooks/useToastWatcher'; +import FloatingOptionsPanelButtons from 'features/tabs/components/FloatingOptionsPanelButtons'; +import FloatingGalleryButton from 'features/tabs/components/FloatingGalleryButton'; + keepGUIAlive(); -const appSelector = createSelector( - [ - (state: RootState) => state.gallery, - (state: RootState) => state.options, - (state: RootState) => state.system, - activeTabNameSelector, - ], - ( - gallery: GalleryState, - options: OptionsState, - system: SystemState, - activeTabName - ) => { - const { shouldShowGallery, shouldHoldGalleryOpen, shouldPinGallery } = - gallery; - const { - shouldShowOptionsPanel, - shouldHoldOptionsPanelOpen, - shouldPinOptionsPanel, - } = options; - - const modelStatusText = _.reduce( - system.model_list, - (acc: string, cur: Model, key: string) => { - if (cur.status === 'active') acc = key; - return acc; - }, - '' - ); - - const shouldShowGalleryButton = - !(shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)) && - ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); - - const shouldShowOptionsPanelButton = - !( - shouldShowOptionsPanel || - (shouldHoldOptionsPanelOpen && !shouldPinOptionsPanel) - ) && ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); - - return { - modelStatusText, - shouldShowGalleryButton, - shouldShowOptionsPanelButton, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - const App = () => { - const { shouldShowGalleryButton, shouldShowOptionsPanelButton } = - useAppSelector(appSelector); - useToastWatcher(); return ( @@ -89,9 +26,9 @@ const App = () => {
- {shouldShowGalleryButton && } - {shouldShowOptionsPanelButton && } + +
); }; diff --git a/frontend/src/features/tabs/components/FloatingGalleryButton.tsx b/frontend/src/features/tabs/components/FloatingGalleryButton.tsx index 780a5d0897..01ba941d15 100644 --- a/frontend/src/features/tabs/components/FloatingGalleryButton.tsx +++ b/frontend/src/features/tabs/components/FloatingGalleryButton.tsx @@ -1,13 +1,41 @@ import { MdPhotoLibrary } from 'react-icons/md'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; +import { + GalleryState, + setShouldShowGallery, +} from 'features/gallery/store/gallerySlice'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; +import { createSelector } from '@reduxjs/toolkit'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; +import _ from 'lodash'; + +const floatingGallerySelcetor = createSelector( + [(state: RootState) => state.gallery, activeTabNameSelector], + (gallery: GalleryState, activeTabName) => { + const { shouldShowGallery, shouldHoldGalleryOpen, shouldPinGallery } = + gallery; + + const shouldShowGalleryButton = + !(shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)) && + ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); + + return { + shouldPinGallery, + shouldShowGalleryButton, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); const FloatingGalleryButton = () => { const dispatch = useAppDispatch(); - const shouldPinGallery = useAppSelector( - (state: RootState) => state.gallery.shouldPinGallery + const { shouldShowGalleryButton, shouldPinGallery } = useAppSelector( + floatingGallerySelcetor ); const handleShowGallery = () => { @@ -17,7 +45,7 @@ const FloatingGalleryButton = () => { } }; - return ( + return shouldShowGalleryButton ? ( { > - ); + ) : null; }; export default FloatingGalleryButton; diff --git a/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx b/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx index 5473284da1..114bb4250e 100644 --- a/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx +++ b/frontend/src/features/tabs/components/FloatingOptionsPanelButtons.tsx @@ -10,16 +10,28 @@ import InvokeButton from 'features/options/components/ProcessButtons/InvokeButto import _ from 'lodash'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import { FaSlidersH } from 'react-icons/fa'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; -const canInvokeSelector = createSelector( - (state: RootState) => state.options, +const floatingOptionsSelector = createSelector( + [(state: RootState) => state.options, activeTabNameSelector], + (options: OptionsState, activeTabName) => { + const { + shouldPinOptionsPanel, + shouldShowOptionsPanel, + shouldHoldOptionsPanelOpen, + } = options; + + const shouldShowOptionsPanelButton = + !( + shouldShowOptionsPanel || + (shouldHoldOptionsPanelOpen && !shouldPinOptionsPanel) + ) && ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); - (options: OptionsState) => { - const { shouldPinOptionsPanel, shouldShowOptionsPanel } = options; return { shouldPinOptionsPanel, shouldShowProcessButtons: !shouldPinOptionsPanel || !shouldShowOptionsPanel, + shouldShowOptionsPanelButton, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -27,8 +39,11 @@ const canInvokeSelector = createSelector( const FloatingOptionsPanelButtons = () => { const dispatch = useAppDispatch(); - const { shouldShowProcessButtons, shouldPinOptionsPanel } = - useAppSelector(canInvokeSelector); + const { + shouldShowOptionsPanelButton, + shouldShowProcessButtons, + shouldPinOptionsPanel, + } = useAppSelector(floatingOptionsSelector); const handleShowOptionsPanel = () => { dispatch(setShouldShowOptionsPanel(true)); @@ -37,7 +52,7 @@ const FloatingOptionsPanelButtons = () => { } }; - return ( + return shouldShowOptionsPanelButton ? (
{ )}
- ); + ) : null; }; export default FloatingOptionsPanelButtons; From 69a4a6fec504a80298191ae2ab3a80342d2fbbcc Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:20:27 +1300 Subject: [PATCH 178/220] Simplify fullscreen hotkey selector --- .../features/tabs/components/InvokeTabs.tsx | 46 +++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index 3dcfe12710..9782ba054b 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -10,6 +10,7 @@ import NodesIcon from 'common/icons/NodesIcon'; import PostprocessingIcon from 'common/icons/PostprocessingIcon'; import TextToImageIcon from 'common/icons/TextToImageIcon'; import { + OptionsState, setActiveTab, setIsLightBoxOpen, setShouldShowOptionsPanel, @@ -19,8 +20,12 @@ import TextToImageWorkarea from './TextToImage'; import Lightbox from 'features/lightbox/components/Lightbox'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import UnifiedCanvasWorkarea from './UnifiedCanvas/UnifiedCanvasWorkarea'; -import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; +import { + GalleryState, + setShouldShowGallery, +} from 'features/gallery/store/gallerySlice'; import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; +import { createSelector } from '@reduxjs/toolkit'; export const tabDict = { txt2img: { @@ -57,6 +62,26 @@ export const tabMap = _.map(tabDict, (tab, key) => key); const tabMapTypes = [...tabMap] as const; export type InvokeTabName = typeof tabMapTypes[number]; +const fullScreenSelector = createSelector( + [(state: RootState) => state.gallery, (state: RootState) => state.options], + (gallery: GalleryState, options: OptionsState) => { + const { shouldShowGallery, shouldPinGallery } = gallery; + const { shouldShowOptionsPanel, shouldPinOptionsPanel } = options; + + return { + shouldShowGallery, + shouldPinGallery, + shouldShowOptionsPanel, + shouldPinOptionsPanel, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + export default function InvokeTabs() { const activeTab = useAppSelector( (state: RootState) => state.options.activeTab @@ -64,18 +89,13 @@ export default function InvokeTabs() { const isLightBoxOpen = useAppSelector( (state: RootState) => state.options.isLightBoxOpen ); - const shouldShowGallery = useAppSelector( - (state: RootState) => state.gallery.shouldShowGallery - ); - const shouldShowOptionsPanel = useAppSelector( - (state: RootState) => state.options.shouldShowOptionsPanel - ); - const shouldPinGallery = useAppSelector( - (state: RootState) => state.gallery.shouldPinGallery - ); - const shouldPinOptionsPanel = useAppSelector( - (state: RootState) => state.options.shouldPinOptionsPanel - ); + + const { + shouldPinGallery, + shouldShowGallery, + shouldPinOptionsPanel, + shouldShowOptionsPanel, + } = useAppSelector(fullScreenSelector); const dispatch = useAppDispatch(); From ec3d25d778c573c375965e9414c56c30e23aa880 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:40:13 +1300 Subject: [PATCH 179/220] Add Training WIP Tab --- .../WorkInProgress/ImageToImageWIP.tsx | 16 ---------------- .../components/WorkInProgress/InpaintingWIP.tsx | 14 -------------- .../components/WorkInProgress/OutpaintingWIP.tsx | 14 -------------- .../WorkInProgress/PostProcessingWIP.tsx | 2 +- .../components/WorkInProgress/Training.tsx | 16 ++++++++++++++++ .../src/features/tabs/components/InvokeTabs.tsx | 10 ++++++++++ 6 files changed, 27 insertions(+), 45 deletions(-) delete mode 100644 frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx delete mode 100644 frontend/src/common/components/WorkInProgress/InpaintingWIP.tsx delete mode 100644 frontend/src/common/components/WorkInProgress/OutpaintingWIP.tsx create mode 100644 frontend/src/common/components/WorkInProgress/Training.tsx diff --git a/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx b/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx deleted file mode 100644 index 0867232c31..0000000000 --- a/frontend/src/common/components/WorkInProgress/ImageToImageWIP.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import Img2ImgPlaceHolder from 'assets/images/image2img.png'; - -export const ImageToImageWIP = () => { - return ( -
- img2img_placeholder -

Image To Image

-

- Image to Image is already available in the WebUI. You can access it from - the Text to Image - Advanced Options menu. A dedicated UI for Image To - Image will be released soon. -

-
- ); -}; diff --git a/frontend/src/common/components/WorkInProgress/InpaintingWIP.tsx b/frontend/src/common/components/WorkInProgress/InpaintingWIP.tsx deleted file mode 100644 index 1c029aa829..0000000000 --- a/frontend/src/common/components/WorkInProgress/InpaintingWIP.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -export default function InpaintingWIP() { - return ( -
-

Inpainting

-

- Inpainting is available as a part of the Invoke AI Command Line - Interface. A dedicated WebUI interface will be released in the near - future. -

-
- ); -} diff --git a/frontend/src/common/components/WorkInProgress/OutpaintingWIP.tsx b/frontend/src/common/components/WorkInProgress/OutpaintingWIP.tsx deleted file mode 100644 index fb913a40f7..0000000000 --- a/frontend/src/common/components/WorkInProgress/OutpaintingWIP.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -export default function OutpaintingWIP() { - return ( -
-

Outpainting

-

- Outpainting is available as a part of the Invoke AI Command Line - Interface. A dedicated WebUI interface will be released in the near - future. -

-
- ); -} diff --git a/frontend/src/common/components/WorkInProgress/PostProcessingWIP.tsx b/frontend/src/common/components/WorkInProgress/PostProcessingWIP.tsx index 5d270696b2..de9c59afa0 100644 --- a/frontend/src/common/components/WorkInProgress/PostProcessingWIP.tsx +++ b/frontend/src/common/components/WorkInProgress/PostProcessingWIP.tsx @@ -9,7 +9,7 @@ export const PostProcessingWIP = () => { Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the - image action buttons above the main image display. + image action buttons above the current image display or in the viewer.

A dedicated UI will be released soon to facilitate more advanced post diff --git a/frontend/src/common/components/WorkInProgress/Training.tsx b/frontend/src/common/components/WorkInProgress/Training.tsx new file mode 100644 index 0000000000..0a36ca22f9 --- /dev/null +++ b/frontend/src/common/components/WorkInProgress/Training.tsx @@ -0,0 +1,16 @@ +import React from 'react'; + +export default function TrainingWIP() { + return ( +

+

Training

+

+ A dedicated workflow for training your own embeddings and checkpoints + using Textual Inversion and Dreambooth from the web interface.
+
+ InvokeAI already supports training custom embeddings using Textual + Inversion using the main script. +

+
+ ); +} diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index 9782ba054b..b32055e1a7 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -26,6 +26,7 @@ import { } from 'features/gallery/store/gallerySlice'; import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; import { createSelector } from '@reduxjs/toolkit'; +import TrainingWIP from 'common/components/WorkInProgress/Training'; export const tabDict = { txt2img: { @@ -53,6 +54,11 @@ export const tabDict = { workarea: , tooltip: 'Post Processing', }, + training: { + title: , + workarea: , + tooltip: 'Training', + }, }; // Array where index maps to the key of tabDict @@ -119,6 +125,10 @@ export default function InvokeTabs() { dispatch(setActiveTab(4)); }); + useHotkeys('6', () => { + dispatch(setActiveTab(5)); + }); + // Lightbox Hotkey useHotkeys( 'z', From a86049f822105fadac097dfb909b9c2e2083b78d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:33:22 +1100 Subject: [PATCH 180/220] Adds Training icon --- frontend/src/common/icons/TrainingIcon.tsx | 16 ++++++++++++++++ .../common/icons/design_files/Training.afdesign | Bin 0 -> 25933 bytes .../src/common/icons/design_files/Training.svg | 5 +++++ .../src/features/tabs/components/InvokeTabs.tsx | 3 ++- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 frontend/src/common/icons/TrainingIcon.tsx create mode 100644 frontend/src/common/icons/design_files/Training.afdesign create mode 100644 frontend/src/common/icons/design_files/Training.svg diff --git a/frontend/src/common/icons/TrainingIcon.tsx b/frontend/src/common/icons/TrainingIcon.tsx new file mode 100644 index 0000000000..a6bf178aab --- /dev/null +++ b/frontend/src/common/icons/TrainingIcon.tsx @@ -0,0 +1,16 @@ +import { createIcon } from '@chakra-ui/react'; + +const TrainingIcon = createIcon({ + displayName: 'TrainingIcon', + viewBox: '0 0 3544 3544', + path: ( + + ), +}); + +export default TrainingIcon; diff --git a/frontend/src/common/icons/design_files/Training.afdesign b/frontend/src/common/icons/design_files/Training.afdesign new file mode 100644 index 0000000000000000000000000000000000000000..4d1a39d738d5e045f6349f387d21e36e76ba3137 GIT binary patch literal 25933 zcmeEu^;aE1)8@r3NN^AC?(XjH?yi9lf_osi6B68A0|a-1yM^E$2<|XDyx+UO?fwIM zw$GXAp1ITA(=}C3JvBXjA%LPd3Iq}2;_0DADeqzv#R2(Gy7_O;_uu?~&O#vg>3){4 zWms^71~)Yi*Z1&XPAOyWMAyXn43YCsgfdvr$X3IE*pt9PpoKDwrBOKLC-``>;7WPq zY#I^_I)=iGtr}Z5f+P(d_AaC-^vN0Qf7hD3Os!-f4v;lzHW2-Uy{hb0A(D^98c;Hl zyLx!*zYq0lcReA?iYy01-pWAVfT(p)=mFgsD)X-D>yuL}h00XjM7sLF_nN!XjV+~nk<4@DyyEA8s;{i*Q*I*Og-5}yg_ z^nYP;_{G63@lQBF<#wZDF+0|$h!ddqeCwWckf|gq%!ilxZn2{jo4hI}T0?+zbW~@Y zPzK8m4Gp{aF?%s#kBi>eFQEcIcMBCdfjGeAXFg1C2It3m9QYtYh=st>eiMr&oC9*; zMJh`kdf35U`=vn=_LxDXd(vnlRiayPI_|b@GqH1YxmsowY&SzhF-G)(Ef1j))e>O{ zm9Ba>-j~gh)a`bj{uM-VIq}4jzss9q))1nzOM|btvYAX$aT+BEI7lBe9zHsMi9j78 zt+%3+X(f9a9ub&uqzPfOzd=eKS+FAO3#Gsa&{^Fo4#w7V+oKhoqBlQ4ugRIOwn>0j zVi2vvf{x+hq9NXAMYb}Nf-8ZtqEjcUv=zbFv}NJ^d&o&1rH_ov3`u}QROZYkJiy{} zkm&!KU;RQ7l)^t@CsB!r8A9AFWF7t%BZ&RHchVL&N?m}xPwTq`Bo&pAnDM!?=stC@ zQIk?rzOTPLjE#$UpGilk1qzOx`#u^YiO)4RyJu3L5MQ(ZZ-@zt;!)kzMbUM`G6^4Z zn$!I+J*A~HPUyEZaSi&bQ$*NSwoFvN-C_>5VMM=jBa~6I_tSrsW}}LP?_|4f(2pli zkWzEzVceuI3nI?l{sO1^7OJ*|P;8=p)gU}LZNrwy*xu!jm0L-4QxQMNB9F@;#2ap8X8}adG{l~0=iN2 z-eh~xZ7}QyH$K4$D@O;Tg%$;mtam&Jkfbe0K)^+ze`w!3f!3H9lwi)MsYz8gY_iNy zG~Q2#K_?UggIj!}=9aMYt2n&(iYU%h2e}kbqRG2t&>>$C;H{hZ-XDhw89gh(hep{> zFe{r74Zf8KdnZV2%kd5`mR1?-V-*}9^3(5)4cq!{V#=vpd7EZJggrCy16vM^luEut zcFxsHZjC1k@9aFav!KL!K5{D_E{VUNIbAmQ=`iNhpu$#>TTkF(NF&%Za&wCC$#sHg zgx|YZD*Hg-I826G6;SKR_36WY>qubesv%lHKlv3Y!g!>>KpG6u@~0+N3`M`%f16Iw zl%@ZfnLFsNHWayCxeLvV>!YOKKtzm9BbQf-79f+HWClk>OK$apD2>Vu>MiTlB`&Mf z)rJF1(%Qt*JF&)Tca=|QUL@1Q9zxn_r^7uY{JW&*c z3Xx728?X)I8JPI8JvJB$*A$tD<&g!apsVWF9h9@IvOxwJDTKSg#Ys|3fD9b&^W9+=#~sk$D#4pw5TMwxQ$Q4NJc&}X zD+wn>?<)r~p|tui@!3uMq;oq{%A z*iTEaiElkKM2H|CHPT@4X;-syxGgpF^SRZ{GnK7;Ijd1KPC*L)bJifB3v&5I0{$m7x>md*7Y&6$DmQ zT)d%0Ja0sEgJME zvvvTzxI+Eb>=)WsQl&-8e?4W7 za9nIr`M?JZe5=9dK#V)jaFOsG0I0TXP(EMRajd-sq@Nv|S)zf8U(L_!<@Lq@Aobes zoh!FLDX=aDxaO2My956;1FO~cjK{JOTDID?hILG836|#QK7NM5FcW8p*6+#gB#`Xd z%D_S!S?_~G_SC6;#}5C}6~e#V6*|6+@#m9C#oIsU$Pv;{fyOmvD!9*psVBWu8?Fx4 z{X6iu5}?I&prc33>y06&;#q14g*;4QXu~4!A0kAEX}e@J0O|M-pRB@tkN_FG;YC&0Jsilfi>>wq9&cHR}JJxoi` zv_A*CE45qTp^=&5ry`n@q_uKY7zT4x!XTWdDy%I%3vg7YbaRyf9~LeYaS8^nfr++< zqtAzow-vVw!tZdBKjdBd=j$m`tp?Vp;N1ff&s~9L%p5KQzkg>ZMkUc-0bRNEQH{Hf z6LcKV{U=+BnATB@EzUoiS5tyR9#c{ zLf`F}cQr>oP2XKhYTkTQB7Cs%^YXXgG<|*8FdY`%|`c)#P{+E2T?S&V^5t>12}nk#wcGa zUfMoPo7}XkpBZ+^L-Hab(2;9mK14QWxFvy31xoR#6OiDX`2;Bk#<8@xo;z6tim z*YV;$L~+Z9AvvS9blgp9B~gDD2Be7ixhSqY^$EYjnV99tdV6v(od+i%|Ep)GRx2R$ zjH@F`EO;lSLnpTGECY+8#(%blU!o>Oh!f}hOf<$*A;Mfp4h_vCY&}F*Oz=GDWaH?7 zAy1GW2;Uo5gm%?_HmI8U3zLXIAS^*5@K-eynbd)}rx7eVryDjW&I&%eq&|@G=Co=U z7G`e4mJt>o(u*vBw?oTbnN3^klbcgjDsHCqPE2L!?mjx1z|7}z(r<6;31VfTy#jdp_cWyR` z@cc$b<}HSvcz1M@Y@|>Lsv#_DR$#X7Lqe?w*vc%EhAHoi10n#RKKKX483?TzIauf6I2WZ4cP@G z^aEP5P4DGNP}7^eLD__NuvSlRWYp3~B$eBDv}2Lv2n`x?)-Qwza-q}XMIoao3Wz~) zCLwogzoVjH;KpO3lDJRZXPshK|NRa__$H(pK$jPtU~uNZ75nmqNF*oz=nzkOK#IC3 zMdRL2LBw<}S!4Dee2T^#7FtQ^dMphOUL0{xe-Qo8=N7Z5isrmG1G33V`026{&`~Gj z$W-k;lTL>8-`P?}$ZgLHU>tF&mnNMJ!*ZLxQQZHPHynt{x#6p!Ru?Cvg4W6i&6#g& zbRd)1pzut@+DGG5J+)=gBQ7-O2$i&HFdM^#jrtY0Dsixhy7Yb9mJ5fxlE556(p$1u znv9FN@%c*;eTg#KKKk+r1Rpi{@~}mj4*oOrC#&vBD-?)!21h+*gIBKQ6vkk4PC+Bm zh5mF1eSpODYzQyeS?htz%M^7Mgy{V2qyr&NQ4y2cVUn{B z_Hoc7wq+ir0s;ar{I++lbxSwuotqH*{r6lgt|R#Jos@hL z>h;On!v4818TxCtt3nqpd3E;SVBZ;-%*wscWNc1K7N#HxD264}Uye+K+L46Zj6x)| z2bG8^t6_*l7jJVP?th_vBQ8$N`MUtg5mM!U+wMsaPie_D)|#*u5t2J+2Z_q55j*S4 zfEm>HcHD+~!`QEN)qs=7iPbMB9%RY;qy*m&_eMR-cZV0th#7-jR;DX94%Z8wMSI8z zM{Z<8izh56J)5A3J$P5bL{P)3_bXayfD6TY7)pf9hRU>vas^~7pMOtfu8!R}tlvtMTsihf1X zKp~>I@zDQDmmbAu_`pAkm5u2~HbrA9PZ4_$l~r|mDl)j%5fL#uJqnA>fkz-aNhs4j zHR&j$T)4z$=9$i__lpXDiAc19zJZJ~u5_1`r#1+~LM7vcNVLYfJDAukwz+Z;WmJQs zbtZ7X5fAz!Bve2Cx6a@=ksy3aP|obeZ|n_4XxG*%IM^AoZ@ACd@Zk_Fw^~~Tmx}FO zXaa*mC#0~xx9%t@e~Sm0I?qx{a()!Dler%;jJjAGGOWyyb)0h=I8rT(W17{kX2M2S zSIRxQK7CnuAC|!;b};PX=7J~%Go18dh{_y6NT;`L2m^}~PG#qvy{7lZ`kcKmYBM5Z zhk+6stYlLhLSy1;^`K1GVm6M3#>FopAr<;{27%#@Kq;Gtp;k<$x=L9(i!M~hXM3NO z;cFEo5|=f(gRyb8(%%QyC!^hAIFB^82#(Z790xUyy{h%)H{o1PJ9I%bmf``Qx6EN^ zngD3lDSTBVja)1{ShNEGKzS4Nqq`>sHD4U&0qzTS(b2uzZ?mLmhY*eY3wddJY4J@T zjibCSx}wrKgxyaXpPV%Xd?8_x^gnwr`rvV(+b)tR$;a47Jf&!o)puc0SPSpKHx8(R zJZ_N0@h_ceJNQxyla8`<7?F(^ViOeeLBFwSY=$zGKMxm;M=$5II;3 zCc9q_GTnb5h)dU=E75ys=2|)&UvbO{;lI=q+cv&)!>E-~2>vZ2#WMExJL4U}_it=+}Y4dFXwNo^4Y1>TUA!K}ELE)iK)=IDrGwLX!vh*RP z5LyhVVUvY+t*jtZQAPV{LqSTZxZl<>klGZoupaj`XepX4t0L(=ie5PB_ZW6)qMG_- zP&lG@RGwL|ERAul@(-;F`lul*QHSl;qex`j5AR9#89nOTixMwvxagQ0)imgOCiQ-Y zJtg!ae!N&l5GkBC8-M%kv;YUkVGQCs1WSG+A)&{8B1yZ{R?|0W#EK&`yKQ^tHF0Un zLb&+&!6dBQw(y~VwaleL-sEH}h313{jQ zqd`}^WKXo44pk@~ef-?`<>YcC@X4}MkmTi)SMwO43+|P)j-&4-AAt8tqdpeMBRO&G zO)5_!yd;iI&bamuE35fi{xL-c)2?-_IR6|cKkPczWXTCb+#;F;d zM71A(*V1NXhOwyxetQUEd{{@U=;4-r>@+C>v-5TPUo?Q|hpcku2cX-)$|!;Q;>+!18$dVu@Q9WZ@Qn&W=wN`^&$18AUHQ4CD! z{`HTu&orH6zjJLGmVN?Cbz&@}uBx=HGG4kC&iu3VJLQ0QYomI3fM`_F%M0l06f4Ad z5p*V91R{@sZ`FU%MW|P6&)_#hwT}At&R_W$LHf=lgvNXqj zEW*Y&nN3%sj&^=MNg1ZUXk(NJou7C$3@fc?0^2d~JKE6Kncyp>W)}N_ckCH6JNv~o zNEC`;A5*Vlt8_c-$VUB&yS3${srRn*WBKQE&K8Tfugb=^wP#kKwP}EL&Ckb%@nw{^ zQ3y#RxYv3s>T{CHpQVM-Jl5RCR!A|Wq|ll(#)qbH-Yz->_kYZ*Af zSX@D5C@YlkYi$~d8qvK!wCu^E!<$ub$L@W!^2yyN#Oez3tS~?&UiT2#KDhdjn!o6~ zn0~wA=KoPQUXqekxmw1mP{QK8e}8Z3Y0+t|6i{|rr@{Pv#6=ooa?9+ilNz(L+2yaz zasjwDPTh-4m%JBlE}hCzWTyVtO5Dlu0<<#4kzao@7RUk4JrDh|$aU_0pV!O$O;6GN zVKRTE-vW-G{06J~w^0hp`h%4I04DK+H^8FhBiH4RnvCQ{rDnNN$KB*8ynjQrizA=v zxjWm5dg7S>$=ojO7~czZwgbvsXkX=)tuKKOi7M99spc$6x1yu6k8y_vQOVC+yA%_E z=uDIruJOH;$Vb-bXQMy<%rQI9u3MgmQV*%;{?nSwH6|vS%)yd>g1go+27t0KV`D&- zdhY09U8^^B7~thj&6xVU)m7FXFbc>%23CyT5<~)f57b>RIc2Q@Bdk}}46!OSXI*g$ zO4c-+U5ht-Pe75$>NZA4jke)jg>@q5Lsx9-o!?`Z23G7O&6P6sjmCL^d3D9lSr=Wd z>k_2rp2k(2XBFk2#?x~-o_T^S#cS22>mt2hh5_(}L`mjtf>)yN-FpgdYYHOm(k4cM zy5(kReH8iHktc><267>Ty82gG;0r*Jd)6z*X4SPoa*Kvx&D&0nPKyp{r%vTb3jyOR zAkw8F>MAFAecm(bR8@RmReY$#FPJUi=|r4YofY#%kmQmX0D^Dm*QrE_S$2Na2f8JOJ5?%+ynTydH(3GY z$y&+(B9i9NWm7QcG-s1BwKY@9VR3dHlOD>n?w%XST*N^A8nbCGhJTy6s%nX~7az@} zBT!JJy-5~H!p`w^Ig3yVZ|n>gFix=lPRigf?8;_K8zmMYje$?iLpIq>;{&6$6QxHa z!o0&PV%5#UpVA?Uam-?07#9`&=4gw?*<1%Er@bep9J?hSc`EYL_RCL{?0nNC;!bcT zjnyX>iZR;tsnQx%D~sT_T0&x_)O!~Rn|GfP-Z-%! zJc>Q^(e-zr<+PYQ7QCC@HD?;eQahCyW1skg@^=f13_{6Hci>q%3h9ekoy0H+Hqut? z3WdCAVBRJit+s*2dj#6ymM9Ne*YkJqnR^}Jr7k~MG~iXBMOH5ErnV&_Bbo_9ihZXx zf_Sh^J+=yG+<@3eS1N3}EV#IX{U&Tam*JyeNPx%S7(5Xg)-$ERhakP@*vEg2v{v}m zLDb4=_1&rO>VFMiU*fzY=G8RBZN#SI@lo%Qi7fpMJBo!W%`9~N_0I3CTM}vE9L>Df zjK<#sG7A%r`#>_5O4h%Ofg`-zQRI~C>Ro9SMj&CdXLEH9dBC@wvPO&IRnvNq9W#m| zfC-MPd+P3y_m+~<`P6$AFPlN$SlkH9*u(i=Q*1`ba2HjJ4z*?WdOKEs2Q`;ai6tgd z1VM^!IOLZ_KYNCtkQ;(0HR9X7D3oW**Y5jdV98vzE_?dkh&mq+E7uB*@KYd78lDV6 zIf!DclaVC%bl_AiGaS8(nHnTX?;1zJ=l12%nkjB^MQ;wu0^>^n z8o;LQe-Jrh9`gdQ=|4$4toNC_zc~cH{z9j+fQx+LP2hVX7Z$G8X~$aLAAKAc2NP7L z9Q#_J`DyeE@QX`eo74&U+d=&Ns>H?1r)nh=m`oix(wCnHhT#CK6rQeb6zO7_W{Ju- z0k5OE;Ly;}ODtFn|A38#lF(zp2#a?Qda9$l!F`^uhs6@rCs%-gH0$*VApG9r{y}RC zxSW#ql9#ICS>>@uAepmS-3#h-35U4kUJf|5{d>rEOJ&wr)co`hxr2>cI}Zp{(QcMAK6=S^X}j(G zIp2fg{S%|WXZSOV-=BGxfjdFfV04z-=_n@zePZN2&|+ekA5GPNydhS zG77g0buF3s03w5wTw*bT*eswPHYMH1`CKMS8$ot8r6l^Pj$rVb)9tQjD%3pF91>v_ zVfmmL7~#f?*+(%JO^%P#_u~a9!Ed_;wxJ@N@dpyBq^8|Y`qio;O(RSm0MWlQ06?B@ zzT!5D;q1dRH&e6pbuRS^t-5Bl=jx-=k>zMx`v+Vs`KQ2C?oJzxX8&1WQi97|Cag$m zc?u^lA(gy(24L+kWjg`19)LPF1|=X+0Y(0hTVW>aMHCy$>KRxRCij@h`TF%MSVuz<#b*_Z7e^msbd&C&0obz0Bq0Q_^rvS&M~@Xa`#O_N)?@N~UiE?MhoZEdk&!K(p|nGPX~Y zrTX6k;DWdK;f=p;Rm~$%fpuqH3>dP3#QEjl-@N0eysGO8WeCs;0@0Icd>AS0;VYK-*lw#PND1?bb{?BWba7 z({L{<`#phjH*SnfPQLhn41}oNKMa}$ZD~gzV+(%lwB1tp#1vf;d-auRX z=L}%|FH_Y!tmnv+#~oqErB1uRrD~b8zJ;%D0^42v)ivVQcQ@_OfKc#&DE z$wRHv=u^)`ReT`)1*J-Xk_ifkU5WyLj|o& z#8G$P&wy>HlPlELh=^E#({^^#qa` zxP?bEPUF4aw{wblS-178Z_BTq&l|l68`;qujDO6KtA5u8tT|>HwcSR~Q{F^#Q}JA@ zJ(slu)DaHxpRcyj=S|h=E`v-v8U9p-Ng4eKHXUF#QCam;r+)b^1RRvtemIs_S$$q~ z`tiLz@MvnOD__9L_gr`WSVQ|N@GVwk2Mab9eK$be4FqlgMt5DfgMEJyRf>t{TN{vpuhc0(bMfumG%BV# z@pHg1hwc@Cos<(vCN8JFkX(5IDfWlKh==FeR4ktKZk^{^kJTrrQ@F{w0u{QRn_hW#G!;dyn0Bh4z%+06!iAb(<_FTLN^ej?V&3 z=?4;QYJ1ZhXH_f76CXuWu4xLA{%9W`H?vk6e+@93KG2>!dg*$##Itqr-G*Dh;Q97} z=NlM{DVGp{&+ee8w++-T z9o8;}zjQem#ZfEflh zejuQu4YS;xKTWIMAy(nXttqdQ$a>+A6|2r~IM%AL}p&CwlzB*)ycCfsLY94Ze5z)LeQ#OZ?Bw|kHPlb=~`$IeZhB0WOt^guKQ z6jA1!YhFW%H9Wxl{>B$j{o55T?ez?#`e)jlt@r-8ed&sS3HP~^Skim$k~^T@AxNLs zw5SIZpJ>hejd$@kv!#R}NKi*b;W@lKXU|fh|I=c3XJgbhtUd#vX9OTZC z4|ONWr5j5Uuu~^Y*_>JlO)J>EpQn$fhr@x}4AYa6?k^K$*?c-Ocx5Ymm?`lVOK?hW z-e`JyEHEMUYD;yVm6b}aLTkzgZAedKQTGYKhG|fI!H8DPLBqx98A8|e`J!|UDU`|O z(WJ@9*X-{bktwlLfakT3_TgJTc*8bt)32hPiHEP`ZuUO~2owSuF`wIp(mB5%m{1}R zN(*)ih>Cv*3F2IYDlcdyIu$)2 z$VBNQQiFNg?+F*Ho;OGaU52fLWbHeMqSzb=He?&oCB}ksPDQD% z4)li_0!)P%MI=m%607X+kuICwN{sPPkR;O`K_$5AaS3o2o8Y+x8U~>=3yG)Q!H=Kt zD~Htl(uj_TjLaI$8J_S+^;T$+&GcPOm727(6?BlX%?*Ni88O)$e`o(-vrCIK7bC@C z9~S_(n(#*`HVNyYU;^Q@E0sv%jSNTOxJK!V!BU`b)YzfKg*nNgd>F_?`-g1FnN{Cr z;CCJ;S(@=bfBTowrSqo{q54WkH8xz0)(izUCW14&t|B#oAL?!lXNANNTK5{ON8Hx} zy%xrrg9=|hJ^;R-n}L9yKAuiqgBlL}BEztEuM3};AmKSF0d)#~CKZ35gnXTqw_u;$$$6l39;*Yt+q-@w;DQe5 zFUNbt{A}2q(-i9%uFk-hLo_9MPCyFfIO?GMG4!~x2|K9BHwlp84@$%rxunV$`91f%>gQxZ7qBQhZuf>f|T zT9orIyV3~0PjEGIGo!K@(OfWN)O;v%pLKXIprfIId#Bf@axGt4xQ8hldYcnxJI6j= zUkGQ1_2s*z^LpAQ*5_UP0L<2(3LHvGJEr)swQR$98E}Q5*k_ z1n8zpy+N;^MA*YH{NNEP0i#Ju)N?&Tl&v!LjM%ox=2lSwoh=;g)@@*jc4#1Ry!Q^> zh=hybIDSR#=}Tz^{w#}B)o1z<9_n#)suX$IBeq$j1p%sbN=ez{4ft?QLFB~|6yzcL zck02LXrl4IkvyKt*%pcEy6qgewb#VsF3jT?auh5n5N*V?0Y8Tp6D{g zwr%e9O(06=wXyf<@+ht(NMRPPHa?4WwT=+|# zw#8w3jojc*bj%A&0CB$`1+|rKOA{d`670;KrUcrfjiZ%s3_8fF~iO<%;Ry!Os z_2?dCsiF6V=rjapMK+Ax*t{+ImhoQ%&Ug#ZySL;}rd9@bG%^FsNuA`QoOoSBtfu^7 zf919hvvd6!#U|7?!Xy2vD{2_YKGge<1fAO%Y2sh{3zUbJtbNrL%zK;XUdP7GvP>3V z4LPnb{h)3?jr0{_9)dUx1*3fuz8*fgZ)S-_u=E)CI<&`@$Lsdl{$50e5Nzn9ulJ_d zj483-S!6EzZ)YAmIGY|SrRh1Y&U$4Ytt#d%8!C&a90k5dJ>@35mUUV&V73Q0S$#Nk zpp=zLqu|y2=)|pzBP)NLOPL+0bfPW3-Z*fg(m-Qk zkIaTNaG~M9hY{DJ*23`W3JNel)Q9>>=69aC%}9849m>Z;T1-$weW8ZMKe+RrP5Zl# zG=}Z*Ras`l+H)T*gL07+DKvC{nbGQGC7qU>TF*gaOTaoA9rgnT&u+>c)EM=uH@9M< zwR+6;_Ou~_!cE$Y`X@~MQmYFbwDqX(qP|%uQtW^J#@NHQ54Lt8ehO{(8p8al@x4kN z4*6jihFhJZZMzh+s#6RtNXgxrVYQqF{ZrUs1=n$Og;RHY53yK_^)X5uo6@2Z_hf% zF9s(}7D6Z0Tv-=+j30b<+eb%@oG?sC%1%249B$DEiHdCUv^b^CVmuCacD30(pZ)vY zA81*Dp}wiDk{@i{j<=%6797&&*@Yu;&eVDLP#->>TJ~-{ry1J)2^JS-oy4+l9EV)T zG4xtDW=6O-`8$#sPkS@>t2>2`3FL+&R|u_0`p2bllUFkl{T+rXlF_s8CzT1)YzW4o zg_1aanbGOo$RrJcThDD5Nfn5cjQPRywH*s#!&bRZ|Gs~`iJrES)%l!l&nlBNkuvGN zH(J)){F?DQnN_nC4EPI{!M~k)sS2^fFK`7-h%qN~%IY)4^tqR|QLKh`M(9~DS!4Mj zRemAmN(x0s1iJ1GEjOian)>n{bH3xGMHa65!ZaK3189sVU{-Dq%iugN5}5bGAffiuqfRRm!&_%278K`eP; zvs^BSl%mPI78GPbDkhi?W2zu^d>gRVWD;rIIhnS zI|Lxq&?f7Sgsa8)Q z+S>Uc{>hv9A_(!FfFxo8J+th!BDBd5PKvOAzNK+wnxA)*7QBND>HwH1Wwf|JviqO( zzt@=j-`1c&{r5V~|K!mBIh6bFxi|6uQ~2NORv10l1EGejA%p<2pL3PN?gk)`(*8-pVn^2(D^?l8Y`%5uy*-BxPt!I+H0Oj0LHva)r&ph(wD)4( zlxsyZ!q1t!bKh=S^CZ5<-?hI;y?;NUPeK|$LAwguC88g z+SPe9U-4mC)yb(cKR+LvfS_!6SS~y=65*$DSD6kJ885Fcqi*%w!}W2K^D56beovYE z`+EjDIyH0iJRwrmT0>ZfmIYd*q`A2{GCI1hlvEhlUdeaiPhislggj0e4hxk8e{r3+ z&$KqR&%e5MPPcg-Urh$SX#Vs*(eU+cLqqS$9pVSaY01XX|jOYHue6DyXI9~e5zPEqV z+RNvlHZCVc7aQ$oQ<9SMXG>HOeu75e_bQ>b_lNn*4Yn1AKU{iTO0-g0ASo#+2g#}; z)9oKG8*Ro3aq#f|)AXz^Rs5cNc2@_}(NR%|cTZ605ZO55Y3Cnn#gihB zObN5l5H)(Qe}9Ze)0j0c_r_raT*XwOsAy>!MMS<2yn_S+}hqw&CVvC`Uryw zVKHjS{dC$YODXeZDjWq5njI9i_8?f|vgk)t&R`PU?|XIEJ1rG$5z*>UldX=i?rM@cmA5^I|hM1REFEVQ(z+ z;W7ts(jD=LiHp+#CFix~wRp(ebsr0lPRf)%iqjYX%0<=Py>6jWzhHMX-Ek<6M8IQ5 zPA$jqvL8#;4s4-WL}qCL!sakX$86j-SM9MoQ>;wX0UE>6VoeS)nru-ZDkUV>;mk+q z!bfPO);yHd?@at;y-SqN|F`=PiSNITTc-+JLx|7aX5{rR#+oJd@-cz;2f3fIXv+hE z7l-9~>c}%FNWiZ5Pp^Y1@+#9VlbZI6=$q3uqN#gYmF&`V(}3kPgEW|+q3!8+z@6-P zHveo|gr9q>(W{tWdqXAS`O^0Y3Cg8oVOjW<%E;~dN9Y+G_?uxbS5RS9MV}kL`ySDc z%C<4X1tle6b^tGrgu=d!3JMBL+*>iDyBg^%##dW0tmU?o-vhp(K!Pro+Po@gl(Py` zQn0%aph{-Ts1?%=77SfeXZ6p&-ZQ}k#fv=1^+lrJK5nhIxLZCy{|nUp%Hw=D2r7R{ zbWBWBAP|6x&n5;A;Oy8)r9|_c-&t@38i~OizGZRP62T z9o9RAV?-gjGaju*V7X&vX6EX*=On$5&~I1I)RYuDc6N2JhjO=AWD+R8z?XL4>!Tv! zPd8dV7OvSUB_Jl2++Xf9($EaDg062vH4=?vrsMWc1t^@mlTi;pzxHOQ<@}23w({Sr zX^)6Ot0xPt0hdHw%rD#yb5mHVLU~@t3w59dmsh4S8#=7DdHFt_4`~<3pmvSb*-nzi z67y@g{P_8w%H1GzmOY;StdU5**Qn58t}^K`=iU3! zgftDj`~w_7RNP&uHiFs!O+h-q88-`=^;t5y4-^&m7ao-WlD zG&`>rXK_2G+52VIKxOcI7MtP%pZ;~|j*N^jy+DE-CO6&a`1$p*Xq0L@KsEb$J;phi z(vev2CcXFfc?>2S@Rlh7ibXAlfaW|S&r#BB52F^=dm*0_=4V* zui%-GfMIw91yLhuU2}H;ESIjjiQp0Rtzq)QyF+8_7)ZvDH$1didC-$%*%UQ|9YuT zl|d0W-#m&nU#c#tS*%oNgaCmg3qKqb6#W@8CAFQ%o-Ws}V0m1#hBCXq*iEBNEd2Se z^XsPzN zZ}qet^~x_ONX^W=-;TKp5Q09t?E==)1_HZ-pcLffYG1pSLqbA2TJP%G70}n$H|Pp@ zjt5@YAxtLiOCIhZKI)qK&o>W&dTS;C(x8u*d(U^{Ytf2}z9m#RI5_sJ&CY2kyp9WF z&5yWHknUS>$W9;gPeD`F($bE=w$lJAsG$l>Hs~FPR-wKn zr6eYr-)Hu*q${clormr2fn0i0_~mXJ#LF~?Y|%gy0s?}h7aYhRpKa99SZXRNPzn%KpVEdh7toc97O7--*3Q?Re^e& zwvOU<`kSABGDp<4EUIr)O-n1K2y8Id3FOdBUGFEGA!-da%8J|&h}iO6rT(l3vy7`T9;)EzD%p~ECSqyi5Ld`WK@Aovynp(9Ek zEdrm4A~y&@thONOE}{V0U~MA^3v@XkB{Ep)%*_>BIHgR`0=+^7NV>%Mm+Ec|KtVxr zkI2Ej8QJUK62MdZ|Kk5y4!X5OVjC@MF5iScYFzG5F5;Q`<;~4$SzB9wTpQeUJIHdZ zR+o?ndAK>LV7DBkqo9ybpx5njuL}zRTFr5Zu)fV;*Bj91m5w2pHK5C2w|oz}=dOw5%*?Xa5C-Jk0pAe1Z(orUJU+TQoDKN4 zzcmm;$Z7Kh^j{l`A2EbrgB%XF<3$$=<&&Xrs@hvx^nU#Ii0OR3Sq&OP$T&KfE@<0L zGX#J7y?t&sQz#EICNHr)Nwc?*^31I*3+3-Z%NO_E7a;wPBK`EYE@%QNW3O(AbQbhi z&;qugfJi^?ylq`O4Vpj!C?Q&$tetoH>l62n^-jwiBtkxHbe=HtYdxU|O-{@8xntkb z(uzUlVW;!#3q*v>4}-4d+7!4p75}<^;(c8G^K>gjtlNe(UiQP9S30OYAq#!k{GRV$ zp6+wU(I3yravgS->MTXx{iT#A5%it|Bhk5LXT$j_!^Pu{C(xG&1U$9;uX3(DoXUOQ z{}zg}rBYih70nq|wxU6%+Kuca<2Hm{smPQuGBvTAC>csbAuO2^k~v$7WRpcQ7ny}j zt-}5MI_Eymx%ZxX&U2pg=lQ4J-nG{IzUw!9zn^JEha>K;ds*kjJ#bRBY;BXRIBdOv zDTaw5j^VAgI+|d#0bXO!ZxZ(1T%#iXHaH?82?(MhOhF^Z_0yQ*CTVF6)aEyO28Z;L zn-98SIBq;@e6;bzpAr6OKK6KcU%M75fTVy?LA`VK=^p_kmH4OHyU=^nbtMUB=0; z-x@;7G6S}Awv+hX9!pnTy>dkd3yxJ$1w3A2KR?s7H1#Iw>*yT_!)dl@o_k2=VnwI;y2{Fk zZK8w5SKCyv%1dQ2DY7M9rk=>!*U0wUHhh-r6j>NajlT35(YX%I41P+XNEl-gZ&c zX=1R=JnOd~c+|)OK%hUPwo6G#&32I{T9#=kKgc9A1bna&JSRu%ESO?UCi}t#K2GwX zhTbQ*qvt5cz+|t0#0kJMoZNQN*Vlb%=*^qaH8nLGSbb*RlNnfH3&q9l4DPI(!H^&! zvStIHXV(ENbye*V=R^mnum=YRH*i>zl2uq+3a8%hjE#-0uaY7YHMm~haG5kE@Zql? zE#13*-MT*^H>Gq&dYhuuNjryw9D*mzB8);wA9A`sqb}ELzY+@9~fiIuHznMRotK9|#f`nFwLOEK*FFui5-BPC_GA2PL>cKS7 z5F}HMxQ`Dcsd#dAPy0jksfgH?^{jzc&5$0LnCW`4T|YI`jZ-Iwbmy>p5TPG7Ja+6s zr5vqTJ9g}lsdy8sA*w+?1;`#bc4=+4W$un1=FNH1q_nY#+bJk%-&RO=F)vI>_ z0l&#=@k;FLvvyOuEA8*NWr@|h#|hBdcpH}!T~Dx6bc785rQ1F_tBNgL7z=jOjhd$m zZGxxK0v&GMdB||I=el>th5`-GgK!u1?vC;qm+UNHO^*1~ApbR{f;u4C;Lipe!8no& zysN%{zaH*AI#?{6KEbQDIs_`LpSahr6cbxnStab5GpNktBMLI29k5I}C^&dwpFSZL zIEY=Q?A`@tHOECdn8}D*kf@(jJu&n_PfKeqeM^U~mR8iM56>-8^NVa_t5*<{?fUv5 z1NmQV=ZG`Z7J`>MRVt6KL$u~?lCCi*eH zVH%4m!@P(Gd;Lj`T>e=1gB9f4&fU9x>k=o;&h#rZVJ}-u`HEvS0hH@G%gCZO%HIKn z%pRnHTIyBaRUR$m6*d|A3=Grr=e?hyN5w|4^xeXFCN6<;vtwe~FGq3`4GusqXdP4` zx*NtD9RsLLT~dj*`4~`~xaxkHN4yTV~yj z_)Q=o=bCuf%Xx@(Xjquh$F-*!zMYe=<00seWD@q?} zrL3&%TUHcv1s+vWQj*R|Y6BssizIQIf9{+7;YiGLfHt}-Hn;rXBBqvcYP`u+T0ueK ztxZ(ea$FPbt=hTn(D!>qgJc)kGB|VNaP6PwQoo58Jm-HMwyuRFt1;Qv{_-ZHkB?|A zYaXj=9_#g>Fm`z$M#O!jvdm=*{QBYx2%zP4E7QoM#+zA=#@R1|VFdn46rdrPnTLD`z z0ejHjb8E|9y`nH(^&P-~&2an6Fcr_IO!*V7&W-kUD_9KbLL_kH z^|nu45w6WQunCR)R?Z+=a$=ipYoI6F)K|`7%D+g?WG~cYm~6)#mroc!a*PzxDm-|M@nbr1gl>otrXs%_yaCH zfCg*`Oi^Szi)dZOq;+?Mn&|_+!=Kr5t(Vu85d`ccB#$PyKYYuCG&9LB(M+AbGxI7;aEhfFW!oZr3a*y=U<=emL3~TV4+beLH6 zl;gsIs{b%^7Ey`Va%u-HG$2}7soEd=;jGD@td$WGS8422Ao*jrQ~jjh3f(eqe{ln4 zblCmYG~`V8o`g6mx&9RiovZ*7>Tk$8fZy4=WC;>eAQ%dxF2l?Kp@Fg39Yc2l8w{0~NF}|zxi)dvl^=_2ix=_v z5O-K;&J8wMGjfDTypwHC|0dcDxtLTZ7yjhJ*mnj{LD#i~8%+ z_n`6Vpy+fs8GVg>&rVE!l(3Dgi{N-(d(*9p^9r6^C;GM{&#(SABs|}i_lNrwmSNFT zMI1FYjv5#I!pn5gB`eq3T)c209($Uan-tt*ZCqP9n|vF9Ld}I6nBmfIb#@J`&CDx$OPydfirz!^V&WyZi4#zSg8`5+jC$QIG2svGBS;Dg>*_}q@uIB^8V8)gv@KDSpZ0=X-bul z_uEH5Qwwgzif6-0@k_wWeowi$Sy}lINNuWoDF~&9|0OIFd48Yr;0`-0(3p^q$PN3z zqRI7N-e@3;GTd%ZzzwdH6ILG4y4WI?O4aVE@q%&1=iN?LDB=s*!mVX9g_!N1uie9Y zu8)0cF}ug5Qsd9U%HKDqT)g6vK$(aw&|9^vtl0be3ok!@EbrX+_Fzd#iD_v`Y3WJs zNVio(W>QaWlC)p(!JfC+ca&D4OS*HrpaRC|Yt^d;60RW=bg)hj{h78`$4&R1E`55KziEdR1W4dKxqjt*Arq_$X5 zkt7BQ3${8)Qs>+zD#kav_p(yYG<_#zVc6(G6G@5{cQ)5S%HUC4 zYaRw$IUZUxBVr?zGWvQ?6+akZ6qC8(=!qAMLj|m9w%=fT5w6g&Ad9TYd@Hitk1B86Xbo{bQ9h z)UbSpe-8+#!-ju+^yPf4psHbKRg4eIIFsr)G*N)^ebL;kVn{;b{NIR;D3A#d8zU=) zT|rKobFCrl zvlGiL{kzxD-&db5B`KMvTb!vw^ksKrUMw6@3d&B+F8nam1-0-mxBmhSR)*gvK7QTS zJMxx?vu|U4e)m{BH1_RFGl_-_=dKBNf*!UAnPy<;r3aF|m^g zTEG5E;~@ydSY`wE+gm{30vCMb@pbav&wlOJwGVH@Q&Y z>A^w!Lr_l~YGIpsa!1k{YhY)~)ZuBVjf2`00D*XDvVlN)w#sgei}bPrs3Pl{&>UHH z6TelsLMN`An*7Rv-l>tbum;=@F8=lMjz^74VEC9IErIPHgCB#=uCw2=1X8mOeEED; z9v~B5)ZKFJBh;L`zw3$&2X{5V@6%RjTq#(Emoxy=uE%`hRl{cLJH56Li5(f$yK@OK zNybR0WeKGs`TseNi+*~^zz(76t0!^XL;@}*tGSTkk3 zzhV55x7m-xHvh}9a*@5&u*9D%!Z*1BG$#)bVr(_(bge*!jG)n>-=rzMq|!7v0DZQf z>YrT{w8@^JwkzbKLW_bN83Joc2SR_Q(v6Wx)>+%Eh7cq8s1Kl{qv58<*5Y}+$DXNl z9^i*V+#K=}uo77Ds0NFWUv2_4BC26*1)*}_ctK9zda@5OayskM+%E&>Fg@pb%@ z0UC--9S-c@$!w6jt&kZ5C~v} zymg>=(t`g0;jbm6qy_P+?&?@o<8QIjd}Lowb?g=7TFl)J@8g26K`XPSkH*evZ$IjZ z>`P`1sO)(V3XhV?SxtJ2>wz>G8Zt}F0jOv$Sq{_5u) z{;KUy#As~Jyq6$^Qv@g>Z~gWsH^ad4)$o#9JU(BeI)BeC?Etd3rR8}jWI<}+Gf{zP za~^>JS+6ZjeAok!A*(@3tQy{n&!2xEBaw2YpnWCTOQj}x`&KpMu)r9^$C^CHn_%|e zu~A@<_{%iE0pZmc;lWG}exMbF1W21>c%2SWeSx))&=iWFjin}Kr!jyklJMj+!!Q;L zG2Pmr+Rnr6`x>k^S-;hSPC8n-?CY7;D)dncR+__i2@%Vw0g~rDve1Z)i)%0v1%F-7 zV(kaNL_{J`9-v|aYf5`Dug@xYGKO$^+4efI-OwWSQ%r5n93n(2IzV;mS6W>1Y(F*U zDYy-{ZwNr@h6clcJk&j-)OJOvcp4!+fG&O8MpTW4M^ILvBkNKx3+U7)so#E!{PEXI zVDCr2Y6#kjL7`$)wT5iHi$S36;S(ffFo-}VhAQvda5=Z%&N~rkrru~9 zw0YUQkw9B`)ebfW53Ued9t|tQ%BC&Sup6Ma+>3iU7 z+}J5-BoBpEziDY6&(41n`U!fpXZ5d{)`quj<>G$_Tv&&ET`yX#x=rCD1cL3iQ@GO!4v{=hYM}0MQp{B073n^{Z~#%b8k7hH@J?SjH+M^7M1VTQ*%Sef+*@W|Y%vcZd zeOfS1=ZlC;KBWkEy|;Pvq>Ob7Bt!55-cqOS!mwM z-Ce;3rU$|KC*4;e8L=J&9GQdOHb3!N_$lAqCmVua-QKu|rbLqNCNZK=Gijz2p{{v@ zaolW^^(D`rvrpC~Gq*a#`2Mh1yG?o}eGCK(X>zMPRJIP<0u<$Y@87@o8EduQGSaC! zZ5W_5{CkpUaRZZhT}OSrz47==rKN|Yl$1;m4%5NHS|BPK2Z9_APW<#^*hy>ez~x8+ zVwe=&N8;y*t2{(NP8vMQIMccc-hyp!qI-Ec<_)PrNWQ-P8I$wLs_ug6uLTMidW5UE z(H7o081na+UgWaq*ztSpEe+zh0WI^q%VU z=Eml?@X(AP)K*UV@dJmR*cXXI7S&>*FdBm`P})4{Vsj_sj6g2>_GLh15ZD?lI`93w z$dOeSczaVYyHwF>u=irWmmpC+QFZ^K%GAV>?^JGF7bV6LE*ISJ#G3oN1PdxVvUG^S zBZm(4Ys-|45Gg$yHlO&Yr+^?+@(=fmnYxviiSGzHjbar<)3z@xQR9N1x_(NAk}oUK z!jG;ZO0 z_wJ#C`d}Is)a z=|YixgMiRxikGM{N<**mnJ!WKX>pQTv% zG{y;fV~J=Vkc4fj@zY;oF=~*oXxW<@iBq+NCjQ;@(g4(iUc*K{y6e)~yMMw~Ftu#a zHn!v~6sATZ{@pWFDqaWI2?gwY(|kfyMbI+f>GouI-lYbBwWnjGsxFt5LHJM1DW(&-Fqily*u=SM2MiT_MPX%E`EeDypapMNt zF#Q2ianYbTmIyf`U9~;cIDJ>fEE0-LI?Wx!PIseA3h9b>>Bj>oZ$^qI9u)j7i-$qpZhQLrx2q6 literal 0 HcmV?d00001 diff --git a/frontend/src/common/icons/design_files/Training.svg b/frontend/src/common/icons/design_files/Training.svg new file mode 100644 index 0000000000..d8e2df0e0a --- /dev/null +++ b/frontend/src/common/icons/design_files/Training.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index b32055e1a7..5342e36e11 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -27,6 +27,7 @@ import { import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; import { createSelector } from '@reduxjs/toolkit'; import TrainingWIP from 'common/components/WorkInProgress/Training'; +import TrainingIcon from 'common/icons/TrainingIcon'; export const tabDict = { txt2img: { @@ -55,7 +56,7 @@ export const tabDict = { tooltip: 'Post Processing', }, training: { - title: , + title: , workarea: , tooltip: 'Training', }, From 876ae7f70f1b336c2725ca233dd81c2b47a02026 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 22 Nov 2022 23:27:12 +1300 Subject: [PATCH 181/220] Move full screen hotkey to floating to prevent tab rerenders --- .../tabs/components/FloatingGalleryButton.tsx | 61 +++++++++---------- .../FloatingOptionsPanelButtons.tsx | 47 ++++++++++++-- .../features/tabs/components/InvokeTabs.tsx | 50 --------------- 3 files changed, 71 insertions(+), 87 deletions(-) diff --git a/frontend/src/features/tabs/components/FloatingGalleryButton.tsx b/frontend/src/features/tabs/components/FloatingGalleryButton.tsx index 01ba941d15..1f68739783 100644 --- a/frontend/src/features/tabs/components/FloatingGalleryButton.tsx +++ b/frontend/src/features/tabs/components/FloatingGalleryButton.tsx @@ -1,42 +1,21 @@ import { MdPhotoLibrary } from 'react-icons/md'; -import { RootState, useAppDispatch, useAppSelector } from 'app/store'; +import { useAppDispatch, useAppSelector } from 'app/store'; import IAIIconButton from 'common/components/IAIIconButton'; -import { - GalleryState, - setShouldShowGallery, -} from 'features/gallery/store/gallerySlice'; +import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; -import { createSelector } from '@reduxjs/toolkit'; -import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; -import _ from 'lodash'; - -const floatingGallerySelcetor = createSelector( - [(state: RootState) => state.gallery, activeTabNameSelector], - (gallery: GalleryState, activeTabName) => { - const { shouldShowGallery, shouldHoldGalleryOpen, shouldPinGallery } = - gallery; - - const shouldShowGalleryButton = - !(shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)) && - ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); - - return { - shouldPinGallery, - shouldShowGalleryButton, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); +import { useHotkeys } from 'react-hotkeys-hook'; +import { floatingSelector } from './FloatingOptionsPanelButtons'; +import { setShouldShowOptionsPanel } from 'features/options/store/optionsSlice'; const FloatingGalleryButton = () => { const dispatch = useAppDispatch(); - const { shouldShowGalleryButton, shouldPinGallery } = useAppSelector( - floatingGallerySelcetor - ); + const { + shouldShowGallery, + shouldShowGalleryButton, + shouldPinGallery, + shouldShowOptionsPanel, + shouldPinOptionsPanel, + } = useAppSelector(floatingSelector); const handleShowGallery = () => { dispatch(setShouldShowGallery(true)); @@ -45,6 +24,22 @@ const FloatingGalleryButton = () => { } }; + useHotkeys( + 'f', + () => { + if (shouldShowGallery || shouldShowOptionsPanel) { + dispatch(setShouldShowOptionsPanel(false)); + dispatch(setShouldShowGallery(false)); + } else { + dispatch(setShouldShowOptionsPanel(true)); + dispatch(setShouldShowGallery(true)); + } + if (shouldPinGallery || shouldPinOptionsPanel) + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); + }, + [shouldShowGallery, shouldShowOptionsPanel] + ); + return shouldShowGalleryButton ? ( state.options, activeTabNameSelector], - (options: OptionsState, activeTabName) => { +export const floatingSelector = createSelector( + [ + (state: RootState) => state.options, + (state: RootState) => state.gallery, + activeTabNameSelector, + ], + (options: OptionsState, gallery: GalleryState, activeTabName) => { const { shouldPinOptionsPanel, shouldShowOptionsPanel, shouldHoldOptionsPanelOpen, } = options; + const { shouldShowGallery, shouldPinGallery, shouldHoldGalleryOpen } = + gallery; + const shouldShowOptionsPanelButton = !( shouldShowOptionsPanel || (shouldHoldOptionsPanelOpen && !shouldPinOptionsPanel) ) && ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); + const shouldShowGalleryButton = + !(shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)) && + ['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName); + return { shouldPinOptionsPanel, shouldShowProcessButtons: !shouldPinOptionsPanel || !shouldShowOptionsPanel, shouldShowOptionsPanelButton, + shouldShowOptionsPanel, + shouldShowGallery, + shouldPinGallery, + shouldShowGalleryButton, }; }, { memoizeOptions: { resultEqualityCheck: _.isEqual } } @@ -40,10 +60,13 @@ const floatingOptionsSelector = createSelector( const FloatingOptionsPanelButtons = () => { const dispatch = useAppDispatch(); const { + shouldShowOptionsPanel, shouldShowOptionsPanelButton, shouldShowProcessButtons, shouldPinOptionsPanel, - } = useAppSelector(floatingOptionsSelector); + shouldShowGallery, + shouldPinGallery, + } = useAppSelector(floatingSelector); const handleShowOptionsPanel = () => { dispatch(setShouldShowOptionsPanel(true)); @@ -52,6 +75,22 @@ const FloatingOptionsPanelButtons = () => { } }; + useHotkeys( + 'f', + () => { + if (shouldShowGallery || shouldShowOptionsPanel) { + dispatch(setShouldShowOptionsPanel(false)); + dispatch(setShouldShowGallery(false)); + } else { + dispatch(setShouldShowOptionsPanel(true)); + dispatch(setShouldShowGallery(true)); + } + if (shouldPinGallery || shouldPinOptionsPanel) + setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); + }, + [shouldShowGallery, shouldShowOptionsPanel] + ); + return shouldShowOptionsPanelButton ? (
key); const tabMapTypes = [...tabMap] as const; export type InvokeTabName = typeof tabMapTypes[number]; -const fullScreenSelector = createSelector( - [(state: RootState) => state.gallery, (state: RootState) => state.options], - (gallery: GalleryState, options: OptionsState) => { - const { shouldShowGallery, shouldPinGallery } = gallery; - const { shouldShowOptionsPanel, shouldPinOptionsPanel } = options; - - return { - shouldShowGallery, - shouldPinGallery, - shouldShowOptionsPanel, - shouldPinOptionsPanel, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - export default function InvokeTabs() { const activeTab = useAppSelector( (state: RootState) => state.options.activeTab @@ -97,13 +70,6 @@ export default function InvokeTabs() { (state: RootState) => state.options.isLightBoxOpen ); - const { - shouldPinGallery, - shouldShowGallery, - shouldPinOptionsPanel, - shouldShowOptionsPanel, - } = useAppSelector(fullScreenSelector); - const dispatch = useAppDispatch(); useHotkeys('1', () => { @@ -139,22 +105,6 @@ export default function InvokeTabs() { [isLightBoxOpen] ); - useHotkeys( - 'f', - () => { - if (shouldShowGallery || shouldShowOptionsPanel) { - dispatch(setShouldShowOptionsPanel(false)); - dispatch(setShouldShowGallery(false)); - } else { - dispatch(setShouldShowOptionsPanel(true)); - dispatch(setShouldShowGallery(true)); - } - if (shouldPinGallery || shouldPinOptionsPanel) - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); - }, - [shouldShowGallery, shouldShowOptionsPanel] - ); - const renderTabs = () => { const tabsToRender: ReactElement[] = []; Object.keys(tabDict).forEach((key) => { From 941d427302f6106bb1fa9c4dd66bda501d7e3976 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 11:02:43 +1100 Subject: [PATCH 182/220] Adds single-column gallery layout --- .../features/gallery/components/HoverableImage.tsx | 5 ++++- .../features/gallery/components/ImageGallery.tsx | 13 +++++++++++++ frontend/src/features/gallery/store/gallerySlice.ts | 9 +++++++++ .../features/gallery/store/gallerySliceSelectors.ts | 7 ++++++- 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/gallery/components/HoverableImage.tsx b/frontend/src/features/gallery/components/HoverableImage.tsx index 5748b51aab..c9765ab6fc 100644 --- a/frontend/src/features/gallery/components/HoverableImage.tsx +++ b/frontend/src/features/gallery/components/HoverableImage.tsx @@ -52,6 +52,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { galleryImageMinimumWidth, mayDeleteImage, isLightBoxOpen, + shouldUseSingleGalleryColumn, } = useAppSelector(hoverableImageSelector); const { image, isSelected } = props; const { url, thumbnail, uuid, metadata } = image; @@ -171,7 +172,9 @@ const HoverableImage = memo((props: HoverableImageProps) => { >
+
+ ) => + dispatch( + setShouldUseSingleGalleryColumn(e.target.checked) + ) + } + /> +
diff --git a/frontend/src/features/gallery/store/gallerySlice.ts b/frontend/src/features/gallery/store/gallerySlice.ts index 901a58e124..932c45210e 100644 --- a/frontend/src/features/gallery/store/gallerySlice.ts +++ b/frontend/src/features/gallery/store/gallerySlice.ts @@ -42,6 +42,7 @@ export interface GalleryState { }; currentCategory: GalleryCategory; galleryWidth: number; + shouldUseSingleGalleryColumn: boolean; } const initialState: GalleryState = { @@ -69,6 +70,7 @@ const initialState: GalleryState = { }, }, galleryWidth: 300, + shouldUseSingleGalleryColumn: false, }; export const gallerySlice = createSlice({ @@ -263,6 +265,12 @@ export const gallerySlice = createSlice({ setGalleryWidth: (state, action: PayloadAction) => { state.galleryWidth = action.payload; }, + setShouldUseSingleGalleryColumn: ( + state, + action: PayloadAction + ) => { + state.shouldUseSingleGalleryColumn = action.payload; + }, }, }); @@ -284,6 +292,7 @@ export const { setShouldAutoSwitchToNewImages, setCurrentCategory, setGalleryWidth, + setShouldUseSingleGalleryColumn, } = gallerySlice.actions; export default gallerySlice.reducer; diff --git a/frontend/src/features/gallery/store/gallerySliceSelectors.ts b/frontend/src/features/gallery/store/gallerySliceSelectors.ts index ccb97172d6..3485a0c027 100644 --- a/frontend/src/features/gallery/store/gallerySliceSelectors.ts +++ b/frontend/src/features/gallery/store/gallerySliceSelectors.ts @@ -27,6 +27,7 @@ export const imageGallerySelector = createSelector( shouldHoldGalleryOpen, shouldAutoSwitchToNewImages, galleryWidth, + shouldUseSingleGalleryColumn, } = gallery; const { isLightBoxOpen } = options; @@ -38,7 +39,9 @@ export const imageGallerySelector = createSelector( galleryScrollPosition, galleryImageMinimumWidth, galleryImageObjectFit, - galleryGridTemplateColumns: `repeat(auto-fill, minmax(${galleryImageMinimumWidth}px, auto))`, + galleryGridTemplateColumns: shouldUseSingleGalleryColumn + ? 'auto' + : `repeat(auto-fill, minmax(${galleryImageMinimumWidth}px, auto))`, activeTabName, shouldHoldGalleryOpen, shouldAutoSwitchToNewImages, @@ -54,6 +57,7 @@ export const imageGallerySelector = createSelector( (activeTabName === 'unifiedCanvas' && shouldPinGallery) ? false : true, + shouldUseSingleGalleryColumn, }; }, { @@ -80,6 +84,7 @@ export const hoverableImageSelector = createSelector( mayDeleteImage: system.isConnected && !system.isProcessing, galleryImageObjectFit: gallery.galleryImageObjectFit, galleryImageMinimumWidth: gallery.galleryImageMinimumWidth, + shouldUseSingleGalleryColumn: gallery.shouldUseSingleGalleryColumn, activeTabName, isLightBoxOpen: options.isLightBoxOpen, }; From 30dc9220c1c7a6dfb20f7885da497c824756b071 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 11:37:23 +1100 Subject: [PATCH 183/220] Fixes crash on cancel with intermediates enabled, fixes #1416 --- frontend/src/app/socketio/listeners.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/socketio/listeners.ts b/frontend/src/app/socketio/listeners.ts index c67fb512fa..d2766b6fdb 100644 --- a/frontend/src/app/socketio/listeners.ts +++ b/frontend/src/app/socketio/listeners.ts @@ -168,6 +168,7 @@ const makeSocketIOListeners = ( setIntermediateImage({ uuid: uuidv4(), ...data, + category: 'result', }) ); if (!data.isBase64) { From 419f670f8636594716e07e2b7639cf2ee6766e88 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:20:27 +1100 Subject: [PATCH 184/220] Updates npm dependencies --- frontend/yarn.lock | 1704 ++++++++++++++++++++++---------------------- 1 file changed, 856 insertions(+), 848 deletions(-) diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 8609bf3ccf..293b6a4c7d 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -247,752 +247,760 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@chakra-ui/accordion@2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/accordion/-/accordion-2.1.2.tgz#f9d384b80f68a92689fa7ad4e43bd8944e6945c6" - integrity sha512-Jf7A6I0eIGk34zO5TiTW8orJOFQb5A/D1ekNYbaukNccoUPKJg/xdQ/b00oIR6LT93nJxggkoP/vszfmmTHuFg== +"@chakra-ui/accordion@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/accordion/-/accordion-2.1.3.tgz#98c5426fe32d06a2f7b600161e0f81d02c4c3bb0" + integrity sha512-OAJSbF0UHBipi6ySBlTZM1vZi5Uoe+1UyYTBId1CxRPYHHgm3n9xAYjOtiA+TrT63aZbKwNV2KBshmGSMnNPGQ== dependencies: - "@chakra-ui/descendant" "3.0.10" - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/transition" "2.0.11" + "@chakra-ui/descendant" "3.0.11" + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/transition" "2.0.12" -"@chakra-ui/alert@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/alert/-/alert-2.0.11.tgz#d792b0684ae7810befa3874af5bdd4aa115513a2" - integrity sha512-n40KHU3j1H6EbIdgptjEad92V7Fpv7YD++ZBjy2g1h4w9ay9nw4kGHib3gaIkBupLf52CfLqySEc8w0taoIlXQ== +"@chakra-ui/alert@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/alert/-/alert-2.0.12.tgz#6784a1ae9158fa0bdb5df79dbfe8ea691686c70e" + integrity sha512-L2h2EeLH0x6+FDG8liu/EuDGAkI3Cgym6aXJdhaJDY3Q18o7lATrkU5Nb7jAf3sHKMwTW5X0YzAOtFiwjpALGA== dependencies: - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/spinner" "2.0.10" + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/spinner" "2.0.11" -"@chakra-ui/anatomy@2.0.7": - version "2.0.7" - resolved "https://registry.yarnpkg.com/@chakra-ui/anatomy/-/anatomy-2.0.7.tgz#33e60c7c4d6e5f949f6f8308249dc571f84ead1e" - integrity sha512-vzcB2gcsGCxhrKbldQQV6LnBPys4eSSsH2UA2mLsT+J3WlXw0aodZw0eE/nH7yLxe4zaQ4Gnc0KjkFW4EWNKSg== - -"@chakra-ui/avatar@2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/avatar/-/avatar-2.2.0.tgz#58b5e650f7e4b3ab229f50e6a102c54b6eb4b23a" - integrity sha512-mpAkfr/JG+BNBw2WvU55CSRFYKeFBUyAQAu3YulznLzi2U3e7k3IA0J8ofbrDYlSH/9KqkDuuSrxqGZgct+Nug== - dependencies: - "@chakra-ui/image" "2.0.11" - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" - -"@chakra-ui/breadcrumb@2.1.0": +"@chakra-ui/anatomy@2.1.0": version "2.1.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/breadcrumb/-/breadcrumb-2.1.0.tgz#530ded99f931cfcb9f4bd4d951bc82b0a4e102ac" - integrity sha512-khBR579SLDEo6Wuo3tETRY6m0yJD/WCvSR7Res2g1B6OJgc9OQGM7yIMu4OdLUTwfXsCnlHTDoSQPUxFOVAMIQ== - dependencies: - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/anatomy/-/anatomy-2.1.0.tgz#8aeb9b753f0412f262743adf68519dfa85120b3e" + integrity sha512-E3jMPGqKuGTbt7mKtc8g/MOOenw2c4wqRC1vOypyFgmC8wsewdY+DJJNENF3atXAK7p5VMBKQfZ7ipNlHnDAwA== -"@chakra-ui/breakpoint-utils@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/breakpoint-utils/-/breakpoint-utils-2.0.4.tgz#6231eff8b20f4e3cbb4eb7c86d05c927679d905b" - integrity sha512-SUUEYnA/FCIKYDHMuEXcnBMwet+6RAAjQ+CqGD1hlwKPTfh7EK9fS8FoVAJa9KpRKAc/AawzPkgwvorzPj8NSg== - -"@chakra-ui/button@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/button/-/button-2.0.11.tgz#98e0aa1e35ea7e193bb50f9a4b5d0ea23202ace8" - integrity sha512-J6iMRITqxTxa0JexHUY9c7BXUrTZtSkl3jZ2hxiFybB4MQL8J2wZ24O846B6M+WTYqy7XVuHRuVURnH4czWesw== +"@chakra-ui/avatar@2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/avatar/-/avatar-2.2.1.tgz#3946d8c3b1d49dc425aa80f22d2f53661395e394" + integrity sha512-sgiogfLM8vas8QJTt7AJI4XxNXYdViCWj+xYJwyOwUN93dWKImqqx3O2ihCXoXTIqQWg1rcEgoJ5CxCg6rQaQQ== dependencies: - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/spinner" "2.0.10" + "@chakra-ui/image" "2.0.12" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" -"@chakra-ui/checkbox@2.2.3": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@chakra-ui/checkbox/-/checkbox-2.2.3.tgz#ae4f7728defd8c5c080ff56cc4243a9c47e0d092" - integrity sha512-ScPIoBbdAbRV+Pdy3B4UqYtf+IxPpm+FHMVPELi2rJUe3k5UcyZcs9DxzKsBS+5e3QBD+H82a6ui0mx9Pyfq1A== +"@chakra-ui/breadcrumb@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/breadcrumb/-/breadcrumb-2.1.1.tgz#e8a682a4909cf8ee5771f7b287524df2be383b8a" + integrity sha512-OSa+F9qJ1xmF0zVxC1GU46OWbbhGf0kurHioSB729d+tRw/OMzmqrrfCJ7KVUUN8NEnTZXT5FIgokMvHGEt+Hg== dependencies: - "@chakra-ui/form-control" "2.0.11" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-callback-ref" "2.0.4" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - "@chakra-ui/react-use-update-effect" "2.0.4" - "@chakra-ui/visually-hidden" "2.0.12" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" + +"@chakra-ui/breakpoint-utils@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/breakpoint-utils/-/breakpoint-utils-2.0.5.tgz#55b571038b66e9f6d41633c102ea904c679dac5c" + integrity sha512-8uhrckMwoR/powlAhxiFZPM0s8vn0B2yEyEaRcwpy5NmRAJSTEotC2WkSyQl/Cjysx9scredumB5g+fBX7IqGQ== + +"@chakra-ui/button@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/button/-/button-2.0.12.tgz#17acba9997de005cf6ad0cd6a9821e11358bb537" + integrity sha512-SRW44nz3Jcbl0XkwCxqn1GE7cT/cqKALBMCnBxM5zXJqzMfYjuQHdtJA2AzX/WB3qKab1GJK4rXCV37h4l3Q3Q== + dependencies: + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/spinner" "2.0.11" + +"@chakra-ui/card@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/card/-/card-2.1.1.tgz#b981a68d81d0f6447eb0d4d3fdcd7846bab2111f" + integrity sha512-vvmfuNn6gkfv6bGcXQe6kvWHspziPZgYnnffiEjPaZYtaf98WRszpjyPbFv0oQR/2H1RSE1oaTqa/J1rHrzw3A== + dependencies: + "@chakra-ui/react-context" "2.0.5" + +"@chakra-ui/checkbox@2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/checkbox/-/checkbox-2.2.4.tgz#e8cff67382165085c45b2618b74cee9da0355c04" + integrity sha512-yNuUFFBuFu9Sih8DlqOn+SLj2RtpVGebePkwUqSRQygMfveFYuWYWt1sbrFYyt0KmIBq0OkucUMy4OnkErUOHQ== + dependencies: + "@chakra-ui/form-control" "2.0.12" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-callback-ref" "2.0.5" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" + "@chakra-ui/react-use-update-effect" "2.0.5" + "@chakra-ui/visually-hidden" "2.0.13" "@zag-js/focus-visible" "0.1.0" -"@chakra-ui/clickable@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/clickable/-/clickable-2.0.10.tgz#e89b7b3eaf9364753f6205e36fd5128b26a617d8" - integrity sha512-G6JdR6yAMlXpfjOJ70W2FL7aUwNuomiMFtkneeTpk7Q42bJ5iGHfYlbZEx5nJd8iB+UluXVM4xlhMv2MyytjGw== - dependencies: - "@chakra-ui/react-use-merge-refs" "2.0.4" - -"@chakra-ui/close-button@2.0.11": +"@chakra-ui/clickable@2.0.11": version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/close-button/-/close-button-2.0.11.tgz#8b0679da42738229014d3807885d05fac0fdf448" - integrity sha512-9WF/nwwK9BldS89WQ5PtXK2nFS4r8QOgKls2BOwXfE+rGmOUZtOsu8ne/drXRjgkiBRETR6CxdyUjm7EPzXllw== + resolved "https://registry.yarnpkg.com/@chakra-ui/clickable/-/clickable-2.0.11.tgz#d0afcdb40ed1b1ceeabb4ac3e9f2f51fd3cbdac7" + integrity sha512-5Y2dl5cxNgOxHbjxyxsL6Vdze4wUUvwsMCCW3kXwgz2OUI2y5UsBZNcvhNJx3RchJEd0fylMKiKoKmnZMHN2aw== dependencies: - "@chakra-ui/icon" "3.0.11" + "@chakra-ui/react-use-merge-refs" "2.0.5" -"@chakra-ui/color-mode@2.1.9": - version "2.1.9" - resolved "https://registry.yarnpkg.com/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz#d3a6f9ba9eee15d9e14cc96484e25d44cef1dbc1" - integrity sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w== - dependencies: - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - -"@chakra-ui/control-box@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/control-box/-/control-box-2.0.10.tgz#e8a849c9f0fa085da78ee15dda7e13e1734b983d" - integrity sha512-sHmZanFLEv4IDATl19ZTxq8Bi8PtjfvnsN6xF4k7JGSYUnk1YXUf1coyW7WKdcsczOASrMikfsLc3iEVAzx4Ng== - -"@chakra-ui/counter@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/counter/-/counter-2.0.10.tgz#861f00db021235892dfe0407e739a259f1c233b2" - integrity sha512-MZK8UKUZp4nFMd+GlV/cq0NIARS7UdlubTuCx+wockw9j2JI5OHzsyK0XiWuJiq5psegSTzpbtT99QfAUm3Yiw== - dependencies: - "@chakra-ui/number-utils" "2.0.4" - "@chakra-ui/react-use-callback-ref" "2.0.4" - -"@chakra-ui/css-reset@2.0.9": - version "2.0.9" - resolved "https://registry.yarnpkg.com/@chakra-ui/css-reset/-/css-reset-2.0.9.tgz#fb7ec1f145562dcda2491038af2e1e7b414d4c22" - integrity sha512-pLEhUetGJ5Dee2xiPDGAzTDBzY7e1OsuS9yEq8/vcGBBVrQ4Y+r+qTEvpf1Zqb2dOl+vUUcqhhaVk8d7uRDGFA== - -"@chakra-ui/descendant@3.0.10": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/descendant/-/descendant-3.0.10.tgz#e54c95270896c451f61b57d31719ee042f4e1827" - integrity sha512-MHH0Qdm0fGllGP2xgx4WOycmrpctyyEdGw6zxcfs2VqZNlrwmjG3Yb9eVY+Q7UmEv5rwAq6qRn7BhQxgSPn3Cg== - dependencies: - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-merge-refs" "2.0.4" - -"@chakra-ui/dom-utils@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@chakra-ui/dom-utils/-/dom-utils-2.0.3.tgz#8a5498b107d3a42662f3502f7b8965cb73bf6a33" - integrity sha512-aeGlRmTxcv0cvW44DyeZHru1i68ZDQsXpfX2dnG1I1yBlT6GlVx1xYjCULis9mjhgvd2O3NfcYPRTkjNWTDUbA== - -"@chakra-ui/editable@2.0.14": - version "2.0.14" - resolved "https://registry.yarnpkg.com/@chakra-ui/editable/-/editable-2.0.14.tgz#969b0796dc1c3c1baebb8d807f310606b5b147db" - integrity sha512-BQSLOYyfcB6vk8AFMhprcoIk1jKPi3KuXAdApqM3w15l4TVwR5j1C1RNYbJaX28HKXRlO526PS3NZPzrQSLciQ== - dependencies: - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-callback-ref" "2.0.4" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-focus-on-pointer-down" "2.0.3" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - "@chakra-ui/react-use-update-effect" "2.0.4" - "@chakra-ui/shared-utils" "2.0.2" - -"@chakra-ui/event-utils@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@chakra-ui/event-utils/-/event-utils-2.0.5.tgz#23de21e319d1a70863953402d64cb4b0e6ce322f" - integrity sha512-VXoOAIsM0PFKDlhm+EZxkWlUXd5UFTb/LTux3y3A+S9G5fDxLRvpiLWByPUgTFTCDFcgTCF+YnQtdWJB4DLyxg== - -"@chakra-ui/focus-lock@2.0.12": +"@chakra-ui/close-button@2.0.12": version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/focus-lock/-/focus-lock-2.0.12.tgz#11c0301a326249efe269c2dd0f54b11a67a04321" - integrity sha512-NvIP59A11ZNbxXZ3qwxSiQ5npjABkpSbTIjK0uZ9bZm5LMfepRnuuA19VsVlq31/BYV9nHFAy6xzIuG+Qf9xMA== + resolved "https://registry.yarnpkg.com/@chakra-ui/close-button/-/close-button-2.0.12.tgz#a981fd96abc8bfe6b50428aba5d46b80ef0ce798" + integrity sha512-34rOJ+NDdkhaP1CI0bP5jmE4KCmvgaxxuI5Ano52XHRnFad4ghqqSZ0oae7RqNMcxRK4YNX8JYtj6xdQsfc6kA== dependencies: - "@chakra-ui/dom-utils" "2.0.3" + "@chakra-ui/icon" "3.0.12" + +"@chakra-ui/color-mode@2.1.10": + version "2.1.10" + resolved "https://registry.yarnpkg.com/@chakra-ui/color-mode/-/color-mode-2.1.10.tgz#8d446550af80cf01a2ccd7470861cb0180112049" + integrity sha512-aUPouOUPn7IPm1v00/9AIkRuNrkCwJlbjVL1kJzLzxijYjbHvEHPxntITt+JWjtXPT8xdOq6mexLYCOGA67JwQ== + dependencies: + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" + +"@chakra-ui/control-box@2.0.11": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@chakra-ui/control-box/-/control-box-2.0.11.tgz#b2deec368fc83f6675964785f823e4c0c1f5d4ac" + integrity sha512-UJb4vqq+/FPuwTCuaPeHa2lwtk6u7eFvLuwDCST2e/sBWGJC1R+1/Il5pHccnWs09FWxyZ9v/Oxkg/CG3jZR4Q== + +"@chakra-ui/counter@2.0.11": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@chakra-ui/counter/-/counter-2.0.11.tgz#b49aa76423e5f4a4a8e717750c190fa5050a3dca" + integrity sha512-1YRt/jom+m3iWw9J9trcM6rAHDvD4lwThiO9raxUK7BRsYUhnPZvsMpcXU1Moax218C4rRpbI9KfPLaig0m1xQ== + dependencies: + "@chakra-ui/number-utils" "2.0.5" + "@chakra-ui/react-use-callback-ref" "2.0.5" + +"@chakra-ui/css-reset@2.0.10": + version "2.0.10" + resolved "https://registry.yarnpkg.com/@chakra-ui/css-reset/-/css-reset-2.0.10.tgz#cb6cd97ee38f8069789f08c31a828bf3a7e339ea" + integrity sha512-FwHOfw2P4ckbpSahDZef2KoxcvHPUg09jlicWdp24/MjdsOO5PAB/apm2UBvQflY4WAJyOqYaOdnXFlR6nF4cQ== + +"@chakra-ui/descendant@3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@chakra-ui/descendant/-/descendant-3.0.11.tgz#cb8bca7b6e8915afc58cdb1444530a2d1b03efd3" + integrity sha512-sNLI6NS6uUgrvYS6Imhoc1YlI6bck6pfxMBJcnXVSfdIjD6XjCmeY2YgzrtDS+o+J8bB3YJeIAG/vsVy5USE5Q== + dependencies: + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-merge-refs" "2.0.5" + +"@chakra-ui/dom-utils@2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/dom-utils/-/dom-utils-2.0.4.tgz#367fffecbd287e16836e093d4030dc6e3785d402" + integrity sha512-P936+WKinz5fgHzfwiUQjE/t7NC8bU89Tceim4tbn8CIm/9b+CsHX64eNw4vyJqRwt78TXQK7aGBIbS18R0q5Q== + +"@chakra-ui/editable@2.0.15": + version "2.0.15" + resolved "https://registry.yarnpkg.com/@chakra-ui/editable/-/editable-2.0.15.tgz#bef548de7b35e4107e04aeeb0747e448af4a36fd" + integrity sha512-Xb/hxMhguZmmGrdAosRAIRy70n7RSxoDWULojV+22ysWvqO8X+TkkwnF36XQX7c/V7F/yY0UqOXZWqdeoNqWPw== + dependencies: + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-callback-ref" "2.0.5" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-focus-on-pointer-down" "2.0.4" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" + "@chakra-ui/react-use-update-effect" "2.0.5" + "@chakra-ui/shared-utils" "2.0.3" + +"@chakra-ui/event-utils@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@chakra-ui/event-utils/-/event-utils-2.0.6.tgz#5e04d68ea070ef52ce212c2a99be9afcc015cfaf" + integrity sha512-ZIoqUbgJ5TcCbZRchMv4n7rOl1JL04doMebED88LO5mux36iVP9er/nnOY4Oke1bANKKURMrQf5VTT9hoYeA7A== + +"@chakra-ui/focus-lock@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/focus-lock/-/focus-lock-2.0.13.tgz#19d6ca35555965a9aaa241b991a67bbc875ee53d" + integrity sha512-AVSJt+3Ukia/m9TCZZgyWvTY7pw88jArivWVJ2gySGYYIs6z/FJMnlwbCVldV2afS0g3cYaii7aARb/WrlG34Q== + dependencies: + "@chakra-ui/dom-utils" "2.0.4" react-focus-lock "^2.9.1" -"@chakra-ui/form-control@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/form-control/-/form-control-2.0.11.tgz#fbfdddb02d1b5d2c67ffdc721c434ff16693e4bd" - integrity sha512-MVhIe0xY4Zn06IXRXFmS9tCa93snppK1SdUQb1P99Ipo424RrL5ykzLnJ8CAkQrhoVP3sxF7z3eOSzk8/iRfow== +"@chakra-ui/form-control@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/form-control/-/form-control-2.0.12.tgz#8c8d7e90ed2bfc8ed06bde6b566de808b31cdd94" + integrity sha512-rSnAStY0qodnxiiL9MkS7wMBls+aG9yevq/yIuuETC42XfBNndKu7MLHFEKFIpAMuZvNocJtB+sP8qpe8jLolg== dependencies: - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-merge-refs" "2.0.4" + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-merge-refs" "2.0.5" -"@chakra-ui/hooks@2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@chakra-ui/hooks/-/hooks-2.1.1.tgz#2ecf6389d583a1fd7dbfcb373d447e2559d98925" - integrity sha512-HG2cSn0ds6pE0WyGzbddtVcZH76ol543RZ5aYBiU3q0WnPtU6BzQQKorCdCLR1Kq6wVNcA29RlSLDrWiuN4GSQ== +"@chakra-ui/hooks@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@chakra-ui/hooks/-/hooks-2.1.2.tgz#1e413f6624e97b854569e8a19846c9162a4ec153" + integrity sha512-/vDBOqqnho9q++lay0ZcvnH8VuE0wT2OkZj+qDwFwjiHAtGPVxHCSpu9KC8BIHME5TlWjyO6riVyUCb2e2ip6w== dependencies: - "@chakra-ui/react-utils" "2.0.8" - "@chakra-ui/utils" "2.0.11" + "@chakra-ui/react-utils" "2.0.9" + "@chakra-ui/utils" "2.0.12" compute-scroll-into-view "1.0.14" copy-to-clipboard "3.3.1" -"@chakra-ui/icon@3.0.11": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/icon/-/icon-3.0.11.tgz#a51dda24bed2f2ed77b4136ada8f22d3249c9870" - integrity sha512-RG4jf/XmBdaxOYI5J5QstEtTCPoVlmrQ/XiWhvN0LTgAnmZIqVwFl3Uw+satArdStHAs0GmJZg/E/soFTWuFmw== +"@chakra-ui/icon@3.0.12": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/icon/-/icon-3.0.12.tgz#04f5b38591c4ff1cc922c14f814ce6b5d67525d9" + integrity sha512-VbUqgMcoZ26P1MtZdUqlxAKYDi1Bt8sSPNRID8QOwWfqyRYrbzabORVhKR3gpi6GaINjm7KRHIXHarj3u6EWdA== dependencies: - "@chakra-ui/shared-utils" "2.0.2" + "@chakra-ui/shared-utils" "2.0.3" "@chakra-ui/icons@^2.0.10": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/icons/-/icons-2.0.11.tgz#3faf53c499c7c61c65b6e5ff4b0933f48b9ba416" - integrity sha512-WjxrFMt9hHpuZlnBh4fhtGOkIVlwYwHNmwq4sJGxYWlg8UnEhVJMoOojheJDy/d3Gp9+ApetlK3vt8fV/rZamg== - dependencies: - "@chakra-ui/icon" "3.0.11" - -"@chakra-ui/image@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/image/-/image-2.0.11.tgz#eb880ecd2fce47f22ef50bbbba66cbb027c0304c" - integrity sha512-S6NqAprPcbHnck/J+2wg06r9SSol62v5A01O8Kke2PnAyjalMcS+6P59lDRO7wvPqsdxq4PPbSTZP6Dww2CvcA== - dependencies: - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - -"@chakra-ui/input@2.0.12": version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/input/-/input-2.0.12.tgz#332db53a831daea4d76e1de6d3b4462fd50ae167" - integrity sha512-lJ5necu+Wt698HdCTC7L/ErA2nNVJAra7+knPe0qMR+AizGEL7LKCV/bdQe7eggjvKsDGD4alJIEczUvm3JVUQ== + resolved "https://registry.yarnpkg.com/@chakra-ui/icons/-/icons-2.0.12.tgz#5b4dd53512c2543c0617d4b348bf7bd1d9284e4a" + integrity sha512-lZyB96Yic5qM3gWp/QlQuD8WyS+V+19mjNxFW7IVmcn7fm+bLsnPrVPv2Qmpcs6/d4jsUyc1broyuyM+Urtg8Q== dependencies: - "@chakra-ui/form-control" "2.0.11" - "@chakra-ui/object-utils" "2.0.4" - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/shared-utils" "2.0.2" + "@chakra-ui/icon" "3.0.12" -"@chakra-ui/layout@2.1.9": - version "2.1.9" - resolved "https://registry.yarnpkg.com/@chakra-ui/layout/-/layout-2.1.9.tgz#3e9cc7b5915e033907367e40fc97d218efa5f777" - integrity sha512-ztsavtirtdtjxdqIkGR6fVcrffHp6hs1twRFO/dK14FGXrX3Nn9mi3J1fr1ITBHJq6y5B3yFEj0LHN2fO8dYyw== +"@chakra-ui/image@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/image/-/image-2.0.12.tgz#e90b1d2a5f87fff90b1ef86ca75bfe6b44ac545d" + integrity sha512-uclFhs0+wq2qujGu8Wk4eEWITA3iZZQTitGiFSEkO9Ws5VUH+Gqtn3mUilH0orubrI5srJsXAmjVTuVwge1KJQ== dependencies: - "@chakra-ui/breakpoint-utils" "2.0.4" - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/object-utils" "2.0.4" - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/shared-utils" "2.0.2" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" -"@chakra-ui/lazy-utils@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/lazy-utils/-/lazy-utils-2.0.2.tgz#d85f9afc60c2434ba76376fd4b23a7a0a1341e14" - integrity sha512-MTxutBJZvqNNqrrS0722cI7qrnGu0yUQpIebmTxYwI+F3cOnPEKf5Ni+hrA8hKcw4XJhSY4npAPPYu1zJbOV4w== - -"@chakra-ui/live-region@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/live-region/-/live-region-2.0.10.tgz#d33a784c85feed7ba96e2579553ca1d20c965171" - integrity sha512-eQ2ZIreR/plzi/KGszDYTi1TvIyGEBcPiWP52BQOS7xwpzb1vsoR1FgFAIELxAGJvKnMUs+9qVogfyRBX8PdOg== - -"@chakra-ui/media-query@3.2.7": - version "3.2.7" - resolved "https://registry.yarnpkg.com/@chakra-ui/media-query/-/media-query-3.2.7.tgz#ece5b2181136145305bf5e6ec82c696ef1d59a77" - integrity sha512-hbgm6JCe0kYU3PAhxASYYDopFQI26cW9kZnbp+5tRL1fykkVWNMPwoGC8FEZPur9JjXp7aoL6H4Jk7nrxY/XWw== +"@chakra-ui/input@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/input/-/input-2.0.13.tgz#6d445bccfb9e59eada70e9a8e47fecda7bfe03a4" + integrity sha512-28K033kg+9SpU0/HCvcAcY42JQPTpSR7ytcZV+6i/MBvGR72Dsf4JJQuQIcAtEW1lH0l/OpbY6ozhaoRW5NhdQ== dependencies: - "@chakra-ui/breakpoint-utils" "2.0.4" - "@chakra-ui/react-env" "2.0.10" + "@chakra-ui/form-control" "2.0.12" + "@chakra-ui/object-utils" "2.0.5" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/shared-utils" "2.0.3" -"@chakra-ui/menu@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@chakra-ui/menu/-/menu-2.1.3.tgz#a2e74d42655fc1d5c6598a16d27a72a064312b2b" - integrity sha512-uVS3gxl3o1b4v6Uwpgt+7DdEOuT0IgHjeM7jna5tFnOI3G2QTjIyd4DaKbYPxqZKlD8TQK+0wLA08th61paq/w== +"@chakra-ui/layout@2.1.10": + version "2.1.10" + resolved "https://registry.yarnpkg.com/@chakra-ui/layout/-/layout-2.1.10.tgz#fa9b177ecc32c674ba2208e52faa57ae877bbdb5" + integrity sha512-9WlbZGIg0TMIwnxuCuZfkE7HJUInL5qRWgw9I3U960/4GYZRrlcxx8I1ZuHNww0FdItNrlnYLXEfXP77uU779w== dependencies: - "@chakra-ui/clickable" "2.0.10" - "@chakra-ui/descendant" "3.0.10" - "@chakra-ui/lazy-utils" "2.0.2" - "@chakra-ui/popper" "3.0.8" - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-animation-state" "2.0.5" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-disclosure" "2.0.5" - "@chakra-ui/react-use-focus-effect" "2.0.6" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/react-use-outside-click" "2.0.4" - "@chakra-ui/react-use-update-effect" "2.0.4" - "@chakra-ui/transition" "2.0.11" + "@chakra-ui/breakpoint-utils" "2.0.5" + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/object-utils" "2.0.5" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/shared-utils" "2.0.3" -"@chakra-ui/modal@2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/modal/-/modal-2.2.2.tgz#bf3ef2673a8641a5c851faceb7811e0c0f323517" - integrity sha512-cCYuqLZO4QqFUI1H+uEqixDk6UiCP3yC+sxkhFTXHIApSG9Z44v5np7BVTd6LKdmAN8pAWcc8Oxf14RvD6LWLw== +"@chakra-ui/lazy-utils@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/lazy-utils/-/lazy-utils-2.0.3.tgz#5ba459a2541ad0c98cd98b20a8054664c129e9b4" + integrity sha512-SQ5I5rJrcHpVUcEftHLOh8UyeY+06R8Gv3k2RjcpvM6mb2Gktlz/4xl2GcUh3LWydgGQDW/7Rse5rQhKWgzmcg== + +"@chakra-ui/live-region@2.0.11": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@chakra-ui/live-region/-/live-region-2.0.11.tgz#1008c5b629aa4120e5158be53f13d8d34bc2d71a" + integrity sha512-ltObaKQekP75GCCbN+vt1/mGABSCaRdQELmotHTBc5AioA3iyCDHH69ev+frzEwLvKFqo+RomAdAAgqBIMJ02Q== + +"@chakra-ui/media-query@3.2.8": + version "3.2.8" + resolved "https://registry.yarnpkg.com/@chakra-ui/media-query/-/media-query-3.2.8.tgz#7d5feccb7ac52891426c060dd2ed1df37420956d" + integrity sha512-djmEg/eJ5Qrjn7SArTqjsvlwF6mNeMuiawrTwnU+0EKq9Pq/wVSb7VaIhxdQYJLA/DbRhE/KPMogw1LNVKa4Rw== dependencies: - "@chakra-ui/close-button" "2.0.11" - "@chakra-ui/focus-lock" "2.0.12" - "@chakra-ui/portal" "2.0.10" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/transition" "2.0.11" + "@chakra-ui/breakpoint-utils" "2.0.5" + "@chakra-ui/react-env" "2.0.11" + +"@chakra-ui/menu@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/menu/-/menu-2.1.4.tgz#821d246ecbf4c734f8ab93ad399c22a7b5e0fa1a" + integrity sha512-7kEM5dCSBMXig3iyvsSxzYi/7zkmaf843zoxb7QTB7sRB97wrCxIE8yy1/73YTzxOP3zdAyITPcxNJ/bkiVptQ== + dependencies: + "@chakra-ui/clickable" "2.0.11" + "@chakra-ui/descendant" "3.0.11" + "@chakra-ui/lazy-utils" "2.0.3" + "@chakra-ui/popper" "3.0.9" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-animation-state" "2.0.6" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-disclosure" "2.0.6" + "@chakra-ui/react-use-focus-effect" "2.0.7" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/react-use-outside-click" "2.0.5" + "@chakra-ui/react-use-update-effect" "2.0.5" + "@chakra-ui/transition" "2.0.12" + +"@chakra-ui/modal@2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/modal/-/modal-2.2.3.tgz#b99ba69cd3fcf1a9ca12f0ae9cea7136b1338726" + integrity sha512-fSpnFiI3rlif5ynyO3P8A1S/97B/SOFUrIuNaJnhKSgiu7VtklPjiPWHCw5Y+ktEvagDXEmkpztcfMBPTY0wIA== + dependencies: + "@chakra-ui/close-button" "2.0.12" + "@chakra-ui/focus-lock" "2.0.13" + "@chakra-ui/portal" "2.0.11" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/transition" "2.0.12" aria-hidden "^1.1.1" react-remove-scroll "^2.5.4" -"@chakra-ui/number-input@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/number-input/-/number-input-2.0.12.tgz#90a8408e6abb2d021793888ef2119d01761d7614" - integrity sha512-3owLjl01sCYpTd3xbq//fJo9QJ0Q3PVYSx9JeOzlXnnTW8ws+yHPrqQzPe7G+tO4yOYynWuUT+NJ9oyCeAJIxA== +"@chakra-ui/number-input@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/number-input/-/number-input-2.0.13.tgz#4dd3abae17e74749a3d52cfc3a7718e6cc18042a" + integrity sha512-Kn6PKLkGl+5hrMoeaGGN19qVHHJB79G4c0rfkWPjDWKsgpbCwHQctLJwrkxuwGAn1iWzw4WL31lsb+o6ZRQHbA== dependencies: - "@chakra-ui/counter" "2.0.10" - "@chakra-ui/form-control" "2.0.11" - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-callback-ref" "2.0.4" - "@chakra-ui/react-use-event-listener" "2.0.4" - "@chakra-ui/react-use-interval" "2.0.2" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - "@chakra-ui/react-use-update-effect" "2.0.4" + "@chakra-ui/counter" "2.0.11" + "@chakra-ui/form-control" "2.0.12" + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-callback-ref" "2.0.5" + "@chakra-ui/react-use-event-listener" "2.0.5" + "@chakra-ui/react-use-interval" "2.0.3" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" + "@chakra-ui/react-use-update-effect" "2.0.5" -"@chakra-ui/number-utils@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/number-utils/-/number-utils-2.0.4.tgz#0331be05956f2c03125c073d35655e261e267cd4" - integrity sha512-MdYd29GboBoKaXY9jhbY0Wl+0NxG1t/fa32ZSIbU6VrfMsZuAMl4NEJsz7Xvhy50fummLdKn5J6HFS7o5iyIgw== +"@chakra-ui/number-utils@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/number-utils/-/number-utils-2.0.5.tgz#c7595fc919fca7c43fe172bfd6c5197c653ee572" + integrity sha512-Thhohnlqze0i5HBJO9xkfOPq1rv3ji/hNPf2xh1fh4hxrNzdm3HCkz0c6lyRQwGuVoeltEHysYZLH/uWLFTCSQ== -"@chakra-ui/object-utils@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/object-utils/-/object-utils-2.0.4.tgz#d890ce285103a5e9b993f016a4fb38307aa55ac0" - integrity sha512-sY98L4v2wcjpwRX8GCXqT+WzpL0i5FHVxT1Okxw0360T2tGnZt7toAwpMfIOR3dzkemP9LfXMCyBmWR5Hi2zpQ== +"@chakra-ui/object-utils@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/object-utils/-/object-utils-2.0.5.tgz#231602066ddb96ae91dcc7da243b97ad46972398" + integrity sha512-/rIMoYI3c2uLtFIrnTFOPRAI8StUuu335WszqKM0KAW1lwG9H6uSbxqlpZT1Pxi/VQqZKfheGiMQOx5lfTmM/A== -"@chakra-ui/pin-input@2.0.15": - version "2.0.15" - resolved "https://registry.yarnpkg.com/@chakra-ui/pin-input/-/pin-input-2.0.15.tgz#08e65c5e8468cef6192634a53859169b51c2c4a7" - integrity sha512-Ha8siSZm9gyjHHBK8ejwhKT6+75U12I/hNiYFvl2JHhc+Uh8tdi7+N+9SILO5vqbIv9kb+WGitvZ67I0cHjSfw== +"@chakra-ui/pin-input@2.0.16": + version "2.0.16" + resolved "https://registry.yarnpkg.com/@chakra-ui/pin-input/-/pin-input-2.0.16.tgz#d31a6e2bce85aa2d1351ccb4cd9bf7a5134d3fb9" + integrity sha512-51cioNYpBSgi9/jq6CrzoDvo8fpMwFXu3SaFRbKO47s9Dz/OAW0MpjyabTfSpwOv0xKZE+ayrYGJopCzZSWXPg== dependencies: - "@chakra-ui/descendant" "3.0.10" - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-merge-refs" "2.0.4" + "@chakra-ui/descendant" "3.0.11" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-merge-refs" "2.0.5" -"@chakra-ui/popover@2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/popover/-/popover-2.1.2.tgz#06c0733b0a715ed559f418aba2e7e6d70de6b8ae" - integrity sha512-ANnKH5oA5HEeouRSch370iw6wQ8r5rBhz9NflVyXjmTlJ7/rjkOyQ8pEFzvJbvzp4iFj4htejHK2qDK0b/qKLA== +"@chakra-ui/popover@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/popover/-/popover-2.1.3.tgz#8769ed50db2c2188faf6725c248004a1f73f2725" + integrity sha512-3CbeXjpCYnKyq5Z2IqUyfXZYpi5GzmPQZqzS2/kuJwgTuSjtuQovX0QI7oNE4zv4r6yEABW/kVrI7pn0/Tet1Q== dependencies: - "@chakra-ui/close-button" "2.0.11" - "@chakra-ui/lazy-utils" "2.0.2" - "@chakra-ui/popper" "3.0.8" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-animation-state" "2.0.5" - "@chakra-ui/react-use-disclosure" "2.0.5" - "@chakra-ui/react-use-focus-effect" "2.0.6" - "@chakra-ui/react-use-focus-on-pointer-down" "2.0.3" - "@chakra-ui/react-use-merge-refs" "2.0.4" + "@chakra-ui/close-button" "2.0.12" + "@chakra-ui/lazy-utils" "2.0.3" + "@chakra-ui/popper" "3.0.9" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-animation-state" "2.0.6" + "@chakra-ui/react-use-disclosure" "2.0.6" + "@chakra-ui/react-use-focus-effect" "2.0.7" + "@chakra-ui/react-use-focus-on-pointer-down" "2.0.4" + "@chakra-ui/react-use-merge-refs" "2.0.5" -"@chakra-ui/popper@3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@chakra-ui/popper/-/popper-3.0.8.tgz#89b6984aee405316974dbb70ba451f85832bf44e" - integrity sha512-246eUwuCRsLpTPxn5T8D8T9/6ODqmmz6pRRJAjGnLlUB0gNHgjisBn0UDBic5Gbxcg0sqKvxOMY3uurbW5lXTA== +"@chakra-ui/popper@3.0.9": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@chakra-ui/popper/-/popper-3.0.9.tgz#5e810e67573c99cbb6fe79869ab76340359e857a" + integrity sha512-xtQ1SXxKyDFY3jWNXxr6xdiGQ8mCI5jaw+c2CWKp/bb8FnASXEFLWIlmWx8zxkE1BbPMszWHnaGF8uCBRjmQMA== dependencies: - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-merge-refs" "2.0.4" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-merge-refs" "2.0.5" "@popperjs/core" "^2.9.3" -"@chakra-ui/portal@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/portal/-/portal-2.0.10.tgz#8ac21131cb0666a0bf6565468b3f7e799ef3bc8d" - integrity sha512-VRYvVAggIuqIZ3IQ6XZ1b5ujjjOUgPk9PPdc9jssUngZa7RG+5NXNhgoM8a5TsXv6aPEolBOlDNWuxzRQ4RSSg== +"@chakra-ui/portal@2.0.11": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@chakra-ui/portal/-/portal-2.0.11.tgz#7a6b3ebc621bb28b46550fcfb36b94926d0111a5" + integrity sha512-Css61i4WKzKO8ou1aGjBzcsXMy9LnfnpkOFfvaNCpUUNEd6c47z6+FhZNq7Gc38PGNjSfMLAd4LmH+H0ZanYIA== dependencies: - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" -"@chakra-ui/progress@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/progress/-/progress-2.1.0.tgz#87d03da5c6075ec6326db9d8cc412be053945784" - integrity sha512-CK4XmDrbAzR95po5L07sGCniMeOZiF148CLC/dItwgRc65NFmaHSL1OvqXQz6qiDiBOmZxPq0Qu1KovJGg/esA== +"@chakra-ui/progress@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/progress/-/progress-2.1.1.tgz#b94399af12e9324737f9e690201f78546572ac59" + integrity sha512-ddAXaYGNObGqH1stRAYxkdospf6J4CDOhB0uyw9BeHRSsYkCUQWkUBd/melJuZeGHEH2ItF9T7FZ4JhcepP3GA== dependencies: - "@chakra-ui/react-context" "2.0.4" + "@chakra-ui/react-context" "2.0.5" -"@chakra-ui/provider@2.0.21": - version "2.0.21" - resolved "https://registry.yarnpkg.com/@chakra-ui/provider/-/provider-2.0.21.tgz#4ffafad4991d83af4fbf88873b78b09f9f7cb8f4" - integrity sha512-P3Pm/0hz6ViuC9JsxAOFKm+sOl4w5yaZdPWFFOeztHj4rEkFd7UnyNV3SfUlFOs/ZzIFnzaGNd9xngoSi728JQ== +"@chakra-ui/provider@2.0.23": + version "2.0.23" + resolved "https://registry.yarnpkg.com/@chakra-ui/provider/-/provider-2.0.23.tgz#da00642637a8c72be724acb7e17d5fe57547a0de" + integrity sha512-oYrvBivTsmBZ7NOyvctOmj+p2dDbRioe0S77S51G9iS+aGTh37W10HgaT0zyrDuZQVARoF9RUyOB5T6vuqwdCQ== dependencies: - "@chakra-ui/css-reset" "2.0.9" - "@chakra-ui/portal" "2.0.10" - "@chakra-ui/react-env" "2.0.10" - "@chakra-ui/system" "2.3.1" - "@chakra-ui/utils" "2.0.11" + "@chakra-ui/css-reset" "2.0.10" + "@chakra-ui/portal" "2.0.11" + "@chakra-ui/react-env" "2.0.11" + "@chakra-ui/system" "2.3.3" + "@chakra-ui/utils" "2.0.12" -"@chakra-ui/radio@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/radio/-/radio-2.0.12.tgz#d89eb463df0247a0e634cff1fb9ca755bcbab825" - integrity sha512-871hqAGQaufxyUzPP3aautPBIRZQmpi3fw5XPZ6SbY62dV61M4sjcttd46HfCf5SrAonoOADFQLMGQafznjhaA== +"@chakra-ui/radio@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/radio/-/radio-2.0.13.tgz#3f6dec6886c4d046e7567e1bb929f32e8091c5b7" + integrity sha512-P8mbdCZY9RG5034o1Tvy1/p573cHWDyzYuG8DtdEydiP6KGwaFza16/5N0slLY1BQwClIRmImLLw4vI+76J8XA== dependencies: - "@chakra-ui/form-control" "2.0.11" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-merge-refs" "2.0.4" + "@chakra-ui/form-control" "2.0.12" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-merge-refs" "2.0.5" "@zag-js/focus-visible" "0.1.0" -"@chakra-ui/react-children-utils@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-children-utils/-/react-children-utils-2.0.3.tgz#406b984c653befd6c99636fcefb55bd01d436a7d" - integrity sha512-tPQjLEEuAw/DYLRw0cNs/g8tcdhZ3r21Sr9dTAzoyvfk0vbZ24gCXRElltW2GZLiFA63mAidzhPmc+yQF3Wtgg== - -"@chakra-ui/react-context@2.0.4": +"@chakra-ui/react-children-utils@2.0.4": version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-context/-/react-context-2.0.4.tgz#1b6ab260d44d9073c95b975b7d1643f011e65e02" - integrity sha512-eBITFkf7fLSiMZrSdhweK4fYr41WUNMEeIEOP2dCWolE7WgKxNYaYleC+iRGY0GeXkFM2KYywUtixjJe29NuVA== + resolved "https://registry.yarnpkg.com/@chakra-ui/react-children-utils/-/react-children-utils-2.0.4.tgz#6e4284297a8a9b4e6f5f955b099bb6c2c6bbf8b9" + integrity sha512-qsKUEfK/AhDbMexWo5JhmdlkxLg5WEw2dFh4XorvU1/dTYsRfP6cjFfO8zE+X3F0ZFNsgKz6rbN5oU349GLEFw== -"@chakra-ui/react-env@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-env/-/react-env-2.0.10.tgz#2eaa4ba64a14ecd2d279c32d5edfef7a6b5de3e8" - integrity sha512-3Yab5EbFcCGYzEsoijy4eA3354Z/JoXyk9chYIuW7Uwd+K6g/R8C0mUSAHeTmfp6Fix9kzDgerO5MWNM87b8cA== - -"@chakra-ui/react-types@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-types/-/react-types-2.0.3.tgz#dc454c4703b4de585e6461fd607304ede06fe595" - integrity sha512-1mJYOQldFTALE0Wr3j6tk/MYvgQIp6CKkJulNzZrI8QN+ox/bJOh8OVP4vhwqvfigdLTui0g0k8M9h+j2ub/Mw== - -"@chakra-ui/react-use-animation-state@2.0.5": +"@chakra-ui/react-context@2.0.5": version "2.0.5" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-animation-state/-/react-use-animation-state-2.0.5.tgz#f022baf0103c35aa494227b041422e7d2401b0d4" - integrity sha512-8gZIqZpMS5yTGlC+IqYoSrV13joiAYoeI0YR2t68WuDagcZ459OrjE57+gF04NLxfdV7eUgwqnpuv7IOLbJX/A== - dependencies: - "@chakra-ui/dom-utils" "2.0.3" - "@chakra-ui/react-use-event-listener" "2.0.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-context/-/react-context-2.0.5.tgz#c434013ecc46c780539791d756dafdfc7c64320e" + integrity sha512-WYS0VBl5Q3/kNShQ26BP+Q0OGMeTQWco3hSiJWvO2wYLY7N1BLq6dKs8vyKHZfpwKh2YL2bQeAObi+vSkXp6tQ== -"@chakra-ui/react-use-callback-ref@2.0.4": +"@chakra-ui/react-env@2.0.11": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-env/-/react-env-2.0.11.tgz#d9d65fb695de7aff15e1d0e97d57bb7bedce5fa2" + integrity sha512-rPwUHReSWh7rbCw0HePa8Pvc+Q82fUFvVjHTIbXKnE6d+01cCE7j4f1NLeRD9pStKPI6sIZm9xTGvOCzl8F8iw== + +"@chakra-ui/react-types@2.0.4": version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-callback-ref/-/react-use-callback-ref-2.0.4.tgz#5099ef1df4413af42e434945f541de99394ec96f" - integrity sha512-he7EQfwMA4mwiDDKvX7cHIJaboCqf7UD3KYHGUcIjsF4dSc2Y8X5Ze4w+hmVZoJWIe4DWUzb3ili2SUm8eTgPg== + resolved "https://registry.yarnpkg.com/@chakra-ui/react-types/-/react-types-2.0.4.tgz#b88152cbd2c04e51a422986185e2a4ba9b645fb7" + integrity sha512-kYhuSStw9pIJXrmQB7/J1u90bst31pEx9r25pyDG/rekk8E9JuqBR+z+UWODTFx00V2rtWCcJS5rPbONgvWX0A== -"@chakra-ui/react-use-controllable-state@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-controllable-state/-/react-use-controllable-state-2.0.5.tgz#5ef9f600ae134a2a37fe080fd6231bbed83544bb" - integrity sha512-JrZZpMX24CUyfDuyqDczw9Z9IMvjH8ujETHK0Zu4M0SIsX/q4EqOwwngUFL03I2gx/O38HfSdeX8hMu4zbTAGA== - dependencies: - "@chakra-ui/react-use-callback-ref" "2.0.4" - -"@chakra-ui/react-use-disclosure@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-disclosure/-/react-use-disclosure-2.0.5.tgz#bb52340f0e7d614cc95819bd21cffd050783f96c" - integrity sha512-kPLB9oxImASRhAbKfvfc03/lbAJbsXndEVRzd+nvvL+QZm2RRfnel3k6OIkWvGFOXXYOPE2+slLe8ZPwbTGg9g== - dependencies: - "@chakra-ui/react-use-callback-ref" "2.0.4" - -"@chakra-ui/react-use-event-listener@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-event-listener/-/react-use-event-listener-2.0.4.tgz#3f893def57a7b10db6c355740dd1e82cd3216259" - integrity sha512-VqmalfKWMO8D21XuZO19WUtcP5xhbHXKzkggApTChZUN02UC5TC4pe0pYbDygoeUuNBhY+9lJKHeS08vYsljRg== - dependencies: - "@chakra-ui/react-use-callback-ref" "2.0.4" - -"@chakra-ui/react-use-focus-effect@2.0.6": +"@chakra-ui/react-use-animation-state@2.0.6": version "2.0.6" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-focus-effect/-/react-use-focus-effect-2.0.6.tgz#e5a607a68ecf1240e7ab4b233403d55e3cddc4b5" - integrity sha512-J5I8pIUcros5VP8g5b3o3qAvJ8ltoYuO7w2n6V1xCVkBbY2J1dyDR5qkRjRG+cD9Ik/iCftnTiRWaUSokfDzEw== + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-animation-state/-/react-use-animation-state-2.0.6.tgz#2a324d3c67015a542ed589f899672d681889e1e7" + integrity sha512-M2kUzZkSBgDpfvnffh3kTsMIM3Dvn+CTMqy9zfY97NL4P3LAWL1MuFtKdlKfQ8hs/QpwS/ew8CTmCtaywn4sKg== dependencies: - "@chakra-ui/dom-utils" "2.0.3" - "@chakra-ui/react-use-event-listener" "2.0.4" - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - "@chakra-ui/react-use-update-effect" "2.0.4" + "@chakra-ui/dom-utils" "2.0.4" + "@chakra-ui/react-use-event-listener" "2.0.5" -"@chakra-ui/react-use-focus-on-pointer-down@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-focus-on-pointer-down/-/react-use-focus-on-pointer-down-2.0.3.tgz#8b605063c9e707a18b021fbcaed8919c8660d1ed" - integrity sha512-8cKmpv26JnblexNaekWxEDI7M+MZnJcp1PJUz6lByjfQ1m4YjFr1cdbdhG4moaqzzYs7vTmO/qL8KVq8ZLUwyQ== - dependencies: - "@chakra-ui/react-use-event-listener" "2.0.4" - -"@chakra-ui/react-use-interval@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-interval/-/react-use-interval-2.0.2.tgz#6d1d5d5b5c5604ee2ea47f1e140e6eaf6e885df5" - integrity sha512-5U1c0pEB5n0Yri0E4RdFXWx2RVBZBBhD8Uu49dM33jkIguCbIPmZ+YgVry5DDzCHyz4RgDg4yZKOPK0PI8lEUg== - dependencies: - "@chakra-ui/react-use-callback-ref" "2.0.4" - -"@chakra-ui/react-use-latest-ref@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-latest-ref/-/react-use-latest-ref-2.0.2.tgz#4895d3ae2dc93a660ed86aaec7021b729830d3d2" - integrity sha512-Ra/NMV+DSQ3n0AdKsyIqdgnFzls5UntabtIRfDXLrqmJ4tI0a1tDdop2qop0Ue87AcqD9P1KtQue4KPx7wCElw== - -"@chakra-ui/react-use-merge-refs@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-merge-refs/-/react-use-merge-refs-2.0.4.tgz#c23f10fda1d3a6327a48708a8a7ad4b62ba918d3" - integrity sha512-aoWvtE5tDQNaLCiNUI6WV+MA2zVcCLR5mHSCISmowlTXyXOqOU5Fo9ZoUftzrmgCJpDu5x1jfUOivxuHUueb0g== - -"@chakra-ui/react-use-outside-click@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-outside-click/-/react-use-outside-click-2.0.4.tgz#977d873cfedec615c8e3acd48fca7b094b464b6e" - integrity sha512-uerJKS8dqg2kHs1xozA5vcCqW0UInuwrfCPb+rDWBTpu7aEqxABMw9W3e4gfOABrAjhKz2I0a/bu2i8zbVwdLw== - dependencies: - "@chakra-ui/react-use-callback-ref" "2.0.4" - -"@chakra-ui/react-use-pan-event@2.0.5": +"@chakra-ui/react-use-callback-ref@2.0.5": version "2.0.5" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-pan-event/-/react-use-pan-event-2.0.5.tgz#9269d4b798d1447e18b00ee0b28fa52c5c8efb26" - integrity sha512-nhE3b85++EEmBD2v6m46TLoA4LehSCZ349P8kvEjw/RC0K6XDOZndaBucIeAlnpEENSSUpczFfMSOLxSHdu0oA== + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-callback-ref/-/react-use-callback-ref-2.0.5.tgz#862430dfbab8e1f0b8e04476e5e25469bd044ec9" + integrity sha512-vKnXleD2PzB0nGabY35fRtklMid4z7cecbMG0fkasNNsgWmrQcXJOuEKUUVCynL6FBU6gBnpKFi5Aqj6x+K4tw== + +"@chakra-ui/react-use-controllable-state@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-controllable-state/-/react-use-controllable-state-2.0.6.tgz#ec62aff9b9c00324a0a4c9a4523824a9ad5ef9aa" + integrity sha512-7WuKrhQkpSRoiI5PKBvuIsO46IIP0wsRQgXtStSaIXv+FIvIJl9cxQXTbmZ5q1Ds641QdAUKx4+6v0K/zoZEHg== dependencies: - "@chakra-ui/event-utils" "2.0.5" - "@chakra-ui/react-use-latest-ref" "2.0.2" + "@chakra-ui/react-use-callback-ref" "2.0.5" + +"@chakra-ui/react-use-disclosure@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-disclosure/-/react-use-disclosure-2.0.6.tgz#db707ee119db829e9b21ff1c05e867938f1e27ba" + integrity sha512-4UPePL+OcCY37KZ585iLjg8i6J0sjpLm7iZG3PUwmb97oKHVHq6DpmWIM0VfSjcT6AbSqyGcd5BXZQBgwt8HWQ== + dependencies: + "@chakra-ui/react-use-callback-ref" "2.0.5" + +"@chakra-ui/react-use-event-listener@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-event-listener/-/react-use-event-listener-2.0.5.tgz#949aa99878b25b23709452d3c80a1570c99747cc" + integrity sha512-etLBphMigxy/cm7Yg22y29gQ8u/K3PniR5ADZX7WVX61Cgsa8ciCqjTE9sTtlJQWAQySbWxt9+mjlT5zaf+6Zw== + dependencies: + "@chakra-ui/react-use-callback-ref" "2.0.5" + +"@chakra-ui/react-use-focus-effect@2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-focus-effect/-/react-use-focus-effect-2.0.7.tgz#bd03290cac32e0de6a71ce987f939a5e697bca04" + integrity sha512-wI8OUNwfbkusajLac8QtjfSyNmsNu1D5pANmnSHIntHhui6Jwv75Pxx7RgmBEnfBEpleBndhR9E75iCjPLhZ/A== + dependencies: + "@chakra-ui/dom-utils" "2.0.4" + "@chakra-ui/react-use-event-listener" "2.0.5" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" + "@chakra-ui/react-use-update-effect" "2.0.5" + +"@chakra-ui/react-use-focus-on-pointer-down@2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-focus-on-pointer-down/-/react-use-focus-on-pointer-down-2.0.4.tgz#aeba543c451ac1b0138093234e71d334044daf84" + integrity sha512-L3YKouIi77QbXH9mSLGEFzJbJDhyrPlcRcuu+TSC7mYaK9E+3Ap+RVSAVxj+CfQz7hCWpikPecKDuspIPWlyuA== + dependencies: + "@chakra-ui/react-use-event-listener" "2.0.5" + +"@chakra-ui/react-use-interval@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-interval/-/react-use-interval-2.0.3.tgz#d5c7bce117fb25edb54e3e2c666e900618bb5bb2" + integrity sha512-Orbij5c5QkL4NuFyU4mfY/nyRckNBgoGe9ic8574VVNJIXfassevZk0WB+lvqBn5XZeLf2Tj+OGJrg4j4H9wzw== + dependencies: + "@chakra-ui/react-use-callback-ref" "2.0.5" + +"@chakra-ui/react-use-latest-ref@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-latest-ref/-/react-use-latest-ref-2.0.3.tgz#27cf703858e65ecb5a0eef26215c794ad2a5353d" + integrity sha512-exNSQD4rPclDSmNwtcChUCJ4NuC2UJ4amyNGBqwSjyaK5jNHk2kkM7rZ6I0I8ul+26lvrXlSuhyv6c2PFwbFQQ== + +"@chakra-ui/react-use-merge-refs@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-merge-refs/-/react-use-merge-refs-2.0.5.tgz#13181e1a43219c6a04a01f84de0188df042ee92e" + integrity sha512-uc+MozBZ8asaUpO8SWcK6D4svRPACN63jv5uosUkXJR+05jQJkUofkfQbf2HeGVbrWCr0XZsftLIm4Mt/QMoVw== + +"@chakra-ui/react-use-outside-click@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-outside-click/-/react-use-outside-click-2.0.5.tgz#6a9896d2c2d35f3c301c3bb62bed1bf5290d1e60" + integrity sha512-WmtXUeVaMtxP9aUGGG+GQaDeUn/Bvf8TI3EU5mE1+TtqLHxyA9wtvQurynrogvpilLaBADwn/JeBeqs2wHpvqA== + dependencies: + "@chakra-ui/react-use-callback-ref" "2.0.5" + +"@chakra-ui/react-use-pan-event@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-pan-event/-/react-use-pan-event-2.0.6.tgz#e489d61672e6f473b7fd362d816e2e27ed3b2af6" + integrity sha512-Vtgl3c+Mj4hdehFRFIgruQVXctwnG1590Ein1FiU8sVnlqO6bpug6Z+B14xBa+F+X0aK+DxnhkJFyWI93Pks2g== + dependencies: + "@chakra-ui/event-utils" "2.0.6" + "@chakra-ui/react-use-latest-ref" "2.0.3" framesync "5.3.0" -"@chakra-ui/react-use-previous@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-previous/-/react-use-previous-2.0.2.tgz#1091ae8abc2082ab504e3742f8b1d75409ae7b27" - integrity sha512-ap/teLRPKopaHYD80fnf0TR/NpTWHJO5VdKg6sPyF1y5ediYLAzPT1G2OqMCj4QfJsYDctioT142URDYe0Nn7w== +"@chakra-ui/react-use-previous@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-previous/-/react-use-previous-2.0.3.tgz#9da3d53fd75f1c3da902bd6af71dcb1a7be37f31" + integrity sha512-A2ODOa0rm2HM4aqXfxxI0zPLcn5Q7iBEjRyfIQhb+EH+d2OFuj3L2slVoIpp6e/km3Xzv2d+u/WbjgTzdQ3d0w== -"@chakra-ui/react-use-safe-layout-effect@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.2.tgz#31088eeb4b2a6910251683ddb15fb855d6127adf" - integrity sha512-gl5HDq9RVeDJiT8udtpx12KRV8JPLJHDIUX8f/yZcKpXow0C7FFGg5Yy5I9397NQog5ZjKMuOg+AUq9TLJxsyQ== +"@chakra-ui/react-use-safe-layout-effect@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.3.tgz#bf63ac8c94460aa1b20b6b601a0ea873556ffb1b" + integrity sha512-dlTvQURzmdfyBbNdydgO4Wy2/HV8aJN8LszTtyb5vRZsyaslDM/ftcxo8E8QjHwRLD/V1Epb/A8731QfimfVaQ== -"@chakra-ui/react-use-size@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-size/-/react-use-size-2.0.4.tgz#3634782f8dab6aa2a37699188afa89251cbae8f3" - integrity sha512-W6rgTLuoSC4ovZtqYco8cG+yBadH3bhlg92T5lgpKDakSDr0mXcZdbGx6g0AOkgxXm0V1jWNGO1743wudtF7ew== +"@chakra-ui/react-use-size@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-size/-/react-use-size-2.0.5.tgz#4bbffb64f97dcfe1d7edeb0f03bb1d5fbc48df64" + integrity sha512-4arAApdiXk5uv5ZeFKltEUCs5h3yD9dp6gTIaXbAdq+/ENK3jMWTwlqzNbJtCyhwoOFrblLSdBrssBMIsNQfZQ== dependencies: "@zag-js/element-size" "0.1.0" -"@chakra-ui/react-use-timeout@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-timeout/-/react-use-timeout-2.0.2.tgz#f1378de0d5e01f7aee60d5b9ec3205e1fc7d2fc4" - integrity sha512-n6zb3OmxtDmRMxYkDgILqKh15aDOa8jNLHBlqHzmlL6mEGNKmMFPW9j/KvpAqSgKjUTDRnnXcpneprTMKy/yrw== +"@chakra-ui/react-use-timeout@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-timeout/-/react-use-timeout-2.0.3.tgz#16ca397dbca55a64811575884cb81a348d86d4e2" + integrity sha512-rBBUkZSQq3nJQ8fuMkgZNY2Sgg4vKiKNp05GxAwlT7TitOfVZyoTriqQpqz296bWlmkICTZxlqCWfE5fWpsTsg== dependencies: - "@chakra-ui/react-use-callback-ref" "2.0.4" + "@chakra-ui/react-use-callback-ref" "2.0.5" -"@chakra-ui/react-use-update-effect@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-update-effect/-/react-use-update-effect-2.0.4.tgz#522bc58b943fffe540a91f7a096d42e4a91b9748" - integrity sha512-F/I9LVnGAQyvww+x7tQb47wCwjhMYjpxtM1dTg1U3oCEXY0yF1Ts3NJLUAlsr3nAW6epJIwWx61niC7KWpam1w== +"@chakra-ui/react-use-update-effect@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-update-effect/-/react-use-update-effect-2.0.5.tgz#aede8f13f2b3de254b4ffa3b8cec1b70bd2876c5" + integrity sha512-y9tCMr1yuDl8ATYdh64Gv8kge5xE1DMykqPDZw++OoBsTaWr3rx40wblA8NIWuSyJe5ErtKP2OeglvJkYhryJQ== -"@chakra-ui/react-utils@2.0.8": - version "2.0.8" - resolved "https://registry.yarnpkg.com/@chakra-ui/react-utils/-/react-utils-2.0.8.tgz#1db4e920386f4afbf44fe9dd8aaaf6f22eefb371" - integrity sha512-OSHHBKZlJWTi2NZcPnBx1PyZvLQY+n5RPBtcri7/89EDdAwz2NdEhp2Dz1yQRctOSCF1kB/rnCYDP1U0oRk9RQ== +"@chakra-ui/react-utils@2.0.9": + version "2.0.9" + resolved "https://registry.yarnpkg.com/@chakra-ui/react-utils/-/react-utils-2.0.9.tgz#5cdf0bc8dee57c15f15ace04fbba574ec8aa6ecc" + integrity sha512-nlwPBVlQmcl1PiLzZWyrT3FSnt3vKSkBMzQ0EF4SJWA/nOIqTvmffb5DCzCqPzgQaE/Da1Xgus+JufFGM8GLCQ== dependencies: - "@chakra-ui/utils" "2.0.11" + "@chakra-ui/utils" "2.0.12" "@chakra-ui/react@^2.3.1": - version "2.3.7" - resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.3.7.tgz#58dfcec0bea9681957491948fd3033b2cb237b27" - integrity sha512-vnnBDwyvzhQfIgWkqhI8dAX2voVfJOZdTyOsKah0eHc5mvc2oUfoHGRzYNZPSb9bHiKd5roktaDp5tayXv/ECg== + version "2.4.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.4.1.tgz#3f3db03e3aa7bcb0bee76427824b3437a9509166" + integrity sha512-qZVRrQi5JRIc44EaeOaXvXt6EdWhkQjhFFL8hyH0RH6cSFlotmmzCHBT5N1jC6nqXFn5OOxOWMD9FIVsbI56hQ== dependencies: - "@chakra-ui/accordion" "2.1.2" - "@chakra-ui/alert" "2.0.11" - "@chakra-ui/avatar" "2.2.0" - "@chakra-ui/breadcrumb" "2.1.0" - "@chakra-ui/button" "2.0.11" - "@chakra-ui/checkbox" "2.2.3" - "@chakra-ui/close-button" "2.0.11" - "@chakra-ui/control-box" "2.0.10" - "@chakra-ui/counter" "2.0.10" - "@chakra-ui/css-reset" "2.0.9" - "@chakra-ui/editable" "2.0.14" - "@chakra-ui/form-control" "2.0.11" - "@chakra-ui/hooks" "2.1.1" - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/image" "2.0.11" - "@chakra-ui/input" "2.0.12" - "@chakra-ui/layout" "2.1.9" - "@chakra-ui/live-region" "2.0.10" - "@chakra-ui/media-query" "3.2.7" - "@chakra-ui/menu" "2.1.3" - "@chakra-ui/modal" "2.2.2" - "@chakra-ui/number-input" "2.0.12" - "@chakra-ui/pin-input" "2.0.15" - "@chakra-ui/popover" "2.1.2" - "@chakra-ui/popper" "3.0.8" - "@chakra-ui/portal" "2.0.10" - "@chakra-ui/progress" "2.1.0" - "@chakra-ui/provider" "2.0.21" - "@chakra-ui/radio" "2.0.12" - "@chakra-ui/react-env" "2.0.10" - "@chakra-ui/select" "2.0.12" - "@chakra-ui/skeleton" "2.0.17" - "@chakra-ui/slider" "2.0.12" - "@chakra-ui/spinner" "2.0.10" - "@chakra-ui/stat" "2.0.11" - "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/switch" "2.0.15" - "@chakra-ui/system" "2.3.1" - "@chakra-ui/table" "2.0.11" - "@chakra-ui/tabs" "2.1.4" - "@chakra-ui/tag" "2.0.11" - "@chakra-ui/textarea" "2.0.12" - "@chakra-ui/theme" "2.1.15" - "@chakra-ui/theme-utils" "2.0.2" - "@chakra-ui/toast" "4.0.1" - "@chakra-ui/tooltip" "2.2.0" - "@chakra-ui/transition" "2.0.11" - "@chakra-ui/utils" "2.0.11" - "@chakra-ui/visually-hidden" "2.0.12" + "@chakra-ui/accordion" "2.1.3" + "@chakra-ui/alert" "2.0.12" + "@chakra-ui/avatar" "2.2.1" + "@chakra-ui/breadcrumb" "2.1.1" + "@chakra-ui/button" "2.0.12" + "@chakra-ui/card" "2.1.1" + "@chakra-ui/checkbox" "2.2.4" + "@chakra-ui/close-button" "2.0.12" + "@chakra-ui/control-box" "2.0.11" + "@chakra-ui/counter" "2.0.11" + "@chakra-ui/css-reset" "2.0.10" + "@chakra-ui/editable" "2.0.15" + "@chakra-ui/form-control" "2.0.12" + "@chakra-ui/hooks" "2.1.2" + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/image" "2.0.12" + "@chakra-ui/input" "2.0.13" + "@chakra-ui/layout" "2.1.10" + "@chakra-ui/live-region" "2.0.11" + "@chakra-ui/media-query" "3.2.8" + "@chakra-ui/menu" "2.1.4" + "@chakra-ui/modal" "2.2.3" + "@chakra-ui/number-input" "2.0.13" + "@chakra-ui/pin-input" "2.0.16" + "@chakra-ui/popover" "2.1.3" + "@chakra-ui/popper" "3.0.9" + "@chakra-ui/portal" "2.0.11" + "@chakra-ui/progress" "2.1.1" + "@chakra-ui/provider" "2.0.23" + "@chakra-ui/radio" "2.0.13" + "@chakra-ui/react-env" "2.0.11" + "@chakra-ui/select" "2.0.13" + "@chakra-ui/skeleton" "2.0.18" + "@chakra-ui/slider" "2.0.13" + "@chakra-ui/spinner" "2.0.11" + "@chakra-ui/stat" "2.0.12" + "@chakra-ui/styled-system" "2.3.5" + "@chakra-ui/switch" "2.0.16" + "@chakra-ui/system" "2.3.3" + "@chakra-ui/table" "2.0.12" + "@chakra-ui/tabs" "2.1.5" + "@chakra-ui/tag" "2.0.12" + "@chakra-ui/textarea" "2.0.13" + "@chakra-ui/theme" "2.2.1" + "@chakra-ui/theme-utils" "2.0.4" + "@chakra-ui/toast" "4.0.3" + "@chakra-ui/tooltip" "2.2.1" + "@chakra-ui/transition" "2.0.12" + "@chakra-ui/utils" "2.0.12" + "@chakra-ui/visually-hidden" "2.0.13" -"@chakra-ui/select@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/select/-/select-2.0.12.tgz#9b485e6a28c9aa468bc1c0d8a78aabd985b0c370" - integrity sha512-NCDMb0w48GYCHmazVSQ7/ysEpbnri+Up6n+v7yytf6g43TPRkikvK5CsVgLnAEj0lIdCJhWXTcZer5wG5KOEgA== +"@chakra-ui/select@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/select/-/select-2.0.13.tgz#60a7302f44e49fc22d251bbcdbae24ec64f5cc4c" + integrity sha512-5MHqD2OlnLdPt8FQVxfgMJZKOTdcbu3cMFGCS2X9XCxJQkQa4kPfXq3N6BRh5L5XFI+uRsmk6aYJoawZiwNJPg== dependencies: - "@chakra-ui/form-control" "2.0.11" + "@chakra-ui/form-control" "2.0.12" -"@chakra-ui/shared-utils@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/shared-utils/-/shared-utils-2.0.2.tgz#1df08133194c12ac4df9302604ec37784c2bb026" - integrity sha512-wC58Fh6wCnFFQyiebVZ0NI7PFW9+Vch0QE6qN7iR+bLseOzQY9miYuzPJ1kMYiFd6QTOmPJkI39M3wHqrPYiOg== +"@chakra-ui/shared-utils@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/shared-utils/-/shared-utils-2.0.3.tgz#97cbc11282e381ebd9f581c603088f9d60ead451" + integrity sha512-pCU+SUGdXzjAuUiUT8mriekL3tJVfNdwSTIaNeip7k/SWDzivrKGMwAFBxd3XVTDevtVusndkO4GJuQ3yILzDg== -"@chakra-ui/skeleton@2.0.17": - version "2.0.17" - resolved "https://registry.yarnpkg.com/@chakra-ui/skeleton/-/skeleton-2.0.17.tgz#737e08f771980f5b73060dc6c940691e7759d044" - integrity sha512-dL7viXEKDEzmAJGbHMj+QbGl9PAd0VWztEcWcz5wOGfmAcJllA0lVh6NmG/yqLb6iXPCX4Y1Y0Yurm459TEYWg== +"@chakra-ui/skeleton@2.0.18": + version "2.0.18" + resolved "https://registry.yarnpkg.com/@chakra-ui/skeleton/-/skeleton-2.0.18.tgz#a2af241f0b1b692db4d10b90a887107a5e401c7d" + integrity sha512-qjcD8BgVx4kL8Lmb8EvmmDGM2ICl6CqhVE2LShJrgG7PDM6Rt6rYM617kqLurLYZjbJUiwgf9VXWifS0IpT31Q== dependencies: - "@chakra-ui/media-query" "3.2.7" - "@chakra-ui/react-use-previous" "2.0.2" + "@chakra-ui/media-query" "3.2.8" + "@chakra-ui/react-use-previous" "2.0.3" -"@chakra-ui/slider@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/slider/-/slider-2.0.12.tgz#42fc5fe385c507276da29f4aa49a6408ee853978" - integrity sha512-Cna04J7e4+F3tJNb7tRNfPP+koicbDsKJBp+f1NpR32JbRzIfrf2Vdr4hfD5/uOfC4RGxnVInNZzZLGBelLtLw== +"@chakra-ui/slider@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/slider/-/slider-2.0.13.tgz#5c64bb8346f5310688845fa72363b1a35bc1560b" + integrity sha512-MypqZrKFNFPH8p0d2g2DQacl5ylUQKlGKeBu099ZCmT687U2Su3cq1wOGNGnD6VZvtwDYMKXn7kXPSMW06aBcg== dependencies: - "@chakra-ui/number-utils" "2.0.4" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-callback-ref" "2.0.4" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-latest-ref" "2.0.2" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/react-use-pan-event" "2.0.5" - "@chakra-ui/react-use-size" "2.0.4" - "@chakra-ui/react-use-update-effect" "2.0.4" + "@chakra-ui/number-utils" "2.0.5" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-callback-ref" "2.0.5" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-latest-ref" "2.0.3" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/react-use-pan-event" "2.0.6" + "@chakra-ui/react-use-size" "2.0.5" + "@chakra-ui/react-use-update-effect" "2.0.5" -"@chakra-ui/spinner@2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@chakra-ui/spinner/-/spinner-2.0.10.tgz#f8b1b6f1c8f45e3aeab44d5ab1f1debc71e52573" - integrity sha512-SwId1xPaaFAaEYrR9eHkQHAuB66CbxwjWaQonEjeEUSh9ecxkd5WbXlsQSyf2hVRIqXJg0m3HIYblcKUsQt9Rw== - -"@chakra-ui/stat@2.0.11": +"@chakra-ui/spinner@2.0.11": version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/stat/-/stat-2.0.11.tgz#0c052aee68486a892e09e802bb569dc984e31eae" - integrity sha512-ZPFK2fKufDSHD8bp/KhO3jLgW/b3PzdG4zV+7iTO7OYjxm5pkBfBAeMqfXGx4cl51rtWUKzsY0HV4vLLjcSjHw== - dependencies: - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/react-context" "2.0.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/spinner/-/spinner-2.0.11.tgz#a5dd76b6cb0f3524d9b90b73fa4acfb6adc69f33" + integrity sha512-piO2ghWdJzQy/+89mDza7xLhPnW7pA+ADNbgCb1vmriInWedS41IBKe+pSPz4IidjCbFu7xwKE0AerFIbrocCA== -"@chakra-ui/styled-system@2.3.4": - version "2.3.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/styled-system/-/styled-system-2.3.4.tgz#6022c5a675b54a69b1d3c2d3e60258901dc7b82a" - integrity sha512-Lozbedu+GBj4EbHB/eGv475SFDLApsIEN9gNKiZJBJAE1HIhHn3Seh1iZQSrHC/Beq+D5cQq3Z+yPn3bXtFU7w== +"@chakra-ui/stat@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/stat/-/stat-2.0.12.tgz#bca87fb83c9bf2c365e8697f33f228721d9a6b28" + integrity sha512-3MTt4nA46AvlIuE6OP2O1Nna9+vcIZD1E9G4QLKwPoJ5pDHKcY4Y0t4oDdbawykthyj2fIBko7FiMIHTaAOjqg== + dependencies: + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/react-context" "2.0.5" + +"@chakra-ui/styled-system@2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/styled-system/-/styled-system-2.3.5.tgz#88f1530d77c30285c6aa7c561d4bd770bebd705c" + integrity sha512-Xj78vEq/R+1OVx36tJnAb/vLtX6DD9k/yxj3lCigl3q5Qjr6aglPBjqHdfFbGaQeB0Gt4ABPyxUDO3sAhdxC4w== dependencies: csstype "^3.0.11" lodash.mergewith "4.6.2" -"@chakra-ui/switch@2.0.15": - version "2.0.15" - resolved "https://registry.yarnpkg.com/@chakra-ui/switch/-/switch-2.0.15.tgz#7bcaf8380a3f3969685bc89d2b95b72d083b6f81" - integrity sha512-93tUSAKBnIIUddf7Bvk0uDNeZ5e5FDlWRbAmfaJNSN4YVKFZI3VYd9PCfxpmQB8Uu6Qt8Ex70v++meNhd3kpHA== +"@chakra-ui/switch@2.0.16": + version "2.0.16" + resolved "https://registry.yarnpkg.com/@chakra-ui/switch/-/switch-2.0.16.tgz#b8d1275d723d384a22fe8900fc2913a808b8ceaa" + integrity sha512-uLGjXHaxjCvf97jrwTuYtHSAzep/Mb8hSr/D1BRlBNz6E0kHGRaKANl/pAZAK1z7ZzvyYokK65Wpce2GQ4U/dQ== dependencies: - "@chakra-ui/checkbox" "2.2.3" + "@chakra-ui/checkbox" "2.2.4" -"@chakra-ui/system@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@chakra-ui/system/-/system-2.3.1.tgz#1fbf18e1f19f1f3d489ce1b864be1b2eb444072d" - integrity sha512-pR8KYmqN6rQ+aZ8cT5IYfF7rVXEuh6ZWZgWIdgmt5NMseQ2DR9JlK0SRoHNFW1TnFD4Odq2T7Xh46MHiQZCm1g== +"@chakra-ui/system@2.3.3": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/system/-/system-2.3.3.tgz#1557f573a3394e375411631b0836f0e79c9f68f9" + integrity sha512-nOEXC08d4PiK/4QwSV4tnci2SoWjDHEVSveWW9qoRRr1iZUbQffpwYyJY4pBpPJE7CsA2w3GXK7NdMFRwPtamQ== dependencies: - "@chakra-ui/color-mode" "2.1.9" - "@chakra-ui/react-utils" "2.0.8" - "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/theme-utils" "2.0.2" - "@chakra-ui/utils" "2.0.11" + "@chakra-ui/color-mode" "2.1.10" + "@chakra-ui/react-utils" "2.0.9" + "@chakra-ui/styled-system" "2.3.5" + "@chakra-ui/theme-utils" "2.0.4" + "@chakra-ui/utils" "2.0.12" react-fast-compare "3.2.0" -"@chakra-ui/table@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/table/-/table-2.0.11.tgz#9bd25d5383c94982b89e792675bc1d1f667f81f3" - integrity sha512-zQTiqPKEgjdeO/PG0FByn0fH4sPF7dLJF+YszrIzDc6wvpD96iY6MYLeV+CSelbH1g0/uibcJ10PSaFStfGUZg== - dependencies: - "@chakra-ui/react-context" "2.0.4" - -"@chakra-ui/tabs@2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@chakra-ui/tabs/-/tabs-2.1.4.tgz#38d9748ce2cfa583a123c0f695ea1cbce1a6bd42" - integrity sha512-/CQGj1lC9lvruT5BCYZH6Ok64W4CDSysDXuR2XPZXIih9kVOdXQEMXxG8+3vc63WqTBjHuURtZI0g8ouOy84ew== - dependencies: - "@chakra-ui/clickable" "2.0.10" - "@chakra-ui/descendant" "3.0.10" - "@chakra-ui/lazy-utils" "2.0.2" - "@chakra-ui/react-children-utils" "2.0.3" - "@chakra-ui/react-context" "2.0.4" - "@chakra-ui/react-use-controllable-state" "2.0.5" - "@chakra-ui/react-use-merge-refs" "2.0.4" - "@chakra-ui/react-use-safe-layout-effect" "2.0.2" - -"@chakra-ui/tag@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/tag/-/tag-2.0.11.tgz#14702adf5d1456dbbb84ea7a4b314953b92c323f" - integrity sha512-iJJcX+4hl+6Se/8eCRzG+xxDwZfiYgc4Ly/8s93M0uW2GLb+ybbfSE2DjeKSyk3mQVeGzuxGkBfDHH2c2v26ew== - dependencies: - "@chakra-ui/icon" "3.0.11" - "@chakra-ui/react-context" "2.0.4" - -"@chakra-ui/textarea@2.0.12": +"@chakra-ui/table@2.0.12": version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/textarea/-/textarea-2.0.12.tgz#469c1d64cb855b3b534dcd7fcc1d927e60da8da1" - integrity sha512-msR9YMynRXwZIqR6DgjQ2MogA/cW1syBx/R0v3es+9Zx8zlbuKdoLhYqajHteCup8dUzTeIH2Vs2vAwgq4wu5A== + resolved "https://registry.yarnpkg.com/@chakra-ui/table/-/table-2.0.12.tgz#387653cf660318b13086b6497aca2b671deb055a" + integrity sha512-TSxzpfrOoB+9LTdNTMnaQC6OTsp36TlCRxJ1+1nAiCmlk+m+FiNzTQsmBalDDhc29rm+6AdRsxSPsjGWB8YVwg== dependencies: - "@chakra-ui/form-control" "2.0.11" + "@chakra-ui/react-context" "2.0.5" -"@chakra-ui/theme-tools@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/theme-tools/-/theme-tools-2.0.12.tgz#b29d9fb626d35e3b00f532c64f95ea261d8f6997" - integrity sha512-mnMlKSmXkCjHUJsKWmJbgBTGF2vnLaMLv1ihkBn5eQcCubMQrBLTiMAEFl5pZdzuHItU6QdnLGA10smcXbNl0g== +"@chakra-ui/tabs@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@chakra-ui/tabs/-/tabs-2.1.5.tgz#827b0e71eb173c09c31dcbbe05fc1146f4267229" + integrity sha512-XmnKDclAJe0FoW4tdC8AlnZpPN5fcj92l4r2sqiL9WyYVEM71hDxZueETIph/GTtfMelG7Z8e5vBHP4rh1RT5g== dependencies: - "@chakra-ui/anatomy" "2.0.7" + "@chakra-ui/clickable" "2.0.11" + "@chakra-ui/descendant" "3.0.11" + "@chakra-ui/lazy-utils" "2.0.3" + "@chakra-ui/react-children-utils" "2.0.4" + "@chakra-ui/react-context" "2.0.5" + "@chakra-ui/react-use-controllable-state" "2.0.6" + "@chakra-ui/react-use-merge-refs" "2.0.5" + "@chakra-ui/react-use-safe-layout-effect" "2.0.3" + +"@chakra-ui/tag@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/tag/-/tag-2.0.12.tgz#8f8e838efc1c9c504c92bbfd36f2435e8cdcfa6d" + integrity sha512-LmPnE6aFF0pfscgYRKZbkWvG7detszwNdcmalQJdp2C8E/xuqi9Vj9RWU/bmRyWHJN+8R603mvPVWj5oN0rarA== + dependencies: + "@chakra-ui/icon" "3.0.12" + "@chakra-ui/react-context" "2.0.5" + +"@chakra-ui/textarea@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/textarea/-/textarea-2.0.13.tgz#ff32e3ad61880b13514df1c6f6b62176e8f91823" + integrity sha512-tMiBGimVB+Z8T+yAQ4E45ECmCix0Eisuukf4wUBOpdSRWaArpAoA4RuA34z7OoMbNa3fxEVcvnd2apX1InBtsQ== + dependencies: + "@chakra-ui/form-control" "2.0.12" + +"@chakra-ui/theme-tools@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/theme-tools/-/theme-tools-2.0.13.tgz#cde5503b4044832ab659904281e8a260deae73bb" + integrity sha512-Dvai4lljtrs9f2aha3b9yajmxroNaVGNvkKkwh77dRW2jcNNBXepkGWfNLXVkP68Yydz5O+Lt5DKvETrEho9cQ== + dependencies: + "@chakra-ui/anatomy" "2.1.0" "@ctrl/tinycolor" "^3.4.0" -"@chakra-ui/theme-utils@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/theme-utils/-/theme-utils-2.0.2.tgz#fae1c307fe82a4b7c824f73ef34f77fc515d970b" - integrity sha512-juGdDxTJx7deu2xgdNudRWi+qTbViPQKK0niLSOaXsZIfobVDgBn2iIgwLqFcIR0M1yPk64ERtEuvgGa2yI9iw== +"@chakra-ui/theme-utils@2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@chakra-ui/theme-utils/-/theme-utils-2.0.4.tgz#7357dd03734bc74d3a8be09db19d6b73c8f34075" + integrity sha512-vrYuZxzc31c1bevfJRCk4j68dUw4Bxt6QAm3RZcUQyvTnS6q5FhMz+R1X6vS3+IfIhSscZFxwRQSp/TpyY4Vtw== dependencies: - "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/theme" "2.1.15" + "@chakra-ui/styled-system" "2.3.5" + "@chakra-ui/theme" "2.2.1" lodash.mergewith "4.6.2" -"@chakra-ui/theme@2.1.15": - version "2.1.15" - resolved "https://registry.yarnpkg.com/@chakra-ui/theme/-/theme-2.1.15.tgz#caf7902435b6e09f957d376cd2dcb509e062a0fb" - integrity sha512-e+oZ0e7kXjtjWO0phUzlz9weWv0w4lv4Us/Lf8DXbstrPujgyxNYOF0LHTDRxzUNa5bYUsP9g5W+FW4e9E2UsQ== +"@chakra-ui/theme@2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/theme/-/theme-2.2.1.tgz#83f5e484640bf8d97075f9fa3ca41f02c5caf3f7" + integrity sha512-6qEJMfnTjB5vGoY1kO/fDarK0Ivrb77UzDw8rY0aTHbjLJkOVxtd7d2H7m8xufh6gecCI5HuXqq8I297pLYm+w== dependencies: - "@chakra-ui/anatomy" "2.0.7" - "@chakra-ui/theme-tools" "2.0.12" + "@chakra-ui/anatomy" "2.1.0" + "@chakra-ui/theme-tools" "2.0.13" -"@chakra-ui/toast@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@chakra-ui/toast/-/toast-4.0.1.tgz#e06e868636b221aa6da9564e30716d76c5508fc5" - integrity sha512-F2Xrn+LwksgdgvkUDcMNJuGfZabBNwx9PgMq6SE0Oz5XYitgrGfEx55q6Hzl6nOyHq7IkEjmZGxv3N/nYq+P3w== +"@chakra-ui/toast@4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/toast/-/toast-4.0.3.tgz#7304228663495d39fd4bd72ffc320f5a279265ac" + integrity sha512-n6kShxGrHikrJO1vC5cPFbvz5LjG56NhVch3tmyk2g2yrJ87zbNGQqQ2BlLuJcEVFDu3tu+wC1qHdXs8WU4bjg== dependencies: - "@chakra-ui/alert" "2.0.11" - "@chakra-ui/close-button" "2.0.11" - "@chakra-ui/portal" "2.0.10" - "@chakra-ui/react-use-timeout" "2.0.2" - "@chakra-ui/react-use-update-effect" "2.0.4" - "@chakra-ui/styled-system" "2.3.4" - "@chakra-ui/theme" "2.1.15" + "@chakra-ui/alert" "2.0.12" + "@chakra-ui/close-button" "2.0.12" + "@chakra-ui/portal" "2.0.11" + "@chakra-ui/react-use-timeout" "2.0.3" + "@chakra-ui/react-use-update-effect" "2.0.5" + "@chakra-ui/styled-system" "2.3.5" + "@chakra-ui/theme" "2.2.1" -"@chakra-ui/tooltip@2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@chakra-ui/tooltip/-/tooltip-2.2.0.tgz#24e005f831cddf1c0e41dd246ed2771a97b8637c" - integrity sha512-oB97aQJBW+U3rRIt1ct7NaDRMnbW16JQ5ZBCl3BzN1VJWO3djiNuscpjVdZSceb+FdGSFo+GoDozp1ZwqdfFeQ== +"@chakra-ui/tooltip@2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@chakra-ui/tooltip/-/tooltip-2.2.1.tgz#ee08a7759f2b88bdc5d73b4e459bee3256ba5bcb" + integrity sha512-X/VIYgegx1Ab6m0PSI/iISo/hRAe4Xv+hOwinIxIUUkLS8EOtBvq4RhlB6ieFn8jAAPDzPKJW6QFqz8ecJdUiw== dependencies: - "@chakra-ui/popper" "3.0.8" - "@chakra-ui/portal" "2.0.10" - "@chakra-ui/react-types" "2.0.3" - "@chakra-ui/react-use-disclosure" "2.0.5" - "@chakra-ui/react-use-event-listener" "2.0.4" - "@chakra-ui/react-use-merge-refs" "2.0.4" + "@chakra-ui/popper" "3.0.9" + "@chakra-ui/portal" "2.0.11" + "@chakra-ui/react-types" "2.0.4" + "@chakra-ui/react-use-disclosure" "2.0.6" + "@chakra-ui/react-use-event-listener" "2.0.5" + "@chakra-ui/react-use-merge-refs" "2.0.5" -"@chakra-ui/transition@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/transition/-/transition-2.0.11.tgz#b2cfeb2150871c635cb9d03d9b525481dbe56f56" - integrity sha512-O0grc162LARPurjz1R+J+zr4AAKsVwN5+gaqLfZLMWg6TpvczJhwEA2fLCNAdkC/gomere390bJsy52xfUacUw== +"@chakra-ui/transition@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/transition/-/transition-2.0.12.tgz#876c6ed24e442a720a8570490a93cb1f87008700" + integrity sha512-ff6eU+m08ccYfCkk0hKfY/XlmGxCrfbBgsKgV4mirZ4SKUL1GVye8CYuHwWQlBJo+8s0yIpsTNxAuX4n/cW9/w== -"@chakra-ui/utils@2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@chakra-ui/utils/-/utils-2.0.11.tgz#8e773f900a8356bd10c48b59151a781dba1c7b70" - integrity sha512-4ZQdK6tbOuTrUCsAQBHWo7tw5/Q6pBV93ZbVpats61cSWMFGv32AIQw9/hA4un2zDeSWN9ZMVLNjAY2Dq/KQOA== +"@chakra-ui/utils@2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@chakra-ui/utils/-/utils-2.0.12.tgz#5ab8a4529fca68d9f8c6722004f6a5129b0b75e9" + integrity sha512-1Z1MgsrfMQhNejSdrPJk8v5J4gCefHo+1wBmPPHTz5bGEbAAbZ13aXAfXy8w0eFy0Nvnawn0EHW7Oynp/MdH+Q== dependencies: "@types/lodash.mergewith" "4.6.6" css-box-model "1.2.1" framesync "5.3.0" lodash.mergewith "4.6.2" -"@chakra-ui/visually-hidden@2.0.12": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@chakra-ui/visually-hidden/-/visually-hidden-2.0.12.tgz#e4bb4983ed16dbdb7e8e84c29e81e3e493661284" - integrity sha512-5Vn21NpAol5tX5OKJlMh4pfTlX98CNhrbA29OGZyfPzNjXw2ZQo0iDUPG4gMNa9EdbVWpbbRmT6l6R6ObatEUw== +"@chakra-ui/visually-hidden@2.0.13": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@chakra-ui/visually-hidden/-/visually-hidden-2.0.13.tgz#6553467d93f206d17716bcbe6e895a84eef87472" + integrity sha512-sDEeeEjLfID333EC46NdCbhK2HyMXlpl5HzcJjuwWIpyVz4E1gKQ9hlwpq6grijvmzeSywQ5D3tTwUrvZck4KQ== "@ctrl/tinycolor@^3.4.0": version "3.4.1" @@ -1124,15 +1132,15 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== -"@esbuild/android-arm@0.15.13": - version "0.15.13" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.13.tgz#ce11237a13ee76d5eae3908e47ba4ddd380af86a" - integrity sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw== +"@esbuild/android-arm@0.15.15": + version "0.15.15" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.15.tgz#35b3cc0f9e69cb53932d44f60b99dd440335d2f0" + integrity sha512-JJjZjJi2eBL01QJuWjfCdZxcIgot+VoK6Fq7eKF9w4YHm9hwl7nhBR1o2Wnt/WcANk5l9SkpvrldW1PLuXxcbw== -"@esbuild/linux-loong64@0.15.13": - version "0.15.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz#64e8825bf0ce769dac94ee39d92ebe6272020dfc" - integrity sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag== +"@esbuild/linux-loong64@0.15.15": + version "0.15.15" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.15.tgz#32c65517a09320b62530867345222fde7794fbe1" + integrity sha512-lhz6UNPMDXUhtXSulw8XlFAtSYO26WmHQnCi2Lg2p+/TMiJKNLtZCYUxV4wG6rZMzXmr8InGpNwk+DLT2Hm0PA== "@eslint/eslintrc@^1.3.3": version "1.3.3" @@ -1678,9 +1686,9 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.14.188" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.188.tgz#e4990c4c81f7c9b00c5ff8eae389c10f27980da5" - integrity sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w== + version "4.14.189" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.189.tgz#975ff8c38da5ae58b751127b19ad5e44b5b7f6d2" + integrity sha512-kb9/98N6X8gyME9Cf7YaqIMvYGnBSWqEci6tiettE6iJWH1XdJz/PO8LB0GtLCG7x8dU3KWhZT+lA1a35127tA== "@types/node@>=10.0.0": version "18.11.9" @@ -1698,9 +1706,9 @@ integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== "@types/react-dom@^18.0.6": - version "18.0.8" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.8.tgz#d2606d855186cd42cc1b11e63a71c39525441685" - integrity sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw== + version "18.0.9" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.9.tgz#ffee5e4bfc2a2f8774b15496474f8e7fe8d0b504" + integrity sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg== dependencies: "@types/react" "*" @@ -1748,13 +1756,13 @@ integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== "@typescript-eslint/eslint-plugin@^5.36.2": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.42.0.tgz#36a8c0c379870127059889a9cc7e05c260d2aaa5" - integrity sha512-5TJh2AgL6+wpL8H/GTSjNb4WrjKoR2rqvFxR/DDTqYNk6uXn8BJMEcncLSpMbf/XV1aS0jAjYwn98uvVCiAywQ== + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz#105788f299050c917eb85c4d9fd04b089e3740de" + integrity sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw== dependencies: - "@typescript-eslint/scope-manager" "5.42.0" - "@typescript-eslint/type-utils" "5.42.0" - "@typescript-eslint/utils" "5.42.0" + "@typescript-eslint/scope-manager" "5.44.0" + "@typescript-eslint/type-utils" "5.44.0" + "@typescript-eslint/utils" "5.44.0" debug "^4.3.4" ignore "^5.2.0" natural-compare-lite "^1.4.0" @@ -1763,71 +1771,71 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5.36.2": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.42.0.tgz#be0ffbe279e1320e3d15e2ef0ad19262f59e9240" - integrity sha512-Ixh9qrOTDRctFg3yIwrLkgf33AHyEIn6lhyf5cCfwwiGtkWhNpVKlEZApi3inGQR/barWnY7qY8FbGKBO7p3JA== + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.44.0.tgz#99e2c710a2252191e7a79113264f438338b846ad" + integrity sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA== dependencies: - "@typescript-eslint/scope-manager" "5.42.0" - "@typescript-eslint/types" "5.42.0" - "@typescript-eslint/typescript-estree" "5.42.0" + "@typescript-eslint/scope-manager" "5.44.0" + "@typescript-eslint/types" "5.44.0" + "@typescript-eslint/typescript-estree" "5.44.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.42.0": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.42.0.tgz#e1f2bb26d3b2a508421ee2e3ceea5396b192f5ef" - integrity sha512-l5/3IBHLH0Bv04y+H+zlcLiEMEMjWGaCX6WyHE5Uk2YkSGAMlgdUPsT/ywTSKgu9D1dmmKMYgYZijObfA39Wow== +"@typescript-eslint/scope-manager@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz#988c3f34b45b3474eb9ff0674c18309dedfc3e04" + integrity sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g== dependencies: - "@typescript-eslint/types" "5.42.0" - "@typescript-eslint/visitor-keys" "5.42.0" + "@typescript-eslint/types" "5.44.0" + "@typescript-eslint/visitor-keys" "5.44.0" -"@typescript-eslint/type-utils@5.42.0": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.42.0.tgz#4206d7192d4fe903ddf99d09b41d4ac31b0b7dca" - integrity sha512-HW14TXC45dFVZxnVW8rnUGnvYyRC0E/vxXShFCthcC9VhVTmjqOmtqj6H5rm9Zxv+ORxKA/1aLGD7vmlLsdlOg== +"@typescript-eslint/type-utils@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz#bc5a6e8a0269850714a870c9268c038150dfb3c7" + integrity sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w== dependencies: - "@typescript-eslint/typescript-estree" "5.42.0" - "@typescript-eslint/utils" "5.42.0" + "@typescript-eslint/typescript-estree" "5.44.0" + "@typescript-eslint/utils" "5.44.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.42.0": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.42.0.tgz#5aeff9b5eced48f27d5b8139339bf1ef805bad7a" - integrity sha512-t4lzO9ZOAUcHY6bXQYRuu+3SSYdD9TS8ooApZft4WARt4/f2Cj/YpvbTe8A4GuhT4bNW72goDMOy7SW71mZwGw== +"@typescript-eslint/types@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.44.0.tgz#f3f0b89aaff78f097a2927fe5688c07e786a0241" + integrity sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ== -"@typescript-eslint/typescript-estree@5.42.0": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.42.0.tgz#2592d24bb5f89bf54a63384ff3494870f95b3fd8" - integrity sha512-2O3vSq794x3kZGtV7i4SCWZWCwjEtkWfVqX4m5fbUBomOsEOyd6OAD1qU2lbvV5S8tgy/luJnOYluNyYVeOTTg== +"@typescript-eslint/typescript-estree@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz#0461b386203e8d383bb1268b1ed1da9bc905b045" + integrity sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw== dependencies: - "@typescript-eslint/types" "5.42.0" - "@typescript-eslint/visitor-keys" "5.42.0" + "@typescript-eslint/types" "5.44.0" + "@typescript-eslint/visitor-keys" "5.44.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.42.0": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.42.0.tgz#f06bd43b9a9a06ed8f29600273240e84a53f2f15" - integrity sha512-JZ++3+h1vbeG1NUECXQZE3hg0kias9kOtcQr3+JVQ3whnjvKuMyktJAAIj6743OeNPnGBmjj7KEmiDL7qsdnCQ== +"@typescript-eslint/utils@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.44.0.tgz#d733da4d79d6c30f1a68b531cdda1e0c1f00d52d" + integrity sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.42.0" - "@typescript-eslint/types" "5.42.0" - "@typescript-eslint/typescript-estree" "5.42.0" + "@typescript-eslint/scope-manager" "5.44.0" + "@typescript-eslint/types" "5.44.0" + "@typescript-eslint/typescript-estree" "5.44.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.42.0": - version "5.42.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.42.0.tgz#ee8d62d486f41cfe646632fab790fbf0c1db5bb0" - integrity sha512-QHbu5Hf/2lOEOwy+IUw0GoSCuAzByTAWWrOTKzTzsotiUnWFpuKnXcAhC9YztAf2EElQ0VvIK+pHJUPkM0q7jg== +"@typescript-eslint/visitor-keys@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz#10740dc28902bb903d12ee3a005cc3a70207d433" + integrity sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ== dependencies: - "@typescript-eslint/types" "5.42.0" + "@typescript-eslint/types" "5.44.0" eslint-visitor-keys "^3.3.0" "@vitejs/plugin-react@^2.0.1": @@ -1916,9 +1924,9 @@ any-promise@^1.0.0: integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -1929,9 +1937,9 @@ argparse@^2.0.1: integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== aria-hidden@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.1.tgz#ad8c1edbde360b454eb2bf717ea02da00bfee0f8" - integrity sha512-PN344VAf9j1EAi+jyVHOJ8XidQdPVssGco39eNcsGdM4wcsILtxrKLkbuiMfLWYROK1FjRQasMWCBttrhjnr6A== + version "1.2.2" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.2.tgz#8c4f7cc88d73ca42114106fdf6f47e68d31475b8" + integrity sha512-6y/ogyDTk/7YAe91T3E2PR1ALVKyM2QbTio5HwM+N1Q6CMlCKhvClyIjkckBswa0f2xJhjsfzIGa1yVSe1UMVA== dependencies: tslib "^2.0.0" @@ -2218,10 +2226,10 @@ engine.io-parser@~5.0.3: resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== -engine.io@~6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.0.tgz#003bec48f6815926f2b1b17873e576acd54f41d0" - integrity sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg== +engine.io@~6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.1.tgz#e3f7826ebc4140db9bbaa9021ad6b1efb175878f" + integrity sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA== dependencies: "@types/cookie" "^0.4.1" "@types/cors" "^2.8.12" @@ -2241,133 +2249,133 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -esbuild-android-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz#5f25864055dbd62e250f360b38b4c382224063af" - integrity sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g== +esbuild-android-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.15.tgz#fd959b034dd761d14e13dda6214b6948841ff4ff" + integrity sha512-F+WjjQxO+JQOva3tJWNdVjouFMLK6R6i5gjDvgUthLYJnIZJsp1HlF523k73hELY20WPyEO8xcz7aaYBVkeg5Q== -esbuild-android-arm64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz#d8820f999314efbe8e0f050653a99ff2da632b0f" - integrity sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w== +esbuild-android-arm64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.15.tgz#9733b71cf0229b4356f106a455b2cfdf7884aa59" + integrity sha512-attlyhD6Y22jNyQ0fIIQ7mnPvDWKw7k6FKnsXlBvQE6s3z6s6cuEHcSgoirquQc7TmZgVCK5fD/2uxmRN+ZpcQ== -esbuild-darwin-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz#99ae7fdaa43947b06cd9d1a1c3c2c9f245d81fd0" - integrity sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg== +esbuild-darwin-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.15.tgz#fc3482fdf5e798dbc0b8b2fe13287d257a45efc6" + integrity sha512-ohZtF8W1SHJ4JWldsPVdk8st0r9ExbAOSrBOh5L+Mq47i696GVwv1ab/KlmbUoikSTNoXEhDzVpxUR/WIO19FQ== -esbuild-darwin-arm64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz#bafa1814354ad1a47adcad73de416130ef7f55e3" - integrity sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A== +esbuild-darwin-arm64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.15.tgz#e922ec387c00fa84d664e14b5722fe13613f4adc" + integrity sha512-P8jOZ5zshCNIuGn+9KehKs/cq5uIniC+BeCykvdVhx/rBXSxmtj3CUIKZz4sDCuESMbitK54drf/2QX9QHG5Ag== -esbuild-freebsd-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz#84ef85535c5cc38b627d1c5115623b088d1de161" - integrity sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA== +esbuild-freebsd-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.15.tgz#69a42d79137d7d3ea718414c432bc10e8bb97c68" + integrity sha512-KkTg+AmDXz1IvA9S1gt8dE24C8Thx0X5oM0KGF322DuP+P3evwTL9YyusHAWNsh4qLsR80nvBr/EIYs29VSwuA== -esbuild-freebsd-arm64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz#033f21de434ec8e0c478054b119af8056763c2d8" - integrity sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q== +esbuild-freebsd-arm64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.15.tgz#63b6d0dd492f7394f8d07a0e2b931151eb9d60c4" + integrity sha512-FUcML0DRsuyqCMfAC+HoeAqvWxMeq0qXvclZZ/lt2kLU6XBnDA5uKTLUd379WYEyVD4KKFctqWd9tTuk8C/96g== -esbuild-linux-32@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz#54290ea8035cba0faf1791ce9ae6693005512535" - integrity sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w== +esbuild-linux-32@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.15.tgz#7f295795fd7e61ea57d1135f717424a6771a7472" + integrity sha512-q28Qn5pZgHNqug02aTkzw5sW9OklSo96b5nm17Mq0pDXrdTBcQ+M6Q9A1B+dalFeynunwh/pvfrNucjzwDXj+Q== -esbuild-linux-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz#4264249281ea388ead948614b57fb1ddf7779a2c" - integrity sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A== +esbuild-linux-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.15.tgz#11a430a86403b0411ca0a355b891f1cb8c4c4ec6" + integrity sha512-217KPmWMirkf8liO+fj2qrPwbIbhNTGNVtvqI1TnOWJgcMjUWvd677Gq3fTzXEjilkx2yWypVnTswM2KbXgoAg== -esbuild-linux-arm64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz#9323c333924f97a02bdd2ae8912b36298acb312d" - integrity sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ== +esbuild-linux-arm64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.15.tgz#b65f9a2c60e8e5b62f6cfd392cd0410f22e8c390" + integrity sha512-/ltmNFs0FivZkYsTzAsXIfLQX38lFnwJTWCJts0IbCqWZQe+jjj0vYBNbI0kmXLb3y5NljiM5USVAO1NVkdh2g== -esbuild-linux-arm@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz#b407f47b3ae721fe4e00e19e9f19289bef87a111" - integrity sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ== +esbuild-linux-arm@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.15.tgz#c8e13e45a0a6f0cb145ce13ae26ce1d2551d9bcc" + integrity sha512-RYVW9o2yN8yM7SB1yaWr378CwrjvGCyGybX3SdzPHpikUHkME2AP55Ma20uNwkNyY2eSYFX9D55kDrfQmQBR4w== -esbuild-linux-mips64le@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz#bdf905aae5c0bcaa8f83567fe4c4c1bdc1f14447" - integrity sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A== +esbuild-linux-mips64le@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.15.tgz#d4c24d47e43966fcac748c90621be7edd53456c0" + integrity sha512-PksEPb321/28GFFxtvL33yVPfnMZihxkEv5zME2zapXGp7fA1X2jYeiTUK+9tJ/EGgcNWuwvtawPxJG7Mmn86A== -esbuild-linux-ppc64le@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz#2911eae1c90ff58a3bd3259cb557235df25aa3b4" - integrity sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA== +esbuild-linux-ppc64le@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.15.tgz#2eba53fe2282438ceca5471bdb57ba2e00216ed6" + integrity sha512-ek8gJBEIhcpGI327eAZigBOHl58QqrJrYYIZBWQCnH3UnXoeWMrMZLeeZL8BI2XMBhP+sQ6ERctD5X+ajL/AIA== -esbuild-linux-riscv64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz#1837c660be12b1d20d2a29c7189ea703f93e9265" - integrity sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow== +esbuild-linux-riscv64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.15.tgz#1afa8dfe55a6c312f1904ee608b81417205f5027" + integrity sha512-H5ilTZb33/GnUBrZMNJtBk7/OXzDHDXjIzoLXHSutwwsLxSNaLxzAaMoDGDd/keZoS+GDBqNVxdCkpuiRW4OSw== -esbuild-linux-s390x@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz#d52880ece229d1bd10b2d936b792914ffb07c7fc" - integrity sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag== +esbuild-linux-s390x@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.15.tgz#1f7b3c4429c8ca99920ba6bf356ccc5b38fabd34" + integrity sha512-jKaLUg78mua3rrtrkpv4Or2dNTJU7bgHN4bEjT4OX4GR7nLBSA9dfJezQouTxMmIW7opwEC5/iR9mpC18utnxQ== -esbuild-netbsd-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz#de14da46f1d20352b43e15d97a80a8788275e6ed" - integrity sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ== +esbuild-netbsd-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.15.tgz#d72c7155686c938c1aff126209b689c22823347c" + integrity sha512-aOvmF/UkjFuW6F36HbIlImJTTx45KUCHJndtKo+KdP8Dhq3mgLRKW9+6Ircpm8bX/RcS3zZMMmaBLkvGY06Gvw== -esbuild-openbsd-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz#45e8a5fd74d92ad8f732c43582369c7990f5a0ac" - integrity sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w== +esbuild-openbsd-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.15.tgz#761bd87ecab97386948eaf667a065cb0ecaa0f76" + integrity sha512-HFFX+WYedx1w2yJ1VyR1Dfo8zyYGQZf1cA69bLdrHzu9svj6KH6ZLK0k3A1/LFPhcEY9idSOhsB2UyU0tHPxgQ== -esbuild-sunos-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz#f646ac3da7aac521ee0fdbc192750c87da697806" - integrity sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw== +esbuild-sunos-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.15.tgz#07e04cbf9747f281a967d09230a158a1be5b530c" + integrity sha512-jOPBudffG4HN8yJXcK9rib/ZTFoTA5pvIKbRrt3IKAGMq1EpBi4xoVoSRrq/0d4OgZLaQbmkHp8RO9eZIn5atA== -esbuild-windows-32@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz#fb4fe77c7591418880b3c9b5900adc4c094f2401" - integrity sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA== +esbuild-windows-32@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.15.tgz#130d1982cc41fb67461e9f8a65c6ebd13a1f35bb" + integrity sha512-MDkJ3QkjnCetKF0fKxCyYNBnOq6dmidcwstBVeMtXSgGYTy8XSwBeIE4+HuKiSsG6I/mXEb++px3IGSmTN0XiA== -esbuild-windows-64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz#1fca8c654392c0c31bdaaed168becfea80e20660" - integrity sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ== +esbuild-windows-64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.15.tgz#638bdf495c109c1882e8b0529cb8e2fea11383fb" + integrity sha512-xaAUIB2qllE888SsMU3j9nrqyLbkqqkpQyWVkfwSil6BBPgcPk3zOFitTTncEKCLTQy3XV9RuH7PDj3aJDljWA== -esbuild-windows-arm64@0.15.13: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz#4ffd01b6b2888603f1584a2fe96b1f6a6f2b3dd8" - integrity sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg== +esbuild-windows-arm64@0.15.15: + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.15.tgz#5a277ce10de999d2a6465fc92a8c2a2d207ebd31" + integrity sha512-ttuoCYCIJAFx4UUKKWYnFdrVpoXa3+3WWkXVI6s09U+YjhnyM5h96ewTq/WgQj9LFSIlABQvadHSOQyAVjW5xQ== esbuild@^0.15.9: - version "0.15.13" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.13.tgz#7293480038feb2bafa91d3f6a20edab3ba6c108a" - integrity sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ== + version "0.15.15" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.15.tgz#503b70bdc18d72d8fc2962ed3ab9219249e58bbe" + integrity sha512-TEw/lwK4Zzld9x3FedV6jy8onOUHqcEX3ADFk4k+gzPUwrxn8nWV62tH0udo8jOtjFodlEfc4ypsqX3e+WWO6w== optionalDependencies: - "@esbuild/android-arm" "0.15.13" - "@esbuild/linux-loong64" "0.15.13" - esbuild-android-64 "0.15.13" - esbuild-android-arm64 "0.15.13" - esbuild-darwin-64 "0.15.13" - esbuild-darwin-arm64 "0.15.13" - esbuild-freebsd-64 "0.15.13" - esbuild-freebsd-arm64 "0.15.13" - esbuild-linux-32 "0.15.13" - esbuild-linux-64 "0.15.13" - esbuild-linux-arm "0.15.13" - esbuild-linux-arm64 "0.15.13" - esbuild-linux-mips64le "0.15.13" - esbuild-linux-ppc64le "0.15.13" - esbuild-linux-riscv64 "0.15.13" - esbuild-linux-s390x "0.15.13" - esbuild-netbsd-64 "0.15.13" - esbuild-openbsd-64 "0.15.13" - esbuild-sunos-64 "0.15.13" - esbuild-windows-32 "0.15.13" - esbuild-windows-64 "0.15.13" - esbuild-windows-arm64 "0.15.13" + "@esbuild/android-arm" "0.15.15" + "@esbuild/linux-loong64" "0.15.15" + esbuild-android-64 "0.15.15" + esbuild-android-arm64 "0.15.15" + esbuild-darwin-64 "0.15.15" + esbuild-darwin-arm64 "0.15.15" + esbuild-freebsd-64 "0.15.15" + esbuild-freebsd-arm64 "0.15.15" + esbuild-linux-32 "0.15.15" + esbuild-linux-64 "0.15.15" + esbuild-linux-arm "0.15.15" + esbuild-linux-arm64 "0.15.15" + esbuild-linux-mips64le "0.15.15" + esbuild-linux-ppc64le "0.15.15" + esbuild-linux-riscv64 "0.15.15" + esbuild-linux-s390x "0.15.15" + esbuild-netbsd-64 "0.15.15" + esbuild-openbsd-64 "0.15.15" + esbuild-sunos-64 "0.15.15" + esbuild-windows-32 "0.15.15" + esbuild-windows-64 "0.15.15" + esbuild-windows-arm64 "0.15.15" escalade@^3.1.1: version "3.1.1" @@ -2430,9 +2438,9 @@ eslint-visitor-keys@^3.3.0: integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8.23.0: - version "8.26.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.26.0.tgz#2bcc8836e6c424c4ac26a5674a70d44d84f2181d" - integrity sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg== + version "8.28.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.28.0.tgz#81a680732634677cc890134bcdd9fdfea8e63d6e" + integrity sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ== dependencies: "@eslint/eslintrc" "^1.3.3" "@humanwhocodes/config-array" "^0.11.6" @@ -2475,9 +2483,9 @@ eslint@^8.23.0: text-table "^0.2.0" espree@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" - integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== + version "9.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" + integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" @@ -2630,9 +2638,9 @@ focus-lock@^0.11.2: tslib "^2.0.3" framer-motion@^7.2.1: - version "7.6.4" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.6.4.tgz#e396b36f68a14e14cc95b01210feac8cd5d2824d" - integrity sha512-Ac3Bl9M45fS8A0ibOUnYMSCfjaCrFfWT0uh0/MZVm/DGWcr5IsRRinWRiVGABA9RGJgn4THehqcn235JVQkucQ== + version "7.6.9" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.6.9.tgz#d2c8ca8b97580aa00f7c6e2b616da241bd2ce8e6" + integrity sha512-byPSPOqKApmVUvbtvmFCyL09dqBNLUwkXRQMeTsawtF6YpiB54yCVzk+9YXAnoswMSgsB7CQaA6ls7e8QL+C+g== dependencies: "@motionone/dom" "10.13.1" framesync "6.1.2" @@ -2745,9 +2753,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + version "13.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.18.0.tgz#fb224daeeb2bb7d254cd2c640f003528b8d0c1dc" + integrity sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A== dependencies: type-fest "^0.20.2" @@ -2928,9 +2936,9 @@ its-fine@^1.0.6: "@types/react-reconciler" "^0.28.0" js-sdsl@^4.1.4: - version "4.1.5" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.5.tgz#1ff1645e6b4d1b028cd3f862db88c9d887f26e2a" - integrity sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q== + version "4.2.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" + integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -2984,9 +2992,9 @@ klaw-sync@^6.0.0: graceful-fs "^4.1.11" konva@^8.3.13: - version "8.3.13" - resolved "https://registry.yarnpkg.com/konva/-/konva-8.3.13.tgz#c1adc986ddf5dde4790c0ed47eef8d40a313232e" - integrity sha512-O5VxHfRfTj4PscTglQH1NimS8+CC5hQYLeB8YQstu8MN/i2L8GjA1T9d7xxzITF2TD5+xcIs5ei7en3cztbNXg== + version "8.3.14" + resolved "https://registry.yarnpkg.com/konva/-/konva-8.3.14.tgz#691ecb6f4568c58818359af369f03e7438ea3640" + integrity sha512-6I/TZppgY3Frs//AvZ87YVQLFxLywitb8wLS3qMM+Ih9e4QcB5Yy8br6eq7DdUzxPdbsYTz1FQBHzNxs08M1Tw== levn@^0.4.1: version "0.4.1" @@ -3291,9 +3299,9 @@ popmotion@11.0.5: tslib "2.4.0" postcss@^8.4.18: - version "8.4.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.18.tgz#6d50046ea7d3d66a85e0e782074e7203bc7fbca2" - integrity sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA== + version "8.4.19" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" + integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== dependencies: nanoid "^3.3.4" picocolors "^1.0.0" @@ -3382,9 +3390,9 @@ react-fast-compare@3.2.0: integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== react-focus-lock@^2.9.1: - version "2.9.1" - resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.9.1.tgz#094cfc19b4f334122c73bb0bff65d77a0c92dd16" - integrity sha512-pSWOQrUmiKLkffPO6BpMXN7SNKXMsuOakl652IBuALAu1esk+IcpJyM+ALcYzPTTFz1rD0R54aB9A4HuP5t1Wg== + version "2.9.2" + resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.9.2.tgz#a57dfd7c493e5a030d87f161c96ffd082bd920f2" + integrity sha512-5JfrsOKyA5Zn3h958mk7bAcfphr24jPoMoznJ8vaJF6fUrPQ8zrtEd3ILLOK8P5jvGxdMd96OxWNjDzATfR2qw== dependencies: "@babel/runtime" "^7.0.0" focus-lock "^0.11.2" @@ -3548,9 +3556,9 @@ redux@^4.2.0: "@babel/runtime" "^7.9.2" regenerator-runtime@^0.13.10: - version "0.13.10" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" - integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw== + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== regexpp@^3.2.0: version "3.2.0" @@ -3610,9 +3618,9 @@ run-parallel@^1.1.9: queue-microtask "^1.2.2" sass@^1.55.0: - version "1.56.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.56.0.tgz#134032075a3223c8d49cb5c35e091e5ba1de8e0a" - integrity sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw== + version "1.56.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.56.1.tgz#94d3910cd468fd075fa87f5bb17437a0b617d8a7" + integrity sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -3682,16 +3690,16 @@ socket.io-adapter@~2.4.0: integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== socket.io-client@^4.5.2: - version "4.5.3" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.3.tgz#bed69209d001465b2fea650d2e95c1e82768ab5e" - integrity sha512-I/hqDYpQ6JKwtJOf5ikM+Qz+YujZPMEl6qBLhxiP0nX+TfXKhW4KZZG8lamrD6Y5ngjmYHreESVasVCgi5Kl3A== + version "4.5.4" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.4.tgz#d3cde8a06a6250041ba7390f08d2468ccebc5ac9" + integrity sha512-ZpKteoA06RzkD32IbqILZ+Cnst4xewU7ZYK12aS1mzHftFFjpoMz69IuhP/nL25pJfao/amoPI527KnuhFm01g== dependencies: "@socket.io/component-emitter" "~3.1.0" debug "~4.3.2" engine.io-client "~6.2.3" - socket.io-parser "~4.2.0" + socket.io-parser "~4.2.1" -socket.io-parser@~4.2.0: +socket.io-parser@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== @@ -3700,16 +3708,16 @@ socket.io-parser@~4.2.0: debug "~4.3.1" socket.io@^4.5.2: - version "4.5.3" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.3.tgz#44dffea48d7f5aa41df4a66377c386b953bc521c" - integrity sha512-zdpnnKU+H6mOp7nYRXH4GNv1ux6HL6+lHL8g7Ds7Lj8CkdK1jJK/dlwsKDculbyOHifcJ0Pr/yeXnZQ5GeFrcg== + version "4.5.4" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.4.tgz#a4513f06e87451c17013b8d13fdfaf8da5a86a90" + integrity sha512-m3GC94iK9MfIEeIBfbhJs5BqFibMtkRk8ZpKwG2QwxV0m/eEhPIV4ara6XCF1LWNAus7z58RodiZlAH71U3EhQ== dependencies: accepts "~1.3.4" base64id "~2.0.0" debug "~4.3.2" - engine.io "~6.2.0" + engine.io "~6.2.1" socket.io-adapter "~2.4.0" - socket.io-parser "~4.2.0" + socket.io-parser "~4.2.1" "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: version "1.0.2" @@ -3776,9 +3784,9 @@ stylis@4.1.3: integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== sucrase@^3.20.3: - version "3.28.0" - resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.28.0.tgz#7fd8b3118d2155fcdf291088ab77fa6eefd63c4c" - integrity sha512-TK9600YInjuiIhVM3729rH4ZKPOsGeyXUwY+Ugu9eilNbdTFyHr6XcAGYbRVZPDgWj6tgI7bx95aaJjHnbffag== + version "3.29.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.29.0.tgz#3207c5bc1b980fdae1e539df3f8a8a518236da7d" + integrity sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A== dependencies: commander "^4.0.0" glob "7.1.6" @@ -3886,7 +3894,7 @@ tsconfig-paths@^4.0.0: tslib@2.4.0: version "2.4.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== tslib@^1.8.1, tslib@^1.9.3: @@ -3919,9 +3927,9 @@ type-fest@^0.20.2: integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== typescript@^4.6.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== + version "4.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" + integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== universalify@^0.1.0: version "0.1.2" @@ -3993,9 +4001,9 @@ vite-plugin-eslint@^1.8.1: rollup "^2.77.2" vite-tsconfig-paths@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-3.5.2.tgz#fd3232f93c426311d7e0d581187d8b63fff55fbc" - integrity sha512-xJMgHA2oJ28QCG2f+hXrcqzo7IttrSRK4A//Tp94CfuX5eetOx33qiwXHUdi3FwkHP2ocpxHuvE45Ix67gwEmQ== + version "3.6.0" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-3.6.0.tgz#9e6363051b2caaf7c7cec6f9f85ad71feee77920" + integrity sha512-UfsPYonxLqPD633X8cWcPFVuYzx/CMNHAjZTasYwX69sXpa4gNmQkR0XCjj82h7zhLGdTWagMjC1qfb9S+zv0A== dependencies: debug "^4.1.1" globrex "^0.1.2" @@ -4003,9 +4011,9 @@ vite-tsconfig-paths@^3.5.2: tsconfig-paths "^4.0.0" vite@^3.0.7: - version "3.2.2" - resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.2.tgz#280762bfaf47bcea1d12698427331c0009ac7c1f" - integrity sha512-pLrhatFFOWO9kS19bQ658CnRYzv0WLbsPih6R+iFeEEhDOuYgYCX2rztUViMz/uy/V8cLCJvLFeiOK7RJEzHcw== + version "3.2.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.4.tgz#d8c7892dd4268064e04fffbe7d866207dd24166e" + integrity sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw== dependencies: esbuild "^0.15.9" postcss "^8.4.18" From df03927ec69b402b6d70e149838fe010a9938d3e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:20:57 +1100 Subject: [PATCH 185/220] Fixes img2img attempting inpaint when init image has transparency --- backend/invoke_ai_web_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index 0c62a48a92..c719f78b1a 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -842,7 +842,7 @@ class InvokeAIWebServer: elif generation_parameters["generation_mode"] == "img2img": init_img_url = generation_parameters["init_img"] init_img_path = self.get_image_path_from_url(init_img_url) - generation_parameters["init_img"] = init_img_path + generation_parameters["init_img"] = Image.open(init_img_path).convert('RGB') def image_progress(sample, step): if self.canceled.is_set(): From 500bde5b0e8a024789b6c60133b0e239726af825 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:40:23 +1100 Subject: [PATCH 186/220] Fixes missing threshold and perlin parameters in metadata viewer --- .../ImageMetadataViewer.tsx | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx index 810458c8cc..fdad8541f9 100644 --- a/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx +++ b/frontend/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx @@ -33,6 +33,8 @@ import { setWidth, setInitialImage, setShouldShowImageDetails, + setThreshold, + setPerlin, } from 'features/options/store/optionsSlice'; import promptToString from 'common/util/promptToString'; import { seedWeightsToString } from 'common/util/seedWeightPairs'; @@ -132,24 +134,26 @@ const ImageMetadataViewer = memo( const dreamPrompt = image?.dreamPrompt; const { - type, - postprocessing, - sampler, - prompt, - seed, - variations, - steps, cfg_scale, - seamless, - hires_fix, - width, - height, - strength, fit, + height, + hires_fix, init_image_path, mask_image_path, orig_path, + perlin, + postprocessing, + prompt, + sampler, scale, + seamless, + seed, + steps, + strength, + threshold, + type, + variations, + width, } = metadata; const metadataJSON = JSON.stringify(image.metadata, null, 2); @@ -214,6 +218,20 @@ const ImageMetadataViewer = memo( onClick={() => dispatch(setSeed(seed))} /> )} + {threshold !== undefined && ( + dispatch(setThreshold(threshold))} + /> + )} + {perlin !== undefined && ( + dispatch(setPerlin(perlin))} + /> + )} {sampler && ( Date: Wed, 23 Nov 2022 18:40:38 +1100 Subject: [PATCH 187/220] Renames "Threshold" > "Noise Threshold" --- .../options/components/AdvancedOptions/Seed/Threshold.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx index d10d3ac131..2450bda506 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Seed/Threshold.tsx @@ -17,7 +17,7 @@ export default function Threshold() { return ( Date: Wed, 23 Nov 2022 18:41:43 +1100 Subject: [PATCH 188/220] Fixes postprocessing not being disabled when clicking use all --- frontend/src/features/options/store/optionsSlice.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/features/options/store/optionsSlice.ts b/frontend/src/features/options/store/optionsSlice.ts index 63ed8c2c1e..b7a88b90e5 100644 --- a/frontend/src/features/options/store/optionsSlice.ts +++ b/frontend/src/features/options/store/optionsSlice.ts @@ -309,6 +309,9 @@ export const optionsSlice = createSlice({ if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; if (width) state.width = width; if (height) state.height = height; + + state.shouldRunESRGAN = false; + state.shouldRunFacetool = false; }, resetOptionsState: (state) => { return { From d44112c209b6f9cfdfba1009f3fa0ad2cb63e259 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:42:44 +1100 Subject: [PATCH 189/220] Builds fresh bundle --- frontend/dist/assets/index.8659b949.js | 623 +++++++++++++++++++++++++ frontend/dist/assets/index.99dfa618.js | 623 ------------------------- frontend/dist/index.html | 2 +- 3 files changed, 624 insertions(+), 624 deletions(-) create mode 100644 frontend/dist/assets/index.8659b949.js delete mode 100644 frontend/dist/assets/index.99dfa618.js diff --git a/frontend/dist/assets/index.8659b949.js b/frontend/dist/assets/index.8659b949.js new file mode 100644 index 0000000000..911f1fe87e --- /dev/null +++ b/frontend/dist/assets/index.8659b949.js @@ -0,0 +1,623 @@ +function Uq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Wv=Symbol.for("react.element"),Gq=Symbol.for("react.portal"),jq=Symbol.for("react.fragment"),Yq=Symbol.for("react.strict_mode"),qq=Symbol.for("react.profiler"),Kq=Symbol.for("react.provider"),Xq=Symbol.for("react.context"),Zq=Symbol.for("react.forward_ref"),Qq=Symbol.for("react.suspense"),Jq=Symbol.for("react.memo"),eK=Symbol.for("react.lazy"),kE=Symbol.iterator;function tK(e){return e===null||typeof e!="object"?null:(e=kE&&e[kE]||e["@@iterator"],typeof e=="function"?e:null)}var qI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KI=Object.assign,XI={};function r1(e,t,n){this.props=e,this.context=t,this.refs=XI,this.updater=n||qI}r1.prototype.isReactComponent={};r1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};r1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZI(){}ZI.prototype=r1.prototype;function K7(e,t,n){this.props=e,this.context=t,this.refs=XI,this.updater=n||qI}var X7=K7.prototype=new ZI;X7.constructor=K7;KI(X7,r1.prototype);X7.isPureReactComponent=!0;var EE=Array.isArray,QI=Object.prototype.hasOwnProperty,Z7={current:null},JI={key:!0,ref:!0,__self:!0,__source:!0};function eO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)QI.call(t,r)&&!JI.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Me=G[me];if(0>>1;mei(Ie,ce))Wei(De,Ie)?(G[me]=De,G[We]=ce,me=We):(G[me]=Ie,G[be]=ce,me=be);else if(Wei(De,ce))G[me]=De,G[We]=ce,me=We;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!b)if(n(l)!==null)b=!0,J(O);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function O(G,X){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Me=me(g.expirationTime<=X);X=e.unstable_now(),typeof Me=="function"?g.callback=Me:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var be=n(u);be!==null&&K(M,be.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var R=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Me,t(l,G),b||v||(b=!0,J(O))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(tO);(function(e){e.exports=tO})(s0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var nO=C.exports,da=s0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jw=Object.prototype.hasOwnProperty,aK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,TE={},LE={};function sK(e){return Jw.call(LE,e)?!0:Jw.call(TE,e)?!1:aK.test(e)?LE[e]=!0:(TE[e]=!0,!1)}function lK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function uK(e,t,n,r){if(t===null||typeof t>"u"||lK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var J7=/[\-:]([a-z])/g;function e9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(J7,e9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(J7,e9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(J7,e9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function t9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{tx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rm(e):""}function cK(e){switch(e.tag){case 5:return rm(e.type);case 16:return rm("Lazy");case 13:return rm("Suspense");case 19:return rm("SuspenseList");case 0:case 2:case 15:return e=nx(e.type,!1),e;case 11:return e=nx(e.type.render,!1),e;case 1:return e=nx(e.type,!0),e;default:return""}}function r6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wp:return"Fragment";case Hp:return"Portal";case e6:return"Profiler";case n9:return"StrictMode";case t6:return"Suspense";case n6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oO:return(e.displayName||"Context")+".Consumer";case iO:return(e._context.displayName||"Context")+".Provider";case r9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case i9:return t=e.displayName||null,t!==null?t:r6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return r6(e(t))}catch{}}return null}function dK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return r6(t);case 8:return t===n9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function sd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fK(e){var t=sO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ly(e){e._valueTracker||(e._valueTracker=fK(e))}function lO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function u5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function i6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ME(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=sd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function uO(e,t){t=t.checked,t!=null&&t9(e,"checked",t,!1)}function o6(e,t){uO(e,t);var n=sd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?a6(e,t.type,n):t.hasOwnProperty("defaultValue")&&a6(e,t.type,sd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function IE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function a6(e,t,n){(t!=="number"||u5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var im=Array.isArray;function l0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=uy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},hK=["Webkit","ms","Moz","O"];Object.keys(wm).forEach(function(e){hK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wm[t]=wm[e]})});function hO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wm.hasOwnProperty(e)&&wm[e]?(""+t).trim():t+"px"}function pO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var pK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function u6(e,t){if(t){if(pK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function c6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d6=null;function o9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var f6=null,u0=null,c0=null;function NE(e){if(e=Gv(e)){if(typeof f6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=M4(t),f6(e.stateNode,e.type,t))}}function gO(e){u0?c0?c0.push(e):c0=[e]:u0=e}function mO(){if(u0){var e=u0,t=c0;if(c0=u0=null,NE(e),t)for(e=0;e>>=0,e===0?32:31-(kK(e)/EK|0)|0}var cy=64,dy=4194304;function om(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function h5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=om(s):(o&=a,o!==0&&(r=om(o)))}else a=n&~i,a!==0?r=om(a):o!==0&&(r=om(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Vv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cs(t),e[t]=n}function AK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_m),UE=String.fromCharCode(32),GE=!1;function DO(e,t){switch(e){case"keyup":return iX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vp=!1;function aX(e,t){switch(e){case"compositionend":return zO(t);case"keypress":return t.which!==32?null:(GE=!0,UE);case"textInput":return e=t.data,e===UE&&GE?null:e;default:return null}}function sX(e,t){if(Vp)return e==="compositionend"||!h9&&DO(e,t)?(e=RO(),C3=c9=$c=null,Vp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=KE(n)}}function HO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WO(){for(var e=window,t=u5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=u5(e.document)}return t}function p9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function mX(e){var t=WO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&HO(n.ownerDocument.documentElement,n)){if(r!==null&&p9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=XE(n,o);var a=XE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Up=null,y6=null,Em=null,b6=!1;function ZE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;b6||Up==null||Up!==u5(r)||(r=Up,"selectionStart"in r&&p9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Em&&ov(Em,r)||(Em=r,r=m5(y6,"onSelect"),0Yp||(e.current=k6[Yp],k6[Yp]=null,Yp--)}function qn(e,t){Yp++,k6[Yp]=e.current,e.current=t}var ld={},Wi=vd(ld),Ao=vd(!1),th=ld;function D0(e,t){var n=e.type.contextTypes;if(!n)return ld;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function y5(){Qn(Ao),Qn(Wi)}function iP(e,t,n){if(Wi.current!==ld)throw Error(Re(168));qn(Wi,t),qn(Ao,n)}function ZO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,dK(e)||"Unknown",i));return hr({},n,r)}function b5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ld,th=Wi.current,qn(Wi,e),qn(Ao,Ao.current),!0}function oP(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=ZO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Wi),qn(Wi,e)):Qn(Ao),qn(Ao,n)}var fu=null,I4=!1,mx=!1;function QO(e){fu===null?fu=[e]:fu.push(e)}function TX(e){I4=!0,QO(e)}function yd(){if(!mx&&fu!==null){mx=!0;var e=0,t=Tn;try{var n=fu;for(Tn=1;e>=a,i-=a,pu=1<<32-Cs(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),R===null?O=$:R.sibling=$,R=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),O;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),R===null?O=j:R.sibling=j,R=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),O;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return ir&&Cf(P,z),O}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return e&&N.forEach(function(ue){return t(P,ue)}),ir&&Cf(P,z),O}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Wp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case sy:e:{for(var O=T.key,R=k;R!==null;){if(R.key===O){if(O=T.type,O===Wp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Ic&&fP(O)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Ng(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Wp?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=M3(T.type,T.key,T.props,null,P.mode,M),M.ref=Ng(P,k,T),M.return=P,P=M)}return a(P);case Hp:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=_x(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return R=T._init,E(P,k,R(T._payload),M)}if(im(T))return b(P,k,T,M);if(Ag(T))return w(P,k,T,M);yy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=Cx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var B0=aR(!0),sR=aR(!1),jv={},Cl=vd(jv),uv=vd(jv),cv=vd(jv);function Df(e){if(e===jv)throw Error(Re(174));return e}function C9(e,t){switch(qn(cv,t),qn(uv,e),qn(Cl,jv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:l6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=l6(t,e)}Qn(Cl),qn(Cl,t)}function F0(){Qn(Cl),Qn(uv),Qn(cv)}function lR(e){Df(cv.current);var t=Df(Cl.current),n=l6(t,e.type);t!==n&&(qn(uv,e),qn(Cl,n))}function _9(e){uv.current===e&&(Qn(Cl),Qn(uv))}var cr=vd(0);function k5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vx=[];function k9(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{Tn=n,yx.transition=r}}function _R(){return Ha().memoizedState}function IX(e,t,n){var r=Jc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kR(e))ER(t,n);else if(n=nR(e,t,n,r),n!==null){var i=ro();_s(n,e,r,i),PR(n,t,r)}}function OX(e,t,n){var r=Jc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kR(e))ER(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,x9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=nR(e,t,i,r),n!==null&&(i=ro(),_s(n,e,r,i),PR(n,t,r))}}function kR(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function ER(e,t){Pm=E5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s9(e,n)}}var P5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},RX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:pP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,P3(4194308,4,bR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return P3(4194308,4,e,t)},useInsertionEffect:function(e,t){return P3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=IX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:hP,useDebugValue:A9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=hP(!1),t=e[0];return e=MX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),hi===null)throw Error(Re(349));(rh&30)!==0||dR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,pP(hR.bind(null,r,o,e),[e]),r.flags|=2048,hv(9,fR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=gu,r=pu;n=(r&~(1<<32-Cs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=dv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ml]=t,e[lv]=r,DR(e,t,!1,!1),t.stateNode=e;e:{switch(a=c6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;iH0&&(t.flags|=128,r=!0,Dg(o,!1),t.lanes=4194304)}else{if(!r)if(e=k5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Rr()-o.renderingStartTime>H0&&n!==1073741824&&(t.flags|=128,r=!0,Dg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return D9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function WX(e,t){switch(m9(t),t.tag){case 1:return Mo(t.type)&&y5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return F0(),Qn(Ao),Qn(Wi),k9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return _9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));z0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return F0(),null;case 10:return S9(t.type._context),null;case 22:case 23:return D9(),null;case 24:return null;default:return null}}var Sy=!1,Hi=!1,VX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Zp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function z6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var CP=!1;function UX(e,t){if(S6=p5,e=WO(),p9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(x6={focusedElem:e,selectionRange:n},p5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return b=CP,CP=!1,b}function Tm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&z6(t,n,o)}i=i.next}while(i!==r)}}function N4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function B6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function FR(e){var t=e.alternate;t!==null&&(e.alternate=null,FR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ml],delete t[lv],delete t[_6],delete t[EX],delete t[PX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $R(e){return e.tag===5||e.tag===3||e.tag===4}function _P(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$R(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function F6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=v5));else if(r!==4&&(e=e.child,e!==null))for(F6(e,t,n),e=e.sibling;e!==null;)F6(e,t,n),e=e.sibling}function $6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($6(e,t,n),e=e.sibling;e!==null;)$6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)HR(e,t,n),n=n.sibling}function HR(e,t,n){if(wl&&typeof wl.onCommitFiberUnmount=="function")try{wl.onCommitFiberUnmount(P4,n)}catch{}switch(n.tag){case 5:Hi||Zp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?gx(e.parentNode,n):e.nodeType===1&&gx(e,n),rv(e)):gx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&z6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Zp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function kP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VX),t.forEach(function(r){var i=JX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,A5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-R9?Gf(e,0):O9|=n),Io(e,t)}function KR(e,t){t===0&&((e.mode&1)===0?t=1:(t=dy,dy<<=1,(dy&130023424)===0&&(dy=4194304)));var n=ro();e=xu(e,t),e!==null&&(Vv(e,t,n),Io(e,n))}function QX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KR(e,n)}function JX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),KR(e,n)}var XR;XR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,$X(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&JO(t,x5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;T3(e,t),e=t.pendingProps;var i=D0(t,Wi.current);f0(t,n),i=P9(null,t,r,e,i,n);var o=T9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,b5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,w9(t),i.updater=O4,t.stateNode=i,i._reactInternals=t,A6(t,r,e,n),t=O6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&g9(t),Ji(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(T3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=tZ(r),e=gs(r,e),i){case 0:t=I6(null,t,r,e,n);break e;case 1:t=SP(null,t,r,e,n);break e;case 11:t=yP(null,t,r,e,n);break e;case 14:t=bP(null,t,r,gs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),I6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),SP(e,t,r,i,n);case 3:e:{if(OR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,rR(e,t),_5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=$0(Error(Re(423)),t),t=xP(e,t,r,n,i);break e}else if(r!==i){i=$0(Error(Re(424)),t),t=xP(e,t,r,n,i);break e}else for(aa=Xc(t.stateNode.containerInfo.firstChild),sa=t,ir=!0,ys=null,n=sR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(z0(),r===i){t=wu(e,t,n);break e}Ji(e,t,r,n)}t=t.child}return t;case 5:return lR(t),e===null&&P6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,w6(r,i)?a=null:o!==null&&w6(r,o)&&(t.flags|=32),IR(e,t),Ji(e,t,a,n),t.child;case 6:return e===null&&P6(t),null;case 13:return RR(e,t,n);case 4:return C9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=B0(t,null,r,n):Ji(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),yP(e,t,r,i,n);case 7:return Ji(e,t,t.pendingProps,n),t.child;case 8:return Ji(e,t,t.pendingProps.children,n),t.child;case 12:return Ji(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(w5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=wu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=vu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),T6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),T6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ji(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,f0(t,n),i=$a(i),r=r(i),t.flags|=1,Ji(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),bP(e,t,r,i,n);case 15:return AR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),T3(e,t),t.tag=1,Mo(r)?(e=!0,b5(t)):e=!1,f0(t,n),oR(t,r,i),A6(t,r,i,n),O6(null,t,r,!0,e,n);case 19:return NR(e,t,n);case 22:return MR(e,t,n)}throw Error(Re(156,t.tag))};function ZR(e,t){return CO(e,t)}function eZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new eZ(e,t,n,r)}function B9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tZ(e){if(typeof e=="function")return B9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===r9)return 11;if(e===i9)return 14}return 2}function ed(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function M3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")B9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Wp:return jf(n.children,i,o,t);case n9:a=8,i|=8;break;case e6:return e=Na(12,n,t,i|2),e.elementType=e6,e.lanes=o,e;case t6:return e=Na(13,n,t,i),e.elementType=t6,e.lanes=o,e;case n6:return e=Na(19,n,t,i),e.elementType=n6,e.lanes=o,e;case aO:return z4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iO:a=10;break e;case oO:a=9;break e;case r9:a=11;break e;case i9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function z4(e,t,n,r){return e=Na(22,e,r,t),e.elementType=aO,e.lanes=n,e.stateNode={isHidden:!1},e}function Cx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function _x(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ix(0),this.expirationTimes=ix(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ix(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function F9(e,t,n,r,i,o,a,s,l){return e=new nZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},w9(o),e}function rZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Dl);const Cy=q7(Dl.exports);var OP=Dl.exports;Qw.createRoot=OP.createRoot,Qw.hydrateRoot=OP.hydrateRoot;var ks=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,W4={exports:{}},V4={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var lZ=C.exports,uZ=Symbol.for("react.element"),cZ=Symbol.for("react.fragment"),dZ=Object.prototype.hasOwnProperty,fZ=lZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hZ={key:!0,ref:!0,__self:!0,__source:!0};function tN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)dZ.call(t,r)&&!hZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:uZ,type:e,key:o,ref:a,props:i,_owner:fZ.current}}V4.Fragment=cZ;V4.jsx=tN;V4.jsxs=tN;(function(e){e.exports=V4})(W4);const Wn=W4.exports.Fragment,x=W4.exports.jsx,ee=W4.exports.jsxs;var V9=C.exports.createContext({});V9.displayName="ColorModeContext";function Yv(){const e=C.exports.useContext(V9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var _y={light:"chakra-ui-light",dark:"chakra-ui-dark"};function pZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?_y.dark:_y.light),document.body.classList.remove(r?_y.light:_y.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var gZ="chakra-ui-color-mode";function mZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var vZ=mZ(gZ),RP=()=>{};function NP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function nN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=vZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>NP(a,s)),[h,g]=C.exports.useState(()=>NP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>pZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const O=M==="system"?m():M;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);ks(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?RP:k,setColorMode:t?RP:P,forced:t!==void 0}),[E,k,P,t]);return x(V9.Provider,{value:T,children:n})}nN.displayName="ColorModeProvider";var G6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",O="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",ue="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Me=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[ue]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[O]=xe[R]=xe[z]=!1;var be=typeof bs=="object"&&bs&&bs.Object===Object&&bs,Ie=typeof self=="object"&&self&&self.Object===Object&&self,We=be||Ie||Function("return this")(),De=t&&!t.nodeType&&t,Qe=De&&!0&&e&&!e.nodeType&&e,st=Qe&&Qe.exports===De,Ct=st&&be.process,ft=function(){try{var U=Qe&&Qe.require&&Qe.require("util").types;return U||Ct&&Ct.binding&&Ct.binding("util")}catch{}}(),ut=ft&&ft.isTypedArray;function vt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Ee(U,te){for(var he=-1,Ye=Array(U);++he-1}function E1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Md,Do.prototype.delete=k1,Do.prototype.get=$u,Do.prototype.has=Id,Do.prototype.set=E1;function Rs(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,yt=zt>2?he[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Oh(he[0],he[1],yt)&&(fn=zt<3?void 0:fn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var zd=Vl(function(){return arguments}())?Vl:function(U){return Un(U)&&yn.call(U,"callee")&&!He.call(U,"callee")},jl=Array.isArray;function Ht(U){return U!=null&&Nh(U.length)&&!Yu(U)}function Rh(U){return Un(U)&&Ht(U)}var ju=Zt||F1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==b||te==u||te==T}function Nh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function Bd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=ln(U);if(te===null)return!0;var he=yn.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&sn.call(he)==Xt}var Dh=ut?Je(ut):Wu;function Fd(U){return jr(U,zh(U))}function zh(U){return Ht(U)?D1(U,!0):zs(U)}var un=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Bh(U){return U}function F1(){return!1}e.exports=un})(G6,G6.exports);const Sl=G6.exports;function Es(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return yZ(e)?e(...t):e}var yZ=e=>typeof e=="function",bZ=e=>/!(important)?$/.test(e),DP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,j6=(e,t)=>n=>{const r=String(t),i=bZ(r),o=DP(r),a=e?`${e}.${o}`:o;let s=Es(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=DP(s),i?`${s} !important`:s};function gv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=j6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ky=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=gv({scale:e,transform:t}),r}}var SZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:SZ(t),transform:n?gv({scale:n,compose:r}):r}}var rN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function wZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...rN].join(" ")}function CZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...rN].join(" ")}var _Z={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},kZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function EZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var PZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},iN="& > :not(style) ~ :not(style)",TZ={[iN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},LZ={[iN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Y6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},AZ=new Set(Object.values(Y6)),oN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),MZ=e=>e.trim();function IZ(e,t){var n;if(e==null||oN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(MZ).filter(Boolean);if(l?.length===0)return e;const u=s in Y6?Y6[s]:s;l.unshift(u);const h=l.map(g=>{if(AZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=aN(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var aN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),OZ=(e,t)=>IZ(e,t??{});function RZ(e){return/^var\(--.+\)$/.test(e)}var NZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:_Z},backdropFilter(e){return e!=="auto"?e:kZ},ring(e){return EZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?wZ():e==="auto-gpu"?CZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=NZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(RZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:OZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||aN(e)||oN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=PZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",rn.px),space:ds("space",ky(rn.vh,rn.px)),spaceT:ds("space",ky(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:gv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",ky(rn.vh,rn.px)),sizesT:ds("sizes",ky(rn.vh,rn.fraction)),shadows:ds("shadows"),logical:xZ,blur:ds("blur",rn.blur)},I3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(I3,{bgImage:I3.backgroundImage,bgImg:I3.backgroundImage});var pn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var DZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},q6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(q6,{shadow:q6.boxShadow});var zZ={filter:{transform:rn.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",rn.brightness),contrast:ie.propT("--chakra-contrast",rn.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",rn.invert),saturate:ie.propT("--chakra-saturate",rn.saturate),dropShadow:ie.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",rn.saturate)},O5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:TZ,transform:gv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:LZ,transform:gv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(O5,{flexDir:O5.flexDirection});var sN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},BZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},La={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(La,{w:La.width,h:La.height,minW:La.minWidth,maxW:La.maxWidth,minH:La.minHeight,maxH:La.maxHeight,overscroll:La.overscrollBehavior,overscrollX:La.overscrollBehaviorX,overscrollY:La.overscrollBehaviorY});var FZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function $Z(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},WZ=HZ($Z),VZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},UZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},kx=(e,t,n)=>{const r={},i=WZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},GZ={srOnly:{transform(e){return e===!0?VZ:e==="focusable"?UZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>kx(t,e,n)}},Mm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Mm,{insetStart:Mm.insetInlineStart,insetEnd:Mm.insetInlineEnd});var jZ={ring:{transform:rn.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var YZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},qZ={clipPath:!0,transform:ie.propT("transform",rn.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},XZ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",rn.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function lN(e){return Es(e)&&e.reference?e.reference:String(e)}var U4=(e,...t)=>t.map(lN).join(` ${e} `).replace(/calc/g,""),zP=(...e)=>`calc(${U4("+",...e)})`,BP=(...e)=>`calc(${U4("-",...e)})`,K6=(...e)=>`calc(${U4("*",...e)})`,FP=(...e)=>`calc(${U4("/",...e)})`,$P=e=>{const t=lN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:K6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(zP(e,...t)),subtract:(...t)=>Af(BP(e,...t)),multiply:(...t)=>Af(K6(e,...t)),divide:(...t)=>Af(FP(e,...t)),negate:()=>Af($P(e)),toString:()=>e.toString()}),{add:zP,subtract:BP,multiply:K6,divide:FP,negate:$P});function QZ(e,t="-"){return e.replace(/\s+/g,t)}function JZ(e){const t=QZ(e.toString());return tQ(eQ(t))}function eQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function tQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function nQ(e,t=""){return[t,e].filter(Boolean).join("-")}function rQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function iQ(e,t=""){return JZ(`--${nQ(e,t)}`)}function Nn(e,t,n){const r=iQ(e,n);return{variable:r,reference:rQ(r,t)}}function oQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function aQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function X6(e){if(e==null)return e;const{unitless:t}=aQ(e);return t||typeof e=="number"?`${e}px`:e}var uN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,U9=e=>Object.fromEntries(Object.entries(e).sort(uN));function HP(e){const t=U9(e);return Object.assign(Object.values(t),t)}function sQ(e){const t=Object.keys(U9(e));return new Set(t)}function WP(e){if(!e)return e;e=X6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function sm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${X6(e)})`),t&&n.push("and",`(max-width: ${X6(t)})`),n.join(" ")}function lQ(e){if(!e)return null;e.base=e.base??"0px";const t=HP(e),n=Object.entries(e).sort(uN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?WP(u):void 0,{_minW:WP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:sm(null,u),minWQuery:sm(a),minMaxQuery:sm(a,u)}}),r=sQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:U9(e),asArray:HP(e),details:n,media:[null,...t.map(o=>sm(o)).slice(1)],toArrayValue(o){if(!Es(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;oQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>cN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),au=e=>cN(t=>e(t,"~ &"),"[data-peer]",".peer"),cN=(e,...t)=>t.map(e).join(", "),G4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:au(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:au(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:au(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:au(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:au(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:au(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:au(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:au(ki.focusWithin),_peerPlaceholderShown:au(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},uQ=Object.keys(G4);function VP(e,t){return Nn(String(e).replace(/\./g,"-"),void 0,t)}function cQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=VP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=VP(b,t?.cssVarPrefix);return E},g=Es(s)?s:{default:s};n=Sl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=G4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function dQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function fQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var hQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function pQ(e){return fQ(e,hQ)}function gQ(e){return e.semanticTokens}function mQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function vQ({tokens:e,semanticTokens:t}){const n=Object.entries(Z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Z6(e,t=1/0){return!Es(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Es(i)||Array.isArray(i)?Object.entries(Z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function yQ(e){var t;const n=mQ(e),r=pQ(n),i=gQ(n),o=vQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=cQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:lQ(n.breakpoints)}),n}var G9=Sl({},I3,pn,DZ,O5,La,zZ,jZ,BZ,sN,GZ,Mm,q6,Zn,ZZ,XZ,YZ,qZ,FZ,KZ),bQ=Object.assign({},Zn,La,O5,sN,Mm),SQ=Object.keys(bQ),xQ=[...Object.keys(G9),...uQ],wQ={...G9,...G4},CQ=e=>e in wQ,_Q=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=Es(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!EQ(t),TQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=kQ(t);return t=n(i)??r(o)??r(t),t};function LQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=_Q(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),PQ(g,v)&&(v=TQ(r,v));let b=t[g];if(b===!0&&(b={property:g}),Es(v)){h[g]=h[g]??{},h[g]=Sl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=zf(b?.property,r);if(!a&&b?.static){const P=zf(b.static,r);h=Sl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&Es(w)?h=Sl({},h,w):h[E]=w;continue}if(Es(w)){h=Sl({},h,w);continue}h[g]=w}return h};return i}var dN=e=>t=>LQ({theme:t,pseudos:G4,configs:G9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function AQ(e,t){if(Array.isArray(e))return e;if(Es(e))return t(e);if(e!=null)return[e]}function MQ(e,t){for(let n=t+1;n{Sl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?Sl(u,k):u[P]=k;continue}u[P]=k}}return u}}function OQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IQ(i);return Sl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function RQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return dQ(e,["styleConfig","size","variant","colorScheme"])}function NQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(a1,--No):0,W0--,Hr===10&&(W0=1,Y4--),Hr}function la(){return Hr=No2||vv(Hr)>3?"":" "}function YQ(e,t){for(;--t&&la()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return qv(e,O3()+(t<6&&_l()==32&&la()==32))}function J6(e){for(;la();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&J6(Hr);break;case 40:e===41&&J6(e);break;case 92:la();break}return No}function qQ(e,t){for(;la()&&e+Hr!==47+10;)if(e+Hr===42+42&&_l()===47)break;return"/*"+qv(t,No-1)+"*"+j4(e===47?e:la())}function KQ(e){for(;!vv(_l());)la();return qv(e,No)}function XQ(e){return vN(N3("",null,null,null,[""],e=mN(e),0,[0],e))}function N3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,T="",M=i,O=o,R=r,N=T;E;)switch(b=k,k=la()){case 40:if(b!=108&&Ti(N,g-1)==58){Q6(N+=wn(R3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=R3(k);break;case 9:case 10:case 13:case 32:N+=jQ(b);break;case 92:N+=YQ(O3()-1,7);continue;case 47:switch(_l()){case 42:case 47:Ey(ZQ(qQ(la(),O3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ey(v>32?GP(N+";",r,n,g-1):GP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ey(R=UP(N,t,n,u,h,i,s,T,M=[],O=[],g),o),k===123)if(h===0)N3(N,t,R,R,M,o,g,s,O);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:N3(e,R,R,r&&Ey(UP(e,R,R,0,0,i,s,T,i,M=[],g),O),i,O,g,s,r?M:O);break;default:N3(N,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&GQ()==125)continue}switch(N+=j4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:_l()===45&&(N+=R3(la())),m=_l(),h=g=hl(T=N+=KQ(O3())),k++;break;case 45:b===45&&hl(N)==2&&(w=0)}}return o}function UP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=q9(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return q4(e,t,n,i===0?j9:s,l,u,h)}function ZQ(e,t,n){return q4(e,t,n,fN,j4(UQ()),mv(e,2,-2),0)}function GP(e,t,n,r){return q4(e,t,n,Y9,mv(e,0,r),mv(e,r+1,-1),r)}function p0(e,t){for(var n="",r=q9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+R5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Q6(e,"stretch")?bN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~Q6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var aJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Y9:t.return=bN(t.value,t.length);break;case hN:return p0([Bg(t,{value:wn(t.value,"@","@"+gn)})],i);case j9:if(t.length)return VQ(t.props,function(o){switch(WQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return p0([Bg(t,{props:[wn(o,/:(read-\w+)/,":"+R5+"$1")]})],i);case"::placeholder":return p0([Bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Bg(t,{props:[wn(o,/:(plac\w+)/,":"+R5+"$1")]}),Bg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},sJ=[aJ],SN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||sJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var yJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bJ=/[A-Z]|^ms/g,SJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,PN=function(t){return t.charCodeAt(1)===45},qP=function(t){return t!=null&&typeof t!="boolean"},Ex=yN(function(e){return PN(e)?e:e.replace(bJ,"-$&").toLowerCase()}),KP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(SJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return yJ[t]!==1&&!PN(t)&&typeof n=="number"&&n!==0?n+"px":n};function yv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return xJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,yv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function BJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},RN=FJ(BJ);function NN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var DN=e=>NN(e,t=>t!=null);function $J(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var HJ=$J();function zN(e,...t){return DJ(e)?e(...t):e}function WJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function VJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var UJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,GJ=yN(function(e){return UJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jJ=GJ,YJ=function(t){return t!=="theme"},JP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jJ:YJ},eT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},qJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return kN(n,r,i),CJ(function(){return EN(n,r,i)}),null},KJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=eT(t,n,r),l=s||JP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZJ=Cn("accordion").parts("root","container","button","panel").extend("icon"),QJ=Cn("alert").parts("title","description","container").extend("icon","spinner"),JJ=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),eee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var tee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var nee=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ree=Cn("editable").parts("preview","input","textarea"),iee=Cn("form").parts("container","requiredIndicator","helperText"),oee=Cn("formError").parts("text","icon"),aee=Cn("input").parts("addon","field","element"),see=Cn("list").parts("container","item","icon"),lee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),uee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var dee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),fee=Cn("progress").parts("label","filledTrack","track"),hee=Cn("radio").parts("container","control","label"),pee=Cn("select").parts("field","icon"),gee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),mee=Cn("stat").parts("container","label","helpText","number","icon"),vee=Cn("switch").parts("container","track","thumb"),yee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),bee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),See=Cn("tag").parts("container","label","closeButton"),xee=Cn("card").parts("container","header","body","footer");function Mi(e,t){wee(e)&&(e="100%");var n=Cee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Py(e){return Math.min(1,Math.max(0,e))}function wee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Cee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function BN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ty(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function _ee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function tT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Px(s,a,e+1/3),i=Px(s,a,e),o=Px(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function nT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var rC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Aee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Oee(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=_ee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(r=Ty(e.s),i=Ty(e.v),t=Eee(e.h,r,i),a=!0,s="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(r=Ty(e.s),o=Ty(e.l),t=kee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=BN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Mee="[-\\+]?\\d+%?",Iee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(Iee,")|(?:").concat(Mee,")"),Tx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Tx),rgba:new RegExp("rgba"+Lx),hsl:new RegExp("hsl"+Tx),hsla:new RegExp("hsla"+Lx),hsv:new RegExp("hsv"+Tx),hsva:new RegExp("hsva"+Lx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Oee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(rC[e])e=rC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:iT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:iT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Kv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Lee(t)),this.originalInput=t;var i=Aee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=BN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=nT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=nT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=tT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=tT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),rT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Pee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+rT(this.r,this.g,this.b,!1),n=0,r=Object.entries(rC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Py(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Py(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Py(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Py(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(FN(e));return e.count=t,n}var r=Ree(e.hue,e.seed),i=Nee(r,e),o=Dee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Kv(a)}function Ree(e,t){var n=Bee(e),r=N5(n,t);return r<0&&(r=360+r),r}function Nee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return N5([0,100],t.seed);var n=$N(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return N5([r,i],t.seed)}function Dee(e,t,n){var r=zee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return N5([r,i],n.seed)}function zee(e,t){for(var n=$N(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Bee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=WN.find(function(a){return a.name===e});if(n){var r=HN(n);if(r.hueRange)return r.hueRange}var i=new Kv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function $N(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=WN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function N5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function HN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var WN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Fee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Fee(e,`colors.${t}`,t),{isValid:i}=new Kv(r);return i?r:n},Hee=e=>t=>{const n=to(t,e);return new Kv(n).isDark()?"dark":"light"},Wee=e=>t=>Hee(e)(t)==="dark",V0=(e,t)=>n=>{const r=to(n,e);return new Kv(r).setAlpha(t).toRgbString()};function oT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function Vee(e){const t=FN().toHexString();return!e||$ee(e)?t:e.string&&e.colors?Gee(e.string,e.colors):e.string&&!e.colors?Uee(e.string):e.colors&&!e.string?jee(e.colors):t}function Uee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Gee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function e8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function VN(e){return Yee(e)&&e.reference?e.reference:String(e)}var sb=(e,...t)=>t.map(VN).join(` ${e} `).replace(/calc/g,""),aT=(...e)=>`calc(${sb("+",...e)})`,sT=(...e)=>`calc(${sb("-",...e)})`,iC=(...e)=>`calc(${sb("*",...e)})`,lT=(...e)=>`calc(${sb("/",...e)})`,uT=e=>{const t=VN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:iC(t,-1)},hu=Object.assign(e=>({add:(...t)=>hu(aT(e,...t)),subtract:(...t)=>hu(sT(e,...t)),multiply:(...t)=>hu(iC(e,...t)),divide:(...t)=>hu(lT(e,...t)),negate:()=>hu(uT(e)),toString:()=>e.toString()}),{add:aT,subtract:sT,multiply:iC,divide:lT,negate:uT});function qee(e){return!Number.isInteger(parseFloat(e.toString()))}function Kee(e,t="-"){return e.replace(/\s+/g,t)}function UN(e){const t=Kee(e.toString());return t.includes("\\.")?e:qee(e)?t.replace(".","\\."):e}function Xee(e,t=""){return[t,UN(e)].filter(Boolean).join("-")}function Zee(e,t){return`var(${UN(e)}${t?`, ${t}`:""})`}function Qee(e,t=""){return`--${Xee(e,t)}`}function ni(e,t){const n=Qee(e,t?.prefix);return{variable:n,reference:Zee(n,Jee(t?.fallback))}}function Jee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ete,defineMultiStyleConfig:tte}=Jn(ZJ.keys),nte={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},rte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ite={pt:"2",px:"4",pb:"5"},ote={fontSize:"1.25em"},ate=ete({container:nte,button:rte,panel:ite,icon:ote}),ste=tte({baseStyle:ate}),{definePartsStyle:Xv,defineMultiStyleConfig:lte}=Jn(QJ.keys),ua=Nn("alert-fg"),Cu=Nn("alert-bg"),ute=Xv({container:{bg:Cu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function t8(e){const{theme:t,colorScheme:n}=e,r=V0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var cte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark}}}}),dte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),fte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),hte=Xv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[Cu.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[Cu.variable]:`colors.${t}.200`},color:ua.reference}}}),pte={subtle:cte,"left-accent":dte,"top-accent":fte,solid:hte},gte=lte({baseStyle:ute,variants:pte,defaultProps:{variant:"subtle",colorScheme:"blue"}}),GN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},mte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},vte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},yte={...GN,...mte,container:vte},jN=yte,bte=e=>typeof e=="function";function io(e,...t){return bte(e)?e(...t):e}var{definePartsStyle:YN,defineMultiStyleConfig:Ste}=Jn(JJ.keys),g0=Nn("avatar-border-color"),Ax=Nn("avatar-bg"),xte={borderRadius:"full",border:"0.2em solid",[g0.variable]:"white",_dark:{[g0.variable]:"colors.gray.800"},borderColor:g0.reference},wte={[Ax.variable]:"colors.gray.200",_dark:{[Ax.variable]:"colors.whiteAlpha.400"},bgColor:Ax.reference},cT=Nn("avatar-background"),Cte=e=>{const{name:t,theme:n}=e,r=t?Vee({string:t}):"colors.gray.400",i=Wee(r)(n);let o="white";return i||(o="gray.800"),{bg:cT.reference,"&:not([data-loaded])":{[cT.variable]:r},color:o,[g0.variable]:"colors.white",_dark:{[g0.variable]:"colors.gray.800"},borderColor:g0.reference,verticalAlign:"top"}},_te=YN(e=>({badge:io(xte,e),excessLabel:io(wte,e),container:io(Cte,e)}));function Pc(e){const t=e!=="100%"?jN[e]:void 0;return YN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var kte={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Ete=Ste({baseStyle:_te,sizes:kte,defaultProps:{size:"md"}}),Pte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},m0=Nn("badge-bg"),xl=Nn("badge-color"),Tte=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.500`,.6)(n);return{[m0.variable]:`colors.${t}.500`,[xl.variable]:"colors.white",_dark:{[m0.variable]:r,[xl.variable]:"colors.whiteAlpha.800"},bg:m0.reference,color:xl.reference}},Lte=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.200`,.16)(n);return{[m0.variable]:`colors.${t}.100`,[xl.variable]:`colors.${t}.800`,_dark:{[m0.variable]:r,[xl.variable]:`colors.${t}.200`},bg:m0.reference,color:xl.reference}},Ate=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.200`,.8)(n);return{[xl.variable]:`colors.${t}.500`,_dark:{[xl.variable]:r},color:xl.reference,boxShadow:`inset 0 0 0px 1px ${xl.reference}`}},Mte={solid:Tte,subtle:Lte,outline:Ate},Om={baseStyle:Pte,variants:Mte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Ite,definePartsStyle:Ote}=Jn(eee.keys),Rte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Nte=Ote({link:Rte}),Dte=Ite({baseStyle:Nte}),zte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},qN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:bt("inherit","whiteAlpha.900")(e),_hover:{bg:bt("gray.100","whiteAlpha.200")(e)},_active:{bg:bt("gray.200","whiteAlpha.300")(e)}};const r=V0(`${t}.200`,.12)(n),i=V0(`${t}.200`,.24)(n);return{color:bt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:bt(`${t}.50`,r)(e)},_active:{bg:bt(`${t}.100`,i)(e)}}},Bte=e=>{const{colorScheme:t}=e,n=bt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(qN,e)}},Fte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},$te=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=bt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:bt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:bt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Fte[t]??{},a=bt(n,`${t}.200`)(e);return{bg:a,color:bt(r,"gray.800")(e),_hover:{bg:bt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:bt(o,`${t}.400`)(e)}}},Hte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:bt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:bt(`${t}.700`,`${t}.500`)(e)}}},Wte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Vte={ghost:qN,outline:Bte,solid:$te,link:Hte,unstyled:Wte},Ute={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Gte={baseStyle:zte,variants:Vte,sizes:Ute,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:jte}=Jn(xee.keys),D5=Nn("card-bg"),v0=Nn("card-padding"),Yte=Yf({container:{[D5.variable]:"chakra-body-bg",backgroundColor:D5.reference,color:"chakra-body-text"},body:{padding:v0.reference,flex:"1 1 0%"},header:{padding:v0.reference},footer:{padding:v0.reference}}),qte={sm:Yf({container:{borderRadius:"base",[v0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[v0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[v0.variable]:"space.7"}})},Kte={elevated:Yf({container:{boxShadow:"base",_dark:{[D5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[D5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Xte=jte({baseStyle:Yte,variants:Kte,sizes:qte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:D3,defineMultiStyleConfig:Zte}=Jn(tee.keys),Rm=Nn("checkbox-size"),Qte=e=>{const{colorScheme:t}=e;return{w:Rm.reference,h:Rm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e),_hover:{bg:bt(`${t}.600`,`${t}.300`)(e),borderColor:bt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:bt("gray.200","transparent")(e),bg:bt("gray.200","whiteAlpha.300")(e),color:bt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e)},_disabled:{bg:bt("gray.100","whiteAlpha.100")(e),borderColor:bt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:bt("red.500","red.300")(e)}}},Jte={_disabled:{cursor:"not-allowed"}},ene={userSelect:"none",_disabled:{opacity:.4}},tne={transitionProperty:"transform",transitionDuration:"normal"},nne=D3(e=>({icon:tne,container:Jte,control:io(Qte,e),label:ene})),rne={sm:D3({control:{[Rm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:D3({control:{[Rm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:D3({control:{[Rm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},z5=Zte({baseStyle:nne,sizes:rne,defaultProps:{size:"md",colorScheme:"blue"}}),Nm=ni("close-button-size"),Fg=ni("close-button-bg"),ine={w:[Nm.reference],h:[Nm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Fg.variable]:"colors.blackAlpha.100",_dark:{[Fg.variable]:"colors.whiteAlpha.100"}},_active:{[Fg.variable]:"colors.blackAlpha.200",_dark:{[Fg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Fg.reference},one={lg:{[Nm.variable]:"sizes.10",fontSize:"md"},md:{[Nm.variable]:"sizes.8",fontSize:"xs"},sm:{[Nm.variable]:"sizes.6",fontSize:"2xs"}},ane={baseStyle:ine,sizes:one,defaultProps:{size:"md"}},{variants:sne,defaultProps:lne}=Om,une={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},cne={baseStyle:une,variants:sne,defaultProps:lne},dne={w:"100%",mx:"auto",maxW:"prose",px:"4"},fne={baseStyle:dne},hne={opacity:.6,borderColor:"inherit"},pne={borderStyle:"solid"},gne={borderStyle:"dashed"},mne={solid:pne,dashed:gne},vne={baseStyle:hne,variants:mne,defaultProps:{variant:"solid"}},{definePartsStyle:oC,defineMultiStyleConfig:yne}=Jn(nee.keys),Mx=Nn("drawer-bg"),Ix=Nn("drawer-box-shadow");function kp(e){return oC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var bne={bg:"blackAlpha.600",zIndex:"overlay"},Sne={display:"flex",zIndex:"modal",justifyContent:"center"},xne=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Mx.variable]:"colors.white",[Ix.variable]:"shadows.lg",_dark:{[Mx.variable]:"colors.gray.700",[Ix.variable]:"shadows.dark-lg"},bg:Mx.reference,boxShadow:Ix.reference}},wne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Cne={position:"absolute",top:"2",insetEnd:"3"},_ne={px:"6",py:"2",flex:"1",overflow:"auto"},kne={px:"6",py:"4"},Ene=oC(e=>({overlay:bne,dialogContainer:Sne,dialog:io(xne,e),header:wne,closeButton:Cne,body:_ne,footer:kne})),Pne={xs:kp("xs"),sm:kp("md"),md:kp("lg"),lg:kp("2xl"),xl:kp("4xl"),full:kp("full")},Tne=yne({baseStyle:Ene,sizes:Pne,defaultProps:{size:"xs"}}),{definePartsStyle:Lne,defineMultiStyleConfig:Ane}=Jn(ree.keys),Mne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ine={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},One={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rne=Lne({preview:Mne,input:Ine,textarea:One}),Nne=Ane({baseStyle:Rne}),{definePartsStyle:Dne,defineMultiStyleConfig:zne}=Jn(iee.keys),y0=Nn("form-control-color"),Bne={marginStart:"1",[y0.variable]:"colors.red.500",_dark:{[y0.variable]:"colors.red.300"},color:y0.reference},Fne={mt:"2",[y0.variable]:"colors.gray.600",_dark:{[y0.variable]:"colors.whiteAlpha.600"},color:y0.reference,lineHeight:"normal",fontSize:"sm"},$ne=Dne({container:{width:"100%",position:"relative"},requiredIndicator:Bne,helperText:Fne}),Hne=zne({baseStyle:$ne}),{definePartsStyle:Wne,defineMultiStyleConfig:Vne}=Jn(oee.keys),b0=Nn("form-error-color"),Une={[b0.variable]:"colors.red.500",_dark:{[b0.variable]:"colors.red.300"},color:b0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gne={marginEnd:"0.5em",[b0.variable]:"colors.red.500",_dark:{[b0.variable]:"colors.red.300"},color:b0.reference},jne=Wne({text:Une,icon:Gne}),Yne=Vne({baseStyle:jne}),qne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Kne={baseStyle:qne},Xne={fontFamily:"heading",fontWeight:"bold"},Zne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Qne={baseStyle:Xne,sizes:Zne,defaultProps:{size:"xl"}},{definePartsStyle:mu,defineMultiStyleConfig:Jne}=Jn(aee.keys),ere=mu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},tre={lg:mu({field:Tc.lg,addon:Tc.lg}),md:mu({field:Tc.md,addon:Tc.md}),sm:mu({field:Tc.sm,addon:Tc.sm}),xs:mu({field:Tc.xs,addon:Tc.xs})};function n8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||bt("blue.500","blue.300")(e),errorBorderColor:n||bt("red.500","red.300")(e)}}var nre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:bt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:bt("inherit","whiteAlpha.50")(e),bg:bt("gray.100","whiteAlpha.300")(e)}}}),rre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e),_hover:{bg:bt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e)}}}),ire=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ore=mu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),are={outline:nre,filled:rre,flushed:ire,unstyled:ore},mn=Jne({baseStyle:ere,sizes:tre,variants:are,defaultProps:{size:"md",variant:"outline"}}),Ox=Nn("kbd-bg"),sre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},lre={baseStyle:sre},ure={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},cre={baseStyle:ure},{defineMultiStyleConfig:dre,definePartsStyle:fre}=Jn(see.keys),hre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},pre=fre({icon:hre}),gre=dre({baseStyle:pre}),{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(lee.keys),fl=Nn("menu-bg"),Rx=Nn("menu-shadow"),yre={[fl.variable]:"#fff",[Rx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Rx.reference},bre={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},Sre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},xre={opacity:.6},wre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Cre={transitionProperty:"common",transitionDuration:"normal"},_re=vre({button:Cre,list:yre,item:bre,groupTitle:Sre,command:xre,divider:wre}),kre=mre({baseStyle:_re}),{defineMultiStyleConfig:Ere,definePartsStyle:aC}=Jn(uee.keys),Pre={bg:"blackAlpha.600",zIndex:"modal"},Tre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Lre=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:bt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:bt("lg","dark-lg")(e)}},Are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mre={position:"absolute",top:"2",insetEnd:"3"},Ire=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ore={px:"6",py:"4"},Rre=aC(e=>({overlay:Pre,dialogContainer:io(Tre,e),dialog:io(Lre,e),header:Are,closeButton:Mre,body:io(Ire,e),footer:Ore}));function fs(e){return aC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Nre={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Dre=Ere({baseStyle:Rre,sizes:Nre,defaultProps:{size:"md"}}),zre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},KN=zre,{defineMultiStyleConfig:Bre,definePartsStyle:XN}=Jn(cee.keys),r8=ni("number-input-stepper-width"),ZN=ni("number-input-input-padding"),Fre=hu(r8).add("0.5rem").toString(),Nx=ni("number-input-bg"),Dx=ni("number-input-color"),zx=ni("number-input-border-color"),$re={[r8.variable]:"sizes.6",[ZN.variable]:Fre},Hre=e=>{var t;return((t=io(mn.baseStyle,e))==null?void 0:t.field)??{}},Wre={width:r8.reference},Vre={borderStart:"1px solid",borderStartColor:zx.reference,color:Dx.reference,bg:Nx.reference,[Dx.variable]:"colors.chakra-body-text",[zx.variable]:"colors.chakra-border-color",_dark:{[Dx.variable]:"colors.whiteAlpha.800",[zx.variable]:"colors.whiteAlpha.300"},_active:{[Nx.variable]:"colors.gray.200",_dark:{[Nx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Ure=XN(e=>({root:$re,field:io(Hre,e)??{},stepperGroup:Wre,stepper:Vre}));function Ly(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=KN.fontSizes[o];return XN({field:{...r.field,paddingInlineEnd:ZN.reference,verticalAlign:"top"},stepper:{fontSize:hu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gre={xs:Ly("xs"),sm:Ly("sm"),md:Ly("md"),lg:Ly("lg")},jre=Bre({baseStyle:Ure,sizes:Gre,variants:mn.variants,defaultProps:mn.defaultProps}),dT,Yre={...(dT=mn.baseStyle)==null?void 0:dT.field,textAlign:"center"},qre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},fT,Kre={outline:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((fT=mn.variants)==null?void 0:fT.unstyled.field)??{}},Xre={baseStyle:Yre,sizes:qre,variants:Kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=Jn(dee.keys),Ay=ni("popper-bg"),Jre=ni("popper-arrow-bg"),hT=ni("popper-arrow-shadow-color"),eie={zIndex:10},tie={[Ay.variable]:"colors.white",bg:Ay.reference,[Jre.variable]:Ay.reference,[hT.variable]:"colors.gray.200",_dark:{[Ay.variable]:"colors.gray.700",[hT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},nie={px:3,py:2,borderBottomWidth:"1px"},rie={px:3,py:2},iie={px:3,py:2,borderTopWidth:"1px"},oie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},aie=Qre({popper:eie,content:tie,header:nie,body:rie,footer:iie,closeButton:oie}),sie=Zre({baseStyle:aie}),{defineMultiStyleConfig:lie,definePartsStyle:lm}=Jn(fee.keys),uie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=bt(oT(),oT("1rem","rgba(0,0,0,0.1)"))(e),a=bt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${to(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},cie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},die=e=>({bg:bt("gray.100","whiteAlpha.300")(e)}),fie=e=>({transitionProperty:"common",transitionDuration:"slow",...uie(e)}),hie=lm(e=>({label:cie,filledTrack:fie(e),track:die(e)})),pie={xs:lm({track:{h:"1"}}),sm:lm({track:{h:"2"}}),md:lm({track:{h:"3"}}),lg:lm({track:{h:"4"}})},gie=lie({sizes:pie,baseStyle:hie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:mie,definePartsStyle:z3}=Jn(hee.keys),vie=e=>{var t;const n=(t=io(z5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},yie=z3(e=>{var t,n,r,i;return{label:(n=(t=z5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=z5).baseStyle)==null?void 0:i.call(r,e).container,control:vie(e)}}),bie={md:z3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:z3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:z3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sie=mie({baseStyle:yie,sizes:bie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:wie}=Jn(pee.keys),My=Nn("select-bg"),pT,Cie={...(pT=mn.baseStyle)==null?void 0:pT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:My.reference,[My.variable]:"colors.white",_dark:{[My.variable]:"colors.gray.700"},"> option, > optgroup":{bg:My.reference}},_ie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},kie=wie({field:Cie,icon:_ie}),Iy={paddingInlineEnd:"8"},gT,mT,vT,yT,bT,ST,xT,wT,Eie={lg:{...(gT=mn.sizes)==null?void 0:gT.lg,field:{...(mT=mn.sizes)==null?void 0:mT.lg.field,...Iy}},md:{...(vT=mn.sizes)==null?void 0:vT.md,field:{...(yT=mn.sizes)==null?void 0:yT.md.field,...Iy}},sm:{...(bT=mn.sizes)==null?void 0:bT.sm,field:{...(ST=mn.sizes)==null?void 0:ST.sm.field,...Iy}},xs:{...(xT=mn.sizes)==null?void 0:xT.xs,field:{...(wT=mn.sizes)==null?void 0:wT.xs.field,...Iy},icon:{insetEnd:"1"}}},Pie=xie({baseStyle:kie,sizes:Eie,variants:mn.variants,defaultProps:mn.defaultProps}),Bx=Nn("skeleton-start-color"),Fx=Nn("skeleton-end-color"),Tie={[Bx.variable]:"colors.gray.100",[Fx.variable]:"colors.gray.400",_dark:{[Bx.variable]:"colors.gray.800",[Fx.variable]:"colors.gray.600"},background:Bx.reference,borderColor:Fx.reference,opacity:.7,borderRadius:"sm"},Lie={baseStyle:Tie},$x=Nn("skip-link-bg"),Aie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$x.variable]:"colors.white",_dark:{[$x.variable]:"colors.gray.700"},bg:$x.reference}},Mie={baseStyle:Aie},{defineMultiStyleConfig:Iie,definePartsStyle:lb}=Jn(gee.keys),xv=Nn("slider-thumb-size"),wv=Nn("slider-track-size"),zc=Nn("slider-bg"),Oie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...e8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Rie=e=>({...e8({orientation:e.orientation,horizontal:{h:wv.reference},vertical:{w:wv.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),Nie=e=>{const{orientation:t}=e;return{...e8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:xv.reference,h:xv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Die=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},zie=lb(e=>({container:Oie(e),track:Rie(e),thumb:Nie(e),filledTrack:Die(e)})),Bie=lb({container:{[xv.variable]:"sizes.4",[wv.variable]:"sizes.1"}}),Fie=lb({container:{[xv.variable]:"sizes.3.5",[wv.variable]:"sizes.1"}}),$ie=lb({container:{[xv.variable]:"sizes.2.5",[wv.variable]:"sizes.0.5"}}),Hie={lg:Bie,md:Fie,sm:$ie},Wie=Iie({baseStyle:zie,sizes:Hie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),Vie={width:[Mf.reference],height:[Mf.reference]},Uie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Gie={baseStyle:Vie,sizes:Uie,defaultProps:{size:"md"}},{defineMultiStyleConfig:jie,definePartsStyle:QN}=Jn(mee.keys),Yie={fontWeight:"medium"},qie={opacity:.8,marginBottom:"2"},Kie={verticalAlign:"baseline",fontWeight:"semibold"},Xie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Zie=QN({container:{},label:Yie,helpText:qie,number:Kie,icon:Xie}),Qie={md:QN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Jie=jie({baseStyle:Zie,sizes:Qie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:eoe,definePartsStyle:B3}=Jn(vee.keys),Dm=ni("switch-track-width"),qf=ni("switch-track-height"),Hx=ni("switch-track-diff"),toe=hu.subtract(Dm,qf),sC=ni("switch-thumb-x"),$g=ni("switch-bg"),noe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Dm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[$g.variable]:"colors.gray.300",_dark:{[$g.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[$g.variable]:`colors.${t}.500`,_dark:{[$g.variable]:`colors.${t}.200`}},bg:$g.reference}},roe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${sC.reference})`}},ioe=B3(e=>({container:{[Hx.variable]:toe,[sC.variable]:Hx.reference,_rtl:{[sC.variable]:hu(Hx).negate().toString()}},track:noe(e),thumb:roe})),ooe={sm:B3({container:{[Dm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:B3({container:{[Dm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:B3({container:{[Dm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},aoe=eoe({baseStyle:ioe,sizes:ooe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:S0}=Jn(yee.keys),loe=S0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),B5={"&[data-is-numeric=true]":{textAlign:"end"}},uoe=S0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},caption:{color:bt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),coe=S0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},caption:{color:bt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e)},td:{background:bt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),doe={simple:uoe,striped:coe,unstyled:{}},foe={sm:S0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:S0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:S0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},hoe=soe({baseStyle:loe,variants:doe,sizes:foe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=Nn("tabs-color"),Ss=Nn("tabs-bg"),Oy=Nn("tabs-border-color"),{defineMultiStyleConfig:poe,definePartsStyle:kl}=Jn(bee.keys),goe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},moe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},voe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},yoe={p:4},boe=kl(e=>({root:goe(e),tab:moe(e),tablist:voe(e),tabpanel:yoe})),Soe={sm:kl({tab:{py:1,px:4,fontSize:"sm"}}),md:kl({tab:{fontSize:"md",py:2,px:4}}),lg:kl({tab:{fontSize:"lg",py:3,px:4}})},xoe=kl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ss.variable]:"colors.gray.200",_dark:{[Ss.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:Ss.reference}}}),woe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Oy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Oy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Oy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Oy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Coe=kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ss.variable]:"colors.gray.50",_dark:{[Ss.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ss.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[Ss.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:Ss.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),_oe=kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),koe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[Ss.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[Ss.variable]:`colors.${t}.300`}},color:To.reference,bg:Ss.reference}}}),Eoe=kl({}),Poe={line:xoe,enclosed:woe,"enclosed-colored":Coe,"soft-rounded":_oe,"solid-rounded":koe,unstyled:Eoe},Toe=poe({baseStyle:boe,sizes:Soe,variants:Poe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Loe,definePartsStyle:Kf}=Jn(See.keys),Aoe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Moe={lineHeight:1.2,overflow:"visible"},Ioe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Ooe=Kf({container:Aoe,label:Moe,closeButton:Ioe}),Roe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Noe={subtle:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.outline(e)}})},Doe=Loe({variants:Noe,baseStyle:Ooe,sizes:Roe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),CT,zoe={...(CT=mn.baseStyle)==null?void 0:CT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},_T,Boe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((_T=mn.variants)==null?void 0:_T.unstyled.field)??{}},kT,ET,PT,TT,Foe={xs:((kT=mn.sizes)==null?void 0:kT.xs.field)??{},sm:((ET=mn.sizes)==null?void 0:ET.sm.field)??{},md:((PT=mn.sizes)==null?void 0:PT.md.field)??{},lg:((TT=mn.sizes)==null?void 0:TT.lg.field)??{}},$oe={baseStyle:zoe,sizes:Foe,variants:Boe,defaultProps:{size:"md",variant:"outline"}},Ry=ni("tooltip-bg"),Wx=ni("tooltip-fg"),Hoe=ni("popper-arrow-bg"),Woe={bg:Ry.reference,color:Wx.reference,[Ry.variable]:"colors.gray.700",[Wx.variable]:"colors.whiteAlpha.900",_dark:{[Ry.variable]:"colors.gray.300",[Wx.variable]:"colors.gray.900"},[Hoe.variable]:Ry.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Voe={baseStyle:Woe},Uoe={Accordion:ste,Alert:gte,Avatar:Ete,Badge:Om,Breadcrumb:Dte,Button:Gte,Checkbox:z5,CloseButton:ane,Code:cne,Container:fne,Divider:vne,Drawer:Tne,Editable:Nne,Form:Hne,FormError:Yne,FormLabel:Kne,Heading:Qne,Input:mn,Kbd:lre,Link:cre,List:gre,Menu:kre,Modal:Dre,NumberInput:jre,PinInput:Xre,Popover:sie,Progress:gie,Radio:Sie,Select:Pie,Skeleton:Lie,SkipLink:Mie,Slider:Wie,Spinner:Gie,Stat:Jie,Switch:aoe,Table:hoe,Tabs:Toe,Tag:Doe,Textarea:$oe,Tooltip:Voe,Card:Xte},Goe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},joe=Goe,Yoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},qoe=Yoe,Koe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Xoe=Koe,Zoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Qoe=Zoe,Joe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},eae=Joe,tae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},nae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},rae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},iae={property:tae,easing:nae,duration:rae},oae=iae,aae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},sae=aae,lae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},uae=lae,cae={breakpoints:qoe,zIndices:sae,radii:Qoe,blur:uae,colors:Xoe,...KN,sizes:jN,shadows:eae,space:GN,borders:joe,transition:oae},dae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},fae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},hae="ltr",pae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},gae={semanticTokens:dae,direction:hae,...cae,components:Uoe,styles:fae,config:pae},mae=typeof Element<"u",vae=typeof Map=="function",yae=typeof Set=="function",bae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function F3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!F3(e[r],t[r]))return!1;return!0}var o;if(vae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!F3(r.value[1],t.get(r.value[0])))return!1;return!0}if(yae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(bae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(mae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!F3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Sae=function(t,n){try{return F3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function s1(){const e=C.exports.useContext(bv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function JN(){const e=Yv(),t=s1();return{...e,theme:t}}function xae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function wae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Cae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return xae(o,l,a[u]??l);const h=`${e}.${l}`;return wae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function _ae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>yQ(n),[n]);return ee(PJ,{theme:i,children:[x(kae,{root:t}),r]})}function kae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(ob,{styles:n=>({[t]:n.__cssVars})})}VJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Eae(){const{colorMode:e}=Yv();return x(ob,{styles:t=>{const n=RN(t,"styles.global"),r=zN(n,{theme:t,colorMode:e});return r?dN(r)(t):void 0}})}var Pae=new Set([...xQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Tae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Lae(e){return Tae.has(e)||!Pae.has(e)}var Aae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=NN(a,(g,m)=>CQ(m)),l=zN(e,t),u=Object.assign({},i,l,DN(s),o),h=dN(u)(t.theme);return r?[h,r]:h};function Vx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Lae);const i=Aae({baseStyle:n}),o=nC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Yv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function ke(e){return C.exports.forwardRef(e)}function eD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=JN(),a=e?RN(i,`components.${e}`):void 0,s=n||a,l=Sl({theme:i,colorMode:o},s?.defaultProps??{},DN(zJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=OQ(s)(l);Sae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return eD(e,t)}function Oi(e,t={}){return eD(e,t)}function Mae(){const e=new Map;return new Proxy(Vx,{apply(t,n,r){return Vx(...r)},get(t,n){return e.has(n)||e.set(n,Vx(n)),e.get(n)}})}var Se=Mae();function Iae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Iae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Oae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Hn(...e){return t=>{e.forEach(n=>{Oae(n,t)})}}function Rae(...e){return C.exports.useMemo(()=>Hn(...e),e)}function LT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Nae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function AT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function MT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var lC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,F5=e=>e,Dae=class{descendants=new Map;register=e=>{if(e!=null)return Nae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=LT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=AT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=AT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=MT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=MT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=LT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function zae(){const e=C.exports.useRef(new Dae);return lC(()=>()=>e.current.destroy()),e.current}var[Bae,tD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Fae(e){const t=tD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);lC(()=>()=>{!i.current||t.unregister(i.current)},[]),lC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=F5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Hn(o,i)}}function nD(){return[F5(Bae),()=>F5(tD()),()=>zae(),i=>Fae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),IT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=ke((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??IT.viewBox;if(n&&typeof n!="string")return ae.createElement(Se.svg,{as:n,...m,...u});const b=a??IT.path;return ae.createElement(Se.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});va.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=ke((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ub(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const i8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),cb=C.exports.createContext({});function $ae(){return C.exports.useContext(cb).visualElement}const l1=C.exports.createContext(null),ph=typeof document<"u",$5=ph?C.exports.useLayoutEffect:C.exports.useEffect,rD=C.exports.createContext({strict:!1});function Hae(e,t,n,r){const i=$ae(),o=C.exports.useContext(rD),a=C.exports.useContext(l1),s=C.exports.useContext(i8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return $5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),$5(()=>()=>u&&u.notify("Unmount"),[]),u}function Jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Jp(n)&&(n.current=r))},[t])}function Cv(e){return typeof e=="string"||Array.isArray(e)}function db(e){return typeof e=="object"&&typeof e.start=="function"}const Vae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function fb(e){return db(e.animate)||Vae.some(t=>Cv(e[t]))}function iD(e){return Boolean(fb(e)||e.variants)}function Uae(e,t){if(fb(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cv(n)?n:void 0,animate:Cv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Gae(e){const{initial:t,animate:n}=Uae(e,C.exports.useContext(cb));return C.exports.useMemo(()=>({initial:t,animate:n}),[OT(t),OT(n)])}function OT(e){return Array.isArray(e)?e.join(" "):e}const lu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),_v={measureLayout:lu(["layout","layoutId","drag"]),animation:lu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:lu(["exit"]),drag:lu(["drag","dragControls"]),focus:lu(["whileFocus"]),hover:lu(["whileHover","onHoverStart","onHoverEnd"]),tap:lu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:lu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:lu(["whileInView","onViewportEnter","onViewportLeave"])};function jae(e){for(const t in e)t==="projectionNodeConstructor"?_v.projectionNodeConstructor=e[t]:_v[t].Component=e[t]}function hb(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const zm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Yae=1;function qae(){return hb(()=>{if(zm.hasEverUpdated)return Yae++})}const o8=C.exports.createContext({});class Kae extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const oD=C.exports.createContext({}),Xae=Symbol.for("motionComponentSymbol");function Zae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&jae(e);function a(l,u){const h={...C.exports.useContext(i8),...l,layoutId:Qae(l)},{isStatic:g}=h;let m=null;const v=Gae(l),b=g?void 0:qae(),w=i(l,g);if(!g&&ph){v.visualElement=Hae(o,w,h,t);const E=C.exports.useContext(rD).strict,P=C.exports.useContext(oD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||_v.projectionNodeConstructor,P))}return ee(Kae,{visualElement:v.visualElement,props:h,children:[m,x(cb.Provider,{value:v,children:r(o,l,b,Wae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Xae]=o,s}function Qae({layoutId:e}){const t=C.exports.useContext(o8).id;return t&&e!==void 0?t+"-"+e:e}function Jae(e){function t(r,i={}){return Zae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ese=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function a8(e){return typeof e!="string"||e.includes("-")?!1:!!(ese.indexOf(e)>-1||/[A-Z]/.test(e))}const H5={};function tse(e){Object.assign(H5,e)}const W5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],u1=new Set(W5);function aD(e,{layout:t,layoutId:n}){return u1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!H5[e]||e==="opacity")}const Ml=e=>!!e?.getVelocity,nse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rse=(e,t)=>W5.indexOf(e)-W5.indexOf(t);function ise({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(rse);for(const s of t)a+=`${nse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function sD(e){return e.startsWith("--")}const ose=(e,t)=>t&&typeof e=="number"?t.transform(e):e,lD=(e,t)=>n=>Math.max(Math.min(n,t),e),Bm=e=>e%1?Number(e.toFixed(5)):e,kv=/(-)?([\d]*\.?[\d])+/g,uC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ase=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Zv(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fm=Object.assign(Object.assign({},gh),{transform:lD(0,1)}),Ny=Object.assign(Object.assign({},gh),{default:1}),Qv=e=>({test:t=>Zv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=Qv("deg"),El=Qv("%"),wt=Qv("px"),sse=Qv("vh"),lse=Qv("vw"),RT=Object.assign(Object.assign({},El),{parse:e=>El.parse(e)/100,transform:e=>El.transform(e*100)}),s8=(e,t)=>n=>Boolean(Zv(n)&&ase.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),uD=(e,t,n)=>r=>{if(!Zv(r))return r;const[i,o,a,s]=r.match(kv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:s8("hsl","hue"),parse:uD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+El.transform(Bm(t))+", "+El.transform(Bm(n))+", "+Bm(Fm.transform(r))+")"},use=lD(0,255),Ux=Object.assign(Object.assign({},gh),{transform:e=>Math.round(use(e))}),Vc={test:s8("rgb","red"),parse:uD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ux.transform(e)+", "+Ux.transform(t)+", "+Ux.transform(n)+", "+Bm(Fm.transform(r))+")"};function cse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const cC={test:s8("#"),parse:cse,transform:Vc.transform},Qi={test:e=>Vc.test(e)||cC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):cC.parse(e),transform:e=>Zv(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},cD="${c}",dD="${n}";function dse(e){var t,n,r,i;return isNaN(e)&&Zv(e)&&((n=(t=e.match(kv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(uC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function fD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(uC);r&&(n=r.length,e=e.replace(uC,cD),t.push(...r.map(Qi.parse)));const i=e.match(kv);return i&&(e=e.replace(kv,dD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function hD(e){return fD(e).values}function pD(e){const{values:t,numColors:n,tokenised:r}=fD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function hse(e){const t=hD(e);return pD(e)(t.map(fse))}const _u={test:dse,parse:hD,createTransformer:pD,getAnimatableNone:hse},pse=new Set(["brightness","contrast","saturate","opacity"]);function gse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kv)||[];if(!r)return e;const i=n.replace(r,"");let o=pse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const mse=/([a-z-]*)\(.*?\)/g,dC=Object.assign(Object.assign({},_u),{getAnimatableNone:e=>{const t=e.match(mse);return t?t.map(gse).join(" "):e}}),NT={...gh,transform:Math.round},gD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:Ny,scaleX:Ny,scaleY:Ny,scaleZ:Ny,skew:Lc,skewX:Lc,skewY:Lc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Fm,originX:RT,originY:RT,originZ:wt,zIndex:NT,fillOpacity:Fm,strokeOpacity:Fm,numOctaves:NT};function l8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(sD(m)){o[m]=v;continue}const b=gD[m],w=ose(v,b);if(u1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=ise(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const u8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function mD(e,t,n){for(const r in t)!Ml(t[r])&&!aD(r,n)&&(e[r]=t[r])}function vse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=u8();return l8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function yse(e,t,n){const r=e.style||{},i={};return mD(i,r,e),Object.assign(i,vse(e,t,n)),e.transformValues?e.transformValues(i):i}function bse(e,t,n){const r={},i=yse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Sse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],xse=["whileTap","onTap","onTapStart","onTapCancel"],wse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Cse=["whileInView","onViewportEnter","onViewportLeave","viewport"],_se=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Cse,...xse,...Sse,...wse]);function V5(e){return _se.has(e)}let vD=e=>!V5(e);function kse(e){!e||(vD=t=>t.startsWith("on")?!V5(t):e(t))}try{kse(require("@emotion/is-prop-valid").default)}catch{}function Ese(e,t,n){const r={};for(const i in e)(vD(i)||n===!0&&V5(i)||!t&&!V5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function DT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Pse(e,t,n){const r=DT(t,e.x,e.width),i=DT(n,e.y,e.height);return`${r} ${i}`}const Tse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lse={offset:"strokeDashoffset",array:"strokeDasharray"};function Ase(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Tse:Lse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function c8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){l8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Pse(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Ase(g,o,a,s,!1)}const yD=()=>({...u8(),attrs:{}});function Mse(e,t){const n=C.exports.useMemo(()=>{const r=yD();return c8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};mD(r,e.style,e),n.style={...r,...n.style}}return n}function Ise(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(a8(n)?Mse:bse)(r,a,s),g={...Ese(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const bD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const xD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function wD(e,t,n,r){SD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(xD.has(i)?i:bD(i),t.attrs[i])}function d8(e){const{style:t}=e,n={};for(const r in t)(Ml(t[r])||aD(r,e))&&(n[r]=t[r]);return n}function CD(e){const t=d8(e);for(const n in e)if(Ml(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function f8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Ev=e=>Array.isArray(e),Ose=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),_D=e=>Ev(e)?e[e.length-1]||0:e;function $3(e){const t=Ml(e)?e.get():e;return Ose(t)?t.toValue():t}function Rse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Nse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const kD=e=>(t,n)=>{const r=C.exports.useContext(cb),i=C.exports.useContext(l1),o=()=>Rse(e,t,r,i);return n?o():hb(o)};function Nse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=$3(o[m]);let{initial:a,animate:s}=e;const l=fb(e),u=iD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!db(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=f8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Dse={useVisualState:kD({scrapeMotionValuesFromProps:CD,createRenderState:yD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}c8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),wD(t,n)}})},zse={useVisualState:kD({scrapeMotionValuesFromProps:d8,createRenderState:u8})};function Bse(e,{forwardMotionProps:t=!1},n,r,i){return{...a8(e)?Dse:zse,preloadedFeatures:n,useRender:Ise(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function pb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return pb(i,t,n,r)},[e,t,n,r])}function Fse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};fC(t,"focus",e?r:void 0),fC(t,"blur",e?i:void 0)}function ED(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function PD(e){return!!e.touches}function $se(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Hse={pageX:0,pageY:0};function Wse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Hse;return{x:r[t+"X"],y:r[t+"Y"]}}function Vse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function h8(e,t="page"){return{point:PD(e)?Wse(e,t):Vse(e,t)}}const TD=(e,t=!1)=>{const n=r=>e(r,h8(r));return t?$se(n):n},Use=()=>ph&&window.onpointerdown===null,Gse=()=>ph&&window.ontouchstart===null,jse=()=>ph&&window.onmousedown===null,Yse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},qse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function LD(e){return Use()?e:Gse()?qse[e]:jse()?Yse[e]:e}function x0(e,t,n,r){return pb(e,LD(t),TD(n,t==="pointerdown"),r)}function U5(e,t,n,r){return fC(e,LD(t),n&&TD(n,t==="pointerdown"),r)}function AD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zT=AD("dragHorizontal"),BT=AD("dragVertical");function MD(e){let t=!1;if(e==="y")t=BT();else if(e==="x")t=zT();else{const n=zT(),r=BT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ID(){const e=MD(!0);return e?(e(),!1):!0}function FT(e,t,n){return(r,i)=>{!ED(r)||ID()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function Kse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){U5(r,"pointerenter",e||n?FT(r,!0,e):void 0,{passive:!e}),U5(r,"pointerleave",t||n?FT(r,!1,t):void 0,{passive:!t})}const OD=(e,t)=>t?e===t?!0:OD(e,t.parentElement):!1;function p8(e){return C.exports.useEffect(()=>()=>e(),[])}function RD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Gx=.001,Zse=.01,$T=10,Qse=.05,Jse=1;function ele({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Xse(e<=$T*1e3);let a=1-t;a=j5(Qse,Jse,a),e=j5(Zse,$T,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=hC(u,a),b=Math.exp(-g);return Gx-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=hC(Math.pow(u,2),a);return(-i(u)+Gx>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Gx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=nle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const tle=12;function nle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ole(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!HT(e,ile)&&HT(e,rle)){const n=ele(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function g8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=RD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ole(o),v=WT,b=WT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=hC(T,k);v=O=>{const R=Math.exp(-k*T*O);return n-R*((E+k*T*P)/M*Math.sin(M*O)+P*Math.cos(M*O))},b=O=>{const R=Math.exp(-k*T*O);return k*T*R*(Math.sin(M*O)*(E+k*T*P)/M+P*Math.cos(M*O))-R*(Math.cos(M*O)*(E+k*T*P)-M*P*Math.sin(M*O))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*T*O),N=Math.min(M*O,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}g8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const WT=e=>0,Pv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function jx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function VT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=jx(l,s,e+1/3),o=jx(l,s,e),a=jx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const ale=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},sle=[cC,Vc,Ff],UT=e=>sle.find(t=>t.test(e)),ND=(e,t)=>{let n=UT(e),r=UT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=VT(i),n=Vc),r===Ff&&(o=VT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=ale(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},pC=e=>typeof e=="number",lle=(e,t)=>n=>t(e(n)),gb=(...e)=>e.reduce(lle);function DD(e,t){return pC(e)?n=>Cr(e,t,n):Qi.test(e)?ND(e,t):BD(e,t)}const zD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>DD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=DD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function GT(e){const t=_u.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=_u.createTransformer(t),r=GT(e),i=GT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?gb(zD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},cle=(e,t)=>n=>Cr(e,t,n);function dle(e){if(typeof e=="number")return cle;if(typeof e=="string")return Qi.test(e)?ND:BD;if(Array.isArray(e))return zD;if(typeof e=="object")return ule}function fle(e,t,n){const r=[],i=n||dle(e[0]),o=e.length-1;for(let a=0;an(Pv(e,t,r))}function ple(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Pv(e[o],e[o+1],i);return t[o](s)}}function FD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;G5(o===t.length),G5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=fle(t,r,i),s=o===2?hle(e,a):ple(e,a);return n?l=>s(j5(e[0],e[o-1],l)):s}const mb=e=>t=>1-e(1-t),m8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gle=e=>t=>Math.pow(t,e),$D=e=>t=>t*t*((e+1)*t-e),mle=e=>{const t=$D(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},HD=1.525,vle=4/11,yle=8/11,ble=9/10,v8=e=>e,y8=gle(2),Sle=mb(y8),WD=m8(y8),VD=e=>1-Math.sin(Math.acos(e)),b8=mb(VD),xle=m8(b8),S8=$D(HD),wle=mb(S8),Cle=m8(S8),_le=mle(HD),kle=4356/361,Ele=35442/1805,Ple=16061/1805,Y5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Y5(1-e*2)):.5*Y5(e*2-1)+.5;function Ale(e,t){return e.map(()=>t||WD).splice(0,e.length-1)}function Mle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Ile(e,t){return e.map(n=>n*t)}function H3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Ile(r&&r.length===a.length?r:Mle(a),i);function l(){return FD(s,a,{ease:Array.isArray(n)?n:Ale(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ole({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const jT={keyframes:H3,spring:g8,decay:Ole};function Rle(e){if(Array.isArray(e.to))return H3;if(jT[e.type])return jT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?H3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?g8:H3}const UD=1/60*1e3,Nle=typeof performance<"u"?()=>performance.now():()=>Date.now(),GD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Nle()),UD);function Dle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Dle(()=>Tv=!0),e),{}),Ble=Jv.reduce((e,t)=>{const n=vb[t];return e[t]=(r,i=!1,o=!1)=>(Tv||Hle(),n.schedule(r,i,o)),e},{}),Fle=Jv.reduce((e,t)=>(e[t]=vb[t].cancel,e),{});Jv.reduce((e,t)=>(e[t]=()=>vb[t].process(w0),e),{});const $le=e=>vb[e].process(w0),jD=e=>{Tv=!1,w0.delta=gC?UD:Math.max(Math.min(e-w0.timestamp,zle),1),w0.timestamp=e,mC=!0,Jv.forEach($le),mC=!1,Tv&&(gC=!1,GD(jD))},Hle=()=>{Tv=!0,gC=!0,mC||GD(jD)},Wle=()=>w0;function YD(e,t,n=0){return e-t-n}function Vle(e,t,n=0,r=!0){return r?YD(t+-e,t,n):t-(e-t)+n}function Ule(e,t,n,r){return r?e>=t+n:e<=-n}const Gle=e=>{const t=({delta:n})=>e(n);return{start:()=>Ble.update(t,!0),stop:()=>Fle.update(t)}};function qD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Gle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=RD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,O=!1,R=!0,N;const z=Rle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=FD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(R=k%2===0,a=Vle(a,T,u,R)):(a=YD(a,T,u),l==="mirror"&&V.flipTarget()),O=!1,v&&v()}function j(){P.stop(),m&&m()}function ue(Q){if(R||(Q=-Q),a+=Q,!O){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),O=R?ne.done:a<=0}b?.(M),O&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function KD(e,t){return t?e*(1e3/t):0}function jle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(M),(O=T.onUpdate)===null||O===void 0||O.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),O=M===n?-1:1;let R,N;const z=V=>{R=N,N=V,t=KD(V-R,Wle().delta),(O===1&&V>M||O===-1&&Vb?.stop()}}const vC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),YT=e=>vC(e)&&e.hasOwnProperty("z"),Dy=(e,t)=>Math.abs(e-t);function x8(e,t){if(pC(e)&&pC(t))return Dy(e,t);if(vC(e)&&vC(t)){const n=Dy(e.x,t.x),r=Dy(e.y,t.y),i=YT(e)&&YT(t)?Dy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const XD=(e,t)=>1-3*t+3*e,ZD=(e,t)=>3*t-6*e,QD=e=>3*e,q5=(e,t,n)=>((XD(t,n)*e+ZD(t,n))*e+QD(t))*e,JD=(e,t,n)=>3*XD(t,n)*e*e+2*ZD(t,n)*e+QD(t),Yle=1e-7,qle=10;function Kle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=q5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Yle&&++s=Zle?Qle(a,g,e,n):m===0?g:Kle(a,s,s+zy,e,n)}return a=>a===0||a===1?a:q5(o(a),t,r)}function eue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!ID()}function g(b,w){!h()||(OD(i.current,b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=gb(x0(window,"pointerup",g,l),x0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(b,w))}U5(i,"pointerdown",o?v:void 0,l),p8(u)}const tue="production",ez=typeof process>"u"||process.env===void 0?tue:"production",qT=new Set;function tz(e,t,n){e||qT.has(t)||(console.warn(t),n&&console.warn(n),qT.add(t))}const yC=new WeakMap,Yx=new WeakMap,nue=e=>{const t=yC.get(e.target);t&&t(e)},rue=e=>{e.forEach(nue)};function iue({root:e,...t}){const n=e||document;Yx.has(n)||Yx.set(n,{});const r=Yx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(rue,{root:e,...t})),r[i]}function oue(e,t,n){const r=iue(t);return yC.set(e,n),r.observe(e),()=>{yC.delete(e),r.unobserve(e)}}function aue({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?uue:lue)(a,o.current,e,i)}const sue={some:0,all:1};function lue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:sue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return oue(n.current,s,l)},[e,r,i,o])}function uue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(ez!=="production"&&tz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),cue={inView:Uc(aue),tap:Uc(eue),focus:Uc(Fse),hover:Uc(Kse)};function w8(){const e=C.exports.useContext(l1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function due(){return fue(C.exports.useContext(l1))}function fue(e){return e===null?!0:e.isPresent}function nz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,hue={linear:v8,easeIn:y8,easeInOut:WD,easeOut:Sle,circIn:VD,circInOut:xle,circOut:b8,backIn:S8,backInOut:Cle,backOut:wle,anticipate:_le,bounceIn:Tle,bounceInOut:Lle,bounceOut:Y5},KT=e=>{if(Array.isArray(e)){G5(e.length===4);const[t,n,r,i]=e;return Jle(t,n,r,i)}else if(typeof e=="string")return hue[e];return e},pue=e=>Array.isArray(e)&&typeof e[0]!="number",XT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&_u.test(t)&&!t.startsWith("url(")),yf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),By=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qx=()=>({type:"keyframes",ease:"linear",duration:.3}),gue=e=>({type:"keyframes",duration:.8,values:e}),ZT={x:yf,y:yf,z:yf,rotate:yf,rotateX:yf,rotateY:yf,rotateZ:yf,scaleX:By,scaleY:By,scale:By,opacity:qx,backgroundColor:qx,color:qx,default:By},mue=(e,t)=>{let n;return Ev(t)?n=gue:n=ZT[e]||ZT.default,{to:t,...n(t)}},vue={...gD,color:Qi,backgroundColor:Qi,outlineColor:Qi,fill:Qi,stroke:Qi,borderColor:Qi,borderTopColor:Qi,borderRightColor:Qi,borderBottomColor:Qi,borderLeftColor:Qi,filter:dC,WebkitFilter:dC},C8=e=>vue[e];function _8(e,t){var n;let r=C8(e);return r!==dC&&(r=_u),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const yue={current:!1},rz=1/60*1e3,bue=typeof performance<"u"?()=>performance.now():()=>Date.now(),iz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(bue()),rz);function Sue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Sue(()=>Lv=!0),e),{}),Ps=e2.reduce((e,t)=>{const n=yb[t];return e[t]=(r,i=!1,o=!1)=>(Lv||Cue(),n.schedule(r,i,o)),e},{}),ah=e2.reduce((e,t)=>(e[t]=yb[t].cancel,e),{}),Kx=e2.reduce((e,t)=>(e[t]=()=>yb[t].process(C0),e),{}),wue=e=>yb[e].process(C0),oz=e=>{Lv=!1,C0.delta=bC?rz:Math.max(Math.min(e-C0.timestamp,xue),1),C0.timestamp=e,SC=!0,e2.forEach(wue),SC=!1,Lv&&(bC=!1,iz(oz))},Cue=()=>{Lv=!0,bC=!0,SC||iz(oz)},xC=()=>C0;function az(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Ps.read(r,!0),()=>ah.read(r)}function _ue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function kue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=K5(o.duration)),o.repeatDelay&&(a.repeatDelay=K5(o.repeatDelay)),e&&(a.ease=pue(e)?e.map(KT):KT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Eue(e,t){var n,r;return(r=(n=(k8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Pue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Tue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Pue(t),_ue(e)||(e={...e,...mue(n,t.to)}),{...t,...kue(e)}}function Lue(e,t,n,r,i){const o=k8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=XT(e,n);a==="none"&&s&&typeof n=="string"?a=_8(e,n):QT(a)&&typeof n=="string"?a=JT(n):!Array.isArray(n)&&QT(n)&&typeof a=="string"&&(n=JT(a));const l=XT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?jle({...g,...o}):qD({...Tue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=_D(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function QT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function JT(e){return typeof e=="number"?0:_8("",e)}function k8(e,t){return e[t]||e.default||e}function E8(e,t,n,r={}){return yue.current&&(r={type:!1}),t.start(i=>{let o;const a=Lue(e,t,n,r,i),s=Eue(r,e),l=()=>o=a();let u;return s?u=az(l,K5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Aue=e=>/^\-?\d*\.?\d+$/.test(e),Mue=e=>/^0[^.\s]+$/.test(e);function P8(e,t){e.indexOf(t)===-1&&e.push(t)}function T8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $m{constructor(){this.subscriptions=[]}add(t){return P8(this.subscriptions,t),()=>T8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Oue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new $m,this.velocityUpdateSubscribers=new $m,this.renderSubscribers=new $m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=xC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ps.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Ps.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Iue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?KD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function U0(e){return new Oue(e)}const sz=e=>t=>t.test(e),Rue={test:e=>e==="auto",parse:e=>e},lz=[gh,wt,El,Lc,lse,sse,Rue],Hg=e=>lz.find(sz(e)),Nue=[...lz,Qi,_u],Due=e=>Nue.find(sz(e));function zue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Bue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function bb(e,t,n){const r=e.getProps();return f8(r,t,n!==void 0?n:r.custom,zue(e),Bue(e))}function Fue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,U0(n))}function $ue(e,t){const n=bb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=_D(o[a]);Fue(e,a,s)}}function Hue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;swC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=wC(e,t,n);else{const i=typeof t=="function"?bb(e,t,n.custom):t;r=uz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function wC(e,t,n={}){var r;const i=bb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>uz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Gue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function uz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Yue(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&u1.has(m)&&(w={...w,type:!1,delay:0});let E=E8(m,v,b,w);X5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&$ue(e,s)})}function Gue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(jue).forEach((u,h)=>{a.push(wC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function jue(e,t){return e.sortNodePosition(t)}function Yue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const L8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],que=[...L8].reverse(),Kue=L8.length;function Xue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Uue(e,n,r)))}function Zue(e){let t=Xue(e);const n=Jue();let r=!0;const i=(l,u)=>{const h=bb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const j=Array.isArray(O)?O:[O];let ue=j.reduce(i,{});N===!1&&(ue={});const{prevResolvedValues:W={}}=M,Q={...W,...ue},ne=J=>{$=!0,b.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=ue[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Ev(K)&&Ev(G)?!nz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):b.add(J):K!==void 0&&b.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=O,M.prevResolvedValues=ue,M.isActive&&(w={...w,...ue}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Que(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nz(t,e):!1}function bf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jue(){return{[Yn.Animate]:bf(!0),[Yn.InView]:bf(),[Yn.Hover]:bf(),[Yn.Tap]:bf(),[Yn.Drag]:bf(),[Yn.Focus]:bf(),[Yn.Exit]:bf()}}const ece={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Zue(e)),db(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=w8(),o=C.exports.useContext(l1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class cz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=x8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=xC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Xx(h,this.transformPagePoint),ED(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Ps.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Zx(Xx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},PD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=h8(t),o=Xx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=xC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Zx(o,this.history)),this.removeListeners=gb(x0(window,"pointermove",this.handlePointerMove),x0(window,"pointerup",this.handlePointerUp),x0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Xx(e,t){return t?{point:t(e.point)}:e}function eL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx({point:e},t){return{point:e,delta:eL(e,dz(t)),offset:eL(e,tce(t)),velocity:nce(t,.1)}}function tce(e){return e[0]}function dz(e){return e[e.length-1]}function nce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=dz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>K5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fa(e){return e.max-e.min}function tL(e,t=0,n=.01){return x8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function oL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function oce(e,{top:t,left:n,bottom:r,right:i}){return{x:oL(e.x,n,i),y:oL(e.y,t,r)}}function aL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pv(t.min,t.max-r,e.min):r>i&&(n=Pv(e.min,e.max-i,t.min)),j5(0,1,n)}function lce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const CC=.35;function uce(e=CC){return e===!1?e=0:e===!0&&(e=CC),{x:sL(e,"left","right"),y:sL(e,"top","bottom")}}function sL(e,t,n){return{min:lL(e,t),max:lL(e,n)}}function lL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const uL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vm=()=>({x:uL(),y:uL()}),cL=()=>({min:0,max:0}),Zr=()=>({x:cL(),y:cL()});function cl(e){return[e("x"),e("y")]}function fz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function cce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qx(e){return e===void 0||e===1}function _C({scale:e,scaleX:t,scaleY:n}){return!Qx(e)||!Qx(t)||!Qx(n)}function kf(e){return _C(e)||hz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function hz(e){return dL(e.x)||dL(e.y)}function dL(e){return e&&e!=="0%"}function Z5(e,t,n){const r=e-n,i=t*r;return n+i}function fL(e,t,n,r,i){return i!==void 0&&(e=Z5(e,i,r)),Z5(e,n,r)+t}function kC(e,t=0,n=1,r,i){e.min=fL(e.min,t,n,r,i),e.max=fL(e.max,t,n,r,i)}function pz(e,{x:t,y:n}){kC(e.x,t.translate,t.scale,t.originPoint),kC(e.y,n.translate,n.scale,n.originPoint)}function fce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(h8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=MD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(El.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=fa(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=yce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new cz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Fy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=ice(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oce(r.layoutBox,t):this.constraints=!1,this.elastic=uce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=lce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=gce(r,i.root,this.visualElement.getTransformPagePoint());let a=ace(i.layout.layoutBox,o);if(n){const s=n(cce(a));this.hasMutatedConstraints=!!s,s&&(a=fz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Fy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return E8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Fy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=sce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Fy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;mce.set(this.visualElement,this);const n=this.visualElement.current,r=x0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=pb(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=CC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Fy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function bce(e){const{dragControls:t,visualElement:n}=e,r=hb(()=>new vce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Sce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(i8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new cz(h,l,{transformPagePoint:s})}U5(i,"pointerdown",o&&u),p8(()=>a.current&&a.current.end())}const xce={pan:Uc(Sce),drag:Uc(bce)};function EC(e){return typeof e=="string"&&e.startsWith("var(--")}const mz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wce(e){const t=mz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function PC(e,t,n=1){const[r,i]=wce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():EC(i)?PC(i,t,n+1):i}function Cce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!EC(o))return;const a=PC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!EC(o))continue;const a=PC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ce=new Set(["width","height","top","left","right","bottom","x","y"]),vz=e=>_ce.has(e),kce=e=>Object.keys(e).some(vz),yz=(e,t)=>{e.set(t,!1),e.set(t)},pL=e=>e===gh||e===wt;var gL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(gL||(gL={}));const mL=(e,t)=>parseFloat(e.split(", ")[t]),vL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return mL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?mL(o[1],e):0}},Ece=new Set(["x","y","z"]),Pce=W5.filter(e=>!Ece.has(e));function Tce(e){const t=[];return Pce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const yL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:vL(4,13),y:vL(5,14)},Lce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=yL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);yz(h,s[u]),e[u]=yL[u](l,o)}),e},Ace=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(vz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Hg(h);const m=t[l];let v;if(Ev(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Hg(h);for(let E=w;E=0?window.pageYOffset:null,u=Lce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Mce(e,t,n,r){return kce(t)?Ace(e,t,n,r):{target:t,transitionEnd:r}}const Ice=(e,t,n,r)=>{const i=Cce(e,t,r);return t=i.target,r=i.transitionEnd,Mce(e,t,n,r)},TC={current:null},bz={current:!1};function Oce(){if(bz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>TC.current=e.matches;e.addListener(t),t()}else TC.current=!1}function Rce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ml(o))e.addValue(i,o),X5(r)&&r.add(i);else if(Ml(a))e.addValue(i,U0(o)),X5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,U0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Sz=Object.keys(_v),Nce=Sz.length,bL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ps.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=fb(n),this.isVariantNode=iD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Ml(g)&&(g.set(a[h],!1),X5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),bz.current||Oce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:TC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=u1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ps.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=U0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=f8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ml(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $m),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const xz=["initial",...L8],zce=xz.length;class wz extends Dce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=Vue(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Hue(this,r,a);const s=Ice(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Bce(e){return window.getComputedStyle(e)}class Fce extends wz{readValueFromInstance(t,n){if(u1.has(n)){const r=C8(n);return r&&r.default||0}else{const r=Bce(t),i=(sD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gz(t,n)}build(t,n,r,i){l8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return d8(t)}renderInstance(t,n,r,i){SD(t,n,r,i)}}class $ce extends wz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return u1.has(n)?((r=C8(n))===null||r===void 0?void 0:r.default)||0:(n=xD.has(n)?n:bD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return CD(t)}build(t,n,r,i){c8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){wD(t,n,r,i)}}const Hce=(e,t)=>a8(e)?new $ce(t,{enableHardwareAcceleration:!1}):new Fce(t,{enableHardwareAcceleration:!0});function SL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=SL(e,t.target.x),r=SL(e,t.target.y);return`${n}% ${r}%`}},xL="_$css",Wce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(mz,v=>(o.push(v),xL)));const a=_u.parse(e);if(a.length>5)return r;const s=_u.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(xL,()=>{const b=o[v];return v++,b})}return m}};class Vce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;tse(Gce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ps.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Uce(e){const[t,n]=w8(),r=C.exports.useContext(o8);return x(Vce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(oD),isPresent:t,safeToRemove:n})}const Gce={borderRadius:{...Wg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wg,borderTopRightRadius:Wg,borderBottomLeftRadius:Wg,borderBottomRightRadius:Wg,boxShadow:Wce},jce={measureLayout:Uce};function Yce(e,t,n={}){const r=Ml(e)?e:U0(e);return E8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Cz=["TopLeft","TopRight","BottomLeft","BottomRight"],qce=Cz.length,wL=e=>typeof e=="string"?parseFloat(e):e,CL=e=>typeof e=="number"||wt.test(e);function Kce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Xce(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,Zce(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Pv(e,t,r))}function kL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){kL(e.x,t.x),kL(e.y,t.y)}function EL(e,t,n,r,i){return e-=t,e=Z5(e,1/n,r),i!==void 0&&(e=Z5(e,1/i,r)),e}function Qce(e,t=0,n=1,r=.5,i,o=e,a=e){if(El.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=EL(e.min,t,n,s,i),e.max=EL(e.max,t,n,s,i)}function PL(e,t,[n,r,i],o,a){Qce(e,t[n],t[r],t[i],t.scale,o,a)}const Jce=["x","scaleX","originX"],ede=["y","scaleY","originY"];function TL(e,t,n,r){PL(e.x,t,Jce,n?.x,r?.x),PL(e.y,t,ede,n?.y,r?.y)}function LL(e){return e.translate===0&&e.scale===1}function kz(e){return LL(e.x)&&LL(e.y)}function Ez(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function AL(e){return fa(e.x)/fa(e.y)}function tde(e,t,n=.1){return x8(e,t)<=n}class nde{constructor(){this.members=[]}add(t){P8(this.members,t),t.scheduleRender()}remove(t){if(T8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ML(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const rde=(e,t)=>e.depth-t.depth;class ide{constructor(){this.children=[],this.isDirty=!1}add(t){P8(this.children,t),this.isDirty=!0}remove(t){T8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rde),this.isDirty=!1,this.children.forEach(t)}}const IL=["","X","Y","Z"],OL=1e3;let ode=0;function Pz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=ode++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(cde),this.nodes.forEach(dde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=az(v,250),zm.hasAnimatedSinceResize&&(zm.hasAnimatedSinceResize=!1,this.nodes.forEach(NL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:mde,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Ez(this.targetLayout,w)||b,V=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...k8(O,"layout"),onPlay:R,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&NL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(fde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;DL(v.x,a.x,M),DL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Wm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pde(this.relativeTarget,this.relativeTargetOrigin,b,M)),w&&(this.animationValues=m,Kce(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ps.update(()=>{zm.hasAnimatedSinceResize=!0,this.currentAnimation=Yce(0,OL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,OL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Tz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=fa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=fa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),e0(s,h),Hm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new nde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(RL),this.root.sharedNodes.clear()}}}function ade(e){e.updateLayout()}function sde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(b);b.min=o[v].min,b.max=b.min+w}):Tz(s,i.layoutBox,o)&&cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(o[v]);b.max=b.min+w});const u=Vm();Hm(u,o,i.layoutBox);const h=Vm();l?Hm(h,e.applyTransform(a,!0),i.measuredBox):Hm(h,o,i.layoutBox);const g=!kz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:w}=v;if(b&&w){const E=Zr();Wm(E,i.layoutBox,b.layoutBox);const P=Zr();Wm(P,o,w.layoutBox),Ez(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function lde(e){e.clearSnapshot()}function RL(e){e.clearMeasurements()}function ude(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function NL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function cde(e){e.resolveTargetDelta()}function dde(e){e.calcProjection()}function fde(e){e.resetRotation()}function hde(e){e.removeLeadSnapshot()}function DL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function pde(e,t,n,r){zL(e.x,t.x,n.x,r),zL(e.y,t.y,n.y,r)}function gde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mde={duration:.45,ease:[.4,0,.1,1]};function vde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function BL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function yde(e){BL(e.x),BL(e.y)}function Tz(e,t,n){return e==="position"||e==="preserve-aspect"&&!tde(AL(t),AL(n),.2)}const bde=Pz({attachResizeListener:(e,t)=>pb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jx={current:void 0},Sde=Pz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jx.current){const e=new bde(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Jx.current=e}return Jx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),xde={...ece,...cue,...xce,...jce},zl=Jae((e,t)=>Bse(e,t,xde,Hce,Sde));function Lz(){const e=C.exports.useRef(!1);return $5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wde(){const e=Lz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Ps.postRender(r),[r]),t]}class Cde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _de({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(Cde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const ew=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=hb(kde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(_de,{isPresent:n,children:e})),x(l1.Provider,{value:u,children:e})};function kde(){return new Map}const Fp=e=>e.key||"";function Ede(e,t){e.forEach(n=>{const r=Fp(n);t.set(r,n)})}function Pde(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",tz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=wde();const l=C.exports.useContext(o8).forceRender;l&&(s=l);const u=Lz(),h=Pde(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if($5(()=>{w.current=!1,Ede(h,b),v.current=g}),p8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Wn,{children:g.map(T=>x(ew,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Fp(T)))});g=[...g];const E=v.current.map(Fp),P=h.map(Fp),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=b.get(T);if(!M)return;const O=E.indexOf(T),R=()=>{b.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(ew,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Fp(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(ew,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Fp(T))}),ez!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Wn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var vl=function(){return vl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function LC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Tde(){return!1}var Lde=e=>{const{condition:t,message:n}=e;t&&Tde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Vg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function AC(e){switch(e?.direction??"right"){case"right":return Vg.slideRight;case"left":return Vg.slideLeft;case"bottom":return Vg.slideDown;case"top":return Vg.slideUp;default:return Vg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ts={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Ade=e=>e!=null&&parseInt(e.toString(),10)>0,$L={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Mde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Ade(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ts.exit($L.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ts.enter($L.enter,i)})},Mz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Lde({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(zl.div,{ref:t,...g,className:t2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Mde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Mz.displayName="Collapse";var Ide={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ts.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ts.exit(Xf.exit,n),transitionEnd:t?.exit})},Iz={initial:"exit",animate:"enter",exit:"exit",variants:Ide},Ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(zl.div,{ref:n,className:t2("chakra-fade",o),custom:m,...Iz,animate:h,...u})})});Ode.displayName="Fade";var Rde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ts.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ts.enter(Xf.enter,n),transitionEnd:e?.enter})},Oz={initial:"exit",animate:"enter",exit:"exit",variants:Rde},Nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:b,children:m&&ae.createElement(zl.div,{ref:n,className:t2("chakra-offset-slide",s),...Oz,animate:v,custom:b,...g})})});Nde.displayName="ScaleFade";var HL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Dde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=AC({direction:e});return{...i,transition:t?.exit??Ts.exit(HL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=AC({direction:e});return{...i,transition:n?.enter??Ts.enter(HL.enter,r),transitionEnd:t?.enter}}},Rz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=AC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(zl.div,{...m,ref:n,initial:"exit",className:t2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Dde,style:b,...g})})});Rz.displayName="Slide";var zde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ts.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ts.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ts.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},MC={initial:"initial",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(zl.div,{ref:n,className:t2("chakra-offset-slide",a),custom:w,...MC,animate:b,...m})})});Bde.displayName="SlideFade";var n2=(...e)=>e.filter(Boolean).join(" ");function Fde(){return!1}var Sb=e=>{const{condition:t,message:n}=e;t&&Fde()&&console.warn(n)};function tw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[$de,xb]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Hde,A8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Wde,pTe,Vde,Ude]=nD(),Hf=ke(function(t,n){const{getButtonProps:r}=A8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...xb().button};return ae.createElement(Se.button,{...i,className:n2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Gde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;qde(e),Kde(e);const s=Vde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=ub({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[jde,M8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=M8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Xde(e);const{register:m,index:v,descendants:b}=Ude({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Zde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=b.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=b.prevEnabled(v);j?.node.focus()},Home:()=>{const j=b.firstEnabled();j?.node.focus()},End:()=>{const j=b.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Hn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:tw(V.onClick,T),onFocus:tw(V.onFocus,O),onKeyDown:tw(V.onKeyDown,M)}},[h,t,w,T,O,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function qde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;Sb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Kde(e){Sb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Xde(e){Sb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function Zde(e){Sb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=A8(),{reduceMotion:r}=M8(),i=n2("chakra-accordion__icon",e.className),o=xb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=ke(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yde(t),l={...xb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(Hde,{value:u},ae.createElement(Se.div,{ref:n,...o,className:n2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=ke(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=M8(),{getPanelProps:s,isOpen:l}=A8(),u=s(o,n),h=n2("chakra-accordion__panel",r),g=xb();a||delete u.hidden;const m=ae.createElement(Se.div,{...u,__css:g.panel,className:h});return a?m:x(Mz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var wb=ke(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Gde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Wde,{value:l},ae.createElement(jde,{value:h},ae.createElement($de,{value:o},ae.createElement(Se.div,{ref:i,...s,className:n2("chakra-accordion",r.className),__css:o.root},t))))});wb.displayName="Accordion";var Qde=(...e)=>e.filter(Boolean).join(" "),Jde=bd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),r2=ke((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Qde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Jde} ${o} linear infinite`,...n};return ae.createElement(Se.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(Se.span,{srOnly:!0},r))});r2.displayName="Spinner";var Cb=(...e)=>e.filter(Boolean).join(" ");function efe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function tfe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function WL(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[nfe,rfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ife,I8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Nz={info:{icon:tfe,colorScheme:"blue"},warning:{icon:WL,colorScheme:"orange"},success:{icon:efe,colorScheme:"green"},error:{icon:WL,colorScheme:"red"},loading:{icon:r2,colorScheme:"blue"}};function ofe(e){return Nz[e].colorScheme}function afe(e){return Nz[e].icon}var Dz=ke(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??ofe(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(nfe,{value:{status:r}},ae.createElement(ife,{value:s},ae.createElement(Se.div,{role:i?"alert":void 0,ref:n,...o,className:Cb("chakra-alert",t.className),__css:l})))});Dz.displayName="Alert";var zz=ke(function(t,n){const i={display:"inline",...I8().description};return ae.createElement(Se.div,{ref:n,...t,className:Cb("chakra-alert__desc",t.className),__css:i})});zz.displayName="AlertDescription";function Bz(e){const{status:t}=rfe(),n=afe(t),r=I8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(Se.span,{display:"inherit",...e,className:Cb("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Bz.displayName="AlertIcon";var Fz=ke(function(t,n){const r=I8();return ae.createElement(Se.div,{ref:n,...t,className:Cb("chakra-alert__title",t.className),__css:r.title})});Fz.displayName="AlertTitle";function sfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function lfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return ks(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ufe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",Q5=ke(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});Q5.displayName="NativeImage";var _b=ke(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=lfe({...t,ignoreFallback:E}),k=ufe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:sfe(b,["onError","onLoad"])};return k?i||ae.createElement(Se.img,{as:Q5,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(Se.img,{as:Q5,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});_b.displayName="Image";ke((e,t)=>ae.createElement(Se.img,{ref:t,as:Q5,className:"chakra-image",...e}));function kb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var Eb=(...e)=>e.filter(Boolean).join(" "),VL=e=>e?"":void 0,[cfe,dfe]=_n({strict:!1,name:"ButtonGroupContext"});function IC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Eb("chakra-button__icon",n);return ae.createElement(Se.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}IC.displayName="ButtonIcon";function OC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(r2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=Eb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(Se.div,{className:l,...s,__css:h},i)}OC.displayName="ButtonSpinner";function ffe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=ke((e,t)=>{const n=dfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=vn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=ffe(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(Se.button,{disabled:i||o,ref:Rae(t,T),as:E,type:m??M,"data-active":VL(a),"data-loading":VL(o),__css:k,className:Eb("chakra-button",w),...P},o&&b==="start"&&x(OC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(Se.span,{opacity:0},x(UL,{...O})):x(UL,{...O}),o&&b==="end"&&x(OC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function UL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Wn,{children:[t&&x(IC,{marginEnd:i,children:t}),r,n&&x(IC,{marginStart:i,children:n})]})}var ia=ke(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=Eb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(cfe,{value:m},ae.createElement(Se.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=ke((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var f1=(...e)=>e.filter(Boolean).join(" "),$y=e=>e?"":void 0,nw=e=>e?!0:void 0;function GL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hfe,$z]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[pfe,h1]=_n({strict:!1,name:"FormControlContext"});function gfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Hn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":$y(E),"data-disabled":$y(i),"data-invalid":$y(r),"data-readonly":$y(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Hn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:R}}var xd=ke(function(t,n){const r=Oi("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=gfe(i),l=f1("chakra-form-control",t.className);return ae.createElement(pfe,{value:s},ae.createElement(hfe,{value:r},ae.createElement(Se.div,{...o({},n),className:l,__css:r.container})))});xd.displayName="FormControl";var mfe=ke(function(t,n){const r=h1(),i=$z(),o=f1("chakra-form__helper-text",t.className);return ae.createElement(Se.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});mfe.displayName="FormHelperText";function O8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=R8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":nw(n),"aria-required":nw(i),"aria-readonly":nw(r)}}function R8(e){const t=h1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:GL(t?.onFocus,h),onBlur:GL(t?.onBlur,g)}}var[vfe,yfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),bfe=ke((e,t)=>{const n=Oi("FormError",e),r=vn(e),i=h1();return i?.isInvalid?ae.createElement(vfe,{value:n},ae.createElement(Se.div,{...i?.getErrorMessageProps(r,t),className:f1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});bfe.displayName="FormErrorMessage";var Sfe=ke((e,t)=>{const n=yfe(),r=h1();if(!r?.isInvalid)return null;const i=f1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Sfe.displayName="FormErrorIcon";var mh=ke(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Hz,{}),optionalIndicator:l=null,...u}=i,h=h1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(Se.label,{...g,className:f1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Hz=ke(function(t,n){const r=h1(),i=$z();if(!r?.isRequired)return null;const o=f1("chakra-form__required-indicator",t.className);return ae.createElement(Se.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Hz.displayName="RequiredIndicator";function ud(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var N8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},xfe=Se("span",{baseStyle:N8});xfe.displayName="VisuallyHidden";var wfe=Se("input",{baseStyle:N8});wfe.displayName="VisuallyHiddenInput";var jL=!1,Pb=null,G0=!1,RC=new Set,Cfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function _fe(e){return!(e.metaKey||!Cfe&&e.altKey||e.ctrlKey)}function D8(e,t){RC.forEach(n=>n(e,t))}function YL(e){G0=!0,_fe(e)&&(Pb="keyboard",D8("keyboard",e))}function Ep(e){Pb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(G0=!0,D8("pointer",e))}function kfe(e){e.target===window||e.target===document||(G0||(Pb="keyboard",D8("keyboard",e)),G0=!1)}function Efe(){G0=!1}function qL(){return Pb!=="pointer"}function Pfe(){if(typeof window>"u"||jL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){G0=!0,e.apply(this,n)},document.addEventListener("keydown",YL,!0),document.addEventListener("keyup",YL,!0),window.addEventListener("focus",kfe,!0),window.addEventListener("blur",Efe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Ep,!0),document.addEventListener("pointermove",Ep,!0),document.addEventListener("pointerup",Ep,!0)):(document.addEventListener("mousedown",Ep,!0),document.addEventListener("mousemove",Ep,!0),document.addEventListener("mouseup",Ep,!0)),jL=!0}function Tfe(e){Pfe(),e(qL());const t=()=>e(qL());return RC.add(t),()=>{RC.delete(t)}}var[gTe,Lfe]=_n({name:"CheckboxGroupContext",strict:!1}),Afe=(...e)=>e.filter(Boolean).join(" "),Zi=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Mfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ife(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Ofe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Rfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Ofe:Ife;return n||t?ae.createElement(Se.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Wz(e={}){const t=R8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...O}=e,R=Nfe(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Tfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Me]=C.exports.useState(!!h),xe=g!==void 0,be=xe?g:me,Ie=C.exports.useCallback(Ee=>{if(r||n){Ee.preventDefault();return}xe||Me(be?Ee.target.checked:b?!0:Ee.target.checked),N?.(Ee)},[r,n,be,xe,b,N]);ks(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),ud(()=>{n&&W(!1)},[n,W]),ks(()=>{const Ee=G.current;!Ee?.form||(Ee.form.onreset=()=>{Me(!!h)})},[]);const We=n&&!m,De=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!0)},[K]),Qe=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!1)},[K]);ks(()=>{if(!G.current)return;G.current.checked!==be&&Me(G.current.checked)},[G.current]);const st=C.exports.useCallback((Ee={},Je=null)=>{const Lt=it=>{ue&&it.preventDefault(),K(!0)};return{...Ee,ref:Je,"data-active":Zi(J),"data-hover":Zi(Q),"data-checked":Zi(be),"data-focus":Zi(ue),"data-focus-visible":Zi(ue&&$),"data-indeterminate":Zi(b),"data-disabled":Zi(n),"data-invalid":Zi(o),"data-readonly":Zi(r),"aria-hidden":!0,onMouseDown:Ta(Ee.onMouseDown,Lt),onMouseUp:Ta(Ee.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Ee.onMouseEnter,()=>ne(!0)),onMouseLeave:Ta(Ee.onMouseLeave,()=>ne(!1))}},[J,be,n,ue,$,Q,b,o,r]),Ct=C.exports.useCallback((Ee={},Je=null)=>({...R,...Ee,ref:Hn(Je,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:Ta(Ee.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[R,n,be,o,X]),ft=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Hn(G,Je),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ta(Ee.onChange,Ie),onBlur:Ta(Ee.onBlur,z,()=>W(!1)),onFocus:Ta(Ee.onFocus,V,()=>W(!0)),onKeyDown:Ta(Ee.onKeyDown,De),onKeyUp:Ta(Ee.onKeyUp,Qe),required:i,checked:be,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:N8}),[w,E,a,Ie,z,V,De,Qe,i,be,We,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Je,onMouseDown:Ta(Ee.onMouseDown,KL),onTouchStart:Ta(Ee.onTouchStart,KL),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:ue,isChecked:be,isActive:J,isHovered:Q,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ct,getCheckboxProps:st,getInputProps:ft,getLabelProps:ut,htmlProps:R}}function KL(e){e.preventDefault(),e.stopPropagation()}var Dfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},zfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Bfe=bd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ffe=bd({from:{opacity:0},to:{opacity:1}}),$fe=bd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Vz=ke(function(t,n){const r=Lfe(),i={...r,...t},o=Oi("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Rfe,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Mfe(r.onChange,w));const{state:M,getInputProps:O,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Wz({...P,isDisabled:b,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ffe} 20ms linear, ${$fe} 200ms linear`:`${Bfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(Se.label,{__css:{...zfe,...o.container},className:Afe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),ae.createElement(Se.span,{__css:{...Dfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&ae.createElement(Se.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Vz.displayName="Checkbox";function Hfe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Tb=ke(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(Se.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Hfe,{width:"1em",height:"1em"}))});Tb.displayName="CloseButton";function Wfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function z8(e,t){let n=Wfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function NC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function J5(e,t,n){return(e-t)*100/(n-t)}function Uz(e,t,n){return(n-t)*e+t}function DC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=NC(n);return z8(r,i)}function _0(e,t,n){return e==null?e:(nr==null?"":rw(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=Gz(Ac(v),o),w=n??b,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=_0(j,a,s)),z8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=rw(r,o,n)??a,E($)},[r,n,o,E,a]),O=C.exports.useCallback($=>{const j=rw($,o,w)??a;E(j)},[w,o,E,a]),R=Ac(v);return{isOutOfRange:R>s||Rx(ob,{styles:jz}),Gfe=()=>x(ob,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${jz} + `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function jfe(e){return"current"in e}var Yz=()=>typeof window<"u";function Yfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var qfe=e=>Yz()&&e.test(navigator.vendor),Kfe=e=>Yz()&&e.test(Yfe()),Xfe=()=>Kfe(/mac|iphone|ipad|ipod/i),Zfe=()=>Xfe()&&qfe(/apple/i);function Qfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!Zfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=jfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Jfe=HJ?C.exports.useLayoutEffect:C.exports.useEffect;function XL(e,t=[]){const n=C.exports.useRef(e);return Jfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ehe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function the(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Av(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=XL(n),a=XL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ehe(r,s),g=the(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:WJ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function B8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var F8=ke(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=vn(i),s=O8(a),l=Nr("chakra-input",t.className);return ae.createElement(Se.input,{size:r,...s,__css:o.field,ref:n,className:l})});F8.displayName="Input";F8.id="Input";var[nhe,qz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),rhe=ke(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=kb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=B8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(Se.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(nhe,{value:r,children:g}))});rhe.displayName="InputGroup";var ihe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},ohe=Se("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),$8=ke(function(t,n){const{placement:r="left",...i}=t,o=ihe[r]??{},a=qz();return x(ohe,{ref:n,...i,__css:{...a.addon,...o}})});$8.displayName="InputAddon";var Kz=ke(function(t,n){return x($8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});Kz.displayName="InputLeftAddon";Kz.id="InputLeftAddon";var Xz=ke(function(t,n){return x($8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});Xz.displayName="InputRightAddon";Xz.id="InputRightAddon";var ahe=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Lb=ke(function(t,n){const{placement:r="left",...i}=t,o=qz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(ahe,{ref:n,__css:l,...i})});Lb.id="InputElement";Lb.displayName="InputElement";var Zz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(Lb,{ref:n,placement:"left",className:o,...i})});Zz.id="InputLeftElement";Zz.displayName="InputLeftElement";var Qz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(Lb,{ref:n,placement:"right",className:o,...i})});Qz.id="InputRightElement";Qz.displayName="InputRightElement";function she(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function cd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):she(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var lhe=ke(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(Se.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:cd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});lhe.displayName="AspectRatio";var uhe=ke(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return ae.createElement(Se.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});uhe.displayName="Badge";var Bl=Se("div");Bl.displayName="Box";var Jz=ke(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Bl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Jz.displayName="Square";var che=ke(function(t,n){const{size:r,...i}=t;return x(Jz,{size:r,ref:n,borderRadius:"9999px",...i})});che.displayName="Circle";var eB=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});eB.displayName="Center";var dhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ke(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(Se.div,{ref:n,__css:dhe[r],...i,position:"absolute"})});var fhe=ke(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return ae.createElement(Se.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});fhe.displayName="Code";var hhe=ke(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});hhe.displayName="Container";var phe=ke(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(Se.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});phe.displayName="Divider";var en=ke(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(Se.div,{ref:n,__css:g,...h})});en.displayName="Flex";var tB=ke(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(Se.div,{ref:n,__css:w,...b})});tB.displayName="Grid";function ZL(e){return cd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ghe=ke(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=B8({gridArea:r,gridColumn:ZL(i),gridRow:ZL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(Se.div,{ref:n,__css:g,...h})});ghe.displayName="GridItem";var Qf=ke(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return ae.createElement(Se.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";ke(function(t,n){const r=so("Mark",t),i=vn(t);return x(Bl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var mhe=ke(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return ae.createElement(Se.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});mhe.displayName="Kbd";var Jf=ke(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return ae.createElement(Se.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";ke(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(Se.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[vhe,nB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),H8=ke(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=kb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(vhe,{value:r},ae.createElement(Se.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});H8.displayName="List";var yhe=ke((e,t)=>{const{as:n,...r}=e;return x(H8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});yhe.displayName="OrderedList";var bhe=ke(function(t,n){const{as:r,...i}=t;return x(H8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});bhe.displayName="UnorderedList";var She=ke(function(t,n){const r=nB();return ae.createElement(Se.li,{ref:n,...t,__css:r.item})});She.displayName="ListItem";var xhe=ke(function(t,n){const r=nB();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});xhe.displayName="ListIcon";var whe=ke(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=s1(),h=s?_he(s,u):khe(r);return x(tB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});whe.displayName="SimpleGrid";function Che(e){return typeof e=="number"?`${e}px`:e}function _he(e,t){return cd(e,n=>{const r=Cae("sizes",n,Che(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function khe(e){return cd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var rB=Se("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});rB.displayName="Spacer";var zC="& > *:not(style) ~ *:not(style)";function Ehe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[zC]:cd(n,i=>r[i])}}function Phe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":cd(n,i=>r[i])}}var iB=e=>ae.createElement(Se.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});iB.displayName="StackItem";var W8=ke((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Ehe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Phe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=kb(l);return P?M:M.map((O,R)=>{const N=typeof O.key<"u"?O.key:R,z=R+1===M.length,$=g?x(iB,{children:O},N):O;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),ue=z?null:j;return ee(C.exports.Fragment,{children:[$,ue]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(Se.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[zC]:b[zC]},...m},k)});W8.displayName="Stack";var oB=ke((e,t)=>x(W8,{align:"center",...e,direction:"row",ref:t}));oB.displayName="HStack";var aB=ke((e,t)=>x(W8,{align:"center",...e,direction:"column",ref:t}));aB.displayName="VStack";var Po=ke(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=B8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(Se.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function QL(e){return typeof e=="number"?`${e}px`:e}var The=ke(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>cd(w,k=>QL(j6("space",k)(P))),"--chakra-wrap-y-spacing":P=>cd(E,k=>QL(j6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(sB,{children:w},E)):a,[a,g]);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(Se.ul,{className:"chakra-wrap__list",__css:v},b))});The.displayName="Wrap";var sB=ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});sB.displayName="WrapItem";var Lhe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},lB=Lhe,Pp=()=>{},Ahe={document:lB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Pp,removeEventListener:Pp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Pp,removeListener:Pp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Pp,setInterval:()=>0,clearInterval:Pp},Mhe=Ahe,Ihe={window:Mhe,document:lB},uB=typeof window<"u"?{window,document}:Ihe,cB=C.exports.createContext(uB);cB.displayName="EnvironmentContext";function dB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:uB},[r,n]);return ee(cB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}dB.displayName="EnvironmentProvider";var Ohe=e=>e?"":void 0;function Rhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function iw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Nhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Rhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&iw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),ue=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Hn(t,M);return w?{...b,ref:J,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:J,role:"button","data-active":Ohe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:N,onMouseDown:ue,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function fB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function hB(e){if(!fB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Dhe(e){var t;return((t=pB(e))==null?void 0:t.defaultView)??window}function pB(e){return fB(e)?e.ownerDocument:document}function zhe(e){return pB(e).activeElement}var gB=e=>e.hasAttribute("tabindex"),Bhe=e=>gB(e)&&e.tabIndex===-1;function Fhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function mB(e){return e.parentElement&&mB(e.parentElement)?!0:e.hidden}function $he(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function vB(e){if(!hB(e)||mB(e)||Fhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():$he(e)?!0:gB(e)}function Hhe(e){return e?hB(e)&&vB(e)&&!Bhe(e):!1}var Whe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Vhe=Whe.join(),Uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function yB(e){const t=Array.from(e.querySelectorAll(Vhe));return t.unshift(e),t.filter(n=>vB(n)&&Uhe(n))}function Ghe(e){const t=e.current;if(!t)return!1;const n=zhe(t);return!n||t.contains(n)?!1:!!Hhe(n)}function jhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ud(()=>{if(!o||Ghe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Yhe={preventScroll:!0,shouldFocus:!1};function qhe(e,t=Yhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Khe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);ks(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=yB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ud(()=>{h()},[h]),Zf(a,"transitionend",h)}function Khe(e){return"current"in e}var Oo="top",Ua="bottom",Ga="right",Ro="left",V8="auto",i2=[Oo,Ua,Ga,Ro],j0="start",Mv="end",Xhe="clippingParents",bB="viewport",Ug="popper",Zhe="reference",JL=i2.reduce(function(e,t){return e.concat([t+"-"+j0,t+"-"+Mv])},[]),SB=[].concat(i2,[V8]).reduce(function(e,t){return e.concat([t,t+"-"+j0,t+"-"+Mv])},[]),Qhe="beforeRead",Jhe="read",epe="afterRead",tpe="beforeMain",npe="main",rpe="afterMain",ipe="beforeWrite",ope="write",ape="afterWrite",spe=[Qhe,Jhe,epe,tpe,npe,rpe,ipe,ope,ape];function Il(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Ba(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function U8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ba(o)||!Il(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function upe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Ba(i)||!Il(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const cpe={name:"applyStyles",enabled:!0,phase:"write",fn:lpe,effect:upe,requires:["computeStyles"]};function Pl(e){return e.split("-")[0]}var eh=Math.max,e4=Math.min,Y0=Math.round;function BC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function xB(){return!/^((?!chrome|android).)*safari/i.test(BC())}function q0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ba(e)&&(i=e.offsetWidth>0&&Y0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Y0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!xB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function G8(e){var t=q0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function wB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&U8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ku(e){return Ya(e).getComputedStyle(e)}function dpe(e){return["table","td","th"].indexOf(Il(e))>=0}function wd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ab(e){return Il(e)==="html"?e:e.assignedSlot||e.parentNode||(U8(e)?e.host:null)||wd(e)}function eA(e){return!Ba(e)||ku(e).position==="fixed"?null:e.offsetParent}function fpe(e){var t=/firefox/i.test(BC()),n=/Trident/i.test(BC());if(n&&Ba(e)){var r=ku(e);if(r.position==="fixed")return null}var i=Ab(e);for(U8(i)&&(i=i.host);Ba(i)&&["html","body"].indexOf(Il(i))<0;){var o=ku(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function o2(e){for(var t=Ya(e),n=eA(e);n&&dpe(n)&&ku(n).position==="static";)n=eA(n);return n&&(Il(n)==="html"||Il(n)==="body"&&ku(n).position==="static")?t:n||fpe(e)||t}function j8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Um(e,t,n){return eh(e,e4(t,n))}function hpe(e,t,n){var r=Um(e,t,n);return r>n?n:r}function CB(){return{top:0,right:0,bottom:0,left:0}}function _B(e){return Object.assign({},CB(),e)}function kB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ppe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,_B(typeof t!="number"?t:kB(t,i2))};function gpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Pl(n.placement),l=j8(s),u=[Ro,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ppe(i.padding,n),m=G8(o),v=l==="y"?Oo:Ro,b=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=o2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+T,N=Um(M,R,O),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function mpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!wB(t.elements.popper,i)||(t.elements.arrow=i))}const vpe={name:"arrow",enabled:!0,phase:"main",fn:gpe,effect:mpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K0(e){return e.split("-")[1]}var ype={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bpe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Y0(t*i)/i||0,y:Y0(n*i)/i||0}}function tA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Ro,M=Oo,O=window;if(u){var R=o2(n),N="clientHeight",z="clientWidth";if(R===Ya(n)&&(R=wd(n),ku(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Oo||(i===Ro||i===Ga)&&o===Mv){M=Ua;var V=g&&R===O&&O.visualViewport?O.visualViewport.height:R[N];w-=V-r.height,w*=l?1:-1}if(i===Ro||(i===Oo||i===Ua)&&o===Mv){T=Ga;var $=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&ype),ue=h===!0?bpe({x:v,y:w}):{x:v,y:w};if(v=ue.x,w=ue.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Spe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Pl(t.placement),variation:K0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const xpe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Spe,data:{}};var Hy={passive:!0};function wpe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Hy)}),s&&l.addEventListener("resize",n.update,Hy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Hy)}),s&&l.removeEventListener("resize",n.update,Hy)}}const Cpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wpe,data:{}};var _pe={left:"right",right:"left",bottom:"top",top:"bottom"};function V3(e){return e.replace(/left|right|bottom|top/g,function(t){return _pe[t]})}var kpe={start:"end",end:"start"};function nA(e){return e.replace(/start|end/g,function(t){return kpe[t]})}function Y8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function q8(e){return q0(wd(e)).left+Y8(e).scrollLeft}function Epe(e,t){var n=Ya(e),r=wd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=xB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+q8(e),y:l}}function Ppe(e){var t,n=wd(e),r=Y8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+q8(e),l=-r.scrollTop;return ku(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function K8(e){var t=ku(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function EB(e){return["html","body","#document"].indexOf(Il(e))>=0?e.ownerDocument.body:Ba(e)&&K8(e)?e:EB(Ab(e))}function Gm(e,t){var n;t===void 0&&(t=[]);var r=EB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],K8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Gm(Ab(a)))}function FC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Tpe(e,t){var n=q0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rA(e,t,n){return t===bB?FC(Epe(e,n)):sh(t)?Tpe(t,n):FC(Ppe(wd(e)))}function Lpe(e){var t=Gm(Ab(e)),n=["absolute","fixed"].indexOf(ku(e).position)>=0,r=n&&Ba(e)?o2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&wB(i,r)&&Il(i)!=="body"}):[]}function Ape(e,t,n,r){var i=t==="clippingParents"?Lpe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=rA(e,u,r);return l.top=eh(h.top,l.top),l.right=e4(h.right,l.right),l.bottom=e4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},rA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function PB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Pl(r):null,o=r?K0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Oo:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Ro:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?j8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case j0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Mv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Iv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xhe:s,u=n.rootBoundary,h=u===void 0?bB:u,g=n.elementContext,m=g===void 0?Ug:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=_B(typeof E!="number"?E:kB(E,i2)),k=m===Ug?Zhe:Ug,T=e.rects.popper,M=e.elements[b?k:m],O=Ape(sh(M)?M:M.contextElement||wd(e.elements.popper),l,h,a),R=q0(e.elements.reference),N=PB({reference:R,element:T,strategy:"absolute",placement:i}),z=FC(Object.assign({},T,N)),V=m===Ug?z:R,$={top:O.top-V.top+P.top,bottom:V.bottom-O.bottom+P.bottom,left:O.left-V.left+P.left,right:V.right-O.right+P.right},j=e.modifiersData.offset;if(m===Ug&&j){var ue=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Oo,Ua].indexOf(W)>=0?"y":"x";$[W]+=ue[ne]*Q})}return $}function Mpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?SB:l,h=K0(r),g=h?s?JL:JL.filter(function(b){return K0(b)===h}):i2,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=Iv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Pl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ipe(e){if(Pl(e)===V8)return[];var t=V3(e);return[nA(e),t,nA(t)]}function Ope(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Pl(E),k=P===E,T=l||(k||!b?[V3(E)]:Ipe(E)),M=[E].concat(T).reduce(function(be,Ie){return be.concat(Pl(Ie)===V8?Mpe(t,{placement:Ie,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):Ie)},[]),O=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Iv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Ro:W?Ua:Oo;O[ne]>R[ne]&&(K=V3(K));var G=V3(K),X=[];if(o&&X.push(J[ue]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(be){return be})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=b?3:1,me=function(Ie){var We=M.find(function(De){var Qe=N.get(De);if(Qe)return Qe.slice(0,Ie).every(function(st){return st})});if(We)return V=We,"break"},Me=ce;Me>0;Me--){var xe=me(Me);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Rpe={name:"flip",enabled:!0,phase:"main",fn:Ope,requiresIfExists:["offset"],data:{_skip:!1}};function iA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function oA(e){return[Oo,Ga,Ua,Ro].some(function(t){return e[t]>=0})}function Npe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Iv(t,{elementContext:"reference"}),s=Iv(t,{altBoundary:!0}),l=iA(a,r),u=iA(s,i,o),h=oA(l),g=oA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Dpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Npe};function zpe(e,t,n){var r=Pl(e),i=[Ro,Oo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ro,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Bpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=SB.reduce(function(h,g){return h[g]=zpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Fpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bpe};function $pe(e){var t=e.state,n=e.name;t.modifiersData[n]=PB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Hpe={name:"popperOffsets",enabled:!0,phase:"read",fn:$pe,data:{}};function Wpe(e){return e==="x"?"y":"x"}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=Iv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Pl(t.placement),k=K0(t.placement),T=!k,M=j8(P),O=Wpe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ue={x:0,y:0};if(!!R){if(o){var W,Q=M==="y"?Oo:Ro,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=R[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===j0?N[J]:z[J],Me=k===j0?-z[J]:-N[J],xe=t.elements.arrow,be=v&&xe?G8(xe):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:CB(),We=Ie[Q],De=Ie[ne],Qe=Um(0,N[J],be[J]),st=T?N[J]/2-ce-Qe-We-$.mainAxis:me-Qe-We-$.mainAxis,Ct=T?-N[J]/2+ce+Qe+De+$.mainAxis:Me+Qe+De+$.mainAxis,ft=t.elements.arrow&&o2(t.elements.arrow),ut=ft?M==="y"?ft.clientTop||0:ft.clientLeft||0:0,vt=(W=j?.[M])!=null?W:0,Ee=K+st-vt-ut,Je=K+Ct-vt,Lt=Um(v?e4(G,Ee):G,K,v?eh(X,Je):X);R[M]=Lt,ue[M]=Lt-K}if(s){var it,pt=M==="x"?Oo:Ro,an=M==="x"?Ua:Ga,_t=R[O],Ut=O==="y"?"height":"width",sn=_t+E[pt],yn=_t-E[an],Oe=[Oo,Ro].indexOf(P)!==-1,Xe=(it=j?.[O])!=null?it:0,Xt=Oe?sn:_t-N[Ut]-z[Ut]-Xe+$.altAxis,Yt=Oe?_t+N[Ut]+z[Ut]-Xe-$.altAxis:yn,_e=v&&Oe?hpe(Xt,_t,Yt):Um(v?Xt:sn,_t,v?Yt:yn);R[O]=_e,ue[O]=_e-_t}t.modifiersData[r]=ue}}const Upe={name:"preventOverflow",enabled:!0,phase:"main",fn:Vpe,requiresIfExists:["offset"]};function Gpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jpe(e){return e===Ya(e)||!Ba(e)?Y8(e):Gpe(e)}function Ype(e){var t=e.getBoundingClientRect(),n=Y0(t.width)/e.offsetWidth||1,r=Y0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qpe(e,t,n){n===void 0&&(n=!1);var r=Ba(t),i=Ba(t)&&Ype(t),o=wd(t),a=q0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Il(t)!=="body"||K8(o))&&(s=jpe(t)),Ba(t)?(l=q0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=q8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Kpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xpe(e){var t=Kpe(e);return spe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Zpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qpe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var aA={placement:"bottom",modifiers:[],strategy:"absolute"};function sA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Tp("--popper-arrow-shadow-color"),arrowSize:Tp("--popper-arrow-size","8px"),arrowSizeHalf:Tp("--popper-arrow-size-half"),arrowBg:Tp("--popper-arrow-bg"),transformOrigin:Tp("--popper-transform-origin"),arrowOffset:Tp("--popper-arrow-offset")};function n0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var r0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},i0e=e=>r0e[e],lA={scroll:!0,resize:!0};function o0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...lA,...e}}:t={enabled:e,options:lA},t}var a0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},s0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{uA(e)},effect:({state:e})=>()=>{uA(e)}},uA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,i0e(e.placement))},l0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{u0e(e)}},u0e=e=>{var t;if(!e.placement)return;const n=c0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},c0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},d0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{cA(e)},effect:({state:e})=>()=>{cA(e)}},cA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:n0e(e.placement)})},f0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},h0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function p0e(e,t="ltr"){var n;const r=((n=f0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:h0e[e]??r}function TB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=p0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!b.current||!w.current||(($=k.current)==null||$.call(k),E.current=t0e(b.current,w.current,{placement:P,modifiers:[d0e,l0e,s0e,{...a0e,enabled:!!m},{name:"eventListeners",...o0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!b.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{b.current=$,T()},[T]),O=C.exports.useCallback(($={},j=null)=>({...$,ref:Hn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Hn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:ue,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:g0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:O}}function g0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function LB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function m0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Dhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function AB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[v0e,y0e]=_n({strict:!1,name:"PortalManagerContext"});function MB(e){const{children:t,zIndex:n}=e;return x(v0e,{value:{zIndex:n},children:t})}MB.displayName="PortalManager";var[IB,b0e]=_n({strict:!1,name:"PortalContext"}),X8="chakra-portal",S0e=".chakra-portal",x0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),w0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=b0e(),l=y0e();ks(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=X8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(x0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Dl.exports.createPortal(x(IB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},C0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=X8),l},[i]),[,s]=C.exports.useState({});return ks(()=>s({}),[]),ks(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Dl.exports.createPortal(x(IB,{value:r?a:null,children:t}),a):null};function vh(e){const{containerRef:t,...n}=e;return t?x(C0e,{containerRef:t,...n}):x(w0e,{...n})}vh.defaultProps={appendToParentPortal:!0};vh.className=X8;vh.selector=S0e;vh.displayName="Portal";var _0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lp=new WeakMap,Wy=new WeakMap,Vy={},ow=0,OB=function(e){return e&&(e.host||OB(e.parentNode))},k0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=OB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},E0e=function(e,t,n,r){var i=k0e(t,Array.isArray(e)?e:[e]);Vy[n]||(Vy[n]=new WeakMap);var o=Vy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Lp.get(m)||0)+1,E=(o.get(m)||0)+1;Lp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&Wy.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),ow++,function(){a.forEach(function(g){var m=Lp.get(g)-1,v=o.get(g)-1;Lp.set(g,m),o.set(g,v),m||(Wy.has(g)||g.removeAttribute(r),Wy.delete(g)),v||g.removeAttribute(n)}),ow--,ow||(Lp=new WeakMap,Lp=new WeakMap,Wy=new WeakMap,Vy={})}},RB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||_0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),E0e(r,i,n,"aria-hidden")):function(){return null}};function Z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},P0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T0e=P0e,L0e=T0e;function NB(){}function DB(){}DB.resetWarningCache=NB;var A0e=function(){function e(r,i,o,a,s,l){if(l!==L0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:DB,resetWarningCache:NB};return n.PropTypes=n,n};On.exports=A0e();var $C="data-focus-lock",zB="data-focus-lock-disabled",M0e="data-no-focus-lock",I0e="data-autofocus-inside",O0e="data-no-autofocus";function R0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function N0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function BB(e,t){return N0e(t||null,function(n){return e.forEach(function(r){return R0e(r,n)})})}var aw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function FB(e){return e}function $B(e,t){t===void 0&&(t=FB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function Q8(e,t){return t===void 0&&(t=FB),$B(e,t)}function HB(e){e===void 0&&(e={});var t=$B(null);return t.options=vl({async:!0,ssr:!1},e),t}var WB=function(e){var t=e.sideCar,n=Az(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...vl({},n)})};WB.isSideCarExport=!0;function D0e(e,t){return e.useMedium(t),WB}var VB=Q8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),UB=Q8(),z0e=Q8(),B0e=HB({async:!0}),F0e=[],J8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,O=M===void 0?F0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,ue=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(De){var Qe=u.current;if(Qe&&Qe.focus){var st=typeof j=="function"?j(Qe):j;if(st){var Ct=typeof st=="object"?st:void 0;u.current=null,De?Promise.resolve().then(function(){return Qe.focus(Ct)}):Qe.focus(Ct)}}},[j]),ce=C.exports.useCallback(function(De){l.current&&VB.useMedium(De)},[]),me=UB.useMedium,Me=C.exports.useCallback(function(De){s.current!==De&&(s.current=De,a(De))},[]),xe=Ln((r={},r[zB]=g&&"disabled",r[$C]=E,r),V),be=m!==!0,Ie=be&&m!=="tail",We=BB([n,Me]);return ee(Wn,{children:[be&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:aw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:B0e,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:ue}),x(N,{ref:We,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Ie&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw})]})});J8.propTypes={};J8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const GB=J8;function HC(e,t){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HC(e,t)}function e_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,HC(e,t)}function jB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){e_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return jB(l,"displayName","SideEffect("+n(i)+")"),l}}var Fl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(q0e)},K0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],n_=K0e.join(","),X0e="".concat(n_,", [data-focus-guard]"),tF=function(e,t){var n;return Fl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?X0e:n_)?[i]:[],tF(i))},[])},r_=function(e,t){return e.reduce(function(n,r){return n.concat(tF(r,t),r.parentNode?Fl(r.parentNode.querySelectorAll(n_)).filter(function(i){return i===r}):[])},[])},Z0e=function(e){var t=e.querySelectorAll("[".concat(I0e,"]"));return Fl(t).map(function(n){return r_([n])}).reduce(function(n,r){return n.concat(r)},[])},i_=function(e,t){return Fl(e).filter(function(n){return KB(t,n)}).filter(function(n){return G0e(n)})},dA=function(e,t){return t===void 0&&(t=new Map),Fl(e).filter(function(n){return XB(t,n)})},VC=function(e,t,n){return eF(i_(r_(e,n),t),!0,n)},fA=function(e,t){return eF(i_(r_(e),t),!1)},Q0e=function(e,t){return i_(Z0e(e),t)},Ov=function(e,t){return e.shadowRoot?Ov(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Fl(e.children).some(function(n){return Ov(n,t)})},J0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},nF=function(e){return e.parentNode?nF(e.parentNode):e},o_=function(e){var t=WC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute($C);return n.push.apply(n,i?J0e(Fl(nF(r).querySelectorAll("[".concat($C,'="').concat(i,'"]:not([').concat(zB,'="disabled"])')))):[r]),n},[])},rF=function(e){return e.activeElement?e.activeElement.shadowRoot?rF(e.activeElement.shadowRoot):e.activeElement:void 0},a_=function(){return document.activeElement?document.activeElement.shadowRoot?rF(document.activeElement.shadowRoot):document.activeElement:void 0},e1e=function(e){return e===document.activeElement},t1e=function(e){return Boolean(Fl(e.querySelectorAll("iframe")).some(function(t){return e1e(t)}))},iF=function(e){var t=document&&a_();return!t||t.dataset&&t.dataset.focusGuard?!1:o_(e).some(function(n){return Ov(n,t)||t1e(n)})},n1e=function(){var e=document&&a_();return e?Fl(document.querySelectorAll("[".concat(M0e,"]"))).some(function(t){return Ov(t,e)}):!1},r1e=function(e,t){return t.filter(JB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},s_=function(e,t){return JB(e)&&e.name?r1e(e,t):e},i1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(s_(n,e))}),e.filter(function(n){return t.has(n)})},hA=function(e){return e[0]&&e.length>1?s_(e[0],e):e[0]},pA=function(e,t){return e.length>1?e.indexOf(s_(e[t],e)):t},oF="NEW_FOCUS",o1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=t_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i1e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=pA(e,0),k=pA(e,i-1);if(l===-1||h===-1)return oF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a1e=function(e){return function(t){var n,r=(n=ZB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=dA(r.filter(a1e(n)));return i&&i.length?hA(i):hA(dA(t))},UC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&UC(e.parentNode.host||e.parentNode,t),t},sw=function(e,t){for(var n=UC(e),r=UC(t),i=0;i=0)return o}return!1},aF=function(e,t,n){var r=WC(e),i=WC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=sw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=sw(o,l);u&&(!a||Ov(u,a)?a=u:a=sw(u,a))})}),a},l1e=function(e,t){return e.reduce(function(n,r){return n.concat(Q0e(r,t))},[])},u1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Y0e)},c1e=function(e,t){var n=document&&a_(),r=o_(e).filter(t4),i=aF(n||e,e,r),o=new Map,a=fA(r,o),s=VC(r,o).filter(function(m){var v=m.node;return t4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=fA([i],o).map(function(m){var v=m.node;return v}),u=u1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o1e(h,l,n,t);return g===oF?{node:s1e(a,h,l1e(r,o))}:g===void 0?g:u[g]}},d1e=function(e){var t=o_(e).filter(t4),n=aF(e,e,t),r=new Map,i=VC([n],r,!0),o=VC(t,r).filter(function(a){var s=a.node;return t4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:t_(s)}})},f1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},lw=0,uw=!1,h1e=function(e,t,n){n===void 0&&(n={});var r=c1e(e,t);if(!uw&&r){if(lw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),uw=!0,setTimeout(function(){uw=!1},1);return}lw++,f1e(r.node,n.focusOptions),lw--}};const sF=h1e;function lF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p1e=function(){return document&&document.activeElement===document.body},g1e=function(){return p1e()||n1e()},k0=null,t0=null,E0=null,Rv=!1,m1e=function(){return!0},v1e=function(t){return(k0.whiteList||m1e)(t)},y1e=function(t,n){E0={observerNode:t,portaledElement:n}},b1e=function(t){return E0&&E0.portaledElement===t};function gA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var S1e=function(t){return t&&"current"in t?t.current:t},x1e=function(t){return t?Boolean(Rv):Rv==="meanwhile"},w1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C1e=function(t,n){return n.some(function(r){return w1e(t,r,r)})},n4=function(){var t=!1;if(k0){var n=k0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||E0&&E0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(S1e).filter(Boolean));if((!h||v1e(h))&&(i||x1e(s)||!g1e()||!t0&&o)&&(u&&!(iF(g)||h&&C1e(h,g)||b1e(h))&&(document&&!t0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=sF(g,t0,{focusOptions:l}),E0={})),Rv=!1,t0=document&&document.activeElement),document){var m=document&&document.activeElement,v=d1e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),gA(b,v.length,1,v),gA(b,-1,-1,v))}}}return t},uF=function(t){n4()&&t&&(t.stopPropagation(),t.preventDefault())},l_=function(){return lF(n4)},_1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y1e(r,n)},k1e=function(){return null},cF=function(){Rv="just",setTimeout(function(){Rv="meanwhile"},0)},E1e=function(){document.addEventListener("focusin",uF),document.addEventListener("focusout",l_),window.addEventListener("blur",cF)},P1e=function(){document.removeEventListener("focusin",uF),document.removeEventListener("focusout",l_),window.removeEventListener("blur",cF)};function T1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function L1e(e){var t=e.slice(-1)[0];t&&!k0&&E1e();var n=k0,r=n&&t&&t.id===n.id;k0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(t0=null,(!r||n.observed!==t.observed)&&t.onActivation(),n4(),lF(n4)):(P1e(),t0=null)}VB.assignSyncMedium(_1e);UB.assignMedium(l_);z0e.assignMedium(function(e){return e({moveFocusInside:sF,focusInside:iF})});const A1e=$0e(T1e,L1e)(k1e);var dF=C.exports.forwardRef(function(t,n){return x(GB,{sideCar:A1e,ref:n,...t})}),fF=GB.propTypes||{};fF.sideCar;Z8(fF,["sideCar"]);dF.propTypes={};const M1e=dF;var hF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&yB(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(M1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};hF.displayName="FocusLock";var U3="right-scroll-bar-position",G3="width-before-scroll-bar",I1e="with-scroll-bars-hidden",O1e="--removed-body-scroll-bar-size",pF=HB(),cw=function(){},Mb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:cw,onWheelCapture:cw,onTouchMoveCapture:cw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Az(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=BB([n,t]),O=vl(vl({},k),i);return ee(Wn,{children:[h&&x(T,{sideCar:pF,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),vl(vl({},O),{ref:M})):x(P,{...vl({},O,{className:l,ref:M}),children:s})]})});Mb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mb.classNames={fullWidth:G3,zeroRight:U3};var R1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R1e();return t&&e.setAttribute("nonce",t),e}function D1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N1e())&&(D1e(t,n),z1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F1e=function(){var e=B1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gF=function(){var e=F1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$1e={left:0,top:0,right:0,gap:0},dw=function(e){return parseInt(e||"",10)||0},H1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[dw(n),dw(r),dw(i)]},W1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $1e;var t=H1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V1e=gF(),U1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(I1e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(U3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(G3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(U3," .").concat(U3,` { + right: 0 `).concat(r,`; + } + + .`).concat(G3," .").concat(G3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(O1e,": ").concat(s,`px; + } +`)},G1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W1e(i)},[i]);return x(V1e,{styles:U1e(o,!t,i,n?"":"!important")})},GC=!1;if(typeof window<"u")try{var Uy=Object.defineProperty({},"passive",{get:function(){return GC=!0,!0}});window.addEventListener("test",Uy,Uy),window.removeEventListener("test",Uy,Uy)}catch{GC=!1}var Ap=GC?{passive:!1}:!1,j1e=function(e){return e.tagName==="TEXTAREA"},mF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!j1e(e)&&n[t]==="visible")},Y1e=function(e){return mF(e,"overflowY")},q1e=function(e){return mF(e,"overflowX")},mA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=vF(e,n);if(r){var i=yF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},K1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},X1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vF=function(e,t){return e==="v"?Y1e(t):q1e(t)},yF=function(e,t){return e==="v"?K1e(t):X1e(t)},Z1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q1e=function(e,t,n,r,i){var o=Z1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=yF(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&vF(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Gy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vA=function(e){return[e.deltaX,e.deltaY]},yA=function(e){return e&&"current"in e?e.current:e},J1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ege=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},tge=0,Mp=[];function nge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(tge++)[0],o=C.exports.useState(function(){return gF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=LC([e.lockRef.current],(e.shards||[]).map(yA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Gy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=mA(N,R);if(!z)return!0;if(z?O=N:(O=N==="v"?"h":"v",z=mA(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=O),!O)return!0;var V=r.current||O;return Q1e(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Mp.length||Mp[Mp.length-1]!==o)){var P="deltaY"in E?vA(E):Gy(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J1e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(yA).filter(Boolean).filter(function(O){return O.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Gy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,vA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Gy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Mp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ap),document.addEventListener("touchmove",l,Ap),document.addEventListener("touchstart",h,Ap),function(){Mp=Mp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Ap),document.removeEventListener("touchmove",l,Ap),document.removeEventListener("touchstart",h,Ap)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Wn,{children:[b?x(o,{styles:ege(i)}):null,v?x(G1e,{gapMode:"margin"}):null]})}const rge=D0e(pF,nge);var bF=C.exports.forwardRef(function(e,t){return x(Mb,{...vl({},e,{ref:t,sideCar:rge})})});bF.classNames=Mb.classNames;const SF=bF;var yh=(...e)=>e.filter(Boolean).join(" ");function um(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var ige=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},jC=new ige;function oge(e,t){C.exports.useEffect(()=>(t&&jC.add(e),()=>{jC.remove(e)}),[t,e])}function age(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=lge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");sge(u,t&&a),oge(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),O=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Hn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:um(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!jC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Hn(V,h),onClick:um(z.onClick,R),onKeyDown:um(z.onKeyDown,E),onMouseDown:um(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:N}}function sge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return RB(e.current)},[t,e,n])}function lge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[uge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[cge,dd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),X0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Oi("Modal",e),E={...age(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(cge,{value:E,children:x(uge,{value:b,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(vh,{...t,children:n})})})})};X0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};X0.displayName="Modal";var Nv=ke((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=dd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=yh("chakra-modal__body",n),s=bh();return ae.createElement(Se.div,{ref:t,className:a,id:i,...r,__css:s.body})});Nv.displayName="ModalBody";var u_=ke((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=dd(),a=yh("chakra-modal__close-btn",r),s=bh();return x(Tb,{ref:t,__css:s.closeButton,className:a,onClick:um(n,l=>{l.stopPropagation(),o()}),...i})});u_.displayName="ModalCloseButton";function xF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=dd(),[g,m]=w8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(hF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(SF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var dge={slideInBottom:{...MC,custom:{offsetY:16,reverse:!0}},slideInRight:{...MC,custom:{offsetX:16,reverse:!0}},scale:{...Oz,custom:{initialScale:.95,reverse:!0}},none:{}},fge=Se(zl.section),hge=e=>dge[e||"none"],wF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=hge(n),...i}=e;return x(fge,{ref:t,...r,...i})});wF.displayName="ModalTransition";var Dv=ke((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=dd(),u=s(a,t),h=l(i),g=yh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=dd();return ae.createElement(xF,null,ae.createElement(Se.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(wF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Dv.displayName="ModalContent";var Ib=ke((e,t)=>{const{className:n,...r}=e,i=yh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(Se.footer,{ref:t,...r,__css:a,className:i})});Ib.displayName="ModalFooter";var Ob=ke((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=dd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=yh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(Se.header,{ref:t,className:a,id:i,...r,__css:l})});Ob.displayName="ModalHeader";var pge=Se(zl.div),Z0=ke((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=yh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=dd();return x(pge,{...i||(u==="none"?{}:Iz),__css:l,ref:t,className:a,...o})});Z0.displayName="ModalOverlay";function CF(e){const{leastDestructiveRef:t,...n}=e;return x(X0,{...n,initialFocusRef:t})}var _F=ke((e,t)=>x(Dv,{ref:t,role:"alertdialog",...e})),[mTe,gge]=_n(),mge=Se(Rz),vge=ke((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=dd(),h=s(a,t),g=l(o),m=yh("chakra-modal__content",n),v=bh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=gge();return ae.createElement(xF,null,ae.createElement(Se.div,{...g,className:"chakra-modal__content-container",__css:w},x(mge,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});vge.displayName="DrawerContent";function yge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var kF=(...e)=>e.filter(Boolean).join(" "),fw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var bge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),Sge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function bA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var xge=50,SA=300;function wge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);yge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?xge:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},SA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},SA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Cge=/^[Ee0-9+\-.]$/;function _ge(e){return Cge.test(e)}function kge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Ege(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:O,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...ue}=e,W=dr(O),Q=dr(R),ne=dr(N),J=dr(V??_ge),K=dr(z),G=Vfe(e),{update:X,increment:ce,decrement:me}=G,[Me,xe]=C.exports.useState(!1),be=!(s||l),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useRef(null),st=C.exports.useCallback(_e=>_e.split("").filter(J).join(""),[J]),Ct=C.exports.useCallback(_e=>j?.(_e)??_e,[j]),ft=C.exports.useCallback(_e=>($?.(_e)??_e).toString(),[$]);ud(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Ie.current)return;if(Ie.current.value!=G.value){const It=Ct(Ie.current.value);G.setValue(st(It))}},[Ct,st]);const ut=C.exports.useCallback((_e=a)=>{be&&ce(_e)},[ce,be,a]),vt=C.exports.useCallback((_e=a)=>{be&&me(_e)},[me,be,a]),Ee=wge(ut,vt);bA(De,"disabled",Ee.stop,Ee.isSpinning),bA(Qe,"disabled",Ee.stop,Ee.isSpinning);const Je=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;const ze=Ct(_e.currentTarget.value);X(st(ze)),We.current={start:_e.currentTarget.selectionStart,end:_e.currentTarget.selectionEnd}},[X,st,Ct]),Lt=C.exports.useCallback(_e=>{var It;W?.(_e),We.current&&(_e.target.selectionStart=We.current.start??((It=_e.currentTarget.value)==null?void 0:It.length),_e.currentTarget.selectionEnd=We.current.end??_e.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;kge(_e,J)||_e.preventDefault();const It=pt(_e)*a,ze=_e.key,ln={ArrowUp:()=>ut(It),ArrowDown:()=>vt(It),Home:()=>X(i),End:()=>X(o)}[ze];ln&&(_e.preventDefault(),ln(_e))},[J,a,ut,vt,X,i,o]),pt=_e=>{let It=1;return(_e.metaKey||_e.ctrlKey)&&(It=.1),_e.shiftKey&&(It=10),It},an=C.exports.useMemo(()=>{const _e=K?.(G.value);if(_e!=null)return _e;const It=G.value.toString();return It||void 0},[G.value,K]),_t=C.exports.useCallback(()=>{let _e=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(_e=o),G.cast(_e))},[G,o,i]),Ut=C.exports.useCallback(()=>{xe(!1),n&&_t()},[n,xe,_t]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var _e;(_e=Ie.current)==null||_e.focus()})},[t]),yn=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.up(),sn()},[sn,Ee]),Oe=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.down(),sn()},[sn,Ee]);Zf(()=>Ie.current,"wheel",_e=>{var It;const ot=(((It=Ie.current)==null?void 0:It.ownerDocument)??document).activeElement===Ie.current;if(!v||!ot)return;_e.preventDefault();const ln=pt(_e)*a,zn=Math.sign(_e.deltaY);zn===-1?ut(ln):zn===1&&vt(ln)},{passive:!1});const Xe=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMax;return{..._e,ref:Hn(It,De),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||yn(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMax,r,yn,Ee.stop,l]),Xt=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMin;return{..._e,ref:Hn(It,Qe),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMin,r,Oe,Ee.stop,l]),Yt=C.exports.useCallback((_e={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:b,disabled:l,..._e,readOnly:_e.readOnly??s,"aria-readonly":_e.readOnly??s,"aria-required":_e.required??u,required:_e.required??u,ref:Hn(Ie,It),value:ft(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":fw(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:al(_e.onChange,Je),onKeyDown:al(_e.onKeyDown,it),onFocus:al(_e.onFocus,Lt,()=>xe(!0)),onBlur:al(_e.onBlur,Q,Ut)}),[P,m,g,M,T,ft,k,b,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,Je,it,Lt,Q,Ut]);return{value:ft(G.value),valueAsNumber:G.valueAsNumber,isFocused:Me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Xe,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:ue}}var[Pge,Rb]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Tge,c_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),d_=ke(function(t,n){const r=Oi("NumberInput",t),i=vn(t),o=R8(i),{htmlProps:a,...s}=Ege(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Tge,{value:l},ae.createElement(Pge,{value:r},ae.createElement(Se.div,{...a,ref:n,className:kF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});d_.displayName="NumberInput";var EF=ke(function(t,n){const r=Rb();return ae.createElement(Se.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});EF.displayName="NumberInputStepper";var f_=ke(function(t,n){const{getInputProps:r}=c_(),i=r(t,n),o=Rb();return ae.createElement(Se.input,{...i,className:kF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});f_.displayName="NumberInputField";var PF=Se("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),h_=ke(function(t,n){const r=Rb(),{getDecrementButtonProps:i}=c_(),o=i(t,n);return x(PF,{...o,__css:r.stepper,children:t.children??x(bge,{})})});h_.displayName="NumberDecrementStepper";var p_=ke(function(t,n){const{getIncrementButtonProps:r}=c_(),i=r(t,n),o=Rb();return x(PF,{...i,__css:o.stepper,children:t.children??x(Sge,{})})});p_.displayName="NumberIncrementStepper";var a2=(...e)=>e.filter(Boolean).join(" ");function Lge(e,...t){return Age(e)?e(...t):e}var Age=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Mge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Ige,Sh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Oge,s2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Ip={click:"click",hover:"hover"};function Rge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Ip.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=LB(e),M=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,ue]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(Je=>`${Je}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Me,forceUpdate:xe}=TB({...w,enabled:E||!!b}),be=m0e({isOpen:E,ref:R});Qfe({enabled:E,ref:O}),jhe(R,{focusRef:O,visible:E,shouldFocus:o&&u===Ip.click}),qhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===Ip.click});const Ie=AB({wasSelected:z.current,enabled:m,mode:v,isSelected:be.present}),We=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,style:{...Je.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Hn(R,Lt),children:Ie?Je.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(Je.onKeyDown,pt=>{n&&pt.key==="Escape"&&P()}),onBlur:sl(Je.onBlur,pt=>{const an=xA(pt),_t=hw(R.current,an),Ut=hw(O.current,an);E&&t&&(!_t&&!Ut)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Ip.hover&&(it.role="tooltip",it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(Je.onMouseLeave,pt=>{pt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Ie,J,V,K,j,G,u,n,P,E,t,g,l,s]),De=C.exports.useCallback((Je={},Lt=null)=>me({...Je,style:{visibility:E?"visible":"hidden",...Je.style}},Lt),[E,me]),Qe=C.exports.useCallback((Je,Lt=null)=>({...Je,ref:Hn(Lt,M,X)}),[M,X]),st=C.exports.useRef(),Ct=C.exports.useRef(),ft=C.exports.useCallback(Je=>{M.current==null&&X(Je)},[X]),ut=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,ref:Hn(O,Lt,ft),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Ip.click&&(it.onClick=sl(Je.onClick,T)),u===Ip.hover&&(it.onFocus=sl(Je.onFocus,()=>{st.current===void 0&&k()}),it.onBlur=sl(Je.onBlur,pt=>{const an=xA(pt),_t=!hw(R.current,an);E&&t&&_t&&P()}),it.onKeyDown=sl(Je.onKeyDown,pt=>{pt.key==="Escape"&&P()}),it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0,st.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(Je.onMouseLeave,()=>{N.current=!1,st.current&&(clearTimeout(st.current),st.current=void 0),Ct.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,ft,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{st.current&&clearTimeout(st.current),Ct.current&&clearTimeout(Ct.current)},[]);const vt=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:K,ref:Hn(Lt,it=>{$(!!it)})}),[K]),Ee=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:G,ref:Hn(Lt,it=>{ue(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:be.onComplete,onClose:P,getAnchorProps:Qe,getArrowProps:ce,getArrowInnerProps:Me,getPopoverPositionerProps:De,getPopoverProps:We,getTriggerProps:ut,getHeaderProps:vt,getBodyProps:Ee}}function hw(e,t){return e===t||e?.contains(t)}function xA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function g_(e){const t=Oi("Popover",e),{children:n,...r}=vn(e),i=s1(),o=Rge({...r,direction:i.direction});return x(Ige,{value:o,children:x(Oge,{value:t,children:Lge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}g_.displayName="Popover";function m_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=Sh(),a=s2(),s=t??n??r;return ae.createElement(Se.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(Se.div,{className:a2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}m_.displayName="PopoverArrow";var Nge=ke(function(t,n){const{getBodyProps:r}=Sh(),i=s2();return ae.createElement(Se.div,{...r(t,n),className:a2("chakra-popover__body",t.className),__css:i.body})});Nge.displayName="PopoverBody";var Dge=ke(function(t,n){const{onClose:r}=Sh(),i=s2();return x(Tb,{size:"sm",onClick:r,className:a2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Dge.displayName="PopoverCloseButton";function zge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Bge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Fge=Se(zl.section),TF=ke(function(t,n){const{variants:r=Bge,...i}=t,{isOpen:o}=Sh();return ae.createElement(Fge,{ref:n,variants:zge(r),initial:!1,animate:o?"enter":"exit",...i})});TF.displayName="PopoverTransition";var v_=ke(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=Sh(),u=s2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(Se.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(TF,{...i,...a(o,n),onAnimationComplete:Mge(l,o.onAnimationComplete),className:a2("chakra-popover__content",t.className),__css:h}))});v_.displayName="PopoverContent";var $ge=ke(function(t,n){const{getHeaderProps:r}=Sh(),i=s2();return ae.createElement(Se.header,{...r(t,n),className:a2("chakra-popover__header",t.className),__css:i.header})});$ge.displayName="PopoverHeader";function y_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=Sh();return C.exports.cloneElement(t,n(t.props,t.ref))}y_.displayName="PopoverTrigger";function Hge(e,t,n){return(e-t)*100/(n-t)}var Wge=bd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Vge=bd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Uge=bd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Gge=bd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function LF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=Hge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var AF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(Se.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Vge} 2s linear infinite`:void 0},...r})};AF.displayName="Shape";var YC=e=>ae.createElement(Se.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});YC.displayName="Circle";var jge=ke((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=LF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Wge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(Se.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee(AF,{size:n,isIndeterminate:v,children:[x(YC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(YC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});jge.displayName="CircularProgress";var[Yge,qge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Kge=ke((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=LF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...qge().filledTrack};return ae.createElement(Se.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),MF=ke((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),E=Oi("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Gge} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Uge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return ae.createElement(Se.div,{ref:t,borderRadius:P,__css:R,...w},ee(Yge,{value:E,children:[x(Kge,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});MF.displayName="Progress";var Xge=Se("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Xge.displayName="CircularProgressLabel";var Zge=(...e)=>e.filter(Boolean).join(" "),Qge=e=>e?"":void 0;function Jge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var IF=ke(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(Se.select,{...a,ref:n,className:Zge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});IF.displayName="SelectField";var OF=ke((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,E]=Jge(b,SQ),P=O8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(Se.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(IF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(RF,{"data-disabled":Qge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});OF.displayName="Select";var eme=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),tme=Se("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),RF=e=>{const{children:t=x(eme,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(tme,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};RF.displayName="SelectIcon";function nme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rme(e){const t=ome(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function NF(e){return!!e.touches}function ime(e){return NF(e)&&e.touches.length>1}function ome(e){return e.view??window}function ame(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function sme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function DF(e,t="page"){return NF(e)?ame(e,t):sme(e,t)}function lme(e){return t=>{const n=rme(t);(!n||n&&t.button===0)&&e(t)}}function ume(e,t=!1){function n(i){e(i,{point:DF(i)})}return t?lme(n):n}function j3(e,t,n,r){return nme(e,t,ume(n,t==="pointerdown"),r)}function zF(e){const t=C.exports.useRef(null);return t.current=e,t}var cme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ime(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:DF(e)},{timestamp:i}=QP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,pw(r,this.history)),this.removeListeners=hme(j3(this.win,"pointermove",this.onPointerMove),j3(this.win,"pointerup",this.onPointerUp),j3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=pw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=pme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=QP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=pw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),OJ.update(this.updatePoint)}};function wA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pw(e,t){return{point:e.point,delta:wA(e.point,t[t.length-1]),offset:wA(e.point,t[0]),velocity:fme(t,.1)}}var dme=e=>e*1e3;function fme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>dme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function hme(...e){return t=>e.reduce((n,r)=>r(n),t)}function gw(e,t){return Math.abs(e-t)}function CA(e){return"x"in e&&"y"in e}function pme(e,t){if(typeof e=="number"&&typeof t=="number")return gw(e,t);if(CA(e)&&CA(t)){const n=gw(e.x,t.x),r=gw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function BF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=zF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new cme(v,h.current,s)}return j3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function gme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var mme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function vme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function FF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return mme(()=>{const a=e(),s=a.map((l,u)=>gme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(vme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function yme(e){return typeof e=="object"&&e!==null&&"current"in e}function bme(e){const[t]=FF({observeMutation:!1,getNodes(){return[yme(e)?e.current:e]}});return t}var Sme=Object.getOwnPropertyNames,xme=(e,t)=>function(){return e&&(t=(0,e[Sme(e)[0]])(e=0)),t},Cd=xme({"../../../react-shim.js"(){}});Cd();Cd();Cd();var Oa=e=>e?"":void 0,P0=e=>e?!0:void 0,_d=(...e)=>e.filter(Boolean).join(" ");Cd();function T0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Cd();Cd();function wme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function cm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Y3={width:0,height:0},jy=e=>e||Y3;function $F(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??Y3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...cm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>jy(w).height>jy(E).height?w:E,Y3):r.reduce((w,E)=>jy(w).width>jy(E).width?w:E,Y3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...cm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...cm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...cm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function HF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Cme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:O=0,...R}=e,N=dr(m),z=dr(v),V=dr(w),$=HF({isReversed:a,direction:s,orientation:l}),[j,ue]=ub({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>_0(He,t,n)),Me=O*b,xe=_me(me,t,n,Me),be=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=me,be.current.valueBounds=xe;const Ie=me.map(He=>n-He+t),De=($?Ie:me).map(He=>J5(He,t,n)),Qe=l==="vertical",st=C.exports.useRef(null),Ct=C.exports.useRef(null),ft=FF({getNodes(){const He=Ct.current,ct=He?.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),ut=C.exports.useId(),Ee=wme(u??ut),Je=C.exports.useCallback(He=>{var ct;if(!st.current)return;be.current.eventSource="pointer";const tt=st.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ct=He.touches)==null?void 0:ct[0])??He,er=Qe?tt.bottom-Zt:Nt-tt.left,lo=Qe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Uz(mi,t,n)},[Qe,$,n,t]),Lt=(n-t)/10,it=b||(n-t)/100,pt=C.exports.useMemo(()=>({setValueAtIndex(He,ct){if(!X)return;const tt=be.current.valueBounds[He];ct=parseFloat(DC(ct,tt.min,it)),ct=_0(ct,tt.min,tt.max);const Nt=[...be.current.value];Nt[He]=ct,ue(Nt)},setActiveIndex:G,stepUp(He,ct=it){const tt=be.current.value[He],Nt=$?tt-ct:tt+ct;pt.setValueAtIndex(He,Nt)},stepDown(He,ct=it){const tt=be.current.value[He],Nt=$?tt+ct:tt-ct;pt.setValueAtIndex(He,Nt)},reset(){ue(ce.current)}}),[it,$,ue,X]),an=C.exports.useCallback(He=>{const ct=He.key,Nt={ArrowRight:()=>pt.stepUp(K),ArrowUp:()=>pt.stepUp(K),ArrowLeft:()=>pt.stepDown(K),ArrowDown:()=>pt.stepDown(K),PageUp:()=>pt.stepUp(K,Lt),PageDown:()=>pt.stepDown(K,Lt),Home:()=>{const{min:Zt}=xe[K];pt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=xe[K];pt.setValueAtIndex(K,Zt)}}[ct];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),be.current.eventSource="keyboard")},[pt,K,Lt,xe]),{getThumbStyle:_t,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>$F({isReversed:$,orientation:l,thumbRects:ft,thumbPercents:De}),[$,l,De,ft]),Oe=C.exports.useCallback(He=>{var ct;const tt=He??K;if(tt!==-1&&M){const Nt=Ee.getThumb(tt),Zt=(ct=Ct.current)==null?void 0:ct.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Ee]);ud(()=>{be.current.eventSource==="keyboard"&&z?.(be.current.value)},[me,z]);const Xe=He=>{const ct=Je(He)||0,tt=be.current.value.map(mi=>Math.abs(mi-ct)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ct>be.current.value[Zt]&&(Zt=Zt+er.length-1),G(Zt),pt.setValueAtIndex(Zt,ct),Oe(Zt)},Xt=He=>{if(K==-1)return;const ct=Je(He)||0;G(K),pt.setValueAtIndex(K,ct),Oe(K)};BF(Ct,{onPanSessionStart(He){!X||(Q(!0),Xe(He),N?.(be.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(be.current.value))},onPan(He){!X||Xt(He)}});const Yt=C.exports.useCallback((He={},ct=null)=>({...He,...R,id:Ee.root,ref:Hn(ct,Ct),tabIndex:-1,"aria-disabled":P0(h),"data-focused":Oa(ne),style:{...He.style,...Ut}}),[R,h,ne,Ut,Ee]),_e=C.exports.useCallback((He={},ct=null)=>({...He,ref:Hn(ct,st),id:Ee.track,"data-disabled":Oa(h),style:{...He.style,...sn}}),[h,sn,Ee]),It=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.innerTrack,style:{...He.style,...yn}}),[yn,Ee]),ze=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He,Zt=me[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ct,role:"slider",tabIndex:X?0:void 0,id:Ee.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Zt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":P0(h),"aria-readonly":P0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,..._t(tt)},onKeyDown:T0(He.onKeyDown,an),onFocus:T0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:T0(He.onBlur,()=>{J(!1),G(-1)})}},[Ee,me,xe,X,W,K,V,E,l,h,g,P,k,_t,an,J]),ot=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.output,htmlFor:me.map((tt,Nt)=>Ee.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ee,me]),ln=C.exports.useCallback((He,ct=null)=>{const{value:tt,...Nt}=He,Zt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=J5(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...cm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ct,id:Ee.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Ee]),zn=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ct,id:Ee.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Ee]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>De[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:pt,getRootProps:Yt,getTrackProps:_e,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:ln,getInputProps:zn,getOutputProps:ot}}function _me(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[kme,Nb]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Eme,b_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),WF=ke(function(t,n){const r=Oi("Slider",t),i=vn(t),{direction:o}=s1();i.direction=o;const{getRootProps:a,...s}=Cme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(kme,{value:l},ae.createElement(Eme,{value:r},ae.createElement(Se.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});WF.defaultProps={orientation:"horizontal"};WF.displayName="RangeSlider";var Pme=ke(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Nb(),a=b_(),s=r(t,n);return ae.createElement(Se.div,{...s,className:_d("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Pme.displayName="RangeSliderThumb";var Tme=ke(function(t,n){const{getTrackProps:r}=Nb(),i=b_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:_d("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Tme.displayName="RangeSliderTrack";var Lme=ke(function(t,n){const{getInnerTrackProps:r}=Nb(),i=b_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Lme.displayName="RangeSliderFilledTrack";var Ame=ke(function(t,n){const{getMarkerProps:r}=Nb(),i=r(t,n);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__marker",t.className)})});Ame.displayName="RangeSliderMark";Cd();Cd();function Mme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...O}=e,R=dr(m),N=dr(v),z=dr(w),V=HF({isReversed:a,direction:s,orientation:l}),[$,j]=ub({value:i,defaultValue:o??Ome(t,n),onChange:r}),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=b||(n-t)/100,X=_0($,t,n),ce=n-X+t,Me=J5(V?ce:X,t,n),xe=l==="vertical",be=zF({min:t,max:n,step:b,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useId(),st=u??Qe,[Ct,ft]=[`slider-thumb-${st}`,`slider-track-${st}`],ut=C.exports.useCallback(ze=>{var ot;if(!Ie.current)return;const ln=be.current;ln.eventSource="pointer";const zn=Ie.current.getBoundingClientRect(),{clientX:He,clientY:ct}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?zn.bottom-ct:He-zn.left,Nt=xe?zn.height:zn.width;let Zt=tt/Nt;V&&(Zt=1-Zt);let er=Uz(Zt,ln.min,ln.max);return ln.step&&(er=parseFloat(DC(er,ln.min,ln.step))),er=_0(er,ln.min,ln.max),er},[xe,V,be]),vt=C.exports.useCallback(ze=>{const ot=be.current;!ot.isInteractive||(ze=parseFloat(DC(ze,ot.min,G)),ze=_0(ze,ot.min,ot.max),j(ze))},[G,j,be]),Ee=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;vt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;vt(ot)},reset(){vt(o||0)},stepTo(ze){vt(ze)}}),[vt,V,X,G,o]),Je=C.exports.useCallback(ze=>{const ot=be.current,zn={ArrowRight:()=>Ee.stepUp(),ArrowUp:()=>Ee.stepUp(),ArrowLeft:()=>Ee.stepDown(),ArrowDown:()=>Ee.stepDown(),PageUp:()=>Ee.stepUp(K),PageDown:()=>Ee.stepDown(K),Home:()=>vt(ot.min),End:()=>vt(ot.max)}[ze.key];zn&&(ze.preventDefault(),ze.stopPropagation(),zn(ze),ot.eventSource="keyboard")},[Ee,vt,K,be]),Lt=z?.(X)??E,it=bme(We),{getThumbStyle:pt,rootStyle:an,trackStyle:_t,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=be.current,ot=it??{width:0,height:0};return $F({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Me]})},[V,it,Me,be]),sn=C.exports.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=We.current)==null?void 0:ot.focus()})},[be]);ud(()=>{const ze=be.current;sn(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function yn(ze){const ot=ut(ze);ot!=null&&ot!==be.current.value&&j(ot)}BF(De,{onPanSessionStart(ze){const ot=be.current;!ot.isInteractive||(W(!0),sn(),yn(ze),R?.(ot.value))},onPanSessionEnd(){const ze=be.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!be.current.isInteractive||yn(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...O,ref:Hn(ot,De),tabIndex:-1,"aria-disabled":P0(h),"data-focused":Oa(Q),style:{...ze.style,...an}}),[O,h,Q,an]),Xe=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Hn(ot,Ie),id:ft,"data-disabled":Oa(h),style:{...ze.style,..._t}}),[h,ft,_t]),Xt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Hn(ot,We),role:"slider",tabIndex:J?0:void 0,id:Ct,"data-active":Oa(ue),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":P0(h),"aria-readonly":P0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...pt(0)},onKeyDown:T0(ze.onKeyDown,Je),onFocus:T0(ze.onFocus,()=>ne(!0)),onBlur:T0(ze.onBlur,()=>ne(!1))}),[J,Ct,ue,Lt,t,n,X,l,h,g,P,k,pt,Je]),_e=C.exports.useCallback((ze,ot=null)=>{const ln=!(ze.valuen),zn=X>=ze.value,He=J5(ze.value,t,n),ct={position:"absolute",pointerEvents:"none",...Ime({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!ln),"data-highlighted":Oa(zn),style:{...ze.style,...ct}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:ue},actions:Ee,getRootProps:Oe,getTrackProps:Xe,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:_e,getInputProps:It}}function Ime(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Ome(e,t){return t"}),[Nme,zb]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),S_=ke((e,t)=>{const n=Oi("Slider",e),r=vn(e),{direction:i}=s1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Mme(r),l=a(),u=o({},t);return ae.createElement(Rme,{value:s},ae.createElement(Nme,{value:n},ae.createElement(Se.div,{...l,className:_d("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});S_.defaultProps={orientation:"horizontal"};S_.displayName="Slider";var VF=ke((e,t)=>{const{getThumbProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__thumb",e.className),__css:r.thumb})});VF.displayName="SliderThumb";var UF=ke((e,t)=>{const{getTrackProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__track",e.className),__css:r.track})});UF.displayName="SliderTrack";var GF=ke((e,t)=>{const{getInnerTrackProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__filled-track",e.className),__css:r.filledTrack})});GF.displayName="SliderFilledTrack";var qC=ke((e,t)=>{const{getMarkerProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__marker",e.className),__css:r.mark})});qC.displayName="SliderMark";var Dme=(...e)=>e.filter(Boolean).join(" "),_A=e=>e?"":void 0,x_=ke(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Wz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(Se.label,{...h(),className:Dme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(Se.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(Se.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":_A(s.isChecked),"data-hover":_A(s.isHovered)})),o&&ae.createElement(Se.span,{className:"chakra-switch__label",...g(),__css:b},o))});x_.displayName="Switch";var p1=(...e)=>e.filter(Boolean).join(" ");function KC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[zme,jF,Bme,Fme]=nD();function $me(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=ub({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Bme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Hme,l2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Wme(e){const{focusedIndex:t,orientation:n,direction:r}=l2(),i=jF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:KC(e.onKeyDown,o)}}function Vme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=l2(),{index:u,register:h}=Fme({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Nhe({...r,ref:Hn(h,e.ref),isDisabled:t,isFocusable:n,onClick:KC(e.onClick,m)}),w="button";return{...b,id:YF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":qF(a,u),onFocus:t?void 0:KC(e.onFocus,v)}}var[Ume,Gme]=_n({});function jme(e){const t=l2(),{id:n,selectedIndex:r}=t,o=kb(e.children).map((a,s)=>C.exports.createElement(Ume,{key:s,value:{isSelected:s===r,id:qF(n,s),tabId:YF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=l2(),{isSelected:o,id:a,tabId:s}=Gme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=AB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function qme(){const e=l2(),t=jF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return ks(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function YF(e,t){return`${e}--tab-${t}`}function qF(e,t){return`${e}--tabpanel-${t}`}var[Kme,u2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),KF=ke(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=$me(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(zme,{value:l},ae.createElement(Hme,{value:h},ae.createElement(Kme,{value:r},ae.createElement(Se.div,{className:p1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});KF.displayName="Tabs";var Xme=ke(function(t,n){const r=qme(),i={...t.style,...r},o=u2();return ae.createElement(Se.div,{ref:n,...t,className:p1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Xme.displayName="TabIndicator";var Zme=ke(function(t,n){const r=Wme({...t,ref:n}),o={display:"flex",...u2().tablist};return ae.createElement(Se.div,{...r,className:p1("chakra-tabs__tablist",t.className),__css:o})});Zme.displayName="TabList";var XF=ke(function(t,n){const r=Yme({...t,ref:n}),i=u2();return ae.createElement(Se.div,{outline:"0",...r,className:p1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});XF.displayName="TabPanel";var ZF=ke(function(t,n){const r=jme(t),i=u2();return ae.createElement(Se.div,{...r,width:"100%",ref:n,className:p1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});ZF.displayName="TabPanels";var QF=ke(function(t,n){const r=u2(),i=Vme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(Se.button,{...i,className:p1("chakra-tabs__tab",t.className),__css:o})});QF.displayName="Tab";var Qme=(...e)=>e.filter(Boolean).join(" ");function Jme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var eve=["h","minH","height","minHeight"],JF=ke((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=O8(o),s=i?Jme(n,eve):n;return ae.createElement(Se.textarea,{ref:t,rows:i,...a,className:Qme("chakra-textarea",r),__css:s})});JF.displayName="Textarea";function tve(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function XC(e,...t){return nve(e)?e(...t):e}var nve=e=>typeof e=="function";function rve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ive=(e,t)=>e.find(n=>n.id===t);function kA(e,t){const n=e$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function e$(e,t){for(const[n,r]of Object.entries(e))if(ive(r,t))return n}function ove(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function ave(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var sve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},yl=lve(sve);function lve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=uve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=kA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:t$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=e$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(kA(yl.getState(),i).position)}}var EA=0;function uve(e,t={}){EA+=1;const n=t.id??EA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>yl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var cve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Dz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Bz,{children:l}),ae.createElement(Se.div,{flex:"1",maxWidth:"100%"},i&&x(Fz,{id:u?.title,children:i}),s&&x(zz,{id:u?.description,display:"block",children:s})),o&&x(Tb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function t$(e={}){const{render:t,toastComponent:n=cve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function dve(e,t){const n=i=>({...t,...i,position:rve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=t$(o);return yl.notify(a,o)};return r.update=(i,o)=>{yl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...XC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...XC(o.error,s)}))},r.closeAll=yl.closeAll,r.close=yl.close,r.isActive=yl.isActive,r}function c2(e){const{theme:t}=JN();return C.exports.useMemo(()=>dve(t.direction,e),[e,t.direction])}var fve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},n$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=fve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=due();ud(()=>{v||r?.()},[v]),ud(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),tve(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>ove(a),[a]);return ae.createElement(zl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(Se.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},XC(n,{id:t,onClose:E})))});n$.displayName="ToastComponent";var hve=e=>{const t=C.exports.useSyncExternalStore(yl.subscribe,yl.getState,yl.getState),{children:n,motionVariants:r,component:i=n$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:ave(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Wn,{children:[n,x(vh,{...o,children:s})]})};function pve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function gve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var mve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Gg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var r4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},ZC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function vve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:O,...R}=e,{isOpen:N,onOpen:z,onClose:V}=LB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:ue,getArrowProps:W}=TB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:O}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Me=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=yve(K,Me),be=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=ZC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Ie=C.exports.useCallback(()=>{X();const ut=ZC(K);ce.current=ut.setTimeout(Me,n)},[n,Me,X]),We=C.exports.useCallback(()=>{N&&r&&Ie()},[r,Ie,N]),De=C.exports.useCallback(()=>{N&&a&&Ie()},[a,Ie,N]),Qe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Ie()},[N,Ie]);Zf(()=>r4(K),"keydown",s?Qe:void 0),Zf(()=>r4(K),"scroll",()=>{N&&o&&Me()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Ie);const st=C.exports.useCallback((ut={},vt=null)=>({...ut,ref:Hn(K,vt,$),onPointerEnter:Gg(ut.onPointerEnter,Je=>{Je.pointerType!=="touch"&&be()}),onClick:Gg(ut.onClick,We),onPointerDown:Gg(ut.onPointerDown,De),onFocus:Gg(ut.onFocus,be),onBlur:Gg(ut.onBlur,Ie),"aria-describedby":N?J:void 0}),[be,Ie,De,N,J,We,$]),Ct=C.exports.useCallback((ut={},vt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:b?`${b}px`:void 0,[Wr.arrowShadowColor.var]:w}},vt),[j,b,w]),ft=C.exports.useCallback((ut={},vt=null)=>{const Ee={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:vt,...R,...ut,id:J,role:"tooltip",style:Ee}},[R,J]);return{isOpen:N,show:be,hide:Ie,getTriggerProps:st,getTooltipProps:ft,getTooltipPositionerProps:Ct,getArrowProps:W,getArrowInnerProps:ue}}var mw="chakra-ui:close-tooltip";function yve(e,t){return C.exports.useEffect(()=>{const n=r4(e);return n.addEventListener(mw,t),()=>n.removeEventListener(mw,t)},[t,e]),()=>{const n=r4(e),r=ZC(e);n.dispatchEvent(new r.CustomEvent(mw))}}var bve=Se(zl.div),pi=ke((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=s1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const V=RQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=vve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(Se.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const O=!!l,R=k.getTooltipProps({},t),N=O?pve(R,["role","id"]):R,z=gve(R,["role","id"]);return a?ee(Wn,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(vh,{...g},ae.createElement(Se.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(bve,{variants:mve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,O&&ae.createElement(Se.span,{srOnly:!0,...z},l),u&&ae.createElement(Se.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(Se.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Wn,{children:o})});pi.displayName="Tooltip";var Sve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(dB,{environment:a,children:t});return x(_ae,{theme:o,cssVarsRoot:s,children:ee(nN,{colorModeManager:n,options:o.config,children:[i?x(Gfe,{}):x(Ufe,{}),x(Eae,{}),r?x(MB,{zIndex:r,children:l}):l]})})};function xve({children:e,theme:t=gae,toastOptions:n,...r}){return ee(Sve,{theme:t,...r,children:[e,x(hve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:w_(e)?2:C_(e)?3:0}function L0(e,t){return g1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wve(e,t){return g1(e)===2?e.get(t):e[t]}function r$(e,t,n){var r=g1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function i$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function w_(e){return Tve&&e instanceof Map}function C_(e){return Lve&&e instanceof Set}function Ef(e){return e.o||e.t}function __(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=a$(e);delete t[rr];for(var n=A0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Cve),Object.freeze(e),t&&lh(e,function(n,r){return k_(r,!0)},!0)),e}function Cve(){xs(2)}function E_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Tl(e){var t=t7[e];return t||xs(18,e),t}function _ve(e,t){t7[e]||(t7[e]=t)}function QC(){return zv}function vw(e,t){t&&(Tl("Patches"),e.u=[],e.s=[],e.v=t)}function i4(e){JC(e),e.p.forEach(kve),e.p=null}function JC(e){e===zv&&(zv=e.l)}function PA(e){return zv={p:[],l:zv,h:e,m:!0,_:0}}function kve(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function yw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Tl("ES5").S(t,e,r),r?(n[rr].P&&(i4(t),xs(4)),Eu(e)&&(e=o4(t,e),t.l||a4(t,e)),t.u&&Tl("Patches").M(n[rr].t,e,t.u,t.s)):e=o4(t,n,[]),i4(t),t.u&&t.v(t.u,t.s),e!==o$?e:void 0}function o4(e,t,n){if(E_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return TA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return a4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=__(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return TA(e,r,i,o,a,n)}),a4(e,i,!1),n&&e.u&&Tl("Patches").R(r,n,e.u,e.s)}return r.o}function TA(e,t,n,r,i,o){if(fd(i)){var a=o4(e,i,o&&t&&t.i!==3&&!L0(t.D,r)?o.concat(r):void 0);if(r$(n,r,a),!fd(a))return;e.m=!1}if(Eu(i)&&!E_(i)){if(!e.h.F&&e._<1)return;o4(e,i),t&&t.A.l||a4(e,i)}}function a4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&k_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function LA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function Sw(e){e.o||(e.o=__(e.t))}function e7(e,t,n){var r=w_(t)?Tl("MapSet").N(t,n):C_(t)?Tl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:QC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Bv;a&&(l=[s],u=dm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Tl("ES5").J(t,n);return(n?n.A:QC()).p.push(r),r}function Eve(e){return fd(e)||xs(22,e),function t(n){if(!Eu(n))return n;var r,i=n[rr],o=g1(n);if(i){if(!i.P&&(i.i<4||!Tl("ES5").K(i)))return i.t;i.I=!0,r=AA(n,o),i.I=!1}else r=AA(n,o);return lh(r,function(a,s){i&&wve(i.t,a)===s||r$(r,a,t(s))}),o===3?new Set(r):r}(e)}function AA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return __(e)}function Pve(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Bv.get(l,o)},set:function(l){var u=this[rr];Bv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=A0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!L0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!i$(m,g))return!0}}var b=!!a[rr];return l.length!==A0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Tl("Patches").$;return fd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new Mve,s$=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function RA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(T_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ive(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:s4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function l$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function l4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return u4}function i(s,l){r(s)===u4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var zve=function(t,n){return t===n};function Bve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S2e:b2e;h$.useSyncExternalStore=Q0.useSyncExternalStore!==void 0?Q0.useSyncExternalStore:x2e;(function(e){e.exports=h$})(f$);var p$={exports:{}},g$={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Fb=C.exports,w2e=f$.exports;function C2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _2e=typeof Object.is=="function"?Object.is:C2e,k2e=w2e.useSyncExternalStore,E2e=Fb.useRef,P2e=Fb.useEffect,T2e=Fb.useMemo,L2e=Fb.useDebugValue;g$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=E2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=T2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,_2e(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=k2e(e,o[0],o[1]);return P2e(function(){a.hasValue=!0,a.value=s},[s]),L2e(s),s};(function(e){e.exports=g$})(p$);function A2e(e){e()}let m$=A2e;const M2e=e=>m$=e,I2e=()=>m$,hd=C.exports.createContext(null);function v$(){return C.exports.useContext(hd)}const O2e=()=>{throw new Error("uSES not initialized!")};let y$=O2e;const R2e=e=>{y$=e},N2e=(e,t)=>e===t;function D2e(e=hd){const t=e===hd?v$:()=>C.exports.useContext(e);return function(r,i=N2e){const{store:o,subscription:a,getServerState:s}=t(),l=y$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const z2e=D2e();var B2e={exports:{}},Mn={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var A_=Symbol.for("react.element"),M_=Symbol.for("react.portal"),$b=Symbol.for("react.fragment"),Hb=Symbol.for("react.strict_mode"),Wb=Symbol.for("react.profiler"),Vb=Symbol.for("react.provider"),Ub=Symbol.for("react.context"),F2e=Symbol.for("react.server_context"),Gb=Symbol.for("react.forward_ref"),jb=Symbol.for("react.suspense"),Yb=Symbol.for("react.suspense_list"),qb=Symbol.for("react.memo"),Kb=Symbol.for("react.lazy"),$2e=Symbol.for("react.offscreen"),b$;b$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case A_:switch(e=e.type,e){case $b:case Wb:case Hb:case jb:case Yb:return e;default:switch(e=e&&e.$$typeof,e){case F2e:case Ub:case Gb:case Kb:case qb:case Vb:return e;default:return t}}case M_:return t}}}Mn.ContextConsumer=Ub;Mn.ContextProvider=Vb;Mn.Element=A_;Mn.ForwardRef=Gb;Mn.Fragment=$b;Mn.Lazy=Kb;Mn.Memo=qb;Mn.Portal=M_;Mn.Profiler=Wb;Mn.StrictMode=Hb;Mn.Suspense=jb;Mn.SuspenseList=Yb;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return qa(e)===Ub};Mn.isContextProvider=function(e){return qa(e)===Vb};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===A_};Mn.isForwardRef=function(e){return qa(e)===Gb};Mn.isFragment=function(e){return qa(e)===$b};Mn.isLazy=function(e){return qa(e)===Kb};Mn.isMemo=function(e){return qa(e)===qb};Mn.isPortal=function(e){return qa(e)===M_};Mn.isProfiler=function(e){return qa(e)===Wb};Mn.isStrictMode=function(e){return qa(e)===Hb};Mn.isSuspense=function(e){return qa(e)===jb};Mn.isSuspenseList=function(e){return qa(e)===Yb};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$b||e===Wb||e===Hb||e===jb||e===Yb||e===$2e||typeof e=="object"&&e!==null&&(e.$$typeof===Kb||e.$$typeof===qb||e.$$typeof===Vb||e.$$typeof===Ub||e.$$typeof===Gb||e.$$typeof===b$||e.getModuleId!==void 0)};Mn.typeOf=qa;(function(e){e.exports=Mn})(B2e);function H2e(){const e=I2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const WA={notify(){},get:()=>[]};function W2e(e,t){let n,r=WA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=H2e())}function u(){n&&(n(),n=void 0,r.clear(),r=WA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const V2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U2e=V2e?C.exports.useLayoutEffect:C.exports.useEffect;function G2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=W2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return U2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||hd).Provider,{value:i,children:n})}function S$(e=hd){const t=e===hd?v$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const j2e=S$();function Y2e(e=hd){const t=e===hd?j2e:S$(e);return function(){return t().dispatch}}const q2e=Y2e();R2e(p$.exports.useSyncExternalStoreWithSelector);M2e(Dl.exports.unstable_batchedUpdates);var I_="persist:",x$="persist/FLUSH",O_="persist/REHYDRATE",w$="persist/PAUSE",C$="persist/PERSIST",_$="persist/PURGE",k$="persist/REGISTER",K2e=-1;function q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?q3=function(n){return typeof n}:q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},q3(e)}function VA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,V){return V.in(z,R,h)},h[R]);if(N!==void 0)try{g[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function eye(e){return JSON.stringify(e)}function tye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:I_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=nye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function nye(e){return JSON.parse(e)}function rye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:I_).concat(e.key);return t.removeItem(n,iye)}function iye(e){}function UA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function sye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lye=5e3;function uye(e,t){var n=e.version!==void 0?e.version:K2e;e.debug;var r=e.stateReconciler===void 0?Q2e:e.stateReconciler,i=e.getStoredState||tye,o=e.timeout!==void 0?e.timeout:lye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=aye(m,["_persist"]),w=b;if(g.type===C$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=J2e(e)),v)return uu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),uu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===_$)return s=!0,g.result(rye(e)),uu({},t(w,g),{_persist:v});if(g.type===x$)return g.result(a&&a.flush()),uu({},t(w,g),{_persist:v});if(g.type===w$)l=!0;else if(g.type===O_){if(s)return uu({},w,{_persist:uu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,O=uu({},M,{_persist:uu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(uu({},R,{_persist:v}))}}function GA(e){return fye(e)||dye(e)||cye()}function cye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function dye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function fye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:E$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case k$:return r7({},t,{registry:[].concat(GA(t.registry),[n.key])});case O_:var r=t.registry.indexOf(n.key),i=GA(t.registry);return i.splice(r,1),r7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function gye(e,t,n){var r=n||!1,i=T_(pye,E$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:k$,key:u})},a=function(u,h,g){var m={type:O_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=r7({},i,{purge:function(){var u=[];return e.dispatch({type:_$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:x$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:w$})},persist:function(){e.dispatch({type:C$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var R_={},N_={};N_.__esModule=!0;N_.default=yye;function K3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?K3=function(n){return typeof n}:K3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},K3(e)}function kw(){}var mye={getItem:kw,setItem:kw,removeItem:kw};function vye(e){if((typeof self>"u"?"undefined":K3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function yye(e){var t="".concat(e,"Storage");return vye(t)?self[t]:mye}R_.__esModule=!0;R_.default=xye;var bye=Sye(N_);function Sye(e){return e&&e.__esModule?e:{default:e}}function xye(e){var t=(0,bye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var P$=void 0,wye=Cye(R_);function Cye(e){return e&&e.__esModule?e:{default:e}}var _ye=(0,wye.default)("local");P$=_ye;var T$={},L$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var D_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(D_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=D_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const b=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=b;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},O=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=O;const R=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=R;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Me=>Me===ne),K=W.filter(Me=>(ne+".").indexOf(Me+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. + + ${JSON.stringify(X)} + + ${G}`);if(ce.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(ce)} + + ${G}`)};e.singleTransformValidator=z;const V=function(W){if(!(0,e.isArray)(W))return;const Q=W?.map(ne=>ne.deepPersistKey).filter(ne=>ne)||[];if(Q.length){const ne=Q.filter((J,K)=>Q.indexOf(J)!==K);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ne)}`)}};e.transformsValidator=V;const $=function({whitelist:W,blacklist:Q}){if(W&&W.length&&Q&&Q.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(W){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(W);(0,e.throwError)({duplicates:ne,subsets:J},"whitelist")}if(Q){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(Q);(0,e.throwError)({duplicates:ne,subsets:J},"blacklist")}};e.configValidator=$;const j=function({duplicates:W,subsets:Q},ne){if(W.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ne}. + + ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(Q)}`)};e.throwError=j;const ue=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=ue})(L$);(function(e){var t=bs&&bs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=T.map(ue=>Object.keys(ue)[0]),N=M.map(ue=>Object.keys(ue)[0]),z=O.filter(ue=>R.indexOf(ue)===-1&&N.indexOf(ue)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(ue=>(0,e.createBlacklist)(ue)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(T$);const X3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),kye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return z_(r)?r:!1},z_=e=>Boolean(typeof e=="string"?kye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),d4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Eye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,T=8,M=16,O=32,R=64,N=128,z=256,V=512,$=30,j="...",ue=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Me=me-1,xe=me>>>1,be=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",O],["partialRight",R],["rearg",z]],Ie="[object Arguments]",We="[object Array]",De="[object AsyncFunction]",Qe="[object Boolean]",st="[object Date]",Ct="[object DOMException]",ft="[object Error]",ut="[object Function]",vt="[object GeneratorFunction]",Ee="[object Map]",Je="[object Number]",Lt="[object Null]",it="[object Object]",pt="[object Promise]",an="[object Proxy]",_t="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",Xe="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",_e="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",ln="[object Int16Array]",zn="[object Int32Array]",He="[object Uint8Array]",ct="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,C1=RegExp(mi.source),ya=RegExp(Os.source),Th=/<%-([\s\S]+?)%>/g,_1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Lh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ah=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Md=/[\\^$.*+?()[\]{}|]/g,k1=RegExp(Md.source),$u=/^\s+/,Id=/\s/,E1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rs=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,P1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,T1=/[()=,{}\[\]\/\s]/,L1=/\\(\\)?/g,A1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,M1=/^[-+]0x[0-9a-f]+$/i,I1=/^0b[01]+$/i,O1=/^\[object .+?Constructor\]$/,R1=/^0o[0-7]+$/i,N1=/^(?:0|[1-9]\d*)$/,D1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,z1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Hl="\\u0300-\\u036f",Wl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Vl=Hl+Wl+Ds,Mh="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+bn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Vl+"]",Od="\\d+",Ul="["+Mh+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Od+Mh+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Ih="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Nd="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",Gl="(?:"+Qa+"|"+Rd+")",B1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Dd=Ih+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Nd,Fs].join("|")+")"+Gu+Dd+")*",zd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Dd+ba,Rh="(?:"+[Ul,Nd,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Nd,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Nh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",B1+"+"+Uu+"(?="+[jr,uo+Gl,"$"].join("|")+")",uo+"?"+Gl+"+"+Vu,uo+"+"+Uu,jl,zd,Od,Rh].join("|"),"g"),Bd=RegExp("["+$s+Xa+Vl+kr+"]"),Dh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zh=-1,un={};un[It]=un[ze]=un[ot]=un[ln]=un[zn]=un[He]=un[ct]=un[tt]=un[Nt]=!0,un[Ie]=un[We]=un[Yt]=un[Qe]=un[_e]=un[st]=un[ft]=un[ut]=un[Ee]=un[Je]=un[it]=un[_t]=un[Ut]=un[sn]=un[Xe]=!1;var Wt={};Wt[Ie]=Wt[We]=Wt[Yt]=Wt[_e]=Wt[Qe]=Wt[st]=Wt[It]=Wt[ze]=Wt[ot]=Wt[ln]=Wt[zn]=Wt[Ee]=Wt[Je]=Wt[it]=Wt[_t]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[He]=Wt[ct]=Wt[tt]=Wt[Nt]=!0,Wt[ft]=Wt[ut]=Wt[Xe]=!1;var Bh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},F1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof bs=="object"&&bs&&bs.Object===Object&&bs,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,hn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Vi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,Hs=hn&&hn.isSet,$1=hn&&hn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function H1(re,ye,ge,Ge){for(var Et=-1,Qt=re==null?0:re.length;++Et-1}function Fh(re,ye,ge){for(var Ge=-1,Et=re==null?0:re.length;++Ge-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function V1(re,ye){for(var ge=re.length,Ge=0;ge--;)re[ge]===ye&&++Ge;return Ge}var C2=Vd(Bh),es=Vd(F1);function Vs(re){return"\\"+te[re]}function Hh(re,ye){return re==null?n:re[ye]}function ql(re){return Bd.test(re)}function Wh(re){return Dh.test(re)}function _2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Vh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ge,Et){ge[++ye]=[Et,Ge]}),ge}function Uh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ge=re.length,Et=0,Qt=[];++ge-1}function V2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Uo.prototype.clear=H2,Uo.prototype.delete=W2,Uo.prototype.get=ig,Uo.prototype.has=og,Uo.prototype.set=V2;function Go(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,S,A,D,F){var Y,Z=p&g,le=p&m,we=p&v;if(S&&(Y=D?S(c,A,D,F):S(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Rt(c);if(Ce){if(Y=bU(c),!Z)return _i(c,Y)}else{var Te=ui(c),Ue=Te==ut||Te==vt;if(_c(c))return el(c,Z);if(Te==it||Te==Ie||Ue&&!D){if(Y=le||Ue?{}:Nk(c),!Z)return le?Cg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Te])return D?c:{};Y=SU(c,Te,Z)}}F||(F=new yr);var lt=F.get(c);if(lt)return lt;F.set(c,Y),cE(c)?c.forEach(function(xt){Y.add(ai(xt,p,S,xt,c,F))}):lE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,S,jt,c,F))});var St=we?le?pe:Xo:le?So:ci,$t=Ce?n:St(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,S,jt,c,F))}),Y}function Qh(c){var p=ci(c);return function(S){return Jh(S,c,p)}}function Jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var D=S[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ug(c,p,S){if(typeof c!="function")throw new bi(a);return Tg(function(){c.apply(n,S)},p)}function gc(c,p,S,A){var D=-1,F=Ri,Y=!0,Z=c.length,le=[],we=p.length;if(!Z)return le;S&&(p=Fn(p,Er(S))),A?(F=Fh,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new _a(p));e:for(;++DD?0:D+S),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=S>A?0:fE(A);S0&&S(Z)?p>1?Tr(Z,p-1,S,A,D):xa(D,Z):A||(D[D.length]=Z)}return D}var tp=tl(),go=tl(!0);function Ko(c,p){return c&&tp(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function np(c,p){return ho(p,function(S){return ru(c[S])})}function Ys(c,p){p=Js(p,c);for(var S=0,A=p.length;c!=null&&Sp}function ip(c,p){return c!=null&&tn.call(c,p)}function op(c,p){return c!=null&&p in cn(c)}function ap(c,p,S){return c>=Kr(p,S)&&c=120&&Ce.length>=120)?new _a(Y&&Ce):n}Ce=c[0];var Te=-1,Ue=Z[0];e:for(;++Te-1;)Z!==c&&Zd.call(Z,le,1),Zd.call(c,le,1);return c}function sf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var D=p[S];if(S==A||D!==F){var F=D;nu(D)?Zd.call(c,D,1):mp(c,D)}}return c}function lf(c,p){return c+Xl(Q1()*(p-c+1))}function Zs(c,p,S,A){for(var D=-1,F=vr(ef((p-c)/(S||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=S;return Y}function xc(c,p){var S="";if(!c||p<1||p>G)return S;do p%2&&(S+=c),p=Xl(p/2),p&&(c+=c);while(p);return S}function kt(c,p){return zS(Bk(c,p,xo),c+"")}function dp(c){return hc(Cp(c))}function uf(c,p){var S=Cp(c);return Z2(S,Ql(p,0,S.length))}function eu(c,p,S,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),S=S>D?D:S,S<0&&(S+=D),D=p>S?0:S-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(S?Y<=p:Y=i){var we=p?null:H(c);if(we)return Yd(we);Y=!1,D=Qu,le=new _a}else le=p?[]:Z;e:for(;++A=A?c:Ar(c,p,S)}var bg=L2||function(c){return yt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var S=c.length,A=rc?rc(S):new c.constructor(S);return c.copy(A),A}function Sg(c){var p=new c.constructor(c.byteLength);return new Si(p).set(new Si(c)),p}function tu(c,p){var S=p?Sg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function Y2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return nf?cn(nf.call(c)):{}}function q2(c,p){var S=p?Sg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function xg(c,p){if(c!==p){var S=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,le=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&le&&!Z&&!we||A&&Y&&le||!S&&le||!D)return 1;if(!A&&!F&&!we&&c=Z)return le;var we=S[A];return le*(we=="desc"?-1:1)}}return c.index-p.index}function K2(c,p,S,A){for(var D=-1,F=c.length,Y=S.length,Z=-1,le=p.length,we=vr(F-Y,0),Ce=ge(le+we),Te=!A;++Z1?S[D-1]:n,Y=D>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Ki(S[0],S[1],Y)&&(F=D<3?n:F,D=1),p=cn(p);++A-1?D[F?p[Y]:Y]:n}}function kg(c){return nr(function(p){var S=p.length,A=S,D=Gi.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new bi(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new Gi([],!0)}for(A=Y?A:S;++A1&&Jt.reverse(),Ce&&leZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Te=-1,Ue=!0,lt=S&w?new _a:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(E1,`{ +/* [wrapped with `+p+`] */ +`)}function wU(c){return Rt(c)||vf(c)||!!(X1&&c&&c[X1])}function nu(c,p){var S=typeof c;return p=p??G,!!p&&(S=="number"||S!="symbol"&&N1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=ue)return arguments[0]}else p=0;return c.apply(n,arguments)}}function Z2(c,p){var S=-1,A=c.length,D=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Xk(c,S)});function Zk(c){var p=B(c);return p.__chain__=!0,p}function OG(c,p){return p(c),c}function Q2(c,p){return p(c)}var RG=nr(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,D=function(F){return Zh(F,c)};return p>1||this.__actions__.length||!(A instanceof Gt)||!nu(S)?this.thru(D):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:Q2,args:[D],thisArg:n}),new Gi(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function NG(){return Zk(this)}function DG(){return new Gi(this.value(),this.__chain__)}function zG(){this.__values__===n&&(this.__values__=dE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function BG(){return this}function FG(c){for(var p,S=this;S instanceof rf;){var A=Uk(S);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;S=S.__wrapped__}return D.__wrapped__=c,p}function $G(){var c=this.__wrapped__;if(c instanceof Gt){var p=c;return this.__actions__.length&&(p=new Gt(this)),p=p.reverse(),p.__actions__.push({func:Q2,args:[BS],thisArg:n}),new Gi(p,this.__chain__)}return this.thru(BS)}function HG(){return Qs(this.__wrapped__,this.__actions__)}var WG=yp(function(c,p,S){tn.call(c,S)?++c[S]:jo(c,S,1)});function VG(c,p,S){var A=Rt(c)?Bn:cg;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}function UG(c,p){var S=Rt(c)?ho:qo;return S(c,Pe(p,3))}var GG=_g(Gk),jG=_g(jk);function YG(c,p){return Tr(J2(c,p),1)}function qG(c,p){return Tr(J2(c,p),K)}function KG(c,p,S){return S=S===n?1:Dt(S),Tr(J2(c,p),S)}function Qk(c,p){var S=Rt(c)?Gn:rs;return S(c,Pe(p,3))}function Jk(c,p){var S=Rt(c)?fo:ep;return S(c,Pe(p,3))}var XG=yp(function(c,p,S){tn.call(c,S)?c[S].push(p):jo(c,S,[p])});function ZG(c,p,S,A){c=bo(c)?c:Cp(c),S=S&&!A?Dt(S):0;var D=c.length;return S<0&&(S=vr(D+S,0)),iy(c)?S<=D&&c.indexOf(p,S)>-1:!!D&&Xu(c,p,S)>-1}var QG=kt(function(c,p,S){var A=-1,D=typeof p=="function",F=bo(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,S):is(Y,p,S)}),F}),JG=yp(function(c,p,S){jo(c,S,p)});function J2(c,p){var S=Rt(c)?Fn:Sr;return S(c,Pe(p,3))}function ej(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),wi(c,p,S))}var tj=yp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function nj(c,p,S){var A=Rt(c)?$d:$h,D=arguments.length<3;return A(c,Pe(p,4),S,D,rs)}function rj(c,p,S){var A=Rt(c)?b2:$h,D=arguments.length<3;return A(c,Pe(p,4),S,D,ep)}function ij(c,p){var S=Rt(c)?ho:qo;return S(c,ny(Pe(p,3)))}function oj(c){var p=Rt(c)?hc:dp;return p(c)}function aj(c,p,S){(S?Ki(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?oi:uf;return A(c,p)}function sj(c){var p=Rt(c)?LS:li;return p(c)}function lj(c){if(c==null)return 0;if(bo(c))return iy(c)?wa(c):c.length;var p=ui(c);return p==Ee||p==Ut?c.size:Lr(c).length}function uj(c,p,S){var A=Rt(c)?qu:vo;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}var cj=kt(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Ki(c,p[0],p[1])?p=[]:S>2&&Ki(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ey=A2||function(){return yt.Date.now()};function dj(c,p){if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function eE(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function tE(c,p){var S;if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var $S=kt(function(c,p,S){var A=E;if(S.length){var D=Vo(S,Ve($S));A|=O}return fe(c,A,p,S,D)}),nE=kt(function(c,p,S){var A=E|P;if(S.length){var D=Vo(S,Ve(nE));A|=O}return fe(p,A,c,S,D)});function rE(c,p,S){p=S?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=rE.placeholder,A}function iE(c,p,S){p=S?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=iE.placeholder,A}function oE(c,p,S){var A,D,F,Y,Z,le,we=0,Ce=!1,Te=!1,Ue=!0;if(typeof c!="function")throw new bi(a);p=Pa(p)||0,lr(S)&&(Ce=!!S.leading,Te="maxWait"in S,F=Te?vr(Pa(S.maxWait)||0,p):F,Ue="trailing"in S?!!S.trailing:Ue);function lt(Ir){var us=A,ou=D;return A=D=n,we=Ir,Y=c.apply(ou,us),Y}function St(Ir){return we=Ir,Z=Tg(jt,p),Ce?lt(Ir):Y}function $t(Ir){var us=Ir-le,ou=Ir-we,_E=p-us;return Te?Kr(_E,F-ou):_E}function xt(Ir){var us=Ir-le,ou=Ir-we;return le===n||us>=p||us<0||Te&&ou>=F}function jt(){var Ir=ey();if(xt(Ir))return Jt(Ir);Z=Tg(jt,$t(Ir))}function Jt(Ir){return Z=n,Ue&&A?lt(Ir):(A=D=n,Y)}function Qo(){Z!==n&&bg(Z),we=0,A=le=D=Z=n}function Xi(){return Z===n?Y:Jt(ey())}function Jo(){var Ir=ey(),us=xt(Ir);if(A=arguments,D=this,le=Ir,us){if(Z===n)return St(le);if(Te)return bg(Z),Z=Tg(jt,p),lt(le)}return Z===n&&(Z=Tg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Xi,Jo}var fj=kt(function(c,p){return ug(c,1,p)}),hj=kt(function(c,p,S){return ug(c,Pa(p)||0,S)});function pj(c){return fe(c,V)}function ty(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new bi(a);var S=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=S.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return S.cache=F.set(D,Y)||F,Y};return S.cache=new(ty.Cache||Go),S}ty.Cache=Go;function ny(c){if(typeof c!="function")throw new bi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function gj(c){return tE(2,c)}var mj=IS(function(c,p){p=p.length==1&&Rt(p[0])?Fn(p[0],Er(Pe())):Fn(Tr(p,1),Er(Pe()));var S=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,S);++D=p}),vf=lp(function(){return arguments}())?lp:function(c){return xr(c)&&tn.call(c,"callee")&&!K1.call(c,"callee")},Rt=ge.isArray,Mj=Yr?Er(Yr):fg;function bo(c){return c!=null&&ry(c.length)&&!ru(c)}function Mr(c){return xr(c)&&bo(c)}function Ij(c){return c===!0||c===!1||xr(c)&&si(c)==Qe}var _c=M2||QS,Oj=co?Er(co):hg;function Rj(c){return xr(c)&&c.nodeType===1&&!Lg(c)}function Nj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||wp(c)||vf(c)))return!c.length;var p=ui(c);if(p==Ee||p==Ut)return!c.size;if(Pg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Dj(c,p){return vc(c,p)}function zj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?vc(c,p,n,S):!!A}function WS(c){if(!xr(c))return!1;var p=si(c);return p==ft||p==Ct||typeof c.message=="string"&&typeof c.name=="string"&&!Lg(c)}function Bj(c){return typeof c=="number"&&Yh(c)}function ru(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==vt||p==De||p==an}function sE(c){return typeof c=="number"&&c==Dt(c)}function ry(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var lE=Vi?Er(Vi):MS;function Fj(c,p){return c===p||yc(c,p,Pt(p))}function $j(c,p,S){return S=typeof S=="function"?S:n,yc(c,p,Pt(p),S)}function Hj(c){return uE(c)&&c!=+c}function Wj(c){if(kU(c))throw new Et(o);return up(c)}function Vj(c){return c===null}function Uj(c){return c==null}function uE(c){return typeof c=="number"||xr(c)&&si(c)==Je}function Lg(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ii}var VS=Sa?Er(Sa):ar;function Gj(c){return sE(c)&&c>=-G&&c<=G}var cE=Hs?Er(Hs):Bt;function iy(c){return typeof c=="string"||!Rt(c)&&xr(c)&&si(c)==sn}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==yn}var wp=$1?Er($1):zr;function jj(c){return c===n}function Yj(c){return xr(c)&&ui(c)==Xe}function qj(c){return xr(c)&&si(c)==Xt}var Kj=_(qs),Xj=_(function(c,p){return c<=p});function dE(c){if(!c)return[];if(bo(c))return iy(c)?Ni(c):_i(c);if(oc&&c[oc])return _2(c[oc]());var p=ui(c),S=p==Ee?Vh:p==Ut?Yd:Cp;return S(c)}function iu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=iu(c),S=p%1;return p===p?S?p-S:p:0}function fE(c){return c?Ql(Dt(c),0,me):0}function Pa(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Ui(c);var S=I1.test(c);return S||R1.test(c)?Ye(c.slice(2),S?2:8):M1.test(c)?ce:+c}function hE(c){return ka(c,So(c))}function Zj(c){return c?Ql(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Yi(c)}var Qj=qi(function(c,p){if(Pg(p)||bo(p)){ka(p,ci(p),c);return}for(var S in p)tn.call(p,S)&&js(c,S,p[S])}),pE=qi(function(c,p){ka(p,So(p),c)}),oy=qi(function(c,p,S,A){ka(p,So(p),c,A)}),Jj=qi(function(c,p,S,A){ka(p,ci(p),c,A)}),eY=nr(Zh);function tY(c,p){var S=Zl(c);return p==null?S:Ke(S,p)}var nY=kt(function(c,p){c=cn(c);var S=-1,A=p.length,D=A>2?p[2]:n;for(D&&Ki(p[0],p[1],D)&&(A=1);++S1),F}),ka(c,pe(c),S),A&&(S=ai(S,g|m|v,At));for(var D=p.length;D--;)mp(S,p[D]);return S});function SY(c,p){return mE(c,ny(Pe(p)))}var xY=nr(function(c,p){return c==null?{}:mg(c,p)});function mE(c,p){if(c==null)return{};var S=Fn(pe(c),function(A){return[A]});return p=Pe(p),cp(c,S,function(A,D){return p(A,D[0])})}function wY(c,p,S){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var D=Q1();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return lf(c,p)}var OY=nl(function(c,p,S){return p=p.toLowerCase(),c+(S?bE(p):p)});function bE(c){return jS(xn(c).toLowerCase())}function SE(c){return c=xn(c),c&&c.replace(D1,C2).replace(Nh,"")}function RY(c,p,S){c=xn(c),p=Yi(p);var A=c.length;S=S===n?A:Ql(Dt(S),0,A);var D=S;return S-=p.length,S>=0&&c.slice(S,D)==p}function NY(c){return c=xn(c),c&&ya.test(c)?c.replace(Os,es):c}function DY(c){return c=xn(c),c&&k1.test(c)?c.replace(Md,"\\$&"):c}var zY=nl(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),BY=nl(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),FY=Sp("toLowerCase");function $Y(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Xl(D),S)+c+d(ef(D),S)}function HY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;return p&&A>>0,S?(c=xn(c),c&&(typeof p=="string"||p!=null&&!VS(p))&&(p=Yi(p),!p&&ql(c))?as(Ni(c),0,S):c.split(p,S)):[]}var qY=nl(function(c,p,S){return c+(S?" ":"")+jS(p)});function KY(c,p,S){return c=xn(c),S=S==null?0:Ql(Dt(S),0,c.length),p=Yi(p),c.slice(S,S+p.length)==p}function XY(c,p,S){var A=B.templateSettings;S&&Ki(c,p,S)&&(p=n),c=xn(c),p=oy({},p,A,Ne);var D=oy({},p.imports,A.imports,Ne),F=ci(D),Y=jd(D,F),Z,le,we=0,Ce=p.interpolate||Ns,Te="__p += '",Ue=Kd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?A1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),lt="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zh+"]")+` +`;c.replace(Ue,function(xt,jt,Jt,Qo,Xi,Jo){return Jt||(Jt=Qo),Te+=c.slice(we,Jo).replace(z1,Vs),jt&&(Z=!0,Te+=`' + +__e(`+jt+`) + +'`),Xi&&(le=!0,Te+=`'; +`+Xi+`; +__p += '`),Jt&&(Te+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),we=Jo+xt.length,xt}),Te+=`'; +`;var St=tn.call(p,"variable")&&p.variable;if(!St)Te=`with (obj) { +`+Te+` +} +`;else if(T1.test(St))throw new Et(s);Te=(le?Te.replace(Zt,""):Te).replace(er,"$1").replace(lo,"$1;"),Te="function("+(St||"obj")+`) { +`+(St?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(le?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Te+`return __p +}`;var $t=wE(function(){return Qt(F,lt+"return "+Te).apply(n,Y)});if($t.source=Te,WS($t))throw $t;return $t}function ZY(c){return xn(c).toLowerCase()}function QY(c){return xn(c).toUpperCase()}function JY(c,p,S){if(c=xn(c),c&&(S||p===n))return Ui(c);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function eq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.slice(0,G1(c)+1);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function tq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.replace($u,"");if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function nq(c,p){var S=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;S="length"in p?Dt(p.length):S,A="omission"in p?Yi(p.omission):A}c=xn(c);var F=c.length;if(ql(c)){var Y=Ni(c);F=Y.length}if(S>=F)return c;var Z=S-wa(A);if(Z<1)return A;var le=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return le+A;if(Y&&(Z+=le.length-Z),VS(D)){if(c.slice(Z).search(D)){var we,Ce=le;for(D.global||(D=Kd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Te=we.index;le=le.slice(0,Te===n?Z:Te)}}else if(c.indexOf(Yi(D),Z)!=Z){var Ue=le.lastIndexOf(D);Ue>-1&&(le=le.slice(0,Ue))}return le+A}function rq(c){return c=xn(c),c&&C1.test(c)?c.replace(mi,P2):c}var iq=nl(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),jS=Sp("toUpperCase");function xE(c,p,S){return c=xn(c),p=S?n:p,p===n?Wh(c)?qd(c):W1(c):c.match(p)||[]}var wE=kt(function(c,p){try{return yi(c,n,p)}catch(S){return WS(S)?S:new Et(S)}}),oq=nr(function(c,p){return Gn(p,function(S){S=rl(S),jo(c,S,$S(c[S],c))}),c});function aq(c){var p=c==null?0:c.length,S=Pe();return c=p?Fn(c,function(A){if(typeof A[1]!="function")throw new bi(a);return[S(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var S=me,A=Kr(c,me);p=Pe(p),c-=me;for(var D=Gd(A,p);++S0||p<0)?new Gt(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(me)},Ko(Gt.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,le=Y instanceof Gt,we=Z[0],Ce=le||Rt(Y),Te=function(jt){var Jt=D.apply(B,xa([jt],Z));return A&&Ue?Jt[0]:Jt};Ce&&S&&typeof we=="function"&&we.length!=1&&(le=Ce=!1);var Ue=this.__chain__,lt=!!this.__actions__.length,St=F&&!Ue,$t=le&&!lt;if(!F&&Ce){Y=$t?Y:new Gt(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:Q2,args:[Te],thisArg:n}),new Gi(xt,Ue)}return St&&$t?c.apply(this,Z):(xt=this.thru(Te),St?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],D)}return this[S](function(Y){return p.apply(Rt(Y)?Y:[],D)})}}),Ko(Gt.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:S})}}),ts[pf(n,P).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=xi,Gt.prototype.value=D2,B.prototype.at=RG,B.prototype.chain=NG,B.prototype.commit=DG,B.prototype.next=zG,B.prototype.plant=FG,B.prototype.reverse=$G,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=HG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=BG),B},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Tt._=Ca):yt._=Ca}).call(bs)})(Jr,Jr.exports);const Ze=Jr.exports;var Pye=Object.create,A$=Object.defineProperty,Tye=Object.getOwnPropertyDescriptor,Lye=Object.getOwnPropertyNames,Aye=Object.getPrototypeOf,Mye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Iye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lye(t))!Mye.call(e,i)&&i!==n&&A$(e,i,{get:()=>t[i],enumerable:!(r=Tye(t,i))||r.enumerable});return e},M$=(e,t,n)=>(n=e!=null?Pye(Aye(e)):{},Iye(t||!e||!e.__esModule?A$(n,"default",{value:e,enumerable:!0}):n,e)),Oye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),I$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Xb=Be((e,t)=>{var n=I$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Rye=Be((e,t)=>{var n=Xb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),Nye=Be((e,t)=>{var n=Xb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Dye=Be((e,t)=>{var n=Xb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),zye=Be((e,t)=>{var n=Xb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Zb=Be((e,t)=>{var n=Oye(),r=Rye(),i=Nye(),o=Dye(),a=zye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Zb();function r(){this.__data__=new n,this.size=0}t.exports=r}),Fye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),$ye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),Hye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),O$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Mu=Be((e,t)=>{var n=O$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),B_=Be((e,t)=>{var n=Mu(),r=n.Symbol;t.exports=r}),Wye=Be((e,t)=>{var n=B_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Vye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Qb=Be((e,t)=>{var n=B_(),r=Wye(),i=Vye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),R$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),N$=Be((e,t)=>{var n=Qb(),r=R$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Uye=Be((e,t)=>{var n=Mu(),r=n["__core-js_shared__"];t.exports=r}),Gye=Be((e,t)=>{var n=Uye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),D$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),jye=Be((e,t)=>{var n=N$(),r=Gye(),i=R$(),o=D$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Yye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),m1=Be((e,t)=>{var n=jye(),r=Yye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),F_=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Map");t.exports=i}),Jb=Be((e,t)=>{var n=m1(),r=n(Object,"create");t.exports=r}),qye=Be((e,t)=>{var n=Jb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),Kye=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Xye=Be((e,t)=>{var n=Jb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),Zye=Be((e,t)=>{var n=Jb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),Qye=Be((e,t)=>{var n=Jb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Jye=Be((e,t)=>{var n=qye(),r=Kye(),i=Xye(),o=Zye(),a=Qye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Jye(),r=Zb(),i=F_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),t3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),eS=Be((e,t)=>{var n=t3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),n3e=Be((e,t)=>{var n=eS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),r3e=Be((e,t)=>{var n=eS();function r(i){return n(this,i).get(i)}t.exports=r}),i3e=Be((e,t)=>{var n=eS();function r(i){return n(this,i).has(i)}t.exports=r}),o3e=Be((e,t)=>{var n=eS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),z$=Be((e,t)=>{var n=e3e(),r=n3e(),i=r3e(),o=i3e(),a=o3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Zb(),r=F_(),i=z$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Zb(),r=Bye(),i=Fye(),o=$ye(),a=Hye(),s=a3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),l3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),u3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),c3e=Be((e,t)=>{var n=z$(),r=l3e(),i=u3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),B$=Be((e,t)=>{var n=c3e(),r=d3e(),i=f3e(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Mu(),r=n.Uint8Array;t.exports=r}),p3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),g3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),m3e=Be((e,t)=>{var n=B_(),r=h3e(),i=I$(),o=B$(),a=p3e(),s=g3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function N(z,V,$,j,ue,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case b:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,ue,W,Q);return Q.delete(z),G;case k:if(R)return R.call(z)==R.call(V)}return!1}t.exports=N}),v3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),y3e=Be((e,t)=>{var n=v3e(),r=$_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),b3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),x3e=Be((e,t)=>{var n=b3e(),r=S3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),C3e=Be((e,t)=>{var n=Qb(),r=tS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),_3e=Be((e,t)=>{var n=C3e(),r=tS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),k3e=Be((e,t)=>{function n(){return!1}t.exports=n}),F$=Be((e,t)=>{var n=Mu(),r=k3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),E3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),P3e=Be((e,t)=>{var n=Qb(),r=$$(),i=tS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",ue="[object Uint32Array]",W={};W[M]=W[O]=W[R]=W[N]=W[z]=W[V]=W[$]=W[j]=W[ue]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[b]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),T3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),L3e=Be((e,t)=>{var n=O$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),H$=Be((e,t)=>{var n=P3e(),r=T3e(),i=L3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),A3e=Be((e,t)=>{var n=w3e(),r=_3e(),i=$_(),o=F$(),a=E3e(),s=H$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),M3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),I3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),O3e=Be((e,t)=>{var n=I3e(),r=n(Object.keys,Object);t.exports=r}),R3e=Be((e,t)=>{var n=M3e(),r=O3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),N3e=Be((e,t)=>{var n=N$(),r=$$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),D3e=Be((e,t)=>{var n=A3e(),r=R3e(),i=N3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),z3e=Be((e,t)=>{var n=y3e(),r=x3e(),i=D3e();function o(a){return n(a,i,r)}t.exports=o}),B3e=Be((e,t)=>{var n=z3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),O=m.get(l);if(M&&O)return M==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=m1(),r=Mu(),i=n(r,"DataView");t.exports=i}),$3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Promise");t.exports=i}),H3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Set");t.exports=i}),W3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"WeakMap");t.exports=i}),V3e=Be((e,t)=>{var n=F3e(),r=F_(),i=$3e(),o=H3e(),a=W3e(),s=Qb(),l=D$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=b||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(O){var R=s(O),N=R==h?O.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case T:return v}return R}),t.exports=M}),U3e=Be((e,t)=>{var n=s3e(),r=B$(),i=m3e(),o=B3e(),a=V3e(),s=$_(),l=F$(),u=H$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,T,M,O,R){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,ue=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return R||(R=new n),N||u(P)?r(P,k,T,M,O,R):i(P,k,V,T,M,O,R);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=ue&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return R||(R=new n),O(J,K,T,M,R)}}return W?(R||(R=new n),o(P,k,T,M,O,R)):!1}t.exports=E}),G3e=Be((e,t)=>{var n=U3e(),r=tS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),W$=Be((e,t)=>{var n=G3e();function r(i,o){return n(i,o)}t.exports=r}),j3e=["ctrl","shift","alt","meta","mod"],Y3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Ew(e,t=","){return typeof e=="string"?e.split(t):e}function jm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Y3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!j3e.includes(o));return{...r,keys:i}}function q3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function K3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function X3e(e){return V$(e,["input","textarea","select"])}function V$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Z3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var Q3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},J3e=C.exports.createContext(void 0),e5e=()=>C.exports.useContext(J3e),t5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),n5e=()=>C.exports.useContext(t5e),r5e=M$(W$());function i5e(e){let t=C.exports.useRef(void 0);return(0,r5e.default)(t.current,e)||(t.current=e),t.current}var YA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function gt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=i5e(a),{enabledScopes:h}=n5e(),g=e5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Z3e(h,u?.scopes))return;let m=w=>{if(!(X3e(w)&&!V$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){YA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Ew(e,u?.splitKey).forEach(E=>{let P=jm(E,u?.combinationKey);if(Q3e(w,P,o)||P.keys?.includes("*")){if(q3e(w,P,u?.preventDefault),!K3e(w,P,u?.enabled)){YA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.addHotkey(jm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.removeHotkey(jm(w,u?.combinationKey)))}},[e,l,u,h]),i}M$(W$());var i7=new Set;function o5e(e){(Array.isArray(e)?e:[e]).forEach(t=>i7.add(jm(t)))}function a5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=jm(t);for(let r of i7)r.keys?.every(i=>n.keys?.includes(i))&&i7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{o5e(e.key)}),document.addEventListener("keyup",e=>{a5e(e.key)})});function s5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const l5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),u5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),c5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),d5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),f5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var eo=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(eo||{});const h5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},Fa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(xd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(x_,{className:"invokeai__switch-root",...s})]})})};function U$(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Rke(i.target.checked))})]})}const qA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(qA)&&u!==Number(M)&&O(String(u))},[u,M]);const R=z=>{O(z),z.match(qA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=Ze.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(V)),h(V)};return x(pi,{...k,children:ee(xd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(d_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(f_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(p_,{...P,className:"invokeai__number-input-stepper-button"}),x(h_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Iu=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(xd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(OF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},p5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],g5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],m5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],v5e=[{key:"2x",value:2},{key:"4x",value:4}],H_=0,W_=4294967295,y5e=["gfpgan","codeformer"],b5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],S5e=dt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),x5e=dt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(S5e),{isGFPGANAvailable:i}=Le(x5e),o=l=>e(t5(l)),a=l=>e(EV(l)),s=l=>e(n5(l.target.value));return ee(en,{direction:"column",gap:2,children:[x(Iu,{label:"Type",validValues:y5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function w5e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return x(Fa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(NV(r.target.checked))})}var G$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},KA=ae.createContext&&ae.createContext(G$),nd=globalThis&&globalThis.__assign||function(){return nd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ws(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:O,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:ue,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Me=Ie=>{const We=Ze.clamp(b?Math.floor(Number(Ie.target.value)):Number(Ie.target.value),o,me);ce(String(We)),l(We)},xe=Ie=>{ce(Ie),l(Number(Ie))},be=()=>{!T||T()};return ee(xd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(oB,{w:"100%",gap:2,children:[ee(S_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...G,children:[h&&ee(Wn,{children:[x(qC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(qC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(UF,{className:"invokeai__slider_track",...j,children:x(GF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(VF,{className:"invokeai__slider-thumb",...ue})})]}),v&&ee(d_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Me,className:"invokeai__slider-number-field",isDisabled:R,...W,children:[x(f_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(EF,{...ne,children:[x(p_,{className:"invokeai__slider-number-stepper"}),x(h_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(U_,{}),onClick:be,isDisabled:M,...K})]})]})}function Y$(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return x(ws,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(O7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(O7(.5))}})}const q$=()=>x(Bl,{flex:"1",textAlign:"left",children:"Other Options"}),A5e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(TV(r.target.checked))})})},M5e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(OV(r.target.checked))})})},K$=()=>ee(en,{gap:2,direction:"column",children:[x(M5e,{}),x(A5e,{})]}),G_=()=>x(Bl,{flex:"1",textAlign:"left",children:"Seed"});function I5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Fa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Ike(r.target.checked))})}function O5e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(v2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:H_,max:W_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const X$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function R5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(v2(X$(H_,W_))),children:x("p",{children:"Shuffle"})})}function N5e(){const e=qe(),t=Le(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(BV(r)),value:t,isInteger:!1})}function D5e(){const e=qe(),t=Le(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(MV(r)),value:t,isInteger:!1})}const j_=()=>ee(en,{gap:2,direction:"column",children:[x(I5e,{}),ee(en,{gap:2,children:[x(O5e,{}),x(R5e,{})]}),x(en,{gap:2,children:x(N5e,{})}),x(en,{gap:2,children:x(D5e,{})})]});function Z$(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Oke(i.target.checked))})]})}const z5e=dt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),B5e=dt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le(z5e),{isESRGANAvailable:r}=Le(B5e);return ee("div",{className:"upscale-options",children:[x(Iu,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(R7(Number(a.target.value))),validValues:v5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(N7(a)),value:n,isInteger:!1})]})};function F5e(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return x(Fa,{isChecked:e,width:"auto",onChange:r=>t(Tke(r.target.checked))})}function q_(){return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(F5e,{})]})}function $5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(xd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(F8,{...s,className:"input-entry",size:"sm",width:o})]})}function H5e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n(RV(i.target.value));return x($5e,{label:"Seed Weights",value:e,isInvalid:t&&!(z_(e)||e===""),isDisabled:!t,onChange:r})}function W5e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Dke(i)),isInteger:!1})}const K_=()=>ee(en,{gap:2,direction:"column",children:[x(W5e,{}),x(H5e,{})]});function V5e(){const e=qe(),t=Le(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(kV(r)),value:t,width:X_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=dt(e=>e.options,e=>xS[e.activeTab],{memoizeOptions:{equalityCheck:Ze.isEqual}}),U5e=dt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Q$=e=>e.options;function G5e(){const e=Le(i=>i.options.height),t=Le(_r),n=qe();return x(Iu,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(PV(Number(i.target.value))),validValues:m5e,styleClass:"main-option-block"})}const j5e=dt([e=>e.options,U5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function Y5e(){const e=qe(),{iterations:t,mayGenerateMultipleImages:n}=Le(j5e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(kke(i)),value:t,width:X_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function q5e(){const e=Le(r=>r.options.sampler),t=qe();return x(Iu,{label:"Sampler",value:e,onChange:r=>t(IV(r.target.value)),validValues:p5e,styleClass:"main-option-block"})}function K5e(){const e=qe(),t=Le(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(zV(r)),value:t,width:X_,styleClass:"main-option-block",textAlign:"center"})}function X5e(){const e=Le(i=>i.options.width),t=Le(_r),n=qe();return x(Iu,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(FV(Number(i.target.value))),validValues:g5e,styleClass:"main-option-block"})}const X_="auto";function Z_(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(Y5e,{}),x(K5e,{}),x(V5e,{})]}),ee("div",{className:"main-options-row",children:[x(X5e,{}),x(G5e,{}),x(q5e,{})]})]})})}const Z5e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},J$=Bb({name:"system",initialState:Z5e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:Q5e,setIsProcessing:yu,addLogEntry:Co,setShouldShowLogViewer:Pw,setIsConnected:XA,setSocketId:vTe,setShouldConfirmOnDelete:eH,setOpenAccordions:J5e,setSystemStatus:e4e,setCurrentStatus:Z3,setSystemConfig:t4e,setShouldDisplayGuides:n4e,processingCanceled:r4e,errorOccurred:ZA,errorSeen:tH,setModelList:QA,setIsCancelable:n0,modelChangeRequested:i4e,setSaveIntermediatesInterval:o4e,setEnableImageDebugging:a4e,generationRequested:s4e,addToast:fm,clearToastQueue:l4e,setProcessingIndeterminateTask:u4e}=J$.actions,c4e=J$.reducer;function d4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function f4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function nH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function h4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const g4e=dt(e=>e.system,e=>e.shouldDisplayGuides),m4e=({children:e,feature:t})=>{const n=Le(g4e),{text:r}=h5e[t];return n?ee(g_,{trigger:"hover",children:[x(y_,{children:x(Bl,{children:e})}),ee(v_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(m_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},v4e=ke(({feature:e,icon:t=d4e},n)=>x(m4e,{feature:e,children:x(Bl,{ref:n,children:x(va,{marginBottom:"-.15rem",as:t})})}));function y4e(e){const{header:t,feature:n,options:r}=e;return ee(Vf,{className:"advanced-settings-item",children:[x("h2",{children:ee(Hf,{className:"advanced-settings-header",children:[t,x(v4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const Q_=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return x(wb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(J5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(y4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function b4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function S4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function x4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function rH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function iH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function J_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function oH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function nS(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function JA(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function v1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function ek(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function tk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const K4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],nk=e=>e.kind==="line"&&e.layer==="mask",X4e=e=>e.kind==="line"&&e.layer==="base",f4=e=>e.kind==="image"&&e.layer==="base",Z4e=e=>e.kind==="line",Dn=e=>e.canvas,Ou=e=>e.canvas.layerState.stagingArea.images.length>0,uH=e=>e.canvas.layerState.objects.find(f4),cH=dt([e=>e.options,e=>e.system,uH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(z_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ze.isEqual,resultEqualityCheck:Ze.isEqual}}),o7=ti("socketio/generateImage"),Q4e=ti("socketio/runESRGAN"),J4e=ti("socketio/runFacetool"),ebe=ti("socketio/deleteImage"),a7=ti("socketio/requestImages"),eM=ti("socketio/requestNewImages"),tbe=ti("socketio/cancelProcessing"),nbe=ti("socketio/requestSystemConfig"),dH=ti("socketio/requestModelChange"),rbe=ti("socketio/saveStagingAreaImageToGallery"),ibe=ti("socketio/requestEmptyTempFolder"),ra=ke((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function fH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(cH),o=Le(_r),a=()=>{r(o7(o))};return gt(["ctrl+enter","meta+enter"],()=>{i&&r(o7(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x($4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const obe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function hH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(obe),a=()=>n(tbe());return gt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(p4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const abe=dt(e=>e.options,e=>e.shouldLoopback),sbe=()=>{const e=qe(),t=Le(abe);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(W4e,{}),onClick:()=>{e(Ake(!t))}})},rk=()=>{const e=Le(_r);return ee("div",{className:"process-buttons",children:[x(fH,{}),e==="img2img"&&x(sbe,{}),x(hH,{})]})},lbe=dt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ik=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(lbe),{isReady:r}=Le(cH),i=C.exports.useRef(null),o=s=>{e(wS(s.target.value))};gt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(o7(n)))};return x("div",{className:"prompt-bar",children:x(xd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(JF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function pH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function gH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function ube(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function cbe(e,t){e.classList?e.classList.add(t):ube(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function tM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function dbe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=tM(e.className,t):e.setAttribute("class",tM(e.className&&e.className.baseVal||"",t))}const nM={disabled:!1},mH=ae.createContext(null);var vH=function(t){return t.scrollTop},hm="unmounted",Pf="exited",Tf="entering",$p="entered",s7="exiting",Ru=function(e){e_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=$p:r.unmountOnExit||r.mountOnEnter?l=hm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===hm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==$p&&(o=Tf):(a===Tf||a===$p)&&(o=s7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Cy.findDOMNode(this);a&&vH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:hm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Cy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||nM.disabled){this.safeSetState({status:$p},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:$p},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Cy.findDOMNode(this);if(!o||nM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:s7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Cy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===hm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Z8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(mH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ru.contextType=mH;Ru.propTypes={};function Op(){}Ru.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ru.UNMOUNTED=hm;Ru.EXITED=Pf;Ru.ENTERING=Tf;Ru.ENTERED=$p;Ru.EXITING=s7;const fbe=Ru;var hbe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return cbe(t,r)})},Tw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return dbe(t,r)})},ok=function(e){e_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Gc=(e,t)=>Math.round(e/t)*t,Rp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},rM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),pbe=e=>({width:Gc(e.width,64),height:Gc(e.height,64)}),gbe=.999,mbe=.1,vbe=20,jg=.95,pm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},ybe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:pm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},bH=Bb({name:"canvas",initialState:ybe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!nk(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(Ze.clamp(n.width,64,512),64),height:gl(Ze.clamp(n.height,64,512),64)},o={x:Gc(n.width/2-i.width/2,64),y:Gc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...pm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Rp(r.width,r.height,n.width,n.height,jg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(Ze.clamp(i,64,n/e.stageScale),64),s=gl(Ze.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=pbe(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=rM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...pm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(Z4e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=pm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(f4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Rp(i.width,i.height,512,512,jg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Rp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=rM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(f4)){const i=Rp(r.width,r.height,512,512,jg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Rp(r,i,s,l,jg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Rp(r,i,512,512,jg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...pm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(Ze.clamp(o,64,512),64),height:gl(Ze.clamp(a,64,512),64)},l={x:Gc(o/2-s.width/2,64),y:Gc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:bbe,addLine:SH,addPointToCurrentLine:xH,clearMask:Sbe,commitStagingAreaImage:xbe,discardStagedImages:wbe,fitBoundingBoxToStage:yTe,nextStagingAreaImage:Cbe,prevStagingAreaImage:_be,redo:kbe,resetCanvas:wH,resetCanvasInteractionState:Ebe,resetCanvasView:Pbe,resizeAndScaleCanvas:CH,resizeCanvas:Tbe,setBoundingBoxCoordinates:Lw,setBoundingBoxDimensions:gm,setBoundingBoxPreviewFill:bTe,setBrushColor:Lbe,setBrushSize:Aw,setCanvasContainerDimensions:Abe,clearCanvasHistory:_H,setCursorPosition:kH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ak,setInpaintReplace:iM,setIsDrawing:rS,setIsMaskEnabled:EH,setIsMouseOverBoundingBox:Yy,setIsMoveBoundingBoxKeyHeld:STe,setIsMoveStageKeyHeld:xTe,setIsMovingBoundingBox:oM,setIsMovingStage:h4,setIsTransformingBoundingBox:Mw,setLayer:PH,setMaskColor:Mbe,setMergedCanvas:Ibe,setShouldAutoSave:Obe,setShouldCropToBoundingBoxOnSave:Rbe,setShouldDarkenOutsideBoundingBox:Nbe,setShouldLockBoundingBox:wTe,setShouldPreserveMaskedArea:Dbe,setShouldShowBoundingBox:zbe,setShouldShowBrush:CTe,setShouldShowBrushPreview:_Te,setShouldShowCanvasDebugInfo:Bbe,setShouldShowCheckboardTransparency:kTe,setShouldShowGrid:Fbe,setShouldShowIntermediates:$be,setShouldShowStagingImage:Hbe,setShouldShowStagingOutline:aM,setShouldSnapToGrid:Wbe,setShouldUseInpaintReplace:Vbe,setStageCoordinates:TH,setStageDimensions:ETe,setStageScale:Ube,setTool:M0,toggleShouldLockBoundingBox:PTe,toggleTool:TTe,undo:Gbe}=bH.actions,jbe=bH.reducer,LH=""+new URL("logo.13003d72.png",import.meta.url).href,Ybe=dt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),sk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(Ybe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;gt("o",()=>{t(ad(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),gt("esc",()=>{t(ad(!1))},{enabled:()=>!i,preventDefault:!0},[i]),gt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Eke(a.current?a.current.scrollTop:0)),t(ad(!1)),t(Lke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Mke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(yH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(pH,{}):x(gH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:LH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function qbe(){Le(t=>t.options.showAdvancedOptions);const e={seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})},face_restore:{header:x(U$,{}),feature:eo.FACE_CORRECTION,options:x(V_,{})},upscale:{header:x(Z$,{}),feature:eo.UPSCALE,options:x(Y_,{})},other:{header:x(q$,{}),feature:eo.OTHER,options:x(K$,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Y$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(w5e,{}),x(Q_,{accordionInfo:e})]})}const lk=C.exports.createContext(null),Kbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(lk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(ek,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},Xbe=dt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),l7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Av(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(Xbe),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(ebe(e)),o()};gt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(eH(!b.target.checked));return ee(Wn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(CF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Z0,{children:ee(_F,{className:"modal",children:[x(Ob,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Nv,{children:ee(en,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(xd,{children:ee(en,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(x_,{checked:!s,onChange:v})]})})]})}),ee(Ib,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),rd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(g_,{...o,children:[x(y_,{children:t}),ee(v_,{className:`invokeai__popover-content ${r}`,children:[i&&x(m_,{className:"invokeai__popover-arrow"}),n]})]})},Zbe=dt([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),AH=()=>{const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(Zbe),m=c2(),v=()=>{!u||(h&&e(gd(!1)),e(m2(u)),e(ko("img2img")))},b=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};gt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(wke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};gt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(v2(u.metadata.image.seed))};gt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(wS(u.metadata.image.prompt));gt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(Q4e(u))};gt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(J4e(u))};gt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(DV(!l)),O=()=>{!u||(h&&e(gd(!1)),e(ak(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return gt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(G4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(JA,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:O,leftIcon:x(JA,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:b,leftIcon:x(nS,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(aH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(mt,{icon:x(H4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(mt,{icon:x(U4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(mt,{icon:x(k4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(rd,{trigger:"hover",triggerComponent:x(mt,{icon:x(I4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(V_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(rd,{trigger:"hover",triggerComponent:x(mt,{icon:x(L4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Y_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(mt,{icon:x(oH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(l7,{image:u,children:x(mt,{icon:x(v1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},Qbe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},MH=Bb({name:"gallery",initialState:Qbe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:r0,clearIntermediateImage:Iw,removeImage:IH,setCurrentImage:Jbe,addGalleryImages:eSe,setIntermediateImage:tSe,selectNextImage:uk,selectPrevImage:ck,setShouldPinGallery:nSe,setShouldShowGallery:id,setGalleryScrollPosition:rSe,setGalleryImageMinimumWidth:Yg,setGalleryImageObjectFit:iSe,setShouldHoldGalleryOpen:OH,setShouldAutoSwitchToNewImages:oSe,setCurrentCategory:qy,setGalleryWidth:aSe,setShouldUseSingleGalleryColumn:sSe}=MH.actions,lSe=MH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var RH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Wn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function uSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const In=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(en,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(uSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(nS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(en,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(RH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),cSe=(e,t)=>e.image.uuid===t.image.uuid,NH=C.exports.memo(({image:e,styleClass:t})=>{const n=qe();gt("esc",()=>{n(DV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:b,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:O,type:R,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(en,{gap:1,direction:"column",width:"100%",children:[ee(en,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(RH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Wn,{children:[R&&x(In,{label:"Generation type",value:R}),e.metadata?.model_weights&&x(In,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(R)&&x(In,{label:"Original image",value:g}),R==="gfpgan"&&M!==void 0&&x(In,{label:"Fix faces strength",value:M,onClick:()=>n(t5(M))}),R==="esrgan"&&E!==void 0&&x(In,{label:"Upscaling scale",value:E,onClick:()=>n(R7(E))}),R==="esrgan"&&M!==void 0&&x(In,{label:"Upscaling strength",value:M,onClick:()=>n(N7(M))}),b&&x(In,{label:"Prompt",labelPosition:"top",value:X3(b),onClick:()=>n(wS(b))}),k!==void 0&&x(In,{label:"Seed",value:k,onClick:()=>n(v2(k))}),O!==void 0&&x(In,{label:"Noise Threshold",value:O,onClick:()=>n(BV(O))}),m!==void 0&&x(In,{label:"Perlin Noise",value:m,onClick:()=>n(MV(m))}),w&&x(In,{label:"Sampler",value:w,onClick:()=>n(IV(w))}),T&&x(In,{label:"Steps",value:T,onClick:()=>n(zV(T))}),o!==void 0&&x(In,{label:"CFG scale",value:o,onClick:()=>n(kV(o))}),N&&N.length>0&&x(In,{label:"Seed-weight pairs",value:d4(N),onClick:()=>n(RV(d4(N)))}),P&&x(In,{label:"Seamless",value:P,onClick:()=>n(OV(P))}),l&&x(In,{label:"High Resolution Optimization",value:l,onClick:()=>n(TV(l))}),z&&x(In,{label:"Width",value:z,onClick:()=>n(FV(z))}),s&&x(In,{label:"Height",value:s,onClick:()=>n(PV(s))}),u&&x(In,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(m2(u))}),h&&x(In,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(AV(h))}),R==="img2img"&&M&&x(In,{label:"Image to image strength",value:M,onClick:()=>n(O7(M))}),a&&x(In,{label:"Image to image fit",value:a,onClick:()=>n(NV(a))}),v&&v.length>0&&ee(Wn,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:ue,strength:W}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(In,{label:"Scale",value:ue,onClick:()=>n(R7(ue))}),x(In,{label:"Strength",value:W,onClick:()=>n(N7(W))})]},j)}else if($.type==="gfpgan"){const{strength:ue}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(In,{label:"Strength",value:ue,onClick:()=>{n(t5(ue)),n(n5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:ue,fidelity:W}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(In,{label:"Strength",value:ue,onClick:()=>{n(t5(ue)),n(n5("codeformer"))}}),W&&x(In,{label:"Fidelity",value:W,onClick:()=>{n(EV(W)),n(n5("codeformer"))}})]},j)}})]}),i&&x(In,{withCopy:!0,label:"Dream Prompt",value:i}),ee(en,{gap:2,direction:"column",children:[ee(en,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(nS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(eB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},cSe),DH=dt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function dSe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le(DH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(ck())},g=()=>{e(uk())},m=()=>{e(gd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(_b,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(rH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(NH,{image:i,styleClass:"current-image-metadata"})]})}const fSe=dt([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),zH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(fSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Wn,{children:[x(AH,{}),x(dSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(h4e,{})})})},hSe=()=>{const e=C.exports.useContext(lk);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(ek,{}),onClick:e||void 0})};function pSe(){const e=Le(i=>i.options.initialImage),t=qe(),n=c2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(_V())};return ee(Wn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(hSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(_b,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const gSe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(pSe,{})}):x(Kbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(zH,{})})]})};function mSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var vSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},_Se=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],dM="__resizable_base__",BH=function(e){SSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(dM):o.className+=dM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||xSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Ow(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Ow(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Ow(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Dp("left",o),s=i&&Dp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,M=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),N=Math.min(v,T);n=Xy(n,M,O),r=Xy(r,R,N)}else n=Xy(n,h,g),r=Xy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&wSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Zy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Zy(n)?n.touches[0].clientX:n.clientX,h=Zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=CSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=cM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=cM(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=uM(M,this.props.grid[0]),z=uM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(b.endsWith("vw")){var ue=M/this.window.innerWidth*100;M=ue+"vw"}else if(b.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var ue=T/this.window.innerWidth*100;T=ue+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Dl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(bSe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return _Se.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function d2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,kSe(i,...t)]}function kSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ESe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function FH(...e){return t=>e.forEach(n=>ESe(n,t))}function ja(...e){return C.exports.useCallback(FH(...e),e)}const Fv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(TSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(u7,Ln({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(u7,Ln({},r,{ref:t}),n)});Fv.displayName="Slot";const u7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...LSe(r,n.props),ref:FH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});u7.displayName="SlotClone";const PSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function TSe(e){return C.exports.isValidElement(e)&&e.type===PSe}function LSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const ASe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Pu=ASe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Fv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Ln({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $H(e,t){e&&Dl.exports.flushSync(()=>e.dispatchEvent(t))}function HH(e){const t=e+"CollectionProvider",[n,r]=d2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(b,P.collectionRef);return ae.createElement(Fv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(b,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Fv,{[h]:"",ref:T},E)});function m(v){const b=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((M,O)=>P.indexOf(M.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const MSe=C.exports.createContext(void 0);function WH(e){const t=C.exports.useContext(MSe);return e||t||"ltr"}function Ol(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ISe(e,t=globalThis?.document){const n=Ol(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const c7="dismissableLayer.update",OSe="dismissableLayer.pointerDownOutside",RSe="dismissableLayer.focusOutside";let fM;const NSe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DSe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(NSe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,R=zSe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!O||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=BSe(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ISe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(fM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),hM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=fM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),hM())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(c7,z),()=>document.removeEventListener(c7,z)},[]),C.exports.createElement(Pu.div,Ln({},u,{ref:w,style:{pointerEvents:M?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function zSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){VH(OSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function BSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&VH(RSe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hM(){const e=new CustomEvent(c7);document.dispatchEvent(e)}function VH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$H(i,o):i.dispatchEvent(o)}let Rw=0;function FSe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:pM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:pM()),Rw++,()=>{Rw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Rw--}},[])}function pM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Nw="focusScope.autoFocusOnMount",Dw="focusScope.autoFocusOnUnmount",gM={bubbles:!1,cancelable:!0},$Se=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ol(i),h=Ol(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){vM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Nw,gM);s.addEventListener(Nw,u),s.dispatchEvent(P),P.defaultPrevented||(HSe(jSe(UH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(Nw,u),setTimeout(()=>{const P=new CustomEvent(Dw,gM);s.addEventListener(Dw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Dw,h),vM.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=WSe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Pu.div,Ln({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function HSe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function WSe(e){const t=UH(e),n=mM(t,e),r=mM(t.reverse(),e);return[n,r]}function UH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function mM(e,t){for(const n of e)if(!VSe(n,{upTo:t}))return n}function VSe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function USe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&USe(e)&&t&&e.select()}}const vM=GSe();function GSe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=yM(e,t),e.unshift(t)},remove(t){var n;e=yM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function yM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jSe(e){return e.filter(t=>t.tagName!=="A")}const J0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},YSe=Zw["useId".toString()]||(()=>{});let qSe=0;function KSe(e){const[t,n]=C.exports.useState(YSe());return J0(()=>{e||n(r=>r??String(qSe++))},[e]),e||(t?`radix-${t}`:"")}function y1(e){return e.split("-")[0]}function iS(e){return e.split("-")[1]}function b1(e){return["top","bottom"].includes(y1(e))?"x":"y"}function dk(e){return e==="y"?"height":"width"}function bM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=b1(t),l=dk(s),u=r[l]/2-i[l]/2,h=y1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(iS(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const XSe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=bM(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=GH(r),h={x:i,y:o},g=b1(a),m=iS(a),v=dk(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const O=P/2-k/2,R=u[w],N=M-b[v]-u[E],z=M/2-b[v]/2+O,V=d7(R,z,N),ue=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zexe[t])}function txe(e,t,n){n===void 0&&(n=!1);const r=iS(e),i=b1(e),o=dk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=m4(a)),{main:a,cross:m4(a)}}const nxe={start:"end",end:"start"};function xM(e){return e.replace(/start|end/g,t=>nxe[t])}const rxe=["top","right","bottom","left"];function ixe(e){const t=m4(e);return[xM(e),t,xM(t)]}const oxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=y1(r),P=g||(w===a||!v?[m4(a)]:ixe(a)),k=[a,...P],T=await g4(t,b),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=txe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(O=[...O,{placement:r,overflows:M}],!M.every(V=>V<=0)){var R,N;const V=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=k[V];if($)return{data:{index:V,overflows:O},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const ue=(z=O.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;ue&&(j=ue);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function wM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function CM(e){return rxe.some(t=>e[t]>=0)}const axe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await g4(r,{...n,elementContext:"reference"}),a=wM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:CM(a)}}}case"escaped":{const o=await g4(r,{...n,altBoundary:!0}),a=wM(o,i.floating);return{data:{escapedOffsets:a,escaped:CM(a)}}}default:return{}}}}};async function sxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=y1(n),s=iS(n),l=b1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const lxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await sxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function jH(e){return e==="x"?"y":"x"}const uxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await g4(t,l),g=b1(y1(i)),m=jH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=d7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],T=b-h[P];b=d7(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},cxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=b1(i),m=jH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,N=o.reference[g]+o.reference[O]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const O=g==="y"?"width":"height",R=["top","left"].includes(y1(i)),N=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function YH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!YH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function f2(e){return Nu(e).getComputedStyle(e)}function Tu(e){return YH(e)?"":e?(e.nodeName||"").toLowerCase():""}function qH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Rl(e){return e instanceof Nu(e).HTMLElement}function pd(e){return e instanceof Nu(e).Element}function dxe(e){return e instanceof Nu(e).Node}function fk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oS(e){const{overflow:t,overflowX:n,overflowY:r}=f2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function fxe(e){return["table","td","th"].includes(Tu(e))}function KH(e){const t=/firefox/i.test(qH()),n=f2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function XH(){return!/^((?!chrome|android).)*safari/i.test(qH())}const _M=Math.min,Ym=Math.max,v4=Math.round;function Lu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Rl(e)&&(l=e.offsetWidth>0&&v4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&v4(s.height)/e.offsetHeight||1);const h=pd(e)?Nu(e):window,g=!XH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function kd(e){return((dxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function aS(e){return pd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ZH(e){return Lu(kd(e)).left+aS(e).scrollLeft}function hxe(e){const t=Lu(e);return v4(t.width)!==e.offsetWidth||v4(t.height)!==e.offsetHeight}function pxe(e,t,n){const r=Rl(t),i=kd(t),o=Lu(e,r&&hxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Tu(t)!=="body"||oS(i))&&(a=aS(t)),Rl(t)){const l=Lu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=ZH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function QH(e){return Tu(e)==="html"?e:e.assignedSlot||e.parentNode||(fk(e)?e.host:null)||kd(e)}function kM(e){return!Rl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function gxe(e){let t=QH(e);for(fk(t)&&(t=t.host);Rl(t)&&!["html","body"].includes(Tu(t));){if(KH(t))return t;t=t.parentNode}return null}function f7(e){const t=Nu(e);let n=kM(e);for(;n&&fxe(n)&&getComputedStyle(n).position==="static";)n=kM(n);return n&&(Tu(n)==="html"||Tu(n)==="body"&&getComputedStyle(n).position==="static"&&!KH(n))?t:n||gxe(e)||t}function EM(e){if(Rl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Lu(e);return{width:t.width,height:t.height}}function mxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rl(n),o=kd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Tu(n)!=="body"||oS(o))&&(a=aS(n)),Rl(n))){const l=Lu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function vxe(e,t){const n=Nu(e),r=kd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=XH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function yxe(e){var t;const n=kd(e),r=aS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ym(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ym(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+ZH(e);const l=-r.scrollTop;return f2(i||n).direction==="rtl"&&(s+=Ym(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function JH(e){const t=QH(e);return["html","body","#document"].includes(Tu(t))?e.ownerDocument.body:Rl(t)&&oS(t)?t:JH(t)}function y4(e,t){var n;t===void 0&&(t=[]);const r=JH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],oS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(y4(a))}function bxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Sxe(e,t){const n=Lu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function PM(e,t,n){return t==="viewport"?p4(vxe(e,n)):pd(t)?Sxe(t,n):p4(yxe(kd(e)))}function xxe(e){const t=y4(e),r=["absolute","fixed"].includes(f2(e).position)&&Rl(e)?f7(e):e;return pd(r)?t.filter(i=>pd(i)&&bxe(i,r)&&Tu(i)!=="body"):[]}function wxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?xxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=PM(t,h,i);return u.top=Ym(g.top,u.top),u.right=_M(g.right,u.right),u.bottom=_M(g.bottom,u.bottom),u.left=Ym(g.left,u.left),u},PM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Cxe={getClippingRect:wxe,convertOffsetParentRelativeRectToViewportRelativeRect:mxe,isElement:pd,getDimensions:EM,getOffsetParent:f7,getDocumentElement:kd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:pxe(t,f7(n),r),floating:{...EM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>f2(e).direction==="rtl"};function _xe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...pd(e)?y4(e):[],...y4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),pd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Lu(e):null;s&&b();function b(){const w=Lu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const kxe=(e,t,n)=>XSe(e,t,{platform:Cxe,...n});var h7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function p7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!p7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!p7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Exe(e){const t=C.exports.useRef(e);return h7(()=>{t.current=e}),t}function Pxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Exe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);p7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||kxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Dl.exports.flushSync(()=>{h(T)})})},[g,n,r]);h7(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);h7(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Txe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?SM({element:t.current,padding:n}).fn(i):{}:t?SM({element:t,padding:n}).fn(i):{}}}};function Lxe(e){const[t,n]=C.exports.useState(void 0);return J0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const eW="Popper",[hk,tW]=d2(eW),[Axe,nW]=hk(eW),Mxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Axe,{scope:t,anchor:r,onAnchorChange:i},n)},Ixe="PopperAnchor",Oxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=nW(Ixe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Pu.div,Ln({},i,{ref:s}))}),b4="PopperContent",[Rxe,LTe]=hk(b4),[Nxe,Dxe]=hk(b4,{hasParent:!1,positionUpdateFns:new Set}),zxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...O}=e,R=nW(b4,h),[N,z]=C.exports.useState(null),V=ja(t,_t=>z(_t)),[$,j]=C.exports.useState(null),ue=Lxe($),W=(n=ue?.width)!==null&&n!==void 0?n:0,Q=(r=ue?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Fxe),altBoundary:G},{reference:ce,floating:me,strategy:Me,x:xe,y:be,placement:Ie,middlewareData:We,update:De}=Pxe({strategy:"fixed",placement:ne,whileElementsMounted:_xe,middleware:[lxe({mainAxis:m+Q,alignmentAxis:b}),M?uxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?cxe():void 0,...X}):void 0,$?Txe({element:$,padding:w}):void 0,M?oxe({...X}):void 0,$xe({arrowWidth:W,arrowHeight:Q}),T?axe({strategy:"referenceHidden"}):void 0].filter(Bxe)});J0(()=>{ce(R.anchor)},[ce,R.anchor]);const Qe=xe!==null&&be!==null,[st,Ct]=rW(Ie),ft=(i=We.arrow)===null||i===void 0?void 0:i.x,ut=(o=We.arrow)===null||o===void 0?void 0:o.y,vt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ee,Je]=C.exports.useState();J0(()=>{N&&Je(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Dxe(b4,h),pt=!Lt;C.exports.useLayoutEffect(()=>{if(!pt)return it.add(De),()=>{it.delete(De)}},[pt,it,De]),C.exports.useLayoutEffect(()=>{pt&&Qe&&Array.from(it).reverse().forEach(_t=>requestAnimationFrame(_t))},[pt,Qe,it]);const an={"data-side":st,"data-align":Ct,...O,ref:V,style:{...O.style,animation:Qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Me,left:0,top:0,transform:Qe?`translate3d(${Math.round(xe)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ee,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Rxe,{scope:h,placedSide:st,onArrowChange:j,arrowX:ft,arrowY:ut,shouldHideArrow:vt},pt?C.exports.createElement(Nxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Pu.div,an)):C.exports.createElement(Pu.div,an)))});function Bxe(e){return e!==void 0}function Fxe(e){return e!==null}const $xe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=rW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return b==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):b==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,M=g?E:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function rW(e){const[t,n="center"]=e.split("-");return[t,n]}const Hxe=Mxe,Wxe=Oxe,Vxe=zxe;function Uxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const iW=e=>{const{present:t,children:n}=e,r=Gxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};iW.displayName="Presence";function Gxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Uxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Jy(r.current);o.current=s==="mounted"?u:"none"},[s]),J0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Jy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),J0(()=>{if(t){const u=g=>{const v=Jy(r.current).includes(g.animationName);g.target===t&&v&&Dl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Jy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Jy(e){return e?.animationName||"none"}function jxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Yxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ol(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Yxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ol(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const zw="rovingFocusGroup.onEntryFocus",qxe={bubbles:!1,cancelable:!0},pk="RovingFocusGroup",[g7,oW,Kxe]=HH(pk),[Xxe,aW]=d2(pk,[Kxe]),[Zxe,Qxe]=Xxe(pk),Jxe=C.exports.forwardRef((e,t)=>C.exports.createElement(g7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(g7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(ewe,Ln({},e,{ref:t}))))),ewe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=WH(o),[b=null,w]=jxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Ol(u),T=oW(n),M=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(zw,k),()=>N.removeEventListener(zw,k)},[k]),C.exports.createElement(Zxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Pu.div,Ln({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(zw,qxe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),ue=$.find(ne=>ne.id===b),Q=[j,ue,...$].filter(Boolean).map(ne=>ne.ref.current);sW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),twe="RovingFocusGroupItem",nwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=KSe(),s=Qxe(twe,n),l=s.currentTabStopId===a,u=oW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(g7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Pu.span,Ln({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=owe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?awe(w,E+1):w.slice(E+1)}setTimeout(()=>sW(w))}})})))}),rwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function owe(e,t,n){const r=iwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rwe[r]}function sW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const swe=Jxe,lwe=nwe,uwe=["Enter"," "],cwe=["ArrowDown","PageUp","Home"],lW=["ArrowUp","PageDown","End"],dwe=[...cwe,...lW],sS="Menu",[m7,fwe,hwe]=HH(sS),[xh,uW]=d2(sS,[hwe,tW,aW]),gk=tW(),cW=aW(),[pwe,lS]=xh(sS),[gwe,mk]=xh(sS),mwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=gk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ol(o),m=WH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Hxe,s,C.exports.createElement(pwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(gwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},vwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=gk(n);return C.exports.createElement(Wxe,Ln({},i,r,{ref:t}))}),ywe="MenuPortal",[ATe,bwe]=xh(ywe,{forceMount:void 0}),od="MenuContent",[Swe,dW]=xh(od),xwe=C.exports.forwardRef((e,t)=>{const n=bwe(od,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lS(od,e.__scopeMenu),a=mk(od,e.__scopeMenu);return C.exports.createElement(m7.Provider,{scope:e.__scopeMenu},C.exports.createElement(iW,{present:r||o.open},C.exports.createElement(m7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(wwe,Ln({},i,{ref:t})):C.exports.createElement(Cwe,Ln({},i,{ref:t})))))}),wwe=C.exports.forwardRef((e,t)=>{const n=lS(od,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return RB(o)},[]),C.exports.createElement(fW,Ln({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Cwe=C.exports.forwardRef((e,t)=>{const n=lS(od,e.__scopeMenu);return C.exports.createElement(fW,Ln({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),fW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=lS(od,n),E=mk(od,n),P=gk(n),k=cW(n),T=fwe(n),[M,O]=C.exports.useState(null),R=C.exports.useRef(null),N=ja(t,R,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),ue=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?SF:C.exports.Fragment,ne=v?{as:Fv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Me=T().filter(Qe=>!Qe.disabled),xe=document.activeElement,be=(X=Me.find(Qe=>Qe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Ie=Me.map(Qe=>Qe.textValue),We=Iwe(Ie,me,be),De=(ce=Me.find(Qe=>Qe.textValue===We))===null||ce===void 0?void 0:ce.ref.current;(function Qe(st){V.current=st,window.clearTimeout(z.current),st!==""&&(z.current=window.setTimeout(()=>Qe(""),1e3))})(me),De&&setTimeout(()=>De.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),FSe();const K=C.exports.useCallback(G=>{var X,ce;return ue.current===((X=j.current)===null||X===void 0?void 0:X.side)&&Rwe(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Swe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=R.current)===null||X===void 0||X.focus(),O(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement($Se,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=R.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(DSe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(swe,Ln({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Vxe,Ln({role:"menu","aria-orientation":"vertical","data-state":Lwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:N,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Me=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Me&&J(G.key));const xe=R.current;if(G.target!==xe||!dwe.includes(G.key))return;G.preventDefault();const Ie=T().filter(We=>!We.disabled).map(We=>We.ref.current);lW.includes(G.key)&&Ie.reverse(),Awe(Ie)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,y7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";ue.current=me,W.current=G.clientX}}))})))))))}),v7="MenuItem",TM="menu.itemSelect",_we=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=mk(v7,e.__scopeMenu),s=dW(v7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(TM,{bubbles:!0,cancelable:!0});g.addEventListener(TM,v=>r?.(v),{once:!0}),$H(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(kwe,Ln({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||uwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),kwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=dW(v7,n),s=cW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(m7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(lwe,Ln({asChild:!0},s,{focusable:!r}),C.exports.createElement(Pu.div,Ln({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,y7(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,y7(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Ewe="MenuRadioGroup";xh(Ewe,{value:void 0,onValueChange:()=>{}});const Pwe="MenuItemIndicator";xh(Pwe,{checked:!1});const Twe="MenuSub";xh(Twe);function Lwe(e){return e?"open":"closed"}function Awe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Iwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Mwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Owe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Rwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Owe(n,t)}function y7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Nwe=mwe,Dwe=vwe,zwe=xwe,Bwe=_we,hW="ContextMenu",[Fwe,MTe]=d2(hW,[uW]),uS=uW(),[$we,pW]=Fwe(hW),Hwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=uS(t),u=Ol(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement($we,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Nwe,Ln({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},Wwe="ContextMenuTrigger",Vwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=pW(Wwe,n),o=uS(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Dwe,Ln({},o,{virtualRef:s})),C.exports.createElement(Pu.span,Ln({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,e3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,e3(u)),onPointerCancel:Kn(e.onPointerCancel,e3(u)),onPointerUp:Kn(e.onPointerUp,e3(u))})))}),Uwe="ContextMenuContent",Gwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=pW(Uwe,n),o=uS(n),a=C.exports.useRef(!1);return C.exports.createElement(zwe,Ln({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),jwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=uS(n);return C.exports.createElement(Bwe,Ln({},i,r,{ref:t}))});function e3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Ywe=Hwe,qwe=Vwe,Kwe=Gwe,Sf=jwe,Xwe=dt([e=>e.gallery,e=>e.options,Ou,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Zwe=dt([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Qwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Jwe=C.exports.memo(e=>{const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(Zwe),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[b,w]=C.exports.useState(!1),E=c2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(wS(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(v2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(gd(!1)),t(m2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(gd(!1)),t(ak(l)),t(CH()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Cke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(xke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Ywe,{onOpenChange:$=>{t(OH($))},children:[x(qwe,{children:ee(Bl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(_b,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Jbe(l)),children:u&&x(va,{width:"50%",height:"50%",as:J_,className:"hoverable-image-check"})}),b&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(l7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(j4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(Kwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:O,children:"Send to Image To Image"}),x(Sf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(l7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},Qwe),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Vz,{className:`invokeai__checkbox ${n}`,...r,children:t})},t3=320,LM=40,e6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},AM=400;function gW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:b,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Le(Xwe),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:AM,galleryMaxWidth:AM}:e6e[u],[O,R]=C.exports.useState(b>=t3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),ue=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{b>=t3&&R(!1)},[b]);const Q=()=>{e(nSe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(id(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(id(!1)),e(OH(!1)),e(rSe(ue.current?ue.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(a7(n))},X=xe=>{e(Yg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};gt("g",()=>{ne()},[o,i]),gt("left",()=>{e(ck())},{enabled:!E},[E]),gt("right",()=>{e(uk())},{enabled:!E},[E]),gt("shift+g",()=>{Q()},[i]),gt("esc",()=>{e(id(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Me=32;return gt("shift+up",()=>{if(s<256){const xe=Ze.clamp(s+Me,32,256);e(Yg(xe))}},[s]),gt("shift+down",()=>{if(s>32){const xe=Ze.clamp(s-Me,32,256);e(Yg(xe))}},[s]),C.exports.useEffect(()=>{!ue.current||(ue.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(be){!i&&j.current&&!j.current.contains(be.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(yH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(BH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:b,height:i?"100%":"100vh"},onResizeStart:(xe,be,Ie)=>{$(Ie.clientHeight),Ie.style.height=`${Ie.clientHeight}px`,i&&(Ie.style.position="fixed",Ie.style.right="1rem",z(!0))},onResizeStop:(xe,be,Ie,We)=>{const De=i?Ze.clamp(Number(b)+We.width,T,Number(M)):Number(b)+We.width;e(aSe(De)),Ie.removeAttribute("data-resize-alert"),i&&(Ie.style.position="relative",Ie.style.removeProperty("right"),Ie.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,be,Ie,We)=>{const De=Ze.clamp(Number(b)+We.width,T,Number(i?M:.95*window.innerWidth));De>=t3&&!O?R(!0):DeDe-LM&&e(Yg(De-LM)),i&&(De>=M?Ie.setAttribute("data-resize-alert","true"):Ie.removeAttribute("data-resize-alert")),Ie.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Wn,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(qy("user")),children:"Uploads"})]}):ee(Wn,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(O4e,{}),onClick:()=>e(qy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(q4e,{}),onClick:()=>e(qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(rd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(tk,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ws,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Yg(64)),icon:x(U_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(iSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(oSe(xe.target.checked))})}),x("div",{children:x(Aa,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(sSe(xe.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(pH,{}):x(gH,{})})]})]}),x("div",{className:"image-gallery-container",ref:ue,children:t.length||v?ee(Wn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:be}=xe;return x(Jwe,{image:xe,isSelected:r===be},be)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(nH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:b+"px",height:"100%"}})]})})}const t6e=dt([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),vk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Le(t6e),l=()=>{t(Nke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(mSe,{})})})]}),!a&&x(gW,{})]})})};function n6e(){return x(vk,{optionsPanel:x(qbe,{}),children:x(gSe,{})})}function r6e(){Le(t=>t.options.showAdvancedOptions);const e={seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})},face_restore:{header:x(U$,{}),feature:eo.FACE_CORRECTION,options:x(V_,{})},upscale:{header:x(Z$,{}),feature:eo.UPSCALE,options:x(Y_,{})},other:{header:x(q$,{}),feature:eo.OTHER,options:x(K$,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Q_,{accordionInfo:e})]})}const i6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(zH,{})})});function o6e(){return x(vk,{optionsPanel:x(r6e,{}),children:x(i6e,{})})}var b7=function(e,t){return b7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},b7(e,t)};function a6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");b7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ll=function(){return Ll=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Ed(e,t,n,r){var i=w6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):yW(e,r,n,function(v){var b=s+h*v,w=l+g*v,E=u+m*v;o(b,w,E)})}}function w6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function C6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var _6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},yk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=C6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=_6e(a,l,u,s,h,g,Boolean(i));return m},e1=function(e,t){var n=yk(e,t);return e.bounds=n,n};function cS(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=S7(e,s-g,u+g,r),b=S7(t,l-m,h+m,r);return{x:v,y:b}}var S7=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function dS(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=cS(g,m,i,o,0,0,null);return v}function h2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var IM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=fS(o,n);return!l},OM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},k6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},E6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function P6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,b=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=dS(e,P,k,i,e.bounds,s||l),M=T.x,O=T.y;return{scale:i,positionX:w?M:n,positionY:E?O:r}}}function T6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,b=!m||!v;if(!(!a||b||!s)){var w=cS(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var L6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},S4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},A6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},M6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function I6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function RM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:S7(e,o,a,i)}function O6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function R6e(e,t){var n=A6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=O6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,b=l-i,w=h*h+g*g,E=Math.sqrt(w)/b;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function N6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=M6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=b.sizeX,O=b.sizeY,R=b.velocityAlignmentTime,N=R,z=I6e(e,l),V=Math.max(z,N),$=S4(e,M),j=S4(e,O),ue=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+ue,ne=h-ue,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();yW(e,T,V,function(ce){var me=e.transformState,Me=me.scale,xe=me.positionX,be=me.positionY,Ie=new Date().getTime()-X,We=Ie/N,De=mW[b.animationType],Qe=1-De(Math.min(1,We)),st=1-ce,Ct=xe+a*st,ft=be+s*st,ut=RM(Ct,G.positionX,xe,k,v,h,u,ne,Q,Qe),vt=RM(ft,G.positionY,be,P,v,m,g,K,J,Qe);(xe!==Ct||be!==ft)&&e.setTransformState(Me,ut,vt)})}}function NM(e,t){var n=e.transformState.scale;bl(e),e1(e,n),t.touches?E6e(e,t):k6e(e,t)}function DM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=L6e(e,t,n),u=l.x,h=l.y,g=S4(e,a),m=S4(e,s);R6e(e,{x:u,y:h}),T6e(e,u,h,g,m)}}function D6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?N6e(e):bW(e)}}function bW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&bW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,w=bk(e,a,v,b);w&&Ed(e,w,h,g)}}function bk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=h2(Da(t,2),o,a,0,!1),u=e1(e,l),h=dS(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var i0={previousScale:1,scale:1,positionX:0,positionY:0},z6e=Ll(Ll({},i0),{setComponents:function(){},contextInstance:null}),qg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},xW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:i0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:i0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:i0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:i0.positionY}},zM=function(e){var t=Ll({},qg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof qg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(qg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ll(Ll({},qg[n]),e[n]):s?t[n]=MM(MM([],qg[n]),e[n]):t[n]=e[n]}}),t},wW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=h2(Da(h,3),s,a,u,!1);return g};function CW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,b=wW(e,t,n),w=bk(e,b,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Ed(e,w,r,i)}function _W(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=xW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=yk(e,a.scale),m=cS(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Ed(e,v,t,n)}}function B6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return i0;var l=r.getBoundingClientRect(),u=F6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/m,w=r.offsetHeight/v,E=h2(n||Math.min(b,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,O=yk(e,E),R=cS(T,M,O,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function F6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function $6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var H6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),CW(e,1,t,n,r)}},W6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),CW(e,-1,t,n,r)}},V6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Ed(e,v,i,o)}}},U6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),_W(e,t,n)}},G6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=kW(t||i.scale,o,a);Ed(e,s,n,r)}}},j6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&$6e(a)&&a&&o.contains(a)){var s=B6e(e,a,n);Ed(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:H6e(e),zoomOut:W6e(e),setTransform:V6e(e),resetTransform:U6e(e),centerView:G6e(e),zoomToElement:j6e(e)}},Bw=!1;function Fw(){try{var e={get passive(){return Bw=!0,!1}};return e}catch{return Bw=!1,Bw}}var fS=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},BM=function(e){e&&clearTimeout(e)},Y6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},kW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},q6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=fS(u,a);return!g};function K6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=s6e(t,n);return r}function EW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var X6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var b=r?!1:!m,w=h2(Da(v,3),u,l,g,b);return w},Z6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},Q6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=fS(a,i);return!l},J6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},eCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},PW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},tCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return h2(Da(g,2),a,o,l,!u)},nCe=160,rCe=100,iCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},oCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,b=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=K6e(t,null),P=X6e(e,E,w,!t.ctrlKey);if(l!==P){var k=e1(e,P),T=EW(t,o,l),M=b||v===0||h,O=u&&M,R=dS(e,T.x,T.y,P,k,O),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},aCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;BM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(SW(e,t.x,t.y),e.wheelAnimationTimer=null)},rCe);var o=Z6e(e,t);o&&(BM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},nCe))},sCe=function(e,t){var n=PW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},lCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=eCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=PW(t),v=tCe(e,m);if(v!==i){var b=e1(e,v),w=u||h===0||s,E=a&&w,P=dS(e,g.x,g.y,v,b,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},uCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,SW(e,t?.x,t?.y)};function cCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return _W(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=wW(e,h,o),m=EW(t,u,l),v=bk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Ed(e,v,a,s)}}var dCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=fS(l,s);return!(g||!h)},TW=ae.createContext(z6e),fCe=function(e){a6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=xW(n.props),n.setup=zM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Fw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=q6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(iCe(n,r),oCe(n,r),aCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=IM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),NM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=OM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),DM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(D6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=Q6e(n,r);!l||(sCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=J6e(n);!l||(r.preventDefault(),r.stopPropagation(),lCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(uCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=IM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),NM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=OM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];DM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=dCe(n,r);!o||cCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,e1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=kW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=Y6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Fw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Fw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(e1(this,this.transformState.scale),this.setup=zM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(TW.Provider,{value:Ll(Ll({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),hCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(fCe,{...Ll({},e,{setRef:i})})});function pCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var gCe=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,FM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};pCe(gCe);var mCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(TW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+FM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+FM.content+" "+o,style:s,children:t})})};function vCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(hCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:b})=>ee(Wn,{children:[ee("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(T5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(mt,{icon:x(L5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(E5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(P5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(f4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(U_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(mCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b()})})]})})}function yCe(){const e=qe(),t=Le(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Le(DH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(ck())},g=()=>{e(uk())};return gt("Esc",()=>{t&&e(gd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(mt,{icon:x(k5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(gd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(AH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(rH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Wn,{children:[x(vCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(NH,{image:n})]})]}),x(gW,{})]})]})}const bCe=dt(Dn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),SCe=()=>{const e=qe(),{boundingBoxDimensions:t}=Le(bCe),n=a=>{e(gm({...t,width:Math.floor(a)}))},r=a=>{e(gm({...t,height:Math.floor(a)}))},i=()=>{e(gm({...t,width:Math.floor(512)}))},o=()=>{e(gm({...t,height:Math.floor(512)}))};return ee(en,{direction:"column",gap:"1rem",children:[x(ws,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(ws,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},xCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Bounding Box"}),p2=e=>e.system,wCe=e=>e.system.toastQueue,CCe=dt(Dn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function _Ce(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Le(CCe),n=qe();return ee(en,{alignItems:"center",columnGap:"1rem",children:[x(ws,{label:"Inpaint Replace",value:e,onChange:r=>{n(iM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(iM(1)),isResetDisabled:!t}),x(Fa,{isChecked:t,onChange:r=>n(Vbe(r.target.checked))})]})}const kCe=dt([Q$,p2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ECe=()=>{const e=qe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Le(kCe);return ee(en,{direction:"column",gap:"1rem",children:[x(_Ce,{}),x(ws,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(wI(u))},handleReset:()=>e(wI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(xI(u))},handleReset:()=>{e(xI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(_I(u))},handleReset:()=>{e(_I(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(CI(u))},handleReset:()=>{e(CI(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(Fa,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(Pke(u.target.checked))}}),x(Iu,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(LV(u.target.value))}),x(ws,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(kI(u))},handleReset:()=>{e(kI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function TCe(){const e={boundingBox:{header:x(xCe,{}),feature:eo.BOUNDING_BOX,options:x(SCe,{})},outpainting:{header:x(PCe,{}),feature:eo.OUTPAINTING,options:x(ECe,{})},seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Y$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q_,{accordionInfo:e})]})}const LCe=dt(Dn,uH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),ACe=()=>{const e=qe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Le(LCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Abe({width:a,height:s})),e(Tbe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(r2,{thickness:"2px",speed:"1s",size:"xl"})})};var MCe=Math.PI/180;function ICe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const I0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:I0,version:"8.3.14",isBrowser:ICe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*MCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:I0.document,_injectGlobal(e){I0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var OCe="[object Array]",RCe="[object Number]",NCe="[object String]",DCe="[object Boolean]",zCe=Math.PI/180,BCe=180/Math.PI,$w="#",FCe="",$Ce="0",HCe="Konva warning: ",$M="Konva error: ",WCe="rgb(",Hw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},VCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,n3=[];const UCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===OCe},_isNumber(e){return Object.prototype.toString.call(e)===RCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===NCe},_isBoolean(e){return Object.prototype.toString.call(e)===DCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){n3.push(e),n3.length===1&&UCe(function(){const t=n3;n3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace($w,FCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=$Ce+e;return $w+e},getRGB(e){var t;return e in Hw?(t=Hw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===$w?this._hexToRgb(e.substring(1)):e.substr(0,4)===WCe?(t=VCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Hw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Pd(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function LW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function AW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Pd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Sk(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function S1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function MW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function GCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function jCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Pd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Kg="get",Xg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Kg+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Xg+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Xg+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=Kg+a(t),l=Xg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Xg+n,i=Kg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Kg+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Kg+de._capitalize(n),a=Xg+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function YCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=qCe+u.join(HM)+KCe)):(o+=s.property,t||(o+=e7e+s.val)),o+=QCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=n7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=WM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=YCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var Q3="absoluteOpacity",i3="allEventListeners",cu="absoluteTransform",VM="absoluteScale",xf="canvas",a7e="Change",s7e="children",l7e="konva",x7="listening",UM="mouseenter",GM="mouseleave",jM="set",YM="Shape",J3=" ",qM="stage",Mc="transform",u7e="Stage",w7="visible",c7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(J3);let d7e=1;class $e{constructor(t){this._id=d7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===cu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===cu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(J3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(xf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===cu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(xf)){const{scene:t,filter:n,hit:r}=this._cache.get(xf);de.releaseCanvas(t,n,r),this._cache.delete(xf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new O0({pixelRatio:a,width:i,height:o}),v=new O0({pixelRatio:a,width:0,height:0}),b=new xk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(xf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Q3),this._clearSelfAndDescendantCache(VM),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(xf,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(xf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==s7e&&(r=jM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(x7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(w7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==u7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(cu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(cu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Q3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",zp=e=>{const t=bm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Vw.pointer;if(t==="touch")return Vw.touch;if(t==="mouse")return Vw.mouse};function XM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const y7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",e5=[];class gS extends ca{constructor(t){super(XM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{XM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===h7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&e5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(y7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new O0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+KM,this.content.style.height=n+KM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rm7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return OW(t,this)}setPointerCapture(t){RW(t,this)}releaseCapture(t){qm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||v7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=zp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=zp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=zp(t.type),r=bm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=zp(t.type),r=bm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=zp(t.type),r=bm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Ww(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=zp(t.type),r=bm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Ww(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(C7,{evt:t}):this._fire(C7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(_7,{evt:t}):this._fire(_7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Ww(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(o0,wk(t)),qm(t.pointerId)}_lostpointercapture(t){qm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new O0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new xk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}gS.prototype.nodeType=f7e;gr(gS);q.addGetterSetter(gS,"container");var GW="hasShadow",jW="shadowRGBA",YW="patternImage",qW="linearGradient",KW="radialGradient";let u3;function Uw(){return u3||(u3=de.createCanvasElement().getContext("2d"),u3)}const Km={};function b7e(e){e.fill()}function S7e(e){e.stroke()}function x7e(e){e.fill()}function w7e(e){e.stroke()}function C7e(){this._clearCache(GW)}function _7e(){this._clearCache(jW)}function k7e(){this._clearCache(YW)}function E7e(){this._clearCache(qW)}function P7e(){this._clearCache(KW)}class Ae extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Km)););this.colorKey=n,Km[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(GW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(YW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Uw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(qW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Uw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Km[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return OW(t,this)}setPointerCapture(t){RW(t,this)}releaseCapture(t){qm(t)}}Ae.prototype._fillFunc=b7e;Ae.prototype._strokeFunc=S7e;Ae.prototype._fillFuncHit=x7e;Ae.prototype._strokeFuncHit=w7e;Ae.prototype._centroid=!1;Ae.prototype.nodeType="Shape";gr(Ae);Ae.prototype.eventListeners={};Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",C7e);Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",_7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",E7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",P7e);q.addGetterSetter(Ae,"stroke",void 0,MW());q.addGetterSetter(Ae,"strokeWidth",2,Fe());q.addGetterSetter(Ae,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ae,"hitStrokeWidth","auto",Sk());q.addGetterSetter(Ae,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ae,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ae,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ae,"lineJoin");q.addGetterSetter(Ae,"lineCap");q.addGetterSetter(Ae,"sceneFunc");q.addGetterSetter(Ae,"hitFunc");q.addGetterSetter(Ae,"dash");q.addGetterSetter(Ae,"dashOffset",0,Fe());q.addGetterSetter(Ae,"shadowColor",void 0,S1());q.addGetterSetter(Ae,"shadowBlur",0,Fe());q.addGetterSetter(Ae,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ae,"shadowOffset",["x","y"]);q.addGetterSetter(Ae,"shadowOffsetX",0,Fe());q.addGetterSetter(Ae,"shadowOffsetY",0,Fe());q.addGetterSetter(Ae,"fillPatternImage");q.addGetterSetter(Ae,"fill",void 0,MW());q.addGetterSetter(Ae,"fillPatternX",0,Fe());q.addGetterSetter(Ae,"fillPatternY",0,Fe());q.addGetterSetter(Ae,"fillLinearGradientColorStops");q.addGetterSetter(Ae,"strokeLinearGradientColorStops");q.addGetterSetter(Ae,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ae,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ae,"fillRadialGradientColorStops");q.addGetterSetter(Ae,"fillPatternRepeat","repeat");q.addGetterSetter(Ae,"fillEnabled",!0);q.addGetterSetter(Ae,"strokeEnabled",!0);q.addGetterSetter(Ae,"shadowEnabled",!0);q.addGetterSetter(Ae,"dashEnabled",!0);q.addGetterSetter(Ae,"strokeScaleEnabled",!0);q.addGetterSetter(Ae,"fillPriority","color");q.addComponentsGetterSetter(Ae,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ae,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ae,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ae,"fillPatternScale",["x","y"]);q.addGetterSetter(Ae,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ae,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ae,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ae,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ae,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ae,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ae,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ae,"fillPatternRotation",0);q.backCompat(Ae,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var T7e="#",L7e="beforeDraw",A7e="draw",XW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],M7e=XW.length;class wh extends ca{constructor(t){super(t),this.canvas=new O0,this.hitCanvas=new xk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(L7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(A7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}wh.prototype.nodeType="Layer";gr(wh);q.addGetterSetter(wh,"imageSmoothingEnabled",!0);q.addGetterSetter(wh,"clearBeforeDraw",!0);q.addGetterSetter(wh,"hitGraphEnabled",!0,Ms());class Ck extends wh{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Ck.prototype.nodeType="FastLayer";gr(Ck);class t1 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}t1.prototype.nodeType="Group";gr(t1);var Gw=function(){return I0.performance&&I0.performance.now?function(){return I0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Gw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=ZM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=QM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===ZM?this.setTime(t):this.state===QM&&this.setTime(this.duration-t)}pause(){this.state=O7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Xm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=R7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new N7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)I7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Xm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function k7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function eI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Rn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Rn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Rn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],M=l,O=u,R,N,z,V,$,j,ue,W,Q,ne;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var J=b.shift(),K=b.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break;case"a":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:O},pathLength:this.calcLength(M,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Rn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},O=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=O([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=O(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,R,V,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];gr(Rn);q.addGetterSetter(Rn,"data");class Ch extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Rn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}Ch.prototype.className="Arrow";gr(Ch);q.addGetterSetter(Ch,"pointerLength",10,Fe());q.addGetterSetter(Ch,"pointerWidth",10,Fe());q.addGetterSetter(Ch,"pointerAtBeginning",!1);q.addGetterSetter(Ch,"pointerAtEnding",!0);class x1 extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}x1.prototype._centroid=!0;x1.prototype.className="Circle";x1.prototype._attrsAffectingSize=["radius"];gr(x1);q.addGetterSetter(x1,"radius",0,Fe());class Td extends Ae{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Td.prototype.className="Ellipse";Td.prototype._centroid=!0;Td.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Td);q.addComponentsGetterSetter(Td,"radius",["x","y"]);q.addGetterSetter(Td,"radiusX",0,Fe());q.addGetterSetter(Td,"radiusY",0,Fe());class Is extends Ae{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var ZW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],D7e="Change.konva",z7e="none",E7="up",P7="right",T7="down",L7="left",B7e=ZW.length;class _k extends t1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}kh.prototype.className="RegularPolygon";kh.prototype._centroid=!0;kh.prototype._attrsAffectingSize=["radius"];gr(kh);q.addGetterSetter(kh,"radius",0,Fe());q.addGetterSetter(kh,"sides",0,Fe());var tI=Math.PI*2;class Eh extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,tI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),tI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Eh.prototype.className="Ring";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Eh);q.addGetterSetter(Eh,"innerRadius",0,Fe());q.addGetterSetter(Eh,"outerRadius",0,Fe());class $l extends Ae{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var d3;function Yw(){return d3||(d3=de.createCanvasElement().getContext(H7e),d3)}function Q7e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function J7e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function e9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ae{constructor(t){super(e9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(W7e,n),this}getWidth(){var t=this.attrs.width===Bp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Bp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Yw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+c3+this.fontVariant()+c3+(this.fontSize()+j7e)+Z7e(this.fontFamily())}_addTextLine(t){this.align()===Zg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Yw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Bp&&o!==void 0,l=a!==Bp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==iI,w=v!==K7e&&b,E=this.ellipsis();this.textArr=[],Yw().font=this._getContextFont();for(var P=E?this._getTextWidth(jw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",V=0;R>>1,j=M.slice(0,$+1),ue=this._getTextWidth(j)+P;ue<=h?(R=$+1,z=j,V=ue):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===c3||Q===nI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(c3),z.lastIndexOf(nI))+1,W>0&&(R=W,z=z.slice(0,R),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(O=this._getTextWidth(M),O<=h)){this._addTextLine(M),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Bp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==iI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Bp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+jw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=QW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var ue=t.dataArray,W=w+1;W0)return w=W,ue[W];ue[W].command==="M"&&(m={x:ue[W].points[0],y:ue[W].points[1]})}return{}},k=function(ue){var W=t._getTextSize(ue).width+r;ue===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;b===void 0;)b=P(),b&&J+b.pathLengthW?v=Rn.getPointOnLine(W,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],X=b.points[5],ce=b.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Rn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?W>b.pathLength?E=1e-8:E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength/2:E=Math.max(E-(Q-W)/b.pathLength/2,0),E>1&&(E=1,K=!0),v=Rn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength:E-=(Q-W)/b.pathLength,E>1&&(E=1,K=!0),v=Rn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(Q=Rn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,b=void 0)}},T="C",M=t._getTextSize(T).width+r,O=u/M-1,R=0;Re+`.${oV}`).join(" "),oI="nodesRect",r9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],i9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const o9e="ontouchstart"in rt._global;function a9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(i9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var x4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],aI=1e8;function s9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function aV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function l9e(e,t){const n=s9e(e);return aV(e,t,n)}function u9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(r9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(oI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(oI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return aV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-aI,y:-aI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),x4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new g2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:o9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=a9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ae({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let ue=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(ue-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+ue,Q=rt.getAngle(this.rotationSnapTolerance()),J=u9e(this.rotationSnaps(),W,Q)-g.rotation,K=l9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),t1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function c9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){x4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+x4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",x4,c9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function sI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var d9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],f9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function h9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,T,M,O,R,N,z,V,$,j,ue,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new sI,X=null,ce=G,me=null,Me=null,xe=d9e[t],be=f9e[t];for(s=1;s>be,j!==0?(j=255/j,n[h]=(m*xe>>be)*j,n[h+1]=(v*xe>>be)*j,n[h+2]=(b*xe>>be)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>be,j>0?(j=255/j,n[l]=(m*xe>>be)*j,n[l+1]=(v*xe>>be)*j,n[l+2]=(b*xe>>be)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&h9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const g9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const v9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,V=O>0?O:-O;if(z>N&&(R=M),V>N&&(R=O),R*=t,i){var $=s[E]+R,j=s[E+1]+R,ue=s[E+2]+R;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=ue>255?255:ue<0?0:ue}else{var W=n-R;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function qw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const y9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,T,M,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,O=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,O,R=360/T*Math.PI/180,N,z;for(O=0;OT?k:T;var M=a,O=o,R,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function M9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const N9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,LW,q.afterSetFilter);const z9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,LW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const B9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},$9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` +`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Wl(d):""}var Mh=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function bn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Od(d,f,y){if(kr.current!==Bo)throw Error(a(168));bn(kr,f),bn(Gr,y)}function Ul(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,bn(kr,d),bn(Gr,Gr.current),!0}function Rd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Ul(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),bn(kr,d)):En(Gr),bn(Gr,y)}var vi=Math.clz32?Math.clz32:Nd,Ih=Math.log,Oh=Math.LN2;function Nd(d){return d>>>=0,d===0?32:31-(Ih(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Gl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function zd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Vi=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var qt=je(pe,Pt,ve[Ft],Ve);if(qt===null){Pt===null&&(Pt=Br);break}d&&Pt&&qt.alternate===null&&f(pe,Pt),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Bn&&Hs(pe,Ft),Pe;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=je(pe,Pt,qt.value,Ve);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Pe=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(qt.done)return y(pe,Pt),Bn&&Hs(pe,Ft),Pe;if(Pt===null){for(;!qt.done;Ft++,qt=ve.next())qt=At(pe,qt.value,Ve),qt!==null&&(se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return Bn&&Hs(pe,Ft),Pe}for(Pt=_(pe,Pt);!qt.done;Ft++,qt=ve.next())qt=$n(Pt,pe,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Pt.delete(qt.key===null?Ft:qt.key),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Bn&&Hs(pe,Ft),Pe}function Xo(pe,se,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Pe=ve.key,Mt=se;Mt!==null;){if(Mt.key===Pe){if(Pe=ve.type,Pe===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&G1(Pe)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=wa(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,Ve,ve.key),se.return=pe,pe=se):(Ve=ff(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wa(pe,se,ve),Ve.return=pe,pe=Ve)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,Ve),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),Ve)}if(ne(ve))return Pn(pe,se,ve,Ve);if(R(ve))return nr(pe,se,ve,Ve);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=Sp(ve,pe.mode,Ve),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var Ju=P2(!0),T2=P2(!1),qd={},po=zo(qd),Ca=zo(qd),re=zo(qd);function ye(d){if(d===qd)throw Error(a(174));return d}function ge(d,f){bn(re,f),bn(Ca,d),bn(po,qd),d=K(f),En(po),bn(po,d)}function Ge(){En(po),En(Ca),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(bn(Ca,d),bn(po,f))}function Qt(d){Ca.current===d&&(En(po),En(Ca))}var Ot=zo(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||$u(y)||Id(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Kd=[];function j1(){for(var d=0;dy?y:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=y,ec.transition=_}}function sc(){return Si().memoizedState}function eg(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,y);else if(y=Qu(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),tf(y,f,_)}}function lc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,jd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Qu(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),tf(y,f,_))}}function uc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function cc(d,f){Xd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function tf(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,jl(d,y)}}var ts={readContext:Ui,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},_S={readContext:Ui,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Ui,useEffect:M2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Xl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Xl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Xl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=eg.bind(null,Sn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:A2,useDebugValue:Z1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=A2(!1),f=d[0];return d=J1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=Sn,L=qr();if(Bn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Kl&30)!==0||X1(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,M2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Jd(9,oc.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Bn){var y=Sa,_=Vi;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=tc++,0cp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Bn)return oi(f),null}else 2*Un()-L.renderingStartTime>cp&&y!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(ji&1073741824)!==0&&(oi(f),ft&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function lg(d,f){switch(H1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Gr),En(kr),j1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Ot),null;case 4:return Ge(),null;case 10:return Ud(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,AS=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Zh=!1;function Ql(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:ft&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Zh,Zh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Qh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ug(d){var f=d.alternate;f!==null&&(d.alternate=null,ug(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function ep(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(ep(d,f,y),d=d.sibling;d!==null;)ep(d,f,y),d=d.sibling}function cg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?zn(y,d,f):_e(y,d);else if(_!==4&&(d=d.child,d!==null))for(cg(d,f,y),d=d.sibling;d!==null;)cg(d,f,y),d=d.sibling}var br=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||pc(y,f);case 6:if(ft){var _=br,L=Yo;br=null,qo(d,f,y),br=_,Yo=L,br!==null&&(Yo?tt(br,y.stateNode):ct(br,y.stateNode))}else qo(d,f,y);break;case 18:ft&&br!==null&&(Yo?D1(br,y.stateNode):N1(br,y.stateNode));break;case 4:ft?(_=br,L=Yo,br=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),br=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=ya(_),Fu(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(pc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function tp(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new AS),f.forEach(function(_){var L=K2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case op:return":has("+(hg(d)||"")+")";case ap:return'[role="'+d.value+'"]';case sp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*MS(_/1960))-_,10<_){d.timeoutHandle=De(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?hp.bind(null,d):null}function pp(d,f){var y=Sc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=y,f!==null&&gp(f)),d}function gp(d){wi===null?wi=d:wi.push.apply(wi,d)}function Yi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,dp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-mg?Qs(d,0):gg|=y),Xr(d,f)}function xg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function OS(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),xg(d,y)}function K2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),xg(d,y)}var wg;wg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,TS(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Bn&&(f.flags&1048576)!==0&&$1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;_a(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,y),L=q1(null,f,_,d,L,y);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,V1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,U1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Bn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=yp(_),d=Ho(_,d),L){case 0:f=rg(null,f,_,d,y);break e;case 1:f=$2(null,f,_,d,y);break e;case 11:f=D2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),rg(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),$2(d,f,_,L,y);case 3:e:{if(H2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,C2(d,f),Wh(f,_,null,y);var H=f.memoizedState;if(_=H.element,vt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=W2(d,f,_,y,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=W2(d,f,_,y,L);break e}else for(vt&&(fo=T1(f.stateNode.containerInfo),Gn=f,Bn=!0,Ri=null,ho=!1),y=T2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Ku(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&$d(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Ie(_,L)?H=null:I!==null&&Ie(_,I)&&(f.flags|=32),F2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&$d(f),null;case 13:return V2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),D2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,w2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var Ne=I.updateQueue;if(Ne!==null){Ne=Ne.shared;var et=Ne.pending;et===null?fe.next=fe:(fe.next=et.next,et.next=fe),Ne.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),Gd(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),Gd(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,y),L=Ui(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return z2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),_a(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,y),k2(f,_,L),U1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return G2(d,f,y);case 22:return B2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function ka(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new ka(d,f,y,_)}function Cg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function yp(d){if(typeof d=="function")return Cg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function qi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function ff(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")Cg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function bp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function Sp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function hf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=st,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function X2(d,f,y,_,L,I,H,oe,fe){return d=new hf(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},V1(I),d}function _g(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Ul(d,y,f)}return f}function kg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=ue(f),d===null?null:d.stateNode}function pf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&I>=At&&L<=et&&H<=je){d.splice(f,1);break}else if(_!==Ne||y.width!==fe.width||jeH){if(!(I!==At||y.height!==fe.height||et<_||Ne>L)){Ne>_&&(fe.width+=Ne-_,fe.x=_),etI&&(fe.height+=At-I,fe.y=I),jey&&(y=H)),H ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:xp,findFiberByHostInstance:d.findFiberByHostInstance||Eg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!_t)throw Error(a(363));d=pg(d,f);var L=Yt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=_g(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Hh(d,L,H)),H},n};(function(e){e.exports=H9e})(sV);const W9e=q7(sV.exports);var kk={exports:{}},Ph={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */Ph.ConcurrentRoot=1;Ph.ContinuousEventPriority=4;Ph.DefaultEventPriority=16;Ph.DiscreteEventPriority=1;Ph.IdleEventPriority=536870912;Ph.LegacyRoot=0;(function(e){e.exports=Ph})(kk);const lI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let uI=!1,cI=!1;const Ek=".react-konva-event",V9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,U9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,G9e={};function mS(e,t,n=G9e){if(!uI&&"zIndex"in t&&(console.warn(U9e),uI=!0),!cI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(V9e),cI=!0)}for(var o in n)if(!lI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!lI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ad(e));for(var l in v)e.on(l+Ek,v[l])}function Ad(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const lV={},j9e={};ch.Node.prototype._applyProps=mS;function Y9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ad(e)}function q9e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return mS(l,o),l}function K9e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function X9e(e,t,n){return!1}function Z9e(e){return e}function Q9e(){return null}function J9e(){return null}function e8e(e,t,n,r){return j9e}function t8e(){}function n8e(e){}function r8e(e,t){return!1}function i8e(){return lV}function o8e(){return lV}const a8e=setTimeout,s8e=clearTimeout,l8e=-1;function u8e(e,t){return!1}const c8e=!1,d8e=!0,f8e=!0;function h8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ad(e)}function p8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ad(e)}function uV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ad(e)}function g8e(e,t,n){uV(e,t,n)}function m8e(e,t){t.destroy(),t.off(Ek),Ad(e)}function v8e(e,t){t.destroy(),t.off(Ek),Ad(e)}function y8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function b8e(e,t,n){}function S8e(e,t,n,r,i){mS(e,i,r)}function x8e(e){e.hide(),Ad(e)}function w8e(e){}function C8e(e,t){(t.visible==null||t.visible)&&e.show()}function _8e(e,t){}function k8e(e){}function E8e(){}const P8e=()=>kk.exports.DefaultEventPriority,T8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:Y9e,createInstance:q9e,createTextInstance:K9e,finalizeInitialChildren:X9e,getPublicInstance:Z9e,prepareForCommit:Q9e,preparePortalMount:J9e,prepareUpdate:e8e,resetAfterCommit:t8e,resetTextContent:n8e,shouldDeprioritizeSubtree:r8e,getRootHostContext:i8e,getChildHostContext:o8e,scheduleTimeout:a8e,cancelTimeout:s8e,noTimeout:l8e,shouldSetTextContent:u8e,isPrimaryRenderer:c8e,warnsIfNotActing:d8e,supportsMutation:f8e,appendChild:h8e,appendChildToContainer:p8e,insertBefore:uV,insertInContainerBefore:g8e,removeChild:m8e,removeChildFromContainer:v8e,commitTextUpdate:y8e,commitMount:b8e,commitUpdate:S8e,hideInstance:x8e,hideTextInstance:w8e,unhideInstance:C8e,unhideTextInstance:_8e,clearContainer:k8e,detachDeletedInstance:E8e,getCurrentEventPriority:P8e,now:s0.exports.unstable_now,idlePriority:s0.exports.unstable_IdlePriority,run:s0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var L8e=Object.defineProperty,A8e=Object.defineProperties,M8e=Object.getOwnPropertyDescriptors,dI=Object.getOwnPropertySymbols,I8e=Object.prototype.hasOwnProperty,O8e=Object.prototype.propertyIsEnumerable,fI=(e,t,n)=>t in e?L8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hI=(e,t)=>{for(var n in t||(t={}))I8e.call(t,n)&&fI(e,n,t[n]);if(dI)for(var n of dI(t))O8e.call(t,n)&&fI(e,n,t[n]);return e},R8e=(e,t)=>A8e(e,M8e(t));function Pk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Pk(r,t,n);if(i)return i;r=t?null:r.sibling}}function cV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Tk=cV(C.exports.createContext(null));class dV extends C.exports.Component{render(){return x(Tk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:N8e,ReactCurrentDispatcher:D8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z8e(){const e=C.exports.useContext(Tk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=N8e.current)!=null?r:Pk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const em=[],pI=new WeakMap;function B8e(){var e;const t=z8e();em.splice(0,em.length),Pk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Tk&&em.push(cV(i))});for(const n of em){const r=(e=D8e.current)==null?void 0:e.readContext(n);pI.set(n,r)}return C.exports.useMemo(()=>em.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,R8e(hI({},i),{value:pI.get(r)}))),n=>x(dV,{...hI({},n)})),[])}function F8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const $8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=F8e(e),o=B8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Sm.createContainer(n.current,kk.exports.LegacyRoot,!1,null),Sm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),Sm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),mS(n.current,e,i),Sm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},h3="Layer",dh="Group",R0="Rect",tm="Circle",w4="Line",fV="Image",H8e="Transformer",Sm=W9e(T8e);Sm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const W8e=ae.forwardRef((e,t)=>x(dV,{children:x($8e,{...e,forwardedRef:t})})),V8e=dt([Dn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),U8e=e=>{const{...t}=e,{objects:n}=Le(V8e);return x(dh,{listening:!1,...t,children:n.filter(nk).map((r,i)=>x(w4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},vS=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},G8e=dt(Dn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:g,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:vS(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||g||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),j8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Le(G8e);return l?ee(dh,{listening:!1,...t,children:[x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},Y8e=dt(Dn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),q8e=e=>{const{...t}=e,n=qe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:b,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Le(Y8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Lw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=Gc(Q,64),K=Gc(ne,64);W.target.x(J),W.target.y(K),n(Lw({x:J,y:K}))},[n,v]),O=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(gm({width:J,height:K})),n(Lw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),R=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Mw(!0))},z=()=>{n(Mw(!1)),n(Yy(!1))},V=()=>{n(oM(!0))},$=()=>{n(Mw(!1)),n(oM(!1)),n(Yy(!1))},j=()=>{n(Yy(!0))},ue=()=>{!u&&!l&&n(Yy(!1))};return ee(dh,{...t,children:[x(R0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&b==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:ue,onMouseOver:j,onMouseUp:$,onTransform:O,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(H8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:b==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&b==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let hV=null,pV=null;const K8e=e=>{hV=e},C4=()=>hV,X8e=e=>{pV=e},Z8e=()=>pV,Q8e=dt([Dn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),J8e=()=>{const e=qe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Le(Q8e),i=C.exports.useRef(null),o=Z8e();gt("esc",()=>{e(Ebe())},{enabled:()=>!0,preventDefault:!0}),gt("shift+h",()=>{e(zbe(!n))},{preventDefault:!0},[t,n]),gt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(M0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(M0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},e_e=dt(Dn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:vS(t)}}),gI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),t_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(e_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=gI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=gI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(R0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},n_e=dt([Dn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),r_e=e=>{const t=qe(),{isMoveStageKeyHeld:n,stageScale:r}=Le(n_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Ze.clamp(r*gbe**s,mbe,vbe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Ube(l)),t(TH(u))},[e,n,r,t])},yS=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},i_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),o_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(i_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(h4(!0));return}const o=yS(e.current);!o||(i.evt.preventDefault(),t(rS(!0)),t(SH([o.x,o.y])))},[e,n,r,t])},a_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),s_e=(e,t)=>{const n=qe(),{tool:r,isDrawing:i,isStaging:o}=Le(a_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(h4(!1));return}if(!t.current&&i&&e.current){const a=yS(e.current);if(!a)return;n(xH([a.x,a.y]))}else t.current=!1;n(rS(!1))},[t,n,i,o,e,r])},l_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),u_e=(e,t,n)=>{const r=qe(),{isDrawing:i,tool:o,isStaging:a}=Le(l_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=yS(e.current);!s||(r(kH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(xH([s.x,s.y]))))},[t,r,i,a,n,e,o])},c_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),d_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(c_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=yS(e.current);!o||n==="move"||r||(t(rS(!0)),t(SH([o.x,o.y])))},[e,n,r,t])},f_e=()=>{const e=qe();return C.exports.useCallback(()=>{e(kH(null)),e(rS(!1))},[e])},h_e=dt([Dn,Ou],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),p_e=()=>{const e=qe(),{tool:t,isStaging:n}=Le(h_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(h4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(TH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(h4(!1))},[e,n,t])}};var wf=C.exports,g_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const gV=e=>{const{url:t,x:n,y:r}=e,[i]=g_e(t);return x(fV,{x:n,y:r,image:i,listening:!1})},m_e=dt([Dn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),v_e=()=>{const{objects:e}=Le(m_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(f4(t))return x(gV,{x:t.x,y:t.y,url:t.image.url},n);if(X4e(t))return x(w4,{points:t.points,stroke:t.color?vS(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},y_e=dt([Dn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),b_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},S_e=()=>{const{colorMode:e}=Yv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Le(y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=b_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,O=Ze.range(0,T).map(N=>x(w4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=Ze.range(0,M).map(N=>x(w4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(O.concat(R))},[t,n,r,e,a]),x(dh,{children:i})},x_e=dt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),w_e=e=>{const{...t}=e,n=Le(x_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(fV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},C_e=dt([Dn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function __e(){const{cursorCoordinatesString:e}=Le(C_e);return x("div",{children:`Cursor Position: ${e}`})}const p3=e=>Math.round(e*100)/100,k_e=dt([Dn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:g}=e;return{activeLayerColor:g==="mask"?"var(--status-working-color)":"inherit",activeLayerString:g.charAt(0).toUpperCase()+g.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${p3(s)}, ${p3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${p3(r)}\xD7${p3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),E_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Le(k_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&ee(Wn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(__e,{})]})]})},P_e=dt([Dn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),T_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Le(P_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(gV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(R0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(R0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},L_e=dt([Dn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),A_e=()=>{const e=qe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Le(L_e),o=C.exports.useCallback(()=>{e(aM(!1))},[e]),a=C.exports.useCallback(()=>{e(aM(!0))},[e]);gt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),gt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),gt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(_be()),l=()=>e(Cbe()),u=()=>e(xbe());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(w4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(C4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(J_,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(M4e,{}):x(A4e,{}),onClick:()=>e(Hbe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(sH,{}),onClick:()=>e(rbe(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(v1,{}),onClick:()=>e(wbe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},M_e=dt([Dn,Ou],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let b="";return h==="move"||t?g?b="grabbing":b="grab":o?b=void 0:a?b="move":b="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:b,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),I_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Le(M_e);J8e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{X8e($),g.current=$},[]),b=C.exports.useCallback($=>{K8e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=r_e(g),k=o_e(g),T=s_e(g,E),M=u_e(g,E,w),O=d_e(g),R=f_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=p_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(W8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:O,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(h3,{id:"grid",visible:r,children:x(S_e,{})}),x(h3,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:x(v_e,{})}),ee(h3,{id:"mask",visible:e,listening:!1,children:[x(U8e,{visible:!0,listening:!1}),x(t_e,{listening:!1})]}),ee(h3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(j8e,{visible:l!=="move",listening:!1}),x(T_e,{visible:u}),h&&x(w_e,{}),x(q8e,{visible:n&&!u})]})]}),x(E_e,{}),x(A_e,{})]})})},O_e=dt([Dn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function R_e(){const e=qe(),{canUndo:t,activeTabName:n}=Le(O_e),r=()=>{e(Gbe())};return gt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const N_e=dt([Dn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function D_e(){const e=qe(),{canRedo:t,activeTabName:n}=Le(N_e),r=()=>{e(kbe())};return gt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(V4e,{}),onClick:r,isDisabled:!t})}const mV=ke((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Av(),m=C.exports.useRef(null),v=()=>{r(),g()},b=()=>{o&&o(),g()};return ee(Wn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(CF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(Z0,{children:ee(_F,{className:"modal",children:[x(Ob,{fontSize:"lg",fontWeight:"bold",children:s}),x(Nv,{children:a}),ee(Ib,{children:[x(Wa,{ref:m,onClick:b,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),z_e=()=>{const e=qe();return ee(mV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(ibe()),e(wH()),e(_H())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(v1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},B_e=()=>{const e=qe();return ee(mV,{title:"Clear Canvas History",acceptCallback:()=>e(_H()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(v1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},F_e=dt([Dn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),$_e=()=>{const e=qe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Le(F_e);return x(rd,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(tk,{})}),children:ee(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e($be(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(Fbe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(Wbe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(Nbe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(Obe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(Rbe(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(Bbe(l.target.checked))}),x(B_e,{}),x(z_e,{})]})})};function bS(){return(bS=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function A7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var n1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(mI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=M7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(vI(P),!function(M,O){return O&&!Zm(M)}(P,l.current)&&k)){if(Zm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(mI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bS({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),SS=function(e){return e.filter(Boolean).join(" ")},Ak=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=SS(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},yV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},I7=function(e){var t=yV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Kw=function(e){var t=yV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},H_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},W_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},V_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=SS(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Lk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:n1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ak,{className:"react-colorful__hue-pointer",left:t/360,color:I7({h:t,s:100,v:100,a:1})})))}),U_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:I7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Lk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:n1(t.s+100*i.left,0,100),v:n1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ak,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:I7(t)})))}),bV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function G_e(e,t,n){var r=A7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;bV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var j_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Y_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},yI=new Map,q_e=function(e){j_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!yI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,yI.set(t,n);var r=Y_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},K_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Kw(Object.assign({},n,{a:0}))+", "+Kw(Object.assign({},n,{a:1}))+")"},o=SS(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Lk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:n1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ak,{className:"react-colorful__alpha-pointer",left:n.a,color:Kw(n)})))},X_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=vV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);q_e(s);var l=G_e(n,i,o),u=l[0],h=l[1],g=SS(["react-colorful",t]);return ae.createElement("div",bS({},a,{ref:s,className:g}),x(U_e,{hsva:u,onChange:h}),x(V_e,{hue:u.h,onChange:h}),ae.createElement(K_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},Z_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:W_e,fromHsva:H_e,equal:bV},Q_e=function(e){return ae.createElement(X_e,bS({},e,{colorModel:Z_e}))};const SV=e=>{const{styleClass:t,...n}=e;return x(Q_e,{className:`invokeai__color-picker ${t}`,...n})},J_e=dt([Dn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:vS(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),eke=()=>{const e=qe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Le(J_e);gt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),gt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(PH(t==="mask"?"base":"mask"))},a=()=>e(Sbe()),s=()=>e(EH(!r));return x(rd,{trigger:"hover",triggerComponent:x(ia,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(D4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(Dbe(l.target.checked))}),x(SV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mbe(l))}),x(ra,{size:"sm",leftIcon:x(v1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let g3;const tke=new Uint8Array(16);function nke(){if(!g3&&(g3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g3(tke)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function rke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const ike=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bI={randomUUID:ike};function a0(e,t,n){if(bI.randomUUID&&!t&&!e)return bI.randomUUID();e=e||{};const r=e.random||(e.rng||nke)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return rke(r)}const oke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},ake=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},ske=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},lke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},m3=(e=lke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(u4e("Exporting Image")),t(n0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,b=C4();if(!b){t(yu(!1)),t(n0(!0));return}const{dataURL:w,boundingBox:E}=oke(b,h,v,i?{...g,...m}:void 0);if(!w){t(yu(!1)),t(n0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:O,height:R}=T,N={uuid:a0(),category:o?"result":"user",...T};a&&(ake(M),t(fm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(ske(M,O,R),t(fm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(r0({image:N,category:"result"})),t(fm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(Ibe({kind:"image",layer:"base",...E,image:N})),t(fm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(yu(!1)),t(Z3("Connected")),t(n0(!0))},uke=dt([Dn,Ou,p2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),cke=()=>{const e=qe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Le(uke);gt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),gt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["["],()=>{e(Aw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),gt(["]"],()=>{e(Aw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(M0("brush")),a=()=>e(M0("eraser"));return ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(B4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(T4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(M0("eraser"))}),x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(lH,{})}),children:ee(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(ws,{label:"Size",value:r,withInput:!0,onChange:s=>e(Aw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(SV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(Lbe(s))})]})})]})};let SI;const xV=()=>({setOpenUploader:e=>{e&&(SI=e)},openUploader:SI}),dke=dt([p2,Dn,Ou],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),fke=()=>{const e=qe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Le(dke),s=C4(),{openUploader:l}=xV();gt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),gt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),gt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["meta+c","ctrl+c"],()=>{b()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(M0("move")),h=()=>{const P=C4();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(Pbe({contentRect:k}))},g=()=>{e(wH()),e(CH())},m=()=>{e(m3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},b=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Iu,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:K4e,onChange:P=>{const k=P.target.value;e(PH(k)),k==="mask"&&!r&&e(EH(!0))}}),x(eke,{}),x(cke,{}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(_4e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(P4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(N4e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(sH,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(nS,{}),onClick:b,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(aH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(R_e,{}),x(D_e,{})]}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x(ek,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(v1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x($_e,{})})]})},hke=dt([Dn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),pke=()=>{const e=qe(),{doesCanvasNeedScaling:t}=Le(hke);return C.exports.useLayoutEffect(()=>{const n=Ze.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(fke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(ACe,{}):x(I_e,{})})]})})})};function gke(){const e=qe();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(vk,{optionsPanel:x(TCe,{}),styleClass:"inpainting-workarea-overrides",children:x(pke,{})})}const mke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function vke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const yke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(f5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(o6e,{}),tooltip:"Text To Image"},img2img:{title:x(u5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(mke,{fill:"black",boxSize:"2.5rem"}),workarea:x(gke,{}),tooltip:"Unified Canvas"},nodes:{title:x(c5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(s5e,{}),tooltip:"Nodes"},postprocess:{title:x(d5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l5e,{}),tooltip:"Post Processing"},training:{title:x(yke,{fill:"black",boxSize:"2.5rem"}),workarea:x(vke,{}),tooltip:"Training"}},xS=Ze.map(If,(e,t)=>t);[...xS];function bke(){const e=Le(o=>o.options.activeTab),t=Le(o=>o.options.isLightBoxOpen),n=qe();gt("1",()=>{n(ko(0))}),gt("2",()=>{n(ko(1))}),gt("3",()=>{n(ko(2))}),gt("4",()=>{n(ko(3))}),gt("5",()=>{n(ko(4))}),gt("6",()=>{n(ko(5))}),gt("z",()=>{n(gd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(QF,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(XF,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(KF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(ZF,{className:"app-tabs-panels",children:t?x(yCe,{}):i()})]})}const wV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Ske=wV,CV=Bb({name:"options",initialState:Ske,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=X3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=d4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=X3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=d4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=X3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...wV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=xS.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:_V,resetOptionsState:ITe,resetSeed:OTe,setActiveTab:ko,setAllImageToImageParameters:xke,setAllParameters:wke,setAllTextToImageParameters:Cke,setCfgScale:kV,setCodeformerFidelity:EV,setCurrentTheme:_ke,setFacetoolStrength:t5,setFacetoolType:n5,setHeight:PV,setHiresFix:TV,setImg2imgStrength:O7,setInfillMethod:LV,setInitialImage:m2,setIsLightBoxOpen:gd,setIterations:kke,setMaskPath:AV,setOptionsPanelScrollPosition:Eke,setParameter:RTe,setPerlin:MV,setPrompt:wS,setSampler:IV,setSeamBlur:xI,setSeamless:OV,setSeamSize:wI,setSeamSteps:CI,setSeamStrength:_I,setSeed:v2,setSeedWeights:RV,setShouldFitToWidthHeight:NV,setShouldForceOutpaint:Pke,setShouldGenerateVariations:Tke,setShouldHoldOptionsPanelOpen:Lke,setShouldLoopback:Ake,setShouldPinOptionsPanel:Mke,setShouldRandomizeSeed:Ike,setShouldRunESRGAN:Oke,setShouldRunFacetool:Rke,setShouldShowImageDetails:DV,setShouldShowOptionsPanel:ad,setShowAdvancedOptions:NTe,setShowDualDisplay:Nke,setSteps:zV,setThreshold:BV,setTileSize:kI,setUpscalingLevel:R7,setUpscalingStrength:N7,setVariationAmount:Dke,setWidth:FV}=CV.actions,zke=CV.reducer,Nl=Object.create(null);Nl.open="0";Nl.close="1";Nl.ping="2";Nl.pong="3";Nl.message="4";Nl.upgrade="5";Nl.noop="6";const r5=Object.create(null);Object.keys(Nl).forEach(e=>{r5[Nl[e]]=e});const Bke={type:"error",data:"parser error"},Fke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$ke=typeof ArrayBuffer=="function",Hke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$V=({type:e,data:t},n,r)=>Fke&&t instanceof Blob?n?r(t):EI(t,r):$ke&&(t instanceof ArrayBuffer||Hke(t))?n?r(t):EI(new Blob([t]),r):r(Nl[e]+(t||"")),EI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},PI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Vke=typeof ArrayBuffer=="function",HV=(e,t)=>{if(typeof e!="string")return{type:"message",data:WV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Uke(e.substring(1),t)}:r5[n]?e.length>1?{type:r5[n],data:e.substring(1)}:{type:r5[n]}:Bke},Uke=(e,t)=>{if(Vke){const n=Wke(e);return WV(n,t)}else return{base64:!0,data:e}},WV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},VV=String.fromCharCode(30),Gke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{$V(o,!1,s=>{r[a]=s,++i===n&&t(r.join(VV))})})},jke=(e,t)=>{const n=e.split(VV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function GV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const qke=setTimeout,Kke=clearTimeout;function CS(e,t){t.useNativeTimers?(e.setTimeoutFn=qke.bind(jc),e.clearTimeoutFn=Kke.bind(jc)):(e.setTimeoutFn=setTimeout.bind(jc),e.clearTimeoutFn=clearTimeout.bind(jc))}const Xke=1.33;function Zke(e){return typeof e=="string"?Qke(e):Math.ceil((e.byteLength||e.size)*Xke)}function Qke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Jke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jV extends Ur{constructor(t){super(),this.writable=!1,CS(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Jke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=HV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const YV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),D7=64,eEe={};let TI=0,v3=0,LI;function AI(e){let t="";do t=YV[e%D7]+t,e=Math.floor(e/D7);while(e>0);return t}function qV(){const e=AI(+new Date);return e!==LI?(TI=0,LI=e):e+"."+AI(TI++)}for(;v3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};jke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Gke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=qV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=KV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Al(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Al extends Ur{constructor(t,n){super(),CS(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=GV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new ZV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Al.requestsCount++,Al.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=rEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Al.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Al.requestsCount=0;Al.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MI);else if(typeof addEventListener=="function"){const e="onpagehide"in jc?"pagehide":"unload";addEventListener(e,MI,!1)}}function MI(){for(let e in Al.requests)Al.requests.hasOwnProperty(e)&&Al.requests[e].abort()}const QV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),y3=jc.WebSocket||jc.MozWebSocket,II=!0,aEe="arraybuffer",OI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sEe extends jV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=OI?{}:GV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=II&&!OI?n?new y3(t,n):new y3(t):new y3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||aEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{II&&this.ws.send(o)}catch{}i&&QV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=qV()),this.supportsBinary||(t.b64=1);const i=KV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!y3}}const lEe={websocket:sEe,polling:oEe},uEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function z7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=uEe.exec(e||""),o={},a=14;for(;a--;)o[cEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=dEe(o,o.path),o.queryKey=fEe(o,o.query),o}function dEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function fEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=z7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=z7(n.host).host),CS(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=tEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=UV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new lEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,JV=Object.prototype.toString,mEe=typeof Blob=="function"||typeof Blob<"u"&&JV.call(Blob)==="[object BlobConstructor]",vEe=typeof File=="function"||typeof File<"u"&&JV.call(File)==="[object FileConstructor]";function Mk(e){return pEe&&(e instanceof ArrayBuffer||gEe(e))||mEe&&e instanceof Blob||vEe&&e instanceof File}function i5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class wEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=bEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const CEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:SEe,get PacketType(){return nn},Encoder:xEe,Decoder:Ik},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const _Ee=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class eU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(_Ee.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}w1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};w1.prototype.reset=function(){this.attempts=0};w1.prototype.setMin=function(e){this.ms=e};w1.prototype.setMax=function(e){this.max=e};w1.prototype.setJitter=function(e){this.jitter=e};class $7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,CS(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new w1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||CEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){QV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new eU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const nm={};function o5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=hEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=nm[i]&&o in nm[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new $7(r,t):(nm[i]||(nm[i]=new $7(r,t)),l=nm[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(o5,{Manager:$7,Socket:eU,io:o5,connect:o5});var kEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,EEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,PEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(RI[t]||t||RI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return TEe(e)},E=function(){return LEe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return NI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return NI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":AEe(e)},o:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60),2)+":"+ea(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(kEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var RI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},NI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},TEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},LEe=function(t){var n=t.getDay();return n===0&&(n=7),n},AEe=function(t){return(String(t).match(EEe)||[""]).pop().replace(PEe,"").replace(/GMT\+0000/g,"UTC")};const MEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(XA(!0)),t(Z3("Connected")),t(nbe());const r=n().gallery;r.categories.user.latest_mtime?t(eM("user")):t(a7("user")),r.categories.result.latest_mtime?t(eM("result")):t(a7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(XA(!1)),t(Z3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:a0(),...u};if(["txt2img","img2img"].includes(l)&&t(r0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(bbe({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(r0({image:{...h,category:"result"},category:"result"}))}if(o)switch(xS[a]){case"img2img":{t(m2(h));break}}t(Iw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(tSe({uuid:a0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(r0({category:"result",image:{uuid:a0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(yu(!0)),t(e4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(ZA()),t(Iw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:a0(),...l}));t(eSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(r4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(r0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Iw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(IH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(_V()),a===i&&t(AV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(t4e(r)),r.infill_methods.includes("patchmatch")||t(LV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(QA(o)),t(Z3("Model Changed")),t(yu(!1)),t(n0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(QA(o)),t(yu(!1)),t(n0(!0)),t(ZA()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(fm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},IEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Jg.Stage({container:i,width:n,height:r}),a=new Jg.Layer,s=new Jg.Layer;a.add(new Jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Jg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},OEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},REe=e=>{const t=C4(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:b,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:O,seamSize:R,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:ue,shouldGenerateVariations:W,shouldRandomizeSeed:Q,shouldRunESRGAN:ne,shouldRunFacetool:J,steps:K,threshold:G,tileSize:X,upscalingLevel:ce,upscalingStrength:me,variationAmount:Me,width:xe}=r,{shouldDisplayInProgressType:be,saveIntermediatesInterval:Ie,enableImageDebugging:We}=o,De={prompt:k,iterations:Q||W?E:1,steps:K,cfg_scale:s,threshold:G,perlin:P,height:g,width:xe,sampler_name:T,seed:V,progress_images:be==="full-res",progress_latents:be==="latents",save_intermediates:Ie,generation_mode:n,init_mask:""};if(De.seed=Q?X$(H_,W_):V,["txt2img","img2img"].includes(n)&&(De.seamless=O,De.hires_fix=m),n==="img2img"&&w&&(De.init_img=typeof w=="string"?w:w.url,De.strength=v,De.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ct},boundingBoxCoordinates:ft,boundingBoxDimensions:ut,inpaintReplace:vt,shouldUseInpaintReplace:Ee,stageScale:Je,isMaskEnabled:Lt,shouldPreserveMaskedArea:it}=i,pt={...ft,...ut},an=IEe(Lt?Ct.filter(nk):[],pt);De.init_mask=an,De.fit=!1,De.init_img=a,De.strength=v,De.invert_mask=it,Ee&&(De.inpaint_replace=vt),De.bounding_box=pt;const _t=t.scale();t.scale({x:1/Je,y:1/Je});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:pt.x+Ut.x,y:pt.y+Ut.y,width:pt.width,height:pt.height});We&&OEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(_t),De.init_img=sn,De.progress_images=!1,De.seam_size=R,De.seam_blur=M,De.seam_strength=z,De.seam_steps=N,De.tile_size=X,De.force_outpaint=ue,De.infill_method=b}W?(De.variation_amount=Me,$&&(De.with_variations=Eye($))):De.variation_amount=0;let Qe=!1,st=!1;return ne&&(Qe={level:ce,strength:me}),J&&(st={type:h,strength:u},h==="codeformer"&&(st.codeformer_fidelity=l)),We&&(De.enable_image_debugging=We),{generationParameters:De,esrganParameters:Qe,facetoolParameters:st}},NEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(yu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(s4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=REe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(yu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(yu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(IH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(i4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},DEe=()=>{const{origin:e}=new URL(window.location.href),t=o5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=MEe(i),{emitGenerateImage:O,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:ue,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=NEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>b(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{O(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{ue();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},zEe=["cursorPosition"].map(e=>`canvas.${e}`),BEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),FEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),tU=l$({options:zke,gallery:lSe,system:c4e,canvas:jbe}),$Ee=T$.getPersistConfig({key:"root",storage:P$,rootReducer:tU,blacklist:[...zEe,...BEe,...FEe],debounce:300}),HEe=uye($Ee,tU),nU=r2e({reducer:HEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(DEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qe=q2e,Le=z2e;function a5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?a5=function(n){return typeof n}:a5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},a5(e)}function WEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(r2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),YEe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),qEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Le(YEe),i=t?Math.round(t*100/n):0;return x(MF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function KEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function XEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Av(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(KEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Wn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(X0,{isOpen:t,onClose:r,children:[x(Z0,{}),ee(Dv,{className:" modal hotkeys-modal",children:[x(u_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(wb,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const ZEe=e=>{const{isProcessing:t,isConnected:n}=Le(l=>l.system),r=qe(),{name:i,status:o,description:a}=e,s=()=>{r(dH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(rB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},QEe=dt(e=>e.system,e=>{const t=Ze.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),JEe=()=>{const{models:e}=Le(QEe);return x(wb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(ZEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},ePe=dt([p2,Q$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ze.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),tPe=({children:e})=>{const t=qe(),n=Le(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Av(),{isOpen:a,onOpen:s,onClose:l}=Av(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Le(ePe),b=()=>{mU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(o4e(E))};return ee(Wn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(X0,{isOpen:r,onClose:o,children:[x(Z0,{}),ee(Dv,{className:"modal settings-modal",children:[x(Ob,{className:"settings-modal-header",children:"Settings"}),x(u_,{className:"modal-close-btn"}),ee(Nv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(JEe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Iu,{label:"Display In-Progress Images",validValues:b5e,value:u,onChange:E=>t(Q5e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Fa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(eH(E.target.checked))}),x(Fa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(n4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Fa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Ib,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(X0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Z0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Dv,{children:x(Nv,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},nPe=dt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),rPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Le(nPe),s=qe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(tH())},className:`status ${l}`,children:u})})},iPe=["dark","light","green"];function oPe(){const{setColorMode:e}=Yv(),t=qe(),n=Le(i=>i.options.currentTheme),r=i=>{e(i),t(_ke(i))};return x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(F4e,{})}),children:x(aB,{align:"stretch",children:iPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(J_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const aPe=dt([p2],e=>{const{isProcessing:t,model_list:n}=e,r=Ze.map(n,(o,a)=>a),i=Ze.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),sPe=()=>{const e=qe(),{models:t,activeModel:n,isProcessing:r}=Le(aPe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Iu,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(dH(o.target.value))}})})},lPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:LH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(rPe,{}),x(sPe,{}),x(XEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(R4e,{})})}),x(oPe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(E4e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(S4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(b4e,{})})}),x(tPe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(tk,{})})})]})]}),uPe=dt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),cPe=dt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),dPe=()=>{const e=qe(),t=Le(uPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Le(cPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(tH()),e(Pw(!n))};return gt("`",()=>{e(Pw(!n))},[n]),gt("esc",()=>{e(Pw(!1))}),ee(Wn,{children:[n&&x(BH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(x4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(z4e,{}):x(oH,{}),onClick:l})})]})};function fPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var hPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function y2(e,t){var n=pPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function pPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=hPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var gPe=[".DS_Store","Thumbs.db"];function mPe(e){return c1(this,void 0,void 0,function(){return d1(this,function(t){return _4(e)&&vPe(e.dataTransfer)?[2,xPe(e.dataTransfer,e.type)]:yPe(e)?[2,bPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,SPe(e)]:[2,[]]})})}function vPe(e){return _4(e)}function yPe(e){return _4(e)&&_4(e.target)}function _4(e){return typeof e=="object"&&e!==null}function bPe(e){return V7(e.target.files).map(function(t){return y2(t)})}function SPe(e){return c1(this,void 0,void 0,function(){var t;return d1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return y2(r)})]}})})}function xPe(e,t){return c1(this,void 0,void 0,function(){var n,r;return d1(this,function(i){switch(i.label){case 0:return e.items?(n=V7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(wPe))]):[3,2];case 1:return r=i.sent(),[2,zI(iU(r))];case 2:return[2,zI(V7(e.files).map(function(o){return y2(o)}))]}})})}function zI(e){return e.filter(function(t){return gPe.indexOf(t.name)===-1})}function V7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,WI(n)];if(e.sizen)return[!1,WI(n)]}return[!0,null]}function Of(e){return e!=null}function BPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=lU(l,n),h=Hv(u,1),g=h[0],m=uU(l,r,i),v=Hv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function k4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function b3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function UI(e){e.preventDefault()}function FPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function $Pe(e){return e.indexOf("Edge/")!==-1}function HPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return FPe(e)||$Pe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function iTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ok=C.exports.forwardRef(function(e,t){var n=e.children,r=E4(e,YPe),i=pU(r),o=i.open,a=E4(i,qPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Ok.displayName="Dropzone";var hU={disabled:!1,getFilesFromEvent:mPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Ok.defaultProps=hU;Ok.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var Y7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},hU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,O=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return UPe(n)},[n]),j=C.exports.useMemo(function(){return VPe(n)},[n]),ue=C.exports.useMemo(function(){return typeof E=="function"?E:jI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:jI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(oTe,Y7),K=Xw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&WPe()),xe=function(){!Me.current&&me&&setTimeout(function(){if(ne.current){var Xe=ne.current.files;Xe.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Me]);var be=C.exports.useRef([]),Ie=function(Xe){Q.current&&Q.current.contains(Xe.target)||(Xe.preventDefault(),be.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",UI,!1),document.addEventListener("drop",Ie,!1)),function(){T&&(document.removeEventListener("dragover",UI),document.removeEventListener("drop",Ie))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),De=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[].concat(ZPe(be.current),[Oe.target]),b3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){if(!(k4(Oe)&&!N)){var Xt=Xe.length,Yt=Xt>0&&BPe({files:Xe,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),_e=Xt>0&&!Yt;X({isDragAccept:Yt,isDragReject:_e,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Xe){return We(Xe)})},[i,u,We,N,$,a,o,s,l,V]),Qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=b3(Oe);if(Xe&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Xe&&g&&g(Oe),!1},[g,N]),st=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=be.current.filter(function(Yt){return Q.current&&Q.current.contains(Yt)}),Xt=Xe.indexOf(Oe.target);Xt!==-1&&Xe.splice(Xt,1),be.current=Xe,!(Xe.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),b3(Oe)&&h&&h(Oe))},[Q,h,N]),Ct=C.exports.useCallback(function(Oe,Xe){var Xt=[],Yt=[];Oe.forEach(function(_e){var It=lU(_e,$),ze=Xw(It,2),ot=ze[0],ln=ze[1],zn=uU(_e,a,o),He=Xw(zn,2),ct=He[0],tt=He[1],Nt=V?V(_e):null;if(ot&&ct&&!Nt)Xt.push(_e);else{var Zt=[ln,tt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:_e,errors:Zt.filter(function(er){return er})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(_e){Yt.push({file:_e,errors:[zPe]})}),Xt.splice(0)),X({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Xe),Yt.length>0&&b&&b(Yt,Xe),Xt.length>0&&v&&v(Xt,Xe)},[X,s,$,a,o,l,m,v,b,V]),ft=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[],b3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){k4(Oe)&&!N||Ct(Xe,Oe)}).catch(function(Xe){return We(Xe)}),X({type:"reset"})},[i,Ct,We,N]),ut=C.exports.useCallback(function(){if(Me.current){X({type:"openDialog"}),ue();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Xe){return i(Xe)}).then(function(Xe){Ct(Xe,null),X({type:"closeDialog"})}).catch(function(Xe){GPe(Xe)?(W(Xe),X({type:"closeDialog"})):jPe(Xe)?(Me.current=!1,ne.current?(ne.current.value=null,ne.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Xe)});return}ne.current&&(X({type:"openDialog"}),ue(),ne.current.value=null,ne.current.click())},[X,ue,W,P,Ct,We,j,s]),vt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Ee=C.exports.useCallback(function(){X({type:"focus"})},[]),Je=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(HPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Xe){return r?null:Xe},pt=function(Xe){return O?null:it(Xe)},an=function(Xe){return R?null:it(Xe)},_t=function(Xe){N&&Xe.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.role,_e=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,ln=Oe.onDragEnter,zn=Oe.onDragOver,He=Oe.onDragLeave,ct=Oe.onDrop,tt=E4(Oe,KPe);return ur(ur(j7({onKeyDown:pt(ll(_e,vt)),onFocus:pt(ll(It,Ee)),onBlur:pt(ll(ze,Je)),onClick:it(ll(ot,Lt)),onDragEnter:an(ll(ln,De)),onDragOver:an(ll(zn,Qe)),onDragLeave:an(ll(He,st)),onDrop:an(ll(ct,ft)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,Q),!r&&!O?{tabIndex:0}:{}),tt)}},[Q,vt,Ee,Je,Lt,De,Qe,st,ft,O,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.onChange,_e=Oe.onClick,It=E4(Oe,XPe),ze=j7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(Yt,ft)),onClick:it(ll(_e,sn)),tabIndex:-1},Xt,ne);return ur(ur({},ze),It)}},[ne,n,s,ft,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Ut,getInputProps:yn,rootRef:Q,inputRef:ne,open:it(ut)})}function oTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},Y7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},Y7);default:return e}}function jI(){}const aTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return gt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},YI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:a0(),category:"user",...l};t(r0({image:u,category:"user"})),o==="unifiedCanvas"?t(ak(u)):o==="img2img"&&t(m2(u))},sTe=e=>{const{children:t}=e,n=qe(),r=Le(_r),i=c2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=xV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,O)=>M+` +`+O.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(YI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:b,isDragActive:w,open:E}=pU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const O=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&O.push(N);if(!O.length)return;if(T.stopImmediatePropagation(),O.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=O[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(YI({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(lk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(aTe,{isDragAccept:v,isDragReject:b,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},lTe=()=>{const e=qe(),t=Le(wCe),n=c2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(l4e())},[e,n,t])},gU=dt([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),uTe=()=>{const e=qe(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Le(gU),s=()=>{e(ad(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return gt("f",()=>{o||t?(e(ad(!1)),e(id(!1))):(e(ad(!0)),e(id(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(lH,{})}),r&&ee(Wn,{children:[x(fH,{iconButton:!0}),x(hH,{})]})]}):null},cTe=()=>{const e=qe(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Le(gU),a=()=>{e(id(!0)),r&&e(Li(!0))};return gt("f",()=>{t||i?(e(ad(!1)),e(id(!1))):(e(ad(!0)),e(id(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(nH,{})}):null};fPe();const dTe=()=>(lTe(),ee("div",{className:"App",children:[ee(sTe,{children:[x(qEe,{}),ee("div",{className:"app-content",children:[x(lPe,{}),x(bke,{})]}),x("div",{className:"app-console",children:x(dPe,{})})]}),x(uTe,{}),x(cTe,{})]}));const mU=gye(nU),fTe=SN({key:"invokeai-style-cache",prepend:!0});Qw.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(G2e,{store:nU,children:x(rU,{loading:x(jEe,{}),persistor:mU,children:x(_J,{value:fTe,children:x(xve,{children:x(dTe,{})})})})})})); diff --git a/frontend/dist/assets/index.99dfa618.js b/frontend/dist/assets/index.99dfa618.js deleted file mode 100644 index b3cb25e5a5..0000000000 --- a/frontend/dist/assets/index.99dfa618.js +++ /dev/null @@ -1,623 +0,0 @@ -function Eq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function R9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),dE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=dE&&e[dE]||e["@@iterator"],typeof e=="function"?e:null)}var IO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RO=Object.assign,NO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function DO(){}DO.prototype=Z0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}var D9=N9.prototype=new DO;D9.constructor=N9;RO(D9,Z0.prototype);D9.isPureReactComponent=!0;var fE=Array.isArray,zO=Object.prototype.hasOwnProperty,z9={current:null},BO={key:!0,ref:!0,__self:!0,__source:!0};function FO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)zO.call(t,r)&&!BO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,he=G[X];if(0>>1;Xi(De,te))$ei(He,De)?(G[X]=He,G[$e]=te,X=$e):(G[X]=De,G[Se]=te,X=Se);else if($ei(He,te))G[X]=He,G[$e]=te,X=$e;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,H=5,$=-1;function j(){return!(e.unstable_now()-$G||125X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})($O);(function(e){e.exports=$O})(e0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var HO=C.exports,ca=e0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fw=Object.prototype.hasOwnProperty,Wq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pE={},gE={};function Vq(e){return Fw.call(gE,e)?!0:Fw.call(pE,e)?!1:Wq.test(e)?gE[e]=!0:(pE[e]=!0,!1)}function Uq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var F9=/[\-:]([a-z])/g;function $9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(F9,$9);Oi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(F9,$9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(F9,$9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Rp:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UO:return(e.displayName||"Context")+".Consumer";case VO:return(e._context.displayName||"Context")+".Provider";case V9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U9:return t=e.displayName||null,t!==null?t:Vw(e.type)||"Memo";case Ac:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function Yq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vw(t);case 8:return t===W9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=jO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ry(e){e._valueTracker||(e._valueTracker=qq(e))}function YO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){qO(e,t);var n=nd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jw(e,t,n){(t!=="number"||r4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function QO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function JO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Xw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function xE(e){if(e=Fv(e)){if(typeof Qw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=_5(t),Qw(e.stateNode,e.type,t))}}function eI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function tI(){if(n0){var e=n0,t=r0;if(r0=n0=null,xE(e),t)for(e=0;e>>=0,e===0?32:31-(sK(e)/lK|0)|0}var oy=64,ay=4194304;function Jg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function s4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ym),LE=String.fromCharCode(32),ME=!1;function xI(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function WK(e,t){switch(e){case"compositionend":return wI(t);case"keypress":return t.which!==32?null:(ME=!0,LE);case"textInput":return e=t.data,e===LE&&ME?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!J9&&xI(e,t)?(e=SI(),v3=X9=zc=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=NE(n)}}function EI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PI(){for(var e=window,t=r4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r4(e.document)}return t}function e7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QK(e){var t=PI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&EI(n.ownerDocument.documentElement,n)){if(r!==null&&e7(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=DE(n,o);var a=DE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,i6=null,bm=null,o6=!1;function zE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r4(r)||(r=zp,"selectionStart"in r&&e7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bm&&Jm(bm,r)||(bm=r,r=c4(i6,"onSelect"),0$p||(e.current=d6[$p],d6[$p]=null,$p--)}function Yn(e,t){$p++,d6[$p]=e.current,e.current=t}var rd={},Vi=fd(rd),To=fd(!1),qf=rd;function L0(e,t){var n=e.type.contextTypes;if(!n)return rd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function f4(){Zn(To),Zn(Vi)}function UE(e,t,n){if(Vi.current!==rd)throw Error(Ie(168));Yn(Vi,t),Yn(To,n)}function DI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ie(108,Yq(e)||"Unknown",i));return fr({},n,r)}function h4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function GE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=DI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var uu=null,k5=!1,ux=!1;function zI(e){uu===null?uu=[e]:uu.push(e)}function cX(e){k5=!0,zI(e)}function hd(){if(!ux&&uu!==null){ux=!0;var e=0,t=Pn;try{var n=uu;for(Pn=1;e>=a,i-=a,du=1<<32-xs(t)+i|n<z?(H=N,N=null):H=N.sibling;var $=m(E,N,T[z],M);if($===null){N===null&&(N=H);break}e&&N&&$.alternate===null&&t(E,N),_=o($,_,z),R===null?I=$:R.sibling=$,R=$,N=H}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;zz?(H=N,N=null):H=N.sibling;var j=m(E,N,$.value,M);if(j===null){N===null&&(N=H);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=H}if($.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!$.done;z++,$=T.next())$=p(E,$.value,M),$!==null&&(_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return nr&&vf(E,z),I}for(N=r(E,N);!$.done;z++,$=T.next())$=v(N,E,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ac&&QE(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=k3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=vx(T,E.mode,M),_.return=E,E=_}return a(E);case Ac:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);hy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=mx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=GI(!0),jI=GI(!1),$v={},xl=fd($v),rv=fd($v),iv=fd($v);function Lf(e){if(e===$v)throw Error(Ie(174));return e}function u7(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function YI(e){Lf(iv.current);var t=Lf(xl.current),n=qw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function c7(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=fd(0);function S4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cx=[];function d7(){for(var e=0;en?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function uR(){return Fa().memoizedState}function pX(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cR(e))dR(t,n);else if(n=HI(e,t,n,r),n!==null){var i=io();ws(n,e,r,i),fR(n,t,r)}}function gX(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cR(e))dR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=HI(e,t,i,r),n!==null&&(i=io(),ws(n,e,r,i),fR(n,t,r))}}function cR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function dR(e,t){xm=b4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:eP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,iR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:JE,useDebugValue:m7,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=JE(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),di===null)throw Error(Ie(349));(Xf&30)!==0||XI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,eP(QI.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,ZI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=fu,r=du;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[pl]=t,e[nv]=r,xR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=S4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Ir()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ir(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function _X(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var uP=!1;function EX(e,t){if(a6=l4,e=PI(),e7(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s6={focusedElem:e,selectionRange:n},l4=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:hs(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return S=uP,uP=!1,S}function wm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&C6(t,n,o)}i=i.next}while(i!==r)}}function T5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function _6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _R(e){var t=e.alternate;t!==null&&(e.alternate=null,_R(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[c6],delete t[lX],delete t[uX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kR(e){return e.tag===5||e.tag===3||e.tag===4}function cP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function k6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=d4));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Pi=null,ps=!1;function wc(e,t,n){for(n=n.child;n!==null;)ER(e,t,n),n=n.sibling}function ER(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(b5,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Pi,i=ps;Pi=null,wc(e,t,n),Pi=r,ps=i,Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Zm(e)):lx(Pi,n.stateNode));break;case 4:r=Pi,i=ps,Pi=n.stateNode.containerInfo,ps=!0,wc(e,t,n),Pi=r,ps=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&C6(n,t,a),i=i.next}while(i!==r)}wc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}wc(e,t,n);break;case 21:wc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,wc(e,t,n),Hi=r):wc(e,t,n);break;default:wc(e,t,n)}}function dP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ls(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Ir()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10e?16:e,Bc===null)var r=!1;else{if(e=Bc,Bc=null,_4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,ot=e.current;ot!==null;){var o=ot,a=o.child;if((ot.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lIr()-b7?Ff(e,0):S7|=n),Lo(e,t)}function RR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=io();e=yu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RR(e,n)}function NX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ie(314))}r!==null&&r.delete(t),RR(e,n)}var NR;NR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&BI(t,g4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,h4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E5,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=hs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=aP(null,t,r,e,n);break e;case 11:t=iP(null,t,r,e,n);break e;case 14:t=oP(null,t,r,hs(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),aP(e,t,r,i,n);case 3:e:{if(yR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,WI(e,t),y4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=R0(Error(Ie(423)),t),t=sP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Ie(424)),t),t=sP(e,t,r,n,i);break e}else for(oa=Yc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,vs=null,n=jI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=Su(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return YI(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),vR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return SR(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),iP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Yn(m4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=Su(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=pu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=hs(r,t.pendingProps),i=hs(r.type,i),oP(e,t,r,i,n);case 15:return gR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h4(t)):e=!1,o0(t,n),UI(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return bR(e,t,n);case 22:return mR(e,t,n)}throw Error(Ie(156,t.tag))};function DR(e,t){return lI(e,t)}function DX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(e,t,n,r){return new DX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function Zc(e,t){var n=e.alternate;return n===null?(n=Ia(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case GO:return L5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VO:a=10;break e;case UO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ac:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L5(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=GO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new BX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function FX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Il);const yy=R9(Il.exports);var SP=Il.exports;Bw.createRoot=SP.createRoot,Bw.hydrateRoot=SP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N5={exports:{}},D5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function $R(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)YX.call(t,r)&&!KX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}D5.Fragment=jX;D5.jsx=$R;D5.jsxs=$R;(function(e){e.exports=D5})(N5);const $n=N5.exports.Fragment,x=N5.exports.jsx,re=N5.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Hv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var JX=QX(ZX),bP=()=>{};function xP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function HR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>xP(a,s)),[h,p]=C.exports.useState(()=>xP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?bP:_,setColorMode:t?bP:E,forced:t!==void 0}),[P,_,E,t]);return x(A7.Provider,{value:T,children:n})}HR.displayName="ColorModeProvider";var M6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",H="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[H]=ye[h]=ye[$]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,$e=Se||De||Function("return this")(),He=t&&!t.nodeType&&t,qe=He&&!0&&e&&!e.nodeType&&e,tt=qe&&qe.exports===He,Ze=tt&&Se.process,nt=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=nt&&nt.isTypedArray;function xt(U,ne,ge){switch(ge.length){case 0:return U.call(ne);case 1:return U.call(ne,ge[0]);case 2:return U.call(ne,ge[0],ge[1]);case 3:return U.call(ne,ge[0],ge[1],ge[2])}return U.apply(ne,ge)}function Le(U,ne){for(var ge=-1,Ke=Array(U);++ge-1}function S1(U,ne){var ge=this.__data__,Ke=qa(ge,U);return Ke<0?(++this.size,ge.push([U,ne])):ge[Ke][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=zu,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var ne=-1,ge=U==null?0:U.length;for(this.clear();++ne1?ge[zt-1]:void 0,yt=zt>2?ge[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Eh(ge[0],ge[1],yt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ke-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Od=$l(function(){return arguments}())?$l:function(U){return Wn(U)&&yn.call(U,"callee")&&!We.call(U,"callee")},Vl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Uu(U)}function Ph(U){return Wn(U)&&Ht(U)}var Vu=Zt||O1;function Uu(U){if(!Bo(U))return!1;var ne=Ns(U);return ne==v||ne==S||ne==u||ne==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Wn(U)||Ns(U)!=_)return!1;var ne=ln(U);if(ne===null)return!0;var ge=yn.call(ne,"constructor")&&ne.constructor;return typeof ge=="function"&&ge instanceof ge&&sn.call(ge)==Xt}var Ah=Tt?at(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?A1(U,!0):Ds(U)}var un=Ka(function(U,ne,ge,Ke){No(U,ne,ge,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=un})(M6,M6.exports);const yl=M6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),wP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=wP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=wP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function us(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var WR=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...WR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...WR].join(" ")}var aZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},sZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function lZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},VR="& > :not(style) ~ :not(style)",cZ={[VR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[VR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},I6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},fZ=new Set(Object.values(I6)),UR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||UR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in I6?I6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=GR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var GR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||GR(e)||UR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:us("borderWidths"),borderStyles:us("borderStyles"),colors:us("colors"),borders:us("borders"),radii:us("radii",rn.px),space:us("space",by(rn.vh,rn.px)),spaceT:us("space",by(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:us("sizes",by(rn.vh,rn.px)),sizesT:us("sizes",by(rn.vh,rn.fraction)),shadows:us("shadows"),logical:rZ,blur:us("blur",rn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var pn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},R6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(R6,{shadow:R6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},P4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(P4,{flexDir:P4.flexDirection});var jR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},km={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},IZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function YR(e){return _s(e)&&e.reference?e.reference:String(e)}var z5=(e,...t)=>t.map(YR).join(` ${e} `).replace(/calc/g,""),CP=(...e)=>`calc(${z5("+",...e)})`,_P=(...e)=>`calc(${z5("-",...e)})`,N6=(...e)=>`calc(${z5("*",...e)})`,kP=(...e)=>`calc(${z5("/",...e)})`,EP=e=>{const t=YR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(CP(e,...t)),subtract:(...t)=>_f(_P(e,...t)),multiply:(...t)=>_f(N6(e,...t)),divide:(...t)=>_f(kP(e,...t)),negate:()=>_f(EP(e)),toString:()=>e.toString()}),{add:CP,subtract:_P,multiply:N6,divide:kP,negate:EP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function BZ(e,t=""){return[t,e].filter(Boolean).join("-")}function FZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${BZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:FZ(r,t)}}function HZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function WZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=WZ(e);return t||typeof e=="number"?`${e}px`:e}var qR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(qR));function PP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(L7(e));return new Set(t)}function TP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=PP(e),n=Object.entries(e).sort(qR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?TP(u):void 0,{_minW:TP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:PP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;HZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var _i={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Cc=e=>KR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ru=e=>KR(t=>e(t,"~ &"),"[data-peer]",".peer"),KR=(e,...t)=>t.map(e).join(", "),B5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Cc(_i.hover),_peerHover:ru(_i.hover),_groupFocus:Cc(_i.focus),_peerFocus:ru(_i.focus),_groupFocusVisible:Cc(_i.focusVisible),_peerFocusVisible:ru(_i.focusVisible),_groupActive:Cc(_i.active),_peerActive:ru(_i.active),_groupDisabled:Cc(_i.disabled),_peerDisabled:ru(_i.disabled),_groupInvalid:Cc(_i.invalid),_peerInvalid:ru(_i.invalid),_groupChecked:Cc(_i.checked),_peerChecked:ru(_i.checked),_groupFocusWithin:Cc(_i.focusWithin),_peerFocusWithin:ru(_i.focusWithin),_peerPlaceholderShown:ru(_i.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},GZ=Object.keys(B5);function AP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=AP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:P}=AP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=B5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:UZ(n.breakpoints)}),n}var M7=yl({},E3,pn,yZ,P4,Ta,SZ,TZ,bZ,jR,PZ,km,R6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Ta,P4,jR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(M7),...GZ],iQ={...M7,...B5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var XR=e=>t=>dQ({theme:t,pseudos:B5,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,$5--),$r}function sa(){return $r=Io2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Wv(e,P3()+(t<6&&wl()==32&&sa()==32))}function F6(e){for(;sa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&F6($r);break;case 40:e===41&&F6(e);break;case 92:sa();break}return Io}function LQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Wv(t,Io-1)+"*"+F5(e===47?e:sa())}function MQ(e){for(;!dv(wl());)sa();return Wv(e,Io)}function OQ(e){return nN(A3("",null,null,null,[""],e=tN(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=sa()){case 40:if(S!=108&&Ti(N,p-1)==58){B6(N+=wn(T3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=T3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(P3()-1,7);continue;case 47:switch(wl()){case 42:case 47:xy(IQ(LQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&xy(v>32?MP(N+";",r,n,p-1):MP(wn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(R=LP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)A3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:A3(e,R,R,r&&xy(LP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:A3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=T3(sa())),m=wl(),h=p=dl(T=N+=MQ(P3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function LP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=R7(m),S=0,w=0,P=0;S0?m[E]+" "+_:wn(_,/&\f/g,m[E])))&&(l[P++]=T);return H5(e,t,n,i===0?O7:s,l,u,h)}function IQ(e,t,n){return H5(e,t,n,ZR,F5(EQ()),cv(e,2,-2),0)}function MP(e,t,n,r){return H5(e,t,n,I7,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=R7(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+T4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~B6(e,"stretch")?iN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~B6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var WQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case I7:t.return=iN(t.value,t.length);break;case QR:return s0([Mg(t,{value:wn(t.value,"@","@"+gn)})],i);case O7:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[wn(o,/:(read-\w+)/,":"+T4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,":"+T4+"$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},VQ=[WQ],oN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fN=function(t){return t.charCodeAt(1)===45},RP=function(t){return t!=null&&typeof t!="boolean"},Sx=rN(function(e){return fN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),NP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!fN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function bJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},SN=xJ(bJ);function bN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var xN=e=>bN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function wN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var EJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,PJ=rN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},FP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},$P=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return cN(n,r,i),oJ(function(){return dN(n,r,i)}),null},MJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=$P(t,n,r),l=s||FP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var BJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),FJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),HJ=An("formError").parts("text","icon"),WJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function wy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function CN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function HP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function WP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var V6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function dee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=pee(e)),typeof e=="object"&&(iu(e.r)&&iu(e.g)&&iu(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):iu(e.h)&&iu(e.s)&&iu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):iu(e.h)&&iu(e.s)&&iu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=CN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),xx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),fs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=fs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=fs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=fs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:UP(n[4]),format:t?"name":"hex8"}:(n=fs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=fs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:UP(n[4]+n[4]),format:t?"name":"hex8"}:(n=fs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function iu(e){return Boolean(fs.CSS_UNIT.exec(String(e)))}var Vv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=cee(t)),this.originalInput=t;var i=dee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=CN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=WP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=WP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=HP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=HP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),VP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),lee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+VP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=wy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=wy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=wy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=wy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(_N(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=A4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A4([0,100],t.seed);var n=kN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return A4([r,i],t.seed)}function vee(e,t,n){var r=yee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return A4([r,i],n.seed)}function yee(e,t){for(var n=kN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=PN.find(function(a){return a.name===e});if(n){var r=EN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function kN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=PN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function EN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var PN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function bee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function GP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function _ee(e){const t=_N().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Eee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function TN(e){return Tee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(TN).join(` ${e} `).replace(/calc/g,""),jP=(...e)=>`calc(${eS("+",...e)})`,YP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,qP=(...e)=>`calc(${eS("/",...e)})`,KP=e=>{const t=TN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},cu=Object.assign(e=>({add:(...t)=>cu(jP(e,...t)),subtract:(...t)=>cu(YP(e,...t)),multiply:(...t)=>cu(U6(e,...t)),divide:(...t)=>cu(qP(e,...t)),negate:()=>cu(KP(e)),toString:()=>e.toString()}),{add:jP,subtract:YP,multiply:U6,divide:qP,negate:KP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function AN(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,AN(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${AN(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Bee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Fee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Hee=Nee({container:zee,button:Bee,panel:Fee,icon:$ee}),Wee=Dee({baseStyle:Hee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),la=ei("alert-fg"),bu=ei("alert-bg"),Uee=Uv({container:{bg:bu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[bu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[bu.variable]:`colors.${t}.200`},color:la.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),LN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Zee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...LN,...Zee,container:Qee},MN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:ON,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},XP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:XP.reference,"&:not([data-loaded])":{[XP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=ON(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function _c(e){const t=e!=="100%"?MN[e]:void 0;return ON({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ate={"2xs":_c(4),xs:_c(6),sm:_c(8),md:_c(12),lg:_c(16),xl:_c(24),"2xl":_c(32),full:_c("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},IN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(IN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:IN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=L3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:L3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Bte}=Pm,Fte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Fte,variants:zte,defaultProps:Bte},Hte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Wte={baseStyle:Hte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:qte}=rr(BJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function yp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=G6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(FJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(HJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:hu,defineMultiStyleConfig:Ane}=rr(WJ.keys),Lne=hu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),kc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Mne={lg:hu({field:kc.lg,addon:kc.lg}),md:hu({field:kc.md,addon:kc.md}),sm:hu({field:kc.sm,addon:kc.sm}),xs:hu({field:kc.xs,addon:kc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var One=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),Ine=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),Rne=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=hu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},mn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Bne={baseStyle:zne},Fne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Fne},{defineMultiStyleConfig:Hne,definePartsStyle:Wne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Wne({icon:Vne}),Gne=Hne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:j6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=j6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function cs(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={xs:cs("xs"),sm:cs("sm"),md:cs("md"),lg:cs("lg"),xl:cs("xl"),"2xl":cs("2xl"),"3xl":cs("3xl"),"4xl":cs("4xl"),"5xl":cs("5xl"),"6xl":cs("6xl"),full:cs("full")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},RN=hre,{defineMultiStyleConfig:pre,definePartsStyle:NN}=rr(jJ.keys),V7=Ui("number-input-stepper-width"),DN=Ui("number-input-input-padding"),gre=cu(V7).add("0.5rem").toString(),mre={[V7.variable]:"sizes.6",[DN.variable]:gre},vre=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[V7.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=NN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function _y(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=RN.fontSizes[o];return NN({field:{...r.field,paddingInlineEnd:DN.reference,verticalAlign:"top"},stepper:{fontSize:cu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:mn.variants,defaultProps:mn.defaultProps}),ZP,Cre={...(ZP=mn.baseStyle)==null?void 0:ZP.field,textAlign:"center"},_re={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},QP,kre={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),ky=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),JP=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[ky.variable]:"colors.white",bg:ky.reference,[Are.variable]:ky.reference,[JP.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[JP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Bre,definePartsStyle:nm}=rr(qJ.keys),Fre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(GP(),GP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ai(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Hre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),Wre=e=>({transitionProperty:"common",transitionDuration:"slow",...Fre(e)}),Vre=nm(e=>({label:$re,filledTrack:Wre(e),track:Hre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Bre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:M3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(L4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=M3(e=>{var t,n,r,i;return{label:(n=(t=L4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),Ey={paddingInlineEnd:"8"},eT,tT,nT,rT,iT,oT,aT,sT,nie={lg:{...(eT=mn.sizes)==null?void 0:eT.lg,field:{...(tT=mn.sizes)==null?void 0:tT.lg.field,...Ey}},md:{...(nT=mn.sizes)==null?void 0:nT.md,field:{...(rT=mn.sizes)==null?void 0:rT.md.field,...Ey}},sm:{...(iT=mn.sizes)==null?void 0:iT.sm,field:{...(oT=mn.sizes)==null?void 0:oT.sm.field,...Ey}},xs:{...(aT=mn.sizes)==null?void 0:aT.xs,field:{...(sT=mn.sizes)==null?void 0:sT.xs.field,...Ey},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:mn.variants,defaultProps:mn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Ex=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:tS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Rc=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...$7({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Rc.variable]:"colors.gray.200",_dark:{[Rc.variable]:"colors.whiteAlpha.200"},_disabled:{[Rc.variable]:"colors.gray.300",_dark:{[Rc.variable]:"colors.whiteAlpha.300"}},bg:Rc.reference}),hie=e=>{const{orientation:t}=e;return{...$7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:gv.reference,h:gv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Rc.variable]:`colors.${t}.500`,_dark:{[Rc.variable]:`colors.${t}.200`},bg:Rc.reference}},gie=tS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=tS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=tS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=tS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:zN}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=zN({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:zN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:O3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Hf=Ui("switch-track-height"),Px=Ui("switch-track-diff"),Iie=cu.subtract(Lm,Hf),Y6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Hf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Hf.reference],height:[Hf.reference],_checked:{transform:`translateX(${Y6.reference})`}},Die=O3(e=>({container:{[Px.variable]:Iie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:cu(Px).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:O3({container:{[Lm.variable]:"1.375rem",[Hf.variable]:"sizes.3"}}),md:O3({container:{[Lm.variable]:"1.875rem",[Hf.variable]:"sizes.4"}}),lg:O3({container:{[Lm.variable]:"2.875rem",[Hf.variable]:"sizes.6"}})},Bie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Fie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),M4={"&[data-is-numeric=true]":{textAlign:"end"}},Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Hie,striped:Wie,unstyled:{}},Uie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Fie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Wf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},doe=Wf({container:loe,label:uoe,closeButton:coe}),foe={sm:Wf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Wf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Wf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),lT,goe={...(lT=mn.baseStyle)==null?void 0:lT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},uT,moe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((uT=mn.variants)==null?void 0:uT.unstyled.field)??{}},cT,dT,fT,hT,voe={xs:((cT=mn.sizes)==null?void 0:cT.xs.field)??{},sm:((dT=mn.sizes)==null?void 0:dT.sm.field)??{},md:((fT=mn.sizes)==null?void 0:fT.md.field)??{},lg:((hT=mn.sizes)==null?void 0:hT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Py=Ui("tooltip-bg"),Tx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[Soe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Wee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:L4,CloseButton:Dte,Code:$te,Container:Wte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:mn,Kbd:Bne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Bie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Ooe=Moe,Ioe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Roe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Boe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Foe=Boe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Hoe=$oe,Woe={breakpoints:Eoe,zIndices:Foe,radii:Loe,blur:Hoe,colors:Toe,...RN,sizes:MN,shadows:Ooe,space:LN,borders:_oe,transition:zoe},Voe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Woe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function I3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!I3(e[r],t[r]))return!1;return!0}var o;if(Koe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!I3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Zoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!I3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return I3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function BN(){const e=Hv(),t=t1();return{...e,theme:t}}function Joe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return re(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function iae(){const{colorMode:e}=Hv();return x(Q5,{styles:t=>{const n=SN(t,"styles.global"),r=wN(n,{theme:t,colorMode:e});return r?XR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=bN(a,(p,m)=>oQ(m)),l=wN(e,t),u=Object.assign({},i,l,xN(s),o),h=XR(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Hv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function FN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=BN(),a=e?SN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},xN(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return FN(e,t)}function Ii(e,t={}){return FN(e,t)}function uae(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Fn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Fn(...e),e)}function pT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function gT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function mT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=pT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=gT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=gT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=mT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=mT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=pT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return q6(()=>()=>e.current.destroy()),e.current}var[mae,$N]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=$N(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Fn(o,i)}}function HN(){return[O4(mae),()=>O4($N()),()=>gae(),i=>vae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),vT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??vT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??vT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ct(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function yae(){return C.exports.useContext(rS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",I4=sh?C.exports.useLayoutEffect:C.exports.useEffect,WN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(WN),a=C.exports.useContext(n1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return I4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),I4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||xae.some(t=>vv(e[t]))}function VN(e){return Boolean(oS(e)||e.variants)}function wae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[yT(t),yT(n)])}function yT(e){return Array.isArray(e)?e.join(" "):e}const ou=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:ou(["layout","layoutId","drag"]),animation:ou(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ou(["exit"]),drag:ou(["drag","dragControls"]),focus:ou(["whileFocus"]),hover:ou(["whileHover","onHoverStart","onHoverEnd"]),tap:ou(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ou(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ou(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return aS(()=>{if(Mm.hasEverUpdated)return kae++})}const G7=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const UN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(WN).strict,E=C.exports.useContext(UN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return re(Pae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Oae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function j7(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const R4={};function Iae(e){Object.assign(R4,e)}const N4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(N4);function GN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!R4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>N4.indexOf(e)-N4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function jN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,YN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Bae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:YN(0,1)}),Ty=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ec=Yv("deg"),_l=Yv("%"),wt=Yv("px"),Fae=Yv("vh"),$ae=Yv("vw"),ST=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),Y7=(e,t)=>n=>Boolean(jv(n)&&Bae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),qN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:Y7("hsl","hue"),parse:qN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Hae=YN(0,255),Lx=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Hae(e))}),$c={test:Y7("rgb","red"),parse:qN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Om(Im.transform(r))+")"};function Wae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const X6={test:Y7("#"),parse:Wae,transform:$c.transform},eo={test:e=>$c.test(e)||X6.test(e)||If.test(e),parse:e=>$c.test(e)?$c.parse(e):If.test(e)?If.parse(e):X6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?$c.transform(e):If.transform(e)},KN="${c}",XN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function ZN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,KN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,XN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function QN(e){return ZN(e).values}function JN(e){const{values:t,numColors:n,tokenised:r}=ZN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Gae(e){const t=QN(e);return JN(e)(t.map(Uae))}const xu={test:Vae,parse:QN,createTransformer:JN,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},xu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),bT={...lh,transform:Math.round},eD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Ec,rotateX:Ec,rotateY:Ec,rotateZ:Ec,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Ec,skewX:Ec,skewY:Ec,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:ST,originY:ST,originZ:wt,zIndex:bT,fillOpacity:Im,strokeOpacity:Im,numOctaves:bT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(jN(m)){o[m]=v;continue}const S=eD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function tD(e,t,n){for(const r in t)!ks(t[r])&&!GN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return tD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...tse,...Jae,...Qae,...ese]);function D4(e){return nse.has(e)}let nD=e=>!D4(e);function rse(e){!e||(nD=t=>t.startsWith("on")?!D4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(nD(i)||n===!0&&D4(i)||!t&&!D4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function xT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function ose(e,t,n){const r=xT(t,e.x,e.width),i=xT(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=ose(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&lse(p,o,a,s,!1)}const rD=()=>({...K7(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=rD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};tD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const iD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function oD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const aD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function sD(e,t,n,r){oD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(aD.has(i)?i:iD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||GN(r,e))&&(n[r]=t[r]);return n}function lD(e){const t=Z7(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),uD=e=>bv(e)?e[e.length-1]||0:e;function R3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const cD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():aS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=R3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=VN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const pse={useVisualState:cD({scrapeMotionValuesFromProps:lD,createRenderState:rD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),sD(t,n)}})},gse={useVisualState:cD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?pse:gse,preloadedFeatures:n,useRender:cse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function dD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function fD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:fD(e)?bse(e,t):xse(e,t)}}const hD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function pD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return sS(e,pD(t),hD(n,t==="pointerdown"),r)}function z4(e,t,n,r){return Q6(e,pD(t),n&&hD(n,t==="pointerdown"),r)}function gD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const wT=gD("dragHorizontal"),CT=gD("dragVertical");function mD(e){let t=!1;if(e==="y")t=CT();else if(e==="x")t=wT();else{const n=wT(),r=CT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function vD(){const e=mD(!0);return e?(e(),!1):!0}function _T(e,t,n){return(r,i)=>{!dD(r)||vD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z4(r,"pointerenter",e||n?_T(r,!0,e):void 0,{passive:!e}),z4(r,"pointerleave",t||n?_T(r,!1,t):void 0,{passive:!t})}const yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1;function e_(e){return C.exports.useEffect(()=>()=>e(),[])}function SD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Mx=.001,Ase=.01,kT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=kT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,kT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Ise=12;function Rse(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ET(e,Dse)&&ET(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=SD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=PT,S=PT;function w(){const P=h?-(h/1e3):0,E=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const M=J6(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const PT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Bse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Fse=[X6,$c,If],AT=e=>Fse.find(t=>t.test(e)),bD=(e,t)=>{let n=AT(e),r=AT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=TT(i),n=$c),r===If&&(o=TT(o),r=$c);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Bse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce($se);function xD(e,t){return eC(e)?n=>wr(e,t,n):eo.test(e)?bD(e,t):CD(e,t)}const wD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>xD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function LT(e){const t=xu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=xu.createTransformer(t),r=LT(e),i=LT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(wD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Wse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Wse;if(typeof e=="string")return eo.test(e)?bD:CD;if(Array.isArray(e))return wD;if(typeof e=="object")return Hse}function Use(e,t,n){const r=[],i=n||Vse(e[0]),o=e.length-1;for(let a=0;an(xv(e,t,r))}function jse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=xv(e[o],e[o+1],i);return t[o](s)}}function _D(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;B4(o===t.length),B4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),kD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=kD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},ED=1.525,Kse=4/11,Xse=8/11,Zse=9/10,r_=e=>e,i_=Yse(2),Qse=uS(i_),PD=n_(i_),TD=e=>1-Math.sin(Math.acos(e)),o_=uS(TD),Jse=n_(o_),a_=kD(ED),ele=uS(a_),tle=n_(a_),nle=qse(ED),rle=4356/361,ile=35442/1805,ole=16061/1805,$4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-$4(1-e*2)):.5*$4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||PD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function N3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=cle(r&&r.length===a.length?r:ule(a),i);function l(){return _D(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const MT={keyframes:N3,spring:t_,decay:dle};function fle(e){if(Array.isArray(e.to))return N3;if(MT[e.type])return MT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t_:N3}const AD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),LD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),AD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const yle=e=>cS[e].process(p0),MD=e=>{wv=!1,p0.delta=tC?AD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,nC=!0,qv.forEach(yle),nC=!1,wv&&(tC=!1,LD(MD))},Sle=()=>{wv=!0,tC=!0,nC||LD(MD)},ble=()=>p0;function OD(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?OD(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function ID(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=SD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=_D([0,100],[r,P],{clamp:!1}),r=0,P=100);const H=z(Object.assign(Object.assign({},w),{from:r,to:P}));function $(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=OD(a,T,u),l==="mirror"&&H.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=H.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_{p?.(),E.stop()}}}function RD(e,t){return t?e*(1e3/t):0}function _le({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=H=>{R=N,N=H,t=RD(H-R,ble().delta),(I===1&&H>M||I===-1&&HS?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),OT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s_(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=OT(e)&&OT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ND=(e,t)=>1-3*t+3*e,DD=(e,t)=>3*t-6*e,zD=e=>3*e,H4=(e,t,n)=>((ND(t,n)*e+DD(t,n))*e+zD(t))*e,BD=(e,t,n)=>3*ND(t,n)*e*e+2*DD(t,n)*e+zD(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H4(o(a),t,r)}function Ole({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!vD()}function p(S,w){!h()||(yD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}z4(i,"pointerdown",o?v:void 0,l),e_(u)}const Ile="production",FD=typeof process>"u"||process.env===void 0?Ile:"production",IT=new Set;function $D(e,t,n){e||IT.has(t)||(console.warn(t),n&&console.warn(n),IT.add(t))}const iC=new WeakMap,Ix=new WeakMap,Rle=e=>{const t=iC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Ix.has(n)||Ix.set(n,{});const r=Ix.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Ble({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Hle:$le)(a,o.current,e,i)}const Fle={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Fle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Hle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(FD!=="production"&&$D(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(jn.InView,!0)}))},[e])}const Hc=e=>t=>(e(t),null),Wle={inView:Hc(Ble),tap:Hc(Ole),focus:Hc(vse),hover:Hc(Pse)};function l_(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function HD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gle={linear:r_,easeIn:i_,easeInOut:PD,easeOut:Qse,circIn:TD,circInOut:Jse,circOut:o_,backIn:a_,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:$4},RT=e=>{if(Array.isArray(e)){B4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",NT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&xu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Rx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),DT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:My,scaleY:My,scale:My,opacity:Rx,backgroundColor:Rx,color:Rx,default:My},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=DT[e]||DT.default,{to:t,...n(t)}},Kle={...eD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:Z6,WebkitFilter:Z6},u_=e=>Kle[e];function c_(e,t){var n;let r=u_(e);return r!==Z6&&(r=xu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},WD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),VD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),WD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Kv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),eue=e=>dS[e].process(g0),UD=e=>{Cv=!1,g0.delta=oC?WD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,aC=!0,Kv.forEach(eue),aC=!1,Cv&&(oC=!1,VD(UD))},tue=()=>{Cv=!0,oC=!0,aC||VD(UD)},sC=()=>g0;function GD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(RT):RT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function iue(e,t){var n,r;return(r=(n=(d_(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=d_(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=NT(e,n);a==="none"&&s&&typeof n=="string"?a=c_(e,n):zT(a)&&typeof n=="string"?a=BT(n):!Array.isArray(n)&&zT(n)&&typeof a=="string"&&(n=BT(a));const l=NT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?_le({...p,...o}):ID({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=uD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function zT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function BT(e){return typeof e=="number"?0:c_("",e)}function d_(e,t){return e[t]||e.default||e}function f_(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=GD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function h_(e,t){e.indexOf(t)===-1&&e.push(t)}function p_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return h_(this.subscriptions,t),()=>p_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=cue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?RD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function B0(e){return new due(e)}const jD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},YD=[lh,wt,_l,Ec,$ae,Fae,fue],Rg=e=>YD.find(jD(e)),hue=[...YD,eo,xu],pue=e=>hue.find(jD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,B0(n))}function yue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=uD(o[a]);vue(e,a,s)}}function Sue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;slC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=qD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>qD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function qD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=f_(m,v,S,w);V4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(_ue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g_=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...g_].reverse(),Pue=g_.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{$=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!HD(K,G)||H?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(Q=>({animation:Q,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:Hc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Hc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l_(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class KD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s_(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Dx(h,this.transformPagePoint),dD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},fD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function FT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:FT(e,XD(t)),offset:FT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function XD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=XD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function da(e){return e.max-e.min}function $T(e,t=0,n=.01){return s_(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function UT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zue(e,{top:t,left:n,bottom:r,right:i}){return{x:UT(e.x,n,i),y:UT(e.y,t,r)}}function GT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uC=.35;function Hue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:jT(e,"left","right"),y:jT(e,"top","bottom")}}function jT(e,t,n){return{min:YT(e,t),max:YT(e,n)}}function YT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const qT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:qT(),y:qT()}),KT=()=>({min:0,max:0}),Ei=()=>({x:KT(),y:KT()});function ul(e){return[e("x"),e("y")]}function ZD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Bx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Bx(e)||!Bx(t)||!Bx(n)}function Sf(e){return cC(e)||QD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function QD(e){return XT(e.x)||XT(e.y)}function XT(e){return e&&e!=="0%"}function U4(e,t,n){const r=e-n,i=t*r;return n+i}function ZT(e,t,n,r,i){return i!==void 0&&(e=U4(e,i,r)),U4(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=ZT(e.min,t,n,r,i),e.max=ZT(e.max,t,n,r,i)}function JD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Uue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=da(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new KD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Hue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Bue(i.layout.actual,o);if(n){const s=n(Wue(a));this.hasMutatedConstraints=!!s,s&&(a=ZD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f_(t,r,0,n)}stopAnimation(){ul(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ul(n=>{const{drag:r}=this.getProps();if(!Oy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Fue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new KD(h,l,{transformPagePoint:s})}z4(i,"pointerdown",o&&u),e_(()=>a.current&&a.current.end())}const Jue={pan:Hc(Que),drag:Hc(Zue)},fC={current:null},tz={current:!1};function ece(){if(tz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Iy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Iy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Iy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Iy[i]]=o=>r.add(o),n["notify"+Iy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),V4(r)&&r.add(i);else if(ks(a))e.addValue(i,B0(o)),V4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,B0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const nz=Object.keys(yv),rce=nz.length,rz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const H={..._},$=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),V4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=oS(p),Z=VN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),tz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,$e){const He=[];for(let qe=0;qete.scheduleRender(),animationType:typeof tt=="string"?tt:"both",initialPromotionConfig:$e,layoutScroll:Tt})}return He},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=B0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){H[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=Q7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return $[X]!==void 0&&Se===void 0?void 0:H[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),az=e=>sce.has(e),lce=e=>Object.keys(e).some(az),sz=(e,t)=>{e.set(t,!1),e.set(t)},JT=e=>e===lh||e===wt;var eA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(eA||(eA={}));const tA=(e,t)=>parseFloat(e.split(", ")[t]),nA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return tA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?tA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=N4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const rA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nA(4,13),y:nA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=rA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);sz(h,s[u]),e[u]=rA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(az);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const lz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=u_(t);return n&&n.default||0}else{const n=mce(e),r=(jN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ez(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:oD},vce=rz(lz),yce=rz({...lz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=u_(t))===null||n===void 0?void 0:n.default)||0:(t=aD.has(t)?t:iD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:lD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:sD}),Sce=(e,t)=>j7(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function iA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=iA(e,t.target.x),r=iA(e,t.target.y);return`${n}% ${r}%`}},oA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(oz,v=>(o.push(v),oA)));const a=xu.parse(e);if(a.length>5)return r;const s=xu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(oA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Mm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=l_(),r=C.exports.useContext(G7);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(UN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:B0(e);return f_("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const uz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=uz.length,aA=e=>typeof e=="string"?parseFloat(e):e,sA=e=>typeof e=="number"||wt.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(xv(e,t,r))}function uA(e,t){e.min=t.min,e.max=t.max}function ds(e,t){uA(e.x,t.x),uA(e.y,t.y)}function cA(e,t,n,r,i){return e-=t,e=U4(e,1/n,r),i!==void 0&&(e=U4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=cA(e.min,t,n,s,i),e.max=cA(e.max,t,n,s,i)}function dA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function fA(e,t,n,r){dA(e.x,t,Mce,n?.x,r?.x),dA(e.y,t,Oce,n?.y,r?.y)}function hA(e){return e.translate===0&&e.scale===1}function dz(e){return hA(e.x)&&hA(e.y)}function fz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function pA(e){return da(e.x)/da(e.y)}function Ice(e,t,n=.1){return s_(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){h_(this.members,t),t.scheduleRender()}remove(t){if(p_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function gA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){h_(this.children,t),this.isDirty=!0}remove(t){p_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const mA=["","X","Y","Z"],vA=1e3;function hz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Wce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=GD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(SA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!fz(this.targetLayout,w)||S,H=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,H);const $={...d_(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&SA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Jf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Uce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));CA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var _;const T=E/1e3;bA(m.x,a.x,T),bA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,vA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,vA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&pz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ds(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(yA),this.root.sharedNodes.clear()}}}function Bce(e){e.updateLayout()}function Fce(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):pz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!dz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),fz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function yA(e){e.clearMeasurements()}function Hce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function SA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Wce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function bA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xA(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){xA(e.x,t.x,n.x,r),xA(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function wA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function CA(e){wA(e.x),wA(e.y)}function pz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(pA(t),pA(n),.2)}const Xce=hz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fx={current:void 0},Zce=hz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fx.current=e}return Fx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Wle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function gz(){const e=C.exports.useRef(!1);return I4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=gz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const gd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",$D(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=gz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(I4(()=>{w.current=!1,rde(h,S),v.current=p}),e_(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x($n,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x($x,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),FD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x($n,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function mC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,kA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(kA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(kA.enter,i)})},vz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(gd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});vz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},yz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(gd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...yz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},Sz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(gd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...Sz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var EA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??Ps.exit(EA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??Ps.enter(EA.enter,r),transitionEnd:t?.enter}}},bz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(gd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});bz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(gd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,pS]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[yde,m_]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Sde,GPe,bde,xde]=HN(),Nf=Pe(function(t,n){const{getButtonProps:r}=m_(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,v_]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v_(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(H={},$=null){return{...H,type:"button",ref:Fn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx(H.onClick,T),onFocus:Hx(H.onFocus,I),onKeyDown:Hx(H.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function(H={},$=null){return{...H,ref:$,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){hS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Pde(e){hS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Tde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=m_(),{reduceMotion:r}=v_(),i=Zv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Bf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v_(),{getPanelProps:s,isOpen:l}=m_(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(vz,{in:l,...i,children:m})});Bf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function Ode(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function PA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Ide,Rde]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Nde,y_]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),xz={info:{icon:Ode,colorScheme:"blue"},warning:{icon:PA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:PA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return xz[e].colorScheme}function zde(e){return xz[e].icon}var wz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});wz.displayName="Alert";var Cz=Pe(function(t,n){const i={display:"inline",...y_().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});Cz.displayName="AlertDescription";function _z(e){const{status:t}=Rde(),n=zde(t),r=y_(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}_z.displayName="AlertIcon";var kz=Pe(function(t,n){const r=y_();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});kz.displayName="AlertTitle";function Bde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Fde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G4.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Fde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Bde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:G4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G4,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,[Hde,Wde]=Cn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Vde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var $a=Pe((e,t)=>{const n=Wde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=vn(e),_=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":TA(a),"data-loading":TA(o),__css:_,className:SS("chakra-button",w),...E},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(AA,{...I})):x(AA,{...I}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function AA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re($n,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Hde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Ry=e=>e?"":void 0,Wx=e=>e?!0:void 0;function LA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Gde,a1]=Cn({strict:!1,name:"FormControlContext"});function jde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Fn(z,H=>{!H||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Ry(P),"data-disabled":Ry(i),"data-invalid":Ry(r),"data-readonly":Ry(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Fn(z,H=>{!H||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var md=Pe(function(t,n){const r=Ii("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});md.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Ez(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function S_(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b_(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b_(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:LA(t?.onFocus,h),onBlur:LA(t?.onBlur,p)}}var[qde,Kde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=vn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Pz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Pz=Pe(function(t,n){const r=a1(),i=Ez();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Pz.displayName="RequiredIndicator";function id(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var x_={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:x_});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:x_});Jde.displayName="VisuallyHiddenInput";var MA=!1,bS=null,F0=!1,bC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function w_(e,t){bC.forEach(n=>n(e,t))}function OA(e){F0=!0,tfe(e)&&(bS="keyboard",w_("keyboard",e))}function Sp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(F0=!0,w_("pointer",e))}function nfe(e){e.target===window||e.target===document||(F0||(bS="keyboard",w_("keyboard",e)),F0=!1)}function rfe(){F0=!1}function IA(){return bS!=="pointer"}function ife(){if(typeof window>"u"||MA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){F0=!0,e.apply(this,n)},document.addEventListener("keydown",OA,!0),document.addEventListener("keyup",OA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),MA=!0}function ofe(e){ife(),e(IA());const t=()=>e(IA());return bC.add(t),()=>{bC.delete(t)}}var[jPe,afe]=Cn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Tz(e={}){const t=b_(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),H=cr(l),[$,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),id(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const $e=n&&!m,He=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),qe=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const tt=C.exports.useCallback((Le={},at=null)=>{const At=st=>{de&&st.preventDefault(),K(!0)};return{...Le,ref:at,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&$),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Pa(Le.onMouseDown,At),onMouseUp:Pa(Le.onMouseUp,()=>K(!1)),onMouseEnter:Pa(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,$,J,S,o,r]),Ze=C.exports.useCallback((Le={},at=null)=>({...R,...Le,ref:Fn(at,At=>{!At||te(At.tagName==="LABEL")}),onClick:Pa(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var st;(st=G.current)==null||st.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),nt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:Fn(G,at),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Pa(Le.onChange,De),onBlur:Pa(Le.onBlur,z,()=>V(!1)),onFocus:Pa(Le.onFocus,H,()=>V(!0)),onKeyDown:Pa(Le.onKeyDown,He),onKeyUp:Pa(Le.onKeyUp,qe),required:i,checked:Se,disabled:$e,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x_}),[w,P,a,De,z,H,He,qe,i,Se,$e,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:at,onMouseDown:Pa(Le.onMouseDown,RA),onTouchStart:Pa(Le.onTouchStart,RA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:tt,getInputProps:nt,getLabelProps:Tt,htmlProps:R}}function RA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=pd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=pd({from:{opacity:0},to:{opacity:1}}),vfe=pd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Az=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Tz({...E,isDisabled:S,isChecked:_,onChange:T}),H=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:H,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Az.displayName="Checkbox";function yfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C_(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function j4(e,t,n){return(e-t)*100/(n-t)}function Lz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C_(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Mz(Pc(v),o),w=n??S,P=C.exports.useCallback($=>{$!==v&&(m||p($.toString()),u?.($.toString(),Pc($)))},[u,m,v]),E=C.exports.useCallback($=>{let j=$;return l&&(j=m0(j,a,s)),C_(j,w)},[w,l,s,a]),_=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc($):j=Pc(v)+$,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc(-$):j=Pc(v)-$,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=Vx(r,o,n)??a,P($)},[r,n,o,P,a]),I=C.exports.useCallback($=>{const j=Vx($,o,w)??a;P(j)},[w,o,P,a]),R=Pc(v);return{isOutOfRange:R>s||Rx(Q5,{styles:Oz}),wfe=()=>x(Q5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${Oz} - `});function Uf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Iz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Iz()&&e.test(navigator.vendor),Efe=e=>Iz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function NA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=NA(n),a=NA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function __(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k_=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=vn(i),s=S_(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k_.displayName="Input";k_.id="Input";var[Ife,Rz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=vn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=__({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E_=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=Rz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});E_.displayName="InputAddon";var Nz=Pe(function(t,n){return x(E_,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Nz.displayName="InputLeftAddon";Nz.id="InputLeftAddon";var Dz=Pe(function(t,n){return x(E_,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Dz.displayName="InputRightAddon";Dz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Rz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var zz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});zz.id="InputLeftElement";zz.displayName="InputLeftElement";var Bz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Bz.id="InputRightElement";Bz.displayName="InputRightElement";function Bfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Bfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Ffe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Ffe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Nl=we("div");Nl.displayName="Box";var Fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Nl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Fz.displayName="Square";var Hfe=Pe(function(t,n){const{size:r,...i}=t;return x(Fz,{size:r,ref:n,borderRadius:"9999px",...i})});Hfe.displayName="Circle";var $z=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});$z.displayName="Center";var Wfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Wfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Gfe.displayName="Divider";var en=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});en.displayName="Flex";var Hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Hz.displayName="Grid";function DA(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=__({gridArea:r,gridColumn:DA(i),gridRow:DA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(Nl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Wz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P_=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P_.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P_,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(P_,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Wz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Wz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return od(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function rhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[CC]:od(n,i=>r[i])}}function ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":od(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var T_=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=yS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,$=p?x(Uz,{children:I},N):I;if(!P)return $;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return re(C.exports.Fragment,{children:[$,de]},N)})},[u,w,P,E,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[CC]:S[CC]},...m},_)});T_.displayName="Stack";var Gz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=__({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function zA(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,_=>zA(O6("space",_)(E))),"--chakra-wrap-y-spacing":E=>od(P,_=>zA(O6("space",_)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Yz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var ahe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},qz=ahe,bp=()=>{},she={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:qz},Kz=typeof window<"u"?{window,document}:uhe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return re(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&Ux(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),H=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Fn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:$,onKeyDown:H,onMouseOver:J,onMouseLeave:ie}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function phe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),ghe=e=>tB(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||mhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():vhe(e)?!0:tB(e)}function yhe(e){return e?Jz(e)&&rB(e)&&!ghe(e):!1}var She=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>rB(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Wa="bottom",Va="right",Oo="left",A_="auto",Jv=[Mo,Wa,Va,Oo],$0="start",kv="end",Phe="clippingParents",oB="viewport",zg="popper",The="reference",BA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),aB=[].concat(Jv,[A_]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Bhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function Ga(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=Ga(e).Element;return e instanceof t||e instanceof Element}function Da(e){var t=Ga(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L_(e){if(typeof ShadowRoot>"u")return!1;var t=Ga(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Fhe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Da(o)||!Al(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function $he(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Da(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Hhe={name:"applyStyles",enabled:!0,phase:"write",fn:Fhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,Y4=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Da(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=eh(e)?Ga(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M_(e){var t=W0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wu(e){return Ga(e).getComputedStyle(e)}function Whe(e){return["table","td","th"].indexOf(Al(e))>=0}function vd(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(L_(e)?e.host:null)||vd(e)}function FA(e){return!Da(e)||wu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&Da(e)){var r=wu(e);if(r.position==="fixed")return null}var i=CS(e);for(L_(i)&&(i=i.host);Da(i)&&["html","body"].indexOf(Al(i))<0;){var o=wu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function e2(e){for(var t=Ga(e),n=FA(e);n&&Whe(n)&&wu(n).position==="static";)n=FA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&wu(n).position==="static")?t:n||Vhe(e)||t}function O_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return Yf(e,Y4(t,n))}function Uhe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=O_(s),u=[Oo,Va].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=M_(o),v=l==="y"?Mo:Oo,S=l==="y"?Wa:Va,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Bm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function $A(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===Ga(n)&&(R=vd(n),wu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Va)&&o===kv){M=Wa;var H=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=H-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Wa)&&o===kv){T=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:kl(t.placement),variation:V0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$A(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$A(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ny={passive:!0};function Jhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ga(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function HA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function I_(e){var t=Ga(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function R_(e){return W0(vd(e)).left+I_(e).scrollLeft}function rpe(e,t){var n=Ga(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+R_(e),y:l}}function ipe(e){var t,n=vd(e),r=I_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+R_(e),l=-r.scrollTop;return wu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N_(e){var t=wu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Da(e)&&N_(e)?e:fB(CS(e))}function Fm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ga(r),a=i?[o].concat(o.visualViewport||[],N_(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Fm(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=W0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function WA(e,t,n){return t===oB?kC(rpe(e,n)):eh(t)?ope(t,n):kC(ipe(vd(e)))}function ape(e){var t=Fm(CS(e)),n=["absolute","fixed"].indexOf(wu(e).position)>=0,r=n&&Da(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&lB(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=WA(e,u,r);return l.top=Yf(h.top,l.top),l.right=Y4(h.right,l.right),l.bottom=Y4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},WA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Wa:l={x:a,y:t.y+t.height};break;case Va:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O_(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Phe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=cB(typeof P!="number"?P:dB(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||vd(e.elements.popper),l,h,a),R=W0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),H=m===zg?z:R,$={top:I.top-H.top+E.top,bottom:H.bottom-I.bottom+E.bottom,left:I.left-H.left+E.left,right:H.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys($).forEach(function(V){var J=[Va,Wa].indexOf(V)>=0?1:-1,ie=[Mo,Wa].indexOf(V)>=0?"y":"x";$[V]+=de[ie]*J})}return $}function lpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?aB:l,h=V0(r),p=h?s?BA:BA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===A_)return[];var t=z3(e);return[HA(e),t,HA(t)]}function cpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[z3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===A_?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,H=M[0],$=0;$=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Va:Oo:V?Wa:Mo;I[ie]>R[ie]&&(K=z3(K));var G=z3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){H=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var $e=M.find(function(He){var qe=N.get(He);if(qe)return qe.slice(0,De).every(function(tt){return tt})});if($e)return H=$e,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function VA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function UA(e){return[Mo,Va,Wa,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=VA(a,r),u=VA(s,i,o),h=UA(l),p=UA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Va].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=ppe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=O_(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,H=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Wa:Va,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?M_(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),$e=De[J],He=De[ie],qe=Bm(0,N[Q],Se[Q]),tt=T?N[Q]/2-te-qe-$e-$.mainAxis:X-qe-$e-$.mainAxis,Ze=T?-N[Q]/2+te+qe+He+$.mainAxis:he+qe+He+$.mainAxis,nt=t.elements.arrow&&e2(t.elements.arrow),Tt=nt?M==="y"?nt.clientTop||0:nt.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+tt-xt-Tt,at=K+Ze-xt,At=Bm(v?Y4(G,Le):G,K,v?Yf(Z,at):Z);R[M]=At,de[M]=At-K}if(s){var st,gt=M==="x"?Mo:Oo,an=M==="x"?Wa:Va,Ct=R[I],Ut=I==="y"?"height":"width",sn=Ct+P[gt],yn=Ct-P[an],Oe=[Mo,Oo].indexOf(E)!==-1,et=(st=j?.[I])!=null?st:0,Xt=Oe?sn:Ct-N[Ut]-z[Ut]-et+$.altAxis,Yt=Oe?Ct+N[Ut]+z[Ut]-et-$.altAxis:yn,ke=v&&Oe?Uhe(Xt,Ct,Yt):Bm(v?Xt:sn,Ct,v?Yt:yn);R[I]=ke,de[I]=ke-Ct}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===Ga(e)||!Da(e)?I_(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Da(t),i=Da(t)&&_pe(t),o=vd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||N_(o))&&(s=Cpe(t)),Da(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=R_(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ppe(e){var t=Epe(e);return Bhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var GA={placement:"bottom",modifiers:[],strategy:"absolute"};function jA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Rpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Npe=e=>Rpe[e],YA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...YA,...e}}:t={enabled:e,options:YA},t}var zpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Bpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{qA(e)},effect:({state:e})=>()=>{qA(e)}},qA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Npe(e.placement))},Fpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Hpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Hpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Wpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{KA(e)},effect:({state:e})=>()=>{KA(e)}},KA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Upe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function pB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=_.current)==null||$.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Wpe,Fpe,Bpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=P.current)==null||$.destroy(),P.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),I=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=$;return{...Q,ref:j,"data-popper-arrow":"",style:jpe($)}},[]),H=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=P.current)==null||$.update()},forceUpdate(){var $;($=P.current)==null||$.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:H,getReferenceProps:I}}function jpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=Cn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Xpe]=Cn({strict:!1,name:"PortalContext"}),D_="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D_,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D_),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=D_;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Dy.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(wp=new WeakMap,wp=new WeakMap,Dy=new WeakMap,zy={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function z_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function bB(){}function xB(){}xB.resetWarningCache=bB;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:xB,resetWarningCache:bB};return n.PropTypes=n,n};On.exports=a0e();var EC="data-focus-lock",wB="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function CB(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function B_(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=gl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=mz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...gl({},n)})};PB.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),PB}var TB=B_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=B_(),h0e=B_(),p0e=EB({async:!0}),g0e=[],F_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,H=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(He){var qe=u.current;if(qe&&qe.focus){var tt=typeof j=="function"?j(qe):j;if(tt){var Ze=typeof tt=="object"?tt:void 0;u.current=null,He?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[j]),te=C.exports.useCallback(function(He){l.current&&TB.useMedium(He)},[]),X=AB.useMedium,he=C.exports.useCallback(function(He){s.current!==He&&(s.current=He,a(He))},[]),ye=Tn((r={},r[wB]=p&&"disabled",r[EC]=P,r),H),Se=m!==!0,De=Se&&m!=="tail",$e=CB([n,he]);return re($n,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x($,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:$e,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});F_.propTypes={};F_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const LB=F_;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){$_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Dl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W_=k0e.join(","),E0e="".concat(W_,", [data-focus-guard]"),$B=function(e,t){var n;return Dl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:W_)?[i]:[],$B(i))},[])},V_=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Dl(r.parentNode.querySelectorAll(W_)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Dl(t).map(function(n){return V_([n])}).reduce(function(n,r){return n.concat(r)},[])},U_=function(e,t){return Dl(e).filter(function(n){return RB(t,n)}).filter(function(n){return x0e(n)})},XA=function(e,t){return t===void 0&&(t=new Map),Dl(e).filter(function(n){return NB(t,n)})},AC=function(e,t,n){return FB(U_(V_(e,n),t),!0,n)},ZA=function(e,t){return FB(U_(V_(e),t),!1)},T0e=function(e,t){return U_(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Dl(e.children).some(function(n){return Pv(n,t)})},A0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},G_=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?A0e(Dl(HB(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},j_=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Dl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},VB=function(e){var t=document&&j_();return!t||t.dataset&&t.dataset.focusGuard?!1:G_(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&j_();return e?Dl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y_=function(e,t){return BB(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y_(n,e))}),e.filter(function(n){return t.has(n)})},QA=function(e){return e[0]&&e.length>1?Y_(e[0],e):e[0]},JA=function(e,t){return e.length>1?e.indexOf(Y_(e[t],e)):t},UB="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=JA(e,0),_=JA(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=XA(r.filter(D0e(n)));return i&&i.length?QA(i):QA(XA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i=0)return o}return!1},GB=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Pv(u,a)?a=u:a=Yx(u,a))})}),a},B0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},F0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(C0e)},$0e=function(e,t){var n=document&&j_(),r=G_(e).filter(q4),i=GB(n||e,e,r),o=new Map,a=ZA(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=ZA([i],o).map(function(m){var v=m.node;return v}),u=F0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===UB?{node:z0e(a,h,B0e(r,o))}:p===void 0?p:u[p]}},H0e=function(e){var t=G_(e).filter(q4),n=GB(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:H_(s)}})},W0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,W0e(r.node,n.focusOptions),qx--}};const jB=V0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function eL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},K4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(VB(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=H0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),eL(S,v.length,1,v),eL(S,-1,-1,v))}}}return t},qB=function(t){K4()&&t&&(t.stopPropagation(),t.preventDefault())},q_=function(){return YB(K4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},KB=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",q_),window.addEventListener("blur",KB)},r1e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",q_),window.removeEventListener("blur",KB)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K4(),YB(K4)):(r1e(),qp=null)}TB.assignSyncMedium(e1e);AB.assignMedium(q_);h0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const a1e=m0e(i1e,o1e)(t1e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:a1e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;z_(ZB,["sideCar"]);XB.propTypes={};const s1e=XB;var QB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var B3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",JB=EB(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=mz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=gl(gl({},_),i);return re($n,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:F3,zeroRight:B3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},v1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zx(n),Zx(r),Zx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S1e=eF(),b1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(l1e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(B3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(F3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(B3," .").concat(B3,` { - right: 0 `).concat(r,`; - } - - .`).concat(F3," .").concat(F3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(u1e,": ").concat(s,`px; - } -`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var By=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",By,By),window.removeEventListener("test",By,By)}catch{MC=!1}var Cp=MC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return tF(e,"overflowY")},_1e=function(e){return tF(e,"overflowX")},tL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?C1e(t):_1e(t)},rF=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&nF(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nL=function(e){return[e.deltaX,e.deltaY]},rL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return eF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=gC([e.lockRef.current],(e.shards||[]).map(rL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=tL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=tL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var H=r.current||I;return T1e(H,P,w,H==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?nL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(rL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,nL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return re($n,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(JB,O1e);var iF=C.exports.forwardRef(function(e,t){return x(_S,{...gl({},e,{ref:t,sideCar:I1e})})});iF.classNames=_S.classNames;const oF=iF;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},OC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function D1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=B1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},H=null)=>({role:"dialog",...z,ref:Fn(H,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,$=>$.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},H=null)=>({...z,ref:Fn(H,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function B1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[F1e,fh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[$1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(F1e,{value:S,children:x(gd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var K_=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=dh("chakra-modal__close-btn",r),s=fh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});K_.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[p,m]=l_();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var H1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...Sz,custom:{initialScale:.95,reverse:!0}},none:{}},W1e=we(Rl.section),V1e=e=>H1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(W1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=ad();return x(U1e,{...i||(u==="none"?{}:yz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function lF(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var uF=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[YPe,G1e]=Cn(),j1e=we(bz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=G1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var cF=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),X1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function iL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Z1e=50,oL=300;function Q1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},oL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},oL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function nge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:H,format:$,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr(H??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useRef(null),tt=C.exports.useCallback(ke=>ke.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),nt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);id(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(tt(Ot))}},[Ze,tt]);const Tt=C.exports.useCallback((ke=a)=>{Se&&te(ke)},[te,Se,a]),xt=C.exports.useCallback((ke=a)=>{Se&&X(ke)},[X,Se,a]),Le=Q1e(Tt,xt);iL(He,"disabled",Le.stop,Le.isSpinning),iL(qe,"disabled",Le.stop,Le.isSpinning);const at=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Z(tt(Ne)),$e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Z,tt,Ze]),At=C.exports.useCallback(ke=>{var Ot;V?.(ke),$e.current&&(ke.target.selectionStart=$e.current.start??((Ot=ke.currentTarget.value)==null?void 0:Ot.length),ke.currentTarget.selectionEnd=$e.current.end??ke.currentTarget.selectionStart)},[V]),st=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;tge(ke,Q)||ke.preventDefault();const Ot=gt(ke)*a,Ne=ke.key,ln={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[Ne];ln&&(ke.preventDefault(),ln(ke))},[Q,a,Tt,xt,Z,i,o]),gt=ke=>{let Ot=1;return(ke.metaKey||ke.ctrlKey)&&(Ot=.1),ke.shiftKey&&(Ot=10),Ot},an=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),Ct=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&Ct()},[n,ye,Ct]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=De.current)==null||ke.focus()})},[t]),yn=C.exports.useCallback(ke=>{ke.preventDefault(),Le.up(),sn()},[sn,Le]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Le.down(),sn()},[sn,Le]);Uf(()=>De.current,"wheel",ke=>{var Ot;const ut=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!ut)return;ke.preventDefault();const ln=gt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Tt(ln):Nn===1&&xt(ln)},{passive:!1});const et=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Fn(Ot,He),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||yn(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,yn,Le.stop,l]),Xt=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Fn(Ot,qe),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||Oe(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Le.stop,l]),Yt=C.exports.useCallback((ke={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Fn(De,Ot),value:nt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:ol(ke.onChange,at),onKeyDown:ol(ke.onKeyDown,st),onFocus:ol(ke.onFocus,At,()=>ye(!0)),onBlur:ol(ke.onBlur,J,Ut)}),[E,m,p,M,T,nt,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,at,st,At,J,Ut]);return{value:nt(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,PS]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ige,X_]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Z_=Pe(function(t,n){const r=Ii("NumberInput",t),i=vn(t),o=b_(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:cF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z_.displayName="NumberInput";var dF=Pe(function(t,n){const r=PS();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});dF.displayName="NumberInputStepper";var Q_=Pe(function(t,n){const{getInputProps:r}=X_(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:cF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q_.displayName="NumberInputField";var fF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J_=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X_(),o=i(t,n);return x(fF,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});J_.displayName="NumberDecrementStepper";var e8=Pe(function(t,n){const{getIncrementButtonProps:r}=X_(),i=r(t,n),o=PS();return x(fF,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});e8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[uge,n2]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[H,$]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(at=>`${at}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=pB({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),$e=C.exports.useCallback((at={},At=null)=>{const st={...at,style:{...at.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Fn(R,At),children:De?at.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(at.onKeyDown,gt=>{n&>.key==="Escape"&&E()}),onBlur:al(at.onBlur,gt=>{const an=aL(gt),Ct=Jx(R.current,an),Ut=Jx(I.current,an);P&&t&&(!Ct&&!Ut)&&E()}),"aria-labelledby":H?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(st.role="tooltip",st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0}),st.onMouseLeave=al(at.onMouseLeave,gt=>{gt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),st},[De,Q,H,K,j,G,u,n,E,P,t,p,l,s]),He=C.exports.useCallback((at={},At=null)=>X({...at,style:{visibility:P?"visible":"hidden",...at.style}},At),[P,X]),qe=C.exports.useCallback((at,At=null)=>({...at,ref:Fn(At,M,Z)}),[M,Z]),tt=C.exports.useRef(),Ze=C.exports.useRef(),nt=C.exports.useCallback(at=>{M.current==null&&Z(at)},[Z]),Tt=C.exports.useCallback((at={},At=null)=>{const st={...at,ref:Fn(I,At,nt),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(st.onClick=al(at.onClick,T)),u===kp.hover&&(st.onFocus=al(at.onFocus,()=>{tt.current===void 0&&_()}),st.onBlur=al(at.onBlur,gt=>{const an=aL(gt),Ct=!Jx(R.current,an);P&&t&&Ct&&E()}),st.onKeyDown=al(at.onKeyDown,gt=>{gt.key==="Escape"&&E()}),st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0,tt.current=window.setTimeout(()=>_(),h)}),st.onMouseLeave=al(at.onMouseLeave,()=>{N.current=!1,tt.current&&(clearTimeout(tt.current),tt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),st},[ie,P,Q,u,nt,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{tt.current&&clearTimeout(tt.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((at={},At=null)=>({...at,id:K,ref:Fn(At,st=>{$(!!st)})}),[K]),Le=C.exports.useCallback((at={},At=null)=>({...at,id:G,ref:Fn(At,st=>{de(!!st)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:He,getPopoverProps:$e,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function Jx(e,t){return e===t||e?.contains(t)}function aL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t8(e){const t=Ii("Popover",e),{children:n,...r}=vn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t8.displayName="Popover";function n8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(xS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},gge=we(Rl.section),hF=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});hF.displayName="PopoverTransition";var r8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(hF,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});r8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function i8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}i8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=pd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=pd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=pd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function pF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var gF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};gF.displayName="Shape";var IC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});IC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=pF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(gF,{size:n,isIndeterminate:v,children:[x(IC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(IC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=pF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),mF=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=vn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},re(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});mF.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var vF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});vF.displayName="SelectField";var yF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=vn(e),[w,P]=Age(S,nQ),E=S_(P),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(vF,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(SF,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});yF.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),SF=e=>{const{children:t=x(Lge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};SF.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function bF(e){return!!e.touches}function Rge(e){return bF(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function xF(e,t="page"){return bF(e)?Dge(e,t):zge(e,t)}function Bge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Fge(e,t=!1){function n(i){e(i,{point:xF(i)})}return t?Bge(n):n}function $3(e,t,n,r){return Oge(e,t,Fge(n,t==="pointerdown"),r)}function wF(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:xF(e)},{timestamp:i}=BP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Vge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=BP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function sL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:sL(e.point,t[t.length-1]),offset:sL(e.point,t[0]),velocity:Wge(t,.1)}}var Hge=e=>e*1e3;function Wge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Hge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function lL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(lL(e)&&lL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function CF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=wF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function _F({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=_F({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},yd=Zge({"../../../react-shim.js"(){}});yd();yd();yd();var Ma=e=>e?"":void 0,S0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");yd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function Qge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function kF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>$y(w).height>$y(P).height?w:P,H3):r.reduce((w,P)=>$y(w).width>$y(P).width?w:P,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...im({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function EF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),H=cr(w),$=EF({isReversed:a,direction:s,orientation:l}),[j,de]=nS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),He=($?De:X).map(We=>j4(We,t,n)),qe=l==="vertical",tt=C.exports.useRef(null),Ze=C.exports.useRef(null),nt=_F({getNodes(){const We=Ze.current,ht=We?.querySelectorAll("[role=slider]");return ht?Array.from(ht):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),at=C.exports.useCallback(We=>{var ht;if(!tt.current)return;Se.current.eventSource="pointer";const it=tt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ht=We.touches)==null?void 0:ht[0])??We,Qn=qe?it.bottom-Zt:Nt-it.left,lo=qe?it.height:it.width;let gi=Qn/lo;return $&&(gi=1-gi),Lz(gi,t,n)},[qe,$,n,t]),At=(n-t)/10,st=S||(n-t)/100,gt=C.exports.useMemo(()=>({setValueAtIndex(We,ht){if(!Z)return;const it=Se.current.valueBounds[We];ht=parseFloat(wC(ht,it.min,st)),ht=m0(ht,it.min,it.max);const Nt=[...Se.current.value];Nt[We]=ht,de(Nt)},setActiveIndex:G,stepUp(We,ht=st){const it=Se.current.value[We],Nt=$?it-ht:it+ht;gt.setValueAtIndex(We,Nt)},stepDown(We,ht=st){const it=Se.current.value[We],Nt=$?it+ht:it-ht;gt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[st,$,de,Z]),an=C.exports.useCallback(We=>{const ht=We.key,Nt={ArrowRight:()=>gt.stepUp(K),ArrowUp:()=>gt.stepUp(K),ArrowLeft:()=>gt.stepDown(K),ArrowDown:()=>gt.stepDown(K),PageUp:()=>gt.stepUp(K,At),PageDown:()=>gt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];gt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];gt.setValueAtIndex(K,Zt)}}[ht];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[gt,K,At,ye]),{getThumbStyle:Ct,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>kF({isReversed:$,orientation:l,thumbRects:nt,thumbPercents:He}),[$,l,He,nt]),Oe=C.exports.useCallback(We=>{var ht;const it=We??K;if(it!==-1&&M){const Nt=Le.getThumb(it),Zt=(ht=Ze.current)==null?void 0:ht.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=We=>{const ht=at(We)||0,it=Se.current.value.map(gi=>Math.abs(gi-ht)),Nt=Math.min(...it);let Zt=it.indexOf(Nt);const Qn=it.filter(gi=>gi===Nt);Qn.length>1&&ht>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),gt.setValueAtIndex(Zt,ht),Oe(Zt)},Xt=We=>{if(K==-1)return;const ht=at(We)||0;G(K),gt.setValueAtIndex(K,ht),Oe(K)};CF(Ze,{onPanSessionStart(We){!Z||(J(!0),et(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ht=null)=>({...We,...R,id:Le.root,ref:Fn(ht,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),ke=C.exports.useCallback((We={},ht=null)=>({...We,ref:Fn(ht,tt),id:Le.track,"data-disabled":Ma(h),style:{...We.style,...sn}}),[h,sn,Le]),Ot=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.innerTrack,style:{...We.style,...yn}}),[yn,Le]),Ne=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We,Zt=X[it];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${it}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[it];return{...Nt,ref:ht,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(it),"data-active":Ma(V&&K===it),"aria-valuetext":H?.(Zt)??P?.[it],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[it],"aria-labelledby":E?.[it]?void 0:_?.[it],style:{...We.style,...Ct(it)},onKeyDown:b0(We.onKeyDown,an),onFocus:b0(We.onFocus,()=>{Q(!0),G(it)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,H,P,l,h,p,E,_,Ct,an,Q]),ut=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.output,htmlFor:X.map((it,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),ln=C.exports.useCallback((We,ht=null)=>{const{value:it,...Nt}=We,Zt=!(itn),Qn=it>=X[0]&&it<=X[X.length-1];let lo=j4(it,t,n);lo=$?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ht,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!Zt),"data-highlighted":Ma(Qn),style:{...We.style,...gi}}},[h,$,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We;return{...Nt,ref:ht,id:Le.getInput(it),type:"hidden",value:X[it],name:Array.isArray(T)?T[it]:`${T}-${it}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>He[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:gt,getRootProps:Yt,getTrackProps:ke,getInnerTrackProps:Ot,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Nn,getOutputProps:ut}}function eme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[tme,TS]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[nme,o8]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),PF=Pe(function(t,n){const r=Ii("Slider",t),i=vn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});PF.defaultProps={orientation:"horizontal"};PF.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o8(),s=r(t,n);return le.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";yd();yd();function sme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),H=EF({isReversed:a,direction:s,orientation:l}),[$,j]=nS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0($,t,n),te=n-Z+t,he=j4(H?te:Z,t,n),ye=l==="vertical",Se=wF({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:H,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useId(),tt=u??qe,[Ze,nt]=[`slider-thumb-${tt}`,`slider-track-${tt}`],Tt=C.exports.useCallback(Ne=>{var ut;if(!De.current)return;const ln=Se.current;ln.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ht}=((ut=Ne.touches)==null?void 0:ut[0])??Ne,it=ye?Nn.bottom-ht:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=it/Nt;H&&(Zt=1-Zt);let Qn=Lz(Zt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(wC(Qn,ln.min,ln.step))),Qn=m0(Qn,ln.min,ln.max),Qn},[ye,H,Se]),xt=C.exports.useCallback(Ne=>{const ut=Se.current;!ut.isInteractive||(Ne=parseFloat(wC(Ne,ut.min,G)),Ne=m0(Ne,ut.min,ut.max),j(Ne))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(Ne=G){const ut=H?Z-Ne:Z+Ne;xt(ut)},stepDown(Ne=G){const ut=H?Z+Ne:Z-Ne;xt(ut)},reset(){xt(o||0)},stepTo(Ne){xt(Ne)}}),[xt,H,Z,G,o]),at=C.exports.useCallback(Ne=>{const ut=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(ut.min),End:()=>xt(ut.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),ut.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,st=Kge($e),{getThumbStyle:gt,rootStyle:an,trackStyle:Ct,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const Ne=Se.current,ut=st??{width:0,height:0};return kF({isReversed:H,orientation:Ne.orientation,thumbRects:[ut],thumbPercents:[he]})},[H,st,he,Se]),sn=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ut;return(ut=$e.current)==null?void 0:ut.focus()})},[Se]);id(()=>{const Ne=Se.current;sn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Z,N]);function yn(Ne){const ut=Tt(Ne);ut!=null&&ut!==Se.current.value&&j(ut)}CF(He,{onPanSessionStart(Ne){const ut=Se.current;!ut.isInteractive||(V(!0),sn(),yn(Ne),R?.(ut.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Oe=C.exports.useCallback((Ne={},ut=null)=>({...Ne,...I,ref:Fn(ut,He),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(J),style:{...Ne.style,...an}}),[I,h,J,an]),et=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,De),id:nt,"data-disabled":Ma(h),style:{...Ne.style,...Ct}}),[h,nt,Ct]),Xt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,style:{...Ne.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,$e),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ma(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...Ne.style,...gt(0)},onKeyDown:b0(Ne.onKeyDown,at),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,gt,at]),ke=C.exports.useCallback((Ne,ut=null)=>{const ln=!(Ne.valuen),Nn=Z>=Ne.value,We=j4(Ne.value,t,n),ht={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:H?`${100-We}%`:`${We}%`},horizontal:{left:H?`${100-We}%`:`${We}%`}})};return{...Ne,ref:ut,role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!ln),"data-highlighted":Ma(Nn),style:{...Ne.style,...ht}}},[h,H,n,t,l,Z]),Ot=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Oe,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:ke,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t"}),[dme,LS]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),a8=Pe((e,t)=>{const n=Ii("Slider",e),r=vn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a8.defaultProps={orientation:"horizontal"};a8.displayName="Slider";var TF=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});TF.displayName="SliderThumb";var AF=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});AF.displayName="SliderTrack";var LF=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});LF.displayName="SliderFilledTrack";var RC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});RC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),uL=e=>e?"":void 0,s8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Tz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":uL(s.isChecked),"data-hover":uL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,MF,pme,gme]=HN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=MF(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Fn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:OF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":IF(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[bme,xme]=Cn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:IF(n,s),tabId:OF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function _me(){const e=r2(),t=MF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Cs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function OF(e,t){return`${e}--tab-${t}`}function IF(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),RF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});RF.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var NF=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});NF.displayName="TabPanel";var DF=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});DF.displayName="TabPanels";var zF=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});zF.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],BF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=S_(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});BF.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function cL(e,t){const n=FF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function FF(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Dme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Bme(zme);function Bme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Fme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=cL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:$F(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=FF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(cL(ml.getState(),i).position)}}var dL=0;function Fme(e,t={}){dL+=1;const n=t.id??dL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(_z,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(kz,{id:u?.title,children:i}),s&&x(Cz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function $F(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Hme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=$F(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=BN();return C.exports.useMemo(()=>Hme(t.direction,e),[e,t.direction])}var Wme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},HF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Wme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},DC(n,{id:t,onClose:P})))});HF.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=HF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(gd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re($n,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Bg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:H}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=pB({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),H()},[H]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=zC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),$e=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>X4(K),"keydown",s?$e:void 0),Uf(()=>X4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const He=C.exports.useCallback((Ze={},nt=null)=>({...Ze,ref:Fn(K,nt,$),onPointerEnter:Bg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Bg(Ze.onClick,Se),onPointerDown:Bg(Ze.onPointerDown,De),onFocus:Bg(Ze.onFocus,he),onBlur:Bg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,$]),qe=C.exports.useCallback((Ze={},nt=null)=>j({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},nt),[j,S,w]),tt=C.exports.useCallback((Ze={},nt=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:nt,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:He,getTooltipProps:tt,getTooltipPositionerProps:qe,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=X4(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X4(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const H=mQ(i,"colors",E);n[Hr.arrowBg.var]=H}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const H=C.exports.Children.only(o);M=C.exports.cloneElement(H,_.getTriggerProps(H.props,H.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?re($n,{children:[M,x(gd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x($n,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:re(HR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return re(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:l8(e)?2:u8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function WF(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function VF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l8(e){return ive&&e instanceof Map}function u8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function c8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=GF(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return d8(r,!0)},!0)),e}function Jme(){Ss(2)}function f8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=HC[e];return t||Ss(18,e),t}function eve(e,t){HC[e]||(HC[e]=t)}function BC(){return Mv}function rw(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function Z4(e){FC(e),e.p.forEach(tve),e.p=null}function FC(e){e===Mv&&(Mv=e.l)}function fL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(Z4(t),Ss(4)),Cu(e)&&(e=Q4(t,e),t.l||J4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Q4(t,n,[]),Z4(t),t.u&&t.v(t.u,t.s),e!==UF?e:void 0}function Q4(e,t,n){if(f8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return hL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return hL(e,r,i,o,a,n)}),J4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function hL(e,t,n,r,i,o){if(sd(i)){var a=Q4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(WF(n,r,a),!sd(a))return;e.m=!1}if(Cu(i)&&!f8(i)){if(!e.h.F&&e._<1)return;Q4(e,i),t&&t.A.l||J4(e,i)}}function J4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d8(t,n)}function ow(e,t){var n=e[tr];return(n?bf(n):e)[t]}function pL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Nc(e){e.P||(e.P=!0,e.l&&Nc(e.l))}function aw(e){e.o||(e.o=c8(e.t))}function $C(e,t,n){var r=l8(t)?El("MapSet").N(t,n):u8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:BC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:BC()).p.push(r),r}function nve(e){return sd(e)||Ss(22,e),function t(n){if(!Cu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=gL(n,o),i.I=!1}else r=gL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||WF(r,a,t(s))}),o===3?new Set(r):r}(e)}function gL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c8(e)}function rve(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Nc(s);break;case 4:n(s)&&Nc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!VF(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=El("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new sve,jF=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p8)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error($i(12));if(typeof n(void 0,{type:e5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function YF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n5}function i(s,l){r(s)===n5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var hve=function(t,n){return t===n};function pve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;QF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=QF})(ZF);var JF={exports:{}},e$={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var OS=C.exports,Qve=ZF.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=OS.useRef,r2e=OS.useEffect,i2e=OS.useMemo,o2e=OS.useDebugValue;e$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=e$})(JF);function a2e(e){e()}let t$=a2e;const s2e=e=>t$=e,l2e=()=>t$,ld=C.exports.createContext(null);function n$(){return C.exports.useContext(ld)}const u2e=()=>{throw new Error("uSES not initialized!")};let r$=u2e;const c2e=e=>{r$=e},d2e=(e,t)=>e===t;function f2e(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(r,i=d2e){const{store:o,subscription:a,getServerState:s}=t(),l=r$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const h2e=f2e();var p2e={exports:{}},Mn={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var m8=Symbol.for("react.element"),v8=Symbol.for("react.portal"),IS=Symbol.for("react.fragment"),RS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),BS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),i$;i$=Symbol.for("react.module.reference");function ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m8:switch(e=e.type,e){case IS:case NS:case RS:case FS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case zS:case BS:case WS:case HS:case DS:return e;default:return t}}case v8:return t}}}Mn.ContextConsumer=zS;Mn.ContextProvider=DS;Mn.Element=m8;Mn.ForwardRef=BS;Mn.Fragment=IS;Mn.Lazy=WS;Mn.Memo=HS;Mn.Portal=v8;Mn.Profiler=NS;Mn.StrictMode=RS;Mn.Suspense=FS;Mn.SuspenseList=$S;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return ja(e)===zS};Mn.isContextProvider=function(e){return ja(e)===DS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m8};Mn.isForwardRef=function(e){return ja(e)===BS};Mn.isFragment=function(e){return ja(e)===IS};Mn.isLazy=function(e){return ja(e)===WS};Mn.isMemo=function(e){return ja(e)===HS};Mn.isPortal=function(e){return ja(e)===v8};Mn.isProfiler=function(e){return ja(e)===NS};Mn.isStrictMode=function(e){return ja(e)===RS};Mn.isSuspense=function(e){return ja(e)===FS};Mn.isSuspenseList=function(e){return ja(e)===$S};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===IS||e===NS||e===RS||e===FS||e===$S||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===BS||e.$$typeof===i$||e.getModuleId!==void 0)};Mn.typeOf=ja;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const PL={notify(){},get:()=>[]};function y2e(e,t){let n,r=PL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=PL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function o$(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=o$();function C2e(e=ld){const t=e===ld?w2e:o$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(JF.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var y8="persist:",a$="persist/FLUSH",S8="persist/REHYDRATE",s$="persist/PAUSE",l$="persist/PERSIST",u$="persist/PURGE",c$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function TL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,H){return H.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=O2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function AL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function au(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function z2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var B2e=5e3;function F2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:B2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===l$){var P=!1,E=function(z,H){P||(p.rehydrate(e.key,z,H),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return au({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function(H,$){return Promise.resolve(H)};z(N,n).then(function(H){E(H)},function(H){E(void 0,H)})},function(N){E(void 0,N)}),au({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===u$)return s=!0,p.result(I2e(e)),au({},t(w,p),{_persist:v});if(p.type===a$)return p.result(a&&a.flush()),au({},t(w,p),{_persist:v});if(p.type===s$)l=!0;else if(p.type===S8){if(s)return au({},w,{_persist:au({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=au({},M,{_persist:au({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(au({},R,{_persist:v}))}}function LL(e){return W2e(e)||H2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function H2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function W2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:d$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case c$:return VC({},t,{registry:[].concat(LL(t.registry),[n.key])});case S8:var r=t.registry.indexOf(n.key),i=LL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=p8(U2e,d$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:c$,key:u})},a=function(u,h,p){var m={type:S8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:s$})},persist:function(){e.dispatch({type:l$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b8={},x8={};x8.__esModule=!0;x8.default=q2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var j2e={getItem:dw,setItem:dw,removeItem:dw};function Y2e(e){if((typeof self>"u"?"undefined":V3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}b8.__esModule=!0;b8.default=Z2e;var K2e=X2e(x8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var f$=void 0,Q2e=J2e(b8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");f$=eye;var h$={},p$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(w8);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=nh,n=w8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths. - - ${JSON.stringify(Z)} - - ${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(te)} - - ${G}`)};e.singleTransformValidator=z;const H=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=H;const $=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=$;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. - - ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(p$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),H=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...H,...$,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(h$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C8(r)?r:!1},C8=e=>Boolean(typeof e=="string"?tye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),i5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,H=512,$=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",H],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",$e="[object Array]",He="[object AsyncFunction]",qe="[object Boolean]",tt="[object Date]",Ze="[object DOMException]",nt="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",at="[object Number]",At="[object Null]",st="[object Object]",gt="[object Promise]",an="[object Proxy]",Ct="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",ke="[object DataView]",Ot="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",ln="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ht="[object Uint8ClampedArray]",it="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),va=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Du=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),zu=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Bu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ya=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,qa="\\ud800-\\udfff",Bl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",$l=Bl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",_r="\\ufe0e\\ufe0f",Ur=Ds+No+kn+Sn,zo="['\u2019]",zs="["+qa+"]",Gr="["+Ur+"]",Ka="["+$l+"]",Td="\\d+",Hl="["+_h+"]",Xa="["+Fu+"]",Ad="[^"+qa+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ka+"|"+mi+")",Eh="[^"+qa+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Bs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",Wl="(?:"+Xa+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",$u="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+_r+"]?",ya="(?:"+Fs+"(?:"+[Eh,Ld,Bs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Wu+Md+ya,Ph="(?:"+[Hl,Ld,Bs].join("|")+")"+Ht,Vu="(?:"+[Eh+Ka+"?",Ka,Ld,Bs,zs].join("|")+")",Uu=RegExp(zo,"g"),Th=RegExp(Ka,"g"),Bo=RegExp(mi+"(?="+mi+")|"+Vu+Ht,"g"),Wn=RegExp([uo+"?"+Xa+"+"+$u+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+Hu+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+$u,uo+"+"+Hu,Vl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Fs+qa+$l+_r+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lh=-1,un={};un[Ot]=un[Ne]=un[ut]=un[ln]=un[Nn]=un[We]=un[ht]=un[it]=un[Nt]=!0,un[De]=un[$e]=un[Yt]=un[qe]=un[ke]=un[tt]=un[nt]=un[Tt]=un[Le]=un[at]=un[st]=un[Ct]=un[Ut]=un[sn]=un[et]=!1;var Wt={};Wt[De]=Wt[$e]=Wt[Yt]=Wt[ke]=Wt[qe]=Wt[tt]=Wt[Ot]=Wt[Ne]=Wt[ut]=Wt[ln]=Wt[Nn]=Wt[Le]=Wt[at]=Wt[st]=Wt[Ct]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[We]=Wt[ht]=Wt[it]=Wt[Nt]=!0,Wt[nt]=Wt[Tt]=Wt[et]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,Ke=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,hn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,$s=hn&&hn.isSet,I1=hn&&hn.isTypedArray;function vi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je-1;);return ve}function Za(oe,xe){for(var ve=oe.length;ve--&&Yu(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var y2=Bd(Mh),Qa=Bd(O1);function Ws(oe){return"\\"+ne[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Gl(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function S2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve-1}function B2(c,g){var b=this.__data__,L=Er(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=Z1,Wo.prototype.has=Q1,Wo.prototype.set=B2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Ae=si(c),Ge=Ae==Tt||Ae==xt;if(xc(c))return Js(c,ee);if(Ae==st||Ae==De||Ge&&!D){if(Y=ce||Ge?{}:xk(c),!ee)return ce?mg(c,dc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Ae])return D?c:{};Y=nU(c,Ae,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Xk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,F))}):qk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,F))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,F))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=cn(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function fc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,kr(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=Ku,Y=!1,g=new Ca(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:Qk(L);b0&&b(ee)?g>1?Pr(ee,g-1,b,L,D):ba(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return eu(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&tn.call(c,g)}function Qh(c,g){return c!=null&&g in cn(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Ae=-1,Ge=ee[0];e:for(;++Ae-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Jl(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+Yl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,F=mr(Kd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function yc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Yl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Lb(_k(c,g,xo),c+"")}function ip(c){return cc(mp(c))}function rf(c,g){var b=mp(c);return j2(b,Kl(g,0,b.length))}function Zl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:W(c);if(Ce)return Wd(Ce);Y=!1,D=Ku,ce=new Ca}else ce=g?[]:ee;e:for(;++L=L?c:Ar(c,g,b)}var fg=_2||function(c){return yt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=ec?ec(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Ql(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,Ya.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?cn(Zd.call(c)):{}}function V2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Ae=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Zi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=cn(g);++L-1?D[F?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new yi(a);if(D&&!Y&&be(F)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Ae=-1,Ge=!0,dt=b&w?new Ca:n;for(F.set(c,g),F.set(g,c);++Ae1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{ -/* [wrapped with `+g+`] */ -`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Jl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Dk(c,b)});function zk(c){var g=B(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function Y2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Jl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function vG(){return zk(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=Zk(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Lk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Mb)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){tn.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var PG=vg(Mk),TG=vg(Ok);function AG(c,g){return Pr(q2(c,g),1)}function LG(c,g){return Pr(q2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Pr(q2(c,g),b)}function Bk(c,g){var b=Rt(c)?Vn:ts;return b(c,Te(g,3))}function Fk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var OG=dp(function(c,g,b){tn.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Yu(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return ts(c,function(Y){F[++L]=D?vi(g,Y,b):ns(Y,g,b)}),F}),NG=dp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=Rt(c)?zn:Sr;return b(c,Te(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function BG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,ts)}function FG(c,g,b){var L=Rt(c)?p2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,Z2(Te(g,3)))}function HG(c){var g=Rt(c)?cc:ip;return g(c)}function WG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?wb:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Tr(c).length}function GG(c,g,b){var L=Rt(c)?Gu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Pr(g,1),[])}),K2=k2||function(){return yt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function $k(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Hk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Ib=_t(function(c,g,b){var L=P;if(b.length){var D=Ho(b,Ve(Ib));L|=I}return pe(c,L,g,b,D)}),Wk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Ho(b,Ve(Wk));L|=I}return pe(g,L,c,b,D)});function Vk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=Vk.placeholder,L}function Uk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Uk.placeholder,L}function Gk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new yi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Ae="maxWait"in b,F=Ae?mr(Ea(b.maxWait)||0,g):F,Ge="trailing"in b?!!b.trailing:Ge);function dt(Mr){var ss=L,nu=D;return L=D=n,Ce=Mr,Y=c.apply(nu,ss),Y}function St(Mr){return Ce=Mr,ee=xg(jt,g),_e?dt(Mr):Y}function $t(Mr){var ss=Mr-ce,nu=Mr-Ce,cE=g-ss;return Ae?qr(cE,F-nu):cE}function bt(Mr){var ss=Mr-ce,nu=Mr-Ce;return ce===n||ss>=g||ss<0||Ae&&nu>=F}function jt(){var Mr=K2();if(bt(Mr))return Jt(Mr);ee=xg(jt,$t(Mr))}function Jt(Mr){return ee=n,Ge&&L?dt(Mr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(K2())}function Zo(){var Mr=K2(),ss=bt(Mr);if(L=arguments,D=this,ce=Mr,ss){if(ee===n)return St(ce);if(Ae)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Ea(g)||0,b)});function XG(c){return pe(c,H)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new yi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function ZG(c){return Hk(2,c)}var QG=kb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],kr(Te())):zn(Pr(g,1),kr(Te()));var b=g.length;return _t(function(L){for(var D=-1,F=qr(L.length,b);++D=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&tn.call(c,"callee")&&!W1.call(c,"callee")},Rt=ve.isArray,hj=jr?kr(jr):og;function So(c){return c!=null&&Q2(c.length)&&!eu(c)}function Lr(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==qe}var xc=E2||Gb,gj=co?kr(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||xc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Tr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function yj(c,g){return pc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?pc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==nt||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function eu(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==He||g==an}function Yk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var qk=Gi?kr(Gi):_b;function xj(c,g){return c===g||gc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,gc(c,g,Et(g),b)}function Cj(c){return Kk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Kk(c){return typeof c=="number"||br(c)&&oi(c)==at}function wg(c){if(!br(c)||oi(c)!=st)return!1;var g=tc(c);if(g===null)return!0;var b=tn.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?kr(Sa):or;function Pj(c){return Yk(c)&&c>=-G&&c<=G}var Xk=$s?kr($s):Bt;function J2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==sn}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==yn}var gp=I1?kr(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==et}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function Zk(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):Ci(c);if(nc&&c[nc])return S2(c[nc]());var g=si(c),b=g==Le?Dh:g==Ut?Wd:mp;return b(c)}function tu(c){if(!c)return c===0?c:0;if(c=Ea(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=tu(c),b=g%1;return g===g?b?g-b:g:0}function Qk(c){return c?Kl(Dt(c),0,X):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?Ke(c.slice(2),b?2:8):_1.test(c)?te:+c}function Jk(c){return _a(c,bo(c))}function Ij(c){return c?Kl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)tn.call(g,b)&&Gs(c,b,g[b])}),eE=Xi(function(c,g){_a(g,bo(g),c)}),ey=Xi(function(c,g,b,L){_a(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){_a(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=ql(c);return g==null?b:Qe(b,g)}var Bj=_t(function(c,g){c=cn(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b1),F}),_a(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return nE(c,Z2(Te(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function nE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?oE(g):g)});function oE(c){return Fb(xn(c).toLowerCase())}function aE(c){return c=xn(c),c&&c.replace(A1,y2).replace(Th,"")}function mY(c,g,b){c=xn(c),g=Ki(g);var L=c.length;b=b===n?L:Kl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=xn(c),c&&va.test(c)?c.replace(Os,Qa):c}function yY(c){return c=xn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Yl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;return g&&L>>0,b?(c=xn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=Ki(g),!g&&Gl(c))?is(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Fb(g)});function MY(c,g,b){return c=xn(c),b=b==null?0:Kl(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=B.templateSettings;b&&Zi(c,g,b)&&(g=n),c=xn(c),g=ey({},g,L,Re);var D=ey({},g.imports,L.imports,Re),F=li(D),Y=Hd(D,F),ee,ce,Ce=0,_e=g.interpolate||Rs,Ae="__p += '",Ge=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Du?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` -`;c.replace(Ge,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Ae+=c.slice(Ce,Zo).replace(L1,Ws),jt&&(ee=!0,Ae+=`' + -__e(`+jt+`) + -'`),Qi&&(ce=!0,Ae+=`'; -`+Qi+`; -__p += '`),Jt&&(Ae+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),Ce=Zo+bt.length,bt}),Ae+=`'; -`;var St=tn.call(g,"variable")&&g.variable;if(!St)Ae=`with (obj) { -`+Ae+` -} -`;else if(x1.test(St))throw new kt(s);Ae=(ce?Ae.replace(Zt,""):Ae).replace(Qn,"$1").replace(lo,"$1;"),Ae="function("+(St||"obj")+`) { -`+(St?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Ae+`return __p -}`;var $t=lE(function(){return Qt(F,dt+"return "+Ae).apply(n,Y)});if($t.source=Ae,Nb($t))throw $t;return $t}function IY(c){return xn(c).toLowerCase()}function RY(c){return xn(c).toUpperCase()}function NY(c,g,b){if(c=xn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Za(L,D)+1;return is(L,F,Y).join("")}function DY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.slice(0,B1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Za(L,Ni(g))+1;return is(L,0,D).join("")}function zY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.replace(zu,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return is(L,D).join("")}function BY(c,g){var b=$,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=xn(c);var F=c.length;if(Gl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-xa(L);if(ee<1)return L;var ce=Y?is(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Db(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,xn(Ya.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Ae=Ce.index;ce=ce.slice(0,Ae===n?ee:Ae)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ge=ce.lastIndexOf(D);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+L}function FY(c){return c=xn(c),c&&m1.test(c)?c.replace(gi,w2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Fb=hp("toUpperCase");function sE(c,g,b){return c=xn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var lE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return Nb(b)?b:new kt(b)}}),HY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Ib(c[b],c))}),c});function WY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++DG)return[];var b=X,L=qr(c,X);g=Te(g),c-=X;for(var D=$d(L,g);++b0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Ae=function(jt){var Jt=D.apply(B,ba([jt],ee));return L&&Ge?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ge=this.__chain__,dt=!!this.__actions__.length,St=F&&!Ge,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:Y2,args:[Ae],thisArg:n}),new Yi(bt,Ge)}return St&&$t?c.apply(this,ee):(bt=this.thru(Ae),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Zu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";tn.call(Ja,L)||(Ja[L]=[]),Ja[L].push({name:g,func:b})}}),Ja[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=M2,B.prototype.at=mG,B.prototype.chain=vG,B.prototype.commit=yG,B.prototype.next=SG,B.prototype.plant=xG,B.prototype.reverse=wG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=CG,B.prototype.first=B.prototype.head,nc&&(B.prototype[nc]=bG),B},wa=po();Vt?((Vt.exports=wa)._=wa,Pt._=wa):yt._=wa}).call(ys)})(Zr,Zr.exports);const Je=Zr.exports;var rye=Object.create,g$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&g$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},m$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?g$(n,"default",{value:e,enumerable:!0}):n,e)),uye=ze((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),v$=ze((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=ze((e,t)=>{var n=v$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=ze((e,t)=>{var n=VS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),dye=ze((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=ze((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=ze((e,t)=>{var n=VS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),US=ze((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=ze((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=ze((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),y$=ze((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Tu=ze((e,t)=>{var n=y$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),_8=ze((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=ze((e,t)=>{var n=_8(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=ze((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=ze((e,t)=>{var n=_8(),r=yye(),i=Sye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),S$=ze((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),b$=ze((e,t)=>{var n=GS(),r=S$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),bye=ze((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=ze((e,t)=>{var n=bye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),x$=ze((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),wye=ze((e,t)=>{var n=b$(),r=xye(),i=S$(),o=x$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Cye=ze((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=ze((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k8=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),jS=ze((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=ze((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=ze((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Eye=ze((e,t)=>{var n=jS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),Pye=ze((e,t)=>{var n=jS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),Tye=ze((e,t)=>{var n=jS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Aye=ze((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Aye(),r=US(),i=k8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=ze((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),YS=ze((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=ze((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=ze((e,t)=>{var n=YS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),w$=ze((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US(),r=k8(),i=w$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=US(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Bye=ze((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Fye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=ze((e,t)=>{var n=w$(),r=Bye(),i=Fye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),C$=ze((e,t)=>{var n=$ye(),r=Hye(),i=Wye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Gye=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jye=ze((e,t)=>{var n=_8(),r=Vye(),i=v$(),o=C$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,H,$,j,de,V,J){switch($){case M:if(z.byteLength!=H.byteLength||z.byteOffset!=H.byteOffset)return!1;z=z.buffer,H=H.buffer;case T:return!(z.byteLength!=H.byteLength||!V(new r(z),new r(H)));case h:case p:case S:return i(+z,+H);case m:return z.name==H.name&&z.message==H.message;case w:case E:return z==H+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=H.size&&!Q)return!1;var K=J.get(z);if(K)return K==H;j|=u,J.set(z,H);var G=o(ie(z),ie(H),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call(H)}return!1}t.exports=N}),Yye=ze((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),qye=ze((e,t)=>{var n=Yye(),r=E8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Zye=ze((e,t)=>{var n=Kye(),r=Xye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Qye=ze((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=ze((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=ze((e,t)=>{var n=Jye(),r=qS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),t3e=ze((e,t)=>{function n(){return!1}t.exports=n}),_$=ze((e,t)=>{var n=Tu(),r=t3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),n3e=ze((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=ze((e,t)=>{var n=GS(),r=k$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[H]=V[$]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=ze((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=ze((e,t)=>{var n=y$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),E$=ze((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=ze((e,t)=>{var n=Qye(),r=e3e(),i=E8(),o=_$(),a=n3e(),s=E$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=ze((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),l3e=ze((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=ze((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=ze((e,t)=>{var n=s3e(),r=u3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),d3e=ze((e,t)=>{var n=b$(),r=k$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=ze((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=ze((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=ze((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=ze((e,t)=>{var n=g3e(),r=k8(),i=m3e(),o=v3e(),a=y3e(),s=GS(),l=x$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=ze((e,t)=>{var n=zye(),r=C$(),i=jye(),o=p3e(),a=S3e(),s=E8(),l=_$(),u=E$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),H=N?m:a(E),$=z?m:a(_);H=H==p?v:H,$=$==p?v:$;var j=H==v,de=$==v,V=H==$;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,H,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=ze((e,t)=>{var n=b3e(),r=qS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),P$=ze((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return T$(e,["input","textarea","select"])}function T$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function P3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=m$(P$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var OL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!T$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){OL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){OL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}m$(P$());var UC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const B3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),F3e=ct({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),$3e=ct({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),H3e=ct({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),W3e=ct({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var no=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(no||{});const V3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},za=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(md,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s8,{className:"invokeai__switch-root",...s})]})})};function A$(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(lke(i.target.checked))})]})}const IL=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(IL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(IL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const H=Je.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String(H)),h(H)};return x(hi,{..._,children:re(md,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Q_,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e8,{...E,className:"invokeai__number-input-stepper-button"}),x(J_,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Au=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return re(md,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(yF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],j3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],P8=0,T8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ft(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ft(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),A8=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee(X3e),{isGFPGANAvailable:i}=Ee(Z3e),o=l=>e(K3(l)),a=l=>e(dV(l)),s=l=>e(X3(l.target.value));return re(en,{direction:"column",gap:2,children:[x(Au,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(za,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var L$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},RL=le.createContext&&le.createContext(L$),Jc=globalThis&&globalThis.__assign||function(){return Jc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function bs(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:H,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const $e=Je.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String($e)),l($e)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return re(md,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...H,children:r}),re(Gz,{w:"100%",gap:2,children:[re(a8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&re($n,{children:[x(RC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...$,children:o}),x(RC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(AF,{className:"invokeai__slider_track",...j,children:x(LF,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(TF,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z_,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(Q_,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),re(dF,{...ie,children:[x(e8,{className:"invokeai__slider-number-stepper"}),x(J_,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L8,{}),onClick:Se,isDisabled:M,...K})]})]})}function O$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const I$=()=>x(Nl,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(za,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(hV(r.target.checked))})})},s4e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(za,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},R$=()=>re(en,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),M8=()=>x(Nl,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(za,{label:"Randomize Seed",isChecked:t,onChange:r=>e(ake(r.target.checked))})}function u4e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(f2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:P8,max:T8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const N$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(f2(N$(P8,T8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(cke(r)),value:t,isInteger:!1})}function f4e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(eke(r)),value:t,isInteger:!1})}const O8=()=>re(en,{gap:2,direction:"column",children:[x(l4e,{}),re(en,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(en,{gap:2,children:x(d4e,{})}),x(en,{gap:2,children:x(f4e,{})})]});function D$(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(ske(i.target.checked))})]})}const h4e=ft(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ft(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),I8=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(h4e),{isESRGANAvailable:r}=Ee(p4e);return re("div",{className:"upscale-options",children:[x(Au,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(za,{isChecked:e,width:"auto",onChange:r=>t(nke(r.target.checked))})}function R8(){return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(md,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k_,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(C8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(dke(i)),isInteger:!1})}const N8=()=>re(en,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]});function S4e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(cV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Cr=ft(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:Je.isEqual}}),b4e=ft(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),z$=e=>e.options;function x4e(){const e=Ee(i=>i.options.height),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(fV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ft([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function C4e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Q8e(i)),value:t,width:D8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(Au,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Ee(i=>i.options.width),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const D8="auto";function z8(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),re("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},B$=MS({name:"system",initialState:P4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:T4e,setIsProcessing:gu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:NL,setSocketId:qPe,setShouldConfirmOnDelete:F$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:G3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:DL,errorSeen:$$,setModelList:zL,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:B4e,setProcessingIndeterminateTask:F4e}=B$.actions,$4e=B$.reducer;function H4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function W4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function H$(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function V4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function U4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const G4e=ft(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Ee(G4e),{text:r}=V3e[t];return n?re(t8,{trigger:"hover",children:[x(i8,{children:x(Nl,{children:e})}),re(r8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=H4e},n)=>x(j4e,{feature:e,children:x(Nl,{ref:n,children:x(ma,{marginBottom:"-.15rem",as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return re(zf,{className:"advanced-settings-item",children:[x("h2",{children:re(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Bf,{className:"advanced-settings-panel",children:r})]})}const B8=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function X4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function Z4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function W$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function V$(e){return pt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function Q4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function J4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function e5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function t5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function n5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function F8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function U$(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function KS(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function r5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function G$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function i5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function o5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function a5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function s5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function l5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function u5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function c5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function d5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function f5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function h5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function p5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function g5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function m5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function v5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function y5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function S5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function j$(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function b5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function x5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function BL(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function Y$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function w5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function c1(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function C5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function $8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function _5e(e){return pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function H8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const k5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],W8=e=>e.kind==="line"&&e.layer==="mask",E5e=e=>e.kind==="line"&&e.layer==="base",o5=e=>e.kind==="image"&&e.layer==="base",P5e=e=>e.kind==="line",Rn=e=>e.canvas,Lu=e=>e.canvas.layerState.stagingArea.images.length>0,q$=e=>e.canvas.layerState.objects.find(o5),K$=ft([e=>e.options,e=>e.system,q$,Cr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(C8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Je.isEqual,resultEqualityCheck:Je.isEqual}}),GC=Jr("socketio/generateImage"),T5e=Jr("socketio/runESRGAN"),A5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),FL=Jr("socketio/requestNewImages"),M5e=Jr("socketio/cancelProcessing"),O5e=Jr("socketio/requestSystemConfig"),X$=Jr("socketio/requestModelChange"),I5e=Jr("socketio/saveStagingAreaImageToGallery"),R5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Z$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i}=Ee(K$),o=Ee(Cr),a=()=>{r(GC(o))};return vt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const N5e=ft(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function Q$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(N5e),a=()=>n(M5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const D5e=ft(e=>e.options,e=>e.shouldLoopback),z5e=()=>{const e=Xe(),t=Ee(D5e);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(y5e,{}),onClick:()=>{e(ike(!t))}})},V8=()=>{const e=Ee(Cr);return re("div",{className:"process-buttons",children:[x(Z$,{}),e==="img2img"&&x(z5e,{}),x(Q$,{})]})},B5e=ft([e=>e.options,Cr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),U8=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(B5e),{isReady:r}=Ee(K$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(md,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(BF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function J$(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function eH(e){return pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function F5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function $5e(e,t){e.classList?e.classList.add(t):F5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $L(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function H5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$L(e.className,t):e.setAttribute("class",$L(e.className&&e.className.baseVal||"",t))}const HL={disabled:!1},tH=le.createContext(null);var nH=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",YC="exiting",Mu=function(e){$_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=YC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&nH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||HL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:yy.findDOMNode(this);if(!o||HL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=z_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(tH.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Mu.contextType=tH;Mu.propTypes={};function Ep(){}Mu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Mu.UNMOUNTED=sm;Mu.EXITED=xf;Mu.ENTERING=wf;Mu.ENTERED=Ip;Mu.EXITING=YC;const W5e=Mu;var V5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return $5e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return H5e(t,r)})},G8=function(e){$_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},WL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),U5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),G5e=.999,j5e=.1,Y5e=20,Fg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},q5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},iH=MS({name:"canvas",initialState:q5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!W8(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:hl(Je.clamp(n.width,64,512),64),height:hl(Je.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Fg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(Je.clamp(i,64,n/e.stageScale),64),s=hl(Je.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=U5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=WL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(P5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Fg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=WL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(o5)){const i=Pp(r.width,r.height,512,512,Fg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Fg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Fg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:hl(Je.clamp(o,64,512),64),height:hl(Je.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:K5e,addLine:oH,addPointToCurrentLine:aH,clearMask:X5e,commitStagingAreaImage:Z5e,discardStagedImages:Q5e,fitBoundingBoxToStage:KPe,nextStagingAreaImage:J5e,prevStagingAreaImage:eSe,redo:tSe,resetCanvas:sH,resetCanvasInteractionState:nSe,resetCanvasView:rSe,resizeAndScaleCanvas:lH,resizeCanvas:iSe,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:XPe,setBrushColor:oSe,setBrushSize:mw,setCanvasContainerDimensions:aSe,clearCanvasHistory:uH,setCursorPosition:cH,setDoesCanvasNeedScaling:Wi,setInitialCanvasImage:j8,setInpaintReplace:VL,setIsDrawing:XS,setIsMaskEnabled:dH,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:ZPe,setIsMoveStageKeyHeld:QPe,setIsMovingBoundingBox:UL,setIsMovingStage:a5,setIsTransformingBoundingBox:vw,setLayer:fH,setMaskColor:sSe,setMergedCanvas:lSe,setShouldAutoSave:uSe,setShouldCropToBoundingBoxOnSave:cSe,setShouldDarkenOutsideBoundingBox:dSe,setShouldLockBoundingBox:JPe,setShouldPreserveMaskedArea:fSe,setShouldShowBoundingBox:hSe,setShouldShowBrush:eTe,setShouldShowBrushPreview:tTe,setShouldShowCanvasDebugInfo:pSe,setShouldShowCheckboardTransparency:nTe,setShouldShowGrid:gSe,setShouldShowIntermediates:mSe,setShouldShowStagingImage:vSe,setShouldShowStagingOutline:GL,setShouldSnapToGrid:ySe,setShouldUseInpaintReplace:SSe,setStageCoordinates:hH,setStageDimensions:rTe,setStageScale:bSe,setTool:C0,toggleShouldLockBoundingBox:iTe,toggleTool:oTe,undo:xSe}=iH.actions,wSe=iH.reducer,pH=""+new URL("logo.13003d72.png",import.meta.url).href,CSe=ft(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Y8=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(CSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(Wi(!0)),400)},[n,i]),vt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),vt("shift+o",()=>{m(),t(Wi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(oke(!i)),t(Wi(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(rH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(J$,{}):x(eH,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function _Se(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(B8,{accordionInfo:e})]})}const q8=C.exports.createContext(null),kSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(q8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x($8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},ESe=ft(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(ESe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(F$(!S.target.checked));return re($n,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(lF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:re(en,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(md,{children:re(en,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(s8,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),ed=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t8,{...o,children:[x(i8,{children:t}),re(r8,{className:`invokeai__popover-content ${r}`,children:[i&&x(n8,{className:"invokeai__popover-arrow"}),n]})]})},PSe=ft([e=>e.system,e=>e.options,e=>e.gallery,Cr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),gH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(PSe),m=o2(),v=()=>{!u||(h&&e(cd(!1)),e(d2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(K8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u?.metadata&&e(f2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(P(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(T5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(A5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(bV(!l)),I=()=>{!u||(h&&e(cd(!1)),e(j8(u)),e(Wi(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(x5e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(BL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(BL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(KS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(G$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(mt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(mt,{icon:x(b5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(mt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(A8,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(I8,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(mt,{icon:x(U$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(mt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},TSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},mH=MS({name:"gallery",initialState:TSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:vH,setCurrentImage:ASe,addGalleryImages:LSe,setIntermediateImage:MSe,selectNextImage:K8,selectPrevImage:X8,setShouldPinGallery:OSe,setShouldShowGallery:_0,setGalleryScrollPosition:ISe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:RSe,setShouldHoldGalleryOpen:yH,setShouldAutoSwitchToNewImages:NSe,setCurrentCategory:Wy,setGalleryWidth:DSe}=mH.actions,zSe=mH.reducer;ct({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ct({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ct({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ct({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ct({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ct({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});ct({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ct({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ct({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ct({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ct({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ct({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ct({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ct({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ct({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ct({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ct({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ct({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ct({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ct({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ct({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ct({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ct({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ct({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ct({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ct({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ct({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var SH=ct({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ct({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ct({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ct({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ct({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ct({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ct({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ct({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ct({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ct({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ct({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ct({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ct({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ct({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ct({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ct({displayName:"SpinnerIcon",path:re($n,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ct({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ct({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ct({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ct({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ct({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ct({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ct({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ct({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ct({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ct({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ct({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ct({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ct({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ct({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ct({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function BSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>re(en,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(BSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),re(en,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(SH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),FSe=(e,t)=>e.image.uuid===t.image.uuid,bH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();vt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(en,{gap:1,direction:"column",width:"100%",children:[re(en,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(SH,{mx:"2px"})]})]}),Object.keys(r).length>0?re($n,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:U3(l),onClick:()=>n(gb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(f2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(cV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:i5(h),onClick:()=>n(yV(i5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(hV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(fV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(d2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&re($n,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,H)=>{if(z.type==="esrgan"){const{scale:$,strength:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(x9(j))})]},H)}else if(z.type==="gfpgan"){const{strength:$}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},H)}else if(z.type==="codeformer"){const{strength:$,fidelity:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(dV(j)),n(X3("codeformer"))}})]},H)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),re(en,{gap:2,direction:"column",children:[re(en,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x($z,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},FSe),xH=ft([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function $Se(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())},m=()=>{e(cd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(bH,{image:i,styleClass:"current-image-metadata"})]})}const HSe=ft([e=>e.gallery,e=>e.options,Cr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),wH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(HSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re($n,{children:[x(gH,{}),x($Se,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},WSe=()=>{const e=C.exports.useContext(q8);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x($8,{}),onClick:e||void 0})};function VSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(uV())};return re($n,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(WSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const USe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(VSe,{})}):x(kSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(wH,{})})]})};function GSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var jSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},JSe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],XL="__resizable_base__",CH=function(e){KSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(XL):o.className+=XL,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||XSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Uy(n,M,I),r=Uy(r,R,N)}else n=Uy(n,h,p),r=Uy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&ZSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Gy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Gy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Gy(n)?n.touches[0].clientX:n.clientX,h=Gy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=QSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=KL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=KL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=qL(M,this.props.grid[0]),z=qL(T,this.props.grid[1]),H=this.props.snapGap||0;M=H===0||Math.abs(N-M)<=H?N:M,T=H===0||Math.abs(z-T)<=H?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(qSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return JSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return re(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ebe(i,...t)]}function ebe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function tbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _H(...e){return t=>e.forEach(n=>tbe(n,t))}function Ua(...e){return C.exports.useCallback(_H(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(rbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(KC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ibe(r,n.props),ref:_H(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const nbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function rbe(e){return C.exports.isValidElement(e)&&e.type===nbe}function ibe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const obe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],_u=obe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kH(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function EH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ua(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ua(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const abe=C.exports.createContext(void 0);function PH(e){const t=C.exports.useContext(abe);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function sbe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",lbe="dismissableLayer.pointerDownOutside",ube="dismissableLayer.focusOutside";let ZL;const cbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(cbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ua(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=fbe(z=>{const H=z.target,$=[...h.branches].some(j=>j.contains(H));!I||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=hbe(z=>{const H=z.target;[...h.branches].some(j=>j.contains(H))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return sbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ZL=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),QL(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ZL)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),QL())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(_u.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function fbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){TH(lbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&TH(ube,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function QL(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function TH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kH(i,o):i.dispatchEvent(o)}let bw=0;function pbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:JL()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:JL()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function JL(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},gbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ua(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){nM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(xw,eM);s.addEventListener(xw,u),s.dispatchEvent(E),E.defaultPrevented||(mbe(xbe(AH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const E=new CustomEvent(ww,eM);s.addEventListener(ww,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(ww,h),nM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=vbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(_u.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function mbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function vbe(e){const t=AH(e),n=tM(t,e),r=tM(t.reverse(),e);return[n,r]}function AH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tM(e,t){for(const n of e)if(!ybe(n,{upTo:t}))return n}function ybe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sbe(e)&&t&&e.select()}}const nM=bbe();function bbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rM(e,t),e.unshift(t)},remove(t){var n;e=rM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function rM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},wbe=zw["useId".toString()]||(()=>{});let Cbe=0;function _be(e){const[t,n]=C.exports.useState(wbe());return Y0(()=>{e||n(r=>r??String(Cbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function ZS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function Z8(e){return e==="y"?"height":"width"}function iM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=f1(t),l=Z8(s),u=r[l]/2-i[l]/2,h=d1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(ZS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const kbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=iM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=LH(r),h={x:i,y:o},p=f1(a),m=ZS(a),v=Z8(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,H=ZC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==H&&s.reference[v]<=s.floating[v]?zAbe[t])}function Lbe(e,t,n){n===void 0&&(n=!1);const r=ZS(e),i=f1(e),o=Z8(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u5(a)),{main:a,cross:u5(a)}}const Mbe={start:"end",end:"start"};function aM(e){return e.replace(/start|end/g,t=>Mbe[t])}const Obe=["top","right","bottom","left"];function Ibe(e){const t=u5(e);return[aM(e),t,aM(t)]}const Rbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[u5(a)]:Ibe(a)),_=[a,...E],T=await l5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:H,cross:$}=Lbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[H],T[$])}if(I=[...I,{placement:r,overflows:M}],!M.every(H=>H<=0)){var R,N;const H=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=_[H];if($)return{data:{index:H,overflows:I},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function sM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lM(e){return Obe.some(t=>e[t]>=0)}const Nbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await l5(r,{...n,elementContext:"reference"}),a=sM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:lM(a)}}}case"escaped":{const o=await l5(r,{...n,altBoundary:!0}),a=sM(o,i.floating);return{data:{escapedOffsets:a,escaped:lM(a)}}}default:return{}}}}};async function Dbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=ZS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const zbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Dbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function MH(e){return e==="x"?"y":"x"}const Bbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await l5(t,l),p=f1(d1(i)),m=MH(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=ZC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=ZC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Fbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=f1(i),m=MH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;vN&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function OH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ou(e){if(e==null)return window;if(!OH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Ou(e).getComputedStyle(e)}function ku(e){return OH(e)?"":e?(e.nodeName||"").toLowerCase():""}function IH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Ou(e).HTMLElement}function ud(e){return e instanceof Ou(e).Element}function $be(e){return e instanceof Ou(e).Node}function Q8(e){if(typeof ShadowRoot>"u")return!1;const t=Ou(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function QS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Hbe(e){return["table","td","th"].includes(ku(e))}function RH(e){const t=/firefox/i.test(IH()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function NH(){return!/^((?!chrome|android).)*safari/i.test(IH())}const uM=Math.min,Hm=Math.max,c5=Math.round;function Eu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ml(e)&&(l=e.offsetWidth>0&&c5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c5(s.height)/e.offsetHeight||1);const h=ud(e)?Ou(e):window,p=!NH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function bd(e){return(($be(e)?e.ownerDocument:e.document)||window.document).documentElement}function JS(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function DH(e){return Eu(bd(e)).left+JS(e).scrollLeft}function Wbe(e){const t=Eu(e);return c5(t.width)!==e.offsetWidth||c5(t.height)!==e.offsetHeight}function Vbe(e,t,n){const r=Ml(t),i=bd(t),o=Eu(e,r&&Wbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((ku(t)!=="body"||QS(i))&&(a=JS(t)),Ml(t)){const l=Eu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=DH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function zH(e){return ku(e)==="html"?e:e.assignedSlot||e.parentNode||(Q8(e)?e.host:null)||bd(e)}function cM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ube(e){let t=zH(e);for(Q8(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(ku(t));){if(RH(t))return t;t=t.parentNode}return null}function QC(e){const t=Ou(e);let n=cM(e);for(;n&&Hbe(n)&&getComputedStyle(n).position==="static";)n=cM(n);return n&&(ku(n)==="html"||ku(n)==="body"&&getComputedStyle(n).position==="static"&&!RH(n))?t:n||Ube(e)||t}function dM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Eu(e);return{width:t.width,height:t.height}}function Gbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((ku(n)!=="body"||QS(o))&&(a=JS(n)),Ml(n))){const l=Eu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function jbe(e,t){const n=Ou(e),r=bd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=NH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ybe(e){var t;const n=bd(e),r=JS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Hm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Hm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+DH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Hm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BH(e){const t=zH(e);return["html","body","#document"].includes(ku(t))?e.ownerDocument.body:Ml(t)&&QS(t)?t:BH(t)}function d5(e,t){var n;t===void 0&&(t=[]);const r=BH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ou(r),a=i?[o].concat(o.visualViewport||[],QS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d5(a))}function qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Q8(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Kbe(e,t){const n=Eu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function fM(e,t,n){return t==="viewport"?s5(jbe(e,n)):ud(t)?Kbe(t,n):s5(Ybe(bd(e)))}function Xbe(e){const t=d5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?QC(e):e;return ud(r)?t.filter(i=>ud(i)&&qbe(i,r)&&ku(i)!=="body"):[]}function Zbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=fM(t,h,i);return u.top=Hm(p.top,u.top),u.right=uM(p.right,u.right),u.bottom=uM(p.bottom,u.bottom),u.left=Hm(p.left,u.left),u},fM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Qbe={getClippingRect:Zbe,convertOffsetParentRelativeRectToViewportRelativeRect:Gbe,isElement:ud,getDimensions:dM,getOffsetParent:QC,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Vbe(t,QC(n),r),floating:{...dM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Jbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ud(e)?d5(e):[],...d5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?Eu(e):null;s&&S();function S(){const w=Eu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const exe=(e,t,n)=>kbe(e,t,{platform:Qbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!e9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function txe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function nxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=txe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||exe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:P,floating:E}),[u,v,_,P,E])}const rxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?oM({element:t.current,padding:n}).fn(i):{}:t?oM({element:t,padding:n}).fn(i):{}}}};function ixe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const FH="Popper",[J8,$H]=a2(FH),[oxe,HH]=J8(FH),axe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(oxe,{scope:t,anchor:r,onAnchorChange:i},n)},sxe="PopperAnchor",lxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HH(sxe,n),a=C.exports.useRef(null),s=Ua(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(_u.div,Tn({},i,{ref:s}))}),f5="PopperContent",[uxe,aTe]=J8(f5),[cxe,dxe]=J8(f5,{hasParent:!1,positionUpdateFns:new Set}),fxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HH(f5,h),[N,z]=C.exports.useState(null),H=Ua(t,Ct=>z(Ct)),[$,j]=C.exports.useState(null),de=ixe($),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(pxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:$e,update:He}=nxe({strategy:"fixed",placement:ie,whileElementsMounted:Jbe,middleware:[zbe({mainAxis:m+J,alignmentAxis:S}),M?Bbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Fbe():void 0,...Z}):void 0,$?rxe({element:$,padding:w}):void 0,M?Rbe({...Z}):void 0,gxe({arrowWidth:V,arrowHeight:J}),T?Nbe({strategy:"referenceHidden"}):void 0].filter(hxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const qe=ye!==null&&Se!==null,[tt,Ze]=WH(De),nt=(i=$e.arrow)===null||i===void 0?void 0:i.x,Tt=(o=$e.arrow)===null||o===void 0?void 0:o.y,xt=((a=$e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,at]=C.exports.useState();Y0(()=>{N&&at(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:st}=dxe(f5,h),gt=!At;C.exports.useLayoutEffect(()=>{if(!gt)return st.add(He),()=>{st.delete(He)}},[gt,st,He]),C.exports.useLayoutEffect(()=>{gt&&qe&&Array.from(st).reverse().forEach(Ct=>requestAnimationFrame(Ct))},[gt,qe,st]);const an={"data-side":tt,"data-align":Ze,...I,ref:H,style:{...I.style,animation:qe?void 0:"none",opacity:(s=$e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=$e.transformOrigin)===null||l===void 0?void 0:l.x,(u=$e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(uxe,{scope:h,placedSide:tt,onArrowChange:j,arrowX:nt,arrowY:Tt,shouldHideArrow:xt},gt?C.exports.createElement(cxe,{scope:h,hasParent:!0,positionUpdateFns:st},C.exports.createElement(_u.div,an)):C.exports.createElement(_u.div,an)))});function hxe(e){return e!==void 0}function pxe(e){return e!==null}const gxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=WH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function WH(e){const[t,n="center"]=e.split("-");return[t,n]}const mxe=axe,vxe=lxe,yxe=fxe;function Sxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const VH=e=>{const{present:t,children:n}=e,r=bxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ua(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};VH.displayName="Presence";function bxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Sxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Yy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Yy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Yy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Yy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Yy(e){return e?.animationName||"none"}function xxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=wxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function wxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",Cxe={bubbles:!1,cancelable:!0},ek="RovingFocusGroup",[t9,UH,_xe]=EH(ek),[kxe,GH]=a2(ek,[_xe]),[Exe,Pxe]=kxe(ek),Txe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Axe,Tn({},e,{ref:t}))))),Axe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Ua(t,p),v=PH(o),[S=null,w]=xxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=UH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,_),()=>N.removeEventListener(Cw,_)},[_]),C.exports.createElement(Exe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(_u.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const H=new CustomEvent(Cw,Cxe);if(N.currentTarget.dispatchEvent(H),!H.defaultPrevented){const $=T().filter(ie=>ie.focusable),j=$.find(ie=>ie.active),de=$.find(ie=>ie.id===S),J=[j,de,...$].filter(Boolean).map(ie=>ie.ref.current);jH(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Lxe="RovingFocusGroupItem",Mxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=_be(),s=Pxe(Lxe,n),l=s.currentTabStopId===a,u=UH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(_u.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Rxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Nxe(w,P+1):w.slice(P+1)}setTimeout(()=>jH(w))}})})))}),Oxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ixe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Rxe(e,t,n){const r=Ixe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Oxe[r]}function jH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Dxe=Txe,zxe=Mxe,Bxe=["Enter"," "],Fxe=["ArrowDown","PageUp","Home"],YH=["ArrowUp","PageDown","End"],$xe=[...Fxe,...YH],eb="Menu",[n9,Hxe,Wxe]=EH(eb),[ph,qH]=a2(eb,[Wxe,$H,GH]),tk=$H(),KH=GH(),[Vxe,tb]=ph(eb),[Uxe,nk]=ph(eb),Gxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=tk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=PH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(mxe,s,C.exports.createElement(Vxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Uxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},jxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=tk(n);return C.exports.createElement(vxe,Tn({},i,r,{ref:t}))}),Yxe="MenuPortal",[sTe,qxe]=ph(Yxe,{forceMount:void 0}),td="MenuContent",[Kxe,XH]=ph(td),Xxe=C.exports.forwardRef((e,t)=>{const n=qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tb(td,e.__scopeMenu),a=nk(td,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(VH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Zxe,Tn({},i,{ref:t})):C.exports.createElement(Qxe,Tn({},i,{ref:t})))))}),Zxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ua(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(ZH,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Qxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu);return C.exports.createElement(ZH,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),ZH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=tb(td,n),P=nk(td,n),E=tk(n),_=KH(n),T=Hxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ua(t,R,w.onContentChange),z=C.exports.useRef(0),H=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?oF:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=H.current+G,he=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(Z=he.find(qe=>qe.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(qe=>qe.textValue),$e=swe(De,X,Se),He=(te=he.find(qe=>qe.textValue===$e))===null||te===void 0?void 0:te.ref.current;(function qe(tt){H.current=tt,window.clearTimeout(z.current),tt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),He&&setTimeout(()=>He.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),pbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&uwe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(Kxe,{scope:n,searchRef:H,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(gbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(dbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Dxe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(yxe,Tn({role:"menu","aria-orientation":"vertical","data-state":iwe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!$xe.includes(G.key))return;G.preventDefault();const De=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);YH.includes(G.key)&&De.reverse(),owe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:qn(e.onPointerMove,i9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),r9="MenuItem",hM="menu.itemSelect",Jxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=nk(r9,e.__scopeMenu),s=XH(r9,e.__scopeMenu),l=Ua(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(hM,{bubbles:!0,cancelable:!0});p.addEventListener(hM,v=>r?.(v),{once:!0}),kH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(ewe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Bxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),ewe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=XH(r9,n),s=KH(n),l=C.exports.useRef(null),u=Ua(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(zxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(_u.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),twe="MenuRadioGroup";ph(twe,{value:void 0,onValueChange:()=>{}});const nwe="MenuItemIndicator";ph(nwe,{checked:!1});const rwe="MenuSub";ph(rwe);function iwe(e){return e?"open":"closed"}function owe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function swe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=awe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function lwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function uwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lwe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const cwe=Gxe,dwe=jxe,fwe=Xxe,hwe=Jxe,QH="ContextMenu",[pwe,lTe]=a2(QH,[qH]),nb=qH(),[gwe,JH]=pwe(QH),mwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(gwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(cwe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},vwe="ContextMenuTrigger",ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(vwe,n),o=nb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(dwe,Tn({},o,{virtualRef:s})),C.exports.createElement(_u.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,qy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,qy(u)),onPointerCancel:qn(e.onPointerCancel,qy(u)),onPointerUp:qn(e.onPointerUp,qy(u))})))}),Swe="ContextMenuContent",bwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(Swe,n),o=nb(n),a=C.exports.useRef(!1);return C.exports.createElement(fwe,Tn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),xwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nb(n);return C.exports.createElement(hwe,Tn({},i,r,{ref:t}))});function qy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const wwe=mwe,Cwe=ywe,_we=bwe,gf=xwe,kwe=ft([e=>e.gallery,e=>e.options,Lu,Cr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Ewe=ft([e=>e.options,e=>e.gallery,e=>e.system,Cr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Pwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Twe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(Ewe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(f2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(cd(!1)),t(d2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(cd(!1)),t(j8(s)),t(lH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(X8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(q8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(wwe,{onOpenChange:H=>{t(yH(H))},children:[x(Cwe,{children:re(Nl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ASe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:F8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(w5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(_we,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:H=>{H.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},Pwe),gs=e=>{const{label:t,styleClass:n,...r}=e;return x(Az,{className:`invokeai__checkbox ${n}`,...r,children:t})},Ky=320,pM=40,Awe={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},gM=400;function eW(){const e=Xe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Ee(kwe),{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:gM,galleryMaxWidth:gM}:Awe[u],[M,I]=C.exports.useState(S>=Ky),[R,N]=C.exports.useState(!1),[z,H]=C.exports.useState(0),$=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=Ky&&I(!1)},[S]);const V=()=>{e(OSe(!i)),e(Wi(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(Wi(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(yH(!1)),e(ISe(j.current?j.current.scrollTop:0)),setTimeout(()=>e(Wi(!0)),400)},[e]),K=()=>{e(jC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};vt("g",()=>{J()},[o,i]),vt("left",()=>{e(X8())},{enabled:!P},[P]),vt("right",()=>{e(K8())},{enabled:!P},[P]),vt("shift+g",()=>{V()},[i]),vt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return vt("shift+up",()=>{if(s<256){const he=Je.clamp(s+X,32,256);e($g(he))}},[s]),vt("shift+down",()=>{if(s>32){const he=Je.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&$.current&&!$.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(rH,{nodeRef:$,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:re("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:$,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[re(CH,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{H(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const $e=i?Je.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(DSe($e)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(Wi(!0)))},onResize:(he,ye,Se,De)=>{const $e=Je.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));$e>=Ky&&!M?I(!0):$e$e-pM&&e($g($e-pM)),i&&($e>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?re($n,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re($n,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(_5e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(ed,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(H8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(L8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(gs,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(RSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(gs,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(NSe(he.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(J$,{}):x(eH,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?re($n,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(Twe,{image:he,isSelected:r===ye},ye)})}),x($a,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Lwe=ft([e=>e.options,Cr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),rk=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(Lwe),l=()=>{t(uke(!o)),t(Wi(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(GSe,{})})})]}),!a&&x(eW,{})]})})};function Mwe(){return x(rk,{optionsPanel:x(_Se,{}),children:x(USe,{})})}function Owe(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(B8,{accordionInfo:e})]})}const Iwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(wH,{})})});function Rwe(){return x(rk,{optionsPanel:x(Owe,{}),children:x(Iwe,{})})}var o9=function(e,t){return o9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},o9(e,t)};function Nwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=Zwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):rW(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function Zwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Qwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Jwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ik=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Qwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Jwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ik(e,t);return e.bounds=n,n};function rb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?en?Ra(n,2):Ra(e,2):Ra(e,2)};function ib(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=rb(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var vM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ob(o,n);return!l},yM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},e6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},t6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function n6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ib(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function r6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=rb(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var i6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},o6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},a6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function s6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function SM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:a9(e,o,a,i)}function l6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function u6e(e,t){var n=o6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=l6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function c6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=a6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=s6e(e,l),H=Math.max(z,N),$=h5(e,M),j=h5(e,I),de=$*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();rW(e,T,H,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,$e=De/N,He=tW[S.animationType],qe=1-He(Math.min(1,$e)),tt=1-te,Ze=ye+a*tt,nt=Se+s*tt,Tt=SM(Ze,G.positionX,ye,_,v,h,u,ie,J,qe),xt=SM(nt,G.positionY,Se,E,v,m,p,K,Q,qe);(ye!==Ze||Se!==nt)&&e.setTransformState(he,Tt,xt)})}}function bM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?t6e(e,t):e6e(e,t)}function xM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=i6e(e,t,n),u=l.x,h=l.y,p=h5(e,a),m=h5(e,s);u6e(e,{x:u,y:h}),r6e(e,u,h,p,m)}}function d6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?c6e(e):iW(e)}}function iW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&iW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=ok(e,a,v,S);w&&xd(e,w,h,p)}}function ok(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=ib(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},f6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Hg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},aW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},wM=function(e){var t=Pl({},Hg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Hg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Hg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Hg[n]),e[n]):s?t[n]=mM(mM([],Hg[n]),e[n]):t[n]=e[n]}}),t},sW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Ra(h,3),s,a,u,!1);return p};function lW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=sW(e,t,n),w=ok(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function uW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=aW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ik(e,a.scale),m=rb(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||xd(e,v,t,n)}}function h6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=p6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=ik(e,P),R=rb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function p6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function g6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var m6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,1,t,n,r)}},v6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,-1,t,n,r)}},y6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},S6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),uW(e,t,n)}},b6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=cW(t||i.scale,o,a);xd(e,s,n,r)}}},x6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&g6e(a)&&a&&o.contains(a)){var s=h6e(e,a,n);xd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:m6e(e),zoomOut:v6e(e),setTransform:y6e(e),resetTransform:S6e(e),centerView:b6e(e),zoomToElement:x6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ob=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},CM=function(e){e&&clearTimeout(e)},w6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},cW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},C6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ob(u,a);return!p};function _6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Dwe(t,n);return r}function dW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var k6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Ra(v,3),u,l,p,S);return w},E6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},P6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ob(a,i);return!l},T6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},A6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},fW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},L6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Ra(p,2),a,o,l,!u)},M6e=160,O6e=100,I6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Fr(e),t,r),ui(Fr(e),t,i))},R6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=_6e(t,null),E=k6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=dW(t,o,l),M=S||v===0||h,I=u&&M,R=ib(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Fr(e),t,r),ui(Fr(e),t,i)}},N6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;CM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(oW(e,t.x,t.y),e.wheelAnimationTimer=null)},O6e);var o=E6e(e,t);o&&(CM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Fr(e),t,r),ui(Fr(e),t,i))},M6e))},D6e=function(e,t){var n=fW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},z6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=A6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=fW(t),v=L6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ib(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},B6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,oW(e,t?.x,t?.y)};function F6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return uW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=sW(e,h,o),m=dW(t,u,l),v=ok(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var $6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ob(l,s);return!(p||!h)},hW=le.createContext(f6e),H6e=function(e){Nwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=aW(n.props),n.setup=wM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=kw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=C6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(I6e(n,r),R6e(n,r),N6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),bM(n,r),ui(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=yM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),xM(n,r.clientX,r.clientY),ui(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(d6e(n),ui(Fr(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=P6e(n,r);!l||(D6e(n,r),vl(n),ui(Fr(n),r,a),ui(Fr(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=T6e(n);!l||(r.preventDefault(),r.stopPropagation(),z6e(n,r),ui(Fr(n),r,a),ui(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(B6e(n),ui(Fr(n),r,o),ui(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),bM(n,r),ui(Fr(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=yM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];xM(n,s.clientX,s.clientY),ui(Fr(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=$6e(n,r);!o||F6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Fr(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=cW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=w6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=kw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=kw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=wM(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(hW.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),W6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(H6e,{...Pl({},e,{setRef:i})})});function V6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var U6e=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,_M={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};V6e(U6e);var G6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(hW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+_M.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+_M.content+" "+o,style:s,children:t})})};function j6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(W6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re($n,{children:[re("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(mt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(W4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(L8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(G6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function Y6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())};return vt("Esc",()=>{t&&e(cd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(mt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(cd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(gH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re($n,{children:[x(j6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(bH,{image:n})]})]}),x(eW,{})]})]})}const q6e=ft(Rn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),K6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(q6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return re(en,{direction:"column",gap:"1rem",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},X6e=()=>x(Nl,{flex:"1",textAlign:"left",children:"Bounding Box"}),u2=e=>e.system,Z6e=e=>e.system.toastQueue,Q6e=ft(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee(Q6e),n=Xe();return re(en,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(VL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(VL(1)),isResetDisabled:!t}),x(za,{isChecked:t,onChange:r=>n(SSe(r.target.checked))})]})}const eCe=ft([z$,u2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),tCe=()=>{const e=Xe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Ee(eCe);return re(en,{direction:"column",gap:"1rem",children:[x(J6e,{}),x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(sO(u))},handleReset:()=>e(sO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(aO(u))},handleReset:()=>{e(aO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(uO(u))},handleReset:()=>{e(uO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(lO(u))},handleReset:()=>{e(lO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(za,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(tke(u.target.checked))}}),x(Au,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(pV(u.target.value))}),x(bs,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(cO(u))},handleReset:()=>{e(cO(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},nCe=()=>x(Nl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function rCe(){const e={boundingBox:{header:x(X6e,{}),feature:no.BOUNDING_BOX,options:x(K6e,{})},outpainting:{header:x(nCe,{}),feature:no.OUTPAINTING,options:x(tCe,{})},seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(B8,{accordionInfo:e})]})}const iCe=ft(Rn,q$,Cr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),oCe=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(iCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(aSe({width:a,height:s})),e(iSe()),e(Wi(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var aCe=Math.PI/180;function sCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},lt={_global:k0,version:"8.3.13",isBrowser:sCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return lt.angleDeg?e*aCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return lt.DD.isDragging},isDragReady(){return!!lt.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{lt[e.prototype.getClassName()]=e};lt._injectGlobal(lt);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var lCe="[object Array]",uCe="[object Number]",cCe="[object String]",dCe="[object Boolean]",fCe=Math.PI/180,hCe=180/Math.PI,Ew="#",pCe="",gCe="0",mCe="Konva warning: ",kM="Konva error: ",vCe="rgb(",Pw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},yCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const SCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===lCe},_isNumber(e){return Object.prototype.toString.call(e)===uCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===cCe},_isBoolean(e){return Object.prototype.toString.call(e)===dCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Xy.push(e),Xy.length===1&&SCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ew,pCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=gCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===vCe?(t=yCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function Be(){if(lt.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function gW(e){if(lt.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function ak(){if(lt.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(lt.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function mW(){if(lt.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function bCe(){if(lt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(lt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function xCe(e){if(lt.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Wg="get",Vg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Wg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Wg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Vg+n,i=Wg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Wg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Wg+fe._capitalize(n),a=Vg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function wCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=CCe+u.join(EM)+_Ce)):(o+=s.property,t||(o+=ACe+s.val)),o+=PCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=MCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=PM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=wCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,lt._mouseListenClick=!1,lt._touchListenClick=!1,lt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof lt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};lt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",su="absoluteTransform",TM="absoluteScale",Ug="canvas",NCe="Change",DCe="children",zCe="konva",s9="listening",AM="mouseenter",LM="mouseleave",MM="set",OM="Shape",Y3=" ",IM="stage",Tc="transform",BCe="Stage",l9="visible",FCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let $Ce=1;class Fe{constructor(t){this._id=$Ce++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Tc||t===su)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Tc||t===su,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===su&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new sk({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(TM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==DCe&&(r=MM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(l9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!lt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==BCe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Tc),this._clearSelfAndDescendantCache(su)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Tc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Tc),this._clearSelfAndDescendantCache(su),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(j3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():lt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),lt[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=lt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Fe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return lt.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function NM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const YCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",q3=[];class lb extends ua{constructor(t){super(NM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{NM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===WCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(YCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+RM,this.content.style.height=n+RM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rGCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),lt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}getLayers(){return this.children}_bindContentEvents(){!lt.isBrowser||jCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||lt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,lt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;lt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||lt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;lt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(lt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){lt["_"+r+"InDblClickWindow"]=!1},lt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),lt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,lt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),lt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,lk(t)),Wm(t.pointerId)}_lostpointercapture(t){Wm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new sk({pixelRatio:1,width:this.width(),height:this.height()}),!!lt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}lb.prototype.nodeType=HCe;pr(lb);q.addGetterSetter(lb,"container");var LW="hasShadow",MW="shadowRGBA",OW="patternImage",IW="linearGradient",RW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Vm={};function qCe(e){e.fill()}function KCe(e){e.stroke()}function XCe(e){e.fill()}function ZCe(e){e.stroke()}function QCe(){this._clearCache(LW)}function JCe(){this._clearCache(MW)}function e9e(){this._clearCache(OW)}function t9e(){this._clearCache(IW)}function n9e(){this._clearCache(RW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(LW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(OW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(lt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(IW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete Vm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}}Me.prototype._fillFunc=qCe;Me.prototype._strokeFunc=KCe;Me.prototype._fillFuncHit=XCe;Me.prototype._strokeFuncHit=ZCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",QCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",JCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",e9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",t9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",n9e);q.addGetterSetter(Me,"stroke",void 0,mW());q.addGetterSetter(Me,"strokeWidth",2,Be());q.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Me,"hitStrokeWidth","auto",ak());q.addGetterSetter(Me,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Me,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Me,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Me,"lineJoin");q.addGetterSetter(Me,"lineCap");q.addGetterSetter(Me,"sceneFunc");q.addGetterSetter(Me,"hitFunc");q.addGetterSetter(Me,"dash");q.addGetterSetter(Me,"dashOffset",0,Be());q.addGetterSetter(Me,"shadowColor",void 0,h1());q.addGetterSetter(Me,"shadowBlur",0,Be());q.addGetterSetter(Me,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);q.addGetterSetter(Me,"shadowOffsetX",0,Be());q.addGetterSetter(Me,"shadowOffsetY",0,Be());q.addGetterSetter(Me,"fillPatternImage");q.addGetterSetter(Me,"fill",void 0,mW());q.addGetterSetter(Me,"fillPatternX",0,Be());q.addGetterSetter(Me,"fillPatternY",0,Be());q.addGetterSetter(Me,"fillLinearGradientColorStops");q.addGetterSetter(Me,"strokeLinearGradientColorStops");q.addGetterSetter(Me,"fillRadialGradientStartRadius",0);q.addGetterSetter(Me,"fillRadialGradientEndRadius",0);q.addGetterSetter(Me,"fillRadialGradientColorStops");q.addGetterSetter(Me,"fillPatternRepeat","repeat");q.addGetterSetter(Me,"fillEnabled",!0);q.addGetterSetter(Me,"strokeEnabled",!0);q.addGetterSetter(Me,"shadowEnabled",!0);q.addGetterSetter(Me,"dashEnabled",!0);q.addGetterSetter(Me,"strokeScaleEnabled",!0);q.addGetterSetter(Me,"fillPriority","color");q.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);q.addGetterSetter(Me,"fillPatternOffsetX",0,Be());q.addGetterSetter(Me,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);q.addGetterSetter(Me,"fillPatternScaleX",1,Be());q.addGetterSetter(Me,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientStartPointX",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Me,"fillLinearGradientStartPointY",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientEndPointX",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Me,"fillLinearGradientEndPointY",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientStartPointX",0);q.addGetterSetter(Me,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientEndPointX",0);q.addGetterSetter(Me,"fillRadialGradientEndPointY",0);q.addGetterSetter(Me,"fillPatternRotation",0);q.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var r9e="#",i9e="beforeDraw",o9e="draw",NW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],a9e=NW.length;class gh extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new sk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(i9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(o9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class uk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}uk.prototype.nodeType="FastLayer";pr(uk);class K0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Oa{constructor(t,n){this.id=Oa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=DM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=zM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===DM?this.setTime(t):this.state===zM&&this.setTime(this.duration-t)}pause(){this.state=l9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=u9e++;var u=r.getLayer()||(r instanceof lt.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Oa(function(){n.tween.onEnterFrame()},u),this.tween=new c9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)s9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Um={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Iu.prototype._centroid=!0;Iu.prototype.className="Arc";Iu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Iu);q.addGetterSetter(Iu,"innerRadius",0,Be());q.addGetterSetter(Iu,"outerRadius",0,Be());q.addGetterSetter(Iu,"angle",0,Be());q.addGetterSetter(Iu,"clockwise",!1,Ls());function d9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function FM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,H,$,j,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+Q,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break;case"a":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},I=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=I([1,0],[(p-w)/s,(m-P)/l]),N=[(p-w)/s,(m-P)/l],z=[(-1*p-w)/s,(-1*m-P)/l],H=I(N,z);return M(N,z)<=-1&&(H=Math.PI),M(N,z)>=1&&(H=0),a===0&&H>0&&(H=H-2*Math.PI),a===1&&H<0&&(H=H+2*Math.PI),[E,_,s,l,R,H,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Ru{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var DW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],d9e="Change.konva",f9e="none",f9="up",h9="right",p9="down",g9="left",h9e=DW.length;class ck extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var $M=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,$M,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),$M,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class zl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Oa(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Iw(){return o3||(o3=fe.createCanvasElement().getContext(m9e),o3)}function P9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function T9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(A9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(v9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Iw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+i3+this.fontVariant()+i3+(this.fontSize()+x9e)+E9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Iw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==VM,w=v!==_9e&&S,P=this.ellipsis();this.textArr=[],Iw().font=this._getContextFont();for(var E=P?this._getTextWidth(Ow):0,_=0,T=t.length;_h)for(;M.length>0;){for(var R=0,N=M.length,z="",H=0;R>>1,j=M.slice(0,$+1),de=this._getTextWidth(j)+E;de<=h?(R=$+1,z=j,H=de):N=$}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===HM;ie&&H<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(HM))+1,V>0&&(R=V,z=z.slice(0,R),H=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,H),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==VM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Ow)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=zW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${UW}`).join(" "),UM="nodesRect",O9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],I9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const R9e="ontouchstart"in lt._global;function N9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(I9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],GM=1e8;function D9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function GW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function z9e(e,t){const n=D9e(e);return GW(e,t,n)}function B9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(O9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(UM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(UM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(lt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return GW(h,-lt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-GM,y:-GM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-lt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:lt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new c2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:R9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=lt.getAngle(this.rotation()),o=N9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=lt.getAngle(this.rotation());const V=m+de,J=lt.getAngle(this.rotationSnapTolerance()),Q=B9e(this.rotationSnaps(),V,J)-p.rotation,K=z9e(p,Q);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(lt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function F9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p5.join(", "))}),e||[]}_n.prototype.className="Transformer";pr(_n);q.addGetterSetter(_n,"enabledAnchors",p5,F9e);q.addGetterSetter(_n,"flipEnabled",!0,Ls());q.addGetterSetter(_n,"resizeEnabled",!0);q.addGetterSetter(_n,"anchorSize",10,Be());q.addGetterSetter(_n,"rotateEnabled",!0);q.addGetterSetter(_n,"rotationSnaps",[]);q.addGetterSetter(_n,"rotateAnchorOffset",50,Be());q.addGetterSetter(_n,"rotationSnapTolerance",5,Be());q.addGetterSetter(_n,"borderEnabled",!0);q.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"anchorStrokeWidth",1,Be());q.addGetterSetter(_n,"anchorFill","white");q.addGetterSetter(_n,"anchorCornerRadius",0,Be());q.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"borderStrokeWidth",1,Be());q.addGetterSetter(_n,"borderDash");q.addGetterSetter(_n,"keepRatio",!0);q.addGetterSetter(_n,"centeredScaling",!1);q.addGetterSetter(_n,"ignoreStroke",!1);q.addGetterSetter(_n,"padding",0,Be());q.addGetterSetter(_n,"node");q.addGetterSetter(_n,"nodes");q.addGetterSetter(_n,"boundBoxFunc");q.addGetterSetter(_n,"anchorDragBoundFunc");q.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);q.addGetterSetter(_n,"useSingleNodeRotation",!0);q.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Nu extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,lt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Nu.prototype.className="Wedge";Nu.prototype._centroid=!0;Nu.prototype._attrsAffectingSize=["radius"];pr(Nu);q.addGetterSetter(Nu,"radius",0,Be());q.addGetterSetter(Nu,"angle",0,Be());q.addGetterSetter(Nu,"clockwise",!1);q.backCompat(Nu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function jM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var $9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],H9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function W9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,H,$,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new jM,Z=null,te=G,X=null,he=null,ye=$9e[t],Se=H9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)0&&W9e(t,n)};q.addGetterSetter(Fe,"blurRadius",0,Be(),q.afterSetFilter);const U9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter(Fe,"contrast",0,Be(),q.afterSetFilter);const j9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,H=I>0?I:-I;if(z>N&&(R=M),H>N&&(R=I),R*=t,i){var $=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=$>255?255:$<0?0:$,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter(Fe,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter(Fe,"embossBlend",!1,null,q.afterSetFilter);function Rw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const Y9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mE?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,H,$;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function a7e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter(Fe,"pixelSize",8,Be(),q.afterSetFilter);const c7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);const f7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);q.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const h7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},g7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[W]!==O[se]){var pe=` -`+A[W].replace(" at new "," at ");return d.displayName&&pe.includes("")&&(pe=pe.replace("",d.displayName)),pe}while(1<=W&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function Sn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},_r=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ka(){kn(Ur),kn(_r)}function Td(d,f,y){if(_r.current!==Do)throw Error(a(168));Sn(_r,f),Sn(Ur,y)}function Hl(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Xa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=_r.current,Sn(_r,d),Sn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=Hl(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(_r),Sn(_r,d)):kn(Ur),Sn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Bs=64,uo=4194304;function Fs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?k=Fs(se):(O&=W,O!==0&&(k=Fs(O)))}else W=y&~A,W!==0?k=Fs(W):O!==0&&(k=Fs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0>=W,A-=W,Gi=1<<32-mi(f)+A|y<Ft?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Ft],Ve);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Ft===be.length)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;FtFt?(zr=Et,Et=null):zr=Et.sibling;var os=Ye(me,Et,qt.value,Ve);if(os===null){Et===null&&(Et=zr);break}d&&Et&&os.alternate===null&&f(me,Et),ue=O(os,ue,Ft),Mt===null?Te=os:Mt.sibling=os,Mt=os,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;!qt.done;Ft++,qt=be.next())qt=Lt(me,qt.value,Ve),qt!==null&&(ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Ft),Te}for(Et=k(me,Et);!qt.done;Ft++,qt=be.next())qt=Bn(Et,me,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Ft:qt.key),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Ft),Te}function qo(me,ue,be,Ve){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Mt=ue;Mt!==null;){if(Mt.key===Te){if(Te=be.type,Te===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&B1(Te)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=xa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,Ve,be.key),ue.return=me,me=ue):(Ve=sf(be.type,be.key,be.props,null,me.mode,Ve),Ve.ref=xa(me,ue,be),Ve.return=me,me=Ve)}return W(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,Ve),ue.return=me,me=ue}return W(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),Ve)}if(ie(be))return En(me,ue,be,Ve);if(R(be))return er(me,ue,be,Ve);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,Ve),ue.return=me,me=ue),W(me)):y(me,ue)}return qo}var Xu=w2(!0),C2=w2(!1),Vd={},po=No(Vd),wa=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){Sn(oe,f),Sn(wa,d),Sn(po,Vd),d=K(f),kn(po),Sn(po,d)}function je(){kn(po),kn(wa),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(Sn(wa,d),Sn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var It=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||zu(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function F1(){for(var d=0;dy?y:4,d(!0);var k=Zu.transition;Zu.transition={};try{d(!1),f()}finally{Ht=y,Zu.transition=k}}function ic(){return Si().memoizedState}function Y1(d,f,y){var k=Ar(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},ac(d))sc(f,y);else if(y=Ku(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function oc(d,f,y){var k=Ar(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(ac(d))sc(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var pe=f.interleaved;pe===null?(A.next=A,Hd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=Ku(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function ac(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function sc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Vl(d,y)}}var Ja={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Yl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Yl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Yl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=Y1.bind(null,bn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=bn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(jl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,nc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Qu++,0rp&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304)}else{if(!k)if(d=cn(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),cc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,Sn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return Sc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),nt&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Ka(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(_r),F1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));ju()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var Gs=!1,Er=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function dc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function Kl(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Fo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:nt&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&st(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function fc(d){return d.tag===5||d.tag===3||d.tag===4}function ts(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||fc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Pr(d,f,y),y=y.sibling}function Pr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Er||dc(y,f);case 6:if(nt){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?it(yr,y.stateNode):ht(yr,y.stateNode))}else jo(d,f,y);break;case 18:nt&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:nt?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=va(k),Du(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Er&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!Er&&(dc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(Er=(k=Er)||y.memoizedState!==null,jo(d,f,y),Er=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(k){var A=U2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case hc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function pc(d,f){var y=[];d=[d,0];for(var k=0;kA&&(A=W),k&=~O}if(k=A,k=Wn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*_b(k/1960))-k,10d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;peWn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;Ca(d,f),d=f.pendingProps;var A=zs(f,_r.current);qu(f,y),A=H1(null,f,k,d,A,y);var O=Ju();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Xa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Wo(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Fo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=N2(null,f,k,d,y);break e;case 11:f=M2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Fo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),N2(d,f,k,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Nh(f,k,null,y);var W=f.memoizedState;if(k=W.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=lc(Error(a(423)),f),f=z2(d,f,k,y,A);break e}else if(k!==A){A=lc(Error(a(424)),f),f=z2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=C2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(ju(),k===A){f=es(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,De(k,A)?W=null:O!==null&&De(k,O)&&(f.flags|=32),R2(d,f),bi(d,f,W,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return B2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Xu(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),M2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,k,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=es(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Qa(-1,y&-y),pe.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var rt=Re.pending;rt===null?pe.next=pe:(pe.next=rt.next,rt.next=pe),Re.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),$d(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,qu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Fo(k,f.pendingProps),A=Fo(k.type,A),Us(d,f,k,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),Ca(d,f),f.tag=1,Gr(k)?(d=!0,Xa(f)):d=!1,qu(f,y),b2(f,k,A),z1(f,k,A,y),Wo(null,f,k,!0,d,y);case 19:return $2(d,f,y);case 22:return I2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Vu(d,f)}function _a(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,k){return new _a(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,k,A,O){var W=2;if(k=d,typeof d=="function")mg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case _:W=14;break e;case T:W=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=tt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,k,A,O,W,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if(H(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Hl(d,y,f)}return f}function yg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&O>=Lt&&A<=rt&&W<=Ye){d.splice(f,1);break}else if(k!==Re||y.width!==pe.width||YeW){if(!(O!==Lt||y.height!==pe.height||rtA)){Re>k&&(pe.width+=Re-k,pe.x=k),rtO&&(pe.height+=Lt-O,pe.y=O),Yey&&(y=W)),W ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return Q(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||Sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!Ct)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),W=Ar(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Qa(O,W),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Ws(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=m7e})(jW);const v7e=R9(jW.exports);var dk={exports:{}},bh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(dk);const YM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let qM=!1,KM=!1;const fk=".react-konva-event",y7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,S7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,b7e={};function ub(e,t,n=b7e){if(!qM&&"zIndex"in t&&(console.warn(S7e),qM=!0),!KM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(y7e),KM=!0)}for(var o in n)if(!YM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!YM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+fk,v[l])}function kd(e){if(!lt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const YW={},x7e={};rh.Node.prototype._applyProps=ub;function w7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),kd(e)}function C7e(e,t,n){let r=rh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=rh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return ub(l,o),l}function _7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function k7e(e,t,n){return!1}function E7e(e){return e}function P7e(){return null}function T7e(){return null}function A7e(e,t,n,r){return x7e}function L7e(){}function M7e(e){}function O7e(e,t){return!1}function I7e(){return YW}function R7e(){return YW}const N7e=setTimeout,D7e=clearTimeout,z7e=-1;function B7e(e,t){return!1}const F7e=!1,$7e=!0,H7e=!0;function W7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function V7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function qW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function U7e(e,t,n){qW(e,t,n)}function G7e(e,t){t.destroy(),t.off(fk),kd(e)}function j7e(e,t){t.destroy(),t.off(fk),kd(e)}function Y7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function q7e(e,t,n){}function K7e(e,t,n,r,i){ub(e,i,r)}function X7e(e){e.hide(),kd(e)}function Z7e(e){}function Q7e(e,t){(t.visible==null||t.visible)&&e.show()}function J7e(e,t){}function e_e(e){}function t_e(){}const n_e=()=>dk.exports.DefaultEventPriority,r_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:w7e,createInstance:C7e,createTextInstance:_7e,finalizeInitialChildren:k7e,getPublicInstance:E7e,prepareForCommit:P7e,preparePortalMount:T7e,prepareUpdate:A7e,resetAfterCommit:L7e,resetTextContent:M7e,shouldDeprioritizeSubtree:O7e,getRootHostContext:I7e,getChildHostContext:R7e,scheduleTimeout:N7e,cancelTimeout:D7e,noTimeout:z7e,shouldSetTextContent:B7e,isPrimaryRenderer:F7e,warnsIfNotActing:$7e,supportsMutation:H7e,appendChild:W7e,appendChildToContainer:V7e,insertBefore:qW,insertInContainerBefore:U7e,removeChild:G7e,removeChildFromContainer:j7e,commitTextUpdate:Y7e,commitMount:q7e,commitUpdate:K7e,hideInstance:X7e,hideTextInstance:Z7e,unhideInstance:Q7e,unhideTextInstance:J7e,clearContainer:e_e,detachDeletedInstance:t_e,getCurrentEventPriority:n_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var i_e=Object.defineProperty,o_e=Object.defineProperties,a_e=Object.getOwnPropertyDescriptors,XM=Object.getOwnPropertySymbols,s_e=Object.prototype.hasOwnProperty,l_e=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?i_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QM=(e,t)=>{for(var n in t||(t={}))s_e.call(t,n)&&ZM(e,n,t[n]);if(XM)for(var n of XM(t))l_e.call(t,n)&&ZM(e,n,t[n]);return e},u_e=(e,t)=>o_e(e,a_e(t));function hk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=hk(r,t,n);if(i)return i;r=t?null:r.sibling}}function KW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const pk=KW(C.exports.createContext(null));class XW extends C.exports.Component{render(){return x(pk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:c_e,ReactCurrentDispatcher:d_e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f_e(){const e=C.exports.useContext(pk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=c_e.current)!=null?r:hk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],JM=new WeakMap;function h_e(){var e;const t=f_e();qg.splice(0,qg.length),hk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==pk&&qg.push(KW(i))});for(const n of qg){const r=(e=d_e.current)==null?void 0:e.readContext(n);JM.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,u_e(QM({},i),{value:JM.get(r)}))),n=>x(XW,{...QM({},n)})),[])}function p_e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const g_e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=p_e(e),o=h_e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,dk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),ub(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",ih="Group",P0="Rect",Kg="Circle",g5="Line",ZW="Image",m_e="Transformer",pm=v7e(r_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const v_e=le.forwardRef((e,t)=>x(XW,{children:x(g_e,{...e,forwardedRef:t})})),y_e=ft([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),S_e=e=>{const{...t}=e,{objects:n}=Ee(y_e);return x(ih,{listening:!1,...t,children:n.filter(W8).map((r,i)=>x(g5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},cb=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},b_e=ft(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:cb(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),x_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(b_e);return l?re(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},w_e=ft(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),C_e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Ee(w_e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(gw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(gw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},H=()=>{n(UL(!0))},$=()=>{n(vw(!1)),n(UL(!1)),n(Hy(!1))},j=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:H,onMouseOut:de,onMouseOver:j,onMouseUp:$,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(m_e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let QW=null,JW=null;const __e=e=>{QW=e},m5=()=>QW,k_e=e=>{JW=e},E_e=()=>JW,P_e=ft([Rn,Cr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),T_e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(P_e),i=C.exports.useRef(null),o=E_e();vt("esc",()=>{e(nSe())},{enabled:()=>!0,preventDefault:!0}),vt("shift+h",()=>{e(hSe(!n))},{preventDefault:!0},[t,n]),vt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},A_e=ft(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:cb(t)}}),eO=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),L_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(A_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=eO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=eO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},M_e=ft([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),O_e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(M_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Je.clamp(r*G5e**s,j5e,Y5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(bSe(l)),t(hH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},I_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),R_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(I_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a5(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},N_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),D_e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(N_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a5(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(aH([a.x,a.y]))}else t.current=!1;n(XS(!1))},[t,n,i,o,e,r])},z_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),B_e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(z_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(cH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(aH([s.x,s.y]))))},[t,r,i,a,n,e,o])},F_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),$_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(F_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},H_e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(cH(null)),e(XS(!1))},[e])},W_e=ft([Rn,Lu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V_e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(W_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(hH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!1))},[e,n,t])}};var mf=C.exports,U_e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const eV=e=>{const{url:t,x:n,y:r}=e,[i]=U_e(t);return x(ZW,{x:n,y:r,image:i,listening:!1})},G_e=ft([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),j_e=()=>{const{objects:e}=Ee(G_e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o5(t))return x(eV,{x:t.x,y:t.y,url:t.image.url},n);if(E5e(t))return x(g5,{points:t.points,stroke:t.color?cb(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},Y_e=ft([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),q_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},K_e=()=>{const{colorMode:e}=Hv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(Y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=q_e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=Je.range(0,T).map(N=>x(g5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=Je.range(0,M).map(N=>x(g5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},X_e=ft([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Z_e=e=>{const{...t}=e,n=Ee(X_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(ZW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Q_e=ft([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J_e(){const{cursorCoordinatesString:e}=Ee(Q_e);return x("div",{children:`Cursor Position: ${e}`})}const l3=e=>Math.round(e*100)/100,e8e=ft([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:p}=e;return{activeLayerColor:p==="mask"?"var(--status-working-color)":"inherit",activeLayerString:p.charAt(0).toUpperCase()+p.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),t8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Ee(e8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&re($n,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(J_e,{})]})]})},n8e=ft([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),r8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee(n8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(ih,{...t,children:[r&&x(eV,{url:u,x:o,y:a}),i&&re(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},i8e=ft([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),o8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(i8e),o=C.exports.useCallback(()=>{e(GL(!1))},[e]),a=C.exports.useCallback(()=>{e(GL(!0))},[e]);vt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),vt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),vt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(eSe()),l=()=>e(J5e()),u=()=>e(Z5e());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:re(ra,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F8,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(vSe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(j$,{}),onClick:()=>e(I5e(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(Q5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},a8e=ft([Rn,Lu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),s8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(a8e);T_e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{k_e($),p.current=$},[]),S=C.exports.useCallback($=>{__e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=O_e(p),_=R_e(p),T=D_e(p,P),M=B_e(p,P,w),I=$_e(p),R=H_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:H}=V_e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(v_e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:_,onTouchMove:M,onTouchEnd:T,onMouseDown:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:H,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(K_e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(j_e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(S_e,{visible:!0,listening:!1}),x(L_e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(x_e,{visible:l!=="move",listening:!1}),x(r8e,{visible:u}),h&&x(Z_e,{}),x(C_e,{visible:n&&!u})]})]}),x(t8e,{}),x(o8e,{})]})})},l8e=ft([Rn,Cr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function u8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(l8e),r=()=>{e(xSe())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(C5e,{}),onClick:r,isDisabled:!t})}const c8e=ft([Rn,Cr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function d8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(c8e),r=()=>{e(tSe())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(S5e,{}),onClick:r,isDisabled:!t})}const tV=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return re($n,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(lF,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),re(kS,{children:[x($a,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x($a,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),f8e=()=>{const e=Xe();return re(tV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(R5e()),e(sH()),e(uH())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},h8e=()=>{const e=Xe();return re(tV,{title:"Clear Canvas History",acceptCallback:()=>e(uH()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},p8e=ft([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),g8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(p8e);return x(ed,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(H8,{})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Show Intermediates",isChecked:a,onChange:l=>e(mSe(l.target.checked))}),x(gs,{label:"Show Grid",isChecked:o,onChange:l=>e(gSe(l.target.checked))}),x(gs,{label:"Snap to Grid",isChecked:s,onChange:l=>e(ySe(l.target.checked))}),x(gs,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(dSe(l.target.checked))}),x(gs,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(uSe(l.target.checked))}),x(gs,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(cSe(l.target.checked))}),x(gs,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(pSe(l.target.checked))}),x(h8e,{}),x(f8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function m9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(tO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=v9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(nO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(tO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},mk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},rV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},y9=function(e){var t=rV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=rV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},m8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},v8e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},y8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(gk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(mk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),S8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(gk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(mk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),iV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function b8e(e,t,n){var r=m9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;iV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var x8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,w8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},rO=new Map,C8e=function(e){x8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!rO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,rO.set(t,n);var r=w8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},_8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(gk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(mk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},k8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=nV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);C8e(s);var l=b8e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(S8e,{hsva:u,onChange:h}),x(y8e,{hue:u.h,onChange:h}),le.createElement(_8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},E8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:v8e,fromHsva:m8e,equal:iV},P8e=function(e){return le.createElement(k8e,fb({},e,{colorModel:E8e}))};const oV=e=>{const{styleClass:t,...n}=e;return x(P8e,{className:`invokeai__color-picker ${t}`,...n})},T8e=ft([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:cb(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),A8e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(T8e);vt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),vt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(fH(t==="mask"?"base":"mask"))},a=()=>e(X5e()),s=()=>e(dH(!r));return x(ed,{trigger:"hover",triggerComponent:x(ra,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(gs,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(fSe(l.target.checked))}),x(oV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(sSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let u3;const L8e=new Uint8Array(16);function M8e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(L8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function O8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const I8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iO={randomUUID:I8e};function Jp(e,t,n){if(iO.randomUUID&&!t&&!e)return iO.randomUUID();e=e||{};const r=e.random||(e.rng||M8e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return O8e(r)}const R8e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},N8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},D8e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},z8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=z8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(F4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m5();if(!S){t(gu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=R8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(gu(!1)),t(Kp(!0));return}const E=new FormData;E.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(N8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(D8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(lSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(gu(!1)),t(G3("Connected")),t(Kp(!0))},B8e=ft([Rn,Lu,u2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),F8e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ee(B8e);vt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),vt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),vt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(Y$,{})}),children:re(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(mw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(oV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(oSe(s))})]})})]})};let oO;const aV=()=>({setOpenUploader:e=>{e&&(oO=e)},openUploader:oO}),$8e=ft([u2,Rn,Lu],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),H8e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ee($8e),s=m5(),{openUploader:l}=aV();vt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),vt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),vt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=m5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(rSe({contentRect:_}))},p=()=>{e(sH()),e(lH())},m=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(Au,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:k5e,onChange:E=>{const _=E.target.value;e(fH(_)),_==="mask"&&!r&&e(dH(!0))}}),x(A8e,{}),x(F8e,{}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(j$,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(KS,{}),onClick:S,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(G$,{}),onClick:w,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(u8e,{}),x(d8e,{})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x($8,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(g8e,{})})]})},W8e=ft([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V8e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(W8e);return C.exports.useLayoutEffect(()=>{const n=Je.debounce(()=>{e(Wi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(H8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(oCe,{}):x(s8e,{})})]})})})};function U8e(){const e=Xe();return C.exports.useEffect(()=>{e(Wi(!0))},[e]),x(rk,{optionsPanel:x(rCe,{}),styleClass:"inpainting-workarea-overrides",children:x(V8e,{})})}const G8e=ct({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Ef={txt2img:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Rwe,{}),tooltip:"Text To Image"},img2img:{title:x(F3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(G8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(U8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B3e,{}),tooltip:"Post Processing"}},pb=Je.map(Ef,(e,t)=>t);[...pb];function j8e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();vt("1",()=>{a(na(0))}),vt("2",()=>{a(na(1))}),vt("3",()=>{a(na(2))}),vt("4",()=>{a(na(3))}),vt("5",()=>{a(na(4))}),vt("z",()=>{a(cd(!t))},[t]),vt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(Wi(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x(zF,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(NF,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return re(RF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(Wi(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(DF,{className:"app-tabs-panels",children:t?x(Y6e,{}):l()})]})}const sV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Y8e=sV,lV=MS({name:"options",initialState:Y8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=i5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...sV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=pb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:uV,resetOptionsState:uTe,resetSeed:cTe,setActiveTab:na,setAllImageToImageParameters:q8e,setAllParameters:K8e,setAllTextToImageParameters:X8e,setCfgScale:cV,setCodeformerFidelity:dV,setCurrentTheme:Z8e,setFacetoolStrength:K3,setFacetoolType:X3,setHeight:fV,setHiresFix:hV,setImg2imgStrength:S9,setInfillMethod:pV,setInitialImage:d2,setIsLightBoxOpen:cd,setIterations:Q8e,setMaskPath:gV,setOptionsPanelScrollPosition:J8e,setParameter:dTe,setPerlin:eke,setPrompt:gb,setSampler:mV,setSeamBlur:aO,setSeamless:vV,setSeamSize:sO,setSeamSteps:lO,setSeamStrength:uO,setSeed:f2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:tke,setShouldGenerateVariations:nke,setShouldHoldOptionsPanelOpen:rke,setShouldLoopback:ike,setShouldPinOptionsPanel:oke,setShouldRandomizeSeed:ake,setShouldRunESRGAN:ske,setShouldRunFacetool:lke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:fTe,setShowDualDisplay:uke,setSteps:xV,setThreshold:cke,setTileSize:cO,setUpscalingLevel:b9,setUpscalingStrength:x9,setVariationAmount:dke,setWidth:wV}=lV.actions,fke=lV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const Z3=Object.create(null);Object.keys(Ol).forEach(e=>{Z3[Ol[e]]=e});const hke={type:"error",data:"parser error"},pke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",gke=typeof ArrayBuffer=="function",mke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>pke&&t instanceof Blob?n?r(t):dO(t,r):gke&&(t instanceof ArrayBuffer||mke(t))?n?r(t):dO(new Blob([t]),r):r(Ol[e]+(t||"")),dO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},fO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},yke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ske(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:hke},Ske=(e,t)=>{if(yke){const n=vke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),bke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},xke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Cke=setTimeout,_ke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=Cke.bind(Vc),e.clearTimeoutFn=_ke.bind(Vc)):(e.setTimeoutFn=setTimeout.bind(Vc),e.clearTimeoutFn=clearTimeout.bind(Vc))}const kke=1.33;function Eke(e){return typeof e=="string"?Pke(e):Math.ceil((e.byteLength||e.size)*kke)}function Pke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Tke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Tke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,Ake={};let hO=0,d3=0,pO;function gO(e){let t="";do t=LV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function MV(){const e=gO(+new Date);return e!==pO?(hO=0,pO=e):e+"."+gO(hO++)}for(;d3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};xke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,bke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=MV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Tl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Tl extends Vr{constructor(t,n){super(),mb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=TV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new RV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Tl.requestsCount++,Tl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Oke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mO);else if(typeof addEventListener=="function"){const e="onpagehide"in Vc?"pagehide":"unload";addEventListener(e,mO,!1)}}function mO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=Vc.WebSocket||Vc.MozWebSocket,vO=!0,Nke="arraybuffer",yO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dke extends AV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=yO?{}:TV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=vO&&!yO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Nke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{vO&&this.ws.send(o)}catch{}i&&NV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=MV()),this.supportsBinary||(t.b64=1);const i=OV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!f3}}const zke={websocket:Dke,polling:Rke},Bke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Bke.exec(e||""),o={},a=14;for(;a--;)o[Fke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=$ke(o,o.path),o.queryKey=Hke(o,o.query),o}function $ke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Hke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Dc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=C9(n.host).host),mb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Lke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=PV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new zke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Dc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Dc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Dc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Dc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Dc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Gke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",jke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function vk(e){return Vke&&(e instanceof ArrayBuffer||Uke(e))||Gke&&e instanceof Blob||jke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Zke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=qke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Kke,get PacketType(){return nn},Encoder:Xke,Decoder:yk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Jke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Jke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}g1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,mb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new g1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Qke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Dc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Wke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Xg[i]||(Xg[i]=new E9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:zV,io:J3,connect:J3});var eEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,tEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,nEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(SO[t]||t||SO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return rEe(e)},P=function(){return iEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":oEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(eEe,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var SO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},bO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},rEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},iEe=function(t){var n=t.getDay();return n===0&&(n=7),n},oEe=function(t){return(String(t).match(tEe)||[""]).pop().replace(nEe,"").replace(/GMT\+0000/g,"UTC")};const aEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(NL(!0)),t(G3("Connected")),t(O5e());const r=n().gallery;r.categories.user.latest_mtime?t(FL("user")):t(jC("user")),r.categories.result.latest_mtime?t(FL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(NL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(K5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(d2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(MSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(gu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(DL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(LSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(vH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(uV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r)),r.infill_methods.includes("patchmatch")||t(pV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(G3("Model Changed")),t(gu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(gu(!1)),t(Kp(!0)),t(DL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},sEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},lEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},uEe=e=>{const t=m5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:P,perlin:E,prompt:_,sampler:T,seamBlur:M,seamless:I,seamSize:R,seamSteps:N,seamStrength:z,seed:H,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:de,shouldGenerateVariations:V,shouldRandomizeSeed:J,shouldRunESRGAN:ie,shouldRunFacetool:Q,steps:K,threshold:G,tileSize:Z,upscalingLevel:te,upscalingStrength:X,variationAmount:he,width:ye}=r,{shouldDisplayInProgressType:Se,saveIntermediatesInterval:De,enableImageDebugging:$e}=o,He={prompt:_,iterations:J||V?P:1,steps:K,cfg_scale:s,threshold:G,perlin:E,height:p,width:ye,sampler_name:T,seed:H,progress_images:Se==="full-res",progress_latents:Se==="latents",save_intermediates:De,generation_mode:n,init_mask:""};if(He.seed=J?N$(P8,T8):H,["txt2img","img2img"].includes(n)&&(He.seamless=I,He.hires_fix=m),n==="img2img"&&w&&(He.init_img=typeof w=="string"?w:w.url,He.strength=v,He.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ze},boundingBoxCoordinates:nt,boundingBoxDimensions:Tt,inpaintReplace:xt,shouldUseInpaintReplace:Le,stageScale:at,isMaskEnabled:At,shouldPreserveMaskedArea:st}=i,gt={...nt,...Tt},an=sEe(At?Ze.filter(W8):[],gt);He.init_mask=an,He.fit=!1,He.init_img=a,He.strength=v,He.invert_mask=st,Le&&(He.inpaint_replace=xt),He.bounding_box=gt;const Ct=t.scale();t.scale({x:1/at,y:1/at});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:gt.x+Ut.x,y:gt.y+Ut.y,width:gt.width,height:gt.height});$e&&lEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(Ct),He.init_img=sn,He.progress_images=!1,He.seam_size=R,He.seam_blur=M,He.seam_strength=z,He.seam_steps=N,He.tile_size=Z,He.force_outpaint=de,He.infill_method=S}V?(He.variation_amount=he,$&&(He.with_variations=nye($))):He.variation_amount=0;let qe=!1,tt=!1;return ie&&(qe={level:te,strength:X}),Q&&(tt={type:h,strength:u},h==="codeformer"&&(tt.codeformer_fidelity=l)),$e&&(He.enable_image_debugging=$e),{generationParameters:He,esrganParameters:qe,facetoolParameters:tt}},cEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(gu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=uEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(gu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(gu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(vH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},dEe=()=>{const{origin:e}=new URL(window.location.href),t=J3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=aEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:H,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=cEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{H(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},fEe=["cursorPosition"].map(e=>`canvas.${e}`),hEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),pEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),BV=YF({options:fke,gallery:zSe,system:$4e,canvas:wSe}),gEe=h$.getPersistConfig({key:"root",storage:f$,rootReducer:BV,blacklist:[...fEe,...hEe,...pEe],debounce:300}),mEe=F2e(gEe,BV),FV=Ive({reducer:mEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(dEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=_2e,Ee=h2e;function e4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e4=function(n){return typeof n}:e4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e4(e)}function vEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xO(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),wEe=ft(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(wEe),i=t?Math.round(t*100/n):0;return x(mF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function _Ee(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function kEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(_Ee,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re($n,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Lv,{className:" modal hotkeys-modal",children:[x(K_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(i)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(o)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(a)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(s)})]})]})})]})]})]})}const EEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(X$(i))};return re("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},PEe=ft(e=>e.system,e=>{const t=Je.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),TEe=()=>{const{models:e}=Ee(PEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(zf,{children:[x(Nf,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Bf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(EEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},AEe=ft([u2,z$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Je.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),LEe=({children:e})=>{const t=Xe(),n=Ee(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(AEe),S=()=>{QV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(N4e(P))};return re($n,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Lv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K_,{className:"modal-close-btn"}),re(Av,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(TEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Au,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:P=>t(T4e(P.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(za,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(F$(P.target.checked))}),x(za,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:P=>t(O4e(P.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(za,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(D4e(P.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},MEe=ft(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),OEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(MEe),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s($$())},className:`status ${l}`,children:u})})},IEe=["dark","light","green"];function REe(){const{setColorMode:e}=Hv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(Z8e(i))};return x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(jz,{align:"stretch",children:IEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(F8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const NEe=ft([u2],e=>{const{isProcessing:t,model_list:n}=e,r=Je.map(n,(o,a)=>a),i=Je.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),DEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(NEe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Au,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(X$(o.target.value))}})})},zEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(OEe,{}),x(DEe,{}),x(kEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(REe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(LEe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(H8,{})})})]})]}),BEe=ft(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),FEe=ft(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),$Ee=()=>{const e=Xe(),t=Ee(BEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(FEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e($$()),e(hw(!n))};return vt("`",()=>{e(hw(!n))},[n]),vt("esc",()=>{e(hw(!1))}),re($n,{children:[n&&x(CH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(U$,{}),onClick:l})})]})};function HEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var WEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function h2(e,t){var n=VEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function VEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=WEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var UEe=[".DS_Store","Thumbs.db"];function GEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return v5(e)&&jEe(e.dataTransfer)?[2,XEe(e.dataTransfer,e.type)]:YEe(e)?[2,qEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,KEe(e)]:[2,[]]})})}function jEe(e){return v5(e)}function YEe(e){return v5(e)&&v5(e.target)}function v5(e){return typeof e=="object"&&e!==null}function qEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function KEe(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return h2(r)})]}})})}function XEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ZEe))]):[3,2];case 1:return r=i.sent(),[2,wO(HV(r))];case 2:return[2,wO(A9(e.files).map(function(o){return h2(o)}))]}})})}function wO(e){return e.filter(function(t){return UEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,PO(n)];if(e.sizen)return[!1,PO(n)]}return[!0,null]}function Pf(e){return e!=null}function hPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function AO(e){e.preventDefault()}function pPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gPe(e){return e.indexOf("Edge/")!==-1}function mPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pPe(e)||gPe(e)}function sl(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function IPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Sk=C.exports.forwardRef(function(e,t){var n=e.children,r=S5(e,wPe),i=ZV(r),o=i.open,a=S5(i,CPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});Sk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:GEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Sk.defaultProps=XV;Sk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var I9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,H=t.validator,$=C.exports.useMemo(function(){return SPe(n)},[n]),j=C.exports.useMemo(function(){return yPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:MO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:MO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(RPe,I9),K=Dw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&vPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(et){J.current&&J.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",AO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",AO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var $e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),He=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[].concat(EPe(Se.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){if(!(y5(Oe)&&!N)){var Xt=et.length,Yt=Xt>0&&hPe({files:et,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:H}),ke=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(et){return $e(et)})},[i,u,$e,N,$,a,o,s,l,H]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=h3(Oe);if(et&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return et&&p&&p(Oe),!1},[p,N]),tt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=et.indexOf(Oe.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,et){var Xt=[],Yt=[];Oe.forEach(function(ke){var Ot=GV(ke,$),Ne=Dw(Ot,2),ut=Ne[0],ln=Ne[1],Nn=jV(ke,a,o),We=Dw(Nn,2),ht=We[0],it=We[1],Nt=H?H(ke):null;if(ut&&ht&&!Nt)Xt.push(ke);else{var Zt=[ln,it];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){Yt.push({file:ke,errors:[fPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,et),Yt.length>0&&S&&S(Yt,et),Xt.length>0&&v&&v(Xt,et)},[Z,s,$,a,o,l,m,v,S,H]),nt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){y5(Oe)&&!N||Ze(et,Oe)}).catch(function(et){return $e(et)}),Z({type:"reset"})},[i,Ze,$e,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(et){return i(et)}).then(function(et){Ze(et,null),Z({type:"closeDialog"})}).catch(function(et){bPe(et)?(V(et),Z({type:"closeDialog"})):xPe(et)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):$e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):$e(et)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,$e,j,s]),xt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),at=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(mPe()?setTimeout(Tt,0):Tt())},[M,Tt]),st=function(et){return r?null:et},gt=function(et){return I?null:st(et)},an=function(et){return R?null:st(et)},Ct=function(et){N&&et.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.role,ke=Oe.onKeyDown,Ot=Oe.onFocus,Ne=Oe.onBlur,ut=Oe.onClick,ln=Oe.onDragEnter,Nn=Oe.onDragOver,We=Oe.onDragLeave,ht=Oe.onDrop,it=S5(Oe,_Pe);return lr(lr(O9({onKeyDown:gt(sl(ke,xt)),onFocus:gt(sl(Ot,Le)),onBlur:gt(sl(Ne,at)),onClick:st(sl(ut,At)),onDragEnter:an(sl(ln,He)),onDragOver:an(sl(Nn,qe)),onDragLeave:an(sl(We,tt)),onDrop:an(sl(ht,nt)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),it)}},[J,xt,Le,at,At,He,qe,tt,nt,I,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.onChange,ke=Oe.onClick,Ot=S5(Oe,kPe),Ne=O9({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:st(sl(Yt,nt)),onClick:st(sl(ke,sn)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Ot)}},[ie,n,s,nt,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:yn,rootRef:J,inputRef:ie,open:st(Tt)})}function RPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},I9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},I9);default:return e}}function MO(){}const NPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Gf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},OO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Cr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(j8(u)):o==="img2img"&&t(d2(u))},DPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Cr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=aV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+` -`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(OO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(OO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(q8.Provider,{value:P,children:re("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(NPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},zPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(Wi(!0))},children:x(H$,{})})},BPe=ft(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FPe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(BPe);return re("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(Wi(!0)),400)},children:x(Y$,{})}),t&&re($n,{children:[x(Z$,{iconButton:!0}),x(Q$,{})]})]})},$Pe=()=>{const e=Xe(),t=Ee(Z6e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(B4e())},[e,n,t])};HEe();const HPe=ft([e=>e.gallery,e=>e.options,e=>e.system,Cr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Je.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),WPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(HPe);return $Pe(),x("div",{className:"App",children:re(DPe,{children:[x(CEe,{}),re("div",{className:"app-content",children:[x(zEe,{}),x(j8e,{})]}),x("div",{className:"app-console",children:x($Ee,{})}),e&&x(zPe,{}),t&&x(FPe,{})]})})};const QV=G2e(FV),VPe=oN({key:"invokeai-style-cache",prepend:!0});Bw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:FV,children:x($V,{loading:x(xEe,{}),persistor:QV,children:x(aJ,{value:VPe,children:x(Zme,{children:x(WPe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index fcc162c748..37797115a3 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ InvokeAI - A Stable Diffusion Toolkit - + From 9f1c1cf2e6155a285b9e4486a8eaae63e88a7d5c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 20:21:48 +1100 Subject: [PATCH 190/220] Adds color picker --- .../features/canvas/components/IAICanvas.tsx | 4 +- .../components/IAICanvasBrushPreview.tsx | 120 ------------ .../components/IAICanvasToolPreview.tsx | 185 ++++++++++++++++++ .../IAICanvasToolChooserOptions.tsx | 30 ++- .../canvas/hooks/useCanvasMouseDown.ts | 14 +- .../canvas/hooks/useCanvasMouseMove.ts | 13 +- .../canvas/hooks/useColorUnderCursor.ts | 45 +++++ .../src/features/canvas/store/canvasSlice.ts | 12 +- .../src/features/canvas/store/canvasTypes.ts | 3 +- .../src/features/canvas/util/constants.ts | 2 + .../components/HotkeysModal/HotkeysModal.tsx | 13 +- 11 files changed, 309 insertions(+), 132 deletions(-) delete mode 100644 frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx create mode 100644 frontend/src/features/canvas/components/IAICanvasToolPreview.tsx create mode 100644 frontend/src/features/canvas/hooks/useColorUnderCursor.ts diff --git a/frontend/src/features/canvas/components/IAICanvas.tsx b/frontend/src/features/canvas/components/IAICanvas.tsx index cf8dd6e0ff..f6d0ed215c 100644 --- a/frontend/src/features/canvas/components/IAICanvas.tsx +++ b/frontend/src/features/canvas/components/IAICanvas.tsx @@ -7,7 +7,7 @@ import { isStagingSelector, } from 'features/canvas/store/canvasSelectors'; import IAICanvasMaskLines from './IAICanvasMaskLines'; -import IAICanvasBrushPreview from './IAICanvasBrushPreview'; +import IAICanvasToolPreview from './IAICanvasToolPreview'; import { Vector2d } from 'konva/lib/types'; import IAICanvasBoundingBox from './IAICanvasToolbar/IAICanvasBoundingBox'; import useCanvasHotkeys from '../hooks/useCanvasHotkeys'; @@ -183,7 +183,7 @@ const IAICanvas = () => { {!isStaging && ( - diff --git a/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx b/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx deleted file mode 100644 index 05599a1ad2..0000000000 --- a/frontend/src/features/canvas/components/IAICanvasBrushPreview.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { createSelector } from '@reduxjs/toolkit'; -import { GroupConfig } from 'konva/lib/Group'; -import _ from 'lodash'; -import { Circle, Group } from 'react-konva'; -import { useAppSelector } from 'app/store'; -import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import { rgbaColorToString } from 'features/canvas/util/colorToString'; - -const canvasBrushPreviewSelector = createSelector( - canvasSelector, - (canvas) => { - const { - cursorPosition, - stageDimensions: { width, height }, - brushSize, - maskColor, - brushColor, - tool, - layer, - shouldShowBrush, - isMovingBoundingBox, - isTransformingBoundingBox, - stageScale, - } = canvas; - - return { - cursorPosition, - width, - height, - radius: brushSize / 2, - brushColorString: rgbaColorToString( - layer === 'mask' ? { ...maskColor, a: 0.5 } : brushColor - ), - tool, - shouldShowBrush, - shouldDrawBrushPreview: - !( - isMovingBoundingBox || - isTransformingBoundingBox || - !cursorPosition - ) && shouldShowBrush, - strokeWidth: 1.5 / stageScale, - dotRadius: 1.5 / stageScale, - }; - }, - { - memoizeOptions: { - resultEqualityCheck: _.isEqual, - }, - } -); - -/** - * Draws a black circle around the canvas brush preview. - */ -const IAICanvasBrushPreview = (props: GroupConfig) => { - const { ...rest } = props; - const { - cursorPosition, - width, - height, - radius, - brushColorString, - tool, - shouldDrawBrushPreview, - dotRadius, - strokeWidth, - } = useAppSelector(canvasBrushPreviewSelector); - - if (!shouldDrawBrushPreview) return null; - - return ( - - - - - - - - ); -}; - -export default IAICanvasBrushPreview; diff --git a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx new file mode 100644 index 0000000000..34924f8966 --- /dev/null +++ b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx @@ -0,0 +1,185 @@ +import { createSelector } from '@reduxjs/toolkit'; +import { GroupConfig } from 'konva/lib/Group'; +import _ from 'lodash'; +import { Circle, Group, Rect } from 'react-konva'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { rgbaColorToString } from 'features/canvas/util/colorToString'; +import { COLOR_PICKER_SIZE } from '../util/constants'; + +const canvasBrushPreviewSelector = createSelector( + canvasSelector, + (canvas) => { + const { + cursorPosition, + stageDimensions: { width, height }, + brushSize, + colorPickerColor, + maskColor, + brushColor, + tool, + layer, + shouldShowBrush, + isMovingBoundingBox, + isTransformingBoundingBox, + stageScale, + } = canvas; + + let fill = ''; + + if (layer === 'mask') { + fill = rgbaColorToString({ ...maskColor, a: 0.5 }); + } else if (tool === 'colorPicker') { + fill = rgbaColorToString(colorPickerColor); + } else { + fill = rgbaColorToString(brushColor); + } + + return { + cursorPosition, + width, + height, + radius: brushSize / 2, + colorPickerSize: COLOR_PICKER_SIZE / stageScale, + colorPickerOffset: COLOR_PICKER_SIZE / 2 / stageScale, + colorPickerCornerRadius: COLOR_PICKER_SIZE / 5 / stageScale, + brushColorString: fill, + tool, + shouldShowBrush, + shouldDrawBrushPreview: + !( + isMovingBoundingBox || + isTransformingBoundingBox || + !cursorPosition + ) && shouldShowBrush, + strokeWidth: 1.5 / stageScale, + dotRadius: 1.5 / stageScale, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +/** + * Draws a black circle around the canvas brush preview. + */ +const IAICanvasToolPreview = (props: GroupConfig) => { + const { ...rest } = props; + const { + cursorPosition, + width, + height, + radius, + brushColorString, + tool, + shouldDrawBrushPreview, + dotRadius, + strokeWidth, + colorPickerSize, + colorPickerOffset, + colorPickerCornerRadius, + } = useAppSelector(canvasBrushPreviewSelector); + + if (!shouldDrawBrushPreview) return null; + + return ( + + {tool === 'colorPicker' ? ( + <> + + + + + ) : ( + <> + + + + + )} + + + + ); +}; + +export default IAICanvasToolPreview; diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx index cd53ebb5a8..f32fcf04d3 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx @@ -8,7 +8,12 @@ import { import { useAppDispatch, useAppSelector } from 'app/store'; import _ from 'lodash'; import IAIIconButton from 'common/components/IAIIconButton'; -import { FaEraser, FaPaintBrush, FaSlidersH } from 'react-icons/fa'; +import { + FaEraser, + FaEyeDropper, + FaPaintBrush, + FaSlidersH, +} from 'react-icons/fa'; import { canvasSelector, isStagingSelector, @@ -68,6 +73,18 @@ const IAICanvasToolChooserOptions = () => { [tool] ); + useHotkeys( + ['c'], + () => { + handleSelectColorPickerTool(); + }, + { + enabled: () => true, + preventDefault: true, + }, + [tool] + ); + useHotkeys( ['['], () => { @@ -94,6 +111,7 @@ const IAICanvasToolChooserOptions = () => { const handleSelectBrushTool = () => dispatch(setTool('brush')); const handleSelectEraserTool = () => dispatch(setTool('eraser')); + const handleSelectColorPickerTool = () => dispatch(setTool('colorPicker')); return ( @@ -111,7 +129,15 @@ const IAICanvasToolChooserOptions = () => { icon={} data-selected={tool === 'eraser' && !isStaging} isDisabled={isStaging} - onClick={() => dispatch(setTool('eraser'))} + onClick={handleSelectEraserTool} + /> + } + data-selected={tool === 'colorPicker' && !isStaging} + isDisabled={isStaging} + onClick={handleSelectColorPickerTool} /> ) => { const dispatch = useAppDispatch(); const { tool, isStaging } = useAppSelector(selector); + const { commitColorUnderCursor } = useColorPicker(); return useCallback( (e: KonvaEventObject) => { @@ -41,6 +48,11 @@ const useCanvasMouseDown = (stageRef: MutableRefObject) => { return; } + if (tool === 'colorPicker') { + commitColorUnderCursor(); + return; + } + const scaledCursorPosition = getScaledCursorPosition(stageRef.current); if (!scaledCursorPosition) return; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts index 02749cf7d3..ae42ca90a6 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseMove.ts @@ -5,12 +5,16 @@ import Konva from 'konva'; import { Vector2d } from 'konva/lib/types'; import _ from 'lodash'; import { MutableRefObject, useCallback } from 'react'; -import { canvasSelector, isStagingSelector } from 'features/canvas/store/canvasSelectors'; +import { + canvasSelector, + isStagingSelector, +} from 'features/canvas/store/canvasSelectors'; import { addPointToCurrentLine, setCursorPosition, } from 'features/canvas/store/canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; +import useColorPicker from './useColorUnderCursor'; const selector = createSelector( [activeTabNameSelector, canvasSelector, isStagingSelector], @@ -33,6 +37,7 @@ const useCanvasMouseMove = ( ) => { const dispatch = useAppDispatch(); const { isDrawing, tool, isStaging } = useAppSelector(selector); + const { updateColorUnderCursor } = useColorPicker(); return useCallback(() => { if (!stageRef.current) return; @@ -45,6 +50,11 @@ const useCanvasMouseMove = ( lastCursorPositionRef.current = scaledCursorPosition; + if (tool === 'colorPicker') { + updateColorUnderCursor(); + return; + } + if (!isDrawing || tool === 'move' || isStaging) return; didMouseMoveRef.current = true; @@ -59,6 +69,7 @@ const useCanvasMouseMove = ( lastCursorPositionRef, stageRef, tool, + updateColorUnderCursor, ]); }; diff --git a/frontend/src/features/canvas/hooks/useColorUnderCursor.ts b/frontend/src/features/canvas/hooks/useColorUnderCursor.ts new file mode 100644 index 0000000000..4739070e13 --- /dev/null +++ b/frontend/src/features/canvas/hooks/useColorUnderCursor.ts @@ -0,0 +1,45 @@ +import { useAppDispatch } from 'app/store'; +import Konva from 'konva'; +import _ from 'lodash'; +import { + commitColorPickerColor, + setColorPickerColor, +} from '../store/canvasSlice'; +import { + getCanvasBaseLayer, + getCanvasStage, +} from '../util/konvaInstanceProvider'; + +const useColorPicker = () => { + const dispatch = useAppDispatch(); + const canvasBaseLayer = getCanvasBaseLayer(); + const stage = getCanvasStage(); + + return { + updateColorUnderCursor: () => { + if (!stage || !canvasBaseLayer) return; + + const position = stage.getPointerPosition(); + + if (!position) return; + + const pixelRatio = Konva.pixelRatio; + + const [r, g, b, a] = canvasBaseLayer + .getContext() + .getImageData( + position.x * pixelRatio, + position.y * pixelRatio, + 1, + 1 + ).data; + + dispatch(setColorPickerColor({ r, g, b, a })); + }, + commitColorUnderCursor: () => { + dispatch(commitColorPickerColor()); + }, + }; +}; + +export default useColorPicker; diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index de7c0b911a..f71083ae17 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -44,6 +44,7 @@ const initialCanvasState: CanvasState = { brushColor: { r: 90, g: 90, b: 255, a: 1 }, brushSize: 50, canvasContainerDimensions: { width: 0, height: 0 }, + colorPickerColor: { r: 90, g: 90, b: 255, a: 1 }, cursorPosition: null, doesCanvasNeedScaling: false, futureLayerStates: [], @@ -345,7 +346,7 @@ export const canvasSlice = createSlice({ addLine: (state, action: PayloadAction) => { const { tool, layer, brushColor, brushSize } = state; - if (tool === 'move') return; + if (tool === 'move' || tool === 'colorPicker') return; const newStrokeWidth = brushSize / 2; @@ -683,6 +684,13 @@ export const canvasSlice = createSlice({ ) => { state.shouldCropToBoundingBoxOnSave = action.payload; }, + setColorPickerColor: (state, action: PayloadAction) => { + state.colorPickerColor = action.payload; + }, + commitColorPickerColor: (state) => { + state.brushColor = state.colorPickerColor; + state.tool = 'brush'; + }, setMergedCanvas: (state, action: PayloadAction) => { state.pastLayerStates.push({ ...state.layerState, @@ -710,6 +718,8 @@ export const { addLine, addPointToCurrentLine, clearMask, + commitColorPickerColor, + setColorPickerColor, commitStagingAreaImage, discardStagedImages, fitBoundingBoxToStage, diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index ef28101d75..fae2d6f6a8 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -13,7 +13,7 @@ export type CanvasLayer = typeof LAYER_NAMES[number]; export type CanvasDrawingTool = 'brush' | 'eraser'; -export type CanvasTool = CanvasDrawingTool | 'move'; +export type CanvasTool = CanvasDrawingTool | 'move' | 'colorPicker'; export type Dimensions = { width: number; @@ -81,6 +81,7 @@ export interface CanvasState { brushColor: RgbaColor; brushSize: number; canvasContainerDimensions: Dimensions; + colorPickerColor: RgbaColor, cursorPosition: Vector2d | null; doesCanvasNeedScaling: boolean; futureLayerStates: CanvasLayerState[]; diff --git a/frontend/src/features/canvas/util/constants.ts b/frontend/src/features/canvas/util/constants.ts index 10b27c82d1..4f9662e1be 100644 --- a/frontend/src/features/canvas/util/constants.ts +++ b/frontend/src/features/canvas/util/constants.ts @@ -12,3 +12,5 @@ export const MAX_CANVAS_SCALE = 20; // padding given to initial image/bounding box when stage view is reset export const STAGE_PADDING_PERCENTAGE = 0.95; + +export const COLOR_PICKER_SIZE = 60; diff --git a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx index a9858427f6..d500cc06ab 100644 --- a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -140,22 +140,22 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { const unifiedCanvasHotkeys = [ { title: 'Select Brush', - desc: 'Selects the inpainting brush', + desc: 'Selects the canvas brush', hotkey: 'B', }, { title: 'Select Eraser', - desc: 'Selects the inpainting eraser', + desc: 'Selects the canvas eraser', hotkey: 'E', }, { title: 'Decrease Brush Size', - desc: 'Decreases the size of the inpainting brush/eraser', + desc: 'Decreases the size of the canvas brush/eraser', hotkey: '[', }, { title: 'Increase Brush Size', - desc: 'Increases the size of the inpainting brush/eraser', + desc: 'Increases the size of the canvas brush/eraser', hotkey: ']', }, { @@ -163,6 +163,11 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Allows canvas navigation', hotkey: 'V', }, + { + title: 'Select Color Picker', + desc: 'Selects the canvas color picker', + hotkey: 'C', + }, { title: 'Quick Toggle Move', desc: 'Temporarily toggles Move mode', From 8d0ef022eb61d13668a13f4055d50df6fb47ceb4 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 20:41:39 +1100 Subject: [PATCH 191/220] Lints & builds fresh bundle --- frontend/dist/assets/index.5139e98d.js | 623 ++++++++++++++++++ frontend/dist/assets/index.8659b949.js | 623 ------------------ frontend/dist/index.html | 2 +- .../components/IAICanvasToolPreview.tsx | 2 +- .../canvas/hooks/useCanvasMouseDown.ts | 4 +- .../ImageToImage/ImageToImagePanel.tsx | 6 - .../TextToImage/TextToImagePanel.tsx | 6 - 7 files changed, 626 insertions(+), 640 deletions(-) create mode 100644 frontend/dist/assets/index.5139e98d.js delete mode 100644 frontend/dist/assets/index.8659b949.js diff --git a/frontend/dist/assets/index.5139e98d.js b/frontend/dist/assets/index.5139e98d.js new file mode 100644 index 0000000000..7319c5a796 --- /dev/null +++ b/frontend/dist/assets/index.5139e98d.js @@ -0,0 +1,623 @@ +function Yq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function K7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Uv=Symbol.for("react.element"),qq=Symbol.for("react.portal"),Kq=Symbol.for("react.fragment"),Xq=Symbol.for("react.strict_mode"),Zq=Symbol.for("react.profiler"),Qq=Symbol.for("react.provider"),Jq=Symbol.for("react.context"),eK=Symbol.for("react.forward_ref"),tK=Symbol.for("react.suspense"),nK=Symbol.for("react.memo"),rK=Symbol.for("react.lazy"),EE=Symbol.iterator;function iK(e){return e===null||typeof e!="object"?null:(e=EE&&e[EE]||e["@@iterator"],typeof e=="function"?e:null)}var KI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},XI=Object.assign,ZI={};function o1(e,t,n){this.props=e,this.context=t,this.refs=ZI,this.updater=n||KI}o1.prototype.isReactComponent={};o1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};o1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QI(){}QI.prototype=o1.prototype;function X7(e,t,n){this.props=e,this.context=t,this.refs=ZI,this.updater=n||KI}var Z7=X7.prototype=new QI;Z7.constructor=X7;XI(Z7,o1.prototype);Z7.isPureReactComponent=!0;var PE=Array.isArray,JI=Object.prototype.hasOwnProperty,Q7={current:null},eO={key:!0,ref:!0,__self:!0,__source:!0};function tO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)JI.call(t,r)&&!eO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Me=G[me];if(0>>1;mei(Ie,ce))Wei(De,Ie)?(G[me]=De,G[We]=ce,me=We):(G[me]=Ie,G[be]=ce,me=be);else if(Wei(De,ce))G[me]=De,G[We]=ce,me=We;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!b)if(n(l)!==null)b=!0,ee(O);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function O(G,X){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Me=me(g.expirationTime<=X);X=e.unstable_now(),typeof Me=="function"?g.callback=Me:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var be=n(u);be!==null&&K(M,be.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var R=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Me,t(l,G),b||v||(b=!0,ee(O))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(nO);(function(e){e.exports=nO})(u0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var rO=C.exports,da=u0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),e6=Object.prototype.hasOwnProperty,uK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,LE={},AE={};function cK(e){return e6.call(AE,e)?!0:e6.call(LE,e)?!1:uK.test(e)?AE[e]=!0:(LE[e]=!0,!1)}function dK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function fK(e,t,n,r){if(t===null||typeof t>"u"||dK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var e9=/[\-:]([a-z])/g;function t9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(e9,t9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(e9,t9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(e9,t9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function n9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{tx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?im(e):""}function hK(e){switch(e.tag){case 5:return im(e.type);case 16:return im("Lazy");case 13:return im("Suspense");case 19:return im("SuspenseList");case 0:case 2:case 15:return e=nx(e.type,!1),e;case 11:return e=nx(e.type.render,!1),e;case 1:return e=nx(e.type,!0),e;default:return""}}function i6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case t6:return"Profiler";case r9:return"StrictMode";case n6:return"Suspense";case r6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aO:return(e.displayName||"Context")+".Consumer";case oO:return(e._context.displayName||"Context")+".Provider";case i9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case o9:return t=e.displayName||null,t!==null?t:i6(e.type)||"Memo";case Oc:t=e._payload,e=e._init;try{return i6(e(t))}catch{}}return null}function pK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return i6(t);case 8:return t===r9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ld(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gK(e){var t=lO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cy(e){e._valueTracker||(e._valueTracker=gK(e))}function uO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function d5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function o6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function IE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ld(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cO(e,t){t=t.checked,t!=null&&n9(e,"checked",t,!1)}function a6(e,t){cO(e,t);var n=ld(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?s6(e,t.type,n):t.hasOwnProperty("defaultValue")&&s6(e,t.type,ld(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function OE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function s6(e,t,n){(t!=="number"||d5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var om=Array.isArray;function c0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=dy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ev(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mK=["Webkit","ms","Moz","O"];Object.keys(Cm).forEach(function(e){mK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cm[t]=Cm[e]})});function pO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cm.hasOwnProperty(e)&&Cm[e]?(""+t).trim():t+"px"}function gO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=pO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function c6(e,t){if(t){if(vK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function d6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var f6=null;function a9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var h6=null,d0=null,f0=null;function DE(e){if(e=Yv(e)){if(typeof h6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=I4(t),h6(e.stateNode,e.type,t))}}function mO(e){d0?f0?f0.push(e):f0=[e]:d0=e}function vO(){if(d0){var e=d0,t=f0;if(f0=d0=null,DE(e),t)for(e=0;e>>=0,e===0?32:31-(TK(e)/LK|0)|0}var fy=64,hy=4194304;function am(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function g5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=am(s):(o&=a,o!==0&&(r=am(o)))}else a=n&~i,a!==0?r=am(a):o!==0&&(r=am(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Gv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cs(t),e[t]=n}function OK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=km),GE=String.fromCharCode(32),jE=!1;function zO(e,t){switch(e){case"keyup":return sX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function uX(e,t){switch(e){case"compositionend":return BO(t);case"keypress":return t.which!==32?null:(jE=!0,GE);case"textInput":return e=t.data,e===GE&&jE?null:e;default:return null}}function cX(e,t){if(Gp)return e==="compositionend"||!p9&&zO(e,t)?(e=NO(),k3=d9=Hc=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=XE(n)}}function WO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function VO(){for(var e=window,t=d5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=d5(e.document)}return t}function g9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bX(e){var t=VO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&WO(n.ownerDocument.documentElement,n)){if(r!==null&&g9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ZE(n,o);var a=ZE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,b6=null,Pm=null,S6=!1;function QE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;S6||jp==null||jp!==d5(r)||(r=jp,"selectionStart"in r&&g9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pm&&av(Pm,r)||(Pm=r,r=y5(b6,"onSelect"),0Kp||(e.current=E6[Kp],E6[Kp]=null,Kp--)}function qn(e,t){Kp++,E6[Kp]=e.current,e.current=t}var ud={},Wi=yd(ud),Ao=yd(!1),nh=ud;function B0(e,t){var n=e.type.contextTypes;if(!n)return ud;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function S5(){Qn(Ao),Qn(Wi)}function oP(e,t,n){if(Wi.current!==ud)throw Error(Re(168));qn(Wi,t),qn(Ao,n)}function QO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,pK(e)||"Unknown",i));return hr({},n,r)}function x5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ud,nh=Wi.current,qn(Wi,e),qn(Ao,Ao.current),!0}function aP(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=QO(e,t,nh),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Wi),qn(Wi,e)):Qn(Ao),qn(Ao,n)}var fu=null,O4=!1,mx=!1;function JO(e){fu===null?fu=[e]:fu.push(e)}function MX(e){O4=!0,JO(e)}function bd(){if(!mx&&fu!==null){mx=!0;var e=0,t=Tn;try{var n=fu;for(Tn=1;e>=a,i-=a,pu=1<<32-Cs(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),R===null?O=$:R.sibling=$,R=$,N=V}if(z===T.length)return n(P,N),ir&&_f(P,z),O;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),R===null?O=j:R.sibling=j,R=j,N=V}if($.done)return n(P,N),ir&&_f(P,z),O;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return ir&&_f(P,z),O}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return e&&N.forEach(function(ue){return t(P,ue)}),ir&&_f(P,z),O}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case uy:e:{for(var O=T.key,R=k;R!==null;){if(R.key===O){if(O=T.type,O===Up){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Oc&&hP(O)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=zg(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Up?(k=Yf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=zg(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=_x(T,P.mode,M),k.return=P,P=k}return a(P);case Oc:return R=T._init,E(P,k,R(T._payload),M)}if(om(T))return b(P,k,T,M);if(Ig(T))return w(P,k,T,M);Sy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=Cx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var $0=sR(!0),lR=sR(!1),qv={},Cl=yd(qv),cv=yd(qv),dv=yd(qv);function zf(e){if(e===qv)throw Error(Re(174));return e}function _9(e,t){switch(qn(dv,t),qn(cv,e),qn(Cl,qv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:u6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=u6(t,e)}Qn(Cl),qn(Cl,t)}function H0(){Qn(Cl),Qn(cv),Qn(dv)}function uR(e){zf(dv.current);var t=zf(Cl.current),n=u6(t,e.type);t!==n&&(qn(cv,e),qn(Cl,n))}function k9(e){cv.current===e&&(Qn(Cl),Qn(cv))}var cr=yd(0);function P5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vx=[];function E9(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{Tn=n,yx.transition=r}}function kR(){return Ha().memoizedState}function NX(e,t,n){var r=ed(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ER(e))PR(t,n);else if(n=rR(e,t,n,r),n!==null){var i=ro();_s(n,e,r,i),TR(n,t,r)}}function DX(e,t,n){var r=ed(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ER(e))PR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,w9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=rR(e,t,i,r),n!==null&&(i=ro(),_s(n,e,r,i),TR(n,t,r))}}function ER(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function PR(e,t){Tm=T5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function TR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,l9(e,n)}}var L5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},zX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:gP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,L3(4194308,4,SR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return L3(4194308,4,e,t)},useInsertionEffect:function(e,t){return L3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=NX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:pP,useDebugValue:M9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=pP(!1),t=e[0];return e=RX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),hi===null)throw Error(Re(349));(ih&30)!==0||fR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gP(pR.bind(null,r,o,e),[e]),r.flags|=2048,pv(9,hR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=gu,r=pu;n=(r&~(1<<32-Cs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ml]=t,e[uv]=r,zR(e,t,!1,!1),t.stateNode=e;e:{switch(a=d6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;iV0&&(t.flags|=128,r=!0,Bg(o,!1),t.lanes=4194304)}else{if(!r)if(e=P5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Rr()-o.renderingStartTime>V0&&n!==1073741824&&(t.flags|=128,r=!0,Bg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return z9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function GX(e,t){switch(v9(t),t.tag){case 1:return Mo(t.type)&&S5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return H0(),Qn(Ao),Qn(Wi),E9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return k9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));F0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return H0(),null;case 10:return x9(t.type._context),null;case 22:case 23:return z9(),null;case 24:return null;default:return null}}var wy=!1,Hi=!1,jX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function B6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var _P=!1;function YX(e,t){if(x6=m5,e=VO(),g9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(w6={focusedElem:e,selectionRange:n},m5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return b=_P,_P=!1,b}function Lm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&B6(t,n,o)}i=i.next}while(i!==r)}}function D4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function F6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $R(e){var t=e.alternate;t!==null&&(e.alternate=null,$R(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ml],delete t[uv],delete t[k6],delete t[LX],delete t[AX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function HR(e){return e.tag===5||e.tag===3||e.tag===4}function kP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||HR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for($6(e,t,n),e=e.sibling;e!==null;)$6(e,t,n),e=e.sibling}function H6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(H6(e,t,n),e=e.sibling;e!==null;)H6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function Ec(e,t,n){for(n=n.child;n!==null;)WR(e,t,n),n=n.sibling}function WR(e,t,n){if(wl&&typeof wl.onCommitFiberUnmount=="function")try{wl.onCommitFiberUnmount(T4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,Ec(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?gx(e.parentNode,n):e.nodeType===1&&gx(e,n),iv(e)):gx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,Ec(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&B6(n,t,a),i=i.next}while(i!==r)}Ec(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}Ec(e,t,n);break;case 21:Ec(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Ec(e,t,n),Hi=r):Ec(e,t,n);break;default:Ec(e,t,n)}}function EP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jX),t.forEach(function(r){var i=nZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KX(r/1960))-r,10e?16:e,Wc===null)var r=!1;else{if(e=Wc,Wc=null,I5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-N9?jf(e,0):R9|=n),Io(e,t)}function XR(e,t){t===0&&((e.mode&1)===0?t=1:(t=hy,hy<<=1,(hy&130023424)===0&&(hy=4194304)));var n=ro();e=wu(e,t),e!==null&&(Gv(e,t,n),Io(e,n))}function tZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),XR(e,n)}function nZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),XR(e,n)}var ZR;ZR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,VX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&eR(t,C5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;A3(e,t),e=t.pendingProps;var i=B0(t,Wi.current);p0(t,n),i=T9(null,t,r,e,i,n);var o=L9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,x5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C9(t),i.updater=R4,t.stateNode=i,i._reactInternals=t,M6(t,r,e,n),t=R6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&m9(t),Ji(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(A3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=iZ(r),e=gs(r,e),i){case 0:t=O6(null,t,r,e,n);break e;case 1:t=xP(null,t,r,e,n);break e;case 11:t=bP(null,t,r,e,n);break e;case 14:t=SP(null,t,r,gs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),O6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),xP(e,t,r,i,n);case 3:e:{if(RR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,iR(e,t),E5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=W0(Error(Re(423)),t),t=wP(e,t,r,n,i);break e}else if(r!==i){i=W0(Error(Re(424)),t),t=wP(e,t,r,n,i);break e}else for(aa=Zc(t.stateNode.containerInfo.firstChild),sa=t,ir=!0,ys=null,n=lR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(F0(),r===i){t=Cu(e,t,n);break e}Ji(e,t,r,n)}t=t.child}return t;case 5:return uR(t),e===null&&T6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,C6(r,i)?a=null:o!==null&&C6(r,o)&&(t.flags|=32),OR(e,t),Ji(e,t,a,n),t.child;case 6:return e===null&&T6(t),null;case 13:return NR(e,t,n);case 4:return _9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$0(t,null,r,n):Ji(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),bP(e,t,r,i,n);case 7:return Ji(e,t,t.pendingProps,n),t.child;case 8:return Ji(e,t,t.pendingProps.children,n),t.child;case 12:return Ji(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(_5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=vu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),L6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),L6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ji(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,p0(t,n),i=$a(i),r=r(i),t.flags|=1,Ji(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),SP(e,t,r,i,n);case 15:return MR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),A3(e,t),t.tag=1,Mo(r)?(e=!0,x5(t)):e=!1,p0(t,n),aR(t,r,i),M6(t,r,i,n),R6(null,t,r,!0,e,n);case 19:return DR(e,t,n);case 22:return IR(e,t,n)}throw Error(Re(156,t.tag))};function QR(e,t){return _O(e,t)}function rZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new rZ(e,t,n,r)}function F9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function iZ(e){if(typeof e=="function")return F9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i9)return 11;if(e===o9)return 14}return 2}function td(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")F9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return Yf(n.children,i,o,t);case r9:a=8,i|=8;break;case t6:return e=Na(12,n,t,i|2),e.elementType=t6,e.lanes=o,e;case n6:return e=Na(13,n,t,i),e.elementType=n6,e.lanes=o,e;case r6:return e=Na(19,n,t,i),e.elementType=r6,e.lanes=o,e;case sO:return B4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oO:a=10;break e;case aO:a=9;break e;case i9:a=11;break e;case o9:a=14;break e;case Oc:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Yf(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function B4(e,t,n,r){return e=Na(22,e,r,t),e.elementType=sO,e.lanes=n,e.stateNode={isHidden:!1},e}function Cx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function _x(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ix(0),this.expirationTimes=ix(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ix(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $9(e,t,n,r,i,o,a,s,l){return e=new oZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},C9(o),e}function aZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Dl);const ky=K7(Dl.exports);var RP=Dl.exports;Jw.createRoot=RP.createRoot,Jw.hydrateRoot=RP.hydrateRoot;var ks=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,V4={exports:{}},U4={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var dZ=C.exports,fZ=Symbol.for("react.element"),hZ=Symbol.for("react.fragment"),pZ=Object.prototype.hasOwnProperty,gZ=dZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,mZ={key:!0,ref:!0,__self:!0,__source:!0};function nN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)pZ.call(t,r)&&!mZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:fZ,type:e,key:o,ref:a,props:i,_owner:gZ.current}}U4.Fragment=hZ;U4.jsx=nN;U4.jsxs=nN;(function(e){e.exports=U4})(V4);const Ln=V4.exports.Fragment,x=V4.exports.jsx,J=V4.exports.jsxs;var U9=C.exports.createContext({});U9.displayName="ColorModeContext";function Kv(){const e=C.exports.useContext(U9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Ey={light:"chakra-ui-light",dark:"chakra-ui-dark"};function vZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Ey.dark:Ey.light),document.body.classList.remove(r?Ey.light:Ey.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var yZ="chakra-ui-color-mode";function bZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var SZ=bZ(yZ),NP=()=>{};function DP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function rN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=SZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>DP(a,s)),[h,g]=C.exports.useState(()=>DP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>vZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const O=M==="system"?m():M;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);ks(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?NP:k,setColorMode:t?NP:P,forced:t!==void 0}),[E,k,P,t]);return x(U9.Provider,{value:T,children:n})}rN.displayName="ColorModeProvider";var j6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",O="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",ue="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",ee="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Me=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[ue]=xe[W]=xe[Q]=xe[ne]=xe[ee]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[O]=xe[R]=xe[z]=!1;var be=typeof bs=="object"&&bs&&bs.Object===Object&&bs,Ie=typeof self=="object"&&self&&self.Object===Object&&self,We=be||Ie||Function("return this")(),De=t&&!t.nodeType&&t,Qe=De&&!0&&e&&!e.nodeType&&e,st=Qe&&Qe.exports===De,Ct=st&&be.process,ht=function(){try{var U=Qe&&Qe.require&&Qe.require("util").types;return U||Ct&&Ct.binding&&Ct.binding("util")}catch{}}(),ut=ht&&ht.isTypedArray;function vt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Ee(U,te){for(var he=-1,Ye=Array(U);++he-1}function T1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Id,Do.prototype.delete=P1,Do.prototype.get=Hu,Do.prototype.has=Od,Do.prototype.set=T1;function Rs(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,yt=zt>2?he[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Rh(he[0],he[1],yt)&&(fn=zt<3?void 0:fn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function ju(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Bd=Vl(function(){return arguments}())?Vl:function(U){return Un(U)&&yn.call(U,"callee")&&!He.call(U,"callee")},jl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!qu(U)}function Nh(U){return Un(U)&&Ht(U)}var Yu=Zt||H1;function qu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==b||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function Fd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=ln(U);if(te===null)return!0;var he=yn.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&sn.call(he)==Xt}var zh=ut?Je(ut):Vu;function $d(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?B1(U,!0):zs(U)}var un=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function H1(){return!1}e.exports=un})(j6,j6.exports);const Sl=j6.exports;function Es(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Bf(e,...t){return xZ(e)?e(...t):e}var xZ=e=>typeof e=="function",wZ=e=>/!(important)?$/.test(e),zP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Y6=(e,t)=>n=>{const r=String(t),i=wZ(r),o=zP(r),a=e?`${e}.${o}`:o;let s=Es(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=zP(s),i?`${s} !important`:s};function mv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Y6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Py=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=mv({scale:e,transform:t}),r}}var CZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function _Z(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:CZ(t),transform:n?mv({scale:n,compose:r}):r}}var iN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function kZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...iN].join(" ")}function EZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...iN].join(" ")}var PZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},TZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function LZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var AZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},oN="& > :not(style) ~ :not(style)",MZ={[oN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},IZ={[oN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},q6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},OZ=new Set(Object.values(q6)),aN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),RZ=e=>e.trim();function NZ(e,t){var n;if(e==null||aN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(RZ).filter(Boolean);if(l?.length===0)return e;const u=s in q6?q6[s]:s;l.unshift(u);const h=l.map(g=>{if(OZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=sN(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var sN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),DZ=(e,t)=>NZ(e,t??{});function zZ(e){return/^var\(--.+\)$/.test(e)}var BZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:PZ},backdropFilter(e){return e!=="auto"?e:TZ},ring(e){return LZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?kZ():e==="auto-gpu"?EZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=BZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(zZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:DZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||sN(e)||aN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=AZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",rn.px),space:ds("space",Py(rn.vh,rn.px)),spaceT:ds("space",Py(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:mv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Py(rn.vh,rn.px)),sizesT:ds("sizes",Py(rn.vh,rn.fraction)),shadows:ds("shadows"),logical:_Z,blur:ds("blur",rn.blur)},R3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(R3,{bgImage:R3.backgroundImage,bgImg:R3.backgroundImage});var pn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var FZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},K6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(K6,{shadow:K6.boxShadow});var $Z={filter:{transform:rn.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",rn.brightness),contrast:ie.propT("--chakra-contrast",rn.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",rn.invert),saturate:ie.propT("--chakra-saturate",rn.saturate),dropShadow:ie.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",rn.saturate)},N5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:MZ,transform:mv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:IZ,transform:mv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(N5,{flexDir:N5.flexDirection});var lN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},HZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},La={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(La,{w:La.width,h:La.height,minW:La.minWidth,maxW:La.maxWidth,minH:La.minHeight,maxH:La.maxHeight,overscroll:La.overscrollBehavior,overscrollX:La.overscrollBehaviorX,overscrollY:La.overscrollBehaviorY});var WZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function VZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},GZ=UZ(VZ),jZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},YZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},kx=(e,t,n)=>{const r={},i=GZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},qZ={srOnly:{transform(e){return e===!0?jZ:e==="focusable"?YZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>kx(t,e,n)}},Im={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Im,{insetStart:Im.insetInlineStart,insetEnd:Im.insetInlineEnd});var KZ={ring:{transform:rn.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var XZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},ZZ={clipPath:!0,transform:ie.propT("transform",rn.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},QZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},JZ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",rn.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},eQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function uN(e){return Es(e)&&e.reference?e.reference:String(e)}var G4=(e,...t)=>t.map(uN).join(` ${e} `).replace(/calc/g,""),BP=(...e)=>`calc(${G4("+",...e)})`,FP=(...e)=>`calc(${G4("-",...e)})`,X6=(...e)=>`calc(${G4("*",...e)})`,$P=(...e)=>`calc(${G4("/",...e)})`,HP=e=>{const t=uN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:X6(t,-1)},Mf=Object.assign(e=>({add:(...t)=>Mf(BP(e,...t)),subtract:(...t)=>Mf(FP(e,...t)),multiply:(...t)=>Mf(X6(e,...t)),divide:(...t)=>Mf($P(e,...t)),negate:()=>Mf(HP(e)),toString:()=>e.toString()}),{add:BP,subtract:FP,multiply:X6,divide:$P,negate:HP});function tQ(e,t="-"){return e.replace(/\s+/g,t)}function nQ(e){const t=tQ(e.toString());return iQ(rQ(t))}function rQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function iQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function oQ(e,t=""){return[t,e].filter(Boolean).join("-")}function aQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function sQ(e,t=""){return nQ(`--${oQ(e,t)}`)}function Dn(e,t,n){const r=sQ(e,n);return{variable:r,reference:aQ(r,t)}}function lQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function uQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Z6(e){if(e==null)return e;const{unitless:t}=uQ(e);return t||typeof e=="number"?`${e}px`:e}var cN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,G9=e=>Object.fromEntries(Object.entries(e).sort(cN));function WP(e){const t=G9(e);return Object.assign(Object.values(t),t)}function cQ(e){const t=Object.keys(G9(e));return new Set(t)}function VP(e){if(!e)return e;e=Z6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function lm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Z6(e)})`),t&&n.push("and",`(max-width: ${Z6(t)})`),n.join(" ")}function dQ(e){if(!e)return null;e.base=e.base??"0px";const t=WP(e),n=Object.entries(e).sort(cN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?VP(u):void 0,{_minW:VP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:lm(null,u),minWQuery:lm(a),minMaxQuery:lm(a,u)}}),r=cQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:G9(e),asArray:WP(e),details:n,media:[null,...t.map(o=>lm(o)).slice(1)],toArrayValue(o){if(!Es(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;lQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Pc=e=>dN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),au=e=>dN(t=>e(t,"~ &"),"[data-peer]",".peer"),dN=(e,...t)=>t.map(e).join(", "),j4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Pc(ki.hover),_peerHover:au(ki.hover),_groupFocus:Pc(ki.focus),_peerFocus:au(ki.focus),_groupFocusVisible:Pc(ki.focusVisible),_peerFocusVisible:au(ki.focusVisible),_groupActive:Pc(ki.active),_peerActive:au(ki.active),_groupDisabled:Pc(ki.disabled),_peerDisabled:au(ki.disabled),_groupInvalid:Pc(ki.invalid),_peerInvalid:au(ki.invalid),_groupChecked:Pc(ki.checked),_peerChecked:au(ki.checked),_groupFocusWithin:Pc(ki.focusWithin),_peerFocusWithin:au(ki.focusWithin),_peerPlaceholderShown:au(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},fQ=Object.keys(j4);function UP(e,t){return Dn(String(e).replace(/\./g,"-"),void 0,t)}function hQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=UP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=Mf.negate(s),P=Mf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=UP(b,t?.cssVarPrefix);return E},g=Es(s)?s:{default:s};n=Sl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=j4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function pQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function gQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var mQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function vQ(e){return gQ(e,mQ)}function yQ(e){return e.semanticTokens}function bQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function SQ({tokens:e,semanticTokens:t}){const n=Object.entries(Q6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Q6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Q6(e,t=1/0){return!Es(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Es(i)||Array.isArray(i)?Object.entries(Q6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function xQ(e){var t;const n=bQ(e),r=vQ(n),i=yQ(n),o=SQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=hQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:dQ(n.breakpoints)}),n}var j9=Sl({},R3,pn,FZ,N5,La,$Z,KZ,HZ,lN,qZ,Im,K6,Zn,eQ,JZ,XZ,ZZ,WZ,QZ),wQ=Object.assign({},Zn,La,N5,lN,Im),CQ=Object.keys(wQ),_Q=[...Object.keys(j9),...fQ],kQ={...j9,...j4},EQ=e=>e in kQ,PQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Bf(e[a],t);if(s==null)continue;if(s=Es(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!LQ(t),MQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=TQ(t);return t=n(i)??r(o)??r(t),t};function IQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Bf(o,r),u=PQ(l)(r);let h={};for(let g in u){const m=u[g];let v=Bf(m,r);g in n&&(g=n[g]),AQ(g,v)&&(v=MQ(r,v));let b=t[g];if(b===!0&&(b={property:g}),Es(v)){h[g]=h[g]??{},h[g]=Sl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Bf(b?.property,r);if(!a&&b?.static){const P=Bf(b.static,r);h=Sl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&Es(w)?h=Sl({},h,w):h[E]=w;continue}if(Es(w)){h=Sl({},h,w);continue}h[g]=w}return h};return i}var fN=e=>t=>IQ({theme:t,pseudos:j4,configs:j9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function OQ(e,t){if(Array.isArray(e))return e;if(Es(e))return t(e);if(e!=null)return[e]}function RQ(e,t){for(let n=t+1;n{Sl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?Sl(u,k):u[P]=k;continue}u[P]=k}}return u}}function DQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=NQ(i);return Sl({},Bf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function zQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return pQ(e,["styleConfig","size","variant","colorScheme"])}function BQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(l1,--No):0,U0--,Hr===10&&(U0=1,q4--),Hr}function la(){return Hr=No2||yv(Hr)>3?"":" "}function XQ(e,t){for(;--t&&la()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Xv(e,N3()+(t<6&&_l()==32&&la()==32))}function eC(e){for(;la();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&eC(Hr);break;case 40:e===41&&eC(e);break;case 92:la();break}return No}function ZQ(e,t){for(;la()&&e+Hr!==47+10;)if(e+Hr===42+42&&_l()===47)break;return"/*"+Xv(t,No-1)+"*"+Y4(e===47?e:la())}function QQ(e){for(;!yv(_l());)la();return Xv(e,No)}function JQ(e){return yN(z3("",null,null,null,[""],e=vN(e),0,[0],e))}function z3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,T="",M=i,O=o,R=r,N=T;E;)switch(b=k,k=la()){case 40:if(b!=108&&Ti(N,g-1)==58){J6(N+=wn(D3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=D3(k);break;case 9:case 10:case 13:case 32:N+=KQ(b);break;case 92:N+=XQ(N3()-1,7);continue;case 47:switch(_l()){case 42:case 47:Ty(eJ(ZQ(la(),N3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ty(v>32?jP(N+";",r,n,g-1):jP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ty(R=GP(N,t,n,u,h,i,s,T,M=[],O=[],g),o),k===123)if(h===0)z3(N,t,R,R,M,o,g,s,O);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:z3(e,R,R,r&&Ty(GP(e,R,R,0,0,i,s,T,i,M=[],g),O),i,O,g,s,r?M:O);break;default:z3(N,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&qQ()==125)continue}switch(N+=Y4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:_l()===45&&(N+=D3(la())),m=_l(),h=g=hl(T=N+=QQ(N3())),k++;break;case 45:b===45&&hl(N)==2&&(w=0)}}return o}function GP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=K9(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return K4(e,t,n,i===0?Y9:s,l,u,h)}function eJ(e,t,n){return K4(e,t,n,hN,Y4(YQ()),vv(e,2,-2),0)}function jP(e,t,n,r){return K4(e,t,n,q9,vv(e,0,r),vv(e,r+1,-1),r)}function m0(e,t){for(var n="",r=K9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+D5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~J6(e,"stretch")?SN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~J6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var uJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case q9:t.return=SN(t.value,t.length);break;case pN:return m0([$g(t,{value:wn(t.value,"@","@"+gn)})],i);case Y9:if(t.length)return jQ(t.props,function(o){switch(GQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return m0([$g(t,{props:[wn(o,/:(read-\w+)/,":"+D5+"$1")]})],i);case"::placeholder":return m0([$g(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),$g(t,{props:[wn(o,/:(plac\w+)/,":"+D5+"$1")]}),$g(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},cJ=[uJ],xN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||cJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var xJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},wJ=/[A-Z]|^ms/g,CJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TN=function(t){return t.charCodeAt(1)===45},KP=function(t){return t!=null&&typeof t!="boolean"},Ex=bN(function(e){return TN(e)?e:e.replace(wJ,"-$&").toLowerCase()}),XP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(CJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return xJ[t]!==1&&!TN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return _J(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,bv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function _J(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function HJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},NN=WJ(HJ);function DN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var zN=e=>DN(e,t=>t!=null);function VJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var UJ=VJ();function BN(e,...t){return FJ(e)?e(...t):e}function GJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function jJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var YJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qJ=bN(function(e){return YJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),KJ=qJ,XJ=function(t){return t!=="theme"},eT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?KJ:XJ},tT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},ZJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return EN(n,r,i),EJ(function(){return PN(n,r,i)}),null},QJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=tT(t,n,r),l=s||eT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var eee=Cn("accordion").parts("root","container","button","panel").extend("icon"),tee=Cn("alert").parts("title","description","container").extend("icon","spinner"),nee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),ree=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var iee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var oee=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),aee=Cn("editable").parts("preview","input","textarea"),see=Cn("form").parts("container","requiredIndicator","helperText"),lee=Cn("formError").parts("text","icon"),uee=Cn("input").parts("addon","field","element"),cee=Cn("list").parts("container","item","icon"),dee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),fee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),hee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var pee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),gee=Cn("progress").parts("label","filledTrack","track"),mee=Cn("radio").parts("container","control","label"),vee=Cn("select").parts("field","icon"),yee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),bee=Cn("stat").parts("container","label","helpText","number","icon"),See=Cn("switch").parts("container","track","thumb"),xee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),wee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Cee=Cn("tag").parts("container","label","closeButton"),_ee=Cn("card").parts("container","header","body","footer");function Mi(e,t){kee(e)&&(e="100%");var n=Eee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ly(e){return Math.min(1,Math.max(0,e))}function kee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Eee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function FN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ay(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ff(e){return e.length===1?"0"+e:String(e)}function Pee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function nT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Tee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Px(s,a,e+1/3),i=Px(s,a,e),o=Px(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function rT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var iC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Oee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Dee(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=Pee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(r=Ay(e.s),i=Ay(e.v),t=Lee(e.h,r,i),a=!0,s="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(r=Ay(e.s),o=Ay(e.l),t=Tee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=FN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ree="[-\\+]?\\d+%?",Nee="[-\\+]?\\d*\\.\\d+%?",Vc="(?:".concat(Nee,")|(?:").concat(Ree,")"),Tx="[\\s|\\(]+(".concat(Vc,")[,|\\s]+(").concat(Vc,")[,|\\s]+(").concat(Vc,")\\s*\\)?"),Lx="[\\s|\\(]+(".concat(Vc,")[,|\\s]+(").concat(Vc,")[,|\\s]+(").concat(Vc,")[,|\\s]+(").concat(Vc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Vc),rgb:new RegExp("rgb"+Tx),rgba:new RegExp("rgba"+Lx),hsl:new RegExp("hsl"+Tx),hsla:new RegExp("hsla"+Lx),hsv:new RegExp("hsv"+Tx),hsva:new RegExp("hsva"+Lx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Dee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(iC[e])e=iC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:oT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:oT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Zv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Iee(t)),this.originalInput=t;var i=Oee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=FN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=rT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=rT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=nT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=nT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),iT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Aee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+iT(this.r,this.g,this.b,!1),n=0,r=Object.entries(iC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push($N(e));return e.count=t,n}var r=zee(e.hue,e.seed),i=Bee(r,e),o=Fee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Zv(a)}function zee(e,t){var n=Hee(e),r=z5(n,t);return r<0&&(r=360+r),r}function Bee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return z5([0,100],t.seed);var n=HN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return z5([r,i],t.seed)}function Fee(e,t,n){var r=$ee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return z5([r,i],n.seed)}function $ee(e,t){for(var n=HN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Hee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=VN.find(function(a){return a.name===e});if(n){var r=WN(n);if(r.hueRange)return r.hueRange}var i=new Zv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function HN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=VN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function z5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function WN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var VN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Wee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Wee(e,`colors.${t}`,t),{isValid:i}=new Zv(r);return i?r:n},Uee=e=>t=>{const n=to(t,e);return new Zv(n).isDark()?"dark":"light"},Gee=e=>t=>Uee(e)(t)==="dark",G0=(e,t)=>n=>{const r=to(n,e);return new Zv(r).setAlpha(t).toRgbString()};function aT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function jee(e){const t=$N().toHexString();return!e||Vee(e)?t:e.string&&e.colors?qee(e.string,e.colors):e.string&&!e.colors?Yee(e.string):e.colors&&!e.string?Kee(e.colors):t}function Yee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function qee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function t8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Xee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function UN(e){return Xee(e)&&e.reference?e.reference:String(e)}var lb=(e,...t)=>t.map(UN).join(` ${e} `).replace(/calc/g,""),sT=(...e)=>`calc(${lb("+",...e)})`,lT=(...e)=>`calc(${lb("-",...e)})`,oC=(...e)=>`calc(${lb("*",...e)})`,uT=(...e)=>`calc(${lb("/",...e)})`,cT=e=>{const t=UN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:oC(t,-1)},hu=Object.assign(e=>({add:(...t)=>hu(sT(e,...t)),subtract:(...t)=>hu(lT(e,...t)),multiply:(...t)=>hu(oC(e,...t)),divide:(...t)=>hu(uT(e,...t)),negate:()=>hu(cT(e)),toString:()=>e.toString()}),{add:sT,subtract:lT,multiply:oC,divide:uT,negate:cT});function Zee(e){return!Number.isInteger(parseFloat(e.toString()))}function Qee(e,t="-"){return e.replace(/\s+/g,t)}function GN(e){const t=Qee(e.toString());return t.includes("\\.")?e:Zee(e)?t.replace(".","\\."):e}function Jee(e,t=""){return[t,GN(e)].filter(Boolean).join("-")}function ete(e,t){return`var(${GN(e)}${t?`, ${t}`:""})`}function tte(e,t=""){return`--${Jee(e,t)}`}function ni(e,t){const n=tte(e,t?.prefix);return{variable:n,reference:ete(n,nte(t?.fallback))}}function nte(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:rte,defineMultiStyleConfig:ite}=Jn(eee.keys),ote={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},ate={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ste={pt:"2",px:"4",pb:"5"},lte={fontSize:"1.25em"},ute=rte({container:ote,button:ate,panel:ste,icon:lte}),cte=ite({baseStyle:ute}),{definePartsStyle:Qv,defineMultiStyleConfig:dte}=Jn(tee.keys),ua=Dn("alert-fg"),_u=Dn("alert-bg"),fte=Qv({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function n8(e){const{theme:t,colorScheme:n}=e,r=G0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var hte=Qv(e=>{const{colorScheme:t}=e,n=n8(e);return{container:{[ua.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),pte=Qv(e=>{const{colorScheme:t}=e,n=n8(e);return{container:{[ua.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),gte=Qv(e=>{const{colorScheme:t}=e,n=n8(e);return{container:{[ua.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),mte=Qv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ua.reference}}}),vte={subtle:hte,"left-accent":pte,"top-accent":gte,solid:mte},yte=dte({baseStyle:fte,variants:vte,defaultProps:{variant:"subtle",colorScheme:"blue"}}),jN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},bte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Ste={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},xte={...jN,...bte,container:Ste},YN=xte,wte=e=>typeof e=="function";function io(e,...t){return wte(e)?e(...t):e}var{definePartsStyle:qN,defineMultiStyleConfig:Cte}=Jn(nee.keys),v0=Dn("avatar-border-color"),Ax=Dn("avatar-bg"),_te={borderRadius:"full",border:"0.2em solid",[v0.variable]:"white",_dark:{[v0.variable]:"colors.gray.800"},borderColor:v0.reference},kte={[Ax.variable]:"colors.gray.200",_dark:{[Ax.variable]:"colors.whiteAlpha.400"},bgColor:Ax.reference},dT=Dn("avatar-background"),Ete=e=>{const{name:t,theme:n}=e,r=t?jee({string:t}):"colors.gray.400",i=Gee(r)(n);let o="white";return i||(o="gray.800"),{bg:dT.reference,"&:not([data-loaded])":{[dT.variable]:r},color:o,[v0.variable]:"colors.white",_dark:{[v0.variable]:"colors.gray.800"},borderColor:v0.reference,verticalAlign:"top"}},Pte=qN(e=>({badge:io(_te,e),excessLabel:io(kte,e),container:io(Ete,e)}));function Tc(e){const t=e!=="100%"?YN[e]:void 0;return qN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Tte={"2xs":Tc(4),xs:Tc(6),sm:Tc(8),md:Tc(12),lg:Tc(16),xl:Tc(24),"2xl":Tc(32),full:Tc("100%")},Lte=Cte({baseStyle:Pte,sizes:Tte,defaultProps:{size:"md"}}),Ate={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},y0=Dn("badge-bg"),xl=Dn("badge-color"),Mte=e=>{const{colorScheme:t,theme:n}=e,r=G0(`${t}.500`,.6)(n);return{[y0.variable]:`colors.${t}.500`,[xl.variable]:"colors.white",_dark:{[y0.variable]:r,[xl.variable]:"colors.whiteAlpha.800"},bg:y0.reference,color:xl.reference}},Ite=e=>{const{colorScheme:t,theme:n}=e,r=G0(`${t}.200`,.16)(n);return{[y0.variable]:`colors.${t}.100`,[xl.variable]:`colors.${t}.800`,_dark:{[y0.variable]:r,[xl.variable]:`colors.${t}.200`},bg:y0.reference,color:xl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=G0(`${t}.200`,.8)(n);return{[xl.variable]:`colors.${t}.500`,_dark:{[xl.variable]:r},color:xl.reference,boxShadow:`inset 0 0 0px 1px ${xl.reference}`}},Rte={solid:Mte,subtle:Ite,outline:Ote},Rm={baseStyle:Ate,variants:Rte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Nte,definePartsStyle:Dte}=Jn(ree.keys),zte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Bte=Dte({link:zte}),Fte=Nte({baseStyle:Bte}),$te={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},KN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:bt("inherit","whiteAlpha.900")(e),_hover:{bg:bt("gray.100","whiteAlpha.200")(e)},_active:{bg:bt("gray.200","whiteAlpha.300")(e)}};const r=G0(`${t}.200`,.12)(n),i=G0(`${t}.200`,.24)(n);return{color:bt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:bt(`${t}.50`,r)(e)},_active:{bg:bt(`${t}.100`,i)(e)}}},Hte=e=>{const{colorScheme:t}=e,n=bt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(KN,e)}},Wte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Vte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=bt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:bt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:bt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Wte[t]??{},a=bt(n,`${t}.200`)(e);return{bg:a,color:bt(r,"gray.800")(e),_hover:{bg:bt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:bt(o,`${t}.400`)(e)}}},Ute=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:bt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:bt(`${t}.700`,`${t}.500`)(e)}}},Gte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},jte={ghost:KN,outline:Hte,solid:Vte,link:Ute,unstyled:Gte},Yte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},qte={baseStyle:$te,variants:jte,sizes:Yte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:qf,defineMultiStyleConfig:Kte}=Jn(_ee.keys),B5=Dn("card-bg"),b0=Dn("card-padding"),Xte=qf({container:{[B5.variable]:"chakra-body-bg",backgroundColor:B5.reference,color:"chakra-body-text"},body:{padding:b0.reference,flex:"1 1 0%"},header:{padding:b0.reference},footer:{padding:b0.reference}}),Zte={sm:qf({container:{borderRadius:"base",[b0.variable]:"space.3"}}),md:qf({container:{borderRadius:"md",[b0.variable]:"space.5"}}),lg:qf({container:{borderRadius:"xl",[b0.variable]:"space.7"}})},Qte={elevated:qf({container:{boxShadow:"base",_dark:{[B5.variable]:"colors.gray.700"}}}),outline:qf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:qf({container:{[B5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Jte=Kte({baseStyle:Xte,variants:Qte,sizes:Zte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:B3,defineMultiStyleConfig:ene}=Jn(iee.keys),Nm=Dn("checkbox-size"),tne=e=>{const{colorScheme:t}=e;return{w:Nm.reference,h:Nm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e),_hover:{bg:bt(`${t}.600`,`${t}.300`)(e),borderColor:bt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:bt("gray.200","transparent")(e),bg:bt("gray.200","whiteAlpha.300")(e),color:bt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e)},_disabled:{bg:bt("gray.100","whiteAlpha.100")(e),borderColor:bt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:bt("red.500","red.300")(e)}}},nne={_disabled:{cursor:"not-allowed"}},rne={userSelect:"none",_disabled:{opacity:.4}},ine={transitionProperty:"transform",transitionDuration:"normal"},one=B3(e=>({icon:ine,container:nne,control:io(tne,e),label:rne})),ane={sm:B3({control:{[Nm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:B3({control:{[Nm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:B3({control:{[Nm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},F5=ene({baseStyle:one,sizes:ane,defaultProps:{size:"md",colorScheme:"blue"}}),Dm=ni("close-button-size"),Hg=ni("close-button-bg"),sne={w:[Dm.reference],h:[Dm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Hg.variable]:"colors.blackAlpha.100",_dark:{[Hg.variable]:"colors.whiteAlpha.100"}},_active:{[Hg.variable]:"colors.blackAlpha.200",_dark:{[Hg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Hg.reference},lne={lg:{[Dm.variable]:"sizes.10",fontSize:"md"},md:{[Dm.variable]:"sizes.8",fontSize:"xs"},sm:{[Dm.variable]:"sizes.6",fontSize:"2xs"}},une={baseStyle:sne,sizes:lne,defaultProps:{size:"md"}},{variants:cne,defaultProps:dne}=Rm,fne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},hne={baseStyle:fne,variants:cne,defaultProps:dne},pne={w:"100%",mx:"auto",maxW:"prose",px:"4"},gne={baseStyle:pne},mne={opacity:.6,borderColor:"inherit"},vne={borderStyle:"solid"},yne={borderStyle:"dashed"},bne={solid:vne,dashed:yne},Sne={baseStyle:mne,variants:bne,defaultProps:{variant:"solid"}},{definePartsStyle:aC,defineMultiStyleConfig:xne}=Jn(oee.keys),Mx=Dn("drawer-bg"),Ix=Dn("drawer-box-shadow");function Ep(e){return aC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var wne={bg:"blackAlpha.600",zIndex:"overlay"},Cne={display:"flex",zIndex:"modal",justifyContent:"center"},_ne=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Mx.variable]:"colors.white",[Ix.variable]:"shadows.lg",_dark:{[Mx.variable]:"colors.gray.700",[Ix.variable]:"shadows.dark-lg"},bg:Mx.reference,boxShadow:Ix.reference}},kne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Ene={position:"absolute",top:"2",insetEnd:"3"},Pne={px:"6",py:"2",flex:"1",overflow:"auto"},Tne={px:"6",py:"4"},Lne=aC(e=>({overlay:wne,dialogContainer:Cne,dialog:io(_ne,e),header:kne,closeButton:Ene,body:Pne,footer:Tne})),Ane={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Mne=xne({baseStyle:Lne,sizes:Ane,defaultProps:{size:"xs"}}),{definePartsStyle:Ine,defineMultiStyleConfig:One}=Jn(aee.keys),Rne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Nne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},zne=Ine({preview:Rne,input:Nne,textarea:Dne}),Bne=One({baseStyle:zne}),{definePartsStyle:Fne,defineMultiStyleConfig:$ne}=Jn(see.keys),S0=Dn("form-control-color"),Hne={marginStart:"1",[S0.variable]:"colors.red.500",_dark:{[S0.variable]:"colors.red.300"},color:S0.reference},Wne={mt:"2",[S0.variable]:"colors.gray.600",_dark:{[S0.variable]:"colors.whiteAlpha.600"},color:S0.reference,lineHeight:"normal",fontSize:"sm"},Vne=Fne({container:{width:"100%",position:"relative"},requiredIndicator:Hne,helperText:Wne}),Une=$ne({baseStyle:Vne}),{definePartsStyle:Gne,defineMultiStyleConfig:jne}=Jn(lee.keys),x0=Dn("form-error-color"),Yne={[x0.variable]:"colors.red.500",_dark:{[x0.variable]:"colors.red.300"},color:x0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},qne={marginEnd:"0.5em",[x0.variable]:"colors.red.500",_dark:{[x0.variable]:"colors.red.300"},color:x0.reference},Kne=Gne({text:Yne,icon:qne}),Xne=jne({baseStyle:Kne}),Zne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Qne={baseStyle:Zne},Jne={fontFamily:"heading",fontWeight:"bold"},ere={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},tre={baseStyle:Jne,sizes:ere,defaultProps:{size:"xl"}},{definePartsStyle:mu,defineMultiStyleConfig:nre}=Jn(uee.keys),rre=mu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Lc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},ire={lg:mu({field:Lc.lg,addon:Lc.lg}),md:mu({field:Lc.md,addon:Lc.md}),sm:mu({field:Lc.sm,addon:Lc.sm}),xs:mu({field:Lc.xs,addon:Lc.xs})};function r8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||bt("blue.500","blue.300")(e),errorBorderColor:n||bt("red.500","red.300")(e)}}var ore=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=r8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:bt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:bt("inherit","whiteAlpha.50")(e),bg:bt("gray.100","whiteAlpha.300")(e)}}}),are=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=r8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e),_hover:{bg:bt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e)}}}),sre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=r8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),lre=mu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),ure={outline:ore,filled:are,flushed:sre,unstyled:lre},mn=nre({baseStyle:rre,sizes:ire,variants:ure,defaultProps:{size:"md",variant:"outline"}}),Ox=Dn("kbd-bg"),cre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},dre={baseStyle:cre},fre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},hre={baseStyle:fre},{defineMultiStyleConfig:pre,definePartsStyle:gre}=Jn(cee.keys),mre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},vre=gre({icon:mre}),yre=pre({baseStyle:vre}),{defineMultiStyleConfig:bre,definePartsStyle:Sre}=Jn(dee.keys),fl=Dn("menu-bg"),Rx=Dn("menu-shadow"),xre={[fl.variable]:"#fff",[Rx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Rx.reference},wre={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},Cre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},_re={opacity:.6},kre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Ere={transitionProperty:"common",transitionDuration:"normal"},Pre=Sre({button:Ere,list:xre,item:wre,groupTitle:Cre,command:_re,divider:kre}),Tre=bre({baseStyle:Pre}),{defineMultiStyleConfig:Lre,definePartsStyle:sC}=Jn(fee.keys),Are={bg:"blackAlpha.600",zIndex:"modal"},Mre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ire=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:bt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:bt("lg","dark-lg")(e)}},Ore={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Rre={position:"absolute",top:"2",insetEnd:"3"},Nre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Dre={px:"6",py:"4"},zre=sC(e=>({overlay:Are,dialogContainer:io(Mre,e),dialog:io(Ire,e),header:Ore,closeButton:Rre,body:io(Nre,e),footer:Dre}));function fs(e){return sC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Bre={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Fre=Lre({baseStyle:zre,sizes:Bre,defaultProps:{size:"md"}}),$re={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},XN=$re,{defineMultiStyleConfig:Hre,definePartsStyle:ZN}=Jn(hee.keys),i8=ni("number-input-stepper-width"),QN=ni("number-input-input-padding"),Wre=hu(i8).add("0.5rem").toString(),Nx=ni("number-input-bg"),Dx=ni("number-input-color"),zx=ni("number-input-border-color"),Vre={[i8.variable]:"sizes.6",[QN.variable]:Wre},Ure=e=>{var t;return((t=io(mn.baseStyle,e))==null?void 0:t.field)??{}},Gre={width:i8.reference},jre={borderStart:"1px solid",borderStartColor:zx.reference,color:Dx.reference,bg:Nx.reference,[Dx.variable]:"colors.chakra-body-text",[zx.variable]:"colors.chakra-border-color",_dark:{[Dx.variable]:"colors.whiteAlpha.800",[zx.variable]:"colors.whiteAlpha.300"},_active:{[Nx.variable]:"colors.gray.200",_dark:{[Nx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Yre=ZN(e=>({root:Vre,field:io(Ure,e)??{},stepperGroup:Gre,stepper:jre}));function My(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=XN.fontSizes[o];return ZN({field:{...r.field,paddingInlineEnd:QN.reference,verticalAlign:"top"},stepper:{fontSize:hu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var qre={xs:My("xs"),sm:My("sm"),md:My("md"),lg:My("lg")},Kre=Hre({baseStyle:Yre,sizes:qre,variants:mn.variants,defaultProps:mn.defaultProps}),fT,Xre={...(fT=mn.baseStyle)==null?void 0:fT.field,textAlign:"center"},Zre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},hT,Qre={outline:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((hT=mn.variants)==null?void 0:hT.unstyled.field)??{}},Jre={baseStyle:Xre,sizes:Zre,variants:Qre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:eie,definePartsStyle:tie}=Jn(pee.keys),Iy=ni("popper-bg"),nie=ni("popper-arrow-bg"),pT=ni("popper-arrow-shadow-color"),rie={zIndex:10},iie={[Iy.variable]:"colors.white",bg:Iy.reference,[nie.variable]:Iy.reference,[pT.variable]:"colors.gray.200",_dark:{[Iy.variable]:"colors.gray.700",[pT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},oie={px:3,py:2,borderBottomWidth:"1px"},aie={px:3,py:2},sie={px:3,py:2,borderTopWidth:"1px"},lie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},uie=tie({popper:rie,content:iie,header:oie,body:aie,footer:sie,closeButton:lie}),cie=eie({baseStyle:uie}),{defineMultiStyleConfig:die,definePartsStyle:um}=Jn(gee.keys),fie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=bt(aT(),aT("1rem","rgba(0,0,0,0.1)"))(e),a=bt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${to(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},hie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},pie=e=>({bg:bt("gray.100","whiteAlpha.300")(e)}),gie=e=>({transitionProperty:"common",transitionDuration:"slow",...fie(e)}),mie=um(e=>({label:hie,filledTrack:gie(e),track:pie(e)})),vie={xs:um({track:{h:"1"}}),sm:um({track:{h:"2"}}),md:um({track:{h:"3"}}),lg:um({track:{h:"4"}})},yie=die({sizes:vie,baseStyle:mie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:bie,definePartsStyle:F3}=Jn(mee.keys),Sie=e=>{var t;const n=(t=io(F5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},xie=F3(e=>{var t,n,r,i;return{label:(n=(t=F5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=F5).baseStyle)==null?void 0:i.call(r,e).container,control:Sie(e)}}),wie={md:F3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:F3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:F3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Cie=bie({baseStyle:xie,sizes:wie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:_ie,definePartsStyle:kie}=Jn(vee.keys),Oy=Dn("select-bg"),gT,Eie={...(gT=mn.baseStyle)==null?void 0:gT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Pie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Tie=kie({field:Eie,icon:Pie}),Ry={paddingInlineEnd:"8"},mT,vT,yT,bT,ST,xT,wT,CT,Lie={lg:{...(mT=mn.sizes)==null?void 0:mT.lg,field:{...(vT=mn.sizes)==null?void 0:vT.lg.field,...Ry}},md:{...(yT=mn.sizes)==null?void 0:yT.md,field:{...(bT=mn.sizes)==null?void 0:bT.md.field,...Ry}},sm:{...(ST=mn.sizes)==null?void 0:ST.sm,field:{...(xT=mn.sizes)==null?void 0:xT.sm.field,...Ry}},xs:{...(wT=mn.sizes)==null?void 0:wT.xs,field:{...(CT=mn.sizes)==null?void 0:CT.xs.field,...Ry},icon:{insetEnd:"1"}}},Aie=_ie({baseStyle:Tie,sizes:Lie,variants:mn.variants,defaultProps:mn.defaultProps}),Bx=Dn("skeleton-start-color"),Fx=Dn("skeleton-end-color"),Mie={[Bx.variable]:"colors.gray.100",[Fx.variable]:"colors.gray.400",_dark:{[Bx.variable]:"colors.gray.800",[Fx.variable]:"colors.gray.600"},background:Bx.reference,borderColor:Fx.reference,opacity:.7,borderRadius:"sm"},Iie={baseStyle:Mie},$x=Dn("skip-link-bg"),Oie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$x.variable]:"colors.white",_dark:{[$x.variable]:"colors.gray.700"},bg:$x.reference}},Rie={baseStyle:Oie},{defineMultiStyleConfig:Nie,definePartsStyle:ub}=Jn(yee.keys),wv=Dn("slider-thumb-size"),Cv=Dn("slider-track-size"),Bc=Dn("slider-bg"),Die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...t8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zie=e=>({...t8({orientation:e.orientation,horizontal:{h:Cv.reference},vertical:{w:Cv.reference}}),overflow:"hidden",borderRadius:"sm",[Bc.variable]:"colors.gray.200",_dark:{[Bc.variable]:"colors.whiteAlpha.200"},_disabled:{[Bc.variable]:"colors.gray.300",_dark:{[Bc.variable]:"colors.whiteAlpha.300"}},bg:Bc.reference}),Bie=e=>{const{orientation:t}=e;return{...t8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:wv.reference,h:wv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Bc.variable]:`colors.${t}.500`,_dark:{[Bc.variable]:`colors.${t}.200`},bg:Bc.reference}},$ie=ub(e=>({container:Die(e),track:zie(e),thumb:Bie(e),filledTrack:Fie(e)})),Hie=ub({container:{[wv.variable]:"sizes.4",[Cv.variable]:"sizes.1"}}),Wie=ub({container:{[wv.variable]:"sizes.3.5",[Cv.variable]:"sizes.1"}}),Vie=ub({container:{[wv.variable]:"sizes.2.5",[Cv.variable]:"sizes.0.5"}}),Uie={lg:Hie,md:Wie,sm:Vie},Gie=Nie({baseStyle:$ie,sizes:Uie,defaultProps:{size:"md",colorScheme:"blue"}}),If=ni("spinner-size"),jie={width:[If.reference],height:[If.reference]},Yie={xs:{[If.variable]:"sizes.3"},sm:{[If.variable]:"sizes.4"},md:{[If.variable]:"sizes.6"},lg:{[If.variable]:"sizes.8"},xl:{[If.variable]:"sizes.12"}},qie={baseStyle:jie,sizes:Yie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Kie,definePartsStyle:JN}=Jn(bee.keys),Xie={fontWeight:"medium"},Zie={opacity:.8,marginBottom:"2"},Qie={verticalAlign:"baseline",fontWeight:"semibold"},Jie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eoe=JN({container:{},label:Xie,helpText:Zie,number:Qie,icon:Jie}),toe={md:JN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},noe=Kie({baseStyle:eoe,sizes:toe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:roe,definePartsStyle:$3}=Jn(See.keys),zm=ni("switch-track-width"),Kf=ni("switch-track-height"),Hx=ni("switch-track-diff"),ioe=hu.subtract(zm,Kf),lC=ni("switch-thumb-x"),Wg=ni("switch-bg"),ooe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[zm.reference],height:[Kf.reference],transitionProperty:"common",transitionDuration:"fast",[Wg.variable]:"colors.gray.300",_dark:{[Wg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Wg.variable]:`colors.${t}.500`,_dark:{[Wg.variable]:`colors.${t}.200`}},bg:Wg.reference}},aoe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Kf.reference],height:[Kf.reference],_checked:{transform:`translateX(${lC.reference})`}},soe=$3(e=>({container:{[Hx.variable]:ioe,[lC.variable]:Hx.reference,_rtl:{[lC.variable]:hu(Hx).negate().toString()}},track:ooe(e),thumb:aoe})),loe={sm:$3({container:{[zm.variable]:"1.375rem",[Kf.variable]:"sizes.3"}}),md:$3({container:{[zm.variable]:"1.875rem",[Kf.variable]:"sizes.4"}}),lg:$3({container:{[zm.variable]:"2.875rem",[Kf.variable]:"sizes.6"}})},uoe=roe({baseStyle:soe,sizes:loe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:coe,definePartsStyle:w0}=Jn(xee.keys),doe=w0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),$5={"&[data-is-numeric=true]":{textAlign:"end"}},foe=w0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},caption:{color:bt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hoe=w0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},caption:{color:bt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e)},td:{background:bt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),poe={simple:foe,striped:hoe,unstyled:{}},goe={sm:w0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:w0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:w0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},moe=coe({baseStyle:doe,variants:poe,sizes:goe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=Dn("tabs-color"),Ss=Dn("tabs-bg"),Ny=Dn("tabs-border-color"),{defineMultiStyleConfig:voe,definePartsStyle:kl}=Jn(wee.keys),yoe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},boe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Soe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},xoe={p:4},woe=kl(e=>({root:yoe(e),tab:boe(e),tablist:Soe(e),tabpanel:xoe})),Coe={sm:kl({tab:{py:1,px:4,fontSize:"sm"}}),md:kl({tab:{fontSize:"md",py:2,px:4}}),lg:kl({tab:{fontSize:"lg",py:3,px:4}})},_oe=kl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ss.variable]:"colors.gray.200",_dark:{[Ss.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:Ss.reference}}}),koe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Ny.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Ny.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Ny.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Ny.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eoe=kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ss.variable]:"colors.gray.50",_dark:{[Ss.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ss.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[Ss.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:Ss.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Poe=kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Toe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[Ss.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[Ss.variable]:`colors.${t}.300`}},color:To.reference,bg:Ss.reference}}}),Loe=kl({}),Aoe={line:_oe,enclosed:koe,"enclosed-colored":Eoe,"soft-rounded":Poe,"solid-rounded":Toe,unstyled:Loe},Moe=voe({baseStyle:woe,sizes:Coe,variants:Aoe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ioe,definePartsStyle:Xf}=Jn(Cee.keys),Ooe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Roe={lineHeight:1.2,overflow:"visible"},Noe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Doe=Xf({container:Ooe,label:Roe,closeButton:Noe}),zoe={sm:Xf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Xf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Xf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Boe={subtle:Xf(e=>{var t;return{container:(t=Rm.variants)==null?void 0:t.subtle(e)}}),solid:Xf(e=>{var t;return{container:(t=Rm.variants)==null?void 0:t.solid(e)}}),outline:Xf(e=>{var t;return{container:(t=Rm.variants)==null?void 0:t.outline(e)}})},Foe=Ioe({variants:Boe,baseStyle:Doe,sizes:zoe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),_T,$oe={...(_T=mn.baseStyle)==null?void 0:_T.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},kT,Hoe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((kT=mn.variants)==null?void 0:kT.unstyled.field)??{}},ET,PT,TT,LT,Woe={xs:((ET=mn.sizes)==null?void 0:ET.xs.field)??{},sm:((PT=mn.sizes)==null?void 0:PT.sm.field)??{},md:((TT=mn.sizes)==null?void 0:TT.md.field)??{},lg:((LT=mn.sizes)==null?void 0:LT.lg.field)??{}},Voe={baseStyle:$oe,sizes:Woe,variants:Hoe,defaultProps:{size:"md",variant:"outline"}},Dy=ni("tooltip-bg"),Wx=ni("tooltip-fg"),Uoe=ni("popper-arrow-bg"),Goe={bg:Dy.reference,color:Wx.reference,[Dy.variable]:"colors.gray.700",[Wx.variable]:"colors.whiteAlpha.900",_dark:{[Dy.variable]:"colors.gray.300",[Wx.variable]:"colors.gray.900"},[Uoe.variable]:Dy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},joe={baseStyle:Goe},Yoe={Accordion:cte,Alert:yte,Avatar:Lte,Badge:Rm,Breadcrumb:Fte,Button:qte,Checkbox:F5,CloseButton:une,Code:hne,Container:gne,Divider:Sne,Drawer:Mne,Editable:Bne,Form:Une,FormError:Xne,FormLabel:Qne,Heading:tre,Input:mn,Kbd:dre,Link:hre,List:yre,Menu:Tre,Modal:Fre,NumberInput:Kre,PinInput:Jre,Popover:cie,Progress:yie,Radio:Cie,Select:Aie,Skeleton:Iie,SkipLink:Rie,Slider:Gie,Spinner:qie,Stat:noe,Switch:uoe,Table:moe,Tabs:Moe,Tag:Foe,Textarea:Voe,Tooltip:joe,Card:Jte},qoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Koe=qoe,Xoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Zoe=Xoe,Qoe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Joe=Qoe,eae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},tae=eae,nae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},rae=nae,iae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},oae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},sae={property:iae,easing:oae,duration:aae},lae=sae,uae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},cae=uae,dae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},fae=dae,hae={breakpoints:Zoe,zIndices:cae,radii:tae,blur:fae,colors:Joe,...XN,sizes:YN,shadows:rae,space:jN,borders:Koe,transition:lae},pae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},gae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},mae="ltr",vae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yae={semanticTokens:pae,direction:mae,...hae,components:Yoe,styles:gae,config:vae},bae=typeof Element<"u",Sae=typeof Map=="function",xae=typeof Set=="function",wae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function H3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!H3(e[r],t[r]))return!1;return!0}var o;if(Sae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!H3(r.value[1],t.get(r.value[0])))return!1;return!0}if(xae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(wae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(bae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!H3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Cae=function(t,n){try{return H3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function u1(){const e=C.exports.useContext(Sv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function eD(){const e=Kv(),t=u1();return{...e,theme:t}}function _ae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function kae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _ae(o,l,a[u]??l);const h=`${e}.${l}`;return kae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Pae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>xQ(n),[n]);return J(AJ,{theme:i,children:[x(Tae,{root:t}),r]})}function Tae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(ab,{styles:n=>({[t]:n.__cssVars})})}jJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Lae(){const{colorMode:e}=Kv();return x(ab,{styles:t=>{const n=NN(t,"styles.global"),r=BN(n,{theme:t,colorMode:e});return r?fN(r)(t):void 0}})}var Aae=new Set([..._Q,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Mae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Iae(e){return Mae.has(e)||!Aae.has(e)}var Oae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=DN(a,(g,m)=>EQ(m)),l=BN(e,t),u=Object.assign({},i,l,zN(s),o),h=fN(u)(t.theme);return r?[h,r]:h};function Vx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Iae);const i=Oae({baseStyle:n}),o=rC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Kv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function ke(e){return C.exports.forwardRef(e)}function tD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=eD(),a=e?NN(i,`components.${e}`):void 0,s=n||a,l=Sl({theme:i,colorMode:o},s?.defaultProps??{},zN($J(r,["children"]))),u=C.exports.useRef({});if(s){const g=DQ(s)(l);Cae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return tD(e,t)}function Oi(e,t={}){return tD(e,t)}function Rae(){const e=new Map;return new Proxy(Vx,{apply(t,n,r){return Vx(...r)},get(t,n){return e.has(n)||e.set(n,Vx(n)),e.get(n)}})}var Se=Rae();function Nae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Nae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Dae(n,t)})}}function zae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function AT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Bae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function MT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function IT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var uC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,H5=e=>e,Fae=class{descendants=new Map;register=e=>{if(e!=null)return Bae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=AT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=MT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=MT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=IT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=IT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=AT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $ae(){const e=C.exports.useRef(new Fae);return uC(()=>()=>e.current.destroy()),e.current}var[Hae,nD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Wae(e){const t=nD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);uC(()=>()=>{!i.current||t.unregister(i.current)},[]),uC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=H5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function rD(){return[H5(Hae),()=>H5(nD()),()=>$ae(),i=>Wae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),OT={path:J("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=ke((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??OT.viewBox;if(n&&typeof n!="string")return ae.createElement(Se.svg,{as:n,...m,...u});const b=a??OT.path;return ae.createElement(Se.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});va.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=ke((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function cb(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const o8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),db=C.exports.createContext({});function Vae(){return C.exports.useContext(db).visualElement}const c1=C.exports.createContext(null),gh=typeof document<"u",W5=gh?C.exports.useLayoutEffect:C.exports.useEffect,iD=C.exports.createContext({strict:!1});function Uae(e,t,n,r){const i=Vae(),o=C.exports.useContext(iD),a=C.exports.useContext(c1),s=C.exports.useContext(o8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return W5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),W5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Gae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function _v(e){return typeof e=="string"||Array.isArray(e)}function fb(e){return typeof e=="object"&&typeof e.start=="function"}const jae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function hb(e){return fb(e.animate)||jae.some(t=>_v(e[t]))}function oD(e){return Boolean(hb(e)||e.variants)}function Yae(e,t){if(hb(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_v(n)?n:void 0,animate:_v(r)?r:void 0}}return e.inherit!==!1?t:{}}function qae(e){const{initial:t,animate:n}=Yae(e,C.exports.useContext(db));return C.exports.useMemo(()=>({initial:t,animate:n}),[RT(t),RT(n)])}function RT(e){return Array.isArray(e)?e.join(" "):e}const lu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),kv={measureLayout:lu(["layout","layoutId","drag"]),animation:lu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:lu(["exit"]),drag:lu(["drag","dragControls"]),focus:lu(["whileFocus"]),hover:lu(["whileHover","onHoverStart","onHoverEnd"]),tap:lu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:lu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:lu(["whileInView","onViewportEnter","onViewportLeave"])};function Kae(e){for(const t in e)t==="projectionNodeConstructor"?kv.projectionNodeConstructor=e[t]:kv[t].Component=e[t]}function pb(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Xae=1;function Zae(){return pb(()=>{if(Bm.hasEverUpdated)return Xae++})}const a8=C.exports.createContext({});class Qae extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const aD=C.exports.createContext({}),Jae=Symbol.for("motionComponentSymbol");function ese({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Kae(e);function a(l,u){const h={...C.exports.useContext(o8),...l,layoutId:tse(l)},{isStatic:g}=h;let m=null;const v=qae(l),b=g?void 0:Zae(),w=i(l,g);if(!g&&gh){v.visualElement=Uae(o,w,h,t);const E=C.exports.useContext(iD).strict,P=C.exports.useContext(aD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||kv.projectionNodeConstructor,P))}return J(Qae,{visualElement:v.visualElement,props:h,children:[m,x(db.Provider,{value:v,children:r(o,l,b,Gae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Jae]=o,s}function tse({layoutId:e}){const t=C.exports.useContext(a8).id;return t&&e!==void 0?t+"-"+e:e}function nse(e){function t(r,i={}){return ese(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rse=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function s8(e){return typeof e!="string"||e.includes("-")?!1:!!(rse.indexOf(e)>-1||/[A-Z]/.test(e))}const V5={};function ise(e){Object.assign(V5,e)}const U5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],d1=new Set(U5);function sD(e,{layout:t,layoutId:n}){return d1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!V5[e]||e==="opacity")}const Ml=e=>!!e?.getVelocity,ose={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ase=(e,t)=>U5.indexOf(e)-U5.indexOf(t);function sse({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(ase);for(const s of t)a+=`${ose[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function lD(e){return e.startsWith("--")}const lse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,uD=(e,t)=>n=>Math.max(Math.min(n,t),e),Fm=e=>e%1?Number(e.toFixed(5)):e,Ev=/(-)?([\d]*\.?[\d])+/g,cC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,use=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Jv(e){return typeof e=="string"}const mh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$m=Object.assign(Object.assign({},mh),{transform:uD(0,1)}),zy=Object.assign(Object.assign({},mh),{default:1}),e2=e=>({test:t=>Jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ac=e2("deg"),El=e2("%"),wt=e2("px"),cse=e2("vh"),dse=e2("vw"),NT=Object.assign(Object.assign({},El),{parse:e=>El.parse(e)/100,transform:e=>El.transform(e*100)}),l8=(e,t)=>n=>Boolean(Jv(n)&&use.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),cD=(e,t,n)=>r=>{if(!Jv(r))return r;const[i,o,a,s]=r.match(Ev);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},$f={test:l8("hsl","hue"),parse:cD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+El.transform(Fm(t))+", "+El.transform(Fm(n))+", "+Fm($m.transform(r))+")"},fse=uD(0,255),Ux=Object.assign(Object.assign({},mh),{transform:e=>Math.round(fse(e))}),Uc={test:l8("rgb","red"),parse:cD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ux.transform(e)+", "+Ux.transform(t)+", "+Ux.transform(n)+", "+Fm($m.transform(r))+")"};function hse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const dC={test:l8("#"),parse:hse,transform:Uc.transform},Qi={test:e=>Uc.test(e)||dC.test(e)||$f.test(e),parse:e=>Uc.test(e)?Uc.parse(e):$f.test(e)?$f.parse(e):dC.parse(e),transform:e=>Jv(e)?e:e.hasOwnProperty("red")?Uc.transform(e):$f.transform(e)},dD="${c}",fD="${n}";function pse(e){var t,n,r,i;return isNaN(e)&&Jv(e)&&((n=(t=e.match(Ev))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(cC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function hD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(cC);r&&(n=r.length,e=e.replace(cC,dD),t.push(...r.map(Qi.parse)));const i=e.match(Ev);return i&&(e=e.replace(Ev,fD),t.push(...i.map(mh.parse))),{values:t,numColors:n,tokenised:e}}function pD(e){return hD(e).values}function gD(e){const{values:t,numColors:n,tokenised:r}=hD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mse(e){const t=pD(e);return gD(e)(t.map(gse))}const ku={test:pse,parse:pD,createTransformer:gD,getAnimatableNone:mse},vse=new Set(["brightness","contrast","saturate","opacity"]);function yse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ev)||[];if(!r)return e;const i=n.replace(r,"");let o=vse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bse=/([a-z-]*)\(.*?\)/g,fC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(bse);return t?t.map(yse).join(" "):e}}),DT={...mh,transform:Math.round},mD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Ac,rotateX:Ac,rotateY:Ac,rotateZ:Ac,scale:zy,scaleX:zy,scaleY:zy,scaleZ:zy,skew:Ac,skewX:Ac,skewY:Ac,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:$m,originX:NT,originY:NT,originZ:wt,zIndex:DT,fillOpacity:$m,strokeOpacity:$m,numOctaves:DT};function u8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(lD(m)){o[m]=v;continue}const b=mD[m],w=lse(v,b);if(d1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sse(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const c8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function vD(e,t,n){for(const r in t)!Ml(t[r])&&!sD(r,n)&&(e[r]=t[r])}function Sse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=c8();return u8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function xse(e,t,n){const r=e.style||{},i={};return vD(i,r,e),Object.assign(i,Sse(e,t,n)),e.transformValues?e.transformValues(i):i}function wse(e,t,n){const r={},i=xse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_se=["whileTap","onTap","onTapStart","onTapCancel"],kse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Ese=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Ese,..._se,...Cse,...kse]);function G5(e){return Pse.has(e)}let yD=e=>!G5(e);function Tse(e){!e||(yD=t=>t.startsWith("on")?!G5(t):e(t))}try{Tse(require("@emotion/is-prop-valid").default)}catch{}function Lse(e,t,n){const r={};for(const i in e)(yD(i)||n===!0&&G5(i)||!t&&!G5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function zT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Ase(e,t,n){const r=zT(t,e.x,e.width),i=zT(n,e.y,e.height);return`${r} ${i}`}const Mse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ise={offset:"strokeDashoffset",array:"strokeDasharray"};function Ose(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Mse:Ise;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function d8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){u8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ase(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Ose(g,o,a,s,!1)}const bD=()=>({...c8(),attrs:{}});function Rse(e,t){const n=C.exports.useMemo(()=>{const r=bD();return d8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};vD(r,e.style,e),n.style={...r,...n.style}}return n}function Nse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(s8(n)?Rse:wse)(r,a,s),g={...Lse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const SD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function xD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const wD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function CD(e,t,n,r){xD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(wD.has(i)?i:SD(i),t.attrs[i])}function f8(e){const{style:t}=e,n={};for(const r in t)(Ml(t[r])||sD(r,e))&&(n[r]=t[r]);return n}function _D(e){const t=f8(e);for(const n in e)if(Ml(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function h8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Pv=e=>Array.isArray(e),Dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),kD=e=>Pv(e)?e[e.length-1]||0:e;function W3(e){const t=Ml(e)?e.get():e;return Dse(t)?t.toValue():t}function zse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const ED=e=>(t,n)=>{const r=C.exports.useContext(db),i=C.exports.useContext(c1),o=()=>zse(e,t,r,i);return n?o():pb(o)};function Bse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=W3(o[m]);let{initial:a,animate:s}=e;const l=hb(e),u=oD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!fb(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=h8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Fse={useVisualState:ED({scrapeMotionValuesFromProps:_D,createRenderState:bD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}d8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),CD(t,n)}})},$se={useVisualState:ED({scrapeMotionValuesFromProps:f8,createRenderState:c8})};function Hse(e,{forwardMotionProps:t=!1},n,r,i){return{...s8(e)?Fse:$se,preloadedFeatures:n,useRender:Nse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function gb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return gb(i,t,n,r)},[e,t,n,r])}function Wse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};hC(t,"focus",e?r:void 0),hC(t,"blur",e?i:void 0)}function PD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function TD(e){return!!e.touches}function Vse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Use={pageX:0,pageY:0};function Gse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Use;return{x:r[t+"X"],y:r[t+"Y"]}}function jse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function p8(e,t="page"){return{point:TD(e)?Gse(e,t):jse(e,t)}}const LD=(e,t=!1)=>{const n=r=>e(r,p8(r));return t?Vse(n):n},Yse=()=>gh&&window.onpointerdown===null,qse=()=>gh&&window.ontouchstart===null,Kse=()=>gh&&window.onmousedown===null,Xse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Zse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function AD(e){return Yse()?e:qse()?Zse[e]:Kse()?Xse[e]:e}function C0(e,t,n,r){return gb(e,AD(t),LD(n,t==="pointerdown"),r)}function j5(e,t,n,r){return hC(e,AD(t),n&&LD(n,t==="pointerdown"),r)}function MD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const BT=MD("dragHorizontal"),FT=MD("dragVertical");function ID(e){let t=!1;if(e==="y")t=FT();else if(e==="x")t=BT();else{const n=BT(),r=FT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function OD(){const e=ID(!0);return e?(e(),!1):!0}function $T(e,t,n){return(r,i)=>{!PD(r)||OD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function Qse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){j5(r,"pointerenter",e||n?$T(r,!0,e):void 0,{passive:!e}),j5(r,"pointerleave",t||n?$T(r,!1,t):void 0,{passive:!t})}const RD=(e,t)=>t?e===t?!0:RD(e,t.parentElement):!1;function g8(e){return C.exports.useEffect(()=>()=>e(),[])}function ND(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Gx=.001,ele=.01,HT=10,tle=.05,nle=1;function rle({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jse(e<=HT*1e3);let a=1-t;a=q5(tle,nle,a),e=q5(ele,HT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=pC(u,a),b=Math.exp(-g);return Gx-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=pC(Math.pow(u,2),a);return(-i(u)+Gx>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Gx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ole(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ile=12;function ole(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!WT(e,sle)&&WT(e,ale)){const n=rle(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function m8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=ND(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lle(o),v=VT,b=VT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=pC(T,k);v=O=>{const R=Math.exp(-k*T*O);return n-R*((E+k*T*P)/M*Math.sin(M*O)+P*Math.cos(M*O))},b=O=>{const R=Math.exp(-k*T*O);return k*T*R*(Math.sin(M*O)*(E+k*T*P)/M+P*Math.cos(M*O))-R*(Math.cos(M*O)*(E+k*T*P)-M*P*Math.sin(M*O))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*T*O),N=Math.min(M*O,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}m8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const VT=e=>0,Tv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function jx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=jx(l,s,e+1/3),o=jx(l,s,e),a=jx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const ule=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cle=[dC,Uc,$f],GT=e=>cle.find(t=>t.test(e)),DD=(e,t)=>{let n=GT(e),r=GT(t),i=n.parse(e),o=r.parse(t);n===$f&&(i=UT(i),n=Uc),r===$f&&(o=UT(o),r=Uc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=ule(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},gC=e=>typeof e=="number",dle=(e,t)=>n=>t(e(n)),mb=(...e)=>e.reduce(dle);function zD(e,t){return gC(e)?n=>Cr(e,t,n):Qi.test(e)?DD(e,t):FD(e,t)}const BD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>zD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function jT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=jT(e),i=jT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?mb(BD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hle=(e,t)=>n=>Cr(e,t,n);function ple(e){if(typeof e=="number")return hle;if(typeof e=="string")return Qi.test(e)?DD:FD;if(Array.isArray(e))return BD;if(typeof e=="object")return fle}function gle(e,t,n){const r=[],i=n||ple(e[0]),o=e.length-1;for(let a=0;an(Tv(e,t,r))}function vle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Tv(e[o],e[o+1],i);return t[o](s)}}function $D(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;Y5(o===t.length),Y5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gle(t,r,i),s=o===2?mle(e,a):vle(e,a);return n?l=>s(q5(e[0],e[o-1],l)):s}const vb=e=>t=>1-e(1-t),v8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yle=e=>t=>Math.pow(t,e),HD=e=>t=>t*t*((e+1)*t-e),ble=e=>{const t=HD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},WD=1.525,Sle=4/11,xle=8/11,wle=9/10,y8=e=>e,b8=yle(2),Cle=vb(b8),VD=v8(b8),UD=e=>1-Math.sin(Math.acos(e)),S8=vb(UD),_le=v8(S8),x8=HD(WD),kle=vb(x8),Ele=v8(x8),Ple=ble(WD),Tle=4356/361,Lle=35442/1805,Ale=16061/1805,K5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-K5(1-e*2)):.5*K5(e*2-1)+.5;function Ole(e,t){return e.map(()=>t||VD).splice(0,e.length-1)}function Rle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nle(e,t){return e.map(n=>n*t)}function V3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nle(r&&r.length===a.length?r:Rle(a),i);function l(){return $D(s,a,{ease:Array.isArray(n)?n:Ole(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const YT={keyframes:V3,spring:m8,decay:Dle};function zle(e){if(Array.isArray(e.to))return V3;if(YT[e.type])return YT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?V3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?m8:V3}const GD=1/60*1e3,Ble=typeof performance<"u"?()=>performance.now():()=>Date.now(),jD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ble()),GD);function Fle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fle(()=>Lv=!0),e),{}),Hle=t2.reduce((e,t)=>{const n=yb[t];return e[t]=(r,i=!1,o=!1)=>(Lv||Ule(),n.schedule(r,i,o)),e},{}),Wle=t2.reduce((e,t)=>(e[t]=yb[t].cancel,e),{});t2.reduce((e,t)=>(e[t]=()=>yb[t].process(_0),e),{});const Vle=e=>yb[e].process(_0),YD=e=>{Lv=!1,_0.delta=mC?GD:Math.max(Math.min(e-_0.timestamp,$le),1),_0.timestamp=e,vC=!0,t2.forEach(Vle),vC=!1,Lv&&(mC=!1,jD(YD))},Ule=()=>{Lv=!0,mC=!0,vC||jD(YD)},Gle=()=>_0;function qD(e,t,n=0){return e-t-n}function jle(e,t,n=0,r=!0){return r?qD(t+-e,t,n):t-(e-t)+n}function Yle(e,t,n,r){return r?e>=t+n:e<=-n}const qle=e=>{const t=({delta:n})=>e(n);return{start:()=>Hle.update(t,!0),stop:()=>Wle.update(t)}};function KD(e){var t,n,{from:r,autoplay:i=!0,driver:o=qle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=ND(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,O=!1,R=!0,N;const z=zle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=$D([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(R=k%2===0,a=jle(a,T,u,R)):(a=qD(a,T,u),l==="mirror"&&V.flipTarget()),O=!1,v&&v()}function j(){P.stop(),m&&m()}function ue(Q){if(R||(Q=-Q),a+=Q,!O){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),O=R?ne.done:a<=0}b?.(M),O&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function XD(e,t){return t?e*(1e3/t):0}function Kle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(M),(O=T.onUpdate)===null||O===void 0||O.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),O=M===n?-1:1;let R,N;const z=V=>{R=N,N=V,t=XD(V-R,Gle().delta),(O===1&&V>M||O===-1&&Vb?.stop()}}const yC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),qT=e=>yC(e)&&e.hasOwnProperty("z"),By=(e,t)=>Math.abs(e-t);function w8(e,t){if(gC(e)&&gC(t))return By(e,t);if(yC(e)&&yC(t)){const n=By(e.x,t.x),r=By(e.y,t.y),i=qT(e)&&qT(t)?By(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ZD=(e,t)=>1-3*t+3*e,QD=(e,t)=>3*t-6*e,JD=e=>3*e,X5=(e,t,n)=>((ZD(t,n)*e+QD(t,n))*e+JD(t))*e,ez=(e,t,n)=>3*ZD(t,n)*e*e+2*QD(t,n)*e+JD(t),Xle=1e-7,Zle=10;function Qle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=X5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Xle&&++s=eue?tue(a,g,e,n):m===0?g:Qle(a,s,s+Fy,e,n)}return a=>a===0||a===1?a:X5(o(a),t,r)}function rue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!OD()}function g(b,w){!h()||(RD(i.current,b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=mb(C0(window,"pointerup",g,l),C0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(b,w))}j5(i,"pointerdown",o?v:void 0,l),g8(u)}const iue="production",tz=typeof process>"u"||process.env===void 0?iue:"production",KT=new Set;function nz(e,t,n){e||KT.has(t)||(console.warn(t),n&&console.warn(n),KT.add(t))}const bC=new WeakMap,Yx=new WeakMap,oue=e=>{const t=bC.get(e.target);t&&t(e)},aue=e=>{e.forEach(oue)};function sue({root:e,...t}){const n=e||document;Yx.has(n)||Yx.set(n,{});const r=Yx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(aue,{root:e,...t})),r[i]}function lue(e,t,n){const r=sue(t);return bC.set(e,n),r.observe(e),()=>{bC.delete(e),r.unobserve(e)}}function uue({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fue:due)(a,o.current,e,i)}const cue={some:0,all:1};function due(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lue(n.current,s,l)},[e,r,i,o])}function fue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(tz!=="production"&&nz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Gc=e=>t=>(e(t),null),hue={inView:Gc(uue),tap:Gc(rue),focus:Gc(Wse),hover:Gc(Qse)};function C8(){const e=C.exports.useContext(c1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function pue(){return gue(C.exports.useContext(c1))}function gue(e){return e===null?!0:e.isPresent}function rz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mue={linear:y8,easeIn:b8,easeInOut:VD,easeOut:Cle,circIn:UD,circInOut:_le,circOut:S8,backIn:x8,backInOut:Ele,backOut:kle,anticipate:Ple,bounceIn:Mle,bounceInOut:Ile,bounceOut:K5},XT=e=>{if(Array.isArray(e)){Y5(e.length===4);const[t,n,r,i]=e;return nue(t,n,r,i)}else if(typeof e=="string")return mue[e];return e},vue=e=>Array.isArray(e)&&typeof e[0]!="number",ZT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),bf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),$y=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qx=()=>({type:"keyframes",ease:"linear",duration:.3}),yue=e=>({type:"keyframes",duration:.8,values:e}),QT={x:bf,y:bf,z:bf,rotate:bf,rotateX:bf,rotateY:bf,rotateZ:bf,scaleX:$y,scaleY:$y,scale:$y,opacity:qx,backgroundColor:qx,color:qx,default:$y},bue=(e,t)=>{let n;return Pv(t)?n=yue:n=QT[e]||QT.default,{to:t,...n(t)}},Sue={...mD,color:Qi,backgroundColor:Qi,outlineColor:Qi,fill:Qi,stroke:Qi,borderColor:Qi,borderTopColor:Qi,borderRightColor:Qi,borderBottomColor:Qi,borderLeftColor:Qi,filter:fC,WebkitFilter:fC},_8=e=>Sue[e];function k8(e,t){var n;let r=_8(e);return r!==fC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const xue={current:!1},iz=1/60*1e3,wue=typeof performance<"u"?()=>performance.now():()=>Date.now(),oz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wue()),iz);function Cue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cue(()=>Av=!0),e),{}),Ps=n2.reduce((e,t)=>{const n=bb[t];return e[t]=(r,i=!1,o=!1)=>(Av||Eue(),n.schedule(r,i,o)),e},{}),sh=n2.reduce((e,t)=>(e[t]=bb[t].cancel,e),{}),Kx=n2.reduce((e,t)=>(e[t]=()=>bb[t].process(k0),e),{}),kue=e=>bb[e].process(k0),az=e=>{Av=!1,k0.delta=SC?iz:Math.max(Math.min(e-k0.timestamp,_ue),1),k0.timestamp=e,xC=!0,n2.forEach(kue),xC=!1,Av&&(SC=!1,oz(az))},Eue=()=>{Av=!0,SC=!0,xC||oz(az)},wC=()=>k0;function sz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(sh.read(r),e(o-t))};return Ps.read(r,!0),()=>sh.read(r)}function Pue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Tue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Z5(o.duration)),o.repeatDelay&&(a.repeatDelay=Z5(o.repeatDelay)),e&&(a.ease=vue(e)?e.map(XT):XT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Lue(e,t){var n,r;return(r=(n=(E8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Aue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Mue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Aue(t),Pue(e)||(e={...e,...bue(n,t.to)}),{...t,...Tue(e)}}function Iue(e,t,n,r,i){const o=E8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=ZT(e,n);a==="none"&&s&&typeof n=="string"?a=k8(e,n):JT(a)&&typeof n=="string"?a=eL(n):!Array.isArray(n)&&JT(n)&&typeof a=="string"&&(n=eL(a));const l=ZT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Kle({...g,...o}):KD({...Mue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=kD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function JT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function eL(e){return typeof e=="number"?0:k8("",e)}function E8(e,t){return e[t]||e.default||e}function P8(e,t,n,r={}){return xue.current&&(r={type:!1}),t.start(i=>{let o;const a=Iue(e,t,n,r,i),s=Lue(r,e),l=()=>o=a();let u;return s?u=sz(l,Z5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Oue=e=>/^\-?\d*\.?\d+$/.test(e),Rue=e=>/^0[^.\s]+$/.test(e);function T8(e,t){e.indexOf(t)===-1&&e.push(t)}function L8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Hm{constructor(){this.subscriptions=[]}add(t){return T8(this.subscriptions,t),()=>L8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Due{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Hm,this.velocityUpdateSubscribers=new Hm,this.renderSubscribers=new Hm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=wC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ps.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Ps.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?XD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function j0(e){return new Due(e)}const lz=e=>t=>t.test(e),zue={test:e=>e==="auto",parse:e=>e},uz=[mh,wt,El,Ac,dse,cse,zue],Vg=e=>uz.find(lz(e)),Bue=[...uz,Qi,ku],Fue=e=>Bue.find(lz(e));function $ue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Hue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Sb(e,t,n){const r=e.getProps();return h8(r,t,n!==void 0?n:r.custom,$ue(e),Hue(e))}function Wue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,j0(n))}function Vue(e,t){const n=Sb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=kD(o[a]);Wue(e,a,s)}}function Uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;sCC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=CC(e,t,n);else{const i=typeof t=="function"?Sb(e,t,n.custom):t;r=cz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function CC(e,t,n={}){var r;const i=Sb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>cz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return que(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function cz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Xue(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&d1.has(m)&&(w={...w,type:!1,delay:0});let E=P8(m,v,b,w);Q5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vue(e,s)})}function que(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Kue).forEach((u,h)=>{a.push(CC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Kue(e,t){return e.sortNodePosition(t)}function Xue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const A8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Zue=[...A8].reverse(),Que=A8.length;function Jue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Yue(e,n,r)))}function ece(e){let t=Jue(e);const n=nce();let r=!0;const i=(l,u)=>{const h=Sb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const j=Array.isArray(O)?O:[O];let ue=j.reduce(i,{});N===!1&&(ue={});const{prevResolvedValues:W={}}=M,Q={...W,...ue},ne=ee=>{$=!0,b.delete(ee),M.needsAnimating[ee]=!0};for(const ee in Q){const K=ue[ee],G=W[ee];w.hasOwnProperty(ee)||(K!==G?Pv(K)&&Pv(G)?!rz(K,G)||V?ne(ee):M.protectedKeys[ee]=!0:K!==void 0?ne(ee):b.add(ee):K!==void 0&&b.has(ee)?ne(ee):M.protectedKeys[ee]=!0)}M.prevProp=O,M.prevResolvedValues=ue,M.isActive&&(w={...w,...ue}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(ee=>({animation:ee,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rz(t,e):!1}function Sf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nce(){return{[Yn.Animate]:Sf(!0),[Yn.InView]:Sf(),[Yn.Hover]:Sf(),[Yn.Tap]:Sf(),[Yn.Drag]:Sf(),[Yn.Focus]:Sf(),[Yn.Exit]:Sf()}}const rce={animation:Gc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=ece(e)),fb(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Gc(e=>{const{custom:t,visualElement:n}=e,[r,i]=C8(),o=C.exports.useContext(c1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class dz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=w8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=wC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Xx(h,this.transformPagePoint),PD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Ps.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Zx(Xx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},TD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=p8(t),o=Xx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=wC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Zx(o,this.history)),this.removeListeners=mb(C0(window,"pointermove",this.handlePointerMove),C0(window,"pointerup",this.handlePointerUp),C0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),sh.update(this.updatePoint)}}function Xx(e,t){return t?{point:t(e.point)}:e}function tL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx({point:e},t){return{point:e,delta:tL(e,fz(t)),offset:tL(e,ice(t)),velocity:oce(t,.1)}}function ice(e){return e[0]}function fz(e){return e[e.length-1]}function oce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=fz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Z5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fa(e){return e.max-e.min}function nL(e,t=0,n=.01){return w8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function aL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lce(e,{top:t,left:n,bottom:r,right:i}){return{x:aL(e.x,n,i),y:aL(e.y,t,r)}}function sL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Tv(t.min,t.max-r,e.min):r>i&&(n=Tv(e.min,e.max-i,t.min)),q5(0,1,n)}function dce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _C=.35;function fce(e=_C){return e===!1?e=0:e===!0&&(e=_C),{x:lL(e,"left","right"),y:lL(e,"top","bottom")}}function lL(e,t,n){return{min:uL(e,t),max:uL(e,n)}}function uL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const cL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Um=()=>({x:cL(),y:cL()}),dL=()=>({min:0,max:0}),Zr=()=>({x:dL(),y:dL()});function cl(e){return[e("x"),e("y")]}function hz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qx(e){return e===void 0||e===1}function kC({scale:e,scaleX:t,scaleY:n}){return!Qx(e)||!Qx(t)||!Qx(n)}function Ef(e){return kC(e)||pz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function pz(e){return fL(e.x)||fL(e.y)}function fL(e){return e&&e!=="0%"}function J5(e,t,n){const r=e-n,i=t*r;return n+i}function hL(e,t,n,r,i){return i!==void 0&&(e=J5(e,i,r)),J5(e,n,r)+t}function EC(e,t=0,n=1,r,i){e.min=hL(e.min,t,n,r,i),e.max=hL(e.max,t,n,r,i)}function gz(e,{x:t,y:n}){EC(e.x,t.translate,t.scale,t.originPoint),EC(e.y,n.translate,n.scale,n.originPoint)}function gce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(p8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ID(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(El.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=fa(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=xce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new dz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Hy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lce(r.layoutBox,t):this.constraints=!1,this.elastic=fce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=dce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yce(r,i.root,this.visualElement.getTransformPagePoint());let a=uce(i.layout.layoutBox,o);if(n){const s=n(hce(a));this.hasMutatedConstraints=!!s,s&&(a=hz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Hy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return P8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Hy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Hy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;bce.set(this.visualElement,this);const n=this.visualElement.current,r=C0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=gb(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=_C,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Hy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wce(e){const{dragControls:t,visualElement:n}=e,r=pb(()=>new Sce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(o8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new dz(h,l,{transformPagePoint:s})}j5(i,"pointerdown",o&&u),g8(()=>a.current&&a.current.end())}const _ce={pan:Gc(Cce),drag:Gc(wce)};function PC(e){return typeof e=="string"&&e.startsWith("var(--")}const vz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function kce(e){const t=vz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function TC(e,t,n=1){const[r,i]=kce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():PC(i)?TC(i,t,n+1):i}function Ece(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!PC(o))return;const a=TC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!PC(o))continue;const a=TC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Pce=new Set(["width","height","top","left","right","bottom","x","y"]),yz=e=>Pce.has(e),Tce=e=>Object.keys(e).some(yz),bz=(e,t)=>{e.set(t,!1),e.set(t)},gL=e=>e===mh||e===wt;var mL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(mL||(mL={}));const vL=(e,t)=>parseFloat(e.split(", ")[t]),yL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return vL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?vL(o[1],e):0}},Lce=new Set(["x","y","z"]),Ace=U5.filter(e=>!Lce.has(e));function Mce(e){const t=[];return Ace.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const bL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:yL(4,13),y:yL(5,14)},Ice=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=bL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);bz(h,s[u]),e[u]=bL[u](l,o)}),e},Oce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(yz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Vg(h);const m=t[l];let v;if(Pv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Vg(h);for(let E=w;E=0?window.pageYOffset:null,u=Ice(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),gh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Rce(e,t,n,r){return Tce(t)?Oce(e,t,n,r):{target:t,transitionEnd:r}}const Nce=(e,t,n,r)=>{const i=Ece(e,t,r);return t=i.target,r=i.transitionEnd,Rce(e,t,n,r)},LC={current:null},Sz={current:!1};function Dce(){if(Sz.current=!0,!!gh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>LC.current=e.matches;e.addListener(t),t()}else LC.current=!1}function zce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ml(o))e.addValue(i,o),Q5(r)&&r.add(i);else if(Ml(a))e.addValue(i,j0(o)),Q5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,j0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const xz=Object.keys(kv),Bce=xz.length,SL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Fce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ps.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=hb(n),this.isVariantNode=oD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Ml(g)&&(g.set(a[h],!1),Q5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),Sz.current||Dce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:LC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),sh.update(this.notifyUpdate),sh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=d1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ps.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=j0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=h8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ml(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Hm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const wz=["initial",...A8],$ce=wz.length;class Cz extends Fce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=jue(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Uue(this,r,a);const s=Nce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Hce(e){return window.getComputedStyle(e)}class Wce extends Cz{readValueFromInstance(t,n){if(d1.has(n)){const r=_8(n);return r&&r.default||0}else{const r=Hce(t),i=(lD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mz(t,n)}build(t,n,r,i){u8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return f8(t)}renderInstance(t,n,r,i){xD(t,n,r,i)}}class Vce extends Cz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return d1.has(n)?((r=_8(n))===null||r===void 0?void 0:r.default)||0:(n=wD.has(n)?n:SD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return _D(t)}build(t,n,r,i){d8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){CD(t,n,r,i)}}const Uce=(e,t)=>s8(e)?new Vce(t,{enableHardwareAcceleration:!1}):new Wce(t,{enableHardwareAcceleration:!0});function xL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ug={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=xL(e,t.target.x),r=xL(e,t.target.y);return`${n}% ${r}%`}},wL="_$css",Gce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(vz,v=>(o.push(v),wL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(wL,()=>{const b=o[v];return v++,b})}return m}};class jce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ise(qce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ps.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Yce(e){const[t,n]=C8(),r=C.exports.useContext(a8);return x(jce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(aD),isPresent:t,safeToRemove:n})}const qce={borderRadius:{...Ug,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ug,borderTopRightRadius:Ug,borderBottomLeftRadius:Ug,borderBottomRightRadius:Ug,boxShadow:Gce},Kce={measureLayout:Yce};function Xce(e,t,n={}){const r=Ml(e)?e:j0(e);return P8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const _z=["TopLeft","TopRight","BottomLeft","BottomRight"],Zce=_z.length,CL=e=>typeof e=="string"?parseFloat(e):e,_L=e=>typeof e=="number"||wt.test(e);function Qce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jce(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,ede(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Tv(e,t,r))}function EL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){EL(e.x,t.x),EL(e.y,t.y)}function PL(e,t,n,r,i){return e-=t,e=J5(e,1/n,r),i!==void 0&&(e=J5(e,1/i,r)),e}function tde(e,t=0,n=1,r=.5,i,o=e,a=e){if(El.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=PL(e.min,t,n,s,i),e.max=PL(e.max,t,n,s,i)}function TL(e,t,[n,r,i],o,a){tde(e,t[n],t[r],t[i],t.scale,o,a)}const nde=["x","scaleX","originX"],rde=["y","scaleY","originY"];function LL(e,t,n,r){TL(e.x,t,nde,n?.x,r?.x),TL(e.y,t,rde,n?.y,r?.y)}function AL(e){return e.translate===0&&e.scale===1}function Ez(e){return AL(e.x)&&AL(e.y)}function Pz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ML(e){return fa(e.x)/fa(e.y)}function ide(e,t,n=.1){return w8(e,t)<=n}class ode{constructor(){this.members=[]}add(t){T8(this.members,t),t.scheduleRender()}remove(t){if(L8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function IL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const ade=(e,t)=>e.depth-t.depth;class sde{constructor(){this.children=[],this.isDirty=!1}add(t){T8(this.children,t),this.isDirty=!0}remove(t){L8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ade),this.isDirty=!1,this.children.forEach(t)}}const OL=["","X","Y","Z"],RL=1e3;let lde=0;function Tz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=lde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hde),this.nodes.forEach(pde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=sz(v,250),Bm.hasAnimatedSinceResize&&(Bm.hasAnimatedSinceResize=!1,this.nodes.forEach(DL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bde,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Pz(this.targetLayout,w)||b,V=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...E8(O,"layout"),onPlay:R,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&DL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,sh.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;zL(v.x,a.x,M),zL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Vm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vde(this.relativeTarget,this.relativeTargetOrigin,b,M)),w&&(this.animationValues=m,Qce(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(sh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ps.update(()=>{Bm.hasAnimatedSinceResize=!0,this.currentAnimation=Xce(0,RL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,RL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Lz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=fa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=fa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Wm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new ode),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(NL),this.root.sharedNodes.clear()}}}function ude(e){e.updateLayout()}function cde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(b);b.min=o[v].min,b.max=b.min+w}):Lz(s,i.layoutBox,o)&&cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(o[v]);b.max=b.min+w});const u=Um();Wm(u,o,i.layoutBox);const h=Um();l?Wm(h,e.applyTransform(a,!0),i.measuredBox):Wm(h,o,i.layoutBox);const g=!Ez(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:w}=v;if(b&&w){const E=Zr();Vm(E,i.layoutBox,b.layoutBox);const P=Zr();Vm(P,o,w.layoutBox),Pz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dde(e){e.clearSnapshot()}function NL(e){e.clearMeasurements()}function fde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hde(e){e.resolveTargetDelta()}function pde(e){e.calcProjection()}function gde(e){e.resetRotation()}function mde(e){e.removeLeadSnapshot()}function zL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function BL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function vde(e,t,n,r){BL(e.x,t.x,n.x,r),BL(e.y,t.y,n.y,r)}function yde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bde={duration:.45,ease:[.4,0,.1,1]};function Sde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function FL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function xde(e){FL(e.x),FL(e.y)}function Lz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ide(ML(t),ML(n),.2)}const wde=Tz({attachResizeListener:(e,t)=>gb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jx={current:void 0},Cde=Tz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jx.current){const e=new wde(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Jx.current=e}return Jx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),_de={...rce,...hue,..._ce,...Kce},zl=nse((e,t)=>Hse(e,t,_de,Uce,Cde));function Az(){const e=C.exports.useRef(!1);return W5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function kde(){const e=Az(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Ps.postRender(r),[r]),t]}class Ede extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Pde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(Ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const ew=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=pb(Tde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Pde,{isPresent:n,children:e})),x(c1.Provider,{value:u,children:e})};function Tde(){return new Map}const $p=e=>e.key||"";function Lde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ade(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const xd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",nz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=kde();const l=C.exports.useContext(a8).forceRender;l&&(s=l);const u=Az(),h=Ade(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(W5(()=>{w.current=!1,Lde(h,b),v.current=g}),g8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(ew,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=b.get(T);if(!M)return;const O=E.indexOf(T),R=()=>{b.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(ew,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(ew,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),tz!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var vl=function(){return vl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function AC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Mde(){return!1}var Ide=e=>{const{condition:t,message:n}=e;t&&Mde()&&console.warn(n)},Hf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Gg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function MC(e){switch(e?.direction??"right"){case"right":return Gg.slideRight;case"left":return Gg.slideLeft;case"bottom":return Gg.slideDown;case"top":return Gg.slideUp;default:return Gg.slideRight}}var Zf={enter:{duration:.2,ease:Hf.easeOut},exit:{duration:.1,ease:Hf.easeIn}},Ts={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Ode=e=>e!=null&&parseInt(e.toString(),10)>0,HL={exit:{height:{duration:.2,ease:Hf.ease},opacity:{duration:.3,ease:Hf.ease}},enter:{height:{duration:.3,ease:Hf.ease},opacity:{duration:.4,ease:Hf.ease}}},Rde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Ode(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ts.exit(HL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ts.enter(HL.enter,i)})},Iz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ide({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(xd,{initial:!1,custom:w,children:E&&ae.createElement(zl.div,{ref:t,...g,className:r2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Rde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Iz.displayName="Collapse";var Nde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ts.enter(Zf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ts.exit(Zf.exit,n),transitionEnd:t?.exit})},Oz={initial:"exit",animate:"enter",exit:"exit",variants:Nde},Dde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(xd,{custom:m,children:g&&ae.createElement(zl.div,{ref:n,className:r2("chakra-fade",o),custom:m,...Oz,animate:h,...u})})});Dde.displayName="Fade";var zde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ts.exit(Zf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ts.enter(Zf.enter,n),transitionEnd:e?.enter})},Rz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(xd,{custom:b,children:m&&ae.createElement(zl.div,{ref:n,className:r2("chakra-offset-slide",s),...Rz,animate:v,custom:b,...g})})});Bde.displayName="ScaleFade";var WL={exit:{duration:.15,ease:Hf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Fde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=MC({direction:e});return{...i,transition:t?.exit??Ts.exit(WL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=MC({direction:e});return{...i,transition:n?.enter??Ts.enter(WL.enter,r),transitionEnd:t?.enter}}},Nz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=MC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(xd,{custom:P,children:w&&ae.createElement(zl.div,{...m,ref:n,initial:"exit",className:r2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Fde,style:b,...g})})});Nz.displayName="Slide";var $de={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ts.exit(Zf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ts.enter(Zf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ts.exit(Zf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},IC={initial:"initial",animate:"enter",exit:"exit",variants:$de},Hde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(xd,{custom:w,children:v&&ae.createElement(zl.div,{ref:n,className:r2("chakra-offset-slide",a),custom:w,...IC,animate:b,...m})})});Hde.displayName="SlideFade";var i2=(...e)=>e.filter(Boolean).join(" ");function Wde(){return!1}var xb=e=>{const{condition:t,message:n}=e;t&&Wde()&&console.warn(n)};function tw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Vde,wb]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Ude,M8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Gde,bTe,jde,Yde]=rD(),Wf=ke(function(t,n){const{getButtonProps:r}=M8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...wb().button};return ae.createElement(Se.button,{...i,className:i2("chakra-accordion__button",t.className),__css:a})});Wf.displayName="AccordionButton";function qde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zde(e),Qde(e);const s=jde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=cb({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kde,I8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Xde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=I8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Jde(e);const{register:m,index:v,descendants:b}=Yde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);efe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=b.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=b.prevEnabled(v);j?.node.focus()},Home:()=>{const j=b.firstEnabled();j?.node.focus()},End:()=>{const j=b.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:tw(V.onClick,T),onFocus:tw(V.onFocus,O),onKeyDown:tw(V.onKeyDown,M)}},[h,t,w,T,O,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function Zde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;xb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Qde(e){xb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Jde(e){xb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function efe(e){xb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Vf(e){const{isOpen:t,isDisabled:n}=M8(),{reduceMotion:r}=I8(),i=i2("chakra-accordion__icon",e.className),o=wb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Vf.displayName="AccordionIcon";var Uf=ke(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Xde(t),l={...wb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(Ude,{value:u},ae.createElement(Se.div,{ref:n,...o,className:i2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Uf.displayName="AccordionItem";var Gf=ke(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=I8(),{getPanelProps:s,isOpen:l}=M8(),u=s(o,n),h=i2("chakra-accordion__panel",r),g=wb();a||delete u.hidden;const m=ae.createElement(Se.div,{...u,__css:g.panel,className:h});return a?m:x(Iz,{in:l,...i,children:m})});Gf.displayName="AccordionPanel";var Cb=ke(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=qde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Gde,{value:l},ae.createElement(Kde,{value:h},ae.createElement(Vde,{value:o},ae.createElement(Se.div,{ref:i,...s,className:i2("chakra-accordion",r.className),__css:o.root},t))))});Cb.displayName="Accordion";var tfe=(...e)=>e.filter(Boolean).join(" "),nfe=Sd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),o2=ke((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=tfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${nfe} ${o} linear infinite`,...n};return ae.createElement(Se.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(Se.span,{srOnly:!0},r))});o2.displayName="Spinner";var _b=(...e)=>e.filter(Boolean).join(" ");function rfe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function ife(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function VL(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ofe,afe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[sfe,O8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Dz={info:{icon:ife,colorScheme:"blue"},warning:{icon:VL,colorScheme:"orange"},success:{icon:rfe,colorScheme:"green"},error:{icon:VL,colorScheme:"red"},loading:{icon:o2,colorScheme:"blue"}};function lfe(e){return Dz[e].colorScheme}function ufe(e){return Dz[e].icon}var zz=ke(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??lfe(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(ofe,{value:{status:r}},ae.createElement(sfe,{value:s},ae.createElement(Se.div,{role:i?"alert":void 0,ref:n,...o,className:_b("chakra-alert",t.className),__css:l})))});zz.displayName="Alert";var Bz=ke(function(t,n){const i={display:"inline",...O8().description};return ae.createElement(Se.div,{ref:n,...t,className:_b("chakra-alert__desc",t.className),__css:i})});Bz.displayName="AlertDescription";function Fz(e){const{status:t}=afe(),n=ufe(t),r=O8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(Se.span,{display:"inherit",...e,className:_b("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Fz.displayName="AlertIcon";var $z=ke(function(t,n){const r=O8();return ae.createElement(Se.div,{ref:n,...t,className:_b("chakra-alert__title",t.className),__css:r.title})});$z.displayName="AlertTitle";function cfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return ks(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ffe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",e4=ke(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});e4.displayName="NativeImage";var kb=ke(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=dfe({...t,ignoreFallback:E}),k=ffe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:cfe(b,["onError","onLoad"])};return k?i||ae.createElement(Se.img,{as:e4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(Se.img,{as:e4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});kb.displayName="Image";ke((e,t)=>ae.createElement(Se.img,{ref:t,as:e4,className:"chakra-image",...e}));function Eb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var Pb=(...e)=>e.filter(Boolean).join(" "),UL=e=>e?"":void 0,[hfe,pfe]=_n({strict:!1,name:"ButtonGroupContext"});function OC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Pb("chakra-button__icon",n);return ae.createElement(Se.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}OC.displayName="ButtonIcon";function RC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(o2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=Pb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(Se.div,{className:l,...s,__css:h},i)}RC.displayName="ButtonSpinner";function gfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=ke((e,t)=>{const n=pfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=vn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=gfe(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(Se.button,{disabled:i||o,ref:zae(t,T),as:E,type:m??M,"data-active":UL(a),"data-loading":UL(o),__css:k,className:Pb("chakra-button",w),...P},o&&b==="start"&&x(RC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(Se.span,{opacity:0},x(GL,{...O})):x(GL,{...O}),o&&b==="end"&&x(RC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function GL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return J(Ln,{children:[t&&x(OC,{marginEnd:i,children:t}),r,n&&x(OC,{marginStart:i,children:n})]})}var ia=ke(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=Pb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(hfe,{value:m},ae.createElement(Se.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=ke((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var p1=(...e)=>e.filter(Boolean).join(" "),Wy=e=>e?"":void 0,nw=e=>e?!0:void 0;function jL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[mfe,Hz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[vfe,g1]=_n({strict:!1,name:"FormControlContext"});function yfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Wy(E),"data-disabled":Wy(i),"data-invalid":Wy(r),"data-readonly":Wy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:R}}var wd=ke(function(t,n){const r=Oi("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=yfe(i),l=p1("chakra-form-control",t.className);return ae.createElement(vfe,{value:s},ae.createElement(mfe,{value:r},ae.createElement(Se.div,{...o({},n),className:l,__css:r.container})))});wd.displayName="FormControl";var bfe=ke(function(t,n){const r=g1(),i=Hz(),o=p1("chakra-form__helper-text",t.className);return ae.createElement(Se.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});bfe.displayName="FormHelperText";function R8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=N8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":nw(n),"aria-required":nw(i),"aria-readonly":nw(r)}}function N8(e){const t=g1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:jL(t?.onFocus,h),onBlur:jL(t?.onBlur,g)}}var[Sfe,xfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wfe=ke((e,t)=>{const n=Oi("FormError",e),r=vn(e),i=g1();return i?.isInvalid?ae.createElement(Sfe,{value:n},ae.createElement(Se.div,{...i?.getErrorMessageProps(r,t),className:p1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});wfe.displayName="FormErrorMessage";var Cfe=ke((e,t)=>{const n=xfe(),r=g1();if(!r?.isInvalid)return null;const i=p1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Cfe.displayName="FormErrorIcon";var vh=ke(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Wz,{}),optionalIndicator:l=null,...u}=i,h=g1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(Se.label,{...g,className:p1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});vh.displayName="FormLabel";var Wz=ke(function(t,n){const r=g1(),i=Hz();if(!r?.isRequired)return null;const o=p1("chakra-form__required-indicator",t.className);return ae.createElement(Se.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Wz.displayName="RequiredIndicator";function cd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var D8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},_fe=Se("span",{baseStyle:D8});_fe.displayName="VisuallyHidden";var kfe=Se("input",{baseStyle:D8});kfe.displayName="VisuallyHiddenInput";var YL=!1,Tb=null,Y0=!1,NC=new Set,Efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Pfe(e){return!(e.metaKey||!Efe&&e.altKey||e.ctrlKey)}function z8(e,t){NC.forEach(n=>n(e,t))}function qL(e){Y0=!0,Pfe(e)&&(Tb="keyboard",z8("keyboard",e))}function Pp(e){Tb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Y0=!0,z8("pointer",e))}function Tfe(e){e.target===window||e.target===document||(Y0||(Tb="keyboard",z8("keyboard",e)),Y0=!1)}function Lfe(){Y0=!1}function KL(){return Tb!=="pointer"}function Afe(){if(typeof window>"u"||YL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Y0=!0,e.apply(this,n)},document.addEventListener("keydown",qL,!0),document.addEventListener("keyup",qL,!0),window.addEventListener("focus",Tfe,!0),window.addEventListener("blur",Lfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),YL=!0}function Mfe(e){Afe(),e(KL());const t=()=>e(KL());return NC.add(t),()=>{NC.delete(t)}}var[STe,Ife]=_n({name:"CheckboxGroupContext",strict:!1}),Ofe=(...e)=>e.filter(Boolean).join(" "),Zi=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Rfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Nfe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Dfe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function zfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Dfe:Nfe;return n||t?ae.createElement(Se.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Bfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Vz(e={}){const t=N8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...O}=e,R=Bfe(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[ee,K]=C.exports.useState(!1);C.exports.useEffect(()=>Mfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Me]=C.exports.useState(!!h),xe=g!==void 0,be=xe?g:me,Ie=C.exports.useCallback(Ee=>{if(r||n){Ee.preventDefault();return}xe||Me(be?Ee.target.checked:b?!0:Ee.target.checked),N?.(Ee)},[r,n,be,xe,b,N]);ks(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),cd(()=>{n&&W(!1)},[n,W]),ks(()=>{const Ee=G.current;!Ee?.form||(Ee.form.onreset=()=>{Me(!!h)})},[]);const We=n&&!m,De=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!0)},[K]),Qe=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!1)},[K]);ks(()=>{if(!G.current)return;G.current.checked!==be&&Me(G.current.checked)},[G.current]);const st=C.exports.useCallback((Ee={},Je=null)=>{const Lt=it=>{ue&&it.preventDefault(),K(!0)};return{...Ee,ref:Je,"data-active":Zi(ee),"data-hover":Zi(Q),"data-checked":Zi(be),"data-focus":Zi(ue),"data-focus-visible":Zi(ue&&$),"data-indeterminate":Zi(b),"data-disabled":Zi(n),"data-invalid":Zi(o),"data-readonly":Zi(r),"aria-hidden":!0,onMouseDown:Ta(Ee.onMouseDown,Lt),onMouseUp:Ta(Ee.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Ee.onMouseEnter,()=>ne(!0)),onMouseLeave:Ta(Ee.onMouseLeave,()=>ne(!1))}},[ee,be,n,ue,$,Q,b,o,r]),Ct=C.exports.useCallback((Ee={},Je=null)=>({...R,...Ee,ref:Wn(Je,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:Ta(Ee.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[R,n,be,o,X]),ht=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Wn(G,Je),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ta(Ee.onChange,Ie),onBlur:Ta(Ee.onBlur,z,()=>W(!1)),onFocus:Ta(Ee.onFocus,V,()=>W(!0)),onKeyDown:Ta(Ee.onKeyDown,De),onKeyUp:Ta(Ee.onKeyUp,Qe),required:i,checked:be,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:D8}),[w,E,a,Ie,z,V,De,Qe,i,be,We,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Je,onMouseDown:Ta(Ee.onMouseDown,XL),onTouchStart:Ta(Ee.onTouchStart,XL),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:ue,isChecked:be,isActive:ee,isHovered:Q,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ct,getCheckboxProps:st,getInputProps:ht,getLabelProps:ut,htmlProps:R}}function XL(e){e.preventDefault(),e.stopPropagation()}var Ffe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},$fe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Hfe=Sd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Wfe=Sd({from:{opacity:0},to:{opacity:1}}),Vfe=Sd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Uz=ke(function(t,n){const r=Ife(),i={...r,...t},o=Oi("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(zfe,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Rfe(r.onChange,w));const{state:M,getInputProps:O,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Vz({...P,isDisabled:b,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Wfe} 20ms linear, ${Vfe} 200ms linear`:`${Hfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(Se.label,{__css:{...$fe,...o.container},className:Ofe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),ae.createElement(Se.span,{__css:{...Ffe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&ae.createElement(Se.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Uz.displayName="Checkbox";function Ufe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Lb=ke(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(Se.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Ufe,{width:"1em",height:"1em"}))});Lb.displayName="CloseButton";function Gfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function B8(e,t){let n=Gfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function DC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function t4(e,t,n){return(e-t)*100/(n-t)}function Gz(e,t,n){return(n-t)*e+t}function zC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=DC(n);return B8(r,i)}function E0(e,t,n){return e==null?e:(nr==null?"":rw(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=jz(Mc(v),o),w=n??b,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Mc($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=E0(j,a,s)),B8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Mc($):j=Mc(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Mc(-$):j=Mc(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=rw(r,o,n)??a,E($)},[r,n,o,E,a]),O=C.exports.useCallback($=>{const j=rw($,o,w)??a;E(j)},[w,o,E,a]),R=Mc(v);return{isOutOfRange:R>s||Rx(ab,{styles:Yz}),qfe=()=>x(ab,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Yz} + `});function Qf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kfe(e){return"current"in e}var qz=()=>typeof window<"u";function Xfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zfe=e=>qz()&&e.test(navigator.vendor),Qfe=e=>qz()&&e.test(Xfe()),Jfe=()=>Qfe(/mac|iphone|ipad|ipod/i),ehe=()=>Jfe()&&Zfe(/apple/i);function the(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Qf(i,"pointerdown",o=>{if(!ehe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var nhe=UJ?C.exports.useLayoutEffect:C.exports.useEffect;function ZL(e,t=[]){const n=C.exports.useRef(e);return nhe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function rhe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ihe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Mv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=ZL(n),a=ZL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=rhe(r,s),g=ihe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:GJ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function F8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var $8=ke(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=vn(i),s=R8(a),l=Nr("chakra-input",t.className);return ae.createElement(Se.input,{size:r,...s,__css:o.field,ref:n,className:l})});$8.displayName="Input";$8.id="Input";var[ohe,Kz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ahe=ke(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=Eb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=F8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(Se.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ohe,{value:r,children:g}))});ahe.displayName="InputGroup";var she={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},lhe=Se("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),H8=ke(function(t,n){const{placement:r="left",...i}=t,o=she[r]??{},a=Kz();return x(lhe,{ref:n,...i,__css:{...a.addon,...o}})});H8.displayName="InputAddon";var Xz=ke(function(t,n){return x(H8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});Xz.displayName="InputLeftAddon";Xz.id="InputLeftAddon";var Zz=ke(function(t,n){return x(H8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});Zz.displayName="InputRightAddon";Zz.id="InputRightAddon";var uhe=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Ab=ke(function(t,n){const{placement:r="left",...i}=t,o=Kz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(uhe,{ref:n,__css:l,...i})});Ab.id="InputElement";Ab.displayName="InputElement";var Qz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(Ab,{ref:n,placement:"left",className:o,...i})});Qz.id="InputLeftElement";Qz.displayName="InputLeftElement";var Jz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(Ab,{ref:n,placement:"right",className:o,...i})});Jz.id="InputRightElement";Jz.displayName="InputRightElement";function che(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function dd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):che(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var dhe=ke(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(Se.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:dd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});dhe.displayName="AspectRatio";var fhe=ke(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return ae.createElement(Se.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});fhe.displayName="Badge";var Bl=Se("div");Bl.displayName="Box";var eB=ke(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Bl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});eB.displayName="Square";var hhe=ke(function(t,n){const{size:r,...i}=t;return x(eB,{size:r,ref:n,borderRadius:"9999px",...i})});hhe.displayName="Circle";var tB=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});tB.displayName="Center";var phe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ke(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(Se.div,{ref:n,__css:phe[r],...i,position:"absolute"})});var ghe=ke(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return ae.createElement(Se.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});ghe.displayName="Code";var mhe=ke(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});mhe.displayName="Container";var vhe=ke(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(Se.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});vhe.displayName="Divider";var en=ke(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(Se.div,{ref:n,__css:g,...h})});en.displayName="Flex";var nB=ke(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(Se.div,{ref:n,__css:w,...b})});nB.displayName="Grid";function QL(e){return dd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var yhe=ke(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=F8({gridArea:r,gridColumn:QL(i),gridRow:QL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(Se.div,{ref:n,__css:g,...h})});yhe.displayName="GridItem";var Jf=ke(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return ae.createElement(Se.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Jf.displayName="Heading";ke(function(t,n){const r=so("Mark",t),i=vn(t);return x(Bl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var bhe=ke(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return ae.createElement(Se.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});bhe.displayName="Kbd";var eh=ke(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return ae.createElement(Se.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});eh.displayName="Link";ke(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(Se.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[She,rB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),W8=ke(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=Eb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(She,{value:r},ae.createElement(Se.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});W8.displayName="List";var xhe=ke((e,t)=>{const{as:n,...r}=e;return x(W8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xhe.displayName="OrderedList";var whe=ke(function(t,n){const{as:r,...i}=t;return x(W8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});whe.displayName="UnorderedList";var Che=ke(function(t,n){const r=rB();return ae.createElement(Se.li,{ref:n,...t,__css:r.item})});Che.displayName="ListItem";var _he=ke(function(t,n){const r=rB();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});_he.displayName="ListIcon";var khe=ke(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=u1(),h=s?Phe(s,u):The(r);return x(nB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});khe.displayName="SimpleGrid";function Ehe(e){return typeof e=="number"?`${e}px`:e}function Phe(e,t){return dd(e,n=>{const r=Eae("sizes",n,Ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function The(e){return dd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var iB=Se("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});iB.displayName="Spacer";var BC="& > *:not(style) ~ *:not(style)";function Lhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[BC]:dd(n,i=>r[i])}}function Ahe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":dd(n,i=>r[i])}}var oB=e=>ae.createElement(Se.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});oB.displayName="StackItem";var V8=ke((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Lhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ahe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=Eb(l);return P?M:M.map((O,R)=>{const N=typeof O.key<"u"?O.key:R,z=R+1===M.length,$=g?x(oB,{children:O},N):O;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),ue=z?null:j;return J(C.exports.Fragment,{children:[$,ue]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(Se.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[BC]:b[BC]},...m},k)});V8.displayName="Stack";var aB=ke((e,t)=>x(V8,{align:"center",...e,direction:"row",ref:t}));aB.displayName="HStack";var sB=ke((e,t)=>x(V8,{align:"center",...e,direction:"column",ref:t}));sB.displayName="VStack";var Po=ke(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=F8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(Se.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function JL(e){return typeof e=="number"?`${e}px`:e}var Mhe=ke(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>dd(w,k=>JL(Y6("space",k)(P))),"--chakra-wrap-y-spacing":P=>dd(E,k=>JL(Y6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(lB,{children:w},E)):a,[a,g]);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(Se.ul,{className:"chakra-wrap__list",__css:v},b))});Mhe.displayName="Wrap";var lB=ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});lB.displayName="WrapItem";var Ihe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},uB=Ihe,Tp=()=>{},Ohe={document:uB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Rhe=Ohe,Nhe={window:Rhe,document:uB},cB=typeof window<"u"?{window,document}:Nhe,dB=C.exports.createContext(cB);dB.displayName="EnvironmentContext";function fB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:cB},[r,n]);return J(dB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}fB.displayName="EnvironmentProvider";var Dhe=e=>e?"":void 0;function zhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function iw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Bhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=zhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&iw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),ue=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),ee=Wn(t,M);return w?{...b,ref:ee,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:ee,role:"button","data-active":Dhe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:N,onMouseDown:ue,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function hB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function pB(e){if(!hB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Fhe(e){var t;return((t=gB(e))==null?void 0:t.defaultView)??window}function gB(e){return hB(e)?e.ownerDocument:document}function $he(e){return gB(e).activeElement}var mB=e=>e.hasAttribute("tabindex"),Hhe=e=>mB(e)&&e.tabIndex===-1;function Whe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function vB(e){return e.parentElement&&vB(e.parentElement)?!0:e.hidden}function Vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function yB(e){if(!pB(e)||vB(e)||Whe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Vhe(e)?!0:mB(e)}function Uhe(e){return e?pB(e)&&yB(e)&&!Hhe(e):!1}var Ghe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],jhe=Ghe.join(),Yhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function bB(e){const t=Array.from(e.querySelectorAll(jhe));return t.unshift(e),t.filter(n=>yB(n)&&Yhe(n))}function qhe(e){const t=e.current;if(!t)return!1;const n=$he(t);return!n||t.contains(n)?!1:!!Uhe(n)}function Khe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;cd(()=>{if(!o||qhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Xhe={preventScroll:!0,shouldFocus:!1};function Zhe(e,t=Xhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Qhe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);ks(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=bB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);cd(()=>{h()},[h]),Qf(a,"transitionend",h)}function Qhe(e){return"current"in e}var Oo="top",Ua="bottom",Ga="right",Ro="left",U8="auto",a2=[Oo,Ua,Ga,Ro],q0="start",Iv="end",Jhe="clippingParents",SB="viewport",jg="popper",epe="reference",eA=a2.reduce(function(e,t){return e.concat([t+"-"+q0,t+"-"+Iv])},[]),xB=[].concat(a2,[U8]).reduce(function(e,t){return e.concat([t,t+"-"+q0,t+"-"+Iv])},[]),tpe="beforeRead",npe="read",rpe="afterRead",ipe="beforeMain",ope="main",ape="afterMain",spe="beforeWrite",lpe="write",upe="afterWrite",cpe=[tpe,npe,rpe,ipe,ope,ape,spe,lpe,upe];function Il(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function lh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Ba(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function G8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function dpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ba(o)||!Il(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function fpe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Ba(i)||!Il(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const hpe={name:"applyStyles",enabled:!0,phase:"write",fn:dpe,effect:fpe,requires:["computeStyles"]};function Pl(e){return e.split("-")[0]}var th=Math.max,n4=Math.min,K0=Math.round;function FC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wB(){return!/^((?!chrome|android).)*safari/i.test(FC())}function X0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ba(e)&&(i=e.offsetWidth>0&&K0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&K0(r.height)/e.offsetHeight||1);var a=lh(e)?Ya(e):window,s=a.visualViewport,l=!wB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function j8(e){var t=X0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function CB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&G8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function ppe(e){return["table","td","th"].indexOf(Il(e))>=0}function Cd(e){return((lh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mb(e){return Il(e)==="html"?e:e.assignedSlot||e.parentNode||(G8(e)?e.host:null)||Cd(e)}function tA(e){return!Ba(e)||Eu(e).position==="fixed"?null:e.offsetParent}function gpe(e){var t=/firefox/i.test(FC()),n=/Trident/i.test(FC());if(n&&Ba(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=Mb(e);for(G8(i)&&(i=i.host);Ba(i)&&["html","body"].indexOf(Il(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function s2(e){for(var t=Ya(e),n=tA(e);n&&ppe(n)&&Eu(n).position==="static";)n=tA(n);return n&&(Il(n)==="html"||Il(n)==="body"&&Eu(n).position==="static")?t:n||gpe(e)||t}function Y8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Gm(e,t,n){return th(e,n4(t,n))}function mpe(e,t,n){var r=Gm(e,t,n);return r>n?n:r}function _B(){return{top:0,right:0,bottom:0,left:0}}function kB(e){return Object.assign({},_B(),e)}function EB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var vpe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,kB(typeof t!="number"?t:EB(t,a2))};function ype(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Pl(n.placement),l=Y8(s),u=[Ro,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=vpe(i.padding,n),m=j8(o),v=l==="y"?Oo:Ro,b=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=s2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+T,N=Gm(M,R,O),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function bpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!CB(t.elements.popper,i)||(t.elements.arrow=i))}const Spe={name:"arrow",enabled:!0,phase:"main",fn:ype,effect:bpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z0(e){return e.split("-")[1]}var xpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wpe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:K0(t*i)/i||0,y:K0(n*i)/i||0}}function nA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Ro,M=Oo,O=window;if(u){var R=s2(n),N="clientHeight",z="clientWidth";if(R===Ya(n)&&(R=Cd(n),Eu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Oo||(i===Ro||i===Ga)&&o===Iv){M=Ua;var V=g&&R===O&&O.visualViewport?O.visualViewport.height:R[N];w-=V-r.height,w*=l?1:-1}if(i===Ro||(i===Oo||i===Ua)&&o===Iv){T=Ga;var $=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&xpe),ue=h===!0?wpe({x:v,y:w}):{x:v,y:w};if(v=ue.x,w=ue.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Cpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Pl(t.placement),variation:Z0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,nA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,nA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _pe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cpe,data:{}};var Vy={passive:!0};function kpe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Vy)}),s&&l.addEventListener("resize",n.update,Vy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Vy)}),s&&l.removeEventListener("resize",n.update,Vy)}}const Epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kpe,data:{}};var Ppe={left:"right",right:"left",bottom:"top",top:"bottom"};function G3(e){return e.replace(/left|right|bottom|top/g,function(t){return Ppe[t]})}var Tpe={start:"end",end:"start"};function rA(e){return e.replace(/start|end/g,function(t){return Tpe[t]})}function q8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function K8(e){return X0(Cd(e)).left+q8(e).scrollLeft}function Lpe(e,t){var n=Ya(e),r=Cd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=wB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+K8(e),y:l}}function Ape(e){var t,n=Cd(e),r=q8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=th(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=th(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+K8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=th(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function X8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function PB(e){return["html","body","#document"].indexOf(Il(e))>=0?e.ownerDocument.body:Ba(e)&&X8(e)?e:PB(Mb(e))}function jm(e,t){var n;t===void 0&&(t=[]);var r=PB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],X8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(jm(Mb(a)))}function $C(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Mpe(e,t){var n=X0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function iA(e,t,n){return t===SB?$C(Lpe(e,n)):lh(t)?Mpe(t,n):$C(Ape(Cd(e)))}function Ipe(e){var t=jm(Mb(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Ba(e)?s2(e):e;return lh(r)?t.filter(function(i){return lh(i)&&CB(i,r)&&Il(i)!=="body"}):[]}function Ope(e,t,n,r){var i=t==="clippingParents"?Ipe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=iA(e,u,r);return l.top=th(h.top,l.top),l.right=n4(h.right,l.right),l.bottom=n4(h.bottom,l.bottom),l.left=th(h.left,l.left),l},iA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function TB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Pl(r):null,o=r?Z0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Oo:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Ro:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Y8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case q0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Iv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ov(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Jhe:s,u=n.rootBoundary,h=u===void 0?SB:u,g=n.elementContext,m=g===void 0?jg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=kB(typeof E!="number"?E:EB(E,a2)),k=m===jg?epe:jg,T=e.rects.popper,M=e.elements[b?k:m],O=Ope(lh(M)?M:M.contextElement||Cd(e.elements.popper),l,h,a),R=X0(e.elements.reference),N=TB({reference:R,element:T,strategy:"absolute",placement:i}),z=$C(Object.assign({},T,N)),V=m===jg?z:R,$={top:O.top-V.top+P.top,bottom:V.bottom-O.bottom+P.bottom,left:O.left-V.left+P.left,right:V.right-O.right+P.right},j=e.modifiersData.offset;if(m===jg&&j){var ue=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Oo,Ua].indexOf(W)>=0?"y":"x";$[W]+=ue[ne]*Q})}return $}function Rpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?xB:l,h=Z0(r),g=h?s?eA:eA.filter(function(b){return Z0(b)===h}):a2,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=Ov(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Pl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Npe(e){if(Pl(e)===U8)return[];var t=G3(e);return[rA(e),t,rA(t)]}function Dpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Pl(E),k=P===E,T=l||(k||!b?[G3(E)]:Npe(E)),M=[E].concat(T).reduce(function(be,Ie){return be.concat(Pl(Ie)===U8?Rpe(t,{placement:Ie,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):Ie)},[]),O=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",ee=Ov(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Ro:W?Ua:Oo;O[ne]>R[ne]&&(K=G3(K));var G=G3(K),X=[];if(o&&X.push(ee[ue]<=0),s&&X.push(ee[K]<=0,ee[G]<=0),X.every(function(be){return be})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=b?3:1,me=function(Ie){var We=M.find(function(De){var Qe=N.get(De);if(Qe)return Qe.slice(0,Ie).every(function(st){return st})});if(We)return V=We,"break"},Me=ce;Me>0;Me--){var xe=me(Me);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const zpe={name:"flip",enabled:!0,phase:"main",fn:Dpe,requiresIfExists:["offset"],data:{_skip:!1}};function oA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function aA(e){return[Oo,Ga,Ua,Ro].some(function(t){return e[t]>=0})}function Bpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ov(t,{elementContext:"reference"}),s=Ov(t,{altBoundary:!0}),l=oA(a,r),u=oA(s,i,o),h=aA(l),g=aA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Fpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Bpe};function $pe(e,t,n){var r=Pl(e),i=[Ro,Oo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ro,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Hpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=xB.reduce(function(h,g){return h[g]=$pe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Wpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hpe};function Vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=TB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Upe={name:"popperOffsets",enabled:!0,phase:"read",fn:Vpe,data:{}};function Gpe(e){return e==="x"?"y":"x"}function jpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=Ov(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Pl(t.placement),k=Z0(t.placement),T=!k,M=Y8(P),O=Gpe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ue={x:0,y:0};if(!!R){if(o){var W,Q=M==="y"?Oo:Ro,ne=M==="y"?Ua:Ga,ee=M==="y"?"height":"width",K=R[M],G=K+E[Q],X=K-E[ne],ce=v?-z[ee]/2:0,me=k===q0?N[ee]:z[ee],Me=k===q0?-z[ee]:-N[ee],xe=t.elements.arrow,be=v&&xe?j8(xe):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_B(),We=Ie[Q],De=Ie[ne],Qe=Gm(0,N[ee],be[ee]),st=T?N[ee]/2-ce-Qe-We-$.mainAxis:me-Qe-We-$.mainAxis,Ct=T?-N[ee]/2+ce+Qe+De+$.mainAxis:Me+Qe+De+$.mainAxis,ht=t.elements.arrow&&s2(t.elements.arrow),ut=ht?M==="y"?ht.clientTop||0:ht.clientLeft||0:0,vt=(W=j?.[M])!=null?W:0,Ee=K+st-vt-ut,Je=K+Ct-vt,Lt=Gm(v?n4(G,Ee):G,K,v?th(X,Je):X);R[M]=Lt,ue[M]=Lt-K}if(s){var it,gt=M==="x"?Oo:Ro,an=M==="x"?Ua:Ga,_t=R[O],Ut=O==="y"?"height":"width",sn=_t+E[gt],yn=_t-E[an],Oe=[Oo,Ro].indexOf(P)!==-1,Xe=(it=j?.[O])!=null?it:0,Xt=Oe?sn:_t-N[Ut]-z[Ut]-Xe+$.altAxis,Yt=Oe?_t+N[Ut]+z[Ut]-Xe-$.altAxis:yn,_e=v&&Oe?mpe(Xt,_t,Yt):Gm(v?Xt:sn,_t,v?Yt:yn);R[O]=_e,ue[O]=_e-_t}t.modifiersData[r]=ue}}const Ype={name:"preventOverflow",enabled:!0,phase:"main",fn:jpe,requiresIfExists:["offset"]};function qpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Kpe(e){return e===Ya(e)||!Ba(e)?q8(e):qpe(e)}function Xpe(e){var t=e.getBoundingClientRect(),n=K0(t.width)/e.offsetWidth||1,r=K0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Zpe(e,t,n){n===void 0&&(n=!1);var r=Ba(t),i=Ba(t)&&Xpe(t),o=Cd(t),a=X0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Il(t)!=="body"||X8(o))&&(s=Kpe(t)),Ba(t)?(l=X0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=K8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Qpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Jpe(e){var t=Qpe(e);return cpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function e0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function t0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var sA={placement:"bottom",modifiers:[],strategy:"absolute"};function lA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function o0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var a0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},s0e=e=>a0e[e],uA={scroll:!0,resize:!0};function l0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...uA,...e}}:t={enabled:e,options:uA},t}var u0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},c0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{cA(e)},effect:({state:e})=>()=>{cA(e)}},cA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,s0e(e.placement))},d0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{f0e(e)}},f0e=e=>{var t;if(!e.placement)return;const n=h0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},h0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},p0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{dA(e)},effect:({state:e})=>()=>{dA(e)}},dA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:o0e(e.placement)})},g0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},m0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function v0e(e,t="ltr"){var n;const r=((n=g0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:m0e[e]??r}function LB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=v0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!b.current||!w.current||(($=k.current)==null||$.call(k),E.current=i0e(b.current,w.current,{placement:P,modifiers:[p0e,d0e,c0e,{...u0e,enabled:!!m},{name:"eventListeners",...l0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!b.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{b.current=$,T()},[T]),O=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:ue,shadowColor:W,bg:Q,style:ne,...ee}=$;return{...ee,ref:j,"data-popper-arrow":"",style:y0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:O}}function y0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function AB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function b0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Qf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Fhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function MB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[S0e,x0e]=_n({strict:!1,name:"PortalManagerContext"});function IB(e){const{children:t,zIndex:n}=e;return x(S0e,{value:{zIndex:n},children:t})}IB.displayName="PortalManager";var[OB,w0e]=_n({strict:!1,name:"PortalContext"}),Z8="chakra-portal",C0e=".chakra-portal",_0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),k0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=w0e(),l=x0e();ks(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=Z8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(_0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Dl.exports.createPortal(x(OB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},E0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=Z8),l},[i]),[,s]=C.exports.useState({});return ks(()=>s({}),[]),ks(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Dl.exports.createPortal(x(OB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(E0e,{containerRef:t,...n}):x(k0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=Z8;yh.selector=C0e;yh.displayName="Portal";var P0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Uy=new WeakMap,Gy={},ow=0,RB=function(e){return e&&(e.host||RB(e.parentNode))},T0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=RB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},L0e=function(e,t,n,r){var i=T0e(t,Array.isArray(e)?e:[e]);Gy[n]||(Gy[n]=new WeakMap);var o=Gy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&b&&Uy.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),ow++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Uy.has(g)||g.removeAttribute(r),Uy.delete(g)),v||g.removeAttribute(n)}),ow--,ow||(Ap=new WeakMap,Ap=new WeakMap,Uy=new WeakMap,Gy={})}},NB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||P0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),L0e(r,i,n,"aria-hidden")):function(){return null}};function Q8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},A0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",M0e=A0e,I0e=M0e;function DB(){}function zB(){}zB.resetWarningCache=DB;var O0e=function(){function e(r,i,o,a,s,l){if(l!==I0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:zB,resetWarningCache:DB};return n.PropTypes=n,n};Rn.exports=O0e();var HC="data-focus-lock",BB="data-focus-lock-disabled",R0e="data-no-focus-lock",N0e="data-autofocus-inside",D0e="data-no-autofocus";function z0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function B0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function FB(e,t){return B0e(t||null,function(n){return e.forEach(function(r){return z0e(r,n)})})}var aw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function $B(e){return e}function HB(e,t){t===void 0&&(t=$B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function J8(e,t){return t===void 0&&(t=$B),HB(e,t)}function WB(e){e===void 0&&(e={});var t=HB(null);return t.options=vl({async:!0,ssr:!1},e),t}var VB=function(e){var t=e.sideCar,n=Mz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...vl({},n)})};VB.isSideCarExport=!0;function F0e(e,t){return e.useMedium(t),VB}var UB=J8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),GB=J8(),$0e=J8(),H0e=WB({async:!0}),W0e=[],e_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,O=M===void 0?W0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,ue=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),ee=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(De){var Qe=u.current;if(Qe&&Qe.focus){var st=typeof j=="function"?j(Qe):j;if(st){var Ct=typeof st=="object"?st:void 0;u.current=null,De?Promise.resolve().then(function(){return Qe.focus(Ct)}):Qe.focus(Ct)}}},[j]),ce=C.exports.useCallback(function(De){l.current&&UB.useMedium(De)},[]),me=GB.useMedium,Me=C.exports.useCallback(function(De){s.current!==De&&(s.current=De,a(De))},[]),xe=An((r={},r[BB]=g&&"disabled",r[HC]=E,r),V),be=m!==!0,Ie=be&&m!=="tail",We=FB([n,Me]);return J(Ln,{children:[be&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:aw},"guard-nearest"):null],!g&&x($,{id:ee,sideCar:H0e,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:ue}),x(N,{ref:We,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Ie&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw})]})});e_.propTypes={};e_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const jB=e_;function WC(e,t){return WC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WC(e,t)}function t_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,WC(e,t)}function YB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){t_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return YB(l,"displayName","SideEffect("+n(i)+")"),l}}var Fl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Z0e)},Q0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],r_=Q0e.join(","),J0e="".concat(r_,", [data-focus-guard]"),nF=function(e,t){var n;return Fl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?J0e:r_)?[i]:[],nF(i))},[])},i_=function(e,t){return e.reduce(function(n,r){return n.concat(nF(r,t),r.parentNode?Fl(r.parentNode.querySelectorAll(r_)).filter(function(i){return i===r}):[])},[])},e1e=function(e){var t=e.querySelectorAll("[".concat(N0e,"]"));return Fl(t).map(function(n){return i_([n])}).reduce(function(n,r){return n.concat(r)},[])},o_=function(e,t){return Fl(e).filter(function(n){return XB(t,n)}).filter(function(n){return q0e(n)})},fA=function(e,t){return t===void 0&&(t=new Map),Fl(e).filter(function(n){return ZB(t,n)})},UC=function(e,t,n){return tF(o_(i_(e,n),t),!0,n)},hA=function(e,t){return tF(o_(i_(e),t),!1)},t1e=function(e,t){return o_(e1e(e),t)},Rv=function(e,t){return e.shadowRoot?Rv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Fl(e.children).some(function(n){return Rv(n,t)})},n1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},rF=function(e){return e.parentNode?rF(e.parentNode):e},a_=function(e){var t=VC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(HC);return n.push.apply(n,i?n1e(Fl(rF(r).querySelectorAll("[".concat(HC,'="').concat(i,'"]:not([').concat(BB,'="disabled"])')))):[r]),n},[])},iF=function(e){return e.activeElement?e.activeElement.shadowRoot?iF(e.activeElement.shadowRoot):e.activeElement:void 0},s_=function(){return document.activeElement?document.activeElement.shadowRoot?iF(document.activeElement.shadowRoot):document.activeElement:void 0},r1e=function(e){return e===document.activeElement},i1e=function(e){return Boolean(Fl(e.querySelectorAll("iframe")).some(function(t){return r1e(t)}))},oF=function(e){var t=document&&s_();return!t||t.dataset&&t.dataset.focusGuard?!1:a_(e).some(function(n){return Rv(n,t)||i1e(n)})},o1e=function(){var e=document&&s_();return e?Fl(document.querySelectorAll("[".concat(R0e,"]"))).some(function(t){return Rv(t,e)}):!1},a1e=function(e,t){return t.filter(eF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},l_=function(e,t){return eF(e)&&e.name?a1e(e,t):e},s1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(l_(n,e))}),e.filter(function(n){return t.has(n)})},pA=function(e){return e[0]&&e.length>1?l_(e[0],e):e[0]},gA=function(e,t){return e.length>1?e.indexOf(l_(e[t],e)):t},aF="NEW_FOCUS",l1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=n_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=s1e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=gA(e,0),k=gA(e,i-1);if(l===-1||h===-1)return aF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},u1e=function(e){return function(t){var n,r=(n=QB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},c1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=fA(r.filter(u1e(n)));return i&&i.length?pA(i):pA(fA(t))},GC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&GC(e.parentNode.host||e.parentNode,t),t},sw=function(e,t){for(var n=GC(e),r=GC(t),i=0;i=0)return o}return!1},sF=function(e,t,n){var r=VC(e),i=VC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=sw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=sw(o,l);u&&(!a||Rv(u,a)?a=u:a=sw(u,a))})}),a},d1e=function(e,t){return e.reduce(function(n,r){return n.concat(t1e(r,t))},[])},f1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(X0e)},h1e=function(e,t){var n=document&&s_(),r=a_(e).filter(r4),i=sF(n||e,e,r),o=new Map,a=hA(r,o),s=UC(r,o).filter(function(m){var v=m.node;return r4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=hA([i],o).map(function(m){var v=m.node;return v}),u=f1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=l1e(h,l,n,t);return g===aF?{node:c1e(a,h,d1e(r,o))}:g===void 0?g:u[g]}},p1e=function(e){var t=a_(e).filter(r4),n=sF(e,e,t),r=new Map,i=UC([n],r,!0),o=UC(t,r).filter(function(a){var s=a.node;return r4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:n_(s)}})},g1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},lw=0,uw=!1,m1e=function(e,t,n){n===void 0&&(n={});var r=h1e(e,t);if(!uw&&r){if(lw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),uw=!0,setTimeout(function(){uw=!1},1);return}lw++,g1e(r.node,n.focusOptions),lw--}};const lF=m1e;function uF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var v1e=function(){return document&&document.activeElement===document.body},y1e=function(){return v1e()||o1e()},P0=null,r0=null,T0=null,Nv=!1,b1e=function(){return!0},S1e=function(t){return(P0.whiteList||b1e)(t)},x1e=function(t,n){T0={observerNode:t,portaledElement:n}},w1e=function(t){return T0&&T0.portaledElement===t};function mA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var C1e=function(t){return t&&"current"in t?t.current:t},_1e=function(t){return t?Boolean(Nv):Nv==="meanwhile"},k1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},E1e=function(t,n){return n.some(function(r){return k1e(t,r,r)})},i4=function(){var t=!1;if(P0){var n=P0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||T0&&T0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(C1e).filter(Boolean));if((!h||S1e(h))&&(i||_1e(s)||!y1e()||!r0&&o)&&(u&&!(oF(g)||h&&E1e(h,g)||w1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=lF(g,r0,{focusOptions:l}),T0={})),Nv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=p1e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),mA(b,v.length,1,v),mA(b,-1,-1,v))}}}return t},cF=function(t){i4()&&t&&(t.stopPropagation(),t.preventDefault())},u_=function(){return uF(i4)},P1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||x1e(r,n)},T1e=function(){return null},dF=function(){Nv="just",setTimeout(function(){Nv="meanwhile"},0)},L1e=function(){document.addEventListener("focusin",cF),document.addEventListener("focusout",u_),window.addEventListener("blur",dF)},A1e=function(){document.removeEventListener("focusin",cF),document.removeEventListener("focusout",u_),window.removeEventListener("blur",dF)};function M1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function I1e(e){var t=e.slice(-1)[0];t&&!P0&&L1e();var n=P0,r=n&&t&&t.id===n.id;P0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),i4(),uF(i4)):(A1e(),r0=null)}UB.assignSyncMedium(P1e);GB.assignMedium(u_);$0e.assignMedium(function(e){return e({moveFocusInside:lF,focusInside:oF})});const O1e=V0e(M1e,I1e)(T1e);var fF=C.exports.forwardRef(function(t,n){return x(jB,{sideCar:O1e,ref:n,...t})}),hF=jB.propTypes||{};hF.sideCar;Q8(hF,["sideCar"]);fF.propTypes={};const R1e=fF;var pF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&bB(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(R1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};pF.displayName="FocusLock";var j3="right-scroll-bar-position",Y3="width-before-scroll-bar",N1e="with-scroll-bars-hidden",D1e="--removed-body-scroll-bar-size",gF=WB(),cw=function(){},Ib=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:cw,onWheelCapture:cw,onTouchMoveCapture:cw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Mz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=FB([n,t]),O=vl(vl({},k),i);return J(Ln,{children:[h&&x(T,{sideCar:gF,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),vl(vl({},O),{ref:M})):x(P,{...vl({},O,{className:l,ref:M}),children:s})]})});Ib.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ib.classNames={fullWidth:Y3,zeroRight:j3};var z1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=z1e();return t&&e.setAttribute("nonce",t),e}function F1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var H1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=B1e())&&(F1e(t,n),$1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W1e=function(){var e=H1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mF=function(){var e=W1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},V1e={left:0,top:0,right:0,gap:0},dw=function(e){return parseInt(e||"",10)||0},U1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[dw(n),dw(r),dw(i)]},G1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return V1e;var t=U1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},j1e=mF(),Y1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(N1e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(j3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Y3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(j3," .").concat(j3,` { + right: 0 `).concat(r,`; + } + + .`).concat(Y3," .").concat(Y3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(D1e,": ").concat(s,`px; + } +`)},q1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return G1e(i)},[i]);return x(j1e,{styles:Y1e(o,!t,i,n?"":"!important")})},jC=!1;if(typeof window<"u")try{var jy=Object.defineProperty({},"passive",{get:function(){return jC=!0,!0}});window.addEventListener("test",jy,jy),window.removeEventListener("test",jy,jy)}catch{jC=!1}var Mp=jC?{passive:!1}:!1,K1e=function(e){return e.tagName==="TEXTAREA"},vF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!K1e(e)&&n[t]==="visible")},X1e=function(e){return vF(e,"overflowY")},Z1e=function(e){return vF(e,"overflowX")},vA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=yF(e,n);if(r){var i=bF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Q1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},J1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yF=function(e,t){return e==="v"?X1e(t):Z1e(t)},bF=function(e,t){return e==="v"?Q1e(t):J1e(t)},ege=function(e,t){return e==="h"&&t==="rtl"?-1:1},tge=function(e,t,n,r,i){var o=ege(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=bF(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&yF(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Yy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yA=function(e){return[e.deltaX,e.deltaY]},bA=function(e){return e&&"current"in e?e.current:e},nge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rge=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},ige=0,Ip=[];function oge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(ige++)[0],o=C.exports.useState(function(){return mF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=AC([e.lockRef.current],(e.shards||[]).map(bA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Yy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=vA(N,R);if(!z)return!0;if(z?O=N:(O=N==="v"?"h":"v",z=vA(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=O),!O)return!0;var V=r.current||O;return tge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?yA(E):Yy(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&nge(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(bA).filter(Boolean).filter(function(O){return O.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Yy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,yA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Yy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,b=e.inert;return J(Ln,{children:[b?x(o,{styles:rge(i)}):null,v?x(q1e,{gapMode:"margin"}):null]})}const age=F0e(gF,oge);var SF=C.exports.forwardRef(function(e,t){return x(Ib,{...vl({},e,{ref:t,sideCar:age})})});SF.classNames=Ib.classNames;const xF=SF;var bh=(...e)=>e.filter(Boolean).join(" ");function cm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var sge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},YC=new sge;function lge(e,t){C.exports.useEffect(()=>(t&&YC.add(e),()=>{YC.remove(e)}),[t,e])}function uge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=dge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");cge(u,t&&a),lge(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),O=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:cm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!YC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:cm(z.onClick,R),onKeyDown:cm(z.onKeyDown,E),onMouseDown:cm(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:N}}function cge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return NB(e.current)},[t,e,n])}function dge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[fge,Sh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[hge,fd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),Q0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Oi("Modal",e),E={...uge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(hge,{value:E,children:x(fge,{value:b,children:x(xd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};Q0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};Q0.displayName="Modal";var Dv=ke((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=fd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=bh("chakra-modal__body",n),s=Sh();return ae.createElement(Se.div,{ref:t,className:a,id:i,...r,__css:s.body})});Dv.displayName="ModalBody";var c_=ke((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=fd(),a=bh("chakra-modal__close-btn",r),s=Sh();return x(Lb,{ref:t,__css:s.closeButton,className:a,onClick:cm(n,l=>{l.stopPropagation(),o()}),...i})});c_.displayName="ModalCloseButton";function wF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=fd(),[g,m]=C8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(pF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(xF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var pge={slideInBottom:{...IC,custom:{offsetY:16,reverse:!0}},slideInRight:{...IC,custom:{offsetX:16,reverse:!0}},scale:{...Rz,custom:{initialScale:.95,reverse:!0}},none:{}},gge=Se(zl.section),mge=e=>pge[e||"none"],CF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=mge(n),...i}=e;return x(gge,{ref:t,...r,...i})});CF.displayName="ModalTransition";var zv=ke((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=fd(),u=s(a,t),h=l(i),g=bh("chakra-modal__content",n),m=Sh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=fd();return ae.createElement(wF,null,ae.createElement(Se.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(CF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});zv.displayName="ModalContent";var Ob=ke((e,t)=>{const{className:n,...r}=e,i=bh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...Sh().footer};return ae.createElement(Se.footer,{ref:t,...r,__css:a,className:i})});Ob.displayName="ModalFooter";var Rb=ke((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=fd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=bh("chakra-modal__header",n),l={flex:0,...Sh().header};return ae.createElement(Se.header,{ref:t,className:a,id:i,...r,__css:l})});Rb.displayName="ModalHeader";var vge=Se(zl.div),J0=ke((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=bh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Sh().overlay},{motionPreset:u}=fd();return x(vge,{...i||(u==="none"?{}:Oz),__css:l,ref:t,className:a,...o})});J0.displayName="ModalOverlay";function _F(e){const{leastDestructiveRef:t,...n}=e;return x(Q0,{...n,initialFocusRef:t})}var kF=ke((e,t)=>x(zv,{ref:t,role:"alertdialog",...e})),[xTe,yge]=_n(),bge=Se(Nz),Sge=ke((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=fd(),h=s(a,t),g=l(o),m=bh("chakra-modal__content",n),v=Sh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=yge();return ae.createElement(wF,null,ae.createElement(Se.div,{...g,className:"chakra-modal__content-container",__css:w},x(bge,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});Sge.displayName="DrawerContent";function xge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var EF=(...e)=>e.filter(Boolean).join(" "),fw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var wge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),Cge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function SA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var _ge=50,xA=300;function kge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);xge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?_ge:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},xA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},xA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Ege=/^[Ee0-9+\-.]$/;function Pge(e){return Ege.test(e)}function Tge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Lge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:O,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...ue}=e,W=dr(O),Q=dr(R),ne=dr(N),ee=dr(V??Pge),K=dr(z),G=jfe(e),{update:X,increment:ce,decrement:me}=G,[Me,xe]=C.exports.useState(!1),be=!(s||l),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useRef(null),st=C.exports.useCallback(_e=>_e.split("").filter(ee).join(""),[ee]),Ct=C.exports.useCallback(_e=>j?.(_e)??_e,[j]),ht=C.exports.useCallback(_e=>($?.(_e)??_e).toString(),[$]);cd(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Ie.current)return;if(Ie.current.value!=G.value){const It=Ct(Ie.current.value);G.setValue(st(It))}},[Ct,st]);const ut=C.exports.useCallback((_e=a)=>{be&&ce(_e)},[ce,be,a]),vt=C.exports.useCallback((_e=a)=>{be&&me(_e)},[me,be,a]),Ee=kge(ut,vt);SA(De,"disabled",Ee.stop,Ee.isSpinning),SA(Qe,"disabled",Ee.stop,Ee.isSpinning);const Je=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;const ze=Ct(_e.currentTarget.value);X(st(ze)),We.current={start:_e.currentTarget.selectionStart,end:_e.currentTarget.selectionEnd}},[X,st,Ct]),Lt=C.exports.useCallback(_e=>{var It;W?.(_e),We.current&&(_e.target.selectionStart=We.current.start??((It=_e.currentTarget.value)==null?void 0:It.length),_e.currentTarget.selectionEnd=We.current.end??_e.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;Tge(_e,ee)||_e.preventDefault();const It=gt(_e)*a,ze=_e.key,ln={ArrowUp:()=>ut(It),ArrowDown:()=>vt(It),Home:()=>X(i),End:()=>X(o)}[ze];ln&&(_e.preventDefault(),ln(_e))},[ee,a,ut,vt,X,i,o]),gt=_e=>{let It=1;return(_e.metaKey||_e.ctrlKey)&&(It=.1),_e.shiftKey&&(It=10),It},an=C.exports.useMemo(()=>{const _e=K?.(G.value);if(_e!=null)return _e;const It=G.value.toString();return It||void 0},[G.value,K]),_t=C.exports.useCallback(()=>{let _e=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(_e=o),G.cast(_e))},[G,o,i]),Ut=C.exports.useCallback(()=>{xe(!1),n&&_t()},[n,xe,_t]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var _e;(_e=Ie.current)==null||_e.focus()})},[t]),yn=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.up(),sn()},[sn,Ee]),Oe=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.down(),sn()},[sn,Ee]);Qf(()=>Ie.current,"wheel",_e=>{var It;const ot=(((It=Ie.current)==null?void 0:It.ownerDocument)??document).activeElement===Ie.current;if(!v||!ot)return;_e.preventDefault();const ln=gt(_e)*a,Bn=Math.sign(_e.deltaY);Bn===-1?ut(ln):Bn===1&&vt(ln)},{passive:!1});const Xe=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMax;return{..._e,ref:Wn(It,De),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||yn(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMax,r,yn,Ee.stop,l]),Xt=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMin;return{..._e,ref:Wn(It,Qe),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMin,r,Oe,Ee.stop,l]),Yt=C.exports.useCallback((_e={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:b,disabled:l,..._e,readOnly:_e.readOnly??s,"aria-readonly":_e.readOnly??s,"aria-required":_e.required??u,required:_e.required??u,ref:Wn(Ie,It),value:ht(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":fw(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:al(_e.onChange,Je),onKeyDown:al(_e.onKeyDown,it),onFocus:al(_e.onFocus,Lt,()=>xe(!0)),onBlur:al(_e.onBlur,Q,Ut)}),[P,m,g,M,T,ht,k,b,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,Je,it,Lt,Q,Ut]);return{value:ht(G.value),valueAsNumber:G.valueAsNumber,isFocused:Me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Xe,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:ue}}var[Age,Nb]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Mge,d_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),f_=ke(function(t,n){const r=Oi("NumberInput",t),i=vn(t),o=N8(i),{htmlProps:a,...s}=Lge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Mge,{value:l},ae.createElement(Age,{value:r},ae.createElement(Se.div,{...a,ref:n,className:EF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});f_.displayName="NumberInput";var PF=ke(function(t,n){const r=Nb();return ae.createElement(Se.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});PF.displayName="NumberInputStepper";var h_=ke(function(t,n){const{getInputProps:r}=d_(),i=r(t,n),o=Nb();return ae.createElement(Se.input,{...i,className:EF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});h_.displayName="NumberInputField";var TF=Se("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),p_=ke(function(t,n){const r=Nb(),{getDecrementButtonProps:i}=d_(),o=i(t,n);return x(TF,{...o,__css:r.stepper,children:t.children??x(wge,{})})});p_.displayName="NumberDecrementStepper";var g_=ke(function(t,n){const{getIncrementButtonProps:r}=d_(),i=r(t,n),o=Nb();return x(TF,{...i,__css:o.stepper,children:t.children??x(Cge,{})})});g_.displayName="NumberIncrementStepper";var l2=(...e)=>e.filter(Boolean).join(" ");function Ige(e,...t){return Oge(e)?e(...t):e}var Oge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Rge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Nge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Dge,u2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Op={click:"click",hover:"hover"};function zge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Op.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=AB(e),M=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,ue]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,ee,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(Je=>`${Je}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Me,forceUpdate:xe}=LB({...w,enabled:E||!!b}),be=b0e({isOpen:E,ref:R});the({enabled:E,ref:O}),Khe(R,{focusRef:O,visible:E,shouldFocus:o&&u===Op.click}),Zhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===Op.click});const Ie=MB({wasSelected:z.current,enabled:m,mode:v,isSelected:be.present}),We=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,style:{...Je.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(R,Lt),children:Ie?Je.children:null,id:ee,tabIndex:-1,role:"dialog",onKeyDown:sl(Je.onKeyDown,gt=>{n&>.key==="Escape"&&P()}),onBlur:sl(Je.onBlur,gt=>{const an=wA(gt),_t=hw(R.current,an),Ut=hw(O.current,an);E&&t&&(!_t&&!Ut)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Op.hover&&(it.role="tooltip",it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(Je.onMouseLeave,gt=>{gt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Ie,ee,V,K,j,G,u,n,P,E,t,g,l,s]),De=C.exports.useCallback((Je={},Lt=null)=>me({...Je,style:{visibility:E?"visible":"hidden",...Je.style}},Lt),[E,me]),Qe=C.exports.useCallback((Je,Lt=null)=>({...Je,ref:Wn(Lt,M,X)}),[M,X]),st=C.exports.useRef(),Ct=C.exports.useRef(),ht=C.exports.useCallback(Je=>{M.current==null&&X(Je)},[X]),ut=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,ref:Wn(O,Lt,ht),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":ee};return u===Op.click&&(it.onClick=sl(Je.onClick,T)),u===Op.hover&&(it.onFocus=sl(Je.onFocus,()=>{st.current===void 0&&k()}),it.onBlur=sl(Je.onBlur,gt=>{const an=wA(gt),_t=!hw(R.current,an);E&&t&&_t&&P()}),it.onKeyDown=sl(Je.onKeyDown,gt=>{gt.key==="Escape"&&P()}),it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0,st.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(Je.onMouseLeave,()=>{N.current=!1,st.current&&(clearTimeout(st.current),st.current=void 0),Ct.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,ee,u,ht,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{st.current&&clearTimeout(st.current),Ct.current&&clearTimeout(Ct.current)},[]);const vt=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Ee=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:G,ref:Wn(Lt,it=>{ue(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:be.onComplete,onClose:P,getAnchorProps:Qe,getArrowProps:ce,getArrowInnerProps:Me,getPopoverPositionerProps:De,getPopoverProps:We,getTriggerProps:ut,getHeaderProps:vt,getBodyProps:Ee}}function hw(e,t){return e===t||e?.contains(t)}function wA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function m_(e){const t=Oi("Popover",e),{children:n,...r}=vn(e),i=u1(),o=zge({...r,direction:i.direction});return x(Nge,{value:o,children:x(Dge,{value:t,children:Ige(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}m_.displayName="Popover";function v_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=u2(),s=t??n??r;return ae.createElement(Se.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(Se.div,{className:l2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}v_.displayName="PopoverArrow";var Bge=ke(function(t,n){const{getBodyProps:r}=xh(),i=u2();return ae.createElement(Se.div,{...r(t,n),className:l2("chakra-popover__body",t.className),__css:i.body})});Bge.displayName="PopoverBody";var Fge=ke(function(t,n){const{onClose:r}=xh(),i=u2();return x(Lb,{size:"sm",onClick:r,className:l2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Fge.displayName="PopoverCloseButton";function $ge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Hge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Wge=Se(zl.section),LF=ke(function(t,n){const{variants:r=Hge,...i}=t,{isOpen:o}=xh();return ae.createElement(Wge,{ref:n,variants:$ge(r),initial:!1,animate:o?"enter":"exit",...i})});LF.displayName="PopoverTransition";var y_=ke(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=u2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(Se.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(LF,{...i,...a(o,n),onAnimationComplete:Rge(l,o.onAnimationComplete),className:l2("chakra-popover__content",t.className),__css:h}))});y_.displayName="PopoverContent";var Vge=ke(function(t,n){const{getHeaderProps:r}=xh(),i=u2();return ae.createElement(Se.header,{...r(t,n),className:l2("chakra-popover__header",t.className),__css:i.header})});Vge.displayName="PopoverHeader";function b_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}b_.displayName="PopoverTrigger";function Uge(e,t,n){return(e-t)*100/(n-t)}var Gge=Sd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),jge=Sd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Yge=Sd({"0%":{left:"-40%"},"100%":{left:"100%"}}),qge=Sd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function AF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=Uge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var MF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(Se.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${jge} 2s linear infinite`:void 0},...r})};MF.displayName="Shape";var qC=e=>ae.createElement(Se.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});qC.displayName="Circle";var Kge=ke((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=AF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Gge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(Se.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},J(MF,{size:n,isIndeterminate:v,children:[x(qC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(qC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Kge.displayName="CircularProgress";var[Xge,Zge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Qge=ke((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=AF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Zge().filledTrack};return ae.createElement(Se.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),IF=ke((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),E=Oi("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${qge} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Yge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return ae.createElement(Se.div,{ref:t,borderRadius:P,__css:R,...w},J(Xge,{value:E,children:[x(Qge,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});IF.displayName="Progress";var Jge=Se("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Jge.displayName="CircularProgressLabel";var eme=(...e)=>e.filter(Boolean).join(" "),tme=e=>e?"":void 0;function nme(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var OF=ke(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(Se.select,{...a,ref:n,className:eme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});OF.displayName="SelectField";var RF=ke((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,E]=nme(b,CQ),P=R8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(Se.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(OF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(NF,{"data-disabled":tme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});RF.displayName="Select";var rme=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ime=Se("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),NF=e=>{const{children:t=x(rme,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ime,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};NF.displayName="SelectIcon";function ome(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ame(e){const t=lme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function DF(e){return!!e.touches}function sme(e){return DF(e)&&e.touches.length>1}function lme(e){return e.view??window}function ume(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function cme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function zF(e,t="page"){return DF(e)?ume(e,t):cme(e,t)}function dme(e){return t=>{const n=ame(t);(!n||n&&t.button===0)&&e(t)}}function fme(e,t=!1){function n(i){e(i,{point:zF(i)})}return t?dme(n):n}function q3(e,t,n,r){return ome(e,t,fme(n,t==="pointerdown"),r)}function BF(e){const t=C.exports.useRef(null);return t.current=e,t}var hme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,sme(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:zF(e)},{timestamp:i}=JP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,pw(r,this.history)),this.removeListeners=mme(q3(this.win,"pointermove",this.onPointerMove),q3(this.win,"pointerup",this.onPointerUp),q3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=pw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=vme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=JP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,NJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=pw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),DJ.update(this.updatePoint)}};function CA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pw(e,t){return{point:e.point,delta:CA(e.point,t[t.length-1]),offset:CA(e.point,t[0]),velocity:gme(t,.1)}}var pme=e=>e*1e3;function gme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>pme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function mme(...e){return t=>e.reduce((n,r)=>r(n),t)}function gw(e,t){return Math.abs(e-t)}function _A(e){return"x"in e&&"y"in e}function vme(e,t){if(typeof e=="number"&&typeof t=="number")return gw(e,t);if(_A(e)&&_A(t)){const n=gw(e.x,t.x),r=gw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function FF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=BF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new hme(v,h.current,s)}return q3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function yme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var bme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Sme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function $F({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return bme(()=>{const a=e(),s=a.map((l,u)=>yme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(Sme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xme(e){return typeof e=="object"&&e!==null&&"current"in e}function wme(e){const[t]=$F({observeMutation:!1,getNodes(){return[xme(e)?e.current:e]}});return t}var Cme=Object.getOwnPropertyNames,_me=(e,t)=>function(){return e&&(t=(0,e[Cme(e)[0]])(e=0)),t},_d=_me({"../../../react-shim.js"(){}});_d();_d();_d();var Oa=e=>e?"":void 0,L0=e=>e?!0:void 0,kd=(...e)=>e.filter(Boolean).join(" ");_d();function A0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}_d();_d();function kme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function dm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var K3={width:0,height:0},qy=e=>e||K3;function HF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??K3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...dm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>qy(w).height>qy(E).height?w:E,K3):r.reduce((w,E)=>qy(w).width>qy(E).width?w:E,K3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...dm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...dm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...dm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function WF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Eme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:O=0,...R}=e,N=dr(m),z=dr(v),V=dr(w),$=WF({isReversed:a,direction:s,orientation:l}),[j,ue]=cb({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,ee]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>E0(He,t,n)),Me=O*b,xe=Pme(me,t,n,Me),be=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=me,be.current.valueBounds=xe;const Ie=me.map(He=>n-He+t),De=($?Ie:me).map(He=>t4(He,t,n)),Qe=l==="vertical",st=C.exports.useRef(null),Ct=C.exports.useRef(null),ht=$F({getNodes(){const He=Ct.current,ct=He?.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),ut=C.exports.useId(),Ee=kme(u??ut),Je=C.exports.useCallback(He=>{var ct;if(!st.current)return;be.current.eventSource="pointer";const tt=st.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ct=He.touches)==null?void 0:ct[0])??He,er=Qe?tt.bottom-Zt:Nt-tt.left,lo=Qe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Gz(mi,t,n)},[Qe,$,n,t]),Lt=(n-t)/10,it=b||(n-t)/100,gt=C.exports.useMemo(()=>({setValueAtIndex(He,ct){if(!X)return;const tt=be.current.valueBounds[He];ct=parseFloat(zC(ct,tt.min,it)),ct=E0(ct,tt.min,tt.max);const Nt=[...be.current.value];Nt[He]=ct,ue(Nt)},setActiveIndex:G,stepUp(He,ct=it){const tt=be.current.value[He],Nt=$?tt-ct:tt+ct;gt.setValueAtIndex(He,Nt)},stepDown(He,ct=it){const tt=be.current.value[He],Nt=$?tt+ct:tt-ct;gt.setValueAtIndex(He,Nt)},reset(){ue(ce.current)}}),[it,$,ue,X]),an=C.exports.useCallback(He=>{const ct=He.key,Nt={ArrowRight:()=>gt.stepUp(K),ArrowUp:()=>gt.stepUp(K),ArrowLeft:()=>gt.stepDown(K),ArrowDown:()=>gt.stepDown(K),PageUp:()=>gt.stepUp(K,Lt),PageDown:()=>gt.stepDown(K,Lt),Home:()=>{const{min:Zt}=xe[K];gt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=xe[K];gt.setValueAtIndex(K,Zt)}}[ct];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),be.current.eventSource="keyboard")},[gt,K,Lt,xe]),{getThumbStyle:_t,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>HF({isReversed:$,orientation:l,thumbRects:ht,thumbPercents:De}),[$,l,De,ht]),Oe=C.exports.useCallback(He=>{var ct;const tt=He??K;if(tt!==-1&&M){const Nt=Ee.getThumb(tt),Zt=(ct=Ct.current)==null?void 0:ct.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Ee]);cd(()=>{be.current.eventSource==="keyboard"&&z?.(be.current.value)},[me,z]);const Xe=He=>{const ct=Je(He)||0,tt=be.current.value.map(mi=>Math.abs(mi-ct)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ct>be.current.value[Zt]&&(Zt=Zt+er.length-1),G(Zt),gt.setValueAtIndex(Zt,ct),Oe(Zt)},Xt=He=>{if(K==-1)return;const ct=Je(He)||0;G(K),gt.setValueAtIndex(K,ct),Oe(K)};FF(Ct,{onPanSessionStart(He){!X||(Q(!0),Xe(He),N?.(be.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(be.current.value))},onPan(He){!X||Xt(He)}});const Yt=C.exports.useCallback((He={},ct=null)=>({...He,...R,id:Ee.root,ref:Wn(ct,Ct),tabIndex:-1,"aria-disabled":L0(h),"data-focused":Oa(ne),style:{...He.style,...Ut}}),[R,h,ne,Ut,Ee]),_e=C.exports.useCallback((He={},ct=null)=>({...He,ref:Wn(ct,st),id:Ee.track,"data-disabled":Oa(h),style:{...He.style,...sn}}),[h,sn,Ee]),It=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.innerTrack,style:{...He.style,...yn}}),[yn,Ee]),ze=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He,Zt=me[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ct,role:"slider",tabIndex:X?0:void 0,id:Ee.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Zt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":L0(h),"aria-readonly":L0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,..._t(tt)},onKeyDown:A0(He.onKeyDown,an),onFocus:A0(He.onFocus,()=>{ee(!0),G(tt)}),onBlur:A0(He.onBlur,()=>{ee(!1),G(-1)})}},[Ee,me,xe,X,W,K,V,E,l,h,g,P,k,_t,an,ee]),ot=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.output,htmlFor:me.map((tt,Nt)=>Ee.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ee,me]),ln=C.exports.useCallback((He,ct=null)=>{const{value:tt,...Nt}=He,Zt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=t4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...dm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ct,id:Ee.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Ee]),Bn=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ct,id:Ee.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Ee]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>De[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:gt,getRootProps:Yt,getTrackProps:_e,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:ln,getInputProps:Bn,getOutputProps:ot}}function Pme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Tme,Db]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lme,S_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),VF=ke(function(t,n){const r=Oi("Slider",t),i=vn(t),{direction:o}=u1();i.direction=o;const{getRootProps:a,...s}=Eme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Tme,{value:l},ae.createElement(Lme,{value:r},ae.createElement(Se.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});VF.defaultProps={orientation:"horizontal"};VF.displayName="RangeSlider";var Ame=ke(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Db(),a=S_(),s=r(t,n);return ae.createElement(Se.div,{...s,className:kd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ame.displayName="RangeSliderThumb";var Mme=ke(function(t,n){const{getTrackProps:r}=Db(),i=S_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:kd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Mme.displayName="RangeSliderTrack";var Ime=ke(function(t,n){const{getInnerTrackProps:r}=Db(),i=S_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ime.displayName="RangeSliderFilledTrack";var Ome=ke(function(t,n){const{getMarkerProps:r}=Db(),i=r(t,n);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__marker",t.className)})});Ome.displayName="RangeSliderMark";_d();_d();function Rme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...O}=e,R=dr(m),N=dr(v),z=dr(w),V=WF({isReversed:a,direction:s,orientation:l}),[$,j]=cb({value:i,defaultValue:o??Dme(t,n),onChange:r}),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),ee=!(h||g),K=(n-t)/10,G=b||(n-t)/100,X=E0($,t,n),ce=n-X+t,Me=t4(V?ce:X,t,n),xe=l==="vertical",be=BF({min:t,max:n,step:b,isDisabled:h,value:X,isInteractive:ee,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useId(),st=u??Qe,[Ct,ht]=[`slider-thumb-${st}`,`slider-track-${st}`],ut=C.exports.useCallback(ze=>{var ot;if(!Ie.current)return;const ln=be.current;ln.eventSource="pointer";const Bn=Ie.current.getBoundingClientRect(),{clientX:He,clientY:ct}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ct:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Zt=tt/Nt;V&&(Zt=1-Zt);let er=Gz(Zt,ln.min,ln.max);return ln.step&&(er=parseFloat(zC(er,ln.min,ln.step))),er=E0(er,ln.min,ln.max),er},[xe,V,be]),vt=C.exports.useCallback(ze=>{const ot=be.current;!ot.isInteractive||(ze=parseFloat(zC(ze,ot.min,G)),ze=E0(ze,ot.min,ot.max),j(ze))},[G,j,be]),Ee=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;vt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;vt(ot)},reset(){vt(o||0)},stepTo(ze){vt(ze)}}),[vt,V,X,G,o]),Je=C.exports.useCallback(ze=>{const ot=be.current,Bn={ArrowRight:()=>Ee.stepUp(),ArrowUp:()=>Ee.stepUp(),ArrowLeft:()=>Ee.stepDown(),ArrowDown:()=>Ee.stepDown(),PageUp:()=>Ee.stepUp(K),PageDown:()=>Ee.stepDown(K),Home:()=>vt(ot.min),End:()=>vt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Ee,vt,K,be]),Lt=z?.(X)??E,it=wme(We),{getThumbStyle:gt,rootStyle:an,trackStyle:_t,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=be.current,ot=it??{width:0,height:0};return HF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Me]})},[V,it,Me,be]),sn=C.exports.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=We.current)==null?void 0:ot.focus()})},[be]);cd(()=>{const ze=be.current;sn(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function yn(ze){const ot=ut(ze);ot!=null&&ot!==be.current.value&&j(ot)}FF(De,{onPanSessionStart(ze){const ot=be.current;!ot.isInteractive||(W(!0),sn(),yn(ze),R?.(ot.value))},onPanSessionEnd(){const ze=be.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!be.current.isInteractive||yn(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...O,ref:Wn(ot,De),tabIndex:-1,"aria-disabled":L0(h),"data-focused":Oa(Q),style:{...ze.style,...an}}),[O,h,Q,an]),Xe=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Ie),id:ht,"data-disabled":Oa(h),style:{...ze.style,..._t}}),[h,ht,_t]),Xt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,We),role:"slider",tabIndex:ee?0:void 0,id:Ct,"data-active":Oa(ue),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":L0(h),"aria-readonly":L0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...gt(0)},onKeyDown:A0(ze.onKeyDown,Je),onFocus:A0(ze.onFocus,()=>ne(!0)),onBlur:A0(ze.onBlur,()=>ne(!1))}),[ee,Ct,ue,Lt,t,n,X,l,h,g,P,k,gt,Je]),_e=C.exports.useCallback((ze,ot=null)=>{const ln=!(ze.valuen),Bn=X>=ze.value,He=t4(ze.value,t,n),ct={position:"absolute",pointerEvents:"none",...Nme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!ln),"data-highlighted":Oa(Bn),style:{...ze.style,...ct}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:ue},actions:Ee,getRootProps:Oe,getTrackProps:Xe,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:_e,getInputProps:It}}function Nme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Dme(e,t){return t"}),[Bme,Bb]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),x_=ke((e,t)=>{const n=Oi("Slider",e),r=vn(e),{direction:i}=u1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Rme(r),l=a(),u=o({},t);return ae.createElement(zme,{value:s},ae.createElement(Bme,{value:n},ae.createElement(Se.div,{...l,className:kd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});x_.defaultProps={orientation:"horizontal"};x_.displayName="Slider";var UF=ke((e,t)=>{const{getThumbProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__thumb",e.className),__css:r.thumb})});UF.displayName="SliderThumb";var GF=ke((e,t)=>{const{getTrackProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__track",e.className),__css:r.track})});GF.displayName="SliderTrack";var jF=ke((e,t)=>{const{getInnerTrackProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});jF.displayName="SliderFilledTrack";var KC=ke((e,t)=>{const{getMarkerProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__marker",e.className),__css:r.mark})});KC.displayName="SliderMark";var Fme=(...e)=>e.filter(Boolean).join(" "),kA=e=>e?"":void 0,w_=ke(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Vz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(Se.label,{...h(),className:Fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(Se.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(Se.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":kA(s.isChecked),"data-hover":kA(s.isHovered)})),o&&ae.createElement(Se.span,{className:"chakra-switch__label",...g(),__css:b},o))});w_.displayName="Switch";var m1=(...e)=>e.filter(Boolean).join(" ");function XC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[$me,YF,Hme,Wme]=rD();function Vme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=cb({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Hme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Ume,c2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Gme(e){const{focusedIndex:t,orientation:n,direction:r}=c2(),i=YF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:XC(e.onKeyDown,o)}}function jme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=c2(),{index:u,register:h}=Wme({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Bhe({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:XC(e.onClick,m)}),w="button";return{...b,id:qF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":KF(a,u),onFocus:t?void 0:XC(e.onFocus,v)}}var[Yme,qme]=_n({});function Kme(e){const t=c2(),{id:n,selectedIndex:r}=t,o=Eb(e.children).map((a,s)=>C.exports.createElement(Yme,{key:s,value:{isSelected:s===r,id:KF(n,s),tabId:qF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Xme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=c2(),{isSelected:o,id:a,tabId:s}=qme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=MB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zme(){const e=c2(),t=YF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return ks(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function qF(e,t){return`${e}--tab-${t}`}function KF(e,t){return`${e}--tabpanel-${t}`}var[Qme,d2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),XF=ke(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Vme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement($me,{value:l},ae.createElement(Ume,{value:h},ae.createElement(Qme,{value:r},ae.createElement(Se.div,{className:m1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});XF.displayName="Tabs";var Jme=ke(function(t,n){const r=Zme(),i={...t.style,...r},o=d2();return ae.createElement(Se.div,{ref:n,...t,className:m1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Jme.displayName="TabIndicator";var eve=ke(function(t,n){const r=Gme({...t,ref:n}),o={display:"flex",...d2().tablist};return ae.createElement(Se.div,{...r,className:m1("chakra-tabs__tablist",t.className),__css:o})});eve.displayName="TabList";var ZF=ke(function(t,n){const r=Xme({...t,ref:n}),i=d2();return ae.createElement(Se.div,{outline:"0",...r,className:m1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});ZF.displayName="TabPanel";var QF=ke(function(t,n){const r=Kme(t),i=d2();return ae.createElement(Se.div,{...r,width:"100%",ref:n,className:m1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});QF.displayName="TabPanels";var JF=ke(function(t,n){const r=d2(),i=jme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(Se.button,{...i,className:m1("chakra-tabs__tab",t.className),__css:o})});JF.displayName="Tab";var tve=(...e)=>e.filter(Boolean).join(" ");function nve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var rve=["h","minH","height","minHeight"],e$=ke((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=R8(o),s=i?nve(n,rve):n;return ae.createElement(Se.textarea,{ref:t,rows:i,...a,className:tve("chakra-textarea",r),__css:s})});e$.displayName="Textarea";function ive(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function ZC(e,...t){return ove(e)?e(...t):e}var ove=e=>typeof e=="function";function ave(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var sve=(e,t)=>e.find(n=>n.id===t);function EA(e,t){const n=t$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function t$(e,t){for(const[n,r]of Object.entries(e))if(sve(r,t))return n}function lve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function uve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var cve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},yl=dve(cve);function dve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=fve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=EA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:n$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=t$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(EA(yl.getState(),i).position)}}var PA=0;function fve(e,t={}){PA+=1;const n=t.id??PA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>yl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var hve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(zz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Fz,{children:l}),ae.createElement(Se.div,{flex:"1",maxWidth:"100%"},i&&x($z,{id:u?.title,children:i}),s&&x(Bz,{id:u?.description,display:"block",children:s})),o&&x(Lb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function n$(e={}){const{render:t,toastComponent:n=hve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function pve(e,t){const n=i=>({...t,...i,position:ave(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=n$(o);return yl.notify(a,o)};return r.update=(i,o)=>{yl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...ZC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...ZC(o.error,s)}))},r.closeAll=yl.closeAll,r.close=yl.close,r.isActive=yl.isActive,r}function f2(e){const{theme:t}=eD();return C.exports.useMemo(()=>pve(t.direction,e),[e,t.direction])}var gve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},r$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=gve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=pue();cd(()=>{v||r?.()},[v]),cd(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ive(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>lve(a),[a]);return ae.createElement(zl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(Se.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},ZC(n,{id:t,onClose:E})))});r$.displayName="ToastComponent";var mve=e=>{const t=C.exports.useSyncExternalStore(yl.subscribe,yl.getState,yl.getState),{children:n,motionVariants:r,component:i=r$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:uve(l),children:x(xd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return J(Ln,{children:[n,x(yh,{...o,children:s})]})};function vve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function yve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var bve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var o4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},QC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Sve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:O,...R}=e,{isOpen:N,onOpen:z,onClose:V}=AB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:ue,getArrowProps:W}=LB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:O}),Q=C.exports.useId(),ee=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Me=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=xve(K,Me),be=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=QC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Ie=C.exports.useCallback(()=>{X();const ut=QC(K);ce.current=ut.setTimeout(Me,n)},[n,Me,X]),We=C.exports.useCallback(()=>{N&&r&&Ie()},[r,Ie,N]),De=C.exports.useCallback(()=>{N&&a&&Ie()},[a,Ie,N]),Qe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Ie()},[N,Ie]);Qf(()=>o4(K),"keydown",s?Qe:void 0),Qf(()=>o4(K),"scroll",()=>{N&&o&&Me()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Qf(()=>K.current,"pointerleave",Ie);const st=C.exports.useCallback((ut={},vt=null)=>({...ut,ref:Wn(K,vt,$),onPointerEnter:Yg(ut.onPointerEnter,Je=>{Je.pointerType!=="touch"&&be()}),onClick:Yg(ut.onClick,We),onPointerDown:Yg(ut.onPointerDown,De),onFocus:Yg(ut.onFocus,be),onBlur:Yg(ut.onBlur,Ie),"aria-describedby":N?ee:void 0}),[be,Ie,De,N,ee,We,$]),Ct=C.exports.useCallback((ut={},vt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:b?`${b}px`:void 0,[Wr.arrowShadowColor.var]:w}},vt),[j,b,w]),ht=C.exports.useCallback((ut={},vt=null)=>{const Ee={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:vt,...R,...ut,id:ee,role:"tooltip",style:Ee}},[R,ee]);return{isOpen:N,show:be,hide:Ie,getTriggerProps:st,getTooltipProps:ht,getTooltipPositionerProps:Ct,getArrowProps:W,getArrowInnerProps:ue}}var mw="chakra-ui:close-tooltip";function xve(e,t){return C.exports.useEffect(()=>{const n=o4(e);return n.addEventListener(mw,t),()=>n.removeEventListener(mw,t)},[t,e]),()=>{const n=o4(e),r=QC(e);n.dispatchEvent(new r.CustomEvent(mw))}}var wve=Se(zl.div),pi=ke((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=u1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const V=zQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=Sve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(Se.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const O=!!l,R=k.getTooltipProps({},t),N=O?vve(R,["role","id"]):R,z=yve(R,["role","id"]);return a?J(Ln,{children:[M,x(xd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(Se.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},J(wve,{variants:bve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,O&&ae.createElement(Se.span,{srOnly:!0,...z},l),u&&ae.createElement(Se.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(Se.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var Cve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(fB,{environment:a,children:t});return x(Pae,{theme:o,cssVarsRoot:s,children:J(rN,{colorModeManager:n,options:o.config,children:[i?x(qfe,{}):x(Yfe,{}),x(Lae,{}),r?x(IB,{zIndex:r,children:l}):l]})})};function _ve({children:e,theme:t=yae,toastOptions:n,...r}){return J(Cve,{theme:t,...r,children:[e,x(mve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:C_(e)?2:__(e)?3:0}function M0(e,t){return v1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kve(e,t){return v1(e)===2?e.get(t):e[t]}function i$(e,t,n){var r=v1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function o$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function C_(e){return Mve&&e instanceof Map}function __(e){return Ive&&e instanceof Set}function Pf(e){return e.o||e.t}function k_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=s$(e);delete t[rr];for(var n=I0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Eve),Object.freeze(e),t&&uh(e,function(n,r){return E_(r,!0)},!0)),e}function Eve(){xs(2)}function P_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Tl(e){var t=n7[e];return t||xs(18,e),t}function Pve(e,t){n7[e]||(n7[e]=t)}function JC(){return Bv}function vw(e,t){t&&(Tl("Patches"),e.u=[],e.s=[],e.v=t)}function a4(e){e7(e),e.p.forEach(Tve),e.p=null}function e7(e){e===Bv&&(Bv=e.l)}function TA(e){return Bv={p:[],l:Bv,h:e,m:!0,_:0}}function Tve(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function yw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Tl("ES5").S(t,e,r),r?(n[rr].P&&(a4(t),xs(4)),Pu(e)&&(e=s4(t,e),t.l||l4(t,e)),t.u&&Tl("Patches").M(n[rr].t,e,t.u,t.s)):e=s4(t,n,[]),a4(t),t.u&&t.v(t.u,t.s),e!==a$?e:void 0}function s4(e,t,n){if(P_(t))return t;var r=t[rr];if(!r)return uh(t,function(o,a){return LA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return l4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=k_(r.k):r.o;uh(r.i===3?new Set(i):i,function(o,a){return LA(e,r,i,o,a,n)}),l4(e,i,!1),n&&e.u&&Tl("Patches").R(r,n,e.u,e.s)}return r.o}function LA(e,t,n,r,i,o){if(hd(i)){var a=s4(e,i,o&&t&&t.i!==3&&!M0(t.D,r)?o.concat(r):void 0);if(i$(n,r,a),!hd(a))return;e.m=!1}if(Pu(i)&&!P_(i)){if(!e.h.F&&e._<1)return;s4(e,i),t&&t.A.l||l4(e,i)}}function l4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&E_(t,n)}function bw(e,t){var n=e[rr];return(n?Pf(n):e)[t]}function AA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Fc(e){e.P||(e.P=!0,e.l&&Fc(e.l))}function Sw(e){e.o||(e.o=k_(e.t))}function t7(e,t,n){var r=C_(t)?Tl("MapSet").N(t,n):__(t)?Tl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:JC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Fv;a&&(l=[s],u=fm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Tl("ES5").J(t,n);return(n?n.A:JC()).p.push(r),r}function Lve(e){return hd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=v1(n);if(i){if(!i.P&&(i.i<4||!Tl("ES5").K(i)))return i.t;i.I=!0,r=MA(n,o),i.I=!1}else r=MA(n,o);return uh(r,function(a,s){i&&kve(i.t,a)===s||i$(r,a,t(s))}),o===3?new Set(r):r}(e)}function MA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return k_(e)}function Ave(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Fv.get(l,o)},set:function(l){var u=this[rr];Fv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Fc(s);break;case 4:n(s)&&Fc(s)}}}function n(o){for(var a=o.t,s=o.k,l=I0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!M0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!o$(m,g))return!0}}var b=!!a[rr];return l.length!==I0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Tl("Patches").$;return hd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new Rve,l$=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function NA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function DA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(L_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Nve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:u4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function u$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function c4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return d4}function i(s,l){r(s)===d4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var $ve=function(t,n){return t===n};function Hve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?C2e:w2e;p$.useSyncExternalStore=e1.useSyncExternalStore!==void 0?e1.useSyncExternalStore:_2e;(function(e){e.exports=p$})(h$);var g$={exports:{}},m$={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $b=C.exports,k2e=h$.exports;function E2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var P2e=typeof Object.is=="function"?Object.is:E2e,T2e=k2e.useSyncExternalStore,L2e=$b.useRef,A2e=$b.useEffect,M2e=$b.useMemo,I2e=$b.useDebugValue;m$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=L2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=M2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,P2e(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=T2e(e,o[0],o[1]);return A2e(function(){a.hasValue=!0,a.value=s},[s]),I2e(s),s};(function(e){e.exports=m$})(g$);function O2e(e){e()}let v$=O2e;const R2e=e=>v$=e,N2e=()=>v$,pd=C.exports.createContext(null);function y$(){return C.exports.useContext(pd)}const D2e=()=>{throw new Error("uSES not initialized!")};let b$=D2e;const z2e=e=>{b$=e},B2e=(e,t)=>e===t;function F2e(e=pd){const t=e===pd?y$:()=>C.exports.useContext(e);return function(r,i=B2e){const{store:o,subscription:a,getServerState:s}=t(),l=b$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const $2e=F2e();var H2e={exports:{}},In={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var M_=Symbol.for("react.element"),I_=Symbol.for("react.portal"),Hb=Symbol.for("react.fragment"),Wb=Symbol.for("react.strict_mode"),Vb=Symbol.for("react.profiler"),Ub=Symbol.for("react.provider"),Gb=Symbol.for("react.context"),W2e=Symbol.for("react.server_context"),jb=Symbol.for("react.forward_ref"),Yb=Symbol.for("react.suspense"),qb=Symbol.for("react.suspense_list"),Kb=Symbol.for("react.memo"),Xb=Symbol.for("react.lazy"),V2e=Symbol.for("react.offscreen"),S$;S$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case M_:switch(e=e.type,e){case Hb:case Vb:case Wb:case Yb:case qb:return e;default:switch(e=e&&e.$$typeof,e){case W2e:case Gb:case jb:case Xb:case Kb:case Ub:return e;default:return t}}case I_:return t}}}In.ContextConsumer=Gb;In.ContextProvider=Ub;In.Element=M_;In.ForwardRef=jb;In.Fragment=Hb;In.Lazy=Xb;In.Memo=Kb;In.Portal=I_;In.Profiler=Vb;In.StrictMode=Wb;In.Suspense=Yb;In.SuspenseList=qb;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===Gb};In.isContextProvider=function(e){return qa(e)===Ub};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===M_};In.isForwardRef=function(e){return qa(e)===jb};In.isFragment=function(e){return qa(e)===Hb};In.isLazy=function(e){return qa(e)===Xb};In.isMemo=function(e){return qa(e)===Kb};In.isPortal=function(e){return qa(e)===I_};In.isProfiler=function(e){return qa(e)===Vb};In.isStrictMode=function(e){return qa(e)===Wb};In.isSuspense=function(e){return qa(e)===Yb};In.isSuspenseList=function(e){return qa(e)===qb};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Hb||e===Vb||e===Wb||e===Yb||e===qb||e===V2e||typeof e=="object"&&e!==null&&(e.$$typeof===Xb||e.$$typeof===Kb||e.$$typeof===Ub||e.$$typeof===Gb||e.$$typeof===jb||e.$$typeof===S$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(H2e);function U2e(){const e=N2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const VA={notify(){},get:()=>[]};function G2e(e,t){let n,r=VA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=U2e())}function u(){n&&(n(),n=void 0,r.clear(),r=VA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const j2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Y2e=j2e?C.exports.useLayoutEffect:C.exports.useEffect;function q2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=G2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Y2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||pd).Provider,{value:i,children:n})}function x$(e=pd){const t=e===pd?y$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const K2e=x$();function X2e(e=pd){const t=e===pd?K2e:x$(e);return function(){return t().dispatch}}const Z2e=X2e();z2e(g$.exports.useSyncExternalStoreWithSelector);R2e(Dl.exports.unstable_batchedUpdates);var O_="persist:",w$="persist/FLUSH",R_="persist/REHYDRATE",C$="persist/PAUSE",_$="persist/PERSIST",k$="persist/PURGE",E$="persist/REGISTER",Q2e=-1;function X3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X3=function(n){return typeof n}:X3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},X3(e)}function UA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,V){return V.in(z,R,h)},h[R]);if(N!==void 0)try{g[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function rye(e){return JSON.stringify(e)}function iye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:O_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=oye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function oye(e){return JSON.parse(e)}function aye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:O_).concat(e.key);return t.removeItem(n,sye)}function sye(e){}function GA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function cye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var dye=5e3;function fye(e,t){var n=e.version!==void 0?e.version:Q2e;e.debug;var r=e.stateReconciler===void 0?tye:e.stateReconciler,i=e.getStoredState||iye,o=e.timeout!==void 0?e.timeout:dye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=uye(m,["_persist"]),w=b;if(g.type===_$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=nye(e)),v)return uu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),uu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===k$)return s=!0,g.result(aye(e)),uu({},t(w,g),{_persist:v});if(g.type===w$)return g.result(a&&a.flush()),uu({},t(w,g),{_persist:v});if(g.type===C$)l=!0;else if(g.type===R_){if(s)return uu({},w,{_persist:uu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,O=uu({},M,{_persist:uu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(uu({},R,{_persist:v}))}}function jA(e){return gye(e)||pye(e)||hye()}function hye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function pye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function gye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:P$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case E$:return i7({},t,{registry:[].concat(jA(t.registry),[n.key])});case R_:var r=t.registry.indexOf(n.key),i=jA(t.registry);return i.splice(r,1),i7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function yye(e,t,n){var r=n||!1,i=L_(vye,P$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:E$,key:u})},a=function(u,h,g){var m={type:R_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=i7({},i,{purge:function(){var u=[];return e.dispatch({type:k$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:w$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:C$})},persist:function(){e.dispatch({type:_$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var N_={},D_={};D_.__esModule=!0;D_.default=xye;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function kw(){}var bye={getItem:kw,setItem:kw,removeItem:kw};function Sye(e){if((typeof self>"u"?"undefined":Z3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function xye(e){var t="".concat(e,"Storage");return Sye(t)?self[t]:bye}N_.__esModule=!0;N_.default=_ye;var wye=Cye(D_);function Cye(e){return e&&e.__esModule?e:{default:e}}function _ye(e){var t=(0,wye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var T$=void 0,kye=Eye(N_);function Eye(e){return e&&e.__esModule?e:{default:e}}var Pye=(0,kye.default)("local");T$=Pye;var L$={},A$={},ch={};Object.defineProperty(ch,"__esModule",{value:!0});ch.PLACEHOLDER_UNDEFINED=ch.PACKAGE_NAME=void 0;ch.PACKAGE_NAME="redux-deep-persist";ch.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(z_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=ch,n=z_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const ee in W){const K=Q?`${Q}.${ee}`:ee,G=W[ee];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${ee}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const ee=W[ne];Q[ne]=(0,e._cloneDeep)(ee)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const b=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),ee=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(ee,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(ee))return ne.valueOf()===ee.valueOf()?{}:ee;const G=Object.keys(ee).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=ee[ce],X;const me=(0,e.difference)(ne[ce],ee[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(ee)||!(0,e.isArray)(ne)&&(0,e.isArray)(ee)?ee:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=b;const w=function(W,Q){return Q.reduce((ne,ee)=>{if(ne){const K=parseInt(ee,10),G=(0,e.isIntegerString)(ee)&&K<0?ne.length+K:ee;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((ee,K,G)=>(G===Q.length-1&&ee&&(0,e.isObjectLike)(ee)&&delete ee[K],ee&&ee[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const ee=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(ee))for(const X in ee)if((0,e.isObjectLike)(ee[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],ee[X]);else if((0,e.isArray)(Q)){let ce=ee[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=ee[X]!==t.PLACEHOLDER_UNDEFINED?ee[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,ee,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=ee?ee+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},O=function(W,Q,ne,ee){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",ee),K};e.preserveUndefined=O;const R=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=R;const N=function(W){return W.reduce((Q,ne)=>{const ee=W.filter(Me=>Me===ne),K=W.filter(Me=>(ne+".").indexOf(Me+".")===0),{duplicates:G,subsets:X}=Q,ce=ee.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?ee:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const ee=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${ee} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. + + ${JSON.stringify(X)} + + ${G}`);if(ce.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(ce)} + + ${G}`)};e.singleTransformValidator=z;const V=function(W){if(!(0,e.isArray)(W))return;const Q=W?.map(ne=>ne.deepPersistKey).filter(ne=>ne)||[];if(Q.length){const ne=Q.filter((ee,K)=>Q.indexOf(ee)!==K);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ne)}`)}};e.transformsValidator=V;const $=function({whitelist:W,blacklist:Q}){if(W&&W.length&&Q&&Q.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(W){const{duplicates:ne,subsets:ee}=(0,e.findDuplicatesAndSubsets)(W);(0,e.throwError)({duplicates:ne,subsets:ee},"whitelist")}if(Q){const{duplicates:ne,subsets:ee}=(0,e.findDuplicatesAndSubsets)(Q);(0,e.throwError)({duplicates:ne,subsets:ee},"blacklist")}};e.configValidator=$;const j=function({duplicates:W,subsets:Q},ne){if(W.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ne}. + + ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(Q)}`)};e.throwError=j;const ue=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const ee=ne.split("."),K=ee[0],G=ee.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=ue})(A$);(function(e){var t=bs&&bs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=T.map(ue=>Object.keys(ue)[0]),N=M.map(ue=>Object.keys(ue)[0]),z=O.filter(ue=>R.indexOf(ue)===-1&&N.indexOf(ue)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(ue=>(0,e.createBlacklist)(ue)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(L$);const Q3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return B_(r)?r:!1},B_=e=>Boolean(typeof e=="string"?Tye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),h4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Lye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,T=8,M=16,O=32,R=64,N=128,z=256,V=512,$=30,j="...",ue=800,W=16,Q=1,ne=2,ee=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Me=me-1,xe=me>>>1,be=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",O],["partialRight",R],["rearg",z]],Ie="[object Arguments]",We="[object Array]",De="[object AsyncFunction]",Qe="[object Boolean]",st="[object Date]",Ct="[object DOMException]",ht="[object Error]",ut="[object Function]",vt="[object GeneratorFunction]",Ee="[object Map]",Je="[object Number]",Lt="[object Null]",it="[object Object]",gt="[object Promise]",an="[object Proxy]",_t="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",Xe="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",_e="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",ln="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ct="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,k1=RegExp(mi.source),ya=RegExp(Os.source),Lh=/<%-([\s\S]+?)%>/g,E1=/<%([\s\S]+?)%>/g,$u=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Id=/[\\^$.*+?()[\]{}|]/g,P1=RegExp(Id.source),Hu=/^\s+/,Od=/\s/,T1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rs=/\{\n\/\* \[wrapped with (.+)\] \*/,Wu=/,? & /,L1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,A1=/[()=,{}\[\]\/\s]/,M1=/\\(\\)?/g,I1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,O1=/^[-+]0x[0-9a-f]+$/i,R1=/^0b[01]+$/i,N1=/^\[object .+?Constructor\]$/,D1=/^0o[0-7]+$/i,z1=/^(?:0|[1-9]\d*)$/,B1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,F1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Hl="\\u0300-\\u036f",Wl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Vl=Hl+Wl+Ds,Ih="\\u2700-\\u27bf",Vu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+bn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Vl+"]",Rd="\\d+",Ul="["+Ih+"]",Qa="["+Vu+"]",Nd="[^"+Xa+Gr+Rd+Ih+Vu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Oh="(?:"+Za+"|"+vi+")",Rh="[^"+Xa+"]",Dd="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",Gl="(?:"+Qa+"|"+Nd+")",$1="(?:"+uo+"|"+Nd+")",Uu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Gu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",zd=Oh+"?",ju="["+kr+"]?",ba="(?:"+$s+"(?:"+[Rh,Dd,Fs].join("|")+")"+ju+zd+")*",Bd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=ju+zd+ba,Nh="(?:"+[Ul,Dd,Fs].join("|")+")"+Ht,Yu="(?:"+[Rh+Za+"?",Za,Dd,Fs,Bs].join("|")+")",qu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+Yu+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Uu+"(?="+[jr,uo,"$"].join("|")+")",$1+"+"+Gu+"(?="+[jr,uo+Gl,"$"].join("|")+")",uo+"?"+Gl+"+"+Uu,uo+"+"+Gu,jl,Bd,Rd,Nh].join("|"),"g"),Fd=RegExp("["+$s+Xa+Vl+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$d=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,un={};un[It]=un[ze]=un[ot]=un[ln]=un[Bn]=un[He]=un[ct]=un[tt]=un[Nt]=!0,un[Ie]=un[We]=un[Yt]=un[Qe]=un[_e]=un[st]=un[ht]=un[ut]=un[Ee]=un[Je]=un[it]=un[_t]=un[Ut]=un[sn]=un[Xe]=!1;var Wt={};Wt[Ie]=Wt[We]=Wt[Yt]=Wt[_e]=Wt[Qe]=Wt[st]=Wt[It]=Wt[ze]=Wt[ot]=Wt[ln]=Wt[Bn]=Wt[Ee]=Wt[Je]=Wt[it]=Wt[_t]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[He]=Wt[ct]=Wt[tt]=Wt[Nt]=!0,Wt[ht]=Wt[ut]=Wt[Xe]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},H1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof bs=="object"&&bs&&bs.Object===Object&&bs,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,hn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Vi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,Hs=hn&&hn.isSet,W1=hn&&hn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function V1(re,ye,ge,Ge){for(var Et=-1,Qt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ge=-1,Et=re==null?0:re.length;++Ge-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Zu(ye,re[ge],0)>-1;);return ge}function G1(re,ye){for(var ge=re.length,Ge=0;ge--;)re[ge]===ye&&++Ge;return Ge}var k2=Ud(Fh),es=Ud(H1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function ql(re){return Fd.test(re)}function Vh(re){return zh.test(re)}function E2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ge,Et){ge[++ye]=[Et,Ge]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ge=re.length,Et=0,Qt=[];++ge-1}function G2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Uo.prototype.clear=V2,Uo.prototype.delete=U2,Uo.prototype.get=ag,Uo.prototype.has=sg,Uo.prototype.set=G2;function Go(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,S,A,D,F){var Y,Z=p&g,le=p&m,we=p&v;if(S&&(Y=D?S(c,A,D,F):S(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Rt(c);if(Ce){if(Y=wU(c),!Z)return _i(c,Y)}else{var Te=ui(c),Ue=Te==ut||Te==vt;if(kc(c))return el(c,Z);if(Te==it||Te==Ie||Ue&&!D){if(Y=le||Ue?{}:Dk(c),!Z)return le?kg(c,gc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Te])return D?c:{};Y=CU(c,Te,Z)}}F||(F=new yr);var lt=F.get(c);if(lt)return lt;F.set(c,Y),dE(c)?c.forEach(function(xt){Y.add(ai(xt,p,S,xt,c,F))}):uE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,S,jt,c,F))});var St=we?le?pe:Xo:le?So:ci,$t=Ce?n:St(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,S,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(S){return ep(S,c,p)}}function ep(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var D=S[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function dg(c,p,S){if(typeof c!="function")throw new bi(a);return Ag(function(){c.apply(n,S)},p)}function mc(c,p,S,A){var D=-1,F=Ri,Y=!0,Z=c.length,le=[],we=p.length;if(!Z)return le;S&&(p=$n(p,Er(S))),A?(F=$h,Y=!1):p.length>=i&&(F=Ju,Y=!1,p=new _a(p));e:for(;++DD?0:D+S),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=S>A?0:hE(A);S0&&S(Z)?p>1?Tr(Z,p-1,S,A,D):xa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(S){return ru(c[S])})}function Ys(c,p){p=Js(p,c);for(var S=0,A=p.length;c!=null&&Sp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in cn(c)}function sp(c,p,S){return c>=Kr(p,S)&&c=120&&Ce.length>=120)?new _a(Y&&Ce):n}Ce=c[0];var Te=-1,Ue=Z[0];e:for(;++Te-1;)Z!==c&&Qd.call(Z,le,1),Qd.call(c,le,1);return c}function lf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var D=p[S];if(S==A||D!==F){var F=D;nu(D)?Qd.call(c,D,1):vp(c,D)}}return c}function uf(c,p){return c+Xl(eg()*(p-c+1))}function Zs(c,p,S,A){for(var D=-1,F=vr(tf((p-c)/(S||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=S;return Y}function wc(c,p){var S="";if(!c||p<1||p>G)return S;do p%2&&(S+=c),p=Xl(p/2),p&&(c+=c);while(p);return S}function kt(c,p){return zS(Fk(c,p,xo),c+"")}function fp(c){return pc(_p(c))}function cf(c,p){var S=_p(c);return J2(S,Ql(p,0,S.length))}function eu(c,p,S,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),S=S>D?D:S,S<0&&(S+=D),D=p>S?0:S-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(S?Y<=p:Y=i){var we=p?null:H(c);if(we)return qd(we);Y=!1,D=Ju,le=new _a}else le=p?[]:Z;e:for(;++A=A?c:Ar(c,p,S)}var xg=M2||function(c){return yt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var S=c.length,A=ic?ic(S):new c.constructor(S);return c.copy(A),A}function wg(c){var p=new c.constructor(c.byteLength);return new Si(p).set(new Si(c)),p}function tu(c,p){var S=p?wg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function K2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return rf?cn(rf.call(c)):{}}function X2(c,p){var S=p?wg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function Cg(c,p){if(c!==p){var S=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,le=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&le&&!Z&&!we||A&&Y&&le||!S&&le||!D)return 1;if(!A&&!F&&!we&&c=Z)return le;var we=S[A];return le*(we=="desc"?-1:1)}}return c.index-p.index}function Z2(c,p,S,A){for(var D=-1,F=c.length,Y=S.length,Z=-1,le=p.length,we=vr(F-Y,0),Ce=ge(le+we),Te=!A;++Z1?S[D-1]:n,Y=D>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Ki(S[0],S[1],Y)&&(F=D<3?n:F,D=1),p=cn(p);++A-1?D[F?p[Y]:Y]:n}}function Pg(c){return nr(function(p){var S=p.length,A=S,D=Gi.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new bi(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new Gi([],!0)}for(A=Y?A:S;++A1&&Jt.reverse(),Ce&&leZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Te=-1,Ue=!0,lt=S&w?new _a:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(T1,`{ +/* [wrapped with `+p+`] */ +`)}function kU(c){return Rt(c)||yf(c)||!!(Q1&&c&&c[Q1])}function nu(c,p){var S=typeof c;return p=p??G,!!p&&(S=="number"||S!="symbol"&&z1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=ue)return arguments[0]}else p=0;return c.apply(n,arguments)}}function J2(c,p){var S=-1,A=c.length,D=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Zk(c,S)});function Qk(c){var p=B(c);return p.__chain__=!0,p}function DG(c,p){return p(c),c}function ey(c,p){return p(c)}var zG=nr(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Gt)||!nu(S)?this.thru(D):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:ey,args:[D],thisArg:n}),new Gi(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function BG(){return Qk(this)}function FG(){return new Gi(this.value(),this.__chain__)}function $G(){this.__values__===n&&(this.__values__=fE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function HG(){return this}function WG(c){for(var p,S=this;S instanceof of;){var A=Gk(S);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;S=S.__wrapped__}return D.__wrapped__=c,p}function VG(){var c=this.__wrapped__;if(c instanceof Gt){var p=c;return this.__actions__.length&&(p=new Gt(this)),p=p.reverse(),p.__actions__.push({func:ey,args:[BS],thisArg:n}),new Gi(p,this.__chain__)}return this.thru(BS)}function UG(){return Qs(this.__wrapped__,this.__actions__)}var GG=bp(function(c,p,S){tn.call(c,S)?++c[S]:jo(c,S,1)});function jG(c,p,S){var A=Rt(c)?Fn:fg;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}function YG(c,p){var S=Rt(c)?ho:qo;return S(c,Pe(p,3))}var qG=Eg(jk),KG=Eg(Yk);function XG(c,p){return Tr(ty(c,p),1)}function ZG(c,p){return Tr(ty(c,p),K)}function QG(c,p,S){return S=S===n?1:Dt(S),Tr(ty(c,p),S)}function Jk(c,p){var S=Rt(c)?Gn:rs;return S(c,Pe(p,3))}function eE(c,p){var S=Rt(c)?fo:tp;return S(c,Pe(p,3))}var JG=bp(function(c,p,S){tn.call(c,S)?c[S].push(p):jo(c,S,[p])});function ej(c,p,S,A){c=bo(c)?c:_p(c),S=S&&!A?Dt(S):0;var D=c.length;return S<0&&(S=vr(D+S,0)),ay(c)?S<=D&&c.indexOf(p,S)>-1:!!D&&Zu(c,p,S)>-1}var tj=kt(function(c,p,S){var A=-1,D=typeof p=="function",F=bo(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,S):is(Y,p,S)}),F}),nj=bp(function(c,p,S){jo(c,S,p)});function ty(c,p){var S=Rt(c)?$n:Sr;return S(c,Pe(p,3))}function rj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),wi(c,p,S))}var ij=bp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function oj(c,p,S){var A=Rt(c)?Hd:Hh,D=arguments.length<3;return A(c,Pe(p,4),S,D,rs)}function aj(c,p,S){var A=Rt(c)?x2:Hh,D=arguments.length<3;return A(c,Pe(p,4),S,D,tp)}function sj(c,p){var S=Rt(c)?ho:qo;return S(c,iy(Pe(p,3)))}function lj(c){var p=Rt(c)?pc:fp;return p(c)}function uj(c,p,S){(S?Ki(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?oi:cf;return A(c,p)}function cj(c){var p=Rt(c)?LS:li;return p(c)}function dj(c){if(c==null)return 0;if(bo(c))return ay(c)?wa(c):c.length;var p=ui(c);return p==Ee||p==Ut?c.size:Lr(c).length}function fj(c,p,S){var A=Rt(c)?Ku:vo;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}var hj=kt(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Ki(c,p[0],p[1])?p=[]:S>2&&Ki(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ny=I2||function(){return yt.Date.now()};function pj(c,p){if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function tE(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function nE(c,p){var S;if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var $S=kt(function(c,p,S){var A=E;if(S.length){var D=Vo(S,Ve($S));A|=O}return fe(c,A,p,S,D)}),rE=kt(function(c,p,S){var A=E|P;if(S.length){var D=Vo(S,Ve(rE));A|=O}return fe(p,A,c,S,D)});function iE(c,p,S){p=S?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=iE.placeholder,A}function oE(c,p,S){p=S?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=oE.placeholder,A}function aE(c,p,S){var A,D,F,Y,Z,le,we=0,Ce=!1,Te=!1,Ue=!0;if(typeof c!="function")throw new bi(a);p=Pa(p)||0,lr(S)&&(Ce=!!S.leading,Te="maxWait"in S,F=Te?vr(Pa(S.maxWait)||0,p):F,Ue="trailing"in S?!!S.trailing:Ue);function lt(Ir){var us=A,ou=D;return A=D=n,we=Ir,Y=c.apply(ou,us),Y}function St(Ir){return we=Ir,Z=Ag(jt,p),Ce?lt(Ir):Y}function $t(Ir){var us=Ir-le,ou=Ir-we,kE=p-us;return Te?Kr(kE,F-ou):kE}function xt(Ir){var us=Ir-le,ou=Ir-we;return le===n||us>=p||us<0||Te&&ou>=F}function jt(){var Ir=ny();if(xt(Ir))return Jt(Ir);Z=Ag(jt,$t(Ir))}function Jt(Ir){return Z=n,Ue&&A?lt(Ir):(A=D=n,Y)}function Qo(){Z!==n&&xg(Z),we=0,A=le=D=Z=n}function Xi(){return Z===n?Y:Jt(ny())}function Jo(){var Ir=ny(),us=xt(Ir);if(A=arguments,D=this,le=Ir,us){if(Z===n)return St(le);if(Te)return xg(Z),Z=Ag(jt,p),lt(le)}return Z===n&&(Z=Ag(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Xi,Jo}var gj=kt(function(c,p){return dg(c,1,p)}),mj=kt(function(c,p,S){return dg(c,Pa(p)||0,S)});function vj(c){return fe(c,V)}function ry(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new bi(a);var S=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=S.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return S.cache=F.set(D,Y)||F,Y};return S.cache=new(ry.Cache||Go),S}ry.Cache=Go;function iy(c){if(typeof c!="function")throw new bi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function yj(c){return nE(2,c)}var bj=IS(function(c,p){p=p.length==1&&Rt(p[0])?$n(p[0],Er(Pe())):$n(Tr(p,1),Er(Pe()));var S=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,S);++D=p}),yf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!Z1.call(c,"callee")},Rt=ge.isArray,Rj=Yr?Er(Yr):pg;function bo(c){return c!=null&&oy(c.length)&&!ru(c)}function Mr(c){return xr(c)&&bo(c)}function Nj(c){return c===!0||c===!1||xr(c)&&si(c)==Qe}var kc=O2||QS,Dj=co?Er(co):gg;function zj(c){return xr(c)&&c.nodeType===1&&!Mg(c)}function Bj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||kc(c)||Cp(c)||yf(c)))return!c.length;var p=ui(c);if(p==Ee||p==Ut)return!c.size;if(Lg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Fj(c,p){return yc(c,p)}function $j(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?yc(c,p,n,S):!!A}function WS(c){if(!xr(c))return!1;var p=si(c);return p==ht||p==Ct||typeof c.message=="string"&&typeof c.name=="string"&&!Mg(c)}function Hj(c){return typeof c=="number"&&qh(c)}function ru(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==vt||p==De||p==an}function lE(c){return typeof c=="number"&&c==Dt(c)}function oy(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var uE=Vi?Er(Vi):MS;function Wj(c,p){return c===p||bc(c,p,Pt(p))}function Vj(c,p,S){return S=typeof S=="function"?S:n,bc(c,p,Pt(p),S)}function Uj(c){return cE(c)&&c!=+c}function Gj(c){if(TU(c))throw new Et(o);return cp(c)}function jj(c){return c===null}function Yj(c){return c==null}function cE(c){return typeof c=="number"||xr(c)&&si(c)==Je}function Mg(c){if(!xr(c)||si(c)!=it)return!1;var p=oc(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ii}var VS=Sa?Er(Sa):ar;function qj(c){return lE(c)&&c>=-G&&c<=G}var dE=Hs?Er(Hs):Bt;function ay(c){return typeof c=="string"||!Rt(c)&&xr(c)&&si(c)==sn}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==yn}var Cp=W1?Er(W1):zr;function Kj(c){return c===n}function Xj(c){return xr(c)&&ui(c)==Xe}function Zj(c){return xr(c)&&si(c)==Xt}var Qj=_(qs),Jj=_(function(c,p){return c<=p});function fE(c){if(!c)return[];if(bo(c))return ay(c)?Ni(c):_i(c);if(ac&&c[ac])return E2(c[ac]());var p=ui(c),S=p==Ee?Uh:p==Ut?qd:_p;return S(c)}function iu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=iu(c),S=p%1;return p===p?S?p-S:p:0}function hE(c){return c?Ql(Dt(c),0,me):0}function Pa(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Ui(c);var S=R1.test(c);return S||D1.test(c)?Ye(c.slice(2),S?2:8):O1.test(c)?ce:+c}function pE(c){return ka(c,So(c))}function eY(c){return c?Ql(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Yi(c)}var tY=qi(function(c,p){if(Lg(p)||bo(p)){ka(p,ci(p),c);return}for(var S in p)tn.call(p,S)&&js(c,S,p[S])}),gE=qi(function(c,p){ka(p,So(p),c)}),sy=qi(function(c,p,S,A){ka(p,So(p),c,A)}),nY=qi(function(c,p,S,A){ka(p,ci(p),c,A)}),rY=nr(Qh);function iY(c,p){var S=Zl(c);return p==null?S:Ke(S,p)}var oY=kt(function(c,p){c=cn(c);var S=-1,A=p.length,D=A>2?p[2]:n;for(D&&Ki(p[0],p[1],D)&&(A=1);++S1),F}),ka(c,pe(c),S),A&&(S=ai(S,g|m|v,At));for(var D=p.length;D--;)vp(S,p[D]);return S});function CY(c,p){return vE(c,iy(Pe(p)))}var _Y=nr(function(c,p){return c==null?{}:yg(c,p)});function vE(c,p){if(c==null)return{};var S=$n(pe(c),function(A){return[A]});return p=Pe(p),dp(c,S,function(A,D){return p(A,D[0])})}function kY(c,p,S){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var D=eg();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return uf(c,p)}var DY=nl(function(c,p,S){return p=p.toLowerCase(),c+(S?SE(p):p)});function SE(c){return jS(xn(c).toLowerCase())}function xE(c){return c=xn(c),c&&c.replace(B1,k2).replace(Dh,"")}function zY(c,p,S){c=xn(c),p=Yi(p);var A=c.length;S=S===n?A:Ql(Dt(S),0,A);var D=S;return S-=p.length,S>=0&&c.slice(S,D)==p}function BY(c){return c=xn(c),c&&ya.test(c)?c.replace(Os,es):c}function FY(c){return c=xn(c),c&&P1.test(c)?c.replace(Id,"\\$&"):c}var $Y=nl(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),HY=nl(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),WY=xp("toLowerCase");function VY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Xl(D),S)+c+d(tf(D),S)}function UY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;return p&&A>>0,S?(c=xn(c),c&&(typeof p=="string"||p!=null&&!VS(p))&&(p=Yi(p),!p&&ql(c))?as(Ni(c),0,S):c.split(p,S)):[]}var ZY=nl(function(c,p,S){return c+(S?" ":"")+jS(p)});function QY(c,p,S){return c=xn(c),S=S==null?0:Ql(Dt(S),0,c.length),p=Yi(p),c.slice(S,S+p.length)==p}function JY(c,p,S){var A=B.templateSettings;S&&Ki(c,p,S)&&(p=n),c=xn(c),p=sy({},p,A,Ne);var D=sy({},p.imports,A.imports,Ne),F=ci(D),Y=Yd(D,F),Z,le,we=0,Ce=p.interpolate||Ns,Te="__p += '",Ue=Xd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===$u?I1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),lt="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` +`;c.replace(Ue,function(xt,jt,Jt,Qo,Xi,Jo){return Jt||(Jt=Qo),Te+=c.slice(we,Jo).replace(F1,Vs),jt&&(Z=!0,Te+=`' + +__e(`+jt+`) + +'`),Xi&&(le=!0,Te+=`'; +`+Xi+`; +__p += '`),Jt&&(Te+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),we=Jo+xt.length,xt}),Te+=`'; +`;var St=tn.call(p,"variable")&&p.variable;if(!St)Te=`with (obj) { +`+Te+` +} +`;else if(A1.test(St))throw new Et(s);Te=(le?Te.replace(Zt,""):Te).replace(er,"$1").replace(lo,"$1;"),Te="function("+(St||"obj")+`) { +`+(St?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(le?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Te+`return __p +}`;var $t=CE(function(){return Qt(F,lt+"return "+Te).apply(n,Y)});if($t.source=Te,WS($t))throw $t;return $t}function eq(c){return xn(c).toLowerCase()}function tq(c){return xn(c).toUpperCase()}function nq(c,p,S){if(c=xn(c),c&&(S||p===n))return Ui(c);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function rq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.slice(0,Y1(c)+1);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function iq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.replace(Hu,"");if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function oq(c,p){var S=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;S="length"in p?Dt(p.length):S,A="omission"in p?Yi(p.omission):A}c=xn(c);var F=c.length;if(ql(c)){var Y=Ni(c);F=Y.length}if(S>=F)return c;var Z=S-wa(A);if(Z<1)return A;var le=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return le+A;if(Y&&(Z+=le.length-Z),VS(D)){if(c.slice(Z).search(D)){var we,Ce=le;for(D.global||(D=Xd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Te=we.index;le=le.slice(0,Te===n?Z:Te)}}else if(c.indexOf(Yi(D),Z)!=Z){var Ue=le.lastIndexOf(D);Ue>-1&&(le=le.slice(0,Ue))}return le+A}function aq(c){return c=xn(c),c&&k1.test(c)?c.replace(mi,L2):c}var sq=nl(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),jS=xp("toUpperCase");function wE(c,p,S){return c=xn(c),p=S?n:p,p===n?Vh(c)?Kd(c):U1(c):c.match(p)||[]}var CE=kt(function(c,p){try{return yi(c,n,p)}catch(S){return WS(S)?S:new Et(S)}}),lq=nr(function(c,p){return Gn(p,function(S){S=rl(S),jo(c,S,$S(c[S],c))}),c});function uq(c){var p=c==null?0:c.length,S=Pe();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new bi(a);return[S(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var S=me,A=Kr(c,me);p=Pe(p),c-=me;for(var D=jd(A,p);++S0||p<0)?new Gt(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(me)},Ko(Gt.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,le=Y instanceof Gt,we=Z[0],Ce=le||Rt(Y),Te=function(jt){var Jt=D.apply(B,xa([jt],Z));return A&&Ue?Jt[0]:Jt};Ce&&S&&typeof we=="function"&&we.length!=1&&(le=Ce=!1);var Ue=this.__chain__,lt=!!this.__actions__.length,St=F&&!Ue,$t=le&&!lt;if(!F&&Ce){Y=$t?Y:new Gt(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ey,args:[Te],thisArg:n}),new Gi(xt,Ue)}return St&&$t?c.apply(this,Z):(xt=this.thru(Te),St?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=tc[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],D)}return this[S](function(Y){return p.apply(Rt(Y)?Y:[],D)})}}),Ko(Gt.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:S})}}),ts[gf(n,P).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=xi,Gt.prototype.value=B2,B.prototype.at=zG,B.prototype.chain=BG,B.prototype.commit=FG,B.prototype.next=$G,B.prototype.plant=WG,B.prototype.reverse=VG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=UG,B.prototype.first=B.prototype.head,ac&&(B.prototype[ac]=HG),B},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Tt._=Ca):yt._=Ca}).call(bs)})(Jr,Jr.exports);const Ze=Jr.exports;var Aye=Object.create,M$=Object.defineProperty,Mye=Object.getOwnPropertyDescriptor,Iye=Object.getOwnPropertyNames,Oye=Object.getPrototypeOf,Rye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Iye(t))!Rye.call(e,i)&&i!==n&&M$(e,i,{get:()=>t[i],enumerable:!(r=Mye(t,i))||r.enumerable});return e},I$=(e,t,n)=>(n=e!=null?Aye(Oye(e)):{},Nye(t||!e||!e.__esModule?M$(n,"default",{value:e,enumerable:!0}):n,e)),Dye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),O$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Zb=Be((e,t)=>{var n=O$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),zye=Be((e,t)=>{var n=Zb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),Bye=Be((e,t)=>{var n=Zb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Fye=Be((e,t)=>{var n=Zb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),$ye=Be((e,t)=>{var n=Zb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Qb=Be((e,t)=>{var n=Dye(),r=zye(),i=Bye(),o=Fye(),a=$ye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Qb();function r(){this.__data__=new n,this.size=0}t.exports=r}),Wye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Vye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),Uye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),R$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=R$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),F_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Gye=Be((e,t)=>{var n=F_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),jye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Jb=Be((e,t)=>{var n=F_(),r=Gye(),i=jye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),N$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),D$=Be((e,t)=>{var n=Jb(),r=N$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Yye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),qye=Be((e,t)=>{var n=Yye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),z$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Kye=Be((e,t)=>{var n=D$(),r=qye(),i=N$(),o=z$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Xye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),y1=Be((e,t)=>{var n=Kye(),r=Xye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),$_=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"Map");t.exports=i}),eS=Be((e,t)=>{var n=y1(),r=n(Object,"create");t.exports=r}),Zye=Be((e,t)=>{var n=eS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),Qye=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Jye=Be((e,t)=>{var n=eS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),e3e=Be((e,t)=>{var n=eS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),t3e=Be((e,t)=>{var n=eS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),n3e=Be((e,t)=>{var n=Zye(),r=Qye(),i=Jye(),o=e3e(),a=t3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=n3e(),r=Qb(),i=$_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),i3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),tS=Be((e,t)=>{var n=i3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),o3e=Be((e,t)=>{var n=tS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),a3e=Be((e,t)=>{var n=tS();function r(i){return n(this,i).get(i)}t.exports=r}),s3e=Be((e,t)=>{var n=tS();function r(i){return n(this,i).has(i)}t.exports=r}),l3e=Be((e,t)=>{var n=tS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),B$=Be((e,t)=>{var n=r3e(),r=o3e(),i=a3e(),o=s3e(),a=l3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Qb(),r=$_(),i=B$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Qb(),r=Hye(),i=Wye(),o=Vye(),a=Uye(),s=u3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),d3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),f3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),h3e=Be((e,t)=>{var n=B$(),r=d3e(),i=f3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),F$=Be((e,t)=>{var n=h3e(),r=p3e(),i=g3e(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),v3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),y3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),b3e=Be((e,t)=>{var n=F_(),r=m3e(),i=O$(),o=F$(),a=v3e(),s=y3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function N(z,V,$,j,ue,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case b:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var ee=j&l;if(ne||(ne=s),z.size!=V.size&&!ee)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,ue,W,Q);return Q.delete(z),G;case k:if(R)return R.call(z)==R.call(V)}return!1}t.exports=N}),S3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),x3e=Be((e,t)=>{var n=S3e(),r=H_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),_3e=Be((e,t)=>{var n=w3e(),r=C3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),k3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),E3e=Be((e,t)=>{var n=Jb(),r=nS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),P3e=Be((e,t)=>{var n=E3e(),r=nS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),T3e=Be((e,t)=>{function n(){return!1}t.exports=n}),$$=Be((e,t)=>{var n=Iu(),r=T3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),L3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),A3e=Be((e,t)=>{var n=Jb(),r=H$(),i=nS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",ue="[object Uint32Array]",W={};W[M]=W[O]=W[R]=W[N]=W[z]=W[V]=W[$]=W[j]=W[ue]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[b]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),M3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),I3e=Be((e,t)=>{var n=R$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),W$=Be((e,t)=>{var n=A3e(),r=M3e(),i=I3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),O3e=Be((e,t)=>{var n=k3e(),r=P3e(),i=H_(),o=$$(),a=L3e(),s=W$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),R3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),N3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),D3e=Be((e,t)=>{var n=N3e(),r=n(Object.keys,Object);t.exports=r}),z3e=Be((e,t)=>{var n=R3e(),r=D3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),B3e=Be((e,t)=>{var n=D$(),r=H$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),F3e=Be((e,t)=>{var n=O3e(),r=z3e(),i=B3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),$3e=Be((e,t)=>{var n=x3e(),r=_3e(),i=F3e();function o(a){return n(a,i,r)}t.exports=o}),H3e=Be((e,t)=>{var n=$3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),O=m.get(l);if(M&&O)return M==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=y1(),r=Iu(),i=n(r,"DataView");t.exports=i}),V3e=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"Promise");t.exports=i}),U3e=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"Set");t.exports=i}),G3e=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),j3e=Be((e,t)=>{var n=W3e(),r=$_(),i=V3e(),o=U3e(),a=G3e(),s=Jb(),l=z$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=b||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(O){var R=s(O),N=R==h?O.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case T:return v}return R}),t.exports=M}),Y3e=Be((e,t)=>{var n=c3e(),r=F$(),i=b3e(),o=H3e(),a=j3e(),s=H_(),l=$$(),u=W$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,T,M,O,R){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,ue=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return R||(R=new n),N||u(P)?r(P,k,T,M,O,R):i(P,k,V,T,M,O,R);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=ue&&w.call(k,"__wrapped__");if(Q||ne){var ee=Q?P.value():P,K=ne?k.value():k;return R||(R=new n),O(ee,K,T,M,R)}}return W?(R||(R=new n),o(P,k,T,M,O,R)):!1}t.exports=E}),q3e=Be((e,t)=>{var n=Y3e(),r=nS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),V$=Be((e,t)=>{var n=q3e();function r(i,o){return n(i,o)}t.exports=r}),K3e=["ctrl","shift","alt","meta","mod"],X3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Ew(e,t=","){return typeof e=="string"?e.split(t):e}function Ym(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>X3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!K3e.includes(o));return{...r,keys:i}}function Z3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Q3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function J3e(e){return U$(e,["input","textarea","select"])}function U$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function e5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var t5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},n5e=C.exports.createContext(void 0),r5e=()=>C.exports.useContext(n5e),i5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),o5e=()=>C.exports.useContext(i5e),a5e=I$(V$());function s5e(e){let t=C.exports.useRef(void 0);return(0,a5e.default)(t.current,e)||(t.current=e),t.current}var qA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function pt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=s5e(a),{enabledScopes:h}=o5e(),g=r5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!e5e(h,u?.scopes))return;let m=w=>{if(!(J3e(w)&&!U$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){qA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Ew(e,u?.splitKey).forEach(E=>{let P=Ym(E,u?.combinationKey);if(t5e(w,P,o)||P.keys?.includes("*")){if(Z3e(w,P,u?.preventDefault),!Q3e(w,P,u?.enabled)){qA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.addHotkey(Ym(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.removeHotkey(Ym(w,u?.combinationKey)))}},[e,l,u,h]),i}I$(V$());var o7=new Set;function l5e(e){(Array.isArray(e)?e:[e]).forEach(t=>o7.add(Ym(t)))}function u5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Ym(t);for(let r of o7)r.keys?.every(i=>n.keys?.includes(i))&&o7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{l5e(e.key)}),document.addEventListener("keyup",e=>{u5e(e.key)})});function c5e(){return J("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const d5e=()=>J("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),f5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),h5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),g5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var eo=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(eo||{});const m5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},Fa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(wd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:J(vh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(w_,{className:"invokeai__switch-root",...s})]})})};function G$(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return J(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Fke(i.target.checked))})]})}const KA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(KA)&&u!==Number(M)&&O(String(u))},[u,M]);const R=z=>{O(z),z.match(KA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=Ze.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(V)),h(V)};return x(pi,{...k,children:J(wd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(vh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),J(f_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(h_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&J("div",{className:"invokeai__number-input-stepper",children:[x(g_,{...P,className:"invokeai__number-input-stepper-button"}),x(p_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ou=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return J(wd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(vh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(RF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},v5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],y5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S5e=[{key:"2x",value:2},{key:"4x",value:4}],W_=0,V_=4294967295,x5e=["gfpgan","codeformer"],w5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],C5e=dt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),_5e=dt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),U_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(C5e),{isGFPGANAvailable:i}=Le(_5e),o=l=>e(r5(l)),a=l=>e(LV(l)),s=l=>e(i5(l.target.value));return J(en,{direction:"column",gap:2,children:[x(Ou,{label:"Type",validValues:x5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function k5e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return x(Fa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(BV(r.target.checked))})}var j$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},XA=ae.createContext&&ae.createContext(j$),rd=globalThis&&globalThis.__assign||function(){return rd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ws(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:O,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:ue,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:ee,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Me=Ie=>{const We=Ze.clamp(b?Math.floor(Number(Ie.target.value)):Number(Ie.target.value),o,me);ce(String(We)),l(We)},xe=Ie=>{ce(Ie),l(Number(Ie))},be=()=>{!T||T()};return J(wd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(vh,{className:"invokeai__slider-component-label",...V,children:r}),J(aB,{w:"100%",gap:2,children:[J(x_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...G,children:[h&&J(Ln,{children:[x(KC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(KC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(GF,{className:"invokeai__slider_track",...j,children:x(jF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...ee,children:x(UF,{className:"invokeai__slider-thumb",...ue})})]}),v&&J(f_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Me,className:"invokeai__slider-number-field",isDisabled:R,...W,children:[x(h_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),J(PF,{...ne,children:[x(g_,{className:"invokeai__slider-number-stepper"}),x(p_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(G_,{}),onClick:be,isDisabled:M,...K})]})]})}function q$(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return x(ws,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(R7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(R7(.5))}})}const K$=()=>x(Bl,{flex:"1",textAlign:"left",children:"Other Options"}),O5e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(MV(r.target.checked))})})},R5e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(DV(r.target.checked))})})},X$=()=>J(en,{gap:2,direction:"column",children:[x(R5e,{}),x(O5e,{})]}),j_=()=>x(Bl,{flex:"1",textAlign:"left",children:"Seed"});function N5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Fa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(zke(r.target.checked))})}function D5e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:W_,max:V_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const Z$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function z5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(Z$(W_,V_))),children:x("p",{children:"Shuffle"})})}function B5e(){const e=qe(),t=Le(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(HV(r)),value:t,isInteger:!1})}function F5e(){const e=qe(),t=Le(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(RV(r)),value:t,isInteger:!1})}const Y_=()=>J(en,{gap:2,direction:"column",children:[x(N5e,{}),J(en,{gap:2,children:[x(D5e,{}),x(z5e,{})]}),x(en,{gap:2,children:x(B5e,{})}),x(en,{gap:2,children:x(F5e,{})})]});function Q$(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return J(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Bke(i.target.checked))})]})}const $5e=dt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),H5e=dt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),q_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le($5e),{isESRGANAvailable:r}=Le(H5e);return J("div",{className:"upscale-options",children:[x(Ou,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(N7(Number(a.target.value))),validValues:S5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(D7(a)),value:n,isInteger:!1})]})};function W5e(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return x(Fa,{isChecked:e,width:"auto",onChange:r=>t(Oke(r.target.checked))})}function K_(){return J(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(W5e,{})]})}function V5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return J(wd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(vh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x($8,{...s,className:"input-entry",size:"sm",width:o})]})}function U5e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n(zV(i.target.value));return x(V5e,{label:"Seed Weights",value:e,isInvalid:t&&!(B_(e)||e===""),isDisabled:!t,onChange:r})}function G5e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Hke(i)),isInteger:!1})}const X_=()=>J(en,{gap:2,direction:"column",children:[x(G5e,{}),x(U5e,{})]});function j5e(){const e=qe(),t=Le(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(TV(r)),value:t,width:Z_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=dt(e=>e.options,e=>xS[e.activeTab],{memoizeOptions:{equalityCheck:Ze.isEqual}}),Y5e=dt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),J$=e=>e.options;function q5e(){const e=Le(i=>i.options.height),t=Le(_r),n=qe();return x(Ou,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(AV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const K5e=dt([e=>e.options,Y5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function X5e(){const e=qe(),{iterations:t,mayGenerateMultipleImages:n}=Le(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Ake(i)),value:t,width:Z_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Le(r=>r.options.sampler),t=qe();return x(Ou,{label:"Sampler",value:e,onChange:r=>t(NV(r.target.value)),validValues:v5e,styleClass:"main-option-block"})}function Q5e(){const e=qe(),t=Le(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e($V(r)),value:t,width:Z_,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Le(i=>i.options.width),t=Le(_r),n=qe();return x(Ou,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(WV(Number(i.target.value))),validValues:y5e,styleClass:"main-option-block"})}const Z_="auto";function Q_(){return x("div",{className:"main-options",children:J("div",{className:"main-options-list",children:[J("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(j5e,{})]}),J("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},eH=Fb({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:yu,addLogEntry:Co,setShouldShowLogViewer:Pw,setIsConnected:ZA,setSocketId:wTe,setShouldConfirmOnDelete:tH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:J3,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:QA,errorSeen:nH,setModelList:JA,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:hm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=eH.actions,h4e=eH.reducer;function p4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function rH(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=dt(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Le(y4e),{text:r}=m5e[t];return n?J(m_,{trigger:"hover",children:[x(b_,{children:x(Bl,{children:e})}),J(y_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(v_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},S4e=ke(({feature:e,icon:t=p4e},n)=>x(b4e,{feature:e,children:x(Bl,{ref:n,children:x(va,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,options:r}=e;return J(Uf,{className:"advanced-settings-item",children:[x("h2",{children:J(Wf,{className:"advanced-settings-header",children:[t,x(S4e,{feature:n}),x(Vf,{})]})}),x(Gf,{className:"advanced-settings-panel",children:r})]})}const J_=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return x(Cb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(x4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function iH(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function oH(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function ek(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function aH(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function rS(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function sH(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function O4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function lH(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function eM(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function uH(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function b1(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function tk(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function nk(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],rk=e=>e.kind==="line"&&e.layer==="mask",ebe=e=>e.kind==="line"&&e.layer==="base",p4=e=>e.kind==="image"&&e.layer==="base",tbe=e=>e.kind==="line",zn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,cH=e=>e.canvas.layerState.objects.find(p4),dH=dt([e=>e.options,e=>e.system,cH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(B_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ze.isEqual,resultEqualityCheck:Ze.isEqual}}),a7=ti("socketio/generateImage"),nbe=ti("socketio/runESRGAN"),rbe=ti("socketio/runFacetool"),ibe=ti("socketio/deleteImage"),s7=ti("socketio/requestImages"),tM=ti("socketio/requestNewImages"),obe=ti("socketio/cancelProcessing"),abe=ti("socketio/requestSystemConfig"),fH=ti("socketio/requestModelChange"),sbe=ti("socketio/saveStagingAreaImageToGallery"),lbe=ti("socketio/requestEmptyTempFolder"),ra=ke((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function hH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(dH),o=Le(_r),a=()=>{r(a7(o))};return pt(["ctrl+enter","meta+enter"],()=>{i&&r(a7(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const ube=dt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function pH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(ube),a=()=>n(obe());return pt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const cbe=dt(e=>e.options,e=>e.shouldLoopback),dbe=()=>{const e=qe(),t=Le(cbe);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(Nke(!t))}})},ik=()=>{const e=Le(_r);return J("div",{className:"process-buttons",children:[x(hH,{}),e==="img2img"&&x(dbe,{}),x(pH,{})]})},fbe=dt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ok=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(fbe),{isReady:r}=Le(dH),i=C.exports.useRef(null),o=s=>{e(wS(s.target.value))};pt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(a7(n)))};return x("div",{className:"prompt-bar",children:x(wd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(e$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function gH(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function mH(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function hbe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function pbe(e,t){e.classList?e.classList.add(t):hbe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function nM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function gbe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=nM(e.className,t):e.setAttribute("class",nM(e.className&&e.className.baseVal||"",t))}const rM={disabled:!1},vH=ae.createContext(null);var yH=function(t){return t.scrollTop},pm="unmounted",Tf="exited",Lf="entering",Hp="entered",l7="exiting",Nu=function(e){t_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Tf,o.appearStatus=Lf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=pm:l=Tf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===pm?{status:Tf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Lf&&a!==Hp&&(o=Lf):(a===Lf||a===Hp)&&(o=l7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Lf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ky.findDOMNode(this);a&&yH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Tf&&this.setState({status:pm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[ky.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||rM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Lf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ky.findDOMNode(this);if(!o||rM.disabled){this.safeSetState({status:Tf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:l7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Tf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:ky.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===pm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Q8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(vH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Nu.contextType=vH;Nu.propTypes={};function Rp(){}Nu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rp,onEntering:Rp,onEntered:Rp,onExit:Rp,onExiting:Rp,onExited:Rp};Nu.UNMOUNTED=pm;Nu.EXITED=Tf;Nu.ENTERING=Lf;Nu.ENTERED=Hp;Nu.EXITING=l7;const mbe=Nu;var vbe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return pbe(t,r)})},Tw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gbe(t,r)})},ak=function(e){t_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,jc=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Dp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},iM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),ybe=e=>({width:jc(e.width,64),height:jc(e.height,64)}),bbe=.999,Sbe=.1,xbe=20,qg=.95,Lw=60,gm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},wbe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:gm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},SH=Fb({name:"canvas",initialState:wbe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!rk(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(Ze.clamp(n.width,64,512),64),height:gl(Ze.clamp(n.height,64,512),64)},o={x:jc(n.width/2-i.width/2,64),y:jc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...gm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Np(r.width,r.height,n.width,n.height,qg),s=Dp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(Ze.clamp(i,64,n/e.stageScale),64),s=gl(Ze.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=ybe(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=iM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...gm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(tbe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=gm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(p4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Np(i.width,i.height,512,512,qg),g=Dp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Np(t,n,o,a,.95),u=Dp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=iM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(p4)){const i=Np(r.width,r.height,512,512,qg),o=Dp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Np(r,i,s,l,qg),h=Dp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Np(r,i,512,512,qg),h=Dp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...gm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(Ze.clamp(o,64,512),64),height:gl(Ze.clamp(a,64,512),64)},l={x:jc(o/2-s.width/2,64),y:jc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor=e.colorPickerColor,e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:Cbe,addLine:xH,addPointToCurrentLine:wH,clearMask:_be,commitColorPickerColor:kbe,setColorPickerColor:Ebe,commitStagingAreaImage:Pbe,discardStagedImages:Tbe,fitBoundingBoxToStage:CTe,nextStagingAreaImage:Lbe,prevStagingAreaImage:Abe,redo:Mbe,resetCanvas:CH,resetCanvasInteractionState:Ibe,resetCanvasView:Obe,resizeAndScaleCanvas:_H,resizeCanvas:Rbe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:mm,setBoundingBoxPreviewFill:_Te,setBrushColor:Nbe,setBrushSize:Mw,setCanvasContainerDimensions:Dbe,clearCanvasHistory:kH,setCursorPosition:EH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:sk,setInpaintReplace:oM,setIsDrawing:iS,setIsMaskEnabled:PH,setIsMouseOverBoundingBox:Ky,setIsMoveBoundingBoxKeyHeld:kTe,setIsMoveStageKeyHeld:ETe,setIsMovingBoundingBox:aM,setIsMovingStage:g4,setIsTransformingBoundingBox:Iw,setLayer:TH,setMaskColor:zbe,setMergedCanvas:Bbe,setShouldAutoSave:Fbe,setShouldCropToBoundingBoxOnSave:$be,setShouldDarkenOutsideBoundingBox:Hbe,setShouldLockBoundingBox:PTe,setShouldPreserveMaskedArea:Wbe,setShouldShowBoundingBox:Vbe,setShouldShowBrush:TTe,setShouldShowBrushPreview:LTe,setShouldShowCanvasDebugInfo:Ube,setShouldShowCheckboardTransparency:ATe,setShouldShowGrid:Gbe,setShouldShowIntermediates:jbe,setShouldShowStagingImage:Ybe,setShouldShowStagingOutline:sM,setShouldSnapToGrid:qbe,setShouldUseInpaintReplace:Kbe,setStageCoordinates:LH,setStageDimensions:MTe,setStageScale:Xbe,setTool:O0,toggleShouldLockBoundingBox:ITe,toggleTool:OTe,undo:Zbe}=SH.actions,Qbe=SH.reducer,AH=""+new URL("logo.13003d72.png",import.meta.url).href,Jbe=dt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),lk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(Jbe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;pt("o",()=>{t(sd(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),pt("esc",()=>{t(sd(!1))},{enabled:()=>!i,preventDefault:!0},[i]),pt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Mke(a.current?a.current.scrollTop:0)),t(sd(!1)),t(Rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Dke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(bH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:J("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(gH,{}):x(mH,{})})}),!i&&J("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:AH,alt:"invoke-ai-logo"}),J("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function eSe(){const e={seed:{header:x(j_,{}),feature:eo.SEED,options:x(Y_,{})},variations:{header:x(K_,{}),feature:eo.VARIATIONS,options:x(X_,{})},face_restore:{header:x(G$,{}),feature:eo.FACE_CORRECTION,options:x(U_,{})},upscale:{header:x(Q$,{}),feature:eo.UPSCALE,options:x(q_,{})},other:{header:x(K$,{}),feature:eo.OTHER,options:x(X$,{})}};return J(lk,{children:[x(ok,{}),x(ik,{}),x(Q_,{}),x(q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(k5e,{}),x(J_,{accordionInfo:e})]})}const uk=C.exports.createContext(null),tSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(uk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:J("div",{className:"image-upload-button",children:[x(tk,{}),x(Jf,{size:"lg",children:"Click or Drag and Drop"})]})})},nSe=dt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),u7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Mv(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(nSe),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(ibe(e)),o()};pt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(tH(!b.target.checked));return J(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(_F,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(J0,{children:J(kF,{className:"modal",children:[x(Rb,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Dv,{children:J(en,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(wd,{children:J(en,{alignItems:"center",children:[x(vh,{mb:0,children:"Don't ask me again"}),x(w_,{checked:!s,onChange:v})]})})]})}),J(Ob,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),id=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return J(m_,{...o,children:[x(b_,{children:t}),J(y_,{className:`invokeai__popover-content ${r}`,children:[i&&x(v_,{className:"invokeai__popover-arrow"}),n]})]})},rSe=dt([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),MH=()=>{const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(rSe),m=f2(),v=()=>{!u||(h&&e(md(!1)),e(y2(u)),e(ko("img2img")))},b=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};pt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Pke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};pt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};pt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(wS(u.metadata.image.prompt));pt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(nbe(u))};pt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(rbe(u))};pt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(FV(!l)),O=()=>{!u||(h&&e(md(!1)),e(sk(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return pt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),J("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(id,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:J("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(eM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:O,leftIcon:x(eM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:b,leftIcon:x(rS,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(sH,{}),size:"sm",children:x(eh,{download:!0,href:u?.url,children:"Download Image"})})]})})}),J(ia,{isAttached:!0,children:[x(mt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(mt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(mt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),J(ia,{isAttached:!0,children:[x(id,{trigger:"hover",triggerComponent:x(mt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:J("div",{className:"current-image-postprocessing-popover",children:[x(U_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(id,{trigger:"hover",triggerComponent:x(mt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:J("div",{className:"current-image-postprocessing-popover",children:[x(q_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(mt,{icon:x(aH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(u7,{image:u,children:x(mt,{icon:x(b1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},iSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},IH=Fb({name:"gallery",initialState:iSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:o0,clearIntermediateImage:Ow,removeImage:OH,setCurrentImage:oSe,addGalleryImages:aSe,setIntermediateImage:sSe,selectNextImage:ck,selectPrevImage:dk,setShouldPinGallery:lSe,setShouldShowGallery:od,setGalleryScrollPosition:uSe,setGalleryImageMinimumWidth:Kg,setGalleryImageObjectFit:cSe,setShouldHoldGalleryOpen:RH,setShouldAutoSwitchToNewImages:dSe,setCurrentCategory:Xy,setGalleryWidth:fSe,setShouldUseSingleGalleryColumn:hSe}=IH.actions,pSe=IH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:J("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:J("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var NH=at({displayName:"ExternalLinkIcon",path:J("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:J("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:J(Ln,{children:[x("defs",{children:J("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),J("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:J("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:J("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>J(en,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(rS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),J(en,{direction:i?"column":"row",children:[J(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?J(eh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(NH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mSe=(e,t)=>e.image.uuid===t.image.uuid,DH=C.exports.memo(({image:e,styleClass:t})=>{const n=qe();pt("esc",()=>{n(FV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:b,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:O,type:R,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:J(en,{gap:1,direction:"column",width:"100%",children:[J(en,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),J(eh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(NH,{mx:"2px"})]})]}),Object.keys(r).length>0?J(Ln,{children:[R&&x(On,{label:"Generation type",value:R}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(R)&&x(On,{label:"Original image",value:g}),R==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(r5(M))}),R==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(N7(E))}),R==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(D7(M))}),b&&x(On,{label:"Prompt",labelPosition:"top",value:Q3(b),onClick:()=>n(wS(b))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),O!==void 0&&x(On,{label:"Noise Threshold",value:O,onClick:()=>n(HV(O))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(RV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(NV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n($V(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(TV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:h4(N),onClick:()=>n(zV(h4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(DV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(MV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(WV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(AV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(y2(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(OV(h))}),R==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(R7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n(BV(a))}),v&&v.length>0&&J(Ln,{children:[x(Jf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:ue,strength:W}=$;return J(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:ue,onClick:()=>n(N7(ue))}),x(On,{label:"Strength",value:W,onClick:()=>n(D7(W))})]},j)}else if($.type==="gfpgan"){const{strength:ue}=$;return J(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:ue,onClick:()=>{n(r5(ue)),n(i5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:ue,fidelity:W}=$;return J(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:ue,onClick:()=>{n(r5(ue)),n(i5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(LV(W)),n(i5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),J(en,{gap:2,direction:"column",children:[J(en,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(rS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(tB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mSe),zH=dt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function vSe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le(zH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(dk())},g=()=>{e(ck())},m=()=>{e(md(!0))};return J("div",{className:"current-image-preview",children:[i&&x(kb,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&J("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(oH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(DH,{image:i,styleClass:"current-image-metadata"})]})}const ySe=dt([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),BH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(ySe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?J(Ln,{children:[x(MH,{}),x(vSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},bSe=()=>{const e=C.exports.useContext(uk);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(tk,{}),onClick:e||void 0})};function SSe(){const e=Le(i=>i.options.initialImage),t=qe(),n=f2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(PV())};return J(Ln,{children:[J("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(bSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(kb,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xSe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(r=>r.gallery);return J("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(SSe,{})}):x(tSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(BH,{})})]})};function wSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var CSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},ASe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],fM="__resizable_base__",FH=function(e){ESe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(fM):o.className+=fM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||PSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Rw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Rw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Rw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,M=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),N=Math.min(v,T);n=Qy(n,M,O),r=Qy(r,R,N)}else n=Qy(n,h,g),r=Qy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&TSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Jy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Jy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Jy(n)?n.touches[0].clientX:n.clientX,h=Jy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=LSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=dM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=dM(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=cM(M,this.props.grid[0]),z=cM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(b.endsWith("vw")){var ue=M/this.window.innerWidth*100;M=ue+"vw"}else if(b.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var ue=T/this.window.innerWidth*100;T=ue+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Dl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kSe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return ASe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return J(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function h2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,MSe(i,...t)]}function MSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ISe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function $H(...e){return t=>e.forEach(n=>ISe(n,t))}function ja(...e){return C.exports.useCallback($H(...e),e)}const $v=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(RSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(c7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(c7,An({},r,{ref:t}),n)});$v.displayName="Slot";const c7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...NSe(r,n.props),ref:$H(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});c7.displayName="SlotClone";const OSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function RSe(e){return C.exports.isValidElement(e)&&e.type===OSe}function NSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const DSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=DSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?$v:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function HH(e,t){e&&Dl.exports.flushSync(()=>e.dispatchEvent(t))}function WH(e){const t=e+"CollectionProvider",[n,r]=h2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(b,P.collectionRef);return ae.createElement($v,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(b,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement($v,{[h]:"",ref:T},E)});function m(v){const b=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((M,O)=>P.indexOf(M.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zSe=C.exports.createContext(void 0);function VH(e){const t=C.exports.useContext(zSe);return e||t||"ltr"}function Ol(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function BSe(e,t=globalThis?.document){const n=Ol(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const d7="dismissableLayer.update",FSe="dismissableLayer.pointerDownOutside",$Se="dismissableLayer.focusOutside";let hM;const HSe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),WSe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(HSe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,R=VSe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!O||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=USe(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return BSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(hM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),pM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=hM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),pM())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(d7,z),()=>document.removeEventListener(d7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function VSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){UH(FSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function USe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&UH($Se,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pM(){const e=new CustomEvent(d7);document.dispatchEvent(e)}function UH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?HH(i,o):i.dispatchEvent(o)}let Nw=0;function GSe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:gM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:gM()),Nw++,()=>{Nw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Nw--}},[])}function gM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Dw="focusScope.autoFocusOnMount",zw="focusScope.autoFocusOnUnmount",mM={bubbles:!1,cancelable:!0},jSe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ol(i),h=Ol(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Af(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Af(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){yM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Dw,mM);s.addEventListener(Dw,u),s.dispatchEvent(P),P.defaultPrevented||(YSe(QSe(GH(s)),{select:!0}),document.activeElement===w&&Af(s))}return()=>{s.removeEventListener(Dw,u),setTimeout(()=>{const P=new CustomEvent(zw,mM);s.addEventListener(zw,h),s.dispatchEvent(P),P.defaultPrevented||Af(w??document.body,{select:!0}),s.removeEventListener(zw,h),yM.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qSe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Af(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Af(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function YSe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Af(r,{select:t}),document.activeElement!==n)return}function qSe(e){const t=GH(e),n=vM(t,e),r=vM(t.reverse(),e);return[n,r]}function GH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vM(e,t){for(const n of e)if(!KSe(n,{upTo:t}))return n}function KSe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XSe(e){return e instanceof HTMLInputElement&&"select"in e}function Af(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XSe(e)&&t&&e.select()}}const yM=ZSe();function ZSe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=bM(e,t),e.unshift(t)},remove(t){var n;e=bM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function QSe(e){return e.filter(t=>t.tagName!=="A")}const t1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},JSe=Qw["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(JSe());return t1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function S1(e){return e.split("-")[0]}function oS(e){return e.split("-")[1]}function x1(e){return["top","bottom"].includes(S1(e))?"x":"y"}function fk(e){return e==="y"?"height":"width"}function SM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=x1(t),l=fk(s),u=r[l]/2-i[l]/2,h=S1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(oS(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=SM(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=jH(r),h={x:i,y:o},g=x1(a),m=oS(a),v=fk(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const O=P/2-k/2,R=u[w],N=M-b[v]-u[E],z=M/2-b[v]/2+O,V=f7(R,z,N),ue=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=oS(e),i=x1(e),o=fk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=y4(a)),{main:a,cross:y4(a)}}const lxe={start:"end",end:"start"};function wM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=y4(e);return[wM(e),t,wM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=S1(r),P=g||(w===a||!v?[y4(a)]:cxe(a)),k=[a,...P],T=await v4(t,b),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(O=[...O,{placement:r,overflows:M}],!M.every(V=>V<=0)){var R,N;const V=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=k[V];if($)return{data:{index:V,overflows:O},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const ue=(z=O.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;ue&&(j=ue);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function CM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _M(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await v4(r,{...n,elementContext:"reference"}),a=CM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_M(a)}}}case"escaped":{const o=await v4(r,{...n,altBoundary:!0}),a=CM(o,i.floating);return{data:{escapedOffsets:a,escaped:_M(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=S1(n),s=oS(n),l=x1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function YH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await v4(t,l),g=x1(S1(i)),m=YH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=f7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],T=b-h[P];b=f7(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=x1(i),m=YH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,N=o.reference[g]+o.reference[O]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const O=g==="y"?"width":"height",R=["top","left"].includes(S1(i)),N=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function qH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Du(e){if(e==null)return window;if(!qH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function p2(e){return Du(e).getComputedStyle(e)}function Lu(e){return qH(e)?"":e?(e.nodeName||"").toLowerCase():""}function KH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Rl(e){return e instanceof Du(e).HTMLElement}function gd(e){return e instanceof Du(e).Element}function vxe(e){return e instanceof Du(e).Node}function hk(e){if(typeof ShadowRoot>"u")return!1;const t=Du(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aS(e){const{overflow:t,overflowX:n,overflowY:r}=p2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function XH(e){const t=/firefox/i.test(KH()),n=p2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function ZH(){return!/^((?!chrome|android).)*safari/i.test(KH())}const kM=Math.min,qm=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Rl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=gd(e)?Du(e):window,g=!ZH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function Ed(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function sS(e){return gd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function QH(e){return Au(Ed(e)).left+sS(e).scrollLeft}function bxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function Sxe(e,t,n){const r=Rl(t),i=Ed(t),o=Au(e,r&&bxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||aS(i))&&(a=sS(t)),Rl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=QH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function JH(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(hk(e)?e.host:null)||Ed(e)}function EM(e){return!Rl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=JH(e);for(hk(t)&&(t=t.host);Rl(t)&&!["html","body"].includes(Lu(t));){if(XH(t))return t;t=t.parentNode}return null}function h7(e){const t=Du(e);let n=EM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=EM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!XH(n))?t:n||xxe(e)||t}function PM(e){if(Rl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rl(n),o=Ed(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||aS(o))&&(a=sS(n)),Rl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Du(e),r=Ed(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=ZH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=Ed(e),r=sS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=qm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=qm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+QH(e);const l=-r.scrollTop;return p2(i||n).direction==="rtl"&&(s+=qm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function eW(e){const t=JH(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Rl(t)&&aS(t)?t:eW(t)}function S4(e,t){var n;t===void 0&&(t=[]);const r=eW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Du(r),a=i?[o].concat(o.visualViewport||[],aS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(S4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&hk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function TM(e,t,n){return t==="viewport"?m4(Cxe(e,n)):gd(t)?Exe(t,n):m4(_xe(Ed(e)))}function Pxe(e){const t=S4(e),r=["absolute","fixed"].includes(p2(e).position)&&Rl(e)?h7(e):e;return gd(r)?t.filter(i=>gd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=TM(t,h,i);return u.top=qm(g.top,u.top),u.right=kM(g.right,u.right),u.bottom=kM(g.bottom,u.bottom),u.left=qm(g.left,u.left),u},TM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:gd,getDimensions:PM,getOffsetParent:h7,getDocumentElement:Ed,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Sxe(t,h7(n),r),floating:{...PM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>p2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...gd(e)?S4(e):[],...S4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),gd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&b();function b(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var p7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function g7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!g7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!g7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return p7(()=>{t.current=e}),t}function Oxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);g7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Dl.exports.flushSync(()=>{h(T)})})},[g,n,r]);p7(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);p7(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Rxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?xM({element:t.current,padding:n}).fn(i):{}:t?xM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return t1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const tW="Popper",[pk,nW]=h2(tW),[Dxe,rW]=pk(tW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=rW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),x4="PopperContent",[$xe,RTe]=pk(x4),[Hxe,Wxe]=pk(x4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...O}=e,R=rW(x4,h),[N,z]=C.exports.useState(null),V=ja(t,_t=>z(_t)),[$,j]=C.exports.useState(null),ue=Nxe($),W=(n=ue?.width)!==null&&n!==void 0?n:0,Q=(r=ue?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),ee=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:ee,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Me,x:xe,y:be,placement:Ie,middlewareData:We,update:De}=Oxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:b}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Rxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});t1(()=>{ce(R.anchor)},[ce,R.anchor]);const Qe=xe!==null&&be!==null,[st,Ct]=iW(Ie),ht=(i=We.arrow)===null||i===void 0?void 0:i.x,ut=(o=We.arrow)===null||o===void 0?void 0:o.y,vt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ee,Je]=C.exports.useState();t1(()=>{N&&Je(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(x4,h),gt=!Lt;C.exports.useLayoutEffect(()=>{if(!gt)return it.add(De),()=>{it.delete(De)}},[gt,it,De]),C.exports.useLayoutEffect(()=>{gt&&Qe&&Array.from(it).reverse().forEach(_t=>requestAnimationFrame(_t))},[gt,Qe,it]);const an={"data-side":st,"data-align":Ct,...O,ref:V,style:{...O.style,animation:Qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Me,left:0,top:0,transform:Qe?`translate3d(${Math.round(xe)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ee,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:st,onArrowChange:j,arrowX:ht,arrowY:ut,shouldHideArrow:vt},gt?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,an)):C.exports.createElement(Tu.div,an)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=iW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return b==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):b==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,M=g?E:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function iW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const oW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};oW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=t3(r.current);o.current=s==="mounted"?u:"none"},[s]),t1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=t3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),t1(()=>{if(t){const u=g=>{const v=t3(r.current).includes(g.animationName);g.target===t&&v&&Dl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=t3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function t3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ol(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ol(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Bw="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},gk="RovingFocusGroup",[m7,aW,twe]=WH(gk),[nwe,sW]=h2(gk,[twe]),[rwe,iwe]=nwe(gk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(m7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(m7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=VH(o),[b=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Ol(u),T=aW(n),M=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Bw,k),()=>N.removeEventListener(Bw,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(Bw,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),ue=$.find(ne=>ne.id===b),Q=[j,ue,...$].filter(Boolean).map(ne=>ne.ref.current);lW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=aW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(m7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>lW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function lW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],uW=["ArrowUp","PageDown","End"],vwe=[...mwe,...uW],lS="Menu",[v7,ywe,bwe]=WH(lS),[wh,cW]=h2(lS,[bwe,nW,sW]),mk=nW(),dW=sW(),[Swe,uS]=wh(lS),[xwe,vk]=wh(lS),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=mk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ol(o),m=VH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(Swe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=mk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[NTe,kwe]=wh(_we,{forceMount:void 0}),ad="MenuContent",[Ewe,fW]=wh(ad),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(ad,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uS(ad,e.__scopeMenu),a=vk(ad,e.__scopeMenu);return C.exports.createElement(v7.Provider,{scope:e.__scopeMenu},C.exports.createElement(oW,{present:r||o.open},C.exports.createElement(v7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=uS(ad,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return NB(o)},[]),C.exports.createElement(hW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=uS(ad,e.__scopeMenu);return C.exports.createElement(hW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),hW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=uS(ad,n),E=vk(ad,n),P=mk(n),k=dW(n),T=ywe(n),[M,O]=C.exports.useState(null),R=C.exports.useRef(null),N=ja(t,R,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),ue=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?xF:C.exports.Fragment,ne=v?{as:$v,allowPinchZoom:!0}:void 0,ee=G=>{var X,ce;const me=V.current+G,Me=T().filter(Qe=>!Qe.disabled),xe=document.activeElement,be=(X=Me.find(Qe=>Qe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Ie=Me.map(Qe=>Qe.textValue),We=Bwe(Ie,me,be),De=(ce=Me.find(Qe=>Qe.textValue===We))===null||ce===void 0?void 0:ce.ref.current;(function Qe(st){V.current=st,window.clearTimeout(z.current),st!==""&&(z.current=window.setTimeout(()=>Qe(""),1e3))})(me),De&&setTimeout(()=>De.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),GSe();const K=C.exports.useCallback(G=>{var X,ce;return ue.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=R.current)===null||X===void 0||X.focus(),O(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jSe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=R.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(WSe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:N,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Me=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Me&&ee(G.key));const xe=R.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Ie=T().filter(We=>!We.disabled).map(We=>We.ref.current);uW.includes(G.key)&&Ie.reverse(),Dwe(Ie)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,b7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";ue.current=me,W.current=G.clientX}}))})))))))}),y7="MenuItem",LM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=vk(y7,e.__scopeMenu),s=fW(y7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(LM,{bubbles:!0,cancelable:!0});g.addEventListener(LM,v=>r?.(v),{once:!0}),HH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=fW(y7,n),s=dW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(v7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,b7(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,b7(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Owe="MenuItemIndicator";wh(Owe,{checked:!1});const Rwe="MenuSub";wh(Rwe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function b7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,pW="ContextMenu",[Gwe,DTe]=h2(pW,[cW]),cS=cW(),[jwe,gW]=Gwe(pW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=cS(t),u=Ol(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=gW(qwe,n),o=cS(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,n3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,n3(u)),onPointerCancel:Kn(e.onPointerCancel,n3(u)),onPointerUp:Kn(e.onPointerUp,n3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=gW(Xwe,n),o=cS(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=cS(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function n3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,xf=Qwe,n6e=dt([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),r6e=dt([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),i6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,o6e=C.exports.memo(e=>{const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[b,w]=C.exports.useState(!1),E=f2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(wS(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(md(!1)),t(y2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(md(!1)),t(sk(l)),t(_H()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Tke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Eke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return J(Jwe,{onOpenChange:$=>{t(RH($))},children:[x(e6e,{children:J(Bl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(kb,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(oSe(l)),children:u&&x(va,{width:"50%",height:"50%",as:ek,className:"hoverable-image-check"})}),b&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(u7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),J(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(xf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(xf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(xf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(xf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(xf,{onClickCapture:O,children:"Send to Image To Image"}),x(xf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(u7,{image:l,children:x(xf,{"data-warning":!0,children:"Delete Image"})})]})]})},i6e),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Uz,{className:`invokeai__checkbox ${n}`,...r,children:t})},r3=320,AM=40,a6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},MM=400;function mW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:b,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Le(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:MM,galleryMaxWidth:MM}:a6e[u],[O,R]=C.exports.useState(b>=r3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),ue=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{b>=r3&&R(!1)},[b]);const Q=()=>{e(lSe(!i)),e(Li(!0))},ne=()=>{o?K():ee()},ee=()=>{e(od(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(od(!1)),e(RH(!1)),e(uSe(ue.current?ue.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(s7(n))},X=xe=>{e(Kg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};pt("g",()=>{ne()},[o,i]),pt("left",()=>{e(dk())},{enabled:!E},[E]),pt("right",()=>{e(ck())},{enabled:!E},[E]),pt("shift+g",()=>{Q()},[i]),pt("esc",()=>{e(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Me=32;return pt("shift+up",()=>{if(s<256){const xe=Ze.clamp(s+Me,32,256);e(Kg(xe))}},[s]),pt("shift+down",()=>{if(s>32){const xe=Ze.clamp(s-Me,32,256);e(Kg(xe))}},[s]),C.exports.useEffect(()=>{!ue.current||(ue.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(be){!i&&j.current&&!j.current.contains(be.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(bH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:J("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[J(FH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:b,height:i?"100%":"100vh"},onResizeStart:(xe,be,Ie)=>{$(Ie.clientHeight),Ie.style.height=`${Ie.clientHeight}px`,i&&(Ie.style.position="fixed",Ie.style.right="1rem",z(!0))},onResizeStop:(xe,be,Ie,We)=>{const De=i?Ze.clamp(Number(b)+We.width,T,Number(M)):Number(b)+We.width;e(fSe(De)),Ie.removeAttribute("data-resize-alert"),i&&(Ie.style.position="relative",Ie.style.removeProperty("right"),Ie.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,be,Ie,We)=>{const De=Ze.clamp(Number(b)+We.width,T,Number(i?M:.95*window.innerWidth));De>=r3&&!O?R(!0):DeDe-AM&&e(Kg(De-AM)),i&&(De>=M?Ie.setAttribute("data-resize-alert","true"):Ie.removeAttribute("data-resize-alert")),Ie.style.height=`${V}px`},children:[J("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?J(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Xy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Xy("user")),children:"Uploads"})]}):J(Ln,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Xy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Xy("user"))})]})}),J("div",{className:"image-gallery-header-right-icons",children:[x(id,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(nk,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:J("div",{className:"image-gallery-settings-popover",children:[J("div",{children:[x(ws,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Kg(64)),icon:x(G_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dSe(xe.target.checked))})}),x("div",{children:x(Aa,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hSe(xe.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(gH,{}):x(mH,{})})]})]}),x("div",{className:"image-gallery-container",ref:ue,children:t.length||v?J(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:be}=xe;return x(o6e,{image:xe,isSelected:r===be},be)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):J("div",{className:"image-gallery-container-placeholder",children:[x(rH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:b+"px",height:"100%"}})]})})}const s6e=dt([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),yk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Le(s6e),l=()=>{t($ke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:J("div",{className:"workarea-main",children:[n,J("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(wSe,{})})})]}),!a&&x(mW,{})]})})};function l6e(){return x(yk,{optionsPanel:x(eSe,{}),children:x(xSe,{})})}function u6e(){const e={seed:{header:x(j_,{}),feature:eo.SEED,options:x(Y_,{})},variations:{header:x(K_,{}),feature:eo.VARIATIONS,options:x(X_,{})},face_restore:{header:x(G$,{}),feature:eo.FACE_CORRECTION,options:x(U_,{})},upscale:{header:x(Q$,{}),feature:eo.UPSCALE,options:x(q_,{})},other:{header:x(K$,{}),feature:eo.OTHER,options:x(X$,{})}};return J(lk,{children:[x(ok,{}),x(ik,{}),x(Q_,{}),x(J_,{accordionInfo:e})]})}const c6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(BH,{})})});function d6e(){return x(yk,{optionsPanel:x(u6e,{}),children:x(c6e,{})})}var S7=function(e,t){return S7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},S7(e,t)};function f6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");S7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ll=function(){return Ll=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Pd(e,t,n,r){var i=T6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):bW(e,r,n,function(v){var b=s+h*v,w=l+g*v,E=u+m*v;o(b,w,E)})}}function T6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function L6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var A6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},bk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=L6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=A6e(a,l,u,s,h,g,Boolean(i));return m},n1=function(e,t){var n=bk(e,t);return e.bounds=n,n};function dS(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=x7(e,s-g,u+g,r),b=x7(t,l-m,h+m,r);return{x:v,y:b}}var x7=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function fS(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=dS(g,m,i,o,0,0,null);return v}function g2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var OM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=hS(o,n);return!l},RM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},M6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},I6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function O6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,b=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=fS(e,P,k,i,e.bounds,s||l),M=T.x,O=T.y;return{scale:i,positionX:w?M:n,positionY:E?O:r}}}function R6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,b=!m||!v;if(!(!a||b||!s)){var w=dS(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var N6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},w4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},D6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function B6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function NM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:x7(e,o,a,i)}function F6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function $6e(e,t){var n=D6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=F6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,b=l-i,w=h*h+g*g,E=Math.sqrt(w)/b;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function H6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=b.sizeX,O=b.sizeY,R=b.velocityAlignmentTime,N=R,z=B6e(e,l),V=Math.max(z,N),$=w4(e,M),j=w4(e,O),ue=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+ue,ne=h-ue,ee=g+W,K=m-W,G=e.transformState,X=new Date().getTime();bW(e,T,V,function(ce){var me=e.transformState,Me=me.scale,xe=me.positionX,be=me.positionY,Ie=new Date().getTime()-X,We=Ie/N,De=vW[b.animationType],Qe=1-De(Math.min(1,We)),st=1-ce,Ct=xe+a*st,ht=be+s*st,ut=NM(Ct,G.positionX,xe,k,v,h,u,ne,Q,Qe),vt=NM(ht,G.positionY,be,P,v,m,g,K,ee,Qe);(xe!==Ct||be!==ht)&&e.setTransformState(Me,ut,vt)})}}function DM(e,t){var n=e.transformState.scale;bl(e),n1(e,n),t.touches?I6e(e,t):M6e(e,t)}function zM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=N6e(e,t,n),u=l.x,h=l.y,g=w4(e,a),m=w4(e,s);$6e(e,{x:u,y:h}),R6e(e,u,h,g,m)}}function W6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?H6e(e):SW(e)}}function SW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&SW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,w=Sk(e,a,v,b);w&&Pd(e,w,h,g)}}function Sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=g2(Da(t,2),o,a,0,!1),u=n1(e,l),h=fS(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var a0={previousScale:1,scale:1,positionX:0,positionY:0},V6e=Ll(Ll({},a0),{setComponents:function(){},contextInstance:null}),Xg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},wW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:a0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:a0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:a0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:a0.positionY}},BM=function(e){var t=Ll({},Xg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Xg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Xg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ll(Ll({},Xg[n]),e[n]):s?t[n]=IM(IM([],Xg[n]),e[n]):t[n]=e[n]}}),t},CW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=g2(Da(h,3),s,a,u,!1);return g};function _W(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,b=CW(e,t,n),w=Sk(e,b,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Pd(e,w,r,i)}function kW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=wW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=bk(e,a.scale),m=dS(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Pd(e,v,t,n)}}function U6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return a0;var l=r.getBoundingClientRect(),u=G6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/m,w=r.offsetHeight/v,E=g2(n||Math.min(b,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,O=bk(e,E),R=dS(T,M,O,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function G6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function j6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var Y6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),_W(e,1,t,n,r)}},q6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),_W(e,-1,t,n,r)}},K6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Pd(e,v,i,o)}}},X6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),kW(e,t,n)}},Z6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=EW(t||i.scale,o,a);Pd(e,s,n,r)}}},Q6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&j6e(a)&&a&&o.contains(a)){var s=U6e(e,a,n);Pd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:Y6e(e),zoomOut:q6e(e),setTransform:K6e(e),resetTransform:X6e(e),centerView:Z6e(e),zoomToElement:Q6e(e)}},Fw=!1;function $w(){try{var e={get passive(){return Fw=!0,!1}};return e}catch{return Fw=!1,Fw}}var hS=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},FM=function(e){e&&clearTimeout(e)},J6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},EW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},eCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=hS(u,a);return!g};function tCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=h6e(t,n);return r}function PW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var nCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var b=r?!1:!m,w=g2(Da(v,3),u,l,g,b);return w},rCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},iCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=hS(a,i);return!l},oCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},aCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},TW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},sCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return g2(Da(g,2),a,o,l,!u)},lCe=160,uCe=100,cCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},dCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,b=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=tCe(t,null),P=nCe(e,E,w,!t.ctrlKey);if(l!==P){var k=n1(e,P),T=PW(t,o,l),M=b||v===0||h,O=u&&M,R=fS(e,T.x,T.y,P,k,O),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},fCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;FM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(xW(e,t.x,t.y),e.wheelAnimationTimer=null)},uCe);var o=rCe(e,t);o&&(FM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},lCe))},hCe=function(e,t){var n=TW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},pCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=aCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=TW(t),v=sCe(e,m);if(v!==i){var b=n1(e,v),w=u||h===0||s,E=a&&w,P=fS(e,g.x,g.y,v,b,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},gCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,xW(e,t?.x,t?.y)};function mCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return kW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=CW(e,h,o),m=PW(t,u,l),v=Sk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Pd(e,v,a,s)}}var vCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=hS(l,s);return!(g||!h)},LW=ae.createContext(V6e),yCe=function(e){f6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=wW(n.props),n.setup=BM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=$w();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=eCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(cCe(n,r),dCe(n,r),fCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=OM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),DM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=RM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),zM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(W6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=iCe(n,r);!l||(hCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=oCe(n);!l||(r.preventDefault(),r.stopPropagation(),pCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(gCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=OM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),DM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=RM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];zM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=vCe(n,r);!o||mCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,n1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=EW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=J6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=$w();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=$w();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(n1(this,this.transformState.scale),this.setup=BM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(LW.Provider,{value:Ll(Ll({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),bCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(yCe,{...Ll({},e,{setRef:i})})});function SCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var xCe=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,$M={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};SCe(xCe);var wCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(LW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+$M.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+$M.content+" "+o,style:s,children:t})})};function CCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(bCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:b})=>J(Ln,{children:[J("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(M5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(mt,{icon:x(I5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(L5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(A5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(G_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(wCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b()})})]})})}function _Ce(){const e=qe(),t=Le(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Le(zH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(dk())},g=()=>{e(ck())};return pt("Esc",()=>{t&&e(md(!1))},[t]),J("div",{className:"lightbox-container",children:[x(mt,{icon:x(T5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(md(!1))},fontSize:20}),J("div",{className:"lightbox-display-container",children:[J("div",{className:"lightbox-preview-wrapper",children:[x(MH,{}),!r&&J("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(oH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&J(Ln,{children:[x(CCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(DH,{image:n})]})]}),x(mW,{})]})]})}const kCe=dt(zn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ECe=()=>{const e=qe(),{boundingBoxDimensions:t}=Le(kCe),n=a=>{e(mm({...t,width:Math.floor(a)}))},r=a=>{e(mm({...t,height:Math.floor(a)}))},i=()=>{e(mm({...t,width:Math.floor(512)}))},o=()=>{e(mm({...t,height:Math.floor(512)}))};return J(en,{direction:"column",gap:"1rem",children:[x(ws,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(ws,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},PCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Bounding Box"}),m2=e=>e.system,TCe=e=>e.system.toastQueue,LCe=dt(zn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function ACe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Le(LCe),n=qe();return J(en,{alignItems:"center",columnGap:"1rem",children:[x(ws,{label:"Inpaint Replace",value:e,onChange:r=>{n(oM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(oM(1)),isResetDisabled:!t}),x(Fa,{isChecked:t,onChange:r=>n(Kbe(r.target.checked))})]})}const MCe=dt([J$,m2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ICe=()=>{const e=qe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Le(MCe);return J(en,{direction:"column",gap:"1rem",children:[x(ACe,{}),x(ws,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(CI(u))},handleReset:()=>e(CI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(wI(u))},handleReset:()=>{e(wI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(kI(u))},handleReset:()=>{e(kI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(_I(u))},handleReset:()=>{e(_I(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(Fa,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(Ike(u.target.checked))}}),x(Ou,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(IV(u.target.value))}),x(ws,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(EI(u))},handleReset:()=>{e(EI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},OCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function RCe(){const e={boundingBox:{header:x(PCe,{}),feature:eo.BOUNDING_BOX,options:x(ECe,{})},outpainting:{header:x(OCe,{}),feature:eo.OUTPAINTING,options:x(ICe,{})},seed:{header:x(j_,{}),feature:eo.SEED,options:x(Y_,{})},variations:{header:x(K_,{}),feature:eo.VARIATIONS,options:x(X_,{})}};return J(lk,{children:[x(ok,{}),x(ik,{}),x(Q_,{}),x(q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(J_,{accordionInfo:e})]})}const NCe=dt(zn,cH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),DCe=()=>{const e=qe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Le(NCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Dbe({width:a,height:s})),e(Rbe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(o2,{thickness:"2px",speed:"1s",size:"xl"})})};var zCe=Math.PI/180;function BCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const R0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:R0,version:"8.3.14",isBrowser:BCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*zCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:R0.document,_injectGlobal(e){R0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var FCe="[object Array]",$Ce="[object Number]",HCe="[object String]",WCe="[object Boolean]",VCe=Math.PI/180,UCe=180/Math.PI,Hw="#",GCe="",jCe="0",YCe="Konva warning: ",HM="Konva error: ",qCe="rgb(",Ww={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},KCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,i3=[];const XCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===FCe},_isNumber(e){return Object.prototype.toString.call(e)===$Ce&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===HCe},_isBoolean(e){return Object.prototype.toString.call(e)===WCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){i3.push(e),i3.length===1&&XCe(function(){const t=i3;i3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Hw,GCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=jCe+e;return Hw+e},getRGB(e){var t;return e in Ww?(t=Ww[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Hw?this._hexToRgb(e.substring(1)):e.substr(0,4)===qCe?(t=KCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Ww[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Td(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function AW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function MW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Td(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function xk(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function w1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function IW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function ZCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function QCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Td(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Zg="get",Qg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Zg+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Qg+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Qg+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=Zg+a(t),l=Qg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Qg+n,i=Zg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Zg+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Zg+de._capitalize(n),a=Qg+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function JCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=e7e+u.join(WM)+t7e)):(o+=s.property,t||(o+=a7e+s.val)),o+=i7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=l7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=VM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=JCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var e5="absoluteOpacity",a3="allEventListeners",cu="absoluteTransform",UM="absoluteScale",wf="canvas",f7e="Change",h7e="children",p7e="konva",w7="listening",GM="mouseenter",jM="mouseleave",YM="set",qM="Shape",t5=" ",KM="stage",Ic="transform",g7e="Stage",C7="visible",m7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(t5);let v7e=1;class $e{constructor(t){this._id=v7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Ic||t===cu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Ic||t===cu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(t5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(wf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===cu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(wf)){const{scene:t,filter:n,hit:r}=this._cache.get(wf);de.releaseCanvas(t,n,r),this._cache.delete(wf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new N0({pixelRatio:a,width:i,height:o}),v=new N0({pixelRatio:a,width:0,height:0}),b=new wk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(wf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(e5),this._clearSelfAndDescendantCache(UM),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(wf,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(wf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==h7e&&(r=YM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(w7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(C7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==g7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Ic),this._clearSelfAndDescendantCache(cu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Ic);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Ic),this._clearSelfAndDescendantCache(cu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(e5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=Sm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Uw.pointer;if(t==="touch")return Uw.touch;if(t==="mouse")return Uw.mouse};function ZM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",n5=[];class mS extends ca{constructor(t){super(ZM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),n5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ZM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===b7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&n5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(_7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new N0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+XM,this.content.style.height=n+XM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rw7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return RW(t,this)}setPointerCapture(t){NW(t,this)}releaseCapture(t){Km(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||C7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=Sm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=Sm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=Sm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Vw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=Sm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Vw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(_7,{evt:t}):this._fire(_7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(k7,{evt:t}):this._fire(k7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Vw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(s0,Ck(t)),Km(t.pointerId)}_lostpointercapture(t){Km(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new N0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new wk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}mS.prototype.nodeType=y7e;gr(mS);q.addGetterSetter(mS,"container");var jW="hasShadow",YW="shadowRGBA",qW="patternImage",KW="linearGradient",XW="radialGradient";let d3;function Gw(){return d3||(d3=de.createCanvasElement().getContext("2d"),d3)}const Xm={};function k7e(e){e.fill()}function E7e(e){e.stroke()}function P7e(e){e.fill()}function T7e(e){e.stroke()}function L7e(){this._clearCache(jW)}function A7e(){this._clearCache(YW)}function M7e(){this._clearCache(qW)}function I7e(){this._clearCache(KW)}function O7e(){this._clearCache(XW)}class Ae extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Xm)););this.colorKey=n,Xm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(jW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(qW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Gw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(KW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Gw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Xm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return RW(t,this)}setPointerCapture(t){NW(t,this)}releaseCapture(t){Km(t)}}Ae.prototype._fillFunc=k7e;Ae.prototype._strokeFunc=E7e;Ae.prototype._fillFuncHit=P7e;Ae.prototype._strokeFuncHit=T7e;Ae.prototype._centroid=!1;Ae.prototype.nodeType="Shape";gr(Ae);Ae.prototype.eventListeners={};Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",L7e);Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",A7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",M7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",O7e);q.addGetterSetter(Ae,"stroke",void 0,IW());q.addGetterSetter(Ae,"strokeWidth",2,Fe());q.addGetterSetter(Ae,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ae,"hitStrokeWidth","auto",xk());q.addGetterSetter(Ae,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ae,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ae,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ae,"lineJoin");q.addGetterSetter(Ae,"lineCap");q.addGetterSetter(Ae,"sceneFunc");q.addGetterSetter(Ae,"hitFunc");q.addGetterSetter(Ae,"dash");q.addGetterSetter(Ae,"dashOffset",0,Fe());q.addGetterSetter(Ae,"shadowColor",void 0,w1());q.addGetterSetter(Ae,"shadowBlur",0,Fe());q.addGetterSetter(Ae,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ae,"shadowOffset",["x","y"]);q.addGetterSetter(Ae,"shadowOffsetX",0,Fe());q.addGetterSetter(Ae,"shadowOffsetY",0,Fe());q.addGetterSetter(Ae,"fillPatternImage");q.addGetterSetter(Ae,"fill",void 0,IW());q.addGetterSetter(Ae,"fillPatternX",0,Fe());q.addGetterSetter(Ae,"fillPatternY",0,Fe());q.addGetterSetter(Ae,"fillLinearGradientColorStops");q.addGetterSetter(Ae,"strokeLinearGradientColorStops");q.addGetterSetter(Ae,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ae,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ae,"fillRadialGradientColorStops");q.addGetterSetter(Ae,"fillPatternRepeat","repeat");q.addGetterSetter(Ae,"fillEnabled",!0);q.addGetterSetter(Ae,"strokeEnabled",!0);q.addGetterSetter(Ae,"shadowEnabled",!0);q.addGetterSetter(Ae,"dashEnabled",!0);q.addGetterSetter(Ae,"strokeScaleEnabled",!0);q.addGetterSetter(Ae,"fillPriority","color");q.addComponentsGetterSetter(Ae,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ae,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ae,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ae,"fillPatternScale",["x","y"]);q.addGetterSetter(Ae,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ae,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ae,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ae,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ae,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ae,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ae,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ae,"fillPatternRotation",0);q.backCompat(Ae,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var R7e="#",N7e="beforeDraw",D7e="draw",ZW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z7e=ZW.length;class Ch extends ca{constructor(t){super(t),this.canvas=new N0,this.hitCanvas=new wk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(N7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(D7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class _k extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}_k.prototype.nodeType="FastLayer";gr(_k);class r1 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}r1.prototype.nodeType="Group";gr(r1);var jw=function(){return R0.performance&&R0.performance.now?function(){return R0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:jw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=QM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=JM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===QM?this.setTime(t):this.state===JM&&this.setTime(this.duration-t)}pause(){this.state=F7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Zm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new H7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)B7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Zm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}zu.prototype._centroid=!0;zu.prototype.className="Arc";zu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(zu);q.addGetterSetter(zu,"innerRadius",0,Fe());q.addGetterSetter(zu,"outerRadius",0,Fe());q.addGetterSetter(zu,"angle",0,Fe());q.addGetterSetter(zu,"clockwise",!1,Ms());function E7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function tI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],M=l,O=u,R,N,z,V,$,j,ue,W,Q,ne;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var ee=b.shift(),K=b.shift();if(l+=ee,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+ee,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break;case"a":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:O},pathLength:this.calcLength(M,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},O=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=O([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=O(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,R,V,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);q.addGetterSetter(Nn,"data");class _h extends Bu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class C1 extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}C1.prototype._centroid=!0;C1.prototype.className="Circle";C1.prototype._attrsAffectingSize=["radius"];gr(C1);q.addGetterSetter(C1,"radius",0,Fe());class Ld extends Ae{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Ld.prototype.className="Ellipse";Ld.prototype._centroid=!0;Ld.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Ld);q.addComponentsGetterSetter(Ld,"radius",["x","y"]);q.addGetterSetter(Ld,"radiusX",0,Fe());q.addGetterSetter(Ld,"radiusY",0,Fe());class Is extends Ae{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var QW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],W7e="Change.konva",V7e="none",P7="up",T7="right",L7="down",A7="left",U7e=QW.length;class kk extends r1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var nI=Math.PI*2;class Ph extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,nI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),nI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class $l extends Ae{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var h3;function qw(){return h3||(h3=de.createCanvasElement().getContext(Y7e),h3)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ae{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(q7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=qw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+f3+this.fontVariant()+f3+(this.fontSize()+Q7e)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Jg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return qw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==oI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],qw().font=this._getContextFont();for(var P=E?this._getTextWidth(Yw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",V=0;R>>1,j=M.slice(0,$+1),ue=this._getTextWidth(j)+P;ue<=h?(R=$+1,z=j,V=ue):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===f3||Q===rI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(f3),z.lastIndexOf(rI))+1,W>0&&(R=W,z=z.slice(0,R),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var ee=this._shouldHandleEllipsis(m);if(ee){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(O=this._getTextWidth(M),O<=h)){this._addTextLine(M),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==oI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Yw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=JW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var ue=t.dataArray,W=w+1;W0)return w=W,ue[W];ue[W].command==="M"&&(m={x:ue[W].points[0],y:ue[W].points[1]})}return{}},k=function(ue){var W=t._getTextSize(ue).width+r;ue===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var ee=Q;b===void 0;)b=P(),b&&ee+b.pathLengthW?v=Nn.getPointOnLine(W,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],X=b.points[5],ce=b.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?W>b.pathLength?E=1e-8:E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength/2:E=Math.max(E-(Q-W)/b.pathLength/2,0),E>1&&(E=1,K=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength:E-=(Q-W)/b.pathLength,E>1&&(E=1,K=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(Q=Nn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,b=void 0)}},T="C",M=t._getTextSize(T).width+r,O=u/M-1,R=0;Re+`.${aV}`).join(" "),aI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in rt._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(c9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var C4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],sI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function sV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return sV(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(aI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(aI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return sV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-sI,y:-sI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),C4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new v2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ae({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let ue=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(ue-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+ue,Q=rt.getAngle(this.rotationSnapTolerance()),ee=g9e(this.rotationSnaps(),W,Q)-g.rotation,K=p9e(g,ee);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),r1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){C4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+C4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",C4,m9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Fu extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Fu.prototype.className="Wedge";Fu.prototype._centroid=!0;Fu.prototype._attrsAffectingSize=["radius"];gr(Fu);q.addGetterSetter(Fu,"radius",0,Fe());q.addGetterSetter(Fu,"angle",0,Fe());q.addGetterSetter(Fu,"clockwise",!1);q.backCompat(Fu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function lI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,T,M,O,R,N,z,V,$,j,ue,W=t+t+1,Q=r-1,ne=i-1,ee=t+1,K=ee*(ee+1)/2,G=new lI,X=null,ce=G,me=null,Me=null,xe=v9e[t],be=y9e[t];for(s=1;s>be,j!==0?(j=255/j,n[h]=(m*xe>>be)*j,n[h+1]=(v*xe>>be)*j,n[h+2]=(b*xe>>be)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>be,j>0?(j=255/j,n[l]=(m*xe>>be)*j,n[l+1]=(v*xe>>be)*j,n[l+2]=(b*xe>>be)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+ee)0&&b9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const x9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,V=O>0?O:-O;if(z>N&&(R=M),V>N&&(R=O),R*=t,i){var $=s[E]+R,j=s[E+1]+R,ue=s[E+2]+R;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=ue>255?255:ue<0?0:ue}else{var W=n-R;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Kw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,T,M,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,O=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,O,R=360/T*Math.PI/180,N,z;for(O=0;OT?k:T;var M=a,O=o,R,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,AW,q.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,AW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},j9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` +`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Wl(d):""}var Ih=Object.prototype.hasOwnProperty,Vu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Vu[zs],Vu[zs]=null,zs--)}function bn(d,f){zs++,Vu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Rd(d,f,y){if(kr.current!==Bo)throw Error(a(168));bn(kr,f),bn(Gr,y)}function Ul(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,bn(kr,d),bn(Gr,Gr.current),!0}function Nd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Ul(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),bn(kr,d)):En(Gr),bn(Gr,y)}var vi=Math.clz32?Math.clz32:Dd,Oh=Math.log,Rh=Math.LN2;function Dd(d){return d>>>=0,d===0?32:31-(Oh(d)/Rh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Gl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function Bd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Vi=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var qt=je(pe,Pt,ve[Ft],Ve);if(qt===null){Pt===null&&(Pt=Br);break}d&&Pt&&qt.alternate===null&&f(pe,Pt),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Fn&&Hs(pe,Ft),Pe;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=je(pe,Pt,qt.value,Ve);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Pe=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(qt.done)return y(pe,Pt),Fn&&Hs(pe,Ft),Pe;if(Pt===null){for(;!qt.done;Ft++,qt=ve.next())qt=At(pe,qt.value,Ve),qt!==null&&(se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return Fn&&Hs(pe,Ft),Pe}for(Pt=_(pe,Pt);!qt.done;Ft++,qt=ve.next())qt=Hn(Pt,pe,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Pt.delete(qt.key===null?Ft:qt.key),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Pe}function Xo(pe,se,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Pe=ve.key,Mt=se;Mt!==null;){if(Mt.key===Pe){if(Pe=ve.type,Pe===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&Y1(Pe)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=wa(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,Ve,ve.key),se.return=pe,pe=se):(Ve=hf(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wa(pe,se,ve),Ve.return=pe,pe=Ve)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,Ve),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),Ve)}if(ne(ve))return Pn(pe,se,ve,Ve);if(R(ve))return nr(pe,se,ve,Ve);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=xp(ve,pe.mode,Ve),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var ec=L2(!0),A2=L2(!1),Kd={},po=zo(Kd),Ca=zo(Kd),re=zo(Kd);function ye(d){if(d===Kd)throw Error(a(174));return d}function ge(d,f){bn(re,f),bn(Ca,d),bn(po,Kd),d=K(f),En(po),bn(po,d)}function Ge(){En(po),En(Ca),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(bn(Ca,d),bn(po,f))}function Qt(d){Ca.current===d&&(En(po),En(Ca))}var Ot=zo(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Hu(y)||Od(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Xd=[];function q1(){for(var d=0;dy?y:4,d(!0);var _=tc.transition;tc.transition={};try{d(!1),f()}finally{Ht=y,tc.transition=_}}function lc(){return Si().memoizedState}function ng(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},cc(d))dc(f,y);else if(y=Ju(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),nf(y,f,_)}}function uc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(cc(d))dc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Yd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Ju(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),nf(y,f,_))}}function cc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function dc(d,f){Zd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function nf(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,jl(d,y)}}var ts={readContext:Ui,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},_S={readContext:Ui,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Ui,useEffect:O2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Xl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Xl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Xl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=ng.bind(null,Sn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:I2,useDebugValue:J1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=I2(!1),f=d[0];return d=tg.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=Sn,L=qr();if(Fn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Kl&30)!==0||Q1(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,ef(9,ac.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var y=Sa,_=Vi;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=nc++,0dp&&(f.flags|=128,_=!0,pc(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),pc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&y!==1073741824&&(f.flags|=128,_=!0,pc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return Cc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(ji&1073741824)!==0&&(oi(f),ht&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function cg(d,f){switch(V1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Gr),En(kr),q1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Xu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Ot),null;case 4:return Ge(),null;case 10:return Gd(f.type._context),null;case 22:case 23:return Cc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,AS=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function gc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Qh=!1;function Ql(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:ht&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Qh,Qh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function ep(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=ee(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function dg(d){var f=d.alternate;f!==null&&(d.alternate=null,dg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function mc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||mc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,y),d=d.sibling;d!==null;)tp(d,f,y),d=d.sibling}function fg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(y,d,f):_e(y,d);else if(_!==4&&(d=d.child,d!==null))for(fg(d,f,y),d=d.sibling;d!==null;)fg(d,f,y),d=d.sibling}var br=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||gc(y,f);case 6:if(ht){var _=br,L=Yo;br=null,qo(d,f,y),br=_,Yo=L,br!==null&&(Yo?tt(br,y.stateNode):ct(br,y.stateNode))}else qo(d,f,y);break;case 18:ht&&br!==null&&(Yo?B1(br,y.stateNode):z1(br,y.stateNode));break;case 4:ht?(_=br,L=Yo,br=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),br=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=ya(_),$u(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(gc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new AS),f.forEach(function(_){var L=Z2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case ap:return":has("+(gg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case vc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function yc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*MS(_/1960))-_,10<_){d.timeoutHandle=De(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?pp.bind(null,d):null}function gp(d,f){var y=xc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=_c(d,f),d!==2&&(f=wi,wi=y,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function Yi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-yg?Qs(d,0):vg|=y),Xr(d,f)}function Cg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function OS(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),Cg(d,y)}function Z2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Cg(d,y)}var _g;_g=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,TS(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Fn&&(f.flags&1048576)!==0&&W1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;_a(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Qu(f,y),L=X1(null,f,_,d,L,y);var I=rc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,G1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,j1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=bp(_),d=Ho(_,d),L){case 0:f=og(null,f,_,d,y);break e;case 1:f=W2(null,f,_,d,y);break e;case 11:f=B2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),og(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),W2(d,f,_,L,y);case 3:e:{if(V2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,k2(d,f),Vh(f,_,null,y);var H=f.memoizedState;if(_=H.element,vt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=fc(Error(a(423)),f),f=U2(d,f,_,y,L);break e}else if(_!==L){L=fc(Error(a(424)),f),f=U2(d,f,_,y,L);break e}else for(vt&&(fo=A1(f.stateNode.containerInfo),Gn=f,Fn=!0,Ri=null,ho=!1),y=A2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Xu(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&Hd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Ie(_,L)?H=null:I!==null&&Ie(_,I)&&(f.flags|=32),H2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&Hd(f),null;case 13:return G2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=ec(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),B2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,_2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var Ne=I.updateQueue;if(Ne!==null){Ne=Ne.shared;var et=Ne.pending;et===null?fe.next=fe:(fe.next=et.next,et.next=fe),Ne.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),jd(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),jd(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Qu(f,y),L=Ui(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return F2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),_a(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Qu(f,y),P2(f,_,L),j1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return Y2(d,f,y);case 22:return $2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return Yu(d,f)}function ka(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new ka(d,f,y,_)}function kg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function bp(d){if(typeof d=="function")return kg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function qi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function hf(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")kg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return Sp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function Sp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function xp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function pf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=st,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ju(0),this.expirationTimes=ju(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ju(0),this.identifierPrefix=_,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function Q2(d,f,y,_,L,I,H,oe,fe){return d=new pf(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},G1(I),d}function Eg(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Ul(d,y,f)}return f}function Pg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=ue(f),d===null?null:d.stateNode}function gf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&I>=At&&L<=et&&H<=je){d.splice(f,1);break}else if(_!==Ne||y.width!==fe.width||jeH){if(!(I!==At||y.height!==fe.height||et<_||Ne>L)){Ne>_&&(fe.width+=Ne-_,fe.x=_),etI&&(fe.height+=At-I,fe.y=I),jey&&(y=H)),H ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Tg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!_t)throw Error(a(363));d=mg(d,f);var L=Yt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=Eg(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=Y9e})(lV);const q9e=K7(lV.exports);var Ek={exports:{}},Th={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Ek);const uI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let cI=!1,dI=!1;const Pk=".react-konva-event",K9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,X9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,Z9e={};function vS(e,t,n=Z9e){if(!cI&&"zIndex"in t&&(console.warn(X9e),cI=!0),!dI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(K9e),dI=!0)}for(var o in n)if(!uI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!uI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Md(e));for(var l in v)e.on(l+Pk,v[l])}function Md(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const uV={},Q9e={};dh.Node.prototype._applyProps=vS;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Md(e)}function e8e(e,t,n){let r=dh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=dh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return vS(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return uV}function d8e(){return uV}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Md(e)}function S8e(e,t){t.parent===e?t.moveToTop():e.add(t),Md(e)}function cV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Md(e)}function x8e(e,t,n){cV(e,t,n)}function w8e(e,t){t.destroy(),t.off(Pk),Md(e)}function C8e(e,t){t.destroy(),t.off(Pk),Md(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){vS(e,i,r)}function P8e(e){e.hide(),Md(e)}function T8e(e){}function L8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function M8e(e){}function I8e(){}const O8e=()=>Ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:S8e,insertBefore:cV,insertInContainerBefore:x8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:T8e,unhideInstance:L8e,unhideTextInstance:A8e,clearContainer:M8e,detachDeletedInstance:I8e,getCurrentEventPriority:O8e,now:u0.exports.unstable_now,idlePriority:u0.exports.unstable_IdlePriority,run:u0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,fI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,hI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&hI(e,n,t[n]);if(fI)for(var n of fI(t))F8e.call(t,n)&&hI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function Tk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Tk(r,t,n);if(i)return i;r=t?null:r.sibling}}function dV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Lk=dV(C.exports.createContext(null));class fV extends C.exports.Component{render(){return x(Lk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(Lk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:Tk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const tm=[],gI=new WeakMap;function U8e(){var e;const t=V8e();tm.splice(0,tm.length),Tk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Lk&&tm.push(dV(i))});for(const n of tm){const r=(e=W8e.current)==null?void 0:e.readContext(n);gI.set(n,r)}return C.exports.useMemo(()=>tm.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(pI({},i),{value:gI.get(r)}))),n=>x(fV,{...pI({},n)})),[])}function G8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const j8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=G8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new dh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=xm.createContainer(n.current,Ek.exports.LegacyRoot,!1,null),xm.updateContainer(x(o,{children:e.children}),r.current),()=>{!dh.isBrowser||(a(null),xm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),vS(n.current,e,i),xm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},g3="Layer",fh="Group",bu="Rect",nm="Circle",_4="Line",hV="Image",Y8e="Transformer",xm=q9e(R8e);xm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const q8e=ae.forwardRef((e,t)=>x(fV,{children:x(j8e,{...e,forwardedRef:t})})),K8e=dt([zn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),X8e=e=>{const{...t}=e,{objects:n}=Le(K8e);return x(fh,{listening:!1,...t,children:n.filter(rk).map((r,i)=>x(_4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},D0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},Z8e=dt(zn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;let b="";return u==="mask"?b=D0({...a,a:.5}):l==="colorPicker"?b=D0(o):b=D0(s),{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerSize:Lw/v,colorPickerOffset:Lw/2/v,colorPickerCornerRadius:Lw/5/v,brushColorString:b,tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h,colorPickerSize:g,colorPickerOffset:m,colorPickerCornerRadius:v}=Le(Z8e);return l?J(fh,{listening:!1,...t,children:[s==="colorPicker"?J(Ln,{children:[x(bu,{x:n?n.x-m:r/2,y:n?n.y-m:i/2,width:g,height:g,fill:a,cornerRadius:v,listening:!1}),x(bu,{x:n?n.x-m:r/2,y:n?n.y-m:i/2,width:g,height:g,cornerRadius:v,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(bu,{x:n?n.x-m:r/2,y:n?n.y-m:i/2,width:g,height:g,cornerRadius:v,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}):J(Ln,{children:[x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=dt(zn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),e_e=e=>{const{...t}=e,n=qe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:b,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Le(J8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Aw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),ee=jc(Q,64),K=jc(ne,64);W.target.x(ee),W.target.y(K),n(Aw({x:ee,y:K}))},[n,v]),O=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),ee=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(mm({width:ee,height:K})),n(Aw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),R=C.exports.useCallback((W,Q,ne)=>{const ee=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+ee,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Iw(!0))},z=()=>{n(Iw(!1)),n(Ky(!1))},V=()=>{n(aM(!0))},$=()=>{n(Iw(!1)),n(aM(!1)),n(Ky(!1))},j=()=>{n(Ky(!0))},ue=()=>{!u&&!l&&n(Ky(!1))};return J(fh,{...t,children:[x(bu,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(bu,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(bu,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&b==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:ue,onMouseOver:j,onMouseUp:$,onTransform:O,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(Y8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:b==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&b==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let pV=null,gV=null;const t_e=e=>{pV=e},Wv=()=>pV,n_e=e=>{gV=e},mV=()=>gV,r_e=dt([zn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),i_e=()=>{const e=qe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Le(r_e),i=C.exports.useRef(null),o=mV();pt("esc",()=>{e(Ibe())},{enabled:()=>!0,preventDefault:!0}),pt("shift+h",()=>{e(Vbe(!n))},{preventDefault:!0},[t,n]),pt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(O0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(O0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},o_e=dt(zn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:D0(t)}}),mI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),a_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(o_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=mI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=mI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(bu,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},s_e=dt([zn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),l_e=e=>{const t=qe(),{isMoveStageKeyHeld:n,stageScale:r}=Le(s_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Ze.clamp(r*bbe**s,Sbe,xbe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Xbe(l)),t(LH(u))},[e,n,r,t])},yS=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},vV=()=>{const e=qe(),t=Wv(),n=mV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(Ebe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(kbe())}}},u_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),c_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(u_e),{commitColorUnderCursor:i}=vV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(g4(!0));return}if(n==="colorPicker"){i();return}const a=yS(e.current);!a||(o.evt.preventDefault(),t(iS(!0)),t(xH([a.x,a.y])))},[e,n,r,t,i])},d_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),f_e=(e,t)=>{const n=qe(),{tool:r,isDrawing:i,isStaging:o}=Le(d_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(g4(!1));return}if(!t.current&&i&&e.current){const a=yS(e.current);if(!a)return;n(wH([a.x,a.y]))}else t.current=!1;n(iS(!1))},[t,n,i,o,e,r])},h_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),p_e=(e,t,n)=>{const r=qe(),{isDrawing:i,tool:o,isStaging:a}=Le(h_e),{updateColorUnderCursor:s}=vV();return C.exports.useCallback(()=>{if(!e.current)return;const l=yS(e.current);if(!!l){if(r(EH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(wH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},g_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),m_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(g_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=yS(e.current);!o||n==="move"||r||(t(iS(!0)),t(xH([o.x,o.y])))},[e,n,r,t])},v_e=()=>{const e=qe();return C.exports.useCallback(()=>{e(EH(null)),e(iS(!1))},[e])},y_e=dt([zn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),b_e=()=>{const e=qe(),{tool:t,isStaging:n}=Le(y_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(g4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(LH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(g4(!1))},[e,n,t])}};var Cf=C.exports,S_e=function(t,n,r){const i=Cf.useRef("loading"),o=Cf.useRef(),[a,s]=Cf.useState(0),l=Cf.useRef(),u=Cf.useRef(),h=Cf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),Cf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const yV=e=>{const{url:t,x:n,y:r}=e,[i]=S_e(t);return x(hV,{x:n,y:r,image:i,listening:!1})},x_e=dt([zn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),w_e=()=>{const{objects:e}=Le(x_e);return e?x(fh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(p4(t))return x(yV,{x:t.x,y:t.y,url:t.image.url},n);if(ebe(t))return x(_4,{points:t.points,stroke:t.color?D0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},C_e=dt([zn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),__e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},k_e=()=>{const{colorMode:e}=Kv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Le(C_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=__e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,O=Ze.range(0,T).map(N=>x(_4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=Ze.range(0,M).map(N=>x(_4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(O.concat(R))},[t,n,r,e,a]),x(fh,{children:i})},E_e=dt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),P_e=e=>{const{...t}=e,n=Le(E_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(hV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},T_e=dt([zn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function L_e(){const{cursorCoordinatesString:e}=Le(T_e);return x("div",{children:`Cursor Position: ${e}`})}const m3=e=>Math.round(e*100)/100,A_e=dt([zn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:g}=e;return{activeLayerColor:g==="mask"?"var(--status-working-color)":"inherit",activeLayerString:g.charAt(0).toUpperCase()+g.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${m3(s)}, ${m3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${m3(r)}\xD7${m3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),M_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Le(A_e);return J("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&J(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(L_e,{})]})]})},I_e=dt([zn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),O_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Le(I_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return J(fh,{...t,children:[r&&x(yV,{url:u,x:o,y:a}),i&&J(fh,{children:[x(bu,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(bu,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},R_e=dt([zn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),N_e=()=>{const e=qe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Le(R_e),o=C.exports.useCallback(()=>{e(sM(!1))},[e]),a=C.exports.useCallback(()=>{e(sM(!0))},[e]);pt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),pt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),pt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(Abe()),l=()=>e(Lbe()),u=()=>e(Pbe());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:J(ia,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(ek,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(R4e,{}),onClick:()=>e(Ybe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(lH,{}),onClick:()=>e(sbe(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(b1,{}),onClick:()=>e(Tbe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},D_e=dt([zn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let b="";return h==="move"||t?g?b="grabbing":b="grab":o?b=void 0:a?b="move":b="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:b,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),z_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Le(D_e);i_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{n_e($),g.current=$},[]),b=C.exports.useCallback($=>{t_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=l_e(g),k=c_e(g),T=f_e(g,E),M=p_e(g,E,w),O=m_e(g),R=v_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=b_e();return x("div",{className:"inpainting-canvas-container",children:J("div",{className:"inpainting-canvas-wrapper",children:[J(q8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:O,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(g3,{id:"grid",visible:r,children:x(k_e,{})}),x(g3,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:x(w_e,{})}),J(g3,{id:"mask",visible:e,listening:!1,children:[x(X8e,{visible:!0,listening:!1}),x(a_e,{listening:!1})]}),J(g3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(Q8e,{visible:l!=="move",listening:!1}),x(O_e,{visible:u}),h&&x(P_e,{}),x(e_e,{visible:n&&!u})]})]}),x(M_e,{}),x(N_e,{})]})})},B_e=dt([zn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function F_e(){const e=qe(),{canUndo:t,activeTabName:n}=Le(B_e),r=()=>{e(Zbe())};return pt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const $_e=dt([zn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function H_e(){const e=qe(),{canRedo:t,activeTabName:n}=Le($_e),r=()=>{e(Mbe())};return pt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const bV=ke((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Mv(),m=C.exports.useRef(null),v=()=>{r(),g()},b=()=>{o&&o(),g()};return J(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(_F,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(J0,{children:J(kF,{className:"modal",children:[x(Rb,{fontSize:"lg",fontWeight:"bold",children:s}),x(Dv,{children:a}),J(Ob,{children:[x(Wa,{ref:m,onClick:b,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),W_e=()=>{const e=qe();return J(bV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(lbe()),e(CH()),e(kH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(b1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},V_e=()=>{const e=qe();return J(bV,{title:"Clear Canvas History",acceptCallback:()=>e(kH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(b1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},U_e=dt([zn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),G_e=()=>{const e=qe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Le(U_e);return x(id,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(nk,{})}),children:J(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e(jbe(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(Gbe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(qbe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(Hbe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(Fbe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e($be(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(Ube(l.target.checked))}),x(V_e,{}),x(W_e,{})]})})};function bS(){return(bS=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function M7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var i1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(vI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=I7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(yI(P),!function(M,O){return O&&!Qm(M)}(P,l.current)&&k)){if(Qm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(vI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bS({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),SS=function(e){return e.filter(Boolean).join(" ")},Mk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=SS(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},xV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},O7=function(e){var t=xV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Xw=function(e){var t=xV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},j_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},Y_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},q_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=SS(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Ak,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:i1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Mk,{className:"react-colorful__hue-pointer",left:t/360,color:O7({h:t,s:100,v:100,a:1})})))}),K_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:O7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Ak,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:i1(t.s+100*i.left,0,100),v:i1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Mk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:O7(t)})))}),wV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function X_e(e,t,n){var r=M7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;wV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Z_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Q_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},bI=new Map,J_e=function(e){Z_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!bI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,bI.set(t,n);var r=Q_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},eke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Xw(Object.assign({},n,{a:0}))+", "+Xw(Object.assign({},n,{a:1}))+")"},o=SS(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Ak,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:i1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Mk,{className:"react-colorful__alpha-pointer",left:n.a,color:Xw(n)})))},tke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=SV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);J_e(s);var l=X_e(n,i,o),u=l[0],h=l[1],g=SS(["react-colorful",t]);return ae.createElement("div",bS({},a,{ref:s,className:g}),x(K_e,{hsva:u,onChange:h}),x(q_e,{hue:u.h,onChange:h}),ae.createElement(eke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},nke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Y_e,fromHsva:j_e,equal:wV},rke=function(e){return ae.createElement(tke,bS({},e,{colorModel:nke}))};const CV=e=>{const{styleClass:t,...n}=e;return x(rke,{className:`invokeai__color-picker ${t}`,...n})},ike=dt([zn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:D0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),oke=()=>{const e=qe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Le(ike);pt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),pt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),pt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(TH(t==="mask"?"base":"mask"))},a=()=>e(_be()),s=()=>e(PH(!r));return x(id,{trigger:"hover",triggerComponent:x(ia,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:J(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(Wbe(l.target.checked))}),x(CV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(zbe(l))}),x(ra,{size:"sm",leftIcon:x(b1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let v3;const ake=new Uint8Array(16);function ske(){if(!v3&&(v3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!v3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return v3(ake)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function lke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const uke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),SI={randomUUID:uke};function l0(e,t,n){if(SI.randomUUID&&!t&&!e)return SI.randomUUID();e=e||{};const r=e.random||(e.rng||ske)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return lke(r)}const cke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},dke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},fke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},hke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},y3=(e=hke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,b=Wv();if(!b){t(yu(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=cke(b,h,v,i?{...g,...m}:void 0);if(!w){t(yu(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:O,height:R}=T,N={uuid:l0(),category:o?"result":"user",...T};a&&(dke(M),t(hm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(fke(M,O,R),t(hm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(o0({image:N,category:"result"})),t(hm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(Bbe({kind:"image",layer:"base",...E,image:N})),t(hm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(yu(!1)),t(J3("Connected")),t(i0(!0))},pke=dt([zn,Ru,m2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),gke=()=>{const e=qe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Le(pke);pt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),pt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),pt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),pt(["["],()=>{e(Mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),pt(["]"],()=>{e(Mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(O0("brush")),a=()=>e(O0("eraser")),s=()=>e(O0("colorPicker"));return J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(mt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(O4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(id,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(uH,{})}),children:J(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(ws,{label:"Size",value:r,withInput:!0,onChange:l=>e(Mw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(CV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Nbe(l))})]})})]})};let xI;const _V=()=>({setOpenUploader:e=>{e&&(xI=e)},openUploader:xI}),mke=dt([m2,zn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),vke=()=>{const e=qe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Le(mke),s=Wv(),{openUploader:l}=_V();pt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),pt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),pt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),pt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),pt(["meta+c","ctrl+c"],()=>{b()},{enabled:()=>!t,preventDefault:!0},[s,t]),pt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(O0("move")),h=()=>{const P=Wv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(Obe({contentRect:k}))},g=()=>{e(CH()),e(_H())},m=()=>{e(y3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(y3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},b=()=>{e(y3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(y3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return J("div",{className:"inpainting-settings",children:[x(Ou,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(TH(k)),k==="mask"&&!r&&e(PH(!0))}}),x(oke,{}),x(gke,{}),J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(lH,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(rS,{}),onClick:b,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(sH,{}),onClick:w,isDisabled:t})]}),J(ia,{isAttached:!0,children:[x(F_e,{}),x(H_e,{})]}),J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x(tk,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(b1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(G_e,{})})]})},yke=dt([zn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),bke=()=>{const e=qe(),{doesCanvasNeedScaling:t}=Le(yke);return C.exports.useLayoutEffect(()=>{const n=Ze.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:J("div",{className:"inpainting-main-area",children:[x(vke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(DCe,{}):x(z_e,{})})]})})})};function Ske(){const e=qe();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(yk,{optionsPanel:x(RCe,{}),styleClass:"inpainting-workarea-overrides",children:x(bke,{})})}const xke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function wke(){return J("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),J("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Cke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),Of={txt2img:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Text To Image"},img2img:{title:x(f5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(xke,{fill:"black",boxSize:"2.5rem"}),workarea:x(Ske,{}),tooltip:"Unified Canvas"},nodes:{title:x(h5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c5e,{}),tooltip:"Nodes"},postprocess:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d5e,{}),tooltip:"Post Processing"},training:{title:x(Cke,{fill:"black",boxSize:"2.5rem"}),workarea:x(wke,{}),tooltip:"Training"}},xS=Ze.map(Of,(e,t)=>t);[...xS];function _ke(){const e=Le(o=>o.options.activeTab),t=Le(o=>o.options.isLightBoxOpen),n=qe();pt("1",()=>{n(ko(0))}),pt("2",()=>{n(ko(1))}),pt("3",()=>{n(ko(2))}),pt("4",()=>{n(ko(3))}),pt("5",()=>{n(ko(4))}),pt("6",()=>{n(ko(5))}),pt("z",()=>{n(md(!t))},[t]);const r=()=>{const o=[];return Object.keys(Of).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:Of[a].tooltip,placement:"right",children:x(JF,{children:Of[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(Of).forEach(a=>{o.push(x(ZF,{className:"app-tabs-panel",children:Of[a].workarea},a))}),o};return J(XF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(QF,{className:"app-tabs-panels",children:t?x(_Ce,{}):i()})]})}const kV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},kke=kV,EV=Fb({name:"options",initialState:kke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=Q3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=h4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=Q3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=h4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=Q3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...kV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=xS.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:PV,resetOptionsState:zTe,resetSeed:BTe,setActiveTab:ko,setAllImageToImageParameters:Eke,setAllParameters:Pke,setAllTextToImageParameters:Tke,setCfgScale:TV,setCodeformerFidelity:LV,setCurrentTheme:Lke,setFacetoolStrength:r5,setFacetoolType:i5,setHeight:AV,setHiresFix:MV,setImg2imgStrength:R7,setInfillMethod:IV,setInitialImage:y2,setIsLightBoxOpen:md,setIterations:Ake,setMaskPath:OV,setOptionsPanelScrollPosition:Mke,setParameter:FTe,setPerlin:RV,setPrompt:wS,setSampler:NV,setSeamBlur:wI,setSeamless:DV,setSeamSize:CI,setSeamSteps:_I,setSeamStrength:kI,setSeed:b2,setSeedWeights:zV,setShouldFitToWidthHeight:BV,setShouldForceOutpaint:Ike,setShouldGenerateVariations:Oke,setShouldHoldOptionsPanelOpen:Rke,setShouldLoopback:Nke,setShouldPinOptionsPanel:Dke,setShouldRandomizeSeed:zke,setShouldRunESRGAN:Bke,setShouldRunFacetool:Fke,setShouldShowImageDetails:FV,setShouldShowOptionsPanel:sd,setShowAdvancedOptions:$Te,setShowDualDisplay:$ke,setSteps:$V,setThreshold:HV,setTileSize:EI,setUpscalingLevel:N7,setUpscalingStrength:D7,setVariationAmount:Hke,setWidth:WV}=EV.actions,Wke=EV.reducer,Nl=Object.create(null);Nl.open="0";Nl.close="1";Nl.ping="2";Nl.pong="3";Nl.message="4";Nl.upgrade="5";Nl.noop="6";const o5=Object.create(null);Object.keys(Nl).forEach(e=>{o5[Nl[e]]=e});const Vke={type:"error",data:"parser error"},Uke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gke=typeof ArrayBuffer=="function",jke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,VV=({type:e,data:t},n,r)=>Uke&&t instanceof Blob?n?r(t):PI(t,r):Gke&&(t instanceof ArrayBuffer||jke(t))?n?r(t):PI(new Blob([t]),r):r(Nl[e]+(t||"")),PI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},TI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},qke=typeof ArrayBuffer=="function",UV=(e,t)=>{if(typeof e!="string")return{type:"message",data:GV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Kke(e.substring(1),t)}:o5[n]?e.length>1?{type:o5[n],data:e.substring(1)}:{type:o5[n]}:Vke},Kke=(e,t)=>{if(qke){const n=Yke(e);return GV(n,t)}else return{base64:!0,data:e}},GV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},jV=String.fromCharCode(30),Xke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{VV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(jV))})})},Zke=(e,t)=>{const n=e.split(jV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function qV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Jke=setTimeout,eEe=clearTimeout;function CS(e,t){t.useNativeTimers?(e.setTimeoutFn=Jke.bind(Yc),e.clearTimeoutFn=eEe.bind(Yc)):(e.setTimeoutFn=setTimeout.bind(Yc),e.clearTimeoutFn=clearTimeout.bind(Yc))}const tEe=1.33;function nEe(e){return typeof e=="string"?rEe(e):Math.ceil((e.byteLength||e.size)*tEe)}function rEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class iEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class KV extends Ur{constructor(t){super(),this.writable=!1,CS(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new iEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=UV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const XV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),z7=64,oEe={};let LI=0,b3=0,AI;function MI(e){let t="";do t=XV[e%z7]+t,e=Math.floor(e/z7);while(e>0);return t}function ZV(){const e=MI(+new Date);return e!==AI?(LI=0,AI=e):e+"."+MI(LI++)}for(;b3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Zke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Xke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ZV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=QV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Al(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Al extends Ur{constructor(t,n){super(),CS(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=qV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new eU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Al.requestsCount++,Al.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=lEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Al.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Al.requestsCount=0;Al.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",II);else if(typeof addEventListener=="function"){const e="onpagehide"in Yc?"pagehide":"unload";addEventListener(e,II,!1)}}function II(){for(let e in Al.requests)Al.requests.hasOwnProperty(e)&&Al.requests[e].abort()}const tU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),S3=Yc.WebSocket||Yc.MozWebSocket,OI=!0,dEe="arraybuffer",RI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class fEe extends KV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=RI?{}:qV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=OI&&!RI?n?new S3(t,n):new S3(t):new S3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||dEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{OI&&this.ws.send(o)}catch{}i&&tU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=ZV()),this.supportsBinary||(t.b64=1);const i=QV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!S3}}const hEe={websocket:fEe,polling:cEe},pEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function B7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=pEe.exec(e||""),o={},a=14;for(;a--;)o[gEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=mEe(o,o.path),o.queryKey=vEe(o,o.query),o}function mEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function vEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class $c extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=B7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=B7(n.host).host),CS(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=aEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new hEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&$c.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;$c.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$c.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",$c.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){$c.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,nU=Object.prototype.toString,xEe=typeof Blob=="function"||typeof Blob<"u"&&nU.call(Blob)==="[object BlobConstructor]",wEe=typeof File=="function"||typeof File<"u"&&nU.call(File)==="[object FileConstructor]";function Ik(e){return bEe&&(e instanceof ArrayBuffer||SEe(e))||xEe&&e instanceof Blob||wEe&&e instanceof File}function a5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class PEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=_Ee(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const TEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:kEe,get PacketType(){return nn},Encoder:EEe,Decoder:Ok},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const LEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class rU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(LEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}_1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};_1.prototype.reset=function(){this.attempts=0};_1.prototype.setMin=function(e){this.ms=e};_1.prototype.setMax=function(e){this.max=e};_1.prototype.setJitter=function(e){this.jitter=e};class H7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,CS(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||TEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new $c(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){tU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new rU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const rm={};function s5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=yEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=rm[i]&&o in rm[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new H7(r,t):(rm[i]||(rm[i]=new H7(r,t)),l=rm[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(s5,{Manager:H7,Socket:rU,io:s5,connect:s5});var AEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,MEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,IEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(NI[t]||t||NI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return OEe(e)},E=function(){return REe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return DI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return DI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":NEe(e)},o:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60),2)+":"+ea(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(AEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var NI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},DI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},OEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},REe=function(t){var n=t.getDay();return n===0&&(n=7),n},NEe=function(t){return(String(t).match(MEe)||[""]).pop().replace(IEe,"").replace(/GMT\+0000/g,"UTC")};const DEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(ZA(!0)),t(J3("Connected")),t(abe());const r=n().gallery;r.categories.user.latest_mtime?t(tM("user")):t(s7("user")),r.categories.result.latest_mtime?t(tM("result")):t(s7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(ZA(!1)),t(J3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:l0(),...u};if(["txt2img","img2img"].includes(l)&&t(o0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(Cbe({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(o0({image:{...h,category:"result"},category:"result"}))}if(o)switch(xS[a]){case"img2img":{t(y2(h));break}}t(Ow()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sSe({uuid:l0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(o0({category:"result",image:{uuid:l0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(yu(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(QA()),t(Ow())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:l0(),...l}));t(aSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(o0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Ow())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(OH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(PV()),a===i&&t(OV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(IV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(JA(o)),t(J3("Model Changed")),t(yu(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(JA(o)),t(yu(!1)),t(i0(!0)),t(QA()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(hm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},zEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},BEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},FEe=e=>{const t=Wv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:b,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:O,seamSize:R,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:ue,shouldGenerateVariations:W,shouldRandomizeSeed:Q,shouldRunESRGAN:ne,shouldRunFacetool:ee,steps:K,threshold:G,tileSize:X,upscalingLevel:ce,upscalingStrength:me,variationAmount:Me,width:xe}=r,{shouldDisplayInProgressType:be,saveIntermediatesInterval:Ie,enableImageDebugging:We}=o,De={prompt:k,iterations:Q||W?E:1,steps:K,cfg_scale:s,threshold:G,perlin:P,height:g,width:xe,sampler_name:T,seed:V,progress_images:be==="full-res",progress_latents:be==="latents",save_intermediates:Ie,generation_mode:n,init_mask:""};if(De.seed=Q?Z$(W_,V_):V,["txt2img","img2img"].includes(n)&&(De.seamless=O,De.hires_fix=m),n==="img2img"&&w&&(De.init_img=typeof w=="string"?w:w.url,De.strength=v,De.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ct},boundingBoxCoordinates:ht,boundingBoxDimensions:ut,inpaintReplace:vt,shouldUseInpaintReplace:Ee,stageScale:Je,isMaskEnabled:Lt,shouldPreserveMaskedArea:it}=i,gt={...ht,...ut},an=zEe(Lt?Ct.filter(rk):[],gt);De.init_mask=an,De.fit=!1,De.init_img=a,De.strength=v,De.invert_mask=it,Ee&&(De.inpaint_replace=vt),De.bounding_box=gt;const _t=t.scale();t.scale({x:1/Je,y:1/Je});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:gt.x+Ut.x,y:gt.y+Ut.y,width:gt.width,height:gt.height});We&&BEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(_t),De.init_img=sn,De.progress_images=!1,De.seam_size=R,De.seam_blur=M,De.seam_strength=z,De.seam_steps=N,De.tile_size=X,De.force_outpaint=ue,De.infill_method=b}W?(De.variation_amount=Me,$&&(De.with_variations=Lye($))):De.variation_amount=0;let Qe=!1,st=!1;return ne&&(Qe={level:ce,strength:me}),ee&&(st={type:h,strength:u},h==="codeformer"&&(st.codeformer_fidelity=l)),We&&(De.enable_image_debugging=We),{generationParameters:De,esrganParameters:Qe,facetoolParameters:st}},$Ee=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(yu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=FEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(yu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(yu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(OH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},HEe=()=>{const{origin:e}=new URL(window.location.href),t=s5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=DEe(i),{emitGenerateImage:O,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:ue,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=$Ee(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",ee=>u(ee)),t.on("generationResult",ee=>g(ee)),t.on("postprocessingResult",ee=>h(ee)),t.on("intermediateResult",ee=>m(ee)),t.on("progressUpdate",ee=>v(ee)),t.on("galleryImages",ee=>b(ee)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",ee=>{E(ee)}),t.on("systemConfig",ee=>{P(ee)}),t.on("modelChanged",ee=>{k(ee)}),t.on("modelChangeFailed",ee=>{T(ee)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{O(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{ue();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},WEe=["cursorPosition"].map(e=>`canvas.${e}`),VEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),UEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),iU=u$({options:Wke,gallery:pSe,system:h4e,canvas:Qbe}),GEe=L$.getPersistConfig({key:"root",storage:T$,rootReducer:iU,blacklist:[...WEe,...VEe,...UEe],debounce:300}),jEe=fye(GEe,iU),oU=a2e({reducer:jEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(HEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qe=Z2e,Le=$2e;function l5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l5=function(n){return typeof n}:l5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l5(e)}function YEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zI(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(o2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),QEe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),JEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Le(QEe),i=t?Math.round(t*100/n):0;return x(IF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function ePe(e){const{title:t,hotkey:n,description:r}=e;return J("div",{className:"hotkey-modal-item",children:[J("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function tPe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Mv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(ePe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return J(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),J(Q0,{isOpen:t,onClose:r,children:[x(J0,{}),J(zv,{className:" modal hotkeys-modal",children:[x(c_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:J(Cb,{allowMultiple:!0,children:[J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(i)})]}),J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(o)})]}),J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(a)})]}),J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(s)})]})]})})]})]})]})}const nPe=e=>{const{isProcessing:t,isConnected:n}=Le(l=>l.system),r=qe(),{name:i,status:o,description:a}=e,s=()=>{r(fH(i))};return J("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(iB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},rPe=dt(e=>e.system,e=>{const t=Ze.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),iPe=()=>{const{models:e}=Le(rPe);return x(Cb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:J(Uf,{children:[x(Wf,{children:J("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Vf,{})]})}),x(Gf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(nPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},oPe=dt([m2,J$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ze.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),aPe=({children:e})=>{const t=qe(),n=Le(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Mv(),{isOpen:a,onOpen:s,onClose:l}=Mv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Le(oPe),b=()=>{bU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return J(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),J(Q0,{isOpen:r,onClose:o,children:[x(J0,{}),J(zv,{className:"modal settings-modal",children:[x(Rb,{className:"settings-modal-header",children:"Settings"}),x(c_,{className:"modal-close-btn"}),J(Dv,{className:"settings-modal-content",children:[J("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(iPe,{})}),J("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ou,{label:"Display In-Progress Images",validValues:w5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Fa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(tH(E.target.checked))}),x(Fa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),J("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Fa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),J("div",{className:"settings-modal-reset",children:[x(Jf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Ob,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),J(Q0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(J0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(zv,{children:x(Dv,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},sPe=dt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),lPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Le(sPe),s=qe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(nH())},className:`status ${l}`,children:u})})},uPe=["dark","light","green"];function cPe(){const{setColorMode:e}=Kv(),t=qe(),n=Le(i=>i.options.currentTheme),r=i=>{e(i),t(Lke(i))};return x(id,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(sB,{align:"stretch",children:uPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(ek,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const dPe=dt([m2],e=>{const{isProcessing:t,model_list:n}=e,r=Ze.map(n,(o,a)=>a),i=Ze.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),fPe=()=>{const e=qe(),{models:t,activeModel:n,isProcessing:r}=Le(dPe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Ou,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(fH(o.target.value))}})})},hPe=()=>J("div",{className:"site-header",children:[J("div",{className:"site-header-left-side",children:[x("img",{src:AH,alt:"invoke-ai-logo"}),J("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),J("div",{className:"site-header-right-side",children:[x(lPe,{}),x(fPe,{}),x(tPe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(cPe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(eh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(eh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(eh,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(aPe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(nk,{})})})]})]}),pPe=dt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),gPe=dt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),mPe=()=>{const e=qe(),t=Le(pPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Le(gPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(nH()),e(Pw(!n))};return pt("`",()=>{e(Pw(!n))},[n]),pt("esc",()=>{e(Pw(!1))}),J(Ln,{children:[n&&x(FH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return J("div",{className:`console-entry console-${b}-color`,children:[J("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(aH,{}),onClick:l})})]})};function vPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var yPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function S2(e,t){var n=bPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function bPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=yPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var SPe=[".DS_Store","Thumbs.db"];function xPe(e){return f1(this,void 0,void 0,function(){return h1(this,function(t){return k4(e)&&wPe(e.dataTransfer)?[2,EPe(e.dataTransfer,e.type)]:CPe(e)?[2,_Pe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,kPe(e)]:[2,[]]})})}function wPe(e){return k4(e)}function CPe(e){return k4(e)&&k4(e.target)}function k4(e){return typeof e=="object"&&e!==null}function _Pe(e){return U7(e.target.files).map(function(t){return S2(t)})}function kPe(e){return f1(this,void 0,void 0,function(){var t;return h1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return S2(r)})]}})})}function EPe(e,t){return f1(this,void 0,void 0,function(){var n,r;return h1(this,function(i){switch(i.label){case 0:return e.items?(n=U7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(PPe))]):[3,2];case 1:return r=i.sent(),[2,BI(sU(r))];case 2:return[2,BI(U7(e.files).map(function(o){return S2(o)}))]}})})}function BI(e){return e.filter(function(t){return SPe.indexOf(t.name)===-1})}function U7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,VI(n)];if(e.sizen)return[!1,VI(n)]}return[!0,null]}function Rf(e){return e!=null}function VPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=dU(l,n),h=Vv(u,1),g=h[0],m=fU(l,r,i),v=Vv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function E4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function x3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function GI(e){e.preventDefault()}function UPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function GPe(e){return e.indexOf("Edge/")!==-1}function jPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return UPe(e)||GPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function uTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rk=C.exports.forwardRef(function(e,t){var n=e.children,r=P4(e,QPe),i=vU(r),o=i.open,a=P4(i,JPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Rk.displayName="Dropzone";var mU={disabled:!1,getFilesFromEvent:xPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Rk.defaultProps=mU;Rk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var q7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},mU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,O=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return KPe(n)},[n]),j=C.exports.useMemo(function(){return qPe(n)},[n]),ue=C.exports.useMemo(function(){return typeof E=="function"?E:YI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:YI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),ee=C.exports.useReducer(cTe,q7),K=Zw(ee,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&YPe()),xe=function(){!Me.current&&me&&setTimeout(function(){if(ne.current){var Xe=ne.current.files;Xe.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Me]);var be=C.exports.useRef([]),Ie=function(Xe){Q.current&&Q.current.contains(Xe.target)||(Xe.preventDefault(),be.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",GI,!1),document.addEventListener("drop",Ie,!1)),function(){T&&(document.removeEventListener("dragover",GI),document.removeEventListener("drop",Ie))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),De=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[].concat(nTe(be.current),[Oe.target]),x3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){if(!(E4(Oe)&&!N)){var Xt=Xe.length,Yt=Xt>0&&VPe({files:Xe,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),_e=Xt>0&&!Yt;X({isDragAccept:Yt,isDragReject:_e,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Xe){return We(Xe)})},[i,u,We,N,$,a,o,s,l,V]),Qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=x3(Oe);if(Xe&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Xe&&g&&g(Oe),!1},[g,N]),st=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=be.current.filter(function(Yt){return Q.current&&Q.current.contains(Yt)}),Xt=Xe.indexOf(Oe.target);Xt!==-1&&Xe.splice(Xt,1),be.current=Xe,!(Xe.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),x3(Oe)&&h&&h(Oe))},[Q,h,N]),Ct=C.exports.useCallback(function(Oe,Xe){var Xt=[],Yt=[];Oe.forEach(function(_e){var It=dU(_e,$),ze=Zw(It,2),ot=ze[0],ln=ze[1],Bn=fU(_e,a,o),He=Zw(Bn,2),ct=He[0],tt=He[1],Nt=V?V(_e):null;if(ot&&ct&&!Nt)Xt.push(_e);else{var Zt=[ln,tt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:_e,errors:Zt.filter(function(er){return er})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(_e){Yt.push({file:_e,errors:[WPe]})}),Xt.splice(0)),X({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Xe),Yt.length>0&&b&&b(Yt,Xe),Xt.length>0&&v&&v(Xt,Xe)},[X,s,$,a,o,l,m,v,b,V]),ht=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[],x3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){E4(Oe)&&!N||Ct(Xe,Oe)}).catch(function(Xe){return We(Xe)}),X({type:"reset"})},[i,Ct,We,N]),ut=C.exports.useCallback(function(){if(Me.current){X({type:"openDialog"}),ue();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Xe){return i(Xe)}).then(function(Xe){Ct(Xe,null),X({type:"closeDialog"})}).catch(function(Xe){XPe(Xe)?(W(Xe),X({type:"closeDialog"})):ZPe(Xe)?(Me.current=!1,ne.current?(ne.current.value=null,ne.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Xe)});return}ne.current&&(X({type:"openDialog"}),ue(),ne.current.value=null,ne.current.click())},[X,ue,W,P,Ct,We,j,s]),vt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Ee=C.exports.useCallback(function(){X({type:"focus"})},[]),Je=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(jPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Xe){return r?null:Xe},gt=function(Xe){return O?null:it(Xe)},an=function(Xe){return R?null:it(Xe)},_t=function(Xe){N&&Xe.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.role,_e=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,ln=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ct=Oe.onDrop,tt=P4(Oe,eTe);return ur(ur(Y7({onKeyDown:gt(ll(_e,vt)),onFocus:gt(ll(It,Ee)),onBlur:gt(ll(ze,Je)),onClick:it(ll(ot,Lt)),onDragEnter:an(ll(ln,De)),onDragOver:an(ll(Bn,Qe)),onDragLeave:an(ll(He,st)),onDrop:an(ll(ct,ht)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,Q),!r&&!O?{tabIndex:0}:{}),tt)}},[Q,vt,Ee,Je,Lt,De,Qe,st,ht,O,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.onChange,_e=Oe.onClick,It=P4(Oe,tTe),ze=Y7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(Yt,ht)),onClick:it(ll(_e,sn)),tabIndex:-1},Xt,ne);return ur(ur({},ze),It)}},[ne,n,s,ht,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Ut,getInputProps:yn,rootRef:Q,inputRef:ne,open:it(ut)})}function cTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},q7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},q7);default:return e}}function YI(){}const dTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return pt("esc",()=>{i(!1)}),J("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:J(Jf,{size:"lg",children:["Upload Image",r]})}),n&&J("div",{className:"dropzone-overlay is-drag-reject",children:[x(Jf,{size:"lg",children:"Invalid Upload"}),x(Jf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:l0(),category:"user",...l};t(o0({image:u,category:"user"})),o==="unifiedCanvas"?t(sk(u)):o==="img2img"&&t(y2(u))},fTe=e=>{const{children:t}=e,n=qe(),r=Le(_r),i=f2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=_V(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,O)=>M+` +`+O.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(qI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:b,isDragActive:w,open:E}=vU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const O=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&O.push(N);if(!O.length)return;if(T.stopImmediatePropagation(),O.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=O[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(qI({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${Of[r].tooltip}`:"";return x(uk.Provider,{value:E,children:J("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(dTe,{isDragAccept:v,isDragReject:b,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},hTe=()=>{const e=qe(),t=Le(TCe),n=f2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},yU=dt([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),pTe=()=>{const e=qe(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Le(yU),s=()=>{e(sd(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return pt("f",()=>{o||t?(e(sd(!1)),e(od(!1))):(e(sd(!0)),e(od(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?J("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(uH,{})}),r&&J(Ln,{children:[x(hH,{iconButton:!0}),x(pH,{})]})]}):null},gTe=()=>{const e=qe(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Le(yU),a=()=>{e(od(!0)),r&&e(Li(!0))};return pt("f",()=>{t||i?(e(sd(!1)),e(od(!1))):(e(sd(!0)),e(od(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(rH,{})}):null};vPe();const mTe=()=>(hTe(),J("div",{className:"App",children:[J(fTe,{children:[x(JEe,{}),J("div",{className:"app-content",children:[x(hPe,{}),x(_ke,{})]}),x("div",{className:"app-console",children:x(mPe,{})})]}),x(pTe,{}),x(gTe,{})]}));const bU=yye(oU),vTe=xN({key:"invokeai-style-cache",prepend:!0});Jw.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(q2e,{store:oU,children:x(aU,{loading:x(ZEe,{}),persistor:bU,children:x(PJ,{value:vTe,children:x(_ve,{children:x(mTe,{})})})})})})); diff --git a/frontend/dist/assets/index.8659b949.js b/frontend/dist/assets/index.8659b949.js deleted file mode 100644 index 911f1fe87e..0000000000 --- a/frontend/dist/assets/index.8659b949.js +++ /dev/null @@ -1,623 +0,0 @@ -function Uq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Wv=Symbol.for("react.element"),Gq=Symbol.for("react.portal"),jq=Symbol.for("react.fragment"),Yq=Symbol.for("react.strict_mode"),qq=Symbol.for("react.profiler"),Kq=Symbol.for("react.provider"),Xq=Symbol.for("react.context"),Zq=Symbol.for("react.forward_ref"),Qq=Symbol.for("react.suspense"),Jq=Symbol.for("react.memo"),eK=Symbol.for("react.lazy"),kE=Symbol.iterator;function tK(e){return e===null||typeof e!="object"?null:(e=kE&&e[kE]||e["@@iterator"],typeof e=="function"?e:null)}var qI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KI=Object.assign,XI={};function r1(e,t,n){this.props=e,this.context=t,this.refs=XI,this.updater=n||qI}r1.prototype.isReactComponent={};r1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};r1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZI(){}ZI.prototype=r1.prototype;function K7(e,t,n){this.props=e,this.context=t,this.refs=XI,this.updater=n||qI}var X7=K7.prototype=new ZI;X7.constructor=K7;KI(X7,r1.prototype);X7.isPureReactComponent=!0;var EE=Array.isArray,QI=Object.prototype.hasOwnProperty,Z7={current:null},JI={key:!0,ref:!0,__self:!0,__source:!0};function eO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)QI.call(t,r)&&!JI.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Me=G[me];if(0>>1;mei(Ie,ce))Wei(De,Ie)?(G[me]=De,G[We]=ce,me=We):(G[me]=Ie,G[be]=ce,me=be);else if(Wei(De,ce))G[me]=De,G[We]=ce,me=We;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!b)if(n(l)!==null)b=!0,J(O);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function O(G,X){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Me=me(g.expirationTime<=X);X=e.unstable_now(),typeof Me=="function"?g.callback=Me:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var be=n(u);be!==null&&K(M,be.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var R=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Me,t(l,G),b||v||(b=!0,J(O))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(tO);(function(e){e.exports=tO})(s0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var nO=C.exports,da=s0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jw=Object.prototype.hasOwnProperty,aK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,TE={},LE={};function sK(e){return Jw.call(LE,e)?!0:Jw.call(TE,e)?!1:aK.test(e)?LE[e]=!0:(TE[e]=!0,!1)}function lK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function uK(e,t,n,r){if(t===null||typeof t>"u"||lK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var J7=/[\-:]([a-z])/g;function e9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(J7,e9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(J7,e9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(J7,e9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function t9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{tx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rm(e):""}function cK(e){switch(e.tag){case 5:return rm(e.type);case 16:return rm("Lazy");case 13:return rm("Suspense");case 19:return rm("SuspenseList");case 0:case 2:case 15:return e=nx(e.type,!1),e;case 11:return e=nx(e.type.render,!1),e;case 1:return e=nx(e.type,!0),e;default:return""}}function r6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wp:return"Fragment";case Hp:return"Portal";case e6:return"Profiler";case n9:return"StrictMode";case t6:return"Suspense";case n6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oO:return(e.displayName||"Context")+".Consumer";case iO:return(e._context.displayName||"Context")+".Provider";case r9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case i9:return t=e.displayName||null,t!==null?t:r6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return r6(e(t))}catch{}}return null}function dK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return r6(t);case 8:return t===n9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function sd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fK(e){var t=sO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ly(e){e._valueTracker||(e._valueTracker=fK(e))}function lO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function u5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function i6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ME(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=sd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function uO(e,t){t=t.checked,t!=null&&t9(e,"checked",t,!1)}function o6(e,t){uO(e,t);var n=sd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?a6(e,t.type,n):t.hasOwnProperty("defaultValue")&&a6(e,t.type,sd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function IE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function a6(e,t,n){(t!=="number"||u5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var im=Array.isArray;function l0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=uy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},hK=["Webkit","ms","Moz","O"];Object.keys(wm).forEach(function(e){hK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wm[t]=wm[e]})});function hO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wm.hasOwnProperty(e)&&wm[e]?(""+t).trim():t+"px"}function pO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var pK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function u6(e,t){if(t){if(pK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function c6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d6=null;function o9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var f6=null,u0=null,c0=null;function NE(e){if(e=Gv(e)){if(typeof f6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=M4(t),f6(e.stateNode,e.type,t))}}function gO(e){u0?c0?c0.push(e):c0=[e]:u0=e}function mO(){if(u0){var e=u0,t=c0;if(c0=u0=null,NE(e),t)for(e=0;e>>=0,e===0?32:31-(kK(e)/EK|0)|0}var cy=64,dy=4194304;function om(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function h5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=om(s):(o&=a,o!==0&&(r=om(o)))}else a=n&~i,a!==0?r=om(a):o!==0&&(r=om(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Vv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cs(t),e[t]=n}function AK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_m),UE=String.fromCharCode(32),GE=!1;function DO(e,t){switch(e){case"keyup":return iX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vp=!1;function aX(e,t){switch(e){case"compositionend":return zO(t);case"keypress":return t.which!==32?null:(GE=!0,UE);case"textInput":return e=t.data,e===UE&&GE?null:e;default:return null}}function sX(e,t){if(Vp)return e==="compositionend"||!h9&&DO(e,t)?(e=RO(),C3=c9=$c=null,Vp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=KE(n)}}function HO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WO(){for(var e=window,t=u5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=u5(e.document)}return t}function p9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function mX(e){var t=WO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&HO(n.ownerDocument.documentElement,n)){if(r!==null&&p9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=XE(n,o);var a=XE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Up=null,y6=null,Em=null,b6=!1;function ZE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;b6||Up==null||Up!==u5(r)||(r=Up,"selectionStart"in r&&p9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Em&&ov(Em,r)||(Em=r,r=m5(y6,"onSelect"),0Yp||(e.current=k6[Yp],k6[Yp]=null,Yp--)}function qn(e,t){Yp++,k6[Yp]=e.current,e.current=t}var ld={},Wi=vd(ld),Ao=vd(!1),th=ld;function D0(e,t){var n=e.type.contextTypes;if(!n)return ld;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function y5(){Qn(Ao),Qn(Wi)}function iP(e,t,n){if(Wi.current!==ld)throw Error(Re(168));qn(Wi,t),qn(Ao,n)}function ZO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,dK(e)||"Unknown",i));return hr({},n,r)}function b5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ld,th=Wi.current,qn(Wi,e),qn(Ao,Ao.current),!0}function oP(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=ZO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Wi),qn(Wi,e)):Qn(Ao),qn(Ao,n)}var fu=null,I4=!1,mx=!1;function QO(e){fu===null?fu=[e]:fu.push(e)}function TX(e){I4=!0,QO(e)}function yd(){if(!mx&&fu!==null){mx=!0;var e=0,t=Tn;try{var n=fu;for(Tn=1;e>=a,i-=a,pu=1<<32-Cs(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),R===null?O=$:R.sibling=$,R=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),O;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),R===null?O=j:R.sibling=j,R=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),O;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return ir&&Cf(P,z),O}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return e&&N.forEach(function(ue){return t(P,ue)}),ir&&Cf(P,z),O}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Wp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case sy:e:{for(var O=T.key,R=k;R!==null;){if(R.key===O){if(O=T.type,O===Wp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Ic&&fP(O)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Ng(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Wp?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=M3(T.type,T.key,T.props,null,P.mode,M),M.ref=Ng(P,k,T),M.return=P,P=M)}return a(P);case Hp:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=_x(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return R=T._init,E(P,k,R(T._payload),M)}if(im(T))return b(P,k,T,M);if(Ag(T))return w(P,k,T,M);yy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=Cx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var B0=aR(!0),sR=aR(!1),jv={},Cl=vd(jv),uv=vd(jv),cv=vd(jv);function Df(e){if(e===jv)throw Error(Re(174));return e}function C9(e,t){switch(qn(cv,t),qn(uv,e),qn(Cl,jv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:l6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=l6(t,e)}Qn(Cl),qn(Cl,t)}function F0(){Qn(Cl),Qn(uv),Qn(cv)}function lR(e){Df(cv.current);var t=Df(Cl.current),n=l6(t,e.type);t!==n&&(qn(uv,e),qn(Cl,n))}function _9(e){uv.current===e&&(Qn(Cl),Qn(uv))}var cr=vd(0);function k5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vx=[];function k9(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{Tn=n,yx.transition=r}}function _R(){return Ha().memoizedState}function IX(e,t,n){var r=Jc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kR(e))ER(t,n);else if(n=nR(e,t,n,r),n!==null){var i=ro();_s(n,e,r,i),PR(n,t,r)}}function OX(e,t,n){var r=Jc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kR(e))ER(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,x9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=nR(e,t,i,r),n!==null&&(i=ro(),_s(n,e,r,i),PR(n,t,r))}}function kR(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function ER(e,t){Pm=E5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s9(e,n)}}var P5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},RX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:pP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,P3(4194308,4,bR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return P3(4194308,4,e,t)},useInsertionEffect:function(e,t){return P3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=IX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:hP,useDebugValue:A9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=hP(!1),t=e[0];return e=MX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),hi===null)throw Error(Re(349));(rh&30)!==0||dR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,pP(hR.bind(null,r,o,e),[e]),r.flags|=2048,hv(9,fR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=gu,r=pu;n=(r&~(1<<32-Cs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=dv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ml]=t,e[lv]=r,DR(e,t,!1,!1),t.stateNode=e;e:{switch(a=c6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;iH0&&(t.flags|=128,r=!0,Dg(o,!1),t.lanes=4194304)}else{if(!r)if(e=k5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Rr()-o.renderingStartTime>H0&&n!==1073741824&&(t.flags|=128,r=!0,Dg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return D9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function WX(e,t){switch(m9(t),t.tag){case 1:return Mo(t.type)&&y5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return F0(),Qn(Ao),Qn(Wi),k9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return _9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));z0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return F0(),null;case 10:return S9(t.type._context),null;case 22:case 23:return D9(),null;case 24:return null;default:return null}}var Sy=!1,Hi=!1,VX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Zp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function z6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var CP=!1;function UX(e,t){if(S6=p5,e=WO(),p9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(x6={focusedElem:e,selectionRange:n},p5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return b=CP,CP=!1,b}function Tm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&z6(t,n,o)}i=i.next}while(i!==r)}}function N4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function B6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function FR(e){var t=e.alternate;t!==null&&(e.alternate=null,FR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ml],delete t[lv],delete t[_6],delete t[EX],delete t[PX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $R(e){return e.tag===5||e.tag===3||e.tag===4}function _P(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$R(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function F6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=v5));else if(r!==4&&(e=e.child,e!==null))for(F6(e,t,n),e=e.sibling;e!==null;)F6(e,t,n),e=e.sibling}function $6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($6(e,t,n),e=e.sibling;e!==null;)$6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)HR(e,t,n),n=n.sibling}function HR(e,t,n){if(wl&&typeof wl.onCommitFiberUnmount=="function")try{wl.onCommitFiberUnmount(P4,n)}catch{}switch(n.tag){case 5:Hi||Zp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?gx(e.parentNode,n):e.nodeType===1&&gx(e,n),rv(e)):gx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&z6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Zp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function kP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VX),t.forEach(function(r){var i=JX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,A5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-R9?Gf(e,0):O9|=n),Io(e,t)}function KR(e,t){t===0&&((e.mode&1)===0?t=1:(t=dy,dy<<=1,(dy&130023424)===0&&(dy=4194304)));var n=ro();e=xu(e,t),e!==null&&(Vv(e,t,n),Io(e,n))}function QX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KR(e,n)}function JX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),KR(e,n)}var XR;XR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,$X(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&JO(t,x5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;T3(e,t),e=t.pendingProps;var i=D0(t,Wi.current);f0(t,n),i=P9(null,t,r,e,i,n);var o=T9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,b5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,w9(t),i.updater=O4,t.stateNode=i,i._reactInternals=t,A6(t,r,e,n),t=O6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&g9(t),Ji(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(T3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=tZ(r),e=gs(r,e),i){case 0:t=I6(null,t,r,e,n);break e;case 1:t=SP(null,t,r,e,n);break e;case 11:t=yP(null,t,r,e,n);break e;case 14:t=bP(null,t,r,gs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),I6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),SP(e,t,r,i,n);case 3:e:{if(OR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,rR(e,t),_5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=$0(Error(Re(423)),t),t=xP(e,t,r,n,i);break e}else if(r!==i){i=$0(Error(Re(424)),t),t=xP(e,t,r,n,i);break e}else for(aa=Xc(t.stateNode.containerInfo.firstChild),sa=t,ir=!0,ys=null,n=sR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(z0(),r===i){t=wu(e,t,n);break e}Ji(e,t,r,n)}t=t.child}return t;case 5:return lR(t),e===null&&P6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,w6(r,i)?a=null:o!==null&&w6(r,o)&&(t.flags|=32),IR(e,t),Ji(e,t,a,n),t.child;case 6:return e===null&&P6(t),null;case 13:return RR(e,t,n);case 4:return C9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=B0(t,null,r,n):Ji(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),yP(e,t,r,i,n);case 7:return Ji(e,t,t.pendingProps,n),t.child;case 8:return Ji(e,t,t.pendingProps.children,n),t.child;case 12:return Ji(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(w5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=wu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=vu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),T6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),T6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ji(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,f0(t,n),i=$a(i),r=r(i),t.flags|=1,Ji(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),bP(e,t,r,i,n);case 15:return AR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),T3(e,t),t.tag=1,Mo(r)?(e=!0,b5(t)):e=!1,f0(t,n),oR(t,r,i),A6(t,r,i,n),O6(null,t,r,!0,e,n);case 19:return NR(e,t,n);case 22:return MR(e,t,n)}throw Error(Re(156,t.tag))};function ZR(e,t){return CO(e,t)}function eZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new eZ(e,t,n,r)}function B9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tZ(e){if(typeof e=="function")return B9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===r9)return 11;if(e===i9)return 14}return 2}function ed(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function M3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")B9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Wp:return jf(n.children,i,o,t);case n9:a=8,i|=8;break;case e6:return e=Na(12,n,t,i|2),e.elementType=e6,e.lanes=o,e;case t6:return e=Na(13,n,t,i),e.elementType=t6,e.lanes=o,e;case n6:return e=Na(19,n,t,i),e.elementType=n6,e.lanes=o,e;case aO:return z4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iO:a=10;break e;case oO:a=9;break e;case r9:a=11;break e;case i9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function z4(e,t,n,r){return e=Na(22,e,r,t),e.elementType=aO,e.lanes=n,e.stateNode={isHidden:!1},e}function Cx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function _x(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ix(0),this.expirationTimes=ix(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ix(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function F9(e,t,n,r,i,o,a,s,l){return e=new nZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},w9(o),e}function rZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Dl);const Cy=q7(Dl.exports);var OP=Dl.exports;Qw.createRoot=OP.createRoot,Qw.hydrateRoot=OP.hydrateRoot;var ks=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,W4={exports:{}},V4={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var lZ=C.exports,uZ=Symbol.for("react.element"),cZ=Symbol.for("react.fragment"),dZ=Object.prototype.hasOwnProperty,fZ=lZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hZ={key:!0,ref:!0,__self:!0,__source:!0};function tN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)dZ.call(t,r)&&!hZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:uZ,type:e,key:o,ref:a,props:i,_owner:fZ.current}}V4.Fragment=cZ;V4.jsx=tN;V4.jsxs=tN;(function(e){e.exports=V4})(W4);const Wn=W4.exports.Fragment,x=W4.exports.jsx,ee=W4.exports.jsxs;var V9=C.exports.createContext({});V9.displayName="ColorModeContext";function Yv(){const e=C.exports.useContext(V9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var _y={light:"chakra-ui-light",dark:"chakra-ui-dark"};function pZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?_y.dark:_y.light),document.body.classList.remove(r?_y.light:_y.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var gZ="chakra-ui-color-mode";function mZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var vZ=mZ(gZ),RP=()=>{};function NP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function nN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=vZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>NP(a,s)),[h,g]=C.exports.useState(()=>NP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>pZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const O=M==="system"?m():M;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);ks(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?RP:k,setColorMode:t?RP:P,forced:t!==void 0}),[E,k,P,t]);return x(V9.Provider,{value:T,children:n})}nN.displayName="ColorModeProvider";var G6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",O="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",ue="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Me=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[ue]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[O]=xe[R]=xe[z]=!1;var be=typeof bs=="object"&&bs&&bs.Object===Object&&bs,Ie=typeof self=="object"&&self&&self.Object===Object&&self,We=be||Ie||Function("return this")(),De=t&&!t.nodeType&&t,Qe=De&&!0&&e&&!e.nodeType&&e,st=Qe&&Qe.exports===De,Ct=st&&be.process,ft=function(){try{var U=Qe&&Qe.require&&Qe.require("util").types;return U||Ct&&Ct.binding&&Ct.binding("util")}catch{}}(),ut=ft&&ft.isTypedArray;function vt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Ee(U,te){for(var he=-1,Ye=Array(U);++he-1}function E1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Md,Do.prototype.delete=k1,Do.prototype.get=$u,Do.prototype.has=Id,Do.prototype.set=E1;function Rs(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,yt=zt>2?he[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Oh(he[0],he[1],yt)&&(fn=zt<3?void 0:fn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var zd=Vl(function(){return arguments}())?Vl:function(U){return Un(U)&&yn.call(U,"callee")&&!He.call(U,"callee")},jl=Array.isArray;function Ht(U){return U!=null&&Nh(U.length)&&!Yu(U)}function Rh(U){return Un(U)&&Ht(U)}var ju=Zt||F1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==b||te==u||te==T}function Nh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function Bd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=ln(U);if(te===null)return!0;var he=yn.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&sn.call(he)==Xt}var Dh=ut?Je(ut):Wu;function Fd(U){return jr(U,zh(U))}function zh(U){return Ht(U)?D1(U,!0):zs(U)}var un=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Bh(U){return U}function F1(){return!1}e.exports=un})(G6,G6.exports);const Sl=G6.exports;function Es(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return yZ(e)?e(...t):e}var yZ=e=>typeof e=="function",bZ=e=>/!(important)?$/.test(e),DP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,j6=(e,t)=>n=>{const r=String(t),i=bZ(r),o=DP(r),a=e?`${e}.${o}`:o;let s=Es(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=DP(s),i?`${s} !important`:s};function gv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=j6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ky=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=gv({scale:e,transform:t}),r}}var SZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:SZ(t),transform:n?gv({scale:n,compose:r}):r}}var rN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function wZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...rN].join(" ")}function CZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...rN].join(" ")}var _Z={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},kZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function EZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var PZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},iN="& > :not(style) ~ :not(style)",TZ={[iN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},LZ={[iN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Y6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},AZ=new Set(Object.values(Y6)),oN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),MZ=e=>e.trim();function IZ(e,t){var n;if(e==null||oN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(MZ).filter(Boolean);if(l?.length===0)return e;const u=s in Y6?Y6[s]:s;l.unshift(u);const h=l.map(g=>{if(AZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=aN(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var aN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),OZ=(e,t)=>IZ(e,t??{});function RZ(e){return/^var\(--.+\)$/.test(e)}var NZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:_Z},backdropFilter(e){return e!=="auto"?e:kZ},ring(e){return EZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?wZ():e==="auto-gpu"?CZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=NZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(RZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:OZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||aN(e)||oN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=PZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",rn.px),space:ds("space",ky(rn.vh,rn.px)),spaceT:ds("space",ky(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:gv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",ky(rn.vh,rn.px)),sizesT:ds("sizes",ky(rn.vh,rn.fraction)),shadows:ds("shadows"),logical:xZ,blur:ds("blur",rn.blur)},I3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(I3,{bgImage:I3.backgroundImage,bgImg:I3.backgroundImage});var pn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var DZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},q6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(q6,{shadow:q6.boxShadow});var zZ={filter:{transform:rn.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",rn.brightness),contrast:ie.propT("--chakra-contrast",rn.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",rn.invert),saturate:ie.propT("--chakra-saturate",rn.saturate),dropShadow:ie.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",rn.saturate)},O5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:TZ,transform:gv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:LZ,transform:gv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(O5,{flexDir:O5.flexDirection});var sN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},BZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},La={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(La,{w:La.width,h:La.height,minW:La.minWidth,maxW:La.maxWidth,minH:La.minHeight,maxH:La.maxHeight,overscroll:La.overscrollBehavior,overscrollX:La.overscrollBehaviorX,overscrollY:La.overscrollBehaviorY});var FZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function $Z(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},WZ=HZ($Z),VZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},UZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},kx=(e,t,n)=>{const r={},i=WZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},GZ={srOnly:{transform(e){return e===!0?VZ:e==="focusable"?UZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>kx(t,e,n)}},Mm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Mm,{insetStart:Mm.insetInlineStart,insetEnd:Mm.insetInlineEnd});var jZ={ring:{transform:rn.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var YZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},qZ={clipPath:!0,transform:ie.propT("transform",rn.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},XZ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",rn.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function lN(e){return Es(e)&&e.reference?e.reference:String(e)}var U4=(e,...t)=>t.map(lN).join(` ${e} `).replace(/calc/g,""),zP=(...e)=>`calc(${U4("+",...e)})`,BP=(...e)=>`calc(${U4("-",...e)})`,K6=(...e)=>`calc(${U4("*",...e)})`,FP=(...e)=>`calc(${U4("/",...e)})`,$P=e=>{const t=lN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:K6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(zP(e,...t)),subtract:(...t)=>Af(BP(e,...t)),multiply:(...t)=>Af(K6(e,...t)),divide:(...t)=>Af(FP(e,...t)),negate:()=>Af($P(e)),toString:()=>e.toString()}),{add:zP,subtract:BP,multiply:K6,divide:FP,negate:$P});function QZ(e,t="-"){return e.replace(/\s+/g,t)}function JZ(e){const t=QZ(e.toString());return tQ(eQ(t))}function eQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function tQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function nQ(e,t=""){return[t,e].filter(Boolean).join("-")}function rQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function iQ(e,t=""){return JZ(`--${nQ(e,t)}`)}function Nn(e,t,n){const r=iQ(e,n);return{variable:r,reference:rQ(r,t)}}function oQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function aQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function X6(e){if(e==null)return e;const{unitless:t}=aQ(e);return t||typeof e=="number"?`${e}px`:e}var uN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,U9=e=>Object.fromEntries(Object.entries(e).sort(uN));function HP(e){const t=U9(e);return Object.assign(Object.values(t),t)}function sQ(e){const t=Object.keys(U9(e));return new Set(t)}function WP(e){if(!e)return e;e=X6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function sm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${X6(e)})`),t&&n.push("and",`(max-width: ${X6(t)})`),n.join(" ")}function lQ(e){if(!e)return null;e.base=e.base??"0px";const t=HP(e),n=Object.entries(e).sort(uN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?WP(u):void 0,{_minW:WP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:sm(null,u),minWQuery:sm(a),minMaxQuery:sm(a,u)}}),r=sQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:U9(e),asArray:HP(e),details:n,media:[null,...t.map(o=>sm(o)).slice(1)],toArrayValue(o){if(!Es(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;oQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>cN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),au=e=>cN(t=>e(t,"~ &"),"[data-peer]",".peer"),cN=(e,...t)=>t.map(e).join(", "),G4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:au(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:au(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:au(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:au(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:au(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:au(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:au(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:au(ki.focusWithin),_peerPlaceholderShown:au(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},uQ=Object.keys(G4);function VP(e,t){return Nn(String(e).replace(/\./g,"-"),void 0,t)}function cQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=VP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=VP(b,t?.cssVarPrefix);return E},g=Es(s)?s:{default:s};n=Sl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=G4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function dQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function fQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var hQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function pQ(e){return fQ(e,hQ)}function gQ(e){return e.semanticTokens}function mQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function vQ({tokens:e,semanticTokens:t}){const n=Object.entries(Z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Z6(e,t=1/0){return!Es(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Es(i)||Array.isArray(i)?Object.entries(Z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function yQ(e){var t;const n=mQ(e),r=pQ(n),i=gQ(n),o=vQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=cQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:lQ(n.breakpoints)}),n}var G9=Sl({},I3,pn,DZ,O5,La,zZ,jZ,BZ,sN,GZ,Mm,q6,Zn,ZZ,XZ,YZ,qZ,FZ,KZ),bQ=Object.assign({},Zn,La,O5,sN,Mm),SQ=Object.keys(bQ),xQ=[...Object.keys(G9),...uQ],wQ={...G9,...G4},CQ=e=>e in wQ,_Q=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=Es(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!EQ(t),TQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=kQ(t);return t=n(i)??r(o)??r(t),t};function LQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=_Q(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),PQ(g,v)&&(v=TQ(r,v));let b=t[g];if(b===!0&&(b={property:g}),Es(v)){h[g]=h[g]??{},h[g]=Sl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=zf(b?.property,r);if(!a&&b?.static){const P=zf(b.static,r);h=Sl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&Es(w)?h=Sl({},h,w):h[E]=w;continue}if(Es(w)){h=Sl({},h,w);continue}h[g]=w}return h};return i}var dN=e=>t=>LQ({theme:t,pseudos:G4,configs:G9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function AQ(e,t){if(Array.isArray(e))return e;if(Es(e))return t(e);if(e!=null)return[e]}function MQ(e,t){for(let n=t+1;n{Sl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?Sl(u,k):u[P]=k;continue}u[P]=k}}return u}}function OQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IQ(i);return Sl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function RQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return dQ(e,["styleConfig","size","variant","colorScheme"])}function NQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(a1,--No):0,W0--,Hr===10&&(W0=1,Y4--),Hr}function la(){return Hr=No2||vv(Hr)>3?"":" "}function YQ(e,t){for(;--t&&la()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return qv(e,O3()+(t<6&&_l()==32&&la()==32))}function J6(e){for(;la();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&J6(Hr);break;case 40:e===41&&J6(e);break;case 92:la();break}return No}function qQ(e,t){for(;la()&&e+Hr!==47+10;)if(e+Hr===42+42&&_l()===47)break;return"/*"+qv(t,No-1)+"*"+j4(e===47?e:la())}function KQ(e){for(;!vv(_l());)la();return qv(e,No)}function XQ(e){return vN(N3("",null,null,null,[""],e=mN(e),0,[0],e))}function N3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,T="",M=i,O=o,R=r,N=T;E;)switch(b=k,k=la()){case 40:if(b!=108&&Ti(N,g-1)==58){Q6(N+=wn(R3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=R3(k);break;case 9:case 10:case 13:case 32:N+=jQ(b);break;case 92:N+=YQ(O3()-1,7);continue;case 47:switch(_l()){case 42:case 47:Ey(ZQ(qQ(la(),O3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ey(v>32?GP(N+";",r,n,g-1):GP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ey(R=UP(N,t,n,u,h,i,s,T,M=[],O=[],g),o),k===123)if(h===0)N3(N,t,R,R,M,o,g,s,O);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:N3(e,R,R,r&&Ey(UP(e,R,R,0,0,i,s,T,i,M=[],g),O),i,O,g,s,r?M:O);break;default:N3(N,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&GQ()==125)continue}switch(N+=j4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:_l()===45&&(N+=R3(la())),m=_l(),h=g=hl(T=N+=KQ(O3())),k++;break;case 45:b===45&&hl(N)==2&&(w=0)}}return o}function UP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=q9(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return q4(e,t,n,i===0?j9:s,l,u,h)}function ZQ(e,t,n){return q4(e,t,n,fN,j4(UQ()),mv(e,2,-2),0)}function GP(e,t,n,r){return q4(e,t,n,Y9,mv(e,0,r),mv(e,r+1,-1),r)}function p0(e,t){for(var n="",r=q9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+R5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Q6(e,"stretch")?bN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~Q6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var aJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Y9:t.return=bN(t.value,t.length);break;case hN:return p0([Bg(t,{value:wn(t.value,"@","@"+gn)})],i);case j9:if(t.length)return VQ(t.props,function(o){switch(WQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return p0([Bg(t,{props:[wn(o,/:(read-\w+)/,":"+R5+"$1")]})],i);case"::placeholder":return p0([Bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Bg(t,{props:[wn(o,/:(plac\w+)/,":"+R5+"$1")]}),Bg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},sJ=[aJ],SN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||sJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var yJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bJ=/[A-Z]|^ms/g,SJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,PN=function(t){return t.charCodeAt(1)===45},qP=function(t){return t!=null&&typeof t!="boolean"},Ex=yN(function(e){return PN(e)?e:e.replace(bJ,"-$&").toLowerCase()}),KP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(SJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return yJ[t]!==1&&!PN(t)&&typeof n=="number"&&n!==0?n+"px":n};function yv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return xJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,yv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function BJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},RN=FJ(BJ);function NN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var DN=e=>NN(e,t=>t!=null);function $J(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var HJ=$J();function zN(e,...t){return DJ(e)?e(...t):e}function WJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function VJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var UJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,GJ=yN(function(e){return UJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jJ=GJ,YJ=function(t){return t!=="theme"},JP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jJ:YJ},eT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},qJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return kN(n,r,i),CJ(function(){return EN(n,r,i)}),null},KJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=eT(t,n,r),l=s||JP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZJ=Cn("accordion").parts("root","container","button","panel").extend("icon"),QJ=Cn("alert").parts("title","description","container").extend("icon","spinner"),JJ=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),eee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var tee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var nee=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ree=Cn("editable").parts("preview","input","textarea"),iee=Cn("form").parts("container","requiredIndicator","helperText"),oee=Cn("formError").parts("text","icon"),aee=Cn("input").parts("addon","field","element"),see=Cn("list").parts("container","item","icon"),lee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),uee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var dee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),fee=Cn("progress").parts("label","filledTrack","track"),hee=Cn("radio").parts("container","control","label"),pee=Cn("select").parts("field","icon"),gee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),mee=Cn("stat").parts("container","label","helpText","number","icon"),vee=Cn("switch").parts("container","track","thumb"),yee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),bee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),See=Cn("tag").parts("container","label","closeButton"),xee=Cn("card").parts("container","header","body","footer");function Mi(e,t){wee(e)&&(e="100%");var n=Cee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Py(e){return Math.min(1,Math.max(0,e))}function wee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Cee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function BN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ty(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function _ee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function tT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Px(s,a,e+1/3),i=Px(s,a,e),o=Px(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function nT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var rC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Aee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Oee(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=_ee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(r=Ty(e.s),i=Ty(e.v),t=Eee(e.h,r,i),a=!0,s="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(r=Ty(e.s),o=Ty(e.l),t=kee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=BN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Mee="[-\\+]?\\d+%?",Iee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(Iee,")|(?:").concat(Mee,")"),Tx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Tx),rgba:new RegExp("rgba"+Lx),hsl:new RegExp("hsl"+Tx),hsla:new RegExp("hsla"+Lx),hsv:new RegExp("hsv"+Tx),hsva:new RegExp("hsva"+Lx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Oee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(rC[e])e=rC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:iT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:iT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Kv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Lee(t)),this.originalInput=t;var i=Aee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=BN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=nT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=nT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=tT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=tT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),rT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Pee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+rT(this.r,this.g,this.b,!1),n=0,r=Object.entries(rC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Py(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Py(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Py(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Py(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(FN(e));return e.count=t,n}var r=Ree(e.hue,e.seed),i=Nee(r,e),o=Dee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Kv(a)}function Ree(e,t){var n=Bee(e),r=N5(n,t);return r<0&&(r=360+r),r}function Nee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return N5([0,100],t.seed);var n=$N(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return N5([r,i],t.seed)}function Dee(e,t,n){var r=zee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return N5([r,i],n.seed)}function zee(e,t){for(var n=$N(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Bee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=WN.find(function(a){return a.name===e});if(n){var r=HN(n);if(r.hueRange)return r.hueRange}var i=new Kv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function $N(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=WN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function N5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function HN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var WN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Fee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Fee(e,`colors.${t}`,t),{isValid:i}=new Kv(r);return i?r:n},Hee=e=>t=>{const n=to(t,e);return new Kv(n).isDark()?"dark":"light"},Wee=e=>t=>Hee(e)(t)==="dark",V0=(e,t)=>n=>{const r=to(n,e);return new Kv(r).setAlpha(t).toRgbString()};function oT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function Vee(e){const t=FN().toHexString();return!e||$ee(e)?t:e.string&&e.colors?Gee(e.string,e.colors):e.string&&!e.colors?Uee(e.string):e.colors&&!e.string?jee(e.colors):t}function Uee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Gee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function e8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function VN(e){return Yee(e)&&e.reference?e.reference:String(e)}var sb=(e,...t)=>t.map(VN).join(` ${e} `).replace(/calc/g,""),aT=(...e)=>`calc(${sb("+",...e)})`,sT=(...e)=>`calc(${sb("-",...e)})`,iC=(...e)=>`calc(${sb("*",...e)})`,lT=(...e)=>`calc(${sb("/",...e)})`,uT=e=>{const t=VN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:iC(t,-1)},hu=Object.assign(e=>({add:(...t)=>hu(aT(e,...t)),subtract:(...t)=>hu(sT(e,...t)),multiply:(...t)=>hu(iC(e,...t)),divide:(...t)=>hu(lT(e,...t)),negate:()=>hu(uT(e)),toString:()=>e.toString()}),{add:aT,subtract:sT,multiply:iC,divide:lT,negate:uT});function qee(e){return!Number.isInteger(parseFloat(e.toString()))}function Kee(e,t="-"){return e.replace(/\s+/g,t)}function UN(e){const t=Kee(e.toString());return t.includes("\\.")?e:qee(e)?t.replace(".","\\."):e}function Xee(e,t=""){return[t,UN(e)].filter(Boolean).join("-")}function Zee(e,t){return`var(${UN(e)}${t?`, ${t}`:""})`}function Qee(e,t=""){return`--${Xee(e,t)}`}function ni(e,t){const n=Qee(e,t?.prefix);return{variable:n,reference:Zee(n,Jee(t?.fallback))}}function Jee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ete,defineMultiStyleConfig:tte}=Jn(ZJ.keys),nte={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},rte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ite={pt:"2",px:"4",pb:"5"},ote={fontSize:"1.25em"},ate=ete({container:nte,button:rte,panel:ite,icon:ote}),ste=tte({baseStyle:ate}),{definePartsStyle:Xv,defineMultiStyleConfig:lte}=Jn(QJ.keys),ua=Nn("alert-fg"),Cu=Nn("alert-bg"),ute=Xv({container:{bg:Cu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function t8(e){const{theme:t,colorScheme:n}=e,r=V0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var cte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark}}}}),dte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),fte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),hte=Xv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[Cu.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[Cu.variable]:`colors.${t}.200`},color:ua.reference}}}),pte={subtle:cte,"left-accent":dte,"top-accent":fte,solid:hte},gte=lte({baseStyle:ute,variants:pte,defaultProps:{variant:"subtle",colorScheme:"blue"}}),GN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},mte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},vte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},yte={...GN,...mte,container:vte},jN=yte,bte=e=>typeof e=="function";function io(e,...t){return bte(e)?e(...t):e}var{definePartsStyle:YN,defineMultiStyleConfig:Ste}=Jn(JJ.keys),g0=Nn("avatar-border-color"),Ax=Nn("avatar-bg"),xte={borderRadius:"full",border:"0.2em solid",[g0.variable]:"white",_dark:{[g0.variable]:"colors.gray.800"},borderColor:g0.reference},wte={[Ax.variable]:"colors.gray.200",_dark:{[Ax.variable]:"colors.whiteAlpha.400"},bgColor:Ax.reference},cT=Nn("avatar-background"),Cte=e=>{const{name:t,theme:n}=e,r=t?Vee({string:t}):"colors.gray.400",i=Wee(r)(n);let o="white";return i||(o="gray.800"),{bg:cT.reference,"&:not([data-loaded])":{[cT.variable]:r},color:o,[g0.variable]:"colors.white",_dark:{[g0.variable]:"colors.gray.800"},borderColor:g0.reference,verticalAlign:"top"}},_te=YN(e=>({badge:io(xte,e),excessLabel:io(wte,e),container:io(Cte,e)}));function Pc(e){const t=e!=="100%"?jN[e]:void 0;return YN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var kte={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Ete=Ste({baseStyle:_te,sizes:kte,defaultProps:{size:"md"}}),Pte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},m0=Nn("badge-bg"),xl=Nn("badge-color"),Tte=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.500`,.6)(n);return{[m0.variable]:`colors.${t}.500`,[xl.variable]:"colors.white",_dark:{[m0.variable]:r,[xl.variable]:"colors.whiteAlpha.800"},bg:m0.reference,color:xl.reference}},Lte=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.200`,.16)(n);return{[m0.variable]:`colors.${t}.100`,[xl.variable]:`colors.${t}.800`,_dark:{[m0.variable]:r,[xl.variable]:`colors.${t}.200`},bg:m0.reference,color:xl.reference}},Ate=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.200`,.8)(n);return{[xl.variable]:`colors.${t}.500`,_dark:{[xl.variable]:r},color:xl.reference,boxShadow:`inset 0 0 0px 1px ${xl.reference}`}},Mte={solid:Tte,subtle:Lte,outline:Ate},Om={baseStyle:Pte,variants:Mte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Ite,definePartsStyle:Ote}=Jn(eee.keys),Rte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Nte=Ote({link:Rte}),Dte=Ite({baseStyle:Nte}),zte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},qN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:bt("inherit","whiteAlpha.900")(e),_hover:{bg:bt("gray.100","whiteAlpha.200")(e)},_active:{bg:bt("gray.200","whiteAlpha.300")(e)}};const r=V0(`${t}.200`,.12)(n),i=V0(`${t}.200`,.24)(n);return{color:bt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:bt(`${t}.50`,r)(e)},_active:{bg:bt(`${t}.100`,i)(e)}}},Bte=e=>{const{colorScheme:t}=e,n=bt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(qN,e)}},Fte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},$te=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=bt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:bt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:bt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Fte[t]??{},a=bt(n,`${t}.200`)(e);return{bg:a,color:bt(r,"gray.800")(e),_hover:{bg:bt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:bt(o,`${t}.400`)(e)}}},Hte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:bt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:bt(`${t}.700`,`${t}.500`)(e)}}},Wte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Vte={ghost:qN,outline:Bte,solid:$te,link:Hte,unstyled:Wte},Ute={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Gte={baseStyle:zte,variants:Vte,sizes:Ute,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:jte}=Jn(xee.keys),D5=Nn("card-bg"),v0=Nn("card-padding"),Yte=Yf({container:{[D5.variable]:"chakra-body-bg",backgroundColor:D5.reference,color:"chakra-body-text"},body:{padding:v0.reference,flex:"1 1 0%"},header:{padding:v0.reference},footer:{padding:v0.reference}}),qte={sm:Yf({container:{borderRadius:"base",[v0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[v0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[v0.variable]:"space.7"}})},Kte={elevated:Yf({container:{boxShadow:"base",_dark:{[D5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[D5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Xte=jte({baseStyle:Yte,variants:Kte,sizes:qte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:D3,defineMultiStyleConfig:Zte}=Jn(tee.keys),Rm=Nn("checkbox-size"),Qte=e=>{const{colorScheme:t}=e;return{w:Rm.reference,h:Rm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e),_hover:{bg:bt(`${t}.600`,`${t}.300`)(e),borderColor:bt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:bt("gray.200","transparent")(e),bg:bt("gray.200","whiteAlpha.300")(e),color:bt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e)},_disabled:{bg:bt("gray.100","whiteAlpha.100")(e),borderColor:bt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:bt("red.500","red.300")(e)}}},Jte={_disabled:{cursor:"not-allowed"}},ene={userSelect:"none",_disabled:{opacity:.4}},tne={transitionProperty:"transform",transitionDuration:"normal"},nne=D3(e=>({icon:tne,container:Jte,control:io(Qte,e),label:ene})),rne={sm:D3({control:{[Rm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:D3({control:{[Rm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:D3({control:{[Rm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},z5=Zte({baseStyle:nne,sizes:rne,defaultProps:{size:"md",colorScheme:"blue"}}),Nm=ni("close-button-size"),Fg=ni("close-button-bg"),ine={w:[Nm.reference],h:[Nm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Fg.variable]:"colors.blackAlpha.100",_dark:{[Fg.variable]:"colors.whiteAlpha.100"}},_active:{[Fg.variable]:"colors.blackAlpha.200",_dark:{[Fg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Fg.reference},one={lg:{[Nm.variable]:"sizes.10",fontSize:"md"},md:{[Nm.variable]:"sizes.8",fontSize:"xs"},sm:{[Nm.variable]:"sizes.6",fontSize:"2xs"}},ane={baseStyle:ine,sizes:one,defaultProps:{size:"md"}},{variants:sne,defaultProps:lne}=Om,une={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},cne={baseStyle:une,variants:sne,defaultProps:lne},dne={w:"100%",mx:"auto",maxW:"prose",px:"4"},fne={baseStyle:dne},hne={opacity:.6,borderColor:"inherit"},pne={borderStyle:"solid"},gne={borderStyle:"dashed"},mne={solid:pne,dashed:gne},vne={baseStyle:hne,variants:mne,defaultProps:{variant:"solid"}},{definePartsStyle:oC,defineMultiStyleConfig:yne}=Jn(nee.keys),Mx=Nn("drawer-bg"),Ix=Nn("drawer-box-shadow");function kp(e){return oC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var bne={bg:"blackAlpha.600",zIndex:"overlay"},Sne={display:"flex",zIndex:"modal",justifyContent:"center"},xne=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Mx.variable]:"colors.white",[Ix.variable]:"shadows.lg",_dark:{[Mx.variable]:"colors.gray.700",[Ix.variable]:"shadows.dark-lg"},bg:Mx.reference,boxShadow:Ix.reference}},wne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Cne={position:"absolute",top:"2",insetEnd:"3"},_ne={px:"6",py:"2",flex:"1",overflow:"auto"},kne={px:"6",py:"4"},Ene=oC(e=>({overlay:bne,dialogContainer:Sne,dialog:io(xne,e),header:wne,closeButton:Cne,body:_ne,footer:kne})),Pne={xs:kp("xs"),sm:kp("md"),md:kp("lg"),lg:kp("2xl"),xl:kp("4xl"),full:kp("full")},Tne=yne({baseStyle:Ene,sizes:Pne,defaultProps:{size:"xs"}}),{definePartsStyle:Lne,defineMultiStyleConfig:Ane}=Jn(ree.keys),Mne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ine={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},One={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rne=Lne({preview:Mne,input:Ine,textarea:One}),Nne=Ane({baseStyle:Rne}),{definePartsStyle:Dne,defineMultiStyleConfig:zne}=Jn(iee.keys),y0=Nn("form-control-color"),Bne={marginStart:"1",[y0.variable]:"colors.red.500",_dark:{[y0.variable]:"colors.red.300"},color:y0.reference},Fne={mt:"2",[y0.variable]:"colors.gray.600",_dark:{[y0.variable]:"colors.whiteAlpha.600"},color:y0.reference,lineHeight:"normal",fontSize:"sm"},$ne=Dne({container:{width:"100%",position:"relative"},requiredIndicator:Bne,helperText:Fne}),Hne=zne({baseStyle:$ne}),{definePartsStyle:Wne,defineMultiStyleConfig:Vne}=Jn(oee.keys),b0=Nn("form-error-color"),Une={[b0.variable]:"colors.red.500",_dark:{[b0.variable]:"colors.red.300"},color:b0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gne={marginEnd:"0.5em",[b0.variable]:"colors.red.500",_dark:{[b0.variable]:"colors.red.300"},color:b0.reference},jne=Wne({text:Une,icon:Gne}),Yne=Vne({baseStyle:jne}),qne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Kne={baseStyle:qne},Xne={fontFamily:"heading",fontWeight:"bold"},Zne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Qne={baseStyle:Xne,sizes:Zne,defaultProps:{size:"xl"}},{definePartsStyle:mu,defineMultiStyleConfig:Jne}=Jn(aee.keys),ere=mu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},tre={lg:mu({field:Tc.lg,addon:Tc.lg}),md:mu({field:Tc.md,addon:Tc.md}),sm:mu({field:Tc.sm,addon:Tc.sm}),xs:mu({field:Tc.xs,addon:Tc.xs})};function n8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||bt("blue.500","blue.300")(e),errorBorderColor:n||bt("red.500","red.300")(e)}}var nre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:bt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:bt("inherit","whiteAlpha.50")(e),bg:bt("gray.100","whiteAlpha.300")(e)}}}),rre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e),_hover:{bg:bt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e)}}}),ire=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ore=mu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),are={outline:nre,filled:rre,flushed:ire,unstyled:ore},mn=Jne({baseStyle:ere,sizes:tre,variants:are,defaultProps:{size:"md",variant:"outline"}}),Ox=Nn("kbd-bg"),sre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},lre={baseStyle:sre},ure={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},cre={baseStyle:ure},{defineMultiStyleConfig:dre,definePartsStyle:fre}=Jn(see.keys),hre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},pre=fre({icon:hre}),gre=dre({baseStyle:pre}),{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(lee.keys),fl=Nn("menu-bg"),Rx=Nn("menu-shadow"),yre={[fl.variable]:"#fff",[Rx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Rx.reference},bre={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},Sre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},xre={opacity:.6},wre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Cre={transitionProperty:"common",transitionDuration:"normal"},_re=vre({button:Cre,list:yre,item:bre,groupTitle:Sre,command:xre,divider:wre}),kre=mre({baseStyle:_re}),{defineMultiStyleConfig:Ere,definePartsStyle:aC}=Jn(uee.keys),Pre={bg:"blackAlpha.600",zIndex:"modal"},Tre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Lre=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:bt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:bt("lg","dark-lg")(e)}},Are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mre={position:"absolute",top:"2",insetEnd:"3"},Ire=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ore={px:"6",py:"4"},Rre=aC(e=>({overlay:Pre,dialogContainer:io(Tre,e),dialog:io(Lre,e),header:Are,closeButton:Mre,body:io(Ire,e),footer:Ore}));function fs(e){return aC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Nre={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Dre=Ere({baseStyle:Rre,sizes:Nre,defaultProps:{size:"md"}}),zre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},KN=zre,{defineMultiStyleConfig:Bre,definePartsStyle:XN}=Jn(cee.keys),r8=ni("number-input-stepper-width"),ZN=ni("number-input-input-padding"),Fre=hu(r8).add("0.5rem").toString(),Nx=ni("number-input-bg"),Dx=ni("number-input-color"),zx=ni("number-input-border-color"),$re={[r8.variable]:"sizes.6",[ZN.variable]:Fre},Hre=e=>{var t;return((t=io(mn.baseStyle,e))==null?void 0:t.field)??{}},Wre={width:r8.reference},Vre={borderStart:"1px solid",borderStartColor:zx.reference,color:Dx.reference,bg:Nx.reference,[Dx.variable]:"colors.chakra-body-text",[zx.variable]:"colors.chakra-border-color",_dark:{[Dx.variable]:"colors.whiteAlpha.800",[zx.variable]:"colors.whiteAlpha.300"},_active:{[Nx.variable]:"colors.gray.200",_dark:{[Nx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Ure=XN(e=>({root:$re,field:io(Hre,e)??{},stepperGroup:Wre,stepper:Vre}));function Ly(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=KN.fontSizes[o];return XN({field:{...r.field,paddingInlineEnd:ZN.reference,verticalAlign:"top"},stepper:{fontSize:hu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gre={xs:Ly("xs"),sm:Ly("sm"),md:Ly("md"),lg:Ly("lg")},jre=Bre({baseStyle:Ure,sizes:Gre,variants:mn.variants,defaultProps:mn.defaultProps}),dT,Yre={...(dT=mn.baseStyle)==null?void 0:dT.field,textAlign:"center"},qre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},fT,Kre={outline:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((fT=mn.variants)==null?void 0:fT.unstyled.field)??{}},Xre={baseStyle:Yre,sizes:qre,variants:Kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=Jn(dee.keys),Ay=ni("popper-bg"),Jre=ni("popper-arrow-bg"),hT=ni("popper-arrow-shadow-color"),eie={zIndex:10},tie={[Ay.variable]:"colors.white",bg:Ay.reference,[Jre.variable]:Ay.reference,[hT.variable]:"colors.gray.200",_dark:{[Ay.variable]:"colors.gray.700",[hT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},nie={px:3,py:2,borderBottomWidth:"1px"},rie={px:3,py:2},iie={px:3,py:2,borderTopWidth:"1px"},oie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},aie=Qre({popper:eie,content:tie,header:nie,body:rie,footer:iie,closeButton:oie}),sie=Zre({baseStyle:aie}),{defineMultiStyleConfig:lie,definePartsStyle:lm}=Jn(fee.keys),uie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=bt(oT(),oT("1rem","rgba(0,0,0,0.1)"))(e),a=bt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${to(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},cie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},die=e=>({bg:bt("gray.100","whiteAlpha.300")(e)}),fie=e=>({transitionProperty:"common",transitionDuration:"slow",...uie(e)}),hie=lm(e=>({label:cie,filledTrack:fie(e),track:die(e)})),pie={xs:lm({track:{h:"1"}}),sm:lm({track:{h:"2"}}),md:lm({track:{h:"3"}}),lg:lm({track:{h:"4"}})},gie=lie({sizes:pie,baseStyle:hie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:mie,definePartsStyle:z3}=Jn(hee.keys),vie=e=>{var t;const n=(t=io(z5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},yie=z3(e=>{var t,n,r,i;return{label:(n=(t=z5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=z5).baseStyle)==null?void 0:i.call(r,e).container,control:vie(e)}}),bie={md:z3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:z3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:z3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sie=mie({baseStyle:yie,sizes:bie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:wie}=Jn(pee.keys),My=Nn("select-bg"),pT,Cie={...(pT=mn.baseStyle)==null?void 0:pT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:My.reference,[My.variable]:"colors.white",_dark:{[My.variable]:"colors.gray.700"},"> option, > optgroup":{bg:My.reference}},_ie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},kie=wie({field:Cie,icon:_ie}),Iy={paddingInlineEnd:"8"},gT,mT,vT,yT,bT,ST,xT,wT,Eie={lg:{...(gT=mn.sizes)==null?void 0:gT.lg,field:{...(mT=mn.sizes)==null?void 0:mT.lg.field,...Iy}},md:{...(vT=mn.sizes)==null?void 0:vT.md,field:{...(yT=mn.sizes)==null?void 0:yT.md.field,...Iy}},sm:{...(bT=mn.sizes)==null?void 0:bT.sm,field:{...(ST=mn.sizes)==null?void 0:ST.sm.field,...Iy}},xs:{...(xT=mn.sizes)==null?void 0:xT.xs,field:{...(wT=mn.sizes)==null?void 0:wT.xs.field,...Iy},icon:{insetEnd:"1"}}},Pie=xie({baseStyle:kie,sizes:Eie,variants:mn.variants,defaultProps:mn.defaultProps}),Bx=Nn("skeleton-start-color"),Fx=Nn("skeleton-end-color"),Tie={[Bx.variable]:"colors.gray.100",[Fx.variable]:"colors.gray.400",_dark:{[Bx.variable]:"colors.gray.800",[Fx.variable]:"colors.gray.600"},background:Bx.reference,borderColor:Fx.reference,opacity:.7,borderRadius:"sm"},Lie={baseStyle:Tie},$x=Nn("skip-link-bg"),Aie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$x.variable]:"colors.white",_dark:{[$x.variable]:"colors.gray.700"},bg:$x.reference}},Mie={baseStyle:Aie},{defineMultiStyleConfig:Iie,definePartsStyle:lb}=Jn(gee.keys),xv=Nn("slider-thumb-size"),wv=Nn("slider-track-size"),zc=Nn("slider-bg"),Oie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...e8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Rie=e=>({...e8({orientation:e.orientation,horizontal:{h:wv.reference},vertical:{w:wv.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),Nie=e=>{const{orientation:t}=e;return{...e8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:xv.reference,h:xv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Die=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},zie=lb(e=>({container:Oie(e),track:Rie(e),thumb:Nie(e),filledTrack:Die(e)})),Bie=lb({container:{[xv.variable]:"sizes.4",[wv.variable]:"sizes.1"}}),Fie=lb({container:{[xv.variable]:"sizes.3.5",[wv.variable]:"sizes.1"}}),$ie=lb({container:{[xv.variable]:"sizes.2.5",[wv.variable]:"sizes.0.5"}}),Hie={lg:Bie,md:Fie,sm:$ie},Wie=Iie({baseStyle:zie,sizes:Hie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),Vie={width:[Mf.reference],height:[Mf.reference]},Uie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Gie={baseStyle:Vie,sizes:Uie,defaultProps:{size:"md"}},{defineMultiStyleConfig:jie,definePartsStyle:QN}=Jn(mee.keys),Yie={fontWeight:"medium"},qie={opacity:.8,marginBottom:"2"},Kie={verticalAlign:"baseline",fontWeight:"semibold"},Xie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Zie=QN({container:{},label:Yie,helpText:qie,number:Kie,icon:Xie}),Qie={md:QN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Jie=jie({baseStyle:Zie,sizes:Qie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:eoe,definePartsStyle:B3}=Jn(vee.keys),Dm=ni("switch-track-width"),qf=ni("switch-track-height"),Hx=ni("switch-track-diff"),toe=hu.subtract(Dm,qf),sC=ni("switch-thumb-x"),$g=ni("switch-bg"),noe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Dm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[$g.variable]:"colors.gray.300",_dark:{[$g.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[$g.variable]:`colors.${t}.500`,_dark:{[$g.variable]:`colors.${t}.200`}},bg:$g.reference}},roe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${sC.reference})`}},ioe=B3(e=>({container:{[Hx.variable]:toe,[sC.variable]:Hx.reference,_rtl:{[sC.variable]:hu(Hx).negate().toString()}},track:noe(e),thumb:roe})),ooe={sm:B3({container:{[Dm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:B3({container:{[Dm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:B3({container:{[Dm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},aoe=eoe({baseStyle:ioe,sizes:ooe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:S0}=Jn(yee.keys),loe=S0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),B5={"&[data-is-numeric=true]":{textAlign:"end"}},uoe=S0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},caption:{color:bt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),coe=S0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},caption:{color:bt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e)},td:{background:bt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),doe={simple:uoe,striped:coe,unstyled:{}},foe={sm:S0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:S0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:S0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},hoe=soe({baseStyle:loe,variants:doe,sizes:foe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=Nn("tabs-color"),Ss=Nn("tabs-bg"),Oy=Nn("tabs-border-color"),{defineMultiStyleConfig:poe,definePartsStyle:kl}=Jn(bee.keys),goe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},moe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},voe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},yoe={p:4},boe=kl(e=>({root:goe(e),tab:moe(e),tablist:voe(e),tabpanel:yoe})),Soe={sm:kl({tab:{py:1,px:4,fontSize:"sm"}}),md:kl({tab:{fontSize:"md",py:2,px:4}}),lg:kl({tab:{fontSize:"lg",py:3,px:4}})},xoe=kl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ss.variable]:"colors.gray.200",_dark:{[Ss.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:Ss.reference}}}),woe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Oy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Oy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Oy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Oy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Coe=kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ss.variable]:"colors.gray.50",_dark:{[Ss.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ss.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[Ss.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:Ss.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),_oe=kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),koe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[Ss.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[Ss.variable]:`colors.${t}.300`}},color:To.reference,bg:Ss.reference}}}),Eoe=kl({}),Poe={line:xoe,enclosed:woe,"enclosed-colored":Coe,"soft-rounded":_oe,"solid-rounded":koe,unstyled:Eoe},Toe=poe({baseStyle:boe,sizes:Soe,variants:Poe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Loe,definePartsStyle:Kf}=Jn(See.keys),Aoe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Moe={lineHeight:1.2,overflow:"visible"},Ioe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Ooe=Kf({container:Aoe,label:Moe,closeButton:Ioe}),Roe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Noe={subtle:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.outline(e)}})},Doe=Loe({variants:Noe,baseStyle:Ooe,sizes:Roe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),CT,zoe={...(CT=mn.baseStyle)==null?void 0:CT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},_T,Boe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((_T=mn.variants)==null?void 0:_T.unstyled.field)??{}},kT,ET,PT,TT,Foe={xs:((kT=mn.sizes)==null?void 0:kT.xs.field)??{},sm:((ET=mn.sizes)==null?void 0:ET.sm.field)??{},md:((PT=mn.sizes)==null?void 0:PT.md.field)??{},lg:((TT=mn.sizes)==null?void 0:TT.lg.field)??{}},$oe={baseStyle:zoe,sizes:Foe,variants:Boe,defaultProps:{size:"md",variant:"outline"}},Ry=ni("tooltip-bg"),Wx=ni("tooltip-fg"),Hoe=ni("popper-arrow-bg"),Woe={bg:Ry.reference,color:Wx.reference,[Ry.variable]:"colors.gray.700",[Wx.variable]:"colors.whiteAlpha.900",_dark:{[Ry.variable]:"colors.gray.300",[Wx.variable]:"colors.gray.900"},[Hoe.variable]:Ry.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Voe={baseStyle:Woe},Uoe={Accordion:ste,Alert:gte,Avatar:Ete,Badge:Om,Breadcrumb:Dte,Button:Gte,Checkbox:z5,CloseButton:ane,Code:cne,Container:fne,Divider:vne,Drawer:Tne,Editable:Nne,Form:Hne,FormError:Yne,FormLabel:Kne,Heading:Qne,Input:mn,Kbd:lre,Link:cre,List:gre,Menu:kre,Modal:Dre,NumberInput:jre,PinInput:Xre,Popover:sie,Progress:gie,Radio:Sie,Select:Pie,Skeleton:Lie,SkipLink:Mie,Slider:Wie,Spinner:Gie,Stat:Jie,Switch:aoe,Table:hoe,Tabs:Toe,Tag:Doe,Textarea:$oe,Tooltip:Voe,Card:Xte},Goe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},joe=Goe,Yoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},qoe=Yoe,Koe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Xoe=Koe,Zoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Qoe=Zoe,Joe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},eae=Joe,tae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},nae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},rae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},iae={property:tae,easing:nae,duration:rae},oae=iae,aae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},sae=aae,lae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},uae=lae,cae={breakpoints:qoe,zIndices:sae,radii:Qoe,blur:uae,colors:Xoe,...KN,sizes:jN,shadows:eae,space:GN,borders:joe,transition:oae},dae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},fae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},hae="ltr",pae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},gae={semanticTokens:dae,direction:hae,...cae,components:Uoe,styles:fae,config:pae},mae=typeof Element<"u",vae=typeof Map=="function",yae=typeof Set=="function",bae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function F3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!F3(e[r],t[r]))return!1;return!0}var o;if(vae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!F3(r.value[1],t.get(r.value[0])))return!1;return!0}if(yae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(bae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(mae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!F3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Sae=function(t,n){try{return F3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function s1(){const e=C.exports.useContext(bv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function JN(){const e=Yv(),t=s1();return{...e,theme:t}}function xae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function wae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Cae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return xae(o,l,a[u]??l);const h=`${e}.${l}`;return wae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function _ae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>yQ(n),[n]);return ee(PJ,{theme:i,children:[x(kae,{root:t}),r]})}function kae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(ob,{styles:n=>({[t]:n.__cssVars})})}VJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Eae(){const{colorMode:e}=Yv();return x(ob,{styles:t=>{const n=RN(t,"styles.global"),r=zN(n,{theme:t,colorMode:e});return r?dN(r)(t):void 0}})}var Pae=new Set([...xQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Tae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Lae(e){return Tae.has(e)||!Pae.has(e)}var Aae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=NN(a,(g,m)=>CQ(m)),l=zN(e,t),u=Object.assign({},i,l,DN(s),o),h=dN(u)(t.theme);return r?[h,r]:h};function Vx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Lae);const i=Aae({baseStyle:n}),o=nC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Yv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function ke(e){return C.exports.forwardRef(e)}function eD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=JN(),a=e?RN(i,`components.${e}`):void 0,s=n||a,l=Sl({theme:i,colorMode:o},s?.defaultProps??{},DN(zJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=OQ(s)(l);Sae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return eD(e,t)}function Oi(e,t={}){return eD(e,t)}function Mae(){const e=new Map;return new Proxy(Vx,{apply(t,n,r){return Vx(...r)},get(t,n){return e.has(n)||e.set(n,Vx(n)),e.get(n)}})}var Se=Mae();function Iae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Iae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Oae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Hn(...e){return t=>{e.forEach(n=>{Oae(n,t)})}}function Rae(...e){return C.exports.useMemo(()=>Hn(...e),e)}function LT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Nae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function AT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function MT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var lC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,F5=e=>e,Dae=class{descendants=new Map;register=e=>{if(e!=null)return Nae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=LT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=AT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=AT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=MT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=MT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=LT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function zae(){const e=C.exports.useRef(new Dae);return lC(()=>()=>e.current.destroy()),e.current}var[Bae,tD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Fae(e){const t=tD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);lC(()=>()=>{!i.current||t.unregister(i.current)},[]),lC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=F5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Hn(o,i)}}function nD(){return[F5(Bae),()=>F5(tD()),()=>zae(),i=>Fae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),IT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=ke((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??IT.viewBox;if(n&&typeof n!="string")return ae.createElement(Se.svg,{as:n,...m,...u});const b=a??IT.path;return ae.createElement(Se.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});va.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=ke((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ub(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const i8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),cb=C.exports.createContext({});function $ae(){return C.exports.useContext(cb).visualElement}const l1=C.exports.createContext(null),ph=typeof document<"u",$5=ph?C.exports.useLayoutEffect:C.exports.useEffect,rD=C.exports.createContext({strict:!1});function Hae(e,t,n,r){const i=$ae(),o=C.exports.useContext(rD),a=C.exports.useContext(l1),s=C.exports.useContext(i8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return $5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),$5(()=>()=>u&&u.notify("Unmount"),[]),u}function Jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Jp(n)&&(n.current=r))},[t])}function Cv(e){return typeof e=="string"||Array.isArray(e)}function db(e){return typeof e=="object"&&typeof e.start=="function"}const Vae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function fb(e){return db(e.animate)||Vae.some(t=>Cv(e[t]))}function iD(e){return Boolean(fb(e)||e.variants)}function Uae(e,t){if(fb(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cv(n)?n:void 0,animate:Cv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Gae(e){const{initial:t,animate:n}=Uae(e,C.exports.useContext(cb));return C.exports.useMemo(()=>({initial:t,animate:n}),[OT(t),OT(n)])}function OT(e){return Array.isArray(e)?e.join(" "):e}const lu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),_v={measureLayout:lu(["layout","layoutId","drag"]),animation:lu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:lu(["exit"]),drag:lu(["drag","dragControls"]),focus:lu(["whileFocus"]),hover:lu(["whileHover","onHoverStart","onHoverEnd"]),tap:lu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:lu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:lu(["whileInView","onViewportEnter","onViewportLeave"])};function jae(e){for(const t in e)t==="projectionNodeConstructor"?_v.projectionNodeConstructor=e[t]:_v[t].Component=e[t]}function hb(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const zm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Yae=1;function qae(){return hb(()=>{if(zm.hasEverUpdated)return Yae++})}const o8=C.exports.createContext({});class Kae extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const oD=C.exports.createContext({}),Xae=Symbol.for("motionComponentSymbol");function Zae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&jae(e);function a(l,u){const h={...C.exports.useContext(i8),...l,layoutId:Qae(l)},{isStatic:g}=h;let m=null;const v=Gae(l),b=g?void 0:qae(),w=i(l,g);if(!g&&ph){v.visualElement=Hae(o,w,h,t);const E=C.exports.useContext(rD).strict,P=C.exports.useContext(oD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||_v.projectionNodeConstructor,P))}return ee(Kae,{visualElement:v.visualElement,props:h,children:[m,x(cb.Provider,{value:v,children:r(o,l,b,Wae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Xae]=o,s}function Qae({layoutId:e}){const t=C.exports.useContext(o8).id;return t&&e!==void 0?t+"-"+e:e}function Jae(e){function t(r,i={}){return Zae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ese=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function a8(e){return typeof e!="string"||e.includes("-")?!1:!!(ese.indexOf(e)>-1||/[A-Z]/.test(e))}const H5={};function tse(e){Object.assign(H5,e)}const W5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],u1=new Set(W5);function aD(e,{layout:t,layoutId:n}){return u1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!H5[e]||e==="opacity")}const Ml=e=>!!e?.getVelocity,nse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rse=(e,t)=>W5.indexOf(e)-W5.indexOf(t);function ise({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(rse);for(const s of t)a+=`${nse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function sD(e){return e.startsWith("--")}const ose=(e,t)=>t&&typeof e=="number"?t.transform(e):e,lD=(e,t)=>n=>Math.max(Math.min(n,t),e),Bm=e=>e%1?Number(e.toFixed(5)):e,kv=/(-)?([\d]*\.?[\d])+/g,uC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ase=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Zv(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fm=Object.assign(Object.assign({},gh),{transform:lD(0,1)}),Ny=Object.assign(Object.assign({},gh),{default:1}),Qv=e=>({test:t=>Zv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=Qv("deg"),El=Qv("%"),wt=Qv("px"),sse=Qv("vh"),lse=Qv("vw"),RT=Object.assign(Object.assign({},El),{parse:e=>El.parse(e)/100,transform:e=>El.transform(e*100)}),s8=(e,t)=>n=>Boolean(Zv(n)&&ase.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),uD=(e,t,n)=>r=>{if(!Zv(r))return r;const[i,o,a,s]=r.match(kv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:s8("hsl","hue"),parse:uD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+El.transform(Bm(t))+", "+El.transform(Bm(n))+", "+Bm(Fm.transform(r))+")"},use=lD(0,255),Ux=Object.assign(Object.assign({},gh),{transform:e=>Math.round(use(e))}),Vc={test:s8("rgb","red"),parse:uD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ux.transform(e)+", "+Ux.transform(t)+", "+Ux.transform(n)+", "+Bm(Fm.transform(r))+")"};function cse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const cC={test:s8("#"),parse:cse,transform:Vc.transform},Qi={test:e=>Vc.test(e)||cC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):cC.parse(e),transform:e=>Zv(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},cD="${c}",dD="${n}";function dse(e){var t,n,r,i;return isNaN(e)&&Zv(e)&&((n=(t=e.match(kv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(uC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function fD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(uC);r&&(n=r.length,e=e.replace(uC,cD),t.push(...r.map(Qi.parse)));const i=e.match(kv);return i&&(e=e.replace(kv,dD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function hD(e){return fD(e).values}function pD(e){const{values:t,numColors:n,tokenised:r}=fD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function hse(e){const t=hD(e);return pD(e)(t.map(fse))}const _u={test:dse,parse:hD,createTransformer:pD,getAnimatableNone:hse},pse=new Set(["brightness","contrast","saturate","opacity"]);function gse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kv)||[];if(!r)return e;const i=n.replace(r,"");let o=pse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const mse=/([a-z-]*)\(.*?\)/g,dC=Object.assign(Object.assign({},_u),{getAnimatableNone:e=>{const t=e.match(mse);return t?t.map(gse).join(" "):e}}),NT={...gh,transform:Math.round},gD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:Ny,scaleX:Ny,scaleY:Ny,scaleZ:Ny,skew:Lc,skewX:Lc,skewY:Lc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Fm,originX:RT,originY:RT,originZ:wt,zIndex:NT,fillOpacity:Fm,strokeOpacity:Fm,numOctaves:NT};function l8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(sD(m)){o[m]=v;continue}const b=gD[m],w=ose(v,b);if(u1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=ise(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const u8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function mD(e,t,n){for(const r in t)!Ml(t[r])&&!aD(r,n)&&(e[r]=t[r])}function vse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=u8();return l8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function yse(e,t,n){const r=e.style||{},i={};return mD(i,r,e),Object.assign(i,vse(e,t,n)),e.transformValues?e.transformValues(i):i}function bse(e,t,n){const r={},i=yse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Sse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],xse=["whileTap","onTap","onTapStart","onTapCancel"],wse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Cse=["whileInView","onViewportEnter","onViewportLeave","viewport"],_se=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Cse,...xse,...Sse,...wse]);function V5(e){return _se.has(e)}let vD=e=>!V5(e);function kse(e){!e||(vD=t=>t.startsWith("on")?!V5(t):e(t))}try{kse(require("@emotion/is-prop-valid").default)}catch{}function Ese(e,t,n){const r={};for(const i in e)(vD(i)||n===!0&&V5(i)||!t&&!V5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function DT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Pse(e,t,n){const r=DT(t,e.x,e.width),i=DT(n,e.y,e.height);return`${r} ${i}`}const Tse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lse={offset:"strokeDashoffset",array:"strokeDasharray"};function Ase(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Tse:Lse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function c8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){l8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Pse(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Ase(g,o,a,s,!1)}const yD=()=>({...u8(),attrs:{}});function Mse(e,t){const n=C.exports.useMemo(()=>{const r=yD();return c8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};mD(r,e.style,e),n.style={...r,...n.style}}return n}function Ise(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(a8(n)?Mse:bse)(r,a,s),g={...Ese(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const bD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const xD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function wD(e,t,n,r){SD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(xD.has(i)?i:bD(i),t.attrs[i])}function d8(e){const{style:t}=e,n={};for(const r in t)(Ml(t[r])||aD(r,e))&&(n[r]=t[r]);return n}function CD(e){const t=d8(e);for(const n in e)if(Ml(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function f8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Ev=e=>Array.isArray(e),Ose=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),_D=e=>Ev(e)?e[e.length-1]||0:e;function $3(e){const t=Ml(e)?e.get():e;return Ose(t)?t.toValue():t}function Rse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Nse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const kD=e=>(t,n)=>{const r=C.exports.useContext(cb),i=C.exports.useContext(l1),o=()=>Rse(e,t,r,i);return n?o():hb(o)};function Nse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=$3(o[m]);let{initial:a,animate:s}=e;const l=fb(e),u=iD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!db(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=f8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Dse={useVisualState:kD({scrapeMotionValuesFromProps:CD,createRenderState:yD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}c8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),wD(t,n)}})},zse={useVisualState:kD({scrapeMotionValuesFromProps:d8,createRenderState:u8})};function Bse(e,{forwardMotionProps:t=!1},n,r,i){return{...a8(e)?Dse:zse,preloadedFeatures:n,useRender:Ise(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function pb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return pb(i,t,n,r)},[e,t,n,r])}function Fse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};fC(t,"focus",e?r:void 0),fC(t,"blur",e?i:void 0)}function ED(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function PD(e){return!!e.touches}function $se(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Hse={pageX:0,pageY:0};function Wse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Hse;return{x:r[t+"X"],y:r[t+"Y"]}}function Vse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function h8(e,t="page"){return{point:PD(e)?Wse(e,t):Vse(e,t)}}const TD=(e,t=!1)=>{const n=r=>e(r,h8(r));return t?$se(n):n},Use=()=>ph&&window.onpointerdown===null,Gse=()=>ph&&window.ontouchstart===null,jse=()=>ph&&window.onmousedown===null,Yse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},qse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function LD(e){return Use()?e:Gse()?qse[e]:jse()?Yse[e]:e}function x0(e,t,n,r){return pb(e,LD(t),TD(n,t==="pointerdown"),r)}function U5(e,t,n,r){return fC(e,LD(t),n&&TD(n,t==="pointerdown"),r)}function AD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zT=AD("dragHorizontal"),BT=AD("dragVertical");function MD(e){let t=!1;if(e==="y")t=BT();else if(e==="x")t=zT();else{const n=zT(),r=BT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ID(){const e=MD(!0);return e?(e(),!1):!0}function FT(e,t,n){return(r,i)=>{!ED(r)||ID()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function Kse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){U5(r,"pointerenter",e||n?FT(r,!0,e):void 0,{passive:!e}),U5(r,"pointerleave",t||n?FT(r,!1,t):void 0,{passive:!t})}const OD=(e,t)=>t?e===t?!0:OD(e,t.parentElement):!1;function p8(e){return C.exports.useEffect(()=>()=>e(),[])}function RD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Gx=.001,Zse=.01,$T=10,Qse=.05,Jse=1;function ele({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Xse(e<=$T*1e3);let a=1-t;a=j5(Qse,Jse,a),e=j5(Zse,$T,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=hC(u,a),b=Math.exp(-g);return Gx-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=hC(Math.pow(u,2),a);return(-i(u)+Gx>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Gx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=nle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const tle=12;function nle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ole(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!HT(e,ile)&&HT(e,rle)){const n=ele(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function g8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=RD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ole(o),v=WT,b=WT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=hC(T,k);v=O=>{const R=Math.exp(-k*T*O);return n-R*((E+k*T*P)/M*Math.sin(M*O)+P*Math.cos(M*O))},b=O=>{const R=Math.exp(-k*T*O);return k*T*R*(Math.sin(M*O)*(E+k*T*P)/M+P*Math.cos(M*O))-R*(Math.cos(M*O)*(E+k*T*P)-M*P*Math.sin(M*O))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*T*O),N=Math.min(M*O,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}g8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const WT=e=>0,Pv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function jx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function VT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=jx(l,s,e+1/3),o=jx(l,s,e),a=jx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const ale=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},sle=[cC,Vc,Ff],UT=e=>sle.find(t=>t.test(e)),ND=(e,t)=>{let n=UT(e),r=UT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=VT(i),n=Vc),r===Ff&&(o=VT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=ale(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},pC=e=>typeof e=="number",lle=(e,t)=>n=>t(e(n)),gb=(...e)=>e.reduce(lle);function DD(e,t){return pC(e)?n=>Cr(e,t,n):Qi.test(e)?ND(e,t):BD(e,t)}const zD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>DD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=DD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function GT(e){const t=_u.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=_u.createTransformer(t),r=GT(e),i=GT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?gb(zD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},cle=(e,t)=>n=>Cr(e,t,n);function dle(e){if(typeof e=="number")return cle;if(typeof e=="string")return Qi.test(e)?ND:BD;if(Array.isArray(e))return zD;if(typeof e=="object")return ule}function fle(e,t,n){const r=[],i=n||dle(e[0]),o=e.length-1;for(let a=0;an(Pv(e,t,r))}function ple(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Pv(e[o],e[o+1],i);return t[o](s)}}function FD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;G5(o===t.length),G5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=fle(t,r,i),s=o===2?hle(e,a):ple(e,a);return n?l=>s(j5(e[0],e[o-1],l)):s}const mb=e=>t=>1-e(1-t),m8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gle=e=>t=>Math.pow(t,e),$D=e=>t=>t*t*((e+1)*t-e),mle=e=>{const t=$D(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},HD=1.525,vle=4/11,yle=8/11,ble=9/10,v8=e=>e,y8=gle(2),Sle=mb(y8),WD=m8(y8),VD=e=>1-Math.sin(Math.acos(e)),b8=mb(VD),xle=m8(b8),S8=$D(HD),wle=mb(S8),Cle=m8(S8),_le=mle(HD),kle=4356/361,Ele=35442/1805,Ple=16061/1805,Y5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Y5(1-e*2)):.5*Y5(e*2-1)+.5;function Ale(e,t){return e.map(()=>t||WD).splice(0,e.length-1)}function Mle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Ile(e,t){return e.map(n=>n*t)}function H3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Ile(r&&r.length===a.length?r:Mle(a),i);function l(){return FD(s,a,{ease:Array.isArray(n)?n:Ale(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ole({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const jT={keyframes:H3,spring:g8,decay:Ole};function Rle(e){if(Array.isArray(e.to))return H3;if(jT[e.type])return jT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?H3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?g8:H3}const UD=1/60*1e3,Nle=typeof performance<"u"?()=>performance.now():()=>Date.now(),GD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Nle()),UD);function Dle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Dle(()=>Tv=!0),e),{}),Ble=Jv.reduce((e,t)=>{const n=vb[t];return e[t]=(r,i=!1,o=!1)=>(Tv||Hle(),n.schedule(r,i,o)),e},{}),Fle=Jv.reduce((e,t)=>(e[t]=vb[t].cancel,e),{});Jv.reduce((e,t)=>(e[t]=()=>vb[t].process(w0),e),{});const $le=e=>vb[e].process(w0),jD=e=>{Tv=!1,w0.delta=gC?UD:Math.max(Math.min(e-w0.timestamp,zle),1),w0.timestamp=e,mC=!0,Jv.forEach($le),mC=!1,Tv&&(gC=!1,GD(jD))},Hle=()=>{Tv=!0,gC=!0,mC||GD(jD)},Wle=()=>w0;function YD(e,t,n=0){return e-t-n}function Vle(e,t,n=0,r=!0){return r?YD(t+-e,t,n):t-(e-t)+n}function Ule(e,t,n,r){return r?e>=t+n:e<=-n}const Gle=e=>{const t=({delta:n})=>e(n);return{start:()=>Ble.update(t,!0),stop:()=>Fle.update(t)}};function qD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Gle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=RD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,O=!1,R=!0,N;const z=Rle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=FD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(R=k%2===0,a=Vle(a,T,u,R)):(a=YD(a,T,u),l==="mirror"&&V.flipTarget()),O=!1,v&&v()}function j(){P.stop(),m&&m()}function ue(Q){if(R||(Q=-Q),a+=Q,!O){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),O=R?ne.done:a<=0}b?.(M),O&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function KD(e,t){return t?e*(1e3/t):0}function jle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(M),(O=T.onUpdate)===null||O===void 0||O.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),O=M===n?-1:1;let R,N;const z=V=>{R=N,N=V,t=KD(V-R,Wle().delta),(O===1&&V>M||O===-1&&Vb?.stop()}}const vC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),YT=e=>vC(e)&&e.hasOwnProperty("z"),Dy=(e,t)=>Math.abs(e-t);function x8(e,t){if(pC(e)&&pC(t))return Dy(e,t);if(vC(e)&&vC(t)){const n=Dy(e.x,t.x),r=Dy(e.y,t.y),i=YT(e)&&YT(t)?Dy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const XD=(e,t)=>1-3*t+3*e,ZD=(e,t)=>3*t-6*e,QD=e=>3*e,q5=(e,t,n)=>((XD(t,n)*e+ZD(t,n))*e+QD(t))*e,JD=(e,t,n)=>3*XD(t,n)*e*e+2*ZD(t,n)*e+QD(t),Yle=1e-7,qle=10;function Kle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=q5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Yle&&++s=Zle?Qle(a,g,e,n):m===0?g:Kle(a,s,s+zy,e,n)}return a=>a===0||a===1?a:q5(o(a),t,r)}function eue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!ID()}function g(b,w){!h()||(OD(i.current,b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=gb(x0(window,"pointerup",g,l),x0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(b,w))}U5(i,"pointerdown",o?v:void 0,l),p8(u)}const tue="production",ez=typeof process>"u"||process.env===void 0?tue:"production",qT=new Set;function tz(e,t,n){e||qT.has(t)||(console.warn(t),n&&console.warn(n),qT.add(t))}const yC=new WeakMap,Yx=new WeakMap,nue=e=>{const t=yC.get(e.target);t&&t(e)},rue=e=>{e.forEach(nue)};function iue({root:e,...t}){const n=e||document;Yx.has(n)||Yx.set(n,{});const r=Yx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(rue,{root:e,...t})),r[i]}function oue(e,t,n){const r=iue(t);return yC.set(e,n),r.observe(e),()=>{yC.delete(e),r.unobserve(e)}}function aue({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?uue:lue)(a,o.current,e,i)}const sue={some:0,all:1};function lue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:sue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return oue(n.current,s,l)},[e,r,i,o])}function uue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(ez!=="production"&&tz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),cue={inView:Uc(aue),tap:Uc(eue),focus:Uc(Fse),hover:Uc(Kse)};function w8(){const e=C.exports.useContext(l1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function due(){return fue(C.exports.useContext(l1))}function fue(e){return e===null?!0:e.isPresent}function nz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,hue={linear:v8,easeIn:y8,easeInOut:WD,easeOut:Sle,circIn:VD,circInOut:xle,circOut:b8,backIn:S8,backInOut:Cle,backOut:wle,anticipate:_le,bounceIn:Tle,bounceInOut:Lle,bounceOut:Y5},KT=e=>{if(Array.isArray(e)){G5(e.length===4);const[t,n,r,i]=e;return Jle(t,n,r,i)}else if(typeof e=="string")return hue[e];return e},pue=e=>Array.isArray(e)&&typeof e[0]!="number",XT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&_u.test(t)&&!t.startsWith("url(")),yf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),By=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qx=()=>({type:"keyframes",ease:"linear",duration:.3}),gue=e=>({type:"keyframes",duration:.8,values:e}),ZT={x:yf,y:yf,z:yf,rotate:yf,rotateX:yf,rotateY:yf,rotateZ:yf,scaleX:By,scaleY:By,scale:By,opacity:qx,backgroundColor:qx,color:qx,default:By},mue=(e,t)=>{let n;return Ev(t)?n=gue:n=ZT[e]||ZT.default,{to:t,...n(t)}},vue={...gD,color:Qi,backgroundColor:Qi,outlineColor:Qi,fill:Qi,stroke:Qi,borderColor:Qi,borderTopColor:Qi,borderRightColor:Qi,borderBottomColor:Qi,borderLeftColor:Qi,filter:dC,WebkitFilter:dC},C8=e=>vue[e];function _8(e,t){var n;let r=C8(e);return r!==dC&&(r=_u),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const yue={current:!1},rz=1/60*1e3,bue=typeof performance<"u"?()=>performance.now():()=>Date.now(),iz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(bue()),rz);function Sue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Sue(()=>Lv=!0),e),{}),Ps=e2.reduce((e,t)=>{const n=yb[t];return e[t]=(r,i=!1,o=!1)=>(Lv||Cue(),n.schedule(r,i,o)),e},{}),ah=e2.reduce((e,t)=>(e[t]=yb[t].cancel,e),{}),Kx=e2.reduce((e,t)=>(e[t]=()=>yb[t].process(C0),e),{}),wue=e=>yb[e].process(C0),oz=e=>{Lv=!1,C0.delta=bC?rz:Math.max(Math.min(e-C0.timestamp,xue),1),C0.timestamp=e,SC=!0,e2.forEach(wue),SC=!1,Lv&&(bC=!1,iz(oz))},Cue=()=>{Lv=!0,bC=!0,SC||iz(oz)},xC=()=>C0;function az(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Ps.read(r,!0),()=>ah.read(r)}function _ue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function kue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=K5(o.duration)),o.repeatDelay&&(a.repeatDelay=K5(o.repeatDelay)),e&&(a.ease=pue(e)?e.map(KT):KT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Eue(e,t){var n,r;return(r=(n=(k8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Pue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Tue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Pue(t),_ue(e)||(e={...e,...mue(n,t.to)}),{...t,...kue(e)}}function Lue(e,t,n,r,i){const o=k8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=XT(e,n);a==="none"&&s&&typeof n=="string"?a=_8(e,n):QT(a)&&typeof n=="string"?a=JT(n):!Array.isArray(n)&&QT(n)&&typeof a=="string"&&(n=JT(a));const l=XT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?jle({...g,...o}):qD({...Tue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=_D(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function QT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function JT(e){return typeof e=="number"?0:_8("",e)}function k8(e,t){return e[t]||e.default||e}function E8(e,t,n,r={}){return yue.current&&(r={type:!1}),t.start(i=>{let o;const a=Lue(e,t,n,r,i),s=Eue(r,e),l=()=>o=a();let u;return s?u=az(l,K5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Aue=e=>/^\-?\d*\.?\d+$/.test(e),Mue=e=>/^0[^.\s]+$/.test(e);function P8(e,t){e.indexOf(t)===-1&&e.push(t)}function T8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $m{constructor(){this.subscriptions=[]}add(t){return P8(this.subscriptions,t),()=>T8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Oue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new $m,this.velocityUpdateSubscribers=new $m,this.renderSubscribers=new $m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=xC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ps.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Ps.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Iue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?KD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function U0(e){return new Oue(e)}const sz=e=>t=>t.test(e),Rue={test:e=>e==="auto",parse:e=>e},lz=[gh,wt,El,Lc,lse,sse,Rue],Hg=e=>lz.find(sz(e)),Nue=[...lz,Qi,_u],Due=e=>Nue.find(sz(e));function zue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Bue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function bb(e,t,n){const r=e.getProps();return f8(r,t,n!==void 0?n:r.custom,zue(e),Bue(e))}function Fue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,U0(n))}function $ue(e,t){const n=bb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=_D(o[a]);Fue(e,a,s)}}function Hue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;swC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=wC(e,t,n);else{const i=typeof t=="function"?bb(e,t,n.custom):t;r=uz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function wC(e,t,n={}){var r;const i=bb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>uz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Gue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function uz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Yue(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&u1.has(m)&&(w={...w,type:!1,delay:0});let E=E8(m,v,b,w);X5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&$ue(e,s)})}function Gue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(jue).forEach((u,h)=>{a.push(wC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function jue(e,t){return e.sortNodePosition(t)}function Yue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const L8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],que=[...L8].reverse(),Kue=L8.length;function Xue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Uue(e,n,r)))}function Zue(e){let t=Xue(e);const n=Jue();let r=!0;const i=(l,u)=>{const h=bb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const j=Array.isArray(O)?O:[O];let ue=j.reduce(i,{});N===!1&&(ue={});const{prevResolvedValues:W={}}=M,Q={...W,...ue},ne=J=>{$=!0,b.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=ue[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Ev(K)&&Ev(G)?!nz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):b.add(J):K!==void 0&&b.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=O,M.prevResolvedValues=ue,M.isActive&&(w={...w,...ue}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Que(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nz(t,e):!1}function bf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jue(){return{[Yn.Animate]:bf(!0),[Yn.InView]:bf(),[Yn.Hover]:bf(),[Yn.Tap]:bf(),[Yn.Drag]:bf(),[Yn.Focus]:bf(),[Yn.Exit]:bf()}}const ece={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Zue(e)),db(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=w8(),o=C.exports.useContext(l1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class cz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=x8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=xC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Xx(h,this.transformPagePoint),ED(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Ps.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Zx(Xx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},PD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=h8(t),o=Xx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=xC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Zx(o,this.history)),this.removeListeners=gb(x0(window,"pointermove",this.handlePointerMove),x0(window,"pointerup",this.handlePointerUp),x0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Xx(e,t){return t?{point:t(e.point)}:e}function eL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx({point:e},t){return{point:e,delta:eL(e,dz(t)),offset:eL(e,tce(t)),velocity:nce(t,.1)}}function tce(e){return e[0]}function dz(e){return e[e.length-1]}function nce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=dz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>K5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fa(e){return e.max-e.min}function tL(e,t=0,n=.01){return x8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function oL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function oce(e,{top:t,left:n,bottom:r,right:i}){return{x:oL(e.x,n,i),y:oL(e.y,t,r)}}function aL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pv(t.min,t.max-r,e.min):r>i&&(n=Pv(e.min,e.max-i,t.min)),j5(0,1,n)}function lce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const CC=.35;function uce(e=CC){return e===!1?e=0:e===!0&&(e=CC),{x:sL(e,"left","right"),y:sL(e,"top","bottom")}}function sL(e,t,n){return{min:lL(e,t),max:lL(e,n)}}function lL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const uL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vm=()=>({x:uL(),y:uL()}),cL=()=>({min:0,max:0}),Zr=()=>({x:cL(),y:cL()});function cl(e){return[e("x"),e("y")]}function fz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function cce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qx(e){return e===void 0||e===1}function _C({scale:e,scaleX:t,scaleY:n}){return!Qx(e)||!Qx(t)||!Qx(n)}function kf(e){return _C(e)||hz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function hz(e){return dL(e.x)||dL(e.y)}function dL(e){return e&&e!=="0%"}function Z5(e,t,n){const r=e-n,i=t*r;return n+i}function fL(e,t,n,r,i){return i!==void 0&&(e=Z5(e,i,r)),Z5(e,n,r)+t}function kC(e,t=0,n=1,r,i){e.min=fL(e.min,t,n,r,i),e.max=fL(e.max,t,n,r,i)}function pz(e,{x:t,y:n}){kC(e.x,t.translate,t.scale,t.originPoint),kC(e.y,n.translate,n.scale,n.originPoint)}function fce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(h8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=MD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(El.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=fa(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=yce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new cz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Fy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=ice(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oce(r.layoutBox,t):this.constraints=!1,this.elastic=uce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=lce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=gce(r,i.root,this.visualElement.getTransformPagePoint());let a=ace(i.layout.layoutBox,o);if(n){const s=n(cce(a));this.hasMutatedConstraints=!!s,s&&(a=fz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Fy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return E8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Fy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=sce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Fy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;mce.set(this.visualElement,this);const n=this.visualElement.current,r=x0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=pb(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=CC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Fy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function bce(e){const{dragControls:t,visualElement:n}=e,r=hb(()=>new vce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Sce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(i8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new cz(h,l,{transformPagePoint:s})}U5(i,"pointerdown",o&&u),p8(()=>a.current&&a.current.end())}const xce={pan:Uc(Sce),drag:Uc(bce)};function EC(e){return typeof e=="string"&&e.startsWith("var(--")}const mz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wce(e){const t=mz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function PC(e,t,n=1){const[r,i]=wce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():EC(i)?PC(i,t,n+1):i}function Cce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!EC(o))return;const a=PC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!EC(o))continue;const a=PC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ce=new Set(["width","height","top","left","right","bottom","x","y"]),vz=e=>_ce.has(e),kce=e=>Object.keys(e).some(vz),yz=(e,t)=>{e.set(t,!1),e.set(t)},pL=e=>e===gh||e===wt;var gL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(gL||(gL={}));const mL=(e,t)=>parseFloat(e.split(", ")[t]),vL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return mL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?mL(o[1],e):0}},Ece=new Set(["x","y","z"]),Pce=W5.filter(e=>!Ece.has(e));function Tce(e){const t=[];return Pce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const yL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:vL(4,13),y:vL(5,14)},Lce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=yL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);yz(h,s[u]),e[u]=yL[u](l,o)}),e},Ace=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(vz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Hg(h);const m=t[l];let v;if(Ev(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Hg(h);for(let E=w;E=0?window.pageYOffset:null,u=Lce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Mce(e,t,n,r){return kce(t)?Ace(e,t,n,r):{target:t,transitionEnd:r}}const Ice=(e,t,n,r)=>{const i=Cce(e,t,r);return t=i.target,r=i.transitionEnd,Mce(e,t,n,r)},TC={current:null},bz={current:!1};function Oce(){if(bz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>TC.current=e.matches;e.addListener(t),t()}else TC.current=!1}function Rce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ml(o))e.addValue(i,o),X5(r)&&r.add(i);else if(Ml(a))e.addValue(i,U0(o)),X5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,U0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Sz=Object.keys(_v),Nce=Sz.length,bL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ps.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=fb(n),this.isVariantNode=iD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Ml(g)&&(g.set(a[h],!1),X5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),bz.current||Oce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:TC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=u1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ps.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=U0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=f8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ml(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $m),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const xz=["initial",...L8],zce=xz.length;class wz extends Dce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=Vue(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Hue(this,r,a);const s=Ice(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Bce(e){return window.getComputedStyle(e)}class Fce extends wz{readValueFromInstance(t,n){if(u1.has(n)){const r=C8(n);return r&&r.default||0}else{const r=Bce(t),i=(sD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gz(t,n)}build(t,n,r,i){l8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return d8(t)}renderInstance(t,n,r,i){SD(t,n,r,i)}}class $ce extends wz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return u1.has(n)?((r=C8(n))===null||r===void 0?void 0:r.default)||0:(n=xD.has(n)?n:bD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return CD(t)}build(t,n,r,i){c8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){wD(t,n,r,i)}}const Hce=(e,t)=>a8(e)?new $ce(t,{enableHardwareAcceleration:!1}):new Fce(t,{enableHardwareAcceleration:!0});function SL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=SL(e,t.target.x),r=SL(e,t.target.y);return`${n}% ${r}%`}},xL="_$css",Wce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(mz,v=>(o.push(v),xL)));const a=_u.parse(e);if(a.length>5)return r;const s=_u.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(xL,()=>{const b=o[v];return v++,b})}return m}};class Vce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;tse(Gce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ps.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Uce(e){const[t,n]=w8(),r=C.exports.useContext(o8);return x(Vce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(oD),isPresent:t,safeToRemove:n})}const Gce={borderRadius:{...Wg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wg,borderTopRightRadius:Wg,borderBottomLeftRadius:Wg,borderBottomRightRadius:Wg,boxShadow:Wce},jce={measureLayout:Uce};function Yce(e,t,n={}){const r=Ml(e)?e:U0(e);return E8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Cz=["TopLeft","TopRight","BottomLeft","BottomRight"],qce=Cz.length,wL=e=>typeof e=="string"?parseFloat(e):e,CL=e=>typeof e=="number"||wt.test(e);function Kce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Xce(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,Zce(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Pv(e,t,r))}function kL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){kL(e.x,t.x),kL(e.y,t.y)}function EL(e,t,n,r,i){return e-=t,e=Z5(e,1/n,r),i!==void 0&&(e=Z5(e,1/i,r)),e}function Qce(e,t=0,n=1,r=.5,i,o=e,a=e){if(El.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=EL(e.min,t,n,s,i),e.max=EL(e.max,t,n,s,i)}function PL(e,t,[n,r,i],o,a){Qce(e,t[n],t[r],t[i],t.scale,o,a)}const Jce=["x","scaleX","originX"],ede=["y","scaleY","originY"];function TL(e,t,n,r){PL(e.x,t,Jce,n?.x,r?.x),PL(e.y,t,ede,n?.y,r?.y)}function LL(e){return e.translate===0&&e.scale===1}function kz(e){return LL(e.x)&&LL(e.y)}function Ez(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function AL(e){return fa(e.x)/fa(e.y)}function tde(e,t,n=.1){return x8(e,t)<=n}class nde{constructor(){this.members=[]}add(t){P8(this.members,t),t.scheduleRender()}remove(t){if(T8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ML(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const rde=(e,t)=>e.depth-t.depth;class ide{constructor(){this.children=[],this.isDirty=!1}add(t){P8(this.children,t),this.isDirty=!0}remove(t){T8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rde),this.isDirty=!1,this.children.forEach(t)}}const IL=["","X","Y","Z"],OL=1e3;let ode=0;function Pz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=ode++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(cde),this.nodes.forEach(dde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=az(v,250),zm.hasAnimatedSinceResize&&(zm.hasAnimatedSinceResize=!1,this.nodes.forEach(NL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:mde,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Ez(this.targetLayout,w)||b,V=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...k8(O,"layout"),onPlay:R,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&NL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(fde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;DL(v.x,a.x,M),DL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Wm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pde(this.relativeTarget,this.relativeTargetOrigin,b,M)),w&&(this.animationValues=m,Kce(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ps.update(()=>{zm.hasAnimatedSinceResize=!0,this.currentAnimation=Yce(0,OL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,OL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Tz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=fa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=fa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),e0(s,h),Hm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new nde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(RL),this.root.sharedNodes.clear()}}}function ade(e){e.updateLayout()}function sde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(b);b.min=o[v].min,b.max=b.min+w}):Tz(s,i.layoutBox,o)&&cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(o[v]);b.max=b.min+w});const u=Vm();Hm(u,o,i.layoutBox);const h=Vm();l?Hm(h,e.applyTransform(a,!0),i.measuredBox):Hm(h,o,i.layoutBox);const g=!kz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:w}=v;if(b&&w){const E=Zr();Wm(E,i.layoutBox,b.layoutBox);const P=Zr();Wm(P,o,w.layoutBox),Ez(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function lde(e){e.clearSnapshot()}function RL(e){e.clearMeasurements()}function ude(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function NL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function cde(e){e.resolveTargetDelta()}function dde(e){e.calcProjection()}function fde(e){e.resetRotation()}function hde(e){e.removeLeadSnapshot()}function DL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function pde(e,t,n,r){zL(e.x,t.x,n.x,r),zL(e.y,t.y,n.y,r)}function gde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mde={duration:.45,ease:[.4,0,.1,1]};function vde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function BL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function yde(e){BL(e.x),BL(e.y)}function Tz(e,t,n){return e==="position"||e==="preserve-aspect"&&!tde(AL(t),AL(n),.2)}const bde=Pz({attachResizeListener:(e,t)=>pb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jx={current:void 0},Sde=Pz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jx.current){const e=new bde(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Jx.current=e}return Jx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),xde={...ece,...cue,...xce,...jce},zl=Jae((e,t)=>Bse(e,t,xde,Hce,Sde));function Lz(){const e=C.exports.useRef(!1);return $5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wde(){const e=Lz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Ps.postRender(r),[r]),t]}class Cde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _de({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(Cde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const ew=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=hb(kde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(_de,{isPresent:n,children:e})),x(l1.Provider,{value:u,children:e})};function kde(){return new Map}const Fp=e=>e.key||"";function Ede(e,t){e.forEach(n=>{const r=Fp(n);t.set(r,n)})}function Pde(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",tz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=wde();const l=C.exports.useContext(o8).forceRender;l&&(s=l);const u=Lz(),h=Pde(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if($5(()=>{w.current=!1,Ede(h,b),v.current=g}),p8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Wn,{children:g.map(T=>x(ew,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Fp(T)))});g=[...g];const E=v.current.map(Fp),P=h.map(Fp),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=b.get(T);if(!M)return;const O=E.indexOf(T),R=()=>{b.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(ew,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Fp(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(ew,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Fp(T))}),ez!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Wn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var vl=function(){return vl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function LC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Tde(){return!1}var Lde=e=>{const{condition:t,message:n}=e;t&&Tde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Vg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function AC(e){switch(e?.direction??"right"){case"right":return Vg.slideRight;case"left":return Vg.slideLeft;case"bottom":return Vg.slideDown;case"top":return Vg.slideUp;default:return Vg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ts={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Ade=e=>e!=null&&parseInt(e.toString(),10)>0,$L={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Mde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Ade(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ts.exit($L.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ts.enter($L.enter,i)})},Mz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Lde({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(zl.div,{ref:t,...g,className:t2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Mde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Mz.displayName="Collapse";var Ide={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ts.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ts.exit(Xf.exit,n),transitionEnd:t?.exit})},Iz={initial:"exit",animate:"enter",exit:"exit",variants:Ide},Ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(zl.div,{ref:n,className:t2("chakra-fade",o),custom:m,...Iz,animate:h,...u})})});Ode.displayName="Fade";var Rde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ts.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ts.enter(Xf.enter,n),transitionEnd:e?.enter})},Oz={initial:"exit",animate:"enter",exit:"exit",variants:Rde},Nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:b,children:m&&ae.createElement(zl.div,{ref:n,className:t2("chakra-offset-slide",s),...Oz,animate:v,custom:b,...g})})});Nde.displayName="ScaleFade";var HL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Dde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=AC({direction:e});return{...i,transition:t?.exit??Ts.exit(HL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=AC({direction:e});return{...i,transition:n?.enter??Ts.enter(HL.enter,r),transitionEnd:t?.enter}}},Rz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=AC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(zl.div,{...m,ref:n,initial:"exit",className:t2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Dde,style:b,...g})})});Rz.displayName="Slide";var zde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ts.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ts.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ts.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},MC={initial:"initial",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(zl.div,{ref:n,className:t2("chakra-offset-slide",a),custom:w,...MC,animate:b,...m})})});Bde.displayName="SlideFade";var n2=(...e)=>e.filter(Boolean).join(" ");function Fde(){return!1}var Sb=e=>{const{condition:t,message:n}=e;t&&Fde()&&console.warn(n)};function tw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[$de,xb]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Hde,A8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Wde,pTe,Vde,Ude]=nD(),Hf=ke(function(t,n){const{getButtonProps:r}=A8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...xb().button};return ae.createElement(Se.button,{...i,className:n2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Gde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;qde(e),Kde(e);const s=Vde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=ub({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[jde,M8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=M8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Xde(e);const{register:m,index:v,descendants:b}=Ude({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Zde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=b.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=b.prevEnabled(v);j?.node.focus()},Home:()=>{const j=b.firstEnabled();j?.node.focus()},End:()=>{const j=b.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Hn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:tw(V.onClick,T),onFocus:tw(V.onFocus,O),onKeyDown:tw(V.onKeyDown,M)}},[h,t,w,T,O,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function qde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;Sb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Kde(e){Sb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Xde(e){Sb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function Zde(e){Sb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=A8(),{reduceMotion:r}=M8(),i=n2("chakra-accordion__icon",e.className),o=xb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=ke(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yde(t),l={...xb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(Hde,{value:u},ae.createElement(Se.div,{ref:n,...o,className:n2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=ke(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=M8(),{getPanelProps:s,isOpen:l}=A8(),u=s(o,n),h=n2("chakra-accordion__panel",r),g=xb();a||delete u.hidden;const m=ae.createElement(Se.div,{...u,__css:g.panel,className:h});return a?m:x(Mz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var wb=ke(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Gde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Wde,{value:l},ae.createElement(jde,{value:h},ae.createElement($de,{value:o},ae.createElement(Se.div,{ref:i,...s,className:n2("chakra-accordion",r.className),__css:o.root},t))))});wb.displayName="Accordion";var Qde=(...e)=>e.filter(Boolean).join(" "),Jde=bd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),r2=ke((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Qde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Jde} ${o} linear infinite`,...n};return ae.createElement(Se.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(Se.span,{srOnly:!0},r))});r2.displayName="Spinner";var Cb=(...e)=>e.filter(Boolean).join(" ");function efe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function tfe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function WL(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[nfe,rfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ife,I8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Nz={info:{icon:tfe,colorScheme:"blue"},warning:{icon:WL,colorScheme:"orange"},success:{icon:efe,colorScheme:"green"},error:{icon:WL,colorScheme:"red"},loading:{icon:r2,colorScheme:"blue"}};function ofe(e){return Nz[e].colorScheme}function afe(e){return Nz[e].icon}var Dz=ke(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??ofe(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(nfe,{value:{status:r}},ae.createElement(ife,{value:s},ae.createElement(Se.div,{role:i?"alert":void 0,ref:n,...o,className:Cb("chakra-alert",t.className),__css:l})))});Dz.displayName="Alert";var zz=ke(function(t,n){const i={display:"inline",...I8().description};return ae.createElement(Se.div,{ref:n,...t,className:Cb("chakra-alert__desc",t.className),__css:i})});zz.displayName="AlertDescription";function Bz(e){const{status:t}=rfe(),n=afe(t),r=I8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(Se.span,{display:"inherit",...e,className:Cb("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Bz.displayName="AlertIcon";var Fz=ke(function(t,n){const r=I8();return ae.createElement(Se.div,{ref:n,...t,className:Cb("chakra-alert__title",t.className),__css:r.title})});Fz.displayName="AlertTitle";function sfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function lfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return ks(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ufe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",Q5=ke(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});Q5.displayName="NativeImage";var _b=ke(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=lfe({...t,ignoreFallback:E}),k=ufe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:sfe(b,["onError","onLoad"])};return k?i||ae.createElement(Se.img,{as:Q5,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(Se.img,{as:Q5,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});_b.displayName="Image";ke((e,t)=>ae.createElement(Se.img,{ref:t,as:Q5,className:"chakra-image",...e}));function kb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var Eb=(...e)=>e.filter(Boolean).join(" "),VL=e=>e?"":void 0,[cfe,dfe]=_n({strict:!1,name:"ButtonGroupContext"});function IC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Eb("chakra-button__icon",n);return ae.createElement(Se.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}IC.displayName="ButtonIcon";function OC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(r2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=Eb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(Se.div,{className:l,...s,__css:h},i)}OC.displayName="ButtonSpinner";function ffe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=ke((e,t)=>{const n=dfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=vn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=ffe(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(Se.button,{disabled:i||o,ref:Rae(t,T),as:E,type:m??M,"data-active":VL(a),"data-loading":VL(o),__css:k,className:Eb("chakra-button",w),...P},o&&b==="start"&&x(OC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(Se.span,{opacity:0},x(UL,{...O})):x(UL,{...O}),o&&b==="end"&&x(OC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function UL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Wn,{children:[t&&x(IC,{marginEnd:i,children:t}),r,n&&x(IC,{marginStart:i,children:n})]})}var ia=ke(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=Eb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(cfe,{value:m},ae.createElement(Se.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=ke((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var f1=(...e)=>e.filter(Boolean).join(" "),$y=e=>e?"":void 0,nw=e=>e?!0:void 0;function GL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hfe,$z]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[pfe,h1]=_n({strict:!1,name:"FormControlContext"});function gfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Hn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":$y(E),"data-disabled":$y(i),"data-invalid":$y(r),"data-readonly":$y(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Hn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:R}}var xd=ke(function(t,n){const r=Oi("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=gfe(i),l=f1("chakra-form-control",t.className);return ae.createElement(pfe,{value:s},ae.createElement(hfe,{value:r},ae.createElement(Se.div,{...o({},n),className:l,__css:r.container})))});xd.displayName="FormControl";var mfe=ke(function(t,n){const r=h1(),i=$z(),o=f1("chakra-form__helper-text",t.className);return ae.createElement(Se.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});mfe.displayName="FormHelperText";function O8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=R8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":nw(n),"aria-required":nw(i),"aria-readonly":nw(r)}}function R8(e){const t=h1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:GL(t?.onFocus,h),onBlur:GL(t?.onBlur,g)}}var[vfe,yfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),bfe=ke((e,t)=>{const n=Oi("FormError",e),r=vn(e),i=h1();return i?.isInvalid?ae.createElement(vfe,{value:n},ae.createElement(Se.div,{...i?.getErrorMessageProps(r,t),className:f1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});bfe.displayName="FormErrorMessage";var Sfe=ke((e,t)=>{const n=yfe(),r=h1();if(!r?.isInvalid)return null;const i=f1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Sfe.displayName="FormErrorIcon";var mh=ke(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Hz,{}),optionalIndicator:l=null,...u}=i,h=h1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(Se.label,{...g,className:f1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Hz=ke(function(t,n){const r=h1(),i=$z();if(!r?.isRequired)return null;const o=f1("chakra-form__required-indicator",t.className);return ae.createElement(Se.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Hz.displayName="RequiredIndicator";function ud(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var N8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},xfe=Se("span",{baseStyle:N8});xfe.displayName="VisuallyHidden";var wfe=Se("input",{baseStyle:N8});wfe.displayName="VisuallyHiddenInput";var jL=!1,Pb=null,G0=!1,RC=new Set,Cfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function _fe(e){return!(e.metaKey||!Cfe&&e.altKey||e.ctrlKey)}function D8(e,t){RC.forEach(n=>n(e,t))}function YL(e){G0=!0,_fe(e)&&(Pb="keyboard",D8("keyboard",e))}function Ep(e){Pb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(G0=!0,D8("pointer",e))}function kfe(e){e.target===window||e.target===document||(G0||(Pb="keyboard",D8("keyboard",e)),G0=!1)}function Efe(){G0=!1}function qL(){return Pb!=="pointer"}function Pfe(){if(typeof window>"u"||jL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){G0=!0,e.apply(this,n)},document.addEventListener("keydown",YL,!0),document.addEventListener("keyup",YL,!0),window.addEventListener("focus",kfe,!0),window.addEventListener("blur",Efe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Ep,!0),document.addEventListener("pointermove",Ep,!0),document.addEventListener("pointerup",Ep,!0)):(document.addEventListener("mousedown",Ep,!0),document.addEventListener("mousemove",Ep,!0),document.addEventListener("mouseup",Ep,!0)),jL=!0}function Tfe(e){Pfe(),e(qL());const t=()=>e(qL());return RC.add(t),()=>{RC.delete(t)}}var[gTe,Lfe]=_n({name:"CheckboxGroupContext",strict:!1}),Afe=(...e)=>e.filter(Boolean).join(" "),Zi=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Mfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ife(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Ofe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Rfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Ofe:Ife;return n||t?ae.createElement(Se.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Wz(e={}){const t=R8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...O}=e,R=Nfe(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Tfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Me]=C.exports.useState(!!h),xe=g!==void 0,be=xe?g:me,Ie=C.exports.useCallback(Ee=>{if(r||n){Ee.preventDefault();return}xe||Me(be?Ee.target.checked:b?!0:Ee.target.checked),N?.(Ee)},[r,n,be,xe,b,N]);ks(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),ud(()=>{n&&W(!1)},[n,W]),ks(()=>{const Ee=G.current;!Ee?.form||(Ee.form.onreset=()=>{Me(!!h)})},[]);const We=n&&!m,De=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!0)},[K]),Qe=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!1)},[K]);ks(()=>{if(!G.current)return;G.current.checked!==be&&Me(G.current.checked)},[G.current]);const st=C.exports.useCallback((Ee={},Je=null)=>{const Lt=it=>{ue&&it.preventDefault(),K(!0)};return{...Ee,ref:Je,"data-active":Zi(J),"data-hover":Zi(Q),"data-checked":Zi(be),"data-focus":Zi(ue),"data-focus-visible":Zi(ue&&$),"data-indeterminate":Zi(b),"data-disabled":Zi(n),"data-invalid":Zi(o),"data-readonly":Zi(r),"aria-hidden":!0,onMouseDown:Ta(Ee.onMouseDown,Lt),onMouseUp:Ta(Ee.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Ee.onMouseEnter,()=>ne(!0)),onMouseLeave:Ta(Ee.onMouseLeave,()=>ne(!1))}},[J,be,n,ue,$,Q,b,o,r]),Ct=C.exports.useCallback((Ee={},Je=null)=>({...R,...Ee,ref:Hn(Je,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:Ta(Ee.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[R,n,be,o,X]),ft=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Hn(G,Je),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ta(Ee.onChange,Ie),onBlur:Ta(Ee.onBlur,z,()=>W(!1)),onFocus:Ta(Ee.onFocus,V,()=>W(!0)),onKeyDown:Ta(Ee.onKeyDown,De),onKeyUp:Ta(Ee.onKeyUp,Qe),required:i,checked:be,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:N8}),[w,E,a,Ie,z,V,De,Qe,i,be,We,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Je,onMouseDown:Ta(Ee.onMouseDown,KL),onTouchStart:Ta(Ee.onTouchStart,KL),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:ue,isChecked:be,isActive:J,isHovered:Q,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ct,getCheckboxProps:st,getInputProps:ft,getLabelProps:ut,htmlProps:R}}function KL(e){e.preventDefault(),e.stopPropagation()}var Dfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},zfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Bfe=bd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ffe=bd({from:{opacity:0},to:{opacity:1}}),$fe=bd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Vz=ke(function(t,n){const r=Lfe(),i={...r,...t},o=Oi("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Rfe,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Mfe(r.onChange,w));const{state:M,getInputProps:O,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Wz({...P,isDisabled:b,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ffe} 20ms linear, ${$fe} 200ms linear`:`${Bfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(Se.label,{__css:{...zfe,...o.container},className:Afe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),ae.createElement(Se.span,{__css:{...Dfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&ae.createElement(Se.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Vz.displayName="Checkbox";function Hfe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Tb=ke(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(Se.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Hfe,{width:"1em",height:"1em"}))});Tb.displayName="CloseButton";function Wfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function z8(e,t){let n=Wfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function NC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function J5(e,t,n){return(e-t)*100/(n-t)}function Uz(e,t,n){return(n-t)*e+t}function DC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=NC(n);return z8(r,i)}function _0(e,t,n){return e==null?e:(nr==null?"":rw(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=Gz(Ac(v),o),w=n??b,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=_0(j,a,s)),z8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=rw(r,o,n)??a,E($)},[r,n,o,E,a]),O=C.exports.useCallback($=>{const j=rw($,o,w)??a;E(j)},[w,o,E,a]),R=Ac(v);return{isOutOfRange:R>s||Rx(ob,{styles:jz}),Gfe=()=>x(ob,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${jz} - `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function jfe(e){return"current"in e}var Yz=()=>typeof window<"u";function Yfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var qfe=e=>Yz()&&e.test(navigator.vendor),Kfe=e=>Yz()&&e.test(Yfe()),Xfe=()=>Kfe(/mac|iphone|ipad|ipod/i),Zfe=()=>Xfe()&&qfe(/apple/i);function Qfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!Zfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=jfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Jfe=HJ?C.exports.useLayoutEffect:C.exports.useEffect;function XL(e,t=[]){const n=C.exports.useRef(e);return Jfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ehe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function the(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Av(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=XL(n),a=XL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ehe(r,s),g=the(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:WJ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function B8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var F8=ke(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=vn(i),s=O8(a),l=Nr("chakra-input",t.className);return ae.createElement(Se.input,{size:r,...s,__css:o.field,ref:n,className:l})});F8.displayName="Input";F8.id="Input";var[nhe,qz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),rhe=ke(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=kb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=B8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(Se.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(nhe,{value:r,children:g}))});rhe.displayName="InputGroup";var ihe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},ohe=Se("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),$8=ke(function(t,n){const{placement:r="left",...i}=t,o=ihe[r]??{},a=qz();return x(ohe,{ref:n,...i,__css:{...a.addon,...o}})});$8.displayName="InputAddon";var Kz=ke(function(t,n){return x($8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});Kz.displayName="InputLeftAddon";Kz.id="InputLeftAddon";var Xz=ke(function(t,n){return x($8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});Xz.displayName="InputRightAddon";Xz.id="InputRightAddon";var ahe=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Lb=ke(function(t,n){const{placement:r="left",...i}=t,o=qz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(ahe,{ref:n,__css:l,...i})});Lb.id="InputElement";Lb.displayName="InputElement";var Zz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(Lb,{ref:n,placement:"left",className:o,...i})});Zz.id="InputLeftElement";Zz.displayName="InputLeftElement";var Qz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(Lb,{ref:n,placement:"right",className:o,...i})});Qz.id="InputRightElement";Qz.displayName="InputRightElement";function she(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function cd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):she(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var lhe=ke(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(Se.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:cd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});lhe.displayName="AspectRatio";var uhe=ke(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return ae.createElement(Se.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});uhe.displayName="Badge";var Bl=Se("div");Bl.displayName="Box";var Jz=ke(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Bl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Jz.displayName="Square";var che=ke(function(t,n){const{size:r,...i}=t;return x(Jz,{size:r,ref:n,borderRadius:"9999px",...i})});che.displayName="Circle";var eB=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});eB.displayName="Center";var dhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ke(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(Se.div,{ref:n,__css:dhe[r],...i,position:"absolute"})});var fhe=ke(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return ae.createElement(Se.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});fhe.displayName="Code";var hhe=ke(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});hhe.displayName="Container";var phe=ke(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(Se.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});phe.displayName="Divider";var en=ke(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(Se.div,{ref:n,__css:g,...h})});en.displayName="Flex";var tB=ke(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(Se.div,{ref:n,__css:w,...b})});tB.displayName="Grid";function ZL(e){return cd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ghe=ke(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=B8({gridArea:r,gridColumn:ZL(i),gridRow:ZL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(Se.div,{ref:n,__css:g,...h})});ghe.displayName="GridItem";var Qf=ke(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return ae.createElement(Se.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";ke(function(t,n){const r=so("Mark",t),i=vn(t);return x(Bl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var mhe=ke(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return ae.createElement(Se.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});mhe.displayName="Kbd";var Jf=ke(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return ae.createElement(Se.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";ke(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(Se.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[vhe,nB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),H8=ke(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=kb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(vhe,{value:r},ae.createElement(Se.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});H8.displayName="List";var yhe=ke((e,t)=>{const{as:n,...r}=e;return x(H8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});yhe.displayName="OrderedList";var bhe=ke(function(t,n){const{as:r,...i}=t;return x(H8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});bhe.displayName="UnorderedList";var She=ke(function(t,n){const r=nB();return ae.createElement(Se.li,{ref:n,...t,__css:r.item})});She.displayName="ListItem";var xhe=ke(function(t,n){const r=nB();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});xhe.displayName="ListIcon";var whe=ke(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=s1(),h=s?_he(s,u):khe(r);return x(tB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});whe.displayName="SimpleGrid";function Che(e){return typeof e=="number"?`${e}px`:e}function _he(e,t){return cd(e,n=>{const r=Cae("sizes",n,Che(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function khe(e){return cd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var rB=Se("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});rB.displayName="Spacer";var zC="& > *:not(style) ~ *:not(style)";function Ehe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[zC]:cd(n,i=>r[i])}}function Phe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":cd(n,i=>r[i])}}var iB=e=>ae.createElement(Se.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});iB.displayName="StackItem";var W8=ke((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Ehe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Phe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=kb(l);return P?M:M.map((O,R)=>{const N=typeof O.key<"u"?O.key:R,z=R+1===M.length,$=g?x(iB,{children:O},N):O;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),ue=z?null:j;return ee(C.exports.Fragment,{children:[$,ue]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(Se.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[zC]:b[zC]},...m},k)});W8.displayName="Stack";var oB=ke((e,t)=>x(W8,{align:"center",...e,direction:"row",ref:t}));oB.displayName="HStack";var aB=ke((e,t)=>x(W8,{align:"center",...e,direction:"column",ref:t}));aB.displayName="VStack";var Po=ke(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=B8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(Se.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function QL(e){return typeof e=="number"?`${e}px`:e}var The=ke(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>cd(w,k=>QL(j6("space",k)(P))),"--chakra-wrap-y-spacing":P=>cd(E,k=>QL(j6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(sB,{children:w},E)):a,[a,g]);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(Se.ul,{className:"chakra-wrap__list",__css:v},b))});The.displayName="Wrap";var sB=ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});sB.displayName="WrapItem";var Lhe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},lB=Lhe,Pp=()=>{},Ahe={document:lB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Pp,removeEventListener:Pp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Pp,removeListener:Pp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Pp,setInterval:()=>0,clearInterval:Pp},Mhe=Ahe,Ihe={window:Mhe,document:lB},uB=typeof window<"u"?{window,document}:Ihe,cB=C.exports.createContext(uB);cB.displayName="EnvironmentContext";function dB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:uB},[r,n]);return ee(cB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}dB.displayName="EnvironmentProvider";var Ohe=e=>e?"":void 0;function Rhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function iw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Nhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Rhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&iw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),ue=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Hn(t,M);return w?{...b,ref:J,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:J,role:"button","data-active":Ohe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:N,onMouseDown:ue,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function fB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function hB(e){if(!fB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Dhe(e){var t;return((t=pB(e))==null?void 0:t.defaultView)??window}function pB(e){return fB(e)?e.ownerDocument:document}function zhe(e){return pB(e).activeElement}var gB=e=>e.hasAttribute("tabindex"),Bhe=e=>gB(e)&&e.tabIndex===-1;function Fhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function mB(e){return e.parentElement&&mB(e.parentElement)?!0:e.hidden}function $he(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function vB(e){if(!hB(e)||mB(e)||Fhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():$he(e)?!0:gB(e)}function Hhe(e){return e?hB(e)&&vB(e)&&!Bhe(e):!1}var Whe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Vhe=Whe.join(),Uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function yB(e){const t=Array.from(e.querySelectorAll(Vhe));return t.unshift(e),t.filter(n=>vB(n)&&Uhe(n))}function Ghe(e){const t=e.current;if(!t)return!1;const n=zhe(t);return!n||t.contains(n)?!1:!!Hhe(n)}function jhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ud(()=>{if(!o||Ghe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Yhe={preventScroll:!0,shouldFocus:!1};function qhe(e,t=Yhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Khe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);ks(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=yB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ud(()=>{h()},[h]),Zf(a,"transitionend",h)}function Khe(e){return"current"in e}var Oo="top",Ua="bottom",Ga="right",Ro="left",V8="auto",i2=[Oo,Ua,Ga,Ro],j0="start",Mv="end",Xhe="clippingParents",bB="viewport",Ug="popper",Zhe="reference",JL=i2.reduce(function(e,t){return e.concat([t+"-"+j0,t+"-"+Mv])},[]),SB=[].concat(i2,[V8]).reduce(function(e,t){return e.concat([t,t+"-"+j0,t+"-"+Mv])},[]),Qhe="beforeRead",Jhe="read",epe="afterRead",tpe="beforeMain",npe="main",rpe="afterMain",ipe="beforeWrite",ope="write",ape="afterWrite",spe=[Qhe,Jhe,epe,tpe,npe,rpe,ipe,ope,ape];function Il(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Ba(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function U8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ba(o)||!Il(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function upe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Ba(i)||!Il(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const cpe={name:"applyStyles",enabled:!0,phase:"write",fn:lpe,effect:upe,requires:["computeStyles"]};function Pl(e){return e.split("-")[0]}var eh=Math.max,e4=Math.min,Y0=Math.round;function BC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function xB(){return!/^((?!chrome|android).)*safari/i.test(BC())}function q0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ba(e)&&(i=e.offsetWidth>0&&Y0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Y0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!xB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function G8(e){var t=q0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function wB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&U8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ku(e){return Ya(e).getComputedStyle(e)}function dpe(e){return["table","td","th"].indexOf(Il(e))>=0}function wd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ab(e){return Il(e)==="html"?e:e.assignedSlot||e.parentNode||(U8(e)?e.host:null)||wd(e)}function eA(e){return!Ba(e)||ku(e).position==="fixed"?null:e.offsetParent}function fpe(e){var t=/firefox/i.test(BC()),n=/Trident/i.test(BC());if(n&&Ba(e)){var r=ku(e);if(r.position==="fixed")return null}var i=Ab(e);for(U8(i)&&(i=i.host);Ba(i)&&["html","body"].indexOf(Il(i))<0;){var o=ku(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function o2(e){for(var t=Ya(e),n=eA(e);n&&dpe(n)&&ku(n).position==="static";)n=eA(n);return n&&(Il(n)==="html"||Il(n)==="body"&&ku(n).position==="static")?t:n||fpe(e)||t}function j8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Um(e,t,n){return eh(e,e4(t,n))}function hpe(e,t,n){var r=Um(e,t,n);return r>n?n:r}function CB(){return{top:0,right:0,bottom:0,left:0}}function _B(e){return Object.assign({},CB(),e)}function kB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ppe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,_B(typeof t!="number"?t:kB(t,i2))};function gpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Pl(n.placement),l=j8(s),u=[Ro,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ppe(i.padding,n),m=G8(o),v=l==="y"?Oo:Ro,b=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=o2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+T,N=Um(M,R,O),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function mpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!wB(t.elements.popper,i)||(t.elements.arrow=i))}const vpe={name:"arrow",enabled:!0,phase:"main",fn:gpe,effect:mpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K0(e){return e.split("-")[1]}var ype={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bpe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Y0(t*i)/i||0,y:Y0(n*i)/i||0}}function tA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Ro,M=Oo,O=window;if(u){var R=o2(n),N="clientHeight",z="clientWidth";if(R===Ya(n)&&(R=wd(n),ku(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Oo||(i===Ro||i===Ga)&&o===Mv){M=Ua;var V=g&&R===O&&O.visualViewport?O.visualViewport.height:R[N];w-=V-r.height,w*=l?1:-1}if(i===Ro||(i===Oo||i===Ua)&&o===Mv){T=Ga;var $=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&ype),ue=h===!0?bpe({x:v,y:w}):{x:v,y:w};if(v=ue.x,w=ue.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Spe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Pl(t.placement),variation:K0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const xpe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Spe,data:{}};var Hy={passive:!0};function wpe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Hy)}),s&&l.addEventListener("resize",n.update,Hy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Hy)}),s&&l.removeEventListener("resize",n.update,Hy)}}const Cpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wpe,data:{}};var _pe={left:"right",right:"left",bottom:"top",top:"bottom"};function V3(e){return e.replace(/left|right|bottom|top/g,function(t){return _pe[t]})}var kpe={start:"end",end:"start"};function nA(e){return e.replace(/start|end/g,function(t){return kpe[t]})}function Y8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function q8(e){return q0(wd(e)).left+Y8(e).scrollLeft}function Epe(e,t){var n=Ya(e),r=wd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=xB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+q8(e),y:l}}function Ppe(e){var t,n=wd(e),r=Y8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+q8(e),l=-r.scrollTop;return ku(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function K8(e){var t=ku(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function EB(e){return["html","body","#document"].indexOf(Il(e))>=0?e.ownerDocument.body:Ba(e)&&K8(e)?e:EB(Ab(e))}function Gm(e,t){var n;t===void 0&&(t=[]);var r=EB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],K8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Gm(Ab(a)))}function FC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Tpe(e,t){var n=q0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rA(e,t,n){return t===bB?FC(Epe(e,n)):sh(t)?Tpe(t,n):FC(Ppe(wd(e)))}function Lpe(e){var t=Gm(Ab(e)),n=["absolute","fixed"].indexOf(ku(e).position)>=0,r=n&&Ba(e)?o2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&wB(i,r)&&Il(i)!=="body"}):[]}function Ape(e,t,n,r){var i=t==="clippingParents"?Lpe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=rA(e,u,r);return l.top=eh(h.top,l.top),l.right=e4(h.right,l.right),l.bottom=e4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},rA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function PB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Pl(r):null,o=r?K0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Oo:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Ro:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?j8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case j0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Mv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Iv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Xhe:s,u=n.rootBoundary,h=u===void 0?bB:u,g=n.elementContext,m=g===void 0?Ug:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=_B(typeof E!="number"?E:kB(E,i2)),k=m===Ug?Zhe:Ug,T=e.rects.popper,M=e.elements[b?k:m],O=Ape(sh(M)?M:M.contextElement||wd(e.elements.popper),l,h,a),R=q0(e.elements.reference),N=PB({reference:R,element:T,strategy:"absolute",placement:i}),z=FC(Object.assign({},T,N)),V=m===Ug?z:R,$={top:O.top-V.top+P.top,bottom:V.bottom-O.bottom+P.bottom,left:O.left-V.left+P.left,right:V.right-O.right+P.right},j=e.modifiersData.offset;if(m===Ug&&j){var ue=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Oo,Ua].indexOf(W)>=0?"y":"x";$[W]+=ue[ne]*Q})}return $}function Mpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?SB:l,h=K0(r),g=h?s?JL:JL.filter(function(b){return K0(b)===h}):i2,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=Iv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Pl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ipe(e){if(Pl(e)===V8)return[];var t=V3(e);return[nA(e),t,nA(t)]}function Ope(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Pl(E),k=P===E,T=l||(k||!b?[V3(E)]:Ipe(E)),M=[E].concat(T).reduce(function(be,Ie){return be.concat(Pl(Ie)===V8?Mpe(t,{placement:Ie,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):Ie)},[]),O=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Iv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Ro:W?Ua:Oo;O[ne]>R[ne]&&(K=V3(K));var G=V3(K),X=[];if(o&&X.push(J[ue]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(be){return be})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=b?3:1,me=function(Ie){var We=M.find(function(De){var Qe=N.get(De);if(Qe)return Qe.slice(0,Ie).every(function(st){return st})});if(We)return V=We,"break"},Me=ce;Me>0;Me--){var xe=me(Me);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Rpe={name:"flip",enabled:!0,phase:"main",fn:Ope,requiresIfExists:["offset"],data:{_skip:!1}};function iA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function oA(e){return[Oo,Ga,Ua,Ro].some(function(t){return e[t]>=0})}function Npe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Iv(t,{elementContext:"reference"}),s=Iv(t,{altBoundary:!0}),l=iA(a,r),u=iA(s,i,o),h=oA(l),g=oA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Dpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Npe};function zpe(e,t,n){var r=Pl(e),i=[Ro,Oo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ro,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Bpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=SB.reduce(function(h,g){return h[g]=zpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Fpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bpe};function $pe(e){var t=e.state,n=e.name;t.modifiersData[n]=PB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Hpe={name:"popperOffsets",enabled:!0,phase:"read",fn:$pe,data:{}};function Wpe(e){return e==="x"?"y":"x"}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=Iv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Pl(t.placement),k=K0(t.placement),T=!k,M=j8(P),O=Wpe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ue={x:0,y:0};if(!!R){if(o){var W,Q=M==="y"?Oo:Ro,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=R[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===j0?N[J]:z[J],Me=k===j0?-z[J]:-N[J],xe=t.elements.arrow,be=v&&xe?G8(xe):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:CB(),We=Ie[Q],De=Ie[ne],Qe=Um(0,N[J],be[J]),st=T?N[J]/2-ce-Qe-We-$.mainAxis:me-Qe-We-$.mainAxis,Ct=T?-N[J]/2+ce+Qe+De+$.mainAxis:Me+Qe+De+$.mainAxis,ft=t.elements.arrow&&o2(t.elements.arrow),ut=ft?M==="y"?ft.clientTop||0:ft.clientLeft||0:0,vt=(W=j?.[M])!=null?W:0,Ee=K+st-vt-ut,Je=K+Ct-vt,Lt=Um(v?e4(G,Ee):G,K,v?eh(X,Je):X);R[M]=Lt,ue[M]=Lt-K}if(s){var it,pt=M==="x"?Oo:Ro,an=M==="x"?Ua:Ga,_t=R[O],Ut=O==="y"?"height":"width",sn=_t+E[pt],yn=_t-E[an],Oe=[Oo,Ro].indexOf(P)!==-1,Xe=(it=j?.[O])!=null?it:0,Xt=Oe?sn:_t-N[Ut]-z[Ut]-Xe+$.altAxis,Yt=Oe?_t+N[Ut]+z[Ut]-Xe-$.altAxis:yn,_e=v&&Oe?hpe(Xt,_t,Yt):Um(v?Xt:sn,_t,v?Yt:yn);R[O]=_e,ue[O]=_e-_t}t.modifiersData[r]=ue}}const Upe={name:"preventOverflow",enabled:!0,phase:"main",fn:Vpe,requiresIfExists:["offset"]};function Gpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jpe(e){return e===Ya(e)||!Ba(e)?Y8(e):Gpe(e)}function Ype(e){var t=e.getBoundingClientRect(),n=Y0(t.width)/e.offsetWidth||1,r=Y0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qpe(e,t,n){n===void 0&&(n=!1);var r=Ba(t),i=Ba(t)&&Ype(t),o=wd(t),a=q0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Il(t)!=="body"||K8(o))&&(s=jpe(t)),Ba(t)?(l=q0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=q8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Kpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Xpe(e){var t=Kpe(e);return spe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Zpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qpe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var aA={placement:"bottom",modifiers:[],strategy:"absolute"};function sA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Tp("--popper-arrow-shadow-color"),arrowSize:Tp("--popper-arrow-size","8px"),arrowSizeHalf:Tp("--popper-arrow-size-half"),arrowBg:Tp("--popper-arrow-bg"),transformOrigin:Tp("--popper-transform-origin"),arrowOffset:Tp("--popper-arrow-offset")};function n0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var r0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},i0e=e=>r0e[e],lA={scroll:!0,resize:!0};function o0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...lA,...e}}:t={enabled:e,options:lA},t}var a0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},s0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{uA(e)},effect:({state:e})=>()=>{uA(e)}},uA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,i0e(e.placement))},l0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{u0e(e)}},u0e=e=>{var t;if(!e.placement)return;const n=c0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},c0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},d0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{cA(e)},effect:({state:e})=>()=>{cA(e)}},cA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:n0e(e.placement)})},f0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},h0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function p0e(e,t="ltr"){var n;const r=((n=f0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:h0e[e]??r}function TB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=p0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!b.current||!w.current||(($=k.current)==null||$.call(k),E.current=t0e(b.current,w.current,{placement:P,modifiers:[d0e,l0e,s0e,{...a0e,enabled:!!m},{name:"eventListeners",...o0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!b.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{b.current=$,T()},[T]),O=C.exports.useCallback(($={},j=null)=>({...$,ref:Hn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Hn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:ue,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:g0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:O}}function g0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function LB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function m0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Dhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function AB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[v0e,y0e]=_n({strict:!1,name:"PortalManagerContext"});function MB(e){const{children:t,zIndex:n}=e;return x(v0e,{value:{zIndex:n},children:t})}MB.displayName="PortalManager";var[IB,b0e]=_n({strict:!1,name:"PortalContext"}),X8="chakra-portal",S0e=".chakra-portal",x0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),w0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=b0e(),l=y0e();ks(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=X8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(x0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Dl.exports.createPortal(x(IB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},C0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=X8),l},[i]),[,s]=C.exports.useState({});return ks(()=>s({}),[]),ks(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Dl.exports.createPortal(x(IB,{value:r?a:null,children:t}),a):null};function vh(e){const{containerRef:t,...n}=e;return t?x(C0e,{containerRef:t,...n}):x(w0e,{...n})}vh.defaultProps={appendToParentPortal:!0};vh.className=X8;vh.selector=S0e;vh.displayName="Portal";var _0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lp=new WeakMap,Wy=new WeakMap,Vy={},ow=0,OB=function(e){return e&&(e.host||OB(e.parentNode))},k0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=OB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},E0e=function(e,t,n,r){var i=k0e(t,Array.isArray(e)?e:[e]);Vy[n]||(Vy[n]=new WeakMap);var o=Vy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Lp.get(m)||0)+1,E=(o.get(m)||0)+1;Lp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&Wy.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),ow++,function(){a.forEach(function(g){var m=Lp.get(g)-1,v=o.get(g)-1;Lp.set(g,m),o.set(g,v),m||(Wy.has(g)||g.removeAttribute(r),Wy.delete(g)),v||g.removeAttribute(n)}),ow--,ow||(Lp=new WeakMap,Lp=new WeakMap,Wy=new WeakMap,Vy={})}},RB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||_0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),E0e(r,i,n,"aria-hidden")):function(){return null}};function Z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},P0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T0e=P0e,L0e=T0e;function NB(){}function DB(){}DB.resetWarningCache=NB;var A0e=function(){function e(r,i,o,a,s,l){if(l!==L0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:DB,resetWarningCache:NB};return n.PropTypes=n,n};On.exports=A0e();var $C="data-focus-lock",zB="data-focus-lock-disabled",M0e="data-no-focus-lock",I0e="data-autofocus-inside",O0e="data-no-autofocus";function R0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function N0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function BB(e,t){return N0e(t||null,function(n){return e.forEach(function(r){return R0e(r,n)})})}var aw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function FB(e){return e}function $B(e,t){t===void 0&&(t=FB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function Q8(e,t){return t===void 0&&(t=FB),$B(e,t)}function HB(e){e===void 0&&(e={});var t=$B(null);return t.options=vl({async:!0,ssr:!1},e),t}var WB=function(e){var t=e.sideCar,n=Az(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...vl({},n)})};WB.isSideCarExport=!0;function D0e(e,t){return e.useMedium(t),WB}var VB=Q8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),UB=Q8(),z0e=Q8(),B0e=HB({async:!0}),F0e=[],J8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,O=M===void 0?F0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,ue=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(De){var Qe=u.current;if(Qe&&Qe.focus){var st=typeof j=="function"?j(Qe):j;if(st){var Ct=typeof st=="object"?st:void 0;u.current=null,De?Promise.resolve().then(function(){return Qe.focus(Ct)}):Qe.focus(Ct)}}},[j]),ce=C.exports.useCallback(function(De){l.current&&VB.useMedium(De)},[]),me=UB.useMedium,Me=C.exports.useCallback(function(De){s.current!==De&&(s.current=De,a(De))},[]),xe=Ln((r={},r[zB]=g&&"disabled",r[$C]=E,r),V),be=m!==!0,Ie=be&&m!=="tail",We=BB([n,Me]);return ee(Wn,{children:[be&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:aw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:B0e,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:ue}),x(N,{ref:We,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Ie&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw})]})});J8.propTypes={};J8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const GB=J8;function HC(e,t){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HC(e,t)}function e_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,HC(e,t)}function jB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){e_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return jB(l,"displayName","SideEffect("+n(i)+")"),l}}var Fl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(q0e)},K0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],n_=K0e.join(","),X0e="".concat(n_,", [data-focus-guard]"),tF=function(e,t){var n;return Fl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?X0e:n_)?[i]:[],tF(i))},[])},r_=function(e,t){return e.reduce(function(n,r){return n.concat(tF(r,t),r.parentNode?Fl(r.parentNode.querySelectorAll(n_)).filter(function(i){return i===r}):[])},[])},Z0e=function(e){var t=e.querySelectorAll("[".concat(I0e,"]"));return Fl(t).map(function(n){return r_([n])}).reduce(function(n,r){return n.concat(r)},[])},i_=function(e,t){return Fl(e).filter(function(n){return KB(t,n)}).filter(function(n){return G0e(n)})},dA=function(e,t){return t===void 0&&(t=new Map),Fl(e).filter(function(n){return XB(t,n)})},VC=function(e,t,n){return eF(i_(r_(e,n),t),!0,n)},fA=function(e,t){return eF(i_(r_(e),t),!1)},Q0e=function(e,t){return i_(Z0e(e),t)},Ov=function(e,t){return e.shadowRoot?Ov(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Fl(e.children).some(function(n){return Ov(n,t)})},J0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},nF=function(e){return e.parentNode?nF(e.parentNode):e},o_=function(e){var t=WC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute($C);return n.push.apply(n,i?J0e(Fl(nF(r).querySelectorAll("[".concat($C,'="').concat(i,'"]:not([').concat(zB,'="disabled"])')))):[r]),n},[])},rF=function(e){return e.activeElement?e.activeElement.shadowRoot?rF(e.activeElement.shadowRoot):e.activeElement:void 0},a_=function(){return document.activeElement?document.activeElement.shadowRoot?rF(document.activeElement.shadowRoot):document.activeElement:void 0},e1e=function(e){return e===document.activeElement},t1e=function(e){return Boolean(Fl(e.querySelectorAll("iframe")).some(function(t){return e1e(t)}))},iF=function(e){var t=document&&a_();return!t||t.dataset&&t.dataset.focusGuard?!1:o_(e).some(function(n){return Ov(n,t)||t1e(n)})},n1e=function(){var e=document&&a_();return e?Fl(document.querySelectorAll("[".concat(M0e,"]"))).some(function(t){return Ov(t,e)}):!1},r1e=function(e,t){return t.filter(JB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},s_=function(e,t){return JB(e)&&e.name?r1e(e,t):e},i1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(s_(n,e))}),e.filter(function(n){return t.has(n)})},hA=function(e){return e[0]&&e.length>1?s_(e[0],e):e[0]},pA=function(e,t){return e.length>1?e.indexOf(s_(e[t],e)):t},oF="NEW_FOCUS",o1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=t_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i1e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=pA(e,0),k=pA(e,i-1);if(l===-1||h===-1)return oF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a1e=function(e){return function(t){var n,r=(n=ZB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=dA(r.filter(a1e(n)));return i&&i.length?hA(i):hA(dA(t))},UC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&UC(e.parentNode.host||e.parentNode,t),t},sw=function(e,t){for(var n=UC(e),r=UC(t),i=0;i=0)return o}return!1},aF=function(e,t,n){var r=WC(e),i=WC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=sw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=sw(o,l);u&&(!a||Ov(u,a)?a=u:a=sw(u,a))})}),a},l1e=function(e,t){return e.reduce(function(n,r){return n.concat(Q0e(r,t))},[])},u1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Y0e)},c1e=function(e,t){var n=document&&a_(),r=o_(e).filter(t4),i=aF(n||e,e,r),o=new Map,a=fA(r,o),s=VC(r,o).filter(function(m){var v=m.node;return t4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=fA([i],o).map(function(m){var v=m.node;return v}),u=u1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o1e(h,l,n,t);return g===oF?{node:s1e(a,h,l1e(r,o))}:g===void 0?g:u[g]}},d1e=function(e){var t=o_(e).filter(t4),n=aF(e,e,t),r=new Map,i=VC([n],r,!0),o=VC(t,r).filter(function(a){var s=a.node;return t4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:t_(s)}})},f1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},lw=0,uw=!1,h1e=function(e,t,n){n===void 0&&(n={});var r=c1e(e,t);if(!uw&&r){if(lw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),uw=!0,setTimeout(function(){uw=!1},1);return}lw++,f1e(r.node,n.focusOptions),lw--}};const sF=h1e;function lF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p1e=function(){return document&&document.activeElement===document.body},g1e=function(){return p1e()||n1e()},k0=null,t0=null,E0=null,Rv=!1,m1e=function(){return!0},v1e=function(t){return(k0.whiteList||m1e)(t)},y1e=function(t,n){E0={observerNode:t,portaledElement:n}},b1e=function(t){return E0&&E0.portaledElement===t};function gA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var S1e=function(t){return t&&"current"in t?t.current:t},x1e=function(t){return t?Boolean(Rv):Rv==="meanwhile"},w1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C1e=function(t,n){return n.some(function(r){return w1e(t,r,r)})},n4=function(){var t=!1;if(k0){var n=k0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||E0&&E0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(S1e).filter(Boolean));if((!h||v1e(h))&&(i||x1e(s)||!g1e()||!t0&&o)&&(u&&!(iF(g)||h&&C1e(h,g)||b1e(h))&&(document&&!t0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=sF(g,t0,{focusOptions:l}),E0={})),Rv=!1,t0=document&&document.activeElement),document){var m=document&&document.activeElement,v=d1e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),gA(b,v.length,1,v),gA(b,-1,-1,v))}}}return t},uF=function(t){n4()&&t&&(t.stopPropagation(),t.preventDefault())},l_=function(){return lF(n4)},_1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y1e(r,n)},k1e=function(){return null},cF=function(){Rv="just",setTimeout(function(){Rv="meanwhile"},0)},E1e=function(){document.addEventListener("focusin",uF),document.addEventListener("focusout",l_),window.addEventListener("blur",cF)},P1e=function(){document.removeEventListener("focusin",uF),document.removeEventListener("focusout",l_),window.removeEventListener("blur",cF)};function T1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function L1e(e){var t=e.slice(-1)[0];t&&!k0&&E1e();var n=k0,r=n&&t&&t.id===n.id;k0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(t0=null,(!r||n.observed!==t.observed)&&t.onActivation(),n4(),lF(n4)):(P1e(),t0=null)}VB.assignSyncMedium(_1e);UB.assignMedium(l_);z0e.assignMedium(function(e){return e({moveFocusInside:sF,focusInside:iF})});const A1e=$0e(T1e,L1e)(k1e);var dF=C.exports.forwardRef(function(t,n){return x(GB,{sideCar:A1e,ref:n,...t})}),fF=GB.propTypes||{};fF.sideCar;Z8(fF,["sideCar"]);dF.propTypes={};const M1e=dF;var hF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&yB(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(M1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};hF.displayName="FocusLock";var U3="right-scroll-bar-position",G3="width-before-scroll-bar",I1e="with-scroll-bars-hidden",O1e="--removed-body-scroll-bar-size",pF=HB(),cw=function(){},Mb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:cw,onWheelCapture:cw,onTouchMoveCapture:cw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Az(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=BB([n,t]),O=vl(vl({},k),i);return ee(Wn,{children:[h&&x(T,{sideCar:pF,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),vl(vl({},O),{ref:M})):x(P,{...vl({},O,{className:l,ref:M}),children:s})]})});Mb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mb.classNames={fullWidth:G3,zeroRight:U3};var R1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R1e();return t&&e.setAttribute("nonce",t),e}function D1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N1e())&&(D1e(t,n),z1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F1e=function(){var e=B1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gF=function(){var e=F1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$1e={left:0,top:0,right:0,gap:0},dw=function(e){return parseInt(e||"",10)||0},H1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[dw(n),dw(r),dw(i)]},W1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $1e;var t=H1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V1e=gF(),U1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(I1e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(U3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(G3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(U3," .").concat(U3,` { - right: 0 `).concat(r,`; - } - - .`).concat(G3," .").concat(G3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(O1e,": ").concat(s,`px; - } -`)},G1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W1e(i)},[i]);return x(V1e,{styles:U1e(o,!t,i,n?"":"!important")})},GC=!1;if(typeof window<"u")try{var Uy=Object.defineProperty({},"passive",{get:function(){return GC=!0,!0}});window.addEventListener("test",Uy,Uy),window.removeEventListener("test",Uy,Uy)}catch{GC=!1}var Ap=GC?{passive:!1}:!1,j1e=function(e){return e.tagName==="TEXTAREA"},mF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!j1e(e)&&n[t]==="visible")},Y1e=function(e){return mF(e,"overflowY")},q1e=function(e){return mF(e,"overflowX")},mA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=vF(e,n);if(r){var i=yF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},K1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},X1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vF=function(e,t){return e==="v"?Y1e(t):q1e(t)},yF=function(e,t){return e==="v"?K1e(t):X1e(t)},Z1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q1e=function(e,t,n,r,i){var o=Z1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=yF(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&vF(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Gy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vA=function(e){return[e.deltaX,e.deltaY]},yA=function(e){return e&&"current"in e?e.current:e},J1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ege=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},tge=0,Mp=[];function nge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(tge++)[0],o=C.exports.useState(function(){return gF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=LC([e.lockRef.current],(e.shards||[]).map(yA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Gy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=mA(N,R);if(!z)return!0;if(z?O=N:(O=N==="v"?"h":"v",z=mA(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=O),!O)return!0;var V=r.current||O;return Q1e(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Mp.length||Mp[Mp.length-1]!==o)){var P="deltaY"in E?vA(E):Gy(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J1e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(yA).filter(Boolean).filter(function(O){return O.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Gy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,vA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Gy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Mp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ap),document.addEventListener("touchmove",l,Ap),document.addEventListener("touchstart",h,Ap),function(){Mp=Mp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Ap),document.removeEventListener("touchmove",l,Ap),document.removeEventListener("touchstart",h,Ap)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Wn,{children:[b?x(o,{styles:ege(i)}):null,v?x(G1e,{gapMode:"margin"}):null]})}const rge=D0e(pF,nge);var bF=C.exports.forwardRef(function(e,t){return x(Mb,{...vl({},e,{ref:t,sideCar:rge})})});bF.classNames=Mb.classNames;const SF=bF;var yh=(...e)=>e.filter(Boolean).join(" ");function um(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var ige=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},jC=new ige;function oge(e,t){C.exports.useEffect(()=>(t&&jC.add(e),()=>{jC.remove(e)}),[t,e])}function age(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=lge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");sge(u,t&&a),oge(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),O=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Hn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:um(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!jC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Hn(V,h),onClick:um(z.onClick,R),onKeyDown:um(z.onKeyDown,E),onMouseDown:um(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:N}}function sge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return RB(e.current)},[t,e,n])}function lge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[uge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[cge,dd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),X0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Oi("Modal",e),E={...age(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(cge,{value:E,children:x(uge,{value:b,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(vh,{...t,children:n})})})})};X0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};X0.displayName="Modal";var Nv=ke((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=dd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=yh("chakra-modal__body",n),s=bh();return ae.createElement(Se.div,{ref:t,className:a,id:i,...r,__css:s.body})});Nv.displayName="ModalBody";var u_=ke((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=dd(),a=yh("chakra-modal__close-btn",r),s=bh();return x(Tb,{ref:t,__css:s.closeButton,className:a,onClick:um(n,l=>{l.stopPropagation(),o()}),...i})});u_.displayName="ModalCloseButton";function xF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=dd(),[g,m]=w8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(hF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(SF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var dge={slideInBottom:{...MC,custom:{offsetY:16,reverse:!0}},slideInRight:{...MC,custom:{offsetX:16,reverse:!0}},scale:{...Oz,custom:{initialScale:.95,reverse:!0}},none:{}},fge=Se(zl.section),hge=e=>dge[e||"none"],wF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=hge(n),...i}=e;return x(fge,{ref:t,...r,...i})});wF.displayName="ModalTransition";var Dv=ke((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=dd(),u=s(a,t),h=l(i),g=yh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=dd();return ae.createElement(xF,null,ae.createElement(Se.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(wF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Dv.displayName="ModalContent";var Ib=ke((e,t)=>{const{className:n,...r}=e,i=yh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(Se.footer,{ref:t,...r,__css:a,className:i})});Ib.displayName="ModalFooter";var Ob=ke((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=dd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=yh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(Se.header,{ref:t,className:a,id:i,...r,__css:l})});Ob.displayName="ModalHeader";var pge=Se(zl.div),Z0=ke((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=yh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=dd();return x(pge,{...i||(u==="none"?{}:Iz),__css:l,ref:t,className:a,...o})});Z0.displayName="ModalOverlay";function CF(e){const{leastDestructiveRef:t,...n}=e;return x(X0,{...n,initialFocusRef:t})}var _F=ke((e,t)=>x(Dv,{ref:t,role:"alertdialog",...e})),[mTe,gge]=_n(),mge=Se(Rz),vge=ke((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=dd(),h=s(a,t),g=l(o),m=yh("chakra-modal__content",n),v=bh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=gge();return ae.createElement(xF,null,ae.createElement(Se.div,{...g,className:"chakra-modal__content-container",__css:w},x(mge,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});vge.displayName="DrawerContent";function yge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var kF=(...e)=>e.filter(Boolean).join(" "),fw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var bge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),Sge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function bA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var xge=50,SA=300;function wge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);yge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?xge:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},SA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},SA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Cge=/^[Ee0-9+\-.]$/;function _ge(e){return Cge.test(e)}function kge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Ege(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:O,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...ue}=e,W=dr(O),Q=dr(R),ne=dr(N),J=dr(V??_ge),K=dr(z),G=Vfe(e),{update:X,increment:ce,decrement:me}=G,[Me,xe]=C.exports.useState(!1),be=!(s||l),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useRef(null),st=C.exports.useCallback(_e=>_e.split("").filter(J).join(""),[J]),Ct=C.exports.useCallback(_e=>j?.(_e)??_e,[j]),ft=C.exports.useCallback(_e=>($?.(_e)??_e).toString(),[$]);ud(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Ie.current)return;if(Ie.current.value!=G.value){const It=Ct(Ie.current.value);G.setValue(st(It))}},[Ct,st]);const ut=C.exports.useCallback((_e=a)=>{be&&ce(_e)},[ce,be,a]),vt=C.exports.useCallback((_e=a)=>{be&&me(_e)},[me,be,a]),Ee=wge(ut,vt);bA(De,"disabled",Ee.stop,Ee.isSpinning),bA(Qe,"disabled",Ee.stop,Ee.isSpinning);const Je=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;const ze=Ct(_e.currentTarget.value);X(st(ze)),We.current={start:_e.currentTarget.selectionStart,end:_e.currentTarget.selectionEnd}},[X,st,Ct]),Lt=C.exports.useCallback(_e=>{var It;W?.(_e),We.current&&(_e.target.selectionStart=We.current.start??((It=_e.currentTarget.value)==null?void 0:It.length),_e.currentTarget.selectionEnd=We.current.end??_e.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;kge(_e,J)||_e.preventDefault();const It=pt(_e)*a,ze=_e.key,ln={ArrowUp:()=>ut(It),ArrowDown:()=>vt(It),Home:()=>X(i),End:()=>X(o)}[ze];ln&&(_e.preventDefault(),ln(_e))},[J,a,ut,vt,X,i,o]),pt=_e=>{let It=1;return(_e.metaKey||_e.ctrlKey)&&(It=.1),_e.shiftKey&&(It=10),It},an=C.exports.useMemo(()=>{const _e=K?.(G.value);if(_e!=null)return _e;const It=G.value.toString();return It||void 0},[G.value,K]),_t=C.exports.useCallback(()=>{let _e=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(_e=o),G.cast(_e))},[G,o,i]),Ut=C.exports.useCallback(()=>{xe(!1),n&&_t()},[n,xe,_t]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var _e;(_e=Ie.current)==null||_e.focus()})},[t]),yn=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.up(),sn()},[sn,Ee]),Oe=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.down(),sn()},[sn,Ee]);Zf(()=>Ie.current,"wheel",_e=>{var It;const ot=(((It=Ie.current)==null?void 0:It.ownerDocument)??document).activeElement===Ie.current;if(!v||!ot)return;_e.preventDefault();const ln=pt(_e)*a,zn=Math.sign(_e.deltaY);zn===-1?ut(ln):zn===1&&vt(ln)},{passive:!1});const Xe=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMax;return{..._e,ref:Hn(It,De),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||yn(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMax,r,yn,Ee.stop,l]),Xt=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMin;return{..._e,ref:Hn(It,Qe),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMin,r,Oe,Ee.stop,l]),Yt=C.exports.useCallback((_e={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:b,disabled:l,..._e,readOnly:_e.readOnly??s,"aria-readonly":_e.readOnly??s,"aria-required":_e.required??u,required:_e.required??u,ref:Hn(Ie,It),value:ft(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":fw(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:al(_e.onChange,Je),onKeyDown:al(_e.onKeyDown,it),onFocus:al(_e.onFocus,Lt,()=>xe(!0)),onBlur:al(_e.onBlur,Q,Ut)}),[P,m,g,M,T,ft,k,b,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,Je,it,Lt,Q,Ut]);return{value:ft(G.value),valueAsNumber:G.valueAsNumber,isFocused:Me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Xe,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:ue}}var[Pge,Rb]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Tge,c_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),d_=ke(function(t,n){const r=Oi("NumberInput",t),i=vn(t),o=R8(i),{htmlProps:a,...s}=Ege(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Tge,{value:l},ae.createElement(Pge,{value:r},ae.createElement(Se.div,{...a,ref:n,className:kF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});d_.displayName="NumberInput";var EF=ke(function(t,n){const r=Rb();return ae.createElement(Se.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});EF.displayName="NumberInputStepper";var f_=ke(function(t,n){const{getInputProps:r}=c_(),i=r(t,n),o=Rb();return ae.createElement(Se.input,{...i,className:kF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});f_.displayName="NumberInputField";var PF=Se("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),h_=ke(function(t,n){const r=Rb(),{getDecrementButtonProps:i}=c_(),o=i(t,n);return x(PF,{...o,__css:r.stepper,children:t.children??x(bge,{})})});h_.displayName="NumberDecrementStepper";var p_=ke(function(t,n){const{getIncrementButtonProps:r}=c_(),i=r(t,n),o=Rb();return x(PF,{...i,__css:o.stepper,children:t.children??x(Sge,{})})});p_.displayName="NumberIncrementStepper";var a2=(...e)=>e.filter(Boolean).join(" ");function Lge(e,...t){return Age(e)?e(...t):e}var Age=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Mge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Ige,Sh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Oge,s2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Ip={click:"click",hover:"hover"};function Rge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Ip.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=LB(e),M=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,ue]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(Je=>`${Je}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Me,forceUpdate:xe}=TB({...w,enabled:E||!!b}),be=m0e({isOpen:E,ref:R});Qfe({enabled:E,ref:O}),jhe(R,{focusRef:O,visible:E,shouldFocus:o&&u===Ip.click}),qhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===Ip.click});const Ie=AB({wasSelected:z.current,enabled:m,mode:v,isSelected:be.present}),We=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,style:{...Je.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Hn(R,Lt),children:Ie?Je.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(Je.onKeyDown,pt=>{n&&pt.key==="Escape"&&P()}),onBlur:sl(Je.onBlur,pt=>{const an=xA(pt),_t=hw(R.current,an),Ut=hw(O.current,an);E&&t&&(!_t&&!Ut)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Ip.hover&&(it.role="tooltip",it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(Je.onMouseLeave,pt=>{pt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Ie,J,V,K,j,G,u,n,P,E,t,g,l,s]),De=C.exports.useCallback((Je={},Lt=null)=>me({...Je,style:{visibility:E?"visible":"hidden",...Je.style}},Lt),[E,me]),Qe=C.exports.useCallback((Je,Lt=null)=>({...Je,ref:Hn(Lt,M,X)}),[M,X]),st=C.exports.useRef(),Ct=C.exports.useRef(),ft=C.exports.useCallback(Je=>{M.current==null&&X(Je)},[X]),ut=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,ref:Hn(O,Lt,ft),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Ip.click&&(it.onClick=sl(Je.onClick,T)),u===Ip.hover&&(it.onFocus=sl(Je.onFocus,()=>{st.current===void 0&&k()}),it.onBlur=sl(Je.onBlur,pt=>{const an=xA(pt),_t=!hw(R.current,an);E&&t&&_t&&P()}),it.onKeyDown=sl(Je.onKeyDown,pt=>{pt.key==="Escape"&&P()}),it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0,st.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(Je.onMouseLeave,()=>{N.current=!1,st.current&&(clearTimeout(st.current),st.current=void 0),Ct.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,ft,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{st.current&&clearTimeout(st.current),Ct.current&&clearTimeout(Ct.current)},[]);const vt=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:K,ref:Hn(Lt,it=>{$(!!it)})}),[K]),Ee=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:G,ref:Hn(Lt,it=>{ue(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:be.onComplete,onClose:P,getAnchorProps:Qe,getArrowProps:ce,getArrowInnerProps:Me,getPopoverPositionerProps:De,getPopoverProps:We,getTriggerProps:ut,getHeaderProps:vt,getBodyProps:Ee}}function hw(e,t){return e===t||e?.contains(t)}function xA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function g_(e){const t=Oi("Popover",e),{children:n,...r}=vn(e),i=s1(),o=Rge({...r,direction:i.direction});return x(Ige,{value:o,children:x(Oge,{value:t,children:Lge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}g_.displayName="Popover";function m_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=Sh(),a=s2(),s=t??n??r;return ae.createElement(Se.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(Se.div,{className:a2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}m_.displayName="PopoverArrow";var Nge=ke(function(t,n){const{getBodyProps:r}=Sh(),i=s2();return ae.createElement(Se.div,{...r(t,n),className:a2("chakra-popover__body",t.className),__css:i.body})});Nge.displayName="PopoverBody";var Dge=ke(function(t,n){const{onClose:r}=Sh(),i=s2();return x(Tb,{size:"sm",onClick:r,className:a2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Dge.displayName="PopoverCloseButton";function zge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Bge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Fge=Se(zl.section),TF=ke(function(t,n){const{variants:r=Bge,...i}=t,{isOpen:o}=Sh();return ae.createElement(Fge,{ref:n,variants:zge(r),initial:!1,animate:o?"enter":"exit",...i})});TF.displayName="PopoverTransition";var v_=ke(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=Sh(),u=s2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(Se.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(TF,{...i,...a(o,n),onAnimationComplete:Mge(l,o.onAnimationComplete),className:a2("chakra-popover__content",t.className),__css:h}))});v_.displayName="PopoverContent";var $ge=ke(function(t,n){const{getHeaderProps:r}=Sh(),i=s2();return ae.createElement(Se.header,{...r(t,n),className:a2("chakra-popover__header",t.className),__css:i.header})});$ge.displayName="PopoverHeader";function y_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=Sh();return C.exports.cloneElement(t,n(t.props,t.ref))}y_.displayName="PopoverTrigger";function Hge(e,t,n){return(e-t)*100/(n-t)}var Wge=bd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Vge=bd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Uge=bd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Gge=bd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function LF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=Hge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var AF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(Se.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Vge} 2s linear infinite`:void 0},...r})};AF.displayName="Shape";var YC=e=>ae.createElement(Se.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});YC.displayName="Circle";var jge=ke((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=LF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Wge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(Se.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee(AF,{size:n,isIndeterminate:v,children:[x(YC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(YC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});jge.displayName="CircularProgress";var[Yge,qge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Kge=ke((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=LF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...qge().filledTrack};return ae.createElement(Se.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),MF=ke((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),E=Oi("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Gge} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Uge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return ae.createElement(Se.div,{ref:t,borderRadius:P,__css:R,...w},ee(Yge,{value:E,children:[x(Kge,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});MF.displayName="Progress";var Xge=Se("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Xge.displayName="CircularProgressLabel";var Zge=(...e)=>e.filter(Boolean).join(" "),Qge=e=>e?"":void 0;function Jge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var IF=ke(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(Se.select,{...a,ref:n,className:Zge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});IF.displayName="SelectField";var OF=ke((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,E]=Jge(b,SQ),P=O8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(Se.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(IF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(RF,{"data-disabled":Qge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});OF.displayName="Select";var eme=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),tme=Se("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),RF=e=>{const{children:t=x(eme,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(tme,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};RF.displayName="SelectIcon";function nme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rme(e){const t=ome(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function NF(e){return!!e.touches}function ime(e){return NF(e)&&e.touches.length>1}function ome(e){return e.view??window}function ame(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function sme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function DF(e,t="page"){return NF(e)?ame(e,t):sme(e,t)}function lme(e){return t=>{const n=rme(t);(!n||n&&t.button===0)&&e(t)}}function ume(e,t=!1){function n(i){e(i,{point:DF(i)})}return t?lme(n):n}function j3(e,t,n,r){return nme(e,t,ume(n,t==="pointerdown"),r)}function zF(e){const t=C.exports.useRef(null);return t.current=e,t}var cme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ime(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:DF(e)},{timestamp:i}=QP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,pw(r,this.history)),this.removeListeners=hme(j3(this.win,"pointermove",this.onPointerMove),j3(this.win,"pointerup",this.onPointerUp),j3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=pw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=pme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=QP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=pw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),OJ.update(this.updatePoint)}};function wA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pw(e,t){return{point:e.point,delta:wA(e.point,t[t.length-1]),offset:wA(e.point,t[0]),velocity:fme(t,.1)}}var dme=e=>e*1e3;function fme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>dme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function hme(...e){return t=>e.reduce((n,r)=>r(n),t)}function gw(e,t){return Math.abs(e-t)}function CA(e){return"x"in e&&"y"in e}function pme(e,t){if(typeof e=="number"&&typeof t=="number")return gw(e,t);if(CA(e)&&CA(t)){const n=gw(e.x,t.x),r=gw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function BF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=zF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new cme(v,h.current,s)}return j3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function gme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var mme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function vme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function FF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return mme(()=>{const a=e(),s=a.map((l,u)=>gme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(vme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function yme(e){return typeof e=="object"&&e!==null&&"current"in e}function bme(e){const[t]=FF({observeMutation:!1,getNodes(){return[yme(e)?e.current:e]}});return t}var Sme=Object.getOwnPropertyNames,xme=(e,t)=>function(){return e&&(t=(0,e[Sme(e)[0]])(e=0)),t},Cd=xme({"../../../react-shim.js"(){}});Cd();Cd();Cd();var Oa=e=>e?"":void 0,P0=e=>e?!0:void 0,_d=(...e)=>e.filter(Boolean).join(" ");Cd();function T0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Cd();Cd();function wme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function cm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Y3={width:0,height:0},jy=e=>e||Y3;function $F(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??Y3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...cm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>jy(w).height>jy(E).height?w:E,Y3):r.reduce((w,E)=>jy(w).width>jy(E).width?w:E,Y3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...cm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...cm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...cm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function HF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Cme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:O=0,...R}=e,N=dr(m),z=dr(v),V=dr(w),$=HF({isReversed:a,direction:s,orientation:l}),[j,ue]=ub({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>_0(He,t,n)),Me=O*b,xe=_me(me,t,n,Me),be=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=me,be.current.valueBounds=xe;const Ie=me.map(He=>n-He+t),De=($?Ie:me).map(He=>J5(He,t,n)),Qe=l==="vertical",st=C.exports.useRef(null),Ct=C.exports.useRef(null),ft=FF({getNodes(){const He=Ct.current,ct=He?.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),ut=C.exports.useId(),Ee=wme(u??ut),Je=C.exports.useCallback(He=>{var ct;if(!st.current)return;be.current.eventSource="pointer";const tt=st.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ct=He.touches)==null?void 0:ct[0])??He,er=Qe?tt.bottom-Zt:Nt-tt.left,lo=Qe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Uz(mi,t,n)},[Qe,$,n,t]),Lt=(n-t)/10,it=b||(n-t)/100,pt=C.exports.useMemo(()=>({setValueAtIndex(He,ct){if(!X)return;const tt=be.current.valueBounds[He];ct=parseFloat(DC(ct,tt.min,it)),ct=_0(ct,tt.min,tt.max);const Nt=[...be.current.value];Nt[He]=ct,ue(Nt)},setActiveIndex:G,stepUp(He,ct=it){const tt=be.current.value[He],Nt=$?tt-ct:tt+ct;pt.setValueAtIndex(He,Nt)},stepDown(He,ct=it){const tt=be.current.value[He],Nt=$?tt+ct:tt-ct;pt.setValueAtIndex(He,Nt)},reset(){ue(ce.current)}}),[it,$,ue,X]),an=C.exports.useCallback(He=>{const ct=He.key,Nt={ArrowRight:()=>pt.stepUp(K),ArrowUp:()=>pt.stepUp(K),ArrowLeft:()=>pt.stepDown(K),ArrowDown:()=>pt.stepDown(K),PageUp:()=>pt.stepUp(K,Lt),PageDown:()=>pt.stepDown(K,Lt),Home:()=>{const{min:Zt}=xe[K];pt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=xe[K];pt.setValueAtIndex(K,Zt)}}[ct];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),be.current.eventSource="keyboard")},[pt,K,Lt,xe]),{getThumbStyle:_t,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>$F({isReversed:$,orientation:l,thumbRects:ft,thumbPercents:De}),[$,l,De,ft]),Oe=C.exports.useCallback(He=>{var ct;const tt=He??K;if(tt!==-1&&M){const Nt=Ee.getThumb(tt),Zt=(ct=Ct.current)==null?void 0:ct.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Ee]);ud(()=>{be.current.eventSource==="keyboard"&&z?.(be.current.value)},[me,z]);const Xe=He=>{const ct=Je(He)||0,tt=be.current.value.map(mi=>Math.abs(mi-ct)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ct>be.current.value[Zt]&&(Zt=Zt+er.length-1),G(Zt),pt.setValueAtIndex(Zt,ct),Oe(Zt)},Xt=He=>{if(K==-1)return;const ct=Je(He)||0;G(K),pt.setValueAtIndex(K,ct),Oe(K)};BF(Ct,{onPanSessionStart(He){!X||(Q(!0),Xe(He),N?.(be.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(be.current.value))},onPan(He){!X||Xt(He)}});const Yt=C.exports.useCallback((He={},ct=null)=>({...He,...R,id:Ee.root,ref:Hn(ct,Ct),tabIndex:-1,"aria-disabled":P0(h),"data-focused":Oa(ne),style:{...He.style,...Ut}}),[R,h,ne,Ut,Ee]),_e=C.exports.useCallback((He={},ct=null)=>({...He,ref:Hn(ct,st),id:Ee.track,"data-disabled":Oa(h),style:{...He.style,...sn}}),[h,sn,Ee]),It=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.innerTrack,style:{...He.style,...yn}}),[yn,Ee]),ze=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He,Zt=me[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ct,role:"slider",tabIndex:X?0:void 0,id:Ee.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Zt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":P0(h),"aria-readonly":P0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,..._t(tt)},onKeyDown:T0(He.onKeyDown,an),onFocus:T0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:T0(He.onBlur,()=>{J(!1),G(-1)})}},[Ee,me,xe,X,W,K,V,E,l,h,g,P,k,_t,an,J]),ot=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.output,htmlFor:me.map((tt,Nt)=>Ee.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ee,me]),ln=C.exports.useCallback((He,ct=null)=>{const{value:tt,...Nt}=He,Zt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=J5(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...cm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ct,id:Ee.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Ee]),zn=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ct,id:Ee.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Ee]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>De[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:pt,getRootProps:Yt,getTrackProps:_e,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:ln,getInputProps:zn,getOutputProps:ot}}function _me(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[kme,Nb]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Eme,b_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),WF=ke(function(t,n){const r=Oi("Slider",t),i=vn(t),{direction:o}=s1();i.direction=o;const{getRootProps:a,...s}=Cme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(kme,{value:l},ae.createElement(Eme,{value:r},ae.createElement(Se.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});WF.defaultProps={orientation:"horizontal"};WF.displayName="RangeSlider";var Pme=ke(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Nb(),a=b_(),s=r(t,n);return ae.createElement(Se.div,{...s,className:_d("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Pme.displayName="RangeSliderThumb";var Tme=ke(function(t,n){const{getTrackProps:r}=Nb(),i=b_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:_d("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Tme.displayName="RangeSliderTrack";var Lme=ke(function(t,n){const{getInnerTrackProps:r}=Nb(),i=b_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Lme.displayName="RangeSliderFilledTrack";var Ame=ke(function(t,n){const{getMarkerProps:r}=Nb(),i=r(t,n);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__marker",t.className)})});Ame.displayName="RangeSliderMark";Cd();Cd();function Mme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...O}=e,R=dr(m),N=dr(v),z=dr(w),V=HF({isReversed:a,direction:s,orientation:l}),[$,j]=ub({value:i,defaultValue:o??Ome(t,n),onChange:r}),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=b||(n-t)/100,X=_0($,t,n),ce=n-X+t,Me=J5(V?ce:X,t,n),xe=l==="vertical",be=zF({min:t,max:n,step:b,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useId(),st=u??Qe,[Ct,ft]=[`slider-thumb-${st}`,`slider-track-${st}`],ut=C.exports.useCallback(ze=>{var ot;if(!Ie.current)return;const ln=be.current;ln.eventSource="pointer";const zn=Ie.current.getBoundingClientRect(),{clientX:He,clientY:ct}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?zn.bottom-ct:He-zn.left,Nt=xe?zn.height:zn.width;let Zt=tt/Nt;V&&(Zt=1-Zt);let er=Uz(Zt,ln.min,ln.max);return ln.step&&(er=parseFloat(DC(er,ln.min,ln.step))),er=_0(er,ln.min,ln.max),er},[xe,V,be]),vt=C.exports.useCallback(ze=>{const ot=be.current;!ot.isInteractive||(ze=parseFloat(DC(ze,ot.min,G)),ze=_0(ze,ot.min,ot.max),j(ze))},[G,j,be]),Ee=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;vt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;vt(ot)},reset(){vt(o||0)},stepTo(ze){vt(ze)}}),[vt,V,X,G,o]),Je=C.exports.useCallback(ze=>{const ot=be.current,zn={ArrowRight:()=>Ee.stepUp(),ArrowUp:()=>Ee.stepUp(),ArrowLeft:()=>Ee.stepDown(),ArrowDown:()=>Ee.stepDown(),PageUp:()=>Ee.stepUp(K),PageDown:()=>Ee.stepDown(K),Home:()=>vt(ot.min),End:()=>vt(ot.max)}[ze.key];zn&&(ze.preventDefault(),ze.stopPropagation(),zn(ze),ot.eventSource="keyboard")},[Ee,vt,K,be]),Lt=z?.(X)??E,it=bme(We),{getThumbStyle:pt,rootStyle:an,trackStyle:_t,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=be.current,ot=it??{width:0,height:0};return $F({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Me]})},[V,it,Me,be]),sn=C.exports.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=We.current)==null?void 0:ot.focus()})},[be]);ud(()=>{const ze=be.current;sn(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function yn(ze){const ot=ut(ze);ot!=null&&ot!==be.current.value&&j(ot)}BF(De,{onPanSessionStart(ze){const ot=be.current;!ot.isInteractive||(W(!0),sn(),yn(ze),R?.(ot.value))},onPanSessionEnd(){const ze=be.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!be.current.isInteractive||yn(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...O,ref:Hn(ot,De),tabIndex:-1,"aria-disabled":P0(h),"data-focused":Oa(Q),style:{...ze.style,...an}}),[O,h,Q,an]),Xe=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Hn(ot,Ie),id:ft,"data-disabled":Oa(h),style:{...ze.style,..._t}}),[h,ft,_t]),Xt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Hn(ot,We),role:"slider",tabIndex:J?0:void 0,id:Ct,"data-active":Oa(ue),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":P0(h),"aria-readonly":P0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...pt(0)},onKeyDown:T0(ze.onKeyDown,Je),onFocus:T0(ze.onFocus,()=>ne(!0)),onBlur:T0(ze.onBlur,()=>ne(!1))}),[J,Ct,ue,Lt,t,n,X,l,h,g,P,k,pt,Je]),_e=C.exports.useCallback((ze,ot=null)=>{const ln=!(ze.valuen),zn=X>=ze.value,He=J5(ze.value,t,n),ct={position:"absolute",pointerEvents:"none",...Ime({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!ln),"data-highlighted":Oa(zn),style:{...ze.style,...ct}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:ue},actions:Ee,getRootProps:Oe,getTrackProps:Xe,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:_e,getInputProps:It}}function Ime(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Ome(e,t){return t"}),[Nme,zb]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),S_=ke((e,t)=>{const n=Oi("Slider",e),r=vn(e),{direction:i}=s1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Mme(r),l=a(),u=o({},t);return ae.createElement(Rme,{value:s},ae.createElement(Nme,{value:n},ae.createElement(Se.div,{...l,className:_d("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});S_.defaultProps={orientation:"horizontal"};S_.displayName="Slider";var VF=ke((e,t)=>{const{getThumbProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__thumb",e.className),__css:r.thumb})});VF.displayName="SliderThumb";var UF=ke((e,t)=>{const{getTrackProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__track",e.className),__css:r.track})});UF.displayName="SliderTrack";var GF=ke((e,t)=>{const{getInnerTrackProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__filled-track",e.className),__css:r.filledTrack})});GF.displayName="SliderFilledTrack";var qC=ke((e,t)=>{const{getMarkerProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__marker",e.className),__css:r.mark})});qC.displayName="SliderMark";var Dme=(...e)=>e.filter(Boolean).join(" "),_A=e=>e?"":void 0,x_=ke(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Wz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(Se.label,{...h(),className:Dme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(Se.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(Se.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":_A(s.isChecked),"data-hover":_A(s.isHovered)})),o&&ae.createElement(Se.span,{className:"chakra-switch__label",...g(),__css:b},o))});x_.displayName="Switch";var p1=(...e)=>e.filter(Boolean).join(" ");function KC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[zme,jF,Bme,Fme]=nD();function $me(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=ub({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Bme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Hme,l2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Wme(e){const{focusedIndex:t,orientation:n,direction:r}=l2(),i=jF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:KC(e.onKeyDown,o)}}function Vme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=l2(),{index:u,register:h}=Fme({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Nhe({...r,ref:Hn(h,e.ref),isDisabled:t,isFocusable:n,onClick:KC(e.onClick,m)}),w="button";return{...b,id:YF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":qF(a,u),onFocus:t?void 0:KC(e.onFocus,v)}}var[Ume,Gme]=_n({});function jme(e){const t=l2(),{id:n,selectedIndex:r}=t,o=kb(e.children).map((a,s)=>C.exports.createElement(Ume,{key:s,value:{isSelected:s===r,id:qF(n,s),tabId:YF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=l2(),{isSelected:o,id:a,tabId:s}=Gme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=AB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function qme(){const e=l2(),t=jF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return ks(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function YF(e,t){return`${e}--tab-${t}`}function qF(e,t){return`${e}--tabpanel-${t}`}var[Kme,u2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),KF=ke(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=$me(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(zme,{value:l},ae.createElement(Hme,{value:h},ae.createElement(Kme,{value:r},ae.createElement(Se.div,{className:p1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});KF.displayName="Tabs";var Xme=ke(function(t,n){const r=qme(),i={...t.style,...r},o=u2();return ae.createElement(Se.div,{ref:n,...t,className:p1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Xme.displayName="TabIndicator";var Zme=ke(function(t,n){const r=Wme({...t,ref:n}),o={display:"flex",...u2().tablist};return ae.createElement(Se.div,{...r,className:p1("chakra-tabs__tablist",t.className),__css:o})});Zme.displayName="TabList";var XF=ke(function(t,n){const r=Yme({...t,ref:n}),i=u2();return ae.createElement(Se.div,{outline:"0",...r,className:p1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});XF.displayName="TabPanel";var ZF=ke(function(t,n){const r=jme(t),i=u2();return ae.createElement(Se.div,{...r,width:"100%",ref:n,className:p1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});ZF.displayName="TabPanels";var QF=ke(function(t,n){const r=u2(),i=Vme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(Se.button,{...i,className:p1("chakra-tabs__tab",t.className),__css:o})});QF.displayName="Tab";var Qme=(...e)=>e.filter(Boolean).join(" ");function Jme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var eve=["h","minH","height","minHeight"],JF=ke((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=O8(o),s=i?Jme(n,eve):n;return ae.createElement(Se.textarea,{ref:t,rows:i,...a,className:Qme("chakra-textarea",r),__css:s})});JF.displayName="Textarea";function tve(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function XC(e,...t){return nve(e)?e(...t):e}var nve=e=>typeof e=="function";function rve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var ive=(e,t)=>e.find(n=>n.id===t);function kA(e,t){const n=e$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function e$(e,t){for(const[n,r]of Object.entries(e))if(ive(r,t))return n}function ove(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function ave(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var sve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},yl=lve(sve);function lve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=uve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=kA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:t$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=e$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(kA(yl.getState(),i).position)}}var EA=0;function uve(e,t={}){EA+=1;const n=t.id??EA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>yl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var cve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Dz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Bz,{children:l}),ae.createElement(Se.div,{flex:"1",maxWidth:"100%"},i&&x(Fz,{id:u?.title,children:i}),s&&x(zz,{id:u?.description,display:"block",children:s})),o&&x(Tb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function t$(e={}){const{render:t,toastComponent:n=cve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function dve(e,t){const n=i=>({...t,...i,position:rve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=t$(o);return yl.notify(a,o)};return r.update=(i,o)=>{yl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...XC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...XC(o.error,s)}))},r.closeAll=yl.closeAll,r.close=yl.close,r.isActive=yl.isActive,r}function c2(e){const{theme:t}=JN();return C.exports.useMemo(()=>dve(t.direction,e),[e,t.direction])}var fve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},n$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=fve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=due();ud(()=>{v||r?.()},[v]),ud(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),tve(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>ove(a),[a]);return ae.createElement(zl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(Se.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},XC(n,{id:t,onClose:E})))});n$.displayName="ToastComponent";var hve=e=>{const t=C.exports.useSyncExternalStore(yl.subscribe,yl.getState,yl.getState),{children:n,motionVariants:r,component:i=n$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:ave(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Wn,{children:[n,x(vh,{...o,children:s})]})};function pve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function gve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var mve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Gg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var r4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},ZC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function vve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:O,...R}=e,{isOpen:N,onOpen:z,onClose:V}=LB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:ue,getArrowProps:W}=TB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:O}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Me=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=yve(K,Me),be=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=ZC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Ie=C.exports.useCallback(()=>{X();const ut=ZC(K);ce.current=ut.setTimeout(Me,n)},[n,Me,X]),We=C.exports.useCallback(()=>{N&&r&&Ie()},[r,Ie,N]),De=C.exports.useCallback(()=>{N&&a&&Ie()},[a,Ie,N]),Qe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Ie()},[N,Ie]);Zf(()=>r4(K),"keydown",s?Qe:void 0),Zf(()=>r4(K),"scroll",()=>{N&&o&&Me()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Ie);const st=C.exports.useCallback((ut={},vt=null)=>({...ut,ref:Hn(K,vt,$),onPointerEnter:Gg(ut.onPointerEnter,Je=>{Je.pointerType!=="touch"&&be()}),onClick:Gg(ut.onClick,We),onPointerDown:Gg(ut.onPointerDown,De),onFocus:Gg(ut.onFocus,be),onBlur:Gg(ut.onBlur,Ie),"aria-describedby":N?J:void 0}),[be,Ie,De,N,J,We,$]),Ct=C.exports.useCallback((ut={},vt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:b?`${b}px`:void 0,[Wr.arrowShadowColor.var]:w}},vt),[j,b,w]),ft=C.exports.useCallback((ut={},vt=null)=>{const Ee={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:vt,...R,...ut,id:J,role:"tooltip",style:Ee}},[R,J]);return{isOpen:N,show:be,hide:Ie,getTriggerProps:st,getTooltipProps:ft,getTooltipPositionerProps:Ct,getArrowProps:W,getArrowInnerProps:ue}}var mw="chakra-ui:close-tooltip";function yve(e,t){return C.exports.useEffect(()=>{const n=r4(e);return n.addEventListener(mw,t),()=>n.removeEventListener(mw,t)},[t,e]),()=>{const n=r4(e),r=ZC(e);n.dispatchEvent(new r.CustomEvent(mw))}}var bve=Se(zl.div),pi=ke((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=s1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const V=RQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=vve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(Se.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const O=!!l,R=k.getTooltipProps({},t),N=O?pve(R,["role","id"]):R,z=gve(R,["role","id"]);return a?ee(Wn,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(vh,{...g},ae.createElement(Se.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(bve,{variants:mve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,O&&ae.createElement(Se.span,{srOnly:!0,...z},l),u&&ae.createElement(Se.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(Se.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Wn,{children:o})});pi.displayName="Tooltip";var Sve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(dB,{environment:a,children:t});return x(_ae,{theme:o,cssVarsRoot:s,children:ee(nN,{colorModeManager:n,options:o.config,children:[i?x(Gfe,{}):x(Ufe,{}),x(Eae,{}),r?x(MB,{zIndex:r,children:l}):l]})})};function xve({children:e,theme:t=gae,toastOptions:n,...r}){return ee(Sve,{theme:t,...r,children:[e,x(hve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:w_(e)?2:C_(e)?3:0}function L0(e,t){return g1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wve(e,t){return g1(e)===2?e.get(t):e[t]}function r$(e,t,n){var r=g1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function i$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function w_(e){return Tve&&e instanceof Map}function C_(e){return Lve&&e instanceof Set}function Ef(e){return e.o||e.t}function __(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=a$(e);delete t[rr];for(var n=A0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Cve),Object.freeze(e),t&&lh(e,function(n,r){return k_(r,!0)},!0)),e}function Cve(){xs(2)}function E_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Tl(e){var t=t7[e];return t||xs(18,e),t}function _ve(e,t){t7[e]||(t7[e]=t)}function QC(){return zv}function vw(e,t){t&&(Tl("Patches"),e.u=[],e.s=[],e.v=t)}function i4(e){JC(e),e.p.forEach(kve),e.p=null}function JC(e){e===zv&&(zv=e.l)}function PA(e){return zv={p:[],l:zv,h:e,m:!0,_:0}}function kve(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function yw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Tl("ES5").S(t,e,r),r?(n[rr].P&&(i4(t),xs(4)),Eu(e)&&(e=o4(t,e),t.l||a4(t,e)),t.u&&Tl("Patches").M(n[rr].t,e,t.u,t.s)):e=o4(t,n,[]),i4(t),t.u&&t.v(t.u,t.s),e!==o$?e:void 0}function o4(e,t,n){if(E_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return TA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return a4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=__(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return TA(e,r,i,o,a,n)}),a4(e,i,!1),n&&e.u&&Tl("Patches").R(r,n,e.u,e.s)}return r.o}function TA(e,t,n,r,i,o){if(fd(i)){var a=o4(e,i,o&&t&&t.i!==3&&!L0(t.D,r)?o.concat(r):void 0);if(r$(n,r,a),!fd(a))return;e.m=!1}if(Eu(i)&&!E_(i)){if(!e.h.F&&e._<1)return;o4(e,i),t&&t.A.l||a4(e,i)}}function a4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&k_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function LA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function Sw(e){e.o||(e.o=__(e.t))}function e7(e,t,n){var r=w_(t)?Tl("MapSet").N(t,n):C_(t)?Tl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:QC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Bv;a&&(l=[s],u=dm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Tl("ES5").J(t,n);return(n?n.A:QC()).p.push(r),r}function Eve(e){return fd(e)||xs(22,e),function t(n){if(!Eu(n))return n;var r,i=n[rr],o=g1(n);if(i){if(!i.P&&(i.i<4||!Tl("ES5").K(i)))return i.t;i.I=!0,r=AA(n,o),i.I=!1}else r=AA(n,o);return lh(r,function(a,s){i&&wve(i.t,a)===s||r$(r,a,t(s))}),o===3?new Set(r):r}(e)}function AA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return __(e)}function Pve(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Bv.get(l,o)},set:function(l){var u=this[rr];Bv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=A0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!L0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!i$(m,g))return!0}}var b=!!a[rr];return l.length!==A0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Tl("Patches").$;return fd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new Mve,s$=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function RA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(T_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ive(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:s4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function l$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function l4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return u4}function i(s,l){r(s)===u4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var zve=function(t,n){return t===n};function Bve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S2e:b2e;h$.useSyncExternalStore=Q0.useSyncExternalStore!==void 0?Q0.useSyncExternalStore:x2e;(function(e){e.exports=h$})(f$);var p$={exports:{}},g$={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Fb=C.exports,w2e=f$.exports;function C2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _2e=typeof Object.is=="function"?Object.is:C2e,k2e=w2e.useSyncExternalStore,E2e=Fb.useRef,P2e=Fb.useEffect,T2e=Fb.useMemo,L2e=Fb.useDebugValue;g$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=E2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=T2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,_2e(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=k2e(e,o[0],o[1]);return P2e(function(){a.hasValue=!0,a.value=s},[s]),L2e(s),s};(function(e){e.exports=g$})(p$);function A2e(e){e()}let m$=A2e;const M2e=e=>m$=e,I2e=()=>m$,hd=C.exports.createContext(null);function v$(){return C.exports.useContext(hd)}const O2e=()=>{throw new Error("uSES not initialized!")};let y$=O2e;const R2e=e=>{y$=e},N2e=(e,t)=>e===t;function D2e(e=hd){const t=e===hd?v$:()=>C.exports.useContext(e);return function(r,i=N2e){const{store:o,subscription:a,getServerState:s}=t(),l=y$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const z2e=D2e();var B2e={exports:{}},Mn={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var A_=Symbol.for("react.element"),M_=Symbol.for("react.portal"),$b=Symbol.for("react.fragment"),Hb=Symbol.for("react.strict_mode"),Wb=Symbol.for("react.profiler"),Vb=Symbol.for("react.provider"),Ub=Symbol.for("react.context"),F2e=Symbol.for("react.server_context"),Gb=Symbol.for("react.forward_ref"),jb=Symbol.for("react.suspense"),Yb=Symbol.for("react.suspense_list"),qb=Symbol.for("react.memo"),Kb=Symbol.for("react.lazy"),$2e=Symbol.for("react.offscreen"),b$;b$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case A_:switch(e=e.type,e){case $b:case Wb:case Hb:case jb:case Yb:return e;default:switch(e=e&&e.$$typeof,e){case F2e:case Ub:case Gb:case Kb:case qb:case Vb:return e;default:return t}}case M_:return t}}}Mn.ContextConsumer=Ub;Mn.ContextProvider=Vb;Mn.Element=A_;Mn.ForwardRef=Gb;Mn.Fragment=$b;Mn.Lazy=Kb;Mn.Memo=qb;Mn.Portal=M_;Mn.Profiler=Wb;Mn.StrictMode=Hb;Mn.Suspense=jb;Mn.SuspenseList=Yb;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return qa(e)===Ub};Mn.isContextProvider=function(e){return qa(e)===Vb};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===A_};Mn.isForwardRef=function(e){return qa(e)===Gb};Mn.isFragment=function(e){return qa(e)===$b};Mn.isLazy=function(e){return qa(e)===Kb};Mn.isMemo=function(e){return qa(e)===qb};Mn.isPortal=function(e){return qa(e)===M_};Mn.isProfiler=function(e){return qa(e)===Wb};Mn.isStrictMode=function(e){return qa(e)===Hb};Mn.isSuspense=function(e){return qa(e)===jb};Mn.isSuspenseList=function(e){return qa(e)===Yb};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$b||e===Wb||e===Hb||e===jb||e===Yb||e===$2e||typeof e=="object"&&e!==null&&(e.$$typeof===Kb||e.$$typeof===qb||e.$$typeof===Vb||e.$$typeof===Ub||e.$$typeof===Gb||e.$$typeof===b$||e.getModuleId!==void 0)};Mn.typeOf=qa;(function(e){e.exports=Mn})(B2e);function H2e(){const e=I2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const WA={notify(){},get:()=>[]};function W2e(e,t){let n,r=WA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=H2e())}function u(){n&&(n(),n=void 0,r.clear(),r=WA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const V2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U2e=V2e?C.exports.useLayoutEffect:C.exports.useEffect;function G2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=W2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return U2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||hd).Provider,{value:i,children:n})}function S$(e=hd){const t=e===hd?v$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const j2e=S$();function Y2e(e=hd){const t=e===hd?j2e:S$(e);return function(){return t().dispatch}}const q2e=Y2e();R2e(p$.exports.useSyncExternalStoreWithSelector);M2e(Dl.exports.unstable_batchedUpdates);var I_="persist:",x$="persist/FLUSH",O_="persist/REHYDRATE",w$="persist/PAUSE",C$="persist/PERSIST",_$="persist/PURGE",k$="persist/REGISTER",K2e=-1;function q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?q3=function(n){return typeof n}:q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},q3(e)}function VA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,V){return V.in(z,R,h)},h[R]);if(N!==void 0)try{g[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function eye(e){return JSON.stringify(e)}function tye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:I_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=nye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function nye(e){return JSON.parse(e)}function rye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:I_).concat(e.key);return t.removeItem(n,iye)}function iye(e){}function UA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function sye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lye=5e3;function uye(e,t){var n=e.version!==void 0?e.version:K2e;e.debug;var r=e.stateReconciler===void 0?Q2e:e.stateReconciler,i=e.getStoredState||tye,o=e.timeout!==void 0?e.timeout:lye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=aye(m,["_persist"]),w=b;if(g.type===C$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=J2e(e)),v)return uu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),uu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===_$)return s=!0,g.result(rye(e)),uu({},t(w,g),{_persist:v});if(g.type===x$)return g.result(a&&a.flush()),uu({},t(w,g),{_persist:v});if(g.type===w$)l=!0;else if(g.type===O_){if(s)return uu({},w,{_persist:uu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,O=uu({},M,{_persist:uu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(uu({},R,{_persist:v}))}}function GA(e){return fye(e)||dye(e)||cye()}function cye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function dye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function fye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:E$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case k$:return r7({},t,{registry:[].concat(GA(t.registry),[n.key])});case O_:var r=t.registry.indexOf(n.key),i=GA(t.registry);return i.splice(r,1),r7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function gye(e,t,n){var r=n||!1,i=T_(pye,E$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:k$,key:u})},a=function(u,h,g){var m={type:O_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=r7({},i,{purge:function(){var u=[];return e.dispatch({type:_$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:x$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:w$})},persist:function(){e.dispatch({type:C$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var R_={},N_={};N_.__esModule=!0;N_.default=yye;function K3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?K3=function(n){return typeof n}:K3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},K3(e)}function kw(){}var mye={getItem:kw,setItem:kw,removeItem:kw};function vye(e){if((typeof self>"u"?"undefined":K3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function yye(e){var t="".concat(e,"Storage");return vye(t)?self[t]:mye}R_.__esModule=!0;R_.default=xye;var bye=Sye(N_);function Sye(e){return e&&e.__esModule?e:{default:e}}function xye(e){var t=(0,bye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var P$=void 0,wye=Cye(R_);function Cye(e){return e&&e.__esModule?e:{default:e}}var _ye=(0,wye.default)("local");P$=_ye;var T$={},L$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var D_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(D_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=D_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const b=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=b;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},O=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=O;const R=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=R;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Me=>Me===ne),K=W.filter(Me=>(ne+".").indexOf(Me+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. - - ${JSON.stringify(X)} - - ${G}`);if(ce.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(ce)} - - ${G}`)};e.singleTransformValidator=z;const V=function(W){if(!(0,e.isArray)(W))return;const Q=W?.map(ne=>ne.deepPersistKey).filter(ne=>ne)||[];if(Q.length){const ne=Q.filter((J,K)=>Q.indexOf(J)!==K);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ne)}`)}};e.transformsValidator=V;const $=function({whitelist:W,blacklist:Q}){if(W&&W.length&&Q&&Q.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(W){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(W);(0,e.throwError)({duplicates:ne,subsets:J},"whitelist")}if(Q){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(Q);(0,e.throwError)({duplicates:ne,subsets:J},"blacklist")}};e.configValidator=$;const j=function({duplicates:W,subsets:Q},ne){if(W.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ne}. - - ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(Q)}`)};e.throwError=j;const ue=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=ue})(L$);(function(e){var t=bs&&bs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=T.map(ue=>Object.keys(ue)[0]),N=M.map(ue=>Object.keys(ue)[0]),z=O.filter(ue=>R.indexOf(ue)===-1&&N.indexOf(ue)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(ue=>(0,e.createBlacklist)(ue)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(T$);const X3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),kye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return z_(r)?r:!1},z_=e=>Boolean(typeof e=="string"?kye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),d4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Eye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,T=8,M=16,O=32,R=64,N=128,z=256,V=512,$=30,j="...",ue=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Me=me-1,xe=me>>>1,be=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",O],["partialRight",R],["rearg",z]],Ie="[object Arguments]",We="[object Array]",De="[object AsyncFunction]",Qe="[object Boolean]",st="[object Date]",Ct="[object DOMException]",ft="[object Error]",ut="[object Function]",vt="[object GeneratorFunction]",Ee="[object Map]",Je="[object Number]",Lt="[object Null]",it="[object Object]",pt="[object Promise]",an="[object Proxy]",_t="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",Xe="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",_e="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",ln="[object Int16Array]",zn="[object Int32Array]",He="[object Uint8Array]",ct="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,C1=RegExp(mi.source),ya=RegExp(Os.source),Th=/<%-([\s\S]+?)%>/g,_1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Lh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ah=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Md=/[\\^$.*+?()[\]{}|]/g,k1=RegExp(Md.source),$u=/^\s+/,Id=/\s/,E1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rs=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,P1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,T1=/[()=,{}\[\]\/\s]/,L1=/\\(\\)?/g,A1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,M1=/^[-+]0x[0-9a-f]+$/i,I1=/^0b[01]+$/i,O1=/^\[object .+?Constructor\]$/,R1=/^0o[0-7]+$/i,N1=/^(?:0|[1-9]\d*)$/,D1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,z1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Hl="\\u0300-\\u036f",Wl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Vl=Hl+Wl+Ds,Mh="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+bn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Vl+"]",Od="\\d+",Ul="["+Mh+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Od+Mh+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Ih="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Nd="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",Gl="(?:"+Qa+"|"+Rd+")",B1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Dd=Ih+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Nd,Fs].join("|")+")"+Gu+Dd+")*",zd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Dd+ba,Rh="(?:"+[Ul,Nd,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Nd,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Nh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",B1+"+"+Uu+"(?="+[jr,uo+Gl,"$"].join("|")+")",uo+"?"+Gl+"+"+Vu,uo+"+"+Uu,jl,zd,Od,Rh].join("|"),"g"),Bd=RegExp("["+$s+Xa+Vl+kr+"]"),Dh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zh=-1,un={};un[It]=un[ze]=un[ot]=un[ln]=un[zn]=un[He]=un[ct]=un[tt]=un[Nt]=!0,un[Ie]=un[We]=un[Yt]=un[Qe]=un[_e]=un[st]=un[ft]=un[ut]=un[Ee]=un[Je]=un[it]=un[_t]=un[Ut]=un[sn]=un[Xe]=!1;var Wt={};Wt[Ie]=Wt[We]=Wt[Yt]=Wt[_e]=Wt[Qe]=Wt[st]=Wt[It]=Wt[ze]=Wt[ot]=Wt[ln]=Wt[zn]=Wt[Ee]=Wt[Je]=Wt[it]=Wt[_t]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[He]=Wt[ct]=Wt[tt]=Wt[Nt]=!0,Wt[ft]=Wt[ut]=Wt[Xe]=!1;var Bh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},F1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof bs=="object"&&bs&&bs.Object===Object&&bs,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,hn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Vi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,Hs=hn&&hn.isSet,$1=hn&&hn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function H1(re,ye,ge,Ge){for(var Et=-1,Qt=re==null?0:re.length;++Et-1}function Fh(re,ye,ge){for(var Ge=-1,Et=re==null?0:re.length;++Ge-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function V1(re,ye){for(var ge=re.length,Ge=0;ge--;)re[ge]===ye&&++Ge;return Ge}var C2=Vd(Bh),es=Vd(F1);function Vs(re){return"\\"+te[re]}function Hh(re,ye){return re==null?n:re[ye]}function ql(re){return Bd.test(re)}function Wh(re){return Dh.test(re)}function _2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Vh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ge,Et){ge[++ye]=[Et,Ge]}),ge}function Uh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ge=re.length,Et=0,Qt=[];++ge-1}function V2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Uo.prototype.clear=H2,Uo.prototype.delete=W2,Uo.prototype.get=ig,Uo.prototype.has=og,Uo.prototype.set=V2;function Go(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,S,A,D,F){var Y,Z=p&g,le=p&m,we=p&v;if(S&&(Y=D?S(c,A,D,F):S(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Rt(c);if(Ce){if(Y=bU(c),!Z)return _i(c,Y)}else{var Te=ui(c),Ue=Te==ut||Te==vt;if(_c(c))return el(c,Z);if(Te==it||Te==Ie||Ue&&!D){if(Y=le||Ue?{}:Nk(c),!Z)return le?Cg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Te])return D?c:{};Y=SU(c,Te,Z)}}F||(F=new yr);var lt=F.get(c);if(lt)return lt;F.set(c,Y),cE(c)?c.forEach(function(xt){Y.add(ai(xt,p,S,xt,c,F))}):lE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,S,jt,c,F))});var St=we?le?pe:Xo:le?So:ci,$t=Ce?n:St(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,S,jt,c,F))}),Y}function Qh(c){var p=ci(c);return function(S){return Jh(S,c,p)}}function Jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var D=S[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ug(c,p,S){if(typeof c!="function")throw new bi(a);return Tg(function(){c.apply(n,S)},p)}function gc(c,p,S,A){var D=-1,F=Ri,Y=!0,Z=c.length,le=[],we=p.length;if(!Z)return le;S&&(p=Fn(p,Er(S))),A?(F=Fh,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new _a(p));e:for(;++DD?0:D+S),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=S>A?0:fE(A);S0&&S(Z)?p>1?Tr(Z,p-1,S,A,D):xa(D,Z):A||(D[D.length]=Z)}return D}var tp=tl(),go=tl(!0);function Ko(c,p){return c&&tp(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function np(c,p){return ho(p,function(S){return ru(c[S])})}function Ys(c,p){p=Js(p,c);for(var S=0,A=p.length;c!=null&&Sp}function ip(c,p){return c!=null&&tn.call(c,p)}function op(c,p){return c!=null&&p in cn(c)}function ap(c,p,S){return c>=Kr(p,S)&&c=120&&Ce.length>=120)?new _a(Y&&Ce):n}Ce=c[0];var Te=-1,Ue=Z[0];e:for(;++Te-1;)Z!==c&&Zd.call(Z,le,1),Zd.call(c,le,1);return c}function sf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var D=p[S];if(S==A||D!==F){var F=D;nu(D)?Zd.call(c,D,1):mp(c,D)}}return c}function lf(c,p){return c+Xl(Q1()*(p-c+1))}function Zs(c,p,S,A){for(var D=-1,F=vr(ef((p-c)/(S||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=S;return Y}function xc(c,p){var S="";if(!c||p<1||p>G)return S;do p%2&&(S+=c),p=Xl(p/2),p&&(c+=c);while(p);return S}function kt(c,p){return zS(Bk(c,p,xo),c+"")}function dp(c){return hc(Cp(c))}function uf(c,p){var S=Cp(c);return Z2(S,Ql(p,0,S.length))}function eu(c,p,S,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),S=S>D?D:S,S<0&&(S+=D),D=p>S?0:S-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(S?Y<=p:Y=i){var we=p?null:H(c);if(we)return Yd(we);Y=!1,D=Qu,le=new _a}else le=p?[]:Z;e:for(;++A=A?c:Ar(c,p,S)}var bg=L2||function(c){return yt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var S=c.length,A=rc?rc(S):new c.constructor(S);return c.copy(A),A}function Sg(c){var p=new c.constructor(c.byteLength);return new Si(p).set(new Si(c)),p}function tu(c,p){var S=p?Sg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function Y2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return nf?cn(nf.call(c)):{}}function q2(c,p){var S=p?Sg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function xg(c,p){if(c!==p){var S=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,le=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&le&&!Z&&!we||A&&Y&&le||!S&&le||!D)return 1;if(!A&&!F&&!we&&c=Z)return le;var we=S[A];return le*(we=="desc"?-1:1)}}return c.index-p.index}function K2(c,p,S,A){for(var D=-1,F=c.length,Y=S.length,Z=-1,le=p.length,we=vr(F-Y,0),Ce=ge(le+we),Te=!A;++Z1?S[D-1]:n,Y=D>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Ki(S[0],S[1],Y)&&(F=D<3?n:F,D=1),p=cn(p);++A-1?D[F?p[Y]:Y]:n}}function kg(c){return nr(function(p){var S=p.length,A=S,D=Gi.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new bi(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new Gi([],!0)}for(A=Y?A:S;++A1&&Jt.reverse(),Ce&&leZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Te=-1,Ue=!0,lt=S&w?new _a:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(E1,`{ -/* [wrapped with `+p+`] */ -`)}function wU(c){return Rt(c)||vf(c)||!!(X1&&c&&c[X1])}function nu(c,p){var S=typeof c;return p=p??G,!!p&&(S=="number"||S!="symbol"&&N1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=ue)return arguments[0]}else p=0;return c.apply(n,arguments)}}function Z2(c,p){var S=-1,A=c.length,D=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Xk(c,S)});function Zk(c){var p=B(c);return p.__chain__=!0,p}function OG(c,p){return p(c),c}function Q2(c,p){return p(c)}var RG=nr(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,D=function(F){return Zh(F,c)};return p>1||this.__actions__.length||!(A instanceof Gt)||!nu(S)?this.thru(D):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:Q2,args:[D],thisArg:n}),new Gi(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function NG(){return Zk(this)}function DG(){return new Gi(this.value(),this.__chain__)}function zG(){this.__values__===n&&(this.__values__=dE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function BG(){return this}function FG(c){for(var p,S=this;S instanceof rf;){var A=Uk(S);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;S=S.__wrapped__}return D.__wrapped__=c,p}function $G(){var c=this.__wrapped__;if(c instanceof Gt){var p=c;return this.__actions__.length&&(p=new Gt(this)),p=p.reverse(),p.__actions__.push({func:Q2,args:[BS],thisArg:n}),new Gi(p,this.__chain__)}return this.thru(BS)}function HG(){return Qs(this.__wrapped__,this.__actions__)}var WG=yp(function(c,p,S){tn.call(c,S)?++c[S]:jo(c,S,1)});function VG(c,p,S){var A=Rt(c)?Bn:cg;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}function UG(c,p){var S=Rt(c)?ho:qo;return S(c,Pe(p,3))}var GG=_g(Gk),jG=_g(jk);function YG(c,p){return Tr(J2(c,p),1)}function qG(c,p){return Tr(J2(c,p),K)}function KG(c,p,S){return S=S===n?1:Dt(S),Tr(J2(c,p),S)}function Qk(c,p){var S=Rt(c)?Gn:rs;return S(c,Pe(p,3))}function Jk(c,p){var S=Rt(c)?fo:ep;return S(c,Pe(p,3))}var XG=yp(function(c,p,S){tn.call(c,S)?c[S].push(p):jo(c,S,[p])});function ZG(c,p,S,A){c=bo(c)?c:Cp(c),S=S&&!A?Dt(S):0;var D=c.length;return S<0&&(S=vr(D+S,0)),iy(c)?S<=D&&c.indexOf(p,S)>-1:!!D&&Xu(c,p,S)>-1}var QG=kt(function(c,p,S){var A=-1,D=typeof p=="function",F=bo(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,S):is(Y,p,S)}),F}),JG=yp(function(c,p,S){jo(c,S,p)});function J2(c,p){var S=Rt(c)?Fn:Sr;return S(c,Pe(p,3))}function ej(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),wi(c,p,S))}var tj=yp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function nj(c,p,S){var A=Rt(c)?$d:$h,D=arguments.length<3;return A(c,Pe(p,4),S,D,rs)}function rj(c,p,S){var A=Rt(c)?b2:$h,D=arguments.length<3;return A(c,Pe(p,4),S,D,ep)}function ij(c,p){var S=Rt(c)?ho:qo;return S(c,ny(Pe(p,3)))}function oj(c){var p=Rt(c)?hc:dp;return p(c)}function aj(c,p,S){(S?Ki(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?oi:uf;return A(c,p)}function sj(c){var p=Rt(c)?LS:li;return p(c)}function lj(c){if(c==null)return 0;if(bo(c))return iy(c)?wa(c):c.length;var p=ui(c);return p==Ee||p==Ut?c.size:Lr(c).length}function uj(c,p,S){var A=Rt(c)?qu:vo;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}var cj=kt(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Ki(c,p[0],p[1])?p=[]:S>2&&Ki(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ey=A2||function(){return yt.Date.now()};function dj(c,p){if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function eE(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function tE(c,p){var S;if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var $S=kt(function(c,p,S){var A=E;if(S.length){var D=Vo(S,Ve($S));A|=O}return fe(c,A,p,S,D)}),nE=kt(function(c,p,S){var A=E|P;if(S.length){var D=Vo(S,Ve(nE));A|=O}return fe(p,A,c,S,D)});function rE(c,p,S){p=S?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=rE.placeholder,A}function iE(c,p,S){p=S?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=iE.placeholder,A}function oE(c,p,S){var A,D,F,Y,Z,le,we=0,Ce=!1,Te=!1,Ue=!0;if(typeof c!="function")throw new bi(a);p=Pa(p)||0,lr(S)&&(Ce=!!S.leading,Te="maxWait"in S,F=Te?vr(Pa(S.maxWait)||0,p):F,Ue="trailing"in S?!!S.trailing:Ue);function lt(Ir){var us=A,ou=D;return A=D=n,we=Ir,Y=c.apply(ou,us),Y}function St(Ir){return we=Ir,Z=Tg(jt,p),Ce?lt(Ir):Y}function $t(Ir){var us=Ir-le,ou=Ir-we,_E=p-us;return Te?Kr(_E,F-ou):_E}function xt(Ir){var us=Ir-le,ou=Ir-we;return le===n||us>=p||us<0||Te&&ou>=F}function jt(){var Ir=ey();if(xt(Ir))return Jt(Ir);Z=Tg(jt,$t(Ir))}function Jt(Ir){return Z=n,Ue&&A?lt(Ir):(A=D=n,Y)}function Qo(){Z!==n&&bg(Z),we=0,A=le=D=Z=n}function Xi(){return Z===n?Y:Jt(ey())}function Jo(){var Ir=ey(),us=xt(Ir);if(A=arguments,D=this,le=Ir,us){if(Z===n)return St(le);if(Te)return bg(Z),Z=Tg(jt,p),lt(le)}return Z===n&&(Z=Tg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Xi,Jo}var fj=kt(function(c,p){return ug(c,1,p)}),hj=kt(function(c,p,S){return ug(c,Pa(p)||0,S)});function pj(c){return fe(c,V)}function ty(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new bi(a);var S=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=S.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return S.cache=F.set(D,Y)||F,Y};return S.cache=new(ty.Cache||Go),S}ty.Cache=Go;function ny(c){if(typeof c!="function")throw new bi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function gj(c){return tE(2,c)}var mj=IS(function(c,p){p=p.length==1&&Rt(p[0])?Fn(p[0],Er(Pe())):Fn(Tr(p,1),Er(Pe()));var S=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,S);++D=p}),vf=lp(function(){return arguments}())?lp:function(c){return xr(c)&&tn.call(c,"callee")&&!K1.call(c,"callee")},Rt=ge.isArray,Mj=Yr?Er(Yr):fg;function bo(c){return c!=null&&ry(c.length)&&!ru(c)}function Mr(c){return xr(c)&&bo(c)}function Ij(c){return c===!0||c===!1||xr(c)&&si(c)==Qe}var _c=M2||QS,Oj=co?Er(co):hg;function Rj(c){return xr(c)&&c.nodeType===1&&!Lg(c)}function Nj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||wp(c)||vf(c)))return!c.length;var p=ui(c);if(p==Ee||p==Ut)return!c.size;if(Pg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Dj(c,p){return vc(c,p)}function zj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?vc(c,p,n,S):!!A}function WS(c){if(!xr(c))return!1;var p=si(c);return p==ft||p==Ct||typeof c.message=="string"&&typeof c.name=="string"&&!Lg(c)}function Bj(c){return typeof c=="number"&&Yh(c)}function ru(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==vt||p==De||p==an}function sE(c){return typeof c=="number"&&c==Dt(c)}function ry(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var lE=Vi?Er(Vi):MS;function Fj(c,p){return c===p||yc(c,p,Pt(p))}function $j(c,p,S){return S=typeof S=="function"?S:n,yc(c,p,Pt(p),S)}function Hj(c){return uE(c)&&c!=+c}function Wj(c){if(kU(c))throw new Et(o);return up(c)}function Vj(c){return c===null}function Uj(c){return c==null}function uE(c){return typeof c=="number"||xr(c)&&si(c)==Je}function Lg(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ii}var VS=Sa?Er(Sa):ar;function Gj(c){return sE(c)&&c>=-G&&c<=G}var cE=Hs?Er(Hs):Bt;function iy(c){return typeof c=="string"||!Rt(c)&&xr(c)&&si(c)==sn}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==yn}var wp=$1?Er($1):zr;function jj(c){return c===n}function Yj(c){return xr(c)&&ui(c)==Xe}function qj(c){return xr(c)&&si(c)==Xt}var Kj=_(qs),Xj=_(function(c,p){return c<=p});function dE(c){if(!c)return[];if(bo(c))return iy(c)?Ni(c):_i(c);if(oc&&c[oc])return _2(c[oc]());var p=ui(c),S=p==Ee?Vh:p==Ut?Yd:Cp;return S(c)}function iu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=iu(c),S=p%1;return p===p?S?p-S:p:0}function fE(c){return c?Ql(Dt(c),0,me):0}function Pa(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Ui(c);var S=I1.test(c);return S||R1.test(c)?Ye(c.slice(2),S?2:8):M1.test(c)?ce:+c}function hE(c){return ka(c,So(c))}function Zj(c){return c?Ql(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Yi(c)}var Qj=qi(function(c,p){if(Pg(p)||bo(p)){ka(p,ci(p),c);return}for(var S in p)tn.call(p,S)&&js(c,S,p[S])}),pE=qi(function(c,p){ka(p,So(p),c)}),oy=qi(function(c,p,S,A){ka(p,So(p),c,A)}),Jj=qi(function(c,p,S,A){ka(p,ci(p),c,A)}),eY=nr(Zh);function tY(c,p){var S=Zl(c);return p==null?S:Ke(S,p)}var nY=kt(function(c,p){c=cn(c);var S=-1,A=p.length,D=A>2?p[2]:n;for(D&&Ki(p[0],p[1],D)&&(A=1);++S1),F}),ka(c,pe(c),S),A&&(S=ai(S,g|m|v,At));for(var D=p.length;D--;)mp(S,p[D]);return S});function SY(c,p){return mE(c,ny(Pe(p)))}var xY=nr(function(c,p){return c==null?{}:mg(c,p)});function mE(c,p){if(c==null)return{};var S=Fn(pe(c),function(A){return[A]});return p=Pe(p),cp(c,S,function(A,D){return p(A,D[0])})}function wY(c,p,S){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var D=Q1();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return lf(c,p)}var OY=nl(function(c,p,S){return p=p.toLowerCase(),c+(S?bE(p):p)});function bE(c){return jS(xn(c).toLowerCase())}function SE(c){return c=xn(c),c&&c.replace(D1,C2).replace(Nh,"")}function RY(c,p,S){c=xn(c),p=Yi(p);var A=c.length;S=S===n?A:Ql(Dt(S),0,A);var D=S;return S-=p.length,S>=0&&c.slice(S,D)==p}function NY(c){return c=xn(c),c&&ya.test(c)?c.replace(Os,es):c}function DY(c){return c=xn(c),c&&k1.test(c)?c.replace(Md,"\\$&"):c}var zY=nl(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),BY=nl(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),FY=Sp("toLowerCase");function $Y(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Xl(D),S)+c+d(ef(D),S)}function HY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;return p&&A>>0,S?(c=xn(c),c&&(typeof p=="string"||p!=null&&!VS(p))&&(p=Yi(p),!p&&ql(c))?as(Ni(c),0,S):c.split(p,S)):[]}var qY=nl(function(c,p,S){return c+(S?" ":"")+jS(p)});function KY(c,p,S){return c=xn(c),S=S==null?0:Ql(Dt(S),0,c.length),p=Yi(p),c.slice(S,S+p.length)==p}function XY(c,p,S){var A=B.templateSettings;S&&Ki(c,p,S)&&(p=n),c=xn(c),p=oy({},p,A,Ne);var D=oy({},p.imports,A.imports,Ne),F=ci(D),Y=jd(D,F),Z,le,we=0,Ce=p.interpolate||Ns,Te="__p += '",Ue=Kd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?A1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),lt="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zh+"]")+` -`;c.replace(Ue,function(xt,jt,Jt,Qo,Xi,Jo){return Jt||(Jt=Qo),Te+=c.slice(we,Jo).replace(z1,Vs),jt&&(Z=!0,Te+=`' + -__e(`+jt+`) + -'`),Xi&&(le=!0,Te+=`'; -`+Xi+`; -__p += '`),Jt&&(Te+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),we=Jo+xt.length,xt}),Te+=`'; -`;var St=tn.call(p,"variable")&&p.variable;if(!St)Te=`with (obj) { -`+Te+` -} -`;else if(T1.test(St))throw new Et(s);Te=(le?Te.replace(Zt,""):Te).replace(er,"$1").replace(lo,"$1;"),Te="function("+(St||"obj")+`) { -`+(St?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(le?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Te+`return __p -}`;var $t=wE(function(){return Qt(F,lt+"return "+Te).apply(n,Y)});if($t.source=Te,WS($t))throw $t;return $t}function ZY(c){return xn(c).toLowerCase()}function QY(c){return xn(c).toUpperCase()}function JY(c,p,S){if(c=xn(c),c&&(S||p===n))return Ui(c);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function eq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.slice(0,G1(c)+1);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function tq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.replace($u,"");if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function nq(c,p){var S=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;S="length"in p?Dt(p.length):S,A="omission"in p?Yi(p.omission):A}c=xn(c);var F=c.length;if(ql(c)){var Y=Ni(c);F=Y.length}if(S>=F)return c;var Z=S-wa(A);if(Z<1)return A;var le=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return le+A;if(Y&&(Z+=le.length-Z),VS(D)){if(c.slice(Z).search(D)){var we,Ce=le;for(D.global||(D=Kd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Te=we.index;le=le.slice(0,Te===n?Z:Te)}}else if(c.indexOf(Yi(D),Z)!=Z){var Ue=le.lastIndexOf(D);Ue>-1&&(le=le.slice(0,Ue))}return le+A}function rq(c){return c=xn(c),c&&C1.test(c)?c.replace(mi,P2):c}var iq=nl(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),jS=Sp("toUpperCase");function xE(c,p,S){return c=xn(c),p=S?n:p,p===n?Wh(c)?qd(c):W1(c):c.match(p)||[]}var wE=kt(function(c,p){try{return yi(c,n,p)}catch(S){return WS(S)?S:new Et(S)}}),oq=nr(function(c,p){return Gn(p,function(S){S=rl(S),jo(c,S,$S(c[S],c))}),c});function aq(c){var p=c==null?0:c.length,S=Pe();return c=p?Fn(c,function(A){if(typeof A[1]!="function")throw new bi(a);return[S(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var S=me,A=Kr(c,me);p=Pe(p),c-=me;for(var D=Gd(A,p);++S0||p<0)?new Gt(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(me)},Ko(Gt.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,le=Y instanceof Gt,we=Z[0],Ce=le||Rt(Y),Te=function(jt){var Jt=D.apply(B,xa([jt],Z));return A&&Ue?Jt[0]:Jt};Ce&&S&&typeof we=="function"&&we.length!=1&&(le=Ce=!1);var Ue=this.__chain__,lt=!!this.__actions__.length,St=F&&!Ue,$t=le&&!lt;if(!F&&Ce){Y=$t?Y:new Gt(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:Q2,args:[Te],thisArg:n}),new Gi(xt,Ue)}return St&&$t?c.apply(this,Z):(xt=this.thru(Te),St?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],D)}return this[S](function(Y){return p.apply(Rt(Y)?Y:[],D)})}}),Ko(Gt.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:S})}}),ts[pf(n,P).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=xi,Gt.prototype.value=D2,B.prototype.at=RG,B.prototype.chain=NG,B.prototype.commit=DG,B.prototype.next=zG,B.prototype.plant=FG,B.prototype.reverse=$G,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=HG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=BG),B},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Tt._=Ca):yt._=Ca}).call(bs)})(Jr,Jr.exports);const Ze=Jr.exports;var Pye=Object.create,A$=Object.defineProperty,Tye=Object.getOwnPropertyDescriptor,Lye=Object.getOwnPropertyNames,Aye=Object.getPrototypeOf,Mye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Iye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lye(t))!Mye.call(e,i)&&i!==n&&A$(e,i,{get:()=>t[i],enumerable:!(r=Tye(t,i))||r.enumerable});return e},M$=(e,t,n)=>(n=e!=null?Pye(Aye(e)):{},Iye(t||!e||!e.__esModule?A$(n,"default",{value:e,enumerable:!0}):n,e)),Oye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),I$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Xb=Be((e,t)=>{var n=I$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Rye=Be((e,t)=>{var n=Xb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),Nye=Be((e,t)=>{var n=Xb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Dye=Be((e,t)=>{var n=Xb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),zye=Be((e,t)=>{var n=Xb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Zb=Be((e,t)=>{var n=Oye(),r=Rye(),i=Nye(),o=Dye(),a=zye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Zb();function r(){this.__data__=new n,this.size=0}t.exports=r}),Fye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),$ye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),Hye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),O$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Mu=Be((e,t)=>{var n=O$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),B_=Be((e,t)=>{var n=Mu(),r=n.Symbol;t.exports=r}),Wye=Be((e,t)=>{var n=B_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Vye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Qb=Be((e,t)=>{var n=B_(),r=Wye(),i=Vye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),R$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),N$=Be((e,t)=>{var n=Qb(),r=R$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Uye=Be((e,t)=>{var n=Mu(),r=n["__core-js_shared__"];t.exports=r}),Gye=Be((e,t)=>{var n=Uye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),D$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),jye=Be((e,t)=>{var n=N$(),r=Gye(),i=R$(),o=D$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Yye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),m1=Be((e,t)=>{var n=jye(),r=Yye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),F_=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Map");t.exports=i}),Jb=Be((e,t)=>{var n=m1(),r=n(Object,"create");t.exports=r}),qye=Be((e,t)=>{var n=Jb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),Kye=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Xye=Be((e,t)=>{var n=Jb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),Zye=Be((e,t)=>{var n=Jb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),Qye=Be((e,t)=>{var n=Jb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Jye=Be((e,t)=>{var n=qye(),r=Kye(),i=Xye(),o=Zye(),a=Qye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Jye(),r=Zb(),i=F_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),t3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),eS=Be((e,t)=>{var n=t3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),n3e=Be((e,t)=>{var n=eS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),r3e=Be((e,t)=>{var n=eS();function r(i){return n(this,i).get(i)}t.exports=r}),i3e=Be((e,t)=>{var n=eS();function r(i){return n(this,i).has(i)}t.exports=r}),o3e=Be((e,t)=>{var n=eS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),z$=Be((e,t)=>{var n=e3e(),r=n3e(),i=r3e(),o=i3e(),a=o3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Zb(),r=F_(),i=z$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Zb(),r=Bye(),i=Fye(),o=$ye(),a=Hye(),s=a3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),l3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),u3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),c3e=Be((e,t)=>{var n=z$(),r=l3e(),i=u3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),B$=Be((e,t)=>{var n=c3e(),r=d3e(),i=f3e(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Mu(),r=n.Uint8Array;t.exports=r}),p3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),g3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),m3e=Be((e,t)=>{var n=B_(),r=h3e(),i=I$(),o=B$(),a=p3e(),s=g3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function N(z,V,$,j,ue,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case b:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,ue,W,Q);return Q.delete(z),G;case k:if(R)return R.call(z)==R.call(V)}return!1}t.exports=N}),v3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),y3e=Be((e,t)=>{var n=v3e(),r=$_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),b3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),x3e=Be((e,t)=>{var n=b3e(),r=S3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),C3e=Be((e,t)=>{var n=Qb(),r=tS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),_3e=Be((e,t)=>{var n=C3e(),r=tS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),k3e=Be((e,t)=>{function n(){return!1}t.exports=n}),F$=Be((e,t)=>{var n=Mu(),r=k3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),E3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),P3e=Be((e,t)=>{var n=Qb(),r=$$(),i=tS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",ue="[object Uint32Array]",W={};W[M]=W[O]=W[R]=W[N]=W[z]=W[V]=W[$]=W[j]=W[ue]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[b]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),T3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),L3e=Be((e,t)=>{var n=O$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),H$=Be((e,t)=>{var n=P3e(),r=T3e(),i=L3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),A3e=Be((e,t)=>{var n=w3e(),r=_3e(),i=$_(),o=F$(),a=E3e(),s=H$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),M3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),I3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),O3e=Be((e,t)=>{var n=I3e(),r=n(Object.keys,Object);t.exports=r}),R3e=Be((e,t)=>{var n=M3e(),r=O3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),N3e=Be((e,t)=>{var n=N$(),r=$$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),D3e=Be((e,t)=>{var n=A3e(),r=R3e(),i=N3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),z3e=Be((e,t)=>{var n=y3e(),r=x3e(),i=D3e();function o(a){return n(a,i,r)}t.exports=o}),B3e=Be((e,t)=>{var n=z3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),O=m.get(l);if(M&&O)return M==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=m1(),r=Mu(),i=n(r,"DataView");t.exports=i}),$3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Promise");t.exports=i}),H3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Set");t.exports=i}),W3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"WeakMap");t.exports=i}),V3e=Be((e,t)=>{var n=F3e(),r=F_(),i=$3e(),o=H3e(),a=W3e(),s=Qb(),l=D$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=b||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(O){var R=s(O),N=R==h?O.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case T:return v}return R}),t.exports=M}),U3e=Be((e,t)=>{var n=s3e(),r=B$(),i=m3e(),o=B3e(),a=V3e(),s=$_(),l=F$(),u=H$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,T,M,O,R){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,ue=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return R||(R=new n),N||u(P)?r(P,k,T,M,O,R):i(P,k,V,T,M,O,R);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=ue&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return R||(R=new n),O(J,K,T,M,R)}}return W?(R||(R=new n),o(P,k,T,M,O,R)):!1}t.exports=E}),G3e=Be((e,t)=>{var n=U3e(),r=tS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),W$=Be((e,t)=>{var n=G3e();function r(i,o){return n(i,o)}t.exports=r}),j3e=["ctrl","shift","alt","meta","mod"],Y3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Ew(e,t=","){return typeof e=="string"?e.split(t):e}function jm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Y3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!j3e.includes(o));return{...r,keys:i}}function q3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function K3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function X3e(e){return V$(e,["input","textarea","select"])}function V$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function Z3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var Q3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},J3e=C.exports.createContext(void 0),e5e=()=>C.exports.useContext(J3e),t5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),n5e=()=>C.exports.useContext(t5e),r5e=M$(W$());function i5e(e){let t=C.exports.useRef(void 0);return(0,r5e.default)(t.current,e)||(t.current=e),t.current}var YA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function gt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=i5e(a),{enabledScopes:h}=n5e(),g=e5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Z3e(h,u?.scopes))return;let m=w=>{if(!(X3e(w)&&!V$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){YA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Ew(e,u?.splitKey).forEach(E=>{let P=jm(E,u?.combinationKey);if(Q3e(w,P,o)||P.keys?.includes("*")){if(q3e(w,P,u?.preventDefault),!K3e(w,P,u?.enabled)){YA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.addHotkey(jm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.removeHotkey(jm(w,u?.combinationKey)))}},[e,l,u,h]),i}M$(W$());var i7=new Set;function o5e(e){(Array.isArray(e)?e:[e]).forEach(t=>i7.add(jm(t)))}function a5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=jm(t);for(let r of i7)r.keys?.every(i=>n.keys?.includes(i))&&i7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{o5e(e.key)}),document.addEventListener("keyup",e=>{a5e(e.key)})});function s5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const l5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),u5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),c5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),d5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),f5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var eo=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(eo||{});const h5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},Fa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(xd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(x_,{className:"invokeai__switch-root",...s})]})})};function U$(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Rke(i.target.checked))})]})}const qA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(qA)&&u!==Number(M)&&O(String(u))},[u,M]);const R=z=>{O(z),z.match(qA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=Ze.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(V)),h(V)};return x(pi,{...k,children:ee(xd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(d_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(f_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(p_,{...P,className:"invokeai__number-input-stepper-button"}),x(h_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Iu=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(xd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(OF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},p5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],g5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],m5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],v5e=[{key:"2x",value:2},{key:"4x",value:4}],H_=0,W_=4294967295,y5e=["gfpgan","codeformer"],b5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],S5e=dt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),x5e=dt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(S5e),{isGFPGANAvailable:i}=Le(x5e),o=l=>e(t5(l)),a=l=>e(EV(l)),s=l=>e(n5(l.target.value));return ee(en,{direction:"column",gap:2,children:[x(Iu,{label:"Type",validValues:y5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function w5e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return x(Fa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(NV(r.target.checked))})}var G$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},KA=ae.createContext&&ae.createContext(G$),nd=globalThis&&globalThis.__assign||function(){return nd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ws(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:O,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:ue,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Me=Ie=>{const We=Ze.clamp(b?Math.floor(Number(Ie.target.value)):Number(Ie.target.value),o,me);ce(String(We)),l(We)},xe=Ie=>{ce(Ie),l(Number(Ie))},be=()=>{!T||T()};return ee(xd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(oB,{w:"100%",gap:2,children:[ee(S_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...G,children:[h&&ee(Wn,{children:[x(qC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(qC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(UF,{className:"invokeai__slider_track",...j,children:x(GF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(VF,{className:"invokeai__slider-thumb",...ue})})]}),v&&ee(d_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Me,className:"invokeai__slider-number-field",isDisabled:R,...W,children:[x(f_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(EF,{...ne,children:[x(p_,{className:"invokeai__slider-number-stepper"}),x(h_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(U_,{}),onClick:be,isDisabled:M,...K})]})]})}function Y$(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return x(ws,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(O7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(O7(.5))}})}const q$=()=>x(Bl,{flex:"1",textAlign:"left",children:"Other Options"}),A5e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(TV(r.target.checked))})})},M5e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(OV(r.target.checked))})})},K$=()=>ee(en,{gap:2,direction:"column",children:[x(M5e,{}),x(A5e,{})]}),G_=()=>x(Bl,{flex:"1",textAlign:"left",children:"Seed"});function I5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Fa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Ike(r.target.checked))})}function O5e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(v2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:H_,max:W_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const X$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function R5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(v2(X$(H_,W_))),children:x("p",{children:"Shuffle"})})}function N5e(){const e=qe(),t=Le(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(BV(r)),value:t,isInteger:!1})}function D5e(){const e=qe(),t=Le(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(MV(r)),value:t,isInteger:!1})}const j_=()=>ee(en,{gap:2,direction:"column",children:[x(I5e,{}),ee(en,{gap:2,children:[x(O5e,{}),x(R5e,{})]}),x(en,{gap:2,children:x(N5e,{})}),x(en,{gap:2,children:x(D5e,{})})]});function Z$(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Oke(i.target.checked))})]})}const z5e=dt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),B5e=dt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le(z5e),{isESRGANAvailable:r}=Le(B5e);return ee("div",{className:"upscale-options",children:[x(Iu,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(R7(Number(a.target.value))),validValues:v5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(N7(a)),value:n,isInteger:!1})]})};function F5e(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return x(Fa,{isChecked:e,width:"auto",onChange:r=>t(Tke(r.target.checked))})}function q_(){return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(F5e,{})]})}function $5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(xd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(F8,{...s,className:"input-entry",size:"sm",width:o})]})}function H5e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n(RV(i.target.value));return x($5e,{label:"Seed Weights",value:e,isInvalid:t&&!(z_(e)||e===""),isDisabled:!t,onChange:r})}function W5e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Dke(i)),isInteger:!1})}const K_=()=>ee(en,{gap:2,direction:"column",children:[x(W5e,{}),x(H5e,{})]});function V5e(){const e=qe(),t=Le(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(kV(r)),value:t,width:X_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=dt(e=>e.options,e=>xS[e.activeTab],{memoizeOptions:{equalityCheck:Ze.isEqual}}),U5e=dt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Q$=e=>e.options;function G5e(){const e=Le(i=>i.options.height),t=Le(_r),n=qe();return x(Iu,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(PV(Number(i.target.value))),validValues:m5e,styleClass:"main-option-block"})}const j5e=dt([e=>e.options,U5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function Y5e(){const e=qe(),{iterations:t,mayGenerateMultipleImages:n}=Le(j5e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(kke(i)),value:t,width:X_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function q5e(){const e=Le(r=>r.options.sampler),t=qe();return x(Iu,{label:"Sampler",value:e,onChange:r=>t(IV(r.target.value)),validValues:p5e,styleClass:"main-option-block"})}function K5e(){const e=qe(),t=Le(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(zV(r)),value:t,width:X_,styleClass:"main-option-block",textAlign:"center"})}function X5e(){const e=Le(i=>i.options.width),t=Le(_r),n=qe();return x(Iu,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(FV(Number(i.target.value))),validValues:g5e,styleClass:"main-option-block"})}const X_="auto";function Z_(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(Y5e,{}),x(K5e,{}),x(V5e,{})]}),ee("div",{className:"main-options-row",children:[x(X5e,{}),x(G5e,{}),x(q5e,{})]})]})})}const Z5e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},J$=Bb({name:"system",initialState:Z5e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:Q5e,setIsProcessing:yu,addLogEntry:Co,setShouldShowLogViewer:Pw,setIsConnected:XA,setSocketId:vTe,setShouldConfirmOnDelete:eH,setOpenAccordions:J5e,setSystemStatus:e4e,setCurrentStatus:Z3,setSystemConfig:t4e,setShouldDisplayGuides:n4e,processingCanceled:r4e,errorOccurred:ZA,errorSeen:tH,setModelList:QA,setIsCancelable:n0,modelChangeRequested:i4e,setSaveIntermediatesInterval:o4e,setEnableImageDebugging:a4e,generationRequested:s4e,addToast:fm,clearToastQueue:l4e,setProcessingIndeterminateTask:u4e}=J$.actions,c4e=J$.reducer;function d4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function f4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function nH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function h4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const g4e=dt(e=>e.system,e=>e.shouldDisplayGuides),m4e=({children:e,feature:t})=>{const n=Le(g4e),{text:r}=h5e[t];return n?ee(g_,{trigger:"hover",children:[x(y_,{children:x(Bl,{children:e})}),ee(v_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(m_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},v4e=ke(({feature:e,icon:t=d4e},n)=>x(m4e,{feature:e,children:x(Bl,{ref:n,children:x(va,{marginBottom:"-.15rem",as:t})})}));function y4e(e){const{header:t,feature:n,options:r}=e;return ee(Vf,{className:"advanced-settings-item",children:[x("h2",{children:ee(Hf,{className:"advanced-settings-header",children:[t,x(v4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const Q_=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return x(wb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(J5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(y4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function b4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function S4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function x4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function rH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function iH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function J_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function oH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function nS(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function JA(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function v1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function ek(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function tk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const K4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],nk=e=>e.kind==="line"&&e.layer==="mask",X4e=e=>e.kind==="line"&&e.layer==="base",f4=e=>e.kind==="image"&&e.layer==="base",Z4e=e=>e.kind==="line",Dn=e=>e.canvas,Ou=e=>e.canvas.layerState.stagingArea.images.length>0,uH=e=>e.canvas.layerState.objects.find(f4),cH=dt([e=>e.options,e=>e.system,uH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(z_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ze.isEqual,resultEqualityCheck:Ze.isEqual}}),o7=ti("socketio/generateImage"),Q4e=ti("socketio/runESRGAN"),J4e=ti("socketio/runFacetool"),ebe=ti("socketio/deleteImage"),a7=ti("socketio/requestImages"),eM=ti("socketio/requestNewImages"),tbe=ti("socketio/cancelProcessing"),nbe=ti("socketio/requestSystemConfig"),dH=ti("socketio/requestModelChange"),rbe=ti("socketio/saveStagingAreaImageToGallery"),ibe=ti("socketio/requestEmptyTempFolder"),ra=ke((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function fH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(cH),o=Le(_r),a=()=>{r(o7(o))};return gt(["ctrl+enter","meta+enter"],()=>{i&&r(o7(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x($4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const obe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function hH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(obe),a=()=>n(tbe());return gt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(p4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const abe=dt(e=>e.options,e=>e.shouldLoopback),sbe=()=>{const e=qe(),t=Le(abe);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(W4e,{}),onClick:()=>{e(Ake(!t))}})},rk=()=>{const e=Le(_r);return ee("div",{className:"process-buttons",children:[x(fH,{}),e==="img2img"&&x(sbe,{}),x(hH,{})]})},lbe=dt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ik=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(lbe),{isReady:r}=Le(cH),i=C.exports.useRef(null),o=s=>{e(wS(s.target.value))};gt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(o7(n)))};return x("div",{className:"prompt-bar",children:x(xd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(JF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function pH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function gH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function ube(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function cbe(e,t){e.classList?e.classList.add(t):ube(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function tM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function dbe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=tM(e.className,t):e.setAttribute("class",tM(e.className&&e.className.baseVal||"",t))}const nM={disabled:!1},mH=ae.createContext(null);var vH=function(t){return t.scrollTop},hm="unmounted",Pf="exited",Tf="entering",$p="entered",s7="exiting",Ru=function(e){e_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=$p:r.unmountOnExit||r.mountOnEnter?l=hm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===hm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==$p&&(o=Tf):(a===Tf||a===$p)&&(o=s7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Cy.findDOMNode(this);a&&vH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:hm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Cy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||nM.disabled){this.safeSetState({status:$p},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:$p},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Cy.findDOMNode(this);if(!o||nM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:s7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Cy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===hm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Z8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(mH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ru.contextType=mH;Ru.propTypes={};function Op(){}Ru.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ru.UNMOUNTED=hm;Ru.EXITED=Pf;Ru.ENTERING=Tf;Ru.ENTERED=$p;Ru.EXITING=s7;const fbe=Ru;var hbe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return cbe(t,r)})},Tw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return dbe(t,r)})},ok=function(e){e_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Gc=(e,t)=>Math.round(e/t)*t,Rp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},rM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),pbe=e=>({width:Gc(e.width,64),height:Gc(e.height,64)}),gbe=.999,mbe=.1,vbe=20,jg=.95,pm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},ybe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:pm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},bH=Bb({name:"canvas",initialState:ybe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!nk(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(Ze.clamp(n.width,64,512),64),height:gl(Ze.clamp(n.height,64,512),64)},o={x:Gc(n.width/2-i.width/2,64),y:Gc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...pm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Rp(r.width,r.height,n.width,n.height,jg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(Ze.clamp(i,64,n/e.stageScale),64),s=gl(Ze.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=pbe(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=rM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...pm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(Z4e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=pm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(f4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Rp(i.width,i.height,512,512,jg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Rp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=rM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(f4)){const i=Rp(r.width,r.height,512,512,jg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Rp(r,i,s,l,jg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Rp(r,i,512,512,jg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...pm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(Ze.clamp(o,64,512),64),height:gl(Ze.clamp(a,64,512),64)},l={x:Gc(o/2-s.width/2,64),y:Gc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:bbe,addLine:SH,addPointToCurrentLine:xH,clearMask:Sbe,commitStagingAreaImage:xbe,discardStagedImages:wbe,fitBoundingBoxToStage:yTe,nextStagingAreaImage:Cbe,prevStagingAreaImage:_be,redo:kbe,resetCanvas:wH,resetCanvasInteractionState:Ebe,resetCanvasView:Pbe,resizeAndScaleCanvas:CH,resizeCanvas:Tbe,setBoundingBoxCoordinates:Lw,setBoundingBoxDimensions:gm,setBoundingBoxPreviewFill:bTe,setBrushColor:Lbe,setBrushSize:Aw,setCanvasContainerDimensions:Abe,clearCanvasHistory:_H,setCursorPosition:kH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ak,setInpaintReplace:iM,setIsDrawing:rS,setIsMaskEnabled:EH,setIsMouseOverBoundingBox:Yy,setIsMoveBoundingBoxKeyHeld:STe,setIsMoveStageKeyHeld:xTe,setIsMovingBoundingBox:oM,setIsMovingStage:h4,setIsTransformingBoundingBox:Mw,setLayer:PH,setMaskColor:Mbe,setMergedCanvas:Ibe,setShouldAutoSave:Obe,setShouldCropToBoundingBoxOnSave:Rbe,setShouldDarkenOutsideBoundingBox:Nbe,setShouldLockBoundingBox:wTe,setShouldPreserveMaskedArea:Dbe,setShouldShowBoundingBox:zbe,setShouldShowBrush:CTe,setShouldShowBrushPreview:_Te,setShouldShowCanvasDebugInfo:Bbe,setShouldShowCheckboardTransparency:kTe,setShouldShowGrid:Fbe,setShouldShowIntermediates:$be,setShouldShowStagingImage:Hbe,setShouldShowStagingOutline:aM,setShouldSnapToGrid:Wbe,setShouldUseInpaintReplace:Vbe,setStageCoordinates:TH,setStageDimensions:ETe,setStageScale:Ube,setTool:M0,toggleShouldLockBoundingBox:PTe,toggleTool:TTe,undo:Gbe}=bH.actions,jbe=bH.reducer,LH=""+new URL("logo.13003d72.png",import.meta.url).href,Ybe=dt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),sk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(Ybe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;gt("o",()=>{t(ad(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),gt("esc",()=>{t(ad(!1))},{enabled:()=>!i,preventDefault:!0},[i]),gt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Eke(a.current?a.current.scrollTop:0)),t(ad(!1)),t(Lke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Mke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(yH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(pH,{}):x(gH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:LH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function qbe(){Le(t=>t.options.showAdvancedOptions);const e={seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})},face_restore:{header:x(U$,{}),feature:eo.FACE_CORRECTION,options:x(V_,{})},upscale:{header:x(Z$,{}),feature:eo.UPSCALE,options:x(Y_,{})},other:{header:x(q$,{}),feature:eo.OTHER,options:x(K$,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Y$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(w5e,{}),x(Q_,{accordionInfo:e})]})}const lk=C.exports.createContext(null),Kbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(lk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(ek,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},Xbe=dt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),l7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Av(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(Xbe),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(ebe(e)),o()};gt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(eH(!b.target.checked));return ee(Wn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(CF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Z0,{children:ee(_F,{className:"modal",children:[x(Ob,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Nv,{children:ee(en,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(xd,{children:ee(en,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(x_,{checked:!s,onChange:v})]})})]})}),ee(Ib,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),rd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(g_,{...o,children:[x(y_,{children:t}),ee(v_,{className:`invokeai__popover-content ${r}`,children:[i&&x(m_,{className:"invokeai__popover-arrow"}),n]})]})},Zbe=dt([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),AH=()=>{const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(Zbe),m=c2(),v=()=>{!u||(h&&e(gd(!1)),e(m2(u)),e(ko("img2img")))},b=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};gt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(wke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};gt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(v2(u.metadata.image.seed))};gt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(wS(u.metadata.image.prompt));gt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(Q4e(u))};gt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(J4e(u))};gt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(DV(!l)),O=()=>{!u||(h&&e(gd(!1)),e(ak(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return gt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(G4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(JA,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:O,leftIcon:x(JA,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:b,leftIcon:x(nS,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(aH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(mt,{icon:x(H4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(mt,{icon:x(U4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(mt,{icon:x(k4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(rd,{trigger:"hover",triggerComponent:x(mt,{icon:x(I4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(V_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(rd,{trigger:"hover",triggerComponent:x(mt,{icon:x(L4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Y_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(mt,{icon:x(oH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(l7,{image:u,children:x(mt,{icon:x(v1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},Qbe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},MH=Bb({name:"gallery",initialState:Qbe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:r0,clearIntermediateImage:Iw,removeImage:IH,setCurrentImage:Jbe,addGalleryImages:eSe,setIntermediateImage:tSe,selectNextImage:uk,selectPrevImage:ck,setShouldPinGallery:nSe,setShouldShowGallery:id,setGalleryScrollPosition:rSe,setGalleryImageMinimumWidth:Yg,setGalleryImageObjectFit:iSe,setShouldHoldGalleryOpen:OH,setShouldAutoSwitchToNewImages:oSe,setCurrentCategory:qy,setGalleryWidth:aSe,setShouldUseSingleGalleryColumn:sSe}=MH.actions,lSe=MH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var RH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Wn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function uSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const In=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(en,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(uSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(nS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(en,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(RH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),cSe=(e,t)=>e.image.uuid===t.image.uuid,NH=C.exports.memo(({image:e,styleClass:t})=>{const n=qe();gt("esc",()=>{n(DV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:b,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:O,type:R,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(en,{gap:1,direction:"column",width:"100%",children:[ee(en,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(RH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Wn,{children:[R&&x(In,{label:"Generation type",value:R}),e.metadata?.model_weights&&x(In,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(R)&&x(In,{label:"Original image",value:g}),R==="gfpgan"&&M!==void 0&&x(In,{label:"Fix faces strength",value:M,onClick:()=>n(t5(M))}),R==="esrgan"&&E!==void 0&&x(In,{label:"Upscaling scale",value:E,onClick:()=>n(R7(E))}),R==="esrgan"&&M!==void 0&&x(In,{label:"Upscaling strength",value:M,onClick:()=>n(N7(M))}),b&&x(In,{label:"Prompt",labelPosition:"top",value:X3(b),onClick:()=>n(wS(b))}),k!==void 0&&x(In,{label:"Seed",value:k,onClick:()=>n(v2(k))}),O!==void 0&&x(In,{label:"Noise Threshold",value:O,onClick:()=>n(BV(O))}),m!==void 0&&x(In,{label:"Perlin Noise",value:m,onClick:()=>n(MV(m))}),w&&x(In,{label:"Sampler",value:w,onClick:()=>n(IV(w))}),T&&x(In,{label:"Steps",value:T,onClick:()=>n(zV(T))}),o!==void 0&&x(In,{label:"CFG scale",value:o,onClick:()=>n(kV(o))}),N&&N.length>0&&x(In,{label:"Seed-weight pairs",value:d4(N),onClick:()=>n(RV(d4(N)))}),P&&x(In,{label:"Seamless",value:P,onClick:()=>n(OV(P))}),l&&x(In,{label:"High Resolution Optimization",value:l,onClick:()=>n(TV(l))}),z&&x(In,{label:"Width",value:z,onClick:()=>n(FV(z))}),s&&x(In,{label:"Height",value:s,onClick:()=>n(PV(s))}),u&&x(In,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(m2(u))}),h&&x(In,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(AV(h))}),R==="img2img"&&M&&x(In,{label:"Image to image strength",value:M,onClick:()=>n(O7(M))}),a&&x(In,{label:"Image to image fit",value:a,onClick:()=>n(NV(a))}),v&&v.length>0&&ee(Wn,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:ue,strength:W}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(In,{label:"Scale",value:ue,onClick:()=>n(R7(ue))}),x(In,{label:"Strength",value:W,onClick:()=>n(N7(W))})]},j)}else if($.type==="gfpgan"){const{strength:ue}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(In,{label:"Strength",value:ue,onClick:()=>{n(t5(ue)),n(n5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:ue,fidelity:W}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(In,{label:"Strength",value:ue,onClick:()=>{n(t5(ue)),n(n5("codeformer"))}}),W&&x(In,{label:"Fidelity",value:W,onClick:()=>{n(EV(W)),n(n5("codeformer"))}})]},j)}})]}),i&&x(In,{withCopy:!0,label:"Dream Prompt",value:i}),ee(en,{gap:2,direction:"column",children:[ee(en,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(nS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(eB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},cSe),DH=dt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function dSe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le(DH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(ck())},g=()=>{e(uk())},m=()=>{e(gd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(_b,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(rH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(NH,{image:i,styleClass:"current-image-metadata"})]})}const fSe=dt([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),zH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(fSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Wn,{children:[x(AH,{}),x(dSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(h4e,{})})})},hSe=()=>{const e=C.exports.useContext(lk);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(ek,{}),onClick:e||void 0})};function pSe(){const e=Le(i=>i.options.initialImage),t=qe(),n=c2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(_V())};return ee(Wn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(hSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(_b,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const gSe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(pSe,{})}):x(Kbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(zH,{})})]})};function mSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var vSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},_Se=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],dM="__resizable_base__",BH=function(e){SSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(dM):o.className+=dM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||xSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Ow(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Ow(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Ow(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Dp("left",o),s=i&&Dp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,M=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),N=Math.min(v,T);n=Xy(n,M,O),r=Xy(r,R,N)}else n=Xy(n,h,g),r=Xy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&wSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Zy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Zy(n)?n.touches[0].clientX:n.clientX,h=Zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=CSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=cM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=cM(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=uM(M,this.props.grid[0]),z=uM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(b.endsWith("vw")){var ue=M/this.window.innerWidth*100;M=ue+"vw"}else if(b.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var ue=T/this.window.innerWidth*100;T=ue+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Dl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(bSe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return _Se.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function d2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,kSe(i,...t)]}function kSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ESe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function FH(...e){return t=>e.forEach(n=>ESe(n,t))}function ja(...e){return C.exports.useCallback(FH(...e),e)}const Fv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(TSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(u7,Ln({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(u7,Ln({},r,{ref:t}),n)});Fv.displayName="Slot";const u7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...LSe(r,n.props),ref:FH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});u7.displayName="SlotClone";const PSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function TSe(e){return C.exports.isValidElement(e)&&e.type===PSe}function LSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const ASe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Pu=ASe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Fv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Ln({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $H(e,t){e&&Dl.exports.flushSync(()=>e.dispatchEvent(t))}function HH(e){const t=e+"CollectionProvider",[n,r]=d2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(b,P.collectionRef);return ae.createElement(Fv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(b,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Fv,{[h]:"",ref:T},E)});function m(v){const b=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((M,O)=>P.indexOf(M.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const MSe=C.exports.createContext(void 0);function WH(e){const t=C.exports.useContext(MSe);return e||t||"ltr"}function Ol(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ISe(e,t=globalThis?.document){const n=Ol(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const c7="dismissableLayer.update",OSe="dismissableLayer.pointerDownOutside",RSe="dismissableLayer.focusOutside";let fM;const NSe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DSe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(NSe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,R=zSe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!O||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=BSe(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ISe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(fM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),hM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=fM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),hM())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(c7,z),()=>document.removeEventListener(c7,z)},[]),C.exports.createElement(Pu.div,Ln({},u,{ref:w,style:{pointerEvents:M?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function zSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){VH(OSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function BSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&VH(RSe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hM(){const e=new CustomEvent(c7);document.dispatchEvent(e)}function VH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$H(i,o):i.dispatchEvent(o)}let Rw=0;function FSe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:pM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:pM()),Rw++,()=>{Rw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Rw--}},[])}function pM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Nw="focusScope.autoFocusOnMount",Dw="focusScope.autoFocusOnUnmount",gM={bubbles:!1,cancelable:!0},$Se=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ol(i),h=Ol(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){vM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Nw,gM);s.addEventListener(Nw,u),s.dispatchEvent(P),P.defaultPrevented||(HSe(jSe(UH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(Nw,u),setTimeout(()=>{const P=new CustomEvent(Dw,gM);s.addEventListener(Dw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Dw,h),vM.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=WSe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Pu.div,Ln({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function HSe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function WSe(e){const t=UH(e),n=mM(t,e),r=mM(t.reverse(),e);return[n,r]}function UH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function mM(e,t){for(const n of e)if(!VSe(n,{upTo:t}))return n}function VSe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function USe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&USe(e)&&t&&e.select()}}const vM=GSe();function GSe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=yM(e,t),e.unshift(t)},remove(t){var n;e=yM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function yM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jSe(e){return e.filter(t=>t.tagName!=="A")}const J0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},YSe=Zw["useId".toString()]||(()=>{});let qSe=0;function KSe(e){const[t,n]=C.exports.useState(YSe());return J0(()=>{e||n(r=>r??String(qSe++))},[e]),e||(t?`radix-${t}`:"")}function y1(e){return e.split("-")[0]}function iS(e){return e.split("-")[1]}function b1(e){return["top","bottom"].includes(y1(e))?"x":"y"}function dk(e){return e==="y"?"height":"width"}function bM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=b1(t),l=dk(s),u=r[l]/2-i[l]/2,h=y1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(iS(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const XSe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=bM(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=GH(r),h={x:i,y:o},g=b1(a),m=iS(a),v=dk(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const O=P/2-k/2,R=u[w],N=M-b[v]-u[E],z=M/2-b[v]/2+O,V=d7(R,z,N),ue=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zexe[t])}function txe(e,t,n){n===void 0&&(n=!1);const r=iS(e),i=b1(e),o=dk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=m4(a)),{main:a,cross:m4(a)}}const nxe={start:"end",end:"start"};function xM(e){return e.replace(/start|end/g,t=>nxe[t])}const rxe=["top","right","bottom","left"];function ixe(e){const t=m4(e);return[xM(e),t,xM(t)]}const oxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=y1(r),P=g||(w===a||!v?[m4(a)]:ixe(a)),k=[a,...P],T=await g4(t,b),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=txe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(O=[...O,{placement:r,overflows:M}],!M.every(V=>V<=0)){var R,N;const V=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=k[V];if($)return{data:{index:V,overflows:O},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const ue=(z=O.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;ue&&(j=ue);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function wM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function CM(e){return rxe.some(t=>e[t]>=0)}const axe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await g4(r,{...n,elementContext:"reference"}),a=wM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:CM(a)}}}case"escaped":{const o=await g4(r,{...n,altBoundary:!0}),a=wM(o,i.floating);return{data:{escapedOffsets:a,escaped:CM(a)}}}default:return{}}}}};async function sxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=y1(n),s=iS(n),l=b1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const lxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await sxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function jH(e){return e==="x"?"y":"x"}const uxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await g4(t,l),g=b1(y1(i)),m=jH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=d7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],T=b-h[P];b=d7(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},cxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=b1(i),m=jH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,N=o.reference[g]+o.reference[O]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const O=g==="y"?"width":"height",R=["top","left"].includes(y1(i)),N=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function YH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!YH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function f2(e){return Nu(e).getComputedStyle(e)}function Tu(e){return YH(e)?"":e?(e.nodeName||"").toLowerCase():""}function qH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Rl(e){return e instanceof Nu(e).HTMLElement}function pd(e){return e instanceof Nu(e).Element}function dxe(e){return e instanceof Nu(e).Node}function fk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oS(e){const{overflow:t,overflowX:n,overflowY:r}=f2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function fxe(e){return["table","td","th"].includes(Tu(e))}function KH(e){const t=/firefox/i.test(qH()),n=f2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function XH(){return!/^((?!chrome|android).)*safari/i.test(qH())}const _M=Math.min,Ym=Math.max,v4=Math.round;function Lu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Rl(e)&&(l=e.offsetWidth>0&&v4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&v4(s.height)/e.offsetHeight||1);const h=pd(e)?Nu(e):window,g=!XH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function kd(e){return((dxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function aS(e){return pd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ZH(e){return Lu(kd(e)).left+aS(e).scrollLeft}function hxe(e){const t=Lu(e);return v4(t.width)!==e.offsetWidth||v4(t.height)!==e.offsetHeight}function pxe(e,t,n){const r=Rl(t),i=kd(t),o=Lu(e,r&&hxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Tu(t)!=="body"||oS(i))&&(a=aS(t)),Rl(t)){const l=Lu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=ZH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function QH(e){return Tu(e)==="html"?e:e.assignedSlot||e.parentNode||(fk(e)?e.host:null)||kd(e)}function kM(e){return!Rl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function gxe(e){let t=QH(e);for(fk(t)&&(t=t.host);Rl(t)&&!["html","body"].includes(Tu(t));){if(KH(t))return t;t=t.parentNode}return null}function f7(e){const t=Nu(e);let n=kM(e);for(;n&&fxe(n)&&getComputedStyle(n).position==="static";)n=kM(n);return n&&(Tu(n)==="html"||Tu(n)==="body"&&getComputedStyle(n).position==="static"&&!KH(n))?t:n||gxe(e)||t}function EM(e){if(Rl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Lu(e);return{width:t.width,height:t.height}}function mxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rl(n),o=kd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Tu(n)!=="body"||oS(o))&&(a=aS(n)),Rl(n))){const l=Lu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function vxe(e,t){const n=Nu(e),r=kd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=XH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function yxe(e){var t;const n=kd(e),r=aS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ym(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ym(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+ZH(e);const l=-r.scrollTop;return f2(i||n).direction==="rtl"&&(s+=Ym(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function JH(e){const t=QH(e);return["html","body","#document"].includes(Tu(t))?e.ownerDocument.body:Rl(t)&&oS(t)?t:JH(t)}function y4(e,t){var n;t===void 0&&(t=[]);const r=JH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],oS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(y4(a))}function bxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Sxe(e,t){const n=Lu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function PM(e,t,n){return t==="viewport"?p4(vxe(e,n)):pd(t)?Sxe(t,n):p4(yxe(kd(e)))}function xxe(e){const t=y4(e),r=["absolute","fixed"].includes(f2(e).position)&&Rl(e)?f7(e):e;return pd(r)?t.filter(i=>pd(i)&&bxe(i,r)&&Tu(i)!=="body"):[]}function wxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?xxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=PM(t,h,i);return u.top=Ym(g.top,u.top),u.right=_M(g.right,u.right),u.bottom=_M(g.bottom,u.bottom),u.left=Ym(g.left,u.left),u},PM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Cxe={getClippingRect:wxe,convertOffsetParentRelativeRectToViewportRelativeRect:mxe,isElement:pd,getDimensions:EM,getOffsetParent:f7,getDocumentElement:kd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:pxe(t,f7(n),r),floating:{...EM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>f2(e).direction==="rtl"};function _xe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...pd(e)?y4(e):[],...y4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),pd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Lu(e):null;s&&b();function b(){const w=Lu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const kxe=(e,t,n)=>XSe(e,t,{platform:Cxe,...n});var h7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function p7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!p7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!p7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Exe(e){const t=C.exports.useRef(e);return h7(()=>{t.current=e}),t}function Pxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Exe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);p7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||kxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Dl.exports.flushSync(()=>{h(T)})})},[g,n,r]);h7(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);h7(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Txe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?SM({element:t.current,padding:n}).fn(i):{}:t?SM({element:t,padding:n}).fn(i):{}}}};function Lxe(e){const[t,n]=C.exports.useState(void 0);return J0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const eW="Popper",[hk,tW]=d2(eW),[Axe,nW]=hk(eW),Mxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Axe,{scope:t,anchor:r,onAnchorChange:i},n)},Ixe="PopperAnchor",Oxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=nW(Ixe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Pu.div,Ln({},i,{ref:s}))}),b4="PopperContent",[Rxe,LTe]=hk(b4),[Nxe,Dxe]=hk(b4,{hasParent:!1,positionUpdateFns:new Set}),zxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...O}=e,R=nW(b4,h),[N,z]=C.exports.useState(null),V=ja(t,_t=>z(_t)),[$,j]=C.exports.useState(null),ue=Lxe($),W=(n=ue?.width)!==null&&n!==void 0?n:0,Q=(r=ue?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Fxe),altBoundary:G},{reference:ce,floating:me,strategy:Me,x:xe,y:be,placement:Ie,middlewareData:We,update:De}=Pxe({strategy:"fixed",placement:ne,whileElementsMounted:_xe,middleware:[lxe({mainAxis:m+Q,alignmentAxis:b}),M?uxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?cxe():void 0,...X}):void 0,$?Txe({element:$,padding:w}):void 0,M?oxe({...X}):void 0,$xe({arrowWidth:W,arrowHeight:Q}),T?axe({strategy:"referenceHidden"}):void 0].filter(Bxe)});J0(()=>{ce(R.anchor)},[ce,R.anchor]);const Qe=xe!==null&&be!==null,[st,Ct]=rW(Ie),ft=(i=We.arrow)===null||i===void 0?void 0:i.x,ut=(o=We.arrow)===null||o===void 0?void 0:o.y,vt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ee,Je]=C.exports.useState();J0(()=>{N&&Je(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Dxe(b4,h),pt=!Lt;C.exports.useLayoutEffect(()=>{if(!pt)return it.add(De),()=>{it.delete(De)}},[pt,it,De]),C.exports.useLayoutEffect(()=>{pt&&Qe&&Array.from(it).reverse().forEach(_t=>requestAnimationFrame(_t))},[pt,Qe,it]);const an={"data-side":st,"data-align":Ct,...O,ref:V,style:{...O.style,animation:Qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Me,left:0,top:0,transform:Qe?`translate3d(${Math.round(xe)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ee,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Rxe,{scope:h,placedSide:st,onArrowChange:j,arrowX:ft,arrowY:ut,shouldHideArrow:vt},pt?C.exports.createElement(Nxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Pu.div,an)):C.exports.createElement(Pu.div,an)))});function Bxe(e){return e!==void 0}function Fxe(e){return e!==null}const $xe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=rW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return b==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):b==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,M=g?E:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function rW(e){const[t,n="center"]=e.split("-");return[t,n]}const Hxe=Mxe,Wxe=Oxe,Vxe=zxe;function Uxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const iW=e=>{const{present:t,children:n}=e,r=Gxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};iW.displayName="Presence";function Gxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Uxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Jy(r.current);o.current=s==="mounted"?u:"none"},[s]),J0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Jy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),J0(()=>{if(t){const u=g=>{const v=Jy(r.current).includes(g.animationName);g.target===t&&v&&Dl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Jy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Jy(e){return e?.animationName||"none"}function jxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Yxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ol(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Yxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ol(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const zw="rovingFocusGroup.onEntryFocus",qxe={bubbles:!1,cancelable:!0},pk="RovingFocusGroup",[g7,oW,Kxe]=HH(pk),[Xxe,aW]=d2(pk,[Kxe]),[Zxe,Qxe]=Xxe(pk),Jxe=C.exports.forwardRef((e,t)=>C.exports.createElement(g7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(g7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(ewe,Ln({},e,{ref:t}))))),ewe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=WH(o),[b=null,w]=jxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Ol(u),T=oW(n),M=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(zw,k),()=>N.removeEventListener(zw,k)},[k]),C.exports.createElement(Zxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Pu.div,Ln({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(zw,qxe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),ue=$.find(ne=>ne.id===b),Q=[j,ue,...$].filter(Boolean).map(ne=>ne.ref.current);sW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),twe="RovingFocusGroupItem",nwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=KSe(),s=Qxe(twe,n),l=s.currentTabStopId===a,u=oW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(g7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Pu.span,Ln({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=owe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?awe(w,E+1):w.slice(E+1)}setTimeout(()=>sW(w))}})})))}),rwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function owe(e,t,n){const r=iwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rwe[r]}function sW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const swe=Jxe,lwe=nwe,uwe=["Enter"," "],cwe=["ArrowDown","PageUp","Home"],lW=["ArrowUp","PageDown","End"],dwe=[...cwe,...lW],sS="Menu",[m7,fwe,hwe]=HH(sS),[xh,uW]=d2(sS,[hwe,tW,aW]),gk=tW(),cW=aW(),[pwe,lS]=xh(sS),[gwe,mk]=xh(sS),mwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=gk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ol(o),m=WH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Hxe,s,C.exports.createElement(pwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(gwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},vwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=gk(n);return C.exports.createElement(Wxe,Ln({},i,r,{ref:t}))}),ywe="MenuPortal",[ATe,bwe]=xh(ywe,{forceMount:void 0}),od="MenuContent",[Swe,dW]=xh(od),xwe=C.exports.forwardRef((e,t)=>{const n=bwe(od,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lS(od,e.__scopeMenu),a=mk(od,e.__scopeMenu);return C.exports.createElement(m7.Provider,{scope:e.__scopeMenu},C.exports.createElement(iW,{present:r||o.open},C.exports.createElement(m7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(wwe,Ln({},i,{ref:t})):C.exports.createElement(Cwe,Ln({},i,{ref:t})))))}),wwe=C.exports.forwardRef((e,t)=>{const n=lS(od,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return RB(o)},[]),C.exports.createElement(fW,Ln({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Cwe=C.exports.forwardRef((e,t)=>{const n=lS(od,e.__scopeMenu);return C.exports.createElement(fW,Ln({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),fW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=lS(od,n),E=mk(od,n),P=gk(n),k=cW(n),T=fwe(n),[M,O]=C.exports.useState(null),R=C.exports.useRef(null),N=ja(t,R,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),ue=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?SF:C.exports.Fragment,ne=v?{as:Fv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Me=T().filter(Qe=>!Qe.disabled),xe=document.activeElement,be=(X=Me.find(Qe=>Qe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Ie=Me.map(Qe=>Qe.textValue),We=Iwe(Ie,me,be),De=(ce=Me.find(Qe=>Qe.textValue===We))===null||ce===void 0?void 0:ce.ref.current;(function Qe(st){V.current=st,window.clearTimeout(z.current),st!==""&&(z.current=window.setTimeout(()=>Qe(""),1e3))})(me),De&&setTimeout(()=>De.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),FSe();const K=C.exports.useCallback(G=>{var X,ce;return ue.current===((X=j.current)===null||X===void 0?void 0:X.side)&&Rwe(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Swe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=R.current)===null||X===void 0||X.focus(),O(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement($Se,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=R.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(DSe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(swe,Ln({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Vxe,Ln({role:"menu","aria-orientation":"vertical","data-state":Lwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:N,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Me=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Me&&J(G.key));const xe=R.current;if(G.target!==xe||!dwe.includes(G.key))return;G.preventDefault();const Ie=T().filter(We=>!We.disabled).map(We=>We.ref.current);lW.includes(G.key)&&Ie.reverse(),Awe(Ie)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,y7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";ue.current=me,W.current=G.clientX}}))})))))))}),v7="MenuItem",TM="menu.itemSelect",_we=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=mk(v7,e.__scopeMenu),s=dW(v7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(TM,{bubbles:!0,cancelable:!0});g.addEventListener(TM,v=>r?.(v),{once:!0}),$H(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(kwe,Ln({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||uwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),kwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=dW(v7,n),s=cW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(m7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(lwe,Ln({asChild:!0},s,{focusable:!r}),C.exports.createElement(Pu.div,Ln({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,y7(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,y7(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Ewe="MenuRadioGroup";xh(Ewe,{value:void 0,onValueChange:()=>{}});const Pwe="MenuItemIndicator";xh(Pwe,{checked:!1});const Twe="MenuSub";xh(Twe);function Lwe(e){return e?"open":"closed"}function Awe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Iwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Mwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Owe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Rwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Owe(n,t)}function y7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Nwe=mwe,Dwe=vwe,zwe=xwe,Bwe=_we,hW="ContextMenu",[Fwe,MTe]=d2(hW,[uW]),uS=uW(),[$we,pW]=Fwe(hW),Hwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=uS(t),u=Ol(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement($we,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Nwe,Ln({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},Wwe="ContextMenuTrigger",Vwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=pW(Wwe,n),o=uS(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Dwe,Ln({},o,{virtualRef:s})),C.exports.createElement(Pu.span,Ln({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,e3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,e3(u)),onPointerCancel:Kn(e.onPointerCancel,e3(u)),onPointerUp:Kn(e.onPointerUp,e3(u))})))}),Uwe="ContextMenuContent",Gwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=pW(Uwe,n),o=uS(n),a=C.exports.useRef(!1);return C.exports.createElement(zwe,Ln({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),jwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=uS(n);return C.exports.createElement(Bwe,Ln({},i,r,{ref:t}))});function e3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Ywe=Hwe,qwe=Vwe,Kwe=Gwe,Sf=jwe,Xwe=dt([e=>e.gallery,e=>e.options,Ou,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Zwe=dt([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Qwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Jwe=C.exports.memo(e=>{const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(Zwe),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[b,w]=C.exports.useState(!1),E=c2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(wS(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(v2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(gd(!1)),t(m2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(gd(!1)),t(ak(l)),t(CH()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Cke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(xke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Ywe,{onOpenChange:$=>{t(OH($))},children:[x(qwe,{children:ee(Bl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(_b,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Jbe(l)),children:u&&x(va,{width:"50%",height:"50%",as:J_,className:"hoverable-image-check"})}),b&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(l7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(j4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(Kwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:O,children:"Send to Image To Image"}),x(Sf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(l7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},Qwe),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Vz,{className:`invokeai__checkbox ${n}`,...r,children:t})},t3=320,LM=40,e6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},AM=400;function gW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:b,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Le(Xwe),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:AM,galleryMaxWidth:AM}:e6e[u],[O,R]=C.exports.useState(b>=t3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),ue=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{b>=t3&&R(!1)},[b]);const Q=()=>{e(nSe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(id(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(id(!1)),e(OH(!1)),e(rSe(ue.current?ue.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(a7(n))},X=xe=>{e(Yg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};gt("g",()=>{ne()},[o,i]),gt("left",()=>{e(ck())},{enabled:!E},[E]),gt("right",()=>{e(uk())},{enabled:!E},[E]),gt("shift+g",()=>{Q()},[i]),gt("esc",()=>{e(id(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Me=32;return gt("shift+up",()=>{if(s<256){const xe=Ze.clamp(s+Me,32,256);e(Yg(xe))}},[s]),gt("shift+down",()=>{if(s>32){const xe=Ze.clamp(s-Me,32,256);e(Yg(xe))}},[s]),C.exports.useEffect(()=>{!ue.current||(ue.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(be){!i&&j.current&&!j.current.contains(be.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(yH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(BH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:b,height:i?"100%":"100vh"},onResizeStart:(xe,be,Ie)=>{$(Ie.clientHeight),Ie.style.height=`${Ie.clientHeight}px`,i&&(Ie.style.position="fixed",Ie.style.right="1rem",z(!0))},onResizeStop:(xe,be,Ie,We)=>{const De=i?Ze.clamp(Number(b)+We.width,T,Number(M)):Number(b)+We.width;e(aSe(De)),Ie.removeAttribute("data-resize-alert"),i&&(Ie.style.position="relative",Ie.style.removeProperty("right"),Ie.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,be,Ie,We)=>{const De=Ze.clamp(Number(b)+We.width,T,Number(i?M:.95*window.innerWidth));De>=t3&&!O?R(!0):DeDe-LM&&e(Yg(De-LM)),i&&(De>=M?Ie.setAttribute("data-resize-alert","true"):Ie.removeAttribute("data-resize-alert")),Ie.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Wn,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(qy("user")),children:"Uploads"})]}):ee(Wn,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(O4e,{}),onClick:()=>e(qy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(q4e,{}),onClick:()=>e(qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(rd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(tk,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ws,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Yg(64)),icon:x(U_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(iSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(oSe(xe.target.checked))})}),x("div",{children:x(Aa,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(sSe(xe.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(pH,{}):x(gH,{})})]})]}),x("div",{className:"image-gallery-container",ref:ue,children:t.length||v?ee(Wn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:be}=xe;return x(Jwe,{image:xe,isSelected:r===be},be)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(nH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:b+"px",height:"100%"}})]})})}const t6e=dt([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),vk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Le(t6e),l=()=>{t(Nke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(mSe,{})})})]}),!a&&x(gW,{})]})})};function n6e(){return x(vk,{optionsPanel:x(qbe,{}),children:x(gSe,{})})}function r6e(){Le(t=>t.options.showAdvancedOptions);const e={seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})},face_restore:{header:x(U$,{}),feature:eo.FACE_CORRECTION,options:x(V_,{})},upscale:{header:x(Z$,{}),feature:eo.UPSCALE,options:x(Y_,{})},other:{header:x(q$,{}),feature:eo.OTHER,options:x(K$,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Q_,{accordionInfo:e})]})}const i6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(zH,{})})});function o6e(){return x(vk,{optionsPanel:x(r6e,{}),children:x(i6e,{})})}var b7=function(e,t){return b7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},b7(e,t)};function a6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");b7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ll=function(){return Ll=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Ed(e,t,n,r){var i=w6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):yW(e,r,n,function(v){var b=s+h*v,w=l+g*v,E=u+m*v;o(b,w,E)})}}function w6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function C6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var _6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},yk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=C6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=_6e(a,l,u,s,h,g,Boolean(i));return m},e1=function(e,t){var n=yk(e,t);return e.bounds=n,n};function cS(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=S7(e,s-g,u+g,r),b=S7(t,l-m,h+m,r);return{x:v,y:b}}var S7=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function dS(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=cS(g,m,i,o,0,0,null);return v}function h2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var IM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=fS(o,n);return!l},OM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},k6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},E6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function P6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,b=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=dS(e,P,k,i,e.bounds,s||l),M=T.x,O=T.y;return{scale:i,positionX:w?M:n,positionY:E?O:r}}}function T6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,b=!m||!v;if(!(!a||b||!s)){var w=cS(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var L6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},S4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},A6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},M6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function I6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function RM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:S7(e,o,a,i)}function O6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function R6e(e,t){var n=A6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=O6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,b=l-i,w=h*h+g*g,E=Math.sqrt(w)/b;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function N6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=M6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=b.sizeX,O=b.sizeY,R=b.velocityAlignmentTime,N=R,z=I6e(e,l),V=Math.max(z,N),$=S4(e,M),j=S4(e,O),ue=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+ue,ne=h-ue,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();yW(e,T,V,function(ce){var me=e.transformState,Me=me.scale,xe=me.positionX,be=me.positionY,Ie=new Date().getTime()-X,We=Ie/N,De=mW[b.animationType],Qe=1-De(Math.min(1,We)),st=1-ce,Ct=xe+a*st,ft=be+s*st,ut=RM(Ct,G.positionX,xe,k,v,h,u,ne,Q,Qe),vt=RM(ft,G.positionY,be,P,v,m,g,K,J,Qe);(xe!==Ct||be!==ft)&&e.setTransformState(Me,ut,vt)})}}function NM(e,t){var n=e.transformState.scale;bl(e),e1(e,n),t.touches?E6e(e,t):k6e(e,t)}function DM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=L6e(e,t,n),u=l.x,h=l.y,g=S4(e,a),m=S4(e,s);R6e(e,{x:u,y:h}),T6e(e,u,h,g,m)}}function D6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?N6e(e):bW(e)}}function bW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&bW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,w=bk(e,a,v,b);w&&Ed(e,w,h,g)}}function bk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=h2(Da(t,2),o,a,0,!1),u=e1(e,l),h=dS(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var i0={previousScale:1,scale:1,positionX:0,positionY:0},z6e=Ll(Ll({},i0),{setComponents:function(){},contextInstance:null}),qg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},xW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:i0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:i0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:i0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:i0.positionY}},zM=function(e){var t=Ll({},qg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof qg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(qg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ll(Ll({},qg[n]),e[n]):s?t[n]=MM(MM([],qg[n]),e[n]):t[n]=e[n]}}),t},wW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=h2(Da(h,3),s,a,u,!1);return g};function CW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,b=wW(e,t,n),w=bk(e,b,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Ed(e,w,r,i)}function _W(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=xW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=yk(e,a.scale),m=cS(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Ed(e,v,t,n)}}function B6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return i0;var l=r.getBoundingClientRect(),u=F6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/m,w=r.offsetHeight/v,E=h2(n||Math.min(b,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,O=yk(e,E),R=cS(T,M,O,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function F6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function $6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var H6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),CW(e,1,t,n,r)}},W6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),CW(e,-1,t,n,r)}},V6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Ed(e,v,i,o)}}},U6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),_W(e,t,n)}},G6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=kW(t||i.scale,o,a);Ed(e,s,n,r)}}},j6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&$6e(a)&&a&&o.contains(a)){var s=B6e(e,a,n);Ed(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:H6e(e),zoomOut:W6e(e),setTransform:V6e(e),resetTransform:U6e(e),centerView:G6e(e),zoomToElement:j6e(e)}},Bw=!1;function Fw(){try{var e={get passive(){return Bw=!0,!1}};return e}catch{return Bw=!1,Bw}}var fS=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},BM=function(e){e&&clearTimeout(e)},Y6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},kW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},q6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=fS(u,a);return!g};function K6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=s6e(t,n);return r}function EW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var X6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var b=r?!1:!m,w=h2(Da(v,3),u,l,g,b);return w},Z6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},Q6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=fS(a,i);return!l},J6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},eCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},PW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},tCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return h2(Da(g,2),a,o,l,!u)},nCe=160,rCe=100,iCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},oCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,b=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=K6e(t,null),P=X6e(e,E,w,!t.ctrlKey);if(l!==P){var k=e1(e,P),T=EW(t,o,l),M=b||v===0||h,O=u&&M,R=dS(e,T.x,T.y,P,k,O),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},aCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;BM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(SW(e,t.x,t.y),e.wheelAnimationTimer=null)},rCe);var o=Z6e(e,t);o&&(BM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},nCe))},sCe=function(e,t){var n=PW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},lCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=eCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=PW(t),v=tCe(e,m);if(v!==i){var b=e1(e,v),w=u||h===0||s,E=a&&w,P=dS(e,g.x,g.y,v,b,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},uCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,SW(e,t?.x,t?.y)};function cCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return _W(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=wW(e,h,o),m=EW(t,u,l),v=bk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Ed(e,v,a,s)}}var dCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=fS(l,s);return!(g||!h)},TW=ae.createContext(z6e),fCe=function(e){a6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=xW(n.props),n.setup=zM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Fw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=q6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(iCe(n,r),oCe(n,r),aCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=IM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),NM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=OM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),DM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(D6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=Q6e(n,r);!l||(sCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=J6e(n);!l||(r.preventDefault(),r.stopPropagation(),lCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(uCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=IM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),NM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=OM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];DM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=dCe(n,r);!o||cCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,e1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=kW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=Y6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Fw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Fw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(e1(this,this.transformState.scale),this.setup=zM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(TW.Provider,{value:Ll(Ll({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),hCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(fCe,{...Ll({},e,{setRef:i})})});function pCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var gCe=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,FM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};pCe(gCe);var mCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(TW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+FM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+FM.content+" "+o,style:s,children:t})})};function vCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(hCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:b})=>ee(Wn,{children:[ee("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(T5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(mt,{icon:x(L5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(E5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(P5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(f4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(U_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(mCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b()})})]})})}function yCe(){const e=qe(),t=Le(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Le(DH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(ck())},g=()=>{e(uk())};return gt("Esc",()=>{t&&e(gd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(mt,{icon:x(k5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(gd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(AH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(rH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Wn,{children:[x(vCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(NH,{image:n})]})]}),x(gW,{})]})]})}const bCe=dt(Dn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),SCe=()=>{const e=qe(),{boundingBoxDimensions:t}=Le(bCe),n=a=>{e(gm({...t,width:Math.floor(a)}))},r=a=>{e(gm({...t,height:Math.floor(a)}))},i=()=>{e(gm({...t,width:Math.floor(512)}))},o=()=>{e(gm({...t,height:Math.floor(512)}))};return ee(en,{direction:"column",gap:"1rem",children:[x(ws,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(ws,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},xCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Bounding Box"}),p2=e=>e.system,wCe=e=>e.system.toastQueue,CCe=dt(Dn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function _Ce(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Le(CCe),n=qe();return ee(en,{alignItems:"center",columnGap:"1rem",children:[x(ws,{label:"Inpaint Replace",value:e,onChange:r=>{n(iM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(iM(1)),isResetDisabled:!t}),x(Fa,{isChecked:t,onChange:r=>n(Vbe(r.target.checked))})]})}const kCe=dt([Q$,p2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ECe=()=>{const e=qe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Le(kCe);return ee(en,{direction:"column",gap:"1rem",children:[x(_Ce,{}),x(ws,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(wI(u))},handleReset:()=>e(wI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(xI(u))},handleReset:()=>{e(xI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(_I(u))},handleReset:()=>{e(_I(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(CI(u))},handleReset:()=>{e(CI(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(Fa,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(Pke(u.target.checked))}}),x(Iu,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(LV(u.target.value))}),x(ws,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(kI(u))},handleReset:()=>{e(kI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function TCe(){const e={boundingBox:{header:x(xCe,{}),feature:eo.BOUNDING_BOX,options:x(SCe,{})},outpainting:{header:x(PCe,{}),feature:eo.OUTPAINTING,options:x(ECe,{})},seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Y$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q_,{accordionInfo:e})]})}const LCe=dt(Dn,uH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),ACe=()=>{const e=qe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Le(LCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Abe({width:a,height:s})),e(Tbe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(r2,{thickness:"2px",speed:"1s",size:"xl"})})};var MCe=Math.PI/180;function ICe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const I0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:I0,version:"8.3.14",isBrowser:ICe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*MCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:I0.document,_injectGlobal(e){I0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var OCe="[object Array]",RCe="[object Number]",NCe="[object String]",DCe="[object Boolean]",zCe=Math.PI/180,BCe=180/Math.PI,$w="#",FCe="",$Ce="0",HCe="Konva warning: ",$M="Konva error: ",WCe="rgb(",Hw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},VCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,n3=[];const UCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===OCe},_isNumber(e){return Object.prototype.toString.call(e)===RCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===NCe},_isBoolean(e){return Object.prototype.toString.call(e)===DCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){n3.push(e),n3.length===1&&UCe(function(){const t=n3;n3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace($w,FCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=$Ce+e;return $w+e},getRGB(e){var t;return e in Hw?(t=Hw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===$w?this._hexToRgb(e.substring(1)):e.substr(0,4)===WCe?(t=VCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Hw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Pd(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function LW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function AW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Pd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Sk(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function S1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function MW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function GCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function jCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Pd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Kg="get",Xg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Kg+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Xg+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Xg+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=Kg+a(t),l=Xg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Xg+n,i=Kg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Kg+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Kg+de._capitalize(n),a=Xg+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function YCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=qCe+u.join(HM)+KCe)):(o+=s.property,t||(o+=e7e+s.val)),o+=QCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=n7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=WM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=YCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var Q3="absoluteOpacity",i3="allEventListeners",cu="absoluteTransform",VM="absoluteScale",xf="canvas",a7e="Change",s7e="children",l7e="konva",x7="listening",UM="mouseenter",GM="mouseleave",jM="set",YM="Shape",J3=" ",qM="stage",Mc="transform",u7e="Stage",w7="visible",c7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(J3);let d7e=1;class $e{constructor(t){this._id=d7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===cu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===cu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(J3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(xf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===cu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(xf)){const{scene:t,filter:n,hit:r}=this._cache.get(xf);de.releaseCanvas(t,n,r),this._cache.delete(xf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new O0({pixelRatio:a,width:i,height:o}),v=new O0({pixelRatio:a,width:0,height:0}),b=new xk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(xf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Q3),this._clearSelfAndDescendantCache(VM),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(xf,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(xf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==s7e&&(r=jM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(x7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(w7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==u7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(cu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(cu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Q3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",zp=e=>{const t=bm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Vw.pointer;if(t==="touch")return Vw.touch;if(t==="mouse")return Vw.mouse};function XM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const y7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",e5=[];class gS extends ca{constructor(t){super(XM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{XM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===h7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&e5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(y7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new O0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+KM,this.content.style.height=n+KM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rm7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return OW(t,this)}setPointerCapture(t){RW(t,this)}releaseCapture(t){qm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||v7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=zp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=zp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=zp(t.type),r=bm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=zp(t.type),r=bm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=zp(t.type),r=bm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Ww(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=zp(t.type),r=bm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Ww(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(C7,{evt:t}):this._fire(C7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(_7,{evt:t}):this._fire(_7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Ww(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(o0,wk(t)),qm(t.pointerId)}_lostpointercapture(t){qm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new O0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new xk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}gS.prototype.nodeType=f7e;gr(gS);q.addGetterSetter(gS,"container");var GW="hasShadow",jW="shadowRGBA",YW="patternImage",qW="linearGradient",KW="radialGradient";let u3;function Uw(){return u3||(u3=de.createCanvasElement().getContext("2d"),u3)}const Km={};function b7e(e){e.fill()}function S7e(e){e.stroke()}function x7e(e){e.fill()}function w7e(e){e.stroke()}function C7e(){this._clearCache(GW)}function _7e(){this._clearCache(jW)}function k7e(){this._clearCache(YW)}function E7e(){this._clearCache(qW)}function P7e(){this._clearCache(KW)}class Ae extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Km)););this.colorKey=n,Km[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(GW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(YW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Uw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(qW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Uw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Km[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return OW(t,this)}setPointerCapture(t){RW(t,this)}releaseCapture(t){qm(t)}}Ae.prototype._fillFunc=b7e;Ae.prototype._strokeFunc=S7e;Ae.prototype._fillFuncHit=x7e;Ae.prototype._strokeFuncHit=w7e;Ae.prototype._centroid=!1;Ae.prototype.nodeType="Shape";gr(Ae);Ae.prototype.eventListeners={};Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",C7e);Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",_7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",E7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",P7e);q.addGetterSetter(Ae,"stroke",void 0,MW());q.addGetterSetter(Ae,"strokeWidth",2,Fe());q.addGetterSetter(Ae,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ae,"hitStrokeWidth","auto",Sk());q.addGetterSetter(Ae,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ae,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ae,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ae,"lineJoin");q.addGetterSetter(Ae,"lineCap");q.addGetterSetter(Ae,"sceneFunc");q.addGetterSetter(Ae,"hitFunc");q.addGetterSetter(Ae,"dash");q.addGetterSetter(Ae,"dashOffset",0,Fe());q.addGetterSetter(Ae,"shadowColor",void 0,S1());q.addGetterSetter(Ae,"shadowBlur",0,Fe());q.addGetterSetter(Ae,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ae,"shadowOffset",["x","y"]);q.addGetterSetter(Ae,"shadowOffsetX",0,Fe());q.addGetterSetter(Ae,"shadowOffsetY",0,Fe());q.addGetterSetter(Ae,"fillPatternImage");q.addGetterSetter(Ae,"fill",void 0,MW());q.addGetterSetter(Ae,"fillPatternX",0,Fe());q.addGetterSetter(Ae,"fillPatternY",0,Fe());q.addGetterSetter(Ae,"fillLinearGradientColorStops");q.addGetterSetter(Ae,"strokeLinearGradientColorStops");q.addGetterSetter(Ae,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ae,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ae,"fillRadialGradientColorStops");q.addGetterSetter(Ae,"fillPatternRepeat","repeat");q.addGetterSetter(Ae,"fillEnabled",!0);q.addGetterSetter(Ae,"strokeEnabled",!0);q.addGetterSetter(Ae,"shadowEnabled",!0);q.addGetterSetter(Ae,"dashEnabled",!0);q.addGetterSetter(Ae,"strokeScaleEnabled",!0);q.addGetterSetter(Ae,"fillPriority","color");q.addComponentsGetterSetter(Ae,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ae,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ae,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ae,"fillPatternScale",["x","y"]);q.addGetterSetter(Ae,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ae,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ae,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ae,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ae,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ae,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ae,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ae,"fillPatternRotation",0);q.backCompat(Ae,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var T7e="#",L7e="beforeDraw",A7e="draw",XW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],M7e=XW.length;class wh extends ca{constructor(t){super(t),this.canvas=new O0,this.hitCanvas=new xk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(L7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(A7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}wh.prototype.nodeType="Layer";gr(wh);q.addGetterSetter(wh,"imageSmoothingEnabled",!0);q.addGetterSetter(wh,"clearBeforeDraw",!0);q.addGetterSetter(wh,"hitGraphEnabled",!0,Ms());class Ck extends wh{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Ck.prototype.nodeType="FastLayer";gr(Ck);class t1 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}t1.prototype.nodeType="Group";gr(t1);var Gw=function(){return I0.performance&&I0.performance.now?function(){return I0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Gw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=ZM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=QM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===ZM?this.setTime(t):this.state===QM&&this.setTime(this.duration-t)}pause(){this.state=O7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Xm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=R7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new N7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)I7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Xm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function k7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function eI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Rn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Rn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Rn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],M=l,O=u,R,N,z,V,$,j,ue,W,Q,ne;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var J=b.shift(),K=b.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break;case"a":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:O},pathLength:this.calcLength(M,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Rn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},O=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=O([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=O(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,R,V,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];gr(Rn);q.addGetterSetter(Rn,"data");class Ch extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Rn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}Ch.prototype.className="Arrow";gr(Ch);q.addGetterSetter(Ch,"pointerLength",10,Fe());q.addGetterSetter(Ch,"pointerWidth",10,Fe());q.addGetterSetter(Ch,"pointerAtBeginning",!1);q.addGetterSetter(Ch,"pointerAtEnding",!0);class x1 extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}x1.prototype._centroid=!0;x1.prototype.className="Circle";x1.prototype._attrsAffectingSize=["radius"];gr(x1);q.addGetterSetter(x1,"radius",0,Fe());class Td extends Ae{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Td.prototype.className="Ellipse";Td.prototype._centroid=!0;Td.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Td);q.addComponentsGetterSetter(Td,"radius",["x","y"]);q.addGetterSetter(Td,"radiusX",0,Fe());q.addGetterSetter(Td,"radiusY",0,Fe());class Is extends Ae{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var ZW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],D7e="Change.konva",z7e="none",E7="up",P7="right",T7="down",L7="left",B7e=ZW.length;class _k extends t1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}kh.prototype.className="RegularPolygon";kh.prototype._centroid=!0;kh.prototype._attrsAffectingSize=["radius"];gr(kh);q.addGetterSetter(kh,"radius",0,Fe());q.addGetterSetter(kh,"sides",0,Fe());var tI=Math.PI*2;class Eh extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,tI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),tI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Eh.prototype.className="Ring";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Eh);q.addGetterSetter(Eh,"innerRadius",0,Fe());q.addGetterSetter(Eh,"outerRadius",0,Fe());class $l extends Ae{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var d3;function Yw(){return d3||(d3=de.createCanvasElement().getContext(H7e),d3)}function Q7e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function J7e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function e9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ae{constructor(t){super(e9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(W7e,n),this}getWidth(){var t=this.attrs.width===Bp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Bp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Yw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+c3+this.fontVariant()+c3+(this.fontSize()+j7e)+Z7e(this.fontFamily())}_addTextLine(t){this.align()===Zg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Yw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Bp&&o!==void 0,l=a!==Bp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==iI,w=v!==K7e&&b,E=this.ellipsis();this.textArr=[],Yw().font=this._getContextFont();for(var P=E?this._getTextWidth(jw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",V=0;R>>1,j=M.slice(0,$+1),ue=this._getTextWidth(j)+P;ue<=h?(R=$+1,z=j,V=ue):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===c3||Q===nI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(c3),z.lastIndexOf(nI))+1,W>0&&(R=W,z=z.slice(0,R),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(O=this._getTextWidth(M),O<=h)){this._addTextLine(M),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Bp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==iI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Bp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+jw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=QW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var ue=t.dataArray,W=w+1;W0)return w=W,ue[W];ue[W].command==="M"&&(m={x:ue[W].points[0],y:ue[W].points[1]})}return{}},k=function(ue){var W=t._getTextSize(ue).width+r;ue===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;b===void 0;)b=P(),b&&J+b.pathLengthW?v=Rn.getPointOnLine(W,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],X=b.points[5],ce=b.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Rn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?W>b.pathLength?E=1e-8:E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength/2:E=Math.max(E-(Q-W)/b.pathLength/2,0),E>1&&(E=1,K=!0),v=Rn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength:E-=(Q-W)/b.pathLength,E>1&&(E=1,K=!0),v=Rn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(Q=Rn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,b=void 0)}},T="C",M=t._getTextSize(T).width+r,O=u/M-1,R=0;Re+`.${oV}`).join(" "),oI="nodesRect",r9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],i9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const o9e="ontouchstart"in rt._global;function a9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(i9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var x4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],aI=1e8;function s9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function aV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function l9e(e,t){const n=s9e(e);return aV(e,t,n)}function u9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(r9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(oI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(oI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return aV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-aI,y:-aI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),x4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new g2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:o9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=a9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ae({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let ue=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(ue-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+ue,Q=rt.getAngle(this.rotationSnapTolerance()),J=u9e(this.rotationSnaps(),W,Q)-g.rotation,K=l9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),t1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function c9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){x4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+x4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",x4,c9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function sI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var d9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],f9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function h9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,T,M,O,R,N,z,V,$,j,ue,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new sI,X=null,ce=G,me=null,Me=null,xe=d9e[t],be=f9e[t];for(s=1;s>be,j!==0?(j=255/j,n[h]=(m*xe>>be)*j,n[h+1]=(v*xe>>be)*j,n[h+2]=(b*xe>>be)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>be,j>0?(j=255/j,n[l]=(m*xe>>be)*j,n[l+1]=(v*xe>>be)*j,n[l+2]=(b*xe>>be)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&h9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const g9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const v9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,V=O>0?O:-O;if(z>N&&(R=M),V>N&&(R=O),R*=t,i){var $=s[E]+R,j=s[E+1]+R,ue=s[E+2]+R;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=ue>255?255:ue<0?0:ue}else{var W=n-R;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function qw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const y9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,T,M,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,O=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,O,R=360/T*Math.PI/180,N,z;for(O=0;OT?k:T;var M=a,O=o,R,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function M9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const N9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,LW,q.afterSetFilter);const z9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,LW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const B9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},$9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` -`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Wl(d):""}var Mh=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function bn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Od(d,f,y){if(kr.current!==Bo)throw Error(a(168));bn(kr,f),bn(Gr,y)}function Ul(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,bn(kr,d),bn(Gr,Gr.current),!0}function Rd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Ul(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),bn(kr,d)):En(Gr),bn(Gr,y)}var vi=Math.clz32?Math.clz32:Nd,Ih=Math.log,Oh=Math.LN2;function Nd(d){return d>>>=0,d===0?32:31-(Ih(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Gl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function zd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Vi=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var qt=je(pe,Pt,ve[Ft],Ve);if(qt===null){Pt===null&&(Pt=Br);break}d&&Pt&&qt.alternate===null&&f(pe,Pt),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Bn&&Hs(pe,Ft),Pe;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=je(pe,Pt,qt.value,Ve);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Pe=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(qt.done)return y(pe,Pt),Bn&&Hs(pe,Ft),Pe;if(Pt===null){for(;!qt.done;Ft++,qt=ve.next())qt=At(pe,qt.value,Ve),qt!==null&&(se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return Bn&&Hs(pe,Ft),Pe}for(Pt=_(pe,Pt);!qt.done;Ft++,qt=ve.next())qt=$n(Pt,pe,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Pt.delete(qt.key===null?Ft:qt.key),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Bn&&Hs(pe,Ft),Pe}function Xo(pe,se,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Pe=ve.key,Mt=se;Mt!==null;){if(Mt.key===Pe){if(Pe=ve.type,Pe===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&G1(Pe)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=wa(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,Ve,ve.key),se.return=pe,pe=se):(Ve=ff(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wa(pe,se,ve),Ve.return=pe,pe=Ve)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,Ve),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),Ve)}if(ne(ve))return Pn(pe,se,ve,Ve);if(R(ve))return nr(pe,se,ve,Ve);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=Sp(ve,pe.mode,Ve),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var Ju=P2(!0),T2=P2(!1),qd={},po=zo(qd),Ca=zo(qd),re=zo(qd);function ye(d){if(d===qd)throw Error(a(174));return d}function ge(d,f){bn(re,f),bn(Ca,d),bn(po,qd),d=K(f),En(po),bn(po,d)}function Ge(){En(po),En(Ca),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(bn(Ca,d),bn(po,f))}function Qt(d){Ca.current===d&&(En(po),En(Ca))}var Ot=zo(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||$u(y)||Id(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Kd=[];function j1(){for(var d=0;dy?y:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=y,ec.transition=_}}function sc(){return Si().memoizedState}function eg(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,y);else if(y=Qu(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),tf(y,f,_)}}function lc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,jd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Qu(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),tf(y,f,_))}}function uc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function cc(d,f){Xd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function tf(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,jl(d,y)}}var ts={readContext:Ui,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},_S={readContext:Ui,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Ui,useEffect:M2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Xl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Xl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Xl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=eg.bind(null,Sn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:A2,useDebugValue:Z1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=A2(!1),f=d[0];return d=J1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=Sn,L=qr();if(Bn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Kl&30)!==0||X1(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,M2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Jd(9,oc.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Bn){var y=Sa,_=Vi;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=tc++,0cp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Bn)return oi(f),null}else 2*Un()-L.renderingStartTime>cp&&y!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(ji&1073741824)!==0&&(oi(f),ft&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function lg(d,f){switch(H1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Gr),En(kr),j1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Ot),null;case 4:return Ge(),null;case 10:return Ud(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,AS=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Zh=!1;function Ql(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:ft&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Zh,Zh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Qh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ug(d){var f=d.alternate;f!==null&&(d.alternate=null,ug(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function ep(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(ep(d,f,y),d=d.sibling;d!==null;)ep(d,f,y),d=d.sibling}function cg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?zn(y,d,f):_e(y,d);else if(_!==4&&(d=d.child,d!==null))for(cg(d,f,y),d=d.sibling;d!==null;)cg(d,f,y),d=d.sibling}var br=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||pc(y,f);case 6:if(ft){var _=br,L=Yo;br=null,qo(d,f,y),br=_,Yo=L,br!==null&&(Yo?tt(br,y.stateNode):ct(br,y.stateNode))}else qo(d,f,y);break;case 18:ft&&br!==null&&(Yo?D1(br,y.stateNode):N1(br,y.stateNode));break;case 4:ft?(_=br,L=Yo,br=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),br=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=ya(_),Fu(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(pc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function tp(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new AS),f.forEach(function(_){var L=K2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case op:return":has("+(hg(d)||"")+")";case ap:return'[role="'+d.value+'"]';case sp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*MS(_/1960))-_,10<_){d.timeoutHandle=De(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?hp.bind(null,d):null}function pp(d,f){var y=Sc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=y,f!==null&&gp(f)),d}function gp(d){wi===null?wi=d:wi.push.apply(wi,d)}function Yi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,dp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-mg?Qs(d,0):gg|=y),Xr(d,f)}function xg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function OS(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),xg(d,y)}function K2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),xg(d,y)}var wg;wg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,TS(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Bn&&(f.flags&1048576)!==0&&$1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;_a(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,y),L=q1(null,f,_,d,L,y);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,V1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,U1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Bn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=yp(_),d=Ho(_,d),L){case 0:f=rg(null,f,_,d,y);break e;case 1:f=$2(null,f,_,d,y);break e;case 11:f=D2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),rg(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),$2(d,f,_,L,y);case 3:e:{if(H2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,C2(d,f),Wh(f,_,null,y);var H=f.memoizedState;if(_=H.element,vt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=W2(d,f,_,y,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=W2(d,f,_,y,L);break e}else for(vt&&(fo=T1(f.stateNode.containerInfo),Gn=f,Bn=!0,Ri=null,ho=!1),y=T2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Ku(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&$d(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Ie(_,L)?H=null:I!==null&&Ie(_,I)&&(f.flags|=32),F2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&$d(f),null;case 13:return V2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),D2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,w2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var Ne=I.updateQueue;if(Ne!==null){Ne=Ne.shared;var et=Ne.pending;et===null?fe.next=fe:(fe.next=et.next,et.next=fe),Ne.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),Gd(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),Gd(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,y),L=Ui(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return z2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),_a(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,y),k2(f,_,L),U1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return G2(d,f,y);case 22:return B2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function ka(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new ka(d,f,y,_)}function Cg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function yp(d){if(typeof d=="function")return Cg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function qi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function ff(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")Cg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function bp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function Sp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function hf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=st,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function X2(d,f,y,_,L,I,H,oe,fe){return d=new hf(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},V1(I),d}function _g(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Ul(d,y,f)}return f}function kg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=ue(f),d===null?null:d.stateNode}function pf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&I>=At&&L<=et&&H<=je){d.splice(f,1);break}else if(_!==Ne||y.width!==fe.width||jeH){if(!(I!==At||y.height!==fe.height||et<_||Ne>L)){Ne>_&&(fe.width+=Ne-_,fe.x=_),etI&&(fe.height+=At-I,fe.y=I),jey&&(y=H)),H ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:xp,findFiberByHostInstance:d.findFiberByHostInstance||Eg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!_t)throw Error(a(363));d=pg(d,f);var L=Yt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=_g(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Hh(d,L,H)),H},n};(function(e){e.exports=H9e})(sV);const W9e=q7(sV.exports);var kk={exports:{}},Ph={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */Ph.ConcurrentRoot=1;Ph.ContinuousEventPriority=4;Ph.DefaultEventPriority=16;Ph.DiscreteEventPriority=1;Ph.IdleEventPriority=536870912;Ph.LegacyRoot=0;(function(e){e.exports=Ph})(kk);const lI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let uI=!1,cI=!1;const Ek=".react-konva-event",V9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,U9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,G9e={};function mS(e,t,n=G9e){if(!uI&&"zIndex"in t&&(console.warn(U9e),uI=!0),!cI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(V9e),cI=!0)}for(var o in n)if(!lI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!lI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ad(e));for(var l in v)e.on(l+Ek,v[l])}function Ad(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const lV={},j9e={};ch.Node.prototype._applyProps=mS;function Y9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ad(e)}function q9e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return mS(l,o),l}function K9e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function X9e(e,t,n){return!1}function Z9e(e){return e}function Q9e(){return null}function J9e(){return null}function e8e(e,t,n,r){return j9e}function t8e(){}function n8e(e){}function r8e(e,t){return!1}function i8e(){return lV}function o8e(){return lV}const a8e=setTimeout,s8e=clearTimeout,l8e=-1;function u8e(e,t){return!1}const c8e=!1,d8e=!0,f8e=!0;function h8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ad(e)}function p8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ad(e)}function uV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ad(e)}function g8e(e,t,n){uV(e,t,n)}function m8e(e,t){t.destroy(),t.off(Ek),Ad(e)}function v8e(e,t){t.destroy(),t.off(Ek),Ad(e)}function y8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function b8e(e,t,n){}function S8e(e,t,n,r,i){mS(e,i,r)}function x8e(e){e.hide(),Ad(e)}function w8e(e){}function C8e(e,t){(t.visible==null||t.visible)&&e.show()}function _8e(e,t){}function k8e(e){}function E8e(){}const P8e=()=>kk.exports.DefaultEventPriority,T8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:Y9e,createInstance:q9e,createTextInstance:K9e,finalizeInitialChildren:X9e,getPublicInstance:Z9e,prepareForCommit:Q9e,preparePortalMount:J9e,prepareUpdate:e8e,resetAfterCommit:t8e,resetTextContent:n8e,shouldDeprioritizeSubtree:r8e,getRootHostContext:i8e,getChildHostContext:o8e,scheduleTimeout:a8e,cancelTimeout:s8e,noTimeout:l8e,shouldSetTextContent:u8e,isPrimaryRenderer:c8e,warnsIfNotActing:d8e,supportsMutation:f8e,appendChild:h8e,appendChildToContainer:p8e,insertBefore:uV,insertInContainerBefore:g8e,removeChild:m8e,removeChildFromContainer:v8e,commitTextUpdate:y8e,commitMount:b8e,commitUpdate:S8e,hideInstance:x8e,hideTextInstance:w8e,unhideInstance:C8e,unhideTextInstance:_8e,clearContainer:k8e,detachDeletedInstance:E8e,getCurrentEventPriority:P8e,now:s0.exports.unstable_now,idlePriority:s0.exports.unstable_IdlePriority,run:s0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var L8e=Object.defineProperty,A8e=Object.defineProperties,M8e=Object.getOwnPropertyDescriptors,dI=Object.getOwnPropertySymbols,I8e=Object.prototype.hasOwnProperty,O8e=Object.prototype.propertyIsEnumerable,fI=(e,t,n)=>t in e?L8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hI=(e,t)=>{for(var n in t||(t={}))I8e.call(t,n)&&fI(e,n,t[n]);if(dI)for(var n of dI(t))O8e.call(t,n)&&fI(e,n,t[n]);return e},R8e=(e,t)=>A8e(e,M8e(t));function Pk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Pk(r,t,n);if(i)return i;r=t?null:r.sibling}}function cV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Tk=cV(C.exports.createContext(null));class dV extends C.exports.Component{render(){return x(Tk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:N8e,ReactCurrentDispatcher:D8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z8e(){const e=C.exports.useContext(Tk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=N8e.current)!=null?r:Pk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const em=[],pI=new WeakMap;function B8e(){var e;const t=z8e();em.splice(0,em.length),Pk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Tk&&em.push(cV(i))});for(const n of em){const r=(e=D8e.current)==null?void 0:e.readContext(n);pI.set(n,r)}return C.exports.useMemo(()=>em.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,R8e(hI({},i),{value:pI.get(r)}))),n=>x(dV,{...hI({},n)})),[])}function F8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const $8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=F8e(e),o=B8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Sm.createContainer(n.current,kk.exports.LegacyRoot,!1,null),Sm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),Sm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),mS(n.current,e,i),Sm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},h3="Layer",dh="Group",R0="Rect",tm="Circle",w4="Line",fV="Image",H8e="Transformer",Sm=W9e(T8e);Sm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const W8e=ae.forwardRef((e,t)=>x(dV,{children:x($8e,{...e,forwardedRef:t})})),V8e=dt([Dn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),U8e=e=>{const{...t}=e,{objects:n}=Le(V8e);return x(dh,{listening:!1,...t,children:n.filter(nk).map((r,i)=>x(w4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},vS=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},G8e=dt(Dn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:g,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:vS(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||g||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),j8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Le(G8e);return l?ee(dh,{listening:!1,...t,children:[x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},Y8e=dt(Dn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),q8e=e=>{const{...t}=e,n=qe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:b,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Le(Y8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Lw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=Gc(Q,64),K=Gc(ne,64);W.target.x(J),W.target.y(K),n(Lw({x:J,y:K}))},[n,v]),O=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(gm({width:J,height:K})),n(Lw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),R=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Mw(!0))},z=()=>{n(Mw(!1)),n(Yy(!1))},V=()=>{n(oM(!0))},$=()=>{n(Mw(!1)),n(oM(!1)),n(Yy(!1))},j=()=>{n(Yy(!0))},ue=()=>{!u&&!l&&n(Yy(!1))};return ee(dh,{...t,children:[x(R0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&b==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:ue,onMouseOver:j,onMouseUp:$,onTransform:O,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(H8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:b==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&b==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let hV=null,pV=null;const K8e=e=>{hV=e},C4=()=>hV,X8e=e=>{pV=e},Z8e=()=>pV,Q8e=dt([Dn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),J8e=()=>{const e=qe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Le(Q8e),i=C.exports.useRef(null),o=Z8e();gt("esc",()=>{e(Ebe())},{enabled:()=>!0,preventDefault:!0}),gt("shift+h",()=>{e(zbe(!n))},{preventDefault:!0},[t,n]),gt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(M0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(M0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},e_e=dt(Dn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:vS(t)}}),gI=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),t_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(e_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=gI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=gI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(R0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},n_e=dt([Dn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),r_e=e=>{const t=qe(),{isMoveStageKeyHeld:n,stageScale:r}=Le(n_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Ze.clamp(r*gbe**s,mbe,vbe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Ube(l)),t(TH(u))},[e,n,r,t])},yS=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},i_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),o_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(i_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(h4(!0));return}const o=yS(e.current);!o||(i.evt.preventDefault(),t(rS(!0)),t(SH([o.x,o.y])))},[e,n,r,t])},a_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),s_e=(e,t)=>{const n=qe(),{tool:r,isDrawing:i,isStaging:o}=Le(a_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(h4(!1));return}if(!t.current&&i&&e.current){const a=yS(e.current);if(!a)return;n(xH([a.x,a.y]))}else t.current=!1;n(rS(!1))},[t,n,i,o,e,r])},l_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),u_e=(e,t,n)=>{const r=qe(),{isDrawing:i,tool:o,isStaging:a}=Le(l_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=yS(e.current);!s||(r(kH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(xH([s.x,s.y]))))},[t,r,i,a,n,e,o])},c_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),d_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(c_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=yS(e.current);!o||n==="move"||r||(t(rS(!0)),t(SH([o.x,o.y])))},[e,n,r,t])},f_e=()=>{const e=qe();return C.exports.useCallback(()=>{e(kH(null)),e(rS(!1))},[e])},h_e=dt([Dn,Ou],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),p_e=()=>{const e=qe(),{tool:t,isStaging:n}=Le(h_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(h4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(TH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(h4(!1))},[e,n,t])}};var wf=C.exports,g_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const gV=e=>{const{url:t,x:n,y:r}=e,[i]=g_e(t);return x(fV,{x:n,y:r,image:i,listening:!1})},m_e=dt([Dn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),v_e=()=>{const{objects:e}=Le(m_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(f4(t))return x(gV,{x:t.x,y:t.y,url:t.image.url},n);if(X4e(t))return x(w4,{points:t.points,stroke:t.color?vS(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},y_e=dt([Dn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),b_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},S_e=()=>{const{colorMode:e}=Yv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Le(y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=b_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,O=Ze.range(0,T).map(N=>x(w4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=Ze.range(0,M).map(N=>x(w4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(O.concat(R))},[t,n,r,e,a]),x(dh,{children:i})},x_e=dt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),w_e=e=>{const{...t}=e,n=Le(x_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(fV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},C_e=dt([Dn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function __e(){const{cursorCoordinatesString:e}=Le(C_e);return x("div",{children:`Cursor Position: ${e}`})}const p3=e=>Math.round(e*100)/100,k_e=dt([Dn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:g}=e;return{activeLayerColor:g==="mask"?"var(--status-working-color)":"inherit",activeLayerString:g.charAt(0).toUpperCase()+g.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${p3(s)}, ${p3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${p3(r)}\xD7${p3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),E_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Le(k_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&ee(Wn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(__e,{})]})]})},P_e=dt([Dn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),T_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Le(P_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(gV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(R0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(R0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},L_e=dt([Dn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),A_e=()=>{const e=qe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Le(L_e),o=C.exports.useCallback(()=>{e(aM(!1))},[e]),a=C.exports.useCallback(()=>{e(aM(!0))},[e]);gt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),gt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),gt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(_be()),l=()=>e(Cbe()),u=()=>e(xbe());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(w4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(C4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(J_,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(M4e,{}):x(A4e,{}),onClick:()=>e(Hbe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(sH,{}),onClick:()=>e(rbe(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(v1,{}),onClick:()=>e(wbe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},M_e=dt([Dn,Ou],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let b="";return h==="move"||t?g?b="grabbing":b="grab":o?b=void 0:a?b="move":b="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:b,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),I_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Le(M_e);J8e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{X8e($),g.current=$},[]),b=C.exports.useCallback($=>{K8e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=r_e(g),k=o_e(g),T=s_e(g,E),M=u_e(g,E,w),O=d_e(g),R=f_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=p_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(W8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:O,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(h3,{id:"grid",visible:r,children:x(S_e,{})}),x(h3,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:x(v_e,{})}),ee(h3,{id:"mask",visible:e,listening:!1,children:[x(U8e,{visible:!0,listening:!1}),x(t_e,{listening:!1})]}),ee(h3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(j8e,{visible:l!=="move",listening:!1}),x(T_e,{visible:u}),h&&x(w_e,{}),x(q8e,{visible:n&&!u})]})]}),x(E_e,{}),x(A_e,{})]})})},O_e=dt([Dn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function R_e(){const e=qe(),{canUndo:t,activeTabName:n}=Le(O_e),r=()=>{e(Gbe())};return gt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const N_e=dt([Dn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function D_e(){const e=qe(),{canRedo:t,activeTabName:n}=Le(N_e),r=()=>{e(kbe())};return gt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(V4e,{}),onClick:r,isDisabled:!t})}const mV=ke((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Av(),m=C.exports.useRef(null),v=()=>{r(),g()},b=()=>{o&&o(),g()};return ee(Wn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(CF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(Z0,{children:ee(_F,{className:"modal",children:[x(Ob,{fontSize:"lg",fontWeight:"bold",children:s}),x(Nv,{children:a}),ee(Ib,{children:[x(Wa,{ref:m,onClick:b,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),z_e=()=>{const e=qe();return ee(mV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(ibe()),e(wH()),e(_H())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(v1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},B_e=()=>{const e=qe();return ee(mV,{title:"Clear Canvas History",acceptCallback:()=>e(_H()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(v1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},F_e=dt([Dn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),$_e=()=>{const e=qe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Le(F_e);return x(rd,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(tk,{})}),children:ee(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e($be(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(Fbe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(Wbe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(Nbe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(Obe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(Rbe(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(Bbe(l.target.checked))}),x(B_e,{}),x(z_e,{})]})})};function bS(){return(bS=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function A7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var n1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(mI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=M7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(vI(P),!function(M,O){return O&&!Zm(M)}(P,l.current)&&k)){if(Zm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(mI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bS({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),SS=function(e){return e.filter(Boolean).join(" ")},Ak=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=SS(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},yV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},I7=function(e){var t=yV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Kw=function(e){var t=yV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},H_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},W_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},V_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=SS(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Lk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:n1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ak,{className:"react-colorful__hue-pointer",left:t/360,color:I7({h:t,s:100,v:100,a:1})})))}),U_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:I7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Lk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:n1(t.s+100*i.left,0,100),v:n1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ak,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:I7(t)})))}),bV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function G_e(e,t,n){var r=A7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;bV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var j_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Y_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},yI=new Map,q_e=function(e){j_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!yI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,yI.set(t,n);var r=Y_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},K_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Kw(Object.assign({},n,{a:0}))+", "+Kw(Object.assign({},n,{a:1}))+")"},o=SS(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Lk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:n1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ak,{className:"react-colorful__alpha-pointer",left:n.a,color:Kw(n)})))},X_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=vV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);q_e(s);var l=G_e(n,i,o),u=l[0],h=l[1],g=SS(["react-colorful",t]);return ae.createElement("div",bS({},a,{ref:s,className:g}),x(U_e,{hsva:u,onChange:h}),x(V_e,{hue:u.h,onChange:h}),ae.createElement(K_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},Z_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:W_e,fromHsva:H_e,equal:bV},Q_e=function(e){return ae.createElement(X_e,bS({},e,{colorModel:Z_e}))};const SV=e=>{const{styleClass:t,...n}=e;return x(Q_e,{className:`invokeai__color-picker ${t}`,...n})},J_e=dt([Dn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:vS(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),eke=()=>{const e=qe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Le(J_e);gt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),gt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(PH(t==="mask"?"base":"mask"))},a=()=>e(Sbe()),s=()=>e(EH(!r));return x(rd,{trigger:"hover",triggerComponent:x(ia,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(D4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(Dbe(l.target.checked))}),x(SV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mbe(l))}),x(ra,{size:"sm",leftIcon:x(v1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let g3;const tke=new Uint8Array(16);function nke(){if(!g3&&(g3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g3(tke)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function rke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const ike=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bI={randomUUID:ike};function a0(e,t,n){if(bI.randomUUID&&!t&&!e)return bI.randomUUID();e=e||{};const r=e.random||(e.rng||nke)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return rke(r)}const oke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},ake=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},ske=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},lke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},m3=(e=lke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(u4e("Exporting Image")),t(n0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,b=C4();if(!b){t(yu(!1)),t(n0(!0));return}const{dataURL:w,boundingBox:E}=oke(b,h,v,i?{...g,...m}:void 0);if(!w){t(yu(!1)),t(n0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:O,height:R}=T,N={uuid:a0(),category:o?"result":"user",...T};a&&(ake(M),t(fm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(ske(M,O,R),t(fm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(r0({image:N,category:"result"})),t(fm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(Ibe({kind:"image",layer:"base",...E,image:N})),t(fm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(yu(!1)),t(Z3("Connected")),t(n0(!0))},uke=dt([Dn,Ou,p2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),cke=()=>{const e=qe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Le(uke);gt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),gt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["["],()=>{e(Aw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),gt(["]"],()=>{e(Aw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(M0("brush")),a=()=>e(M0("eraser"));return ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(B4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(T4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(M0("eraser"))}),x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(lH,{})}),children:ee(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(ws,{label:"Size",value:r,withInput:!0,onChange:s=>e(Aw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(SV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(Lbe(s))})]})})]})};let SI;const xV=()=>({setOpenUploader:e=>{e&&(SI=e)},openUploader:SI}),dke=dt([p2,Dn,Ou],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),fke=()=>{const e=qe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Le(dke),s=C4(),{openUploader:l}=xV();gt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),gt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),gt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["meta+c","ctrl+c"],()=>{b()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(M0("move")),h=()=>{const P=C4();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(Pbe({contentRect:k}))},g=()=>{e(wH()),e(CH())},m=()=>{e(m3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},b=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Iu,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:K4e,onChange:P=>{const k=P.target.value;e(PH(k)),k==="mask"&&!r&&e(EH(!0))}}),x(eke,{}),x(cke,{}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(_4e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(P4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(N4e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(sH,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(nS,{}),onClick:b,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(aH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(R_e,{}),x(D_e,{})]}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x(ek,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(v1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x($_e,{})})]})},hke=dt([Dn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),pke=()=>{const e=qe(),{doesCanvasNeedScaling:t}=Le(hke);return C.exports.useLayoutEffect(()=>{const n=Ze.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(fke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(ACe,{}):x(I_e,{})})]})})})};function gke(){const e=qe();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(vk,{optionsPanel:x(TCe,{}),styleClass:"inpainting-workarea-overrides",children:x(pke,{})})}const mke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function vke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const yke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(f5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(o6e,{}),tooltip:"Text To Image"},img2img:{title:x(u5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(mke,{fill:"black",boxSize:"2.5rem"}),workarea:x(gke,{}),tooltip:"Unified Canvas"},nodes:{title:x(c5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(s5e,{}),tooltip:"Nodes"},postprocess:{title:x(d5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l5e,{}),tooltip:"Post Processing"},training:{title:x(yke,{fill:"black",boxSize:"2.5rem"}),workarea:x(vke,{}),tooltip:"Training"}},xS=Ze.map(If,(e,t)=>t);[...xS];function bke(){const e=Le(o=>o.options.activeTab),t=Le(o=>o.options.isLightBoxOpen),n=qe();gt("1",()=>{n(ko(0))}),gt("2",()=>{n(ko(1))}),gt("3",()=>{n(ko(2))}),gt("4",()=>{n(ko(3))}),gt("5",()=>{n(ko(4))}),gt("6",()=>{n(ko(5))}),gt("z",()=>{n(gd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(QF,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(XF,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(KF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(ZF,{className:"app-tabs-panels",children:t?x(yCe,{}):i()})]})}const wV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Ske=wV,CV=Bb({name:"options",initialState:Ske,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=X3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=d4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=X3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=d4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=X3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...wV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=xS.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:_V,resetOptionsState:ITe,resetSeed:OTe,setActiveTab:ko,setAllImageToImageParameters:xke,setAllParameters:wke,setAllTextToImageParameters:Cke,setCfgScale:kV,setCodeformerFidelity:EV,setCurrentTheme:_ke,setFacetoolStrength:t5,setFacetoolType:n5,setHeight:PV,setHiresFix:TV,setImg2imgStrength:O7,setInfillMethod:LV,setInitialImage:m2,setIsLightBoxOpen:gd,setIterations:kke,setMaskPath:AV,setOptionsPanelScrollPosition:Eke,setParameter:RTe,setPerlin:MV,setPrompt:wS,setSampler:IV,setSeamBlur:xI,setSeamless:OV,setSeamSize:wI,setSeamSteps:CI,setSeamStrength:_I,setSeed:v2,setSeedWeights:RV,setShouldFitToWidthHeight:NV,setShouldForceOutpaint:Pke,setShouldGenerateVariations:Tke,setShouldHoldOptionsPanelOpen:Lke,setShouldLoopback:Ake,setShouldPinOptionsPanel:Mke,setShouldRandomizeSeed:Ike,setShouldRunESRGAN:Oke,setShouldRunFacetool:Rke,setShouldShowImageDetails:DV,setShouldShowOptionsPanel:ad,setShowAdvancedOptions:NTe,setShowDualDisplay:Nke,setSteps:zV,setThreshold:BV,setTileSize:kI,setUpscalingLevel:R7,setUpscalingStrength:N7,setVariationAmount:Dke,setWidth:FV}=CV.actions,zke=CV.reducer,Nl=Object.create(null);Nl.open="0";Nl.close="1";Nl.ping="2";Nl.pong="3";Nl.message="4";Nl.upgrade="5";Nl.noop="6";const r5=Object.create(null);Object.keys(Nl).forEach(e=>{r5[Nl[e]]=e});const Bke={type:"error",data:"parser error"},Fke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$ke=typeof ArrayBuffer=="function",Hke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$V=({type:e,data:t},n,r)=>Fke&&t instanceof Blob?n?r(t):EI(t,r):$ke&&(t instanceof ArrayBuffer||Hke(t))?n?r(t):EI(new Blob([t]),r):r(Nl[e]+(t||"")),EI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},PI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Vke=typeof ArrayBuffer=="function",HV=(e,t)=>{if(typeof e!="string")return{type:"message",data:WV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Uke(e.substring(1),t)}:r5[n]?e.length>1?{type:r5[n],data:e.substring(1)}:{type:r5[n]}:Bke},Uke=(e,t)=>{if(Vke){const n=Wke(e);return WV(n,t)}else return{base64:!0,data:e}},WV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},VV=String.fromCharCode(30),Gke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{$V(o,!1,s=>{r[a]=s,++i===n&&t(r.join(VV))})})},jke=(e,t)=>{const n=e.split(VV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function GV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const qke=setTimeout,Kke=clearTimeout;function CS(e,t){t.useNativeTimers?(e.setTimeoutFn=qke.bind(jc),e.clearTimeoutFn=Kke.bind(jc)):(e.setTimeoutFn=setTimeout.bind(jc),e.clearTimeoutFn=clearTimeout.bind(jc))}const Xke=1.33;function Zke(e){return typeof e=="string"?Qke(e):Math.ceil((e.byteLength||e.size)*Xke)}function Qke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Jke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jV extends Ur{constructor(t){super(),this.writable=!1,CS(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Jke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=HV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const YV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),D7=64,eEe={};let TI=0,v3=0,LI;function AI(e){let t="";do t=YV[e%D7]+t,e=Math.floor(e/D7);while(e>0);return t}function qV(){const e=AI(+new Date);return e!==LI?(TI=0,LI=e):e+"."+AI(TI++)}for(;v3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};jke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Gke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=qV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=KV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Al(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Al extends Ur{constructor(t,n){super(),CS(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=GV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new ZV(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Al.requestsCount++,Al.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=rEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Al.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Al.requestsCount=0;Al.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MI);else if(typeof addEventListener=="function"){const e="onpagehide"in jc?"pagehide":"unload";addEventListener(e,MI,!1)}}function MI(){for(let e in Al.requests)Al.requests.hasOwnProperty(e)&&Al.requests[e].abort()}const QV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),y3=jc.WebSocket||jc.MozWebSocket,II=!0,aEe="arraybuffer",OI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sEe extends jV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=OI?{}:GV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=II&&!OI?n?new y3(t,n):new y3(t):new y3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||aEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{II&&this.ws.send(o)}catch{}i&&QV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=qV()),this.supportsBinary||(t.b64=1);const i=KV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!y3}}const lEe={websocket:sEe,polling:oEe},uEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function z7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=uEe.exec(e||""),o={},a=14;for(;a--;)o[cEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=dEe(o,o.path),o.queryKey=fEe(o,o.query),o}function dEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function fEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=z7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=z7(n.host).host),CS(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=tEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=UV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new lEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,JV=Object.prototype.toString,mEe=typeof Blob=="function"||typeof Blob<"u"&&JV.call(Blob)==="[object BlobConstructor]",vEe=typeof File=="function"||typeof File<"u"&&JV.call(File)==="[object FileConstructor]";function Mk(e){return pEe&&(e instanceof ArrayBuffer||gEe(e))||mEe&&e instanceof Blob||vEe&&e instanceof File}function i5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class wEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=bEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const CEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:SEe,get PacketType(){return nn},Encoder:xEe,Decoder:Ik},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const _Ee=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class eU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(_Ee.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}w1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};w1.prototype.reset=function(){this.attempts=0};w1.prototype.setMin=function(e){this.ms=e};w1.prototype.setMax=function(e){this.max=e};w1.prototype.setJitter=function(e){this.jitter=e};class $7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,CS(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new w1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||CEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){QV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new eU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const nm={};function o5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=hEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=nm[i]&&o in nm[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new $7(r,t):(nm[i]||(nm[i]=new $7(r,t)),l=nm[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(o5,{Manager:$7,Socket:eU,io:o5,connect:o5});var kEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,EEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,PEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(RI[t]||t||RI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return TEe(e)},E=function(){return LEe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return NI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return NI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":AEe(e)},o:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60),2)+":"+ea(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(kEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var RI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},NI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},TEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},LEe=function(t){var n=t.getDay();return n===0&&(n=7),n},AEe=function(t){return(String(t).match(EEe)||[""]).pop().replace(PEe,"").replace(/GMT\+0000/g,"UTC")};const MEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(XA(!0)),t(Z3("Connected")),t(nbe());const r=n().gallery;r.categories.user.latest_mtime?t(eM("user")):t(a7("user")),r.categories.result.latest_mtime?t(eM("result")):t(a7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(XA(!1)),t(Z3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:a0(),...u};if(["txt2img","img2img"].includes(l)&&t(r0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(bbe({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(r0({image:{...h,category:"result"},category:"result"}))}if(o)switch(xS[a]){case"img2img":{t(m2(h));break}}t(Iw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(tSe({uuid:a0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(r0({category:"result",image:{uuid:a0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(yu(!0)),t(e4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(ZA()),t(Iw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:a0(),...l}));t(eSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(r4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(r0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Iw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(IH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(_V()),a===i&&t(AV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(t4e(r)),r.infill_methods.includes("patchmatch")||t(LV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(QA(o)),t(Z3("Model Changed")),t(yu(!1)),t(n0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(QA(o)),t(yu(!1)),t(n0(!0)),t(ZA()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(fm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},IEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Jg.Stage({container:i,width:n,height:r}),a=new Jg.Layer,s=new Jg.Layer;a.add(new Jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Jg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},OEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},REe=e=>{const t=C4(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:b,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:O,seamSize:R,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:ue,shouldGenerateVariations:W,shouldRandomizeSeed:Q,shouldRunESRGAN:ne,shouldRunFacetool:J,steps:K,threshold:G,tileSize:X,upscalingLevel:ce,upscalingStrength:me,variationAmount:Me,width:xe}=r,{shouldDisplayInProgressType:be,saveIntermediatesInterval:Ie,enableImageDebugging:We}=o,De={prompt:k,iterations:Q||W?E:1,steps:K,cfg_scale:s,threshold:G,perlin:P,height:g,width:xe,sampler_name:T,seed:V,progress_images:be==="full-res",progress_latents:be==="latents",save_intermediates:Ie,generation_mode:n,init_mask:""};if(De.seed=Q?X$(H_,W_):V,["txt2img","img2img"].includes(n)&&(De.seamless=O,De.hires_fix=m),n==="img2img"&&w&&(De.init_img=typeof w=="string"?w:w.url,De.strength=v,De.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ct},boundingBoxCoordinates:ft,boundingBoxDimensions:ut,inpaintReplace:vt,shouldUseInpaintReplace:Ee,stageScale:Je,isMaskEnabled:Lt,shouldPreserveMaskedArea:it}=i,pt={...ft,...ut},an=IEe(Lt?Ct.filter(nk):[],pt);De.init_mask=an,De.fit=!1,De.init_img=a,De.strength=v,De.invert_mask=it,Ee&&(De.inpaint_replace=vt),De.bounding_box=pt;const _t=t.scale();t.scale({x:1/Je,y:1/Je});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:pt.x+Ut.x,y:pt.y+Ut.y,width:pt.width,height:pt.height});We&&OEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(_t),De.init_img=sn,De.progress_images=!1,De.seam_size=R,De.seam_blur=M,De.seam_strength=z,De.seam_steps=N,De.tile_size=X,De.force_outpaint=ue,De.infill_method=b}W?(De.variation_amount=Me,$&&(De.with_variations=Eye($))):De.variation_amount=0;let Qe=!1,st=!1;return ne&&(Qe={level:ce,strength:me}),J&&(st={type:h,strength:u},h==="codeformer"&&(st.codeformer_fidelity=l)),We&&(De.enable_image_debugging=We),{generationParameters:De,esrganParameters:Qe,facetoolParameters:st}},NEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(yu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(s4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=REe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(yu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(yu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(IH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(i4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},DEe=()=>{const{origin:e}=new URL(window.location.href),t=o5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=MEe(i),{emitGenerateImage:O,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:ue,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=NEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>b(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{O(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{ue();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},zEe=["cursorPosition"].map(e=>`canvas.${e}`),BEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),FEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),tU=l$({options:zke,gallery:lSe,system:c4e,canvas:jbe}),$Ee=T$.getPersistConfig({key:"root",storage:P$,rootReducer:tU,blacklist:[...zEe,...BEe,...FEe],debounce:300}),HEe=uye($Ee,tU),nU=r2e({reducer:HEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(DEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qe=q2e,Le=z2e;function a5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?a5=function(n){return typeof n}:a5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},a5(e)}function WEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(r2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),YEe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),qEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Le(YEe),i=t?Math.round(t*100/n):0;return x(MF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function KEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function XEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Av(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(KEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Wn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(X0,{isOpen:t,onClose:r,children:[x(Z0,{}),ee(Dv,{className:" modal hotkeys-modal",children:[x(u_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(wb,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const ZEe=e=>{const{isProcessing:t,isConnected:n}=Le(l=>l.system),r=qe(),{name:i,status:o,description:a}=e,s=()=>{r(dH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(rB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},QEe=dt(e=>e.system,e=>{const t=Ze.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),JEe=()=>{const{models:e}=Le(QEe);return x(wb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(ZEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},ePe=dt([p2,Q$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ze.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),tPe=({children:e})=>{const t=qe(),n=Le(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Av(),{isOpen:a,onOpen:s,onClose:l}=Av(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Le(ePe),b=()=>{mU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(o4e(E))};return ee(Wn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(X0,{isOpen:r,onClose:o,children:[x(Z0,{}),ee(Dv,{className:"modal settings-modal",children:[x(Ob,{className:"settings-modal-header",children:"Settings"}),x(u_,{className:"modal-close-btn"}),ee(Nv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(JEe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Iu,{label:"Display In-Progress Images",validValues:b5e,value:u,onChange:E=>t(Q5e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Fa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(eH(E.target.checked))}),x(Fa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(n4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Fa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Ib,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(X0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Z0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Dv,{children:x(Nv,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},nPe=dt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),rPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Le(nPe),s=qe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(tH())},className:`status ${l}`,children:u})})},iPe=["dark","light","green"];function oPe(){const{setColorMode:e}=Yv(),t=qe(),n=Le(i=>i.options.currentTheme),r=i=>{e(i),t(_ke(i))};return x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(F4e,{})}),children:x(aB,{align:"stretch",children:iPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(J_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const aPe=dt([p2],e=>{const{isProcessing:t,model_list:n}=e,r=Ze.map(n,(o,a)=>a),i=Ze.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),sPe=()=>{const e=qe(),{models:t,activeModel:n,isProcessing:r}=Le(aPe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Iu,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(dH(o.target.value))}})})},lPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:LH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(rPe,{}),x(sPe,{}),x(XEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(R4e,{})})}),x(oPe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(E4e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(S4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(b4e,{})})}),x(tPe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(tk,{})})})]})]}),uPe=dt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),cPe=dt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),dPe=()=>{const e=qe(),t=Le(uPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Le(cPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(tH()),e(Pw(!n))};return gt("`",()=>{e(Pw(!n))},[n]),gt("esc",()=>{e(Pw(!1))}),ee(Wn,{children:[n&&x(BH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(x4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(z4e,{}):x(oH,{}),onClick:l})})]})};function fPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var hPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function y2(e,t){var n=pPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function pPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=hPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var gPe=[".DS_Store","Thumbs.db"];function mPe(e){return c1(this,void 0,void 0,function(){return d1(this,function(t){return _4(e)&&vPe(e.dataTransfer)?[2,xPe(e.dataTransfer,e.type)]:yPe(e)?[2,bPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,SPe(e)]:[2,[]]})})}function vPe(e){return _4(e)}function yPe(e){return _4(e)&&_4(e.target)}function _4(e){return typeof e=="object"&&e!==null}function bPe(e){return V7(e.target.files).map(function(t){return y2(t)})}function SPe(e){return c1(this,void 0,void 0,function(){var t;return d1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return y2(r)})]}})})}function xPe(e,t){return c1(this,void 0,void 0,function(){var n,r;return d1(this,function(i){switch(i.label){case 0:return e.items?(n=V7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(wPe))]):[3,2];case 1:return r=i.sent(),[2,zI(iU(r))];case 2:return[2,zI(V7(e.files).map(function(o){return y2(o)}))]}})})}function zI(e){return e.filter(function(t){return gPe.indexOf(t.name)===-1})}function V7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,WI(n)];if(e.sizen)return[!1,WI(n)]}return[!0,null]}function Of(e){return e!=null}function BPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=lU(l,n),h=Hv(u,1),g=h[0],m=uU(l,r,i),v=Hv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function k4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function b3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function UI(e){e.preventDefault()}function FPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function $Pe(e){return e.indexOf("Edge/")!==-1}function HPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return FPe(e)||$Pe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function iTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ok=C.exports.forwardRef(function(e,t){var n=e.children,r=E4(e,YPe),i=pU(r),o=i.open,a=E4(i,qPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Ok.displayName="Dropzone";var hU={disabled:!1,getFilesFromEvent:mPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Ok.defaultProps=hU;Ok.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var Y7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},hU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,O=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return UPe(n)},[n]),j=C.exports.useMemo(function(){return VPe(n)},[n]),ue=C.exports.useMemo(function(){return typeof E=="function"?E:jI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:jI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(oTe,Y7),K=Xw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&WPe()),xe=function(){!Me.current&&me&&setTimeout(function(){if(ne.current){var Xe=ne.current.files;Xe.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Me]);var be=C.exports.useRef([]),Ie=function(Xe){Q.current&&Q.current.contains(Xe.target)||(Xe.preventDefault(),be.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",UI,!1),document.addEventListener("drop",Ie,!1)),function(){T&&(document.removeEventListener("dragover",UI),document.removeEventListener("drop",Ie))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),De=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[].concat(ZPe(be.current),[Oe.target]),b3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){if(!(k4(Oe)&&!N)){var Xt=Xe.length,Yt=Xt>0&&BPe({files:Xe,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),_e=Xt>0&&!Yt;X({isDragAccept:Yt,isDragReject:_e,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Xe){return We(Xe)})},[i,u,We,N,$,a,o,s,l,V]),Qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=b3(Oe);if(Xe&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Xe&&g&&g(Oe),!1},[g,N]),st=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=be.current.filter(function(Yt){return Q.current&&Q.current.contains(Yt)}),Xt=Xe.indexOf(Oe.target);Xt!==-1&&Xe.splice(Xt,1),be.current=Xe,!(Xe.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),b3(Oe)&&h&&h(Oe))},[Q,h,N]),Ct=C.exports.useCallback(function(Oe,Xe){var Xt=[],Yt=[];Oe.forEach(function(_e){var It=lU(_e,$),ze=Xw(It,2),ot=ze[0],ln=ze[1],zn=uU(_e,a,o),He=Xw(zn,2),ct=He[0],tt=He[1],Nt=V?V(_e):null;if(ot&&ct&&!Nt)Xt.push(_e);else{var Zt=[ln,tt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:_e,errors:Zt.filter(function(er){return er})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(_e){Yt.push({file:_e,errors:[zPe]})}),Xt.splice(0)),X({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Xe),Yt.length>0&&b&&b(Yt,Xe),Xt.length>0&&v&&v(Xt,Xe)},[X,s,$,a,o,l,m,v,b,V]),ft=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[],b3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){k4(Oe)&&!N||Ct(Xe,Oe)}).catch(function(Xe){return We(Xe)}),X({type:"reset"})},[i,Ct,We,N]),ut=C.exports.useCallback(function(){if(Me.current){X({type:"openDialog"}),ue();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Xe){return i(Xe)}).then(function(Xe){Ct(Xe,null),X({type:"closeDialog"})}).catch(function(Xe){GPe(Xe)?(W(Xe),X({type:"closeDialog"})):jPe(Xe)?(Me.current=!1,ne.current?(ne.current.value=null,ne.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Xe)});return}ne.current&&(X({type:"openDialog"}),ue(),ne.current.value=null,ne.current.click())},[X,ue,W,P,Ct,We,j,s]),vt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Ee=C.exports.useCallback(function(){X({type:"focus"})},[]),Je=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(HPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Xe){return r?null:Xe},pt=function(Xe){return O?null:it(Xe)},an=function(Xe){return R?null:it(Xe)},_t=function(Xe){N&&Xe.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.role,_e=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,ln=Oe.onDragEnter,zn=Oe.onDragOver,He=Oe.onDragLeave,ct=Oe.onDrop,tt=E4(Oe,KPe);return ur(ur(j7({onKeyDown:pt(ll(_e,vt)),onFocus:pt(ll(It,Ee)),onBlur:pt(ll(ze,Je)),onClick:it(ll(ot,Lt)),onDragEnter:an(ll(ln,De)),onDragOver:an(ll(zn,Qe)),onDragLeave:an(ll(He,st)),onDrop:an(ll(ct,ft)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,Q),!r&&!O?{tabIndex:0}:{}),tt)}},[Q,vt,Ee,Je,Lt,De,Qe,st,ft,O,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.onChange,_e=Oe.onClick,It=E4(Oe,XPe),ze=j7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(Yt,ft)),onClick:it(ll(_e,sn)),tabIndex:-1},Xt,ne);return ur(ur({},ze),It)}},[ne,n,s,ft,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Ut,getInputProps:yn,rootRef:Q,inputRef:ne,open:it(ut)})}function oTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},Y7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},Y7);default:return e}}function jI(){}const aTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return gt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},YI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:a0(),category:"user",...l};t(r0({image:u,category:"user"})),o==="unifiedCanvas"?t(ak(u)):o==="img2img"&&t(m2(u))},sTe=e=>{const{children:t}=e,n=qe(),r=Le(_r),i=c2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=xV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,O)=>M+` -`+O.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(YI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:b,isDragActive:w,open:E}=pU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const O=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&O.push(N);if(!O.length)return;if(T.stopImmediatePropagation(),O.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=O[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(YI({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(lk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(aTe,{isDragAccept:v,isDragReject:b,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},lTe=()=>{const e=qe(),t=Le(wCe),n=c2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(l4e())},[e,n,t])},gU=dt([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),uTe=()=>{const e=qe(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Le(gU),s=()=>{e(ad(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return gt("f",()=>{o||t?(e(ad(!1)),e(id(!1))):(e(ad(!0)),e(id(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(lH,{})}),r&&ee(Wn,{children:[x(fH,{iconButton:!0}),x(hH,{})]})]}):null},cTe=()=>{const e=qe(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Le(gU),a=()=>{e(id(!0)),r&&e(Li(!0))};return gt("f",()=>{t||i?(e(ad(!1)),e(id(!1))):(e(ad(!0)),e(id(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(nH,{})}):null};fPe();const dTe=()=>(lTe(),ee("div",{className:"App",children:[ee(sTe,{children:[x(qEe,{}),ee("div",{className:"app-content",children:[x(lPe,{}),x(bke,{})]}),x("div",{className:"app-console",children:x(dPe,{})})]}),x(uTe,{}),x(cTe,{})]}));const mU=gye(nU),fTe=SN({key:"invokeai-style-cache",prepend:!0});Qw.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(G2e,{store:nU,children:x(rU,{loading:x(jEe,{}),persistor:mU,children:x(_J,{value:fTe,children:x(xve,{children:x(dTe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 37797115a3..a9b43b5c40 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ InvokeAI - A Stable Diffusion Toolkit - + diff --git a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx index 34924f8966..abcb8ca5e4 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx @@ -2,7 +2,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; import { Circle, Group, Rect } from 'react-konva'; -import { useAppDispatch, useAppSelector } from 'app/store'; +import { useAppSelector } from 'app/store'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { rgbaColorToString } from 'features/canvas/util/colorToString'; import { COLOR_PICKER_SIZE } from '../util/constants'; diff --git a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts index cec35a4f02..b2d93178f8 100644 --- a/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts +++ b/frontend/src/features/canvas/hooks/useCanvasMouseDown.ts @@ -11,10 +11,8 @@ import { } from 'features/canvas/store/canvasSelectors'; import { addLine, - commitColorPickerColor, setIsDrawing, setIsMovingStage, - setTool, } from 'features/canvas/store/canvasSlice'; import getScaledCursorPosition from '../util/getScaledCursorPosition'; import useColorPicker from './useColorUnderCursor'; @@ -64,7 +62,7 @@ const useCanvasMouseDown = (stageRef: MutableRefObject) => { // Add a new line starting from the current cursor position. dispatch(addLine([scaledCursorPosition.x, scaledCursorPosition.y])); }, - [stageRef, tool, isStaging, dispatch] + [stageRef, tool, isStaging, dispatch, commitColorUnderCursor] ); }; diff --git a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx index 64cc3d0893..8a3629b8c8 100644 --- a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx +++ b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx @@ -1,5 +1,4 @@ import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import ImageFit from 'features/options/components/AdvancedOptions/ImageToImage/ImageFit'; @@ -12,7 +11,6 @@ import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/U import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; import MainOptions from 'features/options/components/MainOptions/MainOptions'; import OptionsAccordion from 'features/options/components/OptionsAccordion'; import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; @@ -20,10 +18,6 @@ import PromptInput from 'features/options/components/PromptInput/PromptInput'; import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; export default function ImageToImagePanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - const imageToImageAccordions = { seed: { header: , diff --git a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx index 8e2fcb37d9..0abcb9ca1c 100644 --- a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx +++ b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx @@ -1,5 +1,4 @@ import { Feature } from 'app/features'; -import { RootState, useAppSelector } from 'app/store'; import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; import OutputHeader from 'features/options/components/AdvancedOptions/Output/OutputHeader'; @@ -10,7 +9,6 @@ import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/U import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; -import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox'; import MainOptions from 'features/options/components/MainOptions/MainOptions'; import OptionsAccordion from 'features/options/components/OptionsAccordion'; import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; @@ -18,10 +16,6 @@ import PromptInput from 'features/options/components/PromptInput/PromptInput'; import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; export default function TextToImagePanel() { - const showAdvancedOptions = useAppSelector( - (state: RootState) => state.options.showAdvancedOptions - ); - const textToImageAccordions = { seed: { header: , From 7515bcfe78b41d3fbe6fe12a3ab8f1c188a10a31 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 07:21:06 +1100 Subject: [PATCH 192/220] Fixes iterations being disabled when seed random & variations are off --- .../components/MainOptions/MainIterations.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/frontend/src/features/options/components/MainOptions/MainIterations.tsx b/frontend/src/features/options/components/MainOptions/MainIterations.tsx index b87e66b635..c4b12973a7 100644 --- a/frontend/src/features/options/components/MainOptions/MainIterations.tsx +++ b/frontend/src/features/options/components/MainOptions/MainIterations.tsx @@ -3,18 +3,19 @@ import _ from 'lodash'; import React from 'react'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAINumberInput from 'common/components/IAINumberInput'; -import { mayGenerateMultipleImagesSelector } from 'features/options/store/optionsSelectors'; -import { OptionsState, setIterations } from 'features/options/store/optionsSlice'; +import { + OptionsState, + setIterations, +} from 'features/options/store/optionsSlice'; import { inputWidth } from './MainOptions'; const mainIterationsSelector = createSelector( - [(state: RootState) => state.options, mayGenerateMultipleImagesSelector], - (options: OptionsState, mayGenerateMultipleImages) => { + [(state: RootState) => state.options], + (options: OptionsState) => { const { iterations } = options; return { iterations, - mayGenerateMultipleImages, }; }, { @@ -26,9 +27,7 @@ const mainIterationsSelector = createSelector( export default function MainIterations() { const dispatch = useAppDispatch(); - const { iterations, mayGenerateMultipleImages } = useAppSelector( - mainIterationsSelector - ); + const { iterations } = useAppSelector(mainIterationsSelector); const handleChangeIterations = (v: number) => dispatch(setIterations(v)); @@ -38,7 +37,6 @@ export default function MainIterations() { step={1} min={1} max={9999} - isDisabled={!mayGenerateMultipleImages} onChange={handleChangeIterations} value={iterations} width={inputWidth} From 6f3e99efc332a1222eeefd9d8892f4e826a5061a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 08:04:53 +1100 Subject: [PATCH 193/220] Un-floors cursor position --- .../src/features/canvas/components/IAICanvasStatusText.tsx | 5 +---- frontend/src/features/canvas/util/getScaledCursorPosition.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index baaee49a85..3128a1280a 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -3,10 +3,7 @@ import { useAppSelector } from 'app/store'; import _ from 'lodash'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import IAICanvasStatusTextCursorPos from './IAICanvasStatusText/IAICanvasStatusTextCursorPos'; - -const roundToHundreth = (val: number): number => { - return Math.round(val * 100) / 100; -}; +import roundToHundreth from '../util/roundToHundreth'; const selector = createSelector( [canvasSelector], diff --git a/frontend/src/features/canvas/util/getScaledCursorPosition.ts b/frontend/src/features/canvas/util/getScaledCursorPosition.ts index 07487f4ea8..03a4d749bf 100644 --- a/frontend/src/features/canvas/util/getScaledCursorPosition.ts +++ b/frontend/src/features/canvas/util/getScaledCursorPosition.ts @@ -10,8 +10,8 @@ const getScaledCursorPosition = (stage: Stage) => { const scaledCursorPosition = stageTransform.invert().point(pointerPosition); return { - x: Math.floor(scaledCursorPosition.x), - y: Math.floor(scaledCursorPosition.y), + x: scaledCursorPosition.x, + y: scaledCursorPosition.y, }; }; From 318426b67a90a90b9ae729fc03764a27e9acdf7d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 08:05:08 +1100 Subject: [PATCH 194/220] Changes color picker preview to circles --- .../IAICanvasStatusTextCursorPos.tsx | 5 +- .../components/IAICanvasToolPreview.tsx | 120 +++++++++++------- .../src/features/canvas/store/canvasSlice.ts | 1 - .../src/features/canvas/util/constants.ts | 3 +- .../features/canvas/util/roundToHundreth.ts | 5 + 5 files changed, 87 insertions(+), 47 deletions(-) create mode 100644 frontend/src/features/canvas/util/roundToHundreth.ts diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx index 5d383cf38d..de8e9c3941 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx @@ -3,6 +3,7 @@ import { useAppSelector } from 'app/store'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import React from 'react'; import _ from 'lodash'; +import roundToHundreth from 'features/canvas/util/roundToHundreth'; const cursorPositionSelector = createSelector( [canvasSelector], @@ -14,7 +15,9 @@ const cursorPositionSelector = createSelector( : { cursorX: -1, cursorY: -1 }; return { - cursorCoordinatesString: `(${cursorX}, ${cursorY})`, + cursorCoordinatesString: `(${roundToHundreth(cursorX)}, ${roundToHundreth( + cursorY + )})`, }; }, { diff --git a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx index abcb8ca5e4..59c57fcf4f 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx @@ -5,7 +5,10 @@ import { Circle, Group, Rect } from 'react-konva'; import { useAppSelector } from 'app/store'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { rgbaColorToString } from 'features/canvas/util/colorToString'; -import { COLOR_PICKER_SIZE } from '../util/constants'; +import { + COLOR_PICKER_SIZE, + COLOR_PICKER_STROKE_RADIUS, +} from '../util/constants'; const canvasBrushPreviewSelector = createSelector( canvasSelector, @@ -43,7 +46,12 @@ const canvasBrushPreviewSelector = createSelector( colorPickerSize: COLOR_PICKER_SIZE / stageScale, colorPickerOffset: COLOR_PICKER_SIZE / 2 / stageScale, colorPickerCornerRadius: COLOR_PICKER_SIZE / 5 / stageScale, - brushColorString: fill, + colorPickerOuterRadius: COLOR_PICKER_SIZE / stageScale, + colorPickerInnerRadius: + (COLOR_PICKER_SIZE - COLOR_PICKER_STROKE_RADIUS + 1) / stageScale, + maskColorString: rgbaColorToString({ ...maskColor, a: 0.5 }), + brushColorString: rgbaColorToString(brushColor), + colorPickerColorString: rgbaColorToString(colorPickerColor), tool, shouldShowBrush, shouldDrawBrushPreview: @@ -73,7 +81,7 @@ const IAICanvasToolPreview = (props: GroupConfig) => { width, height, radius, - brushColorString, + maskColorString, tool, shouldDrawBrushPreview, dotRadius, @@ -81,6 +89,10 @@ const IAICanvasToolPreview = (props: GroupConfig) => { colorPickerSize, colorPickerOffset, colorPickerCornerRadius, + brushColorString, + colorPickerColorString, + colorPickerInnerRadius, + colorPickerOuterRadius, } = useAppSelector(canvasBrushPreviewSelector); if (!shouldDrawBrushPreview) return null; @@ -89,48 +101,21 @@ const IAICanvasToolPreview = (props: GroupConfig) => { {tool === 'colorPicker' ? ( <> - - - ) : ( @@ -183,3 +168,50 @@ const IAICanvasToolPreview = (props: GroupConfig) => { }; export default IAICanvasToolPreview; +{ + /* <> + + + + */ +} diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index f71083ae17..f5de2bf2d4 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -689,7 +689,6 @@ export const canvasSlice = createSlice({ }, commitColorPickerColor: (state) => { state.brushColor = state.colorPickerColor; - state.tool = 'brush'; }, setMergedCanvas: (state, action: PayloadAction) => { state.pastLayerStates.push({ diff --git a/frontend/src/features/canvas/util/constants.ts b/frontend/src/features/canvas/util/constants.ts index 4f9662e1be..2579cc33eb 100644 --- a/frontend/src/features/canvas/util/constants.ts +++ b/frontend/src/features/canvas/util/constants.ts @@ -13,4 +13,5 @@ export const MAX_CANVAS_SCALE = 20; // padding given to initial image/bounding box when stage view is reset export const STAGE_PADDING_PERCENTAGE = 0.95; -export const COLOR_PICKER_SIZE = 60; +export const COLOR_PICKER_SIZE = 30; +export const COLOR_PICKER_STROKE_RADIUS = 10; diff --git a/frontend/src/features/canvas/util/roundToHundreth.ts b/frontend/src/features/canvas/util/roundToHundreth.ts new file mode 100644 index 0000000000..1b05e7f64d --- /dev/null +++ b/frontend/src/features/canvas/util/roundToHundreth.ts @@ -0,0 +1,5 @@ +const roundToHundreth = (val: number): number => { + return Math.round(val * 100) / 100; +}; + +export default roundToHundreth; From a7f11a8c09447bf175ecdad5a6db588cf883a09a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 13:17:56 +1100 Subject: [PATCH 195/220] Fixes variation params not set correctly when recalled --- frontend/src/features/options/store/optionsSlice.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/features/options/store/optionsSlice.ts b/frontend/src/features/options/store/optionsSlice.ts index b7a88b90e5..719544ecc5 100644 --- a/frontend/src/features/options/store/optionsSlice.ts +++ b/frontend/src/features/options/store/optionsSlice.ts @@ -197,6 +197,8 @@ export const optionsSlice = createSlice({ }, setSeedWeights: (state, action: PayloadAction) => { state.seedWeights = action.payload; + state.shouldGenerateVariations = true; + state.variationAmount = 0; }, setAllTextToImageParameters: ( state, @@ -220,6 +222,7 @@ export const optionsSlice = createSlice({ if (variations && variations.length > 0) { state.seedWeights = seedWeightsToString(variations); state.shouldGenerateVariations = true; + state.variationAmount = 0; } else { state.shouldGenerateVariations = false; } From fcd3ef1f98049acc39add780097503fd34a88695 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 13:18:12 +1100 Subject: [PATCH 196/220] Fixes invoke hotkey not working in input fields --- .../options/components/ProcessButtons/InvokeButton.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx index 97b11323df..30aab9744c 100644 --- a/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx +++ b/frontend/src/features/options/components/ProcessButtons/InvokeButton.tsx @@ -27,9 +27,12 @@ export default function InvokeButton(props: InvokeButton) { useHotkeys( ['ctrl+enter', 'meta+enter'], () => { - if (isReady) { - dispatch(generateImage(activeTabName)); - } + dispatch(generateImage(activeTabName)); + }, + { + enabled: () => isReady, + preventDefault: true, + enableOnFormTags: ['input', 'textarea', 'select'], }, [isReady, activeTabName] ); From c8c1b3e217b75d8aadef01b7a4152bd6eecf6d0a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:28:21 +1100 Subject: [PATCH 197/220] Simplifies Accordion Prep for adding reset buttons for each section --- frontend/src/app/features.ts | 12 +++---- .../AccordionItems/InvokeAccordionItem.tsx | 30 ++++++++++------- .../BoundingBoxSettings.scss | 0 .../BoundingBoxSettings.tsx | 0 .../CompositionOptions.tsx} | 4 +-- .../{Inpainting => Canvas}/InpaintReplace.tsx | 0 ...estoreHeader.tsx => FaceRestoreToggle.tsx} | 29 +++++------------ .../AdvancedOptions/Output/OutputHeader.tsx | 11 ------- .../AdvancedOptions/Seed/SeedHeader.tsx | 11 ------- .../{UpscaleHeader.tsx => UpscaleToggle.tsx} | 29 +++++------------ .../Variations/GenerateVariations.tsx | 2 +- .../Variations/VariationsHeader.tsx | 17 ---------- .../options/components/OptionsAccordion.tsx | 9 ++++-- .../ImageToImage/ImageToImagePanel.tsx | 31 +++++++++--------- .../TextToImage/TextToImagePanel.tsx | 31 +++++++++--------- .../UnifiedCanvas/UnifiedCanvasPanel.tsx | 32 ++++++++----------- frontend/src/styles/index.scss | 2 +- 17 files changed, 96 insertions(+), 154 deletions(-) rename frontend/src/features/options/components/AdvancedOptions/{Inpainting => Canvas}/BoundingBoxSettings/BoundingBoxSettings.scss (100%) rename frontend/src/features/options/components/AdvancedOptions/{Inpainting => Canvas}/BoundingBoxSettings/BoundingBoxSettings.tsx (100%) rename frontend/src/features/options/components/AdvancedOptions/{Inpainting/OutpaintingOptions.tsx => Canvas/CompositionOptions.tsx} (98%) rename frontend/src/features/options/components/AdvancedOptions/{Inpainting => Canvas}/InpaintReplace.tsx (100%) rename frontend/src/features/options/components/AdvancedOptions/FaceRestore/{FaceRestoreHeader.tsx => FaceRestoreToggle.tsx} (50%) delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Output/OutputHeader.tsx delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Seed/SeedHeader.tsx rename frontend/src/features/options/components/AdvancedOptions/Upscale/{UpscaleHeader.tsx => UpscaleToggle.tsx} (50%) delete mode 100644 frontend/src/features/options/components/AdvancedOptions/Variations/VariationsHeader.tsx diff --git a/frontend/src/app/features.ts b/frontend/src/app/features.ts index f31b0dad98..f09effea09 100644 --- a/frontend/src/app/features.ts +++ b/frontend/src/app/features.ts @@ -13,8 +13,8 @@ export enum Feature { UPSCALE, FACE_CORRECTION, IMAGE_TO_IMAGE, - OUTPAINTING, BOUNDING_BOX, + CANVAS_COMPOSITION, } /** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip. * @@ -61,14 +61,14 @@ export const FEATURES: Record = { href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, - [Feature.OUTPAINTING]: { - text: 'Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.', - href: 'link/to/docs/feature3.html', - guideImage: 'asset/path.gif', - }, [Feature.BOUNDING_BOX]: { text: 'The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, + [Feature.CANVAS_COMPOSITION]: { + text: 'Control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.', + href: 'link/to/docs/feature3.html', + guideImage: 'asset/path.gif', + }, }; diff --git a/frontend/src/features/options/components/AccordionItems/InvokeAccordionItem.tsx b/frontend/src/features/options/components/AccordionItems/InvokeAccordionItem.tsx index d11990a6a6..2162b1fa34 100644 --- a/frontend/src/features/options/components/AccordionItems/InvokeAccordionItem.tsx +++ b/frontend/src/features/options/components/AccordionItems/InvokeAccordionItem.tsx @@ -3,31 +3,37 @@ import { AccordionIcon, AccordionItem, AccordionPanel, + Box, + Flex, } from '@chakra-ui/react'; -import React, { ReactElement } from 'react'; +import { ReactNode } from 'react'; import { Feature } from 'app/features'; import GuideIcon from 'common/components/GuideIcon'; export interface InvokeAccordionItemProps { - header: ReactElement; - feature: Feature; - options: ReactElement; + header: string; + content: ReactNode; + feature?: Feature; + additionalHeaderComponents?: ReactNode; } export default function InvokeAccordionItem(props: InvokeAccordionItemProps) { - const { header, feature, options } = props; + const { header, feature, content, additionalHeaderComponents } = props; return ( -

- - {header} - + + + + {header} + + {additionalHeaderComponents} + {feature && } - -

+ + - {options} + {content}
); diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss b/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.scss similarity index 100% rename from frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss rename to frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.scss diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx similarity index 100% rename from frontend/src/features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.tsx rename to frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx similarity index 98% rename from frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx index 29c8e2c0ab..bfda099071 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx @@ -51,7 +51,7 @@ const selector = createSelector( } ); -const OutpaintingOptions = () => { +const CompositionOptions = () => { const dispatch = useAppDispatch(); const { seamSize, @@ -171,7 +171,7 @@ const OutpaintingOptions = () => { ); }; -export default OutpaintingOptions; +export default CompositionOptions; export const OutpaintingHeader = () => { return ( diff --git a/frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintReplace.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/InpaintReplace.tsx similarity index 100% rename from frontend/src/features/options/components/AdvancedOptions/Inpainting/InpaintReplace.tsx rename to frontend/src/features/options/components/AdvancedOptions/Canvas/InpaintReplace.tsx diff --git a/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreToggle.tsx similarity index 50% rename from frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreToggle.tsx index 3949ecb8e7..0867ad0db0 100644 --- a/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/FaceRestore/FaceRestoreToggle.tsx @@ -1,14 +1,9 @@ -import { Flex } from '@chakra-ui/layout'; -import React, { ChangeEvent } from 'react'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from 'app/store'; +import { ChangeEvent } from 'react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; import { setShouldRunFacetool } from 'features/options/store/optionsSlice'; -export default function FaceRestoreHeader() { +export default function FaceRestoreToggle() { const isGFPGANAvailable = useAppSelector( (state: RootState) => state.system.isGFPGANAvailable ); @@ -23,18 +18,10 @@ export default function FaceRestoreHeader() { dispatch(setShouldRunFacetool(e.target.checked)); return ( - -

Restore Face

- -
+ ); } diff --git a/frontend/src/features/options/components/AdvancedOptions/Output/OutputHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Output/OutputHeader.tsx deleted file mode 100644 index 6c8603d9f8..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Output/OutputHeader.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Box } from '@chakra-ui/react'; - -const OutputHeader = () => { - return ( - - Other Options - - ); -}; - -export default OutputHeader; diff --git a/frontend/src/features/options/components/AdvancedOptions/Seed/SeedHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Seed/SeedHeader.tsx deleted file mode 100644 index 9c05b96d68..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Seed/SeedHeader.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Box } from '@chakra-ui/react'; - -const SeedHeader = () => { - return ( - - Seed - - ); -}; - -export default SeedHeader; diff --git a/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleToggle.tsx similarity index 50% rename from frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleHeader.tsx rename to frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleToggle.tsx index 4e9e4d3629..f0a55776c2 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleHeader.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Upscale/UpscaleToggle.tsx @@ -1,14 +1,9 @@ -import { Flex } from '@chakra-ui/layout'; -import React, { ChangeEvent } from 'react'; -import { - RootState, - useAppDispatch, - useAppSelector, -} from 'app/store'; +import { ChangeEvent } from 'react'; +import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import IAISwitch from 'common/components/IAISwitch'; import { setShouldRunESRGAN } from 'features/options/store/optionsSlice'; -export default function UpscaleHeader() { +export default function UpscaleToggle() { const isESRGANAvailable = useAppSelector( (state: RootState) => state.system.isESRGANAvailable ); @@ -21,18 +16,10 @@ export default function UpscaleHeader() { const handleChangeShouldRunESRGAN = (e: ChangeEvent) => dispatch(setShouldRunESRGAN(e.target.checked)); return ( - -

Upscale

- -
+ ); } diff --git a/frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx index dd8d95404a..ca5afd53c4 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Variations/GenerateVariations.tsx @@ -7,7 +7,7 @@ import { import IAISwitch from 'common/components/IAISwitch'; import { setShouldGenerateVariations } from 'features/options/store/optionsSlice'; -export default function GenerateVariations() { +export default function GenerateVariationsToggle() { const shouldGenerateVariations = useAppSelector( (state: RootState) => state.options.shouldGenerateVariations ); diff --git a/frontend/src/features/options/components/AdvancedOptions/Variations/VariationsHeader.tsx b/frontend/src/features/options/components/AdvancedOptions/Variations/VariationsHeader.tsx deleted file mode 100644 index ab02fad1f6..0000000000 --- a/frontend/src/features/options/components/AdvancedOptions/Variations/VariationsHeader.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Flex } from '@chakra-ui/react'; -import React from 'react'; -import GenerateVariations from './GenerateVariations'; - -export default function VariationsHeader() { - return ( - -

Variations

- -
- ); -} diff --git a/frontend/src/features/options/components/OptionsAccordion.tsx b/frontend/src/features/options/components/OptionsAccordion.tsx index 98eb96a999..5520ae2297 100644 --- a/frontend/src/features/options/components/OptionsAccordion.tsx +++ b/frontend/src/features/options/components/OptionsAccordion.tsx @@ -36,12 +36,15 @@ const OptionsAccordion = (props: OptionAccordionsType) => { const accordionsToRender: ReactElement[] = []; if (accordionInfo) { Object.keys(accordionInfo).forEach((key) => { + const { header, feature, content, additionalHeaderComponents } = + accordionInfo[key]; accordionsToRender.push( ); }); diff --git a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx index 8a3629b8c8..3b85b1fbee 100644 --- a/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx +++ b/frontend/src/features/tabs/components/ImageToImage/ImageToImagePanel.tsx @@ -1,15 +1,13 @@ import { Feature } from 'app/features'; -import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; +import FaceRestoreToggle from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreToggle'; import ImageFit from 'features/options/components/AdvancedOptions/ImageToImage/ImageFit'; import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import OutputHeader from 'features/options/components/AdvancedOptions/Output/OutputHeader'; import OutputOptions from 'features/options/components/AdvancedOptions/Output/OutputOptions'; -import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; +import UpscaleToggle from 'features/options/components/AdvancedOptions/Upscale/UpscaleToggle'; +import GenerateVariationsToggle from 'features/options/components/AdvancedOptions/Variations/GenerateVariations'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; import MainOptions from 'features/options/components/MainOptions/MainOptions'; import OptionsAccordion from 'features/options/components/OptionsAccordion'; @@ -20,29 +18,32 @@ import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; export default function ImageToImagePanel() { const imageToImageAccordions = { seed: { - header: , + header: 'Seed', feature: Feature.SEED, - options: , + content: , }, variations: { - header: , + header: 'Variations', feature: Feature.VARIATIONS, - options: , + content: , + additionalHeaderComponents: , }, face_restore: { - header: , + header: 'Face Restoration', feature: Feature.FACE_CORRECTION, - options: , + content: , + additionalHeaderComponents: , }, upscale: { - header: , + header: 'Upscaling', feature: Feature.UPSCALE, - options: , + content: , + additionalHeaderComponents: , }, other: { - header: , + header: 'Other Options', feature: Feature.OTHER, - options: , + content: , }, }; diff --git a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx index 0abcb9ca1c..162bce32b1 100644 --- a/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx +++ b/frontend/src/features/tabs/components/TextToImage/TextToImagePanel.tsx @@ -1,13 +1,11 @@ import { Feature } from 'app/features'; -import FaceRestoreHeader from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreHeader'; import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions'; -import OutputHeader from 'features/options/components/AdvancedOptions/Output/OutputHeader'; +import FaceRestoreToggle from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreToggle'; import OutputOptions from 'features/options/components/AdvancedOptions/Output/OutputOptions'; -import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; -import UpscaleHeader from 'features/options/components/AdvancedOptions/Upscale/UpscaleHeader'; import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions'; -import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; +import UpscaleToggle from 'features/options/components/AdvancedOptions/Upscale/UpscaleToggle'; +import GenerateVariationsToggle from 'features/options/components/AdvancedOptions/Variations/GenerateVariations'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; import MainOptions from 'features/options/components/MainOptions/MainOptions'; import OptionsAccordion from 'features/options/components/OptionsAccordion'; @@ -18,29 +16,32 @@ import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; export default function TextToImagePanel() { const textToImageAccordions = { seed: { - header: , + header: 'Seed', feature: Feature.SEED, - options: , + content: , }, variations: { - header: , + header: 'Variations', feature: Feature.VARIATIONS, - options: , + content: , + additionalHeaderComponents: , }, face_restore: { - header: , + header: 'Face Restoration', feature: Feature.FACE_CORRECTION, - options: , + content: , + additionalHeaderComponents: , }, upscale: { - header: , + header: 'Upscaling', feature: Feature.UPSCALE, - options: , + content: , + additionalHeaderComponents: , }, other: { - header: , + header: 'Other Options', feature: Feature.OTHER, - options: , + content: , }, }; diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx index f2645560cb..52afd2e187 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -1,15 +1,10 @@ // import { Feature } from 'app/features'; import { Feature } from 'app/features'; import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import BoundingBoxSettings, { - BoundingBoxSettingsHeader, -} from 'features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings'; -import OutpaintingOptions, { - OutpaintingHeader, -} from 'features/options/components/AdvancedOptions/Inpainting/OutpaintingOptions'; -import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHeader'; +import BoundingBoxSettings from 'features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings'; +import CompositionOptions from 'features/options/components/AdvancedOptions/Canvas/CompositionOptions'; import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; -import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader'; +import GenerateVariationsToggle from 'features/options/components/AdvancedOptions/Variations/GenerateVariations'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; import MainOptions from 'features/options/components/MainOptions/MainOptions'; import OptionsAccordion from 'features/options/components/OptionsAccordion'; @@ -20,24 +15,25 @@ import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; export default function UnifiedCanvasPanel() { const unifiedCanvasAccordions = { boundingBox: { - header: , + header: 'Bounding Box', feature: Feature.BOUNDING_BOX, - options: , + content: , }, - outpainting: { - header: , - feature: Feature.OUTPAINTING, - options: , + composition: { + header: 'Composition', + feature: Feature.CANVAS_COMPOSITION, + content: , }, seed: { - header: , + header: 'Seed', feature: Feature.SEED, - options: , + content: , }, variations: { - header: , + header: 'Variations', feature: Feature.VARIATIONS, - options: , + content: , + additionalHeaderComponents: , }, }; diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 44194e6041..250a7ece3e 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -26,7 +26,7 @@ @use '../features/options/components/MainOptions/MainOptions.scss'; @use '../features/options/components/AccordionItems/AdvancedSettings.scss'; @use '../features/options/components/AdvancedOptions/Upscale/UpscaleOptions.scss'; -@use '../features/options/components/AdvancedOptions/Inpainting/BoundingBoxSettings/BoundingBoxSettings.scss'; +@use '../features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.scss'; @use '../features/system/components/ProgressBar.scss'; // gallery From 473869b8ede0edbb89bf34d12334fae79ad907a2 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:31:39 +1100 Subject: [PATCH 198/220] Fixes mask brush preview color --- .../components/IAICanvasToolPreview.tsx | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx index 59c57fcf4f..85c4978383 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx @@ -28,24 +28,11 @@ const canvasBrushPreviewSelector = createSelector( stageScale, } = canvas; - let fill = ''; - - if (layer === 'mask') { - fill = rgbaColorToString({ ...maskColor, a: 0.5 }); - } else if (tool === 'colorPicker') { - fill = rgbaColorToString(colorPickerColor); - } else { - fill = rgbaColorToString(brushColor); - } - return { cursorPosition, width, height, radius: brushSize / 2, - colorPickerSize: COLOR_PICKER_SIZE / stageScale, - colorPickerOffset: COLOR_PICKER_SIZE / 2 / stageScale, - colorPickerCornerRadius: COLOR_PICKER_SIZE / 5 / stageScale, colorPickerOuterRadius: COLOR_PICKER_SIZE / stageScale, colorPickerInnerRadius: (COLOR_PICKER_SIZE - COLOR_PICKER_STROKE_RADIUS + 1) / stageScale, @@ -53,6 +40,7 @@ const canvasBrushPreviewSelector = createSelector( brushColorString: rgbaColorToString(brushColor), colorPickerColorString: rgbaColorToString(colorPickerColor), tool, + layer, shouldShowBrush, shouldDrawBrushPreview: !( @@ -83,12 +71,10 @@ const IAICanvasToolPreview = (props: GroupConfig) => { radius, maskColorString, tool, + layer, shouldDrawBrushPreview, dotRadius, strokeWidth, - colorPickerSize, - colorPickerOffset, - colorPickerCornerRadius, brushColorString, colorPickerColorString, colorPickerInnerRadius, @@ -124,7 +110,7 @@ const IAICanvasToolPreview = (props: GroupConfig) => { x={cursorPosition ? cursorPosition.x : width / 2} y={cursorPosition ? cursorPosition.y : height / 2} radius={radius} - fill={brushColorString} + fill={layer === 'mask' ? maskColorString : brushColorString} globalCompositeOperation={ tool === 'eraser' ? 'destination-out' : 'source-over' } From e67ef4aec2ceae57166d022106d19001dedbc4eb Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:33:38 +1100 Subject: [PATCH 199/220] Committing color picker color changes tool to brush --- frontend/src/features/canvas/store/canvasSlice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index f5de2bf2d4..f71083ae17 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -689,6 +689,7 @@ export const canvasSlice = createSlice({ }, commitColorPickerColor: (state) => { state.brushColor = state.colorPickerColor; + state.tool = 'brush'; }, setMergedCanvas: (state, action: PayloadAction) => { state.pastLayerStates.push({ From db188cd3c378f84d2ea2d315ec39e817dd980ecd Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:40:04 +1100 Subject: [PATCH 200/220] Color picker does not overwrite user-selected alpha --- frontend/src/features/canvas/store/canvasSlice.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index f71083ae17..d7b1923d25 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -688,7 +688,10 @@ export const canvasSlice = createSlice({ state.colorPickerColor = action.payload; }, commitColorPickerColor: (state) => { - state.brushColor = state.colorPickerColor; + state.brushColor = { + ...state.colorPickerColor, + a: state.brushColor.a, + }; state.tool = 'brush'; }, setMergedCanvas: (state, action: PayloadAction) => { From 62ac725ba9386cee5bcd621423d3cc631b1ac127 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:51:35 +1100 Subject: [PATCH 201/220] Adds brush color alpha hotkey --- .../IAICanvasToolChooserOptions.tsx | 38 ++++++++++++++++++- .../components/HotkeysModal/HotkeysModal.tsx | 10 +++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx index f32fcf04d3..48a7a78d14 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolChooserOptions.tsx @@ -86,7 +86,7 @@ const IAICanvasToolChooserOptions = () => { ); useHotkeys( - ['['], + ['BracketLeft'], () => { dispatch(setBrushSize(Math.max(brushSize - 5, 5))); }, @@ -98,7 +98,7 @@ const IAICanvasToolChooserOptions = () => { ); useHotkeys( - [']'], + ['BracketRight'], () => { dispatch(setBrushSize(Math.min(brushSize + 5, 500))); }, @@ -109,6 +109,40 @@ const IAICanvasToolChooserOptions = () => { [brushSize] ); + useHotkeys( + ['shift+BracketLeft'], + () => { + dispatch( + setBrushColor({ + ...brushColor, + a: _.clamp(brushColor.a - 0.05, 0.05, 1), + }) + ); + }, + { + enabled: () => true, + preventDefault: true, + }, + [brushColor] + ); + + useHotkeys( + ['shift+BracketRight'], + () => { + dispatch( + setBrushColor({ + ...brushColor, + a: _.clamp(brushColor.a + 0.05, 0.05, 1), + }) + ); + }, + { + enabled: () => true, + preventDefault: true, + }, + [brushColor] + ); + const handleSelectBrushTool = () => dispatch(setTool('brush')); const handleSelectEraserTool = () => dispatch(setTool('eraser')); const handleSelectColorPickerTool = () => dispatch(setTool('colorPicker')); diff --git a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx index d500cc06ab..0bd7be796d 100644 --- a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -158,6 +158,16 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Increases the size of the canvas brush/eraser', hotkey: ']', }, + { + title: 'Decrease Brush Opacity', + desc: 'Decreases the opacity of the canvas brush', + hotkey: 'Shift + [', + }, + { + title: 'Increase Brush Opacity', + desc: 'Increases the opacity of the canvas brush', + hotkey: 'Shift + ]', + }, { title: 'Move Tool', desc: 'Allows canvas navigation', From 52c79fa097e7789d425cba68b5fe5ad8836d4d67 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 15:12:47 +1100 Subject: [PATCH 202/220] Lints --- .../components/IAICanvasToolPreview.tsx | 49 +------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx index 85c4978383..747501c3d0 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolPreview.tsx @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { GroupConfig } from 'konva/lib/Group'; import _ from 'lodash'; -import { Circle, Group, Rect } from 'react-konva'; +import { Circle, Group } from 'react-konva'; import { useAppSelector } from 'app/store'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { rgbaColorToString } from 'features/canvas/util/colorToString'; @@ -154,50 +154,3 @@ const IAICanvasToolPreview = (props: GroupConfig) => { }; export default IAICanvasToolPreview; -{ - /* <> - - - - */ -} From 7f1b95fbdad566ea3c70869816599e15bc883b4c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 15:20:28 +1100 Subject: [PATCH 203/220] Removes force_outpaint param --- .../src/common/util/parameterTranslation.ts | 3 +- .../Canvas/CompositionOptions.tsx | 34 ++++--------------- .../features/options/store/optionsSlice.ts | 6 ---- 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index e5d9ee7dad..c8145266bf 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -60,7 +60,6 @@ export const frontendToBackendParameters = ( seed, seedWeights, shouldFitToWidthHeight, - shouldForceOutpaint, shouldGenerateVariations, shouldRandomizeSeed, shouldRunESRGAN, @@ -190,8 +189,8 @@ export const frontendToBackendParameters = ( generationParameters.seam_strength = seamStrength; generationParameters.seam_steps = seamSteps; generationParameters.tile_size = tileSize; - generationParameters.force_outpaint = shouldForceOutpaint; generationParameters.infill_method = infillMethod; + generationParameters.force_outpaint = false; } if (shouldGenerateVariations) { diff --git a/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx index bfda099071..340f0bc177 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx @@ -1,22 +1,20 @@ -import { Box, Flex } from '@chakra-ui/react'; +import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAISelect from 'common/components/IAISelect'; import IAISlider from 'common/components/IAISlider'; -import IAISwitch from 'common/components/IAISwitch'; import { optionsSelector } from 'features/options/store/optionsSelectors'; import { - setSeamSize, - setSeamBlur, - setSeamStrength, - setSeamSteps, - setTileSize, - setShouldForceOutpaint, setInfillMethod, + setSeamBlur, + setSeamSize, + setSeamSteps, + setSeamStrength, + setTileSize, } from 'features/options/store/optionsSlice'; import { systemSelector } from 'features/system/store/systemSelectors'; -import InpaintReplace from './InpaintReplace'; import _ from 'lodash'; +import InpaintReplace from './InpaintReplace'; const selector = createSelector( [optionsSelector, systemSelector], @@ -27,7 +25,6 @@ const selector = createSelector( seamStrength, seamSteps, tileSize, - shouldForceOutpaint, infillMethod, } = options; @@ -39,7 +36,6 @@ const selector = createSelector( seamStrength, seamSteps, tileSize, - shouldForceOutpaint, infillMethod, availableInfillMethods, }; @@ -59,7 +55,6 @@ const CompositionOptions = () => { seamStrength, seamSteps, tileSize, - shouldForceOutpaint, infillMethod, availableInfillMethods, } = useAppSelector(selector); @@ -134,13 +129,6 @@ const CompositionOptions = () => { withSliderMarks withReset /> - { - dispatch(setShouldForceOutpaint(e.target.checked)); - }} - /> { }; export default CompositionOptions; - -export const OutpaintingHeader = () => { - return ( - - Outpainting Composition - - ); -}; diff --git a/frontend/src/features/options/store/optionsSlice.ts b/frontend/src/features/options/store/optionsSlice.ts index 719544ecc5..c0f813a480 100644 --- a/frontend/src/features/options/store/optionsSlice.ts +++ b/frontend/src/features/options/store/optionsSlice.ts @@ -37,7 +37,6 @@ export interface OptionsState { seed: number; seedWeights: string; shouldFitToWidthHeight: boolean; - shouldForceOutpaint: boolean; shouldGenerateVariations: boolean; shouldHoldOptionsPanelOpen: boolean; shouldLoopback: boolean; @@ -84,7 +83,6 @@ const initialOptionsState: OptionsState = { seed: 0, seedWeights: '', shouldFitToWidthHeight: true, - shouldForceOutpaint: false, shouldGenerateVariations: false, shouldHoldOptionsPanelOpen: false, shouldLoopback: false, @@ -395,9 +393,6 @@ export const optionsSlice = createSlice({ setTileSize: (state, action: PayloadAction) => { state.tileSize = action.payload; }, - setShouldForceOutpaint: (state, action: PayloadAction) => { - state.shouldForceOutpaint = action.payload; - }, setInfillMethod: (state, action: PayloadAction) => { state.infillMethod = action.payload; }, @@ -438,7 +433,6 @@ export const { setSeed, setSeedWeights, setShouldFitToWidthHeight, - setShouldForceOutpaint, setShouldGenerateVariations, setShouldHoldOptionsPanelOpen, setShouldLoopback, From 9fe9301762cf7714587bb9752f91536ec1428755 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 16:25:27 +1100 Subject: [PATCH 204/220] Add inpaint size options to inpaint at a larger size than the actual inpaint image, then scale back down for recombination --- ldm/invoke/generator/inpaint.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index 1443dedc09..2ff0ca248a 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -178,6 +178,8 @@ class Inpaint(Img2Img): step_callback=None, inpaint_replace=False, enable_image_debugging=False, infill_method = infill_methods[0], # The infill method to use + inpaint_width=None, + inpaint_height=None, **kwargs): """ Returns a function returning an image derived from the prompt and @@ -200,6 +202,11 @@ class Inpaint(Img2Img): tile_size = tile_size ) init_filled.paste(init_image, (0,0), init_image.split()[-1]) + + # Resize if requested for inpainting + if inpaint_width and inpaint_height: + init_filled = init_filled.resize((inpaint_width, inpaint_height)) + debug_image(init_filled, "init_filled", debug_status=self.enable_image_debugging) # Create init tensor @@ -210,6 +217,12 @@ class Inpaint(Img2Img): debug_image(mask_image, "mask_image BEFORE multiply with pil_image", debug_status=self.enable_image_debugging) mask_image = ImageChops.multiply(mask_image, self.pil_image.split()[-1].convert('RGB')) + self.pil_mask = mask_image + + # Resize if requested for inpainting + if inpaint_width and inpaint_height: + mask_image = mask_image.resize((inpaint_width, inpaint_height)) + debug_image(mask_image, "mask_image AFTER multiply with pil_image", debug_status=self.enable_image_debugging) mask_image = mask_image.resize( ( @@ -279,6 +292,10 @@ class Inpaint(Img2Img): result = self.sample_to_image(samples) + # Resize if necessary + if inpaint_width and inpaint_height: + result = result.resize(self.pil_image.size) + # Seam paint if this is our first pass (seam_size set to 0 during seam painting) if seam_size > 0: old_image = self.pil_image or init_image From b93336dbf98ab64c97bb1f0ec70920746d802952 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 16:25:51 +1100 Subject: [PATCH 205/220] Bug fix for inpaint size --- ldm/invoke/generator/inpaint.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index 2ff0ca248a..bf63223016 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -189,6 +189,9 @@ class Inpaint(Img2Img): self.enable_image_debugging = enable_image_debugging + self.inpaint_width = inpaint_width + self.inpaint_height = inpaint_height + if isinstance(init_image, PIL.Image.Image): self.pil_image = init_image.copy() @@ -292,10 +295,6 @@ class Inpaint(Img2Img): result = self.sample_to_image(samples) - # Resize if necessary - if inpaint_width and inpaint_height: - result = result.resize(self.pil_image.size) - # Seam paint if this is our first pass (seam_size set to 0 during seam painting) if seam_size > 0: old_image = self.pil_image or init_image @@ -335,6 +334,10 @@ class Inpaint(Img2Img): gen_result = super().sample_to_image(samples).convert('RGB') debug_image(gen_result, "gen_result", debug_status=self.enable_image_debugging) + # Resize if necessary + if self.inpaint_width and self.inpaint_height: + gen_result = gen_result.resize(self.pil_image.size) + if self.pil_image is None or self.pil_mask is None: return gen_result From 46a5fd67ed97a06c79ae77546500d55f447c7a59 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 16:28:53 +1100 Subject: [PATCH 206/220] Adds inpaint size (as scale bounding box) to UI --- .../src/common/util/parameterTranslation.ts | 8 +- .../src/features/canvas/store/canvasSlice.ts | 31 ++++-- .../src/features/canvas/store/canvasTypes.ts | 4 +- .../BoundingBoxSettings.tsx | 94 ++++++++++++++++++- .../Canvas/CompositionOptions.tsx | 39 ++++---- 5 files changed, 142 insertions(+), 34 deletions(-) diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index c8145266bf..db6ea02b4b 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -127,6 +127,8 @@ export const frontendToBackendParameters = ( stageScale, isMaskEnabled, shouldPreserveMaskedArea, + shouldScaleBoundingBox, + scaledBoundingBoxDimensions, } = canvasState; const boundingBox = { @@ -181,9 +183,13 @@ export const frontendToBackendParameters = ( generationParameters.init_img = imageDataURL; - // TODO: The server metadata generation needs to be changed to fix this. generationParameters.progress_images = false; + if (shouldScaleBoundingBox) { + generationParameters.inpaint_width = scaledBoundingBoxDimensions.width; + generationParameters.inpaint_height = scaledBoundingBoxDimensions.height; + } + generationParameters.seam_size = seamSize; generationParameters.seam_blur = seamBlur; generationParameters.seam_strength = seamStrength; diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index d7b1923d25..bb1db5d1b2 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -1,16 +1,18 @@ -import { createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; -import { IRect, Vector2d } from 'konva/lib/types'; -import { RgbaColor } from 'react-colorful'; +import { createSlice } from '@reduxjs/toolkit'; import * as InvokeAI from 'app/invokeai'; -import _ from 'lodash'; import { roundDownToMultiple, roundToMultiple, } from 'common/util/roundDownToMultiple'; -import calculateScale from '../util/calculateScale'; +import { IRect, Vector2d } from 'konva/lib/types'; +import _ from 'lodash'; +import { RgbaColor } from 'react-colorful'; import calculateCoordinates from '../util/calculateCoordinates'; +import calculateScale from '../util/calculateScale'; +import { STAGE_PADDING_PERCENTAGE } from '../util/constants'; import floorCoordinates from '../util/floorCoordinates'; +import roundDimensionsTo64 from '../util/roundDimensionsTo64'; import { CanvasImage, CanvasLayer, @@ -22,8 +24,6 @@ import { isCanvasBaseImage, isCanvasMaskLine, } from './canvasTypes'; -import roundDimensionsTo64 from '../util/roundDimensionsTo64'; -import { STAGE_PADDING_PERCENTAGE } from '../util/constants'; export const initialLayerState: CanvasLayerState = { objects: [], @@ -64,11 +64,13 @@ const initialCanvasState: CanvasState = { maxHistory: 128, minimumStageScale: 1, pastLayerStates: [], + scaledBoundingBoxDimensions: { width: 512, height: 512 }, shouldAutoSave: false, shouldCropToBoundingBoxOnSave: false, shouldDarkenOutsideBoundingBox: false, shouldLockBoundingBox: false, shouldPreserveMaskedArea: false, + shouldScaleBoundingBox: false, shouldShowBoundingBox: true, shouldShowBrush: true, shouldShowBrushPreview: false, @@ -669,6 +671,15 @@ export const canvasSlice = createSlice({ state.boundingBoxCoordinates = newBoundingBoxCoordinates; } }, + setShouldScaleBoundingBox: (state, action: PayloadAction) => { + state.shouldScaleBoundingBox = action.payload; + }, + setScaledBoundingBoxDimensions: ( + state, + action: PayloadAction + ) => { + state.scaledBoundingBoxDimensions = action.payload; + }, setShouldShowStagingImage: (state, action: PayloadAction) => { state.shouldShowStagingImage = action.payload; }, @@ -720,9 +731,9 @@ export const { addImageToStagingArea, addLine, addPointToCurrentLine, + clearCanvasHistory, clearMask, commitColorPickerColor, - setColorPickerColor, commitStagingAreaImage, discardStagedImages, fitBoundingBoxToStage, @@ -740,7 +751,7 @@ export const { setBrushColor, setBrushSize, setCanvasContainerDimensions, - clearCanvasHistory, + setColorPickerColor, setCursorPosition, setDoesCanvasNeedScaling, setInitialCanvasImage, @@ -761,6 +772,7 @@ export const { setShouldDarkenOutsideBoundingBox, setShouldLockBoundingBox, setShouldPreserveMaskedArea, + setShouldScaleBoundingBox, setShouldShowBoundingBox, setShouldShowBrush, setShouldShowBrushPreview, @@ -779,6 +791,7 @@ export const { toggleShouldLockBoundingBox, toggleTool, undo, + setScaledBoundingBoxDimensions, } = canvasSlice.actions; export default canvasSlice.reducer; diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index fae2d6f6a8..2817faf0c8 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -81,7 +81,7 @@ export interface CanvasState { brushColor: RgbaColor; brushSize: number; canvasContainerDimensions: Dimensions; - colorPickerColor: RgbaColor, + colorPickerColor: RgbaColor; cursorPosition: Vector2d | null; doesCanvasNeedScaling: boolean; futureLayerStates: CanvasLayerState[]; @@ -102,11 +102,13 @@ export interface CanvasState { maxHistory: number; minimumStageScale: number; pastLayerStates: CanvasLayerState[]; + scaledBoundingBoxDimensions: Dimensions; shouldAutoSave: boolean; shouldCropToBoundingBoxOnSave: boolean; shouldDarkenOutsideBoundingBox: boolean; shouldLockBoundingBox: boolean; shouldPreserveMaskedArea: boolean; + shouldScaleBoundingBox: boolean; shouldShowBoundingBox: boolean; shouldShowBrush: boolean; shouldShowBrushPreview: boolean; diff --git a/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx index b43b7c1223..797c3c76c7 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx @@ -2,16 +2,27 @@ import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAISlider from 'common/components/IAISlider'; +import IAISwitch from 'common/components/IAISwitch'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice'; +import { + setBoundingBoxDimensions, + setScaledBoundingBoxDimensions, + setShouldScaleBoundingBox, +} from 'features/canvas/store/canvasSlice'; import _ from 'lodash'; const selector = createSelector( canvasSelector, (canvas) => { - const { boundingBoxDimensions } = canvas; + const { + boundingBoxDimensions, + shouldScaleBoundingBox, + scaledBoundingBoxDimensions, + } = canvas; return { boundingBoxDimensions, + shouldScaleBoundingBox, + scaledBoundingBoxDimensions, }; }, { @@ -23,7 +34,11 @@ const selector = createSelector( const BoundingBoxSettings = () => { const dispatch = useAppDispatch(); - const { boundingBoxDimensions } = useAppSelector(selector); + const { + boundingBoxDimensions, + shouldScaleBoundingBox, + scaledBoundingBoxDimensions, + } = useAppSelector(selector); const handleChangeWidth = (v: number) => { dispatch( @@ -61,6 +76,42 @@ const BoundingBoxSettings = () => { ); }; + const handleChangeScaledWidth = (v: number) => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + width: Math.floor(v), + }) + ); + }; + + const handleChangeScaledHeight = (v: number) => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + height: Math.floor(v), + }) + ); + }; + + const handleResetScaledWidth = () => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + width: Math.floor(512), + }) + ); + }; + + const handleResetScaledHeight = () => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + height: Math.floor(512), + }) + ); + }; + return ( { withInput withReset /> + dispatch(setShouldScaleBoundingBox(e.target.checked))} + /> + + ); }; diff --git a/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx index 340f0bc177..938c93c7a1 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx @@ -135,26 +135,25 @@ const CompositionOptions = () => { validValues={availableInfillMethods} onChange={(e) => dispatch(setInfillMethod(e.target.value))} /> - { - dispatch(setTileSize(v)); - }} - handleReset={() => { - dispatch(setTileSize(32)); - }} - withInput - withSliderMarks - withReset - /> + {infillMethod === 'tile' && ( + { + dispatch(setTileSize(v)); + }} + handleReset={() => { + dispatch(setTileSize(32)); + }} + withInput + withSliderMarks + withReset + /> + )} ); }; From d4280bbaaa539fa75dc52dbc9cb6c5fb314df792 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:19:28 +1100 Subject: [PATCH 207/220] Adds auto-scaling for inpaint size --- frontend/src/app/features.ts | 16 +- frontend/src/common/components/IAISelect.scss | 1 + .../src/common/util/parameterTranslation.ts | 4 +- .../canvas/components/IAICanvasStatusText.tsx | 16 ++ .../IAICanvasSettingsButtonPopover.tsx | 19 +- .../src/features/canvas/store/canvasSlice.ts | 50 ++++- .../src/features/canvas/store/canvasTypes.ts | 12 +- .../BoundingBoxSettings.tsx | 95 +-------- .../Canvas/InfillAndScalingOptions.tsx | 182 ++++++++++++++++++ ...nOptions.tsx => SeamCorrectionOptions.tsx} | 65 +------ .../components/HotkeysModal/HotkeysModal.tsx | 9 +- .../UnifiedCanvas/UnifiedCanvasPanel.tsx | 18 +- 12 files changed, 316 insertions(+), 171 deletions(-) create mode 100644 frontend/src/features/options/components/AdvancedOptions/Canvas/InfillAndScalingOptions.tsx rename frontend/src/features/options/components/AdvancedOptions/Canvas/{CompositionOptions.tsx => SeamCorrectionOptions.tsx} (61%) diff --git a/frontend/src/app/features.ts b/frontend/src/app/features.ts index f09effea09..0480e443fe 100644 --- a/frontend/src/app/features.ts +++ b/frontend/src/app/features.ts @@ -14,7 +14,8 @@ export enum Feature { FACE_CORRECTION, IMAGE_TO_IMAGE, BOUNDING_BOX, - CANVAS_COMPOSITION, + SEAM_CORRECTION, + INFILL_AND_SCALING, } /** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip. * @@ -57,17 +58,22 @@ export const FEATURES: Record = { guideImage: 'asset/path.gif', }, [Feature.IMAGE_TO_IMAGE]: { - text: 'ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ', + text: 'Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, [Feature.BOUNDING_BOX]: { - text: 'The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.', + text: 'The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, - [Feature.CANVAS_COMPOSITION]: { - text: 'Control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.', + [Feature.SEAM_CORRECTION]: { + text: 'Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.', + href: 'link/to/docs/feature3.html', + guideImage: 'asset/path.gif', + }, + [Feature.INFILL_AND_SCALING]: { + text: 'Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, diff --git a/frontend/src/common/components/IAISelect.scss b/frontend/src/common/components/IAISelect.scss index d4db363062..51baa3bbaa 100644 --- a/frontend/src/common/components/IAISelect.scss +++ b/frontend/src/common/components/IAISelect.scss @@ -14,6 +14,7 @@ border: 2px solid var(--border-color); background-color: var(--background-color-secondary); font-weight: bold; + font-size: 0.9rem; height: 2rem; border-radius: 0.2rem; diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index db6ea02b4b..ec4b2f9ef8 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -127,7 +127,7 @@ export const frontendToBackendParameters = ( stageScale, isMaskEnabled, shouldPreserveMaskedArea, - shouldScaleBoundingBox, + boundingBoxScaleMethod: boundingBoxScale, scaledBoundingBoxDimensions, } = canvasState; @@ -185,7 +185,7 @@ export const frontendToBackendParameters = ( generationParameters.progress_images = false; - if (shouldScaleBoundingBox) { + if (boundingBoxScale !== 'none') { generationParameters.inpaint_width = scaledBoundingBoxDimensions.width; generationParameters.inpaint_height = scaledBoundingBoxDimensions.height; } diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index 3128a1280a..099c322313 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -12,10 +12,15 @@ const selector = createSelector( stageDimensions: { width: stageWidth, height: stageHeight }, stageCoordinates: { x: stageX, y: stageY }, boundingBoxDimensions: { width: boxWidth, height: boxHeight }, + scaledBoundingBoxDimensions: { + width: scaledBoxWidth, + height: scaledBoxHeight, + }, boundingBoxCoordinates: { x: boxX, y: boxY }, stageScale, shouldShowCanvasDebugInfo, layer, + boundingBoxScaleMethod, } = canvas; return { @@ -30,12 +35,14 @@ const selector = createSelector( boxX )}, ${roundToHundreth(boxY)})`, boundingBoxDimensionsString: `${boxWidth}×${boxHeight}`, + scaledBoundingBoxDimensionsString: `${scaledBoxWidth}×${scaledBoxHeight}`, canvasCoordinatesString: `${roundToHundreth(stageX)}×${roundToHundreth( stageY )}`, canvasDimensionsString: `${stageWidth}×${stageHeight}`, canvasScaleString: Math.round(stageScale * 100), shouldShowCanvasDebugInfo, + shouldShowScaledBoundingBox: boundingBoxScaleMethod !== 'none', }; }, { @@ -52,6 +59,8 @@ const IAICanvasStatusText = () => { boundingBoxColor, boundingBoxCoordinatesString, boundingBoxDimensionsString, + scaledBoundingBoxDimensionsString, + shouldShowScaledBoundingBox, canvasCoordinatesString, canvasDimensionsString, canvasScaleString, @@ -71,6 +80,13 @@ const IAICanvasStatusText = () => { color: boundingBoxColor, }} >{`Bounding Box: ${boundingBoxDimensionsString}`}
+ {shouldShowScaledBoundingBox && ( +
{`Scaled Bounding Box: ${scaledBoundingBoxDimensionsString}`}
+ )} {shouldShowCanvasDebugInfo && ( <>
{`Bounding Box Position: ${boundingBoxCoordinatesString}`}
diff --git a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index d88071ebfc..65672ee693 100644 --- a/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/frontend/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -18,6 +18,8 @@ import IAICheckbox from 'common/components/IAICheckbox'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal'; import ClearCanvasHistoryButtonModal from '../ClearCanvasHistoryButtonModal'; +import { ChangeEvent } from 'react'; +import { useHotkeys } from 'react-hotkeys-hook'; export const canvasControlsSelector = createSelector( [canvasSelector], @@ -61,6 +63,21 @@ const IAICanvasSettingsButtonPopover = () => { shouldSnapToGrid, } = useAppSelector(canvasControlsSelector); + useHotkeys( + ['n'], + () => { + dispatch(setShouldSnapToGrid(!shouldSnapToGrid)); + }, + { + enabled: true, + preventDefault: true, + }, + [shouldSnapToGrid] + ); + + const handleChangeShouldSnapToGrid = (e: ChangeEvent) => + dispatch(setShouldSnapToGrid(e.target.checked)); + return ( { dispatch(setShouldSnapToGrid(e.target.checked))} + onChange={handleChangeShouldSnapToGrid} /> ) => { - state.boundingBoxDimensions = roundDimensionsTo64(action.payload); + const newDimensions = roundDimensionsTo64(action.payload); + state.boundingBoxDimensions = newDimensions; + + if (state.boundingBoxScaleMethod === 'auto') { + const { width, height } = newDimensions; + const newScaledDimensions = { width, height }; + const targetArea = 512 * 512; + const aspectRatio = width / height; + let currentArea = width * height; + let maxDimension = 448; + while (currentArea < targetArea) { + maxDimension += 64; + if (width === height) { + newScaledDimensions.width = 512; + newScaledDimensions.height = 512; + break; + } else { + if (aspectRatio > 1) { + newScaledDimensions.width = maxDimension; + newScaledDimensions.height = roundToMultiple( + maxDimension / aspectRatio, + 64 + ); + } else if (aspectRatio < 1) { + newScaledDimensions.height = maxDimension; + newScaledDimensions.width = roundToMultiple( + maxDimension * aspectRatio, + 64 + ); + } + currentArea = + newScaledDimensions.width * newScaledDimensions.height; + } + } + + state.scaledBoundingBoxDimensions = newScaledDimensions; + } }, setBoundingBoxCoordinates: (state, action: PayloadAction) => { state.boundingBoxCoordinates = floorCoordinates(action.payload); @@ -671,8 +708,11 @@ export const canvasSlice = createSlice({ state.boundingBoxCoordinates = newBoundingBoxCoordinates; } }, - setShouldScaleBoundingBox: (state, action: PayloadAction) => { - state.shouldScaleBoundingBox = action.payload; + setBoundingBoxScaleMethod: ( + state, + action: PayloadAction + ) => { + state.boundingBoxScaleMethod = action.payload; }, setScaledBoundingBoxDimensions: ( state, @@ -748,6 +788,7 @@ export const { setBoundingBoxCoordinates, setBoundingBoxDimensions, setBoundingBoxPreviewFill, + setBoundingBoxScaleMethod, setBrushColor, setBrushSize, setCanvasContainerDimensions, @@ -772,7 +813,6 @@ export const { setShouldDarkenOutsideBoundingBox, setShouldLockBoundingBox, setShouldPreserveMaskedArea, - setShouldScaleBoundingBox, setShouldShowBoundingBox, setShouldShowBrush, setShouldShowBrushPreview, diff --git a/frontend/src/features/canvas/store/canvasTypes.ts b/frontend/src/features/canvas/store/canvasTypes.ts index 2817faf0c8..8686e50ff3 100644 --- a/frontend/src/features/canvas/store/canvasTypes.ts +++ b/frontend/src/features/canvas/store/canvasTypes.ts @@ -11,6 +11,16 @@ export const LAYER_NAMES = ['base', 'mask'] as const; export type CanvasLayer = typeof LAYER_NAMES[number]; +export const BOUNDING_BOX_SCALES_DICT = [ + { key: 'Auto', value: 'auto' }, + { key: 'Manual', value: 'manual' }, + { key: 'None', value: 'none' }, +]; + +export const BOUNDING_BOX_SCALES = ['none', 'auto', 'manual'] as const; + +export type BoundingBoxScale = typeof BOUNDING_BOX_SCALES[number]; + export type CanvasDrawingTool = 'brush' | 'eraser'; export type CanvasTool = CanvasDrawingTool | 'move' | 'colorPicker'; @@ -78,6 +88,7 @@ export interface CanvasState { boundingBoxCoordinates: Vector2d; boundingBoxDimensions: Dimensions; boundingBoxPreviewFill: RgbaColor; + boundingBoxScaleMethod: BoundingBoxScale; brushColor: RgbaColor; brushSize: number; canvasContainerDimensions: Dimensions; @@ -108,7 +119,6 @@ export interface CanvasState { shouldDarkenOutsideBoundingBox: boolean; shouldLockBoundingBox: boolean; shouldPreserveMaskedArea: boolean; - shouldScaleBoundingBox: boolean; shouldShowBoundingBox: boolean; shouldShowBrush: boolean; shouldShowBrushPreview: boolean; diff --git a/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx index 797c3c76c7..6d35a496f8 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings.tsx @@ -2,27 +2,17 @@ import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; import IAISlider from 'common/components/IAISlider'; -import IAISwitch from 'common/components/IAISwitch'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; -import { - setBoundingBoxDimensions, - setScaledBoundingBoxDimensions, - setShouldScaleBoundingBox, -} from 'features/canvas/store/canvasSlice'; +import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice'; import _ from 'lodash'; const selector = createSelector( canvasSelector, (canvas) => { - const { - boundingBoxDimensions, - shouldScaleBoundingBox, - scaledBoundingBoxDimensions, - } = canvas; + const { boundingBoxDimensions, boundingBoxScaleMethod: boundingBoxScale } = canvas; return { boundingBoxDimensions, - shouldScaleBoundingBox, - scaledBoundingBoxDimensions, + boundingBoxScale, }; }, { @@ -34,11 +24,7 @@ const selector = createSelector( const BoundingBoxSettings = () => { const dispatch = useAppDispatch(); - const { - boundingBoxDimensions, - shouldScaleBoundingBox, - scaledBoundingBoxDimensions, - } = useAppSelector(selector); + const { boundingBoxDimensions } = useAppSelector(selector); const handleChangeWidth = (v: number) => { dispatch( @@ -76,42 +62,6 @@ const BoundingBoxSettings = () => { ); }; - const handleChangeScaledWidth = (v: number) => { - dispatch( - setScaledBoundingBoxDimensions({ - ...scaledBoundingBoxDimensions, - width: Math.floor(v), - }) - ); - }; - - const handleChangeScaledHeight = (v: number) => { - dispatch( - setScaledBoundingBoxDimensions({ - ...scaledBoundingBoxDimensions, - height: Math.floor(v), - }) - ); - }; - - const handleResetScaledWidth = () => { - dispatch( - setScaledBoundingBoxDimensions({ - ...scaledBoundingBoxDimensions, - width: Math.floor(512), - }) - ); - }; - - const handleResetScaledHeight = () => { - dispatch( - setScaledBoundingBoxDimensions({ - ...scaledBoundingBoxDimensions, - height: Math.floor(512), - }) - ); - }; - return ( { withInput withReset /> - dispatch(setShouldScaleBoundingBox(e.target.checked))} - /> - - ); }; diff --git a/frontend/src/features/options/components/AdvancedOptions/Canvas/InfillAndScalingOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/InfillAndScalingOptions.tsx new file mode 100644 index 0000000000..705eb32e9f --- /dev/null +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/InfillAndScalingOptions.tsx @@ -0,0 +1,182 @@ +import { Flex } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/store'; +import IAISelect from 'common/components/IAISelect'; +import IAISlider from 'common/components/IAISlider'; +import { canvasSelector } from 'features/canvas/store/canvasSelectors'; +import { + setBoundingBoxDimensions, + setBoundingBoxScaleMethod, + setScaledBoundingBoxDimensions, +} from 'features/canvas/store/canvasSlice'; +import { + BoundingBoxScale, + BOUNDING_BOX_SCALES_DICT, +} from 'features/canvas/store/canvasTypes'; +import { optionsSelector } from 'features/options/store/optionsSelectors'; +import { + setInfillMethod, + setTileSize, +} from 'features/options/store/optionsSlice'; +import { systemSelector } from 'features/system/store/systemSelectors'; +import _ from 'lodash'; +import { ChangeEvent } from 'react'; +import InpaintReplace from './InpaintReplace'; + +const selector = createSelector( + [optionsSelector, systemSelector, canvasSelector], + (options, system, canvas) => { + const { tileSize, infillMethod } = options; + + const { infill_methods: availableInfillMethods } = system; + + const { + boundingBoxDimensions, + boundingBoxScaleMethod: boundingBoxScale, + scaledBoundingBoxDimensions, + } = canvas; + + return { + boundingBoxDimensions, + boundingBoxScale, + scaledBoundingBoxDimensions, + tileSize, + infillMethod, + availableInfillMethods, + isManual: boundingBoxScale === 'manual', + }; + }, + { + memoizeOptions: { + resultEqualityCheck: _.isEqual, + }, + } +); + +const InfillAndScalingOptions = () => { + const dispatch = useAppDispatch(); + const { + tileSize, + infillMethod, + boundingBoxDimensions, + availableInfillMethods, + boundingBoxScale, + isManual, + scaledBoundingBoxDimensions, + } = useAppSelector(selector); + + const handleChangeScaledWidth = (v: number) => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + width: Math.floor(v), + }) + ); + }; + + const handleChangeScaledHeight = (v: number) => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + height: Math.floor(v), + }) + ); + }; + + const handleResetScaledWidth = () => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + width: Math.floor(512), + }) + ); + }; + + const handleResetScaledHeight = () => { + dispatch( + setScaledBoundingBoxDimensions({ + ...scaledBoundingBoxDimensions, + height: Math.floor(512), + }) + ); + }; + + const handleChangeBoundingBoxScaleMethod = ( + e: ChangeEvent + ) => { + dispatch(setBoundingBoxScaleMethod(e.target.value as BoundingBoxScale)); + dispatch(setBoundingBoxDimensions(boundingBoxDimensions)); + }; + + return ( + + + + + + dispatch(setInfillMethod(e.target.value))} + /> + { + dispatch(setTileSize(v)); + }} + handleReset={() => { + dispatch(setTileSize(32)); + }} + withInput + withSliderMarks + withReset + /> + + ); +}; + +export default InfillAndScalingOptions; diff --git a/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx b/frontend/src/features/options/components/AdvancedOptions/Canvas/SeamCorrectionOptions.tsx similarity index 61% rename from frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx rename to frontend/src/features/options/components/AdvancedOptions/Canvas/SeamCorrectionOptions.tsx index 938c93c7a1..561b9c78ea 100644 --- a/frontend/src/features/options/components/AdvancedOptions/Canvas/CompositionOptions.tsx +++ b/frontend/src/features/options/components/AdvancedOptions/Canvas/SeamCorrectionOptions.tsx @@ -1,43 +1,26 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/store'; -import IAISelect from 'common/components/IAISelect'; import IAISlider from 'common/components/IAISlider'; import { optionsSelector } from 'features/options/store/optionsSelectors'; import { - setInfillMethod, setSeamBlur, setSeamSize, setSeamSteps, setSeamStrength, - setTileSize, } from 'features/options/store/optionsSlice'; -import { systemSelector } from 'features/system/store/systemSelectors'; import _ from 'lodash'; -import InpaintReplace from './InpaintReplace'; const selector = createSelector( - [optionsSelector, systemSelector], - (options, system) => { - const { - seamSize, - seamBlur, - seamStrength, - seamSteps, - tileSize, - infillMethod, - } = options; - - const { infill_methods: availableInfillMethods } = system; + [optionsSelector], + (options) => { + const { seamSize, seamBlur, seamStrength, seamSteps } = options; return { seamSize, seamBlur, seamStrength, seamSteps, - tileSize, - infillMethod, - availableInfillMethods, }; }, { @@ -47,22 +30,13 @@ const selector = createSelector( } ); -const CompositionOptions = () => { +const SeamCorrectionOptions = () => { const dispatch = useAppDispatch(); - const { - seamSize, - seamBlur, - seamStrength, - seamSteps, - tileSize, - infillMethod, - availableInfillMethods, - } = useAppSelector(selector); + const { seamSize, seamBlur, seamStrength, seamSteps } = + useAppSelector(selector); return ( - - { withSliderMarks withReset /> - dispatch(setInfillMethod(e.target.value))} - /> - {infillMethod === 'tile' && ( - { - dispatch(setTileSize(v)); - }} - handleReset={() => { - dispatch(setTileSize(32)); - }} - withInput - withSliderMarks - withReset - /> - )} ); }; -export default CompositionOptions; +export default SeamCorrectionOptions; diff --git a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx index 0bd7be796d..be0e5ec2b7 100644 --- a/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/frontend/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -178,14 +178,19 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { desc: 'Selects the canvas color picker', hotkey: 'C', }, + { + title: 'Toggle Snap', + desc: 'Toggles Snap to Grid', + hotkey: 'N', + }, { title: 'Quick Toggle Move', desc: 'Temporarily toggles Move mode', hotkey: 'Hold Space', }, { - title: 'Select Mask Layer', - desc: 'Toggles mask layer', + title: 'Toggle Layer', + desc: 'Toggles mask/base layer selection', hotkey: 'Q', }, { diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx index 52afd2e187..e600f33509 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -1,8 +1,7 @@ // import { Feature } from 'app/features'; import { Feature } from 'app/features'; import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength'; -import BoundingBoxSettings from 'features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings'; -import CompositionOptions from 'features/options/components/AdvancedOptions/Canvas/CompositionOptions'; +import SeamCorrectionOptions from 'features/options/components/AdvancedOptions/Canvas/SeamCorrectionOptions'; import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions'; import GenerateVariationsToggle from 'features/options/components/AdvancedOptions/Variations/GenerateVariations'; import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions'; @@ -11,6 +10,8 @@ import OptionsAccordion from 'features/options/components/OptionsAccordion'; import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons'; import PromptInput from 'features/options/components/PromptInput/PromptInput'; import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel'; +import BoundingBoxSettings from 'features/options/components/AdvancedOptions/Canvas/BoundingBoxSettings/BoundingBoxSettings'; +import InfillAndScalingOptions from 'features/options/components/AdvancedOptions/Canvas/InfillAndScalingOptions'; export default function UnifiedCanvasPanel() { const unifiedCanvasAccordions = { @@ -19,10 +20,15 @@ export default function UnifiedCanvasPanel() { feature: Feature.BOUNDING_BOX, content: , }, - composition: { - header: 'Composition', - feature: Feature.CANVAS_COMPOSITION, - content: , + seamCorrection: { + header: 'Seam Correction', + feature: Feature.SEAM_CORRECTION, + content: , + }, + infillAndScaling: { + header: 'Infill and Scaling', + feature: Feature.INFILL_AND_SCALING, + content: , }, seed: { header: 'Seed', From 9568ac66e0aca8124ad7f6c959d9532b2ac035c0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:37:04 +1100 Subject: [PATCH 208/220] Improves scaled bbox display logic --- .../canvas/components/IAICanvasStatusText.tsx | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx index 099c322313..2263ea3d57 100644 --- a/frontend/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/frontend/src/features/canvas/components/IAICanvasStatusText.tsx @@ -23,14 +23,24 @@ const selector = createSelector( boundingBoxScaleMethod, } = canvas; + let boundingBoxColor = 'inherit'; + + if ( + (boundingBoxScaleMethod === 'none' && + (boxWidth < 512 || boxHeight < 512)) || + (boundingBoxScaleMethod === 'manual' && + scaledBoxWidth * scaledBoxHeight < 512 * 512) + ) { + boundingBoxColor = 'var(--status-working-color)'; + } + + const activeLayerColor = + layer === 'mask' ? 'var(--status-working-color)' : 'inherit'; + return { - activeLayerColor: - layer === 'mask' ? 'var(--status-working-color)' : 'inherit', + activeLayerColor, activeLayerString: layer.charAt(0).toUpperCase() + layer.slice(1), - boundingBoxColor: - boxWidth < 512 || boxHeight < 512 - ? 'var(--status-working-color)' - : 'inherit', + boundingBoxColor, boundingBoxCoordinatesString: `(${roundToHundreth( boxX )}, ${roundToHundreth(boxY)})`, @@ -42,6 +52,7 @@ const selector = createSelector( canvasDimensionsString: `${stageWidth}×${stageHeight}`, canvasScaleString: Math.round(stageScale * 100), shouldShowCanvasDebugInfo, + shouldShowBoundingBox: boundingBoxScaleMethod !== 'auto', shouldShowScaledBoundingBox: boundingBoxScaleMethod !== 'none', }; }, @@ -65,6 +76,7 @@ const IAICanvasStatusText = () => { canvasDimensionsString, canvasScaleString, shouldShowCanvasDebugInfo, + shouldShowBoundingBox, } = useAppSelector(selector); return ( @@ -75,11 +87,13 @@ const IAICanvasStatusText = () => { }} >{`Active Layer: ${activeLayerString}`}
{`Canvas Scale: ${canvasScaleString}%`}
-
{`Bounding Box: ${boundingBoxDimensionsString}`}
+ {shouldShowBoundingBox && ( +
{`Bounding Box: ${boundingBoxDimensionsString}`}
+ )} {shouldShowScaledBoundingBox && (
Date: Thu, 24 Nov 2022 19:37:12 +1100 Subject: [PATCH 209/220] Fixes bug with clear mask and history --- frontend/src/features/canvas/store/canvasSlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index 210f88ad5a..b2393f730f 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -122,7 +122,7 @@ export const canvasSlice = createSlice({ state.brushSize = action.payload; }, clearMask: (state) => { - state.pastLayerStates.push(state.layerState); + state.pastLayerStates.push({ ...state.layerState }); state.layerState.objects = state.layerState.objects.filter( (obj) => !isCanvasMaskLine(obj) ); From 404d81f6fd1a8a7282b605e7d3cffa04b1760822 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:49:39 +1100 Subject: [PATCH 210/220] Fixes shouldShowStagingImage not resetting to true on commit --- frontend/src/features/canvas/store/canvasSlice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index b2393f730f..c2470afa99 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -669,6 +669,7 @@ export const canvasSlice = createSlice({ state.futureLayerStates = []; state.shouldShowStagingOutline = true; + state.shouldShowStagingImage = true; }, fitBoundingBoxToStage: (state) => { const { From f5e8ffe7b41b1f22ffd57c935f0a64c0eabb03d1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 24 Nov 2022 20:16:58 +1100 Subject: [PATCH 211/220] Builds fresh bundle --- frontend/dist/assets/index.5139e98d.js | 623 ------------------ frontend/dist/assets/index.97297ef9.js | 623 ++++++++++++++++++ ...{index.499bc932.css => index.f999e69e.css} | 2 +- frontend/dist/index.html | 4 +- 4 files changed, 626 insertions(+), 626 deletions(-) delete mode 100644 frontend/dist/assets/index.5139e98d.js create mode 100644 frontend/dist/assets/index.97297ef9.js rename frontend/dist/assets/{index.499bc932.css => index.f999e69e.css} (89%) diff --git a/frontend/dist/assets/index.5139e98d.js b/frontend/dist/assets/index.5139e98d.js deleted file mode 100644 index 7319c5a796..0000000000 --- a/frontend/dist/assets/index.5139e98d.js +++ /dev/null @@ -1,623 +0,0 @@ -function Yq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function K7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Uv=Symbol.for("react.element"),qq=Symbol.for("react.portal"),Kq=Symbol.for("react.fragment"),Xq=Symbol.for("react.strict_mode"),Zq=Symbol.for("react.profiler"),Qq=Symbol.for("react.provider"),Jq=Symbol.for("react.context"),eK=Symbol.for("react.forward_ref"),tK=Symbol.for("react.suspense"),nK=Symbol.for("react.memo"),rK=Symbol.for("react.lazy"),EE=Symbol.iterator;function iK(e){return e===null||typeof e!="object"?null:(e=EE&&e[EE]||e["@@iterator"],typeof e=="function"?e:null)}var KI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},XI=Object.assign,ZI={};function o1(e,t,n){this.props=e,this.context=t,this.refs=ZI,this.updater=n||KI}o1.prototype.isReactComponent={};o1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};o1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QI(){}QI.prototype=o1.prototype;function X7(e,t,n){this.props=e,this.context=t,this.refs=ZI,this.updater=n||KI}var Z7=X7.prototype=new QI;Z7.constructor=X7;XI(Z7,o1.prototype);Z7.isPureReactComponent=!0;var PE=Array.isArray,JI=Object.prototype.hasOwnProperty,Q7={current:null},eO={key:!0,ref:!0,__self:!0,__source:!0};function tO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)JI.call(t,r)&&!eO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Me=G[me];if(0>>1;mei(Ie,ce))Wei(De,Ie)?(G[me]=De,G[We]=ce,me=We):(G[me]=Ie,G[be]=ce,me=be);else if(Wei(De,ce))G[me]=De,G[We]=ce,me=We;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!b)if(n(l)!==null)b=!0,ee(O);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function O(G,X){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Me=me(g.expirationTime<=X);X=e.unstable_now(),typeof Me=="function"?g.callback=Me:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var be=n(u);be!==null&&K(M,be.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var R=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Me,t(l,G),b||v||(b=!0,ee(O))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(nO);(function(e){e.exports=nO})(u0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var rO=C.exports,da=u0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),e6=Object.prototype.hasOwnProperty,uK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,LE={},AE={};function cK(e){return e6.call(AE,e)?!0:e6.call(LE,e)?!1:uK.test(e)?AE[e]=!0:(LE[e]=!0,!1)}function dK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function fK(e,t,n,r){if(t===null||typeof t>"u"||dK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var e9=/[\-:]([a-z])/g;function t9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(e9,t9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(e9,t9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(e9,t9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function n9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{tx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?im(e):""}function hK(e){switch(e.tag){case 5:return im(e.type);case 16:return im("Lazy");case 13:return im("Suspense");case 19:return im("SuspenseList");case 0:case 2:case 15:return e=nx(e.type,!1),e;case 11:return e=nx(e.type.render,!1),e;case 1:return e=nx(e.type,!0),e;default:return""}}function i6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case t6:return"Profiler";case r9:return"StrictMode";case n6:return"Suspense";case r6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aO:return(e.displayName||"Context")+".Consumer";case oO:return(e._context.displayName||"Context")+".Provider";case i9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case o9:return t=e.displayName||null,t!==null?t:i6(e.type)||"Memo";case Oc:t=e._payload,e=e._init;try{return i6(e(t))}catch{}}return null}function pK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return i6(t);case 8:return t===r9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ld(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gK(e){var t=lO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cy(e){e._valueTracker||(e._valueTracker=gK(e))}function uO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function d5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function o6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function IE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ld(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cO(e,t){t=t.checked,t!=null&&n9(e,"checked",t,!1)}function a6(e,t){cO(e,t);var n=ld(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?s6(e,t.type,n):t.hasOwnProperty("defaultValue")&&s6(e,t.type,ld(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function OE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function s6(e,t,n){(t!=="number"||d5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var om=Array.isArray;function c0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=dy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ev(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mK=["Webkit","ms","Moz","O"];Object.keys(Cm).forEach(function(e){mK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cm[t]=Cm[e]})});function pO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cm.hasOwnProperty(e)&&Cm[e]?(""+t).trim():t+"px"}function gO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=pO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function c6(e,t){if(t){if(vK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function d6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var f6=null;function a9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var h6=null,d0=null,f0=null;function DE(e){if(e=Yv(e)){if(typeof h6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=I4(t),h6(e.stateNode,e.type,t))}}function mO(e){d0?f0?f0.push(e):f0=[e]:d0=e}function vO(){if(d0){var e=d0,t=f0;if(f0=d0=null,DE(e),t)for(e=0;e>>=0,e===0?32:31-(TK(e)/LK|0)|0}var fy=64,hy=4194304;function am(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function g5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=am(s):(o&=a,o!==0&&(r=am(o)))}else a=n&~i,a!==0?r=am(a):o!==0&&(r=am(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Gv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cs(t),e[t]=n}function OK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=km),GE=String.fromCharCode(32),jE=!1;function zO(e,t){switch(e){case"keyup":return sX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function uX(e,t){switch(e){case"compositionend":return BO(t);case"keypress":return t.which!==32?null:(jE=!0,GE);case"textInput":return e=t.data,e===GE&&jE?null:e;default:return null}}function cX(e,t){if(Gp)return e==="compositionend"||!p9&&zO(e,t)?(e=NO(),k3=d9=Hc=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=XE(n)}}function WO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function VO(){for(var e=window,t=d5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=d5(e.document)}return t}function g9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bX(e){var t=VO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&WO(n.ownerDocument.documentElement,n)){if(r!==null&&g9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ZE(n,o);var a=ZE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,b6=null,Pm=null,S6=!1;function QE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;S6||jp==null||jp!==d5(r)||(r=jp,"selectionStart"in r&&g9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pm&&av(Pm,r)||(Pm=r,r=y5(b6,"onSelect"),0Kp||(e.current=E6[Kp],E6[Kp]=null,Kp--)}function qn(e,t){Kp++,E6[Kp]=e.current,e.current=t}var ud={},Wi=yd(ud),Ao=yd(!1),nh=ud;function B0(e,t){var n=e.type.contextTypes;if(!n)return ud;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function S5(){Qn(Ao),Qn(Wi)}function oP(e,t,n){if(Wi.current!==ud)throw Error(Re(168));qn(Wi,t),qn(Ao,n)}function QO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,pK(e)||"Unknown",i));return hr({},n,r)}function x5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ud,nh=Wi.current,qn(Wi,e),qn(Ao,Ao.current),!0}function aP(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=QO(e,t,nh),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Wi),qn(Wi,e)):Qn(Ao),qn(Ao,n)}var fu=null,O4=!1,mx=!1;function JO(e){fu===null?fu=[e]:fu.push(e)}function MX(e){O4=!0,JO(e)}function bd(){if(!mx&&fu!==null){mx=!0;var e=0,t=Tn;try{var n=fu;for(Tn=1;e>=a,i-=a,pu=1<<32-Cs(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),R===null?O=$:R.sibling=$,R=$,N=V}if(z===T.length)return n(P,N),ir&&_f(P,z),O;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),R===null?O=j:R.sibling=j,R=j,N=V}if($.done)return n(P,N),ir&&_f(P,z),O;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return ir&&_f(P,z),O}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return e&&N.forEach(function(ue){return t(P,ue)}),ir&&_f(P,z),O}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case uy:e:{for(var O=T.key,R=k;R!==null;){if(R.key===O){if(O=T.type,O===Up){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Oc&&hP(O)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=zg(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Up?(k=Yf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=zg(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=_x(T,P.mode,M),k.return=P,P=k}return a(P);case Oc:return R=T._init,E(P,k,R(T._payload),M)}if(om(T))return b(P,k,T,M);if(Ig(T))return w(P,k,T,M);Sy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=Cx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var $0=sR(!0),lR=sR(!1),qv={},Cl=yd(qv),cv=yd(qv),dv=yd(qv);function zf(e){if(e===qv)throw Error(Re(174));return e}function _9(e,t){switch(qn(dv,t),qn(cv,e),qn(Cl,qv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:u6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=u6(t,e)}Qn(Cl),qn(Cl,t)}function H0(){Qn(Cl),Qn(cv),Qn(dv)}function uR(e){zf(dv.current);var t=zf(Cl.current),n=u6(t,e.type);t!==n&&(qn(cv,e),qn(Cl,n))}function k9(e){cv.current===e&&(Qn(Cl),Qn(cv))}var cr=yd(0);function P5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vx=[];function E9(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{Tn=n,yx.transition=r}}function kR(){return Ha().memoizedState}function NX(e,t,n){var r=ed(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ER(e))PR(t,n);else if(n=rR(e,t,n,r),n!==null){var i=ro();_s(n,e,r,i),TR(n,t,r)}}function DX(e,t,n){var r=ed(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ER(e))PR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,w9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=rR(e,t,i,r),n!==null&&(i=ro(),_s(n,e,r,i),TR(n,t,r))}}function ER(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function PR(e,t){Tm=T5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function TR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,l9(e,n)}}var L5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},zX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:gP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,L3(4194308,4,SR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return L3(4194308,4,e,t)},useInsertionEffect:function(e,t){return L3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=NX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:pP,useDebugValue:M9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=pP(!1),t=e[0];return e=RX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),hi===null)throw Error(Re(349));(ih&30)!==0||fR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gP(pR.bind(null,r,o,e),[e]),r.flags|=2048,pv(9,hR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=gu,r=pu;n=(r&~(1<<32-Cs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ml]=t,e[uv]=r,zR(e,t,!1,!1),t.stateNode=e;e:{switch(a=d6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;iV0&&(t.flags|=128,r=!0,Bg(o,!1),t.lanes=4194304)}else{if(!r)if(e=P5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Rr()-o.renderingStartTime>V0&&n!==1073741824&&(t.flags|=128,r=!0,Bg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return z9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function GX(e,t){switch(v9(t),t.tag){case 1:return Mo(t.type)&&S5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return H0(),Qn(Ao),Qn(Wi),E9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return k9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));F0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return H0(),null;case 10:return x9(t.type._context),null;case 22:case 23:return z9(),null;case 24:return null;default:return null}}var wy=!1,Hi=!1,jX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function B6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var _P=!1;function YX(e,t){if(x6=m5,e=VO(),g9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(w6={focusedElem:e,selectionRange:n},m5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return b=_P,_P=!1,b}function Lm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&B6(t,n,o)}i=i.next}while(i!==r)}}function D4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function F6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $R(e){var t=e.alternate;t!==null&&(e.alternate=null,$R(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ml],delete t[uv],delete t[k6],delete t[LX],delete t[AX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function HR(e){return e.tag===5||e.tag===3||e.tag===4}function kP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||HR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for($6(e,t,n),e=e.sibling;e!==null;)$6(e,t,n),e=e.sibling}function H6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(H6(e,t,n),e=e.sibling;e!==null;)H6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function Ec(e,t,n){for(n=n.child;n!==null;)WR(e,t,n),n=n.sibling}function WR(e,t,n){if(wl&&typeof wl.onCommitFiberUnmount=="function")try{wl.onCommitFiberUnmount(T4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,Ec(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?gx(e.parentNode,n):e.nodeType===1&&gx(e,n),iv(e)):gx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,Ec(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&B6(n,t,a),i=i.next}while(i!==r)}Ec(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}Ec(e,t,n);break;case 21:Ec(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Ec(e,t,n),Hi=r):Ec(e,t,n);break;default:Ec(e,t,n)}}function EP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jX),t.forEach(function(r){var i=nZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KX(r/1960))-r,10e?16:e,Wc===null)var r=!1;else{if(e=Wc,Wc=null,I5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-N9?jf(e,0):R9|=n),Io(e,t)}function XR(e,t){t===0&&((e.mode&1)===0?t=1:(t=hy,hy<<=1,(hy&130023424)===0&&(hy=4194304)));var n=ro();e=wu(e,t),e!==null&&(Gv(e,t,n),Io(e,n))}function tZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),XR(e,n)}function nZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),XR(e,n)}var ZR;ZR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,VX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&eR(t,C5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;A3(e,t),e=t.pendingProps;var i=B0(t,Wi.current);p0(t,n),i=T9(null,t,r,e,i,n);var o=L9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,x5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C9(t),i.updater=R4,t.stateNode=i,i._reactInternals=t,M6(t,r,e,n),t=R6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&m9(t),Ji(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(A3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=iZ(r),e=gs(r,e),i){case 0:t=O6(null,t,r,e,n);break e;case 1:t=xP(null,t,r,e,n);break e;case 11:t=bP(null,t,r,e,n);break e;case 14:t=SP(null,t,r,gs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),O6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),xP(e,t,r,i,n);case 3:e:{if(RR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,iR(e,t),E5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=W0(Error(Re(423)),t),t=wP(e,t,r,n,i);break e}else if(r!==i){i=W0(Error(Re(424)),t),t=wP(e,t,r,n,i);break e}else for(aa=Zc(t.stateNode.containerInfo.firstChild),sa=t,ir=!0,ys=null,n=lR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(F0(),r===i){t=Cu(e,t,n);break e}Ji(e,t,r,n)}t=t.child}return t;case 5:return uR(t),e===null&&T6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,C6(r,i)?a=null:o!==null&&C6(r,o)&&(t.flags|=32),OR(e,t),Ji(e,t,a,n),t.child;case 6:return e===null&&T6(t),null;case 13:return NR(e,t,n);case 4:return _9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$0(t,null,r,n):Ji(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),bP(e,t,r,i,n);case 7:return Ji(e,t,t.pendingProps,n),t.child;case 8:return Ji(e,t,t.pendingProps.children,n),t.child;case 12:return Ji(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(_5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=vu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),L6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),L6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ji(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,p0(t,n),i=$a(i),r=r(i),t.flags|=1,Ji(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),SP(e,t,r,i,n);case 15:return MR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),A3(e,t),t.tag=1,Mo(r)?(e=!0,x5(t)):e=!1,p0(t,n),aR(t,r,i),M6(t,r,i,n),R6(null,t,r,!0,e,n);case 19:return DR(e,t,n);case 22:return IR(e,t,n)}throw Error(Re(156,t.tag))};function QR(e,t){return _O(e,t)}function rZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new rZ(e,t,n,r)}function F9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function iZ(e){if(typeof e=="function")return F9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i9)return 11;if(e===o9)return 14}return 2}function td(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")F9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return Yf(n.children,i,o,t);case r9:a=8,i|=8;break;case t6:return e=Na(12,n,t,i|2),e.elementType=t6,e.lanes=o,e;case n6:return e=Na(13,n,t,i),e.elementType=n6,e.lanes=o,e;case r6:return e=Na(19,n,t,i),e.elementType=r6,e.lanes=o,e;case sO:return B4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oO:a=10;break e;case aO:a=9;break e;case i9:a=11;break e;case o9:a=14;break e;case Oc:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Yf(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function B4(e,t,n,r){return e=Na(22,e,r,t),e.elementType=sO,e.lanes=n,e.stateNode={isHidden:!1},e}function Cx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function _x(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ix(0),this.expirationTimes=ix(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ix(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $9(e,t,n,r,i,o,a,s,l){return e=new oZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},C9(o),e}function aZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Dl);const ky=K7(Dl.exports);var RP=Dl.exports;Jw.createRoot=RP.createRoot,Jw.hydrateRoot=RP.hydrateRoot;var ks=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,V4={exports:{}},U4={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var dZ=C.exports,fZ=Symbol.for("react.element"),hZ=Symbol.for("react.fragment"),pZ=Object.prototype.hasOwnProperty,gZ=dZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,mZ={key:!0,ref:!0,__self:!0,__source:!0};function nN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)pZ.call(t,r)&&!mZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:fZ,type:e,key:o,ref:a,props:i,_owner:gZ.current}}U4.Fragment=hZ;U4.jsx=nN;U4.jsxs=nN;(function(e){e.exports=U4})(V4);const Ln=V4.exports.Fragment,x=V4.exports.jsx,J=V4.exports.jsxs;var U9=C.exports.createContext({});U9.displayName="ColorModeContext";function Kv(){const e=C.exports.useContext(U9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Ey={light:"chakra-ui-light",dark:"chakra-ui-dark"};function vZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Ey.dark:Ey.light),document.body.classList.remove(r?Ey.light:Ey.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var yZ="chakra-ui-color-mode";function bZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var SZ=bZ(yZ),NP=()=>{};function DP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function rN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=SZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>DP(a,s)),[h,g]=C.exports.useState(()=>DP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>vZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const O=M==="system"?m():M;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);ks(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?NP:k,setColorMode:t?NP:P,forced:t!==void 0}),[E,k,P,t]);return x(U9.Provider,{value:T,children:n})}rN.displayName="ColorModeProvider";var j6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",O="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",ue="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",ee="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Me=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[ue]=xe[W]=xe[Q]=xe[ne]=xe[ee]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[O]=xe[R]=xe[z]=!1;var be=typeof bs=="object"&&bs&&bs.Object===Object&&bs,Ie=typeof self=="object"&&self&&self.Object===Object&&self,We=be||Ie||Function("return this")(),De=t&&!t.nodeType&&t,Qe=De&&!0&&e&&!e.nodeType&&e,st=Qe&&Qe.exports===De,Ct=st&&be.process,ht=function(){try{var U=Qe&&Qe.require&&Qe.require("util").types;return U||Ct&&Ct.binding&&Ct.binding("util")}catch{}}(),ut=ht&&ht.isTypedArray;function vt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Ee(U,te){for(var he=-1,Ye=Array(U);++he-1}function T1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Id,Do.prototype.delete=P1,Do.prototype.get=Hu,Do.prototype.has=Od,Do.prototype.set=T1;function Rs(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,yt=zt>2?he[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Rh(he[0],he[1],yt)&&(fn=zt<3?void 0:fn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function ju(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Bd=Vl(function(){return arguments}())?Vl:function(U){return Un(U)&&yn.call(U,"callee")&&!He.call(U,"callee")},jl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!qu(U)}function Nh(U){return Un(U)&&Ht(U)}var Yu=Zt||H1;function qu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==b||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function Fd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=ln(U);if(te===null)return!0;var he=yn.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&sn.call(he)==Xt}var zh=ut?Je(ut):Vu;function $d(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?B1(U,!0):zs(U)}var un=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function H1(){return!1}e.exports=un})(j6,j6.exports);const Sl=j6.exports;function Es(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Bf(e,...t){return xZ(e)?e(...t):e}var xZ=e=>typeof e=="function",wZ=e=>/!(important)?$/.test(e),zP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Y6=(e,t)=>n=>{const r=String(t),i=wZ(r),o=zP(r),a=e?`${e}.${o}`:o;let s=Es(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=zP(s),i?`${s} !important`:s};function mv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Y6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Py=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=mv({scale:e,transform:t}),r}}var CZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function _Z(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:CZ(t),transform:n?mv({scale:n,compose:r}):r}}var iN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function kZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...iN].join(" ")}function EZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...iN].join(" ")}var PZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},TZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function LZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var AZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},oN="& > :not(style) ~ :not(style)",MZ={[oN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},IZ={[oN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},q6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},OZ=new Set(Object.values(q6)),aN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),RZ=e=>e.trim();function NZ(e,t){var n;if(e==null||aN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(RZ).filter(Boolean);if(l?.length===0)return e;const u=s in q6?q6[s]:s;l.unshift(u);const h=l.map(g=>{if(OZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=sN(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var sN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),DZ=(e,t)=>NZ(e,t??{});function zZ(e){return/^var\(--.+\)$/.test(e)}var BZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:PZ},backdropFilter(e){return e!=="auto"?e:TZ},ring(e){return LZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?kZ():e==="auto-gpu"?EZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=BZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(zZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:DZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||sN(e)||aN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=AZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",rn.px),space:ds("space",Py(rn.vh,rn.px)),spaceT:ds("space",Py(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:mv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Py(rn.vh,rn.px)),sizesT:ds("sizes",Py(rn.vh,rn.fraction)),shadows:ds("shadows"),logical:_Z,blur:ds("blur",rn.blur)},R3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(R3,{bgImage:R3.backgroundImage,bgImg:R3.backgroundImage});var pn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var FZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},K6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(K6,{shadow:K6.boxShadow});var $Z={filter:{transform:rn.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",rn.brightness),contrast:ie.propT("--chakra-contrast",rn.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",rn.invert),saturate:ie.propT("--chakra-saturate",rn.saturate),dropShadow:ie.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",rn.saturate)},N5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:MZ,transform:mv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:IZ,transform:mv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(N5,{flexDir:N5.flexDirection});var lN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},HZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},La={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(La,{w:La.width,h:La.height,minW:La.minWidth,maxW:La.maxWidth,minH:La.minHeight,maxH:La.maxHeight,overscroll:La.overscrollBehavior,overscrollX:La.overscrollBehaviorX,overscrollY:La.overscrollBehaviorY});var WZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function VZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},GZ=UZ(VZ),jZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},YZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},kx=(e,t,n)=>{const r={},i=GZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},qZ={srOnly:{transform(e){return e===!0?jZ:e==="focusable"?YZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>kx(t,e,n)}},Im={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Im,{insetStart:Im.insetInlineStart,insetEnd:Im.insetInlineEnd});var KZ={ring:{transform:rn.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var XZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},ZZ={clipPath:!0,transform:ie.propT("transform",rn.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},QZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},JZ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",rn.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},eQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function uN(e){return Es(e)&&e.reference?e.reference:String(e)}var G4=(e,...t)=>t.map(uN).join(` ${e} `).replace(/calc/g,""),BP=(...e)=>`calc(${G4("+",...e)})`,FP=(...e)=>`calc(${G4("-",...e)})`,X6=(...e)=>`calc(${G4("*",...e)})`,$P=(...e)=>`calc(${G4("/",...e)})`,HP=e=>{const t=uN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:X6(t,-1)},Mf=Object.assign(e=>({add:(...t)=>Mf(BP(e,...t)),subtract:(...t)=>Mf(FP(e,...t)),multiply:(...t)=>Mf(X6(e,...t)),divide:(...t)=>Mf($P(e,...t)),negate:()=>Mf(HP(e)),toString:()=>e.toString()}),{add:BP,subtract:FP,multiply:X6,divide:$P,negate:HP});function tQ(e,t="-"){return e.replace(/\s+/g,t)}function nQ(e){const t=tQ(e.toString());return iQ(rQ(t))}function rQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function iQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function oQ(e,t=""){return[t,e].filter(Boolean).join("-")}function aQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function sQ(e,t=""){return nQ(`--${oQ(e,t)}`)}function Dn(e,t,n){const r=sQ(e,n);return{variable:r,reference:aQ(r,t)}}function lQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function uQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Z6(e){if(e==null)return e;const{unitless:t}=uQ(e);return t||typeof e=="number"?`${e}px`:e}var cN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,G9=e=>Object.fromEntries(Object.entries(e).sort(cN));function WP(e){const t=G9(e);return Object.assign(Object.values(t),t)}function cQ(e){const t=Object.keys(G9(e));return new Set(t)}function VP(e){if(!e)return e;e=Z6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function lm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Z6(e)})`),t&&n.push("and",`(max-width: ${Z6(t)})`),n.join(" ")}function dQ(e){if(!e)return null;e.base=e.base??"0px";const t=WP(e),n=Object.entries(e).sort(cN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?VP(u):void 0,{_minW:VP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:lm(null,u),minWQuery:lm(a),minMaxQuery:lm(a,u)}}),r=cQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:G9(e),asArray:WP(e),details:n,media:[null,...t.map(o=>lm(o)).slice(1)],toArrayValue(o){if(!Es(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;lQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Pc=e=>dN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),au=e=>dN(t=>e(t,"~ &"),"[data-peer]",".peer"),dN=(e,...t)=>t.map(e).join(", "),j4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Pc(ki.hover),_peerHover:au(ki.hover),_groupFocus:Pc(ki.focus),_peerFocus:au(ki.focus),_groupFocusVisible:Pc(ki.focusVisible),_peerFocusVisible:au(ki.focusVisible),_groupActive:Pc(ki.active),_peerActive:au(ki.active),_groupDisabled:Pc(ki.disabled),_peerDisabled:au(ki.disabled),_groupInvalid:Pc(ki.invalid),_peerInvalid:au(ki.invalid),_groupChecked:Pc(ki.checked),_peerChecked:au(ki.checked),_groupFocusWithin:Pc(ki.focusWithin),_peerFocusWithin:au(ki.focusWithin),_peerPlaceholderShown:au(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},fQ=Object.keys(j4);function UP(e,t){return Dn(String(e).replace(/\./g,"-"),void 0,t)}function hQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=UP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=Mf.negate(s),P=Mf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=UP(b,t?.cssVarPrefix);return E},g=Es(s)?s:{default:s};n=Sl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=j4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function pQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function gQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var mQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function vQ(e){return gQ(e,mQ)}function yQ(e){return e.semanticTokens}function bQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function SQ({tokens:e,semanticTokens:t}){const n=Object.entries(Q6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Q6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Q6(e,t=1/0){return!Es(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Es(i)||Array.isArray(i)?Object.entries(Q6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function xQ(e){var t;const n=bQ(e),r=vQ(n),i=yQ(n),o=SQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=hQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:dQ(n.breakpoints)}),n}var j9=Sl({},R3,pn,FZ,N5,La,$Z,KZ,HZ,lN,qZ,Im,K6,Zn,eQ,JZ,XZ,ZZ,WZ,QZ),wQ=Object.assign({},Zn,La,N5,lN,Im),CQ=Object.keys(wQ),_Q=[...Object.keys(j9),...fQ],kQ={...j9,...j4},EQ=e=>e in kQ,PQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Bf(e[a],t);if(s==null)continue;if(s=Es(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!LQ(t),MQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=TQ(t);return t=n(i)??r(o)??r(t),t};function IQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Bf(o,r),u=PQ(l)(r);let h={};for(let g in u){const m=u[g];let v=Bf(m,r);g in n&&(g=n[g]),AQ(g,v)&&(v=MQ(r,v));let b=t[g];if(b===!0&&(b={property:g}),Es(v)){h[g]=h[g]??{},h[g]=Sl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=Bf(b?.property,r);if(!a&&b?.static){const P=Bf(b.static,r);h=Sl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&Es(w)?h=Sl({},h,w):h[E]=w;continue}if(Es(w)){h=Sl({},h,w);continue}h[g]=w}return h};return i}var fN=e=>t=>IQ({theme:t,pseudos:j4,configs:j9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function OQ(e,t){if(Array.isArray(e))return e;if(Es(e))return t(e);if(e!=null)return[e]}function RQ(e,t){for(let n=t+1;n{Sl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?Sl(u,k):u[P]=k;continue}u[P]=k}}return u}}function DQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=NQ(i);return Sl({},Bf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function zQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return pQ(e,["styleConfig","size","variant","colorScheme"])}function BQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(l1,--No):0,U0--,Hr===10&&(U0=1,q4--),Hr}function la(){return Hr=No2||yv(Hr)>3?"":" "}function XQ(e,t){for(;--t&&la()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Xv(e,N3()+(t<6&&_l()==32&&la()==32))}function eC(e){for(;la();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&eC(Hr);break;case 40:e===41&&eC(e);break;case 92:la();break}return No}function ZQ(e,t){for(;la()&&e+Hr!==47+10;)if(e+Hr===42+42&&_l()===47)break;return"/*"+Xv(t,No-1)+"*"+Y4(e===47?e:la())}function QQ(e){for(;!yv(_l());)la();return Xv(e,No)}function JQ(e){return yN(z3("",null,null,null,[""],e=vN(e),0,[0],e))}function z3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,T="",M=i,O=o,R=r,N=T;E;)switch(b=k,k=la()){case 40:if(b!=108&&Ti(N,g-1)==58){J6(N+=wn(D3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=D3(k);break;case 9:case 10:case 13:case 32:N+=KQ(b);break;case 92:N+=XQ(N3()-1,7);continue;case 47:switch(_l()){case 42:case 47:Ty(eJ(ZQ(la(),N3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ty(v>32?jP(N+";",r,n,g-1):jP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ty(R=GP(N,t,n,u,h,i,s,T,M=[],O=[],g),o),k===123)if(h===0)z3(N,t,R,R,M,o,g,s,O);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:z3(e,R,R,r&&Ty(GP(e,R,R,0,0,i,s,T,i,M=[],g),O),i,O,g,s,r?M:O);break;default:z3(N,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&qQ()==125)continue}switch(N+=Y4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:_l()===45&&(N+=D3(la())),m=_l(),h=g=hl(T=N+=QQ(N3())),k++;break;case 45:b===45&&hl(N)==2&&(w=0)}}return o}function GP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=K9(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return K4(e,t,n,i===0?Y9:s,l,u,h)}function eJ(e,t,n){return K4(e,t,n,hN,Y4(YQ()),vv(e,2,-2),0)}function jP(e,t,n,r){return K4(e,t,n,q9,vv(e,0,r),vv(e,r+1,-1),r)}function m0(e,t){for(var n="",r=K9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+D5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~J6(e,"stretch")?SN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~J6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var uJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case q9:t.return=SN(t.value,t.length);break;case pN:return m0([$g(t,{value:wn(t.value,"@","@"+gn)})],i);case Y9:if(t.length)return jQ(t.props,function(o){switch(GQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return m0([$g(t,{props:[wn(o,/:(read-\w+)/,":"+D5+"$1")]})],i);case"::placeholder":return m0([$g(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),$g(t,{props:[wn(o,/:(plac\w+)/,":"+D5+"$1")]}),$g(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},cJ=[uJ],xN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||cJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var xJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},wJ=/[A-Z]|^ms/g,CJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TN=function(t){return t.charCodeAt(1)===45},KP=function(t){return t!=null&&typeof t!="boolean"},Ex=bN(function(e){return TN(e)?e:e.replace(wJ,"-$&").toLowerCase()}),XP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(CJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return xJ[t]!==1&&!TN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return _J(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,bv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function _J(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function HJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},NN=WJ(HJ);function DN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var zN=e=>DN(e,t=>t!=null);function VJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var UJ=VJ();function BN(e,...t){return FJ(e)?e(...t):e}function GJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function jJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var YJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qJ=bN(function(e){return YJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),KJ=qJ,XJ=function(t){return t!=="theme"},eT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?KJ:XJ},tT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},ZJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return EN(n,r,i),EJ(function(){return PN(n,r,i)}),null},QJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=tT(t,n,r),l=s||eT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var eee=Cn("accordion").parts("root","container","button","panel").extend("icon"),tee=Cn("alert").parts("title","description","container").extend("icon","spinner"),nee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),ree=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var iee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var oee=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),aee=Cn("editable").parts("preview","input","textarea"),see=Cn("form").parts("container","requiredIndicator","helperText"),lee=Cn("formError").parts("text","icon"),uee=Cn("input").parts("addon","field","element"),cee=Cn("list").parts("container","item","icon"),dee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),fee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),hee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var pee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),gee=Cn("progress").parts("label","filledTrack","track"),mee=Cn("radio").parts("container","control","label"),vee=Cn("select").parts("field","icon"),yee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),bee=Cn("stat").parts("container","label","helpText","number","icon"),See=Cn("switch").parts("container","track","thumb"),xee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),wee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Cee=Cn("tag").parts("container","label","closeButton"),_ee=Cn("card").parts("container","header","body","footer");function Mi(e,t){kee(e)&&(e="100%");var n=Eee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ly(e){return Math.min(1,Math.max(0,e))}function kee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Eee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function FN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ay(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ff(e){return e.length===1?"0"+e:String(e)}function Pee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function nT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Tee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Px(s,a,e+1/3),i=Px(s,a,e),o=Px(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function rT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var iC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Oee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Dee(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=Pee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(r=Ay(e.s),i=Ay(e.v),t=Lee(e.h,r,i),a=!0,s="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(r=Ay(e.s),o=Ay(e.l),t=Tee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=FN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ree="[-\\+]?\\d+%?",Nee="[-\\+]?\\d*\\.\\d+%?",Vc="(?:".concat(Nee,")|(?:").concat(Ree,")"),Tx="[\\s|\\(]+(".concat(Vc,")[,|\\s]+(").concat(Vc,")[,|\\s]+(").concat(Vc,")\\s*\\)?"),Lx="[\\s|\\(]+(".concat(Vc,")[,|\\s]+(").concat(Vc,")[,|\\s]+(").concat(Vc,")[,|\\s]+(").concat(Vc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Vc),rgb:new RegExp("rgb"+Tx),rgba:new RegExp("rgba"+Lx),hsl:new RegExp("hsl"+Tx),hsla:new RegExp("hsla"+Lx),hsv:new RegExp("hsv"+Tx),hsva:new RegExp("hsva"+Lx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Dee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(iC[e])e=iC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:oT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:oT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Zv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Iee(t)),this.originalInput=t;var i=Oee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=FN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=rT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=rT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=nT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=nT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),iT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Aee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+iT(this.r,this.g,this.b,!1),n=0,r=Object.entries(iC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ly(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ly(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ly(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ly(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push($N(e));return e.count=t,n}var r=zee(e.hue,e.seed),i=Bee(r,e),o=Fee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Zv(a)}function zee(e,t){var n=Hee(e),r=z5(n,t);return r<0&&(r=360+r),r}function Bee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return z5([0,100],t.seed);var n=HN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return z5([r,i],t.seed)}function Fee(e,t,n){var r=$ee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return z5([r,i],n.seed)}function $ee(e,t){for(var n=HN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Hee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=VN.find(function(a){return a.name===e});if(n){var r=WN(n);if(r.hueRange)return r.hueRange}var i=new Zv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function HN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=VN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function z5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function WN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var VN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Wee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Wee(e,`colors.${t}`,t),{isValid:i}=new Zv(r);return i?r:n},Uee=e=>t=>{const n=to(t,e);return new Zv(n).isDark()?"dark":"light"},Gee=e=>t=>Uee(e)(t)==="dark",G0=(e,t)=>n=>{const r=to(n,e);return new Zv(r).setAlpha(t).toRgbString()};function aT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function jee(e){const t=$N().toHexString();return!e||Vee(e)?t:e.string&&e.colors?qee(e.string,e.colors):e.string&&!e.colors?Yee(e.string):e.colors&&!e.string?Kee(e.colors):t}function Yee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function qee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function t8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Xee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function UN(e){return Xee(e)&&e.reference?e.reference:String(e)}var lb=(e,...t)=>t.map(UN).join(` ${e} `).replace(/calc/g,""),sT=(...e)=>`calc(${lb("+",...e)})`,lT=(...e)=>`calc(${lb("-",...e)})`,oC=(...e)=>`calc(${lb("*",...e)})`,uT=(...e)=>`calc(${lb("/",...e)})`,cT=e=>{const t=UN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:oC(t,-1)},hu=Object.assign(e=>({add:(...t)=>hu(sT(e,...t)),subtract:(...t)=>hu(lT(e,...t)),multiply:(...t)=>hu(oC(e,...t)),divide:(...t)=>hu(uT(e,...t)),negate:()=>hu(cT(e)),toString:()=>e.toString()}),{add:sT,subtract:lT,multiply:oC,divide:uT,negate:cT});function Zee(e){return!Number.isInteger(parseFloat(e.toString()))}function Qee(e,t="-"){return e.replace(/\s+/g,t)}function GN(e){const t=Qee(e.toString());return t.includes("\\.")?e:Zee(e)?t.replace(".","\\."):e}function Jee(e,t=""){return[t,GN(e)].filter(Boolean).join("-")}function ete(e,t){return`var(${GN(e)}${t?`, ${t}`:""})`}function tte(e,t=""){return`--${Jee(e,t)}`}function ni(e,t){const n=tte(e,t?.prefix);return{variable:n,reference:ete(n,nte(t?.fallback))}}function nte(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:rte,defineMultiStyleConfig:ite}=Jn(eee.keys),ote={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},ate={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ste={pt:"2",px:"4",pb:"5"},lte={fontSize:"1.25em"},ute=rte({container:ote,button:ate,panel:ste,icon:lte}),cte=ite({baseStyle:ute}),{definePartsStyle:Qv,defineMultiStyleConfig:dte}=Jn(tee.keys),ua=Dn("alert-fg"),_u=Dn("alert-bg"),fte=Qv({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function n8(e){const{theme:t,colorScheme:n}=e,r=G0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var hte=Qv(e=>{const{colorScheme:t}=e,n=n8(e);return{container:{[ua.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),pte=Qv(e=>{const{colorScheme:t}=e,n=n8(e);return{container:{[ua.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),gte=Qv(e=>{const{colorScheme:t}=e,n=n8(e);return{container:{[ua.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),mte=Qv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ua.reference}}}),vte={subtle:hte,"left-accent":pte,"top-accent":gte,solid:mte},yte=dte({baseStyle:fte,variants:vte,defaultProps:{variant:"subtle",colorScheme:"blue"}}),jN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},bte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Ste={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},xte={...jN,...bte,container:Ste},YN=xte,wte=e=>typeof e=="function";function io(e,...t){return wte(e)?e(...t):e}var{definePartsStyle:qN,defineMultiStyleConfig:Cte}=Jn(nee.keys),v0=Dn("avatar-border-color"),Ax=Dn("avatar-bg"),_te={borderRadius:"full",border:"0.2em solid",[v0.variable]:"white",_dark:{[v0.variable]:"colors.gray.800"},borderColor:v0.reference},kte={[Ax.variable]:"colors.gray.200",_dark:{[Ax.variable]:"colors.whiteAlpha.400"},bgColor:Ax.reference},dT=Dn("avatar-background"),Ete=e=>{const{name:t,theme:n}=e,r=t?jee({string:t}):"colors.gray.400",i=Gee(r)(n);let o="white";return i||(o="gray.800"),{bg:dT.reference,"&:not([data-loaded])":{[dT.variable]:r},color:o,[v0.variable]:"colors.white",_dark:{[v0.variable]:"colors.gray.800"},borderColor:v0.reference,verticalAlign:"top"}},Pte=qN(e=>({badge:io(_te,e),excessLabel:io(kte,e),container:io(Ete,e)}));function Tc(e){const t=e!=="100%"?YN[e]:void 0;return qN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Tte={"2xs":Tc(4),xs:Tc(6),sm:Tc(8),md:Tc(12),lg:Tc(16),xl:Tc(24),"2xl":Tc(32),full:Tc("100%")},Lte=Cte({baseStyle:Pte,sizes:Tte,defaultProps:{size:"md"}}),Ate={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},y0=Dn("badge-bg"),xl=Dn("badge-color"),Mte=e=>{const{colorScheme:t,theme:n}=e,r=G0(`${t}.500`,.6)(n);return{[y0.variable]:`colors.${t}.500`,[xl.variable]:"colors.white",_dark:{[y0.variable]:r,[xl.variable]:"colors.whiteAlpha.800"},bg:y0.reference,color:xl.reference}},Ite=e=>{const{colorScheme:t,theme:n}=e,r=G0(`${t}.200`,.16)(n);return{[y0.variable]:`colors.${t}.100`,[xl.variable]:`colors.${t}.800`,_dark:{[y0.variable]:r,[xl.variable]:`colors.${t}.200`},bg:y0.reference,color:xl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=G0(`${t}.200`,.8)(n);return{[xl.variable]:`colors.${t}.500`,_dark:{[xl.variable]:r},color:xl.reference,boxShadow:`inset 0 0 0px 1px ${xl.reference}`}},Rte={solid:Mte,subtle:Ite,outline:Ote},Rm={baseStyle:Ate,variants:Rte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Nte,definePartsStyle:Dte}=Jn(ree.keys),zte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Bte=Dte({link:zte}),Fte=Nte({baseStyle:Bte}),$te={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},KN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:bt("inherit","whiteAlpha.900")(e),_hover:{bg:bt("gray.100","whiteAlpha.200")(e)},_active:{bg:bt("gray.200","whiteAlpha.300")(e)}};const r=G0(`${t}.200`,.12)(n),i=G0(`${t}.200`,.24)(n);return{color:bt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:bt(`${t}.50`,r)(e)},_active:{bg:bt(`${t}.100`,i)(e)}}},Hte=e=>{const{colorScheme:t}=e,n=bt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(KN,e)}},Wte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Vte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=bt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:bt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:bt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Wte[t]??{},a=bt(n,`${t}.200`)(e);return{bg:a,color:bt(r,"gray.800")(e),_hover:{bg:bt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:bt(o,`${t}.400`)(e)}}},Ute=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:bt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:bt(`${t}.700`,`${t}.500`)(e)}}},Gte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},jte={ghost:KN,outline:Hte,solid:Vte,link:Ute,unstyled:Gte},Yte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},qte={baseStyle:$te,variants:jte,sizes:Yte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:qf,defineMultiStyleConfig:Kte}=Jn(_ee.keys),B5=Dn("card-bg"),b0=Dn("card-padding"),Xte=qf({container:{[B5.variable]:"chakra-body-bg",backgroundColor:B5.reference,color:"chakra-body-text"},body:{padding:b0.reference,flex:"1 1 0%"},header:{padding:b0.reference},footer:{padding:b0.reference}}),Zte={sm:qf({container:{borderRadius:"base",[b0.variable]:"space.3"}}),md:qf({container:{borderRadius:"md",[b0.variable]:"space.5"}}),lg:qf({container:{borderRadius:"xl",[b0.variable]:"space.7"}})},Qte={elevated:qf({container:{boxShadow:"base",_dark:{[B5.variable]:"colors.gray.700"}}}),outline:qf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:qf({container:{[B5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Jte=Kte({baseStyle:Xte,variants:Qte,sizes:Zte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:B3,defineMultiStyleConfig:ene}=Jn(iee.keys),Nm=Dn("checkbox-size"),tne=e=>{const{colorScheme:t}=e;return{w:Nm.reference,h:Nm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e),_hover:{bg:bt(`${t}.600`,`${t}.300`)(e),borderColor:bt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:bt("gray.200","transparent")(e),bg:bt("gray.200","whiteAlpha.300")(e),color:bt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e)},_disabled:{bg:bt("gray.100","whiteAlpha.100")(e),borderColor:bt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:bt("red.500","red.300")(e)}}},nne={_disabled:{cursor:"not-allowed"}},rne={userSelect:"none",_disabled:{opacity:.4}},ine={transitionProperty:"transform",transitionDuration:"normal"},one=B3(e=>({icon:ine,container:nne,control:io(tne,e),label:rne})),ane={sm:B3({control:{[Nm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:B3({control:{[Nm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:B3({control:{[Nm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},F5=ene({baseStyle:one,sizes:ane,defaultProps:{size:"md",colorScheme:"blue"}}),Dm=ni("close-button-size"),Hg=ni("close-button-bg"),sne={w:[Dm.reference],h:[Dm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Hg.variable]:"colors.blackAlpha.100",_dark:{[Hg.variable]:"colors.whiteAlpha.100"}},_active:{[Hg.variable]:"colors.blackAlpha.200",_dark:{[Hg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Hg.reference},lne={lg:{[Dm.variable]:"sizes.10",fontSize:"md"},md:{[Dm.variable]:"sizes.8",fontSize:"xs"},sm:{[Dm.variable]:"sizes.6",fontSize:"2xs"}},une={baseStyle:sne,sizes:lne,defaultProps:{size:"md"}},{variants:cne,defaultProps:dne}=Rm,fne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},hne={baseStyle:fne,variants:cne,defaultProps:dne},pne={w:"100%",mx:"auto",maxW:"prose",px:"4"},gne={baseStyle:pne},mne={opacity:.6,borderColor:"inherit"},vne={borderStyle:"solid"},yne={borderStyle:"dashed"},bne={solid:vne,dashed:yne},Sne={baseStyle:mne,variants:bne,defaultProps:{variant:"solid"}},{definePartsStyle:aC,defineMultiStyleConfig:xne}=Jn(oee.keys),Mx=Dn("drawer-bg"),Ix=Dn("drawer-box-shadow");function Ep(e){return aC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var wne={bg:"blackAlpha.600",zIndex:"overlay"},Cne={display:"flex",zIndex:"modal",justifyContent:"center"},_ne=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Mx.variable]:"colors.white",[Ix.variable]:"shadows.lg",_dark:{[Mx.variable]:"colors.gray.700",[Ix.variable]:"shadows.dark-lg"},bg:Mx.reference,boxShadow:Ix.reference}},kne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Ene={position:"absolute",top:"2",insetEnd:"3"},Pne={px:"6",py:"2",flex:"1",overflow:"auto"},Tne={px:"6",py:"4"},Lne=aC(e=>({overlay:wne,dialogContainer:Cne,dialog:io(_ne,e),header:kne,closeButton:Ene,body:Pne,footer:Tne})),Ane={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Mne=xne({baseStyle:Lne,sizes:Ane,defaultProps:{size:"xs"}}),{definePartsStyle:Ine,defineMultiStyleConfig:One}=Jn(aee.keys),Rne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Nne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},zne=Ine({preview:Rne,input:Nne,textarea:Dne}),Bne=One({baseStyle:zne}),{definePartsStyle:Fne,defineMultiStyleConfig:$ne}=Jn(see.keys),S0=Dn("form-control-color"),Hne={marginStart:"1",[S0.variable]:"colors.red.500",_dark:{[S0.variable]:"colors.red.300"},color:S0.reference},Wne={mt:"2",[S0.variable]:"colors.gray.600",_dark:{[S0.variable]:"colors.whiteAlpha.600"},color:S0.reference,lineHeight:"normal",fontSize:"sm"},Vne=Fne({container:{width:"100%",position:"relative"},requiredIndicator:Hne,helperText:Wne}),Une=$ne({baseStyle:Vne}),{definePartsStyle:Gne,defineMultiStyleConfig:jne}=Jn(lee.keys),x0=Dn("form-error-color"),Yne={[x0.variable]:"colors.red.500",_dark:{[x0.variable]:"colors.red.300"},color:x0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},qne={marginEnd:"0.5em",[x0.variable]:"colors.red.500",_dark:{[x0.variable]:"colors.red.300"},color:x0.reference},Kne=Gne({text:Yne,icon:qne}),Xne=jne({baseStyle:Kne}),Zne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Qne={baseStyle:Zne},Jne={fontFamily:"heading",fontWeight:"bold"},ere={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},tre={baseStyle:Jne,sizes:ere,defaultProps:{size:"xl"}},{definePartsStyle:mu,defineMultiStyleConfig:nre}=Jn(uee.keys),rre=mu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Lc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},ire={lg:mu({field:Lc.lg,addon:Lc.lg}),md:mu({field:Lc.md,addon:Lc.md}),sm:mu({field:Lc.sm,addon:Lc.sm}),xs:mu({field:Lc.xs,addon:Lc.xs})};function r8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||bt("blue.500","blue.300")(e),errorBorderColor:n||bt("red.500","red.300")(e)}}var ore=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=r8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:bt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:bt("inherit","whiteAlpha.50")(e),bg:bt("gray.100","whiteAlpha.300")(e)}}}),are=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=r8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e),_hover:{bg:bt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e)}}}),sre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=r8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),lre=mu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),ure={outline:ore,filled:are,flushed:sre,unstyled:lre},mn=nre({baseStyle:rre,sizes:ire,variants:ure,defaultProps:{size:"md",variant:"outline"}}),Ox=Dn("kbd-bg"),cre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},dre={baseStyle:cre},fre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},hre={baseStyle:fre},{defineMultiStyleConfig:pre,definePartsStyle:gre}=Jn(cee.keys),mre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},vre=gre({icon:mre}),yre=pre({baseStyle:vre}),{defineMultiStyleConfig:bre,definePartsStyle:Sre}=Jn(dee.keys),fl=Dn("menu-bg"),Rx=Dn("menu-shadow"),xre={[fl.variable]:"#fff",[Rx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Rx.reference},wre={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},Cre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},_re={opacity:.6},kre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Ere={transitionProperty:"common",transitionDuration:"normal"},Pre=Sre({button:Ere,list:xre,item:wre,groupTitle:Cre,command:_re,divider:kre}),Tre=bre({baseStyle:Pre}),{defineMultiStyleConfig:Lre,definePartsStyle:sC}=Jn(fee.keys),Are={bg:"blackAlpha.600",zIndex:"modal"},Mre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ire=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:bt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:bt("lg","dark-lg")(e)}},Ore={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Rre={position:"absolute",top:"2",insetEnd:"3"},Nre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Dre={px:"6",py:"4"},zre=sC(e=>({overlay:Are,dialogContainer:io(Mre,e),dialog:io(Ire,e),header:Ore,closeButton:Rre,body:io(Nre,e),footer:Dre}));function fs(e){return sC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Bre={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Fre=Lre({baseStyle:zre,sizes:Bre,defaultProps:{size:"md"}}),$re={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},XN=$re,{defineMultiStyleConfig:Hre,definePartsStyle:ZN}=Jn(hee.keys),i8=ni("number-input-stepper-width"),QN=ni("number-input-input-padding"),Wre=hu(i8).add("0.5rem").toString(),Nx=ni("number-input-bg"),Dx=ni("number-input-color"),zx=ni("number-input-border-color"),Vre={[i8.variable]:"sizes.6",[QN.variable]:Wre},Ure=e=>{var t;return((t=io(mn.baseStyle,e))==null?void 0:t.field)??{}},Gre={width:i8.reference},jre={borderStart:"1px solid",borderStartColor:zx.reference,color:Dx.reference,bg:Nx.reference,[Dx.variable]:"colors.chakra-body-text",[zx.variable]:"colors.chakra-border-color",_dark:{[Dx.variable]:"colors.whiteAlpha.800",[zx.variable]:"colors.whiteAlpha.300"},_active:{[Nx.variable]:"colors.gray.200",_dark:{[Nx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Yre=ZN(e=>({root:Vre,field:io(Ure,e)??{},stepperGroup:Gre,stepper:jre}));function My(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=XN.fontSizes[o];return ZN({field:{...r.field,paddingInlineEnd:QN.reference,verticalAlign:"top"},stepper:{fontSize:hu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var qre={xs:My("xs"),sm:My("sm"),md:My("md"),lg:My("lg")},Kre=Hre({baseStyle:Yre,sizes:qre,variants:mn.variants,defaultProps:mn.defaultProps}),fT,Xre={...(fT=mn.baseStyle)==null?void 0:fT.field,textAlign:"center"},Zre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},hT,Qre={outline:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((hT=mn.variants)==null?void 0:hT.unstyled.field)??{}},Jre={baseStyle:Xre,sizes:Zre,variants:Qre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:eie,definePartsStyle:tie}=Jn(pee.keys),Iy=ni("popper-bg"),nie=ni("popper-arrow-bg"),pT=ni("popper-arrow-shadow-color"),rie={zIndex:10},iie={[Iy.variable]:"colors.white",bg:Iy.reference,[nie.variable]:Iy.reference,[pT.variable]:"colors.gray.200",_dark:{[Iy.variable]:"colors.gray.700",[pT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},oie={px:3,py:2,borderBottomWidth:"1px"},aie={px:3,py:2},sie={px:3,py:2,borderTopWidth:"1px"},lie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},uie=tie({popper:rie,content:iie,header:oie,body:aie,footer:sie,closeButton:lie}),cie=eie({baseStyle:uie}),{defineMultiStyleConfig:die,definePartsStyle:um}=Jn(gee.keys),fie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=bt(aT(),aT("1rem","rgba(0,0,0,0.1)"))(e),a=bt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${to(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},hie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},pie=e=>({bg:bt("gray.100","whiteAlpha.300")(e)}),gie=e=>({transitionProperty:"common",transitionDuration:"slow",...fie(e)}),mie=um(e=>({label:hie,filledTrack:gie(e),track:pie(e)})),vie={xs:um({track:{h:"1"}}),sm:um({track:{h:"2"}}),md:um({track:{h:"3"}}),lg:um({track:{h:"4"}})},yie=die({sizes:vie,baseStyle:mie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:bie,definePartsStyle:F3}=Jn(mee.keys),Sie=e=>{var t;const n=(t=io(F5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},xie=F3(e=>{var t,n,r,i;return{label:(n=(t=F5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=F5).baseStyle)==null?void 0:i.call(r,e).container,control:Sie(e)}}),wie={md:F3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:F3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:F3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Cie=bie({baseStyle:xie,sizes:wie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:_ie,definePartsStyle:kie}=Jn(vee.keys),Oy=Dn("select-bg"),gT,Eie={...(gT=mn.baseStyle)==null?void 0:gT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Pie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Tie=kie({field:Eie,icon:Pie}),Ry={paddingInlineEnd:"8"},mT,vT,yT,bT,ST,xT,wT,CT,Lie={lg:{...(mT=mn.sizes)==null?void 0:mT.lg,field:{...(vT=mn.sizes)==null?void 0:vT.lg.field,...Ry}},md:{...(yT=mn.sizes)==null?void 0:yT.md,field:{...(bT=mn.sizes)==null?void 0:bT.md.field,...Ry}},sm:{...(ST=mn.sizes)==null?void 0:ST.sm,field:{...(xT=mn.sizes)==null?void 0:xT.sm.field,...Ry}},xs:{...(wT=mn.sizes)==null?void 0:wT.xs,field:{...(CT=mn.sizes)==null?void 0:CT.xs.field,...Ry},icon:{insetEnd:"1"}}},Aie=_ie({baseStyle:Tie,sizes:Lie,variants:mn.variants,defaultProps:mn.defaultProps}),Bx=Dn("skeleton-start-color"),Fx=Dn("skeleton-end-color"),Mie={[Bx.variable]:"colors.gray.100",[Fx.variable]:"colors.gray.400",_dark:{[Bx.variable]:"colors.gray.800",[Fx.variable]:"colors.gray.600"},background:Bx.reference,borderColor:Fx.reference,opacity:.7,borderRadius:"sm"},Iie={baseStyle:Mie},$x=Dn("skip-link-bg"),Oie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$x.variable]:"colors.white",_dark:{[$x.variable]:"colors.gray.700"},bg:$x.reference}},Rie={baseStyle:Oie},{defineMultiStyleConfig:Nie,definePartsStyle:ub}=Jn(yee.keys),wv=Dn("slider-thumb-size"),Cv=Dn("slider-track-size"),Bc=Dn("slider-bg"),Die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...t8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zie=e=>({...t8({orientation:e.orientation,horizontal:{h:Cv.reference},vertical:{w:Cv.reference}}),overflow:"hidden",borderRadius:"sm",[Bc.variable]:"colors.gray.200",_dark:{[Bc.variable]:"colors.whiteAlpha.200"},_disabled:{[Bc.variable]:"colors.gray.300",_dark:{[Bc.variable]:"colors.whiteAlpha.300"}},bg:Bc.reference}),Bie=e=>{const{orientation:t}=e;return{...t8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:wv.reference,h:wv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Fie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Bc.variable]:`colors.${t}.500`,_dark:{[Bc.variable]:`colors.${t}.200`},bg:Bc.reference}},$ie=ub(e=>({container:Die(e),track:zie(e),thumb:Bie(e),filledTrack:Fie(e)})),Hie=ub({container:{[wv.variable]:"sizes.4",[Cv.variable]:"sizes.1"}}),Wie=ub({container:{[wv.variable]:"sizes.3.5",[Cv.variable]:"sizes.1"}}),Vie=ub({container:{[wv.variable]:"sizes.2.5",[Cv.variable]:"sizes.0.5"}}),Uie={lg:Hie,md:Wie,sm:Vie},Gie=Nie({baseStyle:$ie,sizes:Uie,defaultProps:{size:"md",colorScheme:"blue"}}),If=ni("spinner-size"),jie={width:[If.reference],height:[If.reference]},Yie={xs:{[If.variable]:"sizes.3"},sm:{[If.variable]:"sizes.4"},md:{[If.variable]:"sizes.6"},lg:{[If.variable]:"sizes.8"},xl:{[If.variable]:"sizes.12"}},qie={baseStyle:jie,sizes:Yie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Kie,definePartsStyle:JN}=Jn(bee.keys),Xie={fontWeight:"medium"},Zie={opacity:.8,marginBottom:"2"},Qie={verticalAlign:"baseline",fontWeight:"semibold"},Jie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eoe=JN({container:{},label:Xie,helpText:Zie,number:Qie,icon:Jie}),toe={md:JN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},noe=Kie({baseStyle:eoe,sizes:toe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:roe,definePartsStyle:$3}=Jn(See.keys),zm=ni("switch-track-width"),Kf=ni("switch-track-height"),Hx=ni("switch-track-diff"),ioe=hu.subtract(zm,Kf),lC=ni("switch-thumb-x"),Wg=ni("switch-bg"),ooe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[zm.reference],height:[Kf.reference],transitionProperty:"common",transitionDuration:"fast",[Wg.variable]:"colors.gray.300",_dark:{[Wg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Wg.variable]:`colors.${t}.500`,_dark:{[Wg.variable]:`colors.${t}.200`}},bg:Wg.reference}},aoe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Kf.reference],height:[Kf.reference],_checked:{transform:`translateX(${lC.reference})`}},soe=$3(e=>({container:{[Hx.variable]:ioe,[lC.variable]:Hx.reference,_rtl:{[lC.variable]:hu(Hx).negate().toString()}},track:ooe(e),thumb:aoe})),loe={sm:$3({container:{[zm.variable]:"1.375rem",[Kf.variable]:"sizes.3"}}),md:$3({container:{[zm.variable]:"1.875rem",[Kf.variable]:"sizes.4"}}),lg:$3({container:{[zm.variable]:"2.875rem",[Kf.variable]:"sizes.6"}})},uoe=roe({baseStyle:soe,sizes:loe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:coe,definePartsStyle:w0}=Jn(xee.keys),doe=w0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),$5={"&[data-is-numeric=true]":{textAlign:"end"}},foe=w0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},caption:{color:bt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hoe=w0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...$5},caption:{color:bt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e)},td:{background:bt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),poe={simple:foe,striped:hoe,unstyled:{}},goe={sm:w0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:w0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:w0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},moe=coe({baseStyle:doe,variants:poe,sizes:goe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=Dn("tabs-color"),Ss=Dn("tabs-bg"),Ny=Dn("tabs-border-color"),{defineMultiStyleConfig:voe,definePartsStyle:kl}=Jn(wee.keys),yoe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},boe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Soe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},xoe={p:4},woe=kl(e=>({root:yoe(e),tab:boe(e),tablist:Soe(e),tabpanel:xoe})),Coe={sm:kl({tab:{py:1,px:4,fontSize:"sm"}}),md:kl({tab:{fontSize:"md",py:2,px:4}}),lg:kl({tab:{fontSize:"lg",py:3,px:4}})},_oe=kl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ss.variable]:"colors.gray.200",_dark:{[Ss.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:Ss.reference}}}),koe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Ny.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Ny.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Ny.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Ny.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Eoe=kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ss.variable]:"colors.gray.50",_dark:{[Ss.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ss.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[Ss.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:Ss.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Poe=kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Toe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[Ss.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[Ss.variable]:`colors.${t}.300`}},color:To.reference,bg:Ss.reference}}}),Loe=kl({}),Aoe={line:_oe,enclosed:koe,"enclosed-colored":Eoe,"soft-rounded":Poe,"solid-rounded":Toe,unstyled:Loe},Moe=voe({baseStyle:woe,sizes:Coe,variants:Aoe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ioe,definePartsStyle:Xf}=Jn(Cee.keys),Ooe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Roe={lineHeight:1.2,overflow:"visible"},Noe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Doe=Xf({container:Ooe,label:Roe,closeButton:Noe}),zoe={sm:Xf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Xf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Xf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Boe={subtle:Xf(e=>{var t;return{container:(t=Rm.variants)==null?void 0:t.subtle(e)}}),solid:Xf(e=>{var t;return{container:(t=Rm.variants)==null?void 0:t.solid(e)}}),outline:Xf(e=>{var t;return{container:(t=Rm.variants)==null?void 0:t.outline(e)}})},Foe=Ioe({variants:Boe,baseStyle:Doe,sizes:zoe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),_T,$oe={...(_T=mn.baseStyle)==null?void 0:_T.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},kT,Hoe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((kT=mn.variants)==null?void 0:kT.unstyled.field)??{}},ET,PT,TT,LT,Woe={xs:((ET=mn.sizes)==null?void 0:ET.xs.field)??{},sm:((PT=mn.sizes)==null?void 0:PT.sm.field)??{},md:((TT=mn.sizes)==null?void 0:TT.md.field)??{},lg:((LT=mn.sizes)==null?void 0:LT.lg.field)??{}},Voe={baseStyle:$oe,sizes:Woe,variants:Hoe,defaultProps:{size:"md",variant:"outline"}},Dy=ni("tooltip-bg"),Wx=ni("tooltip-fg"),Uoe=ni("popper-arrow-bg"),Goe={bg:Dy.reference,color:Wx.reference,[Dy.variable]:"colors.gray.700",[Wx.variable]:"colors.whiteAlpha.900",_dark:{[Dy.variable]:"colors.gray.300",[Wx.variable]:"colors.gray.900"},[Uoe.variable]:Dy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},joe={baseStyle:Goe},Yoe={Accordion:cte,Alert:yte,Avatar:Lte,Badge:Rm,Breadcrumb:Fte,Button:qte,Checkbox:F5,CloseButton:une,Code:hne,Container:gne,Divider:Sne,Drawer:Mne,Editable:Bne,Form:Une,FormError:Xne,FormLabel:Qne,Heading:tre,Input:mn,Kbd:dre,Link:hre,List:yre,Menu:Tre,Modal:Fre,NumberInput:Kre,PinInput:Jre,Popover:cie,Progress:yie,Radio:Cie,Select:Aie,Skeleton:Iie,SkipLink:Rie,Slider:Gie,Spinner:qie,Stat:noe,Switch:uoe,Table:moe,Tabs:Moe,Tag:Foe,Textarea:Voe,Tooltip:joe,Card:Jte},qoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Koe=qoe,Xoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Zoe=Xoe,Qoe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Joe=Qoe,eae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},tae=eae,nae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},rae=nae,iae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},oae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},sae={property:iae,easing:oae,duration:aae},lae=sae,uae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},cae=uae,dae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},fae=dae,hae={breakpoints:Zoe,zIndices:cae,radii:tae,blur:fae,colors:Joe,...XN,sizes:YN,shadows:rae,space:jN,borders:Koe,transition:lae},pae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},gae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},mae="ltr",vae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yae={semanticTokens:pae,direction:mae,...hae,components:Yoe,styles:gae,config:vae},bae=typeof Element<"u",Sae=typeof Map=="function",xae=typeof Set=="function",wae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function H3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!H3(e[r],t[r]))return!1;return!0}var o;if(Sae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!H3(r.value[1],t.get(r.value[0])))return!1;return!0}if(xae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(wae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(bae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!H3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Cae=function(t,n){try{return H3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function u1(){const e=C.exports.useContext(Sv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function eD(){const e=Kv(),t=u1();return{...e,theme:t}}function _ae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function kae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Eae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return _ae(o,l,a[u]??l);const h=`${e}.${l}`;return kae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Pae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>xQ(n),[n]);return J(AJ,{theme:i,children:[x(Tae,{root:t}),r]})}function Tae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(ab,{styles:n=>({[t]:n.__cssVars})})}jJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Lae(){const{colorMode:e}=Kv();return x(ab,{styles:t=>{const n=NN(t,"styles.global"),r=BN(n,{theme:t,colorMode:e});return r?fN(r)(t):void 0}})}var Aae=new Set([..._Q,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Mae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Iae(e){return Mae.has(e)||!Aae.has(e)}var Oae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=DN(a,(g,m)=>EQ(m)),l=BN(e,t),u=Object.assign({},i,l,zN(s),o),h=fN(u)(t.theme);return r?[h,r]:h};function Vx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Iae);const i=Oae({baseStyle:n}),o=rC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Kv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function ke(e){return C.exports.forwardRef(e)}function tD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=eD(),a=e?NN(i,`components.${e}`):void 0,s=n||a,l=Sl({theme:i,colorMode:o},s?.defaultProps??{},zN($J(r,["children"]))),u=C.exports.useRef({});if(s){const g=DQ(s)(l);Cae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return tD(e,t)}function Oi(e,t={}){return tD(e,t)}function Rae(){const e=new Map;return new Proxy(Vx,{apply(t,n,r){return Vx(...r)},get(t,n){return e.has(n)||e.set(n,Vx(n)),e.get(n)}})}var Se=Rae();function Nae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??Nae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Dae(n,t)})}}function zae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function AT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Bae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function MT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function IT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var uC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,H5=e=>e,Fae=class{descendants=new Map;register=e=>{if(e!=null)return Bae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=AT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=MT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=MT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=IT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=IT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=AT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $ae(){const e=C.exports.useRef(new Fae);return uC(()=>()=>e.current.destroy()),e.current}var[Hae,nD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Wae(e){const t=nD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);uC(()=>()=>{!i.current||t.unregister(i.current)},[]),uC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=H5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function rD(){return[H5(Hae),()=>H5(nD()),()=>$ae(),i=>Wae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),OT={path:J("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=ke((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??OT.viewBox;if(n&&typeof n!="string")return ae.createElement(Se.svg,{as:n,...m,...u});const b=a??OT.path;return ae.createElement(Se.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});va.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=ke((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function cb(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const o8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),db=C.exports.createContext({});function Vae(){return C.exports.useContext(db).visualElement}const c1=C.exports.createContext(null),gh=typeof document<"u",W5=gh?C.exports.useLayoutEffect:C.exports.useEffect,iD=C.exports.createContext({strict:!1});function Uae(e,t,n,r){const i=Vae(),o=C.exports.useContext(iD),a=C.exports.useContext(c1),s=C.exports.useContext(o8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return W5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),W5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Gae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function _v(e){return typeof e=="string"||Array.isArray(e)}function fb(e){return typeof e=="object"&&typeof e.start=="function"}const jae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function hb(e){return fb(e.animate)||jae.some(t=>_v(e[t]))}function oD(e){return Boolean(hb(e)||e.variants)}function Yae(e,t){if(hb(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_v(n)?n:void 0,animate:_v(r)?r:void 0}}return e.inherit!==!1?t:{}}function qae(e){const{initial:t,animate:n}=Yae(e,C.exports.useContext(db));return C.exports.useMemo(()=>({initial:t,animate:n}),[RT(t),RT(n)])}function RT(e){return Array.isArray(e)?e.join(" "):e}const lu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),kv={measureLayout:lu(["layout","layoutId","drag"]),animation:lu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:lu(["exit"]),drag:lu(["drag","dragControls"]),focus:lu(["whileFocus"]),hover:lu(["whileHover","onHoverStart","onHoverEnd"]),tap:lu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:lu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:lu(["whileInView","onViewportEnter","onViewportLeave"])};function Kae(e){for(const t in e)t==="projectionNodeConstructor"?kv.projectionNodeConstructor=e[t]:kv[t].Component=e[t]}function pb(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Xae=1;function Zae(){return pb(()=>{if(Bm.hasEverUpdated)return Xae++})}const a8=C.exports.createContext({});class Qae extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const aD=C.exports.createContext({}),Jae=Symbol.for("motionComponentSymbol");function ese({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Kae(e);function a(l,u){const h={...C.exports.useContext(o8),...l,layoutId:tse(l)},{isStatic:g}=h;let m=null;const v=qae(l),b=g?void 0:Zae(),w=i(l,g);if(!g&&gh){v.visualElement=Uae(o,w,h,t);const E=C.exports.useContext(iD).strict,P=C.exports.useContext(aD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||kv.projectionNodeConstructor,P))}return J(Qae,{visualElement:v.visualElement,props:h,children:[m,x(db.Provider,{value:v,children:r(o,l,b,Gae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Jae]=o,s}function tse({layoutId:e}){const t=C.exports.useContext(a8).id;return t&&e!==void 0?t+"-"+e:e}function nse(e){function t(r,i={}){return ese(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rse=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function s8(e){return typeof e!="string"||e.includes("-")?!1:!!(rse.indexOf(e)>-1||/[A-Z]/.test(e))}const V5={};function ise(e){Object.assign(V5,e)}const U5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],d1=new Set(U5);function sD(e,{layout:t,layoutId:n}){return d1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!V5[e]||e==="opacity")}const Ml=e=>!!e?.getVelocity,ose={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ase=(e,t)=>U5.indexOf(e)-U5.indexOf(t);function sse({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(ase);for(const s of t)a+=`${ose[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function lD(e){return e.startsWith("--")}const lse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,uD=(e,t)=>n=>Math.max(Math.min(n,t),e),Fm=e=>e%1?Number(e.toFixed(5)):e,Ev=/(-)?([\d]*\.?[\d])+/g,cC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,use=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Jv(e){return typeof e=="string"}const mh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$m=Object.assign(Object.assign({},mh),{transform:uD(0,1)}),zy=Object.assign(Object.assign({},mh),{default:1}),e2=e=>({test:t=>Jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ac=e2("deg"),El=e2("%"),wt=e2("px"),cse=e2("vh"),dse=e2("vw"),NT=Object.assign(Object.assign({},El),{parse:e=>El.parse(e)/100,transform:e=>El.transform(e*100)}),l8=(e,t)=>n=>Boolean(Jv(n)&&use.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),cD=(e,t,n)=>r=>{if(!Jv(r))return r;const[i,o,a,s]=r.match(Ev);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},$f={test:l8("hsl","hue"),parse:cD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+El.transform(Fm(t))+", "+El.transform(Fm(n))+", "+Fm($m.transform(r))+")"},fse=uD(0,255),Ux=Object.assign(Object.assign({},mh),{transform:e=>Math.round(fse(e))}),Uc={test:l8("rgb","red"),parse:cD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ux.transform(e)+", "+Ux.transform(t)+", "+Ux.transform(n)+", "+Fm($m.transform(r))+")"};function hse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const dC={test:l8("#"),parse:hse,transform:Uc.transform},Qi={test:e=>Uc.test(e)||dC.test(e)||$f.test(e),parse:e=>Uc.test(e)?Uc.parse(e):$f.test(e)?$f.parse(e):dC.parse(e),transform:e=>Jv(e)?e:e.hasOwnProperty("red")?Uc.transform(e):$f.transform(e)},dD="${c}",fD="${n}";function pse(e){var t,n,r,i;return isNaN(e)&&Jv(e)&&((n=(t=e.match(Ev))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(cC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function hD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(cC);r&&(n=r.length,e=e.replace(cC,dD),t.push(...r.map(Qi.parse)));const i=e.match(Ev);return i&&(e=e.replace(Ev,fD),t.push(...i.map(mh.parse))),{values:t,numColors:n,tokenised:e}}function pD(e){return hD(e).values}function gD(e){const{values:t,numColors:n,tokenised:r}=hD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mse(e){const t=pD(e);return gD(e)(t.map(gse))}const ku={test:pse,parse:pD,createTransformer:gD,getAnimatableNone:mse},vse=new Set(["brightness","contrast","saturate","opacity"]);function yse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ev)||[];if(!r)return e;const i=n.replace(r,"");let o=vse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bse=/([a-z-]*)\(.*?\)/g,fC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(bse);return t?t.map(yse).join(" "):e}}),DT={...mh,transform:Math.round},mD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Ac,rotateX:Ac,rotateY:Ac,rotateZ:Ac,scale:zy,scaleX:zy,scaleY:zy,scaleZ:zy,skew:Ac,skewX:Ac,skewY:Ac,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:$m,originX:NT,originY:NT,originZ:wt,zIndex:DT,fillOpacity:$m,strokeOpacity:$m,numOctaves:DT};function u8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(lD(m)){o[m]=v;continue}const b=mD[m],w=lse(v,b);if(d1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=sse(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const c8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function vD(e,t,n){for(const r in t)!Ml(t[r])&&!sD(r,n)&&(e[r]=t[r])}function Sse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=c8();return u8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function xse(e,t,n){const r=e.style||{},i={};return vD(i,r,e),Object.assign(i,Sse(e,t,n)),e.transformValues?e.transformValues(i):i}function wse(e,t,n){const r={},i=xse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Cse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_se=["whileTap","onTap","onTapStart","onTapCancel"],kse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Ese=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Ese,..._se,...Cse,...kse]);function G5(e){return Pse.has(e)}let yD=e=>!G5(e);function Tse(e){!e||(yD=t=>t.startsWith("on")?!G5(t):e(t))}try{Tse(require("@emotion/is-prop-valid").default)}catch{}function Lse(e,t,n){const r={};for(const i in e)(yD(i)||n===!0&&G5(i)||!t&&!G5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function zT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Ase(e,t,n){const r=zT(t,e.x,e.width),i=zT(n,e.y,e.height);return`${r} ${i}`}const Mse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ise={offset:"strokeDashoffset",array:"strokeDasharray"};function Ose(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Mse:Ise;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function d8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){u8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ase(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Ose(g,o,a,s,!1)}const bD=()=>({...c8(),attrs:{}});function Rse(e,t){const n=C.exports.useMemo(()=>{const r=bD();return d8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};vD(r,e.style,e),n.style={...r,...n.style}}return n}function Nse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(s8(n)?Rse:wse)(r,a,s),g={...Lse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const SD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function xD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const wD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function CD(e,t,n,r){xD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(wD.has(i)?i:SD(i),t.attrs[i])}function f8(e){const{style:t}=e,n={};for(const r in t)(Ml(t[r])||sD(r,e))&&(n[r]=t[r]);return n}function _D(e){const t=f8(e);for(const n in e)if(Ml(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function h8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Pv=e=>Array.isArray(e),Dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),kD=e=>Pv(e)?e[e.length-1]||0:e;function W3(e){const t=Ml(e)?e.get():e;return Dse(t)?t.toValue():t}function zse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const ED=e=>(t,n)=>{const r=C.exports.useContext(db),i=C.exports.useContext(c1),o=()=>zse(e,t,r,i);return n?o():pb(o)};function Bse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=W3(o[m]);let{initial:a,animate:s}=e;const l=hb(e),u=oD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!fb(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=h8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Fse={useVisualState:ED({scrapeMotionValuesFromProps:_D,createRenderState:bD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}d8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),CD(t,n)}})},$se={useVisualState:ED({scrapeMotionValuesFromProps:f8,createRenderState:c8})};function Hse(e,{forwardMotionProps:t=!1},n,r,i){return{...s8(e)?Fse:$se,preloadedFeatures:n,useRender:Nse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function gb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return gb(i,t,n,r)},[e,t,n,r])}function Wse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};hC(t,"focus",e?r:void 0),hC(t,"blur",e?i:void 0)}function PD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function TD(e){return!!e.touches}function Vse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Use={pageX:0,pageY:0};function Gse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Use;return{x:r[t+"X"],y:r[t+"Y"]}}function jse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function p8(e,t="page"){return{point:TD(e)?Gse(e,t):jse(e,t)}}const LD=(e,t=!1)=>{const n=r=>e(r,p8(r));return t?Vse(n):n},Yse=()=>gh&&window.onpointerdown===null,qse=()=>gh&&window.ontouchstart===null,Kse=()=>gh&&window.onmousedown===null,Xse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Zse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function AD(e){return Yse()?e:qse()?Zse[e]:Kse()?Xse[e]:e}function C0(e,t,n,r){return gb(e,AD(t),LD(n,t==="pointerdown"),r)}function j5(e,t,n,r){return hC(e,AD(t),n&&LD(n,t==="pointerdown"),r)}function MD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const BT=MD("dragHorizontal"),FT=MD("dragVertical");function ID(e){let t=!1;if(e==="y")t=FT();else if(e==="x")t=BT();else{const n=BT(),r=FT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function OD(){const e=ID(!0);return e?(e(),!1):!0}function $T(e,t,n){return(r,i)=>{!PD(r)||OD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function Qse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){j5(r,"pointerenter",e||n?$T(r,!0,e):void 0,{passive:!e}),j5(r,"pointerleave",t||n?$T(r,!1,t):void 0,{passive:!t})}const RD=(e,t)=>t?e===t?!0:RD(e,t.parentElement):!1;function g8(e){return C.exports.useEffect(()=>()=>e(),[])}function ND(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Gx=.001,ele=.01,HT=10,tle=.05,nle=1;function rle({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jse(e<=HT*1e3);let a=1-t;a=q5(tle,nle,a),e=q5(ele,HT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=pC(u,a),b=Math.exp(-g);return Gx-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=pC(Math.pow(u,2),a);return(-i(u)+Gx>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Gx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ole(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ile=12;function ole(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!WT(e,sle)&&WT(e,ale)){const n=rle(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function m8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=ND(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lle(o),v=VT,b=VT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=pC(T,k);v=O=>{const R=Math.exp(-k*T*O);return n-R*((E+k*T*P)/M*Math.sin(M*O)+P*Math.cos(M*O))},b=O=>{const R=Math.exp(-k*T*O);return k*T*R*(Math.sin(M*O)*(E+k*T*P)/M+P*Math.cos(M*O))-R*(Math.cos(M*O)*(E+k*T*P)-M*P*Math.sin(M*O))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*T*O),N=Math.min(M*O,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}m8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const VT=e=>0,Tv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function jx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=jx(l,s,e+1/3),o=jx(l,s,e),a=jx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const ule=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cle=[dC,Uc,$f],GT=e=>cle.find(t=>t.test(e)),DD=(e,t)=>{let n=GT(e),r=GT(t),i=n.parse(e),o=r.parse(t);n===$f&&(i=UT(i),n=Uc),r===$f&&(o=UT(o),r=Uc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=ule(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},gC=e=>typeof e=="number",dle=(e,t)=>n=>t(e(n)),mb=(...e)=>e.reduce(dle);function zD(e,t){return gC(e)?n=>Cr(e,t,n):Qi.test(e)?DD(e,t):FD(e,t)}const BD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>zD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function jT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=jT(e),i=jT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?mb(BD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hle=(e,t)=>n=>Cr(e,t,n);function ple(e){if(typeof e=="number")return hle;if(typeof e=="string")return Qi.test(e)?DD:FD;if(Array.isArray(e))return BD;if(typeof e=="object")return fle}function gle(e,t,n){const r=[],i=n||ple(e[0]),o=e.length-1;for(let a=0;an(Tv(e,t,r))}function vle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Tv(e[o],e[o+1],i);return t[o](s)}}function $D(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;Y5(o===t.length),Y5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=gle(t,r,i),s=o===2?mle(e,a):vle(e,a);return n?l=>s(q5(e[0],e[o-1],l)):s}const vb=e=>t=>1-e(1-t),v8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yle=e=>t=>Math.pow(t,e),HD=e=>t=>t*t*((e+1)*t-e),ble=e=>{const t=HD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},WD=1.525,Sle=4/11,xle=8/11,wle=9/10,y8=e=>e,b8=yle(2),Cle=vb(b8),VD=v8(b8),UD=e=>1-Math.sin(Math.acos(e)),S8=vb(UD),_le=v8(S8),x8=HD(WD),kle=vb(x8),Ele=v8(x8),Ple=ble(WD),Tle=4356/361,Lle=35442/1805,Ale=16061/1805,K5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-K5(1-e*2)):.5*K5(e*2-1)+.5;function Ole(e,t){return e.map(()=>t||VD).splice(0,e.length-1)}function Rle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nle(e,t){return e.map(n=>n*t)}function V3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Nle(r&&r.length===a.length?r:Rle(a),i);function l(){return $D(s,a,{ease:Array.isArray(n)?n:Ole(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const YT={keyframes:V3,spring:m8,decay:Dle};function zle(e){if(Array.isArray(e.to))return V3;if(YT[e.type])return YT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?V3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?m8:V3}const GD=1/60*1e3,Ble=typeof performance<"u"?()=>performance.now():()=>Date.now(),jD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ble()),GD);function Fle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Fle(()=>Lv=!0),e),{}),Hle=t2.reduce((e,t)=>{const n=yb[t];return e[t]=(r,i=!1,o=!1)=>(Lv||Ule(),n.schedule(r,i,o)),e},{}),Wle=t2.reduce((e,t)=>(e[t]=yb[t].cancel,e),{});t2.reduce((e,t)=>(e[t]=()=>yb[t].process(_0),e),{});const Vle=e=>yb[e].process(_0),YD=e=>{Lv=!1,_0.delta=mC?GD:Math.max(Math.min(e-_0.timestamp,$le),1),_0.timestamp=e,vC=!0,t2.forEach(Vle),vC=!1,Lv&&(mC=!1,jD(YD))},Ule=()=>{Lv=!0,mC=!0,vC||jD(YD)},Gle=()=>_0;function qD(e,t,n=0){return e-t-n}function jle(e,t,n=0,r=!0){return r?qD(t+-e,t,n):t-(e-t)+n}function Yle(e,t,n,r){return r?e>=t+n:e<=-n}const qle=e=>{const t=({delta:n})=>e(n);return{start:()=>Hle.update(t,!0),stop:()=>Wle.update(t)}};function KD(e){var t,n,{from:r,autoplay:i=!0,driver:o=qle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=ND(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,O=!1,R=!0,N;const z=zle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=$D([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(R=k%2===0,a=jle(a,T,u,R)):(a=qD(a,T,u),l==="mirror"&&V.flipTarget()),O=!1,v&&v()}function j(){P.stop(),m&&m()}function ue(Q){if(R||(Q=-Q),a+=Q,!O){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),O=R?ne.done:a<=0}b?.(M),O&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function XD(e,t){return t?e*(1e3/t):0}function Kle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(M),(O=T.onUpdate)===null||O===void 0||O.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),O=M===n?-1:1;let R,N;const z=V=>{R=N,N=V,t=XD(V-R,Gle().delta),(O===1&&V>M||O===-1&&Vb?.stop()}}const yC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),qT=e=>yC(e)&&e.hasOwnProperty("z"),By=(e,t)=>Math.abs(e-t);function w8(e,t){if(gC(e)&&gC(t))return By(e,t);if(yC(e)&&yC(t)){const n=By(e.x,t.x),r=By(e.y,t.y),i=qT(e)&&qT(t)?By(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ZD=(e,t)=>1-3*t+3*e,QD=(e,t)=>3*t-6*e,JD=e=>3*e,X5=(e,t,n)=>((ZD(t,n)*e+QD(t,n))*e+JD(t))*e,ez=(e,t,n)=>3*ZD(t,n)*e*e+2*QD(t,n)*e+JD(t),Xle=1e-7,Zle=10;function Qle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=X5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Xle&&++s=eue?tue(a,g,e,n):m===0?g:Qle(a,s,s+Fy,e,n)}return a=>a===0||a===1?a:X5(o(a),t,r)}function rue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!OD()}function g(b,w){!h()||(RD(i.current,b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=mb(C0(window,"pointerup",g,l),C0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(b,w))}j5(i,"pointerdown",o?v:void 0,l),g8(u)}const iue="production",tz=typeof process>"u"||process.env===void 0?iue:"production",KT=new Set;function nz(e,t,n){e||KT.has(t)||(console.warn(t),n&&console.warn(n),KT.add(t))}const bC=new WeakMap,Yx=new WeakMap,oue=e=>{const t=bC.get(e.target);t&&t(e)},aue=e=>{e.forEach(oue)};function sue({root:e,...t}){const n=e||document;Yx.has(n)||Yx.set(n,{});const r=Yx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(aue,{root:e,...t})),r[i]}function lue(e,t,n){const r=sue(t);return bC.set(e,n),r.observe(e),()=>{bC.delete(e),r.unobserve(e)}}function uue({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?fue:due)(a,o.current,e,i)}const cue={some:0,all:1};function due(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:cue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lue(n.current,s,l)},[e,r,i,o])}function fue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(tz!=="production"&&nz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Gc=e=>t=>(e(t),null),hue={inView:Gc(uue),tap:Gc(rue),focus:Gc(Wse),hover:Gc(Qse)};function C8(){const e=C.exports.useContext(c1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function pue(){return gue(C.exports.useContext(c1))}function gue(e){return e===null?!0:e.isPresent}function rz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mue={linear:y8,easeIn:b8,easeInOut:VD,easeOut:Cle,circIn:UD,circInOut:_le,circOut:S8,backIn:x8,backInOut:Ele,backOut:kle,anticipate:Ple,bounceIn:Mle,bounceInOut:Ile,bounceOut:K5},XT=e=>{if(Array.isArray(e)){Y5(e.length===4);const[t,n,r,i]=e;return nue(t,n,r,i)}else if(typeof e=="string")return mue[e];return e},vue=e=>Array.isArray(e)&&typeof e[0]!="number",ZT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),bf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),$y=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qx=()=>({type:"keyframes",ease:"linear",duration:.3}),yue=e=>({type:"keyframes",duration:.8,values:e}),QT={x:bf,y:bf,z:bf,rotate:bf,rotateX:bf,rotateY:bf,rotateZ:bf,scaleX:$y,scaleY:$y,scale:$y,opacity:qx,backgroundColor:qx,color:qx,default:$y},bue=(e,t)=>{let n;return Pv(t)?n=yue:n=QT[e]||QT.default,{to:t,...n(t)}},Sue={...mD,color:Qi,backgroundColor:Qi,outlineColor:Qi,fill:Qi,stroke:Qi,borderColor:Qi,borderTopColor:Qi,borderRightColor:Qi,borderBottomColor:Qi,borderLeftColor:Qi,filter:fC,WebkitFilter:fC},_8=e=>Sue[e];function k8(e,t){var n;let r=_8(e);return r!==fC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const xue={current:!1},iz=1/60*1e3,wue=typeof performance<"u"?()=>performance.now():()=>Date.now(),oz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wue()),iz);function Cue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Cue(()=>Av=!0),e),{}),Ps=n2.reduce((e,t)=>{const n=bb[t];return e[t]=(r,i=!1,o=!1)=>(Av||Eue(),n.schedule(r,i,o)),e},{}),sh=n2.reduce((e,t)=>(e[t]=bb[t].cancel,e),{}),Kx=n2.reduce((e,t)=>(e[t]=()=>bb[t].process(k0),e),{}),kue=e=>bb[e].process(k0),az=e=>{Av=!1,k0.delta=SC?iz:Math.max(Math.min(e-k0.timestamp,_ue),1),k0.timestamp=e,xC=!0,n2.forEach(kue),xC=!1,Av&&(SC=!1,oz(az))},Eue=()=>{Av=!0,SC=!0,xC||oz(az)},wC=()=>k0;function sz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(sh.read(r),e(o-t))};return Ps.read(r,!0),()=>sh.read(r)}function Pue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Tue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Z5(o.duration)),o.repeatDelay&&(a.repeatDelay=Z5(o.repeatDelay)),e&&(a.ease=vue(e)?e.map(XT):XT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Lue(e,t){var n,r;return(r=(n=(E8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Aue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Mue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Aue(t),Pue(e)||(e={...e,...bue(n,t.to)}),{...t,...Tue(e)}}function Iue(e,t,n,r,i){const o=E8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=ZT(e,n);a==="none"&&s&&typeof n=="string"?a=k8(e,n):JT(a)&&typeof n=="string"?a=eL(n):!Array.isArray(n)&&JT(n)&&typeof a=="string"&&(n=eL(a));const l=ZT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Kle({...g,...o}):KD({...Mue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=kD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function JT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function eL(e){return typeof e=="number"?0:k8("",e)}function E8(e,t){return e[t]||e.default||e}function P8(e,t,n,r={}){return xue.current&&(r={type:!1}),t.start(i=>{let o;const a=Iue(e,t,n,r,i),s=Lue(r,e),l=()=>o=a();let u;return s?u=sz(l,Z5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Oue=e=>/^\-?\d*\.?\d+$/.test(e),Rue=e=>/^0[^.\s]+$/.test(e);function T8(e,t){e.indexOf(t)===-1&&e.push(t)}function L8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Hm{constructor(){this.subscriptions=[]}add(t){return T8(this.subscriptions,t),()=>L8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Due{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Hm,this.velocityUpdateSubscribers=new Hm,this.renderSubscribers=new Hm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=wC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ps.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Ps.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?XD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function j0(e){return new Due(e)}const lz=e=>t=>t.test(e),zue={test:e=>e==="auto",parse:e=>e},uz=[mh,wt,El,Ac,dse,cse,zue],Vg=e=>uz.find(lz(e)),Bue=[...uz,Qi,ku],Fue=e=>Bue.find(lz(e));function $ue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Hue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Sb(e,t,n){const r=e.getProps();return h8(r,t,n!==void 0?n:r.custom,$ue(e),Hue(e))}function Wue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,j0(n))}function Vue(e,t){const n=Sb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=kD(o[a]);Wue(e,a,s)}}function Uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;sCC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=CC(e,t,n);else{const i=typeof t=="function"?Sb(e,t,n.custom):t;r=cz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function CC(e,t,n={}){var r;const i=Sb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>cz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return que(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function cz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||g&&Xue(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&d1.has(m)&&(w={...w,type:!1,delay:0});let E=P8(m,v,b,w);Q5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vue(e,s)})}function que(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Kue).forEach((u,h)=>{a.push(CC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Kue(e,t){return e.sortNodePosition(t)}function Xue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const A8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Zue=[...A8].reverse(),Que=A8.length;function Jue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Yue(e,n,r)))}function ece(e){let t=Jue(e);const n=nce();let r=!0;const i=(l,u)=>{const h=Sb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const j=Array.isArray(O)?O:[O];let ue=j.reduce(i,{});N===!1&&(ue={});const{prevResolvedValues:W={}}=M,Q={...W,...ue},ne=ee=>{$=!0,b.delete(ee),M.needsAnimating[ee]=!0};for(const ee in Q){const K=ue[ee],G=W[ee];w.hasOwnProperty(ee)||(K!==G?Pv(K)&&Pv(G)?!rz(K,G)||V?ne(ee):M.protectedKeys[ee]=!0:K!==void 0?ne(ee):b.add(ee):K!==void 0&&b.has(ee)?ne(ee):M.protectedKeys[ee]=!0)}M.prevProp=O,M.prevResolvedValues=ue,M.isActive&&(w={...w,...ue}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(ee=>({animation:ee,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function tce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rz(t,e):!1}function Sf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nce(){return{[Yn.Animate]:Sf(!0),[Yn.InView]:Sf(),[Yn.Hover]:Sf(),[Yn.Tap]:Sf(),[Yn.Drag]:Sf(),[Yn.Focus]:Sf(),[Yn.Exit]:Sf()}}const rce={animation:Gc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=ece(e)),fb(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Gc(e=>{const{custom:t,visualElement:n}=e,[r,i]=C8(),o=C.exports.useContext(c1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class dz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=w8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=wC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Xx(h,this.transformPagePoint),PD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Ps.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Zx(Xx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},TD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=p8(t),o=Xx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=wC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Zx(o,this.history)),this.removeListeners=mb(C0(window,"pointermove",this.handlePointerMove),C0(window,"pointerup",this.handlePointerUp),C0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),sh.update(this.updatePoint)}}function Xx(e,t){return t?{point:t(e.point)}:e}function tL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx({point:e},t){return{point:e,delta:tL(e,fz(t)),offset:tL(e,ice(t)),velocity:oce(t,.1)}}function ice(e){return e[0]}function fz(e){return e[e.length-1]}function oce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=fz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Z5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fa(e){return e.max-e.min}function nL(e,t=0,n=.01){return w8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function aL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lce(e,{top:t,left:n,bottom:r,right:i}){return{x:aL(e.x,n,i),y:aL(e.y,t,r)}}function sL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Tv(t.min,t.max-r,e.min):r>i&&(n=Tv(e.min,e.max-i,t.min)),q5(0,1,n)}function dce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _C=.35;function fce(e=_C){return e===!1?e=0:e===!0&&(e=_C),{x:lL(e,"left","right"),y:lL(e,"top","bottom")}}function lL(e,t,n){return{min:uL(e,t),max:uL(e,n)}}function uL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const cL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Um=()=>({x:cL(),y:cL()}),dL=()=>({min:0,max:0}),Zr=()=>({x:dL(),y:dL()});function cl(e){return[e("x"),e("y")]}function hz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qx(e){return e===void 0||e===1}function kC({scale:e,scaleX:t,scaleY:n}){return!Qx(e)||!Qx(t)||!Qx(n)}function Ef(e){return kC(e)||pz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function pz(e){return fL(e.x)||fL(e.y)}function fL(e){return e&&e!=="0%"}function J5(e,t,n){const r=e-n,i=t*r;return n+i}function hL(e,t,n,r,i){return i!==void 0&&(e=J5(e,i,r)),J5(e,n,r)+t}function EC(e,t=0,n=1,r,i){e.min=hL(e.min,t,n,r,i),e.max=hL(e.max,t,n,r,i)}function gz(e,{x:t,y:n}){EC(e.x,t.translate,t.scale,t.originPoint),EC(e.y,n.translate,n.scale,n.originPoint)}function gce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(p8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ID(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(El.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=fa(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=xce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new dz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Hy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lce(r.layoutBox,t):this.constraints=!1,this.elastic=fce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=dce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yce(r,i.root,this.visualElement.getTransformPagePoint());let a=uce(i.layout.layoutBox,o);if(n){const s=n(hce(a));this.hasMutatedConstraints=!!s,s&&(a=hz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Hy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return P8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Hy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Hy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;bce.set(this.visualElement,this);const n=this.visualElement.current,r=C0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=gb(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=_C,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Hy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wce(e){const{dragControls:t,visualElement:n}=e,r=pb(()=>new Sce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(o8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new dz(h,l,{transformPagePoint:s})}j5(i,"pointerdown",o&&u),g8(()=>a.current&&a.current.end())}const _ce={pan:Gc(Cce),drag:Gc(wce)};function PC(e){return typeof e=="string"&&e.startsWith("var(--")}const vz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function kce(e){const t=vz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function TC(e,t,n=1){const[r,i]=kce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():PC(i)?TC(i,t,n+1):i}function Ece(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!PC(o))return;const a=TC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!PC(o))continue;const a=TC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Pce=new Set(["width","height","top","left","right","bottom","x","y"]),yz=e=>Pce.has(e),Tce=e=>Object.keys(e).some(yz),bz=(e,t)=>{e.set(t,!1),e.set(t)},gL=e=>e===mh||e===wt;var mL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(mL||(mL={}));const vL=(e,t)=>parseFloat(e.split(", ")[t]),yL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return vL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?vL(o[1],e):0}},Lce=new Set(["x","y","z"]),Ace=U5.filter(e=>!Lce.has(e));function Mce(e){const t=[];return Ace.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const bL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:yL(4,13),y:yL(5,14)},Ice=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=bL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);bz(h,s[u]),e[u]=bL[u](l,o)}),e},Oce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(yz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Vg(h);const m=t[l];let v;if(Pv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Vg(h);for(let E=w;E=0?window.pageYOffset:null,u=Ice(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),gh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Rce(e,t,n,r){return Tce(t)?Oce(e,t,n,r):{target:t,transitionEnd:r}}const Nce=(e,t,n,r)=>{const i=Ece(e,t,r);return t=i.target,r=i.transitionEnd,Rce(e,t,n,r)},LC={current:null},Sz={current:!1};function Dce(){if(Sz.current=!0,!!gh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>LC.current=e.matches;e.addListener(t),t()}else LC.current=!1}function zce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ml(o))e.addValue(i,o),Q5(r)&&r.add(i);else if(Ml(a))e.addValue(i,j0(o)),Q5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,j0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const xz=Object.keys(kv),Bce=xz.length,SL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Fce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ps.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=hb(n),this.isVariantNode=oD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Ml(g)&&(g.set(a[h],!1),Q5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),Sz.current||Dce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:LC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),sh.update(this.notifyUpdate),sh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=d1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ps.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=j0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=h8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ml(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Hm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const wz=["initial",...A8],$ce=wz.length;class Cz extends Fce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=jue(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Uue(this,r,a);const s=Nce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Hce(e){return window.getComputedStyle(e)}class Wce extends Cz{readValueFromInstance(t,n){if(d1.has(n)){const r=_8(n);return r&&r.default||0}else{const r=Hce(t),i=(lD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mz(t,n)}build(t,n,r,i){u8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return f8(t)}renderInstance(t,n,r,i){xD(t,n,r,i)}}class Vce extends Cz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return d1.has(n)?((r=_8(n))===null||r===void 0?void 0:r.default)||0:(n=wD.has(n)?n:SD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return _D(t)}build(t,n,r,i){d8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){CD(t,n,r,i)}}const Uce=(e,t)=>s8(e)?new Vce(t,{enableHardwareAcceleration:!1}):new Wce(t,{enableHardwareAcceleration:!0});function xL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ug={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=xL(e,t.target.x),r=xL(e,t.target.y);return`${n}% ${r}%`}},wL="_$css",Gce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(vz,v=>(o.push(v),wL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(wL,()=>{const b=o[v];return v++,b})}return m}};class jce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ise(qce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ps.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Yce(e){const[t,n]=C8(),r=C.exports.useContext(a8);return x(jce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(aD),isPresent:t,safeToRemove:n})}const qce={borderRadius:{...Ug,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ug,borderTopRightRadius:Ug,borderBottomLeftRadius:Ug,borderBottomRightRadius:Ug,boxShadow:Gce},Kce={measureLayout:Yce};function Xce(e,t,n={}){const r=Ml(e)?e:j0(e);return P8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const _z=["TopLeft","TopRight","BottomLeft","BottomRight"],Zce=_z.length,CL=e=>typeof e=="string"?parseFloat(e):e,_L=e=>typeof e=="number"||wt.test(e);function Qce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jce(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,ede(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Tv(e,t,r))}function EL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){EL(e.x,t.x),EL(e.y,t.y)}function PL(e,t,n,r,i){return e-=t,e=J5(e,1/n,r),i!==void 0&&(e=J5(e,1/i,r)),e}function tde(e,t=0,n=1,r=.5,i,o=e,a=e){if(El.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=PL(e.min,t,n,s,i),e.max=PL(e.max,t,n,s,i)}function TL(e,t,[n,r,i],o,a){tde(e,t[n],t[r],t[i],t.scale,o,a)}const nde=["x","scaleX","originX"],rde=["y","scaleY","originY"];function LL(e,t,n,r){TL(e.x,t,nde,n?.x,r?.x),TL(e.y,t,rde,n?.y,r?.y)}function AL(e){return e.translate===0&&e.scale===1}function Ez(e){return AL(e.x)&&AL(e.y)}function Pz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ML(e){return fa(e.x)/fa(e.y)}function ide(e,t,n=.1){return w8(e,t)<=n}class ode{constructor(){this.members=[]}add(t){T8(this.members,t),t.scheduleRender()}remove(t){if(L8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function IL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const ade=(e,t)=>e.depth-t.depth;class sde{constructor(){this.children=[],this.isDirty=!1}add(t){T8(this.children,t),this.isDirty=!0}remove(t){L8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ade),this.isDirty=!1,this.children.forEach(t)}}const OL=["","X","Y","Z"],RL=1e3;let lde=0;function Tz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=lde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(hde),this.nodes.forEach(pde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=sz(v,250),Bm.hasAnimatedSinceResize&&(Bm.hasAnimatedSinceResize=!1,this.nodes.forEach(DL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:bde,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Pz(this.targetLayout,w)||b,V=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...E8(O,"layout"),onPlay:R,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&DL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,sh.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(gde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;zL(v.x,a.x,M),zL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Vm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vde(this.relativeTarget,this.relativeTargetOrigin,b,M)),w&&(this.animationValues=m,Qce(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(sh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ps.update(()=>{Bm.hasAnimatedSinceResize=!0,this.currentAnimation=Xce(0,RL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,RL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Lz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=fa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=fa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Wm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new ode),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(NL),this.root.sharedNodes.clear()}}}function ude(e){e.updateLayout()}function cde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(b);b.min=o[v].min,b.max=b.min+w}):Lz(s,i.layoutBox,o)&&cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(o[v]);b.max=b.min+w});const u=Um();Wm(u,o,i.layoutBox);const h=Um();l?Wm(h,e.applyTransform(a,!0),i.measuredBox):Wm(h,o,i.layoutBox);const g=!Ez(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:w}=v;if(b&&w){const E=Zr();Vm(E,i.layoutBox,b.layoutBox);const P=Zr();Vm(P,o,w.layoutBox),Pz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dde(e){e.clearSnapshot()}function NL(e){e.clearMeasurements()}function fde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hde(e){e.resolveTargetDelta()}function pde(e){e.calcProjection()}function gde(e){e.resetRotation()}function mde(e){e.removeLeadSnapshot()}function zL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function BL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function vde(e,t,n,r){BL(e.x,t.x,n.x,r),BL(e.y,t.y,n.y,r)}function yde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bde={duration:.45,ease:[.4,0,.1,1]};function Sde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function FL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function xde(e){FL(e.x),FL(e.y)}function Lz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ide(ML(t),ML(n),.2)}const wde=Tz({attachResizeListener:(e,t)=>gb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jx={current:void 0},Cde=Tz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jx.current){const e=new wde(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Jx.current=e}return Jx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),_de={...rce,...hue,..._ce,...Kce},zl=nse((e,t)=>Hse(e,t,_de,Uce,Cde));function Az(){const e=C.exports.useRef(!1);return W5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function kde(){const e=Az(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Ps.postRender(r),[r]),t]}class Ede extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Pde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(Ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const ew=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=pb(Tde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Pde,{isPresent:n,children:e})),x(c1.Provider,{value:u,children:e})};function Tde(){return new Map}const $p=e=>e.key||"";function Lde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ade(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const xd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",nz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=kde();const l=C.exports.useContext(a8).forceRender;l&&(s=l);const u=Az(),h=Ade(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(W5(()=>{w.current=!1,Lde(h,b),v.current=g}),g8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(ew,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=b.get(T);if(!M)return;const O=E.indexOf(T),R=()=>{b.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(ew,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(ew,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),tz!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var vl=function(){return vl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function AC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Mde(){return!1}var Ide=e=>{const{condition:t,message:n}=e;t&&Mde()&&console.warn(n)},Hf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Gg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function MC(e){switch(e?.direction??"right"){case"right":return Gg.slideRight;case"left":return Gg.slideLeft;case"bottom":return Gg.slideDown;case"top":return Gg.slideUp;default:return Gg.slideRight}}var Zf={enter:{duration:.2,ease:Hf.easeOut},exit:{duration:.1,ease:Hf.easeIn}},Ts={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Ode=e=>e!=null&&parseInt(e.toString(),10)>0,HL={exit:{height:{duration:.2,ease:Hf.ease},opacity:{duration:.3,ease:Hf.ease}},enter:{height:{duration:.3,ease:Hf.ease},opacity:{duration:.4,ease:Hf.ease}}},Rde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Ode(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ts.exit(HL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ts.enter(HL.enter,i)})},Iz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ide({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(xd,{initial:!1,custom:w,children:E&&ae.createElement(zl.div,{ref:t,...g,className:r2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Rde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Iz.displayName="Collapse";var Nde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ts.enter(Zf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ts.exit(Zf.exit,n),transitionEnd:t?.exit})},Oz={initial:"exit",animate:"enter",exit:"exit",variants:Nde},Dde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(xd,{custom:m,children:g&&ae.createElement(zl.div,{ref:n,className:r2("chakra-fade",o),custom:m,...Oz,animate:h,...u})})});Dde.displayName="Fade";var zde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ts.exit(Zf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ts.enter(Zf.enter,n),transitionEnd:e?.enter})},Rz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(xd,{custom:b,children:m&&ae.createElement(zl.div,{ref:n,className:r2("chakra-offset-slide",s),...Rz,animate:v,custom:b,...g})})});Bde.displayName="ScaleFade";var WL={exit:{duration:.15,ease:Hf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Fde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=MC({direction:e});return{...i,transition:t?.exit??Ts.exit(WL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=MC({direction:e});return{...i,transition:n?.enter??Ts.enter(WL.enter,r),transitionEnd:t?.enter}}},Nz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=MC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(xd,{custom:P,children:w&&ae.createElement(zl.div,{...m,ref:n,initial:"exit",className:r2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Fde,style:b,...g})})});Nz.displayName="Slide";var $de={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ts.exit(Zf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ts.enter(Zf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ts.exit(Zf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},IC={initial:"initial",animate:"enter",exit:"exit",variants:$de},Hde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(xd,{custom:w,children:v&&ae.createElement(zl.div,{ref:n,className:r2("chakra-offset-slide",a),custom:w,...IC,animate:b,...m})})});Hde.displayName="SlideFade";var i2=(...e)=>e.filter(Boolean).join(" ");function Wde(){return!1}var xb=e=>{const{condition:t,message:n}=e;t&&Wde()&&console.warn(n)};function tw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Vde,wb]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Ude,M8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Gde,bTe,jde,Yde]=rD(),Wf=ke(function(t,n){const{getButtonProps:r}=M8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...wb().button};return ae.createElement(Se.button,{...i,className:i2("chakra-accordion__button",t.className),__css:a})});Wf.displayName="AccordionButton";function qde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zde(e),Qde(e);const s=jde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=cb({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Kde,I8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Xde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=I8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Jde(e);const{register:m,index:v,descendants:b}=Yde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);efe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=b.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=b.prevEnabled(v);j?.node.focus()},Home:()=>{const j=b.firstEnabled();j?.node.focus()},End:()=>{const j=b.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:tw(V.onClick,T),onFocus:tw(V.onFocus,O),onKeyDown:tw(V.onKeyDown,M)}},[h,t,w,T,O,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function Zde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;xb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Qde(e){xb({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Jde(e){xb({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function efe(e){xb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Vf(e){const{isOpen:t,isDisabled:n}=M8(),{reduceMotion:r}=I8(),i=i2("chakra-accordion__icon",e.className),o=wb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Vf.displayName="AccordionIcon";var Uf=ke(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Xde(t),l={...wb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(Ude,{value:u},ae.createElement(Se.div,{ref:n,...o,className:i2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Uf.displayName="AccordionItem";var Gf=ke(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=I8(),{getPanelProps:s,isOpen:l}=M8(),u=s(o,n),h=i2("chakra-accordion__panel",r),g=wb();a||delete u.hidden;const m=ae.createElement(Se.div,{...u,__css:g.panel,className:h});return a?m:x(Iz,{in:l,...i,children:m})});Gf.displayName="AccordionPanel";var Cb=ke(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=qde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Gde,{value:l},ae.createElement(Kde,{value:h},ae.createElement(Vde,{value:o},ae.createElement(Se.div,{ref:i,...s,className:i2("chakra-accordion",r.className),__css:o.root},t))))});Cb.displayName="Accordion";var tfe=(...e)=>e.filter(Boolean).join(" "),nfe=Sd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),o2=ke((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=tfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${nfe} ${o} linear infinite`,...n};return ae.createElement(Se.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(Se.span,{srOnly:!0},r))});o2.displayName="Spinner";var _b=(...e)=>e.filter(Boolean).join(" ");function rfe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function ife(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function VL(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[ofe,afe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[sfe,O8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Dz={info:{icon:ife,colorScheme:"blue"},warning:{icon:VL,colorScheme:"orange"},success:{icon:rfe,colorScheme:"green"},error:{icon:VL,colorScheme:"red"},loading:{icon:o2,colorScheme:"blue"}};function lfe(e){return Dz[e].colorScheme}function ufe(e){return Dz[e].icon}var zz=ke(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??lfe(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(ofe,{value:{status:r}},ae.createElement(sfe,{value:s},ae.createElement(Se.div,{role:i?"alert":void 0,ref:n,...o,className:_b("chakra-alert",t.className),__css:l})))});zz.displayName="Alert";var Bz=ke(function(t,n){const i={display:"inline",...O8().description};return ae.createElement(Se.div,{ref:n,...t,className:_b("chakra-alert__desc",t.className),__css:i})});Bz.displayName="AlertDescription";function Fz(e){const{status:t}=afe(),n=ufe(t),r=O8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(Se.span,{display:"inherit",...e,className:_b("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Fz.displayName="AlertIcon";var $z=ke(function(t,n){const r=O8();return ae.createElement(Se.div,{ref:n,...t,className:_b("chakra-alert__title",t.className),__css:r.title})});$z.displayName="AlertTitle";function cfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return ks(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ffe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",e4=ke(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});e4.displayName="NativeImage";var kb=ke(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=dfe({...t,ignoreFallback:E}),k=ffe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:cfe(b,["onError","onLoad"])};return k?i||ae.createElement(Se.img,{as:e4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(Se.img,{as:e4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});kb.displayName="Image";ke((e,t)=>ae.createElement(Se.img,{ref:t,as:e4,className:"chakra-image",...e}));function Eb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var Pb=(...e)=>e.filter(Boolean).join(" "),UL=e=>e?"":void 0,[hfe,pfe]=_n({strict:!1,name:"ButtonGroupContext"});function OC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Pb("chakra-button__icon",n);return ae.createElement(Se.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}OC.displayName="ButtonIcon";function RC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(o2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=Pb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(Se.div,{className:l,...s,__css:h},i)}RC.displayName="ButtonSpinner";function gfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=ke((e,t)=>{const n=pfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=vn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=gfe(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(Se.button,{disabled:i||o,ref:zae(t,T),as:E,type:m??M,"data-active":UL(a),"data-loading":UL(o),__css:k,className:Pb("chakra-button",w),...P},o&&b==="start"&&x(RC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(Se.span,{opacity:0},x(GL,{...O})):x(GL,{...O}),o&&b==="end"&&x(RC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function GL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return J(Ln,{children:[t&&x(OC,{marginEnd:i,children:t}),r,n&&x(OC,{marginStart:i,children:n})]})}var ia=ke(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=Pb("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(hfe,{value:m},ae.createElement(Se.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=ke((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var p1=(...e)=>e.filter(Boolean).join(" "),Wy=e=>e?"":void 0,nw=e=>e?!0:void 0;function jL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[mfe,Hz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[vfe,g1]=_n({strict:!1,name:"FormControlContext"});function yfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Wy(E),"data-disabled":Wy(i),"data-invalid":Wy(r),"data-readonly":Wy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:R}}var wd=ke(function(t,n){const r=Oi("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=yfe(i),l=p1("chakra-form-control",t.className);return ae.createElement(vfe,{value:s},ae.createElement(mfe,{value:r},ae.createElement(Se.div,{...o({},n),className:l,__css:r.container})))});wd.displayName="FormControl";var bfe=ke(function(t,n){const r=g1(),i=Hz(),o=p1("chakra-form__helper-text",t.className);return ae.createElement(Se.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});bfe.displayName="FormHelperText";function R8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=N8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":nw(n),"aria-required":nw(i),"aria-readonly":nw(r)}}function N8(e){const t=g1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:jL(t?.onFocus,h),onBlur:jL(t?.onBlur,g)}}var[Sfe,xfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wfe=ke((e,t)=>{const n=Oi("FormError",e),r=vn(e),i=g1();return i?.isInvalid?ae.createElement(Sfe,{value:n},ae.createElement(Se.div,{...i?.getErrorMessageProps(r,t),className:p1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});wfe.displayName="FormErrorMessage";var Cfe=ke((e,t)=>{const n=xfe(),r=g1();if(!r?.isInvalid)return null;const i=p1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Cfe.displayName="FormErrorIcon";var vh=ke(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Wz,{}),optionalIndicator:l=null,...u}=i,h=g1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(Se.label,{...g,className:p1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});vh.displayName="FormLabel";var Wz=ke(function(t,n){const r=g1(),i=Hz();if(!r?.isRequired)return null;const o=p1("chakra-form__required-indicator",t.className);return ae.createElement(Se.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Wz.displayName="RequiredIndicator";function cd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var D8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},_fe=Se("span",{baseStyle:D8});_fe.displayName="VisuallyHidden";var kfe=Se("input",{baseStyle:D8});kfe.displayName="VisuallyHiddenInput";var YL=!1,Tb=null,Y0=!1,NC=new Set,Efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Pfe(e){return!(e.metaKey||!Efe&&e.altKey||e.ctrlKey)}function z8(e,t){NC.forEach(n=>n(e,t))}function qL(e){Y0=!0,Pfe(e)&&(Tb="keyboard",z8("keyboard",e))}function Pp(e){Tb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Y0=!0,z8("pointer",e))}function Tfe(e){e.target===window||e.target===document||(Y0||(Tb="keyboard",z8("keyboard",e)),Y0=!1)}function Lfe(){Y0=!1}function KL(){return Tb!=="pointer"}function Afe(){if(typeof window>"u"||YL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Y0=!0,e.apply(this,n)},document.addEventListener("keydown",qL,!0),document.addEventListener("keyup",qL,!0),window.addEventListener("focus",Tfe,!0),window.addEventListener("blur",Lfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),YL=!0}function Mfe(e){Afe(),e(KL());const t=()=>e(KL());return NC.add(t),()=>{NC.delete(t)}}var[STe,Ife]=_n({name:"CheckboxGroupContext",strict:!1}),Ofe=(...e)=>e.filter(Boolean).join(" "),Zi=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Rfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Nfe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Dfe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function zfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Dfe:Nfe;return n||t?ae.createElement(Se.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Bfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Vz(e={}){const t=N8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...O}=e,R=Bfe(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[ee,K]=C.exports.useState(!1);C.exports.useEffect(()=>Mfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Me]=C.exports.useState(!!h),xe=g!==void 0,be=xe?g:me,Ie=C.exports.useCallback(Ee=>{if(r||n){Ee.preventDefault();return}xe||Me(be?Ee.target.checked:b?!0:Ee.target.checked),N?.(Ee)},[r,n,be,xe,b,N]);ks(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),cd(()=>{n&&W(!1)},[n,W]),ks(()=>{const Ee=G.current;!Ee?.form||(Ee.form.onreset=()=>{Me(!!h)})},[]);const We=n&&!m,De=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!0)},[K]),Qe=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!1)},[K]);ks(()=>{if(!G.current)return;G.current.checked!==be&&Me(G.current.checked)},[G.current]);const st=C.exports.useCallback((Ee={},Je=null)=>{const Lt=it=>{ue&&it.preventDefault(),K(!0)};return{...Ee,ref:Je,"data-active":Zi(ee),"data-hover":Zi(Q),"data-checked":Zi(be),"data-focus":Zi(ue),"data-focus-visible":Zi(ue&&$),"data-indeterminate":Zi(b),"data-disabled":Zi(n),"data-invalid":Zi(o),"data-readonly":Zi(r),"aria-hidden":!0,onMouseDown:Ta(Ee.onMouseDown,Lt),onMouseUp:Ta(Ee.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Ee.onMouseEnter,()=>ne(!0)),onMouseLeave:Ta(Ee.onMouseLeave,()=>ne(!1))}},[ee,be,n,ue,$,Q,b,o,r]),Ct=C.exports.useCallback((Ee={},Je=null)=>({...R,...Ee,ref:Wn(Je,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:Ta(Ee.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[R,n,be,o,X]),ht=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Wn(G,Je),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ta(Ee.onChange,Ie),onBlur:Ta(Ee.onBlur,z,()=>W(!1)),onFocus:Ta(Ee.onFocus,V,()=>W(!0)),onKeyDown:Ta(Ee.onKeyDown,De),onKeyUp:Ta(Ee.onKeyUp,Qe),required:i,checked:be,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:D8}),[w,E,a,Ie,z,V,De,Qe,i,be,We,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Je,onMouseDown:Ta(Ee.onMouseDown,XL),onTouchStart:Ta(Ee.onTouchStart,XL),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:ue,isChecked:be,isActive:ee,isHovered:Q,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ct,getCheckboxProps:st,getInputProps:ht,getLabelProps:ut,htmlProps:R}}function XL(e){e.preventDefault(),e.stopPropagation()}var Ffe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},$fe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Hfe=Sd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Wfe=Sd({from:{opacity:0},to:{opacity:1}}),Vfe=Sd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Uz=ke(function(t,n){const r=Ife(),i={...r,...t},o=Oi("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(zfe,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Rfe(r.onChange,w));const{state:M,getInputProps:O,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Vz({...P,isDisabled:b,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Wfe} 20ms linear, ${Vfe} 200ms linear`:`${Hfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(Se.label,{__css:{...$fe,...o.container},className:Ofe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),ae.createElement(Se.span,{__css:{...Ffe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&ae.createElement(Se.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Uz.displayName="Checkbox";function Ufe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Lb=ke(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(Se.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Ufe,{width:"1em",height:"1em"}))});Lb.displayName="CloseButton";function Gfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function B8(e,t){let n=Gfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function DC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function t4(e,t,n){return(e-t)*100/(n-t)}function Gz(e,t,n){return(n-t)*e+t}function zC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=DC(n);return B8(r,i)}function E0(e,t,n){return e==null?e:(nr==null?"":rw(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=jz(Mc(v),o),w=n??b,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Mc($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=E0(j,a,s)),B8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Mc($):j=Mc(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Mc(-$):j=Mc(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=rw(r,o,n)??a,E($)},[r,n,o,E,a]),O=C.exports.useCallback($=>{const j=rw($,o,w)??a;E(j)},[w,o,E,a]),R=Mc(v);return{isOutOfRange:R>s||Rx(ab,{styles:Yz}),qfe=()=>x(ab,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${Yz} - `});function Qf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Kfe(e){return"current"in e}var qz=()=>typeof window<"u";function Xfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zfe=e=>qz()&&e.test(navigator.vendor),Qfe=e=>qz()&&e.test(Xfe()),Jfe=()=>Qfe(/mac|iphone|ipad|ipod/i),ehe=()=>Jfe()&&Zfe(/apple/i);function the(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Qf(i,"pointerdown",o=>{if(!ehe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var nhe=UJ?C.exports.useLayoutEffect:C.exports.useEffect;function ZL(e,t=[]){const n=C.exports.useRef(e);return nhe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function rhe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ihe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Mv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=ZL(n),a=ZL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=rhe(r,s),g=ihe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:GJ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function F8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var $8=ke(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=vn(i),s=R8(a),l=Nr("chakra-input",t.className);return ae.createElement(Se.input,{size:r,...s,__css:o.field,ref:n,className:l})});$8.displayName="Input";$8.id="Input";var[ohe,Kz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ahe=ke(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=Eb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=F8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(Se.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ohe,{value:r,children:g}))});ahe.displayName="InputGroup";var she={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},lhe=Se("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),H8=ke(function(t,n){const{placement:r="left",...i}=t,o=she[r]??{},a=Kz();return x(lhe,{ref:n,...i,__css:{...a.addon,...o}})});H8.displayName="InputAddon";var Xz=ke(function(t,n){return x(H8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});Xz.displayName="InputLeftAddon";Xz.id="InputLeftAddon";var Zz=ke(function(t,n){return x(H8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});Zz.displayName="InputRightAddon";Zz.id="InputRightAddon";var uhe=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Ab=ke(function(t,n){const{placement:r="left",...i}=t,o=Kz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(uhe,{ref:n,__css:l,...i})});Ab.id="InputElement";Ab.displayName="InputElement";var Qz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(Ab,{ref:n,placement:"left",className:o,...i})});Qz.id="InputLeftElement";Qz.displayName="InputLeftElement";var Jz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(Ab,{ref:n,placement:"right",className:o,...i})});Jz.id="InputRightElement";Jz.displayName="InputRightElement";function che(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function dd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):che(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var dhe=ke(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(Se.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:dd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});dhe.displayName="AspectRatio";var fhe=ke(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return ae.createElement(Se.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});fhe.displayName="Badge";var Bl=Se("div");Bl.displayName="Box";var eB=ke(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Bl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});eB.displayName="Square";var hhe=ke(function(t,n){const{size:r,...i}=t;return x(eB,{size:r,ref:n,borderRadius:"9999px",...i})});hhe.displayName="Circle";var tB=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});tB.displayName="Center";var phe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ke(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(Se.div,{ref:n,__css:phe[r],...i,position:"absolute"})});var ghe=ke(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return ae.createElement(Se.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});ghe.displayName="Code";var mhe=ke(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});mhe.displayName="Container";var vhe=ke(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(Se.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});vhe.displayName="Divider";var en=ke(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(Se.div,{ref:n,__css:g,...h})});en.displayName="Flex";var nB=ke(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(Se.div,{ref:n,__css:w,...b})});nB.displayName="Grid";function QL(e){return dd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var yhe=ke(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=F8({gridArea:r,gridColumn:QL(i),gridRow:QL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(Se.div,{ref:n,__css:g,...h})});yhe.displayName="GridItem";var Jf=ke(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return ae.createElement(Se.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Jf.displayName="Heading";ke(function(t,n){const r=so("Mark",t),i=vn(t);return x(Bl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var bhe=ke(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return ae.createElement(Se.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});bhe.displayName="Kbd";var eh=ke(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return ae.createElement(Se.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});eh.displayName="Link";ke(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(Se.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[She,rB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),W8=ke(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=Eb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(She,{value:r},ae.createElement(Se.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});W8.displayName="List";var xhe=ke((e,t)=>{const{as:n,...r}=e;return x(W8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xhe.displayName="OrderedList";var whe=ke(function(t,n){const{as:r,...i}=t;return x(W8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});whe.displayName="UnorderedList";var Che=ke(function(t,n){const r=rB();return ae.createElement(Se.li,{ref:n,...t,__css:r.item})});Che.displayName="ListItem";var _he=ke(function(t,n){const r=rB();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});_he.displayName="ListIcon";var khe=ke(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=u1(),h=s?Phe(s,u):The(r);return x(nB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});khe.displayName="SimpleGrid";function Ehe(e){return typeof e=="number"?`${e}px`:e}function Phe(e,t){return dd(e,n=>{const r=Eae("sizes",n,Ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function The(e){return dd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var iB=Se("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});iB.displayName="Spacer";var BC="& > *:not(style) ~ *:not(style)";function Lhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[BC]:dd(n,i=>r[i])}}function Ahe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":dd(n,i=>r[i])}}var oB=e=>ae.createElement(Se.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});oB.displayName="StackItem";var V8=ke((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Lhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ahe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=Eb(l);return P?M:M.map((O,R)=>{const N=typeof O.key<"u"?O.key:R,z=R+1===M.length,$=g?x(oB,{children:O},N):O;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),ue=z?null:j;return J(C.exports.Fragment,{children:[$,ue]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(Se.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[BC]:b[BC]},...m},k)});V8.displayName="Stack";var aB=ke((e,t)=>x(V8,{align:"center",...e,direction:"row",ref:t}));aB.displayName="HStack";var sB=ke((e,t)=>x(V8,{align:"center",...e,direction:"column",ref:t}));sB.displayName="VStack";var Po=ke(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=F8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(Se.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function JL(e){return typeof e=="number"?`${e}px`:e}var Mhe=ke(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>dd(w,k=>JL(Y6("space",k)(P))),"--chakra-wrap-y-spacing":P=>dd(E,k=>JL(Y6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(lB,{children:w},E)):a,[a,g]);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(Se.ul,{className:"chakra-wrap__list",__css:v},b))});Mhe.displayName="Wrap";var lB=ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});lB.displayName="WrapItem";var Ihe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},uB=Ihe,Tp=()=>{},Ohe={document:uB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Rhe=Ohe,Nhe={window:Rhe,document:uB},cB=typeof window<"u"?{window,document}:Nhe,dB=C.exports.createContext(cB);dB.displayName="EnvironmentContext";function fB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:cB},[r,n]);return J(dB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}fB.displayName="EnvironmentProvider";var Dhe=e=>e?"":void 0;function zhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function iw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Bhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=zhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&iw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),ue=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),ee=Wn(t,M);return w?{...b,ref:ee,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:ee,role:"button","data-active":Dhe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:N,onMouseDown:ue,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function hB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function pB(e){if(!hB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Fhe(e){var t;return((t=gB(e))==null?void 0:t.defaultView)??window}function gB(e){return hB(e)?e.ownerDocument:document}function $he(e){return gB(e).activeElement}var mB=e=>e.hasAttribute("tabindex"),Hhe=e=>mB(e)&&e.tabIndex===-1;function Whe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function vB(e){return e.parentElement&&vB(e.parentElement)?!0:e.hidden}function Vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function yB(e){if(!pB(e)||vB(e)||Whe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Vhe(e)?!0:mB(e)}function Uhe(e){return e?pB(e)&&yB(e)&&!Hhe(e):!1}var Ghe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],jhe=Ghe.join(),Yhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function bB(e){const t=Array.from(e.querySelectorAll(jhe));return t.unshift(e),t.filter(n=>yB(n)&&Yhe(n))}function qhe(e){const t=e.current;if(!t)return!1;const n=$he(t);return!n||t.contains(n)?!1:!!Uhe(n)}function Khe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;cd(()=>{if(!o||qhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Xhe={preventScroll:!0,shouldFocus:!1};function Zhe(e,t=Xhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Qhe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);ks(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=bB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);cd(()=>{h()},[h]),Qf(a,"transitionend",h)}function Qhe(e){return"current"in e}var Oo="top",Ua="bottom",Ga="right",Ro="left",U8="auto",a2=[Oo,Ua,Ga,Ro],q0="start",Iv="end",Jhe="clippingParents",SB="viewport",jg="popper",epe="reference",eA=a2.reduce(function(e,t){return e.concat([t+"-"+q0,t+"-"+Iv])},[]),xB=[].concat(a2,[U8]).reduce(function(e,t){return e.concat([t,t+"-"+q0,t+"-"+Iv])},[]),tpe="beforeRead",npe="read",rpe="afterRead",ipe="beforeMain",ope="main",ape="afterMain",spe="beforeWrite",lpe="write",upe="afterWrite",cpe=[tpe,npe,rpe,ipe,ope,ape,spe,lpe,upe];function Il(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function lh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Ba(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function G8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function dpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ba(o)||!Il(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function fpe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Ba(i)||!Il(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const hpe={name:"applyStyles",enabled:!0,phase:"write",fn:dpe,effect:fpe,requires:["computeStyles"]};function Pl(e){return e.split("-")[0]}var th=Math.max,n4=Math.min,K0=Math.round;function FC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wB(){return!/^((?!chrome|android).)*safari/i.test(FC())}function X0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ba(e)&&(i=e.offsetWidth>0&&K0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&K0(r.height)/e.offsetHeight||1);var a=lh(e)?Ya(e):window,s=a.visualViewport,l=!wB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function j8(e){var t=X0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function CB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&G8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function ppe(e){return["table","td","th"].indexOf(Il(e))>=0}function Cd(e){return((lh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mb(e){return Il(e)==="html"?e:e.assignedSlot||e.parentNode||(G8(e)?e.host:null)||Cd(e)}function tA(e){return!Ba(e)||Eu(e).position==="fixed"?null:e.offsetParent}function gpe(e){var t=/firefox/i.test(FC()),n=/Trident/i.test(FC());if(n&&Ba(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=Mb(e);for(G8(i)&&(i=i.host);Ba(i)&&["html","body"].indexOf(Il(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function s2(e){for(var t=Ya(e),n=tA(e);n&&ppe(n)&&Eu(n).position==="static";)n=tA(n);return n&&(Il(n)==="html"||Il(n)==="body"&&Eu(n).position==="static")?t:n||gpe(e)||t}function Y8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Gm(e,t,n){return th(e,n4(t,n))}function mpe(e,t,n){var r=Gm(e,t,n);return r>n?n:r}function _B(){return{top:0,right:0,bottom:0,left:0}}function kB(e){return Object.assign({},_B(),e)}function EB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var vpe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,kB(typeof t!="number"?t:EB(t,a2))};function ype(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Pl(n.placement),l=Y8(s),u=[Ro,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=vpe(i.padding,n),m=j8(o),v=l==="y"?Oo:Ro,b=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=s2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+T,N=Gm(M,R,O),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function bpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!CB(t.elements.popper,i)||(t.elements.arrow=i))}const Spe={name:"arrow",enabled:!0,phase:"main",fn:ype,effect:bpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z0(e){return e.split("-")[1]}var xpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wpe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:K0(t*i)/i||0,y:K0(n*i)/i||0}}function nA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Ro,M=Oo,O=window;if(u){var R=s2(n),N="clientHeight",z="clientWidth";if(R===Ya(n)&&(R=Cd(n),Eu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Oo||(i===Ro||i===Ga)&&o===Iv){M=Ua;var V=g&&R===O&&O.visualViewport?O.visualViewport.height:R[N];w-=V-r.height,w*=l?1:-1}if(i===Ro||(i===Oo||i===Ua)&&o===Iv){T=Ga;var $=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&xpe),ue=h===!0?wpe({x:v,y:w}):{x:v,y:w};if(v=ue.x,w=ue.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Cpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Pl(t.placement),variation:Z0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,nA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,nA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _pe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cpe,data:{}};var Vy={passive:!0};function kpe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Vy)}),s&&l.addEventListener("resize",n.update,Vy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Vy)}),s&&l.removeEventListener("resize",n.update,Vy)}}const Epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kpe,data:{}};var Ppe={left:"right",right:"left",bottom:"top",top:"bottom"};function G3(e){return e.replace(/left|right|bottom|top/g,function(t){return Ppe[t]})}var Tpe={start:"end",end:"start"};function rA(e){return e.replace(/start|end/g,function(t){return Tpe[t]})}function q8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function K8(e){return X0(Cd(e)).left+q8(e).scrollLeft}function Lpe(e,t){var n=Ya(e),r=Cd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=wB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+K8(e),y:l}}function Ape(e){var t,n=Cd(e),r=q8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=th(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=th(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+K8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=th(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function X8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function PB(e){return["html","body","#document"].indexOf(Il(e))>=0?e.ownerDocument.body:Ba(e)&&X8(e)?e:PB(Mb(e))}function jm(e,t){var n;t===void 0&&(t=[]);var r=PB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],X8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(jm(Mb(a)))}function $C(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Mpe(e,t){var n=X0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function iA(e,t,n){return t===SB?$C(Lpe(e,n)):lh(t)?Mpe(t,n):$C(Ape(Cd(e)))}function Ipe(e){var t=jm(Mb(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Ba(e)?s2(e):e;return lh(r)?t.filter(function(i){return lh(i)&&CB(i,r)&&Il(i)!=="body"}):[]}function Ope(e,t,n,r){var i=t==="clippingParents"?Ipe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=iA(e,u,r);return l.top=th(h.top,l.top),l.right=n4(h.right,l.right),l.bottom=n4(h.bottom,l.bottom),l.left=th(h.left,l.left),l},iA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function TB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Pl(r):null,o=r?Z0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Oo:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Ro:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Y8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case q0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Iv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ov(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Jhe:s,u=n.rootBoundary,h=u===void 0?SB:u,g=n.elementContext,m=g===void 0?jg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=kB(typeof E!="number"?E:EB(E,a2)),k=m===jg?epe:jg,T=e.rects.popper,M=e.elements[b?k:m],O=Ope(lh(M)?M:M.contextElement||Cd(e.elements.popper),l,h,a),R=X0(e.elements.reference),N=TB({reference:R,element:T,strategy:"absolute",placement:i}),z=$C(Object.assign({},T,N)),V=m===jg?z:R,$={top:O.top-V.top+P.top,bottom:V.bottom-O.bottom+P.bottom,left:O.left-V.left+P.left,right:V.right-O.right+P.right},j=e.modifiersData.offset;if(m===jg&&j){var ue=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Oo,Ua].indexOf(W)>=0?"y":"x";$[W]+=ue[ne]*Q})}return $}function Rpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?xB:l,h=Z0(r),g=h?s?eA:eA.filter(function(b){return Z0(b)===h}):a2,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=Ov(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Pl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Npe(e){if(Pl(e)===U8)return[];var t=G3(e);return[rA(e),t,rA(t)]}function Dpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Pl(E),k=P===E,T=l||(k||!b?[G3(E)]:Npe(E)),M=[E].concat(T).reduce(function(be,Ie){return be.concat(Pl(Ie)===U8?Rpe(t,{placement:Ie,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):Ie)},[]),O=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",ee=Ov(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Ro:W?Ua:Oo;O[ne]>R[ne]&&(K=G3(K));var G=G3(K),X=[];if(o&&X.push(ee[ue]<=0),s&&X.push(ee[K]<=0,ee[G]<=0),X.every(function(be){return be})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=b?3:1,me=function(Ie){var We=M.find(function(De){var Qe=N.get(De);if(Qe)return Qe.slice(0,Ie).every(function(st){return st})});if(We)return V=We,"break"},Me=ce;Me>0;Me--){var xe=me(Me);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const zpe={name:"flip",enabled:!0,phase:"main",fn:Dpe,requiresIfExists:["offset"],data:{_skip:!1}};function oA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function aA(e){return[Oo,Ga,Ua,Ro].some(function(t){return e[t]>=0})}function Bpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ov(t,{elementContext:"reference"}),s=Ov(t,{altBoundary:!0}),l=oA(a,r),u=oA(s,i,o),h=aA(l),g=aA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Fpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Bpe};function $pe(e,t,n){var r=Pl(e),i=[Ro,Oo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ro,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Hpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=xB.reduce(function(h,g){return h[g]=$pe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Wpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hpe};function Vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=TB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Upe={name:"popperOffsets",enabled:!0,phase:"read",fn:Vpe,data:{}};function Gpe(e){return e==="x"?"y":"x"}function jpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=Ov(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Pl(t.placement),k=Z0(t.placement),T=!k,M=Y8(P),O=Gpe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ue={x:0,y:0};if(!!R){if(o){var W,Q=M==="y"?Oo:Ro,ne=M==="y"?Ua:Ga,ee=M==="y"?"height":"width",K=R[M],G=K+E[Q],X=K-E[ne],ce=v?-z[ee]/2:0,me=k===q0?N[ee]:z[ee],Me=k===q0?-z[ee]:-N[ee],xe=t.elements.arrow,be=v&&xe?j8(xe):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_B(),We=Ie[Q],De=Ie[ne],Qe=Gm(0,N[ee],be[ee]),st=T?N[ee]/2-ce-Qe-We-$.mainAxis:me-Qe-We-$.mainAxis,Ct=T?-N[ee]/2+ce+Qe+De+$.mainAxis:Me+Qe+De+$.mainAxis,ht=t.elements.arrow&&s2(t.elements.arrow),ut=ht?M==="y"?ht.clientTop||0:ht.clientLeft||0:0,vt=(W=j?.[M])!=null?W:0,Ee=K+st-vt-ut,Je=K+Ct-vt,Lt=Gm(v?n4(G,Ee):G,K,v?th(X,Je):X);R[M]=Lt,ue[M]=Lt-K}if(s){var it,gt=M==="x"?Oo:Ro,an=M==="x"?Ua:Ga,_t=R[O],Ut=O==="y"?"height":"width",sn=_t+E[gt],yn=_t-E[an],Oe=[Oo,Ro].indexOf(P)!==-1,Xe=(it=j?.[O])!=null?it:0,Xt=Oe?sn:_t-N[Ut]-z[Ut]-Xe+$.altAxis,Yt=Oe?_t+N[Ut]+z[Ut]-Xe-$.altAxis:yn,_e=v&&Oe?mpe(Xt,_t,Yt):Gm(v?Xt:sn,_t,v?Yt:yn);R[O]=_e,ue[O]=_e-_t}t.modifiersData[r]=ue}}const Ype={name:"preventOverflow",enabled:!0,phase:"main",fn:jpe,requiresIfExists:["offset"]};function qpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Kpe(e){return e===Ya(e)||!Ba(e)?q8(e):qpe(e)}function Xpe(e){var t=e.getBoundingClientRect(),n=K0(t.width)/e.offsetWidth||1,r=K0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Zpe(e,t,n){n===void 0&&(n=!1);var r=Ba(t),i=Ba(t)&&Xpe(t),o=Cd(t),a=X0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Il(t)!=="body"||X8(o))&&(s=Kpe(t)),Ba(t)?(l=X0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=K8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Qpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Jpe(e){var t=Qpe(e);return cpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function e0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function t0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var sA={placement:"bottom",modifiers:[],strategy:"absolute"};function lA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function o0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var a0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},s0e=e=>a0e[e],uA={scroll:!0,resize:!0};function l0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...uA,...e}}:t={enabled:e,options:uA},t}var u0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},c0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{cA(e)},effect:({state:e})=>()=>{cA(e)}},cA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,s0e(e.placement))},d0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{f0e(e)}},f0e=e=>{var t;if(!e.placement)return;const n=h0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},h0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},p0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{dA(e)},effect:({state:e})=>()=>{dA(e)}},dA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:o0e(e.placement)})},g0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},m0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function v0e(e,t="ltr"){var n;const r=((n=g0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:m0e[e]??r}function LB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=v0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!b.current||!w.current||(($=k.current)==null||$.call(k),E.current=i0e(b.current,w.current,{placement:P,modifiers:[p0e,d0e,c0e,{...u0e,enabled:!!m},{name:"eventListeners",...l0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!b.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{b.current=$,T()},[T]),O=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:ue,shadowColor:W,bg:Q,style:ne,...ee}=$;return{...ee,ref:j,"data-popper-arrow":"",style:y0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:O}}function y0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function AB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function b0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Qf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Fhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function MB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[S0e,x0e]=_n({strict:!1,name:"PortalManagerContext"});function IB(e){const{children:t,zIndex:n}=e;return x(S0e,{value:{zIndex:n},children:t})}IB.displayName="PortalManager";var[OB,w0e]=_n({strict:!1,name:"PortalContext"}),Z8="chakra-portal",C0e=".chakra-portal",_0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),k0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=w0e(),l=x0e();ks(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=Z8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(_0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Dl.exports.createPortal(x(OB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},E0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=Z8),l},[i]),[,s]=C.exports.useState({});return ks(()=>s({}),[]),ks(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Dl.exports.createPortal(x(OB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(E0e,{containerRef:t,...n}):x(k0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=Z8;yh.selector=C0e;yh.displayName="Portal";var P0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Uy=new WeakMap,Gy={},ow=0,RB=function(e){return e&&(e.host||RB(e.parentNode))},T0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=RB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},L0e=function(e,t,n,r){var i=T0e(t,Array.isArray(e)?e:[e]);Gy[n]||(Gy[n]=new WeakMap);var o=Gy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&b&&Uy.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),ow++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Uy.has(g)||g.removeAttribute(r),Uy.delete(g)),v||g.removeAttribute(n)}),ow--,ow||(Ap=new WeakMap,Ap=new WeakMap,Uy=new WeakMap,Gy={})}},NB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||P0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),L0e(r,i,n,"aria-hidden")):function(){return null}};function Q8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},A0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",M0e=A0e,I0e=M0e;function DB(){}function zB(){}zB.resetWarningCache=DB;var O0e=function(){function e(r,i,o,a,s,l){if(l!==I0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:zB,resetWarningCache:DB};return n.PropTypes=n,n};Rn.exports=O0e();var HC="data-focus-lock",BB="data-focus-lock-disabled",R0e="data-no-focus-lock",N0e="data-autofocus-inside",D0e="data-no-autofocus";function z0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function B0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function FB(e,t){return B0e(t||null,function(n){return e.forEach(function(r){return z0e(r,n)})})}var aw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function $B(e){return e}function HB(e,t){t===void 0&&(t=$B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function J8(e,t){return t===void 0&&(t=$B),HB(e,t)}function WB(e){e===void 0&&(e={});var t=HB(null);return t.options=vl({async:!0,ssr:!1},e),t}var VB=function(e){var t=e.sideCar,n=Mz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...vl({},n)})};VB.isSideCarExport=!0;function F0e(e,t){return e.useMedium(t),VB}var UB=J8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),GB=J8(),$0e=J8(),H0e=WB({async:!0}),W0e=[],e_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,O=M===void 0?W0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,ue=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),ee=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(De){var Qe=u.current;if(Qe&&Qe.focus){var st=typeof j=="function"?j(Qe):j;if(st){var Ct=typeof st=="object"?st:void 0;u.current=null,De?Promise.resolve().then(function(){return Qe.focus(Ct)}):Qe.focus(Ct)}}},[j]),ce=C.exports.useCallback(function(De){l.current&&UB.useMedium(De)},[]),me=GB.useMedium,Me=C.exports.useCallback(function(De){s.current!==De&&(s.current=De,a(De))},[]),xe=An((r={},r[BB]=g&&"disabled",r[HC]=E,r),V),be=m!==!0,Ie=be&&m!=="tail",We=FB([n,Me]);return J(Ln,{children:[be&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:aw},"guard-nearest"):null],!g&&x($,{id:ee,sideCar:H0e,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:ue}),x(N,{ref:We,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Ie&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw})]})});e_.propTypes={};e_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const jB=e_;function WC(e,t){return WC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WC(e,t)}function t_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,WC(e,t)}function YB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){t_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return YB(l,"displayName","SideEffect("+n(i)+")"),l}}var Fl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Z0e)},Q0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],r_=Q0e.join(","),J0e="".concat(r_,", [data-focus-guard]"),nF=function(e,t){var n;return Fl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?J0e:r_)?[i]:[],nF(i))},[])},i_=function(e,t){return e.reduce(function(n,r){return n.concat(nF(r,t),r.parentNode?Fl(r.parentNode.querySelectorAll(r_)).filter(function(i){return i===r}):[])},[])},e1e=function(e){var t=e.querySelectorAll("[".concat(N0e,"]"));return Fl(t).map(function(n){return i_([n])}).reduce(function(n,r){return n.concat(r)},[])},o_=function(e,t){return Fl(e).filter(function(n){return XB(t,n)}).filter(function(n){return q0e(n)})},fA=function(e,t){return t===void 0&&(t=new Map),Fl(e).filter(function(n){return ZB(t,n)})},UC=function(e,t,n){return tF(o_(i_(e,n),t),!0,n)},hA=function(e,t){return tF(o_(i_(e),t),!1)},t1e=function(e,t){return o_(e1e(e),t)},Rv=function(e,t){return e.shadowRoot?Rv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Fl(e.children).some(function(n){return Rv(n,t)})},n1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},rF=function(e){return e.parentNode?rF(e.parentNode):e},a_=function(e){var t=VC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(HC);return n.push.apply(n,i?n1e(Fl(rF(r).querySelectorAll("[".concat(HC,'="').concat(i,'"]:not([').concat(BB,'="disabled"])')))):[r]),n},[])},iF=function(e){return e.activeElement?e.activeElement.shadowRoot?iF(e.activeElement.shadowRoot):e.activeElement:void 0},s_=function(){return document.activeElement?document.activeElement.shadowRoot?iF(document.activeElement.shadowRoot):document.activeElement:void 0},r1e=function(e){return e===document.activeElement},i1e=function(e){return Boolean(Fl(e.querySelectorAll("iframe")).some(function(t){return r1e(t)}))},oF=function(e){var t=document&&s_();return!t||t.dataset&&t.dataset.focusGuard?!1:a_(e).some(function(n){return Rv(n,t)||i1e(n)})},o1e=function(){var e=document&&s_();return e?Fl(document.querySelectorAll("[".concat(R0e,"]"))).some(function(t){return Rv(t,e)}):!1},a1e=function(e,t){return t.filter(eF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},l_=function(e,t){return eF(e)&&e.name?a1e(e,t):e},s1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(l_(n,e))}),e.filter(function(n){return t.has(n)})},pA=function(e){return e[0]&&e.length>1?l_(e[0],e):e[0]},gA=function(e,t){return e.length>1?e.indexOf(l_(e[t],e)):t},aF="NEW_FOCUS",l1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=n_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=s1e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=gA(e,0),k=gA(e,i-1);if(l===-1||h===-1)return aF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},u1e=function(e){return function(t){var n,r=(n=QB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},c1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=fA(r.filter(u1e(n)));return i&&i.length?pA(i):pA(fA(t))},GC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&GC(e.parentNode.host||e.parentNode,t),t},sw=function(e,t){for(var n=GC(e),r=GC(t),i=0;i=0)return o}return!1},sF=function(e,t,n){var r=VC(e),i=VC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=sw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=sw(o,l);u&&(!a||Rv(u,a)?a=u:a=sw(u,a))})}),a},d1e=function(e,t){return e.reduce(function(n,r){return n.concat(t1e(r,t))},[])},f1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(X0e)},h1e=function(e,t){var n=document&&s_(),r=a_(e).filter(r4),i=sF(n||e,e,r),o=new Map,a=hA(r,o),s=UC(r,o).filter(function(m){var v=m.node;return r4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=hA([i],o).map(function(m){var v=m.node;return v}),u=f1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=l1e(h,l,n,t);return g===aF?{node:c1e(a,h,d1e(r,o))}:g===void 0?g:u[g]}},p1e=function(e){var t=a_(e).filter(r4),n=sF(e,e,t),r=new Map,i=UC([n],r,!0),o=UC(t,r).filter(function(a){var s=a.node;return r4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:n_(s)}})},g1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},lw=0,uw=!1,m1e=function(e,t,n){n===void 0&&(n={});var r=h1e(e,t);if(!uw&&r){if(lw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),uw=!0,setTimeout(function(){uw=!1},1);return}lw++,g1e(r.node,n.focusOptions),lw--}};const lF=m1e;function uF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var v1e=function(){return document&&document.activeElement===document.body},y1e=function(){return v1e()||o1e()},P0=null,r0=null,T0=null,Nv=!1,b1e=function(){return!0},S1e=function(t){return(P0.whiteList||b1e)(t)},x1e=function(t,n){T0={observerNode:t,portaledElement:n}},w1e=function(t){return T0&&T0.portaledElement===t};function mA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var C1e=function(t){return t&&"current"in t?t.current:t},_1e=function(t){return t?Boolean(Nv):Nv==="meanwhile"},k1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},E1e=function(t,n){return n.some(function(r){return k1e(t,r,r)})},i4=function(){var t=!1;if(P0){var n=P0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||T0&&T0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(C1e).filter(Boolean));if((!h||S1e(h))&&(i||_1e(s)||!y1e()||!r0&&o)&&(u&&!(oF(g)||h&&E1e(h,g)||w1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=lF(g,r0,{focusOptions:l}),T0={})),Nv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=p1e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),mA(b,v.length,1,v),mA(b,-1,-1,v))}}}return t},cF=function(t){i4()&&t&&(t.stopPropagation(),t.preventDefault())},u_=function(){return uF(i4)},P1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||x1e(r,n)},T1e=function(){return null},dF=function(){Nv="just",setTimeout(function(){Nv="meanwhile"},0)},L1e=function(){document.addEventListener("focusin",cF),document.addEventListener("focusout",u_),window.addEventListener("blur",dF)},A1e=function(){document.removeEventListener("focusin",cF),document.removeEventListener("focusout",u_),window.removeEventListener("blur",dF)};function M1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function I1e(e){var t=e.slice(-1)[0];t&&!P0&&L1e();var n=P0,r=n&&t&&t.id===n.id;P0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),i4(),uF(i4)):(A1e(),r0=null)}UB.assignSyncMedium(P1e);GB.assignMedium(u_);$0e.assignMedium(function(e){return e({moveFocusInside:lF,focusInside:oF})});const O1e=V0e(M1e,I1e)(T1e);var fF=C.exports.forwardRef(function(t,n){return x(jB,{sideCar:O1e,ref:n,...t})}),hF=jB.propTypes||{};hF.sideCar;Q8(hF,["sideCar"]);fF.propTypes={};const R1e=fF;var pF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&bB(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(R1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};pF.displayName="FocusLock";var j3="right-scroll-bar-position",Y3="width-before-scroll-bar",N1e="with-scroll-bars-hidden",D1e="--removed-body-scroll-bar-size",gF=WB(),cw=function(){},Ib=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:cw,onWheelCapture:cw,onTouchMoveCapture:cw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Mz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=FB([n,t]),O=vl(vl({},k),i);return J(Ln,{children:[h&&x(T,{sideCar:gF,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),vl(vl({},O),{ref:M})):x(P,{...vl({},O,{className:l,ref:M}),children:s})]})});Ib.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ib.classNames={fullWidth:Y3,zeroRight:j3};var z1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=z1e();return t&&e.setAttribute("nonce",t),e}function F1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var H1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=B1e())&&(F1e(t,n),$1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W1e=function(){var e=H1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mF=function(){var e=W1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},V1e={left:0,top:0,right:0,gap:0},dw=function(e){return parseInt(e||"",10)||0},U1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[dw(n),dw(r),dw(i)]},G1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return V1e;var t=U1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},j1e=mF(),Y1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(N1e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(j3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(Y3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(j3," .").concat(j3,` { - right: 0 `).concat(r,`; - } - - .`).concat(Y3," .").concat(Y3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(D1e,": ").concat(s,`px; - } -`)},q1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return G1e(i)},[i]);return x(j1e,{styles:Y1e(o,!t,i,n?"":"!important")})},jC=!1;if(typeof window<"u")try{var jy=Object.defineProperty({},"passive",{get:function(){return jC=!0,!0}});window.addEventListener("test",jy,jy),window.removeEventListener("test",jy,jy)}catch{jC=!1}var Mp=jC?{passive:!1}:!1,K1e=function(e){return e.tagName==="TEXTAREA"},vF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!K1e(e)&&n[t]==="visible")},X1e=function(e){return vF(e,"overflowY")},Z1e=function(e){return vF(e,"overflowX")},vA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=yF(e,n);if(r){var i=bF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Q1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},J1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yF=function(e,t){return e==="v"?X1e(t):Z1e(t)},bF=function(e,t){return e==="v"?Q1e(t):J1e(t)},ege=function(e,t){return e==="h"&&t==="rtl"?-1:1},tge=function(e,t,n,r,i){var o=ege(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=bF(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&yF(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Yy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yA=function(e){return[e.deltaX,e.deltaY]},bA=function(e){return e&&"current"in e?e.current:e},nge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rge=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},ige=0,Ip=[];function oge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(ige++)[0],o=C.exports.useState(function(){return mF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=AC([e.lockRef.current],(e.shards||[]).map(bA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Yy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=vA(N,R);if(!z)return!0;if(z?O=N:(O=N==="v"?"h":"v",z=vA(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=O),!O)return!0;var V=r.current||O;return tge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?yA(E):Yy(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&nge(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(bA).filter(Boolean).filter(function(O){return O.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Yy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,yA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Yy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,b=e.inert;return J(Ln,{children:[b?x(o,{styles:rge(i)}):null,v?x(q1e,{gapMode:"margin"}):null]})}const age=F0e(gF,oge);var SF=C.exports.forwardRef(function(e,t){return x(Ib,{...vl({},e,{ref:t,sideCar:age})})});SF.classNames=Ib.classNames;const xF=SF;var bh=(...e)=>e.filter(Boolean).join(" ");function cm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var sge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},YC=new sge;function lge(e,t){C.exports.useEffect(()=>(t&&YC.add(e),()=>{YC.remove(e)}),[t,e])}function uge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=dge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");cge(u,t&&a),lge(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),O=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:cm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!YC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:cm(z.onClick,R),onKeyDown:cm(z.onKeyDown,E),onMouseDown:cm(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:N}}function cge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return NB(e.current)},[t,e,n])}function dge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[fge,Sh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[hge,fd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),Q0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Oi("Modal",e),E={...uge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(hge,{value:E,children:x(fge,{value:b,children:x(xd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};Q0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};Q0.displayName="Modal";var Dv=ke((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=fd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=bh("chakra-modal__body",n),s=Sh();return ae.createElement(Se.div,{ref:t,className:a,id:i,...r,__css:s.body})});Dv.displayName="ModalBody";var c_=ke((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=fd(),a=bh("chakra-modal__close-btn",r),s=Sh();return x(Lb,{ref:t,__css:s.closeButton,className:a,onClick:cm(n,l=>{l.stopPropagation(),o()}),...i})});c_.displayName="ModalCloseButton";function wF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=fd(),[g,m]=C8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(pF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(xF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var pge={slideInBottom:{...IC,custom:{offsetY:16,reverse:!0}},slideInRight:{...IC,custom:{offsetX:16,reverse:!0}},scale:{...Rz,custom:{initialScale:.95,reverse:!0}},none:{}},gge=Se(zl.section),mge=e=>pge[e||"none"],CF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=mge(n),...i}=e;return x(gge,{ref:t,...r,...i})});CF.displayName="ModalTransition";var zv=ke((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=fd(),u=s(a,t),h=l(i),g=bh("chakra-modal__content",n),m=Sh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=fd();return ae.createElement(wF,null,ae.createElement(Se.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(CF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});zv.displayName="ModalContent";var Ob=ke((e,t)=>{const{className:n,...r}=e,i=bh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...Sh().footer};return ae.createElement(Se.footer,{ref:t,...r,__css:a,className:i})});Ob.displayName="ModalFooter";var Rb=ke((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=fd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=bh("chakra-modal__header",n),l={flex:0,...Sh().header};return ae.createElement(Se.header,{ref:t,className:a,id:i,...r,__css:l})});Rb.displayName="ModalHeader";var vge=Se(zl.div),J0=ke((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=bh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Sh().overlay},{motionPreset:u}=fd();return x(vge,{...i||(u==="none"?{}:Oz),__css:l,ref:t,className:a,...o})});J0.displayName="ModalOverlay";function _F(e){const{leastDestructiveRef:t,...n}=e;return x(Q0,{...n,initialFocusRef:t})}var kF=ke((e,t)=>x(zv,{ref:t,role:"alertdialog",...e})),[xTe,yge]=_n(),bge=Se(Nz),Sge=ke((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=fd(),h=s(a,t),g=l(o),m=bh("chakra-modal__content",n),v=Sh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=yge();return ae.createElement(wF,null,ae.createElement(Se.div,{...g,className:"chakra-modal__content-container",__css:w},x(bge,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});Sge.displayName="DrawerContent";function xge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var EF=(...e)=>e.filter(Boolean).join(" "),fw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var wge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),Cge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function SA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var _ge=50,xA=300;function kge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);xge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?_ge:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},xA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},xA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Ege=/^[Ee0-9+\-.]$/;function Pge(e){return Ege.test(e)}function Tge(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Lge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:O,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...ue}=e,W=dr(O),Q=dr(R),ne=dr(N),ee=dr(V??Pge),K=dr(z),G=jfe(e),{update:X,increment:ce,decrement:me}=G,[Me,xe]=C.exports.useState(!1),be=!(s||l),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useRef(null),st=C.exports.useCallback(_e=>_e.split("").filter(ee).join(""),[ee]),Ct=C.exports.useCallback(_e=>j?.(_e)??_e,[j]),ht=C.exports.useCallback(_e=>($?.(_e)??_e).toString(),[$]);cd(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Ie.current)return;if(Ie.current.value!=G.value){const It=Ct(Ie.current.value);G.setValue(st(It))}},[Ct,st]);const ut=C.exports.useCallback((_e=a)=>{be&&ce(_e)},[ce,be,a]),vt=C.exports.useCallback((_e=a)=>{be&&me(_e)},[me,be,a]),Ee=kge(ut,vt);SA(De,"disabled",Ee.stop,Ee.isSpinning),SA(Qe,"disabled",Ee.stop,Ee.isSpinning);const Je=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;const ze=Ct(_e.currentTarget.value);X(st(ze)),We.current={start:_e.currentTarget.selectionStart,end:_e.currentTarget.selectionEnd}},[X,st,Ct]),Lt=C.exports.useCallback(_e=>{var It;W?.(_e),We.current&&(_e.target.selectionStart=We.current.start??((It=_e.currentTarget.value)==null?void 0:It.length),_e.currentTarget.selectionEnd=We.current.end??_e.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;Tge(_e,ee)||_e.preventDefault();const It=gt(_e)*a,ze=_e.key,ln={ArrowUp:()=>ut(It),ArrowDown:()=>vt(It),Home:()=>X(i),End:()=>X(o)}[ze];ln&&(_e.preventDefault(),ln(_e))},[ee,a,ut,vt,X,i,o]),gt=_e=>{let It=1;return(_e.metaKey||_e.ctrlKey)&&(It=.1),_e.shiftKey&&(It=10),It},an=C.exports.useMemo(()=>{const _e=K?.(G.value);if(_e!=null)return _e;const It=G.value.toString();return It||void 0},[G.value,K]),_t=C.exports.useCallback(()=>{let _e=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(_e=o),G.cast(_e))},[G,o,i]),Ut=C.exports.useCallback(()=>{xe(!1),n&&_t()},[n,xe,_t]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var _e;(_e=Ie.current)==null||_e.focus()})},[t]),yn=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.up(),sn()},[sn,Ee]),Oe=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.down(),sn()},[sn,Ee]);Qf(()=>Ie.current,"wheel",_e=>{var It;const ot=(((It=Ie.current)==null?void 0:It.ownerDocument)??document).activeElement===Ie.current;if(!v||!ot)return;_e.preventDefault();const ln=gt(_e)*a,Bn=Math.sign(_e.deltaY);Bn===-1?ut(ln):Bn===1&&vt(ln)},{passive:!1});const Xe=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMax;return{..._e,ref:Wn(It,De),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||yn(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMax,r,yn,Ee.stop,l]),Xt=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMin;return{..._e,ref:Wn(It,Qe),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMin,r,Oe,Ee.stop,l]),Yt=C.exports.useCallback((_e={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:b,disabled:l,..._e,readOnly:_e.readOnly??s,"aria-readonly":_e.readOnly??s,"aria-required":_e.required??u,required:_e.required??u,ref:Wn(Ie,It),value:ht(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":fw(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:al(_e.onChange,Je),onKeyDown:al(_e.onKeyDown,it),onFocus:al(_e.onFocus,Lt,()=>xe(!0)),onBlur:al(_e.onBlur,Q,Ut)}),[P,m,g,M,T,ht,k,b,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,Je,it,Lt,Q,Ut]);return{value:ht(G.value),valueAsNumber:G.valueAsNumber,isFocused:Me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Xe,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:ue}}var[Age,Nb]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Mge,d_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),f_=ke(function(t,n){const r=Oi("NumberInput",t),i=vn(t),o=N8(i),{htmlProps:a,...s}=Lge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Mge,{value:l},ae.createElement(Age,{value:r},ae.createElement(Se.div,{...a,ref:n,className:EF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});f_.displayName="NumberInput";var PF=ke(function(t,n){const r=Nb();return ae.createElement(Se.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});PF.displayName="NumberInputStepper";var h_=ke(function(t,n){const{getInputProps:r}=d_(),i=r(t,n),o=Nb();return ae.createElement(Se.input,{...i,className:EF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});h_.displayName="NumberInputField";var TF=Se("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),p_=ke(function(t,n){const r=Nb(),{getDecrementButtonProps:i}=d_(),o=i(t,n);return x(TF,{...o,__css:r.stepper,children:t.children??x(wge,{})})});p_.displayName="NumberDecrementStepper";var g_=ke(function(t,n){const{getIncrementButtonProps:r}=d_(),i=r(t,n),o=Nb();return x(TF,{...i,__css:o.stepper,children:t.children??x(Cge,{})})});g_.displayName="NumberIncrementStepper";var l2=(...e)=>e.filter(Boolean).join(" ");function Ige(e,...t){return Oge(e)?e(...t):e}var Oge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Rge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Nge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Dge,u2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Op={click:"click",hover:"hover"};function zge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Op.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=AB(e),M=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,ue]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,ee,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(Je=>`${Je}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Me,forceUpdate:xe}=LB({...w,enabled:E||!!b}),be=b0e({isOpen:E,ref:R});the({enabled:E,ref:O}),Khe(R,{focusRef:O,visible:E,shouldFocus:o&&u===Op.click}),Zhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===Op.click});const Ie=MB({wasSelected:z.current,enabled:m,mode:v,isSelected:be.present}),We=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,style:{...Je.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(R,Lt),children:Ie?Je.children:null,id:ee,tabIndex:-1,role:"dialog",onKeyDown:sl(Je.onKeyDown,gt=>{n&>.key==="Escape"&&P()}),onBlur:sl(Je.onBlur,gt=>{const an=wA(gt),_t=hw(R.current,an),Ut=hw(O.current,an);E&&t&&(!_t&&!Ut)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Op.hover&&(it.role="tooltip",it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(Je.onMouseLeave,gt=>{gt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Ie,ee,V,K,j,G,u,n,P,E,t,g,l,s]),De=C.exports.useCallback((Je={},Lt=null)=>me({...Je,style:{visibility:E?"visible":"hidden",...Je.style}},Lt),[E,me]),Qe=C.exports.useCallback((Je,Lt=null)=>({...Je,ref:Wn(Lt,M,X)}),[M,X]),st=C.exports.useRef(),Ct=C.exports.useRef(),ht=C.exports.useCallback(Je=>{M.current==null&&X(Je)},[X]),ut=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,ref:Wn(O,Lt,ht),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":ee};return u===Op.click&&(it.onClick=sl(Je.onClick,T)),u===Op.hover&&(it.onFocus=sl(Je.onFocus,()=>{st.current===void 0&&k()}),it.onBlur=sl(Je.onBlur,gt=>{const an=wA(gt),_t=!hw(R.current,an);E&&t&&_t&&P()}),it.onKeyDown=sl(Je.onKeyDown,gt=>{gt.key==="Escape"&&P()}),it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0,st.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(Je.onMouseLeave,()=>{N.current=!1,st.current&&(clearTimeout(st.current),st.current=void 0),Ct.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,ee,u,ht,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{st.current&&clearTimeout(st.current),Ct.current&&clearTimeout(Ct.current)},[]);const vt=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Ee=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:G,ref:Wn(Lt,it=>{ue(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:be.onComplete,onClose:P,getAnchorProps:Qe,getArrowProps:ce,getArrowInnerProps:Me,getPopoverPositionerProps:De,getPopoverProps:We,getTriggerProps:ut,getHeaderProps:vt,getBodyProps:Ee}}function hw(e,t){return e===t||e?.contains(t)}function wA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function m_(e){const t=Oi("Popover",e),{children:n,...r}=vn(e),i=u1(),o=zge({...r,direction:i.direction});return x(Nge,{value:o,children:x(Dge,{value:t,children:Ige(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}m_.displayName="Popover";function v_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=u2(),s=t??n??r;return ae.createElement(Se.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(Se.div,{className:l2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}v_.displayName="PopoverArrow";var Bge=ke(function(t,n){const{getBodyProps:r}=xh(),i=u2();return ae.createElement(Se.div,{...r(t,n),className:l2("chakra-popover__body",t.className),__css:i.body})});Bge.displayName="PopoverBody";var Fge=ke(function(t,n){const{onClose:r}=xh(),i=u2();return x(Lb,{size:"sm",onClick:r,className:l2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Fge.displayName="PopoverCloseButton";function $ge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Hge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Wge=Se(zl.section),LF=ke(function(t,n){const{variants:r=Hge,...i}=t,{isOpen:o}=xh();return ae.createElement(Wge,{ref:n,variants:$ge(r),initial:!1,animate:o?"enter":"exit",...i})});LF.displayName="PopoverTransition";var y_=ke(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=u2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(Se.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(LF,{...i,...a(o,n),onAnimationComplete:Rge(l,o.onAnimationComplete),className:l2("chakra-popover__content",t.className),__css:h}))});y_.displayName="PopoverContent";var Vge=ke(function(t,n){const{getHeaderProps:r}=xh(),i=u2();return ae.createElement(Se.header,{...r(t,n),className:l2("chakra-popover__header",t.className),__css:i.header})});Vge.displayName="PopoverHeader";function b_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}b_.displayName="PopoverTrigger";function Uge(e,t,n){return(e-t)*100/(n-t)}var Gge=Sd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),jge=Sd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Yge=Sd({"0%":{left:"-40%"},"100%":{left:"100%"}}),qge=Sd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function AF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=Uge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var MF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(Se.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${jge} 2s linear infinite`:void 0},...r})};MF.displayName="Shape";var qC=e=>ae.createElement(Se.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});qC.displayName="Circle";var Kge=ke((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=AF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Gge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(Se.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},J(MF,{size:n,isIndeterminate:v,children:[x(qC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(qC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Kge.displayName="CircularProgress";var[Xge,Zge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Qge=ke((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=AF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Zge().filledTrack};return ae.createElement(Se.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),IF=ke((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),E=Oi("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${qge} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Yge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return ae.createElement(Se.div,{ref:t,borderRadius:P,__css:R,...w},J(Xge,{value:E,children:[x(Qge,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});IF.displayName="Progress";var Jge=Se("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Jge.displayName="CircularProgressLabel";var eme=(...e)=>e.filter(Boolean).join(" "),tme=e=>e?"":void 0;function nme(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var OF=ke(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(Se.select,{...a,ref:n,className:eme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});OF.displayName="SelectField";var RF=ke((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,E]=nme(b,CQ),P=R8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(Se.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(OF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(NF,{"data-disabled":tme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});RF.displayName="Select";var rme=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ime=Se("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),NF=e=>{const{children:t=x(rme,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ime,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};NF.displayName="SelectIcon";function ome(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ame(e){const t=lme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function DF(e){return!!e.touches}function sme(e){return DF(e)&&e.touches.length>1}function lme(e){return e.view??window}function ume(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function cme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function zF(e,t="page"){return DF(e)?ume(e,t):cme(e,t)}function dme(e){return t=>{const n=ame(t);(!n||n&&t.button===0)&&e(t)}}function fme(e,t=!1){function n(i){e(i,{point:zF(i)})}return t?dme(n):n}function q3(e,t,n,r){return ome(e,t,fme(n,t==="pointerdown"),r)}function BF(e){const t=C.exports.useRef(null);return t.current=e,t}var hme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,sme(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:zF(e)},{timestamp:i}=JP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,pw(r,this.history)),this.removeListeners=mme(q3(this.win,"pointermove",this.onPointerMove),q3(this.win,"pointerup",this.onPointerUp),q3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=pw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=vme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=JP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,NJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=pw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),DJ.update(this.updatePoint)}};function CA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pw(e,t){return{point:e.point,delta:CA(e.point,t[t.length-1]),offset:CA(e.point,t[0]),velocity:gme(t,.1)}}var pme=e=>e*1e3;function gme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>pme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function mme(...e){return t=>e.reduce((n,r)=>r(n),t)}function gw(e,t){return Math.abs(e-t)}function _A(e){return"x"in e&&"y"in e}function vme(e,t){if(typeof e=="number"&&typeof t=="number")return gw(e,t);if(_A(e)&&_A(t)){const n=gw(e.x,t.x),r=gw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function FF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=BF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new hme(v,h.current,s)}return q3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function yme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var bme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Sme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function $F({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return bme(()=>{const a=e(),s=a.map((l,u)=>yme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(Sme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xme(e){return typeof e=="object"&&e!==null&&"current"in e}function wme(e){const[t]=$F({observeMutation:!1,getNodes(){return[xme(e)?e.current:e]}});return t}var Cme=Object.getOwnPropertyNames,_me=(e,t)=>function(){return e&&(t=(0,e[Cme(e)[0]])(e=0)),t},_d=_me({"../../../react-shim.js"(){}});_d();_d();_d();var Oa=e=>e?"":void 0,L0=e=>e?!0:void 0,kd=(...e)=>e.filter(Boolean).join(" ");_d();function A0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}_d();_d();function kme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function dm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var K3={width:0,height:0},qy=e=>e||K3;function HF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??K3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...dm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>qy(w).height>qy(E).height?w:E,K3):r.reduce((w,E)=>qy(w).width>qy(E).width?w:E,K3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...dm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...dm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...dm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function WF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Eme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:O=0,...R}=e,N=dr(m),z=dr(v),V=dr(w),$=WF({isReversed:a,direction:s,orientation:l}),[j,ue]=cb({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,ee]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>E0(He,t,n)),Me=O*b,xe=Pme(me,t,n,Me),be=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=me,be.current.valueBounds=xe;const Ie=me.map(He=>n-He+t),De=($?Ie:me).map(He=>t4(He,t,n)),Qe=l==="vertical",st=C.exports.useRef(null),Ct=C.exports.useRef(null),ht=$F({getNodes(){const He=Ct.current,ct=He?.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),ut=C.exports.useId(),Ee=kme(u??ut),Je=C.exports.useCallback(He=>{var ct;if(!st.current)return;be.current.eventSource="pointer";const tt=st.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ct=He.touches)==null?void 0:ct[0])??He,er=Qe?tt.bottom-Zt:Nt-tt.left,lo=Qe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Gz(mi,t,n)},[Qe,$,n,t]),Lt=(n-t)/10,it=b||(n-t)/100,gt=C.exports.useMemo(()=>({setValueAtIndex(He,ct){if(!X)return;const tt=be.current.valueBounds[He];ct=parseFloat(zC(ct,tt.min,it)),ct=E0(ct,tt.min,tt.max);const Nt=[...be.current.value];Nt[He]=ct,ue(Nt)},setActiveIndex:G,stepUp(He,ct=it){const tt=be.current.value[He],Nt=$?tt-ct:tt+ct;gt.setValueAtIndex(He,Nt)},stepDown(He,ct=it){const tt=be.current.value[He],Nt=$?tt+ct:tt-ct;gt.setValueAtIndex(He,Nt)},reset(){ue(ce.current)}}),[it,$,ue,X]),an=C.exports.useCallback(He=>{const ct=He.key,Nt={ArrowRight:()=>gt.stepUp(K),ArrowUp:()=>gt.stepUp(K),ArrowLeft:()=>gt.stepDown(K),ArrowDown:()=>gt.stepDown(K),PageUp:()=>gt.stepUp(K,Lt),PageDown:()=>gt.stepDown(K,Lt),Home:()=>{const{min:Zt}=xe[K];gt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=xe[K];gt.setValueAtIndex(K,Zt)}}[ct];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),be.current.eventSource="keyboard")},[gt,K,Lt,xe]),{getThumbStyle:_t,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>HF({isReversed:$,orientation:l,thumbRects:ht,thumbPercents:De}),[$,l,De,ht]),Oe=C.exports.useCallback(He=>{var ct;const tt=He??K;if(tt!==-1&&M){const Nt=Ee.getThumb(tt),Zt=(ct=Ct.current)==null?void 0:ct.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Ee]);cd(()=>{be.current.eventSource==="keyboard"&&z?.(be.current.value)},[me,z]);const Xe=He=>{const ct=Je(He)||0,tt=be.current.value.map(mi=>Math.abs(mi-ct)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ct>be.current.value[Zt]&&(Zt=Zt+er.length-1),G(Zt),gt.setValueAtIndex(Zt,ct),Oe(Zt)},Xt=He=>{if(K==-1)return;const ct=Je(He)||0;G(K),gt.setValueAtIndex(K,ct),Oe(K)};FF(Ct,{onPanSessionStart(He){!X||(Q(!0),Xe(He),N?.(be.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(be.current.value))},onPan(He){!X||Xt(He)}});const Yt=C.exports.useCallback((He={},ct=null)=>({...He,...R,id:Ee.root,ref:Wn(ct,Ct),tabIndex:-1,"aria-disabled":L0(h),"data-focused":Oa(ne),style:{...He.style,...Ut}}),[R,h,ne,Ut,Ee]),_e=C.exports.useCallback((He={},ct=null)=>({...He,ref:Wn(ct,st),id:Ee.track,"data-disabled":Oa(h),style:{...He.style,...sn}}),[h,sn,Ee]),It=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.innerTrack,style:{...He.style,...yn}}),[yn,Ee]),ze=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He,Zt=me[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ct,role:"slider",tabIndex:X?0:void 0,id:Ee.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Zt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":L0(h),"aria-readonly":L0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,..._t(tt)},onKeyDown:A0(He.onKeyDown,an),onFocus:A0(He.onFocus,()=>{ee(!0),G(tt)}),onBlur:A0(He.onBlur,()=>{ee(!1),G(-1)})}},[Ee,me,xe,X,W,K,V,E,l,h,g,P,k,_t,an,ee]),ot=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.output,htmlFor:me.map((tt,Nt)=>Ee.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ee,me]),ln=C.exports.useCallback((He,ct=null)=>{const{value:tt,...Nt}=He,Zt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=t4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...dm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ct,id:Ee.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Ee]),Bn=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ct,id:Ee.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Ee]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>De[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:gt,getRootProps:Yt,getTrackProps:_e,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:ln,getInputProps:Bn,getOutputProps:ot}}function Pme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Tme,Db]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lme,S_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),VF=ke(function(t,n){const r=Oi("Slider",t),i=vn(t),{direction:o}=u1();i.direction=o;const{getRootProps:a,...s}=Eme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Tme,{value:l},ae.createElement(Lme,{value:r},ae.createElement(Se.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});VF.defaultProps={orientation:"horizontal"};VF.displayName="RangeSlider";var Ame=ke(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Db(),a=S_(),s=r(t,n);return ae.createElement(Se.div,{...s,className:kd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ame.displayName="RangeSliderThumb";var Mme=ke(function(t,n){const{getTrackProps:r}=Db(),i=S_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:kd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Mme.displayName="RangeSliderTrack";var Ime=ke(function(t,n){const{getInnerTrackProps:r}=Db(),i=S_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ime.displayName="RangeSliderFilledTrack";var Ome=ke(function(t,n){const{getMarkerProps:r}=Db(),i=r(t,n);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__marker",t.className)})});Ome.displayName="RangeSliderMark";_d();_d();function Rme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...O}=e,R=dr(m),N=dr(v),z=dr(w),V=WF({isReversed:a,direction:s,orientation:l}),[$,j]=cb({value:i,defaultValue:o??Dme(t,n),onChange:r}),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),ee=!(h||g),K=(n-t)/10,G=b||(n-t)/100,X=E0($,t,n),ce=n-X+t,Me=t4(V?ce:X,t,n),xe=l==="vertical",be=BF({min:t,max:n,step:b,isDisabled:h,value:X,isInteractive:ee,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useId(),st=u??Qe,[Ct,ht]=[`slider-thumb-${st}`,`slider-track-${st}`],ut=C.exports.useCallback(ze=>{var ot;if(!Ie.current)return;const ln=be.current;ln.eventSource="pointer";const Bn=Ie.current.getBoundingClientRect(),{clientX:He,clientY:ct}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ct:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Zt=tt/Nt;V&&(Zt=1-Zt);let er=Gz(Zt,ln.min,ln.max);return ln.step&&(er=parseFloat(zC(er,ln.min,ln.step))),er=E0(er,ln.min,ln.max),er},[xe,V,be]),vt=C.exports.useCallback(ze=>{const ot=be.current;!ot.isInteractive||(ze=parseFloat(zC(ze,ot.min,G)),ze=E0(ze,ot.min,ot.max),j(ze))},[G,j,be]),Ee=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;vt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;vt(ot)},reset(){vt(o||0)},stepTo(ze){vt(ze)}}),[vt,V,X,G,o]),Je=C.exports.useCallback(ze=>{const ot=be.current,Bn={ArrowRight:()=>Ee.stepUp(),ArrowUp:()=>Ee.stepUp(),ArrowLeft:()=>Ee.stepDown(),ArrowDown:()=>Ee.stepDown(),PageUp:()=>Ee.stepUp(K),PageDown:()=>Ee.stepDown(K),Home:()=>vt(ot.min),End:()=>vt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Ee,vt,K,be]),Lt=z?.(X)??E,it=wme(We),{getThumbStyle:gt,rootStyle:an,trackStyle:_t,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=be.current,ot=it??{width:0,height:0};return HF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Me]})},[V,it,Me,be]),sn=C.exports.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=We.current)==null?void 0:ot.focus()})},[be]);cd(()=>{const ze=be.current;sn(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function yn(ze){const ot=ut(ze);ot!=null&&ot!==be.current.value&&j(ot)}FF(De,{onPanSessionStart(ze){const ot=be.current;!ot.isInteractive||(W(!0),sn(),yn(ze),R?.(ot.value))},onPanSessionEnd(){const ze=be.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!be.current.isInteractive||yn(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...O,ref:Wn(ot,De),tabIndex:-1,"aria-disabled":L0(h),"data-focused":Oa(Q),style:{...ze.style,...an}}),[O,h,Q,an]),Xe=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Ie),id:ht,"data-disabled":Oa(h),style:{...ze.style,..._t}}),[h,ht,_t]),Xt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,We),role:"slider",tabIndex:ee?0:void 0,id:Ct,"data-active":Oa(ue),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":L0(h),"aria-readonly":L0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...gt(0)},onKeyDown:A0(ze.onKeyDown,Je),onFocus:A0(ze.onFocus,()=>ne(!0)),onBlur:A0(ze.onBlur,()=>ne(!1))}),[ee,Ct,ue,Lt,t,n,X,l,h,g,P,k,gt,Je]),_e=C.exports.useCallback((ze,ot=null)=>{const ln=!(ze.valuen),Bn=X>=ze.value,He=t4(ze.value,t,n),ct={position:"absolute",pointerEvents:"none",...Nme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!ln),"data-highlighted":Oa(Bn),style:{...ze.style,...ct}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:ue},actions:Ee,getRootProps:Oe,getTrackProps:Xe,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:_e,getInputProps:It}}function Nme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Dme(e,t){return t"}),[Bme,Bb]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),x_=ke((e,t)=>{const n=Oi("Slider",e),r=vn(e),{direction:i}=u1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Rme(r),l=a(),u=o({},t);return ae.createElement(zme,{value:s},ae.createElement(Bme,{value:n},ae.createElement(Se.div,{...l,className:kd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});x_.defaultProps={orientation:"horizontal"};x_.displayName="Slider";var UF=ke((e,t)=>{const{getThumbProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__thumb",e.className),__css:r.thumb})});UF.displayName="SliderThumb";var GF=ke((e,t)=>{const{getTrackProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__track",e.className),__css:r.track})});GF.displayName="SliderTrack";var jF=ke((e,t)=>{const{getInnerTrackProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});jF.displayName="SliderFilledTrack";var KC=ke((e,t)=>{const{getMarkerProps:n}=zb(),r=Bb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:kd("chakra-slider__marker",e.className),__css:r.mark})});KC.displayName="SliderMark";var Fme=(...e)=>e.filter(Boolean).join(" "),kA=e=>e?"":void 0,w_=ke(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Vz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(Se.label,{...h(),className:Fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(Se.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(Se.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":kA(s.isChecked),"data-hover":kA(s.isHovered)})),o&&ae.createElement(Se.span,{className:"chakra-switch__label",...g(),__css:b},o))});w_.displayName="Switch";var m1=(...e)=>e.filter(Boolean).join(" ");function XC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[$me,YF,Hme,Wme]=rD();function Vme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=cb({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Hme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Ume,c2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Gme(e){const{focusedIndex:t,orientation:n,direction:r}=c2(),i=YF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:XC(e.onKeyDown,o)}}function jme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=c2(),{index:u,register:h}=Wme({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Bhe({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:XC(e.onClick,m)}),w="button";return{...b,id:qF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":KF(a,u),onFocus:t?void 0:XC(e.onFocus,v)}}var[Yme,qme]=_n({});function Kme(e){const t=c2(),{id:n,selectedIndex:r}=t,o=Eb(e.children).map((a,s)=>C.exports.createElement(Yme,{key:s,value:{isSelected:s===r,id:KF(n,s),tabId:qF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Xme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=c2(),{isSelected:o,id:a,tabId:s}=qme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=MB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zme(){const e=c2(),t=YF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return ks(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function qF(e,t){return`${e}--tab-${t}`}function KF(e,t){return`${e}--tabpanel-${t}`}var[Qme,d2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),XF=ke(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=Vme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement($me,{value:l},ae.createElement(Ume,{value:h},ae.createElement(Qme,{value:r},ae.createElement(Se.div,{className:m1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});XF.displayName="Tabs";var Jme=ke(function(t,n){const r=Zme(),i={...t.style,...r},o=d2();return ae.createElement(Se.div,{ref:n,...t,className:m1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Jme.displayName="TabIndicator";var eve=ke(function(t,n){const r=Gme({...t,ref:n}),o={display:"flex",...d2().tablist};return ae.createElement(Se.div,{...r,className:m1("chakra-tabs__tablist",t.className),__css:o})});eve.displayName="TabList";var ZF=ke(function(t,n){const r=Xme({...t,ref:n}),i=d2();return ae.createElement(Se.div,{outline:"0",...r,className:m1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});ZF.displayName="TabPanel";var QF=ke(function(t,n){const r=Kme(t),i=d2();return ae.createElement(Se.div,{...r,width:"100%",ref:n,className:m1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});QF.displayName="TabPanels";var JF=ke(function(t,n){const r=d2(),i=jme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(Se.button,{...i,className:m1("chakra-tabs__tab",t.className),__css:o})});JF.displayName="Tab";var tve=(...e)=>e.filter(Boolean).join(" ");function nve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var rve=["h","minH","height","minHeight"],e$=ke((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=R8(o),s=i?nve(n,rve):n;return ae.createElement(Se.textarea,{ref:t,rows:i,...a,className:tve("chakra-textarea",r),__css:s})});e$.displayName="Textarea";function ive(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function ZC(e,...t){return ove(e)?e(...t):e}var ove=e=>typeof e=="function";function ave(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var sve=(e,t)=>e.find(n=>n.id===t);function EA(e,t){const n=t$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function t$(e,t){for(const[n,r]of Object.entries(e))if(sve(r,t))return n}function lve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function uve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var cve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},yl=dve(cve);function dve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=fve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=EA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:n$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=t$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(EA(yl.getState(),i).position)}}var PA=0;function fve(e,t={}){PA+=1;const n=t.id??PA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>yl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var hve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(zz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Fz,{children:l}),ae.createElement(Se.div,{flex:"1",maxWidth:"100%"},i&&x($z,{id:u?.title,children:i}),s&&x(Bz,{id:u?.description,display:"block",children:s})),o&&x(Lb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function n$(e={}){const{render:t,toastComponent:n=hve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function pve(e,t){const n=i=>({...t,...i,position:ave(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=n$(o);return yl.notify(a,o)};return r.update=(i,o)=>{yl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...ZC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...ZC(o.error,s)}))},r.closeAll=yl.closeAll,r.close=yl.close,r.isActive=yl.isActive,r}function f2(e){const{theme:t}=eD();return C.exports.useMemo(()=>pve(t.direction,e),[e,t.direction])}var gve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},r$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=gve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=pue();cd(()=>{v||r?.()},[v]),cd(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ive(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>lve(a),[a]);return ae.createElement(zl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(Se.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},ZC(n,{id:t,onClose:E})))});r$.displayName="ToastComponent";var mve=e=>{const t=C.exports.useSyncExternalStore(yl.subscribe,yl.getState,yl.getState),{children:n,motionVariants:r,component:i=r$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:uve(l),children:x(xd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return J(Ln,{children:[n,x(yh,{...o,children:s})]})};function vve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function yve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var bve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var o4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},QC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Sve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:O,...R}=e,{isOpen:N,onOpen:z,onClose:V}=AB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:ue,getArrowProps:W}=LB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:O}),Q=C.exports.useId(),ee=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Me=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=xve(K,Me),be=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=QC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Ie=C.exports.useCallback(()=>{X();const ut=QC(K);ce.current=ut.setTimeout(Me,n)},[n,Me,X]),We=C.exports.useCallback(()=>{N&&r&&Ie()},[r,Ie,N]),De=C.exports.useCallback(()=>{N&&a&&Ie()},[a,Ie,N]),Qe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Ie()},[N,Ie]);Qf(()=>o4(K),"keydown",s?Qe:void 0),Qf(()=>o4(K),"scroll",()=>{N&&o&&Me()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Qf(()=>K.current,"pointerleave",Ie);const st=C.exports.useCallback((ut={},vt=null)=>({...ut,ref:Wn(K,vt,$),onPointerEnter:Yg(ut.onPointerEnter,Je=>{Je.pointerType!=="touch"&&be()}),onClick:Yg(ut.onClick,We),onPointerDown:Yg(ut.onPointerDown,De),onFocus:Yg(ut.onFocus,be),onBlur:Yg(ut.onBlur,Ie),"aria-describedby":N?ee:void 0}),[be,Ie,De,N,ee,We,$]),Ct=C.exports.useCallback((ut={},vt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:b?`${b}px`:void 0,[Wr.arrowShadowColor.var]:w}},vt),[j,b,w]),ht=C.exports.useCallback((ut={},vt=null)=>{const Ee={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:vt,...R,...ut,id:ee,role:"tooltip",style:Ee}},[R,ee]);return{isOpen:N,show:be,hide:Ie,getTriggerProps:st,getTooltipProps:ht,getTooltipPositionerProps:Ct,getArrowProps:W,getArrowInnerProps:ue}}var mw="chakra-ui:close-tooltip";function xve(e,t){return C.exports.useEffect(()=>{const n=o4(e);return n.addEventListener(mw,t),()=>n.removeEventListener(mw,t)},[t,e]),()=>{const n=o4(e),r=QC(e);n.dispatchEvent(new r.CustomEvent(mw))}}var wve=Se(zl.div),pi=ke((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=u1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const V=zQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=Sve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(Se.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const O=!!l,R=k.getTooltipProps({},t),N=O?vve(R,["role","id"]):R,z=yve(R,["role","id"]);return a?J(Ln,{children:[M,x(xd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(Se.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},J(wve,{variants:bve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,O&&ae.createElement(Se.span,{srOnly:!0,...z},l),u&&ae.createElement(Se.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(Se.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var Cve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(fB,{environment:a,children:t});return x(Pae,{theme:o,cssVarsRoot:s,children:J(rN,{colorModeManager:n,options:o.config,children:[i?x(qfe,{}):x(Yfe,{}),x(Lae,{}),r?x(IB,{zIndex:r,children:l}):l]})})};function _ve({children:e,theme:t=yae,toastOptions:n,...r}){return J(Cve,{theme:t,...r,children:[e,x(mve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:C_(e)?2:__(e)?3:0}function M0(e,t){return v1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kve(e,t){return v1(e)===2?e.get(t):e[t]}function i$(e,t,n){var r=v1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function o$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function C_(e){return Mve&&e instanceof Map}function __(e){return Ive&&e instanceof Set}function Pf(e){return e.o||e.t}function k_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=s$(e);delete t[rr];for(var n=I0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Eve),Object.freeze(e),t&&uh(e,function(n,r){return E_(r,!0)},!0)),e}function Eve(){xs(2)}function P_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Tl(e){var t=n7[e];return t||xs(18,e),t}function Pve(e,t){n7[e]||(n7[e]=t)}function JC(){return Bv}function vw(e,t){t&&(Tl("Patches"),e.u=[],e.s=[],e.v=t)}function a4(e){e7(e),e.p.forEach(Tve),e.p=null}function e7(e){e===Bv&&(Bv=e.l)}function TA(e){return Bv={p:[],l:Bv,h:e,m:!0,_:0}}function Tve(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function yw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Tl("ES5").S(t,e,r),r?(n[rr].P&&(a4(t),xs(4)),Pu(e)&&(e=s4(t,e),t.l||l4(t,e)),t.u&&Tl("Patches").M(n[rr].t,e,t.u,t.s)):e=s4(t,n,[]),a4(t),t.u&&t.v(t.u,t.s),e!==a$?e:void 0}function s4(e,t,n){if(P_(t))return t;var r=t[rr];if(!r)return uh(t,function(o,a){return LA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return l4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=k_(r.k):r.o;uh(r.i===3?new Set(i):i,function(o,a){return LA(e,r,i,o,a,n)}),l4(e,i,!1),n&&e.u&&Tl("Patches").R(r,n,e.u,e.s)}return r.o}function LA(e,t,n,r,i,o){if(hd(i)){var a=s4(e,i,o&&t&&t.i!==3&&!M0(t.D,r)?o.concat(r):void 0);if(i$(n,r,a),!hd(a))return;e.m=!1}if(Pu(i)&&!P_(i)){if(!e.h.F&&e._<1)return;s4(e,i),t&&t.A.l||l4(e,i)}}function l4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&E_(t,n)}function bw(e,t){var n=e[rr];return(n?Pf(n):e)[t]}function AA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Fc(e){e.P||(e.P=!0,e.l&&Fc(e.l))}function Sw(e){e.o||(e.o=k_(e.t))}function t7(e,t,n){var r=C_(t)?Tl("MapSet").N(t,n):__(t)?Tl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:JC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Fv;a&&(l=[s],u=fm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Tl("ES5").J(t,n);return(n?n.A:JC()).p.push(r),r}function Lve(e){return hd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=v1(n);if(i){if(!i.P&&(i.i<4||!Tl("ES5").K(i)))return i.t;i.I=!0,r=MA(n,o),i.I=!1}else r=MA(n,o);return uh(r,function(a,s){i&&kve(i.t,a)===s||i$(r,a,t(s))}),o===3?new Set(r):r}(e)}function MA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return k_(e)}function Ave(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Fv.get(l,o)},set:function(l){var u=this[rr];Fv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Fc(s);break;case 4:n(s)&&Fc(s)}}}function n(o){for(var a=o.t,s=o.k,l=I0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!M0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!o$(m,g))return!0}}var b=!!a[rr];return l.length!==I0(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Tl("Patches").$;return hd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new Rve,l$=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function NA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function DA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(L_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Nve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:u4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function u$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function c4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return d4}function i(s,l){r(s)===d4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var $ve=function(t,n){return t===n};function Hve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?C2e:w2e;p$.useSyncExternalStore=e1.useSyncExternalStore!==void 0?e1.useSyncExternalStore:_2e;(function(e){e.exports=p$})(h$);var g$={exports:{}},m$={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var $b=C.exports,k2e=h$.exports;function E2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var P2e=typeof Object.is=="function"?Object.is:E2e,T2e=k2e.useSyncExternalStore,L2e=$b.useRef,A2e=$b.useEffect,M2e=$b.useMemo,I2e=$b.useDebugValue;m$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=L2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=M2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,P2e(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=T2e(e,o[0],o[1]);return A2e(function(){a.hasValue=!0,a.value=s},[s]),I2e(s),s};(function(e){e.exports=m$})(g$);function O2e(e){e()}let v$=O2e;const R2e=e=>v$=e,N2e=()=>v$,pd=C.exports.createContext(null);function y$(){return C.exports.useContext(pd)}const D2e=()=>{throw new Error("uSES not initialized!")};let b$=D2e;const z2e=e=>{b$=e},B2e=(e,t)=>e===t;function F2e(e=pd){const t=e===pd?y$:()=>C.exports.useContext(e);return function(r,i=B2e){const{store:o,subscription:a,getServerState:s}=t(),l=b$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const $2e=F2e();var H2e={exports:{}},In={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var M_=Symbol.for("react.element"),I_=Symbol.for("react.portal"),Hb=Symbol.for("react.fragment"),Wb=Symbol.for("react.strict_mode"),Vb=Symbol.for("react.profiler"),Ub=Symbol.for("react.provider"),Gb=Symbol.for("react.context"),W2e=Symbol.for("react.server_context"),jb=Symbol.for("react.forward_ref"),Yb=Symbol.for("react.suspense"),qb=Symbol.for("react.suspense_list"),Kb=Symbol.for("react.memo"),Xb=Symbol.for("react.lazy"),V2e=Symbol.for("react.offscreen"),S$;S$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case M_:switch(e=e.type,e){case Hb:case Vb:case Wb:case Yb:case qb:return e;default:switch(e=e&&e.$$typeof,e){case W2e:case Gb:case jb:case Xb:case Kb:case Ub:return e;default:return t}}case I_:return t}}}In.ContextConsumer=Gb;In.ContextProvider=Ub;In.Element=M_;In.ForwardRef=jb;In.Fragment=Hb;In.Lazy=Xb;In.Memo=Kb;In.Portal=I_;In.Profiler=Vb;In.StrictMode=Wb;In.Suspense=Yb;In.SuspenseList=qb;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===Gb};In.isContextProvider=function(e){return qa(e)===Ub};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===M_};In.isForwardRef=function(e){return qa(e)===jb};In.isFragment=function(e){return qa(e)===Hb};In.isLazy=function(e){return qa(e)===Xb};In.isMemo=function(e){return qa(e)===Kb};In.isPortal=function(e){return qa(e)===I_};In.isProfiler=function(e){return qa(e)===Vb};In.isStrictMode=function(e){return qa(e)===Wb};In.isSuspense=function(e){return qa(e)===Yb};In.isSuspenseList=function(e){return qa(e)===qb};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Hb||e===Vb||e===Wb||e===Yb||e===qb||e===V2e||typeof e=="object"&&e!==null&&(e.$$typeof===Xb||e.$$typeof===Kb||e.$$typeof===Ub||e.$$typeof===Gb||e.$$typeof===jb||e.$$typeof===S$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(H2e);function U2e(){const e=N2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const VA={notify(){},get:()=>[]};function G2e(e,t){let n,r=VA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=U2e())}function u(){n&&(n(),n=void 0,r.clear(),r=VA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const j2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Y2e=j2e?C.exports.useLayoutEffect:C.exports.useEffect;function q2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=G2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Y2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||pd).Provider,{value:i,children:n})}function x$(e=pd){const t=e===pd?y$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const K2e=x$();function X2e(e=pd){const t=e===pd?K2e:x$(e);return function(){return t().dispatch}}const Z2e=X2e();z2e(g$.exports.useSyncExternalStoreWithSelector);R2e(Dl.exports.unstable_batchedUpdates);var O_="persist:",w$="persist/FLUSH",R_="persist/REHYDRATE",C$="persist/PAUSE",_$="persist/PERSIST",k$="persist/PURGE",E$="persist/REGISTER",Q2e=-1;function X3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X3=function(n){return typeof n}:X3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},X3(e)}function UA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,V){return V.in(z,R,h)},h[R]);if(N!==void 0)try{g[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function rye(e){return JSON.stringify(e)}function iye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:O_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=oye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function oye(e){return JSON.parse(e)}function aye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:O_).concat(e.key);return t.removeItem(n,sye)}function sye(e){}function GA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function cye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var dye=5e3;function fye(e,t){var n=e.version!==void 0?e.version:Q2e;e.debug;var r=e.stateReconciler===void 0?tye:e.stateReconciler,i=e.getStoredState||iye,o=e.timeout!==void 0?e.timeout:dye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=uye(m,["_persist"]),w=b;if(g.type===_$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=nye(e)),v)return uu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),uu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===k$)return s=!0,g.result(aye(e)),uu({},t(w,g),{_persist:v});if(g.type===w$)return g.result(a&&a.flush()),uu({},t(w,g),{_persist:v});if(g.type===C$)l=!0;else if(g.type===R_){if(s)return uu({},w,{_persist:uu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,O=uu({},M,{_persist:uu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(uu({},R,{_persist:v}))}}function jA(e){return gye(e)||pye(e)||hye()}function hye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function pye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function gye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:P$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case E$:return i7({},t,{registry:[].concat(jA(t.registry),[n.key])});case R_:var r=t.registry.indexOf(n.key),i=jA(t.registry);return i.splice(r,1),i7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function yye(e,t,n){var r=n||!1,i=L_(vye,P$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:E$,key:u})},a=function(u,h,g){var m={type:R_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=i7({},i,{purge:function(){var u=[];return e.dispatch({type:k$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:w$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:C$})},persist:function(){e.dispatch({type:_$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var N_={},D_={};D_.__esModule=!0;D_.default=xye;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function kw(){}var bye={getItem:kw,setItem:kw,removeItem:kw};function Sye(e){if((typeof self>"u"?"undefined":Z3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function xye(e){var t="".concat(e,"Storage");return Sye(t)?self[t]:bye}N_.__esModule=!0;N_.default=_ye;var wye=Cye(D_);function Cye(e){return e&&e.__esModule?e:{default:e}}function _ye(e){var t=(0,wye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var T$=void 0,kye=Eye(N_);function Eye(e){return e&&e.__esModule?e:{default:e}}var Pye=(0,kye.default)("local");T$=Pye;var L$={},A$={},ch={};Object.defineProperty(ch,"__esModule",{value:!0});ch.PLACEHOLDER_UNDEFINED=ch.PACKAGE_NAME=void 0;ch.PACKAGE_NAME="redux-deep-persist";ch.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(z_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=ch,n=z_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const ee in W){const K=Q?`${Q}.${ee}`:ee,G=W[ee];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${ee}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const ee=W[ne];Q[ne]=(0,e._cloneDeep)(ee)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const b=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),ee=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(ee,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(ee))return ne.valueOf()===ee.valueOf()?{}:ee;const G=Object.keys(ee).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=ee[ce],X;const me=(0,e.difference)(ne[ce],ee[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(ee)||!(0,e.isArray)(ne)&&(0,e.isArray)(ee)?ee:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=b;const w=function(W,Q){return Q.reduce((ne,ee)=>{if(ne){const K=parseInt(ee,10),G=(0,e.isIntegerString)(ee)&&K<0?ne.length+K:ee;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((ee,K,G)=>(G===Q.length-1&&ee&&(0,e.isObjectLike)(ee)&&delete ee[K],ee&&ee[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const ee=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(ee))for(const X in ee)if((0,e.isObjectLike)(ee[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],ee[X]);else if((0,e.isArray)(Q)){let ce=ee[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=ee[X]!==t.PLACEHOLDER_UNDEFINED?ee[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,ee,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=ee?ee+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},O=function(W,Q,ne,ee){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",ee),K};e.preserveUndefined=O;const R=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=R;const N=function(W){return W.reduce((Q,ne)=>{const ee=W.filter(Me=>Me===ne),K=W.filter(Me=>(ne+".").indexOf(Me+".")===0),{duplicates:G,subsets:X}=Q,ce=ee.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?ee:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const ee=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${ee} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. - - ${JSON.stringify(X)} - - ${G}`);if(ce.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(ce)} - - ${G}`)};e.singleTransformValidator=z;const V=function(W){if(!(0,e.isArray)(W))return;const Q=W?.map(ne=>ne.deepPersistKey).filter(ne=>ne)||[];if(Q.length){const ne=Q.filter((ee,K)=>Q.indexOf(ee)!==K);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(ne)}`)}};e.transformsValidator=V;const $=function({whitelist:W,blacklist:Q}){if(W&&W.length&&Q&&Q.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(W){const{duplicates:ne,subsets:ee}=(0,e.findDuplicatesAndSubsets)(W);(0,e.throwError)({duplicates:ne,subsets:ee},"whitelist")}if(Q){const{duplicates:ne,subsets:ee}=(0,e.findDuplicatesAndSubsets)(Q);(0,e.throwError)({duplicates:ne,subsets:ee},"blacklist")}};e.configValidator=$;const j=function({duplicates:W,subsets:Q},ne){if(W.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ne}. - - ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(Q)}`)};e.throwError=j;const ue=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const ee=ne.split("."),K=ee[0],G=ee.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=ue})(A$);(function(e){var t=bs&&bs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=T.map(ue=>Object.keys(ue)[0]),N=M.map(ue=>Object.keys(ue)[0]),z=O.filter(ue=>R.indexOf(ue)===-1&&N.indexOf(ue)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(ue=>(0,e.createBlacklist)(ue)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(L$);const Q3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return B_(r)?r:!1},B_=e=>Boolean(typeof e=="string"?Tye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),h4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Lye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,T=8,M=16,O=32,R=64,N=128,z=256,V=512,$=30,j="...",ue=800,W=16,Q=1,ne=2,ee=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Me=me-1,xe=me>>>1,be=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",O],["partialRight",R],["rearg",z]],Ie="[object Arguments]",We="[object Array]",De="[object AsyncFunction]",Qe="[object Boolean]",st="[object Date]",Ct="[object DOMException]",ht="[object Error]",ut="[object Function]",vt="[object GeneratorFunction]",Ee="[object Map]",Je="[object Number]",Lt="[object Null]",it="[object Object]",gt="[object Promise]",an="[object Proxy]",_t="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",Xe="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",_e="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",ln="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ct="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,k1=RegExp(mi.source),ya=RegExp(Os.source),Lh=/<%-([\s\S]+?)%>/g,E1=/<%([\s\S]+?)%>/g,$u=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Id=/[\\^$.*+?()[\]{}|]/g,P1=RegExp(Id.source),Hu=/^\s+/,Od=/\s/,T1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rs=/\{\n\/\* \[wrapped with (.+)\] \*/,Wu=/,? & /,L1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,A1=/[()=,{}\[\]\/\s]/,M1=/\\(\\)?/g,I1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,O1=/^[-+]0x[0-9a-f]+$/i,R1=/^0b[01]+$/i,N1=/^\[object .+?Constructor\]$/,D1=/^0o[0-7]+$/i,z1=/^(?:0|[1-9]\d*)$/,B1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,F1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Hl="\\u0300-\\u036f",Wl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Vl=Hl+Wl+Ds,Ih="\\u2700-\\u27bf",Vu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",bn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+bn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Vl+"]",Rd="\\d+",Ul="["+Ih+"]",Qa="["+Vu+"]",Nd="[^"+Xa+Gr+Rd+Ih+Vu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Oh="(?:"+Za+"|"+vi+")",Rh="[^"+Xa+"]",Dd="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",Gl="(?:"+Qa+"|"+Nd+")",$1="(?:"+uo+"|"+Nd+")",Uu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Gu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",zd=Oh+"?",ju="["+kr+"]?",ba="(?:"+$s+"(?:"+[Rh,Dd,Fs].join("|")+")"+ju+zd+")*",Bd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=ju+zd+ba,Nh="(?:"+[Ul,Dd,Fs].join("|")+")"+Ht,Yu="(?:"+[Rh+Za+"?",Za,Dd,Fs,Bs].join("|")+")",qu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+Yu+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Uu+"(?="+[jr,uo,"$"].join("|")+")",$1+"+"+Gu+"(?="+[jr,uo+Gl,"$"].join("|")+")",uo+"?"+Gl+"+"+Uu,uo+"+"+Gu,jl,Bd,Rd,Nh].join("|"),"g"),Fd=RegExp("["+$s+Xa+Vl+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$d=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,un={};un[It]=un[ze]=un[ot]=un[ln]=un[Bn]=un[He]=un[ct]=un[tt]=un[Nt]=!0,un[Ie]=un[We]=un[Yt]=un[Qe]=un[_e]=un[st]=un[ht]=un[ut]=un[Ee]=un[Je]=un[it]=un[_t]=un[Ut]=un[sn]=un[Xe]=!1;var Wt={};Wt[Ie]=Wt[We]=Wt[Yt]=Wt[_e]=Wt[Qe]=Wt[st]=Wt[It]=Wt[ze]=Wt[ot]=Wt[ln]=Wt[Bn]=Wt[Ee]=Wt[Je]=Wt[it]=Wt[_t]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[He]=Wt[ct]=Wt[tt]=Wt[Nt]=!0,Wt[ht]=Wt[ut]=Wt[Xe]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},H1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof bs=="object"&&bs&&bs.Object===Object&&bs,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,hn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Vi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,Hs=hn&&hn.isSet,W1=hn&&hn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function V1(re,ye,ge,Ge){for(var Et=-1,Qt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ge=-1,Et=re==null?0:re.length;++Ge-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Zu(ye,re[ge],0)>-1;);return ge}function G1(re,ye){for(var ge=re.length,Ge=0;ge--;)re[ge]===ye&&++Ge;return Ge}var k2=Ud(Fh),es=Ud(H1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function ql(re){return Fd.test(re)}function Vh(re){return zh.test(re)}function E2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ge,Et){ge[++ye]=[Et,Ge]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ge=re.length,Et=0,Qt=[];++ge-1}function G2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Uo.prototype.clear=V2,Uo.prototype.delete=U2,Uo.prototype.get=ag,Uo.prototype.has=sg,Uo.prototype.set=G2;function Go(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,S,A,D,F){var Y,Z=p&g,le=p&m,we=p&v;if(S&&(Y=D?S(c,A,D,F):S(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Rt(c);if(Ce){if(Y=wU(c),!Z)return _i(c,Y)}else{var Te=ui(c),Ue=Te==ut||Te==vt;if(kc(c))return el(c,Z);if(Te==it||Te==Ie||Ue&&!D){if(Y=le||Ue?{}:Dk(c),!Z)return le?kg(c,gc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Te])return D?c:{};Y=CU(c,Te,Z)}}F||(F=new yr);var lt=F.get(c);if(lt)return lt;F.set(c,Y),dE(c)?c.forEach(function(xt){Y.add(ai(xt,p,S,xt,c,F))}):uE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,S,jt,c,F))});var St=we?le?pe:Xo:le?So:ci,$t=Ce?n:St(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,S,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(S){return ep(S,c,p)}}function ep(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var D=S[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function dg(c,p,S){if(typeof c!="function")throw new bi(a);return Ag(function(){c.apply(n,S)},p)}function mc(c,p,S,A){var D=-1,F=Ri,Y=!0,Z=c.length,le=[],we=p.length;if(!Z)return le;S&&(p=$n(p,Er(S))),A?(F=$h,Y=!1):p.length>=i&&(F=Ju,Y=!1,p=new _a(p));e:for(;++DD?0:D+S),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=S>A?0:hE(A);S0&&S(Z)?p>1?Tr(Z,p-1,S,A,D):xa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(S){return ru(c[S])})}function Ys(c,p){p=Js(p,c);for(var S=0,A=p.length;c!=null&&Sp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in cn(c)}function sp(c,p,S){return c>=Kr(p,S)&&c=120&&Ce.length>=120)?new _a(Y&&Ce):n}Ce=c[0];var Te=-1,Ue=Z[0];e:for(;++Te-1;)Z!==c&&Qd.call(Z,le,1),Qd.call(c,le,1);return c}function lf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var D=p[S];if(S==A||D!==F){var F=D;nu(D)?Qd.call(c,D,1):vp(c,D)}}return c}function uf(c,p){return c+Xl(eg()*(p-c+1))}function Zs(c,p,S,A){for(var D=-1,F=vr(tf((p-c)/(S||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=S;return Y}function wc(c,p){var S="";if(!c||p<1||p>G)return S;do p%2&&(S+=c),p=Xl(p/2),p&&(c+=c);while(p);return S}function kt(c,p){return zS(Fk(c,p,xo),c+"")}function fp(c){return pc(_p(c))}function cf(c,p){var S=_p(c);return J2(S,Ql(p,0,S.length))}function eu(c,p,S,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),S=S>D?D:S,S<0&&(S+=D),D=p>S?0:S-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(S?Y<=p:Y=i){var we=p?null:H(c);if(we)return qd(we);Y=!1,D=Ju,le=new _a}else le=p?[]:Z;e:for(;++A=A?c:Ar(c,p,S)}var xg=M2||function(c){return yt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var S=c.length,A=ic?ic(S):new c.constructor(S);return c.copy(A),A}function wg(c){var p=new c.constructor(c.byteLength);return new Si(p).set(new Si(c)),p}function tu(c,p){var S=p?wg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function K2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return rf?cn(rf.call(c)):{}}function X2(c,p){var S=p?wg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function Cg(c,p){if(c!==p){var S=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,le=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&le&&!Z&&!we||A&&Y&&le||!S&&le||!D)return 1;if(!A&&!F&&!we&&c=Z)return le;var we=S[A];return le*(we=="desc"?-1:1)}}return c.index-p.index}function Z2(c,p,S,A){for(var D=-1,F=c.length,Y=S.length,Z=-1,le=p.length,we=vr(F-Y,0),Ce=ge(le+we),Te=!A;++Z1?S[D-1]:n,Y=D>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Ki(S[0],S[1],Y)&&(F=D<3?n:F,D=1),p=cn(p);++A-1?D[F?p[Y]:Y]:n}}function Pg(c){return nr(function(p){var S=p.length,A=S,D=Gi.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new bi(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new Gi([],!0)}for(A=Y?A:S;++A1&&Jt.reverse(),Ce&&leZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Te=-1,Ue=!0,lt=S&w?new _a:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(T1,`{ -/* [wrapped with `+p+`] */ -`)}function kU(c){return Rt(c)||yf(c)||!!(Q1&&c&&c[Q1])}function nu(c,p){var S=typeof c;return p=p??G,!!p&&(S=="number"||S!="symbol"&&z1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=ue)return arguments[0]}else p=0;return c.apply(n,arguments)}}function J2(c,p){var S=-1,A=c.length,D=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Zk(c,S)});function Qk(c){var p=B(c);return p.__chain__=!0,p}function DG(c,p){return p(c),c}function ey(c,p){return p(c)}var zG=nr(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Gt)||!nu(S)?this.thru(D):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:ey,args:[D],thisArg:n}),new Gi(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function BG(){return Qk(this)}function FG(){return new Gi(this.value(),this.__chain__)}function $G(){this.__values__===n&&(this.__values__=fE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function HG(){return this}function WG(c){for(var p,S=this;S instanceof of;){var A=Gk(S);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;S=S.__wrapped__}return D.__wrapped__=c,p}function VG(){var c=this.__wrapped__;if(c instanceof Gt){var p=c;return this.__actions__.length&&(p=new Gt(this)),p=p.reverse(),p.__actions__.push({func:ey,args:[BS],thisArg:n}),new Gi(p,this.__chain__)}return this.thru(BS)}function UG(){return Qs(this.__wrapped__,this.__actions__)}var GG=bp(function(c,p,S){tn.call(c,S)?++c[S]:jo(c,S,1)});function jG(c,p,S){var A=Rt(c)?Fn:fg;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}function YG(c,p){var S=Rt(c)?ho:qo;return S(c,Pe(p,3))}var qG=Eg(jk),KG=Eg(Yk);function XG(c,p){return Tr(ty(c,p),1)}function ZG(c,p){return Tr(ty(c,p),K)}function QG(c,p,S){return S=S===n?1:Dt(S),Tr(ty(c,p),S)}function Jk(c,p){var S=Rt(c)?Gn:rs;return S(c,Pe(p,3))}function eE(c,p){var S=Rt(c)?fo:tp;return S(c,Pe(p,3))}var JG=bp(function(c,p,S){tn.call(c,S)?c[S].push(p):jo(c,S,[p])});function ej(c,p,S,A){c=bo(c)?c:_p(c),S=S&&!A?Dt(S):0;var D=c.length;return S<0&&(S=vr(D+S,0)),ay(c)?S<=D&&c.indexOf(p,S)>-1:!!D&&Zu(c,p,S)>-1}var tj=kt(function(c,p,S){var A=-1,D=typeof p=="function",F=bo(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,S):is(Y,p,S)}),F}),nj=bp(function(c,p,S){jo(c,S,p)});function ty(c,p){var S=Rt(c)?$n:Sr;return S(c,Pe(p,3))}function rj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),wi(c,p,S))}var ij=bp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function oj(c,p,S){var A=Rt(c)?Hd:Hh,D=arguments.length<3;return A(c,Pe(p,4),S,D,rs)}function aj(c,p,S){var A=Rt(c)?x2:Hh,D=arguments.length<3;return A(c,Pe(p,4),S,D,tp)}function sj(c,p){var S=Rt(c)?ho:qo;return S(c,iy(Pe(p,3)))}function lj(c){var p=Rt(c)?pc:fp;return p(c)}function uj(c,p,S){(S?Ki(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?oi:cf;return A(c,p)}function cj(c){var p=Rt(c)?LS:li;return p(c)}function dj(c){if(c==null)return 0;if(bo(c))return ay(c)?wa(c):c.length;var p=ui(c);return p==Ee||p==Ut?c.size:Lr(c).length}function fj(c,p,S){var A=Rt(c)?Ku:vo;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}var hj=kt(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Ki(c,p[0],p[1])?p=[]:S>2&&Ki(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ny=I2||function(){return yt.Date.now()};function pj(c,p){if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function tE(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function nE(c,p){var S;if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var $S=kt(function(c,p,S){var A=E;if(S.length){var D=Vo(S,Ve($S));A|=O}return fe(c,A,p,S,D)}),rE=kt(function(c,p,S){var A=E|P;if(S.length){var D=Vo(S,Ve(rE));A|=O}return fe(p,A,c,S,D)});function iE(c,p,S){p=S?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=iE.placeholder,A}function oE(c,p,S){p=S?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=oE.placeholder,A}function aE(c,p,S){var A,D,F,Y,Z,le,we=0,Ce=!1,Te=!1,Ue=!0;if(typeof c!="function")throw new bi(a);p=Pa(p)||0,lr(S)&&(Ce=!!S.leading,Te="maxWait"in S,F=Te?vr(Pa(S.maxWait)||0,p):F,Ue="trailing"in S?!!S.trailing:Ue);function lt(Ir){var us=A,ou=D;return A=D=n,we=Ir,Y=c.apply(ou,us),Y}function St(Ir){return we=Ir,Z=Ag(jt,p),Ce?lt(Ir):Y}function $t(Ir){var us=Ir-le,ou=Ir-we,kE=p-us;return Te?Kr(kE,F-ou):kE}function xt(Ir){var us=Ir-le,ou=Ir-we;return le===n||us>=p||us<0||Te&&ou>=F}function jt(){var Ir=ny();if(xt(Ir))return Jt(Ir);Z=Ag(jt,$t(Ir))}function Jt(Ir){return Z=n,Ue&&A?lt(Ir):(A=D=n,Y)}function Qo(){Z!==n&&xg(Z),we=0,A=le=D=Z=n}function Xi(){return Z===n?Y:Jt(ny())}function Jo(){var Ir=ny(),us=xt(Ir);if(A=arguments,D=this,le=Ir,us){if(Z===n)return St(le);if(Te)return xg(Z),Z=Ag(jt,p),lt(le)}return Z===n&&(Z=Ag(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Xi,Jo}var gj=kt(function(c,p){return dg(c,1,p)}),mj=kt(function(c,p,S){return dg(c,Pa(p)||0,S)});function vj(c){return fe(c,V)}function ry(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new bi(a);var S=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=S.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return S.cache=F.set(D,Y)||F,Y};return S.cache=new(ry.Cache||Go),S}ry.Cache=Go;function iy(c){if(typeof c!="function")throw new bi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function yj(c){return nE(2,c)}var bj=IS(function(c,p){p=p.length==1&&Rt(p[0])?$n(p[0],Er(Pe())):$n(Tr(p,1),Er(Pe()));var S=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,S);++D=p}),yf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!Z1.call(c,"callee")},Rt=ge.isArray,Rj=Yr?Er(Yr):pg;function bo(c){return c!=null&&oy(c.length)&&!ru(c)}function Mr(c){return xr(c)&&bo(c)}function Nj(c){return c===!0||c===!1||xr(c)&&si(c)==Qe}var kc=O2||QS,Dj=co?Er(co):gg;function zj(c){return xr(c)&&c.nodeType===1&&!Mg(c)}function Bj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||kc(c)||Cp(c)||yf(c)))return!c.length;var p=ui(c);if(p==Ee||p==Ut)return!c.size;if(Lg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Fj(c,p){return yc(c,p)}function $j(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?yc(c,p,n,S):!!A}function WS(c){if(!xr(c))return!1;var p=si(c);return p==ht||p==Ct||typeof c.message=="string"&&typeof c.name=="string"&&!Mg(c)}function Hj(c){return typeof c=="number"&&qh(c)}function ru(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==vt||p==De||p==an}function lE(c){return typeof c=="number"&&c==Dt(c)}function oy(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var uE=Vi?Er(Vi):MS;function Wj(c,p){return c===p||bc(c,p,Pt(p))}function Vj(c,p,S){return S=typeof S=="function"?S:n,bc(c,p,Pt(p),S)}function Uj(c){return cE(c)&&c!=+c}function Gj(c){if(TU(c))throw new Et(o);return cp(c)}function jj(c){return c===null}function Yj(c){return c==null}function cE(c){return typeof c=="number"||xr(c)&&si(c)==Je}function Mg(c){if(!xr(c)||si(c)!=it)return!1;var p=oc(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ii}var VS=Sa?Er(Sa):ar;function qj(c){return lE(c)&&c>=-G&&c<=G}var dE=Hs?Er(Hs):Bt;function ay(c){return typeof c=="string"||!Rt(c)&&xr(c)&&si(c)==sn}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==yn}var Cp=W1?Er(W1):zr;function Kj(c){return c===n}function Xj(c){return xr(c)&&ui(c)==Xe}function Zj(c){return xr(c)&&si(c)==Xt}var Qj=_(qs),Jj=_(function(c,p){return c<=p});function fE(c){if(!c)return[];if(bo(c))return ay(c)?Ni(c):_i(c);if(ac&&c[ac])return E2(c[ac]());var p=ui(c),S=p==Ee?Uh:p==Ut?qd:_p;return S(c)}function iu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=iu(c),S=p%1;return p===p?S?p-S:p:0}function hE(c){return c?Ql(Dt(c),0,me):0}function Pa(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Ui(c);var S=R1.test(c);return S||D1.test(c)?Ye(c.slice(2),S?2:8):O1.test(c)?ce:+c}function pE(c){return ka(c,So(c))}function eY(c){return c?Ql(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Yi(c)}var tY=qi(function(c,p){if(Lg(p)||bo(p)){ka(p,ci(p),c);return}for(var S in p)tn.call(p,S)&&js(c,S,p[S])}),gE=qi(function(c,p){ka(p,So(p),c)}),sy=qi(function(c,p,S,A){ka(p,So(p),c,A)}),nY=qi(function(c,p,S,A){ka(p,ci(p),c,A)}),rY=nr(Qh);function iY(c,p){var S=Zl(c);return p==null?S:Ke(S,p)}var oY=kt(function(c,p){c=cn(c);var S=-1,A=p.length,D=A>2?p[2]:n;for(D&&Ki(p[0],p[1],D)&&(A=1);++S1),F}),ka(c,pe(c),S),A&&(S=ai(S,g|m|v,At));for(var D=p.length;D--;)vp(S,p[D]);return S});function CY(c,p){return vE(c,iy(Pe(p)))}var _Y=nr(function(c,p){return c==null?{}:yg(c,p)});function vE(c,p){if(c==null)return{};var S=$n(pe(c),function(A){return[A]});return p=Pe(p),dp(c,S,function(A,D){return p(A,D[0])})}function kY(c,p,S){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var D=eg();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return uf(c,p)}var DY=nl(function(c,p,S){return p=p.toLowerCase(),c+(S?SE(p):p)});function SE(c){return jS(xn(c).toLowerCase())}function xE(c){return c=xn(c),c&&c.replace(B1,k2).replace(Dh,"")}function zY(c,p,S){c=xn(c),p=Yi(p);var A=c.length;S=S===n?A:Ql(Dt(S),0,A);var D=S;return S-=p.length,S>=0&&c.slice(S,D)==p}function BY(c){return c=xn(c),c&&ya.test(c)?c.replace(Os,es):c}function FY(c){return c=xn(c),c&&P1.test(c)?c.replace(Id,"\\$&"):c}var $Y=nl(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),HY=nl(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),WY=xp("toLowerCase");function VY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Xl(D),S)+c+d(tf(D),S)}function UY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;return p&&A>>0,S?(c=xn(c),c&&(typeof p=="string"||p!=null&&!VS(p))&&(p=Yi(p),!p&&ql(c))?as(Ni(c),0,S):c.split(p,S)):[]}var ZY=nl(function(c,p,S){return c+(S?" ":"")+jS(p)});function QY(c,p,S){return c=xn(c),S=S==null?0:Ql(Dt(S),0,c.length),p=Yi(p),c.slice(S,S+p.length)==p}function JY(c,p,S){var A=B.templateSettings;S&&Ki(c,p,S)&&(p=n),c=xn(c),p=sy({},p,A,Ne);var D=sy({},p.imports,A.imports,Ne),F=ci(D),Y=Yd(D,F),Z,le,we=0,Ce=p.interpolate||Ns,Te="__p += '",Ue=Xd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===$u?I1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),lt="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` -`;c.replace(Ue,function(xt,jt,Jt,Qo,Xi,Jo){return Jt||(Jt=Qo),Te+=c.slice(we,Jo).replace(F1,Vs),jt&&(Z=!0,Te+=`' + -__e(`+jt+`) + -'`),Xi&&(le=!0,Te+=`'; -`+Xi+`; -__p += '`),Jt&&(Te+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),we=Jo+xt.length,xt}),Te+=`'; -`;var St=tn.call(p,"variable")&&p.variable;if(!St)Te=`with (obj) { -`+Te+` -} -`;else if(A1.test(St))throw new Et(s);Te=(le?Te.replace(Zt,""):Te).replace(er,"$1").replace(lo,"$1;"),Te="function("+(St||"obj")+`) { -`+(St?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(le?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Te+`return __p -}`;var $t=CE(function(){return Qt(F,lt+"return "+Te).apply(n,Y)});if($t.source=Te,WS($t))throw $t;return $t}function eq(c){return xn(c).toLowerCase()}function tq(c){return xn(c).toUpperCase()}function nq(c,p,S){if(c=xn(c),c&&(S||p===n))return Ui(c);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function rq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.slice(0,Y1(c)+1);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function iq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.replace(Hu,"");if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function oq(c,p){var S=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;S="length"in p?Dt(p.length):S,A="omission"in p?Yi(p.omission):A}c=xn(c);var F=c.length;if(ql(c)){var Y=Ni(c);F=Y.length}if(S>=F)return c;var Z=S-wa(A);if(Z<1)return A;var le=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return le+A;if(Y&&(Z+=le.length-Z),VS(D)){if(c.slice(Z).search(D)){var we,Ce=le;for(D.global||(D=Xd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Te=we.index;le=le.slice(0,Te===n?Z:Te)}}else if(c.indexOf(Yi(D),Z)!=Z){var Ue=le.lastIndexOf(D);Ue>-1&&(le=le.slice(0,Ue))}return le+A}function aq(c){return c=xn(c),c&&k1.test(c)?c.replace(mi,L2):c}var sq=nl(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),jS=xp("toUpperCase");function wE(c,p,S){return c=xn(c),p=S?n:p,p===n?Vh(c)?Kd(c):U1(c):c.match(p)||[]}var CE=kt(function(c,p){try{return yi(c,n,p)}catch(S){return WS(S)?S:new Et(S)}}),lq=nr(function(c,p){return Gn(p,function(S){S=rl(S),jo(c,S,$S(c[S],c))}),c});function uq(c){var p=c==null?0:c.length,S=Pe();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new bi(a);return[S(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var S=me,A=Kr(c,me);p=Pe(p),c-=me;for(var D=jd(A,p);++S0||p<0)?new Gt(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(me)},Ko(Gt.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,le=Y instanceof Gt,we=Z[0],Ce=le||Rt(Y),Te=function(jt){var Jt=D.apply(B,xa([jt],Z));return A&&Ue?Jt[0]:Jt};Ce&&S&&typeof we=="function"&&we.length!=1&&(le=Ce=!1);var Ue=this.__chain__,lt=!!this.__actions__.length,St=F&&!Ue,$t=le&&!lt;if(!F&&Ce){Y=$t?Y:new Gt(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ey,args:[Te],thisArg:n}),new Gi(xt,Ue)}return St&&$t?c.apply(this,Z):(xt=this.thru(Te),St?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=tc[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],D)}return this[S](function(Y){return p.apply(Rt(Y)?Y:[],D)})}}),Ko(Gt.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:S})}}),ts[gf(n,P).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=xi,Gt.prototype.value=B2,B.prototype.at=zG,B.prototype.chain=BG,B.prototype.commit=FG,B.prototype.next=$G,B.prototype.plant=WG,B.prototype.reverse=VG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=UG,B.prototype.first=B.prototype.head,ac&&(B.prototype[ac]=HG),B},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Tt._=Ca):yt._=Ca}).call(bs)})(Jr,Jr.exports);const Ze=Jr.exports;var Aye=Object.create,M$=Object.defineProperty,Mye=Object.getOwnPropertyDescriptor,Iye=Object.getOwnPropertyNames,Oye=Object.getPrototypeOf,Rye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Iye(t))!Rye.call(e,i)&&i!==n&&M$(e,i,{get:()=>t[i],enumerable:!(r=Mye(t,i))||r.enumerable});return e},I$=(e,t,n)=>(n=e!=null?Aye(Oye(e)):{},Nye(t||!e||!e.__esModule?M$(n,"default",{value:e,enumerable:!0}):n,e)),Dye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),O$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Zb=Be((e,t)=>{var n=O$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),zye=Be((e,t)=>{var n=Zb(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),Bye=Be((e,t)=>{var n=Zb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Fye=Be((e,t)=>{var n=Zb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),$ye=Be((e,t)=>{var n=Zb();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Qb=Be((e,t)=>{var n=Dye(),r=zye(),i=Bye(),o=Fye(),a=$ye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Qb();function r(){this.__data__=new n,this.size=0}t.exports=r}),Wye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Vye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),Uye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),R$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=R$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),F_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Gye=Be((e,t)=>{var n=F_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),jye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Jb=Be((e,t)=>{var n=F_(),r=Gye(),i=jye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),N$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),D$=Be((e,t)=>{var n=Jb(),r=N$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Yye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),qye=Be((e,t)=>{var n=Yye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),z$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Kye=Be((e,t)=>{var n=D$(),r=qye(),i=N$(),o=z$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Xye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),y1=Be((e,t)=>{var n=Kye(),r=Xye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),$_=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"Map");t.exports=i}),eS=Be((e,t)=>{var n=y1(),r=n(Object,"create");t.exports=r}),Zye=Be((e,t)=>{var n=eS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),Qye=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Jye=Be((e,t)=>{var n=eS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),e3e=Be((e,t)=>{var n=eS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),t3e=Be((e,t)=>{var n=eS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),n3e=Be((e,t)=>{var n=Zye(),r=Qye(),i=Jye(),o=e3e(),a=t3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=n3e(),r=Qb(),i=$_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),i3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),tS=Be((e,t)=>{var n=i3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),o3e=Be((e,t)=>{var n=tS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),a3e=Be((e,t)=>{var n=tS();function r(i){return n(this,i).get(i)}t.exports=r}),s3e=Be((e,t)=>{var n=tS();function r(i){return n(this,i).has(i)}t.exports=r}),l3e=Be((e,t)=>{var n=tS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),B$=Be((e,t)=>{var n=r3e(),r=o3e(),i=a3e(),o=s3e(),a=l3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Qb(),r=$_(),i=B$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Qb(),r=Hye(),i=Wye(),o=Vye(),a=Uye(),s=u3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),d3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),f3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),h3e=Be((e,t)=>{var n=B$(),r=d3e(),i=f3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),F$=Be((e,t)=>{var n=h3e(),r=p3e(),i=g3e(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),v3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),y3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),b3e=Be((e,t)=>{var n=F_(),r=m3e(),i=O$(),o=F$(),a=v3e(),s=y3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function N(z,V,$,j,ue,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case b:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var ee=j&l;if(ne||(ne=s),z.size!=V.size&&!ee)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,ue,W,Q);return Q.delete(z),G;case k:if(R)return R.call(z)==R.call(V)}return!1}t.exports=N}),S3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),x3e=Be((e,t)=>{var n=S3e(),r=H_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),_3e=Be((e,t)=>{var n=w3e(),r=C3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),k3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),E3e=Be((e,t)=>{var n=Jb(),r=nS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),P3e=Be((e,t)=>{var n=E3e(),r=nS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),T3e=Be((e,t)=>{function n(){return!1}t.exports=n}),$$=Be((e,t)=>{var n=Iu(),r=T3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),L3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),A3e=Be((e,t)=>{var n=Jb(),r=H$(),i=nS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",ue="[object Uint32Array]",W={};W[M]=W[O]=W[R]=W[N]=W[z]=W[V]=W[$]=W[j]=W[ue]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[b]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),M3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),I3e=Be((e,t)=>{var n=R$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),W$=Be((e,t)=>{var n=A3e(),r=M3e(),i=I3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),O3e=Be((e,t)=>{var n=k3e(),r=P3e(),i=H_(),o=$$(),a=L3e(),s=W$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),R3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),N3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),D3e=Be((e,t)=>{var n=N3e(),r=n(Object.keys,Object);t.exports=r}),z3e=Be((e,t)=>{var n=R3e(),r=D3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),B3e=Be((e,t)=>{var n=D$(),r=H$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),F3e=Be((e,t)=>{var n=O3e(),r=z3e(),i=B3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),$3e=Be((e,t)=>{var n=x3e(),r=_3e(),i=F3e();function o(a){return n(a,i,r)}t.exports=o}),H3e=Be((e,t)=>{var n=$3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),O=m.get(l);if(M&&O)return M==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=y1(),r=Iu(),i=n(r,"DataView");t.exports=i}),V3e=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"Promise");t.exports=i}),U3e=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"Set");t.exports=i}),G3e=Be((e,t)=>{var n=y1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),j3e=Be((e,t)=>{var n=W3e(),r=$_(),i=V3e(),o=U3e(),a=G3e(),s=Jb(),l=z$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=b||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(O){var R=s(O),N=R==h?O.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case T:return v}return R}),t.exports=M}),Y3e=Be((e,t)=>{var n=c3e(),r=F$(),i=b3e(),o=H3e(),a=j3e(),s=H_(),l=$$(),u=W$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,T,M,O,R){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,ue=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return R||(R=new n),N||u(P)?r(P,k,T,M,O,R):i(P,k,V,T,M,O,R);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=ue&&w.call(k,"__wrapped__");if(Q||ne){var ee=Q?P.value():P,K=ne?k.value():k;return R||(R=new n),O(ee,K,T,M,R)}}return W?(R||(R=new n),o(P,k,T,M,O,R)):!1}t.exports=E}),q3e=Be((e,t)=>{var n=Y3e(),r=nS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),V$=Be((e,t)=>{var n=q3e();function r(i,o){return n(i,o)}t.exports=r}),K3e=["ctrl","shift","alt","meta","mod"],X3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Ew(e,t=","){return typeof e=="string"?e.split(t):e}function Ym(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>X3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!K3e.includes(o));return{...r,keys:i}}function Z3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Q3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function J3e(e){return U$(e,["input","textarea","select"])}function U$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function e5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var t5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},n5e=C.exports.createContext(void 0),r5e=()=>C.exports.useContext(n5e),i5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),o5e=()=>C.exports.useContext(i5e),a5e=I$(V$());function s5e(e){let t=C.exports.useRef(void 0);return(0,a5e.default)(t.current,e)||(t.current=e),t.current}var qA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function pt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=s5e(a),{enabledScopes:h}=o5e(),g=r5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!e5e(h,u?.scopes))return;let m=w=>{if(!(J3e(w)&&!U$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){qA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Ew(e,u?.splitKey).forEach(E=>{let P=Ym(E,u?.combinationKey);if(t5e(w,P,o)||P.keys?.includes("*")){if(Z3e(w,P,u?.preventDefault),!Q3e(w,P,u?.enabled)){qA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.addHotkey(Ym(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.removeHotkey(Ym(w,u?.combinationKey)))}},[e,l,u,h]),i}I$(V$());var o7=new Set;function l5e(e){(Array.isArray(e)?e:[e]).forEach(t=>o7.add(Ym(t)))}function u5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Ym(t);for(let r of o7)r.keys?.every(i=>n.keys?.includes(i))&&o7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{l5e(e.key)}),document.addEventListener("keyup",e=>{u5e(e.key)})});function c5e(){return J("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const d5e=()=>J("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),f5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),h5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),p5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),g5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var eo=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(eo||{});const m5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},Fa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(wd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:J(vh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(w_,{className:"invokeai__switch-root",...s})]})})};function G$(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return J(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Fke(i.target.checked))})]})}const KA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(KA)&&u!==Number(M)&&O(String(u))},[u,M]);const R=z=>{O(z),z.match(KA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=Ze.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(V)),h(V)};return x(pi,{...k,children:J(wd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(vh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),J(f_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(h_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&J("div",{className:"invokeai__number-input-stepper",children:[x(g_,{...P,className:"invokeai__number-input-stepper-button"}),x(p_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ou=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return J(wd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(vh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(RF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},v5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],y5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],S5e=[{key:"2x",value:2},{key:"4x",value:4}],W_=0,V_=4294967295,x5e=["gfpgan","codeformer"],w5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],C5e=dt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),_5e=dt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),U_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(C5e),{isGFPGANAvailable:i}=Le(_5e),o=l=>e(r5(l)),a=l=>e(LV(l)),s=l=>e(i5(l.target.value));return J(en,{direction:"column",gap:2,children:[x(Ou,{label:"Type",validValues:x5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function k5e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return x(Fa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(BV(r.target.checked))})}var j$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},XA=ae.createContext&&ae.createContext(j$),rd=globalThis&&globalThis.__assign||function(){return rd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function ws(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:O,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:ue,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:ee,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Me=Ie=>{const We=Ze.clamp(b?Math.floor(Number(Ie.target.value)):Number(Ie.target.value),o,me);ce(String(We)),l(We)},xe=Ie=>{ce(Ie),l(Number(Ie))},be=()=>{!T||T()};return J(wd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(vh,{className:"invokeai__slider-component-label",...V,children:r}),J(aB,{w:"100%",gap:2,children:[J(x_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...G,children:[h&&J(Ln,{children:[x(KC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(KC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(GF,{className:"invokeai__slider_track",...j,children:x(jF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...ee,children:x(UF,{className:"invokeai__slider-thumb",...ue})})]}),v&&J(f_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Me,className:"invokeai__slider-number-field",isDisabled:R,...W,children:[x(h_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),J(PF,{...ne,children:[x(g_,{className:"invokeai__slider-number-stepper"}),x(p_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(G_,{}),onClick:be,isDisabled:M,...K})]})]})}function q$(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return x(ws,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(R7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(R7(.5))}})}const K$=()=>x(Bl,{flex:"1",textAlign:"left",children:"Other Options"}),O5e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(MV(r.target.checked))})})},R5e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(DV(r.target.checked))})})},X$=()=>J(en,{gap:2,direction:"column",children:[x(R5e,{}),x(O5e,{})]}),j_=()=>x(Bl,{flex:"1",textAlign:"left",children:"Seed"});function N5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Fa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(zke(r.target.checked))})}function D5e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:W_,max:V_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const Z$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function z5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(Z$(W_,V_))),children:x("p",{children:"Shuffle"})})}function B5e(){const e=qe(),t=Le(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(HV(r)),value:t,isInteger:!1})}function F5e(){const e=qe(),t=Le(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(RV(r)),value:t,isInteger:!1})}const Y_=()=>J(en,{gap:2,direction:"column",children:[x(N5e,{}),J(en,{gap:2,children:[x(D5e,{}),x(z5e,{})]}),x(en,{gap:2,children:x(B5e,{})}),x(en,{gap:2,children:x(F5e,{})})]});function Q$(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return J(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Bke(i.target.checked))})]})}const $5e=dt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),H5e=dt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),q_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le($5e),{isESRGANAvailable:r}=Le(H5e);return J("div",{className:"upscale-options",children:[x(Ou,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(N7(Number(a.target.value))),validValues:S5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(D7(a)),value:n,isInteger:!1})]})};function W5e(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return x(Fa,{isChecked:e,width:"auto",onChange:r=>t(Oke(r.target.checked))})}function K_(){return J(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(W5e,{})]})}function V5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return J(wd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(vh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x($8,{...s,className:"input-entry",size:"sm",width:o})]})}function U5e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n(zV(i.target.value));return x(V5e,{label:"Seed Weights",value:e,isInvalid:t&&!(B_(e)||e===""),isDisabled:!t,onChange:r})}function G5e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Hke(i)),isInteger:!1})}const X_=()=>J(en,{gap:2,direction:"column",children:[x(G5e,{}),x(U5e,{})]});function j5e(){const e=qe(),t=Le(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(TV(r)),value:t,width:Z_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=dt(e=>e.options,e=>xS[e.activeTab],{memoizeOptions:{equalityCheck:Ze.isEqual}}),Y5e=dt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),J$=e=>e.options;function q5e(){const e=Le(i=>i.options.height),t=Le(_r),n=qe();return x(Ou,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(AV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const K5e=dt([e=>e.options,Y5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function X5e(){const e=qe(),{iterations:t,mayGenerateMultipleImages:n}=Le(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Ake(i)),value:t,width:Z_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Le(r=>r.options.sampler),t=qe();return x(Ou,{label:"Sampler",value:e,onChange:r=>t(NV(r.target.value)),validValues:v5e,styleClass:"main-option-block"})}function Q5e(){const e=qe(),t=Le(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e($V(r)),value:t,width:Z_,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Le(i=>i.options.width),t=Le(_r),n=qe();return x(Ou,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(WV(Number(i.target.value))),validValues:y5e,styleClass:"main-option-block"})}const Z_="auto";function Q_(){return x("div",{className:"main-options",children:J("div",{className:"main-options-list",children:[J("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(j5e,{})]}),J("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},eH=Fb({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:yu,addLogEntry:Co,setShouldShowLogViewer:Pw,setIsConnected:ZA,setSocketId:wTe,setShouldConfirmOnDelete:tH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:J3,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:QA,errorSeen:nH,setModelList:JA,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:hm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=eH.actions,h4e=eH.reducer;function p4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function rH(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=dt(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Le(y4e),{text:r}=m5e[t];return n?J(m_,{trigger:"hover",children:[x(b_,{children:x(Bl,{children:e})}),J(y_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(v_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},S4e=ke(({feature:e,icon:t=p4e},n)=>x(b4e,{feature:e,children:x(Bl,{ref:n,children:x(va,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,options:r}=e;return J(Uf,{className:"advanced-settings-item",children:[x("h2",{children:J(Wf,{className:"advanced-settings-header",children:[t,x(S4e,{feature:n}),x(Vf,{})]})}),x(Gf,{className:"advanced-settings-panel",children:r})]})}const J_=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return x(Cb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(x4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function iH(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function oH(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function ek(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function aH(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function rS(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function sH(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function O4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function lH(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function eM(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function uH(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function b1(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function tk(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function nk(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],rk=e=>e.kind==="line"&&e.layer==="mask",ebe=e=>e.kind==="line"&&e.layer==="base",p4=e=>e.kind==="image"&&e.layer==="base",tbe=e=>e.kind==="line",zn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,cH=e=>e.canvas.layerState.objects.find(p4),dH=dt([e=>e.options,e=>e.system,cH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(B_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ze.isEqual,resultEqualityCheck:Ze.isEqual}}),a7=ti("socketio/generateImage"),nbe=ti("socketio/runESRGAN"),rbe=ti("socketio/runFacetool"),ibe=ti("socketio/deleteImage"),s7=ti("socketio/requestImages"),tM=ti("socketio/requestNewImages"),obe=ti("socketio/cancelProcessing"),abe=ti("socketio/requestSystemConfig"),fH=ti("socketio/requestModelChange"),sbe=ti("socketio/saveStagingAreaImageToGallery"),lbe=ti("socketio/requestEmptyTempFolder"),ra=ke((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function hH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(dH),o=Le(_r),a=()=>{r(a7(o))};return pt(["ctrl+enter","meta+enter"],()=>{i&&r(a7(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const ube=dt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function pH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(ube),a=()=>n(obe());return pt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const cbe=dt(e=>e.options,e=>e.shouldLoopback),dbe=()=>{const e=qe(),t=Le(cbe);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(Nke(!t))}})},ik=()=>{const e=Le(_r);return J("div",{className:"process-buttons",children:[x(hH,{}),e==="img2img"&&x(dbe,{}),x(pH,{})]})},fbe=dt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ok=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(fbe),{isReady:r}=Le(dH),i=C.exports.useRef(null),o=s=>{e(wS(s.target.value))};pt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(a7(n)))};return x("div",{className:"prompt-bar",children:x(wd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(e$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function gH(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function mH(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function hbe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function pbe(e,t){e.classList?e.classList.add(t):hbe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function nM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function gbe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=nM(e.className,t):e.setAttribute("class",nM(e.className&&e.className.baseVal||"",t))}const rM={disabled:!1},vH=ae.createContext(null);var yH=function(t){return t.scrollTop},pm="unmounted",Tf="exited",Lf="entering",Hp="entered",l7="exiting",Nu=function(e){t_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Tf,o.appearStatus=Lf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=pm:l=Tf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===pm?{status:Tf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Lf&&a!==Hp&&(o=Lf):(a===Lf||a===Hp)&&(o=l7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Lf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ky.findDOMNode(this);a&&yH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Tf&&this.setState({status:pm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[ky.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||rM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Lf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ky.findDOMNode(this);if(!o||rM.disabled){this.safeSetState({status:Tf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:l7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Tf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:ky.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===pm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Q8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(vH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Nu.contextType=vH;Nu.propTypes={};function Rp(){}Nu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rp,onEntering:Rp,onEntered:Rp,onExit:Rp,onExiting:Rp,onExited:Rp};Nu.UNMOUNTED=pm;Nu.EXITED=Tf;Nu.ENTERING=Lf;Nu.ENTERED=Hp;Nu.EXITING=l7;const mbe=Nu;var vbe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return pbe(t,r)})},Tw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gbe(t,r)})},ak=function(e){t_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,jc=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Dp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},iM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),ybe=e=>({width:jc(e.width,64),height:jc(e.height,64)}),bbe=.999,Sbe=.1,xbe=20,qg=.95,Lw=60,gm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},wbe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:gm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},SH=Fb({name:"canvas",initialState:wbe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!rk(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(Ze.clamp(n.width,64,512),64),height:gl(Ze.clamp(n.height,64,512),64)},o={x:jc(n.width/2-i.width/2,64),y:jc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...gm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Np(r.width,r.height,n.width,n.height,qg),s=Dp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(Ze.clamp(i,64,n/e.stageScale),64),s=gl(Ze.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=ybe(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=iM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...gm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(tbe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=gm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(p4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Np(i.width,i.height,512,512,qg),g=Dp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Np(t,n,o,a,.95),u=Dp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=iM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(p4)){const i=Np(r.width,r.height,512,512,qg),o=Dp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Np(r,i,s,l,qg),h=Dp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Np(r,i,512,512,qg),h=Dp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...gm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(Ze.clamp(o,64,512),64),height:gl(Ze.clamp(a,64,512),64)},l={x:jc(o/2-s.width/2,64),y:jc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor=e.colorPickerColor,e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:Cbe,addLine:xH,addPointToCurrentLine:wH,clearMask:_be,commitColorPickerColor:kbe,setColorPickerColor:Ebe,commitStagingAreaImage:Pbe,discardStagedImages:Tbe,fitBoundingBoxToStage:CTe,nextStagingAreaImage:Lbe,prevStagingAreaImage:Abe,redo:Mbe,resetCanvas:CH,resetCanvasInteractionState:Ibe,resetCanvasView:Obe,resizeAndScaleCanvas:_H,resizeCanvas:Rbe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:mm,setBoundingBoxPreviewFill:_Te,setBrushColor:Nbe,setBrushSize:Mw,setCanvasContainerDimensions:Dbe,clearCanvasHistory:kH,setCursorPosition:EH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:sk,setInpaintReplace:oM,setIsDrawing:iS,setIsMaskEnabled:PH,setIsMouseOverBoundingBox:Ky,setIsMoveBoundingBoxKeyHeld:kTe,setIsMoveStageKeyHeld:ETe,setIsMovingBoundingBox:aM,setIsMovingStage:g4,setIsTransformingBoundingBox:Iw,setLayer:TH,setMaskColor:zbe,setMergedCanvas:Bbe,setShouldAutoSave:Fbe,setShouldCropToBoundingBoxOnSave:$be,setShouldDarkenOutsideBoundingBox:Hbe,setShouldLockBoundingBox:PTe,setShouldPreserveMaskedArea:Wbe,setShouldShowBoundingBox:Vbe,setShouldShowBrush:TTe,setShouldShowBrushPreview:LTe,setShouldShowCanvasDebugInfo:Ube,setShouldShowCheckboardTransparency:ATe,setShouldShowGrid:Gbe,setShouldShowIntermediates:jbe,setShouldShowStagingImage:Ybe,setShouldShowStagingOutline:sM,setShouldSnapToGrid:qbe,setShouldUseInpaintReplace:Kbe,setStageCoordinates:LH,setStageDimensions:MTe,setStageScale:Xbe,setTool:O0,toggleShouldLockBoundingBox:ITe,toggleTool:OTe,undo:Zbe}=SH.actions,Qbe=SH.reducer,AH=""+new URL("logo.13003d72.png",import.meta.url).href,Jbe=dt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),lk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(Jbe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;pt("o",()=>{t(sd(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),pt("esc",()=>{t(sd(!1))},{enabled:()=>!i,preventDefault:!0},[i]),pt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Mke(a.current?a.current.scrollTop:0)),t(sd(!1)),t(Rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Dke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(bH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:J("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(gH,{}):x(mH,{})})}),!i&&J("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:AH,alt:"invoke-ai-logo"}),J("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function eSe(){const e={seed:{header:x(j_,{}),feature:eo.SEED,options:x(Y_,{})},variations:{header:x(K_,{}),feature:eo.VARIATIONS,options:x(X_,{})},face_restore:{header:x(G$,{}),feature:eo.FACE_CORRECTION,options:x(U_,{})},upscale:{header:x(Q$,{}),feature:eo.UPSCALE,options:x(q_,{})},other:{header:x(K$,{}),feature:eo.OTHER,options:x(X$,{})}};return J(lk,{children:[x(ok,{}),x(ik,{}),x(Q_,{}),x(q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(k5e,{}),x(J_,{accordionInfo:e})]})}const uk=C.exports.createContext(null),tSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(uk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:J("div",{className:"image-upload-button",children:[x(tk,{}),x(Jf,{size:"lg",children:"Click or Drag and Drop"})]})})},nSe=dt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),u7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Mv(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(nSe),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(ibe(e)),o()};pt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(tH(!b.target.checked));return J(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(_F,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(J0,{children:J(kF,{className:"modal",children:[x(Rb,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Dv,{children:J(en,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(wd,{children:J(en,{alignItems:"center",children:[x(vh,{mb:0,children:"Don't ask me again"}),x(w_,{checked:!s,onChange:v})]})})]})}),J(Ob,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),id=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return J(m_,{...o,children:[x(b_,{children:t}),J(y_,{className:`invokeai__popover-content ${r}`,children:[i&&x(v_,{className:"invokeai__popover-arrow"}),n]})]})},rSe=dt([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),MH=()=>{const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(rSe),m=f2(),v=()=>{!u||(h&&e(md(!1)),e(y2(u)),e(ko("img2img")))},b=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};pt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Pke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};pt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};pt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(wS(u.metadata.image.prompt));pt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(nbe(u))};pt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(rbe(u))};pt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(FV(!l)),O=()=>{!u||(h&&e(md(!1)),e(sk(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return pt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),J("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(id,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:J("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(eM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:O,leftIcon:x(eM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:b,leftIcon:x(rS,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(sH,{}),size:"sm",children:x(eh,{download:!0,href:u?.url,children:"Download Image"})})]})})}),J(ia,{isAttached:!0,children:[x(mt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(mt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(mt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),J(ia,{isAttached:!0,children:[x(id,{trigger:"hover",triggerComponent:x(mt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:J("div",{className:"current-image-postprocessing-popover",children:[x(U_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(id,{trigger:"hover",triggerComponent:x(mt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:J("div",{className:"current-image-postprocessing-popover",children:[x(q_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(mt,{icon:x(aH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(u7,{image:u,children:x(mt,{icon:x(b1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},iSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},IH=Fb({name:"gallery",initialState:iSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:o0,clearIntermediateImage:Ow,removeImage:OH,setCurrentImage:oSe,addGalleryImages:aSe,setIntermediateImage:sSe,selectNextImage:ck,selectPrevImage:dk,setShouldPinGallery:lSe,setShouldShowGallery:od,setGalleryScrollPosition:uSe,setGalleryImageMinimumWidth:Kg,setGalleryImageObjectFit:cSe,setShouldHoldGalleryOpen:RH,setShouldAutoSwitchToNewImages:dSe,setCurrentCategory:Xy,setGalleryWidth:fSe,setShouldUseSingleGalleryColumn:hSe}=IH.actions,pSe=IH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:J("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:J("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var NH=at({displayName:"ExternalLinkIcon",path:J("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:J("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:J("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:J(Ln,{children:[x("defs",{children:J("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),J("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:J("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:J("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>J(en,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(rS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),J(en,{direction:i?"column":"row",children:[J(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?J(eh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(NH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mSe=(e,t)=>e.image.uuid===t.image.uuid,DH=C.exports.memo(({image:e,styleClass:t})=>{const n=qe();pt("esc",()=>{n(FV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:b,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:O,type:R,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:J(en,{gap:1,direction:"column",width:"100%",children:[J(en,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),J(eh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(NH,{mx:"2px"})]})]}),Object.keys(r).length>0?J(Ln,{children:[R&&x(On,{label:"Generation type",value:R}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(R)&&x(On,{label:"Original image",value:g}),R==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(r5(M))}),R==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(N7(E))}),R==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(D7(M))}),b&&x(On,{label:"Prompt",labelPosition:"top",value:Q3(b),onClick:()=>n(wS(b))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),O!==void 0&&x(On,{label:"Noise Threshold",value:O,onClick:()=>n(HV(O))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(RV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(NV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n($V(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(TV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:h4(N),onClick:()=>n(zV(h4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(DV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(MV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(WV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(AV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(y2(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(OV(h))}),R==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(R7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n(BV(a))}),v&&v.length>0&&J(Ln,{children:[x(Jf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:ue,strength:W}=$;return J(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:ue,onClick:()=>n(N7(ue))}),x(On,{label:"Strength",value:W,onClick:()=>n(D7(W))})]},j)}else if($.type==="gfpgan"){const{strength:ue}=$;return J(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:ue,onClick:()=>{n(r5(ue)),n(i5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:ue,fidelity:W}=$;return J(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:ue,onClick:()=>{n(r5(ue)),n(i5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(LV(W)),n(i5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),J(en,{gap:2,direction:"column",children:[J(en,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(rS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(tB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mSe),zH=dt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function vSe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le(zH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(dk())},g=()=>{e(ck())},m=()=>{e(md(!0))};return J("div",{className:"current-image-preview",children:[i&&x(kb,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&J("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(oH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(DH,{image:i,styleClass:"current-image-metadata"})]})}const ySe=dt([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),BH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(ySe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?J(Ln,{children:[x(MH,{}),x(vSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},bSe=()=>{const e=C.exports.useContext(uk);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(tk,{}),onClick:e||void 0})};function SSe(){const e=Le(i=>i.options.initialImage),t=qe(),n=f2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(PV())};return J(Ln,{children:[J("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(bSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(kb,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xSe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(r=>r.gallery);return J("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(SSe,{})}):x(tSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(BH,{})})]})};function wSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var CSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},ASe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],fM="__resizable_base__",FH=function(e){ESe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(fM):o.className+=fM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||PSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Rw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Rw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Rw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,M=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),N=Math.min(v,T);n=Qy(n,M,O),r=Qy(r,R,N)}else n=Qy(n,h,g),r=Qy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&TSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Jy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Jy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Jy(n)?n.touches[0].clientX:n.clientX,h=Jy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=LSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=dM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=dM(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=cM(M,this.props.grid[0]),z=cM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(b.endsWith("vw")){var ue=M/this.window.innerWidth*100;M=ue+"vw"}else if(b.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var ue=T/this.window.innerWidth*100;T=ue+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Dl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kSe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return ASe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return J(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function h2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,MSe(i,...t)]}function MSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ISe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function $H(...e){return t=>e.forEach(n=>ISe(n,t))}function ja(...e){return C.exports.useCallback($H(...e),e)}const $v=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(RSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(c7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(c7,An({},r,{ref:t}),n)});$v.displayName="Slot";const c7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...NSe(r,n.props),ref:$H(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});c7.displayName="SlotClone";const OSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function RSe(e){return C.exports.isValidElement(e)&&e.type===OSe}function NSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const DSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=DSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?$v:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function HH(e,t){e&&Dl.exports.flushSync(()=>e.dispatchEvent(t))}function WH(e){const t=e+"CollectionProvider",[n,r]=h2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(b,P.collectionRef);return ae.createElement($v,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(b,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement($v,{[h]:"",ref:T},E)});function m(v){const b=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((M,O)=>P.indexOf(M.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zSe=C.exports.createContext(void 0);function VH(e){const t=C.exports.useContext(zSe);return e||t||"ltr"}function Ol(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function BSe(e,t=globalThis?.document){const n=Ol(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const d7="dismissableLayer.update",FSe="dismissableLayer.pointerDownOutside",$Se="dismissableLayer.focusOutside";let hM;const HSe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),WSe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(HSe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,R=VSe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!O||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=USe(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return BSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(hM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),pM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=hM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),pM())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(d7,z),()=>document.removeEventListener(d7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function VSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){UH(FSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function USe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&UH($Se,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pM(){const e=new CustomEvent(d7);document.dispatchEvent(e)}function UH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?HH(i,o):i.dispatchEvent(o)}let Nw=0;function GSe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:gM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:gM()),Nw++,()=>{Nw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Nw--}},[])}function gM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Dw="focusScope.autoFocusOnMount",zw="focusScope.autoFocusOnUnmount",mM={bubbles:!1,cancelable:!0},jSe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ol(i),h=Ol(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Af(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Af(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){yM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Dw,mM);s.addEventListener(Dw,u),s.dispatchEvent(P),P.defaultPrevented||(YSe(QSe(GH(s)),{select:!0}),document.activeElement===w&&Af(s))}return()=>{s.removeEventListener(Dw,u),setTimeout(()=>{const P=new CustomEvent(zw,mM);s.addEventListener(zw,h),s.dispatchEvent(P),P.defaultPrevented||Af(w??document.body,{select:!0}),s.removeEventListener(zw,h),yM.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qSe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Af(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Af(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function YSe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Af(r,{select:t}),document.activeElement!==n)return}function qSe(e){const t=GH(e),n=vM(t,e),r=vM(t.reverse(),e);return[n,r]}function GH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vM(e,t){for(const n of e)if(!KSe(n,{upTo:t}))return n}function KSe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XSe(e){return e instanceof HTMLInputElement&&"select"in e}function Af(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XSe(e)&&t&&e.select()}}const yM=ZSe();function ZSe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=bM(e,t),e.unshift(t)},remove(t){var n;e=bM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function QSe(e){return e.filter(t=>t.tagName!=="A")}const t1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},JSe=Qw["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(JSe());return t1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function S1(e){return e.split("-")[0]}function oS(e){return e.split("-")[1]}function x1(e){return["top","bottom"].includes(S1(e))?"x":"y"}function fk(e){return e==="y"?"height":"width"}function SM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=x1(t),l=fk(s),u=r[l]/2-i[l]/2,h=S1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(oS(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=SM(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=jH(r),h={x:i,y:o},g=x1(a),m=oS(a),v=fk(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const O=P/2-k/2,R=u[w],N=M-b[v]-u[E],z=M/2-b[v]/2+O,V=f7(R,z,N),ue=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=oS(e),i=x1(e),o=fk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=y4(a)),{main:a,cross:y4(a)}}const lxe={start:"end",end:"start"};function wM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=y4(e);return[wM(e),t,wM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=S1(r),P=g||(w===a||!v?[y4(a)]:cxe(a)),k=[a,...P],T=await v4(t,b),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(O=[...O,{placement:r,overflows:M}],!M.every(V=>V<=0)){var R,N;const V=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=k[V];if($)return{data:{index:V,overflows:O},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const ue=(z=O.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;ue&&(j=ue);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function CM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _M(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await v4(r,{...n,elementContext:"reference"}),a=CM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_M(a)}}}case"escaped":{const o=await v4(r,{...n,altBoundary:!0}),a=CM(o,i.floating);return{data:{escapedOffsets:a,escaped:_M(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=S1(n),s=oS(n),l=x1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function YH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await v4(t,l),g=x1(S1(i)),m=YH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=f7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],T=b-h[P];b=f7(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=x1(i),m=YH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,N=o.reference[g]+o.reference[O]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const O=g==="y"?"width":"height",R=["top","left"].includes(S1(i)),N=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function qH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Du(e){if(e==null)return window;if(!qH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function p2(e){return Du(e).getComputedStyle(e)}function Lu(e){return qH(e)?"":e?(e.nodeName||"").toLowerCase():""}function KH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Rl(e){return e instanceof Du(e).HTMLElement}function gd(e){return e instanceof Du(e).Element}function vxe(e){return e instanceof Du(e).Node}function hk(e){if(typeof ShadowRoot>"u")return!1;const t=Du(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aS(e){const{overflow:t,overflowX:n,overflowY:r}=p2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function XH(e){const t=/firefox/i.test(KH()),n=p2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function ZH(){return!/^((?!chrome|android).)*safari/i.test(KH())}const kM=Math.min,qm=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Rl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=gd(e)?Du(e):window,g=!ZH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function Ed(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function sS(e){return gd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function QH(e){return Au(Ed(e)).left+sS(e).scrollLeft}function bxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function Sxe(e,t,n){const r=Rl(t),i=Ed(t),o=Au(e,r&&bxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||aS(i))&&(a=sS(t)),Rl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=QH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function JH(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(hk(e)?e.host:null)||Ed(e)}function EM(e){return!Rl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=JH(e);for(hk(t)&&(t=t.host);Rl(t)&&!["html","body"].includes(Lu(t));){if(XH(t))return t;t=t.parentNode}return null}function h7(e){const t=Du(e);let n=EM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=EM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!XH(n))?t:n||xxe(e)||t}function PM(e){if(Rl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rl(n),o=Ed(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||aS(o))&&(a=sS(n)),Rl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Du(e),r=Ed(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=ZH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=Ed(e),r=sS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=qm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=qm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+QH(e);const l=-r.scrollTop;return p2(i||n).direction==="rtl"&&(s+=qm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function eW(e){const t=JH(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Rl(t)&&aS(t)?t:eW(t)}function S4(e,t){var n;t===void 0&&(t=[]);const r=eW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Du(r),a=i?[o].concat(o.visualViewport||[],aS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(S4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&hk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function TM(e,t,n){return t==="viewport"?m4(Cxe(e,n)):gd(t)?Exe(t,n):m4(_xe(Ed(e)))}function Pxe(e){const t=S4(e),r=["absolute","fixed"].includes(p2(e).position)&&Rl(e)?h7(e):e;return gd(r)?t.filter(i=>gd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=TM(t,h,i);return u.top=qm(g.top,u.top),u.right=kM(g.right,u.right),u.bottom=kM(g.bottom,u.bottom),u.left=qm(g.left,u.left),u},TM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:gd,getDimensions:PM,getOffsetParent:h7,getDocumentElement:Ed,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Sxe(t,h7(n),r),floating:{...PM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>p2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...gd(e)?S4(e):[],...S4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),gd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&b();function b(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var p7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function g7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!g7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!g7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return p7(()=>{t.current=e}),t}function Oxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);g7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Dl.exports.flushSync(()=>{h(T)})})},[g,n,r]);p7(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);p7(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Rxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?xM({element:t.current,padding:n}).fn(i):{}:t?xM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return t1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const tW="Popper",[pk,nW]=h2(tW),[Dxe,rW]=pk(tW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=rW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),x4="PopperContent",[$xe,RTe]=pk(x4),[Hxe,Wxe]=pk(x4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...O}=e,R=rW(x4,h),[N,z]=C.exports.useState(null),V=ja(t,_t=>z(_t)),[$,j]=C.exports.useState(null),ue=Nxe($),W=(n=ue?.width)!==null&&n!==void 0?n:0,Q=(r=ue?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),ee=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:ee,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Me,x:xe,y:be,placement:Ie,middlewareData:We,update:De}=Oxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:b}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Rxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});t1(()=>{ce(R.anchor)},[ce,R.anchor]);const Qe=xe!==null&&be!==null,[st,Ct]=iW(Ie),ht=(i=We.arrow)===null||i===void 0?void 0:i.x,ut=(o=We.arrow)===null||o===void 0?void 0:o.y,vt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ee,Je]=C.exports.useState();t1(()=>{N&&Je(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(x4,h),gt=!Lt;C.exports.useLayoutEffect(()=>{if(!gt)return it.add(De),()=>{it.delete(De)}},[gt,it,De]),C.exports.useLayoutEffect(()=>{gt&&Qe&&Array.from(it).reverse().forEach(_t=>requestAnimationFrame(_t))},[gt,Qe,it]);const an={"data-side":st,"data-align":Ct,...O,ref:V,style:{...O.style,animation:Qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Me,left:0,top:0,transform:Qe?`translate3d(${Math.round(xe)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ee,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:st,onArrowChange:j,arrowX:ht,arrowY:ut,shouldHideArrow:vt},gt?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,an)):C.exports.createElement(Tu.div,an)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=iW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return b==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):b==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,M=g?E:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function iW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const oW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};oW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=t3(r.current);o.current=s==="mounted"?u:"none"},[s]),t1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=t3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),t1(()=>{if(t){const u=g=>{const v=t3(r.current).includes(g.animationName);g.target===t&&v&&Dl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=t3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function t3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ol(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ol(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Bw="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},gk="RovingFocusGroup",[m7,aW,twe]=WH(gk),[nwe,sW]=h2(gk,[twe]),[rwe,iwe]=nwe(gk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(m7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(m7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=VH(o),[b=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Ol(u),T=aW(n),M=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Bw,k),()=>N.removeEventListener(Bw,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(Bw,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),ue=$.find(ne=>ne.id===b),Q=[j,ue,...$].filter(Boolean).map(ne=>ne.ref.current);lW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=aW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(m7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>lW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function lW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],uW=["ArrowUp","PageDown","End"],vwe=[...mwe,...uW],lS="Menu",[v7,ywe,bwe]=WH(lS),[wh,cW]=h2(lS,[bwe,nW,sW]),mk=nW(),dW=sW(),[Swe,uS]=wh(lS),[xwe,vk]=wh(lS),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=mk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ol(o),m=VH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(Swe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=mk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[NTe,kwe]=wh(_we,{forceMount:void 0}),ad="MenuContent",[Ewe,fW]=wh(ad),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(ad,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uS(ad,e.__scopeMenu),a=vk(ad,e.__scopeMenu);return C.exports.createElement(v7.Provider,{scope:e.__scopeMenu},C.exports.createElement(oW,{present:r||o.open},C.exports.createElement(v7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=uS(ad,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return NB(o)},[]),C.exports.createElement(hW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=uS(ad,e.__scopeMenu);return C.exports.createElement(hW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),hW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=uS(ad,n),E=vk(ad,n),P=mk(n),k=dW(n),T=ywe(n),[M,O]=C.exports.useState(null),R=C.exports.useRef(null),N=ja(t,R,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),ue=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?xF:C.exports.Fragment,ne=v?{as:$v,allowPinchZoom:!0}:void 0,ee=G=>{var X,ce;const me=V.current+G,Me=T().filter(Qe=>!Qe.disabled),xe=document.activeElement,be=(X=Me.find(Qe=>Qe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Ie=Me.map(Qe=>Qe.textValue),We=Bwe(Ie,me,be),De=(ce=Me.find(Qe=>Qe.textValue===We))===null||ce===void 0?void 0:ce.ref.current;(function Qe(st){V.current=st,window.clearTimeout(z.current),st!==""&&(z.current=window.setTimeout(()=>Qe(""),1e3))})(me),De&&setTimeout(()=>De.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),GSe();const K=C.exports.useCallback(G=>{var X,ce;return ue.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=R.current)===null||X===void 0||X.focus(),O(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jSe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=R.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(WSe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:N,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Me=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Me&&ee(G.key));const xe=R.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Ie=T().filter(We=>!We.disabled).map(We=>We.ref.current);uW.includes(G.key)&&Ie.reverse(),Dwe(Ie)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,b7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";ue.current=me,W.current=G.clientX}}))})))))))}),y7="MenuItem",LM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=vk(y7,e.__scopeMenu),s=fW(y7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(LM,{bubbles:!0,cancelable:!0});g.addEventListener(LM,v=>r?.(v),{once:!0}),HH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=fW(y7,n),s=dW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(v7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,b7(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,b7(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Owe="MenuItemIndicator";wh(Owe,{checked:!1});const Rwe="MenuSub";wh(Rwe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function b7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,pW="ContextMenu",[Gwe,DTe]=h2(pW,[cW]),cS=cW(),[jwe,gW]=Gwe(pW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=cS(t),u=Ol(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=gW(qwe,n),o=cS(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,n3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,n3(u)),onPointerCancel:Kn(e.onPointerCancel,n3(u)),onPointerUp:Kn(e.onPointerUp,n3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=gW(Xwe,n),o=cS(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=cS(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function n3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,xf=Qwe,n6e=dt([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),r6e=dt([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),i6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,o6e=C.exports.memo(e=>{const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[b,w]=C.exports.useState(!1),E=f2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(wS(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(md(!1)),t(y2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(md(!1)),t(sk(l)),t(_H()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Tke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Eke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return J(Jwe,{onOpenChange:$=>{t(RH($))},children:[x(e6e,{children:J(Bl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(kb,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(oSe(l)),children:u&&x(va,{width:"50%",height:"50%",as:ek,className:"hoverable-image-check"})}),b&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(u7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),J(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(xf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(xf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(xf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(xf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(xf,{onClickCapture:O,children:"Send to Image To Image"}),x(xf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(u7,{image:l,children:x(xf,{"data-warning":!0,children:"Delete Image"})})]})]})},i6e),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Uz,{className:`invokeai__checkbox ${n}`,...r,children:t})},r3=320,AM=40,a6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},MM=400;function mW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:b,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Le(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:MM,galleryMaxWidth:MM}:a6e[u],[O,R]=C.exports.useState(b>=r3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),ue=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{b>=r3&&R(!1)},[b]);const Q=()=>{e(lSe(!i)),e(Li(!0))},ne=()=>{o?K():ee()},ee=()=>{e(od(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(od(!1)),e(RH(!1)),e(uSe(ue.current?ue.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(s7(n))},X=xe=>{e(Kg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};pt("g",()=>{ne()},[o,i]),pt("left",()=>{e(dk())},{enabled:!E},[E]),pt("right",()=>{e(ck())},{enabled:!E},[E]),pt("shift+g",()=>{Q()},[i]),pt("esc",()=>{e(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Me=32;return pt("shift+up",()=>{if(s<256){const xe=Ze.clamp(s+Me,32,256);e(Kg(xe))}},[s]),pt("shift+down",()=>{if(s>32){const xe=Ze.clamp(s-Me,32,256);e(Kg(xe))}},[s]),C.exports.useEffect(()=>{!ue.current||(ue.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(be){!i&&j.current&&!j.current.contains(be.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(bH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:J("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[J(FH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:b,height:i?"100%":"100vh"},onResizeStart:(xe,be,Ie)=>{$(Ie.clientHeight),Ie.style.height=`${Ie.clientHeight}px`,i&&(Ie.style.position="fixed",Ie.style.right="1rem",z(!0))},onResizeStop:(xe,be,Ie,We)=>{const De=i?Ze.clamp(Number(b)+We.width,T,Number(M)):Number(b)+We.width;e(fSe(De)),Ie.removeAttribute("data-resize-alert"),i&&(Ie.style.position="relative",Ie.style.removeProperty("right"),Ie.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,be,Ie,We)=>{const De=Ze.clamp(Number(b)+We.width,T,Number(i?M:.95*window.innerWidth));De>=r3&&!O?R(!0):DeDe-AM&&e(Kg(De-AM)),i&&(De>=M?Ie.setAttribute("data-resize-alert","true"):Ie.removeAttribute("data-resize-alert")),Ie.style.height=`${V}px`},children:[J("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?J(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Xy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Xy("user")),children:"Uploads"})]}):J(Ln,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Xy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Xy("user"))})]})}),J("div",{className:"image-gallery-header-right-icons",children:[x(id,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(nk,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:J("div",{className:"image-gallery-settings-popover",children:[J("div",{children:[x(ws,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Kg(64)),icon:x(G_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dSe(xe.target.checked))})}),x("div",{children:x(Aa,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hSe(xe.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(gH,{}):x(mH,{})})]})]}),x("div",{className:"image-gallery-container",ref:ue,children:t.length||v?J(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:be}=xe;return x(o6e,{image:xe,isSelected:r===be},be)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):J("div",{className:"image-gallery-container-placeholder",children:[x(rH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:b+"px",height:"100%"}})]})})}const s6e=dt([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),yk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Le(s6e),l=()=>{t($ke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:J("div",{className:"workarea-main",children:[n,J("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(wSe,{})})})]}),!a&&x(mW,{})]})})};function l6e(){return x(yk,{optionsPanel:x(eSe,{}),children:x(xSe,{})})}function u6e(){const e={seed:{header:x(j_,{}),feature:eo.SEED,options:x(Y_,{})},variations:{header:x(K_,{}),feature:eo.VARIATIONS,options:x(X_,{})},face_restore:{header:x(G$,{}),feature:eo.FACE_CORRECTION,options:x(U_,{})},upscale:{header:x(Q$,{}),feature:eo.UPSCALE,options:x(q_,{})},other:{header:x(K$,{}),feature:eo.OTHER,options:x(X$,{})}};return J(lk,{children:[x(ok,{}),x(ik,{}),x(Q_,{}),x(J_,{accordionInfo:e})]})}const c6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(BH,{})})});function d6e(){return x(yk,{optionsPanel:x(u6e,{}),children:x(c6e,{})})}var S7=function(e,t){return S7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},S7(e,t)};function f6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");S7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ll=function(){return Ll=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Pd(e,t,n,r){var i=T6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):bW(e,r,n,function(v){var b=s+h*v,w=l+g*v,E=u+m*v;o(b,w,E)})}}function T6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function L6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var A6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},bk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=L6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=A6e(a,l,u,s,h,g,Boolean(i));return m},n1=function(e,t){var n=bk(e,t);return e.bounds=n,n};function dS(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=x7(e,s-g,u+g,r),b=x7(t,l-m,h+m,r);return{x:v,y:b}}var x7=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function fS(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=dS(g,m,i,o,0,0,null);return v}function g2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var OM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=hS(o,n);return!l},RM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},M6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},I6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function O6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,b=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=fS(e,P,k,i,e.bounds,s||l),M=T.x,O=T.y;return{scale:i,positionX:w?M:n,positionY:E?O:r}}}function R6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,b=!m||!v;if(!(!a||b||!s)){var w=dS(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var N6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},w4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},D6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function B6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function NM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:x7(e,o,a,i)}function F6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function $6e(e,t){var n=D6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=F6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,b=l-i,w=h*h+g*g,E=Math.sqrt(w)/b;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function H6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=b.sizeX,O=b.sizeY,R=b.velocityAlignmentTime,N=R,z=B6e(e,l),V=Math.max(z,N),$=w4(e,M),j=w4(e,O),ue=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+ue,ne=h-ue,ee=g+W,K=m-W,G=e.transformState,X=new Date().getTime();bW(e,T,V,function(ce){var me=e.transformState,Me=me.scale,xe=me.positionX,be=me.positionY,Ie=new Date().getTime()-X,We=Ie/N,De=vW[b.animationType],Qe=1-De(Math.min(1,We)),st=1-ce,Ct=xe+a*st,ht=be+s*st,ut=NM(Ct,G.positionX,xe,k,v,h,u,ne,Q,Qe),vt=NM(ht,G.positionY,be,P,v,m,g,K,ee,Qe);(xe!==Ct||be!==ht)&&e.setTransformState(Me,ut,vt)})}}function DM(e,t){var n=e.transformState.scale;bl(e),n1(e,n),t.touches?I6e(e,t):M6e(e,t)}function zM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=N6e(e,t,n),u=l.x,h=l.y,g=w4(e,a),m=w4(e,s);$6e(e,{x:u,y:h}),R6e(e,u,h,g,m)}}function W6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?H6e(e):SW(e)}}function SW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&SW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,w=Sk(e,a,v,b);w&&Pd(e,w,h,g)}}function Sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=g2(Da(t,2),o,a,0,!1),u=n1(e,l),h=fS(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var a0={previousScale:1,scale:1,positionX:0,positionY:0},V6e=Ll(Ll({},a0),{setComponents:function(){},contextInstance:null}),Xg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},wW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:a0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:a0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:a0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:a0.positionY}},BM=function(e){var t=Ll({},Xg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Xg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Xg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ll(Ll({},Xg[n]),e[n]):s?t[n]=IM(IM([],Xg[n]),e[n]):t[n]=e[n]}}),t},CW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=g2(Da(h,3),s,a,u,!1);return g};function _W(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,b=CW(e,t,n),w=Sk(e,b,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Pd(e,w,r,i)}function kW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=wW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=bk(e,a.scale),m=dS(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Pd(e,v,t,n)}}function U6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return a0;var l=r.getBoundingClientRect(),u=G6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/m,w=r.offsetHeight/v,E=g2(n||Math.min(b,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,O=bk(e,E),R=dS(T,M,O,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function G6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function j6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var Y6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),_W(e,1,t,n,r)}},q6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),_W(e,-1,t,n,r)}},K6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Pd(e,v,i,o)}}},X6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),kW(e,t,n)}},Z6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=EW(t||i.scale,o,a);Pd(e,s,n,r)}}},Q6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&j6e(a)&&a&&o.contains(a)){var s=U6e(e,a,n);Pd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:Y6e(e),zoomOut:q6e(e),setTransform:K6e(e),resetTransform:X6e(e),centerView:Z6e(e),zoomToElement:Q6e(e)}},Fw=!1;function $w(){try{var e={get passive(){return Fw=!0,!1}};return e}catch{return Fw=!1,Fw}}var hS=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},FM=function(e){e&&clearTimeout(e)},J6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},EW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},eCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=hS(u,a);return!g};function tCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=h6e(t,n);return r}function PW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var nCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var b=r?!1:!m,w=g2(Da(v,3),u,l,g,b);return w},rCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},iCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=hS(a,i);return!l},oCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},aCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},TW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},sCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return g2(Da(g,2),a,o,l,!u)},lCe=160,uCe=100,cCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},dCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,b=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=tCe(t,null),P=nCe(e,E,w,!t.ctrlKey);if(l!==P){var k=n1(e,P),T=PW(t,o,l),M=b||v===0||h,O=u&&M,R=fS(e,T.x,T.y,P,k,O),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},fCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;FM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(xW(e,t.x,t.y),e.wheelAnimationTimer=null)},uCe);var o=rCe(e,t);o&&(FM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},lCe))},hCe=function(e,t){var n=TW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},pCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=aCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=TW(t),v=sCe(e,m);if(v!==i){var b=n1(e,v),w=u||h===0||s,E=a&&w,P=fS(e,g.x,g.y,v,b,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},gCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,xW(e,t?.x,t?.y)};function mCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return kW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=CW(e,h,o),m=PW(t,u,l),v=Sk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Pd(e,v,a,s)}}var vCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=hS(l,s);return!(g||!h)},LW=ae.createContext(V6e),yCe=function(e){f6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=wW(n.props),n.setup=BM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=$w();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=eCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(cCe(n,r),dCe(n,r),fCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=OM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),DM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=RM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),zM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(W6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=iCe(n,r);!l||(hCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=oCe(n);!l||(r.preventDefault(),r.stopPropagation(),pCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(gCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=OM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),DM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=RM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];zM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=vCe(n,r);!o||mCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,n1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=EW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=J6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=$w();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=$w();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(n1(this,this.transformState.scale),this.setup=BM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(LW.Provider,{value:Ll(Ll({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),bCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(yCe,{...Ll({},e,{setRef:i})})});function SCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var xCe=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,$M={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};SCe(xCe);var wCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(LW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+$M.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+$M.content+" "+o,style:s,children:t})})};function CCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(bCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:b})=>J(Ln,{children:[J("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(M5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(mt,{icon:x(I5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(L5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(A5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(G_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(wCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b()})})]})})}function _Ce(){const e=qe(),t=Le(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Le(zH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(dk())},g=()=>{e(ck())};return pt("Esc",()=>{t&&e(md(!1))},[t]),J("div",{className:"lightbox-container",children:[x(mt,{icon:x(T5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(md(!1))},fontSize:20}),J("div",{className:"lightbox-display-container",children:[J("div",{className:"lightbox-preview-wrapper",children:[x(MH,{}),!r&&J("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(oH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&J(Ln,{children:[x(CCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(DH,{image:n})]})]}),x(mW,{})]})]})}const kCe=dt(zn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ECe=()=>{const e=qe(),{boundingBoxDimensions:t}=Le(kCe),n=a=>{e(mm({...t,width:Math.floor(a)}))},r=a=>{e(mm({...t,height:Math.floor(a)}))},i=()=>{e(mm({...t,width:Math.floor(512)}))},o=()=>{e(mm({...t,height:Math.floor(512)}))};return J(en,{direction:"column",gap:"1rem",children:[x(ws,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(ws,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},PCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Bounding Box"}),m2=e=>e.system,TCe=e=>e.system.toastQueue,LCe=dt(zn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function ACe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Le(LCe),n=qe();return J(en,{alignItems:"center",columnGap:"1rem",children:[x(ws,{label:"Inpaint Replace",value:e,onChange:r=>{n(oM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(oM(1)),isResetDisabled:!t}),x(Fa,{isChecked:t,onChange:r=>n(Kbe(r.target.checked))})]})}const MCe=dt([J$,m2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ICe=()=>{const e=qe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Le(MCe);return J(en,{direction:"column",gap:"1rem",children:[x(ACe,{}),x(ws,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(CI(u))},handleReset:()=>e(CI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(wI(u))},handleReset:()=>{e(wI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(kI(u))},handleReset:()=>{e(kI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(_I(u))},handleReset:()=>{e(_I(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(Fa,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(Ike(u.target.checked))}}),x(Ou,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(IV(u.target.value))}),x(ws,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(EI(u))},handleReset:()=>{e(EI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},OCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function RCe(){const e={boundingBox:{header:x(PCe,{}),feature:eo.BOUNDING_BOX,options:x(ECe,{})},outpainting:{header:x(OCe,{}),feature:eo.OUTPAINTING,options:x(ICe,{})},seed:{header:x(j_,{}),feature:eo.SEED,options:x(Y_,{})},variations:{header:x(K_,{}),feature:eo.VARIATIONS,options:x(X_,{})}};return J(lk,{children:[x(ok,{}),x(ik,{}),x(Q_,{}),x(q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(J_,{accordionInfo:e})]})}const NCe=dt(zn,cH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),DCe=()=>{const e=qe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Le(NCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Dbe({width:a,height:s})),e(Rbe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(o2,{thickness:"2px",speed:"1s",size:"xl"})})};var zCe=Math.PI/180;function BCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const R0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:R0,version:"8.3.14",isBrowser:BCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*zCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:R0.document,_injectGlobal(e){R0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var FCe="[object Array]",$Ce="[object Number]",HCe="[object String]",WCe="[object Boolean]",VCe=Math.PI/180,UCe=180/Math.PI,Hw="#",GCe="",jCe="0",YCe="Konva warning: ",HM="Konva error: ",qCe="rgb(",Ww={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},KCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,i3=[];const XCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===FCe},_isNumber(e){return Object.prototype.toString.call(e)===$Ce&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===HCe},_isBoolean(e){return Object.prototype.toString.call(e)===WCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){i3.push(e),i3.length===1&&XCe(function(){const t=i3;i3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Hw,GCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=jCe+e;return Hw+e},getRGB(e){var t;return e in Ww?(t=Ww[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Hw?this._hexToRgb(e.substring(1)):e.substr(0,4)===qCe?(t=KCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Ww[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Td(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function AW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function MW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Td(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function xk(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function w1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function IW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function ZCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Td(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function QCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Td(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Zg="get",Qg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Zg+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Qg+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Qg+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=Zg+a(t),l=Qg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Qg+n,i=Zg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Zg+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Zg+de._capitalize(n),a=Qg+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function JCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=e7e+u.join(WM)+t7e)):(o+=s.property,t||(o+=a7e+s.val)),o+=i7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=l7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=VM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=JCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(dn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var e5="absoluteOpacity",a3="allEventListeners",cu="absoluteTransform",UM="absoluteScale",wf="canvas",f7e="Change",h7e="children",p7e="konva",w7="listening",GM="mouseenter",jM="mouseleave",YM="set",qM="Shape",t5=" ",KM="stage",Ic="transform",g7e="Stage",C7="visible",m7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(t5);let v7e=1;class $e{constructor(t){this._id=v7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Ic||t===cu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Ic||t===cu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(t5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(wf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===cu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(wf)){const{scene:t,filter:n,hit:r}=this._cache.get(wf);de.releaseCanvas(t,n,r),this._cache.delete(wf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new N0({pixelRatio:a,width:i,height:o}),v=new N0({pixelRatio:a,width:0,height:0}),b=new wk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(wf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(e5),this._clearSelfAndDescendantCache(UM),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(wf,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(wf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==h7e&&(r=YM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(w7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(C7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==g7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Ic),this._clearSelfAndDescendantCache(cu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Ic);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Ic),this._clearSelfAndDescendantCache(cu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(e5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=Sm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Uw.pointer;if(t==="touch")return Uw.touch;if(t==="mouse")return Uw.mouse};function ZM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",n5=[];class mS extends ca{constructor(t){super(ZM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),n5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ZM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===b7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&n5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(_7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new N0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+XM,this.content.style.height=n+XM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rw7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return RW(t,this)}setPointerCapture(t){NW(t,this)}releaseCapture(t){Km(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||C7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=Sm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=Sm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=Sm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Vw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=Sm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Vw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(_7,{evt:t}):this._fire(_7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(k7,{evt:t}):this._fire(k7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Vw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(s0,Ck(t)),Km(t.pointerId)}_lostpointercapture(t){Km(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new N0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new wk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}mS.prototype.nodeType=y7e;gr(mS);q.addGetterSetter(mS,"container");var jW="hasShadow",YW="shadowRGBA",qW="patternImage",KW="linearGradient",XW="radialGradient";let d3;function Gw(){return d3||(d3=de.createCanvasElement().getContext("2d"),d3)}const Xm={};function k7e(e){e.fill()}function E7e(e){e.stroke()}function P7e(e){e.fill()}function T7e(e){e.stroke()}function L7e(){this._clearCache(jW)}function A7e(){this._clearCache(YW)}function M7e(){this._clearCache(qW)}function I7e(){this._clearCache(KW)}function O7e(){this._clearCache(XW)}class Ae extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Xm)););this.colorKey=n,Xm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(jW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(qW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Gw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(KW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Gw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Xm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return RW(t,this)}setPointerCapture(t){NW(t,this)}releaseCapture(t){Km(t)}}Ae.prototype._fillFunc=k7e;Ae.prototype._strokeFunc=E7e;Ae.prototype._fillFuncHit=P7e;Ae.prototype._strokeFuncHit=T7e;Ae.prototype._centroid=!1;Ae.prototype.nodeType="Shape";gr(Ae);Ae.prototype.eventListeners={};Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",L7e);Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",A7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",M7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",O7e);q.addGetterSetter(Ae,"stroke",void 0,IW());q.addGetterSetter(Ae,"strokeWidth",2,Fe());q.addGetterSetter(Ae,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ae,"hitStrokeWidth","auto",xk());q.addGetterSetter(Ae,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ae,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ae,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ae,"lineJoin");q.addGetterSetter(Ae,"lineCap");q.addGetterSetter(Ae,"sceneFunc");q.addGetterSetter(Ae,"hitFunc");q.addGetterSetter(Ae,"dash");q.addGetterSetter(Ae,"dashOffset",0,Fe());q.addGetterSetter(Ae,"shadowColor",void 0,w1());q.addGetterSetter(Ae,"shadowBlur",0,Fe());q.addGetterSetter(Ae,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ae,"shadowOffset",["x","y"]);q.addGetterSetter(Ae,"shadowOffsetX",0,Fe());q.addGetterSetter(Ae,"shadowOffsetY",0,Fe());q.addGetterSetter(Ae,"fillPatternImage");q.addGetterSetter(Ae,"fill",void 0,IW());q.addGetterSetter(Ae,"fillPatternX",0,Fe());q.addGetterSetter(Ae,"fillPatternY",0,Fe());q.addGetterSetter(Ae,"fillLinearGradientColorStops");q.addGetterSetter(Ae,"strokeLinearGradientColorStops");q.addGetterSetter(Ae,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ae,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ae,"fillRadialGradientColorStops");q.addGetterSetter(Ae,"fillPatternRepeat","repeat");q.addGetterSetter(Ae,"fillEnabled",!0);q.addGetterSetter(Ae,"strokeEnabled",!0);q.addGetterSetter(Ae,"shadowEnabled",!0);q.addGetterSetter(Ae,"dashEnabled",!0);q.addGetterSetter(Ae,"strokeScaleEnabled",!0);q.addGetterSetter(Ae,"fillPriority","color");q.addComponentsGetterSetter(Ae,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ae,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ae,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ae,"fillPatternScale",["x","y"]);q.addGetterSetter(Ae,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ae,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ae,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ae,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ae,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ae,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ae,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ae,"fillPatternRotation",0);q.backCompat(Ae,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var R7e="#",N7e="beforeDraw",D7e="draw",ZW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z7e=ZW.length;class Ch extends ca{constructor(t){super(t),this.canvas=new N0,this.hitCanvas=new wk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(N7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(D7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class _k extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}_k.prototype.nodeType="FastLayer";gr(_k);class r1 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}r1.prototype.nodeType="Group";gr(r1);var jw=function(){return R0.performance&&R0.performance.now?function(){return R0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:jw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=QM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=JM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===QM?this.setTime(t):this.state===JM&&this.setTime(this.duration-t)}pause(){this.state=F7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Zm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new H7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)B7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Or.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Zm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}zu.prototype._centroid=!0;zu.prototype.className="Arc";zu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(zu);q.addGetterSetter(zu,"innerRadius",0,Fe());q.addGetterSetter(zu,"outerRadius",0,Fe());q.addGetterSetter(zu,"angle",0,Fe());q.addGetterSetter(zu,"clockwise",!1,Ms());function E7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function tI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Nn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Nn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Nn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var k=null,T=[],M=l,O=u,R,N,z,V,$,j,ue,W,Q,ne;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var ee=b.shift(),K=b.shift();if(l+=ee,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+ee,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break;case"a":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:O},pathLength:this.calcLength(M,O,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Nn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},O=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=O([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=O(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,R,V,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);q.addGetterSetter(Nn,"data");class _h extends Bu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class C1 extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}C1.prototype._centroid=!0;C1.prototype.className="Circle";C1.prototype._attrsAffectingSize=["radius"];gr(C1);q.addGetterSetter(C1,"radius",0,Fe());class Ld extends Ae{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Ld.prototype.className="Ellipse";Ld.prototype._centroid=!0;Ld.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Ld);q.addComponentsGetterSetter(Ld,"radius",["x","y"]);q.addGetterSetter(Ld,"radiusX",0,Fe());q.addGetterSetter(Ld,"radiusY",0,Fe());class Is extends Ae{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var QW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],W7e="Change.konva",V7e="none",P7="up",T7="right",L7="down",A7="left",U7e=QW.length;class kk extends r1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var nI=Math.PI*2;class Ph extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,nI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),nI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class $l extends Ae{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var h3;function qw(){return h3||(h3=de.createCanvasElement().getContext(Y7e),h3)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ae{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(q7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=qw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+f3+this.fontVariant()+f3+(this.fontSize()+Q7e)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Jg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return qw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==oI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],qw().font=this._getContextFont();for(var P=E?this._getTextWidth(Yw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",V=0;R>>1,j=M.slice(0,$+1),ue=this._getTextWidth(j)+P;ue<=h?(R=$+1,z=j,V=ue):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===f3||Q===rI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(f3),z.lastIndexOf(rI))+1,W>0&&(R=W,z=z.slice(0,R),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var ee=this._shouldHandleEllipsis(m);if(ee){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(O=this._getTextWidth(M),O<=h)){this._addTextLine(M),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==oI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Yw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=JW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var ue=t.dataArray,W=w+1;W0)return w=W,ue[W];ue[W].command==="M"&&(m={x:ue[W].points[0],y:ue[W].points[1]})}return{}},k=function(ue){var W=t._getTextSize(ue).width+r;ue===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var ee=Q;b===void 0;)b=P(),b&&ee+b.pathLengthW?v=Nn.getPointOnLine(W,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],X=b.points[5],ce=b.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?W>b.pathLength?E=1e-8:E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength/2:E=Math.max(E-(Q-W)/b.pathLength/2,0),E>1&&(E=1,K=!0),v=Nn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength:E-=(Q-W)/b.pathLength,E>1&&(E=1,K=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(Q=Nn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,b=void 0)}},T="C",M=t._getTextSize(T).width+r,O=u/M-1,R=0;Re+`.${aV}`).join(" "),aI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in rt._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(c9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var C4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],sI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function sV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return sV(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(aI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(aI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return sV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-sI,y:-sI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),C4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new v2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ae({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let ue=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(ue-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+ue,Q=rt.getAngle(this.rotationSnapTolerance()),ee=g9e(this.rotationSnaps(),W,Q)-g.rotation,K=p9e(g,ee);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),r1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){C4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+C4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",C4,m9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Fu extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Fu.prototype.className="Wedge";Fu.prototype._centroid=!0;Fu.prototype._attrsAffectingSize=["radius"];gr(Fu);q.addGetterSetter(Fu,"radius",0,Fe());q.addGetterSetter(Fu,"angle",0,Fe());q.addGetterSetter(Fu,"clockwise",!1);q.backCompat(Fu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function lI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,T,M,O,R,N,z,V,$,j,ue,W=t+t+1,Q=r-1,ne=i-1,ee=t+1,K=ee*(ee+1)/2,G=new lI,X=null,ce=G,me=null,Me=null,xe=v9e[t],be=y9e[t];for(s=1;s>be,j!==0?(j=255/j,n[h]=(m*xe>>be)*j,n[h+1]=(v*xe>>be)*j,n[h+2]=(b*xe>>be)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>be,j>0?(j=255/j,n[l]=(m*xe>>be)*j,n[l+1]=(v*xe>>be)*j,n[l+2]=(b*xe>>be)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+ee)0&&b9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const x9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,V=O>0?O:-O;if(z>N&&(R=M),V>N&&(R=O),R*=t,i){var $=s[E]+R,j=s[E+1]+R,ue=s[E+2]+R;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=ue>255?255:ue<0?0:ue}else{var W=n-R;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Kw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,T,M,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,O=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,O,R=360/T*Math.PI/180,N,z;for(O=0;OT?k:T;var M=a,O=o,R,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,AW,q.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,AW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},j9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` -`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Wl(d):""}var Ih=Object.prototype.hasOwnProperty,Vu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Vu[zs],Vu[zs]=null,zs--)}function bn(d,f){zs++,Vu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Rd(d,f,y){if(kr.current!==Bo)throw Error(a(168));bn(kr,f),bn(Gr,y)}function Ul(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,bn(kr,d),bn(Gr,Gr.current),!0}function Nd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Ul(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),bn(kr,d)):En(Gr),bn(Gr,y)}var vi=Math.clz32?Math.clz32:Dd,Oh=Math.log,Rh=Math.LN2;function Dd(d){return d>>>=0,d===0?32:31-(Oh(d)/Rh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Gl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function Bd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Vi=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var qt=je(pe,Pt,ve[Ft],Ve);if(qt===null){Pt===null&&(Pt=Br);break}d&&Pt&&qt.alternate===null&&f(pe,Pt),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Fn&&Hs(pe,Ft),Pe;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=je(pe,Pt,qt.value,Ve);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Pe=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(qt.done)return y(pe,Pt),Fn&&Hs(pe,Ft),Pe;if(Pt===null){for(;!qt.done;Ft++,qt=ve.next())qt=At(pe,qt.value,Ve),qt!==null&&(se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return Fn&&Hs(pe,Ft),Pe}for(Pt=_(pe,Pt);!qt.done;Ft++,qt=ve.next())qt=Hn(Pt,pe,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Pt.delete(qt.key===null?Ft:qt.key),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Pe}function Xo(pe,se,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Pe=ve.key,Mt=se;Mt!==null;){if(Mt.key===Pe){if(Pe=ve.type,Pe===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&Y1(Pe)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=wa(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,Ve,ve.key),se.return=pe,pe=se):(Ve=hf(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wa(pe,se,ve),Ve.return=pe,pe=Ve)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,Ve),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),Ve)}if(ne(ve))return Pn(pe,se,ve,Ve);if(R(ve))return nr(pe,se,ve,Ve);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=xp(ve,pe.mode,Ve),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var ec=L2(!0),A2=L2(!1),Kd={},po=zo(Kd),Ca=zo(Kd),re=zo(Kd);function ye(d){if(d===Kd)throw Error(a(174));return d}function ge(d,f){bn(re,f),bn(Ca,d),bn(po,Kd),d=K(f),En(po),bn(po,d)}function Ge(){En(po),En(Ca),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(bn(Ca,d),bn(po,f))}function Qt(d){Ca.current===d&&(En(po),En(Ca))}var Ot=zo(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Hu(y)||Od(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Xd=[];function q1(){for(var d=0;dy?y:4,d(!0);var _=tc.transition;tc.transition={};try{d(!1),f()}finally{Ht=y,tc.transition=_}}function lc(){return Si().memoizedState}function ng(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},cc(d))dc(f,y);else if(y=Ju(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),nf(y,f,_)}}function uc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(cc(d))dc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Yd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Ju(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),nf(y,f,_))}}function cc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function dc(d,f){Zd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function nf(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,jl(d,y)}}var ts={readContext:Ui,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},_S={readContext:Ui,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Ui,useEffect:O2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Xl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Xl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Xl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=ng.bind(null,Sn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:I2,useDebugValue:J1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=I2(!1),f=d[0];return d=tg.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=Sn,L=qr();if(Fn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Kl&30)!==0||Q1(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,ef(9,ac.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var y=Sa,_=Vi;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=nc++,0dp&&(f.flags|=128,_=!0,pc(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),pc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&y!==1073741824&&(f.flags|=128,_=!0,pc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return Cc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(ji&1073741824)!==0&&(oi(f),ht&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function cg(d,f){switch(V1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Gr),En(kr),q1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Xu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Ot),null;case 4:return Ge(),null;case 10:return Gd(f.type._context),null;case 22:case 23:return Cc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,AS=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function gc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Qh=!1;function Ql(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:ht&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Qh,Qh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function ep(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=ee(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function dg(d){var f=d.alternate;f!==null&&(d.alternate=null,dg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function mc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||mc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,y),d=d.sibling;d!==null;)tp(d,f,y),d=d.sibling}function fg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(y,d,f):_e(y,d);else if(_!==4&&(d=d.child,d!==null))for(fg(d,f,y),d=d.sibling;d!==null;)fg(d,f,y),d=d.sibling}var br=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||gc(y,f);case 6:if(ht){var _=br,L=Yo;br=null,qo(d,f,y),br=_,Yo=L,br!==null&&(Yo?tt(br,y.stateNode):ct(br,y.stateNode))}else qo(d,f,y);break;case 18:ht&&br!==null&&(Yo?B1(br,y.stateNode):z1(br,y.stateNode));break;case 4:ht?(_=br,L=Yo,br=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),br=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=ya(_),$u(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(gc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new AS),f.forEach(function(_){var L=Z2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case ap:return":has("+(gg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case vc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function yc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*MS(_/1960))-_,10<_){d.timeoutHandle=De(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?pp.bind(null,d):null}function gp(d,f){var y=xc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=_c(d,f),d!==2&&(f=wi,wi=y,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function Yi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-yg?Qs(d,0):vg|=y),Xr(d,f)}function Cg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function OS(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),Cg(d,y)}function Z2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Cg(d,y)}var _g;_g=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,TS(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Fn&&(f.flags&1048576)!==0&&W1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;_a(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Qu(f,y),L=X1(null,f,_,d,L,y);var I=rc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,G1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,j1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=bp(_),d=Ho(_,d),L){case 0:f=og(null,f,_,d,y);break e;case 1:f=W2(null,f,_,d,y);break e;case 11:f=B2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),og(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),W2(d,f,_,L,y);case 3:e:{if(V2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,k2(d,f),Vh(f,_,null,y);var H=f.memoizedState;if(_=H.element,vt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=fc(Error(a(423)),f),f=U2(d,f,_,y,L);break e}else if(_!==L){L=fc(Error(a(424)),f),f=U2(d,f,_,y,L);break e}else for(vt&&(fo=A1(f.stateNode.containerInfo),Gn=f,Fn=!0,Ri=null,ho=!1),y=A2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Xu(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&Hd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Ie(_,L)?H=null:I!==null&&Ie(_,I)&&(f.flags|=32),H2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&Hd(f),null;case 13:return G2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=ec(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),B2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,_2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var Ne=I.updateQueue;if(Ne!==null){Ne=Ne.shared;var et=Ne.pending;et===null?fe.next=fe:(fe.next=et.next,et.next=fe),Ne.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),jd(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),jd(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Qu(f,y),L=Ui(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return F2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),_a(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Qu(f,y),P2(f,_,L),j1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return Y2(d,f,y);case 22:return $2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return Yu(d,f)}function ka(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new ka(d,f,y,_)}function kg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function bp(d){if(typeof d=="function")return kg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function qi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function hf(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")kg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return Sp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function Sp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function xp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function pf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=st,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ju(0),this.expirationTimes=ju(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ju(0),this.identifierPrefix=_,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function Q2(d,f,y,_,L,I,H,oe,fe){return d=new pf(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},G1(I),d}function Eg(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Ul(d,y,f)}return f}function Pg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=ue(f),d===null?null:d.stateNode}function gf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&I>=At&&L<=et&&H<=je){d.splice(f,1);break}else if(_!==Ne||y.width!==fe.width||jeH){if(!(I!==At||y.height!==fe.height||et<_||Ne>L)){Ne>_&&(fe.width+=Ne-_,fe.x=_),etI&&(fe.height+=At-I,fe.y=I),jey&&(y=H)),H ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Tg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!_t)throw Error(a(363));d=mg(d,f);var L=Yt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=Eg(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=Y9e})(lV);const q9e=K7(lV.exports);var Ek={exports:{}},Th={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Ek);const uI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let cI=!1,dI=!1;const Pk=".react-konva-event",K9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,X9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,Z9e={};function vS(e,t,n=Z9e){if(!cI&&"zIndex"in t&&(console.warn(X9e),cI=!0),!dI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(K9e),dI=!0)}for(var o in n)if(!uI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!uI[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Md(e));for(var l in v)e.on(l+Pk,v[l])}function Md(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const uV={},Q9e={};dh.Node.prototype._applyProps=vS;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Md(e)}function e8e(e,t,n){let r=dh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=dh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return vS(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return uV}function d8e(){return uV}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Md(e)}function S8e(e,t){t.parent===e?t.moveToTop():e.add(t),Md(e)}function cV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Md(e)}function x8e(e,t,n){cV(e,t,n)}function w8e(e,t){t.destroy(),t.off(Pk),Md(e)}function C8e(e,t){t.destroy(),t.off(Pk),Md(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){vS(e,i,r)}function P8e(e){e.hide(),Md(e)}function T8e(e){}function L8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function M8e(e){}function I8e(){}const O8e=()=>Ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:S8e,insertBefore:cV,insertInContainerBefore:x8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:T8e,unhideInstance:L8e,unhideTextInstance:A8e,clearContainer:M8e,detachDeletedInstance:I8e,getCurrentEventPriority:O8e,now:u0.exports.unstable_now,idlePriority:u0.exports.unstable_IdlePriority,run:u0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,fI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,hI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&hI(e,n,t[n]);if(fI)for(var n of fI(t))F8e.call(t,n)&&hI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function Tk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Tk(r,t,n);if(i)return i;r=t?null:r.sibling}}function dV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Lk=dV(C.exports.createContext(null));class fV extends C.exports.Component{render(){return x(Lk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(Lk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:Tk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const tm=[],gI=new WeakMap;function U8e(){var e;const t=V8e();tm.splice(0,tm.length),Tk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Lk&&tm.push(dV(i))});for(const n of tm){const r=(e=W8e.current)==null?void 0:e.readContext(n);gI.set(n,r)}return C.exports.useMemo(()=>tm.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(pI({},i),{value:gI.get(r)}))),n=>x(fV,{...pI({},n)})),[])}function G8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const j8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=G8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new dh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=xm.createContainer(n.current,Ek.exports.LegacyRoot,!1,null),xm.updateContainer(x(o,{children:e.children}),r.current),()=>{!dh.isBrowser||(a(null),xm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),vS(n.current,e,i),xm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},g3="Layer",fh="Group",bu="Rect",nm="Circle",_4="Line",hV="Image",Y8e="Transformer",xm=q9e(R8e);xm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const q8e=ae.forwardRef((e,t)=>x(fV,{children:x(j8e,{...e,forwardedRef:t})})),K8e=dt([zn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),X8e=e=>{const{...t}=e,{objects:n}=Le(K8e);return x(fh,{listening:!1,...t,children:n.filter(rk).map((r,i)=>x(_4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},D0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},Z8e=dt(zn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;let b="";return u==="mask"?b=D0({...a,a:.5}):l==="colorPicker"?b=D0(o):b=D0(s),{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerSize:Lw/v,colorPickerOffset:Lw/2/v,colorPickerCornerRadius:Lw/5/v,brushColorString:b,tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h,colorPickerSize:g,colorPickerOffset:m,colorPickerCornerRadius:v}=Le(Z8e);return l?J(fh,{listening:!1,...t,children:[s==="colorPicker"?J(Ln,{children:[x(bu,{x:n?n.x-m:r/2,y:n?n.y-m:i/2,width:g,height:g,fill:a,cornerRadius:v,listening:!1}),x(bu,{x:n?n.x-m:r/2,y:n?n.y-m:i/2,width:g,height:g,cornerRadius:v,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(bu,{x:n?n.x-m:r/2,y:n?n.y-m:i/2,width:g,height:g,cornerRadius:v,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}):J(Ln,{children:[x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(nm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=dt(zn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),e_e=e=>{const{...t}=e,n=qe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:b,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Le(J8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Aw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),ee=jc(Q,64),K=jc(ne,64);W.target.x(ee),W.target.y(K),n(Aw({x:ee,y:K}))},[n,v]),O=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),ee=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(mm({width:ee,height:K})),n(Aw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),R=C.exports.useCallback((W,Q,ne)=>{const ee=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+ee,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Iw(!0))},z=()=>{n(Iw(!1)),n(Ky(!1))},V=()=>{n(aM(!0))},$=()=>{n(Iw(!1)),n(aM(!1)),n(Ky(!1))},j=()=>{n(Ky(!0))},ue=()=>{!u&&!l&&n(Ky(!1))};return J(fh,{...t,children:[x(bu,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(bu,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(bu,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&b==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:ue,onMouseOver:j,onMouseUp:$,onTransform:O,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(Y8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:b==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&b==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let pV=null,gV=null;const t_e=e=>{pV=e},Wv=()=>pV,n_e=e=>{gV=e},mV=()=>gV,r_e=dt([zn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),i_e=()=>{const e=qe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Le(r_e),i=C.exports.useRef(null),o=mV();pt("esc",()=>{e(Ibe())},{enabled:()=>!0,preventDefault:!0}),pt("shift+h",()=>{e(Vbe(!n))},{preventDefault:!0},[t,n]),pt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(O0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(O0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},o_e=dt(zn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:D0(t)}}),mI=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),a_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(o_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=mI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=mI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(bu,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},s_e=dt([zn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),l_e=e=>{const t=qe(),{isMoveStageKeyHeld:n,stageScale:r}=Le(s_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Ze.clamp(r*bbe**s,Sbe,xbe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Xbe(l)),t(LH(u))},[e,n,r,t])},yS=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},vV=()=>{const e=qe(),t=Wv(),n=mV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(Ebe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(kbe())}}},u_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),c_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(u_e),{commitColorUnderCursor:i}=vV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(g4(!0));return}if(n==="colorPicker"){i();return}const a=yS(e.current);!a||(o.evt.preventDefault(),t(iS(!0)),t(xH([a.x,a.y])))},[e,n,r,t,i])},d_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),f_e=(e,t)=>{const n=qe(),{tool:r,isDrawing:i,isStaging:o}=Le(d_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(g4(!1));return}if(!t.current&&i&&e.current){const a=yS(e.current);if(!a)return;n(wH([a.x,a.y]))}else t.current=!1;n(iS(!1))},[t,n,i,o,e,r])},h_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),p_e=(e,t,n)=>{const r=qe(),{isDrawing:i,tool:o,isStaging:a}=Le(h_e),{updateColorUnderCursor:s}=vV();return C.exports.useCallback(()=>{if(!e.current)return;const l=yS(e.current);if(!!l){if(r(EH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(wH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},g_e=dt([_r,zn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),m_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(g_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=yS(e.current);!o||n==="move"||r||(t(iS(!0)),t(xH([o.x,o.y])))},[e,n,r,t])},v_e=()=>{const e=qe();return C.exports.useCallback(()=>{e(EH(null)),e(iS(!1))},[e])},y_e=dt([zn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),b_e=()=>{const e=qe(),{tool:t,isStaging:n}=Le(y_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(g4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(LH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(g4(!1))},[e,n,t])}};var Cf=C.exports,S_e=function(t,n,r){const i=Cf.useRef("loading"),o=Cf.useRef(),[a,s]=Cf.useState(0),l=Cf.useRef(),u=Cf.useRef(),h=Cf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),Cf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const yV=e=>{const{url:t,x:n,y:r}=e,[i]=S_e(t);return x(hV,{x:n,y:r,image:i,listening:!1})},x_e=dt([zn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),w_e=()=>{const{objects:e}=Le(x_e);return e?x(fh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(p4(t))return x(yV,{x:t.x,y:t.y,url:t.image.url},n);if(ebe(t))return x(_4,{points:t.points,stroke:t.color?D0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},C_e=dt([zn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),__e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},k_e=()=>{const{colorMode:e}=Kv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Le(C_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=__e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,O=Ze.range(0,T).map(N=>x(_4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=Ze.range(0,M).map(N=>x(_4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(O.concat(R))},[t,n,r,e,a]),x(fh,{children:i})},E_e=dt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),P_e=e=>{const{...t}=e,n=Le(E_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(hV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},T_e=dt([zn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function L_e(){const{cursorCoordinatesString:e}=Le(T_e);return x("div",{children:`Cursor Position: ${e}`})}const m3=e=>Math.round(e*100)/100,A_e=dt([zn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:g}=e;return{activeLayerColor:g==="mask"?"var(--status-working-color)":"inherit",activeLayerString:g.charAt(0).toUpperCase()+g.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${m3(s)}, ${m3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${m3(r)}\xD7${m3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),M_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Le(A_e);return J("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&J(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(L_e,{})]})]})},I_e=dt([zn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),O_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Le(I_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return J(fh,{...t,children:[r&&x(yV,{url:u,x:o,y:a}),i&&J(fh,{children:[x(bu,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(bu,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},R_e=dt([zn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),N_e=()=>{const e=qe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Le(R_e),o=C.exports.useCallback(()=>{e(sM(!1))},[e]),a=C.exports.useCallback(()=>{e(sM(!0))},[e]);pt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),pt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),pt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(Abe()),l=()=>e(Lbe()),u=()=>e(Pbe());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:J(ia,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(ek,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(R4e,{}),onClick:()=>e(Ybe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(lH,{}),onClick:()=>e(sbe(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(b1,{}),onClick:()=>e(Tbe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},D_e=dt([zn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let b="";return h==="move"||t?g?b="grabbing":b="grab":o?b=void 0:a?b="move":b="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:b,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),z_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Le(D_e);i_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{n_e($),g.current=$},[]),b=C.exports.useCallback($=>{t_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=l_e(g),k=c_e(g),T=f_e(g,E),M=p_e(g,E,w),O=m_e(g),R=v_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=b_e();return x("div",{className:"inpainting-canvas-container",children:J("div",{className:"inpainting-canvas-wrapper",children:[J(q8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:O,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(g3,{id:"grid",visible:r,children:x(k_e,{})}),x(g3,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:x(w_e,{})}),J(g3,{id:"mask",visible:e,listening:!1,children:[x(X8e,{visible:!0,listening:!1}),x(a_e,{listening:!1})]}),J(g3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(Q8e,{visible:l!=="move",listening:!1}),x(O_e,{visible:u}),h&&x(P_e,{}),x(e_e,{visible:n&&!u})]})]}),x(M_e,{}),x(N_e,{})]})})},B_e=dt([zn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function F_e(){const e=qe(),{canUndo:t,activeTabName:n}=Le(B_e),r=()=>{e(Zbe())};return pt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const $_e=dt([zn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function H_e(){const e=qe(),{canRedo:t,activeTabName:n}=Le($_e),r=()=>{e(Mbe())};return pt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const bV=ke((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Mv(),m=C.exports.useRef(null),v=()=>{r(),g()},b=()=>{o&&o(),g()};return J(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(_F,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(J0,{children:J(kF,{className:"modal",children:[x(Rb,{fontSize:"lg",fontWeight:"bold",children:s}),x(Dv,{children:a}),J(Ob,{children:[x(Wa,{ref:m,onClick:b,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),W_e=()=>{const e=qe();return J(bV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(lbe()),e(CH()),e(kH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(b1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},V_e=()=>{const e=qe();return J(bV,{title:"Clear Canvas History",acceptCallback:()=>e(kH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(b1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},U_e=dt([zn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),G_e=()=>{const e=qe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Le(U_e);return x(id,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(nk,{})}),children:J(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e(jbe(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(Gbe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(qbe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(Hbe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(Fbe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e($be(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(Ube(l.target.checked))}),x(V_e,{}),x(W_e,{})]})})};function bS(){return(bS=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function M7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var i1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(vI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=I7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(yI(P),!function(M,O){return O&&!Qm(M)}(P,l.current)&&k)){if(Qm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(vI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bS({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),SS=function(e){return e.filter(Boolean).join(" ")},Mk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=SS(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},xV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},O7=function(e){var t=xV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Xw=function(e){var t=xV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},j_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},Y_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},q_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=SS(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Ak,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:i1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Mk,{className:"react-colorful__hue-pointer",left:t/360,color:O7({h:t,s:100,v:100,a:1})})))}),K_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:O7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Ak,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:i1(t.s+100*i.left,0,100),v:i1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Mk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:O7(t)})))}),wV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function X_e(e,t,n){var r=M7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;wV(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Z_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Q_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},bI=new Map,J_e=function(e){Z_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!bI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,bI.set(t,n);var r=Q_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},eke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Xw(Object.assign({},n,{a:0}))+", "+Xw(Object.assign({},n,{a:1}))+")"},o=SS(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Ak,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:i1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Mk,{className:"react-colorful__alpha-pointer",left:n.a,color:Xw(n)})))},tke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=SV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);J_e(s);var l=X_e(n,i,o),u=l[0],h=l[1],g=SS(["react-colorful",t]);return ae.createElement("div",bS({},a,{ref:s,className:g}),x(K_e,{hsva:u,onChange:h}),x(q_e,{hue:u.h,onChange:h}),ae.createElement(eke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},nke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Y_e,fromHsva:j_e,equal:wV},rke=function(e){return ae.createElement(tke,bS({},e,{colorModel:nke}))};const CV=e=>{const{styleClass:t,...n}=e;return x(rke,{className:`invokeai__color-picker ${t}`,...n})},ike=dt([zn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:D0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),oke=()=>{const e=qe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Le(ike);pt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),pt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),pt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(TH(t==="mask"?"base":"mask"))},a=()=>e(_be()),s=()=>e(PH(!r));return x(id,{trigger:"hover",triggerComponent:x(ia,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:J(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(Wbe(l.target.checked))}),x(CV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(zbe(l))}),x(ra,{size:"sm",leftIcon:x(b1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let v3;const ake=new Uint8Array(16);function ske(){if(!v3&&(v3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!v3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return v3(ake)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function lke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const uke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),SI={randomUUID:uke};function l0(e,t,n){if(SI.randomUUID&&!t&&!e)return SI.randomUUID();e=e||{};const r=e.random||(e.rng||ske)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return lke(r)}const cke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},dke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},fke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},hke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},y3=(e=hke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,b=Wv();if(!b){t(yu(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=cke(b,h,v,i?{...g,...m}:void 0);if(!w){t(yu(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:O,height:R}=T,N={uuid:l0(),category:o?"result":"user",...T};a&&(dke(M),t(hm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(fke(M,O,R),t(hm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(o0({image:N,category:"result"})),t(hm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(Bbe({kind:"image",layer:"base",...E,image:N})),t(hm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(yu(!1)),t(J3("Connected")),t(i0(!0))},pke=dt([zn,Ru,m2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),gke=()=>{const e=qe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Le(pke);pt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),pt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),pt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),pt(["["],()=>{e(Mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),pt(["]"],()=>{e(Mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(O0("brush")),a=()=>e(O0("eraser")),s=()=>e(O0("colorPicker"));return J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(mt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(O4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(id,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(uH,{})}),children:J(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(ws,{label:"Size",value:r,withInput:!0,onChange:l=>e(Mw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(CV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Nbe(l))})]})})]})};let xI;const _V=()=>({setOpenUploader:e=>{e&&(xI=e)},openUploader:xI}),mke=dt([m2,zn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),vke=()=>{const e=qe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Le(mke),s=Wv(),{openUploader:l}=_V();pt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),pt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),pt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),pt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),pt(["meta+c","ctrl+c"],()=>{b()},{enabled:()=>!t,preventDefault:!0},[s,t]),pt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(O0("move")),h=()=>{const P=Wv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(Obe({contentRect:k}))},g=()=>{e(CH()),e(_H())},m=()=>{e(y3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(y3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},b=()=>{e(y3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(y3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return J("div",{className:"inpainting-settings",children:[x(Ou,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(TH(k)),k==="mask"&&!r&&e(PH(!0))}}),x(oke,{}),x(gke,{}),J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(lH,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(rS,{}),onClick:b,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(sH,{}),onClick:w,isDisabled:t})]}),J(ia,{isAttached:!0,children:[x(F_e,{}),x(H_e,{})]}),J(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x(tk,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(b1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(G_e,{})})]})},yke=dt([zn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),bke=()=>{const e=qe(),{doesCanvasNeedScaling:t}=Le(yke);return C.exports.useLayoutEffect(()=>{const n=Ze.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:J("div",{className:"inpainting-main-area",children:[x(vke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(DCe,{}):x(z_e,{})})]})})})};function Ske(){const e=qe();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(yk,{optionsPanel:x(RCe,{}),styleClass:"inpainting-workarea-overrides",children:x(bke,{})})}const xke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function wke(){return J("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),J("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Cke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),Of={txt2img:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Text To Image"},img2img:{title:x(f5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(xke,{fill:"black",boxSize:"2.5rem"}),workarea:x(Ske,{}),tooltip:"Unified Canvas"},nodes:{title:x(h5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c5e,{}),tooltip:"Nodes"},postprocess:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d5e,{}),tooltip:"Post Processing"},training:{title:x(Cke,{fill:"black",boxSize:"2.5rem"}),workarea:x(wke,{}),tooltip:"Training"}},xS=Ze.map(Of,(e,t)=>t);[...xS];function _ke(){const e=Le(o=>o.options.activeTab),t=Le(o=>o.options.isLightBoxOpen),n=qe();pt("1",()=>{n(ko(0))}),pt("2",()=>{n(ko(1))}),pt("3",()=>{n(ko(2))}),pt("4",()=>{n(ko(3))}),pt("5",()=>{n(ko(4))}),pt("6",()=>{n(ko(5))}),pt("z",()=>{n(md(!t))},[t]);const r=()=>{const o=[];return Object.keys(Of).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:Of[a].tooltip,placement:"right",children:x(JF,{children:Of[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(Of).forEach(a=>{o.push(x(ZF,{className:"app-tabs-panel",children:Of[a].workarea},a))}),o};return J(XF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(QF,{className:"app-tabs-panels",children:t?x(_Ce,{}):i()})]})}const kV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},kke=kV,EV=Fb({name:"options",initialState:kke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=Q3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=h4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=Q3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=h4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=Q3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...kV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=xS.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:PV,resetOptionsState:zTe,resetSeed:BTe,setActiveTab:ko,setAllImageToImageParameters:Eke,setAllParameters:Pke,setAllTextToImageParameters:Tke,setCfgScale:TV,setCodeformerFidelity:LV,setCurrentTheme:Lke,setFacetoolStrength:r5,setFacetoolType:i5,setHeight:AV,setHiresFix:MV,setImg2imgStrength:R7,setInfillMethod:IV,setInitialImage:y2,setIsLightBoxOpen:md,setIterations:Ake,setMaskPath:OV,setOptionsPanelScrollPosition:Mke,setParameter:FTe,setPerlin:RV,setPrompt:wS,setSampler:NV,setSeamBlur:wI,setSeamless:DV,setSeamSize:CI,setSeamSteps:_I,setSeamStrength:kI,setSeed:b2,setSeedWeights:zV,setShouldFitToWidthHeight:BV,setShouldForceOutpaint:Ike,setShouldGenerateVariations:Oke,setShouldHoldOptionsPanelOpen:Rke,setShouldLoopback:Nke,setShouldPinOptionsPanel:Dke,setShouldRandomizeSeed:zke,setShouldRunESRGAN:Bke,setShouldRunFacetool:Fke,setShouldShowImageDetails:FV,setShouldShowOptionsPanel:sd,setShowAdvancedOptions:$Te,setShowDualDisplay:$ke,setSteps:$V,setThreshold:HV,setTileSize:EI,setUpscalingLevel:N7,setUpscalingStrength:D7,setVariationAmount:Hke,setWidth:WV}=EV.actions,Wke=EV.reducer,Nl=Object.create(null);Nl.open="0";Nl.close="1";Nl.ping="2";Nl.pong="3";Nl.message="4";Nl.upgrade="5";Nl.noop="6";const o5=Object.create(null);Object.keys(Nl).forEach(e=>{o5[Nl[e]]=e});const Vke={type:"error",data:"parser error"},Uke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gke=typeof ArrayBuffer=="function",jke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,VV=({type:e,data:t},n,r)=>Uke&&t instanceof Blob?n?r(t):PI(t,r):Gke&&(t instanceof ArrayBuffer||jke(t))?n?r(t):PI(new Blob([t]),r):r(Nl[e]+(t||"")),PI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},TI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},qke=typeof ArrayBuffer=="function",UV=(e,t)=>{if(typeof e!="string")return{type:"message",data:GV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Kke(e.substring(1),t)}:o5[n]?e.length>1?{type:o5[n],data:e.substring(1)}:{type:o5[n]}:Vke},Kke=(e,t)=>{if(qke){const n=Yke(e);return GV(n,t)}else return{base64:!0,data:e}},GV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},jV=String.fromCharCode(30),Xke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{VV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(jV))})})},Zke=(e,t)=>{const n=e.split(jV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function qV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Jke=setTimeout,eEe=clearTimeout;function CS(e,t){t.useNativeTimers?(e.setTimeoutFn=Jke.bind(Yc),e.clearTimeoutFn=eEe.bind(Yc)):(e.setTimeoutFn=setTimeout.bind(Yc),e.clearTimeoutFn=clearTimeout.bind(Yc))}const tEe=1.33;function nEe(e){return typeof e=="string"?rEe(e):Math.ceil((e.byteLength||e.size)*tEe)}function rEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class iEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class KV extends Ur{constructor(t){super(),this.writable=!1,CS(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new iEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=UV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const XV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),z7=64,oEe={};let LI=0,b3=0,AI;function MI(e){let t="";do t=XV[e%z7]+t,e=Math.floor(e/z7);while(e>0);return t}function ZV(){const e=MI(+new Date);return e!==AI?(LI=0,AI=e):e+"."+MI(LI++)}for(;b3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Zke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Xke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ZV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=QV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Al(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Al extends Ur{constructor(t,n){super(),CS(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=qV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new eU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Al.requestsCount++,Al.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=lEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Al.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Al.requestsCount=0;Al.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",II);else if(typeof addEventListener=="function"){const e="onpagehide"in Yc?"pagehide":"unload";addEventListener(e,II,!1)}}function II(){for(let e in Al.requests)Al.requests.hasOwnProperty(e)&&Al.requests[e].abort()}const tU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),S3=Yc.WebSocket||Yc.MozWebSocket,OI=!0,dEe="arraybuffer",RI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class fEe extends KV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=RI?{}:qV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=OI&&!RI?n?new S3(t,n):new S3(t):new S3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||dEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{OI&&this.ws.send(o)}catch{}i&&tU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=ZV()),this.supportsBinary||(t.b64=1);const i=QV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!S3}}const hEe={websocket:fEe,polling:cEe},pEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function B7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=pEe.exec(e||""),o={},a=14;for(;a--;)o[gEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=mEe(o,o.path),o.queryKey=vEe(o,o.query),o}function mEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function vEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class $c extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=B7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=B7(n.host).host),CS(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=aEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=YV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new hEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&$c.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;$c.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$c.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",$c.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){$c.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,nU=Object.prototype.toString,xEe=typeof Blob=="function"||typeof Blob<"u"&&nU.call(Blob)==="[object BlobConstructor]",wEe=typeof File=="function"||typeof File<"u"&&nU.call(File)==="[object FileConstructor]";function Ik(e){return bEe&&(e instanceof ArrayBuffer||SEe(e))||xEe&&e instanceof Blob||wEe&&e instanceof File}function a5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class PEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=_Ee(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const TEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:kEe,get PacketType(){return nn},Encoder:EEe,Decoder:Ok},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const LEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class rU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(LEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}_1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};_1.prototype.reset=function(){this.attempts=0};_1.prototype.setMin=function(e){this.ms=e};_1.prototype.setMax=function(e){this.max=e};_1.prototype.setJitter=function(e){this.jitter=e};class H7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,CS(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||TEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new $c(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){tU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new rU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const rm={};function s5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=yEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=rm[i]&&o in rm[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new H7(r,t):(rm[i]||(rm[i]=new H7(r,t)),l=rm[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(s5,{Manager:H7,Socket:rU,io:s5,connect:s5});var AEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,MEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,IEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(NI[t]||t||NI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return OEe(e)},E=function(){return REe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return DI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return DI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":NEe(e)},o:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60),2)+":"+ea(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(AEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var NI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},DI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},OEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},REe=function(t){var n=t.getDay();return n===0&&(n=7),n},NEe=function(t){return(String(t).match(MEe)||[""]).pop().replace(IEe,"").replace(/GMT\+0000/g,"UTC")};const DEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(ZA(!0)),t(J3("Connected")),t(abe());const r=n().gallery;r.categories.user.latest_mtime?t(tM("user")):t(s7("user")),r.categories.result.latest_mtime?t(tM("result")):t(s7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(ZA(!1)),t(J3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:l0(),...u};if(["txt2img","img2img"].includes(l)&&t(o0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(Cbe({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(o0({image:{...h,category:"result"},category:"result"}))}if(o)switch(xS[a]){case"img2img":{t(y2(h));break}}t(Ow()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sSe({uuid:l0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(o0({category:"result",image:{uuid:l0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(yu(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(QA()),t(Ow())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:l0(),...l}));t(aSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(o0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Ow())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(OH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(PV()),a===i&&t(OV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(IV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(JA(o)),t(J3("Model Changed")),t(yu(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(JA(o)),t(yu(!1)),t(i0(!0)),t(QA()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(hm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},zEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},BEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},FEe=e=>{const t=Wv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:b,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:O,seamSize:R,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:ue,shouldGenerateVariations:W,shouldRandomizeSeed:Q,shouldRunESRGAN:ne,shouldRunFacetool:ee,steps:K,threshold:G,tileSize:X,upscalingLevel:ce,upscalingStrength:me,variationAmount:Me,width:xe}=r,{shouldDisplayInProgressType:be,saveIntermediatesInterval:Ie,enableImageDebugging:We}=o,De={prompt:k,iterations:Q||W?E:1,steps:K,cfg_scale:s,threshold:G,perlin:P,height:g,width:xe,sampler_name:T,seed:V,progress_images:be==="full-res",progress_latents:be==="latents",save_intermediates:Ie,generation_mode:n,init_mask:""};if(De.seed=Q?Z$(W_,V_):V,["txt2img","img2img"].includes(n)&&(De.seamless=O,De.hires_fix=m),n==="img2img"&&w&&(De.init_img=typeof w=="string"?w:w.url,De.strength=v,De.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ct},boundingBoxCoordinates:ht,boundingBoxDimensions:ut,inpaintReplace:vt,shouldUseInpaintReplace:Ee,stageScale:Je,isMaskEnabled:Lt,shouldPreserveMaskedArea:it}=i,gt={...ht,...ut},an=zEe(Lt?Ct.filter(rk):[],gt);De.init_mask=an,De.fit=!1,De.init_img=a,De.strength=v,De.invert_mask=it,Ee&&(De.inpaint_replace=vt),De.bounding_box=gt;const _t=t.scale();t.scale({x:1/Je,y:1/Je});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:gt.x+Ut.x,y:gt.y+Ut.y,width:gt.width,height:gt.height});We&&BEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(_t),De.init_img=sn,De.progress_images=!1,De.seam_size=R,De.seam_blur=M,De.seam_strength=z,De.seam_steps=N,De.tile_size=X,De.force_outpaint=ue,De.infill_method=b}W?(De.variation_amount=Me,$&&(De.with_variations=Lye($))):De.variation_amount=0;let Qe=!1,st=!1;return ne&&(Qe={level:ce,strength:me}),ee&&(st={type:h,strength:u},h==="codeformer"&&(st.codeformer_fidelity=l)),We&&(De.enable_image_debugging=We),{generationParameters:De,esrganParameters:Qe,facetoolParameters:st}},$Ee=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(yu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=FEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(yu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(yu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(OH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},HEe=()=>{const{origin:e}=new URL(window.location.href),t=s5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=DEe(i),{emitGenerateImage:O,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:ue,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=$Ee(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",ee=>u(ee)),t.on("generationResult",ee=>g(ee)),t.on("postprocessingResult",ee=>h(ee)),t.on("intermediateResult",ee=>m(ee)),t.on("progressUpdate",ee=>v(ee)),t.on("galleryImages",ee=>b(ee)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",ee=>{E(ee)}),t.on("systemConfig",ee=>{P(ee)}),t.on("modelChanged",ee=>{k(ee)}),t.on("modelChangeFailed",ee=>{T(ee)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{O(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{ue();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},WEe=["cursorPosition"].map(e=>`canvas.${e}`),VEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),UEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),iU=u$({options:Wke,gallery:pSe,system:h4e,canvas:Qbe}),GEe=L$.getPersistConfig({key:"root",storage:T$,rootReducer:iU,blacklist:[...WEe,...VEe,...UEe],debounce:300}),jEe=fye(GEe,iU),oU=a2e({reducer:jEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(HEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qe=Z2e,Le=$2e;function l5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l5=function(n){return typeof n}:l5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l5(e)}function YEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zI(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(o2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),QEe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),JEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Le(QEe),i=t?Math.round(t*100/n):0;return x(IF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function ePe(e){const{title:t,hotkey:n,description:r}=e;return J("div",{className:"hotkey-modal-item",children:[J("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function tPe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Mv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(ePe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return J(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),J(Q0,{isOpen:t,onClose:r,children:[x(J0,{}),J(zv,{className:" modal hotkeys-modal",children:[x(c_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:J(Cb,{allowMultiple:!0,children:[J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(i)})]}),J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(o)})]}),J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(a)})]}),J(Uf,{children:[J(Wf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Vf,{})]}),x(Gf,{children:l(s)})]})]})})]})]})]})}const nPe=e=>{const{isProcessing:t,isConnected:n}=Le(l=>l.system),r=qe(),{name:i,status:o,description:a}=e,s=()=>{r(fH(i))};return J("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(iB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},rPe=dt(e=>e.system,e=>{const t=Ze.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),iPe=()=>{const{models:e}=Le(rPe);return x(Cb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:J(Uf,{children:[x(Wf,{children:J("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Vf,{})]})}),x(Gf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(nPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},oPe=dt([m2,J$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ze.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),aPe=({children:e})=>{const t=qe(),n=Le(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Mv(),{isOpen:a,onOpen:s,onClose:l}=Mv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Le(oPe),b=()=>{bU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return J(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),J(Q0,{isOpen:r,onClose:o,children:[x(J0,{}),J(zv,{className:"modal settings-modal",children:[x(Rb,{className:"settings-modal-header",children:"Settings"}),x(c_,{className:"modal-close-btn"}),J(Dv,{className:"settings-modal-content",children:[J("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(iPe,{})}),J("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ou,{label:"Display In-Progress Images",validValues:w5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Fa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(tH(E.target.checked))}),x(Fa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),J("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Fa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),J("div",{className:"settings-modal-reset",children:[x(Jf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Ob,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),J(Q0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(J0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(zv,{children:x(Dv,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},sPe=dt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),lPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Le(sPe),s=qe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(nH())},className:`status ${l}`,children:u})})},uPe=["dark","light","green"];function cPe(){const{setColorMode:e}=Kv(),t=qe(),n=Le(i=>i.options.currentTheme),r=i=>{e(i),t(Lke(i))};return x(id,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(sB,{align:"stretch",children:uPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(ek,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const dPe=dt([m2],e=>{const{isProcessing:t,model_list:n}=e,r=Ze.map(n,(o,a)=>a),i=Ze.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),fPe=()=>{const e=qe(),{models:t,activeModel:n,isProcessing:r}=Le(dPe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Ou,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(fH(o.target.value))}})})},hPe=()=>J("div",{className:"site-header",children:[J("div",{className:"site-header-left-side",children:[x("img",{src:AH,alt:"invoke-ai-logo"}),J("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),J("div",{className:"site-header-right-side",children:[x(lPe,{}),x(fPe,{}),x(tPe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(cPe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(eh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(eh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(eh,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(aPe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(nk,{})})})]})]}),pPe=dt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),gPe=dt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),mPe=()=>{const e=qe(),t=Le(pPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Le(gPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(nH()),e(Pw(!n))};return pt("`",()=>{e(Pw(!n))},[n]),pt("esc",()=>{e(Pw(!1))}),J(Ln,{children:[n&&x(FH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return J("div",{className:`console-entry console-${b}-color`,children:[J("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(aH,{}),onClick:l})})]})};function vPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var yPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function S2(e,t){var n=bPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function bPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=yPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var SPe=[".DS_Store","Thumbs.db"];function xPe(e){return f1(this,void 0,void 0,function(){return h1(this,function(t){return k4(e)&&wPe(e.dataTransfer)?[2,EPe(e.dataTransfer,e.type)]:CPe(e)?[2,_Pe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,kPe(e)]:[2,[]]})})}function wPe(e){return k4(e)}function CPe(e){return k4(e)&&k4(e.target)}function k4(e){return typeof e=="object"&&e!==null}function _Pe(e){return U7(e.target.files).map(function(t){return S2(t)})}function kPe(e){return f1(this,void 0,void 0,function(){var t;return h1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return S2(r)})]}})})}function EPe(e,t){return f1(this,void 0,void 0,function(){var n,r;return h1(this,function(i){switch(i.label){case 0:return e.items?(n=U7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(PPe))]):[3,2];case 1:return r=i.sent(),[2,BI(sU(r))];case 2:return[2,BI(U7(e.files).map(function(o){return S2(o)}))]}})})}function BI(e){return e.filter(function(t){return SPe.indexOf(t.name)===-1})}function U7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,VI(n)];if(e.sizen)return[!1,VI(n)]}return[!0,null]}function Rf(e){return e!=null}function VPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=dU(l,n),h=Vv(u,1),g=h[0],m=fU(l,r,i),v=Vv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function E4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function x3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function GI(e){e.preventDefault()}function UPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function GPe(e){return e.indexOf("Edge/")!==-1}function jPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return UPe(e)||GPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function uTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rk=C.exports.forwardRef(function(e,t){var n=e.children,r=P4(e,QPe),i=vU(r),o=i.open,a=P4(i,JPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Rk.displayName="Dropzone";var mU={disabled:!1,getFilesFromEvent:xPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Rk.defaultProps=mU;Rk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var q7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},mU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,O=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return KPe(n)},[n]),j=C.exports.useMemo(function(){return qPe(n)},[n]),ue=C.exports.useMemo(function(){return typeof E=="function"?E:YI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:YI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),ee=C.exports.useReducer(cTe,q7),K=Zw(ee,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&YPe()),xe=function(){!Me.current&&me&&setTimeout(function(){if(ne.current){var Xe=ne.current.files;Xe.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Me]);var be=C.exports.useRef([]),Ie=function(Xe){Q.current&&Q.current.contains(Xe.target)||(Xe.preventDefault(),be.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",GI,!1),document.addEventListener("drop",Ie,!1)),function(){T&&(document.removeEventListener("dragover",GI),document.removeEventListener("drop",Ie))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),De=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[].concat(nTe(be.current),[Oe.target]),x3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){if(!(E4(Oe)&&!N)){var Xt=Xe.length,Yt=Xt>0&&VPe({files:Xe,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),_e=Xt>0&&!Yt;X({isDragAccept:Yt,isDragReject:_e,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Xe){return We(Xe)})},[i,u,We,N,$,a,o,s,l,V]),Qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=x3(Oe);if(Xe&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Xe&&g&&g(Oe),!1},[g,N]),st=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=be.current.filter(function(Yt){return Q.current&&Q.current.contains(Yt)}),Xt=Xe.indexOf(Oe.target);Xt!==-1&&Xe.splice(Xt,1),be.current=Xe,!(Xe.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),x3(Oe)&&h&&h(Oe))},[Q,h,N]),Ct=C.exports.useCallback(function(Oe,Xe){var Xt=[],Yt=[];Oe.forEach(function(_e){var It=dU(_e,$),ze=Zw(It,2),ot=ze[0],ln=ze[1],Bn=fU(_e,a,o),He=Zw(Bn,2),ct=He[0],tt=He[1],Nt=V?V(_e):null;if(ot&&ct&&!Nt)Xt.push(_e);else{var Zt=[ln,tt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:_e,errors:Zt.filter(function(er){return er})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(_e){Yt.push({file:_e,errors:[WPe]})}),Xt.splice(0)),X({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Xe),Yt.length>0&&b&&b(Yt,Xe),Xt.length>0&&v&&v(Xt,Xe)},[X,s,$,a,o,l,m,v,b,V]),ht=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[],x3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){E4(Oe)&&!N||Ct(Xe,Oe)}).catch(function(Xe){return We(Xe)}),X({type:"reset"})},[i,Ct,We,N]),ut=C.exports.useCallback(function(){if(Me.current){X({type:"openDialog"}),ue();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Xe){return i(Xe)}).then(function(Xe){Ct(Xe,null),X({type:"closeDialog"})}).catch(function(Xe){XPe(Xe)?(W(Xe),X({type:"closeDialog"})):ZPe(Xe)?(Me.current=!1,ne.current?(ne.current.value=null,ne.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Xe)});return}ne.current&&(X({type:"openDialog"}),ue(),ne.current.value=null,ne.current.click())},[X,ue,W,P,Ct,We,j,s]),vt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Ee=C.exports.useCallback(function(){X({type:"focus"})},[]),Je=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(jPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Xe){return r?null:Xe},gt=function(Xe){return O?null:it(Xe)},an=function(Xe){return R?null:it(Xe)},_t=function(Xe){N&&Xe.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.role,_e=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,ln=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ct=Oe.onDrop,tt=P4(Oe,eTe);return ur(ur(Y7({onKeyDown:gt(ll(_e,vt)),onFocus:gt(ll(It,Ee)),onBlur:gt(ll(ze,Je)),onClick:it(ll(ot,Lt)),onDragEnter:an(ll(ln,De)),onDragOver:an(ll(Bn,Qe)),onDragLeave:an(ll(He,st)),onDrop:an(ll(ct,ht)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,Q),!r&&!O?{tabIndex:0}:{}),tt)}},[Q,vt,Ee,Je,Lt,De,Qe,st,ht,O,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.onChange,_e=Oe.onClick,It=P4(Oe,tTe),ze=Y7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(Yt,ht)),onClick:it(ll(_e,sn)),tabIndex:-1},Xt,ne);return ur(ur({},ze),It)}},[ne,n,s,ht,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Ut,getInputProps:yn,rootRef:Q,inputRef:ne,open:it(ut)})}function cTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},q7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},q7);default:return e}}function YI(){}const dTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return pt("esc",()=>{i(!1)}),J("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:J(Jf,{size:"lg",children:["Upload Image",r]})}),n&&J("div",{className:"dropzone-overlay is-drag-reject",children:[x(Jf,{size:"lg",children:"Invalid Upload"}),x(Jf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:l0(),category:"user",...l};t(o0({image:u,category:"user"})),o==="unifiedCanvas"?t(sk(u)):o==="img2img"&&t(y2(u))},fTe=e=>{const{children:t}=e,n=qe(),r=Le(_r),i=f2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=_V(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,O)=>M+` -`+O.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(qI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:b,isDragActive:w,open:E}=vU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const O=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&O.push(N);if(!O.length)return;if(T.stopImmediatePropagation(),O.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=O[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(qI({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${Of[r].tooltip}`:"";return x(uk.Provider,{value:E,children:J("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(dTe,{isDragAccept:v,isDragReject:b,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},hTe=()=>{const e=qe(),t=Le(TCe),n=f2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},yU=dt([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),pTe=()=>{const e=qe(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Le(yU),s=()=>{e(sd(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return pt("f",()=>{o||t?(e(sd(!1)),e(od(!1))):(e(sd(!0)),e(od(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?J("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(uH,{})}),r&&J(Ln,{children:[x(hH,{iconButton:!0}),x(pH,{})]})]}):null},gTe=()=>{const e=qe(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Le(yU),a=()=>{e(od(!0)),r&&e(Li(!0))};return pt("f",()=>{t||i?(e(sd(!1)),e(od(!1))):(e(sd(!0)),e(od(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(rH,{})}):null};vPe();const mTe=()=>(hTe(),J("div",{className:"App",children:[J(fTe,{children:[x(JEe,{}),J("div",{className:"app-content",children:[x(hPe,{}),x(_ke,{})]}),x("div",{className:"app-console",children:x(mPe,{})})]}),x(pTe,{}),x(gTe,{})]}));const bU=yye(oU),vTe=xN({key:"invokeai-style-cache",prepend:!0});Jw.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(q2e,{store:oU,children:x(aU,{loading:x(ZEe,{}),persistor:bU,children:x(PJ,{value:vTe,children:x(_ve,{children:x(mTe,{})})})})})})); diff --git a/frontend/dist/assets/index.97297ef9.js b/frontend/dist/assets/index.97297ef9.js new file mode 100644 index 0000000000..624e326262 --- /dev/null +++ b/frontend/dist/assets/index.97297ef9.js @@ -0,0 +1,623 @@ +function Kq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Z7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Xt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gv=Symbol.for("react.element"),Xq=Symbol.for("react.portal"),Zq=Symbol.for("react.fragment"),Qq=Symbol.for("react.strict_mode"),Jq=Symbol.for("react.profiler"),eK=Symbol.for("react.provider"),tK=Symbol.for("react.context"),nK=Symbol.for("react.forward_ref"),rK=Symbol.for("react.suspense"),iK=Symbol.for("react.memo"),oK=Symbol.for("react.lazy"),TE=Symbol.iterator;function aK(e){return e===null||typeof e!="object"?null:(e=TE&&e[TE]||e["@@iterator"],typeof e=="function"?e:null)}var JI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},eR=Object.assign,tR={};function l1(e,t,n){this.props=e,this.context=t,this.refs=tR,this.updater=n||JI}l1.prototype.isReactComponent={};l1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};l1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nR(){}nR.prototype=l1.prototype;function Q7(e,t,n){this.props=e,this.context=t,this.refs=tR,this.updater=n||JI}var J7=Q7.prototype=new nR;J7.constructor=Q7;eR(J7,l1.prototype);J7.isPureReactComponent=!0;var LE=Array.isArray,rR=Object.prototype.hasOwnProperty,e9={current:null},iR={key:!0,ref:!0,__self:!0,__source:!0};function oR(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)rR.call(t,r)&&!iR.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Re=G[me];if(0>>1;mei(Me,ce))_ei(Je,Me)?(G[me]=Je,G[_e]=ce,me=_e):(G[me]=Me,G[Se]=ce,me=Se);else if(_ei(Je,ce))G[me]=Je,G[_e]=ce,me=_e;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,J(R);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function R(G,X){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Re=me(g.expirationTime<=X);X=e.unstable_now(),typeof Re=="function"?g.callback=Re:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var O=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Re,t(l,G),S||v||(S=!0,J(R))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(aR);(function(e){e.exports=aR})(d0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sR=C.exports,fa=d0.exports;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),t6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ME={},IE={};function fK(e){return t6.call(IE,e)?!0:t6.call(ME,e)?!1:dK.test(e)?IE[e]=!0:(ME[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var n9=/[\-:]([a-z])/g;function r9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function i9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{nx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?am(e):""}function gK(e){switch(e.tag){case 5:return am(e.type);case 16:return am("Lazy");case 13:return am("Suspense");case 19:return am("SuspenseList");case 0:case 2:case 15:return e=rx(e.type,!1),e;case 11:return e=rx(e.type.render,!1),e;case 1:return e=rx(e.type,!0),e;default:return""}}function o6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case n6:return"Profiler";case o9:return"StrictMode";case r6:return"Suspense";case i6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cR:return(e.displayName||"Context")+".Consumer";case uR:return(e._context.displayName||"Context")+".Provider";case a9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case s9:return t=e.displayName||null,t!==null?t:o6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return o6(e(t))}catch{}}return null}function mK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return o6(t);case 8:return t===o9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ad(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vK(e){var t=fR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dy(e){e._valueTracker||(e._valueTracker=vK(e))}function hR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function f5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function a6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function OE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ad(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pR(e,t){t=t.checked,t!=null&&i9(e,"checked",t,!1)}function s6(e,t){pR(e,t);var n=ad(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?l6(e,t.type,n):t.hasOwnProperty("defaultValue")&&l6(e,t.type,ad(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function NE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function l6(e,t,n){(t!=="number"||f5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sm=Array.isArray;function f0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tv(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _m={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yK=["Webkit","ms","Moz","O"];Object.keys(_m).forEach(function(e){yK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_m[t]=_m[e]})});function yR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_m.hasOwnProperty(e)&&_m[e]?(""+t).trim():t+"px"}function SR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=yR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function d6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function f6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var h6=null;function l9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var p6=null,h0=null,p0=null;function BE(e){if(e=qv(e)){if(typeof p6!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=R4(t),p6(e.stateNode,e.type,t))}}function bR(e){h0?p0?p0.push(e):p0=[e]:h0=e}function xR(){if(h0){var e=h0,t=p0;if(p0=h0=null,BE(e),t)for(e=0;e>>=0,e===0?32:31-(AK(e)/MK|0)|0}var hy=64,py=4194304;function lm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function m5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=lm(s):(o&=a,o!==0&&(r=lm(o)))}else a=n&~i,a!==0?r=lm(a):o!==0&&(r=lm(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function jv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ws(t),e[t]=n}function NK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Em),YE=String.fromCharCode(32),qE=!1;function HR(e,t){switch(e){case"keyup":return uX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function dX(e,t){switch(e){case"compositionend":return WR(t);case"keypress":return t.which!==32?null:(qE=!0,YE);case"textInput":return e=t.data,e===YE&&qE?null:e;default:return null}}function fX(e,t){if(Gp)return e==="compositionend"||!m9&&HR(e,t)?(e=FR(),E3=h9=$c=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=QE(n)}}function jR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YR(){for(var e=window,t=f5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=f5(e.document)}return t}function v9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xX(e){var t=YR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jR(n.ownerDocument.documentElement,n)){if(r!==null&&v9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=JE(n,o);var a=JE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,b6=null,Tm=null,x6=!1;function eP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;x6||jp==null||jp!==f5(r)||(r=jp,"selectionStart"in r&&v9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tm&&sv(Tm,r)||(Tm=r,r=S5(b6,"onSelect"),0Kp||(e.current=P6[Kp],P6[Kp]=null,Kp--)}function qn(e,t){Kp++,P6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function sP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function nO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function lP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=nO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,vx=!1;function rO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,rO(e)}function vd(){if(!vx&&hu!==null){vx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&gP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=$g(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=$g(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=kx(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(sm(T))return S(P,k,T,M);if(Ng(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=_x(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=dO(!0),fO=dO(!1),Kv={},_l=md(Kv),dv=md(Kv),fv=md(Kv);function Df(e){if(e===Kv)throw Error(Ne(174));return e}function E9(e,t){switch(qn(fv,t),qn(dv,e),qn(_l,Kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:c6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=c6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(dv),Qn(fv)}function hO(e){Df(fv.current);var t=Df(_l.current),n=c6(t,e.type);t!==n&&(qn(dv,e),qn(_l,n))}function P9(e){dv.current===e&&(Qn(_l),Qn(dv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yx=[];function T9(){for(var e=0;en?n:4,e(!0);var r=Sx.transition;Sx.transition={};try{e(!1),t()}finally{Tn=n,Sx.transition=r}}function LO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},AO(e))MO(t,n);else if(n=sO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),IO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(AO(e))MO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,_9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),IO(n,t,r))}}function AO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function MO(e,t){Lm=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function IO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,c9(e,n)}}var A5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:vP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,_O.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:mP,useDebugValue:R9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=mP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||mO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,vP(yO.bind(null,r,o,e),[e]),r.flags|=2048,gv(9,vO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[cv]=r,HO(e,t,!1,!1),t.stateNode=e;e:{switch(a=f6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return F9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(S9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),T9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return P9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return C9(t.type._context),null;case 22:case 23:return F9(),null;case 24:return null;default:return null}}var Cy=!1,Hi=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function F6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var EP=!1;function KX(e,t){if(w6=v5,e=YR(),v9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(C6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=EP,EP=!1,S}function Am(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&F6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function UO(e){var t=e.alternate;t!==null&&(e.alternate=null,UO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[cv],delete t[E6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function GO(e){return e.tag===5||e.tag===3||e.tag===4}function PP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function H6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(H6(e,t,n),e=e.sibling;e!==null;)H6(e,t,n),e=e.sibling}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)jO(e,t,n),n=n.sibling}function jO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?mx(e.parentNode,n):e.nodeType===1&&mx(e,n),ov(e)):mx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&F6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function TP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-z9?Gf(e,0):D9|=n),Io(e,t)}function eN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(jv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),eN(e,n)}var tN;tN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&iO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=A9(null,t,r,e,i,n);var o=M9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,k9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,I6(t,r,e,n),t=N6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&y9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=O6(null,t,r,e,n);break e;case 1:t=CP(null,t,r,e,n);break e;case 11:t=xP(null,t,r,e,n);break e;case 14:t=wP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),O6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),CP(e,t,r,i,n);case 3:e:{if(BO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,lO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=_P(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=_P(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=fO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return hO(t),e===null&&L6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,_6(r,i)?a=null:o!==null&&_6(r,o)&&(t.flags|=32),zO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&L6(t),null;case 13:return FO(e,t,n);case 4:return E9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),xP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),A6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),A6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),wP(e,t,r,i,n);case 15:return NO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),cO(t,r,i),I6(t,r,i,n),N6(null,t,r,!0,e,n);case 19:return $O(e,t,n);case 22:return DO(e,t,n)}throw Error(Ne(156,t.tag))};function nN(e,t){return TR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function H9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return H9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===a9)return 11;if(e===s9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")H9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case o9:a=8,i|=8;break;case n6:return e=Da(12,n,t,i|2),e.elementType=n6,e.lanes=o,e;case r6:return e=Da(13,n,t,i),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(19,n,t,i),e.elementType=i6,e.lanes=o,e;case dR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uR:a=10;break e;case cR:a=9;break e;case a9:a=11;break e;case s9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=dR,e.lanes=n,e.stateNode={isHidden:!1},e}function _x(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function kx(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ox(0),this.expirationTimes=ox(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ox(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function W9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},k9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Z7(Bl.exports);var DP=Bl.exports;e6.createRoot=DP.createRoot,e6.hydrateRoot=DP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hZ=C.exports,pZ=Symbol.for("react.element"),gZ=Symbol.for("react.fragment"),mZ=Object.prototype.hasOwnProperty,vZ=hZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yZ={key:!0,ref:!0,__self:!0,__source:!0};function aN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)mZ.call(t,r)&&!yZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:pZ,type:e,key:o,ref:a,props:i,_owner:vZ.current}}G4.Fragment=gZ;G4.jsx=aN;G4.jsxs=aN;(function(e){e.exports=G4})(U4);const Ln=U4.exports.Fragment,x=U4.exports.jsx,ee=U4.exports.jsxs;var j9=C.exports.createContext({});j9.displayName="ColorModeContext";function Xv(){const e=C.exports.useContext(j9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Py={light:"chakra-ui-light",dark:"chakra-ui-dark"};function SZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),zP=()=>{};function BP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function sN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>BP(a,s)),[h,g]=C.exports.useState(()=>BP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?zP:k,setColorMode:t?zP:P,forced:t!==void 0}),[E,k,P,t]);return x(j9.Provider,{value:T,children:n})}sN.displayName="ColorModeProvider";var Y6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ut=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,Ye=Array(U);++he-1}function M1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=A1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=M1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||U1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==S||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ut?et(ut):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?H1(U,!0):zs(U)}var cn=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function U1(){return!1}e.exports=cn})(Y6,Y6.exports);const xl=Y6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),FP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,q6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=FP(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=FP(s),i?`${s} !important`:s};function vv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=q6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=vv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?vv({scale:n,compose:r}):r}}var lN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...lN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...lN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},uN="& > :not(style) ~ :not(style)",RZ={[uN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[uN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},K6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(K6)),cN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||cN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in K6?K6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,S]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=dN(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var dN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||dN(e)||cN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:vv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},X6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(X6,{shadow:X6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:vv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:vv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var fN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ex=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Ex(t,e,n)}},Rm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Rm,{insetStart:Rm.insetInlineStart,insetEnd:Rm.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function hN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(hN).join(` ${e} `).replace(/calc/g,""),$P=(...e)=>`calc(${j4("+",...e)})`,HP=(...e)=>`calc(${j4("-",...e)})`,Z6=(...e)=>`calc(${j4("*",...e)})`,WP=(...e)=>`calc(${j4("/",...e)})`,VP=e=>{const t=hN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Z6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af($P(e,...t)),subtract:(...t)=>Af(HP(e,...t)),multiply:(...t)=>Af(Z6(e,...t)),divide:(...t)=>Af(WP(e,...t)),negate:()=>Af(VP(e)),toString:()=>e.toString()}),{add:$P,subtract:HP,multiply:Z6,divide:WP,negate:VP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Q6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var pN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Y9=e=>Object.fromEntries(Object.entries(e).sort(pN));function UP(e){const t=Y9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(Y9(e));return new Set(t)}function GP(e){if(!e)return e;e=Q6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function cm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Q6(e)})`),t&&n.push("and",`(max-width: ${Q6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=UP(e),n=Object.entries(e).sort(pN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?GP(u):void 0,{_minW:GP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:cm(null,u),minWQuery:cm(a),minMaxQuery:cm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:Y9(e),asArray:UP(e),details:n,media:[null,...t.map(o=>cm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>gN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>gN(t=>e(t,"~ &"),"[data-peer]",".peer"),gN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function jP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=jP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=jP(S,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(J6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(J6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function J6(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(J6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var q9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,fN,XZ,Rm,X6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,fN,Rm),kQ=Object.keys(_Q),EQ=[...Object.keys(q9),...pQ],PQ={...q9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let S=t[g];if(S===!0&&(S={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=zf(S?.property,r);if(!a&&S?.static){const P=zf(S.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var mN=e=>t=>OQ({theme:t,pseudos:Y4,configs:q9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||Sv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Zv(e,D3()+(t<6&&kl()==32&&ua()==32))}function tC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&tC(Hr);break;case 40:e===41&&tC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Zv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!Sv(kl());)ua();return Zv(e,No)}function tJ(e){return wN(B3("",null,null,null,[""],e=xN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(S=k,k=ua()){case 40:if(S!=108&&Ti(N,g-1)==58){eC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(S);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?qP(N+";",r,n,g-1):qP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=YP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(YP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:S===45&&hl(N)==2&&(w=0)}}return o}function YP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Z9(m),S=0,w=0,E=0;S0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?K9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,vN,q4(KQ()),yv(e,2,-2),0)}function qP(e,t,n,r){return X4(e,t,n,X9,yv(e,0,r),yv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Z9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~eC(e,"stretch")?_N(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~eC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Fi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case X9:t.return=_N(t.value,t.length);break;case yN:return y0([Vg(t,{value:wn(t.value,"@","@"+mn)})],i);case K9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Vg(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Vg(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},fJ=[dJ],kN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,IN=function(t){return t.charCodeAt(1)===45},ZP=function(t){return t!=null&&typeof t!="boolean"},Px=CN(function(e){return IN(e)?e:e.replace(_J,"-$&").toLowerCase()}),QP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!IN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,bv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},FN=UJ(VJ);function $N(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var HN=e=>$N(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function WN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=CN(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},nT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},rT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return AN(n,r,i),TJ(function(){return MN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=rT(t,n,r),l=s||nT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Mi(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function VN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function iT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Tx(s,a,e+1/3),i=Tx(s,a,e),o=Tx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function oT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var oC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=VN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Lx),rgba:new RegExp("rgba"+Ax),hsl:new RegExp("hsl"+Lx),hsla:new RegExp("hsla"+Ax),hsv:new RegExp("hsv"+Lx),hsva:new RegExp("hsva"+Ax),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(oC[e])e=oC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:sT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:sT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Qv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=VN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=iT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=iT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),aT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+aT(this.r,this.g,this.b,!1),n=0,r=Object.entries(oC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(UN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Qv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=GN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=GN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=YN.find(function(a){return a.name===e});if(n){var r=jN(n);if(r.hueRange)return r.hueRange}var i=new Qv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function GN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=YN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function jN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var YN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Qv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Qv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Qv(r).setAlpha(t).toRgbString()};function lT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function qee(e){const t=UN().toHexString();return!e||Gee(e)?t:e.string&&e.colors?Xee(e.string,e.colors):e.string&&!e.colors?Kee(e.string):e.colors&&!e.string?Zee(e.colors):t}function Kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Xee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function r8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Qee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function qN(e){return Qee(e)&&e.reference?e.reference:String(e)}var uS=(e,...t)=>t.map(qN).join(` ${e} `).replace(/calc/g,""),uT=(...e)=>`calc(${uS("+",...e)})`,cT=(...e)=>`calc(${uS("-",...e)})`,aC=(...e)=>`calc(${uS("*",...e)})`,dT=(...e)=>`calc(${uS("/",...e)})`,fT=e=>{const t=qN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:aC(t,-1)},pu=Object.assign(e=>({add:(...t)=>pu(uT(e,...t)),subtract:(...t)=>pu(cT(e,...t)),multiply:(...t)=>pu(aC(e,...t)),divide:(...t)=>pu(dT(e,...t)),negate:()=>pu(fT(e)),toString:()=>e.toString()}),{add:uT,subtract:cT,multiply:aC,divide:dT,negate:fT});function Jee(e){return!Number.isInteger(parseFloat(e.toString()))}function ete(e,t="-"){return e.replace(/\s+/g,t)}function KN(e){const t=ete(e.toString());return t.includes("\\.")?e:Jee(e)?t.replace(".","\\."):e}function tte(e,t=""){return[t,KN(e)].filter(Boolean).join("-")}function nte(e,t){return`var(${KN(e)}${t?`, ${t}`:""})`}function rte(e,t=""){return`--${tte(e,t)}`}function ni(e,t){const n=rte(e,t?.prefix);return{variable:n,reference:nte(n,ite(t?.fallback))}}function ite(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ote,defineMultiStyleConfig:ate}=Jn(nee.keys),ste={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ute={pt:"2",px:"4",pb:"5"},cte={fontSize:"1.25em"},dte=ote({container:ste,button:lte,panel:ute,icon:cte}),fte=ate({baseStyle:dte}),{definePartsStyle:Jv,defineMultiStyleConfig:hte}=Jn(ree.keys),ca=zn("alert-fg"),_u=zn("alert-bg"),pte=Jv({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function i8(e){const{theme:t,colorScheme:n}=e,r=q0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var gte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),mte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ca.reference}}}),vte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ca.reference}}}),yte=Jv(e=>{const{colorScheme:t}=e;return{container:{[ca.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ca.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ca.reference}}}),Ste={subtle:gte,"left-accent":mte,"top-accent":vte,solid:yte},bte=hte({baseStyle:pte,variants:Ste,defaultProps:{variant:"subtle",colorScheme:"blue"}}),XN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},wte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Cte={...XN,...xte,container:wte},ZN=Cte,_te=e=>typeof e=="function";function io(e,...t){return _te(e)?e(...t):e}var{definePartsStyle:QN,defineMultiStyleConfig:kte}=Jn(iee.keys),S0=zn("avatar-border-color"),Mx=zn("avatar-bg"),Ete={borderRadius:"full",border:"0.2em solid",[S0.variable]:"white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference},Pte={[Mx.variable]:"colors.gray.200",_dark:{[Mx.variable]:"colors.whiteAlpha.400"},bgColor:Mx.reference},hT=zn("avatar-background"),Tte=e=>{const{name:t,theme:n}=e,r=t?qee({string:t}):"colors.gray.400",i=Yee(r)(n);let o="white";return i||(o="gray.800"),{bg:hT.reference,"&:not([data-loaded])":{[hT.variable]:r},color:o,[S0.variable]:"colors.white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference,verticalAlign:"top"}},Lte=QN(e=>({badge:io(Ete,e),excessLabel:io(Pte,e),container:io(Tte,e)}));function Pc(e){const t=e!=="100%"?ZN[e]:void 0;return QN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Ate={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Mte=kte({baseStyle:Lte,sizes:Ate,defaultProps:{size:"md"}}),Ite={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},b0=zn("badge-bg"),wl=zn("badge-color"),Rte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.500`,.6)(n);return{[b0.variable]:`colors.${t}.500`,[wl.variable]:"colors.white",_dark:{[b0.variable]:r,[wl.variable]:"colors.whiteAlpha.800"},bg:b0.reference,color:wl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.16)(n);return{[b0.variable]:`colors.${t}.100`,[wl.variable]:`colors.${t}.800`,_dark:{[b0.variable]:r,[wl.variable]:`colors.${t}.200`},bg:b0.reference,color:wl.reference}},Nte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.8)(n);return{[wl.variable]:`colors.${t}.500`,_dark:{[wl.variable]:r},color:wl.reference,boxShadow:`inset 0 0 0px 1px ${wl.reference}`}},Dte={solid:Rte,subtle:Ote,outline:Nte},Nm={baseStyle:Ite,variants:Dte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:zte,definePartsStyle:Bte}=Jn(oee.keys),Fte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$te=Bte({link:Fte}),Hte=zte({baseStyle:$te}),Wte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},JN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:yt("inherit","whiteAlpha.900")(e),_hover:{bg:yt("gray.100","whiteAlpha.200")(e)},_active:{bg:yt("gray.200","whiteAlpha.300")(e)}};const r=q0(`${t}.200`,.12)(n),i=q0(`${t}.200`,.24)(n);return{color:yt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:yt(`${t}.50`,r)(e)},_active:{bg:yt(`${t}.100`,i)(e)}}},Vte=e=>{const{colorScheme:t}=e,n=yt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(JN,e)}},Ute={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=yt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:yt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:yt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Ute[t]??{},a=yt(n,`${t}.200`)(e);return{bg:a,color:yt(r,"gray.800")(e),_hover:{bg:yt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:yt(o,`${t}.400`)(e)}}},jte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:yt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:yt(`${t}.700`,`${t}.500`)(e)}}},Yte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},qte={ghost:JN,outline:Vte,solid:Gte,link:jte,unstyled:Yte},Kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xte={baseStyle:Wte,variants:qte,sizes:Kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:Zte}=Jn(Eee.keys),F5=zn("card-bg"),x0=zn("card-padding"),Qte=Yf({container:{[F5.variable]:"chakra-body-bg",backgroundColor:F5.reference,color:"chakra-body-text"},body:{padding:x0.reference,flex:"1 1 0%"},header:{padding:x0.reference},footer:{padding:x0.reference}}),Jte={sm:Yf({container:{borderRadius:"base",[x0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[x0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[x0.variable]:"space.7"}})},ene={elevated:Yf({container:{boxShadow:"base",_dark:{[F5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[F5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},tne=Zte({baseStyle:Qte,variants:ene,sizes:Jte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:F3,defineMultiStyleConfig:nne}=Jn(aee.keys),Dm=zn("checkbox-size"),rne=e=>{const{colorScheme:t}=e;return{w:Dm.reference,h:Dm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e),_hover:{bg:yt(`${t}.600`,`${t}.300`)(e),borderColor:yt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:yt("gray.200","transparent")(e),bg:yt("gray.200","whiteAlpha.300")(e),color:yt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e)},_disabled:{bg:yt("gray.100","whiteAlpha.100")(e),borderColor:yt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:yt("red.500","red.300")(e)}}},ine={_disabled:{cursor:"not-allowed"}},one={userSelect:"none",_disabled:{opacity:.4}},ane={transitionProperty:"transform",transitionDuration:"normal"},sne=F3(e=>({icon:ane,container:ine,control:io(rne,e),label:one})),lne={sm:F3({control:{[Dm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:F3({control:{[Dm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:F3({control:{[Dm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},$5=nne({baseStyle:sne,sizes:lne,defaultProps:{size:"md",colorScheme:"blue"}}),zm=ni("close-button-size"),Ug=ni("close-button-bg"),une={w:[zm.reference],h:[zm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ug.variable]:"colors.blackAlpha.100",_dark:{[Ug.variable]:"colors.whiteAlpha.100"}},_active:{[Ug.variable]:"colors.blackAlpha.200",_dark:{[Ug.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ug.reference},cne={lg:{[zm.variable]:"sizes.10",fontSize:"md"},md:{[zm.variable]:"sizes.8",fontSize:"xs"},sm:{[zm.variable]:"sizes.6",fontSize:"2xs"}},dne={baseStyle:une,sizes:cne,defaultProps:{size:"md"}},{variants:fne,defaultProps:hne}=Nm,pne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},gne={baseStyle:pne,variants:fne,defaultProps:hne},mne={w:"100%",mx:"auto",maxW:"prose",px:"4"},vne={baseStyle:mne},yne={opacity:.6,borderColor:"inherit"},Sne={borderStyle:"solid"},bne={borderStyle:"dashed"},xne={solid:Sne,dashed:bne},wne={baseStyle:yne,variants:xne,defaultProps:{variant:"solid"}},{definePartsStyle:sC,defineMultiStyleConfig:Cne}=Jn(see.keys),Ix=zn("drawer-bg"),Rx=zn("drawer-box-shadow");function Ep(e){return sC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var _ne={bg:"blackAlpha.600",zIndex:"overlay"},kne={display:"flex",zIndex:"modal",justifyContent:"center"},Ene=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ix.variable]:"colors.white",[Rx.variable]:"shadows.lg",_dark:{[Ix.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},bg:Ix.reference,boxShadow:Rx.reference}},Pne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tne={position:"absolute",top:"2",insetEnd:"3"},Lne={px:"6",py:"2",flex:"1",overflow:"auto"},Ane={px:"6",py:"4"},Mne=sC(e=>({overlay:_ne,dialogContainer:kne,dialog:io(Ene,e),header:Pne,closeButton:Tne,body:Lne,footer:Ane})),Ine={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Rne=Cne({baseStyle:Mne,sizes:Ine,defaultProps:{size:"xs"}}),{definePartsStyle:One,defineMultiStyleConfig:Nne}=Jn(lee.keys),Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},zne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Bne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fne=One({preview:Dne,input:zne,textarea:Bne}),$ne=Nne({baseStyle:Fne}),{definePartsStyle:Hne,defineMultiStyleConfig:Wne}=Jn(uee.keys),w0=zn("form-control-color"),Vne={marginStart:"1",[w0.variable]:"colors.red.500",_dark:{[w0.variable]:"colors.red.300"},color:w0.reference},Une={mt:"2",[w0.variable]:"colors.gray.600",_dark:{[w0.variable]:"colors.whiteAlpha.600"},color:w0.reference,lineHeight:"normal",fontSize:"sm"},Gne=Hne({container:{width:"100%",position:"relative"},requiredIndicator:Vne,helperText:Une}),jne=Wne({baseStyle:Gne}),{definePartsStyle:Yne,defineMultiStyleConfig:qne}=Jn(cee.keys),C0=zn("form-error-color"),Kne={[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Xne={marginEnd:"0.5em",[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference},Zne=Yne({text:Kne,icon:Xne}),Qne=qne({baseStyle:Zne}),Jne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},ere={baseStyle:Jne},tre={fontFamily:"heading",fontWeight:"bold"},nre={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},rre={baseStyle:tre,sizes:nre,defaultProps:{size:"xl"}},{definePartsStyle:vu,defineMultiStyleConfig:ire}=Jn(dee.keys),ore=vu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},are={lg:vu({field:Tc.lg,addon:Tc.lg}),md:vu({field:Tc.md,addon:Tc.md}),sm:vu({field:Tc.sm,addon:Tc.sm}),xs:vu({field:Tc.xs,addon:Tc.xs})};function o8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||yt("blue.500","blue.300")(e),errorBorderColor:n||yt("red.500","red.300")(e)}}var sre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:yt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:yt("inherit","whiteAlpha.50")(e),bg:yt("gray.100","whiteAlpha.300")(e)}}}),lre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e),_hover:{bg:yt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e)}}}),ure=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cre=vu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dre={outline:sre,filled:lre,flushed:ure,unstyled:cre},vn=ire({baseStyle:ore,sizes:are,variants:dre,defaultProps:{size:"md",variant:"outline"}}),Ox=zn("kbd-bg"),fre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hre={baseStyle:fre},pre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gre={baseStyle:pre},{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(fee.keys),yre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Sre=vre({icon:yre}),bre=mre({baseStyle:Sre}),{defineMultiStyleConfig:xre,definePartsStyle:wre}=Jn(hee.keys),fl=zn("menu-bg"),Nx=zn("menu-shadow"),Cre={[fl.variable]:"#fff",[Nx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Nx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Nx.reference},_re={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},kre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ere={opacity:.6},Pre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tre={transitionProperty:"common",transitionDuration:"normal"},Lre=wre({button:Tre,list:Cre,item:_re,groupTitle:kre,command:Ere,divider:Pre}),Are=xre({baseStyle:Lre}),{defineMultiStyleConfig:Mre,definePartsStyle:lC}=Jn(pee.keys),Ire={bg:"blackAlpha.600",zIndex:"modal"},Rre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:yt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:yt("lg","dark-lg")(e)}},Nre={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Dre={position:"absolute",top:"2",insetEnd:"3"},zre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bre={px:"6",py:"4"},Fre=lC(e=>({overlay:Ire,dialogContainer:io(Rre,e),dialog:io(Ore,e),header:Nre,closeButton:Dre,body:io(zre,e),footer:Bre}));function fs(e){return lC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var $re={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Hre=Mre({baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}}),Wre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},eD=Wre,{defineMultiStyleConfig:Vre,definePartsStyle:tD}=Jn(gee.keys),a8=ni("number-input-stepper-width"),nD=ni("number-input-input-padding"),Ure=pu(a8).add("0.5rem").toString(),Dx=ni("number-input-bg"),zx=ni("number-input-color"),Bx=ni("number-input-border-color"),Gre={[a8.variable]:"sizes.6",[nD.variable]:Ure},jre=e=>{var t;return((t=io(vn.baseStyle,e))==null?void 0:t.field)??{}},Yre={width:a8.reference},qre={borderStart:"1px solid",borderStartColor:Bx.reference,color:zx.reference,bg:Dx.reference,[zx.variable]:"colors.chakra-body-text",[Bx.variable]:"colors.chakra-border-color",_dark:{[zx.variable]:"colors.whiteAlpha.800",[Bx.variable]:"colors.whiteAlpha.300"},_active:{[Dx.variable]:"colors.gray.200",_dark:{[Dx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Kre=tD(e=>({root:Gre,field:io(jre,e)??{},stepperGroup:Yre,stepper:qre}));function Iy(e){var t,n;const r=(t=vn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=eD.fontSizes[o];return tD({field:{...r.field,paddingInlineEnd:nD.reference,verticalAlign:"top"},stepper:{fontSize:pu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Xre={xs:Iy("xs"),sm:Iy("sm"),md:Iy("md"),lg:Iy("lg")},Zre=Vre({baseStyle:Kre,sizes:Xre,variants:vn.variants,defaultProps:vn.defaultProps}),pT,Qre={...(pT=vn.baseStyle)==null?void 0:pT.field,textAlign:"center"},Jre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},gT,eie={outline:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((gT=vn.variants)==null?void 0:gT.unstyled.field)??{}},tie={baseStyle:Qre,sizes:Jre,variants:eie,defaultProps:vn.defaultProps},{defineMultiStyleConfig:nie,definePartsStyle:rie}=Jn(mee.keys),Ry=ni("popper-bg"),iie=ni("popper-arrow-bg"),mT=ni("popper-arrow-shadow-color"),oie={zIndex:10},aie={[Ry.variable]:"colors.white",bg:Ry.reference,[iie.variable]:Ry.reference,[mT.variable]:"colors.gray.200",_dark:{[Ry.variable]:"colors.gray.700",[mT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sie={px:3,py:2,borderBottomWidth:"1px"},lie={px:3,py:2},uie={px:3,py:2,borderTopWidth:"1px"},cie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},die=rie({popper:oie,content:aie,header:sie,body:lie,footer:uie,closeButton:cie}),fie=nie({baseStyle:die}),{defineMultiStyleConfig:hie,definePartsStyle:dm}=Jn(vee.keys),pie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=yt(lT(),lT("1rem","rgba(0,0,0,0.1)"))(e),a=yt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${to(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=dm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:dm({track:{h:"1"}}),sm:dm({track:{h:"2"}}),md:dm({track:{h:"3"}}),lg:dm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),vT,Tie={...(vT=vn.baseStyle)==null?void 0:vT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},yT,ST,bT,xT,wT,CT,_T,kT,Mie={lg:{...(yT=vn.sizes)==null?void 0:yT.lg,field:{...(ST=vn.sizes)==null?void 0:ST.lg.field,...Ny}},md:{...(bT=vn.sizes)==null?void 0:bT.md,field:{...(xT=vn.sizes)==null?void 0:xT.md.field,...Ny}},sm:{...(wT=vn.sizes)==null?void 0:wT.sm,field:{...(CT=vn.sizes)==null?void 0:CT.sm.field,...Ny}},xs:{...(_T=vn.sizes)==null?void 0:_T.xs,field:{...(kT=vn.sizes)==null?void 0:kT.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),Fx=zn("skeleton-start-color"),$x=zn("skeleton-end-color"),Rie={[Fx.variable]:"colors.gray.100",[$x.variable]:"colors.gray.400",_dark:{[Fx.variable]:"colors.gray.800",[$x.variable]:"colors.gray.600"},background:Fx.reference,borderColor:$x.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Hx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Hx.variable]:"colors.white",_dark:{[Hx.variable]:"colors.gray.700"},bg:Hx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),Cv=zn("slider-thumb-size"),_v=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...r8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...r8({orientation:e.orientation,horizontal:{h:_v.reference},vertical:{w:_v.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...r8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Cv.reference,h:Cv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[Cv.variable]:"sizes.4",[_v.variable]:"sizes.1"}}),Uie=cS({container:{[Cv.variable]:"sizes.3.5",[_v.variable]:"sizes.1"}}),Gie=cS({container:{[Cv.variable]:"sizes.2.5",[_v.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:rD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=rD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:rD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Bm=ni("switch-track-width"),qf=ni("switch-track-height"),Wx=ni("switch-track-diff"),aoe=pu.subtract(Bm,qf),uC=ni("switch-thumb-x"),Gg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Bm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[Gg.variable]:"colors.gray.300",_dark:{[Gg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Gg.variable]:`colors.${t}.500`,_dark:{[Gg.variable]:`colors.${t}.200`}},bg:Gg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${uC.reference})`}},uoe=H3(e=>({container:{[Wx.variable]:aoe,[uC.variable]:Wx.reference,_rtl:{[uC.variable]:pu(Wx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Bm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Bm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Bm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ET,Woe={...(ET=vn.baseStyle)==null?void 0:ET.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},PT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((PT=vn.variants)==null?void 0:PT.unstyled.field)??{}},TT,LT,AT,MT,Uoe={xs:((TT=vn.sizes)==null?void 0:TT.xs.field)??{},sm:((LT=vn.sizes)==null?void 0:LT.sm.field)??{},md:((AT=vn.sizes)==null?void 0:AT.md.field)??{},lg:((MT=vn.sizes)==null?void 0:MT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Vx=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Vx.reference,[zy.variable]:"colors.gray.700",[Vx.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Vx.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Nm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...eD,sizes:ZN,shadows:oae,space:XN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(xv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function iD(){const e=Xv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Xv();return x(sS,{styles:t=>{const n=FN(t,"styles.global"),r=WN(n,{theme:t,colorMode:e});return r?mN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=$N(a,(g,m)=>TQ(m)),l=WN(e,t),u=Object.assign({},i,l,HN(s),o),h=mN(u)(t.theme);return r?[h,r]:h};function Ux(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=iC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Xv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function oD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=iD(),a=e?FN(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},HN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return oD(e,t)}function Ri(e,t={}){return oD(e,t)}function Dae(){const e=new Map;return new Proxy(Ux,{apply(t,n,r){return Ux(...r)},get(t,n){return e.has(n)||e.set(n,Ux(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function IT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function RT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function OT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var cC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=IT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=RT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=RT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=OT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=IT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return cC(()=>()=>e.current.destroy()),e.current}var[Vae,aD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=aD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);cC(()=>()=>{!i.current||t.unregister(i.current)},[]),cC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function sD(){return[W5(Vae),()=>W5(aD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),NT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??NT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const S=a??NT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,g]}const s8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,lD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(lD),a=C.exports.useContext(h1),s=C.exports.useContext(s8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function kv(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>kv(e[t]))}function uD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||kv(n)?n:void 0,animate:kv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[DT(t),DT(n)])}function DT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Ev={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Ev.projectionNodeConstructor=e[t]:Ev[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if(Fm.hasEverUpdated)return Qae++})}const l8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const cD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(s8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),S=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(lD).strict,P=C.exports.useContext(cD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Ev.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,S,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(l8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function u8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function dD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function fD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,hD=(e,t)=>n=>Math.max(Math.min(n,t),e),$m=e=>e%1?Number(e.toFixed(5)):e,Pv=/(-)?([\d]*\.?[\d])+/g,dC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function e2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hm=Object.assign(Object.assign({},gh),{transform:hD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),t2=e=>({test:t=>e2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=t2("deg"),Pl=t2("%"),Ct=t2("px"),fse=t2("vh"),hse=t2("vw"),zT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),c8=(e,t)=>n=>Boolean(e2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),pD=(e,t,n)=>r=>{if(!e2(r))return r;const[i,o,a,s]=r.match(Pv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:c8("hsl","hue"),parse:pD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform($m(t))+", "+Pl.transform($m(n))+", "+$m(Hm.transform(r))+")"},pse=hD(0,255),Gx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:c8("rgb","red"),parse:pD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gx.transform(e)+", "+Gx.transform(t)+", "+Gx.transform(n)+", "+$m(Hm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const fC={test:c8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||fC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):fC.parse(e),transform:e=>e2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},gD="${c}",mD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&e2(e)&&((n=(t=e.match(Pv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(dC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function vD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(dC);r&&(n=r.length,e=e.replace(dC,gD),t.push(...r.map(Ji.parse)));const i=e.match(Pv);return i&&(e=e.replace(Pv,mD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function yD(e){return vD(e).values}function SD(e){const{values:t,numColors:n,tokenised:r}=vD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=yD(e);return SD(e)(t.map(vse))}const ku={test:mse,parse:yD,createTransformer:SD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Pv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,hC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),BT={...gh,transform:Math.round},bD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Hm,originX:zT,originY:zT,originZ:Ct,zIndex:BT,fillOpacity:Hm,strokeOpacity:Hm,numOctaves:BT};function d8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(fD(m)){o[m]=v;continue}const S=bD[m],w=cse(v,S);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(S.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const f8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function xD(e,t,n){for(const r in t)!Il(t[r])&&!dD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=f8();return d8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return xD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let wD=e=>!j5(e);function Ase(e){!e||(wD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(wD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function FT(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=FT(t,e.x,e.width),i=FT(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function h8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){d8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const CD=()=>({...f8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=CD();return h8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};xD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(u8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const _D=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function kD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ED=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function PD(e,t,n,r){kD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ED.has(i)?i:_D(i),t.attrs[i])}function p8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||dD(r,e))&&(n[r]=t[r]);return n}function TD(e){const t=p8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function g8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Tv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),LD=e=>Tv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const AD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=uD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const S=g8(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:AD({scrapeMotionValuesFromProps:TD,createRenderState:CD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}h8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),PD(t,n)}})},Wse={useVisualState:AD({scrapeMotionValuesFromProps:p8,createRenderState:f8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...u8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};pC(t,"focus",e?r:void 0),pC(t,"blur",e?i:void 0)}function MD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function ID(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function m8(e,t="page"){return{point:ID(e)?Yse(e,t):qse(e,t)}}const RD=(e,t=!1)=>{const n=r=>e(r,m8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function OD(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,OD(t),RD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return pC(e,OD(t),n&&RD(n,t==="pointerdown"),r)}function ND(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const $T=ND("dragHorizontal"),HT=ND("dragVertical");function DD(e){let t=!1;if(e==="y")t=HT();else if(e==="x")t=$T();else{const n=$T(),r=HT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function zD(){const e=DD(!0);return e?(e(),!1):!0}function WT(e,t,n){return(r,i)=>{!MD(r)||zD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?WT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?WT(r,!1,t):void 0,{passive:!t})}const BD=(e,t)=>t?e===t?!0:BD(e,t.parentElement):!1;function v8(e){return C.exports.useEffect(()=>()=>e(),[])}function FD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),jx=.001,nle=.01,VT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=VT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,VT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=gC(u,a),S=Math.exp(-g);return jx-m/v*S},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-g),w=gC(Math.pow(u,2),a);return(-i(u)+jx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-jx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!UT(e,ule)&&UT(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function y8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=FD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=GT,S=GT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=gC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}y8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const GT=e=>0,Lv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function Yx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Yx(l,s,e+1/3),o=Yx(l,s,e),a=Yx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[fC,Vc,Ff],YT=e=>fle.find(t=>t.test(e)),$D=(e,t)=>{let n=YT(e),r=YT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=jT(i),n=Vc),r===Ff&&(o=jT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},mC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function HD(e,t){return mC(e)?n=>Cr(e,t,n):Ji.test(e)?$D(e,t):VD(e,t)}const WD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>HD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=HD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function qT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=qT(e),i=qT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(WD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?$D:VD;if(Array.isArray(e))return WD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Lv(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Lv(e[o],e[o+1],i);return t[o](s)}}function UD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),S8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),GD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=GD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},jD=1.525,wle=4/11,Cle=8/11,_le=9/10,b8=e=>e,x8=ble(2),kle=yS(x8),YD=S8(x8),qD=e=>1-Math.sin(Math.acos(e)),w8=yS(qD),Ele=S8(w8),C8=GD(jD),Ple=yS(C8),Tle=S8(C8),Lle=xle(jD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||YD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return UD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const KT={keyframes:U3,spring:y8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(KT[e.type])return KT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?y8:U3}const KD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),XD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),KD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Av=!0),e),{}),Vle=n2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Av||jle(),n.schedule(r,i,o)),e},{}),Ule=n2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});n2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),ZD=e=>{Av=!1,E0.delta=vC?KD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,yC=!0,n2.forEach(Gle),yC=!1,Av&&(vC=!1,XD(ZD))},jle=()=>{Av=!0,vC=!0,yC||XD(ZD)},Yle=()=>E0;function QD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?QD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function JD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:S}=e,w=FD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=UD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=QD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function ez(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=ez(V-O,Yle().delta),(R===1&&V>M||R===-1&&VS?.stop()}}const SC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),XT=e=>SC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function _8(e,t){if(mC(e)&&mC(t))return Fy(e,t);if(SC(e)&&SC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=XT(e)&&XT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const tz=(e,t)=>1-3*t+3*e,nz=(e,t)=>3*t-6*e,rz=e=>3*e,Z5=(e,t,n)=>((tz(t,n)*e+nz(t,n))*e+rz(t))*e,iz=(e,t,n)=>3*tz(t,n)*e*e+2*nz(t,n)*e+rz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!zD()}function g(S,w){!h()||(BD(i.current,S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(S,w))}Y5(i,"pointerdown",o?v:void 0,l),v8(u)}const aue="production",oz=typeof process>"u"||process.env===void 0?aue:"production",ZT=new Set;function az(e,t,n){e||ZT.has(t)||(console.warn(t),n&&console.warn(n),ZT.add(t))}const bC=new WeakMap,qx=new WeakMap,sue=e=>{const t=bC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;qx.has(n)||qx.set(n,{});const r=qx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return bC.set(e,n),r.observe(e),()=>{bC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(oz!=="production"&&az(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function k8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function sz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:b8,easeIn:x8,easeInOut:YD,easeOut:kle,circIn:qD,circInOut:Ele,circOut:w8,backIn:C8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},QT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",JT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),eL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Kx,backgroundColor:Kx,color:Kx,default:Hy},xue=(e,t)=>{let n;return Tv(t)?n=bue:n=eL[e]||eL.default,{to:t,...n(t)}},wue={...bD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:hC,WebkitFilter:hC},E8=e=>wue[e];function P8(e,t){var n;let r=E8(e);return r!==hC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},lz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),uz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),lz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Mv=!0),e),{}),Es=r2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||Tue(),n.schedule(r,i,o)),e},{}),ah=r2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Xx=r2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),cz=e=>{Mv=!1,P0.delta=xC?lz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,wC=!0,r2.forEach(Pue),wC=!1,Mv&&(xC=!1,uz(cz))},Tue=()=>{Mv=!0,xC=!0,wC||uz(cz)},CC=()=>P0;function dz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(QT):QT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(T8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=T8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=JT(e,n);a==="none"&&s&&typeof n=="string"?a=P8(e,n):tL(a)&&typeof n=="string"?a=nL(n):!Array.isArray(n)&&tL(n)&&typeof a=="string"&&(n=nL(a));const l=JT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):JD({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=LD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function tL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function nL(e){return typeof e=="number"?0:P8("",e)}function T8(e,t){return e[t]||e.default||e}function L8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=dz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function A8(e,t){e.indexOf(t)===-1&&e.push(t)}function M8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wm{constructor(){this.subscriptions=[]}add(t){return A8(this.subscriptions,t),()=>M8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Wm,this.velocityUpdateSubscribers=new Wm,this.renderSubscribers=new Wm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=CC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ez(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const fz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},hz=[gh,Ct,Pl,Lc,hse,fse,Fue],jg=e=>hz.find(fz(e)),$ue=[...hz,Ji,ku],Hue=e=>$ue.find(fz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return g8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=LD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s_C(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=_C(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=pz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function _C(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>pz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function pz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=L8(m,v,S,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(_C(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const I8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...I8].reverse(),ece=I8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,S.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Tv(K)&&Tv(G)?!sz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):S.add(J):K!==void 0&&S.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!sz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=k8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class gz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Qx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=_8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=CC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Zx(h,this.transformPagePoint),MD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Qx(Zx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},ID(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=m8(t),o=Zx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=CC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Qx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Zx(e,t){return t?{point:t(e.point)}:e}function rL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qx({point:e},t){return{point:e,delta:rL(e,mz(t)),offset:rL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function mz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=mz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function iL(e,t=0,n=.01){return _8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function lL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:lL(e.x,n,i),y:lL(e.y,t,r)}}function uL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Lv(t.min,t.max-r,e.min):r>i&&(n=Lv(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const kC=.35;function pce(e=kC){return e===!1?e=0:e===!0&&(e=kC),{x:cL(e,"left","right"),y:cL(e,"top","bottom")}}function cL(e,t,n){return{min:dL(e,t),max:dL(e,n)}}function dL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const fL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gm=()=>({x:fL(),y:fL()}),hL=()=>({min:0,max:0}),Zr=()=>({x:hL(),y:hL()});function cl(e){return[e("x"),e("y")]}function vz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jx(e){return e===void 0||e===1}function EC({scale:e,scaleX:t,scaleY:n}){return!Jx(e)||!Jx(t)||!Jx(n)}function kf(e){return EC(e)||yz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function yz(e){return pL(e.x)||pL(e.y)}function pL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function gL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function PC(e,t=0,n=1,r,i){e.min=gL(e.min,t,n,r,i),e.max=gL(e.max,t,n,r,i)}function Sz(e,{x:t,y:n}){PC(e.x,t.translate,t.scale,t.originPoint),PC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(m8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=DD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new gz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=vz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return L8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=kC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(s8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new gz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),v8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function TC(e){return typeof e=="string"&&e.startsWith("var(--")}const xz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=xz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function LC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():TC(i)?LC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!TC(o))return;const a=LC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!TC(o))continue;const a=LC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),wz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(wz),Cz=(e,t)=>{e.set(t,!1),e.set(t)},vL=e=>e===gh||e===Ct;var yL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(yL||(yL={}));const SL=(e,t)=>parseFloat(e.split(", ")[t]),bL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return SL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?SL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const xL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:bL(4,13),y:bL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=xL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);Cz(h,s[u]),e[u]=xL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(wz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=jg(h);const m=t[l];let v;if(Tv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],g=jg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},AC={current:null},_z={current:!1};function Bce(){if(_z.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>AC.current=e.matches;e.addListener(t),t()}else AC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const kz=Object.keys(Ev),$ce=kz.length,wL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=uD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),_z.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:AC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=kz[l],{isEnabled:h,Component:g}=Ev[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=g8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Ez=["initial",...I8],Wce=Ez.length;class Pz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Pz{readValueFromInstance(t,n){if(p1.has(n)){const r=E8(n);return r&&r.default||0}else{const r=Vce(t),i=(fD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bz(t,n)}build(t,n,r,i){d8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return p8(t)}renderInstance(t,n,r,i){kD(t,n,r,i)}}class Gce extends Pz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=E8(n))===null||r===void 0?void 0:r.default)||0:(n=ED.has(n)?n:_D(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return TD(t)}build(t,n,r,i){h8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){PD(t,n,r,i)}}const jce=(e,t)=>u8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function CL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=CL(e,t.target.x),r=CL(e,t.target.y);return`${n}% ${r}%`}},_L="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(xz,v=>(o.push(v),_L)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(_L,()=>{const S=o[v];return v++,S})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=k8(),r=C.exports.useContext(l8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(cD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...Yg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yg,borderTopRightRadius:Yg,borderBottomLeftRadius:Yg,borderBottomRightRadius:Yg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return L8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Tz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Tz.length,kL=e=>typeof e=="string"?parseFloat(e):e,EL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Lv(e,t,r))}function TL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){TL(e.x,t.x),TL(e.y,t.y)}function LL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=LL(e.min,t,n,s,i),e.max=LL(e.max,t,n,s,i)}function AL(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function ML(e,t,n,r){AL(e.x,t,ide,n?.x,r?.x),AL(e.y,t,ode,n?.y,r?.y)}function IL(e){return e.translate===0&&e.scale===1}function Az(e){return IL(e.x)&&IL(e.y)}function Mz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function RL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return _8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){A8(this.members,t),t.scheduleRender()}remove(t){if(M8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function OL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){A8(this.children,t),this.isDirty=!0}remove(t){M8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const NL=["","X","Y","Z"],DL=1e3;let cde=0;function Iz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=dz(v,250),Fm.hasAnimatedSinceResize&&(Fm.hasAnimatedSinceResize=!1,this.nodes.forEach(BL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Mz(this.targetLayout,w)||S,V=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...T8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&BL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;FL(v.x,a.x,M),FL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Um(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,S,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Fm.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,DL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,DL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Rz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Vm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(zL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(S);S.min=o[v].min,S.max=S.min+w}):Rz(s,i.layoutBox,o)&&cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);S.max=S.min+w});const u=Gm();Vm(u,o,i.layoutBox);const h=Gm();l?Vm(h,e.applyTransform(a,!0),i.measuredBox):Vm(h,o,i.layoutBox);const g=!Az(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:S,layout:w}=v;if(S&&w){const E=Zr();Um(E,i.layoutBox,S.layoutBox);const P=Zr();Um(P,o,w.layoutBox),Mz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function zL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function BL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function FL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $L(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){$L(e.x,t.x,n.x,r),$L(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function HL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){HL(e.x),HL(e.y)}function Rz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(RL(t),RL(n),.2)}const _de=Iz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ew={current:void 0},kde=Iz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ew.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),ew.current=e}return ew.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Oz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Oz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(Tde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const tw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=gS(Ade),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Lde,{isPresent:n,children:e})),x(h1.Provider,{value:u,children:e})};function Ade(){return new Map}const $p=e=>e.key||"";function Mde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",az(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pde();const l=C.exports.useContext(l8).forceRender;l&&(s=l);const u=Oz(),h=Ide(e);let g=h;const m=new Set,v=C.exports.useRef(g),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(V5(()=>{w.current=!1,Mde(h,S),v.current=g}),v8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(tw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),O=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(R,0,x(tw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(tw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),oz!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function MC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Rde(){return!1}var Ode=e=>{const{condition:t,message:n}=e;t&&Rde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},qg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function IC(e){switch(e?.direction??"right"){case"right":return qg.slideRight;case"left":return qg.slideLeft;case"bottom":return qg.slideDown;case"top":return qg.slideUp;default:return qg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Nde=e=>e!=null&&parseInt(e.toString(),10)>0,VL={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Dde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Nde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(VL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(VL.enter,i)})},Dz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ode({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(Fl.div,{ref:t,...g,className:i2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Dde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Dz.displayName="Collapse";var zde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Xf.exit,n),transitionEnd:t?.exit})},zz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-fade",o),custom:m,...zz,animate:h,...u})})});Bde.displayName="Fade";var Fde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Xf.enter,n),transitionEnd:e?.enter})},Bz={initial:"exit",animate:"enter",exit:"exit",variants:Fde},$de=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:S,children:m&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",s),...Bz,animate:v,custom:S,...g})})});$de.displayName="ScaleFade";var UL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=IC({direction:e});return{...i,transition:t?.exit??Ps.exit(UL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=IC({direction:e});return{...i,transition:n?.enter??Ps.enter(UL.enter,r),transitionEnd:t?.enter}}},Fz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=IC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(Fl.div,{...m,ref:n,initial:"exit",className:i2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Hde,style:S,...g})})});Fz.displayName="Slide";var Wde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},RC={initial:"initial",animate:"enter",exit:"exit",variants:Wde},Vde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",a),custom:w,...RC,animate:S,...m})})});Vde.displayName="SlideFade";var o2=(...e)=>e.filter(Boolean).join(" ");function Ude(){return!1}var wS=e=>{const{condition:t,message:n}=e;t&&Ude()&&console.warn(n)};function nw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Gde,CS]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[jde,R8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Yde,yTe,qde,Kde]=sD(),Hf=Ee(function(t,n){const{getButtonProps:r}=R8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...CS().button};return ae.createElement(be.button,{...i,className:o2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Xde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jde(e),efe(e);const s=qde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=dS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zde,O8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=O8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;tfe(e);const{register:m,index:v,descendants:S}=Kde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);nfe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:nw(V.onClick,T),onFocus:nw(V.onFocus,R),onKeyDown:nw(V.onKeyDown,M)}},[h,t,w,T,R,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:O,getPanelProps:N,htmlProps:i}}function Jde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function efe(e){wS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function tfe(e){wS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function nfe(e){wS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=R8(),{reduceMotion:r}=O8(),i=o2("chakra-accordion__icon",e.className),o=CS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ya,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qde(t),l={...CS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:o2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=O8(),{getPanelProps:s,isOpen:l}=R8(),u=s(o,n),h=o2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(Dz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:o2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),a2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});a2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function GL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,N8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),$z={info:{icon:afe,colorScheme:"blue"},warning:{icon:GL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:GL,colorScheme:"red"},loading:{icon:a2,colorScheme:"blue"}};function cfe(e){return $z[e].colorScheme}function dfe(e){return $z[e].icon}var Hz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Hz.displayName="Alert";var Wz=Ee(function(t,n){const i={display:"inline",...N8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Wz.displayName="AlertDescription";function Vz(e){const{status:t}=lfe(),n=dfe(t),r=N8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Vz.displayName="AlertIcon";var Uz=Ee(function(t,n){const r=N8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Uz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},g.current=S},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:ffe(S,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),jL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function OC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}OC.displayName="ButtonIcon";function NC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(a2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}NC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":jL(a),"data-loading":jL(o),__css:k,className:TS("chakra-button",w),...P},o&&S==="start"&&x(NC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(YL,{...R})):x(YL,{...R}),o&&S==="end"&&x(NC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function YL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(OC,{marginEnd:i,children:t}),r,n&&x(OC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,rw=e=>e?!0:void 0;function qL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,Gz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ri("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=Gz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function D8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=z8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":rw(n),"aria-required":rw(i),"aria-readonly":rw(r)}}function z8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:qL(t?.onFocus,h),onBlur:qL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ri("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(jz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var jz=Ee(function(t,n){const r=y1(),i=Gz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});jz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var B8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:B8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:B8});Pfe.displayName="VisuallyHiddenInput";var KL=!1,LS=null,X0=!1,DC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function F8(e,t){DC.forEach(n=>n(e,t))}function XL(e){X0=!0,Lfe(e)&&(LS="keyboard",F8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,F8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",F8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function ZL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||KL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",XL,!0),document.addEventListener("keyup",XL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),KL=!0}function Rfe(e){Ife(),e(ZL());const t=()=>e(ZL());return DC.add(t),()=>{DC.delete(t)}}var[STe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Yz(e={}){const t=z8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:S?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,S,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,S,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:B8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,QL),onTouchStart:La(Pe.onTouchStart,QL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ut,htmlProps:O}}function QL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),qz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ri("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=Yz({...P,isDisabled:S,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});qz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function $8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function zC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Kz(e,t,n){return(n-t)*e+t}function BC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=zC(n);return $8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":iw(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Xz(Ac(v),o),w=n??S,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),$8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=iw(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=iw($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||Ox(sS,{styles:Zz}),Xfe=()=>x(sS,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Zz} + `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Qz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Qz()&&e.test(navigator.vendor),ehe=e=>Qz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function JL(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Iv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=JL(n),a=JL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function H8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var W8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=yn(i),s=D8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});W8.displayName="Input";W8.id="Input";var[she,Jz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,S;const w=H8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),V8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=Jz();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});V8.displayName="InputAddon";var eB=Ee(function(t,n){return x(V8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});eB.displayName="InputLeftAddon";eB.id="InputLeftAddon";var tB=Ee(function(t,n){return x(V8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});tB.displayName="InputRightAddon";tB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=Jz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var nB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});nB.id="InputLeftElement";nB.displayName="InputLeftElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});rB.id="InputRightElement";rB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var iB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});iB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(iB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var oB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});oB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...S}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var aB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...S})});aB.displayName="Grid";function eA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=H8({gridArea:r,gridColumn:eA(i),gridRow:eA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,sB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),U8=Ee(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});U8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(U8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(U8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=sB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=sB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(aB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var lB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});lB.displayName="Spacer";var FC="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[FC]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var uB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});uB.displayName="StackItem";var G8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(uB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[FC]:S[FC]},...m},k)});G8.displayName="Stack";var cB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"row",ref:t}));cB.displayName="HStack";var dB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"column",ref:t}));dB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=H8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function tA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>tA(q6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>tA(q6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(fB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},S))});Rhe.displayName="Wrap";var fB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});fB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},hB=Ohe,Tp=()=>{},Nhe={document:hB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:hB},pB=typeof window<"u"?{window,document}:zhe,gB=C.exports.createContext(pB);gB.displayName="EnvironmentContext";function mB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:pB},[r,n]);return ee(gB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}mB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function ow(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&ow(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...S,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function vB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function yB(e){if(!vB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=SB(e))==null?void 0:t.defaultView)??window}function SB(e){return vB(e)?e.ownerDocument:document}function Whe(e){return SB(e).activeElement}var bB=e=>e.hasAttribute("tabindex"),Vhe=e=>bB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function xB(e){return e.parentElement&&xB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function wB(e){if(!yB(e)||xB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:bB(e)}function jhe(e){return e?yB(e)&&wB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function CB(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>wB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=CB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",j8="auto",s2=[Ro,Ua,Ga,Oo],Z0="start",Rv="end",tpe="clippingParents",_B="viewport",Kg="popper",npe="reference",nA=s2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Rv])},[]),kB=[].concat(s2,[j8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Rv])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Y8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function $C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function EB(){return!/^((?!chrome|android).)*safari/i.test($C())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!EB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function q8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function PB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Y8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(Y8(e)?e.host:null)||xd(e)}function rA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test($C()),n=/Trident/i.test($C());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(Y8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function l2(e){for(var t=Ya(e),n=rA(e);n&&mpe(n)&&Eu(n).position==="static";)n=rA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function K8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jm(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=jm(e,t,n);return r>n?n:r}function TB(){return{top:0,right:0,bottom:0,left:0}}function LB(e){return Object.assign({},TB(),e)}function AB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,LB(typeof t!="number"?t:AB(t,s2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=K8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=q8(o),v=l==="y"?Ro:Oo,S=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=l2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[S],O=k/2-m[h]/2+T,N=jm(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!PB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function iA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=l2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Rv){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Rv){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,iA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,iA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function oA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function X8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Z8(e){return J0(xd(e)).left+X8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=EB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Z8(e),y:l}}function Ipe(e){var t,n=xd(e),r=X8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Z8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Q8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function MB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&Q8(e)?e:MB(IS(e))}function Ym(e,t){var n;t===void 0&&(t=[]);var r=MB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],Q8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ym(IS(a)))}function HC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function aA(e,t,n){return t===_B?HC(Mpe(e,n)):sh(t)?Rpe(t,n):HC(Ipe(xd(e)))}function Ope(e){var t=Ym(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?l2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&PB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=aA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},aA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function IB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?K8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Rv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ov(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?_B:u,g=n.elementContext,m=g===void 0?Kg:g,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=LB(typeof E!="number"?E:AB(E,s2)),k=m===Kg?npe:Kg,T=e.rects.popper,M=e.elements[S?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=IB({reference:O,element:T,strategy:"absolute",placement:i}),z=HC(Object.assign({},T,N)),V=m===Kg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Kg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?kB:l,h=e1(r),g=h?s?nA:nA.filter(function(S){return e1(S)===h}):s2,m=g.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=g);var v=m.reduce(function(S,w){return S[w]=Ov(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function zpe(e){if(Tl(e)===j8)return[];var t=j3(e);return[oA(e),t,oA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!S?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===j8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:S,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Ov(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=S?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function sA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function lA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ov(t,{elementContext:"reference"}),s=Ov(t,{altBoundary:!0}),l=sA(a,r),u=sA(s,i,o),h=lA(l),g=lA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=kB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=IB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Ov(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=K8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?q8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:TB(),_e=Me[Q],Je=Me[ne],Xe=jm(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&l2(t.elements.arrow),ut=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ut,et=K+_t-mt,Lt=jm(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):jm(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?X8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||Q8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Z8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var uA={placement:"bottom",modifiers:[],strategy:"absolute"};function cA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],dA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...dA,...e}}:t={enabled:e,options:dA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{fA(e)},effect:({state:e})=>()=>{fA(e)}},fA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function RB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(S.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function OB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function NB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function DB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}DB.displayName="PortalManager";var[zB,_0e]=_n({strict:!1,name:"PortalContext"}),J8="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=J8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(zB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=J8),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(zB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=J8;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},aw=0,BB=function(e){return e&&(e.host||BB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=BB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),aw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),aw--,aw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},FB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function e_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function $B(){}function HB(){}HB.resetWarningCache=$B;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:HB,resetWarningCache:$B};return n.PropTypes=n,n};Nn.exports=N0e();var WC="data-focus-lock",WB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function VB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var sw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function UB(e){return e}function GB(e,t){t===void 0&&(t=UB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function t_(e,t){return t===void 0&&(t=UB),GB(e,t)}function jB(e){e===void 0&&(e={});var t=GB(null);return t.options=yl({async:!0,ssr:!1},e),t}var YB=function(e){var t=e.sideCar,n=Nz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};YB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),YB}var qB=t_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),KB=t_(),W0e=t_(),V0e=jB({async:!0}),U0e=[],n_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&qB.useMedium(Je)},[]),me=KB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[WB]=g&&"disabled",r[WC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=VB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:sw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw})]})});n_.propTypes={};n_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const XB=n_;function VC(e,t){return VC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VC(e,t)}function r_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,VC(e,t)}function ZB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){r_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return ZB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],o_=e1e.join(","),t1e="".concat(o_,", [data-focus-guard]"),aF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:o_)?[i]:[],aF(i))},[])},a_=function(e,t){return e.reduce(function(n,r){return n.concat(aF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(o_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return a_([n])}).reduce(function(n,r){return n.concat(r)},[])},s_=function(e,t){return $l(e).filter(function(n){return eF(t,n)}).filter(function(n){return X0e(n)})},pA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return tF(t,n)})},GC=function(e,t,n){return oF(s_(a_(e,n),t),!0,n)},gA=function(e,t){return oF(s_(a_(e),t),!1)},r1e=function(e,t){return s_(n1e(e),t)},Nv=function(e,t){return e.shadowRoot?Nv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Nv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},sF=function(e){return e.parentNode?sF(e.parentNode):e},l_=function(e){var t=UC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(WC);return n.push.apply(n,i?i1e($l(sF(r).querySelectorAll("[".concat(WC,'="').concat(i,'"]:not([').concat(WB,'="disabled"])')))):[r]),n},[])},lF=function(e){return e.activeElement?e.activeElement.shadowRoot?lF(e.activeElement.shadowRoot):e.activeElement:void 0},u_=function(){return document.activeElement?document.activeElement.shadowRoot?lF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},uF=function(e){var t=document&&u_();return!t||t.dataset&&t.dataset.focusGuard?!1:l_(e).some(function(n){return Nv(n,t)||a1e(n)})},s1e=function(){var e=document&&u_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Nv(t,e)}):!1},l1e=function(e,t){return t.filter(iF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},c_=function(e,t){return iF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(c_(n,e))}),e.filter(function(n){return t.has(n)})},mA=function(e){return e[0]&&e.length>1?c_(e[0],e):e[0]},vA=function(e,t){return e.length>1?e.indexOf(c_(e[t],e)):t},cF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=i_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),S=u1e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=vA(e,0),k=vA(e,i-1);if(l===-1||h===-1)return cF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=nF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=pA(r.filter(d1e(n)));return i&&i.length?mA(i):mA(pA(t))},jC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&jC(e.parentNode.host||e.parentNode,t),t},lw=function(e,t){for(var n=jC(e),r=jC(t),i=0;i=0)return o}return!1},dF=function(e,t,n){var r=UC(e),i=UC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=lw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=lw(o,l);u&&(!a||Nv(u,a)?a=u:a=lw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&u_(),r=l_(e).filter(i4),i=dF(n||e,e,r),o=new Map,a=gA(r,o),s=GC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=gA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===cF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=l_(e).filter(i4),n=dF(e,e,t),r=new Map,i=GC([n],r,!0),o=GC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:i_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},uw=0,cw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!cw&&r){if(uw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),cw=!0,setTimeout(function(){cw=!1},1);return}uw++,v1e(r.node,n.focusOptions),uw--}};const fF=y1e;function hF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,Dv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function yA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(Dv):Dv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(uF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=fF(g,r0,{focusOptions:l}),A0={})),Dv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),yA(S,v.length,1,v),yA(S,-1,-1,v))}}}return t},pF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},d_=function(){return hF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},gF=function(){Dv="just",setTimeout(function(){Dv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",pF),document.addEventListener("focusout",d_),window.addEventListener("blur",gF)},I1e=function(){document.removeEventListener("focusin",pF),document.removeEventListener("focusout",d_),window.removeEventListener("blur",gF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),hF(o4)):(I1e(),r0=null)}qB.assignSyncMedium(L1e);KB.assignMedium(d_);W0e.assignMedium(function(e){return e({moveFocusInside:fF,focusInside:uF})});const N1e=G0e(R1e,O1e)(A1e);var mF=C.exports.forwardRef(function(t,n){return x(XB,{sideCar:N1e,ref:n,...t})}),vF=XB.propTypes||{};vF.sideCar;e_(vF,["sideCar"]);mF.propTypes={};const D1e=mF;var yF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&CB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};yF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",SF=jB(),dw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:dw,onWheelCapture:dw,onTouchMoveCapture:dw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Nz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=VB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:SF,removeScrollBar:u,shards:g,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},fw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[fw(n),fw(r),fw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=bF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(z1e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Y3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(q3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Y3," .").concat(Y3,` { + right: 0 `).concat(r,`; + } + + .`).concat(q3," .").concat(q3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(B1e,": ").concat(s,`px; + } +`)},X1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Y1e(i)},[i]);return x(q1e,{styles:K1e(o,!t,i,n?"":"!important")})},YC=!1;if(typeof window<"u")try{var Yy=Object.defineProperty({},"passive",{get:function(){return YC=!0,!0}});window.addEventListener("test",Yy,Yy),window.removeEventListener("test",Yy,Yy)}catch{YC=!1}var Mp=YC?{passive:!1}:!1,Z1e=function(e){return e.tagName==="TEXTAREA"},xF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z1e(e)&&n[t]==="visible")},Q1e=function(e){return xF(e,"overflowY")},J1e=function(e){return xF(e,"overflowX")},SA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=wF(e,n);if(r){var i=CF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ege=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wF=function(e,t){return e==="v"?Q1e(t):J1e(t)},CF=function(e,t){return e==="v"?ege(t):tge(t)},nge=function(e,t){return e==="h"&&t==="rtl"?-1:1},rge=function(e,t,n,r,i){var o=nge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=CF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&wF(e,s)&&(g+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bA=function(e){return[e.deltaX,e.deltaY]},xA=function(e){return e&&"current"in e?e.current:e},ige=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oge=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},age=0,Ip=[];function sge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(age++)[0],o=C.exports.useState(function(){return bF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=MC([e.lockRef.current],(e.shards||[]).map(xA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=qy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,O=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=SA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=SA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?bA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(xA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,bA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,S=e.inert;return ee(Ln,{children:[S?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(SF,sge);var _F=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});_F.classNames=RS.classNames;const kF=_F;var Sh=(...e)=>e.filter(Boolean).join(" ");function fm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},qC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&qC.add(e),()=>{qC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:fm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!qC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:fm(z.onClick,O),onKeyDown:fm(z.onKeyDown,E),onMouseDown:fm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return FB(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:S,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var zv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});zv.displayName="ModalBody";var f_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:fm(n,l=>{l.stopPropagation(),o()}),...i})});f_.displayName="ModalCloseButton";function EF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=k8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(yF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(kF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...RC,custom:{offsetY:16,reverse:!0}},slideInRight:{...RC,custom:{offsetX:16,reverse:!0}},scale:{...Bz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],PF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});PF.displayName="ModalTransition";var Bv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(EF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(PF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Bv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:zz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function TF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var LF=Ee((e,t)=>x(Bv,{ref:t,role:"alertdialog",...e})),[bTe,bge]=_n(),xge=be(Fz),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(EF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var AF=(...e)=>e.filter(Boolean).join(" "),hw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function wA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,CA=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},CA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},CA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ut=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ut,mt);wA(Je,"disabled",Pe.stop,Pe.isSpinning),wA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ut(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ut,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ut(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":hw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,h_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),p_=Ee(function(t,n){const r=Ri("NumberInput",t),i=yn(t),o=z8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:AF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});p_.displayName="NumberInput";var MF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});MF.displayName="NumberInputStepper";var g_=Ee(function(t,n){const{getInputProps:r}=h_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:AF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});g_.displayName="NumberInputField";var IF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),m_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=h_(),o=i(t,n);return x(IF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});m_.displayName="NumberDecrementStepper";var v_=Ee(function(t,n){const{getIncrementButtonProps:r}=h_(),i=r(t,n),o=DS();return x(IF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});v_.displayName="NumberIncrementStepper";var u2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,c2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=OB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=RB({...w,enabled:E||!!S}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=NB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=_A(St),wt=pw(O.current,Yt),Gt=pw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ut=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=_A(St),wt=!pw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ut,getHeaderProps:mt,getBodyProps:Pe}}function pw(e,t){return e===t||e?.contains(t)}function _A(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function y_(e){const t=Ri("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}y_.displayName="Popover";function S_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=c2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:u2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}S_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=c2();return ae.createElement(be.div,{...r(t,n),className:u2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=c2();return x(AS,{size:"sm",onClick:r,className:u2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),RF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});RF.displayName="PopoverTransition";var b_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=c2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(RF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:u2("chakra-popover__content",t.className),__css:h}))});b_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=c2();return ae.createElement(be.header,{...r(t,n),className:u2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function x_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}x_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function OF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var NF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};NF.displayName="Shape";var KC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});KC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=OF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ee(NF,{size:n,isIndeterminate:v,children:[x(KC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(KC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=OF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),DF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:S,...w}=yn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});DF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var zF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});zF.displayName="SelectField";var BF=Ee((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...S}=yn(e),[w,E]=ime(S,kQ),P=D8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(zF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(FF,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});BF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),FF=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};FF.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function $F(e){return!!e.touches}function ume(e){return $F(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function HF(e,t="page"){return $F(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:HF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function WF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:HF(e)},{timestamp:i}=tT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,gw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=gw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=tT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=gw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function kA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gw(e,t){return{point:e.point,delta:kA(e.point,t[t.length-1]),offset:kA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function mw(e,t){return Math.abs(e-t)}function EA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return mw(e,t);if(EA(e)&&EA(t)){const n=mw(e.x,t.x),r=mw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function VF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=WF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function UF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=UF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function hm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function GF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...hm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...hm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...hm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),S={...l,...hm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function jF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=jF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*S,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=UF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ut=C.exports.useId(),Pe=Pme(u??ut),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Kz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=S||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(BC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>GF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};VF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...hm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,w_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),YF=Ee(function(t,n){const r=Ri("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});YF.defaultProps={orientation:"horizontal"};YF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=w_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=jF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=S||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=WF({min:t,max:n,step:S,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ut=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Kz(Qt,un.min,un.max);return un.step&&(er=parseFloat(BC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(BC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return GF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ut(ze);ot!=null&&ot!==Se.current.value&&j(ot)}VF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),C_=Ee((e,t)=>{const n=Ri("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});C_.defaultProps={orientation:"horizontal"};C_.displayName="Slider";var qF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});qF.displayName="SliderThumb";var KF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});KF.displayName="SliderTrack";var XF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});XF.displayName="SliderFilledTrack";var XC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});XC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),PA=e=>e?"":void 0,__=Ee(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Yz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":PA(s.isChecked),"data-hover":PA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:S},o))});__.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function ZC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,ZF,Vme,Ume]=sD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const S=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[jme,d2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=d2(),i=ZF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ZC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=d2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:ZC(e.onClick,m)}),w="button";return{...S,id:QF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":JF(a,u),onFocus:t?void 0:ZC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=d2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:JF(n,s),tabId:QF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=d2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=NB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=d2(),t=ZF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function QF(e,t){return`${e}--tab-${t}`}function JF(e,t){return`${e}--tabpanel-${t}`}var[eve,f2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),e$=Ee(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});e$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=f2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...f2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var t$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=f2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});t$.displayName="TabPanel";var n$=Ee(function(t,n){const r=Zme(t),i=f2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});n$.displayName="TabPanels";var r$=Ee(function(t,n){const r=f2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});r$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],i$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=D8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});i$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function QC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function TA(e,t){const n=o$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function o$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=TA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:a$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=o$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(TA(Sl.getState(),i).position)}}var LA=0;function pve(e,t={}){LA+=1;const n=t.id??LA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Hz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Vz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Uz,{id:u?.title,children:i}),s&&x(Wz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function a$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=a$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...QC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...QC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function h2(e){const{theme:t}=iD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},s$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},QC(n,{id:t,onClose:E})))});s$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=s$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Xg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},JC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=OB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=RB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=JC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ut=JC(K);ce.current=ut.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ut={},mt=null)=>({...ut,ref:Wn(K,mt,$),onPointerEnter:Xg(ut.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Xg(ut.onClick,_e),onPointerDown:Xg(ut.onPointerDown,Je),onFocus:Xg(ut.onFocus,Se),onBlur:Xg(ut.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ut={},mt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,S,w]),pt=C.exports.useCallback((ut={},mt=null)=>{const Pe={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ut,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var vw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(vw,t),()=>n.removeEventListener(vw,t)},[t,e]),()=>{const n=a4(e),r=JC(e);n.dispatchEvent(new r.CustomEvent(vw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(mB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(sN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(DB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:k_(e)?2:E_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function l$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function u$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function k_(e){return Rve&&e instanceof Map}function E_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function P_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=d$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return T_(r,!0)},!0)),e}function Tve(){xs(2)}function L_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=r7[e];return t||xs(18,e),t}function Lve(e,t){r7[e]||(r7[e]=t)}function e7(){return Fv}function yw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){t7(e),e.p.forEach(Ave),e.p=null}function t7(e){e===Fv&&(Fv=e.l)}function AA(e){return Fv={p:[],l:Fv,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function Sw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==c$?e:void 0}function l4(e,t,n){if(L_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return MA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=P_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return MA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function MA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(l$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!L_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&T_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function IA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function xw(e){e.o||(e.o=P_(e.t))}function n7(e,t,n){var r=k_(t)?Ll("MapSet").N(t,n):E_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:e7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=$v;a&&(l=[s],u=pm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:e7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=RA(n,o),i.I=!1}else r=RA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||l$(r,a,t(s))}),o===3?new Set(r):r}(e)}function RA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return P_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return $v.get(l,o)},set:function(l){var u=this[rr];$v.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!u$(m,g))return!0}}var S=!!a[rr];return l.length!==O0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,f$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function zA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(M_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function h$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k2e:_2e;y$.useSyncExternalStore=r1.useSyncExternalStore!==void 0?r1.useSyncExternalStore:E2e;(function(e){e.exports=y$})(v$);var S$={exports:{}},b$={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var HS=C.exports,P2e=v$.exports;function T2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var L2e=typeof Object.is=="function"?Object.is:T2e,A2e=P2e.useSyncExternalStore,M2e=HS.useRef,I2e=HS.useEffect,R2e=HS.useMemo,O2e=HS.useDebugValue;b$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=M2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=R2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return g=S}return g=v}if(S=g,L2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=A2e(e,o[0],o[1]);return I2e(function(){a.hasValue=!0,a.value=s},[s]),O2e(s),s};(function(e){e.exports=b$})(S$);function N2e(e){e()}let x$=N2e;const D2e=e=>x$=e,z2e=()=>x$,fd=C.exports.createContext(null);function w$(){return C.exports.useContext(fd)}const B2e=()=>{throw new Error("uSES not initialized!")};let C$=B2e;const F2e=e=>{C$=e},$2e=(e,t)=>e===t;function H2e(e=fd){const t=e===fd?w$:()=>C.exports.useContext(e);return function(r,i=$2e){const{store:o,subscription:a,getServerState:s}=t(),l=C$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const W2e=H2e();var V2e={exports:{}},In={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var R_=Symbol.for("react.element"),O_=Symbol.for("react.portal"),WS=Symbol.for("react.fragment"),VS=Symbol.for("react.strict_mode"),US=Symbol.for("react.profiler"),GS=Symbol.for("react.provider"),jS=Symbol.for("react.context"),U2e=Symbol.for("react.server_context"),YS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.suspense_list"),XS=Symbol.for("react.memo"),ZS=Symbol.for("react.lazy"),G2e=Symbol.for("react.offscreen"),_$;_$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case R_:switch(e=e.type,e){case WS:case US:case VS:case qS:case KS:return e;default:switch(e=e&&e.$$typeof,e){case U2e:case jS:case YS:case ZS:case XS:case GS:return e;default:return t}}case O_:return t}}}In.ContextConsumer=jS;In.ContextProvider=GS;In.Element=R_;In.ForwardRef=YS;In.Fragment=WS;In.Lazy=ZS;In.Memo=XS;In.Portal=O_;In.Profiler=US;In.StrictMode=VS;In.Suspense=qS;In.SuspenseList=KS;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===jS};In.isContextProvider=function(e){return qa(e)===GS};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===R_};In.isForwardRef=function(e){return qa(e)===YS};In.isFragment=function(e){return qa(e)===WS};In.isLazy=function(e){return qa(e)===ZS};In.isMemo=function(e){return qa(e)===XS};In.isPortal=function(e){return qa(e)===O_};In.isProfiler=function(e){return qa(e)===US};In.isStrictMode=function(e){return qa(e)===VS};In.isSuspense=function(e){return qa(e)===qS};In.isSuspenseList=function(e){return qa(e)===KS};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===WS||e===US||e===VS||e===qS||e===KS||e===G2e||typeof e=="object"&&e!==null&&(e.$$typeof===ZS||e.$$typeof===XS||e.$$typeof===GS||e.$$typeof===jS||e.$$typeof===YS||e.$$typeof===_$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(V2e);function j2e(){const e=z2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const GA={notify(){},get:()=>[]};function Y2e(e,t){let n,r=GA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=j2e())}function u(){n&&(n(),n=void 0,r.clear(),r=GA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const q2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K2e=q2e?C.exports.useLayoutEffect:C.exports.useEffect;function X2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return K2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||fd).Provider,{value:i,children:n})}function k$(e=fd){const t=e===fd?w$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Z2e=k$();function Q2e(e=fd){const t=e===fd?Z2e:k$(e);return function(){return t().dispatch}}const J2e=Q2e();F2e(S$.exports.useSyncExternalStoreWithSelector);D2e(Bl.exports.unstable_batchedUpdates);var N_="persist:",E$="persist/FLUSH",D_="persist/REHYDRATE",P$="persist/PAUSE",T$="persist/PERSIST",L$="persist/PURGE",A$="persist/REGISTER",eye=-1;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tye(e){for(var t=1;t{Object.keys(O).forEach(function(N){!T(N)||h[N]!==O[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){O[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=O},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var O=m.shift(),N=r.reduce(function(z,V){return V.in(z,O,h)},h[O]);if(N!==void 0)try{g[O]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[O];m.length===0&&k()}function k(){Object.keys(g).forEach(function(O){h[O]===void 0&&delete g[O]}),S=s.setItem(a,l(g)).catch(M)}function T(O){return!(n&&n.indexOf(O)===-1&&O!=="_persist"||t&&t.indexOf(O)!==-1)}function M(O){u&&u(O)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function oye(e){return JSON.stringify(e)}function aye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=sye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function sye(e){return JSON.parse(e)}function lye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key);return t.removeItem(n,uye)}function uye(e){}function YA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function fye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hye=5e3;function pye(e,t){var n=e.version!==void 0?e.version:eye;e.debug;var r=e.stateReconciler===void 0?rye:e.stateReconciler,i=e.getStoredState||aye,o=e.timeout!==void 0?e.timeout:hye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,S=dye(m,["_persist"]),w=S;if(g.type===T$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=iye(e)),v)return cu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),cu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===L$)return s=!0,g.result(lye(e)),cu({},t(w,g),{_persist:v});if(g.type===E$)return g.result(a&&a.flush()),cu({},t(w,g),{_persist:v});if(g.type===P$)l=!0;else if(g.type===D_){if(s)return cu({},w,{_persist:cu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=cu({},M,{_persist:cu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,g);var O=t(w,g);return O===w?h:u(cu({},O,{_persist:v}))}}function qA(e){return vye(e)||mye(e)||gye()}function gye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function mye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function vye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:M$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case A$:return o7({},t,{registry:[].concat(qA(t.registry),[n.key])});case D_:var r=t.registry.indexOf(n.key),i=qA(t.registry);return i.splice(r,1),o7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function bye(e,t,n){var r=n||!1,i=M_(Sye,M$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:A$,key:u})},a=function(u,h,g){var m={type:D_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=o7({},i,{purge:function(){var u=[];return e.dispatch({type:L$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:E$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:P$})},persist:function(){e.dispatch({type:T$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var z_={},B_={};B_.__esModule=!0;B_.default=Cye;function Q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Q3=function(n){return typeof n}:Q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Q3(e)}function Ew(){}var xye={getItem:Ew,setItem:Ew,removeItem:Ew};function wye(e){if((typeof self>"u"?"undefined":Q3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Cye(e){var t="".concat(e,"Storage");return wye(t)?self[t]:xye}z_.__esModule=!0;z_.default=Eye;var _ye=kye(B_);function kye(e){return e&&e.__esModule?e:{default:e}}function Eye(e){var t=(0,_ye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var I$=void 0,Pye=Tye(z_);function Tye(e){return e&&e.__esModule?e:{default:e}}var Lye=(0,Pye.default)("local");I$=Lye;var R$={},O$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(F_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=F_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const S=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=S;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},R=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=R;const O=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=O;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Re=>Re===ne),K=W.filter(Re=>(ne+".").indexOf(Re+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. + + ${JSON.stringify(X)} + + ${G}`);if(ce.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(ce)} + + ${G}`)};e.singleTransformValidator=z;const V=function(W){if(!(0,e.isArray)(W))return;const Q=W?.map(ne=>ne.deepPersistKey).filter(ne=>ne)||[];if(Q.length){const ne=Q.filter((J,K)=>Q.indexOf(J)!==K);if(ne.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ne)}`)}};e.transformsValidator=V;const $=function({whitelist:W,blacklist:Q}){if(W&&W.length&&Q&&Q.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(W){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(W);(0,e.throwError)({duplicates:ne,subsets:J},"whitelist")}if(Q){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(Q);(0,e.throwError)({duplicates:ne,subsets:J},"blacklist")}};e.configValidator=$;const j=function({duplicates:W,subsets:Q},ne){if(W.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ne}. + + ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(Q)}`)};e.throwError=j;const le=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=le})(O$);(function(e){var t=Ss&&Ss.__rest||function(g,m){var v={};for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&m.indexOf(S)<0&&(v[S]=g[S]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(g,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),O=T.map(le=>Object.keys(le)[0]),N=M.map(le=>Object.keys(le)[0]),z=R.filter(le=>O.indexOf(le)===-1&&N.indexOf(le)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(le=>(0,e.createBlacklist)(le)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(R$);const J3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Aye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return $_(r)?r:!1},$_=e=>Boolean(typeof e=="string"?Aye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),p4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Mye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ut="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,T1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,L1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,A1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,M1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,I1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,R1=/[()=,{}\[\]\/\s]/,O1=/\\(\\)?/g,N1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,D1=/^[-+]0x[0-9a-f]+$/i,z1=/^0b[01]+$/i,B1=/^\[object .+?Constructor\]$/,F1=/^0o[0-7]+$/i,$1=/^(?:0|[1-9]\d*)$/,H1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,W1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",V1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",V1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ut]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ut]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},U1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,G1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function j1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function q1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(U1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=ug,Uo.prototype.has=cg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ut||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Bk(c),!Z)return ue?Tg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),hE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):dE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function pg(c,p,b){if(typeof c!="function")throw new Si(a);return Rg(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Oi,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:gE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(rg()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Bb(Hk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var _g=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function kg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Eg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Ag(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(M1,`{ +/* [wrapped with `+p+`] */ +`)}function PU(c){return Ot(c)||mf(c)||!!(tg&&c&&c[tg])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&$1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Jk(c,b)});function eE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return eE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=pE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=Yk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[Fb],thisArg:n}),new ji(p,this.__chain__)}return this.thru(Fb)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:gg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Lg(qk),ZG=Lg(Kk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function tE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function nE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Ab:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function rE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function iE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Hb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Hb));A|=R}return fe(c,A,p,b,D)}),oE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(oE));A|=R}return fe(p,A,c,b,D)});function aE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=aE.placeholder,A}function sE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Rg(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,PE=p-us;return Le?Kr(PE,F-au):PE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Rg(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&_g(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return _g(Z),Z=Rg(jt,p),st(ue)}return Z===n&&(Z=Rg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return pg(c,1,p)}),yj=kt(function(c,p,b){return pg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return iE(2,c)}var xj=Rb(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!eg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):vg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||Jb,Bj=co?Er(co):yg;function Fj(c){return xr(c)&&c.nodeType===1&&!Og(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Ig(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Vb(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Og(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==mt||p==Je||p==Yt}function cE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var dE=Ui?Er(Ui):Ib;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return fE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function fE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Og(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Ub=xa?Er(xa):ar;function Xj(c){return cE(c)&&c>=-G&&c<=G}var hE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=G1?Er(G1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function pE(c){if(!c)return[];if(So(c))return sy(c)?Ni(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function gE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=z1.test(c);return b||F1.test(c)?Ye(c.slice(2),b?2:8):D1.test(c)?ce:+c}function mE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Ig(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),vE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return SE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:xg(c,p)});function SE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=rg();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?wE(p):p)});function wE(c){return Yb(xn(c).toLowerCase())}function CE(c){return c=xn(c),c&&c.replace(H1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&A1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Ub(p))&&(p=qi(p),!p&&Kl(c))?as(Ni(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+Yb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?N1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` +`;c.replace(Ve,function(xt,jt,en,Qo,Zi,Jo){return en||(en=Qo),Le+=c.slice(we,Jo).replace(W1,Vs),jt&&(Z=!0,Le+=`' + +__e(`+jt+`) + +'`),Zi&&(ue=!0,Le+=`'; +`+Zi+`; +__p += '`),en&&(Le+=`' + +((__t = (`+en+`)) == null ? '' : __t) + +'`),we=Jo+xt.length,xt}),Le+=`'; +`;var bt=tn.call(p,"variable")&&p.variable;if(!bt)Le=`with (obj) { +`+Le+` +} +`;else if(R1.test(bt))throw new Et(s);Le=(ue?Le.replace(Qt,""):Le).replace(er,"$1").replace(lo,"$1;"),Le="function("+(bt||"obj")+`) { +`+(bt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(ue?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Le+`return __p +}`;var $t=kE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Vb($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,X1(c)+1);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Ub(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&T1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),Yb=xp("toUpperCase");function _E(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):Y1(c):c.match(p)||[]}var kE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Vb(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Hb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,N$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&N$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},D$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?N$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),z$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=z$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),B$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=B$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),H_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=H_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=H_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),F$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),$$=Be((e,t)=>{var n=eb(),r=F$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),H$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=$$(),r=Xye(),i=F$(),o=H$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),W_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=W_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),W$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=W_(),i=W$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=W$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),V$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=H_(),r=y3e(),i=z$(),o=V$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case S:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=V_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),U$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=G$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[S]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=B$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),j$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=V_(),o=U$(),a=M3e(),s=j$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),S=!v&&r(g),w=!v&&!S&&o(g),E=!v&&!S&&!w&&s(g),P=v||S||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=$$(),r=G$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=W_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=H$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=V$(),i=x3e(),o=V3e(),a=q3e(),s=V_(),l=U$(),u=j$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),Y$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Pw(e,t=","){return typeof e=="string"?e.split(t):e}function qm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return q$(e,["input","textarea","select"])}function q$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=D$(Y$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var XA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!q$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){XA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Pw(e,u?.splitKey).forEach(E=>{let P=qm(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){XA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.addHotkey(qm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.removeHotkey(qm(w,u?.combinationKey)))}},[e,l,u,h]),i}D$(Y$());var a7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>a7.add(qm(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=qm(t);for(let r of a7)r.keys?.every(i=>n.keys?.includes(i))&&a7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Wi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Wi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ZA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(ZA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(ZA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(p_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(g_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(v_,{...P,className:"invokeai__number-input-stepper-button"}),x(m_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(BF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],U_=0,G_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),j_=()=>{const e=je(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(__,{className:"invokeai__switch-root",...s})]})})};function K$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Bke(i.target.checked))})}function P5e(){const e=je(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var X$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},QA=ae.createContext&&ae.createContext(X$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(S?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(cB,{w:"100%",gap:2,children:[ee(C_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(XC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(XC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(KF,{className:"invokeai__slider_track",...j,children:x(XF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(qF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(p_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(g_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(MF,{...ne,children:[x(v_,{className:"invokeai__slider-number-stepper"}),x(m_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(Y_,{}),onClick:Se,isDisabled:M,...K})]})]})}function Q$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=je();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(D7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(D7(.5))}})}const N5e=()=>{const e=je(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=je(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},J$=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Dke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=je(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:U_,max:G_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const eH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(eH(U_,G_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=je(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=je(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const q_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),K_=()=>{const e=je(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(z7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(B7(a)),value:n,isInteger:!1})]})};function tH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(zke(i.target.checked))})}function X_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=je();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Ike(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(W8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=je(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!($_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=je();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n($ke(i)),isInteger:!1})}const Z_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=je(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ct(e=>e.options,e=>wb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const Q_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ct([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=je(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Ake(r)),value:t,width:J_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=je();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=je(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const J_="auto";function ek(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},nH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Tw,setIsConnected:JA,setSocketId:xTe,setShouldConfirmOnDelete:rH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:eM,errorSeen:iH,setModelList:tM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:gm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=nH.actions,h4e=nH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function oH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ct(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(y_,{trigger:"hover",children:[x(x_,{children:x(vh,{children:e})}),ee(b_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(S_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const tk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=je();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function nk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function nM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ok=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,fH=e=>e.canvas.layerState.objects.find(g4),hH=ct([e=>e.options,e=>e.system,fH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!($_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),s7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),l7=ti("socketio/requestImages"),rM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),pH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function gH(e){const{iconButton:t=!1,...n}=e,r=je(),{isReady:i}=Ae(hH),o=Ae(_r),a=()=>{r(s7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(s7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function mH(e){const{...t}=e,n=je(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ct(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=je(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(Oke(!t))}})},ak=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(gH,{}),e==="img2img"&&x(fSe,{}),x(mH,{})]})},hSe=ct([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),sk=()=>{const e=je(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(hH),i=C.exports.useRef(null),o=s=>{e(Cb(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(s7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(i$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function vH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function iM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=iM(e.className,t):e.setAttribute("class",iM(e.className&&e.className.baseVal||"",t))}const oM={disabled:!1},SH=ae.createContext(null);var bH=function(t){return t.scrollTop},mm="unmounted",Pf="exited",Tf="entering",Hp="entered",u7="exiting",Ou=function(e){r_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=mm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===mm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=u7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&bH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:mm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||oM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||oM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:u7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=e_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(SH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=SH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=mm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=u7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Lw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},lk=function(e){r_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Zg=.95,aM=30,c7=10,sM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),vm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:vm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},wH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ok(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...vm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Zg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=sM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=vm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Zg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=sM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Zg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Zg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Zg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:CH,addPointToCurrentLine:_H,clearCanvasHistory:kH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:wTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:EH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:PH,resizeCanvas:OSe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:CTe,setBoundingBoxScaleMethod:NSe,setBrushColor:Mw,setBrushSize:Iw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:uk,setInpaintReplace:lM,setIsDrawing:ob,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:_Te,setIsMoveStageKeyHeld:kTe,setIsMovingBoundingBox:uM,setIsMovingStage:m4,setIsTransformingBoundingBox:Rw,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:ETe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:PTe,setShouldShowBrushPreview:TTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:LTe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:cM,setShouldSnapToGrid:dM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:ATe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:MTe,toggleTool:ITe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=wH.actions,QSe=wH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),ck=e=>{const t=je(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Mke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Nke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(xH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(vH,{}):x(yH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(K$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(tH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(J$,{})}};return ee(ck,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(Q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(tk,{accordionInfo:e})]})}const dk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(dk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(rk,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Iv(),a=je(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(rH(!S.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(TF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(LF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(zv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(__,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(y_,{...o,children:[x(x_,{children:t}),ee(b_,{className:`invokeai__popover-content ${r}`,children:[i&&x(S_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ct([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=je(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=h2(),v=()=>{!u||(h&&e(pd(!1)),e(S2(u)),e(ko("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Pke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(Cb(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(uk(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(nM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(nM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:S,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(uH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(j_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(K_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(lH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(d7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Ow,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:fk,selectPrevImage:hk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Qg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=je();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:S,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(z7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(B7(M))}),S&&x(On,{label:"Prompt",labelPosition:"top",value:J3(S),onClick:()=>n(Cb(S))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(S2(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(D7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(z7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(B7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(oB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=je(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(hk())},g=()=>{e(fk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(aH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ct([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(dk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(rk,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=je(),n=h2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],mM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(mM):o.className+=mM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Nw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Nw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Nw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(g-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,S=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=gM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=gM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=pM(M,this.props.grid[0]),z=pM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(S.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(S.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function p2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...S}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Hv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(f7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(f7,An({},r,{ref:t}),n)});Hv.displayName="Slot";const f7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});f7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Hv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=p2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(S,P.collectionRef);return ae.createElement(Hv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(S,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Hv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const h7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let vM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(vM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),yM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=vM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),yM())},[g,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(h7,z),()=>document.removeEventListener(h7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yM(){const e=new CustomEvent(h7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let Dw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:SM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:SM()),Dw++,()=>{Dw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Dw--}},[])}function SM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zw="focusScope.autoFocusOnMount",Bw="focusScope.autoFocusOnUnmount",bM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){wM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(zw,bM);s.addEventListener(zw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(zw,u),setTimeout(()=>{const P=new CustomEvent(Bw,bM);s.addEventListener(Bw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Bw,h),wM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=xM(t,e),r=xM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const wM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=CM(e,t),e.unshift(t)},remove(t){var n;e=CM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function CM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=Jw["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function ab(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function pk(e){return e==="y"?"height":"width"}function _M(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=pk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(ab(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=_M(l,r,s),g=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=ab(a),v=pk(g),S=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,V=p7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=ab(e),i=_1(e),o=pk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function EM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[EM(e),t,EM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function PM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=PM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:TM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=PM(o,i.floating);return{data:{escapedOffsets:a,escaped:TM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=ab(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],S=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=p7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=p7(k,S,T)}const w=s.fn({...t,[g]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);Sz&&(S=z)}return{[g]:v,[m]:S}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function g2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function gk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sb(e){const{overflow:t,overflowX:n,overflowY:r}=g2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=g2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const LM=Math.min,Km=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function lb(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+lb(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||sb(i))&&(a=lb(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(gk(e)?e.host:null)||_d(e)}function AM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(gk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function g7(e){const t=Nu(e);let n=AM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=AM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function MM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||sb(o))&&(a=lb(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=lb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Km(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Km(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return g2(i||n).direction==="rtl"&&(s+=Km(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&sb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],sb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&gk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function IM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(g2(e).position)&&Dl(e)?g7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=IM(t,h,i);return u.top=Km(g.top,u.top),u.right=LM(g.right,u.right),u.bottom=LM(g.bottom,u.bottom),u.left=Km(g.left,u.left),u},IM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:MM,getOffsetParent:g7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,g7(n),r),floating:{...MM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>g2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&S();function S(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var m7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function v7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!v7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!v7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return m7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);v7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{S.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);m7(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);m7(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?kM({element:t.current,padding:n}).fn(i):{}:t?kM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[mk,iW]=p2(rW),[Dxe,oW]=mk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,RTe]=mk(w4),[Hxe,Wxe]=mk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:S}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ut=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ut,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[S,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):S==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=g?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Fw="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},vk="RovingFocusGroup",[y7,lW,twe]=UH(vk),[nwe,uW]=p2(vk,[twe]),[rwe,iwe]=nwe(vk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(y7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(y7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[S=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Fw,k),()=>N.removeEventListener(Fw,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(Fw,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===S),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(y7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],ub="Menu",[S7,ywe,Swe]=UH(ub),[wh,fW]=p2(ub,[Swe,iW,uW]),yk=iW(),hW=uW(),[bwe,cb]=wh(ub),[xwe,Sk]=wh(ub),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=yk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=yk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[OTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=cb(id,e.__scopeMenu),a=Sk(id,e.__scopeMenu);return C.exports.createElement(S7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(S7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return FB(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...S}=e,w=cb(id,n),E=Sk(id,n),P=yk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?kF:C.exports.Fragment,ne=v?{as:Hv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Kn(S.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,x7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),b7="MenuItem",RM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=Sk(b7,e.__scopeMenu),s=pW(b7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(RM,{bubbles:!0,cancelable:!0});g.addEventListener(RM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(b7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(S7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,x7(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,x7(S=>a.onItemLeave(S))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function x7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,NTe]=p2(mW,[fW]),db=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=db(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=db(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=db(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=db(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ct([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ct([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,o6e=C.exports.memo(e=>{const t=je(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[S,w]=C.exports.useState(!1),E=h2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(Cb(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(S2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(uk(l)),t(PH()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Tke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Eke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:$=>{t(DH($))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:nk,className:"hoverable-image-check"})}),S&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(d7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(d7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},i6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(qz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,OM=40,a6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},NM=400;function yW(){const e=je(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:NM,galleryMaxWidth:NM}:a6e[u],[R,O]=C.exports.useState(S>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{S>=o3&&O(!1)},[S]);const Q=()=>{e(lbe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(l7(n))},X=xe=>{e(Qg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(hk())},{enabled:!E},[E]),lt("right",()=>{e(fk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Qg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Qg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(xH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(S)+_e.width,T,Number(M)):Number(S)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(S)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-OM&&e(Qg(Je-OM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ik,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Qg(64)),icon:x(Y_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(vH,{}):x(yH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(o6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(oH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const s6e=ct([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),bk=e=>{const t=je(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ae(s6e),l=()=>{t(Fke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(wbe,{})})})]}),!a&&x(yW,{})]})})};function l6e(){return x(bk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function u6e(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(K$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(tH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(J$,{})}};return ee(ck,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(tk,{accordionInfo:e})]})}const c6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function d6e(){return x(bk,{optionsPanel:x(u6e,{}),children:x(c6e,{})})}var w7=function(e,t){return w7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},w7(e,t)};function f6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");w7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=T6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var S=s+h*v,w=l+g*v,E=u+m*v;o(S,w,E)})}}function T6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function L6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var A6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},xk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=L6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=A6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=xk(e,t);return e.bounds=n,n};function fb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=C7(e,s-g,u+g,r),S=C7(t,l-m,h+m,r);return{x:v,y:S}}var C7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function hb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=fb(g,m,i,o,0,0,null);return v}function m2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var zM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=pb(o,n);return!l},BM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},M6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},I6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function R6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=hb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function O6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,S=!m||!v;if(!(!a||S||!s)){var w=fb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var N6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},D6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function B6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function FM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:C7(e,o,a,i)}function F6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function $6e(e,t){var n=D6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=F6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,S=l-i,w=h*h+g*g,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function H6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,O=S.velocityAlignmentTime,N=O,z=B6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[S.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ut=FM(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=FM(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ut,mt)})}}function $M(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?I6e(e,t):M6e(e,t)}function HM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=N6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);$6e(e,{x:u,y:h}),O6e(e,u,h,g,m)}}function W6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?H6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=wk(e,a,v,S);w&&kd(e,w,h,g)}}function wk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=m2(za(t,2),o,a,0,!1),u=o1(e,l),h=hb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},V6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),Jg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},WM=function(e){var t=Al({},Jg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Jg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Jg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},Jg[n]),e[n]):s?t[n]=DM(DM([],Jg[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=m2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,S=kW(e,t,n),w=wk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=xk(e,a.scale),m=fb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function U6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=G6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=m2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=xk(e,E),O=fb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function G6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function j6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var Y6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},q6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},K6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},X6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},Z6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},Q6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&j6e(a)&&a&&o.contains(a)){var s=U6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:Y6e(e),zoomOut:q6e(e),setTransform:K6e(e),resetTransform:X6e(e),centerView:Z6e(e),zoomToElement:Q6e(e)}},$w=!1;function Hw(){try{var e={get passive(){return $w=!0,!1}};return e}catch{return $w=!1,$w}}var pb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},VM=function(e){e&&clearTimeout(e)},J6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},eCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=pb(u,a);return!g};function tCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=h6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var nCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=m2(za(v,3),u,l,g,S);return w},rCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},iCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=pb(a,i);return!l},oCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},aCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},sCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return m2(za(g,2),a,o,l,!u)},lCe=160,uCe=100,cCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},dCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=tCe(t,null),P=nCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=S||v===0||h,R=u&&M,O=hb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},fCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;VM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},uCe);var o=rCe(e,t);o&&(VM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},lCe))},hCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},pCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=aCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=sCe(e,m);if(v!==i){var S=o1(e,v),w=u||h===0||s,E=a&&w,P=hb(e,g.x,g.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},gCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function mCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=wk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var vCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=pb(l,s);return!(g||!h)},MW=ae.createContext(V6e),yCe=function(e){f6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=WM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Hw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=eCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(cCe(n,r),dCe(n,r),fCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=zM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),$M(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=BM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),HM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(W6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=iCe(n,r);!l||(hCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=oCe(n);!l||(r.preventDefault(),r.stopPropagation(),pCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(gCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=zM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),$M(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=BM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];HM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=vCe(n,r);!o||mCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=J6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Hw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Hw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=WM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),SCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(yCe,{...Al({},e,{setRef:i})})});function bCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var xCe=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,UM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};bCe(xCe);var wCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(MW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+UM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+UM.content+" "+o,style:s,children:t})})};function CCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(SCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:S})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(Y_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(wCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function _Ce(){const e=je(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(hk())},g=()=>{e(fk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(aH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(CCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const kCe=ct([Q_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),ECe=()=>{const e=je(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(kCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(PI(o))},handleReset:()=>e(PI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(EI(o))},handleReset:()=>{e(EI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(TI(o))},handleReset:()=>{e(TI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=ct(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),TCe=()=>{const e=je(),{boundingBoxDimensions:t}=Ae(PCe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},v2=e=>e.system,LCe=e=>e.system.toastQueue,ACe=ct(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function MCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(ACe),n=je();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(lM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(lM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const ICe=ct([Q_,v2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),RCe=()=>{const e=je(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(ICe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(MCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(AI(v))},handleReset:()=>{e(AI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function OCe(){const e={boundingBox:{header:"Bounding Box",feature:Wi.BOUNDING_BOX,content:x(TCe,{})},seamCorrection:{header:"Seam Correction",feature:Wi.SEAM_CORRECTION,content:x(ECe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Wi.INFILL_AND_SCALING,content:x(RCe,{})},seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})}};return ee(ck,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(Q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(tk,{accordionInfo:e})]})}const NCe=ct(Rn,fH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),DCe=()=>{const e=je(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(NCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(OSe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(a2,{thickness:"2px",speed:"1s",size:"xl"})})};var zCe=Math.PI/180;function BCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:BCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*zCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var FCe="[object Array]",$Ce="[object Number]",HCe="[object String]",WCe="[object Boolean]",VCe=Math.PI/180,UCe=180/Math.PI,Ww="#",GCe="",jCe="0",YCe="Konva warning: ",GM="Konva error: ",qCe="rgb(",Vw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},KCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const XCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===FCe},_isNumber(e){return Object.prototype.toString.call(e)===$Ce&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===HCe},_isBoolean(e){return Object.prototype.toString.call(e)===WCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&XCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ww,GCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=jCe+e;return Ww+e},getRGB(e){var t;return e in Vw?(t=Vw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ww?this._hexToRgb(e.substring(1)):e.substr(0,4)===qCe?(t=KCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Vw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Ck(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function ZCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function QCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var em="get",tm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=em+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=em+a(t),l=tm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=tm+n,i=em+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=em+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=em+de._capitalize(n),a=tm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function JCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=e7e+u.join(jM)+t7e)):(o+=s.property,t||(o+=a7e+s.val)),o+=i7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=l7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=YM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=JCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",qM="absoluteScale",bf="canvas",f7e="Change",h7e="children",p7e="konva",_7="listening",KM="mouseenter",XM="mouseleave",ZM="set",QM="Shape",n5=" ",JM="stage",Mc="transform",g7e="Stage",k7="visible",m7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let v7e=1;class $e{constructor(t){this._id=v7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),S=new _k({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(qM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==h7e&&(r=ZM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(_7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(k7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==g7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=xm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Gw.pointer;if(t==="touch")return Gw.touch;if(t==="mouse")return Gw.mouse};function tI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class vb extends da{constructor(t){super(tI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{tI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===S7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(_7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+eI,this.content.style.height=n+eI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rw7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||C7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(E7,{evt:t}):this._fire(E7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Uw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,kk(t)),Xm(t.pointerId)}_lostpointercapture(t){Xm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new _k({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}vb.prototype.nodeType=y7e;gr(vb);q.addGetterSetter(vb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function jw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Zm={};function k7e(e){e.fill()}function E7e(e){e.stroke()}function P7e(e){e.fill()}function T7e(e){e.stroke()}function L7e(){this._clearCache(qW)}function A7e(){this._clearCache(KW)}function M7e(){this._clearCache(XW)}function I7e(){this._clearCache(ZW)}function R7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Zm)););this.colorKey=n,Zm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=jw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=jw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Zm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){de.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}}Ie.prototype._fillFunc=k7e;Ie.prototype._strokeFunc=E7e;Ie.prototype._fillFuncHit=P7e;Ie.prototype._strokeFuncHit=T7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",L7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",A7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",M7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",Ck());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var O7e="#",N7e="beforeDraw",D7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new _k({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(N7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(D7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Ek extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Ek.prototype.nodeType="FastLayer";gr(Ek);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var Yw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Yw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=nI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=rI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===nI?this.setTime(t):this.state===rI&&this.setTime(this.duration-t)}pause(){this.state=F7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Qm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new H7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)B7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Qm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function T7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[g,m,v,S]}function oI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var J=S.shift(),K=S.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],W7e="Change.konva",V7e="none",L7="up",A7="right",M7="down",I7="left",U7e=eV.length;class Pk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var aI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,aI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),aI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Kw(){return g3||(g3=de.createCanvasElement().getContext(Y7e),g3)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(q7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Kw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+Q7e)+r9e(this.fontFamily())}_addTextLine(t){this.align()===nm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Kw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),S=v!==uI,w=v!==t9e&&S,E=this.ellipsis();this.textArr=[],Kw().font=this._getContextFont();for(var P=E?this._getTextWidth(qw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var O=0,N=M.length,z="",V=0;O>>1,j=M.slice(0,$+1),le=this._getTextWidth(j)+P;le<=h?(O=$+1,z=j,V=le):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===p3||Q===sI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(p3),z.lastIndexOf(sI))+1,W>0&&(O=W,z=z.slice(0,O),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==uI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+qw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=tV(this.text()),g=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var le=t.dataArray,W=w+1;W0)return w=W,le[W];le[W].command==="M"&&(m={x:le[W].points[0],y:le[W].points[1]})}return{}},k=function(le){var W=t._getTextSize(le).width+r;le===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;S===void 0;)S=P(),S&&J+S.pathLengthW?v=Dn.getPointOnLine(W,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],X=S.points[5],ce=S.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Dn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?W>S.pathLength?E=1e-8:E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength/2:E=Math.max(E-(Q-W)/S.pathLength/2,0),E>1&&(E=1,K=!0),v=Dn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength:E-=(Q-W)/S.pathLength,E>1&&(E=1,K=!0),v=Dn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(Q=Dn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,O=0;Oe+`.${lV}`).join(" "),cI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in rt._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(c9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var _4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],dI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return uV(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(cI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(cI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-dI,y:-dI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new y2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let le=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(le-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+le,Q=rt.getAngle(this.rotationSnapTolerance()),J=g9e(this.rotationSnaps(),W,Q)-g.rotation,K=p9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),S=g.getTransform().copy();S.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),a1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+_4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",_4,m9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function fI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function S9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,S,w,E,P,k,T,M,R,O,N,z,V,$,j,le,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new fI,X=null,ce=G,me=null,Re=null,xe=v9e[t],Se=y9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*xe>>Se)*j,n[h+1]=(v*xe>>Se)*j,n[h+2]=(S*xe>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*xe>>Se)*j,n[l+1]=(v*xe>>Se)*j,n[l+2]=(S*xe>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&S9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const x9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var S=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],O=T,N=O>0?O:-O,z=M>0?M:-M,V=R>0?R:-R;if(z>N&&(O=M),V>N&&(O=R),O*=t,i){var $=s[E]+O,j=s[E+1]+O,le=s[E+2]+O;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=le>255?255:le<0?0:le}else{var W=n-O;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Xw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),O=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,O=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,O,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,R=0,O=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},j9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` +`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Vl(d):""}var Ih=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function Sn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Id(d,f,y){if(kr.current!==Bo)throw Error(a(168));Sn(kr,f),Sn(Gr,y)}function Gl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,Sn(kr,d),Sn(Gr,Gr.current),!0}function Rd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Gl(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),Sn(kr,d)):En(Gr),Sn(Gr,y)}var vi=Math.clz32?Math.clz32:Od,Rh=Math.log,Oh=Math.LN2;function Od(d){return d>>>=0,d===0?32:31-(Rh(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function jl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function Dd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Ui=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var Kt=Ge(pe,Pt,ve[Ft],We);if(Kt===null){Pt===null&&(Pt=Br);break}d&&Pt&&Kt.alternate===null&&f(pe,Pt),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=Ge(pe,Pt,Kt.value,We);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Te=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(Kt.done)return y(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;!Kt.done;Ft++,Kt=ve.next())Kt=At(pe,Kt.value,We),Kt!==null&&(se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return Fn&&Hs(pe,Ft),Te}for(Pt=_(pe,Pt);!Kt.done;Ft++,Kt=ve.next())Kt=Hn(Pt,pe,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&Pt.delete(Kt.key===null?Ft:Kt.key),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Te}function Xo(pe,se,ve,We){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Te=ve.key,Mt=se;Mt!==null;){if(Mt.key===Te){if(Te=ve.type,Te===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&X1(Te)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=Ca(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,We,ve.key),se.return=pe,pe=se):(We=df(ve.type,ve.key,ve.props,null,pe.mode,We),We.ref=Ca(pe,se,ve),We.return=pe,pe=We)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,We),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),We)}if(ne(ve))return Pn(pe,se,ve,We);if(O(ve))return nr(pe,se,ve,We);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=xp(ve,pe.mode,We),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var Ju=A2(!0),M2=A2(!1),Yd={},po=zo(Yd),_a=zo(Yd),re=zo(Yd);function ye(d){if(d===Yd)throw Error(a(174));return d}function ge(d,f){Sn(re,f),Sn(_a,d),Sn(po,Yd),d=K(f),En(po),Sn(po,d)}function Ue(){En(po),En(_a),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(Sn(_a,d),Sn(po,f))}function Jt(d){_a.current===d&&(En(po),En(_a))}var Rt=zo(0);function dn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||$u(y)||Md(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var qd=[];function Z1(){for(var d=0;dy?y:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=y,ec.transition=_}}function sc(){return bi().memoizedState}function og(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,y);else if(y=Qu(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),ef(y,f,_)}}function lc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Gd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Qu(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),ef(y,f,_))}}function uc(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function cc(d,f){Kd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function ef(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Yl(d,y)}}var ts={readContext:Gi,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},kb={readContext:Gi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:O2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Zl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Zl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Zl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=og.bind(null,bn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:R2,useDebugValue:ng,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=R2(!1),f=d[0];return d=ig.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=bn,L=qr();if(Fn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Xl&30)!==0||tg(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Qd(9,oc.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var y=xa,_=Ui;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=tc++,0dp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=dn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&y!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Rt.current,Sn(Rt,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(oi(f),pt&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function hg(d,f){switch(j1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ue(),En(Gr),En(kr),Z1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(En(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Rt),null;case 4:return Ue(),null;case 10:return Vd(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,Mb=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Qh=!1;function Jl(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:pt&&Rs(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Qh,Qh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function ep(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function pg(d){var f=d.alternate;f!==null&&(d.alternate=null,pg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,y),d=d.sibling;d!==null;)tp(d,f,y),d=d.sibling}function gg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(y,d,f):ke(y,d);else if(_!==4&&(d=d.child,d!==null))for(gg(d,f,y),d=d.sibling;d!==null;)gg(d,f,y),d=d.sibling}var Sr=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(cn,y)}catch{}switch(y.tag){case 5:Pr||pc(y,f);case 6:if(pt){var _=Sr,L=Yo;Sr=null,qo(d,f,y),Sr=_,Yo=L,Sr!==null&&(Yo?tt(Sr,y.stateNode):ft(Sr,y.stateNode))}else qo(d,f,y);break;case 18:pt&&Sr!==null&&(Yo?H1(Sr,y.stateNode):$1(Sr,y.stateNode));break;case 4:pt?(_=Sr,L=Yo,Sr=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),Sr=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=Sa(_),Fu(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(pc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Mb),f.forEach(function(_){var L=Q2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case ap:return":has("+(yg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Ib(_/1960))-_,10<_){d.timeoutHandle=Je(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?pp.bind(null,d):null}function gp(d,f){var y=bc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=y,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-xg?Qs(d,0):bg|=y),Xr(d,f)}function Eg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function Ob(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),Eg(d,y)}function Q2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Eg(d,y)}var Pg;Pg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,Lb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Fn&&(f.flags&1048576)!==0&&G1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;ka(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,y),L=J1(null,f,_,d,L,y);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,q1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,K1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(ka(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=Sp(_),d=Ho(_,d),L){case 0:f=lg(null,f,_,d,y);break e;case 1:f=V2(null,f,_,d,y);break e;case 11:f=F2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),lg(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),V2(d,f,_,L,y);case 3:e:{if(U2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,E2(d,f),Vh(f,_,null,y);var H=f.memoizedState;if(_=H.element,mt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=G2(d,f,_,y,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=G2(d,f,_,y,L);break e}else for(mt&&(fo=R1(f.stateNode.containerInfo),Gn=f,Fn=!0,Oi=null,ho=!1),y=M2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Ku(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&Fd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Me(_,L)?H=null:I!==null&&Me(_,I)&&(f.flags|=32),W2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&Fd(f),null;case 13:return j2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),F2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,k2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var De=I.updateQueue;if(De!==null){De=De.shared;var Qe=De.pending;Qe===null?fe.next=fe:(fe.next=Qe.next,Qe.next=fe),De.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),Ud(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),Ud(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,y),L=Gi(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return $2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ka(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,y),T2(f,_,L),K1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return q2(d,f,y);case 22:return H2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function Ea(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ea(d,f,y,_)}function Tg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Sp(d){if(typeof d=="function")return Tg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function df(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")Tg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case S:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function bp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function xp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function ff(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,mt&&(this.mutableSourceEagerHydrationData=null)}function J2(d,f,y,_,L,I,H,oe,fe){return d=new ff(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},q1(I),d}function Lg(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Gl(d,y,f)}return f}function Ag(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=le(f),d===null?null:d.stateNode}function hf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=De&&I>=At&&L<=Qe&&H<=Ge){d.splice(f,1);break}else if(_!==De||y.width!==fe.width||GeH){if(!(I!==At||y.height!==fe.height||Qe<_||De>L)){De>_&&(fe.width+=De-_,fe.x=_),QeI&&(fe.height+=At-I,fe.y=I),Gey&&(y=H)),H ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Mg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{cn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!wt)throw Error(a(363));d=Sg(d,f);var L=qt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=Lg(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=Y9e})(cV);const q9e=Z7(cV.exports);var Tk={exports:{}},Th={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Tk);const hI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let pI=!1,gI=!1;const Lk=".react-konva-event",K9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,X9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,Z9e={};function yb(e,t,n=Z9e){if(!pI&&"zIndex"in t&&(console.warn(X9e),pI=!0),!gI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(K9e),gI=!0)}for(var o in n)if(!hI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!hI[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Lk,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},Q9e={};ch.Node.prototype._applyProps=yb;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function e8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return yb(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return dV}function d8e(){return dV}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function S8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function x8e(e,t,n){fV(e,t,n)}function w8e(e,t){t.destroy(),t.off(Lk),Ld(e)}function C8e(e,t){t.destroy(),t.off(Lk),Ld(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){yb(e,i,r)}function P8e(e){e.hide(),Ld(e)}function T8e(e){}function L8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function M8e(e){}function I8e(){}const R8e=()=>Tk.exports.DefaultEventPriority,O8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:S8e,appendChildToContainer:b8e,insertBefore:fV,insertInContainerBefore:x8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:T8e,unhideInstance:L8e,unhideTextInstance:A8e,clearContainer:M8e,detachDeletedInstance:I8e,getCurrentEventPriority:R8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,mI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,vI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&vI(e,n,t[n]);if(mI)for(var n of mI(t))F8e.call(t,n)&&vI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function Ak(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Ak(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Mk=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(Mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:Ak(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const im=[],SI=new WeakMap;function U8e(){var e;const t=V8e();im.splice(0,im.length),Ak(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Mk&&im.push(hV(i))});for(const n of im){const r=(e=W8e.current)==null?void 0:e.readContext(n);SI.set(n,r)}return C.exports.useMemo(()=>im.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(yI({},i),{value:SI.get(r)}))),n=>x(pV,{...yI({},n)})),[])}function G8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const j8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=G8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=wm.createContainer(n.current,Tk.exports.LegacyRoot,!1,null),wm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),wm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),yb(n.current,e,i),wm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",Y8e="Transformer",wm=q9e(O8e);wm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const q8e=ae.forwardRef((e,t)=>x(pV,{children:x(j8e,{...e,forwardedRef:t})})),K8e=ct([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),X8e=e=>{const{...t}=e,{objects:n}=Ae(K8e);return x(dh,{listening:!1,...t,children:n.filter(ok).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},Z8e=ct(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:aM/v,colorPickerInnerRadius:(aM-c7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:S,colorPickerOuterRadius:w}=Ae(Z8e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:c7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:S,stroke:v,strokeWidth:c7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=ct(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),e_e=e=>{const{...t}=e,n=je(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(J8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Aw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Aw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Aw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Rw(!0))},z=()=>{n(Rw(!1)),n(Xy(!1))},V=()=>{n(uM(!0))},$=()=>{n(Rw(!1)),n(uM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(Y8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const t_e=e=>{mV=e},Vv=()=>mV,n_e=e=>{vV=e},yV=()=>vV,r_e=ct([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i_e=()=>{const e=je(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(r_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},o_e=ct(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),bI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),a_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(o_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=bI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=bI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},s_e=ct([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),l_e=e=>{const t=je(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(s_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},Sb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=je(),t=Vv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},u_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),c_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(u_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=Sb(e.current);!a||(o.evt.preventDefault(),t(ob(!0)),t(CH([a.x,a.y])))},[e,n,r,t,i])},d_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f_e=(e,t)=>{const n=je(),{tool:r,isDrawing:i,isStaging:o}=Ae(d_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=Sb(e.current);if(!a)return;n(_H([a.x,a.y]))}else t.current=!1;n(ob(!1))},[t,n,i,o,e,r])},h_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),p_e=(e,t,n)=>{const r=je(),{isDrawing:i,tool:o,isStaging:a}=Ae(h_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=Sb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(_H([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},g_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),m_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(g_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=Sb(e.current);!o||n==="move"||r||(t(ob(!0)),t(CH([o.x,o.y])))},[e,n,r,t])},v_e=()=>{const e=je();return C.exports.useCallback(()=>{e(TH(null)),e(ob(!1))},[e])},y_e=ct([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=()=>{const e=je(),{tool:t,isStaging:n}=Ae(y_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,b_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=b_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},x_e=ct([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const{objects:e}=Ae(x_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},C_e=ct([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),__e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},k_e=()=>{const{colorMode:e}=Xv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(C_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=__e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},E_e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e=e=>{const{...t}=e,n=Ae(E_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,T_e=ct([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function L_e(){const{cursorCoordinatesString:e}=Ae(T_e);return x("div",{children:`Cursor Position: ${e}`})}const A_e=ct([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:S}=e;let w="inherit";return(S==="none"&&(o<512||a<512)||S==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:S!=="auto",shouldShowScaledBoundingBox:S!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),M_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(A_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(L_e,{})]})]})},I_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),R_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(I_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},O_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),N_e=()=>{const e=je(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(O_e),o=C.exports.useCallback(()=>{e(cM(!1))},[e]),a=C.exports.useCallback(()=>{e(cM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(nk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(cH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},D_e=ct([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?g?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),z_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(D_e);i_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{n_e($),g.current=$},[]),S=C.exports.useCallback($=>{t_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=l_e(g),k=c_e(g),T=f_e(g,E),M=p_e(g,E,w),R=m_e(g),O=v_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=S_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(q8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(k_e,{})}),x(v3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(w_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(X8e,{visible:!0,listening:!1}),x(a_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(Q8e,{visible:l!=="move",listening:!1}),x(R_e,{visible:u}),h&&x(P_e,{}),x(e_e,{visible:n&&!u})]})]}),x(M_e,{}),x(N_e,{})]})})},B_e=ct([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function F_e(){const e=je(),{canUndo:t,activeTabName:n}=Ae(B_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const $_e=ct([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function H_e(){const e=je(),{canRedo:t,activeTabName:n}=Ae($_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Iv(),m=C.exports.useRef(null),v=()=>{r(),g()},S=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(TF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(LF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(zv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),W_e=()=>{const e=je();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(EH()),e(kH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},V_e=()=>{const e=je();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(kH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},U_e=ct([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),G_e=()=>{const e=je(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(U_e);return lt(["n"],()=>{e(dM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ik,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(dM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(V_e,{}),x(W_e,{})]})})};function bb(){return(bb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function R7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(xI(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=O7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(wI(P),!function(M,R){return R&&!Jm(M)}(P,l.current)&&k)){if(Jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(xI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),xb=function(e){return e.filter(Boolean).join(" ")},Rk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=xb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},N7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Zw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},j_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},Y_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},q_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=xb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Ik,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Rk,{className:"react-colorful__hue-pointer",left:t/360,color:N7({h:t,s:100,v:100,a:1})})))}),K_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:N7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Ik,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Rk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:N7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function X_e(e,t,n){var r=R7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Z_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Q_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},CI=new Map,J_e=function(e){Z_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!CI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,CI.set(t,n);var r=Q_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},eke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Zw(Object.assign({},n,{a:0}))+", "+Zw(Object.assign({},n,{a:1}))+")"},o=xb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Ik,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Rk,{className:"react-colorful__alpha-pointer",left:n.a,color:Zw(n)})))},tke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);J_e(s);var l=X_e(n,i,o),u=l[0],h=l[1],g=xb(["react-colorful",t]);return ae.createElement("div",bb({},a,{ref:s,className:g}),x(K_e,{hsva:u,onChange:h}),x(q_e,{hue:u.h,onChange:h}),ae.createElement(eke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},nke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Y_e,fromHsva:j_e,equal:_V},rke=function(e){return ae.createElement(tke,bb({},e,{colorModel:nke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(rke,{className:`invokeai__color-picker ${t}`,...n})},ike=ct([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),oke=()=>{const e=je(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ike);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const ake=new Uint8Array(16);function ske(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(ake)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function lke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const uke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_I={randomUUID:uke};function c0(e,t,n){if(_I.randomUUID&&!t&&!e)return _I.randomUUID();e=e||{};const r=e.random||(e.rng||ske)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return lke(r)}const cke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},dke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},fke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},hke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=hke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=Vv();if(!S){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=cke(S,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(dke(M),t(gm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(fke(M,R,O),t(gm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(gm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(gm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},pke=ct([Rn,Ru,v2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),gke=()=>{const e=je(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(pke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Iw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Iw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Mw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Mw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(dH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Iw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mw(l))})]})})]})};let kI;const EV=()=>({setOpenUploader:e=>{e&&(kI=e)},openUploader:kI}),mke=ct([v2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),vke=()=>{const e=je(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(mke),s=Vv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Vv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(EH()),e(PH())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(oke,{}),x(gke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(cH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:S,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(uH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(F_e,{}),x(H_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(rk,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(G_e,{})})]})},yke=ct([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Ske=()=>{const e=je(),{doesCanvasNeedScaling:t}=Ae(yke);return C.exports.useLayoutEffect(()=>{const n=qe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(vke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(DCe,{}):x(z_e,{})})]})})})};function bke(){const e=je();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(bk,{optionsPanel:x(OCe,{}),styleClass:"inpainting-workarea-overrides",children:x(Ske,{})})}const xke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function wke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Cke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(xke,{fill:"black",boxSize:"2.5rem"}),workarea:x(bke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Cke,{fill:"black",boxSize:"2.5rem"}),workarea:x(wke,{}),tooltip:"Training"}},wb=qe.map(If,(e,t)=>t);[...wb];function _ke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=je();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(r$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(t$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(e$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(n$,{className:"app-tabs-panels",children:t?x(_Ce,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},kke=PV,TV=$S({name:"options",initialState:kke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=wb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:DTe,resetSeed:zTe,setActiveTab:ko,setAllImageToImageParameters:Eke,setAllParameters:Pke,setAllTextToImageParameters:Tke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Lke,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:D7,setInfillMethod:OV,setInitialImage:S2,setIsLightBoxOpen:pd,setIterations:Ake,setMaskPath:NV,setOptionsPanelScrollPosition:Mke,setParameter:BTe,setPerlin:DV,setPrompt:Cb,setSampler:zV,setSeamBlur:EI,setSeamless:BV,setSeamSize:PI,setSeamSteps:TI,setSeamStrength:LI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Ike,setShouldHoldOptionsPanelOpen:Rke,setShouldLoopback:Oke,setShouldPinOptionsPanel:Nke,setShouldRandomizeSeed:Dke,setShouldRunESRGAN:zke,setShouldRunFacetool:Bke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:FTe,setShowDualDisplay:Fke,setSteps:WV,setThreshold:VV,setTileSize:AI,setUpscalingLevel:z7,setUpscalingStrength:B7,setVariationAmount:$ke,setWidth:UV}=TV.actions,Hke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Wke={type:"error",data:"parser error"},Vke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Uke=typeof ArrayBuffer=="function",Gke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>Vke&&t instanceof Blob?n?r(t):MI(t,r):Uke&&(t instanceof ArrayBuffer||Gke(t))?n?r(t):MI(new Blob([t]),r):r(zl[e]+(t||"")),MI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},II="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Yke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:qke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Wke},qke=(e,t)=>{if(Yke){const n=jke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Kke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Xke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Qke=setTimeout,Jke=clearTimeout;function _b(e,t){t.useNativeTimers?(e.setTimeoutFn=Qke.bind(Gc),e.clearTimeoutFn=Jke.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const eEe=1.33;function tEe(e){return typeof e=="string"?nEe(e):Math.ceil((e.byteLength||e.size)*eEe)}function nEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class rEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,_b(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new rEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),F7=64,iEe={};let RI=0,b3=0,OI;function NI(e){let t="";do t=QV[e%F7]+t,e=Math.floor(e/F7);while(e>0);return t}function JV(){const e=NI(+new Date);return e!==OI?(RI=0,OI=e):e+"."+NI(RI++)}for(;b3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Xke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Kke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),_b(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=sEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",DI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,DI,!1)}}function DI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,zI=!0,cEe="arraybuffer",BI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class dEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=BI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=zI&&!BI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||cEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{zI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const fEe={websocket:dEe,polling:uEe},hEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hEe.exec(e||""),o={},a=14;for(;a--;)o[pEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=gEe(o,o.path),o.queryKey=mEe(o,o.query),o}function gEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function mEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=$7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=$7(n.host).host),_b(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=oEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new fEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,bEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",xEe=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Ok(e){return yEe&&(e instanceof ArrayBuffer||SEe(e))||bEe&&e instanceof Blob||xEe&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class EEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=CEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const PEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:_Ee,get PacketType(){return nn},Encoder:kEe,Decoder:Nk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const TEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(TEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}P1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};P1.prototype.reset=function(){this.attempts=0};P1.prototype.setMin=function(e){this.ms=e};P1.prototype.setMax=function(e){this.max=e};P1.prototype.setJitter=function(e){this.jitter=e};class V7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_b(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new P1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||PEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const om={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=vEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=om[i]&&o in om[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new V7(r,t):(om[i]||(om[i]=new V7(r,t)),l=om[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:V7,Socket:oU,io:l5,connect:l5});var LEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,AEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,MEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(FI[t]||t||FI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return IEe(e)},E=function(){return REe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return $I({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return $I({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":OEe(e)},o:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60),2)+":"+ea(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(LEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var FI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},$I=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},IEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},REe=function(t){var n=t.getDay();return n===0&&(n=7),n},OEe=function(t){return(String(t).match(AEe)||[""]).pop().replace(MEe,"").replace(/GMT\+0000/g,"UTC")};const NEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(JA(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(rM("user")):t(l7("user")),r.categories.result.latest_mtime?t(rM("result")):t(l7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(JA(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(wb[a]){case"img2img":{t(S2(h));break}}t(Ow()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(eM()),t(Ow())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Ow())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(tM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(tM(o)),t(Su(!1)),t(i0(!0)),t(eM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(gm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},DEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},zEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},BEe=e=>{const t=Vv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?eH(U_,G_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ut,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=DEe(et?dt.filter(ok):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ut),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&zEe([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=S,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},FEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=BEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},$Ee=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=NEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=FEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>S(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},HEe=["cursorPosition"].map(e=>`canvas.${e}`),WEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),VEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=h$({options:Hke,gallery:pbe,system:h4e,canvas:QSe}),UEe=R$.getPersistConfig({key:"root",storage:I$,rootReducer:aU,blacklist:[...HEe,...WEe,...VEe],debounce:300}),GEe=pye(UEe,aU),sU=l2e({reducer:GEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat($Ee()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),je=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function jEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(a2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ZEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),QEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ZEe),i=t?Math.round(t*100/n):0;return x(DF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function JEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function ePe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Iv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(JEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Bv,{className:" modal hotkeys-modal",children:[x(f_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const tPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=je(),{name:i,status:o,description:a}=e,s=()=>{r(pH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(lB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},nPe=ct(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),rPe=()=>{const{models:e}=Ae(nPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(tPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},iPe=ct([v2,Q_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),oPe=({children:e})=>{const t=je(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Iv(),{isOpen:a,onOpen:s,onClose:l}=Iv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(iPe),S=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Bv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(f_,{className:"modal-close-btn"}),ee(zv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(rPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(rH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Bv,{children:x(zv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},aPe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),sPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(aPe),s=je();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(iH())},className:`status ${l}`,children:u})})},lPe=["dark","light","green"];function uPe(){const{setColorMode:e}=Xv(),t=je(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Lke(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(dB,{align:"stretch",children:lPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(nk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const cPe=ct([v2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dPe=()=>{const e=je(),{models:t,activeModel:n,isProcessing:r}=Ae(cPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(pH(o.target.value))}})})},fPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(sPe,{}),x(dPe,{}),x(ePe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(uPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(oPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ik,{})})})]})]}),hPe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),pPe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),gPe=()=>{const e=je(),t=Ae(hPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(pPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(iH()),e(Tw(!n))};return lt("`",()=>{e(Tw(!n))},[n]),lt("esc",()=>{e(Tw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ee("div",{className:`console-entry console-${S}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(lH,{}),onClick:l})})]})};function mPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var vPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=yPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function yPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=vPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var SPe=[".DS_Store","Thumbs.db"];function bPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&xPe(e.dataTransfer)?[2,kPe(e.dataTransfer,e.type)]:wPe(e)?[2,CPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,_Pe(e)]:[2,[]]})})}function xPe(e){return E4(e)}function wPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function CPe(e){return j7(e.target.files).map(function(t){return x2(t)})}function _Pe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function kPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=j7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(EPe))]):[3,2];case 1:return r=i.sent(),[2,WI(uU(r))];case 2:return[2,WI(j7(e.files).map(function(o){return x2(o)}))]}})})}function WI(e){return e.filter(function(t){return SPe.indexOf(t.name)===-1})}function j7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,YI(n)];if(e.sizen)return[!1,YI(n)]}return[!0,null]}function Rf(e){return e!=null}function WPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hU(l,n),h=Uv(u,1),g=h[0],m=pU(l,r,i),v=Uv(m,1),S=v[0],w=s?s(l):null;return g&&S&&!w})}function P4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function w3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function KI(e){e.preventDefault()}function VPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function UPe(e){return e.indexOf("Edge/")!==-1}function GPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return VPe(e)||UPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function lTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Dk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,ZPe),i=SU(r),o=i.open,a=T4(i,QPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Dk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:bPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Dk.defaultProps=yU;Dk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var X7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return qPe(n)},[n]),j=C.exports.useMemo(function(){return YPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:ZI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:ZI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(uTe,X7),K=Qw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&jPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",KI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",KI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(tTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&WPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Qw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Qw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[HPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&S&&S(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,S,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ut=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){KPe(Ze)?(W(Ze),X({type:"closeDialog"})):XPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(GPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,JPe);return ur(ur(K7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,eTe),ze=K7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ut)})}function uTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},X7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},X7);default:return e}}function ZI(){}const cTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},QI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(uk(u)):o==="img2img"&&t(S2(u))},dTe=e=>{const{children:t}=e,n=je(),r=Ae(_r),i=h2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` +`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(QI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(QI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(dk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(cTe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},fTe=()=>{const e=je(),t=Ae(LCe),n=h2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ct([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),hTe=()=>{const e=je(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(dH,{})}),r&&ee(Ln,{children:[x(gH,{iconButton:!0}),x(mH,{})]})]}):null},pTe=()=>{const e=je(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Li(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(oH,{})}):null};mPe();const gTe=()=>(fTe(),ee("div",{className:"App",children:[ee(dTe,{children:[x(QEe,{}),ee("div",{className:"app-content",children:[x(fPe,{}),x(_ke,{})]}),x("div",{className:"app-console",children:x(gPe,{})})]}),x(hTe,{}),x(pTe,{})]}));const xU=bye(sU),mTe=kN({key:"invokeai-style-cache",prepend:!0});e6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(XEe,{}),persistor:xU,children:x(LJ,{value:mTe,children:x(Eve,{children:x(gTe,{})})})})})})); diff --git a/frontend/dist/assets/index.499bc932.css b/frontend/dist/assets/index.f999e69e.css similarity index 89% rename from frontend/dist/assets/index.499bc932.css rename to frontend/dist/assets/index.f999e69e.css index 6aec9ecf68..2636a04f53 100644 --- a/frontend/dist/assets/index.499bc932.css +++ b/frontend/dist/assets/index.f999e69e.css @@ -1 +1 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(26, 26, 32);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(46, 48, 58);--tab-panel-bg: rgb(36, 38, 48);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(208, 210, 212);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(206, 208, 210);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: rgb(36, 40, 44);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{padding-top:.5rem;display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem;background-color:var(--tab-panel-bg)}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem;font-weight:700}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(26, 26, 32);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(46, 48, 58);--tab-panel-bg: rgb(36, 38, 48);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(208, 210, 212);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(206, 208, 210);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: rgb(36, 40, 44);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{padding-top:.5rem;display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem;background-color:var(--tab-panel-bg)}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem;font-weight:700}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;font-size:.9rem;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index a9b43b5c40..f0c6ee799b 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,8 @@ InvokeAI - A Stable Diffusion Toolkit - - + + From a3a0a87f55fa0b7d17a799063117a2d6b6f3b4f5 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 25 Nov 2022 08:22:19 +1100 Subject: [PATCH 212/220] Fixes canvas failing to scale on first run --- .../src/features/canvas/components/IAICanvasResizer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/canvas/components/IAICanvasResizer.tsx b/frontend/src/features/canvas/components/IAICanvasResizer.tsx index cc59ce1cec..cdeb981e51 100644 --- a/frontend/src/features/canvas/components/IAICanvasResizer.tsx +++ b/frontend/src/features/canvas/components/IAICanvasResizer.tsx @@ -3,6 +3,7 @@ import { useLayoutEffect, useRef } from 'react'; import { useAppDispatch, useAppSelector } from 'app/store'; import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { + resizeAndScaleCanvas, resizeCanvas, setCanvasContainerDimensions, setDoesCanvasNeedScaling, @@ -52,7 +53,11 @@ const IAICanvasResizer = () => { }) ); - dispatch(resizeCanvas()); + if (!isCanvasInitialized) { + dispatch(resizeAndScaleCanvas()); + } else { + dispatch(resizeCanvas()); + } dispatch(setDoesCanvasNeedScaling(false)); }, 0); From 3f0cfaac4a25fbe907597752fcddcc840abceb8d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 25 Nov 2022 08:23:07 +1100 Subject: [PATCH 213/220] Builds fresh bundle --- .../{index.97297ef9.js => index.8cec9255.js} | 68 +++++++++---------- frontend/dist/index.html | 2 +- 2 files changed, 35 insertions(+), 35 deletions(-) rename frontend/dist/assets/{index.97297ef9.js => index.8cec9255.js} (82%) diff --git a/frontend/dist/assets/index.97297ef9.js b/frontend/dist/assets/index.8cec9255.js similarity index 82% rename from frontend/dist/assets/index.97297ef9.js rename to frontend/dist/assets/index.8cec9255.js index 624e326262..ef2bb692c0 100644 --- a/frontend/dist/assets/index.97297ef9.js +++ b/frontend/dist/assets/index.8cec9255.js @@ -6,7 +6,7 @@ function Kq(e,t){for(var n=0;n>>1,Re=G[me];if(0>>1;mei(Me,ce))_ei(Je,Me)?(G[me]=Je,G[_e]=ce,me=_e):(G[me]=Me,G[Se]=ce,me=Se);else if(_ei(Je,ce))G[me]=Je,G[_e]=ce,me=_e;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,J(R);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function R(G,X){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Re=me(g.expirationTime<=X);X=e.unstable_now(),typeof Re=="function"?g.callback=Re:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var O=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Re,t(l,G),S||v||(S=!0,J(R))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(aR);(function(e){e.exports=aR})(d0);/** + */(function(e){function t(G,X){var ce=G.length;G.push(X);e:for(;0>>1,Re=G[me];if(0>>1;mei(Me,ce))_ei(Je,Me)?(G[me]=Je,G[_e]=ce,me=_e):(G[me]=Me,G[Se]=ce,me=Se);else if(_ei(Je,ce))G[me]=Je,G[_e]=ce,me=_e;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,J(R);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function R(G,X){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Re=me(g.expirationTime<=X);X=e.unstable_now(),typeof Re=="function"?g.callback=Re:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var O=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Re,t(l,G),S||v||(S=!0,J(R))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(sR);(function(e){e.exports=sR})(d0);/** * @license React * react-dom.production.min.js * @@ -22,14 +22,14 @@ function Kq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),t6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ME={},IE={};function fK(e){return t6.call(IE,e)?!0:t6.call(ME,e)?!1:dK.test(e)?IE[e]=!0:(ME[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var n9=/[\-:]([a-z])/g;function r9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function i9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),t6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,IE={},RE={};function fK(e){return t6.call(RE,e)?!0:t6.call(IE,e)?!1:dK.test(e)?RE[e]=!0:(IE[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var n9=/[\-:]([a-z])/g;function r9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function i9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{nx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?am(e):""}function gK(e){switch(e.tag){case 5:return am(e.type);case 16:return am("Lazy");case 13:return am("Suspense");case 19:return am("SuspenseList");case 0:case 2:case 15:return e=rx(e.type,!1),e;case 11:return e=rx(e.type.render,!1),e;case 1:return e=rx(e.type,!0),e;default:return""}}function o6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case n6:return"Profiler";case o9:return"StrictMode";case r6:return"Suspense";case i6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cR:return(e.displayName||"Context")+".Consumer";case uR:return(e._context.displayName||"Context")+".Provider";case a9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case s9:return t=e.displayName||null,t!==null?t:o6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return o6(e(t))}catch{}}return null}function mK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return o6(t);case 8:return t===o9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ad(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vK(e){var t=fR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dy(e){e._valueTracker||(e._valueTracker=vK(e))}function hR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function f5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function a6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function OE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ad(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pR(e,t){t=t.checked,t!=null&&i9(e,"checked",t,!1)}function s6(e,t){pR(e,t);var n=ad(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?l6(e,t.type,n):t.hasOwnProperty("defaultValue")&&l6(e,t.type,ad(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function NE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function l6(e,t,n){(t!=="number"||f5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sm=Array.isArray;function f0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tv(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _m={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yK=["Webkit","ms","Moz","O"];Object.keys(_m).forEach(function(e){yK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_m[t]=_m[e]})});function yR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_m.hasOwnProperty(e)&&_m[e]?(""+t).trim():t+"px"}function SR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=yR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function d6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function f6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var h6=null;function l9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var p6=null,h0=null,p0=null;function BE(e){if(e=qv(e)){if(typeof p6!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=R4(t),p6(e.stateNode,e.type,t))}}function bR(e){h0?p0?p0.push(e):p0=[e]:h0=e}function xR(){if(h0){var e=h0,t=p0;if(p0=h0=null,BE(e),t)for(e=0;e>>=0,e===0?32:31-(AK(e)/MK|0)|0}var hy=64,py=4194304;function lm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function m5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=lm(s):(o&=a,o!==0&&(r=lm(o)))}else a=n&~i,a!==0?r=lm(a):o!==0&&(r=lm(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function jv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ws(t),e[t]=n}function NK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Em),YE=String.fromCharCode(32),qE=!1;function HR(e,t){switch(e){case"keyup":return uX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function dX(e,t){switch(e){case"compositionend":return WR(t);case"keypress":return t.which!==32?null:(qE=!0,YE);case"textInput":return e=t.data,e===YE&&qE?null:e;default:return null}}function fX(e,t){if(Gp)return e==="compositionend"||!m9&&HR(e,t)?(e=FR(),E3=h9=$c=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=QE(n)}}function jR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YR(){for(var e=window,t=f5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=f5(e.document)}return t}function v9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xX(e){var t=YR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jR(n.ownerDocument.documentElement,n)){if(r!==null&&v9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=JE(n,o);var a=JE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,b6=null,Tm=null,x6=!1;function eP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;x6||jp==null||jp!==f5(r)||(r=jp,"selectionStart"in r&&v9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tm&&sv(Tm,r)||(Tm=r,r=S5(b6,"onSelect"),0Kp||(e.current=P6[Kp],P6[Kp]=null,Kp--)}function qn(e,t){Kp++,P6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function sP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function nO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function lP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=nO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,vx=!1;function rO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,rO(e)}function vd(){if(!vx&&hu!==null){vx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&gP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=$g(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=$g(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=kx(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(sm(T))return S(P,k,T,M);if(Ng(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=_x(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=dO(!0),fO=dO(!1),Kv={},_l=md(Kv),dv=md(Kv),fv=md(Kv);function Df(e){if(e===Kv)throw Error(Ne(174));return e}function E9(e,t){switch(qn(fv,t),qn(dv,e),qn(_l,Kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:c6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=c6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(dv),Qn(fv)}function hO(e){Df(fv.current);var t=Df(_l.current),n=c6(t,e.type);t!==n&&(qn(dv,e),qn(_l,n))}function P9(e){dv.current===e&&(Qn(_l),Qn(dv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yx=[];function T9(){for(var e=0;en?n:4,e(!0);var r=Sx.transition;Sx.transition={};try{e(!1),t()}finally{Tn=n,Sx.transition=r}}function LO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},AO(e))MO(t,n);else if(n=sO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),IO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(AO(e))MO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,_9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),IO(n,t,r))}}function AO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function MO(e,t){Lm=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function IO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,c9(e,n)}}var A5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:vP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,_O.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:mP,useDebugValue:R9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=mP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||mO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,vP(yO.bind(null,r,o,e),[e]),r.flags|=2048,gv(9,vO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hv++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{nx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?am(e):""}function gK(e){switch(e.tag){case 5:return am(e.type);case 16:return am("Lazy");case 13:return am("Suspense");case 19:return am("SuspenseList");case 0:case 2:case 15:return e=rx(e.type,!1),e;case 11:return e=rx(e.type.render,!1),e;case 1:return e=rx(e.type,!0),e;default:return""}}function o6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case n6:return"Profiler";case o9:return"StrictMode";case r6:return"Suspense";case i6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dR:return(e.displayName||"Context")+".Consumer";case cR:return(e._context.displayName||"Context")+".Provider";case a9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case s9:return t=e.displayName||null,t!==null?t:o6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return o6(e(t))}catch{}}return null}function mK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return o6(t);case 8:return t===o9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ad(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vK(e){var t=hR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dy(e){e._valueTracker||(e._valueTracker=vK(e))}function pR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function f5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function a6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function NE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ad(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gR(e,t){t=t.checked,t!=null&&i9(e,"checked",t,!1)}function s6(e,t){gR(e,t);var n=ad(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?l6(e,t.type,n):t.hasOwnProperty("defaultValue")&&l6(e,t.type,ad(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function l6(e,t,n){(t!=="number"||f5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sm=Array.isArray;function f0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tv(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _m={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yK=["Webkit","ms","Moz","O"];Object.keys(_m).forEach(function(e){yK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_m[t]=_m[e]})});function SR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_m.hasOwnProperty(e)&&_m[e]?(""+t).trim():t+"px"}function bR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=SR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function d6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function f6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var h6=null;function l9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var p6=null,h0=null,p0=null;function FE(e){if(e=qv(e)){if(typeof p6!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=R4(t),p6(e.stateNode,e.type,t))}}function xR(e){h0?p0?p0.push(e):p0=[e]:h0=e}function wR(){if(h0){var e=h0,t=p0;if(p0=h0=null,FE(e),t)for(e=0;e>>=0,e===0?32:31-(AK(e)/MK|0)|0}var hy=64,py=4194304;function lm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function m5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=lm(s):(o&=a,o!==0&&(r=lm(o)))}else a=n&~i,a!==0?r=lm(a):o!==0&&(r=lm(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function jv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ws(t),e[t]=n}function NK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Em),qE=String.fromCharCode(32),KE=!1;function WR(e,t){switch(e){case"keyup":return uX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function dX(e,t){switch(e){case"compositionend":return VR(t);case"keypress":return t.which!==32?null:(KE=!0,qE);case"textInput":return e=t.data,e===qE&&KE?null:e;default:return null}}function fX(e,t){if(Gp)return e==="compositionend"||!m9&&WR(e,t)?(e=$R(),E3=h9=$c=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=JE(n)}}function YR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qR(){for(var e=window,t=f5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=f5(e.document)}return t}function v9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xX(e){var t=qR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YR(n.ownerDocument.documentElement,n)){if(r!==null&&v9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=eP(n,o);var a=eP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,b6=null,Tm=null,x6=!1;function tP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;x6||jp==null||jp!==f5(r)||(r=jp,"selectionStart"in r&&v9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tm&&sv(Tm,r)||(Tm=r,r=S5(b6,"onSelect"),0Kp||(e.current=P6[Kp],P6[Kp]=null,Kp--)}function qn(e,t){Kp++,P6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function lP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function rO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function uP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=rO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,vx=!1;function iO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,iO(e)}function vd(){if(!vx&&hu!==null){vx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&mP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=$g(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=$g(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=kx(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(sm(T))return S(P,k,T,M);if(Ng(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=_x(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=fO(!0),hO=fO(!1),Kv={},_l=md(Kv),dv=md(Kv),fv=md(Kv);function Df(e){if(e===Kv)throw Error(Ne(174));return e}function E9(e,t){switch(qn(fv,t),qn(dv,e),qn(_l,Kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:c6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=c6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(dv),Qn(fv)}function pO(e){Df(fv.current);var t=Df(_l.current),n=c6(t,e.type);t!==n&&(qn(dv,e),qn(_l,n))}function P9(e){dv.current===e&&(Qn(_l),Qn(dv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yx=[];function T9(){for(var e=0;en?n:4,e(!0);var r=Sx.transition;Sx.transition={};try{e(!1),t()}finally{Tn=n,Sx.transition=r}}function AO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MO(e))IO(t,n);else if(n=lO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),RO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MO(e))IO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,_9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),RO(n,t,r))}}function MO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function IO(e,t){Lm=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,c9(e,n)}}var A5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:yP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,kO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:vP,useDebugValue:R9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=vP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||vO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yP(SO.bind(null,r,o,e),[e]),r.flags|=2048,gv(9,yO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[cv]=r,HO(e,t,!1,!1),t.stateNode=e;e:{switch(a=f6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return F9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(S9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),T9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return P9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return C9(t.type._context),null;case 22:case 23:return F9(),null;case 24:return null;default:return null}}var Cy=!1,Hi=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function F6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var EP=!1;function KX(e,t){if(w6=v5,e=YR(),v9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(C6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=EP,EP=!1,S}function Am(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&F6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function UO(e){var t=e.alternate;t!==null&&(e.alternate=null,UO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[cv],delete t[E6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function GO(e){return e.tag===5||e.tag===3||e.tag===4}function PP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function H6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(H6(e,t,n),e=e.sibling;e!==null;)H6(e,t,n),e=e.sibling}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)jO(e,t,n),n=n.sibling}function jO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?mx(e.parentNode,n):e.nodeType===1&&mx(e,n),ov(e)):mx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&F6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function TP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-z9?Gf(e,0):D9|=n),Io(e,t)}function eN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(jv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),eN(e,n)}var tN;tN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&iO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=A9(null,t,r,e,i,n);var o=M9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,k9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,I6(t,r,e,n),t=N6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&y9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=O6(null,t,r,e,n);break e;case 1:t=CP(null,t,r,e,n);break e;case 11:t=xP(null,t,r,e,n);break e;case 14:t=wP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),O6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),CP(e,t,r,i,n);case 3:e:{if(BO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,lO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=_P(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=_P(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=fO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return hO(t),e===null&&L6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,_6(r,i)?a=null:o!==null&&_6(r,o)&&(t.flags|=32),zO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&L6(t),null;case 13:return FO(e,t,n);case 4:return E9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),xP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),A6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),A6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),wP(e,t,r,i,n);case 15:return NO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),cO(t,r,i),I6(t,r,i,n),N6(null,t,r,!0,e,n);case 19:return $O(e,t,n);case 22:return DO(e,t,n)}throw Error(Ne(156,t.tag))};function nN(e,t){return TR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function H9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return H9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===a9)return 11;if(e===s9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")H9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case o9:a=8,i|=8;break;case n6:return e=Da(12,n,t,i|2),e.elementType=n6,e.lanes=o,e;case r6:return e=Da(13,n,t,i),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(19,n,t,i),e.elementType=i6,e.lanes=o,e;case dR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uR:a=10;break e;case cR:a=9;break e;case a9:a=11;break e;case s9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=dR,e.lanes=n,e.stateNode={isHidden:!1},e}function _x(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function kx(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ox(0),this.expirationTimes=ox(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ox(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function W9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},k9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Z7(Bl.exports);var DP=Bl.exports;e6.createRoot=DP.createRoot,e6.hydrateRoot=DP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function wx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function R6(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WX=typeof WeakMap=="function"?WeakMap:Map;function OO(e,t,n){n=yu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){I5||(I5=!0,V6=r),R6(e,t)},n}function NO(e,t,n){n=yu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){R6(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){R6(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function SP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WX;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nZ.bind(null,e,t,n),t.then(e,e))}function bP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xP(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yu(-1,1),t.tag=2,Xc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var VX=Mu.ReactCurrentOwner,Lo=!1;function eo(e,t,n,r){t.child=e===null?hO(t,null,n,r):V0(t,e.child,n,r)}function wP(e,t,n,r,i){n=n.render;var o=t.ref;return m0(t,i),r=A9(e,t,n,r,o,i),n=M9(),e!==null&&!Lo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cu(e,t,i)):(ir&&n&&y9(t),t.flags|=1,eo(e,t,r,i),t.child)}function CP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!H9(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,DO(e,t,o,r,i)):(e=O3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:sv,n(a,r)&&e.ref===t.ref)return Cu(e,t,i)}return t.flags|=1,e=Jc(o,r),e.ref=t.ref,e.return=t,t.child=e}function DO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(sv(o,r)&&e.ref===t.ref)if(Lo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Lo=!0);else return t.lanes=e.lanes,Cu(e,t,i)}return O6(e,t,n,r,i)}function zO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(e0,na),na|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qn(e0,na),na|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,qn(e0,na),na|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,qn(e0,na),na|=r;return eo(e,t,i,n),t.child}function BO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function O6(e,t,n,r,i){var o=Mo(n)?th:Vi.current;return o=H0(t,o),m0(t,i),n=A9(e,t,n,r,o,i),r=M9(),e!==null&&!Lo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cu(e,t,i)):(ir&&r&&y9(t),t.flags|=1,eo(e,t,n,i),t.child)}function _P(e,t,n,r,i){if(Mo(n)){var o=!0;w5(t)}else o=!1;if(m0(t,i),t.stateNode===null)M3(e,t),dO(t,n,r),I6(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=$a(u):(u=Mo(n)?th:Vi.current,u=H0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&gP(t,a,r,u),Rc=!1;var m=t.memoizedState;a.state=m,P5(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Ao.current||Rc?(typeof h=="function"&&(M6(t,n,h,r),l=t.memoizedState),(s=Rc||pP(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:gs(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=$a(l):(l=Mo(n)?th:Vi.current,l=H0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&gP(t,a,r,l),Rc=!1,m=t.memoizedState,a.state=m,P5(t,r,a,i);var S=t.memoizedState;s!==g||m!==S||Ao.current||Rc?(typeof v=="function"&&(M6(t,n,v,r),S=t.memoizedState),(u=Rc||pP(t,n,u,r,m,S,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,S,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,S,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),a.props=r,a.state=S,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return N6(e,t,n,r,o,i)}function N6(e,t,n,r,i,o){BO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&uP(t,n,!1),Cu(e,t,o);r=t.stateNode,VX.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=V0(t,e.child,null,o),t.child=V0(t,null,s,o)):eo(e,t,s,o),t.memoizedState=r.state,i&&uP(t,n,!0),t.child}function FO(e){var t=e.stateNode;t.pendingContext?lP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lP(e,t.context,!1),E9(e,t.containerInfo)}function kP(e,t,n,r,i){return W0(),b9(i),t.flags|=256,eo(e,t,n,r),t.child}var D6={dehydrated:null,treeContext:null,retryLane:0};function z6(e){return{baseLanes:e,cachePool:null,transitions:null}}function $O(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qn(cr,i&1),e===null)return L6(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=F4(a,r,0,null),e=jf(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=z6(n),t.memoizedState=D6,e):O9(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return UX(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Jc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Jc(s,o):(o=jf(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?z6(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=D6,r}return o=e.child,e=o.sibling,r=Jc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function O9(e,t){return t=F4({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wy(e,t,n,r){return r!==null&&b9(r),V0(t,e.child,null,n),e=O9(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UX(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=wx(Error(Ne(422))),wy(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=F4({mode:"visible",children:r.children},i,0,null),o=jf(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&V0(t,e.child,null,a),t.child.memoizedState=z6(a),t.memoizedState=D6,o);if((t.mode&1)===0)return wy(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ne(419)),r=wx(o,r,void 0),wy(e,t,a,r)}if(s=(a&e.childLanes)!==0,Lo||s){if(r=hi,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,wu(e,i),Cs(r,e,i,-1))}return $9(),r=wx(Error(Ne(421))),wy(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=rZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,aa=Kc(i.nextSibling),la=t,ir=!0,ys=null,e!==null&&(Ia[Ra++]=gu,Ia[Ra++]=mu,Ia[Ra++]=nh,gu=e.id,mu=e.overflow,nh=t),t=O9(t,r.children),t.flags|=4096,t)}function EP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),A6(e.return,t,n)}function Cx(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function HO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(eo(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EP(e,n,t);else if(e.tag===19)EP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&T5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cx(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&T5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cx(t,!0,n,null,o);break;case"together":Cx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function M3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ih|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=Jc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Jc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function GX(e,t,n){switch(t.tag){case 3:FO(t),W0();break;case 5:pO(t);break;case 1:Mo(t.type)&&w5(t);break;case 4:E9(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qn(k5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?$O(e,t,n):(qn(cr,cr.current&1),e=Cu(e,t,n),e!==null?e.sibling:null);qn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return HO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,zO(e,t,n)}return Cu(e,t,n)}var WO,B6,VO,UO;WO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};B6=function(){};VO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Df(_l.current);var o=null;switch(n){case"input":i=a6(e,i),r=a6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=u6(e,i),r=u6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=b5)}d6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ev.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ev.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Xn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};UO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hg(e,t){if(!ir)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jX(e,t,n){var r=t.pendingProps;switch(S9(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bi(t),null;case 1:return Mo(t.type)&&x5(),Bi(t),null;case 3:return r=t.stateNode,U0(),Qn(Ao),Qn(Vi),T9(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(by(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ys!==null&&(j6(ys),ys=null))),B6(e,t),Bi(t),null;case 5:P9(t);var i=Df(fv.current);if(n=t.type,e!==null&&t.stateNode!=null)VO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return Bi(t),null}if(e=Df(_l.current),by(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[vl]=t,r[cv]=o,e=(t.mode&1)!==0,n){case"dialog":Xn("cancel",r),Xn("close",r);break;case"iframe":case"object":case"embed":Xn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[cv]=r,WO(e,t,!1,!1),t.stateNode=e;e:{switch(a=f6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return F9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(S9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),T9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return P9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return C9(t.type._context),null;case 22:case 23:return F9(),null;case 24:return null;default:return null}}var Cy=!1,Hi=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function F6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PP=!1;function KX(e,t){if(w6=v5,e=qR(),v9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(C6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=PP,PP=!1,S}function Am(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&F6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GO(e){var t=e.alternate;t!==null&&(e.alternate=null,GO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[cv],delete t[E6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jO(e){return e.tag===5||e.tag===3||e.tag===4}function TP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function H6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(H6(e,t,n),e=e.sibling;e!==null;)H6(e,t,n),e=e.sibling}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)YO(e,t,n),n=n.sibling}function YO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?mx(e.parentNode,n):e.nodeType===1&&mx(e,n),ov(e)):mx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&F6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function LP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-z9?Gf(e,0):D9|=n),Io(e,t)}function tN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(jv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),tN(e,n)}var nN;nN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&oO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=A9(null,t,r,e,i,n);var o=M9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,k9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,I6(t,r,e,n),t=N6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&y9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=O6(null,t,r,e,n);break e;case 1:t=_P(null,t,r,e,n);break e;case 11:t=wP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),O6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),_P(e,t,r,i,n);case 3:e:{if(FO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=kP(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=hO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return pO(t),e===null&&L6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,_6(r,i)?a=null:o!==null&&_6(r,o)&&(t.flags|=32),BO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&L6(t),null;case 13:return $O(e,t,n);case 4:return E9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),wP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),A6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),A6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),CP(e,t,r,i,n);case 15:return DO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),dO(t,r,i),I6(t,r,i,n),N6(null,t,r,!0,e,n);case 19:return HO(e,t,n);case 22:return zO(e,t,n)}throw Error(Ne(156,t.tag))};function rN(e,t){return LR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function H9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return H9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===a9)return 11;if(e===s9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")H9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case o9:a=8,i|=8;break;case n6:return e=Da(12,n,t,i|2),e.elementType=n6,e.lanes=o,e;case r6:return e=Da(13,n,t,i),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(19,n,t,i),e.elementType=i6,e.lanes=o,e;case fR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cR:a=10;break e;case dR:a=9;break e;case a9:a=11;break e;case s9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=fR,e.lanes=n,e.stateNode={isHidden:!1},e}function _x(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function kx(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ox(0),this.expirationTimes=ox(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ox(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function W9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},k9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Z7(Bl.exports);var zP=Bl.exports;e6.createRoot=zP.createRoot,e6.hydrateRoot=zP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var hZ=C.exports,pZ=Symbol.for("react.element"),gZ=Symbol.for("react.fragment"),mZ=Object.prototype.hasOwnProperty,vZ=hZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yZ={key:!0,ref:!0,__self:!0,__source:!0};function aN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)mZ.call(t,r)&&!yZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:pZ,type:e,key:o,ref:a,props:i,_owner:vZ.current}}G4.Fragment=gZ;G4.jsx=aN;G4.jsxs=aN;(function(e){e.exports=G4})(U4);const Ln=U4.exports.Fragment,x=U4.exports.jsx,ee=U4.exports.jsxs;var j9=C.exports.createContext({});j9.displayName="ColorModeContext";function Xv(){const e=C.exports.useContext(j9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Py={light:"chakra-ui-light",dark:"chakra-ui-dark"};function SZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),zP=()=>{};function BP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function sN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>BP(a,s)),[h,g]=C.exports.useState(()=>BP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?zP:k,setColorMode:t?zP:P,forced:t!==void 0}),[E,k,P,t]);return x(j9.Provider,{value:T,children:n})}sN.displayName="ColorModeProvider";var Y6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ut=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,Ye=Array(U);++he-1}function M1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=A1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=M1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||U1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==S||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ut?et(ut):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?H1(U,!0):zs(U)}var cn=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function U1(){return!1}e.exports=cn})(Y6,Y6.exports);const xl=Y6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),FP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,q6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=FP(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=FP(s),i?`${s} !important`:s};function vv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=q6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=vv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?vv({scale:n,compose:r}):r}}var lN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...lN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...lN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},uN="& > :not(style) ~ :not(style)",RZ={[uN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[uN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},K6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(K6)),cN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||cN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in K6?K6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,S]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=dN(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var dN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||dN(e)||cN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:vv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},X6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(X6,{shadow:X6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:vv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:vv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var fN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ex=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Ex(t,e,n)}},Rm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Rm,{insetStart:Rm.insetInlineStart,insetEnd:Rm.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function hN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(hN).join(` ${e} `).replace(/calc/g,""),$P=(...e)=>`calc(${j4("+",...e)})`,HP=(...e)=>`calc(${j4("-",...e)})`,Z6=(...e)=>`calc(${j4("*",...e)})`,WP=(...e)=>`calc(${j4("/",...e)})`,VP=e=>{const t=hN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Z6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af($P(e,...t)),subtract:(...t)=>Af(HP(e,...t)),multiply:(...t)=>Af(Z6(e,...t)),divide:(...t)=>Af(WP(e,...t)),negate:()=>Af(VP(e)),toString:()=>e.toString()}),{add:$P,subtract:HP,multiply:Z6,divide:WP,negate:VP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Q6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var pN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Y9=e=>Object.fromEntries(Object.entries(e).sort(pN));function UP(e){const t=Y9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(Y9(e));return new Set(t)}function GP(e){if(!e)return e;e=Q6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function cm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Q6(e)})`),t&&n.push("and",`(max-width: ${Q6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=UP(e),n=Object.entries(e).sort(pN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?GP(u):void 0,{_minW:GP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:cm(null,u),minWQuery:cm(a),minMaxQuery:cm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:Y9(e),asArray:UP(e),details:n,media:[null,...t.map(o=>cm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>gN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>gN(t=>e(t,"~ &"),"[data-peer]",".peer"),gN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function jP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=jP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=jP(S,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(J6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(J6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function J6(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(J6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var q9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,fN,XZ,Rm,X6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,fN,Rm),kQ=Object.keys(_Q),EQ=[...Object.keys(q9),...pQ],PQ={...q9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let S=t[g];if(S===!0&&(S={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=zf(S?.property,r);if(!a&&S?.static){const P=zf(S.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var mN=e=>t=>OQ({theme:t,pseudos:Y4,configs:q9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||Sv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Zv(e,D3()+(t<6&&kl()==32&&ua()==32))}function tC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&tC(Hr);break;case 40:e===41&&tC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Zv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!Sv(kl());)ua();return Zv(e,No)}function tJ(e){return wN(B3("",null,null,null,[""],e=xN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(S=k,k=ua()){case 40:if(S!=108&&Ti(N,g-1)==58){eC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(S);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?qP(N+";",r,n,g-1):qP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=YP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(YP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:S===45&&hl(N)==2&&(w=0)}}return o}function YP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Z9(m),S=0,w=0,E=0;S0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?K9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,vN,q4(KQ()),yv(e,2,-2),0)}function qP(e,t,n,r){return X4(e,t,n,X9,yv(e,0,r),yv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Z9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~eC(e,"stretch")?_N(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~eC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Fi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case X9:t.return=_N(t.value,t.length);break;case yN:return y0([Vg(t,{value:wn(t.value,"@","@"+mn)})],i);case K9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Vg(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Vg(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},fJ=[dJ],kN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),BP=()=>{};function FP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function lN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>FP(a,s)),[h,g]=C.exports.useState(()=>FP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?BP:k,setColorMode:t?BP:P,forced:t!==void 0}),[E,k,P,t]);return x(j9.Provider,{value:T,children:n})}lN.displayName="ColorModeProvider";var Y6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ut=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,Ye=Array(U);++he-1}function M1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=A1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=M1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||U1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==S||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ut?et(ut):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?H1(U,!0):zs(U)}var cn=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function U1(){return!1}e.exports=cn})(Y6,Y6.exports);const xl=Y6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),$P=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,q6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=$P(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=$P(s),i?`${s} !important`:s};function vv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=q6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=vv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?vv({scale:n,compose:r}):r}}var uN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...uN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...uN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},cN="& > :not(style) ~ :not(style)",RZ={[cN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[cN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},K6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(K6)),dN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||dN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in K6?K6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,S]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=fN(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var fN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||fN(e)||dN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:vv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},X6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(X6,{shadow:X6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:vv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:vv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var hN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ex=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Ex(t,e,n)}},Rm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Rm,{insetStart:Rm.insetInlineStart,insetEnd:Rm.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function pN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(pN).join(` ${e} `).replace(/calc/g,""),HP=(...e)=>`calc(${j4("+",...e)})`,WP=(...e)=>`calc(${j4("-",...e)})`,Z6=(...e)=>`calc(${j4("*",...e)})`,VP=(...e)=>`calc(${j4("/",...e)})`,UP=e=>{const t=pN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Z6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(HP(e,...t)),subtract:(...t)=>Af(WP(e,...t)),multiply:(...t)=>Af(Z6(e,...t)),divide:(...t)=>Af(VP(e,...t)),negate:()=>Af(UP(e)),toString:()=>e.toString()}),{add:HP,subtract:WP,multiply:Z6,divide:VP,negate:UP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Q6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var gN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Y9=e=>Object.fromEntries(Object.entries(e).sort(gN));function GP(e){const t=Y9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(Y9(e));return new Set(t)}function jP(e){if(!e)return e;e=Q6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function cm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Q6(e)})`),t&&n.push("and",`(max-width: ${Q6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=GP(e),n=Object.entries(e).sort(gN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?jP(u):void 0,{_minW:jP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:cm(null,u),minWQuery:cm(a),minMaxQuery:cm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:Y9(e),asArray:GP(e),details:n,media:[null,...t.map(o=>cm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>mN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>mN(t=>e(t,"~ &"),"[data-peer]",".peer"),mN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function YP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=YP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=YP(S,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(J6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(J6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function J6(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(J6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var q9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,hN,XZ,Rm,X6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,hN,Rm),kQ=Object.keys(_Q),EQ=[...Object.keys(q9),...pQ],PQ={...q9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let S=t[g];if(S===!0&&(S={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=zf(S?.property,r);if(!a&&S?.static){const P=zf(S.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var vN=e=>t=>OQ({theme:t,pseudos:Y4,configs:q9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||Sv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Zv(e,D3()+(t<6&&kl()==32&&ua()==32))}function tC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&tC(Hr);break;case 40:e===41&&tC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Zv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!Sv(kl());)ua();return Zv(e,No)}function tJ(e){return CN(B3("",null,null,null,[""],e=wN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(S=k,k=ua()){case 40:if(S!=108&&Ti(N,g-1)==58){eC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(S);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?KP(N+";",r,n,g-1):KP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=qP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(qP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:S===45&&hl(N)==2&&(w=0)}}return o}function qP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Z9(m),S=0,w=0,E=0;S0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?K9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,yN,q4(KQ()),yv(e,2,-2),0)}function KP(e,t,n,r){return X4(e,t,n,X9,yv(e,0,r),yv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Z9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~eC(e,"stretch")?kN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~eC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Fi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case X9:t.return=kN(t.value,t.length);break;case SN:return y0([Vg(t,{value:wn(t.value,"@","@"+mn)})],i);case K9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Vg(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Vg(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},fJ=[dJ],EN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,IN=function(t){return t.charCodeAt(1)===45},ZP=function(t){return t!=null&&typeof t!="boolean"},Px=CN(function(e){return IN(e)?e:e.replace(_J,"-$&").toLowerCase()}),QP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!IN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,bv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},FN=UJ(VJ);function $N(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var HN=e=>$N(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function WN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=CN(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},nT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},rT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return AN(n,r,i),TJ(function(){return MN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=rT(t,n,r),l=s||nT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Mi(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function VN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function iT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Tx(s,a,e+1/3),i=Tx(s,a,e),o=Tx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function oT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var oC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=VN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Lx),rgba:new RegExp("rgba"+Ax),hsl:new RegExp("hsl"+Lx),hsla:new RegExp("hsla"+Ax),hsv:new RegExp("hsv"+Lx),hsva:new RegExp("hsva"+Ax),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(oC[e])e=oC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:sT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:sT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Qv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=VN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=iT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=iT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),aT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+aT(this.r,this.g,this.b,!1),n=0,r=Object.entries(oC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(UN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Qv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=GN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=GN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=YN.find(function(a){return a.name===e});if(n){var r=jN(n);if(r.hueRange)return r.hueRange}var i=new Qv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function GN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=YN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function jN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var YN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Qv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Qv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Qv(r).setAlpha(t).toRgbString()};function lT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var gi=typeof Symbol=="function"&&Symbol.for,Q9=gi?Symbol.for("react.element"):60103,J9=gi?Symbol.for("react.portal"):60106,Z4=gi?Symbol.for("react.fragment"):60107,Q4=gi?Symbol.for("react.strict_mode"):60108,J4=gi?Symbol.for("react.profiler"):60114,eS=gi?Symbol.for("react.provider"):60109,tS=gi?Symbol.for("react.context"):60110,e8=gi?Symbol.for("react.async_mode"):60111,nS=gi?Symbol.for("react.concurrent_mode"):60111,rS=gi?Symbol.for("react.forward_ref"):60112,iS=gi?Symbol.for("react.suspense"):60113,hJ=gi?Symbol.for("react.suspense_list"):60120,oS=gi?Symbol.for("react.memo"):60115,aS=gi?Symbol.for("react.lazy"):60116,pJ=gi?Symbol.for("react.block"):60121,gJ=gi?Symbol.for("react.fundamental"):60117,mJ=gi?Symbol.for("react.responder"):60118,vJ=gi?Symbol.for("react.scope"):60119;function va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Q9:switch(e=e.type,e){case e8:case nS:case Z4:case J4:case Q4:case iS:return e;default:switch(e=e&&e.$$typeof,e){case tS:case rS:case aS:case oS:case eS:return e;default:return t}}case J9:return t}}}function TN(e){return va(e)===nS}Mn.AsyncMode=e8;Mn.ConcurrentMode=nS;Mn.ContextConsumer=tS;Mn.ContextProvider=eS;Mn.Element=Q9;Mn.ForwardRef=rS;Mn.Fragment=Z4;Mn.Lazy=aS;Mn.Memo=oS;Mn.Portal=J9;Mn.Profiler=J4;Mn.StrictMode=Q4;Mn.Suspense=iS;Mn.isAsyncMode=function(e){return TN(e)||va(e)===e8};Mn.isConcurrentMode=TN;Mn.isContextConsumer=function(e){return va(e)===tS};Mn.isContextProvider=function(e){return va(e)===eS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q9};Mn.isForwardRef=function(e){return va(e)===rS};Mn.isFragment=function(e){return va(e)===Z4};Mn.isLazy=function(e){return va(e)===aS};Mn.isMemo=function(e){return va(e)===oS};Mn.isPortal=function(e){return va(e)===J9};Mn.isProfiler=function(e){return va(e)===J4};Mn.isStrictMode=function(e){return va(e)===Q4};Mn.isSuspense=function(e){return va(e)===iS};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Z4||e===nS||e===J4||e===Q4||e===iS||e===hJ||typeof e=="object"&&e!==null&&(e.$$typeof===aS||e.$$typeof===oS||e.$$typeof===eS||e.$$typeof===tS||e.$$typeof===rS||e.$$typeof===gJ||e.$$typeof===mJ||e.$$typeof===vJ||e.$$typeof===pJ)};Mn.typeOf=va;(function(e){e.exports=Mn})(PN);var LN=PN.exports,yJ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},SJ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},AN={};AN[LN.ForwardRef]=yJ;AN[LN.Memo]=SJ;var bJ=!0;function xJ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var MN=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||bJ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},IN=function(t,n,r){MN(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function wJ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,RN=function(t){return t.charCodeAt(1)===45},QP=function(t){return t!=null&&typeof t!="boolean"},Px=_N(function(e){return RN(e)?e:e.replace(_J,"-$&").toLowerCase()}),JP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!RN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,bv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},$N=UJ(VJ);function HN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var WN=e=>HN(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function VN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=_N(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},rT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},iT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return MN(n,r,i),TJ(function(){return IN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=iT(t,n,r),l=s||rT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Mi(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function UN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function oT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Tx(s,a,e+1/3),i=Tx(s,a,e),o=Tx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function aT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var oC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=UN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Lx),rgba:new RegExp("rgba"+Ax),hsl:new RegExp("hsl"+Lx),hsla:new RegExp("hsla"+Ax),hsv:new RegExp("hsv"+Lx),hsva:new RegExp("hsva"+Ax),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(oC[e])e=oC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:lT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:lT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Qv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=UN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=aT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=aT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),sT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+sT(this.r,this.g,this.b,!1),n=0,r=Object.entries(oC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(GN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Qv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=jN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=jN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=qN.find(function(a){return a.name===e});if(n){var r=YN(n);if(r.hueRange)return r.hueRange}var i=new Qv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function jN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=qN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function YN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var qN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Qv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Qv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Qv(r).setAlpha(t).toRgbString()};function uT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -53,12 +53,12 @@ Error generating stack: `+o.message+` ${t} 75%, transparent 75%, transparent - )`,backgroundSize:`${e} ${e}`}}function qee(e){const t=UN().toHexString();return!e||Gee(e)?t:e.string&&e.colors?Xee(e.string,e.colors):e.string&&!e.colors?Kee(e.string):e.colors&&!e.string?Zee(e.colors):t}function Kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Xee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function r8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Qee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function qN(e){return Qee(e)&&e.reference?e.reference:String(e)}var uS=(e,...t)=>t.map(qN).join(` ${e} `).replace(/calc/g,""),uT=(...e)=>`calc(${uS("+",...e)})`,cT=(...e)=>`calc(${uS("-",...e)})`,aC=(...e)=>`calc(${uS("*",...e)})`,dT=(...e)=>`calc(${uS("/",...e)})`,fT=e=>{const t=qN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:aC(t,-1)},pu=Object.assign(e=>({add:(...t)=>pu(uT(e,...t)),subtract:(...t)=>pu(cT(e,...t)),multiply:(...t)=>pu(aC(e,...t)),divide:(...t)=>pu(dT(e,...t)),negate:()=>pu(fT(e)),toString:()=>e.toString()}),{add:uT,subtract:cT,multiply:aC,divide:dT,negate:fT});function Jee(e){return!Number.isInteger(parseFloat(e.toString()))}function ete(e,t="-"){return e.replace(/\s+/g,t)}function KN(e){const t=ete(e.toString());return t.includes("\\.")?e:Jee(e)?t.replace(".","\\."):e}function tte(e,t=""){return[t,KN(e)].filter(Boolean).join("-")}function nte(e,t){return`var(${KN(e)}${t?`, ${t}`:""})`}function rte(e,t=""){return`--${tte(e,t)}`}function ni(e,t){const n=rte(e,t?.prefix);return{variable:n,reference:nte(n,ite(t?.fallback))}}function ite(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ote,defineMultiStyleConfig:ate}=Jn(nee.keys),ste={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ute={pt:"2",px:"4",pb:"5"},cte={fontSize:"1.25em"},dte=ote({container:ste,button:lte,panel:ute,icon:cte}),fte=ate({baseStyle:dte}),{definePartsStyle:Jv,defineMultiStyleConfig:hte}=Jn(ree.keys),ca=zn("alert-fg"),_u=zn("alert-bg"),pte=Jv({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function i8(e){const{theme:t,colorScheme:n}=e,r=q0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var gte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),mte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ca.reference}}}),vte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ca.reference}}}),yte=Jv(e=>{const{colorScheme:t}=e;return{container:{[ca.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ca.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ca.reference}}}),Ste={subtle:gte,"left-accent":mte,"top-accent":vte,solid:yte},bte=hte({baseStyle:pte,variants:Ste,defaultProps:{variant:"subtle",colorScheme:"blue"}}),XN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},wte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Cte={...XN,...xte,container:wte},ZN=Cte,_te=e=>typeof e=="function";function io(e,...t){return _te(e)?e(...t):e}var{definePartsStyle:QN,defineMultiStyleConfig:kte}=Jn(iee.keys),S0=zn("avatar-border-color"),Mx=zn("avatar-bg"),Ete={borderRadius:"full",border:"0.2em solid",[S0.variable]:"white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference},Pte={[Mx.variable]:"colors.gray.200",_dark:{[Mx.variable]:"colors.whiteAlpha.400"},bgColor:Mx.reference},hT=zn("avatar-background"),Tte=e=>{const{name:t,theme:n}=e,r=t?qee({string:t}):"colors.gray.400",i=Yee(r)(n);let o="white";return i||(o="gray.800"),{bg:hT.reference,"&:not([data-loaded])":{[hT.variable]:r},color:o,[S0.variable]:"colors.white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference,verticalAlign:"top"}},Lte=QN(e=>({badge:io(Ete,e),excessLabel:io(Pte,e),container:io(Tte,e)}));function Pc(e){const t=e!=="100%"?ZN[e]:void 0;return QN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Ate={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Mte=kte({baseStyle:Lte,sizes:Ate,defaultProps:{size:"md"}}),Ite={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},b0=zn("badge-bg"),wl=zn("badge-color"),Rte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.500`,.6)(n);return{[b0.variable]:`colors.${t}.500`,[wl.variable]:"colors.white",_dark:{[b0.variable]:r,[wl.variable]:"colors.whiteAlpha.800"},bg:b0.reference,color:wl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.16)(n);return{[b0.variable]:`colors.${t}.100`,[wl.variable]:`colors.${t}.800`,_dark:{[b0.variable]:r,[wl.variable]:`colors.${t}.200`},bg:b0.reference,color:wl.reference}},Nte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.8)(n);return{[wl.variable]:`colors.${t}.500`,_dark:{[wl.variable]:r},color:wl.reference,boxShadow:`inset 0 0 0px 1px ${wl.reference}`}},Dte={solid:Rte,subtle:Ote,outline:Nte},Nm={baseStyle:Ite,variants:Dte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:zte,definePartsStyle:Bte}=Jn(oee.keys),Fte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$te=Bte({link:Fte}),Hte=zte({baseStyle:$te}),Wte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},JN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:yt("inherit","whiteAlpha.900")(e),_hover:{bg:yt("gray.100","whiteAlpha.200")(e)},_active:{bg:yt("gray.200","whiteAlpha.300")(e)}};const r=q0(`${t}.200`,.12)(n),i=q0(`${t}.200`,.24)(n);return{color:yt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:yt(`${t}.50`,r)(e)},_active:{bg:yt(`${t}.100`,i)(e)}}},Vte=e=>{const{colorScheme:t}=e,n=yt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(JN,e)}},Ute={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=yt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:yt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:yt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Ute[t]??{},a=yt(n,`${t}.200`)(e);return{bg:a,color:yt(r,"gray.800")(e),_hover:{bg:yt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:yt(o,`${t}.400`)(e)}}},jte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:yt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:yt(`${t}.700`,`${t}.500`)(e)}}},Yte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},qte={ghost:JN,outline:Vte,solid:Gte,link:jte,unstyled:Yte},Kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xte={baseStyle:Wte,variants:qte,sizes:Kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:Zte}=Jn(Eee.keys),F5=zn("card-bg"),x0=zn("card-padding"),Qte=Yf({container:{[F5.variable]:"chakra-body-bg",backgroundColor:F5.reference,color:"chakra-body-text"},body:{padding:x0.reference,flex:"1 1 0%"},header:{padding:x0.reference},footer:{padding:x0.reference}}),Jte={sm:Yf({container:{borderRadius:"base",[x0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[x0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[x0.variable]:"space.7"}})},ene={elevated:Yf({container:{boxShadow:"base",_dark:{[F5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[F5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},tne=Zte({baseStyle:Qte,variants:ene,sizes:Jte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:F3,defineMultiStyleConfig:nne}=Jn(aee.keys),Dm=zn("checkbox-size"),rne=e=>{const{colorScheme:t}=e;return{w:Dm.reference,h:Dm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e),_hover:{bg:yt(`${t}.600`,`${t}.300`)(e),borderColor:yt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:yt("gray.200","transparent")(e),bg:yt("gray.200","whiteAlpha.300")(e),color:yt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e)},_disabled:{bg:yt("gray.100","whiteAlpha.100")(e),borderColor:yt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:yt("red.500","red.300")(e)}}},ine={_disabled:{cursor:"not-allowed"}},one={userSelect:"none",_disabled:{opacity:.4}},ane={transitionProperty:"transform",transitionDuration:"normal"},sne=F3(e=>({icon:ane,container:ine,control:io(rne,e),label:one})),lne={sm:F3({control:{[Dm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:F3({control:{[Dm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:F3({control:{[Dm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},$5=nne({baseStyle:sne,sizes:lne,defaultProps:{size:"md",colorScheme:"blue"}}),zm=ni("close-button-size"),Ug=ni("close-button-bg"),une={w:[zm.reference],h:[zm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ug.variable]:"colors.blackAlpha.100",_dark:{[Ug.variable]:"colors.whiteAlpha.100"}},_active:{[Ug.variable]:"colors.blackAlpha.200",_dark:{[Ug.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ug.reference},cne={lg:{[zm.variable]:"sizes.10",fontSize:"md"},md:{[zm.variable]:"sizes.8",fontSize:"xs"},sm:{[zm.variable]:"sizes.6",fontSize:"2xs"}},dne={baseStyle:une,sizes:cne,defaultProps:{size:"md"}},{variants:fne,defaultProps:hne}=Nm,pne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},gne={baseStyle:pne,variants:fne,defaultProps:hne},mne={w:"100%",mx:"auto",maxW:"prose",px:"4"},vne={baseStyle:mne},yne={opacity:.6,borderColor:"inherit"},Sne={borderStyle:"solid"},bne={borderStyle:"dashed"},xne={solid:Sne,dashed:bne},wne={baseStyle:yne,variants:xne,defaultProps:{variant:"solid"}},{definePartsStyle:sC,defineMultiStyleConfig:Cne}=Jn(see.keys),Ix=zn("drawer-bg"),Rx=zn("drawer-box-shadow");function Ep(e){return sC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var _ne={bg:"blackAlpha.600",zIndex:"overlay"},kne={display:"flex",zIndex:"modal",justifyContent:"center"},Ene=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ix.variable]:"colors.white",[Rx.variable]:"shadows.lg",_dark:{[Ix.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},bg:Ix.reference,boxShadow:Rx.reference}},Pne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tne={position:"absolute",top:"2",insetEnd:"3"},Lne={px:"6",py:"2",flex:"1",overflow:"auto"},Ane={px:"6",py:"4"},Mne=sC(e=>({overlay:_ne,dialogContainer:kne,dialog:io(Ene,e),header:Pne,closeButton:Tne,body:Lne,footer:Ane})),Ine={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Rne=Cne({baseStyle:Mne,sizes:Ine,defaultProps:{size:"xs"}}),{definePartsStyle:One,defineMultiStyleConfig:Nne}=Jn(lee.keys),Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},zne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Bne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fne=One({preview:Dne,input:zne,textarea:Bne}),$ne=Nne({baseStyle:Fne}),{definePartsStyle:Hne,defineMultiStyleConfig:Wne}=Jn(uee.keys),w0=zn("form-control-color"),Vne={marginStart:"1",[w0.variable]:"colors.red.500",_dark:{[w0.variable]:"colors.red.300"},color:w0.reference},Une={mt:"2",[w0.variable]:"colors.gray.600",_dark:{[w0.variable]:"colors.whiteAlpha.600"},color:w0.reference,lineHeight:"normal",fontSize:"sm"},Gne=Hne({container:{width:"100%",position:"relative"},requiredIndicator:Vne,helperText:Une}),jne=Wne({baseStyle:Gne}),{definePartsStyle:Yne,defineMultiStyleConfig:qne}=Jn(cee.keys),C0=zn("form-error-color"),Kne={[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Xne={marginEnd:"0.5em",[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference},Zne=Yne({text:Kne,icon:Xne}),Qne=qne({baseStyle:Zne}),Jne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},ere={baseStyle:Jne},tre={fontFamily:"heading",fontWeight:"bold"},nre={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},rre={baseStyle:tre,sizes:nre,defaultProps:{size:"xl"}},{definePartsStyle:vu,defineMultiStyleConfig:ire}=Jn(dee.keys),ore=vu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},are={lg:vu({field:Tc.lg,addon:Tc.lg}),md:vu({field:Tc.md,addon:Tc.md}),sm:vu({field:Tc.sm,addon:Tc.sm}),xs:vu({field:Tc.xs,addon:Tc.xs})};function o8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||yt("blue.500","blue.300")(e),errorBorderColor:n||yt("red.500","red.300")(e)}}var sre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:yt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:yt("inherit","whiteAlpha.50")(e),bg:yt("gray.100","whiteAlpha.300")(e)}}}),lre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e),_hover:{bg:yt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e)}}}),ure=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cre=vu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dre={outline:sre,filled:lre,flushed:ure,unstyled:cre},vn=ire({baseStyle:ore,sizes:are,variants:dre,defaultProps:{size:"md",variant:"outline"}}),Ox=zn("kbd-bg"),fre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hre={baseStyle:fre},pre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gre={baseStyle:pre},{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(fee.keys),yre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Sre=vre({icon:yre}),bre=mre({baseStyle:Sre}),{defineMultiStyleConfig:xre,definePartsStyle:wre}=Jn(hee.keys),fl=zn("menu-bg"),Nx=zn("menu-shadow"),Cre={[fl.variable]:"#fff",[Nx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Nx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Nx.reference},_re={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},kre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ere={opacity:.6},Pre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tre={transitionProperty:"common",transitionDuration:"normal"},Lre=wre({button:Tre,list:Cre,item:_re,groupTitle:kre,command:Ere,divider:Pre}),Are=xre({baseStyle:Lre}),{defineMultiStyleConfig:Mre,definePartsStyle:lC}=Jn(pee.keys),Ire={bg:"blackAlpha.600",zIndex:"modal"},Rre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:yt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:yt("lg","dark-lg")(e)}},Nre={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Dre={position:"absolute",top:"2",insetEnd:"3"},zre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bre={px:"6",py:"4"},Fre=lC(e=>({overlay:Ire,dialogContainer:io(Rre,e),dialog:io(Ore,e),header:Nre,closeButton:Dre,body:io(zre,e),footer:Bre}));function fs(e){return lC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var $re={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Hre=Mre({baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}}),Wre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},eD=Wre,{defineMultiStyleConfig:Vre,definePartsStyle:tD}=Jn(gee.keys),a8=ni("number-input-stepper-width"),nD=ni("number-input-input-padding"),Ure=pu(a8).add("0.5rem").toString(),Dx=ni("number-input-bg"),zx=ni("number-input-color"),Bx=ni("number-input-border-color"),Gre={[a8.variable]:"sizes.6",[nD.variable]:Ure},jre=e=>{var t;return((t=io(vn.baseStyle,e))==null?void 0:t.field)??{}},Yre={width:a8.reference},qre={borderStart:"1px solid",borderStartColor:Bx.reference,color:zx.reference,bg:Dx.reference,[zx.variable]:"colors.chakra-body-text",[Bx.variable]:"colors.chakra-border-color",_dark:{[zx.variable]:"colors.whiteAlpha.800",[Bx.variable]:"colors.whiteAlpha.300"},_active:{[Dx.variable]:"colors.gray.200",_dark:{[Dx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Kre=tD(e=>({root:Gre,field:io(jre,e)??{},stepperGroup:Yre,stepper:qre}));function Iy(e){var t,n;const r=(t=vn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=eD.fontSizes[o];return tD({field:{...r.field,paddingInlineEnd:nD.reference,verticalAlign:"top"},stepper:{fontSize:pu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Xre={xs:Iy("xs"),sm:Iy("sm"),md:Iy("md"),lg:Iy("lg")},Zre=Vre({baseStyle:Kre,sizes:Xre,variants:vn.variants,defaultProps:vn.defaultProps}),pT,Qre={...(pT=vn.baseStyle)==null?void 0:pT.field,textAlign:"center"},Jre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},gT,eie={outline:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((gT=vn.variants)==null?void 0:gT.unstyled.field)??{}},tie={baseStyle:Qre,sizes:Jre,variants:eie,defaultProps:vn.defaultProps},{defineMultiStyleConfig:nie,definePartsStyle:rie}=Jn(mee.keys),Ry=ni("popper-bg"),iie=ni("popper-arrow-bg"),mT=ni("popper-arrow-shadow-color"),oie={zIndex:10},aie={[Ry.variable]:"colors.white",bg:Ry.reference,[iie.variable]:Ry.reference,[mT.variable]:"colors.gray.200",_dark:{[Ry.variable]:"colors.gray.700",[mT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sie={px:3,py:2,borderBottomWidth:"1px"},lie={px:3,py:2},uie={px:3,py:2,borderTopWidth:"1px"},cie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},die=rie({popper:oie,content:aie,header:sie,body:lie,footer:uie,closeButton:cie}),fie=nie({baseStyle:die}),{defineMultiStyleConfig:hie,definePartsStyle:dm}=Jn(vee.keys),pie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=yt(lT(),lT("1rem","rgba(0,0,0,0.1)"))(e),a=yt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + )`,backgroundSize:`${e} ${e}`}}function qee(e){const t=GN().toHexString();return!e||Gee(e)?t:e.string&&e.colors?Xee(e.string,e.colors):e.string&&!e.colors?Kee(e.string):e.colors&&!e.string?Zee(e.colors):t}function Kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Xee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function r8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Qee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function KN(e){return Qee(e)&&e.reference?e.reference:String(e)}var uS=(e,...t)=>t.map(KN).join(` ${e} `).replace(/calc/g,""),cT=(...e)=>`calc(${uS("+",...e)})`,dT=(...e)=>`calc(${uS("-",...e)})`,aC=(...e)=>`calc(${uS("*",...e)})`,fT=(...e)=>`calc(${uS("/",...e)})`,hT=e=>{const t=KN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:aC(t,-1)},pu=Object.assign(e=>({add:(...t)=>pu(cT(e,...t)),subtract:(...t)=>pu(dT(e,...t)),multiply:(...t)=>pu(aC(e,...t)),divide:(...t)=>pu(fT(e,...t)),negate:()=>pu(hT(e)),toString:()=>e.toString()}),{add:cT,subtract:dT,multiply:aC,divide:fT,negate:hT});function Jee(e){return!Number.isInteger(parseFloat(e.toString()))}function ete(e,t="-"){return e.replace(/\s+/g,t)}function XN(e){const t=ete(e.toString());return t.includes("\\.")?e:Jee(e)?t.replace(".","\\."):e}function tte(e,t=""){return[t,XN(e)].filter(Boolean).join("-")}function nte(e,t){return`var(${XN(e)}${t?`, ${t}`:""})`}function rte(e,t=""){return`--${tte(e,t)}`}function ni(e,t){const n=rte(e,t?.prefix);return{variable:n,reference:nte(n,ite(t?.fallback))}}function ite(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ote,defineMultiStyleConfig:ate}=Jn(nee.keys),ste={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ute={pt:"2",px:"4",pb:"5"},cte={fontSize:"1.25em"},dte=ote({container:ste,button:lte,panel:ute,icon:cte}),fte=ate({baseStyle:dte}),{definePartsStyle:Jv,defineMultiStyleConfig:hte}=Jn(ree.keys),ca=zn("alert-fg"),_u=zn("alert-bg"),pte=Jv({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function i8(e){const{theme:t,colorScheme:n}=e,r=q0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var gte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),mte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ca.reference}}}),vte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ca.reference}}}),yte=Jv(e=>{const{colorScheme:t}=e;return{container:{[ca.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ca.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ca.reference}}}),Ste={subtle:gte,"left-accent":mte,"top-accent":vte,solid:yte},bte=hte({baseStyle:pte,variants:Ste,defaultProps:{variant:"subtle",colorScheme:"blue"}}),ZN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},wte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Cte={...ZN,...xte,container:wte},QN=Cte,_te=e=>typeof e=="function";function io(e,...t){return _te(e)?e(...t):e}var{definePartsStyle:JN,defineMultiStyleConfig:kte}=Jn(iee.keys),S0=zn("avatar-border-color"),Mx=zn("avatar-bg"),Ete={borderRadius:"full",border:"0.2em solid",[S0.variable]:"white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference},Pte={[Mx.variable]:"colors.gray.200",_dark:{[Mx.variable]:"colors.whiteAlpha.400"},bgColor:Mx.reference},pT=zn("avatar-background"),Tte=e=>{const{name:t,theme:n}=e,r=t?qee({string:t}):"colors.gray.400",i=Yee(r)(n);let o="white";return i||(o="gray.800"),{bg:pT.reference,"&:not([data-loaded])":{[pT.variable]:r},color:o,[S0.variable]:"colors.white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference,verticalAlign:"top"}},Lte=JN(e=>({badge:io(Ete,e),excessLabel:io(Pte,e),container:io(Tte,e)}));function Pc(e){const t=e!=="100%"?QN[e]:void 0;return JN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Ate={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Mte=kte({baseStyle:Lte,sizes:Ate,defaultProps:{size:"md"}}),Ite={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},b0=zn("badge-bg"),wl=zn("badge-color"),Rte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.500`,.6)(n);return{[b0.variable]:`colors.${t}.500`,[wl.variable]:"colors.white",_dark:{[b0.variable]:r,[wl.variable]:"colors.whiteAlpha.800"},bg:b0.reference,color:wl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.16)(n);return{[b0.variable]:`colors.${t}.100`,[wl.variable]:`colors.${t}.800`,_dark:{[b0.variable]:r,[wl.variable]:`colors.${t}.200`},bg:b0.reference,color:wl.reference}},Nte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.8)(n);return{[wl.variable]:`colors.${t}.500`,_dark:{[wl.variable]:r},color:wl.reference,boxShadow:`inset 0 0 0px 1px ${wl.reference}`}},Dte={solid:Rte,subtle:Ote,outline:Nte},Nm={baseStyle:Ite,variants:Dte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:zte,definePartsStyle:Bte}=Jn(oee.keys),Fte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$te=Bte({link:Fte}),Hte=zte({baseStyle:$te}),Wte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},eD=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:yt("inherit","whiteAlpha.900")(e),_hover:{bg:yt("gray.100","whiteAlpha.200")(e)},_active:{bg:yt("gray.200","whiteAlpha.300")(e)}};const r=q0(`${t}.200`,.12)(n),i=q0(`${t}.200`,.24)(n);return{color:yt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:yt(`${t}.50`,r)(e)},_active:{bg:yt(`${t}.100`,i)(e)}}},Vte=e=>{const{colorScheme:t}=e,n=yt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(eD,e)}},Ute={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=yt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:yt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:yt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Ute[t]??{},a=yt(n,`${t}.200`)(e);return{bg:a,color:yt(r,"gray.800")(e),_hover:{bg:yt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:yt(o,`${t}.400`)(e)}}},jte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:yt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:yt(`${t}.700`,`${t}.500`)(e)}}},Yte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},qte={ghost:eD,outline:Vte,solid:Gte,link:jte,unstyled:Yte},Kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xte={baseStyle:Wte,variants:qte,sizes:Kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:Zte}=Jn(Eee.keys),F5=zn("card-bg"),x0=zn("card-padding"),Qte=Yf({container:{[F5.variable]:"chakra-body-bg",backgroundColor:F5.reference,color:"chakra-body-text"},body:{padding:x0.reference,flex:"1 1 0%"},header:{padding:x0.reference},footer:{padding:x0.reference}}),Jte={sm:Yf({container:{borderRadius:"base",[x0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[x0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[x0.variable]:"space.7"}})},ene={elevated:Yf({container:{boxShadow:"base",_dark:{[F5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[F5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},tne=Zte({baseStyle:Qte,variants:ene,sizes:Jte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:F3,defineMultiStyleConfig:nne}=Jn(aee.keys),Dm=zn("checkbox-size"),rne=e=>{const{colorScheme:t}=e;return{w:Dm.reference,h:Dm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e),_hover:{bg:yt(`${t}.600`,`${t}.300`)(e),borderColor:yt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:yt("gray.200","transparent")(e),bg:yt("gray.200","whiteAlpha.300")(e),color:yt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e)},_disabled:{bg:yt("gray.100","whiteAlpha.100")(e),borderColor:yt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:yt("red.500","red.300")(e)}}},ine={_disabled:{cursor:"not-allowed"}},one={userSelect:"none",_disabled:{opacity:.4}},ane={transitionProperty:"transform",transitionDuration:"normal"},sne=F3(e=>({icon:ane,container:ine,control:io(rne,e),label:one})),lne={sm:F3({control:{[Dm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:F3({control:{[Dm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:F3({control:{[Dm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},$5=nne({baseStyle:sne,sizes:lne,defaultProps:{size:"md",colorScheme:"blue"}}),zm=ni("close-button-size"),Ug=ni("close-button-bg"),une={w:[zm.reference],h:[zm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ug.variable]:"colors.blackAlpha.100",_dark:{[Ug.variable]:"colors.whiteAlpha.100"}},_active:{[Ug.variable]:"colors.blackAlpha.200",_dark:{[Ug.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ug.reference},cne={lg:{[zm.variable]:"sizes.10",fontSize:"md"},md:{[zm.variable]:"sizes.8",fontSize:"xs"},sm:{[zm.variable]:"sizes.6",fontSize:"2xs"}},dne={baseStyle:une,sizes:cne,defaultProps:{size:"md"}},{variants:fne,defaultProps:hne}=Nm,pne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},gne={baseStyle:pne,variants:fne,defaultProps:hne},mne={w:"100%",mx:"auto",maxW:"prose",px:"4"},vne={baseStyle:mne},yne={opacity:.6,borderColor:"inherit"},Sne={borderStyle:"solid"},bne={borderStyle:"dashed"},xne={solid:Sne,dashed:bne},wne={baseStyle:yne,variants:xne,defaultProps:{variant:"solid"}},{definePartsStyle:sC,defineMultiStyleConfig:Cne}=Jn(see.keys),Ix=zn("drawer-bg"),Rx=zn("drawer-box-shadow");function Ep(e){return sC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var _ne={bg:"blackAlpha.600",zIndex:"overlay"},kne={display:"flex",zIndex:"modal",justifyContent:"center"},Ene=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ix.variable]:"colors.white",[Rx.variable]:"shadows.lg",_dark:{[Ix.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},bg:Ix.reference,boxShadow:Rx.reference}},Pne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tne={position:"absolute",top:"2",insetEnd:"3"},Lne={px:"6",py:"2",flex:"1",overflow:"auto"},Ane={px:"6",py:"4"},Mne=sC(e=>({overlay:_ne,dialogContainer:kne,dialog:io(Ene,e),header:Pne,closeButton:Tne,body:Lne,footer:Ane})),Ine={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Rne=Cne({baseStyle:Mne,sizes:Ine,defaultProps:{size:"xs"}}),{definePartsStyle:One,defineMultiStyleConfig:Nne}=Jn(lee.keys),Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},zne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Bne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fne=One({preview:Dne,input:zne,textarea:Bne}),$ne=Nne({baseStyle:Fne}),{definePartsStyle:Hne,defineMultiStyleConfig:Wne}=Jn(uee.keys),w0=zn("form-control-color"),Vne={marginStart:"1",[w0.variable]:"colors.red.500",_dark:{[w0.variable]:"colors.red.300"},color:w0.reference},Une={mt:"2",[w0.variable]:"colors.gray.600",_dark:{[w0.variable]:"colors.whiteAlpha.600"},color:w0.reference,lineHeight:"normal",fontSize:"sm"},Gne=Hne({container:{width:"100%",position:"relative"},requiredIndicator:Vne,helperText:Une}),jne=Wne({baseStyle:Gne}),{definePartsStyle:Yne,defineMultiStyleConfig:qne}=Jn(cee.keys),C0=zn("form-error-color"),Kne={[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Xne={marginEnd:"0.5em",[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference},Zne=Yne({text:Kne,icon:Xne}),Qne=qne({baseStyle:Zne}),Jne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},ere={baseStyle:Jne},tre={fontFamily:"heading",fontWeight:"bold"},nre={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},rre={baseStyle:tre,sizes:nre,defaultProps:{size:"xl"}},{definePartsStyle:vu,defineMultiStyleConfig:ire}=Jn(dee.keys),ore=vu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},are={lg:vu({field:Tc.lg,addon:Tc.lg}),md:vu({field:Tc.md,addon:Tc.md}),sm:vu({field:Tc.sm,addon:Tc.sm}),xs:vu({field:Tc.xs,addon:Tc.xs})};function o8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||yt("blue.500","blue.300")(e),errorBorderColor:n||yt("red.500","red.300")(e)}}var sre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:yt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:yt("inherit","whiteAlpha.50")(e),bg:yt("gray.100","whiteAlpha.300")(e)}}}),lre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e),_hover:{bg:yt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e)}}}),ure=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cre=vu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dre={outline:sre,filled:lre,flushed:ure,unstyled:cre},vn=ire({baseStyle:ore,sizes:are,variants:dre,defaultProps:{size:"md",variant:"outline"}}),Ox=zn("kbd-bg"),fre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hre={baseStyle:fre},pre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gre={baseStyle:pre},{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(fee.keys),yre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Sre=vre({icon:yre}),bre=mre({baseStyle:Sre}),{defineMultiStyleConfig:xre,definePartsStyle:wre}=Jn(hee.keys),fl=zn("menu-bg"),Nx=zn("menu-shadow"),Cre={[fl.variable]:"#fff",[Nx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Nx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Nx.reference},_re={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},kre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ere={opacity:.6},Pre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tre={transitionProperty:"common",transitionDuration:"normal"},Lre=wre({button:Tre,list:Cre,item:_re,groupTitle:kre,command:Ere,divider:Pre}),Are=xre({baseStyle:Lre}),{defineMultiStyleConfig:Mre,definePartsStyle:lC}=Jn(pee.keys),Ire={bg:"blackAlpha.600",zIndex:"modal"},Rre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:yt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:yt("lg","dark-lg")(e)}},Nre={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Dre={position:"absolute",top:"2",insetEnd:"3"},zre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bre={px:"6",py:"4"},Fre=lC(e=>({overlay:Ire,dialogContainer:io(Rre,e),dialog:io(Ore,e),header:Nre,closeButton:Dre,body:io(zre,e),footer:Bre}));function fs(e){return lC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var $re={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Hre=Mre({baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}}),Wre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},tD=Wre,{defineMultiStyleConfig:Vre,definePartsStyle:nD}=Jn(gee.keys),a8=ni("number-input-stepper-width"),rD=ni("number-input-input-padding"),Ure=pu(a8).add("0.5rem").toString(),Dx=ni("number-input-bg"),zx=ni("number-input-color"),Bx=ni("number-input-border-color"),Gre={[a8.variable]:"sizes.6",[rD.variable]:Ure},jre=e=>{var t;return((t=io(vn.baseStyle,e))==null?void 0:t.field)??{}},Yre={width:a8.reference},qre={borderStart:"1px solid",borderStartColor:Bx.reference,color:zx.reference,bg:Dx.reference,[zx.variable]:"colors.chakra-body-text",[Bx.variable]:"colors.chakra-border-color",_dark:{[zx.variable]:"colors.whiteAlpha.800",[Bx.variable]:"colors.whiteAlpha.300"},_active:{[Dx.variable]:"colors.gray.200",_dark:{[Dx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Kre=nD(e=>({root:Gre,field:io(jre,e)??{},stepperGroup:Yre,stepper:qre}));function Iy(e){var t,n;const r=(t=vn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=tD.fontSizes[o];return nD({field:{...r.field,paddingInlineEnd:rD.reference,verticalAlign:"top"},stepper:{fontSize:pu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Xre={xs:Iy("xs"),sm:Iy("sm"),md:Iy("md"),lg:Iy("lg")},Zre=Vre({baseStyle:Kre,sizes:Xre,variants:vn.variants,defaultProps:vn.defaultProps}),gT,Qre={...(gT=vn.baseStyle)==null?void 0:gT.field,textAlign:"center"},Jre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},mT,eie={outline:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((mT=vn.variants)==null?void 0:mT.unstyled.field)??{}},tie={baseStyle:Qre,sizes:Jre,variants:eie,defaultProps:vn.defaultProps},{defineMultiStyleConfig:nie,definePartsStyle:rie}=Jn(mee.keys),Ry=ni("popper-bg"),iie=ni("popper-arrow-bg"),vT=ni("popper-arrow-shadow-color"),oie={zIndex:10},aie={[Ry.variable]:"colors.white",bg:Ry.reference,[iie.variable]:Ry.reference,[vT.variable]:"colors.gray.200",_dark:{[Ry.variable]:"colors.gray.700",[vT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sie={px:3,py:2,borderBottomWidth:"1px"},lie={px:3,py:2},uie={px:3,py:2,borderTopWidth:"1px"},cie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},die=rie({popper:oie,content:aie,header:sie,body:lie,footer:uie,closeButton:cie}),fie=nie({baseStyle:die}),{defineMultiStyleConfig:hie,definePartsStyle:dm}=Jn(vee.keys),pie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=yt(uT(),uT("1rem","rgba(0,0,0,0.1)"))(e),a=yt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${to(n,a)} 50%, transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=dm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:dm({track:{h:"1"}}),sm:dm({track:{h:"2"}}),md:dm({track:{h:"3"}}),lg:dm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),vT,Tie={...(vT=vn.baseStyle)==null?void 0:vT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},yT,ST,bT,xT,wT,CT,_T,kT,Mie={lg:{...(yT=vn.sizes)==null?void 0:yT.lg,field:{...(ST=vn.sizes)==null?void 0:ST.lg.field,...Ny}},md:{...(bT=vn.sizes)==null?void 0:bT.md,field:{...(xT=vn.sizes)==null?void 0:xT.md.field,...Ny}},sm:{...(wT=vn.sizes)==null?void 0:wT.sm,field:{...(CT=vn.sizes)==null?void 0:CT.sm.field,...Ny}},xs:{...(_T=vn.sizes)==null?void 0:_T.xs,field:{...(kT=vn.sizes)==null?void 0:kT.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),Fx=zn("skeleton-start-color"),$x=zn("skeleton-end-color"),Rie={[Fx.variable]:"colors.gray.100",[$x.variable]:"colors.gray.400",_dark:{[Fx.variable]:"colors.gray.800",[$x.variable]:"colors.gray.600"},background:Fx.reference,borderColor:$x.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Hx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Hx.variable]:"colors.white",_dark:{[Hx.variable]:"colors.gray.700"},bg:Hx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),Cv=zn("slider-thumb-size"),_v=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...r8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...r8({orientation:e.orientation,horizontal:{h:_v.reference},vertical:{w:_v.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...r8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Cv.reference,h:Cv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[Cv.variable]:"sizes.4",[_v.variable]:"sizes.1"}}),Uie=cS({container:{[Cv.variable]:"sizes.3.5",[_v.variable]:"sizes.1"}}),Gie=cS({container:{[Cv.variable]:"sizes.2.5",[_v.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:rD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=rD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:rD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Bm=ni("switch-track-width"),qf=ni("switch-track-height"),Wx=ni("switch-track-diff"),aoe=pu.subtract(Bm,qf),uC=ni("switch-thumb-x"),Gg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Bm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[Gg.variable]:"colors.gray.300",_dark:{[Gg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Gg.variable]:`colors.${t}.500`,_dark:{[Gg.variable]:`colors.${t}.200`}},bg:Gg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${uC.reference})`}},uoe=H3(e=>({container:{[Wx.variable]:aoe,[uC.variable]:Wx.reference,_rtl:{[uC.variable]:pu(Wx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Bm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Bm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Bm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ET,Woe={...(ET=vn.baseStyle)==null?void 0:ET.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},PT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((PT=vn.variants)==null?void 0:PT.unstyled.field)??{}},TT,LT,AT,MT,Uoe={xs:((TT=vn.sizes)==null?void 0:TT.xs.field)??{},sm:((LT=vn.sizes)==null?void 0:LT.sm.field)??{},md:((AT=vn.sizes)==null?void 0:AT.md.field)??{},lg:((MT=vn.sizes)==null?void 0:MT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Vx=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Vx.reference,[zy.variable]:"colors.gray.700",[Vx.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Vx.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Nm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...eD,sizes:ZN,shadows:oae,space:XN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(xv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function iD(){const e=Xv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Xv();return x(sS,{styles:t=>{const n=FN(t,"styles.global"),r=WN(n,{theme:t,colorMode:e});return r?mN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=$N(a,(g,m)=>TQ(m)),l=WN(e,t),u=Object.assign({},i,l,HN(s),o),h=mN(u)(t.theme);return r?[h,r]:h};function Ux(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=iC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Xv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function oD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=iD(),a=e?FN(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},HN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return oD(e,t)}function Ri(e,t={}){return oD(e,t)}function Dae(){const e=new Map;return new Proxy(Ux,{apply(t,n,r){return Ux(...r)},get(t,n){return e.has(n)||e.set(n,Ux(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function IT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function RT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function OT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var cC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=IT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=RT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=RT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=OT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=IT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return cC(()=>()=>e.current.destroy()),e.current}var[Vae,aD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=aD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);cC(()=>()=>{!i.current||t.unregister(i.current)},[]),cC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function sD(){return[W5(Vae),()=>W5(aD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),NT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??NT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const S=a??NT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,g]}const s8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,lD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(lD),a=C.exports.useContext(h1),s=C.exports.useContext(s8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function kv(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>kv(e[t]))}function uD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||kv(n)?n:void 0,animate:kv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[DT(t),DT(n)])}function DT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Ev={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Ev.projectionNodeConstructor=e[t]:Ev[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if(Fm.hasEverUpdated)return Qae++})}const l8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const cD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(s8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),S=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(lD).strict,P=C.exports.useContext(cD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Ev.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,S,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(l8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function u8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function dD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function fD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,hD=(e,t)=>n=>Math.max(Math.min(n,t),e),$m=e=>e%1?Number(e.toFixed(5)):e,Pv=/(-)?([\d]*\.?[\d])+/g,dC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function e2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hm=Object.assign(Object.assign({},gh),{transform:hD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),t2=e=>({test:t=>e2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=t2("deg"),Pl=t2("%"),Ct=t2("px"),fse=t2("vh"),hse=t2("vw"),zT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),c8=(e,t)=>n=>Boolean(e2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),pD=(e,t,n)=>r=>{if(!e2(r))return r;const[i,o,a,s]=r.match(Pv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:c8("hsl","hue"),parse:pD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform($m(t))+", "+Pl.transform($m(n))+", "+$m(Hm.transform(r))+")"},pse=hD(0,255),Gx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:c8("rgb","red"),parse:pD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gx.transform(e)+", "+Gx.transform(t)+", "+Gx.transform(n)+", "+$m(Hm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const fC={test:c8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||fC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):fC.parse(e),transform:e=>e2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},gD="${c}",mD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&e2(e)&&((n=(t=e.match(Pv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(dC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function vD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(dC);r&&(n=r.length,e=e.replace(dC,gD),t.push(...r.map(Ji.parse)));const i=e.match(Pv);return i&&(e=e.replace(Pv,mD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function yD(e){return vD(e).values}function SD(e){const{values:t,numColors:n,tokenised:r}=vD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=yD(e);return SD(e)(t.map(vse))}const ku={test:mse,parse:yD,createTransformer:SD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Pv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,hC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),BT={...gh,transform:Math.round},bD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Hm,originX:zT,originY:zT,originZ:Ct,zIndex:BT,fillOpacity:Hm,strokeOpacity:Hm,numOctaves:BT};function d8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(fD(m)){o[m]=v;continue}const S=bD[m],w=cse(v,S);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(S.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const f8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function xD(e,t,n){for(const r in t)!Il(t[r])&&!dD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=f8();return d8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return xD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let wD=e=>!j5(e);function Ase(e){!e||(wD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(wD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function FT(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=FT(t,e.x,e.width),i=FT(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function h8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){d8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const CD=()=>({...f8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=CD();return h8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};xD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(u8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const _D=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function kD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ED=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function PD(e,t,n,r){kD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ED.has(i)?i:_D(i),t.attrs[i])}function p8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||dD(r,e))&&(n[r]=t[r]);return n}function TD(e){const t=p8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function g8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Tv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),LD=e=>Tv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const AD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=uD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const S=g8(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:AD({scrapeMotionValuesFromProps:TD,createRenderState:CD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}h8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),PD(t,n)}})},Wse={useVisualState:AD({scrapeMotionValuesFromProps:p8,createRenderState:f8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...u8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};pC(t,"focus",e?r:void 0),pC(t,"blur",e?i:void 0)}function MD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function ID(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function m8(e,t="page"){return{point:ID(e)?Yse(e,t):qse(e,t)}}const RD=(e,t=!1)=>{const n=r=>e(r,m8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function OD(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,OD(t),RD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return pC(e,OD(t),n&&RD(n,t==="pointerdown"),r)}function ND(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const $T=ND("dragHorizontal"),HT=ND("dragVertical");function DD(e){let t=!1;if(e==="y")t=HT();else if(e==="x")t=$T();else{const n=$T(),r=HT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function zD(){const e=DD(!0);return e?(e(),!1):!0}function WT(e,t,n){return(r,i)=>{!MD(r)||zD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?WT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?WT(r,!1,t):void 0,{passive:!t})}const BD=(e,t)=>t?e===t?!0:BD(e,t.parentElement):!1;function v8(e){return C.exports.useEffect(()=>()=>e(),[])}function FD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),jx=.001,nle=.01,VT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=VT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,VT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=gC(u,a),S=Math.exp(-g);return jx-m/v*S},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-g),w=gC(Math.pow(u,2),a);return(-i(u)+jx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-jx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!UT(e,ule)&&UT(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function y8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=FD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=GT,S=GT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=gC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}y8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const GT=e=>0,Lv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function Yx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Yx(l,s,e+1/3),o=Yx(l,s,e),a=Yx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[fC,Vc,Ff],YT=e=>fle.find(t=>t.test(e)),$D=(e,t)=>{let n=YT(e),r=YT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=jT(i),n=Vc),r===Ff&&(o=jT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},mC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function HD(e,t){return mC(e)?n=>Cr(e,t,n):Ji.test(e)?$D(e,t):VD(e,t)}const WD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>HD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=HD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function qT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=qT(e),i=qT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(WD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?$D:VD;if(Array.isArray(e))return WD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Lv(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Lv(e[o],e[o+1],i);return t[o](s)}}function UD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),S8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),GD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=GD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},jD=1.525,wle=4/11,Cle=8/11,_le=9/10,b8=e=>e,x8=ble(2),kle=yS(x8),YD=S8(x8),qD=e=>1-Math.sin(Math.acos(e)),w8=yS(qD),Ele=S8(w8),C8=GD(jD),Ple=yS(C8),Tle=S8(C8),Lle=xle(jD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||YD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return UD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const KT={keyframes:U3,spring:y8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(KT[e.type])return KT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?y8:U3}const KD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),XD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),KD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Av=!0),e),{}),Vle=n2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Av||jle(),n.schedule(r,i,o)),e},{}),Ule=n2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});n2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),ZD=e=>{Av=!1,E0.delta=vC?KD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,yC=!0,n2.forEach(Gle),yC=!1,Av&&(vC=!1,XD(ZD))},jle=()=>{Av=!0,vC=!0,yC||XD(ZD)},Yle=()=>E0;function QD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?QD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function JD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:S}=e,w=FD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=UD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=QD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function ez(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=ez(V-O,Yle().delta),(R===1&&V>M||R===-1&&VS?.stop()}}const SC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),XT=e=>SC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function _8(e,t){if(mC(e)&&mC(t))return Fy(e,t);if(SC(e)&&SC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=XT(e)&&XT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const tz=(e,t)=>1-3*t+3*e,nz=(e,t)=>3*t-6*e,rz=e=>3*e,Z5=(e,t,n)=>((tz(t,n)*e+nz(t,n))*e+rz(t))*e,iz=(e,t,n)=>3*tz(t,n)*e*e+2*nz(t,n)*e+rz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!zD()}function g(S,w){!h()||(BD(i.current,S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(S,w))}Y5(i,"pointerdown",o?v:void 0,l),v8(u)}const aue="production",oz=typeof process>"u"||process.env===void 0?aue:"production",ZT=new Set;function az(e,t,n){e||ZT.has(t)||(console.warn(t),n&&console.warn(n),ZT.add(t))}const bC=new WeakMap,qx=new WeakMap,sue=e=>{const t=bC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;qx.has(n)||qx.set(n,{});const r=qx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return bC.set(e,n),r.observe(e),()=>{bC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(oz!=="production"&&az(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function k8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function sz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:b8,easeIn:x8,easeInOut:YD,easeOut:kle,circIn:qD,circInOut:Ele,circOut:w8,backIn:C8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},QT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",JT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),eL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Kx,backgroundColor:Kx,color:Kx,default:Hy},xue=(e,t)=>{let n;return Tv(t)?n=bue:n=eL[e]||eL.default,{to:t,...n(t)}},wue={...bD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:hC,WebkitFilter:hC},E8=e=>wue[e];function P8(e,t){var n;let r=E8(e);return r!==hC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},lz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),uz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),lz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Mv=!0),e),{}),Es=r2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||Tue(),n.schedule(r,i,o)),e},{}),ah=r2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Xx=r2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),cz=e=>{Mv=!1,P0.delta=xC?lz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,wC=!0,r2.forEach(Pue),wC=!1,Mv&&(xC=!1,uz(cz))},Tue=()=>{Mv=!0,xC=!0,wC||uz(cz)},CC=()=>P0;function dz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(QT):QT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(T8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=T8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=JT(e,n);a==="none"&&s&&typeof n=="string"?a=P8(e,n):tL(a)&&typeof n=="string"?a=nL(n):!Array.isArray(n)&&tL(n)&&typeof a=="string"&&(n=nL(a));const l=JT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):JD({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=LD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function tL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function nL(e){return typeof e=="number"?0:P8("",e)}function T8(e,t){return e[t]||e.default||e}function L8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=dz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function A8(e,t){e.indexOf(t)===-1&&e.push(t)}function M8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wm{constructor(){this.subscriptions=[]}add(t){return A8(this.subscriptions,t),()=>M8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Wm,this.velocityUpdateSubscribers=new Wm,this.renderSubscribers=new Wm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=CC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ez(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const fz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},hz=[gh,Ct,Pl,Lc,hse,fse,Fue],jg=e=>hz.find(fz(e)),$ue=[...hz,Ji,ku],Hue=e=>$ue.find(fz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return g8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=LD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s_C(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=_C(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=pz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function _C(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>pz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function pz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=L8(m,v,S,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(_C(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const I8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...I8].reverse(),ece=I8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,S.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Tv(K)&&Tv(G)?!sz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):S.add(J):K!==void 0&&S.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!sz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=k8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class gz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Qx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=_8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=CC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Zx(h,this.transformPagePoint),MD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Qx(Zx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},ID(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=m8(t),o=Zx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=CC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Qx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Zx(e,t){return t?{point:t(e.point)}:e}function rL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qx({point:e},t){return{point:e,delta:rL(e,mz(t)),offset:rL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function mz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=mz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function iL(e,t=0,n=.01){return _8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function lL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:lL(e.x,n,i),y:lL(e.y,t,r)}}function uL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Lv(t.min,t.max-r,e.min):r>i&&(n=Lv(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const kC=.35;function pce(e=kC){return e===!1?e=0:e===!0&&(e=kC),{x:cL(e,"left","right"),y:cL(e,"top","bottom")}}function cL(e,t,n){return{min:dL(e,t),max:dL(e,n)}}function dL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const fL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gm=()=>({x:fL(),y:fL()}),hL=()=>({min:0,max:0}),Zr=()=>({x:hL(),y:hL()});function cl(e){return[e("x"),e("y")]}function vz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jx(e){return e===void 0||e===1}function EC({scale:e,scaleX:t,scaleY:n}){return!Jx(e)||!Jx(t)||!Jx(n)}function kf(e){return EC(e)||yz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function yz(e){return pL(e.x)||pL(e.y)}function pL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function gL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function PC(e,t=0,n=1,r,i){e.min=gL(e.min,t,n,r,i),e.max=gL(e.max,t,n,r,i)}function Sz(e,{x:t,y:n}){PC(e.x,t.translate,t.scale,t.originPoint),PC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(m8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=DD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new gz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=vz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return L8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=kC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(s8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new gz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),v8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function TC(e){return typeof e=="string"&&e.startsWith("var(--")}const xz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=xz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function LC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():TC(i)?LC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!TC(o))return;const a=LC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!TC(o))continue;const a=LC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),wz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(wz),Cz=(e,t)=>{e.set(t,!1),e.set(t)},vL=e=>e===gh||e===Ct;var yL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(yL||(yL={}));const SL=(e,t)=>parseFloat(e.split(", ")[t]),bL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return SL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?SL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const xL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:bL(4,13),y:bL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=xL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);Cz(h,s[u]),e[u]=xL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(wz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=jg(h);const m=t[l];let v;if(Tv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],g=jg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},AC={current:null},_z={current:!1};function Bce(){if(_z.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>AC.current=e.matches;e.addListener(t),t()}else AC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const kz=Object.keys(Ev),$ce=kz.length,wL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=uD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),_z.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:AC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=kz[l],{isEnabled:h,Component:g}=Ev[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=g8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Ez=["initial",...I8],Wce=Ez.length;class Pz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Pz{readValueFromInstance(t,n){if(p1.has(n)){const r=E8(n);return r&&r.default||0}else{const r=Vce(t),i=(fD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bz(t,n)}build(t,n,r,i){d8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return p8(t)}renderInstance(t,n,r,i){kD(t,n,r,i)}}class Gce extends Pz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=E8(n))===null||r===void 0?void 0:r.default)||0:(n=ED.has(n)?n:_D(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return TD(t)}build(t,n,r,i){h8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){PD(t,n,r,i)}}const jce=(e,t)=>u8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function CL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=CL(e,t.target.x),r=CL(e,t.target.y);return`${n}% ${r}%`}},_L="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(xz,v=>(o.push(v),_L)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(_L,()=>{const S=o[v];return v++,S})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=k8(),r=C.exports.useContext(l8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(cD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...Yg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yg,borderTopRightRadius:Yg,borderBottomLeftRadius:Yg,borderBottomRightRadius:Yg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return L8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Tz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Tz.length,kL=e=>typeof e=="string"?parseFloat(e):e,EL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Lv(e,t,r))}function TL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){TL(e.x,t.x),TL(e.y,t.y)}function LL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=LL(e.min,t,n,s,i),e.max=LL(e.max,t,n,s,i)}function AL(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function ML(e,t,n,r){AL(e.x,t,ide,n?.x,r?.x),AL(e.y,t,ode,n?.y,r?.y)}function IL(e){return e.translate===0&&e.scale===1}function Az(e){return IL(e.x)&&IL(e.y)}function Mz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function RL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return _8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){A8(this.members,t),t.scheduleRender()}remove(t){if(M8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function OL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){A8(this.children,t),this.isDirty=!0}remove(t){M8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const NL=["","X","Y","Z"],DL=1e3;let cde=0;function Iz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=dz(v,250),Fm.hasAnimatedSinceResize&&(Fm.hasAnimatedSinceResize=!1,this.nodes.forEach(BL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Mz(this.targetLayout,w)||S,V=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...T8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&BL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;FL(v.x,a.x,M),FL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Um(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,S,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Fm.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,DL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,DL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Rz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Vm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(zL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(S);S.min=o[v].min,S.max=S.min+w}):Rz(s,i.layoutBox,o)&&cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);S.max=S.min+w});const u=Gm();Vm(u,o,i.layoutBox);const h=Gm();l?Vm(h,e.applyTransform(a,!0),i.measuredBox):Vm(h,o,i.layoutBox);const g=!Az(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:S,layout:w}=v;if(S&&w){const E=Zr();Um(E,i.layoutBox,S.layoutBox);const P=Zr();Um(P,o,w.layoutBox),Mz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function zL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function BL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function FL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $L(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){$L(e.x,t.x,n.x,r),$L(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function HL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){HL(e.x),HL(e.y)}function Rz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(RL(t),RL(n),.2)}const _de=Iz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ew={current:void 0},kde=Iz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ew.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),ew.current=e}return ew.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Oz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Oz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=dm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:dm({track:{h:"1"}}),sm:dm({track:{h:"2"}}),md:dm({track:{h:"3"}}),lg:dm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),yT,Tie={...(yT=vn.baseStyle)==null?void 0:yT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},ST,bT,xT,wT,CT,_T,kT,ET,Mie={lg:{...(ST=vn.sizes)==null?void 0:ST.lg,field:{...(bT=vn.sizes)==null?void 0:bT.lg.field,...Ny}},md:{...(xT=vn.sizes)==null?void 0:xT.md,field:{...(wT=vn.sizes)==null?void 0:wT.md.field,...Ny}},sm:{...(CT=vn.sizes)==null?void 0:CT.sm,field:{...(_T=vn.sizes)==null?void 0:_T.sm.field,...Ny}},xs:{...(kT=vn.sizes)==null?void 0:kT.xs,field:{...(ET=vn.sizes)==null?void 0:ET.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),Fx=zn("skeleton-start-color"),$x=zn("skeleton-end-color"),Rie={[Fx.variable]:"colors.gray.100",[$x.variable]:"colors.gray.400",_dark:{[Fx.variable]:"colors.gray.800",[$x.variable]:"colors.gray.600"},background:Fx.reference,borderColor:$x.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Hx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Hx.variable]:"colors.white",_dark:{[Hx.variable]:"colors.gray.700"},bg:Hx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),Cv=zn("slider-thumb-size"),_v=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...r8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...r8({orientation:e.orientation,horizontal:{h:_v.reference},vertical:{w:_v.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...r8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Cv.reference,h:Cv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[Cv.variable]:"sizes.4",[_v.variable]:"sizes.1"}}),Uie=cS({container:{[Cv.variable]:"sizes.3.5",[_v.variable]:"sizes.1"}}),Gie=cS({container:{[Cv.variable]:"sizes.2.5",[_v.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:iD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=iD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:iD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Bm=ni("switch-track-width"),qf=ni("switch-track-height"),Wx=ni("switch-track-diff"),aoe=pu.subtract(Bm,qf),uC=ni("switch-thumb-x"),Gg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Bm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[Gg.variable]:"colors.gray.300",_dark:{[Gg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Gg.variable]:`colors.${t}.500`,_dark:{[Gg.variable]:`colors.${t}.200`}},bg:Gg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${uC.reference})`}},uoe=H3(e=>({container:{[Wx.variable]:aoe,[uC.variable]:Wx.reference,_rtl:{[uC.variable]:pu(Wx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Bm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Bm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Bm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),PT,Woe={...(PT=vn.baseStyle)==null?void 0:PT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},TT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((TT=vn.variants)==null?void 0:TT.unstyled.field)??{}},LT,AT,MT,IT,Uoe={xs:((LT=vn.sizes)==null?void 0:LT.xs.field)??{},sm:((AT=vn.sizes)==null?void 0:AT.sm.field)??{},md:((MT=vn.sizes)==null?void 0:MT.md.field)??{},lg:((IT=vn.sizes)==null?void 0:IT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Vx=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Vx.reference,[zy.variable]:"colors.gray.700",[Vx.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Vx.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Nm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...tD,sizes:QN,shadows:oae,space:ZN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(xv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function oD(){const e=Xv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Xv();return x(sS,{styles:t=>{const n=$N(t,"styles.global"),r=VN(n,{theme:t,colorMode:e});return r?vN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=HN(a,(g,m)=>TQ(m)),l=VN(e,t),u=Object.assign({},i,l,WN(s),o),h=vN(u)(t.theme);return r?[h,r]:h};function Ux(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=iC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Xv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function aD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=oD(),a=e?$N(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},WN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return aD(e,t)}function Ri(e,t={}){return aD(e,t)}function Dae(){const e=new Map;return new Proxy(Ux,{apply(t,n,r){return Ux(...r)},get(t,n){return e.has(n)||e.set(n,Ux(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function RT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function OT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function NT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var cC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=RT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=OT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=NT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=NT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return cC(()=>()=>e.current.destroy()),e.current}var[Vae,sD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=sD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);cC(()=>()=>{!i.current||t.unregister(i.current)},[]),cC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function lD(){return[W5(Vae),()=>W5(sD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),DT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??DT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const S=a??DT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,g]}const s8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,uD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(uD),a=C.exports.useContext(h1),s=C.exports.useContext(s8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function kv(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>kv(e[t]))}function cD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||kv(n)?n:void 0,animate:kv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[zT(t),zT(n)])}function zT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Ev={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Ev.projectionNodeConstructor=e[t]:Ev[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if(Fm.hasEverUpdated)return Qae++})}const l8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const dD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(s8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),S=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(uD).strict,P=C.exports.useContext(dD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Ev.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,S,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(l8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function u8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function fD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function hD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pD=(e,t)=>n=>Math.max(Math.min(n,t),e),$m=e=>e%1?Number(e.toFixed(5)):e,Pv=/(-)?([\d]*\.?[\d])+/g,dC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function e2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hm=Object.assign(Object.assign({},gh),{transform:pD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),t2=e=>({test:t=>e2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=t2("deg"),Pl=t2("%"),Ct=t2("px"),fse=t2("vh"),hse=t2("vw"),BT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),c8=(e,t)=>n=>Boolean(e2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gD=(e,t,n)=>r=>{if(!e2(r))return r;const[i,o,a,s]=r.match(Pv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:c8("hsl","hue"),parse:gD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform($m(t))+", "+Pl.transform($m(n))+", "+$m(Hm.transform(r))+")"},pse=pD(0,255),Gx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:c8("rgb","red"),parse:gD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gx.transform(e)+", "+Gx.transform(t)+", "+Gx.transform(n)+", "+$m(Hm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const fC={test:c8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||fC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):fC.parse(e),transform:e=>e2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},mD="${c}",vD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&e2(e)&&((n=(t=e.match(Pv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(dC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function yD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(dC);r&&(n=r.length,e=e.replace(dC,mD),t.push(...r.map(Ji.parse)));const i=e.match(Pv);return i&&(e=e.replace(Pv,vD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function SD(e){return yD(e).values}function bD(e){const{values:t,numColors:n,tokenised:r}=yD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=SD(e);return bD(e)(t.map(vse))}const ku={test:mse,parse:SD,createTransformer:bD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Pv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,hC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),FT={...gh,transform:Math.round},xD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Hm,originX:BT,originY:BT,originZ:Ct,zIndex:FT,fillOpacity:Hm,strokeOpacity:Hm,numOctaves:FT};function d8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(hD(m)){o[m]=v;continue}const S=xD[m],w=cse(v,S);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(S.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const f8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function wD(e,t,n){for(const r in t)!Il(t[r])&&!fD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=f8();return d8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return wD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let CD=e=>!j5(e);function Ase(e){!e||(CD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(CD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=$T(t,e.x,e.width),i=$T(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function h8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){d8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const _D=()=>({...f8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=_D();return h8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};wD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(u8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const kD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ED(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const PD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function TD(e,t,n,r){ED(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(PD.has(i)?i:kD(i),t.attrs[i])}function p8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||fD(r,e))&&(n[r]=t[r]);return n}function LD(e){const t=p8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function g8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Tv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),AD=e=>Tv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const MD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=cD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const S=g8(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:MD({scrapeMotionValuesFromProps:LD,createRenderState:_D,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}h8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),TD(t,n)}})},Wse={useVisualState:MD({scrapeMotionValuesFromProps:p8,createRenderState:f8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...u8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};pC(t,"focus",e?r:void 0),pC(t,"blur",e?i:void 0)}function ID(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function RD(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function m8(e,t="page"){return{point:RD(e)?Yse(e,t):qse(e,t)}}const OD=(e,t=!1)=>{const n=r=>e(r,m8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ND(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,ND(t),OD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return pC(e,ND(t),n&&OD(n,t==="pointerdown"),r)}function DD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=DD("dragHorizontal"),WT=DD("dragVertical");function zD(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=HT();else{const n=HT(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BD(){const e=zD(!0);return e?(e(),!1):!0}function VT(e,t,n){return(r,i)=>{!ID(r)||BD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?VT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?VT(r,!1,t):void 0,{passive:!t})}const FD=(e,t)=>t?e===t?!0:FD(e,t.parentElement):!1;function v8(e){return C.exports.useEffect(()=>()=>e(),[])}function $D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),jx=.001,nle=.01,UT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=UT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,UT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=gC(u,a),S=Math.exp(-g);return jx-m/v*S},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-g),w=gC(Math.pow(u,2),a);return(-i(u)+jx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-jx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!GT(e,ule)&>(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function y8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=$D(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=jT,S=jT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=gC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}y8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const jT=e=>0,Lv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function Yx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Yx(l,s,e+1/3),o=Yx(l,s,e),a=Yx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[fC,Vc,Ff],qT=e=>fle.find(t=>t.test(e)),HD=(e,t)=>{let n=qT(e),r=qT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=YT(i),n=Vc),r===Ff&&(o=YT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},mC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function WD(e,t){return mC(e)?n=>Cr(e,t,n):Ji.test(e)?HD(e,t):UD(e,t)}const VD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>WD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=WD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function KT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=KT(e),i=KT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(VD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?HD:UD;if(Array.isArray(e))return VD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Lv(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Lv(e[o],e[o+1],i);return t[o](s)}}function GD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),S8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),jD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=jD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},YD=1.525,wle=4/11,Cle=8/11,_le=9/10,b8=e=>e,x8=ble(2),kle=yS(x8),qD=S8(x8),KD=e=>1-Math.sin(Math.acos(e)),w8=yS(KD),Ele=S8(w8),C8=jD(YD),Ple=yS(C8),Tle=S8(C8),Lle=xle(YD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||qD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return GD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const XT={keyframes:U3,spring:y8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(XT[e.type])return XT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?y8:U3}const XD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),ZD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),XD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Av=!0),e),{}),Vle=n2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Av||jle(),n.schedule(r,i,o)),e},{}),Ule=n2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});n2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),QD=e=>{Av=!1,E0.delta=vC?XD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,yC=!0,n2.forEach(Gle),yC=!1,Av&&(vC=!1,ZD(QD))},jle=()=>{Av=!0,vC=!0,yC||ZD(QD)},Yle=()=>E0;function JD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?JD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function ez(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:S}=e,w=$D(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=GD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=JD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function tz(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=tz(V-O,Yle().delta),(R===1&&V>M||R===-1&&VS?.stop()}}const SC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ZT=e=>SC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function _8(e,t){if(mC(e)&&mC(t))return Fy(e,t);if(SC(e)&&SC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=ZT(e)&&ZT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const nz=(e,t)=>1-3*t+3*e,rz=(e,t)=>3*t-6*e,iz=e=>3*e,Z5=(e,t,n)=>((nz(t,n)*e+rz(t,n))*e+iz(t))*e,oz=(e,t,n)=>3*nz(t,n)*e*e+2*rz(t,n)*e+iz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!BD()}function g(S,w){!h()||(FD(i.current,S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(S,w))}Y5(i,"pointerdown",o?v:void 0,l),v8(u)}const aue="production",az=typeof process>"u"||process.env===void 0?aue:"production",QT=new Set;function sz(e,t,n){e||QT.has(t)||(console.warn(t),n&&console.warn(n),QT.add(t))}const bC=new WeakMap,qx=new WeakMap,sue=e=>{const t=bC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;qx.has(n)||qx.set(n,{});const r=qx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return bC.set(e,n),r.observe(e),()=>{bC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(az!=="production"&&sz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function k8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function lz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:b8,easeIn:x8,easeInOut:qD,easeOut:kle,circIn:KD,circInOut:Ele,circOut:w8,backIn:C8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},JT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",eL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),tL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Kx,backgroundColor:Kx,color:Kx,default:Hy},xue=(e,t)=>{let n;return Tv(t)?n=bue:n=tL[e]||tL.default,{to:t,...n(t)}},wue={...xD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:hC,WebkitFilter:hC},E8=e=>wue[e];function P8(e,t){var n;let r=E8(e);return r!==hC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},uz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),cz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),uz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Mv=!0),e),{}),Es=r2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||Tue(),n.schedule(r,i,o)),e},{}),ah=r2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Xx=r2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),dz=e=>{Mv=!1,P0.delta=xC?uz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,wC=!0,r2.forEach(Pue),wC=!1,Mv&&(xC=!1,cz(dz))},Tue=()=>{Mv=!0,xC=!0,wC||cz(dz)},CC=()=>P0;function fz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(JT):JT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(T8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=T8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=eL(e,n);a==="none"&&s&&typeof n=="string"?a=P8(e,n):nL(a)&&typeof n=="string"?a=rL(n):!Array.isArray(n)&&nL(n)&&typeof a=="string"&&(n=rL(a));const l=eL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):ez({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=AD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function nL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function rL(e){return typeof e=="number"?0:P8("",e)}function T8(e,t){return e[t]||e.default||e}function L8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=fz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function A8(e,t){e.indexOf(t)===-1&&e.push(t)}function M8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wm{constructor(){this.subscriptions=[]}add(t){return A8(this.subscriptions,t),()=>M8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Wm,this.velocityUpdateSubscribers=new Wm,this.renderSubscribers=new Wm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=CC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const hz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},pz=[gh,Ct,Pl,Lc,hse,fse,Fue],jg=e=>pz.find(hz(e)),$ue=[...pz,Ji,ku],Hue=e=>$ue.find(hz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return g8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=AD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s_C(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=_C(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=gz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function _C(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>gz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function gz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=L8(m,v,S,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(_C(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const I8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...I8].reverse(),ece=I8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,S.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Tv(K)&&Tv(G)?!lz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):S.add(J):K!==void 0&&S.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=k8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class mz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Qx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=_8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=CC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Zx(h,this.transformPagePoint),ID(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Qx(Zx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},RD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=m8(t),o=Zx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=CC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Qx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Zx(e,t){return t?{point:t(e.point)}:e}function iL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qx({point:e},t){return{point:e,delta:iL(e,vz(t)),offset:iL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function vz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function oL(e,t=0,n=.01){return _8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function uL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:uL(e.x,n,i),y:uL(e.y,t,r)}}function cL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Lv(t.min,t.max-r,e.min):r>i&&(n=Lv(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const kC=.35;function pce(e=kC){return e===!1?e=0:e===!0&&(e=kC),{x:dL(e,"left","right"),y:dL(e,"top","bottom")}}function dL(e,t,n){return{min:fL(e,t),max:fL(e,n)}}function fL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const hL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gm=()=>({x:hL(),y:hL()}),pL=()=>({min:0,max:0}),Zr=()=>({x:pL(),y:pL()});function cl(e){return[e("x"),e("y")]}function yz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jx(e){return e===void 0||e===1}function EC({scale:e,scaleX:t,scaleY:n}){return!Jx(e)||!Jx(t)||!Jx(n)}function kf(e){return EC(e)||Sz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Sz(e){return gL(e.x)||gL(e.y)}function gL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function mL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function PC(e,t=0,n=1,r,i){e.min=mL(e.min,t,n,r,i),e.max=mL(e.max,t,n,r,i)}function bz(e,{x:t,y:n}){PC(e.x,t.translate,t.scale,t.originPoint),PC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(m8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new mz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=yz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return L8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=kC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(s8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new mz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),v8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function TC(e){return typeof e=="string"&&e.startsWith("var(--")}const wz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=wz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function LC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():TC(i)?LC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!TC(o))return;const a=LC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!TC(o))continue;const a=LC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),Cz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(Cz),_z=(e,t)=>{e.set(t,!1),e.set(t)},yL=e=>e===gh||e===Ct;var SL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(SL||(SL={}));const bL=(e,t)=>parseFloat(e.split(", ")[t]),xL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return bL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?bL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const wL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:xL(4,13),y:xL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=wL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);_z(h,s[u]),e[u]=wL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Cz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=jg(h);const m=t[l];let v;if(Tv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],g=jg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},AC={current:null},kz={current:!1};function Bce(){if(kz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>AC.current=e.matches;e.addListener(t),t()}else AC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ez=Object.keys(Ev),$ce=Ez.length,CL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=cD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kz.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:AC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=Ez[l],{isEnabled:h,Component:g}=Ev[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=g8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Pz=["initial",...I8],Wce=Pz.length;class Tz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Tz{readValueFromInstance(t,n){if(p1.has(n)){const r=E8(n);return r&&r.default||0}else{const r=Vce(t),i=(hD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xz(t,n)}build(t,n,r,i){d8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return p8(t)}renderInstance(t,n,r,i){ED(t,n,r,i)}}class Gce extends Tz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=E8(n))===null||r===void 0?void 0:r.default)||0:(n=PD.has(n)?n:kD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return LD(t)}build(t,n,r,i){h8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){TD(t,n,r,i)}}const jce=(e,t)=>u8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function _L(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=_L(e,t.target.x),r=_L(e,t.target.y);return`${n}% ${r}%`}},kL="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(wz,v=>(o.push(v),kL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(kL,()=>{const S=o[v];return v++,S})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=k8(),r=C.exports.useContext(l8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(dD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...Yg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yg,borderTopRightRadius:Yg,borderBottomLeftRadius:Yg,borderBottomRightRadius:Yg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return L8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Lz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Lz.length,EL=e=>typeof e=="string"?parseFloat(e):e,PL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Lv(e,t,r))}function LL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){LL(e.x,t.x),LL(e.y,t.y)}function AL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=AL(e.min,t,n,s,i),e.max=AL(e.max,t,n,s,i)}function ML(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function IL(e,t,n,r){ML(e.x,t,ide,n?.x,r?.x),ML(e.y,t,ode,n?.y,r?.y)}function RL(e){return e.translate===0&&e.scale===1}function Mz(e){return RL(e.x)&&RL(e.y)}function Iz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function OL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return _8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){A8(this.members,t),t.scheduleRender()}remove(t){if(M8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function NL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){A8(this.children,t),this.isDirty=!0}remove(t){M8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const DL=["","X","Y","Z"],zL=1e3;let cde=0;function Rz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=fz(v,250),Fm.hasAnimatedSinceResize&&(Fm.hasAnimatedSinceResize=!1,this.nodes.forEach(FL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Iz(this.targetLayout,w)||S,V=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...T8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&FL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;$L(v.x,a.x,M),$L(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Um(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,S,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Fm.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,zL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,zL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Oz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Vm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(BL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(S);S.min=o[v].min,S.max=S.min+w}):Oz(s,i.layoutBox,o)&&cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);S.max=S.min+w});const u=Gm();Vm(u,o,i.layoutBox);const h=Gm();l?Vm(h,e.applyTransform(a,!0),i.measuredBox):Vm(h,o,i.layoutBox);const g=!Mz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:S,layout:w}=v;if(S&&w){const E=Zr();Um(E,i.layoutBox,S.layoutBox);const P=Zr();Um(P,o,w.layoutBox),Iz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function BL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function $L(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function HL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){HL(e.x,t.x,n.x,r),HL(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function WL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){WL(e.x),WL(e.y)}function Oz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(OL(t),OL(n),.2)}const _de=Rz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ew={current:void 0},kde=Rz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ew.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),ew.current=e}return ew.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Nz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Nz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -66,8 +66,8 @@ Error generating stack: `+o.message+` top: ${s}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(u)}},[t]),x(Tde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const tw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=gS(Ade),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Lde,{isPresent:n,children:e})),x(h1.Provider,{value:u,children:e})};function Ade(){return new Map}const $p=e=>e.key||"";function Mde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",az(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pde();const l=C.exports.useContext(l8).forceRender;l&&(s=l);const u=Oz(),h=Ide(e);let g=h;const m=new Set,v=C.exports.useRef(g),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(V5(()=>{w.current=!1,Mde(h,S),v.current=g}),v8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(tw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),O=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(R,0,x(tw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(tw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),oz!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function MC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Rde(){return!1}var Ode=e=>{const{condition:t,message:n}=e;t&&Rde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},qg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function IC(e){switch(e?.direction??"right"){case"right":return qg.slideRight;case"left":return qg.slideLeft;case"bottom":return qg.slideDown;case"top":return qg.slideUp;default:return qg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Nde=e=>e!=null&&parseInt(e.toString(),10)>0,VL={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Dde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Nde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(VL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(VL.enter,i)})},Dz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ode({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(Fl.div,{ref:t,...g,className:i2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Dde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Dz.displayName="Collapse";var zde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Xf.exit,n),transitionEnd:t?.exit})},zz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-fade",o),custom:m,...zz,animate:h,...u})})});Bde.displayName="Fade";var Fde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Xf.enter,n),transitionEnd:e?.enter})},Bz={initial:"exit",animate:"enter",exit:"exit",variants:Fde},$de=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:S,children:m&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",s),...Bz,animate:v,custom:S,...g})})});$de.displayName="ScaleFade";var UL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=IC({direction:e});return{...i,transition:t?.exit??Ps.exit(UL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=IC({direction:e});return{...i,transition:n?.enter??Ps.enter(UL.enter,r),transitionEnd:t?.enter}}},Fz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=IC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(Fl.div,{...m,ref:n,initial:"exit",className:i2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Hde,style:S,...g})})});Fz.displayName="Slide";var Wde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},RC={initial:"initial",animate:"enter",exit:"exit",variants:Wde},Vde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",a),custom:w,...RC,animate:S,...m})})});Vde.displayName="SlideFade";var o2=(...e)=>e.filter(Boolean).join(" ");function Ude(){return!1}var wS=e=>{const{condition:t,message:n}=e;t&&Ude()&&console.warn(n)};function nw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Gde,CS]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[jde,R8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Yde,yTe,qde,Kde]=sD(),Hf=Ee(function(t,n){const{getButtonProps:r}=R8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...CS().button};return ae.createElement(be.button,{...i,className:o2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Xde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jde(e),efe(e);const s=qde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=dS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zde,O8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=O8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;tfe(e);const{register:m,index:v,descendants:S}=Kde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);nfe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:nw(V.onClick,T),onFocus:nw(V.onFocus,R),onKeyDown:nw(V.onKeyDown,M)}},[h,t,w,T,R,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:O,getPanelProps:N,htmlProps:i}}function Jde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function efe(e){wS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function tfe(e){wS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function nfe(e){wS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=R8(),{reduceMotion:r}=O8(),i=o2("chakra-accordion__icon",e.className),o=CS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ya,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qde(t),l={...CS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:o2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=O8(),{getPanelProps:s,isOpen:l}=R8(),u=s(o,n),h=o2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(Dz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:o2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),a2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});a2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function GL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,N8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),$z={info:{icon:afe,colorScheme:"blue"},warning:{icon:GL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:GL,colorScheme:"red"},loading:{icon:a2,colorScheme:"blue"}};function cfe(e){return $z[e].colorScheme}function dfe(e){return $z[e].icon}var Hz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Hz.displayName="Alert";var Wz=Ee(function(t,n){const i={display:"inline",...N8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Wz.displayName="AlertDescription";function Vz(e){const{status:t}=lfe(),n=dfe(t),r=N8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Vz.displayName="AlertIcon";var Uz=Ee(function(t,n){const r=N8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Uz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},g.current=S},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:ffe(S,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),jL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function OC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}OC.displayName="ButtonIcon";function NC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(a2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}NC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":jL(a),"data-loading":jL(o),__css:k,className:TS("chakra-button",w),...P},o&&S==="start"&&x(NC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(YL,{...R})):x(YL,{...R}),o&&S==="end"&&x(NC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function YL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(OC,{marginEnd:i,children:t}),r,n&&x(OC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,rw=e=>e?!0:void 0;function qL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,Gz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ri("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=Gz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function D8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=z8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":rw(n),"aria-required":rw(i),"aria-readonly":rw(r)}}function z8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:qL(t?.onFocus,h),onBlur:qL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ri("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(jz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var jz=Ee(function(t,n){const r=y1(),i=Gz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});jz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var B8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:B8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:B8});Pfe.displayName="VisuallyHiddenInput";var KL=!1,LS=null,X0=!1,DC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function F8(e,t){DC.forEach(n=>n(e,t))}function XL(e){X0=!0,Lfe(e)&&(LS="keyboard",F8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,F8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",F8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function ZL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||KL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",XL,!0),document.addEventListener("keyup",XL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),KL=!0}function Rfe(e){Ife(),e(ZL());const t=()=>e(ZL());return DC.add(t),()=>{DC.delete(t)}}var[STe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Yz(e={}){const t=z8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:S?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,S,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,S,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:B8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,QL),onTouchStart:La(Pe.onTouchStart,QL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ut,htmlProps:O}}function QL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),qz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ri("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=Yz({...P,isDisabled:S,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});qz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function $8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function zC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Kz(e,t,n){return(n-t)*e+t}function BC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=zC(n);return $8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":iw(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Xz(Ac(v),o),w=n??S,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),$8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=iw(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=iw($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||O{document.head.removeChild(u)}},[t]),x(Tde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const tw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=gS(Ade),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Lde,{isPresent:n,children:e})),x(h1.Provider,{value:u,children:e})};function Ade(){return new Map}const $p=e=>e.key||"";function Mde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",sz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pde();const l=C.exports.useContext(l8).forceRender;l&&(s=l);const u=Nz(),h=Ide(e);let g=h;const m=new Set,v=C.exports.useRef(g),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(V5(()=>{w.current=!1,Mde(h,S),v.current=g}),v8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(tw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),O=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(R,0,x(tw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(tw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),az!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function MC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Rde(){return!1}var Ode=e=>{const{condition:t,message:n}=e;t&&Rde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},qg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function IC(e){switch(e?.direction??"right"){case"right":return qg.slideRight;case"left":return qg.slideLeft;case"bottom":return qg.slideDown;case"top":return qg.slideUp;default:return qg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Nde=e=>e!=null&&parseInt(e.toString(),10)>0,UL={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Dde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Nde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(UL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(UL.enter,i)})},zz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ode({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(Fl.div,{ref:t,...g,className:i2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Dde,initial:r?"exit":!1,animate:P,exit:"exit"})})});zz.displayName="Collapse";var zde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Xf.exit,n),transitionEnd:t?.exit})},Bz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-fade",o),custom:m,...Bz,animate:h,...u})})});Bde.displayName="Fade";var Fde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Xf.enter,n),transitionEnd:e?.enter})},Fz={initial:"exit",animate:"enter",exit:"exit",variants:Fde},$de=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:S,children:m&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",s),...Fz,animate:v,custom:S,...g})})});$de.displayName="ScaleFade";var GL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=IC({direction:e});return{...i,transition:t?.exit??Ps.exit(GL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=IC({direction:e});return{...i,transition:n?.enter??Ps.enter(GL.enter,r),transitionEnd:t?.enter}}},$z=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=IC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(Fl.div,{...m,ref:n,initial:"exit",className:i2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Hde,style:S,...g})})});$z.displayName="Slide";var Wde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},RC={initial:"initial",animate:"enter",exit:"exit",variants:Wde},Vde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",a),custom:w,...RC,animate:S,...m})})});Vde.displayName="SlideFade";var o2=(...e)=>e.filter(Boolean).join(" ");function Ude(){return!1}var wS=e=>{const{condition:t,message:n}=e;t&&Ude()&&console.warn(n)};function nw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Gde,CS]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[jde,R8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Yde,yTe,qde,Kde]=lD(),Hf=Ee(function(t,n){const{getButtonProps:r}=R8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...CS().button};return ae.createElement(be.button,{...i,className:o2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Xde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jde(e),efe(e);const s=qde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=dS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zde,O8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=O8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;tfe(e);const{register:m,index:v,descendants:S}=Kde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);nfe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:nw(V.onClick,T),onFocus:nw(V.onFocus,R),onKeyDown:nw(V.onKeyDown,M)}},[h,t,w,T,R,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:O,getPanelProps:N,htmlProps:i}}function Jde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function efe(e){wS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function tfe(e){wS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function nfe(e){wS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=R8(),{reduceMotion:r}=O8(),i=o2("chakra-accordion__icon",e.className),o=CS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ya,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qde(t),l={...CS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:o2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=O8(),{getPanelProps:s,isOpen:l}=R8(),u=s(o,n),h=o2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(zz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:o2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),a2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});a2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function jL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,N8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hz={info:{icon:afe,colorScheme:"blue"},warning:{icon:jL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:jL,colorScheme:"red"},loading:{icon:a2,colorScheme:"blue"}};function cfe(e){return Hz[e].colorScheme}function dfe(e){return Hz[e].icon}var Wz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Wz.displayName="Alert";var Vz=Ee(function(t,n){const i={display:"inline",...N8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Vz.displayName="AlertDescription";function Uz(e){const{status:t}=lfe(),n=dfe(t),r=N8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Uz.displayName="AlertIcon";var Gz=Ee(function(t,n){const r=N8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Gz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},g.current=S},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:ffe(S,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),YL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function OC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}OC.displayName="ButtonIcon";function NC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(a2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}NC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":YL(a),"data-loading":YL(o),__css:k,className:TS("chakra-button",w),...P},o&&S==="start"&&x(NC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(qL,{...R})):x(qL,{...R}),o&&S==="end"&&x(NC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function qL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(OC,{marginEnd:i,children:t}),r,n&&x(OC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,rw=e=>e?!0:void 0;function KL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,jz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ri("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=jz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function D8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=z8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":rw(n),"aria-required":rw(i),"aria-readonly":rw(r)}}function z8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:KL(t?.onFocus,h),onBlur:KL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ri("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(Yz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Yz=Ee(function(t,n){const r=y1(),i=jz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Yz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var B8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:B8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:B8});Pfe.displayName="VisuallyHiddenInput";var XL=!1,LS=null,X0=!1,DC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function F8(e,t){DC.forEach(n=>n(e,t))}function ZL(e){X0=!0,Lfe(e)&&(LS="keyboard",F8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,F8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",F8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function QL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||XL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",ZL,!0),document.addEventListener("keyup",ZL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),XL=!0}function Rfe(e){Ife(),e(QL());const t=()=>e(QL());return DC.add(t),()=>{DC.delete(t)}}var[STe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qz(e={}){const t=z8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:S?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,S,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,S,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:B8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,JL),onTouchStart:La(Pe.onTouchStart,JL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ut,htmlProps:O}}function JL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Kz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ri("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=qz({...P,isDisabled:S,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Kz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function $8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function zC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Xz(e,t,n){return(n-t)*e+t}function BC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=zC(n);return $8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":iw(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Zz(Ac(v),o),w=n??S,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),$8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=iw(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=iw($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||Ox(sS,{styles:Zz}),Xfe=()=>x(sS,{styles:` +`,Kfe=()=>x(sS,{styles:Qz}),Xfe=()=>x(sS,{styles:` html { line-height: 1.5; -webkit-text-size-adjust: 100%; @@ -366,8 +366,8 @@ Error generating stack: `+o.message+` display: none; } - ${Zz} - `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Qz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Qz()&&e.test(navigator.vendor),ehe=e=>Qz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function JL(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Iv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=JL(n),a=JL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function H8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var W8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=yn(i),s=D8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});W8.displayName="Input";W8.id="Input";var[she,Jz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,S;const w=H8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),V8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=Jz();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});V8.displayName="InputAddon";var eB=Ee(function(t,n){return x(V8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});eB.displayName="InputLeftAddon";eB.id="InputLeftAddon";var tB=Ee(function(t,n){return x(V8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});tB.displayName="InputRightAddon";tB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=Jz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var nB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});nB.id="InputLeftElement";nB.displayName="InputLeftElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});rB.id="InputRightElement";rB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var iB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});iB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(iB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var oB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});oB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...S}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var aB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...S})});aB.displayName="Grid";function eA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=H8({gridArea:r,gridColumn:eA(i),gridRow:eA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,sB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),U8=Ee(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});U8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(U8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(U8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=sB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=sB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(aB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var lB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});lB.displayName="Spacer";var FC="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[FC]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var uB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});uB.displayName="StackItem";var G8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(uB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[FC]:S[FC]},...m},k)});G8.displayName="Stack";var cB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"row",ref:t}));cB.displayName="HStack";var dB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"column",ref:t}));dB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=H8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function tA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>tA(q6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>tA(q6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(fB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},S))});Rhe.displayName="Wrap";var fB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});fB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},hB=Ohe,Tp=()=>{},Nhe={document:hB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:hB},pB=typeof window<"u"?{window,document}:zhe,gB=C.exports.createContext(pB);gB.displayName="EnvironmentContext";function mB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:pB},[r,n]);return ee(gB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}mB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function ow(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&ow(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...S,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function vB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function yB(e){if(!vB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=SB(e))==null?void 0:t.defaultView)??window}function SB(e){return vB(e)?e.ownerDocument:document}function Whe(e){return SB(e).activeElement}var bB=e=>e.hasAttribute("tabindex"),Vhe=e=>bB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function xB(e){return e.parentElement&&xB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function wB(e){if(!yB(e)||xB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:bB(e)}function jhe(e){return e?yB(e)&&wB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function CB(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>wB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=CB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",j8="auto",s2=[Ro,Ua,Ga,Oo],Z0="start",Rv="end",tpe="clippingParents",_B="viewport",Kg="popper",npe="reference",nA=s2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Rv])},[]),kB=[].concat(s2,[j8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Rv])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Y8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function $C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function EB(){return!/^((?!chrome|android).)*safari/i.test($C())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!EB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function q8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function PB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Y8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(Y8(e)?e.host:null)||xd(e)}function rA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test($C()),n=/Trident/i.test($C());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(Y8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function l2(e){for(var t=Ya(e),n=rA(e);n&&mpe(n)&&Eu(n).position==="static";)n=rA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function K8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jm(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=jm(e,t,n);return r>n?n:r}function TB(){return{top:0,right:0,bottom:0,left:0}}function LB(e){return Object.assign({},TB(),e)}function AB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,LB(typeof t!="number"?t:AB(t,s2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=K8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=q8(o),v=l==="y"?Ro:Oo,S=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=l2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[S],O=k/2-m[h]/2+T,N=jm(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!PB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function iA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=l2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Rv){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Rv){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,iA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,iA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function oA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function X8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Z8(e){return J0(xd(e)).left+X8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=EB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Z8(e),y:l}}function Ipe(e){var t,n=xd(e),r=X8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Z8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Q8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function MB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&Q8(e)?e:MB(IS(e))}function Ym(e,t){var n;t===void 0&&(t=[]);var r=MB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],Q8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ym(IS(a)))}function HC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function aA(e,t,n){return t===_B?HC(Mpe(e,n)):sh(t)?Rpe(t,n):HC(Ipe(xd(e)))}function Ope(e){var t=Ym(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?l2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&PB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=aA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},aA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function IB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?K8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Rv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ov(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?_B:u,g=n.elementContext,m=g===void 0?Kg:g,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=LB(typeof E!="number"?E:AB(E,s2)),k=m===Kg?npe:Kg,T=e.rects.popper,M=e.elements[S?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=IB({reference:O,element:T,strategy:"absolute",placement:i}),z=HC(Object.assign({},T,N)),V=m===Kg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Kg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?kB:l,h=e1(r),g=h?s?nA:nA.filter(function(S){return e1(S)===h}):s2,m=g.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=g);var v=m.reduce(function(S,w){return S[w]=Ov(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function zpe(e){if(Tl(e)===j8)return[];var t=j3(e);return[oA(e),t,oA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!S?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===j8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:S,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Ov(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=S?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function sA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function lA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ov(t,{elementContext:"reference"}),s=Ov(t,{altBoundary:!0}),l=sA(a,r),u=sA(s,i,o),h=lA(l),g=lA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=kB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=IB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Ov(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=K8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?q8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:TB(),_e=Me[Q],Je=Me[ne],Xe=jm(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&l2(t.elements.arrow),ut=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ut,et=K+_t-mt,Lt=jm(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):jm(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?X8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||Q8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Z8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var uA={placement:"bottom",modifiers:[],strategy:"absolute"};function cA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],dA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...dA,...e}}:t={enabled:e,options:dA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{fA(e)},effect:({state:e})=>()=>{fA(e)}},fA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function RB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(S.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function OB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function NB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function DB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}DB.displayName="PortalManager";var[zB,_0e]=_n({strict:!1,name:"PortalContext"}),J8="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=J8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(zB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=J8),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(zB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=J8;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},aw=0,BB=function(e){return e&&(e.host||BB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=BB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),aw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),aw--,aw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},FB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function e_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function $B(){}function HB(){}HB.resetWarningCache=$B;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:HB,resetWarningCache:$B};return n.PropTypes=n,n};Nn.exports=N0e();var WC="data-focus-lock",WB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function VB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var sw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function UB(e){return e}function GB(e,t){t===void 0&&(t=UB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function t_(e,t){return t===void 0&&(t=UB),GB(e,t)}function jB(e){e===void 0&&(e={});var t=GB(null);return t.options=yl({async:!0,ssr:!1},e),t}var YB=function(e){var t=e.sideCar,n=Nz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};YB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),YB}var qB=t_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),KB=t_(),W0e=t_(),V0e=jB({async:!0}),U0e=[],n_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&qB.useMedium(Je)},[]),me=KB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[WB]=g&&"disabled",r[WC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=VB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:sw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw})]})});n_.propTypes={};n_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const XB=n_;function VC(e,t){return VC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VC(e,t)}function r_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,VC(e,t)}function ZB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){r_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return ZB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],o_=e1e.join(","),t1e="".concat(o_,", [data-focus-guard]"),aF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:o_)?[i]:[],aF(i))},[])},a_=function(e,t){return e.reduce(function(n,r){return n.concat(aF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(o_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return a_([n])}).reduce(function(n,r){return n.concat(r)},[])},s_=function(e,t){return $l(e).filter(function(n){return eF(t,n)}).filter(function(n){return X0e(n)})},pA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return tF(t,n)})},GC=function(e,t,n){return oF(s_(a_(e,n),t),!0,n)},gA=function(e,t){return oF(s_(a_(e),t),!1)},r1e=function(e,t){return s_(n1e(e),t)},Nv=function(e,t){return e.shadowRoot?Nv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Nv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},sF=function(e){return e.parentNode?sF(e.parentNode):e},l_=function(e){var t=UC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(WC);return n.push.apply(n,i?i1e($l(sF(r).querySelectorAll("[".concat(WC,'="').concat(i,'"]:not([').concat(WB,'="disabled"])')))):[r]),n},[])},lF=function(e){return e.activeElement?e.activeElement.shadowRoot?lF(e.activeElement.shadowRoot):e.activeElement:void 0},u_=function(){return document.activeElement?document.activeElement.shadowRoot?lF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},uF=function(e){var t=document&&u_();return!t||t.dataset&&t.dataset.focusGuard?!1:l_(e).some(function(n){return Nv(n,t)||a1e(n)})},s1e=function(){var e=document&&u_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Nv(t,e)}):!1},l1e=function(e,t){return t.filter(iF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},c_=function(e,t){return iF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(c_(n,e))}),e.filter(function(n){return t.has(n)})},mA=function(e){return e[0]&&e.length>1?c_(e[0],e):e[0]},vA=function(e,t){return e.length>1?e.indexOf(c_(e[t],e)):t},cF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=i_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),S=u1e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=vA(e,0),k=vA(e,i-1);if(l===-1||h===-1)return cF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=nF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=pA(r.filter(d1e(n)));return i&&i.length?mA(i):mA(pA(t))},jC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&jC(e.parentNode.host||e.parentNode,t),t},lw=function(e,t){for(var n=jC(e),r=jC(t),i=0;i=0)return o}return!1},dF=function(e,t,n){var r=UC(e),i=UC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=lw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=lw(o,l);u&&(!a||Nv(u,a)?a=u:a=lw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&u_(),r=l_(e).filter(i4),i=dF(n||e,e,r),o=new Map,a=gA(r,o),s=GC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=gA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===cF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=l_(e).filter(i4),n=dF(e,e,t),r=new Map,i=GC([n],r,!0),o=GC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:i_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},uw=0,cw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!cw&&r){if(uw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),cw=!0,setTimeout(function(){cw=!1},1);return}uw++,v1e(r.node,n.focusOptions),uw--}};const fF=y1e;function hF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,Dv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function yA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(Dv):Dv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(uF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=fF(g,r0,{focusOptions:l}),A0={})),Dv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),yA(S,v.length,1,v),yA(S,-1,-1,v))}}}return t},pF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},d_=function(){return hF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},gF=function(){Dv="just",setTimeout(function(){Dv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",pF),document.addEventListener("focusout",d_),window.addEventListener("blur",gF)},I1e=function(){document.removeEventListener("focusin",pF),document.removeEventListener("focusout",d_),window.removeEventListener("blur",gF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),hF(o4)):(I1e(),r0=null)}qB.assignSyncMedium(L1e);KB.assignMedium(d_);W0e.assignMedium(function(e){return e({moveFocusInside:fF,focusInside:uF})});const N1e=G0e(R1e,O1e)(A1e);var mF=C.exports.forwardRef(function(t,n){return x(XB,{sideCar:N1e,ref:n,...t})}),vF=XB.propTypes||{};vF.sideCar;e_(vF,["sideCar"]);mF.propTypes={};const D1e=mF;var yF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&CB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};yF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",SF=jB(),dw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:dw,onWheelCapture:dw,onTouchMoveCapture:dw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Nz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=VB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:SF,removeScrollBar:u,shards:g,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},fw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[fw(n),fw(r),fw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=bF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + ${Qz} + `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Jz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Jz()&&e.test(navigator.vendor),ehe=e=>Jz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function eA(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Iv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=eA(n),a=eA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function H8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var W8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=yn(i),s=D8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});W8.displayName="Input";W8.id="Input";var[she,eB]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,S;const w=H8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),V8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=eB();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});V8.displayName="InputAddon";var tB=Ee(function(t,n){return x(V8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});tB.displayName="InputLeftAddon";tB.id="InputLeftAddon";var nB=Ee(function(t,n){return x(V8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});nB.displayName="InputRightAddon";nB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=eB(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});rB.id="InputLeftElement";rB.displayName="InputLeftElement";var iB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});iB.id="InputRightElement";iB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var oB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});oB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(oB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var aB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});aB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...S}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var sB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...S})});sB.displayName="Grid";function tA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=H8({gridArea:r,gridColumn:tA(i),gridRow:tA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,lB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),U8=Ee(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});U8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(U8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(U8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=lB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=lB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(sB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var uB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});uB.displayName="Spacer";var FC="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[FC]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var cB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});cB.displayName="StackItem";var G8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(cB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[FC]:S[FC]},...m},k)});G8.displayName="Stack";var dB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"row",ref:t}));dB.displayName="HStack";var fB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"column",ref:t}));fB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=H8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function nA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>nA(q6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>nA(q6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(hB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},S))});Rhe.displayName="Wrap";var hB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});hB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},pB=Ohe,Tp=()=>{},Nhe={document:pB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:pB},gB=typeof window<"u"?{window,document}:zhe,mB=C.exports.createContext(gB);mB.displayName="EnvironmentContext";function vB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:gB},[r,n]);return ee(mB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}vB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function ow(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&ow(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...S,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function yB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function SB(e){if(!yB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=bB(e))==null?void 0:t.defaultView)??window}function bB(e){return yB(e)?e.ownerDocument:document}function Whe(e){return bB(e).activeElement}var xB=e=>e.hasAttribute("tabindex"),Vhe=e=>xB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function wB(e){return e.parentElement&&wB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function CB(e){if(!SB(e)||wB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:xB(e)}function jhe(e){return e?SB(e)&&CB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function _B(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>CB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=_B(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",j8="auto",s2=[Ro,Ua,Ga,Oo],Z0="start",Rv="end",tpe="clippingParents",kB="viewport",Kg="popper",npe="reference",rA=s2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Rv])},[]),EB=[].concat(s2,[j8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Rv])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Y8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function $C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PB(){return!/^((?!chrome|android).)*safari/i.test($C())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!PB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function q8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Y8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(Y8(e)?e.host:null)||xd(e)}function iA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test($C()),n=/Trident/i.test($C());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(Y8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function l2(e){for(var t=Ya(e),n=iA(e);n&&mpe(n)&&Eu(n).position==="static";)n=iA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function K8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jm(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=jm(e,t,n);return r>n?n:r}function LB(){return{top:0,right:0,bottom:0,left:0}}function AB(e){return Object.assign({},LB(),e)}function MB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,AB(typeof t!="number"?t:MB(t,s2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=K8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=q8(o),v=l==="y"?Ro:Oo,S=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=l2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[S],O=k/2-m[h]/2+T,N=jm(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!TB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function oA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=l2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Rv){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Rv){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,oA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,oA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function aA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function X8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Z8(e){return J0(xd(e)).left+X8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=PB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Z8(e),y:l}}function Ipe(e){var t,n=xd(e),r=X8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Z8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Q8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&Q8(e)?e:IB(IS(e))}function Ym(e,t){var n;t===void 0&&(t=[]);var r=IB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],Q8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ym(IS(a)))}function HC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sA(e,t,n){return t===kB?HC(Mpe(e,n)):sh(t)?Rpe(t,n):HC(Ipe(xd(e)))}function Ope(e){var t=Ym(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?l2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&TB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=sA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},sA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?K8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Rv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ov(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?kB:u,g=n.elementContext,m=g===void 0?Kg:g,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=AB(typeof E!="number"?E:MB(E,s2)),k=m===Kg?npe:Kg,T=e.rects.popper,M=e.elements[S?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=RB({reference:O,element:T,strategy:"absolute",placement:i}),z=HC(Object.assign({},T,N)),V=m===Kg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Kg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?EB:l,h=e1(r),g=h?s?rA:rA.filter(function(S){return e1(S)===h}):s2,m=g.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=g);var v=m.reduce(function(S,w){return S[w]=Ov(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function zpe(e){if(Tl(e)===j8)return[];var t=j3(e);return[aA(e),t,aA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!S?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===j8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:S,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Ov(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=S?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function lA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function uA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ov(t,{elementContext:"reference"}),s=Ov(t,{altBoundary:!0}),l=lA(a,r),u=lA(s,i,o),h=uA(l),g=uA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=EB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=RB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Ov(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=K8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?q8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:LB(),_e=Me[Q],Je=Me[ne],Xe=jm(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&l2(t.elements.arrow),ut=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ut,et=K+_t-mt,Lt=jm(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):jm(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?X8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||Q8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Z8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cA={placement:"bottom",modifiers:[],strategy:"absolute"};function dA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],fA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...fA,...e}}:t={enabled:e,options:fA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{pA(e)},effect:({state:e})=>()=>{pA(e)}},pA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function OB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(S.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function NB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function DB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function zB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}zB.displayName="PortalManager";var[BB,_0e]=_n({strict:!1,name:"PortalContext"}),J8="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=J8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(BB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=J8),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(BB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=J8;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},aw=0,FB=function(e){return e&&(e.host||FB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),aw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),aw--,aw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},$B=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function e_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function HB(){}function WB(){}WB.resetWarningCache=HB;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:WB,resetWarningCache:HB};return n.PropTypes=n,n};Nn.exports=N0e();var WC="data-focus-lock",VB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function UB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var sw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function GB(e){return e}function jB(e,t){t===void 0&&(t=GB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function t_(e,t){return t===void 0&&(t=GB),jB(e,t)}function YB(e){e===void 0&&(e={});var t=jB(null);return t.options=yl({async:!0,ssr:!1},e),t}var qB=function(e){var t=e.sideCar,n=Dz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};qB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),qB}var KB=t_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),XB=t_(),W0e=t_(),V0e=YB({async:!0}),U0e=[],n_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&KB.useMedium(Je)},[]),me=XB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[VB]=g&&"disabled",r[WC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=UB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:sw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw})]})});n_.propTypes={};n_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const ZB=n_;function VC(e,t){return VC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VC(e,t)}function r_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,VC(e,t)}function QB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){r_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return QB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],o_=e1e.join(","),t1e="".concat(o_,", [data-focus-guard]"),sF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:o_)?[i]:[],sF(i))},[])},a_=function(e,t){return e.reduce(function(n,r){return n.concat(sF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(o_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return a_([n])}).reduce(function(n,r){return n.concat(r)},[])},s_=function(e,t){return $l(e).filter(function(n){return tF(t,n)}).filter(function(n){return X0e(n)})},gA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return nF(t,n)})},GC=function(e,t,n){return aF(s_(a_(e,n),t),!0,n)},mA=function(e,t){return aF(s_(a_(e),t),!1)},r1e=function(e,t){return s_(n1e(e),t)},Nv=function(e,t){return e.shadowRoot?Nv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Nv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},lF=function(e){return e.parentNode?lF(e.parentNode):e},l_=function(e){var t=UC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(WC);return n.push.apply(n,i?i1e($l(lF(r).querySelectorAll("[".concat(WC,'="').concat(i,'"]:not([').concat(VB,'="disabled"])')))):[r]),n},[])},uF=function(e){return e.activeElement?e.activeElement.shadowRoot?uF(e.activeElement.shadowRoot):e.activeElement:void 0},u_=function(){return document.activeElement?document.activeElement.shadowRoot?uF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},cF=function(e){var t=document&&u_();return!t||t.dataset&&t.dataset.focusGuard?!1:l_(e).some(function(n){return Nv(n,t)||a1e(n)})},s1e=function(){var e=document&&u_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Nv(t,e)}):!1},l1e=function(e,t){return t.filter(oF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},c_=function(e,t){return oF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(c_(n,e))}),e.filter(function(n){return t.has(n)})},vA=function(e){return e[0]&&e.length>1?c_(e[0],e):e[0]},yA=function(e,t){return e.length>1?e.indexOf(c_(e[t],e)):t},dF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=i_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),S=u1e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=yA(e,0),k=yA(e,i-1);if(l===-1||h===-1)return dF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=rF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=gA(r.filter(d1e(n)));return i&&i.length?vA(i):vA(gA(t))},jC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&jC(e.parentNode.host||e.parentNode,t),t},lw=function(e,t){for(var n=jC(e),r=jC(t),i=0;i=0)return o}return!1},fF=function(e,t,n){var r=UC(e),i=UC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=lw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=lw(o,l);u&&(!a||Nv(u,a)?a=u:a=lw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&u_(),r=l_(e).filter(i4),i=fF(n||e,e,r),o=new Map,a=mA(r,o),s=GC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=mA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===dF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=l_(e).filter(i4),n=fF(e,e,t),r=new Map,i=GC([n],r,!0),o=GC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:i_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},uw=0,cw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!cw&&r){if(uw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),cw=!0,setTimeout(function(){cw=!1},1);return}uw++,v1e(r.node,n.focusOptions),uw--}};const hF=y1e;function pF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,Dv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function SA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(Dv):Dv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(cF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=hF(g,r0,{focusOptions:l}),A0={})),Dv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),SA(S,v.length,1,v),SA(S,-1,-1,v))}}}return t},gF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},d_=function(){return pF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},mF=function(){Dv="just",setTimeout(function(){Dv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",gF),document.addEventListener("focusout",d_),window.addEventListener("blur",mF)},I1e=function(){document.removeEventListener("focusin",gF),document.removeEventListener("focusout",d_),window.removeEventListener("blur",mF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),pF(o4)):(I1e(),r0=null)}KB.assignSyncMedium(L1e);XB.assignMedium(d_);W0e.assignMedium(function(e){return e({moveFocusInside:hF,focusInside:cF})});const N1e=G0e(R1e,O1e)(A1e);var vF=C.exports.forwardRef(function(t,n){return x(ZB,{sideCar:N1e,ref:n,...t})}),yF=ZB.propTypes||{};yF.sideCar;e_(yF,["sideCar"]);vF.propTypes={};const D1e=vF;var SF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&_B(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};SF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",bF=YB(),dw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:dw,onWheelCapture:dw,onTouchMoveCapture:dw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Dz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=UB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:bF,removeScrollBar:u,shards:g,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},fw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[fw(n),fw(r),fw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=xF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(z1e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -404,10 +404,10 @@ Error generating stack: `+o.message+` body { `).concat(B1e,": ").concat(s,`px; } -`)},X1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Y1e(i)},[i]);return x(q1e,{styles:K1e(o,!t,i,n?"":"!important")})},YC=!1;if(typeof window<"u")try{var Yy=Object.defineProperty({},"passive",{get:function(){return YC=!0,!0}});window.addEventListener("test",Yy,Yy),window.removeEventListener("test",Yy,Yy)}catch{YC=!1}var Mp=YC?{passive:!1}:!1,Z1e=function(e){return e.tagName==="TEXTAREA"},xF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z1e(e)&&n[t]==="visible")},Q1e=function(e){return xF(e,"overflowY")},J1e=function(e){return xF(e,"overflowX")},SA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=wF(e,n);if(r){var i=CF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ege=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wF=function(e,t){return e==="v"?Q1e(t):J1e(t)},CF=function(e,t){return e==="v"?ege(t):tge(t)},nge=function(e,t){return e==="h"&&t==="rtl"?-1:1},rge=function(e,t,n,r,i){var o=nge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=CF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&wF(e,s)&&(g+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bA=function(e){return[e.deltaX,e.deltaY]},xA=function(e){return e&&"current"in e?e.current:e},ige=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oge=function(e){return` +`)},X1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Y1e(i)},[i]);return x(q1e,{styles:K1e(o,!t,i,n?"":"!important")})},YC=!1;if(typeof window<"u")try{var Yy=Object.defineProperty({},"passive",{get:function(){return YC=!0,!0}});window.addEventListener("test",Yy,Yy),window.removeEventListener("test",Yy,Yy)}catch{YC=!1}var Mp=YC?{passive:!1}:!1,Z1e=function(e){return e.tagName==="TEXTAREA"},wF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z1e(e)&&n[t]==="visible")},Q1e=function(e){return wF(e,"overflowY")},J1e=function(e){return wF(e,"overflowX")},bA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=CF(e,n);if(r){var i=_F(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ege=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},CF=function(e,t){return e==="v"?Q1e(t):J1e(t)},_F=function(e,t){return e==="v"?ege(t):tge(t)},nge=function(e,t){return e==="h"&&t==="rtl"?-1:1},rge=function(e,t,n,r,i){var o=nge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=_F(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&CF(e,s)&&(g+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xA=function(e){return[e.deltaX,e.deltaY]},wA=function(e){return e&&"current"in e?e.current:e},ige=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oge=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},age=0,Ip=[];function sge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(age++)[0],o=C.exports.useState(function(){return bF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=MC([e.lockRef.current],(e.shards||[]).map(xA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=qy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,O=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=SA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=SA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?bA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(xA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,bA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,S=e.inert;return ee(Ln,{children:[S?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(SF,sge);var _F=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});_F.classNames=RS.classNames;const kF=_F;var Sh=(...e)=>e.filter(Boolean).join(" ");function fm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},qC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&qC.add(e),()=>{qC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:fm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!qC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:fm(z.onClick,O),onKeyDown:fm(z.onKeyDown,E),onMouseDown:fm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return FB(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:S,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var zv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});zv.displayName="ModalBody";var f_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:fm(n,l=>{l.stopPropagation(),o()}),...i})});f_.displayName="ModalCloseButton";function EF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=k8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(yF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(kF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...RC,custom:{offsetY:16,reverse:!0}},slideInRight:{...RC,custom:{offsetX:16,reverse:!0}},scale:{...Bz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],PF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});PF.displayName="ModalTransition";var Bv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(EF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(PF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Bv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:zz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function TF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var LF=Ee((e,t)=>x(Bv,{ref:t,role:"alertdialog",...e})),[bTe,bge]=_n(),xge=be(Fz),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(EF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var AF=(...e)=>e.filter(Boolean).join(" "),hw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function wA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,CA=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},CA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},CA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ut=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ut,mt);wA(Je,"disabled",Pe.stop,Pe.isSpinning),wA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ut(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ut,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ut(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":hw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,h_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),p_=Ee(function(t,n){const r=Ri("NumberInput",t),i=yn(t),o=z8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:AF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});p_.displayName="NumberInput";var MF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});MF.displayName="NumberInputStepper";var g_=Ee(function(t,n){const{getInputProps:r}=h_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:AF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});g_.displayName="NumberInputField";var IF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),m_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=h_(),o=i(t,n);return x(IF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});m_.displayName="NumberDecrementStepper";var v_=Ee(function(t,n){const{getIncrementButtonProps:r}=h_(),i=r(t,n),o=DS();return x(IF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});v_.displayName="NumberIncrementStepper";var u2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,c2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=OB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=RB({...w,enabled:E||!!S}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=NB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=_A(St),wt=pw(O.current,Yt),Gt=pw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ut=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=_A(St),wt=!pw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ut,getHeaderProps:mt,getBodyProps:Pe}}function pw(e,t){return e===t||e?.contains(t)}function _A(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function y_(e){const t=Ri("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}y_.displayName="Popover";function S_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=c2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:u2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}S_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=c2();return ae.createElement(be.div,{...r(t,n),className:u2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=c2();return x(AS,{size:"sm",onClick:r,className:u2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),RF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});RF.displayName="PopoverTransition";var b_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=c2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(RF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:u2("chakra-popover__content",t.className),__css:h}))});b_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=c2();return ae.createElement(be.header,{...r(t,n),className:u2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function x_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}x_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function OF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var NF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};NF.displayName="Shape";var KC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});KC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=OF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ee(NF,{size:n,isIndeterminate:v,children:[x(KC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(KC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=OF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),DF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:S,...w}=yn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});DF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var zF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});zF.displayName="SelectField";var BF=Ee((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...S}=yn(e),[w,E]=ime(S,kQ),P=D8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(zF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(FF,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});BF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),FF=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};FF.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function $F(e){return!!e.touches}function ume(e){return $F(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function HF(e,t="page"){return $F(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:HF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function WF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:HF(e)},{timestamp:i}=tT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,gw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=gw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=tT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=gw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function kA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gw(e,t){return{point:e.point,delta:kA(e.point,t[t.length-1]),offset:kA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function mw(e,t){return Math.abs(e-t)}function EA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return mw(e,t);if(EA(e)&&EA(t)){const n=mw(e.x,t.x),r=mw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function VF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=WF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function UF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=UF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function hm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function GF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...hm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...hm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...hm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),S={...l,...hm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function jF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=jF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*S,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=UF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ut=C.exports.useId(),Pe=Pme(u??ut),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Kz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=S||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(BC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>GF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};VF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...hm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,w_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),YF=Ee(function(t,n){const r=Ri("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});YF.defaultProps={orientation:"horizontal"};YF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=w_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=jF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=S||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=WF({min:t,max:n,step:S,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ut=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Kz(Qt,un.min,un.max);return un.step&&(er=parseFloat(BC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(BC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return GF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ut(ze);ot!=null&&ot!==Se.current.value&&j(ot)}VF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),C_=Ee((e,t)=>{const n=Ri("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});C_.defaultProps={orientation:"horizontal"};C_.displayName="Slider";var qF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});qF.displayName="SliderThumb";var KF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});KF.displayName="SliderTrack";var XF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});XF.displayName="SliderFilledTrack";var XC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});XC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),PA=e=>e?"":void 0,__=Ee(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Yz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":PA(s.isChecked),"data-hover":PA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:S},o))});__.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function ZC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,ZF,Vme,Ume]=sD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const S=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[jme,d2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=d2(),i=ZF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ZC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=d2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:ZC(e.onClick,m)}),w="button";return{...S,id:QF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":JF(a,u),onFocus:t?void 0:ZC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=d2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:JF(n,s),tabId:QF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=d2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=NB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=d2(),t=ZF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function QF(e,t){return`${e}--tab-${t}`}function JF(e,t){return`${e}--tabpanel-${t}`}var[eve,f2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),e$=Ee(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});e$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=f2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...f2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var t$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=f2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});t$.displayName="TabPanel";var n$=Ee(function(t,n){const r=Zme(t),i=f2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});n$.displayName="TabPanels";var r$=Ee(function(t,n){const r=f2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});r$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],i$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=D8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});i$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function QC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function TA(e,t){const n=o$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function o$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=TA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:a$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=o$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(TA(Sl.getState(),i).position)}}var LA=0;function pve(e,t={}){LA+=1;const n=t.id??LA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Hz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Vz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Uz,{id:u?.title,children:i}),s&&x(Wz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function a$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=a$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...QC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...QC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function h2(e){const{theme:t}=iD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},s$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},QC(n,{id:t,onClose:E})))});s$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=s$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Xg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},JC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=OB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=RB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=JC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ut=JC(K);ce.current=ut.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ut={},mt=null)=>({...ut,ref:Wn(K,mt,$),onPointerEnter:Xg(ut.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Xg(ut.onClick,_e),onPointerDown:Xg(ut.onPointerDown,Je),onFocus:Xg(ut.onFocus,Se),onBlur:Xg(ut.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ut={},mt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,S,w]),pt=C.exports.useCallback((ut={},mt=null)=>{const Pe={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ut,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var vw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(vw,t),()=>n.removeEventListener(vw,t)},[t,e]),()=>{const n=a4(e),r=JC(e);n.dispatchEvent(new r.CustomEvent(vw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(mB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(sN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(DB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:k_(e)?2:E_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function l$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function u$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function k_(e){return Rve&&e instanceof Map}function E_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function P_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=d$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return T_(r,!0)},!0)),e}function Tve(){xs(2)}function L_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=r7[e];return t||xs(18,e),t}function Lve(e,t){r7[e]||(r7[e]=t)}function e7(){return Fv}function yw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){t7(e),e.p.forEach(Ave),e.p=null}function t7(e){e===Fv&&(Fv=e.l)}function AA(e){return Fv={p:[],l:Fv,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function Sw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==c$?e:void 0}function l4(e,t,n){if(L_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return MA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=P_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return MA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function MA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(l$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!L_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&T_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function IA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function xw(e){e.o||(e.o=P_(e.t))}function n7(e,t,n){var r=k_(t)?Ll("MapSet").N(t,n):E_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:e7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=$v;a&&(l=[s],u=pm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:e7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=RA(n,o),i.I=!1}else r=RA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||l$(r,a,t(s))}),o===3?new Set(r):r}(e)}function RA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return P_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return $v.get(l,o)},set:function(l){var u=this[rr];$v.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!u$(m,g))return!0}}var S=!!a[rr];return l.length!==O0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,f$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function zA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(M_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function h$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=bA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=bA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?xA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(wA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,xA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,S=e.inert;return ee(Ln,{children:[S?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(bF,sge);var kF=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});kF.classNames=RS.classNames;const EF=kF;var Sh=(...e)=>e.filter(Boolean).join(" ");function fm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},qC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&qC.add(e),()=>{qC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:fm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!qC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:fm(z.onClick,O),onKeyDown:fm(z.onKeyDown,E),onMouseDown:fm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return $B(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:S,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var zv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});zv.displayName="ModalBody";var f_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:fm(n,l=>{l.stopPropagation(),o()}),...i})});f_.displayName="ModalCloseButton";function PF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=k8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(SF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(EF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...RC,custom:{offsetY:16,reverse:!0}},slideInRight:{...RC,custom:{offsetX:16,reverse:!0}},scale:{...Fz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],TF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});TF.displayName="ModalTransition";var Bv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(PF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(TF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Bv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:Bz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function LF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var AF=Ee((e,t)=>x(Bv,{ref:t,role:"alertdialog",...e})),[bTe,bge]=_n(),xge=be($z),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(PF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var MF=(...e)=>e.filter(Boolean).join(" "),hw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function CA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,_A=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},_A)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},_A)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ut=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ut,mt);CA(Je,"disabled",Pe.stop,Pe.isSpinning),CA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ut(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ut,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ut(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":hw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,h_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),p_=Ee(function(t,n){const r=Ri("NumberInput",t),i=yn(t),o=z8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:MF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});p_.displayName="NumberInput";var IF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});IF.displayName="NumberInputStepper";var g_=Ee(function(t,n){const{getInputProps:r}=h_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:MF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});g_.displayName="NumberInputField";var RF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),m_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=h_(),o=i(t,n);return x(RF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});m_.displayName="NumberDecrementStepper";var v_=Ee(function(t,n){const{getIncrementButtonProps:r}=h_(),i=r(t,n),o=DS();return x(RF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});v_.displayName="NumberIncrementStepper";var u2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,c2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=NB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=OB({...w,enabled:E||!!S}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=DB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=kA(St),wt=pw(O.current,Yt),Gt=pw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ut=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=kA(St),wt=!pw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ut,getHeaderProps:mt,getBodyProps:Pe}}function pw(e,t){return e===t||e?.contains(t)}function kA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function y_(e){const t=Ri("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}y_.displayName="Popover";function S_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=c2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:u2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}S_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=c2();return ae.createElement(be.div,{...r(t,n),className:u2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=c2();return x(AS,{size:"sm",onClick:r,className:u2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),OF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});OF.displayName="PopoverTransition";var b_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=c2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(OF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:u2("chakra-popover__content",t.className),__css:h}))});b_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=c2();return ae.createElement(be.header,{...r(t,n),className:u2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function x_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}x_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function NF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var DF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};DF.displayName="Shape";var KC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});KC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=NF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ee(DF,{size:n,isIndeterminate:v,children:[x(KC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(KC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=NF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),zF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:S,...w}=yn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});zF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var BF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});BF.displayName="SelectField";var FF=Ee((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...S}=yn(e),[w,E]=ime(S,kQ),P=D8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(BF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x($F,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});FF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),$F=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};$F.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function HF(e){return!!e.touches}function ume(e){return HF(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function WF(e,t="page"){return HF(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:WF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function VF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:WF(e)},{timestamp:i}=nT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,gw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=gw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=nT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=gw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function EA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gw(e,t){return{point:e.point,delta:EA(e.point,t[t.length-1]),offset:EA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function mw(e,t){return Math.abs(e-t)}function PA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return mw(e,t);if(PA(e)&&PA(t)){const n=mw(e.x,t.x),r=mw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function UF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=VF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function GF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=GF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function hm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function jF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...hm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...hm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...hm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),S={...l,...hm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function YF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=YF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*S,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=GF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ut=C.exports.useId(),Pe=Pme(u??ut),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Xz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=S||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(BC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>jF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};UF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...hm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,w_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),qF=Ee(function(t,n){const r=Ri("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});qF.defaultProps={orientation:"horizontal"};qF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=w_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=YF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=S||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=VF({min:t,max:n,step:S,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ut=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Xz(Qt,un.min,un.max);return un.step&&(er=parseFloat(BC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(BC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return jF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ut(ze);ot!=null&&ot!==Se.current.value&&j(ot)}UF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),C_=Ee((e,t)=>{const n=Ri("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});C_.defaultProps={orientation:"horizontal"};C_.displayName="Slider";var KF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});KF.displayName="SliderThumb";var XF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});XF.displayName="SliderTrack";var ZF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});ZF.displayName="SliderFilledTrack";var XC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});XC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,__=Ee(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=qz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":TA(s.isChecked),"data-hover":TA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:S},o))});__.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function ZC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,QF,Vme,Ume]=lD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const S=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[jme,d2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=d2(),i=QF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ZC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=d2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:ZC(e.onClick,m)}),w="button";return{...S,id:JF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":e$(a,u),onFocus:t?void 0:ZC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=d2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:e$(n,s),tabId:JF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=d2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=DB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=d2(),t=QF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function JF(e,t){return`${e}--tab-${t}`}function e$(e,t){return`${e}--tabpanel-${t}`}var[eve,f2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),t$=Ee(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});t$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=f2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...f2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var n$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=f2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});n$.displayName="TabPanel";var r$=Ee(function(t,n){const r=Zme(t),i=f2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});r$.displayName="TabPanels";var i$=Ee(function(t,n){const r=f2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});i$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],o$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=D8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});o$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function QC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function LA(e,t){const n=a$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function a$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=LA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:s$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=a$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(LA(Sl.getState(),i).position)}}var AA=0;function pve(e,t={}){AA+=1;const n=t.id??AA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Uz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Gz,{id:u?.title,children:i}),s&&x(Vz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function s$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=s$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...QC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...QC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function h2(e){const{theme:t}=oD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},l$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},QC(n,{id:t,onClose:E})))});l$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=l$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Xg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},JC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=NB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=OB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=JC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ut=JC(K);ce.current=ut.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ut={},mt=null)=>({...ut,ref:Wn(K,mt,$),onPointerEnter:Xg(ut.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Xg(ut.onClick,_e),onPointerDown:Xg(ut.onPointerDown,Je),onFocus:Xg(ut.onFocus,Se),onBlur:Xg(ut.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ut={},mt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,S,w]),pt=C.exports.useCallback((ut={},mt=null)=>{const Pe={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ut,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var vw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(vw,t),()=>n.removeEventListener(vw,t)},[t,e]),()=>{const n=a4(e),r=JC(e);n.dispatchEvent(new r.CustomEvent(vw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(vB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(lN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(zB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:k_(e)?2:E_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function u$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function c$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function k_(e){return Rve&&e instanceof Map}function E_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function P_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=f$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return T_(r,!0)},!0)),e}function Tve(){xs(2)}function L_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=r7[e];return t||xs(18,e),t}function Lve(e,t){r7[e]||(r7[e]=t)}function e7(){return Fv}function yw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){t7(e),e.p.forEach(Ave),e.p=null}function t7(e){e===Fv&&(Fv=e.l)}function MA(e){return Fv={p:[],l:Fv,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function Sw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==d$?e:void 0}function l4(e,t,n){if(L_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return IA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=P_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return IA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function IA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(u$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!L_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&T_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function RA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function xw(e){e.o||(e.o=P_(e.t))}function n7(e,t,n){var r=k_(t)?Ll("MapSet").N(t,n):E_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:e7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=$v;a&&(l=[s],u=pm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:e7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=OA(n,o),i.I=!1}else r=OA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||u$(r,a,t(s))}),o===3?new Set(r):r}(e)}function OA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return P_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return $v.get(l,o)},set:function(l){var u=this[rr];$v.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!c$(m,g))return!0}}var S=!!a[rr];return l.length!==O0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,h$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(M_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function p$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k2e:_2e;y$.useSyncExternalStore=r1.useSyncExternalStore!==void 0?r1.useSyncExternalStore:E2e;(function(e){e.exports=y$})(v$);var S$={exports:{}},b$={};/** + */var r1=C.exports;function y2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S2e=typeof Object.is=="function"?Object.is:y2e,b2e=r1.useState,x2e=r1.useEffect,w2e=r1.useLayoutEffect,C2e=r1.useDebugValue;function _2e(e,t){var n=t(),r=b2e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return w2e(function(){i.value=n,i.getSnapshot=t,kw(i)&&o({inst:i})},[e,n,t]),x2e(function(){return kw(i)&&o({inst:i}),e(function(){kw(i)&&o({inst:i})})},[e]),C2e(n),n}function kw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!S2e(e,n)}catch{return!0}}function k2e(e,t){return t()}var E2e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k2e:_2e;S$.useSyncExternalStore=r1.useSyncExternalStore!==void 0?r1.useSyncExternalStore:E2e;(function(e){e.exports=S$})(y$);var b$={exports:{}},x$={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -423,7 +423,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var HS=C.exports,P2e=v$.exports;function T2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var L2e=typeof Object.is=="function"?Object.is:T2e,A2e=P2e.useSyncExternalStore,M2e=HS.useRef,I2e=HS.useEffect,R2e=HS.useMemo,O2e=HS.useDebugValue;b$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=M2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=R2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return g=S}return g=v}if(S=g,L2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=A2e(e,o[0],o[1]);return I2e(function(){a.hasValue=!0,a.value=s},[s]),O2e(s),s};(function(e){e.exports=b$})(S$);function N2e(e){e()}let x$=N2e;const D2e=e=>x$=e,z2e=()=>x$,fd=C.exports.createContext(null);function w$(){return C.exports.useContext(fd)}const B2e=()=>{throw new Error("uSES not initialized!")};let C$=B2e;const F2e=e=>{C$=e},$2e=(e,t)=>e===t;function H2e(e=fd){const t=e===fd?w$:()=>C.exports.useContext(e);return function(r,i=$2e){const{store:o,subscription:a,getServerState:s}=t(),l=C$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const W2e=H2e();var V2e={exports:{}},In={};/** + */var HS=C.exports,P2e=y$.exports;function T2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var L2e=typeof Object.is=="function"?Object.is:T2e,A2e=P2e.useSyncExternalStore,M2e=HS.useRef,I2e=HS.useEffect,R2e=HS.useMemo,O2e=HS.useDebugValue;x$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=M2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=R2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return g=S}return g=v}if(S=g,L2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=A2e(e,o[0],o[1]);return I2e(function(){a.hasValue=!0,a.value=s},[s]),O2e(s),s};(function(e){e.exports=x$})(b$);function N2e(e){e()}let w$=N2e;const D2e=e=>w$=e,z2e=()=>w$,fd=C.exports.createContext(null);function C$(){return C.exports.useContext(fd)}const B2e=()=>{throw new Error("uSES not initialized!")};let _$=B2e;const F2e=e=>{_$=e},$2e=(e,t)=>e===t;function H2e(e=fd){const t=e===fd?C$:()=>C.exports.useContext(e);return function(r,i=$2e){const{store:o,subscription:a,getServerState:s}=t(),l=_$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const W2e=H2e();var V2e={exports:{}},In={};/** * @license React * react-is.production.min.js * @@ -431,7 +431,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var R_=Symbol.for("react.element"),O_=Symbol.for("react.portal"),WS=Symbol.for("react.fragment"),VS=Symbol.for("react.strict_mode"),US=Symbol.for("react.profiler"),GS=Symbol.for("react.provider"),jS=Symbol.for("react.context"),U2e=Symbol.for("react.server_context"),YS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.suspense_list"),XS=Symbol.for("react.memo"),ZS=Symbol.for("react.lazy"),G2e=Symbol.for("react.offscreen"),_$;_$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case R_:switch(e=e.type,e){case WS:case US:case VS:case qS:case KS:return e;default:switch(e=e&&e.$$typeof,e){case U2e:case jS:case YS:case ZS:case XS:case GS:return e;default:return t}}case O_:return t}}}In.ContextConsumer=jS;In.ContextProvider=GS;In.Element=R_;In.ForwardRef=YS;In.Fragment=WS;In.Lazy=ZS;In.Memo=XS;In.Portal=O_;In.Profiler=US;In.StrictMode=VS;In.Suspense=qS;In.SuspenseList=KS;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===jS};In.isContextProvider=function(e){return qa(e)===GS};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===R_};In.isForwardRef=function(e){return qa(e)===YS};In.isFragment=function(e){return qa(e)===WS};In.isLazy=function(e){return qa(e)===ZS};In.isMemo=function(e){return qa(e)===XS};In.isPortal=function(e){return qa(e)===O_};In.isProfiler=function(e){return qa(e)===US};In.isStrictMode=function(e){return qa(e)===VS};In.isSuspense=function(e){return qa(e)===qS};In.isSuspenseList=function(e){return qa(e)===KS};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===WS||e===US||e===VS||e===qS||e===KS||e===G2e||typeof e=="object"&&e!==null&&(e.$$typeof===ZS||e.$$typeof===XS||e.$$typeof===GS||e.$$typeof===jS||e.$$typeof===YS||e.$$typeof===_$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(V2e);function j2e(){const e=z2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const GA={notify(){},get:()=>[]};function Y2e(e,t){let n,r=GA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=j2e())}function u(){n&&(n(),n=void 0,r.clear(),r=GA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const q2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K2e=q2e?C.exports.useLayoutEffect:C.exports.useEffect;function X2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return K2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||fd).Provider,{value:i,children:n})}function k$(e=fd){const t=e===fd?w$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Z2e=k$();function Q2e(e=fd){const t=e===fd?Z2e:k$(e);return function(){return t().dispatch}}const J2e=Q2e();F2e(S$.exports.useSyncExternalStoreWithSelector);D2e(Bl.exports.unstable_batchedUpdates);var N_="persist:",E$="persist/FLUSH",D_="persist/REHYDRATE",P$="persist/PAUSE",T$="persist/PERSIST",L$="persist/PURGE",A$="persist/REGISTER",eye=-1;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tye(e){for(var t=1;t{Object.keys(O).forEach(function(N){!T(N)||h[N]!==O[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){O[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=O},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var O=m.shift(),N=r.reduce(function(z,V){return V.in(z,O,h)},h[O]);if(N!==void 0)try{g[O]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[O];m.length===0&&k()}function k(){Object.keys(g).forEach(function(O){h[O]===void 0&&delete g[O]}),S=s.setItem(a,l(g)).catch(M)}function T(O){return!(n&&n.indexOf(O)===-1&&O!=="_persist"||t&&t.indexOf(O)!==-1)}function M(O){u&&u(O)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function oye(e){return JSON.stringify(e)}function aye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=sye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function sye(e){return JSON.parse(e)}function lye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key);return t.removeItem(n,uye)}function uye(e){}function YA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function fye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hye=5e3;function pye(e,t){var n=e.version!==void 0?e.version:eye;e.debug;var r=e.stateReconciler===void 0?rye:e.stateReconciler,i=e.getStoredState||aye,o=e.timeout!==void 0?e.timeout:hye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,S=dye(m,["_persist"]),w=S;if(g.type===T$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=iye(e)),v)return cu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),cu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===L$)return s=!0,g.result(lye(e)),cu({},t(w,g),{_persist:v});if(g.type===E$)return g.result(a&&a.flush()),cu({},t(w,g),{_persist:v});if(g.type===P$)l=!0;else if(g.type===D_){if(s)return cu({},w,{_persist:cu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=cu({},M,{_persist:cu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,g);var O=t(w,g);return O===w?h:u(cu({},O,{_persist:v}))}}function qA(e){return vye(e)||mye(e)||gye()}function gye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function mye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function vye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:M$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case A$:return o7({},t,{registry:[].concat(qA(t.registry),[n.key])});case D_:var r=t.registry.indexOf(n.key),i=qA(t.registry);return i.splice(r,1),o7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function bye(e,t,n){var r=n||!1,i=M_(Sye,M$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:A$,key:u})},a=function(u,h,g){var m={type:D_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=o7({},i,{purge:function(){var u=[];return e.dispatch({type:L$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:E$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:P$})},persist:function(){e.dispatch({type:T$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var z_={},B_={};B_.__esModule=!0;B_.default=Cye;function Q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Q3=function(n){return typeof n}:Q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Q3(e)}function Ew(){}var xye={getItem:Ew,setItem:Ew,removeItem:Ew};function wye(e){if((typeof self>"u"?"undefined":Q3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Cye(e){var t="".concat(e,"Storage");return wye(t)?self[t]:xye}z_.__esModule=!0;z_.default=Eye;var _ye=kye(B_);function kye(e){return e&&e.__esModule?e:{default:e}}function Eye(e){var t=(0,_ye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var I$=void 0,Pye=Tye(z_);function Tye(e){return e&&e.__esModule?e:{default:e}}var Lye=(0,Pye.default)("local");I$=Lye;var R$={},O$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(F_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=F_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const S=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=S;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},R=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=R;const O=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=O;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Re=>Re===ne),K=W.filter(Re=>(ne+".").indexOf(Re+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + */var R_=Symbol.for("react.element"),O_=Symbol.for("react.portal"),WS=Symbol.for("react.fragment"),VS=Symbol.for("react.strict_mode"),US=Symbol.for("react.profiler"),GS=Symbol.for("react.provider"),jS=Symbol.for("react.context"),U2e=Symbol.for("react.server_context"),YS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.suspense_list"),XS=Symbol.for("react.memo"),ZS=Symbol.for("react.lazy"),G2e=Symbol.for("react.offscreen"),k$;k$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case R_:switch(e=e.type,e){case WS:case US:case VS:case qS:case KS:return e;default:switch(e=e&&e.$$typeof,e){case U2e:case jS:case YS:case ZS:case XS:case GS:return e;default:return t}}case O_:return t}}}In.ContextConsumer=jS;In.ContextProvider=GS;In.Element=R_;In.ForwardRef=YS;In.Fragment=WS;In.Lazy=ZS;In.Memo=XS;In.Portal=O_;In.Profiler=US;In.StrictMode=VS;In.Suspense=qS;In.SuspenseList=KS;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===jS};In.isContextProvider=function(e){return qa(e)===GS};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===R_};In.isForwardRef=function(e){return qa(e)===YS};In.isFragment=function(e){return qa(e)===WS};In.isLazy=function(e){return qa(e)===ZS};In.isMemo=function(e){return qa(e)===XS};In.isPortal=function(e){return qa(e)===O_};In.isProfiler=function(e){return qa(e)===US};In.isStrictMode=function(e){return qa(e)===VS};In.isSuspense=function(e){return qa(e)===qS};In.isSuspenseList=function(e){return qa(e)===KS};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===WS||e===US||e===VS||e===qS||e===KS||e===G2e||typeof e=="object"&&e!==null&&(e.$$typeof===ZS||e.$$typeof===XS||e.$$typeof===GS||e.$$typeof===jS||e.$$typeof===YS||e.$$typeof===k$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(V2e);function j2e(){const e=z2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const jA={notify(){},get:()=>[]};function Y2e(e,t){let n,r=jA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=j2e())}function u(){n&&(n(),n=void 0,r.clear(),r=jA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const q2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K2e=q2e?C.exports.useLayoutEffect:C.exports.useEffect;function X2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return K2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||fd).Provider,{value:i,children:n})}function E$(e=fd){const t=e===fd?C$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Z2e=E$();function Q2e(e=fd){const t=e===fd?Z2e:E$(e);return function(){return t().dispatch}}const J2e=Q2e();F2e(b$.exports.useSyncExternalStoreWithSelector);D2e(Bl.exports.unstable_batchedUpdates);var N_="persist:",P$="persist/FLUSH",D_="persist/REHYDRATE",T$="persist/PAUSE",L$="persist/PERSIST",A$="persist/PURGE",M$="persist/REGISTER",eye=-1;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function YA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tye(e){for(var t=1;t{Object.keys(O).forEach(function(N){!T(N)||h[N]!==O[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){O[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=O},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var O=m.shift(),N=r.reduce(function(z,V){return V.in(z,O,h)},h[O]);if(N!==void 0)try{g[O]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[O];m.length===0&&k()}function k(){Object.keys(g).forEach(function(O){h[O]===void 0&&delete g[O]}),S=s.setItem(a,l(g)).catch(M)}function T(O){return!(n&&n.indexOf(O)===-1&&O!=="_persist"||t&&t.indexOf(O)!==-1)}function M(O){u&&u(O)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function oye(e){return JSON.stringify(e)}function aye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=sye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function sye(e){return JSON.parse(e)}function lye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key);return t.removeItem(n,uye)}function uye(e){}function qA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function fye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hye=5e3;function pye(e,t){var n=e.version!==void 0?e.version:eye;e.debug;var r=e.stateReconciler===void 0?rye:e.stateReconciler,i=e.getStoredState||aye,o=e.timeout!==void 0?e.timeout:hye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,S=dye(m,["_persist"]),w=S;if(g.type===L$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=iye(e)),v)return cu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),cu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===A$)return s=!0,g.result(lye(e)),cu({},t(w,g),{_persist:v});if(g.type===P$)return g.result(a&&a.flush()),cu({},t(w,g),{_persist:v});if(g.type===T$)l=!0;else if(g.type===D_){if(s)return cu({},w,{_persist:cu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=cu({},M,{_persist:cu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,g);var O=t(w,g);return O===w?h:u(cu({},O,{_persist:v}))}}function KA(e){return vye(e)||mye(e)||gye()}function gye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function mye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function vye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:I$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case M$:return o7({},t,{registry:[].concat(KA(t.registry),[n.key])});case D_:var r=t.registry.indexOf(n.key),i=KA(t.registry);return i.splice(r,1),o7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function bye(e,t,n){var r=n||!1,i=M_(Sye,I$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:M$,key:u})},a=function(u,h,g){var m={type:D_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=o7({},i,{purge:function(){var u=[];return e.dispatch({type:A$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:P$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:T$})},persist:function(){e.dispatch({type:L$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var z_={},B_={};B_.__esModule=!0;B_.default=Cye;function Q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Q3=function(n){return typeof n}:Q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Q3(e)}function Ew(){}var xye={getItem:Ew,setItem:Ew,removeItem:Ew};function wye(e){if((typeof self>"u"?"undefined":Q3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Cye(e){var t="".concat(e,"Storage");return wye(t)?self[t]:xye}z_.__esModule=!0;z_.default=Eye;var _ye=kye(B_);function kye(e){return e&&e.__esModule?e:{default:e}}function Eye(e){var t=(0,_ye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var R$=void 0,Pye=Tye(z_);function Tye(e){return e&&e.__esModule?e:{default:e}}var Lye=(0,Pye.default)("local");R$=Lye;var O$={},N$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(F_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=F_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const S=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=S;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},R=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=R;const O=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=O;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Re=>Re===ne),K=W.filter(Re=>(ne+".").indexOf(Re+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. @@ -447,16 +447,16 @@ ${JSON.stringify(ce)} ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. - ${JSON.stringify(Q)}`)};e.throwError=j;const le=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=le})(O$);(function(e){var t=Ss&&Ss.__rest||function(g,m){var v={};for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&m.indexOf(S)<0&&(v[S]=g[S]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(g,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),O=T.map(le=>Object.keys(le)[0]),N=M.map(le=>Object.keys(le)[0]),z=R.filter(le=>O.indexOf(le)===-1&&N.indexOf(le)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(le=>(0,e.createBlacklist)(le)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(R$);const J3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Aye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return $_(r)?r:!1},$_=e=>Boolean(typeof e=="string"?Aye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),p4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Mye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** + ${JSON.stringify(Q)}`)};e.throwError=j;const le=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=le})(N$);(function(e){var t=Ss&&Ss.__rest||function(g,m){var v={};for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&m.indexOf(S)<0&&(v[S]=g[S]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(g,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),O=T.map(le=>Object.keys(le)[0]),N=M.map(le=>Object.keys(le)[0]),z=R.filter(le=>O.indexOf(le)===-1&&N.indexOf(le)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(le=>(0,e.createBlacklist)(le)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(O$);const J3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Aye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return $_(r)?r:!1},$_=e=>Boolean(typeof e=="string"?Aye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),p4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Mye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ut="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,T1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,L1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,A1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,M1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,I1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,R1=/[()=,{}\[\]\/\s]/,O1=/\\(\\)?/g,N1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,D1=/^[-+]0x[0-9a-f]+$/i,z1=/^0b[01]+$/i,B1=/^\[object .+?Constructor\]$/,F1=/^0o[0-7]+$/i,$1=/^(?:0|[1-9]\d*)$/,H1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,W1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",V1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",V1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ut]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ut]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},U1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,G1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function j1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function q1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(U1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=ug,Uo.prototype.has=cg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ut||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Bk(c),!Z)return ue?Tg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),hE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):dE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function pg(c,p,b){if(typeof c!="function")throw new Si(a);return Rg(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Oi,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:gE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(rg()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Bb(Hk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var _g=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function kg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Eg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Ag(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(M1,`{ + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ut="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,T1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,L1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,A1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,M1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,I1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,R1=/[()=,{}\[\]\/\s]/,O1=/\\(\\)?/g,N1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,D1=/^[-+]0x[0-9a-f]+$/i,z1=/^0b[01]+$/i,B1=/^\[object .+?Constructor\]$/,F1=/^0o[0-7]+$/i,$1=/^(?:0|[1-9]\d*)$/,H1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,W1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",V1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",V1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ut]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ut]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},U1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,G1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function j1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function q1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(U1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=ug,Uo.prototype.has=cg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ut||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Fk(c),!Z)return ue?Tg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),pE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):fE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function pg(c,p,b){if(typeof c!="function")throw new Si(a);return Rg(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Oi,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:mE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(rg()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Bb(Wk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var _g=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function kg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Eg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Ag(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(M1,`{ /* [wrapped with `+p+`] */ -`)}function PU(c){return Ot(c)||mf(c)||!!(tg&&c&&c[tg])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&$1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Jk(c,b)});function eE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return eE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=pE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=Yk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[Fb],thisArg:n}),new ji(p,this.__chain__)}return this.thru(Fb)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:gg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Lg(qk),ZG=Lg(Kk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function tE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function nE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Ab:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function rE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function iE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Hb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Hb));A|=R}return fe(c,A,p,b,D)}),oE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(oE));A|=R}return fe(p,A,c,b,D)});function aE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=aE.placeholder,A}function sE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Rg(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,PE=p-us;return Le?Kr(PE,F-au):PE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Rg(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&_g(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return _g(Z),Z=Rg(jt,p),st(ue)}return Z===n&&(Z=Rg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return pg(c,1,p)}),yj=kt(function(c,p,b){return pg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return iE(2,c)}var xj=Rb(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!eg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):vg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||Jb,Bj=co?Er(co):yg;function Fj(c){return xr(c)&&c.nodeType===1&&!Og(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Ig(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Vb(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Og(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==mt||p==Je||p==Yt}function cE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var dE=Ui?Er(Ui):Ib;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return fE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function fE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Og(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Ub=xa?Er(xa):ar;function Xj(c){return cE(c)&&c>=-G&&c<=G}var hE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=G1?Er(G1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function pE(c){if(!c)return[];if(So(c))return sy(c)?Ni(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function gE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=z1.test(c);return b||F1.test(c)?Ye(c.slice(2),b?2:8):D1.test(c)?ce:+c}function mE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Ig(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),vE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return SE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:xg(c,p)});function SE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=rg();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?wE(p):p)});function wE(c){return Yb(xn(c).toLowerCase())}function CE(c){return c=xn(c),c&&c.replace(H1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&A1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Ub(p))&&(p=qi(p),!p&&Kl(c))?as(Ni(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+Yb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?N1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` +`)}function PU(c){return Ot(c)||mf(c)||!!(tg&&c&&c[tg])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&$1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,eE(c,b)});function tE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return tE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=gE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=qk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[Fb],thisArg:n}),new ji(p,this.__chain__)}return this.thru(Fb)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:gg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Lg(Kk),ZG=Lg(Xk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function nE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function rE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Ab:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function iE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function oE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Hb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Hb));A|=R}return fe(c,A,p,b,D)}),aE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(aE));A|=R}return fe(p,A,c,b,D)});function sE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=lE.placeholder,A}function uE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Rg(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,TE=p-us;return Le?Kr(TE,F-au):TE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Rg(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&_g(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return _g(Z),Z=Rg(jt,p),st(ue)}return Z===n&&(Z=Rg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return pg(c,1,p)}),yj=kt(function(c,p,b){return pg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return oE(2,c)}var xj=Rb(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!eg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):vg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||Jb,Bj=co?Er(co):yg;function Fj(c){return xr(c)&&c.nodeType===1&&!Og(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Ig(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Vb(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Og(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==mt||p==Je||p==Yt}function dE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var fE=Ui?Er(Ui):Ib;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return hE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function hE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Og(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Ub=xa?Er(xa):ar;function Xj(c){return dE(c)&&c>=-G&&c<=G}var pE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=G1?Er(G1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function gE(c){if(!c)return[];if(So(c))return sy(c)?Ni(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function mE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=z1.test(c);return b||F1.test(c)?Ye(c.slice(2),b?2:8):D1.test(c)?ce:+c}function vE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Ig(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),yE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return bE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:xg(c,p)});function bE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=rg();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?CE(p):p)});function CE(c){return Yb(xn(c).toLowerCase())}function _E(c){return c=xn(c),c&&c.replace(H1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&A1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Ub(p))&&(p=qi(p),!p&&Kl(c))?as(Ni(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+Yb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?N1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` `;c.replace(Ve,function(xt,jt,en,Qo,Zi,Jo){return en||(en=Qo),Le+=c.slice(we,Jo).replace(W1,Vs),jt&&(Z=!0,Le+=`' + __e(`+jt+`) + '`),Zi&&(ue=!0,Le+=`'; @@ -473,7 +473,7 @@ __p += '`),en&&(Le+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Le+`return __p -}`;var $t=kE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Vb($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,X1(c)+1);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Ub(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&T1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),Yb=xp("toUpperCase");function _E(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):Y1(c):c.match(p)||[]}var kE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Vb(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Hb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,N$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&N$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},D$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?N$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),z$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=z$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),B$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=B$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),H_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=H_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=H_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),F$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),$$=Be((e,t)=>{var n=eb(),r=F$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),H$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=$$(),r=Xye(),i=F$(),o=H$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),W_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=W_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),W$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=W_(),i=W$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=W$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),V$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=H_(),r=y3e(),i=z$(),o=V$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case S:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=V_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),U$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=G$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[S]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=B$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),j$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=V_(),o=U$(),a=M3e(),s=j$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),S=!v&&r(g),w=!v&&!S&&o(g),E=!v&&!S&&!w&&s(g),P=v||S||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=$$(),r=G$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=W_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=H$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=V$(),i=x3e(),o=V3e(),a=q3e(),s=V_(),l=U$(),u=j$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),Y$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Pw(e,t=","){return typeof e=="string"?e.split(t):e}function qm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return q$(e,["input","textarea","select"])}function q$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=D$(Y$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var XA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!q$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){XA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Pw(e,u?.splitKey).forEach(E=>{let P=qm(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){XA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.addHotkey(qm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.removeHotkey(qm(w,u?.combinationKey)))}},[e,l,u,h]),i}D$(Y$());var a7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>a7.add(qm(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=qm(t);for(let r of a7)r.keys?.every(i=>n.keys?.includes(i))&&a7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Wi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Wi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ZA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(ZA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(ZA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(p_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(g_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(v_,{...P,className:"invokeai__number-input-stepper-button"}),x(m_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(BF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],U_=0,G_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),j_=()=>{const e=je(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(__,{className:"invokeai__switch-root",...s})]})})};function K$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Bke(i.target.checked))})}function P5e(){const e=je(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var X$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},QA=ae.createContext&&ae.createContext(X$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(S?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(cB,{w:"100%",gap:2,children:[ee(C_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(XC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(XC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(KF,{className:"invokeai__slider_track",...j,children:x(XF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(qF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(p_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(g_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(MF,{...ne,children:[x(v_,{className:"invokeai__slider-number-stepper"}),x(m_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(Y_,{}),onClick:Se,isDisabled:M,...K})]})]})}function Q$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=je();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(D7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(D7(.5))}})}const N5e=()=>{const e=je(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=je(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},J$=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Dke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=je(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:U_,max:G_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const eH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(eH(U_,G_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=je(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=je(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const q_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),K_=()=>{const e=je(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(z7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(B7(a)),value:n,isInteger:!1})]})};function tH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(zke(i.target.checked))})}function X_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=je();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Ike(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(W8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=je(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!($_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=je();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n($ke(i)),isInteger:!1})}const Z_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=je(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ct(e=>e.options,e=>wb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const Q_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ct([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=je(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Ake(r)),value:t,width:J_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=je();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=je(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const J_="auto";function ek(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},nH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Tw,setIsConnected:JA,setSocketId:xTe,setShouldConfirmOnDelete:rH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:eM,errorSeen:iH,setModelList:tM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:gm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=nH.actions,h4e=nH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function oH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ct(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(y_,{trigger:"hover",children:[x(x_,{children:x(vh,{children:e})}),ee(b_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(S_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const tk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=je();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function nk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function nM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ok=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,fH=e=>e.canvas.layerState.objects.find(g4),hH=ct([e=>e.options,e=>e.system,fH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!($_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),s7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),l7=ti("socketio/requestImages"),rM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),pH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function gH(e){const{iconButton:t=!1,...n}=e,r=je(),{isReady:i}=Ae(hH),o=Ae(_r),a=()=>{r(s7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(s7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function mH(e){const{...t}=e,n=je(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ct(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=je(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(Oke(!t))}})},ak=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(gH,{}),e==="img2img"&&x(fSe,{}),x(mH,{})]})},hSe=ct([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),sk=()=>{const e=je(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(hH),i=C.exports.useRef(null),o=s=>{e(Cb(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(s7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(i$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function vH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function iM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=iM(e.className,t):e.setAttribute("class",iM(e.className&&e.className.baseVal||"",t))}const oM={disabled:!1},SH=ae.createContext(null);var bH=function(t){return t.scrollTop},mm="unmounted",Pf="exited",Tf="entering",Hp="entered",u7="exiting",Ou=function(e){r_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=mm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===mm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=u7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&bH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:mm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||oM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||oM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:u7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=e_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(SH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=SH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=mm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=u7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Lw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},lk=function(e){r_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Zg=.95,aM=30,c7=10,sM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),vm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:vm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},wH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ok(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...vm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Zg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=sM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=vm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Zg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=sM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Zg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Zg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Zg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:CH,addPointToCurrentLine:_H,clearCanvasHistory:kH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:wTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:EH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:PH,resizeCanvas:OSe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:CTe,setBoundingBoxScaleMethod:NSe,setBrushColor:Mw,setBrushSize:Iw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:uk,setInpaintReplace:lM,setIsDrawing:ob,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:_Te,setIsMoveStageKeyHeld:kTe,setIsMovingBoundingBox:uM,setIsMovingStage:m4,setIsTransformingBoundingBox:Rw,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:ETe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:PTe,setShouldShowBrushPreview:TTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:LTe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:cM,setShouldSnapToGrid:dM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:ATe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:MTe,toggleTool:ITe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=wH.actions,QSe=wH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),ck=e=>{const t=je(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Mke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Nke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(xH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(vH,{}):x(yH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(K$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(tH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(J$,{})}};return ee(ck,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(Q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(tk,{accordionInfo:e})]})}const dk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(dk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(rk,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Iv(),a=je(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(rH(!S.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(TF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(LF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(zv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(__,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(y_,{...o,children:[x(x_,{children:t}),ee(b_,{className:`invokeai__popover-content ${r}`,children:[i&&x(S_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ct([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=je(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=h2(),v=()=>{!u||(h&&e(pd(!1)),e(S2(u)),e(ko("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Pke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(Cb(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(uk(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(nM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(nM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:S,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(uH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(j_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(K_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(lH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(d7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Ow,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:fk,selectPrevImage:hk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Qg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=je();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:S,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(z7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(B7(M))}),S&&x(On,{label:"Prompt",labelPosition:"top",value:J3(S),onClick:()=>n(Cb(S))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(S2(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(D7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(z7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(B7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(oB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=je(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(hk())},g=()=>{e(fk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(aH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ct([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(dk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(rk,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=je(),n=h2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],mM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(mM):o.className+=mM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Nw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Nw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Nw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(g-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,S=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=gM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=gM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=pM(M,this.props.grid[0]),z=pM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(S.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(S.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function p2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...S}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Hv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(f7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(f7,An({},r,{ref:t}),n)});Hv.displayName="Slot";const f7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});f7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Hv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=p2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(S,P.collectionRef);return ae.createElement(Hv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(S,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Hv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const h7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let vM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(vM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),yM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=vM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),yM())},[g,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(h7,z),()=>document.removeEventListener(h7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yM(){const e=new CustomEvent(h7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let Dw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:SM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:SM()),Dw++,()=>{Dw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Dw--}},[])}function SM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zw="focusScope.autoFocusOnMount",Bw="focusScope.autoFocusOnUnmount",bM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){wM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(zw,bM);s.addEventListener(zw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(zw,u),setTimeout(()=>{const P=new CustomEvent(Bw,bM);s.addEventListener(Bw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Bw,h),wM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=xM(t,e),r=xM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const wM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=CM(e,t),e.unshift(t)},remove(t){var n;e=CM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function CM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=Jw["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function ab(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function pk(e){return e==="y"?"height":"width"}function _M(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=pk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(ab(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=_M(l,r,s),g=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=ab(a),v=pk(g),S=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,V=p7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=ab(e),i=_1(e),o=pk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function EM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[EM(e),t,EM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function PM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=PM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:TM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=PM(o,i.floating);return{data:{escapedOffsets:a,escaped:TM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=ab(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],S=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=p7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=p7(k,S,T)}const w=s.fn({...t,[g]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);Sz&&(S=z)}return{[g]:v,[m]:S}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function g2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function gk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sb(e){const{overflow:t,overflowX:n,overflowY:r}=g2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=g2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const LM=Math.min,Km=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function lb(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+lb(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||sb(i))&&(a=lb(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(gk(e)?e.host:null)||_d(e)}function AM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(gk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function g7(e){const t=Nu(e);let n=AM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=AM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function MM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||sb(o))&&(a=lb(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=lb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Km(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Km(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return g2(i||n).direction==="rtl"&&(s+=Km(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&sb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],sb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&gk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function IM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(g2(e).position)&&Dl(e)?g7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=IM(t,h,i);return u.top=Km(g.top,u.top),u.right=LM(g.right,u.right),u.bottom=LM(g.bottom,u.bottom),u.left=Km(g.left,u.left),u},IM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:MM,getOffsetParent:g7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,g7(n),r),floating:{...MM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>g2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&S();function S(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var m7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function v7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!v7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!v7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return m7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);v7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{S.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);m7(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);m7(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?kM({element:t.current,padding:n}).fn(i):{}:t?kM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[mk,iW]=p2(rW),[Dxe,oW]=mk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,RTe]=mk(w4),[Hxe,Wxe]=mk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:S}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ut=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ut,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[S,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):S==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=g?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Fw="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},vk="RovingFocusGroup",[y7,lW,twe]=UH(vk),[nwe,uW]=p2(vk,[twe]),[rwe,iwe]=nwe(vk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(y7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(y7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[S=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Fw,k),()=>N.removeEventListener(Fw,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(Fw,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===S),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(y7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],ub="Menu",[S7,ywe,Swe]=UH(ub),[wh,fW]=p2(ub,[Swe,iW,uW]),yk=iW(),hW=uW(),[bwe,cb]=wh(ub),[xwe,Sk]=wh(ub),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=yk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=yk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[OTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=cb(id,e.__scopeMenu),a=Sk(id,e.__scopeMenu);return C.exports.createElement(S7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(S7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return FB(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...S}=e,w=cb(id,n),E=Sk(id,n),P=yk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?kF:C.exports.Fragment,ne=v?{as:Hv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Kn(S.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,x7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),b7="MenuItem",RM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=Sk(b7,e.__scopeMenu),s=pW(b7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(RM,{bubbles:!0,cancelable:!0});g.addEventListener(RM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(b7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(S7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,x7(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,x7(S=>a.onItemLeave(S))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function x7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,NTe]=p2(mW,[fW]),db=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=db(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=db(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=db(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=db(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ct([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ct([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,o6e=C.exports.memo(e=>{const t=je(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[S,w]=C.exports.useState(!1),E=h2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(Cb(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(S2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(uk(l)),t(PH()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Tke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Eke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:$=>{t(DH($))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:nk,className:"hoverable-image-check"})}),S&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(d7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(d7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},i6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(qz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,OM=40,a6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},NM=400;function yW(){const e=je(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:NM,galleryMaxWidth:NM}:a6e[u],[R,O]=C.exports.useState(S>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{S>=o3&&O(!1)},[S]);const Q=()=>{e(lbe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(l7(n))},X=xe=>{e(Qg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(hk())},{enabled:!E},[E]),lt("right",()=>{e(fk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Qg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Qg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(xH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(S)+_e.width,T,Number(M)):Number(S)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(S)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-OM&&e(Qg(Je-OM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ik,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Qg(64)),icon:x(Y_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(vH,{}):x(yH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(o6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(oH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const s6e=ct([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),bk=e=>{const t=je(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ae(s6e),l=()=>{t(Fke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(wbe,{})})})]}),!a&&x(yW,{})]})})};function l6e(){return x(bk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function u6e(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(K$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(tH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(J$,{})}};return ee(ck,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(tk,{accordionInfo:e})]})}const c6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function d6e(){return x(bk,{optionsPanel:x(u6e,{}),children:x(c6e,{})})}var w7=function(e,t){return w7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},w7(e,t)};function f6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");w7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=T6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var S=s+h*v,w=l+g*v,E=u+m*v;o(S,w,E)})}}function T6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function L6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var A6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},xk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=L6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=A6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=xk(e,t);return e.bounds=n,n};function fb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=C7(e,s-g,u+g,r),S=C7(t,l-m,h+m,r);return{x:v,y:S}}var C7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function hb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=fb(g,m,i,o,0,0,null);return v}function m2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var zM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=pb(o,n);return!l},BM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},M6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},I6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function R6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=hb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function O6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,S=!m||!v;if(!(!a||S||!s)){var w=fb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var N6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},D6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function B6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function FM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:C7(e,o,a,i)}function F6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function $6e(e,t){var n=D6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=F6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,S=l-i,w=h*h+g*g,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function H6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,O=S.velocityAlignmentTime,N=O,z=B6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[S.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ut=FM(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=FM(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ut,mt)})}}function $M(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?I6e(e,t):M6e(e,t)}function HM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=N6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);$6e(e,{x:u,y:h}),O6e(e,u,h,g,m)}}function W6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?H6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=wk(e,a,v,S);w&&kd(e,w,h,g)}}function wk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=m2(za(t,2),o,a,0,!1),u=o1(e,l),h=hb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},V6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),Jg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},WM=function(e){var t=Al({},Jg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Jg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Jg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},Jg[n]),e[n]):s?t[n]=DM(DM([],Jg[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=m2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,S=kW(e,t,n),w=wk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=xk(e,a.scale),m=fb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function U6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=G6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=m2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=xk(e,E),O=fb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function G6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function j6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var Y6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},q6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},K6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},X6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},Z6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},Q6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&j6e(a)&&a&&o.contains(a)){var s=U6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:Y6e(e),zoomOut:q6e(e),setTransform:K6e(e),resetTransform:X6e(e),centerView:Z6e(e),zoomToElement:Q6e(e)}},$w=!1;function Hw(){try{var e={get passive(){return $w=!0,!1}};return e}catch{return $w=!1,$w}}var pb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},VM=function(e){e&&clearTimeout(e)},J6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},eCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=pb(u,a);return!g};function tCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=h6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var nCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=m2(za(v,3),u,l,g,S);return w},rCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},iCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=pb(a,i);return!l},oCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},aCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},sCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return m2(za(g,2),a,o,l,!u)},lCe=160,uCe=100,cCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},dCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=tCe(t,null),P=nCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=S||v===0||h,R=u&&M,O=hb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},fCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;VM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},uCe);var o=rCe(e,t);o&&(VM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},lCe))},hCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},pCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=aCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=sCe(e,m);if(v!==i){var S=o1(e,v),w=u||h===0||s,E=a&&w,P=hb(e,g.x,g.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},gCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function mCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=wk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var vCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=pb(l,s);return!(g||!h)},MW=ae.createContext(V6e),yCe=function(e){f6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=WM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Hw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=eCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(cCe(n,r),dCe(n,r),fCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=zM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),$M(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=BM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),HM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(W6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=iCe(n,r);!l||(hCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=oCe(n);!l||(r.preventDefault(),r.stopPropagation(),pCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(gCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=zM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),$M(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=BM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];HM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=vCe(n,r);!o||mCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=J6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Hw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Hw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=WM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),SCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(yCe,{...Al({},e,{setRef:i})})});function bCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var xCe=`.transform-component-module_wrapper__1_Fgj { +}`;var $t=EE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Vb($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,X1(c)+1);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Ub(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&T1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),Yb=xp("toUpperCase");function kE(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):Y1(c):c.match(p)||[]}var EE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Vb(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Hb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,D$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&D$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},z$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?D$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),B$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=B$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),F$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=F$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),H_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=H_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=H_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),$$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),H$=Be((e,t)=>{var n=eb(),r=$$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),W$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=H$(),r=Xye(),i=$$(),o=W$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),W_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=W_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),V$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=W_(),i=V$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=V$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),U$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=H_(),r=y3e(),i=B$(),o=U$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case S:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=V_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),G$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=j$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[S]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=F$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),Y$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=V_(),o=G$(),a=M3e(),s=Y$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),S=!v&&r(g),w=!v&&!S&&o(g),E=!v&&!S&&!w&&s(g),P=v||S||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=H$(),r=j$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=W_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=W$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=U$(),i=x3e(),o=V3e(),a=q3e(),s=V_(),l=G$(),u=Y$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),q$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Pw(e,t=","){return typeof e=="string"?e.split(t):e}function qm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return K$(e,["input","textarea","select"])}function K$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=z$(q$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var ZA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!K$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){ZA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Pw(e,u?.splitKey).forEach(E=>{let P=qm(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){ZA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.addHotkey(qm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.removeHotkey(qm(w,u?.combinationKey)))}},[e,l,u,h]),i}z$(q$());var a7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>a7.add(qm(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=qm(t);for(let r of a7)r.keys?.every(i=>n.keys?.includes(i))&&a7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Wi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Wi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},QA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(QA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(QA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(p_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(g_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(v_,{...P,className:"invokeai__number-input-stepper-button"}),x(m_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(FF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],U_=0,G_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),j_=()=>{const e=je(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(__,{className:"invokeai__switch-root",...s})]})})};function X$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Bke(i.target.checked))})}function P5e(){const e=je(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var Z$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},JA=ae.createContext&&ae.createContext(Z$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(S?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(dB,{w:"100%",gap:2,children:[ee(C_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(XC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(XC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(XF,{className:"invokeai__slider_track",...j,children:x(ZF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(KF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(p_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(g_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(IF,{...ne,children:[x(v_,{className:"invokeai__slider-number-stepper"}),x(m_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(Y_,{}),onClick:Se,isDisabled:M,...K})]})]})}function J$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=je();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(D7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(D7(.5))}})}const N5e=()=>{const e=je(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=je(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},eH=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Dke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=je(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:U_,max:G_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const tH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(tH(U_,G_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=je(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=je(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const q_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),K_=()=>{const e=je(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(z7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(B7(a)),value:n,isInteger:!1})]})};function nH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(zke(i.target.checked))})}function X_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=je();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Ike(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(W8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=je(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!($_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=je();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n($ke(i)),isInteger:!1})}const Z_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=je(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ct(e=>e.options,e=>wb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const Q_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ct([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=je(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Ake(r)),value:t,width:J_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=je();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=je(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const J_="auto";function ek(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},rH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Tw,setIsConnected:eM,setSocketId:xTe,setShouldConfirmOnDelete:iH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:tM,errorSeen:oH,setModelList:nM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:gm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=rH.actions,h4e=rH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ct(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(y_,{trigger:"hover",children:[x(x_,{children:x(vh,{children:e})}),ee(b_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(S_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const tk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=je();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function nk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function rM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function fH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ok=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,hH=e=>e.canvas.layerState.objects.find(g4),pH=ct([e=>e.options,e=>e.system,hH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!($_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),s7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),l7=ti("socketio/requestImages"),iM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),gH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function mH(e){const{iconButton:t=!1,...n}=e,r=je(),{isReady:i}=Ae(pH),o=Ae(_r),a=()=>{r(s7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(s7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vH(e){const{...t}=e,n=je(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ct(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=je(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(Oke(!t))}})},ak=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(mH,{}),e==="img2img"&&x(fSe,{}),x(vH,{})]})},hSe=ct([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),sk=()=>{const e=je(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(pH),i=C.exports.useRef(null),o=s=>{e(Cb(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(s7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(o$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function SH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function oM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=oM(e.className,t):e.setAttribute("class",oM(e.className&&e.className.baseVal||"",t))}const aM={disabled:!1},bH=ae.createContext(null);var xH=function(t){return t.scrollTop},mm="unmounted",Pf="exited",Tf="entering",Hp="entered",u7="exiting",Ou=function(e){r_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=mm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===mm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=u7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&xH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:mm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||aM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||aM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:u7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=e_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(bH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=bH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=mm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=u7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Lw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},lk=function(e){r_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Zg=.95,sM=30,c7=10,lM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),vm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:vm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},CH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ok(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...vm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Zg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=lM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=vm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Zg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=lM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Zg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Zg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Zg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:_H,addPointToCurrentLine:kH,clearCanvasHistory:EH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:wTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:PH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:uk,resizeCanvas:OSe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:CTe,setBoundingBoxScaleMethod:NSe,setBrushColor:Mw,setBrushSize:Iw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ck,setInpaintReplace:uM,setIsDrawing:ob,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:_Te,setIsMoveStageKeyHeld:kTe,setIsMovingBoundingBox:cM,setIsMovingStage:m4,setIsTransformingBoundingBox:Rw,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:ETe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:PTe,setShouldShowBrushPreview:TTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:LTe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:dM,setShouldSnapToGrid:fM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:ATe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:MTe,toggleTool:ITe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=CH.actions,QSe=CH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dk=e=>{const t=je(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Mke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Nke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(wH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(yH,{}):x(SH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(tk,{accordionInfo:e})]})}const fk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(fk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(rk,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Iv(),a=je(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(iH(!S.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(LF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(zv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(__,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(y_,{...o,children:[x(x_,{children:t}),ee(b_,{className:`invokeai__popover-content ${r}`,children:[i&&x(S_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ct([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=je(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=h2(),v=()=>{!u||(h&&e(pd(!1)),e(S2(u)),e(ko("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Pke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(Cb(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(ck(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(rM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(rM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:S,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(cH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(j_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(K_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(uH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(d7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Ow,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:hk,selectPrevImage:pk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Qg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=je();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:S,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(z7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(B7(M))}),S&&x(On,{label:"Prompt",labelPosition:"top",value:J3(S),onClick:()=>n(Cb(S))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(S2(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(D7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(z7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(B7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(aB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=je(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ct([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(fk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(rk,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=je(),n=h2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],vM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(vM):o.className+=vM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Nw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Nw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Nw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(g-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,S=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=mM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=mM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=gM(M,this.props.grid[0]),z=gM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(S.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(S.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function p2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...S}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Hv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(f7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(f7,An({},r,{ref:t}),n)});Hv.displayName="Slot";const f7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});f7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Hv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=p2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(S,P.collectionRef);return ae.createElement(Hv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(S,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Hv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const h7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let yM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(yM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),SM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),SM())},[g,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(h7,z),()=>document.removeEventListener(h7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SM(){const e=new CustomEvent(h7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let Dw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:bM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:bM()),Dw++,()=>{Dw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Dw--}},[])}function bM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zw="focusScope.autoFocusOnMount",Bw="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){CM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(zw,xM);s.addEventListener(zw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(zw,u),setTimeout(()=>{const P=new CustomEvent(Bw,xM);s.addEventListener(Bw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Bw,h),CM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=wM(t,e),r=wM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const CM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=Jw["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function ab(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function gk(e){return e==="y"?"height":"width"}function kM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=gk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(ab(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=kM(l,r,s),g=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=ab(a),v=gk(g),S=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,V=p7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=ab(e),i=_1(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function PM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[PM(e),t,PM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function TM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=TM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=TM(o,i.floating);return{data:{escapedOffsets:a,escaped:LM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=ab(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],S=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=p7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=p7(k,S,T)}const w=s.fn({...t,[g]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);Sz&&(S=z)}return{[g]:v,[m]:S}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function g2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function mk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sb(e){const{overflow:t,overflowX:n,overflowY:r}=g2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=g2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const AM=Math.min,Km=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function lb(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+lb(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||sb(i))&&(a=lb(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(mk(e)?e.host:null)||_d(e)}function MM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(mk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function g7(e){const t=Nu(e);let n=MM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=MM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function IM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||sb(o))&&(a=lb(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=lb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Km(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Km(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return g2(i||n).direction==="rtl"&&(s+=Km(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&sb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],sb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&mk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function RM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(g2(e).position)&&Dl(e)?g7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=RM(t,h,i);return u.top=Km(g.top,u.top),u.right=AM(g.right,u.right),u.bottom=AM(g.bottom,u.bottom),u.left=Km(g.left,u.left),u},RM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:IM,getOffsetParent:g7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,g7(n),r),floating:{...IM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>g2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&S();function S(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var m7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function v7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!v7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!v7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return m7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);v7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{S.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);m7(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);m7(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?EM({element:t.current,padding:n}).fn(i):{}:t?EM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[vk,iW]=p2(rW),[Dxe,oW]=vk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,RTe]=vk(w4),[Hxe,Wxe]=vk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:S}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ut=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ut,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[S,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):S==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=g?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Fw="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},yk="RovingFocusGroup",[y7,lW,twe]=UH(yk),[nwe,uW]=p2(yk,[twe]),[rwe,iwe]=nwe(yk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(y7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(y7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[S=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Fw,k),()=>N.removeEventListener(Fw,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(Fw,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===S),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(y7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],ub="Menu",[S7,ywe,Swe]=UH(ub),[wh,fW]=p2(ub,[Swe,iW,uW]),Sk=iW(),hW=uW(),[bwe,cb]=wh(ub),[xwe,bk]=wh(ub),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=Sk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Sk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[OTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=cb(id,e.__scopeMenu),a=bk(id,e.__scopeMenu);return C.exports.createElement(S7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(S7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return $B(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...S}=e,w=cb(id,n),E=bk(id,n),P=Sk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?EF:C.exports.Fragment,ne=v?{as:Hv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Kn(S.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,x7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),b7="MenuItem",OM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=bk(b7,e.__scopeMenu),s=pW(b7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(OM,{bubbles:!0,cancelable:!0});g.addEventListener(OM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(b7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(S7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,x7(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,x7(S=>a.onItemLeave(S))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function x7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,NTe]=p2(mW,[fW]),db=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=db(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=db(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=db(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=db(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ct([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ct([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,o6e=C.exports.memo(e=>{const t=je(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[S,w]=C.exports.useState(!1),E=h2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(Cb(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(S2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(ck(l)),t(uk()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Tke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Eke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:$=>{t(DH($))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:nk,className:"hoverable-image-check"})}),S&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(d7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(d7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},i6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(Kz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,NM=40,a6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},DM=400;function yW(){const e=je(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:DM,galleryMaxWidth:DM}:a6e[u],[R,O]=C.exports.useState(S>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{S>=o3&&O(!1)},[S]);const Q=()=>{e(lbe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(l7(n))},X=xe=>{e(Qg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(pk())},{enabled:!E},[E]),lt("right",()=>{e(hk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Qg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Qg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(wH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(S)+_e.width,T,Number(M)):Number(S)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(S)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-NM&&e(Qg(Je-NM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ik,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Qg(64)),icon:x(Y_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(yH,{}):x(SH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(o6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(aH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const s6e=ct([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),xk=e=>{const t=je(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ae(s6e),l=()=>{t(Fke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(wbe,{})})})]}),!a&&x(yW,{})]})})};function l6e(){return x(xk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function u6e(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(tk,{accordionInfo:e})]})}const c6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function d6e(){return x(xk,{optionsPanel:x(u6e,{}),children:x(c6e,{})})}var w7=function(e,t){return w7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},w7(e,t)};function f6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");w7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=T6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var S=s+h*v,w=l+g*v,E=u+m*v;o(S,w,E)})}}function T6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function L6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var A6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},wk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=L6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=A6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=wk(e,t);return e.bounds=n,n};function fb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=C7(e,s-g,u+g,r),S=C7(t,l-m,h+m,r);return{x:v,y:S}}var C7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function hb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=fb(g,m,i,o,0,0,null);return v}function m2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var BM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=pb(o,n);return!l},FM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},M6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},I6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function R6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=hb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function O6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,S=!m||!v;if(!(!a||S||!s)){var w=fb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var N6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},D6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function B6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function $M(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:C7(e,o,a,i)}function F6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function $6e(e,t){var n=D6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=F6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,S=l-i,w=h*h+g*g,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function H6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,O=S.velocityAlignmentTime,N=O,z=B6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[S.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ut=$M(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=$M(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ut,mt)})}}function HM(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?I6e(e,t):M6e(e,t)}function WM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=N6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);$6e(e,{x:u,y:h}),O6e(e,u,h,g,m)}}function W6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?H6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=Ck(e,a,v,S);w&&kd(e,w,h,g)}}function Ck(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=m2(za(t,2),o,a,0,!1),u=o1(e,l),h=hb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},V6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),Jg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},VM=function(e){var t=Al({},Jg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Jg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Jg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},Jg[n]),e[n]):s?t[n]=zM(zM([],Jg[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=m2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,S=kW(e,t,n),w=Ck(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=wk(e,a.scale),m=fb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function U6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=G6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=m2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=wk(e,E),O=fb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function G6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function j6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var Y6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},q6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},K6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},X6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},Z6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},Q6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&j6e(a)&&a&&o.contains(a)){var s=U6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:Y6e(e),zoomOut:q6e(e),setTransform:K6e(e),resetTransform:X6e(e),centerView:Z6e(e),zoomToElement:Q6e(e)}},$w=!1;function Hw(){try{var e={get passive(){return $w=!0,!1}};return e}catch{return $w=!1,$w}}var pb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},UM=function(e){e&&clearTimeout(e)},J6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},eCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=pb(u,a);return!g};function tCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=h6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var nCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=m2(za(v,3),u,l,g,S);return w},rCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},iCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=pb(a,i);return!l},oCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},aCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},sCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return m2(za(g,2),a,o,l,!u)},lCe=160,uCe=100,cCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},dCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=tCe(t,null),P=nCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=S||v===0||h,R=u&&M,O=hb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},fCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;UM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},uCe);var o=rCe(e,t);o&&(UM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},lCe))},hCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},pCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=aCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=sCe(e,m);if(v!==i){var S=o1(e,v),w=u||h===0||s,E=a&&w,P=hb(e,g.x,g.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},gCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function mCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var vCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=pb(l,s);return!(g||!h)},MW=ae.createContext(V6e),yCe=function(e){f6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=VM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Hw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=eCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(cCe(n,r),dCe(n,r),fCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),HM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=FM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),WM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(W6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=iCe(n,r);!l||(hCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=oCe(n);!l||(r.preventDefault(),r.stopPropagation(),pCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(gCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),HM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=FM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];WM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=vCe(n,r);!o||mCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=J6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Hw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Hw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=VM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),SCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(yCe,{...Al({},e,{setRef:i})})});function bCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var xCe=`.transform-component-module_wrapper__1_Fgj { position: relative; width: -moz-fit-content; width: fit-content; @@ -503,8 +503,8 @@ function print() { __p += __j.call(arguments, '') } .transform-component-module_content__2jYgh img { pointer-events: none; } -`,UM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};bCe(xCe);var wCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(MW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+UM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+UM.content+" "+o,style:s,children:t})})};function CCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(SCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:S})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(Y_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(wCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function _Ce(){const e=je(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(hk())},g=()=>{e(fk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(aH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(CCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const kCe=ct([Q_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),ECe=()=>{const e=je(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(kCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(PI(o))},handleReset:()=>e(PI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(EI(o))},handleReset:()=>{e(EI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(TI(o))},handleReset:()=>{e(TI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=ct(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),TCe=()=>{const e=je(),{boundingBoxDimensions:t}=Ae(PCe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},v2=e=>e.system,LCe=e=>e.system.toastQueue,ACe=ct(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function MCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(ACe),n=je();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(lM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(lM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const ICe=ct([Q_,v2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),RCe=()=>{const e=je(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(ICe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(MCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(AI(v))},handleReset:()=>{e(AI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function OCe(){const e={boundingBox:{header:"Bounding Box",feature:Wi.BOUNDING_BOX,content:x(TCe,{})},seamCorrection:{header:"Seam Correction",feature:Wi.SEAM_CORRECTION,content:x(ECe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Wi.INFILL_AND_SCALING,content:x(RCe,{})},seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})}};return ee(ck,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(Q$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(tk,{accordionInfo:e})]})}const NCe=ct(Rn,fH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),DCe=()=>{const e=je(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(NCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(OSe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(a2,{thickness:"2px",speed:"1s",size:"xl"})})};var zCe=Math.PI/180;function BCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:BCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*zCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var FCe="[object Array]",$Ce="[object Number]",HCe="[object String]",WCe="[object Boolean]",VCe=Math.PI/180,UCe=180/Math.PI,Ww="#",GCe="",jCe="0",YCe="Konva warning: ",GM="Konva error: ",qCe="rgb(",Vw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},KCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const XCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===FCe},_isNumber(e){return Object.prototype.toString.call(e)===$Ce&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===HCe},_isBoolean(e){return Object.prototype.toString.call(e)===WCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&XCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ww,GCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=jCe+e;return Ww+e},getRGB(e){var t;return e in Vw?(t=Vw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ww?this._hexToRgb(e.substring(1)):e.substr(0,4)===qCe?(t=KCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Vw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Ck(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function ZCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function QCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var em="get",tm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=em+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=em+a(t),l=tm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=tm+n,i=em+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=em+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=em+de._capitalize(n),a=tm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function JCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=e7e+u.join(jM)+t7e)):(o+=s.property,t||(o+=a7e+s.val)),o+=i7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=l7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=YM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=JCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",qM="absoluteScale",bf="canvas",f7e="Change",h7e="children",p7e="konva",_7="listening",KM="mouseenter",XM="mouseleave",ZM="set",QM="Shape",n5=" ",JM="stage",Mc="transform",g7e="Stage",k7="visible",m7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let v7e=1;class $e{constructor(t){this._id=v7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),S=new _k({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(qM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==h7e&&(r=ZM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(_7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(k7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==g7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=xm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Gw.pointer;if(t==="touch")return Gw.touch;if(t==="mouse")return Gw.mouse};function tI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class vb extends da{constructor(t){super(tI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{tI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===S7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(_7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+eI,this.content.style.height=n+eI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rw7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||C7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(E7,{evt:t}):this._fire(E7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Uw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,kk(t)),Xm(t.pointerId)}_lostpointercapture(t){Xm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new _k({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}vb.prototype.nodeType=y7e;gr(vb);q.addGetterSetter(vb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function jw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Zm={};function k7e(e){e.fill()}function E7e(e){e.stroke()}function P7e(e){e.fill()}function T7e(e){e.stroke()}function L7e(){this._clearCache(qW)}function A7e(){this._clearCache(KW)}function M7e(){this._clearCache(XW)}function I7e(){this._clearCache(ZW)}function R7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Zm)););this.colorKey=n,Zm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=jw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=jw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Zm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){de.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}}Ie.prototype._fillFunc=k7e;Ie.prototype._strokeFunc=E7e;Ie.prototype._fillFuncHit=P7e;Ie.prototype._strokeFuncHit=T7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",L7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",A7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",M7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",Ck());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var O7e="#",N7e="beforeDraw",D7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new _k({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(N7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(D7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Ek extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Ek.prototype.nodeType="FastLayer";gr(Ek);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var Yw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Yw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=nI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=rI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===nI?this.setTime(t):this.state===rI&&this.setTime(this.duration-t)}pause(){this.state=F7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Qm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new H7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)B7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Qm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function T7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[g,m,v,S]}function oI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var J=S.shift(),K=S.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],W7e="Change.konva",V7e="none",L7="up",A7="right",M7="down",I7="left",U7e=eV.length;class Pk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var aI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,aI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),aI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Kw(){return g3||(g3=de.createCanvasElement().getContext(Y7e),g3)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(q7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Kw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+Q7e)+r9e(this.fontFamily())}_addTextLine(t){this.align()===nm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Kw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),S=v!==uI,w=v!==t9e&&S,E=this.ellipsis();this.textArr=[],Kw().font=this._getContextFont();for(var P=E?this._getTextWidth(qw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var O=0,N=M.length,z="",V=0;O>>1,j=M.slice(0,$+1),le=this._getTextWidth(j)+P;le<=h?(O=$+1,z=j,V=le):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===p3||Q===sI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(p3),z.lastIndexOf(sI))+1,W>0&&(O=W,z=z.slice(0,O),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==uI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+qw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=tV(this.text()),g=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var le=t.dataArray,W=w+1;W0)return w=W,le[W];le[W].command==="M"&&(m={x:le[W].points[0],y:le[W].points[1]})}return{}},k=function(le){var W=t._getTextSize(le).width+r;le===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;S===void 0;)S=P(),S&&J+S.pathLengthW?v=Dn.getPointOnLine(W,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],X=S.points[5],ce=S.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Dn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?W>S.pathLength?E=1e-8:E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength/2:E=Math.max(E-(Q-W)/S.pathLength/2,0),E>1&&(E=1,K=!0),v=Dn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength:E-=(Q-W)/S.pathLength,E>1&&(E=1,K=!0),v=Dn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(Q=Dn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,O=0;Oe+`.${lV}`).join(" "),cI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in rt._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(c9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var _4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],dI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return uV(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(cI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(cI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-dI,y:-dI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new y2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let le=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(le-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+le,Q=rt.getAngle(this.rotationSnapTolerance()),J=g9e(this.rotationSnaps(),W,Q)-g.rotation,K=p9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),S=g.getTransform().copy();S.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),a1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+_4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",_4,m9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function fI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function S9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,S,w,E,P,k,T,M,R,O,N,z,V,$,j,le,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new fI,X=null,ce=G,me=null,Re=null,xe=v9e[t],Se=y9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*xe>>Se)*j,n[h+1]=(v*xe>>Se)*j,n[h+2]=(S*xe>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*xe>>Se)*j,n[l+1]=(v*xe>>Se)*j,n[l+2]=(S*xe>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&S9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const x9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var S=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],O=T,N=O>0?O:-O,z=M>0?M:-M,V=R>0?R:-R;if(z>N&&(O=M),V>N&&(O=R),O*=t,i){var $=s[E]+O,j=s[E+1]+O,le=s[E+2]+O;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=le>255?255:le<0?0:le}else{var W=n-O;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Xw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),O=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,O=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,O,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,R=0,O=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},j9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(SCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:S})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(Y_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(wCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function _Ce(){const e=je(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(CCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const kCe=ct([Q_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),ECe=()=>{const e=je(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(kCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(TI(o))},handleReset:()=>e(TI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(PI(o))},handleReset:()=>{e(PI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(AI(o))},handleReset:()=>{e(AI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=ct(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),TCe=()=>{const e=je(),{boundingBoxDimensions:t}=Ae(PCe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},v2=e=>e.system,LCe=e=>e.system.toastQueue,ACe=ct(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function MCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(ACe),n=je();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(uM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(uM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const ICe=ct([Q_,v2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),RCe=()=>{const e=je(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(ICe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(MCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(MI(v))},handleReset:()=>{e(MI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function OCe(){const e={boundingBox:{header:"Bounding Box",feature:Wi.BOUNDING_BOX,content:x(TCe,{})},seamCorrection:{header:"Seam Correction",feature:Wi.SEAM_CORRECTION,content:x(ECe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Wi.INFILL_AND_SCALING,content:x(RCe,{})},seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})}};return ee(dk,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(tk,{accordionInfo:e})]})}const NCe=ct(Rn,hH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),DCe=()=>{const e=je(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(NCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(i?OSe():uk()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(a2,{thickness:"2px",speed:"1s",size:"xl"})})};var zCe=Math.PI/180;function BCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:BCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*zCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var FCe="[object Array]",$Ce="[object Number]",HCe="[object String]",WCe="[object Boolean]",VCe=Math.PI/180,UCe=180/Math.PI,Ww="#",GCe="",jCe="0",YCe="Konva warning: ",jM="Konva error: ",qCe="rgb(",Vw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},KCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const XCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===FCe},_isNumber(e){return Object.prototype.toString.call(e)===$Ce&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===HCe},_isBoolean(e){return Object.prototype.toString.call(e)===WCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&XCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ww,GCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=jCe+e;return Ww+e},getRGB(e){var t;return e in Vw?(t=Vw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ww?this._hexToRgb(e.substring(1)):e.substr(0,4)===qCe?(t=KCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Vw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function _k(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function ZCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function QCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var em="get",tm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=em+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=em+a(t),l=tm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=tm+n,i=em+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=em+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=em+de._capitalize(n),a=tm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function JCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=e7e+u.join(YM)+t7e)):(o+=s.property,t||(o+=a7e+s.val)),o+=i7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=l7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=qM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=JCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",KM="absoluteScale",bf="canvas",f7e="Change",h7e="children",p7e="konva",_7="listening",XM="mouseenter",ZM="mouseleave",QM="set",JM="Shape",n5=" ",eI="stage",Mc="transform",g7e="Stage",k7="visible",m7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let v7e=1;class $e{constructor(t){this._id=v7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),S=new kk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(KM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==h7e&&(r=QM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(_7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(k7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==g7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=xm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Gw.pointer;if(t==="touch")return Gw.touch;if(t==="mouse")return Gw.mouse};function nI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class vb extends da{constructor(t){super(nI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{nI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===S7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(_7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+tI,this.content.style.height=n+tI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rw7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||C7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(E7,{evt:t}):this._fire(E7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Uw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,Ek(t)),Xm(t.pointerId)}_lostpointercapture(t){Xm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new kk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}vb.prototype.nodeType=y7e;gr(vb);q.addGetterSetter(vb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function jw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Zm={};function k7e(e){e.fill()}function E7e(e){e.stroke()}function P7e(e){e.fill()}function T7e(e){e.stroke()}function L7e(){this._clearCache(qW)}function A7e(){this._clearCache(KW)}function M7e(){this._clearCache(XW)}function I7e(){this._clearCache(ZW)}function R7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Zm)););this.colorKey=n,Zm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=jw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=jw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Zm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){de.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}}Ie.prototype._fillFunc=k7e;Ie.prototype._strokeFunc=E7e;Ie.prototype._fillFuncHit=P7e;Ie.prototype._strokeFuncHit=T7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",L7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",A7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",M7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",_k());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var O7e="#",N7e="beforeDraw",D7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new kk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(N7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(D7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Pk extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Pk.prototype.nodeType="FastLayer";gr(Pk);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var Yw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Yw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=rI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=iI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===rI?this.setTime(t):this.state===iI&&this.setTime(this.duration-t)}pause(){this.state=F7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Qm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new H7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)B7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Qm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function T7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[g,m,v,S]}function aI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var J=S.shift(),K=S.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],W7e="Change.konva",V7e="none",L7="up",A7="right",M7="down",I7="left",U7e=eV.length;class Tk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var sI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,sI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),sI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Kw(){return g3||(g3=de.createCanvasElement().getContext(Y7e),g3)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(q7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Kw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+Q7e)+r9e(this.fontFamily())}_addTextLine(t){this.align()===nm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Kw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),S=v!==cI,w=v!==t9e&&S,E=this.ellipsis();this.textArr=[],Kw().font=this._getContextFont();for(var P=E?this._getTextWidth(qw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var O=0,N=M.length,z="",V=0;O>>1,j=M.slice(0,$+1),le=this._getTextWidth(j)+P;le<=h?(O=$+1,z=j,V=le):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===p3||Q===lI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(p3),z.lastIndexOf(lI))+1,W>0&&(O=W,z=z.slice(0,O),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==cI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+qw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=tV(this.text()),g=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var le=t.dataArray,W=w+1;W0)return w=W,le[W];le[W].command==="M"&&(m={x:le[W].points[0],y:le[W].points[1]})}return{}},k=function(le){var W=t._getTextSize(le).width+r;le===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;S===void 0;)S=P(),S&&J+S.pathLengthW?v=Dn.getPointOnLine(W,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],X=S.points[5],ce=S.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Dn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?W>S.pathLength?E=1e-8:E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength/2:E=Math.max(E-(Q-W)/S.pathLength/2,0),E>1&&(E=1,K=!0),v=Dn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength:E-=(Q-W)/S.pathLength,E>1&&(E=1,K=!0),v=Dn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(Q=Dn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,O=0;Oe+`.${lV}`).join(" "),dI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in rt._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(c9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var _4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],fI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return uV(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(dI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(dI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-fI,y:-fI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new y2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let le=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(le-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+le,Q=rt.getAngle(this.rotationSnapTolerance()),J=g9e(this.rotationSnaps(),W,Q)-g.rotation,K=p9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),S=g.getTransform().copy();S.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),a1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+_4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",_4,m9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function hI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function S9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,S,w,E,P,k,T,M,R,O,N,z,V,$,j,le,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new hI,X=null,ce=G,me=null,Re=null,xe=v9e[t],Se=y9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*xe>>Se)*j,n[h+1]=(v*xe>>Se)*j,n[h+2]=(S*xe>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*xe>>Se)*j,n[l+1]=(v*xe>>Se)*j,n[l+2]=(S*xe>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&S9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const x9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var S=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],O=T,N=O>0?O:-O,z=M>0?M:-M,V=R>0?R:-R;if(z>N&&(O=M),V>N&&(O=R),O*=t,i){var $=s[E]+O,j=s[E+1]+O,le=s[E+2]+O;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=le>255?255:le<0?0:le}else{var W=n-O;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Xw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),O=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,O=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,O,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,R=0,O=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},j9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i ")+` No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Mg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{cn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!wt)throw Error(a(363));d=Sg(d,f);var L=qt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=Lg(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=Y9e})(cV);const q9e=Z7(cV.exports);var Tk={exports:{}},Th={};/** + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Mg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{cn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!wt)throw Error(a(363));d=Sg(d,f);var L=qt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=Lg(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=Y9e})(cV);const q9e=Z7(cV.exports);var Lk={exports:{}},Th={};/** * @license React * react-reconciler-constants.production.min.js * @@ -530,14 +530,14 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Tk);const hI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let pI=!1,gI=!1;const Lk=".react-konva-event",K9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. + */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Lk);const pI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let gI=!1,mI=!1;const Ak=".react-konva-event",K9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. Position of a node will be changed during drag&drop, so you should update state of the react app as well. Consider to add onDragMove or onDragEnd events. For more info see: https://github.com/konvajs/react-konva/issues/256 `,X9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 -`,Z9e={};function yb(e,t,n=Z9e){if(!pI&&"zIndex"in t&&(console.warn(X9e),pI=!0),!gI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(K9e),gI=!0)}for(var o in n)if(!hI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!hI[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Lk,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},Q9e={};ch.Node.prototype._applyProps=yb;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function e8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return yb(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return dV}function d8e(){return dV}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function S8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function x8e(e,t,n){fV(e,t,n)}function w8e(e,t){t.destroy(),t.off(Lk),Ld(e)}function C8e(e,t){t.destroy(),t.off(Lk),Ld(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){yb(e,i,r)}function P8e(e){e.hide(),Ld(e)}function T8e(e){}function L8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function M8e(e){}function I8e(){}const R8e=()=>Tk.exports.DefaultEventPriority,O8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:S8e,appendChildToContainer:b8e,insertBefore:fV,insertInContainerBefore:x8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:T8e,unhideInstance:L8e,unhideTextInstance:A8e,clearContainer:M8e,detachDeletedInstance:I8e,getCurrentEventPriority:R8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,mI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,vI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&vI(e,n,t[n]);if(mI)for(var n of mI(t))F8e.call(t,n)&&vI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function Ak(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Ak(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Mk=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(Mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:Ak(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const im=[],SI=new WeakMap;function U8e(){var e;const t=V8e();im.splice(0,im.length),Ak(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Mk&&im.push(hV(i))});for(const n of im){const r=(e=W8e.current)==null?void 0:e.readContext(n);SI.set(n,r)}return C.exports.useMemo(()=>im.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(yI({},i),{value:SI.get(r)}))),n=>x(pV,{...yI({},n)})),[])}function G8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const j8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=G8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=wm.createContainer(n.current,Tk.exports.LegacyRoot,!1,null),wm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),wm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),yb(n.current,e,i),wm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",Y8e="Transformer",wm=q9e(O8e);wm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const q8e=ae.forwardRef((e,t)=>x(pV,{children:x(j8e,{...e,forwardedRef:t})})),K8e=ct([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),X8e=e=>{const{...t}=e,{objects:n}=Ae(K8e);return x(dh,{listening:!1,...t,children:n.filter(ok).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},Z8e=ct(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:aM/v,colorPickerInnerRadius:(aM-c7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:S,colorPickerOuterRadius:w}=Ae(Z8e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:c7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:S,stroke:v,strokeWidth:c7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=ct(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),e_e=e=>{const{...t}=e,n=je(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(J8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Aw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Aw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Aw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Rw(!0))},z=()=>{n(Rw(!1)),n(Xy(!1))},V=()=>{n(uM(!0))},$=()=>{n(Rw(!1)),n(uM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(Y8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const t_e=e=>{mV=e},Vv=()=>mV,n_e=e=>{vV=e},yV=()=>vV,r_e=ct([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i_e=()=>{const e=je(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(r_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},o_e=ct(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),bI=e=>`data:image/svg+xml;utf8, +`,Z9e={};function yb(e,t,n=Z9e){if(!gI&&"zIndex"in t&&(console.warn(X9e),gI=!0),!mI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(K9e),mI=!0)}for(var o in n)if(!pI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!pI[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Ak,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},Q9e={};ch.Node.prototype._applyProps=yb;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function e8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return yb(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return dV}function d8e(){return dV}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function S8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function x8e(e,t,n){fV(e,t,n)}function w8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function C8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){yb(e,i,r)}function P8e(e){e.hide(),Ld(e)}function T8e(e){}function L8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function M8e(e){}function I8e(){}const R8e=()=>Lk.exports.DefaultEventPriority,O8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:S8e,appendChildToContainer:b8e,insertBefore:fV,insertInContainerBefore:x8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:T8e,unhideInstance:L8e,unhideTextInstance:A8e,clearContainer:M8e,detachDeletedInstance:I8e,getCurrentEventPriority:R8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,vI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))F8e.call(t,n)&&yI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function Mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Ik=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(Ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:Mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const im=[],bI=new WeakMap;function U8e(){var e;const t=V8e();im.splice(0,im.length),Mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Ik&&im.push(hV(i))});for(const n of im){const r=(e=W8e.current)==null?void 0:e.readContext(n);bI.set(n,r)}return C.exports.useMemo(()=>im.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(SI({},i),{value:bI.get(r)}))),n=>x(pV,{...SI({},n)})),[])}function G8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const j8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=G8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=wm.createContainer(n.current,Lk.exports.LegacyRoot,!1,null),wm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),wm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),yb(n.current,e,i),wm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",Y8e="Transformer",wm=q9e(O8e);wm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const q8e=ae.forwardRef((e,t)=>x(pV,{children:x(j8e,{...e,forwardedRef:t})})),K8e=ct([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),X8e=e=>{const{...t}=e,{objects:n}=Ae(K8e);return x(dh,{listening:!1,...t,children:n.filter(ok).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},Z8e=ct(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:sM/v,colorPickerInnerRadius:(sM-c7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:S,colorPickerOuterRadius:w}=Ae(Z8e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:c7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:S,stroke:v,strokeWidth:c7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=ct(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),e_e=e=>{const{...t}=e,n=je(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(J8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Aw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Aw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Aw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Rw(!0))},z=()=>{n(Rw(!1)),n(Xy(!1))},V=()=>{n(cM(!0))},$=()=>{n(Rw(!1)),n(cM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(Y8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const t_e=e=>{mV=e},Vv=()=>mV,n_e=e=>{vV=e},yV=()=>vV,r_e=ct([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i_e=()=>{const e=je(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(r_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},o_e=ct(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),xI=e=>`data:image/svg+xml;utf8, @@ -615,9 +615,9 @@ For more info see: https://github.com/konvajs/react-konva/issues/194 -`.replaceAll("black",e),a_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(o_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=bI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=bI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},s_e=ct([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),l_e=e=>{const t=je(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(s_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},Sb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=je(),t=Vv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},u_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),c_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(u_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=Sb(e.current);!a||(o.evt.preventDefault(),t(ob(!0)),t(CH([a.x,a.y])))},[e,n,r,t,i])},d_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f_e=(e,t)=>{const n=je(),{tool:r,isDrawing:i,isStaging:o}=Ae(d_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=Sb(e.current);if(!a)return;n(_H([a.x,a.y]))}else t.current=!1;n(ob(!1))},[t,n,i,o,e,r])},h_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),p_e=(e,t,n)=>{const r=je(),{isDrawing:i,tool:o,isStaging:a}=Ae(h_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=Sb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(_H([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},g_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),m_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(g_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=Sb(e.current);!o||n==="move"||r||(t(ob(!0)),t(CH([o.x,o.y])))},[e,n,r,t])},v_e=()=>{const e=je();return C.exports.useCallback(()=>{e(TH(null)),e(ob(!1))},[e])},y_e=ct([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=()=>{const e=je(),{tool:t,isStaging:n}=Ae(y_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,b_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=b_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},x_e=ct([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const{objects:e}=Ae(x_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},C_e=ct([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),__e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},k_e=()=>{const{colorMode:e}=Xv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(C_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=__e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},E_e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e=e=>{const{...t}=e,n=Ae(E_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,T_e=ct([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function L_e(){const{cursorCoordinatesString:e}=Ae(T_e);return x("div",{children:`Cursor Position: ${e}`})}const A_e=ct([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:S}=e;let w="inherit";return(S==="none"&&(o<512||a<512)||S==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:S!=="auto",shouldShowScaledBoundingBox:S!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),M_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(A_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(L_e,{})]})]})},I_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),R_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(I_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},O_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),N_e=()=>{const e=je(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(O_e),o=C.exports.useCallback(()=>{e(cM(!1))},[e]),a=C.exports.useCallback(()=>{e(cM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(nk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(cH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},D_e=ct([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?g?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),z_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(D_e);i_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{n_e($),g.current=$},[]),S=C.exports.useCallback($=>{t_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=l_e(g),k=c_e(g),T=f_e(g,E),M=p_e(g,E,w),R=m_e(g),O=v_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=S_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(q8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(k_e,{})}),x(v3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(w_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(X8e,{visible:!0,listening:!1}),x(a_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(Q8e,{visible:l!=="move",listening:!1}),x(R_e,{visible:u}),h&&x(P_e,{}),x(e_e,{visible:n&&!u})]})]}),x(M_e,{}),x(N_e,{})]})})},B_e=ct([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function F_e(){const e=je(),{canUndo:t,activeTabName:n}=Ae(B_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const $_e=ct([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function H_e(){const e=je(),{canRedo:t,activeTabName:n}=Ae($_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Iv(),m=C.exports.useRef(null),v=()=>{r(),g()},S=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(TF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(LF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(zv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),W_e=()=>{const e=je();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(EH()),e(kH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},V_e=()=>{const e=je();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(kH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},U_e=ct([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),G_e=()=>{const e=je(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(U_e);return lt(["n"],()=>{e(dM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ik,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(dM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(V_e,{}),x(W_e,{})]})})};function bb(){return(bb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function R7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(xI(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=O7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(wI(P),!function(M,R){return R&&!Jm(M)}(P,l.current)&&k)){if(Jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(xI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),xb=function(e){return e.filter(Boolean).join(" ")},Rk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=xb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},N7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Zw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},j_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},Y_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},q_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=xb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Ik,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Rk,{className:"react-colorful__hue-pointer",left:t/360,color:N7({h:t,s:100,v:100,a:1})})))}),K_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:N7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Ik,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Rk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:N7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function X_e(e,t,n){var r=R7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Z_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Q_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},CI=new Map,J_e=function(e){Z_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!CI.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,CI.set(t,n);var r=Q_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},eke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Zw(Object.assign({},n,{a:0}))+", "+Zw(Object.assign({},n,{a:1}))+")"},o=xb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Ik,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Rk,{className:"react-colorful__alpha-pointer",left:n.a,color:Zw(n)})))},tke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);J_e(s);var l=X_e(n,i,o),u=l[0],h=l[1],g=xb(["react-colorful",t]);return ae.createElement("div",bb({},a,{ref:s,className:g}),x(K_e,{hsva:u,onChange:h}),x(q_e,{hue:u.h,onChange:h}),ae.createElement(eke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},nke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Y_e,fromHsva:j_e,equal:_V},rke=function(e){return ae.createElement(tke,bb({},e,{colorModel:nke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(rke,{className:`invokeai__color-picker ${t}`,...n})},ike=ct([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),oke=()=>{const e=je(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ike);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const ake=new Uint8Array(16);function ske(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(ake)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function lke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const uke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_I={randomUUID:uke};function c0(e,t,n){if(_I.randomUUID&&!t&&!e)return _I.randomUUID();e=e||{};const r=e.random||(e.rng||ske)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return lke(r)}const cke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},dke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},fke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},hke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=hke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=Vv();if(!S){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=cke(S,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(dke(M),t(gm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(fke(M,R,O),t(gm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(gm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(gm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},pke=ct([Rn,Ru,v2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),gke=()=>{const e=je(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(pke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Iw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Iw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Mw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Mw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(dH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Iw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mw(l))})]})})]})};let kI;const EV=()=>({setOpenUploader:e=>{e&&(kI=e)},openUploader:kI}),mke=ct([v2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),vke=()=>{const e=je(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(mke),s=Vv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Vv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(EH()),e(PH())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(oke,{}),x(gke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(cH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:S,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(uH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(F_e,{}),x(H_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(rk,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(G_e,{})})]})},yke=ct([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Ske=()=>{const e=je(),{doesCanvasNeedScaling:t}=Ae(yke);return C.exports.useLayoutEffect(()=>{const n=qe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(vke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(DCe,{}):x(z_e,{})})]})})})};function bke(){const e=je();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(bk,{optionsPanel:x(OCe,{}),styleClass:"inpainting-workarea-overrides",children:x(Ske,{})})}const xke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function wke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Cke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(xke,{fill:"black",boxSize:"2.5rem"}),workarea:x(bke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Cke,{fill:"black",boxSize:"2.5rem"}),workarea:x(wke,{}),tooltip:"Training"}},wb=qe.map(If,(e,t)=>t);[...wb];function _ke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=je();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(r$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(t$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(e$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(n$,{className:"app-tabs-panels",children:t?x(_Ce,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},kke=PV,TV=$S({name:"options",initialState:kke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=wb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:DTe,resetSeed:zTe,setActiveTab:ko,setAllImageToImageParameters:Eke,setAllParameters:Pke,setAllTextToImageParameters:Tke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Lke,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:D7,setInfillMethod:OV,setInitialImage:S2,setIsLightBoxOpen:pd,setIterations:Ake,setMaskPath:NV,setOptionsPanelScrollPosition:Mke,setParameter:BTe,setPerlin:DV,setPrompt:Cb,setSampler:zV,setSeamBlur:EI,setSeamless:BV,setSeamSize:PI,setSeamSteps:TI,setSeamStrength:LI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Ike,setShouldHoldOptionsPanelOpen:Rke,setShouldLoopback:Oke,setShouldPinOptionsPanel:Nke,setShouldRandomizeSeed:Dke,setShouldRunESRGAN:zke,setShouldRunFacetool:Bke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:FTe,setShowDualDisplay:Fke,setSteps:WV,setThreshold:VV,setTileSize:AI,setUpscalingLevel:z7,setUpscalingStrength:B7,setVariationAmount:$ke,setWidth:UV}=TV.actions,Hke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Wke={type:"error",data:"parser error"},Vke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Uke=typeof ArrayBuffer=="function",Gke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>Vke&&t instanceof Blob?n?r(t):MI(t,r):Uke&&(t instanceof ArrayBuffer||Gke(t))?n?r(t):MI(new Blob([t]),r):r(zl[e]+(t||"")),MI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},II="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Yke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:qke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Wke},qke=(e,t)=>{if(Yke){const n=jke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Kke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Xke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Qke=setTimeout,Jke=clearTimeout;function _b(e,t){t.useNativeTimers?(e.setTimeoutFn=Qke.bind(Gc),e.clearTimeoutFn=Jke.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const eEe=1.33;function tEe(e){return typeof e=="string"?nEe(e):Math.ceil((e.byteLength||e.size)*eEe)}function nEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class rEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,_b(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new rEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),F7=64,iEe={};let RI=0,b3=0,OI;function NI(e){let t="";do t=QV[e%F7]+t,e=Math.floor(e/F7);while(e>0);return t}function JV(){const e=NI(+new Date);return e!==OI?(RI=0,OI=e):e+"."+NI(RI++)}for(;b3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Xke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Kke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),_b(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=sEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",DI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,DI,!1)}}function DI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,zI=!0,cEe="arraybuffer",BI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class dEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=BI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=zI&&!BI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||cEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{zI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const fEe={websocket:dEe,polling:uEe},hEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hEe.exec(e||""),o={},a=14;for(;a--;)o[pEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=gEe(o,o.path),o.queryKey=mEe(o,o.query),o}function gEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function mEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=$7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=$7(n.host).host),_b(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=oEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new fEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,bEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",xEe=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Ok(e){return yEe&&(e instanceof ArrayBuffer||SEe(e))||bEe&&e instanceof Blob||xEe&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class EEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=CEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const PEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:_Ee,get PacketType(){return nn},Encoder:kEe,Decoder:Nk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const TEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(TEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}P1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};P1.prototype.reset=function(){this.attempts=0};P1.prototype.setMin=function(e){this.ms=e};P1.prototype.setMax=function(e){this.max=e};P1.prototype.setJitter=function(e){this.jitter=e};class V7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_b(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new P1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||PEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const om={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=vEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=om[i]&&o in om[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new V7(r,t):(om[i]||(om[i]=new V7(r,t)),l=om[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:V7,Socket:oU,io:l5,connect:l5});var LEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,AEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,MEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(FI[t]||t||FI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return IEe(e)},E=function(){return REe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return $I({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return $I({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":OEe(e)},o:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60),2)+":"+ea(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(LEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var FI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},$I=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},IEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},REe=function(t){var n=t.getDay();return n===0&&(n=7),n},OEe=function(t){return(String(t).match(AEe)||[""]).pop().replace(MEe,"").replace(/GMT\+0000/g,"UTC")};const NEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(JA(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(rM("user")):t(l7("user")),r.categories.result.latest_mtime?t(rM("result")):t(l7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(JA(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(wb[a]){case"img2img":{t(S2(h));break}}t(Ow()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(eM()),t(Ow())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Ow())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(tM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(tM(o)),t(Su(!1)),t(i0(!0)),t(eM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(gm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},DEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},zEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},BEe=e=>{const t=Vv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?eH(U_,G_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ut,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=DEe(et?dt.filter(ok):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ut),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&zEe([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=S,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},FEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=BEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},$Ee=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=NEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=FEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>S(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},HEe=["cursorPosition"].map(e=>`canvas.${e}`),WEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),VEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=h$({options:Hke,gallery:pbe,system:h4e,canvas:QSe}),UEe=R$.getPersistConfig({key:"root",storage:I$,rootReducer:aU,blacklist:[...HEe,...WEe,...VEe],debounce:300}),GEe=pye(UEe,aU),sU=l2e({reducer:GEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat($Ee()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),je=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function jEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(a2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ZEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),QEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ZEe),i=t?Math.round(t*100/n):0;return x(DF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function JEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function ePe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Iv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(JEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Bv,{className:" modal hotkeys-modal",children:[x(f_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const tPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=je(),{name:i,status:o,description:a}=e,s=()=>{r(pH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(lB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},nPe=ct(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),rPe=()=>{const{models:e}=Ae(nPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(tPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},iPe=ct([v2,Q_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),oPe=({children:e})=>{const t=je(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Iv(),{isOpen:a,onOpen:s,onClose:l}=Iv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(iPe),S=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Bv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(f_,{className:"modal-close-btn"}),ee(zv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(rPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(rH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Bv,{children:x(zv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},aPe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),sPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(aPe),s=je();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(iH())},className:`status ${l}`,children:u})})},lPe=["dark","light","green"];function uPe(){const{setColorMode:e}=Xv(),t=je(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Lke(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(dB,{align:"stretch",children:lPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(nk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const cPe=ct([v2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dPe=()=>{const e=je(),{models:t,activeModel:n,isProcessing:r}=Ae(cPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(pH(o.target.value))}})})},fPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(sPe,{}),x(dPe,{}),x(ePe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(uPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(oPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ik,{})})})]})]}),hPe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),pPe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),gPe=()=>{const e=je(),t=Ae(hPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(pPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(iH()),e(Tw(!n))};return lt("`",()=>{e(Tw(!n))},[n]),lt("esc",()=>{e(Tw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ee("div",{className:`console-entry console-${S}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(lH,{}),onClick:l})})]})};function mPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var vPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=yPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function yPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=vPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var SPe=[".DS_Store","Thumbs.db"];function bPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&xPe(e.dataTransfer)?[2,kPe(e.dataTransfer,e.type)]:wPe(e)?[2,CPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,_Pe(e)]:[2,[]]})})}function xPe(e){return E4(e)}function wPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function CPe(e){return j7(e.target.files).map(function(t){return x2(t)})}function _Pe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function kPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=j7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(EPe))]):[3,2];case 1:return r=i.sent(),[2,WI(uU(r))];case 2:return[2,WI(j7(e.files).map(function(o){return x2(o)}))]}})})}function WI(e){return e.filter(function(t){return SPe.indexOf(t.name)===-1})}function j7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,YI(n)];if(e.sizen)return[!1,YI(n)]}return[!0,null]}function Rf(e){return e!=null}function WPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hU(l,n),h=Uv(u,1),g=h[0],m=pU(l,r,i),v=Uv(m,1),S=v[0],w=s?s(l):null;return g&&S&&!w})}function P4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function w3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function KI(e){e.preventDefault()}function VPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function UPe(e){return e.indexOf("Edge/")!==-1}function GPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return VPe(e)||UPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;a`.replaceAll("black",e),a_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(o_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=xI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=xI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},s_e=ct([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),l_e=e=>{const t=je(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(s_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},Sb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=je(),t=Vv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},u_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),c_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(u_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=Sb(e.current);!a||(o.evt.preventDefault(),t(ob(!0)),t(_H([a.x,a.y])))},[e,n,r,t,i])},d_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f_e=(e,t)=>{const n=je(),{tool:r,isDrawing:i,isStaging:o}=Ae(d_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=Sb(e.current);if(!a)return;n(kH([a.x,a.y]))}else t.current=!1;n(ob(!1))},[t,n,i,o,e,r])},h_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),p_e=(e,t,n)=>{const r=je(),{isDrawing:i,tool:o,isStaging:a}=Ae(h_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=Sb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(kH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},g_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),m_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(g_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=Sb(e.current);!o||n==="move"||r||(t(ob(!0)),t(_H([o.x,o.y])))},[e,n,r,t])},v_e=()=>{const e=je();return C.exports.useCallback(()=>{e(TH(null)),e(ob(!1))},[e])},y_e=ct([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=()=>{const e=je(),{tool:t,isStaging:n}=Ae(y_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,b_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=b_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},x_e=ct([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const{objects:e}=Ae(x_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},C_e=ct([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),__e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},k_e=()=>{const{colorMode:e}=Xv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(C_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=__e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},E_e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e=e=>{const{...t}=e,n=Ae(E_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,T_e=ct([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function L_e(){const{cursorCoordinatesString:e}=Ae(T_e);return x("div",{children:`Cursor Position: ${e}`})}const A_e=ct([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:S}=e;let w="inherit";return(S==="none"&&(o<512||a<512)||S==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:S!=="auto",shouldShowScaledBoundingBox:S!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),M_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(A_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(L_e,{})]})]})},I_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),R_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(I_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},O_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),N_e=()=>{const e=je(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(O_e),o=C.exports.useCallback(()=>{e(dM(!1))},[e]),a=C.exports.useCallback(()=>{e(dM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(nk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(dH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},D_e=ct([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?g?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),z_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(D_e);i_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{n_e($),g.current=$},[]),S=C.exports.useCallback($=>{t_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=l_e(g),k=c_e(g),T=f_e(g,E),M=p_e(g,E,w),R=m_e(g),O=v_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=S_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(q8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(k_e,{})}),x(v3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(w_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(X8e,{visible:!0,listening:!1}),x(a_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(Q8e,{visible:l!=="move",listening:!1}),x(R_e,{visible:u}),h&&x(P_e,{}),x(e_e,{visible:n&&!u})]})]}),x(M_e,{}),x(N_e,{})]})})},B_e=ct([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function F_e(){const e=je(),{canUndo:t,activeTabName:n}=Ae(B_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const $_e=ct([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function H_e(){const e=je(),{canRedo:t,activeTabName:n}=Ae($_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Iv(),m=C.exports.useRef(null),v=()=>{r(),g()},S=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(LF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(zv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),W_e=()=>{const e=je();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(PH()),e(EH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},V_e=()=>{const e=je();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(EH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},U_e=ct([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),G_e=()=>{const e=je(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(U_e);return lt(["n"],()=>{e(fM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ik,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(fM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(V_e,{}),x(W_e,{})]})})};function bb(){return(bb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function R7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(wI(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=O7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(CI(P),!function(M,R){return R&&!Jm(M)}(P,l.current)&&k)){if(Jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(wI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),xb=function(e){return e.filter(Boolean).join(" ")},Ok=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=xb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},N7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Zw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},j_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},Y_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},q_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=xb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Rk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ok,{className:"react-colorful__hue-pointer",left:t/360,color:N7({h:t,s:100,v:100,a:1})})))}),K_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:N7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Rk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ok,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:N7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function X_e(e,t,n){var r=R7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Z_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Q_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_I=new Map,J_e=function(e){Z_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_I.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_I.set(t,n);var r=Q_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},eke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Zw(Object.assign({},n,{a:0}))+", "+Zw(Object.assign({},n,{a:1}))+")"},o=xb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Rk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ok,{className:"react-colorful__alpha-pointer",left:n.a,color:Zw(n)})))},tke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);J_e(s);var l=X_e(n,i,o),u=l[0],h=l[1],g=xb(["react-colorful",t]);return ae.createElement("div",bb({},a,{ref:s,className:g}),x(K_e,{hsva:u,onChange:h}),x(q_e,{hue:u.h,onChange:h}),ae.createElement(eke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},nke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Y_e,fromHsva:j_e,equal:_V},rke=function(e){return ae.createElement(tke,bb({},e,{colorModel:nke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(rke,{className:`invokeai__color-picker ${t}`,...n})},ike=ct([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),oke=()=>{const e=je(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ike);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const ake=new Uint8Array(16);function ske(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(ake)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function lke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const uke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kI={randomUUID:uke};function c0(e,t,n){if(kI.randomUUID&&!t&&!e)return kI.randomUUID();e=e||{};const r=e.random||(e.rng||ske)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return lke(r)}const cke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},dke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},fke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},hke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=hke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=Vv();if(!S){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=cke(S,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(dke(M),t(gm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(fke(M,R,O),t(gm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(gm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(gm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},pke=ct([Rn,Ru,v2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),gke=()=>{const e=je(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(pke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Iw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Iw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Mw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Mw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(fH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Iw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mw(l))})]})})]})};let EI;const EV=()=>({setOpenUploader:e=>{e&&(EI=e)},openUploader:EI}),mke=ct([v2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),vke=()=>{const e=je(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(mke),s=Vv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Vv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(PH()),e(uk())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(oke,{}),x(gke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(dH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:S,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(cH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(F_e,{}),x(H_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(rk,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(G_e,{})})]})},yke=ct([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Ske=()=>{const e=je(),{doesCanvasNeedScaling:t}=Ae(yke);return C.exports.useLayoutEffect(()=>{const n=qe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(vke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(DCe,{}):x(z_e,{})})]})})})};function bke(){const e=je();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(xk,{optionsPanel:x(OCe,{}),styleClass:"inpainting-workarea-overrides",children:x(Ske,{})})}const xke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function wke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Cke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(xke,{fill:"black",boxSize:"2.5rem"}),workarea:x(bke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Cke,{fill:"black",boxSize:"2.5rem"}),workarea:x(wke,{}),tooltip:"Training"}},wb=qe.map(If,(e,t)=>t);[...wb];function _ke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=je();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(i$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(n$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(t$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(r$,{className:"app-tabs-panels",children:t?x(_Ce,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},kke=PV,TV=$S({name:"options",initialState:kke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=wb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:DTe,resetSeed:zTe,setActiveTab:ko,setAllImageToImageParameters:Eke,setAllParameters:Pke,setAllTextToImageParameters:Tke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Lke,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:D7,setInfillMethod:OV,setInitialImage:S2,setIsLightBoxOpen:pd,setIterations:Ake,setMaskPath:NV,setOptionsPanelScrollPosition:Mke,setParameter:BTe,setPerlin:DV,setPrompt:Cb,setSampler:zV,setSeamBlur:PI,setSeamless:BV,setSeamSize:TI,setSeamSteps:LI,setSeamStrength:AI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Ike,setShouldHoldOptionsPanelOpen:Rke,setShouldLoopback:Oke,setShouldPinOptionsPanel:Nke,setShouldRandomizeSeed:Dke,setShouldRunESRGAN:zke,setShouldRunFacetool:Bke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:FTe,setShowDualDisplay:Fke,setSteps:WV,setThreshold:VV,setTileSize:MI,setUpscalingLevel:z7,setUpscalingStrength:B7,setVariationAmount:$ke,setWidth:UV}=TV.actions,Hke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Wke={type:"error",data:"parser error"},Vke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Uke=typeof ArrayBuffer=="function",Gke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>Vke&&t instanceof Blob?n?r(t):II(t,r):Uke&&(t instanceof ArrayBuffer||Gke(t))?n?r(t):II(new Blob([t]),r):r(zl[e]+(t||"")),II=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},RI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Yke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:qke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Wke},qke=(e,t)=>{if(Yke){const n=jke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Kke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Xke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Qke=setTimeout,Jke=clearTimeout;function _b(e,t){t.useNativeTimers?(e.setTimeoutFn=Qke.bind(Gc),e.clearTimeoutFn=Jke.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const eEe=1.33;function tEe(e){return typeof e=="string"?nEe(e):Math.ceil((e.byteLength||e.size)*eEe)}function nEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class rEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,_b(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new rEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),F7=64,iEe={};let OI=0,b3=0,NI;function DI(e){let t="";do t=QV[e%F7]+t,e=Math.floor(e/F7);while(e>0);return t}function JV(){const e=DI(+new Date);return e!==NI?(OI=0,NI=e):e+"."+DI(OI++)}for(;b3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Xke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Kke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),_b(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=sEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,zI,!1)}}function zI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,BI=!0,cEe="arraybuffer",FI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class dEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=FI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=BI&&!FI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||cEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{BI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const fEe={websocket:dEe,polling:uEe},hEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hEe.exec(e||""),o={},a=14;for(;a--;)o[pEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=gEe(o,o.path),o.queryKey=mEe(o,o.query),o}function gEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function mEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=$7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=$7(n.host).host),_b(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=oEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new fEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,bEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",xEe=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Nk(e){return yEe&&(e instanceof ArrayBuffer||SEe(e))||bEe&&e instanceof Blob||xEe&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class EEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=CEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const PEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:_Ee,get PacketType(){return nn},Encoder:kEe,Decoder:Dk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const TEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(TEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}P1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};P1.prototype.reset=function(){this.attempts=0};P1.prototype.setMin=function(e){this.ms=e};P1.prototype.setMax=function(e){this.max=e};P1.prototype.setJitter=function(e){this.jitter=e};class V7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_b(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new P1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||PEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const om={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=vEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=om[i]&&o in om[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new V7(r,t):(om[i]||(om[i]=new V7(r,t)),l=om[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:V7,Socket:oU,io:l5,connect:l5});var LEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,AEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,MEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String($I[t]||t||$I.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return IEe(e)},E=function(){return REe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":OEe(e)},o:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60),2)+":"+ea(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(LEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var $I={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},HI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},IEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},REe=function(t){var n=t.getDay();return n===0&&(n=7),n},OEe=function(t){return(String(t).match(AEe)||[""]).pop().replace(MEe,"").replace(/GMT\+0000/g,"UTC")};const NEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(eM(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(iM("user")):t(l7("user")),r.categories.result.latest_mtime?t(iM("result")):t(l7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(eM(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(wb[a]){case"img2img":{t(S2(h));break}}t(Ow()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(tM()),t(Ow())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Ow())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(Su(!1)),t(i0(!0)),t(tM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(gm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},DEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},zEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},BEe=e=>{const t=Vv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?tH(U_,G_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ut,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=DEe(et?dt.filter(ok):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ut),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&zEe([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=S,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},FEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=BEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},$Ee=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=NEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=FEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>S(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},HEe=["cursorPosition"].map(e=>`canvas.${e}`),WEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),VEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=p$({options:Hke,gallery:pbe,system:h4e,canvas:QSe}),UEe=O$.getPersistConfig({key:"root",storage:R$,rootReducer:aU,blacklist:[...HEe,...WEe,...VEe],debounce:300}),GEe=pye(UEe,aU),sU=l2e({reducer:GEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat($Ee()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),je=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function jEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(a2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ZEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),QEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ZEe),i=t?Math.round(t*100/n):0;return x(zF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function JEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function ePe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Iv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(JEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Bv,{className:" modal hotkeys-modal",children:[x(f_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const tPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=je(),{name:i,status:o,description:a}=e,s=()=>{r(gH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(uB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},nPe=ct(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),rPe=()=>{const{models:e}=Ae(nPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(tPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},iPe=ct([v2,Q_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),oPe=({children:e})=>{const t=je(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Iv(),{isOpen:a,onOpen:s,onClose:l}=Iv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(iPe),S=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Bv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(f_,{className:"modal-close-btn"}),ee(zv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(rPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(iH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Bv,{children:x(zv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},aPe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),sPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(aPe),s=je();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(oH())},className:`status ${l}`,children:u})})},lPe=["dark","light","green"];function uPe(){const{setColorMode:e}=Xv(),t=je(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Lke(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(fB,{align:"stretch",children:lPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(nk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const cPe=ct([v2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dPe=()=>{const e=je(),{models:t,activeModel:n,isProcessing:r}=Ae(cPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(gH(o.target.value))}})})},fPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(sPe,{}),x(dPe,{}),x(ePe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(uPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(oPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ik,{})})})]})]}),hPe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),pPe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),gPe=()=>{const e=je(),t=Ae(hPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(pPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(oH()),e(Tw(!n))};return lt("`",()=>{e(Tw(!n))},[n]),lt("esc",()=>{e(Tw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ee("div",{className:`console-entry console-${S}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(uH,{}),onClick:l})})]})};function mPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var vPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=yPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function yPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=vPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var SPe=[".DS_Store","Thumbs.db"];function bPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&xPe(e.dataTransfer)?[2,kPe(e.dataTransfer,e.type)]:wPe(e)?[2,CPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,_Pe(e)]:[2,[]]})})}function xPe(e){return E4(e)}function wPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function CPe(e){return j7(e.target.files).map(function(t){return x2(t)})}function _Pe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function kPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=j7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(EPe))]):[3,2];case 1:return r=i.sent(),[2,VI(uU(r))];case 2:return[2,VI(j7(e.files).map(function(o){return x2(o)}))]}})})}function VI(e){return e.filter(function(t){return SPe.indexOf(t.name)===-1})}function j7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,qI(n)];if(e.sizen)return[!1,qI(n)]}return[!0,null]}function Rf(e){return e!=null}function WPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hU(l,n),h=Uv(u,1),g=h[0],m=pU(l,r,i),v=Uv(m,1),S=v[0],w=s?s(l):null;return g&&S&&!w})}function P4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function w3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function XI(e){e.preventDefault()}function VPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function UPe(e){return e.indexOf("Edge/")!==-1}function GPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return VPe(e)||UPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function lTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Dk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,ZPe),i=SU(r),o=i.open,a=T4(i,QPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Dk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:bPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Dk.defaultProps=yU;Dk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var X7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return qPe(n)},[n]),j=C.exports.useMemo(function(){return YPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:ZI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:ZI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(uTe,X7),K=Qw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&jPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",KI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",KI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(tTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&WPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Qw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Qw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[HPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&S&&S(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,S,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ut=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){KPe(Ze)?(W(Ze),X({type:"closeDialog"})):XPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(GPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,JPe);return ur(ur(K7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,eTe),ze=K7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ut)})}function uTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},X7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},X7);default:return e}}function ZI(){}const cTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},QI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(uk(u)):o==="img2img"&&t(S2(u))},dTe=e=>{const{children:t}=e,n=je(),r=Ae(_r),i=h2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` -`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(QI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(QI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(dk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(cTe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},fTe=()=>{const e=je(),t=Ae(LCe),n=h2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ct([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),hTe=()=>{const e=je(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(dH,{})}),r&&ee(Ln,{children:[x(gH,{iconButton:!0}),x(mH,{})]})]}):null},pTe=()=>{const e=je(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Li(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(oH,{})}):null};mPe();const gTe=()=>(fTe(),ee("div",{className:"App",children:[ee(dTe,{children:[x(QEe,{}),ee("div",{className:"app-content",children:[x(fPe,{}),x(_ke,{})]}),x("div",{className:"app-console",children:x(gPe,{})})]}),x(hTe,{}),x(pTe,{})]}));const xU=bye(sU),mTe=kN({key:"invokeai-style-cache",prepend:!0});e6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(XEe,{}),persistor:xU,children:x(LJ,{value:mTe,children:x(Eve,{children:x(gTe,{})})})})})})); +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vU(e,t){if(!!e){if(typeof e=="string")return q7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q7(e,t)}}function q7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function lTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,ZPe),i=SU(r),o=i.open,a=T4(i,QPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});zk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:bPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};zk.defaultProps=yU;zk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var X7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return qPe(n)},[n]),j=C.exports.useMemo(function(){return YPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:QI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:QI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(uTe,X7),K=Qw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&jPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",XI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",XI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(tTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&WPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Qw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Qw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[HPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&S&&S(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,S,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ut=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){KPe(Ze)?(W(Ze),X({type:"closeDialog"})):XPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(GPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,JPe);return ur(ur(K7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,eTe),ze=K7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ut)})}function uTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},X7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},X7);default:return e}}function QI(){}const cTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},JI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(ck(u)):o==="img2img"&&t(S2(u))},dTe=e=>{const{children:t}=e,n=je(),r=Ae(_r),i=h2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` +`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(JI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(JI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(fk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(cTe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},fTe=()=>{const e=je(),t=Ae(LCe),n=h2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ct([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),hTe=()=>{const e=je(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(fH,{})}),r&&ee(Ln,{children:[x(mH,{iconButton:!0}),x(vH,{})]})]}):null},pTe=()=>{const e=je(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Li(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(aH,{})}):null};mPe();const gTe=()=>(fTe(),ee("div",{className:"App",children:[ee(dTe,{children:[x(QEe,{}),ee("div",{className:"app-content",children:[x(fPe,{}),x(_ke,{})]}),x("div",{className:"app-console",children:x(gPe,{})})]}),x(hTe,{}),x(pTe,{})]}));const xU=bye(sU),mTe=EN({key:"invokeai-style-cache",prepend:!0});e6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(XEe,{}),persistor:xU,children:x(LJ,{value:mTe,children:x(Eve,{children:x(gTe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index f0c6ee799b..934a3aa947 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ InvokeAI - A Stable Diffusion Toolkit - + From 3aebe754faff17a1bd3bf39cdaf8a54e6deee131 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 25 Nov 2022 10:46:12 +1100 Subject: [PATCH 214/220] Fixes unnecessary canvas scaling --- frontend/src/features/gallery/components/ImageGallery.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 826b67a048..d8e8a5a450 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -129,8 +129,11 @@ export default function ImageGallery() { galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0 ) ); - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); - }, [dispatch]); + setTimeout( + () => shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)), + 400 + ); + }, [dispatch, shouldPinGallery]); const handleClickLoadMore = () => { dispatch(requestImages(currentCategory)); From 916e795c2653eee0150a4b6bd5eacfed1e52a380 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 25 Nov 2022 10:48:38 +1100 Subject: [PATCH 215/220] Adds gallery drag and drop to img2img/canvas --- .../components/CurrentImagePreview.tsx | 14 ++++++-- .../gallery/components/HoverableImage.tsx | 10 ++++-- .../gallery/hooks/useGetImageByUuid.ts | 28 ++++++++++++++++ .../gallery/store/gallerySliceSelectors.ts | 2 ++ .../tabs/components/InvokeWorkarea.tsx | 33 ++++++++++++++++--- 5 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 frontend/src/features/gallery/hooks/useGetImageByUuid.ts diff --git a/frontend/src/features/gallery/components/CurrentImagePreview.tsx b/frontend/src/features/gallery/components/CurrentImagePreview.tsx index d000a81e82..2f83b6c2d4 100644 --- a/frontend/src/features/gallery/components/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/components/CurrentImagePreview.tsx @@ -1,5 +1,5 @@ import { IconButton, Image } from '@chakra-ui/react'; -import { useState } from 'react'; +import { DragEvent, useState } from 'react'; import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { @@ -12,13 +12,19 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { OptionsState, + setInitialImage, setIsLightBoxOpen, } from 'features/options/store/optionsSlice'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; +import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; export const imagesSelector = createSelector( - [(state: RootState) => state.gallery, (state: RootState) => state.options], - (gallery: GalleryState, options: OptionsState) => { + [ + (state: RootState) => state.gallery, + (state: RootState) => state.options, + activeTabNameSelector, + ], + (gallery: GalleryState, options: OptionsState, activeTabName) => { const { currentCategory, currentImage, intermediateImage } = gallery; const { shouldShowImageDetails } = options; @@ -32,6 +38,7 @@ export const imagesSelector = createSelector( const imagesLength = tempImages.length; return { + activeTabName, imageToDisplay: intermediateImage ? intermediateImage : currentImage, isIntermediate: Boolean(intermediateImage), viewerImageToDisplay: currentImage, @@ -61,6 +68,7 @@ export default function CurrentImagePreview() { shouldShowImageDetails, imageToDisplay, isIntermediate, + activeTabName, } = useAppSelector(imagesSelector); const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = diff --git a/frontend/src/features/gallery/components/HoverableImage.tsx b/frontend/src/features/gallery/components/HoverableImage.tsx index c9765ab6fc..fff5b69259 100644 --- a/frontend/src/features/gallery/components/HoverableImage.tsx +++ b/frontend/src/features/gallery/components/HoverableImage.tsx @@ -13,7 +13,7 @@ import { } from 'features/gallery/store/gallerySlice'; import { FaCheck, FaTrashAlt } from 'react-icons/fa'; import DeleteImageModal from './DeleteImageModal'; -import { memo, useState } from 'react'; +import { DragEvent, memo, useState } from 'react'; import { setActiveTab, setAllImageToImageParameters, @@ -129,7 +129,6 @@ const HoverableImage = memo((props: HoverableImageProps) => { }; const handleUseInitialImage = async () => { - // check if the image exists before setting it as initial image if (metadata?.image?.init_image_path) { const response = await fetch(metadata.image.init_image_path); if (response.ok) { @@ -155,6 +154,11 @@ const HoverableImage = memo((props: HoverableImageProps) => { const handleSelectImage = () => dispatch(setCurrentImage(image)); + const handleDragStart = (e: DragEvent) => { + e.dataTransfer.setData('invokeai/imageUuid', uuid); + e.dataTransfer.effectAllowed = 'move'; + }; + return ( { @@ -169,6 +173,8 @@ const HoverableImage = memo((props: HoverableImageProps) => { onMouseOver={handleMouseOver} onMouseOut={handleMouseOut} userSelect={'none'} + draggable={true} + onDragStart={handleDragStart} > ({ + resultImages: gallery.categories.result.images, + userImages: gallery.categories.user.images, +})); + +const useGetImageByUuid = () => { + const { resultImages, userImages } = useAppSelector(selector); + + return (uuid: string) => { + const resultImagesResult = resultImages.find( + (image) => image.uuid === uuid + ); + if (resultImagesResult) { + return resultImagesResult; + } + + const userImagesResult = userImages.find((image) => image.uuid === uuid); + if (userImagesResult) { + return userImagesResult; + } + }; +}; + +export default useGetImageByUuid; diff --git a/frontend/src/features/gallery/store/gallerySliceSelectors.ts b/frontend/src/features/gallery/store/gallerySliceSelectors.ts index 3485a0c027..a825a29c9c 100644 --- a/frontend/src/features/gallery/store/gallerySliceSelectors.ts +++ b/frontend/src/features/gallery/store/gallerySliceSelectors.ts @@ -95,3 +95,5 @@ export const hoverableImageSelector = createSelector( }, } ); + +export const gallerySelector = (state: RootState) => state.gallery; diff --git a/frontend/src/features/tabs/components/InvokeWorkarea.tsx b/frontend/src/features/tabs/components/InvokeWorkarea.tsx index ec6637cc61..aa21282669 100644 --- a/frontend/src/features/tabs/components/InvokeWorkarea.tsx +++ b/frontend/src/features/tabs/components/InvokeWorkarea.tsx @@ -1,16 +1,21 @@ import { Tooltip } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; -import { ReactNode } from 'react'; +import { DragEvent, ReactNode } from 'react'; import { VscSplitHorizontal } from 'react-icons/vsc'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import ImageGallery from 'features/gallery/components/ImageGallery'; import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; import { OptionsState, + setInitialImage, setShowDualDisplay, } from 'features/options/store/optionsSlice'; -import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; +import { + setDoesCanvasNeedScaling, + setInitialCanvasImage, +} from 'features/canvas/store/canvasSlice'; import _ from 'lodash'; +import useGetImageByUuid from 'features/gallery/hooks/useGetImageByUuid'; const workareaSelector = createSelector( [(state: RootState) => state.options, activeTabNameSelector], @@ -21,6 +26,7 @@ const workareaSelector = createSelector( shouldPinOptionsPanel, isLightBoxOpen, shouldShowDualDisplayButton: ['inpainting'].includes(activeTabName), + activeTabName, }; }, { @@ -39,14 +45,31 @@ type InvokeWorkareaProps = { const InvokeWorkarea = (props: InvokeWorkareaProps) => { const dispatch = useAppDispatch(); const { optionsPanel, children, styleClass } = props; - const { showDualDisplay, isLightBoxOpen, shouldShowDualDisplayButton } = - useAppSelector(workareaSelector); + const { + activeTabName, + showDualDisplay, + isLightBoxOpen, + shouldShowDualDisplayButton, + } = useAppSelector(workareaSelector); + + const getImageByUuid = useGetImageByUuid(); const handleDualDisplay = () => { dispatch(setShowDualDisplay(!showDualDisplay)); dispatch(setDoesCanvasNeedScaling(true)); }; + const handleDrop = (e: DragEvent) => { + const uuid = e.dataTransfer.getData('invokeai/imageUuid'); + const image = getImageByUuid(uuid); + if (!image) return; + if (activeTabName === 'img2img') { + dispatch(setInitialImage(image)); + } else if (activeTabName === 'unifiedCanvas') { + dispatch(setInitialCanvasImage(image)); + } + }; + return (
{ >
{optionsPanel} -
+
{children} {shouldShowDualDisplayButton && ( From 1e9121c8d6f18c93039de9a204c7b7893743ec4e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 25 Nov 2022 18:03:25 +1100 Subject: [PATCH 216/220] Builds fresh bundle --- .../{index.8cec9255.js => index.586c87ba.js} | 84 +++++++++---------- frontend/dist/index.html | 2 +- .../components/CurrentImagePreview.tsx | 14 +--- 3 files changed, 46 insertions(+), 54 deletions(-) rename frontend/dist/assets/{index.8cec9255.js => index.586c87ba.js} (79%) diff --git a/frontend/dist/assets/index.8cec9255.js b/frontend/dist/assets/index.586c87ba.js similarity index 79% rename from frontend/dist/assets/index.8cec9255.js rename to frontend/dist/assets/index.586c87ba.js index ef2bb692c0..3d432b2342 100644 --- a/frontend/dist/assets/index.8cec9255.js +++ b/frontend/dist/assets/index.586c87ba.js @@ -1,4 +1,4 @@ -function Kq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Z7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Xt={};/** +function Kq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Q7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Xt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function Kq(e,t){for(var n=0;n>>1,Re=G[me];if(0>>1;mei(Me,ce))_ei(Je,Me)?(G[me]=Je,G[_e]=ce,me=_e):(G[me]=Me,G[Se]=ce,me=Se);else if(_ei(Je,ce))G[me]=Je,G[_e]=ce,me=_e;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,J(R);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function R(G,X){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Re=me(g.expirationTime<=X);X=e.unstable_now(),typeof Re=="function"?g.callback=Re:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var O=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Re,t(l,G),S||v||(S=!0,J(R))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(sR);(function(e){e.exports=sR})(d0);/** + */(function(e){function t(G,X){var ce=G.length;G.push(X);e:for(;0>>1,Re=G[me];if(0>>1;mei(Me,ce))_ei(Je,Me)?(G[me]=Je,G[_e]=ce,me=_e):(G[me]=Me,G[Se]=ce,me=Se);else if(_ei(Je,ce))G[me]=Je,G[_e]=ce,me=_e;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,g=null,m=3,v=!1,y=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!y)if(n(l)!==null)y=!0,J(R);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function R(G,X){y=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Re=me(g.expirationTime<=X);X=e.unstable_now(),typeof Re=="function"?g.callback=Re:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var O=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Re,t(l,G),y||v||(y=!0,J(R))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(sR);(function(e){e.exports=sR})(d0);/** * @license React * react-dom.production.min.js * @@ -22,14 +22,14 @@ function Kq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),t6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,IE={},RE={};function fK(e){return t6.call(RE,e)?!0:t6.call(IE,e)?!1:dK.test(e)?RE[e]=!0:(IE[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var n9=/[\-:]([a-z])/g;function r9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n9,r9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function i9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,IE={},RE={};function fK(e){return n6.call(RE,e)?!0:n6.call(IE,e)?!1:dK.test(e)?RE[e]=!0:(IE[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var r9=/[\-:]([a-z])/g;function i9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r9,i9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r9,i9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r9,i9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function o9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{nx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?am(e):""}function gK(e){switch(e.tag){case 5:return am(e.type);case 16:return am("Lazy");case 13:return am("Suspense");case 19:return am("SuspenseList");case 0:case 2:case 15:return e=rx(e.type,!1),e;case 11:return e=rx(e.type.render,!1),e;case 1:return e=rx(e.type,!0),e;default:return""}}function o6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case n6:return"Profiler";case o9:return"StrictMode";case r6:return"Suspense";case i6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dR:return(e.displayName||"Context")+".Consumer";case cR:return(e._context.displayName||"Context")+".Provider";case a9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case s9:return t=e.displayName||null,t!==null?t:o6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return o6(e(t))}catch{}}return null}function mK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return o6(t);case 8:return t===o9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ad(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vK(e){var t=hR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dy(e){e._valueTracker||(e._valueTracker=vK(e))}function pR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function f5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function a6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function NE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ad(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gR(e,t){t=t.checked,t!=null&&i9(e,"checked",t,!1)}function s6(e,t){gR(e,t);var n=ad(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?l6(e,t.type,n):t.hasOwnProperty("defaultValue")&&l6(e,t.type,ad(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function l6(e,t,n){(t!=="number"||f5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sm=Array.isArray;function f0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tv(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _m={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yK=["Webkit","ms","Moz","O"];Object.keys(_m).forEach(function(e){yK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_m[t]=_m[e]})});function SR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_m.hasOwnProperty(e)&&_m[e]?(""+t).trim():t+"px"}function bR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=SR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function d6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function f6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var h6=null;function l9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var p6=null,h0=null,p0=null;function FE(e){if(e=qv(e)){if(typeof p6!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=R4(t),p6(e.stateNode,e.type,t))}}function xR(e){h0?p0?p0.push(e):p0=[e]:h0=e}function wR(){if(h0){var e=h0,t=p0;if(p0=h0=null,FE(e),t)for(e=0;e>>=0,e===0?32:31-(AK(e)/MK|0)|0}var hy=64,py=4194304;function lm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function m5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=lm(s):(o&=a,o!==0&&(r=lm(o)))}else a=n&~i,a!==0?r=lm(a):o!==0&&(r=lm(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function jv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ws(t),e[t]=n}function NK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Em),qE=String.fromCharCode(32),KE=!1;function WR(e,t){switch(e){case"keyup":return uX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function dX(e,t){switch(e){case"compositionend":return VR(t);case"keypress":return t.which!==32?null:(KE=!0,qE);case"textInput":return e=t.data,e===qE&&KE?null:e;default:return null}}function fX(e,t){if(Gp)return e==="compositionend"||!m9&&WR(e,t)?(e=$R(),E3=h9=$c=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=JE(n)}}function YR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qR(){for(var e=window,t=f5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=f5(e.document)}return t}function v9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xX(e){var t=qR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YR(n.ownerDocument.documentElement,n)){if(r!==null&&v9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=eP(n,o);var a=eP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,b6=null,Tm=null,x6=!1;function tP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;x6||jp==null||jp!==f5(r)||(r=jp,"selectionStart"in r&&v9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tm&&sv(Tm,r)||(Tm=r,r=S5(b6,"onSelect"),0Kp||(e.current=P6[Kp],P6[Kp]=null,Kp--)}function qn(e,t){Kp++,P6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function lP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function rO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function uP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=rO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,vx=!1;function iO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,iO(e)}function vd(){if(!vx&&hu!==null){vx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&mP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=$g(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=$g(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=kx(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(sm(T))return S(P,k,T,M);if(Ng(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=_x(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=fO(!0),hO=fO(!1),Kv={},_l=md(Kv),dv=md(Kv),fv=md(Kv);function Df(e){if(e===Kv)throw Error(Ne(174));return e}function E9(e,t){switch(qn(fv,t),qn(dv,e),qn(_l,Kv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:c6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=c6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(dv),Qn(fv)}function pO(e){Df(fv.current);var t=Df(_l.current),n=c6(t,e.type);t!==n&&(qn(dv,e),qn(_l,n))}function P9(e){dv.current===e&&(Qn(_l),Qn(dv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yx=[];function T9(){for(var e=0;en?n:4,e(!0);var r=Sx.transition;Sx.transition={};try{e(!1),t()}finally{Tn=n,Sx.transition=r}}function AO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MO(e))IO(t,n);else if(n=lO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),RO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MO(e))IO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,_9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),RO(n,t,r))}}function MO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function IO(e,t){Lm=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,c9(e,n)}}var A5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:yP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,kO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:vP,useDebugValue:R9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=vP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||vO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yP(SO.bind(null,r,o,e),[e]),r.flags|=2048,gv(9,yO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hv++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{rx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sm(e):""}function gK(e){switch(e.tag){case 5:return sm(e.type);case 16:return sm("Lazy");case 13:return sm("Suspense");case 19:return sm("SuspenseList");case 0:case 2:case 15:return e=ix(e.type,!1),e;case 11:return e=ix(e.type.render,!1),e;case 1:return e=ix(e.type,!0),e;default:return""}}function a6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case r6:return"Profiler";case a9:return"StrictMode";case i6:return"Suspense";case o6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dR:return(e.displayName||"Context")+".Consumer";case cR:return(e._context.displayName||"Context")+".Provider";case s9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case l9:return t=e.displayName||null,t!==null?t:a6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return a6(e(t))}catch{}}return null}function mK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return a6(t);case 8:return t===a9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ad(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vK(e){var t=hR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dy(e){e._valueTracker||(e._valueTracker=vK(e))}function pR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function f5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function s6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function NE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ad(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gR(e,t){t=t.checked,t!=null&&o9(e,"checked",t,!1)}function l6(e,t){gR(e,t);var n=ad(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?u6(e,t.type,n):t.hasOwnProperty("defaultValue")&&u6(e,t.type,ad(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function u6(e,t,n){(t!=="number"||f5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var lm=Array.isArray;function f0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nv(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var km={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yK=["Webkit","ms","Moz","O"];Object.keys(km).forEach(function(e){yK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),km[t]=km[e]})});function SR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||km.hasOwnProperty(e)&&km[e]?(""+t).trim():t+"px"}function bR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=SR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function f6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function h6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var p6=null;function u9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g6=null,h0=null,p0=null;function FE(e){if(e=Kv(e)){if(typeof g6!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=R4(t),g6(e.stateNode,e.type,t))}}function xR(e){h0?p0?p0.push(e):p0=[e]:h0=e}function wR(){if(h0){var e=h0,t=p0;if(p0=h0=null,FE(e),t)for(e=0;e>>=0,e===0?32:31-(AK(e)/MK|0)|0}var hy=64,py=4194304;function um(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function m5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=um(s):(o&=a,o!==0&&(r=um(o)))}else a=n&~i,a!==0?r=um(a):o!==0&&(r=um(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ws(t),e[t]=n}function NK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Pm),qE=String.fromCharCode(32),KE=!1;function WR(e,t){switch(e){case"keyup":return uX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function dX(e,t){switch(e){case"compositionend":return VR(t);case"keypress":return t.which!==32?null:(KE=!0,qE);case"textInput":return e=t.data,e===qE&&KE?null:e;default:return null}}function fX(e,t){if(Gp)return e==="compositionend"||!v9&&WR(e,t)?(e=$R(),E3=p9=$c=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=JE(n)}}function YR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qR(){for(var e=window,t=f5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=f5(e.document)}return t}function y9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xX(e){var t=qR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YR(n.ownerDocument.documentElement,n)){if(r!==null&&y9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=eP(n,o);var a=eP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,x6=null,Lm=null,w6=!1;function tP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;w6||jp==null||jp!==f5(r)||(r=jp,"selectionStart"in r&&y9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Lm&&lv(Lm,r)||(Lm=r,r=S5(x6,"onSelect"),0Kp||(e.current=T6[Kp],T6[Kp]=null,Kp--)}function qn(e,t){Kp++,T6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function lP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function rO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function uP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=rO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,yx=!1;function iO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,iO(e)}function vd(){if(!yx&&hu!==null){yx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&mP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=Hg(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=Hg(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=Ex(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(lm(T))return y(P,k,T,M);if(Dg(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=kx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=fO(!0),hO=fO(!1),Xv={},_l=md(Xv),fv=md(Xv),hv=md(Xv);function Df(e){if(e===Xv)throw Error(Ne(174));return e}function P9(e,t){switch(qn(hv,t),qn(fv,e),qn(_l,Xv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:d6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=d6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(fv),Qn(hv)}function pO(e){Df(hv.current);var t=Df(_l.current),n=d6(t,e.type);t!==n&&(qn(fv,e),qn(_l,n))}function T9(e){fv.current===e&&(Qn(_l),Qn(fv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sx=[];function L9(){for(var e=0;en?n:4,e(!0);var r=bx.transition;bx.transition={};try{e(!1),t()}finally{Tn=n,bx.transition=r}}function AO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MO(e))IO(t,n);else if(n=lO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),RO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MO(e))IO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,k9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),RO(n,t,r))}}function MO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function IO(e,t){Am=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d9(e,n)}}var A5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:yP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,kO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:vP,useDebugValue:O9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=vP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||vO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yP(SO.bind(null,r,o,e),[e]),r.flags|=2048,mv(9,yO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[cv]=r,WO(e,t,!1,!1),t.stateNode=e;e:{switch(a=f6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Hg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return F9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(S9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),T9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return P9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return C9(t.type._context),null;case 22:case 23:return F9(),null;case 24:return null;default:return null}}var Cy=!1,Hi=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function F6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PP=!1;function KX(e,t){if(w6=v5,e=qR(),v9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(C6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=PP,PP=!1,S}function Am(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&F6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GO(e){var t=e.alternate;t!==null&&(e.alternate=null,GO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[cv],delete t[E6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jO(e){return e.tag===5||e.tag===3||e.tag===4}function TP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function H6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(H6(e,t,n),e=e.sibling;e!==null;)H6(e,t,n),e=e.sibling}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)YO(e,t,n),n=n.sibling}function YO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?mx(e.parentNode,n):e.nodeType===1&&mx(e,n),ov(e)):mx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&F6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function LP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-z9?Gf(e,0):D9|=n),Io(e,t)}function tN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(jv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),tN(e,n)}var nN;nN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&oO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=A9(null,t,r,e,i,n);var o=M9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,k9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,I6(t,r,e,n),t=N6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&y9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=O6(null,t,r,e,n);break e;case 1:t=_P(null,t,r,e,n);break e;case 11:t=wP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),O6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),_P(e,t,r,i,n);case 3:e:{if(FO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=kP(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=hO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return pO(t),e===null&&L6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,_6(r,i)?a=null:o!==null&&_6(r,o)&&(t.flags|=32),BO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&L6(t),null;case 13:return $O(e,t,n);case 4:return E9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),wP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),A6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),A6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),CP(e,t,r,i,n);case 15:return DO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),dO(t,r,i),I6(t,r,i,n),N6(null,t,r,!0,e,n);case 19:return HO(e,t,n);case 22:return zO(e,t,n)}throw Error(Ne(156,t.tag))};function rN(e,t){return LR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function H9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return H9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===a9)return 11;if(e===s9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")H9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case o9:a=8,i|=8;break;case n6:return e=Da(12,n,t,i|2),e.elementType=n6,e.lanes=o,e;case r6:return e=Da(13,n,t,i),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(19,n,t,i),e.elementType=i6,e.lanes=o,e;case fR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cR:a=10;break e;case dR:a=9;break e;case a9:a=11;break e;case s9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=fR,e.lanes=n,e.stateNode={isHidden:!1},e}function _x(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function kx(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ox(0),this.expirationTimes=ox(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ox(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function W9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},k9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Z7(Bl.exports);var zP=Bl.exports;e6.createRoot=zP.createRoot,e6.hydrateRoot=zP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Cx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function O6(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WX=typeof WeakMap=="function"?WeakMap:Map;function OO(e,t,n){n=yu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){I5||(I5=!0,U6=r),O6(e,t)},n}function NO(e,t,n){n=yu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){O6(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){O6(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function SP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WX;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nZ.bind(null,e,t,n),t.then(e,e))}function bP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xP(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yu(-1,1),t.tag=2,Xc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var VX=Mu.ReactCurrentOwner,Lo=!1;function eo(e,t,n,r){t.child=e===null?hO(t,null,n,r):V0(t,e.child,n,r)}function wP(e,t,n,r,i){n=n.render;var o=t.ref;return m0(t,i),r=M9(e,t,n,r,o,i),n=I9(),e!==null&&!Lo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cu(e,t,i)):(ir&&n&&S9(t),t.flags|=1,eo(e,t,r,i),t.child)}function CP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!W9(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,DO(e,t,o,r,i)):(e=O3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:lv,n(a,r)&&e.ref===t.ref)return Cu(e,t,i)}return t.flags|=1,e=Jc(o,r),e.ref=t.ref,e.return=t,t.child=e}function DO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(lv(o,r)&&e.ref===t.ref)if(Lo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Lo=!0);else return t.lanes=e.lanes,Cu(e,t,i)}return N6(e,t,n,r,i)}function zO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(e0,na),na|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qn(e0,na),na|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,qn(e0,na),na|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,qn(e0,na),na|=r;return eo(e,t,i,n),t.child}function BO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function N6(e,t,n,r,i){var o=Mo(n)?th:Vi.current;return o=H0(t,o),m0(t,i),n=M9(e,t,n,r,o,i),r=I9(),e!==null&&!Lo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cu(e,t,i)):(ir&&r&&S9(t),t.flags|=1,eo(e,t,n,i),t.child)}function _P(e,t,n,r,i){if(Mo(n)){var o=!0;w5(t)}else o=!1;if(m0(t,i),t.stateNode===null)M3(e,t),dO(t,n,r),R6(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=$a(u):(u=Mo(n)?th:Vi.current,u=H0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&gP(t,a,r,u),Rc=!1;var m=t.memoizedState;a.state=m,P5(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Ao.current||Rc?(typeof h=="function"&&(I6(t,n,h,r),l=t.memoizedState),(s=Rc||pP(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:gs(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=$a(l):(l=Mo(n)?th:Vi.current,l=H0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&gP(t,a,r,l),Rc=!1,m=t.memoizedState,a.state=m,P5(t,r,a,i);var y=t.memoizedState;s!==g||m!==y||Ao.current||Rc?(typeof v=="function"&&(I6(t,n,v,r),y=t.memoizedState),(u=Rc||pP(t,n,u,r,m,y,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return D6(e,t,n,r,o,i)}function D6(e,t,n,r,i,o){BO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&uP(t,n,!1),Cu(e,t,o);r=t.stateNode,VX.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=V0(t,e.child,null,o),t.child=V0(t,null,s,o)):eo(e,t,s,o),t.memoizedState=r.state,i&&uP(t,n,!0),t.child}function FO(e){var t=e.stateNode;t.pendingContext?lP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lP(e,t.context,!1),P9(e,t.containerInfo)}function kP(e,t,n,r,i){return W0(),x9(i),t.flags|=256,eo(e,t,n,r),t.child}var z6={dehydrated:null,treeContext:null,retryLane:0};function B6(e){return{baseLanes:e,cachePool:null,transitions:null}}function $O(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qn(cr,i&1),e===null)return A6(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=F4(a,r,0,null),e=jf(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=B6(n),t.memoizedState=z6,e):N9(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return UX(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Jc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Jc(s,o):(o=jf(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?B6(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=z6,r}return o=e.child,e=o.sibling,r=Jc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function N9(e,t){return t=F4({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wy(e,t,n,r){return r!==null&&x9(r),V0(t,e.child,null,n),e=N9(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UX(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Cx(Error(Ne(422))),wy(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=F4({mode:"visible",children:r.children},i,0,null),o=jf(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&V0(t,e.child,null,a),t.child.memoizedState=B6(a),t.memoizedState=z6,o);if((t.mode&1)===0)return wy(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ne(419)),r=Cx(o,r,void 0),wy(e,t,a,r)}if(s=(a&e.childLanes)!==0,Lo||s){if(r=hi,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,wu(e,i),Cs(r,e,i,-1))}return H9(),r=Cx(Error(Ne(421))),wy(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=rZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,aa=Kc(i.nextSibling),la=t,ir=!0,ys=null,e!==null&&(Ia[Ra++]=gu,Ia[Ra++]=mu,Ia[Ra++]=nh,gu=e.id,mu=e.overflow,nh=t),t=N9(t,r.children),t.flags|=4096,t)}function EP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),M6(e.return,t,n)}function _x(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function HO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(eo(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EP(e,n,t);else if(e.tag===19)EP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&T5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_x(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&T5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_x(t,!0,n,null,o);break;case"together":_x(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function M3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ih|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=Jc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Jc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function GX(e,t,n){switch(t.tag){case 3:FO(t),W0();break;case 5:pO(t);break;case 1:Mo(t.type)&&w5(t);break;case 4:P9(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qn(k5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?$O(e,t,n):(qn(cr,cr.current&1),e=Cu(e,t,n),e!==null?e.sibling:null);qn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return HO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,zO(e,t,n)}return Cu(e,t,n)}var WO,F6,VO,UO;WO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};F6=function(){};VO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Df(_l.current);var o=null;switch(n){case"input":i=s6(e,i),r=s6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=c6(e,i),r=c6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=b5)}f6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(tv.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(tv.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Xn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};UO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wg(e,t){if(!ir)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jX(e,t,n){var r=t.pendingProps;switch(b9(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bi(t),null;case 1:return Mo(t.type)&&x5(),Bi(t),null;case 3:return r=t.stateNode,U0(),Qn(Ao),Qn(Vi),L9(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(by(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ys!==null&&(Y6(ys),ys=null))),F6(e,t),Bi(t),null;case 5:T9(t);var i=Df(hv.current);if(n=t.type,e!==null&&t.stateNode!=null)VO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return Bi(t),null}if(e=Df(_l.current),by(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[vl]=t,r[dv]=o,e=(t.mode&1)!==0,n){case"dialog":Xn("cancel",r),Xn("close",r);break;case"iframe":case"object":case"embed":Xn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[dv]=r,WO(e,t,!1,!1),t.stateNode=e;e:{switch(a=h6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Wg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Wg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return $9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(b9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),L9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return T9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return _9(t.type._context),null;case 22:case 23:return $9(),null;case 24:return null;default:return null}}var Cy=!1,Hi=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function $6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PP=!1;function KX(e,t){if(C6=v5,e=qR(),y9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,E=y.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return y=PP,PP=!1,y}function Mm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&$6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function H6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GO(e){var t=e.alternate;t!==null&&(e.alternate=null,GO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[dv],delete t[P6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jO(e){return e.tag===5||e.tag===3||e.tag===4}function TP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}function V6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(V6(e,t,n),e=e.sibling;e!==null;)V6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)YO(e,t,n),n=n.sibling}function YO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?vx(e.parentNode,n):e.nodeType===1&&vx(e,n),av(e)):vx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&$6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function LP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-B9?Gf(e,0):z9|=n),Io(e,t)}function tN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(Yv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),tN(e,n)}var nN;nN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&oO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=M9(null,t,r,e,i,n);var o=I9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,E9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,R6(t,r,e,n),t=D6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&S9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=N6(null,t,r,e,n);break e;case 1:t=_P(null,t,r,e,n);break e;case 11:t=wP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),N6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),_P(e,t,r,i,n);case 3:e:{if(FO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=kP(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=hO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return pO(t),e===null&&A6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,k6(r,i)?a=null:o!==null&&k6(r,o)&&(t.flags|=32),BO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&A6(t),null;case 13:return $O(e,t,n);case 4:return P9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),wP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),M6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),M6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),CP(e,t,r,i,n);case 15:return DO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),dO(t,r,i),R6(t,r,i,n),D6(null,t,r,!0,e,n);case 19:return HO(e,t,n);case 22:return zO(e,t,n)}throw Error(Ne(156,t.tag))};function rN(e,t){return LR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function W9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return W9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===s9)return 11;if(e===l9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")W9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case a9:a=8,i|=8;break;case r6:return e=Da(12,n,t,i|2),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(13,n,t,i),e.elementType=i6,e.lanes=o,e;case o6:return e=Da(19,n,t,i),e.elementType=o6,e.lanes=o,e;case fR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cR:a=10;break e;case dR:a=9;break e;case s9:a=11;break e;case l9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=fR,e.lanes=n,e.stateNode={isHidden:!1},e}function kx(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function Ex(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function V9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},E9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Q7(Bl.exports);var zP=Bl.exports;t6.createRoot=zP.createRoot,t6.hydrateRoot=zP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var hZ=C.exports,pZ=Symbol.for("react.element"),gZ=Symbol.for("react.fragment"),mZ=Object.prototype.hasOwnProperty,vZ=hZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yZ={key:!0,ref:!0,__self:!0,__source:!0};function sN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)mZ.call(t,r)&&!yZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:pZ,type:e,key:o,ref:a,props:i,_owner:vZ.current}}G4.Fragment=gZ;G4.jsx=sN;G4.jsxs=sN;(function(e){e.exports=G4})(U4);const Ln=U4.exports.Fragment,x=U4.exports.jsx,ee=U4.exports.jsxs;var j9=C.exports.createContext({});j9.displayName="ColorModeContext";function Xv(){const e=C.exports.useContext(j9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Py={light:"chakra-ui-light",dark:"chakra-ui-dark"};function SZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),BP=()=>{};function FP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function lN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>FP(a,s)),[h,g]=C.exports.useState(()=>FP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?BP:k,setColorMode:t?BP:P,forced:t!==void 0}),[E,k,P,t]);return x(j9.Provider,{value:T,children:n})}lN.displayName="ColorModeProvider";var Y6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ut=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,Ye=Array(U);++he-1}function M1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=A1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=M1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||U1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==S||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ut?et(ut):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?H1(U,!0):zs(U)}var cn=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function U1(){return!1}e.exports=cn})(Y6,Y6.exports);const xl=Y6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),$P=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,q6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=$P(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=$P(s),i?`${s} !important`:s};function vv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=q6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=vv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?vv({scale:n,compose:r}):r}}var uN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...uN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...uN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},cN="& > :not(style) ~ :not(style)",RZ={[cN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[cN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},K6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(K6)),dN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||dN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in K6?K6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,S]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=fN(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var fN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||fN(e)||dN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:vv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},X6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(X6,{shadow:X6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:vv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:vv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var hN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ex=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Ex(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Ex(t,e,n)}},Rm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Rm,{insetStart:Rm.insetInlineStart,insetEnd:Rm.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function pN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(pN).join(` ${e} `).replace(/calc/g,""),HP=(...e)=>`calc(${j4("+",...e)})`,WP=(...e)=>`calc(${j4("-",...e)})`,Z6=(...e)=>`calc(${j4("*",...e)})`,VP=(...e)=>`calc(${j4("/",...e)})`,UP=e=>{const t=pN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Z6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(HP(e,...t)),subtract:(...t)=>Af(WP(e,...t)),multiply:(...t)=>Af(Z6(e,...t)),divide:(...t)=>Af(VP(e,...t)),negate:()=>Af(UP(e)),toString:()=>e.toString()}),{add:HP,subtract:WP,multiply:Z6,divide:VP,negate:UP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Q6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var gN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Y9=e=>Object.fromEntries(Object.entries(e).sort(gN));function GP(e){const t=Y9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(Y9(e));return new Set(t)}function jP(e){if(!e)return e;e=Q6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function cm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Q6(e)})`),t&&n.push("and",`(max-width: ${Q6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=GP(e),n=Object.entries(e).sort(gN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?jP(u):void 0,{_minW:jP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:cm(null,u),minWQuery:cm(a),minMaxQuery:cm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:Y9(e),asArray:GP(e),details:n,media:[null,...t.map(o=>cm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>mN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>mN(t=>e(t,"~ &"),"[data-peer]",".peer"),mN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function YP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=YP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=YP(S,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(J6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(J6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function J6(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(J6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var q9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,hN,XZ,Rm,X6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,hN,Rm),kQ=Object.keys(_Q),EQ=[...Object.keys(q9),...pQ],PQ={...q9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let S=t[g];if(S===!0&&(S={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=zf(S?.property,r);if(!a&&S?.static){const P=zf(S.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var vN=e=>t=>OQ({theme:t,pseudos:Y4,configs:q9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||Sv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Zv(e,D3()+(t<6&&kl()==32&&ua()==32))}function tC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&tC(Hr);break;case 40:e===41&&tC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Zv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!Sv(kl());)ua();return Zv(e,No)}function tJ(e){return CN(B3("",null,null,null,[""],e=wN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(S=k,k=ua()){case 40:if(S!=108&&Ti(N,g-1)==58){eC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(S);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?KP(N+";",r,n,g-1):KP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=qP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(qP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:S===45&&hl(N)==2&&(w=0)}}return o}function qP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Z9(m),S=0,w=0,E=0;S0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?K9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,yN,q4(KQ()),yv(e,2,-2),0)}function KP(e,t,n,r){return X4(e,t,n,X9,yv(e,0,r),yv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Z9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~eC(e,"stretch")?kN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~eC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Fi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case X9:t.return=kN(t.value,t.length);break;case SN:return y0([Vg(t,{value:wn(t.value,"@","@"+mn)})],i);case K9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Vg(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Vg(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Vg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},fJ=[dJ],EN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),BP=()=>{};function FP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function lN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>FP(a,s)),[h,g]=C.exports.useState(()=>FP(a)),{getSystemTheme:m,setClassName:v,setDataset:y,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),y(R),a.set(R)},[a,m,v,y]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?BP:k,setColorMode:t?BP:P,forced:t!==void 0}),[E,k,P,t]);return x(Y9.Provider,{value:T,children:n})}lN.displayName="ColorModeProvider";var q6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",y="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ct=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,Ye=Array(U);++he-1}function I1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=M1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=I1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||G1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==y||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ct?et(ct):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?W1(U,!0):zs(U)}var cn=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function G1(){return!1}e.exports=cn})(q6,q6.exports);const xl=q6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),$P=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,K6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=$P(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=$P(s),i?`${s} !important`:s};function yv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=K6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=yv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?yv({scale:n,compose:r}):r}}var uN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...uN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...uN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},cN="& > :not(style) ~ :not(style)",RZ={[cN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[cN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},X6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(X6)),dN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||dN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in X6?X6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,y]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=fN(y)?y:y&&y.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var fN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||fN(e)||dN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:yv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},Z6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(Z6,{shadow:Z6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:yv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:yv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var hN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Px=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Px(t,e,n)}},Om={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Om,{insetStart:Om.insetInlineStart,insetEnd:Om.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function pN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(pN).join(` ${e} `).replace(/calc/g,""),HP=(...e)=>`calc(${j4("+",...e)})`,WP=(...e)=>`calc(${j4("-",...e)})`,Q6=(...e)=>`calc(${j4("*",...e)})`,VP=(...e)=>`calc(${j4("/",...e)})`,UP=e=>{const t=pN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Q6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(HP(e,...t)),subtract:(...t)=>Af(WP(e,...t)),multiply:(...t)=>Af(Q6(e,...t)),divide:(...t)=>Af(VP(e,...t)),negate:()=>Af(UP(e)),toString:()=>e.toString()}),{add:HP,subtract:WP,multiply:Q6,divide:VP,negate:UP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function J6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var gN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,q9=e=>Object.fromEntries(Object.entries(e).sort(gN));function GP(e){const t=q9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(q9(e));return new Set(t)}function jP(e){if(!e)return e;e=J6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function dm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${J6(e)})`),t&&n.push("and",`(max-width: ${J6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=GP(e),n=Object.entries(e).sort(gN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?jP(u):void 0,{_minW:jP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:dm(null,u),minWQuery:dm(a),minMaxQuery:dm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:q9(e),asArray:GP(e),details:n,media:[null,...t.map(o=>dm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>mN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>mN(t=>e(t,"~ &"),"[data-peer]",".peer"),mN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function YP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=YP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...y]=m,w=`${v}.-${y.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const y=[String(i).split(".")[0],m].join(".");if(!e[y])return m;const{reference:E}=YP(y,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,y])=>{var w;const E=h(y);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(eC(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(eC(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function eC(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(eC(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var K9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,hN,XZ,Om,Z6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,hN,Om),kQ=Object.keys(_Q),EQ=[...Object.keys(K9),...pQ],PQ={...K9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let y=t[g];if(y===!0&&(y={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=y?.transform)==null?void 0:s.call(y,v,r,l))??v;w=y?.processResult?i(w,!0):w;const E=zf(y?.property,r);if(!a&&y?.static){const P=zf(y.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var vN=e=>t=>OQ({theme:t,pseudos:Y4,configs:K9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||bv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Qv(e,D3()+(t<6&&kl()==32&&ua()==32))}function nC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&nC(Hr);break;case 40:e===41&&nC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Qv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!bv(kl());)ua();return Qv(e,No)}function tJ(e){return CN(B3("",null,null,null,[""],e=wN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,y=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(y=k,k=ua()){case 40:if(y!=108&&Ti(N,g-1)==58){tC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(y);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?KP(N+";",r,n,g-1):KP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=qP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(qP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=y;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:y===45&&hl(N)==2&&(w=0)}}return o}function qP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Q9(m),y=0,w=0,E=0;y0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?X9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,yN,q4(KQ()),Sv(e,2,-2),0)}function KP(e,t,n,r){return X4(e,t,n,Z9,Sv(e,0,r),Sv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Q9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tC(e,"stretch")?kN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~tC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Fi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Z9:t.return=kN(t.value,t.length);break;case SN:return y0([Ug(t,{value:wn(t.value,"@","@"+mn)})],i);case X9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Ug(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Ug(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Ug(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Ug(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},fJ=[dJ],EN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,RN=function(t){return t.charCodeAt(1)===45},QP=function(t){return t!=null&&typeof t!="boolean"},Px=_N(function(e){return RN(e)?e:e.replace(_J,"-$&").toLowerCase()}),JP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!RN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,bv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},$N=UJ(VJ);function HN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var WN=e=>HN(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function VN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=_N(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},rT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},iT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return MN(n,r,i),TJ(function(){return IN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=iT(t,n,r),l=s||rT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Mi(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function UN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function oT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Tx(s,a,e+1/3),i=Tx(s,a,e),o=Tx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function aT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var oC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=UN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Lx),rgba:new RegExp("rgba"+Ax),hsl:new RegExp("hsl"+Lx),hsla:new RegExp("hsla"+Ax),hsv:new RegExp("hsv"+Lx),hsva:new RegExp("hsva"+Ax),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(oC[e])e=oC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:lT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:lT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Qv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=UN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=aT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=aT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),sT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+sT(this.r,this.g,this.b,!1),n=0,r=Object.entries(oC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(GN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Qv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=jN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=jN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=qN.find(function(a){return a.name===e});if(n){var r=YN(n);if(r.hueRange)return r.hueRange}var i=new Qv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function jN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=qN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function YN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var qN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Qv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Qv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Qv(r).setAlpha(t).toRgbString()};function uT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var gi=typeof Symbol=="function"&&Symbol.for,J9=gi?Symbol.for("react.element"):60103,e8=gi?Symbol.for("react.portal"):60106,Z4=gi?Symbol.for("react.fragment"):60107,Q4=gi?Symbol.for("react.strict_mode"):60108,J4=gi?Symbol.for("react.profiler"):60114,eS=gi?Symbol.for("react.provider"):60109,tS=gi?Symbol.for("react.context"):60110,t8=gi?Symbol.for("react.async_mode"):60111,nS=gi?Symbol.for("react.concurrent_mode"):60111,rS=gi?Symbol.for("react.forward_ref"):60112,iS=gi?Symbol.for("react.suspense"):60113,hJ=gi?Symbol.for("react.suspense_list"):60120,oS=gi?Symbol.for("react.memo"):60115,aS=gi?Symbol.for("react.lazy"):60116,pJ=gi?Symbol.for("react.block"):60121,gJ=gi?Symbol.for("react.fundamental"):60117,mJ=gi?Symbol.for("react.responder"):60118,vJ=gi?Symbol.for("react.scope"):60119;function va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case J9:switch(e=e.type,e){case t8:case nS:case Z4:case J4:case Q4:case iS:return e;default:switch(e=e&&e.$$typeof,e){case tS:case rS:case aS:case oS:case eS:return e;default:return t}}case e8:return t}}}function TN(e){return va(e)===nS}Mn.AsyncMode=t8;Mn.ConcurrentMode=nS;Mn.ContextConsumer=tS;Mn.ContextProvider=eS;Mn.Element=J9;Mn.ForwardRef=rS;Mn.Fragment=Z4;Mn.Lazy=aS;Mn.Memo=oS;Mn.Portal=e8;Mn.Profiler=J4;Mn.StrictMode=Q4;Mn.Suspense=iS;Mn.isAsyncMode=function(e){return TN(e)||va(e)===t8};Mn.isConcurrentMode=TN;Mn.isContextConsumer=function(e){return va(e)===tS};Mn.isContextProvider=function(e){return va(e)===eS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===J9};Mn.isForwardRef=function(e){return va(e)===rS};Mn.isFragment=function(e){return va(e)===Z4};Mn.isLazy=function(e){return va(e)===aS};Mn.isMemo=function(e){return va(e)===oS};Mn.isPortal=function(e){return va(e)===e8};Mn.isProfiler=function(e){return va(e)===J4};Mn.isStrictMode=function(e){return va(e)===Q4};Mn.isSuspense=function(e){return va(e)===iS};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Z4||e===nS||e===J4||e===Q4||e===iS||e===hJ||typeof e=="object"&&e!==null&&(e.$$typeof===aS||e.$$typeof===oS||e.$$typeof===eS||e.$$typeof===tS||e.$$typeof===rS||e.$$typeof===gJ||e.$$typeof===mJ||e.$$typeof===vJ||e.$$typeof===pJ)};Mn.typeOf=va;(function(e){e.exports=Mn})(PN);var LN=PN.exports,yJ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},SJ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},AN={};AN[LN.ForwardRef]=yJ;AN[LN.Memo]=SJ;var bJ=!0;function xJ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var MN=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||bJ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},IN=function(t,n,r){MN(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function wJ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,RN=function(t){return t.charCodeAt(1)===45},QP=function(t){return t!=null&&typeof t!="boolean"},Tx=_N(function(e){return RN(e)?e:e.replace(_J,"-$&").toLowerCase()}),JP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!RN(t)&&typeof n=="number"&&n!==0?n+"px":n};function xv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,xv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},$N=UJ(VJ);function HN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var WN=e=>HN(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function VN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=_N(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},rT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},iT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return MN(n,r,i),TJ(function(){return IN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=iT(t,n,r),l=s||rT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Mi(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function UN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function oT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Lx(s,a,e+1/3),i=Lx(s,a,e),o=Lx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function aT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var aC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=UN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Mx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Ax),rgba:new RegExp("rgba"+Mx),hsl:new RegExp("hsl"+Ax),hsla:new RegExp("hsla"+Mx),hsv:new RegExp("hsv"+Ax),hsva:new RegExp("hsva"+Mx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(aC[e])e=aC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:lT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:lT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Jv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=UN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=aT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=aT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),sT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+sT(this.r,this.g,this.b,!1),n=0,r=Object.entries(aC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(GN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Jv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=jN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=jN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=qN.find(function(a){return a.name===e});if(n){var r=YN(n);if(r.hueRange)return r.hueRange}var i=new Jv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function jN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=qN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function YN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var qN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Jv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Jv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Jv(r).setAlpha(t).toRgbString()};function uT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -53,12 +53,12 @@ Error generating stack: `+o.message+` ${t} 75%, transparent 75%, transparent - )`,backgroundSize:`${e} ${e}`}}function qee(e){const t=GN().toHexString();return!e||Gee(e)?t:e.string&&e.colors?Xee(e.string,e.colors):e.string&&!e.colors?Kee(e.string):e.colors&&!e.string?Zee(e.colors):t}function Kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Xee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function r8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Qee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function KN(e){return Qee(e)&&e.reference?e.reference:String(e)}var uS=(e,...t)=>t.map(KN).join(` ${e} `).replace(/calc/g,""),cT=(...e)=>`calc(${uS("+",...e)})`,dT=(...e)=>`calc(${uS("-",...e)})`,aC=(...e)=>`calc(${uS("*",...e)})`,fT=(...e)=>`calc(${uS("/",...e)})`,hT=e=>{const t=KN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:aC(t,-1)},pu=Object.assign(e=>({add:(...t)=>pu(cT(e,...t)),subtract:(...t)=>pu(dT(e,...t)),multiply:(...t)=>pu(aC(e,...t)),divide:(...t)=>pu(fT(e,...t)),negate:()=>pu(hT(e)),toString:()=>e.toString()}),{add:cT,subtract:dT,multiply:aC,divide:fT,negate:hT});function Jee(e){return!Number.isInteger(parseFloat(e.toString()))}function ete(e,t="-"){return e.replace(/\s+/g,t)}function XN(e){const t=ete(e.toString());return t.includes("\\.")?e:Jee(e)?t.replace(".","\\."):e}function tte(e,t=""){return[t,XN(e)].filter(Boolean).join("-")}function nte(e,t){return`var(${XN(e)}${t?`, ${t}`:""})`}function rte(e,t=""){return`--${tte(e,t)}`}function ni(e,t){const n=rte(e,t?.prefix);return{variable:n,reference:nte(n,ite(t?.fallback))}}function ite(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ote,defineMultiStyleConfig:ate}=Jn(nee.keys),ste={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ute={pt:"2",px:"4",pb:"5"},cte={fontSize:"1.25em"},dte=ote({container:ste,button:lte,panel:ute,icon:cte}),fte=ate({baseStyle:dte}),{definePartsStyle:Jv,defineMultiStyleConfig:hte}=Jn(ree.keys),ca=zn("alert-fg"),_u=zn("alert-bg"),pte=Jv({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function i8(e){const{theme:t,colorScheme:n}=e,r=q0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var gte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),mte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ca.reference}}}),vte=Jv(e=>{const{colorScheme:t}=e,n=i8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ca.reference}}}),yte=Jv(e=>{const{colorScheme:t}=e;return{container:{[ca.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ca.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ca.reference}}}),Ste={subtle:gte,"left-accent":mte,"top-accent":vte,solid:yte},bte=hte({baseStyle:pte,variants:Ste,defaultProps:{variant:"subtle",colorScheme:"blue"}}),ZN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},wte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Cte={...ZN,...xte,container:wte},QN=Cte,_te=e=>typeof e=="function";function io(e,...t){return _te(e)?e(...t):e}var{definePartsStyle:JN,defineMultiStyleConfig:kte}=Jn(iee.keys),S0=zn("avatar-border-color"),Mx=zn("avatar-bg"),Ete={borderRadius:"full",border:"0.2em solid",[S0.variable]:"white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference},Pte={[Mx.variable]:"colors.gray.200",_dark:{[Mx.variable]:"colors.whiteAlpha.400"},bgColor:Mx.reference},pT=zn("avatar-background"),Tte=e=>{const{name:t,theme:n}=e,r=t?qee({string:t}):"colors.gray.400",i=Yee(r)(n);let o="white";return i||(o="gray.800"),{bg:pT.reference,"&:not([data-loaded])":{[pT.variable]:r},color:o,[S0.variable]:"colors.white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference,verticalAlign:"top"}},Lte=JN(e=>({badge:io(Ete,e),excessLabel:io(Pte,e),container:io(Tte,e)}));function Pc(e){const t=e!=="100%"?QN[e]:void 0;return JN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Ate={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Mte=kte({baseStyle:Lte,sizes:Ate,defaultProps:{size:"md"}}),Ite={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},b0=zn("badge-bg"),wl=zn("badge-color"),Rte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.500`,.6)(n);return{[b0.variable]:`colors.${t}.500`,[wl.variable]:"colors.white",_dark:{[b0.variable]:r,[wl.variable]:"colors.whiteAlpha.800"},bg:b0.reference,color:wl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.16)(n);return{[b0.variable]:`colors.${t}.100`,[wl.variable]:`colors.${t}.800`,_dark:{[b0.variable]:r,[wl.variable]:`colors.${t}.200`},bg:b0.reference,color:wl.reference}},Nte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.8)(n);return{[wl.variable]:`colors.${t}.500`,_dark:{[wl.variable]:r},color:wl.reference,boxShadow:`inset 0 0 0px 1px ${wl.reference}`}},Dte={solid:Rte,subtle:Ote,outline:Nte},Nm={baseStyle:Ite,variants:Dte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:zte,definePartsStyle:Bte}=Jn(oee.keys),Fte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$te=Bte({link:Fte}),Hte=zte({baseStyle:$te}),Wte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},eD=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:yt("inherit","whiteAlpha.900")(e),_hover:{bg:yt("gray.100","whiteAlpha.200")(e)},_active:{bg:yt("gray.200","whiteAlpha.300")(e)}};const r=q0(`${t}.200`,.12)(n),i=q0(`${t}.200`,.24)(n);return{color:yt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:yt(`${t}.50`,r)(e)},_active:{bg:yt(`${t}.100`,i)(e)}}},Vte=e=>{const{colorScheme:t}=e,n=yt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(eD,e)}},Ute={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=yt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:yt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:yt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Ute[t]??{},a=yt(n,`${t}.200`)(e);return{bg:a,color:yt(r,"gray.800")(e),_hover:{bg:yt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:yt(o,`${t}.400`)(e)}}},jte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:yt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:yt(`${t}.700`,`${t}.500`)(e)}}},Yte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},qte={ghost:eD,outline:Vte,solid:Gte,link:jte,unstyled:Yte},Kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xte={baseStyle:Wte,variants:qte,sizes:Kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:Zte}=Jn(Eee.keys),F5=zn("card-bg"),x0=zn("card-padding"),Qte=Yf({container:{[F5.variable]:"chakra-body-bg",backgroundColor:F5.reference,color:"chakra-body-text"},body:{padding:x0.reference,flex:"1 1 0%"},header:{padding:x0.reference},footer:{padding:x0.reference}}),Jte={sm:Yf({container:{borderRadius:"base",[x0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[x0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[x0.variable]:"space.7"}})},ene={elevated:Yf({container:{boxShadow:"base",_dark:{[F5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[F5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},tne=Zte({baseStyle:Qte,variants:ene,sizes:Jte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:F3,defineMultiStyleConfig:nne}=Jn(aee.keys),Dm=zn("checkbox-size"),rne=e=>{const{colorScheme:t}=e;return{w:Dm.reference,h:Dm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e),_hover:{bg:yt(`${t}.600`,`${t}.300`)(e),borderColor:yt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:yt("gray.200","transparent")(e),bg:yt("gray.200","whiteAlpha.300")(e),color:yt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e)},_disabled:{bg:yt("gray.100","whiteAlpha.100")(e),borderColor:yt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:yt("red.500","red.300")(e)}}},ine={_disabled:{cursor:"not-allowed"}},one={userSelect:"none",_disabled:{opacity:.4}},ane={transitionProperty:"transform",transitionDuration:"normal"},sne=F3(e=>({icon:ane,container:ine,control:io(rne,e),label:one})),lne={sm:F3({control:{[Dm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:F3({control:{[Dm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:F3({control:{[Dm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},$5=nne({baseStyle:sne,sizes:lne,defaultProps:{size:"md",colorScheme:"blue"}}),zm=ni("close-button-size"),Ug=ni("close-button-bg"),une={w:[zm.reference],h:[zm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ug.variable]:"colors.blackAlpha.100",_dark:{[Ug.variable]:"colors.whiteAlpha.100"}},_active:{[Ug.variable]:"colors.blackAlpha.200",_dark:{[Ug.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ug.reference},cne={lg:{[zm.variable]:"sizes.10",fontSize:"md"},md:{[zm.variable]:"sizes.8",fontSize:"xs"},sm:{[zm.variable]:"sizes.6",fontSize:"2xs"}},dne={baseStyle:une,sizes:cne,defaultProps:{size:"md"}},{variants:fne,defaultProps:hne}=Nm,pne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},gne={baseStyle:pne,variants:fne,defaultProps:hne},mne={w:"100%",mx:"auto",maxW:"prose",px:"4"},vne={baseStyle:mne},yne={opacity:.6,borderColor:"inherit"},Sne={borderStyle:"solid"},bne={borderStyle:"dashed"},xne={solid:Sne,dashed:bne},wne={baseStyle:yne,variants:xne,defaultProps:{variant:"solid"}},{definePartsStyle:sC,defineMultiStyleConfig:Cne}=Jn(see.keys),Ix=zn("drawer-bg"),Rx=zn("drawer-box-shadow");function Ep(e){return sC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var _ne={bg:"blackAlpha.600",zIndex:"overlay"},kne={display:"flex",zIndex:"modal",justifyContent:"center"},Ene=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ix.variable]:"colors.white",[Rx.variable]:"shadows.lg",_dark:{[Ix.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},bg:Ix.reference,boxShadow:Rx.reference}},Pne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tne={position:"absolute",top:"2",insetEnd:"3"},Lne={px:"6",py:"2",flex:"1",overflow:"auto"},Ane={px:"6",py:"4"},Mne=sC(e=>({overlay:_ne,dialogContainer:kne,dialog:io(Ene,e),header:Pne,closeButton:Tne,body:Lne,footer:Ane})),Ine={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Rne=Cne({baseStyle:Mne,sizes:Ine,defaultProps:{size:"xs"}}),{definePartsStyle:One,defineMultiStyleConfig:Nne}=Jn(lee.keys),Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},zne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Bne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fne=One({preview:Dne,input:zne,textarea:Bne}),$ne=Nne({baseStyle:Fne}),{definePartsStyle:Hne,defineMultiStyleConfig:Wne}=Jn(uee.keys),w0=zn("form-control-color"),Vne={marginStart:"1",[w0.variable]:"colors.red.500",_dark:{[w0.variable]:"colors.red.300"},color:w0.reference},Une={mt:"2",[w0.variable]:"colors.gray.600",_dark:{[w0.variable]:"colors.whiteAlpha.600"},color:w0.reference,lineHeight:"normal",fontSize:"sm"},Gne=Hne({container:{width:"100%",position:"relative"},requiredIndicator:Vne,helperText:Une}),jne=Wne({baseStyle:Gne}),{definePartsStyle:Yne,defineMultiStyleConfig:qne}=Jn(cee.keys),C0=zn("form-error-color"),Kne={[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Xne={marginEnd:"0.5em",[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference},Zne=Yne({text:Kne,icon:Xne}),Qne=qne({baseStyle:Zne}),Jne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},ere={baseStyle:Jne},tre={fontFamily:"heading",fontWeight:"bold"},nre={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},rre={baseStyle:tre,sizes:nre,defaultProps:{size:"xl"}},{definePartsStyle:vu,defineMultiStyleConfig:ire}=Jn(dee.keys),ore=vu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},are={lg:vu({field:Tc.lg,addon:Tc.lg}),md:vu({field:Tc.md,addon:Tc.md}),sm:vu({field:Tc.sm,addon:Tc.sm}),xs:vu({field:Tc.xs,addon:Tc.xs})};function o8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||yt("blue.500","blue.300")(e),errorBorderColor:n||yt("red.500","red.300")(e)}}var sre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:yt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:yt("inherit","whiteAlpha.50")(e),bg:yt("gray.100","whiteAlpha.300")(e)}}}),lre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e),_hover:{bg:yt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e)}}}),ure=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=o8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cre=vu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dre={outline:sre,filled:lre,flushed:ure,unstyled:cre},vn=ire({baseStyle:ore,sizes:are,variants:dre,defaultProps:{size:"md",variant:"outline"}}),Ox=zn("kbd-bg"),fre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hre={baseStyle:fre},pre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gre={baseStyle:pre},{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(fee.keys),yre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Sre=vre({icon:yre}),bre=mre({baseStyle:Sre}),{defineMultiStyleConfig:xre,definePartsStyle:wre}=Jn(hee.keys),fl=zn("menu-bg"),Nx=zn("menu-shadow"),Cre={[fl.variable]:"#fff",[Nx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Nx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Nx.reference},_re={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},kre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ere={opacity:.6},Pre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tre={transitionProperty:"common",transitionDuration:"normal"},Lre=wre({button:Tre,list:Cre,item:_re,groupTitle:kre,command:Ere,divider:Pre}),Are=xre({baseStyle:Lre}),{defineMultiStyleConfig:Mre,definePartsStyle:lC}=Jn(pee.keys),Ire={bg:"blackAlpha.600",zIndex:"modal"},Rre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:yt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:yt("lg","dark-lg")(e)}},Nre={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Dre={position:"absolute",top:"2",insetEnd:"3"},zre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bre={px:"6",py:"4"},Fre=lC(e=>({overlay:Ire,dialogContainer:io(Rre,e),dialog:io(Ore,e),header:Nre,closeButton:Dre,body:io(zre,e),footer:Bre}));function fs(e){return lC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var $re={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Hre=Mre({baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}}),Wre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},tD=Wre,{defineMultiStyleConfig:Vre,definePartsStyle:nD}=Jn(gee.keys),a8=ni("number-input-stepper-width"),rD=ni("number-input-input-padding"),Ure=pu(a8).add("0.5rem").toString(),Dx=ni("number-input-bg"),zx=ni("number-input-color"),Bx=ni("number-input-border-color"),Gre={[a8.variable]:"sizes.6",[rD.variable]:Ure},jre=e=>{var t;return((t=io(vn.baseStyle,e))==null?void 0:t.field)??{}},Yre={width:a8.reference},qre={borderStart:"1px solid",borderStartColor:Bx.reference,color:zx.reference,bg:Dx.reference,[zx.variable]:"colors.chakra-body-text",[Bx.variable]:"colors.chakra-border-color",_dark:{[zx.variable]:"colors.whiteAlpha.800",[Bx.variable]:"colors.whiteAlpha.300"},_active:{[Dx.variable]:"colors.gray.200",_dark:{[Dx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Kre=nD(e=>({root:Gre,field:io(jre,e)??{},stepperGroup:Yre,stepper:qre}));function Iy(e){var t,n;const r=(t=vn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=tD.fontSizes[o];return nD({field:{...r.field,paddingInlineEnd:rD.reference,verticalAlign:"top"},stepper:{fontSize:pu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Xre={xs:Iy("xs"),sm:Iy("sm"),md:Iy("md"),lg:Iy("lg")},Zre=Vre({baseStyle:Kre,sizes:Xre,variants:vn.variants,defaultProps:vn.defaultProps}),gT,Qre={...(gT=vn.baseStyle)==null?void 0:gT.field,textAlign:"center"},Jre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},mT,eie={outline:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((mT=vn.variants)==null?void 0:mT.unstyled.field)??{}},tie={baseStyle:Qre,sizes:Jre,variants:eie,defaultProps:vn.defaultProps},{defineMultiStyleConfig:nie,definePartsStyle:rie}=Jn(mee.keys),Ry=ni("popper-bg"),iie=ni("popper-arrow-bg"),vT=ni("popper-arrow-shadow-color"),oie={zIndex:10},aie={[Ry.variable]:"colors.white",bg:Ry.reference,[iie.variable]:Ry.reference,[vT.variable]:"colors.gray.200",_dark:{[Ry.variable]:"colors.gray.700",[vT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sie={px:3,py:2,borderBottomWidth:"1px"},lie={px:3,py:2},uie={px:3,py:2,borderTopWidth:"1px"},cie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},die=rie({popper:oie,content:aie,header:sie,body:lie,footer:uie,closeButton:cie}),fie=nie({baseStyle:die}),{defineMultiStyleConfig:hie,definePartsStyle:dm}=Jn(vee.keys),pie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=yt(uT(),uT("1rem","rgba(0,0,0,0.1)"))(e),a=yt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + )`,backgroundSize:`${e} ${e}`}}function qee(e){const t=GN().toHexString();return!e||Gee(e)?t:e.string&&e.colors?Xee(e.string,e.colors):e.string&&!e.colors?Kee(e.string):e.colors&&!e.string?Zee(e.colors):t}function Kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Xee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function i8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Qee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function KN(e){return Qee(e)&&e.reference?e.reference:String(e)}var uS=(e,...t)=>t.map(KN).join(` ${e} `).replace(/calc/g,""),cT=(...e)=>`calc(${uS("+",...e)})`,dT=(...e)=>`calc(${uS("-",...e)})`,sC=(...e)=>`calc(${uS("*",...e)})`,fT=(...e)=>`calc(${uS("/",...e)})`,hT=e=>{const t=KN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:sC(t,-1)},pu=Object.assign(e=>({add:(...t)=>pu(cT(e,...t)),subtract:(...t)=>pu(dT(e,...t)),multiply:(...t)=>pu(sC(e,...t)),divide:(...t)=>pu(fT(e,...t)),negate:()=>pu(hT(e)),toString:()=>e.toString()}),{add:cT,subtract:dT,multiply:sC,divide:fT,negate:hT});function Jee(e){return!Number.isInteger(parseFloat(e.toString()))}function ete(e,t="-"){return e.replace(/\s+/g,t)}function XN(e){const t=ete(e.toString());return t.includes("\\.")?e:Jee(e)?t.replace(".","\\."):e}function tte(e,t=""){return[t,XN(e)].filter(Boolean).join("-")}function nte(e,t){return`var(${XN(e)}${t?`, ${t}`:""})`}function rte(e,t=""){return`--${tte(e,t)}`}function ni(e,t){const n=rte(e,t?.prefix);return{variable:n,reference:nte(n,ite(t?.fallback))}}function ite(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ote,defineMultiStyleConfig:ate}=Jn(nee.keys),ste={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ute={pt:"2",px:"4",pb:"5"},cte={fontSize:"1.25em"},dte=ote({container:ste,button:lte,panel:ute,icon:cte}),fte=ate({baseStyle:dte}),{definePartsStyle:e2,defineMultiStyleConfig:hte}=Jn(ree.keys),ca=zn("alert-fg"),_u=zn("alert-bg"),pte=e2({container:{bg:_u.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function o8(e){const{theme:t,colorScheme:n}=e,r=q0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var gte=e2(e=>{const{colorScheme:t}=e,n=o8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark}}}}),mte=e2(e=>{const{colorScheme:t}=e,n=o8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ca.reference}}}),vte=e2(e=>{const{colorScheme:t}=e,n=o8(e);return{container:{[ca.variable]:`colors.${t}.500`,[_u.variable]:n.light,_dark:{[ca.variable]:`colors.${t}.200`,[_u.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ca.reference}}}),yte=e2(e=>{const{colorScheme:t}=e;return{container:{[ca.variable]:"colors.white",[_u.variable]:`colors.${t}.500`,_dark:{[ca.variable]:"colors.gray.900",[_u.variable]:`colors.${t}.200`},color:ca.reference}}}),Ste={subtle:gte,"left-accent":mte,"top-accent":vte,solid:yte},bte=hte({baseStyle:pte,variants:Ste,defaultProps:{variant:"subtle",colorScheme:"blue"}}),ZN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xte={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},wte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Cte={...ZN,...xte,container:wte},QN=Cte,_te=e=>typeof e=="function";function io(e,...t){return _te(e)?e(...t):e}var{definePartsStyle:JN,defineMultiStyleConfig:kte}=Jn(iee.keys),S0=zn("avatar-border-color"),Ix=zn("avatar-bg"),Ete={borderRadius:"full",border:"0.2em solid",[S0.variable]:"white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference},Pte={[Ix.variable]:"colors.gray.200",_dark:{[Ix.variable]:"colors.whiteAlpha.400"},bgColor:Ix.reference},pT=zn("avatar-background"),Tte=e=>{const{name:t,theme:n}=e,r=t?qee({string:t}):"colors.gray.400",i=Yee(r)(n);let o="white";return i||(o="gray.800"),{bg:pT.reference,"&:not([data-loaded])":{[pT.variable]:r},color:o,[S0.variable]:"colors.white",_dark:{[S0.variable]:"colors.gray.800"},borderColor:S0.reference,verticalAlign:"top"}},Lte=JN(e=>({badge:io(Ete,e),excessLabel:io(Pte,e),container:io(Tte,e)}));function Pc(e){const t=e!=="100%"?QN[e]:void 0;return JN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Ate={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Mte=kte({baseStyle:Lte,sizes:Ate,defaultProps:{size:"md"}}),Ite={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},b0=zn("badge-bg"),wl=zn("badge-color"),Rte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.500`,.6)(n);return{[b0.variable]:`colors.${t}.500`,[wl.variable]:"colors.white",_dark:{[b0.variable]:r,[wl.variable]:"colors.whiteAlpha.800"},bg:b0.reference,color:wl.reference}},Ote=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.16)(n);return{[b0.variable]:`colors.${t}.100`,[wl.variable]:`colors.${t}.800`,_dark:{[b0.variable]:r,[wl.variable]:`colors.${t}.200`},bg:b0.reference,color:wl.reference}},Nte=e=>{const{colorScheme:t,theme:n}=e,r=q0(`${t}.200`,.8)(n);return{[wl.variable]:`colors.${t}.500`,_dark:{[wl.variable]:r},color:wl.reference,boxShadow:`inset 0 0 0px 1px ${wl.reference}`}},Dte={solid:Rte,subtle:Ote,outline:Nte},Dm={baseStyle:Ite,variants:Dte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:zte,definePartsStyle:Bte}=Jn(oee.keys),Fte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$te=Bte({link:Fte}),Hte=zte({baseStyle:$te}),Wte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},eD=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:yt("inherit","whiteAlpha.900")(e),_hover:{bg:yt("gray.100","whiteAlpha.200")(e)},_active:{bg:yt("gray.200","whiteAlpha.300")(e)}};const r=q0(`${t}.200`,.12)(n),i=q0(`${t}.200`,.24)(n);return{color:yt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:yt(`${t}.50`,r)(e)},_active:{bg:yt(`${t}.100`,i)(e)}}},Vte=e=>{const{colorScheme:t}=e,n=yt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...io(eD,e)}},Ute={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=yt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:yt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:yt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Ute[t]??{},a=yt(n,`${t}.200`)(e);return{bg:a,color:yt(r,"gray.800")(e),_hover:{bg:yt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:yt(o,`${t}.400`)(e)}}},jte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:yt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:yt(`${t}.700`,`${t}.500`)(e)}}},Yte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},qte={ghost:eD,outline:Vte,solid:Gte,link:jte,unstyled:Yte},Kte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xte={baseStyle:Wte,variants:qte,sizes:Kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:Zte}=Jn(Eee.keys),F5=zn("card-bg"),x0=zn("card-padding"),Qte=Yf({container:{[F5.variable]:"chakra-body-bg",backgroundColor:F5.reference,color:"chakra-body-text"},body:{padding:x0.reference,flex:"1 1 0%"},header:{padding:x0.reference},footer:{padding:x0.reference}}),Jte={sm:Yf({container:{borderRadius:"base",[x0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[x0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[x0.variable]:"space.7"}})},ene={elevated:Yf({container:{boxShadow:"base",_dark:{[F5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[F5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},tne=Zte({baseStyle:Qte,variants:ene,sizes:Jte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:F3,defineMultiStyleConfig:nne}=Jn(aee.keys),zm=zn("checkbox-size"),rne=e=>{const{colorScheme:t}=e;return{w:zm.reference,h:zm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e),_hover:{bg:yt(`${t}.600`,`${t}.300`)(e),borderColor:yt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:yt("gray.200","transparent")(e),bg:yt("gray.200","whiteAlpha.300")(e),color:yt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:yt(`${t}.500`,`${t}.200`)(e),borderColor:yt(`${t}.500`,`${t}.200`)(e),color:yt("white","gray.900")(e)},_disabled:{bg:yt("gray.100","whiteAlpha.100")(e),borderColor:yt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:yt("red.500","red.300")(e)}}},ine={_disabled:{cursor:"not-allowed"}},one={userSelect:"none",_disabled:{opacity:.4}},ane={transitionProperty:"transform",transitionDuration:"normal"},sne=F3(e=>({icon:ane,container:ine,control:io(rne,e),label:one})),lne={sm:F3({control:{[zm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:F3({control:{[zm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:F3({control:{[zm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},$5=nne({baseStyle:sne,sizes:lne,defaultProps:{size:"md",colorScheme:"blue"}}),Bm=ni("close-button-size"),Gg=ni("close-button-bg"),une={w:[Bm.reference],h:[Bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Gg.variable]:"colors.blackAlpha.100",_dark:{[Gg.variable]:"colors.whiteAlpha.100"}},_active:{[Gg.variable]:"colors.blackAlpha.200",_dark:{[Gg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Gg.reference},cne={lg:{[Bm.variable]:"sizes.10",fontSize:"md"},md:{[Bm.variable]:"sizes.8",fontSize:"xs"},sm:{[Bm.variable]:"sizes.6",fontSize:"2xs"}},dne={baseStyle:une,sizes:cne,defaultProps:{size:"md"}},{variants:fne,defaultProps:hne}=Dm,pne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},gne={baseStyle:pne,variants:fne,defaultProps:hne},mne={w:"100%",mx:"auto",maxW:"prose",px:"4"},vne={baseStyle:mne},yne={opacity:.6,borderColor:"inherit"},Sne={borderStyle:"solid"},bne={borderStyle:"dashed"},xne={solid:Sne,dashed:bne},wne={baseStyle:yne,variants:xne,defaultProps:{variant:"solid"}},{definePartsStyle:lC,defineMultiStyleConfig:Cne}=Jn(see.keys),Rx=zn("drawer-bg"),Ox=zn("drawer-box-shadow");function Ep(e){return lC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var _ne={bg:"blackAlpha.600",zIndex:"overlay"},kne={display:"flex",zIndex:"modal",justifyContent:"center"},Ene=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Rx.variable]:"colors.white",[Ox.variable]:"shadows.lg",_dark:{[Rx.variable]:"colors.gray.700",[Ox.variable]:"shadows.dark-lg"},bg:Rx.reference,boxShadow:Ox.reference}},Pne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tne={position:"absolute",top:"2",insetEnd:"3"},Lne={px:"6",py:"2",flex:"1",overflow:"auto"},Ane={px:"6",py:"4"},Mne=lC(e=>({overlay:_ne,dialogContainer:kne,dialog:io(Ene,e),header:Pne,closeButton:Tne,body:Lne,footer:Ane})),Ine={xs:Ep("xs"),sm:Ep("md"),md:Ep("lg"),lg:Ep("2xl"),xl:Ep("4xl"),full:Ep("full")},Rne=Cne({baseStyle:Mne,sizes:Ine,defaultProps:{size:"xs"}}),{definePartsStyle:One,defineMultiStyleConfig:Nne}=Jn(lee.keys),Dne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},zne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Bne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fne=One({preview:Dne,input:zne,textarea:Bne}),$ne=Nne({baseStyle:Fne}),{definePartsStyle:Hne,defineMultiStyleConfig:Wne}=Jn(uee.keys),w0=zn("form-control-color"),Vne={marginStart:"1",[w0.variable]:"colors.red.500",_dark:{[w0.variable]:"colors.red.300"},color:w0.reference},Une={mt:"2",[w0.variable]:"colors.gray.600",_dark:{[w0.variable]:"colors.whiteAlpha.600"},color:w0.reference,lineHeight:"normal",fontSize:"sm"},Gne=Hne({container:{width:"100%",position:"relative"},requiredIndicator:Vne,helperText:Une}),jne=Wne({baseStyle:Gne}),{definePartsStyle:Yne,defineMultiStyleConfig:qne}=Jn(cee.keys),C0=zn("form-error-color"),Kne={[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Xne={marginEnd:"0.5em",[C0.variable]:"colors.red.500",_dark:{[C0.variable]:"colors.red.300"},color:C0.reference},Zne=Yne({text:Kne,icon:Xne}),Qne=qne({baseStyle:Zne}),Jne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},ere={baseStyle:Jne},tre={fontFamily:"heading",fontWeight:"bold"},nre={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},rre={baseStyle:tre,sizes:nre,defaultProps:{size:"xl"}},{definePartsStyle:vu,defineMultiStyleConfig:ire}=Jn(dee.keys),ore=vu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},are={lg:vu({field:Tc.lg,addon:Tc.lg}),md:vu({field:Tc.md,addon:Tc.md}),sm:vu({field:Tc.sm,addon:Tc.sm}),xs:vu({field:Tc.xs,addon:Tc.xs})};function a8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||yt("blue.500","blue.300")(e),errorBorderColor:n||yt("red.500","red.300")(e)}}var sre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=a8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:yt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:yt("inherit","whiteAlpha.50")(e),bg:yt("gray.100","whiteAlpha.300")(e)}}}),lre=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=a8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e),_hover:{bg:yt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:yt("gray.100","whiteAlpha.50")(e)}}}),ure=vu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=a8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cre=vu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dre={outline:sre,filled:lre,flushed:ure,unstyled:cre},vn=ire({baseStyle:ore,sizes:are,variants:dre,defaultProps:{size:"md",variant:"outline"}}),Nx=zn("kbd-bg"),fre={[Nx.variable]:"colors.gray.100",_dark:{[Nx.variable]:"colors.whiteAlpha.100"},bg:Nx.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hre={baseStyle:fre},pre={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gre={baseStyle:pre},{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(fee.keys),yre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Sre=vre({icon:yre}),bre=mre({baseStyle:Sre}),{defineMultiStyleConfig:xre,definePartsStyle:wre}=Jn(hee.keys),fl=zn("menu-bg"),Dx=zn("menu-shadow"),Cre={[fl.variable]:"#fff",[Dx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Dx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Dx.reference},_re={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},kre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ere={opacity:.6},Pre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tre={transitionProperty:"common",transitionDuration:"normal"},Lre=wre({button:Tre,list:Cre,item:_re,groupTitle:kre,command:Ere,divider:Pre}),Are=xre({baseStyle:Lre}),{defineMultiStyleConfig:Mre,definePartsStyle:uC}=Jn(pee.keys),Ire={bg:"blackAlpha.600",zIndex:"modal"},Rre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:yt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:yt("lg","dark-lg")(e)}},Nre={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Dre={position:"absolute",top:"2",insetEnd:"3"},zre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bre={px:"6",py:"4"},Fre=uC(e=>({overlay:Ire,dialogContainer:io(Rre,e),dialog:io(Ore,e),header:Nre,closeButton:Dre,body:io(zre,e),footer:Bre}));function fs(e){return uC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var $re={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Hre=Mre({baseStyle:Fre,sizes:$re,defaultProps:{size:"md"}}),Wre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},tD=Wre,{defineMultiStyleConfig:Vre,definePartsStyle:nD}=Jn(gee.keys),s8=ni("number-input-stepper-width"),rD=ni("number-input-input-padding"),Ure=pu(s8).add("0.5rem").toString(),zx=ni("number-input-bg"),Bx=ni("number-input-color"),Fx=ni("number-input-border-color"),Gre={[s8.variable]:"sizes.6",[rD.variable]:Ure},jre=e=>{var t;return((t=io(vn.baseStyle,e))==null?void 0:t.field)??{}},Yre={width:s8.reference},qre={borderStart:"1px solid",borderStartColor:Fx.reference,color:Bx.reference,bg:zx.reference,[Bx.variable]:"colors.chakra-body-text",[Fx.variable]:"colors.chakra-border-color",_dark:{[Bx.variable]:"colors.whiteAlpha.800",[Fx.variable]:"colors.whiteAlpha.300"},_active:{[zx.variable]:"colors.gray.200",_dark:{[zx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Kre=nD(e=>({root:Gre,field:io(jre,e)??{},stepperGroup:Yre,stepper:qre}));function Iy(e){var t,n;const r=(t=vn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=tD.fontSizes[o];return nD({field:{...r.field,paddingInlineEnd:rD.reference,verticalAlign:"top"},stepper:{fontSize:pu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Xre={xs:Iy("xs"),sm:Iy("sm"),md:Iy("md"),lg:Iy("lg")},Zre=Vre({baseStyle:Kre,sizes:Xre,variants:vn.variants,defaultProps:vn.defaultProps}),gT,Qre={...(gT=vn.baseStyle)==null?void 0:gT.field,textAlign:"center"},Jre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},mT,eie={outline:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=vn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((mT=vn.variants)==null?void 0:mT.unstyled.field)??{}},tie={baseStyle:Qre,sizes:Jre,variants:eie,defaultProps:vn.defaultProps},{defineMultiStyleConfig:nie,definePartsStyle:rie}=Jn(mee.keys),Ry=ni("popper-bg"),iie=ni("popper-arrow-bg"),vT=ni("popper-arrow-shadow-color"),oie={zIndex:10},aie={[Ry.variable]:"colors.white",bg:Ry.reference,[iie.variable]:Ry.reference,[vT.variable]:"colors.gray.200",_dark:{[Ry.variable]:"colors.gray.700",[vT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sie={px:3,py:2,borderBottomWidth:"1px"},lie={px:3,py:2},uie={px:3,py:2,borderTopWidth:"1px"},cie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},die=rie({popper:oie,content:aie,header:sie,body:lie,footer:uie,closeButton:cie}),fie=nie({baseStyle:die}),{defineMultiStyleConfig:hie,definePartsStyle:fm}=Jn(vee.keys),pie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=yt(uT(),uT("1rem","rgba(0,0,0,0.1)"))(e),a=yt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${to(n,a)} 50%, transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=dm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:dm({track:{h:"1"}}),sm:dm({track:{h:"2"}}),md:dm({track:{h:"3"}}),lg:dm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),yT,Tie={...(yT=vn.baseStyle)==null?void 0:yT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},ST,bT,xT,wT,CT,_T,kT,ET,Mie={lg:{...(ST=vn.sizes)==null?void 0:ST.lg,field:{...(bT=vn.sizes)==null?void 0:bT.lg.field,...Ny}},md:{...(xT=vn.sizes)==null?void 0:xT.md,field:{...(wT=vn.sizes)==null?void 0:wT.md.field,...Ny}},sm:{...(CT=vn.sizes)==null?void 0:CT.sm,field:{...(_T=vn.sizes)==null?void 0:_T.sm.field,...Ny}},xs:{...(kT=vn.sizes)==null?void 0:kT.xs,field:{...(ET=vn.sizes)==null?void 0:ET.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),Fx=zn("skeleton-start-color"),$x=zn("skeleton-end-color"),Rie={[Fx.variable]:"colors.gray.100",[$x.variable]:"colors.gray.400",_dark:{[Fx.variable]:"colors.gray.800",[$x.variable]:"colors.gray.600"},background:Fx.reference,borderColor:$x.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Hx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Hx.variable]:"colors.white",_dark:{[Hx.variable]:"colors.gray.700"},bg:Hx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),Cv=zn("slider-thumb-size"),_v=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...r8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...r8({orientation:e.orientation,horizontal:{h:_v.reference},vertical:{w:_v.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...r8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Cv.reference,h:Cv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[Cv.variable]:"sizes.4",[_v.variable]:"sizes.1"}}),Uie=cS({container:{[Cv.variable]:"sizes.3.5",[_v.variable]:"sizes.1"}}),Gie=cS({container:{[Cv.variable]:"sizes.2.5",[_v.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:iD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=iD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:iD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Bm=ni("switch-track-width"),qf=ni("switch-track-height"),Wx=ni("switch-track-diff"),aoe=pu.subtract(Bm,qf),uC=ni("switch-thumb-x"),Gg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Bm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[Gg.variable]:"colors.gray.300",_dark:{[Gg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Gg.variable]:`colors.${t}.500`,_dark:{[Gg.variable]:`colors.${t}.200`}},bg:Gg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${uC.reference})`}},uoe=H3(e=>({container:{[Wx.variable]:aoe,[uC.variable]:Wx.reference,_rtl:{[uC.variable]:pu(Wx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Bm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Bm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Bm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Nm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),PT,Woe={...(PT=vn.baseStyle)==null?void 0:PT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},TT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((TT=vn.variants)==null?void 0:TT.unstyled.field)??{}},LT,AT,MT,IT,Uoe={xs:((LT=vn.sizes)==null?void 0:LT.xs.field)??{},sm:((AT=vn.sizes)==null?void 0:AT.sm.field)??{},md:((MT=vn.sizes)==null?void 0:MT.md.field)??{},lg:((IT=vn.sizes)==null?void 0:IT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Vx=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Vx.reference,[zy.variable]:"colors.gray.700",[Vx.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Vx.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Nm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...tD,sizes:QN,shadows:oae,space:ZN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(xv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function oD(){const e=Xv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Xv();return x(sS,{styles:t=>{const n=$N(t,"styles.global"),r=VN(n,{theme:t,colorMode:e});return r?vN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=HN(a,(g,m)=>TQ(m)),l=VN(e,t),u=Object.assign({},i,l,WN(s),o),h=vN(u)(t.theme);return r?[h,r]:h};function Ux(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=iC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Xv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function aD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=oD(),a=e?$N(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},WN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return aD(e,t)}function Ri(e,t={}){return aD(e,t)}function Dae(){const e=new Map;return new Proxy(Ux,{apply(t,n,r){return Ux(...r)},get(t,n){return e.has(n)||e.set(n,Ux(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function RT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function OT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function NT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var cC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=RT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=OT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=NT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=NT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return cC(()=>()=>e.current.destroy()),e.current}var[Vae,sD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=sD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);cC(()=>()=>{!i.current||t.unregister(i.current)},[]),cC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function lD(){return[W5(Vae),()=>W5(sD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),DT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??DT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const S=a??DT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,g]}const s8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,uD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(uD),a=C.exports.useContext(h1),s=C.exports.useContext(s8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function kv(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>kv(e[t]))}function cD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||kv(n)?n:void 0,animate:kv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[zT(t),zT(n)])}function zT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Ev={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Ev.projectionNodeConstructor=e[t]:Ev[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if(Fm.hasEverUpdated)return Qae++})}const l8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const dD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(s8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),S=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(uD).strict,P=C.exports.useContext(dD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Ev.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,S,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(l8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function u8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function fD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function hD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pD=(e,t)=>n=>Math.max(Math.min(n,t),e),$m=e=>e%1?Number(e.toFixed(5)):e,Pv=/(-)?([\d]*\.?[\d])+/g,dC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function e2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hm=Object.assign(Object.assign({},gh),{transform:pD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),t2=e=>({test:t=>e2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=t2("deg"),Pl=t2("%"),Ct=t2("px"),fse=t2("vh"),hse=t2("vw"),BT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),c8=(e,t)=>n=>Boolean(e2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gD=(e,t,n)=>r=>{if(!e2(r))return r;const[i,o,a,s]=r.match(Pv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:c8("hsl","hue"),parse:gD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform($m(t))+", "+Pl.transform($m(n))+", "+$m(Hm.transform(r))+")"},pse=pD(0,255),Gx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:c8("rgb","red"),parse:gD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gx.transform(e)+", "+Gx.transform(t)+", "+Gx.transform(n)+", "+$m(Hm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const fC={test:c8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||fC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):fC.parse(e),transform:e=>e2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},mD="${c}",vD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&e2(e)&&((n=(t=e.match(Pv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(dC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function yD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(dC);r&&(n=r.length,e=e.replace(dC,mD),t.push(...r.map(Ji.parse)));const i=e.match(Pv);return i&&(e=e.replace(Pv,vD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function SD(e){return yD(e).values}function bD(e){const{values:t,numColors:n,tokenised:r}=yD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=SD(e);return bD(e)(t.map(vse))}const ku={test:mse,parse:SD,createTransformer:bD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Pv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,hC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),FT={...gh,transform:Math.round},xD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Hm,originX:BT,originY:BT,originZ:Ct,zIndex:FT,fillOpacity:Hm,strokeOpacity:Hm,numOctaves:FT};function d8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(hD(m)){o[m]=v;continue}const S=xD[m],w=cse(v,S);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(S.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const f8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function wD(e,t,n){for(const r in t)!Il(t[r])&&!fD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=f8();return d8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return wD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let CD=e=>!j5(e);function Ase(e){!e||(CD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(CD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=$T(t,e.x,e.width),i=$T(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function h8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){d8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const _D=()=>({...f8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=_D();return h8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};wD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(u8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const kD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ED(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const PD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function TD(e,t,n,r){ED(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(PD.has(i)?i:kD(i),t.attrs[i])}function p8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||fD(r,e))&&(n[r]=t[r]);return n}function LD(e){const t=p8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function g8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Tv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),AD=e=>Tv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const MD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=cD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const S=g8(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:MD({scrapeMotionValuesFromProps:LD,createRenderState:_D,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}h8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),TD(t,n)}})},Wse={useVisualState:MD({scrapeMotionValuesFromProps:p8,createRenderState:f8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...u8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};pC(t,"focus",e?r:void 0),pC(t,"blur",e?i:void 0)}function ID(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function RD(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function m8(e,t="page"){return{point:RD(e)?Yse(e,t):qse(e,t)}}const OD=(e,t=!1)=>{const n=r=>e(r,m8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ND(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,ND(t),OD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return pC(e,ND(t),n&&OD(n,t==="pointerdown"),r)}function DD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=DD("dragHorizontal"),WT=DD("dragVertical");function zD(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=HT();else{const n=HT(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BD(){const e=zD(!0);return e?(e(),!1):!0}function VT(e,t,n){return(r,i)=>{!ID(r)||BD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?VT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?VT(r,!1,t):void 0,{passive:!t})}const FD=(e,t)=>t?e===t?!0:FD(e,t.parentElement):!1;function v8(e){return C.exports.useEffect(()=>()=>e(),[])}function $D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),jx=.001,nle=.01,UT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=UT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,UT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=gC(u,a),S=Math.exp(-g);return jx-m/v*S},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-g),w=gC(Math.pow(u,2),a);return(-i(u)+jx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-jx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!GT(e,ule)&>(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function y8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=$D(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=jT,S=jT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=gC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}y8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const jT=e=>0,Lv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function Yx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Yx(l,s,e+1/3),o=Yx(l,s,e),a=Yx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[fC,Vc,Ff],qT=e=>fle.find(t=>t.test(e)),HD=(e,t)=>{let n=qT(e),r=qT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=YT(i),n=Vc),r===Ff&&(o=YT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},mC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function WD(e,t){return mC(e)?n=>Cr(e,t,n):Ji.test(e)?HD(e,t):UD(e,t)}const VD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>WD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=WD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function KT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=KT(e),i=KT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(VD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?HD:UD;if(Array.isArray(e))return VD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Lv(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Lv(e[o],e[o+1],i);return t[o](s)}}function GD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),S8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),jD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=jD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},YD=1.525,wle=4/11,Cle=8/11,_le=9/10,b8=e=>e,x8=ble(2),kle=yS(x8),qD=S8(x8),KD=e=>1-Math.sin(Math.acos(e)),w8=yS(KD),Ele=S8(w8),C8=jD(YD),Ple=yS(C8),Tle=S8(C8),Lle=xle(YD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||qD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return GD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const XT={keyframes:U3,spring:y8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(XT[e.type])return XT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?y8:U3}const XD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),ZD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),XD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Av=!0),e),{}),Vle=n2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Av||jle(),n.schedule(r,i,o)),e},{}),Ule=n2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});n2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),QD=e=>{Av=!1,E0.delta=vC?XD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,yC=!0,n2.forEach(Gle),yC=!1,Av&&(vC=!1,ZD(QD))},jle=()=>{Av=!0,vC=!0,yC||ZD(QD)},Yle=()=>E0;function JD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?JD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function ez(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:S}=e,w=$D(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=GD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=JD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function tz(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=tz(V-O,Yle().delta),(R===1&&V>M||R===-1&&VS?.stop()}}const SC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ZT=e=>SC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function _8(e,t){if(mC(e)&&mC(t))return Fy(e,t);if(SC(e)&&SC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=ZT(e)&&ZT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const nz=(e,t)=>1-3*t+3*e,rz=(e,t)=>3*t-6*e,iz=e=>3*e,Z5=(e,t,n)=>((nz(t,n)*e+rz(t,n))*e+iz(t))*e,oz=(e,t,n)=>3*nz(t,n)*e*e+2*rz(t,n)*e+iz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!BD()}function g(S,w){!h()||(FD(i.current,S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(S,w))}Y5(i,"pointerdown",o?v:void 0,l),v8(u)}const aue="production",az=typeof process>"u"||process.env===void 0?aue:"production",QT=new Set;function sz(e,t,n){e||QT.has(t)||(console.warn(t),n&&console.warn(n),QT.add(t))}const bC=new WeakMap,qx=new WeakMap,sue=e=>{const t=bC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;qx.has(n)||qx.set(n,{});const r=qx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return bC.set(e,n),r.observe(e),()=>{bC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(az!=="production"&&sz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function k8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function lz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:b8,easeIn:x8,easeInOut:qD,easeOut:kle,circIn:KD,circInOut:Ele,circOut:w8,backIn:C8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},JT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",eL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),tL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Kx,backgroundColor:Kx,color:Kx,default:Hy},xue=(e,t)=>{let n;return Tv(t)?n=bue:n=tL[e]||tL.default,{to:t,...n(t)}},wue={...xD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:hC,WebkitFilter:hC},E8=e=>wue[e];function P8(e,t){var n;let r=E8(e);return r!==hC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},uz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),cz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),uz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Mv=!0),e),{}),Es=r2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||Tue(),n.schedule(r,i,o)),e},{}),ah=r2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Xx=r2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),dz=e=>{Mv=!1,P0.delta=xC?uz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,wC=!0,r2.forEach(Pue),wC=!1,Mv&&(xC=!1,cz(dz))},Tue=()=>{Mv=!0,xC=!0,wC||cz(dz)},CC=()=>P0;function fz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(JT):JT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(T8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=T8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=eL(e,n);a==="none"&&s&&typeof n=="string"?a=P8(e,n):nL(a)&&typeof n=="string"?a=rL(n):!Array.isArray(n)&&nL(n)&&typeof a=="string"&&(n=rL(a));const l=eL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):ez({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=AD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function nL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function rL(e){return typeof e=="number"?0:P8("",e)}function T8(e,t){return e[t]||e.default||e}function L8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=fz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function A8(e,t){e.indexOf(t)===-1&&e.push(t)}function M8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wm{constructor(){this.subscriptions=[]}add(t){return A8(this.subscriptions,t),()=>M8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Wm,this.velocityUpdateSubscribers=new Wm,this.renderSubscribers=new Wm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=CC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const hz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},pz=[gh,Ct,Pl,Lc,hse,fse,Fue],jg=e=>pz.find(hz(e)),$ue=[...pz,Ji,ku],Hue=e=>$ue.find(hz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return g8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=AD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s_C(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=_C(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=gz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function _C(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>gz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function gz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=L8(m,v,S,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(_C(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const I8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...I8].reverse(),ece=I8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,S.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Tv(K)&&Tv(G)?!lz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):S.add(J):K!==void 0&&S.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=k8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class mz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Qx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=_8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=CC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Zx(h,this.transformPagePoint),ID(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Qx(Zx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},RD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=m8(t),o=Zx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=CC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Qx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Zx(e,t){return t?{point:t(e.point)}:e}function iL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qx({point:e},t){return{point:e,delta:iL(e,vz(t)),offset:iL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function vz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function oL(e,t=0,n=.01){return _8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function uL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:uL(e.x,n,i),y:uL(e.y,t,r)}}function cL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Lv(t.min,t.max-r,e.min):r>i&&(n=Lv(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const kC=.35;function pce(e=kC){return e===!1?e=0:e===!0&&(e=kC),{x:dL(e,"left","right"),y:dL(e,"top","bottom")}}function dL(e,t,n){return{min:fL(e,t),max:fL(e,n)}}function fL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const hL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gm=()=>({x:hL(),y:hL()}),pL=()=>({min:0,max:0}),Zr=()=>({x:pL(),y:pL()});function cl(e){return[e("x"),e("y")]}function yz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jx(e){return e===void 0||e===1}function EC({scale:e,scaleX:t,scaleY:n}){return!Jx(e)||!Jx(t)||!Jx(n)}function kf(e){return EC(e)||Sz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Sz(e){return gL(e.x)||gL(e.y)}function gL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function mL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function PC(e,t=0,n=1,r,i){e.min=mL(e.min,t,n,r,i),e.max=mL(e.max,t,n,r,i)}function bz(e,{x:t,y:n}){PC(e.x,t.translate,t.scale,t.originPoint),PC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(m8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new mz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=yz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return L8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=kC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(s8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new mz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),v8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function TC(e){return typeof e=="string"&&e.startsWith("var(--")}const wz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=wz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function LC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():TC(i)?LC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!TC(o))return;const a=LC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!TC(o))continue;const a=LC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),Cz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(Cz),_z=(e,t)=>{e.set(t,!1),e.set(t)},yL=e=>e===gh||e===Ct;var SL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(SL||(SL={}));const bL=(e,t)=>parseFloat(e.split(", ")[t]),xL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return bL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?bL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const wL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:xL(4,13),y:xL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=wL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);_z(h,s[u]),e[u]=wL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Cz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=jg(h);const m=t[l];let v;if(Tv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],g=jg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},AC={current:null},kz={current:!1};function Bce(){if(kz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>AC.current=e.matches;e.addListener(t),t()}else AC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ez=Object.keys(Ev),$ce=Ez.length,CL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=cD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kz.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:AC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=Ez[l],{isEnabled:h,Component:g}=Ev[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=g8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Pz=["initial",...I8],Wce=Pz.length;class Tz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Tz{readValueFromInstance(t,n){if(p1.has(n)){const r=E8(n);return r&&r.default||0}else{const r=Vce(t),i=(hD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xz(t,n)}build(t,n,r,i){d8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return p8(t)}renderInstance(t,n,r,i){ED(t,n,r,i)}}class Gce extends Tz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=E8(n))===null||r===void 0?void 0:r.default)||0:(n=PD.has(n)?n:kD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return LD(t)}build(t,n,r,i){h8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){TD(t,n,r,i)}}const jce=(e,t)=>u8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function _L(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=_L(e,t.target.x),r=_L(e,t.target.y);return`${n}% ${r}%`}},kL="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(wz,v=>(o.push(v),kL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(kL,()=>{const S=o[v];return v++,S})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=k8(),r=C.exports.useContext(l8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(dD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...Yg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yg,borderTopRightRadius:Yg,borderBottomLeftRadius:Yg,borderBottomRightRadius:Yg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return L8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Lz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Lz.length,EL=e=>typeof e=="string"?parseFloat(e):e,PL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Lv(e,t,r))}function LL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){LL(e.x,t.x),LL(e.y,t.y)}function AL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=AL(e.min,t,n,s,i),e.max=AL(e.max,t,n,s,i)}function ML(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function IL(e,t,n,r){ML(e.x,t,ide,n?.x,r?.x),ML(e.y,t,ode,n?.y,r?.y)}function RL(e){return e.translate===0&&e.scale===1}function Mz(e){return RL(e.x)&&RL(e.y)}function Iz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function OL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return _8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){A8(this.members,t),t.scheduleRender()}remove(t){if(M8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function NL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){A8(this.children,t),this.isDirty=!0}remove(t){M8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const DL=["","X","Y","Z"],zL=1e3;let cde=0;function Rz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=fz(v,250),Fm.hasAnimatedSinceResize&&(Fm.hasAnimatedSinceResize=!1,this.nodes.forEach(FL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Iz(this.targetLayout,w)||S,V=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...T8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&FL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;$L(v.x,a.x,M),$L(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Um(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,S,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Fm.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,zL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,zL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Oz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Vm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(BL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(S);S.min=o[v].min,S.max=S.min+w}):Oz(s,i.layoutBox,o)&&cl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);S.max=S.min+w});const u=Gm();Vm(u,o,i.layoutBox);const h=Gm();l?Vm(h,e.applyTransform(a,!0),i.measuredBox):Vm(h,o,i.layoutBox);const g=!Mz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:S,layout:w}=v;if(S&&w){const E=Zr();Um(E,i.layoutBox,S.layoutBox);const P=Zr();Um(P,o,w.layoutBox),Iz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function BL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function $L(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function HL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){HL(e.x,t.x,n.x,r),HL(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function WL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){WL(e.x),WL(e.y)}function Oz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(OL(t),OL(n),.2)}const _de=Rz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ew={current:void 0},kde=Rz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ew.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),ew.current=e}return ew.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Nz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Nz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=fm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:fm({track:{h:"1"}}),sm:fm({track:{h:"2"}}),md:fm({track:{h:"3"}}),lg:fm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),yT,Tie={...(yT=vn.baseStyle)==null?void 0:yT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},ST,bT,xT,wT,CT,_T,kT,ET,Mie={lg:{...(ST=vn.sizes)==null?void 0:ST.lg,field:{...(bT=vn.sizes)==null?void 0:bT.lg.field,...Ny}},md:{...(xT=vn.sizes)==null?void 0:xT.md,field:{...(wT=vn.sizes)==null?void 0:wT.md.field,...Ny}},sm:{...(CT=vn.sizes)==null?void 0:CT.sm,field:{...(_T=vn.sizes)==null?void 0:_T.sm.field,...Ny}},xs:{...(kT=vn.sizes)==null?void 0:kT.xs,field:{...(ET=vn.sizes)==null?void 0:ET.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),$x=zn("skeleton-start-color"),Hx=zn("skeleton-end-color"),Rie={[$x.variable]:"colors.gray.100",[Hx.variable]:"colors.gray.400",_dark:{[$x.variable]:"colors.gray.800",[Hx.variable]:"colors.gray.600"},background:$x.reference,borderColor:Hx.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Wx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Wx.variable]:"colors.white",_dark:{[Wx.variable]:"colors.gray.700"},bg:Wx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),_v=zn("slider-thumb-size"),kv=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...i8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...i8({orientation:e.orientation,horizontal:{h:kv.reference},vertical:{w:kv.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...i8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:_v.reference,h:_v.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[_v.variable]:"sizes.4",[kv.variable]:"sizes.1"}}),Uie=cS({container:{[_v.variable]:"sizes.3.5",[kv.variable]:"sizes.1"}}),Gie=cS({container:{[_v.variable]:"sizes.2.5",[kv.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:iD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=iD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:iD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Fm=ni("switch-track-width"),qf=ni("switch-track-height"),Vx=ni("switch-track-diff"),aoe=pu.subtract(Fm,qf),cC=ni("switch-thumb-x"),jg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Fm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[jg.variable]:"colors.gray.300",_dark:{[jg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[jg.variable]:`colors.${t}.500`,_dark:{[jg.variable]:`colors.${t}.200`}},bg:jg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${cC.reference})`}},uoe=H3(e=>({container:{[Vx.variable]:aoe,[cC.variable]:Vx.reference,_rtl:{[cC.variable]:pu(Vx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Fm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Fm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Fm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),PT,Woe={...(PT=vn.baseStyle)==null?void 0:PT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},TT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((TT=vn.variants)==null?void 0:TT.unstyled.field)??{}},LT,AT,MT,IT,Uoe={xs:((LT=vn.sizes)==null?void 0:LT.xs.field)??{},sm:((AT=vn.sizes)==null?void 0:AT.sm.field)??{},md:((MT=vn.sizes)==null?void 0:MT.md.field)??{},lg:((IT=vn.sizes)==null?void 0:IT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Ux=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Ux.reference,[zy.variable]:"colors.gray.700",[Ux.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Ux.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Dm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...tD,sizes:QN,shadows:oae,space:ZN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(wv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function oD(){const e=Zv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Zv();return x(sS,{styles:t=>{const n=$N(t,"styles.global"),r=VN(n,{theme:t,colorMode:e});return r?vN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=HN(a,(g,m)=>TQ(m)),l=VN(e,t),u=Object.assign({},i,l,WN(s),o),h=vN(u)(t.theme);return r?[h,r]:h};function Gx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=oC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Zv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function aD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=oD(),a=e?$N(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},WN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return aD(e,t)}function Ri(e,t={}){return aD(e,t)}function Dae(){const e=new Map;return new Proxy(Gx,{apply(t,n,r){return Gx(...r)},get(t,n){return e.has(n)||e.set(n,Gx(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function RT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function OT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function NT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var dC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=RT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=OT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=NT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=NT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return dC(()=>()=>e.current.destroy()),e.current}var[Vae,sD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=sD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);dC(()=>()=>{!i.current||t.unregister(i.current)},[]),dC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function lD(){return[W5(Vae),()=>W5(sD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),DT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??DT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const y=a??DT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},y)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const y=typeof m=="function"?m(h):m;!a(h,y)||(u||l(y),o(y))},[u,o,h,a]);return[h,g]}const l8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,uD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(uD),a=C.exports.useContext(h1),s=C.exports.useContext(l8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function Ev(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>Ev(e[t]))}function cD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ev(n)?n:void 0,animate:Ev(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[zT(t),zT(n)])}function zT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Pv={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Pv.projectionNodeConstructor=e[t]:Pv[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const $m={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if($m.hasEverUpdated)return Qae++})}const u8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const dD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(l8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),y=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(uD).strict,P=C.exports.useContext(dD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,y,n||Pv.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,y,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(u8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function c8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function fD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function hD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pD=(e,t)=>n=>Math.max(Math.min(n,t),e),Hm=e=>e%1?Number(e.toFixed(5)):e,Tv=/(-)?([\d]*\.?[\d])+/g,fC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function t2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wm=Object.assign(Object.assign({},gh),{transform:pD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),n2=e=>({test:t=>t2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=n2("deg"),Pl=n2("%"),Ct=n2("px"),fse=n2("vh"),hse=n2("vw"),BT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),d8=(e,t)=>n=>Boolean(t2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gD=(e,t,n)=>r=>{if(!t2(r))return r;const[i,o,a,s]=r.match(Tv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:d8("hsl","hue"),parse:gD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform(Hm(t))+", "+Pl.transform(Hm(n))+", "+Hm(Wm.transform(r))+")"},pse=pD(0,255),jx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:d8("rgb","red"),parse:gD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jx.transform(e)+", "+jx.transform(t)+", "+jx.transform(n)+", "+Hm(Wm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const hC={test:d8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||hC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):hC.parse(e),transform:e=>t2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},mD="${c}",vD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&t2(e)&&((n=(t=e.match(Tv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(fC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function yD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(fC);r&&(n=r.length,e=e.replace(fC,mD),t.push(...r.map(Ji.parse)));const i=e.match(Tv);return i&&(e=e.replace(Tv,vD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function SD(e){return yD(e).values}function bD(e){const{values:t,numColors:n,tokenised:r}=yD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=SD(e);return bD(e)(t.map(vse))}const ku={test:mse,parse:SD,createTransformer:bD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,pC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),FT={...gh,transform:Math.round},xD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Wm,originX:BT,originY:BT,originZ:Ct,zIndex:FT,fillOpacity:Wm,strokeOpacity:Wm,numOctaves:FT};function f8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(hD(m)){o[m]=v;continue}const y=xD[m],w=cse(v,y);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(y.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:y=0}=l;i.transformOrigin=`${m} ${v} ${y}`}}const h8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function wD(e,t,n){for(const r in t)!Il(t[r])&&!fD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=h8();return f8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return wD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let CD=e=>!j5(e);function Ase(e){!e||(CD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(CD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=$T(t,e.x,e.width),i=$T(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function p8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){f8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const _D=()=>({...h8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=_D();return p8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};wD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(c8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const kD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ED(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const PD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function TD(e,t,n,r){ED(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(PD.has(i)?i:kD(i),t.attrs[i])}function g8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||fD(r,e))&&(n[r]=t[r]);return n}function LD(e){const t=g8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function m8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Lv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),AD=e=>Lv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const MD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=cD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const y=m8(e,v);if(!y)return;const{transitionEnd:w,transition:E,...P}=y;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:MD({scrapeMotionValuesFromProps:LD,createRenderState:_D,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}p8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),TD(t,n)}})},Wse={useVisualState:MD({scrapeMotionValuesFromProps:g8,createRenderState:h8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...c8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};gC(t,"focus",e?r:void 0),gC(t,"blur",e?i:void 0)}function ID(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function RD(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function v8(e,t="page"){return{point:RD(e)?Yse(e,t):qse(e,t)}}const OD=(e,t=!1)=>{const n=r=>e(r,v8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ND(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,ND(t),OD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return gC(e,ND(t),n&&OD(n,t==="pointerdown"),r)}function DD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=DD("dragHorizontal"),WT=DD("dragVertical");function zD(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=HT();else{const n=HT(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BD(){const e=zD(!0);return e?(e(),!1):!0}function VT(e,t,n){return(r,i)=>{!ID(r)||BD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?VT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?VT(r,!1,t):void 0,{passive:!t})}const FD=(e,t)=>t?e===t?!0:FD(e,t.parentElement):!1;function y8(e){return C.exports.useEffect(()=>()=>e(),[])}function $D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Yx=.001,nle=.01,UT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=UT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,UT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=mC(u,a),y=Math.exp(-g);return Yx-m/v*y},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-g),w=mC(Math.pow(u,2),a);return(-i(u)+Yx>0?-1:1)*((m-v)*y)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Yx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!GT(e,ule)&>(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function S8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=$D(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=jT,y=jT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=mC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},y=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=y(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}S8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const jT=e=>0,Av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function qx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=qx(l,s,e+1/3),o=qx(l,s,e),a=qx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[hC,Vc,Ff],qT=e=>fle.find(t=>t.test(e)),HD=(e,t)=>{let n=qT(e),r=qT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=YT(i),n=Vc),r===Ff&&(o=YT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},vC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function WD(e,t){return vC(e)?n=>Cr(e,t,n):Ji.test(e)?HD(e,t):UD(e,t)}const VD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>WD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=WD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function KT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=KT(e),i=KT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(VD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?HD:UD;if(Array.isArray(e))return VD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Av(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Av(e[o],e[o+1],i);return t[o](s)}}function GD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),b8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),jD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=jD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},YD=1.525,wle=4/11,Cle=8/11,_le=9/10,x8=e=>e,w8=ble(2),kle=yS(w8),qD=b8(w8),KD=e=>1-Math.sin(Math.acos(e)),C8=yS(KD),Ele=b8(C8),_8=jD(YD),Ple=yS(_8),Tle=b8(_8),Lle=xle(YD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||qD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return GD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const XT={keyframes:U3,spring:S8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(XT[e.type])return XT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?S8:U3}const XD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),ZD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),XD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Mv=!0),e),{}),Vle=r2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||jle(),n.schedule(r,i,o)),e},{}),Ule=r2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});r2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),QD=e=>{Mv=!1,E0.delta=yC?XD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,SC=!0,r2.forEach(Gle),SC=!1,Mv&&(yC=!1,ZD(QD))},jle=()=>{Mv=!0,yC=!0,SC||ZD(QD)},Yle=()=>E0;function JD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?JD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function ez(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:y}=e,w=$D(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=GD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=JD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}y?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function tz(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let y;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=tz(V-O,Yle().delta),(R===1&&V>M||R===-1&&Vy?.stop()}}const bC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ZT=e=>bC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function k8(e,t){if(vC(e)&&vC(t))return Fy(e,t);if(bC(e)&&bC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=ZT(e)&&ZT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const nz=(e,t)=>1-3*t+3*e,rz=(e,t)=>3*t-6*e,iz=e=>3*e,Z5=(e,t,n)=>((nz(t,n)*e+rz(t,n))*e+iz(t))*e,oz=(e,t,n)=>3*nz(t,n)*e*e+2*rz(t,n)*e+iz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!BD()}function g(y,w){!h()||(FD(i.current,y.target)?e&&e(y,w):n&&n(y,w))}function m(y,w){!h()||n&&n(y,w)}function v(y,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(y,w))}Y5(i,"pointerdown",o?v:void 0,l),y8(u)}const aue="production",az=typeof process>"u"||process.env===void 0?aue:"production",QT=new Set;function sz(e,t,n){e||QT.has(t)||(console.warn(t),n&&console.warn(n),QT.add(t))}const xC=new WeakMap,Kx=new WeakMap,sue=e=>{const t=xC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;Kx.has(n)||Kx.set(n,{});const r=Kx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return xC.set(e,n),r.observe(e),()=>{xC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(az!=="production"&&sz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function E8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function lz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:x8,easeIn:w8,easeInOut:qD,easeOut:kle,circIn:KD,circInOut:Ele,circOut:C8,backIn:_8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},JT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",eL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),tL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Xx,backgroundColor:Xx,color:Xx,default:Hy},xue=(e,t)=>{let n;return Lv(t)?n=bue:n=tL[e]||tL.default,{to:t,...n(t)}},wue={...xD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:pC,WebkitFilter:pC},P8=e=>wue[e];function T8(e,t){var n;let r=P8(e);return r!==pC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},uz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),cz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),uz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Iv=!0),e),{}),Es=i2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Iv||Tue(),n.schedule(r,i,o)),e},{}),ah=i2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Zx=i2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),dz=e=>{Iv=!1,P0.delta=wC?uz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,CC=!0,i2.forEach(Pue),CC=!1,Iv&&(wC=!1,cz(dz))},Tue=()=>{Iv=!0,wC=!0,CC||cz(dz)},_C=()=>P0;function fz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(JT):JT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(L8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=L8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=eL(e,n);a==="none"&&s&&typeof n=="string"?a=T8(e,n):nL(a)&&typeof n=="string"?a=rL(n):!Array.isArray(n)&&nL(n)&&typeof a=="string"&&(n=rL(a));const l=eL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):ez({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=AD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function nL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function rL(e){return typeof e=="number"?0:T8("",e)}function L8(e,t){return e[t]||e.default||e}function A8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=fz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function M8(e,t){e.indexOf(t)===-1&&e.push(t)}function I8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Vm{constructor(){this.subscriptions=[]}add(t){return M8(this.subscriptions,t),()=>I8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Vm,this.velocityUpdateSubscribers=new Vm,this.renderSubscribers=new Vm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=_C();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const hz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},pz=[gh,Ct,Pl,Lc,hse,fse,Fue],Yg=e=>pz.find(hz(e)),$ue=[...pz,Ji,ku],Hue=e=>$ue.find(hz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return m8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=AD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;skC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=kC(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=gz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function kC(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>gz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function gz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),y=l[m];if(!v||y===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=A8(m,v,y,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(kC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const R8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...R8].reverse(),ece=R8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],y=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,y.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Lv(K)&&Lv(G)?!lz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):y.add(J):K!==void 0&&y.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(y.size){const k={};y.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=E8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class mz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Jx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=k8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=_C();this.history.push({...m,timestamp:v});const{onStart:y,onMove:w}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Qx(h,this.transformPagePoint),ID(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Jx(Qx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},RD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=v8(t),o=Qx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=_C();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Jx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Qx(e,t){return t?{point:t(e.point)}:e}function iL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jx({point:e},t){return{point:e,delta:iL(e,vz(t)),offset:iL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function vz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function oL(e,t=0,n=.01){return k8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function uL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:uL(e.x,n,i),y:uL(e.y,t,r)}}function cL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Av(t.min,t.max-r,e.min):r>i&&(n=Av(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const EC=.35;function pce(e=EC){return e===!1?e=0:e===!0&&(e=EC),{x:dL(e,"left","right"),y:dL(e,"top","bottom")}}function dL(e,t,n){return{min:fL(e,t),max:fL(e,n)}}function fL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const hL=()=>({translate:0,scale:1,origin:0,originPoint:0}),jm=()=>({x:hL(),y:hL()}),pL=()=>({min:0,max:0}),Zr=()=>({x:pL(),y:pL()});function cl(e){return[e("x"),e("y")]}function yz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ew(e){return e===void 0||e===1}function PC({scale:e,scaleX:t,scaleY:n}){return!ew(e)||!ew(t)||!ew(n)}function kf(e){return PC(e)||Sz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Sz(e){return gL(e.x)||gL(e.y)}function gL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function mL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function TC(e,t=0,n=1,r,i){e.min=mL(e.min,t,n,r,i),e.max=mL(e.max,t,n,r,i)}function bz(e,{x:t,y:n}){TC(e.x,t.translate,t.scale,t.originPoint),TC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(v8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var y,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(y=this.visualElement.projection)===null||y===void 0?void 0:y.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new mz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=yz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,y=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return A8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=EC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(l8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new mz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),y8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function LC(e){return typeof e=="string"&&e.startsWith("var(--")}const wz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=wz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function AC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():LC(i)?AC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!LC(o))return;const a=AC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!LC(o))continue;const a=AC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),Cz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(Cz),_z=(e,t)=>{e.set(t,!1),e.set(t)},yL=e=>e===gh||e===Ct;var SL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(SL||(SL={}));const bL=(e,t)=>parseFloat(e.split(", ")[t]),xL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return bL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?bL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const wL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:xL(4,13),y:xL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=wL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);_z(h,s[u]),e[u]=wL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Cz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Yg(h);const m=t[l];let v;if(Lv(m)){const y=m.length,w=m[0]===null?1:0;h=m[w],g=Yg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},MC={current:null},kz={current:!1};function Bce(){if(kz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>MC.current=e.matches;e.addListener(t),t()}else MC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ez=Object.keys(Pv),$ce=Ez.length,CL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=cD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kz.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:MC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=Ez[l],{isEnabled:h,Component:g}=Pv[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=m8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Pz=["initial",...R8],Wce=Pz.length;class Tz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Tz{readValueFromInstance(t,n){if(p1.has(n)){const r=P8(n);return r&&r.default||0}else{const r=Vce(t),i=(hD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xz(t,n)}build(t,n,r,i){f8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return g8(t)}renderInstance(t,n,r,i){ED(t,n,r,i)}}class Gce extends Tz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=P8(n))===null||r===void 0?void 0:r.default)||0:(n=PD.has(n)?n:kD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return LD(t)}build(t,n,r,i){p8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){TD(t,n,r,i)}}const jce=(e,t)=>c8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function _L(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=_L(e,t.target.x),r=_L(e,t.target.y);return`${n}% ${r}%`}},kL="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(wz,v=>(o.push(v),kL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(kL,()=>{const y=o[v];return v++,y})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),$m.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=E8(),r=C.exports.useContext(u8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(dD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...qg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qg,borderTopRightRadius:qg,borderBottomLeftRadius:qg,borderBottomRightRadius:qg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return A8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Lz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Lz.length,EL=e=>typeof e=="string"?parseFloat(e):e,PL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Av(e,t,r))}function LL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){LL(e.x,t.x),LL(e.y,t.y)}function AL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=AL(e.min,t,n,s,i),e.max=AL(e.max,t,n,s,i)}function ML(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function IL(e,t,n,r){ML(e.x,t,ide,n?.x,r?.x),ML(e.y,t,ode,n?.y,r?.y)}function RL(e){return e.translate===0&&e.scale===1}function Mz(e){return RL(e.x)&&RL(e.y)}function Iz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function OL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return k8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){M8(this.members,t),t.scheduleRender()}remove(t){if(I8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function NL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){M8(this.children,t),this.isDirty=!0}remove(t){I8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const DL=["","X","Y","Z"],zL=1e3;let cde=0;function Rz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=fz(v,250),$m.hasAnimatedSinceResize&&($m.hasAnimatedSinceResize=!1,this.nodes.forEach(FL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Iz(this.targetLayout,w)||y,V=!v&&y;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...L8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&FL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;$L(v.x,a.x,M),$L(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Gm(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,y,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{$m.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,zL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,zL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Oz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Um(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(BL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],w=ha(y);y.min=o[v].min,y.max=y.min+w}):Oz(s,i.layoutBox,o)&&cl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);y.max=y.min+w});const u=jm();Um(u,o,i.layoutBox);const h=jm();l?Um(h,e.applyTransform(a,!0),i.measuredBox):Um(h,o,i.layoutBox);const g=!Mz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:y,layout:w}=v;if(y&&w){const E=Zr();Gm(E,i.layoutBox,y.layoutBox);const P=Zr();Gm(P,o,w.layoutBox),Iz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function BL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function $L(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function HL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){HL(e.x,t.x,n.x,r),HL(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function WL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){WL(e.x),WL(e.y)}function Oz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(OL(t),OL(n),.2)}const _de=Rz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),tw={current:void 0},kde=Rz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!tw.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),tw.current=e}return tw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Nz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Nz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -66,8 +66,8 @@ Error generating stack: `+o.message+` top: ${s}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(u)}},[t]),x(Tde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const tw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=gS(Ade),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Lde,{isPresent:n,children:e})),x(h1.Provider,{value:u,children:e})};function Ade(){return new Map}const $p=e=>e.key||"";function Mde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",sz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pde();const l=C.exports.useContext(l8).forceRender;l&&(s=l);const u=Nz(),h=Ide(e);let g=h;const m=new Set,v=C.exports.useRef(g),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(V5(()=>{w.current=!1,Mde(h,S),v.current=g}),v8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(tw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),O=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(R,0,x(tw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(tw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),az!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function MC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Rde(){return!1}var Ode=e=>{const{condition:t,message:n}=e;t&&Rde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},qg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function IC(e){switch(e?.direction??"right"){case"right":return qg.slideRight;case"left":return qg.slideLeft;case"bottom":return qg.slideDown;case"top":return qg.slideUp;default:return qg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Nde=e=>e!=null&&parseInt(e.toString(),10)>0,UL={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Dde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Nde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(UL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(UL.enter,i)})},zz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ode({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(Fl.div,{ref:t,...g,className:i2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Dde,initial:r?"exit":!1,animate:P,exit:"exit"})})});zz.displayName="Collapse";var zde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Xf.exit,n),transitionEnd:t?.exit})},Bz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-fade",o),custom:m,...Bz,animate:h,...u})})});Bde.displayName="Fade";var Fde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Xf.enter,n),transitionEnd:e?.enter})},Fz={initial:"exit",animate:"enter",exit:"exit",variants:Fde},$de=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:S,children:m&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",s),...Fz,animate:v,custom:S,...g})})});$de.displayName="ScaleFade";var GL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=IC({direction:e});return{...i,transition:t?.exit??Ps.exit(GL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=IC({direction:e});return{...i,transition:n?.enter??Ps.enter(GL.enter,r),transitionEnd:t?.enter}}},$z=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=IC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(Fl.div,{...m,ref:n,initial:"exit",className:i2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Hde,style:S,...g})})});$z.displayName="Slide";var Wde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},RC={initial:"initial",animate:"enter",exit:"exit",variants:Wde},Vde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(Fl.div,{ref:n,className:i2("chakra-offset-slide",a),custom:w,...RC,animate:S,...m})})});Vde.displayName="SlideFade";var o2=(...e)=>e.filter(Boolean).join(" ");function Ude(){return!1}var wS=e=>{const{condition:t,message:n}=e;t&&Ude()&&console.warn(n)};function nw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Gde,CS]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[jde,R8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Yde,yTe,qde,Kde]=lD(),Hf=Ee(function(t,n){const{getButtonProps:r}=R8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...CS().button};return ae.createElement(be.button,{...i,className:o2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Xde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jde(e),efe(e);const s=qde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=dS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zde,O8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=O8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;tfe(e);const{register:m,index:v,descendants:S}=Kde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);nfe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:nw(V.onClick,T),onFocus:nw(V.onFocus,R),onKeyDown:nw(V.onKeyDown,M)}},[h,t,w,T,R,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:O,getPanelProps:N,htmlProps:i}}function Jde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function efe(e){wS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function tfe(e){wS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function nfe(e){wS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=R8(),{reduceMotion:r}=O8(),i=o2("chakra-accordion__icon",e.className),o=CS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ya,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qde(t),l={...CS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:o2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=O8(),{getPanelProps:s,isOpen:l}=R8(),u=s(o,n),h=o2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(zz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:o2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),a2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});a2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function jL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,N8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hz={info:{icon:afe,colorScheme:"blue"},warning:{icon:jL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:jL,colorScheme:"red"},loading:{icon:a2,colorScheme:"blue"}};function cfe(e){return Hz[e].colorScheme}function dfe(e){return Hz[e].icon}var Wz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Wz.displayName="Alert";var Vz=Ee(function(t,n){const i={display:"inline",...N8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Vz.displayName="AlertDescription";function Uz(e){const{status:t}=lfe(),n=dfe(t),r=N8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Uz.displayName="AlertIcon";var Gz=Ee(function(t,n){const r=N8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Gz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},g.current=S},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:ffe(S,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),YL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function OC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}OC.displayName="ButtonIcon";function NC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(a2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}NC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":YL(a),"data-loading":YL(o),__css:k,className:TS("chakra-button",w),...P},o&&S==="start"&&x(NC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(qL,{...R})):x(qL,{...R}),o&&S==="end"&&x(NC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function qL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(OC,{marginEnd:i,children:t}),r,n&&x(OC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,rw=e=>e?!0:void 0;function KL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,jz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ri("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=jz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function D8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=z8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":rw(n),"aria-required":rw(i),"aria-readonly":rw(r)}}function z8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:KL(t?.onFocus,h),onBlur:KL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ri("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(Yz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Yz=Ee(function(t,n){const r=y1(),i=jz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Yz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var B8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:B8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:B8});Pfe.displayName="VisuallyHiddenInput";var XL=!1,LS=null,X0=!1,DC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function F8(e,t){DC.forEach(n=>n(e,t))}function ZL(e){X0=!0,Lfe(e)&&(LS="keyboard",F8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,F8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",F8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function QL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||XL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",ZL,!0),document.addEventListener("keyup",ZL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),XL=!0}function Rfe(e){Ife(),e(QL());const t=()=>e(QL());return DC.add(t),()=>{DC.delete(t)}}var[STe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qz(e={}){const t=z8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:S?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,S,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,S,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:B8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,JL),onTouchStart:La(Pe.onTouchStart,JL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ut,htmlProps:O}}function JL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Kz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ri("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=qz({...P,isDisabled:S,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Kz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function $8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function zC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Xz(e,t,n){return(n-t)*e+t}function BC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=zC(n);return $8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":iw(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Zz(Ac(v),o),w=n??S,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),$8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=iw(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=iw($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||O{document.head.removeChild(u)}},[t]),x(Tde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const nw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=gS(Ade),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Lde,{isPresent:n,children:e})),x(h1.Provider,{value:u,children:e})};function Ade(){return new Map}const $p=e=>e.key||"";function Mde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",sz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pde();const l=C.exports.useContext(u8).forceRender;l&&(s=l);const u=Nz(),h=Ide(e);let g=h;const m=new Set,v=C.exports.useRef(g),y=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(V5(()=>{w.current=!1,Mde(h,y),v.current=g}),y8(()=>{w.current=!0,y.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(nw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=y.get(T);if(!M)return;const R=E.indexOf(T),O=()=>{y.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(R,0,x(nw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(nw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),az!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function IC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Rde(){return!1}var Ode=e=>{const{condition:t,message:n}=e;t&&Rde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Kg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function RC(e){switch(e?.direction??"right"){case"right":return Kg.slideRight;case"left":return Kg.slideLeft;case"bottom":return Kg.slideDown;case"top":return Kg.slideUp;default:return Kg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Nde=e=>e!=null&&parseInt(e.toString(),10)>0,UL={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Dde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Nde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(UL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(UL.enter,i)})},zz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ode({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:y?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(Fl.div,{ref:t,...g,className:o2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Dde,initial:r?"exit":!1,animate:P,exit:"exit"})})});zz.displayName="Collapse";var zde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Xf.exit,n),transitionEnd:t?.exit})},Bz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(Fl.div,{ref:n,className:o2("chakra-fade",o),custom:m,...Bz,animate:h,...u})})});Bde.displayName="Fade";var Fde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Xf.enter,n),transitionEnd:e?.enter})},Fz={initial:"exit",animate:"enter",exit:"exit",variants:Fde},$de=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",y={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:y,children:m&&ae.createElement(Fl.div,{ref:n,className:o2("chakra-offset-slide",s),...Fz,animate:v,custom:y,...g})})});$de.displayName="ScaleFade";var GL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=RC({direction:e});return{...i,transition:t?.exit??Ps.exit(GL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=RC({direction:e});return{...i,transition:n?.enter??Ps.enter(GL.enter,r),transitionEnd:t?.enter}}},$z=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=RC({direction:r}),y=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(Fl.div,{...m,ref:n,initial:"exit",className:o2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Hde,style:y,...g})})});$z.displayName="Slide";var Wde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},OC={initial:"initial",animate:"enter",exit:"exit",variants:Wde},Vde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,y=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(Fl.div,{ref:n,className:o2("chakra-offset-slide",a),custom:w,...OC,animate:y,...m})})});Vde.displayName="SlideFade";var a2=(...e)=>e.filter(Boolean).join(" ");function Ude(){return!1}var wS=e=>{const{condition:t,message:n}=e;t&&Ude()&&console.warn(n)};function rw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Gde,CS]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[jde,O8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Yde,xTe,qde,Kde]=lD(),Hf=Ee(function(t,n){const{getButtonProps:r}=O8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...CS().button};return ae.createElement(be.button,{...i,className:a2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Xde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jde(e),efe(e);const s=qde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=dS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let y=!1;return v!==null&&(y=Array.isArray(h)?h.includes(v):h===v),{isOpen:y,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zde,N8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=N8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;tfe(e);const{register:m,index:v,descendants:y}=Kde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);nfe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=y.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=y.prevEnabled(v);j?.node.focus()},Home:()=>{const j=y.firstEnabled();j?.node.focus()},End:()=>{const j=y.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[y,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:rw(V.onClick,T),onFocus:rw(V.onFocus,R),onKeyDown:rw(V.onKeyDown,M)}},[h,t,w,T,R,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:O,getPanelProps:N,htmlProps:i}}function Jde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function efe(e){wS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function tfe(e){wS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function nfe(e){wS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=O8(),{reduceMotion:r}=N8(),i=a2("chakra-accordion__icon",e.className),o=CS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ya,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qde(t),l={...CS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:a2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=N8(),{getPanelProps:s,isOpen:l}=O8(),u=s(o,n),h=a2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(zz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:a2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),s2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});s2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function jL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,D8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hz={info:{icon:afe,colorScheme:"blue"},warning:{icon:jL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:jL,colorScheme:"red"},loading:{icon:s2,colorScheme:"blue"}};function cfe(e){return Hz[e].colorScheme}function dfe(e){return Hz[e].icon}var Wz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Wz.displayName="Alert";var Vz=Ee(function(t,n){const i={display:"inline",...D8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Vz.displayName="AlertDescription";function Uz(e){const{status:t}=lfe(),n=dfe(t),r=D8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Uz.displayName="AlertIcon";var Gz=Ee(function(t,n){const r=D8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Gz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const y=new Image;y.src=n,a&&(y.crossOrigin=a),r&&(y.srcset=r),s&&(y.sizes=s),t&&(y.loading=t),y.onload=w=>{v(),h("loaded"),i?.(w)},y.onerror=w=>{v(),h("failed"),o?.(w)},g.current=y},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...y}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?y:ffe(y,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),YL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function NC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}NC.displayName="ButtonIcon";function DC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(s2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}DC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:y="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":YL(a),"data-loading":YL(o),__css:k,className:TS("chakra-button",w),...P},o&&y==="start"&&x(DC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(qL,{...R})):x(qL,{...R}),o&&y==="end"&&x(DC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function qL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(NC,{marginEnd:i,children:t}),r,n&&x(NC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,iw=e=>e?!0:void 0;function KL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,jz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[y,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:y,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ri("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=jz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function z8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=B8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":iw(n),"aria-required":iw(i),"aria-readonly":iw(r)}}function B8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:KL(t?.onFocus,h),onBlur:KL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ri("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(Yz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Yz=Ee(function(t,n){const r=y1(),i=jz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Yz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var F8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:F8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:F8});Pfe.displayName="VisuallyHiddenInput";var XL=!1,LS=null,X0=!1,zC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function $8(e,t){zC.forEach(n=>n(e,t))}function ZL(e){X0=!0,Lfe(e)&&(LS="keyboard",$8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,$8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",$8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function QL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||XL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",ZL,!0),document.addEventListener("keyup",ZL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),XL=!0}function Rfe(e){Ife(),e(QL());const t=()=>e(QL());return zC.add(t),()=>{zC.delete(t)}}var[wTe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qz(e={}){const t=B8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:y,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:y?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,y,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(y))},[y]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(y),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,y,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:F8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ct=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,JL),onTouchStart:La(Pe.onTouchStart,JL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ct,htmlProps:O}}function JL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Kz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ri("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:y=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=qz({...P,isDisabled:y,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Kz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function H8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function BC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Xz(e,t,n){return(n-t)*e+t}function FC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=BC(n);return H8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":ow(r,o,n)??""),m=typeof i<"u",v=m?i:h,y=Zz(Ac(v),o),w=n??y,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),H8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=ow(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=ow($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||O{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Jz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Jz()&&e.test(navigator.vendor),ehe=e=>Jz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function eA(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Iv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=eA(n),a=eA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function H8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var W8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=yn(i),s=D8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});W8.displayName="Input";W8.id="Input";var[she,eB]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,S;const w=H8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),V8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=eB();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});V8.displayName="InputAddon";var tB=Ee(function(t,n){return x(V8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});tB.displayName="InputLeftAddon";tB.id="InputLeftAddon";var nB=Ee(function(t,n){return x(V8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});nB.displayName="InputRightAddon";nB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=eB(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});rB.id="InputLeftElement";rB.displayName="InputLeftElement";var iB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});iB.id="InputRightElement";iB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var oB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});oB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(oB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var aB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});aB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...S}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var sB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...S})});sB.displayName="Grid";function tA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=H8({gridArea:r,gridColumn:tA(i),gridRow:tA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,lB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),U8=Ee(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});U8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(U8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(U8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=lB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=lB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(sB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var uB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});uB.displayName="Spacer";var FC="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[FC]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var cB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});cB.displayName="StackItem";var G8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(cB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[FC]:S[FC]},...m},k)});G8.displayName="Stack";var dB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"row",ref:t}));dB.displayName="HStack";var fB=Ee((e,t)=>x(G8,{align:"center",...e,direction:"column",ref:t}));fB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=H8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function nA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>nA(q6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>nA(q6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(hB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},S))});Rhe.displayName="Wrap";var hB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});hB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},pB=Ohe,Tp=()=>{},Nhe={document:pB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:pB},gB=typeof window<"u"?{window,document}:zhe,mB=C.exports.createContext(gB);mB.displayName="EnvironmentContext";function vB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:gB},[r,n]);return ee(mB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}vB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function ow(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&ow(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!ow(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...S,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function yB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function SB(e){if(!yB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=bB(e))==null?void 0:t.defaultView)??window}function bB(e){return yB(e)?e.ownerDocument:document}function Whe(e){return bB(e).activeElement}var xB=e=>e.hasAttribute("tabindex"),Vhe=e=>xB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function wB(e){return e.parentElement&&wB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function CB(e){if(!SB(e)||wB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:xB(e)}function jhe(e){return e?SB(e)&&CB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function _B(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>CB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=_B(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",j8="auto",s2=[Ro,Ua,Ga,Oo],Z0="start",Rv="end",tpe="clippingParents",kB="viewport",Kg="popper",npe="reference",rA=s2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Rv])},[]),EB=[].concat(s2,[j8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Rv])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Y8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function $C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PB(){return!/^((?!chrome|android).)*safari/i.test($C())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!PB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function q8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Y8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(Y8(e)?e.host:null)||xd(e)}function iA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test($C()),n=/Trident/i.test($C());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(Y8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function l2(e){for(var t=Ya(e),n=iA(e);n&&mpe(n)&&Eu(n).position==="static";)n=iA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function K8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jm(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=jm(e,t,n);return r>n?n:r}function LB(){return{top:0,right:0,bottom:0,left:0}}function AB(e){return Object.assign({},LB(),e)}function MB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,AB(typeof t!="number"?t:MB(t,s2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=K8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=q8(o),v=l==="y"?Ro:Oo,S=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=l2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[S],O=k/2-m[h]/2+T,N=jm(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!TB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function oA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=l2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Rv){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Rv){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,oA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,oA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function aA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function X8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Z8(e){return J0(xd(e)).left+X8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=PB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Z8(e),y:l}}function Ipe(e){var t,n=xd(e),r=X8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Z8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Q8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&Q8(e)?e:IB(IS(e))}function Ym(e,t){var n;t===void 0&&(t=[]);var r=IB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],Q8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ym(IS(a)))}function HC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sA(e,t,n){return t===kB?HC(Mpe(e,n)):sh(t)?Rpe(t,n):HC(Ipe(xd(e)))}function Ope(e){var t=Ym(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?l2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&TB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=sA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},sA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?K8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Rv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ov(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?kB:u,g=n.elementContext,m=g===void 0?Kg:g,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=AB(typeof E!="number"?E:MB(E,s2)),k=m===Kg?npe:Kg,T=e.rects.popper,M=e.elements[S?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=RB({reference:O,element:T,strategy:"absolute",placement:i}),z=HC(Object.assign({},T,N)),V=m===Kg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Kg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?EB:l,h=e1(r),g=h?s?rA:rA.filter(function(S){return e1(S)===h}):s2,m=g.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=g);var v=m.reduce(function(S,w){return S[w]=Ov(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function zpe(e){if(Tl(e)===j8)return[];var t=j3(e);return[aA(e),t,aA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!S?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===j8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:S,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Ov(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=S?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function lA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function uA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ov(t,{elementContext:"reference"}),s=Ov(t,{altBoundary:!0}),l=lA(a,r),u=lA(s,i,o),h=uA(l),g=uA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=EB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=RB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Ov(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=K8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?q8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:LB(),_e=Me[Q],Je=Me[ne],Xe=jm(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&l2(t.elements.arrow),ut=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ut,et=K+_t-mt,Lt=jm(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):jm(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?X8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||Q8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Z8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cA={placement:"bottom",modifiers:[],strategy:"absolute"};function dA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],fA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...fA,...e}}:t={enabled:e,options:fA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{pA(e)},effect:({state:e})=>()=>{pA(e)}},pA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function OB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(S.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function NB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function DB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function zB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}zB.displayName="PortalManager";var[BB,_0e]=_n({strict:!1,name:"PortalContext"}),J8="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=J8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(BB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=J8),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(BB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=J8;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},aw=0,FB=function(e){return e&&(e.host||FB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),aw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),aw--,aw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},$B=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function e_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function HB(){}function WB(){}WB.resetWarningCache=HB;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:WB,resetWarningCache:HB};return n.PropTypes=n,n};Nn.exports=N0e();var WC="data-focus-lock",VB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function UB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var sw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function GB(e){return e}function jB(e,t){t===void 0&&(t=GB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function t_(e,t){return t===void 0&&(t=GB),jB(e,t)}function YB(e){e===void 0&&(e={});var t=jB(null);return t.options=yl({async:!0,ssr:!1},e),t}var qB=function(e){var t=e.sideCar,n=Dz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};qB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),qB}var KB=t_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),XB=t_(),W0e=t_(),V0e=YB({async:!0}),U0e=[],n_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&KB.useMedium(Je)},[]),me=XB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[VB]=g&&"disabled",r[WC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=UB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:sw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:sw})]})});n_.propTypes={};n_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const ZB=n_;function VC(e,t){return VC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VC(e,t)}function r_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,VC(e,t)}function QB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){r_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return QB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],o_=e1e.join(","),t1e="".concat(o_,", [data-focus-guard]"),sF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:o_)?[i]:[],sF(i))},[])},a_=function(e,t){return e.reduce(function(n,r){return n.concat(sF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(o_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return a_([n])}).reduce(function(n,r){return n.concat(r)},[])},s_=function(e,t){return $l(e).filter(function(n){return tF(t,n)}).filter(function(n){return X0e(n)})},gA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return nF(t,n)})},GC=function(e,t,n){return aF(s_(a_(e,n),t),!0,n)},mA=function(e,t){return aF(s_(a_(e),t),!1)},r1e=function(e,t){return s_(n1e(e),t)},Nv=function(e,t){return e.shadowRoot?Nv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Nv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},lF=function(e){return e.parentNode?lF(e.parentNode):e},l_=function(e){var t=UC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(WC);return n.push.apply(n,i?i1e($l(lF(r).querySelectorAll("[".concat(WC,'="').concat(i,'"]:not([').concat(VB,'="disabled"])')))):[r]),n},[])},uF=function(e){return e.activeElement?e.activeElement.shadowRoot?uF(e.activeElement.shadowRoot):e.activeElement:void 0},u_=function(){return document.activeElement?document.activeElement.shadowRoot?uF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},cF=function(e){var t=document&&u_();return!t||t.dataset&&t.dataset.focusGuard?!1:l_(e).some(function(n){return Nv(n,t)||a1e(n)})},s1e=function(){var e=document&&u_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Nv(t,e)}):!1},l1e=function(e,t){return t.filter(oF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},c_=function(e,t){return oF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(c_(n,e))}),e.filter(function(n){return t.has(n)})},vA=function(e){return e[0]&&e.length>1?c_(e[0],e):e[0]},yA=function(e,t){return e.length>1?e.indexOf(c_(e[t],e)):t},dF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=i_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),S=u1e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=yA(e,0),k=yA(e,i-1);if(l===-1||h===-1)return dF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=rF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=gA(r.filter(d1e(n)));return i&&i.length?vA(i):vA(gA(t))},jC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&jC(e.parentNode.host||e.parentNode,t),t},lw=function(e,t){for(var n=jC(e),r=jC(t),i=0;i=0)return o}return!1},fF=function(e,t,n){var r=UC(e),i=UC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=lw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=lw(o,l);u&&(!a||Nv(u,a)?a=u:a=lw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&u_(),r=l_(e).filter(i4),i=fF(n||e,e,r),o=new Map,a=mA(r,o),s=GC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=mA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===dF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=l_(e).filter(i4),n=fF(e,e,t),r=new Map,i=GC([n],r,!0),o=GC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:i_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},uw=0,cw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!cw&&r){if(uw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),cw=!0,setTimeout(function(){cw=!1},1);return}uw++,v1e(r.node,n.focusOptions),uw--}};const hF=y1e;function pF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,Dv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function SA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(Dv):Dv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(cF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=hF(g,r0,{focusOptions:l}),A0={})),Dv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),SA(S,v.length,1,v),SA(S,-1,-1,v))}}}return t},gF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},d_=function(){return pF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},mF=function(){Dv="just",setTimeout(function(){Dv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",gF),document.addEventListener("focusout",d_),window.addEventListener("blur",mF)},I1e=function(){document.removeEventListener("focusin",gF),document.removeEventListener("focusout",d_),window.removeEventListener("blur",mF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),pF(o4)):(I1e(),r0=null)}KB.assignSyncMedium(L1e);XB.assignMedium(d_);W0e.assignMedium(function(e){return e({moveFocusInside:hF,focusInside:cF})});const N1e=G0e(R1e,O1e)(A1e);var vF=C.exports.forwardRef(function(t,n){return x(ZB,{sideCar:N1e,ref:n,...t})}),yF=ZB.propTypes||{};yF.sideCar;e_(yF,["sideCar"]);vF.propTypes={};const D1e=vF;var SF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&_B(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};SF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",bF=YB(),dw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:dw,onWheelCapture:dw,onTouchMoveCapture:dw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Dz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=UB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:bF,removeScrollBar:u,shards:g,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},fw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[fw(n),fw(r),fw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=xF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Jz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Jz()&&e.test(navigator.vendor),ehe=e=>Jz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function eA(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Rv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=eA(n),a=eA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),y=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:y,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,y)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function W8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var V8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=yn(i),s=z8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});V8.displayName="Input";V8.id="Input";var[she,eB]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,y;const w=W8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((y=m.props)==null?void 0:y.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),U8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=eB();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});U8.displayName="InputAddon";var tB=Ee(function(t,n){return x(U8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});tB.displayName="InputLeftAddon";tB.id="InputLeftAddon";var nB=Ee(function(t,n){return x(U8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});nB.displayName="InputRightAddon";nB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=eB(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});rB.id="InputLeftElement";rB.displayName="InputLeftElement";var iB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});iB.id="InputRightElement";iB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var oB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});oB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(oB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var aB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});aB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...y}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...y,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var sB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...y}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...y})});sB.displayName="Grid";function tA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=W8({gridArea:r,gridColumn:tA(i),gridRow:tA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,lB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),G8=Ee(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});G8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(G8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(G8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=lB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=lB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(sB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var uB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});uB.displayName="Spacer";var $C="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[$C]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var cB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});cB.displayName="StackItem";var j8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",y=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(cB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:y.flexDirection,flexWrap:s,className:T,__css:E?{}:{[$C]:y[$C]},...m},k)});j8.displayName="Stack";var dB=Ee((e,t)=>x(j8,{align:"center",...e,direction:"row",ref:t}));dB.displayName="HStack";var fB=Ee((e,t)=>x(j8,{align:"center",...e,direction:"column",ref:t}));fB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=W8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function nA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>nA(K6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>nA(K6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),y=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(hB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},y))});Rhe.displayName="Wrap";var hB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});hB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},pB=Ohe,Tp=()=>{},Nhe={document:pB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:pB},gB=typeof window<"u"?{window,document}:zhe,mB=C.exports.createContext(gB);mB.displayName="EnvironmentContext";function vB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:gB},[r,n]);return ee(mB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}vB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function aw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...y}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&aw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!aw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!aw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...y,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...y,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function yB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function SB(e){if(!yB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=bB(e))==null?void 0:t.defaultView)??window}function bB(e){return yB(e)?e.ownerDocument:document}function Whe(e){return bB(e).activeElement}var xB=e=>e.hasAttribute("tabindex"),Vhe=e=>xB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function wB(e){return e.parentElement&&wB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function CB(e){if(!SB(e)||wB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:xB(e)}function jhe(e){return e?SB(e)&&CB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function _B(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>CB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=_B(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",Y8="auto",l2=[Ro,Ua,Ga,Oo],Z0="start",Ov="end",tpe="clippingParents",kB="viewport",Xg="popper",npe="reference",rA=l2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Ov])},[]),EB=[].concat(l2,[Y8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Ov])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function q8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function HC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PB(){return!/^((?!chrome|android).)*safari/i.test(HC())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!PB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function K8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&q8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(q8(e)?e.host:null)||xd(e)}function iA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test(HC()),n=/Trident/i.test(HC());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(q8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function u2(e){for(var t=Ya(e),n=iA(e);n&&mpe(n)&&Eu(n).position==="static";)n=iA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function X8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ym(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=Ym(e,t,n);return r>n?n:r}function LB(){return{top:0,right:0,bottom:0,left:0}}function AB(e){return Object.assign({},LB(),e)}function MB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,AB(typeof t!="number"?t:MB(t,l2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=X8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=K8(o),v=l==="y"?Ro:Oo,y=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=u2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[y],O=k/2-m[h]/2+T,N=Ym(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!TB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function oA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,y=a.y,w=y===void 0?0:y,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=u2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Ov){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Ov){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,oA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,oA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function aA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function Z8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Q8(e){return J0(xd(e)).left+Z8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=PB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Q8(e),y:l}}function Ipe(e){var t,n=xd(e),r=Z8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Q8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function J8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&J8(e)?e:IB(IS(e))}function qm(e,t){var n;t===void 0&&(t=[]);var r=IB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],J8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(qm(IS(a)))}function WC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sA(e,t,n){return t===kB?WC(Mpe(e,n)):sh(t)?Rpe(t,n):WC(Ipe(xd(e)))}function Ope(e){var t=qm(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?u2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&TB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=sA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},sA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?X8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Ov:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Nv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?kB:u,g=n.elementContext,m=g===void 0?Xg:g,v=n.altBoundary,y=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=AB(typeof E!="number"?E:MB(E,l2)),k=m===Xg?npe:Xg,T=e.rects.popper,M=e.elements[y?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=RB({reference:O,element:T,strategy:"absolute",placement:i}),z=WC(Object.assign({},T,N)),V=m===Xg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Xg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?EB:l,h=e1(r),g=h?s?rA:rA.filter(function(y){return e1(y)===h}):l2,m=g.filter(function(y){return u.indexOf(y)>=0});m.length===0&&(m=g);var v=m.reduce(function(y,w){return y[w]=Nv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],y},{});return Object.keys(v).sort(function(y,w){return v[y]-v[w]})}function zpe(e){if(Tl(e)===Y8)return[];var t=j3(e);return[aA(e),t,aA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!y?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===Y8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:y,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Nv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=y?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function lA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function uA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Nv(t,{elementContext:"reference"}),s=Nv(t,{altBoundary:!0}),l=lA(a,r),u=lA(s,i,o),h=uA(l),g=uA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=EB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=RB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,y=n.tetherOffset,w=y===void 0?0:y,E=Nv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=X8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?K8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:LB(),_e=Me[Q],Je=Me[ne],Xe=Ym(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&u2(t.elements.arrow),ct=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ct,et=K+_t-mt,Lt=Ym(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):Ym(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?Z8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||J8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Q8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cA={placement:"bottom",modifiers:[],strategy:"absolute"};function dA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],fA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...fA,...e}}:t={enabled:e,options:fA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{pA(e)},effect:({state:e})=>()=>{pA(e)}},pA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function OB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,y=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!y.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(y.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!y.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{y.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function NB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),y=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():y()},[u,y,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:y,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function DB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function zB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}zB.displayName="PortalManager";var[BB,_0e]=_n({strict:!1,name:"PortalContext"}),e_="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=e_,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(BB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=e_),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(BB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=e_;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},sw=0,FB=function(e){return e&&(e.host||FB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),y=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&y&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return h(t),s.clear(),sw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),sw--,sw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},$B=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function t_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function HB(){}function WB(){}WB.resetWarningCache=HB;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:WB,resetWarningCache:HB};return n.PropTypes=n,n};Nn.exports=N0e();var VC="data-focus-lock",VB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function UB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var lw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function GB(e){return e}function jB(e,t){t===void 0&&(t=GB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function n_(e,t){return t===void 0&&(t=GB),jB(e,t)}function YB(e){e===void 0&&(e={});var t=jB(null);return t.options=yl({async:!0,ssr:!1},e),t}var qB=function(e){var t=e.sideCar,n=Dz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};qB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),qB}var KB=n_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),XB=n_(),W0e=n_(),V0e=YB({async:!0}),U0e=[],r_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,y=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&KB.useMedium(Je)},[]),me=XB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[VB]=g&&"disabled",r[VC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=UB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:lw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:y,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw})]})});r_.propTypes={};r_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const ZB=r_;function UC(e,t){return UC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UC(e,t)}function i_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,UC(e,t)}function QB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){i_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return QB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],a_=e1e.join(","),t1e="".concat(a_,", [data-focus-guard]"),sF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:a_)?[i]:[],sF(i))},[])},s_=function(e,t){return e.reduce(function(n,r){return n.concat(sF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(a_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return s_([n])}).reduce(function(n,r){return n.concat(r)},[])},l_=function(e,t){return $l(e).filter(function(n){return tF(t,n)}).filter(function(n){return X0e(n)})},gA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return nF(t,n)})},jC=function(e,t,n){return aF(l_(s_(e,n),t),!0,n)},mA=function(e,t){return aF(l_(s_(e),t),!1)},r1e=function(e,t){return l_(n1e(e),t)},Dv=function(e,t){return e.shadowRoot?Dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Dv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},lF=function(e){return e.parentNode?lF(e.parentNode):e},u_=function(e){var t=GC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(VC);return n.push.apply(n,i?i1e($l(lF(r).querySelectorAll("[".concat(VC,'="').concat(i,'"]:not([').concat(VB,'="disabled"])')))):[r]),n},[])},uF=function(e){return e.activeElement?e.activeElement.shadowRoot?uF(e.activeElement.shadowRoot):e.activeElement:void 0},c_=function(){return document.activeElement?document.activeElement.shadowRoot?uF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},cF=function(e){var t=document&&c_();return!t||t.dataset&&t.dataset.focusGuard?!1:u_(e).some(function(n){return Dv(n,t)||a1e(n)})},s1e=function(){var e=document&&c_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Dv(t,e)}):!1},l1e=function(e,t){return t.filter(oF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},d_=function(e,t){return oF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(d_(n,e))}),e.filter(function(n){return t.has(n)})},vA=function(e){return e[0]&&e.length>1?d_(e[0],e):e[0]},yA=function(e,t){return e.length>1?e.indexOf(d_(e[t],e)):t},dF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=o_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),y=u1e(t),w=n!==void 0?y.indexOf(n):-1,E=w-(r?y.indexOf(r):l),P=yA(e,0),k=yA(e,i-1);if(l===-1||h===-1)return dF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=rF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=gA(r.filter(d1e(n)));return i&&i.length?vA(i):vA(gA(t))},YC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&YC(e.parentNode.host||e.parentNode,t),t},uw=function(e,t){for(var n=YC(e),r=YC(t),i=0;i=0)return o}return!1},fF=function(e,t,n){var r=GC(e),i=GC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=uw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=uw(o,l);u&&(!a||Dv(u,a)?a=u:a=uw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&c_(),r=u_(e).filter(i4),i=fF(n||e,e,r),o=new Map,a=mA(r,o),s=jC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=mA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===dF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=u_(e).filter(i4),n=fF(e,e,t),r=new Map,i=jC([n],r,!0),o=jC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:o_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},cw=0,dw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!dw&&r){if(cw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),dw=!0,setTimeout(function(){dw=!1},1);return}cw++,v1e(r.node,n.focusOptions),cw--}};const hF=y1e;function pF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,zv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function SA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(zv):zv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(cF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=hF(g,r0,{focusOptions:l}),A0={})),zv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),y=v.map(function(w){var E=w.node;return E}).indexOf(m);y>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),SA(y,v.length,1,v),SA(y,-1,-1,v))}}}return t},gF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},f_=function(){return pF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},mF=function(){zv="just",setTimeout(function(){zv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",gF),document.addEventListener("focusout",f_),window.addEventListener("blur",mF)},I1e=function(){document.removeEventListener("focusin",gF),document.removeEventListener("focusout",f_),window.removeEventListener("blur",mF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),pF(o4)):(I1e(),r0=null)}KB.assignSyncMedium(L1e);XB.assignMedium(f_);W0e.assignMedium(function(e){return e({moveFocusInside:hF,focusInside:cF})});const N1e=G0e(R1e,O1e)(A1e);var vF=C.exports.forwardRef(function(t,n){return x(ZB,{sideCar:N1e,ref:n,...t})}),yF=ZB.propTypes||{};yF.sideCar;t_(yF,["sideCar"]);vF.propTypes={};const D1e=vF;var SF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&_B(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};SF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",bF=YB(),fw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:fw,onWheelCapture:fw,onTouchMoveCapture:fw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Dz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=UB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:bF,removeScrollBar:u,shards:g,noIsolation:v,inert:y,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},hw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[hw(n),hw(r),hw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=xF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(z1e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -404,10 +404,10 @@ Error generating stack: `+o.message+` body { `).concat(B1e,": ").concat(s,`px; } -`)},X1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Y1e(i)},[i]);return x(q1e,{styles:K1e(o,!t,i,n?"":"!important")})},YC=!1;if(typeof window<"u")try{var Yy=Object.defineProperty({},"passive",{get:function(){return YC=!0,!0}});window.addEventListener("test",Yy,Yy),window.removeEventListener("test",Yy,Yy)}catch{YC=!1}var Mp=YC?{passive:!1}:!1,Z1e=function(e){return e.tagName==="TEXTAREA"},wF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z1e(e)&&n[t]==="visible")},Q1e=function(e){return wF(e,"overflowY")},J1e=function(e){return wF(e,"overflowX")},bA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=CF(e,n);if(r){var i=_F(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ege=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},CF=function(e,t){return e==="v"?Q1e(t):J1e(t)},_F=function(e,t){return e==="v"?ege(t):tge(t)},nge=function(e,t){return e==="h"&&t==="rtl"?-1:1},rge=function(e,t,n,r,i){var o=nge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=_F(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&CF(e,s)&&(g+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xA=function(e){return[e.deltaX,e.deltaY]},wA=function(e){return e&&"current"in e?e.current:e},ige=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oge=function(e){return` +`)},X1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Y1e(i)},[i]);return x(q1e,{styles:K1e(o,!t,i,n?"":"!important")})},qC=!1;if(typeof window<"u")try{var Yy=Object.defineProperty({},"passive",{get:function(){return qC=!0,!0}});window.addEventListener("test",Yy,Yy),window.removeEventListener("test",Yy,Yy)}catch{qC=!1}var Mp=qC?{passive:!1}:!1,Z1e=function(e){return e.tagName==="TEXTAREA"},wF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z1e(e)&&n[t]==="visible")},Q1e=function(e){return wF(e,"overflowY")},J1e=function(e){return wF(e,"overflowX")},bA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=CF(e,n);if(r){var i=_F(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ege=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},CF=function(e,t){return e==="v"?Q1e(t):J1e(t)},_F=function(e,t){return e==="v"?ege(t):tge(t)},nge=function(e,t){return e==="h"&&t==="rtl"?-1:1},rge=function(e,t,n,r,i){var o=nge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=_F(e,s),y=v[0],w=v[1],E=v[2],P=w-E-o*y;(y||P)&&CF(e,s)&&(g+=P,m+=y),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xA=function(e){return[e.deltaX,e.deltaY]},wA=function(e){return e&&"current"in e?e.current:e},ige=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oge=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},age=0,Ip=[];function sge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(age++)[0],o=C.exports.useState(function(){return xF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=MC([e.lockRef.current],(e.shards||[]).map(wA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=qy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,O=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=bA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=bA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?xA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(wA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,xA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,S=e.inert;return ee(Ln,{children:[S?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(bF,sge);var kF=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});kF.classNames=RS.classNames;const EF=kF;var Sh=(...e)=>e.filter(Boolean).join(" ");function fm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},qC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&qC.add(e),()=>{qC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:fm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!qC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:fm(z.onClick,O),onKeyDown:fm(z.onKeyDown,E),onMouseDown:fm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return $B(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:S,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var zv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});zv.displayName="ModalBody";var f_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:fm(n,l=>{l.stopPropagation(),o()}),...i})});f_.displayName="ModalCloseButton";function PF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=k8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(SF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(EF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...RC,custom:{offsetY:16,reverse:!0}},slideInRight:{...RC,custom:{offsetX:16,reverse:!0}},scale:{...Fz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],TF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});TF.displayName="ModalTransition";var Bv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(PF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(TF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Bv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:Bz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function LF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var AF=Ee((e,t)=>x(Bv,{ref:t,role:"alertdialog",...e})),[bTe,bge]=_n(),xge=be($z),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(PF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var MF=(...e)=>e.filter(Boolean).join(" "),hw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function CA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,_A=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},_A)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},_A)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ut=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ut,mt);CA(Je,"disabled",Pe.stop,Pe.isSpinning),CA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ut(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ut,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ut(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":hw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":hw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,h_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),p_=Ee(function(t,n){const r=Ri("NumberInput",t),i=yn(t),o=z8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:MF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});p_.displayName="NumberInput";var IF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});IF.displayName="NumberInputStepper";var g_=Ee(function(t,n){const{getInputProps:r}=h_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:MF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});g_.displayName="NumberInputField";var RF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),m_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=h_(),o=i(t,n);return x(RF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});m_.displayName="NumberDecrementStepper";var v_=Ee(function(t,n){const{getIncrementButtonProps:r}=h_(),i=r(t,n),o=DS();return x(RF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});v_.displayName="NumberIncrementStepper";var u2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,c2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=NB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=OB({...w,enabled:E||!!S}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=DB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=kA(St),wt=pw(O.current,Yt),Gt=pw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ut=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=kA(St),wt=!pw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ut,getHeaderProps:mt,getBodyProps:Pe}}function pw(e,t){return e===t||e?.contains(t)}function kA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function y_(e){const t=Ri("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}y_.displayName="Popover";function S_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=c2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:u2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}S_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=c2();return ae.createElement(be.div,{...r(t,n),className:u2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=c2();return x(AS,{size:"sm",onClick:r,className:u2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),OF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});OF.displayName="PopoverTransition";var b_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=c2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(OF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:u2("chakra-popover__content",t.className),__css:h}))});b_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=c2();return ae.createElement(be.header,{...r(t,n),className:u2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function x_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}x_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function NF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var DF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};DF.displayName="Shape";var KC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});KC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=NF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ee(DF,{size:n,isIndeterminate:v,children:[x(KC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(KC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=NF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),zF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:S,...w}=yn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});zF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var BF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});BF.displayName="SelectField";var FF=Ee((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...S}=yn(e),[w,E]=ime(S,kQ),P=D8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(BF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x($F,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});FF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),$F=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};$F.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function HF(e){return!!e.touches}function ume(e){return HF(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function WF(e,t="page"){return HF(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:WF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function VF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:WF(e)},{timestamp:i}=nT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,gw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=gw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=nT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=gw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function EA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gw(e,t){return{point:e.point,delta:EA(e.point,t[t.length-1]),offset:EA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function mw(e,t){return Math.abs(e-t)}function PA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return mw(e,t);if(PA(e)&&PA(t)){const n=mw(e.x,t.x),r=mw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function UF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=VF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function GF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=GF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function hm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function jF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...hm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...hm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...hm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),S={...l,...hm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function YF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=YF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*S,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=GF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ut=C.exports.useId(),Pe=Pme(u??ut),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Xz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=S||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(BC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>jF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};UF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...hm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,w_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),qF=Ee(function(t,n){const r=Ri("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});qF.defaultProps={orientation:"horizontal"};qF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=w_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=w_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=YF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=S||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=VF({min:t,max:n,step:S,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ut=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Xz(Qt,un.min,un.max);return un.step&&(er=parseFloat(BC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(BC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return jF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ut(ze);ot!=null&&ot!==Se.current.value&&j(ot)}UF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),C_=Ee((e,t)=>{const n=Ri("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});C_.defaultProps={orientation:"horizontal"};C_.displayName="Slider";var KF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});KF.displayName="SliderThumb";var XF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});XF.displayName="SliderTrack";var ZF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});ZF.displayName="SliderFilledTrack";var XC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});XC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,__=Ee(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=qz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":TA(s.isChecked),"data-hover":TA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:S},o))});__.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function ZC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,QF,Vme,Ume]=lD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const S=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[jme,d2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=d2(),i=QF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ZC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=d2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:ZC(e.onClick,m)}),w="button";return{...S,id:JF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":e$(a,u),onFocus:t?void 0:ZC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=d2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:e$(n,s),tabId:JF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=d2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=DB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=d2(),t=QF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function JF(e,t){return`${e}--tab-${t}`}function e$(e,t){return`${e}--tabpanel-${t}`}var[eve,f2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),t$=Ee(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});t$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=f2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...f2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var n$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=f2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});n$.displayName="TabPanel";var r$=Ee(function(t,n){const r=Zme(t),i=f2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});r$.displayName="TabPanels";var i$=Ee(function(t,n){const r=f2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});i$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],o$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=D8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});o$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function QC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function LA(e,t){const n=a$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function a$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=LA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:s$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=a$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(LA(Sl.getState(),i).position)}}var AA=0;function pve(e,t={}){AA+=1;const n=t.id??AA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Uz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Gz,{id:u?.title,children:i}),s&&x(Vz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function s$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=s$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...QC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...QC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function h2(e){const{theme:t}=oD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},l$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},QC(n,{id:t,onClose:E})))});l$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=l$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Xg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},JC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=NB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=OB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=JC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ut=JC(K);ce.current=ut.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ut={},mt=null)=>({...ut,ref:Wn(K,mt,$),onPointerEnter:Xg(ut.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Xg(ut.onClick,_e),onPointerDown:Xg(ut.onPointerDown,Je),onFocus:Xg(ut.onFocus,Se),onBlur:Xg(ut.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ut={},mt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,S,w]),pt=C.exports.useCallback((ut={},mt=null)=>{const Pe={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ut,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var vw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(vw,t),()=>n.removeEventListener(vw,t)},[t,e]),()=>{const n=a4(e),r=JC(e);n.dispatchEvent(new r.CustomEvent(vw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(vB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(lN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(zB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:k_(e)?2:E_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function u$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function c$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function k_(e){return Rve&&e instanceof Map}function E_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function P_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=f$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return T_(r,!0)},!0)),e}function Tve(){xs(2)}function L_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=r7[e];return t||xs(18,e),t}function Lve(e,t){r7[e]||(r7[e]=t)}function e7(){return Fv}function yw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){t7(e),e.p.forEach(Ave),e.p=null}function t7(e){e===Fv&&(Fv=e.l)}function MA(e){return Fv={p:[],l:Fv,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function Sw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==d$?e:void 0}function l4(e,t,n){if(L_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return IA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=P_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return IA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function IA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(u$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!L_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&T_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function RA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function xw(e){e.o||(e.o=P_(e.t))}function n7(e,t,n){var r=k_(t)?Ll("MapSet").N(t,n):E_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:e7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=$v;a&&(l=[s],u=pm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:e7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=OA(n,o),i.I=!1}else r=OA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||u$(r,a,t(s))}),o===3?new Set(r):r}(e)}function OA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return P_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return $v.get(l,o)},set:function(l){var u=this[rr];$v.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!c$(m,g))return!0}}var S=!!a[rr];return l.length!==O0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,h$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(M_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function p$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=bA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=bA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?xA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(wA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,xA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,y=e.inert;return ee(Ln,{children:[y?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(bF,sge);var kF=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});kF.classNames=RS.classNames;const EF=kF;var Sh=(...e)=>e.filter(Boolean).join(" ");function hm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},KC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&KC.add(e),()=>{KC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const y=C.exports.useRef(null),w=C.exports.useCallback(z=>{y.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:hm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),y.current===z.target&&(!KC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:hm(z.onClick,O),onKeyDown:hm(z.onKeyDown,E),onMouseDown:hm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return $B(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,y=Ri("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:y,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var Bv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});Bv.displayName="ModalBody";var h_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:hm(n,l=>{l.stopPropagation(),o()}),...i})});h_.displayName="ModalCloseButton";function PF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=E8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(SF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(EF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...OC,custom:{offsetY:16,reverse:!0}},slideInRight:{...OC,custom:{offsetX:16,reverse:!0}},scale:{...Fz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],TF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});TF.displayName="ModalTransition";var Fv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(PF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y},x(TF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Fv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:Bz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function LF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var AF=Ee((e,t)=>x(Fv,{ref:t,role:"alertdialog",...e})),[CTe,bge]=_n(),xge=be($z),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(PF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:y,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var MF=(...e)=>e.filter(Boolean).join(" "),pw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function CA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,_A=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},_A)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},_A)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:y,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ct=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ct,mt);CA(Je,"disabled",Pe.stop,Pe.isSpinning),CA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ct(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ct,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ct(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":pw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":pw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:y,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":pw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,y,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,p_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),g_=Ee(function(t,n){const r=Ri("NumberInput",t),i=yn(t),o=B8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:MF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});g_.displayName="NumberInput";var IF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});IF.displayName="NumberInputStepper";var m_=Ee(function(t,n){const{getInputProps:r}=p_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:MF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});m_.displayName="NumberInputField";var RF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),v_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=p_(),o=i(t,n);return x(RF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});v_.displayName="NumberDecrementStepper";var y_=Ee(function(t,n){const{getIncrementButtonProps:r}=p_(),i=r(t,n),o=DS();return x(RF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});y_.displayName="NumberIncrementStepper";var c2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,d2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:y,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=NB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=OB({...w,enabled:E||!!y}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=DB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=kA(St),wt=gw(O.current,Yt),Gt=gw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ct=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=kA(St),wt=!gw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ct,getHeaderProps:mt,getBodyProps:Pe}}function gw(e,t){return e===t||e?.contains(t)}function kA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function S_(e){const t=Ri("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}S_.displayName="Popover";function b_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=d2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:c2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}b_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=d2();return ae.createElement(be.div,{...r(t,n),className:c2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=d2();return x(AS,{size:"sm",onClick:r,className:c2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),OF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});OF.displayName="PopoverTransition";var x_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=d2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(OF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:c2("chakra-popover__content",t.className),__css:h}))});x_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=d2();return ae.createElement(be.header,{...r(t,n),className:c2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function w_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}w_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function NF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var DF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};DF.displayName="Shape";var XC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});XC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...y}=e,w=NF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...y,__css:T},ee(DF,{size:n,isIndeterminate:v,children:[x(XC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(XC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=NF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),zF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:y,...w}=yn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:y}),l]}))});zF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var BF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});BF.displayName="SelectField";var FF=Ee((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...y}=yn(e),[w,E]=ime(y,kQ),P=z8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(BF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x($F,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});FF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),$F=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};$F.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function HF(e){return!!e.touches}function ume(e){return HF(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function WF(e,t="page"){return HF(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:WF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function VF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:WF(e)},{timestamp:i}=nT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,mw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=mw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=nT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=mw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function EA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mw(e,t){return{point:e.point,delta:EA(e.point,t[t.length-1]),offset:EA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function vw(e,t){return Math.abs(e-t)}function PA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return vw(e,t);if(PA(e)&&PA(t)){const n=vw(e.x,t.x),r=vw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function UF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=VF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function GF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=GF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function pm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function jF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...pm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...pm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...pm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),y={...l,...pm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:y,rootStyle:s,getThumbStyle:o}}function YF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=YF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*y,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=GF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ct=C.exports.useId(),Pe=Pme(u??ct),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Xz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=y||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(FC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>jF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};UF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...pm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,C_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),qF=Ee(function(t,n){const r=Ri("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});qF.defaultProps={orientation:"horizontal"};qF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=C_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=C_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=C_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=YF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=y||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=VF({min:t,max:n,step:y,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ct=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Xz(Qt,un.min,un.max);return un.step&&(er=parseFloat(FC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(FC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return jF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ct(ze);ot!=null&&ot!==Se.current.value&&j(ot)}UF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),__=Ee((e,t)=>{const n=Ri("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});__.defaultProps={orientation:"horizontal"};__.displayName="Slider";var KF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});KF.displayName="SliderThumb";var XF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});XF.displayName="SliderTrack";var ZF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});ZF.displayName="SliderFilledTrack";var ZC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});ZC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,k_=Ee(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=qz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":TA(s.isChecked),"data-hover":TA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:y},o))});k_.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function QC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,QF,Vme,Ume]=lD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const y=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:y,direction:l,htmlProps:u}}var[jme,f2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=f2(),i=QF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[y]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:QC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=f2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},y=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:QC(e.onClick,m)}),w="button";return{...y,id:JF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":e$(a,u),onFocus:t?void 0:QC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=f2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:e$(n,s),tabId:JF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=f2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=DB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=f2(),t=QF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function JF(e,t){return`${e}--tab-${t}`}function e$(e,t){return`${e}--tabpanel-${t}`}var[eve,h2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),t$=Ee(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});t$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=h2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...h2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var n$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=h2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});n$.displayName="TabPanel";var r$=Ee(function(t,n){const r=Zme(t),i=h2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});r$.displayName="TabPanels";var i$=Ee(function(t,n){const r=h2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});i$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],o$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=z8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});o$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function JC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function LA(e,t){const n=a$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function a$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=LA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:s$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=a$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(LA(Sl.getState(),i).position)}}var AA=0;function pve(e,t={}){AA+=1;const n=t.id??AA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Uz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Gz,{id:u?.title,children:i}),s&&x(Vz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function s$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=s$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...JC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...JC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function p2(e){const{theme:t}=oD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},l$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const y=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:y,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},JC(n,{id:t,onClose:E})))});l$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=l$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Zg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},e7=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:y=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=NB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=OB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ct=e7(K);G.current=ct.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ct=e7(K);ce.current=ct.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ct=>{N&&ct.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ct={},mt=null)=>({...ct,ref:Wn(K,mt,$),onPointerEnter:Zg(ct.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Zg(ct.onClick,_e),onPointerDown:Zg(ct.onPointerDown,Je),onFocus:Zg(ct.onFocus,Se),onBlur:Zg(ct.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ct={},mt=null)=>j({...ct,style:{...ct.style,[Wr.arrowSize.var]:y?`${y}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,y,w]),pt=C.exports.useCallback((ct={},mt=null)=>{const Pe={...ct.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ct,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var yw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(yw,t),()=>n.removeEventListener(yw,t)},[t,e]),()=>{const n=a4(e),r=e7(e);n.dispatchEvent(new r.CustomEvent(yw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:y,motionProps:w,...E}=r,P=m??v??h??y;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(vB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(lN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(zB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:E_(e)?2:P_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function u$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function c$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function E_(e){return Rve&&e instanceof Map}function P_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function T_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=f$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return L_(r,!0)},!0)),e}function Tve(){xs(2)}function A_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=i7[e];return t||xs(18,e),t}function Lve(e,t){i7[e]||(i7[e]=t)}function t7(){return $v}function Sw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){n7(e),e.p.forEach(Ave),e.p=null}function n7(e){e===$v&&($v=e.l)}function MA(e){return $v={p:[],l:$v,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function bw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==d$?e:void 0}function l4(e,t,n){if(A_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return IA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=T_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return IA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function IA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(u$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!A_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&L_(t,n)}function xw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function RA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function ww(e){e.o||(e.o=T_(e.t))}function r7(e,t,n){var r=E_(t)?Ll("MapSet").N(t,n):P_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:t7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Hv;a&&(l=[s],u=gm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:t7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=OA(n,o),i.I=!1}else r=OA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||u$(r,a,t(s))}),o===3?new Set(r):r}(e)}function OA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return T_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Hv.get(l,o)},set:function(l){var u=this[rr];Hv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!c$(m,g))return!0}}var y=!!a[rr];return l.length!==O0(a).length+(y?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,h$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(I_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function p$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k2e:_2e;S$.useSyncExternalStore=r1.useSyncExternalStore!==void 0?r1.useSyncExternalStore:E2e;(function(e){e.exports=S$})(y$);var b$={exports:{}},x$={};/** + */var r1=C.exports;function y2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S2e=typeof Object.is=="function"?Object.is:y2e,b2e=r1.useState,x2e=r1.useEffect,w2e=r1.useLayoutEffect,C2e=r1.useDebugValue;function _2e(e,t){var n=t(),r=b2e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return w2e(function(){i.value=n,i.getSnapshot=t,Ew(i)&&o({inst:i})},[e,n,t]),x2e(function(){return Ew(i)&&o({inst:i}),e(function(){Ew(i)&&o({inst:i})})},[e]),C2e(n),n}function Ew(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!S2e(e,n)}catch{return!0}}function k2e(e,t){return t()}var E2e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k2e:_2e;S$.useSyncExternalStore=r1.useSyncExternalStore!==void 0?r1.useSyncExternalStore:E2e;(function(e){e.exports=S$})(y$);var b$={exports:{}},x$={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -423,7 +423,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var HS=C.exports,P2e=y$.exports;function T2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var L2e=typeof Object.is=="function"?Object.is:T2e,A2e=P2e.useSyncExternalStore,M2e=HS.useRef,I2e=HS.useEffect,R2e=HS.useMemo,O2e=HS.useDebugValue;x$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=M2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=R2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return g=S}return g=v}if(S=g,L2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=A2e(e,o[0],o[1]);return I2e(function(){a.hasValue=!0,a.value=s},[s]),O2e(s),s};(function(e){e.exports=x$})(b$);function N2e(e){e()}let w$=N2e;const D2e=e=>w$=e,z2e=()=>w$,fd=C.exports.createContext(null);function C$(){return C.exports.useContext(fd)}const B2e=()=>{throw new Error("uSES not initialized!")};let _$=B2e;const F2e=e=>{_$=e},$2e=(e,t)=>e===t;function H2e(e=fd){const t=e===fd?C$:()=>C.exports.useContext(e);return function(r,i=$2e){const{store:o,subscription:a,getServerState:s}=t(),l=_$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const W2e=H2e();var V2e={exports:{}},In={};/** + */var HS=C.exports,P2e=y$.exports;function T2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var L2e=typeof Object.is=="function"?Object.is:T2e,A2e=P2e.useSyncExternalStore,M2e=HS.useRef,I2e=HS.useEffect,R2e=HS.useMemo,O2e=HS.useDebugValue;x$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=M2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=R2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var y=a.value;if(i(y,v))return g=y}return g=v}if(y=g,L2e(h,v))return y;var w=r(v);return i!==void 0&&i(y,w)?y:(h=v,g=w)}var u=!1,h,g,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=A2e(e,o[0],o[1]);return I2e(function(){a.hasValue=!0,a.value=s},[s]),O2e(s),s};(function(e){e.exports=x$})(b$);function N2e(e){e()}let w$=N2e;const D2e=e=>w$=e,z2e=()=>w$,fd=C.exports.createContext(null);function C$(){return C.exports.useContext(fd)}const B2e=()=>{throw new Error("uSES not initialized!")};let _$=B2e;const F2e=e=>{_$=e},$2e=(e,t)=>e===t;function H2e(e=fd){const t=e===fd?C$:()=>C.exports.useContext(e);return function(r,i=$2e){const{store:o,subscription:a,getServerState:s}=t(),l=_$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const W2e=H2e();var V2e={exports:{}},In={};/** * @license React * react-is.production.min.js * @@ -431,7 +431,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var R_=Symbol.for("react.element"),O_=Symbol.for("react.portal"),WS=Symbol.for("react.fragment"),VS=Symbol.for("react.strict_mode"),US=Symbol.for("react.profiler"),GS=Symbol.for("react.provider"),jS=Symbol.for("react.context"),U2e=Symbol.for("react.server_context"),YS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.suspense_list"),XS=Symbol.for("react.memo"),ZS=Symbol.for("react.lazy"),G2e=Symbol.for("react.offscreen"),k$;k$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case R_:switch(e=e.type,e){case WS:case US:case VS:case qS:case KS:return e;default:switch(e=e&&e.$$typeof,e){case U2e:case jS:case YS:case ZS:case XS:case GS:return e;default:return t}}case O_:return t}}}In.ContextConsumer=jS;In.ContextProvider=GS;In.Element=R_;In.ForwardRef=YS;In.Fragment=WS;In.Lazy=ZS;In.Memo=XS;In.Portal=O_;In.Profiler=US;In.StrictMode=VS;In.Suspense=qS;In.SuspenseList=KS;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===jS};In.isContextProvider=function(e){return qa(e)===GS};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===R_};In.isForwardRef=function(e){return qa(e)===YS};In.isFragment=function(e){return qa(e)===WS};In.isLazy=function(e){return qa(e)===ZS};In.isMemo=function(e){return qa(e)===XS};In.isPortal=function(e){return qa(e)===O_};In.isProfiler=function(e){return qa(e)===US};In.isStrictMode=function(e){return qa(e)===VS};In.isSuspense=function(e){return qa(e)===qS};In.isSuspenseList=function(e){return qa(e)===KS};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===WS||e===US||e===VS||e===qS||e===KS||e===G2e||typeof e=="object"&&e!==null&&(e.$$typeof===ZS||e.$$typeof===XS||e.$$typeof===GS||e.$$typeof===jS||e.$$typeof===YS||e.$$typeof===k$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(V2e);function j2e(){const e=z2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const jA={notify(){},get:()=>[]};function Y2e(e,t){let n,r=jA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=j2e())}function u(){n&&(n(),n=void 0,r.clear(),r=jA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const q2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K2e=q2e?C.exports.useLayoutEffect:C.exports.useEffect;function X2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return K2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||fd).Provider,{value:i,children:n})}function E$(e=fd){const t=e===fd?C$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Z2e=E$();function Q2e(e=fd){const t=e===fd?Z2e:E$(e);return function(){return t().dispatch}}const J2e=Q2e();F2e(b$.exports.useSyncExternalStoreWithSelector);D2e(Bl.exports.unstable_batchedUpdates);var N_="persist:",P$="persist/FLUSH",D_="persist/REHYDRATE",T$="persist/PAUSE",L$="persist/PERSIST",A$="persist/PURGE",M$="persist/REGISTER",eye=-1;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function YA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tye(e){for(var t=1;t{Object.keys(O).forEach(function(N){!T(N)||h[N]!==O[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){O[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=O},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var O=m.shift(),N=r.reduce(function(z,V){return V.in(z,O,h)},h[O]);if(N!==void 0)try{g[O]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[O];m.length===0&&k()}function k(){Object.keys(g).forEach(function(O){h[O]===void 0&&delete g[O]}),S=s.setItem(a,l(g)).catch(M)}function T(O){return!(n&&n.indexOf(O)===-1&&O!=="_persist"||t&&t.indexOf(O)!==-1)}function M(O){u&&u(O)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function oye(e){return JSON.stringify(e)}function aye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=sye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function sye(e){return JSON.parse(e)}function lye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:N_).concat(e.key);return t.removeItem(n,uye)}function uye(e){}function qA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function fye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hye=5e3;function pye(e,t){var n=e.version!==void 0?e.version:eye;e.debug;var r=e.stateReconciler===void 0?rye:e.stateReconciler,i=e.getStoredState||aye,o=e.timeout!==void 0?e.timeout:hye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,S=dye(m,["_persist"]),w=S;if(g.type===L$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=iye(e)),v)return cu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),cu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===A$)return s=!0,g.result(lye(e)),cu({},t(w,g),{_persist:v});if(g.type===P$)return g.result(a&&a.flush()),cu({},t(w,g),{_persist:v});if(g.type===T$)l=!0;else if(g.type===D_){if(s)return cu({},w,{_persist:cu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=cu({},M,{_persist:cu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,g);var O=t(w,g);return O===w?h:u(cu({},O,{_persist:v}))}}function KA(e){return vye(e)||mye(e)||gye()}function gye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function mye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function vye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:I$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case M$:return o7({},t,{registry:[].concat(KA(t.registry),[n.key])});case D_:var r=t.registry.indexOf(n.key),i=KA(t.registry);return i.splice(r,1),o7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function bye(e,t,n){var r=n||!1,i=M_(Sye,I$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:M$,key:u})},a=function(u,h,g){var m={type:D_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=o7({},i,{purge:function(){var u=[];return e.dispatch({type:A$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:P$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:T$})},persist:function(){e.dispatch({type:L$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var z_={},B_={};B_.__esModule=!0;B_.default=Cye;function Q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Q3=function(n){return typeof n}:Q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Q3(e)}function Ew(){}var xye={getItem:Ew,setItem:Ew,removeItem:Ew};function wye(e){if((typeof self>"u"?"undefined":Q3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Cye(e){var t="".concat(e,"Storage");return wye(t)?self[t]:xye}z_.__esModule=!0;z_.default=Eye;var _ye=kye(B_);function kye(e){return e&&e.__esModule?e:{default:e}}function Eye(e){var t=(0,_ye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var R$=void 0,Pye=Tye(z_);function Tye(e){return e&&e.__esModule?e:{default:e}}var Lye=(0,Pye.default)("local");R$=Lye;var O$={},N$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(F_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=F_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const S=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=S;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},R=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=R;const O=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=O;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Re=>Re===ne),K=W.filter(Re=>(ne+".").indexOf(Re+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + */var O_=Symbol.for("react.element"),N_=Symbol.for("react.portal"),WS=Symbol.for("react.fragment"),VS=Symbol.for("react.strict_mode"),US=Symbol.for("react.profiler"),GS=Symbol.for("react.provider"),jS=Symbol.for("react.context"),U2e=Symbol.for("react.server_context"),YS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.suspense_list"),XS=Symbol.for("react.memo"),ZS=Symbol.for("react.lazy"),G2e=Symbol.for("react.offscreen"),k$;k$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case O_:switch(e=e.type,e){case WS:case US:case VS:case qS:case KS:return e;default:switch(e=e&&e.$$typeof,e){case U2e:case jS:case YS:case ZS:case XS:case GS:return e;default:return t}}case N_:return t}}}In.ContextConsumer=jS;In.ContextProvider=GS;In.Element=O_;In.ForwardRef=YS;In.Fragment=WS;In.Lazy=ZS;In.Memo=XS;In.Portal=N_;In.Profiler=US;In.StrictMode=VS;In.Suspense=qS;In.SuspenseList=KS;In.isAsyncMode=function(){return!1};In.isConcurrentMode=function(){return!1};In.isContextConsumer=function(e){return qa(e)===jS};In.isContextProvider=function(e){return qa(e)===GS};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===O_};In.isForwardRef=function(e){return qa(e)===YS};In.isFragment=function(e){return qa(e)===WS};In.isLazy=function(e){return qa(e)===ZS};In.isMemo=function(e){return qa(e)===XS};In.isPortal=function(e){return qa(e)===N_};In.isProfiler=function(e){return qa(e)===US};In.isStrictMode=function(e){return qa(e)===VS};In.isSuspense=function(e){return qa(e)===qS};In.isSuspenseList=function(e){return qa(e)===KS};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===WS||e===US||e===VS||e===qS||e===KS||e===G2e||typeof e=="object"&&e!==null&&(e.$$typeof===ZS||e.$$typeof===XS||e.$$typeof===GS||e.$$typeof===jS||e.$$typeof===YS||e.$$typeof===k$||e.getModuleId!==void 0)};In.typeOf=qa;(function(e){e.exports=In})(V2e);function j2e(){const e=z2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const jA={notify(){},get:()=>[]};function Y2e(e,t){let n,r=jA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=j2e())}function u(){n&&(n(),n=void 0,r.clear(),r=jA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const q2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K2e=q2e?C.exports.useLayoutEffect:C.exports.useEffect;function X2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return K2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||fd).Provider,{value:i,children:n})}function E$(e=fd){const t=e===fd?C$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Z2e=E$();function Q2e(e=fd){const t=e===fd?Z2e:E$(e);return function(){return t().dispatch}}const J2e=Q2e();F2e(b$.exports.useSyncExternalStoreWithSelector);D2e(Bl.exports.unstable_batchedUpdates);var D_="persist:",P$="persist/FLUSH",z_="persist/REHYDRATE",T$="persist/PAUSE",L$="persist/PERSIST",A$="persist/PURGE",M$="persist/REGISTER",eye=-1;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function YA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tye(e){for(var t=1;t{Object.keys(O).forEach(function(N){!T(N)||h[N]!==O[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){O[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=O},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var O=m.shift(),N=r.reduce(function(z,V){return V.in(z,O,h)},h[O]);if(N!==void 0)try{g[O]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[O];m.length===0&&k()}function k(){Object.keys(g).forEach(function(O){h[O]===void 0&&delete g[O]}),y=s.setItem(a,l(g)).catch(M)}function T(O){return!(n&&n.indexOf(O)===-1&&O!=="_persist"||t&&t.indexOf(O)!==-1)}function M(O){u&&u(O)}var R=function(){for(;m.length!==0;)P();return y||Promise.resolve()};return{update:E,flush:R}}function oye(e){return JSON.stringify(e)}function aye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:D_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=sye,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function sye(e){return JSON.parse(e)}function lye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:D_).concat(e.key);return t.removeItem(n,uye)}function uye(e){}function qA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function fye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hye=5e3;function pye(e,t){var n=e.version!==void 0?e.version:eye;e.debug;var r=e.stateReconciler===void 0?rye:e.stateReconciler,i=e.getStoredState||aye,o=e.timeout!==void 0?e.timeout:hye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,y=dye(m,["_persist"]),w=y;if(g.type===L$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=iye(e)),v)return cu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),cu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===A$)return s=!0,g.result(lye(e)),cu({},t(w,g),{_persist:v});if(g.type===P$)return g.result(a&&a.flush()),cu({},t(w,g),{_persist:v});if(g.type===T$)l=!0;else if(g.type===z_){if(s)return cu({},w,{_persist:cu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=cu({},M,{_persist:cu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,g);var O=t(w,g);return O===w?h:u(cu({},O,{_persist:v}))}}function KA(e){return vye(e)||mye(e)||gye()}function gye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function mye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function vye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:I$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case M$:return a7({},t,{registry:[].concat(KA(t.registry),[n.key])});case z_:var r=t.registry.indexOf(n.key),i=KA(t.registry);return i.splice(r,1),a7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function bye(e,t,n){var r=n||!1,i=I_(Sye,I$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:M$,key:u})},a=function(u,h,g){var m={type:z_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=a7({},i,{purge:function(){var u=[];return e.dispatch({type:A$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:P$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:T$})},persist:function(){e.dispatch({type:L$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var B_={},F_={};F_.__esModule=!0;F_.default=Cye;function Q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Q3=function(n){return typeof n}:Q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Q3(e)}function Pw(){}var xye={getItem:Pw,setItem:Pw,removeItem:Pw};function wye(e){if((typeof self>"u"?"undefined":Q3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Cye(e){var t="".concat(e,"Storage");return wye(t)?self[t]:xye}B_.__esModule=!0;B_.default=Eye;var _ye=kye(F_);function kye(e){return e&&e.__esModule?e:{default:e}}function Eye(e){var t=(0,_ye.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var R$=void 0,Pye=Tye(B_);function Tye(e){return e&&e.__esModule?e:{default:e}}var Lye=(0,Pye.default)("local");R$=Lye;var O$={},N$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var $_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})($_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=uh,n=$_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const y=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=y;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},R=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=R;const O=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=O;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Re=>Re===ne),K=W.filter(Re=>(ne+".").indexOf(Re+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. @@ -447,17 +447,17 @@ ${JSON.stringify(ce)} ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. - ${JSON.stringify(Q)}`)};e.throwError=j;const le=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=le})(N$);(function(e){var t=Ss&&Ss.__rest||function(g,m){var v={};for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&m.indexOf(S)<0&&(v[S]=g[S]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(g,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),O=T.map(le=>Object.keys(le)[0]),N=M.map(le=>Object.keys(le)[0]),z=R.filter(le=>O.indexOf(le)===-1&&N.indexOf(le)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(le=>(0,e.createBlacklist)(le)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(O$);const J3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Aye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return $_(r)?r:!1},$_=e=>Boolean(typeof e=="string"?Aye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),p4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Mye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** + ${JSON.stringify(Q)}`)};e.throwError=j;const le=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=le})(N$);(function(e){var t=Ss&&Ss.__rest||function(g,m){var v={};for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&m.indexOf(y)<0&&(v[y]=g[y]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,y=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:y&&y[0]}},a=(g,m,v,{debug:y,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),y&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return y&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let y=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};y=(0,n.mergeDeep)(y||T,k,{preservePlaceholder:!0})}),y||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const y=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),y)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const y=Object.keys(v)[0],w=v[y];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(y,w):(0,e.createBlacklist)(y,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:y,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:y});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(y),R=Object.keys(P(void 0,{type:""})),O=T.map(le=>Object.keys(le)[0]),N=M.map(le=>Object.keys(le)[0]),z=R.filter(le=>O.indexOf(le)===-1&&N.indexOf(le)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(le=>(0,e.createBlacklist)(le)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(O$);const J3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),Aye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return H_(r)?r:!1},H_=e=>Boolean(typeof e=="string"?Aye(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),p4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Mye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ut="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,T1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,L1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,A1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,M1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,I1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,R1=/[()=,{}\[\]\/\s]/,O1=/\\(\\)?/g,N1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,D1=/^[-+]0x[0-9a-f]+$/i,z1=/^0b[01]+$/i,B1=/^\[object .+?Constructor\]$/,F1=/^0o[0-7]+$/i,$1=/^(?:0|[1-9]\d*)$/,H1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,W1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",V1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",V1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ut]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ut]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},U1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,G1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function j1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function q1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(U1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=ug,Uo.prototype.has=cg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ut||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Fk(c),!Z)return ue?Tg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),pE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):fE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function pg(c,p,b){if(typeof c!="function")throw new Si(a);return Rg(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Oi,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:mE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(rg()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Bb(Wk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var _g=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function kg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?kg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Eg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Ag(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(M1,`{ + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,y=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ct="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,L1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,A1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,M1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,I1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,R1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,O1=/[()=,{}\[\]\/\s]/,N1=/\\(\\)?/g,D1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,z1=/^[-+]0x[0-9a-f]+$/i,B1=/^0b[01]+$/i,F1=/^\[object .+?Constructor\]$/,$1=/^0o[0-7]+$/i,H1=/^(?:0|[1-9]\d*)$/,W1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,V1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",U1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",U1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ct]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ct]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},G1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,j1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function Y1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function K1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(G1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=cg,Uo.prototype.has=dg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ct||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Fk(c),!Z)return ue?Lg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),pE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):fE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function gg(c,p,b){if(typeof c!="function")throw new Si(a);return Og(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Oi,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:mE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(ig()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Fb(Wk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var kg=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function Eg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?Eg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?Eg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Pg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Mg(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(I1,`{ /* [wrapped with `+p+`] */ -`)}function PU(c){return Ot(c)||mf(c)||!!(tg&&c&&c[tg])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&$1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,eE(c,b)});function tE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return tE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=gE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=qk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[Fb],thisArg:n}),new ji(p,this.__chain__)}return this.thru(Fb)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:gg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Lg(Kk),ZG=Lg(Xk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function nE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function rE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Ab:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function iE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function oE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Hb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Hb));A|=R}return fe(c,A,p,b,D)}),aE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(aE));A|=R}return fe(p,A,c,b,D)});function sE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=lE.placeholder,A}function uE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Rg(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,TE=p-us;return Le?Kr(TE,F-au):TE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Rg(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&_g(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return _g(Z),Z=Rg(jt,p),st(ue)}return Z===n&&(Z=Rg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return pg(c,1,p)}),yj=kt(function(c,p,b){return pg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return oE(2,c)}var xj=Rb(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!eg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):vg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||Jb,Bj=co?Er(co):yg;function Fj(c){return xr(c)&&c.nodeType===1&&!Og(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Ig(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Vb(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Og(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==mt||p==Je||p==Yt}function dE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var fE=Ui?Er(Ui):Ib;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return hE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function hE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Og(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Ub=xa?Er(xa):ar;function Xj(c){return dE(c)&&c>=-G&&c<=G}var pE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=G1?Er(G1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function gE(c){if(!c)return[];if(So(c))return sy(c)?Ni(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function mE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=z1.test(c);return b||F1.test(c)?Ye(c.slice(2),b?2:8):D1.test(c)?ce:+c}function vE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Ig(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),yE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return bE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:xg(c,p)});function bE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=rg();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?CE(p):p)});function CE(c){return Yb(xn(c).toLowerCase())}function _E(c){return c=xn(c),c&&c.replace(H1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&A1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Ub(p))&&(p=qi(p),!p&&Kl(c))?as(Ni(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+Yb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?N1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` -`;c.replace(Ve,function(xt,jt,en,Qo,Zi,Jo){return en||(en=Qo),Le+=c.slice(we,Jo).replace(W1,Vs),jt&&(Z=!0,Le+=`' + +`)}function PU(c){return Ot(c)||mf(c)||!!(ng&&c&&c[ng])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&H1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,eE(c,b)});function tE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return tE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=gE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=qk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[$b],thisArg:n}),new ji(p,this.__chain__)}return this.thru($b)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:mg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Ag(Kk),ZG=Ag(Xk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function nE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function rE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Mb:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function iE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function oE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Wb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Wb));A|=R}return fe(c,A,p,b,D)}),aE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(aE));A|=R}return fe(p,A,c,b,D)});function sE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=lE.placeholder,A}function uE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Og(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,TE=p-us;return Le?Kr(TE,F-au):TE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Og(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&kg(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return kg(Z),Z=Og(jt,p),st(ue)}return Z===n&&(Z=Og(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return gg(c,1,p)}),yj=kt(function(c,p,b){return gg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return oE(2,c)}var xj=Ob(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!tg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):yg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||ex,Bj=co?Er(co):Sg;function Fj(c){return xr(c)&&c.nodeType===1&&!Ng(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Rg(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Ub(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Ng(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ct||p==mt||p==Je||p==Yt}function dE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var fE=Ui?Er(Ui):Rb;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return hE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function hE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Ng(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Gb=xa?Er(xa):ar;function Xj(c){return dE(c)&&c>=-G&&c<=G}var pE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=j1?Er(j1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function gE(c){if(!c)return[];if(So(c))return sy(c)?Ni(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function mE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=B1.test(c);return b||$1.test(c)?Ye(c.slice(2),b?2:8):z1.test(c)?ce:+c}function vE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Rg(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),yE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return bE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:wg(c,p)});function bE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=ig();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?CE(p):p)});function CE(c){return qb(xn(c).toLowerCase())}function _E(c){return c=xn(c),c&&c.replace(W1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&M1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Gb(p))&&(p=qi(p),!p&&Kl(c))?as(Ni(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+qb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?D1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` +`;c.replace(Ve,function(xt,jt,en,Qo,Zi,Jo){return en||(en=Qo),Le+=c.slice(we,Jo).replace(V1,Vs),jt&&(Z=!0,Le+=`' + __e(`+jt+`) + '`),Zi&&(ue=!0,Le+=`'; `+Zi+`; @@ -467,13 +467,13 @@ __p += '`),en&&(Le+=`' + `;var bt=tn.call(p,"variable")&&p.variable;if(!bt)Le=`with (obj) { `+Le+` } -`;else if(R1.test(bt))throw new Et(s);Le=(ue?Le.replace(Qt,""):Le).replace(er,"$1").replace(lo,"$1;"),Le="function("+(bt||"obj")+`) { +`;else if(O1.test(bt))throw new Et(s);Le=(ue?Le.replace(Qt,""):Le).replace(er,"$1").replace(lo,"$1;"),Le="function("+(bt||"obj")+`) { `+(bt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(ue?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Le+`return __p -}`;var $t=EE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Vb($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,X1(c)+1);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Ub(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&T1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),Yb=xp("toUpperCase");function kE(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):Y1(c):c.match(p)||[]}var EE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Vb(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Hb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,D$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&D$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},z$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?D$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),B$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=B$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),F$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=F$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),H_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=H_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=H_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),$$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),H$=Be((e,t)=>{var n=eb(),r=$$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),W$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=H$(),r=Xye(),i=$$(),o=W$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),W_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=W_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),V$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=W_(),i=V$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=V$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),U$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=H_(),r=y3e(),i=B$(),o=U$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case S:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=V_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),G$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=j$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[S]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=F$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),Y$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=V_(),o=G$(),a=M3e(),s=Y$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),S=!v&&r(g),w=!v&&!S&&o(g),E=!v&&!S&&!w&&s(g),P=v||S||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=H$(),r=j$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=W_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=W$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=U$(),i=x3e(),o=V3e(),a=q3e(),s=V_(),l=G$(),u=Y$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),q$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Pw(e,t=","){return typeof e=="string"?e.split(t):e}function qm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return K$(e,["input","textarea","select"])}function K$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=z$(q$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var ZA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!K$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){ZA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Pw(e,u?.splitKey).forEach(E=>{let P=qm(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){ZA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.addHotkey(qm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.removeHotkey(qm(w,u?.combinationKey)))}},[e,l,u,h]),i}z$(q$());var a7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>a7.add(qm(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=qm(t);for(let r of a7)r.keys?.every(i=>n.keys?.includes(i))&&a7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Wi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Wi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},QA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(QA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(QA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(p_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(g_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(v_,{...P,className:"invokeai__number-input-stepper-button"}),x(m_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(FF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],U_=0,G_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),j_=()=>{const e=je(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(__,{className:"invokeai__switch-root",...s})]})})};function X$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Bke(i.target.checked))})}function P5e(){const e=je(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var Z$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},JA=ae.createContext&&ae.createContext(Z$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(S?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(dB,{w:"100%",gap:2,children:[ee(C_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(XC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(XC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(XF,{className:"invokeai__slider_track",...j,children:x(ZF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(KF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(p_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(g_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(IF,{...ne,children:[x(v_,{className:"invokeai__slider-number-stepper"}),x(m_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(Y_,{}),onClick:Se,isDisabled:M,...K})]})]})}function J$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=je();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(D7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(D7(.5))}})}const N5e=()=>{const e=je(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=je(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},eH=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Dke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=je(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:U_,max:G_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const tH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(tH(U_,G_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=je(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=je(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const q_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),K_=()=>{const e=je(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(z7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(B7(a)),value:n,isInteger:!1})]})};function nH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(zke(i.target.checked))})}function X_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=je();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Ike(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(W8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=je(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!($_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=je();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n($ke(i)),isInteger:!1})}const Z_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=je(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ct(e=>e.options,e=>wb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const Q_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ct([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=je(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Ake(r)),value:t,width:J_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=je();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=je(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:J_,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const J_="auto";function ek(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},rH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Tw,setIsConnected:eM,setSocketId:xTe,setShouldConfirmOnDelete:iH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:tM,errorSeen:oH,setModelList:nM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:gm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=rH.actions,h4e=rH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ct(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(y_,{trigger:"hover",children:[x(x_,{children:x(vh,{children:e})}),ee(b_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(S_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const tk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=je();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function nk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function rM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function fH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ok=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,hH=e=>e.canvas.layerState.objects.find(g4),pH=ct([e=>e.options,e=>e.system,hH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!($_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),s7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),l7=ti("socketio/requestImages"),iM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),gH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function mH(e){const{iconButton:t=!1,...n}=e,r=je(),{isReady:i}=Ae(pH),o=Ae(_r),a=()=>{r(s7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(s7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vH(e){const{...t}=e,n=je(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ct(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=je(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(Oke(!t))}})},ak=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(mH,{}),e==="img2img"&&x(fSe,{}),x(vH,{})]})},hSe=ct([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),sk=()=>{const e=je(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(pH),i=C.exports.useRef(null),o=s=>{e(Cb(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(s7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(o$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function SH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function oM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=oM(e.className,t):e.setAttribute("class",oM(e.className&&e.className.baseVal||"",t))}const aM={disabled:!1},bH=ae.createContext(null);var xH=function(t){return t.scrollTop},mm="unmounted",Pf="exited",Tf="entering",Hp="entered",u7="exiting",Ou=function(e){r_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=mm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===mm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=u7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&xH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:mm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||aM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||aM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:u7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=e_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(bH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=bH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=mm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=u7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Lw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},lk=function(e){r_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Zg=.95,sM=30,c7=10,lM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),vm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:vm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},CH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ok(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...vm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Zg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=lM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=vm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Zg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=lM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Zg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Zg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Zg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...vm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:_H,addPointToCurrentLine:kH,clearCanvasHistory:EH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:wTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:PH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:uk,resizeCanvas:OSe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:CTe,setBoundingBoxScaleMethod:NSe,setBrushColor:Mw,setBrushSize:Iw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ck,setInpaintReplace:uM,setIsDrawing:ob,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:_Te,setIsMoveStageKeyHeld:kTe,setIsMovingBoundingBox:cM,setIsMovingStage:m4,setIsTransformingBoundingBox:Rw,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:ETe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:PTe,setShouldShowBrushPreview:TTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:LTe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:dM,setShouldSnapToGrid:fM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:ATe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:MTe,toggleTool:ITe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=CH.actions,QSe=CH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dk=e=>{const t=je(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Mke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Nke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(wH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(yH,{}):x(SH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(tk,{accordionInfo:e})]})}const fk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(fk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(rk,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Iv(),a=je(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(iH(!S.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(LF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(zv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(__,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(y_,{...o,children:[x(x_,{children:t}),ee(b_,{className:`invokeai__popover-content ${r}`,children:[i&&x(S_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ct([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=je(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=h2(),v=()=>{!u||(h&&e(pd(!1)),e(S2(u)),e(ko("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Pke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(Cb(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(ck(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(rM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(rM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:S,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(cH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(j_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(K_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(uH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(d7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Ow,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:hk,selectPrevImage:pk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Qg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=je();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:S,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(z7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(B7(M))}),S&&x(On,{label:"Prompt",labelPosition:"top",value:J3(S),onClick:()=>n(Cb(S))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(S2(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(D7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(z7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(B7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(aB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=je(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ct([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(fk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(rk,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=je(),n=h2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],vM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(vM):o.className+=vM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Nw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Nw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Nw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(g-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,S=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=mM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=mM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=gM(M,this.props.grid[0]),z=gM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(S.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(S.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function p2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...S}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Hv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(f7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(f7,An({},r,{ref:t}),n)});Hv.displayName="Slot";const f7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});f7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Hv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=p2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(S,P.collectionRef);return ae.createElement(Hv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(S,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Hv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const h7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let yM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(yM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),SM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),SM())},[g,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(h7,z),()=>document.removeEventListener(h7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SM(){const e=new CustomEvent(h7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let Dw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:bM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:bM()),Dw++,()=>{Dw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Dw--}},[])}function bM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zw="focusScope.autoFocusOnMount",Bw="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){CM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(zw,xM);s.addEventListener(zw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(zw,u),setTimeout(()=>{const P=new CustomEvent(Bw,xM);s.addEventListener(Bw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Bw,h),CM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=wM(t,e),r=wM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const CM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=Jw["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function ab(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function gk(e){return e==="y"?"height":"width"}function kM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=gk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(ab(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=kM(l,r,s),g=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=ab(a),v=gk(g),S=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,V=p7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=ab(e),i=_1(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function PM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[PM(e),t,PM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function TM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=TM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=TM(o,i.floating);return{data:{escapedOffsets:a,escaped:LM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=ab(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],S=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=p7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=p7(k,S,T)}const w=s.fn({...t,[g]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);Sz&&(S=z)}return{[g]:v,[m]:S}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function g2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function mk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sb(e){const{overflow:t,overflowX:n,overflowY:r}=g2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=g2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const AM=Math.min,Km=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function lb(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+lb(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||sb(i))&&(a=lb(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(mk(e)?e.host:null)||_d(e)}function MM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(mk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function g7(e){const t=Nu(e);let n=MM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=MM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function IM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||sb(o))&&(a=lb(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=lb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Km(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Km(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return g2(i||n).direction==="rtl"&&(s+=Km(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&sb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],sb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&mk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function RM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(g2(e).position)&&Dl(e)?g7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=RM(t,h,i);return u.top=Km(g.top,u.top),u.right=AM(g.right,u.right),u.bottom=AM(g.bottom,u.bottom),u.left=Km(g.left,u.left),u},RM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:IM,getOffsetParent:g7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,g7(n),r),floating:{...IM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>g2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&S();function S(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var m7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function v7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!v7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!v7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return m7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);v7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{S.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);m7(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);m7(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?EM({element:t.current,padding:n}).fn(i):{}:t?EM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[vk,iW]=p2(rW),[Dxe,oW]=vk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,RTe]=vk(w4),[Hxe,Wxe]=vk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:S}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ut=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ut,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[S,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):S==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=g?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Fw="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},yk="RovingFocusGroup",[y7,lW,twe]=UH(yk),[nwe,uW]=p2(yk,[twe]),[rwe,iwe]=nwe(yk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(y7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(y7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[S=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Fw,k),()=>N.removeEventListener(Fw,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(Fw,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===S),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(y7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],ub="Menu",[S7,ywe,Swe]=UH(ub),[wh,fW]=p2(ub,[Swe,iW,uW]),Sk=iW(),hW=uW(),[bwe,cb]=wh(ub),[xwe,bk]=wh(ub),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=Sk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Sk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[OTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=cb(id,e.__scopeMenu),a=bk(id,e.__scopeMenu);return C.exports.createElement(S7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(S7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return $B(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=cb(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...S}=e,w=cb(id,n),E=bk(id,n),P=Sk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?EF:C.exports.Fragment,ne=v?{as:Hv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Kn(S.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,x7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),b7="MenuItem",OM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=bk(b7,e.__scopeMenu),s=pW(b7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(OM,{bubbles:!0,cancelable:!0});g.addEventListener(OM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(b7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(S7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,x7(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,x7(S=>a.onItemLeave(S))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function x7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,NTe]=p2(mW,[fW]),db=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=db(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=db(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=db(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=db(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ct([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ct([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,o6e=C.exports.memo(e=>{const t=je(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[S,w]=C.exports.useState(!1),E=h2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(Cb(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(S2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(ck(l)),t(uk()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Tke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Eke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:$=>{t(DH($))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:nk,className:"hoverable-image-check"})}),S&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(d7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(d7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},i6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(Kz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,NM=40,a6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},DM=400;function yW(){const e=je(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:DM,galleryMaxWidth:DM}:a6e[u],[R,O]=C.exports.useState(S>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{S>=o3&&O(!1)},[S]);const Q=()=>{e(lbe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(l7(n))},X=xe=>{e(Qg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(pk())},{enabled:!E},[E]),lt("right",()=>{e(hk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Qg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Qg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(wH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(S)+_e.width,T,Number(M)):Number(S)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(S)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-NM&&e(Qg(Je-NM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ik,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Qg(64)),icon:x(Y_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(yH,{}):x(SH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(o6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(aH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const s6e=ct([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),xk=e=>{const t=je(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ae(s6e),l=()=>{t(Fke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(wbe,{})})})]}),!a&&x(yW,{})]})})};function l6e(){return x(xk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function u6e(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(j_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(K_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(tk,{accordionInfo:e})]})}const c6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function d6e(){return x(xk,{optionsPanel:x(u6e,{}),children:x(c6e,{})})}var w7=function(e,t){return w7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},w7(e,t)};function f6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");w7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=T6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var S=s+h*v,w=l+g*v,E=u+m*v;o(S,w,E)})}}function T6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function L6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var A6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},wk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=L6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=A6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=wk(e,t);return e.bounds=n,n};function fb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=C7(e,s-g,u+g,r),S=C7(t,l-m,h+m,r);return{x:v,y:S}}var C7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function hb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=fb(g,m,i,o,0,0,null);return v}function m2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var BM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=pb(o,n);return!l},FM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},M6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},I6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function R6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=hb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function O6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,S=!m||!v;if(!(!a||S||!s)){var w=fb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var N6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},D6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function B6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function $M(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:C7(e,o,a,i)}function F6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function $6e(e,t){var n=D6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=F6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,S=l-i,w=h*h+g*g,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function H6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,O=S.velocityAlignmentTime,N=O,z=B6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[S.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ut=$M(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=$M(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ut,mt)})}}function HM(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?I6e(e,t):M6e(e,t)}function WM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=N6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);$6e(e,{x:u,y:h}),O6e(e,u,h,g,m)}}function W6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?H6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=Ck(e,a,v,S);w&&kd(e,w,h,g)}}function Ck(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=m2(za(t,2),o,a,0,!1),u=o1(e,l),h=hb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},V6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),Jg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},VM=function(e){var t=Al({},Jg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Jg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Jg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},Jg[n]),e[n]):s?t[n]=zM(zM([],Jg[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=m2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,S=kW(e,t,n),w=Ck(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=wk(e,a.scale),m=fb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function U6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=G6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=m2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=wk(e,E),O=fb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function G6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function j6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var Y6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},q6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},K6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},X6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},Z6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},Q6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&j6e(a)&&a&&o.contains(a)){var s=U6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:Y6e(e),zoomOut:q6e(e),setTransform:K6e(e),resetTransform:X6e(e),centerView:Z6e(e),zoomToElement:Q6e(e)}},$w=!1;function Hw(){try{var e={get passive(){return $w=!0,!1}};return e}catch{return $w=!1,$w}}var pb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},UM=function(e){e&&clearTimeout(e)},J6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},eCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=pb(u,a);return!g};function tCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=h6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var nCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=m2(za(v,3),u,l,g,S);return w},rCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},iCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=pb(a,i);return!l},oCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},aCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},sCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return m2(za(g,2),a,o,l,!u)},lCe=160,uCe=100,cCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},dCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=tCe(t,null),P=nCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=S||v===0||h,R=u&&M,O=hb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},fCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;UM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},uCe);var o=rCe(e,t);o&&(UM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},lCe))},hCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},pCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=aCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=sCe(e,m);if(v!==i){var S=o1(e,v),w=u||h===0||s,E=a&&w,P=hb(e,g.x,g.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},gCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function mCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var vCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=pb(l,s);return!(g||!h)},MW=ae.createContext(V6e),yCe=function(e){f6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=VM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Hw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=eCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(cCe(n,r),dCe(n,r),fCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),HM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=FM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),WM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(W6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=iCe(n,r);!l||(hCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=oCe(n);!l||(r.preventDefault(),r.stopPropagation(),pCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(gCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),HM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=FM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];WM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=vCe(n,r);!o||mCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=J6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Hw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Hw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=VM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),SCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(yCe,{...Al({},e,{setRef:i})})});function bCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var xCe=`.transform-component-module_wrapper__1_Fgj { +}`;var $t=EE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Ub($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,Z1(c)+1);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Gb(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&L1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),qb=xp("toUpperCase");function kE(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):q1(c):c.match(p)||[]}var EE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Ub(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Wb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,D$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&D$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},z$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?D$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),B$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=B$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),F$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=F$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),W_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=W_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=W_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),$$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),H$=Be((e,t)=>{var n=eb(),r=$$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),W$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=H$(),r=Xye(),i=$$(),o=W$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(y){if(!i(y)||r(y))return!1;var w=n(y)?m:s;return w.test(o(y))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),V_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=V_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),V$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=V_(),i=V$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=V$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),U$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var y=h&o,w=l.length,E=u.length;if(w!=E&&!(y&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=W_(),r=y3e(),i=B$(),o=U$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",y="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case y:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=U_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),G$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=j$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",y="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[y]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=F$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),Y$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=U_(),o=G$(),a=M3e(),s=Y$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),y=!v&&r(g),w=!v&&!y&&o(g),E=!v&&!y&&!w&&s(g),P=v||y||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=H$(),r=j$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,y=n(s),w=y.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=y[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=V_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=W$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",y="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=y||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return y;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=U$(),i=x3e(),o=V3e(),a=q3e(),s=U_(),l=G$(),u=Y$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",y=Object.prototype,w=y.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),q$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Tw(e,t=","){return typeof e=="string"?e.split(t):e}function Km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return K$(e,["input","textarea","select"])}function K$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:y}=e,w=y.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=z$(q$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var ZA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!K$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){ZA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Tw(e,u?.splitKey).forEach(E=>{let P=Km(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){ZA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},y=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",y),(i.current||document).addEventListener("keydown",v),g&&Tw(e,u?.splitKey).forEach(w=>g.addHotkey(Km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",y),(i.current||document).removeEventListener("keydown",v),g&&Tw(e,u?.splitKey).forEach(w=>g.removeHotkey(Km(w,u?.combinationKey)))}},[e,l,u,h]),i}z$(q$());var s7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>s7.add(Km(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Km(t);for(let r of s7)r.keys?.every(i=>n.keys?.includes(i))&&s7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Wi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Wi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},QA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:y,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(QA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(QA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...y,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(g_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(m_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(y_,{...P,className:"invokeai__number-input-stepper-button"}),x(v_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(FF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],G_=0,j_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ut(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ut(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=je(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(k_,{className:"invokeai__switch-root",...s})]})})};function X$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Hke(i.target.checked))})}function P5e(){const e=je(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var Z$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},JA=ae.createContext&&ae.createContext(Z$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:y=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(y?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(dB,{w:"100%",gap:2,children:[ee(__,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(ZC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(ZC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(XF,{className:"invokeai__slider_track",...j,children:x(ZF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(KF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(g_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(m_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(IF,{...ne,children:[x(y_,{className:"invokeai__slider-number-stepper"}),x(v_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(q_,{}),onClick:Se,isDisabled:M,...K})]})]})}function J$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=je();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(z7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(z7(.5))}})}const N5e=()=>{const e=je(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=je(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},eH=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Fke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=je(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:G_,max:j_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const tH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(tH(G_,j_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=je(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=je(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const K_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ut(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ut(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),X_=()=>{const e=je(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(B7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(F7(a)),value:n,isInteger:!1})]})};function nH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n($ke(i.target.checked))})}function Z_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=je();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Nke(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(V8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=je(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!(H_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=je();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Vke(i)),isInteger:!1})}const Q_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=je(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ut(e=>e.options,e=>Cb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ut(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const J_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ut([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=je(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Rke(r)),value:t,width:ek,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=je();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=je(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const ek="auto";function tk(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},rH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Lw,setIsConnected:eM,setSocketId:_Te,setShouldConfirmOnDelete:iH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:tM,errorSeen:oH,setModelList:nM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:mm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=rH.actions,h4e=rH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ut(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(S_,{trigger:"hover",children:[x(w_,{children:x(vh,{children:e})}),ee(x_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(b_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const nk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=je();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function rM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function fH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ok(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ak=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,hH=e=>e.canvas.layerState.objects.find(g4),pH=ut([e=>e.options,e=>e.system,hH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(H_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),l7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),u7=ti("socketio/requestImages"),iM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),gH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function mH(e){const{iconButton:t=!1,...n}=e,r=je(),{isReady:i}=Ae(pH),o=Ae(_r),a=()=>{r(l7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(l7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vH(e){const{...t}=e,n=je(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ut(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=je(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(zke(!t))}})},sk=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(mH,{}),e==="img2img"&&x(fSe,{}),x(vH,{})]})},hSe=ut([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),lk=()=>{const e=je(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(pH),i=C.exports.useRef(null),o=s=>{e(_b(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(l7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(o$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function SH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function oM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=oM(e.className,t):e.setAttribute("class",oM(e.className&&e.className.baseVal||"",t))}const aM={disabled:!1},bH=ae.createContext(null);var xH=function(t){return t.scrollTop},vm="unmounted",Pf="exited",Tf="entering",Hp="entered",c7="exiting",Ou=function(e){i_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=vm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===vm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=c7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&xH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:vm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||aM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||aM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:c7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=t_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(bH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=bH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=vm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=c7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Aw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},uk=function(e){i_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Qg=.95,sM=30,d7=10,lM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),ym={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:ym,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},CH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ak(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...ym,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Qg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=lM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...ym.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=ym,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Qg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=lM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Qg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Qg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Qg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...ym.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:_H,addPointToCurrentLine:kH,clearCanvasHistory:EH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:kTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:PH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:ck,resizeCanvas:OSe,setBoundingBoxCoordinates:Mw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:ETe,setBoundingBoxScaleMethod:NSe,setBrushColor:Iw,setBrushSize:Rw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ob,setInpaintReplace:uM,setIsDrawing:ab,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:PTe,setIsMoveStageKeyHeld:TTe,setIsMovingBoundingBox:cM,setIsMovingStage:m4,setIsTransformingBoundingBox:Ow,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:LTe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:ATe,setShouldShowBrushPreview:MTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:ITe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:dM,setShouldSnapToGrid:fM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:RTe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:OTe,toggleTool:NTe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=CH.actions,QSe=CH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ut(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dk=e=>{const t=je(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Oke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Dke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Bke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(y){o.current&&!o.current.contains(y.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(wH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(yH,{}):x(SH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(Y_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(X_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(nk,{accordionInfo:e})]})}const fk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(fk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(ik,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ut(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Rv(),a=je(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=y=>{y.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=y=>a(iH(!y.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(LF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Bv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(k_,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(S_,{...o,children:[x(w_,{children:t}),ee(x_,{className:`invokeai__popover-content ${r}`,children:[i&&x(b_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ut([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=je(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=p2(),v=()=>{!u||(h&&e(pd(!1)),e(P1(u)),e(ko("img2img")))},y=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Ake(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(_b(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(ob(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(rM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(rM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:y,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(cH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Y_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(X_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(uH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(f7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Nw,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:hk,selectPrevImage:pk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Jg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=je();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:y,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(B7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(F7(M))}),y&&x(On,{label:"Prompt",labelPosition:"top",value:J3(y),onClick:()=>n(_b(y))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(P1(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(z7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(B7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(F7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(aB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ut([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=je(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ut([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(fk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(ik,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=je(),n=p2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],vM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(vM):o.className+=vM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Dw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Dw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Dw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,y=l||0,w=u||0;if(s){var E=(m-y)*this.ratio+w,P=(v-y)*this.ratio+w,k=(h-w)/this.ratio+y,T=(g-w)/this.ratio+y,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,y=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=mM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=mM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=gM(M,this.props.grid[0]),z=gM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(y&&typeof y=="string"){if(y.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(y.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(y.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function g2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...y}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>y,Object.values(y));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,y=C.exports.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(h7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(h7,An({},r,{ref:t}),n)});Wv.displayName="Slot";const h7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});h7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=g2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:y,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,y)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(y,P.collectionRef);return ae.createElement(Wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,y)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(y,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Wv,{[h]:"",ref:T},E)});function m(v){const y=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=y.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const p7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let yM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,y]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(yM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),SM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),SM())},[g,h]),C.exports.useEffect(()=>{const z=()=>y({});return document.addEventListener(p7,z),()=>document.removeEventListener(p7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SM(){const e=new CustomEvent(p7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let zw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:bM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:bM()),zw++,()=>{zw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),zw--}},[])}function bM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Bw="focusScope.autoFocusOnMount",Fw="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){CM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Bw,xM);s.addEventListener(Bw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(Bw,u),setTimeout(()=>{const P=new CustomEvent(Fw,xM);s.addEventListener(Fw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Fw,h),CM.remove(v)},0)}}},[s,u,h,v]);const y=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=wM(t,e),r=wM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const CM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=e6["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function sb(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function gk(e){return e==="y"?"height":"width"}function kM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=gk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(sb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=kM(l,r,s),g=r,m={},v=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=sb(a),v=gk(g),y=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-y[v]-u[E],z=M/2-y[v]/2+R,V=g7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=sb(e),i=_1(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function PM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[PM(e),t,PM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...y}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,y),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function TM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=TM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=TM(o,i.floating);return{data:{escapedOffsets:a,escaped:LM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=sb(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],y=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=g7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=y+h[E],T=y-h[P];y=g7(k,y,T)}const w=s.fn({...t,[g]:v,[m]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],y=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);yz&&(y=z)}return{[g]:v,[m]:y}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function m2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function mk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lb(e){const{overflow:t,overflowX:n,overflowY:r}=m2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=m2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const AM=Math.min,Xm=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,y=s.width/l,w=s.height/u;return{width:y,height:w,top:v,right:m+y,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ub(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+ub(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||lb(i))&&(a=ub(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(mk(e)?e.host:null)||_d(e)}function MM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(mk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function m7(e){const t=Nu(e);let n=MM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=MM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function IM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||lb(o))&&(a=ub(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=ub(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Xm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return m2(i||n).direction==="rtl"&&(s+=Xm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&lb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],lb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&mk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function RM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(m2(e).position)&&Dl(e)?m7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=RM(t,h,i);return u.top=Xm(g.top,u.top),u.right=AM(g.right,u.right),u.bottom=AM(g.bottom,u.bottom),u.left=Xm(g.left,u.left),u},RM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:IM,getOffsetParent:m7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,m7(n),r),floating:{...IM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>m2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&y();function y(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(y)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var v7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function y7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!y7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!y7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return v7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);y7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{y.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);v7(()=>{y.current&&v()},[v]);const y=C.exports.useRef(!1);v7(()=>(y.current=!0,()=>{y.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?EM({element:t.current,padding:n}).fn(i):{}:t?EM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[vk,iW]=g2(rW),[Dxe,oW]=vk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,DTe]=vk(w4),[Hxe,Wxe]=vk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:y=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:y}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ct=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ct,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[y,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return y==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):y==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):y==="right"?(T=`${-v}px`,M=g?E:`${k}px`):y==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const $w="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},yk="RovingFocusGroup",[S7,lW,twe]=UH(yk),[nwe,uW]=g2(yk,[twe]),[rwe,iwe]=nwe(yk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(S7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(S7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[y=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener($w,k),()=>N.removeEventListener($w,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:y,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent($w,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===y),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(S7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],cb="Menu",[b7,ywe,Swe]=UH(cb),[wh,fW]=g2(cb,[Swe,iW,uW]),Sk=iW(),hW=uW(),[bwe,db]=wh(cb),[xwe,bk]=wh(cb),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=Sk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Sk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[zTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=db(id,e.__scopeMenu),a=bk(id,e.__scopeMenu);return C.exports.createElement(b7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(b7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=db(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return $B(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=db(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...y}=e,w=db(id,n),E=bk(id,n),P=Sk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?EF:C.exports.Fragment,ne=v?{as:Wv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,y,{ref:N,style:{outline:"none",...y.style},onKeyDown:Kn(y.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,w7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),x7="MenuItem",OM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=bk(x7,e.__scopeMenu),s=pW(x7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(OM,{bubbles:!0,cancelable:!0});g.addEventListener(OM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(x7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const y=l.current;if(y){var w;v(((w=y.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(b7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,w7(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,w7(y=>a.onItemLeave(y))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function w7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,BTe]=g2(mW,[fW]),fb=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=fb(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=fb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=fb(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=fb(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ut([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:y,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:y,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ut([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=e=>e.gallery,o6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,a6e=C.exports.memo(e=>{const t=je(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[y,w]=C.exports.useState(!1),E=p2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(_b(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(P1(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(ob(l)),t(ck()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Mke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Lke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:j=>{t(DH(j))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",draggable:!0,onDragStart:j=>{j.dataTransfer.setData("invokeai/imageUuid",m),j.dataTransfer.effectAllowed="move"},children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:rk,className:"hoverable-image-check"})}),y&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(f7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:j=>{j.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(f7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},o6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(Kz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,NM=40,s6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},DM=400;function yW(){const e=je(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:y,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:DM,galleryMaxWidth:DM}:s6e[u],[R,O]=C.exports.useState(y>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{y>=o3&&O(!1)},[y]);const Q=()=>{e(lbe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>i&&e(Li(!0)),400)},[e,i]),G=()=>{e(u7(n))},X=xe=>{e(Jg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(pk())},{enabled:!E},[E]),lt("right",()=>{e(hk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Jg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Jg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(wH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:y,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(y)+_e.width,T,Number(M)):Number(y)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(y)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-NM&&e(Jg(Je-NM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ok,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Jg(64)),icon:x(q_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(yH,{}):x(SH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(a6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(aH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:y+"px",height:"100%"}})]})})}const l6e=ut(i6e,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),u6e=()=>{const{resultImages:e,userImages:t}=Ae(l6e);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},c6e=ut([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),xk=e=>{const t=je(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ae(c6e),u=u6e(),h=()=>{t(Wke(!a)),t(Li(!0))},g=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),y=u(v);!y||(o==="img2img"?t(P1(y)):o==="unifiedCanvas"&&t(ob(y)))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",onDrop:g,children:[r,l&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":a,onClick:h,children:x(wbe,{})})})]}),!s&&x(yW,{})]})})};function d6e(){return x(xk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function f6e(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(Y_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(X_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(nk,{accordionInfo:e})]})}const h6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function p6e(){return x(xk,{optionsPanel:x(f6e,{}),children:x(h6e,{})})}var C7=function(e,t){return C7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},C7(e,t)};function g6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");C7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=M6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var y=s+h*v,w=l+g*v,E=u+m*v;o(y,w,E)})}}function M6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function I6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var R6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},wk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=I6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=R6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=wk(e,t);return e.bounds=n,n};function hb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=_7(e,s-g,u+g,r),y=_7(t,l-m,h+m,r);return{x:v,y}}var _7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function pb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=hb(g,m,i,o,0,0,null);return v}function v2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var BM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=gb(o,n);return!l},FM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},O6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},N6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function D6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,y=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=pb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function z6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,y=!m||!v;if(!(!a||y||!s)){var w=hb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var B6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},F6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},$6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function H6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function $M(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:_7(e,o,a,i)}function W6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function V6e(e,t){var n=F6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=W6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,y=l-i,w=h*h+g*g,E=Math.sqrt(w)/y;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function U6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=$6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,y=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=y.sizeX,R=y.sizeY,O=y.velocityAlignmentTime,N=O,z=H6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[y.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ct=$M(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=$M(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ct,mt)})}}function HM(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?N6e(e,t):O6e(e,t)}function WM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=B6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);V6e(e,{x:u,y:h}),z6e(e,u,h,g,m)}}function G6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?U6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,y=n||i.offsetHeight/2,w=Ck(e,a,v,y);w&&kd(e,w,h,g)}}function Ck(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=v2(za(t,2),o,a,0,!1),u=o1(e,l),h=pb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},j6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),em={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},VM=function(e){var t=Al({},em);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof em[n]<"u";if(i&&r){var o=Object.prototype.toString.call(em[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},em[n]),e[n]):s?t[n]=zM(zM([],em[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=v2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,y=kW(e,t,n),w=Ck(e,y,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=wk(e,a.scale),m=hb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function Y6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=q6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,y=r.offsetWidth/m,w=r.offsetHeight/v,E=v2(n||Math.min(y,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=wk(e,E),O=hb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function q6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function K6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var X6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},Z6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},Q6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},J6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},eCe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},tCe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&K6e(a)&&a&&o.contains(a)){var s=Y6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:X6e(e),zoomOut:Z6e(e),setTransform:Q6e(e),resetTransform:J6e(e),centerView:eCe(e),zoomToElement:tCe(e)}},Hw=!1;function Ww(){try{var e={get passive(){return Hw=!0,!1}};return e}catch{return Hw=!1,Hw}}var gb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},UM=function(e){e&&clearTimeout(e)},nCe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},rCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=gb(u,a);return!g};function iCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=m6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var oCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var y=r?!1:!m,w=v2(za(v,3),u,l,g,y);return w},aCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},sCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=gb(a,i);return!l},lCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},uCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},cCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return v2(za(g,2),a,o,l,!u)},dCe=160,fCe=100,hCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},pCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,y=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=iCe(t,null),P=oCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=y||v===0||h,R=u&&M,O=pb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},gCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;UM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},fCe);var o=aCe(e,t);o&&(UM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},dCe))},mCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},vCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=uCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=cCe(e,m);if(v!==i){var y=o1(e,v),w=u||h===0||s,E=a&&w,P=pb(e,g.x,g.y,v,y,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},yCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function SCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var bCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=gb(l,s);return!(g||!h)},MW=ae.createContext(j6e),xCe=function(e){g6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=VM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=rCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(hCe(n,r),pCe(n,r),gCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),HM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=FM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),WM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(G6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=sCe(n,r);!l||(mCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=lCe(n);!l||(r.preventDefault(),r.stopPropagation(),vCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(yCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),HM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=FM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];WM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=bCe(n,r);!o||SCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=nCe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=VM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),wCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(xCe,{...Al({},e,{setRef:i})})});function CCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var _Ce=`.transform-component-module_wrapper__1_Fgj { position: relative; width: -moz-fit-content; width: fit-content; @@ -503,8 +503,8 @@ function print() { __p += __j.call(arguments, '') } .transform-component-module_content__2jYgh img { pointer-events: none; } -`,GM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};bCe(xCe);var wCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(MW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+GM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+GM.content+" "+o,style:s,children:t})})};function CCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(SCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:S})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(Y_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(wCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function _Ce(){const e=je(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(CCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const kCe=ct([Q_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),ECe=()=>{const e=je(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(kCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(TI(o))},handleReset:()=>e(TI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(PI(o))},handleReset:()=>{e(PI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(AI(o))},handleReset:()=>{e(AI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=ct(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),TCe=()=>{const e=je(),{boundingBoxDimensions:t}=Ae(PCe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},v2=e=>e.system,LCe=e=>e.system.toastQueue,ACe=ct(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function MCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(ACe),n=je();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(uM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(uM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const ICe=ct([Q_,v2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),RCe=()=>{const e=je(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(ICe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(MCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(MI(v))},handleReset:()=>{e(MI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function OCe(){const e={boundingBox:{header:"Bounding Box",feature:Wi.BOUNDING_BOX,content:x(TCe,{})},seamCorrection:{header:"Seam Correction",feature:Wi.SEAM_CORRECTION,content:x(ECe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Wi.INFILL_AND_SCALING,content:x(RCe,{})},seed:{header:"Seed",feature:Wi.SEED,content:x(q_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Z_,{}),additionalHeaderComponents:x(X_,{})}};return ee(dk,{children:[x(sk,{}),x(ak,{}),x(ek,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(tk,{accordionInfo:e})]})}const NCe=ct(Rn,hH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),DCe=()=>{const e=je(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(NCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(i?OSe():uk()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(a2,{thickness:"2px",speed:"1s",size:"xl"})})};var zCe=Math.PI/180;function BCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:BCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*zCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var FCe="[object Array]",$Ce="[object Number]",HCe="[object String]",WCe="[object Boolean]",VCe=Math.PI/180,UCe=180/Math.PI,Ww="#",GCe="",jCe="0",YCe="Konva warning: ",jM="Konva error: ",qCe="rgb(",Vw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},KCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const XCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===FCe},_isNumber(e){return Object.prototype.toString.call(e)===$Ce&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===HCe},_isBoolean(e){return Object.prototype.toString.call(e)===WCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&XCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ww,GCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=jCe+e;return Ww+e},getRGB(e){var t;return e in Vw?(t=Vw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ww?this._hexToRgb(e.substring(1)):e.substr(0,4)===qCe?(t=KCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Vw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function _k(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function ZCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function QCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var em="get",tm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=em+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=tm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=em+a(t),l=tm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=tm+n,i=em+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=em+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=em+de._capitalize(n),a=tm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function JCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=e7e+u.join(YM)+t7e)):(o+=s.property,t||(o+=a7e+s.val)),o+=i7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=l7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=qM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=JCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",KM="absoluteScale",bf="canvas",f7e="Change",h7e="children",p7e="konva",_7="listening",XM="mouseenter",ZM="mouseleave",QM="set",JM="Shape",n5=" ",eI="stage",Mc="transform",g7e="Stage",k7="visible",m7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let v7e=1;class $e{constructor(t){this._id=v7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),S=new kk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(KM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==h7e&&(r=QM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(_7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(k7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==g7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=xm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Gw.pointer;if(t==="touch")return Gw.touch;if(t==="mouse")return Gw.mouse};function nI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class vb extends da{constructor(t){super(nI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{nI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===S7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(_7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+tI,this.content.style.height=n+tI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rw7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||C7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=xm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=xm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Uw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(E7,{evt:t}):this._fire(E7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Uw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,Ek(t)),Xm(t.pointerId)}_lostpointercapture(t){Xm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new kk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}vb.prototype.nodeType=y7e;gr(vb);q.addGetterSetter(vb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function jw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Zm={};function k7e(e){e.fill()}function E7e(e){e.stroke()}function P7e(e){e.fill()}function T7e(e){e.stroke()}function L7e(){this._clearCache(qW)}function A7e(){this._clearCache(KW)}function M7e(){this._clearCache(XW)}function I7e(){this._clearCache(ZW)}function R7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Zm)););this.colorKey=n,Zm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=jw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=jw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Zm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){de.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Xm(t)}}Ie.prototype._fillFunc=k7e;Ie.prototype._strokeFunc=E7e;Ie.prototype._fillFuncHit=P7e;Ie.prototype._strokeFuncHit=T7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",L7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",A7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",M7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",_k());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var O7e="#",N7e="beforeDraw",D7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new kk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(N7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(D7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Pk extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Pk.prototype.nodeType="FastLayer";gr(Pk);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var Yw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Yw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=rI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=iI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===rI?this.setTime(t):this.state===iI&&this.setTime(this.duration-t)}pause(){this.state=F7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Qm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new H7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)B7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Qm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function T7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[g,m,v,S]}function aI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var J=S.shift(),K=S.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=S.shift(),$=S.shift(),j=S.shift(),le=S.shift(),W=S.shift(),Q=l,ne=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],W7e="Change.konva",V7e="none",L7="up",A7="right",M7="down",I7="left",U7e=eV.length;class Tk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var sI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,sI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),sI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Kw(){return g3||(g3=de.createCanvasElement().getContext(Y7e),g3)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function a9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(a9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(q7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Kw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+Q7e)+r9e(this.fontFamily())}_addTextLine(t){this.align()===nm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Kw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),S=v!==cI,w=v!==t9e&&S,E=this.ellipsis();this.textArr=[],Kw().font=this._getContextFont();for(var P=E?this._getTextWidth(qw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var O=0,N=M.length,z="",V=0;O>>1,j=M.slice(0,$+1),le=this._getTextWidth(j)+P;le<=h?(O=$+1,z=j,V=le):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===p3||Q===lI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(p3),z.lastIndexOf(lI))+1,W>0&&(O=W,z=z.slice(0,O),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==cI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+qw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=tV(this.text()),g=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var le=t.dataArray,W=w+1;W0)return w=W,le[W];le[W].command==="M"&&(m={x:le[W].points[0],y:le[W].points[1]})}return{}},k=function(le){var W=t._getTextSize(le).width+r;le===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;S===void 0;)S=P(),S&&J+S.pathLengthW?v=Dn.getPointOnLine(W,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],X=S.points[5],ce=S.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Dn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?W>S.pathLength?E=1e-8:E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength/2:E=Math.max(E-(Q-W)/S.pathLength/2,0),E>1&&(E=1,K=!0),v=Dn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=W/S.pathLength:W>Q?E+=(W-Q)/S.pathLength:E-=(Q-W)/S.pathLength,E>1&&(E=1,K=!0),v=Dn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(Q=Dn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,O=0;Oe+`.${lV}`).join(" "),dI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const d9e="ontouchstart"in rt._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(c9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var _4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],fI=1e8;function h9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function p9e(e,t){const n=h9e(e);return uV(e,t,n)}function g9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(u9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(dI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(dI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-fI,y:-fI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new y2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=f9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let le=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(le-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+le,Q=rt.getAngle(this.rotationSnapTolerance()),J=g9e(this.rotationSnaps(),W,Q)-g.rotation,K=p9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),S=g.getTransform().copy();S.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),a1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+_4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",_4,m9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function hI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],y9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function S9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,S,w,E,P,k,T,M,R,O,N,z,V,$,j,le,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new hI,X=null,ce=G,me=null,Re=null,xe=v9e[t],Se=y9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*xe>>Se)*j,n[h+1]=(v*xe>>Se)*j,n[h+2]=(S*xe>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*xe>>Se)*j,n[l+1]=(v*xe>>Se)*j,n[l+2]=(S*xe>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&S9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const x9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const C9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var S=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],O=T,N=O>0?O:-O,z=M>0?M:-M,V=R>0?R:-R;if(z>N&&(O=M),V>N&&(O=R),O*=t,i){var $=s[E]+O,j=s[E+1]+O,le=s[E+2]+O;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=le>255?255:le<0?0:le}else{var W=n-O;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Xw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const _9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),O=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,O=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,O,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,R=0,O=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function z9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);const V9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},j9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(wCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:y})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(q_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(kCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>y()})})]})})}function PCe(){const e=je(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(ECe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const TCe=ut([J_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),LCe=()=>{const e=je(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(TCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(TI(o))},handleReset:()=>e(TI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(PI(o))},handleReset:()=>{e(PI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(AI(o))},handleReset:()=>{e(AI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},ACe=ut(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),MCe=()=>{const e=je(),{boundingBoxDimensions:t}=Ae(ACe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},y2=e=>e.system,ICe=e=>e.system.toastQueue,RCe=ut(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function OCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(RCe),n=je();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(uM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(uM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const NCe=ut([J_,y2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),DCe=()=>{const e=je(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(NCe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(OCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(MI(v))},handleReset:()=>{e(MI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function zCe(){const e={boundingBox:{header:"Bounding Box",feature:Wi.BOUNDING_BOX,content:x(MCe,{})},seamCorrection:{header:"Seam Correction",feature:Wi.SEAM_CORRECTION,content:x(LCe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Wi.INFILL_AND_SCALING,content:x(DCe,{})},seed:{header:"Seed",feature:Wi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(nk,{accordionInfo:e})]})}const BCe=ut(Rn,hH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),FCe=()=>{const e=je(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(BCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(i?OSe():ck()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(s2,{thickness:"2px",speed:"1s",size:"xl"})})};var $Ce=Math.PI/180;function HCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:HCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*$Ce:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var WCe="[object Array]",VCe="[object Number]",UCe="[object String]",GCe="[object Boolean]",jCe=Math.PI/180,YCe=180/Math.PI,Vw="#",qCe="",KCe="0",XCe="Konva warning: ",jM="Konva error: ",ZCe="rgb(",Uw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},QCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const JCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===WCe},_isNumber(e){return Object.prototype.toString.call(e)===VCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===UCe},_isBoolean(e){return Object.prototype.toString.call(e)===GCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&JCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Vw,qCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=KCe+e;return Vw+e},getRGB(e){var t;return e in Uw?(t=Uw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Vw?this._hexToRgb(e.substring(1)):e.substr(0,4)===ZCe?(t=QCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Uw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function _k(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function e7e(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function t7e(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var tm="get",nm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=tm+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=nm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=nm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=tm+a(t),l=nm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=nm+n,i=tm+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=tm+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=tm+de._capitalize(n),a=nm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function n7e(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=r7e+u.join(YM)+i7e)):(o+=s.property,t||(o+=u7e+s.val)),o+=s7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=d7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=qM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=n7e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",KM="absoluteScale",bf="canvas",g7e="Change",m7e="children",v7e="konva",k7="listening",XM="mouseenter",ZM="mouseleave",QM="set",JM="Shape",n5=" ",eI="stage",Mc="transform",y7e="Stage",E7="visible",S7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let b7e=1;class $e{constructor(t){this._id=b7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),y=new kk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=y.getContext();return y.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(KM),this.drawScene(m,this),this.drawHit(y,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:y,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==m7e&&(r=QM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(k7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(E7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==y7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),y=this.clipY();o.rect(v,y,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=wm(e);if(t==="pointer")return rt.pointerEventsEnabled&&jw.pointer;if(t==="touch")return jw.touch;if(t==="mouse")return jw.mouse};function nI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const P7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class yb extends da{constructor(t){super(nI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{nI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===w7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(P7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+tI,this.content.style.height=n+tI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rk7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Zm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||E7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=wm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=wm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=wm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Gw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=wm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Gw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(T7,{evt:t}):this._fire(T7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Gw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,Ek(t)),Zm(t.pointerId)}_lostpointercapture(t){Zm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new kk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}yb.prototype.nodeType=x7e;gr(yb);q.addGetterSetter(yb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function Yw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Qm={};function T7e(e){e.fill()}function L7e(e){e.stroke()}function A7e(e){e.fill()}function M7e(e){e.stroke()}function I7e(){this._clearCache(qW)}function R7e(){this._clearCache(KW)}function O7e(){this._clearCache(XW)}function N7e(){this._clearCache(ZW)}function D7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Qm)););this.colorKey=n,Qm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Yw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Yw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Qm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),y=u&&this.shadowBlur()||0,w=m+y*2,E=v+y*2,P={width:w,height:E,x:-(a/2+y)+Math.min(h,0)+i.x,y:-(a/2+y)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var y=this.getAbsoluteTransform(n).getMatrix();return o.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(y){de.error("Unable to draw hit graph from cached scene canvas. "+y.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Zm(t)}}Ie.prototype._fillFunc=T7e;Ie.prototype._strokeFunc=L7e;Ie.prototype._fillFuncHit=A7e;Ie.prototype._strokeFuncHit=M7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",R7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",O7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",N7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",D7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",_k());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var z7e="#",B7e="beforeDraw",F7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],$7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new kk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<$7e;i++){const o=JW[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=de._rgbToHex(r[0],r[1],r[2]),a=Qm[z7e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(B7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(F7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Pk extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Pk.prototype.nodeType="FastLayer";gr(Pk);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var qw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:qw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=rI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=iI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===rI?this.setTime(t):this.state===iI&&this.setTime(this.duration-t)}pause(){this.state=W7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Jm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=V7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new U7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)H7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Jm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function L7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),y=r+h*(o-t);return[g,m,v,y]}function aI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-y),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;y-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],y,0);t.push(w.x,w.y)}else for(let y=h+v;ythis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(y[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=y.shift(),u+=y.shift(),k="L",T.push(l,u);break;case"L":l=y.shift(),u=y.shift(),T.push(l,u);break;case"m":var J=y.shift(),K=y.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=y.shift(),u=y.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=y.shift(),k="L",T.push(l,u);break;case"H":l=y.shift(),k="L",T.push(l,u);break;case"v":u+=y.shift(),k="L",T.push(l,u);break;case"V":u=y.shift(),k="L",T.push(l,u);break;case"C":T.push(y.shift(),y.shift(),y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"c":T.push(l+y.shift(),u+y.shift(),l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,y.shift(),y.shift()),l=y.shift(),u=y.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="C",T.push(l,u);break;case"Q":T.push(y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"q":T.push(l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=y.shift(),u=y.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=y.shift(),u+=y.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=y.shift(),$=y.shift(),j=y.shift(),le=y.shift(),W=y.shift(),Q=l,ne=u,l=y.shift(),u=y.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=y.shift(),$=y.shift(),j=y.shift(),le=y.shift(),W=y.shift(),Q=l,ne=u,l+=y.shift(),u+=y.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var y=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(y*=-1),isNaN(y)&&(y=0);var w=y*s*m/l,E=y*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),y=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-y.x,u=r[s-1]-y.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],G7e="Change.konva",j7e="none",A7="up",M7="right",I7="down",R7="left",Y7e=eV.length;class Tk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var sI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,sI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),sI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Xw(){return g3||(g3=de.createCanvasElement().getContext(X7e),g3)}function s9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function l9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function u9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(u9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(Z7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Xw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+t9e)+a9e(this.fontFamily())}_addTextLine(t){this.align()===rm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Xw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),y=v!==cI,w=v!==i9e&&y,E=this.ellipsis();this.textArr=[],Xw().font=this._getContextFont();for(var P=E?this._getTextWidth(Kw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var O=0,N=M.length,z="",V=0;O>>1,j=M.slice(0,$+1),le=this._getTextWidth(j)+P;le<=h?(O=$+1,z=j,V=le):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===p3||Q===lI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(p3),z.lastIndexOf(lI))+1,W>0&&(O=W,z=z.slice(0,O),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==cI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Kw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=tV(this.text()),g=this.text().split(" ").length-1,m,v,y,w=-1,E=0,P=function(){E=0;for(var le=t.dataArray,W=w+1;W0)return w=W,le[W];le[W].command==="M"&&(m={x:le[W].points[0],y:le[W].points[1]})}return{}},k=function(le){var W=t._getTextSize(le).width+r;le===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;y===void 0;)y=P(),y&&J+y.pathLengthW?v=Dn.getPointOnLine(W,m.x,m.y,y.points[0],y.points[1],m.x,m.y):y=void 0;break;case"A":var G=y.points[4],X=y.points[5],ce=y.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Dn.getPointOnEllipticalArc(y.points[0],y.points[1],y.points[2],y.points[3],E,y.points[6]);break;case"C":E===0?W>y.pathLength?E=1e-8:E=W/y.pathLength:W>Q?E+=(W-Q)/y.pathLength/2:E=Math.max(E-(Q-W)/y.pathLength/2,0),E>1&&(E=1,K=!0),v=Dn.getPointOnCubicBezier(E,y.start.x,y.start.y,y.points[0],y.points[1],y.points[2],y.points[3],y.points[4],y.points[5]);break;case"Q":E===0?E=W/y.pathLength:W>Q?E+=(W-Q)/y.pathLength:E-=(Q-W)/y.pathLength,E>1&&(E=1,K=!0),v=Dn.getPointOnQuadraticBezier(E,y.start.x,y.start.y,y.points[0],y.points[1],y.points[2],y.points[3]);break}v!==void 0&&(Q=Dn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,y=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,O=0;Oe+`.${lV}`).join(" "),dI="nodesRect",f9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],h9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const p9e="ontouchstart"in rt._global;function g9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(h9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var _4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],fI=1e8;function m9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function v9e(e,t){const n=m9e(e);return uV(e,t,n)}function y9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(f9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(dI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(dI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-fI,y:-fI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var y=m.point(v);n.push(y)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new S2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:p9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=g9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let le=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(le-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+le,Q=rt.getAngle(this.rotationSnapTolerance()),J=y9e(this.rotationSnaps(),W,Q)-g.rotation,K=v9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var y=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(y.x-o.x(),2)+Math.pow(y.y-o.y(),2));var w=this.findOne(".top-left").x()>y.x?-1:1,E=this.findOne(".top-left").y()>y.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(y.x-n),this.findOne(".top-left").y(y.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var y=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-y.x,2)+Math.pow(y.y-o.y(),2));var w=this.findOne(".top-right").x()y.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(y.x+n),this.findOne(".top-right").y(y.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var y=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(y.x-o.x(),2)+Math.pow(o.y()-y.y,2));var w=y.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),y=g.getTransform().copy();y.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(y);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),a1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function S9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+_4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",_4,S9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function hI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var b9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],x9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function w9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,y,w,E,P,k,T,M,R,O,N,z,V,$,j,le,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new hI,X=null,ce=G,me=null,Re=null,xe=b9e[t],Se=x9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*xe>>Se)*j,n[h+1]=(v*xe>>Se)*j,n[h+2]=(y*xe>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,y-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*xe>>Se)*j,n[l+1]=(v*xe>>Se)*j,n[l+2]=(y*xe>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,y-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&w9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const _9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const E9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var y=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=y+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],O=T,N=O>0?O:-O,z=M>0?M:-M,V=R>0?R:-R;if(z>N&&(O=M),V>N&&(O=R),O*=t,i){var $=s[E]+O,j=s[E+1]+O,le=s[E+2]+O;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=le>255?255:le<0?0:le}else{var W=n-O;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Zw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const P9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var y,w,E,P,k,T,M,R,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),O=u-v*(u-0)):(y=(i+r)*.5,w=i+v*(i-y),E=r+v*(r-y),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,O=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,O,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,R=0,O=-1),i=0;i=0&&v=0&&y=0&&v=0&&y=255*4?255:0}return a}function $9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&y=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const U9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);const j9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const Y9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},K9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` -`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Vl(d):""}var Ih=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function Sn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Id(d,f,y){if(kr.current!==Bo)throw Error(a(168));Sn(kr,f),Sn(Gr,y)}function Gl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,Sn(kr,d),Sn(Gr,Gr.current),!0}function Rd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Gl(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),Sn(kr,d)):En(Gr),Sn(Gr,y)}var vi=Math.clz32?Math.clz32:Od,Rh=Math.log,Oh=Math.LN2;function Od(d){return d>>>=0,d===0?32:31-(Rh(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function jl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function Dd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Ui=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var Kt=Ge(pe,Pt,ve[Ft],We);if(Kt===null){Pt===null&&(Pt=Br);break}d&&Pt&&Kt.alternate===null&&f(pe,Pt),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=Ge(pe,Pt,Kt.value,We);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Te=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(Kt.done)return y(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;!Kt.done;Ft++,Kt=ve.next())Kt=At(pe,Kt.value,We),Kt!==null&&(se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return Fn&&Hs(pe,Ft),Te}for(Pt=_(pe,Pt);!Kt.done;Ft++,Kt=ve.next())Kt=Hn(Pt,pe,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&Pt.delete(Kt.key===null?Ft:Kt.key),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Te}function Xo(pe,se,ve,We){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Te=ve.key,Mt=se;Mt!==null;){if(Mt.key===Te){if(Te=ve.type,Te===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&X1(Te)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=Ca(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,We,ve.key),se.return=pe,pe=se):(We=df(ve.type,ve.key,ve.props,null,pe.mode,We),We.ref=Ca(pe,se,ve),We.return=pe,pe=We)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,We),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),We)}if(ne(ve))return Pn(pe,se,ve,We);if(O(ve))return nr(pe,se,ve,We);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=xp(ve,pe.mode,We),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var Ju=A2(!0),M2=A2(!1),Yd={},po=zo(Yd),_a=zo(Yd),re=zo(Yd);function ye(d){if(d===Yd)throw Error(a(174));return d}function ge(d,f){Sn(re,f),Sn(_a,d),Sn(po,Yd),d=K(f),En(po),Sn(po,d)}function Ue(){En(po),En(_a),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(Sn(_a,d),Sn(po,f))}function Jt(d){_a.current===d&&(En(po),En(_a))}var Rt=zo(0);function dn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||$u(y)||Md(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var qd=[];function Z1(){for(var d=0;dy?y:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=y,ec.transition=_}}function sc(){return bi().memoizedState}function og(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,y);else if(y=Qu(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),ef(y,f,_)}}function lc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Gd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Qu(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),ef(y,f,_))}}function uc(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function cc(d,f){Kd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function ef(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Yl(d,y)}}var ts={readContext:Gi,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},kb={readContext:Gi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:O2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Zl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Zl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Zl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=og.bind(null,bn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:R2,useDebugValue:ng,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=R2(!1),f=d[0];return d=ig.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=bn,L=qr();if(Fn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Xl&30)!==0||tg(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Qd(9,oc.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var y=xa,_=Ui;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=tc++,0")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=S}return(d=d?d.displayName||d.name:"")?Vl(d):""}var Ih=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function Sn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var S=d.type.contextTypes;if(!S)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in S)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Id(d,f,S){if(kr.current!==Bo)throw Error(a(168));Sn(kr,f),Sn(Gr,S)}function Gl(d,f,S){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return S;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},S,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,Sn(kr,d),Sn(Gr,Gr.current),!0}function Rd(d,f,S){var _=d.stateNode;if(!_)throw Error(a(169));S?(d=Gl(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),Sn(kr,d)):En(Gr),Sn(Gr,S)}var vi=Math.clz32?Math.clz32:Od,Rh=Math.log,Oh=Math.LN2;function Od(d){return d>>>=0,d===0?32:31-(Rh(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function jl(d,f){var S=d.pendingLanes;if(S===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=S&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=S&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=S&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0S;S++)f.push(d);return f}function ba(d,f,S){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=S}function Dd(d,f){var S=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Ui=1<<32-vi(f)+L|S<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var Kt=Ge(pe,Pt,ve[Ft],We);if(Kt===null){Pt===null&&(Pt=Br);break}d&&Pt&&Kt.alternate===null&&f(pe,Pt),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt,Pt=Br}if(Ft===ve.length)return S(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=Ge(pe,Pt,Kt.value,We);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Te=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(Kt.done)return S(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;!Kt.done;Ft++,Kt=ve.next())Kt=At(pe,Kt.value,We),Kt!==null&&(se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return Fn&&Hs(pe,Ft),Te}for(Pt=_(pe,Pt);!Kt.done;Ft++,Kt=ve.next())Kt=Hn(Pt,pe,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&Pt.delete(Kt.key===null?Ft:Kt.key),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Te}function Xo(pe,se,ve,We){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Te=ve.key,Mt=se;Mt!==null;){if(Mt.key===Te){if(Te=ve.type,Te===h){if(Mt.tag===7){S(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&Z1(Te)===Mt.type){S(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=Ca(pe,Mt,ve),se.return=pe,pe=se;break e}S(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,We,ve.key),se.return=pe,pe=se):(We=df(ve.type,ve.key,ve.props,null,pe.mode,We),We.ref=Ca(pe,se,ve),We.return=pe,pe=We)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){S(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{S(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,We),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),We)}if(ne(ve))return Pn(pe,se,ve,We);if(O(ve))return nr(pe,se,ve,We);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(S(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(S(pe,se),se=xp(ve,pe.mode,We),se.return=pe,pe=se),H(pe)):S(pe,se)}return Xo}var Ju=A2(!0),M2=A2(!1),Yd={},po=zo(Yd),_a=zo(Yd),re=zo(Yd);function ye(d){if(d===Yd)throw Error(a(174));return d}function ge(d,f){Sn(re,f),Sn(_a,d),Sn(po,Yd),d=K(f),En(po),Sn(po,d)}function Ue(){En(po),En(_a),En(re)}function Et(d){var f=ye(re.current),S=ye(po.current);f=G(S,d.type,f),S!==f&&(Sn(_a,d),Sn(po,f))}function Jt(d){_a.current===d&&(En(po),En(_a))}var Rt=zo(0);function dn(d){for(var f=d;f!==null;){if(f.tag===13){var S=f.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||$u(S)||Md(S)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var qd=[];function Q1(){for(var d=0;dS?S:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=S,ec.transition=_}}function sc(){return bi().memoizedState}function ag(d,f,S){var _=Ar(d);if(S={lane:_,action:S,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,S);else if(S=Qu(d,f,S,_),S!==null){var L=li();vo(S,d,_,L),ef(S,f,_)}}function lc(d,f,S){var _=Ar(d),L={lane:_,action:S,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,S);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Gd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}S=Qu(d,f,L,_),S!==null&&(L=li(),vo(S,d,_,L),ef(S,f,_))}}function uc(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function cc(d,f){Kd=tn=!0;var S=d.pending;S===null?f.next=f:(f.next=S.next,S.next=f),d.pending=f}function ef(d,f,S){if((S&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,S|=_,f.lanes=S,Yl(d,S)}}var ts={readContext:Gi,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},Eb={readContext:Gi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:O2,useImperativeHandle:function(d,f,S){return S=S!=null?S.concat([d]):null,Zl(4194308,4,vr.bind(null,f,d),S)},useLayoutEffect:function(d,f){return Zl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Zl(4,2,d,f)},useMemo:function(d,f){var S=qr();return f=f===void 0?null:f,d=d(),S.memoizedState=[d,f],d},useReducer:function(d,f,S){var _=qr();return f=S!==void 0?S(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=ag.bind(null,bn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:R2,useDebugValue:rg,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=R2(!1),f=d[0];return d=og.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,S){var _=bn,L=qr();if(Fn){if(S===void 0)throw Error(a(407));S=S()}else{if(S=f(),zr===null)throw Error(a(349));(Xl&30)!==0||ng(_,f,S)}L.memoizedState=S;var I={value:S,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Qd(9,oc.bind(null,_,I,S,f),void 0,null),S},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var S=xa,_=Ui;S=(_&~(1<<32-vi(_)-1)).toString(32)+S,f=":"+f+"R"+S,S=tc++,0dp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=dn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&y!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Rt.current,Sn(Rt,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(oi(f),pt&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function hg(d,f){switch(j1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ue(),En(Gr),En(kr),Z1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(En(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Rt),null;case 4:return Ue(),null;case 10:return Vd(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,Mb=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Qh=!1;function Jl(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:pt&&Rs(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Qh,Qh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function ep(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function pg(d){var f=d.alternate;f!==null&&(d.alternate=null,pg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,y),d=d.sibling;d!==null;)tp(d,f,y),d=d.sibling}function gg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(y,d,f):ke(y,d);else if(_!==4&&(d=d.child,d!==null))for(gg(d,f,y),d=d.sibling;d!==null;)gg(d,f,y),d=d.sibling}var Sr=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(cn,y)}catch{}switch(y.tag){case 5:Pr||pc(y,f);case 6:if(pt){var _=Sr,L=Yo;Sr=null,qo(d,f,y),Sr=_,Yo=L,Sr!==null&&(Yo?tt(Sr,y.stateNode):ft(Sr,y.stateNode))}else qo(d,f,y);break;case 18:pt&&Sr!==null&&(Yo?H1(Sr,y.stateNode):$1(Sr,y.stateNode));break;case 4:pt?(_=Sr,L=Yo,Sr=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),Sr=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=Sa(_),Fu(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(pc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Mb),f.forEach(function(_){var L=Q2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case ap:return":has("+(yg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Ib(_/1960))-_,10<_){d.timeoutHandle=Je(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?pp.bind(null,d):null}function gp(d,f){var y=bc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=y,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-xg?Qs(d,0):bg|=y),Xr(d,f)}function Eg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function Ob(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),Eg(d,y)}function Q2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Eg(d,y)}var Pg;Pg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,Lb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Fn&&(f.flags&1048576)!==0&&G1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;ka(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,y),L=J1(null,f,_,d,L,y);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,q1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,K1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(ka(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=Sp(_),d=Ho(_,d),L){case 0:f=lg(null,f,_,d,y);break e;case 1:f=V2(null,f,_,d,y);break e;case 11:f=F2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),lg(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),V2(d,f,_,L,y);case 3:e:{if(U2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,E2(d,f),Vh(f,_,null,y);var H=f.memoizedState;if(_=H.element,mt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=G2(d,f,_,y,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=G2(d,f,_,y,L);break e}else for(mt&&(fo=R1(f.stateNode.containerInfo),Gn=f,Fn=!0,Oi=null,ho=!1),y=M2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Ku(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&Fd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Me(_,L)?H=null:I!==null&&Me(_,I)&&(f.flags|=32),W2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&Fd(f),null;case 13:return j2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),F2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,k2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var De=I.updateQueue;if(De!==null){De=De.shared;var Qe=De.pending;Qe===null?fe.next=fe:(fe.next=Qe.next,Qe.next=fe),De.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),Ud(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),Ud(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,y),L=Gi(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return $2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ka(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,y),T2(f,_,L),K1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return q2(d,f,y);case 22:return H2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function Ea(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ea(d,f,y,_)}function Tg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Sp(d){if(typeof d=="function")return Tg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function df(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")Tg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case S:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function bp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function xp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function ff(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,mt&&(this.mutableSourceEagerHydrationData=null)}function J2(d,f,y,_,L,I,H,oe,fe){return d=new ff(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},q1(I),d}function Lg(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Gl(d,y,f)}return f}function Ag(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=le(f),d===null?null:d.stateNode}function hf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=De&&I>=At&&L<=Qe&&H<=Ge){d.splice(f,1);break}else if(_!==De||y.width!==fe.width||GeH){if(!(I!==At||y.height!==fe.height||Qe<_||De>L)){De>_&&(fe.width+=De-_,fe.x=_),QeI&&(fe.height+=At-I,fe.y=I),Gey&&(y=H)),Hdp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=dn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&S!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Rt.current,Sn(Rt,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),S=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==S&&(f.flags|=8192),S&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(oi(f),pt&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function pg(d,f){switch(Y1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ue(),En(Gr),En(kr),Q1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(En(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Rt),null;case 4:return Ue(),null;case 10:return Vd(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,Ib=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var S=d.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(_){jn(d,f,_)}else S.current=null}function jo(d,f,S){try{S()}catch(_){jn(d,f,_)}}var Qh=!1;function Jl(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var S=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var _=S.memoizedProps,L=S.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:pt&&Rs(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return S=Qh,Qh=!1,S}function ai(d,f,S){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,S,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var S=f=f.next;do{if((S.tag&d)===d){var _=S.create;S.destroy=_()}S=S.next}while(S!==f)}}function ep(d){var f=d.ref;if(f!==null){var S=d.stateNode;switch(d.tag){case 5:d=J(S);break;default:d=S}typeof f=="function"?f(d):f.current=d}}function gg(d){var f=d.alternate;f!==null&&(d.alternate=null,gg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,S){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(S,d,f):It(S,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,S),d=d.sibling;d!==null;)tp(d,f,S),d=d.sibling}function mg(d,f,S){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(S,d,f):ke(S,d);else if(_!==4&&(d=d.child,d!==null))for(mg(d,f,S),d=d.sibling;d!==null;)mg(d,f,S),d=d.sibling}var Sr=null,Yo=!1;function qo(d,f,S){for(S=S.child;S!==null;)Tr(d,f,S),S=S.sibling}function Tr(d,f,S){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(cn,S)}catch{}switch(S.tag){case 5:Pr||pc(S,f);case 6:if(pt){var _=Sr,L=Yo;Sr=null,qo(d,f,S),Sr=_,Yo=L,Sr!==null&&(Yo?tt(Sr,S.stateNode):ft(Sr,S.stateNode))}else qo(d,f,S);break;case 18:pt&&Sr!==null&&(Yo?W1(Sr,S.stateNode):H1(Sr,S.stateNode));break;case 4:pt?(_=Sr,L=Yo,Sr=S.stateNode.containerInfo,Yo=!0,qo(d,f,S),Sr=_,Yo=L):(ct&&(_=S.stateNode.containerInfo,L=Sa(_),Fu(_,L)),qo(d,f,S));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=S.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(S,f,H),L=L.next}while(L!==_)}qo(d,f,S);break;case 1:if(!Pr&&(pc(S,f),_=S.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=S.memoizedProps,_.state=S.memoizedState,_.componentWillUnmount()}catch(oe){jn(S,f,oe)}qo(d,f,S);break;case 21:qo(d,f,S);break;case 22:S.mode&1?(Pr=(_=Pr)||S.memoizedState!==null,qo(d,f,S),Pr=_):qo(d,f,S);break;default:qo(d,f,S)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var S=d.stateNode;S===null&&(S=d.stateNode=new Ib),f.forEach(function(_){var L=Q2.bind(null,d,_);S.has(_)||(S.add(_),_.then(L,L))})}}function go(d,f){var S=f.deletions;if(S!==null)for(var _=0;_";case ap:return":has("+(Sg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var S=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Rb(_/1960))-_,10<_){d.timeoutHandle=Je(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===S?pp.bind(null,d):null}function gp(d,f){var S=bc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=S,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var S=f.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-wg?Qs(d,0):xg|=S),Xr(d,f)}function Pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var S=li();d=Wo(d,f),d!==null&&(ba(d,f,S),Xr(d,S))}function Nb(d){var f=d.memoizedState,S=0;f!==null&&(S=f.retryLane),Pg(d,S)}function Q2(d,f){var S=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(S=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Pg(d,S)}var Tg;Tg=function(d,f,S){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&S)===0&&(f.flags&128)===0)return Di=!1,Ab(d,f,S);Di=(d.flags&131072)!==0}else Di=!1,Fn&&(f.flags&1048576)!==0&&j1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;ka(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,S),L=eg(null,f,_,d,L,S);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,K1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,X1(f,_,d,S),f=Uo(null,f,_,!0,I,S)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,S),f=f.child),f;case 16:_=f.elementType;e:{switch(ka(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=Sp(_),d=Ho(_,d),L){case 0:f=ug(null,f,_,d,S);break e;case 1:f=V2(null,f,_,d,S);break e;case 11:f=F2(null,f,_,d,S);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),S);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ug(d,f,_,L,S);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),V2(d,f,_,L,S);case 3:e:{if(U2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,E2(d,f),Vh(f,_,null,S);var H=f.memoizedState;if(_=H.element,mt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=G2(d,f,_,S,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=G2(d,f,_,S,L);break e}else for(mt&&(fo=O1(f.stateNode.containerInfo),Gn=f,Fn=!0,Oi=null,ho=!1),S=M2(f,null,_,S),f.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(Ku(),_===L){f=ns(d,f,S);break e}xi(d,f,_,S)}f=f.child}return f;case 5:return Et(f),d===null&&Fd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Me(_,L)?H=null:I!==null&&Me(_,I)&&(f.flags|=32),W2(d,f),xi(d,f,H,S),f.child;case 6:return d===null&&Fd(f),null;case 13:return j2(d,f,S);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,S):xi(d,f,_,S),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),F2(d,f,_,L,S);case 7:return xi(d,f,f.pendingProps,S),f.child;case 8:return xi(d,f,f.pendingProps.children,S),f.child;case 12:return xi(d,f,f.pendingProps.children,S),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,k2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,S);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,S&-S),fe.tag=2;var De=I.updateQueue;if(De!==null){De=De.shared;var Qe=De.pending;Qe===null?fe.next=fe:(fe.next=Qe.next,Qe.next=fe),De.pending=fe}}I.lanes|=S,fe=I.alternate,fe!==null&&(fe.lanes|=S),Ud(I.return,S,f),oe.lanes|=S;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=S,oe=H.alternate,oe!==null&&(oe.lanes|=S),Ud(H,S,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,S),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,S),L=Gi(L),_=_(L),f.flags|=1,xi(d,f,_,S),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,S);case 15:return $2(d,f,f.type,f.pendingProps,S);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ka(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,S),T2(f,_,L),X1(f,_,L,S),Uo(null,f,_,!0,d,S);case 19:return q2(d,f,S);case 22:return H2(d,f,S)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function Ea(d,f,S,_){this.tag=d,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,S,_){return new Ea(d,f,S,_)}function Lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Sp(d){if(typeof d=="function")return Lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var S=d.alternate;return S===null?(S=yo(d.tag,f,d.key,d.mode),S.elementType=d.elementType,S.type=d.type,S.stateNode=d.stateNode,S.alternate=d,d.alternate=S):(S.pendingProps=f,S.type=d.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=d.flags&14680064,S.childLanes=d.childLanes,S.lanes=d.lanes,S.child=d.child,S.memoizedProps=d.memoizedProps,S.memoizedState=d.memoizedState,S.updateQueue=d.updateQueue,f=d.dependencies,S.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},S.sibling=d.sibling,S.index=d.index,S.ref=d.ref,S}function df(d,f,S,_,L,I){var H=2;if(_=d,typeof d=="function")Lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(S.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,S,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,S,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,S,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(S,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case y:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,S,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,S,_){return d=yo(7,d,_,f),d.lanes=S,d}function bp(d,f,S,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=S,d.stateNode={isHidden:!1},d}function xp(d,f,S){return d=yo(6,d,null,f),d.lanes=S,d}function nl(d,f,S){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=S,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function ff(d,f,S,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,mt&&(this.mutableSourceEagerHydrationData=null)}function J2(d,f,S,_,L,I,H,oe,fe){return d=new ff(d,f,S,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},K1(I),d}function Ag(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var S=d.type;if(jr(S))return Gl(d,S,f)}return f}function Mg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=le(f),d===null?null:d.stateNode}function hf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var S=d.retryLane;d.retryLane=S!==0&&S=De&&I>=At&&L<=Qe&&H<=Ge){d.splice(f,1);break}else if(_!==De||S.width!==fe.width||GeH){if(!(I!==At||S.height!==fe.height||Qe<_||De>L)){De>_&&(fe.width+=De-_,fe.x=_),QeI&&(fe.height+=At-I,fe.y=I),GeS&&(S=H)),H ")+` No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Mg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{cn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!wt)throw Error(a(363));d=Sg(d,f);var L=qt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=Lg(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=Y9e})(cV);const q9e=Z7(cV.exports);var Lk={exports:{}},Th={};/** + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:wp,findFiberByHostInstance:d.findFiberByHostInstance||Ig,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{cn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,S,_){if(!wt)throw Error(a(363));d=bg(d,f);var L=qt(d,S,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var S=f._getVersion;S=S(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,S]:d.mutableSourceEagerHydrationData.push(f,S)},n.runWithPriority=function(d,f){var S=Ht;try{return Ht=d,f()}finally{Ht=S}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,S,_){var L=f.current,I=li(),H=Ar(L);return S=Ag(S),f.context===null?f.context=S:f.pendingContext=S,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Wh(d,L,H)),H},n};(function(e){e.exports=X9e})(cV);const Z9e=Q7(cV.exports);var Lk={exports:{}},Th={};/** * @license React * react-reconciler-constants.production.min.js * @@ -530,14 +530,14 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Lk);const pI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let gI=!1,mI=!1;const Ak=".react-konva-event",K9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. + */Th.ConcurrentRoot=1;Th.ContinuousEventPriority=4;Th.DefaultEventPriority=16;Th.DiscreteEventPriority=1;Th.IdleEventPriority=536870912;Th.LegacyRoot=0;(function(e){e.exports=Th})(Lk);const pI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let gI=!1,mI=!1;const Ak=".react-konva-event",Q9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. Position of a node will be changed during drag&drop, so you should update state of the react app as well. Consider to add onDragMove or onDragEnd events. For more info see: https://github.com/konvajs/react-konva/issues/256 -`,X9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +`,J9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 -`,Z9e={};function yb(e,t,n=Z9e){if(!gI&&"zIndex"in t&&(console.warn(X9e),gI=!0),!mI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(K9e),mI=!0)}for(var o in n)if(!pI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!pI[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Ak,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},Q9e={};ch.Node.prototype._applyProps=yb;function J9e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function e8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return yb(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return dV}function d8e(){return dV}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function S8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function x8e(e,t,n){fV(e,t,n)}function w8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function C8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){yb(e,i,r)}function P8e(e){e.hide(),Ld(e)}function T8e(e){}function L8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function M8e(e){}function I8e(){}const R8e=()=>Lk.exports.DefaultEventPriority,O8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:S8e,appendChildToContainer:b8e,insertBefore:fV,insertInContainerBefore:x8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:T8e,unhideInstance:L8e,unhideTextInstance:A8e,clearContainer:M8e,detachDeletedInstance:I8e,getCurrentEventPriority:R8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,vI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))F8e.call(t,n)&&yI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function Mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Ik=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(Ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=H8e.current)!=null?r:Mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const im=[],bI=new WeakMap;function U8e(){var e;const t=V8e();im.splice(0,im.length),Mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Ik&&im.push(hV(i))});for(const n of im){const r=(e=W8e.current)==null?void 0:e.readContext(n);bI.set(n,r)}return C.exports.useMemo(()=>im.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(SI({},i),{value:bI.get(r)}))),n=>x(pV,{...SI({},n)})),[])}function G8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const j8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=G8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=wm.createContainer(n.current,Lk.exports.LegacyRoot,!1,null),wm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),wm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),yb(n.current,e,i),wm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",Y8e="Transformer",wm=q9e(O8e);wm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const q8e=ae.forwardRef((e,t)=>x(pV,{children:x(j8e,{...e,forwardedRef:t})})),K8e=ct([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),X8e=e=>{const{...t}=e,{objects:n}=Ae(K8e);return x(dh,{listening:!1,...t,children:n.filter(ok).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},Z8e=ct(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:sM/v,colorPickerInnerRadius:(sM-c7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:S,colorPickerOuterRadius:w}=Ae(Z8e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:c7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:S,stroke:v,strokeWidth:c7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=ct(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),e_e=e=>{const{...t}=e,n=je(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(J8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Aw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Aw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Aw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Rw(!0))},z=()=>{n(Rw(!1)),n(Xy(!1))},V=()=>{n(cM(!0))},$=()=>{n(Rw(!1)),n(cM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(Y8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const t_e=e=>{mV=e},Vv=()=>mV,n_e=e=>{vV=e},yV=()=>vV,r_e=ct([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i_e=()=>{const e=je(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(r_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},o_e=ct(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),xI=e=>`data:image/svg+xml;utf8, +`,e8e={};function Sb(e,t,n=e8e){if(!gI&&"zIndex"in t&&(console.warn(J9e),gI=!0),!mI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Q9e),mI=!0)}for(var o in n)if(!pI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!pI[o]){var a=o.slice(0,2)==="on",y=n[o]!==t[o];if(a&&y){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Ak,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},t8e={};ch.Node.prototype._applyProps=Sb;function n8e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function r8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return Sb(l,o),l}function i8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function o8e(e,t,n){return!1}function a8e(e){return e}function s8e(){return null}function l8e(){return null}function u8e(e,t,n,r){return t8e}function c8e(){}function d8e(e){}function f8e(e,t){return!1}function h8e(){return dV}function p8e(){return dV}const g8e=setTimeout,m8e=clearTimeout,v8e=-1;function y8e(e,t){return!1}const S8e=!1,b8e=!0,x8e=!0;function w8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function C8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function _8e(e,t,n){fV(e,t,n)}function k8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function E8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function P8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function T8e(e,t,n){}function L8e(e,t,n,r,i){Sb(e,i,r)}function A8e(e){e.hide(),Ld(e)}function M8e(e){}function I8e(e,t){(t.visible==null||t.visible)&&e.show()}function R8e(e,t){}function O8e(e){}function N8e(){}const D8e=()=>Lk.exports.DefaultEventPriority,z8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:n8e,createInstance:r8e,createTextInstance:i8e,finalizeInitialChildren:o8e,getPublicInstance:a8e,prepareForCommit:s8e,preparePortalMount:l8e,prepareUpdate:u8e,resetAfterCommit:c8e,resetTextContent:d8e,shouldDeprioritizeSubtree:f8e,getRootHostContext:h8e,getChildHostContext:p8e,scheduleTimeout:g8e,cancelTimeout:m8e,noTimeout:v8e,shouldSetTextContent:y8e,isPrimaryRenderer:S8e,warnsIfNotActing:b8e,supportsMutation:x8e,appendChild:w8e,appendChildToContainer:C8e,insertBefore:fV,insertInContainerBefore:_8e,removeChild:k8e,removeChildFromContainer:E8e,commitTextUpdate:P8e,commitMount:T8e,commitUpdate:L8e,hideInstance:A8e,hideTextInstance:M8e,unhideInstance:I8e,unhideTextInstance:R8e,clearContainer:O8e,detachDeletedInstance:N8e,getCurrentEventPriority:D8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var B8e=Object.defineProperty,F8e=Object.defineProperties,$8e=Object.getOwnPropertyDescriptors,vI=Object.getOwnPropertySymbols,H8e=Object.prototype.hasOwnProperty,W8e=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?B8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SI=(e,t)=>{for(var n in t||(t={}))H8e.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))W8e.call(t,n)&&yI(e,n,t[n]);return e},V8e=(e,t)=>F8e(e,$8e(t));function Mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Ik=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:U8e,ReactCurrentDispatcher:G8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j8e(){const e=C.exports.useContext(Ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=U8e.current)!=null?r:Mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const om=[],bI=new WeakMap;function Y8e(){var e;const t=j8e();om.splice(0,om.length),Mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Ik&&om.push(hV(i))});for(const n of om){const r=(e=G8e.current)==null?void 0:e.readContext(n);bI.set(n,r)}return C.exports.useMemo(()=>om.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,V8e(SI({},i),{value:bI.get(r)}))),n=>x(pV,{...SI({},n)})),[])}function q8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const K8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=q8e(e),o=Y8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Cm.createContainer(n.current,Lk.exports.LegacyRoot,!1,null),Cm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),Cm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),Sb(n.current,e,i),Cm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",X8e="Transformer",Cm=Z9e(z8e);Cm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const Z8e=ae.forwardRef((e,t)=>x(pV,{children:x(K8e,{...e,forwardedRef:t})})),Q8e=ut([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),J8e=e=>{const{...t}=e,{objects:n}=Ae(Q8e);return x(dh,{listening:!1,...t,children:n.filter(ak).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},e_e=ut(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:sM/v,colorPickerInnerRadius:(sM-d7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),t_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:y,colorPickerOuterRadius:w}=Ae(e_e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:d7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:y,stroke:v,strokeWidth:d7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},n_e=ut(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r_e=e=>{const{...t}=e,n=je(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:y,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(n_e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Mw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Mw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Mw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Ow(!0))},z=()=>{n(Ow(!1)),n(Xy(!1))},V=()=>{n(cM(!0))},$=()=>{n(Ow(!1)),n(cM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&y==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(X8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:y==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&y==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const i_e=e=>{mV=e},Uv=()=>mV,o_e=e=>{vV=e},yV=()=>vV,a_e=ut([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),s_e=()=>{const e=je(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(a_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},l_e=ut(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),xI=e=>`data:image/svg+xml;utf8, @@ -615,9 +615,9 @@ For more info see: https://github.com/konvajs/react-konva/issues/194 -`.replaceAll("black",e),a_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(o_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=xI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=xI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},s_e=ct([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),l_e=e=>{const t=je(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(s_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},Sb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=je(),t=Vv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},u_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),c_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(u_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=Sb(e.current);!a||(o.evt.preventDefault(),t(ob(!0)),t(_H([a.x,a.y])))},[e,n,r,t,i])},d_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f_e=(e,t)=>{const n=je(),{tool:r,isDrawing:i,isStaging:o}=Ae(d_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=Sb(e.current);if(!a)return;n(kH([a.x,a.y]))}else t.current=!1;n(ob(!1))},[t,n,i,o,e,r])},h_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),p_e=(e,t,n)=>{const r=je(),{isDrawing:i,tool:o,isStaging:a}=Ae(h_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=Sb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(kH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},g_e=ct([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),m_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(g_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=Sb(e.current);!o||n==="move"||r||(t(ob(!0)),t(_H([o.x,o.y])))},[e,n,r,t])},v_e=()=>{const e=je();return C.exports.useCallback(()=>{e(TH(null)),e(ob(!1))},[e])},y_e=ct([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=()=>{const e=je(),{tool:t,isStaging:n}=Ae(y_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,b_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=b_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},x_e=ct([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const{objects:e}=Ae(x_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},C_e=ct([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),__e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},k_e=()=>{const{colorMode:e}=Xv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(C_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=__e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},E_e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e=e=>{const{...t}=e,n=Ae(E_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,T_e=ct([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function L_e(){const{cursorCoordinatesString:e}=Ae(T_e);return x("div",{children:`Cursor Position: ${e}`})}const A_e=ct([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:S}=e;let w="inherit";return(S==="none"&&(o<512||a<512)||S==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:S!=="auto",shouldShowScaledBoundingBox:S!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),M_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(A_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(L_e,{})]})]})},I_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),R_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(I_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},O_e=ct([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),N_e=()=>{const e=je(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(O_e),o=C.exports.useCallback(()=>{e(dM(!1))},[e]),a=C.exports.useCallback(()=>{e(dM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(nk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(dH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},D_e=ct([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?g?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),z_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(D_e);i_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{n_e($),g.current=$},[]),S=C.exports.useCallback($=>{t_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=l_e(g),k=c_e(g),T=f_e(g,E),M=p_e(g,E,w),R=m_e(g),O=v_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=S_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(q8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(k_e,{})}),x(v3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(w_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(X8e,{visible:!0,listening:!1}),x(a_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(Q8e,{visible:l!=="move",listening:!1}),x(R_e,{visible:u}),h&&x(P_e,{}),x(e_e,{visible:n&&!u})]})]}),x(M_e,{}),x(N_e,{})]})})},B_e=ct([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function F_e(){const e=je(),{canUndo:t,activeTabName:n}=Ae(B_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const $_e=ct([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function H_e(){const e=je(),{canRedo:t,activeTabName:n}=Ae($_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Iv(),m=C.exports.useRef(null),v=()=>{r(),g()},S=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(LF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(zv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),W_e=()=>{const e=je();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(PH()),e(EH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},V_e=()=>{const e=je();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(EH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},U_e=ct([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),G_e=()=>{const e=je(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(U_e);return lt(["n"],()=>{e(fM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ik,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(fM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(V_e,{}),x(W_e,{})]})})};function bb(){return(bb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function R7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(wI(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=O7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(CI(P),!function(M,R){return R&&!Jm(M)}(P,l.current)&&k)){if(Jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(wI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),xb=function(e){return e.filter(Boolean).join(" ")},Ok=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=xb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},N7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Zw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},j_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},Y_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},q_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=xb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Rk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ok,{className:"react-colorful__hue-pointer",left:t/360,color:N7({h:t,s:100,v:100,a:1})})))}),K_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:N7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Rk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ok,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:N7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function X_e(e,t,n){var r=R7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Z_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Q_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_I=new Map,J_e=function(e){Z_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_I.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_I.set(t,n);var r=Q_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},eke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Zw(Object.assign({},n,{a:0}))+", "+Zw(Object.assign({},n,{a:1}))+")"},o=xb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Rk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ok,{className:"react-colorful__alpha-pointer",left:n.a,color:Zw(n)})))},tke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);J_e(s);var l=X_e(n,i,o),u=l[0],h=l[1],g=xb(["react-colorful",t]);return ae.createElement("div",bb({},a,{ref:s,className:g}),x(K_e,{hsva:u,onChange:h}),x(q_e,{hue:u.h,onChange:h}),ae.createElement(eke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},nke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Y_e,fromHsva:j_e,equal:_V},rke=function(e){return ae.createElement(tke,bb({},e,{colorModel:nke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(rke,{className:`invokeai__color-picker ${t}`,...n})},ike=ct([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),oke=()=>{const e=je(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ike);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const ake=new Uint8Array(16);function ske(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(ake)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function lke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const uke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kI={randomUUID:uke};function c0(e,t,n){if(kI.randomUUID&&!t&&!e)return kI.randomUUID();e=e||{};const r=e.random||(e.rng||ske)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return lke(r)}const cke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},dke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},fke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},hke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=hke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=Vv();if(!S){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=cke(S,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(dke(M),t(gm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(fke(M,R,O),t(gm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(gm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(gm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},pke=ct([Rn,Ru,v2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),gke=()=>{const e=je(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(pke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Iw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Iw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Mw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Mw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(fH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Iw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mw(l))})]})})]})};let EI;const EV=()=>({setOpenUploader:e=>{e&&(EI=e)},openUploader:EI}),mke=ct([v2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),vke=()=>{const e=je(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(mke),s=Vv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Vv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(PH()),e(uk())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(oke,{}),x(gke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(dH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:S,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(cH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(F_e,{}),x(H_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(rk,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(G_e,{})})]})},yke=ct([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),Ske=()=>{const e=je(),{doesCanvasNeedScaling:t}=Ae(yke);return C.exports.useLayoutEffect(()=>{const n=qe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(vke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(DCe,{}):x(z_e,{})})]})})})};function bke(){const e=je();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(xk,{optionsPanel:x(OCe,{}),styleClass:"inpainting-workarea-overrides",children:x(Ske,{})})}const xke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function wke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Cke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(xke,{fill:"black",boxSize:"2.5rem"}),workarea:x(bke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Cke,{fill:"black",boxSize:"2.5rem"}),workarea:x(wke,{}),tooltip:"Training"}},wb=qe.map(If,(e,t)=>t);[...wb];function _ke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=je();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(i$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(n$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(t$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(r$,{className:"app-tabs-panels",children:t?x(_Ce,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},kke=PV,TV=$S({name:"options",initialState:kke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=wb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:DTe,resetSeed:zTe,setActiveTab:ko,setAllImageToImageParameters:Eke,setAllParameters:Pke,setAllTextToImageParameters:Tke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Lke,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:D7,setInfillMethod:OV,setInitialImage:S2,setIsLightBoxOpen:pd,setIterations:Ake,setMaskPath:NV,setOptionsPanelScrollPosition:Mke,setParameter:BTe,setPerlin:DV,setPrompt:Cb,setSampler:zV,setSeamBlur:PI,setSeamless:BV,setSeamSize:TI,setSeamSteps:LI,setSeamStrength:AI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Ike,setShouldHoldOptionsPanelOpen:Rke,setShouldLoopback:Oke,setShouldPinOptionsPanel:Nke,setShouldRandomizeSeed:Dke,setShouldRunESRGAN:zke,setShouldRunFacetool:Bke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:FTe,setShowDualDisplay:Fke,setSteps:WV,setThreshold:VV,setTileSize:MI,setUpscalingLevel:z7,setUpscalingStrength:B7,setVariationAmount:$ke,setWidth:UV}=TV.actions,Hke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Wke={type:"error",data:"parser error"},Vke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Uke=typeof ArrayBuffer=="function",Gke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>Vke&&t instanceof Blob?n?r(t):II(t,r):Uke&&(t instanceof ArrayBuffer||Gke(t))?n?r(t):II(new Blob([t]),r):r(zl[e]+(t||"")),II=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},RI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Yke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:qke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Wke},qke=(e,t)=>{if(Yke){const n=jke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Kke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Xke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Qke=setTimeout,Jke=clearTimeout;function _b(e,t){t.useNativeTimers?(e.setTimeoutFn=Qke.bind(Gc),e.clearTimeoutFn=Jke.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const eEe=1.33;function tEe(e){return typeof e=="string"?nEe(e):Math.ceil((e.byteLength||e.size)*eEe)}function nEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class rEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,_b(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new rEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),F7=64,iEe={};let OI=0,b3=0,NI;function DI(e){let t="";do t=QV[e%F7]+t,e=Math.floor(e/F7);while(e>0);return t}function JV(){const e=DI(+new Date);return e!==NI?(OI=0,NI=e):e+"."+DI(OI++)}for(;b3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Xke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Kke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),_b(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=sEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,zI,!1)}}function zI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,BI=!0,cEe="arraybuffer",FI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class dEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=FI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=BI&&!FI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||cEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{BI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const fEe={websocket:dEe,polling:uEe},hEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hEe.exec(e||""),o={},a=14;for(;a--;)o[pEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=gEe(o,o.path),o.queryKey=mEe(o,o.query),o}function gEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function mEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=$7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=$7(n.host).host),_b(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=oEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new fEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,bEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",xEe=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Nk(e){return yEe&&(e instanceof ArrayBuffer||SEe(e))||bEe&&e instanceof Blob||xEe&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class EEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=CEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const PEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:_Ee,get PacketType(){return nn},Encoder:kEe,Decoder:Dk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const TEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(TEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}P1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};P1.prototype.reset=function(){this.attempts=0};P1.prototype.setMin=function(e){this.ms=e};P1.prototype.setMax=function(e){this.max=e};P1.prototype.setJitter=function(e){this.jitter=e};class V7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_b(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new P1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||PEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const om={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=vEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=om[i]&&o in om[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new V7(r,t):(om[i]||(om[i]=new V7(r,t)),l=om[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:V7,Socket:oU,io:l5,connect:l5});var LEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,AEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,MEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String($I[t]||t||$I.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return IEe(e)},E=function(){return REe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":OEe(e)},o:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+ea(Math.floor(Math.abs(S())/60),2)+":"+ea(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(LEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var $I={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},HI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},IEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},REe=function(t){var n=t.getDay();return n===0&&(n=7),n},OEe=function(t){return(String(t).match(AEe)||[""]).pop().replace(MEe,"").replace(/GMT\+0000/g,"UTC")};const NEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(eM(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(iM("user")):t(l7("user")),r.categories.result.latest_mtime?t(iM("result")):t(l7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(eM(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(wb[a]){case"img2img":{t(S2(h));break}}t(Ow()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(tM()),t(Ow())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Ow())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(Su(!1)),t(i0(!0)),t(tM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(gm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},DEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},zEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},BEe=e=>{const t=Vv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?tH(U_,G_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ut,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=DEe(et?dt.filter(ok):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ut),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&zEe([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=S,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},FEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=BEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},$Ee=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=NEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=FEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>S(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},HEe=["cursorPosition"].map(e=>`canvas.${e}`),WEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),VEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=p$({options:Hke,gallery:pbe,system:h4e,canvas:QSe}),UEe=O$.getPersistConfig({key:"root",storage:R$,rootReducer:aU,blacklist:[...HEe,...WEe,...VEe],debounce:300}),GEe=pye(UEe,aU),sU=l2e({reducer:GEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat($Ee()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),je=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function jEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(a2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ZEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),QEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ZEe),i=t?Math.round(t*100/n):0;return x(zF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function JEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function ePe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Iv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(JEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Bv,{className:" modal hotkeys-modal",children:[x(f_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const tPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=je(),{name:i,status:o,description:a}=e,s=()=>{r(gH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(uB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},nPe=ct(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),rPe=()=>{const{models:e}=Ae(nPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(tPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},iPe=ct([v2,Q_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),oPe=({children:e})=>{const t=je(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Iv(),{isOpen:a,onOpen:s,onClose:l}=Iv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(iPe),S=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Bv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(f_,{className:"modal-close-btn"}),ee(zv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(rPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(iH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Bv,{children:x(zv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},aPe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),sPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(aPe),s=je();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(oH())},className:`status ${l}`,children:u})})},lPe=["dark","light","green"];function uPe(){const{setColorMode:e}=Xv(),t=je(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Lke(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(fB,{align:"stretch",children:lPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(nk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const cPe=ct([v2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dPe=()=>{const e=je(),{models:t,activeModel:n,isProcessing:r}=Ae(cPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(gH(o.target.value))}})})},fPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(sPe,{}),x(dPe,{}),x(ePe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(uPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(oPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ik,{})})})]})]}),hPe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),pPe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),gPe=()=>{const e=je(),t=Ae(hPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(pPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(oH()),e(Tw(!n))};return lt("`",()=>{e(Tw(!n))},[n]),lt("esc",()=>{e(Tw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ee("div",{className:`console-entry console-${S}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(uH,{}),onClick:l})})]})};function mPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var vPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=yPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function yPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=vPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var SPe=[".DS_Store","Thumbs.db"];function bPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&xPe(e.dataTransfer)?[2,kPe(e.dataTransfer,e.type)]:wPe(e)?[2,CPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,_Pe(e)]:[2,[]]})})}function xPe(e){return E4(e)}function wPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function CPe(e){return j7(e.target.files).map(function(t){return x2(t)})}function _Pe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function kPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=j7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(EPe))]):[3,2];case 1:return r=i.sent(),[2,VI(uU(r))];case 2:return[2,VI(j7(e.files).map(function(o){return x2(o)}))]}})})}function VI(e){return e.filter(function(t){return SPe.indexOf(t.name)===-1})}function j7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,qI(n)];if(e.sizen)return[!1,qI(n)]}return[!0,null]}function Rf(e){return e!=null}function WPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hU(l,n),h=Uv(u,1),g=h[0],m=pU(l,r,i),v=Uv(m,1),S=v[0],w=s?s(l):null;return g&&S&&!w})}function P4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function w3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function XI(e){e.preventDefault()}function VPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function UPe(e){return e.indexOf("Edge/")!==-1}function GPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return VPe(e)||UPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function lTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,ZPe),i=SU(r),o=i.open,a=T4(i,QPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});zk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:bPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};zk.defaultProps=yU;zk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var X7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return qPe(n)},[n]),j=C.exports.useMemo(function(){return YPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:QI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:QI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(uTe,X7),K=Qw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&jPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",XI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",XI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(tTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&WPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Qw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Qw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[HPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&S&&S(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,S,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ut=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){KPe(Ze)?(W(Ze),X({type:"closeDialog"})):XPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(GPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,JPe);return ur(ur(K7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,eTe),ze=K7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ut)})}function uTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},X7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},X7);default:return e}}function QI(){}const cTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},JI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(ck(u)):o==="img2img"&&t(S2(u))},dTe=e=>{const{children:t}=e,n=je(),r=Ae(_r),i=h2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` -`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(JI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(JI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(fk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(cTe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},fTe=()=>{const e=je(),t=Ae(LCe),n=h2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ct([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),hTe=()=>{const e=je(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(fH,{})}),r&&ee(Ln,{children:[x(mH,{iconButton:!0}),x(vH,{})]})]}):null},pTe=()=>{const e=je(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Li(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(aH,{})}):null};mPe();const gTe=()=>(fTe(),ee("div",{className:"App",children:[ee(dTe,{children:[x(QEe,{}),ee("div",{className:"app-content",children:[x(fPe,{}),x(_ke,{})]}),x("div",{className:"app-console",children:x(gPe,{})})]}),x(hTe,{}),x(pTe,{})]}));const xU=bye(sU),mTe=EN({key:"invokeai-style-cache",prepend:!0});e6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(XEe,{}),persistor:xU,children:x(LJ,{value:mTe,children:x(Eve,{children:x(gTe,{})})})})})})); +`.replaceAll("black",e),u_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(l_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=xI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=xI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},c_e=ut([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d_e=e=>{const t=je(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(c_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},bb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=je(),t=Uv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},f_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),h_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(f_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=bb(e.current);!a||(o.evt.preventDefault(),t(ab(!0)),t(_H([a.x,a.y])))},[e,n,r,t,i])},p_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),g_e=(e,t)=>{const n=je(),{tool:r,isDrawing:i,isStaging:o}=Ae(p_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=bb(e.current);if(!a)return;n(kH([a.x,a.y]))}else t.current=!1;n(ab(!1))},[t,n,i,o,e,r])},m_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),v_e=(e,t,n)=>{const r=je(),{isDrawing:i,tool:o,isStaging:a}=Ae(m_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=bb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(kH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},y_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(y_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=bb(e.current);!o||n==="move"||r||(t(ab(!0)),t(_H([o.x,o.y])))},[e,n,r,t])},b_e=()=>{const e=je();return C.exports.useCallback(()=>{e(TH(null)),e(ab(!1))},[e])},x_e=ut([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const e=je(),{tool:t,isStaging:n}=Ae(x_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,C_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=C_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},__e=ut([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),k_e=()=>{const{objects:e}=Ae(__e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},E_e=ut([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},T_e=()=>{const{colorMode:e}=Zv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(E_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=P_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},y={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,y.x1),y1:Math.min(m.y1,y.y1),x2:Math.max(m.x2,y.x2),y2:Math.max(m.y2,y.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},L_e=ut([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),A_e=e=>{const{...t}=e,n=Ae(L_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,M_e=ut([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function I_e(){const{cursorCoordinatesString:e}=Ae(M_e);return x("div",{children:`Cursor Position: ${e}`})}const R_e=ut([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:y}=e;let w="inherit";return(y==="none"&&(o<512||a<512)||y==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),O_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(R_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(I_e,{})]})]})},N_e=ut([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),D_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(N_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},z_e=ut([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),B_e=()=>{const e=je(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(z_e),o=C.exports.useCallback(()=>{e(dM(!1))},[e]),a=C.exports.useCallback(()=>{e(dM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(rk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(dH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},F_e=ut([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let y="";return h==="move"||t?g?y="grabbing":y="grab":o?y=void 0:a?y="move":y="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:y,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(F_e);s_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{o_e($),g.current=$},[]),y=C.exports.useCallback($=>{i_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=d_e(g),k=h_e(g),T=g_e(g,E),M=v_e(g,E,w),R=S_e(g),O=b_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=w_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(Z8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(T_e,{})}),x(v3,{id:"base",ref:y,listening:!1,imageSmoothingEnabled:!1,children:x(k_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(J8e,{visible:!0,listening:!1}),x(u_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(t_e,{visible:l!=="move",listening:!1}),x(D_e,{visible:u}),h&&x(A_e,{}),x(r_e,{visible:n&&!u})]})]}),x(O_e,{}),x(B_e,{})]})})},H_e=ut([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function W_e(){const e=je(),{canUndo:t,activeTabName:n}=Ae(H_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const V_e=ut([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function U_e(){const e=je(),{canRedo:t,activeTabName:n}=Ae(V_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Rv(),m=C.exports.useRef(null),v=()=>{r(),g()},y=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(LF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(Bv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:y,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),G_e=()=>{const e=je();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(PH()),e(EH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},j_e=()=>{const e=je();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(EH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},Y_e=ut([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),q_e=()=>{const e=je(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(Y_e);return lt(["n"],()=>{e(fM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ok,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(fM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(j_e,{}),x(G_e,{})]})})};function xb(){return(xb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function O7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(wI(i.current,E,s.current)):w(!1)},y=function(){return w(!1)};function w(E){var P=l.current,k=N7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",y)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(CI(P),!function(M,R){return R&&!ev(M)}(P,l.current)&&k)){if(ev(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(wI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...xb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),wb=function(e){return e.filter(Boolean).join(" ")},Ok=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=wb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},D7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Qw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},K_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},X_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},Z_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=wb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Rk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ok,{className:"react-colorful__hue-pointer",left:t/360,color:D7({h:t,s:100,v:100,a:1})})))}),Q_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:D7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Rk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ok,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:D7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function J_e(e,t,n){var r=O7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var eke=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,tke=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_I=new Map,nke=function(e){eke(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_I.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_I.set(t,n);var r=tke();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},rke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Qw(Object.assign({},n,{a:0}))+", "+Qw(Object.assign({},n,{a:1}))+")"},o=wb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Rk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ok,{className:"react-colorful__alpha-pointer",left:n.a,color:Qw(n)})))},ike=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);nke(s);var l=J_e(n,i,o),u=l[0],h=l[1],g=wb(["react-colorful",t]);return ae.createElement("div",xb({},a,{ref:s,className:g}),x(Q_e,{hsva:u,onChange:h}),x(Z_e,{hue:u.h,onChange:h}),ae.createElement(rke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},oke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:X_e,fromHsva:K_e,equal:_V},ake=function(e){return ae.createElement(ike,xb({},e,{colorModel:oke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(ake,{className:`invokeai__color-picker ${t}`,...n})},ske=ut([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),lke=()=>{const e=je(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ske);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const uke=new Uint8Array(16);function cke(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(uke)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function dke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const fke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kI={randomUUID:fke};function c0(e,t,n){if(kI.randomUUID&&!t&&!e)return kI.randomUUID();e=e||{};const r=e.random||(e.rng||cke)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return dke(r)}const hke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},pke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},gke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},mke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=mke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,y=Uv();if(!y){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=hke(y,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(pke(M),t(mm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(gke(M,R,O),t(mm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(mm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(mm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},vke=ut([Rn,Ru,y2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),yke=()=>{const e=je(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(vke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Rw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Rw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Iw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Iw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(fH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Rw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Iw(l))})]})})]})};let EI;const EV=()=>({setOpenUploader:e=>{e&&(EI=e)},openUploader:EI}),Ske=ut([y2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),bke=()=>{const e=je(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(Ske),s=Uv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{y()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Uv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(PH()),e(ck())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},y=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(lke,{}),x(yke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(dH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:y,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(cH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(W_e,{}),x(U_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(ik,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(q_e,{})})]})},xke=ut([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),wke=()=>{const e=je(),{doesCanvasNeedScaling:t}=Ae(xke);return C.exports.useLayoutEffect(()=>{const n=qe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(bke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(FCe,{}):x($_e,{})})]})})})};function Cke(){const e=je();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(xk,{optionsPanel:x(zCe,{}),styleClass:"inpainting-workarea-overrides",children:x(wke,{})})}const _ke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function kke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Eke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(p6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(_ke,{fill:"black",boxSize:"2.5rem"}),workarea:x(Cke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Eke,{fill:"black",boxSize:"2.5rem"}),workarea:x(kke,{}),tooltip:"Training"}},Cb=qe.map(If,(e,t)=>t);[...Cb];function Pke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=je();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(i$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(n$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(t$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(r$,{className:"app-tabs-panels",children:t?x(PCe,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Tke=PV,TV=$S({name:"options",initialState:Tke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:y,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),y&&(e.height=y),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=Cb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:FTe,resetSeed:$Te,setActiveTab:ko,setAllImageToImageParameters:Lke,setAllParameters:Ake,setAllTextToImageParameters:Mke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Ike,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:z7,setInfillMethod:OV,setInitialImage:P1,setIsLightBoxOpen:pd,setIterations:Rke,setMaskPath:NV,setOptionsPanelScrollPosition:Oke,setParameter:HTe,setPerlin:DV,setPrompt:_b,setSampler:zV,setSeamBlur:PI,setSeamless:BV,setSeamSize:TI,setSeamSteps:LI,setSeamStrength:AI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Nke,setShouldHoldOptionsPanelOpen:Dke,setShouldLoopback:zke,setShouldPinOptionsPanel:Bke,setShouldRandomizeSeed:Fke,setShouldRunESRGAN:$ke,setShouldRunFacetool:Hke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:WTe,setShowDualDisplay:Wke,setSteps:WV,setThreshold:VV,setTileSize:MI,setUpscalingLevel:B7,setUpscalingStrength:F7,setVariationAmount:Vke,setWidth:UV}=TV.actions,Uke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Gke={type:"error",data:"parser error"},jke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yke=typeof ArrayBuffer=="function",qke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>jke&&t instanceof Blob?n?r(t):II(t,r):Yke&&(t instanceof ArrayBuffer||qke(t))?n?r(t):II(new Blob([t]),r):r(zl[e]+(t||"")),II=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},RI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_m=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Xke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Zke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Gke},Zke=(e,t)=>{if(Xke){const n=Kke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Qke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Jke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const tEe=setTimeout,nEe=clearTimeout;function kb(e,t){t.useNativeTimers?(e.setTimeoutFn=tEe.bind(Gc),e.clearTimeoutFn=nEe.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const rEe=1.33;function iEe(e){return typeof e=="string"?oEe(e):Math.ceil((e.byteLength||e.size)*rEe)}function oEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class aEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,kb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new aEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),$7=64,sEe={};let OI=0,b3=0,NI;function DI(e){let t="";do t=QV[e%$7]+t,e=Math.floor(e/$7);while(e>0);return t}function JV(){const e=DI(+new Date);return e!==NI?(OI=0,NI=e):e+"."+DI(OI++)}for(;b3<$7;b3++)sEe[QV[b3]]=b3;function eU(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function lEe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Jke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Qke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),kb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=cEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,zI,!1)}}function zI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,BI=!0,hEe="arraybuffer",FI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=FI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=BI&&!FI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||hEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{BI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const gEe={websocket:pEe,polling:fEe},mEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=mEe.exec(e||""),o={},a=14;for(;a--;)o[vEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=yEe(o,o.path),o.queryKey=SEe(o,o.query),o}function yEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function SEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=H7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=H7(n.host).host),kb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=lEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new gEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,CEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",_Ee=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Nk(e){return xEe&&(e instanceof ArrayBuffer||wEe(e))||CEe&&e instanceof Blob||_Ee&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class LEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=EEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const AEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:PEe,get PacketType(){return nn},Encoder:TEe,Decoder:Dk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const MEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(MEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}T1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};T1.prototype.reset=function(){this.attempts=0};T1.prototype.setMin=function(e){this.ms=e};T1.prototype.setMax=function(e){this.max=e};T1.prototype.setJitter=function(e){this.jitter=e};class U7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,kb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new T1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||AEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const am={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=am[i]&&o in am[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new U7(r,t):(am[i]||(am[i]=new U7(r,t)),l=am[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:U7,Socket:oU,io:l5,connect:l5});var IEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,REe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,OEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String($I[t]||t||$I.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},y=function(){return n?0:e.getTimezoneOffset()},w=function(){return NEe(e)},E=function(){return DEe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":zEe(e)},o:function(){return(y()>0?"-":"+")+ea(Math.floor(Math.abs(y())/60)*100+Math.abs(y())%60,4)},p:function(){return(y()>0?"-":"+")+ea(Math.floor(Math.abs(y())/60),2)+":"+ea(Math.floor(Math.abs(y())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(IEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var $I={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},HI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},y=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return y()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},NEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},DEe=function(t){var n=t.getDay();return n===0&&(n=7),n},zEe=function(t){return(String(t).match(REe)||[""]).pop().replace(OEe,"").replace(/GMT\+0000/g,"UTC")};const BEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(eM(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(iM("user")):t(u7("user")),r.categories.result.latest_mtime?t(iM("result")):t(u7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(eM(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(Cb[a]){case"img2img":{t(P1(h));break}}t(Nw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(tM()),t(Nw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Nw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(Su(!1)),t(i0(!0)),t(tM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(mm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},FEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},$Ee=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},HEe=e=>{const t=Uv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:y,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?tH(G_,j_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ct,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=FEe(et?dt.filter(ak):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ct),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&$Ee([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=y,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},WEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=HEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},VEe=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:y,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=BEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=WEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>y(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},UEe=["cursorPosition"].map(e=>`canvas.${e}`),GEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),jEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=p$({options:Uke,gallery:pbe,system:h4e,canvas:QSe}),YEe=O$.getPersistConfig({key:"root",storage:R$,rootReducer:aU,blacklist:[...UEe,...GEe,...jEe],debounce:300}),qEe=pye(YEe,aU),sU=l2e({reducer:qEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(VEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),je=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function KEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(s2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ePe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),tPe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ePe),i=t?Math.round(t*100/n):0;return x(zF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function nPe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function rPe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Rv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(nPe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Fv,{className:" modal hotkeys-modal",children:[x(h_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const iPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=je(),{name:i,status:o,description:a}=e,s=()=>{r(gH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(uB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},oPe=ut(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),aPe=()=>{const{models:e}=Ae(oPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(iPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},sPe=ut([y2,J_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),lPe=({children:e})=>{const t=je(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Rv(),{isOpen:a,onOpen:s,onClose:l}=Rv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(sPe),y=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Fv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(h_,{className:"modal-close-btn"}),ee(Bv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(aPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(iH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:y,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Fv,{children:x(Bv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},uPe=ut(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),cPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(uPe),s=je();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(oH())},className:`status ${l}`,children:u})})},dPe=["dark","light","green"];function fPe(){const{setColorMode:e}=Zv(),t=je(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Ike(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(fB,{align:"stretch",children:dPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(rk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const hPe=ut([y2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),pPe=()=>{const e=je(),{models:t,activeModel:n,isProcessing:r}=Ae(hPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(gH(o.target.value))}})})},gPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(cPe,{}),x(pPe,{}),x(rPe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(fPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(lPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ok,{})})})]})]}),mPe=ut(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),vPe=ut(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),yPe=()=>{const e=je(),t=Ae(mPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(vPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(oH()),e(Lw(!n))};return lt("`",()=>{e(Lw(!n))},[n]),lt("esc",()=>{e(Lw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:y}=h;return ee("div",{className:`console-entry console-${y}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(uH,{}),onClick:l})})]})};function SPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var bPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=xPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function xPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=bPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var wPe=[".DS_Store","Thumbs.db"];function CPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&_Pe(e.dataTransfer)?[2,TPe(e.dataTransfer,e.type)]:kPe(e)?[2,EPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,PPe(e)]:[2,[]]})})}function _Pe(e){return E4(e)}function kPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function EPe(e){return Y7(e.target.files).map(function(t){return x2(t)})}function PPe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function TPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=Y7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(LPe))]):[3,2];case 1:return r=i.sent(),[2,VI(uU(r))];case 2:return[2,VI(Y7(e.files).map(function(o){return x2(o)}))]}})})}function VI(e){return e.filter(function(t){return wPe.indexOf(t.name)===-1})}function Y7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,qI(n)];if(e.sizen)return[!1,qI(n)]}return[!0,null]}function Rf(e){return e!=null}function GPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hU(l,n),h=Gv(u,1),g=h[0],m=pU(l,r,i),v=Gv(m,1),y=v[0],w=s?s(l):null;return g&&y&&!w})}function P4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function w3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function XI(e){e.preventDefault()}function jPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YPe(e){return e.indexOf("Edge/")!==-1}function qPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return jPe(e)||YPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function dTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,eTe),i=SU(r),o=i.open,a=T4(i,tTe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});zk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:CPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};zk.defaultProps=yU;zk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var Z7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return ZPe(n)},[n]),j=C.exports.useMemo(function(){return XPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:QI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:QI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(fTe,Z7),K=Jw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&KPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",XI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",XI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(iTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&GPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Jw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Jw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[UPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&y&&y(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,y,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ct=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){QPe(Ze)?(W(Ze),X({type:"closeDialog"})):JPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ct())},[Q,ct]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(qPe()?setTimeout(ct,0):ct())},[M,ct]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,nTe);return ur(ur(X7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,rTe),ze=X7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ct)})}function fTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},Z7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},Z7);default:return e}}function QI(){}const hTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},JI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(ob(u)):o==="img2img"&&t(P1(u))},pTe=e=>{const{children:t}=e,n=je(),r=Ae(_r),i=p2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` +`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(JI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:y,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(JI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(fk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(hTe,{isDragAccept:v,isDragReject:y,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},gTe=()=>{const e=je(),t=Ae(ICe),n=p2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ut([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),mTe=()=>{const e=je(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(fH,{})}),r&&ee(Ln,{children:[x(mH,{iconButton:!0}),x(vH,{})]})]}):null},vTe=()=>{const e=je(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Li(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(aH,{})}):null};SPe();const yTe=()=>(gTe(),ee("div",{className:"App",children:[ee(pTe,{children:[x(tPe,{}),ee("div",{className:"app-content",children:[x(gPe,{}),x(Pke,{})]}),x("div",{className:"app-console",children:x(yPe,{})})]}),x(mTe,{}),x(vTe,{})]}));const xU=bye(sU),STe=EN({key:"invokeai-style-cache",prepend:!0});t6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(JEe,{}),persistor:xU,children:x(LJ,{value:STe,children:x(Eve,{children:x(yTe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 934a3aa947..154920b459 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ InvokeAI - A Stable Diffusion Toolkit - + diff --git a/frontend/src/features/gallery/components/CurrentImagePreview.tsx b/frontend/src/features/gallery/components/CurrentImagePreview.tsx index 2f83b6c2d4..d000a81e82 100644 --- a/frontend/src/features/gallery/components/CurrentImagePreview.tsx +++ b/frontend/src/features/gallery/components/CurrentImagePreview.tsx @@ -1,5 +1,5 @@ import { IconButton, Image } from '@chakra-ui/react'; -import { DragEvent, useState } from 'react'; +import { useState } from 'react'; import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; import { RootState, useAppDispatch, useAppSelector } from 'app/store'; import { @@ -12,19 +12,13 @@ import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; import { OptionsState, - setInitialImage, setIsLightBoxOpen, } from 'features/options/store/optionsSlice'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; -import { activeTabNameSelector } from 'features/options/store/optionsSelectors'; export const imagesSelector = createSelector( - [ - (state: RootState) => state.gallery, - (state: RootState) => state.options, - activeTabNameSelector, - ], - (gallery: GalleryState, options: OptionsState, activeTabName) => { + [(state: RootState) => state.gallery, (state: RootState) => state.options], + (gallery: GalleryState, options: OptionsState) => { const { currentCategory, currentImage, intermediateImage } = gallery; const { shouldShowImageDetails } = options; @@ -38,7 +32,6 @@ export const imagesSelector = createSelector( const imagesLength = tempImages.length; return { - activeTabName, imageToDisplay: intermediateImage ? intermediateImage : currentImage, isIntermediate: Boolean(intermediateImage), viewerImageToDisplay: currentImage, @@ -68,7 +61,6 @@ export default function CurrentImagePreview() { shouldShowImageDetails, imageToDisplay, isIntermediate, - activeTabName, } = useAppSelector(imagesSelector); const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = From b0697bc4fff1b3656af2ece72073470d4a4277cb Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 26 Nov 2022 22:09:30 +1300 Subject: [PATCH 217/220] Fix desktop mode being broken with new versions of flaskwebgui --- backend/invoke_ai_web_server.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index c719f78b1a..42821d472d 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -202,22 +202,16 @@ class InvokeAIWebServer: if args.gui: print(">> Launching Invoke AI GUI") - close_server_on_exit = True - if args.web_develop: - close_server_on_exit = False try: from flaskwebgui import FlaskUI FlaskUI( app=self.app, socketio=self.socketio, - start_server="flask-socketio", - host=self.host, - port=self.port, + server="flask_socketio", width=1600, height=1000, - idle_interval=10, - close_server_on_exit=close_server_on_exit, + port=self.port ).run() except KeyboardInterrupt: import sys From 3131edb2554c58cefe1012bd5f6651821ecedb82 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 26 Nov 2022 20:50:07 +1100 Subject: [PATCH 218/220] Fixes canvas dimensions not setting on first load --- frontend/src/app/store.ts | 8 +++++--- frontend/src/features/canvas/store/canvasSlice.ts | 1 + frontend/src/features/tabs/components/InvokeTabs.tsx | 2 -- .../components/UnifiedCanvas/UnifiedCanvasDisplay.tsx | 5 +++++ .../components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx | 7 ------- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/store.ts b/frontend/src/app/store.ts index 5e8a4bc873..8bb9f87f6e 100644 --- a/frontend/src/app/store.ts +++ b/frontend/src/app/store.ts @@ -28,9 +28,11 @@ import { socketioMiddleware } from './socketio/middleware'; * The necesssary nested persistors with blacklists are configured below. */ -const canvasBlacklist = ['cursorPosition'].map( - (blacklistItem) => `canvas.${blacklistItem}` -); +const canvasBlacklist = [ + 'cursorPosition', + 'isCanvasInitialized', + 'doesCanvasNeedScaling', +].map((blacklistItem) => `canvas.${blacklistItem}`); const systemBlacklist = [ 'currentIteration', diff --git a/frontend/src/features/canvas/store/canvasSlice.ts b/frontend/src/features/canvas/store/canvasSlice.ts index c2470afa99..48c29f10e9 100644 --- a/frontend/src/features/canvas/store/canvasSlice.ts +++ b/frontend/src/features/canvas/store/canvasSlice.ts @@ -503,6 +503,7 @@ export const canvasSlice = createSlice({ state.stageScale = newScale; state.stageCoordinates = newCoordinates; + state.stageDimensions = newStageDimensions; state.boundingBoxCoordinates = { x: 0, y: 0 }; state.boundingBoxDimensions = { width: 512, height: 512 }; return; diff --git a/frontend/src/features/tabs/components/InvokeTabs.tsx b/frontend/src/features/tabs/components/InvokeTabs.tsx index 0959853436..8d6204edc1 100644 --- a/frontend/src/features/tabs/components/InvokeTabs.tsx +++ b/frontend/src/features/tabs/components/InvokeTabs.tsx @@ -16,7 +16,6 @@ import { import ImageToImageWorkarea from './ImageToImage'; import TextToImageWorkarea from './TextToImage'; import Lightbox from 'features/lightbox/components/Lightbox'; -import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import UnifiedCanvasWorkarea from './UnifiedCanvas/UnifiedCanvasWorkarea'; import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; import TrainingWIP from 'common/components/WorkInProgress/Training'; @@ -143,7 +142,6 @@ export default function InvokeTabs() { index={activeTab} onChange={(index: number) => { dispatch(setActiveTab(index)); - dispatch(setDoesCanvasNeedScaling(true)); }} >
{renderTabs()}
diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx index 2842df9157..8b845a4bb3 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx @@ -26,13 +26,18 @@ const selector = createSelector( const UnifiedCanvasDisplay = () => { const dispatch = useAppDispatch(); + const { doesCanvasNeedScaling } = useAppSelector(selector); useLayoutEffect(() => { + dispatch(setDoesCanvasNeedScaling(true)); + const resizeCallback = _.debounce(() => { dispatch(setDoesCanvasNeedScaling(true)); }, 250); + window.addEventListener('resize', resizeCallback); + return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); diff --git a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx index 93db982f7f..45f0d026d1 100644 --- a/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx +++ b/frontend/src/features/tabs/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx @@ -1,15 +1,8 @@ import UnifiedCanvasPanel from './UnifiedCanvasPanel'; import UnifiedCanvasDisplay from './UnifiedCanvasDisplay'; import InvokeWorkarea from 'features/tabs/components/InvokeWorkarea'; -import { useAppDispatch } from 'app/store'; -import { useEffect } from 'react'; -import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; export default function UnifiedCanvasWorkarea() { - const dispatch = useAppDispatch(); - useEffect(() => { - dispatch(setDoesCanvasNeedScaling(true)); - }, [dispatch]); return ( } From 9e0504abe5b95dd5f71e06f9b9351b88187b4b9a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 26 Nov 2022 20:53:21 +1100 Subject: [PATCH 219/220] Builds fresh bundle --- .../{index.586c87ba.js => index.2b7cd976.js} | 38 +++++++++---------- frontend/dist/index.html | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) rename frontend/dist/assets/{index.586c87ba.js => index.2b7cd976.js} (81%) diff --git a/frontend/dist/assets/index.586c87ba.js b/frontend/dist/assets/index.2b7cd976.js similarity index 81% rename from frontend/dist/assets/index.586c87ba.js rename to frontend/dist/assets/index.2b7cd976.js index 3d432b2342..01c13fac3c 100644 --- a/frontend/dist/assets/index.586c87ba.js +++ b/frontend/dist/assets/index.2b7cd976.js @@ -22,14 +22,14 @@ function Kq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,IE={},RE={};function fK(e){return n6.call(RE,e)?!0:n6.call(IE,e)?!1:dK.test(e)?RE[e]=!0:(IE[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var r9=/[\-:]([a-z])/g;function i9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r9,i9);Ii[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r9,i9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r9,i9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function o9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n6=Object.prototype.hasOwnProperty,dK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,IE={},RE={};function fK(e){return n6.call(RE,e)?!0:n6.call(IE,e)?!1:dK.test(e)?RE[e]=!0:(IE[e]=!0,!1)}function hK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pK(e,t,n,r){if(t===null||typeof t>"u"||hK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var r9=/[\-:]([a-z])/g;function i9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r9,i9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r9,i9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r9,i9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function o9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{rx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sm(e):""}function gK(e){switch(e.tag){case 5:return sm(e.type);case 16:return sm("Lazy");case 13:return sm("Suspense");case 19:return sm("SuspenseList");case 0:case 2:case 15:return e=ix(e.type,!1),e;case 11:return e=ix(e.type.render,!1),e;case 1:return e=ix(e.type,!0),e;default:return""}}function a6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Up:return"Fragment";case Vp:return"Portal";case r6:return"Profiler";case a9:return"StrictMode";case i6:return"Suspense";case o6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dR:return(e.displayName||"Context")+".Consumer";case cR:return(e._context.displayName||"Context")+".Provider";case s9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case l9:return t=e.displayName||null,t!==null?t:a6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return a6(e(t))}catch{}}return null}function mK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return a6(t);case 8:return t===a9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ad(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vK(e){var t=hR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dy(e){e._valueTracker||(e._valueTracker=vK(e))}function pR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function f5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function s6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function NE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ad(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gR(e,t){t=t.checked,t!=null&&o9(e,"checked",t,!1)}function l6(e,t){gR(e,t);var n=ad(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?u6(e,t.type,n):t.hasOwnProperty("defaultValue")&&u6(e,t.type,ad(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function u6(e,t,n){(t!=="number"||f5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var lm=Array.isArray;function f0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nv(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var km={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yK=["Webkit","ms","Moz","O"];Object.keys(km).forEach(function(e){yK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),km[t]=km[e]})});function SR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||km.hasOwnProperty(e)&&km[e]?(""+t).trim():t+"px"}function bR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=SR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function f6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function h6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var p6=null;function u9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g6=null,h0=null,p0=null;function FE(e){if(e=Kv(e)){if(typeof g6!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=R4(t),g6(e.stateNode,e.type,t))}}function xR(e){h0?p0?p0.push(e):p0=[e]:h0=e}function wR(){if(h0){var e=h0,t=p0;if(p0=h0=null,FE(e),t)for(e=0;e>>=0,e===0?32:31-(AK(e)/MK|0)|0}var hy=64,py=4194304;function um(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function m5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=um(s):(o&=a,o!==0&&(r=um(o)))}else a=n&~i,a!==0?r=um(a):o!==0&&(r=um(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ws(t),e[t]=n}function NK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Pm),qE=String.fromCharCode(32),KE=!1;function WR(e,t){switch(e){case"keyup":return uX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gp=!1;function dX(e,t){switch(e){case"compositionend":return VR(t);case"keypress":return t.which!==32?null:(KE=!0,qE);case"textInput":return e=t.data,e===qE&&KE?null:e;default:return null}}function fX(e,t){if(Gp)return e==="compositionend"||!v9&&WR(e,t)?(e=$R(),E3=p9=$c=null,Gp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=JE(n)}}function YR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qR(){for(var e=window,t=f5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=f5(e.document)}return t}function y9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xX(e){var t=qR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YR(n.ownerDocument.documentElement,n)){if(r!==null&&y9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=eP(n,o);var a=eP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jp=null,x6=null,Lm=null,w6=!1;function tP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;w6||jp==null||jp!==f5(r)||(r=jp,"selectionStart"in r&&y9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Lm&&lv(Lm,r)||(Lm=r,r=S5(x6,"onSelect"),0Kp||(e.current=T6[Kp],T6[Kp]=null,Kp--)}function qn(e,t){Kp++,T6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function lP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function rO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function uP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=rO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,yx=!1;function iO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,iO(e)}function vd(){if(!yx&&hu!==null){yx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&mP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=Hg(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=Hg(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=Ex(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(lm(T))return y(P,k,T,M);if(Dg(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=kx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=fO(!0),hO=fO(!1),Xv={},_l=md(Xv),fv=md(Xv),hv=md(Xv);function Df(e){if(e===Xv)throw Error(Ne(174));return e}function P9(e,t){switch(qn(hv,t),qn(fv,e),qn(_l,Xv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:d6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=d6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(fv),Qn(hv)}function pO(e){Df(hv.current);var t=Df(_l.current),n=d6(t,e.type);t!==n&&(qn(fv,e),qn(_l,n))}function T9(e){fv.current===e&&(Qn(_l),Qn(fv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sx=[];function L9(){for(var e=0;en?n:4,e(!0);var r=bx.transition;bx.transition={};try{e(!1),t()}finally{Tn=n,bx.transition=r}}function AO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MO(e))IO(t,n);else if(n=lO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),RO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MO(e))IO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,k9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),RO(n,t,r))}}function MO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function IO(e,t){Am=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d9(e,n)}}var A5={readContext:$a,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:yP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,kO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:vP,useDebugValue:O9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=vP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||vO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yP(SO.bind(null,r,o,e),[e]),r.flags|=2048,mv(9,yO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pv++,0Kp||(e.current=T6[Kp],T6[Kp]=null,Kp--)}function qn(e,t){Kp++,T6[Kp]=e.current,e.current=t}var sd={},Vi=md(sd),Ao=md(!1),th=sd;function H0(e,t){var n=e.type.contextTypes;if(!n)return sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return e=e.childContextTypes,e!=null}function x5(){Qn(Ao),Qn(Vi)}function lP(e,t,n){if(Vi.current!==sd)throw Error(Ne(168));qn(Vi,t),qn(Ao,n)}function rO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,mK(e)||"Unknown",i));return hr({},n,r)}function w5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sd,th=Vi.current,qn(Vi,e),qn(Ao,Ao.current),!0}function uP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=rO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Vi),qn(Vi,e)):Qn(Ao),qn(Ao,n)}var hu=null,O4=!1,yx=!1;function iO(e){hu===null?hu=[e]:hu.push(e)}function RX(e){O4=!0,iO(e)}function vd(){if(!yx&&hu!==null){yx=!0;var e=0,t=Tn;try{var n=hu;for(Tn=1;e>=a,i-=a,gu=1<<32-ws(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),O===null?R=$:O.sibling=$,O=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),O===null?R=j:O.sibling=j,O=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),R;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return ir&&Cf(P,z),R}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),O===null?R=$:O.sibling=$,O=$);return e&&N.forEach(function(le){return t(P,le)}),ir&&Cf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Up&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case cy:e:{for(var R=T.key,O=k;O!==null;){if(O.key===R){if(R=T.type,R===Up){if(O.tag===7){n(P,O.sibling),k=i(O,T.props.children),k.return=P,P=k;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ic&&mP(R)===O.type){n(P,O.sibling),k=i(O,T.props),k.ref=Hg(P,O,T),k.return=P,P=k;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Up?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=O3(T.type,T.key,T.props,null,P.mode,M),M.ref=Hg(P,k,T),M.return=P,P=M)}return a(P);case Vp:e:{for(O=T.key;k!==null;){if(k.key===O)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=Ex(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return O=T._init,E(P,k,O(T._payload),M)}if(lm(T))return y(P,k,T,M);if(Dg(T))return w(P,k,T,M);xy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=kx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var V0=fO(!0),hO=fO(!1),Xv={},_l=md(Xv),fv=md(Xv),hv=md(Xv);function Df(e){if(e===Xv)throw Error(Ne(174));return e}function P9(e,t){switch(qn(hv,t),qn(fv,e),qn(_l,Xv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:d6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=d6(t,e)}Qn(_l),qn(_l,t)}function U0(){Qn(_l),Qn(fv),Qn(hv)}function pO(e){Df(hv.current);var t=Df(_l.current),n=d6(t,e.type);t!==n&&(qn(fv,e),qn(_l,n))}function T9(e){fv.current===e&&(Qn(_l),Qn(fv))}var cr=md(0);function T5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sx=[];function L9(){for(var e=0;en?n:4,e(!0);var r=bx.transition;bx.transition={};try{e(!1),t()}finally{Tn=n,bx.transition=r}}function AO(){return Ha().memoizedState}function zX(e,t,n){var r=Qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MO(e))IO(t,n);else if(n=lO(e,t,n,r),n!==null){var i=ro();Cs(n,e,r,i),RO(n,t,r)}}function BX(e,t,n){var r=Qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MO(e))IO(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,k9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lO(e,t,i,r),n!==null&&(i=ro(),Cs(n,e,r,i),RO(n,t,r))}}function MO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function IO(e,t){Am=L5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d9(e,n)}}var A5={readContext:$a,useCallback:Di,useContext:Di,useEffect:Di,useImperativeHandle:Di,useInsertionEffect:Di,useLayoutEffect:Di,useMemo:Di,useReducer:Di,useRef:Di,useState:Di,useDebugValue:Di,useDeferredValue:Di,useTransition:Di,useMutableSource:Di,useSyncExternalStore:Di,useId:Di,unstable_isNewReconciler:!1},FX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:yP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,A3(4194308,4,kO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return A3(4194308,4,e,t)},useInsertionEffect:function(e,t){return A3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:vP,useDebugValue:O9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=vP(!1),t=e[0];return e=DX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),hi===null)throw Error(Ne(349));(rh&30)!==0||vO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yP(SO.bind(null,r,o,e),[e]),r.flags|=2048,mv(9,yO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=mu,r=gu;n=(r&~(1<<32-ws(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[dv]=r,WO(e,t,!1,!1),t.stateNode=e;e:{switch(a=h6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Wg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Wg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return $9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(b9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),L9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return T9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return _9(t.type._context),null;case 22:case 23:return $9(),null;case 24:return null;default:return null}}var Cy=!1,Hi=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function $6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PP=!1;function KX(e,t){if(C6=v5,e=qR(),y9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,E=y.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return y=PP,PP=!1,y}function Mm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&$6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function H6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GO(e){var t=e.alternate;t!==null&&(e.alternate=null,GO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[dv],delete t[P6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jO(e){return e.tag===5||e.tag===3||e.tag===4}function TP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}function V6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(V6(e,t,n),e=e.sibling;e!==null;)V6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)YO(e,t,n),n=n.sibling}function YO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:Hi||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?vx(e.parentNode,n):e.nodeType===1&&vx(e,n),av(e)):vx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&$6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function LP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-B9?Gf(e,0):z9|=n),Io(e,t)}function tN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(Yv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),tN(e,n)}var nN;nN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&oO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=M9(null,t,r,e,i,n);var o=I9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,E9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,R6(t,r,e,n),t=D6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&S9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=N6(null,t,r,e,n);break e;case 1:t=_P(null,t,r,e,n);break e;case 11:t=wP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),N6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),_P(e,t,r,i,n);case 3:e:{if(FO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=kP(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=hO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return pO(t),e===null&&A6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,k6(r,i)?a=null:o!==null&&k6(r,o)&&(t.flags|=32),BO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&A6(t),null;case 13:return $O(e,t,n);case 4:return P9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),wP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),M6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),M6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),CP(e,t,r,i,n);case 15:return DO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),dO(t,r,i),R6(t,r,i,n),D6(null,t,r,!0,e,n);case 19:return HO(e,t,n);case 22:return zO(e,t,n)}throw Error(Ne(156,t.tag))};function rN(e,t){return LR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function W9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return W9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===s9)return 11;if(e===l9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")W9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case a9:a=8,i|=8;break;case r6:return e=Da(12,n,t,i|2),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(13,n,t,i),e.elementType=i6,e.lanes=o,e;case o6:return e=Da(19,n,t,i),e.elementType=o6,e.lanes=o,e;case fR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cR:a=10;break e;case dR:a=9;break e;case s9:a=11;break e;case l9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=fR,e.lanes=n,e.stateNode={isHidden:!1},e}function kx(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function Ex(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function V9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},E9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Q7(Bl.exports);var zP=Bl.exports;t6.createRoot=zP.createRoot,t6.hydrateRoot=zP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Cx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function O6(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WX=typeof WeakMap=="function"?WeakMap:Map;function OO(e,t,n){n=yu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){I5||(I5=!0,U6=r),O6(e,t)},n}function NO(e,t,n){n=yu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){O6(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){O6(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function SP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WX;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nZ.bind(null,e,t,n),t.then(e,e))}function bP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xP(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yu(-1,1),t.tag=2,Xc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var VX=Mu.ReactCurrentOwner,Lo=!1;function eo(e,t,n,r){t.child=e===null?hO(t,null,n,r):V0(t,e.child,n,r)}function wP(e,t,n,r,i){n=n.render;var o=t.ref;return m0(t,i),r=M9(e,t,n,r,o,i),n=I9(),e!==null&&!Lo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cu(e,t,i)):(ir&&n&&S9(t),t.flags|=1,eo(e,t,r,i),t.child)}function CP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!W9(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,DO(e,t,o,r,i)):(e=O3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:lv,n(a,r)&&e.ref===t.ref)return Cu(e,t,i)}return t.flags|=1,e=Jc(o,r),e.ref=t.ref,e.return=t,t.child=e}function DO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(lv(o,r)&&e.ref===t.ref)if(Lo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Lo=!0);else return t.lanes=e.lanes,Cu(e,t,i)}return N6(e,t,n,r,i)}function zO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(e0,na),na|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qn(e0,na),na|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,qn(e0,na),na|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,qn(e0,na),na|=r;return eo(e,t,i,n),t.child}function BO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function N6(e,t,n,r,i){var o=Mo(n)?th:Vi.current;return o=H0(t,o),m0(t,i),n=M9(e,t,n,r,o,i),r=I9(),e!==null&&!Lo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cu(e,t,i)):(ir&&r&&S9(t),t.flags|=1,eo(e,t,n,i),t.child)}function _P(e,t,n,r,i){if(Mo(n)){var o=!0;w5(t)}else o=!1;if(m0(t,i),t.stateNode===null)M3(e,t),dO(t,n,r),R6(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=$a(u):(u=Mo(n)?th:Vi.current,u=H0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&gP(t,a,r,u),Rc=!1;var m=t.memoizedState;a.state=m,P5(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Ao.current||Rc?(typeof h=="function"&&(I6(t,n,h,r),l=t.memoizedState),(s=Rc||pP(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:gs(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=$a(l):(l=Mo(n)?th:Vi.current,l=H0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&gP(t,a,r,l),Rc=!1,m=t.memoizedState,a.state=m,P5(t,r,a,i);var y=t.memoizedState;s!==g||m!==y||Ao.current||Rc?(typeof v=="function"&&(I6(t,n,v,r),y=t.memoizedState),(u=Rc||pP(t,n,u,r,m,y,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return D6(e,t,n,r,o,i)}function D6(e,t,n,r,i,o){BO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&uP(t,n,!1),Cu(e,t,o);r=t.stateNode,VX.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=V0(t,e.child,null,o),t.child=V0(t,null,s,o)):eo(e,t,s,o),t.memoizedState=r.state,i&&uP(t,n,!0),t.child}function FO(e){var t=e.stateNode;t.pendingContext?lP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lP(e,t.context,!1),P9(e,t.containerInfo)}function kP(e,t,n,r,i){return W0(),x9(i),t.flags|=256,eo(e,t,n,r),t.child}var z6={dehydrated:null,treeContext:null,retryLane:0};function B6(e){return{baseLanes:e,cachePool:null,transitions:null}}function $O(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qn(cr,i&1),e===null)return A6(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=F4(a,r,0,null),e=jf(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=B6(n),t.memoizedState=z6,e):N9(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return UX(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Jc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Jc(s,o):(o=jf(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?B6(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=z6,r}return o=e.child,e=o.sibling,r=Jc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function N9(e,t){return t=F4({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wy(e,t,n,r){return r!==null&&x9(r),V0(t,e.child,null,n),e=N9(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UX(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Cx(Error(Ne(422))),wy(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=F4({mode:"visible",children:r.children},i,0,null),o=jf(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&V0(t,e.child,null,a),t.child.memoizedState=B6(a),t.memoizedState=z6,o);if((t.mode&1)===0)return wy(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ne(419)),r=Cx(o,r,void 0),wy(e,t,a,r)}if(s=(a&e.childLanes)!==0,Lo||s){if(r=hi,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,wu(e,i),Cs(r,e,i,-1))}return H9(),r=Cx(Error(Ne(421))),wy(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=rZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,aa=Kc(i.nextSibling),la=t,ir=!0,ys=null,e!==null&&(Ia[Ra++]=gu,Ia[Ra++]=mu,Ia[Ra++]=nh,gu=e.id,mu=e.overflow,nh=t),t=N9(t,r.children),t.flags|=4096,t)}function EP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),M6(e.return,t,n)}function _x(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function HO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(eo(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EP(e,n,t);else if(e.tag===19)EP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&T5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_x(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&T5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_x(t,!0,n,null,o);break;case"together":_x(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function M3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ih|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=Jc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Jc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function GX(e,t,n){switch(t.tag){case 3:FO(t),W0();break;case 5:pO(t);break;case 1:Mo(t.type)&&w5(t);break;case 4:P9(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qn(k5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?$O(e,t,n):(qn(cr,cr.current&1),e=Cu(e,t,n),e!==null?e.sibling:null);qn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return HO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,zO(e,t,n)}return Cu(e,t,n)}var WO,F6,VO,UO;WO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};F6=function(){};VO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Df(_l.current);var o=null;switch(n){case"input":i=s6(e,i),r=s6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=c6(e,i),r=c6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=b5)}f6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(tv.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(tv.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Xn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};UO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wg(e,t){if(!ir)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jX(e,t,n){var r=t.pendingProps;switch(b9(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zi(t),null;case 1:return Mo(t.type)&&x5(),zi(t),null;case 3:return r=t.stateNode,U0(),Qn(Ao),Qn(Vi),L9(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(by(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ys!==null&&(Y6(ys),ys=null))),F6(e,t),zi(t),null;case 5:T9(t);var i=Df(hv.current);if(n=t.type,e!==null&&t.stateNode!=null)VO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return zi(t),null}if(e=Df(_l.current),by(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[vl]=t,r[dv]=o,e=(t.mode&1)!==0,n){case"dialog":Xn("cancel",r),Xn("close",r);break;case"iframe":case"object":case"embed":Xn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[vl]=t,e[dv]=r,WO(e,t,!1,!1),t.stateNode=e;e:{switch(a=h6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;ij0&&(t.flags|=128,r=!0,Wg(o,!1),t.lanes=4194304)}else{if(!r)if(e=T5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return zi(t),null}else 2*Or()-o.renderingStartTime>j0&&n!==1073741824&&(t.flags|=128,r=!0,Wg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(zi(t),null);case 22:case 23:return $9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(zi(t),t.subtreeFlags&6&&(t.flags|=8192)):zi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function YX(e,t){switch(b9(t),t.tag){case 1:return Mo(t.type)&&x5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U0(),Qn(Ao),Qn(Vi),L9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return T9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));W0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return U0(),null;case 10:return _9(t.type._context),null;case 22:case 23:return $9(),null;case 24:return null;default:return null}}var Cy=!1,$i=!1,qX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Jp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function $6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PP=!1;function KX(e,t){if(C6=v5,e=qR(),y9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_6={focusedElem:e,selectionRange:n},v5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,E=y.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return y=PP,PP=!1,y}function Mm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&$6(t,n,o)}i=i.next}while(i!==r)}}function z4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function H6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GO(e){var t=e.alternate;t!==null&&(e.alternate=null,GO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[dv],delete t[P6],delete t[MX],delete t[IX])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jO(e){return e.tag===5||e.tag===3||e.tag===4}function TP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function W6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(W6(e,t,n),e=e.sibling;e!==null;)W6(e,t,n),e=e.sibling}function V6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(V6(e,t,n),e=e.sibling;e!==null;)V6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)YO(e,t,n),n=n.sibling}function YO(e,t,n){if(Cl&&typeof Cl.onCommitFiberUnmount=="function")try{Cl.onCommitFiberUnmount(L4,n)}catch{}switch(n.tag){case 5:$i||Jp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?vx(e.parentNode,n):e.nodeType===1&&vx(e,n),av(e)):vx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!$i&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&$6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!$i&&(Jp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?($i=(r=$i)||n.memoizedState!==null,kc(e,t,n),$i=r):kc(e,t,n);break;default:kc(e,t,n)}}function LP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qX),t.forEach(function(r){var i=iZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,R5=0,(sn&6)!==0)throw Error(Ne(331));var i=sn;for(sn|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-B9?Gf(e,0):z9|=n),Io(e,t)}function tN(e,t){t===0&&((e.mode&1)===0?t=1:(t=py,py<<=1,(py&130023424)===0&&(py=4194304)));var n=ro();e=wu(e,t),e!==null&&(Yv(e,t,n),Io(e,n))}function rZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tN(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),tN(e,n)}var nN;nN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,GX(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&oO(t,_5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;M3(e,t),e=t.pendingProps;var i=H0(t,Vi.current);m0(t,n),i=M9(null,t,r,e,i,n);var o=I9();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,w5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,E9(t),i.updater=N4,t.stateNode=i,i._reactInternals=t,R6(t,r,e,n),t=D6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&S9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(M3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aZ(r),e=gs(r,e),i){case 0:t=N6(null,t,r,e,n);break e;case 1:t=_P(null,t,r,e,n);break e;case 11:t=wP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,gs(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),N6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),_P(e,t,r,i,n);case 3:e:{if(FO(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uO(e,t),P5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=G0(Error(Ne(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=G0(Error(Ne(424)),t),t=kP(e,t,r,n,i);break e}else for(aa=Kc(t.stateNode.containerInfo.firstChild),la=t,ir=!0,ys=null,n=hO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(W0(),r===i){t=Cu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return pO(t),e===null&&A6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,k6(r,i)?a=null:o!==null&&k6(r,o)&&(t.flags|=32),BO(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&A6(t),null;case 13:return $O(e,t,n);case 4:return P9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=V0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),wP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qn(k5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=Cu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),M6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),M6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,m0(t,n),i=$a(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),CP(e,t,r,i,n);case 15:return DO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),M3(e,t),t.tag=1,Mo(r)?(e=!0,w5(t)):e=!1,m0(t,n),dO(t,r,i),R6(t,r,i,n),D6(null,t,r,!0,e,n);case 19:return HO(e,t,n);case 22:return zO(e,t,n)}throw Error(Ne(156,t.tag))};function rN(e,t){return LR(e,t)}function oZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(e,t,n,r){return new oZ(e,t,n,r)}function W9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aZ(e){if(typeof e=="function")return W9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===s9)return 11;if(e===l9)return 14}return 2}function Jc(e,t){var n=e.alternate;return n===null?(n=Da(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function O3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")W9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Up:return jf(n.children,i,o,t);case a9:a=8,i|=8;break;case r6:return e=Da(12,n,t,i|2),e.elementType=r6,e.lanes=o,e;case i6:return e=Da(13,n,t,i),e.elementType=i6,e.lanes=o,e;case o6:return e=Da(19,n,t,i),e.elementType=o6,e.lanes=o,e;case fR:return F4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cR:a=10;break e;case dR:a=9;break e;case s9:a=11;break e;case l9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Da(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Da(7,e,r,t),e.lanes=n,e}function F4(e,t,n,r){return e=Da(22,e,r,t),e.elementType=fR,e.lanes=n,e.stateNode={isHidden:!1},e}function kx(e,t,n){return e=Da(6,e,null,t),e.lanes=n,e}function Ex(e,t,n){return t=Da(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function V9(e,t,n,r,i,o,a,s,l){return e=new sZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Da(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},E9(o),e}function lZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ga})(Bl);const Ey=Q7(Bl.exports);var zP=Bl.exports;t6.createRoot=zP.createRoot,t6.hydrateRoot=zP.hydrateRoot;var _s=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,U4={exports:{}},G4={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var hZ=C.exports,pZ=Symbol.for("react.element"),gZ=Symbol.for("react.fragment"),mZ=Object.prototype.hasOwnProperty,vZ=hZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yZ={key:!0,ref:!0,__self:!0,__source:!0};function sN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)mZ.call(t,r)&&!yZ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:pZ,type:e,key:o,ref:a,props:i,_owner:vZ.current}}G4.Fragment=gZ;G4.jsx=sN;G4.jsxs=sN;(function(e){e.exports=G4})(U4);const Ln=U4.exports.Fragment,x=U4.exports.jsx,ee=U4.exports.jsxs;var Y9=C.exports.createContext({});Y9.displayName="ColorModeContext";function Zv(){const e=C.exports.useContext(Y9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Py={light:"chakra-ui-light",dark:"chakra-ui-dark"};function SZ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),BP=()=>{};function FP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function lN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>FP(a,s)),[h,g]=C.exports.useState(()=>FP(a)),{getSystemTheme:m,setClassName:v,setDataset:y,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),y(R),a.set(R)},[a,m,v,y]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?BP:k,setColorMode:t?BP:P,forced:t!==void 0}),[E,k,P,t]);return x(Y9.Provider,{value:T,children:n})}lN.displayName="ColorModeProvider";var q6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",y="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ct=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,Ye=Array(U);++he-1}function I1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=M1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=I1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||G1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==y||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ct?et(ct):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?W1(U,!0):zs(U)}var cn=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Fh(U){return U}function G1(){return!1}e.exports=cn})(q6,q6.exports);const xl=q6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),$P=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,K6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=$P(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=$P(s),i?`${s} !important`:s};function yv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=K6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=yv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?yv({scale:n,compose:r}):r}}var uN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...uN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...uN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},cN="& > :not(style) ~ :not(style)",RZ={[cN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[cN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},X6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(X6)),dN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||dN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in X6?X6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,y]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=fN(y)?y:y&&y.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var fN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||fN(e)||dN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:yv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},Z6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(Z6,{shadow:Z6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:yv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:yv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var hN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Px=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Px(t,e,n)}},Om={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Om,{insetStart:Om.insetInlineStart,insetEnd:Om.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function pN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(pN).join(` ${e} `).replace(/calc/g,""),HP=(...e)=>`calc(${j4("+",...e)})`,WP=(...e)=>`calc(${j4("-",...e)})`,Q6=(...e)=>`calc(${j4("*",...e)})`,VP=(...e)=>`calc(${j4("/",...e)})`,UP=e=>{const t=pN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Q6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(HP(e,...t)),subtract:(...t)=>Af(WP(e,...t)),multiply:(...t)=>Af(Q6(e,...t)),divide:(...t)=>Af(VP(e,...t)),negate:()=>Af(UP(e)),toString:()=>e.toString()}),{add:HP,subtract:WP,multiply:Q6,divide:VP,negate:UP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function J6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var gN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,q9=e=>Object.fromEntries(Object.entries(e).sort(gN));function GP(e){const t=q9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(q9(e));return new Set(t)}function jP(e){if(!e)return e;e=J6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function dm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${J6(e)})`),t&&n.push("and",`(max-width: ${J6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=GP(e),n=Object.entries(e).sort(gN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?jP(u):void 0,{_minW:jP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:dm(null,u),minWQuery:dm(a),minMaxQuery:dm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:q9(e),asArray:GP(e),details:n,media:[null,...t.map(o=>dm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>mN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>mN(t=>e(t,"~ &"),"[data-peer]",".peer"),mN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function YP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=YP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...y]=m,w=`${v}.-${y.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const y=[String(i).split(".")[0],m].join(".");if(!e[y])return m;const{reference:E}=YP(y,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,y])=>{var w;const E=h(y);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(eC(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(eC(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function eC(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(eC(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var K9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,hN,XZ,Om,Z6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,hN,Om),kQ=Object.keys(_Q),EQ=[...Object.keys(K9),...pQ],PQ={...K9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let y=t[g];if(y===!0&&(y={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=y?.transform)==null?void 0:s.call(y,v,r,l))??v;w=y?.processResult?i(w,!0):w;const E=zf(y?.property,r);if(!a&&y?.static){const P=zf(y.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var vN=e=>t=>OQ({theme:t,pseudos:Y4,configs:K9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||bv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Qv(e,D3()+(t<6&&kl()==32&&ua()==32))}function nC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&nC(Hr);break;case 40:e===41&&nC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Qv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!bv(kl());)ua();return Qv(e,No)}function tJ(e){return CN(B3("",null,null,null,[""],e=wN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,y=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(y=k,k=ua()){case 40:if(y!=108&&Ti(N,g-1)==58){tC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(y);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?KP(N+";",r,n,g-1):KP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=qP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(qP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=y;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:y===45&&hl(N)==2&&(w=0)}}return o}function qP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Q9(m),y=0,w=0,E=0;y0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?X9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,yN,q4(KQ()),Sv(e,2,-2),0)}function KP(e,t,n,r){return X4(e,t,n,Z9,Sv(e,0,r),Sv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Q9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tC(e,"stretch")?kN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~tC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Fi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Z9:t.return=kN(t.value,t.length);break;case SN:return y0([Ug(t,{value:wn(t.value,"@","@"+mn)})],i);case X9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Ug(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Ug(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Ug(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Ug(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},fJ=[dJ],EN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Py.dark:Py.light),document.body.classList.remove(r?Py.light:Py.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var bZ="chakra-ui-color-mode";function xZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var wZ=xZ(bZ),BP=()=>{};function FP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function lN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>FP(a,s)),[h,g]=C.exports.useState(()=>FP(a)),{getSystemTheme:m,setClassName:v,setDataset:y,addListener:w}=C.exports.useMemo(()=>SZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),y(R),a.set(R)},[a,m,v,y]);_s(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?BP:k,setColorMode:t?BP:P,forced:t!==void 0}),[E,k,P,t]);return x(Y9.Provider,{value:T,children:n})}lN.displayName="ColorModeProvider";var q6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",y="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",O="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",le="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[le]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[R]=xe[O]=xe[z]=!1;var Se=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,Me=typeof self=="object"&&self&&self.Object===Object&&self,_e=Se||Me||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&!0&&e&&!e.nodeType&&e,dt=Xe&&Xe.exports===Je,_t=dt&&Se.process,pt=function(){try{var U=Xe&&Xe.require&&Xe.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch{}}(),ct=pt&&pt.isTypedArray;function mt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Pe(U,te){for(var he=-1,je=Array(U);++he-1}function I1(U,te){var he=this.__data__,je=Xa(he,U);return je<0?(++this.size,he.push([U,te])):he[je][1]=te,this}Do.prototype.clear=Ad,Do.prototype.delete=M1,Do.prototype.get=$u,Do.prototype.has=Md,Do.prototype.set=I1;function Os(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,vt=zt>2?he[2]:void 0;for(hn=U.length>3&&typeof hn=="function"?(zt--,hn):void 0,vt&&Oh(he[0],he[1],vt)&&(hn=zt<3?void 0:hn,zt=1),te=Object(te);++je-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return ln.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var Dd=Ul(function(){return arguments}())?Ul:function(U){return Un(U)&&on.call(U,"callee")&&!He.call(U,"callee")},Yl=Array.isArray;function Ht(U){return U!=null&&Dh(U.length)&&!Yu(U)}function Nh(U){return Un(U)&&Ht(U)}var ju=Qt||G1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==y||te==u||te==T}function Dh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function zd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=un(U);if(te===null)return!0;var he=on.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&ln.call(he)==Zt}var zh=ct?et(ct):Wu;function Bd(U){return jr(U,Bh(U))}function Bh(U){return Ht(U)?W1(U,!0):zs(U)}var cn=Za(function(U,te,he,je){zo(U,te,he,je)});function Wt(U){return function(){return U}}function Fh(U){return U}function G1(){return!1}e.exports=cn})(q6,q6.exports);const xl=q6.exports;function ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return CZ(e)?e(...t):e}var CZ=e=>typeof e=="function",_Z=e=>/!(important)?$/.test(e),$P=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,K6=(e,t)=>n=>{const r=String(t),i=_Z(r),o=$P(r),a=e?`${e}.${o}`:o;let s=ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=$P(s),i?`${s} !important`:s};function yv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=K6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Ty=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=yv({scale:e,transform:t}),r}}var kZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function EZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kZ(t),transform:n?yv({scale:n,compose:r}):r}}var uN=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function PZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...uN].join(" ")}function TZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...uN].join(" ")}var LZ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},AZ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function MZ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var IZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},cN="& > :not(style) ~ :not(style)",RZ={[cN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},OZ={[cN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},X6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},NZ=new Set(Object.values(X6)),dN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),DZ=e=>e.trim();function zZ(e,t){var n;if(e==null||dN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(DZ).filter(Boolean);if(l?.length===0)return e;const u=s in X6?X6[s]:s;l.unshift(u);const h=l.map(g=>{if(NZ.has(g))return g;const m=g.indexOf(" "),[v,y]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=fN(y)?y:y&&y.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var fN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),BZ=(e,t)=>zZ(e,t??{});function FZ(e){return/^var\(--.+\)$/.test(e)}var $Z=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:LZ},backdropFilter(e){return e!=="auto"?e:AZ},ring(e){return MZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?PZ():e==="auto-gpu"?TZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=$Z(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(FZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:BZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||fN(e)||dN.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=IZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",an.px),space:ds("space",Ty(an.vh,an.px)),spaceT:ds("space",Ty(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:yv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",Ty(an.vh,an.px)),sizesT:ds("sizes",Ty(an.vh,an.fraction)),shadows:ds("shadows"),logical:EZ,blur:ds("blur",an.blur)},N3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(N3,{bgImage:N3.backgroundImage,bgImg:N3.backgroundImage});var gn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(gn,{rounded:gn.borderRadius,roundedTop:gn.borderTopRadius,roundedTopLeft:gn.borderTopLeftRadius,roundedTopRight:gn.borderTopRightRadius,roundedTopStart:gn.borderStartStartRadius,roundedTopEnd:gn.borderStartEndRadius,roundedBottom:gn.borderBottomRadius,roundedBottomLeft:gn.borderBottomLeftRadius,roundedBottomRight:gn.borderBottomRightRadius,roundedBottomStart:gn.borderEndStartRadius,roundedBottomEnd:gn.borderEndEndRadius,roundedLeft:gn.borderLeftRadius,roundedRight:gn.borderRightRadius,roundedStart:gn.borderInlineStartRadius,roundedEnd:gn.borderInlineEndRadius,borderStart:gn.borderInlineStart,borderEnd:gn.borderInlineEnd,borderTopStartRadius:gn.borderStartStartRadius,borderTopEndRadius:gn.borderStartEndRadius,borderBottomStartRadius:gn.borderEndStartRadius,borderBottomEndRadius:gn.borderEndEndRadius,borderStartRadius:gn.borderInlineStartRadius,borderEndRadius:gn.borderInlineEndRadius,borderStartWidth:gn.borderInlineStartWidth,borderEndWidth:gn.borderInlineEndWidth,borderStartColor:gn.borderInlineStartColor,borderEndColor:gn.borderInlineEndColor,borderStartStyle:gn.borderInlineStartStyle,borderEndStyle:gn.borderInlineEndStyle});var HZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},Z6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(Z6,{shadow:Z6.boxShadow});var WZ={filter:{transform:an.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",an.brightness),contrast:ie.propT("--chakra-contrast",an.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",an.invert),saturate:ie.propT("--chakra-saturate",an.saturate),dropShadow:ie.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",an.saturate)},D5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:RZ,transform:yv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:OZ,transform:yv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(D5,{flexDir:D5.flexDirection});var hN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},VZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},Aa={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var UZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function GZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},YZ=jZ(GZ),qZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},KZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Px=(e,t,n)=>{const r={},i=YZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},XZ={srOnly:{transform(e){return e===!0?qZ:e==="focusable"?KZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Px(t,e,n)}},Om={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Om,{insetStart:Om.insetInlineStart,insetEnd:Om.insetInlineEnd});var ZZ={ring:{transform:an.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var QZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},JZ={clipPath:!0,transform:ie.propT("transform",an.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},eQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},tQ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",an.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function pN(e){return ks(e)&&e.reference?e.reference:String(e)}var j4=(e,...t)=>t.map(pN).join(` ${e} `).replace(/calc/g,""),HP=(...e)=>`calc(${j4("+",...e)})`,WP=(...e)=>`calc(${j4("-",...e)})`,Q6=(...e)=>`calc(${j4("*",...e)})`,VP=(...e)=>`calc(${j4("/",...e)})`,UP=e=>{const t=pN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Q6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(HP(e,...t)),subtract:(...t)=>Af(WP(e,...t)),multiply:(...t)=>Af(Q6(e,...t)),divide:(...t)=>Af(VP(e,...t)),negate:()=>Af(UP(e)),toString:()=>e.toString()}),{add:HP,subtract:WP,multiply:Q6,divide:VP,negate:UP});function rQ(e,t="-"){return e.replace(/\s+/g,t)}function iQ(e){const t=rQ(e.toString());return aQ(oQ(t))}function oQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sQ(e,t=""){return[t,e].filter(Boolean).join("-")}function lQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function uQ(e,t=""){return iQ(`--${sQ(e,t)}`)}function zn(e,t,n){const r=uQ(e,n);return{variable:r,reference:lQ(r,t)}}function cQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function J6(e){if(e==null)return e;const{unitless:t}=dQ(e);return t||typeof e=="number"?`${e}px`:e}var gN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,q9=e=>Object.fromEntries(Object.entries(e).sort(gN));function GP(e){const t=q9(e);return Object.assign(Object.values(t),t)}function fQ(e){const t=Object.keys(q9(e));return new Set(t)}function jP(e){if(!e)return e;e=J6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function dm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${J6(e)})`),t&&n.push("and",`(max-width: ${J6(t)})`),n.join(" ")}function hQ(e){if(!e)return null;e.base=e.base??"0px";const t=GP(e),n=Object.entries(e).sort(gN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?jP(u):void 0,{_minW:jP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:dm(null,u),minWQuery:dm(a),minMaxQuery:dm(a,u)}}),r=fQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:q9(e),asArray:GP(e),details:n,media:[null,...t.map(o=>dm(o)).slice(1)],toArrayValue(o){if(!ks(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;cQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ec=e=>mN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),su=e=>mN(t=>e(t,"~ &"),"[data-peer]",".peer"),mN=(e,...t)=>t.map(e).join(", "),Y4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ec(ki.hover),_peerHover:su(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:su(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:su(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:su(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:su(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:su(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:su(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:su(ki.focusWithin),_peerPlaceholderShown:su(ki.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pQ=Object.keys(Y4);function YP(e,t){return zn(String(e).replace(/\./g,"-"),void 0,t)}function gQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=YP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...y]=m,w=`${v}.-${y.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const y=[String(i).split(".")[0],m].join(".");if(!e[y])return m;const{reference:E}=YP(y,t?.cssVarPrefix);return E},g=ks(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,y])=>{var w;const E=h(y);if(v==="default")return m[l]=E,m;const P=((w=Y4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function SQ(e){return vQ(e,yQ)}function bQ(e){return e.semanticTokens}function xQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wQ({tokens:e,semanticTokens:t}){const n=Object.entries(eC(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(eC(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function eC(e,t=1/0){return!ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ks(i)||Array.isArray(i)?Object.entries(eC(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function CQ(e){var t;const n=xQ(e),r=SQ(n),i=bQ(n),o=wQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gQ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hQ(n.breakpoints)}),n}var K9=xl({},N3,gn,HZ,D5,Aa,WZ,ZZ,VZ,hN,XZ,Om,Z6,Zn,nQ,tQ,QZ,JZ,UZ,eQ),_Q=Object.assign({},Zn,Aa,D5,hN,Om),kQ=Object.keys(_Q),EQ=[...Object.keys(K9),...pQ],PQ={...K9,...Y4},TQ=e=>e in PQ,LQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!MQ(t),RQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=AQ(t);return t=n(i)??r(o)??r(t),t};function OQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=LQ(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),IQ(g,v)&&(v=RQ(r,v));let y=t[g];if(y===!0&&(y={property:g}),ks(v)){h[g]=h[g]??{},h[g]=xl({},h[g],i(v,!0));continue}let w=((s=y?.transform)==null?void 0:s.call(y,v,r,l))??v;w=y?.processResult?i(w,!0):w;const E=zf(y?.property,r);if(!a&&y?.static){const P=zf(y.static,r);h=xl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&ks(w)?h=xl({},h,w):h[E]=w;continue}if(ks(w)){h=xl({},h,w);continue}h[g]=w}return h};return i}var vN=e=>t=>OQ({theme:t,pseudos:Y4,configs:K9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function NQ(e,t){if(Array.isArray(e))return e;if(ks(e))return t(e);if(e!=null)return[e]}function DQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?xl(u,k):u[P]=k;continue}u[P]=k}}return u}}function BQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=zQ(i);return xl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function FQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function yn(e){return mQ(e,["styleConfig","size","variant","colorScheme"])}function $Q(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(d1,--No):0,Y0--,Hr===10&&(Y0=1,K4--),Hr}function ua(){return Hr=No2||bv(Hr)>3?"":" "}function QQ(e,t){for(;--t&&ua()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Qv(e,D3()+(t<6&&kl()==32&&ua()==32))}function nC(e){for(;ua();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&nC(Hr);break;case 40:e===41&&nC(e);break;case 92:ua();break}return No}function JQ(e,t){for(;ua()&&e+Hr!==47+10;)if(e+Hr===42+42&&kl()===47)break;return"/*"+Qv(t,No-1)+"*"+q4(e===47?e:ua())}function eJ(e){for(;!bv(kl());)ua();return Qv(e,No)}function tJ(e){return CN(B3("",null,null,null,[""],e=wN(e),0,[0],e))}function B3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,y=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,O=r,N=T;E;)switch(y=k,k=ua()){case 40:if(y!=108&&Ti(N,g-1)==58){tC(N+=wn(z3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=z3(k);break;case 9:case 10:case 13:case 32:N+=ZQ(y);break;case 92:N+=QQ(D3()-1,7);continue;case 47:switch(kl()){case 42:case 47:Ly(nJ(JQ(ua(),D3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ly(v>32?KP(N+";",r,n,g-1):KP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ly(O=qP(N,t,n,u,h,i,s,T,M=[],R=[],g),o),k===123)if(h===0)B3(N,t,O,O,M,o,g,s,R);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:B3(e,O,O,r&&Ly(qP(e,O,O,0,0,i,s,T,i,M=[],g),R),i,R,g,s,r?M:R);break;default:B3(N,O,O,O,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=y;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&XQ()==125)continue}switch(N+=q4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:kl()===45&&(N+=z3(ua())),m=kl(),h=g=hl(T=N+=eJ(D3())),k++;break;case 45:y===45&&hl(N)==2&&(w=0)}}return o}function qP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=Q9(m),y=0,w=0,E=0;y0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return X4(e,t,n,i===0?X9:s,l,u,h)}function nJ(e,t,n){return X4(e,t,n,yN,q4(KQ()),Sv(e,2,-2),0)}function KP(e,t,n,r){return X4(e,t,n,Z9,Sv(e,0,r),Sv(e,r+1,-1),r)}function y0(e,t){for(var n="",r=Q9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+mn+"$2-$3$1"+z5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tC(e,"stretch")?kN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~tC(e,"!important")&&10))){case 107:return wn(e,":",":"+mn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+mn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return mn+e+Bi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mn+e+Bi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mn+e+Bi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mn+e+Bi+e+e}return e}var dJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Z9:t.return=kN(t.value,t.length);break;case SN:return y0([Ug(t,{value:wn(t.value,"@","@"+mn)})],i);case X9:if(t.length)return qQ(t.props,function(o){switch(YQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return y0([Ug(t,{props:[wn(o,/:(read-\w+)/,":"+z5+"$1")]})],i);case"::placeholder":return y0([Ug(t,{props:[wn(o,/:(plac\w+)/,":"+mn+"input-$1")]}),Ug(t,{props:[wn(o,/:(plac\w+)/,":"+z5+"$1")]}),Ug(t,{props:[wn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},fJ=[dJ],EN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||fJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,RN=function(t){return t.charCodeAt(1)===45},QP=function(t){return t!=null&&typeof t!="boolean"},Tx=_N(function(e){return RN(e)?e:e.replace(_J,"-$&").toLowerCase()}),JP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!RN(t)&&typeof n=="number"&&n!==0?n+"px":n};function xv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,xv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},$N=UJ(VJ);function HN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var WN=e=>HN(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function VN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=_N(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},rT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},iT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return MN(n,r,i),TJ(function(){return IN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=iT(t,n,r),l=s||rT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Mi(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function UN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function oT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Lx(s,a,e+1/3),i=Lx(s,a,e),o=Lx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function aT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var aC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=UN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Mx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Ax),rgba:new RegExp("rgba"+Mx),hsl:new RegExp("hsl"+Ax),hsla:new RegExp("hsla"+Mx),hsv:new RegExp("hsv"+Ax),hsva:new RegExp("hsva"+Mx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(aC[e])e=aC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:lT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:lT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Jv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=UN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=aT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=aT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),sT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Mi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Mi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+sT(this.r,this.g,this.b,!1),n=0,r=Object.entries(aC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(GN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Jv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=jN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=jN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=qN.find(function(a){return a.name===e});if(n){var r=YN(n);if(r.hueRange)return r.hueRange}var i=new Jv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function jN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=qN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function YN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var qN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Jv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Jv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Jv(r).setAlpha(t).toRgbString()};function uT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var gi=typeof Symbol=="function"&&Symbol.for,J9=gi?Symbol.for("react.element"):60103,e8=gi?Symbol.for("react.portal"):60106,Z4=gi?Symbol.for("react.fragment"):60107,Q4=gi?Symbol.for("react.strict_mode"):60108,J4=gi?Symbol.for("react.profiler"):60114,eS=gi?Symbol.for("react.provider"):60109,tS=gi?Symbol.for("react.context"):60110,t8=gi?Symbol.for("react.async_mode"):60111,nS=gi?Symbol.for("react.concurrent_mode"):60111,rS=gi?Symbol.for("react.forward_ref"):60112,iS=gi?Symbol.for("react.suspense"):60113,hJ=gi?Symbol.for("react.suspense_list"):60120,oS=gi?Symbol.for("react.memo"):60115,aS=gi?Symbol.for("react.lazy"):60116,pJ=gi?Symbol.for("react.block"):60121,gJ=gi?Symbol.for("react.fundamental"):60117,mJ=gi?Symbol.for("react.responder"):60118,vJ=gi?Symbol.for("react.scope"):60119;function va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case J9:switch(e=e.type,e){case t8:case nS:case Z4:case J4:case Q4:case iS:return e;default:switch(e=e&&e.$$typeof,e){case tS:case rS:case aS:case oS:case eS:return e;default:return t}}case e8:return t}}}function TN(e){return va(e)===nS}Mn.AsyncMode=t8;Mn.ConcurrentMode=nS;Mn.ContextConsumer=tS;Mn.ContextProvider=eS;Mn.Element=J9;Mn.ForwardRef=rS;Mn.Fragment=Z4;Mn.Lazy=aS;Mn.Memo=oS;Mn.Portal=e8;Mn.Profiler=J4;Mn.StrictMode=Q4;Mn.Suspense=iS;Mn.isAsyncMode=function(e){return TN(e)||va(e)===t8};Mn.isConcurrentMode=TN;Mn.isContextConsumer=function(e){return va(e)===tS};Mn.isContextProvider=function(e){return va(e)===eS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===J9};Mn.isForwardRef=function(e){return va(e)===rS};Mn.isFragment=function(e){return va(e)===Z4};Mn.isLazy=function(e){return va(e)===aS};Mn.isMemo=function(e){return va(e)===oS};Mn.isPortal=function(e){return va(e)===e8};Mn.isProfiler=function(e){return va(e)===J4};Mn.isStrictMode=function(e){return va(e)===Q4};Mn.isSuspense=function(e){return va(e)===iS};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Z4||e===nS||e===J4||e===Q4||e===iS||e===hJ||typeof e=="object"&&e!==null&&(e.$$typeof===aS||e.$$typeof===oS||e.$$typeof===eS||e.$$typeof===tS||e.$$typeof===rS||e.$$typeof===gJ||e.$$typeof===mJ||e.$$typeof===vJ||e.$$typeof===pJ)};Mn.typeOf=va;(function(e){e.exports=Mn})(PN);var LN=PN.exports,yJ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},SJ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},AN={};AN[LN.ForwardRef]=yJ;AN[LN.Memo]=SJ;var bJ=!0;function xJ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var MN=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||bJ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},IN=function(t,n,r){MN(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function wJ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_J=/[A-Z]|^ms/g,kJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,RN=function(t){return t.charCodeAt(1)===45},QP=function(t){return t!=null&&typeof t!="boolean"},Tx=_N(function(e){return RN(e)?e:e.replace(_J,"-$&").toLowerCase()}),JP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return CJ[t]!==1&&!RN(t)&&typeof n=="number"&&n!==0?n+"px":n};function xv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return EJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,xv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function EJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function VJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},$N=UJ(VJ);function HN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var WN=e=>HN(e,t=>t!=null);function GJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=GJ();function VN(e,...t){return HJ(e)?e(...t):e}function YJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function qJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var KJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XJ=_N(function(e){return KJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ZJ=XJ,QJ=function(t){return t!=="theme"},rT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ZJ:QJ},iT=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},JJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return MN(n,r,i),TJ(function(){return IN(n,r,i)}),null},eee=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=iT(t,n,r),l=s||rT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var nee=Cn("accordion").parts("root","container","button","panel").extend("icon"),ree=Cn("alert").parts("title","description","container").extend("icon","spinner"),iee=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),oee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var aee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var see=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),lee=Cn("editable").parts("preview","input","textarea"),uee=Cn("form").parts("container","requiredIndicator","helperText"),cee=Cn("formError").parts("text","icon"),dee=Cn("input").parts("addon","field","element"),fee=Cn("list").parts("container","item","icon"),hee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),pee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),gee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var mee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vee=Cn("progress").parts("label","filledTrack","track"),yee=Cn("radio").parts("container","control","label"),See=Cn("select").parts("field","icon"),bee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),xee=Cn("stat").parts("container","label","helpText","number","icon"),wee=Cn("switch").parts("container","track","thumb"),Cee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_ee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),kee=Cn("tag").parts("container","label","closeButton"),Eee=Cn("card").parts("container","header","body","footer");function Ai(e,t){Pee(e)&&(e="100%");var n=Tee(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Ay(e){return Math.min(1,Math.max(0,e))}function Pee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function UN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function My(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function Lee(e,t,n){return{r:Ai(e,255)*255,g:Ai(t,255)*255,b:Ai(n,255)*255}}function oT(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Aee(e,t,n){var r,i,o;if(e=Ai(e,360),t=Ai(t,100),n=Ai(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Lx(s,a,e+1/3),i=Lx(s,a,e),o=Lx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function aT(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var aC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Bee(e)),typeof e=="object"&&(lu(e.r)&&lu(e.g)&&lu(e.b)?(t=Lee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):lu(e.h)&&lu(e.s)&&lu(e.v)?(r=My(e.s),i=My(e.v),t=Mee(e.h,r,i),a=!0,s="hsv"):lu(e.h)&&lu(e.s)&&lu(e.l)&&(r=My(e.s),o=My(e.l),t=Aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=UN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Dee="[-\\+]?\\d+%?",zee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(zee,")|(?:").concat(Dee,")"),Ax="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Mx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Ax),rgba:new RegExp("rgba"+Mx),hsl:new RegExp("hsl"+Ax),hsla:new RegExp("hsla"+Mx),hsv:new RegExp("hsv"+Ax),hsva:new RegExp("hsva"+Mx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(aC[e])e=aC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:lT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:lT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function lu(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Jv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Oee(t)),this.originalInput=t;var i=Nee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=UN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=aT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=aT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=oT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=oT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),sT(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Iee(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ai(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ai(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+sT(this.r,this.g,this.b,!1),n=0,r=Object.entries(aC);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Ay(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Ay(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Ay(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Ay(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(GN(e));return e.count=t,n}var r=Fee(e.hue,e.seed),i=$ee(r,e),o=Hee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Jv(a)}function Fee(e,t){var n=Vee(e),r=B5(n,t);return r<0&&(r=360+r),r}function $ee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return B5([0,100],t.seed);var n=jN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return B5([r,i],t.seed)}function Hee(e,t,n){var r=Wee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return B5([r,i],n.seed)}function Wee(e,t){for(var n=jN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Vee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=qN.find(function(a){return a.name===e});if(n){var r=YN(n);if(r.hueRange)return r.hueRange}var i=new Jv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function jN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=qN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function B5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function YN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var qN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Uee(e,`colors.${t}`,t),{isValid:i}=new Jv(r);return i?r:n},jee=e=>t=>{const n=to(t,e);return new Jv(n).isDark()?"dark":"light"},Yee=e=>t=>jee(e)(t)==="dark",q0=(e,t)=>n=>{const r=to(n,e);return new Jv(r).setAlpha(t).toRgbString()};function uT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -58,7 +58,7 @@ Error generating stack: `+o.message+` transparent 0%, ${to(n,a)} 50%, transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=fm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:fm({track:{h:"1"}}),sm:fm({track:{h:"2"}}),md:fm({track:{h:"3"}}),lg:fm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),yT,Tie={...(yT=vn.baseStyle)==null?void 0:yT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},ST,bT,xT,wT,CT,_T,kT,ET,Mie={lg:{...(ST=vn.sizes)==null?void 0:ST.lg,field:{...(bT=vn.sizes)==null?void 0:bT.lg.field,...Ny}},md:{...(xT=vn.sizes)==null?void 0:xT.md,field:{...(wT=vn.sizes)==null?void 0:wT.md.field,...Ny}},sm:{...(CT=vn.sizes)==null?void 0:CT.sm,field:{...(_T=vn.sizes)==null?void 0:_T.sm.field,...Ny}},xs:{...(kT=vn.sizes)==null?void 0:kT.xs,field:{...(ET=vn.sizes)==null?void 0:ET.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),$x=zn("skeleton-start-color"),Hx=zn("skeleton-end-color"),Rie={[$x.variable]:"colors.gray.100",[Hx.variable]:"colors.gray.400",_dark:{[$x.variable]:"colors.gray.800",[Hx.variable]:"colors.gray.600"},background:$x.reference,borderColor:Hx.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Wx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Wx.variable]:"colors.white",_dark:{[Wx.variable]:"colors.gray.700"},bg:Wx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),_v=zn("slider-thumb-size"),kv=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...i8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...i8({orientation:e.orientation,horizontal:{h:kv.reference},vertical:{w:kv.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...i8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:_v.reference,h:_v.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[_v.variable]:"sizes.4",[kv.variable]:"sizes.1"}}),Uie=cS({container:{[_v.variable]:"sizes.3.5",[kv.variable]:"sizes.1"}}),Gie=cS({container:{[_v.variable]:"sizes.2.5",[kv.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:iD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=iD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:iD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Fm=ni("switch-track-width"),qf=ni("switch-track-height"),Vx=ni("switch-track-diff"),aoe=pu.subtract(Fm,qf),cC=ni("switch-thumb-x"),jg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Fm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[jg.variable]:"colors.gray.300",_dark:{[jg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[jg.variable]:`colors.${t}.500`,_dark:{[jg.variable]:`colors.${t}.200`}},bg:jg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${cC.reference})`}},uoe=H3(e=>({container:{[Vx.variable]:aoe,[cC.variable]:Vx.reference,_rtl:{[cC.variable]:pu(Vx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Fm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Fm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Fm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),PT,Woe={...(PT=vn.baseStyle)==null?void 0:PT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},TT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((TT=vn.variants)==null?void 0:TT.unstyled.field)??{}},LT,AT,MT,IT,Uoe={xs:((LT=vn.sizes)==null?void 0:LT.xs.field)??{},sm:((AT=vn.sizes)==null?void 0:AT.sm.field)??{},md:((MT=vn.sizes)==null?void 0:MT.md.field)??{},lg:((IT=vn.sizes)==null?void 0:IT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Ux=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Ux.reference,[zy.variable]:"colors.gray.700",[Ux.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Ux.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Dm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...tD,sizes:QN,shadows:oae,space:ZN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(wv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function oD(){const e=Zv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Zv();return x(sS,{styles:t=>{const n=$N(t,"styles.global"),r=VN(n,{theme:t,colorMode:e});return r?vN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=HN(a,(g,m)=>TQ(m)),l=VN(e,t),u=Object.assign({},i,l,WN(s),o),h=vN(u)(t.theme);return r?[h,r]:h};function Gx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=oC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Zv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function aD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=oD(),a=e?$N(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},WN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return aD(e,t)}function Ri(e,t={}){return aD(e,t)}function Dae(){const e=new Map;return new Proxy(Gx,{apply(t,n,r){return Gx(...r)},get(t,n){return e.has(n)||e.set(n,Gx(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function RT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function OT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function NT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var dC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=RT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=OT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=NT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=NT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return dC(()=>()=>e.current.destroy()),e.current}var[Vae,sD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=sD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);dC(()=>()=>{!i.current||t.unregister(i.current)},[]),dC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function lD(){return[W5(Vae),()=>W5(sD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),DT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??DT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const y=a??DT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},y)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const y=typeof m=="function"?m(h):m;!a(h,y)||(u||l(y),o(y))},[u,o,h,a]);return[h,g]}const l8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,uD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(uD),a=C.exports.useContext(h1),s=C.exports.useContext(l8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function Ev(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>Ev(e[t]))}function cD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ev(n)?n:void 0,animate:Ev(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[zT(t),zT(n)])}function zT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Pv={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Pv.projectionNodeConstructor=e[t]:Pv[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const $m={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if($m.hasEverUpdated)return Qae++})}const u8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const dD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(l8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),y=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(uD).strict,P=C.exports.useContext(dD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,y,n||Pv.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,y,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(u8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function c8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function fD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function hD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pD=(e,t)=>n=>Math.max(Math.min(n,t),e),Hm=e=>e%1?Number(e.toFixed(5)):e,Tv=/(-)?([\d]*\.?[\d])+/g,fC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function t2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wm=Object.assign(Object.assign({},gh),{transform:pD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),n2=e=>({test:t=>t2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=n2("deg"),Pl=n2("%"),Ct=n2("px"),fse=n2("vh"),hse=n2("vw"),BT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),d8=(e,t)=>n=>Boolean(t2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gD=(e,t,n)=>r=>{if(!t2(r))return r;const[i,o,a,s]=r.match(Tv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:d8("hsl","hue"),parse:gD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform(Hm(t))+", "+Pl.transform(Hm(n))+", "+Hm(Wm.transform(r))+")"},pse=pD(0,255),jx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:d8("rgb","red"),parse:gD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jx.transform(e)+", "+jx.transform(t)+", "+jx.transform(n)+", "+Hm(Wm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const hC={test:d8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||hC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):hC.parse(e),transform:e=>t2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},mD="${c}",vD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&t2(e)&&((n=(t=e.match(Tv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(fC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function yD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(fC);r&&(n=r.length,e=e.replace(fC,mD),t.push(...r.map(Ji.parse)));const i=e.match(Tv);return i&&(e=e.replace(Tv,vD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function SD(e){return yD(e).values}function bD(e){const{values:t,numColors:n,tokenised:r}=yD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=SD(e);return bD(e)(t.map(vse))}const ku={test:mse,parse:SD,createTransformer:bD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,pC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),FT={...gh,transform:Math.round},xD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Wm,originX:BT,originY:BT,originZ:Ct,zIndex:FT,fillOpacity:Wm,strokeOpacity:Wm,numOctaves:FT};function f8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(hD(m)){o[m]=v;continue}const y=xD[m],w=cse(v,y);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(y.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:y=0}=l;i.transformOrigin=`${m} ${v} ${y}`}}const h8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function wD(e,t,n){for(const r in t)!Il(t[r])&&!fD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=h8();return f8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return wD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let CD=e=>!j5(e);function Ase(e){!e||(CD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(CD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=$T(t,e.x,e.width),i=$T(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function p8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){f8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const _D=()=>({...h8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=_D();return p8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};wD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(c8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const kD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ED(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const PD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function TD(e,t,n,r){ED(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(PD.has(i)?i:kD(i),t.attrs[i])}function g8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||fD(r,e))&&(n[r]=t[r]);return n}function LD(e){const t=g8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function m8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Lv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),AD=e=>Lv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const MD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=cD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const y=m8(e,v);if(!y)return;const{transitionEnd:w,transition:E,...P}=y;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:MD({scrapeMotionValuesFromProps:LD,createRenderState:_D,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}p8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),TD(t,n)}})},Wse={useVisualState:MD({scrapeMotionValuesFromProps:g8,createRenderState:h8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...c8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};gC(t,"focus",e?r:void 0),gC(t,"blur",e?i:void 0)}function ID(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function RD(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function v8(e,t="page"){return{point:RD(e)?Yse(e,t):qse(e,t)}}const OD=(e,t=!1)=>{const n=r=>e(r,v8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ND(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,ND(t),OD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return gC(e,ND(t),n&&OD(n,t==="pointerdown"),r)}function DD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=DD("dragHorizontal"),WT=DD("dragVertical");function zD(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=HT();else{const n=HT(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BD(){const e=zD(!0);return e?(e(),!1):!0}function VT(e,t,n){return(r,i)=>{!ID(r)||BD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?VT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?VT(r,!1,t):void 0,{passive:!t})}const FD=(e,t)=>t?e===t?!0:FD(e,t.parentElement):!1;function y8(e){return C.exports.useEffect(()=>()=>e(),[])}function $D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Yx=.001,nle=.01,UT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=UT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,UT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=mC(u,a),y=Math.exp(-g);return Yx-m/v*y},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-g),w=mC(Math.pow(u,2),a);return(-i(u)+Yx>0?-1:1)*((m-v)*y)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Yx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!GT(e,ule)&>(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function S8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=$D(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=jT,y=jT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=mC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},y=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=y(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}S8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const jT=e=>0,Av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function qx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=qx(l,s,e+1/3),o=qx(l,s,e),a=qx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[hC,Vc,Ff],qT=e=>fle.find(t=>t.test(e)),HD=(e,t)=>{let n=qT(e),r=qT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=YT(i),n=Vc),r===Ff&&(o=YT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},vC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function WD(e,t){return vC(e)?n=>Cr(e,t,n):Ji.test(e)?HD(e,t):UD(e,t)}const VD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>WD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=WD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function KT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=KT(e),i=KT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(VD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?HD:UD;if(Array.isArray(e))return VD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Av(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Av(e[o],e[o+1],i);return t[o](s)}}function GD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),b8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),jD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=jD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},YD=1.525,wle=4/11,Cle=8/11,_le=9/10,x8=e=>e,w8=ble(2),kle=yS(w8),qD=b8(w8),KD=e=>1-Math.sin(Math.acos(e)),C8=yS(KD),Ele=b8(C8),_8=jD(YD),Ple=yS(_8),Tle=b8(_8),Lle=xle(YD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||qD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return GD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const XT={keyframes:U3,spring:S8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(XT[e.type])return XT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?S8:U3}const XD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),ZD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),XD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Mv=!0),e),{}),Vle=r2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||jle(),n.schedule(r,i,o)),e},{}),Ule=r2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});r2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),QD=e=>{Mv=!1,E0.delta=yC?XD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,SC=!0,r2.forEach(Gle),SC=!1,Mv&&(yC=!1,ZD(QD))},jle=()=>{Mv=!0,yC=!0,SC||ZD(QD)},Yle=()=>E0;function JD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?JD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function ez(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:y}=e,w=$D(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=GD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=JD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}y?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function tz(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let y;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=tz(V-O,Yle().delta),(R===1&&V>M||R===-1&&Vy?.stop()}}const bC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ZT=e=>bC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function k8(e,t){if(vC(e)&&vC(t))return Fy(e,t);if(bC(e)&&bC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=ZT(e)&&ZT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const nz=(e,t)=>1-3*t+3*e,rz=(e,t)=>3*t-6*e,iz=e=>3*e,Z5=(e,t,n)=>((nz(t,n)*e+rz(t,n))*e+iz(t))*e,oz=(e,t,n)=>3*nz(t,n)*e*e+2*rz(t,n)*e+iz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!BD()}function g(y,w){!h()||(FD(i.current,y.target)?e&&e(y,w):n&&n(y,w))}function m(y,w){!h()||n&&n(y,w)}function v(y,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(y,w))}Y5(i,"pointerdown",o?v:void 0,l),y8(u)}const aue="production",az=typeof process>"u"||process.env===void 0?aue:"production",QT=new Set;function sz(e,t,n){e||QT.has(t)||(console.warn(t),n&&console.warn(n),QT.add(t))}const xC=new WeakMap,Kx=new WeakMap,sue=e=>{const t=xC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;Kx.has(n)||Kx.set(n,{});const r=Kx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return xC.set(e,n),r.observe(e),()=>{xC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(az!=="production"&&sz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function E8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function lz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:x8,easeIn:w8,easeInOut:qD,easeOut:kle,circIn:KD,circInOut:Ele,circOut:C8,backIn:_8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},JT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",eL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),tL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Xx,backgroundColor:Xx,color:Xx,default:Hy},xue=(e,t)=>{let n;return Lv(t)?n=bue:n=tL[e]||tL.default,{to:t,...n(t)}},wue={...xD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:pC,WebkitFilter:pC},P8=e=>wue[e];function T8(e,t){var n;let r=P8(e);return r!==pC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},uz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),cz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),uz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Iv=!0),e),{}),Es=i2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Iv||Tue(),n.schedule(r,i,o)),e},{}),ah=i2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Zx=i2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),dz=e=>{Iv=!1,P0.delta=wC?uz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,CC=!0,i2.forEach(Pue),CC=!1,Iv&&(wC=!1,cz(dz))},Tue=()=>{Iv=!0,wC=!0,CC||cz(dz)},_C=()=>P0;function fz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(JT):JT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(L8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=L8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=eL(e,n);a==="none"&&s&&typeof n=="string"?a=T8(e,n):nL(a)&&typeof n=="string"?a=rL(n):!Array.isArray(n)&&nL(n)&&typeof a=="string"&&(n=rL(a));const l=eL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):ez({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=AD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function nL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function rL(e){return typeof e=="number"?0:T8("",e)}function L8(e,t){return e[t]||e.default||e}function A8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=fz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function M8(e,t){e.indexOf(t)===-1&&e.push(t)}function I8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Vm{constructor(){this.subscriptions=[]}add(t){return M8(this.subscriptions,t),()=>I8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Vm,this.velocityUpdateSubscribers=new Vm,this.renderSubscribers=new Vm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=_C();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const hz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},pz=[gh,Ct,Pl,Lc,hse,fse,Fue],Yg=e=>pz.find(hz(e)),$ue=[...pz,Ji,ku],Hue=e=>$ue.find(hz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return m8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=AD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;skC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=kC(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=gz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function kC(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>gz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function gz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),y=l[m];if(!v||y===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=A8(m,v,y,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(kC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const R8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...R8].reverse(),ece=R8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],y=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,y.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Lv(K)&&Lv(G)?!lz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):y.add(J):K!==void 0&&y.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(y.size){const k={};y.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=E8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class mz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Jx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=k8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=_C();this.history.push({...m,timestamp:v});const{onStart:y,onMove:w}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Qx(h,this.transformPagePoint),ID(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Jx(Qx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},RD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=v8(t),o=Qx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=_C();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Jx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Qx(e,t){return t?{point:t(e.point)}:e}function iL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jx({point:e},t){return{point:e,delta:iL(e,vz(t)),offset:iL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function vz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function oL(e,t=0,n=.01){return k8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function uL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:uL(e.x,n,i),y:uL(e.y,t,r)}}function cL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Av(t.min,t.max-r,e.min):r>i&&(n=Av(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const EC=.35;function pce(e=EC){return e===!1?e=0:e===!0&&(e=EC),{x:dL(e,"left","right"),y:dL(e,"top","bottom")}}function dL(e,t,n){return{min:fL(e,t),max:fL(e,n)}}function fL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const hL=()=>({translate:0,scale:1,origin:0,originPoint:0}),jm=()=>({x:hL(),y:hL()}),pL=()=>({min:0,max:0}),Zr=()=>({x:pL(),y:pL()});function cl(e){return[e("x"),e("y")]}function yz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ew(e){return e===void 0||e===1}function PC({scale:e,scaleX:t,scaleY:n}){return!ew(e)||!ew(t)||!ew(n)}function kf(e){return PC(e)||Sz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Sz(e){return gL(e.x)||gL(e.y)}function gL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function mL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function TC(e,t=0,n=1,r,i){e.min=mL(e.min,t,n,r,i),e.max=mL(e.max,t,n,r,i)}function bz(e,{x:t,y:n}){TC(e.x,t.translate,t.scale,t.originPoint),TC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(v8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var y,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(y=this.visualElement.projection)===null||y===void 0?void 0:y.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new mz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=yz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,y=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return A8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=EC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(l8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new mz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),y8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function LC(e){return typeof e=="string"&&e.startsWith("var(--")}const wz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=wz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function AC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():LC(i)?AC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!LC(o))return;const a=AC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!LC(o))continue;const a=AC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),Cz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(Cz),_z=(e,t)=>{e.set(t,!1),e.set(t)},yL=e=>e===gh||e===Ct;var SL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(SL||(SL={}));const bL=(e,t)=>parseFloat(e.split(", ")[t]),xL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return bL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?bL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const wL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:xL(4,13),y:xL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=wL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);_z(h,s[u]),e[u]=wL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Cz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Yg(h);const m=t[l];let v;if(Lv(m)){const y=m.length,w=m[0]===null?1:0;h=m[w],g=Yg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},MC={current:null},kz={current:!1};function Bce(){if(kz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>MC.current=e.matches;e.addListener(t),t()}else MC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ez=Object.keys(Pv),$ce=Ez.length,CL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=cD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kz.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:MC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=Ez[l],{isEnabled:h,Component:g}=Pv[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=m8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Pz=["initial",...R8],Wce=Pz.length;class Tz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Tz{readValueFromInstance(t,n){if(p1.has(n)){const r=P8(n);return r&&r.default||0}else{const r=Vce(t),i=(hD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xz(t,n)}build(t,n,r,i){f8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return g8(t)}renderInstance(t,n,r,i){ED(t,n,r,i)}}class Gce extends Tz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=P8(n))===null||r===void 0?void 0:r.default)||0:(n=PD.has(n)?n:kD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return LD(t)}build(t,n,r,i){p8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){TD(t,n,r,i)}}const jce=(e,t)=>c8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function _L(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=_L(e,t.target.x),r=_L(e,t.target.y);return`${n}% ${r}%`}},kL="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(wz,v=>(o.push(v),kL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(kL,()=>{const y=o[v];return v++,y})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),$m.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=E8(),r=C.exports.useContext(u8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(dD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...qg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qg,borderTopRightRadius:qg,borderBottomLeftRadius:qg,borderBottomRightRadius:qg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return A8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Lz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Lz.length,EL=e=>typeof e=="string"?parseFloat(e):e,PL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Av(e,t,r))}function LL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){LL(e.x,t.x),LL(e.y,t.y)}function AL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=AL(e.min,t,n,s,i),e.max=AL(e.max,t,n,s,i)}function ML(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function IL(e,t,n,r){ML(e.x,t,ide,n?.x,r?.x),ML(e.y,t,ode,n?.y,r?.y)}function RL(e){return e.translate===0&&e.scale===1}function Mz(e){return RL(e.x)&&RL(e.y)}function Iz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function OL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return k8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){M8(this.members,t),t.scheduleRender()}remove(t){if(I8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function NL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){M8(this.children,t),this.isDirty=!0}remove(t){I8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const DL=["","X","Y","Z"],zL=1e3;let cde=0;function Rz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=fz(v,250),$m.hasAnimatedSinceResize&&($m.hasAnimatedSinceResize=!1,this.nodes.forEach(FL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Iz(this.targetLayout,w)||y,V=!v&&y;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...L8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&FL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;$L(v.x,a.x,M),$L(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Gm(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,y,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{$m.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,zL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,zL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Oz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Um(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(BL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],w=ha(y);y.min=o[v].min,y.max=y.min+w}):Oz(s,i.layoutBox,o)&&cl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);y.max=y.min+w});const u=jm();Um(u,o,i.layoutBox);const h=jm();l?Um(h,e.applyTransform(a,!0),i.measuredBox):Um(h,o,i.layoutBox);const g=!Mz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:y,layout:w}=v;if(y&&w){const E=Zr();Gm(E,i.layoutBox,y.layoutBox);const P=Zr();Gm(P,o,w.layoutBox),Iz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function BL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function $L(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function HL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){HL(e.x,t.x,n.x,r),HL(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function WL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){WL(e.x),WL(e.y)}function Oz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(OL(t),OL(n),.2)}const _de=Rz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),tw={current:void 0},kde=Rz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!tw.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),tw.current=e}return tw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Nz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Nz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mie=e=>({bg:yt("gray.100","whiteAlpha.300")(e)}),vie=e=>({transitionProperty:"common",transitionDuration:"slow",...pie(e)}),yie=fm(e=>({label:gie,filledTrack:vie(e),track:mie(e)})),Sie={xs:fm({track:{h:"1"}}),sm:fm({track:{h:"2"}}),md:fm({track:{h:"3"}}),lg:fm({track:{h:"4"}})},bie=hie({sizes:Sie,baseStyle:yie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:$3}=Jn(yee.keys),wie=e=>{var t;const n=(t=io($5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cie=$3(e=>{var t,n,r,i;return{label:(n=(t=$5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$5).baseStyle)==null?void 0:i.call(r,e).container,control:wie(e)}}),_ie={md:$3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:$3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:$3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kie=xie({baseStyle:Cie,sizes:_ie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eie,definePartsStyle:Pie}=Jn(See.keys),Oy=zn("select-bg"),yT,Tie={...(yT=vn.baseStyle)==null?void 0:yT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Oy.reference,[Oy.variable]:"colors.white",_dark:{[Oy.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Oy.reference}},Lie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aie=Pie({field:Tie,icon:Lie}),Ny={paddingInlineEnd:"8"},ST,bT,xT,wT,CT,_T,kT,ET,Mie={lg:{...(ST=vn.sizes)==null?void 0:ST.lg,field:{...(bT=vn.sizes)==null?void 0:bT.lg.field,...Ny}},md:{...(xT=vn.sizes)==null?void 0:xT.md,field:{...(wT=vn.sizes)==null?void 0:wT.md.field,...Ny}},sm:{...(CT=vn.sizes)==null?void 0:CT.sm,field:{...(_T=vn.sizes)==null?void 0:_T.sm.field,...Ny}},xs:{...(kT=vn.sizes)==null?void 0:kT.xs,field:{...(ET=vn.sizes)==null?void 0:ET.xs.field,...Ny},icon:{insetEnd:"1"}}},Iie=Eie({baseStyle:Aie,sizes:Mie,variants:vn.variants,defaultProps:vn.defaultProps}),$x=zn("skeleton-start-color"),Hx=zn("skeleton-end-color"),Rie={[$x.variable]:"colors.gray.100",[Hx.variable]:"colors.gray.400",_dark:{[$x.variable]:"colors.gray.800",[Hx.variable]:"colors.gray.600"},background:$x.reference,borderColor:Hx.reference,opacity:.7,borderRadius:"sm"},Oie={baseStyle:Rie},Wx=zn("skip-link-bg"),Nie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Wx.variable]:"colors.white",_dark:{[Wx.variable]:"colors.gray.700"},bg:Wx.reference}},Die={baseStyle:Nie},{defineMultiStyleConfig:zie,definePartsStyle:cS}=Jn(bee.keys),_v=zn("slider-thumb-size"),kv=zn("slider-track-size"),zc=zn("slider-bg"),Bie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...i8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fie=e=>({...i8({orientation:e.orientation,horizontal:{h:kv.reference},vertical:{w:kv.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),$ie=e=>{const{orientation:t}=e;return{...i8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:_v.reference,h:_v.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Hie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},Wie=cS(e=>({container:Bie(e),track:Fie(e),thumb:$ie(e),filledTrack:Hie(e)})),Vie=cS({container:{[_v.variable]:"sizes.4",[kv.variable]:"sizes.1"}}),Uie=cS({container:{[_v.variable]:"sizes.3.5",[kv.variable]:"sizes.1"}}),Gie=cS({container:{[_v.variable]:"sizes.2.5",[kv.variable]:"sizes.0.5"}}),jie={lg:Vie,md:Uie,sm:Gie},Yie=zie({baseStyle:Wie,sizes:jie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),qie={width:[Mf.reference],height:[Mf.reference]},Kie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Xie={baseStyle:qie,sizes:Kie,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zie,definePartsStyle:iD}=Jn(xee.keys),Qie={fontWeight:"medium"},Jie={opacity:.8,marginBottom:"2"},eoe={verticalAlign:"baseline",fontWeight:"semibold"},toe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},noe=iD({container:{},label:Qie,helpText:Jie,number:eoe,icon:toe}),roe={md:iD({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ioe=Zie({baseStyle:noe,sizes:roe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ooe,definePartsStyle:H3}=Jn(wee.keys),Fm=ni("switch-track-width"),qf=ni("switch-track-height"),Vx=ni("switch-track-diff"),aoe=pu.subtract(Fm,qf),cC=ni("switch-thumb-x"),jg=ni("switch-bg"),soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Fm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[jg.variable]:"colors.gray.300",_dark:{[jg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[jg.variable]:`colors.${t}.500`,_dark:{[jg.variable]:`colors.${t}.200`}},bg:jg.reference}},loe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${cC.reference})`}},uoe=H3(e=>({container:{[Vx.variable]:aoe,[cC.variable]:Vx.reference,_rtl:{[cC.variable]:pu(Vx).negate().toString()}},track:soe(e),thumb:loe})),coe={sm:H3({container:{[Fm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:H3({container:{[Fm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:H3({container:{[Fm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},doe=ooe({baseStyle:uoe,sizes:coe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:foe,definePartsStyle:_0}=Jn(Cee.keys),hoe=_0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H5={"&[data-is-numeric=true]":{textAlign:"end"}},poe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),goe=_0(e=>{const{colorScheme:t}=e;return{th:{color:yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},td:{borderBottom:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e),...H5},caption:{color:yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:yt(`${t}.100`,`${t}.700`)(e)},td:{background:yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),moe={simple:poe,striped:goe,unstyled:{}},voe={sm:_0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yoe=foe({baseStyle:hoe,variants:moe,sizes:voe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=zn("tabs-color"),bs=zn("tabs-bg"),Dy=zn("tabs-border-color"),{defineMultiStyleConfig:Soe,definePartsStyle:El}=Jn(_ee.keys),boe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xoe=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},woe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Coe={p:4},_oe=El(e=>({root:boe(e),tab:xoe(e),tablist:woe(e),tabpanel:Coe})),koe={sm:El({tab:{py:1,px:4,fontSize:"sm"}}),md:El({tab:{fontSize:"md",py:2,px:4}}),lg:El({tab:{fontSize:"lg",py:3,px:4}})},Eoe=El(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bs.variable]:"colors.gray.200",_dark:{[bs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:bs.reference}}}),Poe=El(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Dy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Dy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Dy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Dy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Toe=El(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bs.variable]:"colors.gray.50",_dark:{[bs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bs.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[bs.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:bs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Loe=El(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),Aoe=El(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[bs.variable]:`colors.${t}.300`}},color:To.reference,bg:bs.reference}}}),Moe=El({}),Ioe={line:Eoe,enclosed:Poe,"enclosed-colored":Toe,"soft-rounded":Loe,"solid-rounded":Aoe,unstyled:Moe},Roe=Soe({baseStyle:_oe,sizes:koe,variants:Ioe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Kf}=Jn(kee.keys),Noe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Doe={lineHeight:1.2,overflow:"visible"},zoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Boe=Kf({container:Noe,label:Doe,closeButton:zoe}),Foe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},$oe={subtle:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Dm.variants)==null?void 0:t.outline(e)}})},Hoe=Ooe({variants:$oe,baseStyle:Boe,sizes:Foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),PT,Woe={...(PT=vn.baseStyle)==null?void 0:PT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},TT,Voe={outline:e=>{var t;return((t=vn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=vn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=vn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((TT=vn.variants)==null?void 0:TT.unstyled.field)??{}},LT,AT,MT,IT,Uoe={xs:((LT=vn.sizes)==null?void 0:LT.xs.field)??{},sm:((AT=vn.sizes)==null?void 0:AT.sm.field)??{},md:((MT=vn.sizes)==null?void 0:MT.md.field)??{},lg:((IT=vn.sizes)==null?void 0:IT.lg.field)??{}},Goe={baseStyle:Woe,sizes:Uoe,variants:Voe,defaultProps:{size:"md",variant:"outline"}},zy=ni("tooltip-bg"),Ux=ni("tooltip-fg"),joe=ni("popper-arrow-bg"),Yoe={bg:zy.reference,color:Ux.reference,[zy.variable]:"colors.gray.700",[Ux.variable]:"colors.whiteAlpha.900",_dark:{[zy.variable]:"colors.gray.300",[Ux.variable]:"colors.gray.900"},[joe.variable]:zy.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},qoe={baseStyle:Yoe},Koe={Accordion:fte,Alert:bte,Avatar:Mte,Badge:Dm,Breadcrumb:Hte,Button:Xte,Checkbox:$5,CloseButton:dne,Code:gne,Container:vne,Divider:wne,Drawer:Rne,Editable:$ne,Form:jne,FormError:Qne,FormLabel:ere,Heading:rre,Input:vn,Kbd:hre,Link:gre,List:bre,Menu:Are,Modal:Hre,NumberInput:Zre,PinInput:tie,Popover:fie,Progress:bie,Radio:kie,Select:Iie,Skeleton:Oie,SkipLink:Die,Slider:Yie,Spinner:Xie,Stat:ioe,Switch:doe,Table:yoe,Tabs:Roe,Tag:Hoe,Textarea:Goe,Tooltip:qoe,Card:tne},Xoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zoe=Xoe,Qoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Joe=Qoe,eae={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tae=eae,nae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rae=nae,iae={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},oae=iae,aae={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sae={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},uae={property:aae,easing:sae,duration:lae},cae=uae,dae={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fae=dae,hae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pae=hae,gae={breakpoints:Joe,zIndices:fae,radii:rae,blur:pae,colors:tae,...tD,sizes:QN,shadows:oae,space:ZN,borders:Zoe,transition:cae},mae={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vae={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yae="ltr",Sae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},bae={semanticTokens:mae,direction:yae,...gae,components:Koe,styles:vae,config:Sae},xae=typeof Element<"u",wae=typeof Map=="function",Cae=typeof Set=="function",_ae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!W3(e[r],t[r]))return!1;return!0}var o;if(wae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!W3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cae&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_ae&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!W3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kae=function(t,n){try{return W3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function f1(){const e=C.exports.useContext(wv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function oD(){const e=Zv(),t=f1();return{...e,theme:t}}function Eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Pae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Tae(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Eae(o,l,a[u]??l);const h=`${e}.${l}`;return Pae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Lae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>CQ(n),[n]);return ee(IJ,{theme:i,children:[x(Aae,{root:t}),r]})}function Aae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(sS,{styles:n=>({[t]:n.__cssVars})})}qJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Mae(){const{colorMode:e}=Zv();return x(sS,{styles:t=>{const n=$N(t,"styles.global"),r=VN(n,{theme:t,colorMode:e});return r?vN(r)(t):void 0}})}var Iae=new Set([...EQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Oae(e){return Rae.has(e)||!Iae.has(e)}var Nae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=HN(a,(g,m)=>TQ(m)),l=VN(e,t),u=Object.assign({},i,l,WN(s),o),h=vN(u)(t.theme);return r?[h,r]:h};function Gx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oae);const i=Nae({baseStyle:n}),o=oC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Zv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function aD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=oD(),a=e?$N(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},s?.defaultProps??{},WN(WJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=BQ(s)(l);kae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return aD(e,t)}function Ii(e,t={}){return aD(e,t)}function Dae(){const e=new Map;return new Proxy(Gx,{apply(t,n,r){return Gx(...r)},get(t,n){return e.has(n)||e.set(n,Gx(n)),e.get(n)}})}var be=Dae();function zae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??zae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Bae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Wn(...e){return t=>{e.forEach(n=>{Bae(n,t)})}}function Fae(...e){return C.exports.useMemo(()=>Wn(...e),e)}function RT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var $ae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function OT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function NT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var dC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,W5=e=>e,Hae=class{descendants=new Map;register=e=>{if(e!=null)return $ae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=RT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=OT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=OT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=NT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=NT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function Wae(){const e=C.exports.useRef(new Hae);return dC(()=>()=>e.current.destroy()),e.current}var[Vae,sD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Uae(e){const t=sD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);dC(()=>()=>{!i.current||t.unregister(i.current)},[]),dC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=W5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Wn(o,i)}}function lD(){return[W5(Vae),()=>W5(sD()),()=>Wae(),i=>Uae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),DT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ya=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??DT.viewBox;if(n&&typeof n!="string")return ae.createElement(be.svg,{as:n,...m,...u});const y=a??DT.path;return ae.createElement(be.svg,{verticalAlign:"middle",viewBox:v,...m,...u},y)});ya.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>x(ya,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function dS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const y=typeof m=="function"?m(h):m;!a(h,y)||(u||l(y),o(y))},[u,o,h,a]);return[h,g]}const l8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fS=C.exports.createContext({});function Gae(){return C.exports.useContext(fS).visualElement}const h1=C.exports.createContext(null),ph=typeof document<"u",V5=ph?C.exports.useLayoutEffect:C.exports.useEffect,uD=C.exports.createContext({strict:!1});function jae(e,t,n,r){const i=Gae(),o=C.exports.useContext(uD),a=C.exports.useContext(h1),s=C.exports.useContext(l8).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return V5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),V5(()=>()=>u&&u.notify("Unmount"),[]),u}function t0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):t0(n)&&(n.current=r))},[t])}function Ev(e){return typeof e=="string"||Array.isArray(e)}function hS(e){return typeof e=="object"&&typeof e.start=="function"}const qae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function pS(e){return hS(e.animate)||qae.some(t=>Ev(e[t]))}function cD(e){return Boolean(pS(e)||e.variants)}function Kae(e,t){if(pS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ev(n)?n:void 0,animate:Ev(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xae(e){const{initial:t,animate:n}=Kae(e,C.exports.useContext(fS));return C.exports.useMemo(()=>({initial:t,animate:n}),[zT(t),zT(n)])}function zT(e){return Array.isArray(e)?e.join(" "):e}const uu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Pv={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};function Zae(e){for(const t in e)t==="projectionNodeConstructor"?Pv.projectionNodeConstructor=e[t]:Pv[t].Component=e[t]}function gS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const $m={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qae=1;function Jae(){return gS(()=>{if($m.hasEverUpdated)return Qae++})}const u8=C.exports.createContext({});class ese extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const dD=C.exports.createContext({}),tse=Symbol.for("motionComponentSymbol");function nse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zae(e);function a(l,u){const h={...C.exports.useContext(l8),...l,layoutId:rse(l)},{isStatic:g}=h;let m=null;const v=Xae(l),y=g?void 0:Jae(),w=i(l,g);if(!g&&ph){v.visualElement=jae(o,w,h,t);const E=C.exports.useContext(uD).strict,P=C.exports.useContext(dD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,y,n||Pv.projectionNodeConstructor,P))}return ee(ese,{visualElement:v.visualElement,props:h,children:[m,x(fS.Provider,{value:v,children:r(o,l,y,Yae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tse]=o,s}function rse({layoutId:e}){const t=C.exports.useContext(u8).id;return t&&e!==void 0?t+"-"+e:e}function ise(e){function t(r,i={}){return nse(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function c8(e){return typeof e!="string"||e.includes("-")?!1:!!(ose.indexOf(e)>-1||/[A-Z]/.test(e))}const U5={};function ase(e){Object.assign(U5,e)}const G5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p1=new Set(G5);function fD(e,{layout:t,layoutId:n}){return p1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U5[e]||e==="opacity")}const Il=e=>!!e?.getVelocity,sse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=(e,t)=>G5.indexOf(e)-G5.indexOf(t);function use({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lse);for(const s of t)a+=`${sse[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function hD(e){return e.startsWith("--")}const cse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pD=(e,t)=>n=>Math.max(Math.min(n,t),e),Hm=e=>e%1?Number(e.toFixed(5)):e,Tv=/(-)?([\d]*\.?[\d])+/g,fC=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function t2(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wm=Object.assign(Object.assign({},gh),{transform:pD(0,1)}),By=Object.assign(Object.assign({},gh),{default:1}),n2=e=>({test:t=>t2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=n2("deg"),Pl=n2("%"),Ct=n2("px"),fse=n2("vh"),hse=n2("vw"),BT=Object.assign(Object.assign({},Pl),{parse:e=>Pl.parse(e)/100,transform:e=>Pl.transform(e*100)}),d8=(e,t)=>n=>Boolean(t2(n)&&dse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gD=(e,t,n)=>r=>{if(!t2(r))return r;const[i,o,a,s]=r.match(Tv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:d8("hsl","hue"),parse:gD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pl.transform(Hm(t))+", "+Pl.transform(Hm(n))+", "+Hm(Wm.transform(r))+")"},pse=pD(0,255),jx=Object.assign(Object.assign({},gh),{transform:e=>Math.round(pse(e))}),Vc={test:d8("rgb","red"),parse:gD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jx.transform(e)+", "+jx.transform(t)+", "+jx.transform(n)+", "+Hm(Wm.transform(r))+")"};function gse(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const hC={test:d8("#"),parse:gse,transform:Vc.transform},Ji={test:e=>Vc.test(e)||hC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):hC.parse(e),transform:e=>t2(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},mD="${c}",vD="${n}";function mse(e){var t,n,r,i;return isNaN(e)&&t2(e)&&((n=(t=e.match(Tv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(fC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function yD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(fC);r&&(n=r.length,e=e.replace(fC,mD),t.push(...r.map(Ji.parse)));const i=e.match(Tv);return i&&(e=e.replace(Tv,vD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function SD(e){return yD(e).values}function bD(e){const{values:t,numColors:n,tokenised:r}=yD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function yse(e){const t=SD(e);return bD(e)(t.map(vse))}const ku={test:mse,parse:SD,createTransformer:bD,getAnimatableNone:yse},Sse=new Set(["brightness","contrast","saturate","opacity"]);function bse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tv)||[];if(!r)return e;const i=n.replace(r,"");let o=Sse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xse=/([a-z-]*)\(.*?\)/g,pC=Object.assign(Object.assign({},ku),{getAnimatableNone:e=>{const t=e.match(xse);return t?t.map(bse).join(" "):e}}),FT={...gh,transform:Math.round},xD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:By,scaleX:By,scaleY:By,scaleZ:By,skew:Lc,skewX:Lc,skewY:Lc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Wm,originX:BT,originY:BT,originZ:Ct,zIndex:FT,fillOpacity:Wm,strokeOpacity:Wm,numOctaves:FT};function f8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(hD(m)){o[m]=v;continue}const y=xD[m],w=cse(v,y);if(p1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(y.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=use(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:y=0}=l;i.transformOrigin=`${m} ${v} ${y}`}}const h8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function wD(e,t,n){for(const r in t)!Il(t[r])&&!fD(r,n)&&(e[r]=t[r])}function wse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=h8();return f8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cse(e,t,n){const r=e.style||{},i={};return wD(i,r,e),Object.assign(i,wse(e,t,n)),e.transformValues?e.transformValues(i):i}function _se(e,t,n){const r={},i=Cse(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Ese=["whileTap","onTap","onTapStart","onTapCancel"],Pse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lse=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tse,...Ese,...kse,...Pse]);function j5(e){return Lse.has(e)}let CD=e=>!j5(e);function Ase(e){!e||(CD=t=>t.startsWith("on")?!j5(t):e(t))}try{Ase(require("@emotion/is-prop-valid").default)}catch{}function Mse(e,t,n){const r={};for(const i in e)(CD(i)||n===!0&&j5(i)||!t&&!j5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Ise(e,t,n){const r=$T(t,e.x,e.width),i=$T(n,e.y,e.height);return`${r} ${i}`}const Rse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ose={offset:"strokeDashoffset",array:"strokeDasharray"};function Nse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rse:Ose;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function p8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){f8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ise(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Nse(g,o,a,s,!1)}const _D=()=>({...h8(),attrs:{}});function Dse(e,t){const n=C.exports.useMemo(()=>{const r=_D();return p8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};wD(r,e.style,e),n.style={...r,...n.style}}return n}function zse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(c8(n)?Dse:_se)(r,a,s),g={...Mse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const kD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ED(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const PD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function TD(e,t,n,r){ED(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(PD.has(i)?i:kD(i),t.attrs[i])}function g8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||fD(r,e))&&(n[r]=t[r]);return n}function LD(e){const t=g8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function m8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const Lv=e=>Array.isArray(e),Bse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),AD=e=>Lv(e)?e[e.length-1]||0:e;function V3(e){const t=Il(e)?e.get():e;return Bse(t)?t.toValue():t}function Fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:$se(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const MD=e=>(t,n)=>{const r=C.exports.useContext(fS),i=C.exports.useContext(h1),o=()=>Fse(e,t,r,i);return n?o():gS(o)};function $se(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=V3(o[m]);let{initial:a,animate:s}=e;const l=pS(e),u=cD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!hS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const y=m8(e,v);if(!y)return;const{transitionEnd:w,transition:E,...P}=y;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Hse={useVisualState:MD({scrapeMotionValuesFromProps:LD,createRenderState:_D,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}p8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),TD(t,n)}})},Wse={useVisualState:MD({scrapeMotionValuesFromProps:g8,createRenderState:h8})};function Vse(e,{forwardMotionProps:t=!1},n,r,i){return{...c8(e)?Hse:Wse,preloadedFeatures:n,useRender:zse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function mS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return mS(i,t,n,r)},[e,t,n,r])}function Use({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};gC(t,"focus",e?r:void 0),gC(t,"blur",e?i:void 0)}function ID(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function RD(e){return!!e.touches}function Gse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const jse={pageX:0,pageY:0};function Yse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||jse;return{x:r[t+"X"],y:r[t+"Y"]}}function qse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function v8(e,t="page"){return{point:RD(e)?Yse(e,t):qse(e,t)}}const OD=(e,t=!1)=>{const n=r=>e(r,v8(r));return t?Gse(n):n},Kse=()=>ph&&window.onpointerdown===null,Xse=()=>ph&&window.ontouchstart===null,Zse=()=>ph&&window.onmousedown===null,Qse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ND(e){return Kse()?e:Xse()?Jse[e]:Zse()?Qse[e]:e}function k0(e,t,n,r){return mS(e,ND(t),OD(n,t==="pointerdown"),r)}function Y5(e,t,n,r){return gC(e,ND(t),n&&OD(n,t==="pointerdown"),r)}function DD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=DD("dragHorizontal"),WT=DD("dragVertical");function zD(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=HT();else{const n=HT(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BD(){const e=zD(!0);return e?(e(),!1):!0}function VT(e,t,n){return(r,i)=>{!ID(r)||BD()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function ele({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Y5(r,"pointerenter",e||n?VT(r,!0,e):void 0,{passive:!e}),Y5(r,"pointerleave",t||n?VT(r,!1,t):void 0,{passive:!t})}const FD=(e,t)=>t?e===t?!0:FD(e,t.parentElement):!1;function y8(e){return C.exports.useEffect(()=>()=>e(),[])}function $D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Yx=.001,nle=.01,UT=10,rle=.05,ile=1;function ole({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tle(e<=UT*1e3);let a=1-t;a=K5(rle,ile,a),e=K5(nle,UT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=mC(u,a),y=Math.exp(-g);return Yx-m/v*y},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-g),w=mC(Math.pow(u,2),a);return(-i(u)+Yx>0?-1:1)*((m-v)*y)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Yx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=sle(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ale=12;function sle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function cle(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!GT(e,ule)&>(e,lle)){const n=ole(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function S8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=$D(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=cle(o),v=jT,y=jT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=mC(T,k);v=R=>{const O=Math.exp(-k*T*R);return n-O*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},y=R=>{const O=Math.exp(-k*T*R);return k*T*O*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-O*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const O=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-O*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=y(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}S8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const jT=e=>0,Av=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function qx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=qx(l,s,e+1/3),o=qx(l,s,e),a=qx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fle=[hC,Vc,Ff],qT=e=>fle.find(t=>t.test(e)),HD=(e,t)=>{let n=qT(e),r=qT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=YT(i),n=Vc),r===Ff&&(o=YT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dle(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},vC=e=>typeof e=="number",hle=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(hle);function WD(e,t){return vC(e)?n=>Cr(e,t,n):Ji.test(e)?HD(e,t):UD(e,t)}const VD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>WD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=WD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function KT(e){const t=ku.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=ku.createTransformer(t),r=KT(e),i=KT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?vS(VD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},gle=(e,t)=>n=>Cr(e,t,n);function mle(e){if(typeof e=="number")return gle;if(typeof e=="string")return Ji.test(e)?HD:UD;if(Array.isArray(e))return VD;if(typeof e=="object")return ple}function vle(e,t,n){const r=[],i=n||mle(e[0]),o=e.length-1;for(let a=0;an(Av(e,t,r))}function Sle(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Av(e[o],e[o+1],i);return t[o](s)}}function GD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;q5(o===t.length),q5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vle(t,r,i),s=o===2?yle(e,a):Sle(e,a);return n?l=>s(K5(e[0],e[o-1],l)):s}const yS=e=>t=>1-e(1-t),b8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ble=e=>t=>Math.pow(t,e),jD=e=>t=>t*t*((e+1)*t-e),xle=e=>{const t=jD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},YD=1.525,wle=4/11,Cle=8/11,_le=9/10,x8=e=>e,w8=ble(2),kle=yS(w8),qD=b8(w8),KD=e=>1-Math.sin(Math.acos(e)),C8=yS(KD),Ele=b8(C8),_8=jD(YD),Ple=yS(_8),Tle=b8(_8),Lle=xle(YD),Ale=4356/361,Mle=35442/1805,Ile=16061/1805,X5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-X5(1-e*2)):.5*X5(e*2-1)+.5;function Nle(e,t){return e.map(()=>t||qD).splice(0,e.length-1)}function Dle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zle(e,t){return e.map(n=>n*t)}function U3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=zle(r&&r.length===a.length?r:Dle(a),i);function l(){return GD(s,a,{ease:Array.isArray(n)?n:Nle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ble({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const XT={keyframes:U3,spring:S8,decay:Ble};function Fle(e){if(Array.isArray(e.to))return U3;if(XT[e.type])return XT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?S8:U3}const XD=1/60*1e3,$le=typeof performance<"u"?()=>performance.now():()=>Date.now(),ZD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e($le()),XD);function Hle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hle(()=>Mv=!0),e),{}),Vle=r2.reduce((e,t)=>{const n=SS[t];return e[t]=(r,i=!1,o=!1)=>(Mv||jle(),n.schedule(r,i,o)),e},{}),Ule=r2.reduce((e,t)=>(e[t]=SS[t].cancel,e),{});r2.reduce((e,t)=>(e[t]=()=>SS[t].process(E0),e),{});const Gle=e=>SS[e].process(E0),QD=e=>{Mv=!1,E0.delta=yC?XD:Math.max(Math.min(e-E0.timestamp,Wle),1),E0.timestamp=e,SC=!0,r2.forEach(Gle),SC=!1,Mv&&(yC=!1,ZD(QD))},jle=()=>{Mv=!0,yC=!0,SC||ZD(QD)},Yle=()=>E0;function JD(e,t,n=0){return e-t-n}function qle(e,t,n=0,r=!0){return r?JD(t+-e,t,n):t-(e-t)+n}function Kle(e,t,n,r){return r?e>=t+n:e<=-n}const Xle=e=>{const t=({delta:n})=>e(n);return{start:()=>Vle.update(t,!0),stop:()=>Ule.update(t)}};function ez(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:y}=e,w=$D(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,O=!0,N;const z=Fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=GD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(O=k%2===0,a=qle(a,T,u,O)):(a=JD(a,T,u),l==="mirror"&&V.flipTarget()),R=!1,v&&v()}function j(){P.stop(),m&&m()}function le(Q){if(O||(Q=-Q),a+=Q,!R){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),R=O?ne.done:a<=0}y?.(M),R&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function tz(e,t){return t?e*(1e3/t):0}function Zle({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:g,onComplete:m,onStop:v}){let y;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;g?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let O,N;const z=V=>{O=N,N=V,t=tz(V-O,Yle().delta),(R===1&&V>M||R===-1&&Vy?.stop()}}const bC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ZT=e=>bC(e)&&e.hasOwnProperty("z"),Fy=(e,t)=>Math.abs(e-t);function k8(e,t){if(vC(e)&&vC(t))return Fy(e,t);if(bC(e)&&bC(t)){const n=Fy(e.x,t.x),r=Fy(e.y,t.y),i=ZT(e)&&ZT(t)?Fy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const nz=(e,t)=>1-3*t+3*e,rz=(e,t)=>3*t-6*e,iz=e=>3*e,Z5=(e,t,n)=>((nz(t,n)*e+rz(t,n))*e+iz(t))*e,oz=(e,t,n)=>3*nz(t,n)*e*e+2*rz(t,n)*e+iz(t),Qle=1e-7,Jle=10;function eue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Z5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qle&&++s=nue?rue(a,g,e,n):m===0?g:eue(a,s,s+$y,e,n)}return a=>a===0||a===1?a:Z5(o(a),t,r)}function oue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!BD()}function g(y,w){!h()||(FD(i.current,y.target)?e&&e(y,w):n&&n(y,w))}function m(y,w){!h()||n&&n(y,w)}function v(y,w){u(),!a.current&&(a.current=!0,s.current=vS(k0(window,"pointerup",g,l),k0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(y,w))}Y5(i,"pointerdown",o?v:void 0,l),y8(u)}const aue="production",az=typeof process>"u"||process.env===void 0?aue:"production",QT=new Set;function sz(e,t,n){e||QT.has(t)||(console.warn(t),n&&console.warn(n),QT.add(t))}const xC=new WeakMap,Kx=new WeakMap,sue=e=>{const t=xC.get(e.target);t&&t(e)},lue=e=>{e.forEach(sue)};function uue({root:e,...t}){const n=e||document;Kx.has(n)||Kx.set(n,{});const r=Kx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lue,{root:e,...t})),r[i]}function cue(e,t,n){const r=uue(t);return xC.set(e,n),r.observe(e),()=>{xC.delete(e),r.unobserve(e)}}function due({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?pue:hue)(a,o.current,e,i)}const fue={some:0,all:1};function hue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:fue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return cue(n.current,s,l)},[e,r,i,o])}function pue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(az!=="production"&&sz(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),gue={inView:Uc(due),tap:Uc(oue),focus:Uc(Use),hover:Uc(ele)};function E8(){const e=C.exports.useContext(h1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mue(){return vue(C.exports.useContext(h1))}function vue(e){return e===null?!0:e.isPresent}function lz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,yue={linear:x8,easeIn:w8,easeInOut:qD,easeOut:kle,circIn:KD,circInOut:Ele,circOut:C8,backIn:_8,backInOut:Tle,backOut:Ple,anticipate:Lle,bounceIn:Rle,bounceInOut:Ole,bounceOut:X5},JT=e=>{if(Array.isArray(e)){q5(e.length===4);const[t,n,r,i]=e;return iue(t,n,r,i)}else if(typeof e=="string")return yue[e];return e},Sue=e=>Array.isArray(e)&&typeof e[0]!="number",eL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ku.test(t)&&!t.startsWith("url(")),vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Hy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xx=()=>({type:"keyframes",ease:"linear",duration:.3}),bue=e=>({type:"keyframes",duration:.8,values:e}),tL={x:vf,y:vf,z:vf,rotate:vf,rotateX:vf,rotateY:vf,rotateZ:vf,scaleX:Hy,scaleY:Hy,scale:Hy,opacity:Xx,backgroundColor:Xx,color:Xx,default:Hy},xue=(e,t)=>{let n;return Lv(t)?n=bue:n=tL[e]||tL.default,{to:t,...n(t)}},wue={...xD,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:pC,WebkitFilter:pC},P8=e=>wue[e];function T8(e,t){var n;let r=P8(e);return r!==pC&&(r=ku),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cue={current:!1},uz=1/60*1e3,_ue=typeof performance<"u"?()=>performance.now():()=>Date.now(),cz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_ue()),uz);function kue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=kue(()=>Iv=!0),e),{}),Es=i2.reduce((e,t)=>{const n=bS[t];return e[t]=(r,i=!1,o=!1)=>(Iv||Tue(),n.schedule(r,i,o)),e},{}),ah=i2.reduce((e,t)=>(e[t]=bS[t].cancel,e),{}),Zx=i2.reduce((e,t)=>(e[t]=()=>bS[t].process(P0),e),{}),Pue=e=>bS[e].process(P0),dz=e=>{Iv=!1,P0.delta=wC?uz:Math.max(Math.min(e-P0.timestamp,Eue),1),P0.timestamp=e,CC=!0,i2.forEach(Pue),CC=!1,Iv&&(wC=!1,cz(dz))},Tue=()=>{Iv=!0,wC=!0,CC||cz(dz)},_C=()=>P0;function fz(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Es.read(r,!0),()=>ah.read(r)}function Lue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Aue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=Q5(o.duration)),o.repeatDelay&&(a.repeatDelay=Q5(o.repeatDelay)),e&&(a.ease=Sue(e)?e.map(JT):JT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Mue(e,t){var n,r;return(r=(n=(L8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Iue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Iue(t),Lue(e)||(e={...e,...xue(n,t.to)}),{...t,...Aue(e)}}function Oue(e,t,n,r,i){const o=L8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=eL(e,n);a==="none"&&s&&typeof n=="string"?a=T8(e,n):nL(a)&&typeof n=="string"?a=rL(n):!Array.isArray(n)&&nL(n)&&typeof a=="string"&&(n=rL(a));const l=eL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zle({...g,...o}):ez({...Rue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=AD(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function nL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function rL(e){return typeof e=="number"?0:T8("",e)}function L8(e,t){return e[t]||e.default||e}function A8(e,t,n,r={}){return Cue.current&&(r={type:!1}),t.start(i=>{let o;const a=Oue(e,t,n,r,i),s=Mue(r,e),l=()=>o=a();let u;return s?u=fz(l,Q5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Nue=e=>/^\-?\d*\.?\d+$/.test(e),Due=e=>/^0[^.\s]+$/.test(e);function M8(e,t){e.indexOf(t)===-1&&e.push(t)}function I8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Vm{constructor(){this.subscriptions=[]}add(t){return M8(this.subscriptions,t),()=>I8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Bue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Vm,this.velocityUpdateSubscribers=new Vm,this.renderSubscribers=new Vm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=_C();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Es.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function K0(e){return new Bue(e)}const hz=e=>t=>t.test(e),Fue={test:e=>e==="auto",parse:e=>e},pz=[gh,Ct,Pl,Lc,hse,fse,Fue],Yg=e=>pz.find(hz(e)),$ue=[...pz,Ji,ku],Hue=e=>$ue.find(hz(e));function Wue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function xS(e,t,n){const r=e.getProps();return m8(r,t,n!==void 0?n:r.custom,Wue(e),Vue(e))}function Uue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K0(n))}function Gue(e,t){const n=xS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=AD(o[a]);Uue(e,a,s)}}function jue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;skC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=kC(e,t,n);else{const i=typeof t=="function"?xS(e,t,n.custom):t;r=gz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function kC(e,t,n={}){var r;const i=xS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>gz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Xue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function gz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),y=l[m];if(!v||y===void 0||g&&Que(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&p1.has(m)&&(w={...w,type:!1,delay:0});let E=A8(m,v,y,w);J5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Gue(e,s)})}function Xue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zue).forEach((u,h)=>{a.push(kC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zue(e,t){return e.sortNodePosition(t)}function Que({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const R8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],Jue=[...R8].reverse(),ece=R8.length;function tce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kue(e,n,r)))}function nce(e){let t=tce(e);const n=ice();let r=!0;const i=(l,u)=>{const h=xS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],y=new Set;let w={},E=1/0;for(let k=0;kE&&O;const j=Array.isArray(R)?R:[R];let le=j.reduce(i,{});N===!1&&(le={});const{prevResolvedValues:W={}}=M,Q={...W,...le},ne=J=>{$=!0,y.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=le[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Lv(K)&&Lv(G)?!lz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):y.add(J):K!==void 0&&y.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=R,M.prevResolvedValues=le,M.isActive&&(w={...w,...le}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(y.size){const k={};y.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lz(t,e):!1}function yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ice(){return{[Yn.Animate]:yf(!0),[Yn.InView]:yf(),[Yn.Hover]:yf(),[Yn.Tap]:yf(),[Yn.Drag]:yf(),[Yn.Focus]:yf(),[Yn.Exit]:yf()}}const oce={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=nce(e)),hS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=E8(),o=C.exports.useContext(h1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class mz{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Jx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=k8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=_C();this.history.push({...m,timestamp:v});const{onStart:y,onMove:w}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Qx(h,this.transformPagePoint),ID(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Jx(Qx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},RD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=v8(t),o=Qx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=_C();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Jx(o,this.history)),this.removeListeners=vS(k0(window,"pointermove",this.handlePointerMove),k0(window,"pointerup",this.handlePointerUp),k0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Qx(e,t){return t?{point:t(e.point)}:e}function iL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jx({point:e},t){return{point:e,delta:iL(e,vz(t)),offset:iL(e,ace(t)),velocity:sce(t,.1)}}function ace(e){return e[0]}function vz(e){return e[e.length-1]}function sce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Q5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ha(e){return e.max-e.min}function oL(e,t=0,n=.01){return k8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function uL(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cce(e,{top:t,left:n,bottom:r,right:i}){return{x:uL(e.x,n,i),y:uL(e.y,t,r)}}function cL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Av(t.min,t.max-r,e.min):r>i&&(n=Av(e.min,e.max-i,t.min)),K5(0,1,n)}function hce(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const EC=.35;function pce(e=EC){return e===!1?e=0:e===!0&&(e=EC),{x:dL(e,"left","right"),y:dL(e,"top","bottom")}}function dL(e,t,n){return{min:fL(e,t),max:fL(e,n)}}function fL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const hL=()=>({translate:0,scale:1,origin:0,originPoint:0}),jm=()=>({x:hL(),y:hL()}),pL=()=>({min:0,max:0}),Zr=()=>({x:pL(),y:pL()});function cl(e){return[e("x"),e("y")]}function yz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ew(e){return e===void 0||e===1}function PC({scale:e,scaleX:t,scaleY:n}){return!ew(e)||!ew(t)||!ew(n)}function kf(e){return PC(e)||Sz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Sz(e){return gL(e.x)||gL(e.y)}function gL(e){return e&&e!=="0%"}function e4(e,t,n){const r=e-n,i=t*r;return n+i}function mL(e,t,n,r,i){return i!==void 0&&(e=e4(e,i,r)),e4(e,n,r)+t}function TC(e,t=0,n=1,r,i){e.min=mL(e.min,t,n,r,i),e.max=mL(e.max,t,n,r,i)}function bz(e,{x:t,y:n}){TC(e.x,t.translate,t.scale,t.originPoint),TC(e.y,n.translate,n.scale,n.originPoint)}function vce(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(v8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var y,w;let E=this.getAxisMotionValue(v).get()||0;if(Pl.test(E)){const P=(w=(y=this.visualElement.projection)===null||y===void 0?void 0:y.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ha(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Cce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new mz(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uce(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&t0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cce(r.layoutBox,t):this.constraints=!1,this.elastic=pce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bce(r,i.root,this.visualElement.getTransformPagePoint());let a=dce(i.layout.layoutBox,o);if(n){const s=n(gce(a));this.hasMutatedConstraints=!!s,s&&(a=yz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Wy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,y=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return A8(t,r,0,n)}stopAnimation(){cl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){cl(n=>{const{drag:r}=this.getProps();if(!Wy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!t0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=fce({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),cl(s=>{if(!Wy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;xce.set(this.visualElement,this);const n=this.visualElement.current,r=k0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();t0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=mS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=EC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Wy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _ce(e){const{dragControls:t,visualElement:n}=e,r=gS(()=>new wce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function kce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(l8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new mz(h,l,{transformPagePoint:s})}Y5(i,"pointerdown",o&&u),y8(()=>a.current&&a.current.end())}const Ece={pan:Uc(kce),drag:Uc(_ce)};function LC(e){return typeof e=="string"&&e.startsWith("var(--")}const wz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pce(e){const t=wz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function AC(e,t,n=1){const[r,i]=Pce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():LC(i)?AC(i,t,n+1):i}function Tce(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!LC(o))return;const a=AC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!LC(o))continue;const a=AC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Lce=new Set(["width","height","top","left","right","bottom","x","y"]),Cz=e=>Lce.has(e),Ace=e=>Object.keys(e).some(Cz),_z=(e,t)=>{e.set(t,!1),e.set(t)},yL=e=>e===gh||e===Ct;var SL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(SL||(SL={}));const bL=(e,t)=>parseFloat(e.split(", ")[t]),xL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return bL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?bL(o[1],e):0}},Mce=new Set(["x","y","z"]),Ice=G5.filter(e=>!Mce.has(e));function Rce(e){const t=[];return Ice.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const wL={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:xL(4,13),y:xL(5,14)},Oce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=wL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);_z(h,s[u]),e[u]=wL[u](l,o)}),e},Nce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Cz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Yg(h);const m=t[l];let v;if(Lv(m)){const y=m.length,w=m[0]===null?1:0;h=m[w],g=Yg(h);for(let E=w;E=0?window.pageYOffset:null,u=Oce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dce(e,t,n,r){return Ace(t)?Nce(e,t,n,r):{target:t,transitionEnd:r}}const zce=(e,t,n,r)=>{const i=Tce(e,t,r);return t=i.target,r=i.transitionEnd,Dce(e,t,n,r)},MC={current:null},kz={current:!1};function Bce(){if(kz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>MC.current=e.matches;e.addListener(t),t()}else MC.current=!1}function Fce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),J5(r)&&r.add(i);else if(Il(a))e.addValue(i,K0(o)),J5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,K0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ez=Object.keys(Pv),$ce=Ez.length,CL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hce{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Es.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pS(n),this.isVariantNode=cD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),J5(l)&&l.add(h))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kz.current||Bce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:MC.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),ah.update(this.notifyUpdate),ah.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=p1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Es.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<$ce;l++){const u=Ez[l],{isEnabled:h,Component:g}=Pv[u];h(t)&&g&&s.push(C.exports.createElement(g,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:h,dragConstraints:g,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(h)||g&&t0(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=K0(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=m8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Il(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const Pz=["initial",...R8],Wce=Pz.length;class Tz extends Hce{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=que(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){jue(this,r,a);const s=zce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Vce(e){return window.getComputedStyle(e)}class Uce extends Tz{readValueFromInstance(t,n){if(p1.has(n)){const r=P8(n);return r&&r.default||0}else{const r=Vce(t),i=(hD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xz(t,n)}build(t,n,r,i){f8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return g8(t)}renderInstance(t,n,r,i){ED(t,n,r,i)}}class Gce extends Tz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return p1.has(n)?((r=P8(n))===null||r===void 0?void 0:r.default)||0:(n=PD.has(n)?n:kD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return LD(t)}build(t,n,r,i){p8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){TD(t,n,r,i)}}const jce=(e,t)=>c8(e)?new Gce(t,{enableHardwareAcceleration:!1}):new Uce(t,{enableHardwareAcceleration:!0});function _L(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=_L(e,t.target.x),r=_L(e,t.target.y);return`${n}% ${r}%`}},kL="_$css",Yce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(wz,v=>(o.push(v),kL)));const a=ku.parse(e);if(a.length>5)return r;const s=ku.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(kL,()=>{const y=o[v];return v++,y})}return m}};class qce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ase(Xce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),$m.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Es.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Kce(e){const[t,n]=E8(),r=C.exports.useContext(u8);return x(qce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(dD),isPresent:t,safeToRemove:n})}const Xce={borderRadius:{...qg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qg,borderTopRightRadius:qg,borderBottomLeftRadius:qg,borderBottomRightRadius:qg,boxShadow:Yce},Zce={measureLayout:Kce};function Qce(e,t,n={}){const r=Il(e)?e:K0(e);return A8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Lz=["TopLeft","TopRight","BottomLeft","BottomRight"],Jce=Lz.length,EL=e=>typeof e=="string"?parseFloat(e):e,PL=e=>typeof e=="number"||Ct.test(e);function ede(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tde(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,nde(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Av(e,t,r))}function LL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){LL(e.x,t.x),LL(e.y,t.y)}function AL(e,t,n,r,i){return e-=t,e=e4(e,1/n,r),i!==void 0&&(e=e4(e,1/i,r)),e}function rde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pl.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=AL(e.min,t,n,s,i),e.max=AL(e.max,t,n,s,i)}function ML(e,t,[n,r,i],o,a){rde(e,t[n],t[r],t[i],t.scale,o,a)}const ide=["x","scaleX","originX"],ode=["y","scaleY","originY"];function IL(e,t,n,r){ML(e.x,t,ide,n?.x,r?.x),ML(e.y,t,ode,n?.y,r?.y)}function RL(e){return e.translate===0&&e.scale===1}function Mz(e){return RL(e.x)&&RL(e.y)}function Iz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function OL(e){return ha(e.x)/ha(e.y)}function ade(e,t,n=.1){return k8(e,t)<=n}class sde{constructor(){this.members=[]}add(t){M8(this.members,t),t.scheduleRender()}remove(t){if(I8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function NL(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lde=(e,t)=>e.depth-t.depth;class ude{constructor(){this.children=[],this.isDirty=!1}add(t){M8(this.children,t),this.isDirty=!0}remove(t){I8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lde),this.isDirty=!1,this.children.forEach(t)}}const DL=["","X","Y","Z"],zL=1e3;let cde=0;function Rz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=cde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gde),this.nodes.forEach(mde)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=fz(v,250),$m.hasAnimatedSinceResize&&($m.hasAnimatedSinceResize=!1,this.nodes.forEach(FL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:xde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Iz(this.targetLayout,w)||y,V=!v&&y;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...L8(R,"layout"),onPlay:O,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&FL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,ah.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vde),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const M=k/1e3;$L(v.x,a.x,M),$L(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Gm(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sde(this.relativeTarget,this.relativeTargetOrigin,y,M)),w&&(this.animationValues=m,ede(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{$m.hasAnimatedSinceResize=!0,this.currentAnimation=Qce(0,zL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,zL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Oz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=ha(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ha(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),n0(s,h),Um(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(BL),this.root.sharedNodes.clear()}}}function dde(e){e.updateLayout()}function fde(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?cl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],w=ha(y);y.min=o[v].min,y.max=y.min+w}):Oz(s,i.layoutBox,o)&&cl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],w=ha(o[v]);y.max=y.min+w});const u=jm();Um(u,o,i.layoutBox);const h=jm();l?Um(h,e.applyTransform(a,!0),i.measuredBox):Um(h,o,i.layoutBox);const g=!Mz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:y,layout:w}=v;if(y&&w){const E=Zr();Gm(E,i.layoutBox,y.layoutBox);const P=Zr();Gm(P,o,w.layoutBox),Iz(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hde(e){e.clearSnapshot()}function BL(e){e.clearMeasurements()}function pde(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gde(e){e.resolveTargetDelta()}function mde(e){e.calcProjection()}function vde(e){e.resetRotation()}function yde(e){e.removeLeadSnapshot()}function $L(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function HL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function Sde(e,t,n,r){HL(e.x,t.x,n.x,r),HL(e.y,t.y,n.y,r)}function bde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xde={duration:.45,ease:[.4,0,.1,1]};function wde(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function WL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cde(e){WL(e.x),WL(e.y)}function Oz(e,t,n){return e==="position"||e==="preserve-aspect"&&!ade(OL(t),OL(n),.2)}const _de=Rz({attachResizeListener:(e,t)=>mS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),tw={current:void 0},kde=Rz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!tw.current){const e=new _de(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),tw.current=e}return tw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ede={...oce,...gue,...Ece,...Zce},Fl=ise((e,t)=>Vse(e,t,Ede,jce,kde));function Nz(){const e=C.exports.useRef(!1);return V5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pde(){const e=Nz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class Tde extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -67,7 +67,7 @@ Error generating stack: `+o.message+` left: ${l}px !important; } `),()=>{document.head.removeChild(u)}},[t]),x(Tde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const nw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=gS(Ade),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Lde,{isPresent:n,children:e})),x(h1.Provider,{value:u,children:e})};function Ade(){return new Map}const $p=e=>e.key||"";function Mde(e,t){e.forEach(n=>{const r=$p(n);t.set(r,n)})}function Ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",sz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pde();const l=C.exports.useContext(u8).forceRender;l&&(s=l);const u=Nz(),h=Ide(e);let g=h;const m=new Set,v=C.exports.useRef(g),y=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(V5(()=>{w.current=!1,Mde(h,y),v.current=g}),y8(()=>{w.current=!0,y.clear(),m.clear()}),w.current)return x(Ln,{children:g.map(T=>x(nw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$p(T)))});g=[...g];const E=v.current.map($p),P=h.map($p),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=y.get(T);if(!M)return;const R=E.indexOf(T),O=()=>{y.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(R,0,x(nw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},$p(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(nw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$p(T))}),az!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Ln,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function IC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Rde(){return!1}var Ode=e=>{const{condition:t,message:n}=e;t&&Rde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Kg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function RC(e){switch(e?.direction??"right"){case"right":return Kg.slideRight;case"left":return Kg.slideLeft;case"bottom":return Kg.slideDown;case"top":return Kg.slideUp;default:return Kg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Nde=e=>e!=null&&parseInt(e.toString(),10)>0,UL={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Dde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Nde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(UL.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(UL.enter,i)})},zz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Ode({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:y?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(Fl.div,{ref:t,...g,className:o2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Dde,initial:r?"exit":!1,animate:P,exit:"exit"})})});zz.displayName="Collapse";var zde={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Xf.exit,n),transitionEnd:t?.exit})},Bz={initial:"exit",animate:"enter",exit:"exit",variants:zde},Bde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(Fl.div,{ref:n,className:o2("chakra-fade",o),custom:m,...Bz,animate:h,...u})})});Bde.displayName="Fade";var Fde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Xf.enter,n),transitionEnd:e?.enter})},Fz={initial:"exit",animate:"enter",exit:"exit",variants:Fde},$de=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",y={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:y,children:m&&ae.createElement(Fl.div,{ref:n,className:o2("chakra-offset-slide",s),...Fz,animate:v,custom:y,...g})})});$de.displayName="ScaleFade";var GL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=RC({direction:e});return{...i,transition:t?.exit??Ps.exit(GL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=RC({direction:e});return{...i,transition:n?.enter??Ps.enter(GL.enter,r),transitionEnd:t?.enter}}},$z=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=RC({direction:r}),y=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(Fl.div,{...m,ref:n,initial:"exit",className:o2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Hde,style:y,...g})})});$z.displayName="Slide";var Wde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},OC={initial:"initial",animate:"enter",exit:"exit",variants:Wde},Vde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,y=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(Fl.div,{ref:n,className:o2("chakra-offset-slide",a),custom:w,...OC,animate:y,...m})})});Vde.displayName="SlideFade";var a2=(...e)=>e.filter(Boolean).join(" ");function Ude(){return!1}var wS=e=>{const{condition:t,message:n}=e;t&&Ude()&&console.warn(n)};function rw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Gde,CS]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[jde,O8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Yde,xTe,qde,Kde]=lD(),Hf=Ee(function(t,n){const{getButtonProps:r}=O8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...CS().button};return ae.createElement(be.button,{...i,className:a2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Xde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jde(e),efe(e);const s=qde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=dS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let y=!1;return v!==null&&(y=Array.isArray(h)?h.includes(v):h===v),{isOpen:y,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zde,N8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=N8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;tfe(e);const{register:m,index:v,descendants:y}=Kde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);nfe({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=y.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=y.prevEnabled(v);j?.node.focus()},Home:()=>{const j=y.firstEnabled();j?.node.focus()},End:()=>{const j=y.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[y,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Wn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:rw(V.onClick,T),onFocus:rw(V.onFocus,R),onKeyDown:rw(V.onKeyDown,M)}},[h,t,w,T,R,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:O,getPanelProps:N,htmlProps:i}}function Jde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function efe(e){wS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function tfe(e){wS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function nfe(e){wS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=O8(),{reduceMotion:r}=N8(),i=a2("chakra-accordion__icon",e.className),o=CS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ya,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qde(t),l={...CS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:a2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=N8(),{getPanelProps:s,isOpen:l}=O8(),u=s(o,n),h=a2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(zz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:a2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),s2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});s2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function jL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,D8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hz={info:{icon:afe,colorScheme:"blue"},warning:{icon:jL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:jL,colorScheme:"red"},loading:{icon:s2,colorScheme:"blue"}};function cfe(e){return Hz[e].colorScheme}function dfe(e){return Hz[e].icon}var Wz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Wz.displayName="Alert";var Vz=Ee(function(t,n){const i={display:"inline",...D8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Vz.displayName="AlertDescription";function Uz(e){const{status:t}=lfe(),n=dfe(t),r=D8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Uz.displayName="AlertIcon";var Gz=Ee(function(t,n){const r=D8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Gz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const y=new Image;y.src=n,a&&(y.crossOrigin=a),r&&(y.srcset=r),s&&(y.sizes=s),t&&(y.loading=t),y.onload=w=>{v(),h("loaded"),i?.(w)},y.onerror=w=>{v(),h("failed"),o?.(w)},g.current=y},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...y}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?y:ffe(y,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),YL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function NC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}NC.displayName="ButtonIcon";function DC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(s2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}DC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:y="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":YL(a),"data-loading":YL(o),__css:k,className:TS("chakra-button",w),...P},o&&y==="start"&&x(DC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(qL,{...R})):x(qL,{...R}),o&&y==="end"&&x(DC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function qL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(NC,{marginEnd:i,children:t}),r,n&&x(NC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,iw=e=>e?!0:void 0;function KL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,jz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[y,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:y,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ri("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=jz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function z8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=B8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":iw(n),"aria-required":iw(i),"aria-readonly":iw(r)}}function B8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:KL(t?.onFocus,h),onBlur:KL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ri("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(Yz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Yz=Ee(function(t,n){const r=y1(),i=jz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Yz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var F8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:F8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:F8});Pfe.displayName="VisuallyHiddenInput";var XL=!1,LS=null,X0=!1,zC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function $8(e,t){zC.forEach(n=>n(e,t))}function ZL(e){X0=!0,Lfe(e)&&(LS="keyboard",$8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,$8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",$8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function QL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||XL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",ZL,!0),document.addEventListener("keyup",ZL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),XL=!0}function Rfe(e){Ife(),e(QL());const t=()=>e(QL());return zC.add(t),()=>{zC.delete(t)}}var[wTe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qz(e={}){const t=B8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:y,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:y?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,y,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(y))},[y]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(y),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,y,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:F8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ct=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,JL),onTouchStart:La(Pe.onTouchStart,JL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ct,htmlProps:O}}function JL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Kz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ri("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:y=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=qz({...P,isDisabled:y,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Kz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function H8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function BC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Xz(e,t,n){return(n-t)*e+t}function FC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=BC(n);return H8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":ow(r,o,n)??""),m=typeof i<"u",v=m?i:h,y=Zz(Ac(v),o),w=n??y,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),H8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=ow(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=ow($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||Oa,[a]);return ae.createElement(jde,{value:u},ae.createElement(be.div,{ref:n,...o,className:a2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=N8(),{getPanelProps:s,isOpen:l}=O8(),u=s(o,n),h=a2("chakra-accordion__panel",r),g=CS();a||delete u.hidden;const m=ae.createElement(be.div,{...u,__css:g.panel,className:h});return a?m:x(zz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var _S=Ee(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=yn(r),{htmlProps:s,descendants:l,...u}=Xde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Yde,{value:l},ae.createElement(Zde,{value:h},ae.createElement(Gde,{value:o},ae.createElement(be.div,{ref:i,...s,className:a2("chakra-accordion",r.className),__css:o.root},t))))});_S.displayName="Accordion";var rfe=(...e)=>e.filter(Boolean).join(" "),ife=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),s2=Ee((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=yn(e),u=rfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${ife} ${o} linear infinite`,...n};return ae.createElement(be.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(be.span,{srOnly:!0},r))});s2.displayName="Spinner";var kS=(...e)=>e.filter(Boolean).join(" ");function ofe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function afe(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function jL(e){return x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[sfe,lfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ufe,D8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hz={info:{icon:afe,colorScheme:"blue"},warning:{icon:jL,colorScheme:"orange"},success:{icon:ofe,colorScheme:"green"},error:{icon:jL,colorScheme:"red"},loading:{icon:s2,colorScheme:"blue"}};function cfe(e){return Hz[e].colorScheme}function dfe(e){return Hz[e].icon}var Wz=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=yn(t),a=t.colorScheme??cfe(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(sfe,{value:{status:r}},ae.createElement(ufe,{value:s},ae.createElement(be.div,{role:i?"alert":void 0,ref:n,...o,className:kS("chakra-alert",t.className),__css:l})))});Wz.displayName="Alert";var Vz=Ee(function(t,n){const i={display:"inline",...D8().description};return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__desc",t.className),__css:i})});Vz.displayName="AlertDescription";function Uz(e){const{status:t}=lfe(),n=dfe(t),r=D8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(be.span,{display:"inherit",...e,className:kS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Uz.displayName="AlertIcon";var Gz=Ee(function(t,n){const r=D8();return ae.createElement(be.div,{ref:n,...t,className:kS("chakra-alert__title",t.className),__css:r.title})});Gz.displayName="AlertTitle";function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function hfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const y=new Image;y.src=n,a&&(y.crossOrigin=a),r&&(y.srcset=r),s&&(y.sizes=s),t&&(y.loading=t),y.onload=w=>{v(),h("loaded"),i?.(w)},y.onerror=w=>{v(),h("failed"),o?.(w)},g.current=y},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return _s(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var pfe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",t4=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});t4.displayName="NativeImage";var ES=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...y}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=hfe({...t,ignoreFallback:E}),k=pfe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?y:ffe(y,["onError","onLoad"])};return k?i||ae.createElement(be.img,{as:t4,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(be.img,{as:t4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});ES.displayName="Image";Ee((e,t)=>ae.createElement(be.img,{ref:t,as:t4,className:"chakra-image",...e}));function PS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var TS=(...e)=>e.filter(Boolean).join(" "),YL=e=>e?"":void 0,[gfe,mfe]=_n({strict:!1,name:"ButtonGroupContext"});function NC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=TS("chakra-button__icon",n);return ae.createElement(be.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}NC.displayName="ButtonIcon";function DC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(s2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=TS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return ae.createElement(be.div,{className:l,...s,__css:h},i)}DC.displayName="ButtonSpinner";function vfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Ee((e,t)=>{const n=mfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:y="start",className:w,as:E,...P}=yn(e),k=C.exports.useMemo(()=>{const O={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:O}}},[r,n]),{ref:T,type:M}=vfe(E),R={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(be.button,{disabled:i||o,ref:Fae(t,T),as:E,type:m??M,"data-active":YL(a),"data-loading":YL(o),__css:k,className:TS("chakra-button",w),...P},o&&y==="start"&&x(DC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(be.span,{opacity:0},x(qL,{...R})):x(qL,{...R}),o&&y==="end"&&x(DC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function qL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Ln,{children:[t&&x(NC,{marginEnd:i,children:t}),r,n&&x(NC,{marginStart:i,children:n})]})}var ia=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=TS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},ae.createElement(gfe,{value:m},ae.createElement(be.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var v1=(...e)=>e.filter(Boolean).join(" "),Vy=e=>e?"":void 0,iw=e=>e?!0:void 0;function KL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[yfe,jz]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Sfe,y1]=_n({strict:!1,name:"FormControlContext"});function bfe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[y,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Wn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Vy(E),"data-disabled":Vy(i),"data-invalid":Vy(r),"data-readonly":Vy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Wn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),O=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:y,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:O}}var bd=Ee(function(t,n){const r=Ii("Form",t),i=yn(t),{getRootProps:o,htmlProps:a,...s}=bfe(i),l=v1("chakra-form-control",t.className);return ae.createElement(Sfe,{value:s},ae.createElement(yfe,{value:r},ae.createElement(be.div,{...o({},n),className:l,__css:r.container})))});bd.displayName="FormControl";var xfe=Ee(function(t,n){const r=y1(),i=jz(),o=v1("chakra-form__helper-text",t.className);return ae.createElement(be.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});xfe.displayName="FormHelperText";function z8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=B8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":iw(n),"aria-required":iw(i),"aria-readonly":iw(r)}}function B8(e){const t=y1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:KL(t?.onFocus,h),onBlur:KL(t?.onBlur,g)}}var[wfe,Cfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Ee((e,t)=>{const n=Ii("FormError",e),r=yn(e),i=y1();return i?.isInvalid?ae.createElement(wfe,{value:n},ae.createElement(be.div,{...i?.getErrorMessageProps(r,t),className:v1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});_fe.displayName="FormErrorMessage";var kfe=Ee((e,t)=>{const n=Cfe(),r=y1();if(!r?.isInvalid)return null;const i=v1("chakra-form__error-icon",e.className);return x(ya,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});kfe.displayName="FormErrorIcon";var mh=Ee(function(t,n){const r=so("FormLabel",t),i=yn(t),{className:o,children:a,requiredIndicator:s=x(Yz,{}),optionalIndicator:l=null,...u}=i,h=y1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(be.label,{...g,className:v1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Yz=Ee(function(t,n){const r=y1(),i=jz();if(!r?.isRequired)return null;const o=v1("chakra-form__required-indicator",t.className);return ae.createElement(be.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Yz.displayName="RequiredIndicator";function ld(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var F8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Efe=be("span",{baseStyle:F8});Efe.displayName="VisuallyHidden";var Pfe=be("input",{baseStyle:F8});Pfe.displayName="VisuallyHiddenInput";var XL=!1,LS=null,X0=!1,zC=new Set,Tfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Lfe(e){return!(e.metaKey||!Tfe&&e.altKey||e.ctrlKey)}function $8(e,t){zC.forEach(n=>n(e,t))}function ZL(e){X0=!0,Lfe(e)&&(LS="keyboard",$8("keyboard",e))}function Pp(e){LS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(X0=!0,$8("pointer",e))}function Afe(e){e.target===window||e.target===document||(X0||(LS="keyboard",$8("keyboard",e)),X0=!1)}function Mfe(){X0=!1}function QL(){return LS!=="pointer"}function Ife(){if(typeof window>"u"||XL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){X0=!0,e.apply(this,n)},document.addEventListener("keydown",ZL,!0),document.addEventListener("keyup",ZL,!0),window.addEventListener("focus",Afe,!0),window.addEventListener("blur",Mfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Pp,!0),document.addEventListener("pointermove",Pp,!0),document.addEventListener("pointerup",Pp,!0)):(document.addEventListener("mousedown",Pp,!0),document.addEventListener("mousemove",Pp,!0),document.addEventListener("mouseup",Pp,!0)),XL=!0}function Rfe(e){Ife(),e(QL());const t=()=>e(QL());return zC.add(t),()=>{zC.delete(t)}}var[wTe,Ofe]=_n({name:"CheckboxGroupContext",strict:!1}),Nfe=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function La(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function zfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Bfe(e){return ae.createElement(be.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Ffe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Bfe:zfe;return n||t?ae.createElement(be.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function $fe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qz(e={}){const t=B8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:y,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,O=$fe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Rfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Re]=C.exports.useState(!!h),xe=g!==void 0,Se=xe?g:me,Me=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}xe||Re(Se?Pe.target.checked:y?!0:Pe.target.checked),N?.(Pe)},[r,n,Se,xe,y,N]);_s(()=>{G.current&&(G.current.indeterminate=Boolean(y))},[y]),ld(()=>{n&&W(!1)},[n,W]),_s(()=>{const Pe=G.current;!Pe?.form||(Pe.form.onreset=()=>{Re(!!h)})},[]);const _e=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!0)},[K]),Xe=C.exports.useCallback(Pe=>{Pe.key===" "&&K(!1)},[K]);_s(()=>{if(!G.current)return;G.current.checked!==Se&&Re(G.current.checked)},[G.current]);const dt=C.exports.useCallback((Pe={},et=null)=>{const Lt=it=>{le&&it.preventDefault(),K(!0)};return{...Pe,ref:et,"data-active":Qi(J),"data-hover":Qi(Q),"data-checked":Qi(Se),"data-focus":Qi(le),"data-focus-visible":Qi(le&&$),"data-indeterminate":Qi(y),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:La(Pe.onMouseDown,Lt),onMouseUp:La(Pe.onMouseUp,()=>K(!1)),onMouseEnter:La(Pe.onMouseEnter,()=>ne(!0)),onMouseLeave:La(Pe.onMouseLeave,()=>ne(!1))}},[J,Se,n,le,$,Q,y,o,r]),_t=C.exports.useCallback((Pe={},et=null)=>({...O,...Pe,ref:Wn(et,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:La(Pe.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[O,n,Se,o,X]),pt=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:Wn(G,et),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:La(Pe.onChange,Me),onBlur:La(Pe.onBlur,z,()=>W(!1)),onFocus:La(Pe.onFocus,V,()=>W(!0)),onKeyDown:La(Pe.onKeyDown,Je),onKeyUp:La(Pe.onKeyUp,Xe),required:i,checked:Se,disabled:_e,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:F8}),[w,E,a,Me,z,V,Je,Xe,i,Se,_e,r,k,T,M,o,u,n,P]),ct=C.exports.useCallback((Pe={},et=null)=>({...Pe,ref:et,onMouseDown:La(Pe.onMouseDown,JL),onTouchStart:La(Pe.onTouchStart,JL),"data-disabled":Qi(n),"data-checked":Qi(Se),"data-invalid":Qi(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:le,isChecked:Se,isActive:J,isHovered:Q,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:dt,getInputProps:pt,getLabelProps:ct,htmlProps:O}}function JL(e){e.preventDefault(),e.stopPropagation()}var Hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Wfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Vfe=yd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ufe=yd({from:{opacity:0},to:{opacity:1}}),Gfe=yd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Kz=Ee(function(t,n){const r=Ofe(),i={...r,...t},o=Ii("Checkbox",i),a=yn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Ffe,{}),isChecked:v,isDisabled:y=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Dfe(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:O,getLabelProps:N,getRootProps:z}=qz({...P,isDisabled:y,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ufe} 20ms linear, ${Gfe} 200ms linear`:`${Vfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(be.label,{__css:{...Wfe,...o.container},className:Nfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),ae.createElement(be.span,{__css:{...Hfe,...o.control},className:"chakra-checkbox__control",...O()},$),u&&ae.createElement(be.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Kz.displayName="Checkbox";function jfe(e){return x(ya,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var AS=Ee(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=yn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(be.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(jfe,{width:"1em",height:"1em"}))});AS.displayName="CloseButton";function Yfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function H8(e,t){let n=Yfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function BC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function n4(e,t,n){return(e-t)*100/(n-t)}function Xz(e,t,n){return(n-t)*e+t}function FC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=BC(n);return H8(r,i)}function T0(e,t,n){return e==null?e:(nr==null?"":ow(r,o,n)??""),m=typeof i<"u",v=m?i:h,y=Zz(Ac(v),o),w=n??y,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=T0(j,a,s)),H8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=ow(r,o,n)??a,E($)},[r,n,o,E,a]),R=C.exports.useCallback($=>{const j=ow($,o,w)??a;E(j)},[w,o,E,a]),O=Ac(v);return{isOutOfRange:O>s||O{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Jz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Jz()&&e.test(navigator.vendor),ehe=e=>Jz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function eA(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Rv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=eA(n),a=eA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),y=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:y,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,y)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function W8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var V8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=yn(i),s=z8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});V8.displayName="Input";V8.id="Input";var[she,eB]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,y;const w=W8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((y=m.props)==null?void 0:y.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),U8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=eB();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});U8.displayName="InputAddon";var tB=Ee(function(t,n){return x(U8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});tB.displayName="InputLeftAddon";tB.id="InputLeftAddon";var nB=Ee(function(t,n){return x(U8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});nB.displayName="InputRightAddon";nB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=eB(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});rB.id="InputLeftElement";rB.displayName="InputLeftElement";var iB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});iB.id="InputRightElement";iB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var oB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});oB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(oB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var aB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});aB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...y}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...y,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var sB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...y}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...y})});sB.displayName="Grid";function tA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=W8({gridArea:r,gridColumn:tA(i),gridRow:tA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,lB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),G8=Ee(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});G8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(G8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(G8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=lB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=lB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(sB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var uB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});uB.displayName="Spacer";var $C="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[$C]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var cB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});cB.displayName="StackItem";var j8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",y=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(cB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:y.flexDirection,flexWrap:s,className:T,__css:E?{}:{[$C]:y[$C]},...m},k)});j8.displayName="Stack";var dB=Ee((e,t)=>x(j8,{align:"center",...e,direction:"row",ref:t}));dB.displayName="HStack";var fB=Ee((e,t)=>x(j8,{align:"center",...e,direction:"column",ref:t}));fB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=W8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function nA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>nA(K6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>nA(K6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),y=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(hB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},y))});Rhe.displayName="Wrap";var hB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});hB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},pB=Ohe,Tp=()=>{},Nhe={document:pB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:pB},gB=typeof window<"u"?{window,document}:zhe,mB=C.exports.createContext(gB);mB.displayName="EnvironmentContext";function vB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:gB},[r,n]);return ee(mB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}vB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function aw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...y}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&aw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!aw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!aw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...y,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...y,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function yB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function SB(e){if(!yB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=bB(e))==null?void 0:t.defaultView)??window}function bB(e){return yB(e)?e.ownerDocument:document}function Whe(e){return bB(e).activeElement}var xB=e=>e.hasAttribute("tabindex"),Vhe=e=>xB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function wB(e){return e.parentElement&&wB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function CB(e){if(!SB(e)||wB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:xB(e)}function jhe(e){return e?SB(e)&&CB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function _B(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>CB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=_B(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",Y8="auto",l2=[Ro,Ua,Ga,Oo],Z0="start",Ov="end",tpe="clippingParents",kB="viewport",Xg="popper",npe="reference",rA=l2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Ov])},[]),EB=[].concat(l2,[Y8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Ov])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function q8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function HC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PB(){return!/^((?!chrome|android).)*safari/i.test(HC())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!PB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function K8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&q8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(q8(e)?e.host:null)||xd(e)}function iA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test(HC()),n=/Trident/i.test(HC());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(q8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function u2(e){for(var t=Ya(e),n=iA(e);n&&mpe(n)&&Eu(n).position==="static";)n=iA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function X8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ym(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=Ym(e,t,n);return r>n?n:r}function LB(){return{top:0,right:0,bottom:0,left:0}}function AB(e){return Object.assign({},LB(),e)}function MB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,AB(typeof t!="number"?t:MB(t,l2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=X8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=K8(o),v=l==="y"?Ro:Oo,y=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=u2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[y],O=k/2-m[h]/2+T,N=Ym(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!TB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function oA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,y=a.y,w=y===void 0?0:y,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=u2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Ov){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Ov){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,oA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,oA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function aA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function Z8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Q8(e){return J0(xd(e)).left+Z8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=PB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Q8(e),y:l}}function Ipe(e){var t,n=xd(e),r=Z8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Q8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function J8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&J8(e)?e:IB(IS(e))}function qm(e,t){var n;t===void 0&&(t=[]);var r=IB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],J8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(qm(IS(a)))}function WC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sA(e,t,n){return t===kB?WC(Mpe(e,n)):sh(t)?Rpe(t,n):WC(Ipe(xd(e)))}function Ope(e){var t=qm(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?u2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&TB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=sA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},sA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?X8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Ov:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Nv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?kB:u,g=n.elementContext,m=g===void 0?Xg:g,v=n.altBoundary,y=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=AB(typeof E!="number"?E:MB(E,l2)),k=m===Xg?npe:Xg,T=e.rects.popper,M=e.elements[y?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=RB({reference:O,element:T,strategy:"absolute",placement:i}),z=WC(Object.assign({},T,N)),V=m===Xg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Xg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?EB:l,h=e1(r),g=h?s?rA:rA.filter(function(y){return e1(y)===h}):l2,m=g.filter(function(y){return u.indexOf(y)>=0});m.length===0&&(m=g);var v=m.reduce(function(y,w){return y[w]=Nv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],y},{});return Object.keys(v).sort(function(y,w){return v[y]-v[w]})}function zpe(e){if(Tl(e)===Y8)return[];var t=j3(e);return[aA(e),t,aA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!y?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===Y8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:y,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Nv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=y?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function lA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function uA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Nv(t,{elementContext:"reference"}),s=Nv(t,{altBoundary:!0}),l=lA(a,r),u=lA(s,i,o),h=uA(l),g=uA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=EB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=RB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,y=n.tetherOffset,w=y===void 0?0:y,E=Nv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=X8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?K8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:LB(),_e=Me[Q],Je=Me[ne],Xe=Ym(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&u2(t.elements.arrow),ct=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ct,et=K+_t-mt,Lt=Ym(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):Ym(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?Z8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||J8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Q8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cA={placement:"bottom",modifiers:[],strategy:"absolute"};function dA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],fA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...fA,...e}}:t={enabled:e,options:fA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{pA(e)},effect:({state:e})=>()=>{pA(e)}},pA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function OB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,y=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!y.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(y.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!y.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{y.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function NB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),y=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():y()},[u,y,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:y,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function DB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function zB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}zB.displayName="PortalManager";var[BB,_0e]=_n({strict:!1,name:"PortalContext"}),e_="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=e_,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(BB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=e_),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(BB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=e_;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},sw=0,FB=function(e){return e&&(e.host||FB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),y=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&y&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return h(t),s.clear(),sw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),sw--,sw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},$B=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function t_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function HB(){}function WB(){}WB.resetWarningCache=HB;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:WB,resetWarningCache:HB};return n.PropTypes=n,n};Nn.exports=N0e();var VC="data-focus-lock",VB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function UB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var lw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function GB(e){return e}function jB(e,t){t===void 0&&(t=GB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function n_(e,t){return t===void 0&&(t=GB),jB(e,t)}function YB(e){e===void 0&&(e={});var t=jB(null);return t.options=yl({async:!0,ssr:!1},e),t}var qB=function(e){var t=e.sideCar,n=Dz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};qB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),qB}var KB=n_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),XB=n_(),W0e=n_(),V0e=YB({async:!0}),U0e=[],r_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,y=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&KB.useMedium(Je)},[]),me=XB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[VB]=g&&"disabled",r[VC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=UB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:lw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:y,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw})]})});r_.propTypes={};r_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const ZB=r_;function UC(e,t){return UC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UC(e,t)}function i_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,UC(e,t)}function QB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){i_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return QB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],a_=e1e.join(","),t1e="".concat(a_,", [data-focus-guard]"),sF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:a_)?[i]:[],sF(i))},[])},s_=function(e,t){return e.reduce(function(n,r){return n.concat(sF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(a_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return s_([n])}).reduce(function(n,r){return n.concat(r)},[])},l_=function(e,t){return $l(e).filter(function(n){return tF(t,n)}).filter(function(n){return X0e(n)})},gA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return nF(t,n)})},jC=function(e,t,n){return aF(l_(s_(e,n),t),!0,n)},mA=function(e,t){return aF(l_(s_(e),t),!1)},r1e=function(e,t){return l_(n1e(e),t)},Dv=function(e,t){return e.shadowRoot?Dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Dv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},lF=function(e){return e.parentNode?lF(e.parentNode):e},u_=function(e){var t=GC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(VC);return n.push.apply(n,i?i1e($l(lF(r).querySelectorAll("[".concat(VC,'="').concat(i,'"]:not([').concat(VB,'="disabled"])')))):[r]),n},[])},uF=function(e){return e.activeElement?e.activeElement.shadowRoot?uF(e.activeElement.shadowRoot):e.activeElement:void 0},c_=function(){return document.activeElement?document.activeElement.shadowRoot?uF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},cF=function(e){var t=document&&c_();return!t||t.dataset&&t.dataset.focusGuard?!1:u_(e).some(function(n){return Dv(n,t)||a1e(n)})},s1e=function(){var e=document&&c_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Dv(t,e)}):!1},l1e=function(e,t){return t.filter(oF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},d_=function(e,t){return oF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(d_(n,e))}),e.filter(function(n){return t.has(n)})},vA=function(e){return e[0]&&e.length>1?d_(e[0],e):e[0]},yA=function(e,t){return e.length>1?e.indexOf(d_(e[t],e)):t},dF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=o_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),y=u1e(t),w=n!==void 0?y.indexOf(n):-1,E=w-(r?y.indexOf(r):l),P=yA(e,0),k=yA(e,i-1);if(l===-1||h===-1)return dF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=rF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=gA(r.filter(d1e(n)));return i&&i.length?vA(i):vA(gA(t))},YC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&YC(e.parentNode.host||e.parentNode,t),t},uw=function(e,t){for(var n=YC(e),r=YC(t),i=0;i=0)return o}return!1},fF=function(e,t,n){var r=GC(e),i=GC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=uw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=uw(o,l);u&&(!a||Dv(u,a)?a=u:a=uw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&c_(),r=u_(e).filter(i4),i=fF(n||e,e,r),o=new Map,a=mA(r,o),s=jC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=mA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===dF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=u_(e).filter(i4),n=fF(e,e,t),r=new Map,i=jC([n],r,!0),o=jC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:o_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},cw=0,dw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!dw&&r){if(cw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),dw=!0,setTimeout(function(){dw=!1},1);return}cw++,v1e(r.node,n.focusOptions),cw--}};const hF=y1e;function pF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,zv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function SA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(zv):zv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(cF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=hF(g,r0,{focusOptions:l}),A0={})),zv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),y=v.map(function(w){var E=w.node;return E}).indexOf(m);y>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),SA(y,v.length,1,v),SA(y,-1,-1,v))}}}return t},gF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},f_=function(){return pF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},mF=function(){zv="just",setTimeout(function(){zv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",gF),document.addEventListener("focusout",f_),window.addEventListener("blur",mF)},I1e=function(){document.removeEventListener("focusin",gF),document.removeEventListener("focusout",f_),window.removeEventListener("blur",mF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),pF(o4)):(I1e(),r0=null)}KB.assignSyncMedium(L1e);XB.assignMedium(f_);W0e.assignMedium(function(e){return e({moveFocusInside:hF,focusInside:cF})});const N1e=G0e(R1e,O1e)(A1e);var vF=C.exports.forwardRef(function(t,n){return x(ZB,{sideCar:N1e,ref:n,...t})}),yF=ZB.propTypes||{};yF.sideCar;t_(yF,["sideCar"]);vF.propTypes={};const D1e=vF;var SF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&_B(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};SF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",bF=YB(),fw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:fw,onWheelCapture:fw,onTouchMoveCapture:fw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Dz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=UB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:bF,removeScrollBar:u,shards:g,noIsolation:v,inert:y,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},hw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[hw(n),hw(r),hw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=xF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function Zfe(e){return"current"in e}var Jz=()=>typeof window<"u";function Qfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Jfe=e=>Jz()&&e.test(navigator.vendor),ehe=e=>Jz()&&e.test(Qfe()),the=()=>ehe(/mac|iphone|ipad|ipod/i),nhe=()=>the()&&Jfe(/apple/i);function rhe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!nhe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Zfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var ihe=jJ?C.exports.useLayoutEffect:C.exports.useEffect;function eA(e,t=[]){const n=C.exports.useRef(e);return ihe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ohe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ahe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Rv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=eA(n),a=eA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ohe(r,s),g=ahe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),y=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:y,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:YJ(w.onClick,y)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function W8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var V8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=yn(i),s=z8(a),l=Nr("chakra-input",t.className);return ae.createElement(be.input,{size:r,...s,__css:o.field,ref:n,className:l})});V8.displayName="Input";V8.id="Input";var[she,eB]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lhe=Ee(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=yn(t),s=Nr("chakra-input__group",o),l={},u=PS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,y;const w=W8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((y=m.props)==null?void 0:y.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(be.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(she,{value:r,children:g}))});lhe.displayName="InputGroup";var uhe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},che=be("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),U8=Ee(function(t,n){const{placement:r="left",...i}=t,o=uhe[r]??{},a=eB();return x(che,{ref:n,...i,__css:{...a.addon,...o}})});U8.displayName="InputAddon";var tB=Ee(function(t,n){return x(U8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});tB.displayName="InputLeftAddon";tB.id="InputLeftAddon";var nB=Ee(function(t,n){return x(U8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});nB.displayName="InputRightAddon";nB.id="InputRightAddon";var dhe=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),MS=Ee(function(t,n){const{placement:r="left",...i}=t,o=eB(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(dhe,{ref:n,__css:l,...i})});MS.id="InputElement";MS.displayName="InputElement";var rB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(MS,{ref:n,placement:"left",className:o,...i})});rB.id="InputLeftElement";rB.displayName="InputLeftElement";var iB=Ee(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(MS,{ref:n,placement:"right",className:o,...i})});iB.id="InputRightElement";iB.displayName="InputRightElement";function fhe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ud(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):fhe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hhe=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(be.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:ud(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});hhe.displayName="AspectRatio";var phe=Ee(function(t,n){const r=so("Badge",t),{className:i,...o}=yn(t);return ae.createElement(be.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});phe.displayName="Badge";var vh=be("div");vh.displayName="Box";var oB=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(vh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});oB.displayName="Square";var ghe=Ee(function(t,n){const{size:r,...i}=t;return x(oB,{size:r,ref:n,borderRadius:"9999px",...i})});ghe.displayName="Circle";var aB=be("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});aB.displayName="Center";var mhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(be.div,{ref:n,__css:mhe[r],...i,position:"absolute"})});var vhe=Ee(function(t,n){const r=so("Code",t),{className:i,...o}=yn(t);return ae.createElement(be.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});vhe.displayName="Code";var yhe=Ee(function(t,n){const{className:r,centerContent:i,...o}=yn(t),a=so("Container",t);return ae.createElement(be.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});yhe.displayName="Container";var She=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...y}=yn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(be.hr,{ref:n,"aria-orientation":m,...y,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});She.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(be.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var sB=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...y}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(be.div,{ref:n,__css:w,...y})});sB.displayName="Grid";function tA(e){return ud(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var bhe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=W8({gridArea:r,gridColumn:tA(i),gridRow:tA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(be.div,{ref:n,__css:g,...h})});bhe.displayName="GridItem";var Qf=Ee(function(t,n){const r=so("Heading",t),{className:i,...o}=yn(t);return ae.createElement(be.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";Ee(function(t,n){const r=so("Mark",t),i=yn(t);return x(vh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var xhe=Ee(function(t,n){const r=so("Kbd",t),{className:i,...o}=yn(t);return ae.createElement(be.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});xhe.displayName="Kbd";var Jf=Ee(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=yn(t);return ae.createElement(be.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(be.a,{...s,ref:n,className:Nr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[whe,lB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),G8=Ee(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=yn(t),u=PS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(whe,{value:r},ae.createElement(be.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});G8.displayName="List";var Che=Ee((e,t)=>{const{as:n,...r}=e;return x(G8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Che.displayName="OrderedList";var _he=Ee(function(t,n){const{as:r,...i}=t;return x(G8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});_he.displayName="UnorderedList";var khe=Ee(function(t,n){const r=lB();return ae.createElement(be.li,{ref:n,...t,__css:r.item})});khe.displayName="ListItem";var Ehe=Ee(function(t,n){const r=lB();return x(ya,{ref:n,role:"presentation",...t,__css:r.icon})});Ehe.displayName="ListIcon";var Phe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=f1(),h=s?Lhe(s,u):Ahe(r);return x(sB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Phe.displayName="SimpleGrid";function The(e){return typeof e=="number"?`${e}px`:e}function Lhe(e,t){return ud(e,n=>{const r=Tae("sizes",n,The(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ahe(e){return ud(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var uB=be("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});uB.displayName="Spacer";var $C="& > *:not(style) ~ *:not(style)";function Mhe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[$C]:ud(n,i=>r[i])}}function Ihe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":ud(n,i=>r[i])}}var cB=e=>ae.createElement(be.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});cB.displayName="StackItem";var j8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",y=C.exports.useMemo(()=>Mhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Ihe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=PS(l);return P?M:M.map((R,O)=>{const N=typeof R.key<"u"?R.key:O,z=O+1===M.length,$=g?x(cB,{children:R},N):R;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),le=z?null:j;return ee(C.exports.Fragment,{children:[$,le]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(be.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:y.flexDirection,flexWrap:s,className:T,__css:E?{}:{[$C]:y[$C]},...m},k)});j8.displayName="Stack";var dB=Ee((e,t)=>x(j8,{align:"center",...e,direction:"row",ref:t}));dB.displayName="HStack";var fB=Ee((e,t)=>x(j8,{align:"center",...e,direction:"column",ref:t}));fB.displayName="VStack";var Po=Ee(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=yn(t),u=W8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(be.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function nA(e){return typeof e=="number"?`${e}px`:e}var Rhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>ud(w,k=>nA(K6("space",k)(P))),"--chakra-wrap-y-spacing":P=>ud(E,k=>nA(K6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),y=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>x(hB,{children:w},E)):a,[a,g]);return ae.createElement(be.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(be.ul,{className:"chakra-wrap__list",__css:v},y))});Rhe.displayName="Wrap";var hB=Ee(function(t,n){const{className:r,...i}=t;return ae.createElement(be.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});hB.displayName="WrapItem";var Ohe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},pB=Ohe,Tp=()=>{},Nhe={document:pB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Tp,removeEventListener:Tp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Tp,removeListener:Tp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Tp,setInterval:()=>0,clearInterval:Tp},Dhe=Nhe,zhe={window:Dhe,document:pB},gB=typeof window<"u"?{window,document}:zhe,mB=C.exports.createContext(gB);mB.displayName="EnvironmentContext";function vB(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:gB},[r,n]);return ee(mB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}vB.displayName="EnvironmentProvider";var Bhe=e=>e?"":void 0;function Fhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function aw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $he(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...y}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Fhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},R=w?g:g||0,O=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&aw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!aw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!aw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),le=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Wn(t,M);return w?{...y,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...y,ref:J,role:"button","data-active":Bhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:R,onClick:N,onMouseDown:le,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function yB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function SB(e){if(!yB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Hhe(e){var t;return((t=bB(e))==null?void 0:t.defaultView)??window}function bB(e){return yB(e)?e.ownerDocument:document}function Whe(e){return bB(e).activeElement}var xB=e=>e.hasAttribute("tabindex"),Vhe=e=>xB(e)&&e.tabIndex===-1;function Uhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function wB(e){return e.parentElement&&wB(e.parentElement)?!0:e.hidden}function Ghe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function CB(e){if(!SB(e)||wB(e)||Uhe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ghe(e)?!0:xB(e)}function jhe(e){return e?SB(e)&&CB(e)&&!Vhe(e):!1}var Yhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qhe=Yhe.join(),Khe=e=>e.offsetWidth>0&&e.offsetHeight>0;function _B(e){const t=Array.from(e.querySelectorAll(qhe));return t.unshift(e),t.filter(n=>CB(n)&&Khe(n))}function Xhe(e){const t=e.current;if(!t)return!1;const n=Whe(t);return!n||t.contains(n)?!1:!!jhe(n)}function Zhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ld(()=>{if(!o||Xhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Qhe={preventScroll:!0,shouldFocus:!1};function Jhe(e,t=Qhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=epe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);_s(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=_B(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ld(()=>{h()},[h]),Zf(a,"transitionend",h)}function epe(e){return"current"in e}var Ro="top",Ua="bottom",Ga="right",Oo="left",Y8="auto",l2=[Ro,Ua,Ga,Oo],Z0="start",Ov="end",tpe="clippingParents",kB="viewport",Xg="popper",npe="reference",rA=l2.reduce(function(e,t){return e.concat([t+"-"+Z0,t+"-"+Ov])},[]),EB=[].concat(l2,[Y8]).reduce(function(e,t){return e.concat([t,t+"-"+Z0,t+"-"+Ov])},[]),rpe="beforeRead",ipe="read",ope="afterRead",ape="beforeMain",spe="main",lpe="afterMain",upe="beforeWrite",cpe="write",dpe="afterWrite",fpe=[rpe,ipe,ope,ape,spe,lpe,upe,cpe,dpe];function Rl(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function q8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hpe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Fa(o)||!Rl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ppe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Rl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const gpe={name:"applyStyles",enabled:!0,phase:"write",fn:hpe,effect:ppe,requires:["computeStyles"]};function Tl(e){return e.split("-")[0]}var eh=Math.max,r4=Math.min,Q0=Math.round;function HC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PB(){return!/^((?!chrome|android).)*safari/i.test(HC())}function J0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&Q0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Q0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!PB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function K8(e){var t=J0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&q8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Ya(e).getComputedStyle(e)}function mpe(e){return["table","td","th"].indexOf(Rl(e))>=0}function xd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return Rl(e)==="html"?e:e.assignedSlot||e.parentNode||(q8(e)?e.host:null)||xd(e)}function iA(e){return!Fa(e)||Eu(e).position==="fixed"?null:e.offsetParent}function vpe(e){var t=/firefox/i.test(HC()),n=/Trident/i.test(HC());if(n&&Fa(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=IS(e);for(q8(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Rl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function u2(e){for(var t=Ya(e),n=iA(e);n&&mpe(n)&&Eu(n).position==="static";)n=iA(n);return n&&(Rl(n)==="html"||Rl(n)==="body"&&Eu(n).position==="static")?t:n||vpe(e)||t}function X8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ym(e,t,n){return eh(e,r4(t,n))}function ype(e,t,n){var r=Ym(e,t,n);return r>n?n:r}function LB(){return{top:0,right:0,bottom:0,left:0}}function AB(e){return Object.assign({},LB(),e)}function MB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Spe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,AB(typeof t!="number"?t:MB(t,l2))};function bpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tl(n.placement),l=X8(s),u=[Oo,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Spe(i.padding,n),m=K8(o),v=l==="y"?Ro:Oo,y=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=u2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],R=k-m[h]-g[y],O=k/2-m[h]/2+T,N=Ym(M,O,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-O,t)}}function xpe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!TB(t.elements.popper,i)||(t.elements.arrow=i))}const wpe={name:"arrow",enabled:!0,phase:"main",fn:bpe,effect:xpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var Cpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _pe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Q0(t*i)/i||0,y:Q0(n*i)/i||0}}function oA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,y=a.y,w=y===void 0?0:y,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Ro,R=window;if(u){var O=u2(n),N="clientHeight",z="clientWidth";if(O===Ya(n)&&(O=xd(n),Eu(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),O=O,i===Ro||(i===Oo||i===Ga)&&o===Ov){M=Ua;var V=g&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=V-r.height,w*=l?1:-1}if(i===Oo||(i===Ro||i===Ua)&&o===Ov){T=Ga;var $=g&&O===R&&R.visualViewport?R.visualViewport.width:O[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Cpe),le=h===!0?_pe({x:v,y:w}):{x:v,y:w};if(v=le.x,w=le.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function kpe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Tl(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,oA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,oA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Epe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kpe,data:{}};var Uy={passive:!0};function Ppe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Uy)}),s&&l.addEventListener("resize",n.update,Uy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Uy)}),s&&l.removeEventListener("resize",n.update,Uy)}}const Tpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ppe,data:{}};var Lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(e){return e.replace(/left|right|bottom|top/g,function(t){return Lpe[t]})}var Ape={start:"end",end:"start"};function aA(e){return e.replace(/start|end/g,function(t){return Ape[t]})}function Z8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Q8(e){return J0(xd(e)).left+Z8(e).scrollLeft}function Mpe(e,t){var n=Ya(e),r=xd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=PB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Q8(e),y:l}}function Ipe(e){var t,n=xd(e),r=Z8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Q8(e),l=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function J8(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IB(e){return["html","body","#document"].indexOf(Rl(e))>=0?e.ownerDocument.body:Fa(e)&&J8(e)?e:IB(IS(e))}function qm(e,t){var n;t===void 0&&(t=[]);var r=IB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],J8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(qm(IS(a)))}function WC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Rpe(e,t){var n=J0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sA(e,t,n){return t===kB?WC(Mpe(e,n)):sh(t)?Rpe(t,n):WC(Ipe(xd(e)))}function Ope(e){var t=qm(IS(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&Fa(e)?u2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&TB(i,r)&&Rl(i)!=="body"}):[]}function Npe(e,t,n,r){var i=t==="clippingParents"?Ope(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=sA(e,u,r);return l.top=eh(h.top,l.top),l.right=r4(h.right,l.right),l.bottom=r4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},sA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tl(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ro:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?X8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case Z0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Ov:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Nv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?tpe:s,u=n.rootBoundary,h=u===void 0?kB:u,g=n.elementContext,m=g===void 0?Xg:g,v=n.altBoundary,y=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=AB(typeof E!="number"?E:MB(E,l2)),k=m===Xg?npe:Xg,T=e.rects.popper,M=e.elements[y?k:m],R=Npe(sh(M)?M:M.contextElement||xd(e.elements.popper),l,h,a),O=J0(e.elements.reference),N=RB({reference:O,element:T,strategy:"absolute",placement:i}),z=WC(Object.assign({},T,N)),V=m===Xg?z:O,$={top:R.top-V.top+P.top,bottom:V.bottom-R.bottom+P.bottom,left:R.left-V.left+P.left,right:V.right-R.right+P.right},j=e.modifiersData.offset;if(m===Xg&&j){var le=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Ro,Ua].indexOf(W)>=0?"y":"x";$[W]+=le[ne]*Q})}return $}function Dpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?EB:l,h=e1(r),g=h?s?rA:rA.filter(function(y){return e1(y)===h}):l2,m=g.filter(function(y){return u.indexOf(y)>=0});m.length===0&&(m=g);var v=m.reduce(function(y,w){return y[w]=Nv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Tl(w)],y},{});return Object.keys(v).sort(function(y,w){return v[y]-v[w]})}function zpe(e){if(Tl(e)===Y8)return[];var t=j3(e);return[aA(e),t,aA(t)]}function Bpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Tl(E),k=P===E,T=l||(k||!y?[j3(E)]:zpe(E)),M=[E].concat(T).reduce(function(Se,Me){return Se.concat(Tl(Me)===Y8?Dpe(t,{placement:Me,boundary:h,rootBoundary:g,padding:u,flipVariations:y,allowedAutoPlacements:w}):Me)},[]),R=t.rects.reference,O=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Nv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Oo:W?Ua:Ro;R[ne]>O[ne]&&(K=j3(K));var G=j3(K),X=[];if(o&&X.push(J[le]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(Se){return Se})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=y?3:1,me=function(Me){var _e=M.find(function(Je){var Xe=N.get(Je);if(Xe)return Xe.slice(0,Me).every(function(dt){return dt})});if(_e)return V=_e,"break"},Re=ce;Re>0;Re--){var xe=me(Re);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Fpe={name:"flip",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"],data:{_skip:!1}};function lA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function uA(e){return[Ro,Ga,Ua,Oo].some(function(t){return e[t]>=0})}function $pe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Nv(t,{elementContext:"reference"}),s=Nv(t,{altBoundary:!0}),l=lA(a,r),u=lA(s,i,o),h=uA(l),g=uA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$pe};function Wpe(e,t,n){var r=Tl(e),i=[Oo,Ro].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=EB.reduce(function(h,g){return h[g]=Wpe(g,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Upe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vpe};function Gpe(e){var t=e.state,n=e.name;t.modifiersData[n]=RB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Gpe,data:{}};function Ype(e){return e==="x"?"y":"x"}function qpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,y=n.tetherOffset,w=y===void 0?0:y,E=Nv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Tl(t.placement),k=e1(t.placement),T=!k,M=X8(P),R=Ype(M),O=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(!!O){if(o){var W,Q=M==="y"?Ro:Oo,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=O[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===Z0?N[J]:z[J],Re=k===Z0?-z[J]:-N[J],xe=t.elements.arrow,Se=v&&xe?K8(xe):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:LB(),_e=Me[Q],Je=Me[ne],Xe=Ym(0,N[J],Se[J]),dt=T?N[J]/2-ce-Xe-_e-$.mainAxis:me-Xe-_e-$.mainAxis,_t=T?-N[J]/2+ce+Xe+Je+$.mainAxis:Re+Xe+Je+$.mainAxis,pt=t.elements.arrow&&u2(t.elements.arrow),ct=pt?M==="y"?pt.clientTop||0:pt.clientLeft||0:0,mt=(W=j?.[M])!=null?W:0,Pe=K+dt-mt-ct,et=K+_t-mt,Lt=Ym(v?r4(G,Pe):G,K,v?eh(X,et):X);O[M]=Lt,le[M]=Lt-K}if(s){var it,St=M==="x"?Ro:Oo,Yt=M==="x"?Ua:Ga,wt=O[R],Gt=R==="y"?"height":"width",ln=wt+E[St],on=wt-E[Yt],Oe=[Ro,Oo].indexOf(P)!==-1,Ze=(it=j?.[R])!=null?it:0,Zt=Oe?ln:wt-N[Gt]-z[Gt]-Ze+$.altAxis,qt=Oe?wt+N[Gt]+z[Gt]-Ze-$.altAxis:on,ke=v&&Oe?ype(Zt,wt,qt):Ym(v?Zt:ln,wt,v?qt:on);O[R]=ke,le[R]=ke-wt}t.modifiersData[r]=le}}const Kpe={name:"preventOverflow",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"]};function Xpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zpe(e){return e===Ya(e)||!Fa(e)?Z8(e):Xpe(e)}function Qpe(e){var t=e.getBoundingClientRect(),n=Q0(t.width)/e.offsetWidth||1,r=Q0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&Qpe(t),o=xd(t),a=J0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Rl(t)!=="body"||J8(o))&&(s=Zpe(t)),Fa(t)?(l=J0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Q8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function e0e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function t0e(e){var t=e0e(e);return fpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function n0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function r0e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cA={placement:"bottom",modifiers:[],strategy:"absolute"};function dA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Lp("--popper-arrow-shadow-color"),arrowSize:Lp("--popper-arrow-size","8px"),arrowSizeHalf:Lp("--popper-arrow-size-half"),arrowBg:Lp("--popper-arrow-bg"),transformOrigin:Lp("--popper-transform-origin"),arrowOffset:Lp("--popper-arrow-offset")};function s0e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var l0e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},u0e=e=>l0e[e],fA={scroll:!0,resize:!0};function c0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...fA,...e}}:t={enabled:e,options:fA},t}var d0e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},f0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{hA(e)},effect:({state:e})=>()=>{hA(e)}},hA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,u0e(e.placement))},h0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{p0e(e)}},p0e=e=>{var t;if(!e.placement)return;const n=g0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},g0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},m0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{pA(e)},effect:({state:e})=>()=>{pA(e)}},pA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:s0e(e.placement)})},v0e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},y0e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S0e(e,t="ltr"){var n;const r=((n=v0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:y0e[e]??r}function OB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,y=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=S0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!y.current||!w.current||(($=k.current)==null||$.call(k),E.current=a0e(y.current,w.current,{placement:P,modifiers:[m0e,h0e,f0e,{...d0e,enabled:!!m},{name:"eventListeners",...c0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!y.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{y.current=$,T()},[T]),R=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(M,j)}),[M]),O=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Wn(O,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:le,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:b0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:R}}function b0e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function NB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),y=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():y()},[u,y,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:y,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function x0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function DB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[w0e,C0e]=_n({strict:!1,name:"PortalManagerContext"});function zB(e){const{children:t,zIndex:n}=e;return x(w0e,{value:{zIndex:n},children:t})}zB.displayName="PortalManager";var[BB,_0e]=_n({strict:!1,name:"PortalContext"}),e_="chakra-portal",k0e=".chakra-portal",E0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),P0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=_0e(),l=C0e();_s(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=e_,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(E0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Bl.exports.createPortal(x(BB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},T0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=e_),l},[i]),[,s]=C.exports.useState({});return _s(()=>s({}),[]),_s(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Bl.exports.createPortal(x(BB,{value:r?a:null,children:t}),a):null};function yh(e){const{containerRef:t,...n}=e;return t?x(T0e,{containerRef:t,...n}):x(P0e,{...n})}yh.defaultProps={appendToParentPortal:!0};yh.className=e_;yh.selector=k0e;yh.displayName="Portal";var L0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ap=new WeakMap,Gy=new WeakMap,jy={},sw=0,FB=function(e){return e&&(e.host||FB(e.parentNode))},A0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},M0e=function(e,t,n,r){var i=A0e(t,Array.isArray(e)?e:[e]);jy[n]||(jy[n]=new WeakMap);var o=jy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),y=v!==null&&v!=="false",w=(Ap.get(m)||0)+1,E=(o.get(m)||0)+1;Ap.set(m,w),o.set(m,E),a.push(m),w===1&&y&&Gy.set(m,!0),E===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return h(t),s.clear(),sw++,function(){a.forEach(function(g){var m=Ap.get(g)-1,v=o.get(g)-1;Ap.set(g,m),o.set(g,v),m||(Gy.has(g)||g.removeAttribute(r),Gy.delete(g)),v||g.removeAttribute(n)}),sw--,sw||(Ap=new WeakMap,Ap=new WeakMap,Gy=new WeakMap,jy={})}},$B=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||L0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M0e(r,i,n,"aria-hidden")):function(){return null}};function t_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nn={exports:{}},I0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R0e=I0e,O0e=R0e;function HB(){}function WB(){}WB.resetWarningCache=HB;var N0e=function(){function e(r,i,o,a,s,l){if(l!==O0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:WB,resetWarningCache:HB};return n.PropTypes=n,n};Nn.exports=N0e();var VC="data-focus-lock",VB="data-focus-lock-disabled",D0e="data-no-focus-lock",z0e="data-autofocus-inside",B0e="data-no-autofocus";function F0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function UB(e,t){return $0e(t||null,function(n){return e.forEach(function(r){return F0e(r,n)})})}var lw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function GB(e){return e}function jB(e,t){t===void 0&&(t=GB);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function n_(e,t){return t===void 0&&(t=GB),jB(e,t)}function YB(e){e===void 0&&(e={});var t=jB(null);return t.options=yl({async:!0,ssr:!1},e),t}var qB=function(e){var t=e.sideCar,n=Dz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...yl({},n)})};qB.isSideCarExport=!0;function H0e(e,t){return e.useMedium(t),qB}var KB=n_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),XB=n_(),W0e=n_(),V0e=YB({async:!0}),U0e=[],r_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,y=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?U0e:M,O=t.as,N=O===void 0?"div":O,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,le=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Xe=u.current;if(Xe&&Xe.focus){var dt=typeof j=="function"?j(Xe):j;if(dt){var _t=typeof dt=="object"?dt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Xe.focus(_t)}):Xe.focus(_t)}}},[j]),ce=C.exports.useCallback(function(Je){l.current&&KB.useMedium(Je)},[]),me=XB.useMedium,Re=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),xe=An((r={},r[VB]=g&&"disabled",r[VC]=E,r),V),Se=m!==!0,Me=Se&&m!=="tail",_e=UB([n,Re]);return ee(Ln,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:lw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:V0e,observed:o,disabled:g,persistentFocus:v,crossFrame:y,autoFocus:w,whiteList:k,shards:R,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:le}),x(N,{ref:_e,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Me&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw})]})});r_.propTypes={};r_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const ZB=r_;function UC(e,t){return UC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UC(e,t)}function i_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,UC(e,t)}function QB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){i_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return QB(l,"displayName","SideEffect("+n(i)+")"),l}}var $l=function(e){for(var t=Array(e.length),n=0;n=0}).sort(J0e)},e1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],a_=e1e.join(","),t1e="".concat(a_,", [data-focus-guard]"),sF=function(e,t){var n;return $l(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?t1e:a_)?[i]:[],sF(i))},[])},s_=function(e,t){return e.reduce(function(n,r){return n.concat(sF(r,t),r.parentNode?$l(r.parentNode.querySelectorAll(a_)).filter(function(i){return i===r}):[])},[])},n1e=function(e){var t=e.querySelectorAll("[".concat(z0e,"]"));return $l(t).map(function(n){return s_([n])}).reduce(function(n,r){return n.concat(r)},[])},l_=function(e,t){return $l(e).filter(function(n){return tF(t,n)}).filter(function(n){return X0e(n)})},gA=function(e,t){return t===void 0&&(t=new Map),$l(e).filter(function(n){return nF(t,n)})},jC=function(e,t,n){return aF(l_(s_(e,n),t),!0,n)},mA=function(e,t){return aF(l_(s_(e),t),!1)},r1e=function(e,t){return l_(n1e(e),t)},Dv=function(e,t){return e.shadowRoot?Dv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:$l(e.children).some(function(n){return Dv(n,t)})},i1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},lF=function(e){return e.parentNode?lF(e.parentNode):e},u_=function(e){var t=GC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(VC);return n.push.apply(n,i?i1e($l(lF(r).querySelectorAll("[".concat(VC,'="').concat(i,'"]:not([').concat(VB,'="disabled"])')))):[r]),n},[])},uF=function(e){return e.activeElement?e.activeElement.shadowRoot?uF(e.activeElement.shadowRoot):e.activeElement:void 0},c_=function(){return document.activeElement?document.activeElement.shadowRoot?uF(document.activeElement.shadowRoot):document.activeElement:void 0},o1e=function(e){return e===document.activeElement},a1e=function(e){return Boolean($l(e.querySelectorAll("iframe")).some(function(t){return o1e(t)}))},cF=function(e){var t=document&&c_();return!t||t.dataset&&t.dataset.focusGuard?!1:u_(e).some(function(n){return Dv(n,t)||a1e(n)})},s1e=function(){var e=document&&c_();return e?$l(document.querySelectorAll("[".concat(D0e,"]"))).some(function(t){return Dv(t,e)}):!1},l1e=function(e,t){return t.filter(oF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},d_=function(e,t){return oF(e)&&e.name?l1e(e,t):e},u1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(d_(n,e))}),e.filter(function(n){return t.has(n)})},vA=function(e){return e[0]&&e.length>1?d_(e[0],e):e[0]},yA=function(e,t){return e.length>1?e.indexOf(d_(e[t],e)):t},dF="NEW_FOCUS",c1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=o_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),y=u1e(t),w=n!==void 0?y.indexOf(n):-1,E=w-(r?y.indexOf(r):l),P=yA(e,0),k=yA(e,i-1);if(l===-1||h===-1)return dF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},d1e=function(e){return function(t){var n,r=(n=rF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},f1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=gA(r.filter(d1e(n)));return i&&i.length?vA(i):vA(gA(t))},YC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&YC(e.parentNode.host||e.parentNode,t),t},uw=function(e,t){for(var n=YC(e),r=YC(t),i=0;i=0)return o}return!1},fF=function(e,t,n){var r=GC(e),i=GC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=uw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=uw(o,l);u&&(!a||Dv(u,a)?a=u:a=uw(u,a))})}),a},h1e=function(e,t){return e.reduce(function(n,r){return n.concat(r1e(r,t))},[])},p1e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Q0e)},g1e=function(e,t){var n=document&&c_(),r=u_(e).filter(i4),i=fF(n||e,e,r),o=new Map,a=mA(r,o),s=jC(r,o).filter(function(m){var v=m.node;return i4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=mA([i],o).map(function(m){var v=m.node;return v}),u=p1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=c1e(h,l,n,t);return g===dF?{node:f1e(a,h,h1e(r,o))}:g===void 0?g:u[g]}},m1e=function(e){var t=u_(e).filter(i4),n=fF(e,e,t),r=new Map,i=jC([n],r,!0),o=jC(t,r).filter(function(a){var s=a.node;return i4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:o_(s)}})},v1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},cw=0,dw=!1,y1e=function(e,t,n){n===void 0&&(n={});var r=g1e(e,t);if(!dw&&r){if(cw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),dw=!0,setTimeout(function(){dw=!1},1);return}cw++,v1e(r.node,n.focusOptions),cw--}};const hF=y1e;function pF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var S1e=function(){return document&&document.activeElement===document.body},b1e=function(){return S1e()||s1e()},L0=null,r0=null,A0=null,zv=!1,x1e=function(){return!0},w1e=function(t){return(L0.whiteList||x1e)(t)},C1e=function(t,n){A0={observerNode:t,portaledElement:n}},_1e=function(t){return A0&&A0.portaledElement===t};function SA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var k1e=function(t){return t&&"current"in t?t.current:t},E1e=function(t){return t?Boolean(zv):zv==="meanwhile"},P1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},T1e=function(t,n){return n.some(function(r){return P1e(t,r,r)})},o4=function(){var t=!1;if(L0){var n=L0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||A0&&A0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(k1e).filter(Boolean));if((!h||w1e(h))&&(i||E1e(s)||!b1e()||!r0&&o)&&(u&&!(cF(g)||h&&T1e(h,g)||_1e(h))&&(document&&!r0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=hF(g,r0,{focusOptions:l}),A0={})),zv=!1,r0=document&&document.activeElement),document){var m=document&&document.activeElement,v=m1e(g),y=v.map(function(w){var E=w.node;return E}).indexOf(m);y>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),SA(y,v.length,1,v),SA(y,-1,-1,v))}}}return t},gF=function(t){o4()&&t&&(t.stopPropagation(),t.preventDefault())},f_=function(){return pF(o4)},L1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||C1e(r,n)},A1e=function(){return null},mF=function(){zv="just",setTimeout(function(){zv="meanwhile"},0)},M1e=function(){document.addEventListener("focusin",gF),document.addEventListener("focusout",f_),window.addEventListener("blur",mF)},I1e=function(){document.removeEventListener("focusin",gF),document.removeEventListener("focusout",f_),window.removeEventListener("blur",mF)};function R1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function O1e(e){var t=e.slice(-1)[0];t&&!L0&&M1e();var n=L0,r=n&&t&&t.id===n.id;L0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(r0=null,(!r||n.observed!==t.observed)&&t.onActivation(),o4(),pF(o4)):(I1e(),r0=null)}KB.assignSyncMedium(L1e);XB.assignMedium(f_);W0e.assignMedium(function(e){return e({moveFocusInside:hF,focusInside:cF})});const N1e=G0e(R1e,O1e)(A1e);var vF=C.exports.forwardRef(function(t,n){return x(ZB,{sideCar:N1e,ref:n,...t})}),yF=ZB.propTypes||{};yF.sideCar;t_(yF,["sideCar"]);vF.propTypes={};const D1e=vF;var SF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&_B(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(D1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};SF.displayName="FocusLock";var Y3="right-scroll-bar-position",q3="width-before-scroll-bar",z1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size",bF=YB(),fw=function(){},RS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:fw,onWheelCapture:fw,onTouchMoveCapture:fw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Dz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=UB([n,t]),R=yl(yl({},k),i);return ee(Ln,{children:[h&&x(T,{sideCar:bF,removeScrollBar:u,shards:g,noIsolation:v,inert:y,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},R),{ref:M})):x(P,{...yl({},R,{className:l,ref:M}),children:s})]})});RS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RS.classNames={fullWidth:q3,zeroRight:Y3};var F1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F1e();return t&&e.setAttribute("nonce",t),e}function H1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function W1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$1e())&&(H1e(t,n),W1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U1e=function(){var e=V1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xF=function(){var e=U1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G1e={left:0,top:0,right:0,gap:0},hw=function(e){return parseInt(e||"",10)||0},j1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[hw(n),hw(r),hw(i)]},Y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G1e;var t=j1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q1e=xF(),K1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(z1e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -407,7 +407,7 @@ Error generating stack: `+o.message+` `)},X1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Y1e(i)},[i]);return x(q1e,{styles:K1e(o,!t,i,n?"":"!important")})},qC=!1;if(typeof window<"u")try{var Yy=Object.defineProperty({},"passive",{get:function(){return qC=!0,!0}});window.addEventListener("test",Yy,Yy),window.removeEventListener("test",Yy,Yy)}catch{qC=!1}var Mp=qC?{passive:!1}:!1,Z1e=function(e){return e.tagName==="TEXTAREA"},wF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z1e(e)&&n[t]==="visible")},Q1e=function(e){return wF(e,"overflowY")},J1e=function(e){return wF(e,"overflowX")},bA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=CF(e,n);if(r){var i=_F(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ege=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},CF=function(e,t){return e==="v"?Q1e(t):J1e(t)},_F=function(e,t){return e==="v"?ege(t):tge(t)},nge=function(e,t){return e==="h"&&t==="rtl"?-1:1},rge=function(e,t,n,r,i){var o=nge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=_F(e,s),y=v[0],w=v[1],E=v[2],P=w-E-o*y;(y||P)&&CF(e,s)&&(g+=P,m+=y),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xA=function(e){return[e.deltaX,e.deltaY]},wA=function(e){return e&&"current"in e?e.current:e},ige=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oge=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},age=0,Ip=[];function sge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(age++)[0],o=C.exports.useState(function(){return xF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=IC([e.lockRef.current],(e.shards||[]).map(wA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=qy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,O=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=bA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=bA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?xA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(wA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,xA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,y=e.inert;return ee(Ln,{children:[y?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(bF,sge);var kF=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});kF.classNames=RS.classNames;const EF=kF;var Sh=(...e)=>e.filter(Boolean).join(" ");function hm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},KC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&KC.add(e),()=>{KC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const y=C.exports.useRef(null),w=C.exports.useCallback(z=>{y.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:hm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),y.current===z.target&&(!KC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:hm(z.onClick,O),onKeyDown:hm(z.onKeyDown,E),onMouseDown:hm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return $B(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,y=Ri("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:y,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var Bv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});Bv.displayName="ModalBody";var h_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:hm(n,l=>{l.stopPropagation(),o()}),...i})});h_.displayName="ModalCloseButton";function PF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=E8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(SF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(EF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...OC,custom:{offsetY:16,reverse:!0}},slideInRight:{...OC,custom:{offsetX:16,reverse:!0}},scale:{...Fz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],TF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});TF.displayName="ModalTransition";var Fv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(PF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y},x(TF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Fv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:Bz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function LF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var AF=Ee((e,t)=>x(Fv,{ref:t,role:"alertdialog",...e})),[CTe,bge]=_n(),xge=be($z),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(PF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:y,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var MF=(...e)=>e.filter(Boolean).join(" "),pw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function CA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,_A=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},_A)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},_A)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:y,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ct=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ct,mt);CA(Je,"disabled",Pe.stop,Pe.isSpinning),CA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ct(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ct,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ct(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":pw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":pw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:y,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":pw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,y,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,p_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),g_=Ee(function(t,n){const r=Ri("NumberInput",t),i=yn(t),o=B8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:MF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});g_.displayName="NumberInput";var IF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});IF.displayName="NumberInputStepper";var m_=Ee(function(t,n){const{getInputProps:r}=p_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:MF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});m_.displayName="NumberInputField";var RF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),v_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=p_(),o=i(t,n);return x(RF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});v_.displayName="NumberDecrementStepper";var y_=Ee(function(t,n){const{getIncrementButtonProps:r}=p_(),i=r(t,n),o=DS();return x(RF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});y_.displayName="NumberIncrementStepper";var c2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,d2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:y,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=NB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=OB({...w,enabled:E||!!y}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=DB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=kA(St),wt=gw(O.current,Yt),Gt=gw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ct=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=kA(St),wt=!gw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ct,getHeaderProps:mt,getBodyProps:Pe}}function gw(e,t){return e===t||e?.contains(t)}function kA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function S_(e){const t=Ri("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}S_.displayName="Popover";function b_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=d2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:c2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}b_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=d2();return ae.createElement(be.div,{...r(t,n),className:c2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=d2();return x(AS,{size:"sm",onClick:r,className:c2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),OF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});OF.displayName="PopoverTransition";var x_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=d2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(OF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:c2("chakra-popover__content",t.className),__css:h}))});x_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=d2();return ae.createElement(be.header,{...r(t,n),className:c2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function w_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}w_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function NF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var DF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};DF.displayName="Shape";var XC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});XC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...y}=e,w=NF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...y,__css:T},ee(DF,{size:n,isIndeterminate:v,children:[x(XC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(XC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=NF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),zF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:y,...w}=yn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:y}),l]}))});zF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var BF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});BF.displayName="SelectField";var FF=Ee((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...y}=yn(e),[w,E]=ime(y,kQ),P=z8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(BF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x($F,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});FF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),$F=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};$F.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function HF(e){return!!e.touches}function ume(e){return HF(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function WF(e,t="page"){return HF(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:WF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function VF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:WF(e)},{timestamp:i}=nT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,mw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=mw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=nT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=mw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function EA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mw(e,t){return{point:e.point,delta:EA(e.point,t[t.length-1]),offset:EA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function vw(e,t){return Math.abs(e-t)}function PA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return vw(e,t);if(PA(e)&&PA(t)){const n=vw(e.x,t.x),r=vw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function UF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=VF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function GF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=GF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function pm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function jF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...pm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...pm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...pm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),y={...l,...pm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:y,rootStyle:s,getThumbStyle:o}}function YF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=YF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*y,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=GF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ct=C.exports.useId(),Pe=Pme(u??ct),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Xz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=y||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(FC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>jF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};UF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...pm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,C_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),qF=Ee(function(t,n){const r=Ri("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});qF.defaultProps={orientation:"horizontal"};qF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=C_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=C_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=C_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=YF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=y||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=VF({min:t,max:n,step:y,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ct=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Xz(Qt,un.min,un.max);return un.step&&(er=parseFloat(FC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(FC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return jF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ct(ze);ot!=null&&ot!==Se.current.value&&j(ot)}UF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),__=Ee((e,t)=>{const n=Ri("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});__.defaultProps={orientation:"horizontal"};__.displayName="Slider";var KF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});KF.displayName="SliderThumb";var XF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});XF.displayName="SliderTrack";var ZF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});ZF.displayName="SliderFilledTrack";var ZC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});ZC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,k_=Ee(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=qz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":TA(s.isChecked),"data-hover":TA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:y},o))});k_.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function QC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,QF,Vme,Ume]=lD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const y=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:y,direction:l,htmlProps:u}}var[jme,f2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=f2(),i=QF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[y]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:QC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=f2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},y=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:QC(e.onClick,m)}),w="button";return{...y,id:JF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":e$(a,u),onFocus:t?void 0:QC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=f2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:e$(n,s),tabId:JF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=f2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=DB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=f2(),t=QF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function JF(e,t){return`${e}--tab-${t}`}function e$(e,t){return`${e}--tabpanel-${t}`}var[eve,h2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),t$=Ee(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});t$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=h2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...h2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var n$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=h2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});n$.displayName="TabPanel";var r$=Ee(function(t,n){const r=Zme(t),i=h2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});r$.displayName="TabPanels";var i$=Ee(function(t,n){const r=h2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});i$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],o$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=z8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});o$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function JC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function LA(e,t){const n=a$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function a$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=LA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:s$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=a$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(LA(Sl.getState(),i).position)}}var AA=0;function pve(e,t={}){AA+=1;const n=t.id??AA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Uz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Gz,{id:u?.title,children:i}),s&&x(Vz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function s$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=s$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...JC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...JC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function p2(e){const{theme:t}=oD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},l$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const y=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:y,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},JC(n,{id:t,onClose:E})))});l$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=l$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Zg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},e7=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:y=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=NB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=OB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ct=e7(K);G.current=ct.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ct=e7(K);ce.current=ct.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ct=>{N&&ct.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ct={},mt=null)=>({...ct,ref:Wn(K,mt,$),onPointerEnter:Zg(ct.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Zg(ct.onClick,_e),onPointerDown:Zg(ct.onPointerDown,Je),onFocus:Zg(ct.onFocus,Se),onBlur:Zg(ct.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ct={},mt=null)=>j({...ct,style:{...ct.style,[Wr.arrowSize.var]:y?`${y}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,y,w]),pt=C.exports.useCallback((ct={},mt=null)=>{const Pe={...ct.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ct,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var yw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(yw,t),()=>n.removeEventListener(yw,t)},[t,e]),()=>{const n=a4(e),r=e7(e);n.dispatchEvent(new r.CustomEvent(yw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:y,motionProps:w,...E}=r,P=m??v??h??y;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(vB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(lN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(zB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:E_(e)?2:P_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function u$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function c$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function E_(e){return Rve&&e instanceof Map}function P_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function T_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=f$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return L_(r,!0)},!0)),e}function Tve(){xs(2)}function A_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=i7[e];return t||xs(18,e),t}function Lve(e,t){i7[e]||(i7[e]=t)}function t7(){return $v}function Sw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){n7(e),e.p.forEach(Ave),e.p=null}function n7(e){e===$v&&($v=e.l)}function MA(e){return $v={p:[],l:$v,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function bw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==d$?e:void 0}function l4(e,t,n){if(A_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return IA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=T_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return IA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function IA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(u$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!A_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&L_(t,n)}function xw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function RA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function ww(e){e.o||(e.o=T_(e.t))}function r7(e,t,n){var r=E_(t)?Ll("MapSet").N(t,n):P_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:t7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Hv;a&&(l=[s],u=gm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:t7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=OA(n,o),i.I=!1}else r=OA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||u$(r,a,t(s))}),o===3?new Set(r):r}(e)}function OA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return T_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Hv.get(l,o)},set:function(l){var u=this[rr];Hv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!c$(m,g))return!0}}var y=!!a[rr];return l.length!==O0(a).length+(y?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,h$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(I_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function p$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&O.type==="range")return!1;var z=bA(N,O);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=bA(N,O)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var V=r.current||R;return rge(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Ip.length||Ip[Ip.length-1]!==o)){var P="deltaY"in E?xA(E):qy(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&ige(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(wA).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=qy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,xA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,qy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Ip.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Mp),document.addEventListener("touchmove",l,Mp),document.addEventListener("touchstart",h,Mp),function(){Ip=Ip.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Mp),document.removeEventListener("touchmove",l,Mp),document.removeEventListener("touchstart",h,Mp)}},[]);var v=e.removeScrollBar,y=e.inert;return ee(Ln,{children:[y?x(o,{styles:oge(i)}):null,v?x(X1e,{gapMode:"margin"}):null]})}const lge=H0e(bF,sge);var kF=C.exports.forwardRef(function(e,t){return x(RS,{...yl({},e,{ref:t,sideCar:lge})})});kF.classNames=RS.classNames;const EF=kF;var Sh=(...e)=>e.filter(Boolean).join(" ");function hm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var uge=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},KC=new uge;function cge(e,t){C.exports.useEffect(()=>(t&&KC.add(e),()=>{KC.remove(e)}),[t,e])}function dge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=hge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");fge(u,t&&a),cge(u,t);const y=C.exports.useRef(null),w=C.exports.useCallback(z=>{y.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Wn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:hm(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(z=>{z.stopPropagation(),y.current===z.target&&(!KC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Wn(V,h),onClick:hm(z.onClick,O),onKeyDown:hm(z.onKeyDown,E),onMouseDown:hm(z.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function fge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return $B(e.current)},[t,e,n])}function hge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[pge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[gge,cd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),t1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,y=Ii("Modal",e),E={...dge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(gge,{value:E,children:x(pge,{value:y,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(yh,{...t,children:n})})})})};t1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};t1.displayName="Modal";var Bv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__body",n),s=bh();return ae.createElement(be.div,{ref:t,className:a,id:i,...r,__css:s.body})});Bv.displayName="ModalBody";var h_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=cd(),a=Sh("chakra-modal__close-btn",r),s=bh();return x(AS,{ref:t,__css:s.closeButton,className:a,onClick:hm(n,l=>{l.stopPropagation(),o()}),...i})});h_.displayName="ModalCloseButton";function PF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=cd(),[g,m]=E8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(SF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(EF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var mge={slideInBottom:{...OC,custom:{offsetY:16,reverse:!0}},slideInRight:{...OC,custom:{offsetX:16,reverse:!0}},scale:{...Fz,custom:{initialScale:.95,reverse:!0}},none:{}},vge=be(Fl.section),yge=e=>mge[e||"none"],TF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=yge(n),...i}=e;return x(vge,{ref:t,...r,...i})});TF.displayName="ModalTransition";var Fv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=cd(),u=s(a,t),h=l(i),g=Sh("chakra-modal__content",n),m=bh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=cd();return ae.createElement(PF,null,ae.createElement(be.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y},x(TF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Fv.displayName="ModalContent";var OS=Ee((e,t)=>{const{className:n,...r}=e,i=Sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(be.footer,{ref:t,...r,__css:a,className:i})});OS.displayName="ModalFooter";var NS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=cd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Sh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(be.header,{ref:t,className:a,id:i,...r,__css:l})});NS.displayName="ModalHeader";var Sge=be(Fl.div),n1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=cd();return x(Sge,{...i||(u==="none"?{}:Bz),__css:l,ref:t,className:a,...o})});n1.displayName="ModalOverlay";function LF(e){const{leastDestructiveRef:t,...n}=e;return x(t1,{...n,initialFocusRef:t})}var AF=Ee((e,t)=>x(Fv,{ref:t,role:"alertdialog",...e})),[CTe,bge]=_n(),xge=be($z),wge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=cd(),h=s(a,t),g=l(o),m=Sh("chakra-modal__content",n),v=bh(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=bge();return ae.createElement(PF,null,ae.createElement(be.div,{...g,className:"chakra-modal__content-container",__css:w},x(xge,{motionProps:i,direction:E,in:u,className:m,...h,__css:y,children:r})))});wge.displayName="DrawerContent";function Cge(e,t){const n=dr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var MF=(...e)=>e.filter(Boolean).join(" "),pw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _ge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),kge=e=>x(ya,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function CA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Ege=50,_A=300;function Pge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Cge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Ege:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},_A)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},_A)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Tge=/^[Ee0-9+\-.]$/;function Lge(e){return Tge.test(e)}function Age(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Mge(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:y,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:O,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...le}=e,W=dr(R),Q=dr(O),ne=dr(N),J=dr(V??Lge),K=dr(z),G=qfe(e),{update:X,increment:ce,decrement:me}=G,[Re,xe]=C.exports.useState(!1),Se=!(s||l),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useRef(null),dt=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),pt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);ld(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Me.current)return;if(Me.current.value!=G.value){const It=_t(Me.current.value);G.setValue(dt(It))}},[_t,dt]);const ct=C.exports.useCallback((ke=a)=>{Se&&ce(ke)},[ce,Se,a]),mt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Pge(ct,mt);CA(Je,"disabled",Pe.stop,Pe.isSpinning),CA(Xe,"disabled",Pe.stop,Pe.isSpinning);const et=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const ze=_t(ke.currentTarget.value);X(dt(ze)),_e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[X,dt,_t]),Lt=C.exports.useCallback(ke=>{var It;W?.(ke),_e.current&&(ke.target.selectionStart=_e.current.start??((It=ke.currentTarget.value)==null?void 0:It.length),ke.currentTarget.selectionEnd=_e.current.end??ke.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;Age(ke,J)||ke.preventDefault();const It=St(ke)*a,ze=ke.key,un={ArrowUp:()=>ct(It),ArrowDown:()=>mt(It),Home:()=>X(i),End:()=>X(o)}[ze];un&&(ke.preventDefault(),un(ke))},[J,a,ct,mt,X,i,o]),St=ke=>{let It=1;return(ke.metaKey||ke.ctrlKey)&&(It=.1),ke.shiftKey&&(It=10),It},Yt=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const It=G.value.toString();return It||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{xe(!1),n&&wt()},[n,xe,wt]),ln=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Me.current)==null||ke.focus()})},[t]),on=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),ln()},[ln,Pe]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),ln()},[ln,Pe]);Zf(()=>Me.current,"wheel",ke=>{var It;const ot=(((It=Me.current)==null?void 0:It.ownerDocument)??document).activeElement===Me.current;if(!v||!ot)return;ke.preventDefault();const un=St(ke)*a,Bn=Math.sign(ke.deltaY);Bn===-1?ct(un):Bn===1&&mt(un)},{passive:!1});const Ze=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMax;return{...ke,ref:Wn(It,Je),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||on(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":pw(ze)}},[G.isAtMax,r,on,Pe.stop,l]),Zt=C.exports.useCallback((ke={},It=null)=>{const ze=l||r&&G.isAtMin;return{...ke,ref:Wn(It,Xe),role:"button",tabIndex:-1,onPointerDown:al(ke.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(ke.onPointerLeave,Pe.stop),onPointerUp:al(ke.onPointerUp,Pe.stop),disabled:ze,"aria-disabled":pw(ze)}},[G.isAtMin,r,Oe,Pe.stop,l]),qt=C.exports.useCallback((ke={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:y,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Wn(Me,It),value:pt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":pw(h??G.isOutOfRange),"aria-valuetext":Yt,autoComplete:"off",autoCorrect:"off",onChange:al(ke.onChange,et),onKeyDown:al(ke.onKeyDown,it),onFocus:al(ke.onFocus,Lt,()=>xe(!0)),onBlur:al(ke.onBlur,Q,Gt)}),[P,m,g,M,T,pt,k,y,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Yt,et,it,Lt,Q,Gt]);return{value:pt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Re,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:le}}var[Ige,DS]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rge,p_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),g_=Ee(function(t,n){const r=Ii("NumberInput",t),i=yn(t),o=B8(i),{htmlProps:a,...s}=Mge(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Rge,{value:l},ae.createElement(Ige,{value:r},ae.createElement(be.div,{...a,ref:n,className:MF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});g_.displayName="NumberInput";var IF=Ee(function(t,n){const r=DS();return ae.createElement(be.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});IF.displayName="NumberInputStepper";var m_=Ee(function(t,n){const{getInputProps:r}=p_(),i=r(t,n),o=DS();return ae.createElement(be.input,{...i,className:MF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});m_.displayName="NumberInputField";var RF=be("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),v_=Ee(function(t,n){const r=DS(),{getDecrementButtonProps:i}=p_(),o=i(t,n);return x(RF,{...o,__css:r.stepper,children:t.children??x(_ge,{})})});v_.displayName="NumberDecrementStepper";var y_=Ee(function(t,n){const{getIncrementButtonProps:r}=p_(),i=r(t,n),o=DS();return x(RF,{...i,__css:o.stepper,children:t.children??x(kge,{})})});y_.displayName="NumberIncrementStepper";var c2=(...e)=>e.filter(Boolean).join(" ");function Oge(e,...t){return Nge(e)?e(...t):e}var Nge=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Dge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[zge,xh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Bge,d2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rp={click:"click",hover:"hover"};function Fge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Rp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:y,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=NB(e),M=C.exports.useRef(null),R=C.exports.useRef(null),O=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,le]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(et=>`${et}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Re,forceUpdate:xe}=OB({...w,enabled:E||!!y}),Se=x0e({isOpen:E,ref:O});rhe({enabled:E,ref:R}),Zhe(O,{focusRef:R,visible:E,shouldFocus:o&&u===Rp.click}),Jhe(O,{focusRef:r,visible:E,shouldFocus:a&&u===Rp.click});const Me=DB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),_e=C.exports.useCallback((et={},Lt=null)=>{const it={...et,style:{...et.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Wn(O,Lt),children:Me?et.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(et.onKeyDown,St=>{n&&St.key==="Escape"&&P()}),onBlur:sl(et.onBlur,St=>{const Yt=kA(St),wt=gw(O.current,Yt),Gt=gw(R.current,Yt);E&&t&&(!wt&&!Gt)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Rp.hover&&(it.role="tooltip",it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(et.onMouseLeave,St=>{St.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Me,J,V,K,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((et={},Lt=null)=>me({...et,style:{visibility:E?"visible":"hidden",...et.style}},Lt),[E,me]),Xe=C.exports.useCallback((et,Lt=null)=>({...et,ref:Wn(Lt,M,X)}),[M,X]),dt=C.exports.useRef(),_t=C.exports.useRef(),pt=C.exports.useCallback(et=>{M.current==null&&X(et)},[X]),ct=C.exports.useCallback((et={},Lt=null)=>{const it={...et,ref:Wn(R,Lt,pt),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Rp.click&&(it.onClick=sl(et.onClick,T)),u===Rp.hover&&(it.onFocus=sl(et.onFocus,()=>{dt.current===void 0&&k()}),it.onBlur=sl(et.onBlur,St=>{const Yt=kA(St),wt=!gw(O.current,Yt);E&&t&&wt&&P()}),it.onKeyDown=sl(et.onKeyDown,St=>{St.key==="Escape"&&P()}),it.onMouseEnter=sl(et.onMouseEnter,()=>{N.current=!0,dt.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(et.onMouseLeave,()=>{N.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),_t.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,pt,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),_t.current&&clearTimeout(_t.current)},[]);const mt=C.exports.useCallback((et={},Lt=null)=>({...et,id:K,ref:Wn(Lt,it=>{$(!!it)})}),[K]),Pe=C.exports.useCallback((et={},Lt=null)=>({...et,id:G,ref:Wn(Lt,it=>{le(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:Xe,getArrowProps:ce,getArrowInnerProps:Re,getPopoverPositionerProps:Je,getPopoverProps:_e,getTriggerProps:ct,getHeaderProps:mt,getBodyProps:Pe}}function gw(e,t){return e===t||e?.contains(t)}function kA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function S_(e){const t=Ii("Popover",e),{children:n,...r}=yn(e),i=f1(),o=Fge({...r,direction:i.direction});return x(zge,{value:o,children:x(Bge,{value:t,children:Oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}S_.displayName="Popover";function b_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=xh(),a=d2(),s=t??n??r;return ae.createElement(be.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(be.div,{className:c2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}b_.displayName="PopoverArrow";var $ge=Ee(function(t,n){const{getBodyProps:r}=xh(),i=d2();return ae.createElement(be.div,{...r(t,n),className:c2("chakra-popover__body",t.className),__css:i.body})});$ge.displayName="PopoverBody";var Hge=Ee(function(t,n){const{onClose:r}=xh(),i=d2();return x(AS,{size:"sm",onClick:r,className:c2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Hge.displayName="PopoverCloseButton";function Wge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Vge={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Uge=be(Fl.section),OF=Ee(function(t,n){const{variants:r=Vge,...i}=t,{isOpen:o}=xh();return ae.createElement(Uge,{ref:n,variants:Wge(r),initial:!1,animate:o?"enter":"exit",...i})});OF.displayName="PopoverTransition";var x_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=xh(),u=d2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(be.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(OF,{...i,...a(o,n),onAnimationComplete:Dge(l,o.onAnimationComplete),className:c2("chakra-popover__content",t.className),__css:h}))});x_.displayName="PopoverContent";var Gge=Ee(function(t,n){const{getHeaderProps:r}=xh(),i=d2();return ae.createElement(be.header,{...r(t,n),className:c2("chakra-popover__header",t.className),__css:i.header})});Gge.displayName="PopoverHeader";function w_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=xh();return C.exports.cloneElement(t,n(t.props,t.ref))}w_.displayName="PopoverTrigger";function jge(e,t,n){return(e-t)*100/(n-t)}var Yge=yd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),qge=yd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kge=yd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Xge=yd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function NF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=jge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var DF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(be.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${qge} 2s linear infinite`:void 0},...r})};DF.displayName="Shape";var XC=e=>ae.createElement(be.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});XC.displayName="Circle";var Zge=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...y}=e,w=NF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(be.div,{ref:t,className:"chakra-progress",...w.bind,...y,__css:T},ee(DF,{size:n,isIndeterminate:v,children:[x(XC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(XC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});Zge.displayName="CircularProgress";var[Qge,Jge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=NF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Jge().filledTrack};return ae.createElement(be.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),zF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:y,...w}=yn(e),E=Ii("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Xge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Kge} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return ae.createElement(be.div,{ref:t,borderRadius:P,__css:O,...w},ee(Qge,{value:E,children:[x(eme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:y}),l]}))});zF.displayName="Progress";var tme=be("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});tme.displayName="CircularProgressLabel";var nme=(...e)=>e.filter(Boolean).join(" "),rme=e=>e?"":void 0;function ime(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var BF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(be.select,{...a,ref:n,className:nme("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});BF.displayName="SelectField";var FF=Ee((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...y}=yn(e),[w,E]=ime(y,kQ),P=z8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return ae.createElement(be.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(BF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x($F,{"data-disabled":rme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});FF.displayName="Select";var ome=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ame=be("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),$F=e=>{const{children:t=x(ome,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(ame,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};$F.displayName="SelectIcon";function sme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lme(e){const t=cme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function HF(e){return!!e.touches}function ume(e){return HF(e)&&e.touches.length>1}function cme(e){return e.view??window}function dme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function fme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function WF(e,t="page"){return HF(e)?dme(e,t):fme(e,t)}function hme(e){return t=>{const n=lme(t);(!n||n&&t.button===0)&&e(t)}}function pme(e,t=!1){function n(i){e(i,{point:WF(i)})}return t?hme(n):n}function K3(e,t,n,r){return sme(e,t,pme(n,t==="pointerdown"),r)}function VF(e){const t=C.exports.useRef(null);return t.current=e,t}var gme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ume(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:WF(e)},{timestamp:i}=nT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,mw(r,this.history)),this.removeListeners=yme(K3(this.win,"pointermove",this.onPointerMove),K3(this.win,"pointerup",this.onPointerUp),K3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=mw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Sme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=nT();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,zJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=mw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),BJ.update(this.updatePoint)}};function EA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mw(e,t){return{point:e.point,delta:EA(e.point,t[t.length-1]),offset:EA(e.point,t[0]),velocity:vme(t,.1)}}var mme=e=>e*1e3;function vme(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mme(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yme(...e){return t=>e.reduce((n,r)=>r(n),t)}function vw(e,t){return Math.abs(e-t)}function PA(e){return"x"in e&&"y"in e}function Sme(e,t){if(typeof e=="number"&&typeof t=="number")return vw(e,t);if(PA(e)&&PA(t)){const n=vw(e.x,t.x),r=vw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function UF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=VF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new gme(v,h.current,s)}return K3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function bme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var xme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function wme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function GF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return xme(()=>{const a=e(),s=a.map((l,u)=>bme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(wme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Cme(e){return typeof e=="object"&&e!==null&&"current"in e}function _me(e){const[t]=GF({observeMutation:!1,getNodes(){return[Cme(e)?e.current:e]}});return t}var kme=Object.getOwnPropertyNames,Eme=(e,t)=>function(){return e&&(t=(0,e[kme(e)[0]])(e=0)),t},wd=Eme({"../../../react-shim.js"(){}});wd();wd();wd();var Oa=e=>e?"":void 0,M0=e=>e?!0:void 0,Cd=(...e)=>e.filter(Boolean).join(" ");wd();function I0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}wd();wd();function Pme(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function pm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var X3={width:0,height:0},Ky=e=>e||X3;function jF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??X3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...pm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Ky(w).height>Ky(E).height?w:E,X3):r.reduce((w,E)=>Ky(w).width>Ky(E).width?w:E,X3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...pm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...pm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),y={...l,...pm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:y,rootStyle:s,getThumbStyle:o}}function YF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Tme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...O}=e,N=dr(m),z=dr(v),V=dr(w),$=YF({isReversed:a,direction:s,orientation:l}),[j,le]=dS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>T0(He,t,n)),Re=R*y,xe=Lme(me,t,n,Re),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=xe;const Me=me.map(He=>n-He+t),Je=($?Me:me).map(He=>n4(He,t,n)),Xe=l==="vertical",dt=C.exports.useRef(null),_t=C.exports.useRef(null),pt=GF({getNodes(){const He=_t.current,ft=He?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),ct=C.exports.useId(),Pe=Pme(u??ct),et=C.exports.useCallback(He=>{var ft;if(!dt.current)return;Se.current.eventSource="pointer";const tt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((ft=He.touches)==null?void 0:ft[0])??He,er=Xe?tt.bottom-Qt:Nt-tt.left,lo=Xe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Xz(mi,t,n)},[Xe,$,n,t]),Lt=(n-t)/10,it=y||(n-t)/100,St=C.exports.useMemo(()=>({setValueAtIndex(He,ft){if(!X)return;const tt=Se.current.valueBounds[He];ft=parseFloat(FC(ft,tt.min,it)),ft=T0(ft,tt.min,tt.max);const Nt=[...Se.current.value];Nt[He]=ft,le(Nt)},setActiveIndex:G,stepUp(He,ft=it){const tt=Se.current.value[He],Nt=$?tt-ft:tt+ft;St.setValueAtIndex(He,Nt)},stepDown(He,ft=it){const tt=Se.current.value[He],Nt=$?tt+ft:tt-ft;St.setValueAtIndex(He,Nt)},reset(){le(ce.current)}}),[it,$,le,X]),Yt=C.exports.useCallback(He=>{const ft=He.key,Nt={ArrowRight:()=>St.stepUp(K),ArrowUp:()=>St.stepUp(K),ArrowLeft:()=>St.stepDown(K),ArrowDown:()=>St.stepDown(K),PageUp:()=>St.stepUp(K,Lt),PageDown:()=>St.stepDown(K,Lt),Home:()=>{const{min:Qt}=xe[K];St.setValueAtIndex(K,Qt)},End:()=>{const{max:Qt}=xe[K];St.setValueAtIndex(K,Qt)}}[ft];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),Se.current.eventSource="keyboard")},[St,K,Lt,xe]),{getThumbStyle:wt,rootStyle:Gt,trackStyle:ln,innerTrackStyle:on}=C.exports.useMemo(()=>jF({isReversed:$,orientation:l,thumbRects:pt,thumbPercents:Je}),[$,l,Je,pt]),Oe=C.exports.useCallback(He=>{var ft;const tt=He??K;if(tt!==-1&&M){const Nt=Pe.getThumb(tt),Qt=(ft=_t.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[M,K,Pe]);ld(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[me,z]);const Ze=He=>{const ft=et(He)||0,tt=Se.current.value.map(mi=>Math.abs(mi-ft)),Nt=Math.min(...tt);let Qt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ft>Se.current.value[Qt]&&(Qt=Qt+er.length-1),G(Qt),St.setValueAtIndex(Qt,ft),Oe(Qt)},Zt=He=>{if(K==-1)return;const ft=et(He)||0;G(K),St.setValueAtIndex(K,ft),Oe(K)};UF(_t,{onPanSessionStart(He){!X||(Q(!0),Ze(He),N?.(Se.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(Se.current.value))},onPan(He){!X||Zt(He)}});const qt=C.exports.useCallback((He={},ft=null)=>({...He,...O,id:Pe.root,ref:Wn(ft,_t),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(ne),style:{...He.style,...Gt}}),[O,h,ne,Gt,Pe]),ke=C.exports.useCallback((He={},ft=null)=>({...He,ref:Wn(ft,dt),id:Pe.track,"data-disabled":Oa(h),style:{...He.style,...ln}}),[h,ln,Pe]),It=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.innerTrack,style:{...He.style,...on}}),[on,Pe]),ze=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He,Qt=me[tt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ft,role:"slider",tabIndex:X?0:void 0,id:Pe.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Qt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,...wt(tt)},onKeyDown:I0(He.onKeyDown,Yt),onFocus:I0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:I0(He.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,xe,X,W,K,V,E,l,h,g,P,k,wt,Yt,J]),ot=C.exports.useCallback((He={},ft=null)=>({...He,ref:ft,id:Pe.output,htmlFor:me.map((tt,Nt)=>Pe.getThumb(Nt)).join(" "),"aria-live":"off"}),[Pe,me]),un=C.exports.useCallback((He,ft=null)=>{const{value:tt,...Nt}=He,Qt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=n4(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...pm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Pe.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Qt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Pe]),Bn=C.exports.useCallback((He,ft=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ft,id:Pe.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Pe]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>Je[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:St,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:un,getInputProps:Bn,getOutputProps:ot}}function Lme(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Ame,zS]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Mme,C_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),qF=Ee(function(t,n){const r=Ii("Slider",t),i=yn(t),{direction:o}=f1();i.direction=o;const{getRootProps:a,...s}=Tme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(Ame,{value:l},ae.createElement(Mme,{value:r},ae.createElement(be.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});qF.defaultProps={orientation:"horizontal"};qF.displayName="RangeSlider";var Ime=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=zS(),a=C_(),s=r(t,n);return ae.createElement(be.div,{...s,className:Cd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Ime.displayName="RangeSliderThumb";var Rme=Ee(function(t,n){const{getTrackProps:r}=zS(),i=C_(),o=r(t,n);return ae.createElement(be.div,{...o,className:Cd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Rme.displayName="RangeSliderTrack";var Ome=Ee(function(t,n){const{getInnerTrackProps:r}=zS(),i=C_(),o=r(t,n);return ae.createElement(be.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ome.displayName="RangeSliderFilledTrack";var Nme=Ee(function(t,n){const{getMarkerProps:r}=zS(),i=r(t,n);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",t.className)})});Nme.displayName="RangeSliderMark";wd();wd();function Dme(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,O=dr(m),N=dr(v),z=dr(w),V=YF({isReversed:a,direction:s,orientation:l}),[$,j]=dS({value:i,defaultValue:o??Bme(t,n),onChange:r}),[le,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=y||(n-t)/100,X=T0($,t,n),ce=n-X+t,Re=n4(V?ce:X,t,n),xe=l==="vertical",Se=VF({min:t,max:n,step:y,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Me=C.exports.useRef(null),_e=C.exports.useRef(null),Je=C.exports.useRef(null),Xe=C.exports.useId(),dt=u??Xe,[_t,pt]=[`slider-thumb-${dt}`,`slider-track-${dt}`],ct=C.exports.useCallback(ze=>{var ot;if(!Me.current)return;const un=Se.current;un.eventSource="pointer";const Bn=Me.current.getBoundingClientRect(),{clientX:He,clientY:ft}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?Bn.bottom-ft:He-Bn.left,Nt=xe?Bn.height:Bn.width;let Qt=tt/Nt;V&&(Qt=1-Qt);let er=Xz(Qt,un.min,un.max);return un.step&&(er=parseFloat(FC(er,un.min,un.step))),er=T0(er,un.min,un.max),er},[xe,V,Se]),mt=C.exports.useCallback(ze=>{const ot=Se.current;!ot.isInteractive||(ze=parseFloat(FC(ze,ot.min,G)),ze=T0(ze,ot.min,ot.max),j(ze))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;mt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;mt(ot)},reset(){mt(o||0)},stepTo(ze){mt(ze)}}),[mt,V,X,G,o]),et=C.exports.useCallback(ze=>{const ot=Se.current,Bn={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(K),PageDown:()=>Pe.stepDown(K),Home:()=>mt(ot.min),End:()=>mt(ot.max)}[ze.key];Bn&&(ze.preventDefault(),ze.stopPropagation(),Bn(ze),ot.eventSource="keyboard")},[Pe,mt,K,Se]),Lt=z?.(X)??E,it=_me(_e),{getThumbStyle:St,rootStyle:Yt,trackStyle:wt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const ze=Se.current,ot=it??{width:0,height:0};return jF({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Re]})},[V,it,Re,Se]),ln=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=_e.current)==null?void 0:ot.focus()})},[Se]);ld(()=>{const ze=Se.current;ln(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function on(ze){const ot=ct(ze);ot!=null&&ot!==Se.current.value&&j(ot)}UF(Je,{onPanSessionStart(ze){const ot=Se.current;!ot.isInteractive||(W(!0),ln(),on(ze),O?.(ot.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||on(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...R,ref:Wn(ot,Je),tabIndex:-1,"aria-disabled":M0(h),"data-focused":Oa(Q),style:{...ze.style,...Yt}}),[R,h,Q,Yt]),Ze=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,Me),id:pt,"data-disabled":Oa(h),style:{...ze.style,...wt}}),[h,pt,wt]),Zt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Gt}}),[Gt]),qt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Wn(ot,_e),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Oa(le),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":M0(h),"aria-readonly":M0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...St(0)},onKeyDown:I0(ze.onKeyDown,et),onFocus:I0(ze.onFocus,()=>ne(!0)),onBlur:I0(ze.onBlur,()=>ne(!1))}),[J,_t,le,Lt,t,n,X,l,h,g,P,k,St,et]),ke=C.exports.useCallback((ze,ot=null)=>{const un=!(ze.valuen),Bn=X>=ze.value,He=n4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...zme({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!un),"data-highlighted":Oa(Bn),style:{...ze.style,...ft}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:le},actions:Pe,getRootProps:Oe,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:It}}function zme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Bme(e,t){return t"}),[$me,FS]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),__=Ee((e,t)=>{const n=Ii("Slider",e),r=yn(e),{direction:i}=f1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Dme(r),l=a(),u=o({},t);return ae.createElement(Fme,{value:s},ae.createElement($me,{value:n},ae.createElement(be.div,{...l,className:Cd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});__.defaultProps={orientation:"horizontal"};__.displayName="Slider";var KF=Ee((e,t)=>{const{getThumbProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__thumb",e.className),__css:r.thumb})});KF.displayName="SliderThumb";var XF=Ee((e,t)=>{const{getTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__track",e.className),__css:r.track})});XF.displayName="SliderTrack";var ZF=Ee((e,t)=>{const{getInnerTrackProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});ZF.displayName="SliderFilledTrack";var ZC=Ee((e,t)=>{const{getMarkerProps:n}=BS(),r=FS(),i=n(e,t);return ae.createElement(be.div,{...i,className:Cd("chakra-slider__marker",e.className),__css:r.mark})});ZC.displayName="SliderMark";var Hme=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,k_=Ee(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=yn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=qz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return ae.createElement(be.label,{...h(),className:Hme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(be.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(be.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":TA(s.isChecked),"data-hover":TA(s.isHovered)})),o&&ae.createElement(be.span,{className:"chakra-switch__label",...g(),__css:y},o))});k_.displayName="Switch";var S1=(...e)=>e.filter(Boolean).join(" ");function QC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wme,QF,Vme,Ume]=lD();function Gme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=dS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const y=Vme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:y,direction:l,htmlProps:u}}var[jme,f2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Yme(e){const{focusedIndex:t,orientation:n,direction:r}=f2(),i=QF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[y]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:QC(e.onKeyDown,o)}}function qme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=f2(),{index:u,register:h}=Ume({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},y=$he({...r,ref:Wn(h,e.ref),isDisabled:t,isFocusable:n,onClick:QC(e.onClick,m)}),w="button";return{...y,id:JF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":e$(a,u),onFocus:t?void 0:QC(e.onFocus,v)}}var[Kme,Xme]=_n({});function Zme(e){const t=f2(),{id:n,selectedIndex:r}=t,o=PS(e.children).map((a,s)=>C.exports.createElement(Kme,{key:s,value:{isSelected:s===r,id:e$(n,s),tabId:JF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Qme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=f2(),{isSelected:o,id:a,tabId:s}=Xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=DB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Jme(){const e=f2(),t=QF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return _s(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function JF(e,t){return`${e}--tab-${t}`}function e$(e,t){return`${e}--tabpanel-${t}`}var[eve,h2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),t$=Ee(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=yn(t),{htmlProps:s,descendants:l,...u}=Gme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(Wme,{value:l},ae.createElement(jme,{value:h},ae.createElement(eve,{value:r},ae.createElement(be.div,{className:S1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});t$.displayName="Tabs";var tve=Ee(function(t,n){const r=Jme(),i={...t.style,...r},o=h2();return ae.createElement(be.div,{ref:n,...t,className:S1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});tve.displayName="TabIndicator";var nve=Ee(function(t,n){const r=Yme({...t,ref:n}),o={display:"flex",...h2().tablist};return ae.createElement(be.div,{...r,className:S1("chakra-tabs__tablist",t.className),__css:o})});nve.displayName="TabList";var n$=Ee(function(t,n){const r=Qme({...t,ref:n}),i=h2();return ae.createElement(be.div,{outline:"0",...r,className:S1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});n$.displayName="TabPanel";var r$=Ee(function(t,n){const r=Zme(t),i=h2();return ae.createElement(be.div,{...r,width:"100%",ref:n,className:S1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});r$.displayName="TabPanels";var i$=Ee(function(t,n){const r=h2(),i=qme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(be.button,{...i,className:S1("chakra-tabs__tab",t.className),__css:o})});i$.displayName="Tab";var rve=(...e)=>e.filter(Boolean).join(" ");function ive(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ove=["h","minH","height","minHeight"],o$=Ee((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=yn(e),a=z8(o),s=i?ive(n,ove):n;return ae.createElement(be.textarea,{ref:t,rows:i,...a,className:rve("chakra-textarea",r),__css:s})});o$.displayName="Textarea";function ave(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function JC(e,...t){return sve(e)?e(...t):e}var sve=e=>typeof e=="function";function lve(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var uve=(e,t)=>e.find(n=>n.id===t);function LA(e,t){const n=a$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function a$(e,t){for(const[n,r]of Object.entries(e))if(uve(r,t))return n}function cve(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function dve(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var fve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=hve(fve);function hve(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=pve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=LA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:s$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=a$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(LA(Sl.getState(),i).position)}}var AA=0;function pve(e,t={}){AA+=1;const n=t.id??AA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gve=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ae.createElement(Wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Uz,{children:l}),ae.createElement(be.div,{flex:"1",maxWidth:"100%"},i&&x(Gz,{id:u?.title,children:i}),s&&x(Vz,{id:u?.description,display:"block",children:s})),o&&x(AS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function s$(e={}){const{render:t,toastComponent:n=gve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function mve(e,t){const n=i=>({...t,...i,position:lve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=s$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...JC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...JC(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function p2(e){const{theme:t}=oD();return C.exports.useMemo(()=>mve(t.direction,e),[e,t.direction])}var vve={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},l$=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=vve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=mue();ld(()=>{v||r?.()},[v]),ld(()=>{m(s)},[s]);const y=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),ave(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>cve(a),[a]);return ae.createElement(Fl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:y,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(be.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},JC(n,{id:t,onClose:E})))});l$.displayName="ToastComponent";var yve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=l$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:dve(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Ln,{children:[n,x(yh,{...o,children:s})]})};function Sve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function bve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var xve={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Zg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var a4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},e7=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function wve(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:y=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...O}=e,{isOpen:N,onOpen:z,onClose:V}=NB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:le,getArrowProps:W}=OB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Re=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=Cve(K,Re),Se=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ct=e7(K);G.current=ct.setTimeout(z,t)}},[xe,k,z,t]),Me=C.exports.useCallback(()=>{X();const ct=e7(K);ce.current=ct.setTimeout(Re,n)},[n,Re,X]),_e=C.exports.useCallback(()=>{N&&r&&Me()},[r,Me,N]),Je=C.exports.useCallback(()=>{N&&a&&Me()},[a,Me,N]),Xe=C.exports.useCallback(ct=>{N&&ct.key==="Escape"&&Me()},[N,Me]);Zf(()=>a4(K),"keydown",s?Xe:void 0),Zf(()=>a4(K),"scroll",()=>{N&&o&&Re()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Me);const dt=C.exports.useCallback((ct={},mt=null)=>({...ct,ref:Wn(K,mt,$),onPointerEnter:Zg(ct.onPointerEnter,et=>{et.pointerType!=="touch"&&Se()}),onClick:Zg(ct.onClick,_e),onPointerDown:Zg(ct.onPointerDown,Je),onFocus:Zg(ct.onFocus,Se),onBlur:Zg(ct.onBlur,Me),"aria-describedby":N?J:void 0}),[Se,Me,Je,N,J,_e,$]),_t=C.exports.useCallback((ct={},mt=null)=>j({...ct,style:{...ct.style,[Wr.arrowSize.var]:y?`${y}px`:void 0,[Wr.arrowShadowColor.var]:w}},mt),[j,y,w]),pt=C.exports.useCallback((ct={},mt=null)=>{const Pe={...ct.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:mt,...O,...ct,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:N,show:Se,hide:Me,getTriggerProps:dt,getTooltipProps:pt,getTooltipPositionerProps:_t,getArrowProps:W,getArrowInnerProps:le}}var yw="chakra-ui:close-tooltip";function Cve(e,t){return C.exports.useEffect(()=>{const n=a4(e);return n.addEventListener(yw,t),()=>n.removeEventListener(yw,t)},[t,e]),()=>{const n=a4(e),r=e7(e);n.dispatchEvent(new r.CustomEvent(yw))}}var _ve=be(Fl.div),pi=Ee((e,t)=>{const n=so("Tooltip",e),r=yn(e),i=f1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:y,motionProps:w,...E}=r,P=m??v??h??y;if(P){n.bg=P;const V=FQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=wve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(be.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const R=!!l,O=k.getTooltipProps({},t),N=R?Sve(O,["role","id"]):O,z=bve(O,["role","id"]);return a?ee(Ln,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(yh,{...g},ae.createElement(be.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(_ve,{variants:xve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&ae.createElement(be.span,{srOnly:!0,...z},l),u&&ae.createElement(be.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(be.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Ln,{children:o})});pi.displayName="Tooltip";var kve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(vB,{environment:a,children:t});return x(Lae,{theme:o,cssVarsRoot:s,children:ee(lN,{colorModeManager:n,options:o.config,children:[i?x(Xfe,{}):x(Kfe,{}),x(Mae,{}),r?x(zB,{zIndex:r,children:l}):l]})})};function Eve({children:e,theme:t=bae,toastOptions:n,...r}){return ee(kve,{theme:t,...r,children:[e,x(yve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:E_(e)?2:P_(e)?3:0}function R0(e,t){return b1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pve(e,t){return b1(e)===2?e.get(t):e[t]}function u$(e,t,n){var r=b1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function c$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function E_(e){return Rve&&e instanceof Map}function P_(e){return Ove&&e instanceof Set}function Ef(e){return e.o||e.t}function T_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=f$(e);delete t[rr];for(var n=O0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Tve),Object.freeze(e),t&&lh(e,function(n,r){return L_(r,!0)},!0)),e}function Tve(){xs(2)}function A_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ll(e){var t=i7[e];return t||xs(18,e),t}function Lve(e,t){i7[e]||(i7[e]=t)}function t7(){return $v}function Sw(e,t){t&&(Ll("Patches"),e.u=[],e.s=[],e.v=t)}function s4(e){n7(e),e.p.forEach(Ave),e.p=null}function n7(e){e===$v&&($v=e.l)}function MA(e){return $v={p:[],l:$v,h:e,m:!0,_:0}}function Ave(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function bw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ll("ES5").S(t,e,r),r?(n[rr].P&&(s4(t),xs(4)),Pu(e)&&(e=l4(t,e),t.l||u4(t,e)),t.u&&Ll("Patches").M(n[rr].t,e,t.u,t.s)):e=l4(t,n,[]),s4(t),t.u&&t.v(t.u,t.s),e!==d$?e:void 0}function l4(e,t,n){if(A_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return IA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return u4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=T_(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return IA(e,r,i,o,a,n)}),u4(e,i,!1),n&&e.u&&Ll("Patches").R(r,n,e.u,e.s)}return r.o}function IA(e,t,n,r,i,o){if(dd(i)){var a=l4(e,i,o&&t&&t.i!==3&&!R0(t.D,r)?o.concat(r):void 0);if(u$(n,r,a),!dd(a))return;e.m=!1}if(Pu(i)&&!A_(i)){if(!e.h.F&&e._<1)return;l4(e,i),t&&t.A.l||u4(e,i)}}function u4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&L_(t,n)}function xw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function RA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function ww(e){e.o||(e.o=T_(e.t))}function r7(e,t,n){var r=E_(t)?Ll("MapSet").N(t,n):P_(t)?Ll("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:t7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Hv;a&&(l=[s],u=gm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Ll("ES5").J(t,n);return(n?n.A:t7()).p.push(r),r}function Mve(e){return dd(e)||xs(22,e),function t(n){if(!Pu(n))return n;var r,i=n[rr],o=b1(n);if(i){if(!i.P&&(i.i<4||!Ll("ES5").K(i)))return i.t;i.I=!0,r=OA(n,o),i.I=!1}else r=OA(n,o);return lh(r,function(a,s){i&&Pve(i.t,a)===s||u$(r,a,t(s))}),o===3?new Set(r):r}(e)}function OA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return T_(e)}function Ive(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[rr];return Hv.get(l,o)},set:function(l){var u=this[rr];Hv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=O0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!R0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!c$(m,g))return!0}}var y=!!a[rr];return l.length!==O0(a).length+(y?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Ll("Patches").$;return dd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),pa=new Dve,h$=pa.produce;pa.produceWithPatches.bind(pa);pa.setAutoFreeze.bind(pa);pa.setUseProxies.bind(pa);pa.applyPatches.bind(pa);pa.createDraft.bind(pa);pa.finishDraft.bind(pa);function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fi(1));return n(I_)(e,t)}if(typeof e!="function")throw new Error(Fi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Fi(3));return o}function g(w){if(typeof w!="function")throw new Error(Fi(4));if(l)throw new Error(Fi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Fi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!zve(w))throw new Error(Fi(7));if(typeof w.type>"u")throw new Error(Fi(8));if(l)throw new Error(Fi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Fi(12));if(typeof n(void 0,{type:c4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fi(13))})}function p$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Fi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function d4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return f4}function i(s,l){r(s)===f4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Wve=function(t,n){return t===n};function Vve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1] * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,y=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ct="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,L1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,A1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,M1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,I1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,R1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,O1=/[()=,{}\[\]\/\s]/,N1=/\\(\\)?/g,D1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,z1=/^[-+]0x[0-9a-f]+$/i,B1=/^0b[01]+$/i,F1=/^\[object .+?Constructor\]$/,$1=/^0o[0-7]+$/i,H1=/^(?:0|[1-9]\d*)$/,W1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,V1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",U1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",U1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ct]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ct]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},G1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,j1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function Y1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function K1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(G1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=cg,Uo.prototype.has=dg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ct||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Fk(c),!Z)return ue?Lg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),pE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):fE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function gg(c,p,b){if(typeof c!="function")throw new Si(a);return Og(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Oi,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:mE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(ig()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Fb(Wk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var kg=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function Eg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?Eg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?Eg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Pg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Mg(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(I1,`{ + */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",g=1,m=2,v=4,y=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,O=64,N=128,z=256,V=512,$=30,j="...",le=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Re=me-1,xe=me>>>1,Se=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",R],["partialRight",O],["rearg",z]],Me="[object Arguments]",_e="[object Array]",Je="[object AsyncFunction]",Xe="[object Boolean]",dt="[object Date]",_t="[object DOMException]",pt="[object Error]",ct="[object Function]",mt="[object GeneratorFunction]",Pe="[object Map]",et="[object Number]",Lt="[object Null]",it="[object Object]",St="[object Promise]",Yt="[object Proxy]",wt="[object RegExp]",Gt="[object Set]",ln="[object String]",on="[object Symbol]",Oe="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",un="[object Int16Array]",Bn="[object Int32Array]",He="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Rs=/[&<>"']/g,L1=RegExp(mi.source),Sa=RegExp(Rs.source),Lh=/<%-([\s\S]+?)%>/g,A1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ah=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,M1=RegExp(Ad.source),$u=/^\s+/,Md=/\s/,I1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,R1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,O1=/[()=,{}\[\]\/\s]/,N1=/\\(\\)?/g,D1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,z1=/^[-+]0x[0-9a-f]+$/i,B1=/^0b[01]+$/i,F1=/^\[object .+?Constructor\]$/,$1=/^0o[0-7]+$/i,H1=/^(?:0|[1-9]\d*)$/,W1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,V1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Wl="\\u0300-\\u036f",Vl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Ul=Wl+Vl+Ds,Ih="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",Sn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+Sn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Ul+"]",Id="\\d+",Gl="["+Ih+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Id+Ih+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",jl="(?:"+Qa+"|"+Rd+")",U1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Nd=Rh+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Od,Fs].join("|")+")"+Gu+Nd+")*",Dd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Nd+ba,Nh="(?:"+[Gl,Od,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Od,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Dh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",U1+"+"+Uu+"(?="+[jr,uo+jl,"$"].join("|")+")",uo+"?"+jl+"+"+Vu,uo+"+"+Uu,Yl,Dd,Id,Nh].join("|"),"g"),zd=RegExp("["+$s+Xa+Ul+kr+"]"),zh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bh=-1,cn={};cn[It]=cn[ze]=cn[ot]=cn[un]=cn[Bn]=cn[He]=cn[ft]=cn[tt]=cn[Nt]=!0,cn[Me]=cn[_e]=cn[qt]=cn[Xe]=cn[ke]=cn[dt]=cn[pt]=cn[ct]=cn[Pe]=cn[et]=cn[it]=cn[wt]=cn[Gt]=cn[ln]=cn[Ze]=!1;var Wt={};Wt[Me]=Wt[_e]=Wt[qt]=Wt[ke]=Wt[Xe]=Wt[dt]=Wt[It]=Wt[ze]=Wt[ot]=Wt[un]=Wt[Bn]=Wt[Pe]=Wt[et]=Wt[it]=Wt[wt]=Wt[Gt]=Wt[ln]=Wt[on]=Wt[He]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[pt]=Wt[ct]=Wt[Ze]=!1;var Fh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},G1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,je=parseInt,zt=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,hn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||hn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,pn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=pn&&pn.isArrayBuffer,co=pn&&pn.isDate,Ui=pn&&pn.isMap,xa=pn&&pn.isRegExp,Hs=pn&&pn.isSet,j1=pn&&pn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function Y1(re,ye,ge,Ue){for(var Et=-1,Jt=re==null?0:re.length;++Et-1}function $h(re,ye,ge){for(var Ue=-1,Et=re==null?0:re.length;++Ue-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function K1(re,ye){for(var ge=re.length,Ue=0;ge--;)re[ge]===ye&&++Ue;return Ue}var E2=Wd(Fh),es=Wd(G1);function Vs(re){return"\\"+te[re]}function Wh(re,ye){return re==null?n:re[ye]}function Kl(re){return zd.test(re)}function Vh(re){return zh.test(re)}function P2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Uh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ue,Et){ge[++ye]=[Et,Ue]}),ge}function Gh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ue=re.length,Et=0,Jt=[];++ge-1}function j2(c,p){var b=this.__data__,A=Pr(b,c);return A<0?(++this.size,b.push([c,p])):b[A][1]=p,this}Uo.prototype.clear=U2,Uo.prototype.delete=G2,Uo.prototype.get=cg,Uo.prototype.has=dg,Uo.prototype.set=j2;function Go(c){var p=-1,b=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,b,A,D,F){var Y,Z=p&g,ue=p&m,we=p&v;if(b&&(Y=D?b(c,A,D,F):b(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Ot(c);if(Ce){if(Y=_U(c),!Z)return _i(c,Y)}else{var Le=ui(c),Ve=Le==ct||Le==mt;if(_c(c))return el(c,Z);if(Le==it||Le==Me||Ve&&!D){if(Y=ue||Ve?{}:Fk(c),!Z)return ue?Lg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Le])return D?c:{};Y=kU(c,Le,Z)}}F||(F=new yr);var st=F.get(c);if(st)return st;F.set(c,Y),pE(c)?c.forEach(function(xt){Y.add(ai(xt,p,b,xt,c,F))}):fE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,b,jt,c,F))});var bt=we?ue?pe:Xo:ue?bo:ci,$t=Ce?n:bt(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,b,jt,c,F))}),Y}function Jh(c){var p=ci(c);return function(b){return ep(b,c,p)}}function ep(c,p,b){var A=b.length;if(c==null)return!A;for(c=dn(c);A--;){var D=b[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function gg(c,p,b){if(typeof c!="function")throw new Si(a);return Og(function(){c.apply(n,b)},p)}function gc(c,p,b,A){var D=-1,F=Ri,Y=!0,Z=c.length,ue=[],we=p.length;if(!Z)return ue;b&&(p=$n(p,Er(b))),A?(F=$h,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new ka(p));e:for(;++DD?0:D+b),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=b>A?0:mE(A);b0&&b(Z)?p>1?Tr(Z,p-1,b,A,D):wa(D,Z):A||(D[D.length]=Z)}return D}var np=tl(),go=tl(!0);function Ko(c,p){return c&&np(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function rp(c,p){return ho(p,function(b){return iu(c[b])})}function Ys(c,p){p=Js(p,c);for(var b=0,A=p.length;c!=null&&bp}function op(c,p){return c!=null&&tn.call(c,p)}function ap(c,p){return c!=null&&p in dn(c)}function sp(c,p,b){return c>=Kr(p,b)&&c=120&&Ce.length>=120)?new ka(Y&&Ce):n}Ce=c[0];var Le=-1,Ve=Z[0];e:for(;++Le-1;)Z!==c&&Xd.call(Z,ue,1),Xd.call(c,ue,1);return c}function af(c,p){for(var b=c?p.length:0,A=b-1;b--;){var D=p[b];if(b==A||D!==F){var F=D;ru(D)?Xd.call(c,D,1):vp(c,D)}}return c}function sf(c,p){return c+Zl(ig()*(p-c+1))}function Zs(c,p,b,A){for(var D=-1,F=vr(Jd((p-c)/(b||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=b;return Y}function xc(c,p){var b="";if(!c||p<1||p>G)return b;do p%2&&(b+=c),p=Zl(p/2),p&&(c+=c);while(p);return b}function kt(c,p){return Fb(Wk(c,p,xo),c+"")}function fp(c){return hc(_p(c))}function lf(c,p){var b=_p(c);return ey(b,Jl(p,0,b.length))}function tu(c,p,b,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),b=b>D?D:b,b<0&&(b+=D),D=p>b?0:b-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(b?Y<=p:Y=i){var we=p?null:H(c);if(we)return jd(we);Y=!1,D=Qu,ue=new ka}else ue=p?[]:Z;e:for(;++A=A?c:Ar(c,p,b)}var kg=I2||function(c){return vt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var b=c.length,A=rc?rc(b):new c.constructor(b);return c.copy(A),A}function Eg(c){var p=new c.constructor(c.byteLength);return new bi(p).set(new bi(c)),p}function nu(c,p){var b=p?Eg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function X2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return tf?dn(tf.call(c)):{}}function Z2(c,p){var b=p?Eg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function Pg(c,p){if(c!==p){var b=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,ue=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&ue&&!Z&&!we||A&&Y&&ue||!b&&ue||!D)return 1;if(!A&&!F&&!we&&c=Z)return ue;var we=b[A];return ue*(we=="desc"?-1:1)}}return c.index-p.index}function Q2(c,p,b,A){for(var D=-1,F=c.length,Y=b.length,Z=-1,ue=p.length,we=vr(F-Y,0),Ce=ge(ue+we),Le=!A;++Z1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),p=dn(p);++A-1?D[F?p[Y]:Y]:n}}function Mg(c){return nr(function(p){var b=p.length,A=b,D=ji.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new Si(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new ji([],!0)}for(A=Y?A:b;++A1&&en.reverse(),Ce&&ueZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Le=-1,Ve=!0,st=b&w?new ka:n;for(F.set(c,p),F.set(p,c);++Le1?"& ":"")+p[A],p=p.join(b>2?", ":" "),c.replace(I1,`{ /* [wrapped with `+p+`] */ -`)}function PU(c){return Ot(c)||mf(c)||!!(ng&&c&&c[ng])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&H1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,eE(c,b)});function tE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return tE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=gE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=qk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[$b],thisArg:n}),new ji(p,this.__chain__)}return this.thru($b)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:mg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Ag(Kk),ZG=Ag(Xk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function nE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function rE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Mb:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function iE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function oE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Wb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Wb));A|=R}return fe(c,A,p,b,D)}),aE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(aE));A|=R}return fe(p,A,c,b,D)});function sE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=lE.placeholder,A}function uE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Og(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,TE=p-us;return Le?Kr(TE,F-au):TE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Og(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&kg(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return kg(Z),Z=Og(jt,p),st(ue)}return Z===n&&(Z=Og(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return gg(c,1,p)}),yj=kt(function(c,p,b){return gg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return oE(2,c)}var xj=Ob(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!tg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):yg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||ex,Bj=co?Er(co):Sg;function Fj(c){return xr(c)&&c.nodeType===1&&!Ng(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Rg(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Ub(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Ng(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ct||p==mt||p==Je||p==Yt}function dE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var fE=Ui?Er(Ui):Rb;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return hE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function hE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Ng(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Gb=xa?Er(xa):ar;function Xj(c){return dE(c)&&c>=-G&&c<=G}var pE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=j1?Er(j1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function gE(c){if(!c)return[];if(So(c))return sy(c)?Ni(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function mE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=B1.test(c);return b||$1.test(c)?Ye(c.slice(2),b?2:8):z1.test(c)?ce:+c}function vE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Rg(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),yE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return bE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:wg(c,p)});function bE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=ig();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?CE(p):p)});function CE(c){return qb(xn(c).toLowerCase())}function _E(c){return c=xn(c),c&&c.replace(W1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&M1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Gb(p))&&(p=qi(p),!p&&Kl(c))?as(Ni(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+qb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?D1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` +`)}function PU(c){return Ot(c)||mf(c)||!!(ng&&c&&c[ng])}function ru(c,p){var b=typeof c;return p=p??G,!!p&&(b=="number"||b!="symbol"&&H1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=le)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ey(c,p){var b=-1,A=c.length,D=A-1;for(p=p===n?A:p;++b1?c[p-1]:n;return b=typeof b=="function"?(c.pop(),b):n,eE(c,b)});function tE(c){var p=B(c);return p.__chain__=!0,p}function BG(c,p){return p(c),c}function ty(c,p){return p(c)}var FG=nr(function(c){var p=c.length,b=p?c[0]:0,A=this.__wrapped__,D=function(F){return Qh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!ru(b)?this.thru(D):(A=A.slice(b,+b+(p?1:0)),A.__actions__.push({func:ty,args:[D],thisArg:n}),new ji(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function $G(){return tE(this)}function HG(){return new ji(this.value(),this.__chain__)}function WG(){this.__values__===n&&(this.__values__=gE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function VG(){return this}function UG(c){for(var p,b=this;b instanceof nf;){var A=qk(b);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;b=b.__wrapped__}return D.__wrapped__=c,p}function GG(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:ty,args:[$b],thisArg:n}),new ji(p,this.__chain__)}return this.thru($b)}function jG(){return Qs(this.__wrapped__,this.__actions__)}var YG=Sp(function(c,p,b){tn.call(c,b)?++c[b]:jo(c,b,1)});function qG(c,p,b){var A=Ot(c)?Fn:mg;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}function KG(c,p){var b=Ot(c)?ho:qo;return b(c,Te(p,3))}var XG=Ag(Kk),ZG=Ag(Xk);function QG(c,p){return Tr(ny(c,p),1)}function JG(c,p){return Tr(ny(c,p),K)}function ej(c,p,b){return b=b===n?1:Dt(b),Tr(ny(c,p),b)}function nE(c,p){var b=Ot(c)?Gn:rs;return b(c,Te(p,3))}function rE(c,p){var b=Ot(c)?fo:tp;return b(c,Te(p,3))}var tj=Sp(function(c,p,b){tn.call(c,b)?c[b].push(p):jo(c,b,[p])});function nj(c,p,b,A){c=So(c)?c:_p(c),b=b&&!A?Dt(b):0;var D=c.length;return b<0&&(b=vr(D+b,0)),sy(c)?b<=D&&c.indexOf(p,b)>-1:!!D&&Xu(c,p,b)>-1}var rj=kt(function(c,p,b){var A=-1,D=typeof p=="function",F=So(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,b):is(Y,p,b)}),F}),ij=Sp(function(c,p,b){jo(c,b,p)});function ny(c,p){var b=Ot(c)?$n:br;return b(c,Te(p,3))}function oj(c,p,b,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),b=A?n:b,Ot(b)||(b=b==null?[]:[b]),wi(c,p,b))}var aj=Sp(function(c,p,b){c[b?0:1].push(p)},function(){return[[],[]]});function sj(c,p,b){var A=Ot(c)?Fd:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,rs)}function lj(c,p,b){var A=Ot(c)?w2:Hh,D=arguments.length<3;return A(c,Te(p,4),b,D,tp)}function uj(c,p){var b=Ot(c)?ho:qo;return b(c,oy(Te(p,3)))}function cj(c){var p=Ot(c)?hc:fp;return p(c)}function dj(c,p,b){(b?Xi(c,p,b):p===n)?p=1:p=Dt(p);var A=Ot(c)?oi:lf;return A(c,p)}function fj(c){var p=Ot(c)?Mb:li;return p(c)}function hj(c){if(c==null)return 0;if(So(c))return sy(c)?Ca(c):c.length;var p=ui(c);return p==Pe||p==Gt?c.size:Lr(c).length}function pj(c,p,b){var A=Ot(c)?qu:vo;return b&&Xi(c,p,b)&&(p=n),A(c,Te(p,3))}var gj=kt(function(c,p){if(c==null)return[];var b=p.length;return b>1&&Xi(c,p[0],p[1])?p=[]:b>2&&Xi(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ry=R2||function(){return vt.Date.now()};function mj(c,p){if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function iE(c,p,b){return p=b?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function oE(c,p){var b;if(typeof p!="function")throw new Si(a);return c=Dt(c),function(){return--c>0&&(b=p.apply(this,arguments)),c<=1&&(p=n),b}}var Wb=kt(function(c,p,b){var A=E;if(b.length){var D=Vo(b,We(Wb));A|=R}return fe(c,A,p,b,D)}),aE=kt(function(c,p,b){var A=E|P;if(b.length){var D=Vo(b,We(aE));A|=R}return fe(p,A,c,b,D)});function sE(c,p,b){p=b?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=sE.placeholder,A}function lE(c,p,b){p=b?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=lE.placeholder,A}function uE(c,p,b){var A,D,F,Y,Z,ue,we=0,Ce=!1,Le=!1,Ve=!0;if(typeof c!="function")throw new Si(a);p=Ta(p)||0,lr(b)&&(Ce=!!b.leading,Le="maxWait"in b,F=Le?vr(Ta(b.maxWait)||0,p):F,Ve="trailing"in b?!!b.trailing:Ve);function st(Ir){var us=A,au=D;return A=D=n,we=Ir,Y=c.apply(au,us),Y}function bt(Ir){return we=Ir,Z=Og(jt,p),Ce?st(Ir):Y}function $t(Ir){var us=Ir-ue,au=Ir-we,TE=p-us;return Le?Kr(TE,F-au):TE}function xt(Ir){var us=Ir-ue,au=Ir-we;return ue===n||us>=p||us<0||Le&&au>=F}function jt(){var Ir=ry();if(xt(Ir))return en(Ir);Z=Og(jt,$t(Ir))}function en(Ir){return Z=n,Ve&&A?st(Ir):(A=D=n,Y)}function Qo(){Z!==n&&kg(Z),we=0,A=ue=D=Z=n}function Zi(){return Z===n?Y:en(ry())}function Jo(){var Ir=ry(),us=xt(Ir);if(A=arguments,D=this,ue=Ir,us){if(Z===n)return bt(ue);if(Le)return kg(Z),Z=Og(jt,p),st(ue)}return Z===n&&(Z=Og(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Zi,Jo}var vj=kt(function(c,p){return gg(c,1,p)}),yj=kt(function(c,p,b){return gg(c,Ta(p)||0,b)});function Sj(c){return fe(c,V)}function iy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new Si(a);var b=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(iy.Cache||Go),b}iy.Cache=Go;function oy(c){if(typeof c!="function")throw new Si(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function bj(c){return oE(2,c)}var xj=Ob(function(c,p){p=p.length==1&&Ot(p[0])?$n(p[0],Er(Te())):$n(Tr(p,1),Er(Te()));var b=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,b);++D=p}),mf=up(function(){return arguments}())?up:function(c){return xr(c)&&tn.call(c,"callee")&&!tg.call(c,"callee")},Ot=ge.isArray,Dj=Yr?Er(Yr):yg;function So(c){return c!=null&&ay(c.length)&&!iu(c)}function Mr(c){return xr(c)&&So(c)}function zj(c){return c===!0||c===!1||xr(c)&&si(c)==Xe}var _c=O2||ex,Bj=co?Er(co):Sg;function Fj(c){return xr(c)&&c.nodeType===1&&!Ng(c)}function $j(c){if(c==null)return!0;if(So(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||Cp(c)||mf(c)))return!c.length;var p=ui(c);if(p==Pe||p==Gt)return!c.size;if(Rg(c))return!Lr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function Hj(c,p){return vc(c,p)}function Wj(c,p,b){b=typeof b=="function"?b:n;var A=b?b(c,p):n;return A===n?vc(c,p,n,b):!!A}function Ub(c){if(!xr(c))return!1;var p=si(c);return p==pt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Ng(c)}function Vj(c){return typeof c=="number"&&qh(c)}function iu(c){if(!lr(c))return!1;var p=si(c);return p==ct||p==mt||p==Je||p==Yt}function dE(c){return typeof c=="number"&&c==Dt(c)}function ay(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var fE=Ui?Er(Ui):Rb;function Uj(c,p){return c===p||yc(c,p,Pt(p))}function Gj(c,p,b){return b=typeof b=="function"?b:n,yc(c,p,Pt(p),b)}function jj(c){return hE(c)&&c!=+c}function Yj(c){if(AU(c))throw new Et(o);return cp(c)}function qj(c){return c===null}function Kj(c){return c==null}function hE(c){return typeof c=="number"||xr(c)&&si(c)==et}function Ng(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var b=tn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&or.call(b)==ii}var Gb=xa?Er(xa):ar;function Xj(c){return dE(c)&&c>=-G&&c<=G}var pE=Hs?Er(Hs):Bt;function sy(c){return typeof c=="string"||!Ot(c)&&xr(c)&&si(c)==ln}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==on}var Cp=j1?Er(j1):zr;function Zj(c){return c===n}function Qj(c){return xr(c)&&ui(c)==Ze}function Jj(c){return xr(c)&&si(c)==Zt}var eY=_(qs),tY=_(function(c,p){return c<=p});function gE(c){if(!c)return[];if(So(c))return sy(c)?Oi(c):_i(c);if(oc&&c[oc])return P2(c[oc]());var p=ui(c),b=p==Pe?Uh:p==Gt?jd:_p;return b(c)}function ou(c){if(!c)return c===0?c:0;if(c=Ta(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=ou(c),b=p%1;return p===p?b?p-b:p:0}function mE(c){return c?Jl(Dt(c),0,me):0}function Ta(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=B1.test(c);return b||$1.test(c)?je(c.slice(2),b?2:8):z1.test(c)?ce:+c}function vE(c){return Ea(c,bo(c))}function nY(c){return c?Jl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":qi(c)}var rY=Ki(function(c,p){if(Rg(p)||So(p)){Ea(p,ci(p),c);return}for(var b in p)tn.call(p,b)&&js(c,b,p[b])}),yE=Ki(function(c,p){Ea(p,bo(p),c)}),ly=Ki(function(c,p,b,A){Ea(p,bo(p),c,A)}),iY=Ki(function(c,p,b,A){Ea(p,ci(p),c,A)}),oY=nr(Qh);function aY(c,p){var b=Ql(c);return p==null?b:Ke(b,p)}var sY=kt(function(c,p){c=dn(c);var b=-1,A=p.length,D=A>2?p[2]:n;for(D&&Xi(p[0],p[1],D)&&(A=1);++b1),F}),Ea(c,pe(c),b),A&&(b=ai(b,g|m|v,At));for(var D=p.length;D--;)vp(b,p[D]);return b});function kY(c,p){return bE(c,oy(Te(p)))}var EY=nr(function(c,p){return c==null?{}:wg(c,p)});function bE(c,p){if(c==null)return{};var b=$n(pe(c),function(A){return[A]});return p=Te(p),dp(c,b,function(A,D){return p(A,D[0])})}function PY(c,p,b){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(b||c%1||p%1){var D=ig();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return sf(c,p)}var BY=nl(function(c,p,b){return p=p.toLowerCase(),c+(b?CE(p):p)});function CE(c){return qb(xn(c).toLowerCase())}function _E(c){return c=xn(c),c&&c.replace(W1,E2).replace(Dh,"")}function FY(c,p,b){c=xn(c),p=qi(p);var A=c.length;b=b===n?A:Jl(Dt(b),0,A);var D=b;return b-=p.length,b>=0&&c.slice(b,D)==p}function $Y(c){return c=xn(c),c&&Sa.test(c)?c.replace(Rs,es):c}function HY(c){return c=xn(c),c&&M1.test(c)?c.replace(Ad,"\\$&"):c}var WY=nl(function(c,p,b){return c+(b?"-":"")+p.toLowerCase()}),VY=nl(function(c,p,b){return c+(b?" ":"")+p.toLowerCase()}),UY=xp("toLowerCase");function GY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Zl(D),b)+c+d(Jd(D),b)}function jY(c,p,b){c=xn(c),p=Dt(p);var A=p?Ca(c):0;return p&&A>>0,b?(c=xn(c),c&&(typeof p=="string"||p!=null&&!Gb(p))&&(p=qi(p),!p&&Kl(c))?as(Oi(c),0,b):c.split(p,b)):[]}var JY=nl(function(c,p,b){return c+(b?" ":"")+qb(p)});function eq(c,p,b){return c=xn(c),b=b==null?0:Jl(Dt(b),0,c.length),p=qi(p),c.slice(b,b+p.length)==p}function tq(c,p,b){var A=B.templateSettings;b&&Xi(c,p,b)&&(p=n),c=xn(c),p=ly({},p,A,De);var D=ly({},p.imports,A.imports,De),F=ci(D),Y=Gd(D,F),Z,ue,we=0,Ce=p.interpolate||Ns,Le="__p += '",Ve=qd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?D1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),st="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bh+"]")+` `;c.replace(Ve,function(xt,jt,en,Qo,Zi,Jo){return en||(en=Qo),Le+=c.slice(we,Jo).replace(V1,Vs),jt&&(Z=!0,Le+=`' + __e(`+jt+`) + '`),Zi&&(ue=!0,Le+=`'; @@ -473,7 +473,7 @@ __p += '`),en&&(Le+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Le+`return __p -}`;var $t=EE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Ub($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,Z1(c)+1);if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Gb(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&L1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),qb=xp("toUpperCase");function kE(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):q1(c):c.match(p)||[]}var EE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Ub(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Wb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,D$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&D$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},z$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?D$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),B$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=B$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),F$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=F$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),W_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=W_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=W_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),$$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),H$=Be((e,t)=>{var n=eb(),r=$$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),W$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=H$(),r=Xye(),i=$$(),o=W$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(y){if(!i(y)||r(y))return!1;var w=n(y)?m:s;return w.test(o(y))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),V_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=V_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),V$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=V_(),i=V$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=V$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),U$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var y=h&o,w=l.length,E=u.length;if(w!=E&&!(y&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=W_(),r=y3e(),i=B$(),o=U$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",y="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case y:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=U_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),G$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=j$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",y="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[y]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=F$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),Y$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=U_(),o=G$(),a=M3e(),s=Y$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),y=!v&&r(g),w=!v&&!y&&o(g),E=!v&&!y&&!w&&s(g),P=v||y||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=H$(),r=j$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,y=n(s),w=y.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=y[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=V_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=W$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",y="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=y||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return y;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=U$(),i=x3e(),o=V3e(),a=q3e(),s=U_(),l=G$(),u=Y$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",y=Object.prototype,w=y.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),q$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Tw(e,t=","){return typeof e=="string"?e.split(t):e}function Km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return K$(e,["input","textarea","select"])}function K$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:y}=e,w=y.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=z$(q$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var ZA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!K$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){ZA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Tw(e,u?.splitKey).forEach(E=>{let P=Km(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){ZA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},y=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",y),(i.current||document).addEventListener("keydown",v),g&&Tw(e,u?.splitKey).forEach(w=>g.addHotkey(Km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",y),(i.current||document).removeEventListener("keydown",v),g&&Tw(e,u?.splitKey).forEach(w=>g.removeHotkey(Km(w,u?.combinationKey)))}},[e,l,u,h]),i}z$(q$());var s7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>s7.add(Km(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Km(t);for(let r of s7)r.keys?.every(i=>n.keys?.includes(i))&&s7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Wi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Wi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},QA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:y,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(QA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(QA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...y,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(g_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(m_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(y_,{...P,className:"invokeai__number-input-stepper-button"}),x(v_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(FF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],G_=0,j_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ut(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ut(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=je(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(k_,{className:"invokeai__switch-root",...s})]})})};function X$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Hke(i.target.checked))})}function P5e(){const e=je(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var Z$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},JA=ae.createContext&&ae.createContext(Z$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:y=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(y?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(dB,{w:"100%",gap:2,children:[ee(__,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(ZC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(ZC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(XF,{className:"invokeai__slider_track",...j,children:x(ZF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(KF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(g_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(m_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(IF,{...ne,children:[x(y_,{className:"invokeai__slider-number-stepper"}),x(v_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(q_,{}),onClick:Se,isDisabled:M,...K})]})]})}function J$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=je();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(z7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(z7(.5))}})}const N5e=()=>{const e=je(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=je(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},eH=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Fke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=je(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:G_,max:j_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const tH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=je(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(tH(G_,j_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=je(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=je(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const K_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ut(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ut(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),X_=()=>{const e=je(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(B7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(F7(a)),value:n,isInteger:!1})]})};function nH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=je();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n($ke(i.target.checked))})}function Z_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=je();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Nke(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(V8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=je(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!(H_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=je();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Vke(i)),isInteger:!1})}const Q_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=je(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ut(e=>e.options,e=>Cb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ut(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const J_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ut([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=je(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Rke(r)),value:t,width:ek,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=je();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=je(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=je();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const ek="auto";function tk(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},rH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Lw,setIsConnected:eM,setSocketId:_Te,setShouldConfirmOnDelete:iH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:tM,errorSeen:oH,setModelList:nM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:mm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=rH.actions,h4e=rH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ut(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(S_,{trigger:"hover",children:[x(w_,{children:x(vh,{children:e})}),ee(x_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(b_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const nk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=je();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function rM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function fH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ok(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ak=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,hH=e=>e.canvas.layerState.objects.find(g4),pH=ut([e=>e.options,e=>e.system,hH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(H_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),l7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),u7=ti("socketio/requestImages"),iM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),gH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function mH(e){const{iconButton:t=!1,...n}=e,r=je(),{isReady:i}=Ae(pH),o=Ae(_r),a=()=>{r(l7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(l7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vH(e){const{...t}=e,n=je(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ut(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=je(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(zke(!t))}})},sk=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(mH,{}),e==="img2img"&&x(fSe,{}),x(vH,{})]})},hSe=ut([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),lk=()=>{const e=je(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(pH),i=C.exports.useRef(null),o=s=>{e(_b(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(l7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(o$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function SH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function oM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=oM(e.className,t):e.setAttribute("class",oM(e.className&&e.className.baseVal||"",t))}const aM={disabled:!1},bH=ae.createContext(null);var xH=function(t){return t.scrollTop},vm="unmounted",Pf="exited",Tf="entering",Hp="entered",c7="exiting",Ou=function(e){i_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=vm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===vm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=c7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&xH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:vm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||aM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||aM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:c7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=t_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(bH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=bH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=vm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=c7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Aw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},uk=function(e){i_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Qg=.95,sM=30,d7=10,lM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),ym={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:ym,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},CH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ak(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...ym,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Qg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=lM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...ym.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=ym,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Qg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=lM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Qg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Qg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Qg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...ym.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:_H,addPointToCurrentLine:kH,clearCanvasHistory:EH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:kTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:PH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:ck,resizeCanvas:OSe,setBoundingBoxCoordinates:Mw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:ETe,setBoundingBoxScaleMethod:NSe,setBrushColor:Iw,setBrushSize:Rw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ob,setInpaintReplace:uM,setIsDrawing:ab,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:PTe,setIsMoveStageKeyHeld:TTe,setIsMovingBoundingBox:cM,setIsMovingStage:m4,setIsTransformingBoundingBox:Ow,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:LTe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:ATe,setShouldShowBrushPreview:MTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:ITe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:dM,setShouldSnapToGrid:fM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:RTe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:OTe,toggleTool:NTe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=CH.actions,QSe=CH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ut(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dk=e=>{const t=je(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Oke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Dke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Bke(!i)),t(Li(!0))};return C.exports.useEffect(()=>{function v(y){o.current&&!o.current.contains(y.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(wH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(yH,{}):x(SH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(Y_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(X_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(nk,{accordionInfo:e})]})}const fk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(fk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(ik,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ut(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Rv(),a=je(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=y=>{y.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=y=>a(iH(!y.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(LF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Bv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(k_,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(S_,{...o,children:[x(w_,{children:t}),ee(x_,{className:`invokeai__popover-content ${r}`,children:[i&&x(b_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ut([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=je(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=p2(),v=()=>{!u||(h&&e(pd(!1)),e(P1(u)),e(ko("img2img")))},y=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Ake(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(_b(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(ob(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(rM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(rM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:y,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(cH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Y_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(X_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(uH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(f7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Nw,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:hk,selectPrevImage:pk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Jg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=je();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:y,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(B7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(F7(M))}),y&&x(On,{label:"Prompt",labelPosition:"top",value:J3(y),onClick:()=>n(_b(y))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(P1(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(z7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(B7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(F7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(aB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ut([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=je(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ut([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(fk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(ik,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=je(),n=p2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],vM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(vM):o.className+=vM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Dw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Dw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Dw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,y=l||0,w=u||0;if(s){var E=(m-y)*this.ratio+w,P=(v-y)*this.ratio+w,k=(h-w)/this.ratio+y,T=(g-w)/this.ratio+y,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,y=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=mM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=mM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=gM(M,this.props.grid[0]),z=gM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(y&&typeof y=="string"){if(y.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(y.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(y.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function g2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...y}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>y,Object.values(y));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,y=C.exports.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(h7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(h7,An({},r,{ref:t}),n)});Wv.displayName="Slot";const h7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});h7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=g2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:y,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,y)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(y,P.collectionRef);return ae.createElement(Wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,y)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(y,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Wv,{[h]:"",ref:T},E)});function m(v){const y=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=y.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const p7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let yM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,y]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(yM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),SM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),SM())},[g,h]),C.exports.useEffect(()=>{const z=()=>y({});return document.addEventListener(p7,z),()=>document.removeEventListener(p7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SM(){const e=new CustomEvent(p7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let zw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:bM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:bM()),zw++,()=>{zw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),zw--}},[])}function bM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Bw="focusScope.autoFocusOnMount",Fw="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){CM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Bw,xM);s.addEventListener(Bw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(Bw,u),setTimeout(()=>{const P=new CustomEvent(Fw,xM);s.addEventListener(Fw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Fw,h),CM.remove(v)},0)}}},[s,u,h,v]);const y=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=wM(t,e),r=wM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const CM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=e6["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function sb(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function gk(e){return e==="y"?"height":"width"}function kM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=gk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(sb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=kM(l,r,s),g=r,m={},v=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=sb(a),v=gk(g),y=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-y[v]-u[E],z=M/2-y[v]/2+R,V=g7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=sb(e),i=_1(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function PM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[PM(e),t,PM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...y}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,y),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function TM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=TM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=TM(o,i.floating);return{data:{escapedOffsets:a,escaped:LM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=sb(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],y=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=g7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=y+h[E],T=y-h[P];y=g7(k,y,T)}const w=s.fn({...t,[g]:v,[m]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],y=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);yz&&(y=z)}return{[g]:v,[m]:y}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function m2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function mk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lb(e){const{overflow:t,overflowX:n,overflowY:r}=m2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=m2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const AM=Math.min,Xm=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,y=s.width/l,w=s.height/u;return{width:y,height:w,top:v,right:m+y,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ub(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+ub(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||lb(i))&&(a=ub(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(mk(e)?e.host:null)||_d(e)}function MM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(mk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function m7(e){const t=Nu(e);let n=MM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=MM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function IM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||lb(o))&&(a=ub(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=ub(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Xm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return m2(i||n).direction==="rtl"&&(s+=Xm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&lb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],lb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&mk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function RM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(m2(e).position)&&Dl(e)?m7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=RM(t,h,i);return u.top=Xm(g.top,u.top),u.right=AM(g.right,u.right),u.bottom=AM(g.bottom,u.bottom),u.left=Xm(g.left,u.left),u},RM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:IM,getOffsetParent:m7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,m7(n),r),floating:{...IM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>m2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&y();function y(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(y)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var v7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function y7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!y7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!y7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return v7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);y7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{y.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);v7(()=>{y.current&&v()},[v]);const y=C.exports.useRef(!1);v7(()=>(y.current=!0,()=>{y.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?EM({element:t.current,padding:n}).fn(i):{}:t?EM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[vk,iW]=g2(rW),[Dxe,oW]=vk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,DTe]=vk(w4),[Hxe,Wxe]=vk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:y=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:y}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ct=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ct,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[y,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return y==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):y==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):y==="right"?(T=`${-v}px`,M=g?E:`${k}px`):y==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const $w="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},yk="RovingFocusGroup",[S7,lW,twe]=UH(yk),[nwe,uW]=g2(yk,[twe]),[rwe,iwe]=nwe(yk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(S7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(S7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[y=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener($w,k),()=>N.removeEventListener($w,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:y,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent($w,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===y),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(S7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],cb="Menu",[b7,ywe,Swe]=UH(cb),[wh,fW]=g2(cb,[Swe,iW,uW]),Sk=iW(),hW=uW(),[bwe,db]=wh(cb),[xwe,bk]=wh(cb),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=Sk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Sk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[zTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=db(id,e.__scopeMenu),a=bk(id,e.__scopeMenu);return C.exports.createElement(b7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(b7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=db(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return $B(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=db(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...y}=e,w=db(id,n),E=bk(id,n),P=Sk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?EF:C.exports.Fragment,ne=v?{as:Wv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,y,{ref:N,style:{outline:"none",...y.style},onKeyDown:Kn(y.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,w7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),x7="MenuItem",OM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=bk(x7,e.__scopeMenu),s=pW(x7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(OM,{bubbles:!0,cancelable:!0});g.addEventListener(OM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(x7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const y=l.current;if(y){var w;v(((w=y.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(b7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,w7(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,w7(y=>a.onItemLeave(y))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function w7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,BTe]=g2(mW,[fW]),fb=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=fb(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=fb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=fb(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=fb(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ut([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:y,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:y,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ut([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=e=>e.gallery,o6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,a6e=C.exports.memo(e=>{const t=je(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[y,w]=C.exports.useState(!1),E=p2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(_b(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(P1(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(ob(l)),t(ck()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Mke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Lke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:j=>{t(DH(j))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",draggable:!0,onDragStart:j=>{j.dataTransfer.setData("invokeai/imageUuid",m),j.dataTransfer.effectAllowed="move"},children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:rk,className:"hoverable-image-check"})}),y&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(f7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:j=>{j.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(f7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},o6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(Kz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,NM=40,s6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},DM=400;function yW(){const e=je(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:y,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:DM,galleryMaxWidth:DM}:s6e[u],[R,O]=C.exports.useState(y>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{y>=o3&&O(!1)},[y]);const Q=()=>{e(lbe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>i&&e(Li(!0)),400)},[e,i]),G=()=>{e(u7(n))},X=xe=>{e(Jg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(pk())},{enabled:!E},[E]),lt("right",()=>{e(hk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Jg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Jg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(wH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:y,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(y)+_e.width,T,Number(M)):Number(y)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(y)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-NM&&e(Jg(Je-NM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ok,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Jg(64)),icon:x(q_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(yH,{}):x(SH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(a6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(aH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:y+"px",height:"100%"}})]})})}const l6e=ut(i6e,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),u6e=()=>{const{resultImages:e,userImages:t}=Ae(l6e);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},c6e=ut([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),xk=e=>{const t=je(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ae(c6e),u=u6e(),h=()=>{t(Wke(!a)),t(Li(!0))},g=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),y=u(v);!y||(o==="img2img"?t(P1(y)):o==="unifiedCanvas"&&t(ob(y)))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",onDrop:g,children:[r,l&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":a,onClick:h,children:x(wbe,{})})})]}),!s&&x(yW,{})]})})};function d6e(){return x(xk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function f6e(){const e={seed:{header:"Seed",feature:Wi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})},face_restore:{header:"Face Restoration",feature:Wi.FACE_CORRECTION,content:x(Y_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Wi.UPSCALE,content:x(X_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Wi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(nk,{accordionInfo:e})]})}const h6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function p6e(){return x(xk,{optionsPanel:x(f6e,{}),children:x(h6e,{})})}var C7=function(e,t){return C7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},C7(e,t)};function g6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");C7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=M6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var y=s+h*v,w=l+g*v,E=u+m*v;o(y,w,E)})}}function M6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function I6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var R6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},wk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=I6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=R6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=wk(e,t);return e.bounds=n,n};function hb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=_7(e,s-g,u+g,r),y=_7(t,l-m,h+m,r);return{x:v,y}}var _7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function pb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=hb(g,m,i,o,0,0,null);return v}function v2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var BM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=gb(o,n);return!l},FM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},O6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},N6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function D6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,y=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=pb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function z6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,y=!m||!v;if(!(!a||y||!s)){var w=hb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var B6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},F6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},$6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function H6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function $M(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:_7(e,o,a,i)}function W6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function V6e(e,t){var n=F6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=W6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,y=l-i,w=h*h+g*g,E=Math.sqrt(w)/y;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function U6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=$6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,y=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=y.sizeX,R=y.sizeY,O=y.velocityAlignmentTime,N=O,z=H6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[y.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ct=$M(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=$M(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ct,mt)})}}function HM(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?N6e(e,t):O6e(e,t)}function WM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=B6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);V6e(e,{x:u,y:h}),z6e(e,u,h,g,m)}}function G6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?U6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,y=n||i.offsetHeight/2,w=Ck(e,a,v,y);w&&kd(e,w,h,g)}}function Ck(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=v2(za(t,2),o,a,0,!1),u=o1(e,l),h=pb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},j6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),em={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},VM=function(e){var t=Al({},em);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof em[n]<"u";if(i&&r){var o=Object.prototype.toString.call(em[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},em[n]),e[n]):s?t[n]=zM(zM([],em[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=v2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,y=kW(e,t,n),w=Ck(e,y,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=wk(e,a.scale),m=hb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function Y6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=q6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,y=r.offsetWidth/m,w=r.offsetHeight/v,E=v2(n||Math.min(y,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=wk(e,E),O=hb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function q6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function K6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var X6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},Z6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},Q6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},J6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},eCe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},tCe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&K6e(a)&&a&&o.contains(a)){var s=Y6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:X6e(e),zoomOut:Z6e(e),setTransform:Q6e(e),resetTransform:J6e(e),centerView:eCe(e),zoomToElement:tCe(e)}},Hw=!1;function Ww(){try{var e={get passive(){return Hw=!0,!1}};return e}catch{return Hw=!1,Hw}}var gb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},UM=function(e){e&&clearTimeout(e)},nCe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},rCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=gb(u,a);return!g};function iCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=m6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var oCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var y=r?!1:!m,w=v2(za(v,3),u,l,g,y);return w},aCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},sCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=gb(a,i);return!l},lCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},uCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},cCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return v2(za(g,2),a,o,l,!u)},dCe=160,fCe=100,hCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},pCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,y=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=iCe(t,null),P=oCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=y||v===0||h,R=u&&M,O=pb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},gCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;UM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},fCe);var o=aCe(e,t);o&&(UM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},dCe))},mCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},vCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=uCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=cCe(e,m);if(v!==i){var y=o1(e,v),w=u||h===0||s,E=a&&w,P=pb(e,g.x,g.y,v,y,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},yCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function SCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var bCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=gb(l,s);return!(g||!h)},MW=ae.createContext(j6e),xCe=function(e){g6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=VM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=rCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(hCe(n,r),pCe(n,r),gCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),HM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=FM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),WM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(G6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=sCe(n,r);!l||(mCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=lCe(n);!l||(r.preventDefault(),r.stopPropagation(),vCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(yCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),HM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=FM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];WM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=bCe(n,r);!o||SCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=nCe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=VM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),wCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(xCe,{...Al({},e,{setRef:i})})});function CCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var _Ce=`.transform-component-module_wrapper__1_Fgj { +}`;var $t=EE(function(){return Jt(F,st+"return "+Le).apply(n,Y)});if($t.source=Le,Ub($t))throw $t;return $t}function nq(c){return xn(c).toLowerCase()}function rq(c){return xn(c).toUpperCase()}function iq(c,p,b){if(c=xn(c),c&&(b||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Oi(c),D=Oi(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function oq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.slice(0,Z1(c)+1);if(!c||!(p=qi(p)))return c;var A=Oi(c),D=Ja(A,Oi(p))+1;return as(A,0,D).join("")}function aq(c,p,b){if(c=xn(c),c&&(b||p===n))return c.replace($u,"");if(!c||!(p=qi(p)))return c;var A=Oi(c),D=Wo(A,Oi(p));return as(A,D).join("")}function sq(c,p){var b=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;b="length"in p?Dt(p.length):b,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Oi(c);F=Y.length}if(b>=F)return c;var Z=b-Ca(A);if(Z<1)return A;var ue=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return ue+A;if(Y&&(Z+=ue.length-Z),Gb(D)){if(c.slice(Z).search(D)){var we,Ce=ue;for(D.global||(D=qd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Le=we.index;ue=ue.slice(0,Le===n?Z:Le)}}else if(c.indexOf(qi(D),Z)!=Z){var Ve=ue.lastIndexOf(D);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+A}function lq(c){return c=xn(c),c&&L1.test(c)?c.replace(mi,A2):c}var uq=nl(function(c,p,b){return c+(b?" ":"")+p.toUpperCase()}),qb=xp("toUpperCase");function kE(c,p,b){return c=xn(c),p=b?n:p,p===n?Vh(c)?Yd(c):q1(c):c.match(p)||[]}var EE=kt(function(c,p){try{return yi(c,n,p)}catch(b){return Ub(b)?b:new Et(b)}}),cq=nr(function(c,p){return Gn(p,function(b){b=rl(b),jo(c,b,Wb(c[b],c))}),c});function dq(c){var p=c==null?0:c.length,b=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[b(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var b=me,A=Kr(c,me);p=Te(p),c-=me;for(var D=Ud(A,p);++b0||p<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),p!==n&&(p=Dt(p),b=p<0?b.dropRight(-p):b.take(p-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Ko(Ut.prototype,function(c,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,ue=Y instanceof Ut,we=Z[0],Ce=ue||Ot(Y),Le=function(jt){var en=D.apply(B,wa([jt],Z));return A&&Ve?en[0]:en};Ce&&b&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ve=this.__chain__,st=!!this.__actions__.length,bt=F&&!Ve,$t=ue&&!st;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:ty,args:[Le],thisArg:n}),new ji(xt,Ve)}return bt&&$t?c.apply(this,Z):(xt=this.thru(Le),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],D)}return this[b](function(Y){return p.apply(Ot(Y)?Y:[],D)})}}),Ko(Ut.prototype,function(c,p){var b=B[p];if(b){var A=b.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:b})}}),ts[hf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Ni,Ut.prototype.reverse=xi,Ut.prototype.value=F2,B.prototype.at=FG,B.prototype.chain=$G,B.prototype.commit=HG,B.prototype.next=WG,B.prototype.plant=UG,B.prototype.reverse=GG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=jG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=VG),B},_a=po();Vt?((Vt.exports=_a)._=_a,Tt._=_a):vt._=_a}).call(Ss)})(Jr,Jr.exports);const qe=Jr.exports;var Iye=Object.create,D$=Object.defineProperty,Rye=Object.getOwnPropertyDescriptor,Oye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Dye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oye(t))!Dye.call(e,i)&&i!==n&&D$(e,i,{get:()=>t[i],enumerable:!(r=Rye(t,i))||r.enumerable});return e},z$=(e,t,n)=>(n=e!=null?Iye(Nye(e)):{},zye(t||!e||!e.__esModule?D$(n,"default",{value:e,enumerable:!0}):n,e)),Bye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),B$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),QS=Be((e,t)=>{var n=B$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Fye=Be((e,t)=>{var n=QS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),$ye=Be((e,t)=>{var n=QS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Hye=Be((e,t)=>{var n=QS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Wye=Be((e,t)=>{var n=QS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),JS=Be((e,t)=>{var n=Bye(),r=Fye(),i=$ye(),o=Hye(),a=Wye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Uye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Gye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),jye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),F$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Iu=Be((e,t)=>{var n=F$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),W_=Be((e,t)=>{var n=Iu(),r=n.Symbol;t.exports=r}),Yye=Be((e,t)=>{var n=W_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),qye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),eb=Be((e,t)=>{var n=W_(),r=Yye(),i=qye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),$$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),H$=Be((e,t)=>{var n=eb(),r=$$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Kye=Be((e,t)=>{var n=Iu(),r=n["__core-js_shared__"];t.exports=r}),Xye=Be((e,t)=>{var n=Kye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),W$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Zye=Be((e,t)=>{var n=H$(),r=Xye(),i=$$(),o=W$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(y){if(!i(y)||r(y))return!1;var w=n(y)?m:s;return w.test(o(y))}t.exports=v}),Qye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),x1=Be((e,t)=>{var n=Zye(),r=Qye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),V_=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Map");t.exports=i}),tb=Be((e,t)=>{var n=x1(),r=n(Object,"create");t.exports=r}),Jye=Be((e,t)=>{var n=tb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),e3e=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),t3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),n3e=Be((e,t)=>{var n=tb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),r3e=Be((e,t)=>{var n=tb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),i3e=Be((e,t)=>{var n=Jye(),r=e3e(),i=t3e(),o=n3e(),a=r3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=i3e(),r=JS(),i=V_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),a3e=Be((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),nb=Be((e,t)=>{var n=a3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),s3e=Be((e,t)=>{var n=nb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),l3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).get(i)}t.exports=r}),u3e=Be((e,t)=>{var n=nb();function r(i){return n(this,i).has(i)}t.exports=r}),c3e=Be((e,t)=>{var n=nb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),V$=Be((e,t)=>{var n=o3e(),r=s3e(),i=l3e(),o=u3e(),a=c3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=JS(),r=V_(),i=V$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=JS(),r=Vye(),i=Uye(),o=Gye(),a=jye(),s=d3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),h3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),p3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g3e=Be((e,t)=>{var n=V$(),r=h3e(),i=p3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),U$=Be((e,t)=>{var n=g3e(),r=m3e(),i=v3e(),o=1,a=2;function s(l,u,h,g,m,v){var y=h&o,w=l.length,E=u.length;if(w!=E&&!(y&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Iu(),r=n.Uint8Array;t.exports=r}),S3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),b3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),x3e=Be((e,t)=>{var n=W_(),r=y3e(),i=B$(),o=U$(),a=S3e(),s=b3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",y="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function N(z,V,$,j,le,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case y:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,le,W,Q);return Q.delete(z),G;case k:if(O)return O.call(z)==O.call(V)}return!1}t.exports=N}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),C3e=Be((e,t)=>{var n=w3e(),r=U_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),_3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),E3e=Be((e,t)=>{var n=_3e(),r=k3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),P3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),T3e=Be((e,t)=>{var n=eb(),r=rb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),L3e=Be((e,t)=>{var n=T3e(),r=rb(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),A3e=Be((e,t)=>{function n(){return!1}t.exports=n}),G$=Be((e,t)=>{var n=Iu(),r=A3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),M3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),I3e=Be((e,t)=>{var n=eb(),r=j$(),i=rb(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",y="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",le="[object Uint32Array]",W={};W[M]=W[R]=W[O]=W[N]=W[z]=W[V]=W[$]=W[j]=W[le]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[y]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),R3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),O3e=Be((e,t)=>{var n=F$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),Y$=Be((e,t)=>{var n=I3e(),r=R3e(),i=O3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=Be((e,t)=>{var n=P3e(),r=L3e(),i=U_(),o=G$(),a=M3e(),s=Y$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),y=!v&&r(g),w=!v&&!y&&o(g),E=!v&&!y&&!w&&s(g),P=v||y||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),D3e=Be((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),B3e=Be((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),F3e=Be((e,t)=>{var n=D3e(),r=B3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),$3e=Be((e,t)=>{var n=H$(),r=j$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),H3e=Be((e,t)=>{var n=N3e(),r=F3e(),i=$3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),W3e=Be((e,t)=>{var n=C3e(),r=E3e(),i=H3e();function o(a){return n(a,i,r)}t.exports=o}),V3e=Be((e,t)=>{var n=W3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,y=n(s),w=y.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=y[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=x1(),r=Iu(),i=n(r,"DataView");t.exports=i}),G3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Promise");t.exports=i}),j3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"Set");t.exports=i}),Y3e=Be((e,t)=>{var n=x1(),r=Iu(),i=n(r,"WeakMap");t.exports=i}),q3e=Be((e,t)=>{var n=U3e(),r=V_(),i=G3e(),o=j3e(),a=Y3e(),s=eb(),l=W$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",y="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=y||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),N=O==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return y;case E:return u;case P:return g;case k:return m;case T:return v}return O}),t.exports=M}),K3e=Be((e,t)=>{var n=f3e(),r=U$(),i=x3e(),o=V3e(),a=q3e(),s=U_(),l=G$(),u=Y$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",y=Object.prototype,w=y.hasOwnProperty;function E(P,k,T,M,R,O){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,le=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return O||(O=new n),N||u(P)?r(P,k,T,M,R,O):i(P,k,V,T,M,R,O);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=le&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return O||(O=new n),R(J,K,T,M,O)}}return W?(O||(O=new n),o(P,k,T,M,R,O)):!1}t.exports=E}),X3e=Be((e,t)=>{var n=K3e(),r=rb();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),q$=Be((e,t)=>{var n=X3e();function r(i,o){return n(i,o)}t.exports=r}),Z3e=["ctrl","shift","alt","meta","mod"],Q3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Tw(e,t=","){return typeof e=="string"?e.split(t):e}function Km(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Q3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Z3e.includes(o));return{...r,keys:i}}function J3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function e5e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function t5e(e){return K$(e,["input","textarea","select"])}function K$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function n5e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var r5e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:y}=e,w=y.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},i5e=C.exports.createContext(void 0),o5e=()=>C.exports.useContext(i5e),a5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),s5e=()=>C.exports.useContext(a5e),l5e=z$(q$());function u5e(e){let t=C.exports.useRef(void 0);return(0,l5e.default)(t.current,e)||(t.current=e),t.current}var ZA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function lt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=u5e(a),{enabledScopes:h}=s5e(),g=o5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!n5e(h,u?.scopes))return;let m=w=>{if(!(t5e(w)&&!K$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){ZA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Tw(e,u?.splitKey).forEach(E=>{let P=Km(E,u?.combinationKey);if(r5e(w,P,o)||P.keys?.includes("*")){if(J3e(w,P,u?.preventDefault),!e5e(w,P,u?.enabled)){ZA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},y=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",y),(i.current||document).addEventListener("keydown",v),g&&Tw(e,u?.splitKey).forEach(w=>g.addHotkey(Km(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",y),(i.current||document).removeEventListener("keydown",v),g&&Tw(e,u?.splitKey).forEach(w=>g.removeHotkey(Km(w,u?.combinationKey)))}},[e,l,u,h]),i}z$(q$());var s7=new Set;function c5e(e){(Array.isArray(e)?e:[e]).forEach(t=>s7.add(Km(t)))}function d5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Km(t);for(let r of s7)r.keys?.every(i=>n.keys?.includes(i))&&s7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{c5e(e.key)}),document.addEventListener("keyup",e=>{d5e(e.key)})});function f5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const h5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),p5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),g5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),m5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),v5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Hi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Hi||{});const y5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},QA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:y,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(QA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=z=>{R(z),z.match(QA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=qe.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);R(String(V)),h(V)};return x(pi,{...k,children:ee(bd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...y,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(g_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:N,width:a,...T,children:[x(m_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(y_,{...P,className:"invokeai__number-input-stepper-button"}),x(v_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(bd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(FF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},S5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],x5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w5e=[{key:"2x",value:2},{key:"4x",value:4}],G_=0,j_=4294967295,C5e=["gfpgan","codeformer"],_5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],k5e=ut(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),E5e=ut(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=Ye(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ae(k5e),{isGFPGANAvailable:i}=Ae(E5e),o=l=>e(i5(l)),a=l=>e(MV(l)),s=l=>e(o5(l.target.value));return ee(rn,{direction:"column",gap:2,children:[x(Ol,{label:"Type",validValues:C5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ts=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(bd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(k_,{className:"invokeai__switch-root",...s})]})})};function X$(){const e=Ae(i=>i.system.isGFPGANAvailable),t=Ae(i=>i.options.shouldRunFacetool),n=Ye();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n(Hke(i.target.checked))})}function P5e(){const e=Ye(),t=Ae(r=>r.options.shouldFitToWidthHeight);return x(Ts,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e($V(r.target.checked))})}var Z$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},JA=ae.createContext&&ae.createContext(Z$),td=globalThis&&globalThis.__assign||function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function sa(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:y=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:le,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Re=Me=>{const _e=qe.clamp(y?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return ee(bd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(dB,{w:"100%",gap:2,children:[ee(__,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&ee(Ln,{children:[x(ZC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(ZC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(XF,{className:"invokeai__slider_track",...j,children:x(ZF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(KF,{className:"invokeai__slider-thumb",...le})})]}),v&&ee(g_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...W,children:[x(m_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(IF,{...ne,children:[x(y_,{className:"invokeai__slider-number-stepper"}),x(v_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(q_,{}),onClick:Se,isDisabled:M,...K})]})]})}function J$(e){const{label:t="Strength",styleClass:n}=e,r=Ae(s=>s.options.img2imgStrength),i=Ye();return x(sa,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(z7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(z7(.5))}})}const N5e=()=>{const e=Ye(),t=Ae(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(RV(r.target.checked))})})},D5e=()=>{const e=Ye(),t=Ae(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(Ts,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BV(r.target.checked))})})},eH=()=>ee(rn,{gap:2,direction:"column",children:[x(D5e,{}),x(N5e,{})]});function z5e(){const e=Ye(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Ts,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Fke(r.target.checked))})}function B5e(){const e=Ae(o=>o.options.seed),t=Ae(o=>o.options.shouldRandomizeSeed),n=Ae(o=>o.options.shouldGenerateVariations),r=Ye(),i=o=>r(b2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:G_,max:j_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const tH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function F5e(){const e=Ye(),t=Ae(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(b2(tH(G_,j_))),children:x("p",{children:"Shuffle"})})}function $5e(){const e=Ye(),t=Ae(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(VV(r)),value:t,isInteger:!1})}function H5e(){const e=Ye(),t=Ae(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(DV(r)),value:t,isInteger:!1})}const K_=()=>ee(rn,{gap:2,direction:"column",children:[x(z5e,{}),ee(rn,{gap:2,children:[x(B5e,{}),x(F5e,{})]}),x(rn,{gap:2,children:x($5e,{})}),x(rn,{gap:2,children:x(H5e,{})})]}),W5e=ut(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V5e=ut(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),X_=()=>{const e=Ye(),{upscalingLevel:t,upscalingStrength:n}=Ae(W5e),{isESRGANAvailable:r}=Ae(V5e);return ee("div",{className:"upscale-options",children:[x(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(B7(Number(a.target.value))),validValues:w5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(F7(a)),value:n,isInteger:!1})]})};function nH(){const e=Ae(i=>i.system.isESRGANAvailable),t=Ae(i=>i.options.shouldRunESRGAN),n=Ye();return x(Ts,{isDisabled:!e,isChecked:t,onChange:i=>n($ke(i.target.checked))})}function Z_(){const e=Ae(r=>r.options.shouldGenerateVariations),t=Ye();return x(Ts,{isChecked:e,width:"auto",onChange:r=>t(Nke(r.target.checked))})}function U5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(bd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(V8,{...s,className:"input-entry",size:"sm",width:o})]})}function G5e(){const e=Ae(i=>i.options.seedWeights),t=Ae(i=>i.options.shouldGenerateVariations),n=Ye(),r=i=>n(FV(i.target.value));return x(U5e,{label:"Seed Weights",value:e,isInvalid:t&&!(H_(e)||e===""),isDisabled:!t,onChange:r})}function j5e(){const e=Ae(i=>i.options.variationAmount),t=Ae(i=>i.options.shouldGenerateVariations),n=Ye();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Vke(i)),isInteger:!1})}const Q_=()=>ee(rn,{gap:2,direction:"column",children:[x(j5e,{}),x(G5e,{})]});function Y5e(){const e=Ye(),t=Ae(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(AV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=ut(e=>e.options,e=>Cb[e.activeTab],{memoizeOptions:{equalityCheck:qe.isEqual}});ut(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});const J_=e=>e.options;function q5e(){const e=Ae(i=>i.options.height),t=Ae(_r),n=Ye();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(IV(Number(i.target.value))),validValues:x5e,styleClass:"main-option-block"})}const K5e=ut([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function X5e(){const e=Ye(),{iterations:t}=Ae(K5e);return x(As,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Rke(r)),value:t,width:ek,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Z5e(){const e=Ae(r=>r.options.sampler),t=Ye();return x(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:S5e,styleClass:"main-option-block"})}function Q5e(){const e=Ye(),t=Ae(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(WV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center"})}function J5e(){const e=Ae(i=>i.options.width),t=Ae(_r),n=Ye();return x(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(UV(Number(i.target.value))),validValues:b5e,styleClass:"main-option-block"})}const ek="auto";function tk(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X5e,{}),x(Q5e,{}),x(Y5e,{})]}),ee("div",{className:"main-options-row",children:[x(J5e,{}),x(q5e,{}),x(Z5e,{})]})]})})}const e4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},rH=$S({name:"system",initialState:e4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:t4e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Lw,setIsConnected:eM,setSocketId:_Te,setShouldConfirmOnDelete:iH,setOpenAccordions:n4e,setSystemStatus:r4e,setCurrentStatus:e5,setSystemConfig:i4e,setShouldDisplayGuides:o4e,processingCanceled:a4e,errorOccurred:tM,errorSeen:oH,setModelList:nM,setIsCancelable:i0,modelChangeRequested:s4e,setSaveIntermediatesInterval:l4e,setEnableImageDebugging:u4e,generationRequested:c4e,addToast:mm,clearToastQueue:d4e,setProcessingIndeterminateTask:f4e}=rH.actions,h4e=rH.reducer;function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function aH(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function m4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function v4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const y4e=ut(e=>e.system,e=>e.shouldDisplayGuides),S4e=({children:e,feature:t})=>{const n=Ae(y4e),{text:r}=y5e[t];return n?ee(S_,{trigger:"hover",children:[x(w_,{children:x(vh,{children:e})}),ee(x_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(b_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},b4e=Ee(({feature:e,icon:t=p4e},n)=>x(S4e,{feature:e,children:x(vh,{ref:n,children:x(ya,{marginBottom:"-.15rem",as:t})})}));function x4e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(Vf,{className:"advanced-settings-item",children:[x(Hf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[x(vh,{flexGrow:1,textAlign:"left",children:t}),i,n&&x(b4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const nk=e=>{const{accordionInfo:t}=e,n=Ae(a=>a.system.openAccordions),r=Ye();return x(_S,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(n4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(x(x4e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function w4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function C4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function _4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function sH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function lH(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function k4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function E4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function P4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function T4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function L4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function rk(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function uH(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ib(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function A4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function cH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function M4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function I4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function R4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function O4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function N4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function D4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function B4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function F4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function $4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function W4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function V4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function U4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function G4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function j4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Y4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function dH(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function K4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function rM(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function fH(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function X4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function w1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Z4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function ik(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Q4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ok(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const J4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],eSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ak=e=>e.kind==="line"&&e.layer==="mask",tSe=e=>e.kind==="line"&&e.layer==="base",g4=e=>e.kind==="image"&&e.layer==="base",nSe=e=>e.kind==="line",Rn=e=>e.canvas,Ru=e=>e.canvas.layerState.stagingArea.images.length>0,hH=e=>e.canvas.layerState.objects.find(g4),pH=ut([e=>e.options,e=>e.system,hH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(H_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:qe.isEqual,resultEqualityCheck:qe.isEqual}}),l7=ti("socketio/generateImage"),rSe=ti("socketio/runESRGAN"),iSe=ti("socketio/runFacetool"),oSe=ti("socketio/deleteImage"),u7=ti("socketio/requestImages"),iM=ti("socketio/requestNewImages"),aSe=ti("socketio/cancelProcessing"),sSe=ti("socketio/requestSystemConfig"),gH=ti("socketio/requestModelChange"),lSe=ti("socketio/saveStagingAreaImageToGallery"),uSe=ti("socketio/requestEmptyTempFolder"),ra=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function mH(e){const{iconButton:t=!1,...n}=e,r=Ye(),{isReady:i}=Ae(pH),o=Ae(_r),a=()=>{r(l7(o))};return lt(["ctrl+enter","meta+enter"],()=>{r(l7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(U4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const cSe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vH(e){const{...t}=e,n=Ye(),{isProcessing:r,isConnected:i,isCancelable:o}=Ae(cSe),a=()=>n(aSe());return lt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const dSe=ut(e=>e.options,e=>e.shouldLoopback),fSe=()=>{const e=Ye(),t=Ae(dSe);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(j4e,{}),onClick:()=>{e(zke(!t))}})},sk=()=>{const e=Ae(_r);return ee("div",{className:"process-buttons",children:[x(mH,{}),e==="img2img"&&x(fSe,{}),x(vH,{})]})},hSe=ut([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),lk=()=>{const e=Ye(),{prompt:t,activeTabName:n}=Ae(hSe),{isReady:r}=Ae(pH),i=C.exports.useRef(null),o=s=>{e(_b(s.target.value))};lt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(l7(n)))};return x("div",{className:"prompt-bar",children:x(bd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(o$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function yH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function SH(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function pSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function gSe(e,t){e.classList?e.classList.add(t):pSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function oM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function mSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=oM(e.className,t):e.setAttribute("class",oM(e.className&&e.className.baseVal||"",t))}const aM={disabled:!1},bH=ae.createContext(null);var xH=function(t){return t.scrollTop},vm="unmounted",Pf="exited",Tf="entering",Hp="entered",c7="exiting",Ou=function(e){i_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Pf,o.appearStatus=Tf):l=Hp:r.unmountOnExit||r.mountOnEnter?l=vm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===vm?{status:Pf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Tf&&a!==Hp&&(o=Tf):(a===Tf||a===Hp)&&(o=c7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this);a&&xH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:vm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ey.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||aM.disabled){this.safeSetState({status:Hp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Hp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ey.findDOMNode(this);if(!o||aM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:c7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ey.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=t_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(bH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ou.contextType=bH;Ou.propTypes={};function Op(){}Ou.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ou.UNMOUNTED=vm;Ou.EXITED=Pf;Ou.ENTERING=Tf;Ou.ENTERED=Hp;Ou.EXITING=c7;const vSe=Ou;var ySe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Aw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},uk=function(e){i_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,ml=(e,t)=>Math.round(e/t)*t,Np=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Dp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},SSe=.999,bSe=.1,xSe=20,Qg=.95,sM=30,d7=10,lM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),wSe=e=>({width:ml(e.width,64),height:ml(e.height,64)}),ym={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},CSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:ym,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},CH=$S({name:"canvas",initialState:CSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push({...e.layerState}),e.layerState.objects=e.layerState.objects.filter(t=>!ak(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gl(qe.clamp(n.width,64,512),64),height:gl(qe.clamp(n.height,64,512),64)},o={x:ml(n.width/2-i.width/2,64),y:ml(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...ym,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Dp(r.width,r.height,n.width,n.height,Qg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(qe.clamp(i,64,n/e.stageScale),64),s=gl(qe.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=wSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const{width:r,height:i}=n,o={width:r,height:i},a=512*512,s=r/i;let l=r*i,u=448;for(;l1?(o.width=u,o.height=ml(u/s,64)):s<1&&(o.height=u,o.width=ml(u*s,64)),l=o.width*o.height;e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=lM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...ym.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=ym,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(g4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Dp(i.width,i.height,512,512,Qg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Dp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=lM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(g4)){const i=Dp(r.width,r.height,512,512,Qg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Dp(r,i,s,l,Qg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Dp(r,i,512,512,Qg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(qe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...ym.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gl(qe.clamp(o,64,512),64),height:gl(qe.clamp(a,64,512),64)},l={x:ml(o/2-s.width/2,64),y:ml(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setBoundingBoxScaleMethod:(e,t)=>{e.boundingBoxScaleMethod=t.payload},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:_Se,addLine:_H,addPointToCurrentLine:kH,clearCanvasHistory:EH,clearMask:kSe,commitColorPickerColor:ESe,commitStagingAreaImage:PSe,discardStagedImages:TSe,fitBoundingBoxToStage:kTe,nextStagingAreaImage:LSe,prevStagingAreaImage:ASe,redo:MSe,resetCanvas:PH,resetCanvasInteractionState:ISe,resetCanvasView:RSe,resizeAndScaleCanvas:ck,resizeCanvas:OSe,setBoundingBoxCoordinates:Mw,setBoundingBoxDimensions:o0,setBoundingBoxPreviewFill:ETe,setBoundingBoxScaleMethod:NSe,setBrushColor:Iw,setBrushSize:Rw,setCanvasContainerDimensions:DSe,setColorPickerColor:zSe,setCursorPosition:TH,setDoesCanvasNeedScaling:Wi,setInitialCanvasImage:ob,setInpaintReplace:uM,setIsDrawing:ab,setIsMaskEnabled:LH,setIsMouseOverBoundingBox:Xy,setIsMoveBoundingBoxKeyHeld:PTe,setIsMoveStageKeyHeld:TTe,setIsMovingBoundingBox:cM,setIsMovingStage:m4,setIsTransformingBoundingBox:Ow,setLayer:AH,setMaskColor:BSe,setMergedCanvas:FSe,setShouldAutoSave:$Se,setShouldCropToBoundingBoxOnSave:HSe,setShouldDarkenOutsideBoundingBox:WSe,setShouldLockBoundingBox:LTe,setShouldPreserveMaskedArea:VSe,setShouldShowBoundingBox:USe,setShouldShowBrush:ATe,setShouldShowBrushPreview:MTe,setShouldShowCanvasDebugInfo:GSe,setShouldShowCheckboardTransparency:ITe,setShouldShowGrid:jSe,setShouldShowIntermediates:YSe,setShouldShowStagingImage:qSe,setShouldShowStagingOutline:dM,setShouldSnapToGrid:fM,setShouldUseInpaintReplace:KSe,setStageCoordinates:MH,setStageDimensions:RTe,setStageScale:XSe,setTool:N0,toggleShouldLockBoundingBox:OTe,toggleTool:NTe,undo:ZSe,setScaledBoundingBoxDimensions:Zy}=CH.actions,QSe=CH.reducer,IH=""+new URL("logo.13003d72.png",import.meta.url).href,JSe=ut(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),dk=e=>{const t=Ye(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ae(JSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;lt("o",()=>{t(od(!n)),i&&setTimeout(()=>t(Wi(!0)),400)},[n,i]),lt("esc",()=>{t(od(!1))},{enabled:()=>!i,preventDefault:!0},[i]),lt("shift+o",()=>{m(),t(Wi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Oke(a.current?a.current.scrollTop:0)),t(od(!1)),t(Dke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Bke(!i)),t(Wi(!0))};return C.exports.useEffect(()=>{function v(y){o.current&&!o.current.contains(y.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(wH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(yH,{}):x(SH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function ebe(){const e={seed:{header:"Seed",feature:Hi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Hi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})},face_restore:{header:"Face Restoration",feature:Hi.FACE_CORRECTION,content:x(Y_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Hi.UPSCALE,content:x(X_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Hi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(P5e,{}),x(nk,{accordionInfo:e})]})}const fk=C.exports.createContext(null),tbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(fk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(ik,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},nbe=ut(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),f7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Rv(),a=Ye(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ae(nbe),h=C.exports.useRef(null),g=y=>{y.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(oSe(e)),o()};lt("delete",()=>{s?i():m()},[e,s]);const v=y=>a(iH(!y.target.checked));return ee(Ln,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(LF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Bv,{children:ee(rn,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(bd,{children:ee(rn,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(k_,{checked:!s,onChange:v})]})})]})}),ee(OS,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),nd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(S_,{...o,children:[x(w_,{children:t}),ee(x_,{className:`invokeai__popover-content ${r}`,children:[i&&x(b_,{className:"invokeai__popover-arrow"}),n]})]})},rbe=ut([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),RH=()=>{const e=Ye(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Ae(rbe),m=p2(),v=()=>{!u||(h&&e(pd(!1)),e(P1(u)),e(ko("img2img")))},y=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};lt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(Ake(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};lt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(b2(u.metadata.image.seed))};lt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(_b(u.metadata.image.prompt));lt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(rSe(u))};lt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(iSe(u))};lt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(HV(!l)),R=()=>{!u||(h&&e(pd(!1)),e(ob(u)),e(Wi(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return lt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(rM,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:R,leftIcon:x(rM,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:y,leftIcon:x(ib,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(cH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(gt,{icon:x(G4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(T4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(D4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Y_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(nd,{trigger:"hover",triggerComponent:x(gt,{icon:x(I4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(X_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(uH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(f7,{image:u,children:x(gt,{icon:x(w1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},ibe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},OH=$S({name:"gallery",initialState:ibe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:a0,clearIntermediateImage:Nw,removeImage:NH,setCurrentImage:obe,addGalleryImages:abe,setIntermediateImage:sbe,selectNextImage:hk,selectPrevImage:pk,setShouldPinGallery:lbe,setShouldShowGallery:rd,setGalleryScrollPosition:ube,setGalleryImageMinimumWidth:Jg,setGalleryImageObjectFit:cbe,setShouldHoldGalleryOpen:DH,setShouldAutoSwitchToNewImages:dbe,setCurrentCategory:Qy,setGalleryWidth:fbe,setShouldUseSingleGalleryColumn:hbe}=OH.actions,pbe=OH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:ee(Ln,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function gbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(gbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(zH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),mbe=(e,t)=>e.image.uuid===t.image.uuid,BH=C.exports.memo(({image:e,styleClass:t})=>{const n=Ye();lt("esc",()=>{n(HV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:y,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:R,type:O,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Ln,{children:[O&&x(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&x(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&x(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&x(On,{label:"Fix faces strength",value:M,onClick:()=>n(i5(M))}),O==="esrgan"&&E!==void 0&&x(On,{label:"Upscaling scale",value:E,onClick:()=>n(B7(E))}),O==="esrgan"&&M!==void 0&&x(On,{label:"Upscaling strength",value:M,onClick:()=>n(F7(M))}),y&&x(On,{label:"Prompt",labelPosition:"top",value:J3(y),onClick:()=>n(_b(y))}),k!==void 0&&x(On,{label:"Seed",value:k,onClick:()=>n(b2(k))}),R!==void 0&&x(On,{label:"Noise Threshold",value:R,onClick:()=>n(VV(R))}),m!==void 0&&x(On,{label:"Perlin Noise",value:m,onClick:()=>n(DV(m))}),w&&x(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&x(On,{label:"Steps",value:T,onClick:()=>n(WV(T))}),o!==void 0&&x(On,{label:"CFG scale",value:o,onClick:()=>n(AV(o))}),N&&N.length>0&&x(On,{label:"Seed-weight pairs",value:p4(N),onClick:()=>n(FV(p4(N)))}),P&&x(On,{label:"Seamless",value:P,onClick:()=>n(BV(P))}),l&&x(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(RV(l))}),z&&x(On,{label:"Width",value:z,onClick:()=>n(UV(z))}),s&&x(On,{label:"Height",value:s,onClick:()=>n(IV(s))}),u&&x(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(P1(u))}),h&&x(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&x(On,{label:"Image to image strength",value:M,onClick:()=>n(z7(M))}),a&&x(On,{label:"Image to image fit",value:a,onClick:()=>n($V(a))}),v&&v.length>0&&ee(Ln,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:le,strength:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(On,{label:"Scale",value:le,onClick:()=>n(B7(le))}),x(On,{label:"Strength",value:W,onClick:()=>n(F7(W))})]},j)}else if($.type==="gfpgan"){const{strength:le}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:le,fidelity:W}=$;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(On,{label:"Strength",value:le,onClick:()=>{n(i5(le)),n(o5("codeformer"))}}),W&&x(On,{label:"Fidelity",value:W,onClick:()=>{n(MV(W)),n(o5("codeformer"))}})]},j)}})]}),i&&x(On,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(ib,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(aB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},mbe),FH=ut([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function vbe(){const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())},m=()=>{e(pd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ES,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(BH,{image:i,styleClass:"current-image-metadata"})]})}const ybe=ut([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$H=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ae(ybe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Ln,{children:[x(RH,{}),x(vbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},Sbe=()=>{const e=C.exports.useContext(fk);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(ik,{}),onClick:e||void 0})};function bbe(){const e=Ae(i=>i.options.initialImage),t=Ye(),n=p2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(LV())};return ee(Ln,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(Sbe,{})]}),e&&x("div",{className:"init-image-preview",children:x(ES,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const xbe=()=>{const e=Ae(r=>r.options.initialImage),{currentImage:t}=Ae(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(bbe,{})}):x(tbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($H,{})})]})};function wbe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Cbe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Abe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],vM="__resizable_base__",HH=function(e){Ebe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(vM):o.className+=vM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Dw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Dw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Dw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zp("left",o),s=i&&zp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,y=l||0,w=u||0;if(s){var E=(m-y)*this.ratio+w,P=(v-y)*this.ratio+w,k=(h-w)/this.ratio+y,T=(g-w)/this.ratio+y,M=Math.max(h,E),R=Math.min(g,P),O=Math.max(m,k),N=Math.min(v,T);n=e3(n,M,R),r=e3(r,O,N)}else n=e3(n,h,g),r=e3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Tbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&t3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&t3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=t3(n)?n.touches[0].clientX:n.clientX,h=t3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,y=g.width,w=g.height,E=this.getParentSize(),P=Lbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=mM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=mM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var N=gM(M,this.props.grid[0]),z=gM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(y&&typeof y=="string"){if(y.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(y.endsWith("vw")){var le=M/this.window.innerWidth*100;M=le+"vw"}else if(y.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var le=T/this.window.innerWidth*100;T=le+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Bl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?x(kbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Abe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function g2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...y}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>y,Object.values(y));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,y=C.exports.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Mbe(i,...t)]}function Mbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ibe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function WH(...e){return t=>e.forEach(n=>Ibe(n,t))}function ja(...e){return C.exports.useCallback(WH(...e),e)}const Wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Obe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(h7,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(h7,An({},r,{ref:t}),n)});Wv.displayName="Slot";const h7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...Nbe(r,n.props),ref:WH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});h7.displayName="SlotClone";const Rbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Obe(e){return C.exports.isValidElement(e)&&e.type===Rbe}function Nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Dbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Tu=Dbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VH(e,t){e&&Bl.exports.flushSync(()=>e.dispatchEvent(t))}function UH(e){const t=e+"CollectionProvider",[n,r]=g2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:y,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,y)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(y,P.collectionRef);return ae.createElement(Wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,y)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(y,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Wv,{[h]:"",ref:T},E)});function m(v){const y=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=y.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const zbe=C.exports.createContext(void 0);function GH(e){const t=C.exports.useContext(zbe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bbe(e,t=globalThis?.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const p7="dismissableLayer.update",Fbe="dismissableLayer.pointerDownOutside",$be="dismissableLayer.focusOutside";let yM;const Hbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Hbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,y]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,O=Vbe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!R||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=Ube(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Bbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(yM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),SM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),SM())},[g,h]),C.exports.useEffect(()=>{const z=()=>y({});return document.addEventListener(p7,z),()=>document.removeEventListener(p7,z)},[]),C.exports.createElement(Tu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Vbe(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){jH(Fbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ube(e,t=globalThis?.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&jH($be,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SM(){const e=new CustomEvent(p7);document.dispatchEvent(e)}function jH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?VH(i,o):i.dispatchEvent(o)}let zw=0;function Gbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:bM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:bM()),zw++,()=>{zw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),zw--}},[])}function bM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Bw="focusScope.autoFocusOnMount",Fw="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},jbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){CM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Bw,xM);s.addEventListener(Bw,u),s.dispatchEvent(P),P.defaultPrevented||(Ybe(Qbe(YH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(Bw,u),setTimeout(()=>{const P=new CustomEvent(Fw,xM);s.addEventListener(Fw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Fw,h),CM.remove(v)},0)}}},[s,u,h,v]);const y=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=qbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Tu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function Ybe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function qbe(e){const t=YH(e),n=wM(t,e),r=wM(t.reverse(),e);return[n,r]}function YH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wM(e,t){for(const n of e)if(!Kbe(n,{upTo:t}))return n}function Kbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xbe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xbe(e)&&t&&e.select()}}const CM=Zbe();function Zbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qbe(e){return e.filter(t=>t.tagName!=="A")}const i1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Jbe=e6["useId".toString()]||(()=>{});let exe=0;function txe(e){const[t,n]=C.exports.useState(Jbe());return i1(()=>{e||n(r=>r??String(exe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function sb(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function gk(e){return e==="y"?"height":"width"}function kM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=gk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(sb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const nxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=kM(l,r,s),g=r,m={},v=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=qH(r),h={x:i,y:o},g=_1(a),m=sb(a),v=gk(g),y=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,O=u[w],N=M-y[v]-u[E],z=M/2-y[v]/2+R,V=g7(O,z,N),le=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zaxe[t])}function sxe(e,t,n){n===void 0&&(n=!1);const r=sb(e),i=_1(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=S4(a)),{main:a,cross:S4(a)}}const lxe={start:"end",end:"start"};function PM(e){return e.replace(/start|end/g,t=>lxe[t])}const uxe=["top","right","bottom","left"];function cxe(e){const t=S4(e);return[PM(e),t,PM(t)]}const dxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...y}=e,w=C1(r),P=g||(w===a||!v?[S4(a)]:cxe(a)),k=[a,...P],T=await y4(t,y),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=sxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(R=[...R,{placement:r,overflows:M}],!M.every(V=>V<=0)){var O,N;const V=((O=(N=i.flip)==null?void 0:N.index)!=null?O:0)+1,$=k[V];if($)return{data:{index:V,overflows:R},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const le=(z=R.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;le&&(j=le);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function TM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LM(e){return uxe.some(t=>e[t]>=0)}const fxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await y4(r,{...n,elementContext:"reference"}),a=TM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LM(a)}}}case"escaped":{const o=await y4(r,{...n,altBoundary:!0}),a=TM(o,i.floating);return{data:{escapedOffsets:a,escaped:LM(a)}}}default:return{}}}}};async function hxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=sb(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const pxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function KH(e){return e==="x"?"y":"x"}const gxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await y4(t,l),g=_1(C1(i)),m=KH(g);let v=u[g],y=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=g7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=y+h[E],T=y-h[P];y=g7(k,y,T)}const w=s.fn({...t,[g]:v,[m]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},mxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=KH(g);let v=h[g],y=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+E.mainAxis,N=o.reference[g]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),N=o.reference[m]-o.floating[R]+(O&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(O?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);yz&&(y=z)}return{[g]:v,[m]:y}}}};function XH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!XH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function m2(e){return Nu(e).getComputedStyle(e)}function Lu(e){return XH(e)?"":e?(e.nodeName||"").toLowerCase():""}function ZH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dl(e){return e instanceof Nu(e).HTMLElement}function hd(e){return e instanceof Nu(e).Element}function vxe(e){return e instanceof Nu(e).Node}function mk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lb(e){const{overflow:t,overflowX:n,overflowY:r}=m2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yxe(e){return["table","td","th"].includes(Lu(e))}function QH(e){const t=/firefox/i.test(ZH()),n=m2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function JH(){return!/^((?!chrome|android).)*safari/i.test(ZH())}const AM=Math.min,Xm=Math.max,b4=Math.round;function Au(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dl(e)&&(l=e.offsetWidth>0&&b4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&b4(s.height)/e.offsetHeight||1);const h=hd(e)?Nu(e):window,g=!JH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,y=s.width/l,w=s.height/u;return{width:y,height:w,top:v,right:m+y,bottom:v+w,left:m,x:m,y:v}}function _d(e){return((vxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ub(e){return hd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eW(e){return Au(_d(e)).left+ub(e).scrollLeft}function Sxe(e){const t=Au(e);return b4(t.width)!==e.offsetWidth||b4(t.height)!==e.offsetHeight}function bxe(e,t,n){const r=Dl(t),i=_d(t),o=Au(e,r&&Sxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Lu(t)!=="body"||lb(i))&&(a=ub(t)),Dl(t)){const l=Au(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=eW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function tW(e){return Lu(e)==="html"?e:e.assignedSlot||e.parentNode||(mk(e)?e.host:null)||_d(e)}function MM(e){return!Dl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function xxe(e){let t=tW(e);for(mk(t)&&(t=t.host);Dl(t)&&!["html","body"].includes(Lu(t));){if(QH(t))return t;t=t.parentNode}return null}function m7(e){const t=Nu(e);let n=MM(e);for(;n&&yxe(n)&&getComputedStyle(n).position==="static";)n=MM(n);return n&&(Lu(n)==="html"||Lu(n)==="body"&&getComputedStyle(n).position==="static"&&!QH(n))?t:n||xxe(e)||t}function IM(e){if(Dl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Au(e);return{width:t.width,height:t.height}}function wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Dl(n),o=_d(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Lu(n)!=="body"||lb(o))&&(a=ub(n)),Dl(n))){const l=Au(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Cxe(e,t){const n=Nu(e),r=_d(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=JH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function _xe(e){var t;const n=_d(e),r=ub(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Xm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+eW(e);const l=-r.scrollTop;return m2(i||n).direction==="rtl"&&(s+=Xm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function nW(e){const t=tW(e);return["html","body","#document"].includes(Lu(t))?e.ownerDocument.body:Dl(t)&&lb(t)?t:nW(t)}function x4(e,t){var n;t===void 0&&(t=[]);const r=nW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],lb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(x4(a))}function kxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&mk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Exe(e,t){const n=Au(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function RM(e,t,n){return t==="viewport"?v4(Cxe(e,n)):hd(t)?Exe(t,n):v4(_xe(_d(e)))}function Pxe(e){const t=x4(e),r=["absolute","fixed"].includes(m2(e).position)&&Dl(e)?m7(e):e;return hd(r)?t.filter(i=>hd(i)&&kxe(i,r)&&Lu(i)!=="body"):[]}function Txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Pxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=RM(t,h,i);return u.top=Xm(g.top,u.top),u.right=AM(g.right,u.right),u.bottom=AM(g.bottom,u.bottom),u.left=Xm(g.left,u.left),u},RM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Lxe={getClippingRect:Txe,convertOffsetParentRelativeRectToViewportRelativeRect:wxe,isElement:hd,getDimensions:IM,getOffsetParent:m7,getDocumentElement:_d,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:bxe(t,m7(n),r),floating:{...IM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>m2(e).direction==="rtl"};function Axe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...hd(e)?x4(e):[],...x4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),hd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Au(e):null;s&&y();function y(){const w=Au(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(y)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Mxe=(e,t,n)=>nxe(e,t,{platform:Lxe,...n});var v7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function y7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!y7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!y7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ixe(e){const t=C.exports.useRef(e);return v7(()=>{t.current=e}),t}function Rxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Ixe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);y7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Mxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{y.current&&Bl.exports.flushSync(()=>{h(T)})})},[g,n,r]);v7(()=>{y.current&&v()},[v]);const y=C.exports.useRef(!1);v7(()=>(y.current=!0,()=>{y.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Oxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?EM({element:t.current,padding:n}).fn(i):{}:t?EM({element:t,padding:n}).fn(i):{}}}};function Nxe(e){const[t,n]=C.exports.useState(void 0);return i1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rW="Popper",[vk,iW]=g2(rW),[Dxe,oW]=vk(rW),zxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Dxe,{scope:t,anchor:r,onAnchorChange:i},n)},Bxe="PopperAnchor",Fxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=oW(Bxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Tu.div,An({},i,{ref:s}))}),w4="PopperContent",[$xe,DTe]=vk(w4),[Hxe,Wxe]=vk(w4,{hasParent:!1,positionUpdateFns:new Set}),Vxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:y=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=oW(w4,h),[N,z]=C.exports.useState(null),V=ja(t,wt=>z(wt)),[$,j]=C.exports.useState(null),le=Nxe($),W=(n=le?.width)!==null&&n!==void 0?n:0,Q=(r=le?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Gxe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Rxe({strategy:"fixed",placement:ne,whileElementsMounted:Axe,middleware:[pxe({mainAxis:m+Q,alignmentAxis:y}),M?gxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?mxe():void 0,...X}):void 0,$?Oxe({element:$,padding:w}):void 0,M?dxe({...X}):void 0,jxe({arrowWidth:W,arrowHeight:Q}),T?fxe({strategy:"referenceHidden"}):void 0].filter(Uxe)});i1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[dt,_t]=aW(Me),pt=(i=_e.arrow)===null||i===void 0?void 0:i.x,ct=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();i1(()=>{N&&et(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Wxe(w4,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":dt,"data-align":_t,...R,ref:V,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement($xe,{scope:h,placedSide:dt,onArrowChange:j,arrowX:pt,arrowY:ct,shouldHideArrow:mt},St?C.exports.createElement(Hxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Tu.div,Yt)):C.exports.createElement(Tu.div,Yt)))});function Uxe(e){return e!==void 0}function Gxe(e){return e!==null}const jxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[y,w]=aW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return y==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):y==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):y==="right"?(T=`${-v}px`,M=g?E:`${k}px`):y==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function aW(e){const[t,n="center"]=e.split("-");return[t,n]}const Yxe=zxe,qxe=Fxe,Kxe=Vxe;function Xxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sW=e=>{const{present:t,children:n}=e,r=Zxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};sW.displayName="Presence";function Zxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Xxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=r3(r.current);o.current=s==="mounted"?u:"none"},[s]),i1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=r3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),i1(()=>{if(t){const u=g=>{const v=r3(r.current).includes(g.animationName);g.target===t&&v&&Bl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=r3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function r3(e){return e?.animationName||"none"}function Qxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Jxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Jxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const $w="rovingFocusGroup.onEntryFocus",ewe={bubbles:!1,cancelable:!0},yk="RovingFocusGroup",[S7,lW,twe]=UH(yk),[nwe,uW]=g2(yk,[twe]),[rwe,iwe]=nwe(yk),owe=C.exports.forwardRef((e,t)=>C.exports.createElement(S7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(S7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(awe,An({},e,{ref:t}))))),awe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=GH(o),[y=null,w]=Qxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Nl(u),T=lW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener($w,k),()=>N.removeEventListener($w,k)},[k]),C.exports.createElement(rwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:y,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(N=>N-1),[])},C.exports.createElement(Tu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent($w,ewe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),le=$.find(ne=>ne.id===y),Q=[j,le,...$].filter(Boolean).map(ne=>ne.ref.current);cW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),swe="RovingFocusGroupItem",lwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=txe(),s=iwe(swe,n),l=s.currentTabStopId===a,u=lW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(S7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Tu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=dwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?fwe(w,E+1):w.slice(E+1)}setTimeout(()=>cW(w))}})})))}),uwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dwe(e,t,n){const r=cwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uwe[r]}function cW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const hwe=owe,pwe=lwe,gwe=["Enter"," "],mwe=["ArrowDown","PageUp","Home"],dW=["ArrowUp","PageDown","End"],vwe=[...mwe,...dW],cb="Menu",[b7,ywe,Swe]=UH(cb),[wh,fW]=g2(cb,[Swe,iW,uW]),Sk=iW(),hW=uW(),[bwe,db]=wh(cb),[xwe,bk]=wh(cb),wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=Sk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=GH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),C.exports.createElement(Yxe,s,C.exports.createElement(bwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(xwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Cwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Sk(n);return C.exports.createElement(qxe,An({},i,r,{ref:t}))}),_we="MenuPortal",[zTe,kwe]=wh(_we,{forceMount:void 0}),id="MenuContent",[Ewe,pW]=wh(id),Pwe=C.exports.forwardRef((e,t)=>{const n=kwe(id,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=db(id,e.__scopeMenu),a=bk(id,e.__scopeMenu);return C.exports.createElement(b7.Provider,{scope:e.__scopeMenu},C.exports.createElement(sW,{present:r||o.open},C.exports.createElement(b7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Twe,An({},i,{ref:t})):C.exports.createElement(Lwe,An({},i,{ref:t})))))}),Twe=C.exports.forwardRef((e,t)=>{const n=db(id,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return $B(o)},[]),C.exports.createElement(gW,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Lwe=C.exports.forwardRef((e,t)=>{const n=db(id,e.__scopeMenu);return C.exports.createElement(gW,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),gW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...y}=e,w=db(id,n),E=bk(id,n),P=Sk(n),k=hW(n),T=ywe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),N=ja(t,O,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),le=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?EF:C.exports.Fragment,ne=v?{as:Wv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(X=Re.find(Xe=>Xe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Bwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(dt){V.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Gbe();const K=C.exports.useCallback(G=>{var X,ce;return le.current===((X=j.current)===null||X===void 0?void 0:X.side)&&$we(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Ewe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=O.current)===null||X===void 0||X.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement(jbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=O.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Wbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(hwe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Kxe,An({role:"menu","aria-orientation":"vertical","data-state":Nwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,y,{ref:N,style:{outline:"none",...y.style},onKeyDown:Kn(y.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&J(G.key));const xe=O.current;if(G.target!==xe||!vwe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);dW.includes(G.key)&&Me.reverse(),Dwe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,w7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";le.current=me,W.current=G.clientX}}))})))))))}),x7="MenuItem",OM="menu.itemSelect",Awe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=bk(x7,e.__scopeMenu),s=pW(x7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(OM,{bubbles:!0,cancelable:!0});g.addEventListener(OM,v=>r?.(v),{once:!0}),VH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Mwe,An({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||gwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Mwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pW(x7,n),s=hW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const y=l.current;if(y){var w;v(((w=y.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(b7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(pwe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Tu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,w7(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,w7(y=>a.onItemLeave(y))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Iwe="MenuRadioGroup";wh(Iwe,{value:void 0,onValueChange:()=>{}});const Rwe="MenuItemIndicator";wh(Rwe,{checked:!1});const Owe="MenuSub";wh(Owe);function Nwe(e){return e?"open":"closed"}function Dwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=zwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function $we(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fwe(n,t)}function w7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Hwe=wwe,Wwe=Cwe,Vwe=Pwe,Uwe=Awe,mW="ContextMenu",[Gwe,BTe]=g2(mW,[fW]),fb=fW(),[jwe,vW]=Gwe(mW),Ywe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=fb(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(jwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Hwe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},qwe="ContextMenuTrigger",Kwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(qwe,n),o=fb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Wwe,An({},o,{virtualRef:s})),C.exports.createElement(Tu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,i3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,i3(u)),onPointerCancel:Kn(e.onPointerCancel,i3(u)),onPointerUp:Kn(e.onPointerUp,i3(u))})))}),Xwe="ContextMenuContent",Zwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=vW(Xwe,n),o=fb(n),a=C.exports.useRef(!1);return C.exports.createElement(Vwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),Qwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=fb(n);return C.exports.createElement(Uwe,An({},i,r,{ref:t}))});function i3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Jwe=Ywe,e6e=Kwe,t6e=Zwe,Sf=Qwe,n6e=ut([e=>e.gallery,e=>e.options,Ru,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:y,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:y,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r6e=ut([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),i6e=e=>e.gallery,o6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,a6e=C.exports.memo(e=>{const t=Ye(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Ae(r6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[y,w]=C.exports.useState(!1),E=p2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(_b(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(b2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(pd(!1)),t(P1(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(pd(!1)),t(ob(l)),t(ck()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Mke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Lke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Jwe,{onOpenChange:j=>{t(DH(j))},children:[x(e6e,{children:ee(vh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",draggable:!0,onDragStart:j=>{j.dataTransfer.setData("invokeai/imageUuid",m),j.dataTransfer.effectAllowed="move"},children:[x(ES,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(obe(l)),children:u&&x(ya,{width:"50%",height:"50%",as:rk,className:"hoverable-image-check"})}),y&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(f7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(X4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(t6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:j=>{j.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:R,children:"Send to Image To Image"}),x(Sf,{onClickCapture:O,children:"Send to Unified Canvas"}),x(f7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},o6e),Ma=e=>{const{label:t,styleClass:n,...r}=e;return x(Kz,{className:`invokeai__checkbox ${n}`,...r,children:t})},o3=320,NM=40,s6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},DM=400;function yW(){const e=Ye(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:y,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Ae(n6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:DM,galleryMaxWidth:DM}:s6e[u],[R,O]=C.exports.useState(y>=o3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),le=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{y>=o3&&O(!1)},[y]);const Q=()=>{e(lbe(!i)),e(Wi(!0))},ne=()=>{o?K():J()},J=()=>{e(rd(!0)),i&&e(Wi(!0))},K=C.exports.useCallback(()=>{e(rd(!1)),e(DH(!1)),e(ube(le.current?le.current.scrollTop:0)),setTimeout(()=>i&&e(Wi(!0)),400)},[e,i]),G=()=>{e(u7(n))},X=xe=>{e(Jg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};lt("g",()=>{ne()},[o,i]),lt("left",()=>{e(pk())},{enabled:!E},[E]),lt("right",()=>{e(hk())},{enabled:!E},[E]),lt("shift+g",()=>{Q()},[i]),lt("esc",()=>{e(rd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return lt("shift+up",()=>{if(s<256){const xe=qe.clamp(s+Re,32,256);e(Jg(xe))}},[s]),lt("shift+down",()=>{if(s>32){const xe=qe.clamp(s-Re,32,256);e(Jg(xe))}},[s]),C.exports.useEffect(()=>{!le.current||(le.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(wH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(HH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:y,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{$(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",z(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?qe.clamp(Number(y)+_e.width,T,Number(M)):Number(y)+_e.width;e(fbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Wi(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=qe.clamp(Number(y)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=o3&&!R?O(!0):JeJe-NM&&e(Jg(Je-NM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ee(Ln,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(Qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(Qy("user")),children:"Uploads"})]}):ee(Ln,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(z4e,{}),onClick:()=>e(Qy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(Q4e,{}),onClick:()=>e(Qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(nd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(ok,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(sa,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Jg(64)),icon:x(q_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Ma,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(cbe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Ma,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(dbe(xe.target.checked))})}),x("div",{children:x(Ma,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(hbe(xe.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(yH,{}):x(SH,{})})]})]}),x("div",{className:"image-gallery-container",ref:le,children:t.length||v?ee(Ln,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return x(a6e,{image:xe,isSelected:r===Se},Se)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(aH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:y+"px",height:"100%"}})]})})}const l6e=ut(i6e,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),u6e=()=>{const{resultImages:e,userImages:t}=Ae(l6e);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},c6e=ut([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),xk=e=>{const t=Ye(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Ae(c6e),u=u6e(),h=()=>{t(Wke(!a)),t(Wi(!0))},g=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),y=u(v);!y||(o==="img2img"?t(P1(y)):o==="unifiedCanvas"&&t(ob(y)))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",onDrop:g,children:[r,l&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":a,onClick:h,children:x(wbe,{})})})]}),!s&&x(yW,{})]})})};function d6e(){return x(xk,{optionsPanel:x(ebe,{}),children:x(xbe,{})})}function f6e(){const e={seed:{header:"Seed",feature:Hi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Hi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})},face_restore:{header:"Face Restoration",feature:Hi.FACE_CORRECTION,content:x(Y_,{}),additionalHeaderComponents:x(X$,{})},upscale:{header:"Upscaling",feature:Hi.UPSCALE,content:x(X_,{}),additionalHeaderComponents:x(nH,{})},other:{header:"Other Options",feature:Hi.OTHER,content:x(eH,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(nk,{accordionInfo:e})]})}const h6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($H,{})})});function p6e(){return x(xk,{optionsPanel:x(f6e,{}),children:x(h6e,{})})}var C7=function(e,t){return C7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},C7(e,t)};function g6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");C7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function kd(e,t,n,r){var i=M6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):xW(e,r,n,function(v){var y=s+h*v,w=l+g*v,E=u+m*v;o(y,w,E)})}}function M6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function I6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var R6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},wk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=I6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=R6e(a,l,u,s,h,g,Boolean(i));return m},o1=function(e,t){var n=wk(e,t);return e.bounds=n,n};function hb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=_7(e,s-g,u+g,r),y=_7(t,l-m,h+m,r);return{x:v,y}}var _7=function(e,t,n,r){return r?en?za(n,2):za(e,2):za(e,2)};function pb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=hb(g,m,i,o,0,0,null);return v}function v2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var BM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=gb(o,n);return!l},FM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},O6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},N6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function D6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,y=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=pb(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function z6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,y=!m||!v;if(!(!a||y||!s)){var w=hb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var B6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},C4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},F6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},$6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function H6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function $M(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:_7(e,o,a,i)}function W6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function V6e(e,t){var n=F6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=W6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,y=l-i,w=h*h+g*g,E=Math.sqrt(w)/y;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function U6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=$6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,y=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=y.sizeX,R=y.sizeY,O=y.velocityAlignmentTime,N=O,z=H6e(e,l),V=Math.max(z,N),$=C4(e,M),j=C4(e,R),le=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+le,ne=h-le,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();xW(e,T,V,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-X,_e=Me/N,Je=SW[y.animationType],Xe=1-Je(Math.min(1,_e)),dt=1-ce,_t=xe+a*dt,pt=Se+s*dt,ct=$M(_t,G.positionX,xe,k,v,h,u,ne,Q,Xe),mt=$M(pt,G.positionY,Se,P,v,m,g,K,J,Xe);(xe!==_t||Se!==pt)&&e.setTransformState(Re,ct,mt)})}}function HM(e,t){var n=e.transformState.scale;bl(e),o1(e,n),t.touches?N6e(e,t):O6e(e,t)}function WM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=B6e(e,t,n),u=l.x,h=l.y,g=C4(e,a),m=C4(e,s);V6e(e,{x:u,y:h}),z6e(e,u,h,g,m)}}function G6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?U6e(e):wW(e)}}function wW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&wW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,y=n||i.offsetHeight/2,w=Ck(e,a,v,y);w&&kd(e,w,h,g)}}function Ck(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=v2(za(t,2),o,a,0,!1),u=o1(e,l),h=pb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var s0={previousScale:1,scale:1,positionX:0,positionY:0},j6e=Al(Al({},s0),{setComponents:function(){},contextInstance:null}),em={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},_W=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:s0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:s0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:s0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:s0.positionY}},VM=function(e){var t=Al({},em);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof em[n]<"u";if(i&&r){var o=Object.prototype.toString.call(em[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},em[n]),e[n]):s?t[n]=zM(zM([],em[n]),e[n]):t[n]=e[n]}}),t},kW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=v2(za(h,3),s,a,u,!1);return g};function EW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,y=kW(e,t,n),w=Ck(e,y,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,w,r,i)}function PW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=_W(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=wk(e,a.scale),m=hb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||kd(e,v,t,n)}}function Y6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return s0;var l=r.getBoundingClientRect(),u=q6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,y=r.offsetWidth/m,w=r.offsetHeight/v,E=v2(n||Math.min(y,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,R=wk(e,E),O=hb(T,M,R,o,0,0,r),N=O.x,z=O.y;return{positionX:N,positionY:z,scale:E}}function q6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function K6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var X6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,1,t,n,r)}},Z6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),EW(e,-1,t,n,r)}},Q6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};kd(e,v,i,o)}}},J6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),PW(e,t,n)}},eCe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=TW(t||i.scale,o,a);kd(e,s,n,r)}}},tCe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&K6e(a)&&a&&o.contains(a)){var s=Y6e(e,a,n);kd(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:X6e(e),zoomOut:Z6e(e),setTransform:Q6e(e),resetTransform:J6e(e),centerView:eCe(e),zoomToElement:tCe(e)}},Hw=!1;function Ww(){try{var e={get passive(){return Hw=!0,!1}};return e}catch{return Hw=!1,Hw}}var gb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},UM=function(e){e&&clearTimeout(e)},nCe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},TW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},rCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=gb(u,a);return!g};function iCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=m6e(t,n);return r}function LW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var oCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var y=r?!1:!m,w=v2(za(v,3),u,l,g,y);return w},aCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},sCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=gb(a,i);return!l},lCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},uCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=za(i[0].clientX-r.left,5),a=za(i[0].clientY-r.top,5),s=za(i[1].clientX-r.left,5),l=za(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},AW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},cCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return v2(za(g,2),a,o,l,!u)},dCe=160,fCe=100,hCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},pCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,y=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=iCe(t,null),P=oCe(e,E,w,!t.ctrlKey);if(l!==P){var k=o1(e,P),T=LW(t,o,l),M=y||v===0||h,R=u&&M,O=pb(e,T.x,T.y,P,k,R),N=O.x,z=O.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},gCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;UM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(CW(e,t.x,t.y),e.wheelAnimationTimer=null)},fCe);var o=aCe(e,t);o&&(UM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},dCe))},mCe=function(e,t){var n=AW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},vCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=uCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=AW(t),v=cCe(e,m);if(v!==i){var y=o1(e,v),w=u||h===0||s,E=a&&w,P=pb(e,g.x,g.y,v,y,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},yCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,CW(e,t?.x,t?.y)};function SCe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return PW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=kW(e,h,o),m=LW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");kd(e,v,a,s)}}var bCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=gb(l,s);return!(g||!h)},MW=ae.createContext(j6e),xCe=function(e){g6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=_W(n.props),n.setup=VM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=rCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(hCe(n,r),pCe(n,r),gCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),HM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=FM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),WM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(G6e(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=sCe(n,r);!l||(mCe(n,r),bl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=lCe(n);!l||(r.preventDefault(),r.stopPropagation(),vCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(yCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=BM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),HM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=FM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];WM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=bCe(n,r);!o||SCe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,o1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=TW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=nCe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(o1(this,this.transformState.scale),this.setup=VM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(MW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),wCe=ae.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(xCe,{...Al({},e,{setRef:i})})});function CCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var _Ce=`.transform-component-module_wrapper__1_Fgj { position: relative; width: -moz-fit-content; width: fit-content; @@ -503,7 +503,7 @@ function print() { __p += __j.call(arguments, '') } .transform-component-module_content__2jYgh img { pointer-events: none; } -`,GM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};CCe(_Ce);var kCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(MW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+GM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+GM.content+" "+o,style:s,children:t})})};function ECe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(wCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:y})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(q_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(kCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>y()})})]})})}function PCe(){const e=je(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(ECe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const TCe=ut([J_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),LCe=()=>{const e=je(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(TCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(TI(o))},handleReset:()=>e(TI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(PI(o))},handleReset:()=>{e(PI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(AI(o))},handleReset:()=>{e(AI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},ACe=ut(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),MCe=()=>{const e=je(),{boundingBoxDimensions:t}=Ae(ACe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},y2=e=>e.system,ICe=e=>e.system.toastQueue,RCe=ut(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function OCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(RCe),n=je();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(uM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(uM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const NCe=ut([J_,y2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),DCe=()=>{const e=je(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(NCe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(OCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(MI(v))},handleReset:()=>{e(MI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function zCe(){const e={boundingBox:{header:"Bounding Box",feature:Wi.BOUNDING_BOX,content:x(MCe,{})},seamCorrection:{header:"Seam Correction",feature:Wi.SEAM_CORRECTION,content:x(LCe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Wi.INFILL_AND_SCALING,content:x(DCe,{})},seed:{header:"Seed",feature:Wi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Wi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(nk,{accordionInfo:e})]})}const BCe=ut(Rn,hH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),FCe=()=>{const e=je(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(BCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(i?OSe():ck()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(s2,{thickness:"2px",speed:"1s",size:"xl"})})};var $Ce=Math.PI/180;function HCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:HCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*$Ce:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var WCe="[object Array]",VCe="[object Number]",UCe="[object String]",GCe="[object Boolean]",jCe=Math.PI/180,YCe=180/Math.PI,Vw="#",qCe="",KCe="0",XCe="Konva warning: ",jM="Konva error: ",ZCe="rgb(",Uw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},QCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const JCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===WCe},_isNumber(e){return Object.prototype.toString.call(e)===VCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===UCe},_isBoolean(e){return Object.prototype.toString.call(e)===GCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&JCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Vw,qCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=KCe+e;return Vw+e},getRGB(e){var t;return e in Uw?(t=Uw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Vw?this._hexToRgb(e.substring(1)):e.substr(0,4)===ZCe?(t=QCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Uw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function _k(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function e7e(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function t7e(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var tm="get",nm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=tm+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=nm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=nm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=tm+a(t),l=nm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=nm+n,i=tm+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=tm+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=tm+de._capitalize(n),a=nm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function n7e(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=r7e+u.join(YM)+i7e)):(o+=s.property,t||(o+=u7e+s.val)),o+=s7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=d7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=qM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=n7e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",KM="absoluteScale",bf="canvas",g7e="Change",m7e="children",v7e="konva",k7="listening",XM="mouseenter",ZM="mouseleave",QM="set",JM="Shape",n5=" ",eI="stage",Mc="transform",y7e="Stage",E7="visible",S7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let b7e=1;class $e{constructor(t){this._id=b7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),y=new kk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=y.getContext();return y.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(KM),this.drawScene(m,this),this.drawHit(y,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:y,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==m7e&&(r=QM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(k7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(E7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==y7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),y=this.clipY();o.rect(v,y,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=wm(e);if(t==="pointer")return rt.pointerEventsEnabled&&jw.pointer;if(t==="touch")return jw.touch;if(t==="mouse")return jw.mouse};function nI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const P7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class yb extends da{constructor(t){super(nI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{nI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===w7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(P7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+tI,this.content.style.height=n+tI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rk7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Zm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||E7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=wm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=wm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=wm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Gw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=wm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Gw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(T7,{evt:t}):this._fire(T7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Gw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,Ek(t)),Zm(t.pointerId)}_lostpointercapture(t){Zm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new kk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}yb.prototype.nodeType=x7e;gr(yb);q.addGetterSetter(yb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function Yw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Qm={};function T7e(e){e.fill()}function L7e(e){e.stroke()}function A7e(e){e.fill()}function M7e(e){e.stroke()}function I7e(){this._clearCache(qW)}function R7e(){this._clearCache(KW)}function O7e(){this._clearCache(XW)}function N7e(){this._clearCache(ZW)}function D7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Qm)););this.colorKey=n,Qm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Yw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Yw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Qm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),y=u&&this.shadowBlur()||0,w=m+y*2,E=v+y*2,P={width:w,height:E,x:-(a/2+y)+Math.min(h,0)+i.x,y:-(a/2+y)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var y=this.getAbsoluteTransform(n).getMatrix();return o.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(y){de.error("Unable to draw hit graph from cached scene canvas. "+y.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Zm(t)}}Ie.prototype._fillFunc=T7e;Ie.prototype._strokeFunc=L7e;Ie.prototype._fillFuncHit=A7e;Ie.prototype._strokeFuncHit=M7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",R7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",O7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",N7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",D7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",_k());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var z7e="#",B7e="beforeDraw",F7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],$7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new kk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<$7e;i++){const o=JW[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=de._rgbToHex(r[0],r[1],r[2]),a=Qm[z7e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(B7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(F7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Pk extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Pk.prototype.nodeType="FastLayer";gr(Pk);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var qw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:qw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=rI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=iI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===rI?this.setTime(t):this.state===iI&&this.setTime(this.duration-t)}pause(){this.state=W7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Jm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=V7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new U7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)H7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Jm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function L7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),y=r+h*(o-t);return[g,m,v,y]}function aI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-y),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;y-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],y,0);t.push(w.x,w.y)}else for(let y=h+v;ythis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(y[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=y.shift(),u+=y.shift(),k="L",T.push(l,u);break;case"L":l=y.shift(),u=y.shift(),T.push(l,u);break;case"m":var J=y.shift(),K=y.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=y.shift(),u=y.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=y.shift(),k="L",T.push(l,u);break;case"H":l=y.shift(),k="L",T.push(l,u);break;case"v":u+=y.shift(),k="L",T.push(l,u);break;case"V":u=y.shift(),k="L",T.push(l,u);break;case"C":T.push(y.shift(),y.shift(),y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"c":T.push(l+y.shift(),u+y.shift(),l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,y.shift(),y.shift()),l=y.shift(),u=y.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="C",T.push(l,u);break;case"Q":T.push(y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"q":T.push(l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=y.shift(),u=y.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=y.shift(),u+=y.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=y.shift(),$=y.shift(),j=y.shift(),le=y.shift(),W=y.shift(),Q=l,ne=u,l=y.shift(),u=y.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=y.shift(),$=y.shift(),j=y.shift(),le=y.shift(),W=y.shift(),Q=l,ne=u,l+=y.shift(),u+=y.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var y=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(y*=-1),isNaN(y)&&(y=0);var w=y*s*m/l,E=y*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),y=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-y.x,u=r[s-1]-y.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],G7e="Change.konva",j7e="none",A7="up",M7="right",I7="down",R7="left",Y7e=eV.length;class Tk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var sI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,sI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),sI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Xw(){return g3||(g3=de.createCanvasElement().getContext(X7e),g3)}function s9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function l9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function u9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(u9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(Z7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Xw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+t9e)+a9e(this.fontFamily())}_addTextLine(t){this.align()===rm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Xw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`,GM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};CCe(_Ce);var kCe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(MW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+GM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+GM.content+" "+o,style:s,children:t})})};function ECe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(wCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:y})=>ee(Ln,{children:[ee("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(R5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(M5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(I5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(q_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(kCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>y()})})]})})}function PCe(){const e=Ye(),t=Ae(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ae(FH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())};return lt("Esc",()=>{t&&e(pd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(gt,{icon:x(A5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(pd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(RH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(sH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Ln,{children:[x(ECe,{image:n.url,styleClass:"lightbox-image"}),r&&x(BH,{image:n})]})]}),x(yW,{})]})]})}const TCe=ut([J_],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),LCe=()=>{const e=Ye(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Ae(TCe);return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(TI(o))},handleReset:()=>e(TI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(PI(o))},handleReset:()=>{e(PI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:o=>{e(AI(o))},handleReset:()=>{e(AI(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(sa,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(LI(o))},handleReset:()=>{e(LI(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},ACe=ut(Rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),MCe=()=>{const e=Ye(),{boundingBoxDimensions:t}=Ae(ACe),n=a=>{e(o0({...t,width:Math.floor(a)}))},r=a=>{e(o0({...t,height:Math.floor(a)}))},i=()=>{e(o0({...t,width:Math.floor(512)}))},o=()=>{e(o0({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(sa,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},y2=e=>e.system,ICe=e=>e.system.toastQueue,RCe=ut(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function OCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ae(RCe),n=Ye();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[x(sa,{label:"Inpaint Replace",value:e,onChange:r=>{n(uM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(uM(1)),isResetDisabled:!t}),x(Ts,{isChecked:t,onChange:r=>n(KSe(r.target.checked))})]})}const NCe=ut([J_,y2,Rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxDimensions:a,boundingBoxScaleMethod:s,scaledBoundingBoxDimensions:l}=n;return{boundingBoxDimensions:a,boundingBoxScale:s,scaledBoundingBoxDimensions:l,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:s==="manual"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),DCe=()=>{const e=Ye(),{tileSize:t,infillMethod:n,boundingBoxDimensions:r,availableInfillMethods:i,boundingBoxScale:o,isManual:a,scaledBoundingBoxDimensions:s}=Ae(NCe),l=v=>{e(Zy({...s,width:Math.floor(v)}))},u=v=>{e(Zy({...s,height:Math.floor(v)}))},h=()=>{e(Zy({...s,width:Math.floor(512)}))},g=()=>{e(Zy({...s,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[x(Ol,{label:"Scale Before Processing",validValues:eSe,value:o,onChange:v=>{e(NSe(v.target.value)),e(o0(r))}}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled W",min:64,max:1024,step:64,value:s.width,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(sa,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:"Scaled H",min:64,max:1024,step:64,value:s.height,onChange:u,handleReset:g,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(OCe,{}),x(Ol,{label:"Infill Method",value:n,validValues:i,onChange:v=>e(OV(v.target.value))}),x(sa,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(MI(v))},handleReset:()=>{e(MI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function zCe(){const e={boundingBox:{header:"Bounding Box",feature:Hi.BOUNDING_BOX,content:x(MCe,{})},seamCorrection:{header:"Seam Correction",feature:Hi.SEAM_CORRECTION,content:x(LCe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Hi.INFILL_AND_SCALING,content:x(DCe,{})},seed:{header:"Seed",feature:Hi.SEED,content:x(K_,{})},variations:{header:"Variations",feature:Hi.VARIATIONS,content:x(Q_,{}),additionalHeaderComponents:x(Z_,{})}};return ee(dk,{children:[x(lk,{}),x(sk,{}),x(tk,{}),x(J$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(nk,{accordionInfo:e})]})}const BCe=ut(Rn,hH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),FCe=()=>{const e=Ye(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ae(BCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(DSe({width:a,height:s})),e(i?OSe():ck()),e(Wi(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(s2,{thickness:"2px",speed:"1s",size:"xl"})})};var $Ce=Math.PI/180;function HCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const D0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:D0,version:"8.3.14",isBrowser:HCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*$Ce:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:D0.document,_injectGlobal(e){D0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new oa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var WCe="[object Array]",VCe="[object Number]",UCe="[object String]",GCe="[object Boolean]",jCe=Math.PI/180,YCe=180/Math.PI,Vw="#",qCe="",KCe="0",XCe="Konva warning: ",jM="Konva error: ",ZCe="rgb(",Uw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},QCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,a3=[];const JCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===WCe},_isNumber(e){return Object.prototype.toString.call(e)===VCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===UCe},_isBoolean(e){return Object.prototype.toString.call(e)===GCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){a3.push(e),a3.length===1&&JCe(function(){const t=a3;a3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Vw,qCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=KCe+e;return Vw+e},getRGB(e){var t;return e in Uw?(t=Uw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Vw?this._hexToRgb(e.substring(1)):e.substr(0,4)===ZCe?(t=QCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Uw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Ed(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function IW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function RW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function _k(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function e7e(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Ed(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function t7e(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Ed(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var tm="get",nm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=tm+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=nm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=nm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=tm+a(t),l=nm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=nm+n,i=tm+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=tm+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=tm+de._capitalize(n),a=nm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function n7e(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=r7e+u.join(YM)+i7e)):(o+=s.property,t||(o+=u7e+s.val)),o+=s7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=d7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=qM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=n7e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var t5="absoluteOpacity",l3="allEventListeners",du="absoluteTransform",KM="absoluteScale",bf="canvas",g7e="Change",m7e="children",v7e="konva",k7="listening",XM="mouseenter",ZM="mouseleave",QM="set",JM="Shape",n5=" ",eI="stage",Mc="transform",y7e="Stage",E7="visible",S7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(n5);let b7e=1;class $e{constructor(t){this._id=b7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Mc||t===du)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Mc||t===du,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(n5);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(bf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===du&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(bf)){const{scene:t,filter:n,hit:r}=this._cache.get(bf);de.releaseCanvas(t,n,r),this._cache.delete(bf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new z0({pixelRatio:a,width:i,height:o}),v=new z0({pixelRatio:a,width:0,height:0}),y=new kk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=y.getContext();return y.isCache=!0,m.isCache=!0,this._cache.delete(bf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(t5),this._clearSelfAndDescendantCache(KM),this.drawScene(m,this),this.drawHit(y,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(bf,{scene:m,filter:v,hit:y,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(bf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==m7e&&(r=QM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(k7,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(E7,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==y7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Mc),this._clearSelfAndDescendantCache(du)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new oa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Mc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Mc),this._clearSelfAndDescendantCache(du),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(t5,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;fn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=$e.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=$e.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),y=this.clipY();o.rect(v,y,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Bp=e=>{const t=wm(e);if(t==="pointer")return rt.pointerEventsEnabled&&jw.pointer;if(t==="touch")return jw.touch;if(t==="mouse")return jw.mouse};function nI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const P7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",r5=[];class yb extends da{constructor(t){super(nI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),r5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{nI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===w7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&r5.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(P7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new z0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+tI,this.content.style.height=n+tI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rk7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Zm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||E7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Bp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Bp(t.type),r=wm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||rt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Bp(t.type),r=wm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Bp(t.type),r=wm(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Gw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Bp(t.type),r=wm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Gw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P7,{evt:t}):this._fire(P7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(T7,{evt:t}):this._fire(T7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Gw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(l0,Ek(t)),Zm(t.pointerId)}_lostpointercapture(t){Zm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new z0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new kk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}yb.prototype.nodeType=x7e;gr(yb);q.addGetterSetter(yb,"container");var qW="hasShadow",KW="shadowRGBA",XW="patternImage",ZW="linearGradient",QW="radialGradient";let h3;function Yw(){return h3||(h3=de.createCanvasElement().getContext("2d"),h3)}const Qm={};function T7e(e){e.fill()}function L7e(e){e.stroke()}function A7e(e){e.fill()}function M7e(e){e.stroke()}function I7e(){this._clearCache(qW)}function R7e(){this._clearCache(KW)}function O7e(){this._clearCache(XW)}function N7e(){this._clearCache(ZW)}function D7e(){this._clearCache(QW)}class Ie extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Qm)););this.colorKey=n,Qm[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(XW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Yw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(ZW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Yw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return $e.prototype.destroy.call(this),delete Qm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),y=u&&this.shadowBlur()||0,w=m+y*2,E=v+y*2,P={width:w,height:E,x:-(a/2+y)+Math.min(h,0)+i.x,y:-(a/2+y)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var y=this.getAbsoluteTransform(n).getMatrix();return o.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(y){de.error("Unable to draw hit graph from cached scene canvas. "+y.message)}return this}hasPointerCapture(t){return DW(t,this)}setPointerCapture(t){zW(t,this)}releaseCapture(t){Zm(t)}}Ie.prototype._fillFunc=T7e;Ie.prototype._strokeFunc=L7e;Ie.prototype._fillFuncHit=A7e;Ie.prototype._strokeFuncHit=M7e;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",I7e);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",R7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",O7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",N7e);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",D7e);q.addGetterSetter(Ie,"stroke",void 0,OW());q.addGetterSetter(Ie,"strokeWidth",2,Fe());q.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ie,"hitStrokeWidth","auto",_k());q.addGetterSetter(Ie,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ie,"lineJoin");q.addGetterSetter(Ie,"lineCap");q.addGetterSetter(Ie,"sceneFunc");q.addGetterSetter(Ie,"hitFunc");q.addGetterSetter(Ie,"dash");q.addGetterSetter(Ie,"dashOffset",0,Fe());q.addGetterSetter(Ie,"shadowColor",void 0,k1());q.addGetterSetter(Ie,"shadowBlur",0,Fe());q.addGetterSetter(Ie,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);q.addGetterSetter(Ie,"shadowOffsetX",0,Fe());q.addGetterSetter(Ie,"shadowOffsetY",0,Fe());q.addGetterSetter(Ie,"fillPatternImage");q.addGetterSetter(Ie,"fill",void 0,OW());q.addGetterSetter(Ie,"fillPatternX",0,Fe());q.addGetterSetter(Ie,"fillPatternY",0,Fe());q.addGetterSetter(Ie,"fillLinearGradientColorStops");q.addGetterSetter(Ie,"strokeLinearGradientColorStops");q.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ie,"fillRadialGradientColorStops");q.addGetterSetter(Ie,"fillPatternRepeat","repeat");q.addGetterSetter(Ie,"fillEnabled",!0);q.addGetterSetter(Ie,"strokeEnabled",!0);q.addGetterSetter(Ie,"shadowEnabled",!0);q.addGetterSetter(Ie,"dashEnabled",!0);q.addGetterSetter(Ie,"strokeScaleEnabled",!0);q.addGetterSetter(Ie,"fillPriority","color");q.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ie,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ie,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);q.addGetterSetter(Ie,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ie,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ie,"fillPatternRotation",0);q.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var z7e="#",B7e="beforeDraw",F7e="draw",JW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],$7e=JW.length;class Ch extends da{constructor(t){super(t),this.canvas=new z0,this.hitCanvas=new kk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<$7e;i++){const o=JW[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=de._rgbToHex(r[0],r[1],r[2]),a=Qm[z7e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(B7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),da.prototype.drawScene.call(this,i,n),this._fire(F7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),da.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ch.prototype.nodeType="Layer";gr(Ch);q.addGetterSetter(Ch,"imageSmoothingEnabled",!0);q.addGetterSetter(Ch,"clearBeforeDraw",!0);q.addGetterSetter(Ch,"hitGraphEnabled",!0,Ms());class Pk extends Ch{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Pk.prototype.nodeType="FastLayer";gr(Pk);class a1 extends da{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}a1.prototype.nodeType="Group";gr(a1);var qw=function(){return D0.performance&&D0.performance.now?function(){return D0.performance.now()}:function(){return new Date().getTime()}}();class Na{constructor(t,n){this.id=Na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:qw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=rI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=iI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===rI?this.setTime(t):this.state===iI&&this.setTime(this.duration-t)}pause(){this.state=W7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Rr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Jm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=V7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Na(function(){n.tween.onEnterFrame()},u),this.tween=new U7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Rr.attrs[i]||(Rr.attrs[i]={}),Rr.attrs[i][this._id]||(Rr.attrs[i][this._id]={}),Rr.tweens[i]||(Rr.tweens[i]={});for(l in t)H7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,g,m;if(s=Rr.tweens[i][t],s&&delete Rr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Rr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Rr.tweens[t],i;this.pause();for(i in r)delete Rr.tweens[t][i];delete Rr.attrs[t][n]}}Rr.attrs={};Rr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Rr(e);n.play()};const Jm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function L7(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),y=r+h*(o-t);return[g,m,v,y]}function aI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-y),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;y-=v){const w=Dn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],y,0);t.push(w.x,w.y)}else for(let y=h+v;ythis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Dn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Dn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Dn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Dn.getPointOnEllipticalArc(s,l,u,h,g,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(y[0]);){var k=null,T=[],M=l,R=u,O,N,z,V,$,j,le,W,Q,ne;switch(v){case"l":l+=y.shift(),u+=y.shift(),k="L",T.push(l,u);break;case"L":l=y.shift(),u=y.shift(),T.push(l,u);break;case"m":var J=y.shift(),K=y.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=y.shift(),u=y.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=y.shift(),k="L",T.push(l,u);break;case"H":l=y.shift(),k="L",T.push(l,u);break;case"v":u+=y.shift(),k="L",T.push(l,u);break;case"V":u=y.shift(),k="L",T.push(l,u);break;case"C":T.push(y.shift(),y.shift(),y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"c":T.push(l+y.shift(),u+y.shift(),l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,y.shift(),y.shift()),l=y.shift(),u=y.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,O=a[a.length-1],O.command==="C"&&(N=l+(l-O.points[2]),z=u+(u-O.points[3])),T.push(N,z,l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="C",T.push(l,u);break;case"Q":T.push(y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"q":T.push(l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l=y.shift(),u=y.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,O=a[a.length-1],O.command==="Q"&&(N=l+(l-O.points[0]),z=u+(u-O.points[1])),l+=y.shift(),u+=y.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=y.shift(),$=y.shift(),j=y.shift(),le=y.shift(),W=y.shift(),Q=l,ne=u,l=y.shift(),u=y.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break;case"a":V=y.shift(),$=y.shift(),j=y.shift(),le=y.shift(),W=y.shift(),Q=l,ne=u,l+=y.shift(),u+=y.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,le,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Dn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var y=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(y*=-1),isNaN(y)&&(y=0);var w=y*s*m/l,E=y*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},R=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},O=R([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=R(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,O,V,h,a]}}Dn.prototype.className="Path";Dn.prototype._attrsAffectingSize=["data"];gr(Dn);q.addGetterSetter(Dn,"data");class _h extends zu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Dn.calcLength(i[i.length-4],i[i.length-3],"C",m),y=Dn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-y.x,u=r[s-1]-y.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}_h.prototype.className="Arrow";gr(_h);q.addGetterSetter(_h,"pointerLength",10,Fe());q.addGetterSetter(_h,"pointerWidth",10,Fe());q.addGetterSetter(_h,"pointerAtBeginning",!1);q.addGetterSetter(_h,"pointerAtEnding",!0);class E1 extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];gr(E1);q.addGetterSetter(E1,"radius",0,Fe());class Pd extends Ie{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Pd.prototype.className="Ellipse";Pd.prototype._centroid=!0;Pd.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Pd);q.addComponentsGetterSetter(Pd,"radius",["x","y"]);q.addGetterSetter(Pd,"radiusX",0,Fe());q.addGetterSetter(Pd,"radiusY",0,Fe());class Is extends Ie{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var eV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],G7e="Change.konva",j7e="none",A7="up",M7="right",I7="down",R7="left",Y7e=eV.length;class Tk extends a1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Eh.prototype.className="RegularPolygon";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["radius"];gr(Eh);q.addGetterSetter(Eh,"radius",0,Fe());q.addGetterSetter(Eh,"sides",0,Fe());var sI=Math.PI*2;class Ph extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,sI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),sI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ph.prototype.className="Ring";Ph.prototype._centroid=!0;Ph.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Ph);q.addGetterSetter(Ph,"innerRadius",0,Fe());q.addGetterSetter(Ph,"outerRadius",0,Fe());class Hl extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Na(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var g3;function Xw(){return g3||(g3=de.createCanvasElement().getContext(X7e),g3)}function s9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function l9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function u9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ie{constructor(t){super(u9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(Z7e,n),this}getWidth(){var t=this.attrs.width===Fp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Fp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Xw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+p3+this.fontVariant()+p3+(this.fontSize()+t9e)+a9e(this.fontFamily())}_addTextLine(t){this.align()===rm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Xw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` `),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Fp&&o!==void 0,l=a!==Fp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),y=v!==cI,w=v!==i9e&&y,E=this.ellipsis();this.textArr=[],Xw().font=this._getContextFont();for(var P=E?this._getTextWidth(Kw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var O=0,N=M.length,z="",V=0;O>>1,j=M.slice(0,$+1),le=this._getTextWidth(j)+P;le<=h?(O=$+1,z=j,V=le):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===p3||Q===lI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(p3),z.lastIndexOf(lI))+1,W>0&&(O=W,z=z.slice(0,O),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kg)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Fp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==cI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Fp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Kw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=tV(this.text()),g=this.text().split(" ").length-1,m,v,y,w=-1,E=0,P=function(){E=0;for(var le=t.dataArray,W=w+1;W0)return w=W,le[W];le[W].command==="M"&&(m={x:le[W].points[0],y:le[W].points[1]})}return{}},k=function(le){var W=t._getTextSize(le).width+r;le===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;y===void 0;)y=P(),y&&J+y.pathLengthW?v=Dn.getPointOnLine(W,m.x,m.y,y.points[0],y.points[1],m.x,m.y):y=void 0;break;case"A":var G=y.points[4],X=y.points[5],ce=y.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Dn.getPointOnEllipticalArc(y.points[0],y.points[1],y.points[2],y.points[3],E,y.points[6]);break;case"C":E===0?W>y.pathLength?E=1e-8:E=W/y.pathLength:W>Q?E+=(W-Q)/y.pathLength/2:E=Math.max(E-(Q-W)/y.pathLength/2,0),E>1&&(E=1,K=!0),v=Dn.getPointOnCubicBezier(E,y.start.x,y.start.y,y.points[0],y.points[1],y.points[2],y.points[3],y.points[4],y.points[5]);break;case"Q":E===0?E=W/y.pathLength:W>Q?E+=(W-Q)/y.pathLength:E-=(Q-W)/y.pathLength,E>1&&(E=1,K=!0),v=Dn.getPointOnQuadraticBezier(E,y.start.x,y.start.y,y.points[0],y.points[1],y.points[2],y.points[3]);break}v!==void 0&&(Q=Dn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,y=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,O=0;Oe+`.${lV}`).join(" "),dI="nodesRect",f9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],h9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const p9e="ontouchstart"in rt._global;function g9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(h9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var _4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],fI=1e8;function m9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uV(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function v9e(e,t){const n=m9e(e);return uV(e,t,n)}function y9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(f9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(dI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(dI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-fI,y:-fI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var y=m.point(v);n.push(y)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:rt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new S2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:p9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=rt.getAngle(this.rotation()),o=g9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Ie({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let le=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(le-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+le,Q=rt.getAngle(this.rotationSnapTolerance()),J=y9e(this.rotationSnaps(),W,Q)-g.rotation,K=v9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var y=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(y.x-o.x(),2)+Math.pow(y.y-o.y(),2));var w=this.findOne(".top-left").x()>y.x?-1:1,E=this.findOne(".top-left").y()>y.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(y.x-n),this.findOne(".top-left").y(y.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var y=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-y.x,2)+Math.pow(y.y-o.y(),2));var w=this.findOne(".top-right").x()y.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(y.x+n),this.findOne(".top-right").y(y.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var y=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(y.x-o.x(),2)+Math.pow(o.y()-y.y,2));var w=y.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),y=g.getTransform().copy();y.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(y);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),a1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function S9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+_4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",_4,S9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function hI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var b9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],x9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function w9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,y,w,E,P,k,T,M,R,O,N,z,V,$,j,le,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new hI,X=null,ce=G,me=null,Re=null,xe=b9e[t],Se=x9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*xe>>Se)*j,n[h+1]=(v*xe>>Se)*j,n[h+2]=(y*xe>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,y-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*xe>>Se)*j,n[l+1]=(v*xe>>Se)*j,n[l+2]=(y*xe>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,y-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&w9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const _9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const E9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,g=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var y=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=y+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],O=T,N=O>0?O:-O,z=M>0?M:-M,V=R>0?R:-R;if(z>N&&(O=M),V>N&&(O=R),O*=t,i){var $=s[E]+O,j=s[E+1]+O,le=s[E+2]+O;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=le>255?255:le<0?0:le}else{var W=n-O;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Zw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const P9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var y,w,E,P,k,T,M,R,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),O=u-v*(u-0)):(y=(i+r)*.5,w=i+v*(i-y),E=r+v*(r-y),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,O=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,O,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,R=0,O=-1),i=0;i=0&&v=0&&y=0&&v=0&&y=255*4?255:0}return a}function $9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&y=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const U9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);const j9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,IW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const Y9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},K9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` -`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=S}return(d=d?d.displayName||d.name:"")?Vl(d):""}var Ih=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function Sn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var S=d.type.contextTypes;if(!S)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in S)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Id(d,f,S){if(kr.current!==Bo)throw Error(a(168));Sn(kr,f),Sn(Gr,S)}function Gl(d,f,S){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return S;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},S,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,Sn(kr,d),Sn(Gr,Gr.current),!0}function Rd(d,f,S){var _=d.stateNode;if(!_)throw Error(a(169));S?(d=Gl(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),Sn(kr,d)):En(Gr),Sn(Gr,S)}var vi=Math.clz32?Math.clz32:Od,Rh=Math.log,Oh=Math.LN2;function Od(d){return d>>>=0,d===0?32:31-(Rh(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function jl(d,f){var S=d.pendingLanes;if(S===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=S&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=S&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=S&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0S;S++)f.push(d);return f}function ba(d,f,S){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=S}function Dd(d,f){var S=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Ui=1<<32-vi(f)+L|S<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var Kt=Ge(pe,Pt,ve[Ft],We);if(Kt===null){Pt===null&&(Pt=Br);break}d&&Pt&&Kt.alternate===null&&f(pe,Pt),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt,Pt=Br}if(Ft===ve.length)return S(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=Ge(pe,Pt,Kt.value,We);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Te=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(Kt.done)return S(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;!Kt.done;Ft++,Kt=ve.next())Kt=At(pe,Kt.value,We),Kt!==null&&(se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return Fn&&Hs(pe,Ft),Te}for(Pt=_(pe,Pt);!Kt.done;Ft++,Kt=ve.next())Kt=Hn(Pt,pe,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&Pt.delete(Kt.key===null?Ft:Kt.key),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Te}function Xo(pe,se,ve,We){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Te=ve.key,Mt=se;Mt!==null;){if(Mt.key===Te){if(Te=ve.type,Te===h){if(Mt.tag===7){S(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&Z1(Te)===Mt.type){S(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=Ca(pe,Mt,ve),se.return=pe,pe=se;break e}S(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,We,ve.key),se.return=pe,pe=se):(We=df(ve.type,ve.key,ve.props,null,pe.mode,We),We.ref=Ca(pe,se,ve),We.return=pe,pe=We)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){S(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{S(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,We),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),We)}if(ne(ve))return Pn(pe,se,ve,We);if(O(ve))return nr(pe,se,ve,We);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(S(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(S(pe,se),se=xp(ve,pe.mode,We),se.return=pe,pe=se),H(pe)):S(pe,se)}return Xo}var Ju=A2(!0),M2=A2(!1),Yd={},po=zo(Yd),_a=zo(Yd),re=zo(Yd);function ye(d){if(d===Yd)throw Error(a(174));return d}function ge(d,f){Sn(re,f),Sn(_a,d),Sn(po,Yd),d=K(f),En(po),Sn(po,d)}function Ue(){En(po),En(_a),En(re)}function Et(d){var f=ye(re.current),S=ye(po.current);f=G(S,d.type,f),S!==f&&(Sn(_a,d),Sn(po,f))}function Jt(d){_a.current===d&&(En(po),En(_a))}var Rt=zo(0);function dn(d){for(var f=d;f!==null;){if(f.tag===13){var S=f.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||$u(S)||Md(S)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var qd=[];function Q1(){for(var d=0;dS?S:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=S,ec.transition=_}}function sc(){return bi().memoizedState}function ag(d,f,S){var _=Ar(d);if(S={lane:_,action:S,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,S);else if(S=Qu(d,f,S,_),S!==null){var L=li();vo(S,d,_,L),ef(S,f,_)}}function lc(d,f,S){var _=Ar(d),L={lane:_,action:S,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,S);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Gd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}S=Qu(d,f,L,_),S!==null&&(L=li(),vo(S,d,_,L),ef(S,f,_))}}function uc(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function cc(d,f){Kd=tn=!0;var S=d.pending;S===null?f.next=f:(f.next=S.next,S.next=f),d.pending=f}function ef(d,f,S){if((S&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,S|=_,f.lanes=S,Yl(d,S)}}var ts={readContext:Gi,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},Eb={readContext:Gi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:O2,useImperativeHandle:function(d,f,S){return S=S!=null?S.concat([d]):null,Zl(4194308,4,vr.bind(null,f,d),S)},useLayoutEffect:function(d,f){return Zl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Zl(4,2,d,f)},useMemo:function(d,f){var S=qr();return f=f===void 0?null:f,d=d(),S.memoizedState=[d,f],d},useReducer:function(d,f,S){var _=qr();return f=S!==void 0?S(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=ag.bind(null,bn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:R2,useDebugValue:rg,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=R2(!1),f=d[0];return d=og.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,S){var _=bn,L=qr();if(Fn){if(S===void 0)throw Error(a(407));S=S()}else{if(S=f(),zr===null)throw Error(a(349));(Xl&30)!==0||ng(_,f,S)}L.memoizedState=S;var I={value:S,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Qd(9,oc.bind(null,_,I,S,f),void 0,null),S},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var S=xa,_=Ui;S=(_&~(1<<32-vi(_)-1)).toString(32)+S,f=":"+f+"R"+S,S=tc++,0")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=S}return(d=d?d.displayName||d.name:"")?Vl(d):""}var Ih=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function Sn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var S=d.type.contextTypes;if(!S)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in S)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Id(d,f,S){if(kr.current!==Bo)throw Error(a(168));Sn(kr,f),Sn(Gr,S)}function Gl(d,f,S){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return S;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},S,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,Sn(kr,d),Sn(Gr,Gr.current),!0}function Rd(d,f,S){var _=d.stateNode;if(!_)throw Error(a(169));S?(d=Gl(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),Sn(kr,d)):En(Gr),Sn(Gr,S)}var vi=Math.clz32?Math.clz32:Od,Rh=Math.log,Oh=Math.LN2;function Od(d){return d>>>=0,d===0?32:31-(Rh(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function jl(d,f){var S=d.pendingLanes;if(S===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=S&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=S&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=S&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0S;S++)f.push(d);return f}function ba(d,f,S){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=S}function Dd(d,f){var S=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Ui=1<<32-vi(f)+L|S<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var Kt=Ge(pe,Pt,ve[Ft],We);if(Kt===null){Pt===null&&(Pt=Br);break}d&&Pt&&Kt.alternate===null&&f(pe,Pt),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt,Pt=Br}if(Ft===ve.length)return S(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=Ge(pe,Pt,Kt.value,We);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Te=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(Kt.done)return S(pe,Pt),Fn&&Hs(pe,Ft),Te;if(Pt===null){for(;!Kt.done;Ft++,Kt=ve.next())Kt=At(pe,Kt.value,We),Kt!==null&&(se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return Fn&&Hs(pe,Ft),Te}for(Pt=_(pe,Pt);!Kt.done;Ft++,Kt=ve.next())Kt=Hn(Pt,pe,Ft,Kt.value,We),Kt!==null&&(d&&Kt.alternate!==null&&Pt.delete(Kt.key===null?Ft:Kt.key),se=I(Kt,se,Ft),Mt===null?Te=Kt:Mt.sibling=Kt,Mt=Kt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Fn&&Hs(pe,Ft),Te}function Xo(pe,se,ve,We){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Te=ve.key,Mt=se;Mt!==null;){if(Mt.key===Te){if(Te=ve.type,Te===h){if(Mt.tag===7){S(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&Z1(Te)===Mt.type){S(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=Ca(pe,Mt,ve),se.return=pe,pe=se;break e}S(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,We,ve.key),se.return=pe,pe=se):(We=df(ve.type,ve.key,ve.props,null,pe.mode,We),We.ref=Ca(pe,se,ve),We.return=pe,pe=We)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){S(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{S(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,We),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),We)}if(ne(ve))return Pn(pe,se,ve,We);if(O(ve))return nr(pe,se,ve,We);Oi(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(S(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(S(pe,se),se=xp(ve,pe.mode,We),se.return=pe,pe=se),H(pe)):S(pe,se)}return Xo}var Ju=A2(!0),M2=A2(!1),Yd={},po=zo(Yd),_a=zo(Yd),re=zo(Yd);function ye(d){if(d===Yd)throw Error(a(174));return d}function ge(d,f){Sn(re,f),Sn(_a,d),Sn(po,Yd),d=K(f),En(po),Sn(po,d)}function Ue(){En(po),En(_a),En(re)}function Et(d){var f=ye(re.current),S=ye(po.current);f=G(S,d.type,f),S!==f&&(Sn(_a,d),Sn(po,f))}function Jt(d){_a.current===d&&(En(po),En(_a))}var Rt=zo(0);function dn(d){for(var f=d;f!==null;){if(f.tag===13){var S=f.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||$u(S)||Md(S)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var qd=[];function Q1(){for(var d=0;dS?S:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=S,ec.transition=_}}function sc(){return bi().memoizedState}function ag(d,f,S){var _=Ar(d);if(S={lane:_,action:S,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,S);else if(S=Qu(d,f,S,_),S!==null){var L=li();vo(S,d,_,L),ef(S,f,_)}}function lc(d,f,S){var _=Ar(d),L={lane:_,action:S,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,S);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,Gd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}S=Qu(d,f,L,_),S!==null&&(L=li(),vo(S,d,_,L),ef(S,f,_))}}function uc(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function cc(d,f){Kd=tn=!0;var S=d.pending;S===null?f.next=f:(f.next=S.next,S.next=f),d.pending=f}function ef(d,f,S){if((S&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,S|=_,f.lanes=S,Yl(d,S)}}var ts={readContext:Gi,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},Eb={readContext:Gi,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:O2,useImperativeHandle:function(d,f,S){return S=S!=null?S.concat([d]):null,Zl(4194308,4,vr.bind(null,f,d),S)},useLayoutEffect:function(d,f){return Zl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Zl(4,2,d,f)},useMemo:function(d,f){var S=qr();return f=f===void 0?null:f,d=d(),S.memoizedState=[d,f],d},useReducer:function(d,f,S){var _=qr();return f=S!==void 0?S(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=ag.bind(null,bn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:R2,useDebugValue:rg,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=R2(!1),f=d[0];return d=og.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,S){var _=bn,L=qr();if(Fn){if(S===void 0)throw Error(a(407));S=S()}else{if(S=f(),zr===null)throw Error(a(349));(Xl&30)!==0||ng(_,f,S)}L.memoizedState=S;var I={value:S,getSnapshot:f};return L.queue=I,O2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Qd(9,oc.bind(null,_,I,S,f),void 0,null),S},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Fn){var S=xa,_=Ui;S=(_&~(1<<32-vi(_)-1)).toString(32)+S,f=":"+f+"R"+S,S=tc++,0dp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=dn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&S!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Rt.current,Sn(Rt,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),S=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==S&&(f.flags|=8192),S&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(oi(f),pt&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function pg(d,f){switch(Y1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ue(),En(Gr),En(kr),Q1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(En(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Rt),null;case 4:return Ue(),null;case 10:return Vd(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,Ib=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var S=d.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(_){jn(d,f,_)}else S.current=null}function jo(d,f,S){try{S()}catch(_){jn(d,f,_)}}var Qh=!1;function Jl(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var S=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var _=S.memoizedProps,L=S.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:pt&&Rs(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return S=Qh,Qh=!1,S}function ai(d,f,S){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,S,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var S=f=f.next;do{if((S.tag&d)===d){var _=S.create;S.destroy=_()}S=S.next}while(S!==f)}}function ep(d){var f=d.ref;if(f!==null){var S=d.stateNode;switch(d.tag){case 5:d=J(S);break;default:d=S}typeof f=="function"?f(d):f.current=d}}function gg(d){var f=d.alternate;f!==null&&(d.alternate=null,gg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,S){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(S,d,f):It(S,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,S),d=d.sibling;d!==null;)tp(d,f,S),d=d.sibling}function mg(d,f,S){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(S,d,f):ke(S,d);else if(_!==4&&(d=d.child,d!==null))for(mg(d,f,S),d=d.sibling;d!==null;)mg(d,f,S),d=d.sibling}var Sr=null,Yo=!1;function qo(d,f,S){for(S=S.child;S!==null;)Tr(d,f,S),S=S.sibling}function Tr(d,f,S){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(cn,S)}catch{}switch(S.tag){case 5:Pr||pc(S,f);case 6:if(pt){var _=Sr,L=Yo;Sr=null,qo(d,f,S),Sr=_,Yo=L,Sr!==null&&(Yo?tt(Sr,S.stateNode):ft(Sr,S.stateNode))}else qo(d,f,S);break;case 18:pt&&Sr!==null&&(Yo?W1(Sr,S.stateNode):H1(Sr,S.stateNode));break;case 4:pt?(_=Sr,L=Yo,Sr=S.stateNode.containerInfo,Yo=!0,qo(d,f,S),Sr=_,Yo=L):(ct&&(_=S.stateNode.containerInfo,L=Sa(_),Fu(_,L)),qo(d,f,S));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=S.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(S,f,H),L=L.next}while(L!==_)}qo(d,f,S);break;case 1:if(!Pr&&(pc(S,f),_=S.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=S.memoizedProps,_.state=S.memoizedState,_.componentWillUnmount()}catch(oe){jn(S,f,oe)}qo(d,f,S);break;case 21:qo(d,f,S);break;case 22:S.mode&1?(Pr=(_=Pr)||S.memoizedState!==null,qo(d,f,S),Pr=_):qo(d,f,S);break;default:qo(d,f,S)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var S=d.stateNode;S===null&&(S=d.stateNode=new Ib),f.forEach(function(_){var L=Q2.bind(null,d,_);S.has(_)||(S.add(_),_.then(L,L))})}}function go(d,f){var S=f.deletions;if(S!==null)for(var _=0;_";case ap:return":has("+(Sg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var S=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Rb(_/1960))-_,10<_){d.timeoutHandle=Je(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===S?pp.bind(null,d):null}function gp(d,f){var S=bc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=S,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var S=f.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-wg?Qs(d,0):xg|=S),Xr(d,f)}function Pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var S=li();d=Wo(d,f),d!==null&&(ba(d,f,S),Xr(d,S))}function Nb(d){var f=d.memoizedState,S=0;f!==null&&(S=f.retryLane),Pg(d,S)}function Q2(d,f){var S=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(S=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Pg(d,S)}var Tg;Tg=function(d,f,S){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&S)===0&&(f.flags&128)===0)return Di=!1,Ab(d,f,S);Di=(d.flags&131072)!==0}else Di=!1,Fn&&(f.flags&1048576)!==0&&j1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;ka(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,S),L=eg(null,f,_,d,L,S);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,K1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,X1(f,_,d,S),f=Uo(null,f,_,!0,I,S)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,S),f=f.child),f;case 16:_=f.elementType;e:{switch(ka(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=Sp(_),d=Ho(_,d),L){case 0:f=ug(null,f,_,d,S);break e;case 1:f=V2(null,f,_,d,S);break e;case 11:f=F2(null,f,_,d,S);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),S);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ug(d,f,_,L,S);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),V2(d,f,_,L,S);case 3:e:{if(U2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,E2(d,f),Vh(f,_,null,S);var H=f.memoizedState;if(_=H.element,mt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=G2(d,f,_,S,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=G2(d,f,_,S,L);break e}else for(mt&&(fo=O1(f.stateNode.containerInfo),Gn=f,Fn=!0,Oi=null,ho=!1),S=M2(f,null,_,S),f.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(Ku(),_===L){f=ns(d,f,S);break e}xi(d,f,_,S)}f=f.child}return f;case 5:return Et(f),d===null&&Fd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Me(_,L)?H=null:I!==null&&Me(_,I)&&(f.flags|=32),W2(d,f),xi(d,f,H,S),f.child;case 6:return d===null&&Fd(f),null;case 13:return j2(d,f,S);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,S):xi(d,f,_,S),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),F2(d,f,_,L,S);case 7:return xi(d,f,f.pendingProps,S),f.child;case 8:return xi(d,f,f.pendingProps.children,S),f.child;case 12:return xi(d,f,f.pendingProps.children,S),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,k2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,S);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,S&-S),fe.tag=2;var De=I.updateQueue;if(De!==null){De=De.shared;var Qe=De.pending;Qe===null?fe.next=fe:(fe.next=Qe.next,Qe.next=fe),De.pending=fe}}I.lanes|=S,fe=I.alternate,fe!==null&&(fe.lanes|=S),Ud(I.return,S,f),oe.lanes|=S;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=S,oe=H.alternate,oe!==null&&(oe.lanes|=S),Ud(H,S,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,S),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,S),L=Gi(L),_=_(L),f.flags|=1,xi(d,f,_,S),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,S);case 15:return $2(d,f,f.type,f.pendingProps,S);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ka(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,S),T2(f,_,L),X1(f,_,L,S),Uo(null,f,_,!0,d,S);case 19:return q2(d,f,S);case 22:return H2(d,f,S)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function Ea(d,f,S,_){this.tag=d,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,S,_){return new Ea(d,f,S,_)}function Lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Sp(d){if(typeof d=="function")return Lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var S=d.alternate;return S===null?(S=yo(d.tag,f,d.key,d.mode),S.elementType=d.elementType,S.type=d.type,S.stateNode=d.stateNode,S.alternate=d,d.alternate=S):(S.pendingProps=f,S.type=d.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=d.flags&14680064,S.childLanes=d.childLanes,S.lanes=d.lanes,S.child=d.child,S.memoizedProps=d.memoizedProps,S.memoizedState=d.memoizedState,S.updateQueue=d.updateQueue,f=d.dependencies,S.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},S.sibling=d.sibling,S.index=d.index,S.ref=d.ref,S}function df(d,f,S,_,L,I){var H=2;if(_=d,typeof d=="function")Lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(S.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,S,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,S,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,S,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(S,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case y:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,S,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,S,_){return d=yo(7,d,_,f),d.lanes=S,d}function bp(d,f,S,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=S,d.stateNode={isHidden:!1},d}function xp(d,f,S){return d=yo(6,d,null,f),d.lanes=S,d}function nl(d,f,S){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=S,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function ff(d,f,S,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,mt&&(this.mutableSourceEagerHydrationData=null)}function J2(d,f,S,_,L,I,H,oe,fe){return d=new ff(d,f,S,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},K1(I),d}function Ag(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var S=d.type;if(jr(S))return Gl(d,S,f)}return f}function Mg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=le(f),d===null?null:d.stateNode}function hf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var S=d.retryLane;d.retryLane=S!==0&&S=De&&I>=At&&L<=Qe&&H<=Ge){d.splice(f,1);break}else if(_!==De||S.width!==fe.width||GeH){if(!(I!==At||S.height!==fe.height||Qe<_||De>L)){De>_&&(fe.width+=De-_,fe.x=_),QeI&&(fe.height+=At-I,fe.y=I),GeS&&(S=H)),Hdp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=dn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Fn)return oi(f),null}else 2*Un()-L.renderingStartTime>dp&&S!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Rt.current,Sn(Rt,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),S=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==S&&(f.flags|=8192),S&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(oi(f),pt&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function pg(d,f){switch(Y1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ue(),En(Gr),En(kr),Q1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Jt(f),null;case 13:if(En(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Rt),null;case 4:return Ue(),null;case 10:return Vd(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,Ib=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var S=d.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(_){jn(d,f,_)}else S.current=null}function jo(d,f,S){try{S()}catch(_){jn(d,f,_)}}var Qh=!1;function Jl(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var S=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var _=S.memoizedProps,L=S.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:pt&&Rs(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return S=Qh,Qh=!1,S}function ai(d,f,S){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,S,I)}L=L.next}while(L!==_)}}function Jh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var S=f=f.next;do{if((S.tag&d)===d){var _=S.create;S.destroy=_()}S=S.next}while(S!==f)}}function ep(d){var f=d.ref;if(f!==null){var S=d.stateNode;switch(d.tag){case 5:d=J(S);break;default:d=S}typeof f=="function"?f(d):f.current=d}}function gg(d){var f=d.alternate;f!==null&&(d.alternate=null,gg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function tp(d,f,S){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(S,d,f):It(S,d);else if(_!==4&&(d=d.child,d!==null))for(tp(d,f,S),d=d.sibling;d!==null;)tp(d,f,S),d=d.sibling}function mg(d,f,S){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Bn(S,d,f):ke(S,d);else if(_!==4&&(d=d.child,d!==null))for(mg(d,f,S),d=d.sibling;d!==null;)mg(d,f,S),d=d.sibling}var Sr=null,Yo=!1;function qo(d,f,S){for(S=S.child;S!==null;)Tr(d,f,S),S=S.sibling}function Tr(d,f,S){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(cn,S)}catch{}switch(S.tag){case 5:Pr||pc(S,f);case 6:if(pt){var _=Sr,L=Yo;Sr=null,qo(d,f,S),Sr=_,Yo=L,Sr!==null&&(Yo?tt(Sr,S.stateNode):ft(Sr,S.stateNode))}else qo(d,f,S);break;case 18:pt&&Sr!==null&&(Yo?W1(Sr,S.stateNode):H1(Sr,S.stateNode));break;case 4:pt?(_=Sr,L=Yo,Sr=S.stateNode.containerInfo,Yo=!0,qo(d,f,S),Sr=_,Yo=L):(ct&&(_=S.stateNode.containerInfo,L=Sa(_),Fu(_,L)),qo(d,f,S));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=S.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(S,f,H),L=L.next}while(L!==_)}qo(d,f,S);break;case 1:if(!Pr&&(pc(S,f),_=S.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=S.memoizedProps,_.state=S.memoizedState,_.componentWillUnmount()}catch(oe){jn(S,f,oe)}qo(d,f,S);break;case 21:qo(d,f,S);break;case 22:S.mode&1?(Pr=(_=Pr)||S.memoizedState!==null,qo(d,f,S),Pr=_):qo(d,f,S);break;default:qo(d,f,S)}}function np(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var S=d.stateNode;S===null&&(S=d.stateNode=new Ib),f.forEach(function(_){var L=Q2.bind(null,d,_);S.has(_)||(S.add(_),_.then(L,L))})}}function go(d,f){var S=f.deletions;if(S!==null)for(var _=0;_";case ap:return":has("+(Sg(d)||"")+")";case sp:return'[role="'+d.value+'"]';case lp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var S=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Rb(_/1960))-_,10<_){d.timeoutHandle=Je(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===S?pp.bind(null,d):null}function gp(d,f){var S=bc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=S,f!==null&&mp(f)),d}function mp(d){wi===null?wi=d:wi.push.apply(wi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var S=f.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,fp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-wg?Qs(d,0):xg|=S),Xr(d,f)}function Pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var S=li();d=Wo(d,f),d!==null&&(ba(d,f,S),Xr(d,S))}function Nb(d){var f=d.memoizedState,S=0;f!==null&&(S=f.retryLane),Pg(d,S)}function Q2(d,f){var S=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(S=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),Pg(d,S)}var Tg;Tg=function(d,f,S){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Ni=!0;else{if((d.lanes&S)===0&&(f.flags&128)===0)return Ni=!1,Ab(d,f,S);Ni=(d.flags&131072)!==0}else Ni=!1,Fn&&(f.flags&1048576)!==0&&j1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;ka(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,S),L=eg(null,f,_,d,L,S);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,K1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,X1(f,_,d,S),f=Uo(null,f,_,!0,I,S)):(f.tag=0,Fn&&I&&yi(f),xi(null,f,L,S),f=f.child),f;case 16:_=f.elementType;e:{switch(ka(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=Sp(_),d=Ho(_,d),L){case 0:f=ug(null,f,_,d,S);break e;case 1:f=V2(null,f,_,d,S);break e;case 11:f=F2(null,f,_,d,S);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),S);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ug(d,f,_,L,S);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),V2(d,f,_,L,S);case 3:e:{if(U2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,E2(d,f),Vh(f,_,null,S);var H=f.memoizedState;if(_=H.element,mt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=G2(d,f,_,S,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=G2(d,f,_,S,L);break e}else for(mt&&(fo=O1(f.stateNode.containerInfo),Gn=f,Fn=!0,Ri=null,ho=!1),S=M2(f,null,_,S),f.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(Ku(),_===L){f=ns(d,f,S);break e}xi(d,f,_,S)}f=f.child}return f;case 5:return Et(f),d===null&&Fd(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Me(_,L)?H=null:I!==null&&Me(_,I)&&(f.flags|=32),W2(d,f),xi(d,f,H,S),f.child;case 6:return d===null&&Fd(f),null;case 13:return j2(d,f,S);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,S):xi(d,f,_,S),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),F2(d,f,_,L,S);case 7:return xi(d,f,f.pendingProps,S),f.child;case 8:return xi(d,f,f.pendingProps.children,S),f.child;case 12:return xi(d,f,f.pendingProps.children,S),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,k2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,S);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,S&-S),fe.tag=2;var De=I.updateQueue;if(De!==null){De=De.shared;var Qe=De.pending;Qe===null?fe.next=fe:(fe.next=Qe.next,Qe.next=fe),De.pending=fe}}I.lanes|=S,fe=I.alternate,fe!==null&&(fe.lanes|=S),Ud(I.return,S,f),oe.lanes|=S;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=S,oe=H.alternate,oe!==null&&(oe.lanes|=S),Ud(H,S,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,S),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,S),L=Gi(L),_=_(L),f.flags|=1,xi(d,f,_,S),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,S);case 15:return $2(d,f,f.type,f.pendingProps,S);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),ka(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,S),T2(f,_,L),X1(f,_,L,S),Uo(null,f,_,!0,d,S);case 19:return q2(d,f,S);case 22:return H2(d,f,S)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function Ea(d,f,S,_){this.tag=d,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,S,_){return new Ea(d,f,S,_)}function Lg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Sp(d){if(typeof d=="function")return Lg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var S=d.alternate;return S===null?(S=yo(d.tag,f,d.key,d.mode),S.elementType=d.elementType,S.type=d.type,S.stateNode=d.stateNode,S.alternate=d,d.alternate=S):(S.pendingProps=f,S.type=d.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=d.flags&14680064,S.childLanes=d.childLanes,S.lanes=d.lanes,S.child=d.child,S.memoizedProps=d.memoizedProps,S.memoizedState=d.memoizedState,S.updateQueue=d.updateQueue,f=d.dependencies,S.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},S.sibling=d.sibling,S.index=d.index,S.ref=d.ref,S}function df(d,f,S,_,L,I){var H=2;if(_=d,typeof d=="function")Lg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(S.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,S,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,S,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,S,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(S,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case y:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,S,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,S,_){return d=yo(7,d,_,f),d.lanes=S,d}function bp(d,f,S,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=S,d.stateNode={isHidden:!1},d}function xp(d,f,S){return d=yo(6,d,null,f),d.lanes=S,d}function nl(d,f,S){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=S,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function ff(d,f,S,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,mt&&(this.mutableSourceEagerHydrationData=null)}function J2(d,f,S,_,L,I,H,oe,fe){return d=new ff(d,f,S,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},K1(I),d}function Ag(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var S=d.type;if(jr(S))return Gl(d,S,f)}return f}function Mg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=le(f),d===null?null:d.stateNode}function hf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var S=d.retryLane;d.retryLane=S!==0&&S=De&&I>=At&&L<=Qe&&H<=Ge){d.splice(f,1);break}else if(_!==De||S.width!==fe.width||GeH){if(!(I!==At||S.height!==fe.height||Qe<_||De>L)){De>_&&(fe.width+=De-_,fe.x=_),QeI&&(fe.height+=At-I,fe.y=I),GeS&&(S=H)),H ")+` No matching component was found for: @@ -537,7 +537,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/256 `,J9e=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 -`,e8e={};function Sb(e,t,n=e8e){if(!gI&&"zIndex"in t&&(console.warn(J9e),gI=!0),!mI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Q9e),mI=!0)}for(var o in n)if(!pI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!pI[o]){var a=o.slice(0,2)==="on",y=n[o]!==t[o];if(a&&y){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Ak,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},t8e={};ch.Node.prototype._applyProps=Sb;function n8e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function r8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return Sb(l,o),l}function i8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function o8e(e,t,n){return!1}function a8e(e){return e}function s8e(){return null}function l8e(){return null}function u8e(e,t,n,r){return t8e}function c8e(){}function d8e(e){}function f8e(e,t){return!1}function h8e(){return dV}function p8e(){return dV}const g8e=setTimeout,m8e=clearTimeout,v8e=-1;function y8e(e,t){return!1}const S8e=!1,b8e=!0,x8e=!0;function w8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function C8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function _8e(e,t,n){fV(e,t,n)}function k8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function E8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function P8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function T8e(e,t,n){}function L8e(e,t,n,r,i){Sb(e,i,r)}function A8e(e){e.hide(),Ld(e)}function M8e(e){}function I8e(e,t){(t.visible==null||t.visible)&&e.show()}function R8e(e,t){}function O8e(e){}function N8e(){}const D8e=()=>Lk.exports.DefaultEventPriority,z8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:n8e,createInstance:r8e,createTextInstance:i8e,finalizeInitialChildren:o8e,getPublicInstance:a8e,prepareForCommit:s8e,preparePortalMount:l8e,prepareUpdate:u8e,resetAfterCommit:c8e,resetTextContent:d8e,shouldDeprioritizeSubtree:f8e,getRootHostContext:h8e,getChildHostContext:p8e,scheduleTimeout:g8e,cancelTimeout:m8e,noTimeout:v8e,shouldSetTextContent:y8e,isPrimaryRenderer:S8e,warnsIfNotActing:b8e,supportsMutation:x8e,appendChild:w8e,appendChildToContainer:C8e,insertBefore:fV,insertInContainerBefore:_8e,removeChild:k8e,removeChildFromContainer:E8e,commitTextUpdate:P8e,commitMount:T8e,commitUpdate:L8e,hideInstance:A8e,hideTextInstance:M8e,unhideInstance:I8e,unhideTextInstance:R8e,clearContainer:O8e,detachDeletedInstance:N8e,getCurrentEventPriority:D8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var B8e=Object.defineProperty,F8e=Object.defineProperties,$8e=Object.getOwnPropertyDescriptors,vI=Object.getOwnPropertySymbols,H8e=Object.prototype.hasOwnProperty,W8e=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?B8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SI=(e,t)=>{for(var n in t||(t={}))H8e.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))W8e.call(t,n)&&yI(e,n,t[n]);return e},V8e=(e,t)=>F8e(e,$8e(t));function Mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Ik=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:U8e,ReactCurrentDispatcher:G8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j8e(){const e=C.exports.useContext(Ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=U8e.current)!=null?r:Mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const om=[],bI=new WeakMap;function Y8e(){var e;const t=j8e();om.splice(0,om.length),Mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Ik&&om.push(hV(i))});for(const n of om){const r=(e=G8e.current)==null?void 0:e.readContext(n);bI.set(n,r)}return C.exports.useMemo(()=>om.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,V8e(SI({},i),{value:bI.get(r)}))),n=>x(pV,{...SI({},n)})),[])}function q8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const K8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=q8e(e),o=Y8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Cm.createContainer(n.current,Lk.exports.LegacyRoot,!1,null),Cm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),Cm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),Sb(n.current,e,i),Cm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",X8e="Transformer",Cm=Z9e(z8e);Cm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const Z8e=ae.forwardRef((e,t)=>x(pV,{children:x(K8e,{...e,forwardedRef:t})})),Q8e=ut([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),J8e=e=>{const{...t}=e,{objects:n}=Ae(Q8e);return x(dh,{listening:!1,...t,children:n.filter(ak).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},e_e=ut(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:sM/v,colorPickerInnerRadius:(sM-d7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),t_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:y,colorPickerOuterRadius:w}=Ae(e_e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:d7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:y,stroke:v,strokeWidth:d7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},n_e=ut(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r_e=e=>{const{...t}=e,n=je(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:y,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(n_e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Mw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Mw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Mw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Ow(!0))},z=()=>{n(Ow(!1)),n(Xy(!1))},V=()=>{n(cM(!0))},$=()=>{n(Ow(!1)),n(cM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&y==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(X8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:y==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&y==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const i_e=e=>{mV=e},Uv=()=>mV,o_e=e=>{vV=e},yV=()=>vV,a_e=ut([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),s_e=()=>{const e=je(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(a_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},l_e=ut(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),xI=e=>`data:image/svg+xml;utf8, +`,e8e={};function Sb(e,t,n=e8e){if(!gI&&"zIndex"in t&&(console.warn(J9e),gI=!0),!mI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Q9e),mI=!0)}for(var o in n)if(!pI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!pI[o]){var a=o.slice(0,2)==="on",y=n[o]!==t[o];if(a&&y){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ld(e));for(var l in v)e.on(l+Ak,v[l])}function Ld(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const dV={},t8e={};ch.Node.prototype._applyProps=Sb;function n8e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ld(e)}function r8e(e,t,n){let r=ch[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ch.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return Sb(l,o),l}function i8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function o8e(e,t,n){return!1}function a8e(e){return e}function s8e(){return null}function l8e(){return null}function u8e(e,t,n,r){return t8e}function c8e(){}function d8e(e){}function f8e(e,t){return!1}function h8e(){return dV}function p8e(){return dV}const g8e=setTimeout,m8e=clearTimeout,v8e=-1;function y8e(e,t){return!1}const S8e=!1,b8e=!0,x8e=!0;function w8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function C8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ld(e)}function fV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ld(e)}function _8e(e,t,n){fV(e,t,n)}function k8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function E8e(e,t){t.destroy(),t.off(Ak),Ld(e)}function P8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function T8e(e,t,n){}function L8e(e,t,n,r,i){Sb(e,i,r)}function A8e(e){e.hide(),Ld(e)}function M8e(e){}function I8e(e,t){(t.visible==null||t.visible)&&e.show()}function R8e(e,t){}function O8e(e){}function N8e(){}const D8e=()=>Lk.exports.DefaultEventPriority,z8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:n8e,createInstance:r8e,createTextInstance:i8e,finalizeInitialChildren:o8e,getPublicInstance:a8e,prepareForCommit:s8e,preparePortalMount:l8e,prepareUpdate:u8e,resetAfterCommit:c8e,resetTextContent:d8e,shouldDeprioritizeSubtree:f8e,getRootHostContext:h8e,getChildHostContext:p8e,scheduleTimeout:g8e,cancelTimeout:m8e,noTimeout:v8e,shouldSetTextContent:y8e,isPrimaryRenderer:S8e,warnsIfNotActing:b8e,supportsMutation:x8e,appendChild:w8e,appendChildToContainer:C8e,insertBefore:fV,insertInContainerBefore:_8e,removeChild:k8e,removeChildFromContainer:E8e,commitTextUpdate:P8e,commitMount:T8e,commitUpdate:L8e,hideInstance:A8e,hideTextInstance:M8e,unhideInstance:I8e,unhideTextInstance:R8e,clearContainer:O8e,detachDeletedInstance:N8e,getCurrentEventPriority:D8e,now:d0.exports.unstable_now,idlePriority:d0.exports.unstable_IdlePriority,run:d0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var B8e=Object.defineProperty,F8e=Object.defineProperties,$8e=Object.getOwnPropertyDescriptors,vI=Object.getOwnPropertySymbols,H8e=Object.prototype.hasOwnProperty,W8e=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?B8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SI=(e,t)=>{for(var n in t||(t={}))H8e.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))W8e.call(t,n)&&yI(e,n,t[n]);return e},V8e=(e,t)=>F8e(e,$8e(t));function Mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function hV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Ik=hV(C.exports.createContext(null));class pV extends C.exports.Component{render(){return x(Ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:U8e,ReactCurrentDispatcher:G8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j8e(){const e=C.exports.useContext(Ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=U8e.current)!=null?r:Mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const om=[],bI=new WeakMap;function Y8e(){var e;const t=j8e();om.splice(0,om.length),Mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Ik&&om.push(hV(i))});for(const n of om){const r=(e=G8e.current)==null?void 0:e.readContext(n);bI.set(n,r)}return C.exports.useMemo(()=>om.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,V8e(SI({},i),{value:bI.get(r)}))),n=>x(pV,{...SI({},n)})),[])}function q8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const K8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=q8e(e),o=Y8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Cm.createContainer(n.current,Lk.exports.LegacyRoot,!1,null),Cm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),Cm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),Sb(n.current,e,i),Cm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},v3="Layer",dh="Group",B0="Rect",xf="Circle",k4="Line",gV="Image",X8e="Transformer",Cm=Z9e(z8e);Cm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const Z8e=ae.forwardRef((e,t)=>x(pV,{children:x(K8e,{...e,forwardedRef:t})})),Q8e=ut([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),J8e=e=>{const{...t}=e,{objects:n}=Ae(Q8e);return x(dh,{listening:!1,...t,children:n.filter(ak).map((r,i)=>x(k4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},F0=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},e_e=ut(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,colorPickerColor:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,colorPickerOuterRadius:sM/v,colorPickerInnerRadius:(sM-d7+1)/v,maskColorString:F0({...a,a:.5}),brushColorString:F0(s),colorPickerColorString:F0(o),tool:l,layer:u,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),t_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,maskColorString:a,tool:s,layer:l,shouldDrawBrushPreview:u,dotRadius:h,strokeWidth:g,brushColorString:m,colorPickerColorString:v,colorPickerInnerRadius:y,colorPickerOuterRadius:w}=Ae(e_e);return u?ee(dh,{listening:!1,...t,children:[s==="colorPicker"?ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:w,stroke:m,strokeWidth:d7,strokeScaleEnabled:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:y,stroke:v,strokeWidth:d7,strokeScaleEnabled:!1})]}):ee(Ln,{children:[x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:l==="mask"?a:m,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:g*2,strokeEnabled:!0,listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:g,strokeEnabled:!0,listening:!1})]}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(xf,{x:n?n.x:r/2,y:n?n.y:i/2,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},n_e=ut(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),r_e=e=>{const{...t}=e,n=Ye(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:y,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ae(n_e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Mw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=ml(Q,64),K=ml(ne,64);W.target.x(J),W.target.y(K),n(Mw({x:J,y:K}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(o0({width:J,height:K})),n(Mw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),O=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Ow(!0))},z=()=>{n(Ow(!1)),n(Xy(!1))},V=()=>{n(cM(!0))},$=()=>{n(Ow(!1)),n(cM(!1)),n(Xy(!1))},j=()=>{n(Xy(!0))},le=()=>{!u&&!l&&n(Xy(!1))};return ee(dh,{...t,children:[x(B0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(B0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(B0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&y==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:le,onMouseOver:j,onMouseUp:$,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(X8e,{anchorCornerRadius:3,anchorDragBoundFunc:O,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:y==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&y==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let mV=null,vV=null;const i_e=e=>{mV=e},Uv=()=>mV,o_e=e=>{vV=e},yV=()=>vV,a_e=ut([Rn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),s_e=()=>{const e=Ye(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ae(a_e),i=C.exports.useRef(null),o=yV();lt("esc",()=>{e(ISe())},{enabled:()=>!0,preventDefault:!0}),lt("shift+h",()=>{e(USe(!n))},{preventDefault:!0},[t,n]),lt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(N0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(N0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},l_e=ut(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:F0(t)}}),xI=e=>`data:image/svg+xml;utf8, @@ -615,9 +615,9 @@ For more info see: https://github.com/konvajs/react-konva/issues/194 -`.replaceAll("black",e),u_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(l_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=xI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=xI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},c_e=ut([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d_e=e=>{const t=je(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(c_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},bb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=je(),t=Uv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},f_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),h_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(f_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=bb(e.current);!a||(o.evt.preventDefault(),t(ab(!0)),t(_H([a.x,a.y])))},[e,n,r,t,i])},p_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),g_e=(e,t)=>{const n=je(),{tool:r,isDrawing:i,isStaging:o}=Ae(p_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=bb(e.current);if(!a)return;n(kH([a.x,a.y]))}else t.current=!1;n(ab(!1))},[t,n,i,o,e,r])},m_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),v_e=(e,t,n)=>{const r=je(),{isDrawing:i,tool:o,isStaging:a}=Ae(m_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=bb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(kH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},y_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=e=>{const t=je(),{tool:n,isStaging:r}=Ae(y_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=bb(e.current);!o||n==="move"||r||(t(ab(!0)),t(_H([o.x,o.y])))},[e,n,r,t])},b_e=()=>{const e=je();return C.exports.useCallback(()=>{e(TH(null)),e(ab(!1))},[e])},x_e=ut([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const e=je(),{tool:t,isStaging:n}=Ae(x_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,C_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=C_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},__e=ut([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),k_e=()=>{const{objects:e}=Ae(__e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},E_e=ut([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},T_e=()=>{const{colorMode:e}=Zv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(E_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=P_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},y={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,y.x1),y1:Math.min(m.y1,y.y1),x2:Math.max(m.x2,y.x2),y2:Math.max(m.y2,y.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},L_e=ut([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),A_e=e=>{const{...t}=e,n=Ae(L_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,M_e=ut([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function I_e(){const{cursorCoordinatesString:e}=Ae(M_e);return x("div",{children:`Cursor Position: ${e}`})}const R_e=ut([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:y}=e;let w="inherit";return(y==="none"&&(o<512||a<512)||y==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),O_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(R_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(I_e,{})]})]})},N_e=ut([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),D_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(N_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},z_e=ut([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),B_e=()=>{const e=je(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(z_e),o=C.exports.useCallback(()=>{e(dM(!1))},[e]),a=C.exports.useCallback(()=>{e(dM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(rk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(dH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},F_e=ut([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let y="";return h==="move"||t?g?y="grabbing":y="grab":o?y=void 0:a?y="move":y="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:y,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(F_e);s_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{o_e($),g.current=$},[]),y=C.exports.useCallback($=>{i_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=d_e(g),k=h_e(g),T=g_e(g,E),M=v_e(g,E,w),R=S_e(g),O=b_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=w_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(Z8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(T_e,{})}),x(v3,{id:"base",ref:y,listening:!1,imageSmoothingEnabled:!1,children:x(k_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(J8e,{visible:!0,listening:!1}),x(u_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(t_e,{visible:l!=="move",listening:!1}),x(D_e,{visible:u}),h&&x(A_e,{}),x(r_e,{visible:n&&!u})]})]}),x(O_e,{}),x(B_e,{})]})})},H_e=ut([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function W_e(){const e=je(),{canUndo:t,activeTabName:n}=Ae(H_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const V_e=ut([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function U_e(){const e=je(),{canRedo:t,activeTabName:n}=Ae(V_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Rv(),m=C.exports.useRef(null),v=()=>{r(),g()},y=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(LF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(Bv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:y,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),G_e=()=>{const e=je();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(PH()),e(EH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},j_e=()=>{const e=je();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(EH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},Y_e=ut([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),q_e=()=>{const e=je(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(Y_e);return lt(["n"],()=>{e(fM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ok,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(fM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(j_e,{}),x(G_e,{})]})})};function xb(){return(xb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function O7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(wI(i.current,E,s.current)):w(!1)},y=function(){return w(!1)};function w(E){var P=l.current,k=N7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",y)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(CI(P),!function(M,R){return R&&!ev(M)}(P,l.current)&&k)){if(ev(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(wI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...xb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),wb=function(e){return e.filter(Boolean).join(" ")},Ok=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=wb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},D7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Qw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},K_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},X_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},Z_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=wb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Rk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ok,{className:"react-colorful__hue-pointer",left:t/360,color:D7({h:t,s:100,v:100,a:1})})))}),Q_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:D7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Rk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ok,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:D7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function J_e(e,t,n){var r=O7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var eke=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,tke=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_I=new Map,nke=function(e){eke(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_I.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_I.set(t,n);var r=tke();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},rke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Qw(Object.assign({},n,{a:0}))+", "+Qw(Object.assign({},n,{a:1}))+")"},o=wb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Rk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ok,{className:"react-colorful__alpha-pointer",left:n.a,color:Qw(n)})))},ike=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);nke(s);var l=J_e(n,i,o),u=l[0],h=l[1],g=wb(["react-colorful",t]);return ae.createElement("div",xb({},a,{ref:s,className:g}),x(Q_e,{hsva:u,onChange:h}),x(Z_e,{hue:u.h,onChange:h}),ae.createElement(rke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},oke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:X_e,fromHsva:K_e,equal:_V},ake=function(e){return ae.createElement(ike,xb({},e,{colorModel:oke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(ake,{className:`invokeai__color-picker ${t}`,...n})},ske=ut([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),lke=()=>{const e=je(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ske);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const uke=new Uint8Array(16);function cke(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(uke)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function dke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const fke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kI={randomUUID:fke};function c0(e,t,n){if(kI.randomUUID&&!t&&!e)return kI.randomUUID();e=e||{};const r=e.random||(e.rng||cke)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return dke(r)}const hke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},pke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},gke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},mke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=mke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,y=Uv();if(!y){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=hke(y,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(pke(M),t(mm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(gke(M,R,O),t(mm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(mm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(mm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},vke=ut([Rn,Ru,y2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),yke=()=>{const e=je(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(vke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Rw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Rw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Iw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Iw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(fH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Rw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Iw(l))})]})})]})};let EI;const EV=()=>({setOpenUploader:e=>{e&&(EI=e)},openUploader:EI}),Ske=ut([y2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),bke=()=>{const e=je(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(Ske),s=Uv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{y()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Uv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(PH()),e(ck())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},y=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(lke,{}),x(yke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(dH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:y,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(cH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(W_e,{}),x(U_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(ik,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(q_e,{})})]})},xke=ut([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),wke=()=>{const e=je(),{doesCanvasNeedScaling:t}=Ae(xke);return C.exports.useLayoutEffect(()=>{const n=qe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(bke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(FCe,{}):x($_e,{})})]})})})};function Cke(){const e=je();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(xk,{optionsPanel:x(zCe,{}),styleClass:"inpainting-workarea-overrides",children:x(wke,{})})}const _ke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function kke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Eke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(p6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(_ke,{fill:"black",boxSize:"2.5rem"}),workarea:x(Cke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Eke,{fill:"black",boxSize:"2.5rem"}),workarea:x(kke,{}),tooltip:"Training"}},Cb=qe.map(If,(e,t)=>t);[...Cb];function Pke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=je();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(i$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(n$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(t$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(r$,{className:"app-tabs-panels",children:t?x(PCe,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Tke=PV,TV=$S({name:"options",initialState:Tke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:y,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),y&&(e.height=y),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=Cb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:FTe,resetSeed:$Te,setActiveTab:ko,setAllImageToImageParameters:Lke,setAllParameters:Ake,setAllTextToImageParameters:Mke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Ike,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:z7,setInfillMethod:OV,setInitialImage:P1,setIsLightBoxOpen:pd,setIterations:Rke,setMaskPath:NV,setOptionsPanelScrollPosition:Oke,setParameter:HTe,setPerlin:DV,setPrompt:_b,setSampler:zV,setSeamBlur:PI,setSeamless:BV,setSeamSize:TI,setSeamSteps:LI,setSeamStrength:AI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Nke,setShouldHoldOptionsPanelOpen:Dke,setShouldLoopback:zke,setShouldPinOptionsPanel:Bke,setShouldRandomizeSeed:Fke,setShouldRunESRGAN:$ke,setShouldRunFacetool:Hke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:WTe,setShowDualDisplay:Wke,setSteps:WV,setThreshold:VV,setTileSize:MI,setUpscalingLevel:B7,setUpscalingStrength:F7,setVariationAmount:Vke,setWidth:UV}=TV.actions,Uke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Gke={type:"error",data:"parser error"},jke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yke=typeof ArrayBuffer=="function",qke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>jke&&t instanceof Blob?n?r(t):II(t,r):Yke&&(t instanceof ArrayBuffer||qke(t))?n?r(t):II(new Blob([t]),r):r(zl[e]+(t||"")),II=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},RI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_m=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Xke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Zke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Gke},Zke=(e,t)=>{if(Xke){const n=Kke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Qke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Jke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const tEe=setTimeout,nEe=clearTimeout;function kb(e,t){t.useNativeTimers?(e.setTimeoutFn=tEe.bind(Gc),e.clearTimeoutFn=nEe.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const rEe=1.33;function iEe(e){return typeof e=="string"?oEe(e):Math.ceil((e.byteLength||e.size)*rEe)}function oEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class aEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,kb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new aEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),$7=64,sEe={};let OI=0,b3=0,NI;function DI(e){let t="";do t=QV[e%$7]+t,e=Math.floor(e/$7);while(e>0);return t}function JV(){const e=DI(+new Date);return e!==NI?(OI=0,NI=e):e+"."+DI(OI++)}for(;b3<$7;b3++)sEe[QV[b3]]=b3;function eU(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function lEe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Jke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Qke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),kb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=cEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,zI,!1)}}function zI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,BI=!0,hEe="arraybuffer",FI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=FI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=BI&&!FI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||hEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{BI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const gEe={websocket:pEe,polling:fEe},mEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=mEe.exec(e||""),o={},a=14;for(;a--;)o[vEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=yEe(o,o.path),o.queryKey=SEe(o,o.query),o}function yEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function SEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=H7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=H7(n.host).host),kb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=lEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new gEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,CEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",_Ee=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Nk(e){return xEe&&(e instanceof ArrayBuffer||wEe(e))||CEe&&e instanceof Blob||_Ee&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class LEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=EEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const AEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:PEe,get PacketType(){return nn},Encoder:TEe,Decoder:Dk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const MEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(MEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}T1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};T1.prototype.reset=function(){this.attempts=0};T1.prototype.setMin=function(e){this.ms=e};T1.prototype.setMax=function(e){this.max=e};T1.prototype.setJitter=function(e){this.jitter=e};class U7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,kb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new T1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||AEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const am={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=am[i]&&o in am[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new U7(r,t):(am[i]||(am[i]=new U7(r,t)),l=am[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:U7,Socket:oU,io:l5,connect:l5});var IEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,REe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,OEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String($I[t]||t||$I.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},y=function(){return n?0:e.getTimezoneOffset()},w=function(){return NEe(e)},E=function(){return DEe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":zEe(e)},o:function(){return(y()>0?"-":"+")+ea(Math.floor(Math.abs(y())/60)*100+Math.abs(y())%60,4)},p:function(){return(y()>0?"-":"+")+ea(Math.floor(Math.abs(y())/60),2)+":"+ea(Math.floor(Math.abs(y())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(IEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var $I={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},HI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},y=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return y()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},NEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},DEe=function(t){var n=t.getDay();return n===0&&(n=7),n},zEe=function(t){return(String(t).match(REe)||[""]).pop().replace(OEe,"").replace(/GMT\+0000/g,"UTC")};const BEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(eM(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(iM("user")):t(u7("user")),r.categories.result.latest_mtime?t(iM("result")):t(u7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(eM(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(Cb[a]){case"img2img":{t(P1(h));break}}t(Nw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(tM()),t(Nw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Nw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(Su(!1)),t(i0(!0)),t(tM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(mm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},FEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},$Ee=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},HEe=e=>{const t=Uv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:y,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?tH(G_,j_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ct,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=FEe(et?dt.filter(ak):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ct),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&$Ee([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=y,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},WEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=HEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},VEe=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:y,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=BEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=WEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>y(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},UEe=["cursorPosition"].map(e=>`canvas.${e}`),GEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),jEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=p$({options:Uke,gallery:pbe,system:h4e,canvas:QSe}),YEe=O$.getPersistConfig({key:"root",storage:R$,rootReducer:aU,blacklist:[...UEe,...GEe,...jEe],debounce:300}),qEe=pye(YEe,aU),sU=l2e({reducer:qEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(VEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),je=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function KEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(s2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ePe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),tPe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ePe),i=t?Math.round(t*100/n):0;return x(zF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function nPe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function rPe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Rv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(nPe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Fv,{className:" modal hotkeys-modal",children:[x(h_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const iPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=je(),{name:i,status:o,description:a}=e,s=()=>{r(gH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(uB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},oPe=ut(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),aPe=()=>{const{models:e}=Ae(oPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(iPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},sPe=ut([y2,J_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),lPe=({children:e})=>{const t=je(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Rv(),{isOpen:a,onOpen:s,onClose:l}=Rv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(sPe),y=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Fv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(h_,{className:"modal-close-btn"}),ee(Bv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(aPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(iH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:y,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Fv,{children:x(Bv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},uPe=ut(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),cPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(uPe),s=je();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(oH())},className:`status ${l}`,children:u})})},dPe=["dark","light","green"];function fPe(){const{setColorMode:e}=Zv(),t=je(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Ike(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(fB,{align:"stretch",children:dPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(rk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const hPe=ut([y2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),pPe=()=>{const e=je(),{models:t,activeModel:n,isProcessing:r}=Ae(hPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(gH(o.target.value))}})})},gPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(cPe,{}),x(pPe,{}),x(rPe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(fPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(lPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ok,{})})})]})]}),mPe=ut(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),vPe=ut(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),yPe=()=>{const e=je(),t=Ae(mPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(vPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(oH()),e(Lw(!n))};return lt("`",()=>{e(Lw(!n))},[n]),lt("esc",()=>{e(Lw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:y}=h;return ee("div",{className:`console-entry console-${y}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(uH,{}),onClick:l})})]})};function SPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var bPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=xPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function xPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=bPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var wPe=[".DS_Store","Thumbs.db"];function CPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&_Pe(e.dataTransfer)?[2,TPe(e.dataTransfer,e.type)]:kPe(e)?[2,EPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,PPe(e)]:[2,[]]})})}function _Pe(e){return E4(e)}function kPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function EPe(e){return Y7(e.target.files).map(function(t){return x2(t)})}function PPe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function TPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=Y7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(LPe))]):[3,2];case 1:return r=i.sent(),[2,VI(uU(r))];case 2:return[2,VI(Y7(e.files).map(function(o){return x2(o)}))]}})})}function VI(e){return e.filter(function(t){return wPe.indexOf(t.name)===-1})}function Y7(e){if(e===null)return[];for(var t=[],n=0;n`.replaceAll("black",e),u_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ae(l_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=xI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=xI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(B0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},c_e=ut([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),d_e=e=>{const t=Ye(),{isMoveStageKeyHeld:n,stageScale:r}=Ae(c_e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=qe.clamp(r*SSe**s,bSe,xSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(XSe(l)),t(MH(u))},[e,n,r,t])},bb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},SV=()=>{const e=Ye(),t=Uv(),n=yV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Wp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(ESe())}}},f_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),h_e=e=>{const t=Ye(),{tool:n,isStaging:r}=Ae(f_e),{commitColorUnderCursor:i}=SV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(m4(!0));return}if(n==="colorPicker"){i();return}const a=bb(e.current);!a||(o.evt.preventDefault(),t(ab(!0)),t(_H([a.x,a.y])))},[e,n,r,t,i])},p_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),g_e=(e,t)=>{const n=Ye(),{tool:r,isDrawing:i,isStaging:o}=Ae(p_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(m4(!1));return}if(!t.current&&i&&e.current){const a=bb(e.current);if(!a)return;n(kH([a.x,a.y]))}else t.current=!1;n(ab(!1))},[t,n,i,o,e,r])},m_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),v_e=(e,t,n)=>{const r=Ye(),{isDrawing:i,tool:o,isStaging:a}=Ae(m_e),{updateColorUnderCursor:s}=SV();return C.exports.useCallback(()=>{if(!e.current)return;const l=bb(e.current);if(!!l){if(r(TH(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(kH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},y_e=ut([_r,Rn,Ru],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),S_e=e=>{const t=Ye(),{tool:n,isStaging:r}=Ae(y_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=bb(e.current);!o||n==="move"||r||(t(ab(!0)),t(_H([o.x,o.y])))},[e,n,r,t])},b_e=()=>{const e=Ye();return C.exports.useCallback(()=>{e(TH(null)),e(ab(!1))},[e])},x_e=ut([Rn,Ru],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),w_e=()=>{const e=Ye(),{tool:t,isStaging:n}=Ae(x_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(MH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(m4(!1))},[e,n,t])}};var wf=C.exports,C_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const bV=e=>{const{url:t,x:n,y:r}=e,[i]=C_e(t);return x(gV,{x:n,y:r,image:i,listening:!1})},__e=ut([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),k_e=()=>{const{objects:e}=Ae(__e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(g4(t))return x(bV,{x:t.x,y:t.y,url:t.image.url},n);if(tSe(t))return x(k4,{points:t.points,stroke:t.color?F0(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},E_e=ut([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),P_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},T_e=()=>{const{colorMode:e}=Zv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ae(E_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=P_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},y={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,y.x1),y1:Math.min(m.y1,y.y1),x2:Math.max(m.x2,y.x2),y2:Math.max(m.y2,y.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=qe.range(0,T).map(N=>x(k4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),O=qe.range(0,M).map(N=>x(k4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(O))},[t,n,r,e,a]),x(dh,{children:i})},L_e=ut([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),A_e=e=>{const{...t}=e,n=Ae(L_e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(gV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},u0=e=>Math.round(e*100)/100,M_e=ut([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${u0(n)}, ${u0(r)})`}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function I_e(){const{cursorCoordinatesString:e}=Ae(M_e);return x("div",{children:`Cursor Position: ${e}`})}const R_e=ut([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:y}=e;let w="inherit";return(y==="none"&&(o<512||a<512)||y==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${u0(u)}, ${u0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${u0(r)}\xD7${u0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none"}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),O_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Ae(R_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${u}%`}),g&&x("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&x("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Ln,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${l}`}),x("div",{children:`Canvas Position: ${s}`}),x(I_e,{})]})]})},N_e=ut([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),D_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ae(N_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(bV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(B0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(B0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},z_e=ut([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),B_e=()=>{const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ae(z_e),o=C.exports.useCallback(()=>{e(dM(!1))},[e]),a=C.exports.useCallback(()=>{e(dM(!0))},[e]);lt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),lt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),lt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(ASe()),l=()=>e(LSe()),u=()=>e(PSe());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(k4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(E4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(rk,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(N4e,{}):x(O4e,{}),onClick:()=>e(qSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(dH,{}),onClick:()=>e(lSe(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(w1,{}),onClick:()=>e(TSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},F_e=ut([Rn,Ru],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let y="";return h==="move"||t?g?y="grabbing":y="grab":o?y=void 0:a?y="move":y="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:y,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),$_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ae(F_e);s_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{o_e($),g.current=$},[]),y=C.exports.useCallback($=>{i_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=d_e(g),k=h_e(g),T=g_e(g,E),M=v_e(g,E,w),R=S_e(g),O=b_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=w_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(Z8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:O,onMouseMove:M,onMouseOut:O,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(v3,{id:"grid",visible:r,children:x(T_e,{})}),x(v3,{id:"base",ref:y,listening:!1,imageSmoothingEnabled:!1,children:x(k_e,{})}),ee(v3,{id:"mask",visible:e,listening:!1,children:[x(J8e,{visible:!0,listening:!1}),x(u_e,{listening:!1})]}),ee(v3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(t_e,{visible:l!=="move",listening:!1}),x(D_e,{visible:u}),h&&x(A_e,{}),x(r_e,{visible:n&&!u})]})]}),x(O_e,{}),x(B_e,{})]})})},H_e=ut([Rn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function W_e(){const e=Ye(),{canUndo:t,activeTabName:n}=Ae(H_e),r=()=>{e(ZSe())};return lt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const V_e=ut([Rn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}});function U_e(){const e=Ye(),{canRedo:t,activeTabName:n}=Ae(V_e),r=()=>{e(MSe())};return lt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const xV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Rv(),m=C.exports.useRef(null),v=()=>{r(),g()},y=()=>{o&&o(),g()};return ee(Ln,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(LF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(n1,{children:ee(AF,{className:"modal",children:[x(NS,{fontSize:"lg",fontWeight:"bold",children:s}),x(Bv,{children:a}),ee(OS,{children:[x(Wa,{ref:m,onClick:y,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),G_e=()=>{const e=Ye();return ee(xV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(uSe()),e(PH()),e(EH())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(w1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},j_e=()=>{const e=Ye();return ee(xV,{title:"Clear Canvas History",acceptCallback:()=>e(EH()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(w1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},Y_e=ut([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),q_e=()=>{const e=Ye(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ae(Y_e);return lt(["n"],()=>{e(fM(!s))},{enabled:!0,preventDefault:!0},[s]),x(nd,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(ok,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Show Intermediates",isChecked:a,onChange:u=>e(YSe(u.target.checked))}),x(Ma,{label:"Show Grid",isChecked:o,onChange:u=>e(jSe(u.target.checked))}),x(Ma,{label:"Snap to Grid",isChecked:s,onChange:u=>e(fM(u.target.checked))}),x(Ma,{label:"Darken Outside Selection",isChecked:r,onChange:u=>e(WSe(u.target.checked))}),x(Ma,{label:"Auto Save to Gallery",isChecked:t,onChange:u=>e($Se(u.target.checked))}),x(Ma,{label:"Save Box Region Only",isChecked:n,onChange:u=>e(HSe(u.target.checked))}),x(Ma,{label:"Show Canvas Debug Info",isChecked:i,onChange:u=>e(GSe(u.target.checked))}),x(j_e,{}),x(G_e,{})]})})};function xb(){return(xb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function O7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var s1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(wI(i.current,E,s.current)):w(!1)},y=function(){return w(!1)};function w(E){var P=l.current,k=N7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",y)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(CI(P),!function(M,R){return R&&!ev(M)}(P,l.current)&&k)){if(ev(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(wI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...xb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),wb=function(e){return e.filter(Boolean).join(" ")},Ok=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=wb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},CV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},D7=function(e){var t=CV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Qw=function(e){var t=CV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},K_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},X_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},Z_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=wb(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Rk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:s1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ok,{className:"react-colorful__hue-pointer",left:t/360,color:D7({h:t,s:100,v:100,a:1})})))}),Q_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:D7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Rk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:s1(t.s+100*i.left,0,100),v:s1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ok,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:D7(t)})))}),_V=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function J_e(e,t,n){var r=O7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;_V(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var eke=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,tke=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_I=new Map,nke=function(e){eke(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_I.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_I.set(t,n);var r=tke();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},rke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Qw(Object.assign({},n,{a:0}))+", "+Qw(Object.assign({},n,{a:1}))+")"},o=wb(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Rk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:s1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ok,{className:"react-colorful__alpha-pointer",left:n.a,color:Qw(n)})))},ike=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=wV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);nke(s);var l=J_e(n,i,o),u=l[0],h=l[1],g=wb(["react-colorful",t]);return ae.createElement("div",xb({},a,{ref:s,className:g}),x(Q_e,{hsva:u,onChange:h}),x(Z_e,{hue:u.h,onChange:h}),ae.createElement(rke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},oke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:X_e,fromHsva:K_e,equal:_V},ake=function(e){return ae.createElement(ike,xb({},e,{colorModel:oke}))};const kV=e=>{const{styleClass:t,...n}=e;return x(ake,{className:`invokeai__color-picker ${t}`,...n})},ske=ut([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:F0(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),lke=()=>{const e=Ye(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ae(ske);lt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),lt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(AH(t==="mask"?"base":"mask"))},a=()=>e(kSe()),s=()=>e(LH(!r));return x(nd,{trigger:"hover",triggerComponent:x(ia,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x($4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[x(Ma,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Ma,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(VSe(l.target.checked))}),x(kV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(BSe(l))}),x(ra,{size:"sm",leftIcon:x(w1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let y3;const uke=new Uint8Array(16);function cke(){if(!y3&&(y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y3(uke)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function dke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const fke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kI={randomUUID:fke};function c0(e,t,n){if(kI.randomUUID&&!t&&!e)return kI.randomUUID();e=e||{};const r=e.random||(e.rng||cke)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return dke(r)}const hke=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},pke=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},gke=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},mke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},S3=(e=mke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(f4e("Exporting Image")),t(i0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,y=Uv();if(!y){t(Su(!1)),t(i0(!0));return}const{dataURL:w,boundingBox:E}=hke(y,h,v,i?{...g,...m}:void 0);if(!w){t(Su(!1)),t(i0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:O}=T,N={uuid:c0(),category:o?"result":"user",...T};a&&(pke(M),t(mm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(gke(M,R,O),t(mm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(a0({image:N,category:"result"})),t(mm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(FSe({kind:"image",layer:"base",...E,image:N})),t(mm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(Su(!1)),t(e5("Connected")),t(i0(!0))},vke=ut([Rn,Ru,y2],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),yke=()=>{const e=Ye(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ae(vke);lt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),lt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["c"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),lt(["BracketLeft"],()=>{e(Rw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["BracketRight"],()=>{e(Rw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]),lt(["shift+BracketLeft"],()=>{e(Iw({...n,a:qe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]),lt(["shift+BracketRight"],()=>{e(Iw({...n,a:qe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!0,preventDefault:!0},[n]);const o=()=>e(N0("brush")),a=()=>e(N0("eraser")),s=()=>e(N0("colorPicker"));return ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(W4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(M4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),x(gt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:x(R4e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(fH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(sa,{label:"Size",value:r,withInput:!0,onChange:l=>e(Rw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(kV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Iw(l))})]})})]})};let EI;const EV=()=>({setOpenUploader:e=>{e&&(EI=e)},openUploader:EI}),Ske=ut([y2,Rn,Ru],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),bke=()=>{const e=Ye(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ae(Ske),s=Uv(),{openUploader:l}=EV();lt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),lt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),lt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["meta+c","ctrl+c"],()=>{y()},{enabled:()=>!t,preventDefault:!0},[s,t]),lt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(N0("move")),h=()=>{const P=Uv();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(RSe({contentRect:k}))},g=()=>{e(PH()),e(ck())},m=()=>{e(S3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},y=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(S3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Ol,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:J4e,onChange:P=>{const k=P.target.value;e(AH(k)),k==="mask"&&!r&&e(LH(!0))}}),x(lke,{}),x(yke,{}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(P4e,{}),"data-selected":o==="move"||n,onClick:u}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(A4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(F4e,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(dH,{}),onClick:v,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(ib,{}),onClick:y,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(cH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(W_e,{}),x(U_e,{})]}),ee(ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(ik,{}),onClick:l}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(w1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x(q_e,{})})]})},xke=ut([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),wke=()=>{const e=Ye(),{doesCanvasNeedScaling:t}=Ae(xke);return C.exports.useLayoutEffect(()=>{e(Wi(!0));const n=qe.debounce(()=>{e(Wi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(bke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(FCe,{}):x($_e,{})})]})})})};function Cke(){return x(xk,{optionsPanel:x(zCe,{}),styleClass:"inpainting-workarea-overrides",children:x(wke,{})})}const _ke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function kke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Eke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),If={txt2img:{title:x(v5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(p6e,{}),tooltip:"Text To Image"},img2img:{title:x(p5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(d6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(_ke,{fill:"black",boxSize:"2.5rem"}),workarea:x(Cke,{}),tooltip:"Unified Canvas"},nodes:{title:x(g5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(f5e,{}),tooltip:"Nodes"},postprocess:{title:x(m5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(h5e,{}),tooltip:"Post Processing"},training:{title:x(Eke,{fill:"black",boxSize:"2.5rem"}),workarea:x(kke,{}),tooltip:"Training"}},Cb=qe.map(If,(e,t)=>t);[...Cb];function Pke(){const e=Ae(o=>o.options.activeTab),t=Ae(o=>o.options.isLightBoxOpen),n=Ye();lt("1",()=>{n(ko(0))}),lt("2",()=>{n(ko(1))}),lt("3",()=>{n(ko(2))}),lt("4",()=>{n(ko(3))}),lt("5",()=>{n(ko(4))}),lt("6",()=>{n(ko(5))}),lt("z",()=>{n(pd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(i$,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(n$,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(t$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o))},children:[x("div",{className:"app-tabs-list",children:r()}),x(r$,{className:"app-tabs-panels",children:t?x(PCe,{}):i()})]})}const PV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},Tke=PV,TV=$S({name:"options",initialState:Tke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=J3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=p4(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=J3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:g,hires_fix:m,width:v,height:y,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=p4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=J3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),y&&(e.height=y),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...PV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=Cb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:LV,resetOptionsState:FTe,resetSeed:$Te,setActiveTab:ko,setAllImageToImageParameters:Lke,setAllParameters:Ake,setAllTextToImageParameters:Mke,setCfgScale:AV,setCodeformerFidelity:MV,setCurrentTheme:Ike,setFacetoolStrength:i5,setFacetoolType:o5,setHeight:IV,setHiresFix:RV,setImg2imgStrength:z7,setInfillMethod:OV,setInitialImage:P1,setIsLightBoxOpen:pd,setIterations:Rke,setMaskPath:NV,setOptionsPanelScrollPosition:Oke,setParameter:HTe,setPerlin:DV,setPrompt:_b,setSampler:zV,setSeamBlur:PI,setSeamless:BV,setSeamSize:TI,setSeamSteps:LI,setSeamStrength:AI,setSeed:b2,setSeedWeights:FV,setShouldFitToWidthHeight:$V,setShouldGenerateVariations:Nke,setShouldHoldOptionsPanelOpen:Dke,setShouldLoopback:zke,setShouldPinOptionsPanel:Bke,setShouldRandomizeSeed:Fke,setShouldRunESRGAN:$ke,setShouldRunFacetool:Hke,setShouldShowImageDetails:HV,setShouldShowOptionsPanel:od,setShowAdvancedOptions:WTe,setShowDualDisplay:Wke,setSteps:WV,setThreshold:VV,setTileSize:MI,setUpscalingLevel:B7,setUpscalingStrength:F7,setVariationAmount:Vke,setWidth:UV}=TV.actions,Uke=TV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const a5=Object.create(null);Object.keys(zl).forEach(e=>{a5[zl[e]]=e});const Gke={type:"error",data:"parser error"},jke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yke=typeof ArrayBuffer=="function",qke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,GV=({type:e,data:t},n,r)=>jke&&t instanceof Blob?n?r(t):II(t,r):Yke&&(t instanceof ArrayBuffer||qke(t))?n?r(t):II(new Blob([t]),r):r(zl[e]+(t||"")),II=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},RI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_m=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Xke=typeof ArrayBuffer=="function",jV=(e,t)=>{if(typeof e!="string")return{type:"message",data:YV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Zke(e.substring(1),t)}:a5[n]?e.length>1?{type:a5[n],data:e.substring(1)}:{type:a5[n]}:Gke},Zke=(e,t)=>{if(Xke){const n=Kke(e);return YV(n,t)}else return{base64:!0,data:e}},YV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},qV=String.fromCharCode(30),Qke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{GV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(qV))})})},Jke=(e,t)=>{const n=e.split(qV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function XV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const tEe=setTimeout,nEe=clearTimeout;function kb(e,t){t.useNativeTimers?(e.setTimeoutFn=tEe.bind(Gc),e.clearTimeoutFn=nEe.bind(Gc)):(e.setTimeoutFn=setTimeout.bind(Gc),e.clearTimeoutFn=clearTimeout.bind(Gc))}const rEe=1.33;function iEe(e){return typeof e=="string"?oEe(e):Math.ceil((e.byteLength||e.size)*rEe)}function oEe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class aEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ZV extends Ur{constructor(t){super(),this.writable=!1,kb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new aEe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=jV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),$7=64,sEe={};let OI=0,b3=0,NI;function DI(e){let t="";do t=QV[e%$7]+t,e=Math.floor(e/$7);while(e>0);return t}function JV(){const e=DI(+new Date);return e!==NI?(OI=0,NI=e):e+"."+DI(OI++)}for(;b3<$7;b3++)sEe[QV[b3]]=b3;function eU(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function lEe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Jke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Qke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=JV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ml(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ml extends Ur{constructor(t,n){super(),kb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=XV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new nU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ml.requestsCount++,Ml.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=cEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ml.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gc?"pagehide":"unload";addEventListener(e,zI,!1)}}function zI(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const rU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),x3=Gc.WebSocket||Gc.MozWebSocket,BI=!0,hEe="arraybuffer",FI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pEe extends ZV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=FI?{}:XV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=BI&&!FI?n?new x3(t,n):new x3(t):new x3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||hEe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{BI&&this.ws.send(o)}catch{}i&&rU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=JV()),this.supportsBinary||(t.b64=1);const i=eU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!x3}}const gEe={websocket:pEe,polling:fEe},mEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H7(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=mEe.exec(e||""),o={},a=14;for(;a--;)o[vEe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=yEe(o,o.path),o.queryKey=SEe(o,o.query),o}function yEe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function SEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=H7(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=H7(n.host).host),kb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=lEe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=KV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new gEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iU=Object.prototype.toString,CEe=typeof Blob=="function"||typeof Blob<"u"&&iU.call(Blob)==="[object BlobConstructor]",_Ee=typeof File=="function"||typeof File<"u"&&iU.call(File)==="[object FileConstructor]";function Nk(e){return xEe&&(e instanceof ArrayBuffer||wEe(e))||CEe&&e instanceof Blob||_Ee&&e instanceof File}function s5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class LEe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=EEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const AEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:PEe,get PacketType(){return nn},Encoder:TEe,Decoder:Dk},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const MEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oU extends Ur{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(MEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:nn.CONNECT,data:t})}):this.packet({type:nn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:nn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}T1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};T1.prototype.reset=function(){this.attempts=0};T1.prototype.setMin=function(e){this.ms=e};T1.prototype.setMax=function(e){this.max=e};T1.prototype.setJitter=function(e){this.jitter=e};class U7 extends Ur{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,kb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new T1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||AEe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){rU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oU(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const am={};function l5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=am[i]&&o in am[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new U7(r,t):(am[i]||(am[i]=new U7(r,t)),l=am[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(l5,{Manager:U7,Socket:oU,io:l5,connect:l5});var IEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,REe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,OEe=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String($I[t]||t||$I.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},y=function(){return n?0:e.getTimezoneOffset()},w=function(){return NEe(e)},E=function(){return DEe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return HI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":zEe(e)},o:function(){return(y()>0?"-":"+")+ea(Math.floor(Math.abs(y())/60)*100+Math.abs(y())%60,4)},p:function(){return(y()>0?"-":"+")+ea(Math.floor(Math.abs(y())/60),2)+":"+ea(Math.floor(Math.abs(y())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(IEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var $I={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},HI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},y=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return y()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},NEe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},DEe=function(t){var n=t.getDay();return n===0&&(n=7),n},zEe=function(t){return(String(t).match(REe)||[""]).pop().replace(OEe,"").replace(/GMT\+0000/g,"UTC")};const BEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(eM(!0)),t(e5("Connected")),t(sSe());const r=n().gallery;r.categories.user.latest_mtime?t(iM("user")):t(u7("user")),r.categories.result.latest_mtime?t(iM("result")):t(u7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(eM(!1)),t(e5("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:c0(),...u};if(["txt2img","img2img"].includes(l)&&t(a0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(_Se({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(a0({image:{...h,category:"result"},category:"result"}))}if(o)switch(Cb[a]){case"img2img":{t(P1(h));break}}t(Nw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(sbe({uuid:c0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(a0({category:"result",image:{uuid:c0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Su(!0)),t(r4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(tM()),t(Nw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:c0(),...l}));t(abe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(a4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(a0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Nw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(NH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(LV()),a===i&&t(NV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(i4e(r)),r.infill_methods.includes("patchmatch")||t(OV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(e5("Model Changed")),t(Su(!1)),t(i0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(nM(o)),t(Su(!1)),t(i0(!0)),t(tM()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(mm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},FEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Wp.Stage({container:i,width:n,height:r}),a=new Wp.Layer,s=new Wp.Layer;a.add(new Wp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Wp.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},$Ee=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},HEe=e=>{const t=Uv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:y,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:R,seamSize:O,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldGenerateVariations:le,shouldRandomizeSeed:W,shouldRunESRGAN:Q,shouldRunFacetool:ne,steps:J,threshold:K,tileSize:G,upscalingLevel:X,upscalingStrength:ce,variationAmount:me,width:Re}=r,{shouldDisplayInProgressType:xe,saveIntermediatesInterval:Se,enableImageDebugging:Me}=o,_e={prompt:k,iterations:W||le?E:1,steps:J,cfg_scale:s,threshold:K,perlin:P,height:g,width:Re,sampler_name:T,seed:V,progress_images:xe==="full-res",progress_latents:xe==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(_e.seed=W?tH(G_,j_):V,["txt2img","img2img"].includes(n)&&(_e.seamless=R,_e.hires_fix=m),n==="img2img"&&w&&(_e.init_img=typeof w=="string"?w:w.url,_e.strength=v,_e.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:dt},boundingBoxCoordinates:_t,boundingBoxDimensions:pt,inpaintReplace:ct,shouldUseInpaintReplace:mt,stageScale:Pe,isMaskEnabled:et,shouldPreserveMaskedArea:Lt,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:St}=i,Yt={..._t,...pt},wt=FEe(et?dt.filter(ak):[],Yt);_e.init_mask=wt,_e.fit=!1,_e.init_img=a,_e.strength=v,_e.invert_mask=Lt,mt&&(_e.inpaint_replace=ct),_e.bounding_box=Yt;const Gt=t.scale();t.scale({x:1/Pe,y:1/Pe});const ln=t.getAbsolutePosition(),on=t.toDataURL({x:Yt.x+ln.x,y:Yt.y+ln.y,width:Yt.width,height:Yt.height});Me&&$Ee([{base64:wt,caption:"mask sent as init_mask"},{base64:on,caption:"image sent as init_img"}]),t.scale(Gt),_e.init_img=on,_e.progress_images=!1,it!=="none"&&(_e.inpaint_width=St.width,_e.inpaint_height=St.height),_e.seam_size=O,_e.seam_blur=M,_e.seam_strength=z,_e.seam_steps=N,_e.tile_size=G,_e.infill_method=y,_e.force_outpaint=!1}le?(_e.variation_amount=me,$&&(_e.with_variations=Mye($))):_e.variation_amount=0;let Je=!1,Xe=!1;return Q&&(Je={level:X,strength:ce}),ne&&(Xe={type:h,strength:u},h==="codeformer"&&(Xe.codeformer_fidelity=l)),Me&&(_e.enable_image_debugging=Me),{generationParameters:_e,esrganParameters:Je,facetoolParameters:Xe}},WEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Su(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(c4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=HEe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(Su(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Su(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(NH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(s4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},VEe=()=>{const{origin:e}=new URL(window.location.href),t=l5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:y,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=BEe(i),{emitGenerateImage:R,emitRunESRGAN:O,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:le,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=WEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>y(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{le();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},UEe=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),GEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),jEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),aU=p$({options:Uke,gallery:pbe,system:h4e,canvas:QSe}),YEe=O$.getPersistConfig({key:"root",storage:R$,rootReducer:aU,blacklist:[...UEe,...GEe,...jEe],debounce:300}),qEe=pye(YEe,aU),sU=l2e({reducer:qEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(VEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ye=J2e,Ae=W2e;function u5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u5=function(n){return typeof n}:u5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u5(e)}function KEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(s2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),ePe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),tPe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ae(ePe),i=t?Math.round(t*100/n):0;return x(zF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function nPe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function rPe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Rv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(nPe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:n}),ee(t1,{isOpen:t,onClose:r,children:[x(n1,{}),ee(Fv,{className:" modal hotkeys-modal",children:[x(h_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(_S,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const iPe=e=>{const{isProcessing:t,isConnected:n}=Ae(l=>l.system),r=Ye(),{name:i,status:o,description:a}=e,s=()=>{r(gH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(uB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},oPe=ut(e=>e.system,e=>{const t=qe.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),aPe=()=>{const{models:e}=Ae(oPe);return x(_S,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(iPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},sPe=ut([y2,J_],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:qe.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),lPe=({children:e})=>{const t=Ye(),n=Ae(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Rv(),{isOpen:a,onOpen:s,onClose:l}=Rv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ae(sPe),y=()=>{xU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(l4e(E))};return ee(Ln,{children:[C.exports.cloneElement(e,{onClick:i}),ee(t1,{isOpen:r,onClose:o,children:[x(n1,{}),ee(Fv,{className:"modal settings-modal",children:[x(NS,{className:"settings-modal-header",children:"Settings"}),x(h_,{className:"modal-close-btn"}),ee(Bv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(aPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Ol,{label:"Display In-Progress Images",validValues:_5e,value:u,onChange:E=>t(t4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Ts,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(iH(E.target.checked))}),x(Ts,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(o4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Ts,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(u4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:y,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(OS,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(t1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(n1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Fv,{children:x(Bv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},uPe=ut(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),cPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ae(uPe),s=Ye();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(oH())},className:`status ${l}`,children:u})})},dPe=["dark","light","green"];function fPe(){const{setColorMode:e}=Zv(),t=Ye(),n=Ae(i=>i.options.currentTheme),r=i=>{e(i),t(Ike(i))};return x(nd,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(V4e,{})}),children:x(fB,{align:"stretch",children:dPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(rk,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const hPe=ut([y2],e=>{const{isProcessing:t,model_list:n}=e,r=qe.map(n,(o,a)=>a),i=qe.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),pPe=()=>{const e=Ye(),{models:t,activeModel:n,isProcessing:r}=Ae(hPe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(Ol,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(gH(o.target.value))}})})},gPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:IH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(cPe,{}),x(pPe,{}),x(rPe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(B4e,{})})}),x(fPe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(L4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(lPe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(ok,{})})})]})]}),mPe=ut(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),vPe=ut(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),yPe=()=>{const e=Ye(),t=Ae(mPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ae(vPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(oH()),e(Lw(!n))};return lt("`",()=>{e(Lw(!n))},[n]),lt("esc",()=>{e(Lw(!1))}),ee(Ln,{children:[n&&x(HH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:y}=h;return ee("div",{className:`console-entry console-${y}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(H4e,{}):x(uH,{}),onClick:l})})]})};function SPe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var bPe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function x2(e,t){var n=xPe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function xPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=bPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var wPe=[".DS_Store","Thumbs.db"];function CPe(e){return g1(this,void 0,void 0,function(){return m1(this,function(t){return E4(e)&&_Pe(e.dataTransfer)?[2,TPe(e.dataTransfer,e.type)]:kPe(e)?[2,EPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,PPe(e)]:[2,[]]})})}function _Pe(e){return E4(e)}function kPe(e){return E4(e)&&E4(e.target)}function E4(e){return typeof e=="object"&&e!==null}function EPe(e){return Y7(e.target.files).map(function(t){return x2(t)})}function PPe(e){return g1(this,void 0,void 0,function(){var t;return m1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return x2(r)})]}})})}function TPe(e,t){return g1(this,void 0,void 0,function(){var n,r;return m1(this,function(i){switch(i.label){case 0:return e.items?(n=Y7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(LPe))]):[3,2];case 1:return r=i.sent(),[2,VI(uU(r))];case 2:return[2,VI(Y7(e.files).map(function(o){return x2(o)}))]}})})}function VI(e){return e.filter(function(t){return wPe.indexOf(t.name)===-1})}function Y7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,qI(n)];if(e.sizen)return[!1,qI(n)]}return[!0,null]}function Rf(e){return e!=null}function GPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hU(l,n),h=Gv(u,1),g=h[0],m=pU(l,r,i),v=Gv(m,1),y=v[0],w=s?s(l):null;return g&&y&&!w})}function P4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function w3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function XI(e){e.preventDefault()}function jPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YPe(e){return e.indexOf("Edge/")!==-1}function qPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return jPe(e)||YPe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function dTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,eTe),i=SU(r),o=i.open,a=T4(i,tTe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});zk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:CPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};zk.defaultProps=yU;zk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var Z7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return ZPe(n)},[n]),j=C.exports.useMemo(function(){return XPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:QI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:QI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(fTe,Z7),K=Jw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&KPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",XI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",XI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(iTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&GPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Jw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Jw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[UPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&y&&y(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,y,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ct=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){QPe(Ze)?(W(Ze),X({type:"closeDialog"})):JPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ct())},[Q,ct]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(qPe()?setTimeout(ct,0):ct())},[M,ct]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,nTe);return ur(ur(X7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,rTe),ze=X7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ct)})}function fTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},Z7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},Z7);default:return e}}function QI(){}const hTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},JI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(ob(u)):o==="img2img"&&t(P1(u))},pTe=e=>{const{children:t}=e,n=je(),r=Ae(_r),i=p2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` -`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(JI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:y,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(JI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(fk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(hTe,{isDragAccept:v,isDragReject:y,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},gTe=()=>{const e=je(),t=Ae(ICe),n=p2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ut([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),mTe=()=>{const e=je(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(fH,{})}),r&&ee(Ln,{children:[x(mH,{iconButton:!0}),x(vH,{})]})]}):null},vTe=()=>{const e=je(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Li(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(aH,{})}):null};SPe();const yTe=()=>(gTe(),ee("div",{className:"App",children:[ee(pTe,{children:[x(tPe,{}),ee("div",{className:"app-content",children:[x(gPe,{}),x(Pke,{})]}),x("div",{className:"app-console",children:x(yPe,{})})]}),x(mTe,{}),x(vTe,{})]}));const xU=bye(sU),STe=EN({key:"invokeai-style-cache",prepend:!0});t6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(JEe,{}),persistor:xU,children:x(LJ,{value:STe,children:x(Eve,{children:x(yTe,{})})})})})})); +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vU(e,t){if(!!e){if(typeof e=="string")return K7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K7(e,t)}}function K7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function dTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zk=C.exports.forwardRef(function(e,t){var n=e.children,r=T4(e,eTe),i=SU(r),o=i.open,a=T4(i,tTe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});zk.displayName="Dropzone";var yU={disabled:!1,getFilesFromEvent:CPe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};zk.defaultProps=yU;zk.propTypes={children:Nn.exports.func,accept:Nn.exports.objectOf(Nn.exports.arrayOf(Nn.exports.string)),multiple:Nn.exports.bool,preventDropOnDocument:Nn.exports.bool,noClick:Nn.exports.bool,noKeyboard:Nn.exports.bool,noDrag:Nn.exports.bool,noDragEventsBubbling:Nn.exports.bool,minSize:Nn.exports.number,maxSize:Nn.exports.number,maxFiles:Nn.exports.number,disabled:Nn.exports.bool,getFilesFromEvent:Nn.exports.func,onFileDialogCancel:Nn.exports.func,onFileDialogOpen:Nn.exports.func,useFsAccessApi:Nn.exports.bool,autoFocus:Nn.exports.bool,onDragEnter:Nn.exports.func,onDragLeave:Nn.exports.func,onDragOver:Nn.exports.func,onDrop:Nn.exports.func,onDropAccepted:Nn.exports.func,onDropRejected:Nn.exports.func,onError:Nn.exports.func,validator:Nn.exports.func};var Z7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function SU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},yU),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,O=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return ZPe(n)},[n]),j=C.exports.useMemo(function(){return XPe(n)},[n]),le=C.exports.useMemo(function(){return typeof E=="function"?E:QI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:QI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(fTe,Z7),K=Jw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Re=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&KPe()),xe=function(){!Re.current&&me&&setTimeout(function(){if(ne.current){var Ze=ne.current.files;Ze.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Re]);var Se=C.exports.useRef([]),Me=function(Ze){Q.current&&Q.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",XI,!1),document.addEventListener("drop",Me,!1)),function(){T&&(document.removeEventListener("dragover",XI),document.removeEventListener("drop",Me))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var _e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),Je=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[].concat(iTe(Se.current),[Oe.target]),w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){if(!(P4(Oe)&&!N)){var Zt=Ze.length,qt=Zt>0&&GPe({files:Ze,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),ke=Zt>0&&!qt;X({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Ze){return _e(Ze)})},[i,u,_e,N,$,a,o,s,l,V]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=w3(Oe);if(Ze&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Ze&&g&&g(Oe),!1},[g,N]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe);var Ze=Se.current.filter(function(qt){return Q.current&&Q.current.contains(qt)}),Zt=Ze.indexOf(Oe.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),w3(Oe)&&h&&h(Oe))},[Q,h,N]),_t=C.exports.useCallback(function(Oe,Ze){var Zt=[],qt=[];Oe.forEach(function(ke){var It=hU(ke,$),ze=Jw(It,2),ot=ze[0],un=ze[1],Bn=pU(ke,a,o),He=Jw(Bn,2),ft=He[0],tt=He[1],Nt=V?V(ke):null;if(ot&&ft&&!Nt)Zt.push(ke);else{var Qt=[un,tt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:ke,errors:Qt.filter(function(er){return er})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[UPe]})}),Zt.splice(0)),X({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&y&&y(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[X,s,$,a,o,l,m,v,y,V]),pt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),wt(Oe),Se.current=[],w3(Oe)&&Promise.resolve(i(Oe)).then(function(Ze){P4(Oe)&&!N||_t(Ze,Oe)}).catch(function(Ze){return _e(Ze)}),X({type:"reset"})},[i,_t,_e,N]),ct=C.exports.useCallback(function(){if(Re.current){X({type:"openDialog"}),le();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),X({type:"closeDialog"})}).catch(function(Ze){QPe(Ze)?(W(Ze),X({type:"closeDialog"})):JPe(Ze)?(Re.current=!1,ne.current?(ne.current.value=null,ne.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(Ze)});return}ne.current&&(X({type:"openDialog"}),le(),ne.current.value=null,ne.current.click())},[X,le,W,P,_t,_e,j,s]),mt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ct())},[Q,ct]),Pe=C.exports.useCallback(function(){X({type:"focus"})},[]),et=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(qPe()?setTimeout(ct,0):ct())},[M,ct]),it=function(Ze){return r?null:Ze},St=function(Ze){return R?null:it(Ze)},Yt=function(Ze){return O?null:it(Ze)},wt=function(Ze){N&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.role,ke=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,un=Oe.onDragEnter,Bn=Oe.onDragOver,He=Oe.onDragLeave,ft=Oe.onDrop,tt=T4(Oe,nTe);return ur(ur(X7({onKeyDown:St(ll(ke,mt)),onFocus:St(ll(It,Pe)),onBlur:St(ll(ze,et)),onClick:it(ll(ot,Lt)),onDragEnter:Yt(ll(un,Je)),onDragOver:Yt(ll(Bn,Xe)),onDragLeave:Yt(ll(He,dt)),onDrop:Yt(ll(ft,pt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,Q),!r&&!R?{tabIndex:0}:{}),tt)}},[Q,mt,Pe,et,Lt,Je,Xe,dt,pt,R,O,r]),ln=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),on=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Oe.refKey,Zt=Ze===void 0?"ref":Ze,qt=Oe.onChange,ke=Oe.onClick,It=T4(Oe,rTe),ze=X7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(qt,pt)),onClick:it(ll(ke,ln)),tabIndex:-1},Zt,ne);return ur(ur({},ze),It)}},[ne,n,s,pt,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Gt,getInputProps:on,rootRef:Q,inputRef:ne,open:it(ct)})}function fTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},Z7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},Z7);default:return e}}function QI(){}const hTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return lt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},JI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:c0(),category:"user",...l};t(a0({image:u,category:"user"})),o==="unifiedCanvas"?t(ob(u)):o==="img2img"&&t(P1(u))},pTe=e=>{const{children:t}=e,n=Ye(),r=Ae(_r),i=p2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=EV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` +`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(JI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:y,isDragActive:w,open:E}=SU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=R[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(JI({imageFile:O}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(fk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(hTe,{isDragAccept:v,isDragReject:y,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},gTe=()=>{const e=Ye(),t=Ae(ICe),n=p2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(d4e())},[e,n,t])},bU=ut([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:qe.isEqual}}),mTe=()=>{const e=Ye(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Ae(bU),s=()=>{e(od(!0)),i&&setTimeout(()=>e(Wi(!0)),400)};return lt("f",()=>{o||t?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(a||i)&&setTimeout(()=>e(Wi(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(fH,{})}),r&&ee(Ln,{children:[x(mH,{iconButton:!0}),x(vH,{})]})]}):null},vTe=()=>{const e=Ye(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Ae(bU),a=()=>{e(rd(!0)),r&&e(Wi(!0))};return lt("f",()=>{t||i?(e(od(!1)),e(rd(!1))):(e(od(!0)),e(rd(!0))),(r||o)&&setTimeout(()=>e(Wi(!0)),400)},[t,i]),n?x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(aH,{})}):null};SPe();const yTe=()=>(gTe(),ee("div",{className:"App",children:[ee(pTe,{children:[x(tPe,{}),ee("div",{className:"app-content",children:[x(gPe,{}),x(Pke,{})]}),x("div",{className:"app-console",children:x(yPe,{})})]}),x(mTe,{}),x(vTe,{})]}));const xU=bye(sU),STe=EN({key:"invokeai-style-cache",prepend:!0});t6.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(X2e,{store:sU,children:x(lU,{loading:x(JEe,{}),persistor:xU,children:x(LJ,{value:STe,children:x(Eve,{children:x(yTe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 154920b459..b85293fad7 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ InvokeAI - A Stable Diffusion Toolkit - + From 7f3ba16cd2990062289a92efae8685038b3ba296 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sat, 26 Nov 2022 12:57:47 -0500 Subject: [PATCH 220/220] Revert "make the docstring more readable and improve the list_models logic" This reverts commit 248068fe5d57b5639ea7a87ee6cbf023104d957d. --- ldm/invoke/model_cache.py | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/ldm/invoke/model_cache.py b/ldm/invoke/model_cache.py index 3bb1b7e928..645a6fd4da 100644 --- a/ldm/invoke/model_cache.py +++ b/ldm/invoke/model_cache.py @@ -125,18 +125,15 @@ class ModelCache(object): def list_models(self) -> dict: ''' Return a dict of models in the format: - { - model_name1: { - 'status': ('active'|'cached'|'not loaded'), - 'description': description, - }, - model_name2: { etc }, - } + { model_name1: {'status': ('active'|'cached'|'not loaded'), + 'description': description, + }, + model_name2: { etc } ''' - models = {} - for name, config in self.config.items(): + result = dict() + for name in self.config: try: - description = config.description + description = self.config[name].description except ConfigAttributeError: description = '' @@ -147,13 +144,11 @@ class ModelCache(object): else: status = 'not loaded' - models = models.update( - name = { - 'status': status, - 'description': description, - }) - - return models + result[name]={ + 'status' : status, + 'description' : description + } + return result def print_models(self) -> None: '''

C`IdITI8^NMLH7Sa^$lcN=%pdJ{w_+W0 zZH;ms0-~0?Ag*PwdTw1)sFXf+dehsZNUebR8sFSJ}e$%4)P(jYPQ|?$1UX-p#PHOmNc${+|GzwPZ z5m)u4LgxunT{HN<_9${3JtO&(O7{4?=0732k_Smcrl+hLoK4@61_Ya+R|)iwB~vjK zruwTH0YaK0D*dvL$di_0?K=Pwu|jP3Gtx>a|Mr;)rZ_|A{H=PKG)mfhD?%j5dHvt4 zb~}L4sipvsKySZfx$yLPEU~WDnGKC_`8ngv-i#pfy4KJSBdSP=9E(%N0;uSng+b!m zfwh8`J%`D0v+?t;bw|38918c#b2bW`%0x2$@5wED zk!P@F>~-SU&xXGq`0rQr2DmQZ>nn_cIU-Cy!XmHz>`?`1TVnzt$}SoJaUc)?JZs~+ z@5lo_j{SJ%1osA<8~7uv8N{-vzLZPSxSyGR!9Bb`LDb&nLEDQ1p zn&x#?#IfLJ+`q4x%1b%67=p$@vkVjpAI!pOD_s;uk!EdU4n{1PbNA8v``0U`G`M|^ zMgW3$)&id8cyEUP4G{sbhz6+1R{Smjt1;Bp`v~oB9rat`P#FMOq{n9rkJB){D51@n zF*F%P!h_zs^TfnZl9Q>F?T+Cx<_6R+q1U{0Z#MB}MGKKb7XFKtHLsEv5grfvVjRv+ z1yg*Xx_~mW^Q?wL0k`x7O0nxvW`jm@DO88ITz_Fm#z3dT>cyZG$A>~UqoPqaz+6aP zd$L<`NMG}?`tE$C@Tn(!$SqDZAhO%+x<%ffcsMrsF4n$1X$BZ4P9&1~JKF#QE%kE7 zK6;JGsA15nnlwhrVXMgMbm92Nf|J&A`>XU@Snl;O8c$|)$}hksFfIVo83l+B-NS$| zh2z!&-VgA8(7t9>8U=2T=cQe>TSV#=hR{IecOM`UU$H zI|<@kLd7*j0-;bUW>Q+tW)%$0wZN8uz`o!MSj*$bfv*MZCyK20Hf&ZdDJ2%bOk*~g zDZ_Z3XjEX*6|O?%yp#tQC*#2C*~z2_#}9zM$KY85g0d!n*R@SfTASxQjKH4oGsd4|FnrY7y z&JBRJpnAV2!enX0xr(Gl^Sn#Dxt&A+03ZNKL_t(oY9QS|2>Uaym>Q|At8Vg!n$+{U z+>y-g@MwNTMWzPd_h3Gq?STCnm?IR_+(5*;sC*P$LmShhhlcMmoVAN)G3+13f7J|2 zw$jddH)C20AiTE}*eDt^cpN4~0GI<8Dh%B3A1?YY7$&}fsE0_p=5Ov$m}J82VNZGu zkdmH6yB@}ZfMY4jyONB#%$mwUX~v1A(EuFJNTrok^qpGyxg?L*-717G+7$qJz0HXF zbl5dzXsypZ^fBQQsRs#;T8HK#nIL0NX^w4GD|8wbdU?syY(7!Z(9U>eD%aY&YL)5I zMW!OCqY1?=m^&CjBXxRPBMwo>{vU!zpF;eh;##F&YbEVkl#A0__fEmP!K56lnA;eP zgiyx0_@oJg(l>y%yZT}?EExcOGKLEG&uIBOdFtPFU%2iYHZGVA?v`2c?7iTxH}HDH zUk@&IGAm`FryG2N3VlZ9-PaXe|6Ud$hgDwqemxk&Bb0w%u=@|}ib}*hGn9fBLqQBn z<(DCwzVGw8Fs>W8H+*mG?YNfX*R$bIgfgECxbHAp)&pD?Eln5LMasP?4a+sk8_XsT z^g5?8jB0VB+8$oCOd-SGU&u;R;2c8)*_kH=Oj(72L|)sHWt#*MbZa^7Ly2X)?{Cyv z3R~l4t$@X3ixEnz9)v&SK`Fu@fl)#}!u&EL9Fg!Xk&>3SsX{^E(Q`d%FNnXM9zQ!P z*^4~su~4vO2wetLXIFXF3c(qm*0W?yz-EDst4}3j^;u2+49WJJtzRmI>E8QjO4Xq#@akkrBxUA5!h50e;d@f;NF}h_=)! zjP0gaTa#Bo;m%kGGG{J>puk!RS0VTeyAQy8M0G=t1bX35^p$JW^TcC67UfO9d`c+F zKX39ByhUNxeriMJZ$J2uydE-5#)p)3A5r7B`FKI~r|K8wqm)0_nNiI?f;npE6hBQF zWLX4y$Pq4Fj(!^JYx9H9V`CWhWEB1~TsLrC(fMy)1M{BT_a71a=%%@V2iR)^?>D{w z2Y5ZW7>8%!o3j9rL^now@L$pH*Z#R+uM775z+MKn6N5itS%h{p*!_xPz^{pYU$j&% zU=q9%7y=$c%Wg9b0CNYXW85*u*pBgRjBDY#2JYMO_{6iKAaU)DX&cuFgXwa5FD^0o zH=%VBQ5NM$8Ris2TRZbFJas)4{}xf26s>To=m8f>qK&AzC*ox>OHIg@#x zOL3k=os884Tpcm`(+kh_>Ip61mV(-gh*NA7_2+%~WVS~5T2sn{&KOeU#cH|28bz@D z$;g)PYSw9Bwkt(|Z39={l`#+3s7S`^_jkcjd)7TcA)0Y7C6Gpk*S>r07;x=r=l*3C zMa7(U7^WVE?TrCE8#Y7vC8(w6G>D-JTP09%kP6r8X%uOaZe=*s#g^Zp;UnR||B7GY z?+r(V-pliiv;m*us?G6S!$yHsQG%X}R!w^1o{QUjc8%qgnouNJrSwQB@&042Rct&8< z|393ZbK~De$)6mH-^=5*jtIU@2z|)Lm{1Is(9PSLQkwW5w7)X@ zI+VuYce+>9FCnF2G-*G+N2XX}EmbIJDFiY?O!$;>Rihk?)mbgqS62CkrD25zO2E_T zDtxQuOD9}CT5D=WO4h#f$|?526mHBTY=JaZx5B`_(?F1*w7m;9i~Zh-itUIdLWs{y zf~B?Qt+iT%QZM233c@A*uwhIVix!uh)i42rt#`!RqS6XOM$?T*gL*tfbYN!{eCm=u zp35Lc@{q_sNs%|iR#)V@vZuO~Ipt32qvAo~?(7Nh8N)%*Z80fidiKYTc3;R@tC2ueq?UjkyNy z%9;uFEVqbl3Zdw`yfmj5+~!8py_`* zxXFkNDd8orsxwmxq$E&UeQ@YRz*5#Rb8XoQ+*ew|ILGELWs0W6)Tt09`tyJq{h%x7 z#%QCSooiP&8<)y;q%=T%7bI(?(D@RtOW2)ki@g7kiwgC-;9sJlD}}*2Zz0+G^u5U$ zmtquRjLLywL9e+;Tn3!B3q`u3 z;L=frz)`&~i~{niWo(^k1N(ro6p`lM{5y#7opd+S@aZ)P{gg@>AF815uTznc#~6*=TQST)RPGumae@n^MOC6phQ=v9fuDALQnQu= zqm9<0a*nE$N25=EC!tu)m6Y=r?nf9P3`LxVPf4#XNxR{zXAaVe4D{V-O~$K|)UgH? zKZi>>DIZ7Ty5xC?*)n3q+rpZe>d1nIRFIpJcR8?>2H0EzS2aBL`SYmXIP?d&r{TJy z7C^M;?(pY{-9E1e`}Z6E`+@&?hxh;c!FnxRi2%uF9i!v}(X#ge=D?l?Tr=|fUl;7x zg1tBFF^spv9>;!w#}|CO;g`cM;JOC(t>c0Re9pvz4NJxf021uxVSKo=E8&h>g8RnU zJI)JOj_V${*2I@1@|&v;l7KPiAq$OwOcF_gFE2)nUJANG!q9IDkzve*@}-o4vf%kV zPdx~ccWwpzNt;PD@|ZGgn2Lskb(sA94c8)K)Hot|em{V04cs0=0zUnbE{+Ni%7cY|}$wP1Mc_ zDg80per>1eVNzL@#XcIAWvpA?=qD9)4!4>&Qalur8>uE$nnth71UwUsH}5=)VN+h^ zT_*|WM>;*y55vGn(c04H9?>Sz>wx#^0zjq(@)^<-?Wv{oaS(Owo7V-Fc$Pz=wU;r# zbfrKpo(1`d15a2M1Zwn|Ek&{u&XG_6w1VlePmG;dTgd^vvv53!;Axj|U zUi!pYpLf$lDVYoTo~6O<*(gpa25Yi@w4bJoxcHK zcqsmRV%~=9o~-&&Kn;aoIvt z`wLP4tMo@C7xs=O{J(xhUgBB6^M<`Ij9(A@Sy7z#GT>E}#tR#BKEU-2OoLCuu!)Op ze~SrYypDR45i(e1J}1oY$RX~H{e%%PuZjC+u4HY7Q#O_x*7gkX#i@Z3mK08h!i;O> zk+_JNOqY07b&Zr}{?tJ#2RGJ=(sDeysVUs&jZnmGDHyB>R)b1$*VY3%4d>ugDeTLWK^7=BMO8)z;nobm^7&2`C&#fbr9=|v=Q|Y{Tn&AKPL+BY1|5=lzyP43VmMN0 z@we88sDw}b)z=xy(0SO9?Fj$RAtfI0Qb_&c3RR!DU|43kA{ihmF;LCHhUKoM{*r(- zG|!)yP~U*4y(kI_@W}fbRQ55}^ic58WsqKx#m^iu#x%pQ!4w9CGJjSIY3-W$OlWB0 zlvq^m9q+xsHx+=`I~Dk7iiabm5pWO|(baa%z#5;AD2S#OjcB;|&JwQP@1_DZ8dIgT zXU;WtJMji*vde);=}}%XWvXq^`FvX6r{Scvcq+)^Oor2eW+3ZXC1XO#3`e8k(^#5v%NDo&nNf-+T8Q6-Zb@`WZS9$zaFN7?-8@Z`tPG;qM3j-q?S3DF1)oc>eRo^Y6mz-v_UM z7uFxgdhdt;lM2KeqFG&VUNRJ8{>t@Uo6M^^F$79 z0GI>!ePNG3SaSl?B3uCj?u$ZMgrv~dh~hn?)jlR{Zuq=0?-d0O+u=_X1@3D`!Q*zk zmtil!XY6mj%yWP9a>MGDtmJ5>Au6wwDvG9L*O^(xZ;f#BibK1W!aZJoT+=mT)nfEq zJVz=1I+=){k7l@>uecza3mwWq52zeIAuQy?p*HA&xILVDjjhSj!LJQk(gIvB( zJ0~L@nq3M|kT`;P3JdW#k$KQyzgjO4!;6&)=zNqN`vu)#25s z`hzIkTUJ{Jw<8)5IiP*n(RH)nk#=)a6sm_%6@C~86H_$|l+@W8m(RJN9RZ$ctZM-G z7`Vp3WtN>1r>lcoMGio^ang<>41|hUh|w#(k^E?YVI`bJG@JC9ME28s z5^bi7*Npbu_Ss|_P-b||yYTP%+W-$^f|>FJ{jny^&kwV$3zRG@v>Ngd*S!UB@u5>M zHQ0Brzls`id@uzqBPxIy3g5E{M{P}y{{Gi$^8%hYe)!&T zqT#}bnt;8q!Q+7+gD+Hi;MC6_jEO4nGYL=P)C3!aeR{AM*@jh&(Y2rVzuI7_=s^M6 zHOKLy@brR>sH^WS&0-VIqyo%8#X zN}-m@MyN27bfNAq6tRNQiV z?E-SU;$|*chYAIVn2uAfC{AM4yD{ zl|Z9tTAorE(T}itD#ZI4rgbW)RHK=mA;uAAL=^X>VadqOhfqO9b`0fU{8TRGI8+~v zQ=>OolEhsw#BR!qGz&jfscK)Um30|Gf^SA`OmV~L1)wyM1G#0;8(9fC?qwu6JPYLj zJLcDZ9dHPvtK?evR}=wG(ziK6=|9{x z^f=b<2hV@rc>ibN`#%rfzc;@B-T3}?JbQ;BKMj}WuFCjBvKVs60B)n?g8lH_pPD!`eC+qb*nv|i4 zP9n>%Q|OhD>t0-dcZJRVnUbzHWPKE&gK+3RO!n3N>#^I0&{JN82z9cPT}h zBJtx_(W&nIA+QNS!{Y1301#-mx9z;7X?rp|?NgSO*o-LDqd$|u9Fx*Gr` z2lO=KJWBVLVo&O9e1naQ?)SQhz?)}e$+_-&jy1^ib)YF*9IzGaI{r(p^#}>3CqjJ))1u6{deJE)h!aTSo#*X@f?<_`0#48}=-W zUlaRl!oD8hg^&cV4PVh$d>L2>IDq*FxZ)DsulFFP@Hp}npOf8 z9|Y8u+9_^ibdBM`u;q=pr>l^I~i8uA(V|9ds+H8Hpy9(@`HR+y>P72_fQIps@wHqh>B#)Ewmvby}7|p&~yH zq!iEgwc z`YaVrHv!RjIEM4&?~IhGrT|v+7lK`zQ?0IJF>J0ri;Jbq+ML=lt9`NN_*qFqMNINe zXgiSIVsrU~sg9=?j*=liy(^DsLSF~WKf*+-C0U(-6G^JU= zE(y$2u;MSjKVK!%K9ymQIdtZsxO4qggrB02nj{6s!CV=uK4xWqn_*MR$F?Su0cL=U zR$9R(a(X8K`=dWTmq6+Y`z#Rj6B$8nE}HX7Grb)R4{C7`4bPGF^CkMq3(?$y;0aKsj*l@CE0 z!=p$7(~zDjWnXp+kDWD^c4mu>#l2uNp~PJ%(g|R=VcLk3^~})Q?jGw%1?{|_>b%j4 z3!nOfuZkK5Y|BTKt6H=q?D+63?1I(YONaM_P2+6M#XZlW&zE<4sQV6CkutS$#Zjf& z6s7DQ8Ao18H<*Rv)S%L3Sf&z0^9PSM9jEnJGi=D$C2!b>s>$tIo_Mg#XLiY|^|$|3 z8kk$dy`IpWmXhzN+L#DsL0e=CCk15Bkqxj??qLwA?Y1*D9nVwse}di1s5da0HI2vl zGWn*kJ_Nx-gy__~#8@55{X^eou^Vb_6uw*^c!9&z}eD|MA#ya8LO4 zJL&@F#5E?v{{+e&6;6@WHvo7P1CBYdcN7KMwK4XExmRpK^f(~pB2aW@_};*tQraH- zvpoQ@+>fgN9sy8gXEIC^9G@?Vss2s2;N=*-;J=FX%7T^f%e25TzCa>oxAs|mpM`*e zr{fR|y4PXH4us0YHbQ_56U*nx6aT5O+xmF1L#26^A+|$=7>?&0p+#BX`9w=b?J1&! zy%?9z+4%o>HI$wo+sAuJY5(yJq^xKlWF9lGuMl<=>9u5u3UZZSf8C+2?^|`$UEfL!h&4VmV{g^g72mO!~R&^11?gR6m!flF2L7ZN<^m+0c97-`3k2Uz@tR4N4 zS^RexErn98zuB5evw&5)_A`~ij$L6eD^=vI`w=g2?UNBNkHYvl9QS1yx4|ZGUn33! z<39iF-QteD0G;doyf(i7M1}wNzYBku?|*H__XOUf5e=><$~ zQMkXNCF$D0*T(qg3;X>;=pb&$<@I9+=n0T!!mwFfX}z@JVe?5)eZ-cRyVKPD-sm z8YL(KyBnbmF@0AfA}&(}sGTymE=%fD{NoT3oeJA)pcehE z&AtFq*j8{c!J;R<+){ZZQ$rzKa;#OhHw=SQ;c8romC=mS99WA`7n=^rgg-xVFx+XG zbvf!Q@bQQuf|^%K&mI}DlrN$KMXba>VzyK+9*WCJ)Fg?77hn+~+m%sfrYga#EbOLK z3V!v>xlcH3gB_a{MsA?d^SmoTR_vP$)flYTi#Yg9qA?p1HD&5>_^1Q8?7&@D=-hf} zRODtnC{zV~#Xa5b*3r}IjG5=NbDsKp>=5h`el4RyT(z@C!jh&{yHiyPML(hBN3OEi zo%s_~p0|2wltQSd4YXbQd7a5BX*Du>Oi}WvXEvTQ<&RzTL70CS7$EG6mUX{zoJy%U zB*6$XUt#!^je|xe$)iv@z`DZKXa(~$lp7pObbH(bbO=->t$l*{xGTQiX(XJH74o5s z9s9gH#*}=+wPF(h03ZNKL_t(jlt4U|2b?9mIm2#Yy0>GuwT+U`RqA6@N>8Xa11_e; zugfrb$j>!L%lC5_<_P!NQSkS6y#FkG|6X|g+4%kE!Jn7odmCN@co;3zy!(2u=*Bnd z%;cWian9BpHYWz|Iwj1VXD5fJZO?=GEX?=9d@Wqx6Z3K4_of0K*e{3uUcmi^4~yX?zN|H|37 z^_}wXr@#?&{}5q~b7Y_hSFZB;ZXlE)Ff@mflNBxn6(^K>vP==EQh8H@Rd^A(rtXc~ zGVHMTM`(4zf@4)pGVxjYIvMR2MIilR%w?^&XD z%z=i_Y2Fo^beb!0ki18WNc3n+Bg!^+&@eqg5IX9RpzV7<9)NsyGi!>~`(;1HD#}>o zXkPP)j=^xP~I*l(imo<}3E`@At<0 z6&3!k-wWTbjep;cZwFq(@eJ1B5&s4ii^m!+=gP+z^>9@oS&%?9i9Q-@tqf{))>S!2aIAf1b2>CcFHpP4FCs@%0tR7&EzBg05r8 zV0k98ZAJms!hE82v0oPLSMxl8IGE(}fsL)bOzeCW45z%RtW7&er44W8sTJ8ZW%Kin zc+z2&>b{-dOPEQ4mGZV6x6h$JDGdb3^Ro)^TQRF2^WmQyg3(Khtkv&uhlq`6YqsC{(dn2Q*qy;J$; zToGte8l@Mx4h;es$3;H@!$z-7A*WYvi0*bAId?Mvm^Q;W$T=8fWhm5Y#^_q-NzOYy z-;KATfY98kf}Fe{bt{1yU$$KrNk!b=e0IT1%2v;hT~vUvpwhWHmF!)RB5r~o%gM4% zpW>aI%OQE7rR~OBhr2Bja5KE7Q@> zt(t%x{Co%OwnA+LtA49ai=FYKL+*$}z3vOR=p@dGDE6D>jA%F8^DOL_W4#>j*TVZd z^8N2Wz@N9{8^CJ-Zv&o#;VB=OCLa!+26zhHu#%bk+LU@~&pQBIM6i3DSG?XB`yXIO zTi*FzxV|skkK^`*=^OjCA|0>>e!l?x8Nl_x<{M-DhGFX*K=}F}jDP;YxBwe7Lz-ca zZkQRi&I)iw0rrk+|J=1WuxGS2opZo%g=7YQ7hr^|<;uGXYih}8jX@$vsXo-^JAOo% zPBG9!Hbq_uH%OT@Z}B9?#-yTQ3EofT>9pTdB2yVO#w&7fznfp61S33uD(x0yGhDA=sxI@{`ob55snUbodXxmVK3r9NsvT|ua z6ePP~-66QpyiNJfruqp~Ytrp0XB9@(zKCTTtF;NK)S{zp zCFL9>9HGfnFkNY7VUtVMWWk=4s2Qq}rxgi`X9k=-2Q2lM1mRSNKH^!5LY|6@xFPrx z*BLekpC?7^5lSA+otRbJKzZ0vyRo6PjcCpNj4H{%r~{2R94mnsbjq!J9<-paZcIP$ zQoAf>%7;&bTzEb>+gbTwx~dDUK^i(!Ua*n;6La{a={EN!1YZ454qBoPD@!JdQIb$ke~r(eBTXzwM7s9MH#Yb9960()3R=?d1&KOsYCSY zOk>(9dXE4KK({y4s$eJKAmir6x3OCONxJI0QwKwJfd;+%{7CUJf%dOSNL!oby4T(X_Ue?&5nme(QTzbJ( zGMh`66f1icz0{(P!-BeZnhGZ6e$M1z@%Bg8pP!a*k%S>D^N;U%tppzDUfQc3<_R73 z5Vw=Lx?uegYm=bjcZOz>{v7L==do7iYFldKIAo`->*x9JA5$_>o3*>RQp>l;cRJWA zzdVKzo}EU3XBxR168sp-SIZFS0au_`X*Z9C^y^AWL%Ba1I;K27=h1*C<*5vKSJ=c81)QeUhcXD-vqQzj zkw=z78YNzG^@X@HQp*EuF@MsDc!er2T}9#mF=wqwYYv(@sjC>S_^oj%P9s&g{NPt& z!bKeokDn~m4T1h``ttN3jOiN30t^^Fj^bCbZBv&g>srXVq{UoDT2r~ceCBQjtXW2Z z6yXwY4-#udt;*=i)K8OPRf%DT;j8JS5pdw71C8k4lp`$oQ!k9#y;Bkdrr?%G4ZtuS z>SLHAA_AAH|Lx-(1}Xk$<9S67|L5g+eQ*5v-uU;u@n<`}hvRLr$G;o4k~_l<*LGa) z_;SNP!|E`g66Ez#7+AncvKSLKNm$ngzJ9Sa?}okKnC~~P*B8DX;OhbIm*aT=ykkH9 zdK}+yz!uDSXpkYc1v0#xujRnilb;8BH!O2fh?@ zH3uGKUUMADEXoPTuQV~Dd? zJ(~&36l0mwovu#ipyFr{?~D*<+<5lU|sRA$EN{RIjz`luu$@#iE=B>;5yfqK+0|`sbc+7Z)8L%VjSH+oxkr(|{ zO^Ba-0`cOY_ul3rL#w0;8uCP}@dPjBk5u5o)j3*cxKzI6^}rRsOAvWRwHzUiH@8vw_7+BB3>jlhfjuc)lvJ5Eiy_J*5BjQ~O!*z^)c?%C1IlOV*zqfFX1 zdQ8E{#FeMsX?+%hR^>De7pFJK=T`Al&sB9LQ)-7Y9pammDNG!WDc@8{lIGnCcJ!$dxnc?zP>kM$4-wr?0lgujRbS?M*cia8tixXaT?7`Y7C zYPgaDf((+!aW)N5hVE#fVLD8a4^MDF*pwhj1t6voGg7GMDQGH~G%8dn3~$jPQw!dJ z!vedBS?)B7_h8FwnG2ks8eheOcdoIp%lVpM*{Uc5_jitbNCvm4;);pa6azhn4{R*5f;!^ku*Mge3@ z$Ue?M2JzxHcz=YoYuTdtl4}8{qAi8uHSc_N&=CfMQ7iQe$m;pJ90ksLmKr>@1vhzU z@QqAM$UrEgM3O5C`x4q#+zXU}t%!~en)8a8g!~iD4u+))P?kpMZo z;n;3pSnnwId)^!G?;RceUXIrv$DfzuUjVORc&xZUyV?ev;eN-xfv@ej9k{3AfBqTx zKmYf{RfJX;$t@$aID^JTElMmnEA}te3*5l|f<3=5o;T+E!SyWM?~Pw?U~LMp|2Q6J zu4FCPceEBz8XzkAEsOzq&F--K=2^R52u?$wXgUNFn4%ci&#sUQqXC|Uf4tR88Nj2N z%2v@LN@2HwgCxW_kN^`CAT6(xM1Rm{{GTp=z}z~eANQTg(-JKu5c0X{&5t$-dbM_N z2BZ{EzLY?;Q&}DALjtLO|JT=tV(GmM`riMtvU7z<o!5jRwPWjE;?3jW9sqMOz&4_YNn@^Qn2u1AgMwW9k+-t}Sb{KM zDlao>tqiPAaRp@xZg==9IQR9rLdiUBEsOR%DZJ5FkxY(39@8AE2(oBUkJvCCJB%~` z-i*PzUOe^lC1XJFNmNBXp?E&wO#=>ESKn9Hd8(zbQqFrh5|l@t<2H(E#e;G$vmV1k zxk(fnWD1q?1|5vDtmAzpA5VD1)I8IqLPjV^PrUS{not)B;R){}Yb)-dH?S=lfO4|IhdO ze+hfjHAiw>Nz_2PONz|up8Ng}dB4+Ll@TGi6PO=>0dQr`OjN~^l8Y-A!$J_>&xPk{ z_!i)Myw^M7dV687-GG|{yBcl=+y`)fO#J+7!;hbvr}Ne4uEIAHO!|(1%rM}W^B6o( z@76!I9pionjuUzu*pCzYOL1R@^HjWEr&lWrMf+Te@qM~CcL-#Edj0NDuyX`cnL_p% z_#*_PwV?q`kw~~*Mpz`4Le&^y(2O*A(xA1NHF)EhGZydP?r!BWSmM135GE54#in*h zH{`&`IIX0h@5wvA3xzkJCe>Z+R%0G%4_v=egl7D*6htR*%SlKvM2#es1S_{?m9JQa zI?mKT*x0x$;G7TLR`T9u3B!mkJ8&3pZ(mg2+nl{Wt%iJ@1|Vn|zkRj~uv*i%s97n^ z_G*c}Za?r9Dj=@YfSG#YQcOVLZo9z~DGVo`(NTUQnE(9O0Y8q5qqtq~B&408}L%{_MPCj%9<&U2ij);!j+ z0FMh>Xn6JL8cASL^Z_&X49F~Hm9*dXR@#`UAb9MPPqkP>xznwP#0HpPM1@mK8#C_K zv|SV1ivJ?^eaR0(Dc~G@A5&$H^bd6pU-=GNyKVkl7Z#TCsgdurba`gQSKFliY7i;o znAP7M5?x+U#+YcM)z%)aQ%=L_GTVyl=Z+2J{TFFKG(|E(54c0TNbNQ(sw*ip5-p7G7mM4DjotzE?BPo@WaLt2COr-*jj(CE6=>?JAQeIii6rA} zqqFKIw#j!HW&lN@)x%P1rapURDE_94>C$O7^=A3MD{*v?QZwudy@MDEv#tdDXMtD` z1DKdbW!vup@W%(P1!kJUV(vy0ZgTl&&A+=K8Id+rEZy4D)&{e&X0OotFj_YJ9Hlej zR0$PnZk3O|d5h8o3`>3BRmVJONa%GnrF%Cb^zS-f}Gcm*?`pgSnZP`ZpgfN)hyRvA}7L=T`R$F zi@5*TDi>g68DLkfOAY5~STDuv71saD@OmzMe=ELE!?&3$|JW0fmYDesndWZ)n;PyG zR{tir-zOd)13&(?;qk8>`;Wcd1VG}=6{=9cyRb#N7yT#}hQVw?wjJ0{481|mJLEX9 zeH_@IC)P``-v{ou0X;my;fzH)mg4zDCPa)WX|0(U_Hd&N1LQU#8}9=1yn~BL_NK3d z0&7TaNMlxPe};m%80 z(AKbx)ke~vT!0zhXZ%tMkTf@JSJKk{Gp=KkTNQ^1C6g8%OGa@{SJ7JF&T_r{Y(kwh zf6t9bJrk`CiMjwIO5ZN8fH!l+EH4bYtaoc86W+2Df|puYdJ@voHKgTJ%j)kfy2~Rh zI6~RGa@4Tu1u6qud`>#DQ0H%$-{vQ9{>v=tpi?hQW;7@hK(cBeg>mWvbHUjXcj8n} zP;^*yk{?hn1Mb<3Eg8Br zyFPQpzwI-Q`AJ@@lcjxQ@s=viBP#p76t8cu<^TNlZ2#|5@l@bBfJI)2`^u*Yb_I4t zy8a&!JT_q81^36q<7319F>wFk%K!G`flXB7>~|52iL?chPATzPWaX=qwYygbOeSQz zxqIz)VmwZa)9AJikuVPyJHqn^;);UWrV_OOjexSiyTZ;Z=`WY~ob1qm_jvWmEHK ziD$;py7nY>U6m3bskA`F1!36G!EuMe=6L?pW^Z1i@poazxp#&agm9`guMVtvWNLp1lHQ#kH7+WR3!IC1 zdkL^=*RG%MV>7r%BjV12xXDi7F>#?wH+nHg?h^nsvg)I~sq{+3Zb>Cs)pki7BTPRA z(%o<6w#)-!v6j3pyXZOgIHuV1GrUVr%;R}ygsFR3`y8>y4MIp!jo0t+ z#Y|v9ev3Zxcxgx#pRjnSHYt*$sQqK2F<-MFHiGtg264O&CEtOzHn_B#pKS}$!y2Ju z+lux1l3$zbs&_$vVqugrKg@;$$jjPF0{|0g_0zDW)lcQmdk|DDV*bE!7`~r|=hN`@ z9f^OZ;bmUkk8XcRgwafJUw$HgH^WT?_bIqfV1G>PkAd4`;{LJW{^81h|M9?fzhU!R zs@&C10bdK0Tpvjn+T2^}#{mtl@W%i!0o#DNVQe?p?Zmjhu-$j;j|2KrtmlND27N88 z)7F(p%vIt+~Uc??ne3*0!ko07%5~ zip=^uKmGQ_J`7oS=?YYesnhzF0h7^MZsJb_UOBRuk}Z@6p?-PGqe%+>us5ZDg;du* z%N=>K3{1enOm>-j*&V4+FA7gmigp3!V`AZmT5bQ6MN%xA>F45U(YjP}8sgb^F1d*x z5esnd<+4E@lqi_xV~M=CIvEh+T|;P7nHLza9JY@3Y=&_7+I69=Z9=xu_QMq-flUC; zc#~LE&F92hE=K^yyw9So(+nQvF!IPE*D=PESAO@z^zZ;cJ!bFO;c-Q9R3!A`S#@AZ@jm zT`>o>8!GhF_qI*Yl7D>VY2~LrmEu{a=>iy8G>vm<@(RKsHYp|VAf`s%>8lM6l$C$1 z?}5`bKs?v;O0_-)MK4n7Q&l z4~?QeC%#_`--qGrTsRKJv4BG~vi+TBrn%+6sd=p51iJwD9eCUXx0@^e+sB6eKCwS` z+<)xYKJM7=cg$_WR%OLv<%9`QL1;qML@R_VG$FRU#=d9mITa6u-(+w?<__8K*d7ON zuLa|AhEuU#UJ&Sfg*!zIhY7}^7_z88ipSuUi+~VzFb4q5|5R-EMnqi;(ZXoomy1rq zRhe{PC1gTHgF$!#~YIXsqB3Wb*_Av0~tP9#2ju+(Bh$r z=6Z2{S7D&360cyeU{z1hlV;iXcH>C`m{>1=Myf^2Cn4=Ucee%V?o6Ip_}2_)pOf_g zL(tFHSG(6IIM4RkE(AC&d3)Q64&EL`0jIF`5H3=q(h4QX_3Z*%oc=5_@l}KK-0IJj>=4-*ys0QNKwKgQTYuBrGDJMt&{ z^ecOvX9&c*;@StyZHV0lXeU^beF=Wt|pMU&sUP z;Z!uQK@d766-lpntO1kU3d)B98+<5NSCD0qFBkhzVMxj6Arc^f$$z2j2?SF4*ZDA7 z{^zj(jzDq0aJeD5nV{2{mtaNh>D4Y=LmivPah zexKMsHthEe+kMCOxMALI7@Oa_vvrrI)%=^ZEMlpo6?6AYY+mXc3nq(%Ksk4e{RX?; zF!m?*j~)A=*uPJ#hu}B_ho%=lF61%T;fUH;A<(s2Zb&MY9eyhyr(hJmojAFbP9U^A z#t;lGtC=8y1uinW9umMpxGcL8HVMLAcNbQR&j-^RlChH<*||jvHS}if@EozfIofxl zzOsJOTflDu0YaqWT$YDKzUOf%TK+BzDn?$h#ah#TOI1RIT)I-eRK!*Ih2LF>d z-&`Z4GE}(GARUVevi1dOC{Tw0S((pIhPfsVy$6N6>AAP5_|cvbPYUFTm&7L_gw+~A z;QBVQtvCTvd5Bq_W{}vk)j+^d^ZPa=6ke>g=j23)!U)pCFC;E&^0WiHhGo)fdfSxw z1OC}*;%Ai1BB9dKo5KHC+Sd2erMJcWBt2OIKnq0Bc_8#?m69kA*MtQ^3GtHaC^BoG zhqSdQrCN+NB5^Squy=1r5b#COkyeX(6SI(U__S~x4EPP0So_VOM}-Zk{5l-LMJ8~7 zHO@-{a}F^IBN;tOl2b_U1v2xi=1csN>mtD)1p>G(ML5OVDbuWYw|`k6h~)6bf0Z}q z;XN5~s)faVMk)RgHUBS1j}=(Ua2#IP#{q!h^)fso0q~`U1AgL01rQZ%;qreh#T~$X zAJ}h#eHT3L6Zgl&ejlE9uup9F4Y$V)Z$~hOquj%#fWZ6tK;-EMkKiYto)#nsrfLWk9{RfG63 zK{vazONHPR4-uplXaFk*E;!&m#iHK;31V3d)9J60oHC)R>n7`wq0Rc)ZlFO7<#s(@K!5yCj;zY?3`F zrgAT+C}`nRPD=5;;Nr1b*1Q|mtjzpLZx(romIm_uoG&DRP{;&=E_4ZW<(X8}WWx&s z^uLOqeSUG$ONz#G$v zq?|GpFiBuYJ@y8Q_$LciIiEOksBqcEH{@R9>`$s3_Na6I+t#gqR{EPYUITRb#XjfL z&-uSz%U%Ce{-@$J&6_$mLlpD@9%lI11^1iaesg8N-vsyjhWle;yG?A{#JFv^J?_|U zH!rn6M=F0?=B0pnL5W4|z1F6Pr?g_cztVg^Zb! zRRFOG$@96TxJyz4MCJk%(5C=vLV#z@FY{>Qt-Ha0SDt*;yOYc3>fxGiS>7?9%P-0Q zK!rzFXfkG1>`VT(uAKGK)_WWjf0#j8GF_nexk`3a0tt|)$Cu*WvJt03<9AJ2hUEoJ zoVbMloh3^*^Vs<^?}=$vtmnX1@B{xYjBLp+3Q=J@bk=cni%42p}pI9RI-wUuWp7&5nR6;Zn)EM!V0|+g^ zJW5i7F5-v}K*j=WcnNc8C<(W;EoVb86flS39hPEZeh)&~$yLGSl{iW797~W!B-~XP zs#G@@s%k|D1RCB8sW1qLU3@*8c1oHrE#B$fF25)NQ%Um;;rs;^y5Px-T3#jZa*re@ zeX;sohBZmsYS)J&rqP!)UafV@T(mZFj^34b%v@4}#B!Fuf`d(6KnxgsUoL;;=pgMo znA9zO@fg1!^NZ~NEsp)oZuxsBYL)eW9){y+RsIf71U$4#G7mLu03HB7rs1&-+;_qK zK5)NH?6-maHgLOd*!aEgnEQ^o-!P_^$`5e_Gld;z002`DE(l|;&V0>59te))BMFvk zljD3ord#l1^Acg(4YHpY_Ycf-d3C_o!g(rAHSDM2w*1(_vHbeNC4whn6AlHw1jEkS z{76!p>PdmaEU#50BP3=1(V9aMV#bZ?@e$qt1Kj(deguntTC=d!f($ehe=G?oE!Z3a zEx+GmsR>S-knrCT6T~QGB63M6N?k>eQR=6JKodFwDo+G{aLdD#ii5880tKVBEHO|4 z6+&l0qzA;Uo2C-}un!z@eO!|1F3CGFj?ft~l@exzVV3`B`);*Hxh`CTi!8K8D_0O# zLXB&8-M`DzW}tfY1@=09o&cv%D27DszMQ1R_)D=8e7ZF}z|x}w0}J#_Nr6xUY!+Z) z%Uk<?r5HdQIg}ibgw+pNmNu^XCL=&b^BBdv((=!-RUB8^_!~pU_&Fm# z%-$)i)N?7@QjC0}dg-qubZN9yd1XV4IP-Xyi)vl!{QTmuJE%Vfu#(LLvxd0NN zWpCZ+p#1)$O!k!+*_+G1Y{Qu1(Vpb!&-__P0-T zQ`f%7HlmJ=v|9g_&*I0*4J+#VA92>7zh6guFT(-zqFeBaew!H{BKR={kDK7J`;q$F zePX{)+;1DU+r+$2Y>zwUZO5FOEB?8mq^&c)9Sin-VAD7SP^NDPBSSkGa20s9VPq@? zkIi^2ZNf(60!%Fsa67Qw53G+9`>}8yiu-LsZ(j0H&2R$o?ZRd)#d^lLoc{8N+-C05 zo4R4#CTxykXi$LF-g9{yD`ehK5$)v|}Wfv9lD%;*q zU)6ljkYRwlVLV;!{5QhoS%?}Cud0|mp#Gxr7vyJqO!19Qo8c?+!+ZCm=r5Oy0(Sn?^dl!*hs~nOCo*` z!DjxP%k_ydB8e;}o`PAd@ocm1r1+V0P%5(|ndB$%>X-uOPaA@v?uokUBuNEdd{~ku{hP62*_YG|eH<~{w%@#XE4@|b zo6Ka)DPCoEidB)H$okLh|19+5?fX%`g)_?gzMd-!{yd+G*IIa~m&<49^#;Lx_?iBX zUGU>Jal1!`|6{}Lu}68~iFx0#-S3cXi&HktX%Sca%dnm===X{B{lX?1_Wlm?ICH3f*_edBeQl0X?vrLYKm#kg_eqVZal9cfhHF zV+u|I4pS^Oj8|MTBBvjHlExKKz&4D1qSqP^`UnC=xui)56t1|s60^3DEqFBnXOID; z3n>MEVTn9aMTe2c^sbgL$K-ViN*UK=B>pb}V9{@l-(T}spg<(@CS;Izdu!L64$yLp zMjCPsKMx>+8D0lzZSl*@<6YF69elGT_Z~F#z|Z!P@V$%h_wkO%VW^Yq1tz#2K*iHQ z5KytH>MiEUasWWgRaVY3COLUn~#tzZVRN{`d}TNKP* zU`H>CucpXQ3}5D_%vkp#Ux|N@q)qlgmNs}Y;F=BssPI*J)G)j=%2YhkZnw_-hoOn! zK0lzqw}m%=TbHzH**GI3N)UyxKdU+L@-CR?1qnj9(-WnJ1%pg4JSGExc%*LD<$Y}KLG?liR4l4O$mUu$JC+$MlK;lKrqu&YcY;C#9)W! zBa1Z;DsPWokU>6cslfSs$bww-(e#5|#%h2o>!x&5-gbaOOwa(i_d5e5^47j8cw{1R z0Vs0`Z~>Sle*oqih-cB}=LwF%WxlLCkXQSv1^^+YTMV03{`?k9uk;s*ew!bF^Wr}P z8xz>sG|&1Ug7XEh@b^+YpUW%$9Si4DukZ)=983cq8}PUdeCz{1_kqW4c%t89V*A)J zZyUDTjx7@W#@yX&$kosYpPdWq`-SuS!1{V&eVy3kTyCu^ulP03q!}}))_1yud^DTV zQq%2|Y%epAlD8vshuoa$L{H46xP2(}@OzGLr)M*Mm_bdUE;FG+umpGl7^=X_Jp&5` zQ0`5FnVDA!j4{L94XEL|f73-Nq&%Wv5$j}IsH8~5#-rIcF=y=-5y#P~(XM@UVkPry ztY=qs9BX~9MqhK_UrdCQKQMdu43wa4TN&0*so4I0@9TF(&o19aM9n5wfm4543R-FF zliA4Z{Nkhk9R%cyhU*tCA~b>1n4ZsEX`#Ck%kr%H0X2n`kMtb0{x~S30LiOki#B+M z-4k9d1Yw_mrjjnWK!qFsmTv0>!SZZKG?p15Z6gf>dGlMez`PhgIe<)@QwVItGD(C?D#4PHv@f0xEEzStjunwHn%C zdBe zQyH@p*n*eDKNgA9g+M}=yPFxojAS@ygm;+|9N4v^Kinae`T3x*3WQxY~08=+z6zS@kI_- zR|v~YYLO_oKMXPyvioulQ`l0BV_`r1jsT_G(cGoJz72Xty=8IBGBaFxeu^n6kqNFJm-~`2P@onr~Ci;%iVU-`=H`}n?e(8*Uw&+zcg->|3kms^~h}? zvrBvCeHnW%T)b-!mR4nN#~&p?wd}LENGeIi-n+6Ee}=tzRN{96QUC5IL7c7Knqc`* zn0kV1j3+%3p&(N51UbyydP?W;T&9?u6#AE(;7#5t^9>Hqv z;0Q*RWss+W$9Rk~SAk6x zQ>Rx98Us9DCgLt@gNG5Eu{6U16cChg{7y^f!ZnhU=P|93AmHkv@5i<(p4pj7(yLG> z8LvX4C$ONuW90ErY;9jACf*bEep3L57%!GSpAVro z+8#)>9pzw3$(8yA;5W#Ta?nOA`Ak>-Ew0-K%{8PTqi?;WslOgVCy%d5Tc0k(E7O(;#=Q~>9n@XZG$z5;( zW&Lw*RGbR+@~7&hV9ms>B}0`14i&nzFO5Vzm7MO^2(#;zV=UgG(OQb2d1x#}t1DeY z>!~SHAQKu>Da70ppsC9|dIp%lik_t&mbtaH@~;6FtcqFY9&mO^@51p0bqF%XTWb7` zKB@kjXN*r~l48}BbbDB2fFNHDpAQXpSJ{v5dmZv z<~FjluUq~jK|z*rH^9Q9y$;3s^s0VY@Bc8oP7jBJ)<1xKc$@e8z~kXJ_&pv2KkgH^ z+vX*FA2-a$9dq9yV}nrnQyVe&VH9lYo7S>eJpo~cH$h>#AalpKDe$pi>e;%xswexMo{Xdh*gAPy z2cOdu0~Z8eQ0S>pi{vm_nQC(njV(HX4PI0wG&w;4gIPr47lof}meJuji`vAlu^7g1 zAYu7V3e}WgFhAmAZUNFl;L*dYT9r-(ngB|h6bc((v3 z#H}mx5VY2JghGdk9ksVz0Je4|1xitonYz+b_f(l_S)&4AsC&9NiikZqsdksJ)jlF+ zb(;@k`xd2dfo2|+TNGDoY@|0JHbyGNOv2Q*JUuWn36@|)$M8aR@o|EO1m~d3UA(?P z0s)>v;9RVE03-#mD}ifV8Zk8jZb@bOyU&Sjmla)~cYqX~L=hMAZGmh5{CmaBtJj49 zJPR`;6{W>NTFw(n5&;Fu zrkYAT=UzGM{c`VOE}2t80I;#R51Pxr68?aa1G=J;->G;VUghsNJoEoN6naMgh`q&vEMz*zl!>7xewy5beB8l!g?N9pD(;VUwHm{;rX@j z&#wc2KTrINhRvXN=rg)NK3sEJ46!55v@%l>*ufYa*=IDZ%0=uKI zX@IF)^1Hd!Kv${lN7Yn+%7>UwjnZ2dt;Ih~nK^vqggbNurX1cyY zfsn~`xPDO0kA#77Mb{hJh!jPs3*djsn%L%P3FD8 z=p7&|==2d4?}V=W@-i7hQF3pE@;PP@e9L+PeBY986sU9SM|B0}If5I@SJR@?OU0Ug%qpJ2B%zz}^(pe=R0)SD;m*(qD zGN53W?`Fit=gEOJGpQz;vYsKo49uoZIbu2UXxzA@E>>gT0OmEcBaw{BrYCg-AH@C> zEQ`w}7VCjXlUTkEs+8;mry-%63pja$a~(dMF(vM(xgPcN`v20#XFmM}=wW{BeYuW1 zP6q*NDP(E#gemD~R~ zaeg0oeZKJh`NH>?TmJujF8u%J!aq=KI8I=#h)oJ)Zjf!l)&g#O#?cd1{w6(A4pL0T zKL-4Gpa436vAL4gK(Pj|{IwRQDkl8?VzamtSq*9n_U(BBW`Y;OvjM@k0d^{ul+~_l zV6EvuLI<{8Ft)Pvz+|jAO6XuVJ}q*I{7~3hU)auX9Sa1ZF#70AsTr%R>qcv>%y7Bw ztSiM%tX%|L3+pstV`$ICTpIy{|4wCQ`2fWx$Hym1V9K>IX673eQ}a%|3ofa@D}$Ns zUDRqmlcLbN)m0;5wUJV`?JL47zC29SYD*O}vrzc%v642X4l!~%u>{N@u9wQgQG&yj zVthw{LJeVMSR~mwot+vWV7Fi|? z(uE5zd^=!XKF=iQY@tBJD!kQ&xeIQ8Zdv{9f>ttjU>l|A*N_B7t118dMu7m0an|jI zq|Q;>#PJ768ja2*)>nWie#SMhKM*5`n2La`zZo=dZzP7I&oGG+oKQ4&w{{)@bnX%`MUyX4-bnUU{4V5~wmdaX%kuDi*TD$G zSNcAr;(vN1QXmB^jgZ+TeIEiQQg*`$ZT|G+0D$Fs_y3ST;|NlhuHIfK|FIzx|9HdS z7!udbhbPtC5VWPR)39F4YyBVY1vt)y)lR{Q0Q(fL?vFj){^Pzw zw%zsgoUT{n&I?-#oC>^7oX-Qt*AvfQPdq;le19JJ^`-dFbK$>B@tAZx*vyC{-)cP}NF^$)qZ?-`xagsTj1H?HudvM^Q1{lrkkZjOeaOzeXb zfB^PX=nF9pgAT!g5Fm%a;*NHWJVt+P;8ek;1KUP7fL$zG$1tfGLqL%zN?_52>D=BJ zll0dZX+--L!o$Kpnu=S9OlzI4db+SR*{$x|`-9d5DuzzBPl9iXlORUeOZ5+{q!pkk z7a?=aKB>S1k}*sQqRUL0@VLy4-lIr%8P#p9En!q3agR-v0&erN_7jkFgH_4m~v4J(4_11uEPKUgZcvP~{3=x6~n3LtM0xTqhQ2M;dkR#Wyi0B3I z>x3O+EQ^o03t3BEjR#T8VZcJRR&DSDHqD? zO7G%r;d-EQQHmFO$ApRTp$q-=FKN@LwtAOE@ty112J)GZugdZ3l~BkRy!WKKCk3sx zvoRL~>Q=(aQ|bLmmoL5$g z9Bzs2aQQ_pfN92%Md&z>br-pW2?Ui%+}DaBFdxUr(OuM!B%uHr>Rf0ASJwQBFu)SS zX&&D4O!xwxkZ@zCP-|dCP~MSvCbOpz*XWuj*(K|lrKK@=c@}_lb1A~3%6%#ev*DYz z&-7l^G7YZfl|bVY;QsJ8_U-b6zBjT3TO>i z^SpsDKby0mGBAiP*oe!JRWZhvOVFppJ?DO;sstAaVRyQL%V=H9Xf7zW2qgA%C@W*~P_M!6sMyvxe`9eSXX@ZQtQC zj;?>#0qP;`aPgmq$NtY#u};qiP_3|o4a<_jdz|loL@odOec=9xOMLQt|AsOBoIfNE zxthS#6YBLmq0b|-{a^V0b>QpQfq%Xi{{CM0&$;kFvhZtqt$_*nF+e*{cOR&@3t^nF z^90TX9PSB_rLc#>a09Rdlgu;x*dWzmQ+%N4GVuY^yme+yXrgJRz{U zwG4-E)9LpFF^1~<=!nY zR6$`J2}A*2XvG4?Q*w-^uDN)N)SL6rgHiyAB}t52&YRyc9`47kXvx|67id->g6)%`mB>( zmtQWcd;JLVws#cyR*8Tb4+TB)4vzE;iRKzyc@LSZkYFsIWBdM@YeYdVb83*~LX$Ki zB>v5W&dhV`>n3Oh9z0AO%3s87-8m6g{+880c;ZUUkF_t2D}KxBU#CKsrMw*?n7bzr z-ZsH4%KF|OuJ|7x8}`SBdB0)1-7xkj@G~}KOu_)w1$(*T*XPSE|F0*$KVSIzJn_$S z;lIxle}~)u*D#zdJi6)Y3A|Pm;y20)*uDX`6LQ268376<8F1S#Kykb|001BWNkli25*3D+_3W|Q$l5lyTKHk-EeRwYZrZd|o!DH=Xk=A~&`vN#%4aWzN z32vjp?{-BsoT+!&R#)(rW3T?wm0!Izu;4;^wj>M2o*9CowSP^@>a*gwe}65<#5GB9 zV70!a3s-Fr?mADMXo)v7cXKZ>uf7M3f>LN9swSYC6;+9D7crW&&@0-Bh5LMXelL%c z>2TT}8bDUzNFhk5)Rq6Vw(b`FFwtw!s(e#0e&y~P{SLq)UWwpug;W-{;JQZU)TfAf zq=*R5L0ABurzBZsn2I-(`w;tTim2=9eW-&$8!q_Ms}g&t@G`F;za(vu{*y|APRds^ zkT@vjMmg9P$;h%r&DPp|SCq_vYMX<%57m079Ex8721aSn{M8{lJqrwFNxsJC23YHb zv|WSo&(?i1)oLY0N2V3^f?av;GB1LQXpbJI?y2Vs1MIBmVK&`rwY(y z9?cZLJx{3g5fuR46ELX*0ALwx1pqh=cKT_xbtp6v{@B+L-WTAf2yVMy{o`FHvem<_}lCNnn>m`ahNkFHy@ z%HB3q^3yO+tRhk#;eN~VtU;)(0l@N>Wn*>4L1v{A?d07fUIjqPB_EyHRkc-{2*jo2#cl42hnlDap+wsw^KVN+S^b$u-)ekuw35AB3EsX;4i0;} zu?Bti;))qd^rL}<)BS>-5KD@ziOxmi zznJJ}AxJnb(p2WF)ElW(>2;uCM`~ozP^=)O06A97TndUVS1AGSiq2BurO_62%2>Qu zco{^>^AuphSmeFIW;0Ltbs*5Z1S3KzF!0a~PZ_i{k`_YY98h%uVBs-XAXFGsOt9Q% zGf${Y&6DHK>2)X2m1;uv{1ztYG!9P{?ClkA`?~YG-J*B9bd)?v2IT8axsGz9p?nl? zU?4u8Ck6s+6p&{7@i%W(Y-@#_Z-op9AY&x0&73g!goVLH-tBUa^q3N?=@ucqzD>t6 zoWeX3hK%xXZ?1Hb9}T-1Mw!6VpqdCBY5aK@LZjG^F0XE@habb!Fr_leuhtNVGvpU3;>zI&$s7?8oNmRRVeUfTD0z`jnb?*p%|C%!(P`20HY&zHLL zKNtQs!>1SyCQ4d_3(c_MT%H5)V#1$uR3_v>VWMDmG6|$Eo0%m{RPqQQ?H!S8%#E2i zX6A95IU%}xK0q*~nPQrHfPisZfunVEku@OL4#TGbFY{2rVG^e~!l5RBjEY&Q8HNgG z#H}dkMuY;U_I^2?MylH0 z?*&p6zjx0ac`FNM$=jzAJOq3U7a{3&ym<+;ulU?=UcwMP>D`NvK&=NST>znqc?n!+ zST04HMVVi~69QVogeP~xLWeO?5xE&6ykyPS-&!sO`^gKggy1T8djK*dyg^(lOV1VS z|0fM6f4XabEw}PL;mng$I7`- zzQ%iQWL~iY5rv2Xvanu$miUb44}ydfWpT0Az;eW8)3T~D-E$c3ju9Ku-F`tr4k{yZLjms9}OAS{cgATnA%t*_h zeO^+1-uZqI;+CJnTZt5Eyt#uh>OCpNRI;!MB;mWfgwpc0{CSbYd?UJJoV0`1awtb$iKs+;g1;x`PE`HS2yynG%m$eov z#o6&xT7BL6Pl0DmBL%Hk%l4OgXHpmkjS)N|*1}d?{3C#<##sECVVGO!ZY=@K9!z?; ztc!z&DS((dHNK`>F-?9K-h@FQNJm!NvF+JvBKy166qtj#R}u?f76qO}%U z_$o&q1)gjJWQB629Qggq+FBMv1z`k8Y1hTTpy|yl4}gbiJ)GKjK{}_!`Xs19@rOxz z#p-A20;$eH+2XD70wB5Wrf?+yM4kebJ^Hf}ZvH5`MQEidaV^)|m&E+q_faxvj0gcp zz0QzQ<~)&f)UWqlhr$kn9#O|e;XpQI02>%%dg9-WH~LN7=<>hcu-$gdZO4!eUV(SG zE)I9N>4Lsq(C-85`^4+}!1w11zkVI~=j+7Z--^Ev!{1PRh1;J=>C=GS4F5h2|I5q) z00IGLnsQVovZa0!K)1*wUimG0V#MFJcF4ZLY@^S+tg8kHL9hXoH41`&32Zk{j1eks zV5(sccVH5?9xxLu6&&grmH==@rtu14ElV+8ZjGCHM)6Gn+dVUuN8j@FH}{A`BZM(W z%S5V7o>Ca50wTP7+&v(ZZu1M9gvA8|L}78uRa%EB3*$4Rgm-XW0;%qfOQ8cIT4bM< z-bewSX+_+S{B*^BM@jl7G+dt)ILa{@746khPIp(fGZTztxFXj{;_p7HvXXI`SG*IR zAV5<8QRvm@q@HgI^0#^Pg=kwK6qp@XT;|1|6lMXK;|4L_W4PM0IU=duA>9bd?SC0c z44sw-a`pvO6~IeG@!W{od5yDQ%O z8Na1M71!sj(H|SFy-6=Y$yDX?^OH^!>73N=c)|@b~XG| z;NJlLwGV7E1v;fl)`rDwaWRl7T;Z<;oCoAQA?t+c30uoS!0isT-IMob41SKxDt8e5 z9(M}j7{gI*NC%PK2djpubRk*Rn~(_j+j+p0mDSt@KzXiIlx7%*JK{Y$KxOVlg3{eX z;W{ir0f-A7xbc?QF#`lVn=BIf08#=)jbg*+0*x3t;8(&{ZMJL7wyXnH^&A6`NoV7d zvLv#4U}G21Dz^&1Nc(ID4ds#r{AfvhhT)3lw!IvgySN!kU{Kf@=bdV(JQ3ute7;dc zDt|u6u_e4 zoOdtbNQ+kBG_tuF?W?DBO;(=-ZmC$?ct=~^iJ;kdZH8i=p`^vsE0y6ICW12L;HyF} zMONdB^`-jHHI6$Aw(xF@QI@}FNRKSSGsJ?QnoTFos{D-vYVwtcc1`FTu`*eSFm=yW zS@3G_^0(1V>}}7Gd0x0nF^7g*xNJ}Y)zqH$Mz`Tj$SQWJR1w}BdjD#^zbD^v+M%Sv zlj^%KZIJ}X*^BQ(3rx!8x0GB3fgAghC?Cl0;dsIr?t#ADCbs*;cAJ=+yZrY%mH&(*jm?W}RQxCOJg~l>IKECC zpJDlbpZMo{;n!2~>sa_@iq8QY^wt}&sbDw7Pc{61CiwR@@Ym0Y4Yvt7C+u|sBhZlr z;t&IlP{mCvY6l;{YBDa=!!n3Eg&#{RS__KYa2KH_OEdsuH8bH+aNi zg)mjyVEYa3ic<_z%w^aa3b2W#iUq^NrdJ)q0uIA7GWb=1*NFK260DcPbfkAfVb~|V z-m&9891KOA@1$UlSf*ALH`0TeZ}MiHYZN8}GlhuY{{e~2@i!Jt@Ua(mAZqmJS2u}wSgdz$%BipsfF)cA*~foV1&?jB^)+uEOA+4 z?W4|gOrRrOAOa#r(AN4S_^>`uNreeWf`$}8jP*6n?!ZQ3^Sd{~fk>5nmS)pa;d@Pg zO#wl-qxa=Bow0F*aG}CS0Y!tC!&StQGfpXl_KZH6R>|55ZuL9dA)uhY$3s%F3sfet zWE7FY92dBXTBvZEpN5e*rW?S37E>f>Zt*>q<&nEF3}dXQ#4T|e$B#{A^*xA(+c-bt zq6S?Tfr3SL%xaHYrcMEx#0^q)JR0TB;Qbjn2Lllr6gMK&7Q|+ZkBVf%;!rrlP_C4; z#+Yv%YVNW%^PuH zkt-9yz5&}dua7R zV!RRz^*b$NW5-eox?Qtc=YfkM+IFU5&FA@dw3$U?E|QJtJQ0uon~Dn*p6rxrFFqgb zrOOe>M73%SDNu88fLjxwwv_}`f=HO+(W?YS)h^@Gv@)2Z;6ODzSi@#6g8+)wzfYaXuH*yfBfVDO>%v*Q zBInk=S-@x-^JJWNh8dPg13%@>kZ6~*&Hd^jw8Dq91&gmJ)S0*7g_Z*3_|XBcx~2dt zEh6}MA91v{_H<(PteNL2stNcLwEct`hzvc8Z|0m*M^pdNY<3pv#yp;bC zsgS6I>wgn$+rWOCnEO@vk9~t|JVh5&X7s`<>^!laFRbqq=l8<**MaBviSO?fZhyt! zOYvojZ>e+sBba7`;x7gM*E0NT3jY0=`1y0^`N3X8}y91(1lUrINj}?t5^ib}pif7K@cu2$*wOeRR z+pFXxgGE6IR~ix<*cl9P5#V=O`}L~i>}38RY>hwNf@m?*WS3HQ7mCg%s0e9&1Y=l% zfn-R!FO613s|uK$f@Jn$j!=}T6ooRO2_8;SvKfC=8p!wew9SWN0U$s_{9SYV?aSOX zs4>87txFs$5!J0j3Ks9zUop4~$fRgB1$Rx&fnQiU>8fO2P0Tvis{uLz!vRR)JPE>L z&zLaCHJ!C>?%oFz3Z=qUpvNWJqi0PBQ^armP7j7F)~r@&th7lmU9Q`!@OIBlr3zbu zk)^Ku86FT7$k4hf73TQ?q)@4hl}aM?{@imGG#@fO^m-Hsio#0DTSMDv2QlzC=@19( zJPEL2deuQNK`i)86-Y~*%Hem4OPY>-a!*slZMh;=PdnW-+Wk%ArzR?o4S7LB`I3Y$ zV`yq!1dy4Dq*qRndVzTa(t$x!U;t7k^F3$-EF%UV;ky`N;zUCWcw!pVkzy zQ+DiyHi%!(OV9(q>C!Lx75*Vx=pKRm=27=-Fa=TTBjiN9?DE`sAc;=_I|B$XDX}Fw zNaPOq9Rhy#e{5a=XxkkK_=P?*^d1%eikyN4I~Md=V`)V|)o@~Y44>7af~;Y!kY=x4e>vCQm?H?(!WEU#I{K0+CEK{` z7*569E4dGeimx-iev$3i-_>OgTw<6_o?T^{RCn>2k^^nfVR=))|LLoGn+fn6UP6$( zukXdn@`rXf9*)`g!v~vL&{yP;-{l=3?YZTVRt^Oksl?L16iVGfp&=FB01{{rRJg*A zc1D4#8Ook@E<}*WSZB}!Etz5BO4mv;(w#4DfBZW@04m>wCtrFtbtd=*crgn_i^zwm z-SC1VJOXHju?Xq}OIjhR05R$5kSc0KuwCmLR+#$T3akw1iPCX$2R@et&-H=1CuPQ@ zL^Z(2ta@ffkV6hH1@vcLk^Gqu_2O!Yu?A64xh4F3vqqiCW>Q;v50b1JU0byHW~I|G zAY`rJTq$d^1wlrAvJ}2gBf<*;0ILDosDF~orFwDR(F^m1=sWpNFdUvhHnMVMti$8x^Tk+smOJr$zx-5qp*GUt62NuKJqw3$r zxc`>l67_TFf%L?C^Rm9j2|X0&(=+{FPq+I2`8x6Sz3_Dy{yrCe!SED|u(FSHnqgPN zj|Kb`;IG+~|G#c{{M>Q-xM9P-18V`d(=-0h0ow<#56|#_8SL=FJWC^U^99%wkgtXL zSQyU(^H>;xu5w=X=dQ*SIWE!ZV`DiusdPGAwcpoS2z#NEMdXn71`7drC^68PH9u zj(LgN|0w8sv#~?8cxsGqpn%&NpLaz|cJfwS{tfaPKu=67cU#^L#)17a`EOb!MnHrF z;Uz$RpNj!`8OP=QH0?{E*On3pg;EaXugo+{MOgwW3y;KbQrxCjCtkN2F?VjlJw+jh zBP`|RLwT;4pn$-jyV27#LuCPA<*`4(p<(Q%!n=s$O8(OZe>x3^KodJlgN2R`_ZxM<=x%P|3U)&Q&twCEwK0gLMHZE@^uDEodRlo!wU09+$As8~xOcC(4 z;=RaF4**_&``nZ3V%ci1`MTfQiRPf~LXoCVHDjza72e&-_2H_R=V}|=@QcfXWEX6= z&8_}z`uYAXT>mo+i7azzexc8C;yg~Q=ZV+%iPv-C``cswzn%-f4#hvZ@F^C@{9;#v z@9rx2X@Z}_@N)uxJvRLH*M`T>4fh{6>>oF5A9rlH?|`uapI82qV*xL}CRk42))f_w z)(SMV32Xx632cX99ftW_n6J}w0$wNV=Yes2KpuC`57=&AOj(Cl4h+-fnm1aOs;}z? zn-P;!#aN25-!N|rTijr%0Pf~DtZ7sjR9pV&P_NItV-n(FRRt9;4dO@YRXS$(cOTV7oPC$tuVNs<>Sm;mJEJRwMG(UTqsw(^-v z&mF=wBU#aI6Tm=J!%hO$XQUk1G+lIw_6>Az<4w^0co7Zc@fRV;szD8A_UK>(#(s zR{&gbo^i?g^YJkj#3C8;_0fo9pu!ppbRfri1VE-YiJ**YOU2)R^8&Ay4(IhcL_GT+ z8eR{nMqzFJ4AM`LgytnrCSYhw)Dzr*0UitOr40!}GSpCpNi0wS;_M49r$E4A*LK^wbuh)fE{nccxH6Ui*bLCrPDq~yPQ^Y}MXL=EN!0htuTPyn%;_@x@YH+d4qd2!5v zu?@_9VC*wu{r-CldV(ZQFT@eTWBG+XuZ7q12<3m``C1Y4R|f#9_!7g*)kLhRh2;J0ijo%`B%v8fZPUfh@a4#i1YR4 z#~lvC5`hiH*!||C@wKr1Jh2@M+e@(>>Zb*c6LQ8e!n*?d2GI%8&A~uBOIlRoKT>yz zUr~&ukg*&+-A-&4Ppf462$|k-)tISm5zNgSv%`3P6-T zFZF~(*1^D3ge}3XdaZ0?=`R}vJX@;J0|i*3W@`c|ltNj_zy)AX?okLfCEJxDKr8@* zKzzRu0;eT@6*}Zx8!&i_AEal%W_^wceQjiyn)PiUIX?i9QA*7y>7W z>X2%OERcXJ+h@;|u@iziu`-%hlB4VuJ^R-fGnPG0!H~BAWRb8?&(K~;r{cE+vARLzhm4U*lg~= zzT*1d-9f;8`u8#XJi!#$boal;)rLgbatz?5nD>eOG#rOvdoJ8wC-&EgaV*T^#8^MV z%W#Kn8?Y&Cn~?x9a#1_!CNW50;BAB47KYv2dNx0PXXY+QZ5cr4EslEtz{|~@0~sO0 zNd>;(DBmQKjp%Ys9P5NKJbp;QyIEmg0tKpY-tK0Ngwv0zAiNAgPinM0rI550lxpGL zHdQEN!69}BMpKr>G+hUmO~|o?xFI1LM_c^XcLAY9M&CSW-T(j~07*naRJcJqi+X%) zG!VcBuF4qgGl?SrqIB{V%^+{X$4AQVX+`bJgL+KRX-!>z+L`v^(c_X{l<{A z{QcPKXgZ;Vs?5^jhZw-4iRwr5RIFU5=1%L9#V(|&K+D>dR8-zx z1Ob)g$HYcKglVWC+nObnnS~dF)e9|gppd$<^FF%zlSdQT2PaRESK$$9xRvg3L3ia_ z&`SZl0T{hTZCytL%WXJUuS)LZ+sammEc?xkm$%OW*CIb7=GmSRq<5kC<{ijLtLkVu zX8+YJ?=Uj*ln>V=K|!=9faTg&$5(FzN2Jlyt=Aa$}6VDp=+Sg+JX3uuX`}=VF6K-As<_ofKuq8gtGw`FvFF8Fh@WGC z6~U-H6JWH5Dcr5M7_kEu+bK(ngSXZjoxw3Gj z4caoPD~3T>=!Ii6vi;R~ccfz3$~qONA}!PZP1n0ONs{AMzCVz3kBH3b$4Db-cg^no z{$Fd&w6-g0rJ3oj%8YO)f%^vl(zB(TZP`_oj|g`FtJtJm1Q)|#G%bnrXw&6)KLaCp-uBT^Q>6cbRP0` zt#X;>&wkxdR~LI-+I((_0*HA#;o1SY9TGMT+kJWAob_i!z(xYges*gHd2@d)31boB z3_23v^3EC7FHtKG7otEBjzptPEXNBkFiI}hyCRb*L^Ges0>w-G4s%`BeSgsan9IJB zf_WD6cSXLeTRPPl6kHsB1}=*ekk_0mygG{3$qc8S`(~cE!X*Wpj&_AH*8-7|9XwwU zy152%qh^@8<1f*5#{iSBli zh8NY~%iCPvD@mQn$+>J7i0|jmWtqz5gZ%}IrD9=nFD_hq7k0k{^l?Tak}Hyq(WcK@ zt+=xIJ+asPImh|ET_RyUatucVMrOZ44^#jXjy`y)aksnk9w<3#$MdcVU>DZBbbmEx^}C2J)1#i$5zt#u2@-GQ}%>0sL%qRJVT zX6VYeEVhf`k=NB289oi|1?cdS!luSn6{JuvgV)8p*3v|LL~;Z{Q85VPxc2q9oVh%} zhOwDvcpZh3SBWy@(}ICLE5*m!HTxnl|(Dni8_1{(ECO=lP^(T`{gLoyO(od_KjMNu9=aIm_ATkESYU2>FknUmSxy2 z?%fBg@C9L+^qE)}4+5C?gZWWXBlPW;#ELa&gAlp$y7VVFo8G8kM!)WpM zEUAbZOu~PmADiBFu!3j`W-iWJgh}Wv z(_#^?mlVx;N*uj#&*XdO>ezE(NyUxJ2Fm5L6%<@n{J#u@FW-)juhaO_hA%&!XT>fr zkv2Z=>~f9%(th4jpa~M)4aR@M{5nFk%I4VXk??<_!Ldle(_Xxid1ibKl6)$em4%~^ zM;CkPa^H!>mExbxYyYlQe*9F*sj?^H7KUUxSaA^5YnM4CN!pe&m6DvH<@?rovx}on*Fzt>`ef@tCKZNh&f?n#wd>CWV^Y%!C*uyeQ04FVVDbpetBH zTur?=?CD<-WX=+>xem+RUas$g3ohewfqO5Zz|6_6Y}w1x%2@_;8X9;el?UniYO`x1 zOkLE=_`(JzvW;n}*0oQ&pU_@r(NXlf9Po?9xlV>1Adun>T z37L6fBdXPAfp)+C803So*QVDoD;d8PMJH* z;%r>}RXoS*uE{@#eSK!ROOljZ5gOOo370HTm_b1Hm;02*cHNzRe{%5wbFT!g>{4o* zW1?pOmq=R#68Y`?otcsQ^UAVjZu2ZnJdBUm;Kxut z%y=1`GUGjR$e0uU;2ZGMUcAGuRJ!YUh3`Z(X^mGR9yZ1L=w# z19=P==D6)hYYv;#>H*0`lI~09AOfW!RYQLC;t;~XDA$7+^(6@?Z$xZvi&O9Z!!S)% zG|v`_K^67tv0My}_^ZwUAl^HjZ^B*9H%Mr38D^XJWKp>qg#+ zgUK}yEl|`US$8H24$k60<`eTma^rtFi~0Y{*C!+%8%T0uRhbcWign0z(2iP&T-nw6 z+6$#f$Lfg%m9wr1yR&uePm{A^9fxL!b%B%IK_eF5?K0cRN^ysftc5eb@(c2QU2`MJwRx7xRJXkBI=>I1+!hIGiQk#1 zfrNdJwn2?#_w0k-mE$$Mz3(u0{$2TT7@z0h1LGym!8b|Xk054j26u(`3U6ECz8CKI z#_i$bg|~b4ntzNIE-fR(IJ zdx2U1w#+i+YdA~9AeV^QoxKFyFDpXMZ>s@=lsrxcmWIR)uTrcdbbPpzFRp)Y{f^~6 zWDlE@f!07x5h`jj_2|=K&zfaIm#L6AuT|#1|8rIo^*(`VXl3!5Gn4dd2}6|GS3Jc8 zw^I~ol9Ey*+@Omvih9;xV5=Uv|GdFo9Yxbo+-Zqk;IvBsocGM)r5Cc1Nii$T=x`!l z3xX9Xlp4-7M7UH}5K+`(-i5_$d7!X5sbv~^V+8?-FeuS;9c!nnCaWr#3QYq6u#%(A z-JlcCK3+eETos9|T^7l)gh8A^jxpCMF2$dxSxjZKwY}pt8_`CIc#B~PGNct3NC=!b zp;o6mOJx0vpW%T+IzxZv*I>=Pc?5Ow9HzjH#NO3QY3Iv*1w;NC?2u)rpyNduYB3@; z_G`stV`UorQ~ zSoe+l88O9VW&ZO|b*@df;M%AM+T8;B&pnUZk#3$&RD7-daa%k@SwLYCC+rnh=u4Dn z+R9ubF53N*LCTll!eTg(x|JO5d#RVC-}h5@f=tv-n__y95n zWwb&sTR{TDLvDabk;}|x+@YIyo&PGSmsGd=p+r^C19Ck$3FxBGyAy&2Xkqs?b0a8 z7$yk~yG*R+^O?xN`uCT40FmVsfqR9Ycj1?t@NM&on}{2X9-S&f1yynNO^=Sg(8cB> zuw;x}u02;O4c7ce{3!(~NvMjw8$oV{8DavdeJ(2i$UrMK_T9h6pCyHd(xLmA(n4tU zOKA5?pbdtLUfCoTI+;E&Dzimw3^c%vckI1c9{RFn!_cqunET7blZIMiilP|B)|9s# ztLqGM&-Tki0g`++Fgo5Fk$W&XF?sfL-RAL#y~eZyG7Um*wtP;R9WMc*4CIz`RLoAq zUWlCjWTxjXcxclx+ozqHo@+Yl<+HwC+**yRD&hQ5OXvU921uYxW+{<&ed*+gT!H}+ zvNSk{W|>=P=h+Mr`d9U2A)$U%@3QHpbbKFaI)CgEuqKMejCtmjrTw^;&!+Pi@8d5n zjXZ>m0mJjQ}8seuwhWZ4UD};VaXhkoGlCjqXKw zY{J{EaKAb9f4d8}tMlJH^DlLy)Hb1i!@SI{VCoY)XT8r2Ll6Q@Ap?M@U9^n;#n_~x zVvM4+Pos5*0q52bp^LZMWevTVaWi;-4Ng-J98NgT!TnUWbI^Ln`bo7B_5BLEQ?gaC zK$3tw6DUwDqFw`Q9-LgDqQEpAf|aZt$z+F$!4Xd1f`L6?9h`KK!I&=L@G{}bhvb=j zKu{6g!wk6Qk(r3WWz!6^a5BCbM~n?#m3kpWRcAop@oYk5bvdIzD%|fC&z?LHcr$@e}hPGp}rUoAq;PP=$`@LD46LPfB}IwoYm4^DmNMt3o|-_@9Q2 z8@<0X^p3Gd832SDHCQm}AFLSD*~@eVQLxGTnf6EG$FGL$>-DeSgUqrr`!eu#RrQsR zfWX`JF2PYCJ|Ye~Z`Js=3qRe2yI0$|6=5q%ZGLfGg+t*O#;H@Fb4HWX*(6iMF3-kn zt;zI`#!OAquB)$AnP-XRLGit7;Veuf^fmo^YvN(7kww54jyARLG8j+=9bRIX8vQ}i zO%}POla4){1G8#LhP^+7>HL)yxaIS~_j?A~7Vl#|6kx7NS-*veUeE{s0Tl}yF({)u za-tPC0G$lHEm;dQ-SmumIsZ$^@{5=F!^g}n6LkofUu@o^uS-YAi=i*19MpEu_Cagu ztlV~(7G!MDPj{eVVRI_U*ZJb0N#sc8&*b*WpA-`2&*z<1Z{bo%;F@VRFR$TAu`Odb ze;_t>+A(w3--o<)X01P={^3DEH{~>ont!%pUxKl#T*exPc#qF; zDb8bxAoLH1WIon(`b_k}+s>y18&JuuZTSv=O_Jhr@wCW@y00MKl$al`0N7S6f6f0c1cCrNw>Ts<0P_&p*3oKbycV z!d{K7ISQ5a%yS6OQ#iXYMxl>zoZ<1^*ri>{eNcR#hKkNY0ItD~KeTk1Vk;ORGW;x7 z&(^67E@Ga9+0_Y0`5@kF?(=ZKqlWyj@kPIXf+hSH0f6LLw;5QwaU3AVUWBa#%O&c& zhTEIbVGIwZMySDskMd70`_ATW_4^HOhwCHyOnZ~=Cs75T*}j6iL`M7w%3QA%Du!df z_&k6AJTvy6_R`fsnkuKBJoSSgEg+l=odId!bZWa?ljej+_Vfd7!;B6tpxC z0K$Iw8D5X(Wd5qX8kMk zk5<1Cng8%i-{(ERsf%yZEf_d)jis!CS?j|{0W_&HWwyD9YKaK7)RW(8-Dd`vaHvIX#LbkJ1b6)5ooc+)7%vz)cpb+5R37Kxer#+ZTz`^stao$^CUb~>Xw(dyOhU%tTqFGGz{6O)hXQDk z*#_7yMVImE8{#Y8kf!K-gg!)AHle%@JYLqyFNF!N`w5X|i zJy6;}>Veb``22zO6O~^a8eYgs)Ib-d0|>=HU;>cBW=>`2|~t4+2qIu>Q)4 zJrF3e{%&G1EJ~>ujhMJ6F{Q7XQ)~)!^ZH*AL#y!!eu-x(LTSRSNQhX$YlqL%c%H^_ z3jJJeJZsGBHddY9Betufwn^q&(U5#GX!CXFo`5e~ZLZd}V8yYm zix~tN?6`v}8pvDlT*^qz5@Th|7bju!Q4m${XL-ppZspX@kMqf2 z`VW2^FH{EayK&ovc7xWGQjJ>W(zaHS4cMX7PW|yj`bOu5n$sXtjO^=qS&E+XOBs~q zUb)zxGz)Hf^S2TO3CZA+YaDAD=f{nymsDT{0G{;+)IYraZxF&-=C%Bh^?n`B>5?eS z1mc^vsp1aZSdKo=wrBho;htJuZo7Ib-xThVwLsU`j*5q`gBoLu;QR>VRQlOH0O-a! zjMp$;r}8^rcPP?6H`JOnl;LpN zry|26AuGZ&SnG<#p8@z3&v=IpUZ?Rs%7jm}EBC&68K@iWeTP1#UVybSM+_5=X9g}5 zq%=3SYK-O@=RV%MW5dv!My;qusn#=3>lW=??o5VwFq1}A@iwWcQ6FcbL`Eho6+k3S zpc^cmcIRtmozRtpbGm+gIvp8V99Xe=)X*l9U>Uu~5sUVh=nlsy=qS#S2x3r?l&72$ zD||8W7S|A=?~Ini2;|3v2`_NEWe8;*<3vlxic&=*3xFxXYBM&O2UHQP81-g8GP4fk z!|1)E_Kw;ED?5_Ukp$=60L{v-<@5St*8Ujg%w2MrzwcxD(zpkx3UnV)$O z&?37Z;?Bh5IDu;3ZYS^>E**R;4sp*b7o5OZg0Ua^|HXv1K|A0>T(e?0FYU{HINM%l zKw#J4EntE)Sm~Y9s2NOhWj??4r;7>Yn`s7a`OISN);fRP1!hL8&d_%Rz-DW`nWG&^ zD6|OXJ*!`tdA4(9Ic4AA{ce2QokP*0oD{Z>dxyOlKVF3&FXtj*l8rWVZ~K!@$KTcH%}HjsW$?Gv**aAPX^Sze_-$g~Cd?|HpR z8Z+DirS}WxxDbyFl-KLdV27}WW@HzQm}|J8-GgZDn03?!A*IEzLDz)))j!QbWpnlW z`@~n~`)5LNEm2KOPz+h*{g~Rfvi~H|t`&%T2{b0l!4}!Rst?Oc1mHZBekgqyuc02i zck}xHFrI2W4W0t88l`6-c|KJ<^S_(-_}_~||8KkScB?#Ybvpn3w$b*0{kLHHOItyy z;WjIs|8b(nfxbHWJZOBr<_XGyI9{`HK^|*i-0>bqZ5|=fWVT62J^fIHI$!x5&_TK{ zo>mvk$s{G?-dC|0pyT2}$4fa>d30qAZx+u<6{2|jy zlbgAF8l)orHO~?j6V;jWM3&$hX%1-$DTOBMxTVRD4ZUDU2}f5Z&nFKu*PZ|6JO| zU{q6D4Z~c8R-qP~3W2Q%-e_2fGXp0a;A~M12b@oK`39N3B7>?KQ)D0|*VQDZ5?%ty+>7%)7G&zdUsBuhTCPC^ zFx1r*qkn#D!ut)r-HiJVtqP@>x4(%y@wRzT&;nWcVGbE*caL9K3Wd4N@X_497DZQo zz7!{9dP|rju1j%m?C$gGq5mp0|D7 zi*tkJ?Pf6T!&)SueyoGK!#5q%`41iBG}jTe{!^7RoWHBju8uB8IxUjdu$>~*L^RT& zODMVKNbUH0&eRaHP7aAarD2#d!z2DoUdtHqr+@aY^wVeJoMZ4gj33>2oyIYYC&qz~ z**Rnls{${)RA5hOU*NsLV{@nfev5wpTjTcF*!GRKdjL>cqtp$g`ALm3CK0e$AL!Y! z*Fk^2=pQHj^Q7_nCp>nzZ7u~IkuGtFr3mH%_DD=N@}9!t69Kc&Rr2==(hB1v;TW-8GtCD-#jo$owa!t^X+i$9zwNFJ!P3r6siA~+f5 zwPW9uM)Dmz)(CSf#)w|R7JvzA``Fv$PylKA-XNt2p9Tsa`W;wv&T4#bg>Q!=LO|-tX-0wnU^Tyi- zZ#7=47`I|x^Doevu+`%FR}inGvDVeOG)35MjwGFfsBNdGOy?g#9?OxC*otMF+$KQv%IYe zKi!3&?#BHl>{~#%N%c+_XHL2-5Se3^5TcFL)w#&#+N4Y*t*xl8JwU+4n$FV4qn1(^ zNiWF5GQ%(bh#m)GMdN!3_xsgWJE`(SZYSk7pq-d>ZVXKPXI-xuGxH9X;1)#eGR9zZXZQD^oWtRM9Y*iQaVkeQestwSjhEv5H_2Lm=+uzM!Alki z`M(42MR?l_Z@0qZ*0|pax4m$?Z|srv*Uce+sp0q&2^xMQroQp@=#1CF_&gZTgX81m z{OGj)e}AL?{6O9xa5u~gYW`voL23!Mb*Wg1`caW69r%o6*&Ui^JCI$l4eWxU^)K`01TOA z!Nt3@OfDVUOsKV_37(z`cX(@4c_|`-1WmTHcMFKt3Fl*HR1XSb8&cW~Hn{%ZGTT{M zo6J8UQ#Y@W_~BRUoHjhDQLle7I>n4zg?p>fnK%#?x=)by17lv#Z6e%TVZT*w4NB|O z+L4>0uTJ^##LiD%@(a|T5!t45Nh7ed0hWE6!Axc=na!~#z-8SsGZ#lSoUyDWdjD|_ zjLKpZZ=xR16yw&6pEtM{@9Jp9C8leMHn$1;J2q|Vj9~+6t<+mXb~jwxO}R(A;L(@S zlgnQ;1GWjP%XGfkBBi-U;*6A%EtG*;h)r@~4$GMsJ=5*`4zwhQX7G`2Jp(&;#*Rqn zB^rp`9j|!}01Q9#rW$g)F3m;cYjzoeOlk&R-%QQs8DTKz4L6s<&Caf`k~| z5EcQHn7aN3kW@G|qw0wB9KWDv_&y&b=2fRM-+NjE8?3=gMygI~h)B6Nc>*7l?UU`T zQy&A$Ny6z6qh@8*;!DP^YfF>N^FEZ%7koec+5CL({B&=$rck_VW!eY=)%pK({PW8f zUddYF`FFpMJSP`t93>4${M_-I4bYQoo1du%COJ#v9AjqtUz|Tq^gD-Zx@7q1xmKca z5kyClQ;N+|?zvZLaWvcO{dsII!L91N3ssFE)OjkRIJ|#$*B*$oc=o9GD;(V!{;yMc zs_~hQADOlODIpy(dS;zGXT7 zB>SC%@jU3ygZ|lh{Wv(DgV&EiJOAT5Hco0kk@1Fb!`P?M^kgjX$r5cO;=y0ZtiKA< z3Kj#)Wjm2zGuw}WKHWkTlN@(OXHDeGKTQlR%CN#1!uVWumB$#|Y_Oy3rj$NtZv)w5 zhCyvelM6#R=U&I*DPll8su3Dh$9-2dW*w4 z@-i%t4JJ4+oplt&XU26sY?w@vk{g6Noh<@uF1dK0dOBq*pGt+)7L*SvbNBCxbAij6y*@a!;*WLIf4pvp~%J}^${QDvN zRSSPPm6sadD*WSZ@ZZLu-i2**hOV>&IKdA1@x;z2-A=UrOp%>Jb_ir1yt1Wvz0+FR z{93N_nj_~3l0>#I>V&0=qCrAjL0rJXMc9fDx_ocOTMbHS2@x6zHM%fL?g!oB^bXHM z_~^V(Lv;I3TewKNz*}q>|WU5XI-9uk>YWXhL}Z7~ocTej+FKGBT`klt>E_pR~s-FUmf)=JI~3&Zbw z)qDR}6kV%NMnj;z9BFw9yk6!bScirhXq+=3M_W}>N5_h|L6zYMrwvCEu;~2rAlmoA z>e_*{qvZPMvsBMChx+=q0&QEtkDD!bM!$FX zUmwQj82nQ|`G0HUn>1!;%8Jcmf6qfO&+{LZ{l0#9P;)IZrg+oRONi`0_zXUbJ=^3f-s{#8n1J=C! zoaZ5v(LY9TWQHf9qkDaS4CNTgIgCES@pmV;pTk?rUDU^0;#~&&>$-|~=g@8h(;t2+ zg>RcX|HoE&+Z*>=W#6hp{#$ct-%|bairSi8YW_Vk|C9baI6hB~A1BYx&gXOR{2a9J z|Muc`4)()!`b!^_Z+Ur}FKcz;M?!iQ3>}l`n~c?O0<+Jiz*{W(u751qsT zo7M}2P1?AAjSNT~ zC=zdZ`L~zww_bQ}AjQ~=v**WvkHh#spYYFz@b3yg)P-e!s;-m&b5(xYgslnAoL005 zwhj92;A1@b{rDUG_0GNi%zOJ2kM0L5GZ_mKh?AutRPMJG{4AXpnafd#SpTw*m&3TIT3TeCbJ12HlEls# z8=594>{$!Ms$7HX5^~SQc{mc95-C5Dycw`r zW|AcJnYfehUx|LR&L96ihw=)9>4?s@1LH(Eip%3?vYT#9(heWeQ|z7cE{HTJ4l`I}gG6oJYV$Gx;_SoLg3JY!6QsC-E+?f9 z*u3+4fs>4Lc}FD*&~7FoJ^O*XS~hj`1%1_A>qK#A1lJ^gx^l%x8Z>LFVzovAKsPlc^bc;@Y@N$n{kj0ofm>! zLaH{yCO2Rev~@nugWtvz>A&;S@gMwS`x8I!ztZXh$_|quTUg6%5v(i(AVo?1N>7B7 zVyCw?N*Fi^g6TAdKMv)$LwOD5Uf`D^#p(w128P=~E*DRCRSrLRUo0 zkplBNcW3a|e(*2nC%@^7gFz|EpKr$dJKS%c{g=u_gfPQ~@%=;j-`|aY{)B%&{CWR< zGtO@OKLT%MExwmqyvz-YH|6*?}{x=gNPYUdEHcY)7=4UbjV$$)) z8PSeuWc)Tl74P)SU%i#@Fy#y&EUr!ln>Ef|i-fdEw)vIG zH6m=h|26xoBDhdTguA+U&*)zNAA!D%VH^Xx`r4j-Ea;#3l)_n7U%#Iff9n8vW~=ay z@rHT5zY335crT;ygOzG~S0tth?IE7~UTQ9eF|~g4ZKc7h7t<4j<=R%-BSb>MYhr zK%9H+F3J1!al)lL`Rt>C)pV@k{Bf;-j~crD>XM56S-n=IP7b;C#x`8(s$s4kXf4VS zSC#&D%nrCMdT=)H{n?w6v_NB9>_U*^|B7)m3TpG?kYE0iRuD7{Px-98wl zT!>9;0^tk*WD(icxy(11`6&eFTU2K0!+)ks1A@s#Xe5H5%wsf+Fd;f51)l+~7+z0u zMKo_$QYwugiq4iZyl0kmpwbW&QAQH|Bv`z|rcqWKCPC^GOyjvL3^7uhKdoi%s}k8#E3xlH zmQjrW)Z%qDgYXEx(qI-fs+GBi5y5JNp%+v@;SWJp2F!Uzg6}d9qEhQ%Z~knzR#%*B zF7~6RaGuJ?%h3}xw;6kl&%IDv4MZkvK{4JR#!uhidBT}(%W;)14(8`eYn|F3Q$cie zO0}>pJvc$`M4T^Sh@BKZDfOgF=kqxEn|5BcQ#R$7V*I)be|{K$x(jc+InI3@%Zr z2;_<3N0uQ~ut;pgdC_q8Uh117KN_|DB>F`F(4%}dLgOIW{hsZ67JZ2Evf;u$BM<@- z0bTpId_geW*|!Q?Eo{|AqPBqhXRTir`Pth(E%Tz;$DcL*%=i=L*WtmysW{XhK|x2t z@rx7Q@iUj!B+JDW*Us70vGtq59e4cSqRzkXh1*uyw#t4h-tM ziZ&%O{^6=aluDICsoo~iGKj!4%J=HdUY?zLf(-E%Tf8k|NI1->!I*fP(m)srWz!9PEZ?*ncE zFHufS$UFMoaa5*Nzo}l0+Xg>x@K<$(%~RpG!}xIwz6~ceNf`9ZyagBB^4S)VyoMfu z-bdhZhTor!JW?{ zapiWBxc04hyW|$2O%lE^uwjhX;QJ^1`={`)AB7*oIHN?j3;a}-UvJ7UcjMbl*!ME& zOnZZ0-i%`i-3p%=dU`-Q;sPsv{moM3$&Gj^g<6!YmsUQL{C3ahH$6zJdKZ2cy@=T3qfM+cy>Q@LS(fHx2F8M zyYqT0!mSo+)M;n-Y<_+nZ0KQUg8dL3P03$KK0^*7GIMwAj0UgqTb_CA(b8w0`FGFu z74`ak5d4NNcK>O{Vd|rAVFm>wlBCXsCuY7^YUaMhJya{WGGx7E|Ai^^Gm$J)pG`5* ztf=*m=ujGPoN;}M&*m8Zc@9S?PW3-uFm?M!IQ}j+JH{k5UrOxTYQ}D`<81$j7;ja0 zYw)%S_gkgyg|;_C5OhTcZZyFN+uw(VAvWt`GD$>Cevb=@KmrM~nNt89X_ ztcjjsv7vq{avCy>rtpdIEDH%(Y=a&gFz%m}`^jETtRJ-ggX8>$jy+J4gz1F! zfAj1Hclw1+366`1L3JfRt02YLif2Qr%JWoy|LpwjFivx4_9*aegZIs|lv;=ZB$23@ z8?4rh$7cNfP3Sn8@D*H?K5#wsTIO|U1e!H`^$q4bXSUh}+GMeASQz`uJ&R0Xlq~tG zE{BYG7UoQBCptL^(a}6r!-~YVGSt3yk|Ymc?()3uxD3Cla5nPA)Q}`IPs|PN#_=@% z{fF{DzYG8J@?QTyyJ;8?G5&N2|D!`OrIlz6v_cc(Z8!em8{De!*YEJ#4>%66k*%Xi zQPg>@h^l}-+TJKW_~hetzS89&~?@Mo#5w=|G>{}Pfh?j84J0C6@q*o6u>BB zw&K}-s~#A)l6Lok&g!y-HsbZvJh2Qe*wEP5J-G>RM2RvX|08VwiE)ZBL}o94RJq*U z%S`9k%;&^xCfw9n{`X=$3cNK}w7j<@`Bk>v|Gsb434b+p{axK}syGIcLALt6I{owH ze4e~MJFlqq|MndGK9t`vK8k1lsXW`xrZH_qC{I5)MJ%#tUsy@~{ZbRxUUIxy9;k(x zuoj`V8V|{)CUdF=I?<(5UP^r_+sPbHdKR)hfAwyQM^;a_@mL52n1SYWJFy^9IVYf6 zqmF^KhSa#uy7&g9u`BNAsYa!u=Czr761gH)@c7vy$tvoG*g`h=Vt^|l{hGg*0f3O{ z?hI_yU=&v>%=zWYBGPFH%oxVh?vL*k@uR3lAQ3?|vWSc=5CA;$Pve?(^CW7m7rkV` z7SB0repY>gl+-wq)wB6jo03>V{27P@`6s48RPn&!UWK2V(8c(*IlKQ>g8`n*^z=b!0cH45~e8{de@ZVXuZBf{upK z0(}xFl{wHzyzhT9H6v=2rasr84vJ{#wktOL-XGQYb0JC@#-Dfi(=CFT=Hw*uTto=B zHQ^nJph)<3!uLa*Fcc+cAIa^L152wxJj{?U_e`9NFrG=K9nq5OHG0p^iBjd1KA8hAV^uWO^X>6NFZk(*m<@o;j9uG5M7CY zs&RJs?C`1ZG>L&^#vcCc`(b=9#&b8msn8r+i@+1M=3NCp-{CKh!hd{+AD=jR-PU@} z+lc2c1>^?xO(~m#bT2734XJB)ki~q+lZ6w?4hRXg$5KMazY(g!X+*t);r=N6>6`MS zyA3={_^HC*@9^h`u-`nva^%Ks#BKBQe=AUHW8W*B@@4C0ROclRrgC1ky}BKU8h@Va zAopb>sf*)8mybHJFXud~c@~{ReEJw18ufg#rtb=kpQgOb17(-|RnPjrLe3* zW@qkCZ;|=ma1`)Sje8RwRk&}3TdO?w#=aNY?oPk9M%$`8|5~RsF~P95V<9jLXFiJN*hVZJwDOvwEkH&#Bps6V&b$FCG zhDUMdsq7DBAA?N??XkILz;IpwBpMLekqA`=NF$3H|5QqF~@c}kx70%c= z!<-T7(WphaAU0@O?IsfOQbvXu02ITAQiNe%8QQXYSjs8uEbnJ+KLudEL6bDl=a zd~+g^HJU@;jtaQJ#fn!k#hj=)LTpGztetug7=eUZ)UR=e?1xgE9Hbqo!<}T2S@-@& zb56md8E?%4fL5WkLaPO99?{Oassv2j(iwo0AiYFm<{1E>KwrN>jn8}W?C7vE59y&s z9}Y_@MyZOFPTLQ7e4=MXUj=;%<0VLU`bR%NEv~D$5uqwdck!v{tuA#SB?N-R`}?;F zKkvpKjP`p~hkQ5xoWeg&Sq{_TnQjI&wFAVwCR#gsleTCC)G)~Vvi-r&a*juXx<^p_%CC|VHpI=dC+6yYpJDV}_vVRRH|5Bw7p`U?F zL_pG2vU$;w-#We&v7? zLx_q{LhZ`bXak;OjYsqeeh#K|vO|E7fi#}y@Lq8(JS@^9TipU}Z<X6tZfPEhw3d6-RKW;m8vu85U5g z>4IS|*E$1($lN^GTmeHGV<&(`#OOFa2q?i+j%*?E0MRhe7mOgsl6uq;A|j?N8hHd& zNF;gj^<+Os4bf2))G zmrgRBE*@Bp7&Uyx`@U-75$$hT{)6H;NCulkzj?WAGOO6?|yDKf8LpYAY^C>)Eh1Uo4!!z(h6y@a6JHMR5Pt7?(r5Gh< zKCFWps7DHGnV)ThXyqysUdSUfty3w;X51deuU2_%OtNAvP^x)}!FFo#hSjXz)fU|n zCTKUGyOU0T3iSBjQ)x5#zojuXdANOOL%6%6VKQk9l(_s2*5ae`(d~YHE;q);M zm5B;uy+574<-W?`EsjUU33QvltrYek`_(d=m1j8+3GR{Pu&H40NAP^;Dmk3$<+XD- zN_HTeq*OFh0)9?xogWcogx{;?LwuUSCgxK<@sZzeTjACU_v*rCw}AS$tU}76cWA%p@L*&fyfmsrSA&rg_$GXm z5FkOADgiT5yfwreS{-U}c-=9Vd0#fOe>ZrZ#mr;?4+4fpNdfQW9cc_jU2{AN`4(F) zH(vs)4#Ugbn_-ekso)_(4FZve1X<_AB{40ACW%k#^L8egL7wZDHwptZU?_?+e=}Po zS@nuqXV{pU`CBcZk>#38;3jOBLX){Kg|uWrh(dx$`3HfLOJ-NaM^tZkE0eHqgMdlfiLH?u>SuIdWQ`N8 zA(M-rV^~?LAK?&FQJNY}Wg18K`?f?@nnZ2eIU6NWpf8_U=lA=~fc@<7><-1M`r219 z-ZtT}4{lpt7wk9qR>VoBBD76;6Xo_W?B=|STQ%Nx;r$`BJCsc>Fnbs(!@FNfl<*X4 z_n|Cm!e371UopO$@nZ}I#%Ay*@ml`-?oY8qSs@>Fq(I?Zm+{SkU^3^X%iQ-OsRXVQ7F#9ALNgW?&-R-++~3Uk zV7uoM+>4K`ezd}U6ZTfP)xy3N_Pw&TLT!cC8m(38zIk9M(c_<_ki5I7_uF*-o%7Xs zJx`vm&c{>vJiO-rH&cEWulXO6f?YPBxnQ(M_gb?AYgZBsD7sJ|3HLzX7`;)wvfEZGpu8ail;% zbh7*XmVM1%!yVRRIMg@=PpnXf2Xw2yJnOSYH}6<6H7Bv+K~XDZ*2we36%lHMy@in$ zqXZXBqVBo}pX1hw&ld}3yFXi5LBJ&!NGGYL^saoooU#193%?!SY4Bc*f4F;)wL7uK z?`zG9Xq3z;GW({X62@TsMz(vcye@_8Zp2y%XFXLaj@wXW3 zioiF4pYz@W#d16CNC5HrzMp07R$KQ>T%$RR#~h~|50hXPKJf%dNQH1D+W5~fVerO6LW;YG!+kbp1o!?>5<})(y9>HM@ zEcxE~whi82-iIKO8?JK+7<&k?29mQ3!-Fx~7C1_lE`qhK^I4yva_&QCA1iuy+&9A? zFNWXlz{^fY_~|0}>Cy4d23m7SEilQVPArn9dLe@RIk{G>$GhXTb2h-$IVi@2!If4) z9jukF1-K8gmvhEBWO{aQGhUhAx6}VBqR~S&8?8MSkEPlXxWsUu^zi# zB}#=Nlr0^G+h+K3H~g^yzix(KZw3sEVrs2JBN-xJ8mLij(c*q(8ka}R)9qvPn83nE{z1%63Ujz=AY@x8{j8<&>46z zP|omx`;JM0MG(NBv(r`p46mEvmmBb3H{fe0vFzV_w7;!vO>_W#2=1Ff?}9P}3Ilwf z=Q{ZbB4Oh#GJnM9+`w>*$>gUF3bX$lk~6YpZ?^VPyJ8OR0TVc)05Q%t;QrxM&on=h zgPAxY_LZIk0P4)tK$Y_`N+gC{KN_`ReBEw`PJj24-ax$XPFp*r-e=+wfhvxV#VF=e z5lIZ<+TauFZ<@|tLXQAgYQfqROJ&wy3nBlqR1!f|W0Y^AlaWoBAF-na?7!`&%)jG) z?|9t@o;Q{{zq;dValDEJ0s5SF%0w&{bJTaj43=lnprWWnLTme+W4(1g67}B0P_b=h zW&Mst!W2S-KM*+%0_ytynPX3DKK% ztmbH@aI5gK!`nb@1zyV`t2l`_v=AbdS$_?fTL;t_IEKLiULMb4fUR1^CkQiz zDd-{xa$>eC*R_a8g+DB777#=bl<#1g3z9&V8I7Onj2=J33{>N9oybpd{d1-P{6HYi ziv{kxj16+6>Y9)~#{yiJ~LmYDC_~XU#_wR!L*#zH>`|bT^cfBgmI=pIc{Jth7q@z7u6x8l#3W4BZlq0CZ%w72u$s?$aUrz8`ZCnASj=OX0 zZI10tN#Bv}e-U`3&6;P=4u_k8b0ycv zIZ+9hGv<*#fIB-ObA+8_pAfI1i3b^xCCya@YY{AkuzqVSRjef(e=F=%XoUPZS(lw4 z)b-aOS@Su^2TZtQBJRk{f9u$81GoFY?QVG99N)Kr=izu3$14oGL|H|E>^>>(XaE*> zT+LA5Jv7)J4x6bhYZ9wQEl+0~V6Mc>(CFrPq0>>t=1)P8ct8nH1Hm#z3b14rxItt` z{!;~X%dC{ziyn%1o5^e!^jNGRz)d}f9uD6OIr@_X4uRRgGKYdYO3rq!W$FdYvBEQg zS4Q_n=ObpwQM)2aroA1cLo+UVcy`Pl@0k?H43LnUEgrUc)JBH@!kT;^QJ2r<%`vck zT%+Mwi-gr?TW=VW;W@3JSc0vhR`Z@~{|k?MtkwrFW)u#`IgDWS{7Jdgv4=bI!xtpPE|s-Icky_1#u+ot$^2VTPf zzOqpQ7ZFrAE`x@Q8sm=LxOrOP9Dqwx49meIM4yTTA{GNmJf7FgL>(A?pca-dh5=S1 zFm$djmm=EIqH86~8cFDb&?Zz@EFL*UkZv`dYX%IeGq{`2aRvc)tj}=RVBPY0qapip zcYNP@me=aRn&u1$tw3quXy_=*A@^ehDJTxxi7rxuB+p%r?^X|Tp+GBx0I4$Vp6A}p-IKNC&@!=|1Ad6KIJ*cIfi8$v zqTKz5V{#_t%x;HF^~c?K_B~(5DQL6pfD9G@VFT`41niOY`6z0l+@6-8*jgf!F&W?7thn8EgK} z%4fhC1U~nlPUs)F4#$Hy>eCMmV-MJRI1hPK$Rf~-qOJwHgs4xpj5#Ck=_f^IMw(mR zfeEvbc%qyYkO2fTbf6>1O`F*>V~G*9ZU=4#2{~R5=MQ0K>k{%6!E_pVjYF{Rf*}KA z0LvoO?)H!*Y=HTW;t`Q+20JI*P7p0iWtKZi+_ovERD)%sgfMzx@_A$q&Zk_xH7xuA#UV*<{fcLB5vI=U9b6`ZydvbumyT>(6 zPKiupFJeU`f+E?kz7LFz_CYI0o6k|w3baM=4lJSc&djnXxdqFjq0_F=hNI0{(s|6N ze+stvaE#sX@@)9_0zBUld=SBh3-IB=aIp@(fY%c1IgdXaMTuxFh0d)4xEA2j2qn8m zTXZS~25M$$K*M{wqz$qNo|y5|eh8*^KYW%rW7JPb`5JZvgzl_0cLcQV?4=*^J1Kqc zVb2}h8?<|w7&xkWWcb|EE$)x>3ZH9X={I64IC6Aw+`EU1@7V`%L8xjjY&7K7;u5(p(^V7mzA2@!(x!1 z()c!otO_A+8jD(|R;SJQA zL3f{Zv|Z(>d!Ir$hu{Sy0B&1kJcCg)oj(bJtvl+%1MkC8T1D29&i}GL2UpGo&uc3D zy@>!gvv!1$v5-;AhdUk14Czln01)sS;+~b6f6N;WSBX(Lj6}>Q-$C+VW#A!1K8{E# z0}wi%S#K9Xhm-dqn1{Ow51)w<1qhaZNIL-_Y&^+;5aj&$BPe8$NO?`x4x7hRv55l2 zvmB0nGwg#-p;boFHEPHz-xzgsA_F$SMwtH63u zTviGSmBv6MOIEZgvlx4n0dg;&40#gAkR(EQ7}Z$Qy#LrUG;CC8d#J!w9ZNCnE>i_k zMW!Md$IKe~F8H=9e!e?ijJ4%2ox$gi50ub;*$q&^`>ME965_JCC68mcpXvP4z;J&> zXysvWRax3d2Z|)_=^Un_k(D0j?I`UXo{!I0GwPW+Nd8M$mD&G&8`w8ya4f$W9*f|| z)$zX`fS(>5PZvR}AyO7B_bl1u8s}-%>=}&mBXHD|J&Y^ssE*r<9Z9e=$lb_c#}%#i=>QSjlBDsrw0>uk%*ZXOE)plF%4 zJKJ;}ph#K-0J*&nW`8i_CHm++>gtGoc_6-j2u1ClMCEg)9m!E9fC6NXk&4d&IRz40 zDp{12H`~YJL3+=ig#ku~%=-TB5)NM?Fp0S`?idj`*gW5d?^Q{tKkNDjVVRi|=Aq{9NVc?j)MsM@+Mv#~ zJ17|A8d~WZ*O;wh`7b3M0RxASlqiwQFibcI$A+ztC^2yGgo#i2)68DYFyZ@&93Tll zhdV3o6S*-^bAg#D+d*r1l0Dk-LMk8v2A^$(`7|YkMB?vfq(34WUo7h8K1~3|7`Wd$ zzTJVB&cF5$a=Dl09PpzY{PO$?{PS7xpSOxHA&a`e@p-3ump%&KufS3rmnG`g0&q+P z$$MIL#;_9UZf3QAo`EiTDgkCuxuTIhGS1;1kaMls^GRSD?PUSpUj}{}g8e4=+JRlz zlK4R#4>&OTahJ{tmD#v(@?rc z=Z7CoeNF=unK0#aYT?}Zu}-Hir@fkII9p5;~^*8KlvMO94xlK8oquR`1z~g=NI5hC!^t06a3pF z@WThk^??q))I>OZ28b+^==?l8FA~>u#eq_J@HJf;d$v6cg&KuV%t>ll<1dw&bakYJqvNQtiXALY zldLa=(~QL!gN6pN5q2Y_cO4ElMI8!h3LOKbml>^j30N&MW*W$tjTbV+uF2v3$ub?VP!Be;ie-X+|BSh*b(54 z7>VR4L(vD`cAL!IYctztn`w!_Db9rk92;e~!eE(+n?>~V5=bPi_jZUKqktGsJ z9jzIbD}%-iq$EP_NV^#clK>qCHB5_eBn1c*^(Z0sbo_A-J;{5L z8GqE!!^w^a3`W?yDHbe;{m9qkP_jd~r-r?&L8yzRjA1`vPml>kA`?g5KIgI|yuZ7I zOm!j;ICx-koP>jk6v3SbyI*Ka7O>TDRdR?fmE^t*09wf8SCw%50qv_sK*OxRgdfRZ zIkB9E|ISj;xOeQ^zNDF-Cv)%}>{ucXG$Gai$^$T&pdzSQ zG*0`{9c?mpNq#Aa=ypB=ZugmS<$iOnRcbRBSO#zp^|WGL5-S=VC$9&1eQtAck61x*wrHIlSj0>Mfs zDvvd9!kmg{_s-ISIibM}s!MS!gRO&Q7<3ppC>hU}EP~}9My5|(N5`!DA9!FmP;s35s&ZoUGuux@ zF(-QJ+){}c`|RhRb5xvx@t;}!Z2vv3DQ(c)uAZEN=s55Y5>saT7jR7Ps=%Te%>HO| ztw)z!je%Y@SpQm>-Ipkv6)kgbYLw5HJ?{ z_zvJzfV)P*=o$9Xu2=V&`Cr}fq`+fkDfD_RST67xak#yV#sxe` zIs=4|GUeSsRIp_v@3EfFDBUD<0psh1p*@XQ9Cn~Gz6_|w)c^e9(|9UH|kZTwmkKOV7 zZO3oVg5O>#Qu8v%`u%Y+{PbY>_-MHJhJu1p%M4zT%z8DH1}xoJzcfx>Oy{D3Yr7!= zn1Q7MA2#v>mLhn%6g*yOcs@J#(Gu3IRE4%eYbH@9(-Q$ush}|;bGm~{fN*wAY~UHz z(7Gt<)V43V@59OpTchpdAhH9xKO~`JO~S!)c$Uwe{5>3QhyVx4Iu-M>9nwR&^nm!!?0%j$iVG<; zpzmlsmZ(X)&EaW0(-H_l1mBi_CrU+O$A@7;{sV#@dv^vWakkTP#>SYW)YP+}Y;Tkw zBnW=OcHwKZ^ii>t=w+))@~84Slv+XyB-s6haQ~b{IF)h_zc9_q7$p1-C&{l5b~g1v zvfnnaZ3ElR88^4h@x2>f%<<}u7a`=oMS@1Ly}VN*=!=u=x4PpZoFnpdQ9P^#>sqj^ z1r1}S|P162xygTs#ZCQG#Ss)9>jW_98XM63(t{aB)O>o;kJ^=36c4` z>PI%8wY_v(Dg#~yBUA;v0v-h)Gl!U98`K4`6AaiTCe&wXz+%G>V2pugie@q)t;L;# z5-R0Uy>Jw#s$ysdvTZONM^3_<<^9l_=PmejupS1AWRGZZ%p#EJQ5*Ld7Luita70!j z`*ub1fdt762hqa~u)@PBC)|s3urv6;$#`d-PN1$q^ouzP5k%3Edq9a1v4g$F!x6I) z(rIujX}rz|ComlFaO$g5$Rk3H;0na3T49Zv5Vf+UGydRO3_mQumm%;@ndqw;eq0@Y zeQ>t;6^}Z<&cO6=_;GEt#F*Ke=1tN$vE?(eS$BAM+@Br4e*^yUEcox6;Ez$TL(l*` z?*gEZRiDgEr}8AU@b4xpKL{I2^V~j>St}rgd&S6=(W+P%$EU%4t0K?_)P?u-AZ!VB zJ7vbodz*$&LepP8vK2v9b|#pml4aE4odmnGu_K^Wrz&T5I8a6sIr15PkW<|b$0ny< za-v|Edyo#2V`H;-mEucAN$TQg&CyzvZc4PqR>}5-1AUx5in)>*>WiD; zc5{4vF?_u%cFXgWq$vrKp&xd;$m|S~LbjKm$}3`kTZi2{Y$HqC_7O*VKZK#2S_^A*#$cAHV+;@*Sw|ahs?${ap*hBD6*vC)8Gx;}*2p09J;J0Xs z_-K%l6-&_|C)43;DWPhrraC|8glg51BPWp&%bZRte`tviPoX8cC49elm?Kb9FA-))0R6B zjO)v#;wLyv4Uc!n-4&PO_-QfxZ~>mKg|+{*-fUx@X3!cNfBx+GloBy=_yEQ( zc)1yVe+7PdC2{LH)@+C14-@=$GrVtxOJ(3hZ|iv=z$7w|BhB#eWEgTH5*Qqo=8(Zi zo{4q*Y^oSRaa90f7~Qcnox${c(d2h19cw9uRvnjCa5cfJaS)0P1_C>%9=0g3?t-^Z z1;4xie}8uTy3x4*+wLgZ@zW~Mwak`iAH2uso8jd(q}?SZ8k(ob-wcH9^nRq{jAut@ zD$%>|(G8FYV#GE%3uPV=bu z4^GH@SOiZiNq?71#dTSsVXY3?H95mTN^$9vt2AdNcgVhE0qpjM)X6136ZD42tmP+v ziNnbV{)3<3xd$&?2^ z{xxL!nlSlcC_{pFE;d`JRQkN6Dvr7vBviyQ%LU}%133FYxsb<3qD}w27~Xc0@y%z?zU2K*i*VXZp3;$wx+`Q#8=Ho9w^6jDIJ1U~^2s0Y5bcm))k*|3 zfqggyY&LUTz_@8$6`vjqe;dHKQ8nyy1wJ>yQ)9+do6JLZS%9_z?<1>G5wu0n77ZsT zbK|)KHVk8TSO@ljcIfd7qB{=weJy!;RS_|rMER7k# zZh*N#17*6!nJbC7MGI@H3yvTICTPNvduEoi5D=PsH21(^)zp2~_$3mTiwahu{ke(+q#q@K zLTBHqq7}CJmHAde4+CL~jzsuPi>#lL;^5bKko$O^c$P-M{k_|S`?q~y>yEntFT)A@ zi{nM*=evw!HjjljL~QtY?tz;LF^e& zKkB3|nD=?yduG??e%3IWf(#)}(!Ei?lysm+YX=0de%kQJ03gdH2Pa@S0$LBbVock` zS8$)T&wP~JR}$?%e1s}TTaRg|p$V^g*7ck^*{oI5iFA0_OJ;BC>>1vS#4#x(*L=7N z{*PgJEWm)`sR=$U6n|Nl)RqsJ4M1(Nw$XZsa>}aHsTwdg!#yC;*G+Kmyk<(cI+oS2 zJ`|Kicv#=S$1;@yMHQ_QkywkP4vwWZVUY7s3=bu~R|;}yi#ec~rUa7pR$5nruy>#_ z6A;pj73PicnDN0e-!YqpmqwazQ-L#gi3AC-D(Y~oi{o85OogFA@G2yEDM-Q-ag->^ zz(JME&TLQv+VOd7Hm}`c&!#zH5ayBTbPf*!=Cr{Sic%O*qt2eKnp0UY5(b>gf#)1D zKRhD>!4%tG9lw7Y_@D2B-+IAq@EoTMd1?>*crkpu7@nRA9^W-A4`C>mHg!R!r^EE7 zux;S`_Z|QIX883Ed=G9)I;L)heRG&`|CW{9o@#>Ck}Q??8?64FgUg@{h!6N3VKZ|* zcs&+Bvkl<2b1>9{5Xq6@2ajg%3ML|X=7Y5|d*%JSruh)Vx2BeBmU&dpv}MGwhxkZb-$7c=62j3e6}|$&GXU%QMKBcx7dTb{)*`s5 zVkr^|eli_@jaI*!;#Vcw`GU+_A^`PMGR!67Vovg@Th#b{o}b<=6#Y6U*bWl>Zo6UY zhFf>M4#x`|H*pgEl*!hgpNS&HeOT*n&W|5e@l*xZ23#)%mn#W>%UaPc4RviOOG9Z5 z)d%Hv6@ocZt0Xg()p zT*$3X@Im={u85l8$Rk9SbDY&>x7q5H!H8rKkegUoXWGDVySob-7=d?lw3s5*tD>*e zKOe)w7Byy~a&vnV#zfb2s&nSS5BQ*{r@F;j%`HGCjDYu%ky_x~3O!tgwfzo-VqYTFPes?@S1OIwf{OeBf zohptWHsHg}@wgg38gPAZlna8PO`|NzvJI-CtcrJ!z~B0y^y)@3qq$=h$6r?9Z&$&G zE1C1Tpth4`-=of5G*u1}J?#=5IQ|A*lgu)m!AF*12qETu`=1O#{4cWZqm?s)QcdC* z#jgmp@?M(|GTtI6uSx@1vJ!&ea*X47rmS(cy23*bArJ|T*Ea*@OLxN_saq3=1u2nb zp@4|j48AY})2{d%JCk3tJ_wC(g6A%{r^W&Jtg8TPmz(43&G9;75LcjsI}Af<*R(`iYKs!0=p4;`z9DlCgu0mE z>ABSqU4*5}rW6}mieQcQz8rmBLw&R>XQKv z6&f@ZNY?HEAZ3R&H(WS?&^h&R5?OO61dRz3b7U!N=idF)8ymH*S;LLZ4~>5JEbTG! zY=dk{i~4sr&fcc9u%ixO49Y&*P-wL&o0>?#tP!2Ec=_{!yxB*2BqNTJ^u#uyCJkbo zJ8zywB$>-euHk6gZdnJTvsYowS~cZok9BZA(-e>EHPGJ}B+BL<0R<6+B1i9VLHaQ} zvVw3L#rgT&g200~SW<8)jAAD|tm*vaX!km0#4}??42M2N;x!Zg!$}1u$FkBt@iw|f4KHnVo&J|jVVO2RFT@|R+ zX1k^X=mXd`s+jE~7(WG&Di}_~_p%$VO|fQha}EM#uE#H@)9JJmIXoP_o#N+XIM>KVy9llq#bu$;&*jpvUMlJ(vi=L5e`yP(E~vKe$XXmr(uDbB*7XiYI}7Uq zvJI4Na@hn#)xK7whBQ^}jAYr_6EUXCYt0nD&?hw^bpxYx#Ga>>4 zKnG7kF=z+M&J2g57W~^h1TwG81o1u0mKYMSBxEuL-U1jIhGv3d#`=&ssztUs!dWZZ zLm+v$A`m#Q&*|f1W91bcE0!GvSzRDv9m;%?2O^?&NA%MwQZqpXoF5R+xqCqLK(xH^ zJ~Q5!13MtInzhg+o zv7PcrBpjUYkL)y5*Y1YjZ@_Px;P)Y9?mO^21m9x~A1d&4H(Va51px)yyh7+jP2gHk z#c&nir^WE`&gk6(O}VZVW+}>Wbh{hAz6crTci@lCl0g-!0DfAWjPJ#<6u@N!BBH43 zxU7cj1JJGoekCPd=Dh=6By=`tQ2RD!i=fohj=+H`#KxI$X3KqLxLA-kMbL+Z!Ig>f zWG&V@f4&daptoVshUE~m*)P2m55p=myT9+i*7;l(p?vFbK_8AUcfx4~y^5qm$n@2L~_l2Sf#JsrdNd`0-}wH^<$$C$FmbumFF(I(~c*yn6&;{|j|b zWTD`h*VJtHFu-vL9L(&splUxLX5o3d0C-=3_YHVhfD&y6lFomkg$L@vha!NI^!)zG z@V|D$Re{&tajk;SkAhF1DwYREn^XdHEUn;a0e-qVUa7i{`%a1F$xZt6zg*{Z;)u14 z?3T76gRvmw#(Az9di}}ALIwc*ne6iaLXc5u^l(&Hh+#`C7wkHRPP%3~BoyghT zWgF2tY$zbJavR*tNz7usAG4l0;qdsHd5B=Z=A@}!sg~A9440`u84l}$Qf;;emV$5+ zgzQ~tG^XK_V>9OgP2$MuhYo`S8f6;E6hvWd9VImG2Vv~oFjWX8O`?uFiiH%i3Wi3F zZTN)vv%foo0EHj*Ug1GbM_s@*$$;Pt2__GLWe1`MCcxJnc()lIDraMtB)^FqN`h&h z=7Hn0&+!XsIF6EvA813MHhXtG?}C>hxLK%W#k0RT@H`x^drnOQ+>dE?Ub1D+f#J|q z(X^qihILoi&O=Wb;0RV+FgB{WeSI1D`C0Lgp?J2)%Y|i#*G;f5z-yxc-JI%&ufehT zvjvUxGqnco5{TZ!Q1hG+$Ksu1J5_JWlLWZhB$>HG> zCU-=@+!6CMSg+j%1$4H6I!hSZr7(M0qKt2#QsI4PHnc=PzeEssA7r<`bZR(6C1Ki# z*=~m{mjMX{c|-^)x^)BrhHNM`5tLQ&@txxTG{gH>4>Fyg>A)+l8i z^qYSB0?~o{27JFc?w!tmX7qW? zaE=QP1Dz|K=w*S-F0KSFO0;55@~=2@N@$Lyo{&J2^Gqh^$+9%WlX!3uaPTIk*Go>z zap^&Zj$ll(eKU|Aw}Adbz(=x=pWQ~O>7R`LT3O~QQP-akzs7k^?BgIAL=Nn8Z{}duPJXhm+(t9QQ#|<6Q(V>ez(j^dx1b*Q5EDD6>+dW{m*zqQFBD zJT=9`qEp;wSqqj+!?HHC%Yw2LI{$Tn)&`9}Td57z?wun`yTqW45`q^6(gw5utw2)0 zb@;vm%MNKfWLc?1VsY4tLX1D3J<8@1^;D(NPVaD-uP|adKcB=x0aR*y^>B{dSVtUN zBsK7vwbiU&Df3Vf%(=|vKA<{KE6EnM6C5}uS)J-j@%JZT5Rv(0&C`O#IW#5~a(+Q8 zj!_iFfLfUu+Mq%dlp98iKy1W4%IW?c*^V~QsfrG(6eD+31S2GmS&;<79@{sGhRb@Gaer6EY8A26UhOp{9zB^VX-0bm1uZyfS+ zF$9kStgU6l4NQKBK&EmmoD6uf>!afOzM(!;=u)TJV+Plg%9hED zA%gkP%U=rCz8=pkNUG#sNZ11gfK?O^MWO0=zIWuf>{$+)@l@iTsoI(OSX@&$R7DDs zkyF6n+~cfkRx*y(znQljfojfV@kAeC$F;-ne8x1CvkUZ@|5hUXp-zE4)a#q_?hM@c9oo$uXnA3QgE zBqeuq+{LjKCTDj&Yy^;N6YYx;0963ZDeiNH;Hr*m5jL4O;uyEeP47`V&HztNH=QjF{5b`*LeSw-=H{3`8-_sR;7Hcf5HP0*R4J$+CF_8K z)-9B%3^j(KFuFR;xrPM%LYR^*Y@Q-$LAn9l4Z{u970n!7jRdGJXw^___OJUvkV#f) zWOAZ5A9mKa-#|=rZ6b4x%*g#XAbDU#Nk|khFhB-1c5J3&W;^9q)k1GReqNmX2t++~ zpQo5>o+aU<4h*4`;4%$cL~-|LdlBcNaW_w!L^7cuWVJ0b~YVHXMC- z?4kUqV$tFwoWNCrh#6+0#t7cW0z8l7TC20)_n`m}m1IM09B!2rtSRu65U7J_l(We1 z)KQJ=6vCS3DXGDLAq}L@&<#L3MrNYjfV(@kfQLH_UpI#gW;gGyhUKxNrCLpj2_=ck z9o<6g1%^_b8E~NvcoRWEWm{?N1fEBmXn>7S+mp!34A@O^A5pJ#_F)eb+y}`@`=F!d z7+13C&46C=3=`^2Cv*)Xyi}gW;ey*RY!=$^!Ex|Fd5&u1kp#Ht6#5c4r>2bo?>^ft zecA!Gc4|@7OM|w8^jo_*(#eC9#sJtydA)Z6pUz^O= z=vbH{TGR@$Zs^^y?S^|dY{md!OQ-KFn{6uCMc9TeK7Ee(5&opjZ0<97Cgd-;sN=Cl zZ~syQ`d2JVL%UYgrJ}Bc`%9}c>!;(d^sQPTQc&+-H@M0{K8iO@(StT%twWa%T{~pm zAQGs+u>ZK6&&Vw2D_<-XQ0*^)V$ZGSL&R*Hm3I;a}aAvC676_I2+zxVu zI1=O+$HAWUnE4$}D}wbI_+%a5@;Ues>E~3)L{Jj8Vn1-!6S*zA1F|`OeRaHRgpODJ zQ$RRhLKtjy;C^#_do{dlJcLcz-qWgMsfuNZXAr^G!xi{pP$AOqY~S0!DPHf?@Z-ht z!z1u;RVua7iU6W-T72H@Rb#nJlKV1iozD7h1?n>Jcrkq34X+Sf0y-bz)fSPM7Zkza z2&g@u4fyuz`1ZZy!;7Om1VJ|TjTnh}qCuwHh&D)}x}Oxm;~037F!?#+IwP!8 zrlUnLhJ=w5?8b80%TBoR)f}7Cp?5pAm1Urp=LEpbX|%Jf)&y9^@lX{@BkR6t5H;N( zZm1GSp&ui(OYSYlk?Dqg$kDoXAGp7A#I6qyP6;!;;jRk5xO?P-VIJ2Tp<(4}yATBC-_JS!PJhj*Nxp7&Yq zzZl??<<40S%X9gs6JsvecRD0a-8&s7IX--|t4~=yx7bnZ=VZI%{WP@_!LBf}kgx|# zU;?3t05JCl($;tgh$;0{$Sv~e*b9W6M{?Ys#v9~79jegDPc5DjV|q29eH;*fEoF*| zO(nnNt%dVX&z~!kgNTyo$BaKZV1oQP28n%RIC>|-ymtn+_W|6Dfxza#CW0PLpM=It zs`42gt&QsJ>0c14h3;4pa|)W^@e;~@EA8I0QsAeq4W%ut`8Ni(S_%D2sc(>a6h*y1 z?;x2)A;qZB7Ast8L0c+hEs#Y~?hDFgg)R$xX|QdFTvo`!pa89L!BQ5+TlnA zVeRG3mXB?j@GmD>&GxQvFcS2A71omkbX>W^=ZA3*s)P4j{D@lBQPj9O#Iba?b=_RB zg(VZyyN)E;$ zu5=C(4!|JDKZe;7gv`7E`0n`Eec;0;9E0l#N1pQl{*DEs|Bvq-|M+hBqZhb4syHqM z__zu_t%9fEMASlOzFq{Mp=j!Oe{=l0aonp4+24PAa(sN?&uOFDTUZPvY4aGM5^Ecg z76o=r{rIXtr4r%gq2ZGeiY`U)yxDARatJOexCTrV+18@a0jNf{R|I8b3r)gN2*&nF)>tF!nHf8d^$J6r zo7W=i@^Bgn!DYP;h;|?4A*`CK#)#Z9gSEI8XDj6Z>%$|AzqoK3SZv-|x0{>zKm@Y$ z*bqK5p)Cg_=D_@Mcl`53@V+Tl_1R7sEdjh|i_xFE;p+|f`Bw0ASKOU;`$Gl3JFtP7 zc`ZVyKHxyDj#3TRRq!bYe4F)xt<@2<1bgkhxb&ZlN#qpnf@aMpQtj_n`8fie(0 zTGY-4Edoh7om~^S4cKlNW5D+w2$PVhU2E6{Ozwdv2C}UWTNUE#Jj2cf|(IblWlcUN59)}9x0WKj@ zl*>8NOUGf&;EJO*eKPCkhV?`R-frsI>w7XdjzlaXdtjIw@|c2OZ;nr^q#_3C&U$3E8r9-eC@R67gyM;6HI z55w;#gXcLm8F9hxPDXLUFDzL7E2z$2)a|#0GiFCsZ_;?q5yc@o6yvFyd zhL>*xKmR`P|9%zxvI8#>fHxCmXULf+kt;DQr$c4nn4BY>p(HSD(z?*pX@)`yPzu+pBEcxJ{t%{nkP z=hVMpp$N%`GByJSwHPLkK#$ixN*g$A0FLiXs6UPahu-K6_ztd;%(K8-OS{BiO(Q09 z0A83*c-R@X)*^K1X(!YuFa9R!3I~uOTV9)jWzGaj4i-OcY6d6yvxoBLY18L3%@>S& z;XaE}=br|L89$&DpZj{uNa z#YaD8G)K}oYqqxk|36)`z4u7kku;C)CRvr40AfFQ1dwdW>{3QelPt0_kw82=JUrBW zPNr9*{JaU}ij$DxUlf;xa?wjsENdDqet9j(OM#X`*gs9@FNq2H=sM8|3AqOO-Y7NL ze51qsf|{Z1f}9NL4&=MJj&Q?qZ^-wGyk+Evf_yokWrvgky(~lmN`V}_5R?UCi#w+V z^fYP^W^l+m!cbqP0cZQ>gz!du&oHD6)k1g9<0ccba#Ul>1xOn+08L1_vTe#SFV=)Q zQYDi*fh`%g&cO7bKXkcD?_+g%l`Vwc@9bH#_(m?kIE1Q#rF#I-gmc!F8sSk_%f=DJ zh#*Y_F}W@dpLm2G@SvSGQ7lUY2J@#U3+3P8p%Aumx;3{r5b7;w5%q`jcho>lkUGl& z2dI1oo3($Qal<=RL7b#RPp?A*zHWxU-#dP|Dz4rZ7eS1Jri88H{xLJcZh|*sC&+6u zY!zsoecPH7bV(46_A=I+X$=?+YjS0_sE;eA(U1LvVdLJdH|_s~1S}jwjNeTHS#$)` z#ZH7Nk6Xq6Mz6rKc05%&G5}Z>!^5+pJQrY{&VRg@KR2oiGPC9pW{t8M@Ky!icEiWb zu$IPq%io`|fQV&$X0Mx)JL8=m#;}1)6!|Up%HDlI5+&%Jz8l`&I=@W^PHPZ=%6_$@Z58{iVY_p5EX=TGYSq`>&za7e`q}TrE)H9w68Gf}KkUya zOU@3BS(Z2j55;7gU!z?aUB8=1U&#Cvg>vKM#A4w>G1bTJ(Ig50J{OZQC0R(pEZM7 z=LhIl&+%6nlmt$>&Bhi#*82@>qOi}ys<@Pdb34lK1|**caaSS}sqTCr>u<=)V)6}s$5mj(Ga zXjGR1DK0#)G_-m!nl0Ixwiz(*8VJmHpmThd~I+i9YhRBbC zkSz}ncY-=<(9HP{VyOP!6zyY~E72S8*trQPSYU7ywOxH3oB-gSgbAsU$3K zJroM^^zM!+Y{5V^rXjS}AeA~N))*ji{BL$~b%A-=VmLjK^M8g@;Zck7+u3+wo&&cZ zW`yhOt>NvZ;peX%fAvX%j|up%t>b@K#ix>xlcGuTE|`YH=UaSvZFt#Oru%rQxD-XL z+<)o_Qwa2oyAISsFgjMkjz|Om&R3eeB-$RF9BrKKQC=`+%t5bcUET%ru?onvH?6u& z@@aKkBLMKX6GXdY@Fe8jHHGtUy`i}RQ4GNf!fS0V zQdC(M+YHS5tBd$J0=6j$)BwjP*FZ(!iIf{G5hjUh_}ihRR68Xn-@0X zmN*Q;-+!xyUv7dQ7wT9irF?0$Pf8M$C6QTwGkk0vTNm6-rsEn0O-{bt5M-tK%}53u z>Q?}&V;#?io556bXHEx4E=mWikKX1pd>CxGUfG`3E71qd;IJE2A93r(So)M7HUor& zQL@J~iD{!gz7p2H4kDKP8_}AwHjW6WEi>%a@xrj ztbHL{T7h*@e7+c78_*95Isxo9_*evgyb3;F*maOH$&#b88^*tTR<~6gZ#(L(QpL@9 z4$GR5t{M5MLmyYl0^?m}e=J@=-*A-TI}hXEcjMsavbTn|R~%c%%dO+rt>YgD@Nxhb zw`3o$4Ub!ct_BnDGv8Tne%U&Hz8QYMafsG6D`zb97`6n20;h~KA}0hx5K5clYaz6* z-;p8X{7f<=9LA2-a2AAkr-bhVuQW0^)9+R;dxJxl(W)G0ZUg|3(|Po)UVvb}hO?hP zx9{xWDLC`*jW$z%uQtxNp&9uTLHs+scfT6Q>_1rF-wi&a0N6mEP{mL&2OHTarJbGu zJW({3iL)7sk?DT{wfrwCqoe7%C{~C4OQFC|SqsvVkxPPR`dZD2WWSUL!H=abOdf@Q z%>y8#^B{MjBHZpOUZZB=FNi25cf;DrOe{x5slxh17A#vrzIT+RVp*xBoi7DxJxEMg z3*=aUV?nxHAZz#V+%r*Q{S6kiSYNUksE@-YVQjKJkh@0IJ^rYz8 zpjwf1juMXArzW3}XORU9x-^mleRn1R>a|u1$wW@;k*owHJ`GQd^9(sn@*qikOTNzP z_3tb|Za{Kb<8xF?;-F`bI=K(uTc(K4?Ucn%=O23^N*VsQ{bxKg%uz^7t( zUa3n?qANcs`O1!)w+?JZ2bmMO0TB?5PK?v8){=0!cKmQ~3jD)ixcS+=;wd3)j;^~Kut141TfX;Js zc7_N?=iA%D>zzIrRD;Ne2On^Ub8CighjG-e8=qUH140Dty`k5J-a77k$Cs_+m(B3C z8WIfMbi^HLm;@VkaG*CD!IYa%30Ay+eaiIXyi6Sd$2|Yd{hjWVmLW27ndLwgxMab} z2B?g#A{b8lDBd^H2w?!O{~CDk0oXe;IOTe0U}1o_@YzI2y>n#<`gCXbcX$5&xi`-L z*gH8#LGG(KxAlcRyk+HTNHUwlqIp&UkY@g z^N${X4lMFEKXK`5Z)KHke4gD#us2de1M)e8jO@RPI48iu$0DgXZV z-G6P8=De&wpgDmH=$MOknE$*}TUcgSc@iWVP>^E?dYIJ>x2!*846r-R}^w6`+eRElDK zO!%=I1Rd7|{N{tKJ`}-ESHlli#kzR!cb0MRM%S0j8xqg@$A*dk%dgKGN4@sFVt?y6 z?v3;8y#*_&p%g(`I+^B4J*x!j-f(;E`1aQE?amgb=PU4obZ7xe5r}43W)L7rCP_(! z5OmUc25he7*l1(J2_z*f7Xau;i4OkFfPNp57kYz>6-}sKFb#Vc|C|J7oGnm2DC#4l z^}W)CBcYYgzblY@AWjxOzt4-}!zy@K2xaDRkK)-?XARYe96cuB$$0`pkR`TC1Odu+ z&E+BC*$lZfeAqZqEhWxlSQo|mpj1S=Way#@Z4f`|=!fCNRDSa>}KgYyA8*qErl2BqLIb24qKZ9e5FJia~ z&&XOhhPaf3Wl1PS9r8~u?o;Ua{WEkcg6Th?MP(2Wr+gTGnNvbz(Q`aT!nh z$Bn^zeHjcKz6e`4EY)x|V6B3(H8K?UhUHqY91ZPgD0@Y!4T&KZq*Z9Gkh;K@1}QdJ z(l8+A%1-v=*lTXnd?SmTHlj^LAd8b4W-F1xAgbt^s4<|il>kxl`HLe3NgGr;5;_!Q zP~WRS(Qr6%-5(WYm zj#B5Di}g~EfeM`OPyNxg-u?bb6dZ?q+LqG+ zHlPb$?hW5|#ivWcg6O}+Bn>6Sg5womUqS|2%P~jhRkb^i6loyecSN%WyjaAhS$5`Xv_qx8?M>#;Q@GlP&_^< z^1^_*w~l%=+_#3;8}PETMXh@4XIbIS+9UE50z`g^Y1Z-LKpVhFzGIYeVl$ZvBq!um zVbWmIa7DwXN?%_)uqcDf5z<-kKx8-wQ4c~Bz?lf{;Dh%7!)Q4(A2rWj|{=aDa=67B&&?331`jf#^8KNcbSlXV0`!Ca1gsH*G$zHmfqz9c+0?_x1>Z1R$k zE($3MU3{Y7Xr<%fYxe`UZ#%wzJ@D7BhF=cBYa>dh#;k0wz$(BWwuZJJ(4!Isz_c6Y zPDi|?GRj0}*Ay*QfxcOvhd_u{U6zcJVk(KCOLrXz_3Ynk*PVfBt;|-%3=b;!SQM)Y z#JXqtQSo{Y}G20(xRmHpc65|;-*>yZWKEs^AT5d9(*$)6yW^Qcx@~Dm5-yvT? zQ^9V6(z%FhGb}rBX&iNUxp&k{Lb)i~wV^bQ*tOary&?4mYn|D&v(OBkl7$p)r9ekK z=C~<0>QUp4;X?v2x{KGF0hVAvFBOBfj=+l4LVP2lc7g5<>I!QBc>(4vf^adNJ&d2j zJQ?hP?iOlato28yfW_trALMH)evKsNh^qneK9jM|3N=0-zr!dYBybmsml4>8W1~bN zXTvG@7a7j?0l>)#p7zIF>`87D$f>>;Q@$|BgF%Q)K>+d~sQX_ri>$=2+5act=-99K zj+Yf!vrjrq-uC7OC}qX}5ggPDmSebY6Ej#c)7Ki2u zqrZ=4*!POI9mq$8EoC};8{yQPTi|EK7wGi0zvi9BF|+L?z#@i4IgqItiNn_vFvq#Vxub){F-hbG5#k=n@A(7$u$FKUE(ziuaPyZ2b7>O2)!7!b_6Z)DV#wFJd zKI_g_zUp%@4p2GtfDMJz8um6oy&_d@?Ba-74{L&tO=(B z7!QLto=(p#^sAe|M<7zx^k^NI+Oh7+X<{znnU984D{!fhOJ_Z-bvMEV(pe4|lfIns z_AmP;$`tW$Wo|t7Q)Ilu4G7G~E|`(&n;;N9964|}UfYPEG%GYUq+O7upW0-+6k@Cu zbyJtTV?)UtV6ug-d{^#G%&$dy}hfl9yatM#+&fn zMH7k;lGO}o0hH|v2pD$iOZYp7@jydu#ahTgN|M6+bt@tKY-LgP!%? z@tlF@wWD~)O=NZJn()|xLkx1*fB}ayfHU#~PSJRH&bmHjVj)fg3yy}k(T-ZHv99mJ zM{0)4%6(EDn#x&F^31>y&(2QIES{^LwnF$TzYMseoHHeWl5H4b6*p=r_%3HsCQW>I zgKGdDy!QF|B4FD)yCo#)=*D2%eVlWhfr@a?Sm3@0$C}1E@+KLLN;mZFz<#TExdXrK zhOY+={oq6ReI%p8r+T1$>NPy=9RL5;{FzLEn(JZi2t9J_-Q{t4=0(^Qa#;kQR>8;J z@M4AsHT<|L9xtr(LKCF9Qy0OS6wk#_#PGN%o)!<@TOX}`QvfG|uL=E2)YZ@DW9*4( z1V$X=h*3cCFMmX0zN{;%C0L*Yy$DH=FpNdT^23V(2GS8+kM(u+#P+Vog67n_hy3$8*PU; ztpfwGxNhFd(L1&#IGUh$AM@-dIqG)ZYo-E&=GpEk{w&!>F8FRW&%0*q+`-O<-+&=D zGTH$O4K>5w1&7x>HUnN7oyY3|+%~G$E!PB1f_zE1ib4~Gv>p!{qRS$@VPKk4{Ne?2RBgj5E`RLyq$jj=hhF-+e{z6EQ+K zXT19zIlWh0#|%j21e$op@0~bfJNO%LJ4cxXvy^G{J25np&fhrZ+EJ*G=_ZRm+MRt0 zrkpyyJhF+?AkNuvYA%QOfUJH8BT4jA7rx5MnHbq86c%wMPe;mfLMa)!MASM$Ts>p*F{gaK+{!uHg2i2=uWk-P+Ae{svYaMD0(l31U?^*y1W(kIbkd1t2 z&m#;GAw~d4XIMrH8+x) zk^(Yx(*@0^KUL%X#726TLyRwc>z@N-UsxLA2q$b13CCkU`8PWU2E#FXKww;{sMCv5 zik3u?DO5AE)ribb4nY0H2B9xh-$EmOJeCm**eNKH(L+AUH~!)tztaud(XrR$28B0e z<^-Ls>vNILx?T^{P%7Xg7vB>xyiLk&{v4I)n*gPduad>)zwS_P&%oh=V(b0cpB}J$Vr6K7noTIQ9msj?68Jd`ZaHg~3sj z=7^7DNiwEH-c8ACf?*NERSZ8C!=E1nKRy}OD)MS83 zgJkT%08V@B{l|R%Q6i3DJCZ#{Sb=2njP)_MU}pE-=I{ES8BTh{nShV=c5Kq7(~cJe z;1w5Pv11+0iGZM=_9=YL&ACf~1~iBGn-l#iF#G$vJANS%wV9wn(bT41O`gqFT|P|(M=8|HWfU^G7QeM5y|1cm-lc)4}_c4M1VNx-KI z@DU1021$&T1Q-qIGbMO7ee1<^`RmjMUNG_8BSBKvbzen-CwPwKwZx4K4DR-KqE5ebS zfU)CkhqLMib3vS!myWM5mF<=tD9LcW2%er29?X?NymoKGE`rC0gdZQtk61S{=@$jA zp80=RfR7Kr^T&eqd7*fjFwl}($Np!msE|Nk7^%@tHY)bDZyRpE-SPHPu^qs^v(CIO ziqAi+c=)hDv*P-3!Syi{*-D8c*h{9vZ4TKsL#vIWu$_=)&3r(Ojf6nPe#g{qIGy8R z6l^+6E^C`-(H&@a?!nwIHVDrWcH1WO9zsZGbimEsVBxb_K8lkzQK-{qBU?YNZ3diX z{k_J?2p-%Ub@w@t)AUM50b0nn3wmb@-wu*UJKQG;iLcFD`{1^M&L1=QHQKcV7t9mE zBEYIXwJ#;CNnG-p*?%s|&Y^(&lX^ctKa)FqO_}Y*iQ}vhS-<#{%25)R8KA{FbRt~V zSnsgbVf%r;AL!eGwzu(l>=pU)T!2&|$&hY9z61F%WaW(VLpjB0upT9{|4FCnqt=WW z!3lrio&{YySH2rHL&c-}?qs@7gU8wK>gq*0j7^YKBs`|KMg@L7pd?R~r3<0`7~km! z!PNgAJV=<9DWq1y&am9z*MdVKN2NmG?pa2YQC};Ktms^cW~AQP##bq$x`$?fc`eE_ z$?k`!zuRo@4?=wO)3+szwZu_A2L%`hA>s-^oDgZ_e))EjA3*km4DP{*AHvxC8CB*x zfY=ZtQscFgTgLZ^Kq4H#**L||c%?G;ODutL(pIZLcW2TL;O%bs`PJ~(H{hiU9uwEK zWFRjFO*W?E4XYzjn~h*KjM-`UOYG+nhzK+bmNnsNZTOH4&rR^!fxE9!f{n>zr3liJ zrmXNns68PD!}z@=g)9kJvda%+Lf!r3{7=k#grO52ym5_)j0ZrCITn0i!=8Fe2m|I* zpgEvfap?AJgy+VJ@0~Mo!rYSxHg;+_96zso?p^{CaUveqIIH1WSSrXWxU5`54f?vy zfQOs^REX*Z+Z*n$6~Fy%`0p|Zzh_S=rX zeKq{D0j~$0(Wl(-zuJcXRKfaO*s*Y>Qvhc9$GX7|pza;FTgB~-Q2!+hlEp|`KS`rQ zXdZ$2m`>Tn={wQM)WcD?_}T`t!^Rkg+0ACq?w^t8oPz*~{b@51uxMxXPMVRRc!0~C zt&cs|zY9v)LfpsSJR=TqQbsW1kbeUcu_zG`nf333*?;uz)4$Di3V#+KVZ#*8%L2Jr ztn(YL0re-rH7SfX?6$8mJrwu*fDumG;V!_kU{bgL-UaIb=01-k;f&KAKY zBM_Pk_1$6_X0Xr%IK0hBIv_jS+E{y$VfbiSy{$pqX{q`sL!~5YWT0Up%>x8Gz4<6~ zMGY0KnfN9Y_=P2$e&>{t3m{%fkQ9bmIF(QpdNkx_P;D#|G{e!@uBR19on?U?hSYty zQ0L$vA|J64z2*deZ?oal=N-QPc<%s61e?y{-PRpGFoFaDPW5gKM;$+7{T7qd;;2jf zY?KcC;HvTUjH7HK0w*UBB?s{cULp(hKq3N!VOWIwq`C}q>2$WO8D4k8&o|(&yI||U zEd%Rr_)rZGjom2I3d8q`&acCoog-&o9Rs2LD6>F?Q~j=jkDK8Y9mfH@c3$vRfR73I z@gd>!N5%D7ksk_VP3%NSd{~hMn_)22rKC|5AJ0zW(VQcD|L8JAh|Gg!bZ{zQGqk;- z?tR>I)XwLFmhm1D6vh1qbQnhWY;gS*T(;AO(szILM0XWn;P-ydk!22qN=Ob|i=s&9 zP^Lm-7@2>(b`tY!d~MyZ-8=sAYs3HZYsde71HM-Bjzk0xpd|7tz+-8+TpRS#xbDjC zfbvxEq=L(1L$7}C-5_8qp=KgEDJMEO7lNuS0wEF=^QzD_14}0BD@u*M6LQ@SY_A8t zy>|TL#qje6+&a%yJ32mmsrdM?V|hr>3#b3V1AyTet)m?cueXX{Upro2J63eaHK8Pq z|0N&B&z#Ds)WQcbI*vS>?U5}*hGP!`pLJKWvr$TR7@g-c2IagDHm9REF!Szqs{h*v zV~2qqL_I&Vk!+YdvGKcdN_hI55IDAD1gU~|0mHa2h6?ewvaGu9}elEZw<% zGCozCkrxAi*2p zc-stH?PNo$;GPl=rR?FMvkolI5~XuGZ9v~-=0vs_uFznpdq)<*kvdYYNJY>Vg_H`( z2jFBN%^Ap*#=+UP;i*UasAni+Q=I|;+N4PabkE5}^_lKIT!8-;08Pl4Op0DBqK<9i zY6&9f)s^5>u(t-S)H+X@GX%6Yh#E)#cD9&Q<8-~Q!speUFer0_1_Z^x>3c)|Zg2X% z>$?Nr?fvWGb`AE--<*jx}b5CaBF7%@t< zbFjw%M646>0S88fu69{7o}L?et4PW4ya8VhmU^xU_~9b>@dNPTlj8DRkS;!1Fayyp z9%^O+IHKeM!MpG|GMaueYfSX@G13yGtSU0qzqTU-bLGQVT*MB4ac^6EMO%XNN zFyb;%1)PklpItf_UJg|wxic)Bzr|Uc_iiUdBFcIxd(f50(_kshOKu)Ou%#7Vrt%QP z0IP=kTf?v44FCNi`1=tO)HW2>UMujnQ(yzspACVuBIS(o=-Fr>97Y`n2*|Q- zm2$oJj<+{z?|<8Q*PpJ6&mR*mPYLWMeOd zc0})e5a?R?m*GeqnegQ0eJRNacXlHE#a@E>SriWpqh=p&)=z@-UE-3($qA#}Y;Zv( zdmk)|+s!@$*^XJZW2R5!&*P98cqm37GFQn4$uB+&+~KQX5oZ2boy=Ffmp{eeD`5|R zmg)Q#hxo_P9)Xt3K|U#sOkd8-{;(tA{3EDpoi?L&Sgk%XQNH%fF($N zVQ&=ZI_wyA<<(FsINtK;kgcJw73oNjn*GK)q&6URNb6C2VP+7u?{`lvplBK=j050& z=Ejr30Uw^>#s8>c8H1yV}Lt}0c!VCji1 zCq~GQ19dzSHAe=_oxj+rBUtbz~$PXhEikqGC&ww4-gC(BcIKGKh8=7no)jJoX{v? z?L8Y<)5j!#O0?>x&a>mOT5tpm9g5@xVdA(QMkn5BC+bE+cJEZ>?58bFh~5c$qt4`u zt*obt87!wMD$~uSd8rd(?!2uwY_AQ!{@(HTZ-#%~4Bs3vcrF!x_-gpmN5c=FJ1(CL z>2dW6XQbXcw!`q-&G74;njo2QA&1u(5G|R* zeR;_xO0{Q)A7_hOO+09mu?M^(8{RSIGa9^3Zr&r`W1EUgp}XU^xqqtPn;_6lM;XE} zot$%^JmS9`$3S8qdS($pn)p2S8FUUq;P3CHt#}Xr@dyHBmMtQ1j3hRC%sQgf=kmSc zM86~`%FKUNLCI;f^A*qX4W^_hs%+;g8JaobSpY~P@h?VIt44no-q%ne<6apg zxzleA;(N8%1I@{Ob!#}bhJEAo+t+)?ZEx5bN!GV+xT_)Or$=WQ3Q|dE%YnQmq}K!K z-jGW}zI7ZMp*01NI_Iz-0#uzwpoBpO5~=Ov^D(aPZ>xsw}^ zJEV3F%c+e$-%1JLoD{V+)Eez3PD&B}yM_9c!*0<&XcjXD9Hv8PO^cTcCUhH)xyPE~ z-5DDPE50}3RsM`;tRti&efdt#HJGlGj7X>MoQ*gzeO_Z^_@{&fK?IzA${6r?K$9aV z@p^I#f|Dk=D}ypY5Sq~SRF`jn?S{4;95MufXaSX0IELDXen6Lma?SYg)bJli!y&-08?{m%{2EI(0Nk5FkcK#6 zG*blaXok0=;pmNZ=4j;%2a9Q22XA8VNam@g|MWy6oW6PQd&kK5D{pHE6TTJ!z$uG=7tam|$oGiZcxGoorTI;M#`s+Gn~gv+vVS?*d4fbd_Yn}pTaP3P zKo4cj@U0f<-Yj*-iYdIE4`VzBnf}i1FIkw?hvQF?^{Z$7F5;6C#}~W4g(mSCBCg<< zyqzybGe)ozD`TLA_lU{54M~0ORR)l4J5aX+)rU-NTf?>y>VMrkUR%e#cii3i9|Gj` z^yn9((6k|y#34S5Aiq`ARk5xe`>kW!J90HFz6mxHDkF(cgi|Ufb$^-ym-z3@40C5z zkU*i0WQ=6Q#K+?5EHIh3G`Msy+(;rdkJh3gBgkC%|NRhXq_Vy<^rRUeb0eN&3M~St z_fZOCGon~j?xF`F?3xm1sn^=jTE~%q)&x}>a-bfK2doAUz}r*2Nx~1Jj9zK;pdb)| zsAt8tjz~6yD$dT|#^L!lYa!=<#{iE&aKFJlW%gq$^802qxE)gjN;(k+0lP(7ch+{I z7!67JJo!AlHn;&(t`yE6(9;F^J($5d53H)NG?lvd)+&Bj44+rQWx*Js?1EUHb-VL2 z8jf~vc>UJ!x8H%kya;})iXE)weZCw1b8Gld59XF6oF|}U>+9ls#yJE-!7mAZcs>lzK1+N(?OPrxXOy3^EoNwbO-e=r001BWNkl^#;Is0G1r0R_^EEiufO%#6y5n0)@eNJhSd3CaY~2W|*KKME)MK;8POZ%;z3} z?VwM^@Z&}B`9Y|-xX_u(iD1ZJfT(BGuUVeyKvP~@?bvS>-(DJidF%Ln=le8^fTd$; zz?V0}rx(NHQ$>DiQ1kt+3b`yOpA{eT0$n#e{=Va%UmNZRgOop9IlG{Dpx+K0Rj}=J zxa%e1`g|b?*J6u9#@8EpFq@F;r`-A_}?#G$8i zoXywzkGfkowV7*#)=eOwNocd8lPQL^6(K(^DYN@UX@5#d&~kSAdir-Fmn0=5^;&;8 z{^;iq9gxw_e?BB}R{Xq0t8a77>Vva%`q9z$W7PZWz2Z3N`0w|I`(}7OI$q51hK?IL zZfOqw%eY)YH959EwfhEf`N6X8sP~4tb>w?Rxp%C4!?riPqwaLh3AqDDW6NM|5oxmw(mJaN z9U)j@&Y76bzxsa{uc=1KAfUC1AS2JPsGsX-7JPq))chpQ*~NJ1_Zxd2+6n56=7Savvf zXYh;q-Xe>3!2DhtK@eputd4=@h!BO@E86RUzE!l^VO@}x27PRhB|Fp))UD$7t>T|A zhSv%#1^E2baLo*ystLYT!%OXWshnHUx@QhzSPJ)LH}ROdyAdZDbuzu87F^5qMz7vP7d1INZuPuawu}Q1P%mBX(iH5w;>i1o8W$ z^Y+X*^i6CgERe7vHUcCG`zQhbd+<4ar?dPmT;EW9%?gx6IKL!U?NfL9MIlk&cjwL^ zKnH?DN1w-x52!i^z)5~dTuIlFDVz5@5H{amBkMm1(X^wY9u0M?s9VLcHEdg@Z{9j? zyWxHqUaaFq3^z4w%6SIOA4}GCQz6MZnj=t-W=o(?}HeP1dFJ7Dwa1!K8n!5^L$Kq`LN_;@~C z6dx{}I7iKSoU(5NJS#;fle!&-x83k<18$AVe!ClnJAmIe!^hn5c@sP}@(j#7K*Y;r zyb*Pw8$*obl_9tjd(UPda)LQ6Qlg{5ZWZ-q$M&t^^=9~XGi-<9VKIF8)ba4ikk-V^ zw-W0A`CG^T*?>zi{Lc>j^vDM;ZrEx!)FakSeGY*0FPy*^a@~Y~135auw*HT3or=;= z^WW{Boiz^tZ0tpz^TP}e;QF;BjNhXK0XqI#JNDWkVpxkC!c0Zd{a*3<((rO?*s38b z2$`?mL!A^)SA%ND)7nrwjp>pMPZz`Ulj8cM$d~M07bgRJDnktC6K2E|W{nDLOF=4` z#AxZ$85#e}7DmIGI<8B`aw&t=9kY)`l_^L9%Hx8hhU?RUcC;be3k6yQ?t8`0-x~h% zX83v-{%{x`e7a>8!-v9-sSPXV8-JV!YRd-qRJKWqF>Vok}*kc9bDF3?m4 z`4?V-)^wUd5~b#X(f7010{-ajqVaQ5Kikb>$)Dyz;&j=yE`p9eUrPiy+sAb|~_muD_L2YvIyAN@Ghv}Dh9Z-<06KN?>_U}7E!qVsg~JaB&9jHhajhc& zh-YqI_w3Fe@a(KhXbL!~#SbU5e*e4XDpnrpSDb{Ij08?|V-k)!@_re|gKPD#@zrGf z|C<%&?~emJ{bHay5p}BvU;No59GZ$F4B>nLNrHz5#UE3`$AfdbO98GAiuIc2NZz1@ zxJ5XVt}Lw6>7L@}d*gw5+Z&FiBMXKCl0CzB-3M`UNNDj7i*s@=a$1WR1QQ}Cb~N>eChc6o8TXt;MN4s3HamI@u%a!$IphGl~z{__YVAHH}r#s?2-skItS7B z1aND>*TZnx={z%xPS%vt#%*SCM1|b2n)yI28Kf|C=YN>Zp6Vd9Iy@cwC<$;OzYlAY zfoMgbY8}`Q;MFq}Rp1$hv~;8{uxfaDHT>nP;paDCYk~&_{%|q;1j7dba#E}-kQTv{ z`B??mX<0dZEL{|7rSr$T;O+f>HP-_X>EnlH1}q8Xl5kl$>2RsMS8*qN5yMmB27s?R!!(&bsp zBodGAHiq3i)A)w7ewV37g7BTa5l_o#n@@zm?_M*|Lxk#~rzv_$D27F{fj&vBN$`{~ z6BAX=RVm8x>&d@X^*;V2!}%xoQz@y7_lPU`Ig3BUd%WduD*1(hn0_q+HGm5#!+)8# z_I1iv?-jPQub)|eLp>_?t>JcWc-=bg2S-KUdczwGHvw)6Yziv-`tu12KnFNg$D(alHToL3ILb@32-mu}j&bz)AqKGiw4Llg4t%-ca8v zUcWW``l9%GOZeMic044#~M%!`R4Zpp1{O?!8U+)Y`J~^-Qp#Tpn)dMvFi)MD* zD0tp7iOgw9RQN1qe4)Dy+gAir$j9gp?$b-4M**`Jgiuj zj@Q=%M-!m+5k#}fB!i0+h{kaKe%8btAnc6R!QuR1_luV_yyhQ4f?>$%M%f_F%~a3B zfY$>RjME>nbQplJ0VneS8GD7_qf#k`!;T*^u!-3$ZW=I2kVG6Op)crN0})XfIc0Pz zaa1z*M%G!9P7d{_L=-?>{WT|@!abvvb&C3s&=*?$GD=SakpYvO?~{gsc>8&>M%{j^ z-AR5F^yz!Waj)37irq(#-!>Bc-WqW0hMSP+cURZ&!MUR+e5fExDa>X(j1rOIcuf;5 zyI{d`K#mI84xsFit-=*`$CJ1^}9v`RhW3E?o<-X2?>! z{u-?6gtIeBiUG3iS6duPQXI|GyKrWH~1O^c`OJT-CUiJizj{^DXv2V z+8gWSLbxjVNMTKe-h>9Kvv0SnOM9Bv`@QvuhPL~E3G4R`v}7orX|>+bp^Vm@loN-v zY0Pr~GN?Jwga-Ruy(9?;W6(tq2?N42cfQeY8s|46>Nsqp6A~WGo}+IGCoi7e&wwI^ z#*Fjsyn=JsF6UG4u$eA=T{eHd(jf`1nx&_9vN%|bZbSu=6-za*-eCsL;eoA=4i=`0Nw4I zMvG{q(ELy&bn9&4EE)N6#pB0{KR3hkYIt=bv>5QT0-rx7eE6YY`TPKVxI&f%;-Y1- z|K62{)V0}@0jaW{-GRJxT$YOGwc_KQ#`2Z1X!K0Te59^k$$u(?)c3hp#cj;Q*OpKC!5A4s2>I01_HSLrW%JN8rHM z&TMeQLY*}0klC0MQcpHX-QKH^wJ$wjcdlXB7LN0rzVRw30yp)WifJMYbQ) z`2^f&iLCylRG#d9L1QQr9O~EDgBWPE0WV2>}TGe+^F-pXYFsyY1bE zikF;kUfd;`O~TtGzHwvp@yiO6MuHg};_5tonm~tM1!4-IjT)Sau(e18lAO5H1eOvZ zI9KsXDPU4Tw=}r{o{5pI8_|0jk^3GCN zkP)Y!e6wd19*L^}Nl#)K5@5|qPaqDb>IiznP(_Ad9_^1vco+|lERwg;sK3qwH01>_ zVDT(J$cS-62JYp&W;{I_ems~Zw`xN(;zI_0T04Gx6kIQa_mDXkKtq#z_zD>d5_?8e zhZY8+G%yy=11eE;3#^sOf^P@#asY45MWT$_5cekdx+%WA8h&~@u&x<-P5At*_@7(D zm)-E%sB)IF;OQ!Hrzpa%fWx8p;{bN0qwf&ZCfF))tA@>-tYwZ^fFd+h=`^qV3ijTo zqcCQNgSZ7FWaAc-WBK#|eR`zx&jlnH$JQOutnUNvTTU8Hkm7s-10Gt#pQ<5S!?znti9cK^ z9h*u*xny)D@&XWokHFfuFh`q9Wd3r3+YM;*{K5&rBiJ(?e52|}PY;_g9P-JS4*Plj z;8#J~>)&Pg@#_)v3}%0n0Bue<4Oc;%Vxu0iF;nO7O97GjKh&y@& zwD0fDOy66G0WSs6`HLe0q25PFFKq4e#6v|K>SrWsZi_-HJ`A2&L?|-W5DE;TGK&^J zB1EX{g0a1!-470x+8VZdCCTsJaN8R0hvD9U7d5;l!={2=$Z=}o{EU+wXHvv9&zzJO zo8|=BI6Q`=uzlwR$w4?Z3GB#Fk5IID_TL(1Gh0JUkMgZJTrAtP5^Mf3>8NB#F3hyD zL;wC6QI*MrUc>Vb#jTOP&&YH55IcP_A_f5HFl(p0cy4a@aHGB(Xn=Vzz-Ze1bu1xB z@}Qv$g&DfTy#V#XyGx00pcZ1{s!KIV?k7vS@g z;PRlzYmDIhu02Qa&cMe}9#Dw{p5l971VDm_p$Ek5ngs3W*bl+I0$ZE4Q?tqEI4T`D zKqGZ|0RHPo!MCH~|NX)iLrLV)JVLxI)X|I?w)$Q;nhfXEopibz-#3gtU@&XwCOC{^ zJA!LcTOT8?qf=mVIRtqa+L>9MN7I_`;d?c_9EP`ML)JJF!>CDz^ATWlotO#s+Obu^ zr3<71R%|2_;*qB$1&U%Qs8YGg1J{|2!85XVeo6#_gwZA}8A+~?q{xpM>(S9_1)wAe zUJK;1Ld$}XFQ;7s#zu9!G|(`>6AF)%Q$vDa>4uLGEP2QFMvHlU%6NEQkuDk6=L^<{ z4d32kqM)63UL21ZwCm=3Y$1n9zl=b&WP*;LP(Rq4bPC_lnBh@@cwW6r3J}s zoSQfvr&LV+TGZgJvXRZRB`+i#61)fBZHsfzznUnJvS=aCmeH?-~aIxKb+>{w} zU$e;xh}Q~0&3FT>&+Yl0F(2)7zKI|L^ni6{3*j&(;gGtK#VH0AMH9-CswO)Aq?~8o z83Bp`sVDRvqc7PhF#EPiE==8AyE_KDU^xETJvtsNU&CTi&z)TYK^Pn&9yZn9Yc&$uhb@~lG9atJQ5@xkf#~ubetb#v38ji#8n7u`ANmy0z+<|Tt_5ZTv zN;jfdd-DP_k4$7SLY0!Ga}Hz?&Ph0XhlT))FZ0U|-`B=zkvJ{e$`BXJf7{h;X`8ZPfhCC)Wy7A+PCPpU3z`TX&)qnYl#@6py9IW_}=wLF7dTX^6 zu7+n{u*g=(n+NE~VoagQjlP);8M%H&3TWt}0SFSQ0|N0vz>=*9-2#vC`!uTe0}v20 z;t}+ey!OeRUh%MhL^;Mv0wa>G8nR<3_*f%S*J`={+h~p5S7ZOQ$&!sNH8v4;Nj;?- z(N%nHV;^Ikrv`IViso#>9+hGpoy3l+H&FV`Ia(3iI7l2qbEQ&hNcL8thB0{6gTCyp zW9+~|3(Dbj#|1lj@a}~S&%bBo4_^OK2_Kbla|8QYutRV~4)}rBiaxx)k+ZU#?yv(M zO7!AEq&eeYRN!I;zS_VM^(34o@6Q#`WQN*sh*~7U?^Q%do{NJqOQ1CuBu^8x~9F7DFBH6$VP(rL+`%LQWHspv=Oh>F{uJGiJXfBeNC1N^x#( zms#y=5cfSG-)luV42)q$b>N%LI5mr^sp!KDVRqV zalHagjG`=AS(0$dX4sQNyQ@XNB9$fJqf@OzVRjE)#b!TzT$JYxrkkZGBv~}#(+2sf z%mwBm%oXPzi1`#UqB9}05{khihOJp7#zAQqrw%y72=<~>%vmXg$U9h3aO!6OwWtfV zv0Y!F)-h)+SwUecGfaz*CC=`2xnW6(Rx)kf$ftP-e9Be}l`?Z~+`qXoEl+IEJ6q_5 zW4bK#mdGnCoPdduD~|^J@IoW1_=-YT`_mZ^4G|J|P%ti!9wlV>RC>4_jdk~*9V3ZB zyPJ~fup|xu+#Ez&G4lD7b9_YBFADUG5z=$`-6T~IiQK)^*?(0a?pFB`$8V&_`{>&4^~iT__M)2Rv_E9W>LdiWnGP7wu)Ms zH{q#Ian6`%|2rL}nA4&l*^Y&p;S`PJTk*E0glP7mARa*UQc$;l z-L=s%OP0>h9rD^g#6bmp^Sbc3K~!~y<{07=C-hZ_{~&t7G{FE1W3e=+lqDYE@95Z@3 z1x=^-U^k(*hBV77?j8!ZJxy$?WM|gv)V=5!?4iRr$6A>%`2*3>kN-E6Y|_ZX#k_zx zfPsL=K2~u#P*WhH4VC0AmXVIIgPIWrO=fJHj`%Gmzw2!%m*A=YaM(lq8L6#z3`8(8`td+$qeP{;kBSJkHo8ZI6bSK zQxPu^?6}bNkVN6yg zc$L2w{US!Q>*4xt>>b4A$l1FdrW=159pv&l0uW#!k5GUa{+!2a{r-Zg7l~HB_-Lc zs4`YOUDQar=B6waiYaIBZBGfZ84zt@*s>Y$r0!Z)2)y(h z5$V0rBD;5OiHFM#1zAL4H_#osm=mbY0chR$^dlaYv13xfQIQ{%=ojur!~sTByLXq8 zF#D!Z4Ggsdpcqmw2W4T-znHOiP^IF3r`S46gPIVraAecgnbmNiNMZm$9q4GY!_ic| z-E1IsV<_}HZpz+LZ{HFXinb0KauaH@=T=SL)2lR(5_FXB>tO6&(hqolZvQe6eUE|? z-nsSo(_3cO2-aX?Jr0vX8he_a3mN{HWY3LA_iH+i^~GNYInDMRn+7|74s;U ziF|2X9x6X?rcmGB8V%zc80-uQ001BWNkl$IknYvZ%d>PX$tu_-7kI5l~G_-2u^fZ1eOfvY}C9< z5t~z=4A|{z>OvK&TZ$s^Sj-bSWw^^WJPRjF$r(;H@vvDJfOxUuvlj^_vD${cLTlAm zxA>V05E$O2j(UmdCsT8yZ2|#zdiHm z+SqHH)i{&x<+mQ}_cJO?2VmYq?$V+rvO7pUOYFI6F!0#iqm5`^c6iZgqPwgQ4H;>^ z?%>Gl>n9m0#Q^CA8AX0!*s-F{UX35&{a0T{7~l2@qXs9^BL*~%pd*Fnj&>lN;_oBp zACZHU=%ac4oU1=u3ZRJT+(Qy?I4P#s54Oj3NvM<9^8@XDb4q!widN&;QLp_Hum2)R zkDer#`=SP(B3d1E%0*#rFsm8=r77i=c8&)T%b&GS7~#^9n`t08X{_wm@wItZ483(!+Du1=YPmA#&#54Fs)ziVLhq29Tw>Cs|C1i|+Q84HLMYOZC z3F6TMdj=61<1)pcUERBBpqgwFBNzvP7hct-y)~^7+vlK&jL@E8v)IAQySB?WkY=(q!3Ml)n@#G^dMbx~_voh_?!*bB}#`R_A^S8zy z-z(o&+wZ$2@$L>jAY8KL(xup1iK7?s7N6+(AMIOlLesc!r||{bn_wIauxcFy+4tm! zVpUg`vLsR~oVD>@cjnUgH#gKJ!TDUcyq%ceEu_mtnhQ$tb~jT*GBvyBc|uY_t0Fa# zroy!B%&URHoEbB1#k?lPQlbgG32bd zGFKd&M{3Shglf3+F3V~uN@H59)V20uMAmv*tVMaA7*qP(%XEK)TB$ELUOv6>`#)d! zS|2rq3t`OmB)vP505jyd|A0x zZ{duHHh&(?BkH3fd z!@IX|pI7}0hh=dmVEoKLWyqkdQB+&@bY=8p#>jGS0}X)Cqw%qSVyUm(#0!YSRznOT z6X=xuk@ug~&hWfI(L+e)bs{q!#&51q<+Gb;wf0;^^ci5-n8}8M_<>FMMmEoJdmEAuCutZ*deGoT8P4p!O6-M;&C3*<6JD*WF>~#)1|~Pwn=a^*k<(0? z$^g$1B@igIX&zY9_ofjlRsB_pZ!dx#pHDZ!kA#Z3c|yV7%=RjXq*2hrjNsVS=7 z4~K#1wpHrO&i=BqKJTnAwy#2CSrVtaLU~x=;esp+S`2LA1*wS1@OIsJ`MUD?Yvu3X z8ozIFbNT-!wwOgLQ&IAqIG-0}UK}WTHr`vEZR|Oo!rE!K8{5;B^}5lj@^~uTFNH5J zjV%sL*J0AXO$1q&F*4@eT!?!Q`*b#?%t0RqB7>DP6`-;KL=&>-O5 zMhU@cfcjH)AYjk0&^t=PA+n{Bu_w^i@<&2C4Wq9IX2|AtwGF4W5fS9TuHG7{Hki-! zEk2kp{NEnS0adRnQl`|Hb7Gki(+ow#_^eJhpUFE_7_Uj3DAxHn9+_$DQqKD3{l%5)i@8`xHWfmCBo=_03vs2PJ~#iWB?9F zug0@(UQ5zLo-Y~MOwg(Zx3{>aPRYW|kt#6H-k!5HtN_tZa7sdss0+jJ+NT(gfgk^d zlMlTTTn{22itY&0fB0E^#_C7SLC*;J^%$$rm3>LdDNigp@%g3k|9+|b_j6@cc$^@y z@up->VxjwOYkc}H{O1?=_ZQ`lW}f0HC5ph)YCQX`d6$Q{w_k>5&=Z~gq=~n5Rv*UE z;I^}Uxw3xW*jBjRDtj}|@bgJHorQ9r$q&F;$&-+x+}9mQ$rhE-3{oK9Wr`not5S!S zlFjDG<|V3FzMD1_r{PTVQf!Yaq)PA}xiCLAi8WB~~Fcy&AaK{FU z88*LK4%94S#93ApJih%6<&7Zp0JcaW6q6p5%QF*%Rb)<^)}cjbc{2rS-XOMrGP!Mh8k~4ecE{W^um|VJAZr=zPvQn zTA4+7oZ-X$%9{_Biwfnf6O&=%vpbe;O52Q%^~<&Kv{h~uR=;j?`TL~G!>5(U4>#in zi6u^PrVc5^rnFXR+sgL+nWsOV`SN9@Hes0xe|}T=^?Bv#YUk$I#TB^7JjBSOL-veq zBAggc=`bqqt(FI(*2iQ`{nHLdFYxu^+o2iknh^$X;RJPWUAjR^0RWPWg1;2AK|If& zrGtf@^G}fdjC3b5A_)hN|9DNSAJXnDb((qNS<|aJotPB)YC>reZ}k(m?Zc|X84=$H zOD+3Wi1dHQ7PavF6_1*?K~FdS{w!TN~MJCjm|86j6CZ#E*@Xnw7dYIHwXG^FyOc_tX58n>7qTZs`Vq~cgCTOd*Dzw{9yHzVzZ~(AxmAZR-Nwqe%D2{5r z$ZMhxP9X0#CtynCTRkuYX3|{9Q?bH`vUh`@f~VlX*rp=hi<$lf6(7w~g!1jjdZ>4K z4FV$iae#CEOAKuYPmw^wuK{sKyHVT|2wQuPnQLD4jsSffU5NJp3v{#qB%V`}5W)a9 z?y1|@Svp#dkf%iWU+}b!hrt{yAfwTzxo}tQc+%cOdzRJK=1mu?@Qv%IZ;*k+qa$ndTM;x%?miE!_bnwL51(n%HKaXet8nUHsK~dKuK+4 zrK&5w!v@;Aq&}#l%LWF0?6rPaTch1J_RlXo{krno=gJ>f;oD|Y9%q5aQ{w#v9^WSJ zu9ef{4EK{+&H!p9c?3vE$%fTLr$_j0J^Yv~SZZtNIc{VqtXN<1#$2iXYavaA+|(-N zNxhA<)@Eazck{e!Q%+61=+un$>|8}r6o!ZY7x%tBKxaxN+vw!%ZIISYVmtyb%?N$6 zI(Wsr{HZWntBN>Fn=48O@g-O8XDbr?vRdBqU4g$W!rPND&pt0CkfpI*_4u|Xk36WI z6HBT2Ic+90`_snLZ_oVp+s1!?R(^SgFPnoFQ697M*Q@eBRhXATKF=1NOu3)E4sw%t z+AZ?x;-0BF7<+GJ^*?Yug;$qL=pM019a8N)@0IQO%GWP1{O$LhuQ%o0U17SZM1&x`?bt{B=b`Ba zA3l*u>7ITHZ(Qhwe(FZOLx5qGsf5^0-@jl76$kX`pvg7%ShaW5S(K-lqfy;yZZTbwA>aOyv04btKIlynrJ7@7 zxK2YwAT!3g>jji$5=wz-PE4o5G-XQnNaG@&Hyb^z=J}iPuV~$U8qp5hj@~Nu>T`%+ zcIswC72B$;Tl0!VivVauCWCsYl2rjPl3@21bRv#^65`4u zWPS{-$9;~!*ZxfLV=HEqexKT((Ts1u|LWnfcpXE@Ys1n2bQ!e+>W4kXhW4<%MxM{9 zj9q-p$dBiVLZKZeDGIsP@#$|z65(!2e7H+o3jF$Q<+rEG(;l$Noc8Qtx4K(|;`ycV z{RX$1Y3>C~UavDH<+2Q;At`{O$%b`z9S`~e21|gwM!T+DzpQ-vyz|RfO58U@Bf;BNkG&LXZTzw*)mSu$+tk3Nw5&KGNH(cTEPgPf2saJ#w}*O*wW+s4)m$ z8(cjKQxwk0WZGy{hY^Vat0C@IK$+*n+xyI)Ulb8zDSSUGKb_!VNnSsvwibJ&_SC>! zcGczdz*fX;=^haK-F0XCdgb${jsN!*rSR@j*=l9k;cJ7nHD*=rGrT<|9_|a%c{aTjbi|T9bn9zghaQN7xUG%P zFO7e`G(NA5zdlTSJZFCQx$nIe*%vY#n(RhMMEc0^EQ7hz6_3?&a}cMlKRnz{bmY+6 z^{neBb)y|#eOy2IAtL24Lh<7@21LSxcR()Y1SCfea!3UXk{yT=|4dZ-yJ3fJh!N@a zX1oFkX}l)U>$8Ok6ef+3Lmc}xMvg<#LdXn)T5bfx_e$EX)yM3+hG#_8n zbfAEg?Mz9ss7@&(#Q~NAlq|FY%m%RYlr5!N#MmX5LY~uz0GO=#&3dk1WBzch&~~(% z(QoU9?gj$t_3(MCX82bdPq=Py^XY)QTF?5hOk=ZC@ivdrC{wi?^C2&J_UV9AVwy5- z+DVfGf>NxY%L}+jRzzr|JUXHT9nsOfb$xYM4jX;gD+|Y~@4XIBt+~${#e3oZAEe=E zuz^>Cg3!JEfg$4r$4<8X;?Z&zFFD++LG-~c7|-c|0JUp05!6Wn#GTs!m#WF+HZ@14 z_WC3YpwPO5LZmX9jDavwXV84zBGe!J0x^DcN4vrAfWfVQ1unDjcoE)TGHk}ZuFVR_ znkwf6Z;BO{INB*{ov;uK4RX7MfgVD&5_;18dS7<^p+*jUU(PK+YGT&@p^vU z+V2uU*fYAaMwnmXnRMj;!#T6pw66LrbRX~MvJjsBAy40n`<#3y!tcUZGw}U+RUYOZ zf3M+?ehPa)_Fzo=xjHy{{q+$7>fl%V_v-7Yomh_H^{5&MsM;NCX-akCpSD+z0$5i{ zjYu=mStT&Z;Ir|^Ff8e7lm#Y`$ikvl~_O_RVOxSJ?ai%@eMD zHgToijGl16HP-9SdNqQA+tq-;tqSXI6}zh#FMW8M6(O}~TWMrbmMko5Cf|(Obe=Qm z)+j#6rOrEL&g5w~<6k!NWK)?;sVAEEY^v86s8cjHLYQ)|*bMqvQ$Sr64|A+K(4as$VnQ-uSIXSb$@@q3Y;y4ip%aqlh3;@P`rwo%VAba|k@G z(L$L-l*2FGd@Y33iw~m+%=RnpAY|Bz5Bo?_#`+8p;3J9s_f^Hgf_v_0ABpVtpOWCi zMfkTjiF0YZ+$vLQyq%1{pb1QjK)AuycwB^!cZr`K zvk~gdUgaOe9bGe+r_v9;5a`F&%ENMX-&yy@br)7|w+jA(6^#7qX3usv!P}P|-3pL< zm|c3?mU}Frz%)*=E2Rzs)Ic7gK#m5ZiwcMV;Fhgkp)1;GEyMChmKRi#)XqjYWm9XB z0}fJ{czYoXKix2-qak+%=tb*RH`0cJO0L+ue8xS;3l1ORhIKv{KD>kb^JZNL#iA&t z@SGgQhZ$8hZz~Cu(wG+0A?1`{QmdVabFw$uy0O0OyxbZuyA3(2GNz_AY=UBQnMfsf z>hidGiT-Pad_Hk{SIJqpyW9BiwDa4Is7ovF<2*zVJFhU4OkimRs5V;#A^WQT7UR_44j z&qj1oro?s=(zH{iOfI`c2>hX(&IJ#Q2h_8>b!wxe-B9>4GDhK@jn z-2dRr^miRH--Zo5fSZuxm=|94P{V@d-FHRa5p!5_gO6<{@+UIGOkF2pK=j zeIJ_3fQ~h94uoSWTW9K0Q;p#q5E#nJ{R)+897gAk4E^OYwZ9k6pHkbvo>_*a?1SaE|IkG$IXT>-A{18 zB>uT(zOF_PGYr13X;)}NF1r5!MEQ4C?F@1j*)-kPTy{Kgb%-1#Z`nHl1UJ&je>N^Q zy!MpF-38938}WmOD`w0(<6^uvuEhY)htTN3TbE(qg#!rrp}0@R8IBbT-5JWd|6a8h zGKM~Uo%fBUR+sbPJP^9W9qd*k&u_+FHwOT_+tIC|n-_&T0Ejm2Xh94b^q@M{mZl0)@5rE&dX$7MpLFl7Ptq-^~cZV6<2itfJhPa9EFh-SoObBH>kUX(zXP* zjB^z$yI7dbyivP`wTxM)Y*m<=GF4>)rcIc(##|CpN#sc=rIAauutqVi^wLuSLfRYv zqyr*46n2bCPP}+$^nd;+P~E~a4wqwz1J3pzw{X~oDGwo#Fx(*&hiC${&Z3AP6d{UD zOtH4Zd&W&1qYcvkuMsWx~=GYAE+|rq^7g3}q7LIaB6LDHgcAT^s+;_nrTG zsr+9LiU0FqVkycr7p8NeoQjbEWy`x7zKN)bS{jH%@Rz?@vO^>wC2{f_>sQ|$)ESSy zg?x4Bi*69jlQR2ba^?}LR|w5ziy+hT{q*-~hnCvDm)h)_&05Cxb)()k1C2i_r|?#~ z{Kfaud&$$dYcbwV!q2Pn=W2TGaw(KNqfQ)z*p$aIW$qT`;YC@i z1qu{vb9^Ymhco`pijha9oY8DK)^eu~-hB;=QvkP$ z>W*jz&1Nk6dd8Q4`FO#yGMB`M1>WRJDZ<@-V!AK z76AzQRB7Secq>}8{2 zX*MCNRAsusvQ?JUn5IN7jpPqIMQCHLPUR?M?-UTvxdu6lcrUd$D_NiK?)3wqn29hJ z2T<@zm<|Hz8{bW)NUrp}(nIEAe)x7Z8rtyEOi_&Y0b_l%p-?*5AX|Td$+_2+*qwy567`7D zC3XNW(hZsVqlU*gixp(Xd1)%JM~#7TUSzcj>X@B`s(XMQx(%bHJGCmGo*MuDRr&9m z74L0ovNa=ouga~O;w%~Rd4*)$2-e1j&0@GKe0Z?)_x7c6t&N-#m#K1pPCVXc?jH)5 z_b2k*WJF|QDX`C9Z+!jw!iV?wynVdTVxyA}%P9qRYc-@z zz{BCpimEwW>qdQ9S)Xov`?~SG=fvYf;{2wN&xOBe=EENwpRW~d;ZPsk-|^1A z#mYg14!`9XGw7foei@!-pP&~xd5JbX>4viZ?ZGgI@$L#ptbU+h++R6Jf`<8*eh)(y zd(of2Zs=)Ve;m>R|I3d9Sn6P)|IEH=2V$L90J^_NL<(JLS~%1R@v3v^K;0_)b_4=u z^jn2mo7Kw&p`L$Aa}Ix3NXhC(2?p8h`s4`IJ4Zrs&X7{bOYX)$O$C`}0|0U`P-9}= zh-ZhBa%67miz7c6ql2I|85Nbjvz~8uQlNuDHDKWHuU0Rxiz$YTa;?U3K5docL?>lR zER$M9U^T=OAfOxmY|1-W#w_>i3+1nkkZ{Vm=Y|KtgC3-h5iJNI1R}klE`+v}7P@`a zCE%@9K+oF)y`U@BTlIC$rvrc}^y>)I);($hMtHbil5wn~I`t5m^81X*V#m?L%{vMr z#9x~e$22qg>)z~p=RC6(7m$BBIJUEAJP0cM;BKAuW-YD-HtSSb=PZU{CF3!&i*{=hF$^`9l&jXS^)>j^vLVsaP%-g zQMvE4NZPK4cKF8X1Aeq>ulTP`**5P0(0F}AcaUc7nWC1eo05=98%*uS<80BWl^s+HnBVysOUpR(vY8H=(DTg7An~eOSA*g)CYuEp3rkAexTj6OG24vlBCW#aR?^S znv?#x;@PSd=x)2EYGNia-|+1BDfWTNik>gTq$>z z%T{SsyD@0eYyi{AWi3;ZZ@|xm{O&`?~YX_sS&kW8hCCf?)bPQ?y?p6lAgF;|O`7*8(VuU{b|npGDfL3W0W`ah^a^|ih&$Np zAyA_jcKoF4GjJPc~C5zIMk48>d=a!gF zi?gf5{0#q_jn<5lJBw{$Xyz^7X1U)b!{e#(Z`YNNYvuB$G67_xY85XWlSO>aJUq~trj^I9m3QA7UtX+T zXDQ12hs=lfnY)jL>HUdx@rXhgsIZsjLXAyGE=TS`*aE7B%Xc-F%@-R9s!fg6Ybofg zXfjIKo(nZ#5?}fomDJNObrI3mt*zDnt=8+Ux@`wbvVNi_S@xxE|q-?b%)|zQ4wrC|& zRoc3;e!KDckCnfD+WF5X__AAs=BX70nJT2KGM@GBJ2!&qG`E#o>WXnBJK$kd#S z0?5#b0cyJ@w=+L&L*>NwHffUt= zrq|?Tzx^c6K#Vjcn5s&dWNh@v=F=jaUW$Ioa@?j}v@6!|5c32BvHbp+OrSn#9ku z(Is2dB)PMYa&%$fp^=KTgyhD&Sm-~-RCkw2#F_jQw6R_{zJA~M{9^5fO(B=U{hJ45 zzwz?zneEGW+WQOXd?5%9R7~lWNq9U7?@x)_)%Ya}1`O-A*$kGZJe((feq8wFkB#Tu zio}|PHV-xHDH{X(iLLbY=paoFr&Aaa%5H02 z?v=jp-QkblN*HZ%faQ*8qzFUj2{fr33##e&DgAu)bnQX6b|H%kblqsL2?Ds<%*)pr z(M7M`Zyvh$?`u=`-57CewUpOZtAV-QJ~wm}ObdNpOWaY|yQCIDtzyyES(RnC{ixX{ z1SWOTy1u-JludZ9?o1(Ozl$=Azdht|RP2q6Oh?6xf0{GY3EdmXEAh1!>aG-TrLu6Z zGD)MYrkIi|w{ zTQw##vD88?*&-I{P)L!yFM7(P-743!r#vLtz?S$MQ+OW!^RR{0JnX*KGU`}g3A4Dm z7+ZC0@8f9L-AJ1-I^$lX0bF2%M)%l;)qw>E{(?Ak1I#*Du#j>9f!e)#3rFp(vDRjW zKJxnR^;`A((fCKf=LpSqQlK#Me&8h;hjsSb8U;w|p({VRKAa;N6ODcL5TEB8lZ+xq z)7ZW3O|{W(D=*(}{PC^v+tmuko?K3)!Qu@rx;L`Ga^A`3-KM}5liO$?N(m?lJx!#$ zjq+yVZZ#U-l(9=mrZEW8+p1y2+f3med zpG`BLrwQ?5(psyvgfXma9dOMYOT62JKUPGdqJbBb4AcPJ75%MWzRvD zWc=|~4`63cTv3-~5juJr&i?M`@vY5hlz-opmj>4=Tyo>$bfqFTa#*tr<%>lF?#_k3 zylJfK#^uHMMg(ORVM)rvr2Kq>pB^%I_cP@*+qmRX4)og$0N$d#vmw1lydNN1Ye=g| z6Qp^{RJGSIIp(*DZ3j#i4Y2ob)w^LZXK33Rzkm5ol8Rm|vO|qBSrdyiCCa&Qd7SvS zj}yYq^0o2%i*k{~$1^Mo#(JpAGzpJ)g@;q7u1YWY390JG-;-qFVG`q=%~>kR(l@cU zC3%D=oS+T>;w;N6rzL=a*0( zibvL>CV_*#l@1_|;9z{H-*nfzy|51_=CSCUwd~=Ia^~SjRsXh|<5a7%?$y$4wXwCv zR)y7d<|fJ7<6TDv!KdJy9BQ^R+ryiE6s$0?Dw{NmTo*edg#&0IKy(_BlUN(`j46>b zQ7rMG;>CaQ1`hKyXQS9k&BpakhC1-vVNvVxM;a#)M5-aiNy(d%Y9nc4+JzNZi}8b3 z6;g{10qsL}A}SFMl6`O0nJhF| zHlI`Of}fpjuouE44~yp9!&g$03*%9+Lg>5?n&kb?V+M8i@rj+Wog2j2_C;yP7fPAoa{bI93nwAp~c3zrg~FIohG}ZAyw6^J?kSV`lKJobAd|{re?J6T9W>IB=Vhc9?7rLKybwk|iuU%A z9;GRJA9`o$(!H9&U+bX5uj&z0lwA^=z?zh;+YAQ*>0rBv0zlWb?r26Ec5C8Mc6B|b z-FEi1Pjv8*V#tx$N)+28?FuKn(J-Xy%Bsi3ya6;Vg|ISN%&WG=-_6rWSb^PU3M_4E zIs4kkZuB=bqp>FoL#c00Z5}R;%{rjhqi2iXff*d_$Zm*tY^ru)Ptj5#^aD{)meAL& zS*w|hFrfG$NO^ExryM!S*5^~pI(nT|25Rnr!~qh4@WyS@-SYkwE6?}#zn`rJ zqqWA{Yvt}`rKk=3S+AAbOJ(0oSx5I{j}Ao(pfhw1kms$OMDb>v8oO5!%MK2_Q>Br!@&2JTbH>zGi#`MLU6Jmdw_aK26bM37l-f| z)y1LluX(Tj;3g*=bM}IxUNvthW9f+^?NANddITWl$PwDVIT)-MWl1c$8zIvN@=Eya zy3)acN)%c};h)74!-MW^fe?Dp`|7oCS>&;f?Jb?}+yC83iTWD)|5c18RS(tw4#M_k z0^B1s4YcBIg2U(zff)zy$HGT(#2rPRcSUSiUI}k6^5gvmt%kxa^f8ZRZ#cYxA>3Wf zJAe>y0*t%6iJu-eUKI3d^ukvMLKX@&|Ii{lo?lGfHWOZl3{59`ye{<6)zOEJQQJqM zY{#_^oZ;n;qvCnisAVruTW~Ni}R?aleb@A?qIl~l%qT(Re_ibtOXlG|aY0C>m}GSw86aSHqcsFUB$09ag}2*I$~$*o zD_^g64j&4&MY4;q|*$&p1{_Pl972P-znrwI#1|kQv%5uoorOPswvDY$|>8q zYM5cs06QX`P^f#Cu`dJwP8vm^$izSNGQd zz^eDn%eM%c>CDZerWH$zZb)ast!~V%6?!;MUB{`dRcMp``+jECiMyg(g6=3C`aEq- z8BtXN7>V>kz|xbA-37s`C*!hSuoU!{nNbuN=sXD&%bVwUC(pvPHrBP0HzCiyKzn0e zh3VFqZypjsyg0&p%{xM}1*!@)g(350@NZ*keSiQHdKXR&^f-)N4F%*%P<>rC@PQJ3 z7*r@~Y=mJ9((d&H;1%lh;=+WGQtKYS^{#iFD*aypca0i^gYf}R4TM*(!?RagHvdFAy8Ks$klZs-TH6)sfLR9BAuk{13e2U`k7Kh64HAIK8cW*c+;q zGmT$2W<#5o{rw>n2d+)wXO2FR#Zde*Ud&4UP0lOQz_ z6)fs&j~~V6tw1)UshXF*8$GD?3EO@=Z}4<$thYwV;s8MT1eeb zxJgXur~yLjpc~;`@QApB)FyF{X0Rh1Y5K#XWS%DL+vLh8i*icBU55LlY&m%wV&mJU zyfo$8CVbn3pZCU3YIM4bSE@%vza%9sUiaT4kPb3^LTI!GcTA~vv-M?V{kHPkr=5TQ zz4FhO#?9LXr!3r+#>Xf4%hl^3=7h{XNUG&PYF%e`bb||1vFOA6_G0&by7BOEPBq9w_hck<&!(D;|j*pl!qSTT9w!Laj zI21-Yz>(`*5$HpZ%msYKUWtzoP6E5lObNRneij-A2(9JM^Y{)TRPm~Q*NL^U@6Ld# zX88AJ!^rCH_6yh$cEqFG+S8*^>t?l4t_$M)A9VDgN~JH5s}4_TdlX#+nbeEfwWm%k zU2O{`J`<x#1gjsj-iI9qt5?d#?+9F$UQ3!@g=FmS5*+gAYYf@w^0J z@Dznw$nR8ycc;wbDY4Ar)!#0kO=+tkXlTgPNXtYzd+J3!EFJm4NDIVWgg25#*K;}> zb?<{HdAf0bs=RxF=gk19Rx1#_I|(1&7Vh3Id|XP?7CgG({yxO@P6 z=3FN0WT=fPTX?dm(2~huFmr~yq^>yi;Hg-cRFmf+-O|Utqh<_;=O5`b;{~`Y!sBG= zhpQ@^SaH}zGN%H5(YZzj@RdkwN%^AW=#^$zLcex`z+X9`9%Rqit9 z>jpqMP2|f$x<8T6XJnbpz)N$vQTmip5vyOACaXKpC{Q!G@WKTIVNSw18)$CX>xbf$ z2OwAJMl;eErUQnPk{k&1(0Lf`er=PDUfkj0;DG2h<2 zP}*tkb)-m*=@vKqGQ557c020j?x2O;9go!Q&uG~cF9?(#F)dRvcHAC$Pu{`iL-L|s zI+$(`5dsj3!JF3k%KJ%4i6j|qE|k?ZL3RXOceHv+U@D}2Lbu(F{jy> z&#f{|!hW*e$Zc(GTVwZLNDHTo34$g_(F(0>Bwtt^I{&cW@dF)4aUdy`SImQ9EZo*w z4S^fK=3BAJF`_c6X2t)=6r=rpQmbPyA*+_(6jOG+Xwki)BGDb-jsxl}Y2n!)kzshv zZuA2Lbigz4bd%w&#rczd@59)41@53F~i+8s8yM-%DTgKZ`NK^l`2Zp zWS+VgN+lU1T}!r>y{6EsWE)5|1JujqTuWJc#3!~Llv0?77Jwih&zZ@?7{y^lfm4CI zN%%NJZm?G2xxwe%l`J-1`Bp8zTGz%t8A!@SNzGgOVu~S$TBRf-?BC_0BWCuOov)u( z{{DOAmnY@ZE)TRD8l0mz-#a21DSNB7b;;m#dF~Pdzz(&h={CL$%Jz2J9ALnJr!UPh{);p^s39# z&|8Km`T!ywxNvBs06PbpFfh#k2-#G$adf5sd+2il zE72EV++kmhIA2-4!>y@BrPcEGC0pl5nQY{DnG?keLI*$3p>^6n)!V1l`2Y$(ei&%8 zKk`0aqQ6BG8WV4FMrweE3Z)=(MV3mtt)z8BS|QJkI`2&9#(vwVt5I%lt5W91>_de1 zt@i54*-@9#lv=ArRb^F+7Hrt!XGf`Fta_0e7H(<2$>Ev)_;K8XBldZ{95TX2KN!mN z0}znz0no`dOzE|*{E{ou>`D~O$j0mA5Hze!-?pd}{o5OKb|~to(f0`RgWptilNa$)r?%*e^Hyp`gPk_{OFwLz@9e%g(9#UG_$E zMM|ceXVTq*oEK7Y`q*BGFpP?X#yIBwJt7cF&WfADt1+)Gr39LNEu{BF+fX0vgK|8} z;NB9PC*l2KYkaLj$riF*H+$aeA@>+yk*?T=VihdkJBx8^v;-}?DN`%-i>RAh1m9un zo|zLK!(f2T_q3_cMTtGu zZk!J>AtI}*+FT(|h!%Q_VTfdqvJ}hZOG-9QT5WI)YFrMj?&!9ntECSN;Fw=%QJ0u` zZw0RB*^P6<3t|6N|BWGHBP|(SK|^^Qlz@K?hs-?UNU3|i%^e#x{xuFp2&1?p1z3oj zb)*oo3vW*y9292=fU6Hf)M|y0>P2_)yAUorfa9*(;re!l)%us^2yS$M5p{1)M(QJg zKs;Zd)^vD!AJ#{BKu0sE3{>BNfW&(#nuMjmX|~zax!57sRe1hh`Q=mNKfl30cB==u zOPTAYOzfN{D2tG0W0#3(T>;Sgock|Njql_v&je`}&N#CMlH}5hVHp05Y<+Z)+`8NvX`3 z2m&vF7XX`D8Q*19_UtK|>PjS~QDPZ5<**No8z4+cs5wIT1GGu=`*HHAdekaNlEHoH zTZTxz^xMA!*!>3wn5866SZ;Yr)p|;(@VqN8H|4SmlPDi1r6ggmO51EWSk6k$!c>K6 z2Av?G=CtTI-LYH@2Lr)_5ozsv(5O%}gtAljR2&p=Ze~aI-{vjGb(q%C!2DL|0 z7#ts=zm_8USer$#l&&km$&R5{!JRAZG7C}K8X9Zp>)xHTZ#^9xvmio4w=prz*0^cm zh-vrkHFU($tVn>!0l*J9=dL;4MlGcrBZ?sye+fG{>br;&EOq;N6!nBK*DJiw4-n_(WES1(0H-&38;IOMW zIve4b7);ZA=|$*W>B8eVn)SXqeW8W{iv^9hv{*s^>S6upM=&J0D}herXn1sm&c@Xc zbU$Wvh_agcp`0U>Wp((&zYMYJ0;cZShtbkQ9k3qrOQx6=^@cYAOnSexj!+v07@Oa3 zJfG~FyrI3S0mi2C2hM7F%CDGEDyN-w<=KusA_LtZ^&=r3tr5-|u)^NuM zf&}PrM!#qq9paMEvLIRMv&ofF1z@(ouU{-3S2EKAr`;OgeBYJJw&M&3kGvQn%nss; zlep88Ad#d%fJBumLxqD=A19j0>nIkd$~X(T_>oz3BB7;U>)_2Jv3Y<1*ROy zhQ@OhKAwbiw_{Jq$_aN>wyV9XWSh;iI5(mIQ%d&SeVCW6iAm`I0U#+;mcr9h;pexF z%MNu*%x<`o*f6J01^)D){PsmSKNV}}R6ThA4EB3<0Dyd(=eM{t_ULTL0B%HkR7r<{6b*oI z-^U=r$)JcO1;S7p{b^|;{c{$l;q!?AbZ!07SX}ii)R5 ze~k1{08P`+G4M`YCzlp2t(94oNzCg%=a_ygOg;>+EXfVOO-{{AA)ktm05)AF(LAjb zYvyN-HNe_=i!o}mKb>ZbPEr^?({8pX{+g;y>k2gN-jQSj0g{?E4Js9_8JQ+z-_g3G z+Xj1MnhR~)X?vyALftEEt>~^SRh=79z3GCot;*(I(OOmZnymMFRi>J}*+P^SMl`^O z)i@xChBZ|W;rD|P8=GT%$>H@-YT@Cu!=ekr%Q}XoB|Ly11UH3*#5qD!xG|3NM9!>r zK^-X5Sfzo{f4Bih$##P9ZbmI|TyMw3dN2ZD6`s9>D?FuS;7JU4#Kkx0shH-;u8keo8DU1ksdas~c~xE5E!}e%Ugw7`aB(35m@Kp5Dm9M6V%Q4vW;V$%+blwL0%@ zXTNT=wIVcQ%w}=ULGDAXM!qcfrau;z%{>JW-b*}d^RR}I*ILniw-LitEdo{zbl9F@ zv@g!P5Arz(hHIxjUb{6X1ln^-#nK10Rc@Pd-J`Ac@GMFePA*W7MJyj2;5C-41HAEb z7_eU5;i)R)nCT$DO3%1+{0gryfT=d^`$fCKaV6{L0*qZ={MkxoZg6VWheADXBHFEp5cGZ=P zdH)`9R14+rRoQ$RXm1D3VJMgyPb+|jdCc0$g273MsLS0X*~8{K^1MQ?_Wl{*snpPO z(u02Cn1~MUK^$A}PGve({5r>FIN8~C+b+?MM!MdwDeS=5Scfe(zB&kqYaYNRp;mE5 z=w17L!o2@kV9COitey5e83354M45zn9zRdBQ06fHg**)akfsTlis`jnjMHSDohXVW zP6Wkkx6tHyF4VOLjD)1$mqrfk;0LOK0PDb3X|*D)IAO3Nt+9nlBP!9ZAG+N=cTI3R2yYiw%tND+petD$DN|AYIXj7Pz?qE;wv}< zhv4UdU>E58Ae?f)+($JSpBr!Yrb9>35YLasaSp;^dsH24=%^7r=G|QYRR`JRPM|w< z9@o)JA_>Bt4js|2S3BWm{Kb^@(K}2c_s>M)8r^%40gw)ljE?l(ODba*m_k$ocJB?| zJ%}_e$kICJbK-Q))}gVxHacW86zEo|mzDi>=q$YS<}!cq{|WLZRpl$w;jE$wCLBa>MV6gQzp$5GGipRqo(V) zT7CLo^)|Hz2=+tGF_?ir7gH1!Tbs$1=R<+T$v_dl?q1zdhBfl`{x>HxMi{p%ux`-J zsD@rpcdc5mrPElFgK!dD0*{beYv&xqO6@WSX3W(4AjsCZtc|a$@}F1X4OnjQX;OZ_ zHGW?cFWL@i2?Z&nDfM&pix7~xFuw?&rp)C zG=A+-iLTEMzsC_2FN;3hi^}lu2cdCPSKR0KefEMop~Z=t32Wm!i870Nz8^F2**yNa zWcz&<2LQq}*+}T(9)Dh({a?)SPSa$@K05h^ljC5tL?}*?U}o6mq_{;V(73|u57N<< zI)kZ)VRCkEfO#z1sx`~-nX;)>blPFxNp;8Dk(d2o*GEEjaHkD0A4F~YhDjs z$sQR<6>>3D+IH9q%q{uwg=XCbolqFjfju3RmNqAGcrFRgy~|*79+l?s=8rl1A$IY9 zV2s-Fsf>5X5bo~qs|-ORLi?d0#ztu_*fvAq==n$Z^+(Mc=d+EIRk|}4OxmvW<*+Hl zz(~eIti~ZxCy)eaa?zG?zo4Vqq8p9Fz5Dwo@rhYp6W!Fh)}1meqMT8bL_;}AqdRMv3|Mo?U$Xue6^D)8x)_|1dx(}&74!aPr~ zOx|yx-#k5(d*?QUhER`pnq2E%>O??fu4fxv{@nT4UcV_L-8kmo9T=J~zs#l9ysh zJqJP|JX#xVjqmFF#PjFbTFag$c%I?IBFx3)rR)Z9a}uU(EnKDZHN?h~Mu-zr&U^nh z@6Cu@M{wzN%YNT|H6`=_NL3pfn{~{XKvB*2X`pzFt}*+dtdxf1EMju%oCXr)71mby zwkuzqocv`~E*oeyGGIwghD(AZn~)}bgB=KgS&&m=o(g%HI6cq9n@1rh^5PtjlDwHv zF~hA`MU;BsutwTUJjD~|a3U7YA35w{>22B^Ab7urqnt&(zewS>CcfWnXj5xeXMWk0 z>*fQDbj$~_-V1pER6_TpI{<(Kyr|Vb_(Z;U50(&bYSY9&q2yH4HQ(b~en61gv8 z@$cv=+wW2bf5>mvWWoVc5CD6+C}ghx=h4=2zyTWkP5r(GZs-n4H`WrSy)Wr_5aHm& z-wr_FN1$*79}?HkNL6Ia87t78R}3UC z8*I($eYC;U(0xPp-4of>W(Dj!ZQE$uj_f;m&XyXe6gfPWOeh8uqg!V!1TicXs8%8$N2jR9gT%HRq;j;~nBm{@b9BHke^ z$!L5e$$LcDb;W>>D0j3Ce*jH7JiDmdPf2K-P-{j@BbABMvhnk|ajU||E%AA)RDq9^ z@Xu%Aw5_x)Q%>IgG!3+kHVgZ&JMFUa{^iDB{y!BpRYUr zoP`e$Gt)9zXt~d7YS1#XHzJ6;I$4WUhWU_hlTGb|vwZ^_y>eUUuEBL9v^CFxki5@Y`ld(^#Dy0b3 zOLkLANIuBoK@_a)wt4$si#o3jZf;~+!<$Q)r*fR79*810C{2CB;vd=x-U{6 z7x=cqcU3O_K$F1gfu~8}`E%v`d?TMd%vwRLzm;`Q_V!N^Lg%;y`s03`g-H` zedGI=oxgll{`wA|>lj%(34FXX{&-WUAX-gfHH&!E&C1laTV=Z$zo3Y9^GjKnmqeNU zSvr>i@%(SK@7xXy?)bkMX*NQ?pgoOUo0T@L&6?pxm>Ybs<>MLAr|kXbXfuDC;P{eN+ehSY{E%Hu=h_t(VN4fd;YX(qcijS!1$v`DrY zAe3h5%_y^!I|&sxr0VC)uIKP!PR@%8@SxaQV-HF9ow_x)%Z+y3dZ}hv66I9T(_}KW z6br-71~ddQ?_Q!}LHqryr@J&|G;Nlx-=rD73~#R23&?|34~L- zH4pQlU7sA&O_9nNpb018nH+~7KVVh38hx3^>xXlOWJ^ElfhXc_(yyW-hyOzdL`2M( zF-i=YP8t9}jGKZoHCXW9Jwi7nwbsi;>^s|dxP*- zob)&Ke80Hok2mkb39W^k?-u6nE?u!Y_1k~%@Q|Khi-*?7h~A+GQ;?x;gkJxu*}Q)v z4rVk}^X$B&Fzq{1EoG4E4qK(|6>XL5V;9?2$!n$U$x{iI3fR4RVB3>%0_qrkG9Nk* z*49i|HKyEIe#^q6MnH>Z4^bAf3B6Nc^AKS3@O=OS2lg(o<9YrHt!nJQA?E#W&{1qC zu9%74e?JIxye54I+)Hr09E6i2Ay621l&#j;o)$^k&kLWr`jyX!d0j--C4 zy+Mw+@5chtPlP2sBW{g(Llz47VW#`39>9=%m)Tqx?Ezb&G6rki&<3&y|m0F1-ZSTB{= zx60QGe7OqW6mBjD8F*jKdwxijDLE^DHL-ucHom_%-dAgYGl}v%!_!G9GZvbT8R*H| z39IoZWC!tf!GlB>0DzuyiM3GZW1Khj|C_M30~j7c+xK=TH&yxorCnoB$Nz1q